@dereekb/dbx-web 13.12.6 → 13.12.7

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,14 +1,14 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web/eslint",
3
- "version": "13.12.6",
3
+ "version": "13.12.7",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.12.6",
5
+ "@dereekb/util": "13.12.7",
6
6
  "@typescript-eslint/utils": "8.59.3"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@angular/core": "21.2.11",
10
- "@dereekb/dbx-core": "13.12.6",
11
- "@dereekb/rxjs": "13.12.6",
10
+ "@dereekb/dbx-core": "13.12.7",
11
+ "@dereekb/rxjs": "13.12.7",
12
12
  "@typescript-eslint/parser": "8.59.3",
13
13
  "eslint": "10.4.0",
14
14
  "rxjs": "^7.8.2"
@@ -18041,6 +18041,7 @@ const DBX_PDF_MERGE_EDITOR_INITIAL_STATE = {
18041
18041
  class DbxPdfMergeEditorStore extends ComponentStore {
18042
18042
  _validator$ = new BehaviorSubject(undefined);
18043
18043
  _outputSizeLimit$ = new BehaviorSubject(undefined);
18044
+ _imageCompression$ = new BehaviorSubject(undefined);
18044
18045
  constructor() {
18045
18046
  super(DBX_PDF_MERGE_EDITOR_INITIAL_STATE);
18046
18047
  }
@@ -18119,6 +18120,10 @@ class DbxPdfMergeEditorStore extends ComponentStore {
18119
18120
  */
18120
18121
  currentMergeOutput$ = combineLatest([this._candidateMergeOutput$, this.sizeLimitValid$]).pipe(map(([blob, sizeLimitValid]) => (sizeLimitValid ? blob : undefined)), shareReplay(1));
18121
18122
  mergeOutput$ = this.currentMergeOutput$.pipe(filterMaybe());
18123
+ /**
18124
+ * Emits the active client-side image-compression config pushed via {@link setImageCompression}, or `undefined` when none is set. Consumed by the editor and its slot uploaders as the middle tier of compression resolution (own `[config]` input → store → {@link DBX_PDF_MERGE_EDITOR_CONFIG} token), letting {@link DbxPdfMergeEditorStoreDirective} supply a store-level default that flows through the upload dialog's bare editor.
18125
+ */
18126
+ imageCompression$ = this._imageCompression$.asObservable();
18122
18127
  /**
18123
18128
  * Returns an observable of entries belonging to the given slot id. The result is filtered from {@link entries$} so the per-slot stream still reflects validation progress and removals.
18124
18129
  *
@@ -18151,6 +18156,14 @@ class DbxPdfMergeEditorStore extends ComponentStore {
18151
18156
  setOutputSizeLimit(maxBytes) {
18152
18157
  this._outputSizeLimit$.next(maxBytes ?? undefined);
18153
18158
  }
18159
+ /**
18160
+ * Sets the store-level client-side image-compression config exposed via {@link imageCompression$}. The editor and its slot uploaders apply it as the middle tier of compression resolution (own `[config]` input → store → {@link DBX_PDF_MERGE_EDITOR_CONFIG} token), so a value pushed here by {@link DbxPdfMergeEditorStoreDirective} reaches the upload dialog's bare editor while a per-input/per-slot override still wins. Pass `null`/`undefined` to clear the store-level default.
18161
+ *
18162
+ * @param config - Image-compression config, or a falsy value to clear the store-level default.
18163
+ */
18164
+ setImageCompression(config) {
18165
+ this._imageCompression$.next(config ?? undefined);
18166
+ }
18154
18167
  // MARK: Updaters
18155
18168
  /**
18156
18169
  * Appends entries (already constructed) or builds them from raw files and appends them to state. Each entry's validation promise starts when the entry is built; {@link entries$} reflects each result as it resolves. When `input` is an object with `files` and `slotId`, the resulting entries are tagged with that slot id. When `input` is `{ entries }`, the entries are appended as-is — use this shape for entries that went through async client-side compression upstream.
@@ -18260,6 +18273,14 @@ class DbxPdfMergeEditorStoreDirective {
18260
18273
  this.store.setOutputSizeLimit(errorBytes);
18261
18274
  }
18262
18275
  });
18276
+ // Push the directive's image-compression config onto the store so it reaches the
18277
+ // upload dialog's bare <dbx-pdf-merge-editor> (which renders with no own [config]).
18278
+ // Only the store directive pushes — the editor reads the store as the middle tier of
18279
+ // its resolution chain (own [config] → store → token) — so the bare editor never
18280
+ // clobbers this value with an empty config.
18281
+ effect(() => {
18282
+ this.store.setImageCompression(this.config()?.imageCompression);
18283
+ });
18263
18284
  }
18264
18285
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxPdfMergeEditorStoreDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
18265
18286
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: DbxPdfMergeEditorStoreDirective, isStandalone: true, selector: "[dbxPdfMergeEditorStore]", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, outputSizeLimit: { classPropertyName: "outputSizeLimit", publicName: "outputSizeLimit", isSignal: true, isRequired: false, transformFunction: null } }, providers: [DbxPdfMergeEditorStore], exportAs: ["dbxPdfMergeEditorStore"], ngImport: i0 });
@@ -18541,38 +18562,82 @@ class DbxPdfMergeEditorComponent {
18541
18562
  * Single-slot subscription tracker for the deferred Preview path. Replacing the slot cancels any earlier in-flight wait so rapid clicks (or repeated programmatic calls) cannot stack pending dialogs.
18542
18563
  */
18543
18564
  _pendingPreview = cleanSubscription();
18544
- accept = input(DEFAULT_PDF_MERGE_ACCEPT, ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
18545
- multiple = input(true, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
18546
- fileName = input(DEFAULT_MERGED_FILE_NAME, ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
18547
- showDownloadButton = input(false, ...(ngDevMode ? [{ debugName: "showDownloadButton" }] : /* istanbul ignore next */ []));
18548
- showPreviewButton = input(true, ...(ngDevMode ? [{ debugName: "showPreviewButton" }] : /* istanbul ignore next */ []));
18549
- downloadButton = input(DEFAULT_DOWNLOAD_BUTTON, ...(ngDevMode ? [{ debugName: "downloadButton" }] : /* istanbul ignore next */ []));
18550
- /**
18551
- * When `false`, hides the default "Add files" upload area. Use when projecting one or more {@link DbxPdfMergeEditorFileUploadComponent} slots through `<ng-content>` instead of relying on the unscoped uploader.
18552
- */
18553
- showAddFiles = input(true, ...(ngDevMode ? [{ debugName: "showAddFiles" }] : /* istanbul ignore next */ []));
18554
18565
  /**
18555
- * When `false`, hides the shared {@link DbxPdfMergeListComponent} below the slot content. Useful when each slot displays its owned files inline and you don't want a duplicate unified list.
18566
+ * Individual inputs. Each takes precedence over the matching field on {@link config} (and the workspace-wide token), with defaults applied in the corresponding `*Signal` computed. See {@link DbxPdfMergeEditorConfig} for field docs.
18556
18567
  */
18557
- showFileList = input(true, ...(ngDevMode ? [{ debugName: "showFileList" }] : /* istanbul ignore next */ []));
18568
+ accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
18569
+ multiple = input(...(ngDevMode ? [undefined, { debugName: "multiple" }] : /* istanbul ignore next */ []));
18570
+ fileName = input(...(ngDevMode ? [undefined, { debugName: "fileName" }] : /* istanbul ignore next */ []));
18571
+ showDownloadButton = input(...(ngDevMode ? [undefined, { debugName: "showDownloadButton" }] : /* istanbul ignore next */ []));
18572
+ showPreviewButton = input(...(ngDevMode ? [undefined, { debugName: "showPreviewButton" }] : /* istanbul ignore next */ []));
18573
+ downloadButton = input(...(ngDevMode ? [undefined, { debugName: "downloadButton" }] : /* istanbul ignore next */ []));
18574
+ showAddFiles = input(...(ngDevMode ? [undefined, { debugName: "showAddFiles" }] : /* istanbul ignore next */ []));
18575
+ showFileList = input(...(ngDevMode ? [undefined, { debugName: "showFileList" }] : /* istanbul ignore next */ []));
18558
18576
  /**
18559
- * Optional configuration override for image compression and output-size limits. When omitted, falls back to the value provided via {@link DBX_PDF_MERGE_EDITOR_CONFIG} (if any).
18577
+ * Bundles every editor option into one object (see {@link DbxPdfMergeEditorConfig}). Individual inputs override the matching field here, which in turn overrides the workspace-wide {@link DBX_PDF_MERGE_EDITOR_CONFIG} token.
18560
18578
  */
18561
18579
  config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
18562
18580
  entriesChanged = output();
18563
18581
  /**
18564
- * Merged config the editor's own `config` input wins over the workspace-wide token.
18582
+ * Store-level image-compression default pushed by {@link DbxPdfMergeEditorStoreDirective}. Resolved between the editor's own `config` input and the workspace-wide token so a store-level default flows through the upload dialog's bare editor.
18583
+ */
18584
+ storeImageCompressionSignal = toSignal(this.store.imageCompression$, { initialValue: undefined });
18585
+ /**
18586
+ * Merged config — the editor's own `config` input wins over the store-level default (for `imageCompression`), which in turn wins over the workspace-wide token. The individual inputs are resolved on top of this object in the per-field `*Signal` computeds below.
18565
18587
  */
18566
18588
  effectiveConfigSignal = computed(() => {
18567
18589
  const fromInput = this.config();
18568
18590
  const fromToken = this._injectedConfig;
18591
+ const storeImageCompression = this.storeImageCompressionSignal();
18569
18592
  return {
18570
- imageCompression: fromInput?.imageCompression ?? fromToken?.imageCompression ?? null,
18571
- outputSizeLimits: fromInput?.outputSizeLimits ?? fromToken?.outputSizeLimits ?? null
18593
+ imageCompression: fromInput?.imageCompression ?? storeImageCompression ?? fromToken?.imageCompression ?? null,
18594
+ outputSizeLimits: fromInput?.outputSizeLimits ?? fromToken?.outputSizeLimits ?? null,
18595
+ accept: fromInput?.accept ?? fromToken?.accept,
18596
+ multiple: fromInput?.multiple ?? fromToken?.multiple,
18597
+ fileName: fromInput?.fileName ?? fromToken?.fileName,
18598
+ showDownloadButton: fromInput?.showDownloadButton ?? fromToken?.showDownloadButton,
18599
+ showPreviewButton: fromInput?.showPreviewButton ?? fromToken?.showPreviewButton,
18600
+ downloadButton: fromInput?.downloadButton ?? fromToken?.downloadButton,
18601
+ showAddFiles: fromInput?.showAddFiles ?? fromToken?.showAddFiles,
18602
+ showFileList: fromInput?.showFileList ?? fromToken?.showFileList
18572
18603
  };
18573
18604
  }, ...(ngDevMode ? [{ debugName: "effectiveConfigSignal" }] : /* istanbul ignore next */ []));
18574
18605
  imageCompressionConfigSignal = computed(() => this.effectiveConfigSignal().imageCompression, ...(ngDevMode ? [{ debugName: "imageCompressionConfigSignal" }] : /* istanbul ignore next */ []));
18575
18606
  outputSizeLimitsSignal = computed(() => this.effectiveConfigSignal().outputSizeLimits, ...(ngDevMode ? [{ debugName: "outputSizeLimitsSignal" }] : /* istanbul ignore next */ []));
18607
+ // Per-field resolution: dedicated input → config (input/token) → default. The config signal is
18608
+ // read unconditionally at the top of each computed so the computed tracks it on every run.
18609
+ acceptSignal = computed(() => {
18610
+ const config = this.effectiveConfigSignal();
18611
+ return this.accept() ?? config.accept ?? DEFAULT_PDF_MERGE_ACCEPT;
18612
+ }, ...(ngDevMode ? [{ debugName: "acceptSignal" }] : /* istanbul ignore next */ []));
18613
+ multipleSignal = computed(() => {
18614
+ const config = this.effectiveConfigSignal();
18615
+ return this.multiple() ?? config.multiple ?? true;
18616
+ }, ...(ngDevMode ? [{ debugName: "multipleSignal" }] : /* istanbul ignore next */ []));
18617
+ fileNameSignal = computed(() => {
18618
+ const config = this.effectiveConfigSignal();
18619
+ return this.fileName() ?? config.fileName ?? DEFAULT_MERGED_FILE_NAME;
18620
+ }, ...(ngDevMode ? [{ debugName: "fileNameSignal" }] : /* istanbul ignore next */ []));
18621
+ showDownloadButtonSignal = computed(() => {
18622
+ const config = this.effectiveConfigSignal();
18623
+ return this.showDownloadButton() ?? config.showDownloadButton ?? false;
18624
+ }, ...(ngDevMode ? [{ debugName: "showDownloadButtonSignal" }] : /* istanbul ignore next */ []));
18625
+ showPreviewButtonSignal = computed(() => {
18626
+ const config = this.effectiveConfigSignal();
18627
+ return this.showPreviewButton() ?? config.showPreviewButton ?? true;
18628
+ }, ...(ngDevMode ? [{ debugName: "showPreviewButtonSignal" }] : /* istanbul ignore next */ []));
18629
+ downloadButtonSignal = computed(() => {
18630
+ const config = this.effectiveConfigSignal();
18631
+ return this.downloadButton() ?? config.downloadButton ?? DEFAULT_DOWNLOAD_BUTTON;
18632
+ }, ...(ngDevMode ? [{ debugName: "downloadButtonSignal" }] : /* istanbul ignore next */ []));
18633
+ showAddFilesSignal = computed(() => {
18634
+ const config = this.effectiveConfigSignal();
18635
+ return this.showAddFiles() ?? config.showAddFiles ?? true;
18636
+ }, ...(ngDevMode ? [{ debugName: "showAddFilesSignal" }] : /* istanbul ignore next */ []));
18637
+ showFileListSignal = computed(() => {
18638
+ const config = this.effectiveConfigSignal();
18639
+ return this.showFileList() ?? config.showFileList ?? true;
18640
+ }, ...(ngDevMode ? [{ debugName: "showFileListSignal" }] : /* istanbul ignore next */ []));
18576
18641
  warnBytesSignal = computed(() => this.outputSizeLimitsSignal()?.warnBytes, ...(ngDevMode ? [{ debugName: "warnBytesSignal" }] : /* istanbul ignore next */ []));
18577
18642
  errorBytesSignal = computed(() => this.outputSizeLimitsSignal()?.errorBytes, ...(ngDevMode ? [{ debugName: "errorBytesSignal" }] : /* istanbul ignore next */ []));
18578
18643
  hasReadyEntriesSignal = toSignal(this.store.hasReadyEntries$, { initialValue: false });
@@ -18629,8 +18694,8 @@ class DbxPdfMergeEditorComponent {
18629
18694
  }, ...(ngDevMode ? [{ debugName: "formattedErrorLimitSignal" }] : /* istanbul ignore next */ []));
18630
18695
  downloadConfigSignal = computed(() => ({
18631
18696
  blob: this.mergeBlobSignal(),
18632
- fileName: this.fileName(),
18633
- buttonStylePair: this.downloadButton() ?? DEFAULT_DOWNLOAD_BUTTON
18697
+ fileName: this.fileNameSignal(),
18698
+ buttonStylePair: this.downloadButtonSignal()
18634
18699
  }), ...(ngDevMode ? [{ debugName: "downloadConfigSignal" }] : /* istanbul ignore next */ []));
18635
18700
  constructor() {
18636
18701
  this.store.entries$.pipe(takeUntilDestroyed()).subscribe((entries) => this.entriesChanged.emit(entries));
@@ -18673,20 +18738,20 @@ class DbxPdfMergeEditorComponent {
18673
18738
  openPreviewDialog(blob) {
18674
18739
  openPdfPreviewDialog(this._matDialog, {
18675
18740
  blob,
18676
- downloadFileName: this.fileName(),
18741
+ downloadFileName: this.fileNameSignal(),
18677
18742
  width: '90vw',
18678
18743
  maxWidth: '1200px',
18679
18744
  height: '90vh'
18680
18745
  });
18681
18746
  }
18682
18747
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxPdfMergeEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18683
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxPdfMergeEditorComponent, isStandalone: true, selector: "dbx-pdf-merge-editor", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, showDownloadButton: { classPropertyName: "showDownloadButton", publicName: "showDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, showPreviewButton: { classPropertyName: "showPreviewButton", publicName: "showPreviewButton", isSignal: true, isRequired: false, transformFunction: null }, downloadButton: { classPropertyName: "downloadButton", publicName: "downloadButton", isSignal: true, isRequired: false, transformFunction: null }, showAddFiles: { classPropertyName: "showAddFiles", publicName: "showAddFiles", isSignal: true, isRequired: false, transformFunction: null }, showFileList: { classPropertyName: "showFileList", publicName: "showFileList", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entriesChanged: "entriesChanged" }, host: { classAttribute: "dbx-pdf-merge-editor d-block" }, ngImport: i0, template: "@if (showAddFiles()) {\n <div class=\"dbx-pdf-merge-editor-upload d-block dbx-mb3\">\n <dbx-file-upload [accept]=\"accept()\" [multiple]=\"multiple()\" (filesChanged)=\"onFiles($event)\" [hint]=\"'Drop PDFs or images here, or click to browse'\" [text]=\"'Add files'\" icon=\"upload_file\"></dbx-file-upload>\n </div>\n}\n<ng-content></ng-content>\n@if (showFileList()) {\n <dbx-pdf-merge-list></dbx-pdf-merge-list>\n}\n@switch (outputSizeStateSignal()) {\n @case ('warn') {\n <div class=\"dbx-pdf-merge-editor-size-warning\">\n <mat-icon>warning</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }} \u2014 above the recommended {{ formattedWarnLimitSignal() }} limit.</span>\n </div>\n }\n @case ('error') {\n <div class=\"dbx-pdf-merge-editor-size-error\">\n <mat-icon>error</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }}, exceeds the {{ formattedErrorLimitSignal() }} limit. Remove or compress files to continue.</span>\n </div>\n }\n}\n<div class=\"dbx-pdf-merge-editor-actions\">\n <span class=\"dbx-hint dbx-small\">{{ entryCountSignal() }} file(s)</span>\n <span class=\"dbx-spacer\"></span>\n <dbx-button text=\"Clear\" icon=\"delete\" [disabled]=\"entryCountSignal() === 0\" (buttonClick)=\"onClear()\"></dbx-button>\n @if (showPreviewButton()) {\n <dbx-button text=\"Preview\" icon=\"picture_as_pdf\" [disabled]=\"!canMergeSignal()\" (buttonClick)=\"onPreview()\"></dbx-button>\n }\n @if (showDownloadButton() && canMergeSignal()) {\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: DbxFileUploadComponent, selector: "dbx-file-upload", inputs: ["config", "buttonStyle", "buttonDisplay", "mode", "text", "icon", "hint", "clickAreaToUpload"], outputs: ["filesChanged"] }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "component", type: DbxPdfMergeListComponent, selector: "dbx-pdf-merge-list" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18748
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxPdfMergeEditorComponent, isStandalone: true, selector: "dbx-pdf-merge-editor", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, showDownloadButton: { classPropertyName: "showDownloadButton", publicName: "showDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, showPreviewButton: { classPropertyName: "showPreviewButton", publicName: "showPreviewButton", isSignal: true, isRequired: false, transformFunction: null }, downloadButton: { classPropertyName: "downloadButton", publicName: "downloadButton", isSignal: true, isRequired: false, transformFunction: null }, showAddFiles: { classPropertyName: "showAddFiles", publicName: "showAddFiles", isSignal: true, isRequired: false, transformFunction: null }, showFileList: { classPropertyName: "showFileList", publicName: "showFileList", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entriesChanged: "entriesChanged" }, host: { classAttribute: "dbx-pdf-merge-editor d-block" }, ngImport: i0, template: "@if (showAddFilesSignal()) {\n <div class=\"dbx-pdf-merge-editor-upload d-block dbx-mb3\">\n <dbx-file-upload [accept]=\"acceptSignal()\" [multiple]=\"multipleSignal()\" (filesChanged)=\"onFiles($event)\" [hint]=\"'Drop PDFs or images here, or click to browse'\" [text]=\"'Add files'\" icon=\"upload_file\"></dbx-file-upload>\n </div>\n}\n<ng-content></ng-content>\n@if (showFileListSignal()) {\n <dbx-pdf-merge-list></dbx-pdf-merge-list>\n}\n@switch (outputSizeStateSignal()) {\n @case ('warn') {\n <div class=\"dbx-pdf-merge-editor-size-warning\">\n <mat-icon>warning</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }} \u2014 above the recommended {{ formattedWarnLimitSignal() }} limit.</span>\n </div>\n }\n @case ('error') {\n <div class=\"dbx-pdf-merge-editor-size-error\">\n <mat-icon>error</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }}, exceeds the {{ formattedErrorLimitSignal() }} limit. Remove or compress files to continue.</span>\n </div>\n }\n}\n<div class=\"dbx-pdf-merge-editor-actions\">\n <span class=\"dbx-hint dbx-small\">{{ entryCountSignal() }} file(s)</span>\n <span class=\"dbx-spacer\"></span>\n <dbx-button text=\"Clear\" icon=\"delete\" [disabled]=\"entryCountSignal() === 0\" (buttonClick)=\"onClear()\"></dbx-button>\n @if (showPreviewButtonSignal()) {\n <dbx-button text=\"Preview\" icon=\"picture_as_pdf\" [disabled]=\"!canMergeSignal()\" (buttonClick)=\"onPreview()\"></dbx-button>\n }\n @if (showDownloadButtonSignal() && canMergeSignal()) {\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: DbxFileUploadComponent, selector: "dbx-file-upload", inputs: ["config", "buttonStyle", "buttonDisplay", "mode", "text", "icon", "hint", "clickAreaToUpload"], outputs: ["filesChanged"] }, { kind: "component", type: DbxDownloadBlobButtonComponent, selector: "dbx-download-blob-button", inputs: ["config"] }, { kind: "component", type: DbxPdfMergeListComponent, selector: "dbx-pdf-merge-list" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18684
18749
  }
18685
18750
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxPdfMergeEditorComponent, decorators: [{
18686
18751
  type: Component,
18687
18752
  args: [{ selector: 'dbx-pdf-merge-editor', host: {
18688
18753
  class: 'dbx-pdf-merge-editor d-block'
18689
- }, imports: [MatIconModule, DbxButtonComponent, DbxFileUploadComponent, DbxDownloadBlobButtonComponent, DbxPdfMergeListComponent], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@if (showAddFiles()) {\n <div class=\"dbx-pdf-merge-editor-upload d-block dbx-mb3\">\n <dbx-file-upload [accept]=\"accept()\" [multiple]=\"multiple()\" (filesChanged)=\"onFiles($event)\" [hint]=\"'Drop PDFs or images here, or click to browse'\" [text]=\"'Add files'\" icon=\"upload_file\"></dbx-file-upload>\n </div>\n}\n<ng-content></ng-content>\n@if (showFileList()) {\n <dbx-pdf-merge-list></dbx-pdf-merge-list>\n}\n@switch (outputSizeStateSignal()) {\n @case ('warn') {\n <div class=\"dbx-pdf-merge-editor-size-warning\">\n <mat-icon>warning</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }} \u2014 above the recommended {{ formattedWarnLimitSignal() }} limit.</span>\n </div>\n }\n @case ('error') {\n <div class=\"dbx-pdf-merge-editor-size-error\">\n <mat-icon>error</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }}, exceeds the {{ formattedErrorLimitSignal() }} limit. Remove or compress files to continue.</span>\n </div>\n }\n}\n<div class=\"dbx-pdf-merge-editor-actions\">\n <span class=\"dbx-hint dbx-small\">{{ entryCountSignal() }} file(s)</span>\n <span class=\"dbx-spacer\"></span>\n <dbx-button text=\"Clear\" icon=\"delete\" [disabled]=\"entryCountSignal() === 0\" (buttonClick)=\"onClear()\"></dbx-button>\n @if (showPreviewButton()) {\n <dbx-button text=\"Preview\" icon=\"picture_as_pdf\" [disabled]=\"!canMergeSignal()\" (buttonClick)=\"onPreview()\"></dbx-button>\n }\n @if (showDownloadButton() && canMergeSignal()) {\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n</div>\n" }]
18754
+ }, imports: [MatIconModule, DbxButtonComponent, DbxFileUploadComponent, DbxDownloadBlobButtonComponent, DbxPdfMergeListComponent], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@if (showAddFilesSignal()) {\n <div class=\"dbx-pdf-merge-editor-upload d-block dbx-mb3\">\n <dbx-file-upload [accept]=\"acceptSignal()\" [multiple]=\"multipleSignal()\" (filesChanged)=\"onFiles($event)\" [hint]=\"'Drop PDFs or images here, or click to browse'\" [text]=\"'Add files'\" icon=\"upload_file\"></dbx-file-upload>\n </div>\n}\n<ng-content></ng-content>\n@if (showFileListSignal()) {\n <dbx-pdf-merge-list></dbx-pdf-merge-list>\n}\n@switch (outputSizeStateSignal()) {\n @case ('warn') {\n <div class=\"dbx-pdf-merge-editor-size-warning\">\n <mat-icon>warning</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }} \u2014 above the recommended {{ formattedWarnLimitSignal() }} limit.</span>\n </div>\n }\n @case ('error') {\n <div class=\"dbx-pdf-merge-editor-size-error\">\n <mat-icon>error</mat-icon>\n <span>Merged file is {{ formattedOutputSizeSignal() }}, exceeds the {{ formattedErrorLimitSignal() }} limit. Remove or compress files to continue.</span>\n </div>\n }\n}\n<div class=\"dbx-pdf-merge-editor-actions\">\n <span class=\"dbx-hint dbx-small\">{{ entryCountSignal() }} file(s)</span>\n <span class=\"dbx-spacer\"></span>\n <dbx-button text=\"Clear\" icon=\"delete\" [disabled]=\"entryCountSignal() === 0\" (buttonClick)=\"onClear()\"></dbx-button>\n @if (showPreviewButtonSignal()) {\n <dbx-button text=\"Preview\" icon=\"picture_as_pdf\" [disabled]=\"!canMergeSignal()\" (buttonClick)=\"onPreview()\"></dbx-button>\n }\n @if (showDownloadButtonSignal() && canMergeSignal()) {\n <dbx-download-blob-button [config]=\"downloadConfigSignal()\"></dbx-download-blob-button>\n }\n</div>\n" }]
18690
18755
  }], ctorParameters: () => [], propDecorators: { accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }], showDownloadButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDownloadButton", required: false }] }], showPreviewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreviewButton", required: false }] }], downloadButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadButton", required: false }] }], showAddFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAddFiles", required: false }] }], showFileList: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFileList", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], entriesChanged: [{ type: i0.Output, args: ["entriesChanged"] }] } });
