@dereekb/dbx-firebase 13.8.0 → 13.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, provideAppInitializer, makeEnvironmentProviders, Component, model, computed, ChangeDetectionStrategy, signal, Directive, EventEmitter, input, output, Injector, viewChild, HostListener, NgModule, Optional, ElementRef, forwardRef, effect, DestroyRef, Inject, Pipe } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, provideAppInitializer, makeEnvironmentProviders, Component, model, computed, ChangeDetectionStrategy, signal, Directive, EventEmitter, input, output, Injector, viewChild, HostListener, NgModule, ElementRef, forwardRef, effect, DestroyRef, Inject, Optional, Pipe } from '@angular/core';
3
3
  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, throwErrorFromLoadingStateError, maybeValueFromObservableOrValue, distinctUntilHasDifferentValues, MultiSubscriptionObject, startWithBeginLoading, 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, mergeMap } from 'rxjs';
6
6
  import * as i2 from '@dereekb/dbx-core';
7
7
  import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponent, AbstractForwardDbxInjectionContextDirective, DbxInjectionContextDirective, DbxAuthService, DbxActionButtonDirective, completeOnDestroy, cleanSubscription, DbxActionDirective, DbxActionEnforceModifiedDirective, DbxActionHandlerDirective, DbxActionAutoTriggerDirective, clean, cleanLoadingContext, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, AbstractIfDirective, LockSetComponentStore, newWithInjector, CutTextPipe, DbxActionContextStoreSourceInstance, DbxActionHandlerInstance, cleanSubscriptionWithLockSet, SimpleStorageAccessorFactory, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance } from '@dereekb/dbx-core';
8
8
  import { onAuthStateChanged, onIdTokenChanged, confirmPasswordReset, sendPasswordResetEmail, signInWithPopup, linkWithPopup, linkWithCredential, unlink, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, reauthenticateWithPopup, OAuthProvider, FacebookAuthProvider, GithubAuthProvider, GoogleAuthProvider, TwitterAuthProvider, getAuth, connectAuthEmulator } from 'firebase/auth';
9
- import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeArrayValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, pushArrayItemsIntoArray, forEachKeyValue, countAllInNestedArray, invertDecision, useIterableOrValue, filterUniqueValues, reverseCompareFn, sortByNumberFunction, separateValues, readableError, isMaybeSo, firstValue, splitJoinRemainder, MS_IN_HOUR, SECONDS_IN_MINUTE, MS_IN_DAY, unixDateTimeSecondsNumberForNow, MS_IN_MINUTE, addMilliseconds, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, MS_IN_SECOND, isPast } from '@dereekb/util';
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, splitJoinRemainder, MS_IN_HOUR, SECONDS_IN_MINUTE, MS_IN_DAY, unixDateTimeSecondsNumberForNow, MS_IN_MINUTE, addMilliseconds, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, MS_IN_SECOND, 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';
@@ -15,7 +15,7 @@ import * as i1 from '@angular/material/icon';
15
15
  import { MatIconModule, MatIcon } from '@angular/material/icon';
16
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, AppNotificationTemplateTypeInfoRecordService, NotificationFunctions, unreadNotificationItems, StorageFileFunctions, firestoreModelKey, storageFileIdentity, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
17
17
  import * as i1$2 from '@dereekb/dbx-form';
18
- import { AbstractSyncForgeFormDirective, forgeEmailField, DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, DBX_FORGE_FORM_COMPONENT_TEMPLATE, AbstractConfigAsyncForgeFormDirective, forgeUsernameLoginField, forgeTextPasswordField, forgeTextVerifyPasswordField, DbxActionFormDirective, DbxFormSourceDirective, forgePickableChipField, filterPickableItemFieldValuesByLabel } from '@dereekb/dbx-form';
18
+ import { AbstractSyncForgeFormDirective, dbxForgeEmailField, DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, DBX_FORGE_FORM_COMPONENT_TEMPLATE, AbstractConfigAsyncForgeFormDirective, dbxForgeUsernameLoginField, dbxForgeTextPasswordField, dbxForgeTextVerifyPasswordField, DbxActionFormDirective, DbxFormSourceDirective, dbxForgePickableChipField, filterPickableItemFieldValuesByLabel } from '@dereekb/dbx-form';
19
19
  import { NgTemplateOutlet, DatePipe } from '@angular/common';
