@quadrel-enterprise-ui/framework 21.12.9 → 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, 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);
@@ -17964,11 +18020,11 @@ class QdNotificationComponent {
17964
18020
  return !!this.element.nativeElement.closest('qd-snackbar');
17965
18021
  }
17966
18022
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17967
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdNotificationComponent, isStandalone: false, selector: "qd-notification", inputs: { state: "state", notification: "notification" }, host: { properties: { "attr.class": "this.typeClassName" }, classAttribute: "qd-notification" }, usesOnChanges: true, ngImport: i0, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick()\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;gap:.5rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"], dependencies: [{ kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
18023
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdNotificationComponent, isStandalone: false, selector: "qd-notification", inputs: { state: "state", notification: "notification" }, host: { properties: { "attr.class": "this.typeClassName" }, classAttribute: "qd-notification" }, usesOnChanges: true, ngImport: i0, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick()\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"], dependencies: [{ kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
17968
18024
  }
17969
18025
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdNotificationComponent, decorators: [{
17970
18026
  type: Component,
17971
- args: [{ selector: 'qd-notification', host: { class: 'qd-notification' }, standalone: false, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick()\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;gap:.5rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"] }]
18027
+ args: [{ selector: 'qd-notification', host: { class: 'qd-notification' }, standalone: false, template: "@if (closeable) {\n<qd-icon [icon]=\"'timesLarge'\" class=\"closer\" (click)=\"remove()\"></qd-icon>\n}\n<qd-icon [icon]=\"this.getIcon()\" class=\"icon\"></qd-icon>\n\n<ng-content select=\"qd-notification-content\"></ng-content>\n\n@if (notification?.title) {\n<div class=\"title\">{{ notification.title.i18n | translate }}</div>\n}\n<div class=\"message\">\n <span>{{ notification?.i18n | translate }}</span>\n @if (notification?.link) {\n <a class=\"link\" (click)=\"handleLinkClick()\">{{ notification.link.i18n | translate }}</a>\n }\n</div>\n", styles: [":host{position:relative;display:block;width:100%;padding:1rem 2rem .5rem 2.75rem;border-width:.0625rem;border-style:solid;border-left-width:.25rem;margin-bottom:.5rem;background:#fff;box-shadow:0 0 .625rem #979797;font-size:.875rem;line-height:1rem}:host.qd-notification-info{border-color:#069}:host.qd-notification-info .icon,:host.qd-notification-info .title{color:#069}:host.qd-notification-warning{border-color:#ff9b00}:host.qd-notification-warning .icon,:host.qd-notification-warning .title{color:#ff9b00}:host.qd-notification-urgent{border-color:#c70023}:host.qd-notification-urgent .icon,:host.qd-notification-urgent .title{color:#c70023}:host.qd-notification-critical{border-color:#c70023}:host.qd-notification-critical .icon,:host.qd-notification-critical .title{color:#c70023}:host.qd-notification-positive{border-color:#00813a}:host.qd-notification-positive .icon,:host.qd-notification-positive .title{color:#00813a}:host .icon{position:absolute;top:.9375rem;left:1rem;font-size:1.25rem}:host .closer{position:absolute;top:1rem;right:.75rem;color:#171717;cursor:pointer;font-size:.8125rem;font-weight:600}:host .title{margin-bottom:.375rem;font-weight:500}:host .message{margin-bottom:.25rem;white-space:pre-wrap}:host .link{margin-bottom:.375rem;margin-left:.375rem;color:#069;cursor:pointer}:host .link:hover{text-decoration:underline}:host:host-context(qd-snackbar){z-index:9999!important}:host:host-context(qd-snackbar) .link{display:block;margin-top:.375rem;margin-left:0}\n"] }]
17972
18028
  }], propDecorators: { state: [{
17973
18029
  type: Input
17974
18030
  }], notification: [{
@@ -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;
@@ -23149,6 +23164,7 @@ const NAVIGATION_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End']);
23149
23164
  class QdFilterItemSelectCategoryComponent {
23150
23165
  filterService = inject(QdFilterService);
23151
23166
  breakpointService = inject(QdBreakpointService);
23167
+ changeDetectorRef = inject(ChangeDetectorRef);
23152
23168
  isMobile$ = this.breakpointService.isViewportBelow('md');
23153
23169
  filterId;
23154
23170
  categoryIndex;
@@ -23181,6 +23197,13 @@ class QdFilterItemSelectCategoryComponent {
23181
23197
  get activeItemCount() {
23182
23198
  return this.items?.filter(item => item.active).length ?? 0;
23183
23199
  }
23200
+ isInitialFocusOption(itemIndex) {
23201
+ if (this.filter)
23202
+ return false;
23203
+ if (this.activeItemCount > 0)
23204
+ return !!this.items[itemIndex]?.active;
23205
+ return itemIndex === this.items.findIndex(item => !item.hidden);
23206
+ }
23184
23207
  get selectedDropdownEntries() {
23185
23208
  return this.toEntries(this.frozenSelectedKeys);
23186
23209
  }
@@ -23231,6 +23254,7 @@ class QdFilterItemSelectCategoryComponent {
23231
23254
  }
23232
23255
  onActiveOptionChanged() {
23233
23256
  this.updateListboxAriaState();
23257
+ this.changeDetectorRef.markForCheck();
23234
23258
  if (!this.isRadioGroup)
23235
23259
  return;
23236
23260
  this.moveTabStopToActiveOption();
@@ -23467,7 +23491,7 @@ class QdFilterItemSelectCategoryComponent {
23467
23491
  provide: QD_FILTER_LISTBOX_HOST,
23468
23492
  useExisting: forwardRef(() => QdFilterItemSelectCategoryComponent)
23469
23493
  }
23470
- ], viewQueries: [{ propertyName: "popoverDirective", first: true, predicate: QdPopoverOnClickDirective, descendants: true }, { propertyName: "triggerRef", first: true, predicate: ["triggerRef"], descendants: true }], ngImport: i0, template: "@if (showSelectButton$ | async) {\n<div\n #triggerRef\n [class]=\"buttonClassName\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-haspopup]=\"type === 'multiSelect' ? 'listbox' : null\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-controls]=\"triggerAriaControls\"\n [qdPopoverOnClick]=\"filterLayer\"\n [qdPopoverCloseStrategy]=\"'onOutsideClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverEnableKeyControl]=\"true\"\n [qdPopoverRestoreFocus]=\"true\"\n [qdPopoverMaxHeight]=\"maxFlyoutHeight\"\n qdPopoverPlacement=\"bottom-start\"\n [qdPopoverOffsetY]=\"-1\"\n (opened)=\"onLayerOpened()\"\n (closed)=\"onLayerClosed()\"\n [attr.data-test-id]=\"testId + '-select-button'\"\n>\n @if (!open) {\n <qd-icon\n [icon]=\"'ctrlDown'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--closed'\"\n [attr.data-test-id]=\"testId + '-closed'\"\n ></qd-icon>\n } @if (open) {\n <qd-icon\n [icon]=\"'ctrlTop'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--open'\"\n [attr.data-test-id]=\"testId + '-opened'\"\n ></qd-icon>\n }\n\n <div class=\"qd-filter__category-button-caption\">\n <span>\n {{ i18n | translate }}\n </span>\n </div>\n\n @if ((isMobile$ | async) && type === 'multiSelect') { @if (activeItemCount > 0) {\n <qd-chip [close]=\"true\" (closeClickEmitter)=\"clearAll()\" [data-test-id]=\"testId + '-selected-chip-count'\">{{\n activeItemCount\n }}</qd-chip>\n } } @else {\n <ng-container *ngTemplateOutlet=\"SelectedChip\"></ng-container>\n }\n</div>\n}\n\n<ng-template #filterLayer>\n <div [class]=\"layerContentClassName\" (focusout)=\"onFlyoutFocusout($event)\" (keydown.escape)=\"onFlyoutEscape()\">\n @if (closeButton) {\n <qd-icon\n [class]=\"'qd-filter__category-layer-close'\"\n (click)=\"closeLayer()\"\n [icon]=\"'ctrlTop'\"\n [attr.data-test-id]=\"testId + '-layer-close'\"\n ></qd-icon>\n } @if (itemsLoading$ | async) {\n <ng-container [ngTemplateOutlet]=\"loadingState\"></ng-container>\n } @else { @switch (type) { @case ('multiSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-listbox\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n tabindex=\"0\"\n [qdAutofocus]=\"!filter\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-activedescendant]=\"activeOptionId\"\n (keydown)=\"onListboxKeydown($event)\"\n (focus)=\"onListboxFocus()\"\n (blur)=\"onListboxBlur()\"\n >\n @for (entry of selectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (showSelectedSeparator) {\n <div\n class=\"qd-filter__category-layer-separator\"\n aria-hidden=\"true\"\n [attr.data-test-id]=\"testId + '-selected-separator'\"\n ></div>\n } @for (entry of unselectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n </ul>\n } @case ('singleSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-radiogroup\"\n role=\"radiogroup\"\n [id]=\"listboxId\"\n [attr.aria-label]=\"i18n | translate\"\n (keydown)=\"onListboxKeydown($event)\"\n >\n @for (item of items; track item.item; let itemIndex = $index) { @if (!item.hidden) {\n <qd-filter-item-single-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [qdAutofocus]=\"!filter && item.active\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n >\n </qd-filter-item-single-select>\n } }\n </ul>\n @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n } } } }\n </div>\n</ng-template>\n\n<ng-template #emptyState>\n <p class=\"qd-filter__category-layer-empty\" [attr.data-test-id]=\"testId + '-no-results'\">\n {{ \"i18n.qd.filter.noResults\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #loadingState>\n <p class=\"qd-filter__category-layer-loading\" [attr.data-test-id]=\"testId + '-items-loading'\">\n {{ \"i18n.qd.filter.loading\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #multiSelectItem let-item=\"item\" let-itemIndex=\"itemIndex\">\n @if (!item.hidden) {\n <qd-filter-item-multi-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [optionElementId]=\"optionIds[itemIndex]\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n ></qd-filter-item-multi-select>\n }\n</ng-template>\n\n<ng-template #SelectedChip>\n @for (item of items; track item; let itemIndex = $index) {\n <!-- TODO: Add tooltip-->\n @if (item.active) {\n <qd-chip\n [close]=\"true\"\n (closeClickEmitter)=\"close($event)\"\n [data]=\"itemIndex\"\n [data-test-id]=\"testId + '-selected-chip-' + item.item\"\n >{{ item.i18n | translate }}</qd-chip\n >\n } }\n</ng-template>\n", styles: ["::ng-deep .qd-filter__category-layer{position:relative;display:flex;overflow:hidden;min-width:16.25rem;max-width:56.25rem;height:100%;flex-direction:column;padding:0;border:.0625rem solid rgb(151,151,151);background:#fff;box-shadow:#d5d5d5 .125rem .25rem .4375rem}::ng-deep .qd-filter__category-layer .qd-filter-form-items__filter{flex-shrink:0;margin-bottom:0}::ng-deep .qd-filter__category-layer .qd-checkbox__label{display:flex;height:2.5rem}::ng-deep .qd-filter__category-layer .qd-checkbox__indicator,::ng-deep .qd-filter__category-layer .qd-radio-buttons__indicator{transform:translateY(-.0625rem)}::ng-deep .qd-filter__category-layer-items{flex:1;overflow-y:auto}::ng-deep .qd-filter__category-listbox,::ng-deep .qd-filter__category-radiogroup{padding:0;margin:0;list-style:none}::ng-deep .qd-filter__category-listbox:focus,::ng-deep .qd-filter__category-listbox:focus-visible,::ng-deep .qd-filter__category-radiogroup:focus,::ng-deep .qd-filter__category-radiogroup:focus-visible{outline:none}::ng-deep .qd-filter__item-single-select:focus,::ng-deep .qd-filter__item-single-select:focus-visible{outline:none}::ng-deep .qd-keyboard-active .qd-filter__item-single-select:focus .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-checkbox__indicator:after{position:absolute;top:50%;left:50%;width:1.25rem;height:1.25rem;content:\"\";outline:.125rem solid rgb(0,102,153);outline-offset:0;transform:translate(-50%,-50%)}::ng-deep .qd-filter__category-layer-separator{height:.0625rem;flex-shrink:0;background:#d5d5d5}::ng-deep .qd-filter__category-layer-empty,::ng-deep .qd-filter__category-layer-loading{padding:0 .9375rem;margin:0;color:#757575;font-size:.875rem;line-height:2.5rem}::ng-deep .qd-filter__category-layer-container{position:relative}::ng-deep .qd-filter__category-layer-close{position:absolute;z-index:1;top:.5rem;right:1rem;color:#757575;cursor:pointer}::ng-deep .qd-filter__category-layer-close:before{position:absolute;content:\"\";inset:-.5rem}::ng-deep .qd-filter__category-layer-close:hover,::ng-deep .qd-filter__category-layer-close:focus{color:#171717}\n"], dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: QdChipComponent, selector: "qd-chip", inputs: ["state", "close", "data", "data-test-id"], outputs: ["closeClickEmitter"] }, { kind: "component", type: QdFilterFormItemsComponent, selector: "qd-filter-form-items", inputs: ["inputFilterValue", "data-test-id"], outputs: ["filterValueChange"] }, { 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: QdAutofocusDirective, selector: "[qdAutofocus]", inputs: ["qdAutofocus"] }, { kind: "component", type: QdFilterItemMultiSelectComponent, selector: "qd-filter-item-multi-select", inputs: ["filterId", "categoryIndex", "itemIndex", "optionElementId", "data-test-id"] }, { kind: "component", type: QdFilterItemSingleSelectComponent, selector: "qd-filter-item-single-select", inputs: ["filterId", "categoryIndex", "itemIndex", "optionElementId", "data-test-id"], outputs: ["closeEventEmitter"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
23494
+ ], viewQueries: [{ propertyName: "popoverDirective", first: true, predicate: QdPopoverOnClickDirective, descendants: true }, { propertyName: "triggerRef", first: true, predicate: ["triggerRef"], descendants: true }], ngImport: i0, template: "@if (showSelectButton$ | async) {\n<div\n #triggerRef\n [class]=\"buttonClassName\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-haspopup]=\"type === 'multiSelect' ? 'listbox' : null\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-controls]=\"triggerAriaControls\"\n [qdPopoverOnClick]=\"filterLayer\"\n [qdPopoverCloseStrategy]=\"'onOutsideClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverEnableKeyControl]=\"true\"\n [qdPopoverRestoreFocus]=\"true\"\n [qdPopoverMaxHeight]=\"maxFlyoutHeight\"\n qdPopoverPlacement=\"bottom-start\"\n [qdPopoverOffsetY]=\"-1\"\n (opened)=\"onLayerOpened()\"\n (closed)=\"onLayerClosed()\"\n [attr.data-test-id]=\"testId + '-select-button'\"\n>\n @if (!open) {\n <qd-icon\n [icon]=\"'ctrlDown'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--closed'\"\n [attr.data-test-id]=\"testId + '-closed'\"\n ></qd-icon>\n } @if (open) {\n <qd-icon\n [icon]=\"'ctrlTop'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--open'\"\n [attr.data-test-id]=\"testId + '-opened'\"\n ></qd-icon>\n }\n\n <div class=\"qd-filter__category-button-caption\">\n <span>\n {{ i18n | translate }}\n </span>\n </div>\n\n @if ((isMobile$ | async) && type === 'multiSelect') { @if (activeItemCount > 0) {\n <qd-chip [close]=\"true\" (closeClickEmitter)=\"clearAll()\" [data-test-id]=\"testId + '-selected-chip-count'\">{{\n activeItemCount\n }}</qd-chip>\n } } @else {\n <ng-container *ngTemplateOutlet=\"SelectedChip\"></ng-container>\n }\n</div>\n}\n\n<ng-template #filterLayer>\n <div [class]=\"layerContentClassName\" (focusout)=\"onFlyoutFocusout($event)\" (keydown.escape)=\"onFlyoutEscape()\">\n @if (closeButton) {\n <qd-icon\n [class]=\"'qd-filter__category-layer-close'\"\n (click)=\"closeLayer()\"\n [icon]=\"'ctrlTop'\"\n [attr.data-test-id]=\"testId + '-layer-close'\"\n ></qd-icon>\n } @if (itemsLoading$ | async) {\n <ng-container [ngTemplateOutlet]=\"loadingState\"></ng-container>\n } @else { @switch (type) { @case ('multiSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-listbox\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n tabindex=\"0\"\n [qdAutofocus]=\"!filter\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-activedescendant]=\"activeOptionId\"\n (keydown)=\"onListboxKeydown($event)\"\n (focus)=\"onListboxFocus()\"\n (blur)=\"onListboxBlur()\"\n >\n @for (entry of selectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (showSelectedSeparator) {\n <div\n class=\"qd-filter__category-layer-separator\"\n aria-hidden=\"true\"\n [attr.data-test-id]=\"testId + '-selected-separator'\"\n ></div>\n } @for (entry of unselectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n </ul>\n } @case ('singleSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-radiogroup\"\n role=\"radiogroup\"\n [id]=\"listboxId\"\n [attr.aria-label]=\"i18n | translate\"\n (keydown)=\"onListboxKeydown($event)\"\n >\n @for (item of items; track item.item; let itemIndex = $index) { @if (!item.hidden) {\n <qd-filter-item-single-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [qdAutofocus]=\"isInitialFocusOption(itemIndex)\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n >\n </qd-filter-item-single-select>\n } }\n </ul>\n @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n } } } }\n </div>\n</ng-template>\n\n<ng-template #emptyState>\n <p class=\"qd-filter__category-layer-empty\" [attr.data-test-id]=\"testId + '-no-results'\">\n {{ \"i18n.qd.filter.noResults\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #loadingState>\n <p class=\"qd-filter__category-layer-loading\" [attr.data-test-id]=\"testId + '-items-loading'\">\n {{ \"i18n.qd.filter.loading\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #multiSelectItem let-item=\"item\" let-itemIndex=\"itemIndex\">\n @if (!item.hidden) {\n <qd-filter-item-multi-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [optionElementId]=\"optionIds[itemIndex]\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n ></qd-filter-item-multi-select>\n }\n</ng-template>\n\n<ng-template #SelectedChip>\n @for (item of items; track item; let itemIndex = $index) {\n <!-- TODO: Add tooltip-->\n @if (item.active) {\n <qd-chip\n [close]=\"true\"\n (closeClickEmitter)=\"close($event)\"\n [data]=\"itemIndex\"\n [data-test-id]=\"testId + '-selected-chip-' + item.item\"\n >{{ item.i18n | translate }}</qd-chip\n >\n } }\n</ng-template>\n", styles: ["::ng-deep .qd-filter__category-layer{position:relative;display:flex;overflow:hidden;min-width:16.25rem;max-width:56.25rem;height:100%;flex-direction:column;padding:0;border:.0625rem solid rgb(151,151,151);background:#fff;box-shadow:#d5d5d5 .125rem .25rem .4375rem}::ng-deep .qd-filter__category-layer .qd-filter-form-items__filter{flex-shrink:0;margin-bottom:0}::ng-deep .qd-filter__category-layer .qd-checkbox__label{display:flex;height:2.5rem}::ng-deep .qd-filter__category-layer .qd-checkbox__indicator,::ng-deep .qd-filter__category-layer .qd-radio-buttons__indicator{transform:translateY(-.0625rem)}::ng-deep .qd-filter__category-layer-items{flex:1;overflow-y:auto}::ng-deep .qd-filter__category-listbox,::ng-deep .qd-filter__category-radiogroup{padding:0;margin:0;list-style:none}::ng-deep .qd-filter__category-listbox:focus,::ng-deep .qd-filter__category-listbox:focus-visible,::ng-deep .qd-filter__category-radiogroup:focus,::ng-deep .qd-filter__category-radiogroup:focus-visible{outline:none}::ng-deep .qd-filter__item-single-select:focus,::ng-deep .qd-filter__item-single-select:focus-visible{outline:none}::ng-deep .qd-keyboard-active .qd-filter__item-single-select:focus .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-checkbox__indicator:after{position:absolute;top:50%;left:50%;width:1.25rem;height:1.25rem;content:\"\";outline:.125rem solid rgb(0,102,153);outline-offset:0;transform:translate(-50%,-50%)}::ng-deep .qd-filter__category-layer-separator{height:.0625rem;flex-shrink:0;background:#d5d5d5}::ng-deep .qd-filter__category-layer-empty,::ng-deep .qd-filter__category-layer-loading{padding:0 .9375rem;margin:0;color:#757575;font-size:.875rem;line-height:2.5rem}::ng-deep .qd-filter__category-layer-container{position:relative}::ng-deep .qd-filter__category-layer-close{position:absolute;z-index:1;top:.5rem;right:1rem;color:#757575;cursor:pointer}::ng-deep .qd-filter__category-layer-close:before{position:absolute;content:\"\";inset:-.5rem}::ng-deep .qd-filter__category-layer-close:hover,::ng-deep .qd-filter__category-layer-close:focus{color:#171717}\n"], dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: QdChipComponent, selector: "qd-chip", inputs: ["state", "close", "data", "data-test-id"], outputs: ["closeClickEmitter"] }, { kind: "component", type: QdFilterFormItemsComponent, selector: "qd-filter-form-items", inputs: ["inputFilterValue", "data-test-id"], outputs: ["filterValueChange"] }, { 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: QdAutofocusDirective, selector: "[qdAutofocus]", inputs: ["qdAutofocus"] }, { kind: "component", type: QdFilterItemMultiSelectComponent, selector: "qd-filter-item-multi-select", inputs: ["filterId", "categoryIndex", "itemIndex", "optionElementId", "data-test-id"] }, { kind: "component", type: QdFilterItemSingleSelectComponent, selector: "qd-filter-item-single-select", inputs: ["filterId", "categoryIndex", "itemIndex", "optionElementId", "data-test-id"], outputs: ["closeEventEmitter"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
23471
23495
  }
23472
23496
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdFilterItemSelectCategoryComponent, decorators: [{
23473
23497
  type: Component,
@@ -23476,7 +23500,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
23476
23500
  provide: QD_FILTER_LISTBOX_HOST,
23477
23501
  useExisting: forwardRef(() => QdFilterItemSelectCategoryComponent)
23478
23502
  }
23479
- ], standalone: false, template: "@if (showSelectButton$ | async) {\n<div\n #triggerRef\n [class]=\"buttonClassName\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-haspopup]=\"type === 'multiSelect' ? 'listbox' : null\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-controls]=\"triggerAriaControls\"\n [qdPopoverOnClick]=\"filterLayer\"\n [qdPopoverCloseStrategy]=\"'onOutsideClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverEnableKeyControl]=\"true\"\n [qdPopoverRestoreFocus]=\"true\"\n [qdPopoverMaxHeight]=\"maxFlyoutHeight\"\n qdPopoverPlacement=\"bottom-start\"\n [qdPopoverOffsetY]=\"-1\"\n (opened)=\"onLayerOpened()\"\n (closed)=\"onLayerClosed()\"\n [attr.data-test-id]=\"testId + '-select-button'\"\n>\n @if (!open) {\n <qd-icon\n [icon]=\"'ctrlDown'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--closed'\"\n [attr.data-test-id]=\"testId + '-closed'\"\n ></qd-icon>\n } @if (open) {\n <qd-icon\n [icon]=\"'ctrlTop'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--open'\"\n [attr.data-test-id]=\"testId + '-opened'\"\n ></qd-icon>\n }\n\n <div class=\"qd-filter__category-button-caption\">\n <span>\n {{ i18n | translate }}\n </span>\n </div>\n\n @if ((isMobile$ | async) && type === 'multiSelect') { @if (activeItemCount > 0) {\n <qd-chip [close]=\"true\" (closeClickEmitter)=\"clearAll()\" [data-test-id]=\"testId + '-selected-chip-count'\">{{\n activeItemCount\n }}</qd-chip>\n } } @else {\n <ng-container *ngTemplateOutlet=\"SelectedChip\"></ng-container>\n }\n</div>\n}\n\n<ng-template #filterLayer>\n <div [class]=\"layerContentClassName\" (focusout)=\"onFlyoutFocusout($event)\" (keydown.escape)=\"onFlyoutEscape()\">\n @if (closeButton) {\n <qd-icon\n [class]=\"'qd-filter__category-layer-close'\"\n (click)=\"closeLayer()\"\n [icon]=\"'ctrlTop'\"\n [attr.data-test-id]=\"testId + '-layer-close'\"\n ></qd-icon>\n } @if (itemsLoading$ | async) {\n <ng-container [ngTemplateOutlet]=\"loadingState\"></ng-container>\n } @else { @switch (type) { @case ('multiSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-listbox\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n tabindex=\"0\"\n [qdAutofocus]=\"!filter\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-activedescendant]=\"activeOptionId\"\n (keydown)=\"onListboxKeydown($event)\"\n (focus)=\"onListboxFocus()\"\n (blur)=\"onListboxBlur()\"\n >\n @for (entry of selectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (showSelectedSeparator) {\n <div\n class=\"qd-filter__category-layer-separator\"\n aria-hidden=\"true\"\n [attr.data-test-id]=\"testId + '-selected-separator'\"\n ></div>\n } @for (entry of unselectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n </ul>\n } @case ('singleSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-radiogroup\"\n role=\"radiogroup\"\n [id]=\"listboxId\"\n [attr.aria-label]=\"i18n | translate\"\n (keydown)=\"onListboxKeydown($event)\"\n >\n @for (item of items; track item.item; let itemIndex = $index) { @if (!item.hidden) {\n <qd-filter-item-single-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [qdAutofocus]=\"!filter && item.active\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n >\n </qd-filter-item-single-select>\n } }\n </ul>\n @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n } } } }\n </div>\n</ng-template>\n\n<ng-template #emptyState>\n <p class=\"qd-filter__category-layer-empty\" [attr.data-test-id]=\"testId + '-no-results'\">\n {{ \"i18n.qd.filter.noResults\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #loadingState>\n <p class=\"qd-filter__category-layer-loading\" [attr.data-test-id]=\"testId + '-items-loading'\">\n {{ \"i18n.qd.filter.loading\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #multiSelectItem let-item=\"item\" let-itemIndex=\"itemIndex\">\n @if (!item.hidden) {\n <qd-filter-item-multi-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [optionElementId]=\"optionIds[itemIndex]\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n ></qd-filter-item-multi-select>\n }\n</ng-template>\n\n<ng-template #SelectedChip>\n @for (item of items; track item; let itemIndex = $index) {\n <!-- TODO: Add tooltip-->\n @if (item.active) {\n <qd-chip\n [close]=\"true\"\n (closeClickEmitter)=\"close($event)\"\n [data]=\"itemIndex\"\n [data-test-id]=\"testId + '-selected-chip-' + item.item\"\n >{{ item.i18n | translate }}</qd-chip\n >\n } }\n</ng-template>\n", styles: ["::ng-deep .qd-filter__category-layer{position:relative;display:flex;overflow:hidden;min-width:16.25rem;max-width:56.25rem;height:100%;flex-direction:column;padding:0;border:.0625rem solid rgb(151,151,151);background:#fff;box-shadow:#d5d5d5 .125rem .25rem .4375rem}::ng-deep .qd-filter__category-layer .qd-filter-form-items__filter{flex-shrink:0;margin-bottom:0}::ng-deep .qd-filter__category-layer .qd-checkbox__label{display:flex;height:2.5rem}::ng-deep .qd-filter__category-layer .qd-checkbox__indicator,::ng-deep .qd-filter__category-layer .qd-radio-buttons__indicator{transform:translateY(-.0625rem)}::ng-deep .qd-filter__category-layer-items{flex:1;overflow-y:auto}::ng-deep .qd-filter__category-listbox,::ng-deep .qd-filter__category-radiogroup{padding:0;margin:0;list-style:none}::ng-deep .qd-filter__category-listbox:focus,::ng-deep .qd-filter__category-listbox:focus-visible,::ng-deep .qd-filter__category-radiogroup:focus,::ng-deep .qd-filter__category-radiogroup:focus-visible{outline:none}::ng-deep .qd-filter__item-single-select:focus,::ng-deep .qd-filter__item-single-select:focus-visible{outline:none}::ng-deep .qd-keyboard-active .qd-filter__item-single-select:focus .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-checkbox__indicator:after{position:absolute;top:50%;left:50%;width:1.25rem;height:1.25rem;content:\"\";outline:.125rem solid rgb(0,102,153);outline-offset:0;transform:translate(-50%,-50%)}::ng-deep .qd-filter__category-layer-separator{height:.0625rem;flex-shrink:0;background:#d5d5d5}::ng-deep .qd-filter__category-layer-empty,::ng-deep .qd-filter__category-layer-loading{padding:0 .9375rem;margin:0;color:#757575;font-size:.875rem;line-height:2.5rem}::ng-deep .qd-filter__category-layer-container{position:relative}::ng-deep .qd-filter__category-layer-close{position:absolute;z-index:1;top:.5rem;right:1rem;color:#757575;cursor:pointer}::ng-deep .qd-filter__category-layer-close:before{position:absolute;content:\"\";inset:-.5rem}::ng-deep .qd-filter__category-layer-close:hover,::ng-deep .qd-filter__category-layer-close:focus{color:#171717}\n"] }]
23503
+ ], standalone: false, template: "@if (showSelectButton$ | async) {\n<div\n #triggerRef\n [class]=\"buttonClassName\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-haspopup]=\"type === 'multiSelect' ? 'listbox' : null\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-controls]=\"triggerAriaControls\"\n [qdPopoverOnClick]=\"filterLayer\"\n [qdPopoverCloseStrategy]=\"'onOutsideClick'\"\n [qdPopoverStopPropagation]=\"true\"\n [qdPopoverEnableKeyControl]=\"true\"\n [qdPopoverRestoreFocus]=\"true\"\n [qdPopoverMaxHeight]=\"maxFlyoutHeight\"\n qdPopoverPlacement=\"bottom-start\"\n [qdPopoverOffsetY]=\"-1\"\n (opened)=\"onLayerOpened()\"\n (closed)=\"onLayerClosed()\"\n [attr.data-test-id]=\"testId + '-select-button'\"\n>\n @if (!open) {\n <qd-icon\n [icon]=\"'ctrlDown'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--closed'\"\n [attr.data-test-id]=\"testId + '-closed'\"\n ></qd-icon>\n } @if (open) {\n <qd-icon\n [icon]=\"'ctrlTop'\"\n [class]=\"'qd-filter__category-icon qd-filter__category-icon--open'\"\n [attr.data-test-id]=\"testId + '-opened'\"\n ></qd-icon>\n }\n\n <div class=\"qd-filter__category-button-caption\">\n <span>\n {{ i18n | translate }}\n </span>\n </div>\n\n @if ((isMobile$ | async) && type === 'multiSelect') { @if (activeItemCount > 0) {\n <qd-chip [close]=\"true\" (closeClickEmitter)=\"clearAll()\" [data-test-id]=\"testId + '-selected-chip-count'\">{{\n activeItemCount\n }}</qd-chip>\n } } @else {\n <ng-container *ngTemplateOutlet=\"SelectedChip\"></ng-container>\n }\n</div>\n}\n\n<ng-template #filterLayer>\n <div [class]=\"layerContentClassName\" (focusout)=\"onFlyoutFocusout($event)\" (keydown.escape)=\"onFlyoutEscape()\">\n @if (closeButton) {\n <qd-icon\n [class]=\"'qd-filter__category-layer-close'\"\n (click)=\"closeLayer()\"\n [icon]=\"'ctrlTop'\"\n [attr.data-test-id]=\"testId + '-layer-close'\"\n ></qd-icon>\n } @if (itemsLoading$ | async) {\n <ng-container [ngTemplateOutlet]=\"loadingState\"></ng-container>\n } @else { @switch (type) { @case ('multiSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-listbox\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n tabindex=\"0\"\n [qdAutofocus]=\"!filter\"\n [attr.aria-label]=\"i18n | translate\"\n [attr.aria-activedescendant]=\"activeOptionId\"\n (keydown)=\"onListboxKeydown($event)\"\n (focus)=\"onListboxFocus()\"\n (blur)=\"onListboxBlur()\"\n >\n @for (entry of selectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (showSelectedSeparator) {\n <div\n class=\"qd-filter__category-layer-separator\"\n aria-hidden=\"true\"\n [attr.data-test-id]=\"testId + '-selected-separator'\"\n ></div>\n } @for (entry of unselectedDropdownEntries; track trackByItem($index, entry)) {\n <ng-container\n [ngTemplateOutlet]=\"multiSelectItem\"\n [ngTemplateOutletContext]=\"{ item: entry.item, itemIndex: entry.itemIndex }\"\n ></ng-container>\n } @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n }\n </ul>\n } @case ('singleSelect') { @if (filter) {\n <qd-filter-form-items\n [inputFilterValue]=\"filterCategoryValue$ | async\"\n (filterValueChange)=\"changeValue($event)\"\n [data-test-id]=\"testId\"\n ></qd-filter-form-items>\n }\n <ul\n class=\"qd-filter__category-layer-items qd-filter__category-radiogroup\"\n role=\"radiogroup\"\n [id]=\"listboxId\"\n [attr.aria-label]=\"i18n | translate\"\n (keydown)=\"onListboxKeydown($event)\"\n >\n @for (item of items; track item.item; let itemIndex = $index) { @if (!item.hidden) {\n <qd-filter-item-single-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [qdAutofocus]=\"isInitialFocusOption(itemIndex)\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n >\n </qd-filter-item-single-select>\n } }\n </ul>\n @if (hasNoVisibleItems) {\n <ng-container [ngTemplateOutlet]=\"emptyState\"></ng-container>\n } } } }\n </div>\n</ng-template>\n\n<ng-template #emptyState>\n <p class=\"qd-filter__category-layer-empty\" [attr.data-test-id]=\"testId + '-no-results'\">\n {{ \"i18n.qd.filter.noResults\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #loadingState>\n <p class=\"qd-filter__category-layer-loading\" [attr.data-test-id]=\"testId + '-items-loading'\">\n {{ \"i18n.qd.filter.loading\" | translate }}\n </p>\n</ng-template>\n\n<ng-template #multiSelectItem let-item=\"item\" let-itemIndex=\"itemIndex\">\n @if (!item.hidden) {\n <qd-filter-item-multi-select\n [categoryIndex]=\"categoryIndex\"\n [itemIndex]=\"itemIndex\"\n [optionElementId]=\"optionIds[itemIndex]\"\n [filterId]=\"filterId\"\n [data-test-id]=\"testId + '-item-' + itemIndex + '-' + item.item\"\n ></qd-filter-item-multi-select>\n }\n</ng-template>\n\n<ng-template #SelectedChip>\n @for (item of items; track item; let itemIndex = $index) {\n <!-- TODO: Add tooltip-->\n @if (item.active) {\n <qd-chip\n [close]=\"true\"\n (closeClickEmitter)=\"close($event)\"\n [data]=\"itemIndex\"\n [data-test-id]=\"testId + '-selected-chip-' + item.item\"\n >{{ item.i18n | translate }}</qd-chip\n >\n } }\n</ng-template>\n", styles: ["::ng-deep .qd-filter__category-layer{position:relative;display:flex;overflow:hidden;min-width:16.25rem;max-width:56.25rem;height:100%;flex-direction:column;padding:0;border:.0625rem solid rgb(151,151,151);background:#fff;box-shadow:#d5d5d5 .125rem .25rem .4375rem}::ng-deep .qd-filter__category-layer .qd-filter-form-items__filter{flex-shrink:0;margin-bottom:0}::ng-deep .qd-filter__category-layer .qd-checkbox__label{display:flex;height:2.5rem}::ng-deep .qd-filter__category-layer .qd-checkbox__indicator,::ng-deep .qd-filter__category-layer .qd-radio-buttons__indicator{transform:translateY(-.0625rem)}::ng-deep .qd-filter__category-layer-items{flex:1;overflow-y:auto}::ng-deep .qd-filter__category-listbox,::ng-deep .qd-filter__category-radiogroup{padding:0;margin:0;list-style:none}::ng-deep .qd-filter__category-listbox:focus,::ng-deep .qd-filter__category-listbox:focus-visible,::ng-deep .qd-filter__category-radiogroup:focus,::ng-deep .qd-filter__category-radiogroup:focus-visible{outline:none}::ng-deep .qd-filter__item-single-select:focus,::ng-deep .qd-filter__item-single-select:focus-visible{outline:none}::ng-deep .qd-keyboard-active .qd-filter__item-single-select:focus .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-radio-buttons__indicator:after,::ng-deep .qd-keyboard-active .qd-filter__category-option--active .qd-checkbox__indicator:after{position:absolute;top:50%;left:50%;width:1.25rem;height:1.25rem;content:\"\";outline:.125rem solid rgb(0,102,153);outline-offset:0;transform:translate(-50%,-50%)}::ng-deep .qd-filter__category-layer-separator{height:.0625rem;flex-shrink:0;background:#d5d5d5}::ng-deep .qd-filter__category-layer-empty,::ng-deep .qd-filter__category-layer-loading{padding:0 .9375rem;margin:0;color:#757575;font-size:.875rem;line-height:2.5rem}::ng-deep .qd-filter__category-layer-container{position:relative}::ng-deep .qd-filter__category-layer-close{position:absolute;z-index:1;top:.5rem;right:1rem;color:#757575;cursor:pointer}::ng-deep .qd-filter__category-layer-close:before{position:absolute;content:\"\";inset:-.5rem}::ng-deep .qd-filter__category-layer-close:hover,::ng-deep .qd-filter__category-layer-close:focus{color:#171717}\n"] }]
23480
23504
  }], propDecorators: { filterId: [{
23481
23505
  type: Input
23482
23506
  }], categoryIndex: [{
@@ -23912,6 +23936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
23912
23936
 
23913
23937
  class QdDependentFiltersService {
23914
23938
  filterService = inject(QdFilterService);
23939
+ _destroyRef = inject(DestroyRef);
23915
23940
  _filterComponent;
23916
23941
  _subscription;
23917
23942
  get filterData() {
@@ -23927,7 +23952,9 @@ class QdDependentFiltersService {
23927
23952
  this._filterComponent = filterComponent;
23928
23953
  this.getDependentCategories().forEach(dependentCategory => {
23929
23954
  const dependentCategoryIndex = this.categories.indexOf(dependentCategory);
23930
- const subscription = this.resolveItemsWhenDependsOnCategoriesChange(dependentCategory).subscribe((filterItems) => {
23955
+ const subscription = this.resolveItemsWhenDependsOnCategoriesChange(dependentCategory)
23956
+ .pipe(takeUntilDestroyed(this._destroyRef))
23957
+ .subscribe((filterItems) => {
23931
23958
  this.filterService.updateCategoryItems(this.filterId, dependentCategoryIndex, filterItems);
23932
23959
  });
23933
23960
  if (!this._subscription)
@@ -23936,10 +23963,10 @@ class QdDependentFiltersService {
23936
23963
  });
23937
23964
  }
23938
23965
  reinitialize() {
23939
- this.destroy();
23966
+ this.cancelItemResolution();
23940
23967
  this.initialize(this._filterComponent);
23941
23968
  }
23942
- destroy() {
23969
+ cancelItemResolution() {
23943
23970
  this._subscription?.unsubscribe();
23944
23971
  delete this._subscription;
23945
23972
  }
@@ -24096,6 +24123,7 @@ class QdFilterComponent {
24096
24123
  filterService = inject(QdFilterService);
24097
24124
  filterRouterConnectorService = inject(QdFilterRouterConnectorService);
24098
24125
  dependentFiltersService = inject(QdDependentFiltersService);
24126
+ _destroyRef = inject(DestroyRef);
24099
24127
  /**
24100
24128
  * The configuration of the filter
24101
24129
  */
@@ -24131,10 +24159,6 @@ class QdFilterComponent {
24131
24159
  disableFilterButton$;
24132
24160
  disableResetButton$;
24133
24161
  filterId;
24134
- _queryStringSubscription;
24135
- _postBodySubscription;
24136
- _emitOutputsSubscription;
24137
- _filterValueSubscription;
24138
24162
  _filterDataSubject = new BehaviorSubject(undefined);
24139
24163
  _isApplyDisabledWhileUnchangedSubject = new BehaviorSubject(false);
24140
24164
  _hasPreselectionSubject = new ReplaySubject(1);
@@ -24177,11 +24201,6 @@ class QdFilterComponent {
24177
24201
  }
24178
24202
  }
24179
24203
  ngOnDestroy() {
24180
- this.dependentFiltersService.destroy();
24181
- this._queryStringSubscription?.unsubscribe();
24182
- this._postBodySubscription?.unsubscribe();
24183
- this._emitOutputsSubscription?.unsubscribe();
24184
- this._filterValueSubscription?.unsubscribe();
24185
24204
  /* the ReplaySubjects would cause an initial emission of the outputs if the component is reinitialized
24186
24205
  * (when navigating back for example). ReplaySubjects are used here because the subscription of the section
24187
24206
  * is delayed in the integrated solution with the qdConnectToFilter directive. */
@@ -24245,22 +24264,26 @@ class QdFilterComponent {
24245
24264
  this._isApplyDisabledWhileUnchangedSubject
24246
24265
  ]).pipe(map(([hasActive, currentPostBody, applied, isApplyDisabledWhileUnchanged]) => !hasActive || (isApplyDisabledWhileUnchanged && this.isUnchangedSince(currentPostBody, applied))));
24247
24266
  this.initResetButtonActivation();
24248
- this._queryStringSubscription = this.filterService
24267
+ this.filterService
24249
24268
  .getQueryString$(this.filterId)
24269
+ .pipe(takeUntilDestroyed(this._destroyRef))
24250
24270
  .subscribe(queryString => this.queryStringOutput.emit(queryString));
24251
- this._postBodySubscription = this.filterService
24271
+ this.filterService
24252
24272
  .getPostBody$(this.filterId)
24273
+ .pipe(takeUntilDestroyed(this._destroyRef))
24253
24274
  .subscribe(postBody => this.postBodyOutput.emit(postBody));
24254
24275
  this.hasPreselection = hasActiveCategory(this.filterData?.categories);
24255
- 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(() => {
24256
24279
  this.emitOutputs();
24257
24280
  });
24258
- this._filterValueSubscription = this.filterService
24281
+ this.filterService
24259
24282
  .getCurrentPostBody(this.filterId)
24260
24283
  .pipe(distinctUntilChanged(qdIsDeepEqual), tap$1(() => {
24261
24284
  if (this.isInstantFiltering)
24262
24285
  this.emitOutputs();
24263
- }))
24286
+ }), takeUntilDestroyed(this._destroyRef))
24264
24287
  .subscribe(filterValue => this.valueChange.emit(filterValue));
24265
24288
  this.initializeDependentFiltersService();
24266
24289
  }
@@ -25336,18 +25359,16 @@ class QdOverflowFitDirective {
25336
25359
  host = inject(ElementRef);
25337
25360
  overflowFit = inject(QdOverflowFitService);
25338
25361
  changeDetectorRef = inject(ChangeDetectorRef);
25339
- _subscription;
25362
+ _destroyRef = inject(DestroyRef);
25340
25363
  ngAfterViewInit() {
25341
25364
  const indicator = this.host.nativeElement.querySelector(':scope > [data-fit-measure]');
25342
25365
  if (!indicator)
25343
25366
  return;
25344
- this._subscription = this.overflowFit
25367
+ this.overflowFit
25345
25368
  .observe(this.rowElements(indicator))
25369
+ .pipe(takeUntilDestroyed(this._destroyRef))
25346
25370
  .subscribe(count => this.applyCount(count));
25347
25371
  }
25348
- ngOnDestroy() {
25349
- this._subscription?.unsubscribe();
25350
- }
25351
25372
  isHidden(index) {
25352
25373
  return index >= this.visibleCount;
25353
25374
  }
@@ -25781,7 +25802,7 @@ class QdSearchComponent {
25781
25802
  _configDataSubject = new BehaviorSubject({});
25782
25803
  _search = '';
25783
25804
  _preSelect = '';
25784
- _destroyed$ = new Subject();
25805
+ _destroyRef = inject(DestroyRef);
25785
25806
  _searchConnectedWithRouterSubject = new ReplaySubject(1);
25786
25807
  _searchConnectedWithRouter$ = this._searchConnectedWithRouterSubject.asObservable();
25787
25808
  get inputConfig() {
@@ -25849,7 +25870,7 @@ class QdSearchComponent {
25849
25870
  });
25850
25871
  this.searchRouterConnectorService
25851
25872
  .connectSearchWithRouter(this)
25852
- .pipe(takeUntil$1(this._destroyed$))
25873
+ .pipe(takeUntilDestroyed(this._destroyRef))
25853
25874
  .subscribe(() => this._searchConnectedWithRouterSubject.next());
25854
25875
  }
25855
25876
  waitForConfigData() {
@@ -25865,10 +25886,6 @@ class QdSearchComponent {
25865
25886
  }
25866
25887
  }
25867
25888
  }
25868
- ngOnDestroy() {
25869
- this._destroyed$.next();
25870
- this._destroyed$.complete();
25871
- }
25872
25889
  handleDelete() {
25873
25890
  this.handleClear();
25874
25891
  this.searchService.setSearchValues(this.search, this.preSelect);
@@ -26474,6 +26491,7 @@ class QdTableFillingWidthService {
26474
26491
  tableStoreService = inject(QdTableStoreService);
26475
26492
  zone = inject(NgZone);
26476
26493
  injector = inject(Injector);
26494
+ _destroyRef = inject(DestroyRef);
26477
26495
  renderRef;
26478
26496
  tableComponentElement;
26479
26497
  tableConfig;
@@ -26485,7 +26503,7 @@ class QdTableFillingWidthService {
26485
26503
  tableWidth$ = new BehaviorSubject(0);
26486
26504
  tableNumberOfColumns$ = new BehaviorSubject(0);
26487
26505
  appliedWidth;
26488
- destroyed$ = new Subject();
26506
+ _stopWatching$ = new Subject();
26489
26507
  get whichColumnFillsWidth() {
26490
26508
  return this.tableConfig?.whichColumnFillsWidth || WHICH_COLUMN_FILLS_WIDTH_DEFAULT;
26491
26509
  }
@@ -26498,7 +26516,7 @@ class QdTableFillingWidthService {
26498
26516
  if (this.whichColumnFillsWidth === 'none')
26499
26517
  return;
26500
26518
  combineLatest([this.observeTableWidth(), this.observeTableData(), this.observeTableNumberOfColumns()])
26501
- .pipe(debounceTime(DEBOUNCE_TIME), takeUntil(this.destroyed$))
26519
+ .pipe(debounceTime(DEBOUNCE_TIME), takeUntil(this._stopWatching$), takeUntilDestroyed(this._destroyRef))
26502
26520
  .subscribe(() => this.fillRemainingWidth());
26503
26521
  }
26504
26522
  /**
@@ -26509,7 +26527,10 @@ class QdTableFillingWidthService {
26509
26527
  this.reinitialize();
26510
26528
  }
26511
26529
  /**
26512
- * 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.
26513
26534
  */
26514
26535
  destroy() {
26515
26536
  this.clearSubscriptions();
@@ -26619,11 +26640,11 @@ class QdTableFillingWidthService {
26619
26640
  const tableData$ = new ReplaySubject(1);
26620
26641
  this.tableStoreService
26621
26642
  .tableDataEntries$()
26622
- .pipe(take(1), takeUntil(this.destroyed$))
26643
+ .pipe(take(1), takeUntil(this._stopWatching$), takeUntilDestroyed(this._destroyRef))
26623
26644
  .subscribe(data => tableData$.next(data));
26624
26645
  this.tableStoreService
26625
26646
  .tableDataEntries$()
26626
- .pipe(skip(1), takeUntil(this.destroyed$))
26647
+ .pipe(skip(1), takeUntil(this._stopWatching$), takeUntilDestroyed(this._destroyRef))
26627
26648
  .subscribe(data => {
26628
26649
  this.renderRef?.destroy();
26629
26650
  this.renderRef = afterNextRender(() => this.zone.runOutsideAngular(() => tableData$.next(data)), {
@@ -26638,7 +26659,7 @@ class QdTableFillingWidthService {
26638
26659
  this.initialize(this.tableComponentElement, this.tableConfig);
26639
26660
  }
26640
26661
  clearSubscriptions() {
26641
- this.destroyed$.next();
26662
+ this._stopWatching$.next();
26642
26663
  this.renderRef?.destroy();
26643
26664
  this.pauseObservers();
26644
26665
  }
@@ -27019,7 +27040,7 @@ class QdTableResolverService {
27019
27040
  tableStoreService = inject(QdTableStoreService);
27020
27041
  translateService = inject(TranslateService);
27021
27042
  actionResultService = inject(QdTableExternalActionResultService);
27022
- _destroyed$ = new ReplaySubject(1);
27043
+ _destroyRef = inject(DestroyRef);
27023
27044
  _refreshSubscription;
27024
27045
  _hasPagination = true;
27025
27046
  _isNavigatingToValidPage = false;
@@ -27027,10 +27048,6 @@ class QdTableResolverService {
27027
27048
  constructor() {
27028
27049
  this.subscribeToExternalRefresh();
27029
27050
  }
27030
- ngOnDestroy() {
27031
- this._destroyed$.next(null);
27032
- this._destroyed$.complete();
27033
- }
27034
27051
  init(refreshOnLanguageChange, hasPagination = true) {
27035
27052
  const resolver = this.tableDataResolver;
27036
27053
  if (!resolver)
@@ -27040,7 +27057,7 @@ class QdTableResolverService {
27040
27057
  this.subscribeToLangChanges();
27041
27058
  this.tableStoreService
27042
27059
  .selectDataResolutionCriteria$()
27043
- .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))
27044
27061
  .subscribe();
27045
27062
  }
27046
27063
  refresh(resolverOptions = {}) {
@@ -27051,11 +27068,11 @@ class QdTableResolverService {
27051
27068
  this._refreshSubscription?.unsubscribe();
27052
27069
  this._refreshSubscription = this.tableStoreService
27053
27070
  .selectDataResolutionCriteria$()
27054
- .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))
27055
27072
  .subscribe();
27056
27073
  }
27057
27074
  subscribeToLangChanges() {
27058
- this.translateService.onLangChange.pipe(takeUntil(this._destroyed$)).subscribe(() => this.refresh());
27075
+ this.translateService.onLangChange.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this.refresh());
27059
27076
  }
27060
27077
  shouldDataBeResolved(criteria) {
27061
27078
  if (this.isAwaitingConnectors(criteria))
@@ -27069,7 +27086,7 @@ class QdTableResolverService {
27069
27086
  }
27070
27087
  subscribeToExternalRefresh() {
27071
27088
  this.actionResultService.actionSuccess$
27072
- .pipe(takeUntil(this._destroyed$))
27089
+ .pipe(takeUntilDestroyed(this._destroyRef))
27073
27090
  .subscribe(pageIndex => this.refresh({ pageIndex }));
27074
27091
  }
27075
27092
  buildCriteriaParams({ tableParams, connectorParams }) {
@@ -27232,6 +27249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
27232
27249
  // @ts-strict-ignore
27233
27250
  class QdTableRowSelectionService {
27234
27251
  tableStoreService = inject(QdTableStoreService);
27252
+ _destroyRef = inject(DestroyRef);
27235
27253
  _config;
27236
27254
  _visibleRowsSubscription;
27237
27255
  set config(config) {
@@ -27240,11 +27258,9 @@ class QdTableRowSelectionService {
27240
27258
  this._visibleRowsSubscription?.unsubscribe();
27241
27259
  this._visibleRowsSubscription = this.tableStoreService
27242
27260
  .tableDataEntries$()
27261
+ .pipe(takeUntilDestroyed(this._destroyRef))
27243
27262
  .subscribe(rows => this.refreshCacheForVisibleRows(rows));
27244
27263
  }
27245
- ngOnDestroy() {
27246
- this._visibleRowsSubscription?.unsubscribe();
27247
- }
27248
27264
  get tableId() {
27249
27265
  return this.tableStoreService.tableId;
27250
27266
  }
@@ -27619,19 +27635,15 @@ class QdTablePaginatorPageSizeDirective {
27619
27635
  tableDataResolver = inject(QD_TABLE_DATA_RESOLVER_TOKEN, { optional: true });
27620
27636
  elementRef = inject(ElementRef);
27621
27637
  tableStoreService = inject(QdTableStoreService);
27638
+ _destroyRef = inject(DestroyRef);
27622
27639
  qdTablePaginatorPageSize;
27623
- _destroyed$ = new Subject();
27624
27640
  ngOnInit() {
27625
27641
  if (this.tableDataResolver) {
27626
27642
  fromEvent(this.elementRef.nativeElement, 'click')
27627
- .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)))
27628
27644
  .subscribe();
27629
27645
  }
27630
27646
  }
27631
- ngOnDestroy() {
27632
- this._destroyed$.next(null);
27633
- this._destroyed$.complete();
27634
- }
27635
27647
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTablePaginatorPageSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27636
27648
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: QdTablePaginatorPageSizeDirective, isStandalone: false, selector: "[qdTablePaginatorPageSize]", inputs: { qdTablePaginatorPageSize: "qdTablePaginatorPageSize" }, ngImport: i0 });
27637
27649
  }
@@ -27659,7 +27671,6 @@ class QdTablePaginatorPageSizeComponent {
27659
27671
  selectionDirection = 'up';
27660
27672
  pageSize$;
27661
27673
  totalCount$;
27662
- _destroyed$ = new Subject();
27663
27674
  get pageSizes$() {
27664
27675
  return combineLatest([this.pageSize$, this.totalCount$]).pipe(map(([currentPageSize, totalCount]) => this.pageSizes
27665
27676
  .slice(0, this.pageSizes.findIndex(pageSize => pageSize >= totalCount) + 1 || this.pageSizes.length)
@@ -27675,9 +27686,6 @@ class QdTablePaginatorPageSizeComponent {
27675
27686
  this.pageSize$ = this.tableStoreService.pageSize$();
27676
27687
  this.totalCount$ = this.tableStoreService.totalCount$();
27677
27688
  }
27678
- ngOnDestroy() {
27679
- this._destroyed$.complete();
27680
- }
27681
27689
  toggleSelection() {
27682
27690
  if (!this.selectionOpened) {
27683
27691
  this.openSelection();
@@ -27742,6 +27750,7 @@ class QdTablePaginatorComponent {
27742
27750
  tableStoreService = inject(QdTableStoreService);
27743
27751
  routerConnector = inject(QdTablePaginationRouterConnectorService);
27744
27752
  scrollAnchorService = inject(QdTableScrollAnchorService, { optional: true });
27753
+ _destroyRef = inject(DestroyRef);
27745
27754
  /**
27746
27755
  * @description Configuration Model for Qd-Table.
27747
27756
  */
@@ -27760,7 +27769,6 @@ class QdTablePaginatorComponent {
27760
27769
  totalCount$;
27761
27770
  selectedRowsCount$;
27762
27771
  pageNav = QdPaginatorDirection;
27763
- _destroyed$ = new Subject();
27764
27772
  get pageSizes() {
27765
27773
  if (typeof this.config?.pagination !== 'object')
27766
27774
  return [];
@@ -27780,10 +27788,6 @@ class QdTablePaginatorComponent {
27780
27788
  if (this.isConfigValid())
27781
27789
  this.startPagination();
27782
27790
  }
27783
- ngOnDestroy() {
27784
- this._destroyed$.next(null);
27785
- this._destroyed$.complete();
27786
- }
27787
27791
  /**
27788
27792
  * @description Whether this paginator should sync its state with the URL. Reads
27789
27793
  * `pagination.connectWithRouter` (default `false` — URL sync is opt-in and
@@ -27823,7 +27827,7 @@ class QdTablePaginatorComponent {
27823
27827
  return;
27824
27828
  this.tableStoreService
27825
27829
  .table$()
27826
- .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)))
27827
27831
  .subscribe();
27828
27832
  }
27829
27833
  applyPageParams(direction, table) {
@@ -27853,7 +27857,7 @@ class QdTablePaginatorComponent {
27853
27857
  }
27854
27858
  this.routerConnector
27855
27859
  .connectPaginationWithRouter(this, this.tableStoreService)
27856
- .pipe(takeUntil(this._destroyed$), take$1(1))
27860
+ .pipe(takeUntilDestroyed(this._destroyRef), take$1(1))
27857
27861
  .subscribe(connected => {
27858
27862
  if (!connected)
27859
27863
  this.initPagination();
@@ -28066,7 +28070,7 @@ class QdTableRowActionsSecondaryMenuComponent {
28066
28070
  actionsService = inject(QdTableSecondaryActionsService);
28067
28071
  tableStore = inject(QdTableStoreService);
28068
28072
  eventBroker = inject(QdEventBrokerService, { optional: true });
28069
- destroyRef = inject(DestroyRef);
28073
+ _destroyRef = inject(DestroyRef);
28070
28074
  rowIndex;
28071
28075
  rowData;
28072
28076
  actions;
@@ -28102,7 +28106,6 @@ class QdTableRowActionsSecondaryMenuComponent {
28102
28106
  this.evaluate(true);
28103
28107
  }
28104
28108
  ngOnDestroy() {
28105
- this.forgetAll();
28106
28109
  this._states$.next(new Map());
28107
28110
  }
28108
28111
  onActionClick(type) {
@@ -28120,7 +28123,7 @@ class QdTableRowActionsSecondaryMenuComponent {
28120
28123
  this._operationMode$ ??= this.eventBroker?.consume('operation_mode_changed');
28121
28124
  let isReplaying = true;
28122
28125
  this._viewModeSubscription = this._operationMode$
28123
- ?.pipe(takeUntilDestroyed(this.destroyRef))
28126
+ ?.pipe(takeUntilDestroyed(this._destroyRef))
28124
28127
  .subscribe(({ payload }) => {
28125
28128
  this._isViewonly = payload.isViewonly;
28126
28129
  if (!isReplaying)
@@ -28219,7 +28222,7 @@ class QdTableRowActionsSecondaryMenuComponent {
28219
28222
  this.forget(key);
28220
28223
  this._resolutions.set(key, resolution);
28221
28224
  resolution.subscription = availability$
28222
- .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))
28223
28226
  .subscribe(state => this.update(key, resolution, state));
28224
28227
  }
28225
28228
  update(key, resolution, state) {
@@ -28455,23 +28458,19 @@ class QdTableBodyComponent {
28455
28458
  tableStoreService = inject(QdTableStoreService);
28456
28459
  resolverService = inject(QdTableResolverService);
28457
28460
  cdr = inject(ChangeDetectorRef);
28458
- destroyRef = inject(DestroyRef);
28461
+ _destroyRef = inject(DestroyRef);
28459
28462
  config;
28460
28463
  data;
28461
28464
  testId;
28462
28465
  isLoading$;
28463
28466
  highlightedRowIdentifier;
28464
28467
  trackByRowIdentifier = (rowIndex, rowData) => resolveRowIdentifier(rowData, rowIndex, this.config.trackRowBy);
28465
- _primaryActionRefreshSubscription;
28466
28468
  constructor() {
28467
28469
  this.isLoading$ = this.tableStoreService.selectIsLoading$().pipe(debounceTime$1(400));
28468
28470
  }
28469
28471
  ngOnInit() {
28470
28472
  this.initHighlight();
28471
28473
  }
28472
- ngOnDestroy() {
28473
- this._primaryActionRefreshSubscription?.unsubscribe();
28474
- }
28475
28474
  isLastVisitedRow(rowData, rowIndex) {
28476
28475
  if (this.highlightedRowIdentifier === undefined)
28477
28476
  return false;
@@ -28487,9 +28486,7 @@ class QdTableBodyComponent {
28487
28486
  if (!this.config.primaryAction?.refresh?.isEnabled)
28488
28487
  return;
28489
28488
  if (result instanceof Observable) {
28490
- this._primaryActionRefreshSubscription = result
28491
- .pipe(take(1))
28492
- .subscribe(success => success && !this.destroyRef.destroyed && this.triggerRefresh());
28489
+ result.pipe(take(1), takeUntilDestroyed(this._destroyRef)).subscribe(success => success && this.triggerRefresh());
28493
28490
  return;
28494
28491
  }
28495
28492
  this.triggerRefresh();
@@ -28577,6 +28574,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
28577
28574
  const MULTI_SORT = false;
28578
28575
  class QdTableSortComponent {
28579
28576
  tableStoreService = inject(QdTableStoreService);
28577
+ _destroyRef = inject(DestroyRef);
28580
28578
  isSortable = false;
28581
28579
  config;
28582
28580
  column;
@@ -28585,7 +28583,6 @@ class QdTableSortComponent {
28585
28583
  isActive = false;
28586
28584
  showAsc$;
28587
28585
  showDesc$;
28588
- _isActiveSubscription = new Subscription();
28589
28586
  _direction = QdSortDirection.NONE;
28590
28587
  _multiSort = MULTI_SORT;
28591
28588
  get direction() {
@@ -28604,9 +28601,6 @@ class QdTableSortComponent {
28604
28601
  this.setShowAsc();
28605
28602
  this.setShowDesc();
28606
28603
  }
28607
- ngOnDestroy() {
28608
- this._isActiveSubscription.unsubscribe(); // takeUntil(_$destroyed) does not prevent call of selector projector
28609
- }
28610
28604
  getOpacity() {
28611
28605
  return this.isSortable && !this.isActive ? '.5' : '1';
28612
28606
  }
@@ -28629,12 +28623,12 @@ class QdTableSortComponent {
28629
28623
  this.direction = this.config?.direction || QdSortDirection.NONE;
28630
28624
  }
28631
28625
  subscribeIsActive() {
28632
- this._isActiveSubscription = this.tableStoreService
28626
+ this.tableStoreService
28633
28627
  .columnSortDirection$(this.column)
28634
28628
  .pipe(filter(() => this.isSortable), tap(direction => (this.isActive = direction !== QdSortDirection.NONE)), tap(() => {
28635
28629
  if (!this.isActive && !this._multiSort)
28636
28630
  this.direction = QdSortDirection.NONE;
28637
- }))
28631
+ }), takeUntilDestroyed(this._destroyRef))
28638
28632
  .subscribe();
28639
28633
  }
28640
28634
  updateSortDirection() {
@@ -28882,7 +28876,7 @@ class QdTableComponent {
28882
28876
  resolverService = inject(QdTableResolverService);
28883
28877
  confirmationDialogService = inject(QdConfirmationDialogOpenerService);
28884
28878
  sortRouterConnector = inject(QdTableSortRouterConnectorService);
28885
- destroyRef = inject(DestroyRef);
28879
+ _destroyRef = inject(DestroyRef);
28886
28880
  /**
28887
28881
  * Configuration of the table. The generic type specifies the column definition. <br />
28888
28882
  * Required. Without a config, the table throws an error on init and shows nothing. <br />
@@ -28969,11 +28963,6 @@ class QdTableComponent {
28969
28963
  hasEmptyStateView$;
28970
28964
  table$;
28971
28965
  _data = [];
28972
- _recentSecondaryActionsSubscription;
28973
- _rowSelectionServiceSubscription;
28974
- _emptyStateActionServiceSubscription;
28975
- _breakpointSubscription;
28976
- _pushEventsSubscription;
28977
28966
  _refreshSubscription;
28978
28967
  _deselectAllSubscription;
28979
28968
  _connectors = [];
@@ -29032,13 +29021,6 @@ class QdTableComponent {
29032
29021
  this.tableStoreService.resetConnectorStates();
29033
29022
  this.fillingWidthService.destroy();
29034
29023
  this.scrollAnchorService.destroy();
29035
- this._recentSecondaryActionsSubscription?.unsubscribe();
29036
- this._rowSelectionServiceSubscription?.unsubscribe();
29037
- this._emptyStateActionServiceSubscription?.unsubscribe();
29038
- this._breakpointSubscription?.unsubscribe();
29039
- this._pushEventsSubscription?.unsubscribe();
29040
- this._refreshSubscription?.unsubscribe();
29041
- this._deselectAllSubscription?.unsubscribe();
29042
29024
  if (!this.config.uid || this.config.refreshOnPushEvent)
29043
29025
  this.tableStoreService.deleteTableState();
29044
29026
  }
@@ -29064,7 +29046,10 @@ class QdTableComponent {
29064
29046
  }
29065
29047
  initializeResponsiveRowService() {
29066
29048
  this.responsiveRowService.config = this.config;
29067
- this._breakpointSubscription = this.breakpointService.getMatchingBreakpoint().subscribe(breakpoint => {
29049
+ this.breakpointService
29050
+ .getMatchingBreakpoint()
29051
+ .pipe(takeUntilDestroyed(this._destroyRef))
29052
+ .subscribe(breakpoint => {
29068
29053
  this.responsiveRowService.currentBreakpoint = breakpoint;
29069
29054
  });
29070
29055
  }
@@ -29084,14 +29069,16 @@ class QdTableComponent {
29084
29069
  this.fillingWidthService.updateTableConfig(this.config);
29085
29070
  }
29086
29071
  initializeEmptyStateService() {
29087
- this._emptyStateActionServiceSubscription = this.emptyStateService.emptyStateAction$.subscribe(() => this.emptyStateActionOutput.emit());
29072
+ this.emptyStateService.emptyStateAction$
29073
+ .pipe(takeUntilDestroyed(this._destroyRef))
29074
+ .subscribe(() => this.emptyStateActionOutput.emit());
29088
29075
  }
29089
29076
  initializeEmptyStateView() {
29090
29077
  this.hasEmptyStateView$ = this.hasData$.pipe(map(hasData => !hasData && !!this.config.emptyStateView && !this.config.emptyStateView.disabled));
29091
29078
  }
29092
29079
  initializeRowSelectionService() {
29093
29080
  this.rowSelectionService.config = this.config;
29094
- this._rowSelectionServiceSubscription = this.rowSelectionService.selectedRows$.subscribe(selectedRows => {
29081
+ this.rowSelectionService.selectedRows$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(selectedRows => {
29095
29082
  this.selectedRowsOutput.emit(selectedRows);
29096
29083
  this.config.selection?.handler?.(selectedRows);
29097
29084
  });
@@ -29102,7 +29089,9 @@ class QdTableComponent {
29102
29089
  }
29103
29090
  subscribeToDeselectAll(ignoresReplayedValue = false) {
29104
29091
  let isSubscribing = ignoresReplayedValue;
29105
- this._deselectAllSubscription = this.config.selection?.deselectAll$?.subscribe(() => {
29092
+ this._deselectAllSubscription = this.config.selection?.deselectAll$
29093
+ ?.pipe(takeUntilDestroyed(this._destroyRef))
29094
+ .subscribe(() => {
29106
29095
  if (!isSubscribing)
29107
29096
  this.rowSelectionService.clearAll();
29108
29097
  });
@@ -29119,9 +29108,9 @@ class QdTableComponent {
29119
29108
  }
29120
29109
  }
29121
29110
  initializeSecondaryActionsService() {
29122
- this._recentSecondaryActionsSubscription = this.tableStoreService
29111
+ this.tableStoreService
29123
29112
  .recentSecondaryAction$()
29124
- .pipe(switchMap(recentAction => this.whenSecondaryActionAvailable$(recentAction)))
29113
+ .pipe(switchMap(recentAction => this.whenSecondaryActionAvailable$(recentAction)), takeUntilDestroyed(this._destroyRef))
29125
29114
  .subscribe(recentAction => {
29126
29115
  this.secondaryActionOutput.emit(recentAction);
29127
29116
  const action = this.config.secondaryActions?.find(a => a.type === recentAction.type);
@@ -29168,7 +29157,7 @@ class QdTableComponent {
29168
29157
  const pushEventsService = this.pushEventsService;
29169
29158
  const events = [...(this.config?.refreshingEvents || []), 'RESOURCE_UPDATED'];
29170
29159
  const combinedEvents$ = merge(...events.map(eventName => pushEventsService.observe(eventName)));
29171
- this._pushEventsSubscription = combinedEvents$
29160
+ combinedEvents$
29172
29161
  .pipe(filter(messageEvent => {
29173
29162
  try {
29174
29163
  const data = JSON.parse(messageEvent.data);
@@ -29181,22 +29170,22 @@ class QdTableComponent {
29181
29170
  }), catchError(error => {
29182
29171
  console.error('Quadrel Framework | QdTable - Error in event stream:', error);
29183
29172
  return NEVER;
29184
- }))
29173
+ }), takeUntilDestroyed(this._destroyRef))
29185
29174
  .subscribe(() => this.triggerRefresh());
29186
29175
  }
29187
29176
  processSecondaryActionRefresh(result, refreshConfig) {
29188
29177
  if (result instanceof Observable) {
29189
29178
  result
29190
29179
  .pipe(take(1))
29191
- .subscribe(success => success && !this.destroyRef.destroyed && this.triggerRefresh(refreshConfig.page));
29180
+ .subscribe(success => success && !this._destroyRef.destroyed && this.triggerRefresh(refreshConfig.page));
29192
29181
  return;
29193
29182
  }
29194
- if (!this.destroyRef.destroyed)
29183
+ if (!this._destroyRef.destroyed)
29195
29184
  this.triggerRefresh(refreshConfig.page);
29196
29185
  }
29197
29186
  initRefresh(ignoresReplayedValue = false) {
29198
29187
  let isSubscribing = ignoresReplayedValue;
29199
- this._refreshSubscription = this.config.refresh?.subscribe(value => {
29188
+ this._refreshSubscription = this.config.refresh?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(value => {
29200
29189
  if (!isSubscribing)
29201
29190
  this.triggerRefresh(value);
29202
29191
  });
@@ -29406,13 +29395,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
29406
29395
  class QdConnectorTableContextDirective {
29407
29396
  tableComponent = inject(QdTableComponent, { host: true });
29408
29397
  contextService = inject(QdContextService);
29409
- destroyed = new Subject();
29398
+ _destroyRef = inject(DestroyRef);
29410
29399
  constructor() {
29411
29400
  this.tableComponent.registerConnector('context');
29412
29401
  }
29413
29402
  ngOnInit() {
29414
29403
  this.contextService.values$
29415
- .pipe(takeUntil$1(this.destroyed), map$1(values => ({
29404
+ .pipe(takeUntilDestroyed(this._destroyRef), map$1(values => ({
29416
29405
  ...values.reduce((previous, current) => ({
29417
29406
  ...previous,
29418
29407
  [current.contextId]: current.value
@@ -29420,10 +29409,6 @@ class QdConnectorTableContextDirective {
29420
29409
  })), tap$1(context => this.tableComponent.updateFromConnector('context', { context })))
29421
29410
  .subscribe();
29422
29411
  }
29423
- ngOnDestroy() {
29424
- this.destroyed.next(true);
29425
- this.destroyed.complete();
29426
- }
29427
29412
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdConnectorTableContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
29428
29413
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: QdConnectorTableContextDirective, isStandalone: false, selector: "qd-table[qdConnectToContext]", ngImport: i0 });
29429
29414
  }
@@ -29491,7 +29476,7 @@ class QdConnectorTableFilterDirective {
29491
29476
  */
29492
29477
  qdConnectToFilter;
29493
29478
  filterComponent;
29494
- _destroyed$ = new Subject();
29479
+ _destroyRef = inject(DestroyRef);
29495
29480
  constructor() {
29496
29481
  const toolbarComponentsService = this.toolbarComponentsService;
29497
29482
  if (!toolbarComponentsService)
@@ -29508,10 +29493,6 @@ class QdConnectorTableFilterDirective {
29508
29493
  this.filterComponent.updateFilterConfig({ ...this.qdConnectToFilter, emitOutputsInitially: true });
29509
29494
  }
29510
29495
  }
29511
- ngOnDestroy() {
29512
- this._destroyed$.next();
29513
- this._destroyed$.complete();
29514
- }
29515
29496
  setFilterComponent() {
29516
29497
  this.filterComponent = this.toolbarComponentsService.getComponent(QdFilterComponent);
29517
29498
  }
@@ -29524,7 +29505,7 @@ class QdConnectorTableFilterDirective {
29524
29505
  subscribeToFilterChanges() {
29525
29506
  this.filterComponent
29526
29507
  .getFilterChanges$()
29527
- .pipe(takeUntil(this._destroyed$), tap(filterChange => {
29508
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(filterChange => {
29528
29509
  this.tableComponent.updateFromConnector('filter', { filter: filterChange });
29529
29510
  }))
29530
29511
  .subscribe();
@@ -29608,12 +29589,12 @@ class QdConnectorTableManualRefreshDirective {
29608
29589
  tableComponent = inject(QdTableComponent, { host: true });
29609
29590
  manualRefreshService = inject(QdSectionManualRefreshService, { optional: true });
29610
29591
  tableDataResolver = inject(QD_TABLE_DATA_RESOLVER_TOKEN, { optional: true });
29611
- destroyRef = inject(DestroyRef);
29592
+ _destroyRef = inject(DestroyRef);
29612
29593
  constructor() {
29613
29594
  if (!this.manualRefreshService)
29614
29595
  throw new Error('Quadrel Framework | QdConnectorTableManualRefresh - Please use this directive only within <qd-section>.');
29615
29596
  const manualRefreshService = this.manualRefreshService;
29616
- this.destroyRef.onDestroy(() => manualRefreshService.disableManualRefresh());
29597
+ this._destroyRef.onDestroy(() => manualRefreshService.disableManualRefresh());
29617
29598
  }
29618
29599
  ngOnInit() {
29619
29600
  if (!this.tableDataResolver) {
@@ -29624,10 +29605,10 @@ class QdConnectorTableManualRefreshDirective {
29624
29605
  manualRefreshService.enableManualRefresh();
29625
29606
  this.tableComponent
29626
29607
  .selectIsLoadingForConnector$()
29627
- .pipe(takeUntilDestroyed(this.destroyRef))
29608
+ .pipe(takeUntilDestroyed(this._destroyRef))
29628
29609
  .subscribe(isLoading => manualRefreshService.setManualRefreshBlocked(isLoading));
29629
29610
  manualRefreshService.manualRefreshRequested$
29630
- .pipe(takeUntilDestroyed(this.destroyRef))
29611
+ .pipe(takeUntilDestroyed(this._destroyRef))
29631
29612
  .subscribe(() => this.tableComponent.refreshFromConnector());
29632
29613
  }
29633
29614
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdConnectorTableManualRefreshDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
@@ -29681,7 +29662,7 @@ class QdConnectorTableSearchDirective {
29681
29662
  */
29682
29663
  qdConnectToSearch;
29683
29664
  searchComponent;
29684
- _destroy$ = new Subject();
29665
+ _destroyRef = inject(DestroyRef);
29685
29666
  constructor() {
29686
29667
  const toolbarComponentsService = this.toolbarComponentsService;
29687
29668
  if (!toolbarComponentsService)
@@ -29695,10 +29676,6 @@ class QdConnectorTableSearchDirective {
29695
29676
  });
29696
29677
  this.subscribeToSearchChanges();
29697
29678
  }
29698
- ngOnDestroy() {
29699
- this._destroy$.next();
29700
- this._destroy$.complete();
29701
- }
29702
29679
  setSearchComponent() {
29703
29680
  this.searchComponent = this.toolbarComponentsService.getComponent(QdSearchComponent);
29704
29681
  }
@@ -29710,7 +29687,7 @@ class QdConnectorTableSearchDirective {
29710
29687
  subscribeToSearchChanges() {
29711
29688
  this.searchComponent
29712
29689
  .getSearchChanges$()
29713
- .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 })))
29714
29691
  .subscribe();
29715
29692
  }
29716
29693
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdConnectorTableSearchDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
@@ -29806,6 +29783,7 @@ class QdSectionToolbarActionComponent {
29806
29783
  changeDetectorRef = inject(ChangeDetectorRef);
29807
29784
  breakpointService = inject(QdBreakpointService);
29808
29785
  eventBroker = inject(QdEventBrokerService, { optional: true });
29786
+ _destroyRef = inject(DestroyRef);
29809
29787
  set config(config) {
29810
29788
  this._config = config;
29811
29789
  this.validateConfig();
@@ -29816,19 +29794,14 @@ class QdSectionToolbarActionComponent {
29816
29794
  groupedActionsMenu$;
29817
29795
  _config = {};
29818
29796
  _viewonly$ = new BehaviorSubject(false);
29819
- _destroy$ = new Subject();
29820
29797
  ngOnInit() {
29821
29798
  this.initViewMode();
29822
29799
  this.initActionStreams();
29823
29800
  }
29824
- ngOnDestroy() {
29825
- this._destroy$.next();
29826
- this._destroy$.complete();
29827
- }
29828
29801
  initViewMode() {
29829
29802
  this.eventBroker
29830
29803
  ?.consume('operation_mode_changed')
29831
- .pipe(takeUntil(this._destroy$))
29804
+ .pipe(takeUntilDestroyed(this._destroyRef))
29832
29805
  .subscribe(({ payload }) => {
29833
29806
  this._viewonly$.next(payload.isViewonly);
29834
29807
  this.changeDetectorRef.markForCheck();
@@ -29998,11 +29971,11 @@ class QdSectionToolbarComponent {
29998
29971
  this.isCollapsed = !this.isCollapsed;
29999
29972
  }
30000
29973
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdSectionToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30001
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdSectionToolbarComponent, isStandalone: false, selector: "qd-section-toolbar", inputs: { config: "config" }, viewQueries: [{ propertyName: "toolbarComponents", predicate: ["filter, search"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"{ toolbarHeader: true, collapsible: config.collapse?.isEnabled }\" (click)=\"toggleCollapse()\">\n @if (config.collapse?.isEnabled) {\n <qd-icon class=\"collapseIcon\" [icon]=\"isCollapsed ? 'ctrlRight' : 'ctrlDown'\"> </qd-icon>\n } @if (config.title) {\n <span class=\"toolbarTitle\" data-test-id=\"section-title\">{{ config.title.i18n | translate }}</span>\n } @if (isTooltipVisible) {\n <qd-icon class=\"additionalInfo\" icon=\"circleInfo\" qdTooltipOnClick [qdTooltipContent]=\"tooltipContent\"></qd-icon>\n }\n</div>\n\n@if (!isCollapsed) {\n<div class=\"toolbarRight\">\n <qd-search #search [configData]=\"searchConfigData\"></qd-search>\n @if (isManualRefreshEnabled$ | async) {\n <qd-section-toolbar-manual-refresh></qd-section-toolbar-manual-refresh>\n }\n <qd-section-toolbar-action qdViewportAdaptive class=\"toolbarAction\" [config]=\"config\"></qd-section-toolbar-action>\n</div>\n<qd-filter class=\"toolbarFilter\" #filter [filterData]=\"filterData\"></qd-filter>\n}\n", styles: [":host{position:relative;display:flex;flex-wrap:wrap;margin-bottom:.625rem;column-gap:.75rem}@media(max-width:959.98px){:host{column-gap:0}}:host .toolbarHeader{color:#333;font-size:1rem;font-weight:700;line-height:1.5rem;margin-bottom:.625rem}@media(max-width:599.98px){:host .toolbarHeader{margin-bottom:.3125rem}}:host .collapsible{cursor:pointer}:host .collapsible .toolbarTitle{margin-left:1.5rem}:host .collapseIcon{position:absolute;top:-.09375rem;font-size:1.375rem;font-weight:500}:host .additionalInfo{position:absolute;margin-left:.25rem;color:#069;cursor:pointer;font-size:1rem;font-weight:500}:host .additionalInfo:hover,:host .additionalInfo:focus,:host .additionalInfo:active{color:#14516f}:host .toolbarRight{display:inline-flex;margin-bottom:.625rem;margin-left:auto}@media(max-width:959.98px){:host .toolbarRight{display:flex;width:100%;flex-basis:100%;margin-left:auto}:host .toolbarRight qd-search{min-width:0;flex-basis:0;flex-grow:1;flex-shrink:1}:host .toolbarRight qd-section-toolbar-action{flex-basis:auto;flex-grow:0;flex-shrink:0}:host .toolbarRight qd-search.hidden+qd-section-toolbar-action,:host .toolbarRight qd-search.hidden+qd-section-toolbar-manual-refresh{margin-left:0}}:host .toolbarAction{display:flex;align-items:center}@media(max-width:959.98px){:host .toolbarAction{gap:.75rem}}:host .toolbarFilter{flex-basis:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "component", type: QdFilterComponent, selector: "qd-filter", inputs: ["filterData", "data-test-id"], outputs: ["queryStringOutput", "postBodyOutput", "valueChange"] }, { kind: "component", type: QdSearchComponent, selector: "qd-search", inputs: ["configData"] }, { kind: "directive", type: QdViewportAdaptiveDirective, selector: "[qdViewportAdaptive]" }, { kind: "directive", type: QdTooltipOnClickDirective, selector: "[qdTooltipOnClick]", inputs: ["qdTooltipContent"] }, { kind: "component", type: QdSectionToolbarActionComponent, selector: "qd-section-toolbar-action", inputs: ["config"] }, { kind: "component", type: QdSectionToolbarManualRefreshComponent, selector: "qd-section-toolbar-manual-refresh" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29974
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdSectionToolbarComponent, isStandalone: false, selector: "qd-section-toolbar", inputs: { config: "config" }, viewQueries: [{ propertyName: "toolbarComponents", predicate: ["filter, search"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"{ toolbarHeader: true, collapsible: config.collapse?.isEnabled }\" (click)=\"toggleCollapse()\">\n @if (config.collapse?.isEnabled) {\n <qd-icon class=\"collapseIcon\" [icon]=\"isCollapsed ? 'ctrlRight' : 'ctrlDown'\"> </qd-icon>\n } @if (config.title?.i18n; as titleKey) {\n <span class=\"toolbarTitle\" data-test-id=\"section-title\">{{ titleKey | translate }}</span>\n } @if (isTooltipVisible) {\n <qd-icon class=\"additionalInfo\" icon=\"circleInfo\" qdTooltipOnClick [qdTooltipContent]=\"tooltipContent\"></qd-icon>\n }\n</div>\n\n@if (!isCollapsed) {\n<div class=\"toolbarRight\">\n <qd-search #search [configData]=\"searchConfigData\"></qd-search>\n @if (isManualRefreshEnabled$ | async) {\n <qd-section-toolbar-manual-refresh></qd-section-toolbar-manual-refresh>\n }\n <qd-section-toolbar-action qdViewportAdaptive class=\"toolbarAction\" [config]=\"config\"></qd-section-toolbar-action>\n</div>\n<qd-filter class=\"toolbarFilter\" #filter [filterData]=\"filterData\"></qd-filter>\n}\n", styles: [":host{position:relative;display:flex;flex-wrap:wrap;margin-bottom:.625rem;column-gap:.75rem}@media(max-width:959.98px){:host{column-gap:0}}:host .toolbarHeader{color:#333;font-size:1rem;font-weight:700;line-height:1.5rem;margin-bottom:.625rem}@media(max-width:599.98px){:host .toolbarHeader{margin-bottom:.3125rem}}:host .collapsible{cursor:pointer}:host .collapsible .toolbarTitle{margin-left:1.5rem}:host .collapseIcon{position:absolute;top:-.09375rem;font-size:1.375rem;font-weight:500}:host .additionalInfo{position:absolute;margin-left:.25rem;color:#069;cursor:pointer;font-size:1rem;font-weight:500}:host .additionalInfo:hover,:host .additionalInfo:focus,:host .additionalInfo:active{color:#14516f}:host .toolbarRight{display:inline-flex;margin-bottom:.625rem;margin-left:auto}@media(max-width:959.98px){:host .toolbarRight{display:flex;width:100%;flex-basis:100%;margin-left:auto}:host .toolbarRight qd-search{min-width:0;flex-basis:0;flex-grow:1;flex-shrink:1}:host .toolbarRight qd-section-toolbar-action{flex-basis:auto;flex-grow:0;flex-shrink:0}:host .toolbarRight qd-search.hidden+qd-section-toolbar-action,:host .toolbarRight qd-search.hidden+qd-section-toolbar-manual-refresh{margin-left:0}}:host .toolbarAction{display:flex;align-items:center}@media(max-width:959.98px){:host .toolbarAction{gap:.75rem}}:host .toolbarFilter{flex-basis:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "component", type: QdFilterComponent, selector: "qd-filter", inputs: ["filterData", "data-test-id"], outputs: ["queryStringOutput", "postBodyOutput", "valueChange"] }, { kind: "component", type: QdSearchComponent, selector: "qd-search", inputs: ["configData"] }, { kind: "directive", type: QdViewportAdaptiveDirective, selector: "[qdViewportAdaptive]" }, { kind: "directive", type: QdTooltipOnClickDirective, selector: "[qdTooltipOnClick]", inputs: ["qdTooltipContent"] }, { kind: "component", type: QdSectionToolbarActionComponent, selector: "qd-section-toolbar-action", inputs: ["config"] }, { kind: "component", type: QdSectionToolbarManualRefreshComponent, selector: "qd-section-toolbar-manual-refresh" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
30002
29975
  }
30003
29976
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdSectionToolbarComponent, decorators: [{
30004
29977
  type: Component,
30005
- args: [{ selector: 'qd-section-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div [ngClass]=\"{ toolbarHeader: true, collapsible: config.collapse?.isEnabled }\" (click)=\"toggleCollapse()\">\n @if (config.collapse?.isEnabled) {\n <qd-icon class=\"collapseIcon\" [icon]=\"isCollapsed ? 'ctrlRight' : 'ctrlDown'\"> </qd-icon>\n } @if (config.title) {\n <span class=\"toolbarTitle\" data-test-id=\"section-title\">{{ config.title.i18n | translate }}</span>\n } @if (isTooltipVisible) {\n <qd-icon class=\"additionalInfo\" icon=\"circleInfo\" qdTooltipOnClick [qdTooltipContent]=\"tooltipContent\"></qd-icon>\n }\n</div>\n\n@if (!isCollapsed) {\n<div class=\"toolbarRight\">\n <qd-search #search [configData]=\"searchConfigData\"></qd-search>\n @if (isManualRefreshEnabled$ | async) {\n <qd-section-toolbar-manual-refresh></qd-section-toolbar-manual-refresh>\n }\n <qd-section-toolbar-action qdViewportAdaptive class=\"toolbarAction\" [config]=\"config\"></qd-section-toolbar-action>\n</div>\n<qd-filter class=\"toolbarFilter\" #filter [filterData]=\"filterData\"></qd-filter>\n}\n", styles: [":host{position:relative;display:flex;flex-wrap:wrap;margin-bottom:.625rem;column-gap:.75rem}@media(max-width:959.98px){:host{column-gap:0}}:host .toolbarHeader{color:#333;font-size:1rem;font-weight:700;line-height:1.5rem;margin-bottom:.625rem}@media(max-width:599.98px){:host .toolbarHeader{margin-bottom:.3125rem}}:host .collapsible{cursor:pointer}:host .collapsible .toolbarTitle{margin-left:1.5rem}:host .collapseIcon{position:absolute;top:-.09375rem;font-size:1.375rem;font-weight:500}:host .additionalInfo{position:absolute;margin-left:.25rem;color:#069;cursor:pointer;font-size:1rem;font-weight:500}:host .additionalInfo:hover,:host .additionalInfo:focus,:host .additionalInfo:active{color:#14516f}:host .toolbarRight{display:inline-flex;margin-bottom:.625rem;margin-left:auto}@media(max-width:959.98px){:host .toolbarRight{display:flex;width:100%;flex-basis:100%;margin-left:auto}:host .toolbarRight qd-search{min-width:0;flex-basis:0;flex-grow:1;flex-shrink:1}:host .toolbarRight qd-section-toolbar-action{flex-basis:auto;flex-grow:0;flex-shrink:0}:host .toolbarRight qd-search.hidden+qd-section-toolbar-action,:host .toolbarRight qd-search.hidden+qd-section-toolbar-manual-refresh{margin-left:0}}:host .toolbarAction{display:flex;align-items:center}@media(max-width:959.98px){:host .toolbarAction{gap:.75rem}}:host .toolbarFilter{flex-basis:100%}\n"] }]
29978
+ args: [{ selector: 'qd-section-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div [ngClass]=\"{ toolbarHeader: true, collapsible: config.collapse?.isEnabled }\" (click)=\"toggleCollapse()\">\n @if (config.collapse?.isEnabled) {\n <qd-icon class=\"collapseIcon\" [icon]=\"isCollapsed ? 'ctrlRight' : 'ctrlDown'\"> </qd-icon>\n } @if (config.title?.i18n; as titleKey) {\n <span class=\"toolbarTitle\" data-test-id=\"section-title\">{{ titleKey | translate }}</span>\n } @if (isTooltipVisible) {\n <qd-icon class=\"additionalInfo\" icon=\"circleInfo\" qdTooltipOnClick [qdTooltipContent]=\"tooltipContent\"></qd-icon>\n }\n</div>\n\n@if (!isCollapsed) {\n<div class=\"toolbarRight\">\n <qd-search #search [configData]=\"searchConfigData\"></qd-search>\n @if (isManualRefreshEnabled$ | async) {\n <qd-section-toolbar-manual-refresh></qd-section-toolbar-manual-refresh>\n }\n <qd-section-toolbar-action qdViewportAdaptive class=\"toolbarAction\" [config]=\"config\"></qd-section-toolbar-action>\n</div>\n<qd-filter class=\"toolbarFilter\" #filter [filterData]=\"filterData\"></qd-filter>\n}\n", styles: [":host{position:relative;display:flex;flex-wrap:wrap;margin-bottom:.625rem;column-gap:.75rem}@media(max-width:959.98px){:host{column-gap:0}}:host .toolbarHeader{color:#333;font-size:1rem;font-weight:700;line-height:1.5rem;margin-bottom:.625rem}@media(max-width:599.98px){:host .toolbarHeader{margin-bottom:.3125rem}}:host .collapsible{cursor:pointer}:host .collapsible .toolbarTitle{margin-left:1.5rem}:host .collapseIcon{position:absolute;top:-.09375rem;font-size:1.375rem;font-weight:500}:host .additionalInfo{position:absolute;margin-left:.25rem;color:#069;cursor:pointer;font-size:1rem;font-weight:500}:host .additionalInfo:hover,:host .additionalInfo:focus,:host .additionalInfo:active{color:#14516f}:host .toolbarRight{display:inline-flex;margin-bottom:.625rem;margin-left:auto}@media(max-width:959.98px){:host .toolbarRight{display:flex;width:100%;flex-basis:100%;margin-left:auto}:host .toolbarRight qd-search{min-width:0;flex-basis:0;flex-grow:1;flex-shrink:1}:host .toolbarRight qd-section-toolbar-action{flex-basis:auto;flex-grow:0;flex-shrink:0}:host .toolbarRight qd-search.hidden+qd-section-toolbar-action,:host .toolbarRight qd-search.hidden+qd-section-toolbar-manual-refresh{margin-left:0}}:host .toolbarAction{display:flex;align-items:center}@media(max-width:959.98px){:host .toolbarAction{gap:.75rem}}:host .toolbarFilter{flex-basis:100%}\n"] }]
30006
29979
  }], propDecorators: { config: [{
30007
29980
  type: Input
30008
29981
  }], toolbarComponents: [{
@@ -30083,6 +30056,7 @@ class QdSectionComponent {
30083
30056
  filterService = inject(QdFilterService);
30084
30057
  elementRef = inject(ElementRef);
30085
30058
  cdr = inject(ChangeDetectorRef);
30059
+ _destroyRef = inject(DestroyRef);
30086
30060
  /**
30087
30061
  * The configuration of the section.
30088
30062
  */
@@ -30134,9 +30108,6 @@ class QdSectionComponent {
30134
30108
  this.subscribeForOutputs();
30135
30109
  }
30136
30110
  }
30137
- ngOnDestroy() {
30138
- this.unsubscribeOutputSubscriptions();
30139
- }
30140
30111
  subscribeForOutputs() {
30141
30112
  this.subscribeForSearchOutputs();
30142
30113
  this.subscribeForActionOutput();
@@ -30145,11 +30116,17 @@ class QdSectionComponent {
30145
30116
  subscribeForSearchOutputs() {
30146
30117
  if (!this.config.search)
30147
30118
  return;
30148
- this._outputSubscriptions.push(this.searchService.searchQueryString$.subscribe(queryString => this.searchQueryStringOutput.emit(queryString)));
30149
- 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)));
30150
30125
  }
30151
30126
  subscribeForActionOutput() {
30152
- 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)));
30153
30130
  }
30154
30131
  subscribeForFilterOutputs() {
30155
30132
  if (!this.config.filter)
@@ -30158,12 +30135,15 @@ class QdSectionComponent {
30158
30135
  this.config.filter.uid = v4();
30159
30136
  this._outputSubscriptions.push(this.filterService
30160
30137
  .getQueryString$(this.config.filter.uid)
30138
+ .pipe(takeUntilDestroyed(this._destroyRef))
30161
30139
  .subscribe(queryString => this.filterQueryStringOutput.emit(queryString)));
30162
30140
  this._outputSubscriptions.push(this.filterService
30163
30141
  .getPostBody$(this.config.filter.uid)
30142
+ .pipe(takeUntilDestroyed(this._destroyRef))
30164
30143
  .subscribe(postBody => this.filterPostBodyOutput.emit(postBody)));
30165
30144
  this._outputSubscriptions.push(this.filterService
30166
30145
  .getCurrentPostBody(this.config.filter.uid)
30146
+ .pipe(takeUntilDestroyed(this._destroyRef))
30167
30147
  .subscribe(filterValue => this.filterValueChangeOutput.emit(filterValue)));
30168
30148
  }
30169
30149
  unsubscribeOutputSubscriptions() {
@@ -30906,7 +30886,7 @@ class QdTreeRowActionsSecondaryMenuComponent {
30906
30886
  _i18ns$ = new BehaviorSubject(undefined);
30907
30887
  _secondaryActionsConfig$ = new BehaviorSubject([]);
30908
30888
  _viewonly$ = new BehaviorSubject(false);
30909
- _destroy$ = new Subject();
30889
+ _destroyRef = inject(DestroyRef);
30910
30890
  actions$ = combineLatest([
30911
30891
  this._i18ns$,
30912
30892
  this._secondaryActionsConfig$,
@@ -30930,10 +30910,6 @@ class QdTreeRowActionsSecondaryMenuComponent {
30930
30910
  this._secondaryActionsConfig$.next(this.config.secondaryActions ?? []);
30931
30911
  this.initViewMode();
30932
30912
  }
30933
- ngOnDestroy() {
30934
- this._destroy$.next();
30935
- this._destroy$.complete();
30936
- }
30937
30913
  handleSecondaryAction(type, index, isHidden) {
30938
30914
  if (isHidden)
30939
30915
  return;
@@ -30950,7 +30926,7 @@ class QdTreeRowActionsSecondaryMenuComponent {
30950
30926
  }
30951
30927
  this.eventBroker
30952
30928
  ?.consume('operation_mode_changed')
30953
- .pipe(takeUntil(this._destroy$))
30929
+ .pipe(takeUntilDestroyed(this._destroyRef))
30954
30930
  .subscribe(({ payload }) => this._viewonly$.next(payload.isViewonly));
30955
30931
  }
30956
30932
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTreeRowActionsSecondaryMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -31174,6 +31150,7 @@ class QdTreeComponent {
31174
31150
  responsiveRowService = inject(QdTableResponsiveRowService);
31175
31151
  fillingWidthService = inject(QdTableFillingWidthService);
31176
31152
  breakpointService = inject(QdBreakpointService);
31153
+ _destroyRef = inject(DestroyRef);
31177
31154
  /**
31178
31155
  * Configuration of the tree table. The generic type specifies the column definition. <br />
31179
31156
  *
@@ -31246,9 +31223,6 @@ class QdTreeComponent {
31246
31223
  hasData$;
31247
31224
  hasEmptyStateView$;
31248
31225
  _table$;
31249
- _breakpointSubscription;
31250
- _emptyStateActionServiceSubscription;
31251
- _recentSecondaryActionsSubscription;
31252
31226
  get whichColumnFillsWidth() {
31253
31227
  return this.fillingWidthService.whichColumnFillsWidth;
31254
31228
  }
@@ -31277,9 +31251,6 @@ class QdTreeComponent {
31277
31251
  ngOnDestroy() {
31278
31252
  this.tableStoreService.updateTableStateRecentSecondaryAction(undefined);
31279
31253
  this.fillingWidthService.destroy();
31280
- this._emptyStateActionServiceSubscription?.unsubscribe();
31281
- this._breakpointSubscription?.unsubscribe();
31282
- this._recentSecondaryActionsSubscription?.unsubscribe();
31283
31254
  }
31284
31255
  validateConfig() {
31285
31256
  if (!this.config.i18ns) {
@@ -31301,7 +31272,10 @@ class QdTreeComponent {
31301
31272
  }
31302
31273
  initializeResponsiveRowService() {
31303
31274
  this.responsiveRowService.config = this.config;
31304
- this._breakpointSubscription = this.breakpointService.getMatchingBreakpoint().subscribe(breakpoint => {
31275
+ this.breakpointService
31276
+ .getMatchingBreakpoint()
31277
+ .pipe(takeUntilDestroyed(this._destroyRef))
31278
+ .subscribe(breakpoint => {
31305
31279
  this.responsiveRowService.currentBreakpoint = breakpoint;
31306
31280
  });
31307
31281
  }
@@ -31310,7 +31284,9 @@ class QdTreeComponent {
31310
31284
  }
31311
31285
  initializeEmptyStateService() {
31312
31286
  this.emptyStateService.i18ns = this.config.i18ns;
31313
- this._emptyStateActionServiceSubscription = this.emptyStateService.emptyStateAction$.subscribe(() => this.emptyStateActionOutput.emit());
31287
+ this.emptyStateService.emptyStateAction$
31288
+ .pipe(takeUntilDestroyed(this._destroyRef))
31289
+ .subscribe(() => this.emptyStateActionOutput.emit());
31314
31290
  }
31315
31291
  checkForChanges(changes, key) {
31316
31292
  return (changes[key] &&
@@ -31318,8 +31294,9 @@ class QdTreeComponent {
31318
31294
  JSON.stringify(changes[key].previousValue) !== JSON.stringify(changes[key].currentValue));
31319
31295
  }
31320
31296
  initializeSecondaryActions() {
31321
- this._recentSecondaryActionsSubscription = this.tableStoreService
31297
+ this.tableStoreService
31322
31298
  .recentSecondaryAction$()
31299
+ .pipe(takeUntilDestroyed(this._destroyRef))
31323
31300
  .subscribe(recentAction => {
31324
31301
  if (!recentAction)
31325
31302
  return;
@@ -32217,6 +32194,7 @@ class QdDynamicFacetComponent {
32217
32194
  data;
32218
32195
  testId;
32219
32196
  ref;
32197
+ inputNames = new Set();
32220
32198
  get component() {
32221
32199
  return this.ref?.instance;
32222
32200
  }
@@ -32229,19 +32207,27 @@ class QdDynamicFacetComponent {
32229
32207
  const viewContainerRef = this.dynamicFacet.viewContainerRef;
32230
32208
  viewContainerRef.clear();
32231
32209
  this.ref = viewContainerRef.createComponent(facet);
32232
- this.ref.instance.facet = this.facet;
32233
- this.ref.instance.data = this.data;
32234
- this.ref.instance.testId = this.testId;
32210
+ this.inputNames = new Set(reflectComponentType(facet)?.inputs.map(input => input.templateName) ?? []);
32211
+ this.setFacetValue('facet', this.facet);
32212
+ this.setFacetValue('data', this.data);
32213
+ this.setFacetValue('testId', this.testId);
32235
32214
  }
32236
32215
  ngOnChanges(changes) {
32237
32216
  if (!this.component)
32238
32217
  return;
32239
32218
  if (changes['facet'])
32240
- this.component.facet = changes['facet'].currentValue;
32219
+ this.setFacetValue('facet', changes['facet'].currentValue);
32241
32220
  if (changes['data'])
32242
- this.component.data = changes['data'].currentValue;
32221
+ this.setFacetValue('data', changes['data'].currentValue);
32243
32222
  if (changes['testId'])
32244
- this.component.testId = changes['testId'].currentValue;
32223
+ this.setFacetValue('testId', changes['testId'].currentValue);
32224
+ }
32225
+ setFacetValue(name, value) {
32226
+ if (this.inputNames.has(name)) {
32227
+ this.ref.setInput(name, value);
32228
+ return;
32229
+ }
32230
+ this.ref.instance[name] = value;
32245
32231
  }
32246
32232
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdDynamicFacetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32247
32233
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: QdDynamicFacetComponent, isStandalone: false, selector: "qd-dynamic-facet", inputs: { facet: "facet", data: "data", testId: "testId" }, viewQueries: [{ propertyName: "dynamicFacet", first: true, predicate: QdDynamicFacetDirective, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template [qdDynamicFacet]></ng-template>\n", dependencies: [{ kind: "directive", type: QdDynamicFacetDirective, selector: "[qdDynamicFacet]" }] });
@@ -32293,7 +32279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
32293
32279
 
32294
32280
  class QdPageCommitActionExecutor {
32295
32281
  static execute(action, values, context) {
32296
- const { formGroupManager, navigationInterceptor, destroyed$, onAfterSnapshot, scheduleFrameworkRebuildStop } = context;
32282
+ const { formGroupManager, navigationInterceptor, destroyRef, onAfterSnapshot, scheduleFrameworkRebuildStop } = context;
32297
32283
  const captured = formGroupManager.createCurrentValuesSnapshot();
32298
32284
  let result$;
32299
32285
  navigationInterceptor.executeWithBypass(() => {
@@ -32321,7 +32307,7 @@ class QdPageCommitActionExecutor {
32321
32307
  });
32322
32308
  };
32323
32309
  if (result$) {
32324
- result$.pipe(take(1), takeUntil(destroyed$)).subscribe({
32310
+ result$.pipe(take(1), takeUntilDestroyed(destroyRef)).subscribe({
32325
32311
  next: ok => {
32326
32312
  if (ok)
32327
32313
  applySuccess();
@@ -32382,6 +32368,7 @@ class QdPageCommitActionExecutor {
32382
32368
  * - No structural information is stored in the snapshot, only data.
32383
32369
  */
32384
32370
  class QdFormGroupManagerService {
32371
+ _destroyRef = inject(DestroyRef);
32385
32372
  _formGroups = new Map();
32386
32373
  _formGroupsSnapshot = new Map();
32387
32374
  _knownControlInstances = new Map();
@@ -32566,7 +32553,9 @@ class QdFormGroupManagerService {
32566
32553
  this._frameworkRebuildSub?.unsubscribe();
32567
32554
  const valueStreams = Array.from(this._formGroups.values()).map(fg => fg.valueChanges);
32568
32555
  if (valueStreams.length)
32569
- this._frameworkRebuildSub = merge(...valueStreams).subscribe(() => this.adoptFrameworkRebuild());
32556
+ this._frameworkRebuildSub = merge(...valueStreams)
32557
+ .pipe(takeUntilDestroyed(this._destroyRef))
32558
+ .subscribe(() => this.adoptFrameworkRebuild());
32570
32559
  this.adoptFrameworkRebuild();
32571
32560
  }
32572
32561
  /**
@@ -32805,7 +32794,7 @@ class QdPageNavigationInterceptorService {
32805
32794
  router = inject(Router);
32806
32795
  formGroupManager = inject(QdFormGroupManagerService);
32807
32796
  confirmationDialog = inject(QdConfirmationDialogOpenerService);
32808
- _destroy$ = new Subject();
32797
+ _destroyRef = inject(DestroyRef);
32809
32798
  _deactivate$ = new Subject();
32810
32799
  /**
32811
32800
  * Guards the re-dispatched navigation issued after the user confirms discard. While the dialog
@@ -32822,8 +32811,6 @@ class QdPageNavigationInterceptorService {
32822
32811
  _confirmationMessage;
32823
32812
  ngOnDestroy() {
32824
32813
  this._confirmedTargetUrl = undefined;
32825
- this._destroy$.next();
32826
- this._destroy$.complete();
32827
32814
  this._deactivate$.complete();
32828
32815
  }
32829
32816
  /**
@@ -32860,7 +32847,7 @@ class QdPageNavigationInterceptorService {
32860
32847
  }
32861
32848
  listenForUnsavedNavigationAttempts() {
32862
32849
  this.router.events
32863
- .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))
32864
32851
  .subscribe(({ targetUrl }) => this.navigateToConfirmedTarget(targetUrl));
32865
32852
  }
32866
32853
  shouldIntercept(event) {
@@ -32960,6 +32947,7 @@ class QdPageObjectHeaderComponent {
32960
32947
  resolverTriggerService = inject(QdResolverTriggerService);
32961
32948
  injector = inject(Injector);
32962
32949
  pageStoreService = inject(QdPageStoreService);
32950
+ _destroyRef = inject(DestroyRef);
32963
32951
  _pageObjectDataSubject = new BehaviorSubject({});
32964
32952
  _isLoadingSubject = new BehaviorSubject(false);
32965
32953
  _customActionsSubject = new BehaviorSubject({ actions: [] });
@@ -32967,7 +32955,6 @@ class QdPageObjectHeaderComponent {
32967
32955
  _metadataSub;
32968
32956
  _pendingMetadata = {};
32969
32957
  _metadataStreamTypeWarned = false;
32970
- _destroyed$ = new Subject();
32971
32958
  _availableContexts = 0;
32972
32959
  pageObjectData$ = this._pageObjectDataSubject.asObservable();
32973
32960
  isLoading$ = this._isLoadingSubject.asObservable().pipe(debounceTime(400));
@@ -33007,7 +32994,7 @@ class QdPageObjectHeaderComponent {
33007
32994
  return undefined;
33008
32995
  }
33009
32996
  get isInspectAndViewMode$() {
33010
- 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));
33011
32998
  }
33012
32999
  get isCreate() {
33013
33000
  return this.config.pageType === 'create';
@@ -33068,8 +33055,6 @@ class QdPageObjectHeaderComponent {
33068
33055
  }
33069
33056
  ngOnDestroy() {
33070
33057
  this.pageStoreService.toggleViewonly(false);
33071
- this._destroyed$.next();
33072
- this._destroyed$.complete();
33073
33058
  }
33074
33059
  updateMetadata(metadata) {
33075
33060
  this._pendingMetadata = { ...this._pendingMetadata, ...metadata };
@@ -33108,7 +33093,7 @@ class QdPageObjectHeaderComponent {
33108
33093
  QdPageCommitActionExecutor.execute(saveAction, this.formGroupManagerService.getAllValues(), {
33109
33094
  formGroupManager: this.formGroupManagerService,
33110
33095
  navigationInterceptor: this.navigationInterceptor,
33111
- destroyed$: this._destroyed$,
33096
+ destroyRef: this._destroyRef,
33112
33097
  onAfterSnapshot: () => {
33113
33098
  this.formGroupManagerService.cancelPendingAsyncValidation();
33114
33099
  this.pageStoreService.toggleViewonly(true);
@@ -33139,10 +33124,10 @@ class QdPageObjectHeaderComponent {
33139
33124
  setupResolverTrigger(resolver) {
33140
33125
  this.resolverTriggerService
33141
33126
  .shouldTriggerResolver(resolver.config?.triggerOn ?? 'pathParamsChange')
33142
- .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 => {
33143
33128
  this._pageObjectDataSubject.next({ ...objectData, ...this._pendingMetadata });
33144
33129
  this._pendingMetadata = {};
33145
- }), tap(() => this._isLoadingSubject.next(false)), tap(() => this.formGroupManagerService.updateSavedSnapshotFromCurrentValues()))
33130
+ }), tap(() => this._isLoadingSubject.next(false)), tap(() => this.formGroupManagerService.updateSavedSnapshotFromCurrentValues()), takeUntilDestroyed(this._destroyRef))
33146
33131
  .subscribe();
33147
33132
  }
33148
33133
  initContexts() {
@@ -33159,7 +33144,7 @@ class QdPageObjectHeaderComponent {
33159
33144
  selection: selection?.value ?? []
33160
33145
  }))));
33161
33146
  this.contexts$
33162
- .pipe(takeUntil(this._destroyed$), tap(contexts => (this._availableContexts = contexts.length)))
33147
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(contexts => (this._availableContexts = contexts.length)))
33163
33148
  .subscribe();
33164
33149
  }
33165
33150
  updateCustomActions() {
@@ -33179,7 +33164,9 @@ class QdPageObjectHeaderComponent {
33179
33164
  if (!metadata$)
33180
33165
  return;
33181
33166
  this.warnOnNonReplayMetadataStream(metadata$);
33182
- 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));
33183
33170
  }
33184
33171
  warnOnNonReplayMetadataStream(metadata$) {
33185
33172
  if (!isDevMode() || this._metadataStreamTypeWarned)
@@ -33196,7 +33183,7 @@ class QdPageObjectHeaderComponent {
33196
33183
  subscribeToViewOnlyMode() {
33197
33184
  this._customActionsSub?.unsubscribe();
33198
33185
  this._customActionsSub = this.pageStoreService.isViewonly$
33199
- .pipe(takeUntil(this._destroyed$))
33186
+ .pipe(takeUntilDestroyed(this._destroyRef))
33200
33187
  .subscribe(isViewonly => {
33201
33188
  const mode = isViewonly ? 'view' : 'edit';
33202
33189
  const config = this.config.pageTypeConfig;
@@ -33220,7 +33207,7 @@ class QdPageObjectHeaderComponent {
33220
33207
  const cancelConfig = this.config.pageTypeConfig?.cancel;
33221
33208
  this.confirmationDialogService
33222
33209
  .showDiscardConfirmDialog(cancelConfig?.confirmationMessage, this.testId + '-cancel-confirmation')
33223
- .pipe(takeUntil(this._destroyed$))
33210
+ .pipe(takeUntilDestroyed(this._destroyRef))
33224
33211
  .subscribe(confirmed => {
33225
33212
  if (confirmed) {
33226
33213
  cancelConfig?.handler?.();
@@ -33431,6 +33418,7 @@ class QdPageStepperComponent extends CdkStepper {
33431
33418
  router = inject(Router);
33432
33419
  dialog = inject(QdDialogService);
33433
33420
  pageService = inject(QdPageStoreService);
33421
+ _destroyRef = inject(DestroyRef);
33434
33422
  /**
33435
33423
  * Configuration of QdPageStepperComponent.
33436
33424
  *
@@ -33449,7 +33437,6 @@ class QdPageStepperComponent extends CdkStepper {
33449
33437
  steps = new QueryList();
33450
33438
  selectedStepValid$;
33451
33439
  allStepsValid$;
33452
- _destroyed$ = new Subject();
33453
33440
  isGoingToNextStep = false;
33454
33441
  get hasPageFooter() {
33455
33442
  return !!this.footerService;
@@ -33466,7 +33453,9 @@ class QdPageStepperComponent extends CdkStepper {
33466
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.');
33467
33454
  }
33468
33455
  if (this.footerService) {
33469
- this.selectedIndexChange.pipe(takeUntil(this._destroyed$)).subscribe(() => this.updateFooterActionsVisibility());
33456
+ this.selectedIndexChange
33457
+ .pipe(takeUntilDestroyed(this._destroyRef))
33458
+ .subscribe(() => this.updateFooterActionsVisibility());
33470
33459
  }
33471
33460
  this.selectedStepValid$ = this.isSelectedStepValid$();
33472
33461
  this.allStepsValid$ = this.areAllStepsValid$();
@@ -33484,12 +33473,7 @@ class QdPageStepperComponent extends CdkStepper {
33484
33473
  this.updateFooterActionsVisibility();
33485
33474
  }
33486
33475
  // Mark component for change detection whenever the content children query changes
33487
- this.steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => this._stateChanged());
33488
- }
33489
- ngOnDestroy() {
33490
- super.ngOnDestroy();
33491
- this._destroyed$.next(null);
33492
- this._destroyed$.complete();
33476
+ this.steps.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this._stateChanged());
33493
33477
  }
33494
33478
  handleClickHeader(step, clickedIndex) {
33495
33479
  if (this.selectedIndex === clickedIndex)
@@ -33554,7 +33538,7 @@ class QdPageStepperComponent extends CdkStepper {
33554
33538
  dialogSize: QdDialogSize.Small,
33555
33539
  title: { i18n: 'i18n.qd.stepper.cancel.dialog.title' }
33556
33540
  })
33557
- .closed.pipe(takeUntil(this._destroyed))
33541
+ .closed.pipe(takeUntilDestroyed(this._destroyRef))
33558
33542
  .subscribe(confirmed => {
33559
33543
  if (confirmed) {
33560
33544
  const handler = this.pageService.getConfig()?.pageTypeConfig?.cancel?.handler ||
@@ -33662,10 +33646,10 @@ class QdPageStepperComponent extends CdkStepper {
33662
33646
  }
33663
33647
  updateFooterActionsDisabledState() {
33664
33648
  this.isSelectedStepValid$()
33665
- .pipe(takeUntil(this._destroyed$))
33649
+ .pipe(takeUntilDestroyed(this._destroyRef))
33666
33650
  .subscribe(isValid => this.footerService.updateActions([{ actionKey: 'next', partialAction: { isDisabled: !isValid } }]));
33667
33651
  this.areAllStepsValid$()
33668
- .pipe(takeUntil(this._destroyed$))
33652
+ .pipe(takeUntilDestroyed(this._destroyRef))
33669
33653
  .subscribe(isValid => this.footerService.updateActions([{ actionKey: 'submit', partialAction: { isDisabled: !isValid } }]));
33670
33654
  }
33671
33655
  blockCdkInput(inputName) {
@@ -34247,7 +34231,7 @@ class QdPageTabsComponent {
34247
34231
  pageStoreService = inject(QdPageStoreService);
34248
34232
  routerConnector = inject(QdPageTabsRouterConnectorService);
34249
34233
  _changeDetectorRef = inject(ChangeDetectorRef);
34250
- destroyRef = inject(DestroyRef);
34234
+ _destroyRef = inject(DestroyRef);
34251
34235
  static _idCounter = 0;
34252
34236
  _id = QdPageTabsComponent._idCounter++;
34253
34237
  get hasPageFooter() {
@@ -34304,7 +34288,7 @@ class QdPageTabsComponent {
34304
34288
  }
34305
34289
  ngOnInit() {
34306
34290
  this.linear = false;
34307
- this.pageStoreService.isViewonly$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(v => {
34291
+ this.pageStoreService.isViewonly$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(v => {
34308
34292
  this._viewonly = v;
34309
34293
  this._stateChanged();
34310
34294
  });
@@ -34315,7 +34299,7 @@ class QdPageTabsComponent {
34315
34299
  .forEach(inputName => this.blockCdkInput(inputName));
34316
34300
  }
34317
34301
  ngAfterContentInit() {
34318
- this._tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this._stateChanged());
34302
+ this._tabs.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this._stateChanged());
34319
34303
  }
34320
34304
  ngAfterViewInit() {
34321
34305
  setTimeout(() => {
@@ -34367,7 +34351,7 @@ class QdPageTabsComponent {
34367
34351
  this.selectFirstNotDisabledTab();
34368
34352
  }
34369
34353
  configureBookmarkableTabs() {
34370
- this.routerConnector.connectTabsWithRouter(this).pipe(takeUntilDestroyed(this.destroyRef)).subscribe();
34354
+ this.routerConnector.connectTabsWithRouter(this).pipe(takeUntilDestroyed(this._destroyRef)).subscribe();
34371
34355
  }
34372
34356
  isTabSelectable(index) {
34373
34357
  const tab = this._tabs.get(index);
@@ -34395,11 +34379,11 @@ class QdPageTabsComponent {
34395
34379
  throw new Error(`Quadrel Framework | QdPageTabs - The use of the "${inputName}" attribute is not permitted. Please use QdPageTabsConfig instead.`);
34396
34380
  }
34397
34381
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdPageTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
34398
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdPageTabsComponent, isStandalone: true, selector: "qd-page-tabs", inputs: { config: "config", testId: ["data-test-id", "testId"] }, outputs: { tabSelection: "tabSelection" }, host: { properties: { "class.standalone": "!footerService" }, classAttribute: "qd-tabs" }, providers: [QdPageTabsRouterConnectorService], queries: [{ propertyName: "_tabs", predicate: i0.forwardRef(() => QdPageTabComponent) }], usesOnChanges: true, ngImport: i0, template: "<div class=\"qd-tabs-items-container\" [ngClass]=\"{ scrollable: config?.scrollabe }\">\n @for (tab of tabs; track tab; let i = $index) {\n <qd-page-tab-header\n (click)=\"selectTab(tab)\"\n [id]=\"_getTabLabelId(i)\"\n [index]=\"i\"\n [state]=\"_getIndicatorType(i)\"\n [label]=\"tab.config.label.i18n | translate\"\n [counters]=\"tab.config.counters\"\n [isSelected]=\"selectedIndex === i\"\n [isDisabled]=\"tab.config?.isDisabled\"\n [data-test-id]=\"testId + '-header' + '-' + i\"\n >\n </qd-page-tab-header>\n }\n</div>\n\n<div class=\"tabs-content\">\n @if (!selected?.config?.isDisabled) {\n <ng-container [ngTemplateOutlet]=\"selected?.content\"></ng-container>\n }\n</div>\n\n@if (isSubmitButtonShown()) {\n<div class=\"qd-tabs-action-area\">\n <button qdButton (click)=\"save()\" [disabled]=\"isSubmitButtonDisabled()\" [data-test-id]=\"testId + '-submit'\">\n {{ config?.submitButton?.i18n || \"i18n.qd.tabs.button.submit\" | translate }}\n </button>\n</div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host.standalone{height:calc(100% - 50px)}:host .qd-tabs-items-container{display:flex;width:100%;flex-direction:row;flex-wrap:wrap;padding:0 1.25rem;border-bottom:.125rem solid rgb(213,213,213);background-color:#fff;gap:0 .9375rem}@media(max-width:599.98px){:host .qd-tabs-items-container{padding:0 .9375rem}}@media(max-width:1279.98px){:host .qd-tabs-items-container.scrollable{flex-wrap:nowrap;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none}}:host .tabs-content{flex:1 1 auto}:host .qd-tabs-action-area{display:flex;width:100%;height:50px;justify-content:flex-end}:host .qd-tabs-action-area button{margin-right:1.25rem}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: QdPageTabHeaderComponent, selector: "qd-page-tab-header", inputs: ["state", "label", "counters", "index", "isSelected", "isDisabled", "data-test-id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: QdButtonModule }, { kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
34382
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdPageTabsComponent, isStandalone: true, selector: "qd-page-tabs", inputs: { config: "config", testId: ["data-test-id", "testId"] }, outputs: { tabSelection: "tabSelection" }, host: { properties: { "class.standalone": "!footerService" }, classAttribute: "qd-tabs" }, providers: [QdPageTabsRouterConnectorService], queries: [{ propertyName: "_tabs", predicate: i0.forwardRef(() => QdPageTabComponent) }], usesOnChanges: true, ngImport: i0, template: "<div class=\"qd-tabs-items-container\" [ngClass]=\"{ scrollable: config?.scrollable ?? config?.scrollabe }\">\n @for (tab of tabs; track tab; let i = $index) {\n <qd-page-tab-header\n (click)=\"selectTab(tab)\"\n [id]=\"_getTabLabelId(i)\"\n [index]=\"i\"\n [state]=\"_getIndicatorType(i)\"\n [label]=\"tab.config.label.i18n | translate\"\n [counters]=\"tab.config.counters\"\n [isSelected]=\"selectedIndex === i\"\n [isDisabled]=\"tab.config?.isDisabled\"\n [data-test-id]=\"testId + '-header' + '-' + i\"\n >\n </qd-page-tab-header>\n }\n</div>\n\n<div class=\"tabs-content\">\n @if (!selected?.config?.isDisabled) {\n <ng-container [ngTemplateOutlet]=\"selected?.content\"></ng-container>\n }\n</div>\n\n@if (isSubmitButtonShown()) {\n<div class=\"qd-tabs-action-area\">\n <button qdButton (click)=\"save()\" [disabled]=\"isSubmitButtonDisabled()\" [data-test-id]=\"testId + '-submit'\">\n {{ config?.submitButton?.i18n || \"i18n.qd.tabs.button.submit\" | translate }}\n </button>\n</div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host.standalone{height:calc(100% - 50px)}:host .qd-tabs-items-container{display:flex;width:100%;flex-direction:row;flex-wrap:wrap;padding:0 1.25rem;border-bottom:.125rem solid rgb(213,213,213);background-color:#fff;gap:0 .9375rem}@media(max-width:599.98px){:host .qd-tabs-items-container{padding:0 .9375rem}}@media(max-width:1279.98px){:host .qd-tabs-items-container.scrollable{flex-wrap:nowrap;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none}}:host .tabs-content{flex:1 1 auto}:host .qd-tabs-action-area{display:flex;width:100%;height:50px;justify-content:flex-end}:host .qd-tabs-action-area button{margin-right:1.25rem}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: QdPageTabHeaderComponent, selector: "qd-page-tab-header", inputs: ["state", "label", "counters", "index", "isSelected", "isDisabled", "data-test-id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: QdButtonModule }, { kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
34399
34383
  }
34400
34384
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdPageTabsComponent, decorators: [{
34401
34385
  type: Component,
34402
- args: [{ selector: 'qd-page-tabs', providers: [QdPageTabsRouterConnectorService], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'qd-tabs', '[class.standalone]': '!footerService' }, standalone: true, imports: [NgFor, NgIf, NgTemplateOutlet, QdPageTabHeaderComponent, TranslateModule, QdButtonModule, CommonModule], template: "<div class=\"qd-tabs-items-container\" [ngClass]=\"{ scrollable: config?.scrollabe }\">\n @for (tab of tabs; track tab; let i = $index) {\n <qd-page-tab-header\n (click)=\"selectTab(tab)\"\n [id]=\"_getTabLabelId(i)\"\n [index]=\"i\"\n [state]=\"_getIndicatorType(i)\"\n [label]=\"tab.config.label.i18n | translate\"\n [counters]=\"tab.config.counters\"\n [isSelected]=\"selectedIndex === i\"\n [isDisabled]=\"tab.config?.isDisabled\"\n [data-test-id]=\"testId + '-header' + '-' + i\"\n >\n </qd-page-tab-header>\n }\n</div>\n\n<div class=\"tabs-content\">\n @if (!selected?.config?.isDisabled) {\n <ng-container [ngTemplateOutlet]=\"selected?.content\"></ng-container>\n }\n</div>\n\n@if (isSubmitButtonShown()) {\n<div class=\"qd-tabs-action-area\">\n <button qdButton (click)=\"save()\" [disabled]=\"isSubmitButtonDisabled()\" [data-test-id]=\"testId + '-submit'\">\n {{ config?.submitButton?.i18n || \"i18n.qd.tabs.button.submit\" | translate }}\n </button>\n</div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host.standalone{height:calc(100% - 50px)}:host .qd-tabs-items-container{display:flex;width:100%;flex-direction:row;flex-wrap:wrap;padding:0 1.25rem;border-bottom:.125rem solid rgb(213,213,213);background-color:#fff;gap:0 .9375rem}@media(max-width:599.98px){:host .qd-tabs-items-container{padding:0 .9375rem}}@media(max-width:1279.98px){:host .qd-tabs-items-container.scrollable{flex-wrap:nowrap;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none}}:host .tabs-content{flex:1 1 auto}:host .qd-tabs-action-area{display:flex;width:100%;height:50px;justify-content:flex-end}:host .qd-tabs-action-area button{margin-right:1.25rem}\n"] }]
34386
+ args: [{ selector: 'qd-page-tabs', providers: [QdPageTabsRouterConnectorService], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'qd-tabs', '[class.standalone]': '!footerService' }, standalone: true, imports: [NgFor, NgIf, NgTemplateOutlet, QdPageTabHeaderComponent, TranslateModule, QdButtonModule, CommonModule], template: "<div class=\"qd-tabs-items-container\" [ngClass]=\"{ scrollable: config?.scrollable ?? config?.scrollabe }\">\n @for (tab of tabs; track tab; let i = $index) {\n <qd-page-tab-header\n (click)=\"selectTab(tab)\"\n [id]=\"_getTabLabelId(i)\"\n [index]=\"i\"\n [state]=\"_getIndicatorType(i)\"\n [label]=\"tab.config.label.i18n | translate\"\n [counters]=\"tab.config.counters\"\n [isSelected]=\"selectedIndex === i\"\n [isDisabled]=\"tab.config?.isDisabled\"\n [data-test-id]=\"testId + '-header' + '-' + i\"\n >\n </qd-page-tab-header>\n }\n</div>\n\n<div class=\"tabs-content\">\n @if (!selected?.config?.isDisabled) {\n <ng-container [ngTemplateOutlet]=\"selected?.content\"></ng-container>\n }\n</div>\n\n@if (isSubmitButtonShown()) {\n<div class=\"qd-tabs-action-area\">\n <button qdButton (click)=\"save()\" [disabled]=\"isSubmitButtonDisabled()\" [data-test-id]=\"testId + '-submit'\">\n {{ config?.submitButton?.i18n || \"i18n.qd.tabs.button.submit\" | translate }}\n </button>\n</div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host.standalone{height:calc(100% - 50px)}:host .qd-tabs-items-container{display:flex;width:100%;flex-direction:row;flex-wrap:wrap;padding:0 1.25rem;border-bottom:.125rem solid rgb(213,213,213);background-color:#fff;gap:0 .9375rem}@media(max-width:599.98px){:host .qd-tabs-items-container{padding:0 .9375rem}}@media(max-width:1279.98px){:host .qd-tabs-items-container.scrollable{flex-wrap:nowrap;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none}}:host .tabs-content{flex:1 1 auto}:host .qd-tabs-action-area{display:flex;width:100%;height:50px;justify-content:flex-end}:host .qd-tabs-action-area button{margin-right:1.25rem}\n"] }]
34403
34387
  }], propDecorators: { config: [{
34404
34388
  type: Input
34405
34389
  }], testId: [{
@@ -34417,15 +34401,11 @@ class QdPageSubmitActionService {
34417
34401
  formGroupManagerService = inject(QdFormGroupManagerService);
34418
34402
  navigationInterceptor = inject(QdPageNavigationInterceptorService);
34419
34403
  injector = inject(Injector);
34404
+ _destroyRef = inject(DestroyRef);
34420
34405
  _labelI18n = 'i18n.qd.page.footer.submit';
34421
34406
  _submitAction;
34422
34407
  _isVisible = true;
34423
- _destroyed$ = new Subject();
34424
34408
  _cancelTrackFormValidity$ = new Subject();
34425
- ngOnDestroy() {
34426
- this._destroyed$.next(null);
34427
- this._destroyed$.complete();
34428
- }
34429
34409
  setSubmitActionForInspect(pageTypeConfig, isVisible) {
34430
34410
  if (!pageTypeConfig?.submit)
34431
34411
  return;
@@ -34460,7 +34440,7 @@ class QdPageSubmitActionService {
34460
34440
  QdPageCommitActionExecutor.execute(action, values, {
34461
34441
  formGroupManager: this.formGroupManagerService,
34462
34442
  navigationInterceptor: this.navigationInterceptor,
34463
- destroyed$: this._destroyed$,
34443
+ destroyRef: this._destroyRef,
34464
34444
  scheduleFrameworkRebuildStop: () => afterNextRender(() => this.formGroupManagerService.stopAdoptingFrameworkRebuild(), { injector: this.injector })
34465
34445
  });
34466
34446
  }
@@ -34468,7 +34448,7 @@ class QdPageSubmitActionService {
34468
34448
  this._cancelTrackFormValidity$.next();
34469
34449
  this.formGroupManagerService
34470
34450
  .$areFormGroupsValid()
34471
- .pipe(takeUntil(this._cancelTrackFormValidity$), takeUntil(this._destroyed$), distinctUntilChanged())
34451
+ .pipe(takeUntil(this._cancelTrackFormValidity$), takeUntilDestroyed(this._destroyRef), distinctUntilChanged())
34472
34452
  .subscribe(isValid => this.updateSubmitButtonState(isValid));
34473
34453
  }
34474
34454
  updateSubmitButtonState(isValid) {
@@ -34956,6 +34936,7 @@ class QdPageComponent {
34956
34936
  navigationInterceptor = inject(QdPageNavigationInterceptorService);
34957
34937
  injector = inject(Injector);
34958
34938
  confirmationDialogService = inject(QdConfirmationDialogOpenerService);
34939
+ _destroyRef = inject(DestroyRef);
34959
34940
  /**
34960
34941
  * This property defines the configuration for the QdPage component, including the page type,
34961
34942
  * title, and specific configurations for each type of page.
@@ -34980,7 +34961,6 @@ class QdPageComponent {
34980
34961
  isFooterVisible;
34981
34962
  projectionGuardMessage = 'Quadrel Framework | QdPage - This content is not supported. Please use the [qdSectionAdapter] directive for custom content projection.';
34982
34963
  _isInitialized = false;
34983
- _destroyed$ = new Subject();
34984
34964
  _cancelSubmitValidation$ = new Subject();
34985
34965
  get isControlPanelVisible() {
34986
34966
  return this.controlPanel !== undefined && this.controlPanel.config?.isHidden !== true;
@@ -34996,7 +34976,7 @@ class QdPageComponent {
34996
34976
  }
34997
34977
  constructor() {
34998
34978
  this.footerHasContent$ = this.footerService.footerHasContent$;
34999
- this.footerHasContent$.pipe(takeUntil(this._destroyed$)).subscribe(isVisible => {
34979
+ this.footerHasContent$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(isVisible => {
35000
34980
  this.isFooterVisible = isVisible;
35001
34981
  this.bottomOffset$?.next(isVisible ? SAFE_BOTTOM_OFFSET_PX : 0);
35002
34982
  });
@@ -35029,7 +35009,7 @@ class QdPageComponent {
35029
35009
  this.initSaveDraftFooterAction(this.config.pageTypeConfig.saveDraft);
35030
35010
  if (this.config.pageType === 'inspect')
35031
35011
  this.pageStoreService.isViewonly$
35032
- .pipe(takeUntil(this._destroyed$))
35012
+ .pipe(takeUntilDestroyed(this._destroyRef))
35033
35013
  .subscribe(isViewonly => this.updateInspectPageOperationMode(this.config.pageTypeConfig, isViewonly ? 'view' : 'edit'));
35034
35014
  this.setupPageDialogCloseContract();
35035
35015
  this._isInitialized = true;
@@ -35037,8 +35017,6 @@ class QdPageComponent {
35037
35017
  ngOnDestroy() {
35038
35018
  this.dialogRef && this.dialog.clearPageDialogCanClose(this.dialogRef);
35039
35019
  this.bottomOffset$?.next(0);
35040
- this._destroyed$.next();
35041
- this._destroyed$.complete();
35042
35020
  }
35043
35021
  discardUnsavedChanges() {
35044
35022
  this.formGroupManagerService.restoreFormGroupsFromSnapshot();
@@ -35071,7 +35049,7 @@ class QdPageComponent {
35071
35049
  handleCancelActionWithFormChanges() {
35072
35050
  this.formGroupManagerService
35073
35051
  .$hasValuesChanged()
35074
- .pipe(takeUntil(this._destroyed$))
35052
+ .pipe(takeUntilDestroyed(this._destroyRef))
35075
35053
  .subscribe(hasChanged => {
35076
35054
  this.footerService.updateActions([
35077
35055
  {
@@ -35125,7 +35103,7 @@ class QdPageComponent {
35125
35103
  QdPageCommitActionExecutor.execute(action, values, {
35126
35104
  formGroupManager: this.formGroupManagerService,
35127
35105
  navigationInterceptor: this.navigationInterceptor,
35128
- destroyed$: this._destroyed$,
35106
+ destroyRef: this._destroyRef,
35129
35107
  scheduleFrameworkRebuildStop: () => afterNextRender(() => this.formGroupManagerService.stopAdoptingFrameworkRebuild(), {
35130
35108
  injector: this.injector
35131
35109
  })
@@ -35136,7 +35114,7 @@ class QdPageComponent {
35136
35114
  const cancelConfig = this.config.pageTypeConfig?.cancel;
35137
35115
  this.confirmationDialogService
35138
35116
  .showDiscardConfirmDialog(cancelConfig?.confirmationMessage, this.testId + '-cancel-confirmation')
35139
- .pipe(filter$1(result => result), takeUntil(this._destroyed$))
35117
+ .pipe(filter$1(result => result), takeUntilDestroyed(this._destroyRef))
35140
35118
  .subscribe(() => {
35141
35119
  this.formGroupManagerService.restoreFormGroupsFromSnapshot();
35142
35120
  cancelConfig?.handler?.();
@@ -35146,7 +35124,7 @@ class QdPageComponent {
35146
35124
  this._cancelSubmitValidation$.next();
35147
35125
  this.formGroupManagerService
35148
35126
  .$areFormGroupsValid()
35149
- .pipe(takeUntil(this._cancelSubmitValidation$), takeUntil(this._destroyed$), tap(isValid => {
35127
+ .pipe(takeUntil(this._cancelSubmitValidation$), takeUntilDestroyed(this._destroyRef), tap(isValid => {
35150
35128
  const submitDisabledInfoText = this.config.pageTypeConfig?.submit?.disabledInfo;
35151
35129
  this.footerService.updateActions([
35152
35130
  {
@@ -35624,6 +35602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
35624
35602
  */
35625
35603
  class QdPanelSectionComponent {
35626
35604
  actionService = inject(QdPanelSectionActionService);
35605
+ _destroyRef = inject(DestroyRef);
35627
35606
  /**
35628
35607
  * The configuration of the panel section.
35629
35608
  */
@@ -35638,13 +35617,9 @@ class QdPanelSectionComponent {
35638
35617
  statusPairsList;
35639
35618
  tableList;
35640
35619
  paragraphList;
35641
- _actionOutputSubscription;
35642
35620
  ngOnInit() {
35643
35621
  this.subscribeForActionOutput();
35644
35622
  }
35645
- ngOnDestroy() {
35646
- this._actionOutputSubscription.unsubscribe();
35647
- }
35648
35623
  hasActions() {
35649
35624
  if (!this.config.actions)
35650
35625
  return false;
@@ -35657,7 +35632,7 @@ class QdPanelSectionComponent {
35657
35632
  this.paragraphList.length > 0);
35658
35633
  }
35659
35634
  subscribeForActionOutput() {
35660
- this._actionOutputSubscription = this.actionService.action$.subscribe((type) => {
35635
+ this.actionService.action$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((type) => {
35661
35636
  this.actionOutput.emit(type);
35662
35637
  });
35663
35638
  }
@@ -36159,7 +36134,7 @@ class QdShellServiceNavigationComponent {
36159
36134
  return this.config.pamsAppId;
36160
36135
  }
36161
36136
  _config;
36162
- _destroyed$ = new Subject();
36137
+ _destroyRef = inject(DestroyRef);
36163
36138
  _attributesHaveBeenSet$ = new ReplaySubject(1);
36164
36139
  localeService = inject(QdLocaleService);
36165
36140
  ngOnInit() {
@@ -36181,7 +36156,7 @@ class QdShellServiceNavigationComponent {
36181
36156
  setLanguageFromUrlAfterNavigation() {
36182
36157
  this.languageFromUrlService
36183
36158
  .getLanguageFromUrl()
36184
- .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))
36185
36160
  .subscribe(languageFromUrl => {
36186
36161
  this.serviceNavigationService.config.defaultLanguage = languageFromUrl;
36187
36162
  this.translateService.setDefaultLang(languageFromUrl);
@@ -36200,9 +36175,6 @@ class QdShellServiceNavigationComponent {
36200
36175
  this.passConfig(changes['config'].currentValue);
36201
36176
  }
36202
36177
  }
36203
- ngOnDestroy() {
36204
- this._destroyed$.complete();
36205
- }
36206
36178
  handleLanguageChange($event) {
36207
36179
  this.localeService.setServiceNavigationLanguage($event.detail);
36208
36180
  this.useLanguage($event.detail);
@@ -36222,7 +36194,7 @@ class QdShellServiceNavigationComponent {
36222
36194
  setAttributesForServiceNavigation() {
36223
36195
  this.serviceNavigationService
36224
36196
  .getMappedAttributes$()
36225
- .pipe(takeUntil$1(this._destroyed$), tap(attributes => {
36197
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(attributes => {
36226
36198
  if (!attributes)
36227
36199
  return;
36228
36200
  Object.keys(attributes).forEach(attribute => {
@@ -36470,6 +36442,7 @@ class QdShellHeaderComponent {
36470
36442
  shellLeftService = inject(QdShellLeftService);
36471
36443
  shellRightService = inject(QdShellRightService);
36472
36444
  breakpointService = inject(QdBreakpointService);
36445
+ _destroyRef = inject(DestroyRef);
36473
36446
  /**
36474
36447
  * @description The configuration of the shell.
36475
36448
  */
@@ -36520,8 +36493,6 @@ class QdShellHeaderComponent {
36520
36493
  _hub = inject(QdRouterQueryParamHubService);
36521
36494
  _restoresAddress = false;
36522
36495
  _routeParams;
36523
- _routeParamsSubscription;
36524
- _breakpointSubscription;
36525
36496
  constructor() {
36526
36497
  const navigationService = this.navigationService;
36527
36498
  const shellLeftService = this.shellLeftService;
@@ -36532,10 +36503,14 @@ class QdShellHeaderComponent {
36532
36503
  previousHref = previousHref(routeComponentInstance);
36533
36504
  return isObservable(previousHref) ? previousHref.pipe(take(1)) : of(previousHref);
36534
36505
  }), tap(previousHref => (this._previousHref = previousHref)), map(previousHref => previousHref !== undefined));
36535
- this._routeParamsSubscription = navigationService
36506
+ navigationService
36536
36507
  .getRouteParams$()
36508
+ .pipe(takeUntilDestroyed(this._destroyRef))
36537
36509
  .subscribe(routeParams => (this._routeParams = routeParams));
36538
- this._breakpointSubscription = this.breakpointService.getMatchingBreakpoint().subscribe(breakpoint => {
36510
+ this.breakpointService
36511
+ .getMatchingBreakpoint()
36512
+ .pipe(takeUntilDestroyed(this._destroyRef))
36513
+ .subscribe(breakpoint => {
36539
36514
  this.isServiceNavigationOpened = breakpoint !== 'xs';
36540
36515
  });
36541
36516
  this.logoIconDisplayed$ = this.backLinkDisplayed$.pipe(map(backLinkDisplayed => !backLinkDisplayed));
@@ -36599,9 +36574,6 @@ class QdShellHeaderComponent {
36599
36574
  toggleServiceNavigation() {
36600
36575
  this.isServiceNavigationOpened = !this.isServiceNavigationOpened;
36601
36576
  }
36602
- ngOnDestroy() {
36603
- this._routeParamsSubscription.unsubscribe();
36604
- }
36605
36577
  async = async;
36606
36578
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdShellHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36607
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" }] });
@@ -36695,12 +36667,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
36695
36667
  class QdShellNotificationComponent {
36696
36668
  notificationService = inject(QdNotificationsService);
36697
36669
  translateService = inject(TranslateService, { optional: true });
36670
+ _destroyRef = inject(DestroyRef);
36698
36671
  /**
36699
36672
  * Configuration of a notification.
36700
36673
  */
36701
36674
  notification;
36702
36675
  displayedDate;
36703
- _destroyed$ = new Subject();
36704
36676
  _effectiveState = 'critical';
36705
36677
  get typeClassName() {
36706
36678
  return `qd-notification qd-notification-${this.getState()}`;
@@ -36709,7 +36681,9 @@ class QdShellNotificationComponent {
36709
36681
  return !this.notification?.disableClose;
36710
36682
  }
36711
36683
  constructor() {
36712
- this.translateService?.onLangChange.pipe(takeUntil(this._destroyed$)).subscribe((event) => {
36684
+ this.translateService?.onLangChange
36685
+ .pipe(takeUntilDestroyed(this._destroyRef))
36686
+ .subscribe((event) => {
36713
36687
  this.setDisplayedDate(event.lang);
36714
36688
  });
36715
36689
  }
@@ -36737,10 +36711,6 @@ class QdShellNotificationComponent {
36737
36711
  isToday(date) {
36738
36712
  return new Date(date).setHours(0, 0, 0, 0) === new Date().setHours(0, 0, 0, 0);
36739
36713
  }
36740
- ngOnDestroy() {
36741
- this._destroyed$.next();
36742
- this._destroyed$.complete();
36743
- }
36744
36714
  getState() {
36745
36715
  return this._effectiveState;
36746
36716
  }
@@ -36811,6 +36781,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
36811
36781
  class QdShellRightComponent {
36812
36782
  headerMinimizationService = inject(QdShellHeaderMinimizationService);
36813
36783
  navigationService = inject(QdNavigationService);
36784
+ _destroyRef = inject(DestroyRef);
36814
36785
  config;
36815
36786
  get headerMinimized() {
36816
36787
  return this.isHeaderMinimized;
@@ -36820,25 +36791,20 @@ class QdShellRightComponent {
36820
36791
  }
36821
36792
  isHeaderMinimized;
36822
36793
  isHome;
36823
- _destroyed$ = new Subject();
36824
36794
  ngOnInit() {
36825
36795
  this.headerMinimizationService
36826
36796
  .isHeaderMinimized$()
36827
- .pipe(takeUntil(this._destroyed$))
36797
+ .pipe(takeUntilDestroyed(this._destroyRef))
36828
36798
  .subscribe(isHeaderMinimized => {
36829
36799
  this.isHeaderMinimized = isHeaderMinimized;
36830
36800
  });
36831
36801
  this.navigationService
36832
36802
  .isHome$()
36833
- .pipe(takeUntil(this._destroyed$))
36803
+ .pipe(takeUntilDestroyed(this._destroyRef))
36834
36804
  .subscribe(isHome => {
36835
36805
  this.isHome = isHome;
36836
36806
  });
36837
36807
  }
36838
- ngOnDestroy() {
36839
- this._destroyed$.next();
36840
- this._destroyed$.complete();
36841
- }
36842
36808
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdShellRightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36843
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"] }] });
36844
36810
  }
@@ -37144,7 +37110,7 @@ class QdShellComponent {
37144
37110
  isMinimized$;
37145
37111
  isHome$;
37146
37112
  _config = DEFAULT_SHELL_CONFIG;
37147
- _destroy$ = new Subject();
37113
+ _destroyRef = inject(DestroyRef);
37148
37114
  get isFaded$() {
37149
37115
  return combineLatest([
37150
37116
  this.isNavigationRolledOver$,
@@ -37175,16 +37141,13 @@ class QdShellComponent {
37175
37141
  }
37176
37142
  closeShellRightIfCommentsDisappear() {
37177
37143
  // e.g. if comments where opened on detail page but are not shown on overview page, close after navigation
37178
- this.commentsComponent.changes.pipe(takeUntil(this._destroy$)).subscribe(async (commentsComponent) => {
37144
+ this.commentsComponent.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(async (commentsComponent) => {
37179
37145
  const shellRightOpen = await firstValueFrom(this.shellRightService.open$);
37180
37146
  if (commentsComponent.length === 0 && this.shellHeaderComponent.isCommentsDisplayed && shellRightOpen) {
37181
37147
  this.shellRightService.toggleOpen();
37182
37148
  }
37183
37149
  });
37184
37150
  }
37185
- ngOnDestroy() {
37186
- this._destroy$.complete();
37187
- }
37188
37151
  handleRouterOutletActivation(routeComponentInstance) {
37189
37152
  this.navigationService.updateRouteComponentInstance(routeComponentInstance);
37190
37153
  }
@@ -37195,10 +37158,10 @@ class QdShellComponent {
37195
37158
  }
37196
37159
  subscribeToSearchService() {
37197
37160
  this.searchService.searchQueryString$
37198
- .pipe(takeUntil(this._destroy$), tap(queryString => this.searchQueryStringOutput.emit(queryString)))
37161
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(queryString => this.searchQueryStringOutput.emit(queryString)))
37199
37162
  .subscribe();
37200
37163
  this.searchService.searchPostBody$
37201
- .pipe(takeUntil(this._destroy$), tap(postBody => this.searchPostBodyOutput.emit(postBody)))
37164
+ .pipe(takeUntilDestroyed(this._destroyRef), tap(postBody => this.searchPostBodyOutput.emit(postBody)))
37202
37165
  .subscribe();
37203
37166
  }
37204
37167
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -37733,7 +37696,6 @@ class QdPageStepComponent extends CdkStep {
37733
37696
  * The stepper only moves on to the next step when this form is valid. Optional steps skip this check.
37734
37697
  */
37735
37698
  stepControl;
37736
- _destroyed$ = new Subject();
37737
37699
  constructor() {
37738
37700
  const stepper = inject(QdPageStepperComponent);
37739
37701
  const stepperOptions = inject(STEPPER_GLOBAL_OPTIONS, { optional: true });
@@ -37750,9 +37712,6 @@ class QdPageStepComponent extends CdkStep {
37750
37712
  .filter(input => changes[input])
37751
37713
  .forEach(input => this.blockCdkInput(input));
37752
37714
  }
37753
- ngOnDestroy() {
37754
- this._destroyed$.complete();
37755
- }
37756
37715
  blockCdkInput(inputName) {
37757
37716
  throw new Error(`Quadrel Framework | QdPageStep - The use of the "${inputName}" attribute is not permitted. Please use QdPageStepConfig instead.`);
37758
37717
  }
@@ -38110,6 +38069,7 @@ class QdQuickEditComponent {
38110
38069
  changeDetectorRef = inject(ChangeDetectorRef);
38111
38070
  controlContainer = inject(ControlContainer, { optional: true, self: true });
38112
38071
  confirmationDialogService = inject(QdConfirmationDialogOpenerService);
38072
+ _destroyRef = inject(DestroyRef);
38113
38073
  /**
38114
38074
  * Configuration of the QuickEdit. The generic type names the columns.
38115
38075
  *
@@ -38178,7 +38138,6 @@ class QdQuickEditComponent {
38178
38138
  viewonly$ = of(false);
38179
38139
  actions$;
38180
38140
  hasVisibleActions$;
38181
- _destroyed$ = new Subject();
38182
38141
  _pageViewonly$;
38183
38142
  get control() {
38184
38143
  return (this.controlContainer?.control ?? this.quickEditFormGroup.get('rows'));
@@ -38230,10 +38189,6 @@ class QdQuickEditComponent {
38230
38189
  this.initActionsStream();
38231
38190
  }
38232
38191
  }
38233
- ngOnDestroy() {
38234
- this._destroyed$.next();
38235
- this._destroyed$.complete();
38236
- }
38237
38192
  /**
38238
38193
  * Whether a secondary action is disabled for one row.
38239
38194
  * Resolves the `isDisabled` of the action, which may be a flag or a function of the row.
@@ -38334,7 +38289,7 @@ class QdQuickEditComponent {
38334
38289
  initCreating() {
38335
38290
  if (this.sectionActionService)
38336
38291
  this.sectionActionService.action$
38337
- .pipe(takeUntil$1(this._destroyed$), filter$1(type => type === 'addNew'))
38292
+ .pipe(takeUntilDestroyed(this._destroyRef), filter$1(type => type === 'addNew'))
38338
38293
  .subscribe(() => this.createRow());
38339
38294
  }
38340
38295
  createFormGroupRow(row) {
@@ -38380,7 +38335,7 @@ class QdQuickEditComponent {
38380
38335
  initManualChangeDetectionForControlReset() {
38381
38336
  if (!this.isFormControl)
38382
38337
  return;
38383
- 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();
38384
38339
  }
38385
38340
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdQuickEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
38386
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 });