18691
18756
 
18692
18757
  /**
@@ -18884,9 +18949,16 @@ class DbxPdfMergeEditorFileUploadComponent {
18884
18949
  });
18885
18950
  }
18886
18951
  /**
18887
- * Resolves the active image compression config: per-slot override → workspace-wide DI token. The intermediate ancestor {@link DbxPdfMergeEditorComponent} config is not visible from a slot, so consumers needing per-editor compression should either set the slot's `imageCompression` directly or rely on the injection token.
18952
+ * Store-level image-compression default pushed by {@link DbxPdfMergeEditorStoreDirective}. Resolved between the slot's own override and the workspace-wide token.
18953
+ */
18954
+ storeImageCompressionSignal = toSignal(this.store.imageCompression$, { initialValue: undefined });
18955
+ /**
18956
+ * Resolves the active image compression config: per-slot override → store-level default → workspace-wide DI token. The store tier lets a {@link DbxPdfMergeEditorStoreDirective} `[config]` supply a shared default (e.g. through the upload dialog) while a slot's own `imageCompression` still wins.
18888
18957
  */
18889
- effectiveImageCompressionSignal = computed(() => this.config()?.imageCompression ?? this._injectedConfig?.imageCompression ?? null, ...(ngDevMode ? [{ debugName: "effectiveImageCompressionSignal" }] : /* istanbul ignore next */ []));
18958
+ effectiveImageCompressionSignal = computed(() => {
18959
+ const storeImageCompression = this.storeImageCompressionSignal();
18960
+ return this.config()?.imageCompression ?? storeImageCompression ?? this._injectedConfig?.imageCompression ?? null;
18961
+ }, ...(ngDevMode ? [{ debugName: "effectiveImageCompressionSignal" }] : /* istanbul ignore next */ []));
18890
18962
  async onFiles(event) {
18891
18963
  const accepted = event.matchResult.accepted;
18892
18964
  const ownedCount = this.ownedEntriesSignal().length;