@quadrel-enterprise-ui/framework 21.12.10 → 21.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, InjectionToken, inject, ElementRef, HostBinding, Input, ViewEncapsulation, Component, Injectable, Injector, HostListener, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, NgModule, EventEmitter, Output, Renderer2, Pipe, ViewContainerRef, NO_ERRORS_SCHEMA, DestroyRef, SecurityContext, NgZone, ViewChildren, afterNextRender, forwardRef, QueryList, ContentChildren, ContentChild, afterEveryRender, reflectComponentType, isDevMode, TemplateRef, CUSTOM_ELEMENTS_SCHEMA, provideAppInitializer } from '@angular/core';
2
+ import { Directive, InjectionToken, inject, ElementRef, HostBinding, Input, ViewEncapsulation, Component, Injectable, Injector, HostListener, ChangeDetectionStrategy, ChangeDetectorRef, DestroyRef, ViewChild, NgModule, EventEmitter, Output, Renderer2, Pipe, ViewContainerRef, NO_ERRORS_SCHEMA, SecurityContext, NgZone, ViewChildren, afterNextRender, forwardRef, QueryList, ContentChildren, ContentChild, afterEveryRender, reflectComponentType, isDevMode, TemplateRef, CUSTOM_ELEMENTS_SCHEMA, provideAppInitializer } from '@angular/core';
3
3
  import { Dialog, DialogRef, DIALOG_DATA, DialogModule } from '@angular/cdk/dialog';
4
4
  import { quadrelIcons } from '@quadrel-enterprise-ui/icons';
5
5
  export { quadrelIconNames } from '@quadrel-enterprise-ui/icons';
6
- import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, Subscription, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap as switchMap$1, asyncScheduler, startWith as startWith$1, filter as filter$1, takeUntil as takeUntil$1, debounceTime as debounceTime$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, queueScheduler, concatMap as concatMap$1, exhaustMap, finalize, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
7
- import { map, startWith, take, debounceTime, takeUntil, filter, catchError, distinctUntilChanged, switchMap, concatMap, skip, throttleTime, tap, auditTime, withLatestFrom, first, observeOn, pairwise as pairwise$1, mergeMap } from 'rxjs/operators';
6
+ import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap as switchMap$1, asyncScheduler, Subscription, startWith as startWith$1, filter as filter$1, debounceTime as debounceTime$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, queueScheduler, concatMap as concatMap$1, exhaustMap, takeUntil as takeUntil$1, finalize, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
7
+ import { map, startWith, take, debounceTime, filter, catchError, distinctUntilChanged, switchMap, concatMap, skip, throttleTime, tap, takeUntil, auditTime, withLatestFrom, first, observeOn, pairwise as pairwise$1, mergeMap } from 'rxjs/operators';
8
8
  import { v4 } from 'uuid';
9
9
  import * as i2 from '@ngx-translate/core';
10
10
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
11
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
11
12
  import * as i1$3 from '@angular/router';
12
13
  import { Router, ActivationEnd, RouterModule, ActivatedRoute, NavigationEnd, NavigationCancel, NavigationError, NavigationStart } from '@angular/router';
13
14
  import * as i1 from '@angular/cdk/drag-drop';
@@ -19,7 +20,6 @@ import * as i1$2 from '@angular/forms';
19
20
  import { NG_VALUE_ACCESSOR, FormsModule, UntypedFormControl, UntypedFormArray, UntypedFormGroup, ControlContainer, FormControlDirective, AbstractControl, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule, NgForm, FormGroupDirective, FormArray, FormGroup, FormBuilder } from '@angular/forms';
20
21
  import { ComponentPortal } from '@angular/cdk/portal';
21
22
  import { OverlayPositionBuilder, Overlay } from '@angular/cdk/overlay';
22
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
23
23
  import { EventSourcePolyfill } from 'event-source-polyfill';
24
24
  import { DomSanitizer } from '@angular/platform-browser';
25
25
  import * as i1$4 from '@angular/cdk/a11y';
