@dereekb/dbx-web 12.6.21 → 12.7.0

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.
Files changed (102) hide show
  1. package/esm2022/lib/action/snackbar/action.snackbar.component.mjs +10 -14
  2. package/esm2022/lib/action/snackbar/action.snackbar.directive.mjs +8 -7
  3. package/esm2022/lib/action/transition/transition.safety.dialog.component.mjs +1 -1
  4. package/esm2022/lib/button/progress/abstract.progress.button.directive.mjs +5 -5
  5. package/esm2022/lib/error/error.action.directive.mjs +9 -9
  6. package/esm2022/lib/error/error.loading.directive.mjs +7 -6
  7. package/esm2022/lib/error/error.snackbar.action.directive.mjs +6 -7
  8. package/esm2022/lib/error/error.snackbar.component.mjs +9 -13
  9. package/esm2022/lib/extension/download/blob/download.blob.button.component.mjs +6 -10
  10. package/esm2022/lib/extension/download/text/download.text.component.mjs +1 -6
  11. package/esm2022/lib/extension/help/help.context.service.mjs +3 -5
  12. package/esm2022/lib/extension/model/model.tracker.view.storage.mjs +3 -5
  13. package/esm2022/lib/extension/zip/zip.blob.preview.component.mjs +4 -7
  14. package/esm2022/lib/extension/zip/zip.preview.component.mjs +4 -7
  15. package/esm2022/lib/interaction/dialog/dialog.action.directive.mjs +1 -1
  16. package/esm2022/lib/interaction/filter/filter.popover.component.mjs +9 -12
  17. package/esm2022/lib/interaction/filter/filter.wrapper.component.mjs +3 -2
  18. package/esm2022/lib/interaction/iframe/embed.component.mjs +7 -12
  19. package/esm2022/lib/interaction/iframe/iframe.component.mjs +7 -12
  20. package/esm2022/lib/interaction/popover/abstract.popover.ref.directive.mjs +8 -7
  21. package/esm2022/lib/interaction/popover/popover.action.directive.mjs +1 -1
  22. package/esm2022/lib/interaction/popover/popover.component.mjs +1 -3
  23. package/esm2022/lib/interaction/popover/popover.coordinator.component.mjs +5 -6
  24. package/esm2022/lib/interaction/popover/popover.coordinator.service.mjs +3 -5
  25. package/esm2022/lib/interaction/popup/popup.component.mjs +4 -9
  26. package/esm2022/lib/interaction/popup/popup.coordinator.component.mjs +5 -6
  27. package/esm2022/lib/interaction/popup/popup.coordinator.service.mjs +3 -5
  28. package/esm2022/lib/interaction/prompt/prompt.confirm.dialog.component.mjs +1 -1
  29. package/esm2022/lib/interaction/upload/upload.action.directive.mjs +8 -15
  30. package/esm2022/lib/layout/column/two/two.column.back.directive.mjs +8 -8
  31. package/esm2022/lib/layout/column/two/two.column.component.mjs +4 -5
  32. package/esm2022/lib/layout/column/two/two.column.sref.showright.directive.mjs +5 -6
  33. package/esm2022/lib/layout/column/two/two.column.store.mjs +3 -7
  34. package/esm2022/lib/layout/flex/flex.group.directive.mjs +4 -5
  35. package/esm2022/lib/layout/list/list.view.directive.mjs +16 -21
  36. package/esm2022/lib/layout/list/modifier/list.view.value.modifier.directive.mjs +11 -15
  37. package/esm2022/lib/layout/list/modifier/list.view.value.modifier.ripple.directive.mjs +1 -1
  38. package/esm2022/lib/layout/list/modifier/list.view.value.modifier.selection.directive.mjs +1 -1
  39. package/esm2022/lib/layout/style/style.body.directive.mjs +9 -9
  40. package/esm2022/lib/layout/style/style.directive.mjs +9 -9
  41. package/esm2022/lib/layout/style/style.set.directive.mjs +10 -10
  42. package/esm2022/lib/loading/loading.action.directive.mjs +3 -7
  43. package/esm2022/mapbox/lib/mapbox.injection.store.mjs +1 -1
  44. package/esm2022/mapbox/lib/mapbox.layout.resize.sync.directive.mjs +8 -8
  45. package/esm2022/mapbox/lib/mapbox.menu.component.mjs +17 -19
  46. package/esm2022/mapbox/lib/mapbox.store.mjs +1 -1
  47. package/esm2022/table/lib/date/daterange.table.cell.input.component.mjs +8 -11
  48. package/esm2022/table/lib/table.column.size.directive.mjs +8 -9
  49. package/fesm2022/dereekb-dbx-web-mapbox.mjs +22 -24
  50. package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
  51. package/fesm2022/dereekb-dbx-web-table.mjs +13 -19
  52. package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
  53. package/fesm2022/dereekb-dbx-web.mjs +150 -229
  54. package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
  55. package/lib/action/snackbar/action.snackbar.component.d.ts +4 -5
  56. package/lib/action/snackbar/action.snackbar.directive.d.ts +3 -2
  57. package/lib/action/transition/transition.safety.dialog.component.d.ts +1 -2
  58. package/lib/button/progress/abstract.progress.button.directive.d.ts +3 -3
  59. package/lib/error/error.action.directive.d.ts +3 -4
  60. package/lib/error/error.loading.directive.d.ts +2 -2
  61. package/lib/error/error.snackbar.action.directive.d.ts +2 -2
  62. package/lib/error/error.snackbar.component.d.ts +2 -4
  63. package/lib/extension/download/blob/download.blob.button.component.d.ts +3 -4
  64. package/lib/extension/download/text/download.text.component.d.ts +2 -4
  65. package/lib/extension/help/help.context.service.d.ts +1 -3
  66. package/lib/extension/model/model.tracker.view.storage.d.ts +2 -3
  67. package/lib/extension/zip/zip.blob.preview.component.d.ts +2 -3
  68. package/lib/extension/zip/zip.preview.component.d.ts +1 -3
  69. package/lib/interaction/dialog/dialog.action.directive.d.ts +2 -2
  70. package/lib/interaction/filter/filter.popover.component.d.ts +3 -5
  71. package/lib/interaction/filter/filter.wrapper.component.d.ts +1 -1
  72. package/lib/interaction/iframe/embed.component.d.ts +2 -4
  73. package/lib/interaction/iframe/iframe.component.d.ts +2 -4
  74. package/lib/interaction/popover/abstract.popover.ref.directive.d.ts +4 -4
  75. package/lib/interaction/popover/popover.action.directive.d.ts +2 -2
  76. package/lib/interaction/popover/popover.coordinator.component.d.ts +2 -4
  77. package/lib/interaction/popover/popover.coordinator.service.d.ts +2 -4
  78. package/lib/interaction/popup/popup.component.d.ts +2 -3
  79. package/lib/interaction/popup/popup.coordinator.component.d.ts +2 -4
  80. package/lib/interaction/popup/popup.coordinator.service.d.ts +1 -3
  81. package/lib/interaction/prompt/prompt.confirm.dialog.component.d.ts +1 -2
  82. package/lib/interaction/upload/upload.action.directive.d.ts +2 -6
  83. package/lib/layout/column/two/two.column.back.directive.d.ts +2 -4
  84. package/lib/layout/column/two/two.column.component.d.ts +1 -3
  85. package/lib/layout/column/two/two.column.sref.showright.directive.d.ts +1 -2
  86. package/lib/layout/column/two/two.column.store.d.ts +2 -3
  87. package/lib/layout/flex/flex.group.directive.d.ts +1 -2
  88. package/lib/layout/list/list.view.directive.d.ts +9 -10
  89. package/lib/layout/list/modifier/list.view.value.modifier.directive.d.ts +3 -6
  90. package/lib/layout/list/modifier/list.view.value.modifier.ripple.directive.d.ts +1 -2
  91. package/lib/layout/list/modifier/list.view.value.modifier.selection.directive.d.ts +1 -2
  92. package/lib/layout/style/style.body.directive.d.ts +2 -4
  93. package/lib/layout/style/style.directive.d.ts +2 -4
  94. package/lib/layout/style/style.set.directive.d.ts +2 -4
  95. package/lib/loading/loading.action.directive.d.ts +1 -3
  96. package/mapbox/lib/mapbox.injection.store.d.ts +1 -2
  97. package/mapbox/lib/mapbox.layout.resize.sync.directive.d.ts +2 -4
  98. package/mapbox/lib/mapbox.menu.component.d.ts +5 -6
  99. package/mapbox/lib/mapbox.store.d.ts +1 -2
  100. package/package.json +1 -1
  101. package/table/lib/date/daterange.table.cell.input.component.d.ts +2 -4
  102. package/table/lib/table.column.size.directive.d.ts +4 -5
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, input, inject, effect, Directive, NgModule, Component, output, computed, HostListener, InjectionToken, signal, ChangeDetectionStrategy, ElementRef, Injector, DestroyRef, viewChild, makeEnvironmentProviders, TemplateRef, model, SecurityContext, forwardRef, ViewContainerRef, Optional, Inject, Renderer2, ChangeDetectorRef } from '@angular/core';
3
3
  import { DASH_CHARACTER_PREFIX_INSTANCE, asPromise, cssClassesSet, isDefinedAndNotFalse, spaceSeparatedCssClasses, objectHasNoKeys, getValueFromGetter, firstValue, filterUndefinedValues, separateValues, splitFront, asDecisionFunction, SLASH_PATH_FILE_TYPE_SEPARATOR, filterMaybeArrayValues, mapIterable, toReadableError, isDefaultReadableError, MS_IN_SECOND, mergeObjects, build, ServerErrorResponse, UnauthorizedServerErrorResponse, makeTimer, MS_IN_MINUTE, toggleTimerRunning, unixDateTimeSecondsNumberForNow, ModelRelationUtility, encodeModelKeyTypePair, useIterableOrValue, safeCompareEquality, addMilliseconds, isPast, asArray, slashPathDetails, mimeTypeForFileExtension, slashPathDirectoryTree, isMaybeNot, isNotFalse, modifier, combineMaps, addModifiers, removeModifiers, applyBestFit, findNext, maybeModifierMapToFunction, makeValuesGroupMap, compareWithMappedValuesFunction, invertMaybeBoolean, splitCommaSeparatedStringToSet, ZIP_FILE_MIME_TYPE, cachedGetter, sortByNumberFunction } from '@dereekb/util';
4
4
  import * as i1$2 from '@dereekb/dbx-core';
5
- import { AbstractSubscriptionDirective, AbstractTransitionWatcherDirective, DbxInjectionComponent, AbstractDbxActionValueGetterDirective, AbstractDbxButtonDirective, provideDbxButton, dbxActionWorkProgress, DbxCoreButtonModule, AbstractDbxActionHandlerDirective, FilterSourceDirective, provideActionStoreSource, isClickableFilterPreset, AbstractDbxAnchorDirective, expandClickableAnchorLinkTrees, DbxCoreFilterModule, DbxButton, DbxActionContextStoreSourceInstance, DBX_INJECTION_COMPONENT_DATA, checkNgContentWrapperHasContent, DbxActionSourceDirective, DbxActionSuccessHandlerDirective, DbxActionDirective, DbxActionValueStreamDirective, transformEmptyStringInputToUndefined, isIdleActionState, canTriggerAction, DbxCoreActionModule, DbxActionButtonDirective, onDbxAppAuth, SimpleStorageAccessorFactory, mergeStaticProviders, asSegueRef, AbstractTransitionDirective, DbxRouterService, AbstractIfDirective, isSegueRefActive, anchorTypeForAnchor } from '@dereekb/dbx-core';
5
+ import { completeOnDestroy, clean, cleanSubscription, AbstractTransitionWatcherDirective, DbxInjectionComponent, AbstractDbxActionValueGetterDirective, AbstractDbxButtonDirective, provideDbxButton, dbxActionWorkProgress, DbxCoreButtonModule, AbstractDbxActionHandlerDirective, FilterSourceDirective, provideActionStoreSource, isClickableFilterPreset, AbstractDbxAnchorDirective, expandClickableAnchorLinkTrees, DbxCoreFilterModule, DbxButton, DbxActionContextStoreSourceInstance, DBX_INJECTION_COMPONENT_DATA, checkNgContentWrapperHasContent, cleanLoadingContext, DbxActionSourceDirective, DbxActionSuccessHandlerDirective, DbxActionDirective, DbxActionValueStreamDirective, transformEmptyStringInputToUndefined, isIdleActionState, canTriggerAction, DbxCoreActionModule, DbxActionButtonDirective, onDbxAppAuth, SimpleStorageAccessorFactory, mergeStaticProviders, asSegueRef, AbstractTransitionDirective, DbxRouterService, AbstractIfDirective, isSegueRefActive, anchorTypeForAnchor } from '@dereekb/dbx-core';
6
6
  import { NgPopoverRef, NgOverlayContainerService } from 'ng-overlay-container';
7
7
  import { of, map, BehaviorSubject, distinctUntilChanged, shareReplay, delay, switchMap, combineLatest, Subject, first, startWith, filter, throttleTime, skip, defaultIfEmpty, delayWhen, timer, asyncScheduler, from, firstValueFrom, mergeMap, race, tap, catchError, distinct, merge, exhaustMap } from 'rxjs';
8
- import { filterMaybe, asObservable, LockSet, SubscriptionObject, distinctUntilItemsHaveDifferentValues, skipAllInitialMaybe, maybeValueFromObservableOrValue, switchMapMaybeLoadingContextStream, loadingStateContext, LoadingStateType, loadingStateType, successResult, valueFromFinishedLoadingState, initialize, isNot, mapForEach, switchMapMaybe, listLoadingStateContext, isLoadingStateFinishedLoading, startWithBeginLoading, loadingStateFromObs, errorResult, beginLoading, distinctUntilHasDifferentValues } from '@dereekb/rxjs';
8
+ import { filterMaybe, asObservable, LockSet, distinctUntilItemsHaveDifferentValues, skipAllInitialMaybe, maybeValueFromObservableOrValue, switchMapMaybeLoadingContextStream, LoadingStateType, loadingStateType, SubscriptionObject, successResult, valueFromFinishedLoadingState, loadingStateContext, initialize, isNot, mapForEach, switchMapMaybe, listLoadingStateContext, isLoadingStateFinishedLoading, startWithBeginLoading, loadingStateFromObs, errorResult, beginLoading, distinctUntilHasDifferentValues } from '@dereekb/rxjs';
9
9
  import { isBoolean } from 'class-validator';
10
10
  import { ComponentStore } from '@ngrx/component-store';
11
11
  import { toSignal, toObservable } from '@angular/core/rxjs-interop';
@@ -199,11 +199,8 @@ class DbxPopoverController {
199
199
  * Used for coordinating popovers and closing/replacing existing ones when a new popover of the same name appears.
200
200
  */
201
201
  class DbxPopoverCoordinatorService {
202
- _popovers = new BehaviorSubject(new Map());
202
+ _popovers = completeOnDestroy(new BehaviorSubject(new Map()));
203
203
  popovers$ = this._popovers.asObservable();
204
- ngOnDestroy() {
205
- this._popovers.complete();
206
- }
207
204
  get popovers() {
208
205
  return this._popovers.value;
209
206
  }
@@ -246,11 +243,9 @@ class DbxPopoverCoordinatorComponent {
246
243
  );
247
244
  show$ = this.isPopoverForKey$.pipe(delay(0));
248
245
  showSignal = toSignal(this.show$);
249
- ngOnInit() {
246
+ constructor() {
250
247
  this._service.addPopover(this._popover);
251
- }
252
- ngOnDestroy() {
253
- this._service.removePopover(this._popover.key, this._popover);
248
+ clean(() => this._service.removePopover(this._popover.key, this._popover));
254
249
  }
255
250
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxPopoverCoordinatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
256
251
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxPopoverCoordinatorComponent, isStandalone: true, selector: "dbx-popover-coordinator", ngImport: i0, template: `
@@ -270,7 +265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
270
265
  `,
271
266
  standalone: true
272
267
  }]
273
- }] });
268
+ }], ctorParameters: () => [] });
274
269
 
275
270
  /**
276
271
  * Binds to the window:keydown event and emits events.
@@ -447,16 +442,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
447
442
  /**
448
443
  * Used to retrieve the current app styling from the DbxStyleService.
449
444
  */
450
- class DbxStyleDirective extends AbstractSubscriptionDirective {
445
+ class DbxStyleDirective {
451
446
  _styleService = inject(DbxStyleService);
452
447
  styleClassNameSignal = signal(undefined);
453
- ngOnInit() {
454
- this.sub = this._styleService.styleClassName$.pipe(delay(0)).subscribe((classes) => {
448
+ constructor() {
449
+ cleanSubscription(this._styleService.styleClassName$.pipe(delay(0)).subscribe((classes) => {
455
450
  this.styleClassNameSignal.set(classes);
456
- });
451
+ }));
457
452
  }
458
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
459
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxStyleDirective, isStandalone: true, selector: "dbx-style, [dbxStyle], .dbx-style", host: { properties: { "class": "styleClassNameSignal()" } }, usesInheritance: true, ngImport: i0 });
453
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
454
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxStyleDirective, isStandalone: true, selector: "dbx-style, [dbxStyle], .dbx-style", host: { properties: { "class": "styleClassNameSignal()" } }, ngImport: i0 });
460
455
  }
461
456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleDirective, decorators: [{
462
457
  type: Directive,
@@ -467,7 +462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
467
462
  },
468
463
  standalone: true
469
464
  }]
470
- }] });
465
+ }], ctorParameters: () => [] });
471
466
 
472
467
  class DbxPopoverComponentController extends DbxPopoverController {
473
468
  getClosingValueFn;
@@ -539,14 +534,12 @@ class DbxPopoverComponent extends AbstractTransitionWatcherDirective {
539
534
  return this._triggerCloseKeys;
540
535
  }
541
536
  ngOnInit() {
542
- super.ngOnInit();
543
537
  if (this.config.closeOnEscape) {
544
538
  this._triggerCloseKeys = ['Escape'];
545
539
  }
546
540
  }
547
541
  ngOnDestroy() {
548
542
  this.lockSet.destroyOnNextUnlock(() => {
549
- super.ngOnDestroy();
550
543
  this._closing.complete();
551
544
  });
552
545
  }
@@ -918,8 +911,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
918
911
  /**
919
912
  * Abstract class for showing and handling a popover ref.
920
913
  */
921
- class AbstractPopoverRefDirective extends AbstractSubscriptionDirective {
914
+ class AbstractPopoverRefDirective {
922
915
  _popoverRef;
916
+ _popoverSub = cleanSubscription();
923
917
  showPopover(origin) {
924
918
  if (!this._popoverRef) {
925
919
  this._showPopoverRef(origin);
@@ -928,10 +922,10 @@ class AbstractPopoverRefDirective extends AbstractSubscriptionDirective {
928
922
  _showPopoverRef(origin) {
929
923
  this._popoverRef = this._makePopoverRef(origin);
930
924
  this._afterOpened(this._popoverRef);
931
- this.sub = this._popoverRef.afterClosed$.subscribe((x) => {
925
+ this._popoverSub.setSub(this._popoverRef.afterClosed$.subscribe((x) => {
932
926
  this._afterClosed(x);
933
927
  this._popoverRef = undefined;
934
- });
928
+ }));
935
929
  }
936
930
  _afterOpened(popoverRef) {
937
931
  // Do nothing. Override in parent type
@@ -939,8 +933,8 @@ class AbstractPopoverRefDirective extends AbstractSubscriptionDirective {
939
933
  _afterClosed(value) {
940
934
  // Do nothing. Override in parent type
941
935
  }
942
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractPopoverRefDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
943
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: AbstractPopoverRefDirective, usesInheritance: true, ngImport: i0 });
936
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractPopoverRefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
937
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: AbstractPopoverRefDirective, ngImport: i0 });
944
938
  }
945
939
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractPopoverRefDirective, decorators: [{
946
940
  type: Directive
@@ -1290,7 +1284,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1290
1284
 
1291
1285
  const DEFAULT_FILTER_POPOVER_KEY = 'filter';
1292
1286
  class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1293
- _closeOnChangeSub = new SubscriptionObject();
1294
1287
  config = this.popover.data;
1295
1288
  icon = this.config.icon ?? 'filter_list';
1296
1289
  header = this.config.header ?? 'Filter';
@@ -1323,9 +1316,9 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1323
1316
  filterSource.initWithFilter(initialFilterObs);
1324
1317
  }
1325
1318
  if (closeOnFilterChange !== false) {
1326
- this._closeOnChangeSub.subscription = filterSource.filter$.pipe(skip(1), filterMaybe(), first(), defaultIfEmpty(undefined)).subscribe(() => {
1319
+ cleanSubscription(filterSource.filter$.pipe(skip(1), filterMaybe(), first(), defaultIfEmpty(undefined)).subscribe(() => {
1327
1320
  this.close();
1328
- });
1321
+ }));
1329
1322
  }
1330
1323
  // run the next init if provided
1331
1324
  baseConfig?.init?.(filterSource);
@@ -1358,7 +1351,8 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1358
1351
  }
1359
1352
  });
1360
1353
  }
