@dereekb/dbx-web 12.6.20 → 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 (106) 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/interaction/upload/upload.area.component.mjs +3 -3
  31. package/esm2022/lib/interaction/upload/upload.component.mjs +7 -4
  32. package/esm2022/lib/layout/column/two/two.column.back.directive.mjs +8 -8
  33. package/esm2022/lib/layout/column/two/two.column.component.mjs +4 -5
  34. package/esm2022/lib/layout/column/two/two.column.sref.showright.directive.mjs +5 -6
  35. package/esm2022/lib/layout/column/two/two.column.store.mjs +3 -7
  36. package/esm2022/lib/layout/flex/flex.group.directive.mjs +4 -5
  37. package/esm2022/lib/layout/list/list.view.directive.mjs +16 -21
  38. package/esm2022/lib/layout/list/modifier/list.view.value.modifier.directive.mjs +11 -15
  39. package/esm2022/lib/layout/list/modifier/list.view.value.modifier.ripple.directive.mjs +1 -1
  40. package/esm2022/lib/layout/list/modifier/list.view.value.modifier.selection.directive.mjs +1 -1
  41. package/esm2022/lib/layout/style/style.body.directive.mjs +9 -9
  42. package/esm2022/lib/layout/style/style.directive.mjs +9 -9
  43. package/esm2022/lib/layout/style/style.set.directive.mjs +10 -10
  44. package/esm2022/lib/loading/loading.action.directive.mjs +3 -7
  45. package/esm2022/mapbox/lib/mapbox.injection.store.mjs +1 -1
  46. package/esm2022/mapbox/lib/mapbox.layout.resize.sync.directive.mjs +8 -8
  47. package/esm2022/mapbox/lib/mapbox.menu.component.mjs +17 -19
  48. package/esm2022/mapbox/lib/mapbox.store.mjs +1 -1
  49. package/esm2022/table/lib/date/daterange.table.cell.input.component.mjs +8 -11
  50. package/esm2022/table/lib/table.column.size.directive.mjs +8 -9
  51. package/fesm2022/dereekb-dbx-web-mapbox.mjs +22 -24
  52. package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
  53. package/fesm2022/dereekb-dbx-web-table.mjs +13 -19
  54. package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
  55. package/fesm2022/dereekb-dbx-web.mjs +158 -234
  56. package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
  57. package/lib/action/snackbar/action.snackbar.component.d.ts +4 -5
  58. package/lib/action/snackbar/action.snackbar.directive.d.ts +3 -2
  59. package/lib/action/transition/transition.safety.dialog.component.d.ts +1 -2
  60. package/lib/button/progress/abstract.progress.button.directive.d.ts +3 -3
  61. package/lib/error/error.action.directive.d.ts +3 -4
  62. package/lib/error/error.loading.directive.d.ts +2 -2
  63. package/lib/error/error.snackbar.action.directive.d.ts +2 -2
  64. package/lib/error/error.snackbar.component.d.ts +2 -4
  65. package/lib/extension/download/blob/download.blob.button.component.d.ts +3 -4
  66. package/lib/extension/download/text/download.text.component.d.ts +2 -4
  67. package/lib/extension/help/help.context.service.d.ts +1 -3
  68. package/lib/extension/model/model.tracker.view.storage.d.ts +2 -3
  69. package/lib/extension/zip/zip.blob.preview.component.d.ts +2 -3
  70. package/lib/extension/zip/zip.preview.component.d.ts +1 -3
  71. package/lib/interaction/dialog/dialog.action.directive.d.ts +2 -2
  72. package/lib/interaction/filter/filter.popover.component.d.ts +3 -5
  73. package/lib/interaction/filter/filter.wrapper.component.d.ts +1 -1
  74. package/lib/interaction/iframe/embed.component.d.ts +2 -4
  75. package/lib/interaction/iframe/iframe.component.d.ts +2 -4
  76. package/lib/interaction/popover/abstract.popover.ref.directive.d.ts +4 -4
  77. package/lib/interaction/popover/popover.action.directive.d.ts +2 -2
  78. package/lib/interaction/popover/popover.coordinator.component.d.ts +2 -4
  79. package/lib/interaction/popover/popover.coordinator.service.d.ts +2 -4
  80. package/lib/interaction/popup/popup.component.d.ts +2 -3
  81. package/lib/interaction/popup/popup.coordinator.component.d.ts +2 -4
  82. package/lib/interaction/popup/popup.coordinator.service.d.ts +1 -3
  83. package/lib/interaction/prompt/prompt.confirm.dialog.component.d.ts +1 -2
  84. package/lib/interaction/upload/upload.action.directive.d.ts +2 -6
  85. package/lib/interaction/upload/upload.component.d.ts +3 -1
  86. package/lib/layout/column/two/two.column.back.directive.d.ts +2 -4
  87. package/lib/layout/column/two/two.column.component.d.ts +1 -3
  88. package/lib/layout/column/two/two.column.sref.showright.directive.d.ts +1 -2
  89. package/lib/layout/column/two/two.column.store.d.ts +2 -3
  90. package/lib/layout/flex/flex.group.directive.d.ts +1 -2
  91. package/lib/layout/list/list.view.directive.d.ts +9 -10
  92. package/lib/layout/list/modifier/list.view.value.modifier.directive.d.ts +3 -6
  93. package/lib/layout/list/modifier/list.view.value.modifier.ripple.directive.d.ts +1 -2
  94. package/lib/layout/list/modifier/list.view.value.modifier.selection.directive.d.ts +1 -2
  95. package/lib/layout/style/style.body.directive.d.ts +2 -4
  96. package/lib/layout/style/style.directive.d.ts +2 -4
  97. package/lib/layout/style/style.set.directive.d.ts +2 -4
  98. package/lib/layout/text/_text.scss +8 -0
  99. package/lib/loading/loading.action.directive.d.ts +1 -3
  100. package/mapbox/lib/mapbox.injection.store.d.ts +1 -2
  101. package/mapbox/lib/mapbox.layout.resize.sync.directive.d.ts +2 -4
  102. package/mapbox/lib/mapbox.menu.component.d.ts +5 -6
  103. package/mapbox/lib/mapbox.store.d.ts +1 -2
  104. package/package.json +1 -1
  105. package/table/lib/date/daterange.table.cell.input.component.d.ts +2 -4
  106. 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();