@@ -1346,7 +1346,7 @@ class QdDialogComponent {
1346
1346
  hasSections;
1347
1347
  hasInfoBanner;
1348
1348
  isMobile = false;
1349
- _destroyed$ = new Subject();
1349
+ _destroyRef = inject(DestroyRef);
1350
1350
  _pageDialogCanCloseFn = null;
1351
1351
  _isConfirmingClose = false;
1352
1352
  get isFullWidth() {
@@ -1357,12 +1357,12 @@ class QdDialogComponent {
1357
1357
  }
1358
1358
  ngOnInit() {
1359
1359
  this.config = this.dialogRef.config;
1360
- this.dialogService.pageDialogCanClose$.pipe(takeUntil(this._destroyed$)).subscribe(entry => {
1360
+ this.dialogService.pageDialogCanClose$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(entry => {
1361
1361
  this._pageDialogCanCloseFn = entry?.owner === this.dialogRef ? entry.fn : null;
1362
1362
  });
1363
1363
  this.breakpointService
1364
1364
  .isViewportBelow('md')
1365
- .pipe(takeUntil(this._destroyed$))
1365
+ .pipe(takeUntilDestroyed(this._destroyRef))
1366
1366
  .subscribe(isMobile => (this.isMobile = isMobile));
1367
1367
  this.bindEscToClose();
1368
1368
  }
@@ -1379,8 +1379,6 @@ class QdDialogComponent {
1379
1379
  }
1380
1380
  ngOnDestroy() {
1381
1381
  this.dialogService.clearPageDialogCanClose(this.dialogRef);
1382
- this._destroyed$.next();
1383
- this._destroyed$.complete();
1384
1382
  }
1385
1383
  close() {
1386
1384
  if (this.isFullWidth && this._pageDialogCanCloseFn)
@@ -1435,7 +1433,7 @@ class QdDialogComponent {
1435
1433
  }
1436
1434
  bindEscToClose() {
1437
1435
  this.dialogRef.keydownEvents
1438
- .pipe(takeUntil(this._destroyed$), filter((e) => e.key === 'Escape' && !e.defaultPrevented))
1436
+ .pipe(takeUntilDestroyed(this._destroyRef), filter((e) => e.key === 'Escape' && !e.defaultPrevented))
1439
1437
  .subscribe(e => {
1440
1438
  e.preventDefault();
1441
1439
  this.close();
@@ -5366,14 +5364,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
5366
5364
 
5367
5365
  class QdBreadcrumbsService {
5368
5366
  router = inject(Router);
5367
+ _destroyRef = inject(DestroyRef);
5369
5368
  breadcrumbsSubject = new ReplaySubject(1);
5370
- destroyed$ = new Subject();
5371
5369
  outlet = 'primary';
5372
5370
  breadcrumbs$ = this.breadcrumbsSubject.asObservable();
5373
5371
  url$ = this.breadcrumbsSubject.pipe(map(breadcrumbs => breadcrumbs[breadcrumbs.length - 1]?.url || ''));
5374
5372
  initialize() {
5375
5373
  this.getOutletRouteSnapshot$()
5376
- .pipe(map(snapshot => this.getSnapshotPathHierarchy(snapshot)))
5374
+ .pipe(map(snapshot => this.getSnapshotPathHierarchy(snapshot)), takeUntilDestroyed(this._destroyRef))
5377
5375
  .subscribe(snapshotPathHierarchy => {
5378
5376
  let urlParts = [];
5379
5377
  this.breadcrumbsSubject.next(snapshotPathHierarchy.map(snapshot => {
@@ -5386,10 +5384,6 @@ class QdBreadcrumbsService {
5386
5384
  }));
5387
5385
  });
5388
5386
  }
5389
- ngOnDestroy() {
5390
- this.destroyed$.next();
5391
- this.destroyed$.complete();
5392
- }
5393
5387
  getOutletRouteSnapshot$() {
5394
5388
  return this.router.events.pipe(filter(event => event instanceof ActivationEnd), map(event => event.snapshot), filter(snapshot => snapshot.outlet === this.outlet));
5395
5389
  }
@@ -5774,6 +5768,7 @@ class QdDataFacetsChipTruncatedTooltipComponent {
5774
5768
  changeDetectorRef = inject(ChangeDetectorRef);
5775
5769
  translateService = inject(TranslateService);
5776
5770
  elementService = inject(QdElementService);
5771
+ _destroyRef = inject(DestroyRef);
5777
5772
  truncatedChips;
5778
5773
  i18n;
5779
5774
  columnOptions;
@@ -5783,7 +5778,6 @@ class QdDataFacetsChipTruncatedTooltipComponent {
5783
5778
  }
5784
5779
  closable = false;
5785
5780
  changesSubject = new Subject();
5786
- adjustWidthSubscription;
5787
5781
  ngOnChanges(changes) {
5788
5782
  if (changes['truncatedChips']?.isFirstChange() === false ||
5789
5783
  changes['i18n']?.isFirstChange() === false ||
@@ -5791,9 +5785,6 @@ class QdDataFacetsChipTruncatedTooltipComponent {
5791
5785
  this.changesSubject.next();
5792
5786
  }
5793
5787
  }
5794
- ngOnDestroy() {
5795
- this.adjustWidthSubscription?.unsubscribe();
5796
- }
5797
5788
  ngOnInit() {
5798
5789
  this.setElementMaxWidth(TOOLTIP_MIN_MAX_WIDTH);
5799
5790
  this.element.style.visibility = 'hidden';
@@ -5803,8 +5794,8 @@ class QdDataFacetsChipTruncatedTooltipComponent {
5803
5794
  this.adjustWidthToFitInViewport();
5804
5795
  this.element.style.visibility = 'visible';
5805
5796
  }, 1);
5806
- this.adjustWidthSubscription = merge(this.changesSubject, this.translateService.onLangChange, fromEvent(window, 'resize'))
5807
- .pipe(debounceTime(100))
5797
+ merge(this.changesSubject, this.translateService.onLangChange, fromEvent(window, 'resize'))
5798
+ .pipe(debounceTime(100), takeUntilDestroyed(this._destroyRef))
5808
5799
  .subscribe(() => this.adjustWidthToFitInViewport());
5809
5800
  }
5810
5801
  close() {
@@ -5882,13 +5873,13 @@ class QdDataFacetsChipTruncatedIndicatorComponent {
5882
5873
  hostRef = inject(ElementRef);
5883
5874
  overlayPositionBuilder = inject(OverlayPositionBuilder);
5884
5875
  overlay = inject(Overlay);
5876
+ _destroyRef = inject(DestroyRef);
5885
5877
  truncatedChips = [];
5886
5878
  i18n;
5887
5879
  columnOptions;
5888
5880
  hostElement;
5889
5881
  overlayRef;
5890
5882
  showEvents = ['mouseenter', 'mousemove'];
5891
- showTooltipSubscription;
5892
5883
  hideTooltipSubscription;
5893
5884
  tooltipComponent;
5894
5885
  constructor() {
@@ -5912,12 +5903,12 @@ class QdDataFacetsChipTruncatedIndicatorComponent {
5912
5903
  }
5913
5904
  }
5914
5905
  ngOnDestroy() {
5915
- this.showTooltipSubscription?.unsubscribe();
5916
- this.hideTooltipSubscription?.unsubscribe();
5917
5906
  this.hideTooltip();
5918
5907
  }
5919
5908
  subscribeShowTooltip() {
5920
- this.showTooltipSubscription = merge(...this.showEvents.map(event => fromEvent(this.hostElement, event)), ...this.showEvents.map(event => fromEvent(this.overlayRef.hostElement, event))).subscribe(() => {
5909
+ merge(...this.showEvents.map(event => fromEvent(this.hostElement, event)), ...this.showEvents.map(event => fromEvent(this.overlayRef.hostElement, event)))
5910
+ .pipe(takeUntilDestroyed(this._destroyRef))
5911
+ .subscribe(() => {
5921
5912
  this.hideTooltipSubscription?.unsubscribe();
5922
5913
  this.subscribeHideTooltip();
5923
5914
  this.showTooltip();
@@ -5939,7 +5930,7 @@ class QdDataFacetsChipTruncatedIndicatorComponent {
5939
5930
  }
5940
5931
  subscribeHideTooltip() {
5941
5932
  this.hideTooltipSubscription = merge(fromEvent(this.hostElement, 'mouseleave'), fromEvent(this.overlayRef.hostElement, 'mouseleave'))
5942
- .pipe(debounceTime(HIDE_DELAY))
5933
+ .pipe(debounceTime(HIDE_DELAY), takeUntilDestroyed(this._destroyRef))
5943
5934
  .subscribe(() => this.hideTooltip());
5944
5935
  }
5945
5936
  hideTooltip() {
@@ -6047,12 +6038,12 @@ class QdDataFacetsCurrencyComponent {
6047
6038
  config;
6048
6039
  data = 0;
6049
6040
  testId;
6050
- _destroyed$ = new Subject();
6041
+ _destroyRef = inject(DestroyRef);
6051
6042
  _currencySubject = new ReplaySubject(1);
6052
6043
  currency$ = this._currencySubject.asObservable();
6053
6044
  constructor() {
6054
6045
  this.translateService?.onLangChange
6055
- .pipe(takeUntil(this._destroyed$))
6046
+ .pipe(takeUntilDestroyed(this._destroyRef))
6056
6047
  .subscribe((event) => this.setCurrency(event.lang));
6057
6048
  }
6058
6049
  ngOnInit() {
@@ -6061,9 +6052,6 @@ class QdDataFacetsCurrencyComponent {
6061
6052
  ngOnChanges() {
6062
6053
  this.setCurrency();
6063
6054
  }
6064
- ngOnDestroy() {
6065
- this._destroyed$.complete();
6066
- }
6067
6055
  setCurrency(lang) {
6068
6056
  const currency = this.getCurrency(lang || this.translateService?.currentLang || this.translateService?.defaultLang || navigator.language);
6069
6057
  this._currencySubject.next(currency);
@@ -6130,7 +6118,7 @@ class QdDataFacetsDateComponent {
6130
6118
  config;
6131
6119
  data;
6132
6120
  testId;
6133
- _destroyed$ = new Subject();
6121
+ _destroyRef = inject(DestroyRef);
6134
6122
  _locale;
6135
6123
  _displayedDateSubject = new ReplaySubject(1);
6136
6124
  displayedDate$ = this._displayedDateSubject.asObservable();
@@ -6139,7 +6127,7 @@ class QdDataFacetsDateComponent {
6139
6127
  }
6140
6128
  constructor() {
6141
6129
  this.translateService?.onLangChange
6142
- .pipe(takeUntil(this._destroyed$))
6130
+ .pipe(takeUntilDestroyed(this._destroyRef))
6143
6131
  .subscribe((event) => this.setDisplayedDate(event.lang));
6144
6132
  }
6145
6133
  ngOnInit() {
@@ -6148,9 +6136,6 @@ class QdDataFacetsDateComponent {
6148
6136
  ngOnChanges() {
6149
6137
  this.setDisplayedDate();
6150
6138
  }
6151
- ngOnDestroy() {
6152
- this._destroyed$.complete();
6153
- }
6154
6139
  setDisplayedDate(locale) {
6155
6140
  this._locale =
6156
6141
  locale || this.translateService?.currentLang || this.translateService?.defaultLang || navigator.language;
@@ -7337,7 +7322,7 @@ class QdNumberInputService {
7337
7322
  _decimalSeparator;
7338
7323
  _groupSeparator;
7339
7324
  localeService = inject(QdLocaleService, { optional: true });
7340
- destroyRef = inject(DestroyRef);
7325
+ _destroyRef = inject(DestroyRef);
7341
7326
  ambiguityHintKeyDot = 'i18n.qd.input.number.ambiguousHint.dot';
7342
7327
  ambiguityHintKeyComma = 'i18n.qd.input.number.ambiguousHint.comma';
7343
7328
  invalidCharactersErrorKeyComma = 'i18n.qd.input.number.invalidCharacters.comma';
@@ -7353,7 +7338,7 @@ class QdNumberInputService {
7353
7338
  }
7354
7339
  constructor() {
7355
7340
  if (this.localeService) {
7356
- this.localeService.locale$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(locale => {
7341
+ this.localeService.locale$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(locale => {
7357
7342
  this.detectSeparatorsForLocale(locale);
7358
7343
  });
7359
7344
  }
@@ -9896,7 +9881,7 @@ class QdCheckboxChipsComponent {
9896
9881
  options;
9897
9882
  isLabelDisabled;
9898
9883
  isHintDisabled;
9899
- _subs = new Subscription();
9884
+ _destroyRef = inject(DestroyRef);
9900
9885
  _onChange = () => { };
9901
9886
  _onTouch = () => { };
9902
9887
  ngOnInit() {
@@ -9912,18 +9897,21 @@ class QdCheckboxChipsComponent {
9912
9897
  console.warn('Quadrel Framework | QdCheckboxChips - Missing FormControlName directive from host element of the component.');
9913
9898
  }
9914
9899
  }
9915
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
9916
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
9917
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
9918
- this._subs.add(this.initOpModeSubscription());
9900
+ this.actionEmitterService.hintEventEmitter$
9901
+ .pipe(takeUntilDestroyed(this._destroyRef))
9902
+ .subscribe(() => this.clickHint.emit());
9903
+ this.actionEmitterService.readonlyEventEmitter$
9904
+ .pipe(takeUntilDestroyed(this._destroyRef))
9905
+ .subscribe(() => this.clickReadonly.emit());
9906
+ this.actionEmitterService.viewonlyEventEmitter$
9907
+ .pipe(takeUntilDestroyed(this._destroyRef))
9908
+ .subscribe(() => this.clickViewonly.emit());
9909
+ this.initOpModeSubscription();
9919
9910
  }
9920
9911
  ngOnChanges(changes) {
9921
9912
  if (changes['config'])
9922
9913
  this.updateConfiguration();
9923
9914
  }
9924
- ngOnDestroy() {
9925
- this._subs.unsubscribe();
9926
- }
9927
9915
  registerOnChange(fn) {
9928
9916
  this._onChange = fn;
9929
9917
  }
@@ -9960,7 +9948,10 @@ class QdCheckboxChipsComponent {
9960
9948
  initOpModeSubscription() {
9961
9949
  if (!this.eventBrokerService)
9962
9950
  return;
9963
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
9951
+ this.eventBrokerService
9952
+ .consume('operation_mode_changed')
9953
+ .pipe(takeUntilDestroyed(this._destroyRef))
9954
+ .subscribe(topic => {
9964
9955
  if (typeof this.config.viewonly === 'boolean')
9965
9956
  return;
9966
9957
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -10408,7 +10399,7 @@ class QdCheckboxesComponent {
10408
10399
  control;
10409
10400
  _onChange = () => { };
10410
10401
  _onTouch = () => { };
10411
- _subs = new Subscription();
10402
+ _destroyRef = inject(DestroyRef);
10412
10403
  get hasHint() {
10413
10404
  return this.config.hint && this.config.hint.i18n && !this.config.hint.disabled;
10414
10405
  }
@@ -10437,10 +10428,16 @@ class QdCheckboxesComponent {
10437
10428
  this.checkboxesService.setCheckboxesList(this.options);
10438
10429
  this.checkboxesService.fillCheckboxesListWithDefaults(this.values);
10439
10430
  this.setCheckboxesData();
10440
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
10441
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
10442
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
10443
- this._subs.add(this.initOpModeSubscription());
10431
+ this.actionEmitterService.hintEventEmitter$
10432
+ .pipe(takeUntilDestroyed(this._destroyRef))
10433
+ .subscribe(() => this.clickHint.emit());
10434
+ this.actionEmitterService.readonlyEventEmitter$
10435
+ .pipe(takeUntilDestroyed(this._destroyRef))
10436
+ .subscribe(() => this.clickReadonly.emit());
10437
+ this.actionEmitterService.viewonlyEventEmitter$
10438
+ .pipe(takeUntilDestroyed(this._destroyRef))
10439
+ .subscribe(() => this.clickViewonly.emit());
10440
+ this.initOpModeSubscription();
10444
10441
  }
10445
10442
  ngOnChanges(changes) {
10446
10443
  if (changes['config']) {
@@ -10450,9 +10447,6 @@ class QdCheckboxesComponent {
10450
10447
  }
10451
10448
  }
10452
10449
  }
10453
- ngOnDestroy() {
10454
- this._subs.unsubscribe();
10455
- }
10456
10450
  registerOnChange(fn) {
10457
10451
  this._onChange = fn;
10458
10452
  }
@@ -10532,7 +10526,10 @@ class QdCheckboxesComponent {
10532
10526
  initOpModeSubscription() {
10533
10527
  if (!this.eventBrokerService)
10534
10528
  return;
10535
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
10529
+ this.eventBrokerService
10530
+ .consume('operation_mode_changed')
10531
+ .pipe(takeUntilDestroyed(this._destroyRef))
10532
+ .subscribe(topic => {
10536
10533
  if (typeof this.config.viewonly === 'boolean')
10537
10534
  return;
10538
10535
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -11363,7 +11360,7 @@ class QdFormOptionsService {
11363
11360
  _requestState = new BehaviorSubject(QdFormOptionsRequestState.IDLE);
11364
11361
  _optionsResolved = new Subject();
11365
11362
  _resolver = null;
11366
- _destroyed$ = new Subject();
11363
+ _destroyRef = inject(DestroyRef);
11367
11364
  _lastLoadedValue = null;
11368
11365
  _excludedValues = new Set();
11369
11366
  _config = null;
@@ -11377,10 +11374,6 @@ class QdFormOptionsService {
11377
11374
  constructor() {
11378
11375
  this.publishLatestResolvedOptions();
11379
11376
  }
11380
- ngOnDestroy() {
11381
- this._destroyed$.next(true);
11382
- this._destroyed$.complete();
11383
- }
11384
11377
  initialize(config) {
11385
11378
  this._config = config;
11386
11379
  this.resolverRegistry.initialize(config.optionsResolverName);
@@ -11433,7 +11426,7 @@ class QdFormOptionsService {
11433
11426
  if (dependsOnControls.length === 0)
11434
11427
  return;
11435
11428
  this._dependsOnSubscription = merge(...dependsOnControls.map(control => control.valueChanges.pipe(startWith(control.value), distinctUntilChanged(qdIsDeepEqual), skip(1))))
11436
- .pipe(takeUntil(this._destroyed$))
11429
+ .pipe(takeUntilDestroyed(this._destroyRef))
11437
11430
  .subscribe(() => this.reloadAfterDependencyChange());
11438
11431
  }
11439
11432
  logWarningIfDependsOnWithoutFormGroup() {
@@ -11470,7 +11463,7 @@ class QdFormOptionsService {
11470
11463
  })), switchMap$1(({ value, dependencies }) => this._resolver.resolve(value, dependencies).pipe(take(1), map((options) => ({ options, dependencies })), catchError(() => {
11471
11464
  this._requestState.next(QdFormOptionsRequestState.ERROR);
11472
11465
  return EMPTY;
11473
- }))), takeUntil(this._destroyed$))
11466
+ }))), takeUntilDestroyed(this._destroyRef))
11474
11467
  .subscribe(({ options, dependencies }) => {
11475
11468
  this._options.next(options);
11476
11469
  this._requestState.next(QdFormOptionsRequestState.SUCCESS);
@@ -11843,7 +11836,7 @@ class QdDropdownComponent {
11843
11836
  control;
11844
11837
  _value = null;
11845
11838
  _selectedOption = null;
11846
- _subs = new Subscription();
11839
+ _destroyRef = inject(DestroyRef);
11847
11840
  _onChange = () => { };
11848
11841
  _onTouch = () => { };
11849
11842
  filterInput;
@@ -11887,7 +11880,7 @@ class QdDropdownComponent {
11887
11880
  if (!this.id)
11888
11881
  this.id = v4();
11889
11882
  this.optionsService.optionsResolved$
11890
- .pipe(takeUntilDestroyed())
11883
+ .pipe(takeUntilDestroyed(this._destroyRef))
11891
11884
  .subscribe(resolvedEvent => this.optionsResolved.emit(resolvedEvent));
11892
11885
  }
11893
11886
  ngOnInit() {
@@ -11896,10 +11889,16 @@ class QdDropdownComponent {
11896
11889
  this.loadOptionsForCurrentConfig();
11897
11890
  this.resolveControl();
11898
11891
  this.updateSelectedOption(this.value);
11899
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
11900
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
11901
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
11902
- this._subs.add(this.initOpModeSubscription());
11892
+ this.actionEmitterService.hintEventEmitter$
11893
+ .pipe(takeUntilDestroyed(this._destroyRef))
11894
+ .subscribe(() => this.clickHint.emit());
11895
+ this.actionEmitterService.readonlyEventEmitter$
11896
+ .pipe(takeUntilDestroyed(this._destroyRef))
11897
+ .subscribe(() => this.clickReadonly.emit());
11898
+ this.actionEmitterService.viewonlyEventEmitter$
11899
+ .pipe(takeUntilDestroyed(this._destroyRef))
11900
+ .subscribe(() => this.clickViewonly.emit());
11901
+ this.initOpModeSubscription();
11903
11902
  }
11904
11903
  ngOnChanges(changes) {
11905
11904
  if (changes.config) {
@@ -11910,7 +11909,6 @@ class QdDropdownComponent {
11910
11909
  }
11911
11910
  ngOnDestroy() {
11912
11911
  this.optionsService.reset();
11913
- this._subs.unsubscribe();
11914
11912
  }
11915
11913
  focus() {
11916
11914
  this.box.nativeElement.focus();
@@ -12039,7 +12037,10 @@ class QdDropdownComponent {
12039
12037
  initOpModeSubscription() {
12040
12038
  if (!this.eventBrokerService)
12041
12039
  return;
12042
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
12040
+ this.eventBrokerService
12041
+ .consume('operation_mode_changed')
12042
+ .pipe(takeUntilDestroyed(this._destroyRef))
12043
+ .subscribe(topic => {
12043
12044
  if (typeof this.config?.viewonly === 'boolean')
12044
12045
  return;
12045
12046
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -12589,7 +12590,7 @@ class QdInputComponent {
12589
12590
  _value = { value: '' };
12590
12591
  _displayValue = '';
12591
12592
  control;
12592
- _subs = new Subscription();
12593
+ _destroyRef = inject(DestroyRef);
12593
12594
  _filteredOptions = [];
12594
12595
  _optionsResolver = null;
12595
12596
  _isUserTyped = false;
@@ -12658,10 +12659,16 @@ class QdInputComponent {
12658
12659
  console.error('Quadrel Framework | QdInput - Please use either decimal or numeric when using QdInputType number.');
12659
12660
  this.writeValue(this.value ?? getValue(this.config));
12660
12661
  this.normalizeInitialControlValueIfNeeded();
12661
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
12662
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
12663
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
12664
- this._subs.add(this.initOpModeSubscription());
12662
+ this.actionEmitterService.hintEventEmitter$
12663
+ .pipe(takeUntilDestroyed(this._destroyRef))
12664
+ .subscribe(() => this.clickHint.emit());
12665
+ this.actionEmitterService.readonlyEventEmitter$
12666
+ .pipe(takeUntilDestroyed(this._destroyRef))
12667
+ .subscribe(() => this.clickReadonly.emit());
12668
+ this.actionEmitterService.viewonlyEventEmitter$
12669
+ .pipe(takeUntilDestroyed(this._destroyRef))
12670
+ .subscribe(() => this.clickViewonly.emit());
12671
+ this.initOpModeSubscription();
12665
12672
  }
12666
12673
  ngOnChanges(changes) {
12667
12674
  if (changes['config']) {
@@ -12673,9 +12680,6 @@ class QdInputComponent {
12673
12680
  if (changes['value'])
12674
12681
  this.writeValue(this.value);
12675
12682
  }
12676
- ngOnDestroy() {
12677
- this._subs.unsubscribe();
12678
- }
12679
12683
  registerOnChange(fn) {
12680
12684
  const fnString = fn.toString();
12681
12685
  if (fnString.includes('_noControlError') || fnString.includes('validateControlPresenceOnChange'))
@@ -12825,13 +12829,15 @@ class QdInputComponent {
12825
12829
  this.hasOptions = this.optionsService.hasOptions();
12826
12830
  }
12827
12831
  subscribeToOptions() {
12828
- this._subs.add(this.optionsService.filteredOptions$.subscribe(options => (this._filteredOptions = options)));
12829
- this._subs.add(this.optionsService.optionsResolved$.subscribe(event => {
12832
+ this.optionsService.filteredOptions$
12833
+ .pipe(takeUntilDestroyed(this._destroyRef))
12834
+ .subscribe(options => (this._filteredOptions = options));
12835
+ this.optionsService.optionsResolved$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(event => {
12830
12836
  this.optionsResolved.emit(event);
12831
12837
  const currentOption = event.options.find(option => option.value === this._value.value);
12832
12838
  if (currentOption)
12833
12839
  this.handleOptionSelected(currentOption);
12834
- }));
12840
+ });
12835
12841
  }
12836
12842
  loadOptionsForTypedValue(value) {
12837
12843
  if (!this.hasOptions)
@@ -12863,7 +12869,10 @@ class QdInputComponent {
12863
12869
  initOpModeSubscription() {
12864
12870
  if (!this.eventBrokerService)
12865
12871
  return;
12866
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
12872
+ this.eventBrokerService
12873
+ .consume('operation_mode_changed')
12874
+ .pipe(takeUntilDestroyed(this._destroyRef))
12875
+ .subscribe(topic => {
12867
12876
  if (typeof this.config.viewonly === 'boolean')
12868
12877
  return;
12869
12878
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -13146,7 +13155,7 @@ class QdDatepickerComponent {
13146
13155
  _boundDisabledDates;
13147
13156
  _boundDisabledTimes;
13148
13157
  _boundDateTimeValidation;
13149
- _subs = new Subscription();
13158
+ _destroyRef = inject(DestroyRef);
13150
13159
  _onChange = () => { };
13151
13160
  _onTouched = () => { };
13152
13161
  ngOnInit() {
@@ -13157,7 +13166,7 @@ class QdDatepickerComponent {
13157
13166
  this.updateConfiguration();
13158
13167
  this.updateDisplayedDate();
13159
13168
  this.updateDisplayedDateTime();
13160
- this._subs.add(this.initOpModeSubscription());
13169
+ this.initOpModeSubscription();
13161
13170
  }
13162
13171
  ngOnChanges(changes) {
13163
13172
  if (changes.config) {
@@ -13169,9 +13178,6 @@ class QdDatepickerComponent {
13169
13178
  this.rebindDisabledTimesValidatorIfChanged();
13170
13179
  this.rebindDateTimeValidatorIfChanged();
13171
13180
  }
13172
- ngOnDestroy() {
13173
- this._subs.unsubscribe();
13174
- }
13175
13181
  registerOnChange(fn) {
13176
13182
  this._onChange = fn;
13177
13183
  }
@@ -13302,14 +13308,20 @@ class QdDatepickerComponent {
13302
13308
  this.popover?.close();
13303
13309
  }
13304
13310
  subscribeToLanguageChange() {
13305
- this._subs.add(this.translateService.onLangChange
13306
- .pipe(tap(({ lang }) => (this.language = lang)), tap(() => this.control.updateValueAndValidity()))
13307
- .subscribe());
13311
+ this.translateService.onLangChange
13312
+ .pipe(tap(({ lang }) => (this.language = lang)), tap(() => this.control.updateValueAndValidity()), takeUntilDestroyed(this._destroyRef))
13313
+ .subscribe();
13308
13314
  }
13309
13315
  subscribeToActionEmitterEvents() {
13310
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
13311
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
13312
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
13316
+ this.actionEmitterService.hintEventEmitter$
13317
+ .pipe(takeUntilDestroyed(this._destroyRef))
13318
+ .subscribe(() => this.clickHint.emit());
13319
+ this.actionEmitterService.readonlyEventEmitter$
13320
+ .pipe(takeUntilDestroyed(this._destroyRef))
13321
+ .subscribe(() => this.clickReadonly.emit());
13322
+ this.actionEmitterService.viewonlyEventEmitter$
13323
+ .pipe(takeUntilDestroyed(this._destroyRef))
13324
+ .subscribe(() => this.clickViewonly.emit());
13313
13325
  }
13314
13326
  initControl() {
13315
13327
  if (!this.controlContainer) {
@@ -13455,7 +13467,10 @@ class QdDatepickerComponent {
13455
13467
  initOpModeSubscription() {
13456
13468
  if (!this.eventBrokerService)
13457
13469
  return;
13458
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
13470
+ this.eventBrokerService
13471
+ .consume('operation_mode_changed')
13472
+ .pipe(takeUntilDestroyed(this._destroyRef))
13473
+ .subscribe(topic => {
13459
13474
  if (typeof this.config.viewonly === 'boolean')
13460
13475
  return;
13461
13476
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -13769,7 +13784,7 @@ class QdFileUploadComponent {
13769
13784
  _value = null;
13770
13785
  _state = QdUploadState.IDLE;
13771
13786
  _uploadSubscription;
13772
- _actionSubscriptions = new Subscription();
13787
+ _destroyRef = inject(DestroyRef);
13773
13788
  _onChange = () => { };
13774
13789
  _onTouched = () => { };
13775
13790
  get isDisabled() {
@@ -13800,18 +13815,20 @@ class QdFileUploadComponent {
13800
13815
  return this.control?.errors ?? null;
13801
13816
  }
13802
13817
  constructor() {
13803
- this._actionSubscriptions.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
13804
- this._actionSubscriptions.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
13805
- this._actionSubscriptions.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
13818
+ this.actionEmitterService.hintEventEmitter$
13819
+ .pipe(takeUntilDestroyed(this._destroyRef))
13820
+ .subscribe(() => this.clickHint.emit());
13821
+ this.actionEmitterService.readonlyEventEmitter$
13822
+ .pipe(takeUntilDestroyed(this._destroyRef))
13823
+ .subscribe(() => this.clickReadonly.emit());
13824
+ this.actionEmitterService.viewonlyEventEmitter$
13825
+ .pipe(takeUntilDestroyed(this._destroyRef))
13826
+ .subscribe(() => this.clickViewonly.emit());
13806
13827
  }
13807
13828
  ngOnInit() {
13808
13829
  if (this.controlContainer && this.formControlName)
13809
13830
  this.control = this.controlContainer.control?.get(this.formControlName) ?? null;
13810
13831
  }
13811
- ngOnDestroy() {
13812
- this._uploadSubscription?.unsubscribe();
13813
- this._actionSubscriptions.unsubscribe();
13814
- }
13815
13832
  writeValue(file) {
13816
13833
  this._value = file;
13817
13834
  this.file = file;
@@ -13860,7 +13877,10 @@ class QdFileUploadComponent {
13860
13877
  this.fileSelected.emit(file);
13861
13878
  }
13862
13879
  subscribeToUpload(file) {
13863
- this._uploadSubscription = this.uploadService.upload(file).subscribe({
13880
+ this._uploadSubscription = this.uploadService
13881
+ .upload(file)
13882
+ .pipe(takeUntilDestroyed(this._destroyRef))
13883
+ .subscribe({
13864
13884
  next: ({ progress }) => {
13865
13885
  this.uploadProgress$.next(progress);
13866
13886
  if (progress >= 100) {
@@ -14536,7 +14556,7 @@ class QdMultiInputComponent {
14536
14556
  _values = [];
14537
14557
  _formArrayName = '';
14538
14558
  _onDisabledChange;
14539
- _subs = new Subscription();
14559
+ _destroyRef = inject(DestroyRef);
14540
14560
  _resizeObserver;
14541
14561
  _onChange = () => { };
14542
14562
  _onTouch = () => { };
@@ -14546,11 +14566,11 @@ class QdMultiInputComponent {
14546
14566
  constructor() {
14547
14567
  if (!this.id)
14548
14568
  this.id = v4();
14549
- this.optionsService.filteredOptions$.pipe(takeUntilDestroyed()).subscribe(list => {
14569
+ this.optionsService.filteredOptions$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(list => {
14550
14570
  this.optionsListForView = list;
14551
14571
  this.changeDetectorRef.markForCheck();
14552
14572
  });
14553
- this.multiInputService.selectedItems$.pipe(takeUntilDestroyed()).subscribe(items => {
14573
+ this.multiInputService.selectedItems$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(items => {
14554
14574
  this.optionsService.setExcludedValues(items.map(item => item.value).filter((value) => value != null));
14555
14575
  });
14556
14576
  }
@@ -14559,10 +14579,16 @@ class QdMultiInputComponent {
14559
14579
  this.multiInputService.setOptionsList(this.options);
14560
14580
  this.multiInputService.setSelectedItems(this.values);
14561
14581
  this.optionsService.initialize({ options: this.options });
14562
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
14563
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
14564
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
14565
- this._subs.add(this.initOpModeSubscription());
14582
+ this.actionEmitterService.hintEventEmitter$
14583
+ .pipe(takeUntilDestroyed(this._destroyRef))
14584
+ .subscribe(() => this.clickHint.emit());
14585
+ this.actionEmitterService.readonlyEventEmitter$
14586
+ .pipe(takeUntilDestroyed(this._destroyRef))
14587
+ .subscribe(() => this.clickReadonly.emit());
14588
+ this.actionEmitterService.viewonlyEventEmitter$
14589
+ .pipe(takeUntilDestroyed(this._destroyRef))
14590
+ .subscribe(() => this.clickViewonly.emit());
14591
+ this.initOpModeSubscription();
14566
14592
  if (!this.controlContainer)
14567
14593
  return;
14568
14594
  if (this.formArrayName) {
@@ -14575,14 +14601,14 @@ class QdMultiInputComponent {
14575
14601
  console.warn('Quadrel Framework | QdMultiInput - The control bound via [formArrayName] must be a QdFormArray.');
14576
14602
  return;
14577
14603
  }
14578
- this._subs.add(formArray.valueChanges.subscribe(value => {
14604
+ formArray.valueChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(value => {
14579
14605
  this.multiInputService.setSelectedItems(value);
14580
14606
  this.valuesChange.emit(value);
14581
14607
  this.changeDetectorRef.markForCheck();
14582
- }));
14583
- this._subs.add(formArray.statusChanges.subscribe(() => {
14608
+ });
14609
+ formArray.statusChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
14584
14610
  this.changeDetectorRef.markForCheck();
14585
- }));
14611
+ });
14586
14612
  this.formArray = formArray;
14587
14613
  this.multiInputService.setSelectedItems(formArray.value);
14588
14614
  this.disabled = formArray.disabled;
@@ -14606,7 +14632,6 @@ class QdMultiInputComponent {
14606
14632
  }
14607
14633
  ngOnDestroy() {
14608
14634
  this.clickOutside = () => { };
14609
- this._subs?.unsubscribe();
14610
14635
  this._resizeObserver?.disconnect();
14611
14636
  if (this.formArray && this._onDisabledChange)
14612
14637
  this.formArray._unregisterOnDisabledChange(this._onDisabledChange);
@@ -14793,7 +14818,10 @@ class QdMultiInputComponent {
14793
14818
  initOpModeSubscription() {
14794
14819
  if (!this.eventBrokerService)
14795
14820
  return;
14796
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
14821
+ this.eventBrokerService
14822
+ .consume('operation_mode_changed')
14823
+ .pipe(takeUntilDestroyed(this._destroyRef))
14824
+ .subscribe(topic => {
14797
14825
  if (typeof this.config.viewonly === 'boolean')
14798
14826
  return;
14799
14827
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -15099,9 +15127,8 @@ class QdPinCodeComponent {
15099
15127
  iterable = Array;
15100
15128
  blurCurrent;
15101
15129
  control;
15102
- _actionEmitterServiceSubscription = new Subscription();
15103
15130
  _inputs = [];
15104
- _subs = new Subscription();
15131
+ _destroyRef = inject(DestroyRef);
15105
15132
  _onChange = () => { };
15106
15133
  _onTouch = () => { };
15107
15134
  get firstEmptyIndex() {
@@ -15130,10 +15157,16 @@ class QdPinCodeComponent {
15130
15157
  console.warn('Quadrel Framework | QdPinCode - Missing FormControlName directive from host element of the component.');
15131
15158
  }
15132
15159
  }
15133
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
15134
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
15135
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
15136
- this._subs.add(this.initOpModeSubscription());
15160
+ this.actionEmitterService.hintEventEmitter$
15161
+ .pipe(takeUntilDestroyed(this._destroyRef))
15162
+ .subscribe(() => this.clickHint.emit());
15163
+ this.actionEmitterService.readonlyEventEmitter$
15164
+ .pipe(takeUntilDestroyed(this._destroyRef))
15165
+ .subscribe(() => this.clickReadonly.emit());
15166
+ this.actionEmitterService.viewonlyEventEmitter$
15167
+ .pipe(takeUntilDestroyed(this._destroyRef))
15168
+ .subscribe(() => this.clickViewonly.emit());
15169
+ this.initOpModeSubscription();
15137
15170
  }
15138
15171
  ngAfterViewInit() {
15139
15172
  this.getInputs();
@@ -15150,9 +15183,6 @@ class QdPinCodeComponent {
15150
15183
  }
15151
15184
  }
15152
15185
  }
15153
- ngOnDestroy() {
15154
- this._actionEmitterServiceSubscription?.unsubscribe();
15155
- }
15156
15186
  registerOnChange(fn) {
15157
15187
  this._onChange = fn;
15158
15188
  }
@@ -15346,7 +15376,10 @@ class QdPinCodeComponent {
15346
15376
  initOpModeSubscription() {
15347
15377
  if (!this.eventBrokerService)
15348
15378
  return;
15349
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
15379
+ this.eventBrokerService
15380
+ .consume('operation_mode_changed')
15381
+ .pipe(takeUntilDestroyed(this._destroyRef))
15382
+ .subscribe(topic => {
15350
15383
  if (typeof this.config.viewonly === 'boolean')
15351
15384
  return;
15352
15385
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -15594,7 +15627,7 @@ class QdRadioButtonsComponent {
15594
15627
  filterRadioButtons = '';
15595
15628
  radioButtonsListForView;
15596
15629
  control;
15597
- _subs = new Subscription();
15630
+ _destroyRef = inject(DestroyRef);
15598
15631
  _onChange = () => { };
15599
15632
  _onTouch = () => { };
15600
15633
  constructor() {
@@ -15612,19 +15645,22 @@ class QdRadioButtonsComponent {
15612
15645
  }
15613
15646
  }
15614
15647
  this.initRadioButtonList();
15615
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
15616
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
15617
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
15618
- this._subs.add(this.initOpModeSubscription());
15648
+ this.actionEmitterService.hintEventEmitter$
15649
+ .pipe(takeUntilDestroyed(this._destroyRef))
15650
+ .subscribe(() => this.clickHint.emit());
15651
+ this.actionEmitterService.readonlyEventEmitter$
15652
+ .pipe(takeUntilDestroyed(this._destroyRef))
15653
+ .subscribe(() => this.clickReadonly.emit());
15654
+ this.actionEmitterService.viewonlyEventEmitter$
15655
+ .pipe(takeUntilDestroyed(this._destroyRef))
15656
+ .subscribe(() => this.clickViewonly.emit());
15657
+ this.initOpModeSubscription();
15619
15658
  }
15620
15659
  ngOnChanges(changes) {
15621
15660
  if (changes['config']) {
15622
15661
  this.updateConfiguration();
15623
15662
  }
15624
15663
  }
15625
- ngOnDestroy() {
15626
- this._subs.unsubscribe();
15627
- }
15628
15664
  registerOnChange(fn) {
15629
15665
  this._onChange = fn;
15630
15666
  }
@@ -15683,7 +15719,10 @@ class QdRadioButtonsComponent {
15683
15719
  initOpModeSubscription() {
15684
15720
  if (!this.eventBrokerService)
15685
15721
  return;
15686
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
15722
+ this.eventBrokerService
15723
+ .consume('operation_mode_changed')
15724
+ .pipe(takeUntilDestroyed(this._destroyRef))
15725
+ .subscribe(topic => {
15687
15726
  if (typeof this.config.viewonly === 'boolean')
15688
15727
  return;
15689
15728
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -16062,7 +16101,7 @@ class QdRichtextComponent {
16062
16101
  ['underline', 'strike'],
16063
16102
  ['ordered_list', 'bullet_list']
16064
16103
  ];
16065
- _subs = new Subscription();
16104
+ _destroyRef = inject(DestroyRef);
16066
16105
  _onChanged = () => { };
16067
16106
  _onTouched = () => { };
16068
16107
  constructor() {
@@ -16077,13 +16116,18 @@ class QdRichtextComponent {
16077
16116
  console.warn('Quadrel Framework | QdSwitches - Missing FormControlName directive from host element of the component.');
16078
16117
  }
16079
16118
  }
16080
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
16081
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
16082
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
16119
+ this.actionEmitterService.hintEventEmitter$
16120
+ .pipe(takeUntilDestroyed(this._destroyRef))
16121
+ .subscribe(() => this.clickHint.emit());
16122
+ this.actionEmitterService.readonlyEventEmitter$
16123
+ .pipe(takeUntilDestroyed(this._destroyRef))
16124
+ .subscribe(() => this.clickReadonly.emit());
16125
+ this.actionEmitterService.viewonlyEventEmitter$
16126
+ .pipe(takeUntilDestroyed(this._destroyRef))
16127
+ .subscribe(() => this.clickViewonly.emit());
16083
16128
  }
16084
16129
  ngOnDestroy() {
16085
16130
  this.editor.destroy();
16086
- this._subs.unsubscribe();
16087
16131
  }
16088
16132
  get maxLength() {
16089
16133
  return this.control instanceof QdFormControl ? this.control.getMaxLengthOrUndefined() : undefined;
@@ -16863,7 +16907,7 @@ class QdSwitchesComponent {
16863
16907
  options;
16864
16908
  switchesValues;
16865
16909
  switchesInputs;
16866
- _subs = new Subscription();
16910
+ _destroyRef = inject(DestroyRef);
16867
16911
  _onChange = () => { };
16868
16912
  _onTouch = () => { };
16869
16913
  constructor() {
@@ -16882,18 +16926,21 @@ class QdSwitchesComponent {
16882
16926
  this.switchesService.setList(this.options);
16883
16927
  this.switchesService.fillListWithDefaults(this.values);
16884
16928
  this.setData();
16885
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
16886
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
16887
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
16888
- this._subs.add(this.initOpModeSubscription());
16929
+ this.actionEmitterService.hintEventEmitter$
16930
+ .pipe(takeUntilDestroyed(this._destroyRef))
16931
+ .subscribe(() => this.clickHint.emit());
16932
+ this.actionEmitterService.readonlyEventEmitter$
16933
+ .pipe(takeUntilDestroyed(this._destroyRef))
16934
+ .subscribe(() => this.clickReadonly.emit());
16935
+ this.actionEmitterService.viewonlyEventEmitter$
16936
+ .pipe(takeUntilDestroyed(this._destroyRef))
16937
+ .subscribe(() => this.clickViewonly.emit());
16938
+ this.initOpModeSubscription();
16889
16939
  }
16890
16940
  ngOnChanges(changes) {
16891
16941
  if (changes['config'])
16892
16942
  this.updateConfiguration();
16893
16943
  }
16894
- ngOnDestroy() {
16895
- this._subs.unsubscribe();
16896
- }
16897
16944
  registerOnChange(fn) {
16898
16945
  this._onChange = fn;
16899
16946
  }
@@ -16942,7 +16989,10 @@ class QdSwitchesComponent {
16942
16989
  initOpModeSubscription() {
16943
16990
  if (!this.eventBrokerService)
16944
16991
  return;
16945
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
16992
+ this.eventBrokerService
16993
+ .consume('operation_mode_changed')
16994
+ .pipe(takeUntilDestroyed(this._destroyRef))
16995
+ .subscribe(topic => {
16946
16996
  if (typeof this.config.viewonly === 'boolean')
16947
16997
  return;
16948
16998
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -17116,7 +17166,7 @@ class QdTextareaComponent {
17116
17166
  hint;
17117
17167
  rows;
17118
17168
  valueForView;
17119
- _subs = new Subscription();
17169
+ _destroyRef = inject(DestroyRef);
17120
17170
  _onChange = () => { };
17121
17171
  _onTouch = () => { };
17122
17172
  get hasError() {
@@ -17158,19 +17208,22 @@ class QdTextareaComponent {
17158
17208
  }
17159
17209
  }
17160
17210
  this.valueForView = this.value || getValue(this.config);
17161
- this._subs.add(this.actionEmitterService.hintEventEmitter$.subscribe(() => this.clickHint.emit()));
17162
- this._subs.add(this.actionEmitterService.readonlyEventEmitter$.subscribe(() => this.clickReadonly.emit()));
17163
- this._subs.add(this.actionEmitterService.viewonlyEventEmitter$.subscribe(() => this.clickViewonly.emit()));
17164
- this._subs.add(this.initOpModeSubscription());
17211
+ this.actionEmitterService.hintEventEmitter$
17212
+ .pipe(takeUntilDestroyed(this._destroyRef))
17213
+ .subscribe(() => this.clickHint.emit());
17214
+ this.actionEmitterService.readonlyEventEmitter$
17215
+ .pipe(takeUntilDestroyed(this._destroyRef))
17216
+ .subscribe(() => this.clickReadonly.emit());
17217
+ this.actionEmitterService.viewonlyEventEmitter$
17218
+ .pipe(takeUntilDestroyed(this._destroyRef))
17219
+ .subscribe(() => this.clickViewonly.emit());
17220
+ this.initOpModeSubscription();
17165
17221
  }
17166
17222
  ngOnChanges(changes) {
17167
17223
  if (changes.config) {
17168
17224
  this.updateConfiguration();
17169
17225
  }
17170
17226
  }
17171
- ngOnDestroy() {
17172
- this._subs.unsubscribe();
17173
- }
17174
17227
  registerOnChange(fn) {
17175
17228
  this._onChange = fn;
17176
17229
  }
@@ -17213,7 +17266,10 @@ class QdTextareaComponent {
17213
17266
  initOpModeSubscription() {
17214
17267
  if (!this.eventBrokerService)
17215
17268
  return;
17216
- return this.eventBrokerService.consume('operation_mode_changed').subscribe(topic => {
17269
+ this.eventBrokerService
17270
+ .consume('operation_mode_changed')
17271
+ .pipe(takeUntilDestroyed(this._destroyRef))
17272
+ .subscribe(topic => {
17217
17273
  if (typeof this.config.viewonly === 'boolean')
17218
17274
  return;
17219
17275
  this.viewonly = getViewonly(this.config, topic.payload.isViewonly);
@@ -18003,22 +18059,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
18003
18059
  */
18004
18060
  class QdNotificationsComponent {
18005
18061
  notificationService = inject(QdNotificationsService);
18062
+ _destroyRef = inject(DestroyRef);
18006
18063
  notifications;
18007
18064
  /**
18008
18065
  * The context can be assigned to control the positioning of the notifications.
18009
18066
  */
18010
18067
  context = 'qdPanel';
18011
- _destroyed$ = new Subject();
18012
18068
  ngOnInit() {
18013
18069
  this.notificationService
18014
18070
  .getNotificationsForContext(this.context)
18015
- .pipe(takeUntil(this._destroyed$))
18071
+ .pipe(takeUntilDestroyed(this._destroyRef))
18016
18072
  .subscribe(notifications => (this.notifications = notifications));
18017
18073
  }
18018
- ngOnDestroy() {
18019
- this._destroyed$.next();
18020
- this._destroyed$.complete();
18021
- }
18022
18074
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18023
18075
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdNotificationsComponent, isStandalone: false, selector: "qd-notifications", inputs: { context: "context" }, ngImport: i0, template: "@for (notification of notifications; track notification) {\n<qd-notification [notification]=\"notification\"></qd-notification>\n}\n", styles: [".panel-type-control qd-notifications{display:block;width:100%;padding:1rem 1.5rem}.panel-type-info qd-notifications .qd-notification{background:#fff}qd-notifications qd-notification+qd-notification{margin-top:1rem}\n"], dependencies: [{ kind: "component", type: QdNotificationComponent, selector: "qd-notification", inputs: ["state", "notification"] }], encapsulation: i0.ViewEncapsulation.None });
18024
18076
  }
@@ -18081,14 +18133,12 @@ class QdNotificationsSnackbarListenerDirective {
18081
18133
  overlayPositionBuilder = inject(OverlayPositionBuilder);
18082
18134
  safeBottomOffset$ = inject(QD_SAFE_BOTTOM_OFFSET);
18083
18135
  _overlayRef;
18084
- _destroyed$ = new Subject();
18136
+ _destroyRef = inject(DestroyRef);
18085
18137
  ngOnInit() {
18086
18138
  this.initOverlay();
18087
18139
  }
18088
18140
  ngOnDestroy() {
18089
18141
  this._overlayRef?.dispose();
18090
- this._destroyed$.next();
18091
- this._destroyed$.complete();
18092
18142
  }
18093
18143
  initOverlay() {
18094
18144
  if (!this.hostRef)
@@ -18123,7 +18173,7 @@ class QdNotificationsSnackbarListenerDirective {
18123
18173
  */
18124
18174
  observeNotificationsToStayOnTop(host) {
18125
18175
  this.snackbarService.notifications$
18126
- .pipe(startWith$1([]), pairwise(), filter$1(([before, after]) => after.length > before.length), takeUntil$1(this._destroyed$))
18176
+ .pipe(startWith$1([]), pairwise(), filter$1(([before, after]) => after.length > before.length), takeUntilDestroyed(this._destroyRef))
18127
18177
  .subscribe(() => this.raiseToTopLayer(host));
18128
18178
  }
18129
18179
  raiseToTopLayer(host) {
@@ -18135,7 +18185,7 @@ class QdNotificationsSnackbarListenerDirective {
18135
18185
  }
18136
18186
  observeSafeBottomOffset(strategy) {
18137
18187
  this.safeBottomOffset$
18138
- .pipe(startWith$1(0), distinctUntilChanged$1(), debounceTime$1(250), takeUntil$1(this._destroyed$))
18188
+ .pipe(startWith$1(0), distinctUntilChanged$1(), debounceTime$1(250), takeUntilDestroyed(this._destroyRef))
18139
18189
  .subscribe(safeBottomOffset => {
18140
18190
  strategy.withPositions(this.bottomRightPositions(safeBottomOffset));
18141
18191
  this._overlayRef.updatePosition();
@@ -18705,9 +18755,9 @@ class QdGridAutoFillService {
18705
18755
  gridService = inject(QdGridService);
18706
18756
  breakpointService = inject(QdBreakpointService);
18707
18757
  changeDetectorRef = inject(ChangeDetectorRef);
18758
+ _destroyRef = inject(DestroyRef);
18708
18759
  _columnsDirective;
18709
18760
  _columnElements;
18710
- _destroyed$ = new Subject();
18711
18761
  get columnsDirectiveElement() {
18712
18762
  return this._columnsDirective.element;
18713
18763
  }
@@ -18719,10 +18769,6 @@ class QdGridAutoFillService {
18719
18769
  this.fillRemainingWidthWhenBreakpointIsCrossed();
18720
18770
  }
18721
18771
  }
18722
- destroy() {
18723
- this._destroyed$.next();
18724
- this._destroyed$.complete();
18725
- }
18726
18772
  async waitForColspansToBeApplied() {
18727
18773
  return Promise.all([
18728
18774
  firstValueFrom(this._columnsDirective.columnsNum$),
@@ -18743,7 +18789,7 @@ class QdGridAutoFillService {
18743
18789
  fillRemainingWidthWhenBreakpointIsCrossed() {
18744
18790
  this.breakpointService
18745
18791
  .getMatchingBreakpoint()
18746
- .pipe(takeUntil(this._destroyed$))
18792
+ .pipe(takeUntilDestroyed(this._destroyRef))
18747
18793
  .subscribe(this.fillRemainingWidth.bind(this));
18748
18794
  }
18749
18795
  async fillRemainingWidth(breakpoint) {
@@ -18900,9 +18946,6 @@ class QdColumnsDirective {
18900
18946
  async ngAfterViewInit() {
18901
18947
  await this.gridAutoFillService.initialize(this);
18902
18948
  }
18903
- ngOnDestroy() {
18904
- this.gridAutoFillService.destroy();
18905
- }
18906
18949
  static getQdColumnsGridSize(element) {
18907
18950
  const result = /qd-columns-(\d+)/.exec(element.className);
18908
18951
  if (result && result[1]) {
@@ -19519,20 +19562,16 @@ class QdContactCardMenuComponent {
19519
19562
  this._actionsSubject.next(actions);
19520
19563
  }
19521
19564
  testId = 'contact-card-menu';
19522
- _destroyed$ = new Subject();
19565
+ _destroyRef = inject(DestroyRef);
19523
19566
  _actionsSubject = new BehaviorSubject([]);
19524
19567
  _operationModeSubject = new BehaviorSubject(undefined);
19525
19568
  actions$ = combineLatest([
19526
19569
  this._actionsSubject,
19527
19570
  this._operationModeSubject
19528
- ]).pipe(takeUntil(this._destroyed$), map(([actions, operationMode]) => this.getActionsFilteredByOperationMode(actions, operationMode)), map(actions => actions.filter(action => !this.isHidden(action))), map(actions => actions.map(action => ({ ...action, isDisabled: this.isDisabled(action) }))));
19571
+ ]).pipe(takeUntilDestroyed(this._destroyRef), map(([actions, operationMode]) => this.getActionsFilteredByOperationMode(actions, operationMode)), map(actions => actions.filter(action => !this.isHidden(action))), map(actions => actions.map(action => ({ ...action, isDisabled: this.isDisabled(action) }))));
19529
19572
  ngOnInit() {
19530
19573
  this.syncPageOperationMode();
19531
19574
  }
19532
- ngOnDestroy() {
19533
- this._destroyed$.next();
19534
- this._destroyed$.complete();
19535
- }
19536
19575
  isDisabled(action) {
19537
19576
  const { isDisabled } = action;
19538
19577
  return (typeof isDisabled === 'function' ? isDisabled(this.contactData) : isDisabled) ?? false;
@@ -19543,7 +19582,7 @@ class QdContactCardMenuComponent {
19543
19582
  }
19544
19583
  syncPageOperationMode() {
19545
19584
  if (this.pageStoreService) {
19546
- this.pageStoreService.isViewonly$.pipe(takeUntil(this._destroyed$)).subscribe(viewonly => {
19585
+ this.pageStoreService.isViewonly$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(viewonly => {
19547
19586
  this._operationModeSubject.next(viewonly ? 'view' : 'edit');
19548
19587
  });
19549
19588
  }
@@ -20131,6 +20170,7 @@ class QdDialogConfirmationComponent {
20131
20170
  qdNotificationService = inject(QdNotificationsService);
20132
20171
  dialogRef = inject(DialogRef);
20133
20172
  snackbarService = inject(QdSnackbarService);
20173
+ _destroyRef = inject(DestroyRef);
20134
20174
  /**
20135
20175
  * The configuration object of the QdDialogConfirm component.
20136
20176
  */
@@ -20143,7 +20183,6 @@ class QdDialogConfirmationComponent {
20143
20183
  notificationContext = 'confirm-modal';
20144
20184
  confirmChecked = [];
20145
20185
  checkboxConfig;
20146
- _confirmSubscription = new Subscription();
20147
20186
  get isLoading() {
20148
20187
  return this.dialogService.isConfirmationLoading;
20149
20188
  }
@@ -20164,10 +20203,10 @@ class QdDialogConfirmationComponent {
20164
20203
  }
20165
20204
  ngOnInit() {
20166
20205
  this.snackbarService.pause();
20167
- this._confirmSubscription.add(this.dialogRef?.closed.subscribe(() => {
20206
+ this.dialogRef?.closed.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
20168
20207
  this.dialogService.resetConfirmation();
20169
20208
  this.qdNotificationService.removeAll(this.notificationContext);
20170
- }));
20209
+ });
20171
20210
  this.checkboxConfig = {
20172
20211
  options: [
20173
20212
  {
@@ -20181,7 +20220,6 @@ class QdDialogConfirmationComponent {
20181
20220
  this.snackbarService.resume();
20182
20221
  this.qdNotificationService.removeAll(this.notificationContext);
20183
20222
  this.dialogService.resetConfirmation();
20184
- this._confirmSubscription.unsubscribe();
20185
20223
  }
20186
20224
  close() {
20187
20225
  this.dialogRef?.close();
@@ -20192,10 +20230,13 @@ class QdDialogConfirmationComponent {
20192
20230
  return;
20193
20231
  }
20194
20232
  this.dialogService.startConfirmation();
20195
- this._confirmSubscription.add(this.confirmationResolver.resolve().subscribe({
20233
+ this.confirmationResolver
20234
+ .resolve()
20235
+ .pipe(takeUntilDestroyed(this._destroyRef))
20236
+ .subscribe({
20196
20237
  next: () => this.handleSuccess(),
20197
20238
  error: errors => this.handleError(errors)
20198
- }));
20239
+ });
20199
20240
  }
20200
20241
  submit() {
20201
20242
  this.dialogRef?.close(this.dialogService.confirmationState);
@@ -20267,7 +20308,7 @@ class QdPendingChangesGuardDirective {
20267
20308
  formGroupDirective = inject(FormGroupDirective, { optional: true });
20268
20309
  dialogRef = inject(DialogRef, { optional: true });
20269
20310
  changeGuard = inject(QdDialogChangeGuardService);
20270
- statusSubscription;
20311
+ _destroyRef = inject(DestroyRef);
20271
20312
  initialValue;
20272
20313
  formGroup;
20273
20314
  constructor() {
@@ -20280,13 +20321,12 @@ class QdPendingChangesGuardDirective {
20280
20321
  if (this.formGroup) {
20281
20322
  this.initialValue = { ...this.formGroup.value };
20282
20323
  this.updateStatus();
20283
- this.statusSubscription = this.formGroup.valueChanges.subscribe(() => {
20324
+ this.formGroup.valueChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
20284
20325
  this.updateStatus();
20285
20326
  });
20286
20327
  }
20287
20328
  }
20288
20329
  ngOnDestroy() {
20289
- this.statusSubscription?.unsubscribe();
20290
20330
  this.reportPendingChanges(false);
20291
20331
  }
20292
20332
  updateStatus() {
@@ -20681,7 +20721,7 @@ class QdFileCollectorDialogItemProgressComponent {
20681
20721
  return this.testId;
20682
20722
  }
20683
20723
  _uploadStateSubject = new BehaviorSubject(QdUploadProgressState.STARTING);
20684
- _destroyed$ = new Subject();
20724
+ _destroyRef = inject(DestroyRef);
20685
20725
  uploadState$ = this._uploadStateSubject.asObservable();
20686
20726
  changeUploadStateFinishingToSuccessDelay = 1000;
20687
20727
  ngOnInit() {
@@ -20690,14 +20730,11 @@ class QdFileCollectorDialogItemProgressComponent {
20690
20730
  }
20691
20731
  changeUploadStateFinishingToSuccessAfterDelay() {
20692
20732
  this.uploadState$
20693
- .pipe(switchMap$1(uploadState => uploadState === QdUploadProgressState.FINISHING ? timer(this.changeUploadStateFinishingToSuccessDelay) : NEVER), takeUntil(this._destroyed$))
20733
+ .pipe(switchMap$1(uploadState => uploadState === QdUploadProgressState.FINISHING ? timer(this.changeUploadStateFinishingToSuccessDelay) : NEVER), takeUntilDestroyed(this._destroyRef))
20694
20734
  .subscribe(() => {
20695
20735
  this._uploadStateSubject.next(QdUploadProgressState.SUCCESS);
20696
20736
  });
20697
20737
  }
20698
- ngOnDestroy() {
20699
- this._destroyed$.complete();
20700
- }
20701
20738
  ngOnChanges(changes) {
20702
20739
  if ((changes['progress'] && !changes['progress'].firstChange) ||
20703
20740
  (changes['error'] && !changes['error'].firstChange)) {
@@ -20822,7 +20859,7 @@ class QdFileCollectorDialogComponent {
20822
20859
  fileCollectorService = inject(QdFileCollectorService, { skipSelf: true });
20823
20860
  dialogFileCollectorService = inject(QdFileCollectorService);
20824
20861
  dialogRef = inject(DialogRef);
20825
- destroyRef = inject(DestroyRef);
20862
+ _destroyRef = inject(DestroyRef);
20826
20863
  selectedFile = null;
20827
20864
  form;
20828
20865
  isSaving = false;
@@ -20852,7 +20889,7 @@ class QdFileCollectorDialogComponent {
20852
20889
  }
20853
20890
  constructor() {
20854
20891
  this.dialogFileCollectorService.config = this.fileCollectorService.config;
20855
- this.dialogRef.keydownEvents.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {
20892
+ this.dialogRef.keydownEvents.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(event => {
20856
20893
  if (this.isSaving && event.key === 'Escape')
20857
20894
  event.preventDefault();
20858
20895
  });
@@ -21527,6 +21564,7 @@ class QdFileCollectorComponent {
21527
21564
  dialogService = inject(QdDialogService);
21528
21565
  viewContainerRef = inject(ViewContainerRef);
21529
21566
  _changeDetectorRef = inject(ChangeDetectorRef);
21567
+ _destroyRef = inject(DestroyRef);
21530
21568
  /**
21531
21569
  * Configuration settings for the file collector.
21532
21570
  */
@@ -21536,7 +21574,6 @@ class QdFileCollectorComponent {
21536
21574
  */
21537
21575
  testId = 'file-collector';
21538
21576
  fileInput;
21539
- _subscriptions = new Subscription();
21540
21577
  _viewonly$ = new BehaviorSubject(false);
21541
21578
  get fileUploads() {
21542
21579
  return this.fileCollectorService.fileUploads;
@@ -21551,7 +21588,9 @@ class QdFileCollectorComponent {
21551
21588
  this.initializeConfig(this.config);
21552
21589
  this.initViewMode();
21553
21590
  if (this.sectionActionService) {
21554
- this._subscriptions.add(this.sectionActionService.action$.pipe(filter(type => type === 'addNew')).subscribe(() => this.clickFileInput()));
21591
+ this.sectionActionService.action$
21592
+ .pipe(filter(type => type === 'addNew'), takeUntilDestroyed(this._destroyRef))
21593
+ .subscribe(() => this.clickFileInput());
21555
21594
  }
21556
21595
  }
21557
21596
  ngOnChanges(changes) {
@@ -21559,9 +21598,6 @@ class QdFileCollectorComponent {
21559
21598
  this.initializeConfig(this.config);
21560
21599
  }
21561
21600
  }
21562
- ngOnDestroy() {
21563
- this._subscriptions.unsubscribe();
21564
- }
21565
21601
  handleFiles(event) {
21566
21602
  const dialogRef = this.dialogService.open(QdFileCollectorDialogComponent, {
21567
21603
  dialogSize: QdDialogSize.Default,
@@ -21618,9 +21654,10 @@ class QdFileCollectorComponent {
21618
21654
  return;
21619
21655
  }
21620
21656
  if (this.eventBroker)
21621
- this._subscriptions.add(this.eventBroker
21657
+ this.eventBroker
21622
21658
  .consume('operation_mode_changed')
21623
- .subscribe(({ payload }) => this._viewonly$.next(payload.isViewonly)));
21659
+ .pipe(takeUntilDestroyed(this._destroyRef))
21660
+ .subscribe(({ payload }) => this._viewonly$.next(payload.isViewonly));
21624
21661
  }
21625
21662
  isConfigConsistentWithAllowedFileTypes(config) {
21626
21663
  return (qdIsDeepEqual(config.allowedMimeTypes, this.fileTypeService.getMimeTypes(config.allowedFileTypes)) &&
@@ -21712,18 +21749,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
21712
21749
 
21713
21750
  class LocaleDatePipe {
21714
21751
  translateService = inject(TranslateService);
21752
+ _destroyRef = inject(DestroyRef);
21715
21753
  currentLanguage = new ReplaySubject(1);
21716
- sub;
21717
21754
  constructor() {
21718
21755
  const translateService = this.translateService;
21719
21756
  this.currentLanguage.next(translateService.currentLang);
21720
- this.sub = this.translateService.onLangChange.subscribe((event) => {
21757
+ this.translateService.onLangChange
21758
+ .pipe(takeUntilDestroyed(this._destroyRef))
21759
+ .subscribe((event) => {
21721
21760
  this.currentLanguage.next(event.lang);
21722
21761
  });
21723
21762
  }
21724
- ngOnDestroy() {
21725
- this.sub?.unsubscribe();
21726
- }
21727
21763
  formatDate(timestamp, lang = 'de', isDateTime = false, isTimePlaceholderSelected = false) {
21728
21764
  const dateObj = QdDateAdapter.parseStoredDate(timestamp);
21729
21765
  if (!dateObj)
@@ -22449,20 +22485,16 @@ class QdFilterItemBooleanComponent {
22449
22485
  }
22450
22486
  itemData;
22451
22487
  active;
22452
- _destroyed$ = new Subject();
22488
+ _destroyRef = inject(DestroyRef);
22453
22489
  ngOnInit() {
22454
22490
  this.filterService
22455
22491
  .getItemById$(this.filterId, this.categoryIndex, this.itemIndex)
22456
- .pipe(takeUntil$1(this._destroyed$))
22492
+ .pipe(takeUntilDestroyed(this._destroyRef))
22457
22493
  .subscribe(item => {
22458
22494
  this.itemData = `${this.filterId}_${this.categoryIndex}_${this.itemIndex}_${item.item}`;
22459
22495
  this.active = item.active;
22460
22496
  });
22461
22497
  }
22462
- ngOnDestroy() {
22463
- this._destroyed$.next();
22464
- this._destroyed$.complete();
22465
- }
22466
22498
  clickToggle(value) {
22467
22499
  this.filterService.setItemIsActive(this.filterId, this.categoryIndex, this.itemIndex, value === this.itemData);
22468
22500
  }
@@ -22531,30 +22563,26 @@ class QdFilterItemFreeTextComponent {
22531
22563
  item;
22532
22564
  i18n;
22533
22565
  inputValue = '';
22534
- _destroyed$ = new Subject();
22566
+ _destroyRef = inject(DestroyRef);
22535
22567
  get value() {
22536
22568
  return (this.item && this.item.item) || '';
22537
22569
  }
22538
22570
  ngOnInit() {
22539
22571
  this.filterService
22540
22572
  .getCategoryById$(this.filterId, this.categoryIndex)
22541
- .pipe(takeUntil$1(this._destroyed$))
22573
+ .pipe(takeUntilDestroyed(this._destroyRef))
22542
22574
  .subscribe(category => {
22543
22575
  this.i18n = category.i18n;
22544
22576
  });
22545
22577
  this.filterService
22546
22578
  .getItemById$(this.filterId, this.categoryIndex, this.itemIndex)
22547
- .pipe(takeUntil$1(this._destroyed$))
22579
+ .pipe(takeUntilDestroyed(this._destroyRef))
22548
22580
  .subscribe(item => {
22549
22581
  if ((item?.item ?? '') !== this.inputValue)
22550
22582
  this.inputValue = '';
22551
22583
  this.item = item;
22552
22584
  });
22553
22585
  }
22554
- ngOnDestroy() {
22555
- this._destroyed$.next();
22556
- this._destroyed$.complete();
22557
- }
22558
22586
  handleValueChange(value) {
22559
22587
  this.inputValue = value;
22560
22588
  if (!this.isInstantFiltering && value !== '') {
@@ -22660,15 +22688,11 @@ class QdFilterItemDateComponent {
22660
22688
  datepicker;
22661
22689
  datepickerConfig = { viewonly: false };
22662
22690
  item;
22663
- _destroyed$ = new Subject();
22691
+ _destroyRef = inject(DestroyRef);
22664
22692
  ngOnInit() {
22665
22693
  this.datepickerConfig = { ...this.timePickerConfig, viewonly: false };
22666
22694
  this.subscribeGetItem();
22667
22695
  }
22668
- ngOnDestroy() {
22669
- this._destroyed$.next();
22670
- this._destroyed$.complete();
22671
- }
22672
22696
  handleDateChange(date) {
22673
22697
  if (date)
22674
22698
  this.filterService.updateItem(this.filterId, this.categoryIndex, this.itemIndex, date.toISOString());
@@ -22682,7 +22706,7 @@ class QdFilterItemDateComponent {
22682
22706
  subscribeGetItem() {
22683
22707
  this.filterService
22684
22708
  .getItemById$(this.filterId, this.categoryIndex, this.itemIndex)
22685
- .pipe(takeUntil(this._destroyed$), filter(item => item !== undefined), tap(item => (this.item = QdDateAdapter.parseStoredDate(item.item))))
22709
+ .pipe(takeUntilDestroyed(this._destroyRef), filter(item => item !== undefined), tap(item => (this.item = QdDateAdapter.parseStoredDate(item.item))))
22686
22710
  .subscribe();
22687
22711
  }
22688
22712
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdFilterItemDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -22723,7 +22747,6 @@ class QdFilterItemDateCategoryComponent {
22723
22747
  item$;
22724
22748
  itemIndex = 0;
22725
22749
  timePlaceholderSelected = true;
22726
- _destroyed$ = new Subject();
22727
22750
  ngOnInit() {
22728
22751
  this.setCategoryI18n();
22729
22752
  this.setItem();
@@ -22771,7 +22794,7 @@ class QdFilterItemDateRangeComponent {
22771
22794
  clickTimePlaceholder = new EventEmitter();
22772
22795
  item;
22773
22796
  config = { disabledDates: [], viewonly: false };
22774
- _destroyed$ = new Subject();
22797
+ _destroyRef = inject(DestroyRef);
22775
22798
  get itemClassName() {
22776
22799
  return `qd-filter__item-date-range qd-filter__item-date-range--${this.itemIndex}`;
22777
22800
  }
@@ -22793,10 +22816,6 @@ class QdFilterItemDateRangeComponent {
22793
22816
  this.subscribeMinMaxDate();
22794
22817
  this.config = { ...this.config, timePicker: this.timePickerConfig };
22795
22818
  }
22796
- ngOnDestroy() {
22797
- this._destroyed$.next();
22798
- this._destroyed$.complete();
22799
- }
22800
22819
  handleDateChange(date) {
22801
22820
  if (date)
22802
22821
  this.filterService.updateItem(this.filterId, this.categoryIndex, this.itemIndex, date.toISOString());
@@ -22807,17 +22826,17 @@ class QdFilterItemDateRangeComponent {
22807
22826
  subscribeGetItem() {
22808
22827
  this.filterService
22809
22828
  .getItemById$(this.filterId, this.categoryIndex, this.itemIndex)
22810
- .pipe(takeUntil(this._destroyed$), filter(item => item !== undefined), tap(item => (this.item = QdDateAdapter.parseStoredDate(item.item))))
22829
+ .pipe(takeUntilDestroyed(this._destroyRef), filter(item => item !== undefined), tap(item => (this.item = QdDateAdapter.parseStoredDate(item.item))))
22811
22830
  .subscribe();
22812
22831
  }
22813
22832
  subscribeMinMaxDate() {
22814
22833
  this.filterService
22815
22834
  .getMinDate$(this.filterId, this.categoryIndex, this.itemIndex)
22816
- .pipe(takeUntil(this._destroyed$), tap(minDate => this.updateDisabledDates(minDate, 'to')))
22835
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(minDate => this.updateDisabledDates(minDate, 'to')))
22817
22836
  .subscribe();
22818
22837
  this.filterService
22819
22838
  .getMaxDate$(this.filterId, this.categoryIndex, this.itemIndex)
22820
- .pipe(takeUntil(this._destroyed$), tap(maxDate => this.updateDisabledDates(maxDate, 'from')))
22839
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(maxDate => this.updateDisabledDates(maxDate, 'from')))
22821
22840
  .subscribe();
22822
22841
  }
22823
22842
  updateDisabledDates(date, targetProperty) {
@@ -22959,11 +22978,11 @@ class QdFilterItemMultiSelectComponent {
22959
22978
  onMouseDown(event) {
22960
22979
  event.preventDefault();
22961
22980
  }
22962
- _destroyed$ = new Subject();
22981
+ _destroyRef = inject(DestroyRef);
22963
22982
  ngOnInit() {
22964
22983
  this.filterService
22965
22984
  .getItemById$(this.filterId, this.categoryIndex, this.itemIndex)
22966
- .pipe(takeUntil$1(this._destroyed$), filter(item => !!item))
22985
+ .pipe(takeUntilDestroyed(this._destroyRef), filter(item => !!item))
22967
22986
  .subscribe(item => {
22968
22987
  this.item = item.item;
22969
22988
  this.i18n = item.i18n;
@@ -22973,8 +22992,6 @@ class QdFilterItemMultiSelectComponent {
22973
22992
  }
22974
22993
  ngOnDestroy() {
22975
22994
  this.category?.unregisterOption(this);
22976
- this._destroyed$.next();
22977
- this._destroyed$.complete();
22978
22995
  }
22979
22996
  setActiveStyles() {
22980
22997
  this.isActive = true;
@@ -23063,12 +23080,12 @@ class QdFilterItemSingleSelectComponent {
23063
23080
  event.preventDefault();
23064
23081
  this.focus();
23065
23082
  }
23066
- _destroyed$ = new Subject();
23083
+ _destroyRef = inject(DestroyRef);
23067
23084
  ngOnInit() {
23068
23085
  this.setTabbable(false);
23069
23086
  this.filterService
23070
23087
  .getItemById$(this.filterId, this.categoryIndex, this.itemIndex)
23071
- .pipe(takeUntil$1(this._destroyed$), filter(item => !!item))
23088
+ .pipe(takeUntilDestroyed(this._destroyRef), filter(item => !!item))
23072
23089
  .subscribe(item => {
23073
23090
  this.item = item.item;
23074
23091
  this.i18n = item.i18n;
@@ -23078,8 +23095,6 @@ class QdFilterItemSingleSelectComponent {
23078
23095
  }
23079
23096
  ngOnDestroy() {
23080
23097
  this.category?.unregisterOption(this);
23081
- this._destroyed$.next();
23082
- this._destroyed$.complete();
23083
23098
  }
23084
23099
  setActiveStyles() {
23085
23100
  this.isActive = true;
@@ -23921,6 +23936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
23921
23936
 
23922
23937
  class QdDependentFiltersService {
23923
23938
  filterService = inject(QdFilterService);
23939
+ _destroyRef = inject(DestroyRef);
23924
23940
  _filterComponent;
23925
23941
  _subscription;
23926
23942
  get filterData() {
@@ -23936,7 +23952,9 @@ class QdDependentFiltersService {
23936
23952
  this._filterComponent = filterComponent;
23937
23953
  this.getDependentCategories().forEach(dependentCategory => {
23938
23954
  const dependentCategoryIndex = this.categories.indexOf(dependentCategory);
23939
- const subscription = this.resolveItemsWhenDependsOnCategoriesChange(dependentCategory).subscribe((filterItems) => {
23955
+ const subscription = this.resolveItemsWhenDependsOnCategoriesChange(dependentCategory)
23956
+ .pipe(takeUntilDestroyed(this._destroyRef))
23957
+ .subscribe((filterItems) => {
23940
23958
  this.filterService.updateCategoryItems(this.filterId, dependentCategoryIndex, filterItems);
23941
23959
  });
23942
23960
  if (!this._subscription)
@@ -23945,10 +23963,10 @@ class QdDependentFiltersService {
23945
23963
  });
23946
23964
  }
23947
23965
  reinitialize() {
23948
- this.destroy();
23966
+ this.cancelItemResolution();
23949
23967
  this.initialize(this._filterComponent);
23950
23968
  }
23951
- destroy() {
23969
+ cancelItemResolution() {
23952
23970
  this._subscription?.unsubscribe();
23953
23971
  delete this._subscription;
23954
23972
  }
@@ -24105,6 +24123,7 @@ class QdFilterComponent {
24105
24123
  filterService = inject(QdFilterService);
24106
24124
  filterRouterConnectorService = inject(QdFilterRouterConnectorService);
24107
24125
  dependentFiltersService = inject(QdDependentFiltersService);
24126
+ _destroyRef = inject(DestroyRef);
24108
24127
  /**
24109
24128
  * The configuration of the filter
24110
24129
  */
@@ -24140,10 +24159,6 @@ class QdFilterComponent {
24140
24159
  disableFilterButton$;
24141
24160
  disableResetButton$;
24142
24161
  filterId;
24143
- _queryStringSubscription;
24144
- _postBodySubscription;
24145
- _emitOutputsSubscription;
24146
- _filterValueSubscription;
24147
24162
  _filterDataSubject = new BehaviorSubject(undefined);
24148
24163
  _isApplyDisabledWhileUnchangedSubject = new BehaviorSubject(false);
24149
24164
  _hasPreselectionSubject = new ReplaySubject(1);
@@ -24186,11 +24201,6 @@ class QdFilterComponent {
24186
24201
  }
24187
24202
  }
24188
24203
  ngOnDestroy() {
24189
- this.dependentFiltersService.destroy();
24190
- this._queryStringSubscription?.unsubscribe();
24191
- this._postBodySubscription?.unsubscribe();
24192
- this._emitOutputsSubscription?.unsubscribe();
24193
- this._filterValueSubscription?.unsubscribe();
24194
24204
  /* the ReplaySubjects would cause an initial emission of the outputs if the component is reinitialized
24195
24205
  * (when navigating back for example). ReplaySubjects are used here because the subscription of the section
24196
24206
  * is delayed in the integrated solution with the qdConnectToFilter directive. */
@@ -24254,22 +24264,26 @@ class QdFilterComponent {
24254
24264
  this._isApplyDisabledWhileUnchangedSubject
24255
24265
  ]).pipe(map(([hasActive, currentPostBody, applied, isApplyDisabledWhileUnchanged]) => !hasActive || (isApplyDisabledWhileUnchanged && this.isUnchangedSince(currentPostBody, applied))));
24256
24266
  this.initResetButtonActivation();
24257
- this._queryStringSubscription = this.filterService
24267
+ this.filterService
24258
24268
  .getQueryString$(this.filterId)
24269
+ .pipe(takeUntilDestroyed(this._destroyRef))
24259
24270
  .subscribe(queryString => this.queryStringOutput.emit(queryString));
24260
- this._postBodySubscription = this.filterService
24271
+ this.filterService
24261
24272
  .getPostBody$(this.filterId)
24273
+ .pipe(takeUntilDestroyed(this._destroyRef))
24262
24274
  .subscribe(postBody => this.postBodyOutput.emit(postBody));
24263
24275
  this.hasPreselection = hasActiveCategory(this.filterData?.categories);
24264
- this._emitOutputsSubscription = merge(this.hasPreselectionAfterRouterConnection$.pipe(filter(hasPreselection => hasPreselection || this.filterData?.emitOutputsInitially)), this.allFiltersRemoved$).subscribe(() => {
24276
+ merge(this.hasPreselectionAfterRouterConnection$.pipe(filter(hasPreselection => hasPreselection || this.filterData?.emitOutputsInitially)), this.allFiltersRemoved$)
24277
+ .pipe(takeUntilDestroyed(this._destroyRef))
24278
+ .subscribe(() => {
24265
24279
  this.emitOutputs();
24266
24280
  });
24267
- this._filterValueSubscription = this.filterService
24281
+ this.filterService
24268
24282
  .getCurrentPostBody(this.filterId)
24269
24283
  .pipe(distinctUntilChanged(qdIsDeepEqual), tap$1(() => {
24270
24284
  if (this.isInstantFiltering)
24271
24285
  this.emitOutputs();
24272
- }))
24286
+ }), takeUntilDestroyed(this._destroyRef))
24273
24287
  .subscribe(filterValue => this.valueChange.emit(filterValue));
24274
24288
  this.initializeDependentFiltersService();
24275
24289
  }
@@ -25345,18 +25359,16 @@ class QdOverflowFitDirective {
25345
25359
  host = inject(ElementRef);
25346
25360
  overflowFit = inject(QdOverflowFitService);
25347
25361
  changeDetectorRef = inject(ChangeDetectorRef);
25348
- _subscription;
25362
+ _destroyRef = inject(DestroyRef);
25349
25363
  ngAfterViewInit() {
25350
25364
  const indicator = this.host.nativeElement.querySelector(':scope > [data-fit-measure]');
25351
25365
  if (!indicator)
25352
25366
  return;
25353
- this._subscription = this.overflowFit
25367
+ this.overflowFit
25354
25368
  .observe(this.rowElements(indicator))
25369
+ .pipe(takeUntilDestroyed(this._destroyRef))
25355
25370
  .subscribe(count => this.applyCount(count));
25356
25371
  }
25357
- ngOnDestroy() {
25358
- this._subscription?.unsubscribe();
25359
- }
25360
25372
  isHidden(index) {
25361
25373
  return index >= this.visibleCount;
25362
25374
  }
@@ -25790,7 +25802,7 @@ class QdSearchComponent {
25790
25802
  _configDataSubject = new BehaviorSubject({});
25791
25803
  _search = '';
25792
25804
  _preSelect = '';
25793
- _destroyed$ = new Subject();
25805
+ _destroyRef = inject(DestroyRef);
25794
25806
  _searchConnectedWithRouterSubject = new ReplaySubject(1);
25795
25807
  _searchConnectedWithRouter$ = this._searchConnectedWithRouterSubject.asObservable();
25796
25808
  get inputConfig() {
@@ -25858,7 +25870,7 @@ class QdSearchComponent {
25858
25870
  });
25859
25871
  this.searchRouterConnectorService
25860
25872
  .connectSearchWithRouter(this)
25861
- .pipe(takeUntil$1(this._destroyed$))
25873
+ .pipe(takeUntilDestroyed(this._destroyRef))
25862
25874
  .subscribe(() => this._searchConnectedWithRouterSubject.next());
25863
25875
  }
25864
25876
  waitForConfigData() {
@@ -25874,10 +25886,6 @@ class QdSearchComponent {
25874
25886
  }
25875
25887
  }
25876
25888
  }
25877
- ngOnDestroy() {
25878
- this._destroyed$.next();
25879
- this._destroyed$.complete();
25880
- }
25881
25889
  handleDelete() {
25882
25890
  this.handleClear();
25883
25891
  this.searchService.setSearchValues(this.search, this.preSelect);
@@ -26483,6 +26491,7 @@ class QdTableFillingWidthService {
26483
26491
  tableStoreService = inject(QdTableStoreService);
26484
26492
  zone = inject(NgZone);
26485
26493
  injector = inject(Injector);
26494
+ _destroyRef = inject(DestroyRef);
26486
26495
  renderRef;
26487
26496
  tableComponentElement;
26488
26497
  tableConfig;
@@ -26494,7 +26503,7 @@ class QdTableFillingWidthService {
26494
26503
  tableWidth$ = new BehaviorSubject(0);
26495
26504
  tableNumberOfColumns$ = new BehaviorSubject(0);
26496
26505
  appliedWidth;
26497
- destroyed$ = new Subject();
26506
+ _stopWatching$ = new Subject();
26498
26507
  get whichColumnFillsWidth() {
26499
26508
  return this.tableConfig?.whichColumnFillsWidth || WHICH_COLUMN_FILLS_WIDTH_DEFAULT;
26500
26509
  }
@@ -26507,7 +26516,7 @@ class QdTableFillingWidthService {
26507
26516
  if (this.whichColumnFillsWidth === 'none')
26508
26517
  return;
26509
26518
  combineLatest([this.observeTableWidth(), this.observeTableData(), this.observeTableNumberOfColumns()])
26510
- .pipe(debounceTime(DEBOUNCE_TIME), takeUntil(this.destroyed$))
26519
+ .pipe(debounceTime(DEBOUNCE_TIME), takeUntil(this._stopWatching$), takeUntilDestroyed(this._destroyRef))
26511
26520
  .subscribe(() => this.fillRemainingWidth());
26512
26521
  }
26513
26522
  /**
@@ -26518,7 +26527,10 @@ class QdTableFillingWidthService {
26518
26527
  this.reinitialize();
26519
26528
  }
26520
26529
  /**
26521
- * Stops watching the table and drops the styles the service applied.
26530
+ * Stops watching the table right away and disconnects the observers.
26531
+ *
26532
+ * The owner calls it in its destroy hook, before it resets the table store.
26533
+ * The watch also ends when the owner is destroyed, but only after its destroy hooks.
26522
26534
  */
26523
26535
  destroy() {
26524
26536
  this.clearSubscriptions();
@@ -26628,11 +26640,11 @@ class QdTableFillingWidthService {
26628
26640
  const tableData$ = new ReplaySubject(1);
26629
26641
  this.tableStoreService
26630
26642
  .tableDataEntries$()
26631
- .pipe(take(1), takeUntil(this.destroyed$))
26643
+ .pipe(take(1), takeUntil(this._stopWatching$), takeUntilDestroyed(this._destroyRef))
26632
26644
  .subscribe(data => tableData$.next(data));
26633
26645
  this.tableStoreService
26634
26646
  .tableDataEntries$()
26635
- .pipe(skip(1), takeUntil(this.destroyed$))
26647
+ .pipe(skip(1), takeUntil(this._stopWatching$), takeUntilDestroyed(this._destroyRef))
26636
26648
  .subscribe(data => {
26637
26649
  this.renderRef?.destroy();
26638
26650
  this.renderRef = afterNextRender(() => this.zone.runOutsideAngular(() => tableData$.next(data)), {
@@ -26647,7 +26659,7 @@ class QdTableFillingWidthService {
26647
26659
  this.initialize(this.tableComponentElement, this.tableConfig);
26648
26660
  }
26649
26661
  clearSubscriptions() {
26650
- this.destroyed$.next();
26662
+ this._stopWatching$.next();
26651
26663
  this.renderRef?.destroy();
26652
26664
  this.pauseObservers();
26653
26665
  }
@@ -27028,7 +27040,7 @@ class QdTableResolverService {
27028
27040
  tableStoreService = inject(QdTableStoreService);
27029
27041
  translateService = inject(TranslateService);
27030
27042
  actionResultService = inject(QdTableExternalActionResultService);
27031
- _destroyed$ = new ReplaySubject(1);
27043
+ _destroyRef = inject(DestroyRef);
27032
27044
  _refreshSubscription;
27033
27045
  _hasPagination = true;
27034
27046
  _isNavigatingToValidPage = false;
@@ -27036,10 +27048,6 @@ class QdTableResolverService {
27036
27048
  constructor() {
27037
27049
  this.subscribeToExternalRefresh();
27038
27050
  }
27039
- ngOnDestroy() {
27040
- this._destroyed$.next(null);
27041
- this._destroyed$.complete();
27042
- }
27043
27051
  init(refreshOnLanguageChange, hasPagination = true) {
27044
27052
  const resolver = this.tableDataResolver;
27045
27053
  if (!resolver)
@@ -27049,7 +27057,7 @@ class QdTableResolverService {
27049
27057
  this.subscribeToLangChanges();
27050
27058
  this.tableStoreService
27051
27059
  .selectDataResolutionCriteria$()
27052
- .pipe(distinctUntilChanged(qdIsDeepEqual), filter((resolutionCriteria) => !!resolutionCriteria && this.shouldDataBeResolved(resolutionCriteria)), map(resolutionCriteria => this.buildCriteriaParams(resolutionCriteria)), switchMap$1(resolutionParams => this.resolveAndApply(resolver, resolutionParams)), takeUntil(this._destroyed$))
27060
+ .pipe(distinctUntilChanged(qdIsDeepEqual), filter((resolutionCriteria) => !!resolutionCriteria && this.shouldDataBeResolved(resolutionCriteria)), map(resolutionCriteria => this.buildCriteriaParams(resolutionCriteria)), switchMap$1(resolutionParams => this.resolveAndApply(resolver, resolutionParams)), takeUntilDestroyed(this._destroyRef))
27053
27061
  .subscribe();
27054
27062
  }
27055
27063
  refresh(resolverOptions = {}) {
@@ -27060,11 +27068,11 @@ class QdTableResolverService {
27060
27068
  this._refreshSubscription?.unsubscribe();
27061
27069
  this._refreshSubscription = this.tableStoreService
27062
27070
  .selectDataResolutionCriteria$()
27063
- .pipe(filter((criteria) => !!criteria), take$1(1), filter(criteria => !this.isAwaitingConnectors(criteria)), switchMap$1(resolutionCriteria => this.resolveAndApply(resolver, this.buildRefreshParams(resolutionCriteria, pageIndex))), takeUntil(this._destroyed$))
27071
+ .pipe(filter((criteria) => !!criteria), take$1(1), filter(criteria => !this.isAwaitingConnectors(criteria)), switchMap$1(resolutionCriteria => this.resolveAndApply(resolver, this.buildRefreshParams(resolutionCriteria, pageIndex))), takeUntilDestroyed(this._destroyRef))
27064
27072
  .subscribe();
27065
27073
  }
27066
27074
  subscribeToLangChanges() {
27067
- this.translateService.onLangChange.pipe(takeUntil(this._destroyed$)).subscribe(() => this.refresh());
27075
+ this.translateService.onLangChange.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this.refresh());
27068
27076
  }
27069
27077
  shouldDataBeResolved(criteria) {
27070
27078
  if (this.isAwaitingConnectors(criteria))
@@ -27078,7 +27086,7 @@ class QdTableResolverService {
27078
27086
  }
27079
27087
  subscribeToExternalRefresh() {
27080
27088
  this.actionResultService.actionSuccess$
27081
- .pipe(takeUntil(this._destroyed$))
27089
+ .pipe(takeUntilDestroyed(this._destroyRef))
27082
27090
  .subscribe(pageIndex => this.refresh({ pageIndex }));
27083
27091
  }
27084
27092
  buildCriteriaParams({ tableParams, connectorParams }) {
@@ -27241,6 +27249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
27241
27249
  // @ts-strict-ignore
27242
27250
  class QdTableRowSelectionService {
27243
27251
  tableStoreService = inject(QdTableStoreService);
27252
+ _destroyRef = inject(DestroyRef);
27244
27253
  _config;
27245
27254
  _visibleRowsSubscription;
27246
27255
  set config(config) {
@@ -27249,11 +27258,9 @@ class QdTableRowSelectionService {
27249
27258
  this._visibleRowsSubscription?.unsubscribe();
27250
27259
  this._visibleRowsSubscription = this.tableStoreService
27251
27260
  .tableDataEntries$()
27261
+ .pipe(takeUntilDestroyed(this._destroyRef))
27252
27262
  .subscribe(rows => this.refreshCacheForVisibleRows(rows));
27253
27263
  }
27254
- ngOnDestroy() {
27255
- this._visibleRowsSubscription?.unsubscribe();
27256
- }
27257
27264
  get tableId() {
27258
27265
  return this.tableStoreService.tableId;
27259
27266
  }
@@ -27628,19 +27635,15 @@ class QdTablePaginatorPageSizeDirective {
27628
27635
  tableDataResolver = inject(QD_TABLE_DATA_RESOLVER_TOKEN, { optional: true });
27629
27636
  elementRef = inject(ElementRef);
27630
27637
  tableStoreService = inject(QdTableStoreService);
27638
+ _destroyRef = inject(DestroyRef);
27631
27639
  qdTablePaginatorPageSize;
27632
- _destroyed$ = new Subject();
27633
27640
  ngOnInit() {
27634
27641
  if (this.tableDataResolver) {
27635
27642
  fromEvent(this.elementRef.nativeElement, 'click')
27636
- .pipe(takeUntil(this._destroyed$), filter(() => !this.qdTablePaginatorPageSize.disabled), tap(() => this.tableStoreService.setPageSize(this.qdTablePaginatorPageSize.value)))
27643
+ .pipe(takeUntilDestroyed(this._destroyRef), filter(() => !this.qdTablePaginatorPageSize.disabled), tap(() => this.tableStoreService.setPageSize(this.qdTablePaginatorPageSize.value)))
27637
27644
  .subscribe();
27638
27645
  }
27639
27646
  }
27640
- ngOnDestroy() {
27641
- this._destroyed$.next(null);
27642
- this._destroyed$.complete();
27643
- }
27644
27647
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTablePaginatorPageSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27645
27648
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: QdTablePaginatorPageSizeDirective, isStandalone: false, selector: "[qdTablePaginatorPageSize]", inputs: { qdTablePaginatorPageSize: "qdTablePaginatorPageSize" }, ngImport: i0 });
27646
27649
  }
@@ -27668,7 +27671,6 @@ class QdTablePaginatorPageSizeComponent {
27668
27671
  selectionDirection = 'up';
27669
27672
  pageSize$;
27670
27673
  totalCount$;
27671
- _destroyed$ = new Subject();
27672
27674
  get pageSizes$() {
27673
27675
  return combineLatest([this.pageSize$, this.totalCount$]).pipe(map(([currentPageSize, totalCount]) => this.pageSizes
27674
27676
  .slice(0, this.pageSizes.findIndex(pageSize => pageSize >= totalCount) + 1 || this.pageSizes.length)
@@ -27684,9 +27686,6 @@ class QdTablePaginatorPageSizeComponent {
27684
27686
  this.pageSize$ = this.tableStoreService.pageSize$();
27685
27687
  this.totalCount$ = this.tableStoreService.totalCount$();
27686
27688
  }
27687
- ngOnDestroy() {
27688
- this._destroyed$.complete();
27689
- }
27690
27689
  toggleSelection() {
27691
27690
  if (!this.selectionOpened) {
27692
27691
  this.openSelection();
@@ -27751,6 +27750,7 @@ class QdTablePaginatorComponent {
27751
27750
  tableStoreService = inject(QdTableStoreService);
27752
27751
  routerConnector = inject(QdTablePaginationRouterConnectorService);
27753
27752
  scrollAnchorService = inject(QdTableScrollAnchorService, { optional: true });
27753
+ _destroyRef = inject(DestroyRef);
27754
27754
  /**
27755
27755
  * @description Configuration Model for Qd-Table.
27756
27756
  */
@@ -27769,7 +27769,6 @@ class QdTablePaginatorComponent {
27769
27769
  totalCount$;
27770
27770
  selectedRowsCount$;
27771
27771
  pageNav = QdPaginatorDirection;
27772
- _destroyed$ = new Subject();
27773
27772
  get pageSizes() {
27774
27773
  if (typeof this.config?.pagination !== 'object')
27775
27774
  return [];
@@ -27789,10 +27788,6 @@ class QdTablePaginatorComponent {
27789
27788
  if (this.isConfigValid())
27790
27789
  this.startPagination();
27791
27790
  }
27792
- ngOnDestroy() {
27793
- this._destroyed$.next(null);
27794
- this._destroyed$.complete();
27795
- }
27796
27791
  /**
27797
27792
  * @description Whether this paginator should sync its state with the URL. Reads
27798
27793
  * `pagination.connectWithRouter` (default `false` — URL sync is opt-in and
@@ -27832,7 +27827,7 @@ class QdTablePaginatorComponent {
27832
27827
  return;
27833
27828
  this.tableStoreService
27834
27829
  .table$()
27835
- .pipe(takeUntil(this._destroyed$), take$1(1), tap(table => this.applyPageParams(direction, table)))
27830
+ .pipe(takeUntilDestroyed(this._destroyRef), take$1(1), tap(table => this.applyPageParams(direction, table)))
27836
27831
  .subscribe();
27837
27832
  }
27838
27833
  applyPageParams(direction, table) {
@@ -27862,7 +27857,7 @@ class QdTablePaginatorComponent {
27862
27857
  }
27863
27858
  this.routerConnector
27864
27859
  .connectPaginationWithRouter(this, this.tableStoreService)
27865
- .pipe(takeUntil(this._destroyed$), take$1(1))
27860
+ .pipe(takeUntilDestroyed(this._destroyRef), take$1(1))
27866
27861
  .subscribe(connected => {
27867
27862
  if (!connected)
27868
27863
  this.initPagination();
@@ -28075,7 +28070,7 @@ class QdTableRowActionsSecondaryMenuComponent {
28075
28070
  actionsService = inject(QdTableSecondaryActionsService);
28076
28071
  tableStore = inject(QdTableStoreService);
28077
28072
  eventBroker = inject(QdEventBrokerService, { optional: true });
28078
- destroyRef = inject(DestroyRef);
28073
+ _destroyRef = inject(DestroyRef);
28079
28074
  rowIndex;
28080
28075
  rowData;
28081
28076
  actions;
@@ -28111,7 +28106,6 @@ class QdTableRowActionsSecondaryMenuComponent {
28111
28106
  this.evaluate(true);
28112
28107
  }
28113
28108
  ngOnDestroy() {
28114
- this.forgetAll();
28115
28109
  this._states$.next(new Map());
28116
28110
  }
28117
28111
  onActionClick(type) {
@@ -28129,7 +28123,7 @@ class QdTableRowActionsSecondaryMenuComponent {
28129
28123
  this._operationMode$ ??= this.eventBroker?.consume('operation_mode_changed');
28130
28124
  let isReplaying = true;
28131
28125
  this._viewModeSubscription = this._operationMode$
28132
- ?.pipe(takeUntilDestroyed(this.destroyRef))
28126
+ ?.pipe(takeUntilDestroyed(this._destroyRef))
28133
28127
  .subscribe(({ payload }) => {
28134
28128
  this._isViewonly = payload.isViewonly;
28135
28129
  if (!isReplaying)
@@ -28228,7 +28222,7 @@ class QdTableRowActionsSecondaryMenuComponent {
28228
28222
  this.forget(key);
28229
28223
  this._resolutions.set(key, resolution);
28230
28224
  resolution.subscription = availability$
28231
- .pipe(map(value => this.validate(type, configKey, value)), catchError(error => of(this.reportError(type, configKey, { kind: 'emitted', text: 'emitted an error.', cause: error }))))
28225
+ .pipe(map(value => this.validate(type, configKey, value)), catchError(error => of(this.reportError(type, configKey, { kind: 'emitted', text: 'emitted an error.', cause: error }))), takeUntilDestroyed(this._destroyRef))
28232
28226
  .subscribe(state => this.update(key, resolution, state));
28233
28227
  }
28234
28228
  update(key, resolution, state) {
@@ -28464,23 +28458,19 @@ class QdTableBodyComponent {
28464
28458
  tableStoreService = inject(QdTableStoreService);
28465
28459
  resolverService = inject(QdTableResolverService);
28466
28460
  cdr = inject(ChangeDetectorRef);
28467
- destroyRef = inject(DestroyRef);
28461
+ _destroyRef = inject(DestroyRef);
28468
28462
  config;
28469
28463
  data;
28470
28464
  testId;
28471
28465
  isLoading$;
28472
28466
  highlightedRowIdentifier;
28473
28467
  trackByRowIdentifier = (rowIndex, rowData) => resolveRowIdentifier(rowData, rowIndex, this.config.trackRowBy);
28474
- _primaryActionRefreshSubscription;
28475
28468
  constructor() {
28476
28469
  this.isLoading$ = this.tableStoreService.selectIsLoading$().pipe(debounceTime$1(400));
28477
28470
  }
28478
28471
  ngOnInit() {
28479
28472
  this.initHighlight();
28480
28473
  }
28481
- ngOnDestroy() {
28482
- this._primaryActionRefreshSubscription?.unsubscribe();
28483
- }
28484
28474
  isLastVisitedRow(rowData, rowIndex) {
28485
28475
  if (this.highlightedRowIdentifier === undefined)
28486
28476
  return false;
@@ -28496,9 +28486,7 @@ class QdTableBodyComponent {
28496
28486
  if (!this.config.primaryAction?.refresh?.isEnabled)
28497
28487
  return;
28498
28488
  if (result instanceof Observable) {
28499
- this._primaryActionRefreshSubscription = result
28500
- .pipe(take(1))
28501
- .subscribe(success => success && !this.destroyRef.destroyed && this.triggerRefresh());
28489
+ result.pipe(take(1), takeUntilDestroyed(this._destroyRef)).subscribe(success => success && this.triggerRefresh());
28502
28490
  return;
28503
28491
  }
28504
28492
  this.triggerRefresh();
@@ -28586,6 +28574,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
28586
28574
  const MULTI_SORT = false;
28587
28575
  class QdTableSortComponent {
28588
28576
  tableStoreService = inject(QdTableStoreService);
28577
+ _destroyRef = inject(DestroyRef);
28589
28578
  isSortable = false;
28590
28579
  config;
28591
28580
  column;
@@ -28594,7 +28583,6 @@ class QdTableSortComponent {
28594
28583
  isActive = false;
28595
28584
  showAsc$;
28596
28585
  showDesc$;
28597
- _isActiveSubscription = new Subscription();
28598
28586
  _direction = QdSortDirection.NONE;
28599
28587
  _multiSort = MULTI_SORT;
28600
28588
  get direction() {
@@ -28613,9 +28601,6 @@ class QdTableSortComponent {
28613
28601
  this.setShowAsc();
28614
28602
  this.setShowDesc();
28615
28603
  }
28616
- ngOnDestroy() {
28617
- this._isActiveSubscription.unsubscribe(); // takeUntil(_$destroyed) does not prevent call of selector projector
28618
- }
28619
28604
  getOpacity() {
28620
28605
  return this.isSortable && !this.isActive ? '.5' : '1';
28621
28606
  }
@@ -28638,12 +28623,12 @@ class QdTableSortComponent {
28638
28623
  this.direction = this.config?.direction || QdSortDirection.NONE;
28639
28624
  }
28640
28625
  subscribeIsActive() {
28641
- this._isActiveSubscription = this.tableStoreService
28626
+ this.tableStoreService
28642
28627
  .columnSortDirection$(this.column)
28643
28628
  .pipe(filter(() => this.isSortable), tap(direction => (this.isActive = direction !== QdSortDirection.NONE)), tap(() => {
28644
28629
  if (!this.isActive && !this._multiSort)
28645
28630
  this.direction = QdSortDirection.NONE;
28646
- }))
28631
+ }), takeUntilDestroyed(this._destroyRef))
28647
28632
  .subscribe();
28648
28633
  }
28649
28634
  updateSortDirection() {
@@ -28891,7 +28876,7 @@ class QdTableComponent {
28891
28876
  resolverService = inject(QdTableResolverService);
28892
28877
  confirmationDialogService = inject(QdConfirmationDialogOpenerService);
28893
28878
  sortRouterConnector = inject(QdTableSortRouterConnectorService);
28894
- destroyRef = inject(DestroyRef);
28879
+ _destroyRef = inject(DestroyRef);
28895
28880
  /**
28896
28881
  * Configuration of the table. The generic type specifies the column definition. <br />
28897
28882
  * Required. Without a config, the table throws an error on init and shows nothing. <br />
@@ -28978,11 +28963,6 @@ class QdTableComponent {
28978
28963
  hasEmptyStateView$;
28979
28964
  table$;
28980
28965
  _data = [];
28981
- _recentSecondaryActionsSubscription;
28982
- _rowSelectionServiceSubscription;
28983
- _emptyStateActionServiceSubscription;
28984
- _breakpointSubscription;
28985
- _pushEventsSubscription;
28986
28966
  _refreshSubscription;
28987
28967
  _deselectAllSubscription;
28988
28968
  _connectors = [];
@@ -29041,13 +29021,6 @@ class QdTableComponent {
29041
29021
  this.tableStoreService.resetConnectorStates();
29042
29022
  this.fillingWidthService.destroy();
29043
29023
  this.scrollAnchorService.destroy();
29044
- this._recentSecondaryActionsSubscription?.unsubscribe();
29045
- this._rowSelectionServiceSubscription?.unsubscribe();
29046
- this._emptyStateActionServiceSubscription?.unsubscribe();
29047
- this._breakpointSubscription?.unsubscribe();
29048
- this._pushEventsSubscription?.unsubscribe();
29049
- this._refreshSubscription?.unsubscribe();
29050
- this._deselectAllSubscription?.unsubscribe();
29051
29024
  if (!this.config.uid || this.config.refreshOnPushEvent)
29052
29025
  this.tableStoreService.deleteTableState();
29053
29026
  }
@@ -29073,7 +29046,10 @@ class QdTableComponent {
29073
29046
  }
29074
29047
  initializeResponsiveRowService() {
29075
29048
  this.responsiveRowService.config = this.config;
29076
- this._breakpointSubscription = this.breakpointService.getMatchingBreakpoint().subscribe(breakpoint => {
29049
+ this.breakpointService
29050
+ .getMatchingBreakpoint()
29051
+ .pipe(takeUntilDestroyed(this._destroyRef))
29052
+ .subscribe(breakpoint => {
29077
29053
  this.responsiveRowService.currentBreakpoint = breakpoint;
29078
29054
  });
29079
29055
  }
@@ -29093,14 +29069,16 @@ class QdTableComponent {
29093
29069
  this.fillingWidthService.updateTableConfig(this.config);
29094
29070
  }
29095
29071
  initializeEmptyStateService() {
29096
- this._emptyStateActionServiceSubscription = this.emptyStateService.emptyStateAction$.subscribe(() => this.emptyStateActionOutput.emit());
29072
+ this.emptyStateService.emptyStateAction$
29073
+ .pipe(takeUntilDestroyed(this._destroyRef))
29074
+ .subscribe(() => this.emptyStateActionOutput.emit());
29097
29075
  }
29098
29076
  initializeEmptyStateView() {
29099
29077
  this.hasEmptyStateView$ = this.hasData$.pipe(map(hasData => !hasData && !!this.config.emptyStateView && !this.config.emptyStateView.disabled));
29100
29078
  }
29101
29079
  initializeRowSelectionService() {
29102
29080
  this.rowSelectionService.config = this.config;
29103
- this._rowSelectionServiceSubscription = this.rowSelectionService.selectedRows$.subscribe(selectedRows => {
29081
+ this.rowSelectionService.selectedRows$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(selectedRows => {
29104
29082
  this.selectedRowsOutput.emit(selectedRows);
29105
29083
  this.config.selection?.handler?.(selectedRows);
29106
29084
  });
@@ -29111,7 +29089,9 @@ class QdTableComponent {
29111
29089
  }
29112
29090
  subscribeToDeselectAll(ignoresReplayedValue = false) {
29113
29091
  let isSubscribing = ignoresReplayedValue;
29114
- this._deselectAllSubscription = this.config.selection?.deselectAll$?.subscribe(() => {
29092
+ this._deselectAllSubscription = this.config.selection?.deselectAll$
29093
+ ?.pipe(takeUntilDestroyed(this._destroyRef))
29094
+ .subscribe(() => {
29115
29095
  if (!isSubscribing)
29116
29096
  this.rowSelectionService.clearAll();
29117
29097
  });
@@ -29128,9 +29108,9 @@ class QdTableComponent {
29128
29108
  }
29129
29109
  }
29130
29110
  initializeSecondaryActionsService() {
29131
- this._recentSecondaryActionsSubscription = this.tableStoreService
29111
+ this.tableStoreService
29132
29112
  .recentSecondaryAction$()
29133
- .pipe(switchMap(recentAction => this.whenSecondaryActionAvailable$(recentAction)))
29113
+ .pipe(switchMap(recentAction => this.whenSecondaryActionAvailable$(recentAction)), takeUntilDestroyed(this._destroyRef))
29134
29114
  .subscribe(recentAction => {
29135
29115
  this.secondaryActionOutput.emit(recentAction);
29136
29116
  const action = this.config.secondaryActions?.find(a => a.type === recentAction.type);
@@ -29177,7 +29157,7 @@ class QdTableComponent {
29177
29157
  const pushEventsService = this.pushEventsService;
29178
29158
  const events = [...(this.config?.refreshingEvents || []), 'RESOURCE_UPDATED'];
29179
29159
  const combinedEvents$ = merge(...events.map(eventName => pushEventsService.observe(eventName)));
29180
- this._pushEventsSubscription = combinedEvents$
29160
+ combinedEvents$
29181
29161
  .pipe(filter(messageEvent => {
29182
29162
  try {
29183
29163
  const data = JSON.parse(messageEvent.data);
@@ -29190,22 +29170,22 @@ class QdTableComponent {
29190
29170
  }), catchError(error => {
29191
29171
  console.error('Quadrel Framework | QdTable - Error in event stream:', error);
29192
29172
  return NEVER;
29193
- }))
29173
+ }), takeUntilDestroyed(this._destroyRef))
29194
29174
  .subscribe(() => this.triggerRefresh());
29195
29175
  }
29196
29176
  processSecondaryActionRefresh(result, refreshConfig) {
29197
29177
  if (result instanceof Observable) {
29198
29178
  result
29199
29179
  .pipe(take(1))
29200
- .subscribe(success => success && !this.destroyRef.destroyed && this.triggerRefresh(refreshConfig.page));
29180
+ .subscribe(success => success && !this._destroyRef.destroyed && this.triggerRefresh(refreshConfig.page));
29201
29181
  return;
29202
29182
  }
29203
- if (!this.destroyRef.destroyed)
29183
+ if (!this._destroyRef.destroyed)
29204
29184
  this.triggerRefresh(refreshConfig.page);
29205
29185
  }
29206
29186
  initRefresh(ignoresReplayedValue = false) {
29207
29187
  let isSubscribing = ignoresReplayedValue;
29208
- this._refreshSubscription = this.config.refresh?.subscribe(value => {
29188
+ this._refreshSubscription = this.config.refresh?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(value => {
29209
29189
  if (!isSubscribing)
29210
29190
  this.triggerRefresh(value);
29211
29191
  });
@@ -29415,13 +29395,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
29415
29395
  class QdConnectorTableContextDirective {
29416
29396
  tableComponent = inject(QdTableComponent, { host: true });
29417
29397
  contextService = inject(QdContextService);
29418
- destroyed = new Subject();
29398
+ _destroyRef = inject(DestroyRef);
29419
29399
  constructor() {
29420
29400
  this.tableComponent.registerConnector('context');
29421
29401
  }
29422
29402
  ngOnInit() {
29423
29403
  this.contextService.values$
29424
- .pipe(takeUntil$1(this.destroyed), map$1(values => ({
29404
+ .pipe(takeUntilDestroyed(this._destroyRef), map$1(values => ({
29425
29405
  ...values.reduce((previous, current) => ({
29426
29406
  ...previous,
29427
29407
  [current.contextId]: current.value
@@ -29429,10 +29409,6 @@ class QdConnectorTableContextDirective {
29429
29409
  })), tap$1(context => this.tableComponent.updateFromConnector('context', { context })))
29430
29410
  .subscribe();
29431
29411
  }
29432
- ngOnDestroy() {
29433
- this.destroyed.next(true);
29434
- this.destroyed.complete();
29435
- }
29436
29412
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdConnectorTableContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
29437
29413
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: QdConnectorTableContextDirective, isStandalone: false, selector: "qd-table[qdConnectToContext]", ngImport: i0 });
29438
29414
  }
@@ -29500,7 +29476,7 @@ class QdConnectorTableFilterDirective {
29500
29476
  */
29501
29477
  qdConnectToFilter;
29502
29478
  filterComponent;
29503
- _destroyed$ = new Subject();
29479
+ _destroyRef = inject(DestroyRef);
29504
29480
  constructor() {
29505
29481
  const toolbarComponentsService = this.toolbarComponentsService;
29506
29482
  if (!toolbarComponentsService)
@@ -29517,10 +29493,6 @@ class QdConnectorTableFilterDirective {
29517
29493
  this.filterComponent.updateFilterConfig({ ...this.qdConnectToFilter, emitOutputsInitially: true });
29518
29494
  }
29519
29495
  }
29520
- ngOnDestroy() {
29521
- this._destroyed$.next();
29522
- this._destroyed$.complete();
29523
- }
29524
29496
  setFilterComponent() {
29525
29497
  this.filterComponent = this.toolbarComponentsService.getComponent(QdFilterComponent);
29526
29498
  }
@@ -29533,7 +29505,7 @@ class QdConnectorTableFilterDirective {
29533
29505
  subscribeToFilterChanges() {
29534
29506
  this.filterComponent
29535
29507
  .getFilterChanges$()
29536
- .pipe(takeUntil(this._destroyed$), tap(filterChange => {
29508
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(filterChange => {
29537
29509
  this.tableComponent.updateFromConnector('filter', { filter: filterChange });
29538
29510
  }))
29539
29511
  .subscribe();
@@ -29617,12 +29589,12 @@ class QdConnectorTableManualRefreshDirective {
29617
29589
  tableComponent = inject(QdTableComponent, { host: true });
29618
29590
  manualRefreshService = inject(QdSectionManualRefreshService, { optional: true });
29619
29591
  tableDataResolver = inject(QD_TABLE_DATA_RESOLVER_TOKEN, { optional: true });
29620
- destroyRef = inject(DestroyRef);
29592
+ _destroyRef = inject(DestroyRef);
29621
29593
  constructor() {
29622
29594
  if (!this.manualRefreshService)
29623
29595
  throw new Error('Quadrel Framework | QdConnectorTableManualRefresh - Please use this directive only within <qd-section>.');
29624
29596
  const manualRefreshService = this.manualRefreshService;
29625
- this.destroyRef.onDestroy(() => manualRefreshService.disableManualRefresh());
29597
+ this._destroyRef.onDestroy(() => manualRefreshService.disableManualRefresh());
29626
29598
  }
29627
29599
  ngOnInit() {
29628
29600
  if (!this.tableDataResolver) {
@@ -29633,10 +29605,10 @@ class QdConnectorTableManualRefreshDirective {
29633
29605
  manualRefreshService.enableManualRefresh();
29634
29606
  this.tableComponent
29635
29607
  .selectIsLoadingForConnector$()
29636
- .pipe(takeUntilDestroyed(this.destroyRef))
29608
+ .pipe(takeUntilDestroyed(this._destroyRef))
29637
29609
  .subscribe(isLoading => manualRefreshService.setManualRefreshBlocked(isLoading));
29638
29610
  manualRefreshService.manualRefreshRequested$
29639
- .pipe(takeUntilDestroyed(this.destroyRef))
29611
+ .pipe(takeUntilDestroyed(this._destroyRef))
29640
29612
  .subscribe(() => this.tableComponent.refreshFromConnector());
29641
29613
  }
29642
29614
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdConnectorTableManualRefreshDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
@@ -29690,7 +29662,7 @@ class QdConnectorTableSearchDirective {
29690
29662
  */
29691
29663
  qdConnectToSearch;
29692
29664
  searchComponent;
29693
- _destroy$ = new Subject();
29665
+ _destroyRef = inject(DestroyRef);
29694
29666
  constructor() {
29695
29667
  const toolbarComponentsService = this.toolbarComponentsService;
29696
29668
  if (!toolbarComponentsService)
@@ -29704,10 +29676,6 @@ class QdConnectorTableSearchDirective {
29704
29676
  });
29705
29677
  this.subscribeToSearchChanges();
29706
29678
  }
29707
- ngOnDestroy() {
29708
- this._destroy$.next();
29709
- this._destroy$.complete();
29710
- }
29711
29679
  setSearchComponent() {
29712
29680
  this.searchComponent = this.toolbarComponentsService.getComponent(QdSearchComponent);
29713
29681
  }
@@ -29719,7 +29687,7 @@ class QdConnectorTableSearchDirective {
29719
29687
  subscribeToSearchChanges() {
29720
29688
  this.searchComponent
29721
29689
  .getSearchChanges$()
29722
- .pipe(takeUntil(this._destroy$), tap(searchChange => this.tableComponent.updateFromConnector('search', { search: searchChange })))
29690
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(searchChange => this.tableComponent.updateFromConnector('search', { search: searchChange })))
29723
29691
  .subscribe();
29724
29692
  }
29725
29693
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdConnectorTableSearchDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
@@ -29815,6 +29783,7 @@ class QdSectionToolbarActionComponent {
29815
29783
  changeDetectorRef = inject(ChangeDetectorRef);
29816
29784
  breakpointService = inject(QdBreakpointService);
29817
29785
  eventBroker = inject(QdEventBrokerService, { optional: true });
29786
+ _destroyRef = inject(DestroyRef);
29818
29787
  set config(config) {
29819
29788
  this._config = config;
29820
29789
  this.validateConfig();
@@ -29825,19 +29794,14 @@ class QdSectionToolbarActionComponent {
29825
29794
  groupedActionsMenu$;
29826
29795
  _config = {};
29827
29796
  _viewonly$ = new BehaviorSubject(false);
29828
- _destroy$ = new Subject();
29829
29797
  ngOnInit() {
29830
29798
  this.initViewMode();
29831
29799
  this.initActionStreams();
29832
29800
  }
29833
- ngOnDestroy() {
29834
- this._destroy$.next();
29835
- this._destroy$.complete();
29836
- }
29837
29801
  initViewMode() {
29838
29802
  this.eventBroker
29839
29803
  ?.consume('operation_mode_changed')
29840
- .pipe(takeUntil(this._destroy$))
29804
+ .pipe(takeUntilDestroyed(this._destroyRef))
29841
29805
  .subscribe(({ payload }) => {
29842
29806
  this._viewonly$.next(payload.isViewonly);
29843
29807
  this.changeDetectorRef.markForCheck();
@@ -30092,6 +30056,7 @@ class QdSectionComponent {
30092
30056
  filterService = inject(QdFilterService);
30093
30057
  elementRef = inject(ElementRef);
30094
30058
  cdr = inject(ChangeDetectorRef);
30059
+ _destroyRef = inject(DestroyRef);
30095
30060
  /**
30096
30061
  * The configuration of the section.
30097
30062
  */
@@ -30143,9 +30108,6 @@ class QdSectionComponent {
30143
30108
  this.subscribeForOutputs();
30144
30109
  }
30145
30110
  }
30146
- ngOnDestroy() {
30147
- this.unsubscribeOutputSubscriptions();
30148
- }
30149
30111
  subscribeForOutputs() {
30150
30112
  this.subscribeForSearchOutputs();
30151
30113
  this.subscribeForActionOutput();
@@ -30154,11 +30116,17 @@ class QdSectionComponent {
30154
30116
  subscribeForSearchOutputs() {
30155
30117
  if (!this.config.search)
30156
30118
  return;
30157
- this._outputSubscriptions.push(this.searchService.searchQueryString$.subscribe(queryString => this.searchQueryStringOutput.emit(queryString)));
30158
- this._outputSubscriptions.push(this.searchService.searchPostBody$.subscribe(postBody => this.searchPostBodyOutput.emit(postBody)));
30119
+ this._outputSubscriptions.push(this.searchService.searchQueryString$
30120
+ .pipe(takeUntilDestroyed(this._destroyRef))
30121
+ .subscribe(queryString => this.searchQueryStringOutput.emit(queryString)));
30122
+ this._outputSubscriptions.push(this.searchService.searchPostBody$
30123
+ .pipe(takeUntilDestroyed(this._destroyRef))
30124
+ .subscribe(postBody => this.searchPostBodyOutput.emit(postBody)));
30159
30125
  }
30160
30126
  subscribeForActionOutput() {
30161
- this._outputSubscriptions.push(this.actionService.action$.subscribe((type) => this.actionOutput.emit(type || null)));
30127
+ this._outputSubscriptions.push(this.actionService.action$
30128
+ .pipe(takeUntilDestroyed(this._destroyRef))
30129
+ .subscribe((type) => this.actionOutput.emit(type || null)));
30162
30130
  }
30163
30131
  subscribeForFilterOutputs() {
30164
30132
  if (!this.config.filter)
@@ -30167,12 +30135,15 @@ class QdSectionComponent {
30167
30135
  this.config.filter.uid = v4();
30168
30136
  this._outputSubscriptions.push(this.filterService
30169
30137
  .getQueryString$(this.config.filter.uid)
30138
+ .pipe(takeUntilDestroyed(this._destroyRef))
30170
30139
  .subscribe(queryString => this.filterQueryStringOutput.emit(queryString)));
30171
30140
  this._outputSubscriptions.push(this.filterService
30172
30141
  .getPostBody$(this.config.filter.uid)
30142
+ .pipe(takeUntilDestroyed(this._destroyRef))
30173
30143
  .subscribe(postBody => this.filterPostBodyOutput.emit(postBody)));
30174
30144
  this._outputSubscriptions.push(this.filterService
30175
30145
  .getCurrentPostBody(this.config.filter.uid)
30146
+ .pipe(takeUntilDestroyed(this._destroyRef))
30176
30147
  .subscribe(filterValue => this.filterValueChangeOutput.emit(filterValue)));
30177
30148
  }
30178
30149
  unsubscribeOutputSubscriptions() {
@@ -30915,7 +30886,7 @@ class QdTreeRowActionsSecondaryMenuComponent {
30915
30886
  _i18ns$ = new BehaviorSubject(undefined);
30916
30887
  _secondaryActionsConfig$ = new BehaviorSubject([]);
30917
30888
  _viewonly$ = new BehaviorSubject(false);
30918
- _destroy$ = new Subject();
30889
+ _destroyRef = inject(DestroyRef);
30919
30890
  actions$ = combineLatest([
30920
30891
  this._i18ns$,
30921
30892
  this._secondaryActionsConfig$,
@@ -30939,10 +30910,6 @@ class QdTreeRowActionsSecondaryMenuComponent {
30939
30910
  this._secondaryActionsConfig$.next(this.config.secondaryActions ?? []);
30940
30911
  this.initViewMode();
30941
30912
  }
30942
- ngOnDestroy() {
30943
- this._destroy$.next();
30944
- this._destroy$.complete();
30945
- }
30946
30913
  handleSecondaryAction(type, index, isHidden) {
30947
30914
  if (isHidden)
30948
30915
  return;
@@ -30959,7 +30926,7 @@ class QdTreeRowActionsSecondaryMenuComponent {
30959
30926
  }
30960
30927
  this.eventBroker
30961
30928
  ?.consume('operation_mode_changed')
30962
- .pipe(takeUntil(this._destroy$))
30929
+ .pipe(takeUntilDestroyed(this._destroyRef))
30963
30930
  .subscribe(({ payload }) => this._viewonly$.next(payload.isViewonly));
30964
30931
  }
30965
30932
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTreeRowActionsSecondaryMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -31183,6 +31150,7 @@ class QdTreeComponent {
31183
31150
  responsiveRowService = inject(QdTableResponsiveRowService);
31184
31151
  fillingWidthService = inject(QdTableFillingWidthService);
31185
31152
  breakpointService = inject(QdBreakpointService);
31153
+ _destroyRef = inject(DestroyRef);
31186
31154
  /**
31187
31155
  * Configuration of the tree table. The generic type specifies the column definition. <br />
31188
31156
  *
@@ -31255,9 +31223,6 @@ class QdTreeComponent {
31255
31223
  hasData$;
31256
31224
  hasEmptyStateView$;
31257
31225
  _table$;
31258
- _breakpointSubscription;
31259
- _emptyStateActionServiceSubscription;
31260
- _recentSecondaryActionsSubscription;
31261
31226
  get whichColumnFillsWidth() {
31262
31227
  return this.fillingWidthService.whichColumnFillsWidth;
31263
31228
  }
@@ -31286,9 +31251,6 @@ class QdTreeComponent {
31286
31251
  ngOnDestroy() {
31287
31252
  this.tableStoreService.updateTableStateRecentSecondaryAction(undefined);
31288
31253
  this.fillingWidthService.destroy();
31289
- this._emptyStateActionServiceSubscription?.unsubscribe();
31290
- this._breakpointSubscription?.unsubscribe();
31291
- this._recentSecondaryActionsSubscription?.unsubscribe();
31292
31254
  }
31293
31255
  validateConfig() {
31294
31256
  if (!this.config.i18ns) {
@@ -31310,7 +31272,10 @@ class QdTreeComponent {
31310
31272
  }
31311
31273
  initializeResponsiveRowService() {
31312
31274
  this.responsiveRowService.config = this.config;
31313
- this._breakpointSubscription = this.breakpointService.getMatchingBreakpoint().subscribe(breakpoint => {
31275
+ this.breakpointService
31276
+ .getMatchingBreakpoint()
31277
+ .pipe(takeUntilDestroyed(this._destroyRef))
31278
+ .subscribe(breakpoint => {
31314
31279
  this.responsiveRowService.currentBreakpoint = breakpoint;
31315
31280
  });
31316
31281
  }
@@ -31319,7 +31284,9 @@ class QdTreeComponent {
31319
31284
  }
31320
31285
  initializeEmptyStateService() {
31321
31286
  this.emptyStateService.i18ns = this.config.i18ns;
31322
- this._emptyStateActionServiceSubscription = this.emptyStateService.emptyStateAction$.subscribe(() => this.emptyStateActionOutput.emit());
31287
+ this.emptyStateService.emptyStateAction$
31288
+ .pipe(takeUntilDestroyed(this._destroyRef))
31289
+ .subscribe(() => this.emptyStateActionOutput.emit());
31323
31290
  }
31324
31291
  checkForChanges(changes, key) {
31325
31292
  return (changes[key] &&
@@ -31327,8 +31294,9 @@ class QdTreeComponent {
31327
31294
  JSON.stringify(changes[key].previousValue) !== JSON.stringify(changes[key].currentValue));
31328
31295
  }
31329
31296
  initializeSecondaryActions() {
31330
- this._recentSecondaryActionsSubscription = this.tableStoreService
31297
+ this.tableStoreService
31331
31298
  .recentSecondaryAction$()
31299
+ .pipe(takeUntilDestroyed(this._destroyRef))
31332
31300
  .subscribe(recentAction => {
31333
31301
  if (!recentAction)
31334
31302
  return;
@@ -32311,7 +32279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
32311
32279
 
32312
32280
  class QdPageCommitActionExecutor {
32313
32281
  static execute(action, values, context) {
32314
- const { formGroupManager, navigationInterceptor, destroyed$, onAfterSnapshot, scheduleFrameworkRebuildStop } = context;
32282
+ const { formGroupManager, navigationInterceptor, destroyRef, onAfterSnapshot, scheduleFrameworkRebuildStop } = context;
32315
32283
  const captured = formGroupManager.createCurrentValuesSnapshot();
32316
32284
  let result$;
32317
32285
  navigationInterceptor.executeWithBypass(() => {
@@ -32339,7 +32307,7 @@ class QdPageCommitActionExecutor {
32339
32307
  });
32340
32308
  };
32341
32309
  if (result$) {
32342
- result$.pipe(take(1), takeUntil(destroyed$)).subscribe({
32310
+ result$.pipe(take(1), takeUntilDestroyed(destroyRef)).subscribe({
32343
32311
  next: ok => {
32344
32312
  if (ok)
32345
32313
  applySuccess();
@@ -32400,6 +32368,7 @@ class QdPageCommitActionExecutor {
32400
32368
  * - No structural information is stored in the snapshot, only data.
32401
32369
  */
32402
32370
  class QdFormGroupManagerService {
32371
+ _destroyRef = inject(DestroyRef);
32403
32372
  _formGroups = new Map();
32404
32373
  _formGroupsSnapshot = new Map();
32405
32374
  _knownControlInstances = new Map();
@@ -32584,7 +32553,9 @@ class QdFormGroupManagerService {
32584
32553
  this._frameworkRebuildSub?.unsubscribe();
32585
32554
  const valueStreams = Array.from(this._formGroups.values()).map(fg => fg.valueChanges);
32586
32555
  if (valueStreams.length)
32587
- this._frameworkRebuildSub = merge(...valueStreams).subscribe(() => this.adoptFrameworkRebuild());
32556
+ this._frameworkRebuildSub = merge(...valueStreams)
32557
+ .pipe(takeUntilDestroyed(this._destroyRef))
32558
+ .subscribe(() => this.adoptFrameworkRebuild());
32588
32559
  this.adoptFrameworkRebuild();
32589
32560
  }
32590
32561
  /**
@@ -32823,7 +32794,7 @@ class QdPageNavigationInterceptorService {
32823
32794
  router = inject(Router);
32824
32795
  formGroupManager = inject(QdFormGroupManagerService);
32825
32796
  confirmationDialog = inject(QdConfirmationDialogOpenerService);
32826
- _destroy$ = new Subject();
32797
+ _destroyRef = inject(DestroyRef);
32827
32798
  _deactivate$ = new Subject();
32828
32799
  /**
32829
32800
  * Guards the re-dispatched navigation issued after the user confirms discard. While the dialog
@@ -32840,8 +32811,6 @@ class QdPageNavigationInterceptorService {
32840
32811
  _confirmationMessage;
32841
32812
  ngOnDestroy() {
32842
32813
  this._confirmedTargetUrl = undefined;
32843
- this._destroy$.next();
32844
- this._destroy$.complete();
32845
32814
  this._deactivate$.complete();
32846
32815
  }
32847
32816
  /**
@@ -32878,7 +32847,7 @@ class QdPageNavigationInterceptorService {
32878
32847
  }
32879
32848
  listenForUnsavedNavigationAttempts() {
32880
32849
  this.router.events
32881
- .pipe(filter$1((event) => event instanceof NavigationStart), filter$1(() => !this._bypassInterception), filter$1(event => this.shouldIntercept(event)), concatMap$1(event => this.checkForPendingChanges(event)), filter$1(({ hasChanges }) => hasChanges), exhaustMap(({ event }) => this.cancelNavigationAndConfirm(event)), filter$1(({ confirmed }) => confirmed), takeUntil$1(this._deactivate$), takeUntil$1(this._destroy$))
32850
+ .pipe(filter$1((event) => event instanceof NavigationStart), filter$1(() => !this._bypassInterception), filter$1(event => this.shouldIntercept(event)), concatMap$1(event => this.checkForPendingChanges(event)), filter$1(({ hasChanges }) => hasChanges), exhaustMap(({ event }) => this.cancelNavigationAndConfirm(event)), filter$1(({ confirmed }) => confirmed), takeUntil$1(this._deactivate$), takeUntilDestroyed(this._destroyRef))
32882
32851
  .subscribe(({ targetUrl }) => this.navigateToConfirmedTarget(targetUrl));
32883
32852
  }
32884
32853
  shouldIntercept(event) {
@@ -32978,6 +32947,7 @@ class QdPageObjectHeaderComponent {
32978
32947
  resolverTriggerService = inject(QdResolverTriggerService);
32979
32948
  injector = inject(Injector);
32980
32949
  pageStoreService = inject(QdPageStoreService);
32950
+ _destroyRef = inject(DestroyRef);
32981
32951
  _pageObjectDataSubject = new BehaviorSubject({});
32982
32952
  _isLoadingSubject = new BehaviorSubject(false);
32983
32953
  _customActionsSubject = new BehaviorSubject({ actions: [] });
@@ -32985,7 +32955,6 @@ class QdPageObjectHeaderComponent {
32985
32955
  _metadataSub;
32986
32956
  _pendingMetadata = {};
32987
32957
  _metadataStreamTypeWarned = false;
32988
- _destroyed$ = new Subject();
32989
32958
  _availableContexts = 0;
32990
32959
  pageObjectData$ = this._pageObjectDataSubject.asObservable();
32991
32960
  isLoading$ = this._isLoadingSubject.asObservable().pipe(debounceTime(400));
@@ -33025,7 +32994,7 @@ class QdPageObjectHeaderComponent {
33025
32994
  return undefined;
33026
32995
  }
33027
32996
  get isInspectAndViewMode$() {
33028
- return this.pageStoreService.isViewonly$.pipe(takeUntil(this._destroyed$), map(isView => this.config.pageType === 'inspect' && isView));
32997
+ return this.pageStoreService.isViewonly$.pipe(takeUntilDestroyed(this._destroyRef), map(isView => this.config.pageType === 'inspect' && isView));
33029
32998
  }
33030
32999
  get isCreate() {
33031
33000
  return this.config.pageType === 'create';
@@ -33086,8 +33055,6 @@ class QdPageObjectHeaderComponent {
33086
33055
  }
33087
33056
  ngOnDestroy() {
33088
33057
  this.pageStoreService.toggleViewonly(false);
33089
- this._destroyed$.next();
33090
- this._destroyed$.complete();
33091
33058
  }
33092
33059
  updateMetadata(metadata) {
33093
33060
  this._pendingMetadata = { ...this._pendingMetadata, ...metadata };
@@ -33126,7 +33093,7 @@ class QdPageObjectHeaderComponent {
33126
33093
  QdPageCommitActionExecutor.execute(saveAction, this.formGroupManagerService.getAllValues(), {
33127
33094
  formGroupManager: this.formGroupManagerService,
33128
33095
  navigationInterceptor: this.navigationInterceptor,
33129
- destroyed$: this._destroyed$,
33096
+ destroyRef: this._destroyRef,
33130
33097
  onAfterSnapshot: () => {
33131
33098
  this.formGroupManagerService.cancelPendingAsyncValidation();
33132
33099
  this.pageStoreService.toggleViewonly(true);
@@ -33157,10 +33124,10 @@ class QdPageObjectHeaderComponent {
33157
33124
  setupResolverTrigger(resolver) {
33158
33125
  this.resolverTriggerService
33159
33126
  .shouldTriggerResolver(resolver.config?.triggerOn ?? 'pathParamsChange')
33160
- .pipe(takeUntil(this._destroyed$), filter(shouldTrigger => shouldTrigger), tap(() => this._isLoadingSubject.next(true)), switchMap$1(() => resolver.resolve()), tap(objectData => {
33127
+ .pipe(filter(shouldTrigger => shouldTrigger), tap(() => this._isLoadingSubject.next(true)), switchMap$1(() => resolver.resolve()), tap(objectData => {
33161
33128
  this._pageObjectDataSubject.next({ ...objectData, ...this._pendingMetadata });
33162
33129
  this._pendingMetadata = {};
33163
- }), tap(() => this._isLoadingSubject.next(false)), tap(() => this.formGroupManagerService.updateSavedSnapshotFromCurrentValues()))
33130
+ }), tap(() => this._isLoadingSubject.next(false)), tap(() => this.formGroupManagerService.updateSavedSnapshotFromCurrentValues()), takeUntilDestroyed(this._destroyRef))
33164
33131
  .subscribe();
33165
33132
  }
33166
33133
  initContexts() {
@@ -33177,7 +33144,7 @@ class QdPageObjectHeaderComponent {
33177
33144
  selection: selection?.value ?? []
33178
33145
  }))));
33179
33146
  this.contexts$
33180
- .pipe(takeUntil(this._destroyed$), tap(contexts => (this._availableContexts = contexts.length)))
33147
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(contexts => (this._availableContexts = contexts.length)))
33181
33148
  .subscribe();
33182
33149
  }
33183
33150
  updateCustomActions() {
@@ -33197,7 +33164,9 @@ class QdPageObjectHeaderComponent {
33197
33164
  if (!metadata$)
33198
33165
  return;
33199
33166
  this.warnOnNonReplayMetadataStream(metadata$);
33200
- this._metadataSub = metadata$.pipe(takeUntil(this._destroyed$)).subscribe(partial => this.updateMetadata(partial));
33167
+ this._metadataSub = metadata$
33168
+ .pipe(takeUntilDestroyed(this._destroyRef))
33169
+ .subscribe(partial => this.updateMetadata(partial));
33201
33170
  }
33202
33171
  warnOnNonReplayMetadataStream(metadata$) {
33203
33172
  if (!isDevMode() || this._metadataStreamTypeWarned)
@@ -33214,7 +33183,7 @@ class QdPageObjectHeaderComponent {
33214
33183
  subscribeToViewOnlyMode() {
33215
33184
  this._customActionsSub?.unsubscribe();
33216
33185
  this._customActionsSub = this.pageStoreService.isViewonly$
33217
- .pipe(takeUntil(this._destroyed$))
33186
+ .pipe(takeUntilDestroyed(this._destroyRef))
33218
33187
  .subscribe(isViewonly => {
33219
33188
  const mode = isViewonly ? 'view' : 'edit';
33220
33189
  const config = this.config.pageTypeConfig;
@@ -33238,7 +33207,7 @@ class QdPageObjectHeaderComponent {
33238
33207
  const cancelConfig = this.config.pageTypeConfig?.cancel;
33239
33208
  this.confirmationDialogService
33240
33209
  .showDiscardConfirmDialog(cancelConfig?.confirmationMessage, this.testId + '-cancel-confirmation')
33241
- .pipe(takeUntil(this._destroyed$))
33210
+ .pipe(takeUntilDestroyed(this._destroyRef))
33242
33211
  .subscribe(confirmed => {
33243
33212
  if (confirmed) {
33244
33213
  cancelConfig?.handler?.();
@@ -33449,6 +33418,7 @@ class QdPageStepperComponent extends CdkStepper {
33449
33418
  router = inject(Router);
33450
33419
  dialog = inject(QdDialogService);
33451
33420
  pageService = inject(QdPageStoreService);
33421
+ _destroyRef = inject(DestroyRef);
33452
33422
  /**
33453
33423
  * Configuration of QdPageStepperComponent.
33454
33424
  *
@@ -33467,7 +33437,6 @@ class QdPageStepperComponent extends CdkStepper {
33467
33437
  steps = new QueryList();
33468
33438
  selectedStepValid$;
33469
33439
  allStepsValid$;
33470
- _destroyed$ = new Subject();
33471
33440
  isGoingToNextStep = false;
33472
33441
  get hasPageFooter() {
33473
33442
  return !!this.footerService;
@@ -33484,7 +33453,9 @@ class QdPageStepperComponent extends CdkStepper {
33484
33453
  throw new Error('Quadrel Framework | QdPageStepper - When using <qd-page-stepper> inside <qd-page>, don\'t use the "submit" and "cancel" attributes. Instead, use the QdPageConfig.');
33485
33454
  }
33486
33455
  if (this.footerService) {
33487
- this.selectedIndexChange.pipe(takeUntil(this._destroyed$)).subscribe(() => this.updateFooterActionsVisibility());
33456
+ this.selectedIndexChange
33457
+ .pipe(takeUntilDestroyed(this._destroyRef))
33458
+ .subscribe(() => this.updateFooterActionsVisibility());
33488
33459
  }
33489
33460
  this.selectedStepValid$ = this.isSelectedStepValid$();
33490
33461
  this.allStepsValid$ = this.areAllStepsValid$();
@@ -33502,12 +33473,7 @@ class QdPageStepperComponent extends CdkStepper {
33502
33473
  this.updateFooterActionsVisibility();
33503
33474
  }
33504
33475
  // Mark component for change detection whenever the content children query changes
33505
- this.steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => this._stateChanged());
33506
- }
33507
- ngOnDestroy() {
33508
- super.ngOnDestroy();
33509
- this._destroyed$.next(null);
33510
- this._destroyed$.complete();
33476
+ this.steps.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this._stateChanged());
33511
33477
  }
33512
33478
  handleClickHeader(step, clickedIndex) {
33513
33479
  if (this.selectedIndex === clickedIndex)
@@ -33572,7 +33538,7 @@ class QdPageStepperComponent extends CdkStepper {
33572
33538
  dialogSize: QdDialogSize.Small,
33573
33539
  title: { i18n: 'i18n.qd.stepper.cancel.dialog.title' }
33574
33540
  })
33575
- .closed.pipe(takeUntil(this._destroyed))
33541
+ .closed.pipe(takeUntilDestroyed(this._destroyRef))
33576
33542
  .subscribe(confirmed => {
33577
33543
  if (confirmed) {
33578
33544
  const handler = this.pageService.getConfig()?.pageTypeConfig?.cancel?.handler ||
@@ -33680,10 +33646,10 @@ class QdPageStepperComponent extends CdkStepper {
33680
33646
  }
33681
33647
  updateFooterActionsDisabledState() {
33682
33648
  this.isSelectedStepValid$()
33683
- .pipe(takeUntil(this._destroyed$))
33649
+ .pipe(takeUntilDestroyed(this._destroyRef))
33684
33650
  .subscribe(isValid => this.footerService.updateActions([{ actionKey: 'next', partialAction: { isDisabled: !isValid } }]));
33685
33651
  this.areAllStepsValid$()
33686
- .pipe(takeUntil(this._destroyed$))
33652
+ .pipe(takeUntilDestroyed(this._destroyRef))
33687
33653
  .subscribe(isValid => this.footerService.updateActions([{ actionKey: 'submit', partialAction: { isDisabled: !isValid } }]));
33688
33654
  }
33689
33655
  blockCdkInput(inputName) {
@@ -34265,7 +34231,7 @@ class QdPageTabsComponent {
34265
34231
  pageStoreService = inject(QdPageStoreService);
34266
34232
  routerConnector = inject(QdPageTabsRouterConnectorService);
34267
34233
  _changeDetectorRef = inject(ChangeDetectorRef);
34268
- destroyRef = inject(DestroyRef);
34234
+ _destroyRef = inject(DestroyRef);
34269
34235
  static _idCounter = 0;
34270
34236
  _id = QdPageTabsComponent._idCounter++;
34271
34237
  get hasPageFooter() {
@@ -34322,7 +34288,7 @@ class QdPageTabsComponent {
34322
34288
  }
34323
34289
  ngOnInit() {
34324
34290
  this.linear = false;
34325
- this.pageStoreService.isViewonly$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(v => {
34291
+ this.pageStoreService.isViewonly$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(v => {
34326
34292
  this._viewonly = v;
34327
34293
  this._stateChanged();
34328
34294
  });
@@ -34333,7 +34299,7 @@ class QdPageTabsComponent {
34333
34299
  .forEach(inputName => this.blockCdkInput(inputName));
34334
34300
  }
34335
34301
  ngAfterContentInit() {
34336
- this._tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this._stateChanged());
34302
+ this._tabs.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this._stateChanged());
34337
34303
  }
34338
34304
  ngAfterViewInit() {
34339
34305
  setTimeout(() => {
@@ -34385,7 +34351,7 @@ class QdPageTabsComponent {
34385
34351
  this.selectFirstNotDisabledTab();
34386
34352
  }
34387
34353
  configureBookmarkableTabs() {
34388
- this.routerConnector.connectTabsWithRouter(this).pipe(takeUntilDestroyed(this.destroyRef)).subscribe();
34354
+ this.routerConnector.connectTabsWithRouter(this).pipe(takeUntilDestroyed(this._destroyRef)).subscribe();
34389
34355
  }
34390
34356
  isTabSelectable(index) {
34391
34357
  const tab = this._tabs.get(index);
@@ -34435,15 +34401,11 @@ class QdPageSubmitActionService {
34435
34401
  formGroupManagerService = inject(QdFormGroupManagerService);
34436
34402
  navigationInterceptor = inject(QdPageNavigationInterceptorService);
34437
34403
  injector = inject(Injector);
34404
+ _destroyRef = inject(DestroyRef);
34438
34405
  _labelI18n = 'i18n.qd.page.footer.submit';
34439
34406
  _submitAction;
34440
34407
  _isVisible = true;
34441
- _destroyed$ = new Subject();
34442
34408
  _cancelTrackFormValidity$ = new Subject();
34443
- ngOnDestroy() {
34444
- this._destroyed$.next(null);
34445
- this._destroyed$.complete();
34446
- }
34447
34409
  setSubmitActionForInspect(pageTypeConfig, isVisible) {
34448
34410
  if (!pageTypeConfig?.submit)
34449
34411
  return;
@@ -34478,7 +34440,7 @@ class QdPageSubmitActionService {
34478
34440
  QdPageCommitActionExecutor.execute(action, values, {
34479
34441
  formGroupManager: this.formGroupManagerService,
34480
34442
  navigationInterceptor: this.navigationInterceptor,
34481
- destroyed$: this._destroyed$,
34443
+ destroyRef: this._destroyRef,
34482
34444
  scheduleFrameworkRebuildStop: () => afterNextRender(() => this.formGroupManagerService.stopAdoptingFrameworkRebuild(), { injector: this.injector })
34483
34445
  });
34484
34446
  }
@@ -34486,7 +34448,7 @@ class QdPageSubmitActionService {
34486
34448
  this._cancelTrackFormValidity$.next();
34487
34449
  this.formGroupManagerService
34488
34450
  .$areFormGroupsValid()
34489
- .pipe(takeUntil(this._cancelTrackFormValidity$), takeUntil(this._destroyed$), distinctUntilChanged())
34451
+ .pipe(takeUntil(this._cancelTrackFormValidity$), takeUntilDestroyed(this._destroyRef), distinctUntilChanged())
34490
34452
  .subscribe(isValid => this.updateSubmitButtonState(isValid));
34491
34453
  }
34492
34454
  updateSubmitButtonState(isValid) {
@@ -34974,6 +34936,7 @@ class QdPageComponent {
34974
34936
  navigationInterceptor = inject(QdPageNavigationInterceptorService);
34975
34937
  injector = inject(Injector);
34976
34938
  confirmationDialogService = inject(QdConfirmationDialogOpenerService);
34939
+ _destroyRef = inject(DestroyRef);
34977
34940
  /**
34978
34941
  * This property defines the configuration for the QdPage component, including the page type,
34979
34942
  * title, and specific configurations for each type of page.
@@ -34998,7 +34961,6 @@ class QdPageComponent {
34998
34961
  isFooterVisible;
34999
34962
  projectionGuardMessage = 'Quadrel Framework | QdPage - This content is not supported. Please use the [qdSectionAdapter] directive for custom content projection.';
35000
34963
  _isInitialized = false;
35001
- _destroyed$ = new Subject();
35002
34964
  _cancelSubmitValidation$ = new Subject();
35003
34965
  get isControlPanelVisible() {
35004
34966
  return this.controlPanel !== undefined && this.controlPanel.config?.isHidden !== true;
@@ -35014,7 +34976,7 @@ class QdPageComponent {
35014
34976
  }
35015
34977
  constructor() {
35016
34978
  this.footerHasContent$ = this.footerService.footerHasContent$;
35017
- this.footerHasContent$.pipe(takeUntil(this._destroyed$)).subscribe(isVisible => {
34979
+ this.footerHasContent$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(isVisible => {
35018
34980
  this.isFooterVisible = isVisible;
35019
34981
  this.bottomOffset$?.next(isVisible ? SAFE_BOTTOM_OFFSET_PX : 0);
35020
34982
  });
@@ -35047,7 +35009,7 @@ class QdPageComponent {
35047
35009
  this.initSaveDraftFooterAction(this.config.pageTypeConfig.saveDraft);
35048
35010
  if (this.config.pageType === 'inspect')
35049
35011
  this.pageStoreService.isViewonly$
35050
- .pipe(takeUntil(this._destroyed$))
35012
+ .pipe(takeUntilDestroyed(this._destroyRef))
35051
35013
  .subscribe(isViewonly => this.updateInspectPageOperationMode(this.config.pageTypeConfig, isViewonly ? 'view' : 'edit'));
35052
35014
  this.setupPageDialogCloseContract();
35053
35015
  this._isInitialized = true;
@@ -35055,8 +35017,6 @@ class QdPageComponent {
35055
35017
  ngOnDestroy() {
35056
35018
  this.dialogRef && this.dialog.clearPageDialogCanClose(this.dialogRef);
35057
35019
  this.bottomOffset$?.next(0);
35058
- this._destroyed$.next();
35059
- this._destroyed$.complete();
35060
35020
  }
35061
35021
  discardUnsavedChanges() {
35062
35022
  this.formGroupManagerService.restoreFormGroupsFromSnapshot();
@@ -35089,7 +35049,7 @@ class QdPageComponent {
35089
35049
  handleCancelActionWithFormChanges() {
35090
35050
  this.formGroupManagerService
35091
35051
  .$hasValuesChanged()
35092
- .pipe(takeUntil(this._destroyed$))
35052
+ .pipe(takeUntilDestroyed(this._destroyRef))
35093
35053
  .subscribe(hasChanged => {
35094
35054
  this.footerService.updateActions([
35095
35055
  {
@@ -35143,7 +35103,7 @@ class QdPageComponent {
35143
35103
  QdPageCommitActionExecutor.execute(action, values, {
35144
35104
  formGroupManager: this.formGroupManagerService,
35145
35105
  navigationInterceptor: this.navigationInterceptor,
35146
- destroyed$: this._destroyed$,
35106
+ destroyRef: this._destroyRef,
35147
35107
  scheduleFrameworkRebuildStop: () => afterNextRender(() => this.formGroupManagerService.stopAdoptingFrameworkRebuild(), {
35148
35108
  injector: this.injector
35149
35109
  })
@@ -35154,7 +35114,7 @@ class QdPageComponent {
35154
35114
  const cancelConfig = this.config.pageTypeConfig?.cancel;
35155
35115
  this.confirmationDialogService
35156
35116
  .showDiscardConfirmDialog(cancelConfig?.confirmationMessage, this.testId + '-cancel-confirmation')
35157
- .pipe(filter$1(result => result), takeUntil(this._destroyed$))
35117
+ .pipe(filter$1(result => result), takeUntilDestroyed(this._destroyRef))
35158
35118
  .subscribe(() => {
35159
35119
  this.formGroupManagerService.restoreFormGroupsFromSnapshot();
35160
35120
  cancelConfig?.handler?.();
@@ -35164,7 +35124,7 @@ class QdPageComponent {
35164
35124
  this._cancelSubmitValidation$.next();
35165
35125
  this.formGroupManagerService
35166
35126
  .$areFormGroupsValid()
35167
- .pipe(takeUntil(this._cancelSubmitValidation$), takeUntil(this._destroyed$), tap(isValid => {
35127
+ .pipe(takeUntil(this._cancelSubmitValidation$), takeUntilDestroyed(this._destroyRef), tap(isValid => {
35168
35128
  const submitDisabledInfoText = this.config.pageTypeConfig?.submit?.disabledInfo;
35169
35129
  this.footerService.updateActions([
35170
35130
  {
@@ -35642,6 +35602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
35642
35602
  */
35643
35603
  class QdPanelSectionComponent {
35644
35604
  actionService = inject(QdPanelSectionActionService);
35605
+ _destroyRef = inject(DestroyRef);
35645
35606
  /**
35646
35607
  * The configuration of the panel section.
35647
35608
  */
@@ -35656,13 +35617,9 @@ class QdPanelSectionComponent {
35656
35617
  statusPairsList;
35657
35618
  tableList;
35658
35619
  paragraphList;
35659
- _actionOutputSubscription;
35660
35620
  ngOnInit() {
35661
35621
  this.subscribeForActionOutput();
35662
35622
  }
35663
- ngOnDestroy() {
35664
- this._actionOutputSubscription.unsubscribe();
35665
- }
35666
35623
  hasActions() {
35667
35624
  if (!this.config.actions)
35668
35625
  return false;
@@ -35675,7 +35632,7 @@ class QdPanelSectionComponent {
35675
35632
  this.paragraphList.length > 0);
35676
35633
  }
35677
35634
  subscribeForActionOutput() {
35678
- this._actionOutputSubscription = this.actionService.action$.subscribe((type) => {
35635
+ this.actionService.action$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((type) => {
35679
35636
  this.actionOutput.emit(type);
35680
35637
  });
35681
35638
  }
@@ -36177,7 +36134,7 @@ class QdShellServiceNavigationComponent {
36177
36134
  return this.config.pamsAppId;
36178
36135
  }
36179
36136
  _config;
36180
- _destroyed$ = new Subject();
36137
+ _destroyRef = inject(DestroyRef);
36181
36138
  _attributesHaveBeenSet$ = new ReplaySubject(1);
36182
36139
  localeService = inject(QdLocaleService);
36183
36140
  ngOnInit() {
@@ -36199,7 +36156,7 @@ class QdShellServiceNavigationComponent {
36199
36156
  setLanguageFromUrlAfterNavigation() {
36200
36157
  this.languageFromUrlService
36201
36158
  .getLanguageFromUrl()
36202
- .pipe(delayWhen(() => this._attributesHaveBeenSet$), filter(languageFromUrl => this.languageList.includes(languageFromUrl)), takeUntil$1(this._destroyed$))
36159
+ .pipe(delayWhen(() => this._attributesHaveBeenSet$), filter(languageFromUrl => this.languageList.includes(languageFromUrl)), takeUntilDestroyed(this._destroyRef))
36203
36160
  .subscribe(languageFromUrl => {
36204
36161
  this.serviceNavigationService.config.defaultLanguage = languageFromUrl;
36205
36162
  this.translateService.setDefaultLang(languageFromUrl);
@@ -36218,9 +36175,6 @@ class QdShellServiceNavigationComponent {
36218
36175
  this.passConfig(changes['config'].currentValue);
36219
36176
  }
36220
36177
  }
36221
- ngOnDestroy() {
36222
- this._destroyed$.complete();
36223
- }
36224
36178
  handleLanguageChange($event) {
36225
36179
  this.localeService.setServiceNavigationLanguage($event.detail);
36226
36180
  this.useLanguage($event.detail);
@@ -36240,7 +36194,7 @@ class QdShellServiceNavigationComponent {
36240
36194
  setAttributesForServiceNavigation() {
36241
36195
  this.serviceNavigationService
36242
36196
  .getMappedAttributes$()
36243
- .pipe(takeUntil$1(this._destroyed$), tap(attributes => {
36197
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(attributes => {
36244
36198
  if (!attributes)
36245
36199
  return;
36246
36200
  Object.keys(attributes).forEach(attribute => {
@@ -36488,6 +36442,7 @@ class QdShellHeaderComponent {
36488
36442
  shellLeftService = inject(QdShellLeftService);
36489
36443
  shellRightService = inject(QdShellRightService);
36490
36444
  breakpointService = inject(QdBreakpointService);
36445
+ _destroyRef = inject(DestroyRef);
36491
36446
  /**
36492
36447
  * @description The configuration of the shell.
36493
36448
  */
@@ -36538,8 +36493,6 @@ class QdShellHeaderComponent {
36538
36493
  _hub = inject(QdRouterQueryParamHubService);
36539
36494
  _restoresAddress = false;
36540
36495
  _routeParams;
36541
- _routeParamsSubscription;
36542
- _breakpointSubscription;
36543
36496
  constructor() {
36544
36497
  const navigationService = this.navigationService;
36545
36498
  const shellLeftService = this.shellLeftService;
@@ -36550,10 +36503,14 @@ class QdShellHeaderComponent {
36550
36503
  previousHref = previousHref(routeComponentInstance);
36551
36504
  return isObservable(previousHref) ? previousHref.pipe(take(1)) : of(previousHref);
36552
36505
  }), tap(previousHref => (this._previousHref = previousHref)), map(previousHref => previousHref !== undefined));
36553
- this._routeParamsSubscription = navigationService
36506
+ navigationService
36554
36507
  .getRouteParams$()
36508
+ .pipe(takeUntilDestroyed(this._destroyRef))
36555
36509
  .subscribe(routeParams => (this._routeParams = routeParams));
36556
- this._breakpointSubscription = this.breakpointService.getMatchingBreakpoint().subscribe(breakpoint => {
36510
+ this.breakpointService
36511
+ .getMatchingBreakpoint()
36512
+ .pipe(takeUntilDestroyed(this._destroyRef))
36513
+ .subscribe(breakpoint => {
36557
36514
  this.isServiceNavigationOpened = breakpoint !== 'xs';
36558
36515
  });
36559
36516
  this.logoIconDisplayed$ = this.backLinkDisplayed$.pipe(map(backLinkDisplayed => !backLinkDisplayed));
@@ -36617,9 +36574,6 @@ class QdShellHeaderComponent {
36617
36574
  toggleServiceNavigation() {
36618
36575
  this.isServiceNavigationOpened = !this.isServiceNavigationOpened;
36619
36576
  }
36620
- ngOnDestroy() {
36621
- this._routeParamsSubscription.unsubscribe();
36622
- }
36623
36577
  async = async;
36624
36578
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdShellHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36625
36579
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdShellHeaderComponent, isStandalone: false, selector: "[qd-shell-header]", inputs: { config: "config", isMinimized: "isMinimized", isCommentsUsed: "isCommentsUsed", hasComments: "hasComments" }, outputs: { menuIconChange: "menuIconChange" }, host: { properties: { "class.minimized": "this.minimized", "class.sticky": "this.sticky", "class.expanded": "this.expanded" }, classAttribute: "qd-shell-header" }, ngImport: i0, template: "<qd-shell-header-banner cdkDrag cdkDragLockAxis=\"x\" cdkDragBoundary=\"header\"></qd-shell-header-banner>\n\n@if (hasNavigation$ | async) {\n<qd-icon\n [icon]=\"(isNavigationPinned$ | async) ? 'timesLarge' : 'menu'\"\n class=\"toggle-navigation\"\n data-test-id=\"navigation-toggle\"\n (click)=\"togglePinnedNavigation()\"\n></qd-icon>\n} @if (backLinkDisplayed$ | async) {\n<button class=\"back-link\" (click)=\"handleBackClick()\" tabindex=\"0\">\n <qd-icon class=\"back-link-icon\" icon=\"arrowLeft\"></qd-icon>\n</button>\n} @if (logoIconDisplayed$ | async) {\n<qd-icon class=\"logo-icon\" [icon]=\"isMinimized ? 'coatCh' : 'logo'\"></qd-icon>\n} @if (config?.illustration) {\n<span class=\"illustration\" [class.minimized]=\"isMinimized\">\n <img [src]=\"config.illustration.url\" />\n</span>\n} @if (config.title) {\n<span class=\"title\">\n {{ config.title.i18n | translate }}\n</span>\n} @if (config.hasSearch) {\n<qd-shell-header-search></qd-shell-header-search>\n} @if (config.toolbar) {\n<qd-shell-toolbar [config]=\"config.toolbar\"></qd-shell-toolbar>\n} @if (!config.serviceNavigation?.isDisabled && config.serviceNavigation) {\n<qd-icon\n [icon]=\"isServiceNavigationOpened ? 'timesLarge' : 'menu'\"\n data-test-id=\"service-navigation-toggle\"\n [ngClass]=\"{\n 'toggle-service-navigation': true,\n expanded: true\n }\"\n (click)=\"toggleServiceNavigation()\"\n></qd-icon>\n} @if (!config.serviceNavigation?.isDisabled && config.serviceNavigation) {\n<qd-shell-service-navigation\n [config]=\"config.serviceNavigation\"\n [ngClass]=\"{ expanded: !isServiceNavigationOpened }\"\n></qd-shell-service-navigation>\n} @if (isCommentsUsed) {\n<qd-icon\n icon=\"chat\"\n data-test-id=\"comments-toggle\"\n [ngClass]=\"{\n 'toggle-comments': true,\n 'has-comments': hasComments,\n 'is-opened': isCommentsOpened$ | async\n }\"\n (click)=\"toggleComments()\"\n></qd-icon>\n} @if (hasNotificationsToggle$ | async) {\n<qd-icon\n icon=\"notification\"\n data-test-id=\"notification-toggle\"\n [ngClass]=\"{\n 'toggle-notification': true,\n 'has-notifications': hasNotifications$ | async,\n 'is-opened': isNotificationsOpened$ | async\n }\"\n (click)=\"toggleNotifications()\"\n></qd-icon>\n}\n", styles: [":host{display:flex;flex-wrap:wrap;align-content:center;align-items:center;align-self:start;justify-content:space-between;padding:.5rem 1rem .5rem 0;border-bottom:.3125rem solid rgb(220,0,24);background-color:#fff;grid-area:header}:host.sticky{position:sticky;z-index:998;top:0}@media(max-width:599.98px){:host{height:3.75rem;align-content:flex-start}:host.expanded{height:auto}}@media(min-width:960px){:host{height:5.9375rem;padding:0 .75rem 0 0}:host.minimized{height:4.0625rem}}:host .toggle-navigation{padding:1.9375rem .625rem 1.9375rem .8125rem;margin-right:0;cursor:pointer;font-size:1.5rem}@media(min-width:960px){:host .toggle-navigation{border-right:.0625rem solid rgb(213,213,213)}}:host.minimized .toggle-navigation{padding:1rem .625rem 1rem .8125rem}@media(min-width:960px){:host .logo-icon{border-right:.0625rem solid rgb(213,213,213)}}:host .logo-icon.qd-icon-logo{padding-right:1.5rem;margin:1rem 1.5rem 1rem 0}@media(min-width:960px){:host .logo-icon.qd-icon-logo{padding:.9375rem .8125rem;margin-right:1.5rem}}:host .logo-icon.qd-icon-logo svg{overflow:visible}:host .logo-icon.qd-icon-ch-logo{margin-left:1rem;font-size:2rem}@media(min-width:960px){:host .logo-icon.qd-icon-ch-logo{padding:.75rem .8125rem;margin-right:1.5rem;margin-left:0}}:host .logo-icon:not(.qd-icon-logo) svg{display:none}:host .back-link{padding:0;border-right:.0625rem solid rgb(213,213,213);background-color:transparent;color:#979797;font-size:1.625rem}@media(min-width:960px){:host .back-link{padding:.875rem .8125rem;margin-right:1.5rem}}:host .back-link-icon{width:2rem;opacity:.8}:host .back-link:hover{color:#757575;opacity:1}:host .back-link:hover .back-link-icon{opacity:1}:host .illustration{width:4rem;height:4rem;margin-right:.625rem}:host .illustration img{max-width:100%}:host .illustration.minimized{width:2rem;height:2rem;margin-right:.3125rem}:host .title{overflow:hidden;flex-grow:1;font-size:1.25rem;font-weight:500;text-align:center;text-overflow:ellipsis;white-space:nowrap}@media(min-width:960px){:host .title{text-align:start}}:host .toggle-notification,:host .toggle-comments,:host .toggle-service-navigation{position:relative;margin-left:.625rem;cursor:pointer;font-size:1.25rem}:host .toggle-notification.has-notifications:after,:host .toggle-notification.has-comments:after,:host .toggle-comments.has-notifications:after,:host .toggle-comments.has-comments:after,:host .toggle-service-navigation.has-notifications:after,:host .toggle-service-navigation.has-comments:after{position:absolute;top:.125rem;right:0;display:inline-block;width:.5625rem;height:.5625rem;border:rgb(255,255,255) .125rem solid;border-radius:100%;background-color:red;content:\"\"}:host .toggle-notification.is-opened:before,:host .toggle-comments.is-opened:before,:host .toggle-service-navigation.is-opened:before{position:absolute;z-index:-10;display:block;width:2rem;height:2rem;border-radius:50%;background:#e5e5e5;content:\"\";transform:translate(-.4375rem,-.3125rem)}:host .toggle-notification.expanded,:host .toggle-comments.expanded,:host .toggle-service-navigation.expanded{visibility:collapse}@media(max-width:599.98px){:host .toggle-notification.expanded,:host .toggle-comments.expanded,:host .toggle-service-navigation.expanded{visibility:visible}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "component", type: QdShellServiceNavigationComponent, selector: "qd-shell-service-navigation", inputs: ["config"] }, { kind: "component", type: QdShellHeaderBannerComponent, selector: "qd-shell-header-banner" }, { kind: "component", type: QdShellHeaderSearchComponent, selector: "qd-shell-header-search" }, { kind: "component", type: QdShellToolbarComponent, selector: "qd-shell-toolbar", inputs: ["config"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
@@ -36713,12 +36667,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
36713
36667
  class QdShellNotificationComponent {
36714
36668
  notificationService = inject(QdNotificationsService);
36715
36669
  translateService = inject(TranslateService, { optional: true });
36670
+ _destroyRef = inject(DestroyRef);
36716
36671
  /**
36717
36672
  * Configuration of a notification.
36718
36673
  */
36719
36674
  notification;
36720
36675
  displayedDate;
36721
- _destroyed$ = new Subject();
36722
36676
  _effectiveState = 'critical';
36723
36677
  get typeClassName() {
36724
36678
  return `qd-notification qd-notification-${this.getState()}`;
@@ -36727,7 +36681,9 @@ class QdShellNotificationComponent {
36727
36681
  return !this.notification?.disableClose;
36728
36682
  }
36729
36683
  constructor() {
36730
- this.translateService?.onLangChange.pipe(takeUntil(this._destroyed$)).subscribe((event) => {
36684
+ this.translateService?.onLangChange
36685
+ .pipe(takeUntilDestroyed(this._destroyRef))
36686
+ .subscribe((event) => {
36731
36687
  this.setDisplayedDate(event.lang);
36732
36688
  });
36733
36689
  }
@@ -36755,10 +36711,6 @@ class QdShellNotificationComponent {
36755
36711
  isToday(date) {
36756
36712
  return new Date(date).setHours(0, 0, 0, 0) === new Date().setHours(0, 0, 0, 0);
36757
36713
  }
36758
- ngOnDestroy() {
36759
- this._destroyed$.next();
36760
- this._destroyed$.complete();
36761
- }
36762
36714
  getState() {
36763
36715
  return this._effectiveState;
36764
36716
  }
@@ -36829,6 +36781,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
36829
36781
  class QdShellRightComponent {
36830
36782
  headerMinimizationService = inject(QdShellHeaderMinimizationService);
36831
36783
  navigationService = inject(QdNavigationService);
36784
+ _destroyRef = inject(DestroyRef);
36832
36785
  config;
36833
36786
  get headerMinimized() {
36834
36787
  return this.isHeaderMinimized;
@@ -36838,25 +36791,20 @@ class QdShellRightComponent {
36838
36791
  }
36839
36792
  isHeaderMinimized;
36840
36793
  isHome;
36841
- _destroyed$ = new Subject();
36842
36794
  ngOnInit() {
36843
36795
  this.headerMinimizationService
36844
36796
  .isHeaderMinimized$()
36845
- .pipe(takeUntil(this._destroyed$))
36797
+ .pipe(takeUntilDestroyed(this._destroyRef))
36846
36798
  .subscribe(isHeaderMinimized => {
36847
36799
  this.isHeaderMinimized = isHeaderMinimized;
36848
36800
  });
36849
36801
  this.navigationService
36850
36802
  .isHome$()
36851
- .pipe(takeUntil(this._destroyed$))
36803
+ .pipe(takeUntilDestroyed(this._destroyRef))
36852
36804
  .subscribe(isHome => {
36853
36805
  this.isHome = isHome;
36854
36806
  });
36855
36807
  }
36856
- ngOnDestroy() {
36857
- this._destroyed$.next();
36858
- this._destroyed$.complete();
36859
- }
36860
36808
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdShellRightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36861
36809
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: QdShellRightComponent, isStandalone: false, selector: "[qd-shell-right]", inputs: { config: "config" }, host: { properties: { "class.header-minimized": "this.headerMinimized", "class.has-footer": "this.hasFooter" } }, ngImport: i0, template: "<div class=\"shell-right\">\n <qd-shell-right-toolbar [config]=\"config\"></qd-shell-right-toolbar>\n <div class=\"shell-right-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{position:relative;height:100%}:host .shell-right{position:fixed;z-index:1500;display:flex;overflow:auto;width:18.75rem;height:calc(100% - 5.9375rem);flex-direction:column;border-left:.0625rem solid rgb(213,213,213);background:#fff;transform:translate(-100%)}:host .shell-right-content{padding:1rem}:host:not(.header-minimized).has-footer .shell-right{height:calc(100% - 8.4375rem)}:host.header-minimized:not(.has-footer) .shell-right{height:calc(100% - 4.0625rem)}:host.header-minimized.has-footer .shell-right{height:calc(100% - 6.5625rem)}\n"], dependencies: [{ kind: "component", type: QdShellRightToolbarComponent, selector: "qd-shell-right-toolbar", inputs: ["config"] }] });
36862
36810
  }
@@ -37162,7 +37110,7 @@ class QdShellComponent {
37162
37110
  isMinimized$;
37163
37111
  isHome$;
37164
37112
  _config = DEFAULT_SHELL_CONFIG;
37165
- _destroy$ = new Subject();
37113
+ _destroyRef = inject(DestroyRef);
37166
37114
  get isFaded$() {
37167
37115
  return combineLatest([
37168
37116
  this.isNavigationRolledOver$,
@@ -37193,16 +37141,13 @@ class QdShellComponent {
37193
37141
  }
37194
37142
  closeShellRightIfCommentsDisappear() {
37195
37143
  // e.g. if comments where opened on detail page but are not shown on overview page, close after navigation
37196
- this.commentsComponent.changes.pipe(takeUntil(this._destroy$)).subscribe(async (commentsComponent) => {
37144
+ this.commentsComponent.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(async (commentsComponent) => {
37197
37145
  const shellRightOpen = await firstValueFrom(this.shellRightService.open$);
37198
37146
  if (commentsComponent.length === 0 && this.shellHeaderComponent.isCommentsDisplayed && shellRightOpen) {
37199
37147
  this.shellRightService.toggleOpen();
37200
37148
  }
37201
37149
  });
37202
37150
  }
37203
- ngOnDestroy() {
37204
- this._destroy$.complete();
37205
- }
37206
37151
  handleRouterOutletActivation(routeComponentInstance) {
37207
37152
  this.navigationService.updateRouteComponentInstance(routeComponentInstance);
37208
37153
  }
@@ -37213,10 +37158,10 @@ class QdShellComponent {
37213
37158
  }
37214
37159
  subscribeToSearchService() {
37215
37160
  this.searchService.searchQueryString$
37216
- .pipe(takeUntil(this._destroy$), tap(queryString => this.searchQueryStringOutput.emit(queryString)))
37161
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(queryString => this.searchQueryStringOutput.emit(queryString)))
37217
37162
  .subscribe();
37218
37163
  this.searchService.searchPostBody$
37219
- .pipe(takeUntil(this._destroy$), tap(postBody => this.searchPostBodyOutput.emit(postBody)))
37164
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(postBody => this.searchPostBodyOutput.emit(postBody)))
37220
37165
  .subscribe();
37221
37166
  }
37222
37167
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -37751,7 +37696,6 @@ class QdPageStepComponent extends CdkStep {
37751
37696
  * The stepper only moves on to the next step when this form is valid. Optional steps skip this check.
37752
37697
  */
37753
37698
  stepControl;
37754
- _destroyed$ = new Subject();
37755
37699
  constructor() {
37756
37700
  const stepper = inject(QdPageStepperComponent);
37757
37701
  const stepperOptions = inject(STEPPER_GLOBAL_OPTIONS, { optional: true });
@@ -37768,9 +37712,6 @@ class QdPageStepComponent extends CdkStep {
37768
37712
  .filter(input => changes[input])
37769
37713
  .forEach(input => this.blockCdkInput(input));
37770
37714
  }
37771
- ngOnDestroy() {
37772
- this._destroyed$.complete();
37773
- }
37774
37715
  blockCdkInput(inputName) {
37775
37716
  throw new Error(`Quadrel Framework | QdPageStep - The use of the "${inputName}" attribute is not permitted. Please use QdPageStepConfig instead.`);
37776
37717
  }
@@ -38128,6 +38069,7 @@ class QdQuickEditComponent {
38128
38069
  changeDetectorRef = inject(ChangeDetectorRef);
38129
38070
  controlContainer = inject(ControlContainer, { optional: true, self: true });
38130
38071
  confirmationDialogService = inject(QdConfirmationDialogOpenerService);
38072
+ _destroyRef = inject(DestroyRef);
38131
38073
  /**
38132
38074
  * Configuration of the QuickEdit. The generic type names the columns.
38133
38075
  *
@@ -38196,7 +38138,6 @@ class QdQuickEditComponent {
38196
38138
  viewonly$ = of(false);
38197
38139
  actions$;
38198
38140
  hasVisibleActions$;
38199
- _destroyed$ = new Subject();
38200
38141
  _pageViewonly$;
38201
38142
  get control() {
38202
38143
  return (this.controlContainer?.control ?? this.quickEditFormGroup.get('rows'));
@@ -38248,10 +38189,6 @@ class QdQuickEditComponent {
38248
38189
  this.initActionsStream();
38249
38190
  }
38250
38191
  }
38251
- ngOnDestroy() {
38252
- this._destroyed$.next();
38253
- this._destroyed$.complete();
38254
- }
38255
38192
  /**
38256
38193
  * Whether a secondary action is disabled for one row.
38257
38194
  * Resolves the `isDisabled` of the action, which may be a flag or a function of the row.
@@ -38352,7 +38289,7 @@ class QdQuickEditComponent {
38352
38289
  initCreating() {
38353
38290
  if (this.sectionActionService)
38354
38291
  this.sectionActionService.action$
38355
- .pipe(takeUntil$1(this._destroyed$), filter$1(type => type === 'addNew'))
38292
+ .pipe(takeUntilDestroyed(this._destroyRef), filter$1(type => type === 'addNew'))
38356
38293
  .subscribe(() => this.createRow());
38357
38294
  }
38358
38295
  createFormGroupRow(row) {
@@ -38398,7 +38335,7 @@ class QdQuickEditComponent {
38398
38335
  initManualChangeDetectionForControlReset() {
38399
38336
  if (!this.isFormControl)
38400
38337
  return;
38401
- this.controlContainer.control.valueChanges.pipe(takeUntil$1(this._destroyed$), tap(() => this.changeDetectorRef.detectChanges())).subscribe();
38338
+ this.controlContainer.control.valueChanges.pipe(takeUntilDestroyed(this._destroyRef), tap(() => this.changeDetectorRef.detectChanges())).subscribe();
38402
38339
  }
38403
38340
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdQuickEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
38404
38341
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdQuickEditComponent, isStandalone: false, selector: "qd-quick-edit", inputs: { config: "config", data: "data", testId: ["data-test-id", "testId"] }, outputs: { formGroupChange: "formGroupChange", addNewClicked: "addNewClicked" }, viewQueries: [{ propertyName: "customForDirective", first: true, predicate: QdCustomForDirective, descendants: true }, { propertyName: "focusables", predicate: QdFocusableDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (showStandaloneCreate) {\n<div class=\"editable-actions\">\n <button qdButton qdButtonGhost icon=\"plus\" (click)=\"createRow()\" [data-test-id]=\"testId + '-button-add-new'\">\n {{ config.standaloneCreateLabel?.i18n ?? \"i18n.qd.quick.edit.createButtonLabel\" | translate }}\n </button>\n</div>\n}\n\n<div class=\"table\" [formGroup]=\"control\">\n @if (!config.canAdd || templateData.length > 0 || config.emptyStateView) {\n <div class=\"table-header\">\n <div class=\"table-row\">\n @for (header of visibleColumns; track header) {\n <div class=\"table-cell\">\n {{ header?.i18n | translate }}\n <qd-tooltip-icon [tooltip]=\"header?.tooltip\"></qd-tooltip-icon>\n </div>\n } @if (hasVisibleActions$ | async) {\n <div class=\"table-cell actions-column\">\n <button class=\"menu-button\">\n <qd-icon icon=\"overflowMenuHorizontal\"></qd-icon>\n </button>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"table-body\">\n <div\n class=\"table-row\"\n *qdCustomFor=\"let row of templateData; let rowIndex = index; toggler: togglerDrawing\"\n [formGroupName]=\"rowIndex\"\n [attr.data-test-id]=\"testId + '-row-' + rowIndex\"\n >\n @for (column of visibleColumns; track trackByColumnName($index, column)) {\n <div class=\"table-cell\">\n @if (column.type === 'enum') {\n <qd-dropdown\n [config]=\"{\n filter: column.filter,\n options: column.options,\n placeholder: column.placeholder,\n placeholderPrefix: column.placeholderPrefix,\n viewonly: (viewonly$ | async) === true || !column.isEditable(row, column.name)\n }\"\n [data-test-id]=\"column.name + rowIndex\"\n [dense]=\"true\"\n [formControl]=\"$any(control.controls[rowIndex])?.controls[column.name]\"\n qdFocusable\n class=\"dropdown\"\n >\n </qd-dropdown>\n } @else { @if ($any(control.controls[rowIndex])?.controls[column.name]) {\n <qd-input\n [data-test-id]=\"column.name + rowIndex\"\n [formControlName]=\"column.name\"\n [config]=\"{\n inputType: column.type === 'integer' ? 'number' : 'text',\n viewonly: (viewonly$ | async) === true || !column.isEditable(row, column.name)\n }\"\n qdFocusable\n ></qd-input>\n } }\n </div>\n } @if (hasVisibleActions$ | async) {\n <td class=\"table-cell actions\" [attr.data-test-id]=\"testId + '-cell-inline-actions'\">\n <button\n type=\"button\"\n [qdPopoverOnClick]=\"menu\"\n [qdPopoverCloseStrategy]=\"'onEveryClick'\"\n [qdPopoverStopPropagation]=\"true\"\n class=\"menu-button\"\n data-test=\"secondary-actions-toggler\"\n >\n <qd-icon icon=\"overflowMenuHorizontal\"></qd-icon>\n </button>\n <ng-template #menu>\n @for (secondaryAction of actions$ | async; track secondaryAction) {\n <button\n class=\"secondary-actions\"\n [ngClass]=\"{ disabled: isActionDisabled(secondaryAction, row) }\"\n [attr.disabled]=\"isActionDisabled(secondaryAction, row) || null\"\n (click)=\"handleSecondaryAction(secondaryAction, rowIndex)\"\n >\n {{ secondaryAction.label.i18n | translate }}\n </button>\n } @if (canAdd && (viewonly$ | async) === false) {\n <button class=\"secondary-actions\" (click)=\"removeRow(rowIndex)\">\n {{ \"i18n.qd.quick.edit.removeButtonLabel\" | translate }}\n </button>\n }\n </ng-template>\n </td>\n }\n </div>\n </div>\n @if (config.emptyStateView && !config.emptyStateView.disabled && templateData.length === 0) {\n <div class=\"empty-body\">\n <p>{{ config.emptyStateView.i18n | translate }}</p>\n </div>\n }\n</div>\n", styles: [".table{display:flex;width:100%;flex-direction:column;margin:1.25rem auto;background-color:#fff;font-size:.875rem}.table ::ng-deep .qd-input-input{margin-bottom:0!important}.table-header .table-row{padding-top:.125rem;padding-bottom:.125rem;background-color:#e5e5e5;font-weight:700}.table-header .table-row .actions-column{visibility:hidden}.table-header,.table-body{display:flex;flex-direction:column}.table-row{display:flex;flex-direction:row;padding:.25rem 1rem;border-bottom:.0625rem solid rgb(213,213,213);gap:1rem}.table-row ::ng-deep qd-form-label{display:none!important}.table-row ::ng-deep qd-input{min-width:0;margin-bottom:0!important}.table-body .table-row:hover{background-color:#f5f5f5}.table-cell{display:flex;min-width:0;height:2.3125rem;flex:1;align-items:center;text-align:left}.table-cell:has(.qd-input-error),.table-cell:has(.qd-dropdown-error){height:auto;align-items:flex-start}.table-cell:has(.qd-input-character-counter){height:auto;align-items:flex-start}.table-cell:has(.qd-input-character-counter) ::ng-deep qd-input{position:relative}.table-cell:has(.qd-input-character-counter) ::ng-deep qd-input .qd-input-character-counter{position:absolute;right:.25rem;bottom:.125rem;font-size:.625rem;line-height:1;pointer-events:none}.table-cell.actions,.table-cell.actions-column{min-width:auto;flex:0 0 auto}.table-row:last-child{border-bottom:none}.editable-actions{display:flex;justify-content:flex-end;margin-right:.625rem;gap:.625rem}.menu-button{display:flex;padding:0 .625rem 0 .375rem;background:unset;color:#454545;font-size:2rem;vertical-align:middle}.menu-button:hover,.menu-button:focus{color:#000;outline:0!important}.secondary-actions{display:block;width:100%;min-height:2rem;padding:0 1rem;background:#fff0;font-size:.75rem;text-align:left}.secondary-actions:hover{background-color:#f2f7fa}.secondary-actions.disabled{color:#b4b4b4;cursor:not-allowed}.secondary-actions.disabled:hover{background-color:#fff0}.dropdown{width:100%;min-width:0}.empty-body{padding:1.5rem;background:#fff}.empty-body p{margin:0 0 .5rem}\n"], dependencies: [{ kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonGhostDirective, selector: "button[qdButtonGhost], a[qdButtonGhost]" }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: QdDropdownComponent, selector: "qd-dropdown", inputs: ["value", "id", "formControlName", "config", "data-test-id", "qdPopoverMaxHeight", "dense"], outputs: ["valueChange", "enterClick", "dropdownOpened", "clickHint", "clickReadonly", "clickViewonly", "optionsResolved"] }, { kind: "component", type: QdInputComponent, selector: "qd-input", inputs: ["formControlName", "value", "config", "isError", "data-test-id"], outputs: ["valueChange", "enterClick", "clickClear", "clickHint", "clickReadonly", "clickViewonly", "optionsResolved"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "directive", type: QdPopoverOnClickDirective, selector: "[qdPopoverOnClick]", inputs: ["qdPopoverOnClick", "qdPopoverPlacement", "qdPopoverOffsetX", "qdPopoverOffsetY", "qdPopoverCloseStrategy", "qdPopoverDisabled", "qdPopoverStopPropagation", "qdPopoverBackgroundColor", "qdPopoverMaxHeight", "qdPopoverMinWidth", "qdPopoverMaxWidth", "qdPopoverAutoSize", "qdPopoverEnableKeyControl", "qdPopoverRestoreFocus", "qdPopoverFlipIntoViewport"], outputs: ["opened", "closed"], exportAs: ["qdPopoverOnClick"] }, { kind: "directive", type: QdFocusableDirective, selector: "[qdFocusable]" }, { kind: "component", type: QdTooltipIconComponent, selector: "qd-tooltip-icon", inputs: ["tooltip"] }, { kind: "directive", type: QdCustomForDirective, selector: "[qdCustomFor]", inputs: ["qdCustomForOf", "qdCustomForToggler"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });