@dereekb/dbx-web 13.41.0 → 13.43.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.
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, input, inject, effect, Directive, NgModule, ChangeDetectionStrategy, Component, output, computed, HostListener, forwardRef, model, InjectionToken, viewChild, ElementRef, makeEnvironmentProviders, untracked, ApplicationRef, Injector, EnvironmentInjector, createComponent, DestroyRef, signal, TemplateRef, SecurityContext, ViewContainerRef, booleanAttribute, Renderer2 } from '@angular/core';
3
- import { asPromise, DASH_CHARACTER_PREFIX_INSTANCE, hashStringToNumber, cssTokenVar, useIterableOrValue, isDefinedAndNotFalse, spaceSeparatedCssClasses, cssClassesSet, 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, safeCompareEquality, addMilliseconds, isPast, asArray, slashPathDetails, mimeTypeForFileExtension, slashPathDirectoryTree, nameToInitials, isMaybeNot, isNotFalse, modifier, combineMaps, addModifiers, removeModifiers, applyBestFit, findNext, maybeModifierMapToFunction, makeValuesGroupMap, compareWithMappedValuesFunction, invertMaybeBoolean, splitCommaSeparatedStringToSet, ZIP_FILE_MIME_TYPE, cachedGetter, sortByNumberFunction, JPEG_MIME_TYPES, JPEG_MIME_TYPE, PNG_MIME_TYPE, PDF_MIME_TYPE, JSON_MIME_TYPE, sequentialIncrementingNumberStringModelIdFactory, PDF_HEADER, PDF_EOF_MARKER, PDF_ENCRYPT_MARKER } from '@dereekb/util';
3
+ import { asPromise, DASH_CHARACTER_PREFIX_INSTANCE, hashStringToNumber, cssTokenVar, useIterableOrValue, isDefinedAndNotFalse, spaceSeparatedCssClasses, cssClassesSet, 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, safeCompareEquality, nameToInitials, isMaybeNot, isNotFalse, modifier, combineMaps, addModifiers, removeModifiers, applyBestFit, findNext, asArray, maybeModifierMapToFunction, makeValuesGroupMap, compareWithMappedValuesFunction, invertMaybeBoolean, splitCommaSeparatedStringToSet, addMilliseconds, isPast, slashPathDetails, mimeTypeForFileExtension, slashPathDirectoryTree, ZIP_FILE_MIME_TYPE, cachedGetter, sortByNumberFunction, JPEG_MIME_TYPES, JPEG_MIME_TYPE, PNG_MIME_TYPE, PDF_MIME_TYPE, JSON_MIME_TYPE, sequentialIncrementingNumberStringModelIdFactory, PDF_HEADER, PDF_EOF_MARKER, PDF_ENCRYPT_MARKER } from '@dereekb/util';
4
4
  import * as i1$2 from '@dereekb/dbx-core';
5
- import { completeOnDestroy, clean, AbstractTransitionWatcherDirective, DbxInjectionComponent, dbxActionWorkProgress, AbstractDbxButtonDirective, hasNonTrivialChildNodes, provideDbxButton, DbxCoreButtonModule, createInjectorForInjectionComponentConfig, initInjectionComponent, AbstractDbxActionValueGetterDirective, cleanSubscription, AbstractDbxActionHandlerDirective, FilterSourceDirective, provideActionStoreSource, isClickableFilterPreset, AbstractDbxAnchorDirective, expandClickableAnchorLinkTrees, DbxCoreFilterModule, DbxButton, DbxActionWorkable, provideDbxActionWorkable, DbxActionContextStoreSourceInstance, cleanSubscriptionWithLockSet, DBX_INJECTION_COMPONENT_DATA, checkNgContentWrapperHasContent, cleanLoadingContext, DbxActionSourceDirective, DbxActionSuccessHandlerDirective, DbxActionDirective, transformEmptyStringInputToUndefined, isIdleActionState, canTriggerAction, DbxCoreActionModule, DbxActionButtonDirective, onDbxAppAuth, SimpleStorageAccessorFactory, mergeStaticProviders, asSegueRef, AbstractTransitionDirective, DbxRouterService, AbstractIfDirective, isSegueRefActive, anchorTypeForAnchor, DbxActionDisabledDirective, DbxActionHandlerDirective } from '@dereekb/dbx-core';
5
+ import { completeOnDestroy, clean, AbstractTransitionWatcherDirective, DbxInjectionComponent, dbxActionWorkProgress, AbstractDbxButtonDirective, hasNonTrivialChildNodes, provideDbxButton, DbxCoreButtonModule, createInjectorForInjectionComponentConfig, initInjectionComponent, AbstractDbxActionValueGetterDirective, cleanSubscription, AbstractDbxActionHandlerDirective, FilterSourceDirective, provideActionStoreSource, isClickableFilterPreset, AbstractDbxAnchorDirective, expandClickableAnchorLinkTrees, DbxCoreFilterModule, DbxButton, DbxActionWorkable, provideDbxActionWorkable, DbxActionContextStoreSourceInstance, cleanSubscriptionWithLockSet, DBX_INJECTION_COMPONENT_DATA, checkNgContentWrapperHasContent, cleanLoadingContext, DbxActionSourceDirective, DbxActionSuccessHandlerDirective, DbxActionDirective, transformEmptyStringInputToUndefined, isIdleActionState, canTriggerAction, DbxCoreActionModule, DbxActionButtonDirective, onDbxAppAuth, SimpleStorageAccessorFactory, mergeStaticProviders, asSegueRef, AbstractTransitionDirective, DbxRouterService, AbstractIfDirective, isSegueRefActive, anchorTypeForAnchor, TimeDistancePipe, DbxActionDisabledDirective, DbxActionHandlerDirective } from '@dereekb/dbx-core';
6
6
  import { NgPopoverRef, NgOverlayContainerService } from 'ng-overlay-container';
7
7
  import { of, map, BehaviorSubject, distinctUntilChanged, shareReplay, delay, Subject, first, startWith, filter, throttleTime, skip, defaultIfEmpty, combineLatest, switchMap, delayWhen, timer, asyncScheduler, from, firstValueFrom, mergeMap, race, tap, catchError, distinct, merge, exhaustMap, NEVER } from 'rxjs';
8
- import { LockSet, distinctUntilItemsHaveDifferentValues, filterMaybe, skipAllInitialMaybe, maybeValueFromObservableOrValue, switchMapMaybeLoadingContextStream, LoadingStateType, loadingStateType, successResult, valueFromFinishedLoadingState, loadingStateContext, initialize, asObservable, isNot, mapForEach, switchMapMaybe, listLoadingStateContext, isLoadingStateFinishedLoading, startWithBeginLoading, loadingStateFromObs, errorResult, beginLoading, distinctUntilHasDifferentValues } from '@dereekb/rxjs';
8
+ import { LockSet, distinctUntilItemsHaveDifferentValues, filterMaybe, skipAllInitialMaybe, maybeValueFromObservableOrValue, switchMapMaybeLoadingContextStream, LoadingStateType, loadingStateType, initialize, asObservable, isNot, mapForEach, switchMapMaybe, listLoadingStateContext, isLoadingStateFinishedLoading, startWithBeginLoading, successResult, valueFromFinishedLoadingState, loadingStateContext, loadingStateFromObs, errorResult, beginLoading, distinctUntilHasDifferentValues } from '@dereekb/rxjs';
9
9
  import { ComponentStore } from '@ngrx/component-store';
10
10
  import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
11
11
  import * as i1 from '@angular/material/button';
@@ -33,8 +33,6 @@ import { HttpErrorResponse } from '@angular/common/http';
33
33
  import { createAction, props, createReducer, on, combineReducers, createFeatureSelector, createSelector, Store, provideState } from '@ngrx/store';
34
34
  import { Actions, createEffect, ofType, provideEffects } from '@ngrx/effects';
35
35
  import { capitalCase } from 'change-case-all';
36
- import { Clipboard } from '@angular/cdk/clipboard';
37
- import { BlobWriter, ZipReader, BlobReader } from '@zip.js/zip.js';
38
36
  import { MediaMatcher } from '@angular/cdk/layout';
39
37
  import * as i1$3 from '@angular/material/toolbar';
40
38
  import { MatToolbarModule } from '@angular/material/toolbar';
@@ -52,6 +50,8 @@ import * as i1$8 from '@angular/material/chips';
52
50
  import { MatChipsModule } from '@angular/material/chips';
53
51
  import * as i2$1 from '@angular/material/tooltip';
54
52
  import { MatTooltipModule } from '@angular/material/tooltip';
53
+ import { Clipboard } from '@angular/cdk/clipboard';
54
+ import { BlobWriter, ZipReader, BlobReader } from '@zip.js/zip.js';
55
55
  import { PDFName, PDFString, PDFHexString, PDFDocument, degrees } from '@cantoo/pdf-lib';
56
56
  import { moveItemInArray, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDropList } from '@angular/cdk/drag-drop';
57
57
 
@@ -942,7 +942,7 @@ class DbxColorService {
942
942
  * @returns Array of all registered template keys.
943
943
  */
944
944
  getAllRegisteredTemplateKeys() {
945
- return [...this._templates.keys()];
945
+ return Array.from(this._templates.keys());
946
946
  }
947
947
  /**
948
948
  * Returns all registered templates flagged as part of the curated color set, in registration order.
@@ -952,7 +952,7 @@ class DbxColorService {
952
952
  * @returns The curated templates in insertion order.
953
953
  */
954
954
  getCuratedColorTemplates() {
955
- return [...this._templates.values()].filter((template) => template.curated === true);
955
+ return Array.from(this._templates.values()).filter((template) => template.curated === true);
956
956
  }
957
957
  /**
958
958
  * Deterministically selects a curated {@link DbxColorConfig} for the given string from the registered curated set.
@@ -3439,10 +3439,12 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
3439
3439
  ...baseConfig,
3440
3440
  componentClass,
3441
3441
  init: (filterSource) => {
3442
- connector.connectWithSource(filterSource);
3442
+ // NOTE: the source is seeded before it is connected, as connecting subscribes to filter$ immediately.
3443
+ // A source that carries a default filter would otherwise emit that default at connect time, so merely opening the popover would reset the filter to the default.
3443
3444
  if (initialFilterObs && filterSource.initWithFilter) {
3444
3445
  filterSource.initWithFilter(initialFilterObs);
3445
3446
  }
3447
+ connector.connectWithSource(filterSource);
3446
3448
  if (closeOnFilterChange !== false) {
3447
3449
  cleanSubscription(filterSource.filter$.pipe(skip(1), filterMaybe(), first(), defaultIfEmpty(undefined)).subscribe(() => {
3448
3450
  this.close();
@@ -5604,6 +5606,12 @@ class AbstractDbxFileUploadComponent {
5604
5606
  * Whether or not multiple files can be uploaded.
5605
5607
  */
5606
5608
  multiple = input(undefined, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: (x) => x === '' || x });
5609
+ /**
5610
+ * The most files that can be selected at once.
5611
+ *
5612
+ * Ignored while multiple is false, which is already a limit of one.
5613
+ */
5614
+ maxFiles = input(...(ngDevMode ? [undefined, { debugName: "maxFiles" }] : /* istanbul ignore next */ []));
5607
5615
  /**
5608
5616
  * Accepted file types filter.
5609
5617
  */
@@ -5620,6 +5628,10 @@ class AbstractDbxFileUploadComponent {
5620
5628
  * This signal is set by setMultiple
5621
5629
  */
5622
5630
  _multipleSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "_multipleSignal" }] : /* istanbul ignore next */ []));
5631
+ /**
5632
+ * This signal is set by setMaxFiles
5633
+ */
5634
+ _maxFilesSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "_maxFilesSignal" }] : /* istanbul ignore next */ []));
5623
5635
  /**
5624
5636
  * This signal is set by setAccept
5625
5637
  */
@@ -5637,6 +5649,11 @@ class AbstractDbxFileUploadComponent {
5637
5649
  const multipleSignal = this._multipleSignal();
5638
5650
  return multipleSignal ?? multipleInput;
5639
5651
  }, ...(ngDevMode ? [{ debugName: "multipleSignal" }] : /* istanbul ignore next */ []));
5652
+ maxFilesSignal = computed(() => {
5653
+ const maxFilesInput = this.maxFiles();
5654
+ const maxFilesSignal = this._maxFilesSignal();
5655
+ return maxFilesSignal ?? maxFilesInput;
5656
+ }, ...(ngDevMode ? [{ debugName: "maxFilesSignal" }] : /* istanbul ignore next */ []));
5640
5657
  acceptSignal = computed(() => {
5641
5658
  const acceptInput = this.accept();
5642
5659
  const acceptSignal = this._acceptSignal();
@@ -5668,18 +5685,21 @@ class AbstractDbxFileUploadComponent {
5668
5685
  setMultiple(multiple) {
5669
5686
  this._multipleSignal.set(multiple);
5670
5687
  }
5688
+ setMaxFiles(maxFiles) {
5689
+ this._maxFilesSignal.set(maxFiles);
5690
+ }
5671
5691
  setAccept(accept) {
5672
5692
  this._acceptSignal.set(accept);
5673
5693
  }
5674
5694
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5675
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: AbstractDbxFileUploadComponent, isStandalone: true, inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, working: { classPropertyName: "working", publicName: "working", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
5695
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: AbstractDbxFileUploadComponent, isStandalone: true, inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, working: { classPropertyName: "working", publicName: "working", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
5676
5696
  }
5677
5697
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxFileUploadComponent, decorators: [{
5678
5698
  type: Directive,
5679
5699
  args: [{
5680
5700
  standalone: true
5681
5701
  }]
5682
- }], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], working: [{ type: i0.Input, args: [{ isSignal: true, alias: "working", required: false }] }] } });
5702
+ }], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], working: [{ type: i0.Input, args: [{ isSignal: true, alias: "working", required: false }] }] } });
5683
5703
 
5684
5704
  /**
5685
5705
  * Returns a string that can be used as the "accept" attribute of a file input element.
@@ -5705,6 +5725,32 @@ function fileAcceptString(accept) {
5705
5725
  function fileAcceptFilterTypeStringArray(accept) {
5706
5726
  return typeof accept === 'string' ? accept.split(',').map((x) => x.trim()) : accept;
5707
5727
  }
5728
+ /**
5729
+ * Returns how many files a selection may accept, or undefined when there is no limit.
5730
+ *
5731
+ * @param input - The multiple/maxFiles pair to resolve.
5732
+ * @returns The effective limit, or undefined when unlimited.
5733
+ *
5734
+ * @example
5735
+ * ```ts
5736
+ * fileArrayAcceptMaxFiles({ multiple: false }); // 1
5737
+ * fileArrayAcceptMaxFiles({ multiple: true, maxFiles: 3 }); // 3
5738
+ * fileArrayAcceptMaxFiles({ multiple: true }); // undefined
5739
+ * ```
5740
+ *
5741
+ * @__NO_SIDE_EFFECTS__
5742
+ */
5743
+ function fileArrayAcceptMaxFiles(input) {
5744
+ const { multiple, maxFiles } = input;
5745
+ let result;
5746
+ if (multiple === false) {
5747
+ result = 1;
5748
+ }
5749
+ else if (maxFiles != null) {
5750
+ result = Math.max(0, Math.floor(maxFiles));
5751
+ }
5752
+ return result;
5753
+ }
5708
5754
  /**
5709
5755
  * Creates a {@link FileArrayAcceptMatchFunction} that filters and separates files based on accept criteria and multiple file support.
5710
5756
  *
@@ -5722,17 +5768,18 @@ function fileAcceptFilterTypeStringArray(accept) {
5722
5768
  */
5723
5769
  function fileArrayAcceptMatchFunction(config) {
5724
5770
  const multiple = config.multiple ?? true;
5771
+ const maxFiles = fileArrayAcceptMaxFiles(config);
5725
5772
  const isAcceptedFunction = typeof config.accept === 'function' ? config.accept : fileAcceptFunction(config.accept);
5726
5773
  return (input) => {
5727
5774
  const { included: acceptedType, excluded: rejectedType } = separateValues(input, isAcceptedFunction);
5728
5775
  let accepted = acceptedType;
5729
5776
  let rejected = rejectedType;
5730
- if (!multiple) {
5731
- const front = splitFront(acceptedType, 1);
5777
+ if (maxFiles != null) {
5778
+ const front = splitFront(acceptedType, maxFiles);
5732
5779
  accepted = front.front;
5733
5780
  rejected = [...rejectedType, ...front.remaining];
5734
5781
  }
5735
- return { multiple, input, accepted, rejected, acceptedType, rejectedType };
5782
+ return { multiple, maxFiles, input, accepted, rejected, acceptedType, rejectedType };
5736
5783
  };
5737
5784
  }
5738
5785
  /**
@@ -5839,7 +5886,7 @@ class DbxFileUploadAreaComponent extends AbstractDbxFileUploadComponent {
5839
5886
  areaClicked = output();
5840
5887
  areaDragActiveChanged = output();
5841
5888
  dragOverStateSignal = signal(false, ...(ngDevMode ? [{ debugName: "dragOverStateSignal" }] : /* istanbul ignore next */ []));
5842
- filesAcceptedFunctionSignal = computed(() => fileArrayAcceptMatchFunction({ multiple: this.multipleSignal() ?? false, accept: this.acceptSignal() }), ...(ngDevMode ? [{ debugName: "filesAcceptedFunctionSignal" }] : /* istanbul ignore next */ []));
5889
+ filesAcceptedFunctionSignal = computed(() => fileArrayAcceptMatchFunction({ multiple: this.multipleSignal() ?? false, maxFiles: this.maxFilesSignal(), accept: this.acceptSignal() }), ...(ngDevMode ? [{ debugName: "filesAcceptedFunctionSignal" }] : /* istanbul ignore next */ []));
5843
5890
  onClick(evt) {
5844
5891
  evt.stopPropagation();
5845
5892
  if (!this.disabled()) {
@@ -5956,6 +6003,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
5956
6003
  args: ['drop', ['$event']]
5957
6004
  }] } });
5958
6005
 
6006
+ // stands in for a type filter the input's own accept attribute has already applied
6007
+ const ACCEPT_EVERY_FILE = () => true;
5959
6008
  /**
5960
6009
  * File upload button that opens a native file picker and emits accepted/rejected file results.
5961
6010
  *
@@ -5976,10 +6025,18 @@ class DbxFileUploadButtonComponent extends AbstractDbxFileUploadComponent {
5976
6025
  return typeof accept === 'function' ? undefined : fileAcceptString(accept);
5977
6026
  }, ...(ngDevMode ? [{ debugName: "buttonAcceptSignal" }] : /* istanbul ignore next */ []));
5978
6027
  buttonMultipleSignal = computed(() => this.multipleSignal() ?? false, ...(ngDevMode ? [{ debugName: "buttonMultipleSignal" }] : /* istanbul ignore next */ []));
6028
+ /**
6029
+ * The match function the picked files are run through.
6030
+ *
6031
+ * A non-function accept is left to the input's own accept attribute — but the COUNT still has to be
6032
+ * applied here, as the file picker has no concept of a limit and will happily hand back more than the
6033
+ * destination can hold.
6034
+ */
5979
6035
  filesAcceptedFunctionSignal = computed(() => {
5980
6036
  const accept = this.acceptSignal();
5981
6037
  const multiple = this.buttonMultipleSignal();
5982
- return typeof accept === 'function' ? fileArrayAcceptMatchFunction({ multiple, accept }) : undefined;
6038
+ const maxFiles = this.maxFilesSignal();
6039
+ return fileArrayAcceptMatchFunction({ multiple, maxFiles, accept: typeof accept === 'function' ? accept : ACCEPT_EVERY_FILE });
5983
6040
  }, ...(ngDevMode ? [{ debugName: "filesAcceptedFunctionSignal" }] : /* istanbul ignore next */ []));
5984
6041
  /**
5985
6042
  * The HTML attribute should not be added if it is false, so we return null.
@@ -6005,16 +6062,8 @@ class DbxFileUploadButtonComponent extends AbstractDbxFileUploadComponent {
6005
6062
  const isDisabled = this.disabledSignal();
6006
6063
  if (!isDisabled) {
6007
6064
  const allFiles = input.files ? Array.from(input.files) : [];
6008
- const fileAcceptFunction = this.filesAcceptedFunctionSignal();
6009
- if (fileAcceptFunction) {
6010
- const matchResult = fileAcceptFunction(allFiles);
6011
- this.filesChanged.emit({ allFiles, matchResult });
6012
- }
6013
- else {
6014
- // if not using a filesAcceptedFunction, then accept all files as the input should have filtered them
6015
- const multiple = this.buttonMultipleSignal();
6016
- this.filesChanged.emit({ allFiles, matchResult: { multiple, input: allFiles, accepted: allFiles, rejected: [], acceptedType: allFiles, rejectedType: [] } });
6017
- }
6065
+ const matchResult = this.filesAcceptedFunctionSignal()(allFiles);
6066
+ this.filesChanged.emit({ allFiles, matchResult });
6018
6067
  }
6019
6068
  // reset the input value
6020
6069
  if (input.value) {
@@ -6109,6 +6158,11 @@ class DbxFileUploadComponent extends AbstractDbxFileUploadComponent {
6109
6158
  const multiple = this.multipleSignal();
6110
6159
  return multiple ?? config?.multiple;
6111
6160
  }, ...(ngDevMode ? [{ debugName: "uploadMultipleSignal" }] : /* istanbul ignore next */ []));