1361
- ngOnInit() {
1354
+ constructor() {
1355
+ super();
1362
1356
  let showPreset = false;
1363
1357
  const { customFilterComponentClass, presetFilterComponentClass, customFilterComponentConfig, presetFilterComponentConfig } = this.config;
1364
1358
  if (customFilterComponentClass || customFilterComponentConfig) {
@@ -1372,22 +1366,19 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1372
1366
  }
1373
1367
  this.showPresetSignal.set(showPreset);
1374
1368
  }
1375
- ngOnDestroy() {
1376
- this._closeOnChangeSub.destroy();
1377
- }
1378
1369
  showPresets() {
1379
1370
  this.showPresetSignal.set(true);
1380
1371
  }
1381
1372
  showCustom() {
1382
1373
  this.showPresetSignal.set(false);
1383
1374
  }
1384
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFilterPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1375
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFilterPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1385
1376
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxFilterPopoverComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\">\n @if (showSwitchButtons) {\n @switch (showPresetSignal()) {\n @case (true) {\n <button mat-flat-button color=\"accent\" (click)=\"showCustom()\">{{ customizeButtonText }}</button>\n }\n @case (false) {\n <button mat-flat-button color=\"accent\" (click)=\"showPresets()\">Presets</button>\n }\n }\n }\n @if (showCloseButton) {\n @if (showSwitchButtons) {\n <dbx-button-spacer></dbx-button-spacer>\n }\n <button mat-stroked-button color=\"accent\" (click)=\"close()\">{{ closeButtonText }}</button>\n }\n </dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-injection [config]=\"configSignal()\"></dbx-injection>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n", dependencies: [{ kind: "ngmodule", type: DbxPopoverInteractionModule }, { kind: "component", type: DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: DbxPopoverHeaderComponent, selector: "dbx-popover-header", inputs: ["header", "icon"] }, { kind: "directive", type: DbxPopoverScrollContentDirective, selector: "dbx-popover-scroll-content,[dbxPopoverScrollContent],.dbx-popover-scroll-content" }, { kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1386
1377
  }
1387
1378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFilterPopoverComponent, decorators: [{
1388
1379
  type: Component,
1389
1380
  args: [{ imports: [DbxPopoverInteractionModule, DbxInjectionComponent, MatButtonModule, DbxButtonSpacerDirective], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\">\n @if (showSwitchButtons) {\n @switch (showPresetSignal()) {\n @case (true) {\n <button mat-flat-button color=\"accent\" (click)=\"showCustom()\">{{ customizeButtonText }}</button>\n }\n @case (false) {\n <button mat-flat-button color=\"accent\" (click)=\"showPresets()\">Presets</button>\n }\n }\n }\n @if (showCloseButton) {\n @if (showSwitchButtons) {\n <dbx-button-spacer></dbx-button-spacer>\n }\n <button mat-stroked-button color=\"accent\" (click)=\"close()\">{{ closeButtonText }}</button>\n }\n </dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-injection [config]=\"configSignal()\"></dbx-injection>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n" }]
1390
- }] });
1381
+ }], ctorParameters: () => [] });
1391
1382
 
1392
1383
  class AbstractFilterPopoverButtonDirective extends AbstractPopoverRefDirective {
1393
1384
  popupService = inject(DbxPopoverService);
@@ -1507,7 +1498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1507
1498
 
1508
1499
  const DBX_PROGRESS_BUTTON_GLOBAL_CONFIG = new InjectionToken('DbxProgressButtonGlobalConfig');
1509
1500
 
1510
- class AbstractProgressButtonDirective extends AbstractSubscriptionDirective {
1501
+ class AbstractProgressButtonDirective {
1511
1502
  globalConfig = inject(DBX_PROGRESS_BUTTON_GLOBAL_CONFIG, { optional: true }) ?? [];
1512
1503
  btnClick = output();
1513
1504
  config = input.required();
@@ -1640,8 +1631,8 @@ class AbstractProgressButtonDirective extends AbstractSubscriptionDirective {
1640
1631
  event.stopImmediatePropagation();
1641
1632
  }
1642
1633
  }
1643
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractProgressButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1644
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: AbstractProgressButtonDirective, inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, buttonId: { classPropertyName: "buttonId", publicName: "buttonId", isSignal: true, isRequired: false, transformFunction: null }, working: { classPropertyName: "working", publicName: "working", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnClick: "btnClick" }, host: { listeners: { "click": "handleClick($event)" } }, usesInheritance: true, ngImport: i0 });
1634
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractProgressButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1635
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: AbstractProgressButtonDirective, inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, buttonId: { classPropertyName: "buttonId", publicName: "buttonId", isSignal: true, isRequired: false, transformFunction: null }, working: { classPropertyName: "working", publicName: "working", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { btnClick: "btnClick" }, host: { listeners: { "click": "handleClick($event)" } }, ngImport: i0 });
1645
1636
  }
1646
1637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractProgressButtonDirective, decorators: [{
1647
1638
  type: Directive
@@ -1968,7 +1959,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1968
1959
  /**
1969
1960
  * Action component used to simplify creating a filter form.
1970
1961
  *
1971
- * Provides a DbxAction and configures the action to set the filter on a FilterSourceDirective when triggered.
1962
+ * Provides a ActionContextStoreSource and configures the action to set the filter on a FilterSourceDirective when triggered.
1972
1963
  */
1973
1964
  class DbxFilterWrapperComponent extends AbstractDbxActionHandlerDirective {
1974
1965
  filterSourceDirective = inject((FilterSourceDirective));
@@ -1978,6 +1969,7 @@ class DbxFilterWrapperComponent extends AbstractDbxActionHandlerDirective {
1978
1969
  applyText = input('Filter');
1979
1970
  constructor() {
1980
1971
  super();
1972
+ // TODO: Consider throwing an error if dbxAction is provided at the same time as this, since the source would not be used?
1981
1973
  // configure handler function
1982
1974
  this._dbxActionHandlerInstance.setHandlerFunction((filter, instance) => {
1983
1975
  this.filterSourceDirective.setFilter(filter);
@@ -2427,7 +2419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2427
2419
  }]
2428
2420
  }] });
2429
2421
 
2430
- class DbxIframeComponent extends AbstractSubscriptionDirective {
2422
+ class DbxIframeComponent {
2431
2423
  sanitizer = inject(DomSanitizer);
2432
2424
  iframeLocationChanged = output();
2433
2425
  iframe = viewChild('iframe', { read: ElementRef });
@@ -2444,10 +2436,9 @@ class DbxIframeComponent extends AbstractSubscriptionDirective {
2444
2436
  });
2445
2437
  iframe$ = toObservable(this.iframe);
2446
2438
  contentUrl$ = toObservable(this.contentUrl);
2447
- retry = new Subject();
2439
+ retry = completeOnDestroy(new Subject());
2448
2440
  constructor() {
2449
- super();
2450
- this.sub = combineLatest([this.contentUrl$, this.iframe$])
2441
+ cleanSubscription(() => combineLatest([this.contentUrl$, this.iframe$])
2451
2442
  .pipe(
2452
2443
  // delay retries by 50ms
2453
2444
  switchMap((x) => this.retry.pipe(startWith(undefined), delayWhen((_, i) => timer(i ? 50 : 0, asyncScheduler)), map(() => x))))
@@ -2466,14 +2457,10 @@ class DbxIframeComponent extends AbstractSubscriptionDirective {
2466
2457
  else {
2467
2458
  this.retry.next(); // queue up another retry for setting the iframe value
2468
2459
  }
2469
- });
2470
- }
2471
- ngOnDestroy() {
2472
- super.ngOnDestroy();
2473
- this.retry.complete();
2460
+ }));
2474
2461
  }
