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