6161
+ uploadMaxFilesSignal = computed(() => {
6162
+ const config = this.config();
6163
+ const maxFiles = this.maxFilesSignal();
6164
+ return maxFiles ?? config?.maxFiles;
6165
+ }, ...(ngDevMode ? [{ debugName: "uploadMaxFilesSignal" }] : /* istanbul ignore next */ []));
6112
6166
  uploadAcceptSignal = computed(() => {
6113
6167
  const config = this.config();
6114
6168
  const accept = this.acceptSignal();
@@ -6130,7 +6184,7 @@ class DbxFileUploadComponent extends AbstractDbxFileUploadComponent {
6130
6184
  }
6131
6185
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFileUploadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6132
6186
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", 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: `
6133
- <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()">
6187
+ <dbx-file-upload-area #area [show]="showAreaSignal()" [hint]="areaHintSignal()" [text]="areaTextSignal()" [icon]="areaIconSignal()" [accept]="acceptSignal()" [multiple]="multipleSignal()" [maxFiles]="uploadMaxFilesSignal()" (filesChanged)="areaFilesChanged($event)" (areaClicked)="areaClicked()" [disabled]="disabledSignal()" [working]="workingSignal()">
6134
6188
  <ng-content></ng-content>
6135
6189
  @if (showButtonSignal()) {
6136
6190
  <ng-template [ngTemplateOutlet]="buttonTemplate"></ng-template>
@@ -6138,7 +6192,7 @@ class DbxFileUploadComponent extends AbstractDbxFileUploadComponent {
6138
6192
  </dbx-file-upload-area>
6139
6193
  <!-- Button Template -->
6140
6194
  <ng-template #buttonTemplate>
6141
- <dbx-file-upload-button #button [text]="buttonTextSignal()" [icon]="buttonIconSignal()" [accept]="acceptSignal()" [multiple]="multipleSignal()" (filesChanged)="buttonFilesChanged($event)" [disabled]="disabledSignal()" [working]="workingSignal()" [buttonStyle]="buttonStyle()"></dbx-file-upload-button>
6195
+ <dbx-file-upload-button #button [text]="buttonTextSignal()" [icon]="buttonIconSignal()" [accept]="acceptSignal()" [multiple]="multipleSignal()" [maxFiles]="uploadMaxFilesSignal()" (filesChanged)="buttonFilesChanged($event)" [disabled]="disabledSignal()" [working]="workingSignal()" [buttonStyle]="buttonStyle()"></dbx-file-upload-button>
6142
6196
  </ng-template>
6143
6197
  `, isInline: true, dependencies: [{ kind: "component", type: DbxFileUploadAreaComponent, selector: "dbx-file-upload-area", inputs: ["icon", "text", "hint", "show"], outputs: ["filesChanged", "areaClicked", "areaDragActiveChanged"] }, { kind: "component", type: DbxFileUploadButtonComponent, selector: "dbx-file-upload-button", inputs: ["text", "icon", "ariaLabel", "buttonStyle"], outputs: ["filesChanged"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6144
6198
  }
@@ -6147,7 +6201,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
6147
6201
  args: [{
6148
6202
  selector: 'dbx-file-upload',
6149
6203
  template: `
6150
- <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()">
6204
+ <dbx-file-upload-area #area [show]="showAreaSignal()" [hint]="areaHintSignal()" [text]="areaTextSignal()" [icon]="areaIconSignal()" [accept]="acceptSignal()" [multiple]="multipleSignal()" [maxFiles]="uploadMaxFilesSignal()" (filesChanged)="areaFilesChanged($event)" (areaClicked)="areaClicked()" [disabled]="disabledSignal()" [working]="workingSignal()">
6151
6205
  <ng-content></ng-content>
6152
6206
  @if (showButtonSignal()) {
6153
6207
  <ng-template [ngTemplateOutlet]="buttonTemplate"></ng-template>
@@ -6155,7 +6209,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
6155
6209
  </dbx-file-upload-area>
6156
6210
  <!-- Button Template -->
6157
6211
  <ng-template #buttonTemplate>
6158
- <dbx-file-upload-button #button [text]="buttonTextSignal()" [icon]="buttonIconSignal()" [accept]="acceptSignal()" [multiple]="multipleSignal()" (filesChanged)="buttonFilesChanged($event)" [disabled]="disabledSignal()" [working]="workingSignal()" [buttonStyle]="buttonStyle()"></dbx-file-upload-button>
6212
+ <dbx-file-upload-button #button [text]="buttonTextSignal()" [icon]="buttonIconSignal()" [accept]="acceptSignal()" [multiple]="multipleSignal()" [maxFiles]="uploadMaxFilesSignal()" (filesChanged)="buttonFilesChanged($event)" [disabled]="disabledSignal()" [working]="workingSignal()" [buttonStyle]="buttonStyle()"></dbx-file-upload-button>
6159
6213
  </ng-template>
6160
6214
  `,
6161
6215
  providers: provideDbxFileUploadActionCompatable(DbxFileUploadComponent),
@@ -6374,7 +6428,7 @@ class DbxErrorWidgetService {
6374
6428
  }
6375
6429
  // MARK: Get
6376
6430
  getErrorWidgetIdentifiers() {
6377
- return [...this._entries.keys()];
6431
+ return Array.from(this._entries.keys());
6378
6432
  }
6379
6433
  getDefaultErrorWidgetEntry() {
6380
6434
  return this.getErrorWidgetEntry(DEFAULT_ERROR_WIDGET_CODE);
@@ -8841,662 +8895,156 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
8841
8895
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], downloadButton: [{ type: i0.ViewChild, args: ['downloadButton', { ...{ read: ElementRef }, isSignal: true }] }] } });
8842
8896
 
8843
8897
  /**
8844
- * Creates a {@link CopyToClipboardFunction} that retries the copy operation until success or timeout.
8898
+ * Default details date style used by a file list item.
8899
+ */
8900
+ const DEFAULT_DBX_FILE_LIST_ITEM_DETAILS_DATE_STYLE = 'short';
8901
+ /**
8902
+ * Default css class applied to a file list item's details line.
8903
+ */
8904
+ const DEFAULT_DBX_FILE_LIST_ITEM_DETAILS_CLASS = 'dbx-hint';
8905
+
8906
+ /**
8907
+ * Ordered numeric mapping of {@link ScreenMediaWidthType} for size comparisons.
8908
+ */
8909
+ const SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP = {
8910
+ micro: 0,
8911
+ small: 1,
8912
+ tablet: 2,
8913
+ large: 3,
8914
+ full: 4
8915
+ };
8916
+ /**
8917
+ * Returns `true` if the current screen width type is at least as wide as the given breakpoint.
8845
8918
  *
8846
- * @param clipboard - The Angular CDK Clipboard instance.
8847
- * @param config - Optional timeout and retry settings.
8848
- * @returns Copies text to the clipboard.
8919
+ * @param current - The current screen width type.
8920
+ * @param breakpoint - The minimum width type to check against.
8921
+ * @returns `true` if the current width type meets or exceeds the breakpoint.
8849
8922
  *
8850
8923
  * @example
8851
8924
  * ```ts
8852
- * const copy = copyToClipboardFunction(clipboard, { copyTimeoutSeconds: 10 });
8853
- * const success = await copy('some text');
8925
+ * screenMediaWidthTypeIsActive('tablet', 'small'); // true
8926
+ * screenMediaWidthTypeIsActive('micro', 'tablet'); // false
8854
8927
  * ```
8855
- *
8856
- * @__NO_SIDE_EFFECTS__
8857
8928
  */
8858
- function copyToClipboardFunction(clipboard, config) {
8859
- const copyTimeoutSeconds = config?.copyTimeoutSeconds ?? 15;
8860
- const delayBetweenCopyAttempts = config?.delayBetweenCopyAttempts ?? MS_IN_SECOND;
8861
- const onCopyResult = config?.onCopyResult;
8862
- const copyFunction = ((content) => {
8863
- return new Promise((resolve, reject) => {
8864
- const pending = clipboard.beginCopy(content);
8865
- const copyTimeoutAt = addMilliseconds(new Date(), copyTimeoutSeconds * MS_IN_SECOND);
8866
- const attempt = () => {
8867
- const copyIsFinished = pending.copy();
8868
- if (!copyIsFinished && !isPast(copyTimeoutAt)) {
8869
- setTimeout(attempt, delayBetweenCopyAttempts);
8870
- }
8871
- else {
8872
- // Destroy the pending copy
8873
- pending.destroy();
8874
- if (copyIsFinished) {
8875
- resolve(true);
8876
- onCopyResult?.(true, content);
8877
- }
8878
- else {
8879
- reject(new Error('Failed to copy content to clipboard'));
8880
- onCopyResult?.(false, content);
8881
- }
8882
- }
8883
- };
8884
- attempt();
8885
- });
8886
- });
8887
- copyFunction._clipboard = clipboard;
8888
- return copyFunction;
8929
+ function screenMediaWidthTypeIsActive(current, breakpoint) {
8930
+ return compareScreenMediaWidthTypes(current, breakpoint, (a, b) => a >= b);
8889
8931
  }
8890
8932
  /**
8891
- * Injects a {@link CopyToClipboardFunction} using Angular's dependency injection.
8892
- *
8893
- * Must be called in an Angular injection context.
8894
- *
8895
- * @param config - Optional timeout and retry settings.
8896
- * @returns The clipboard copy function.
8897
- *
8898
- * @example
8899
- * ```ts
8900
- * const copy = injectCopyToClipboardFunction();
8901
- * await copy('copied text');
8902
- * ```
8933
+ * Compares two {@link ScreenMediaWidthType} values using a custom comparator on their numeric sizes.
8903
8934
  *
8904
- * @__NO_SIDE_EFFECTS__
8935
+ * @param a - The first screen width type.
8936
+ * @param b - The second screen width type.
8937
+ * @param compare - A comparator function applied to the numeric size values of `a` and `b`
8938
+ * @returns The result of applying the comparator to the mapped numeric sizes.
8905
8939
  */
8906
- function injectCopyToClipboardFunction(config) {
8907
- return copyToClipboardFunction(inject(Clipboard), config);
8940
+ function compareScreenMediaWidthTypes(a, b, compare) {
8941
+ return compare(SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP[a], SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP[b]);
8908
8942
  }
8943
+
8909
8944
  /**
8910
- * Injects a {@link CopyToClipboardFunctionWithSnackbarMessage} that copies text to the clipboard
8911
- * and shows a Material snackbar with a success or failure message.
8945
+ * Abstract configuration class for {@link DbxScreenMediaService} defining responsive breakpoints.
8912
8946
  *
8913
- * Must be called in an Angular injection context.
8947
+ * Provide a concrete instance via {@link provideDbxScreenMediaService} or supply values directly.
8948
+ */
8949
+ class DbxScreenMediaServiceConfig {
8950
+ }
8951
+ /**
8952
+ * Default responsive breakpoint configuration with standard mobile/tablet/desktop thresholds.
8953
+ */
8954
+ const DEFAULT_SCREEN_MEDIA_SERVICE_CONFIG = {
8955
+ microScreenWidthMax: 360,
8956
+ smallScreenWidthMax: 520,
8957
+ tabletScreenWidthMax: 786,
8958
+ largeScreenWidthMax: 1280,
8959
+ tinyScreenHeightMax: 280
8960
+ };
8961
+ /**
8962
+ * Reactive service that tracks the current screen width and height categories using CSS media queries.
8914
8963
  *
8915
- * @param config - Optional configuration for copy behavior and snackbar messages.
8916
- * @returns Clipboard copy function with snackbar notification support.
8964
+ * Emits {@link ScreenMediaWidthType} and {@link ScreenMediaHeightType} values that update
8965
+ * as the viewport is resized. Use {@link isBreakpointActive} to reactively check whether
8966
+ * the screen meets a minimum width breakpoint.
8917
8967
  *
8918
8968
  * @example
8919
8969
  * ```ts
8920
- * const copy = injectCopyToClipboardFunctionWithSnackbarMessage({
8921
- * successMessage: 'Link copied!',
8922
- * snackbarDuration: 2000
8923
- * });
8924
- * await copy('https://example.com');
8970
+ * readonly screenService = inject(DbxScreenMediaService);
8971
+ * readonly isTabletOrLarger$ = this.screenService.isBreakpointActive('tablet');
8925
8972
  * ```
8926
8973
  */
8927
- function injectCopyToClipboardFunctionWithSnackbarMessage(config) {
8928
- // TODO: Add service for configuring global defaults for snackbar messages
8929
- const snackbar = inject(MatSnackBar);
8930
- const DEFAULT_SUCCESS_MESSAGE = 'Copied to clipboard';
8931
- const DEFAULT_FAILURE_MESSAGE = 'Content failed to copy...';
8932
- const DEFAULT_SNACKBAR_DURATION = 3 * MS_IN_SECOND;
8933
- let snackbarMessagesEnabled = true;
8934
- let successMessage = DEFAULT_SUCCESS_MESSAGE;
8935
- let failureMessage = DEFAULT_FAILURE_MESSAGE;
8936
- let snackbarDuration = DEFAULT_SNACKBAR_DURATION;
8937
- const _setSnackbarMessagesConfig = (config) => {
8938
- if (config != null) {
8939
- const { successMessage: inputSuccessMessage, failureMessage: inputFailureMessage, snackbarDuration: inputSnackbarDuration } = config;
8940
- successMessage = inputSuccessMessage ?? successMessage ?? DEFAULT_SUCCESS_MESSAGE;
8941
- failureMessage = inputFailureMessage ?? failureMessage ?? DEFAULT_FAILURE_MESSAGE;
8942
- snackbarDuration = inputSnackbarDuration ?? snackbarDuration ?? DEFAULT_SNACKBAR_DURATION;
8943
- }
8944
- };
8945
- if (config) {
8946
- _setSnackbarMessagesConfig(config);
8974
+ class DbxScreenMediaService {
8975
+ _media = inject(MediaMatcher);
8976
+ _microQuery;
8977
+ _smallQuery;
8978
+ _tabletQuery;
8979
+ _largeQuery;
8980
+ _tinyHeightQuery;
8981
+ _updateWidth = new Subject();
8982
+ _updateHeight = new Subject();
8983
+ widthType$ = this._updateWidth.pipe(initialize(() => this._updateWidth.next()), throttleTime(100, undefined, { leading: true, trailing: true }), map(() => this._readWidthType()), distinctUntilChanged(), shareReplay(1));
8984
+ heightType$ = this._updateWidth.pipe(initialize(() => this._updateHeight.next()), throttleTime(100, undefined, { leading: true, trailing: true }), map(() => this._readHeightType()), distinctUntilChanged(), shareReplay(1));
8985
+ constructor() {
8986
+ const { microScreenWidthMax, smallScreenWidthMax, tabletScreenWidthMax, largeScreenWidthMax } = inject(DbxScreenMediaServiceConfig);
8987
+ this._microQuery = this._media.matchMedia(`screen and (max-width:${microScreenWidthMax}px)`);
8988
+ this._smallQuery = this._media.matchMedia(`screen and (max-width:${smallScreenWidthMax}px)`);
8989
+ this._tabletQuery = this._media.matchMedia(`screen and (max-width:${tabletScreenWidthMax}px)`);
8990
+ this._largeQuery = this._media.matchMedia(`screen and (max-width:${largeScreenWidthMax}px)`);
8991
+ this._tinyHeightQuery = this._media.matchMedia(`screen and (max-width:${largeScreenWidthMax}px)`);
8992
+ const widthHandler = () => this._updateWidth.next();
8993
+ const heightHandler = () => this._updateHeight.next();
8994
+ this._microQuery.onchange = widthHandler;
8995
+ this._smallQuery.onchange = widthHandler;
8996
+ this._tabletQuery.onchange = widthHandler;
8997
+ this._largeQuery.onchange = widthHandler;
8998
+ this._tinyHeightQuery.onchange = heightHandler;
8947
8999
  }
8948
- const onCopyResult = (success, content) => {
8949
- config?.onCopyResult?.(success, content);
8950
- if (snackbarMessagesEnabled) {
8951
- const message = success ? getValueFromGetter(successMessage, content) : getValueFromGetter(failureMessage, content);
8952
- snackbar.open(message, undefined, { duration: snackbarDuration });
9000
+ destroy() {
9001
+ this._microQuery.onchange = null;
9002
+ this._smallQuery.onchange = null;
9003
+ this._tabletQuery.onchange = null;
9004
+ this._largeQuery.onchange = null;
9005
+ this._updateWidth.complete();
9006
+ this._updateHeight.complete();
9007
+ }
9008
+ /**
9009
+ * Returns an observable that emits `true` when the current screen width is at least as wide as the given breakpoint.
9010
+ *
9011
+ * @param inputBreakpoint - The minimum width type or an observable of it.
9012
+ * @returns Observable of whether the breakpoint is currently active.
9013
+ */
9014
+ isBreakpointActive(inputBreakpoint) {
9015
+ return combineLatest([this.widthType$, asObservable(inputBreakpoint)]).pipe(map(([current, breakpoint]) => screenMediaWidthTypeIsActive(current, breakpoint)), distinctUntilChanged(), shareReplay(1));
9016
+ }
9017
+ _readWidthType() {
9018
+ let width;
9019
+ if (this._microQuery.matches) {
9020
+ width = 'micro';
8953
9021
  }
8954
- };
8955
- const result = copyToClipboardFunction(inject(Clipboard), { ...config, onCopyResult });
8956
- result.setSnackbarMessagesConfig = _setSnackbarMessagesConfig;
8957
- result.setSnackbarMessagesEnabled = (enabled) => {
8958
- snackbarMessagesEnabled = enabled;
8959
- };
8960
- return result;
9022
+ else if (this._smallQuery.matches) {
9023
+ width = 'small';
9024
+ }
9025
+ else if (this._tabletQuery.matches) {
9026
+ width = 'tablet';
9027
+ }
9028
+ else if (this._largeQuery.matches) {
9029
+ width = 'large';
9030
+ }
9031
+ else {
9032
+ width = 'full';
9033
+ }
9034
+ return width;
9035
+ }
9036
+ _readHeightType() {
9037
+ return this._tinyHeightQuery ? 'tiny' : 'normal';
9038
+ }
9039
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxScreenMediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9040
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxScreenMediaService });
8961
9041
  }
9042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxScreenMediaService, decorators: [{
9043
+ type: Injectable
9044
+ }], ctorParameters: () => [] });
8962
9045
 
8963
9046
  /**
8964
- * Abstract base class for clipboard directives that provides copy-to-clipboard
8965
- * functionality with configurable snackbar notifications.
8966
- *
8967
- * Subclasses should call `this._copyToClipboard(text)` to trigger a copy operation.
8968
- */
8969
- class AbstractDbxClipboardDirective {
8970
- _copyToClipboard = injectCopyToClipboardFunctionWithSnackbarMessage();
8971
- clipboardSnackbarMessagesConfig = input(undefined, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesConfig" }] : /* istanbul ignore next */ []));
8972
- clipboardSnackbarMessagesEnabled = input(true, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesEnabled" }] : /* istanbul ignore next */ []));
8973
- _configEffect = effect(() => {
8974
- this._copyToClipboard.setSnackbarMessagesConfig(this.clipboardSnackbarMessagesConfig());
8975
- }, ...(ngDevMode ? [{ debugName: "_configEffect" }] : /* istanbul ignore next */ []));
8976
- _enabledEffect = effect(() => {
8977
- this._copyToClipboard.setSnackbarMessagesEnabled(this.clipboardSnackbarMessagesEnabled());
8978
- }, ...(ngDevMode ? [{ debugName: "_enabledEffect" }] : /* istanbul ignore next */ []));
8979
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxClipboardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
8980
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: AbstractDbxClipboardDirective, isStandalone: true, inputs: { clipboardSnackbarMessagesConfig: { classPropertyName: "clipboardSnackbarMessagesConfig", publicName: "clipboardSnackbarMessagesConfig", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesEnabled: { classPropertyName: "clipboardSnackbarMessagesEnabled", publicName: "clipboardSnackbarMessagesEnabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
8981
- }
8982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxClipboardDirective, decorators: [{
8983
- type: Directive
8984
- }], propDecorators: { clipboardSnackbarMessagesConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesConfig", required: false }] }], clipboardSnackbarMessagesEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesEnabled", required: false }] }] } });
8985
-
8986
- /**
8987
- * Wraps content in a recessed "pit" container with optional scrollable overflow and rounded corners.
8988
- * Useful for displaying bounded content areas such as lists or previews with a constrained height.
8989
- *
8990
- * Pits round their corners by default. Pass `[square]="true"` to square the pit — this applies the
8991
- * common `.dbx-corners-none` opt-out utility rather than a pit-specific class.
8992
- *
8993
- * When `[scrollable]` is set the pit frame (padding, background, corners) stays fixed and an inner
8994
- * `.dbx-content-pit-scrollable-content` wrapper does the scrolling — wrap the body in that element so
8995
- * the frame doesn't shift at the scroll extremes. The resolved max height is published as the
8996
- * `--dbx-content-pit-scrollable-max-height` custom property, which the inner wrapper reads.
8997
- *
8998
- * @dbxWebComponent
8999
- * @dbxWebSlug content-pit
9000
- * @dbxWebCategory layout
9001
- * @dbxWebRelated content-box, content-elevate
9002
- * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
9003
- * @dbxWebMinimalExample ```html
9004
- * <dbx-content-pit>Body</dbx-content-pit>
9005
- * ```
9006
- *
9007
- * @example
9008
- * ```html
9009
- * <div dbxContentPit>Inset block</div>
9010
- * ```
9011
- */
9012
- class DbxContentPitDirective {
9013
- scrollable = input(...(ngDevMode ? [undefined, { debugName: "scrollable" }] : /* istanbul ignore next */ []));
9014
- square = input(false, ...(ngDevMode ? [{ debugName: "square" }] : /* istanbul ignore next */ []));
9015
- scrollableHeightSignal = computed(() => {
9016
- let scrollable = this.scrollable();
9017
- let scrollableHeight;
9018
- if (typeof scrollable === 'boolean') {
9019
- scrollable = scrollable ? 'medium' : undefined; // defaults to medium
9020
- }
9021
- if (scrollable) {
9022
- if (typeof scrollable === 'string') {
9023
- switch (scrollable) {
9024
- case 'small':
9025
- scrollable = 120;
9026
- break;
9027
- case 'medium':
9028
- scrollable = 320;
9029
- break;
9030
- case 'large':
9031
- scrollable = 460;
9032
- break;
9033
- default:
9034
- scrollableHeight = scrollable; // use as-is
9035
- break;
9036
- }
9037
- }
9038
- if (typeof scrollable === 'number') {
9039
- scrollableHeight = `${scrollable}px`;
9040
- }
9041
- }
9042
- return scrollableHeight ?? null;
9043
- }, ...(ngDevMode ? [{ debugName: "scrollableHeightSignal" }] : /* istanbul ignore next */ []));
9044
- // The pit always publishes its own scroll cap so the `.dbx-content-pit-scrollable-content`
9045
- // wrapper reads it directly rather than inheriting the global `--dbx-content-pit-scrollable-max-height`
9046
- // default (140px) from the theme root. `none` when not scrollable lets the wrapper grow freely.
9047
- scrollableMaxHeightSignal = computed(() => this.scrollableHeightSignal() ?? 'none', ...(ngDevMode ? [{ debugName: "scrollableMaxHeightSignal" }] : /* istanbul ignore next */ []));
9048
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9049
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxContentPitDirective, isStandalone: true, selector: "dbx-content-pit, [dbxContentPit]", inputs: { scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-content-pit-scrollable": "scrollableHeightSignal() != null", "class.dbx-corners-none": "square()", "style.--dbx-content-pit-scrollable-max-height": "scrollableMaxHeightSignal()" }, classAttribute: "d-block dbx-content-pit" }, ngImport: i0 });
9050
- }
9051
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPitDirective, decorators: [{
9052
- type: Directive,
9053
- args: [{
9054
- selector: 'dbx-content-pit, [dbxContentPit]',
9055
- host: {
9056
- class: 'd-block dbx-content-pit',
9057
- '[class.dbx-content-pit-scrollable]': 'scrollableHeightSignal() != null',
9058
- '[class.dbx-corners-none]': 'square()',
9059
- '[style.--dbx-content-pit-scrollable-max-height]': 'scrollableMaxHeightSignal()'
9060
- },
9061
- standalone: true
9062
- }]
9063
- }], propDecorators: { scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], square: [{ type: i0.Input, args: [{ isSignal: true, alias: "square", required: false }] }] } });
9064
-
9065
- /**
9066
- * Displays a preview of text content with options to copy to clipboard and download as a file. Supports loading states for async content retrieval.
9067
- *
9068
- * @example
9069
- * ```html
9070
- * <dbx-download-text-view [content]="{ content: 'Hello World', name: 'greeting.txt', mimeType: 'text/plain' }" [showPreview]="true"></dbx-download-text-view>
9071
- * ```
9072
- */
9073
- class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective {
9074
- downloadButton = viewChild('downloadButton', { ...(ngDevMode ? { debugName: "downloadButton" } : /* istanbul ignore next */ {}), read: ElementRef });
9075
- showDownloadButton = input(true, ...(ngDevMode ? [{ debugName: "showDownloadButton" }] : /* istanbul ignore next */ []));
9076
- loadingText = input(undefined, ...(ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []));
9077
- linear = input(undefined, ...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
9078
- showTitle = input(true, ...(ngDevMode ? [{ debugName: "showTitle" }] : /* istanbul ignore next */ []));
9079
- showPreview = input(true, ...(ngDevMode ? [{ debugName: "showPreview" }] : /* istanbul ignore next */ []));
9080
- showExpandPreviewButton = input(true, ...(ngDevMode ? [{ debugName: "showExpandPreviewButton" }] : /* istanbul ignore next */ []));
9081
- expandPreview = model(false, ...(ngDevMode ? [{ debugName: "expandPreview" }] : /* istanbul ignore next */ []));
9082
- content = input(undefined, ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
9083
- contentState = input(undefined, ...(ngDevMode ? [{ debugName: "contentState" }] : /* istanbul ignore next */ []));
9084
- contentState$ = toObservable(this.contentState).pipe(maybeValueFromObservableOrValue(), shareReplay(1));
9085
- contentStateSignal = toSignal(this.contentState$);
9086
- contentLoadingStateSignal = computed(() => {
9087
- const content = this.content();
9088
- const contentState = this.contentStateSignal();
9089
- let result;
9090
- if (contentState) {
9091
- result = contentState;
9092
- }
9093
- else if (content) {
9094
- result = successResult(content);
9095
- }
9096
- return result;
9097
- }, ...(ngDevMode ? [{ debugName: "contentLoadingStateSignal" }] : /* istanbul ignore next */ []));
9098
- contentLoadingState$ = toObservable(this.contentLoadingStateSignal);
9099
- content$ = this.contentLoadingState$.pipe(switchMap((x) => {
9100
- return x ? of(x).pipe(valueFromFinishedLoadingState()) : of(undefined);
9101
- }));
9102
- contentSignal = toSignal(this.content$);
9103
- contentDataSignal = computed(() => this.contentSignal()?.content, ...(ngDevMode ? [{ debugName: "contentDataSignal" }] : /* istanbul ignore next */ []));
9104
- fileNameSignal = computed(() => this.contentSignal()?.name ?? 'download.txt', ...(ngDevMode ? [{ debugName: "fileNameSignal" }] : /* istanbul ignore next */ []));
9105
- downloadConfigSignal = computed(() => {
9106
- const content = this.contentSignal();
9107
- const fileName = this.fileNameSignal();
9108
- let result = undefined;
9109
- if (content) {
9110
- result = {
9111
- blob: new Blob([content.content], { type: content.mimeType ?? 'application/octet-stream' }),
9112
- fileName
9113
- };
9114
- }
9115
- return result;
9116
- }, ...(ngDevMode ? [{ debugName: "downloadConfigSignal" }] : /* istanbul ignore next */ []));
9117
- context = loadingStateContext({ obs: this.contentLoadingState$ });
9118
- handleCopyToClipboard = () => {
9119
- return this.content$.pipe(first(), switchMap((downloadTextContent) => {
9120
- return downloadTextContent ? this._copyToClipboard(downloadTextContent.content) : of(false);
9121
- }));
9122
- };
9123
- toggleExpandPreview() {
9124
- this.expandPreview.update((value) => !value);
9125
- }
9126
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxDownloadTextViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9127
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxDownloadTextViewComponent, isStandalone: true, selector: "dbx-download-text-view", inputs: { showDownloadButton: { classPropertyName: "showDownloadButton", publicName: "showDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, showTitle: { classPropertyName: "showTitle", publicName: "showTitle", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null }, showExpandPreviewButton: { classPropertyName: "showExpandPreviewButton", publicName: "showExpandPreviewButton", isSignal: true, isRequired: false, transformFunction: null }, expandPreview: { classPropertyName: "expandPreview", publicName: "expandPreview", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentState: { classPropertyName: "contentState", publicName: "contentState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandPreview: "expandPreviewChange" }, viewQueries: [{ propertyName: "downloadButton", first: true, predicate: ["downloadButton"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-download-text-view\">\n <dbx-loading [context]=\"context\" [linear]=\"linear()\" [text]=\"loadingText()\">\n <ng-container *ngTemplateOutlet=\"contentView\"></ng-container>\n </dbx-loading>\n</div>\n\n<!-- Template -->\n<ng-template #contentView>\n <div class=\"dbx-download-text-view-content\">\n @if (showTitle()) {\n <div class=\"dbx-download-text-view-content-title dbx-mb2 mat-subtitle-2\">{{ fileNameSignal() }}</div>\n }\n @if (showPreview()) {\n <dbx-content-pit [scrollable]=\"!expandPreview()\" class=\"dbx-download-text-preview dbx-json dbx-mb3\">\n <div class=\"dbx-content-pit-scrollable-content\">\n @if (showExpandPreviewButton()) {\n <dbx-button class=\"dbx-content-pit-floating-button\" [raised]=\"true\" [icon]=\"expandPreview() ? 'unfold_less' : 'unfold_more'\" (buttonClick)=\"toggleExpandPreview()\"></dbx-button>\n }\n {{ contentDataSignal() }}\n </div>\n </dbx-content-pit>\n }\n <div class=\"dbx-download-text-view-actions\">\n <dbx-button dbxAction dbxActionValue [raised]=\"true\" [dbxActionHandler]=\"handleCopyToClipboard\" icon=\"content_copy\" dbxActionButton text=\"Copy To Clipboard\"></dbx-button>\n @if (showDownloadButton()) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "diameter", "linear", "loading", "error", "context"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i1$2.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$2.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i1$2.DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "customContent", "allowClickPropagation", "mode"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "directive", type: DbxContentPitDirective, selector: "dbx-content-pit, [dbxContentPit]", inputs: ["scrollable", "square"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9128
- }
9129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxDownloadTextViewComponent, decorators: [{
9130
- type: Component,
9131
- args: [{ selector: 'dbx-download-text-view', standalone: true, imports: [NgTemplateOutlet, DbxLoadingComponent, DbxActionModule, DbxActionButtonDirective, DbxButtonComponent, DbxButtonSpacerDirective, DbxDownloadBlobButtonComponent, DbxContentPitDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dbx-download-text-view\">\n <dbx-loading [context]=\"context\" [linear]=\"linear()\" [text]=\"loadingText()\">\n <ng-container *ngTemplateOutlet=\"contentView\"></ng-container>\n </dbx-loading>\n</div>\n\n<!-- Template -->\n<ng-template #contentView>\n <div class=\"dbx-download-text-view-content\">\n @if (showTitle()) {\n <div class=\"dbx-download-text-view-content-title dbx-mb2 mat-subtitle-2\">{{ fileNameSignal() }}</div>\n }\n @if (showPreview()) {\n <dbx-content-pit [scrollable]=\"!expandPreview()\" class=\"dbx-download-text-preview dbx-json dbx-mb3\">\n <div class=\"dbx-content-pit-scrollable-content\">\n @if (showExpandPreviewButton()) {\n <dbx-button class=\"dbx-content-pit-floating-button\" [raised]=\"true\" [icon]=\"expandPreview() ? 'unfold_less' : 'unfold_more'\" (buttonClick)=\"toggleExpandPreview()\"></dbx-button>\n }\n {{ contentDataSignal() }}\n </div>\n </dbx-content-pit>\n }\n <div class=\"dbx-download-text-view-actions\">\n <dbx-button dbxAction dbxActionValue [raised]=\"true\" [dbxActionHandler]=\"handleCopyToClipboard\" icon=\"content_copy\" dbxActionButton text=\"Copy To Clipboard\"></dbx-button>\n @if (showDownloadButton()) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n </div>\n</ng-template>\n" }]
9132
- }], propDecorators: { downloadButton: [{ type: i0.ViewChild, args: ['downloadButton', { ...{ read: ElementRef }, isSignal: true }] }], showDownloadButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDownloadButton", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], showTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTitle", required: false }] }], showPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreview", required: false }] }], showExpandPreviewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExpandPreviewButton", required: false }] }], expandPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandPreview", required: false }] }, { type: i0.Output, args: ["expandPreviewChange"] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentState: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentState", required: false }] }] } });
9133
-
9134
- /**
9135
- * Default entries to inject.
9136
- */
9137
- const DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN = new InjectionToken('DefaultDbxWebFilePreviewServiceEntries');
9138
- /**
9139
- * Creates a provider that registers the given entries with the {@link DbxWebFilePreviewService} via the {@link DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN}.
9140
- *
9141
- * @param entries - Array of preview service entries to register, each mapping a MIME type to its preview component.
9142
- * @returns A provider configuration that supplies the entries via the injection token.
9143
- *
9144
- * @example
9145
- * ```typescript
9146
- * provideDbxWebFilePreviewServiceEntries([DBX_WEB_FILE_PREVIEW_SERVICE_ZIP_PRESET_ENTRY]);
9147
- * ```
9148
- */
9149
- function provideDbxWebFilePreviewServiceEntries(entries) {
9150
- return {
9151
- provide: DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN,
9152
- useValue: entries
9153
- };
9154
- }
9155
- // MARK: Default Functions
9156
- /**
9157
- * Default preview component function that embeds files using {@link DbxEmbedComponent}. Images are rendered with an `img` element; all other types use `embed`.
9158
- *
9159
- * @param input - The preview input containing blob data, source URL, and MIME type information.
9160
- * @returns An injection component config that initializes a {@link DbxEmbedComponent} with the appropriate embed element and content.
9161
- */
9162
- const DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_PREVIEW_COMPONENT_FUNCTION = (input) => {
9163
- const { blob, srcUrl, embedMimeType, sanitizeSrcUrl } = input;
9164
- let embedElement = 'embed';
9165
- if (embedMimeType) {
9166
- // embed any image mime types to img
9167
- embedElement = embedMimeType.startsWith('image/') ? 'img' : 'embed';
9168
- }
9169
- return {
9170
- componentClass: DbxEmbedComponent,
9171
- init: (x) => {
9172
- x.embedElement.set(embedElement);
9173
- if (blob != null) {
9174
- x.blob.set(blob);
9175
- }
9176
- if (srcUrl != null) {
9177
- x.srcUrl.set(srcUrl);
9178
- x.sanitizeUrl.set(sanitizeSrcUrl ?? true);
9179
- }
9180
- if (embedMimeType != null) {
9181
- x.type.set(embedMimeType);
9182
- }
9183
- }
9184
- };
9185
- };
9186
- /**
9187
- * Default dialog-with-component function that opens the preview component inside a {@link DbxInjectionDialogComponent} with a close button.
9188
- *
9189
- * @param input - The dialog input containing the MatDialog instance and the component config to display.
9190
- * @returns A MatDialogRef for the opened injection dialog.
9191
- */
9192
- const DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_DIALOG_WITH_COMPONENT_FUNCTION = (input) => {
9193
- const { matDialog, componentConfig } = input;
9194
- return DbxInjectionDialogComponent.openDialog(matDialog, {
9195
- componentConfig,
9196
- showCloseButton: true
9197
- });
9198
- };
9199
- // MARK: Service
9200
- /**
9201
- * Service used for previewing files with given mime types.
9202
- */
9203
- class DbxWebFilePreviewService {
9204
- matDialog = inject(MatDialog);
9205
- _entries = new Map();
9206
- constructor() {
9207
- const entries = inject(DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN, { optional: true });
9208
- if (entries) {
9209
- entries.forEach((x) => this.registerPreviewEntry(x));
9210
- }
9211
- }
9212
- _defaultPreviewComponentFunction = DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_PREVIEW_COMPONENT_FUNCTION;
9213
- _defaultPreviewDialogWithComponentFunction = DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_DIALOG_WITH_COMPONENT_FUNCTION;
9214
- // Configuration
9215
- /**
9216
- * Registers one or more file preview entries, mapping MIME types to their preview components.
9217
- *
9218
- * @param entries - Single or array of preview entries to register.
9219
- */
9220
- registerPreviewEntries(entries) {
9221
- asArray(entries).forEach((entry) => this.registerPreviewEntry(entry));
9222
- }
9223
- /**
9224
- * Registers a single file preview entry for its MIME type(s).
9225
- *
9226
- * @param entry - The preview entry to register.
9227
- */
9228
- registerPreviewEntry(entry) {
9229
- asArray(entry.mimeType).forEach((mimeType) => this._entries.set(mimeType, entry));
9230
- }
9231
- /**
9232
- * Overrides the default preview component function used when no MIME-specific entry is registered.
9233
- *
9234
- * @param previewFunction - The preview component function to use as the new default.
9235
- */
9236
- setDefaultPreviewComponentFunction(previewFunction) {
9237
- this._defaultPreviewComponentFunction = previewFunction;
9238
- }
9239
- /**
9240
- * Overrides the default dialog-with-component function used when no MIME-specific dialog handler is registered.
9241
- *
9242
- * @param previewDialogWithComponentFunction - The dialog-with-component function to use as the new default.
9243
- */
9244
- setDefaultPreviewDialogWithComponentFunction(previewDialogWithComponentFunction) {
9245
- this._defaultPreviewDialogWithComponentFunction = previewDialogWithComponentFunction;
9246
- }
9247
- // Service
9248
- /**
9249
- * Creates an injection component config for previewing a file. Uses a MIME-specific preview function if registered, otherwise falls back to the default.
9250
- *
9251
- * @param input - The preview input containing blob, URL, and MIME type information.
9252
- * @returns An injection component config suitable for rendering the file preview.
9253
- */
9254
- createPreviewConfig(input) {
9255
- const { embedMimeType } = input;
9256
- const previewFunction = (embedMimeType ? this._entries.get(embedMimeType)?.previewComponentFunction : undefined) ?? this._defaultPreviewComponentFunction;
9257
- return previewFunction(input);
9258
- }
9259
- /**
9260
- * Opens a Material dialog to preview a file. Uses a MIME-specific dialog function if registered, otherwise creates a preview component and wraps it in the default dialog.
9261
- *
9262
- * @param input - The dialog input containing file data and MIME type.
9263
- * @returns Reference to the opened dialog.
9264
- */
9265
- openPreviewDialog(input) {
9266
- const { embedMimeType } = input;
9267
- const previewDialogFunction = embedMimeType ? this._entries.get(embedMimeType)?.previewDialogFunction : undefined;
9268
- let matDialogRef;
9269
- if (previewDialogFunction) {
9270
- matDialogRef = previewDialogFunction({
9271
- matDialog: this.matDialog,
9272
- ...input
9273
- });
9274
- }
9275
- else {
9276
- const componentConfig = this.createPreviewConfig(input);
9277
- matDialogRef = this._defaultPreviewDialogWithComponentFunction({
9278
- matDialog: this.matDialog,
9279
- ...input,
9280
- componentConfig
9281
- });
9282
- }
9283
- return matDialogRef;
9284
- }
9285
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9286
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewService, providedIn: 'root' });
9287
- }
9288
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewService, decorators: [{
9289
- type: Injectable,
9290
- args: [{
9291
- providedIn: 'root'
9292
- }]
9293
- }], ctorParameters: () => [] });
9294
-
9295
- /**
9296
- * Previews a file by delegating to the {@link DbxWebFilePreviewService} to resolve the appropriate preview component for the given MIME type.
9297
- *
9298
- * @example
9299
- * ```html
9300
- * <dbx-web-file-preview [config]="{ srcUrl: 'https://example.com/doc.pdf', embedMimeType: 'application/pdf' }"></dbx-web-file-preview>
9301
- * ```
9302
- */
9303
- class DbxWebFilePreviewComponent {
9304
- webFilePreviewService = inject(DbxWebFilePreviewService);
9305
- config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
9306
- componentConfigSignal = computed(() => {
9307
- const config = this.config();
9308
- let componentConfig;
9309
- if (config) {
9310
- componentConfig = this.webFilePreviewService.createPreviewConfig(config);
9311
- }
9312
- return componentConfig;
9313
- }, ...(ngDevMode ? [{ debugName: "componentConfigSignal" }] : /* istanbul ignore next */ []));
9314
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9315
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxWebFilePreviewComponent, isStandalone: true, selector: "dbx-web-file-preview", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
9316
- <dbx-injection [config]="componentConfigSignal()"></dbx-injection>
9317
- `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9318
- }
9319
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewComponent, decorators: [{
9320
- type: Component,
9321
- args: [{
9322
- selector: 'dbx-web-file-preview',
9323
- template: `
9324
- <dbx-injection [config]="componentConfigSignal()"></dbx-injection>
9325
- `,
9326
- standalone: true,
9327
- changeDetection: ChangeDetectionStrategy.OnPush,
9328
- imports: [DbxInjectionComponent]
9329
- }]
9330
- }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
9331
-
9332
- /**
9333
- * Builds a directory tree from an array of zip archive entries, enriching each node with MIME type detection and blob retrieval capability.
9334
- *
9335
- * @param entries - Array of zip archive entries to build the tree from, or null/undefined for an empty tree.
9336
- * @returns The root node of the constructed directory tree with MIME types and blob getters attached.
9337
- *
9338
- * @example
9339
- * ```typescript
9340
- * const root = dbxZipBlobPreviewEntryTreeFromEntries(zipEntries);
9341
- * // root.children contains the top-level files and directories
9342
- * ```
9343
- */
9344
- function dbxZipBlobPreviewEntryTreeFromEntries(entries) {
9345
- const nodeValues = (entries ?? []).map((value) => {
9346
- const nodeSlashPathDetails = slashPathDetails(value.filename);
9347
- const mimeType = mimeTypeForFileExtension(nodeSlashPathDetails.typedFileExtension);
9348
- return {
9349
- value,
9350
- mimeType,
9351
- slashPathDetails: nodeSlashPathDetails,
9352
- getBlob: value.getData ? () => value.getData(new BlobWriter(mimeType ?? undefined)) : undefined
9353
- };
9354
- });
9355
- return slashPathDirectoryTree(nodeValues);
9356
- }
9357
-
9358
- /**
9359
- * Ordered numeric mapping of {@link ScreenMediaWidthType} for size comparisons.
9360
- */
9361
- const SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP = {
9362
- micro: 0,
9363
- small: 1,
9364
- tablet: 2,
9365
- large: 3,
9366
- full: 4
9367
- };
9368
- /**
9369
- * Returns `true` if the current screen width type is at least as wide as the given breakpoint.
9370
- *
9371
- * @param current - The current screen width type.
9372
- * @param breakpoint - The minimum width type to check against.
9373
- * @returns `true` if the current width type meets or exceeds the breakpoint.
9374
- *
9375
- * @example
9376
- * ```ts
9377
- * screenMediaWidthTypeIsActive('tablet', 'small'); // true
9378
- * screenMediaWidthTypeIsActive('micro', 'tablet'); // false
9379
- * ```
9380
- */
9381
- function screenMediaWidthTypeIsActive(current, breakpoint) {
9382
- return compareScreenMediaWidthTypes(current, breakpoint, (a, b) => a >= b);
9383
- }
9384
- /**
9385
- * Compares two {@link ScreenMediaWidthType} values using a custom comparator on their numeric sizes.
9386
- *
9387
- * @param a - The first screen width type.
9388
- * @param b - The second screen width type.
9389
- * @param compare - A comparator function applied to the numeric size values of `a` and `b`
9390
- * @returns The result of applying the comparator to the mapped numeric sizes.
9391
- */
9392
- function compareScreenMediaWidthTypes(a, b, compare) {
9393
- return compare(SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP[a], SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP[b]);
9394
- }
9395
-
9396
- /**
9397
- * Abstract configuration class for {@link DbxScreenMediaService} defining responsive breakpoints.
9398
- *
9399
- * Provide a concrete instance via {@link provideDbxScreenMediaService} or supply values directly.
9400
- */
9401
- class DbxScreenMediaServiceConfig {
9402
- }
9403
- /**
9404
- * Default responsive breakpoint configuration with standard mobile/tablet/desktop thresholds.
9405
- */
9406
- const DEFAULT_SCREEN_MEDIA_SERVICE_CONFIG = {
9407
- microScreenWidthMax: 360,
9408
- smallScreenWidthMax: 520,
9409
- tabletScreenWidthMax: 786,
9410
- largeScreenWidthMax: 1280,
9411
- tinyScreenHeightMax: 280
9412
- };
9413
- /**
9414
- * Reactive service that tracks the current screen width and height categories using CSS media queries.
9415
- *
9416
- * Emits {@link ScreenMediaWidthType} and {@link ScreenMediaHeightType} values that update
9417
- * as the viewport is resized. Use {@link isBreakpointActive} to reactively check whether
9418
- * the screen meets a minimum width breakpoint.
9419
- *
9420
- * @example
9421
- * ```ts
9422
- * readonly screenService = inject(DbxScreenMediaService);
9423
- * readonly isTabletOrLarger$ = this.screenService.isBreakpointActive('tablet');
9424
- * ```
9425
- */
9426
- class DbxScreenMediaService {
9427
- _media = inject(MediaMatcher);
9428
- _microQuery;
9429
- _smallQuery;
9430
- _tabletQuery;
9431
- _largeQuery;
9432
- _tinyHeightQuery;
9433
- _updateWidth = new Subject();
9434
- _updateHeight = new Subject();
9435
- widthType$ = this._updateWidth.pipe(initialize(() => this._updateWidth.next()), throttleTime(100, undefined, { leading: true, trailing: true }), map(() => this._readWidthType()), distinctUntilChanged(), shareReplay(1));
9436
- heightType$ = this._updateWidth.pipe(initialize(() => this._updateHeight.next()), throttleTime(100, undefined, { leading: true, trailing: true }), map(() => this._readHeightType()), distinctUntilChanged(), shareReplay(1));
9437
- constructor() {
9438
- const { microScreenWidthMax, smallScreenWidthMax, tabletScreenWidthMax, largeScreenWidthMax } = inject(DbxScreenMediaServiceConfig);
9439
- this._microQuery = this._media.matchMedia(`screen and (max-width:${microScreenWidthMax}px)`);
9440
- this._smallQuery = this._media.matchMedia(`screen and (max-width:${smallScreenWidthMax}px)`);
9441
- this._tabletQuery = this._media.matchMedia(`screen and (max-width:${tabletScreenWidthMax}px)`);
9442
- this._largeQuery = this._media.matchMedia(`screen and (max-width:${largeScreenWidthMax}px)`);
9443
- this._tinyHeightQuery = this._media.matchMedia(`screen and (max-width:${largeScreenWidthMax}px)`);
9444
- const widthHandler = () => this._updateWidth.next();
9445
- const heightHandler = () => this._updateHeight.next();
9446
- this._microQuery.onchange = widthHandler;
9447
- this._smallQuery.onchange = widthHandler;
9448
- this._tabletQuery.onchange = widthHandler;
9449
- this._largeQuery.onchange = widthHandler;
9450
- this._tinyHeightQuery.onchange = heightHandler;
9451
- }
9452
- destroy() {
9453
- this._microQuery.onchange = null;
9454
- this._smallQuery.onchange = null;
9455
- this._tabletQuery.onchange = null;
9456
- this._largeQuery.onchange = null;
9457
- this._updateWidth.complete();
9458
- this._updateHeight.complete();
9459
- }
9460
- /**
9461
- * Returns an observable that emits `true` when the current screen width is at least as wide as the given breakpoint.
9462
- *
9463
- * @param inputBreakpoint - The minimum width type or an observable of it.
9464
- * @returns Observable of whether the breakpoint is currently active.
9465
- */
9466
- isBreakpointActive(inputBreakpoint) {
9467
- return combineLatest([this.widthType$, asObservable(inputBreakpoint)]).pipe(map(([current, breakpoint]) => screenMediaWidthTypeIsActive(current, breakpoint)), distinctUntilChanged(), shareReplay(1));
9468
- }
9469
- _readWidthType() {
9470
- let width;
9471
- if (this._microQuery.matches) {
9472
- width = 'micro';
9473
- }
9474
- else if (this._smallQuery.matches) {
9475
- width = 'small';
9476
- }
9477
- else if (this._tabletQuery.matches) {
9478
- width = 'tablet';
9479
- }
9480
- else if (this._largeQuery.matches) {
9481
- width = 'large';
9482
- }
9483
- else {
9484
- width = 'full';
9485
- }
9486
- return width;
9487
- }
9488
- _readHeightType() {
9489
- return this._tinyHeightQuery ? 'tiny' : 'normal';
9490
- }
9491
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxScreenMediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9492
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxScreenMediaService });
9493
- }
9494
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxScreenMediaService, decorators: [{
9495
- type: Injectable
9496
- }], ctorParameters: () => [] });
9497
-
9498
- /**
9499
- * Calculates and applies a dynamic height to a Material expansion panel header based on text content.
9047
+ * Calculates and applies a dynamic height to a Material expansion panel header based on text content.
9500
9048
  *
9501
9049
  * Sets the `--mat-expansion-header-collapsed-state-height` and `--mat-expansion-header-expanded-state-height`
9502
9050
  * CSS custom properties. On small screens, the estimated line count is scaled up to account for text wrapping.
@@ -12357,16 +11905,95 @@ class DbxContentPageDirective {
12357
11905
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
12358
11906
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: DbxContentPageDirective, isStandalone: true, selector: "dbx-content-page,[dbxContentPage]", host: { classAttribute: "d-block dbx-content-page" }, ngImport: i0 });
12359
11907
  }
12360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPageDirective, decorators: [{
11908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPageDirective, decorators: [{
11909
+ type: Directive,
11910
+ args: [{
11911
+ selector: 'dbx-content-page,[dbxContentPage]',
11912
+ host: {
11913
+ class: 'd-block dbx-content-page'
11914
+ },
11915
+ standalone: true
11916
+ }]
11917
+ }] });
11918
+
11919
+ /**
11920
+ * Wraps content in a recessed "pit" container with optional scrollable overflow and rounded corners.
11921
+ * Useful for displaying bounded content areas such as lists or previews with a constrained height.
11922
+ *
11923
+ * Pits round their corners by default. Pass `[square]="true"` to square the pit — this applies the
11924
+ * common `.dbx-corners-none` opt-out utility rather than a pit-specific class.
11925
+ *
11926
+ * When `[scrollable]` is set the pit frame (padding, background, corners) stays fixed and an inner
11927
+ * `.dbx-content-pit-scrollable-content` wrapper does the scrolling — wrap the body in that element so
11928
+ * the frame doesn't shift at the scroll extremes. The resolved max height is published as the
11929
+ * `--dbx-content-pit-scrollable-max-height` custom property, which the inner wrapper reads.
11930
+ *
11931
+ * @dbxWebComponent
11932
+ * @dbxWebSlug content-pit
11933
+ * @dbxWebCategory layout
11934
+ * @dbxWebRelated content-box, content-elevate
11935
+ * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
11936
+ * @dbxWebMinimalExample ```html
11937
+ * <dbx-content-pit>Body</dbx-content-pit>
11938
+ * ```
11939
+ *
11940
+ * @example
11941
+ * ```html
11942
+ * <div dbxContentPit>Inset block</div>
11943
+ * ```
11944
+ */
11945
+ class DbxContentPitDirective {
11946
+ scrollable = input(...(ngDevMode ? [undefined, { debugName: "scrollable" }] : /* istanbul ignore next */ []));
11947
+ square = input(false, ...(ngDevMode ? [{ debugName: "square" }] : /* istanbul ignore next */ []));
11948
+ scrollableHeightSignal = computed(() => {
11949
+ let scrollable = this.scrollable();
11950
+ let scrollableHeight;
11951
+ if (typeof scrollable === 'boolean') {
11952
+ scrollable = scrollable ? 'medium' : undefined; // defaults to medium
11953
+ }
11954
+ if (scrollable) {
11955
+ if (typeof scrollable === 'string') {
11956
+ switch (scrollable) {
11957
+ case 'small':
11958
+ scrollable = 120;
11959
+ break;
11960
+ case 'medium':
11961
+ scrollable = 320;
11962
+ break;
11963
+ case 'large':
11964
+ scrollable = 460;
11965
+ break;
11966
+ default:
11967
+ scrollableHeight = scrollable; // use as-is
11968
+ break;
11969
+ }
11970
+ }
11971
+ if (typeof scrollable === 'number') {
11972
+ scrollableHeight = `${scrollable}px`;
11973
+ }
11974
+ }
11975
+ return scrollableHeight ?? null;
11976
+ }, ...(ngDevMode ? [{ debugName: "scrollableHeightSignal" }] : /* istanbul ignore next */ []));
11977
+ // The pit always publishes its own scroll cap so the `.dbx-content-pit-scrollable-content`
11978
+ // wrapper reads it directly rather than inheriting the global `--dbx-content-pit-scrollable-max-height`
11979
+ // default (140px) from the theme root. `none` when not scrollable lets the wrapper grow freely.
11980
+ scrollableMaxHeightSignal = computed(() => this.scrollableHeightSignal() ?? 'none', ...(ngDevMode ? [{ debugName: "scrollableMaxHeightSignal" }] : /* istanbul ignore next */ []));
11981
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11982
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxContentPitDirective, isStandalone: true, selector: "dbx-content-pit, [dbxContentPit]", inputs: { scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-content-pit-scrollable": "scrollableHeightSignal() != null", "class.dbx-corners-none": "square()", "style.--dbx-content-pit-scrollable-max-height": "scrollableMaxHeightSignal()" }, classAttribute: "d-block dbx-content-pit" }, ngImport: i0 });
11983
+ }
11984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxContentPitDirective, decorators: [{
12361
11985
  type: Directive,
12362
11986
  args: [{
12363
- selector: 'dbx-content-page,[dbxContentPage]',
11987
+ selector: 'dbx-content-pit, [dbxContentPit]',
12364
11988
  host: {
12365
- class: 'd-block dbx-content-page'
11989
+ class: 'd-block dbx-content-pit',
11990
+ '[class.dbx-content-pit-scrollable]': 'scrollableHeightSignal() != null',
11991
+ '[class.dbx-corners-none]': 'square()',
11992
+ '[style.--dbx-content-pit-scrollable-max-height]': 'scrollableMaxHeightSignal()'
12366
11993
  },
12367
11994
  standalone: true
12368
11995
  }]
12369
- }] });
11996
+ }], propDecorators: { scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], square: [{ type: i0.Input, args: [{ isSignal: true, alias: "square", required: false }] }] } });
12370
11997
 
