UI: Refactoring
This commit is contained in:
parent
17893201b6
commit
f2088ad53b
@ -27,7 +27,7 @@ import {
|
||||
Validator,
|
||||
Validators
|
||||
} from '@angular/forms';
|
||||
import { Observable, of, Subject, Subscription } from 'rxjs';
|
||||
import { Observable, of, Subject } from 'rxjs';
|
||||
import {
|
||||
ComplexFilterPredicateInfo,
|
||||
ComplexOperation,
|
||||
@ -81,11 +81,9 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid
|
||||
|
||||
complexOperationTranslations = complexOperationTranslationMap;
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = null;
|
||||
|
||||
private valueChangeSubscription: Subscription = null;
|
||||
|
||||
constructor(private fb: UntypedFormBuilder,
|
||||
@Inject(COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN) private complexFilterPredicateDialogComponent: ComponentType<any>,
|
||||
private dialog: MatDialog) {
|
||||
@ -151,7 +149,7 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid
|
||||
}
|
||||
|
||||
public removePredicate(index: number) {
|
||||
(this.filterListFormGroup.get('predicates') as UntypedFormArray).removeAt(index);
|
||||
this.predicatesFormArray.removeAt(index);
|
||||
}
|
||||
|
||||
public addPredicate(complex: boolean) {
|
||||
|
||||
@ -76,7 +76,7 @@ export class KeyFilterListComponent implements ControlValueAccessor, Validator,
|
||||
|
||||
keyFiltersControl: UntypedFormControl;
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = null;
|
||||
|
||||
constructor(private fb: UntypedFormBuilder,
|
||||
|
||||
@ -68,7 +68,7 @@ export class CreateAlarmRulesComponent implements ControlValueAccessor, OnInit,
|
||||
|
||||
private usedSeverities: AlarmSeverity[] = [];
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = (v: any) => { };
|
||||
|
||||
constructor(private dialog: MatDialog,
|
||||
|
||||
@ -72,12 +72,11 @@ export class DeviceProfileAlarmsComponent implements ControlValueAccessor, OnIni
|
||||
@Input()
|
||||
deviceProfileId: EntityId;
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = (v: any) => { };
|
||||
|
||||
constructor(private store: Store<AppState>,
|
||||
private fb: UntypedFormBuilder,
|
||||
private dialog: MatDialog) {
|
||||
private fb: UntypedFormBuilder) {
|
||||
}
|
||||
|
||||
registerOnChange(fn: any): void {
|
||||
|
||||
@ -72,7 +72,7 @@ export class Lwm2mBootstrapConfigServersComponent implements OnInit, ControlValu
|
||||
}
|
||||
}
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = (v: any) => { };
|
||||
|
||||
constructor(public translate: TranslateService,
|
||||
|
||||
@ -71,7 +71,7 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid
|
||||
@Input()
|
||||
disabled: boolean;
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = (v: any) => { };
|
||||
|
||||
constructor(private store: Store<AppState>,
|
||||
|
||||
@ -51,7 +51,7 @@ export class RelationFiltersComponent extends PageComponent implements ControlVa
|
||||
|
||||
relationFiltersFormGroup: UntypedFormGroup;
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = null;
|
||||
|
||||
constructor(protected store: Store<AppState>,
|
||||
|
||||
@ -64,7 +64,7 @@ export class KeyValMapComponent extends PageComponent implements ControlValueAcc
|
||||
|
||||
kvListFormGroup: UntypedFormGroup;
|
||||
|
||||
private destroy$ = new Subject();
|
||||
private destroy$ = new Subject<void>();
|
||||
private propagateChange = null;
|
||||
|
||||
constructor(protected store: Store<AppState>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user