@dereekb/dbx-firebase 13.41.0 → 13.42.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.
@@ -4,16 +4,16 @@ import { DbxAnalyticsService } from '@dereekb/dbx-analytics';
4
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, switchMapMaybe, beginLoading, mapLoadingStateValueWithOperator, valueFromFinishedLoadingState, skipInitialMaybe, distinctUntilModelKeyChange, successResult, errorResult, isLoadingStateLoading, cleanup, mapLoadingState, startWithBeginLoading, throwErrorFromLoadingStateError, maybeValueFromObservableOrValue, distinctUntilHasDifferentValues, MultiSubscriptionObject, skipAllInitialMaybe } from '@dereekb/rxjs';
5
5
  import { Observable, switchMap, of, shareReplay, map, Subject, merge, distinctUntilChanged, EMPTY, catchError, firstValueFrom, tap, BehaviorSubject, combineLatest, first, from, interval, exhaustMap, filter, take, startWith, throttleTime, NEVER, defaultIfEmpty, combineLatestWith, timer, takeWhile, withLatestFrom, mergeMap } from 'rxjs';
6
6
  import * as i2 from '@dereekb/dbx-core';
7
- import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponent, AbstractForwardDbxInjectionContextDirective, DbxInjectionContextDirective, DbxAuthImpersonationDelegate, DbxAuthService, provideDbxAuthImpersonation, DbxActionButtonDirective, completeOnDestroy, cleanSubscription, DbxActionDirective, DbxActionEnforceModifiedDirective, DbxActionHandlerDirective, DbxActionAutoTriggerDirective, clean, cleanLoadingContext, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, AbstractIfDirective, LockSetComponentStore, newWithInjector, DbxActionDisabledDirective, CutTextPipe, DbxActionValueDirective, DbxActionContextStoreSourceInstance, DbxActionHandlerInstance, cleanSubscriptionWithLockSet, DbxButton, SimpleStorageAccessorFactory, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance } from '@dereekb/dbx-core';
7
+ import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponent, AbstractForwardDbxInjectionContextDirective, DbxInjectionContextDirective, DbxAuthImpersonationDelegate, DbxAuthService, provideDbxAuthImpersonation, DbxActionButtonDirective, completeOnDestroy, cleanSubscription, DbxActionDirective, DbxActionEnforceModifiedDirective, DbxActionHandlerDirective, DbxActionAutoTriggerDirective, clean, cleanLoadingContext, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, AbstractIfDirective, LockSetComponentStore, newWithInjector, DbxActionValueDirective, DbxActionDisabledDirective, TimeDistanceCountdownPipe, CutTextPipe, DbxActionContextStoreSourceInstance, DbxActionHandlerInstance, cleanSubscriptionWithLockSet, DbxButton, SimpleStorageAccessorFactory, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance } from '@dereekb/dbx-core';
8
8
  import { onAuthStateChanged, onIdTokenChanged, confirmPasswordReset, sendPasswordResetEmail, signInWithPopup, signInWithRedirect, linkWithPopup, linkWithRedirect, linkWithCredential, unlink, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, reauthenticateWithPopup, reauthenticateWithRedirect, getRedirectResult, OAuthProvider, FacebookAuthProvider, GithubAuthProvider, GoogleAuthProvider, TwitterAuthProvider, getAuth, connectAuthEmulator } from 'firebase/auth';
9
9
  import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeArrayValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, forEachKeyValue, countAllInNestedArray, invertDecision, useIterableOrValue, filterUniqueValues, reverseCompareFn, sortByNumberFunction, separateValues, readableError, isMaybeSo, firstValue, fixExtraQueryParameters, areEqualPOJOValues, MS_IN_SECOND, splitJoinRemainder, MS_IN_HOUR, SECONDS_IN_MINUTE, MS_IN_DAY, unixDateTimeSecondsNumberForNow, MS_IN_MINUTE, addMilliseconds, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, isPast } from '@dereekb/util';
10
10
  import { safeFormatToISO8601DateString, msToSeconds, isSameDate } from '@dereekb/date';
11
11
  import { getToken, initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check';
12
12
  import * as i1$1 from '@dereekb/dbx-web';
13
- import { DbxLinkComponent, DbxActionModule, DbxButtonModule, DbxErrorComponent, DbxActionErrorDirective, DbxButtonComponent, DbxButtonSpacerDirective, DbxRouterAnchorModule, DbxSectionComponent, DbxWidgetService, AbstractDbxSelectionListWrapperDirective, DbxListWrapperComponentImportsModule, provideDbxListViewWrapper, DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE, AbstractDbxSelectionListViewDirective, DbxSelectionValueListViewComponentImportsModule, provideDbxListView, 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, DbxLoadingComponent, DbxDetailBlockComponent, DbxClickToCopyTextComponent, DbxDownloadTextViewComponent, DbxModelObjectStateService, DbxListViewWrapper, AbstractDbxListWrapperDirective, AbstractDbxListViewDirective, DbxValueListViewComponentImportsModule, DEFAULT_DBX_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, DbxActionConfirmDirective, DbxAvatarComponent, DbxChipDirective, DbxColorDirective, DbxIconTileComponent, DbxContentPitDirective, AbstractDbxWidgetComponent, AbstractDialogDirective, DbxDialogContentDirective, DbxPopoverInteractionModule, DbxListModifierModule, DbxWebFilePreviewService, DbxActionSnackbarErrorDirective, DbxActionDialogDirective, compressImageFile, DbxFileUploadComponent, DbxPdfMergeEditorStore, PDF_MERGE_RESULT_MIME_TYPE, DbxActionLoadingContextDirective, DbxFileUploadActionSyncDirective } from '@dereekb/dbx-web';
13
+ import { DbxLinkComponent, DbxActionModule, DbxButtonModule, DbxErrorComponent, DbxActionErrorDirective, DbxButtonComponent, DbxButtonSpacerDirective, DbxRouterAnchorModule, DbxSectionComponent, DbxWidgetService, AbstractDbxSelectionListWrapperDirective, DbxListWrapperComponentImportsModule, provideDbxListViewWrapper, DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE, AbstractDbxSelectionListViewDirective, DbxSelectionValueListViewComponentImportsModule, provideDbxListView, 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, DbxLoadingComponent, DbxDetailBlockComponent, DbxClickToCopyTextComponent, DbxDownloadTextViewComponent, DbxModelObjectStateService, DbxListViewWrapper, DbxActionConfirmDirective, DbxActionSnackbarErrorDirective, AbstractDialogDirective, DbxDialogModule, DbxContentPitDirective, AbstractDbxListWrapperDirective, AbstractDbxListViewDirective, DbxValueListViewComponentImportsModule, DEFAULT_DBX_VALUE_LIST_COMPONENT_CONFIGURATION_TEMPLATE, DbxAvatarComponent, DbxChipDirective, DbxColorDirective, DbxIconTileComponent, AbstractDbxWidgetComponent, DbxDialogContentDirective, DbxPopoverInteractionModule, DbxListModifierModule, DbxWebFilePreviewService, DbxActionDialogDirective, compressImageFile, DbxFileUploadComponent, DbxPdfMergeEditorStore, PDF_MERGE_RESULT_MIME_TYPE, DbxActionLoadingContextDirective, DbxFileUploadActionSyncDirective } from '@dereekb/dbx-web';
14
14
  import * as i1 from '@angular/material/icon';
15
15
  import { MatIconModule, MatIcon } from '@angular/material/icon';
16
- import { firebaseAuthErrorToReadableError, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, 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, firestoreModelId, flatFirestoreModelKey, twoWayFlatFirestoreModelKey, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, documentDataWithIdAndKey, isClientFirebaseError, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, inferKeyFromTwoWayFlatFirestoreModelKey, firestoreModelKeyParentKey, userExternalConnectionEntryIsConnected, CALCOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, ZOOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, DISCORD_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, ZOHO_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, UserExternalConnectionFunctions, NotificationHealthCheckStatus, NotificationDeliveryMethod, MailgunNotificationHealthCheckIssueCode, KnownNotificationHealthCheckIssueCode, AppNotificationTemplateTypeInfoRecordService, NotificationFunctions, notificationUserHealthCheckNextRunAt, notificationUserHealthCheckNextProbeAtByMethod, notificationHealthCheckPendingProbeMethods, notificationUserHealthCheckNextVerifyAt, DEFAULT_NOTIFICATION_USER_HEALTH_CHECK_VERIFY_THROTTLE_SECONDS, ALL_NOTIFICATION_DELIVERY_METHODS, unreadNotificationItems, StorageFileFunctions, firestoreModelKey, storageFileIdentity, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
16
+ import { firebaseAuthErrorToReadableError, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FirebaseDevelopmentFunctions, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, NotificationFirestoreCollections, StorageFileFirestoreCollections, CalendarFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, firestoreModelKeyCollectionTypePair, buildFirebaseCollectionTypeModelTypeMap, firestoreModelId, flatFirestoreModelKey, twoWayFlatFirestoreModelKey, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, documentDataWithIdAndKey, isClientFirebaseError, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, inferKeyFromTwoWayFlatFirestoreModelKey, firestoreModelKeyParentKey, CalendarFunctions, firestoreModelKey, storageFileIdentity, calendarNextIcsRotateAt, isCalendarIcsRotateThrottled, calendarSyncState, userExternalConnectionEntryIsConnected, CALCOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, ZOOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, DISCORD_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, ZOHO_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, UserExternalConnectionFunctions, NotificationHealthCheckStatus, NotificationDeliveryMethod, MailgunNotificationHealthCheckIssueCode, KnownNotificationHealthCheckIssueCode, AppNotificationTemplateTypeInfoRecordService, NotificationFunctions, notificationUserHealthCheckNextRunAt, notificationUserHealthCheckNextProbeAtByMethod, notificationHealthCheckPendingProbeMethods, notificationUserHealthCheckNextVerifyAt, DEFAULT_NOTIFICATION_USER_HEALTH_CHECK_VERIFY_THROTTLE_SECONDS, ALL_NOTIFICATION_DELIVERY_METHODS, unreadNotificationItems, StorageFileFunctions, GOOGLE_CLOUD_STORAGE_PUBLIC_URL_API_ENDPOINT, storagePublicDownloadUrl, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
17
17
  import * as i1$2 from '@dereekb/dbx-form';
18
18
  import { AbstractSyncForgeFormDirective, dbxForgeEmailField, DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, DBX_FORGE_FORM_COMPONENT_TEMPLATE, AbstractConfigAsyncForgeFormDirective, dbxForgeUsernameLoginField, dbxForgeTextPasswordField, dbxForgeTextVerifyPasswordField, DbxActionFormDirective, DbxFormSourceDirective, dbxForgeTextPasswordWithVerifyField, dbxForgeTextField, dbxForgePickableChipField, filterPickableItemFieldValuesByLabel } from '@dereekb/dbx-form';
19
19
  import { NgTemplateOutlet, DatePipe } from '@angular/common';
@@ -1050,10 +1050,10 @@ class DbxFirebaseAuthLoginService {
1050
1050
  }
1051
1051
  // MARK: Get
1052
1052
  getRegisteredTypes() {
1053
- return [...this._providers.keys()];
1053
+ return Array.from(this._providers.keys());
1054
1054
  }
1055
1055
  getEnabledTypes() {
1056
- return this._enableAll ? this.getRegisteredTypes() : [...this._enabled];
1056
+ return this._enableAll ? this.getRegisteredTypes() : Array.from(this._enabled);
1057
1057
  }
1058
1058
  getLoginProvider(type) {
1059
1059
  return this._providers.get(type);
@@ -2504,7 +2504,7 @@ class DbxFirebaseDevelopmentWidgetService {
2504
2504
  return result;
2505
2505
  }
2506
2506
  getEntryWidgetIdentifiers() {
2507
- return [...this._entries.keys()];
2507
+ return Array.from(this._entries.keys());
2508
2508
  }
2509
2509
  getEntries() {
2510
2510
  return iterableToArray(this._entries.values());
@@ -2765,16 +2765,43 @@ class DbxFirebaseEmulatorService {
2765
2765
  get useEmulators() {
2766
2766
  return this.emulatorsConfig.useEmulators || false;
2767
2767
  }
2768
- get emulatorUIAnchor() {
2769
- const ui = this.emulatorsConfig.ui;
2770
- let host = this.emulatorsConfig.host;
2771
- // Issue where sometimes 0.0.0.0 is not configured to handle transferring traffic properly, compared to localhost. This sets 0.0.0.0 to localhost unless disallowed.
2772
- if (host === '0.0.0.0' && this.emulatorsConfig.allow0000ToLocalhost !== false) {
2773
- host = 'localhost';
2768
+ /**
2769
+ * Returns the origin (protocol and host, with no trailing slash) the BROWSER should use to reach the
2770
+ * input emulator, or undefined if that emulator is not configured.
2771
+ *
2772
+ * The `0.0.0.0` fix lives here rather than at each call site: the emulators bind to `0.0.0.0` so traffic
2773
+ * from outside the container reaches them, but a browser cannot always route to that address, so it is
2774
+ * rewritten to localhost unless disallowed. Any url handed to the browser needs that rewrite, which is
2775
+ * why this is shared rather than repeated.
2776
+ *
2777
+ * @param emulator - The parsed config of the emulator to reach.
2778
+ * @returns The emulator's origin, or undefined when it is not configured.
2779
+ */
2780
+ originForEmulator(emulator) {
2781
+ let result;
2782
+ if (emulator) {
2783
+ const host = emulator.host === '0.0.0.0' && this.emulatorsConfig.allow0000ToLocalhost !== false ? 'localhost' : emulator.host;
2784
+ result = `http://${host}:${emulator.port}`;
2774
2785
  }
2775
- return ui
2786
+ return result;
2787
+ }
2788
+ /**
2789
+ * Origin of the storage emulator, or undefined when the app is not pointed at one.
2790
+ *
2791
+ * Gated on the same condition `createDbxFirebaseStorage()` uses to decide whether to call
2792
+ * `connectStorageEmulator()`, so this answers "is storage emulated" rather than merely "is a storage
2793
+ * emulator configured".
2794
+ *
2795
+ * @returns The storage emulator's origin, or undefined when storage is not emulated.
2796
+ */
2797
+ get storageEmulatorOrigin() {
2798
+ return this.useEmulators ? this.originForEmulator(this.emulatorsConfig.storage) : undefined;
2799
+ }
2800
+ get emulatorUIAnchor() {
2801
+ const url = this.originForEmulator(this.emulatorsConfig.ui);
2802
+ return url
2776
2803
  ? {
2777
- url: `http://${host ?? 'localhost'}:${ui.port}`,
2804
+ url,
2778
2805
  target: '_blank'
2779
2806
  }
2780
2807
  : undefined;
@@ -3315,6 +3342,19 @@ function provideStorageFileFirestoreCollections(appCollection) {
3315
3342
  }
3316
3343
  return appCollection;
3317
3344
  }
3345
+ /**
3346
+ * Provider factory for the CalendarFirestoreCollections.
3347
+ *
3348
+ * @param appCollection - The app collection class to use.
3349
+ * @returns Provider factory for the CalendarFirestoreCollections.
3350
+ * @throws {Error} When `appCollection` does not expose a `calendarCollection`.
3351
+ */
3352
+ function provideCalendarFirestoreCollections(appCollection) {
3353
+ if (!appCollection.calendarCollection) {
3354
+ throw new Error(`CalendarFirestoreCollections could not be provided using the app's app collection. Set provideCalendarFirestoreCollections to false in DbxFirebaseFirestoreCollectionModuleConfig to prevent auto-initialization, or update your app's collection class to implement CalendarFirestoreCollections.`);
3355
+ }
3356
+ return appCollection;
3357
+ }
3318
3358
  /**
3319
3359
  * Creates EnvironmentProviders for the DBX_FIRESTORE_CONTEXT_TOKEN, appCollectionClass, and optionally the SystemStateFirestoreCollections and NotificationFirestoreCollections.
3320
3360
  *
@@ -3359,6 +3399,13 @@ function provideDbxFirestoreCollection(config) {
3359
3399
  deps: [config.appCollectionClass]
3360
3400
  });
3361
3401
  }
3402
+ if (config.provideCalendarFirestoreCollections) {
3403
+ providers.push({
3404
+ provide: CalendarFirestoreCollections,
3405
+ useFactory: provideCalendarFirestoreCollections,
3406
+ deps: [config.appCollectionClass]
3407
+ });
3408
+ }
3362
3409
  return makeEnvironmentProviders(providers);
3363
3410
  }
3364
3411
 
@@ -4460,7 +4507,7 @@ class DbxFirebaseModelEntitiesWidgetService {
4460
4507
  }
4461
4508
  // MARK: Get
4462
4509
  getAllRegisteredWidgetIdentities() {
4463
- return [...this._entries.keys()];
4510
+ return Array.from(this._entries.keys());
4464
4511
  }
4465
4512
  getWidgetEntry(identity) {
4466
4513
  const entry = this._entries.get(identity);
@@ -6262,6 +6309,323 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
6262
6309
  }]
6263
6310
  }] });
6264
6311
 
6312
+ /**
6313
+ * Button that rotates a calendar's published ICS link, revoking the url subscribers currently hold.
6314
+ *
6315
+ * Its own component rather than markup inside the subscribe dialog because everything it has to express is
6316
+ * about the action and none of it is about the dialog: rotation needs a calendar that exists, the server
6317
+ * enforces a rotation throttle, and the confirm prompt has to spell out that every existing subscription
6318
+ * breaks. A caller that wants the affordance somewhere else — an admin screen, a settings page — drops in
6319
+ * the same component.
6320
+ *
6321
+ * Renders nothing but the button, unconditionally, and disables it instead of substituting an explanation —
6322
+ * so a host's layout does not shift with the calendar's state and the control stays exactly where the caller
6323
+ * put it. The disabled reason is deliberately unstated: the confirm prompt is where the consequences belong,
6324
+ * and the server rejects an early rotation regardless.
6325
+ */
6326
+ class DbxFirebaseCalendarIcsRotateButtonComponent {
6327
+ /**
6328
+ * Store for the calendar whose link is rotated.
6329
+ *
6330
+ * An input rather than an injected store, since the most common host is a dialog that received its store
6331
+ * through `MAT_DIALOG_DATA` and therefore cannot provide it through the injector.
6332
+ */
6333
+ calendarDocumentStore = input.required(...(ngDevMode ? [{ debugName: "calendarDocumentStore" }] : /* istanbul ignore next */ []));
6334
+ calendarDocumentStore$ = toObservable(this.calendarDocumentStore);
6335
+ /**
6336
+ * Whether the calendar document exists, which is the precondition for rotating its link.
6337
+ *
6338
+ * The callable authorizes against the Calendar itself, so a key that names nothing is rejected rather
6339
+ * than reported as a no-op revocation.
6340
+ */
6341
+ existsSignal = toSignal(this.calendarDocumentStore$.pipe(switchMap((x) => x.exists$)), { initialValue: false });
6342
+ isThrottledSignal = toSignal(this.calendarDocumentStore$.pipe(switchMap((x) => x.isIcsRotateThrottled$)), { initialValue: false });
6343
+ /**
6344
+ * Whether rotation is unavailable, for either of its two reasons.
6345
+ *
6346
+ * The button stays rendered and goes disabled rather than being swapped for an explanation, so the control
6347
+ * a caller lays out is in the same place whatever the calendar's state.
6348
+ */
6349
+ isDisabledSignal = computed(() => {
6350
+ // both read unconditionally, so the computed tracks them on every run
6351
+ const exists = this.existsSignal();
6352
+ const isThrottled = this.isThrottledSignal();
6353
+ return !exists || isThrottled;
6354
+ }, ...(ngDevMode ? [{ debugName: "isDisabledSignal" }] : /* istanbul ignore next */ []));
6355
+ rotateConfirmConfig = {
6356
+ title: 'Rotate the calendar link?',
6357
+ prompt: 'The current link stops working and every calendar already subscribed to it breaks. A new link is generated by the next sync.',
6358
+ confirmText: 'Rotate Link'
6359
+ };
6360
+ handleRotateLink = (_, context) => {
6361
+ context.startWorkingWithLoadingStateObservable(this.calendarDocumentStore().rotateIcs({}));
6362
+ };
6363
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseCalendarIcsRotateButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6364
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DbxFirebaseCalendarIcsRotateButtonComponent, isStandalone: true, selector: "dbx-firebase-calendar-ics-rotate-button", inputs: { calendarDocumentStore: { classPropertyName: "calendarDocumentStore", publicName: "calendarDocumentStore", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "dbx-firebase-calendar-ics-rotate-button" }, ngImport: i0, template: `
6365
+ <!-- dbxActionDisabled rather than the button's own disabled input, since dbxActionButton drives that from the action's state -->
6366
+ <!-- the action takes no input, so the bare dbxActionValue marks it value-ready on trigger -->
6367
+ <div dbxAction dbxActionValue dbxActionSnackbarError [dbxActionDisabled]="isDisabledSignal()" [dbxActionHandler]="handleRotateLink" [dbxActionConfirm]="rotateConfirmConfig">
6368
+ <dbx-button dbxActionButton color="warn" icon="autorenew" text="Rotate Link"></dbx-button>
6369
+ <dbx-error dbxActionError></dbx-error>
6370
+ </div>
6371
+ `, isInline: true, dependencies: [{ kind: "directive", type: DbxActionDirective, selector: "dbx-action,[dbxAction]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: DbxActionValueDirective, selector: "dbxActionValue,[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: DbxActionDisabledDirective, selector: "[dbxActionDisabled]", inputs: ["dbxActionDisabled"] }, { kind: "directive", type: DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: DbxActionButtonDirective, selector: "[dbxActionButton]", inputs: ["dbxActionButtonEcho"] }, { kind: "directive", type: DbxActionConfirmDirective, selector: "[dbxActionConfirm]", inputs: ["dbxActionConfirm", "dbxActionConfirmSkip"] }, { kind: "directive", type: DbxActionSnackbarErrorDirective, selector: "[dbxActionSnackbarError]", inputs: ["dbxActionSnackbarError"] }, { kind: "directive", type: DbxActionErrorDirective, selector: "[dbxActionError]" }, { 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: DbxErrorComponent, selector: "dbx-error", inputs: ["error", "iconOnly"], outputs: ["popoverOpened"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6372
+ }
6373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseCalendarIcsRotateButtonComponent, decorators: [{
6374
+ type: Component,
6375
+ args: [{
6376
+ selector: 'dbx-firebase-calendar-ics-rotate-button',
6377
+ template: `
6378
+ <!-- dbxActionDisabled rather than the button's own disabled input, since dbxActionButton drives that from the action's state -->
6379
+ <!-- the action takes no input, so the bare dbxActionValue marks it value-ready on trigger -->
6380
+ <div dbxAction dbxActionValue dbxActionSnackbarError [dbxActionDisabled]="isDisabledSignal()" [dbxActionHandler]="handleRotateLink" [dbxActionConfirm]="rotateConfirmConfig">
6381
+ <dbx-button dbxActionButton color="warn" icon="autorenew" text="Rotate Link"></dbx-button>
6382
+ <dbx-error dbxActionError></dbx-error>
6383
+ </div>
6384
+ `,
6385
+ host: { class: 'dbx-firebase-calendar-ics-rotate-button' },
6386
+ imports: [DbxActionDirective, DbxActionValueDirective, DbxActionDisabledDirective, DbxActionHandlerDirective, DbxActionButtonDirective, DbxActionConfirmDirective, DbxActionSnackbarErrorDirective, DbxActionErrorDirective, DbxButtonComponent, DbxErrorComponent],
6387
+ standalone: true,
6388
+ changeDetection: ChangeDetectionStrategy.OnPush
6389
+ }]
6390
+ }], propDecorators: { calendarDocumentStore: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarDocumentStore", required: true }] }] } });
6391
+
6392
+ /**
6393
+ * The ICS link rotation control, with the prose explaining why it is unavailable when it is.
6394
+ *
6395
+ * Split from {@link DbxFirebaseCalendarIcsRotateButtonComponent} rather than folded into it because the two
6396
+ * have incompatible layout contracts. A bare button is a fixed-size control a caller can put in a toolbar or
6397
+ * a button row and trust not to move; this grows and shrinks by a line of text as the calendar's state
6398
+ * changes. Callers that need the predictable one take the button directly.
6399
+ *
6400
+ * Both disabled reasons are stated here, since a disabled control with no explanation is the one thing the
6401
+ * bare button cannot fix on its own.
6402
+ */
6403
+ class DbxFirebaseCalendarIcsRotateComponent {
6404
+ /**
6405
+ * Store for the calendar whose link is rotated. Handed straight to the button.
6406
+ */
6407
+ calendarDocumentStore = input.required(...(ngDevMode ? [{ debugName: "calendarDocumentStore" }] : /* istanbul ignore next */ []));
6408
+ calendarDocumentStore$ = toObservable(this.calendarDocumentStore);
6409
+ existsSignal = toSignal(this.calendarDocumentStore$.pipe(switchMap((x) => x.exists$)), { initialValue: false });
6410
+ isThrottledSignal = toSignal(this.calendarDocumentStore$.pipe(switchMap((x) => x.isIcsRotateThrottled$)), { initialValue: false });
6411
+ nextIcsRotateAtSignal = toSignal(this.calendarDocumentStore$.pipe(switchMap((x) => x.nextIcsRotateAt$)));
6412
+ /**
6413
+ * The time the throttle lifts, or undefined when a rotation is allowed right now.
6414
+ *
6415
+ * Gated on the throttle rather than rendered from the date alone: `nextIcsRotateAt` stays populated once
6416
+ * the window has passed, and a hint counting down to a time already gone reads as a bug.
6417
+ */
6418
+ throttledUntilSignal = computed(() => {
6419
+ // both read unconditionally, so the computed tracks them on every run
6420
+ const isThrottled = this.isThrottledSignal();
6421
+ const nextIcsRotateAt = this.nextIcsRotateAtSignal();
6422
+ return isThrottled ? nextIcsRotateAt : undefined;
6423
+ }, ...(ngDevMode ? [{ debugName: "throttledUntilSignal" }] : /* istanbul ignore next */ []));
6424
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseCalendarIcsRotateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6425
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxFirebaseCalendarIcsRotateComponent, isStandalone: true, selector: "dbx-firebase-calendar-ics-rotate", inputs: { calendarDocumentStore: { classPropertyName: "calendarDocumentStore", publicName: "calendarDocumentStore", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "dbx-firebase-calendar-ics-rotate" }, ngImport: i0, template: `
6426
+ <dbx-firebase-calendar-ics-rotate-button [calendarDocumentStore]="calendarDocumentStore()"></dbx-firebase-calendar-ics-rotate-button>
6427
+ @if (!existsSignal()) {
6428
+ <div class="dbx-small dbx-hint dbx-pt2">This calendar does not exist yet, so there is no link to revoke.</div>
6429
+ } @else if (throttledUntilSignal(); as throttledUntil) {
6430
+ <div class="dbx-small dbx-hint dbx-pt2">This link was rotated recently. It can be rotated again {{ throttledUntil | timeCountdownDistance }}.</div>
6431
+ }
6432
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseCalendarIcsRotateButtonComponent, selector: "dbx-firebase-calendar-ics-rotate-button", inputs: ["calendarDocumentStore"] }, { kind: "pipe", type: TimeDistanceCountdownPipe, name: "timeCountdownDistance" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6433
+ }
6434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseCalendarIcsRotateComponent, decorators: [{
6435
+ type: Component,
6436
+ args: [{
6437
+ selector: 'dbx-firebase-calendar-ics-rotate',
6438
+ template: `
6439
+ <dbx-firebase-calendar-ics-rotate-button [calendarDocumentStore]="calendarDocumentStore()"></dbx-firebase-calendar-ics-rotate-button>
6440
+ @if (!existsSignal()) {
6441
+ <div class="dbx-small dbx-hint dbx-pt2">This calendar does not exist yet, so there is no link to revoke.</div>
6442
+ } @else if (throttledUntilSignal(); as throttledUntil) {
6443
+ <div class="dbx-small dbx-hint dbx-pt2">This link was rotated recently. It can be rotated again {{ throttledUntil | timeCountdownDistance }}.</div>
6444
+ }
6445
+ `,
6446
+ host: { class: 'dbx-firebase-calendar-ics-rotate' },
6447
+ imports: [DbxFirebaseCalendarIcsRotateButtonComponent, TimeDistanceCountdownPipe],
6448
+ standalone: true,
6449
+ changeDetection: ChangeDetectionStrategy.OnPush
6450
+ }]
6451
+ }], propDecorators: { calendarDocumentStore: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarDocumentStore", required: true }] }] } });
6452
+
6453
+ /**
6454
+ * Dialog that hands the user the calendar's PUBLIC feed url, and lets them revoke it.
6455
+ *
6456
+ * The url is a permanent, zero-auth bearer credential: anyone holding it reads the calendar, and a subscriber
6457
+ * like Google stores it inside their own account. That is what makes it work in every calendar client without
6458
+ * OAuth, and it is also why "Rotate Link" is here rather than buried in an admin tool — rotation is the ONLY
6459
+ * revocation a feed url has.
6460
+ *
6461
+ * Deliberately NOT a tutorial. Per-client subscribe steps ("Other calendars -> From URL", "New Calendar
6462
+ * Subscription", ...) go stale the moment a vendor moves a menu, and they are the one thing every calendar
6463
+ * app already documents better than we can. The dialog's job is to hand over the url and the means to revoke
6464
+ * it; what the user pastes it into is theirs.
6465
+ */
6466
+ class DbxFirebaseCalendarSubscribeDialogComponent extends AbstractDialogDirective {
6467
+ icsUrlSignal = toSignal(this.data.calendarDocumentStore.icsUrl$);
6468
+ syncedAtSignal = toSignal(this.data.calendarDocumentStore.syncedAt$);
6469
+ /**
6470
+ * Why there is no url yet, distinguishing a first publish from the gap a rotation leaves behind.
6471
+ *
6472
+ * `iu` is written only by the ICS processor's success path. A rotation expedites that publish, so this is
6473
+ * normally a first-publish message; it still covers the rotation case for as long as an expedite that did
6474
+ * not land leaves the replacement queued. `sat` is what tells the two apart.
6475
+ */
6476
+ notPublishedHintSignal = computed(() => (this.syncedAtSignal() ? 'The link is being regenerated. It will appear here once the next calendar sync publishes the replacement.' : 'This calendar has not been published yet. The link appears once the hourly calendar sync generates its ICS.'), ...(ngDevMode ? [{ debugName: "notPublishedHintSignal" }] : /* istanbul ignore next */ []));
6477
+ clipboardSnackbarMessagesConfig = {
6478
+ successMessage: 'Copied the calendar feed link.'
6479
+ };
6480
+ static openDialog(matDialog, config) {
6481
+ return matDialog.open(DbxFirebaseCalendarSubscribeDialogComponent, {
6482
+ data: config
6483
+ });
6484
+ }
6485
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseCalendarSubscribeDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6486
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxFirebaseCalendarSubscribeDialogComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
6487
+ <dbx-dialog-content>
6488
+ <dbx-dialog-content-close (close)="close()"></dbx-dialog-content-close>
6489
+ <p class="dbx-note">Paste this link into any calendar app that supports calendar subscriptions and it will keep itself up to date. The link is public — anyone who has it can read this calendar.</p>
6490
+ <dbx-content-pit class="dbx-block dbx-mb3">
6491
+ <dbx-detail-block icon="link" header="Calendar feed URL">
6492
+ @if (icsUrlSignal(); as icsUrl) {
6493
+ <dbx-click-to-copy-text [copyText]="icsUrl" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig">
6494
+ <div class="dbx-label" style="word-break: break-all;">{{ icsUrl }}</div>
6495
+ </dbx-click-to-copy-text>
6496
+ } @else {
6497
+ <div class="dbx-hint">{{ notPublishedHintSignal() }}</div>
6498
+ }
6499
+ </dbx-detail-block>
6500
+ </dbx-content-pit>
6501
+ <dbx-firebase-calendar-ics-rotate class="dbx-block dbx-mt3" [calendarDocumentStore]="data.calendarDocumentStore"></dbx-firebase-calendar-ics-rotate>
6502
+ <dbx-dialog-content-footer (close)="close()"></dbx-dialog-content-footer>
6503
+ </dbx-dialog-content>
6504
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: DbxDialogModule }, { kind: "directive", type: i1$1.DbxDialogContentDirective, selector: "dbx-dialog-content,[dbxDialogContent],.dbx-dialog-content", inputs: ["width"] }, { kind: "component", type: i1$1.DbxDialogContentFooterComponent, selector: "dbx-dialog-content-footer", inputs: ["config", "closeText", "buttonColor"], outputs: ["close"] }, { kind: "component", type: i1$1.DbxDialogContentCloseComponent, selector: "dbx-dialog-content-close", inputs: ["padded"], outputs: ["close"] }, { kind: "component", type: DbxClickToCopyTextComponent, selector: "dbx-click-to-copy-text", inputs: ["copyText", "showIcon", "highlighted", "clipboardSnackbarMessagesConfig", "clipboardSnackbarMessagesEnabled", "clickToCopyIcon", "clickIconToCopyOnly"] }, { kind: "directive", type: DbxContentPitDirective, selector: "dbx-content-pit, [dbxContentPit]", inputs: ["scrollable", "square"] }, { kind: "component", type: DbxDetailBlockComponent, selector: "dbx-detail-block", inputs: ["icon", "header", "alignHeader", "bigHeader"] }, { kind: "component", type: DbxFirebaseCalendarIcsRotateComponent, selector: "dbx-firebase-calendar-ics-rotate", inputs: ["calendarDocumentStore"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6505
+ }
6506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseCalendarSubscribeDialogComponent, decorators: [{
6507
+ type: Component,
6508
+ args: [{
6509
+ template: `
6510
+ <dbx-dialog-content>
6511
+ <dbx-dialog-content-close (close)="close()"></dbx-dialog-content-close>
6512
+ <p class="dbx-note">Paste this link into any calendar app that supports calendar subscriptions and it will keep itself up to date. The link is public — anyone who has it can read this calendar.</p>
6513
+ <dbx-content-pit class="dbx-block dbx-mb3">
6514
+ <dbx-detail-block icon="link" header="Calendar feed URL">
6515
+ @if (icsUrlSignal(); as icsUrl) {
6516
+ <dbx-click-to-copy-text [copyText]="icsUrl" [clipboardSnackbarMessagesConfig]="clipboardSnackbarMessagesConfig">
6517
+ <div class="dbx-label" style="word-break: break-all;">{{ icsUrl }}</div>
6518
+ </dbx-click-to-copy-text>
6519
+ } @else {
6520
+ <div class="dbx-hint">{{ notPublishedHintSignal() }}</div>
6521
+ }
6522
+ </dbx-detail-block>
6523
+ </dbx-content-pit>
6524
+ <dbx-firebase-calendar-ics-rotate class="dbx-block dbx-mt3" [calendarDocumentStore]="data.calendarDocumentStore"></dbx-firebase-calendar-ics-rotate>
6525
+ <dbx-dialog-content-footer (close)="close()"></dbx-dialog-content-footer>
6526
+ </dbx-dialog-content>
6527
+ `,
6528
+ imports: [DbxDialogModule, DbxClickToCopyTextComponent, DbxContentPitDirective, DbxDetailBlockComponent, DbxFirebaseCalendarIcsRotateComponent],
6529
+ standalone: true,
6530
+ changeDetection: ChangeDetectionStrategy.OnPush
6531
+ }]
6532
+ }] });
6533
+
6534
+ /**
6535
+ * Document store for a single {@link Calendar}.
6536
+ *
6537
+ * Exposes exactly one write, {@link CalendarDocumentStore.rotateIcs}: a published .ics url is a permanent
6538
+ * zero-auth bearer credential, and rotation is the only revocation such a url has, so it has to be reachable
6539
+ * from the client that shows the url.
6540
+ *
6541
+ * Event mutation is absent on purpose — it is caller-owned on the server. A caller already holds a
6542
+ * transaction and an accessor when it decides to touch a calendar, so writes arrive through the owning
6543
+ * model's own action rather than through a Calendar callable.
6544
+ */
6545
+ class CalendarDocumentStore extends AbstractDbxFirebaseDocumentStore {
6546
+ calendarFunctions = inject(CalendarFunctions);
6547
+ constructor() {
6548
+ super({ firestoreCollection: inject(CalendarFirestoreCollections).calendarCollection });
6549
+ }
6550
+ /**
6551
+ * Rotates this calendar's public ICS link, revoking the previous one.
6552
+ *
6553
+ * The store's current key is injected into the params, so callers pass `{}`.
6554
+ */
6555
+ rotateIcs = firebaseDocumentStoreUpdateFunction(this, this.calendarFunctions.calendar.updateCalendar.rotateIcs);
6556
+ /**
6557
+ * Key of the StorageFile holding the published ICS, or undefined before the first publish.
6558
+ *
6559
+ * Read off `isf` rather than recomputed from a path, since the ICS object is keyed by the StorageFile's own
6560
+ * id.
6561
+ */
6562
+ icsStorageFileKey$ = this.currentData$.pipe(map((x) => (x?.isf ? firestoreModelKey(storageFileIdentity, x.isf) : undefined)), distinctUntilChanged(), shareReplay(1));
6563
+ /**
6564
+ * The permanent public url the published ICS is served from, or undefined before the first publish.
6565
+ *
6566
+ * Read off the stored `iu` rather than recomputed from the path, because the storage host differs between
6567
+ * the emulator and production and the object is keyed by the ICS StorageFile's own id. Its absence is also
6568
+ * the "not yet published" state a link rotation passes through.
6569
+ */
6570
+ icsUrl$ = this.currentData$.pipe(map((x) => x?.iu), distinctUntilChanged(), shareReplay(1));
6571
+ /**
6572
+ * The last date the published ICS was successfully uploaded, or undefined before the first publish.
6573
+ */
6574
+ syncedAt$ = this.currentData$.pipe(map((x) => x?.sat), distinctUntilChanged(), shareReplay(1));
6575
+ /**
6576
+ * The last date this calendar's ICS link was rotated, or undefined if it never has been.
6577
+ */
6578
+ icsRotatedAt$ = this.currentData$.pipe(map((x) => x?.rat), distinctUntilChanged(), shareReplay(1));
6579
+ /**
6580
+ * The earliest time the ICS link may be rotated again, or undefined when nothing is holding it off.
6581
+ *
6582
+ * Derived with the same `calendarNextIcsRotateAt()` the server enforces the throttle with, so the UI
6583
+ * cannot offer a rotation the server would reject.
6584
+ */
6585
+ nextIcsRotateAt$ = this.currentData$.pipe(map((x) => calendarNextIcsRotateAt({ calendar: x })), distinctUntilChanged((a, b) => a?.getTime() === b?.getTime()), shareReplay(1));
6586
+ /**
6587
+ * Whether the server would reject a rotation right now.
6588
+ *
6589
+ * Uses the same `isCalendarIcsRotateThrottled()` predicate the server rejects on, so the UI disables the
6590
+ * action instead of letting the user trigger a call that comes back as an error.
6591
+ *
6592
+ * Evaluated per document emission rather than on a timer: the window is twelve hours by default, so there
6593
+ * is nothing worth ticking for, and the rotation that opens the next window writes `rat` — which emits.
6594
+ */
6595
+ isIcsRotateThrottled$ = this.currentData$.pipe(map((x) => isCalendarIcsRotateThrottled({ calendar: x })), distinctUntilChanged(), shareReplay(1));
6596
+ /**
6597
+ * Where the calendar sits in the publish pipeline, or undefined before the document exists.
6598
+ *
6599
+ * Read alongside {@link syncedAt$} rather than instead of it: `sat` is the last successful upload, so on
6600
+ * its own it cannot tell a current feed from one that went stale the moment an event was added.
6601
+ */
6602
+ syncState$ = this.currentData$.pipe(map((x) => (x ? calendarSyncState(x) : undefined)), distinctUntilChanged(), shareReplay(1));
6603
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CalendarDocumentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6604
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CalendarDocumentStore });
6605
+ }
6606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CalendarDocumentStore, decorators: [{
6607
+ type: Injectable
6608
+ }], ctorParameters: () => [] });
6609
+
6610
+ /**
6611
+ * Directive providing a {@link CalendarDocumentStore} for accessing a single calendar document.
6612
+ */
6613
+ class CalendarDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
6614
+ constructor() {
6615
+ super(inject(CalendarDocumentStore));
6616
+ }
6617
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CalendarDocumentStoreDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6618
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.11", type: CalendarDocumentStoreDirective, isStandalone: true, selector: "[dbxFirebaseCalendarDocument]", providers: provideDbxFirebaseDocumentStoreDirective(CalendarDocumentStoreDirective, CalendarDocumentStore), usesInheritance: true, ngImport: i0 });
6619
+ }
6620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CalendarDocumentStoreDirective, decorators: [{
6621
+ type: Directive,
6622
+ args: [{
6623
+ selector: '[dbxFirebaseCalendarDocument]',
6624
+ providers: provideDbxFirebaseDocumentStoreDirective(CalendarDocumentStoreDirective, CalendarDocumentStore),
6625
+ standalone: true
6626
+ }]
6627
+ }], ctorParameters: () => [] });
6628
+
6265
6629
  /**
6266
6630
  * Configuration for the external connection registry.
6267
6631
  *
@@ -6604,10 +6968,10 @@ class DbxFirebaseExternalConnectionService {
6604
6968
  }
6605
6969
  // MARK: Get
6606
6970
  getRegisteredTypes() {
6607
- return [...this._providers.keys()];
6971
+ return Array.from(this._providers.keys());
6608
6972
  }
6609
6973
  getEnabledTypes() {
6610
- return this._enableAll ? this.getRegisteredTypes() : [...this._enabled];
6974
+ return this._enableAll ? this.getRegisteredTypes() : Array.from(this._enabled);
6611
6975
  }
6612
6976
  getProvider(providerType) {
6613
6977
  return this._providers.get(providerType);
@@ -9444,10 +9808,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
9444
9808
  type: Injectable
9445
9809
  }] });
9446
9810
 
9811
+ /**
9812
+ * Token to access the FirebaseStorageContextConfig value.
9813
+ */
9814
+ const DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN = new InjectionToken('DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN');
9815
+ /**
9816
+ * Token to access the FirebaseStorageContext value.
9817
+ */
9818
+ const DBX_FIREBASE_STORAGE_CONTEXT_TOKEN = new InjectionToken('DBX_FIREBASE_STORAGE_CONTEXT_TOKEN');
9819
+
9820
+ /**
9821
+ * Service that provides access to the app's FirebaseStorageContext.
9822
+ */
9823
+ class DbxFirebaseStorageService {
9824
+ storageContext = inject(DBX_FIREBASE_STORAGE_CONTEXT_TOKEN);
9825
+ dbxFirebaseEmulatorService = inject(DbxFirebaseEmulatorService);
9826
+ defaultBucket() {
9827
+ return this.storageContext.defaultBucket();
9828
+ }
9829
+ file(path) {
9830
+ return this.storageContext.file(path);
9831
+ }
9832
+ folder(path) {
9833
+ return this.storageContext.folder(path);
9834
+ }
9835
+ /**
9836
+ * The origin that serves this app's public storage objects.
9837
+ *
9838
+ * Resolves to the storage emulator's origin when the app is emulating, and the production Google Cloud
9839
+ * Storage origin otherwise. This mirrors what the client SDK itself does when it maps a Firebase Storage
9840
+ * host to its cloud-storage counterpart: an emulated host serves both channels, while the default
9841
+ * Firebase host pairs with `storage.googleapis.com`.
9842
+ *
9843
+ * @returns The origin that serves this app's public storage objects.
9844
+ */
9845
+ publicUrlApiEndpoint() {
9846
+ return this.dbxFirebaseEmulatorService.storageEmulatorOrigin ?? GOOGLE_CLOUD_STORAGE_PUBLIC_URL_API_ENDPOINT;
9847
+ }
9848
+ /**
9849
+ * Derives the permanent, anonymously-readable download url for the object at the input path.
9850
+ *
9851
+ * A pure client-side derivation: no request, no auth, and no expiration, so it can be resolved before
9852
+ * first render. The url only actually resolves for an object that exists AND is public — callers are
9853
+ * responsible for knowing that about the path they pass.
9854
+ *
9855
+ * @param path - Path of the object. A StorageFile document satisfies this, as it carries its own bucket
9856
+ * and path; a bare path string resolves against the context's default bucket.
9857
+ * @returns The object's public download url.
9858
+ */
9859
+ publicDownloadUrl(path) {
9860
+ const storagePath = this.storageContext.storagePath(path);
9861
+ return storagePublicDownloadUrl({ apiEndpoint: this.publicUrlApiEndpoint(), storagePath });
9862
+ }
9863
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9864
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseStorageService, providedIn: 'root' });
9865
+ }
9866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseStorageService, decorators: [{
9867
+ type: Injectable,
9868
+ args: [{
9869
+ providedIn: 'root'
9870
+ }]
9871
+ }] });
9872
+
9447
9873
  class DbxFirebaseStorageFileDownloadButtonComponent {
9448
9874
  matDialog = inject(MatDialog);
9449
9875
  dbxWebFilePreviewService = inject(DbxWebFilePreviewService);
9450
9876
  dbxFirebaseStorageFileDownloadService = inject(DbxFirebaseStorageFileDownloadService);
9877
+ dbxFirebaseStorageService = inject(DbxFirebaseStorageService);
9451
9878
  /**
9452
9879
  * The StorageFileKey to set up the download button for.
9453
9880
  */
@@ -9456,6 +9883,12 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9456
9883
  * The download URL to use for the download button.
9457
9884
  */
9458
9885
  storageFileDownloadUrl = input(...(ngDevMode ? [undefined, { debugName: "storageFileDownloadUrl" }] : /* istanbul ignore next */ []));
9886
+ /**
9887
+ * Object path of a PUBLIC StorageFile, or a factory deriving it from the file's id.
9888
+ *
9889
+ * See {@link DbxFirebaseStorageFileDownloadButtonSource.publicStoragePath}.
9890
+ */
9891
+ publicStoragePath = input(...(ngDevMode ? [undefined, { debugName: "publicStoragePath" }] : /* istanbul ignore next */ []));
9459
9892
  /**
9460
9893
  * The MIME type to use the embed component.
9461
9894
  */
@@ -9463,9 +9896,9 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9463
9896
  /**
9464
9897
  * Whether or not to show a preview button.
9465
9898
  *
9466
- * Defaults to true.
9899
+ * Takes precedence over the config. Defaults to true when neither is set.
9467
9900
  */
9468
- showPreviewButton = input(true, ...(ngDevMode ? [{ debugName: "showPreviewButton" }] : /* istanbul ignore next */ []));
9901
+ showPreviewButton = input(...(ngDevMode ? [undefined, { debugName: "showPreviewButton" }] : /* istanbul ignore next */ []));
9469
9902
  /**
9470
9903
  * Whether or not to pre-load the download URL from the source.
9471
9904
  */
@@ -9487,7 +9920,9 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9487
9920
  downloadReadyIcon: config?.downloadReadyIcon ?? 'download',
9488
9921
  downloadReadyText: config?.downloadReadyText ?? 'Save File',
9489
9922
  previewIcon: config?.previewIcon ?? 'preview',
9490
- previewText: config?.previewText ?? 'View File'
9923
+ previewText: config?.previewText ?? 'View File',
9924
+ showPreviewButton: config?.showPreviewButton,
9925
+ openCustomPreview: config?.openCustomPreview
9491
9926
  };
9492
9927
  return result;
9493
9928
  }, ...(ngDevMode ? [{ debugName: "configSignal" }] : /* istanbul ignore next */ []));
@@ -9496,7 +9931,11 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9496
9931
  const source = this.source();
9497
9932
  return preload ?? source?.preload ?? false;
9498
9933
  }, ...(ngDevMode ? [{ debugName: "preloadSignal" }] : /* istanbul ignore next */ []));
9499
- downloadUrlSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "downloadUrlSignal" }] : /* istanbul ignore next */ []));
9934
+ /**
9935
+ * The url fetched by the download action, restored from the cache, or given by the {@link storageFileDownloadUrl}
9936
+ * input. A derived public url takes precedence over it in {@link downloadUrlSignal}.
9937
+ */
9938
+ _downloadUrlSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "_downloadUrlSignal" }] : /* istanbul ignore next */ []));
9500
9939
  downloadMimeTypeSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "downloadMimeTypeSignal" }] : /* istanbul ignore next */ []));
9501
9940
  downloadUrlExpiresAtSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "downloadUrlExpiresAtSignal" }] : /* istanbul ignore next */ []));
9502
9941
  storageFileKeyFromInput$ = toObservable(this.storageFileKey).pipe(distinctUntilChanged(), shareReplay(1));
@@ -9506,6 +9945,69 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9506
9945
  }), distinctUntilChanged(), shareReplay(1));
9507
9946
  storageFileKeySignal = toSignal(this.storageFileKey$);
9508
9947
  hasDownloadUrlSignal = computed(() => Boolean(this.downloadUrlSignal()), ...(ngDevMode ? [{ debugName: "hasDownloadUrlSignal" }] : /* istanbul ignore next */ []));
9948
+ // MARK: Public Url
9949
+ publicStoragePathFromInput$ = toObservable(this.publicStoragePath).pipe(distinctUntilChanged(), shareReplay(1));
9950
+ publicStoragePathFromSource$ = this.source$.pipe(map((source) => source?.publicStoragePath), maybeValueFromObservableOrValue(), distinctUntilChanged(), shareReplay(1));
9951
+ publicStoragePathInput$ = combineLatest([this.publicStoragePathFromInput$, this.publicStoragePathFromSource$]).pipe(map(([publicStoragePathFromInput, publicStoragePathFromSource]) => {
9952
+ return publicStoragePathFromInput ?? publicStoragePathFromSource;
9953
+ }), shareReplay(1));
9954
+ /**
9955
+ * The resolved public object path, or undefined while a configured factory still has no key to work from.
9956
+ */
9957
+ publicStoragePath$ = combineLatest([this.publicStoragePathInput$, this.storageFileKey$]).pipe(map(([publicStoragePathInput, storageFileKey]) => {
9958
+ let result;
9959
+ if (typeof publicStoragePathInput === 'function') {
9960
+ // none of StoragePathInput's members is callable, so this discriminates the union unambiguously
9961
+ result = storageFileKey == null ? undefined : publicStoragePathInput(firestoreModelId(storageFileKey));
9962
+ }
9963
+ else {
9964
+ result = publicStoragePathInput;
9965
+ }
9966
+ return result;
9967
+ }), shareReplay(1));
9968
+ publicDownloadUrl$ = this.publicStoragePath$.pipe(map((publicStoragePath) => (publicStoragePath == null ? undefined : this.dbxFirebaseStorageService.publicDownloadUrl(publicStoragePath))), distinctUntilChanged(), shareReplay(1));
9969
+ publicDownloadUrlSignal = toSignal(this.publicDownloadUrl$);
9970
+ publicStoragePathInputSignal = toSignal(this.publicStoragePathInput$);
9971
+ /**
9972
+ * Whether the button is on the client-derived public url rather than the download action.
9973
+ *
9974
+ * An explicit `storageFileDownloadUrl` wins: it is a url the caller decided on, where a derived one is
9975
+ * only what the component could work out for itself.
9976
+ */
9977
+ usesPublicDownloadUrlSignal = computed(() => {
9978
+ const storageFileDownloadUrl = this.storageFileDownloadUrl();
9979
+ return Boolean(this.publicStoragePathInputSignal()) && storageFileDownloadUrl == null;
9980
+ }, ...(ngDevMode ? [{ debugName: "usesPublicDownloadUrlSignal" }] : /* istanbul ignore next */ []));
9981
+ /**
9982
+ * The public url this component derived itself, if it is the url the button is on.
9983
+ */
9984
+ derivedPublicDownloadUrlSignal = computed(() => {
9985
+ const usesPublicDownloadUrl = this.usesPublicDownloadUrlSignal();
9986
+ const publicDownloadUrl = this.publicDownloadUrlSignal();
9987
+ return usesPublicDownloadUrl ? publicDownloadUrl : undefined;
9988
+ }, ...(ngDevMode ? [{ debugName: "derivedPublicDownloadUrlSignal" }] : /* istanbul ignore next */ []));
9989
+ /**
9990
+ * The url the button downloads from.
9991
+ *
9992
+ * A derived public url wins over a fetched one: it is available before first render and never expires, so
9993
+ * there is nothing for the action to improve on.
9994
+ */
9995
+ downloadUrlSignal = computed(() => {
9996
+ const derivedPublicDownloadUrl = this.derivedPublicDownloadUrlSignal();
9997
+ const downloadUrl = this._downloadUrlSignal();
9998
+ return derivedPublicDownloadUrl ?? downloadUrl;
9999
+ }, ...(ngDevMode ? [{ debugName: "downloadUrlSignal" }] : /* istanbul ignore next */ []));
10000
+ /**
10001
+ * Whether the download action is disabled, which also disables the button.
10002
+ *
10003
+ * A url the component already has is enough on its own: the button is then a live link, and the derived
10004
+ * public url arrives without a key ever being set.
10005
+ */
10006
+ actionDisabledSignal = computed(() => {
10007
+ const storageFileKey = this.storageFileKeySignal();
10008
+ const hasDownloadUrl = this.hasDownloadUrlSignal();
10009
+ return !storageFileKey && !hasDownloadUrl;
10010
+ }, ...(ngDevMode ? [{ debugName: "actionDisabledSignal" }] : /* istanbul ignore next */ []));
9509
10011
  buttonStyleSignal = computed(() => {
9510
10012
  const config = this.configSignal();
9511
10013
  const result = {
@@ -9553,14 +10055,15 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9553
10055
  storageFileDownloadUrlEffect = effect(() => {
9554
10056
  const downloadUrl = this.storageFileDownloadUrl();
9555
10057
  if (downloadUrl || downloadUrl === null) {
9556
- this.downloadUrlSignal.set(downloadUrl);
10058
+ this._downloadUrlSignal.set(downloadUrl);
9557
10059
  }
9558
10060
  }, ...(ngDevMode ? [{ debugName: "storageFileDownloadUrlEffect" }] : /* istanbul ignore next */ []));
9559
10061
  // Preview
9560
10062
  showPreviewButtonSignal = computed(() => {
10063
+ const showPreviewButton = this.showPreviewButton();
9561
10064
  const config = this.configSignal();
9562
10065
  const hasDownloadUrl = this.hasDownloadUrlSignal();
9563
- return hasDownloadUrl && (config.showPreviewButton ?? true);
10066
+ return hasDownloadUrl && (showPreviewButton ?? config.showPreviewButton ?? true);
9564
10067
  }, ...(ngDevMode ? [{ debugName: "showPreviewButtonSignal" }] : /* istanbul ignore next */ []));
9565
10068
  openCustomPreviewSignal = computed(() => {
9566
10069
  const config = this.configSignal();
@@ -9585,7 +10088,7 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9585
10088
  cachedUrlEffect = effect(() => {
9586
10089
  const cachedPair = this.cachedUrlForStorageFileKeySignal();
9587
10090
  if (cachedPair) {
9588
- this.downloadUrlSignal.set(cachedPair.downloadUrl);
10091
+ this._downloadUrlSignal.set(cachedPair.downloadUrl);
9589
10092
  this.downloadMimeTypeSignal.set(cachedPair.mimeType);
9590
10093
  this.downloadUrlExpiresAtSignal.set(cachedPair.expiresAt);
9591
10094
  }
@@ -9607,7 +10110,7 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9607
10110
  downloadUrlHasExpiredEffect = effect(() => {
9608
10111
  const expired = this.downloadUrlHasExpiredSignal();
9609
10112
  if (expired) {
9610
- this.downloadUrlSignal.set(undefined);
10113
+ this._downloadUrlSignal.set(undefined);
9611
10114
  this.downloadMimeTypeSignal.set(undefined);
9612
10115
  this.downloadUrlExpiresAtSignal.set(undefined);
9613
10116
  }
@@ -9641,7 +10144,12 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9641
10144
  handleGetDownloadUrl = (value, context) => {
9642
10145
  const source = this.source();
9643
10146
  const { customSource, handleGetDownloadUrl } = source ?? {};
9644
- if (handleGetDownloadUrl) {
10147
+ if (this.derivedPublicDownloadUrlSignal()) {
10148
+ // the url is derived on the client and already on the button, so the action has nothing to fetch. It
10149
+ // completes with no pair, since a public url has neither a mime type nor an expiration.
10150
+ context.success();
10151
+ }
10152
+ else if (handleGetDownloadUrl) {
9645
10153
  handleGetDownloadUrl(value, context);
9646
10154
  }
9647
10155
  else {
@@ -9651,17 +10159,20 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9651
10159
  handleGetDownloadUrlSuccess = (value) => {
9652
10160
  const source = this.source();
9653
10161
  const { handleGetDownloadUrlSuccess } = source ?? {};
9654
- this.downloadUrlSignal.set(value.downloadUrl);
9655
- this.downloadMimeTypeSignal.set(value.mimeType);
9656
- this.downloadUrlExpiresAtSignal.set(value.expiresAt);
9657
- if (handleGetDownloadUrlSuccess) {
9658
- handleGetDownloadUrlSuccess(value);
10162
+ // no pair means the derived public url completed the action, and there is nothing to record
10163
+ if (value) {
10164
+ this._downloadUrlSignal.set(value.downloadUrl);
10165
+ this.downloadMimeTypeSignal.set(value.mimeType);
10166
+ this.downloadUrlExpiresAtSignal.set(value.expiresAt);
10167
+ if (handleGetDownloadUrlSuccess) {
10168
+ handleGetDownloadUrlSuccess(value);
10169
+ }
9659
10170
  }
9660
10171
  };
9661
10172
  handleGetDownloadUrlError = (error) => {
9662
10173
  const source = this.source();
9663
10174
  const { handleGetDownloadUrlError } = source ?? {};
9664
- this.downloadUrlSignal.set(undefined);
10175
+ this._downloadUrlSignal.set(undefined);
9665
10176
  this.downloadMimeTypeSignal.set(undefined);
9666
10177
  this.downloadUrlExpiresAtSignal.set(undefined);
9667
10178
  if (handleGetDownloadUrlError) {
@@ -9669,9 +10180,10 @@ class DbxFirebaseStorageFileDownloadButtonComponent {
9669
10180
  }
9670
10181
  };
9671
10182
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseStorageFileDownloadButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9672
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxFirebaseStorageFileDownloadButtonComponent, 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 }, preload: { classPropertyName: "preload", publicName: "preload", 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: { downloadDetailsChange: "downloadDetailsChange" }, ngImport: i0, template: `
9673
- <dbx-anchor dbxActionAnchor [anchor]="anchorSignal()" dbxAction [dbxActionAutoTrigger]="preloadSignal()" dbxActionSnackbarError [dbxActionDisabled]="!storageFileKeySignal()" [dbxActionValue]="storageFileKeySignal()" [dbxActionHandler]="handleGetDownloadUrl" [dbxActionSuccessHandler]="handleGetDownloadUrlSuccess" [dbxActionErrorHandler]="handleGetDownloadUrlError">
9674
- <dbx-button dbxActionButton [buttonStyle]="buttonStyleSignal()" [icon]="iconSignal()" [text]="textSignal()"></dbx-button>
10183
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: DbxFirebaseStorageFileDownloadButtonComponent, 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 }, publicStoragePath: { classPropertyName: "publicStoragePath", publicName: "publicStoragePath", 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 }, preload: { classPropertyName: "preload", publicName: "preload", 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: { downloadDetailsChange: "downloadDetailsChange" }, ngImport: i0, template: `
10184
+ <dbx-anchor [anchor]="anchorSignal()" dbxAction [dbxActionAutoTrigger]="preloadSignal()" dbxActionSnackbarError [dbxActionDisabled]="actionDisabledSignal()" [dbxActionValue]="storageFileKeySignal()" [dbxActionHandler]="handleGetDownloadUrl" [dbxActionSuccessHandler]="handleGetDownloadUrlSuccess" [dbxActionErrorHandler]="handleGetDownloadUrlError">
10185
+ <!-- allowClickPropagation lets a click on a resolved url reach the anchor, which is what performs the download -->
10186
+ <dbx-button dbxActionButton [allowClickPropagation]="true" [buttonStyle]="buttonStyleSignal()" [icon]="iconSignal()" [text]="textSignal()"></dbx-button>
9675
10187
  </dbx-anchor>
9676
10188
  @if (showPreviewButtonSignal()) {
9677
10189
  <ng-container dbxAction [dbxActionDialog]="handleOpenPreviewDialog" dbxActionHandlerValue>
@@ -9686,8 +10198,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
9686
10198
  args: [{
9687
10199
  selector: 'dbx-firebase-storagefile-download-button',
9688
10200
  template: `
9689
- <dbx-anchor dbxActionAnchor [anchor]="anchorSignal()" dbxAction [dbxActionAutoTrigger]="preloadSignal()" dbxActionSnackbarError [dbxActionDisabled]="!storageFileKeySignal()" [dbxActionValue]="storageFileKeySignal()" [dbxActionHandler]="handleGetDownloadUrl" [dbxActionSuccessHandler]="handleGetDownloadUrlSuccess" [dbxActionErrorHandler]="handleGetDownloadUrlError">
9690
- <dbx-button dbxActionButton [buttonStyle]="buttonStyleSignal()" [icon]="iconSignal()" [text]="textSignal()"></dbx-button>
10201
+ <dbx-anchor [anchor]="anchorSignal()" dbxAction [dbxActionAutoTrigger]="preloadSignal()" dbxActionSnackbarError [dbxActionDisabled]="actionDisabledSignal()" [dbxActionValue]="storageFileKeySignal()" [dbxActionHandler]="handleGetDownloadUrl" [dbxActionSuccessHandler]="handleGetDownloadUrlSuccess" [dbxActionErrorHandler]="handleGetDownloadUrlError">
10202
+ <!-- allowClickPropagation lets a click on a resolved url reach the anchor, which is what performs the download -->
10203
+ <dbx-button dbxActionButton [allowClickPropagation]="true" [buttonStyle]="buttonStyleSignal()" [icon]="iconSignal()" [text]="textSignal()"></dbx-button>
9691
10204
  </dbx-anchor>
9692
10205
  @if (showPreviewButtonSignal()) {
9693
10206
  <ng-container dbxAction [dbxActionDialog]="handleOpenPreviewDialog" dbxActionHandlerValue>
@@ -9700,7 +10213,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
9700
10213
  changeDetection: ChangeDetectionStrategy.OnPush,
9701
10214
  standalone: true
9702
10215
  }]
9703
- }], propDecorators: { storageFileKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageFileKey", required: false }] }], storageFileDownloadUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageFileDownloadUrl", required: false }] }], embedMimeType: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedMimeType", required: false }] }], showPreviewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreviewButton", required: false }] }], preload: [{ type: i0.Input, args: [{ isSignal: true, alias: "preload", required: false }] }], downloadDetailsChange: [{ type: i0.Output, args: ["downloadDetailsChange"] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: false }] }] } });
10216
+ }], propDecorators: { storageFileKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageFileKey", required: false }] }], storageFileDownloadUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageFileDownloadUrl", required: false }] }], publicStoragePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "publicStoragePath", required: false }] }], embedMimeType: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedMimeType", required: false }] }], showPreviewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreviewButton", required: false }] }], preload: [{ type: i0.Input, args: [{ isSignal: true, alias: "preload", required: false }] }], downloadDetailsChange: [{ type: i0.Output, args: ["downloadDetailsChange"] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: false }] }] } });
9704
10217
 