12371
11998
  const importsAndExports$8 = [
12372
11999
  //
@@ -15458,974 +15085,1624 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
15458
15085
  </div>
15459
15086
  `,
15460
15087
  host: {
15461
- class: 'dbx-detail-block d-block',
15462
- '[class.dbx-detail-block-big-header]': 'bigHeader()'
15088
+ class: 'dbx-detail-block d-block',
15089
+ '[class.dbx-detail-block-big-header]': 'bigHeader()'
15090
+ },
15091
+ imports: [DbxDetailBlockHeaderComponent],
15092
+ standalone: true,
15093
+ changeDetection: ChangeDetectionStrategy.OnPush
15094
+ }]
15095
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], alignHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignHeader", required: false }] }], bigHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "bigHeader", required: false }] }] } });
15096
+
15097
+ /**
15098
+ * Rounded, padded leading-icon tile. Renders a `<mat-icon>` from the
15099
+ * `icon` input centered inside a flex tile, or projects custom content
15100
+ * when `icon` is not supplied. Apply `[dbxColor]` (optionally with
15101
+ * `[dbxColorTone]`) directly on the host to give the tile a tonal or
15102
+ * full-color background — the tile itself sets layout only.
15103
+ *
15104
+ * Set `[round]="true"` to apply the `dbx-icon-tile-round` modifier and
15105
+ * render a circle instead of the default 12px-rounded square.
15106
+ *
15107
+ * Equivalent to writing `<div dbxIconTile [dbxColor]="'…'"><mat-icon>…</mat-icon></div>`,
15108
+ * but with the icon name as a single input. Backed by the same
15109
+ * `dbx-icon-tile` host class as {@link DbxIconTileDirective}, so the CSS
15110
+ * utility, the directive form, and this component all share styling.
15111
+ *
15112
+ * Sizing, padding, border radius, font, and inner `.mat-icon` size are
15113
+ * all configurable via CSS custom properties on the host:
15114
+ * `--dbx-icon-tile-width`, `--dbx-icon-tile-height`,
15115
+ * `--dbx-icon-tile-min-width`, `--dbx-icon-tile-padding`,
15116
+ * `--dbx-icon-tile-border-radius`, `--dbx-icon-tile-font-size`,
15117
+ * `--dbx-icon-tile-font-weight`, `--dbx-icon-tile-icon-size`.
15118
+ *
15119
+ * @dbxWebComponent
15120
+ * @dbxWebSlug icon-tile
15121
+ * @dbxWebCategory layout
15122
+ * @dbxWebRelated icon-tile-host, dbx-color, list-two-line-item
15123
+ * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
15124
+ * @dbxWebContentProjection Optional fallback content rendered when `icon` is not supplied (e.g. a custom icon component).
15125
+ * @dbxWebMinimalExample ```html
15126
+ * <dbx-icon-tile [icon]="'verified'" dbxColor="success"></dbx-icon-tile>
15127
+ * ```
15128
+ *
15129
+ * @example
15130
+ * ```html
15131
+ * <dbx-icon-tile [icon]="'check'" dbxColor="primary" [dbxColorTone]="18"></dbx-icon-tile>
15132
+ *
15133
+ * <dbx-icon-tile [icon]="'star'" [round]="true" dbxColor="accent"></dbx-icon-tile>
15134
+ *
15135
+ * <dbx-icon-tile dbxColor="accent">
15136
+ * <my-custom-glyph></my-custom-glyph>
15137
+ * </dbx-icon-tile>
15138
+ * ```
15139
+ */
15140
+ class DbxIconTileComponent {
15141
+ icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
15142
+ round = input(false, ...(ngDevMode ? [{ debugName: "round" }] : /* istanbul ignore next */ []));
15143
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15144
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxIconTileComponent, isStandalone: true, selector: "dbx-icon-tile", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, round: { classPropertyName: "round", publicName: "round", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-icon-tile-round": "round()" }, classAttribute: "dbx-icon-tile" }, ngImport: i0, template: `
15145
+ @if (icon(); as iconValue) {
15146
+ <mat-icon>{{ iconValue }}</mat-icon>
15147
+ } @else {
15148
+ <ng-content></ng-content>
15149
+ }
15150
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15151
+ }
15152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileComponent, decorators: [{
15153
+ type: Component,
15154
+ args: [{
15155
+ selector: 'dbx-icon-tile',
15156
+ template: `
15157
+ @if (icon(); as iconValue) {
15158
+ <mat-icon>{{ iconValue }}</mat-icon>
15159
+ } @else {
15160
+ <ng-content></ng-content>
15161
+ }
15162
+ `,
15163
+ host: {
15164
+ class: 'dbx-icon-tile',
15165
+ '[class.dbx-icon-tile-round]': 'round()'
15166
+ },
15167
+ imports: [MatIconModule],
15168
+ standalone: true,
15169
+ changeDetection: ChangeDetectionStrategy.OnPush
15170
+ }]
15171
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], round: [{ type: i0.Input, args: [{ isSignal: true, alias: "round", required: false }] }] } });
15172
+
15173
+ /**
15174
+ * Host-class form of the icon tile — applies the `dbx-icon-tile` utility
15175
+ * (flex-centered, 12px rounded, 8px padded) to an existing element. Use
15176
+ * this when an existing slot (e.g. a list row's `.item-icon` div) needs
15177
+ * the tile presentation without introducing a wrapping component, or
15178
+ * when stacking with another component that already owns the host (so a
15179
+ * `<dbx-icon-tile>` child element isn't possible).
15180
+ *
15181
+ * Pair with `[dbxColor]` (optionally `[dbxColorTone]`) on the same host
15182
+ * for a tonal/full-color background. The host has no background of its
15183
+ * own — only layout. For the convenient component form that renders the
15184
+ * `<mat-icon>` for you, use {@link DbxIconTileComponent} (`<dbx-icon-tile>`).
15185
+ *
15186
+ * Sizing, padding, border radius, font, and inner `.mat-icon` size are
15187
+ * all configurable via CSS custom properties on the host:
15188
+ * `--dbx-icon-tile-width`, `--dbx-icon-tile-height`,
15189
+ * `--dbx-icon-tile-min-width`, `--dbx-icon-tile-padding`,
15190
+ * `--dbx-icon-tile-border-radius`, `--dbx-icon-tile-font-size`,
15191
+ * `--dbx-icon-tile-font-weight`, `--dbx-icon-tile-icon-size`.
15192
+ *
15193
+ * @dbxWebComponent
15194
+ * @dbxWebSlug icon-tile-host
15195
+ * @dbxWebCategory layout
15196
+ * @dbxWebRelated icon-tile, dbx-color, list-two-line-item
15197
+ * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
15198
+ * @dbxWebMinimalExample ```html
15199
+ * <div dbxIconTile dbxColor="primary" [dbxColorTone]="18">
15200
+ * <mat-icon>star</mat-icon>
15201
+ * </div>
15202
+ * ```
15203
+ *
15204
+ * @example
15205
+ * ```html
15206
+ * <div class="dbx-list-two-line-item dbx-list-two-line-item-with-icon">
15207
+ * <div class="item-icon" dbxIconTile dbxColor="primary" [dbxColorTone]="18">
15208
+ * <mat-icon>check_circle</mat-icon>
15209
+ * </div>
15210
+ * <div class="item-left">
15211
+ * <span class="item-title">Title</span>
15212
+ * <span class="item-details">Details</span>
15213
+ * </div>
15214
+ * </div>
15215
+ * ```
15216
+ */
15217
+ class DbxIconTileDirective {
15218
+ /**
15219
+ * When `true`, applies the `dbx-icon-tile-round` modifier to render the
15220
+ * tile as a circle instead of a 12px-rounded square.
15221
+ */
15222
+ dbxIconTileRound = input(false, ...(ngDevMode ? [{ debugName: "dbxIconTileRound" }] : /* istanbul ignore next */ []));
15223
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15224
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxIconTileDirective, isStandalone: true, selector: "[dbxIconTile]", inputs: { dbxIconTileRound: { classPropertyName: "dbxIconTileRound", publicName: "dbxIconTileRound", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-icon-tile-round": "dbxIconTileRound()" }, classAttribute: "dbx-icon-tile" }, ngImport: i0 });
15225
+ }
15226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileDirective, decorators: [{
15227
+ type: Directive,
15228
+ args: [{
15229
+ selector: '[dbxIconTile]',
15230
+ host: {
15231
+ class: 'dbx-icon-tile',
15232
+ '[class.dbx-icon-tile-round]': 'dbxIconTileRound()'
15233
+ },
15234
+ standalone: true
15235
+ }]
15236
+ }], propDecorators: { dbxIconTileRound: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxIconTileRound", required: false }] }] } });
15237
+
15238
+ /**
15239
+ * A step-oriented content block that displays a numbered circle badge on the left
15240
+ * with header, hint, and projected content on the right.
15241
+ *
15242
+ * Use the `icon` input to replace the step number with a Material icon.
15243
+ * Use the `[header]` content slot for extra header-level content (like `dbx-detail-block`).
15244
+ * Use the `color` input to customize the badge color (defaults to `'primary'`).
15245
+ *
15246
+ * Use the `center` input to vertically center the badge with the content.
15247
+ *
15248
+ * Accepts either individual inputs or a single `config` object. Individual inputs
15249
+ * take precedence over config values when both are provided.
15250
+ *
15251
+ * @example
15252
+ * ```html
15253
+ * <dbx-step-block [step]="1" header="Create Account" hint="Fill in the registration form.">
15254
+ * <p>Enter your email and password to get started.</p>
15255
+ * </dbx-step-block>
15256
+ *
15257
+ * <dbx-step-block [config]="stepConfig">
15258
+ * <p>Content using a config object.</p>
15259
+ * </dbx-step-block>
15260
+ *
15261
+ * <dbx-step-block [step]="2" color="accent" header="Custom Header Content">
15262
+ * <span header>Extra header content</span>
15263
+ * <p>Detail content goes here.</p>
15264
+ * </dbx-step-block>
15265
+ * ```
15266
+ */
15267
+ class DbxStepBlockComponent {
15268
+ config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
15269
+ step = input(...(ngDevMode ? [undefined, { debugName: "step" }] : /* istanbul ignore next */ []));
15270
+ icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
15271
+ header = input(...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
15272
+ hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : /* istanbul ignore next */ []));
15273
+ color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
15274
+ center = input(...(ngDevMode ? [undefined, { debugName: "center" }] : /* istanbul ignore next */ []));
15275
+ stepSignal = computed(() => {
15276
+ const config = this.config();
15277
+ return this.step() ?? config?.step ?? 1;
15278
+ }, ...(ngDevMode ? [{ debugName: "stepSignal" }] : /* istanbul ignore next */ []));
15279
+ iconSignal = computed(() => {
15280
+ const config = this.config();
15281
+ return this.icon() ?? config?.icon;
15282
+ }, ...(ngDevMode ? [{ debugName: "iconSignal" }] : /* istanbul ignore next */ []));
15283
+ headerSignal = computed(() => {
15284
+ const config = this.config();
15285
+ return this.header() ?? config?.header;
15286
+ }, ...(ngDevMode ? [{ debugName: "headerSignal" }] : /* istanbul ignore next */ []));
15287
+ hintSignal = computed(() => {
15288
+ const config = this.config();
15289
+ return this.hint() ?? config?.hint;
15290
+ }, ...(ngDevMode ? [{ debugName: "hintSignal" }] : /* istanbul ignore next */ []));
15291
+ colorSignal = computed(() => {
15292
+ const config = this.config();
15293
+ return this.color() ?? config?.color ?? 'primary';
15294
+ }, ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
15295
+ centerSignal = computed(() => {
15296
+ const config = this.config();
15297
+ return this.center() ?? config?.center ?? false;
15298
+ }, ...(ngDevMode ? [{ debugName: "centerSignal" }] : /* istanbul ignore next */ []));
15299
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStepBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15300
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxStepBlockComponent, isStandalone: true, selector: "dbx-step-block", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, center: { classPropertyName: "center", publicName: "center", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-step-block-center": "centerSignal()" }, classAttribute: "dbx-step-block d-block" }, ngImport: i0, template: `
15301
+ <dbx-icon-tile class="dbx-step-block-badge" [icon]="iconSignal()" [dbxColor]="colorSignal()">
15302
+ @if (!iconSignal()) {
15303
+ {{ stepSignal() }}
15304
+ }
15305
+ </dbx-icon-tile>
15306
+ <div class="dbx-step-block-content dbx-flex-fill-0">
15307
+ @if (headerSignal()) {
15308
+ <div class="dbx-step-block-header">
15309
+ <span class="dbx-step-block-header-label">{{ headerSignal() }}</span>
15310
+ <ng-content select="[header]"></ng-content>
15311
+ </div>
15312
+ }
15313
+ @if (hintSignal()) {
15314
+ <span class="dbx-step-block-hint">{{ hintSignal() }}</span>
15315
+ }
15316
+ <ng-content></ng-content>
15317
+ </div>
15318
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxIconTileComponent, selector: "dbx-icon-tile", inputs: ["icon", "round"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange", "dbxColorToneChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15319
+ }
15320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStepBlockComponent, decorators: [{
15321
+ type: Component,
15322
+ args: [{
15323
+ selector: 'dbx-step-block',
15324
+ template: `
15325
+ <dbx-icon-tile class="dbx-step-block-badge" [icon]="iconSignal()" [dbxColor]="colorSignal()">
15326
+ @if (!iconSignal()) {
15327
+ {{ stepSignal() }}
15328
+ }
15329
+ </dbx-icon-tile>
15330
+ <div class="dbx-step-block-content dbx-flex-fill-0">
15331
+ @if (headerSignal()) {
15332
+ <div class="dbx-step-block-header">
15333
+ <span class="dbx-step-block-header-label">{{ headerSignal() }}</span>
15334
+ <ng-content select="[header]"></ng-content>
15335
+ </div>
15336
+ }
15337
+ @if (hintSignal()) {
15338
+ <span class="dbx-step-block-hint">{{ hintSignal() }}</span>
15339
+ }
15340
+ <ng-content></ng-content>
15341
+ </div>
15342
+ `,
15343
+ host: {
15344
+ class: 'dbx-step-block d-block',
15345
+ '[class.dbx-step-block-center]': 'centerSignal()'
15463
15346
  },
15464
- imports: [DbxDetailBlockHeaderComponent],
15347
+ imports: [DbxIconTileComponent, DbxColorDirective],
15465
15348
  standalone: true,
15466
15349
  changeDetection: ChangeDetectionStrategy.OnPush
15467
15350
  }]
15468
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], alignHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignHeader", required: false }] }], bigHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "bigHeader", required: false }] }] } });
15351
+ }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], center: [{ type: i0.Input, args: [{ isSignal: true, alias: "center", required: false }] }] } });
15469
15352
 
15470
15353
  /**
15471
- * Rounded, padded leading-icon tile. Renders a `<mat-icon>` from the
15472
- * `icon` input centered inside a flex tile, or projects custom content
15473
- * when `icon` is not supplied. Apply `[dbxColor]` (optionally with
15474
- * `[dbxColorTone]`) directly on the host to give the tile a tonal or
15475
- * full-color background — the tile itself sets layout only.
15476
- *
15477
- * Set `[round]="true"` to apply the `dbx-icon-tile-round` modifier and
15478
- * render a circle instead of the default 12px-rounded square.
15479
- *
15480
- * Equivalent to writing `<div dbxIconTile [dbxColor]="'…'"><mat-icon>…</mat-icon></div>`,
15481
- * but with the icon name as a single input. Backed by the same
15482
- * `dbx-icon-tile` host class as {@link DbxIconTileDirective}, so the CSS
15483
- * utility, the directive form, and this component all share styling.
15484
- *
15485
- * Sizing, padding, border radius, font, and inner `.mat-icon` size are
15486
- * all configurable via CSS custom properties on the host:
15487
- * `--dbx-icon-tile-width`, `--dbx-icon-tile-height`,
15488
- * `--dbx-icon-tile-min-width`, `--dbx-icon-tile-padding`,
15489
- * `--dbx-icon-tile-border-radius`, `--dbx-icon-tile-font-size`,
15490
- * `--dbx-icon-tile-font-weight`, `--dbx-icon-tile-icon-size`.
15491
- *
15492
- * @dbxWebComponent
15493
- * @dbxWebSlug icon-tile
15494
- * @dbxWebCategory layout
15495
- * @dbxWebRelated icon-tile-host, dbx-color, list-two-line-item
15496
- * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
15497
- * @dbxWebContentProjection Optional fallback content rendered when `icon` is not supplied (e.g. a custom icon component).
15498
- * @dbxWebMinimalExample ```html
15499
- * <dbx-icon-tile [icon]="'verified'" dbxColor="success"></dbx-icon-tile>
15500
- * ```
15354
+ * Adds inline spacing sized for icons, typically used to align text that sits next to icon-bearing siblings.
15501
15355
  *
15502
15356
  * @example
15503
15357
  * ```html
15504
- * <dbx-icon-tile [icon]="'check'" dbxColor="primary" [dbxColorTone]="18"></dbx-icon-tile>
15505
- *
15506
- * <dbx-icon-tile [icon]="'star'" [round]="true" dbxColor="accent"></dbx-icon-tile>
15507
- *
15508
- * <dbx-icon-tile dbxColor="accent">
15509
- * <my-custom-glyph></my-custom-glyph>
15510
- * </dbx-icon-tile>
15358
+ * <dbx-icon-spacer></dbx-icon-spacer>
15359
+ * <span>Text aligned with icon spacing</span>
15511
15360
  * ```
15512
15361
  */
15513
- class DbxIconTileComponent {
15514
- icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
15515
- round = input(false, ...(ngDevMode ? [{ debugName: "round" }] : /* istanbul ignore next */ []));
15516
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15517
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxIconTileComponent, isStandalone: true, selector: "dbx-icon-tile", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, round: { classPropertyName: "round", publicName: "round", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-icon-tile-round": "round()" }, classAttribute: "dbx-icon-tile" }, ngImport: i0, template: `
15518
- @if (icon(); as iconValue) {
15519
- <mat-icon>{{ iconValue }}</mat-icon>
15520
- } @else {
15521
- <ng-content></ng-content>
15522
- }
15523
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15362
+ class DbxIconSpacerDirective {
15363
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconSpacerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15364
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: DbxIconSpacerDirective, isStandalone: true, selector: "dbx-icon-spacer,[dbxIconSpacer]", host: { classAttribute: "dbx-icon-spacer d-inline" }, ngImport: i0 });
15524
15365
  }
15525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileComponent, decorators: [{
15526
- type: Component,
15366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconSpacerDirective, decorators: [{
15367
+ type: Directive,
15527
15368
  args: [{
15528
- selector: 'dbx-icon-tile',
15529
- template: `
15530
- @if (icon(); as iconValue) {
15531
- <mat-icon>{{ iconValue }}</mat-icon>
15532
- } @else {
15533
- <ng-content></ng-content>
15534
- }
15535
- `,
15369
+ selector: 'dbx-icon-spacer,[dbxIconSpacer]',
15536
15370
  host: {
15537
- class: 'dbx-icon-tile',
15538
- '[class.dbx-icon-tile-round]': 'round()'
15371
+ class: 'dbx-icon-spacer d-inline'
15539
15372
  },
15540
- imports: [MatIconModule],
15541
- standalone: true,
15542
- changeDetection: ChangeDetectionStrategy.OnPush
15373
+ standalone: true
15543
15374
  }]
15544
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], round: [{ type: i0.Input, args: [{ isSignal: true, alias: "round", required: false }] }] } });
15375
+ }] });
15545
15376
 
15546
15377
  /**
15547
- * Host-class form of the icon tile — applies the `dbx-icon-tile` utility
15548
- * (flex-centered, 12px rounded, 8px padded) to an existing element. Use
15549
- * this when an existing slot (e.g. a list row's `.item-icon` div) needs
15550
- * the tile presentation without introducing a wrapping component, or
15551
- * when stacking with another component that already owns the host (so a
15552
- * `<dbx-icon-tile>` child element isn't possible).
15378
+ * The default linkify string type.
15379
+ */
15380
+ const DEFAULT_DBX_LINKIFY_STRING_TYPE = 'DEFAULT';
15381
+
15382
+ /**
15383
+ * Configuration provided in the root module for configuring entries.
15384
+ */
15385
+ class DbxLinkifyServiceConfig {
15386
+ }
15387
+ /**
15388
+ * Service used to register and retrieve linkify configurations by type.
15553
15389
  *
15554
- * Pair with `[dbxColor]` (optionally `[dbxColorTone]`) on the same host
15555
- * for a tonal/full-color background. The host has no background of its
15556
- * own — only layout. For the convenient component form that renders the
15557
- * `<mat-icon>` for you, use {@link DbxIconTileComponent} (`<dbx-icon-tile>`).
15390
+ * It has a default entry that is used when no type is specified or the requested type is not found.
15391
+ * By default, the default entry uses `{ defaultProtocol: 'https', target: { url: '_blank' } }`.
15558
15392
  *
15559
- * Sizing, padding, border radius, font, and inner `.mat-icon` size are
15560
- * all configurable via CSS custom properties on the host:
15561
- * `--dbx-icon-tile-width`, `--dbx-icon-tile-height`,
15562
- * `--dbx-icon-tile-min-width`, `--dbx-icon-tile-padding`,
15563
- * `--dbx-icon-tile-border-radius`, `--dbx-icon-tile-font-size`,
15564
- * `--dbx-icon-tile-font-weight`, `--dbx-icon-tile-icon-size`.
15393
+ * Apps can override the default and register additional types via DbxLinkifyServiceConfig
15394
+ * (provided by provideDbxLinkify()) or by calling register()/registerDefaultEntry() directly.
15395
+ */
15396
+ class DbxLinkifyService {
15397
+ _entries = new Map();
15398
+ constructor() {
15399
+ const initialConfig = inject(DbxLinkifyServiceConfig, { optional: true });
15400
+ if (initialConfig?.defaultEntry) {
15401
+ this.registerDefaultEntry(initialConfig.defaultEntry);
15402
+ }
15403
+ if (initialConfig?.entries) {
15404
+ this.register(initialConfig.entries);
15405
+ }
15406
+ // If no default was provided, register inline defaults
15407
+ if (!this._entries.has(DEFAULT_DBX_LINKIFY_STRING_TYPE)) {
15408
+ this.registerDefaultEntry({ options: { defaultProtocol: 'https', target: { url: '_blank' } } });
15409
+ }
15410
+ }
15411
+ /**
15412
+ * Registers the default entry.
15413
+ *
15414
+ * @param entry - Entry without the type field.
15415
+ */
15416
+ registerDefaultEntry(entry) {
15417
+ this._entries.set(DEFAULT_DBX_LINKIFY_STRING_TYPE, {
15418
+ ...entry,
15419
+ type: DEFAULT_DBX_LINKIFY_STRING_TYPE
15420
+ });
15421
+ }
15422
+ /**
15423
+ * Registers one or more entries by type.
15424
+ *
15425
+ * @param entries - One or more entries to register.
15426
+ * @param override - Whether to override existing entries (default: true)
15427
+ */
15428
+ register(entries, override = true) {
15429
+ useIterableOrValue(entries, (entry) => {
15430
+ if (override || !this._entries.has(entry.type)) {
15431
+ this._entries.set(entry.type, entry);
15432
+ }
15433
+ });
15434
+ }
15435
+ // MARK: Get
15436
+ /**
15437
+ * Returns the default entry.
15438
+ *
15439
+ * @returns The default linkify service entry, or undefined if none is registered.
15440
+ */
15441
+ getDefaultEntry() {
15442
+ return this._entries.get(DEFAULT_DBX_LINKIFY_STRING_TYPE);
15443
+ }
15444
+ /**
15445
+ * Returns the entry for the given type.
15446
+ *
15447
+ * @param type - The linkify string type to look up.
15448
+ * @returns The registered entry for the given type, or undefined if not found.
15449
+ */
15450
+ getEntryRegisteredForType(type) {
15451
+ return this._entries.get(type);
15452
+ }
15453
+ /**
15454
+ * Returns the entry for the given type, or the default type if there is no entry registered or the input type is null/undefined.
15455
+ *
15456
+ * @param type - The linkify string type to look up, or nullish to retrieve the default entry.
15457
+ * @returns The matching entry, or the default entry if the type is not provided.
15458
+ */
15459
+ getEntry(type) {
15460
+ return type ? this._entries.get(type) : this.getDefaultEntry();
15461
+ }
15462
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
15463
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyService, providedIn: 'root' // does not need to be strictly provided/configured. Works out of the box.
15464
+ });
15465
+ }
15466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyService, decorators: [{
15467
+ type: Injectable,
15468
+ args: [{
15469
+ providedIn: 'root' // does not need to be strictly provided/configured. Works out of the box.
15470
+ }]
15471
+ }], ctorParameters: () => [] });
15472
+
15473
+ /**
15474
+ * Converts URLs and email addresses in plain text into clickable HTML links using the linkify-string library.
15565
15475
  *
15566
- * @dbxWebComponent
15567
- * @dbxWebSlug icon-tile-host
15568
- * @dbxWebCategory layout
15569
- * @dbxWebRelated icon-tile, dbx-color, list-two-line-item
15570
- * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
15571
- * @dbxWebMinimalExample ```html
15572
- * <div dbxIconTile dbxColor="primary" [dbxColorTone]="18">
15573
- * <mat-icon>star</mat-icon>
15574
- * </div>
15575
- * ```
15476
+ * Options are resolved from {@link DbxLinkifyService} by type, then merged with any inline config overrides.
15576
15477
  *
15577
15478
  * @example
15578
15479
  * ```html
15579
- * <div class="dbx-list-two-line-item dbx-list-two-line-item-with-icon">
15580
- * <div class="item-icon" dbxIconTile dbxColor="primary" [dbxColorTone]="18">
15581
- * <mat-icon>check_circle</mat-icon>
15582
- * </div>
15583
- * <div class="item-left">
15584
- * <span class="item-title">Title</span>
15585
- * <span class="item-details">Details</span>
15586
- * </div>
15587
- * </div>
15480
+ * <dbx-linkify [text]="'Visit https://example.com for more info.'"></dbx-linkify>
15481
+ * <dbx-linkify [text]="description" [type]="'product-description'"></dbx-linkify>
15588
15482
  * ```
15589
15483
  */