@@ -3877,7 +3849,7 @@ class DbxFileUploadAreaComponent extends AbstractDbxFileUploadComponent {
3877
3849
  }
3878
3850
  }
3879
3851
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFileUploadAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3880
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxFileUploadAreaComponent, isStandalone: true, selector: "dbx-file-upload-area", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesChanged: "filesChanged", areaClicked: "areaClicked", areaDragActiveChanged: "areaDragActiveChanged" }, host: { listeners: { "click": "onClick($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "class.dbx-file-upload-area-with-hint": "hintSignal()", "class.dbx-file-upload-area-disabled": "disabledSignal()", "class.dbx-file-upload-area-working": "isWorkingSignal()", "class.dbx-file-upload-area-drag-over": "!disabledSignal() && dragOverStateSignal()" }, classAttribute: "dbx-file-upload-area dbx-block" }, providers: provideDbxFileUploadActionCompatable(DbxFileUploadAreaComponent), usesInheritance: true, ngImport: i0, template: `
3852
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxFileUploadAreaComponent, isStandalone: true, selector: "dbx-file-upload-area", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesChanged: "filesChanged", areaClicked: "areaClicked", areaDragActiveChanged: "areaDragActiveChanged" }, host: { listeners: { "click": "onClick($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "class.dbx-file-upload-area-with-hint": "hintSignal()", "class.dbx-file-upload-area-disabled": "disabledSignal()", "class.dbx-file-upload-area-working": "isWorkingSignal()", "class.dbx-file-upload-area-drag-over": "!disabledSignal() && dragOverStateSignal()" }, classAttribute: "dbx-file-upload-area" }, providers: provideDbxFileUploadActionCompatable(DbxFileUploadAreaComponent), usesInheritance: true, ngImport: i0, template: `
3881
3853
  @if (show()) {
3882
3854
  <div class="dbx-file-upload-area-content">
3883
3855
  <div class="dbx-file-upload-area-content-text">
@@ -3937,7 +3909,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3937
3909
  </ng-template>
3938
3910
  `,
3939
3911
  host: {
3940
- class: 'dbx-file-upload-area dbx-block',
3912
+ class: 'dbx-file-upload-area',
3941
3913
  '[class.dbx-file-upload-area-with-hint]': 'hintSignal()',
3942
3914
  '[class.dbx-file-upload-area-disabled]': 'disabledSignal()',
3943
3915
  '[class.dbx-file-upload-area-working]': 'isWorkingSignal()',
@@ -4045,6 +4017,7 @@ class DbxFileUploadComponent extends AbstractDbxFileUploadComponent {
4045
4017
  area = viewChild.required('area', { read: DbxFileUploadAreaComponent });
4046
4018
  button = viewChild.required('button', { read: DbxFileUploadButtonComponent });
4047
4019
  buttonStyle = input();
4020
+ buttonDisplay = input();
4048
4021
  mode = input();
4049
4022
  text = input(); // button text
4050
4023
  icon = input(); // button icon
@@ -4071,12 +4044,14 @@ class DbxFileUploadComponent extends AbstractDbxFileUploadComponent {
4071
4044
  buttonTextSignal = computed(() => {
4072
4045
  const config = this.config();
4073
4046
  const text = this.text();
4074
- return config?.button?.text ?? text;
4047
+ const buttonDisplay = this.buttonDisplay();
4048
+ return config?.button?.text ?? buttonDisplay?.text ?? text;
4075
4049
  });
4076
4050
  buttonIconSignal = computed(() => {
4077
4051
  const config = this.config();
4078
4052
  const icon = this.icon();
4079
- return config?.button?.icon ?? icon;
4053
+ const buttonDisplay = this.buttonDisplay();
4054
+ return config?.button?.icon ?? buttonDisplay?.icon ?? icon;
4080
4055
  });
4081
4056
  areaTextSignal = computed(() => this.config()?.area?.text);
4082
4057
  areaIconSignal = computed(() => this.config()?.area?.icon);
@@ -4110,7 +4085,7 @@ class DbxFileUploadComponent extends AbstractDbxFileUploadComponent {
4110
4085
  this.filesChanged.emit(event);
4111
4086
  }
4112
4087
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFileUploadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4113
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxFileUploadComponent, isStandalone: true, selector: "dbx-file-upload", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, buttonStyle: { classPropertyName: "buttonStyle", publicName: "buttonStyle", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, clickAreaToUpload: { classPropertyName: "clickAreaToUpload", publicName: "clickAreaToUpload", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesChanged: "filesChanged" }, providers: provideDbxFileUploadActionCompatable(DbxFileUploadComponent), viewQueries: [{ propertyName: "area", first: true, predicate: ["area"], descendants: true, read: DbxFileUploadAreaComponent, isSignal: true }, { propertyName: "button", first: true, predicate: ["button"], descendants: true, read: DbxFileUploadButtonComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
4088
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxFileUploadComponent, isStandalone: true, selector: "dbx-file-upload", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, buttonStyle: { classPropertyName: "buttonStyle", publicName: "buttonStyle", isSignal: true, isRequired: false, transformFunction: null }, buttonDisplay: { classPropertyName: "buttonDisplay", publicName: "buttonDisplay", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, clickAreaToUpload: { classPropertyName: "clickAreaToUpload", publicName: "clickAreaToUpload", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesChanged: "filesChanged" }, providers: provideDbxFileUploadActionCompatable(DbxFileUploadComponent), viewQueries: [{ propertyName: "area", first: true, predicate: ["area"], descendants: true, read: DbxFileUploadAreaComponent, isSignal: true }, { propertyName: "button", first: true, predicate: ["button"], descendants: true, read: DbxFileUploadButtonComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
4114
4089
  <dbx-file-upload-area #area [show]="showAreaSignal()" [hint]="areaHintSignal()" [text]="areaTextSignal()" [icon]="areaIconSignal()" [accept]="acceptSignal()" [multiple]="multipleSignal()" (filesChanged)="areaFilesChanged($event)" (areaClicked)="areaClicked()" [disabled]="disabledSignal()" [working]="workingSignal()">
4115
4090
  <ng-content></ng-content>
4116
4091
  @if (showButtonSignal()) {
@@ -4152,19 +4127,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4152
4127
  class DbxFileUploadActionSyncDirective {
4153
4128
  source = inject(DbxActionContextStoreSourceInstance);
4154
4129
  uploadCompatable = inject(DbxFileUploadActionCompatable);
4155
- _workingSub = new SubscriptionObject();
4156
- _disabledSub = new SubscriptionObject();
4157
- ngOnInit() {
4158
- this._workingSub.subscription = this.source.isWorkingOrWorkProgress$.subscribe((working) => {
4130
+ constructor() {
4131
+ cleanSubscription(this.source.isWorkingOrWorkProgress$.subscribe((working) => {
4159
4132
  this.uploadCompatable.setWorking(working);
4160
- });
4161
- this._disabledSub.subscription = this.source.isDisabled$.subscribe((disabled) => {
4133
+ }));
4134
+ cleanSubscription(this.source.isDisabled$.subscribe((disabled) => {
4162
4135
  this.uploadCompatable.setDisabled(disabled);
4163
- });
4164
- }
4165
- ngOnDestroy() {
4166
- this._workingSub.destroy();
4167
- this._disabledSub.destroy();
4136
+ }));
4168
4137
  }
4169
4138
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFileUploadActionSyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4170
4139
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxFileUploadActionSyncDirective, isStandalone: true, selector: "[dbxFileUploadActionSync]", ngImport: i0 });
@@ -4175,7 +4144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4175
4144
  selector: '[dbxFileUploadActionSync]',
4176
4145
  standalone: true
4177
4146
  }]
4178
- }] });
4147
+ }], ctorParameters: () => [] });
4179
4148
 
4180
4149
  class AbstractDbxErrorWidgetComponent {
4181
4150
  data = inject(DBX_INJECTION_COMPONENT_DATA);
@@ -4812,13 +4781,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4812
4781
  class DbxActionLoadingContextDirective {
4813
4782
  loadingComponent = inject(DbxLoadingComponent, { host: true });
4814
4783
  source = inject(DbxActionContextStoreSourceInstance);
4815
- _context = loadingStateContext({ obs: this.source.loadingState$ });
4784
+ _context = cleanLoadingContext({ obs: this.source.loadingState$ });
4816
4785
  constructor() {
4817
4786
  this.loadingComponent.setContext(this._context);
4818
4787
  }
4819
- ngOnDestroy() {
4820
- this._context.destroy();
4821
- }
4822
4788
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionLoadingContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4823
4789
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DbxActionLoadingContextDirective, isStandalone: true, selector: "[dbxActionLoadingContext]", ngImport: i0 });
4824
4790
  }
@@ -4862,10 +4828,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4862
4828
  /**
4863
4829
  * Component for a snackbar that contains an action.
4864
4830
  */
4865
- class DbxActionSnackbarComponent extends AbstractSubscriptionDirective {
4831
+ class DbxActionSnackbarComponent {
4866
4832
  snackbarRef = inject((MatSnackBarRef));
4867
4833
  snackbarData = inject(MAT_SNACK_BAR_DATA);
4868
- _durationTimeout = new Subject();
4834
+ _durationTimeout = completeOnDestroy(new Subject());
4869
4835
  _actionRef = this.snackbarData.action?.reference;
4870
4836
  sourceInstance$ = of(this._actionRef).pipe(filterMaybe(), map((x) => x?.sourceInstance));
4871
4837
  complete$ = this.sourceInstance$.pipe(switchMap((x) => x.isSuccess$), startWith(false), shareReplay(1));
@@ -4894,17 +4860,13 @@ class DbxActionSnackbarComponent extends AbstractSubscriptionDirective {
4894
4860
  hasAction = Boolean(this.action?.reference);
4895
4861
  message = this.snackbarData.message;
4896
4862
  actionConfig = this.snackbarData.action;
4897
- ngOnInit() {
4863
+ constructor() {
4898
4864
  // Subscribe and close if the duration is up and the action state is idle.
4899
- this.sub = this._durationTimeout
4865
+ cleanSubscription(this._durationTimeout
4900
4866
  .pipe(switchMap(() => this.loadingStateType$), filter((x) => x === LoadingStateType.IDLE))
4901
4867
  .subscribe(() => {
4902
4868
  this.dismiss();
4903
- });
4904
- }
4905
- ngOnDestroy() {
4906
- super.ngOnDestroy();
4907
- this._durationTimeout.complete();
4869
+ }));
4908
4870
  }
4909
4871
  ngAfterViewInit() {
4910
4872
  // Responsible for hiding itself if it has an action.
@@ -4920,13 +4882,13 @@ class DbxActionSnackbarComponent extends AbstractSubscriptionDirective {
4920
4882
  dismiss = () => {
4921
4883
  this.snackbarRef.dismiss();
4922
4884
  };
4923
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4924
- 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 });
4925
4887
  }
4926
4888
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarComponent, decorators: [{
4927
4889
  type: Component,
4928
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" }]
4929
- }] });
4891
+ }], ctorParameters: () => [] });
4930
4892
 
4931
4893
  const DBX_ACTION_SNACKBAR_DEFAULTS = {
4932
4894
  create: {
@@ -5148,14 +5110,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5148
5110
  /**
5149
5111
  * Action directive that displays a snackbar when the action context hits a certain state.
5150
5112
  */
5151
- class DbxActionSnackbarDirective extends AbstractSubscriptionDirective {
5113
+ class DbxActionSnackbarDirective {
5152
5114
  source = inject((DbxActionContextStoreSourceInstance), { host: true });
5153
5115
  dbxActionSnackbarService = inject(DbxActionSnackbarService);
5154
5116
  dbxActionSnackbarDefault = input();
5155
5117
  dbxActionSnackbarUndo = input();
5156
5118
  dbxActionSnackbar = input(undefined, { transform: transformEmptyStringInputToUndefined });
5119
+ _sub = cleanSubscription();
5157
5120
  ngOnInit() {
5158
- this.sub = this.source
5121
+ this._sub.setSub(this.source
5159
5122
  .pipeStore((store) => store.loadingState$)
5160
5123
  .subscribe((loadingState) => {
5161
5124
  const event = { value: loadingState.value, error: loadingState.error, type: loadingStateType(loadingState) };
@@ -5163,7 +5126,7 @@ class DbxActionSnackbarDirective extends AbstractSubscriptionDirective {
5163
5126
  if (config) {
5164
5127
  this.showSnackbarForConfiguration(config, event);
5165
5128
  }
5166
- });
5129
+ }));
5167
5130
  }
5168
5131
  buildConfigurationForEvent(event) {
5169
5132
  const input = {
@@ -5176,8 +5139,8 @@ class DbxActionSnackbarDirective extends AbstractSubscriptionDirective {
5176
5139
  showSnackbarForConfiguration(config, event) {
5177
5140
  this.dbxActionSnackbarService.openSnackbar(config);
5178
5141
  }
5179
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5180
- 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 });
5181
5144
  }
5182
5145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarDirective, decorators: [{
5183
5146
  type: Directive,
@@ -5204,16 +5167,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5204
5167
  /**
5205
5168
  * Context used for linking an ReadableErrorComponent to an ActionContext.
5206
5169
  */
5207
- class DbxActionErrorDirective extends AbstractSubscriptionDirective {
5170
+ class DbxActionErrorDirective {
5208
5171
  error = inject(DbxErrorComponent, { host: true });
5209
5172
  source = inject(DbxActionContextStoreSourceInstance);
5210
- ngOnInit() {
5211
- this.sub = this.source.error$.subscribe((error) => {
5173
+ constructor() {
5174
+ cleanSubscription(this.source.error$.subscribe((error) => {
5212
5175
  this.error.setError(error);
5213
- });
5176
+ }));
5214
5177
  }
5215
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionErrorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5216
- 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 });
5217
5180
  }
5218
5181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionErrorDirective, decorators: [{
5219
5182
  type: Directive,
@@ -5221,7 +5184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5221
5184
  selector: '[dbxActionError]',
5222
5185
  standalone: true
5223
5186
  }]
5224
- }] });
5187
+ }], ctorParameters: () => [] });
5225
5188
 
5226
5189
  /**
5227
5190
  * Dialog that is shown/triggered as part of the DbxActionTransitionSafety
@@ -5558,21 +5521,22 @@ function convertToServerErrorResponse(error) {
5558
5521
  *
5559
5522
  * The error from the context is given to the app error when available.
5560
5523
  */
5561
- class DbxLoadingErrorDirective extends AbstractSubscriptionDirective {
5524
+ class DbxLoadingErrorDirective {
5562
5525
  error = inject(DbxErrorComponent, { host: true });
5563
5526
  context = input.required({ alias: 'dbxLoadingError' });
5564
5527
  context$ = toObservable(this.context).pipe(maybeValueFromObservableOrValue(), distinctUntilChanged(), shareReplay(1));
5565
5528
  contextSignal = toSignal(this.context$);
5529
+ _errorEffectSub = cleanSubscription();
5566
5530
  _errorEffect = effect(() => {
5567
5531
  const context = this.contextSignal();
5568
5532
  let subscription;
5569
5533
  if (context) {
5570
5534
  subscription = context.stream$.subscribe((x) => this.error.setError(x.error));
5571
5535
  }
5572
- this.sub = subscription;
5536
+ this._errorEffectSub.setSub(subscription);
5573
5537
  });
5574
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxLoadingErrorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5575
- 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 });
5576
5540
  }
5577
5541
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxLoadingErrorDirective, decorators: [{
5578
5542
  type: Directive,
@@ -5587,26 +5551,22 @@ class DbxErrorSnackbarComponent {
5587
5551
  data = inject(MAT_SNACK_BAR_DATA);
5588
5552
  error = this.data.error;
5589
5553
  _popoverOpen = signal(false);
5590
- _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)));
5591
5555
  _allowAutoDismiss = this.data.duration != null;
5592
5556
  _popoverSyncEffect = effect(() => toggleTimerRunning(this._timer, !this._popoverOpen()));
5593
- _popoverAfterClosedSub = new SubscriptionObject();
5594
- _autoDismissSub = new SubscriptionObject();
5595
- ngOnInit() {
5557
+ _popoverAfterClosedSub = cleanSubscription();
5558
+ _autoDismissSub = cleanSubscription();
5559
+ constructor() {
5596
5560
  if (this._allowAutoDismiss) {
5597
- this._autoDismissSub.subscription = from(this._timer.promise).subscribe(() => this.dismiss());
5561
+ this._autoDismissSub.setSub(from(this._timer.promise).subscribe(() => this.dismiss()));
5598
5562
  }
5599
5563
  else {
5600
5564
  this._popoverSyncEffect.destroy();
5601
5565
  }
5602
5566
  }
5603
- ngOnDestroy() {
5604
- this._autoDismissSub.destroy();
5605
- this._timer.destroy();
5606
- }
5607
5567
  onPopoverOpened(popover) {
5608
5568
  this._popoverOpen.set(true);
5609
- this._popoverAfterClosedSub.subscription = popover.afterClosed$.subscribe(() => this._popoverOpen.set(false));
5569
+ this._popoverAfterClosedSub.setSub(popover.afterClosed$.subscribe(() => this._popoverOpen.set(false)));
5610
5570
  }
5611
5571
  dismiss() {
5612
5572
  this.snackBarRef.dismiss();
@@ -5650,7 +5610,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5650
5610
  imports: [CommonModule, MatIconModule, MatButtonModule, DbxErrorViewComponent, DbxErrorComponent],
5651
5611
  changeDetection: ChangeDetectionStrategy.OnPush
5652
5612
  }]
5653
- }] });
5613
+ }], ctorParameters: () => [] });
5654
5614
 
5655
5615
  const DEFAULT_DBX_ERROR_SNACKBAR_CONFIG = {
5656
5616
  politeness: 'polite',
@@ -5690,21 +5650,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5690
5650
  /**
5691
5651
  * Context used for displaying an error from an ActionContext a snackbar when an ReadableErrorComponent
5692
5652
  */
5693
- class DbxActionSnackbarErrorDirective extends AbstractSubscriptionDirective {
5653
+ class DbxActionSnackbarErrorDirective {
5694
5654
  dbxErrorSnackbarService = inject(DbxErrorSnackbarService);
5695
5655
  source = inject(DbxActionContextStoreSourceInstance);
5696
5656
  config = input(undefined, { alias: 'dbxActionSnackbarError' });
5697
5657
  constructor() {
5698
- super();
5699
- this.sub = this.source.error$.pipe(filterMaybe()).subscribe((inputError) => {
5658
+ cleanSubscription(this.source.error$.pipe(filterMaybe()).subscribe((inputError) => {
5700
5659
  const config = this.config();
5701
5660
  const error = toReadableError(inputError);
5702
5661
  const snackbarConfig = config ? (typeof config === 'number' ? { duration: config } : config) : undefined;
5703
5662
  this.dbxErrorSnackbarService.showSnackbarError(error, snackbarConfig);
5704
- });
5663
+ }));
5705
5664
  }
5706
5665
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5707
- 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 });
5708
5667
  }
5709
5668
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxActionSnackbarErrorDirective, decorators: [{
5710
5669
  type: Directive,
@@ -5858,11 +5817,8 @@ class DbxModelViewTrackerStorage {
5858
5817
  static OBJECT_VIEW_TRACKER_STORAGE_LIST_KEY = 'dbxModelViewTrackerEvents';
5859
5818
  static DEFAULT_MAX_EVENTS = 100;
5860
5819
  storageAccessor = inject(DBX_MODEL_VIEW_TRACKER_STORAGE_ACCESSOR_TOKEN);
5861
- _newEvent = new Subject();
5820
+ _newEvent = completeOnDestroy(new Subject());
5862
5821
  newEvent$ = this._newEvent.asObservable();
5863
- ngOnDestroy() {
5864
- this._newEvent.complete();
5865
- }
5866
5822
  get storageKey() {
5867
5823
  return DbxModelViewTrackerStorage.OBJECT_VIEW_TRACKER_STORAGE_LIST_KEY;
5868
5824
  }
@@ -6085,9 +6041,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6085
6041
  /**
6086
6042
  * Button used for downloading an arbitrary blob based on the input configuration.
6087
6043
  */
6088
- class DbxDownloadBlobButtonComponent extends AbstractSubscriptionDirective {
6044
+ class DbxDownloadBlobButtonComponent {
6089
6045
  _sanitizer = inject(DomSanitizer);
6090
- _browserObjectUrl = browserObjectUrlRef();
6046
+ _browserObjectUrl = clean(browserObjectUrlRef());
6091
6047
  config = input(undefined);
6092
6048
  downloadButton = viewChild('downloadButton', { read: ElementRef });
6093
6049
  config$ = toObservable(this.config);
@@ -6134,12 +6090,8 @@ class DbxDownloadBlobButtonComponent extends AbstractSubscriptionDirective {
6134
6090
  };
6135
6091
  return style;
6136
6092
  });
6137
- ngOnDestroy() {
6138
- super.ngOnDestroy();
6139
- this._browserObjectUrl.destroy();
6140
- }
6141
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxDownloadBlobButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6142
- 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: `
6143
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>
6144
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 });
6145
6097
  }
@@ -6323,7 +6275,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6323
6275
  * View for previewing and downloading arbitrary text content.
6324
6276
  */
6325
6277
  class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective {
6326
- _browserObjectUrl = browserObjectUrlRef();
6327
6278
  downloadButton = viewChild('downloadButton', { read: ElementRef });
6328
6279
  showDownloadButton = input(true);
6329
6280
  loadingText = input(undefined);
@@ -6383,9 +6334,6 @@ class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective {
6383
6334
  }
6384
6335
  }));