9705
10218
  /**
9706
10219
  * Store used for selecting a specific NotificationItem from a list of notification items.
@@ -10656,39 +11169,6 @@ function dbxFirebaseIdRouteParamRedirect(dbxRouterService, defaultParamKey = DEF
10656
11169
  return result;
10657
11170
  }
10658
11171
 
10659
- /**
10660
- * Token to access the FirebaseStorageContextConfig value.
10661
- */
10662
- const DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN = new InjectionToken('DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN');
10663
- /**
10664
- * Token to access the FirebaseStorageContext value.
10665
- */
10666
- const DBX_FIREBASE_STORAGE_CONTEXT_TOKEN = new InjectionToken('DBX_FIREBASE_STORAGE_CONTEXT_TOKEN');
10667
-
10668
- /**
10669
- * Service that provides access to the app's FirebaseStorageContext.
10670
- */
10671
- class DbxFirebaseStorageService {
10672
- storageContext = inject(DBX_FIREBASE_STORAGE_CONTEXT_TOKEN);
10673
- defaultBucket() {
10674
- return this.storageContext.defaultBucket();
10675
- }
10676
- file(path) {
10677
- return this.storageContext.file(path);
10678
- }
10679
- folder(path) {
10680
- return this.storageContext.folder(path);
10681
- }
10682
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10683
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseStorageService, providedIn: 'root' });
10684
- }
10685
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFirebaseStorageService, decorators: [{
10686
- type: Injectable,
10687
- args: [{
10688
- providedIn: 'root'
10689
- }]
10690
- }] });
10691
-
10692
11172
  /**
10693
11173
  * The default factory function for the DbxFirebaseStorageContext.
10694
11174
  *
@@ -10798,5 +11278,5 @@ function provideDbxFirebase(config) {
10798
11278
  * Generated bundle index. Do not edit.
10799
11279
  */