2475
2462
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxIframeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2476
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: DbxIframeComponent, isStandalone: true, selector: "dbx-iframe", inputs: { scrolling: { classPropertyName: "scrolling", publicName: "scrolling", isSignal: true, isRequired: false, transformFunction: null }, sanitizeUrl: { classPropertyName: "sanitizeUrl", publicName: "sanitizeUrl", isSignal: true, isRequired: false, transformFunction: null }, contentUrl: { classPropertyName: "contentUrl", publicName: "contentUrl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { iframeLocationChanged: "iframeLocationChanged", contentUrl: "contentUrlChange" }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
2463
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: DbxIframeComponent, isStandalone: true, selector: "dbx-iframe", inputs: { scrolling: { classPropertyName: "scrolling", publicName: "scrolling", isSignal: true, isRequired: false, transformFunction: null }, sanitizeUrl: { classPropertyName: "sanitizeUrl", publicName: "sanitizeUrl", isSignal: true, isRequired: false, transformFunction: null }, contentUrl: { classPropertyName: "contentUrl", publicName: "contentUrl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { iframeLocationChanged: "iframeLocationChanged", contentUrl: "contentUrlChange" }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: `
2477
2464
  <iframe #iframe src="about:blank" frameborder="0" [scrolling]="scrolling()" allow="autoplay"></iframe>
2478
2465
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2479
2466
  }
@@ -2510,8 +2497,8 @@ function openIframeDialog(matDialog, config) {
2510
2497
  });
2511
2498
  }
2512
2499
 
2513
- class DbxEmbedComponent extends AbstractSubscriptionDirective {
2514
- _browserObjectUrlRef = browserObjectUrlRef();
2500
+ class DbxEmbedComponent {
2501
+ _browserObjectUrlRef = clean(browserObjectUrlRef());
2515
2502
  sanitizer = inject(DomSanitizer);
2516
2503
  root = viewChild('root', { read: ElementRef });
2517
2504
  /**
@@ -2560,8 +2547,7 @@ class DbxEmbedComponent extends AbstractSubscriptionDirective {
2560
2547
  type$ = toObservable(this.typeSignal);
2561
2548
  embedElementName$ = toObservable(this.embedElement);
2562
2549
  constructor() {
2563
- super();
2564
- this.sub = combineLatest([this.srcUrl$, this.root$, this.type$, this.embedElementName$])
2550
+ cleanSubscription(combineLatest([this.srcUrl$, this.root$, this.type$, this.embedElementName$])
2565
2551
  .pipe(throttleTime(100, undefined, { leading: true, trailing: true }))
2566
2552
  .subscribe(([srcUrl, root, type, forceEmbedElementName]) => {
2567
2553
  const element = root?.nativeElement;
@@ -2604,14 +2590,10 @@ class DbxEmbedComponent extends AbstractSubscriptionDirective {
2604
2590
  element.appendChild(embed);
2605
2591
  }
2606
2592
  }
2607
- });
2608
- }
2609
- ngOnDestroy() {
2610
- super.ngOnDestroy();
2611
- this._browserObjectUrlRef.destroy();
2593
+ }));
2612
2594
  }
2613
2595
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxEmbedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2614
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: DbxEmbedComponent, isStandalone: true, selector: "dbx-embed", inputs: { embedElement: { classPropertyName: "embedElement", publicName: "embedElement", isSignal: true, isRequired: false, transformFunction: null }, sanitizeUrl: { classPropertyName: "sanitizeUrl", publicName: "sanitizeUrl", isSignal: true, isRequired: false, transformFunction: null }, srcUrl: { classPropertyName: "srcUrl", publicName: "srcUrl", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { embedElement: "embedElementChange", sanitizeUrl: "sanitizeUrlChange", srcUrl: "srcUrlChange", type: "typeChange", blob: "blobChange" }, viewQueries: [{ propertyName: "root", first: true, predicate: ["root"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
2596
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: DbxEmbedComponent, isStandalone: true, selector: "dbx-embed", inputs: { embedElement: { classPropertyName: "embedElement", publicName: "embedElement", isSignal: true, isRequired: false, transformFunction: null }, sanitizeUrl: { classPropertyName: "sanitizeUrl", publicName: "sanitizeUrl", isSignal: true, isRequired: false, transformFunction: null }, srcUrl: { classPropertyName: "srcUrl", publicName: "srcUrl", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { embedElement: "embedElementChange", sanitizeUrl: "sanitizeUrlChange", srcUrl: "srcUrlChange", type: "typeChange", blob: "blobChange" }, viewQueries: [{ propertyName: "root", first: true, predicate: ["root"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: `
2615
2597
  <span #root></span>
2616
2598
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2617
2599
  }
@@ -2712,11 +2694,8 @@ class DbxPopupController {
2712
2694
  * Used for coordinating popups and closing/replacing existing ones when a new popup of the same name appears.
2713
2695
  */
2714
2696
  class DbxPopupCoordinatorService {
2715
- _popups = new BehaviorSubject(new Map());
2697
+ _popups = completeOnDestroy(new BehaviorSubject(new Map()));
2716
2698
  popups$ = this._popups.asObservable();
2717
- ngOnDestroy() {
2718
- this._popups.complete();
2719
- }
2720
2699
  get popups() {
2721
2700
  return this._popups.value;
2722
2701
  }
@@ -2758,11 +2737,9 @@ class DbxPopupCoordinatorComponent {
2758
2737
  isPopupForKey$ = this._service.popups$.pipe(map((x) => x.get(this._popup.key) === this._popup), shareReplay(1));
2759
2738
  show$ = this.isPopupForKey$.pipe(delay(0));
2760
2739
  showSignal = toSignal(this.show$);
2761
- ngOnInit() {
2740
+ constructor() {
2762
2741
  this._service.addPopup(this._popup);
2763
- }
2764
- ngOnDestroy() {
2765
- this._service.removePopup(this._popup.key, this._popup);
2742
+ clean(() => this._service.removePopup(this._popup.key, this._popup));
2766
2743
  }
2767
2744
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxPopupCoordinatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2768
2745
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxPopupCoordinatorComponent, isStandalone: true, selector: "dbx-popup-coordinator", ngImport: i0, template: `
@@ -2783,7 +2760,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2783
2760
  changeDetection: ChangeDetectionStrategy.OnPush,
2784
2761
  standalone: true
2785
2762
  }]
2786
- }] });
2763
+ }], ctorParameters: () => [] });
2787
2764
 
2788
2765
  const APP_POPUP_NORMAL_WIDTH = '700px';
2789
2766
  const APP_POPUP_MINIMIZED_WIDTH = '300px';
@@ -2805,10 +2782,10 @@ class DbxPopupComponent extends AbstractTransitionWatcherDirective {
2805
2782
  componentClass: this.config.componentClass,
2806
2783
  init: this.config.init ? (instance) => this.config.init(instance, this) : undefined
2807
2784
  };
2808
- closing = new Subject();
2785
+ closing = completeOnDestroy(new Subject());
2809
2786
  isClosing$ = this.closing.pipe(first(), map(() => true), startWith(false), shareReplay(1));
2810
2787
  closing$ = this.isClosing$.pipe(filter((x) => x));
2811
- _windowState = new BehaviorSubject(DbxPopupWindowState.NORMAL);
2788
+ _windowState = completeOnDestroy(new BehaviorSubject(DbxPopupWindowState.NORMAL));
2812
2789
  windowState$ = this._windowState.asObservable();
2813
2790
  getClosingValueFn;
2814
2791
  constructor() {
@@ -2817,11 +2794,6 @@ class DbxPopupComponent extends AbstractTransitionWatcherDirective {
2817
2794
  this._position = new PopupGlobalPositionStrategy(this.config.position ?? undefined, this.config.offset ?? undefined);
2818
2795
  this.popoverRef.overlay.updatePositionStrategy(this._position);
2819
2796
  }
2820
- ngOnDestroy() {
2821
- super.ngOnDestroy();
2822
- this.closing.complete();
2823
- this._windowState.complete();
2824
- }
2825
2797
  updateForSuccessfulTransition() {
2826
2798
  if (this.config.closeOnTransition !== false) {
2827
2799
  this.close();
@@ -4155,19 +4127,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4155
4127
  class DbxFileUploadActionSyncDirective {
4156
4128
  source = inject(DbxActionContextStoreSourceInstance);
4157
4129
  uploadCompatable = inject(DbxFileUploadActionCompatable);
4158
- _workingSub = new SubscriptionObject();
4159
- _disabledSub = new SubscriptionObject();
4160
- ngOnInit() {
4161
- this._workingSub.subscription = this.source.isWorkingOrWorkProgress$.subscribe((working) => {
4130
+ constructor() {
4131
+ cleanSubscription(this.source.isWorkingOrWorkProgress$.subscribe((working) => {
4162
4132
  this.uploadCompatable.setWorking(working);
4163
- });
4164
- this._disabledSub.subscription = this.source.isDisabled$.subscribe((disabled) => {
4133
+ }));
4134
+ cleanSubscription(this.source.isDisabled$.subscribe((disabled) => {
4165
4135
  this.uploadCompatable.setDisabled(disabled);
4166
- });
4167
- }
4168
- ngOnDestroy() {
4169
- this._workingSub.destroy();
4170
- this._disabledSub.destroy();
4136
+ }));
4171
4137
  }
4172
4138
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFileUploadActionSyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4173
4139
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxFileUploadActionSyncDirective, isStandalone: true, selector: "[dbxFileUploadActionSync]", ngImport: i0 });
@@ -4178,7 +4144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4178
4144
  selector: '[dbxFileUploadActionSync]',
4179
4145
  standalone: true
4180
4146
  }]
4181
- }] });
4147
+ }], ctorParameters: () => [] });
4182
4148
 
4183
4149
  class AbstractDbxErrorWidgetComponent {
4184
4150
  data = inject(DBX_INJECTION_COMPONENT_DATA);
@@ -4815,13 +4781,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4815
4781
  class DbxActionLoadingContextDirective {
4816
4782
  loadingComponent = inject(DbxLoadingComponent, { host: true });
4817
4783
  source = inject(DbxActionContextStoreSourceInstance);
4818
- _context = loadingStateContext({ obs: this.source.loadingState$ });
4784
+ _context = cleanLoadingContext({ obs: this.source.loadingState$ });
4819
4785
  constructor() {
4820
4786
  this.loadingComponent.setContext(this._context);
4821
4787
  }
4822
- ngOnDestroy() {
4823
- this._context.destroy();
4824
- }
4825
4788
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionLoadingContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4826
4789
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxActionLoadingContextDirective, isStandalone: true, selector: "[dbxActionLoadingContext]", ngImport: i0 });
4827
4790
  }
@@ -4865,10 +4828,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4865
4828
  /**
4866
4829
  * Component for a snackbar that contains an action.
4867
4830
  */
4868
- class DbxActionSnackbarComponent extends AbstractSubscriptionDirective {
4831
+ class DbxActionSnackbarComponent {
4869
4832
  snackbarRef = inject((MatSnackBarRef));
4870
4833
  snackbarData = inject(MAT_SNACK_BAR_DATA);
4871
- _durationTimeout = new Subject();
4834
+ _durationTimeout = completeOnDestroy(new Subject());
4872
4835
  _actionRef = this.snackbarData.action?.reference;
4873
4836
  sourceInstance$ = of(this._actionRef).pipe(filterMaybe(), map((x) => x?.sourceInstance));
4874
4837
  complete$ = this.sourceInstance$.pipe(switchMap((x) => x.isSuccess$), startWith(false), shareReplay(1));
@@ -4897,17 +4860,13 @@ class DbxActionSnackbarComponent extends AbstractSubscriptionDirective {
4897
4860
  hasAction = Boolean(this.action?.reference);
4898
4861
  message = this.snackbarData.message;
4899
4862
  actionConfig = this.snackbarData.action;
4900
- ngOnInit() {
4863
+ constructor() {
4901
4864
  // Subscribe and close if the duration is up and the action state is idle.
4902
- this.sub = this._durationTimeout
4865
+ cleanSubscription(this._durationTimeout
4903
4866
  .pipe(switchMap(() => this.loadingStateType$), filter((x) => x === LoadingStateType.IDLE))
4904
4867
  .subscribe(() => {
4905
4868
  this.dismiss();
4906
- });
4907
- }
4908
- ngOnDestroy() {
4909
- super.ngOnDestroy();
4910
- this._durationTimeout.complete();
4869
+ }));
4911
4870
  }
4912
4871
  ngAfterViewInit() {
4913
4872
  // Responsible for hiding itself if it has an action.
@@ -4923,13 +4882,13 @@ class DbxActionSnackbarComponent extends AbstractSubscriptionDirective {
4923
4882
  dismiss = () => {
4924
4883
  this.snackbarRef.dismiss();
4925
4884
  };
4926
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4927
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxActionSnackbarComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-action-snackbar\" [ngClass]=\"snackbarStatusClassSignal()\">\n <span>{{ message }}</span>\n <dbx-spacer></dbx-spacer>\n @switch (completeSignal()) {\n @case (true) {\n <dbx-button (buttonClick)=\"dismiss()\" color=\"accent\" icon=\"done\" text=\"Success\"></dbx-button>\n }\n @case (false) {\n @if (hasAction) {\n <dbx-action dbxActionValue [dbxActionSource]=\"sourceInstanceSignal()\" [dbxActionSuccessHandler]=\"dismissAfterActionCompletes\">\n <dbx-button dbxActionButton color=\"warn\" [text]=\"button\"></dbx-button>\n </dbx-action>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <dbx-button (buttonClick)=\"dismiss()\" color=\"accent\" icon=\"close\"></dbx-button>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: DbxActionSourceDirective, selector: "[dbxActionSource]", inputs: ["dbxActionSource"] }, { kind: "directive", type: DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "raised", "stroked", "flat", "iconOnly", "fab", "mode"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "directive", type: DbxSpacerDirective, selector: "dbx-spacer, [dbxSpacer]" }, { kind: "directive", type: DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4885
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4886
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxActionSnackbarComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"dbx-action-snackbar\" [ngClass]=\"snackbarStatusClassSignal()\">\n <span>{{ message }}</span>\n <dbx-spacer></dbx-spacer>\n @switch (completeSignal()) {\n @case (true) {\n <dbx-button (buttonClick)=\"dismiss()\" color=\"accent\" icon=\"done\" text=\"Success\"></dbx-button>\n }\n @case (false) {\n @if (hasAction) {\n <dbx-action dbxActionValue [dbxActionSource]=\"sourceInstanceSignal()\" [dbxActionSuccessHandler]=\"dismissAfterActionCompletes\">\n <dbx-button dbxActionButton color=\"warn\" [text]=\"button\"></dbx-button>\n </dbx-action>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <dbx-button (buttonClick)=\"dismiss()\" color=\"accent\" icon=\"close\"></dbx-button>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: DbxActionSourceDirective, selector: "[dbxActionSource]", inputs: ["dbxActionSource"] }, { kind: "directive", type: DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "raised", "stroked", "flat", "iconOnly", "fab", "mode"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "directive", type: DbxSpacerDirective, selector: "dbx-spacer, [dbxSpacer]" }, { kind: "directive", type: DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4928
4887
  }
4929
4888
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarComponent, decorators: [{
4930
4889
  type: Component,
4931
4890
  args: [{ standalone: true, imports: [NgClass, DbxActionSourceDirective, DbxActionSuccessHandlerDirective, DbxButtonComponent, DbxButtonSpacerDirective, DbxSpacerDirective, DbxActionDirective, DbxActionValueStreamDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dbx-action-snackbar\" [ngClass]=\"snackbarStatusClassSignal()\">\n <span>{{ message }}</span>\n <dbx-spacer></dbx-spacer>\n @switch (completeSignal()) {\n @case (true) {\n <dbx-button (buttonClick)=\"dismiss()\" color=\"accent\" icon=\"done\" text=\"Success\"></dbx-button>\n }\n @case (false) {\n @if (hasAction) {\n <dbx-action dbxActionValue [dbxActionSource]=\"sourceInstanceSignal()\" [dbxActionSuccessHandler]=\"dismissAfterActionCompletes\">\n <dbx-button dbxActionButton color=\"warn\" [text]=\"button\"></dbx-button>\n </dbx-action>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <dbx-button (buttonClick)=\"dismiss()\" color=\"accent\" icon=\"close\"></dbx-button>\n }\n }\n</div>\n" }]
4932
- }] });
4891
+ }], ctorParameters: () => [] });
4933
4892
 
4934
4893
  const DBX_ACTION_SNACKBAR_DEFAULTS = {
4935
4894
  create: {
@@ -5151,14 +5110,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5151
5110
  /**
5152
5111
  * Action directive that displays a snackbar when the action context hits a certain state.
5153
5112
  */
5154
- class DbxActionSnackbarDirective extends AbstractSubscriptionDirective {
5113
+ class DbxActionSnackbarDirective {
5155
5114
  source = inject((DbxActionContextStoreSourceInstance), { host: true });
5156
5115
  dbxActionSnackbarService = inject(DbxActionSnackbarService);
5157
5116
  dbxActionSnackbarDefault = input();
5158
5117
  dbxActionSnackbarUndo = input();
5159
5118
  dbxActionSnackbar = input(undefined, { transform: transformEmptyStringInputToUndefined });
5119
+ _sub = cleanSubscription();
5160
5120
  ngOnInit() {
5161
- this.sub = this.source
5121
+ this._sub.setSub(this.source
5162
5122
  .pipeStore((store) => store.loadingState$)
5163
5123
  .subscribe((loadingState) => {
5164
5124
  const event = { value: loadingState.value, error: loadingState.error, type: loadingStateType(loadingState) };
@@ -5166,7 +5126,7 @@ class DbxActionSnackbarDirective extends AbstractSubscriptionDirective {
5166
5126
  if (config) {
5167
5127
  this.showSnackbarForConfiguration(config, event);
5168
5128
  }
5169
- });
5129
+ }));
5170
5130
  }
5171
5131
  buildConfigurationForEvent(event) {
5172
5132
  const input = {
@@ -5179,8 +5139,8 @@ class DbxActionSnackbarDirective extends AbstractSubscriptionDirective {
5179
5139
  showSnackbarForConfiguration(config, event) {
5180
5140
  this.dbxActionSnackbarService.openSnackbar(config);
5181
5141
  }
5182
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5183
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxActionSnackbarDirective, isStandalone: true, selector: "[dbxActionSnackbar]", inputs: { dbxActionSnackbarDefault: { classPropertyName: "dbxActionSnackbarDefault", publicName: "dbxActionSnackbarDefault", isSignal: true, isRequired: false, transformFunction: null }, dbxActionSnackbarUndo: { classPropertyName: "dbxActionSnackbarUndo", publicName: "dbxActionSnackbarUndo", isSignal: true, isRequired: false, transformFunction: null }, dbxActionSnackbar: { classPropertyName: "dbxActionSnackbar", publicName: "dbxActionSnackbar", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
5142
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5143
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxActionSnackbarDirective, isStandalone: true, selector: "[dbxActionSnackbar]", inputs: { dbxActionSnackbarDefault: { classPropertyName: "dbxActionSnackbarDefault", publicName: "dbxActionSnackbarDefault", isSignal: true, isRequired: false, transformFunction: null }, dbxActionSnackbarUndo: { classPropertyName: "dbxActionSnackbarUndo", publicName: "dbxActionSnackbarUndo", isSignal: true, isRequired: false, transformFunction: null }, dbxActionSnackbar: { classPropertyName: "dbxActionSnackbar", publicName: "dbxActionSnackbar", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
5184
5144
  }
5185
5145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarDirective, decorators: [{
5186
5146
  type: Directive,
@@ -5207,16 +5167,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5207
5167
  /**
5208
5168
  * Context used for linking an ReadableErrorComponent to an ActionContext.
5209
5169
  */
5210
- class DbxActionErrorDirective extends AbstractSubscriptionDirective {
5170
+ class DbxActionErrorDirective {
5211
5171
  error = inject(DbxErrorComponent, { host: true });
5212
5172
  source = inject(DbxActionContextStoreSourceInstance);
5213
- ngOnInit() {
5214
- this.sub = this.source.error$.subscribe((error) => {
5173
+ constructor() {
5174
+ cleanSubscription(this.source.error$.subscribe((error) => {
5215
5175
  this.error.setError(error);
5216
- });
5176
+ }));
5217
5177
  }
5218
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionErrorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5219
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxActionErrorDirective, isStandalone: true, selector: "[dbxActionError]", usesInheritance: true, ngImport: i0 });
5178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5179
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxActionErrorDirective, isStandalone: true, selector: "[dbxActionError]", ngImport: i0 });
5220
5180
  }
5221
5181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionErrorDirective, decorators: [{
5222
5182
  type: Directive,
@@ -5224,7 +5184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5224
5184
  selector: '[dbxActionError]',
5225
5185
  standalone: true
5226
5186
  }]
5227
- }] });
5187
+ }], ctorParameters: () => [] });
5228
5188
 
5229
5189
  /**
5230
5190
  * Dialog that is shown/triggered as part of the DbxActionTransitionSafety
@@ -5561,21 +5521,22 @@ function convertToServerErrorResponse(error) {
5561
5521
  *
5562
5522
  * The error from the context is given to the app error when available.
5563
5523
  */
5564
- class DbxLoadingErrorDirective extends AbstractSubscriptionDirective {
5524
+ class DbxLoadingErrorDirective {
5565
5525
  error = inject(DbxErrorComponent, { host: true });
5566
5526
  context = input.required({ alias: 'dbxLoadingError' });
5567
5527
  context$ = toObservable(this.context).pipe(maybeValueFromObservableOrValue(), distinctUntilChanged(), shareReplay(1));
5568
5528
  contextSignal = toSignal(this.context$);
5529
+ _errorEffectSub = cleanSubscription();
5569
5530
  _errorEffect = effect(() => {
5570
5531
  const context = this.contextSignal();
5571
5532
  let subscription;
5572
5533
  if (context) {
5573
5534
  subscription = context.stream$.subscribe((x) => this.error.setError(x.error));
5574
5535
  }
5575
- this.sub = subscription;
5536
+ this._errorEffectSub.setSub(subscription);
5576
5537
  });
5577
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxLoadingErrorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5578
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxLoadingErrorDirective, isStandalone: true, selector: "[dbxLoadingError]", inputs: { context: { classPropertyName: "context", publicName: "dbxLoadingError", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
5538
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxLoadingErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5539
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxLoadingErrorDirective, isStandalone: true, selector: "[dbxLoadingError]", inputs: { context: { classPropertyName: "context", publicName: "dbxLoadingError", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
5579
5540
  }
5580
5541
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxLoadingErrorDirective, decorators: [{
5581
5542
  type: Directive,
@@ -5590,26 +5551,22 @@ class DbxErrorSnackbarComponent {
5590
5551
  data = inject(MAT_SNACK_BAR_DATA);
5591
5552
  error = this.data.error;
5592
5553
  _popoverOpen = signal(false);
5593
- _timer = makeTimer(this.data.duration ?? MS_IN_MINUTE, Boolean(this.data.duration));
5554
+ _timer = clean(makeTimer(this.data.duration ?? MS_IN_MINUTE, Boolean(this.data.duration)));
5594
5555
  _allowAutoDismiss = this.data.duration != null;
5595
5556
  _popoverSyncEffect = effect(() => toggleTimerRunning(this._timer, !this._popoverOpen()));
5596
- _popoverAfterClosedSub = new SubscriptionObject();
5597
- _autoDismissSub = new SubscriptionObject();
5598
- ngOnInit() {
5557
+ _popoverAfterClosedSub = cleanSubscription();
5558
+ _autoDismissSub = cleanSubscription();
5559
+ constructor() {
5599
5560
  if (this._allowAutoDismiss) {
5600
- this._autoDismissSub.subscription = from(this._timer.promise).subscribe(() => this.dismiss());
5561
+ this._autoDismissSub.setSub(from(this._timer.promise).subscribe(() => this.dismiss()));
5601
5562
  }
5602
5563
  else {
5603
5564
  this._popoverSyncEffect.destroy();
5604
5565
  }
5605
5566
  }
5606
- ngOnDestroy() {
5607
- this._autoDismissSub.destroy();
5608
- this._timer.destroy();
5609
- }
5610
5567
  onPopoverOpened(popover) {
5611
5568
  this._popoverOpen.set(true);
5612
- this._popoverAfterClosedSub.subscription = popover.afterClosed$.subscribe(() => this._popoverOpen.set(false));
5569
+ this._popoverAfterClosedSub.setSub(popover.afterClosed$.subscribe(() => this._popoverOpen.set(false)));
5613
5570
  }
5614
5571
  dismiss() {
5615
5572
  this.snackBarRef.dismiss();
@@ -5653,7 +5610,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5653
5610
  imports: [CommonModule, MatIconModule, MatButtonModule, DbxErrorViewComponent, DbxErrorComponent],
5654
5611
  changeDetection: ChangeDetectionStrategy.OnPush
5655
5612
  }]
5656
- }] });
5613
+ }], ctorParameters: () => [] });
5657
5614
 
5658
5615
  const DEFAULT_DBX_ERROR_SNACKBAR_CONFIG = {
5659
5616
  politeness: 'polite',
@@ -5693,21 +5650,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5693
5650
  /**
5694
5651
  * Context used for displaying an error from an ActionContext a snackbar when an ReadableErrorComponent
5695
5652
  */
5696
- class DbxActionSnackbarErrorDirective extends AbstractSubscriptionDirective {
5653
+ class DbxActionSnackbarErrorDirective {
5697
5654
  dbxErrorSnackbarService = inject(DbxErrorSnackbarService);
5698
5655
  source = inject(DbxActionContextStoreSourceInstance);
5699
5656
  config = input(undefined, { alias: 'dbxActionSnackbarError' });
5700
5657
  constructor() {
5701
- super();
5702
- this.sub = this.source.error$.pipe(filterMaybe()).subscribe((inputError) => {
5658
+ cleanSubscription(this.source.error$.pipe(filterMaybe()).subscribe((inputError) => {
5703
5659
  const config = this.config();
5704
5660
  const error = toReadableError(inputError);
5705
5661
  const snackbarConfig = config ? (typeof config === 'number' ? { duration: config } : config) : undefined;
5706
5662
  this.dbxErrorSnackbarService.showSnackbarError(error, snackbarConfig);
5707
- });
5663
+ }));
5708
5664
  }
5709
5665
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5710
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxActionSnackbarErrorDirective, isStandalone: true, selector: "[dbxActionSnackbarError]", inputs: { config: { classPropertyName: "config", publicName: "dbxActionSnackbarError", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
5666
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxActionSnackbarErrorDirective, isStandalone: true, selector: "[dbxActionSnackbarError]", inputs: { config: { classPropertyName: "config", publicName: "dbxActionSnackbarError", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
5711
5667
  }
5712
5668
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarErrorDirective, decorators: [{
5713
5669
  type: Directive,
@@ -5861,11 +5817,8 @@ class DbxModelViewTrackerStorage {
5861
5817
  static OBJECT_VIEW_TRACKER_STORAGE_LIST_KEY = 'dbxModelViewTrackerEvents';
5862
5818
  static DEFAULT_MAX_EVENTS = 100;
5863
5819
  storageAccessor = inject(DBX_MODEL_VIEW_TRACKER_STORAGE_ACCESSOR_TOKEN);
5864
- _newEvent = new Subject();
5820
+ _newEvent = completeOnDestroy(new Subject());
5865
5821
  newEvent$ = this._newEvent.asObservable();
5866
- ngOnDestroy() {
5867
- this._newEvent.complete();
5868
- }
5869
5822
  get storageKey() {
5870
5823
  return DbxModelViewTrackerStorage.OBJECT_VIEW_TRACKER_STORAGE_LIST_KEY;
5871
5824
  }
@@ -6088,9 +6041,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6088
6041
  /**
6089
6042
  * Button used for downloading an arbitrary blob based on the input configuration.
6090
6043
  */
6091
- class DbxDownloadBlobButtonComponent extends AbstractSubscriptionDirective {
6044
+ class DbxDownloadBlobButtonComponent {
6092
6045
  _sanitizer = inject(DomSanitizer);
6093
- _browserObjectUrl = browserObjectUrlRef();
6046
+ _browserObjectUrl = clean(browserObjectUrlRef());
6094
6047
  config = input(undefined);
6095
6048
  downloadButton = viewChild('downloadButton', { read: ElementRef });
6096
6049
  config$ = toObservable(this.config);
@@ -6137,12 +6090,8 @@ class DbxDownloadBlobButtonComponent extends AbstractSubscriptionDirective {
6137
6090
  };
6138
6091
  return style;
6139
6092
  });
6140
- ngOnDestroy() {
6141
- super.ngOnDestroy();
6142
- this._browserObjectUrl.destroy();
6143
- }
6144
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxDownloadBlobButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6145
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: DbxDownloadBlobButtonComponent, isStandalone: true, selector: "dbx-download-blob-button", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "downloadButton", first: true, predicate: ["downloadButton"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
6093
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxDownloadBlobButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6094
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: DbxDownloadBlobButtonComponent, isStandalone: true, selector: "dbx-download-blob-button", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "downloadButton", first: true, predicate: ["downloadButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: `
6146
6095
  <a #downloadButton [ngClass]="{ 'pointer-disabled': !downloadReadySignal() }" e [href]="fileUrlSignal()" [attr.download]="fileNameSignal()"><dbx-button [buttonDisplay]="buttonDisplaySignal()" [buttonStyle]="buttonStyleSignal()" [working]="!downloadReadySignal()" [disabled]="!downloadReadySignal()"></dbx-button></a>
6147
6096
  `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "raised", "stroked", "flat", "iconOnly", "fab", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6148
6097
  }
@@ -6326,7 +6275,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6326
6275
  * View for previewing and downloading arbitrary text content.
6327
6276
  */
6328
6277
  class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective {
6329
- _browserObjectUrl = browserObjectUrlRef();
6330
6278
  downloadButton = viewChild('downloadButton', { read: ElementRef });
6331
6279
  showDownloadButton = input(true);
6332
6280
  loadingText = input(undefined);
@@ -6386,9 +6334,6 @@ class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective {
6386
6334
  }
6387
6335
  }));
6388
6336
  };
6389
- ngOnDestroy() {
6390
- this._browserObjectUrl.destroy();
6391
- }
6392
6337
  toggleExpandPreview() {
6393
6338
  this.expandPreview.update((value) => !value);
6394
6339
  }
@@ -7123,7 +7068,7 @@ const INITIAL_STATE = {
7123
7068
  minRightWidth: DEFAULT_TWO_COLUMNS_MIN_RIGHT_WIDTH
7124
7069
  };
7125
7070
  class TwoColumnsContextStore extends ComponentStore {
7126
- _back = new Subject();
7071
+ _back = completeOnDestroy(new Subject());
7127
7072
  constructor() {
7128
7073
  super({ ...INITIAL_STATE });
7129
7074
  }
@@ -7215,11 +7160,6 @@ class TwoColumnsContextStore extends ComponentStore {
7215
7160
  back() {
7216
7161
  this._back.next();
7217
7162
  }
7218
- // MARK: Internal
7219
- ngOnDestroy() {
7220
- super.ngOnDestroy();
7221
- this._back.complete();
7222
- }
7223
7163
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoColumnsContextStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7224
7164
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoColumnsContextStore });
7225
7165
  }
@@ -7242,7 +7182,7 @@ function provideTwoColumnsContext() {
7242
7182
  *
7243
7183
  * Requires a TwoColumnsContextStore to be provided.
7244
7184
  */
7245
- class DbxTwoColumnComponent extends AbstractSubscriptionDirective {
7185
+ class DbxTwoColumnComponent {
7246
7186
  _elementRef = inject(ElementRef);
7247
7187
  twoColumnsContextStore = inject(TwoColumnsContextStore);
7248
7188
  reverseSizing = input(false);
@@ -7275,8 +7215,8 @@ class DbxTwoColumnComponent extends AbstractSubscriptionDirective {
7275
7215
  const totalWidth = this._elementRef.nativeElement.clientWidth;
7276
7216
  this.twoColumnsContextStore.setTotalWidth(totalWidth);
7277
7217
  }
7278
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7279
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxTwoColumnComponent, isStandalone: true, selector: "dbx-two-column", inputs: { reverseSizing: { classPropertyName: "reverseSizing", publicName: "reverseSizing", isSignal: true, isRequired: false, transformFunction: null }, inSectionPage: { classPropertyName: "inSectionPage", publicName: "inSectionPage", isSignal: true, isRequired: false, transformFunction: null }, hasRightContent: { classPropertyName: "hasRightContent", publicName: "hasRightContent", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClassSignal()" }, classAttribute: "dbx-two-column" }, exportAs: ["columns"], usesInheritance: true, ngImport: i0, template: `
7218
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7219
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxTwoColumnComponent, isStandalone: true, selector: "dbx-two-column", inputs: { reverseSizing: { classPropertyName: "reverseSizing", publicName: "reverseSizing", isSignal: true, isRequired: false, transformFunction: null }, inSectionPage: { classPropertyName: "inSectionPage", publicName: "inSectionPage", isSignal: true, isRequired: false, transformFunction: null }, hasRightContent: { classPropertyName: "hasRightContent", publicName: "hasRightContent", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClassSignal()" }, classAttribute: "dbx-two-column" }, exportAs: ["columns"], ngImport: i0, template: `
7280
7220
  <dbx-content-container grow="full" padding="none" class="dbx-content dbx-content-auto-height left-column">
7281
7221
  @if (!hideLeftColumnSignal() && reverseSizingSignal()) {
7282
7222
  <div (dbxResized)="viewResized($event)"></div>
@@ -7382,17 +7322,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7382
7322
  /**
7383
7323
  * Used with an DbxTwoColumnComponent to help respond to a "back" function.
7384
7324
  */
7385
- class DbxTwoColumnBackDirective extends AbstractSubscriptionDirective {
7325
+ class DbxTwoColumnBackDirective {
7386
7326
  twoColumnsContextStore = inject(TwoColumnsContextStore);
7387
7327
  dbxTwoColumnBack = output();
7388
- ngOnInit() {
7389
- this.sub = this.twoColumnsContextStore.back$.subscribe(() => this.dbxTwoColumnBack.emit());
7328
+ constructor() {
7329
+ cleanSubscription(this.twoColumnsContextStore.back$.subscribe(() => this.dbxTwoColumnBack.emit()));
7390
7330
  }
7391
7331
  backClicked() {
7392
7332
  this.twoColumnsContextStore.back();
7393
7333
  }
7394
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnBackDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
7395
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxTwoColumnBackDirective, isStandalone: true, selector: "[dbxTwoColumnBack]", outputs: { dbxTwoColumnBack: "dbxTwoColumnBack" }, usesInheritance: true, ngImport: i0 });
7334
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnBackDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
7335
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxTwoColumnBackDirective, isStandalone: true, selector: "[dbxTwoColumnBack]", outputs: { dbxTwoColumnBack: "dbxTwoColumnBack" }, ngImport: i0 });
7396
7336
  }
7397
7337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnBackDirective, decorators: [{
7398
7338
  type: Directive,
@@ -7400,7 +7340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7400
7340
  selector: '[dbxTwoColumnBack]',
7401
7341
  standalone: true
7402
7342
  }]
7403
- }] });
7343
+ }], ctorParameters: () => [] });
7404
7344
 
