try v5
This commit is contained in:
parent
dc22950f4d
commit
85d4207617
@ -16,7 +16,7 @@
|
||||
],
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"tsconfig.json"
|
||||
"projects/common-ui/tsconfig.json"
|
||||
]
|
||||
},
|
||||
"rules": {
|
||||
@ -82,6 +82,7 @@
|
||||
"no-underscore-dangle": "off",
|
||||
"no-param-reassign": "error",
|
||||
"no-dupe-class-members": "off",
|
||||
"no-redeclare": "off",
|
||||
"consistent-return": "off",
|
||||
"@typescript-eslint/restrict-template-expressions": "off",
|
||||
"@typescript-eslint/lines-between-class-members": "off"
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* eslint-disable @angular-eslint/prefer-on-push-component-change-detection */
|
||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { HelpModeService } from '@iqser/common-ui';
|
||||
|
||||
@ -17,7 +18,7 @@ export class HelpButtonComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this._helpModeService.helpButtonKey = null;
|
||||
this._helpModeService.helpButtonKey = undefined;
|
||||
}
|
||||
|
||||
activateHelpMode(): void {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* eslint-disable @angular-eslint/prefer-on-push-component-change-detection */
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { FilterService } from '../filter.service';
|
||||
import { IFilter } from '../models/filter.model';
|
||||
|
||||
@ -27,18 +27,15 @@ interface Helper {
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class HelpModeService {
|
||||
helpButtonKey: string | undefined;
|
||||
private readonly _isHelpModeActive$ = new BehaviorSubject(false);
|
||||
readonly isHelpModeActive$ = this._isHelpModeActive$.asObservable();
|
||||
private readonly _helpModeDialogIsOpened$ = new BehaviorSubject(false);
|
||||
readonly helpModeDialogIsOpened$ = this._helpModeDialogIsOpened$.asObservable();
|
||||
|
||||
private readonly _helperElements: Record<string, Helper> = {};
|
||||
private readonly _renderer: Renderer2;
|
||||
|
||||
private _dialogMode = false;
|
||||
|
||||
helpButtonKey: string | null = null;
|
||||
|
||||
constructor(
|
||||
@Inject(HELP_DOCS) private readonly _docs: Record<string, Record<string, string>>,
|
||||
@Inject(MANUAL_BASE_URL) private readonly _manualBaseURL: string,
|
||||
@ -95,7 +92,7 @@ export class HelpModeService {
|
||||
}
|
||||
|
||||
highlightHelperElements(): void {
|
||||
Object.values(this._helperElements).forEach(({ element, helperElement }) => {
|
||||
Object.values(this._helperElements).forEach(({ helperElement }) => {
|
||||
this._renderer.addClass(helperElement, 'help-highlight');
|
||||
setTimeout(() => {
|
||||
this._renderer.removeClass(helperElement, 'help-highlight');
|
||||
|
||||
@ -12,6 +12,7 @@ export abstract class FormFieldComponent<I> implements ControlValueAccessor, Val
|
||||
return this._value;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
||||
onChange = (value?: I) => {};
|
||||
|
||||
onTouched = () => {};
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* eslint-disable @angular-eslint/prefer-on-push-component-change-detection */
|
||||
import { AfterViewInit, Component, forwardRef, HostListener, Inject, Input, OnDestroy, ViewChild } from '@angular/core';
|
||||
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
||||
import { delay, tap } from 'rxjs/operators';
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: 'redaction-small-chip [color]',
|
||||
templateUrl: './small-chip.component.html',
|
||||
styleUrls: ['./small-chip.component.scss'],
|
||||
|
||||
@ -30,7 +30,7 @@ export abstract class GenericService<I> {
|
||||
get<T = I[]>(): Observable<T>;
|
||||
// eslint-disable-next-line @typescript-eslint/unified-signatures
|
||||
get<T = I>(id: string, ...args: unknown[]): Observable<T>;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
||||
get<T>(id?: string, ...args: unknown[]): Observable<T> {
|
||||
return id ? this._getOne<T>([id]) : this.getAll<T>();
|
||||
}
|
||||
|
||||
@ -24,7 +24,9 @@ export function OnChange<T>(callback: CallBackFunction<T> | string): PropertyDec
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function OnChange<T, C extends Object = Object>(callback: CallBackFunction<T> | FunctionKeys<C>): TypedPropertyDecorator<C>;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function OnChange<T, C extends Object = Object>(callback: CallBackFunction<T> | FunctionKeys<C>): TypedPropertyDecorator<C> {
|
||||
export function OnChange<T, C extends Object = Object>(
|
||||
callback: CallBackFunction<T> | string | FunctionKeys<C>,
|
||||
): TypedPropertyDecorator<C> | PropertyDecorator {
|
||||
return function _onChange(target: C, key: PropertyKey) {
|
||||
Object.defineProperty(target, key, {
|
||||
set(value: T) {
|
||||
|
||||
@ -7,6 +7,7 @@ export function Required<T>(condition: Condition<T> = () => true): PropertyDecor
|
||||
if (condition(this)) {
|
||||
throw new Error(`Attribute ${String(propertyKey)} is required`);
|
||||
}
|
||||
return this[propertyKey];
|
||||
},
|
||||
set(value: unknown) {
|
||||
Object.defineProperty(this, propertyKey, {
|
||||
|
||||
@ -2,16 +2,22 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"strict": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"inlineSources": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"lib": ["dom", "es2020"],
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2020"
|
||||
],
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user