@dereekb/dbx-firebase 12.6.0 → 12.6.1

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.
@@ -8,11 +8,20 @@ import { Observable } from 'rxjs';
8
8
  import { DbxFirebaseStorageFileDownloadUrlPair } from '../service/storagefile.download.storage.service';
9
9
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
10
10
  import * as i0 from "@angular/core";
11
+ /**
12
+ * Source configuration for the DbxFirebaseStorageFileDownloadButtonComponent.
13
+ */
11
14
  export interface DbxFirebaseStorageFileDownloadButtonSource {
12
15
  /**
13
16
  * A static StorageFileKey to use.
14
17
  */
15
18
  readonly storageFileKey?: MaybeObservableOrValue<StorageFileKey>;
19
+ /**
20
+ * Whether or not to pre-load the download url from the source.
21
+ *
22
+ * Defaults to false.
23
+ */
24
+ readonly preload?: Maybe<boolean>;
16
25
  /**
17
26
  * The expected mime type of the StorageFile to use when previewing.
18
27
  */
@@ -35,19 +44,17 @@ export interface DbxFirebaseStorageFileDownloadButtonSource {
35
44
  * Optional custom error handler for the download URL.
36
45
  */
37
46
  readonly handleGetDownloadUrlError?: (error: unknown) => void;
47
+ /**
48
+ * Called when the download URL changes.
49
+ */
50
+ readonly downloadUrlChanged?: Maybe<(downloadUrl: Maybe<StorageFileDownloadUrl>) => void>;
38
51
  }
39
52
  /**
40
- * Configuration for the DbxFirebaseStorageFileDownloadButton.
53
+ * Configuration for the DbxFirebaseStorageFileDownloadButtonComponent.
41
54
  */
42
55
  export interface DbxFirebaseStorageFileDownloadButtonConfig {
43
56
  readonly buttonStyle?: Maybe<DbxButtonStyle>;
44
57
  readonly previewButtonStyle?: Maybe<DbxButtonStyle>;
45
- /**
46
- * Whether or not to pre-load the download url from the source.
47
- *
48
- * Defaults to false.
49
- */
50
- readonly preload?: Maybe<boolean>;
51
58
  /**
52
59
  * Whether or not to show a preview button.
53
60
  *
@@ -66,8 +73,16 @@ export interface DbxFirebaseStorageFileDownloadButtonConfig {
66
73
  * The function can return undefined, in which case the default preview dialog will be used.
67
74
  */
68
75
  readonly openCustomPreview?: Maybe<(downloadUrl: StorageFileDownloadUrl, embedMimeType?: Maybe<string>) => Maybe<MatDialogRef<any>>>;
76
+ /**
77
+ * Whether or not to pre-load the download url from the source.
78
+ *
79
+ * Defaults to false.
80
+ *
81
+ * @deprecated use the preload property on the source/DbxFirebaseStorageFileDownloadButtonSource instead.
82
+ */
83
+ readonly preload?: Maybe<boolean>;
69
84
  }
70
- export declare class DbxFirebaseStorageFileDownloadButton {
85
+ export declare class DbxFirebaseStorageFileDownloadButtonComponent {
71
86
  readonly matDialog: MatDialog;
72
87
  readonly dbxWebFilePreviewService: DbxWebFilePreviewService;
73
88
  readonly dbxFirebaseStorageFileDownloadService: DbxFirebaseStorageFileDownloadService;
@@ -89,6 +104,10 @@ export declare class DbxFirebaseStorageFileDownloadButton {
89
104
  * Defaults to true.
90
105
  */
91
106
  readonly showPreviewButton: import("@angular/core").InputSignal<Maybe<boolean>>;
107
+ /**
108
+ * Whether or not to pre-load the download URL from the source.
109
+ */
110
+ readonly preload: import("@angular/core").InputSignal<Maybe<boolean>>;
92
111
  /**
93
112
  * Output event emitted when the download URL changes.
94
113
  */
@@ -128,6 +147,6 @@ export declare class DbxFirebaseStorageFileDownloadButton {
128
147
  readonly handleGetDownloadUrl: WorkUsingContext<StorageFileKey, DbxFirebaseStorageFileDownloadUrlPair>;
129
148
  readonly handleGetDownloadUrlSuccess: (value: DbxFirebaseStorageFileDownloadUrlPair) => void;
130
149
  readonly handleGetDownloadUrlError: (error: unknown) => void;
131
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileDownloadButton, never>;
132
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxFirebaseStorageFileDownloadButton, "dbx-firebase-storagefile-download-button", never, { "storageFileKey": { "alias": "storageFileKey"; "required": false; "isSignal": true; }; "storageFileDownloadUrl": { "alias": "storageFileDownloadUrl"; "required": false; "isSignal": true; }; "embedMimeType": { "alias": "embedMimeType"; "required": false; "isSignal": true; }; "showPreviewButton": { "alias": "showPreviewButton"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "source": { "alias": "source"; "required": false; "isSignal": true; }; }, { "downloadUrlChange": "downloadUrlChange"; }, never, never, true, never>;
150
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFirebaseStorageFileDownloadButtonComponent, never>;
151
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxFirebaseStorageFileDownloadButtonComponent, "dbx-firebase-storagefile-download-button", never, { "storageFileKey": { "alias": "storageFileKey"; "required": false; "isSignal": true; }; "storageFileDownloadUrl": { "alias": "storageFileDownloadUrl"; "required": false; "isSignal": true; }; "embedMimeType": { "alias": "embedMimeType"; "required": false; "isSignal": true; }; "showPreviewButton": { "alias": "showPreviewButton"; "required": false; "isSignal": true; }; "preload": { "alias": "preload"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "source": { "alias": "source"; "required": false; "isSignal": true; }; }, { "downloadUrlChange": "downloadUrlChange"; }, never, never, true, never>;
133
152
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-firebase",
3
- "version": "12.6.0",
3
+ "version": "12.6.1",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^18.0.0",
6
6
  "@dereekb/dbx-analytics": "*",