@dereekb/dbx-firebase 12.5.9 → 12.6.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.
- package/esm2022/lib/development/development.widget.service.mjs +1 -1
- package/esm2022/lib/modules/storagefile/container/index.mjs +2 -1
- package/esm2022/lib/modules/storagefile/container/storagefile.download.button.component.mjs +244 -0
- package/esm2022/lib/modules/storagefile/index.mjs +3 -1
- package/esm2022/lib/modules/storagefile/service/index.mjs +3 -0
- package/esm2022/lib/modules/storagefile/service/storagefile.download.service.mjs +158 -0
- package/esm2022/lib/modules/storagefile/service/storagefile.download.storage.service.mjs +91 -0
- package/esm2022/lib/modules/storagefile/storagefile.providers.mjs +33 -0
- package/esm2022/lib/modules/storagefile/store/storagefile.document.store.mjs +3 -2
- package/esm2022/lib/providers.mjs +6 -2
- package/fesm2022/dereekb-dbx-firebase.mjs +512 -8
- package/fesm2022/dereekb-dbx-firebase.mjs.map +1 -1
- package/lib/development/development.widget.service.d.ts +1 -1
- package/lib/modules/storagefile/container/index.d.ts +1 -0
- package/lib/modules/storagefile/container/storagefile.download.button.component.d.ts +133 -0
- package/lib/modules/storagefile/index.d.ts +2 -0
- package/lib/modules/storagefile/service/index.d.ts +2 -0
- package/lib/modules/storagefile/service/storagefile.download.service.d.ts +79 -0
- package/lib/modules/storagefile/service/storagefile.download.storage.service.d.ts +56 -0
- package/lib/modules/storagefile/storagefile.providers.d.ts +13 -0
- package/lib/modules/storagefile/storagefile.upload.module.d.ts +1 -1
- package/lib/modules/storagefile/store/storagefile.document.store.d.ts +1 -0
- package/lib/providers.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable, APP_INITIALIZER, makeEnvironmentProviders, InjectionToken, Component, Optional, Inject, model, computed, ChangeDetectionStrategy, signal, Directive, input, EventEmitter, output, NgModule, Injector, viewChild, HostListener, ElementRef, forwardRef, effect, Pipe } from '@angular/core';
|
|
3
3
|
import { DbxAnalyticsService } from '@dereekb/dbx-analytics';
|
|
4
|
-
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, distinctUntilKeysChange, cleanupDestroyable, iterationHasNextAndCanLoadMore, pageItemAccumulatorCurrentPage, accumulatorFlattenPageListLoadingState, useFirst, itemAccumulatorNextPageUntilResultsCount, iteratorNextPageUntilPage, iteratorNextPageUntilMaxPageLoadLimit, pageLoadingStateFromObs, useAsObservable, filterMaybeArray, mapEachAsync, invertObservableDecision, filterItemsWithObservableDecision, skipInitialMaybe, distinctUntilModelKeyChange, successResult, beginLoading, errorResult, isLoadingStateLoading, cleanup, mapLoadingState, mapLoadingStateValueWithOperator, distinctUntilHasDifferentValues, MultiSubscriptionObject, startWithBeginLoading, skipAllInitialMaybe } from '@dereekb/rxjs';
|
|
5
|
-
import { switchMap, of, shareReplay, map, distinctUntilChanged, EMPTY, catchError, firstValueFrom, BehaviorSubject, combineLatest, first, from, tap, interval, exhaustMap, filter, take, startWith, Subject, throttleTime, NEVER, combineLatestWith, Observable } from 'rxjs';
|
|
4
|
+
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, distinctUntilKeysChange, cleanupDestroyable, iterationHasNextAndCanLoadMore, pageItemAccumulatorCurrentPage, accumulatorFlattenPageListLoadingState, useFirst, itemAccumulatorNextPageUntilResultsCount, iteratorNextPageUntilPage, iteratorNextPageUntilMaxPageLoadLimit, pageLoadingStateFromObs, useAsObservable, filterMaybeArray, mapEachAsync, invertObservableDecision, filterItemsWithObservableDecision, skipInitialMaybe, distinctUntilModelKeyChange, successResult, beginLoading, errorResult, isLoadingStateLoading, cleanup, mapLoadingState, mapLoadingStateValueWithOperator, throwErrorFromLoadingStateError, valueFromFinishedLoadingState, maybeValueFromObservableOrValue, distinctUntilHasDifferentValues, MultiSubscriptionObject, startWithBeginLoading, skipAllInitialMaybe } from '@dereekb/rxjs';
|
|
5
|
+
import { switchMap, of, shareReplay, map, distinctUntilChanged, EMPTY, catchError, firstValueFrom, BehaviorSubject, combineLatest, first, from, tap, interval, exhaustMap, filter, take, startWith, Subject, throttleTime, NEVER, combineLatestWith, mergeMap, Observable } from 'rxjs';
|
|
6
6
|
import * as i2 from '@dereekb/dbx-core';
|
|
7
|
-
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, DbxInjectionComponent, AbstractForwardDbxInjectionContextDirective, DbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxAuthService, DbxActionButtonDirective, DbxActionDirective, DbxActionEnforceModifiedDirective, DbxActionHandlerDirective, DbxActionAutoTriggerDirective, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, AbstractSubscriptionDirective, AbstractIfDirective, LockSetComponentStore, newWithInjector, CutTextPipe, DbxActionContextStoreSourceInstance, DbxActionHandlerInstance, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance } from '@dereekb/dbx-core';
|
|
7
|
+
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, DbxInjectionComponent, AbstractForwardDbxInjectionContextDirective, DbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxAuthService, DbxActionButtonDirective, DbxActionDirective, DbxActionEnforceModifiedDirective, DbxActionHandlerDirective, DbxActionAutoTriggerDirective, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, AbstractSubscriptionDirective, AbstractIfDirective, LockSetComponentStore, newWithInjector, CutTextPipe, DbxActionContextStoreSourceInstance, DbxActionHandlerInstance, SimpleStorageAccessorFactory, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance } from '@dereekb/dbx-core';
|
|
8
8
|
import { Auth, authState, idToken, GoogleAuthProvider, FacebookAuthProvider, TwitterAuthProvider, GithubAuthProvider, signInWithPopup, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, reauthenticateWithPopup, provideAuth, getAuth, connectAuthEmulator } from '@angular/fire/auth';
|
|
9
|
-
import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeArrayValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, pushArrayItemsIntoArray, forEachKeyValue, countAllInNestedArray, invertDecision, readableError, isMaybeSo, firstValue, separateValues } from '@dereekb/util';
|
|
9
|
+
import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeArrayValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, pushArrayItemsIntoArray, forEachKeyValue, countAllInNestedArray, invertDecision, readableError, isMaybeSo, firstValue, splitJoinRemainder, MS_IN_HOUR, SECONDS_IN_MINUTE, MS_IN_DAY, unixDateTimeSecondsNumberForNow, MS_IN_MINUTE, addMilliseconds, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, MS_IN_SECOND, isPast, separateValues } from '@dereekb/util';
|
|
10
10
|
import { safeFormatToISO8601DateString, msToSeconds, isSameDate } from '@dereekb/date';
|
|
11
11
|
import { sendPasswordResetEmail } from 'firebase/auth';
|
|
12
12
|
import { getToken, initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check';
|
|
13
13
|
import { AppCheck, provideAppCheck } from '@angular/fire/app-check';
|
|
14
14
|
import * as i1$1 from '@dereekb/dbx-web';
|
|
15
|
-
import { DbxLinkComponent, DbxActionModule, DbxButtonModule, DbxErrorComponent, DbxActionErrorDirective, DbxButtonComponent, DbxButtonSpacerDirective, DbxRouterAnchorModule, DbxWidgetService, AbstractDbxSelectionListWrapperDirective, provideDbxListViewWrapper, DbxListWrapperComponentImportsModule, DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE, AbstractDbxSelectionListViewDirective, provideDbxListView, DbxSelectionValueListViewComponentImportsModule, DEFAULT_DBX_SELECTION_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, AbstractDbxValueListViewItemComponent, TwoColumnsContextStore, DbxAnchorComponent, DbxTwoColumnFullLeftDirective, DbxWidgetViewComponent, DbxTwoColumnComponent, DbxTwoBlockComponent, DbxTwoColumnRightComponent, AbstractPopupDirective, DbxPopupService, DbxPopupContentComponent, DbxPopupControlsComponent, DbxModelTypesService, DbxModelTrackerService, allDbxModelViewTrackerEventModelKeys, DbxListItemAnchorModifierDirective, DbxValueListItemModifierDirective, AbstractPopoverDirective, DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverScrollContentDirective, DbxListEmptyContentComponent, AbstractPopoverRefDirective, DbxPopoverService, DbxIconButtonComponent, DbxModelObjectStateService, DbxListViewWrapper, AbstractDbxWidgetComponent, DbxPopoverInteractionModule, DbxListModifierModule, DbxFileUploadComponent, DbxLoadingComponent, DbxActionLoadingContextDirective,
|
|
15
|
+
import { DbxLinkComponent, DbxActionModule, DbxButtonModule, DbxErrorComponent, DbxActionErrorDirective, DbxButtonComponent, DbxButtonSpacerDirective, DbxRouterAnchorModule, DbxWidgetService, AbstractDbxSelectionListWrapperDirective, provideDbxListViewWrapper, DbxListWrapperComponentImportsModule, DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE, AbstractDbxSelectionListViewDirective, provideDbxListView, DbxSelectionValueListViewComponentImportsModule, DEFAULT_DBX_SELECTION_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, AbstractDbxValueListViewItemComponent, TwoColumnsContextStore, DbxAnchorComponent, DbxTwoColumnFullLeftDirective, DbxWidgetViewComponent, DbxTwoColumnComponent, DbxTwoBlockComponent, DbxTwoColumnRightComponent, AbstractPopupDirective, DbxPopupService, DbxPopupContentComponent, DbxPopupControlsComponent, DbxModelTypesService, DbxModelTrackerService, allDbxModelViewTrackerEventModelKeys, DbxListItemAnchorModifierDirective, DbxValueListItemModifierDirective, AbstractPopoverDirective, DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverScrollContentDirective, DbxListEmptyContentComponent, AbstractPopoverRefDirective, DbxPopoverService, DbxIconButtonComponent, DbxModelObjectStateService, DbxListViewWrapper, AbstractDbxWidgetComponent, DbxPopoverInteractionModule, DbxListModifierModule, DbxWebFilePreviewService, DbxActionSnackbarErrorDirective, DbxActionDialogDirective, DbxFileUploadComponent, DbxLoadingComponent, DbxActionLoadingContextDirective, DbxFileUploadActionSyncDirective } from '@dereekb/dbx-web';
|
|
16
16
|
import * as i1 from '@angular/material/icon';
|
|
17
17
|
import { MatIconModule } from '@angular/material/icon';
|
|
18
18
|
import * as i1$2 from '@dereekb/dbx-form';
|
|
19
19
|
import { AbstractSyncFormlyFormDirective, emailField, dbxFormlyFormComponentProviders, DbxFormlyFormComponentImportsModule, DBX_FORMLY_FORM_COMPONENT_TEMPLATE, AbstractConfigAsyncFormlyFormDirective, usernamePasswordLoginFields, DbxActionFormDirective, DbxFormSourceDirective, pickableItemChipField, filterPickableItemFieldValuesByLabel } from '@dereekb/dbx-form';
|
|
20
20
|
import * as i1$4 from '@dereekb/firebase';
|
|
21
|
-
import { firebaseAuthErrorToReadableError, FirebaseDevelopmentFunctions, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, NotificationFirestoreCollections, StorageFileFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, firestoreModelKeyCollectionTypePair, buildFirebaseCollectionTypeModelTypeMap, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, flatFirestoreModelKey, twoWayFlatFirestoreModelKey, documentDataWithIdAndKey, isClientFirebaseError, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, inferKeyFromTwoWayFlatFirestoreModelKey, firestoreModelKeyParentKey, AppNotificationTemplateTypeInfoRecordService, NotificationFunctions, unreadNotificationItems, StorageFileFunctions, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
|
|
21
|
+
import { firebaseAuthErrorToReadableError, FirebaseDevelopmentFunctions, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, NotificationFirestoreCollections, StorageFileFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, firestoreModelKeyCollectionTypePair, buildFirebaseCollectionTypeModelTypeMap, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, flatFirestoreModelKey, twoWayFlatFirestoreModelKey, documentDataWithIdAndKey, isClientFirebaseError, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, inferKeyFromTwoWayFlatFirestoreModelKey, firestoreModelKeyParentKey, AppNotificationTemplateTypeInfoRecordService, NotificationFunctions, unreadNotificationItems, firestoreModelId, StorageFileFunctions, firestoreModelKey, storageFileIdentity, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
|
|
22
22
|
import { NgTemplateOutlet, DatePipe } from '@angular/common';
|
|
23
23
|
import * as i1$3 from '@angular/material/button';
|
|
24
24
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -32,6 +32,7 @@ import { provideFirestore, persistentMultipleTabManager, persistentSingleTabMana
|
|
|
32
32
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
33
33
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
34
34
|
import { ComponentStore } from '@ngrx/component-store';
|
|
35
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
35
36
|
import { BaseError } from 'make-error';
|
|
36
37
|
|
|
37
38
|
function authUserInfoFromAuthUser(user) {
|
|
@@ -5303,6 +5304,476 @@ function provideDbxFirebaseNotifications(config) {
|
|
|
5303
5304
|
return makeEnvironmentProviders(providers);
|
|
5304
5305
|
}
|
|
5305
5306
|
|
|
5307
|
+
/**
|
|
5308
|
+
* Token that corresponds to a StorageAccessor<DbxFirebaseStorageFileDownloadUserCache> that is used by DbxModelViewTrackerStorage.
|
|
5309
|
+
*/
|
|
5310
|
+
const DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN = new InjectionToken('DbxFirebaseStorageFileDownloadStorageAccessor');
|
|
5311
|
+
/**
|
|
5312
|
+
* Used for managing DbxModelViewTrackerEvent storage.
|
|
5313
|
+
*/
|
|
5314
|
+
class DbxFirebaseStorageFileDownloadStorage {
|
|
5315
|
+
static DEFAULT_MAX_DOWNLOAD_URLS = 100;
|
|
5316
|
+
authService = inject(DbxFirebaseAuthService);
|
|
5317
|
+
storageAccessor = inject(DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN);
|
|
5318
|
+
addDownloadUrl({ id, downloadUrl, expiresAt, mimeType }) {
|
|
5319
|
+
return this.getCurrentUserDownloadCache().pipe(mergeMap((cache) => {
|
|
5320
|
+
const { uid, pairs: currentPairs } = cache;
|
|
5321
|
+
const storageKey = this.getStorageKeyForUid(uid);
|
|
5322
|
+
const pairs = {
|
|
5323
|
+
...currentPairs,
|
|
5324
|
+
[id]: `${expiresAt}_${mimeType}_${downloadUrl}`
|
|
5325
|
+
};
|
|
5326
|
+
return this.storageAccessor.set(storageKey, {
|
|
5327
|
+
uid,
|
|
5328
|
+
pairs
|
|
5329
|
+
});
|
|
5330
|
+
}), first());
|
|
5331
|
+
}
|
|
5332
|
+
/**
|
|
5333
|
+
* Returns the cached download URL pair for the given key.
|
|
5334
|
+
*
|
|
5335
|
+
* The pair may be expired.
|
|
5336
|
+
*
|
|
5337
|
+
* @param key
|
|
5338
|
+
* @returns
|
|
5339
|
+
*/
|
|
5340
|
+
getDownloadUrlPair(input) {
|
|
5341
|
+
const id = firestoreModelId(input);
|
|
5342
|
+
return this.authService.uid$.pipe(switchMap((uid) => {
|
|
5343
|
+
return this.getUserDownloadCache(uid).pipe(map((cache) => {
|
|
5344
|
+
const pair = cache?.pairs[id];
|
|
5345
|
+
let result;
|
|
5346
|
+
if (pair) {
|
|
5347
|
+
const [expiresAt, mimeType, downloadUrl] = splitJoinRemainder(pair, '_', 3);
|
|
5348
|
+
result = {
|
|
5349
|
+
id,
|
|
5350
|
+
downloadUrl,
|
|
5351
|
+
expiresAt: Number(expiresAt),
|
|
5352
|
+
mimeType
|
|
5353
|
+
};
|
|
5354
|
+
}
|
|
5355
|
+
return result;
|
|
5356
|
+
}));
|
|
5357
|
+
}), first());
|
|
5358
|
+
}
|
|
5359
|
+
getAllDownloadUrlPairsRecord(uid) {
|
|
5360
|
+
return this.getUserDownloadCache(uid).pipe(map((x) => x.pairs));
|
|
5361
|
+
}
|
|
5362
|
+
getCurrentUserDownloadCache() {
|
|
5363
|
+
return this.authService.uid$.pipe(switchMap((uid) => this.getUserDownloadCache(uid)));
|
|
5364
|
+
}
|
|
5365
|
+
getUserDownloadCache(uid) {
|
|
5366
|
+
const storageKey = this.getStorageKeyForUid(uid);
|
|
5367
|
+
return this._getUserDownloadCacheForStorageKey(storageKey, uid);
|
|
5368
|
+
}
|
|
5369
|
+
clearCurrentUserDownloadCache() {
|
|
5370
|
+
return this.authService.uid$.pipe(switchMap((uid) => this.clearUserDownloadCache(uid)));
|
|
5371
|
+
}
|
|
5372
|
+
clearUserDownloadCache(uid) {
|
|
5373
|
+
const storageKey = this.getStorageKeyForUid(uid);
|
|
5374
|
+
return this.storageAccessor.remove(storageKey);
|
|
5375
|
+
}
|
|
5376
|
+
_getUserDownloadCacheForStorageKey(storageKey, uid) {
|
|
5377
|
+
return this.storageAccessor.get(storageKey).pipe(catchError((e) => {
|
|
5378
|
+
return of(undefined);
|
|
5379
|
+
}), map((result) => result ?? { uid, pairs: {} }));
|
|
5380
|
+
}
|
|
5381
|
+
getStorageKeyForUid(uid) {
|
|
5382
|
+
const storageKey = `sf_dl_cache_${uid}`;
|
|
5383
|
+
return storageKey;
|
|
5384
|
+
}
|
|
5385
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5386
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadStorage });
|
|
5387
|
+
}
|
|
5388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadStorage, decorators: [{
|
|
5389
|
+
type: Injectable
|
|
5390
|
+
}] });
|
|
5391
|
+
|
|
5392
|
+
function dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs(obsForInput) {
|
|
5393
|
+
return {
|
|
5394
|
+
downloadStorageFileResult: (params, storageFileId) => firstValueFrom(obsForInput(params, storageFileId).pipe(throwErrorFromLoadingStateError(), valueFromFinishedLoadingState()))
|
|
5395
|
+
};
|
|
5396
|
+
}
|
|
5397
|
+
/**
|
|
5398
|
+
* Service used for retrieving download links for StorageFiles.
|
|
5399
|
+
*/
|
|
5400
|
+
class DbxFirebaseStorageFileDownloadService {
|
|
5401
|
+
/**
|
|
5402
|
+
* Expiration duration for cached download URLs.
|
|
5403
|
+
*/
|
|
5404
|
+
_expiresAfterTime = MS_IN_HOUR * 12;
|
|
5405
|
+
/**
|
|
5406
|
+
* When reading cached values, this buffer is added to the expiration time to prevent the URL from expiring while it is being used.
|
|
5407
|
+
*/
|
|
5408
|
+
_expiresAfterTimeBuffer = SECONDS_IN_MINUTE * 10;
|
|
5409
|
+
storageFileFunctions = inject(StorageFileFunctions);
|
|
5410
|
+
storageFileDownloadStorage = inject(DbxFirebaseStorageFileDownloadStorage);
|
|
5411
|
+
// MARK: Config
|
|
5412
|
+
getExpiresAfterTime() {
|
|
5413
|
+
return this._expiresAfterTime;
|
|
5414
|
+
}
|
|
5415
|
+
setExpiresAfterTime(expiresAfter) {
|
|
5416
|
+
const maxAllowed = MS_IN_DAY * 20;
|
|
5417
|
+
if (expiresAfter > maxAllowed) {
|
|
5418
|
+
throw new Error(`Expires after time cannot be greater than 20 days.`);
|
|
5419
|
+
}
|
|
5420
|
+
else if (expiresAfter < MS_IN_HOUR) {
|
|
5421
|
+
throw new Error(`Expires after time cannot be less than 1 hour.`);
|
|
5422
|
+
}
|
|
5423
|
+
this._expiresAfterTime = expiresAfter;
|
|
5424
|
+
}
|
|
5425
|
+
// MARK: Download
|
|
5426
|
+
/**
|
|
5427
|
+
* Returns an observable that returns the cached download URL pair for the StorageFile, and emits null once it expires.
|
|
5428
|
+
*
|
|
5429
|
+
* @param storageFileIdOrKey
|
|
5430
|
+
* @returns
|
|
5431
|
+
*/
|
|
5432
|
+
getCachedDownloadPairForStorageFile(storageFileIdOrKey) {
|
|
5433
|
+
const storageFileId = firestoreModelId(storageFileIdOrKey);
|
|
5434
|
+
return this.storageFileDownloadStorage.getDownloadUrlPair(storageFileId).pipe(switchMap((pair) => {
|
|
5435
|
+
let result;
|
|
5436
|
+
if (pair) {
|
|
5437
|
+
const expiresAt = pair.expiresAt - this._expiresAfterTimeBuffer;
|
|
5438
|
+
function pairIfNotExpired() {
|
|
5439
|
+
const now = unixDateTimeSecondsNumberForNow();
|
|
5440
|
+
const isExpired = now > expiresAt;
|
|
5441
|
+
return isExpired ? null : pair;
|
|
5442
|
+
}
|
|
5443
|
+
const initialPair = pairIfNotExpired();
|
|
5444
|
+
if (initialPair) {
|
|
5445
|
+
// every minute emit the result again
|
|
5446
|
+
result = interval(MS_IN_MINUTE).pipe(map(pairIfNotExpired), first((x) => x == null), // only emit the first null value
|
|
5447
|
+
startWith(initialPair), // send the initial value first
|
|
5448
|
+
shareReplay(1));
|
|
5449
|
+
}
|
|
5450
|
+
else {
|
|
5451
|
+
result = of(null);
|
|
5452
|
+
}
|
|
5453
|
+
}
|
|
5454
|
+
else {
|
|
5455
|
+
result = of(null);
|
|
5456
|
+
}
|
|
5457
|
+
return result;
|
|
5458
|
+
}));
|
|
5459
|
+
}
|
|
5460
|
+
/**
|
|
5461
|
+
* Retrieves the download URL for the StorageFile using the default parameters.
|
|
5462
|
+
*
|
|
5463
|
+
* These URLs are cached locally to prevent extra/redundant calls to the server.
|
|
5464
|
+
*
|
|
5465
|
+
* @param storageFileIdOrKey
|
|
5466
|
+
* @returns
|
|
5467
|
+
*/
|
|
5468
|
+
downloadPairForStorageFile(storageFileIdOrKey) {
|
|
5469
|
+
return this.downloadPairForStorageFileUsingSource(storageFileIdOrKey, undefined);
|
|
5470
|
+
}
|
|
5471
|
+
/**
|
|
5472
|
+
* Retrieves the download URL for the StorageFile using the default parameters and pulled from the input source, if applicable.
|
|
5473
|
+
*
|
|
5474
|
+
* If no source is provided, uses the default internal source.
|
|
5475
|
+
*
|
|
5476
|
+
* These URLs are cached locally to prevent extra/redundant calls to the server.
|
|
5477
|
+
*
|
|
5478
|
+
* @param storageFileIdOrKey
|
|
5479
|
+
* @returns
|
|
5480
|
+
*/
|
|
5481
|
+
downloadPairForStorageFileUsingSource(storageFileIdOrKey, source) {
|
|
5482
|
+
const storageFileId = firestoreModelId(storageFileIdOrKey);
|
|
5483
|
+
const obs = this.getCachedDownloadPairForStorageFile(storageFileId).pipe(switchMap((cachedPair) => {
|
|
5484
|
+
let result;
|
|
5485
|
+
const downloadAndCacheResult = () => {
|
|
5486
|
+
return from(this._createDownloadPairForStorageFileUsingSource(source, storageFileIdOrKey)).pipe(tap((downloadUrlPair) => {
|
|
5487
|
+
this.addPairForStorageFileToCache(downloadUrlPair);
|
|
5488
|
+
}));
|
|
5489
|
+
};
|
|
5490
|
+
if (cachedPair) {
|
|
5491
|
+
result = of(cachedPair);
|
|
5492
|
+
}
|
|
5493
|
+
else {
|
|
5494
|
+
result = downloadAndCacheResult();
|
|
5495
|
+
}
|
|
5496
|
+
return result;
|
|
5497
|
+
}), first(), shareReplay(1));
|
|
5498
|
+
return obs;
|
|
5499
|
+
}
|
|
5500
|
+
/**
|
|
5501
|
+
* Adds the given download URL pair to the cache.
|
|
5502
|
+
*/
|
|
5503
|
+
addPairForStorageFileToCache(downloadUrlPair) {
|
|
5504
|
+
this.storageFileDownloadStorage.addDownloadUrl(downloadUrlPair).pipe(first()).subscribe();
|
|
5505
|
+
}
|
|
5506
|
+
/**
|
|
5507
|
+
* Creates a new download URL for the StorageFile.
|
|
5508
|
+
*
|
|
5509
|
+
* @param storageFileIdOrKey
|
|
5510
|
+
* @param inputParams
|
|
5511
|
+
* @returns
|
|
5512
|
+
*/
|
|
5513
|
+
createDownloadPairForStorageFile(storageFileIdOrKey, inputParams) {
|
|
5514
|
+
return this._createDownloadPairForStorageFileUsingSource(undefined, storageFileIdOrKey, inputParams);
|
|
5515
|
+
}
|
|
5516
|
+
_createDownloadPairForStorageFileUsingSource(inputSource, storageFileIdOrKey, inputParams) {
|
|
5517
|
+
const source = inputSource ?? {
|
|
5518
|
+
downloadStorageFileResult: (params) => this.storageFileFunctions.storageFile.readStorageFile.download(params)
|
|
5519
|
+
};
|
|
5520
|
+
const storageFileId = firestoreModelId(storageFileIdOrKey);
|
|
5521
|
+
const expiresAt = inputParams?.expiresAt ?? addMilliseconds(new Date(), this._expiresAfterTime);
|
|
5522
|
+
const params = {
|
|
5523
|
+
...inputParams,
|
|
5524
|
+
expiresAt,
|
|
5525
|
+
key: firestoreModelKey(storageFileIdentity, storageFileId)
|
|
5526
|
+
};
|
|
5527
|
+
return source.downloadStorageFileResult(params, storageFileId).then((x) => {
|
|
5528
|
+
return {
|
|
5529
|
+
id: storageFileId,
|
|
5530
|
+
downloadUrl: x.url,
|
|
5531
|
+
mimeType: x.mimeType,
|
|
5532
|
+
expiresAt: x.expiresAt ?? unixDateTimeSecondsNumberFromDate(expiresAt)
|
|
5533
|
+
};
|
|
5534
|
+
});
|
|
5535
|
+
}
|
|
5536
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5537
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadService });
|
|
5538
|
+
}
|
|
5539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadService, decorators: [{
|
|
5540
|
+
type: Injectable
|
|
5541
|
+
}] });
|
|
5542
|
+
|
|
5543
|
+
class DbxFirebaseStorageFileDownloadButton {
|
|
5544
|
+
matDialog = inject(MatDialog);
|
|
5545
|
+
dbxWebFilePreviewService = inject(DbxWebFilePreviewService);
|
|
5546
|
+
dbxFirebaseStorageFileDownloadService = inject(DbxFirebaseStorageFileDownloadService);
|
|
5547
|
+
/**
|
|
5548
|
+
* The StorageFileKey to set up the download button for.
|
|
5549
|
+
*/
|
|
5550
|
+
storageFileKey = input();
|
|
5551
|
+
/**
|
|
5552
|
+
* The download URL to use for the download button.
|
|
5553
|
+
*/
|
|
5554
|
+
storageFileDownloadUrl = input();
|
|
5555
|
+
/**
|
|
5556
|
+
* The MIME type to use the embed component.
|
|
5557
|
+
*/
|
|
5558
|
+
embedMimeType = input();
|
|
5559
|
+
/**
|
|
5560
|
+
* Whether or not to show a preview button.
|
|
5561
|
+
*
|
|
5562
|
+
* Defaults to true.
|
|
5563
|
+
*/
|
|
5564
|
+
showPreviewButton = input(true);
|
|
5565
|
+
/**
|
|
5566
|
+
* Output event emitted when the download URL changes.
|
|
5567
|
+
*/
|
|
5568
|
+
downloadUrlChange = output();
|
|
5569
|
+
config = input();
|
|
5570
|
+
source = input();
|
|
5571
|
+
source$ = toObservable(this.source);
|
|
5572
|
+
configSignal = computed(() => {
|
|
5573
|
+
const config = this.config();
|
|
5574
|
+
const result = {
|
|
5575
|
+
buttonStyle: config?.buttonStyle,
|
|
5576
|
+
previewButtonStyle: config?.previewButtonStyle,
|
|
5577
|
+
icon: config?.icon ?? 'cloud_download',
|
|
5578
|
+
text: config?.text ?? 'Start Download',
|
|
5579
|
+
downloadReadyIcon: config?.downloadReadyIcon ?? 'download',
|
|
5580
|
+
downloadReadyText: config?.downloadReadyText ?? 'Save File',
|
|
5581
|
+
previewIcon: config?.previewIcon ?? 'preview',
|
|
5582
|
+
previewText: config?.previewText ?? 'View File'
|
|
5583
|
+
};
|
|
5584
|
+
return result;
|
|
5585
|
+
});
|
|
5586
|
+
preloadSignal = computed(() => {
|
|
5587
|
+
const config = this.configSignal();
|
|
5588
|
+
return config.preload ?? false;
|
|
5589
|
+
});
|
|
5590
|
+
downloadUrlSignal = signal(undefined);
|
|
5591
|
+
downloadMimeTypeSignal = signal(undefined);
|
|
5592
|
+
downloadUrlExpiresAtSignal = signal(undefined);
|
|
5593
|
+
storageFileKeyFromInput$ = toObservable(this.storageFileKey).pipe(distinctUntilChanged(), shareReplay(1));
|
|
5594
|
+
storageFileKeyFromSource$ = this.source$.pipe(map((source) => source?.storageFileKey), maybeValueFromObservableOrValue(), distinctUntilChanged(), shareReplay(1));
|
|
5595
|
+
storageFileKey$ = combineLatest([this.storageFileKeyFromInput$, this.storageFileKeyFromSource$]).pipe(map(([storageFileKeyFromInput, storageFileKeyFromSource]) => {
|
|
5596
|
+
return storageFileKeyFromInput ?? storageFileKeyFromSource;
|
|
5597
|
+
}), distinctUntilChanged(), shareReplay(1));
|
|
5598
|
+
storageFileKeySignal = toSignal(this.storageFileKey$);
|
|
5599
|
+
hasDownloadUrlSignal = computed(() => Boolean(this.downloadUrlSignal()));
|
|
5600
|
+
buttonStyleSignal = computed(() => {
|
|
5601
|
+
const config = this.configSignal();
|
|
5602
|
+
const result = {
|
|
5603
|
+
type: 'raised',
|
|
5604
|
+
...config.buttonStyle
|
|
5605
|
+
};
|
|
5606
|
+
return result;
|
|
5607
|
+
});
|
|
5608
|
+
previewButtonStyleSignal = computed(() => {
|
|
5609
|
+
const config = this.configSignal();
|
|
5610
|
+
const result = {
|
|
5611
|
+
type: 'raised',
|
|
5612
|
+
...config.previewButtonStyle
|
|
5613
|
+
};
|
|
5614
|
+
return result;
|
|
5615
|
+
});
|
|
5616
|
+
iconSignal = computed(() => {
|
|
5617
|
+
const config = this.configSignal();
|
|
5618
|
+
const hasDownloadUrl = this.hasDownloadUrlSignal();
|
|
5619
|
+
return hasDownloadUrl ? (config.downloadReadyIcon ?? config.icon) : config.icon;
|
|
5620
|
+
});
|
|
5621
|
+
textSignal = computed(() => {
|
|
5622
|
+
const config = this.configSignal();
|
|
5623
|
+
const hasDownloadUrl = this.hasDownloadUrlSignal();
|
|
5624
|
+
return hasDownloadUrl ? (config.downloadReadyText ?? config.text) : config.text;
|
|
5625
|
+
});
|
|
5626
|
+
previewIconSignal = computed(() => {
|
|
5627
|
+
const config = this.configSignal();
|
|
5628
|
+
return config.previewIcon;
|
|
5629
|
+
});
|
|
5630
|
+
previewTextSignal = computed(() => {
|
|
5631
|
+
const config = this.configSignal();
|
|
5632
|
+
return config.previewText;
|
|
5633
|
+
});
|
|
5634
|
+
anchorSignal = computed(() => {
|
|
5635
|
+
const downloadUrl = this.downloadUrlSignal();
|
|
5636
|
+
let result;
|
|
5637
|
+
if (downloadUrl) {
|
|
5638
|
+
result = {
|
|
5639
|
+
url: downloadUrl
|
|
5640
|
+
};
|
|
5641
|
+
}
|
|
5642
|
+
return result;
|
|
5643
|
+
});
|
|
5644
|
+
storageFileDownloadUrlEffect = effect(() => {
|
|
5645
|
+
const downloadUrl = this.storageFileDownloadUrl();
|
|
5646
|
+
if (downloadUrl || downloadUrl === null) {
|
|
5647
|
+
this.downloadUrlSignal.set(downloadUrl);
|
|
5648
|
+
}
|
|
5649
|
+
}, {
|
|
5650
|
+
allowSignalWrites: true
|
|
5651
|
+
});
|
|
5652
|
+
// Preview
|
|
5653
|
+
showPreviewButtonSignal = computed(() => {
|
|
5654
|
+
const config = this.configSignal();
|
|
5655
|
+
const hasDownloadUrl = this.hasDownloadUrlSignal();
|
|
5656
|
+
return hasDownloadUrl && (config.showPreviewButton ?? true);
|
|
5657
|
+
});
|
|
5658
|
+
openCustomPreviewSignal = computed(() => {
|
|
5659
|
+
const config = this.configSignal();
|
|
5660
|
+
return config.openCustomPreview;
|
|
5661
|
+
});
|
|
5662
|
+
handleOpenPreviewDialog = () => {
|
|
5663
|
+
const openPreview = this.openCustomPreviewSignal();
|
|
5664
|
+
const srcUrl = this.downloadUrlSignal();
|
|
5665
|
+
const inputEmbedMimeType = this.embedMimeType();
|
|
5666
|
+
const downloadMimeType = this.downloadMimeTypeSignal();
|
|
5667
|
+
const embedMimeType = inputEmbedMimeType ?? downloadMimeType;
|
|
5668
|
+
return openPreview?.(srcUrl, embedMimeType) ?? this.dbxWebFilePreviewService.openPreviewDialog(srcUrl, embedMimeType);
|
|
5669
|
+
};
|
|
5670
|
+
// Cached Url Effect
|
|
5671
|
+
// When the key changes, check the cache to see if it is already available, and populate the download url if it is.
|
|
5672
|
+
cachedUrlForStorageFileKey$ = this.storageFileKey$.pipe(switchMap((key) => (key ? this.dbxFirebaseStorageFileDownloadService.getCachedDownloadPairForStorageFile(key) : of(null))), shareReplay(1));
|
|
5673
|
+
cachedUrlForStorageFileKeySignal = toSignal(this.cachedUrlForStorageFileKey$);
|
|
5674
|
+
cachedUrlEffect = effect(() => {
|
|
5675
|
+
const cachedPair = this.cachedUrlForStorageFileKeySignal();
|
|
5676
|
+
if (cachedPair) {
|
|
5677
|
+
this.downloadUrlSignal.set(cachedPair.downloadUrl);
|
|
5678
|
+
this.downloadMimeTypeSignal.set(cachedPair.mimeType);
|
|
5679
|
+
this.downloadUrlExpiresAtSignal.set(cachedPair.expiresAt);
|
|
5680
|
+
}
|
|
5681
|
+
}, {
|
|
5682
|
+
allowSignalWrites: true
|
|
5683
|
+
});
|
|
5684
|
+
// Expiration Effect
|
|
5685
|
+
downloadUrlExpiresAt$ = toObservable(this.downloadUrlExpiresAtSignal).pipe(map(dateFromDateOrTimeSecondsNumber), distinctUntilChanged(), shareReplay(1));
|
|
5686
|
+
downloadUrlHasExpired$ = this.downloadUrlExpiresAt$.pipe(switchMap((x) => {
|
|
5687
|
+
let obs;
|
|
5688
|
+
if (x) {
|
|
5689
|
+
obs = interval(MS_IN_SECOND).pipe(map(() => isPast(x)), distinctUntilChanged(), shareReplay(1));
|
|
5690
|
+
}
|
|
5691
|
+
else {
|
|
5692
|
+
obs = of(false);
|
|
5693
|
+
}
|
|
5694
|
+
return obs;
|
|
5695
|
+
}), distinctUntilChanged(), shareReplay(1));
|
|
5696
|
+
downloadUrlHasExpiredSignal = toSignal(this.downloadUrlHasExpired$);
|
|
5697
|
+
downloadUrlHasExpiredEffect = effect(() => {
|
|
5698
|
+
const expired = this.downloadUrlHasExpiredSignal();
|
|
5699
|
+
if (expired) {
|
|
5700
|
+
this.downloadUrlSignal.set(undefined);
|
|
5701
|
+
this.downloadMimeTypeSignal.set(undefined);
|
|
5702
|
+
this.downloadUrlExpiresAtSignal.set(undefined);
|
|
5703
|
+
}
|
|
5704
|
+
}, {
|
|
5705
|
+
allowSignalWrites: true
|
|
5706
|
+
});
|
|
5707
|
+
// Output Effect
|
|
5708
|
+
downloadUrlChangeEffect = effect(() => {
|
|
5709
|
+
const downloadUrl = this.downloadUrlSignal();
|
|
5710
|
+
this.downloadUrlChange.emit(downloadUrl);
|
|
5711
|
+
});
|
|
5712
|
+
// Handlers
|
|
5713
|
+
handleGetDownloadUrl = (value, context) => {
|
|
5714
|
+
const source = this.source();
|
|
5715
|
+
const { customSource, handleGetDownloadUrl } = source ?? {};
|
|
5716
|
+
if (handleGetDownloadUrl) {
|
|
5717
|
+
handleGetDownloadUrl(value, context);
|
|
5718
|
+
}
|
|
5719
|
+
else {
|
|
5720
|
+
context.startWorkingWithObservable(this.dbxFirebaseStorageFileDownloadService.downloadPairForStorageFileUsingSource(value, customSource));
|
|
5721
|
+
}
|
|
5722
|
+
};
|
|
5723
|
+
handleGetDownloadUrlSuccess = (value) => {
|
|
5724
|
+
const source = this.source();
|
|
5725
|
+
const { handleGetDownloadUrlSuccess } = source ?? {};
|
|
5726
|
+
this.downloadUrlSignal.set(value.downloadUrl);
|
|
5727
|
+
this.downloadMimeTypeSignal.set(value.mimeType);
|
|
5728
|
+
this.downloadUrlExpiresAtSignal.set(value.expiresAt);
|
|
5729
|
+
if (handleGetDownloadUrlSuccess) {
|
|
5730
|
+
handleGetDownloadUrlSuccess(value);
|
|
5731
|
+
}
|
|
5732
|
+
};
|
|
5733
|
+
handleGetDownloadUrlError = (error) => {
|
|
5734
|
+
const source = this.source();
|
|
5735
|
+
const { handleGetDownloadUrlError } = source ?? {};
|
|
5736
|
+
this.downloadUrlSignal.set(undefined);
|
|
5737
|
+
this.downloadMimeTypeSignal.set(undefined);
|
|
5738
|
+
this.downloadUrlExpiresAtSignal.set(undefined);
|
|
5739
|
+
if (handleGetDownloadUrlError) {
|
|
5740
|
+
handleGetDownloadUrlError(error);
|
|
5741
|
+
}
|
|
5742
|
+
};
|
|
5743
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5744
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DbxFirebaseStorageFileDownloadButton, isStandalone: true, selector: "dbx-firebase-storagefile-download-button", inputs: { storageFileKey: { classPropertyName: "storageFileKey", publicName: "storageFileKey", isSignal: true, isRequired: false, transformFunction: null }, storageFileDownloadUrl: { classPropertyName: "storageFileDownloadUrl", publicName: "storageFileDownloadUrl", isSignal: true, isRequired: false, transformFunction: null }, embedMimeType: { classPropertyName: "embedMimeType", publicName: "embedMimeType", isSignal: true, isRequired: false, transformFunction: null }, showPreviewButton: { classPropertyName: "showPreviewButton", publicName: "showPreviewButton", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { downloadUrlChange: "downloadUrlChange" }, ngImport: i0, template: `
|
|
5745
|
+
<dbx-anchor dbxActionAnchor [anchor]="anchorSignal()" dbxAction [dbxActionAutoTrigger]="preloadSignal()" dbxActionSnackbarError [dbxActionDisabled]="!storageFileKeySignal()" [dbxActionValue]="storageFileKeySignal()" [dbxActionHandler]="handleGetDownloadUrl" [dbxActionSuccessHandler]="handleGetDownloadUrlSuccess" [dbxActionErrorHandler]="handleGetDownloadUrlError">
|
|
5746
|
+
<dbx-button dbxActionButton [buttonStyle]="buttonStyleSignal()" [icon]="iconSignal()" [text]="textSignal()"></dbx-button>
|
|
5747
|
+
</dbx-anchor>
|
|
5748
|
+
@if (showPreviewButtonSignal()) {
|
|
5749
|
+
<ng-container dbxAction [dbxActionDialog]="handleOpenPreviewDialog" dbxActionHandlerValue>
|
|
5750
|
+
<span class="dbx-button-spacer"></span>
|
|
5751
|
+
<dbx-button dbxActionButton [buttonStyle]="previewButtonStyleSignal()" [icon]="previewIconSignal()" [text]="previewTextSignal()"></dbx-button>
|
|
5752
|
+
</ng-container>
|
|
5753
|
+
}
|
|
5754
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "raised", "stroked", "flat", "iconOnly", "fab", "mode"] }, { kind: "ngmodule", type: DbxActionModule }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionHandlerValueDirective, selector: "[dbxActionHandlerValue]", inputs: ["dbxActionHandlerValue"] }, { kind: "directive", type: i2.DbxActionDisabledDirective, selector: "[dbxActionDisabled]", inputs: ["dbxActionDisabled"] }, { kind: "directive", type: i2.DbxActionAutoTriggerDirective, selector: "dbxActionAutoTrigger,[dbxActionAutoTrigger]", inputs: ["triggerDebounce", "triggerThrottle", "triggerErrorThrottle", "maxErrorsForThrottle", "triggerLimit", "dbxActionAutoTrigger", "useFastTriggerPreset", "useInstantTriggerPreset"] }, { kind: "directive", type: i2.DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i2.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "directive", type: i2.DbxActionErrorHandlerDirective, selector: "[dbxActionErrorHandler]", inputs: ["dbxActionErrorHandler"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "directive", type: DbxActionSnackbarErrorDirective, selector: "[dbxActionSnackbarError]", inputs: ["dbxActionSnackbarError"] }, { kind: "directive", type: DbxActionDialogDirective, selector: "[dbxActionDialog]", inputs: ["dbxActionDialog", "dbxActionDialogIsModified", "dbxActionDialogIsEqual"], exportAs: ["dbxActionDialog"] }, { kind: "component", type: DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5755
|
+
}
|
|
5756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DbxFirebaseStorageFileDownloadButton, decorators: [{
|
|
5757
|
+
type: Component,
|
|
5758
|
+
args: [{
|
|
5759
|
+
selector: 'dbx-firebase-storagefile-download-button',
|
|
5760
|
+
template: `
|
|
5761
|
+
<dbx-anchor dbxActionAnchor [anchor]="anchorSignal()" dbxAction [dbxActionAutoTrigger]="preloadSignal()" dbxActionSnackbarError [dbxActionDisabled]="!storageFileKeySignal()" [dbxActionValue]="storageFileKeySignal()" [dbxActionHandler]="handleGetDownloadUrl" [dbxActionSuccessHandler]="handleGetDownloadUrlSuccess" [dbxActionErrorHandler]="handleGetDownloadUrlError">
|
|
5762
|
+
<dbx-button dbxActionButton [buttonStyle]="buttonStyleSignal()" [icon]="iconSignal()" [text]="textSignal()"></dbx-button>
|
|
5763
|
+
</dbx-anchor>
|
|
5764
|
+
@if (showPreviewButtonSignal()) {
|
|
5765
|
+
<ng-container dbxAction [dbxActionDialog]="handleOpenPreviewDialog" dbxActionHandlerValue>
|
|
5766
|
+
<span class="dbx-button-spacer"></span>
|
|
5767
|
+
<dbx-button dbxActionButton [buttonStyle]="previewButtonStyleSignal()" [icon]="previewIconSignal()" [text]="previewTextSignal()"></dbx-button>
|
|
5768
|
+
</ng-container>
|
|
5769
|
+
}
|
|
5770
|
+
`,
|
|
5771
|
+
imports: [DbxButtonComponent, DbxActionModule, DbxActionSnackbarErrorDirective, DbxActionDialogDirective, DbxAnchorComponent],
|
|
5772
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5773
|
+
standalone: true
|
|
5774
|
+
}]
|
|
5775
|
+
}] });
|
|
5776
|
+
|
|
5306
5777
|
/**
|
|
5307
5778
|
* Store used for selecting a specific NotificationItem from a list of notification items.
|
|
5308
5779
|
*/
|
|
@@ -5778,6 +6249,7 @@ class StorageFileDocumentStore extends AbstractDbxFirebaseDocumentStore {
|
|
|
5778
6249
|
updateStorageFile = firebaseDocumentStoreUpdateFunction(this, this.storageFileFunctions.storageFile.updateStorageFile.update);
|
|
5779
6250
|
processStorageFile = firebaseDocumentStoreUpdateFunction(this, this.storageFileFunctions.storageFile.updateStorageFile.process);
|
|
5780
6251
|
deleteStorageFile = firebaseDocumentStoreDeleteFunction(this, this.storageFileFunctions.storageFile.deleteStorageFile.delete);
|
|
6252
|
+
downloadStorageFile = firebaseDocumentStoreReadFunction(this, this.storageFileFunctions.storageFile.readStorageFile.download);
|
|
5781
6253
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StorageFileDocumentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5782
6254
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StorageFileDocumentStore });
|
|
5783
6255
|
}
|
|
@@ -5976,6 +6448,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5976
6448
|
}]
|
|
5977
6449
|
}] });
|
|
5978
6450
|
|
|
6451
|
+
/**
|
|
6452
|
+
* Factory function for creating a StorageAccessor for the model view tracker.
|
|
6453
|
+
*/
|
|
6454
|
+
function defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory(storageAccessorFactory) {
|
|
6455
|
+
const accessor = storageAccessorFactory.createStorageAccessor({
|
|
6456
|
+
prefix: 'sfds'
|
|
6457
|
+
});
|
|
6458
|
+
return accessor;
|
|
6459
|
+
}
|
|
6460
|
+
/**
|
|
6461
|
+
* Creates EnvironmentProviders for providing DbxModelTrackerService, DbxModelObjectStateService and sets up the NgRx store for DbxModelTrackerEffects.
|
|
6462
|
+
*
|
|
6463
|
+
* @returns EnvironmentProviders
|
|
6464
|
+
*/
|
|
6465
|
+
function provideDbxFirebaseStorageFileService() {
|
|
6466
|
+
const providers = [
|
|
6467
|
+
// Storage accessor
|
|
6468
|
+
{
|
|
6469
|
+
provide: DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN,
|
|
6470
|
+
useFactory: defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory,
|
|
6471
|
+
deps: [SimpleStorageAccessorFactory]
|
|
6472
|
+
},
|
|
6473
|
+
// Service
|
|
6474
|
+
DbxFirebaseStorageFileDownloadStorage,
|
|
6475
|
+
DbxFirebaseStorageFileDownloadService
|
|
6476
|
+
];
|
|
6477
|
+
return makeEnvironmentProviders(providers);
|
|
6478
|
+
}
|
|
6479
|
+
|
|
5979
6480
|
class FlatFirestoreModelKeyPipe {
|
|
5980
6481
|
transform(input) {
|
|
5981
6482
|
if (input != null) {
|
|
@@ -6221,7 +6722,7 @@ function provideDbxFirebaseModelTypesService(config) {
|
|
|
6221
6722
|
* @returns EnvironmentProviders for the DbxFirebase configuration.
|
|
6222
6723
|
*/
|
|
6223
6724
|
function provideDbxFirebase(config) {
|
|
6224
|
-
const { app, emulator, storage, auth, functions, firestores, modelContextService, modelTypesService, development, notifications, provideAnalyticsUserEventsListener } = config;
|
|
6725
|
+
const { app, emulator, storage, auth, functions, firestores, modelContextService, modelTypesService, development, notifications, provideAnalyticsUserEventsListener, provideStorageFileService } = config;
|
|
6225
6726
|
const providers = [provideDbxFirebaseApp(app), provideDbxFirebaseEmulator(emulator), providedDbxFirebaseStorage(storage), provideDbxFirebaseAuth(auth), provideDbxFirebaseFunctions(functions), provideDbxFirebaseModelContextService(modelContextService), provideDbxFirebaseModelTypesService(modelTypesService)];
|
|
6226
6727
|
asArray(firestores).forEach((firestore) => {
|
|
6227
6728
|
providers.push(provideDbxFirestoreCollection(firestore));
|
|
@@ -6235,6 +6736,9 @@ function provideDbxFirebase(config) {
|
|
|
6235
6736
|
if (notifications != null) {
|
|
6236
6737
|
providers.push(provideDbxFirebaseNotifications(notifications));
|
|
6237
6738
|
}
|
|
6739
|
+
if (provideStorageFileService) {
|
|
6740
|
+
providers.push(provideDbxFirebaseStorageFileService());
|
|
6741
|
+
}
|
|
6238
6742
|
return makeEnvironmentProviders(providers);
|
|
6239
6743
|
}
|
|
6240
6744
|
|
|
@@ -6242,5 +6746,5 @@ function provideDbxFirebase(config) {
|
|
|
6242
6746
|
* Generated bundle index. Do not edit.
|
|
6243
6747
|
*/
|
|
6244
6748
|
|
|
6245
|
-
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_LOGIN_COMPONENTS, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseEmulatorService, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelContextService, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryModule, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesModule, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationModule, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePipeModule, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStorageModule, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FlatFirestoreModelKeyPipe, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, importsAndExports$1 as importsAndExports, modelDoesNotExistError, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseEmulator, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseNotifications, provideDbxFirestoreCollection, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
|
|
6749
|
+
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_LOGIN_COMPONENTS, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseEmulatorService, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelContextService, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryModule, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesModule, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationModule, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePipeModule, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButton, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStorageModule, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FlatFirestoreModelKeyPipe, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, importsAndExports$1 as importsAndExports, modelDoesNotExistError, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseEmulator, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
|
|
6246
6750
|
//# sourceMappingURL=dereekb-dbx-firebase.mjs.map
|