15590
- class DbxIconTileDirective {
15591
- /**
15592
- * When `true`, applies the `dbx-icon-tile-round` modifier to render the
15593
- * tile as a circle instead of a 12px-rounded square.
15594
- */
15595
- dbxIconTileRound = input(false, ...(ngDevMode ? [{ debugName: "dbxIconTileRound" }] : /* istanbul ignore next */ []));
15596
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15597
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxIconTileDirective, isStandalone: true, selector: "[dbxIconTile]", inputs: { dbxIconTileRound: { classPropertyName: "dbxIconTileRound", publicName: "dbxIconTileRound", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-icon-tile-round": "dbxIconTileRound()" }, classAttribute: "dbx-icon-tile" }, ngImport: i0 });
15484
+ class DbxLinkifyComponent {
15485
+ sanitizer = inject(DomSanitizer);
15486
+ dbxLinkifyService = inject(DbxLinkifyService);
15487
+ text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
15488
+ type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : /* istanbul ignore next */ []));
15489
+ config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
15490
+ linkifiedTextSignal = computed(() => {
15491
+ const text = this.text();
15492
+ const type = this.type();
15493
+ const config = this.config();
15494
+ // Resolve base options from the service
15495
+ const entry = this.dbxLinkifyService.getEntry(type ?? config?.type);
15496
+ const baseOptions = entry?.options;
15497
+ // Merge base options with inline options (inline overrides base)
15498
+ const options = mergeObjects([baseOptions, config?.options]);
15499
+ return text ? linkifyStr(text, options) : undefined;
15500
+ }, ...(ngDevMode ? [{ debugName: "linkifiedTextSignal" }] : /* istanbul ignore next */ []));
15501
+ linkifiedBodySignal = computed(() => {
15502
+ const linkifiedText = this.linkifiedTextSignal();
15503
+ return linkifiedText ? this.sanitizer.bypassSecurityTrustHtml(linkifiedText) : undefined;
15504
+ }, ...(ngDevMode ? [{ debugName: "linkifiedBodySignal" }] : /* istanbul ignore next */ []));
15505
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15506
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxLinkifyComponent, isStandalone: true, selector: "dbx-linkify", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-i dbx-linkify" }, ngImport: i0, template: `
15507
+ <span [innerHTML]="linkifiedBodySignal()"></span>
15508
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
15598
15509
  }
15599
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconTileDirective, decorators: [{
15600
- type: Directive,
15510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyComponent, decorators: [{
15511
+ type: Component,
15601
15512
  args: [{
15602
- selector: '[dbxIconTile]',
15513
+ selector: 'dbx-linkify',
15514
+ template: `
15515
+ <span [innerHTML]="linkifiedBodySignal()"></span>
15516
+ `,
15603
15517
  host: {
15604
- class: 'dbx-icon-tile',
15605
- '[class.dbx-icon-tile-round]': 'dbxIconTileRound()'
15518
+ class: 'dbx-i dbx-linkify'
15606
15519
  },
15520
+ changeDetection: ChangeDetectionStrategy.OnPush,
15607
15521
  standalone: true
15608
15522
  }]
15609
- }], propDecorators: { dbxIconTileRound: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxIconTileRound", required: false }] }] } });
15523
+ }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
15610
15524
 
15611
15525
  /**
15612
- * A step-oriented content block that displays a numbered circle badge on the left
15613
- * with header, hint, and projected content on the right.
15526
+ * Creates environment-level providers for configuring {@link DbxLinkifyService} with a custom factory.
15614
15527
  *
15615
- * Use the `icon` input to replace the step number with a Material icon.
15616
- * Use the `[header]` content slot for extra header-level content (like `dbx-detail-block`).
15617
- * Use the `color` input to customize the badge color (defaults to `'primary'`).
15528
+ * @param config - Configuration containing the factory function for creating the linkify service config.
15529
+ * @returns Environment providers that register the DbxLinkifyServiceConfig.
15618
15530
  *
15619
- * Use the `center` input to vertically center the badge with the content.
15531
+ * @example
15532
+ * ```ts
15533
+ * provideDbxLinkify({
15534
+ * dbxLinkifyServiceConfigFactory: (injector) => ({
15535
+ * defaultEntry: { options: { defaultProtocol: 'https' } },
15536
+ * entries: [{ type: 'bio', options: { target: { url: '_blank' } } }]
15537
+ * })
15538
+ * });
15539
+ * ```
15540
+ */
15541
+ function provideDbxLinkify(config) {
15542
+ const { dbxLinkifyServiceConfigFactory } = config;
15543
+ const providers = [
15544
+ {
15545
+ provide: DbxLinkifyServiceConfig,
15546
+ useFactory: dbxLinkifyServiceConfigFactory
15547
+ }
15548
+ ];
15549
+ return makeEnvironmentProviders(providers);
15550
+ }
15551
+
15552
+ /**
15553
+ * Default background tone percentage for tonal chip coloring.
15554
+ */
15555
+ const DEFAULT_DBX_CHIP_TONE = 18;
15556
+ /**
15557
+ * Renders a styled chip element with optional small, block, and color modes.
15620
15558
  *
15621
- * Accepts either individual inputs or a single `config` object. Individual inputs
15622
- * take precedence over config values when both are provided.
15559
+ * Hosts a {@link DbxColorDirective} that provides the color tokens + `.dbx-color` marker the chip's
15560
+ * `.dbx-chip.dbx-color` SCSS paints from. The color can be supplied either through the {@link color}/{@link display}
15561
+ * inputs (pushed into the host directive) or by binding `[dbxColor]` directly; the chip's tone handling (default
15562
+ * {@link DEFAULT_DBX_CHIP_TONE} → tonal text) applies to both.
15563
+ *
15564
+ * @dbxWebComponent
15565
+ * @dbxWebSlug chip
15566
+ * @dbxWebCategory text
15567
+ * @dbxWebRelated chip-list
15568
+ * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
15569
+ * @dbxWebMinimalExample ```html
15570
+ * <dbx-chip text="Tag"></dbx-chip>
15571
+ * ```
15623
15572
  *
15624
15573
  * @example
15625
15574
  * ```html
15626
- * <dbx-step-block [step]="1" header="Create Account" hint="Fill in the registration form.">
15627
- * <p>Enter your email and password to get started.</p>
15628
- * </dbx-step-block>
15629
- *
15630
- * <dbx-step-block [config]="stepConfig">
15631
- * <p>Content using a config object.</p>
15632
- * </dbx-step-block>
15633
- *
15634
- * <dbx-step-block [step]="2" color="accent" header="Custom Header Content">
15635
- * <span header>Extra header content</span>
15636
- * <p>Detail content goes here.</p>
15637
- * </dbx-step-block>
15575
+ * <dbx-chip text="Active" icon="check" color="primary"></dbx-chip>
15638
15576
  * ```
15639
15577
  */
15640
- class DbxStepBlockComponent {
15641
- config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
15642
- step = input(...(ngDevMode ? [undefined, { debugName: "step" }] : /* istanbul ignore next */ []));
15643
- icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
15644
- header = input(...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
15645
- hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : /* istanbul ignore next */ []));
15578
+ class DbxChipDirective {
15579
+ _dbxColorDirective = inject(DbxColorDirective, { self: true });
15580
+ constructor() {
15581
+ let originalColor;
15582
+ let overridden = false;
15583
+ // Pushes the chip's resolved color (color input > display config) into the host DbxColorDirective so it stays the
15584
+ // single token provider on the element. The directive's own value is restored once the chip stops supplying a color.
15585
+ effect(() => {
15586
+ const color = this.colorSignal();
15587
+ if (color != null) {
15588
+ if (!overridden) {
15589
+ originalColor = untracked(this._dbxColorDirective.dbxColor);
15590
+ overridden = true;
15591
+ }
15592
+ this._dbxColorDirective.dbxColor.set(color);
15593
+ }
15594
+ else if (overridden) {
15595
+ this._dbxColorDirective.dbxColor.set(originalColor);
15596
+ overridden = false;
15597
+ }
15598
+ });
15599
+ }
15600
+ small = input(...(ngDevMode ? [undefined, { debugName: "small" }] : /* istanbul ignore next */ []));
15601
+ block = input(...(ngDevMode ? [undefined, { debugName: "block" }] : /* istanbul ignore next */ []));
15602
+ /**
15603
+ * Theme color or {@link DbxColorConfig} applied to the chip, pushed into the host {@link DbxColorDirective}.
15604
+ *
15605
+ * When {@link display} is also set, its color is used as a fallback.
15606
+ */
15646
15607
  color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
15647
- center = input(...(ngDevMode ? [undefined, { debugName: "center" }] : /* istanbul ignore next */ []));
15648
- stepSignal = computed(() => {
15649
- const config = this.config();
15650
- return this.step() ?? config?.step ?? 1;
15651
- }, ...(ngDevMode ? [{ debugName: "stepSignal" }] : /* istanbul ignore next */ []));
15652
- iconSignal = computed(() => {
15653
- const config = this.config();
15654
- return this.icon() ?? config?.icon;
15655
- }, ...(ngDevMode ? [{ debugName: "iconSignal" }] : /* istanbul ignore next */ []));
15656
- headerSignal = computed(() => {
15657
- const config = this.config();
15658
- return this.header() ?? config?.header;
15659
- }, ...(ngDevMode ? [{ debugName: "headerSignal" }] : /* istanbul ignore next */ []));
15660
- hintSignal = computed(() => {
15661
- const config = this.config();
15662
- return this.hint() ?? config?.hint;
15663
- }, ...(ngDevMode ? [{ debugName: "hintSignal" }] : /* istanbul ignore next */ []));
15608
+ /**
15609
+ * Display configuration that provides color (and optionally label/value metadata).
15610
+ *
15611
+ * The color from `display` is used as a fallback when `color` is not explicitly set.
15612
+ */
15613
+ display = input(...(ngDevMode ? [undefined, { debugName: "display" }] : /* istanbul ignore next */ []));
15614
+ /**
15615
+ * Background tone level for tonal appearance. Defaults to {@link DEFAULT_DBX_CHIP_TONE}.
15616
+ *
15617
+ * Set to `100` for fully opaque background.
15618
+ */
15619
+ tone = input(...(ngDevMode ? [undefined, { debugName: "tone" }] : /* istanbul ignore next */ []));
15664
15620
  colorSignal = computed(() => {
15665
- const config = this.config();
15666
- return this.color() ?? config?.color ?? 'primary';
15621
+ const display = this.display();
15622
+ return this.color() ?? display?.color;
15667
15623
  }, ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
15668
- centerSignal = computed(() => {
15669
- const config = this.config();
15670
- return this.center() ?? config?.center ?? false;
15671
- }, ...(ngDevMode ? [{ debugName: "centerSignal" }] : /* istanbul ignore next */ []));
15672
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStepBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15673
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxStepBlockComponent, isStandalone: true, selector: "dbx-step-block", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, center: { classPropertyName: "center", publicName: "center", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-step-block-center": "centerSignal()" }, classAttribute: "dbx-step-block d-block" }, ngImport: i0, template: `
15674
- <dbx-icon-tile class="dbx-step-block-badge" [icon]="iconSignal()" [dbxColor]="colorSignal()">
15675
- @if (!iconSignal()) {
15676
- {{ stepSignal() }}
15677
- }
15678
- </dbx-icon-tile>
15679
- <div class="dbx-step-block-content dbx-flex-fill-0">
15680
- @if (headerSignal()) {
15681
- <div class="dbx-step-block-header">
15682
- <span class="dbx-step-block-header-label">{{ headerSignal() }}</span>
15683
- <ng-content select="[header]"></ng-content>
15684
- </div>
15685
- }
15686
- @if (hintSignal()) {
15687
- <span class="dbx-step-block-hint">{{ hintSignal() }}</span>
15688
- }
15689
- <ng-content></ng-content>
15690
- </div>
15691
- `, isInline: true, dependencies: [{ kind: "component", type: DbxIconTileComponent, selector: "dbx-icon-tile", inputs: ["icon", "round"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange", "dbxColorToneChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15624
+ /**
15625
+ * The effective color on the host {@link DbxColorDirective} — either pushed from {@link colorSignal} or bound
15626
+ * directly via `[dbxColor]`. Drives the chip's tone/tonal handling.
15627
+ */
15628
+ effectiveColorSignal = computed(() => this._dbxColorDirective.dbxColor(), ...(ngDevMode ? [{ debugName: "effectiveColorSignal" }] : /* istanbul ignore next */ []));
15629
+ toneSignal = computed(() => {
15630
+ const display = this.display();
15631
+ return this.tone() ?? display?.tone ?? this._dbxColorDirective.effectiveToneSignal() ?? DEFAULT_DBX_CHIP_TONE;
15632
+ }, ...(ngDevMode ? [{ debugName: "toneSignal" }] : /* istanbul ignore next */ []));
15633
+ styleSignal = computed(() => {
15634
+ const display = this.display();
15635
+ const small = this.small() ?? display?.small;
15636
+ const block = this.block() ?? display?.block;
15637
+ let style = small ? 'dbx-chip-small' : '';
15638
+ if (block) {
15639
+ style = style + ' dbx-chip-block';
15640
+ }
15641
+ return style;
15642
+ }, ...(ngDevMode ? [{ debugName: "styleSignal" }] : /* istanbul ignore next */ []));
15643
+ /**
15644
+ * Sets `--dbx-color-bg-tone` on the host to control the background opacity of the painted chip surface.
15645
+ * Only applied when a color is set.
15646
+ */
15647
+ bgToneStyleSignal = computed(() => {
15648
+ const tone = this.toneSignal();
15649
+ const color = this.effectiveColorSignal();
15650
+ if (color) {
15651
+ return `${tone}%`;
15652
+ }
15653
+ return null;
15654
+ }, ...(ngDevMode ? [{ debugName: "bgToneStyleSignal" }] : /* istanbul ignore next */ []));
15655
+ /**
15656
+ * Whether tonal mode is active (color is set and tone < 100). Adds the `dbx-color-tonal`
15657
+ * CSS class which overrides text color to the vibrant theme color via CSS rather than
15658
+ * an inline style binding (which would conflict with `[ngStyle]`).
15659
+ */
15660
+ isTonalSignal = computed(() => {
15661
+ const tone = this.toneSignal();
15662
+ const color = this.effectiveColorSignal();
15663
+ return Boolean(color) && tone < 100;
15664
+ }, ...(ngDevMode ? [{ debugName: "isTonalSignal" }] : /* istanbul ignore next */ []));
15665
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15666
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxChipDirective, isStandalone: true, selector: "dbx-chip", inputs: { small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "styleSignal()", "class.dbx-color-tonal": "isTonalSignal()", "style.--dbx-color-bg-tone": "bgToneStyleSignal()" }, classAttribute: "dbx-chip" }, hostDirectives: [{ directive: DbxColorDirective }], ngImport: i0 });
15692
15667
  }
15693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxStepBlockComponent, decorators: [{
15694
- type: Component,
15668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipDirective, decorators: [{
15669
+ type: Directive,
15695
15670
  args: [{
15696
- selector: 'dbx-step-block',
15697
- template: `
15698
- <dbx-icon-tile class="dbx-step-block-badge" [icon]="iconSignal()" [dbxColor]="colorSignal()">
15699
- @if (!iconSignal()) {
15700
- {{ stepSignal() }}
15701
- }
15702
- </dbx-icon-tile>
15703
- <div class="dbx-step-block-content dbx-flex-fill-0">
15704
- @if (headerSignal()) {
15705
- <div class="dbx-step-block-header">
15706
- <span class="dbx-step-block-header-label">{{ headerSignal() }}</span>
15707
- <ng-content select="[header]"></ng-content>
15708
- </div>
15709
- }
15710
- @if (hintSignal()) {
15711
- <span class="dbx-step-block-hint">{{ hintSignal() }}</span>
15712
- }
15713
- <ng-content></ng-content>
15714
- </div>
15715
- `,
15671
+ // eslint-disable-next-line @angular-eslint/directive-selector
15672
+ selector: 'dbx-chip',
15716
15673
  host: {
15717
- class: 'dbx-step-block d-block',
15718
- '[class.dbx-step-block-center]': 'centerSignal()'
15674
+ class: 'dbx-chip',
15675
+ '[class]': 'styleSignal()',
15676
+ '[class.dbx-color-tonal]': 'isTonalSignal()',
15677
+ '[style.--dbx-color-bg-tone]': 'bgToneStyleSignal()'
15719
15678
  },
15720
- imports: [DbxIconTileComponent, DbxColorDirective],
15721
- standalone: true,
15722
- changeDetection: ChangeDetectionStrategy.OnPush
15679
+ hostDirectives: [DbxColorDirective],
15680
+ standalone: true
15723
15681
  }]
15724
- }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], center: [{ type: i0.Input, args: [{ isSignal: true, alias: "center", required: false }] }] } });
15682
+ }], ctorParameters: () => [], propDecorators: { small: [{ type: i0.Input, args: [{ isSignal: true, alias: "small", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }] } });
15725
15683
 
15726
15684
  /**
15727
- * Adds inline spacing sized for icons, typically used to align text that sits next to icon-bearing siblings.
15685
+ * Renders a row of colored chips from an array of {@link DbxChipDisplay} items.
15686
+ *
15687
+ * Uses {@link DbxChipDirective} internally with `dbx-chip-spacer` class for spacing.
15688
+ *
15689
+ * @dbxWebComponent
15690
+ * @dbxWebSlug chip-list
15691
+ * @dbxWebCategory text
15692
+ * @dbxWebRelated chip
15693
+ * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
15694
+ * @dbxWebMinimalExample ```html
15695
+ * <dbx-chip-list></dbx-chip-list>
15696
+ * ```
15728
15697
  *
15729
15698
  * @example
15730
15699
  * ```html
15731
- * <dbx-icon-spacer></dbx-icon-spacer>
15732
- * <span>Text aligned with icon spacing</span>
15700
+ * <dbx-chip-list>
15701
+ * <dbx-chip text="Tag1"></dbx-chip>
15702
+ * <dbx-chip text="Tag2"></dbx-chip>
15703
+ * </dbx-chip-list>
15733
15704
  * ```
15734
15705
  */
15735
- class DbxIconSpacerDirective {
15736
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconSpacerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15737
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: DbxIconSpacerDirective, isStandalone: true, selector: "dbx-icon-spacer,[dbxIconSpacer]", host: { classAttribute: "dbx-icon-spacer d-inline" }, ngImport: i0 });
15706
+ class DbxChipListComponent {
15707
+ chips = input(...(ngDevMode ? [undefined, { debugName: "chips" }] : /* istanbul ignore next */ []));
15708
+ small = input(...(ngDevMode ? [undefined, { debugName: "small" }] : /* istanbul ignore next */ []));
15709
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15710
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxChipListComponent, isStandalone: true, selector: "dbx-chip-list", inputs: { chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: false, transformFunction: null }, small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"inline\"" }, classAttribute: "dbx-chip-list" }, ngImport: i0, template: `
15711
+ @for (chip of chips(); track chip.key ?? chip.label) {
15712
+ <dbx-chip class="dbx-chip-spacer" [display]="chip" [small]="small()">{{ chip.label }}</dbx-chip>
15713
+ }
15714
+ `, isInline: true, dependencies: [{ kind: "directive", type: DbxChipDirective, selector: "dbx-chip", inputs: ["small", "block", "color", "display", "tone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15738
15715
  }
15739
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxIconSpacerDirective, decorators: [{
15740
- type: Directive,
15716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipListComponent, decorators: [{
15717
+ type: Component,
15741
15718
  args: [{
15742
- selector: 'dbx-icon-spacer,[dbxIconSpacer]',
15719
+ selector: 'dbx-chip-list',
15720
+ template: `
15721
+ @for (chip of chips(); track chip.key ?? chip.label) {
15722
+ <dbx-chip class="dbx-chip-spacer" [display]="chip" [small]="small()">{{ chip.label }}</dbx-chip>
15723
+ }
15724
+ `,
15743
15725
  host: {
15744
- class: 'dbx-icon-spacer d-inline'
15726
+ class: 'dbx-chip-list',
15727
+ '[style.display]': '"inline"'
15745
15728
  },
15746
- standalone: true
15729
+ imports: [DbxChipDirective],
15730
+ standalone: true,
15731
+ changeDetection: ChangeDetectionStrategy.OnPush
15747
15732
  }]
15748
- }] });
15749
-
15750
- /**
15751
- * The default linkify string type.
15752
- */
15753
- const DEFAULT_DBX_LINKIFY_STRING_TYPE = 'DEFAULT';
15733
+ }], propDecorators: { chips: [{ type: i0.Input, args: [{ isSignal: true, alias: "chips", required: false }] }], small: [{ type: i0.Input, args: [{ isSignal: true, alias: "small", required: false }] }] } });
15754
15734
 
15755
15735
  /**
15756
- * Configuration provided in the root module for configuring entries.
15757
- */
15758
- class DbxLinkifyServiceConfig {
15759
- }
15760
- /**
15761
- * Service used to register and retrieve linkify configurations by type.
15762
- *
15763
- * It has a default entry that is used when no type is specified or the requested type is not found.
15764
- * By default, the default entry uses `{ defaultProtocol: 'https', target: { url: '_blank' } }`.
15736
+ * Renders a read-only list of Material chip options from an array of {@link TextChip} objects.
15765
15737
  *
15766
- * Apps can override the default and register additional types via DbxLinkifyServiceConfig
15767
- * (provided by provideDbxLinkify()) or by calling register()/registerDefaultEntry() directly.
15738
+ * @example
15739
+ * ```html
15740
+ * <dbx-text-chips [chips]="[{ label: 'Active', value: 'active', selected: true, color: 'primary' }]"></dbx-text-chips>
15741
+ * ```
15768
15742
  */
15769
- class DbxLinkifyService {
15770
- _entries = new Map();
15771
- constructor() {
15772
- const initialConfig = inject(DbxLinkifyServiceConfig, { optional: true });
15773
- if (initialConfig?.defaultEntry) {
15774
- this.registerDefaultEntry(initialConfig.defaultEntry);
15775
- }
15776
- if (initialConfig?.entries) {
15777
- this.register(initialConfig.entries);
15778
- }
15779
- // If no default was provided, register inline defaults
15780
- if (!this._entries.has(DEFAULT_DBX_LINKIFY_STRING_TYPE)) {
15781
- this.registerDefaultEntry({ options: { defaultProtocol: 'https', target: { url: '_blank' } } });
15782
- }
15783
- }
15743
+ class DbxTextChipsComponent {
15744
+ _colorService = inject(DbxColorService, { optional: true });
15745
+ defaultSelection = input(...(ngDevMode ? [undefined, { debugName: "defaultSelection" }] : /* istanbul ignore next */ []));
15746
+ chips = input(...(ngDevMode ? [undefined, { debugName: "chips" }] : /* istanbul ignore next */ []));
15784
15747
  /**
15785
- * Registers the default entry.
15748
+ * Returns the themed background CSS class for a chip's color.
15786
15749
  *
15787
- * @param entry - Entry without the type field.
15750
+ * @param chip - The chip to get the color class for.
15751
+ * @returns The CSS class name for the chip's background color, or empty string if no color.
15788
15752
  */
15789
- registerDefaultEntry(entry) {
15790
- this._entries.set(DEFAULT_DBX_LINKIFY_STRING_TYPE, {
15791
- ...entry,
15792
- type: DEFAULT_DBX_LINKIFY_STRING_TYPE
15793
- });
15753
+ chipColorClass(chip) {
15754
+ return chip.color ? dbxColorBackground(chip.color) : '';
15794
15755
  }
15795
15756
  /**
15796
- * Registers one or more entries by type.
15757
+ * Returns the inline `--dbx-bg-color-current` value for a chip when its color is a {@link DbxColorConfig}; otherwise null.
15797
15758
  *
15798
- * @param entries - One or more entries to register.
15799
- * @param override - Whether to override existing entries (default: true)
15759
+ * @param chip - The chip.
15760
+ * @returns The background color CSS value, or null for named-color strings.
15800
15761
  */
15801
- register(entries, override = true) {
15802
- useIterableOrValue(entries, (entry) => {
15803
- if (override || !this._entries.has(entry.type)) {
15804
- this._entries.set(entry.type, entry);
15805
- }
15806
- });
15762
+ chipBgColorStyle(chip) {
15763
+ return this._expandedChipConfig(chip)?.color ?? null;
15807
15764
  }
15808
- // MARK: Get
15809
15765
  /**
15810
- * Returns the default entry.
15766
+ * Returns the inline `--dbx-color-current` value for a chip when its color is a {@link DbxColorConfig}; otherwise null.
15811
15767
  *
15812
- * @returns The default linkify service entry, or undefined if none is registered.
15768
+ * @param chip - The chip.
15769
+ * @returns The contrast color CSS value, or null for named-color strings.
15813
15770
  */
15814
- getDefaultEntry() {
15815
- return this._entries.get(DEFAULT_DBX_LINKIFY_STRING_TYPE);
15771
+ chipColorStyle(chip) {
15772
+ return this._expandedChipConfig(chip)?.contrast ?? null;
15816
15773
  }
15817
- /**
15818
- * Returns the entry for the given type.
15819
- *
15820
- * @param type - The linkify string type to look up.
15821
- * @returns The registered entry for the given type, or undefined if not found.
15822
- */
15823
- getEntryRegisteredForType(type) {
15824
- return this._entries.get(type);
15774
+ _expandedChipConfig(chip) {
15775
+ const value = chip.color;
15776
+ return isDbxColorConfig(value) ? (this._colorService?.expandColorConfig(value) ?? value) : undefined;
15825
15777
  }
15826
- /**
15827
- * Returns the entry for the given type, or the default type if there is no entry registered or the input type is null/undefined.
15828
- *
15829
- * @param type - The linkify string type to look up, or nullish to retrieve the default entry.
15830
- * @returns The matching entry, or the default entry if the type is not provided.
15831
- */
15832
- getEntry(type) {
15833
- return type ? this._entries.get(type) : this.getDefaultEntry();
15778
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15779
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxTextChipsComponent, isStandalone: true, selector: "dbx-text-chips", inputs: { defaultSelection: { classPropertyName: "defaultSelection", publicName: "defaultSelection", isSignal: true, isRequired: false, transformFunction: null }, chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
15780
+ @if (chips()) {
15781
+ <mat-chip-listbox class="dbx-text-chips-listbox">
15782
+ @for (chip of chips(); track chip.key ?? chip.label) {
15783
+ <mat-chip-option [selected]="chip.selected ?? defaultSelection()" [class]="chipColorClass(chip)" [style.--dbx-bg-color-current]="chipBgColorStyle(chip)" [style.--dbx-color-current]="chipColorStyle(chip)" [matTooltip]="chip.tooltip!" matTooltipPosition="above">
15784
+ {{ chip.label }}
15785
+ </mat-chip-option>
15786
+ }
15787
+ </mat-chip-listbox>
15834
15788
  }
15835
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
15836
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyService, providedIn: 'root' // does not need to be strictly provided/configured. Works out of the box.
15837
- });
15789
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1$8.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i1$8.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15838
15790
  }
15839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyService, decorators: [{
15840
- type: Injectable,
15791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextChipsComponent, decorators: [{
15792
+ type: Component,
15793
+ args: [{
15794
+ selector: 'dbx-text-chips',
15795
+ template: `
15796
+ @if (chips()) {
15797
+ <mat-chip-listbox class="dbx-text-chips-listbox">
15798
+ @for (chip of chips(); track chip.key ?? chip.label) {
15799
+ <mat-chip-option [selected]="chip.selected ?? defaultSelection()" [class]="chipColorClass(chip)" [style.--dbx-bg-color-current]="chipBgColorStyle(chip)" [style.--dbx-color-current]="chipColorStyle(chip)" [matTooltip]="chip.tooltip!" matTooltipPosition="above">
15800
+ {{ chip.label }}
15801
+ </mat-chip-option>
15802
+ }
15803
+ </mat-chip-listbox>
15804
+ }
15805
+ `,
15806
+ imports: [MatChipsModule, MatTooltipModule],
15807
+ standalone: true,
15808
+ changeDetection: ChangeDetectionStrategy.OnPush
15809
+ }]
15810
+ }], propDecorators: { defaultSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSelection", required: false }] }], chips: [{ type: i0.Input, args: [{ isSignal: true, alias: "chips", required: false }] }] } });
15811
+
15812
+ /**
15813
+ * Displays a number value with an optional limit, automatically applying color-coded
15814
+ * theming based on the ratio of value to limit (ok, notice, warn).
15815
+ *
15816
+ * @example
15817
+ * ```html
15818
+ * <dbx-number-with-limit [number]="{ value: 7, limit: 10 }"></dbx-number-with-limit>
15819
+ * <dbx-number-with-limit [number]="{ value: 3, limit: 5, prefix: '$' }" [rounded]="true"></dbx-number-with-limit>
15820
+ * ```
15821
+ */
15822
+ class DbxNumberWithLimitComponent {
15823
+ number = input(...(ngDevMode ? [undefined, { debugName: "number" }] : /* istanbul ignore next */ []));
15824
+ rounded = input(...(ngDevMode ? [undefined, { debugName: "rounded" }] : /* istanbul ignore next */ []));
15825
+ valueSignal = computed(() => {
15826
+ const number = this.number();
15827
+ return number?.formatNumber ? number.formatNumber(number.value) : number?.value;
15828
+ }, ...(ngDevMode ? [{ debugName: "valueSignal" }] : /* istanbul ignore next */ []));
15829
+ limitSignal = computed(() => {
15830
+ const number = this.number();
15831
+ return number?.limit == null ? undefined : number?.formatNumber ? number.formatNumber(number.limit) : number?.limit;
15832
+ }, ...(ngDevMode ? [{ debugName: "limitSignal" }] : /* istanbul ignore next */ []));
15833
+ hasLimitSignal = computed(() => {
15834
+ return this.number()?.limit != null;
15835
+ }, ...(ngDevMode ? [{ debugName: "hasLimitSignal" }] : /* istanbul ignore next */ []));
15836
+ prefixSignal = computed(() => {
15837
+ return this.number()?.prefix;
15838
+ }, ...(ngDevMode ? [{ debugName: "prefixSignal" }] : /* istanbul ignore next */ []));
15839
+ suffixSignal = computed(() => {
15840
+ return this.number()?.suffix;
15841
+ }, ...(ngDevMode ? [{ debugName: "suffixSignal" }] : /* istanbul ignore next */ []));
15842
+ colorSignal = computed(() => {
15843
+ const number = this.number();
15844
+ let color;
15845
+ if (number != null) {
15846
+ const { value, limit } = number;
15847
+ if (limit != null) {
15848
+ if (value > limit) {
15849
+ color = 'warn';
15850
+ }
15851
+ else if (value === limit) {
15852
+ color = 'notice';
15853
+ }
15854
+ else {
15855
+ const ratio = limit === 0 ? 1 : value / limit;
15856
+ if (ratio > 0.8) {
15857
+ color = 'notice';
15858
+ }
15859
+ else {
15860
+ color = 'ok';
15861
+ }
15862
+ }
15863
+ }
15864
+ }
15865
+ return color;
15866
+ }, ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
15867
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxNumberWithLimitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15868
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxNumberWithLimitComponent, isStandalone: true, selector: "dbx-number-with-limit", inputs: { number: { classPropertyName: "number", publicName: "number", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
15869
+ <span class="dbx-number-with-limit" [class]="{ 'dbx-number-with-limit-rounded': rounded() }" [dbxColor]="colorSignal()">
15870
+ <span>{{ prefixSignal() }}</span>
15871
+ <span>{{ valueSignal() }}</span>
15872
+ @if (hasLimitSignal()) {
15873
+ <span class="dbx-number-with-limit-divider">/</span>
15874
+ <span>{{ limitSignal() }}</span>
15875
+ }
15876
+ <span>{{ suffixSignal() }}</span>
15877
+ </span>
15878
+ `, isInline: true, dependencies: [{ kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange", "dbxColorToneChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15879
+ }
15880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxNumberWithLimitComponent, decorators: [{
15881
+ type: Component,
15841
15882
  args: [{
15842
- providedIn: 'root' // does not need to be strictly provided/configured. Works out of the box.
15883
+ selector: 'dbx-number-with-limit',
15884
+ template: `
15885
+ <span class="dbx-number-with-limit" [class]="{ 'dbx-number-with-limit-rounded': rounded() }" [dbxColor]="colorSignal()">
15886
+ <span>{{ prefixSignal() }}</span>
15887
+ <span>{{ valueSignal() }}</span>
15888
+ @if (hasLimitSignal()) {
15889
+ <span class="dbx-number-with-limit-divider">/</span>
15890
+ <span>{{ limitSignal() }}</span>
15891
+ }
15892
+ <span>{{ suffixSignal() }}</span>
15893
+ </span>
15894
+ `,
15895
+ imports: [DbxColorDirective],
15896
+ standalone: true,
15897
+ changeDetection: ChangeDetectionStrategy.OnPush
15843
15898
  }]
15844
- }], ctorParameters: () => [] });
15899
+ }], propDecorators: { number: [{ type: i0.Input, args: [{ isSignal: true, alias: "number", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }] } });
15845
15900
 
15846
15901
  /**
15847
- * Converts URLs and email addresses in plain text into clickable HTML links using the linkify-string library.
15902
+ * Creates a {@link CopyToClipboardFunction} that retries the copy operation until success or timeout.
15848
15903
  *
15849
- * Options are resolved from {@link DbxLinkifyService} by type, then merged with any inline config overrides.
15904
+ * @param clipboard - The Angular CDK Clipboard instance.
15905
+ * @param config - Optional timeout and retry settings.
15906
+ * @returns Copies text to the clipboard.
15850
15907
  *
15851
15908
  * @example
15852
- * ```html
15853
- * <dbx-linkify [text]="'Visit https://example.com for more info.'"></dbx-linkify>
15854
- * <dbx-linkify [text]="description" [type]="'product-description'"></dbx-linkify>
15909
+ * ```ts
15910
+ * const copy = copyToClipboardFunction(clipboard, { copyTimeoutSeconds: 10 });
15911
+ * const success = await copy('some text');
15855
15912
  * ```
15913
+ *
15914
+ * @__NO_SIDE_EFFECTS__
15856
15915
  */
15857
- class DbxLinkifyComponent {
15858
- sanitizer = inject(DomSanitizer);
15859
- dbxLinkifyService = inject(DbxLinkifyService);
15860
- text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
15861
- type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : /* istanbul ignore next */ []));
15862
- config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
15863
- linkifiedTextSignal = computed(() => {
15864
- const text = this.text();
15865
- const type = this.type();
15866
- const config = this.config();
15867
- // Resolve base options from the service
15868
- const entry = this.dbxLinkifyService.getEntry(type ?? config?.type);
15869
- const baseOptions = entry?.options;
15870
- // Merge base options with inline options (inline overrides base)
15871
- const options = mergeObjects([baseOptions, config?.options]);
15872
- return text ? linkifyStr(text, options) : undefined;
15873
- }, ...(ngDevMode ? [{ debugName: "linkifiedTextSignal" }] : /* istanbul ignore next */ []));
15874
- linkifiedBodySignal = computed(() => {
15875
- const linkifiedText = this.linkifiedTextSignal();
15876
- return linkifiedText ? this.sanitizer.bypassSecurityTrustHtml(linkifiedText) : undefined;
15877
- }, ...(ngDevMode ? [{ debugName: "linkifiedBodySignal" }] : /* istanbul ignore next */ []));
15878
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15879
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxLinkifyComponent, isStandalone: true, selector: "dbx-linkify", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-i dbx-linkify" }, ngImport: i0, template: `
15880
- <span [innerHTML]="linkifiedBodySignal()"></span>
15881
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
15916
+ function copyToClipboardFunction(clipboard, config) {
15917
+ const copyTimeoutSeconds = config?.copyTimeoutSeconds ?? 15;
15918
+ const delayBetweenCopyAttempts = config?.delayBetweenCopyAttempts ?? MS_IN_SECOND;
15919
+ const onCopyResult = config?.onCopyResult;
15920
+ const copyFunction = ((content) => {
15921
+ return new Promise((resolve, reject) => {
15922
+ const pending = clipboard.beginCopy(content);
15923
+ const copyTimeoutAt = addMilliseconds(new Date(), copyTimeoutSeconds * MS_IN_SECOND);
15924
+ const attempt = () => {
15925
+ const copyIsFinished = pending.copy();
15926
+ if (!copyIsFinished && !isPast(copyTimeoutAt)) {
15927
+ setTimeout(attempt, delayBetweenCopyAttempts);
15928
+ }
15929
+ else {
15930
+ // Destroy the pending copy
15931
+ pending.destroy();
15932
+ if (copyIsFinished) {
15933
+ resolve(true);
15934
+ onCopyResult?.(true, content);
15935
+ }
15936
+ else {
15937
+ reject(new Error('Failed to copy content to clipboard'));
15938
+ onCopyResult?.(false, content);
15939
+ }
15940
+ }
15941
+ };
15942
+ attempt();
15943
+ });
15944
+ });
15945
+ copyFunction._clipboard = clipboard;
15946
+ return copyFunction;
15882
15947
  }
15883
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLinkifyComponent, decorators: [{
15884
- type: Component,
15885
- args: [{
15886
- selector: 'dbx-linkify',
15887
- template: `
15888
- <span [innerHTML]="linkifiedBodySignal()"></span>
15889
- `,
15890
- host: {
15891
- class: 'dbx-i dbx-linkify'
15892
- },
15893
- changeDetection: ChangeDetectionStrategy.OnPush,
15894
- standalone: true
15895
- }]
15896
- }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
15897
-
15898
15948
  /**
15899
- * Creates environment-level providers for configuring {@link DbxLinkifyService} with a custom factory.
15949
+ * Injects a {@link CopyToClipboardFunction} using Angular's dependency injection.
15900
15950
  *
15901
- * @param config - Configuration containing the factory function for creating the linkify service config.
15902
- * @returns Environment providers that register the DbxLinkifyServiceConfig.
15951
+ * Must be called in an Angular injection context.
15952
+ *
15953
+ * @param config - Optional timeout and retry settings.
15954
+ * @returns The clipboard copy function.
15903
15955
  *
15904
15956
  * @example
15905
15957
  * ```ts
15906
- * provideDbxLinkify({
15907
- * dbxLinkifyServiceConfigFactory: (injector) => ({
15908
- * defaultEntry: { options: { defaultProtocol: 'https' } },
15909
- * entries: [{ type: 'bio', options: { target: { url: '_blank' } } }]
15910
- * })
15958
+ * const copy = injectCopyToClipboardFunction();
15959
+ * await copy('copied text');
15960
+ * ```
15961
+ *
15962
+ * @__NO_SIDE_EFFECTS__
15963
+ */
15964
+ function injectCopyToClipboardFunction(config) {
15965
+ return copyToClipboardFunction(inject(Clipboard), config);
15966
+ }
15967
+ /**
15968
+ * Injects a {@link CopyToClipboardFunctionWithSnackbarMessage} that copies text to the clipboard
15969
+ * and shows a Material snackbar with a success or failure message.
15970
+ *
15971
+ * Must be called in an Angular injection context.
15972
+ *
15973
+ * @param config - Optional configuration for copy behavior and snackbar messages.
15974
+ * @returns Clipboard copy function with snackbar notification support.
15975
+ *
15976
+ * @example
15977
+ * ```ts
15978
+ * const copy = injectCopyToClipboardFunctionWithSnackbarMessage({
15979
+ * successMessage: 'Link copied!',
15980
+ * snackbarDuration: 2000
15911
15981
  * });
15982
+ * await copy('https://example.com');
15912
15983
  * ```
15913
15984
  */
15914
- function provideDbxLinkify(config) {
15915
- const { dbxLinkifyServiceConfigFactory } = config;
15916
- const providers = [
15917
- {
15918
- provide: DbxLinkifyServiceConfig,
15919
- useFactory: dbxLinkifyServiceConfigFactory
15985
+ function injectCopyToClipboardFunctionWithSnackbarMessage(config) {
15986
+ // TODO: Add service for configuring global defaults for snackbar messages
15987
+ const snackbar = inject(MatSnackBar);
15988
+ const DEFAULT_SUCCESS_MESSAGE = 'Copied to clipboard';
15989
+ const DEFAULT_FAILURE_MESSAGE = 'Content failed to copy...';
15990
+ const DEFAULT_SNACKBAR_DURATION = 3 * MS_IN_SECOND;
15991
+ let snackbarMessagesEnabled = true;
15992
+ let successMessage = DEFAULT_SUCCESS_MESSAGE;
15993
+ let failureMessage = DEFAULT_FAILURE_MESSAGE;
15994
+ let snackbarDuration = DEFAULT_SNACKBAR_DURATION;
15995
+ const _setSnackbarMessagesConfig = (config) => {
15996
+ if (config != null) {
15997
+ const { successMessage: inputSuccessMessage, failureMessage: inputFailureMessage, snackbarDuration: inputSnackbarDuration } = config;
15998
+ successMessage = inputSuccessMessage ?? successMessage ?? DEFAULT_SUCCESS_MESSAGE;
15999
+ failureMessage = inputFailureMessage ?? failureMessage ?? DEFAULT_FAILURE_MESSAGE;
16000
+ snackbarDuration = inputSnackbarDuration ?? snackbarDuration ?? DEFAULT_SNACKBAR_DURATION;
15920
16001
  }
15921
- ];
15922
- return makeEnvironmentProviders(providers);
16002
+ };
16003
+ if (config) {
16004
+ _setSnackbarMessagesConfig(config);
16005
+ }
16006
+ const onCopyResult = (success, content) => {
16007
+ config?.onCopyResult?.(success, content);
16008
+ if (snackbarMessagesEnabled) {
16009
+ const message = success ? getValueFromGetter(successMessage, content) : getValueFromGetter(failureMessage, content);
16010
+ snackbar.open(message, undefined, { duration: snackbarDuration });
16011
+ }
16012
+ };
16013
+ const result = copyToClipboardFunction(inject(Clipboard), { ...config, onCopyResult });
16014
+ result.setSnackbarMessagesConfig = _setSnackbarMessagesConfig;
16015
+ result.setSnackbarMessagesEnabled = (enabled) => {
16016
+ snackbarMessagesEnabled = enabled;
16017
+ };
16018
+ return result;
15923
16019
  }
15924
16020
 
15925
16021
  /**
15926
- * Default background tone percentage for tonal chip coloring.
16022
+ * Abstract base class for clipboard directives that provides copy-to-clipboard
16023
+ * functionality with configurable snackbar notifications.
16024
+ *
16025
+ * Subclasses should call `this._copyToClipboard(text)` to trigger a copy operation.
15927
16026
  */
15928
- const DEFAULT_DBX_CHIP_TONE = 18;
16027
+ class AbstractDbxClipboardDirective {
16028
+ _copyToClipboard = injectCopyToClipboardFunctionWithSnackbarMessage();
16029
+ clipboardSnackbarMessagesConfig = input(undefined, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesConfig" }] : /* istanbul ignore next */ []));
16030
+ clipboardSnackbarMessagesEnabled = input(true, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesEnabled" }] : /* istanbul ignore next */ []));
16031
+ _configEffect = effect(() => {
16032
+ this._copyToClipboard.setSnackbarMessagesConfig(this.clipboardSnackbarMessagesConfig());
16033
+ }, ...(ngDevMode ? [{ debugName: "_configEffect" }] : /* istanbul ignore next */ []));
16034
+ _enabledEffect = effect(() => {
16035
+ this._copyToClipboard.setSnackbarMessagesEnabled(this.clipboardSnackbarMessagesEnabled());
16036
+ }, ...(ngDevMode ? [{ debugName: "_enabledEffect" }] : /* istanbul ignore next */ []));
16037
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxClipboardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
16038
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: AbstractDbxClipboardDirective, isStandalone: true, inputs: { clipboardSnackbarMessagesConfig: { classPropertyName: "clipboardSnackbarMessagesConfig", publicName: "clipboardSnackbarMessagesConfig", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesEnabled: { classPropertyName: "clipboardSnackbarMessagesEnabled", publicName: "clipboardSnackbarMessagesEnabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
16039
+ }
16040
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxClipboardDirective, decorators: [{
16041
+ type: Directive
16042
+ }], propDecorators: { clipboardSnackbarMessagesConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesConfig", required: false }] }], clipboardSnackbarMessagesEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesEnabled", required: false }] }] } });
16043
+
15929
16044
  /**
15930
- * Renders a styled chip element with optional small, block, and color modes.
15931
- *
15932
- * Hosts a {@link DbxColorDirective} that provides the color tokens + `.dbx-color` marker the chip's
15933
- * `.dbx-chip.dbx-color` SCSS paints from. The color can be supplied either through the {@link color}/{@link display}
15934
- * inputs (pushed into the host directive) or by binding `[dbxColor]` directly; the chip's tone handling (default
15935
- * {@link DEFAULT_DBX_CHIP_TONE} → tonal text) applies to both.
16045
+ * Makes the host element clickable to copy text to the clipboard.
15936
16046
  *
15937
- * @dbxWebComponent
15938
- * @dbxWebSlug chip
15939
- * @dbxWebCategory text
15940
- * @dbxWebRelated chip-list
15941
- * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
15942
- * @dbxWebMinimalExample ```html
15943
- * <dbx-chip text="Tag"></dbx-chip>
15944
- * ```
16047
+ * If no explicit `dbxClickToCopyText` value is provided, copies the element's text content.
16048
+ * Optionally highlights the element to indicate it is copyable.
15945
16049
  *
15946
16050
  * @example
15947
16051
  * ```html
15948
- * <dbx-chip text="Active" icon="check" color="primary"></dbx-chip>
15949
- * ```
15950
- */
15951
- class DbxChipDirective {
15952
- _dbxColorDirective = inject(DbxColorDirective, { self: true });
15953
- constructor() {
15954
- let originalColor;
15955
- let overridden = false;
15956
- // Pushes the chip's resolved color (color input > display config) into the host DbxColorDirective so it stays the
15957
- // single token provider on the element. The directive's own value is restored once the chip stops supplying a color.
15958
- effect(() => {
15959
- const color = this.colorSignal();
15960
- if (color != null) {
15961
- if (!overridden) {
15962
- originalColor = untracked(this._dbxColorDirective.dbxColor);
15963
- overridden = true;
15964
- }
15965
- this._dbxColorDirective.dbxColor.set(color);
15966
- }
15967
- else if (overridden) {
15968
- this._dbxColorDirective.dbxColor.set(originalColor);
15969
- overridden = false;
15970
- }
15971
- });
15972
- }
15973
- small = input(...(ngDevMode ? [undefined, { debugName: "small" }] : /* istanbul ignore next */ []));
15974
- block = input(...(ngDevMode ? [undefined, { debugName: "block" }] : /* istanbul ignore next */ []));
15975
- /**
15976
- * Theme color or {@link DbxColorConfig} applied to the chip, pushed into the host {@link DbxColorDirective}.
15977
- *
15978
- * When {@link display} is also set, its color is used as a fallback.
15979
- */
15980
- color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
16052
+ * <span [dbxClickToCopyText]="'Copy this value'">Copy this value</span>
16053
+ * <span dbxClickToCopyText [highlighted]="false">Subtle copy</span>
16054
+ * ```
16055
+ */
16056
+ class DbxClickToCopyTextDirective extends AbstractDbxClipboardDirective {
16057
+ copyTextFromElement = model(...(ngDevMode ? [undefined, { debugName: "copyTextFromElement" }] : /* istanbul ignore next */ []));
15981
16058
  /**
15982
- * Display configuration that provides color (and optionally label/value metadata).
15983
- *
15984
- * The color from `display` is used as a fallback when `color` is not explicitly set.
16059
+ * If the input is null, then copy from the element's text content.
15985
16060
  */
15986
- display = input(...(ngDevMode ? [undefined, { debugName: "display" }] : /* istanbul ignore next */ []));
16061
+ copyText = input(undefined, { ...(ngDevMode ? { debugName: "copyText" } : /* istanbul ignore next */ {}), alias: 'dbxClickToCopyText' });
15987
16062
  /**
15988
- * Background tone level for tonal appearance. Defaults to {@link DEFAULT_DBX_CHIP_TONE}.
15989
- *
15990
- * Set to `100` for fully opaque background.
16063
+ * If true, the click events will be ignored.
15991
16064
  */
15992
- tone = input(...(ngDevMode ? [undefined, { debugName: "tone" }] : /* istanbul ignore next */ []));
15993
- colorSignal = computed(() => {
15994
- const display = this.display();
15995
- return this.color() ?? display?.color;
15996
- }, ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
16065
+ disableCopy = input(false, ...(ngDevMode ? [{ debugName: "disableCopy" }] : /* istanbul ignore next */ []));
15997
16066
  /**
15998
- * The effective color on the host {@link DbxColorDirective} — either pushed from {@link colorSignal} or bound
15999
- * directly via `[dbxColor]`. Drives the chip's tone/tonal handling.
16067
+ * Highlight the text visually.
16000
16068
  */
16001
- effectiveColorSignal = computed(() => this._dbxColorDirective.dbxColor(), ...(ngDevMode ? [{ debugName: "effectiveColorSignal" }] : /* istanbul ignore next */ []));
16002
- toneSignal = computed(() => {
16003
- const display = this.display();
16004
- return this.tone() ?? display?.tone ?? this._dbxColorDirective.effectiveToneSignal() ?? DEFAULT_DBX_CHIP_TONE;
16005
- }, ...(ngDevMode ? [{ debugName: "toneSignal" }] : /* istanbul ignore next */ []));
16006
- styleSignal = computed(() => {
16007
- const display = this.display();
16008
- const small = this.small() ?? display?.small;
16009
- const block = this.block() ?? display?.block;
16010
- let style = small ? 'dbx-chip-small' : '';
16011
- if (block) {
16012
- style = style + ' dbx-chip-block';
16069
+ highlighted = input(true, ...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
16070
+ handleClick(event) {
16071
+ const disabled = this.disableCopy();
16072
+ if (!disabled) {
16073
+ event.preventDefault();
16074
+ event.stopPropagation();
16075
+ const eventElement = event.currentTarget;
16076
+ this._copyText(eventElement);
16013
16077
  }
16014
- return style;
16015
- }, ...(ngDevMode ? [{ debugName: "styleSignal" }] : /* istanbul ignore next */ []));
16016
- /**
16017
- * Sets `--dbx-color-bg-tone` on the host to control the background opacity of the painted chip surface.
16018
- * Only applied when a color is set.
16019
- */
16020
- bgToneStyleSignal = computed(() => {
16021
- const tone = this.toneSignal();
16022
- const color = this.effectiveColorSignal();
16023
- if (color) {
16024
- return `${tone}%`;
16078
+ }
16079
+ _copyText(eventElement) {
16080
+ let copyText = this.copyText();
16081
+ // If the input is null, then copy from the element's text content.
16082
+ if (copyText !== null && !copyText) {
16083
+ const element = this.copyTextFromElement()?.nativeElement;
16084
+ copyText = (element ?? eventElement)?.textContent ?? undefined;
16025
16085
  }
16026
- return null;
16027
- }, ...(ngDevMode ? [{ debugName: "bgToneStyleSignal" }] : /* istanbul ignore next */ []));
16028
- /**
16029
- * Whether tonal mode is active (color is set and tone < 100). Adds the `dbx-color-tonal`
16030
- * CSS class which overrides text color to the vibrant theme color via CSS rather than
16031
- * an inline style binding (which would conflict with `[ngStyle]`).
16032
- */
16033
- isTonalSignal = computed(() => {
16034
- const tone = this.toneSignal();
16035
- const color = this.effectiveColorSignal();
16036
- return Boolean(color) && tone < 100;
16037
- }, ...(ngDevMode ? [{ debugName: "isTonalSignal" }] : /* istanbul ignore next */ []));
16038
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
16039
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxChipDirective, isStandalone: true, selector: "dbx-chip", inputs: { small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "styleSignal()", "class.dbx-color-tonal": "isTonalSignal()", "style.--dbx-color-bg-tone": "bgToneStyleSignal()" }, classAttribute: "dbx-chip" }, hostDirectives: [{ directive: DbxColorDirective }], ngImport: i0 });
16086
+ if (copyText) {
16087
+ void this._copyToClipboard(copyText);
16088
+ }
16089
+ return copyText;
16090
+ }
16091
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
16092
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxClickToCopyTextDirective, isStandalone: true, selector: "[dbxClickToCopyText]", inputs: { copyTextFromElement: { classPropertyName: "copyTextFromElement", publicName: "copyTextFromElement", isSignal: true, isRequired: false, transformFunction: null }, copyText: { classPropertyName: "copyText", publicName: "dbxClickToCopyText", isSignal: true, isRequired: false, transformFunction: null }, disableCopy: { classPropertyName: "disableCopy", publicName: "disableCopy", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copyTextFromElement: "copyTextFromElementChange" }, host: { listeners: { "click": "handleClick($event)" }, properties: { "class.dbx-click-to-copy-text-highlighted": "highlighted()" }, classAttribute: "dbx-click-to-copy-text" }, usesInheritance: true, ngImport: i0 });
16040
16093
  }
16041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipDirective, decorators: [{
16094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextDirective, decorators: [{
16042
16095
  type: Directive,
16043
16096
  args: [{
16044
- // eslint-disable-next-line @angular-eslint/directive-selector
16045
- selector: 'dbx-chip',
16097
+ selector: '[dbxClickToCopyText]',
16046
16098
  host: {
16047
- class: 'dbx-chip',
16048
- '[class]': 'styleSignal()',
16049
- '[class.dbx-color-tonal]': 'isTonalSignal()',
16050
- '[style.--dbx-color-bg-tone]': 'bgToneStyleSignal()'
16099
+ class: 'dbx-click-to-copy-text',
16100
+ '[class.dbx-click-to-copy-text-highlighted]': 'highlighted()'
16051
16101
  },
16052
- hostDirectives: [DbxColorDirective],
16053
16102
  standalone: true
16054
16103
  }]
16055
- }], ctorParameters: () => [], propDecorators: { small: [{ type: i0.Input, args: [{ isSignal: true, alias: "small", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }] } });
16104
+ }], propDecorators: { copyTextFromElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyTextFromElement", required: false }] }, { type: i0.Output, args: ["copyTextFromElementChange"] }], copyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxClickToCopyText", required: false }] }], disableCopy: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableCopy", required: false }] }], highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }], handleClick: [{
16105
+ type: HostListener,
16106
+ args: ['click', ['$event']]
16107
+ }] } });
16056
16108
 
16057
16109
  /**
16058
- * Renders a row of colored chips from an array of {@link DbxChipDisplay} items.
16110
+ * Wraps projected content with click-to-copy functionality and a copy icon button.
16059
16111
  *
16060
- * Uses {@link DbxChipDirective} internally with `dbx-chip-spacer` class for spacing.
16112
+ * Clicking the text or the icon copies the text to the clipboard and optionally shows a snackbar confirmation.
16061
16113
  *
16062
16114
  * @dbxWebComponent
16063
- * @dbxWebSlug chip-list
16115
+ * @dbxWebSlug click-to-copy-text
16064
16116
  * @dbxWebCategory text
16065
16117
  * @dbxWebRelated chip
16066
16118
  * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
16067
16119
  * @dbxWebMinimalExample ```html
16068
- * <dbx-chip-list></dbx-chip-list>
16120
+ * <dbx-click-to-copy-text [text]="value"></dbx-click-to-copy-text>
16069
16121
  * ```
16070
16122
  *
16071
16123
  * @example
16072
16124
  * ```html
16073
- * <dbx-chip-list>
16074
- * <dbx-chip text="Tag1"></dbx-chip>
16075
- * <dbx-chip text="Tag2"></dbx-chip>
16076
- * </dbx-chip-list>
16125
+ * <dbx-click-to-copy-text [text]="userId"></dbx-click-to-copy-text>
16077
16126
  * ```
16078
16127
  */
16079
- class DbxChipListComponent {
16080
- chips = input(...(ngDevMode ? [undefined, { debugName: "chips" }] : /* istanbul ignore next */ []));
16081
- small = input(...(ngDevMode ? [undefined, { debugName: "small" }] : /* istanbul ignore next */ []));
16082
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16083
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxChipListComponent, isStandalone: true, selector: "dbx-chip-list", inputs: { chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: false, transformFunction: null }, small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"inline\"" }, classAttribute: "dbx-chip-list" }, ngImport: i0, template: `
16084
- @for (chip of chips(); track chip.key ?? chip.label) {
16085
- <dbx-chip class="dbx-chip-spacer" [display]="chip" [small]="small()">{{ chip.label }}</dbx-chip>
16128
+ class DbxClickToCopyTextComponent {
16129
+ contentElementRef = viewChild('content', ...(ngDevMode ? [{ debugName: "contentElementRef" }] : /* istanbul ignore next */ []));
16130
+ dbxClickToCopyText = viewChild(DbxClickToCopyTextDirective, ...(ngDevMode ? [{ debugName: "dbxClickToCopyText" }] : /* istanbul ignore next */ []));
16131
+ copyText = input(undefined, ...(ngDevMode ? [{ debugName: "copyText" }] : /* istanbul ignore next */ []));
16132
+ showIcon = input(true, ...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
16133
+ highlighted = input(false, ...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
16134
+ clipboardSnackbarMessagesConfig = input(undefined, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesConfig" }] : /* istanbul ignore next */ []));
16135
+ clipboardSnackbarMessagesEnabled = input(true, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesEnabled" }] : /* istanbul ignore next */ []));
16136
+ clickToCopyIcon = input('content_copy', ...(ngDevMode ? [{ debugName: "clickToCopyIcon" }] : /* istanbul ignore next */ []));
16137
+ clickIconToCopyOnly = input(false, ...(ngDevMode ? [{ debugName: "clickIconToCopyOnly" }] : /* istanbul ignore next */ []));
16138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxClickToCopyTextComponent, isStandalone: true, selector: "dbx-click-to-copy-text", inputs: { copyText: { classPropertyName: "copyText", publicName: "copyText", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesConfig: { classPropertyName: "clipboardSnackbarMessagesConfig", publicName: "clipboardSnackbarMessagesConfig", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesEnabled: { classPropertyName: "clipboardSnackbarMessagesEnabled", publicName: "clipboardSnackbarMessagesEnabled", isSignal: true, isRequired: false, transformFunction: null }, clickToCopyIcon: { classPropertyName: "clickToCopyIcon", publicName: "clickToCopyIcon", isSignal: true, isRequired: false, transformFunction: null }, clickIconToCopyOnly: { classPropertyName: "clickIconToCopyOnly", publicName: "clickIconToCopyOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-click-to-copy-text-component" }, viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "dbxClickToCopyText", first: true, predicate: DbxClickToCopyTextDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
16140
+ <span #content [dbxClickToCopyText]="copyText()" [disableCopy]="clickIconToCopyOnly()" [highlighted]="highlighted()" [clipboardSnackbarMessagesEnabled]="clipboardSnackbarMessagesEnabled()" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig()" [copyTextFromElement]="contentElementRef()">
16141
+ <ng-content></ng-content>
16142
+ </span>
16143
+ @if (showIcon()) {
16144
+ <mat-icon class="dbx-click-to-copy-text-icon" (click)="dbxClickToCopyText()?._copyText()">{{ clickToCopyIcon() }}</mat-icon>
16086
16145
  }
16087
- `, isInline: true, dependencies: [{ kind: "directive", type: DbxChipDirective, selector: "dbx-chip", inputs: ["small", "block", "color", "display", "tone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16146
+ `, isInline: true, dependencies: [{ kind: "directive", type: DbxClickToCopyTextDirective, selector: "[dbxClickToCopyText]", inputs: ["copyTextFromElement", "dbxClickToCopyText", "disableCopy", "highlighted"], outputs: ["copyTextFromElementChange"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16088
16147
  }
16089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxChipListComponent, decorators: [{
16148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextComponent, decorators: [{
16090
16149
  type: Component,
16091
16150
  args: [{
16092
- selector: 'dbx-chip-list',
16151
+ selector: 'dbx-click-to-copy-text',
16093
16152
  template: `
16094
- @for (chip of chips(); track chip.key ?? chip.label) {
16095
- <dbx-chip class="dbx-chip-spacer" [display]="chip" [small]="small()">{{ chip.label }}</dbx-chip>
16153
+ <span #content [dbxClickToCopyText]="copyText()" [disableCopy]="clickIconToCopyOnly()" [highlighted]="highlighted()" [clipboardSnackbarMessagesEnabled]="clipboardSnackbarMessagesEnabled()" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig()" [copyTextFromElement]="contentElementRef()">
16154
+ <ng-content></ng-content>
16155
+ </span>
16156
+ @if (showIcon()) {
16157
+ <mat-icon class="dbx-click-to-copy-text-icon" (click)="dbxClickToCopyText()?._copyText()">{{ clickToCopyIcon() }}</mat-icon>
16096
16158
  }
16097
16159
  `,
16098
16160
  host: {
16099
- class: 'dbx-chip-list',
16100
- '[style.display]': '"inline"'
16161
+ class: 'dbx-click-to-copy-text-component'
16101
16162
  },
16102
- imports: [DbxChipDirective],
16103
- standalone: true,
16104
- changeDetection: ChangeDetectionStrategy.OnPush
16163
+ imports: [DbxClickToCopyTextDirective, MatIcon],
16164
+ changeDetection: ChangeDetectionStrategy.OnPush,
16165
+ standalone: true
16105
16166
  }]
16106
- }], propDecorators: { chips: [{ type: i0.Input, args: [{ isSignal: true, alias: "chips", required: false }] }], small: [{ type: i0.Input, args: [{ isSignal: true, alias: "small", required: false }] }] } });
16167
+ }], propDecorators: { contentElementRef: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], dbxClickToCopyText: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DbxClickToCopyTextDirective), { isSignal: true }] }], copyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyText", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }], clipboardSnackbarMessagesConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesConfig", required: false }] }], clipboardSnackbarMessagesEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesEnabled", required: false }] }], clickToCopyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickToCopyIcon", required: false }] }], clickIconToCopyOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickIconToCopyOnly", required: false }] }] } });
16107
16168
 
16169
+ const importsAndExports$1 = [DbxUnitedStatesAddressComponent, DbxNumberWithLimitComponent, DbxClickToCopyTextDirective, DbxClickToCopyTextComponent, DbxChipDirective, DbxChipListComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxLabelBlockComponent, DbxLinkifyComponent, DbxTextChipsComponent, DbxIconSpacerDirective];
16108
16170
  /**
16109
- * Renders a read-only list of Material chip options from an array of {@link TextChip} objects.
16171
+ * Angular module that bundles all text-related layout components and directives, including
16172
+ * address display, chips, detail blocks, copy-to-clipboard, linkify, and number-with-limit.
16173
+ */
16174
+ class DbxTextModule {
16175
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16176
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, imports: [DbxUnitedStatesAddressComponent, DbxNumberWithLimitComponent, DbxClickToCopyTextDirective, DbxClickToCopyTextComponent, DbxChipDirective, DbxChipListComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxLabelBlockComponent, DbxLinkifyComponent, DbxTextChipsComponent, DbxIconSpacerDirective], exports: [DbxUnitedStatesAddressComponent, DbxNumberWithLimitComponent, DbxClickToCopyTextDirective, DbxClickToCopyTextComponent, DbxChipDirective, DbxChipListComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxLabelBlockComponent, DbxLinkifyComponent, DbxTextChipsComponent, DbxIconSpacerDirective] });
16177
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, imports: [DbxClickToCopyTextComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxTextChipsComponent] });
16178
+ }
16179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, decorators: [{
16180
+ type: NgModule,
16181
+ args: [{
16182
+ imports: importsAndExports$1,
16183
+ exports: importsAndExports$1
16184
+ }]
16185
+ }] });
16186
+
16187
+ class DbxLayoutModule {
16188
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16189
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, imports: [DbxCompactDirective, DbxFlexGroupDirective, DbxFlexSizeDirective], exports: [DbxBarLayoutModule, DbxCardBoxLayoutModule, DbxColumnLayoutModule, DbxCompactDirective, DbxContentLayoutModule, DbxFlagLayoutModule, DbxFlexGroupDirective, DbxFlexSizeDirective, DbxSectionLayoutModule, DbxStyleLayoutModule, DbxTextModule] });
16190
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, imports: [DbxBarLayoutModule, DbxCardBoxLayoutModule, DbxColumnLayoutModule, DbxContentLayoutModule, DbxFlagLayoutModule, DbxSectionLayoutModule, DbxStyleLayoutModule, DbxTextModule] });
16191
+ }
16192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, decorators: [{
16193
+ type: NgModule,
16194
+ args: [{
16195
+ imports: [DbxCompactDirective, DbxFlexGroupDirective, DbxFlexSizeDirective],
16196
+ exports: [DbxBarLayoutModule, DbxCardBoxLayoutModule, DbxColumnLayoutModule, DbxCompactDirective, DbxContentLayoutModule, DbxFlagLayoutModule, DbxFlexGroupDirective, DbxFlexSizeDirective, DbxSectionLayoutModule, DbxStyleLayoutModule, DbxTextModule]
16197
+ }]
16198
+ }] });
16199
+
16200
+ /**
16201
+ * One row of a file listing: an optional leading icon, the file's name, an optional details line, and
16202
+ * whatever controls the caller projects into the row's trailing slot.
16203
+ *
16204
+ * Renders the `dbx-list-two-line-item` layout, which is a flat utility rather than something scoped to a
16205
+ * dbx-list, so the same row works both as the item component of a dbx-list and inside a plain list of its
16206
+ * own. That is the point of the component: the two file listings that exist differ in their list machinery
16207
+ * and in their controls, and share only this row.
16110
16208
  *
16111
16209
  * @example
16112
16210
  * ```html
16113
- * <dbx-text-chips [chips]="[{ label: 'Active', value: 'active', selected: true, color: 'primary' }]"></dbx-text-chips>
16211
+ * <dbx-file-list-item name="report.pdf" details="Uploaded" [detailsDate]="uploadedAt" detailsDateStyle="distance">
16212
+ * <dbx-download-blob-button [config]="downloadConfig"></dbx-download-blob-button>
16213
+ * </dbx-file-list-item>
16114
16214
  * ```
16115
16215
  */