20
20
  import * as i1$3 from '@angular/material/button';
21
21
  import { MatButtonModule } from '@angular/material/button';
@@ -1202,7 +1202,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1202
1202
  * Forge-based form component for password recovery, containing a single email field.
1203
1203
  */
1204
1204
  class DbxFirebaseEmailRecoveryForgeFormComponent extends AbstractSyncForgeFormDirective {
1205
- config = { fields: [forgeEmailField({ key: 'email', required: true })] };
1205
+ formConfig = { fields: [dbxForgeEmailField({ key: 'email', required: true })] };
1206
1206
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseEmailRecoveryForgeFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1207
1207
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseEmailRecoveryForgeFormComponent, isStandalone: true, selector: "dbx-firebase-email-recovery-forge-form", providers: dbxForgeFormComponentProviders(), usesInheritance: true, ngImport: i0, template: "<dbx-forge></dbx-forge>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxForgeFormComponentImportsModule }, { kind: "component", type: i1$2.DbxForgeFormComponent, selector: "dbx-forge" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1208
1208
  }
@@ -1224,13 +1224,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1224
1224
  * In register mode, includes a password verification field.
1225
1225
  */
1226
1226
  class DbxFirebaseEmailForgeFormComponent extends AbstractConfigAsyncForgeFormDirective {
1227
- config$ = this.currentConfig$.pipe(map((config) => {
1227
+ formConfig$ = this.currentConfig$.pipe(map((config) => {
1228
1228
  if (!config) {
1229
1229
  return undefined;
1230
1230
  }
1231
1231
  const loginMode = config.loginMode ?? 'login';
1232
1232
  const passwordConfig = config.passwordConfig;
1233
- const fields = [forgeUsernameLoginField('email'), forgeTextPasswordField(passwordConfig), ...(loginMode === 'register' ? [forgeTextVerifyPasswordField()] : [])];
1233
+ const fields = [dbxForgeUsernameLoginField('email'), dbxForgeTextPasswordField(passwordConfig), ...(loginMode === 'register' ? [dbxForgeTextVerifyPasswordField()] : [])];
1234
1234
  return { fields };
1235
1235
  }));
1236
1236
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseEmailForgeFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
@@ -1861,11 +1861,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1861
1861
  * Forge-based form component for completing a password reset, containing new password and verify password fields.
1862
1862
  */
1863
1863
  class DbxFirebasePasswordResetFormComponent extends AbstractSyncForgeFormDirective {
1864
- config = {
1864
+ formConfig = {
1865
1865
  fields: [
1866
- forgeTextPasswordField({ minLength: FIREBASE_AUTH_PASSWORD_MIN_LENGTH }),
1866
+ dbxForgeTextPasswordField({ minLength: FIREBASE_AUTH_PASSWORD_MIN_LENGTH }),
1867
1867
  {
1868
- ...forgeTextVerifyPasswordField(),
1868
+ ...dbxForgeTextVerifyPasswordField(),
1869
1869
  validators: [
1870
1870
  {
1871
1871
  type: 'custom',
@@ -2234,20 +2234,22 @@ const DISPLAY_FOR_DEVELOPMENT_POPUP_STRING_VALUE = (values) => {
2234
2234
  * Forge form component for selecting development widget entries from a popup.
2235
2235
  */
2236
2236
  class DbxFirebaseDevelopmentPopupContentForgeFormComponent extends AbstractConfigAsyncForgeFormDirective {
2237
- config$ = this.currentConfig$.pipe(map((config) => {
2237
+ formConfig$ = this.currentConfig$.pipe(map((config) => {
2238
2238
  if (!config) {
2239
2239
  return undefined;
2240
2240
  }
2241
2241
  return {
2242
2242
  fields: [
2243
- forgePickableChipField({
2243
+ dbxForgePickableChipField({
2244
2244
  key: 'specifier',
2245
- filterLabel: 'Tools',
2246
- description: 'Pick a tool to get started.',
2247
- filterValues: filterPickableItemFieldValuesByLabel,
2248
- loadValues: () => of(config.entries.map((y) => ({ value: y.widget.type, meta: y }))),
2249
- displayForValue: DISPLAY_FOR_DEVELOPMENT_POPUP_STRING_VALUE,
2250
- asArrayValue: false
2245
+ hint: 'Pick a tool to get started.',
2246
+ props: {
2247
+ filterLabel: 'Tools',
2248
+ filterValues: filterPickableItemFieldValuesByLabel,
2249
+ loadValues: () => of(config.entries.map((y) => ({ value: y.widget.type, meta: y }))),
2250
+ displayForValue: DISPLAY_FOR_DEVELOPMENT_POPUP_STRING_VALUE,
2251
+ asArrayValue: false
2252
+ }
2251
2253
  })
2252
2254
  ]
2253
2255
  };
@@ -2275,7 +2277,7 @@ class DbxFirebaseDevelopmentSchedulerListComponent extends AbstractDbxSelectionL
2275
2277
  });
2276
2278
  }
2277
2279
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2278
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseDevelopmentSchedulerListComponent, isStandalone: true, selector: "dbx-firebase-development-scheduler-list", providers: provideDbxListViewWrapper(DbxFirebaseDevelopmentSchedulerListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabled()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2280
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseDevelopmentSchedulerListComponent, isStandalone: true, selector: "dbx-firebase-development-scheduler-list", providers: provideDbxListViewWrapper(DbxFirebaseDevelopmentSchedulerListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabledSignal()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2279
2281
  }
2280
2282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListComponent, decorators: [{
2281
2283
  type: Component,
@@ -2698,152 +2700,73 @@ function provideDbxFirebaseDevelopment(config) {
2698
2700
  /**
2699
2701
  * Provides EnvironmentProviders for all Firebase services.
2700
2702
  *
2703
+ * Initializes the FirebaseApp and each requested service synchronously at call time, so:
2704
+ * - App Check is registered before any Firebase request can fire (required for prod enforcement).
2705
+ * - Firestore is initialized with custom settings (persistentLocalCache, emulator) before
2706
+ * anything can call `getFirestore(app)` for this app.
2707
+ *
2708
+ * Also provides the parsed emulator config and {@link DbxFirebaseEmulatorService}, which are
2709
+ * derived from `dbxFirebaseAppOptions.emulators`.
2710
+ *
2701
2711
  * @param config
2702
2712
  * @returns EnvironmentProviders
2713
+ *
2714
+ * @example
2715
+ * ```ts
2716
+ * provideDbxFirebaseApp({
2717
+ * dbxFirebaseAppOptions: environment.firebase
2718
+ * });
2719
+ * ```
2703
2720
  */
2704
2721
  function provideDbxFirebaseApp(config) {
2705
- const { dbxFirebaseAppOptions: dbxFirebaseOptions } = config;
2706
- const providers = [
2707
- // options
2708
- {
2709
- provide: DBX_FIREBASE_APP_OPTIONS_TOKEN,
2710
- useValue: dbxFirebaseOptions
2711
- },
2712
- // app
2713
- {
2714
- provide: FIREBASE_APP_TOKEN,
2715
- useFactory: (options) => initializeApp(options),
2716
- deps: [DBX_FIREBASE_APP_OPTIONS_TOKEN]
2717
- }
2718
- ];
2719
- // firestore
2720
- if (config.provideFirestore !== false) {
2721
- providers.push({
2722
- provide: FIREBASE_FIRESTORE_TOKEN,
2723
- useFactory: (app, options, emulators) => {
2724
- const firestoreSettings = {};
2725
- const { enableMultiTabIndexedDbPersistence, enableIndexedDbPersistence } = options;
2726
- const { persistentCacheSettings } = options;
2727
- if (enableIndexedDbPersistence !== false) {
2728
- let tabManager;
2729
- if (enableMultiTabIndexedDbPersistence !== false) {
2730
- tabManager = persistentMultipleTabManager();
2731
- }
2732
- else {
2733
- tabManager = persistentSingleTabManager(undefined);
2734
- }
2735
- firestoreSettings.localCache = persistentLocalCache({
2736
- tabManager,
2737
- ...persistentCacheSettings
2738
- });
2739
- }
2740
- const firestore = initializeFirestore(app, firestoreSettings);
2741
- if (emulators?.useEmulators && emulators?.firestore) {
2742
- connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
2743
- }
2744
- return firestore;
2745
- },
2746
- deps: [FIREBASE_APP_TOKEN, DBX_FIREBASE_APP_OPTIONS_TOKEN, [new Optional(), DbxFirebaseParsedEmulatorsConfig]]
2747
- });
2748
- }
2749
- // app check
2722
+ const { dbxFirebaseAppOptions: options } = config;
2723
+ const emulators = parseDbxFirebaseEmulatorsConfig(options.emulators);
2724
+ const app = initializeApp(options);
2725
+ const providers = [{ provide: DBX_FIREBASE_APP_OPTIONS_TOKEN, useValue: options }, { provide: FIREBASE_APP_TOKEN, useValue: app }, { provide: DbxFirebaseParsedEmulatorsConfig, useValue: emulators }, DbxFirebaseEmulatorService];
2726
+ // App Check must be initialized before any Firebase request goes out, otherwise
2727
+ // requests are sent without an App Check token and are rejected in production.
2750
2728
  if (config.provideAppCheck !== false) {
2751
- const appCheckProviders = [
2752
- {
2753
- provide: FIREBASE_APP_CHECK_TOKEN,
2754
- useFactory: (app, options) => {
2755
- const appCheckOptions = options.appCheck;
2756
- const appCheckKnowinglyDisabled = appCheckOptions?.disabled === true || options.emulators?.useEmulators === true;
2757
- let appCheck;
2758
- if (appCheckOptions && !appCheckKnowinglyDisabled) {
2759
- // enable the debug tokens if not using emulators and allowDebugTokens is set true
2760
- if (!options.emulators?.useEmulators && appCheckOptions.allowDebugTokens) {
2761
- enableAppCheckDebugTokenGeneration(true);
2762
- }
2763
- // Only enabled outside of app-check environments. The emulators will not use appcheck.
2764
- appCheck = initializeAppCheck(app, {
2765
- provider: new ReCaptchaV3Provider(appCheckOptions.reCaptchaV3),
2766
- isTokenAutoRefreshEnabled: appCheckOptions.isTokenAutoRefreshEnabled ?? true
2767
- });
2768
- console.log('Enabled AppCheck.');
2769
- }
2770
- else {
2771
- appCheck = undefined;
2772
- if (!appCheckKnowinglyDisabled) {
2773
- console.error('dbx-firebase: No appcheck configuration for the app, and not specifically disabled in config either.');
2774
- }
2775
- }
2776
- return appCheck;
2777
- },
2778
- deps: [FIREBASE_APP_TOKEN, DBX_FIREBASE_APP_OPTIONS_TOKEN]
2779
- },
2780
- {
2781
- provide: HTTP_INTERCEPTORS,
2782
- useClass: DbxFirebaseAppCheckHttpInterceptor,
2783
- multi: true
2784
- }
2785
- ];
2786
- pushArrayItemsIntoArray(providers, appCheckProviders);
2729
+ providers.push({ provide: FIREBASE_APP_CHECK_TOKEN, useValue: createDbxFirebaseAppCheck({ app, options }) }, { provide: HTTP_INTERCEPTORS, useClass: DbxFirebaseAppCheckHttpInterceptor, multi: true });
2730
+ }
2731
+ // initializeFirestore(app, settings) must precede any other access to the Firestore for this app
2732
+ // (e.g. getFirestore(app)) or the persistentLocalCache settings are silently dropped.
2733
+ if (config.provideFirestore !== false) {
2734
+ providers.push({ provide: FIREBASE_FIRESTORE_TOKEN, useValue: createDbxFirebaseFirestore({ app, options, emulators }) });
2787
2735
  }
2788
- // auth
2789
2736
  if (config.provideAuth !== false) {
2790
- providers.push({
2791
- provide: FIREBASE_AUTH_TOKEN,
2792
- useFactory: (app, emulators) => {
2793
- const auth = getAuth(app);
2794
- if (emulators?.useEmulators && emulators?.auth) {
2795
- connectAuthEmulator(auth, `http://${emulators.auth.host}:${emulators.auth.port}`);
2796
- }
2797
- return auth;
2798
- },
2799
- deps: [FIREBASE_APP_TOKEN, [new Optional(), DbxFirebaseParsedEmulatorsConfig]]
2800
- });
2737
+ providers.push({ provide: FIREBASE_AUTH_TOKEN, useValue: createDbxFirebaseAuth({ app, emulators }) });
2801
2738
  }
2802
- // storage
2803
2739
  if (config.provideStorage !== false) {
2804
- providers.push({
2805
- provide: FIREBASE_STORAGE_TOKEN,
2806
- useFactory: (app, emulators) => {
2807
- const storage = getStorage(app);
2808
- if (emulators?.useEmulators && emulators?.storage) {
2809
- connectStorageEmulator(storage, emulators.storage.host, emulators.storage.port, {});
2810
- }
2811
- return storage;
2812
- },
2813
- deps: [FIREBASE_APP_TOKEN, [new Optional(), DbxFirebaseParsedEmulatorsConfig]]
2814
- });
2740
+ providers.push({ provide: FIREBASE_STORAGE_TOKEN, useValue: createDbxFirebaseStorage({ app, emulators }) });
2815
2741
  }
2816
- // functions
2817
2742
  if (config.provideFunctions !== false) {
2818
- providers.push({
2819
- provide: FIREBASE_FUNCTIONS_TOKEN,
2820
- useFactory: (app, options, emulators) => {
2821
- const { functionsRegionOrCustomDomain } = options;
2822
- const functions = getFunctions(app, functionsRegionOrCustomDomain);
2823
- if (emulators?.useEmulators && emulators?.functions) {
2824
- connectFunctionsEmulator(functions, emulators.functions.host, emulators.functions.port);
2825
- }
2826
- return functions;
2827
- },
2828
- deps: [FIREBASE_APP_TOKEN, DBX_FIREBASE_APP_OPTIONS_TOKEN, [new Optional(), DbxFirebaseParsedEmulatorsConfig]]
2829
- });
2743
+ providers.push({ provide: FIREBASE_FUNCTIONS_TOKEN, useValue: createDbxFirebaseFunctions({ app, options, emulators }) });
2830
2744
  }
2831
2745
  return makeEnvironmentProviders(providers);
2832
2746
  }
2833
-
2747
+ // MARK: Emulators
2834
2748
  /**
2835
- * Creates EnvironmentProviders for the DbxFirebaseEmulatorService.
2749
+ * Parses a {@link DbxFirebaseEmulatorsConfig} into a fully-resolved {@link DbxFirebaseParsedEmulatorsConfig}.
2836
2750
  *
2837
2751
  * @param config
2838
- * @returns
2752
+ * @returns DbxFirebaseParsedEmulatorsConfig
2753
+ *
2754
+ * @example
2755
+ * ```ts
2756
+ * const emulators = parseDbxFirebaseEmulatorsConfig({
2757
+ * useEmulators: true,
2758
+ * firestore: { port: 8080 }
2759
+ * });
2760
+ * ```
2839
2761
  */
2840
- function provideDbxFirebaseEmulator(config) {
2762
+ function parseDbxFirebaseEmulatorsConfig(config) {
2841
2763
  const defaultHost = config.host ?? 'localhost';
2842
2764
  function emulatorConfig(emulator) {
2843
2765
  return emulator ? { host: emulator.host ?? defaultHost, port: emulator.port } : undefined;
2844
2766
  }
2845
- const finalConfig = {
2767
+ return {
2846
2768
  useEmulators: config.useEmulators !== false,
2769
+ host: config.host,
2847
2770
  ui: emulatorConfig(config.ui),
2848
2771
  auth: emulatorConfig(config.auth),
2849
2772
  firestore: emulatorConfig(config.firestore),
@@ -2851,14 +2774,125 @@ function provideDbxFirebaseEmulator(config) {
2851
2774
  functions: emulatorConfig(config.functions),
2852
2775
  database: emulatorConfig(config.database)
2853
2776
  };
2854
- const providers = [
2855
- {
2856
- provide: DbxFirebaseParsedEmulatorsConfig,
2857
- useValue: finalConfig
2858
- },
2859
- DbxFirebaseEmulatorService
2860
- ];
2861
- return makeEnvironmentProviders(providers);
2777
+ }
2778
+ /**
2779
+ * Initializes App Check for the given FirebaseApp using the provided options.
2780
+ *
2781
+ * Returns `undefined` when App Check is knowingly disabled (config flag or emulators in use)
2782
+ * or when no App Check options are configured.
2783
+ *
2784
+ * @param params
2785
+ * @returns AppCheck
2786
+ *
2787
+ * @example
2788
+ * ```ts
2789
+ * const appCheck = createDbxFirebaseAppCheck({ app, options });
2790
+ * ```
2791
+ */
2792
+ function createDbxFirebaseAppCheck(params) {
2793
+ const { app, options } = params;
2794
+ const appCheckOptions = options.appCheck;
2795
+ const appCheckKnowinglyDisabled = appCheckOptions?.disabled === true || options.emulators?.useEmulators === true;
2796
+ let appCheck = undefined;
2797
+ if (appCheckOptions && !appCheckKnowinglyDisabled) {
2798
+ if (!options.emulators?.useEmulators && appCheckOptions.allowDebugTokens) {
2799
+ enableAppCheckDebugTokenGeneration(true);
2800
+ }
2801
+ appCheck = initializeAppCheck(app, {
2802
+ provider: new ReCaptchaV3Provider(appCheckOptions.reCaptchaV3),
2803
+ isTokenAutoRefreshEnabled: appCheckOptions.isTokenAutoRefreshEnabled ?? true
2804
+ });
2805
+ console.log('Enabled AppCheck.');
2806
+ }
2807
+ else if (!appCheckKnowinglyDisabled) {
2808
+ console.error('dbx-firebase: No appcheck configuration for the app, and not specifically disabled in config either.');
2809
+ }
2810
+ return appCheck;
2811
+ }
2812
+ /**
2813
+ * Initializes Firestore for the given FirebaseApp with persistence and emulator settings derived from options.
2814
+ *
2815
+ * @param params
2816
+ * @returns Firestore
2817
+ *
2818
+ * @example
2819
+ * ```ts
2820
+ * const firestore = createDbxFirebaseFirestore({ app, options, emulators });
2821
+ * ```
2822
+ */
2823
+ function createDbxFirebaseFirestore(params) {
2824
+ const { app, options, emulators } = params;
2825
+ const { enableMultiTabIndexedDbPersistence, enableIndexedDbPersistence, persistentCacheSettings } = options;
2826
+ const firestoreSettings = {};
2827
+ if (enableIndexedDbPersistence !== false) {
2828
+ const tabManager = enableMultiTabIndexedDbPersistence !== false ? persistentMultipleTabManager() : persistentSingleTabManager(undefined);
2829
+ firestoreSettings.localCache = persistentLocalCache({
2830
+ tabManager,
2831
+ ...persistentCacheSettings
2832
+ });
2833
+ }
2834
+ const firestore = initializeFirestore(app, firestoreSettings);
2835
+ if (emulators.useEmulators && emulators.firestore) {
2836
+ connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
2837
+ }
2838
+ return firestore;
2839
+ }
2840
+ /**
2841
+ * Returns the Firebase Auth instance for the given app, wired up to the auth emulator if configured.
2842
+ *
2843
+ * @param params
2844
+ * @returns Auth
2845
+ *
2846
+ * @example
2847
+ * ```ts
2848
+ * const auth = createDbxFirebaseAuth({ app, emulators });
2849
+ * ```
2850
+ */
2851
+ function createDbxFirebaseAuth(params) {
2852
+ const { app, emulators } = params;
2853
+ const auth = getAuth(app);
2854
+ if (emulators.useEmulators && emulators.auth) {
2855
+ connectAuthEmulator(auth, `http://${emulators.auth.host}:${emulators.auth.port}`);
2856
+ }
2857
+ return auth;
2858
+ }
2859
+ /**
2860
+ * Returns the Firebase Storage instance for the given app, wired up to the storage emulator if configured.
2861
+ *
2862
+ * @param params
2863
+ * @returns FirebaseStorage
2864
+ *
2865
+ * @example
2866
+ * ```ts
2867
+ * const storage = createDbxFirebaseStorage({ app, emulators });
2868
+ * ```
2869
+ */
2870
+ function createDbxFirebaseStorage(params) {
2871
+ const { app, emulators } = params;
2872
+ const storage = getStorage(app);
2873
+ if (emulators.useEmulators && emulators.storage) {
2874
+ connectStorageEmulator(storage, emulators.storage.host, emulators.storage.port, {});
2875
+ }
2876
+ return storage;
2877
+ }
2878
+ /**
2879
+ * Returns the Firebase Functions instance for the given app, wired up to the functions emulator if configured.
2880
+ *
2881
+ * @param params
2882
+ * @returns Functions
2883
+ *
2884
+ * @example
2885
+ * ```ts
2886
+ * const functions = createDbxFirebaseFunctions({ app, options, emulators });
2887
+ * ```
2888
+ */
2889
+ function createDbxFirebaseFunctions(params) {
2890
+ const { app, options, emulators } = params;
2891
+ const functions = getFunctions(app, options.functionsRegionOrCustomDomain);
2892
+ if (emulators.useEmulators && emulators.functions) {
2893
+ connectFunctionsEmulator(functions, emulators.functions.host, emulators.functions.port);
2894
+ }
2895
+ return functions;
2862
2896
  }
2863
2897
 
2864
2898
  /**
@@ -3797,7 +3831,7 @@ class DbxFirebaseModelTypeInstanceListComponent extends AbstractDbxSelectionList
3797
3831
  });
3798
3832
  }
3799
3833
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseModelTypeInstanceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3800
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseModelTypeInstanceListComponent, isStandalone: true, selector: "dbx-firebase-model-type-instance-list", providers: provideDbxListViewWrapper(DbxFirebaseModelTypeInstanceListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabled()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3834
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseModelTypeInstanceListComponent, isStandalone: true, selector: "dbx-firebase-model-type-instance-list", providers: provideDbxListViewWrapper(DbxFirebaseModelTypeInstanceListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabledSignal()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3801
3835
  }
3802
3836
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseModelTypeInstanceListComponent, decorators: [{
3803
3837
  type: Component,
@@ -5786,7 +5820,7 @@ class DbxFirebaseNotificationItemListComponent extends AbstractDbxSelectionListW
5786
5820
  });
5787
5821
  }
5788
5822
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseNotificationItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5789
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseNotificationItemListComponent, isStandalone: true, selector: "dbx-firebase-notificationitem-list", providers: provideDbxListViewWrapper(DbxFirebaseNotificationItemListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabled()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5823
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxFirebaseNotificationItemListComponent, isStandalone: true, selector: "dbx-firebase-notificationitem-list", providers: provideDbxListViewWrapper(DbxFirebaseNotificationItemListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabledSignal()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5790
5824
  }
5791
5825
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFirebaseNotificationItemListComponent, decorators: [{
5792
5826
  type: Component,
@@ -7926,11 +7960,11 @@ function provideDbxFirebaseModelTypesService(config) {
7926
7960
  * @returns EnvironmentProviders for the DbxFirebase configuration.
7927
7961
  */
7928
7962
  function provideDbxFirebase(config) {
7929
- const { app, emulator, storage, auth, functions, firestores, modelContextService, modelTypesService, development, notifications, provideAnalyticsUserEventsListener, provideStorageFileService, modelEntitiesWidgetService: inputModelEntitiesWidgetService } = config;
7963
+ const { app, storage, auth, functions, firestores, modelContextService, modelTypesService, development, notifications, provideAnalyticsUserEventsListener, provideStorageFileService, modelEntitiesWidgetService: inputModelEntitiesWidgetService } = config;
7930
7964
  const modelEntitiesWidgetServiceConfig = inputModelEntitiesWidgetService ?? {
7931
7965
  dbxFirebaseModelEntitiesWidgetServiceConfigFactory: () => ({ entries: [] })
7932
7966
  };
7933
- const providers = [provideDbxFirebaseApp(app), provideDbxFirebaseEmulator(emulator), providedDbxFirebaseStorage(storage), provideDbxFirebaseAuth(auth), provideDbxFirebaseFunctions(functions), provideDbxFirebaseModelContextService(modelContextService), provideDbxFirebaseModelTypesService(modelTypesService), provideDbxFirebaseModelEntitiesWidgetService(modelEntitiesWidgetServiceConfig)];
7967
+ const providers = [provideDbxFirebaseApp(app), providedDbxFirebaseStorage(storage), provideDbxFirebaseAuth(auth), provideDbxFirebaseFunctions(functions), provideDbxFirebaseModelContextService(modelContextService), provideDbxFirebaseModelTypesService(modelTypesService), provideDbxFirebaseModelEntitiesWidgetService(modelEntitiesWidgetServiceConfig)];
7934
7968
  asArray(firestores).forEach((firestore) => {
7935
7969
  providers.push(provideDbxFirestoreCollection(firestore));
7936
7970
  });
@@ -7953,5 +7987,5 @@ function provideDbxFirebase(config) {
7953
7987
  * Generated bundle index. Do not edit.
7954
7988
  */
7955
7989
 
7956
- 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_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_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_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthLoginService, 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, 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, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePasswordResetComponent, DbxFirebasePasswordResetFormComponent, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, 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, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthState, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, firebaseIdToken, firebaseProviderIdToLoginMethodType, isDbxFirebaseModelEntityWithStore, linkDocumentStoreToParentContextStores, loginMethodTypeToFirebaseProviderId, modelDoesNotExistError, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreContextStore, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseEmulator, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseModelEntitiesWidgetService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
7990
+ 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_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_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_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthLoginService, 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, 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, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePasswordResetComponent, DbxFirebasePasswordResetFormComponent, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, 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, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, createDbxFirebaseAppCheck, createDbxFirebaseAuth, createDbxFirebaseFirestore, createDbxFirebaseFunctions, createDbxFirebaseStorage, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthState, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, firebaseIdToken, firebaseProviderIdToLoginMethodType, isDbxFirebaseModelEntityWithStore, linkDocumentStoreToParentContextStores, loginMethodTypeToFirebaseProviderId, modelDoesNotExistError, parseDbxFirebaseEmulatorsConfig, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreContextStore, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseModelEntitiesWidgetService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
7957
7991
  //# sourceMappingURL=dereekb-dbx-firebase.mjs.map