7405
7345
  /**
7406
7346
  * Provides a dbxTwoColumnContextStore
@@ -7686,13 +7626,10 @@ function listItemModifier(key, modify) {
7686
7626
  */
7687
7627
  class DbxValueListItemModifierDirective {
7688
7628
  inputModifiers = input(undefined, { alias: 'dbxListItemModifier', transform: transformEmptyStringInputToUndefined });
7689
- _additionalModifiers = new BehaviorSubject(undefined);
7629
+ _additionalModifiers = completeOnDestroy(new BehaviorSubject(undefined));
7690
7630
  modifiers$ = combineLatest([this._additionalModifiers, toObservable(this.inputModifiers)]).pipe(map(([modifiers, inputModifiers]) => {
7691
7631
  return combineMaps(modifiers, inputModifiers ? addModifiers(inputModifiers) : undefined);
7692
7632
  }), shareReplay(1));
7693
- ngOnDestroy() {
7694
- this._additionalModifiers.complete();
7695
- }
7696
7633
  // MARK: Modifiers
7697
7634
  addModifiers(modifiers) {
7698
7635
  this._additionalModifiers.next(addModifiers(modifiers, this._additionalModifiers.value));
@@ -7717,14 +7654,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7717
7654
  class AbstractDbxValueListItemModifierDirective {
7718
7655
  dbxValueListItemModifier = inject((DbxValueListItemModifier));
7719
7656
  _currentLinkedModifiers;
7720
- _modifiers = new BehaviorSubject(undefined);
7657
+ _modifiers = completeOnDestroy(new BehaviorSubject(undefined));
7721
7658
  modifiers$ = this._modifiers.pipe(maybeValueFromObservableOrValue(), distinctUntilChanged());
7722
- _modifiersSub = new SubscriptionObject(this.modifiers$.subscribe((modifiers) => {
7723
- this._linkModifiers(modifiers);
7724
- }));
7725
- ngOnDestroy() {
7726
- this._modifiersSub.destroy();
7727
- this._unlinkModifiers();
7659
+ constructor() {
7660
+ cleanSubscription(this.modifiers$.subscribe((modifiers) => {
7661
+ this._linkModifiers(modifiers);
7662
+ }));
7663
+ clean(() => this._unlinkModifiers());
7728
7664
  }
7729
7665
  setModifiers(modifiers) {
7730
7666
  this._modifiers.next(modifiers);
@@ -7747,7 +7683,7 @@ class AbstractDbxValueListItemModifierDirective {
7747
7683
  }
7748
7684
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxValueListItemModifierDirective, decorators: [{
7749
7685
  type: Directive
7750
- }] });
7686
+ }], ctorParameters: () => [] });
7751
7687
 