10800
11280
 
10801
- export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseModelEntityWidgetDirective, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_AUTH_FLOW_TOKEN, DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_EXTERNAL_CONNECTION_CALCOM_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_DISCORD_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOHO_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOOM_PROVIDER, DBX_FIREBASE_KNOWN_EXTERNAL_CONNECTION_PROVIDERS, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_MODEL_ENTITY_WITH_STORE_TOKEN, DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIREBASE_STORAGE_PDF_MERGE_UPLOAD_FILE_NAME, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_FLOW, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_ID_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_KEY_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_USE_PARAM_VALUE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_EXTERNAL_CONNECTION_AUTHORIZE_PATH_FACTORY, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_FUNCTION, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_TIMEOUT, 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, DEFAULT_NOTIFICATION_HEALTH_CHECK_PRESENTATION_ENTRIES, DEFAULT_NOTIFICATION_HEALTH_CHECK_PROBE_WATCH_MINUTES, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthImpersonationDelegate, DbxFirebaseAuthLoginService, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentForgeFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, DbxFirebaseDocumentStoreContextStore, DbxFirebaseDocumentStoreContextStoreDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailForgeFormComponent, DbxFirebaseEmailRecoveryForgeFormComponent, DbxFirebaseEmulatorService, DbxFirebaseExternalConnectionListComponent, DbxFirebaseExternalConnectionListViewComponent, DbxFirebaseExternalConnectionListViewItemComponent, DbxFirebaseExternalConnectionService, DbxFirebaseExternalConnectionsComponent, DbxFirebaseExternalConnectionsConfig, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseManageAuthProvidersComponent, DbxFirebaseModelContextService, DbxFirebaseModelEntitiesComponent, DbxFirebaseModelEntitiesDebugWidgetComponent, DbxFirebaseModelEntitiesPopoverButtonComponent, DbxFirebaseModelEntitiesPopoverComponent, DbxFirebaseModelEntitiesSource, DbxFirebaseModelEntitiesWidgetService, DbxFirebaseModelEntitiesWidgetServiceConfig, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelKeyComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationHealthCheckComponent, DbxFirebaseNotificationHealthCheckConfig, DbxFirebaseNotificationHealthCheckDialogButtonComponent, DbxFirebaseNotificationHealthCheckDialogComponent, DbxFirebaseNotificationHealthCheckIssueComponent, DbxFirebaseNotificationHealthCheckMethodComponent, DbxFirebaseNotificationHealthCheckPresentationService, DbxFirebaseNotificationHealthCheckPresentationServiceConfig, DbxFirebaseNotificationHealthCheckViewComponent, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseNotificationUserHealthCheckStore, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePasswordResetComponent, DbxFirebasePasswordResetFormComponent, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStoragePdfMergeUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirebaseUserExternalConnectionCollections, DbxFirebaseUserExternalConnectionDocumentStoreDirective, DbxFirebaseUserExternalConnectionsStore, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, FIREBASE_APP_CHECK_TOKEN, FIREBASE_APP_TOKEN, FIREBASE_AUTH_TOKEN, FIREBASE_FIRESTORE_TOKEN, FIREBASE_FUNCTIONS_TOKEN, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FIREBASE_PROVIDER_ID_TO_LOGIN_METHOD_TYPE_MAP, FIREBASE_STORAGE_TOKEN, FlatFirestoreModelKeyPipe, IMPORTS_AND_EXPORTS, LOGIN_METHOD_TYPE_TO_FIREBASE_PROVIDER_ID_MAP, NOTIFICATION_DELIVERY_METHOD_ICONS, NOTIFICATION_DELIVERY_METHOD_LABELS, NOTIFICATION_DELIVERY_METHOD_SHORT_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_NOUNS, NOTIFICATION_HEALTH_CHECK_PROBE_ISSUE_OUTCOMES, NOTIFICATION_HEALTH_CHECK_STATUS_COLORS, NOTIFICATION_HEALTH_CHECK_STATUS_ICONS, NOTIFICATION_HEALTH_CHECK_STATUS_LABELS, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, UserExternalConnectionDocumentStore, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, createDbxFirebaseAppCheck, createDbxFirebaseAuth, createDbxFirebaseFirestore, createDbxFirebaseFunctions, createDbxFirebaseStorage, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseExternalConnectionProviderForEntry, dbxFirebaseExternalConnectionRowStatusForEntry, dbxFirebaseExternalConnectionRows, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseKnownExternalConnectionProvider, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageFileImageCompressionFileModifier, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, externalConnectionsLoadingStateFromDocumentLoadingState, firebaseAuthState, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreInvokeFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, firebaseIdToken, firebaseProviderIdToLoginMethodType, isDbxFirebaseModelEntityWithStore, isStandaloneWebApp, linkDocumentStoreToParentContextStores, loginMethodTypeToFirebaseProviderId, modelDoesNotExistError, navigateAndWaitForPageToLeave, notificationHealthCheckProbeIssueLabel, parseDbxFirebaseEmulatorsConfig, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseAuthImpersonation, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreContextStore, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseExternalConnections, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseModelEntitiesWidgetService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, resolveDbxFirebaseAuthFlow, setParentStoreEffect, shouldCreateUserExternalConnectionForDocumentLoadingState, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
11281
+ export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseModelEntityWidgetDirective, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, CalendarDocumentStore, CalendarDocumentStoreDirective, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_AUTH_FLOW_TOKEN, DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_EXTERNAL_CONNECTION_CALCOM_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_DISCORD_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOHO_PROVIDER, DBX_FIREBASE_EXTERNAL_CONNECTION_ZOOM_PROVIDER, DBX_FIREBASE_KNOWN_EXTERNAL_CONNECTION_PROVIDERS, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_MODEL_ENTITY_WITH_STORE_TOKEN, DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIREBASE_STORAGE_PDF_MERGE_UPLOAD_FILE_NAME, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_FLOW, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_ID_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_KEY_PARAM_KEY, DEFAULT_DBX_FIREBASE_ID_ROUTER_PARAM_USE_PARAM_VALUE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_EXTERNAL_CONNECTION_AUTHORIZE_PATH_FACTORY, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_FUNCTION, DEFAULT_EXTERNAL_CONNECTION_NAVIGATE_TIMEOUT, 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, DEFAULT_NOTIFICATION_HEALTH_CHECK_PRESENTATION_ENTRIES, DEFAULT_NOTIFICATION_HEALTH_CHECK_PROBE_WATCH_MINUTES, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthImpersonationDelegate, DbxFirebaseAuthLoginService, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCalendarIcsRotateButtonComponent, DbxFirebaseCalendarIcsRotateComponent, DbxFirebaseCalendarSubscribeDialogComponent, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentForgeFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, DbxFirebaseDocumentStoreContextStore, DbxFirebaseDocumentStoreContextStoreDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailForgeFormComponent, DbxFirebaseEmailRecoveryForgeFormComponent, DbxFirebaseEmulatorService, DbxFirebaseExternalConnectionListComponent, DbxFirebaseExternalConnectionListViewComponent, DbxFirebaseExternalConnectionListViewItemComponent, DbxFirebaseExternalConnectionService, DbxFirebaseExternalConnectionsComponent, DbxFirebaseExternalConnectionsConfig, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseManageAuthProvidersComponent, DbxFirebaseModelContextService, DbxFirebaseModelEntitiesComponent, DbxFirebaseModelEntitiesDebugWidgetComponent, DbxFirebaseModelEntitiesPopoverButtonComponent, DbxFirebaseModelEntitiesPopoverComponent, DbxFirebaseModelEntitiesSource, DbxFirebaseModelEntitiesWidgetService, DbxFirebaseModelEntitiesWidgetServiceConfig, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelKeyComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationHealthCheckComponent, DbxFirebaseNotificationHealthCheckConfig, DbxFirebaseNotificationHealthCheckDialogButtonComponent, DbxFirebaseNotificationHealthCheckDialogComponent, DbxFirebaseNotificationHealthCheckIssueComponent, DbxFirebaseNotificationHealthCheckMethodComponent, DbxFirebaseNotificationHealthCheckPresentationService, DbxFirebaseNotificationHealthCheckPresentationServiceConfig, DbxFirebaseNotificationHealthCheckViewComponent, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseNotificationUserHealthCheckStore, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePasswordResetComponent, DbxFirebasePasswordResetFormComponent, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStoragePdfMergeUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirebaseUserExternalConnectionCollections, DbxFirebaseUserExternalConnectionDocumentStoreDirective, DbxFirebaseUserExternalConnectionsStore, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, FIREBASE_APP_CHECK_TOKEN, FIREBASE_APP_TOKEN, FIREBASE_AUTH_TOKEN, FIREBASE_FIRESTORE_TOKEN, FIREBASE_FUNCTIONS_TOKEN, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FIREBASE_PROVIDER_ID_TO_LOGIN_METHOD_TYPE_MAP, FIREBASE_STORAGE_TOKEN, FlatFirestoreModelKeyPipe, IMPORTS_AND_EXPORTS, LOGIN_METHOD_TYPE_TO_FIREBASE_PROVIDER_ID_MAP, NOTIFICATION_DELIVERY_METHOD_ICONS, NOTIFICATION_DELIVERY_METHOD_LABELS, NOTIFICATION_DELIVERY_METHOD_SHORT_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_LABELS, NOTIFICATION_DELIVERY_METHOD_TEST_MESSAGE_NOUNS, NOTIFICATION_HEALTH_CHECK_PROBE_ISSUE_OUTCOMES, NOTIFICATION_HEALTH_CHECK_STATUS_COLORS, NOTIFICATION_HEALTH_CHECK_STATUS_ICONS, NOTIFICATION_HEALTH_CHECK_STATUS_LABELS, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, UserExternalConnectionDocumentStore, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, createDbxFirebaseAppCheck, createDbxFirebaseAuth, createDbxFirebaseFirestore, createDbxFirebaseFunctions, createDbxFirebaseStorage, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseExternalConnectionProviderForEntry, dbxFirebaseExternalConnectionRowStatusForEntry, dbxFirebaseExternalConnectionRows, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseKnownExternalConnectionProvider, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageFileImageCompressionFileModifier, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, externalConnectionsLoadingStateFromDocumentLoadingState, firebaseAuthState, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreInvokeFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, firebaseIdToken, firebaseProviderIdToLoginMethodType, isDbxFirebaseModelEntityWithStore, isStandaloneWebApp, linkDocumentStoreToParentContextStores, loginMethodTypeToFirebaseProviderId, modelDoesNotExistError, navigateAndWaitForPageToLeave, notificationHealthCheckProbeIssueLabel, parseDbxFirebaseEmulatorsConfig, provideCalendarFirestoreCollections, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseAuthImpersonation, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreContextStore, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseExternalConnections, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseModelEntitiesWidgetService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, resolveDbxFirebaseAuthFlow, setParentStoreEffect, shouldCreateUserExternalConnectionForDocumentLoadingState, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
10802
11282
  //# sourceMappingURL=dereekb-dbx-firebase.mjs.map