16116
- class DbxTextChipsComponent {
16117
- _colorService = inject(DbxColorService, { optional: true });
16118
- defaultSelection = input(...(ngDevMode ? [undefined, { debugName: "defaultSelection" }] : /* istanbul ignore next */ []));
16119
- chips = input(...(ngDevMode ? [undefined, { debugName: "chips" }] : /* istanbul ignore next */ []));
16120
- /**
16121
- * Returns the themed background CSS class for a chip's color.
16122
- *
16123
- * @param chip - The chip to get the color class for.
16124
- * @returns The CSS class name for the chip's background color, or empty string if no color.
16125
- */
16126
- chipColorClass(chip) {
16127
- return chip.color ? dbxColorBackground(chip.color) : '';
16128
- }
16129
- /**
16130
- * Returns the inline `--dbx-bg-color-current` value for a chip when its color is a {@link DbxColorConfig}; otherwise null.
16131
- *
16132
- * @param chip - The chip.
16133
- * @returns The background color CSS value, or null for named-color strings.
16134
- */
16135
- chipBgColorStyle(chip) {
16136
- return this._expandedChipConfig(chip)?.color ?? null;
16137
- }
16138
- /**
16139
- * Returns the inline `--dbx-color-current` value for a chip when its color is a {@link DbxColorConfig}; otherwise null.
16216
+ class DbxFileListItemComponent {
16217
+ config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
16218
+ name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
16219
+ icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
16220
+ details = input(...(ngDevMode ? [undefined, { debugName: "details" }] : /* istanbul ignore next */ []));
16221
+ detailsDate = input(...(ngDevMode ? [undefined, { debugName: "detailsDate" }] : /* istanbul ignore next */ []));
16222
+ detailsDateStyle = input(...(ngDevMode ? [undefined, { debugName: "detailsDateStyle" }] : /* istanbul ignore next */ []));
16223
+ detailsClass = input(...(ngDevMode ? [undefined, { debugName: "detailsClass" }] : /* istanbul ignore next */ []));
16224
+ nameSignal = computed(() => {
16225
+ const config = this.config();
16226
+ return this.name() ?? config?.name;
16227
+ }, ...(ngDevMode ? [{ debugName: "nameSignal" }] : /* istanbul ignore next */ []));
16228
+ iconSignal = computed(() => {
16229
+ const config = this.config();
16230
+ return this.icon() ?? config?.icon;
16231
+ }, ...(ngDevMode ? [{ debugName: "iconSignal" }] : /* istanbul ignore next */ []));
16232
+ detailsSignal = computed(() => {
16233
+ const config = this.config();
16234
+ return this.details() ?? config?.details;
16235
+ }, ...(ngDevMode ? [{ debugName: "detailsSignal" }] : /* istanbul ignore next */ []));
16236
+ detailsDateSignal = computed(() => {
16237
+ const config = this.config();
16238
+ return this.detailsDate() ?? config?.detailsDate;
16239
+ }, ...(ngDevMode ? [{ debugName: "detailsDateSignal" }] : /* istanbul ignore next */ []));
16240
+ detailsDateStyleSignal = computed(() => {
16241
+ const config = this.config();
16242
+ return this.detailsDateStyle() ?? config?.detailsDateStyle ?? DEFAULT_DBX_FILE_LIST_ITEM_DETAILS_DATE_STYLE;
16243
+ }, ...(ngDevMode ? [{ debugName: "detailsDateStyleSignal" }] : /* istanbul ignore next */ []));
16244
+ detailsClassSignal = computed(() => {
16245
+ const config = this.config();
16246
+ return this.detailsClass() ?? config?.detailsClass ?? DEFAULT_DBX_FILE_LIST_ITEM_DETAILS_CLASS;
16247
+ }, ...(ngDevMode ? [{ debugName: "detailsClassSignal" }] : /* istanbul ignore next */ []));
16248
+ isDetailsDateDistanceSignal = computed(() => {
16249
+ const detailsDateStyle = this.detailsDateStyleSignal();
16250
+ return detailsDateStyle === 'distance' || detailsDateStyle === 'distance-past';
16251
+ }, ...(ngDevMode ? [{ debugName: "isDetailsDateDistanceSignal" }] : /* istanbul ignore next */ []));
16252
+ /**
16253
+ * The date the row actually renders.
16140
16254
  *
16141
- * @param chip - The chip.
16142
- * @returns The contrast color CSS value, or null for named-color strings.
16255
+ * A `'distance-past'` date is pinned to now once it runs ahead of the clock, so a timestamp that landed
16256
+ * marginally in the future reads as "less than a minute ago" rather than as something yet to happen.
16143
16257
  */