7752
7688
  const DBX_ROUTER_VALUE_LIST_ITEM_MODIFIER_KEY = 'router_anchor';
7753
7689
  class DbxListItemAnchorModifierDirective extends AbstractDbxValueListItemModifierDirective {
@@ -8504,18 +8440,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
8504
8440
  /**
8505
8441
  * Used with a DbxTwoColumnComponent to control showing right when the current route is a child of the backRef.
8506
8442
  */
8507
- class DbxTwoColumnSrefShowRightDirective extends AbstractSubscriptionDirective {
8443
+ class DbxTwoColumnSrefShowRightDirective {
8508
8444
  _twoColumnsContextStore = inject(TwoColumnsContextStore);
8509
8445
  _dbxRouterService = inject(DbxRouterService);
8510
8446
  showRight$ = this._twoColumnsContextStore.backRef$.pipe(
8511
8447
  // Only show right when the backRef is not exactly active
8512
8448
  isSegueRefActive({ dbxRouterService: this._dbxRouterService, activeExactly: true }), isNot(), distinctUntilChanged(), shareReplay(1));
8513
8449
  constructor() {
8514
- super();
8515
- this.sub = this._twoColumnsContextStore.setShowRight(this.showRight$);
8450
+ cleanSubscription(this._twoColumnsContextStore.setShowRight(this.showRight$));
8516
8451
  }
8517
8452
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnSrefShowRightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
8518
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxTwoColumnSrefShowRightDirective, isStandalone: true, selector: "[dbxTwoColumnSrefShowRight]", usesInheritance: true, ngImport: i0 });
8453
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxTwoColumnSrefShowRightDirective, isStandalone: true, selector: "[dbxTwoColumnSrefShowRight]", ngImport: i0 });
8519
8454
  }