6385
6336
  };
6386
- ngOnDestroy() {
6387
- this._browserObjectUrl.destroy();
6388
- }
6389
6337
  toggleExpandPreview() {
6390
6338
  this.expandPreview.update((value) => !value);
6391
6339
  }
@@ -7120,7 +7068,7 @@ const INITIAL_STATE = {
7120
7068
  minRightWidth: DEFAULT_TWO_COLUMNS_MIN_RIGHT_WIDTH
7121
7069
  };
7122
7070
  class TwoColumnsContextStore extends ComponentStore {
7123
- _back = new Subject();
7071
+ _back = completeOnDestroy(new Subject());
7124
7072
  constructor() {
7125
7073
  super({ ...INITIAL_STATE });
7126
7074
  }
@@ -7212,11 +7160,6 @@ class TwoColumnsContextStore extends ComponentStore {
7212
7160
  back() {
7213
7161
  this._back.next();
7214
7162
  }
7215
- // MARK: Internal
7216
- ngOnDestroy() {
7217
- super.ngOnDestroy();
7218
- this._back.complete();
7219
- }
7220
7163
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoColumnsContextStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7221
7164
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoColumnsContextStore });
7222
7165
  }
@@ -7239,7 +7182,7 @@ function provideTwoColumnsContext() {
7239
7182
  *
7240
7183
  * Requires a TwoColumnsContextStore to be provided.
7241
7184
  */
7242
- class DbxTwoColumnComponent extends AbstractSubscriptionDirective {
7185
+ class DbxTwoColumnComponent {
7243
7186
  _elementRef = inject(ElementRef);
7244
7187
  twoColumnsContextStore = inject(TwoColumnsContextStore);
7245
7188
  reverseSizing = input(false);
@@ -7272,8 +7215,8 @@ class DbxTwoColumnComponent extends AbstractSubscriptionDirective {
7272
7215
  const totalWidth = this._elementRef.nativeElement.clientWidth;
7273
7216
  this.twoColumnsContextStore.setTotalWidth(totalWidth);
7274
7217
  }
7275
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7276
- 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: `
7277
7220
  <dbx-content-container grow="full" padding="none" class="dbx-content dbx-content-auto-height left-column">
7278
7221
  @if (!hideLeftColumnSignal() && reverseSizingSignal()) {
7279
7222
  <div (dbxResized)="viewResized($event)"></div>
@@ -7379,17 +7322,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7379
7322
  /**
7380
7323
  * Used with an DbxTwoColumnComponent to help respond to a "back" function.
7381
7324
  */
7382
- class DbxTwoColumnBackDirective extends AbstractSubscriptionDirective {
7325
+ class DbxTwoColumnBackDirective {
7383
7326
  twoColumnsContextStore = inject(TwoColumnsContextStore);
7384
7327
  dbxTwoColumnBack = output();
7385
- ngOnInit() {
7386
- this.sub = this.twoColumnsContextStore.back$.subscribe(() => this.dbxTwoColumnBack.emit());
7328
+ constructor() {
7329
+ cleanSubscription(this.twoColumnsContextStore.back$.subscribe(() => this.dbxTwoColumnBack.emit()));
7387
7330
  }
7388
7331
  backClicked() {
7389
7332
  this.twoColumnsContextStore.back();
7390
7333
  }
7391
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnBackDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
7392
- 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 });
7393
7336
  }
7394
7337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnBackDirective, decorators: [{
7395
7338
  type: Directive,
@@ -7397,7 +7340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7397
7340
  selector: '[dbxTwoColumnBack]',
7398
7341
  standalone: true
7399
7342
  }]
7400
- }] });
7343
+ }], ctorParameters: () => [] });
7401
7344
 
7402
7345
  /**
7403
7346
  * Provides a dbxTwoColumnContextStore
@@ -7683,13 +7626,10 @@ function listItemModifier(key, modify) {
7683
7626
  */
7684
7627
  class DbxValueListItemModifierDirective {
7685
7628
  inputModifiers = input(undefined, { alias: 'dbxListItemModifier', transform: transformEmptyStringInputToUndefined });
7686
- _additionalModifiers = new BehaviorSubject(undefined);
7629
+ _additionalModifiers = completeOnDestroy(new BehaviorSubject(undefined));
7687
7630
  modifiers$ = combineLatest([this._additionalModifiers, toObservable(this.inputModifiers)]).pipe(map(([modifiers, inputModifiers]) => {
7688
7631
  return combineMaps(modifiers, inputModifiers ? addModifiers(inputModifiers) : undefined);
7689
7632
  }), shareReplay(1));
7690
- ngOnDestroy() {
7691
- this._additionalModifiers.complete();
7692
- }
7693
7633
  // MARK: Modifiers
7694
7634
  addModifiers(modifiers) {
7695
7635
  this._additionalModifiers.next(addModifiers(modifiers, this._additionalModifiers.value));
@@ -7714,14 +7654,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7714
7654
  class AbstractDbxValueListItemModifierDirective {
7715
7655
  dbxValueListItemModifier = inject((DbxValueListItemModifier));
7716
7656
  _currentLinkedModifiers;
7717
- _modifiers = new BehaviorSubject(undefined);
7657
+ _modifiers = completeOnDestroy(new BehaviorSubject(undefined));
7718
7658
  modifiers$ = this._modifiers.pipe(maybeValueFromObservableOrValue(), distinctUntilChanged());
7719
- _modifiersSub = new SubscriptionObject(this.modifiers$.subscribe((modifiers) => {
7720
- this._linkModifiers(modifiers);
7721
- }));
7722
- ngOnDestroy() {
7723
- this._modifiersSub.destroy();
7724
- this._unlinkModifiers();
7659
+ constructor() {
7660
+ cleanSubscription(this.modifiers$.subscribe((modifiers) => {
7661
+ this._linkModifiers(modifiers);
7662
+ }));
7663
+ clean(() => this._unlinkModifiers());
7725
7664
  }
7726
7665
  setModifiers(modifiers) {
7727
7666
  this._modifiers.next(modifiers);
@@ -7744,7 +7683,7 @@ class AbstractDbxValueListItemModifierDirective {
7744
7683
  }
7745
7684
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxValueListItemModifierDirective, decorators: [{
7746
7685
  type: Directive
7747
- }] });
7686
+ }], ctorParameters: () => [] });
7748
7687
 
7749
7688
  const DBX_ROUTER_VALUE_LIST_ITEM_MODIFIER_KEY = 'router_anchor';
7750
7689
  class DbxListItemAnchorModifierDirective extends AbstractDbxValueListItemModifierDirective {
@@ -8501,18 +8440,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
8501
8440
  /**
8502
8441
  * Used with a DbxTwoColumnComponent to control showing right when the current route is a child of the backRef.
8503
8442
  */
8504
- class DbxTwoColumnSrefShowRightDirective extends AbstractSubscriptionDirective {
8443
+ class DbxTwoColumnSrefShowRightDirective {
8505
8444
  _twoColumnsContextStore = inject(TwoColumnsContextStore);
8506
8445
  _dbxRouterService = inject(DbxRouterService);
8507
8446
  showRight$ = this._twoColumnsContextStore.backRef$.pipe(
8508
8447
  // Only show right when the backRef is not exactly active
8509
8448
  isSegueRefActive({ dbxRouterService: this._dbxRouterService, activeExactly: true }), isNot(), distinctUntilChanged(), shareReplay(1));
8510
8449
  constructor() {
8511
- super();
8512
- this.sub = this._twoColumnsContextStore.setShowRight(this.showRight$);
8450
+ cleanSubscription(this._twoColumnsContextStore.setShowRight(this.showRight$));
8513
8451
  }
8514
8452
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnSrefShowRightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
8515
- 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 });
8516
8454
  }
8517
8455
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxTwoColumnSrefShowRightDirective, decorators: [{
8518
8456
  type: Directive,
@@ -8771,7 +8709,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
8771
8709
  /**
8772
8710
  * Used to declare a dbxFlexGroup.
8773
8711
  */
8774
- class DbxFlexGroupDirective extends AbstractSubscriptionDirective {
8712
+ class DbxFlexGroupDirective {
8775
8713
  _dbxScreenMediaService = inject(DbxScreenMediaService);
8776
8714
  content = input(true);
8777
8715
  breakToColumn = input(false);
@@ -8779,8 +8717,8 @@ class DbxFlexGroupDirective extends AbstractSubscriptionDirective {
8779
8717
  breakpoint = input('tablet', { transform: (x) => x ?? 'tablet' });
8780
8718
  isSmallScreen$ = this._dbxScreenMediaService.isBreakpointActive(toObservable(this.breakpoint)).pipe(map((x) => !x), distinctUntilChanged(), shareReplay(1));
8781
8719
  smallSignal = toSignal(this.isSmallScreen$, { initialValue: false });
8782
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFlexGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
8783
- 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 });
8784
8722
  }
8785
8723
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFlexGroupDirective, decorators: [{
8786
8724
  type: Directive,
@@ -9301,14 +9239,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
9301
9239
  class AbstractDbxListViewDirective {
9302
9240
  valuesArray = input();
9303
9241
  values = input();
9304
- _trackBy = new BehaviorSubject(undefined);
9305
- _disabled = new BehaviorSubject(false);
9306
- _selectionMode = new BehaviorSubject(undefined);
9307
- _valuesOverride = new BehaviorSubject(undefined);
9308
- 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);
9309
9250
  _inputValuesArray$ = toObservable(this.valuesArray);
9310
9251
  _inputValues$ = toObservable(this.values);
9311
- _values$ = this._valuesOverride.pipe(switchMap((x) => {
9252
+ _values$ = toObservable(this._valuesOverrideSignal).pipe(switchMap((x) => {
9312
9253
  let valuesObs;
9313
9254
  if (x) {
9314
9255
  valuesObs = asObservable(x);
@@ -9319,14 +9260,6 @@ class AbstractDbxListViewDirective {
9319
9260
  return valuesObs;
9320
9261
  }));
9321
9262
  values$ = this._values$.pipe(maybeValueFromObservableOrValue(), map((x) => x ?? []), distinctUntilChanged(), shareReplay(1));
9322
- disabled$ = this._disabled.asObservable();
9323
- selectionMode$ = this._selectionMode.asObservable();
9324
- clickValue = output();
9325
- ngOnDestroy() {
9326
- this._disabled.complete();
9327
- this._selectionMode.complete();
9328
- this._valuesOverride.complete();
9329
- }
9330
9263
  onClickValue(value) {
9331
9264
  this.clickValue.emit(value);
9332
9265
  }
@@ -9334,16 +9267,16 @@ class AbstractDbxListViewDirective {
9334
9267
  this.setValues(state.currentList$);
9335
9268
  }
9336
9269
  setValues(values) {
9337
- this._valuesOverride.next(values);
9270
+ this._valuesOverrideSignal.set(values);
9338
9271
  }
9339
9272
  setDisabled(disabled) {
9340
- this._disabled.next(disabled);
9273
+ this._disabledSignal.set(disabled);
9341
9274
  }
9342
9275
  setSelectionMode(selectionMode) {
9343
- this._selectionMode.next(selectionMode);
9276
+ this._selectionModeSignal.set(selectionMode);
9344
9277
  }
9345
9278
  setTrackBy(trackBy) {
9346
- this._trackBy.next(trackBy);
9279
+ this._trackBySignal.set(trackBy);
9347
9280
  }
9348
9281
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractDbxListViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9349
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 });
@@ -10458,7 +10391,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
10458
10391
  *
10459
10392
  * Will update the parent DbxStyleService.
10460
10393
  */
10461
- class DbxSetStyleDirective extends AbstractSubscriptionDirective {
10394
+ class DbxSetStyleDirective {
10462
10395
  _styleService = inject(DbxStyleService);
10463
10396
  /**
10464
10397
  * The input DbxStyleName to style the host element with.
@@ -10476,14 +10409,14 @@ class DbxSetStyleDirective extends AbstractSubscriptionDirective {
10476
10409
  suffixes$ = toObservable(this.suffixes).pipe(distinctUntilChanged(), map(splitCommaSeparatedStringToSet));
10477
10410
  config$ = combineLatest([this.style$, this.suffixes$]).pipe(map(([style, suffixes]) => ({ style, suffixes })), shareReplay(1));
10478
10411
  styleClass$ = this._styleService.getStyleClassWithConfig(this.config$);
10479
- ngOnInit() {
10480
- this._styleService.setConfig(this.config$);
10481
- this.sub = this.styleClass$.pipe(delay(0)).subscribe((style) => {
10412
+ constructor() {
10413
+ cleanSubscription(this.styleClass$.pipe(delay(0)).subscribe((style) => {
10482
10414
  this.outputStyleClassSignal.set(style);
10483
- });
10415
+ }));
10416
+ this._styleService.setConfig(this.config$);
10484
10417
  }
10485
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxSetStyleDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
10486
- 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 });
10487
10420
  }
10488
10421
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxSetStyleDirective, decorators: [{
10489
10422
  type: Directive,
@@ -10495,18 +10428,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
10495
10428
  },
10496
10429
  standalone: true
10497
10430
  }]
10498
- }] });
10431
+ }], ctorParameters: () => [] });
10499
10432
 
10500
10433
  /**
10501
10434
  * Used to style the <body> element of the document document using the style provided by DbxStyleService.
10502
10435
  */
10503
- class DbxStyleBodyDirective extends AbstractSubscriptionDirective {
10436
+ class DbxStyleBodyDirective {
10504
10437
  _styleService = inject(DbxStyleService);
10505
10438
  _renderer = inject(Renderer2);
10506
10439
  _styleClassNameSignal = signal(undefined);
10507
10440
  styleClassNameSignal = this._styleClassNameSignal.asReadonly();
10508
- ngOnInit() {
10509
- this.sub = this._styleService.styleClassName$.pipe(delay(0)).subscribe((newClassStyleToApply) => {
10441
+ constructor() {
10442
+ cleanSubscription(this._styleService.styleClassName$.pipe(delay(0)).subscribe((newClassStyleToApply) => {
10510
10443
  const currentStyle = this._styleClassNameSignal();
10511
10444
  if (currentStyle) {
10512
10445
  this._renderer.removeClass(document.body, currentStyle);
@@ -10515,10 +10448,10 @@ class DbxStyleBodyDirective extends AbstractSubscriptionDirective {
10515
10448
  this._renderer.addClass(document.body, newClassStyleToApply);
10516
10449
  }
10517
10450
  this._styleClassNameSignal.set(newClassStyleToApply);
10518
- });
10451
+ }));
10519
10452
  }
10520
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleBodyDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
10521
- 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 });
10522
10455
  }
10523
10456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxStyleBodyDirective, decorators: [{
10524
10457
  type: Directive,
@@ -10529,7 +10462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
10529
10462
  },
10530
10463
  standalone: true
10531
10464
  }]
10532
- }] });
10465
+ }], ctorParameters: () => [] });
10533
10466
 
10534
10467
  /**
10535
10468
  * Used to apply a background style using a color.
@@ -11279,10 +11212,7 @@ class DbxZipBlobPreviewComponent {
11279
11212
  selectedFileEntry$ = toObservable(this.selectedFileNodeSignal);
11280
11213
  selectedFileEntryBlob$ = this.selectedFileEntry$.pipe(switchMap((x) => (x && x.value.getBlob ? x.value.getBlob() : of(undefined))), shareReplay(1));
11281
11214
  selectedFileEntryBlobSignal = toSignal(this.selectedFileEntryBlob$);
11282
- context = loadingStateContext({ obs: this.allEntriesLoadingState$ });
11283
- ngOnDestroy() {
11284
- this.context.destroy();
11285
- }
11215
+ context = cleanLoadingContext({ obs: this.allEntriesLoadingState$ });
11286
11216
  makeEntryAnchor = (itemValue) => {
11287
11217
  return {
11288
11218
  onClick: () => {
@@ -11341,10 +11271,7 @@ class DbxZipPreviewComponent {
11341
11271
  }));
11342
11272
  zipFileBlob$ = this.zipFileBlobLoadingState$.pipe(valueFromFinishedLoadingState(), distinctUntilChanged(), shareReplay(1));
11343
11273
  zipFileBlobSignal = toSignal(this.zipFileBlob$);
11344
- context = loadingStateContext({ obs: this.zipFileBlobLoadingState$ });
11345
- ngOnDestroy() {
11346
- this.context.destroy();
11347
- }
11274
+ context = cleanLoadingContext({ obs: this.zipFileBlobLoadingState$ });
11348
11275
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxZipPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11349
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: `
11350
11277
  <dbx-loading [context]="context">
@@ -11697,7 +11624,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11697
11624
  * Service that tracks all active help context strings in the current context.
11698
11625
  */
11699
11626
  class DbxHelpContextService {
11700
- _contextReferences = new BehaviorSubject(new Set());
11627
+ _contextReferences = completeOnDestroy(new BehaviorSubject(new Set()));
11701
11628
  /**
11702
11629
  * Observable of all currently active help context strings.
11703
11630
  */
@@ -11713,9 +11640,6 @@ class DbxHelpContextService {
11713
11640
  referenceSet.delete(reference);
11714
11641
  this._contextReferences.next(referenceSet);
11715
11642
  }
11716
- ngOnDestroy() {
11717
- this._contextReferences.complete();
11718
- }
11719
11643
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxHelpContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11720
11644
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxHelpContextService });
11721
11645
  }