16144
- chipColorStyle(chip) {
16145
- return this._expandedChipConfig(chip)?.contrast ?? null;
16146
- }
16147
- _expandedChipConfig(chip) {
16148
- const value = chip.color;
16149
- return isDbxColorConfig(value) ? (this._colorService?.expandColorConfig(value) ?? value) : undefined;
16150
- }
16151
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16152
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxTextChipsComponent, isStandalone: true, selector: "dbx-text-chips", inputs: { defaultSelection: { classPropertyName: "defaultSelection", publicName: "defaultSelection", isSignal: true, isRequired: false, transformFunction: null }, chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
16153
- @if (chips()) {
16154
- <mat-chip-listbox class="dbx-text-chips-listbox">
16155
- @for (chip of chips(); track chip.key ?? chip.label) {
16156
- <mat-chip-option [selected]="chip.selected ?? defaultSelection()" [class]="chipColorClass(chip)" [style.--dbx-bg-color-current]="chipBgColorStyle(chip)" [style.--dbx-color-current]="chipColorStyle(chip)" [matTooltip]="chip.tooltip!" matTooltipPosition="above">
16157
- {{ chip.label }}
16158
- </mat-chip-option>
16258
+ renderedDetailsDateSignal = computed(() => {
16259
+ const detailsDateStyle = this.detailsDateStyleSignal();
16260
+ const detailsDate = this.detailsDateSignal();
16261
+ const now = new Date();
16262
+ let result = detailsDate;
16263
+ if (detailsDate != null && detailsDateStyle === 'distance-past' && detailsDate > now) {
16264
+ result = now;
16265
+ }
16266
+ return result;
16267
+ }, ...(ngDevMode ? [{ debugName: "renderedDetailsDateSignal" }] : /* istanbul ignore next */ []));
16268
+ hasDetailsSignal = computed(() => {
16269
+ const detailsDate = this.detailsDateSignal();
16270
+ return Boolean(this.detailsSignal() || detailsDate);
16271
+ }, ...(ngDevMode ? [{ debugName: "hasDetailsSignal" }] : /* istanbul ignore next */ []));
16272
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFileListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16273
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxFileListItemComponent, isStandalone: true, selector: "dbx-file-list-item", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: false, transformFunction: null }, detailsDate: { classPropertyName: "detailsDate", publicName: "detailsDate", isSignal: true, isRequired: false, transformFunction: null }, detailsDateStyle: { classPropertyName: "detailsDateStyle", publicName: "detailsDateStyle", isSignal: true, isRequired: false, transformFunction: null }, detailsClass: { classPropertyName: "detailsClass", publicName: "detailsClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-file-list-item d-block" }, ngImport: i0, template: `
16274
+ <div class="dbx-list-item-padded dbx-list-two-line-item">
16275
+ @if (iconSignal(); as icon) {
16276
+ <mat-icon class="item-icon">{{ icon }}</mat-icon>
16277
+ }
16278
+ <div class="item-left">
16279
+ <div class="mat-subtitle-2 dbx-text-truncate" [title]="nameSignal()">{{ nameSignal() }}</div>
16280
+ @if (hasDetailsSignal()) {
16281
+ <div class="item-details" [ngClass]="detailsClassSignal()">
16282
+ @if (detailsSignal(); as details) {
16283
+ <!-- The trailing &ngsp; is the separator from the date that follows, and belongs to the text
16284
+ rather than sitting between the spans: the details read as one sentence with the date
16285
+ ("Uploaded 3 hours ago"), and Angular drops a whitespace-only text node between two
16286
+ elements, running the words together. Carried here rather than led on the date so a row
16287
+ with only a date does not open on a space. -->
16288
+ <span>{{ details }}&ngsp;</span>
16289
+ }
16290
+ @if (renderedDetailsDateSignal(); as detailsDate) {
16291
+ @if (isDetailsDateDistanceSignal()) {
16292
+ <span>{{ detailsDate | timeDistance }}</span>
16293
+ } @else {
16294
+ <span>{{ detailsDate | date: detailsDateStyleSignal() }}</span>
16295
+ }
16296
+ }
16297
+ </div>
16159
16298
  }
16160
- </mat-chip-listbox>
16161
- }
16162
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1$8.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i1$8.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16299
+ </div>
16300
+ <dbx-spacer></dbx-spacer>
16301
+ <div class="item-right"><ng-content></ng-content></div>
16302
+ </div>
16303
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: DbxSpacerDirective, selector: "dbx-spacer, [dbxSpacer]" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TimeDistancePipe, name: "timeDistance" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16163
16304
  }
16164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextChipsComponent, decorators: [{
16305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFileListItemComponent, decorators: [{
16165
16306
  type: Component,
16166
16307
  args: [{
16167
- selector: 'dbx-text-chips',
16308
+ selector: 'dbx-file-list-item',
16168
16309
  template: `
16169
- @if (chips()) {
16170
- <mat-chip-listbox class="dbx-text-chips-listbox">
16171
- @for (chip of chips(); track chip.key ?? chip.label) {
16172
- <mat-chip-option [selected]="chip.selected ?? defaultSelection()" [class]="chipColorClass(chip)" [style.--dbx-bg-color-current]="chipBgColorStyle(chip)" [style.--dbx-color-current]="chipColorStyle(chip)" [matTooltip]="chip.tooltip!" matTooltipPosition="above">
16173
- {{ chip.label }}
16174
- </mat-chip-option>
16310
+ <div class="dbx-list-item-padded dbx-list-two-line-item">
16311
+ @if (iconSignal(); as icon) {
16312
+ <mat-icon class="item-icon">{{ icon }}</mat-icon>
16313
+ }
16314
+ <div class="item-left">
16315
+ <div class="mat-subtitle-2 dbx-text-truncate" [title]="nameSignal()">{{ nameSignal() }}</div>
16316
+ @if (hasDetailsSignal()) {
16317
+ <div class="item-details" [ngClass]="detailsClassSignal()">
16318
+ @if (detailsSignal(); as details) {
16319
+ <!-- The trailing &ngsp; is the separator from the date that follows, and belongs to the text
16320
+ rather than sitting between the spans: the details read as one sentence with the date
16321
+ ("Uploaded 3 hours ago"), and Angular drops a whitespace-only text node between two
16322
+ elements, running the words together. Carried here rather than led on the date so a row
16323
+ with only a date does not open on a space. -->
16324
+ <span>{{ details }}&ngsp;</span>
16325
+ }
16326
+ @if (renderedDetailsDateSignal(); as detailsDate) {
16327
+ @if (isDetailsDateDistanceSignal()) {
16328
+ <span>{{ detailsDate | timeDistance }}</span>
16329
+ } @else {
16330
+ <span>{{ detailsDate | date: detailsDateStyleSignal() }}</span>
16331
+ }
16332
+ }
16333
+ </div>
16175
16334
  }
16176
- </mat-chip-listbox>
16177
- }
16335
+ </div>
16336
+ <dbx-spacer></dbx-spacer>
16337
+ <div class="item-right"><ng-content></ng-content></div>
16338
+ </div>
16178
16339
  `,
16179
- imports: [MatChipsModule, MatTooltipModule],
16180
- standalone: true,
16181
- changeDetection: ChangeDetectionStrategy.OnPush
16340
+ host: {
16341
+ class: 'dbx-file-list-item d-block'
16342
+ },
16343
+ imports: [DatePipe, NgClass, MatIconModule, TimeDistancePipe, DbxSpacerDirective],
16344
+ changeDetection: ChangeDetectionStrategy.OnPush,
16345
+ standalone: true
16182
16346
  }]
16183
- }], propDecorators: { defaultSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSelection", required: false }] }], chips: [{ type: i0.Input, args: [{ isSignal: true, alias: "chips", required: false }] }] } });
16347
+ }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: false }] }], detailsDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailsDate", required: false }] }], detailsDateStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailsDateStyle", required: false }] }], detailsClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailsClass", required: false }] }] } });
16184
16348
 
16185
16349
  /**
16186
- * Displays a number value with an optional limit, automatically applying color-coded
16187
- * theming based on the ratio of value to limit (ok, notice, warn).
16350
+ * Lists files described by {@link DbxFileListEntry} values, giving each entry that carries a download
16351
+ * configuration a download button.
16352
+ *
16353
+ * For a listing whose rows need controls of their own, build the list from {@link DbxFileListItemComponent}
16354
+ * directly and project those controls into each row.
16188
16355
  *
16189
16356
  * @example
16190
16357
  * ```html
16191
- * <dbx-number-with-limit [number]="{ value: 7, limit: 10 }"></dbx-number-with-limit>
16192
- * <dbx-number-with-limit [number]="{ value: 3, limit: 5, prefix: '$' }" [rounded]="true"></dbx-number-with-limit>
16358
+ * <dbx-file-list [entries]="entriesSignal()" emptyText="No files yet."></dbx-file-list>
16193
16359
  * ```
16194
16360
  */
16195
- class DbxNumberWithLimitComponent {
16196
- number = input(...(ngDevMode ? [undefined, { debugName: "number" }] : /* istanbul ignore next */ []));
16197
- rounded = input(...(ngDevMode ? [undefined, { debugName: "rounded" }] : /* istanbul ignore next */ []));
16198
- valueSignal = computed(() => {
16199
- const number = this.number();
16200
- return number?.formatNumber ? number.formatNumber(number.value) : number?.value;
16201
- }, ...(ngDevMode ? [{ debugName: "valueSignal" }] : /* istanbul ignore next */ []));
16202
- limitSignal = computed(() => {
16203
- const number = this.number();
16204
- return number?.limit == null ? undefined : number?.formatNumber ? number.formatNumber(number.limit) : number?.limit;
16205
- }, ...(ngDevMode ? [{ debugName: "limitSignal" }] : /* istanbul ignore next */ []));
16206
- hasLimitSignal = computed(() => {
16207
- return this.number()?.limit != null;
16208
- }, ...(ngDevMode ? [{ debugName: "hasLimitSignal" }] : /* istanbul ignore next */ []));
16209
- prefixSignal = computed(() => {
16210
- return this.number()?.prefix;
16211
- }, ...(ngDevMode ? [{ debugName: "prefixSignal" }] : /* istanbul ignore next */ []));
16212
- suffixSignal = computed(() => {
16213
- return this.number()?.suffix;
16214
- }, ...(ngDevMode ? [{ debugName: "suffixSignal" }] : /* istanbul ignore next */ []));
16215
- colorSignal = computed(() => {
16216
- const number = this.number();
16217
- let color;
16218
- if (number != null) {
16219
- const { value, limit } = number;
16220
- if (limit != null) {
16221
- if (value > limit) {
16222
- color = 'warn';
16223
- }
16224
- else if (value === limit) {
16225
- color = 'notice';
16226
- }
16227
- else {
16228
- const ratio = limit === 0 ? 1 : value / limit;
16229
- if (ratio > 0.8) {
16230
- color = 'notice';
16231
- }
16232
- else {
16233
- color = 'ok';
16234
- }
16235
- }
16236
- }
16237
- }
16238
- return color;
16239
- }, ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
16240
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxNumberWithLimitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16241
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxNumberWithLimitComponent, isStandalone: true, selector: "dbx-number-with-limit", inputs: { number: { classPropertyName: "number", publicName: "number", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
16242
- <span class="dbx-number-with-limit" [class]="{ 'dbx-number-with-limit-rounded': rounded() }" [dbxColor]="colorSignal()">
16243
- <span>{{ prefixSignal() }}</span>
16244
- <span>{{ valueSignal() }}</span>
16245
- @if (hasLimitSignal()) {
16246
- <span class="dbx-number-with-limit-divider">/</span>
16247
- <span>{{ limitSignal() }}</span>
16361
+ class DbxFileListComponent {
16362
+ config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
16363
+ entries = input(...(ngDevMode ? [undefined, { debugName: "entries" }] : /* istanbul ignore next */ []));
16364
+ emptyText = input(...(ngDevMode ? [undefined, { debugName: "emptyText" }] : /* istanbul ignore next */ []));
16365
+ entriesSignal = computed(() => {
16366
+ const config = this.config();
16367
+ return this.entries() ?? config?.entries ?? [];
16368
+ }, ...(ngDevMode ? [{ debugName: "entriesSignal" }] : /* istanbul ignore next */ []));
16369
+ emptyTextSignal = computed(() => {
16370
+ const config = this.config();
16371
+ return this.emptyText() ?? config?.emptyText;
16372
+ }, ...(ngDevMode ? [{ debugName: "emptyTextSignal" }] : /* istanbul ignore next */ []));
16373
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFileListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16374
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxFileListComponent, isStandalone: true, selector: "dbx-file-list", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, entries: { classPropertyName: "entries", publicName: "entries", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-file-list d-block" }, ngImport: i0, template: `
16375
+ @if (entriesSignal().length) {
16376
+ @for (entry of entriesSignal(); track entry.key) {
16377
+ <dbx-file-list-item [config]="entry">
16378
+ @if (entry.download; as download) {
16379
+ <dbx-download-blob-button [config]="download"></dbx-download-blob-button>
16380
+ }
16381
+ </dbx-file-list-item>
16248
16382
  }
16249
- <span>{{ suffixSignal() }}</span>
16250
- </span>
16251
- `, isInline: true, dependencies: [{ kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"], outputs: ["dbxColorChange", "dbxColorToneChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16383
+ } @else if (emptyTextSignal(); as emptyText) {
16384
+ <dbx-list-empty-content>{{ emptyText }}</dbx-list-empty-content>
16385
+ }
16386
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxFileListItemComponent, selector: "dbx-file-list-item", inputs: ["config", "name", "icon", "details", "detailsDate", "detailsDateStyle", "detailsClass"] }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "component", type: DbxListEmptyContentComponent, selector: "dbx-list-empty-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16252
16387
  }
16253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxNumberWithLimitComponent, decorators: [{
16388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFileListComponent, decorators: [{
16254
16389
  type: Component,
16255
16390
  args: [{
16256
- selector: 'dbx-number-with-limit',
16391
+ selector: 'dbx-file-list',
16257
16392
  template: `
16258
- <span class="dbx-number-with-limit" [class]="{ 'dbx-number-with-limit-rounded': rounded() }" [dbxColor]="colorSignal()">
16259
- <span>{{ prefixSignal() }}</span>
16260
- <span>{{ valueSignal() }}</span>
16261
- @if (hasLimitSignal()) {
16262
- <span class="dbx-number-with-limit-divider">/</span>
16263
- <span>{{ limitSignal() }}</span>
16393
+ @if (entriesSignal().length) {
16394
+ @for (entry of entriesSignal(); track entry.key) {
16395
+ <dbx-file-list-item [config]="entry">
16396
+ @if (entry.download; as download) {
16397
+ <dbx-download-blob-button [config]="download"></dbx-download-blob-button>
16398
+ }
16399
+ </dbx-file-list-item>
16264
16400
  }
16265
- <span>{{ suffixSignal() }}</span>
16266
- </span>
16401
+ } @else if (emptyTextSignal(); as emptyText) {
16402
+ <dbx-list-empty-content>{{ emptyText }}</dbx-list-empty-content>
16403
+ }
16267
16404
  `,
16268
- imports: [DbxColorDirective],
16269
- standalone: true,
16270
- changeDetection: ChangeDetectionStrategy.OnPush
16405
+ host: {
16406
+ class: 'dbx-file-list d-block'
16407
+ },
16408
+ imports: [DbxFileListItemComponent, DbxDownloadBlobButtonComponent, DbxListEmptyContentComponent],
16409
+ changeDetection: ChangeDetectionStrategy.OnPush,
16410
+ standalone: true
16271
16411
  }]
16272
- }], propDecorators: { number: [{ type: i0.Input, args: [{ isSignal: true, alias: "number", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }] } });
16412
+ }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], entries: [{ type: i0.Input, args: [{ isSignal: true, alias: "entries", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }] } });
16273
16413
 
16274
16414
  /**
16275
- * Makes the host element clickable to copy text to the clipboard.
16276
- *
16277
- * If no explicit `dbxClickToCopyText` value is provided, copies the element's text content.
16278
- * Optionally highlights the element to indicate it is copyable.
16415
+ * Displays a preview of text content with options to copy to clipboard and download as a file. Supports loading states for async content retrieval.
16279
16416
  *
16280
16417
  * @example
16281
16418
  * ```html
16282
- * <span [dbxClickToCopyText]="'Copy this value'">Copy this value</span>
16283
- * <span dbxClickToCopyText [highlighted]="false">Subtle copy</span>
16419
+ * <dbx-download-text-view [content]="{ content: 'Hello World', name: 'greeting.txt', mimeType: 'text/plain' }" [showPreview]="true"></dbx-download-text-view>
16420
+ * ```
16421
+ */
16422
+ class DbxDownloadTextViewComponent extends AbstractDbxClipboardDirective {
16423
+ downloadButton = viewChild('downloadButton', { ...(ngDevMode ? { debugName: "downloadButton" } : /* istanbul ignore next */ {}), read: ElementRef });
16424
+ showDownloadButton = input(true, ...(ngDevMode ? [{ debugName: "showDownloadButton" }] : /* istanbul ignore next */ []));
16425
+ loadingText = input(undefined, ...(ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []));
16426
+ linear = input(undefined, ...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
16427
+ showTitle = input(true, ...(ngDevMode ? [{ debugName: "showTitle" }] : /* istanbul ignore next */ []));
16428
+ showPreview = input(true, ...(ngDevMode ? [{ debugName: "showPreview" }] : /* istanbul ignore next */ []));
16429
+ showExpandPreviewButton = input(true, ...(ngDevMode ? [{ debugName: "showExpandPreviewButton" }] : /* istanbul ignore next */ []));
16430
+ expandPreview = model(false, ...(ngDevMode ? [{ debugName: "expandPreview" }] : /* istanbul ignore next */ []));
16431
+ content = input(undefined, ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
16432
+ contentState = input(undefined, ...(ngDevMode ? [{ debugName: "contentState" }] : /* istanbul ignore next */ []));
16433
+ contentState$ = toObservable(this.contentState).pipe(maybeValueFromObservableOrValue(), shareReplay(1));
16434
+ contentStateSignal = toSignal(this.contentState$);
16435
+ contentLoadingStateSignal = computed(() => {
16436
+ const content = this.content();
16437
+ const contentState = this.contentStateSignal();
16438
+ let result;
16439
+ if (contentState) {
16440
+ result = contentState;
16441
+ }
16442
+ else if (content) {
16443
+ result = successResult(content);
16444
+ }
16445
+ return result;
16446
+ }, ...(ngDevMode ? [{ debugName: "contentLoadingStateSignal" }] : /* istanbul ignore next */ []));
16447
+ contentLoadingState$ = toObservable(this.contentLoadingStateSignal);
16448
+ content$ = this.contentLoadingState$.pipe(switchMap((x) => {
16449
+ return x ? of(x).pipe(valueFromFinishedLoadingState()) : of(undefined);
16450
+ }));
16451
+ contentSignal = toSignal(this.content$);
16452
+ contentDataSignal = computed(() => this.contentSignal()?.content, ...(ngDevMode ? [{ debugName: "contentDataSignal" }] : /* istanbul ignore next */ []));
16453
+ fileNameSignal = computed(() => this.contentSignal()?.name ?? 'download.txt', ...(ngDevMode ? [{ debugName: "fileNameSignal" }] : /* istanbul ignore next */ []));
16454
+ downloadConfigSignal = computed(() => {
16455
+ const content = this.contentSignal();
16456
+ const fileName = this.fileNameSignal();
16457
+ let result = undefined;
16458
+ if (content) {
16459
+ result = {
16460
+ blob: new Blob([content.content], { type: content.mimeType ?? 'application/octet-stream' }),
16461
+ fileName
16462
+ };
16463
+ }
16464
+ return result;
16465
+ }, ...(ngDevMode ? [{ debugName: "downloadConfigSignal" }] : /* istanbul ignore next */ []));
16466
+ context = loadingStateContext({ obs: this.contentLoadingState$ });
16467
+ handleCopyToClipboard = () => {
16468
+ return this.content$.pipe(first(), switchMap((downloadTextContent) => {
16469
+ return downloadTextContent ? this._copyToClipboard(downloadTextContent.content) : of(false);
16470
+ }));
16471
+ };
16472
+ toggleExpandPreview() {
16473
+ this.expandPreview.update((value) => !value);
16474
+ }
16475
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxDownloadTextViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
16476
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxDownloadTextViewComponent, isStandalone: true, selector: "dbx-download-text-view", inputs: { showDownloadButton: { classPropertyName: "showDownloadButton", publicName: "showDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, showTitle: { classPropertyName: "showTitle", publicName: "showTitle", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null }, showExpandPreviewButton: { classPropertyName: "showExpandPreviewButton", publicName: "showExpandPreviewButton", isSignal: true, isRequired: false, transformFunction: null }, expandPreview: { classPropertyName: "expandPreview", publicName: "expandPreview", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, contentState: { classPropertyName: "contentState", publicName: "contentState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandPreview: "expandPreviewChange" }, viewQueries: [{ propertyName: "downloadButton", first: true, predicate: ["downloadButton"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-download-text-view\">\n <dbx-loading [context]=\"context\" [linear]=\"linear()\" [text]=\"loadingText()\">\n <ng-container *ngTemplateOutlet=\"contentView\"></ng-container>\n </dbx-loading>\n</div>\n\n<!-- Template -->\n<ng-template #contentView>\n <div class=\"dbx-download-text-view-content\">\n @if (showTitle()) {\n <div class=\"dbx-download-text-view-content-title dbx-mb2 mat-subtitle-2\">{{ fileNameSignal() }}</div>\n }\n @if (showPreview()) {\n <dbx-content-pit [scrollable]=\"!expandPreview()\" class=\"dbx-download-text-preview dbx-json dbx-mb3\">\n <div class=\"dbx-content-pit-scrollable-content\">\n @if (showExpandPreviewButton()) {\n <dbx-button class=\"dbx-content-pit-floating-button\" [raised]=\"true\" [icon]=\"expandPreview() ? 'unfold_less' : 'unfold_more'\" (buttonClick)=\"toggleExpandPreview()\"></dbx-button>\n }\n {{ contentDataSignal() }}\n </div>\n </dbx-content-pit>\n }\n <div class=\"dbx-download-text-view-actions\">\n <dbx-button dbxAction dbxActionValue [raised]=\"true\" [dbxActionHandler]=\"handleCopyToClipboard\" icon=\"content_copy\" dbxActionButton text=\"Copy To Clipboard\"></dbx-button>\n @if (showDownloadButton()) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DbxLoadingComponent, selector: "dbx-loading", inputs: ["padding", "show", "text", "mode", "diameter", "linear", "loading", "error", "context"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i1$2.DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$2.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i1$2.DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "customContent", "allowClickPropagation", "mode"] }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "directive", type: DbxContentPitDirective, selector: "dbx-content-pit, [dbxContentPit]", inputs: ["scrollable", "square"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16477
+ }
16478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxDownloadTextViewComponent, decorators: [{
16479
+ type: Component,
16480
+ args: [{ selector: 'dbx-download-text-view', standalone: true, imports: [NgTemplateOutlet, DbxLoadingComponent, DbxActionModule, DbxActionButtonDirective, DbxButtonComponent, DbxButtonSpacerDirective, DbxDownloadBlobButtonComponent, DbxContentPitDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dbx-download-text-view\">\n <dbx-loading [context]=\"context\" [linear]=\"linear()\" [text]=\"loadingText()\">\n <ng-container *ngTemplateOutlet=\"contentView\"></ng-container>\n </dbx-loading>\n</div>\n\n<!-- Template -->\n<ng-template #contentView>\n <div class=\"dbx-download-text-view-content\">\n @if (showTitle()) {\n <div class=\"dbx-download-text-view-content-title dbx-mb2 mat-subtitle-2\">{{ fileNameSignal() }}</div>\n }\n @if (showPreview()) {\n <dbx-content-pit [scrollable]=\"!expandPreview()\" class=\"dbx-download-text-preview dbx-json dbx-mb3\">\n <div class=\"dbx-content-pit-scrollable-content\">\n @if (showExpandPreviewButton()) {\n <dbx-button class=\"dbx-content-pit-floating-button\" [raised]=\"true\" [icon]=\"expandPreview() ? 'unfold_less' : 'unfold_more'\" (buttonClick)=\"toggleExpandPreview()\"></dbx-button>\n }\n {{ contentDataSignal() }}\n </div>\n </dbx-content-pit>\n }\n <div class=\"dbx-download-text-view-actions\">\n <dbx-button dbxAction dbxActionValue [raised]=\"true\" [dbxActionHandler]=\"handleCopyToClipboard\" icon=\"content_copy\" dbxActionButton text=\"Copy To Clipboard\"></dbx-button>\n @if (showDownloadButton()) {\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n </div>\n </div>\n</ng-template>\n" }]
16481
+ }], propDecorators: { downloadButton: [{ type: i0.ViewChild, args: ['downloadButton', { ...{ read: ElementRef }, isSignal: true }] }], showDownloadButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDownloadButton", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], showTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTitle", required: false }] }], showPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreview", required: false }] }], showExpandPreviewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExpandPreviewButton", required: false }] }], expandPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandPreview", required: false }] }, { type: i0.Output, args: ["expandPreviewChange"] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentState: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentState", required: false }] }] } });
16482
+
16483
+ /**
16484
+ * Default entries to inject.
16485
+ */
16486
+ const DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN = new InjectionToken('DefaultDbxWebFilePreviewServiceEntries');
16487
+ /**
16488
+ * Creates a provider that registers the given entries with the {@link DbxWebFilePreviewService} via the {@link DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN}.
16489
+ *
16490
+ * @param entries - Array of preview service entries to register, each mapping a MIME type to its preview component.
16491
+ * @returns A provider configuration that supplies the entries via the injection token.
16492
+ *
16493
+ * @example
16494
+ * ```typescript
16495
+ * provideDbxWebFilePreviewServiceEntries([DBX_WEB_FILE_PREVIEW_SERVICE_ZIP_PRESET_ENTRY]);
16284
16496
  * ```
16285
16497
  */
16286
- class DbxClickToCopyTextDirective extends AbstractDbxClipboardDirective {
16287
- copyTextFromElement = model(...(ngDevMode ? [undefined, { debugName: "copyTextFromElement" }] : /* istanbul ignore next */ []));
16498
+ function provideDbxWebFilePreviewServiceEntries(entries) {
16499
+ return {
16500
+ provide: DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN,
16501
+ useValue: entries
16502
+ };
16503
+ }
16504
+ // MARK: Default Functions
16505
+ /**
16506
+ * Default preview component function that embeds files using {@link DbxEmbedComponent}. Images are rendered with an `img` element; all other types use `embed`.
16507
+ *
16508
+ * @param input - The preview input containing blob data, source URL, and MIME type information.
16509
+ * @returns An injection component config that initializes a {@link DbxEmbedComponent} with the appropriate embed element and content.
16510
+ */
16511
+ const DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_PREVIEW_COMPONENT_FUNCTION = (input) => {
16512
+ const { blob, srcUrl, embedMimeType, sanitizeSrcUrl } = input;
16513
+ let embedElement = 'embed';
16514
+ if (embedMimeType) {
16515
+ // embed any image mime types to img
16516
+ embedElement = embedMimeType.startsWith('image/') ? 'img' : 'embed';
16517
+ }
16518
+ return {
16519
+ componentClass: DbxEmbedComponent,
16520
+ init: (x) => {
16521
+ x.embedElement.set(embedElement);
16522
+ if (blob != null) {
16523
+ x.blob.set(blob);
16524
+ }
16525
+ if (srcUrl != null) {
16526
+ x.srcUrl.set(srcUrl);
16527
+ x.sanitizeUrl.set(sanitizeSrcUrl ?? true);
16528
+ }
16529
+ if (embedMimeType != null) {
16530
+ x.type.set(embedMimeType);
16531
+ }
16532
+ }
16533
+ };
16534
+ };
16535
+ /**
16536
+ * Default dialog-with-component function that opens the preview component inside a {@link DbxInjectionDialogComponent} with a close button.
16537
+ *
16538
+ * @param input - The dialog input containing the MatDialog instance and the component config to display.
16539
+ * @returns A MatDialogRef for the opened injection dialog.
16540
+ */
16541
+ const DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_DIALOG_WITH_COMPONENT_FUNCTION = (input) => {
16542
+ const { matDialog, componentConfig } = input;
16543
+ return DbxInjectionDialogComponent.openDialog(matDialog, {
16544
+ componentConfig,
16545
+ showCloseButton: true
16546
+ });
16547
+ };
16548
+ // MARK: Service
16549
+ /**
16550
+ * Service used for previewing files with given mime types.
16551
+ */
16552
+ class DbxWebFilePreviewService {
16553
+ matDialog = inject(MatDialog);
16554
+ _entries = new Map();
16555
+ constructor() {
16556
+ const entries = inject(DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN, { optional: true });
16557
+ if (entries) {
16558
+ entries.forEach((x) => this.registerPreviewEntry(x));
16559
+ }
16560
+ }
16561
+ _defaultPreviewComponentFunction = DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_PREVIEW_COMPONENT_FUNCTION;
16562
+ _defaultPreviewDialogWithComponentFunction = DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_DIALOG_WITH_COMPONENT_FUNCTION;
16563
+ // Configuration
16288
16564
  /**
16289
- * If the input is null, then copy from the element's text content.
16565
+ * Registers one or more file preview entries, mapping MIME types to their preview components.
16566
+ *
16567
+ * @param entries - Single or array of preview entries to register.
16290
16568
  */
16291
- copyText = input(undefined, { ...(ngDevMode ? { debugName: "copyText" } : /* istanbul ignore next */ {}), alias: 'dbxClickToCopyText' });
16569
+ registerPreviewEntries(entries) {
16570
+ asArray(entries).forEach((entry) => this.registerPreviewEntry(entry));
16571
+ }
16292
16572
  /**
16293
- * If true, the click events will be ignored.
16573
+ * Registers a single file preview entry for its MIME type(s).
16574
+ *
16575
+ * @param entry - The preview entry to register.
16294
16576
  */
16295
- disableCopy = input(false, ...(ngDevMode ? [{ debugName: "disableCopy" }] : /* istanbul ignore next */ []));
16577
+ registerPreviewEntry(entry) {
16578
+ asArray(entry.mimeType).forEach((mimeType) => this._entries.set(mimeType, entry));
16579
+ }
16296
16580
  /**
16297
- * Highlight the text visually.
16581
+ * Overrides the default preview component function used when no MIME-specific entry is registered.
16582
+ *
16583
+ * @param previewFunction - The preview component function to use as the new default.
16298
16584
  */
16299
- highlighted = input(true, ...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
16300
- handleClick(event) {
16301
- const disabled = this.disableCopy();
16302
- if (!disabled) {
16303
- event.preventDefault();
16304
- event.stopPropagation();
16305
- const eventElement = event.currentTarget;
16306
- this._copyText(eventElement);
16307
- }
16585
+ setDefaultPreviewComponentFunction(previewFunction) {
16586
+ this._defaultPreviewComponentFunction = previewFunction;
16308
16587
  }
16309
- _copyText(eventElement) {
16310
- let copyText = this.copyText();
16311
- // If the input is null, then copy from the element's text content.
16312
- if (copyText !== null && !copyText) {
16313
- const element = this.copyTextFromElement()?.nativeElement;
16314
- copyText = (element ?? eventElement)?.textContent ?? undefined;
16588
+ /**
16589
+ * Overrides the default dialog-with-component function used when no MIME-specific dialog handler is registered.
16590
+ *
16591
+ * @param previewDialogWithComponentFunction - The dialog-with-component function to use as the new default.
16592
+ */
16593
+ setDefaultPreviewDialogWithComponentFunction(previewDialogWithComponentFunction) {
16594
+ this._defaultPreviewDialogWithComponentFunction = previewDialogWithComponentFunction;
16595
+ }
16596
+ // Service
16597
+ /**
16598
+ * Creates an injection component config for previewing a file. Uses a MIME-specific preview function if registered, otherwise falls back to the default.
16599
+ *
16600
+ * @param input - The preview input containing blob, URL, and MIME type information.
16601
+ * @returns An injection component config suitable for rendering the file preview.
16602
+ */
16603
+ createPreviewConfig(input) {
16604
+ const { embedMimeType } = input;
16605
+ const previewFunction = (embedMimeType ? this._entries.get(embedMimeType)?.previewComponentFunction : undefined) ?? this._defaultPreviewComponentFunction;
16606
+ return previewFunction(input);
16607
+ }
16608
+ /**
16609
+ * Opens a Material dialog to preview a file. Uses a MIME-specific dialog function if registered, otherwise creates a preview component and wraps it in the default dialog.
16610
+ *
16611
+ * @param input - The dialog input containing file data and MIME type.
16612
+ * @returns Reference to the opened dialog.
16613
+ */
16614
+ openPreviewDialog(input) {
16615
+ const { embedMimeType } = input;
16616
+ const previewDialogFunction = embedMimeType ? this._entries.get(embedMimeType)?.previewDialogFunction : undefined;
16617
+ let matDialogRef;
16618
+ if (previewDialogFunction) {
16619
+ matDialogRef = previewDialogFunction({
16620
+ matDialog: this.matDialog,
16621
+ ...input
16622
+ });
16315
16623
  }
16316
- if (copyText) {
16317
- void this._copyToClipboard(copyText);
16624
+ else {
16625
+ const componentConfig = this.createPreviewConfig(input);
16626
+ matDialogRef = this._defaultPreviewDialogWithComponentFunction({
16627
+ matDialog: this.matDialog,
16628
+ ...input,
16629
+ componentConfig
16630
+ });
16318
16631
  }
16319
- return copyText;
16632
+ return matDialogRef;
16320
16633
  }
16321
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
16322
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxClickToCopyTextDirective, isStandalone: true, selector: "[dbxClickToCopyText]", inputs: { copyTextFromElement: { classPropertyName: "copyTextFromElement", publicName: "copyTextFromElement", isSignal: true, isRequired: false, transformFunction: null }, copyText: { classPropertyName: "copyText", publicName: "dbxClickToCopyText", isSignal: true, isRequired: false, transformFunction: null }, disableCopy: { classPropertyName: "disableCopy", publicName: "disableCopy", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copyTextFromElement: "copyTextFromElementChange" }, host: { listeners: { "click": "handleClick($event)" }, properties: { "class.dbx-click-to-copy-text-highlighted": "highlighted()" }, classAttribute: "dbx-click-to-copy-text" }, usesInheritance: true, ngImport: i0 });
16634
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16635
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewService, providedIn: 'root' });
16323
16636
  }
16324
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextDirective, decorators: [{
16325
- type: Directive,
16637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewService, decorators: [{
16638
+ type: Injectable,
16326
16639
  args: [{
16327
- selector: '[dbxClickToCopyText]',
16328
- host: {
16329
- class: 'dbx-click-to-copy-text',
16330
- '[class.dbx-click-to-copy-text-highlighted]': 'highlighted()'
16331
- },
16332
- standalone: true
16640
+ providedIn: 'root'
16333
16641
  }]
16334
- }], propDecorators: { copyTextFromElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyTextFromElement", required: false }] }, { type: i0.Output, args: ["copyTextFromElementChange"] }], copyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxClickToCopyText", required: false }] }], disableCopy: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableCopy", required: false }] }], highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }], handleClick: [{
16335
- type: HostListener,
16336
- args: ['click', ['$event']]
16337
- }] } });
16642
+ }], ctorParameters: () => [] });
16338
16643
 
16339
16644
  /**
16340
- * Wraps projected content with click-to-copy functionality and a copy icon button.
16341
- *
16342
- * Clicking the text or the icon copies the text to the clipboard and optionally shows a snackbar confirmation.
16343
- *
16344
- * @dbxWebComponent
16345
- * @dbxWebSlug click-to-copy-text
16346
- * @dbxWebCategory text
16347
- * @dbxWebRelated chip
16348
- * @dbxWebSkillRefs dbx__ref__dbx-ui-building-blocks
16349
- * @dbxWebMinimalExample ```html
16350
- * <dbx-click-to-copy-text [text]="value"></dbx-click-to-copy-text>
16351
- * ```
16645
+ * Previews a file by delegating to the {@link DbxWebFilePreviewService} to resolve the appropriate preview component for the given MIME type.
16352
16646
  *
16353
16647
  * @example
16354
16648
  * ```html
16355
- * <dbx-click-to-copy-text [text]="userId"></dbx-click-to-copy-text>
16649
+ * <dbx-web-file-preview [config]="{ srcUrl: 'https://example.com/doc.pdf', embedMimeType: 'application/pdf' }"></dbx-web-file-preview>
16356
16650
  * ```
16357
16651
  */
16358
- class DbxClickToCopyTextComponent {
16359
- contentElementRef = viewChild('content', ...(ngDevMode ? [{ debugName: "contentElementRef" }] : /* istanbul ignore next */ []));
16360
- dbxClickToCopyText = viewChild(DbxClickToCopyTextDirective, ...(ngDevMode ? [{ debugName: "dbxClickToCopyText" }] : /* istanbul ignore next */ []));
16361
- copyText = input(undefined, ...(ngDevMode ? [{ debugName: "copyText" }] : /* istanbul ignore next */ []));
16362
- showIcon = input(true, ...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
16363
- highlighted = input(false, ...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
16364
- clipboardSnackbarMessagesConfig = input(undefined, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesConfig" }] : /* istanbul ignore next */ []));
16365
- clipboardSnackbarMessagesEnabled = input(true, ...(ngDevMode ? [{ debugName: "clipboardSnackbarMessagesEnabled" }] : /* istanbul ignore next */ []));
16366
- clickToCopyIcon = input('content_copy', ...(ngDevMode ? [{ debugName: "clickToCopyIcon" }] : /* istanbul ignore next */ []));
16367
- clickIconToCopyOnly = input(false, ...(ngDevMode ? [{ debugName: "clickIconToCopyOnly" }] : /* istanbul ignore next */ []));
16368
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16369
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxClickToCopyTextComponent, isStandalone: true, selector: "dbx-click-to-copy-text", inputs: { copyText: { classPropertyName: "copyText", publicName: "copyText", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesConfig: { classPropertyName: "clipboardSnackbarMessagesConfig", publicName: "clipboardSnackbarMessagesConfig", isSignal: true, isRequired: false, transformFunction: null }, clipboardSnackbarMessagesEnabled: { classPropertyName: "clipboardSnackbarMessagesEnabled", publicName: "clipboardSnackbarMessagesEnabled", isSignal: true, isRequired: false, transformFunction: null }, clickToCopyIcon: { classPropertyName: "clickToCopyIcon", publicName: "clickToCopyIcon", isSignal: true, isRequired: false, transformFunction: null }, clickIconToCopyOnly: { classPropertyName: "clickIconToCopyOnly", publicName: "clickIconToCopyOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-click-to-copy-text-component" }, viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "dbxClickToCopyText", first: true, predicate: DbxClickToCopyTextDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
16370
- <span #content [dbxClickToCopyText]="copyText()" [disableCopy]="clickIconToCopyOnly()" [highlighted]="highlighted()" [clipboardSnackbarMessagesEnabled]="clipboardSnackbarMessagesEnabled()" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig()" [copyTextFromElement]="contentElementRef()">
16371
- <ng-content></ng-content>
16372
- </span>
16373
- @if (showIcon()) {
16374
- <mat-icon class="dbx-click-to-copy-text-icon" (click)="dbxClickToCopyText()?._copyText()">{{ clickToCopyIcon() }}</mat-icon>
16375
- }
16376
- `, isInline: true, dependencies: [{ kind: "directive", type: DbxClickToCopyTextDirective, selector: "[dbxClickToCopyText]", inputs: ["copyTextFromElement", "dbxClickToCopyText", "disableCopy", "highlighted"], outputs: ["copyTextFromElementChange"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16652
+ class DbxWebFilePreviewComponent {
16653
+ webFilePreviewService = inject(DbxWebFilePreviewService);
16654
+ config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
16655
+ componentConfigSignal = computed(() => {
16656
+ const config = this.config();
16657
+ let componentConfig;
16658
+ if (config) {
16659
+ componentConfig = this.webFilePreviewService.createPreviewConfig(config);
16660
+ }
16661
+ return componentConfig;
16662
+ }, ...(ngDevMode ? [{ debugName: "componentConfigSignal" }] : /* istanbul ignore next */ []));
16663
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16664
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxWebFilePreviewComponent, isStandalone: true, selector: "dbx-web-file-preview", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
16665
+ <dbx-injection [config]="componentConfigSignal()"></dbx-injection>
16666
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16377
16667
  }
16378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxClickToCopyTextComponent, decorators: [{
16668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxWebFilePreviewComponent, decorators: [{
16379
16669
  type: Component,
16380
16670
  args: [{
16381
- selector: 'dbx-click-to-copy-text',
16671
+ selector: 'dbx-web-file-preview',
16382
16672
  template: `
16383
- <span #content [dbxClickToCopyText]="copyText()" [disableCopy]="clickIconToCopyOnly()" [highlighted]="highlighted()" [clipboardSnackbarMessagesEnabled]="clipboardSnackbarMessagesEnabled()" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig()" [copyTextFromElement]="contentElementRef()">
16384
- <ng-content></ng-content>
16385
- </span>
16386
- @if (showIcon()) {
16387
- <mat-icon class="dbx-click-to-copy-text-icon" (click)="dbxClickToCopyText()?._copyText()">{{ clickToCopyIcon() }}</mat-icon>
16388
- }
16673
+ <dbx-injection [config]="componentConfigSignal()"></dbx-injection>
16389
16674
  `,
16390
- host: {
16391
- class: 'dbx-click-to-copy-text-component'
16392
- },
16393
- imports: [DbxClickToCopyTextDirective, MatIcon],
16675
+ standalone: true,
16394
16676
  changeDetection: ChangeDetectionStrategy.OnPush,
16395
- standalone: true
16677
+ imports: [DbxInjectionComponent]
16396
16678
  }]
16397
- }], propDecorators: { contentElementRef: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], dbxClickToCopyText: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DbxClickToCopyTextDirective), { isSignal: true }] }], copyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyText", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }], clipboardSnackbarMessagesConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesConfig", required: false }] }], clipboardSnackbarMessagesEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboardSnackbarMessagesEnabled", required: false }] }], clickToCopyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickToCopyIcon", required: false }] }], clickIconToCopyOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickIconToCopyOnly", required: false }] }] } });
16679
+ }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
16398
16680
 