8520
8455
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnSrefShowRightDirective, decorators: [{
8521
8456
  type: Directive,
@@ -8774,7 +8709,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
8774
8709
  /**
8775
8710
  * Used to declare a dbxFlexGroup.
8776
8711
  */
8777
- class DbxFlexGroupDirective extends AbstractSubscriptionDirective {
8712
+ class DbxFlexGroupDirective {
8778
8713
  _dbxScreenMediaService = inject(DbxScreenMediaService);
8779
8714
  content = input(true);
8780
8715
  breakToColumn = input(false);
@@ -8782,8 +8717,8 @@ class DbxFlexGroupDirective extends AbstractSubscriptionDirective {
8782
8717
  breakpoint = input('tablet', { transform: (x) => x ?? 'tablet' });
8783
8718
  isSmallScreen$ = this._dbxScreenMediaService.isBreakpointActive(toObservable(this.breakpoint)).pipe(map((x) => !x), distinctUntilChanged(), shareReplay(1));
8784
8719
  smallSignal = toSignal(this.isSmallScreen$, { initialValue: false });
8785
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFlexGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
8786
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxFlexGroupDirective, isStandalone: true, selector: "[dbxFlexGroup]", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, breakToColumn: { classPropertyName: "breakToColumn", publicName: "breakToColumn", isSignal: true, isRequired: false, transformFunction: null }, relative: { classPropertyName: "relative", publicName: "relative", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-flex-group": "content()", "class.dbx-flex-group-break-to-column": "breakToColumn()", "class.dbx-flex-group-relative": "relative()", "class.dbx-flex-group-small": "smallSignal()" } }, usesInheritance: true, ngImport: i0 });
8720
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFlexGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
8721
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxFlexGroupDirective, isStandalone: true, selector: "[dbxFlexGroup]", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, breakToColumn: { classPropertyName: "breakToColumn", publicName: "breakToColumn", isSignal: true, isRequired: false, transformFunction: null }, relative: { classPropertyName: "relative", publicName: "relative", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-flex-group": "content()", "class.dbx-flex-group-break-to-column": "breakToColumn()", "class.dbx-flex-group-relative": "relative()", "class.dbx-flex-group-small": "smallSignal()" } }, ngImport: i0 });
8787
8722
  }
8788
8723
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFlexGroupDirective, decorators: [{
8789
8724
  type: Directive,
@@ -9304,14 +9239,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
9304
9239
  class AbstractDbxListViewDirective {
9305
9240
  valuesArray = input();
9306
9241
  values = input();
9307
- _trackBy = new BehaviorSubject(undefined);
9308
- _disabled = new BehaviorSubject(false);
9309
- _selectionMode = new BehaviorSubject(undefined);
9310
- _valuesOverride = new BehaviorSubject(undefined);
9311
- trackBy$ = this._trackBy.asObservable();
9242
+ clickValue = output();
9243
+ _trackBySignal = signal(undefined);
9244
+ _disabledSignal = signal(false);
9245
+ _selectionModeSignal = signal(undefined);
9246
+ _valuesOverrideSignal = signal(undefined);
9247
+ trackBy$ = toObservable(this._trackBySignal);
9248
+ disabled$ = toObservable(this._disabledSignal);
9249
+ selectionMode$ = toObservable(this._selectionModeSignal);
9312
9250
  _inputValuesArray$ = toObservable(this.valuesArray);
9313
9251
  _inputValues$ = toObservable(this.values);
9314
- _values$ = this._valuesOverride.pipe(switchMap((x) => {
9252
+ _values$ = toObservable(this._valuesOverrideSignal).pipe(switchMap((x) => {
9315
9253
  let valuesObs;
9316
9254
  if (x) {
9317
9255
  valuesObs = asObservable(x);
@@ -9322,14 +9260,6 @@ class AbstractDbxListViewDirective {
9322
9260
  return valuesObs;
9323
9261
  }));
9324
9262
  values$ = this._values$.pipe(maybeValueFromObservableOrValue(), map((x) => x ?? []), distinctUntilChanged(), shareReplay(1));
9325
- disabled$ = this._disabled.asObservable();
9326
- selectionMode$ = this._selectionMode.asObservable();
9327
- clickValue = output();
9328
- ngOnDestroy() {
9329
- this._disabled.complete();
9330
- this._selectionMode.complete();
9331
- this._valuesOverride.complete();
9332
- }
9333
9263
  onClickValue(value) {
9334
9264
  this.clickValue.emit(value);
9335
9265
  }
@@ -9337,16 +9267,16 @@ class AbstractDbxListViewDirective {
9337
9267
  this.setValues(state.currentList$);
9338
9268
  }
9339
9269
  setValues(values) {
9340
- this._valuesOverride.next(values);
9270
+ this._valuesOverrideSignal.set(values);
9341
9271
  }
9342
9272
  setDisabled(disabled) {
9343
- this._disabled.next(disabled);
9273
+ this._disabledSignal.set(disabled);
9344
9274
  }
9345
9275
  setSelectionMode(selectionMode) {
9346
- this._selectionMode.next(selectionMode);
9276
+ this._selectionModeSignal.set(selectionMode);
9347
9277
  }
9348
9278
  setTrackBy(trackBy) {
9349
- this._trackBy.next(trackBy);
9279
+ this._trackBySignal.set(trackBy);
9350
9280
  }
9351
9281
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxListViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9352
9282
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: AbstractDbxListViewDirective, inputs: { valuesArray: { classPropertyName: "valuesArray", publicName: "valuesArray", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickValue: "clickValue" }, ngImport: i0 });
@@ -10461,7 +10391,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
10461
10391
  *
10462
10392
  * Will update the parent DbxStyleService.
10463
10393
  */
10464
- class DbxSetStyleDirective extends AbstractSubscriptionDirective {
10394
+ class DbxSetStyleDirective {
10465
10395
  _styleService = inject(DbxStyleService);
10466
10396
  /**
10467
10397
  * The input DbxStyleName to style the host element with.
@@ -10479,14 +10409,14 @@ class DbxSetStyleDirective extends AbstractSubscriptionDirective {
10479
10409
  suffixes$ = toObservable(this.suffixes).pipe(distinctUntilChanged(), map(splitCommaSeparatedStringToSet));
10480
10410
  config$ = combineLatest([this.style$, this.suffixes$]).pipe(map(([style, suffixes]) => ({ style, suffixes })), shareReplay(1));
10481
10411
  styleClass$ = this._styleService.getStyleClassWithConfig(this.config$);
10482
- ngOnInit() {
10483
- this._styleService.setConfig(this.config$);
10484
- this.sub = this.styleClass$.pipe(delay(0)).subscribe((style) => {
10412
+ constructor() {
10413
+ cleanSubscription(this.styleClass$.pipe(delay(0)).subscribe((style) => {
10485
10414
  this.outputStyleClassSignal.set(style);
10486
- });
10415
+ }));
10416
+ this._styleService.setConfig(this.config$);
10487
10417
  }
10488
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxSetStyleDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
10489
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxSetStyleDirective, isStandalone: true, selector: "[dbxSetStyle]", inputs: { dbxSetStyle: { classPropertyName: "dbxSetStyle", publicName: "dbxSetStyle", isSignal: true, isRequired: false, transformFunction: null }, suffixes: { classPropertyName: "suffixes", publicName: "suffixes", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "outputStyleClassSignal()" }, classAttribute: "dbx-style-root" }, usesInheritance: true, ngImport: i0 });
10418
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxSetStyleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10419
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: DbxSetStyleDirective, isStandalone: true, selector: "[dbxSetStyle]", inputs: { dbxSetStyle: { classPropertyName: "dbxSetStyle", publicName: "dbxSetStyle", isSignal: true, isRequired: false, transformFunction: null }, suffixes: { classPropertyName: "suffixes", publicName: "suffixes", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "outputStyleClassSignal()" }, classAttribute: "dbx-style-root" }, ngImport: i0 });
10490
10420
  }
10491
10421
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxSetStyleDirective, decorators: [{
10492
10422
  type: Directive,
@@ -10498,18 +10428,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
10498
10428
  },
10499
10429
  standalone: true
10500
10430
  }]
10501
- }] });
10431
+ }], ctorParameters: () => [] });
10502
10432
 
10503
10433
  /**
10504
10434
  * Used to style the <body> element of the document document using the style provided by DbxStyleService.
10505
10435
  */
10506
- class DbxStyleBodyDirective extends AbstractSubscriptionDirective {
10436
+ class DbxStyleBodyDirective {
10507
10437
  _styleService = inject(DbxStyleService);
10508
10438
  _renderer = inject(Renderer2);
10509
10439
  _styleClassNameSignal = signal(undefined);
10510
10440
  styleClassNameSignal = this._styleClassNameSignal.asReadonly();
10511
- ngOnInit() {
10512
- this.sub = this._styleService.styleClassName$.pipe(delay(0)).subscribe((newClassStyleToApply) => {
10441
+ constructor() {
10442
+ cleanSubscription(this._styleService.styleClassName$.pipe(delay(0)).subscribe((newClassStyleToApply) => {
10513
10443
  const currentStyle = this._styleClassNameSignal();
10514
10444
  if (currentStyle) {
10515
10445
  this._renderer.removeClass(document.body, currentStyle);
@@ -10518,10 +10448,10 @@ class DbxStyleBodyDirective extends AbstractSubscriptionDirective {
10518
10448
  this._renderer.addClass(document.body, newClassStyleToApply);
10519
10449
  }
10520
10450
  this._styleClassNameSignal.set(newClassStyleToApply);
10521
- });
10451
+ }));
10522
10452
  }
10523
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleBodyDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
10524
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxStyleBodyDirective, isStandalone: true, selector: "[dbxStyleBody]", host: { properties: { "class": "styleClassNameSignal()" } }, usesInheritance: true, ngImport: i0 });
10453
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10454
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxStyleBodyDirective, isStandalone: true, selector: "[dbxStyleBody]", host: { properties: { "class": "styleClassNameSignal()" } }, ngImport: i0 });
10525
10455
  }
10526
10456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleBodyDirective, decorators: [{
10527
10457
  type: Directive,
@@ -10532,7 +10462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
10532
10462
  },
10533
10463
  standalone: true
10534
10464
  }]
10535
- }] });
10465
+ }], ctorParameters: () => [] });
10536
10466
 
10537
10467
  /**
10538
10468
  * Used to apply a background style using a color.
@@ -11282,10 +11212,7 @@ class DbxZipBlobPreviewComponent {
11282
11212
  selectedFileEntry$ = toObservable(this.selectedFileNodeSignal);
11283
11213
  selectedFileEntryBlob$ = this.selectedFileEntry$.pipe(switchMap((x) => (x && x.value.getBlob ? x.value.getBlob() : of(undefined))), shareReplay(1));
11284
11214
  selectedFileEntryBlobSignal = toSignal(this.selectedFileEntryBlob$);
11285
- context = loadingStateContext({ obs: this.allEntriesLoadingState$ });
11286
- ngOnDestroy() {
11287
- this.context.destroy();
11288
- }
11215
+ context = cleanLoadingContext({ obs: this.allEntriesLoadingState$ });
11289
11216
  makeEntryAnchor = (itemValue) => {
11290
11217
  return {
11291
11218
  onClick: () => {
@@ -11344,10 +11271,7 @@ class DbxZipPreviewComponent {
11344
11271
  }));
11345
11272
  zipFileBlob$ = this.zipFileBlobLoadingState$.pipe(valueFromFinishedLoadingState(), distinctUntilChanged(), shareReplay(1));
11346
11273
  zipFileBlobSignal = toSignal(this.zipFileBlob$);
11347
- context = loadingStateContext({ obs: this.zipFileBlobLoadingState$ });
11348
- ngOnDestroy() {
11349
- this.context.destroy();
11350
- }
11274
+ context = cleanLoadingContext({ obs: this.zipFileBlobLoadingState$ });
11351
11275
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxZipPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11352
11276
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: DbxZipPreviewComponent, isStandalone: true, selector: "dbx-zip-preview", inputs: { srcUrl: { classPropertyName: "srcUrl", publicName: "srcUrl", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null }, downloadFileName: { classPropertyName: "downloadFileName", publicName: "downloadFileName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { srcUrl: "srcUrlChange", blob: "blobChange", downloadFileName: "downloadFileNameChange" }, ngImport: i0, template: `
11353
11277
  <dbx-loading [context]="context">
@@ -11700,7 +11624,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11700
11624
  * Service that tracks all active help context strings in the current context.
11701
11625
  */
11702
11626
  class DbxHelpContextService {
11703
- _contextReferences = new BehaviorSubject(new Set());
11627
+ _contextReferences = completeOnDestroy(new BehaviorSubject(new Set()));
11704
11628
  /**
11705
11629
  * Observable of all currently active help context strings.
11706
11630
  */
@@ -11716,9 +11640,6 @@ class DbxHelpContextService {
11716
11640
  referenceSet.delete(reference);
11717
11641
  this._contextReferences.next(referenceSet);
11718
11642
  }
11719
- ngOnDestroy() {
11720
- this._contextReferences.complete();
11721
- }
11722
11643
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxHelpContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11723
11644
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxHelpContextService });
11724
11645
  }