16399
- const importsAndExports$1 = [DbxUnitedStatesAddressComponent, DbxNumberWithLimitComponent, DbxClickToCopyTextDirective, DbxClickToCopyTextComponent, DbxChipDirective, DbxChipListComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxLabelBlockComponent, DbxLinkifyComponent, DbxTextChipsComponent, DbxIconSpacerDirective];
16400
16681
  /**
16401
- * Angular module that bundles all text-related layout components and directives, including
16402
- * address display, chips, detail blocks, copy-to-clipboard, linkify, and number-with-limit.
16682
+ * Builds a directory tree from an array of zip archive entries, enriching each node with MIME type detection and blob retrieval capability.
16683
+ *
16684
+ * @param entries - Array of zip archive entries to build the tree from, or null/undefined for an empty tree.
16685
+ * @returns The root node of the constructed directory tree with MIME types and blob getters attached.
16686
+ *
16687
+ * @example
16688
+ * ```typescript
16689
+ * const root = dbxZipBlobPreviewEntryTreeFromEntries(zipEntries);
16690
+ * // root.children contains the top-level files and directories
16691
+ * ```
16403
16692
  */
16404
- class DbxTextModule {
16405
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16406
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, imports: [DbxUnitedStatesAddressComponent, DbxNumberWithLimitComponent, DbxClickToCopyTextDirective, DbxClickToCopyTextComponent, DbxChipDirective, DbxChipListComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxLabelBlockComponent, DbxLinkifyComponent, DbxTextChipsComponent, DbxIconSpacerDirective], exports: [DbxUnitedStatesAddressComponent, DbxNumberWithLimitComponent, DbxClickToCopyTextDirective, DbxClickToCopyTextComponent, DbxChipDirective, DbxChipListComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxLabelBlockComponent, DbxLinkifyComponent, DbxTextChipsComponent, DbxIconSpacerDirective] });
16407
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, imports: [DbxClickToCopyTextComponent, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxStepBlockComponent, DbxTextChipsComponent] });
16408
- }
16409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTextModule, decorators: [{
16410
- type: NgModule,
16411
- args: [{
16412
- imports: importsAndExports$1,
16413
- exports: importsAndExports$1
16414
- }]
16415
- }] });
16416
-
16417
- class DbxLayoutModule {
16418
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16419
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, imports: [DbxCompactDirective, DbxFlexGroupDirective, DbxFlexSizeDirective], exports: [DbxBarLayoutModule, DbxCardBoxLayoutModule, DbxColumnLayoutModule, DbxCompactDirective, DbxContentLayoutModule, DbxFlagLayoutModule, DbxFlexGroupDirective, DbxFlexSizeDirective, DbxSectionLayoutModule, DbxStyleLayoutModule, DbxTextModule] });
16420
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, imports: [DbxBarLayoutModule, DbxCardBoxLayoutModule, DbxColumnLayoutModule, DbxContentLayoutModule, DbxFlagLayoutModule, DbxSectionLayoutModule, DbxStyleLayoutModule, DbxTextModule] });
16693
+ function dbxZipBlobPreviewEntryTreeFromEntries(entries) {
16694
+ const nodeValues = (entries ?? []).map((value) => {
16695
+ const nodeSlashPathDetails = slashPathDetails(value.filename);
16696
+ const mimeType = mimeTypeForFileExtension(nodeSlashPathDetails.typedFileExtension);
16697
+ return {
16698
+ value,
16699
+ mimeType,
16700
+ slashPathDetails: nodeSlashPathDetails,
16701
+ getBlob: value.getData ? () => value.getData(new BlobWriter(mimeType ?? undefined)) : undefined
16702
+ };
16703
+ });
16704
+ return slashPathDirectoryTree(nodeValues);
16421
16705
  }
16422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxLayoutModule, decorators: [{
16423
- type: NgModule,
16424
- args: [{
16425
- imports: [DbxCompactDirective, DbxFlexGroupDirective, DbxFlexSizeDirective],
16426
- exports: [DbxBarLayoutModule, DbxCardBoxLayoutModule, DbxColumnLayoutModule, DbxCompactDirective, DbxContentLayoutModule, DbxFlagLayoutModule, DbxFlexGroupDirective, DbxFlexSizeDirective, DbxSectionLayoutModule, DbxStyleLayoutModule, DbxTextModule]
16427
- }]
16428
- }] });
16429
16706
 
16430
16707
  /**
16431
16708
  * Returns the appropriate Material icon name for a zip entry tree node: "folder" for directories, "note" for files with a known MIME type, or "question_mark" for unknown files.
@@ -16497,7 +16774,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
16497
16774
  */
16498
16775
  class DbxZipPreviewEntryListViewItemComponent extends AbstractDbxValueListViewItemComponent {
16499
16776
  get name() {
16500
- return this.itemValue.value.value.filename ?? 'hello';
16777
+ return this.itemValue.value.value.filename;
16501
16778
  }
16502
16779
  get lastModDate() {
16503
16780
  return this.itemValue.value.value.lastModDate ?? undefined;
@@ -16525,43 +16802,25 @@ class DbxZipPreviewEntryListViewItemComponent extends AbstractDbxValueListViewIt
16525
16802
  }
16526
16803
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxZipPreviewEntryListViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
16527
16804
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxZipPreviewEntryListViewItemComponent, isStandalone: true, selector: "dbx-zip-preview-file-entry-list-view-item", usesInheritance: true, ngImport: i0, template: `
16528
- <div class="dbx-list-item-padded dbx-list-two-line-item">
16529
- <div class="item-left">
16530
- <div class="mat-subtitle-2">{{ name }}</div>
16531
- @if (lastModDate) {
16532
- <div class="item-details">{{ lastModDate | date: 'short' }}</div>
16533
- }
16534
- </div>
16535
- <dbx-spacer></dbx-spacer>
16536
- <div class="item-right">
16537
- @if (canDownload) {
16538
- <dbx-download-blob-button [config]="downloadBlobButtonConfig"></dbx-download-blob-button>
16539
- }
16540
- </div>
16541
- </div>
16542
- `, isInline: true, dependencies: [{ kind: "directive", type: DbxSpacerDirective, selector: "dbx-spacer, [dbxSpacer]" }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
16805
+ <dbx-file-list-item [name]="name" [detailsDate]="lastModDate">
16806
+ @if (canDownload) {
16807
+ <dbx-download-blob-button [config]="downloadBlobButtonConfig"></dbx-download-blob-button>
16808
+ }
16809
+ </dbx-file-list-item>
16810
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxFileListItemComponent, selector: "dbx-file-list-item", inputs: ["config", "name", "icon", "details", "detailsDate", "detailsDateStyle", "detailsClass"] }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }] });
16543
16811
  }
16544
16812
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxZipPreviewEntryListViewItemComponent, decorators: [{
16545
16813
  type: Component,
16546
16814
  args: [{
16547
16815
  selector: 'dbx-zip-preview-file-entry-list-view-item',
16548
16816
  template: `
16549
- <div class="dbx-list-item-padded dbx-list-two-line-item">
16550
- <div class="item-left">
16551
- <div class="mat-subtitle-2">{{ name }}</div>
16552
- @if (lastModDate) {
16553
- <div class="item-details">{{ lastModDate | date: 'short' }}</div>
16554
- }
16555
- </div>
16556
- <dbx-spacer></dbx-spacer>
16557
- <div class="item-right">
16558
- @if (canDownload) {
16559
- <dbx-download-blob-button [config]="downloadBlobButtonConfig"></dbx-download-blob-button>
16560
- }
16561
- </div>
16562
- </div>
16817
+ <dbx-file-list-item [name]="name" [detailsDate]="lastModDate">
16818
+ @if (canDownload) {
16819
+ <dbx-download-blob-button [config]="downloadBlobButtonConfig"></dbx-download-blob-button>
16820
+ }
16821
+ </dbx-file-list-item>
16563
16822
  `,
16564
- imports: [DatePipe, DbxSpacerDirective, DbxDownloadBlobButtonComponent],
16823
+ imports: [DbxFileListItemComponent, DbxDownloadBlobButtonComponent],
16565
16824
  standalone: true
16566
16825
  }]
16567
16826
  }] });
@@ -16983,7 +17242,7 @@ class DbxWebPageTitleService {
16983
17242
  * The active leaf reference: the most recently registered reference whose `isLeaf$` is currently true. Emits `undefined` when no leaves exist.
16984
17243
  */
16985
17244
  leafReference$ = this._references.pipe(switchMap((set) => {
16986
- const refs = [...set];
17245
+ const refs = Array.from(set);
16987
17246
  const obs = refs.length === 0
16988
17247
  ? of(undefined)
16989
17248
  : combineLatest(refs.map((ref) => ref.isLeaf$.pipe(map((isLeaf) => ({ ref, isLeaf }))))).pipe(map((items) => items
@@ -17184,7 +17443,7 @@ class DbxWidgetService {
17184
17443
  }
17185
17444
  // MARK: Get
17186
17445
  getWidgetIdentifiers() {
17187
- return [...this._entries.keys()];
17446
+ return Array.from(this._entries.keys());
17188
17447
  }
17189
17448
  getWidgetEntry(type) {
17190
17449
  return this._entries.get(type);
@@ -17387,11 +17646,11 @@ class DbxHelpContextService {
17387
17646
  /**
17388
17647
  * Observable of all currently active help context strings.
17389
17648
  */
17390
- activeHelpContextKeys$ = this._contextReferences.pipe(switchMap((allReferences) => combineLatest([...allReferences].map((ref) => ref.helpContextKeys$)).pipe(map((x) => x.flat()), defaultIfEmpty([]), map((x) => new Set(x)))), distinctUntilHasDifferentValues(), shareReplay(1));
17649
+ activeHelpContextKeys$ = this._contextReferences.pipe(switchMap((allReferences) => combineLatest(Array.from(allReferences).map((ref) => ref.helpContextKeys$)).pipe(map((x) => x.flat()), defaultIfEmpty([]), map((x) => new Set(x)))), distinctUntilHasDifferentValues(), shareReplay(1));
17391
17650
  /**
17392
17651
  * Observable array of all currently active help context key strings.
17393
17652
  */
17394
- activeHelpContextKeysArray$ = this.activeHelpContextKeys$.pipe(map((x) => [...x]), shareReplay(1));
17653
+ activeHelpContextKeysArray$ = this.activeHelpContextKeys$.pipe(map((x) => Array.from(x)), shareReplay(1));
17395
17654
  /**
17396
17655
  * Registers a help context reference, adding its keys to the active set.
17397
17656
  *
@@ -17594,7 +17853,7 @@ class DbxHelpWidgetService {
17594
17853
  * @returns Array of all registered help context keys.
17595
17854
  */
17596
17855
  getAllRegisteredHelpContextKeys() {
17597
- return [...this._entries.keys()];
17856
+ return Array.from(this._entries.keys());
17598
17857
  }
17599
17858
  /**
17600
17859
  * Retrieves the widget entry for a given help context key. Falls back to a default entry if a default widget component class is configured.
@@ -21669,5 +21928,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
21669
21928
  * Generated bundle index. Do not edit.
21670
21929
  */
21671
21930
 
21672
- export { APP_POPUP_MINIMIZED_WIDTH, APP_POPUP_NORMAL_HEIGHT, APP_POPUP_NORMAL_WIDTH, AbstractDbxClipboardDirective, AbstractDbxErrorWidgetComponent, AbstractDbxFileUploadComponent, AbstractDbxHelpWidgetDirective, AbstractDbxListAccordionViewDirective, AbstractDbxListGridViewDirective, AbstractDbxListViewDirective, AbstractDbxListWrapperDirective, AbstractDbxPartialPresetFilterMenuDirective, AbstractDbxSegueAnchorDirective, AbstractDbxSelectionListViewDirective, AbstractDbxSelectionListWrapperDirective, AbstractDbxValueListItemModifierDirective, AbstractDbxValueListViewDirective, AbstractDbxValueListViewItemComponent, AbstractDbxWidgetComponent, AbstractDialogDirective, AbstractFilterPopoverButtonDirective, AbstractPopoverDirective, AbstractPopoverRefDirective, AbstractPopoverRefWithEventsDirective, AbstractPopupDirective, AbstractPromptConfirmDirective, CompactContextStore, CompactMode, DBX_ACTION_SNACKBAR_DEFAULTS, DBX_ACTION_SNACKBAR_SERVICE_CONFIG, DBX_AVATAR_CONTEXT_DATA_TOKEN, DBX_COLOR_CUSTOM_BG_CSS_CLASS, DBX_COLOR_CUSTOM_TEXT_CSS_CLASS, DBX_CURATED_COLOR_COUNT, DBX_CURATED_COLOR_TEMPLATES, DBX_CURATED_COLOR_TEMPLATE_KEY_PREFIX, DBX_DARK_STYLE_CLASS_SUFFIX, DBX_HELP_WIDGET_ENTRY_DATA_TOKEN, DBX_LIST_ACCORDION_VIEW_COMPONENT_IMPORTS_AND_EXPORTS, DBX_LIST_GRID_VIEW_COMPONENT_IMPORTS_AND_EXPORTS, DBX_LIST_ITEM_DISABLE_RIPPLE_LIST_ITEM_MODIFIER_KEY, DBX_LIST_ITEM_IS_SELECTED_ITEM_MODIFIER_KEY, DBX_MODEL_VIEW_TRACKER_STORAGE_ACCESSOR_TOKEN, DBX_PDF_MERGE_EDITOR_CONFIG, DBX_PDF_MERGE_EDITOR_INITIAL_STATE, DBX_PDF_MERGE_EDITOR_PRESERVE_ENTRIES_ON_SLOT_DESTROY, DBX_PDF_MERGE_ENCRYPTED_ERROR_MESSAGE, DBX_PDF_MERGE_ENCRYPTED_NOT_EDITABLE_MESSAGE, DBX_PDF_MERGE_IGNORED_ENTRY_MESSAGE, DBX_PDF_MERGE_IMPORT_ERROR_MESSAGES, DBX_PDF_MERGE_SUPERSEDED_SLOT_MESSAGE, DBX_PROGRESS_BUTTON_GLOBAL_CONFIG, DBX_ROUTER_ANCHOR_COMPONENTS, DBX_ROUTER_VALUE_LIST_ITEM_MODIFIER_KEY, DBX_THEME_COLORS, DBX_THEME_COLORS_EXTRA, DBX_THEME_COLORS_EXTRA_SECONDARY, DBX_THEME_COLORS_MAIN, DBX_VALUE_LIST_VIEW_ITEM, DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN, DBX_WEB_FILE_PREVIEW_SERVICE_ZIP_COMPONENT_PRESET, DBX_WEB_FILE_PREVIEW_SERVICE_ZIP_PRESET_ENTRY, DBX_WEB_PAGE_TITLE_SERVICE_CONFIG, DEFAULT_DBX_CHIP_TONE, DEFAULT_DBX_DETACH_KEY, DEFAULT_DBX_ERROR_SNACKBAR_CONFIG, DEFAULT_DBX_HELP_VIEW_POPOVER_KEY, DEFAULT_DBX_LINKIFY_STRING_TYPE, DEFAULT_DBX_LIST_ACCORDION_VIEW_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_LIST_GRID_VIEW_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_LIST_ITEM_DISABLE_FUNCTION, DEFAULT_DBX_LIST_ITEM_IS_SELECTED_FUNCTION, DEFAULT_DBX_LIST_SCROLL_DISTANCE, DEFAULT_DBX_LIST_THROTTLE_SCROLL, DEFAULT_DBX_LIST_VIEW_META_ICON, DEFAULT_DBX_PDF_MERGE_ENCRYPTED_HANDLING, DEFAULT_DBX_PDF_MERGE_PAGE_EDITING, DEFAULT_DBX_PDF_MERGE_RESTORE_IMPORT_ON_CLEAR, DEFAULT_DBX_PDF_MERGE_SIDECAR, DEFAULT_DBX_PROMPT_CONFIRM_DIALOG_CONFIG, DEFAULT_DBX_SELECTION_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_SIDENAV_MENU_ICON, DEFAULT_DBX_STYLE_CONFIG_TOKEN, DEFAULT_DBX_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_DIALOG_WITH_COMPONENT_FUNCTION, DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_PREVIEW_COMPONENT_FUNCTION, DEFAULT_ERROR_POPOVER_KEY, DEFAULT_ERROR_WIDGET_CODE, DEFAULT_FILTER_POPOVER_KEY, DEFAULT_IMAGE_BITMAP_TO_BLOB_ENCODER, DEFAULT_IMAGE_JPEG_QUALITY, DEFAULT_LIST_GRID_SIZE_CONFIG, DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_LOADING_PROGRESS_DIAMETER, DEFAULT_PDF_MERGE_ACCEPT, DEFAULT_PDF_MERGE_PAGE_GROUP_KEY, DEFAULT_SCREEN_MEDIA_SERVICE_CONFIG, DEFAULT_SNACKBAR_DIRECTIVE_DURATION, DEFAULT_TWO_COLUMNS_MIN_RIGHT_WIDTH, DEFAULT_VALUE_LIST_VIEW_CONTENT_COMPONENT_TRACK_BY_FUNCTION, DbxAccordionHeaderHeightDirective, DbxActionConfirmDirective, DbxActionDialogDirective, DbxActionErrorDirective, DbxActionKeyTriggerDirective, DbxActionLoadingContextDirective, DbxActionModule, DbxActionPopoverDirective, DbxActionSnackbarComponent, DbxActionSnackbarDirective, DbxActionSnackbarErrorDirective, DbxActionSnackbarModule, DbxActionSnackbarService, DbxActionTransitionSafetyDirective, DbxActionUIRouterTransitionSafetyDialogComponent, DbxAnchorComponent, DbxAnchorContentComponent, DbxAnchorIconComponent, DbxAnchorListComponent, DbxAngularRouterSegueAnchorComponent, DbxAvatarComponent, DbxAvatarViewComponent, DbxAvatarViewService, DbxAvatarViewServiceConfig, DbxBarDirective, DbxBarHeaderComponent, DbxBarLayoutModule, DbxBasicLoadingComponent, DbxBodyDirective, DbxButtonComponent, DbxButtonModule, DbxButtonSpacerDirective, DbxCardBoxComponent, DbxCardBoxContainerDirective, DbxCardBoxLayoutModule, DbxChipDirective, DbxChipListComponent, DbxClickToCopyTextComponent, DbxClickToCopyTextDirective, DbxColorDirective, DbxColorService, DbxColorServiceConfig, DbxColumnLayoutModule, DbxCompactDirective, DbxCompactLayoutModule, DbxContentBorderDirective, DbxContentBoxDirective, DbxContentContainerDirective, DbxContentDirective, DbxContentElevateDirective, DbxContentLayoutModule, DbxContentPageDirective, DbxContentPitDirective, DbxDetachContentComponent, DbxDetachControlButtonsComponent, DbxDetachController, DbxDetachControlsComponent, DbxDetachInitDirective, DbxDetachInteractionModule, DbxDetachOutletComponent, DbxDetachOverlayComponent, DbxDetachService, DbxDetachWindowState, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxDialogContentCloseComponent, DbxDialogContentDirective, DbxDialogContentFooterComponent, DbxDialogInteractionModule, DbxDialogModule, DbxDownloadBlobButtonComponent, DbxDownloadTextViewComponent, DbxEmbedComponent, DbxErrorComponent, DbxErrorDefaultErrorWidgetComponent, DbxErrorDetailsComponent, DbxErrorPopoverComponent, DbxErrorSnackbarComponent, DbxErrorSnackbarService, DbxErrorViewComponent, DbxErrorWidgetService, DbxErrorWidgetViewComponent, DbxFileUploadActionCompatable, DbxFileUploadActionSyncDirective, DbxFileUploadAreaComponent, DbxFileUploadButtonComponent, DbxFileUploadComponent, DbxFilterInteractionModule, DbxFilterPopoverButtonComponent, DbxFilterPopoverComponent, DbxFilterWrapperComponent, DbxFlagComponent, DbxFlagLayoutModule, DbxFlagPromptComponent, DbxFlexGroupDirective, DbxFlexLayoutModule, DbxFlexSizeDirective, DbxHelpContextDirective, DbxHelpContextService, DbxHelpViewListComponent, DbxHelpViewListEntryComponent, DbxHelpViewPopoverButtonComponent, DbxHelpViewPopoverComponent, DbxHelpWidgetService, DbxHelpWidgetServiceConfig, DbxIconButtonComponent, DbxIconButtonModule, DbxIconItemComponent, DbxIconSpacerDirective, DbxIconTileComponent, DbxIconTileDirective, DbxIfSidenavDisplayModeDirective, DbxIframeComponent, DbxInjectionDialogComponent, DbxInteractionModule, DbxIntroActionSectionComponent, DbxLabelBlockComponent, DbxLayoutModule, DbxLinkComponent, DbxLinkifyComponent, DbxLinkifyService, DbxLinkifyServiceConfig, DbxListAccordionViewComponentImportsModule, DbxListComponent, DbxListEmptyContentComponent, DbxListGridViewComponentImportsModule, DbxListInternalContentDirective, DbxListItemAnchorModifierDirective, DbxListItemDisableRippleModifierDirective, DbxListItemIsSelectedModifierDirective, DbxListModifierModule, DbxListModule, DbxListTitleGroupDirective, DbxListView, DbxListViewMetaIconComponent, DbxListViewWrapper, DbxListWrapperComponentImportsModule, DbxLoadingComponent, DbxLoadingErrorDirective, DbxLoadingModule, DbxLoadingProgressComponent, DbxModelObjectStateService, actions as DbxModelStateActions, model_actions as DbxModelStateModelActions, DbxModelTrackerService, DbxModelTypesService, DbxModelViewTrackerStorage, DbxNavbarComponent, DbxNumberWithLimitComponent, DbxOneColumnComponent, DbxOneColumnLayoutModule, DbxPagebarComponent, DbxPartialPresetFilterListComponent, DbxPartialPresetFilterMenuComponent, DbxPdfMergeEditorComponent, DbxPdfMergeEditorFileUploadComponent, DbxPdfMergeEditorFileUploadHasStateDirective, DbxPdfMergeEditorFileUploadValidatorDirective, DbxPdfMergeEditorStore, DbxPdfMergeEditorStoreDirective, DbxPdfMergeEntryComponent, DbxPdfMergeImportComponent, DbxPdfMergeListComponent, DbxPdfMergePageComponent, DbxPdfMergePageListComponent, DbxPdfMergeUploadActionDirective, DbxPdfMergeUploadButtonDirective, DbxPdfMergeUploadDialogComponent, DbxPdfPreviewComponent, DbxPopoverCloseButtonComponent, DbxPopoverComponent, DbxPopoverComponentController, DbxPopoverContentComponent, DbxPopoverController, DbxPopoverControlsDirective, DbxPopoverCoordinatorComponent, DbxPopoverCoordinatorService, DbxPopoverHeaderComponent, DbxPopoverInteractionContentModule, DbxPopoverInteractionModule, DbxPopoverScrollContentDirective, DbxPopoverService, DbxPopupComponent, DbxPopupComponentController, DbxPopupContentComponent, DbxPopupControlButtonsComponent, DbxPopupController, DbxPopupControlsComponent, DbxPopupCoordinatorComponent, DbxPopupCoordinatorService, DbxPopupInteractionModule, DbxPopupService, DbxPopupWindowState, DbxPresetFilterListComponent, DbxPresetFilterMenuComponent, DbxProgressBarButtonComponent, DbxProgressButtonsModule, DbxProgressSpinnerButtonComponent, DbxPromptBoxDirective, DbxPromptComponent, DbxPromptConfirm, DbxPromptConfirmButtonDirective, DbxPromptConfirmComponent, DbxPromptConfirmDialogComponent, DbxPromptConfirmDirective, DbxPromptModule, DbxPromptPageComponent, DbxReadableErrorModule, DbxResizedDirective, DbxRouterAnchorModule, DbxRouterLayoutModule, DbxRouterSidenavModule, DbxRouterWebProviderConfig, DbxScreenMediaService, DbxScreenMediaServiceConfig, DbxSectionComponent, DbxSectionHeaderComponent, DbxSectionLayoutModule, DbxSectionPageComponent, DbxSelectionValueListViewComponent, DbxSelectionValueListViewComponentImportsModule, DbxSelectionValueListViewContentComponent, DbxSetStyleDirective, DbxSidenavButtonComponent, DbxSidenavComponent, DbxSidenavPageComponent, DbxSidenavPagebarComponent, DbxSpacerDirective, DbxStepBlockComponent, DbxStructureDirective, DbxStructureModule, DbxStyleBodyDirective, DbxStyleDirective, DbxStyleLayoutModule, DbxStyleService, DbxSubSectionComponent, DbxTextChipsComponent, DbxTextColorDirective, DbxTextModule, DbxTwoBlockComponent, DbxTwoColumnBackDirective, DbxTwoColumnColumnHeadDirective, DbxTwoColumnComponent, DbxTwoColumnContextDirective, DbxTwoColumnFullLeftDirective, DbxTwoColumnLayoutModule, DbxTwoColumnRightComponent, DbxTwoColumnSrefDirective, DbxTwoColumnSrefShowRightDirective, DbxUIRouterSegueAnchorComponent, DbxUnitedStatesAddressComponent, DbxValueListAccordionViewComponent, DbxValueListAccordionViewContentComponent, DbxValueListAccordionViewContentGroupComponent, DbxValueListGridSizeDirective, DbxValueListGridViewComponent, DbxValueListGridViewContentComponent, DbxValueListGridViewContentGroupComponent, DbxValueListItemModifier, DbxValueListItemModifierDirective, DbxValueListView, DbxValueListViewComponent, DbxValueListViewComponentImportsModule, DbxValueListViewContentComponent, DbxValueListViewContentGroupComponent, DbxValueListViewGroupDelegate, DbxWebFilePreviewComponent, DbxWebFilePreviewService, DbxWebModule, DbxWebPageTitleInfoDirective, DbxWebPageTitleService, DbxWidgetListGridComponent, DbxWidgetListGridViewComponent, DbxWidgetListGridViewItemComponent, DbxWidgetService, DbxWidgetViewComponent, DbxWindowKeyDownListenerDirective, DbxZipBlobPreviewComponent, DbxZipPreviewComponent, PDF_MERGE_PAGE_ID_SEPARATOR, PDF_MERGE_PAGE_TAG_KEY, PDF_MERGE_RESULT_MIME_TYPE, PDF_MERGE_SIDECAR_DESCRIPTION, PDF_MERGE_SIDECAR_FILE_NAME, PDF_MERGE_SIDECAR_VERSION, PopoverPositionStrategy, PopupGlobalPositionStrategy, SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP, SIDE_NAV_DISPLAY_MODE_ORDER, SideNavDisplayMode, TRACK_BY_MODEL_ID, TRACK_BY_MODEL_KEY, TwoColumnsContextStore, UNKNOWN_ERROR_WIDGET_CODE, addConfigToValueListItems, allDbxModelViewTrackerEventModelKeys, allDbxModelViewTrackerEventSetModelKeys, asPdfMergeFile, attachPdfMergeSidecar, buildPdfMergeEntriesFromSidecar, buildPdfMergeEntry, buildPdfMergeEntrySync, buildPdfMergePagePlan, catchErrorServerParams, classifyPdfMergeFile, compactModeFromInput, compareScreenMediaWidthTypes, compressImageFile, convertServerErrorParams, convertToPOJOServerErrorResponse, convertToServerErrorResponse, copyToClipboardFunction, dbxColorBackground, dbxCuratedColorConfigForString, dbxListAccordionViewComponentImportsAndExports, dbxListGridViewComponentImportsAndExports, dbxPresetFilterMenuButtonIconObservable, dbxPresetFilterMenuButtonTextObservable, dbxStyleClassCleanSuffix, dbxThemeColorCssToken, dbxThemeColorCssTokenVar, dbxThemeColorCssVariable, dbxThemeColorCssVariableVar, dbxValueListItemDecisionFunction, dbxValueListItemKeyForItemValue, dbxWebDefaultPageTitleDelegate, dbxZipBlobPreviewEntryTreeFromEntries, defaultDbxModelViewTrackerStorageAccessorFactory, defaultDbxValueListViewGroupDelegate, defaultDbxValueListViewGroupValuesFunction, disableRightClickInCdkBackdrop, entryIdForPdfMergePageId, fileAcceptFilterTypeStringArray, fileAcceptFunction, fileAcceptString, fileArrayAcceptMatchFunction, flattenAccordionGroups, formatPdfMergeEntrySize, index as fromDbxModel, injectCopyToClipboardFunction, injectCopyToClipboardFunctionWithSnackbarMessage, isDbxColorConfig, listItemModifier, makeDbxActionSnackbarDisplayConfigGeneratorFunction, makePdfMergePageId, makePdfMergeSidecar, makePdfMergeSidecarPageTag, mapCompactModeObs, mapValuesToValuesListItemConfigObs, mergePdfMergeEntries, index$1 as onDbxModel, openEmbedDialog, openIframeDialog, openPdfPreviewDialog, openZipPreviewDialog, overrideClickElementEffect, pdfMergeEntriesUseEncryptedPassthrough, pdfMergePageGroupKeyForSlotId, provideDbxDetachController, provideDbxFileUploadActionCompatable, provideDbxHelpServices, provideDbxLinkify, provideDbxListView, provideDbxListViewWrapper, provideDbxModelService, provideDbxPdfMergeEditorConfig, provideDbxPdfMergeEditorPreserveEntriesOnSlotDestroy, provideDbxProgressButtonGlobalConfig, provideDbxPromptConfirm, provideDbxRouterWebAngularRouterProviderConfig, provideDbxRouterWebUiRouterProviderConfig, provideDbxScreenMediaService, provideDbxStyleService, provideDbxValueListView, provideDbxValueListViewGroupDelegate, provideDbxValueListViewModifier, provideDbxWebFilePreviewServiceEntries, provideDbxWebPageTitleService, provideTwoColumnsContext, readPdfMergeEntryPageMetas, readPdfMergePageTag, readPdfMergeSidecar, registerHelpContextKeysWithDbxHelpContextService, resizeSignal, resolveSideNavDisplayMode, sanitizeDbxDialogContentConfig, screenMediaWidthTypeIsActive, splitPdfMergeSidecarDocuments, trackByModelKeyRef, trackByUniqueIdentifier, validatePdfMergeEntry, writePdfMergePageTag };
21931
+ export { APP_POPUP_MINIMIZED_WIDTH, APP_POPUP_NORMAL_HEIGHT, APP_POPUP_NORMAL_WIDTH, AbstractDbxClipboardDirective, AbstractDbxErrorWidgetComponent, AbstractDbxFileUploadComponent, AbstractDbxHelpWidgetDirective, AbstractDbxListAccordionViewDirective, AbstractDbxListGridViewDirective, AbstractDbxListViewDirective, AbstractDbxListWrapperDirective, AbstractDbxPartialPresetFilterMenuDirective, AbstractDbxSegueAnchorDirective, AbstractDbxSelectionListViewDirective, AbstractDbxSelectionListWrapperDirective, AbstractDbxValueListItemModifierDirective, AbstractDbxValueListViewDirective, AbstractDbxValueListViewItemComponent, AbstractDbxWidgetComponent, AbstractDialogDirective, AbstractFilterPopoverButtonDirective, AbstractPopoverDirective, AbstractPopoverRefDirective, AbstractPopoverRefWithEventsDirective, AbstractPopupDirective, AbstractPromptConfirmDirective, CompactContextStore, CompactMode, DBX_ACTION_SNACKBAR_DEFAULTS, DBX_ACTION_SNACKBAR_SERVICE_CONFIG, DBX_AVATAR_CONTEXT_DATA_TOKEN, DBX_COLOR_CUSTOM_BG_CSS_CLASS, DBX_COLOR_CUSTOM_TEXT_CSS_CLASS, DBX_CURATED_COLOR_COUNT, DBX_CURATED_COLOR_TEMPLATES, DBX_CURATED_COLOR_TEMPLATE_KEY_PREFIX, DBX_DARK_STYLE_CLASS_SUFFIX, DBX_HELP_WIDGET_ENTRY_DATA_TOKEN, DBX_LIST_ACCORDION_VIEW_COMPONENT_IMPORTS_AND_EXPORTS, DBX_LIST_GRID_VIEW_COMPONENT_IMPORTS_AND_EXPORTS, DBX_LIST_ITEM_DISABLE_RIPPLE_LIST_ITEM_MODIFIER_KEY, DBX_LIST_ITEM_IS_SELECTED_ITEM_MODIFIER_KEY, DBX_MODEL_VIEW_TRACKER_STORAGE_ACCESSOR_TOKEN, DBX_PDF_MERGE_EDITOR_CONFIG, DBX_PDF_MERGE_EDITOR_INITIAL_STATE, DBX_PDF_MERGE_EDITOR_PRESERVE_ENTRIES_ON_SLOT_DESTROY, DBX_PDF_MERGE_ENCRYPTED_ERROR_MESSAGE, DBX_PDF_MERGE_ENCRYPTED_NOT_EDITABLE_MESSAGE, DBX_PDF_MERGE_IGNORED_ENTRY_MESSAGE, DBX_PDF_MERGE_IMPORT_ERROR_MESSAGES, DBX_PDF_MERGE_SUPERSEDED_SLOT_MESSAGE, DBX_PROGRESS_BUTTON_GLOBAL_CONFIG, DBX_ROUTER_ANCHOR_COMPONENTS, DBX_ROUTER_VALUE_LIST_ITEM_MODIFIER_KEY, DBX_THEME_COLORS, DBX_THEME_COLORS_EXTRA, DBX_THEME_COLORS_EXTRA_SECONDARY, DBX_THEME_COLORS_MAIN, DBX_VALUE_LIST_VIEW_ITEM, DBX_WEB_FILE_PREVIEW_SERVICE_ENTRIES_TOKEN, DBX_WEB_FILE_PREVIEW_SERVICE_ZIP_COMPONENT_PRESET, DBX_WEB_FILE_PREVIEW_SERVICE_ZIP_PRESET_ENTRY, DBX_WEB_PAGE_TITLE_SERVICE_CONFIG, DEFAULT_DBX_CHIP_TONE, DEFAULT_DBX_DETACH_KEY, DEFAULT_DBX_ERROR_SNACKBAR_CONFIG, DEFAULT_DBX_FILE_LIST_ITEM_DETAILS_CLASS, DEFAULT_DBX_FILE_LIST_ITEM_DETAILS_DATE_STYLE, DEFAULT_DBX_HELP_VIEW_POPOVER_KEY, DEFAULT_DBX_LINKIFY_STRING_TYPE, DEFAULT_DBX_LIST_ACCORDION_VIEW_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_LIST_GRID_VIEW_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_LIST_ITEM_DISABLE_FUNCTION, DEFAULT_DBX_LIST_ITEM_IS_SELECTED_FUNCTION, DEFAULT_DBX_LIST_SCROLL_DISTANCE, DEFAULT_DBX_LIST_THROTTLE_SCROLL, DEFAULT_DBX_LIST_VIEW_META_ICON, DEFAULT_DBX_PDF_MERGE_ENCRYPTED_HANDLING, DEFAULT_DBX_PDF_MERGE_PAGE_EDITING, DEFAULT_DBX_PDF_MERGE_RESTORE_IMPORT_ON_CLEAR, DEFAULT_DBX_PDF_MERGE_SIDECAR, DEFAULT_DBX_PROMPT_CONFIRM_DIALOG_CONFIG, DEFAULT_DBX_SELECTION_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_SIDENAV_MENU_ICON, DEFAULT_DBX_STYLE_CONFIG_TOKEN, DEFAULT_DBX_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_DIALOG_WITH_COMPONENT_FUNCTION, DEFAULT_DBX_WEB_FILE_PREVIEW_SERVICE_PREVIEW_COMPONENT_FUNCTION, DEFAULT_ERROR_POPOVER_KEY, DEFAULT_ERROR_WIDGET_CODE, DEFAULT_FILTER_POPOVER_KEY, DEFAULT_IMAGE_BITMAP_TO_BLOB_ENCODER, DEFAULT_IMAGE_JPEG_QUALITY, DEFAULT_LIST_GRID_SIZE_CONFIG, DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE, DEFAULT_LOADING_PROGRESS_DIAMETER, DEFAULT_PDF_MERGE_ACCEPT, DEFAULT_PDF_MERGE_PAGE_GROUP_KEY, DEFAULT_SCREEN_MEDIA_SERVICE_CONFIG, DEFAULT_SNACKBAR_DIRECTIVE_DURATION, DEFAULT_TWO_COLUMNS_MIN_RIGHT_WIDTH, DEFAULT_VALUE_LIST_VIEW_CONTENT_COMPONENT_TRACK_BY_FUNCTION, DbxAccordionHeaderHeightDirective, DbxActionConfirmDirective, DbxActionDialogDirective, DbxActionErrorDirective, DbxActionKeyTriggerDirective, DbxActionLoadingContextDirective, DbxActionModule, DbxActionPopoverDirective, DbxActionSnackbarComponent, DbxActionSnackbarDirective, DbxActionSnackbarErrorDirective, DbxActionSnackbarModule, DbxActionSnackbarService, DbxActionTransitionSafetyDirective, DbxActionUIRouterTransitionSafetyDialogComponent, DbxAnchorComponent, DbxAnchorContentComponent, DbxAnchorIconComponent, DbxAnchorListComponent, DbxAngularRouterSegueAnchorComponent, DbxAvatarComponent, DbxAvatarViewComponent, DbxAvatarViewService, DbxAvatarViewServiceConfig, DbxBarDirective, DbxBarHeaderComponent, DbxBarLayoutModule, DbxBasicLoadingComponent, DbxBodyDirective, DbxButtonComponent, DbxButtonModule, DbxButtonSpacerDirective, DbxCardBoxComponent, DbxCardBoxContainerDirective, DbxCardBoxLayoutModule, DbxChipDirective, DbxChipListComponent, DbxClickToCopyTextComponent, DbxClickToCopyTextDirective, DbxColorDirective, DbxColorService, DbxColorServiceConfig, DbxColumnLayoutModule, DbxCompactDirective, DbxCompactLayoutModule, DbxContentBorderDirective, DbxContentBoxDirective, DbxContentContainerDirective, DbxContentDirective, DbxContentElevateDirective, DbxContentLayoutModule, DbxContentPageDirective, DbxContentPitDirective, DbxDetachContentComponent, DbxDetachControlButtonsComponent, DbxDetachController, DbxDetachControlsComponent, DbxDetachInitDirective, DbxDetachInteractionModule, DbxDetachOutletComponent, DbxDetachOverlayComponent, DbxDetachService, DbxDetachWindowState, DbxDetailBlockComponent, DbxDetailBlockHeaderComponent, DbxDialogContentCloseComponent, DbxDialogContentDirective, DbxDialogContentFooterComponent, DbxDialogInteractionModule, DbxDialogModule, DbxDownloadBlobButtonComponent, DbxDownloadTextViewComponent, DbxEmbedComponent, DbxErrorComponent, DbxErrorDefaultErrorWidgetComponent, DbxErrorDetailsComponent, DbxErrorPopoverComponent, DbxErrorSnackbarComponent, DbxErrorSnackbarService, DbxErrorViewComponent, DbxErrorWidgetService, DbxErrorWidgetViewComponent, DbxFileListComponent, DbxFileListItemComponent, DbxFileUploadActionCompatable, DbxFileUploadActionSyncDirective, DbxFileUploadAreaComponent, DbxFileUploadButtonComponent, DbxFileUploadComponent, DbxFilterInteractionModule, DbxFilterPopoverButtonComponent, DbxFilterPopoverComponent, DbxFilterWrapperComponent, DbxFlagComponent, DbxFlagLayoutModule, DbxFlagPromptComponent, DbxFlexGroupDirective, DbxFlexLayoutModule, DbxFlexSizeDirective, DbxHelpContextDirective, DbxHelpContextService, DbxHelpViewListComponent, DbxHelpViewListEntryComponent, DbxHelpViewPopoverButtonComponent, DbxHelpViewPopoverComponent, DbxHelpWidgetService, DbxHelpWidgetServiceConfig, DbxIconButtonComponent, DbxIconButtonModule, DbxIconItemComponent, DbxIconSpacerDirective, DbxIconTileComponent, DbxIconTileDirective, DbxIfSidenavDisplayModeDirective, DbxIframeComponent, DbxInjectionDialogComponent, DbxInteractionModule, DbxIntroActionSectionComponent, DbxLabelBlockComponent, DbxLayoutModule, DbxLinkComponent, DbxLinkifyComponent, DbxLinkifyService, DbxLinkifyServiceConfig, DbxListAccordionViewComponentImportsModule, DbxListComponent, DbxListEmptyContentComponent, DbxListGridViewComponentImportsModule, DbxListInternalContentDirective, DbxListItemAnchorModifierDirective, DbxListItemDisableRippleModifierDirective, DbxListItemIsSelectedModifierDirective, DbxListModifierModule, DbxListModule, DbxListTitleGroupDirective, DbxListView, DbxListViewMetaIconComponent, DbxListViewWrapper, DbxListWrapperComponentImportsModule, DbxLoadingComponent, DbxLoadingErrorDirective, DbxLoadingModule, DbxLoadingProgressComponent, DbxModelObjectStateService, actions as DbxModelStateActions, model_actions as DbxModelStateModelActions, DbxModelTrackerService, DbxModelTypesService, DbxModelViewTrackerStorage, DbxNavbarComponent, DbxNumberWithLimitComponent, DbxOneColumnComponent, DbxOneColumnLayoutModule, DbxPagebarComponent, DbxPartialPresetFilterListComponent, DbxPartialPresetFilterMenuComponent, DbxPdfMergeEditorComponent, DbxPdfMergeEditorFileUploadComponent, DbxPdfMergeEditorFileUploadHasStateDirective, DbxPdfMergeEditorFileUploadValidatorDirective, DbxPdfMergeEditorStore, DbxPdfMergeEditorStoreDirective, DbxPdfMergeEntryComponent, DbxPdfMergeImportComponent, DbxPdfMergeListComponent, DbxPdfMergePageComponent, DbxPdfMergePageListComponent, DbxPdfMergeUploadActionDirective, DbxPdfMergeUploadButtonDirective, DbxPdfMergeUploadDialogComponent, DbxPdfPreviewComponent, DbxPopoverCloseButtonComponent, DbxPopoverComponent, DbxPopoverComponentController, DbxPopoverContentComponent, DbxPopoverController, DbxPopoverControlsDirective, DbxPopoverCoordinatorComponent, DbxPopoverCoordinatorService, DbxPopoverHeaderComponent, DbxPopoverInteractionContentModule, DbxPopoverInteractionModule, DbxPopoverScrollContentDirective, DbxPopoverService, DbxPopupComponent, DbxPopupComponentController, DbxPopupContentComponent, DbxPopupControlButtonsComponent, DbxPopupController, DbxPopupControlsComponent, DbxPopupCoordinatorComponent, DbxPopupCoordinatorService, DbxPopupInteractionModule, DbxPopupService, DbxPopupWindowState, DbxPresetFilterListComponent, DbxPresetFilterMenuComponent, DbxProgressBarButtonComponent, DbxProgressButtonsModule, DbxProgressSpinnerButtonComponent, DbxPromptBoxDirective, DbxPromptComponent, DbxPromptConfirm, DbxPromptConfirmButtonDirective, DbxPromptConfirmComponent, DbxPromptConfirmDialogComponent, DbxPromptConfirmDirective, DbxPromptModule, DbxPromptPageComponent, DbxReadableErrorModule, DbxResizedDirective, DbxRouterAnchorModule, DbxRouterLayoutModule, DbxRouterSidenavModule, DbxRouterWebProviderConfig, DbxScreenMediaService, DbxScreenMediaServiceConfig, DbxSectionComponent, DbxSectionHeaderComponent, DbxSectionLayoutModule, DbxSectionPageComponent, DbxSelectionValueListViewComponent, DbxSelectionValueListViewComponentImportsModule, DbxSelectionValueListViewContentComponent, DbxSetStyleDirective, DbxSidenavButtonComponent, DbxSidenavComponent, DbxSidenavPageComponent, DbxSidenavPagebarComponent, DbxSpacerDirective, DbxStepBlockComponent, DbxStructureDirective, DbxStructureModule, DbxStyleBodyDirective, DbxStyleDirective, DbxStyleLayoutModule, DbxStyleService, DbxSubSectionComponent, DbxTextChipsComponent, DbxTextColorDirective, DbxTextModule, DbxTwoBlockComponent, DbxTwoColumnBackDirective, DbxTwoColumnColumnHeadDirective, DbxTwoColumnComponent, DbxTwoColumnContextDirective, DbxTwoColumnFullLeftDirective, DbxTwoColumnLayoutModule, DbxTwoColumnRightComponent, DbxTwoColumnSrefDirective, DbxTwoColumnSrefShowRightDirective, DbxUIRouterSegueAnchorComponent, DbxUnitedStatesAddressComponent, DbxValueListAccordionViewComponent, DbxValueListAccordionViewContentComponent, DbxValueListAccordionViewContentGroupComponent, DbxValueListGridSizeDirective, DbxValueListGridViewComponent, DbxValueListGridViewContentComponent, DbxValueListGridViewContentGroupComponent, DbxValueListItemModifier, DbxValueListItemModifierDirective, DbxValueListView, DbxValueListViewComponent, DbxValueListViewComponentImportsModule, DbxValueListViewContentComponent, DbxValueListViewContentGroupComponent, DbxValueListViewGroupDelegate, DbxWebFilePreviewComponent, DbxWebFilePreviewService, DbxWebModule, DbxWebPageTitleInfoDirective, DbxWebPageTitleService, DbxWidgetListGridComponent, DbxWidgetListGridViewComponent, DbxWidgetListGridViewItemComponent, DbxWidgetService, DbxWidgetViewComponent, DbxWindowKeyDownListenerDirective, DbxZipBlobPreviewComponent, DbxZipPreviewComponent, PDF_MERGE_PAGE_ID_SEPARATOR, PDF_MERGE_PAGE_TAG_KEY, PDF_MERGE_RESULT_MIME_TYPE, PDF_MERGE_SIDECAR_DESCRIPTION, PDF_MERGE_SIDECAR_FILE_NAME, PDF_MERGE_SIDECAR_VERSION, PopoverPositionStrategy, PopupGlobalPositionStrategy, SCREEN_MEDIA_WIDTH_TYPE_SIZE_MAP, SIDE_NAV_DISPLAY_MODE_ORDER, SideNavDisplayMode, TRACK_BY_MODEL_ID, TRACK_BY_MODEL_KEY, TwoColumnsContextStore, UNKNOWN_ERROR_WIDGET_CODE, addConfigToValueListItems, allDbxModelViewTrackerEventModelKeys, allDbxModelViewTrackerEventSetModelKeys, asPdfMergeFile, attachPdfMergeSidecar, buildPdfMergeEntriesFromSidecar, buildPdfMergeEntry, buildPdfMergeEntrySync, buildPdfMergePagePlan, catchErrorServerParams, classifyPdfMergeFile, compactModeFromInput, compareScreenMediaWidthTypes, compressImageFile, convertServerErrorParams, convertToPOJOServerErrorResponse, convertToServerErrorResponse, copyToClipboardFunction, dbxColorBackground, dbxCuratedColorConfigForString, dbxListAccordionViewComponentImportsAndExports, dbxListGridViewComponentImportsAndExports, dbxPresetFilterMenuButtonIconObservable, dbxPresetFilterMenuButtonTextObservable, dbxStyleClassCleanSuffix, dbxThemeColorCssToken, dbxThemeColorCssTokenVar, dbxThemeColorCssVariable, dbxThemeColorCssVariableVar, dbxValueListItemDecisionFunction, dbxValueListItemKeyForItemValue, dbxWebDefaultPageTitleDelegate, dbxZipBlobPreviewEntryTreeFromEntries, defaultDbxModelViewTrackerStorageAccessorFactory, defaultDbxValueListViewGroupDelegate, defaultDbxValueListViewGroupValuesFunction, disableRightClickInCdkBackdrop, entryIdForPdfMergePageId, fileAcceptFilterTypeStringArray, fileAcceptFunction, fileAcceptString, fileArrayAcceptMatchFunction, fileArrayAcceptMaxFiles, flattenAccordionGroups, formatPdfMergeEntrySize, index as fromDbxModel, injectCopyToClipboardFunction, injectCopyToClipboardFunctionWithSnackbarMessage, isDbxColorConfig, listItemModifier, makeDbxActionSnackbarDisplayConfigGeneratorFunction, makePdfMergePageId, makePdfMergeSidecar, makePdfMergeSidecarPageTag, mapCompactModeObs, mapValuesToValuesListItemConfigObs, mergePdfMergeEntries, index$1 as onDbxModel, openEmbedDialog, openIframeDialog, openPdfPreviewDialog, openZipPreviewDialog, overrideClickElementEffect, pdfMergeEntriesUseEncryptedPassthrough, pdfMergePageGroupKeyForSlotId, provideDbxDetachController, provideDbxFileUploadActionCompatable, provideDbxHelpServices, provideDbxLinkify, provideDbxListView, provideDbxListViewWrapper, provideDbxModelService, provideDbxPdfMergeEditorConfig, provideDbxPdfMergeEditorPreserveEntriesOnSlotDestroy, provideDbxProgressButtonGlobalConfig, provideDbxPromptConfirm, provideDbxRouterWebAngularRouterProviderConfig, provideDbxRouterWebUiRouterProviderConfig, provideDbxScreenMediaService, provideDbxStyleService, provideDbxValueListView, provideDbxValueListViewGroupDelegate, provideDbxValueListViewModifier, provideDbxWebFilePreviewServiceEntries, provideDbxWebPageTitleService, provideTwoColumnsContext, readPdfMergeEntryPageMetas, readPdfMergePageTag, readPdfMergeSidecar, registerHelpContextKeysWithDbxHelpContextService, resizeSignal, resolveSideNavDisplayMode, sanitizeDbxDialogContentConfig, screenMediaWidthTypeIsActive, splitPdfMergeSidecarDocuments, trackByModelKeyRef, trackByUniqueIdentifier, validatePdfMergeEntry, writePdfMergePageTag };
21673
21932
  //# sourceMappingURL=dereekb-dbx-web.mjs.map