@dereekb/dbx-firebase 10.2.0 → 11.0.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.
Files changed (125) hide show
  1. package/esm2022/lib/analytics/analytics.user.events.mjs +10 -15
  2. package/esm2022/lib/analytics/analytics.user.source.mjs +20 -23
  3. package/esm2022/lib/auth/appcheck/appcheck.interceptor.mjs +13 -17
  4. package/esm2022/lib/auth/firebase.auth.module.mjs +4 -4
  5. package/esm2022/lib/auth/login/firebase.login.module.mjs +14 -11
  6. package/esm2022/lib/auth/login/login.anonymous.component.mjs +4 -7
  7. package/esm2022/lib/auth/login/login.apple.component.mjs +4 -7
  8. package/esm2022/lib/auth/login/login.button.component.mjs +23 -28
  9. package/esm2022/lib/auth/login/login.component.mjs +8 -7
  10. package/esm2022/lib/auth/login/login.context.back.component.mjs +8 -10
  11. package/esm2022/lib/auth/login/login.context.directive.mjs +4 -4
  12. package/esm2022/lib/auth/login/login.email.component.mjs +4 -7
  13. package/esm2022/lib/auth/login/login.email.content.component.mjs +53 -57
  14. package/esm2022/lib/auth/login/login.email.form.component.mjs +9 -12
  15. package/esm2022/lib/auth/login/login.email.recovery.form.component.mjs +5 -8
  16. package/esm2022/lib/auth/login/login.facebook.component.mjs +4 -7
  17. package/esm2022/lib/auth/login/login.github.component.mjs +4 -7
  18. package/esm2022/lib/auth/login/login.google.component.mjs +4 -7
  19. package/esm2022/lib/auth/login/login.list.component.mjs +31 -34
  20. package/esm2022/lib/auth/login/login.microsoft.component.mjs +4 -7
  21. package/esm2022/lib/auth/login/login.service.mjs +11 -15
  22. package/esm2022/lib/auth/login/login.terms.component.mjs +11 -14
  23. package/esm2022/lib/auth/login/login.terms.simple.component.mjs +16 -19
  24. package/esm2022/lib/auth/login/login.twitter.component.mjs +4 -7
  25. package/esm2022/lib/auth/login/register.component.mjs +7 -4
  26. package/esm2022/lib/auth/login/register.email.component.mjs +4 -7
  27. package/esm2022/lib/auth/service/firebase.auth.service.mjs +52 -52
  28. package/esm2022/lib/development/development.module.mjs +10 -11
  29. package/esm2022/lib/development/development.popup.component.mjs +13 -15
  30. package/esm2022/lib/development/development.popup.content.component.mjs +41 -46
  31. package/esm2022/lib/development/development.popup.content.form.component.mjs +17 -20
  32. package/esm2022/lib/development/development.popup.directive.mjs +9 -13
  33. package/esm2022/lib/development/development.scheduler.list.component.mjs +22 -32
  34. package/esm2022/lib/development/development.scheduler.service.mjs +26 -36
  35. package/esm2022/lib/development/development.scheduler.widget.component.mjs +10 -13
  36. package/esm2022/lib/development/development.service.mjs +4 -3
  37. package/esm2022/lib/development/development.widget.service.mjs +8 -9
  38. package/esm2022/lib/firebase/emulators.mjs +12 -1
  39. package/esm2022/lib/firebase/firebase.emulator.module.mjs +4 -4
  40. package/esm2022/lib/firebase/firebase.emulator.service.mjs +6 -9
  41. package/esm2022/lib/firebase/firebase.module.mjs +25 -25
  42. package/esm2022/lib/firestore/firebase.firestore.context.service.mjs +6 -11
  43. package/esm2022/lib/firestore/firebase.firestore.module.mjs +4 -4
  44. package/esm2022/lib/function/firebase.function.module.mjs +4 -4
  45. package/esm2022/lib/model/loader/collection.change.trigger.mjs +5 -3
  46. package/esm2022/lib/model/loader/collection.change.watcher.mjs +30 -32
  47. package/esm2022/lib/model/loader/collection.loader.instance.mjs +48 -43
  48. package/esm2022/lib/model/loader/document.loader.instance.mjs +22 -20
  49. package/esm2022/lib/model/model.module.mjs +4 -4
  50. package/esm2022/lib/model/modules/model/model.history.component.mjs +14 -16
  51. package/esm2022/lib/model/modules/model/model.history.module.mjs +4 -4
  52. package/esm2022/lib/model/modules/model/model.history.popover.button.component.mjs +10 -11
  53. package/esm2022/lib/model/modules/model/model.history.popover.component.mjs +5 -8
  54. package/esm2022/lib/model/modules/model/model.tracker.service.mjs +11 -15
  55. package/esm2022/lib/model/modules/model/model.types.list.component.mjs +12 -15
  56. package/esm2022/lib/model/modules/model/model.types.module.mjs +4 -4
  57. package/esm2022/lib/model/modules/model/model.types.service.mjs +48 -40
  58. package/esm2022/lib/model/modules/model/model.types.view.directive.mjs +10 -15
  59. package/esm2022/lib/model/modules/store/model.store.module.mjs +4 -4
  60. package/esm2022/lib/model/modules/store/store.collection.change.directive.mjs +14 -20
  61. package/esm2022/lib/model/modules/store/store.collection.change.if.directive.mjs +23 -27
  62. package/esm2022/lib/model/modules/store/store.collection.directive.mjs +5 -4
  63. package/esm2022/lib/model/modules/store/store.collection.list.directive.mjs +8 -12
  64. package/esm2022/lib/model/modules/store/store.collection.mjs +39 -42
  65. package/esm2022/lib/model/modules/store/store.document.auth.directive.mjs +7 -14
  66. package/esm2022/lib/model/modules/store/store.document.directive.mjs +15 -14
  67. package/esm2022/lib/model/modules/store/store.document.mjs +125 -128
  68. package/esm2022/lib/model/modules/store/store.document.router.directive.mjs +12 -19
  69. package/esm2022/lib/model/modules/store/store.document.router.key.directive.mjs +13 -20
  70. package/esm2022/lib/model/modules/store/store.subcollection.directive.mjs +3 -3
  71. package/esm2022/lib/model/modules/store/store.subcollection.document.mjs +76 -82
  72. package/esm2022/lib/model/modules/store/store.subcollection.mjs +51 -51
  73. package/esm2022/lib/model/service/model.context.instance.mjs +11 -10
  74. package/esm2022/lib/model/system/systemstate.collection.store.directive.mjs +3 -3
  75. package/esm2022/lib/model/system/systemstate.collection.store.mjs +4 -3
  76. package/esm2022/lib/model/system/systemstate.document.store.accessor.mjs +18 -9
  77. package/esm2022/lib/model/system/systemstate.document.store.directive.mjs +3 -3
  78. package/esm2022/lib/model/system/systemstate.document.store.mjs +4 -3
  79. package/esm2022/lib/module.mjs +4 -4
  80. package/esm2022/lib/pipe/key.pipe.mjs +5 -5
  81. package/esm2022/lib/pipe/pipe.module.mjs +4 -4
  82. package/esm2022/lib/router/id.param.redirect.mjs +58 -62
  83. package/esm2022/lib/storage/firebase.storage.module.mjs +4 -4
  84. package/esm2022/lib/storage/firebase.storage.service.mjs +6 -11
  85. package/fesm2022/dereekb-dbx-firebase.mjs +1189 -1289
  86. package/fesm2022/dereekb-dbx-firebase.mjs.map +1 -1
  87. package/lib/analytics/analytics.user.events.d.ts +0 -1
  88. package/lib/analytics/analytics.user.source.d.ts +0 -1
  89. package/lib/auth/appcheck/appcheck.interceptor.d.ts +1 -5
  90. package/lib/auth/login/firebase.login.module.d.ts +2 -1
  91. package/lib/auth/login/login.button.component.d.ts +0 -1
  92. package/lib/auth/login/login.email.content.component.d.ts +0 -1
  93. package/lib/auth/login/login.list.component.d.ts +0 -1
  94. package/lib/auth/login/login.service.d.ts +2 -2
  95. package/lib/auth/login/login.terms.component.d.ts +0 -1
  96. package/lib/auth/login/login.terms.simple.component.d.ts +0 -1
  97. package/lib/auth/service/firebase.auth.service.d.ts +2 -2
  98. package/lib/development/development.module.d.ts +1 -1
  99. package/lib/development/development.popup.component.d.ts +1 -2
  100. package/lib/development/development.popup.content.component.d.ts +0 -1
  101. package/lib/development/development.popup.directive.d.ts +0 -1
  102. package/lib/development/development.scheduler.list.component.d.ts +1 -2
  103. package/lib/development/development.scheduler.service.d.ts +1 -3
  104. package/lib/development/development.scheduler.widget.component.d.ts +0 -1
  105. package/lib/development/development.widget.service.d.ts +2 -2
  106. package/lib/firebase/firebase.emulator.service.d.ts +0 -1
  107. package/lib/firestore/firebase.firestore.context.service.d.ts +1 -2
  108. package/lib/model/loader/collection.change.trigger.d.ts +1 -1
  109. package/lib/model/loader/collection.change.watcher.d.ts +8 -18
  110. package/lib/model/modules/model/model.history.component.d.ts +0 -1
  111. package/lib/model/modules/model/model.history.popover.button.component.d.ts +2 -3
  112. package/lib/model/modules/model/model.history.popover.component.d.ts +1 -2
  113. package/lib/model/modules/model/model.tracker.service.d.ts +0 -1
  114. package/lib/model/modules/model/model.types.service.d.ts +8 -10
  115. package/lib/model/modules/model/model.types.view.directive.d.ts +1 -2
  116. package/lib/model/modules/store/store.collection.change.directive.d.ts +2 -4
  117. package/lib/model/modules/store/store.collection.change.if.directive.d.ts +2 -3
  118. package/lib/model/modules/store/store.collection.list.directive.d.ts +4 -4
  119. package/lib/model/modules/store/store.document.auth.directive.d.ts +2 -3
  120. package/lib/model/modules/store/store.document.router.directive.d.ts +3 -4
  121. package/lib/model/modules/store/store.document.router.key.directive.d.ts +4 -5
  122. package/lib/model/system/systemstate.document.store.accessor.d.ts +5 -2
  123. package/lib/router/id.param.redirect.d.ts +3 -13
  124. package/lib/storage/firebase.storage.service.d.ts +1 -2
  125. package/package.json +1 -1
@@ -1,41 +1,41 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Optional, InjectionToken, Inject, Component, Input, Directive, EventEmitter, Output, NgModule, Injector, ViewChild, HostListener, ElementRef, ChangeDetectionStrategy, forwardRef, Host, Pipe } from '@angular/core';
3
- import * as i3 from '@dereekb/dbx-analytics';
4
- import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, cleanupDestroyable, pageItemAccumulatorCurrentPage, accumulatorFlattenPageListLoadingState, useFirst, itemAccumulatorNextPageUntilResultsCount, iteratorNextPageUntilPage, iteratorNextPageUntilMaxPageLoadLimit, pageLoadingStateFromObs, useAsObservable, invertObservableDecision, filterItemsWithObservableDecision, mapEachAsync, distinctUntilModelKeyChange, successResult, beginLoading, errorResult, loadingStateIsLoading, cleanup, mapLoadingState } from '@dereekb/rxjs';
2
+ import { inject, Injectable, InjectionToken, Component, Optional, Inject, Input, Directive, EventEmitter, Output, NgModule, Injector, ViewChild, HostListener, ElementRef, ChangeDetectionStrategy, forwardRef, NgZone, Pipe } from '@angular/core';
3
+ import { DbxAnalyticsService } from '@dereekb/dbx-analytics';
4
+ import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, cleanupDestroyable, pageItemAccumulatorCurrentPage, accumulatorFlattenPageListLoadingState, useFirst, itemAccumulatorNextPageUntilResultsCount, iteratorNextPageUntilPage, iteratorNextPageUntilMaxPageLoadLimit, pageLoadingStateFromObs, useAsObservable, mapEachAsync, invertObservableDecision, filterItemsWithObservableDecision, distinctUntilModelKeyChange, successResult, beginLoading, errorResult, isLoadingStateLoading, cleanup, mapLoadingState } from '@dereekb/rxjs';
5
5
  import { switchMap, of, shareReplay, map, distinctUntilChanged, EMPTY, catchError, firstValueFrom, BehaviorSubject, combineLatest, first, from, tap, interval, exhaustMap, filter, take, startWith, Subject, throttleTime, NEVER, combineLatestWith } from 'rxjs';
6
- import * as i2$2 from '@dereekb/dbx-core';
7
- import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService, AbstractSubscriptionDirective, AbstractIfDirective, DbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance, LockSetComponentStore } from '@dereekb/dbx-core';
8
- import * as i1 from '@angular/fire/auth';
9
- import { authState, idToken, GoogleAuthProvider, FacebookAuthProvider, TwitterAuthProvider, GithubAuthProvider, signInWithPopup, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, reauthenticateWithPopup, provideAuth, getAuth, connectAuthEmulator } from '@angular/fire/auth';
6
+ import * as i3 from '@dereekb/dbx-core';
7
+ import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService, AbstractSubscriptionDirective, AbstractIfDirective, dbxRouteParamReaderInstance, DbxRouteParamDefaultRedirectInstance, DbxRouterService, LockSetComponentStore } from '@dereekb/dbx-core';
8
+ import * as i3$1 from '@angular/fire/auth';
9
+ import { Auth, authState, idToken, GoogleAuthProvider, FacebookAuthProvider, TwitterAuthProvider, GithubAuthProvider, signInWithPopup, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, reauthenticateWithPopup, provideAuth, getAuth, connectAuthEmulator } from '@angular/fire/auth';
10
10
  import { AUTH_ADMIN_ROLE, cachedGetter, urlWithoutParameters, addToSet, removeFromSet, filterMaybeValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, addToSetCopy, iterableToArray, runAsyncTasksForValues, forEachKeyValue, countAllInNestedArray, invertDecision, readableError, isMaybeSo, firstValue } from '@dereekb/util';
11
11
  import { safeFormatToISO8601DateString, msToSeconds } from '@dereekb/date';
12
12
  import { sendPasswordResetEmail } from 'firebase/auth';
13
13
  import { getToken, initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check';
14
- import * as i1$1 from '@angular/fire/app-check';
15
- import { provideAppCheck } from '@angular/fire/app-check';
16
- import * as i3$1 from '@angular/material/button';
14
+ import * as i2$2 from '@angular/fire/app-check';
15
+ import { AppCheck, provideAppCheck } from '@angular/fire/app-check';
16
+ import * as i2$1 from '@angular/material/button';
17
17
  import { MatButtonModule } from '@angular/material/button';
18
- import * as i2$1 from '@angular/material/icon';
18
+ import * as i2 from '@angular/material/icon';
19
19
  import { MatIconModule } from '@angular/material/icon';
20
- import * as i2 from '@angular/common';
20
+ import * as i1$1 from '@angular/common';
21
21
  import { CommonModule } from '@angular/common';
22
- import * as i1$2 from '@dereekb/dbx-web';
23
- import { DbxRouterAnchorModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, AbstractDbxSelectionListWrapperDirective, provideDbxListViewWrapper, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, provideDbxListView, DEFAULT_DBX_SELECTION_VALUE_LIST_DIRECTIVE_TEMPLATE, AbstractDbxValueListViewItemComponent, DBX_VALUE_LIST_VIEW_ITEM, TwoColumnsContextStore, AbstractPopupDirective, DbxWidgetModule, DbxTextModule, DbxBlockLayoutModule, DbxTwoColumnLayoutModule, DbxPopupInteractionModule, DbxListLayoutModule, allDbxModelViewTrackerEventModelKeys, AbstractPopoverDirective, AbstractPopoverRefDirective, DbxModelInfoModule, DbxRouterListModule, DbxPopoverInteractionModule } from '@dereekb/dbx-web';
24
- import * as i1$4 from '@dereekb/firebase';
25
- import { firebaseAuthErrorToReadableError, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FirebaseDevelopmentFunctions, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, firestoreModelKeyCollectionTypePair, buildFirebaseCollectionTypeModelTypeMap, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, flatFirestoreModelKey, twoWayFlatFirestoreModelKey, documentDataWithIdAndKey, inferKeyFromTwoWayFlatFirestoreModelKey, firestoreModelKeyParentKey, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
26
- import * as i1$3 from '@dereekb/dbx-form';
22
+ import * as i1 from '@dereekb/dbx-web';
23
+ import { DbxRouterAnchorModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxWidgetService, AbstractDbxSelectionListWrapperDirective, provideDbxListViewWrapper, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, provideDbxListView, DEFAULT_DBX_SELECTION_VALUE_LIST_DIRECTIVE_TEMPLATE, AbstractDbxValueListViewItemComponent, TwoColumnsContextStore, AbstractPopupDirective, DbxPopupService, DbxWidgetModule, DbxTextModule, DbxBlockLayoutModule, DbxTwoColumnLayoutModule, DbxPopupInteractionModule, DbxListLayoutModule, DbxModelTypesService, DbxModelTrackerService, allDbxModelViewTrackerEventModelKeys, AbstractPopoverDirective, AbstractPopoverRefDirective, DbxPopoverService, DbxModelObjectStateService, DbxModelInfoModule, DbxRouterListModule, DbxPopoverInteractionModule, DbxListViewWrapper } from '@dereekb/dbx-web';
24
+ import * as i1$3 from '@dereekb/firebase';
25
+ import { firebaseAuthErrorToReadableError, FirebaseDevelopmentFunctions, ScheduledFunctionDevelopmentFunctionTypeEnum, clientFirebaseFirestoreContextFactory, SystemStateFirestoreCollections, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, iterationQueryDocChangeWatcher, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, firestoreModelKeysFromDocuments, firestoreModelIdsFromDocuments, documentReferencesFromDocuments, getDocumentSnapshots, getDataFromDocumentSnapshots, latestSnapshotsFromDocuments, dataFromDocumentSnapshots, loadDocumentsForKeys, loadDocumentsForDocumentReferences, loadDocumentsForIds, firestoreModelKeyCollectionTypePair, buildFirebaseCollectionTypeModelTypeMap, FirestoreAccessorStreamMode, firestoreModelIdsFromKey, firestoreModelKeyPartPairs, firestoreModelKeyPairObject, flatFirestoreModelKey, twoWayFlatFirestoreModelKey, documentDataWithIdAndKey, inferKeyFromTwoWayFlatFirestoreModelKey, firestoreModelKeyParentKey, clientFirebaseStorageContextFactory } from '@dereekb/firebase';
26
+ import * as i4 from '@dereekb/dbx-form';
27
27
  import { AbstractAsyncFormlyFormDirective, usernamePasswordLoginFields, provideFormlyContext, AbstractSyncFormlyFormDirective, emailField, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, AbstractConfigAsyncFormlyFormDirective, pickableItemChipField, filterPickableItemFieldValuesByLabel } from '@dereekb/dbx-form';
28
28
  import { initializeApp } from 'firebase/app';
29
29
  import * as i6 from '@angular/fire/app';
30
30
  import { FirebaseApp, provideFirebaseApp } from '@angular/fire/app';
31
- import * as i4 from '@angular/fire/storage';
31
+ import * as i4$1 from '@angular/fire/storage';
32
32
  import { provideStorage, getStorage, connectStorageEmulator, Storage } from '@angular/fire/storage';
33
33
  import * as i5 from '@angular/fire/functions';
34
34
  import { provideFunctions, getFunctions, connectFunctionsEmulator, Functions } from '@angular/fire/functions';
35
- import * as i1$5 from '@angular/fire/firestore';
35
+ import * as i1$2 from '@angular/fire/firestore';
36
36
  import { provideFirestore, persistentMultipleTabManager, persistentSingleTabManager, persistentLocalCache, initializeFirestore, connectFirestoreEmulator, Firestore } from '@angular/fire/firestore';
37
37
  import { HTTP_INTERCEPTORS } from '@angular/common/http';
38
- import * as i2$3 from '@angular/material/snack-bar';
38
+ import { MatSnackBar } from '@angular/material/snack-bar';
39
39
  import { __decorate, __param, __metadata } from 'tslib';
40
40
 
41
41
  function authUserInfoFromAuthUser(user) {
@@ -105,9 +105,7 @@ function readValueFromIdToken(dbxFirebaseAuthService, readValueFromIdToken, defa
105
105
 
106
106
  // MARK: Delegate
107
107
  class DbxFirebaseAuthServiceDelegate {
108
- constructor() {
109
- this.fullControlOfAuthUserState = false;
110
- }
108
+ fullControlOfAuthUserState = false;
111
109
  }
112
110
  const DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE = {
113
111
  authUserStateObs: authUserStateFromFirebaseAuthServiceFunction(),
@@ -123,41 +121,42 @@ const DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE = {
123
121
  };
124
122
  // MARK: Service
125
123
  class DbxFirebaseAuthService {
126
- constructor(firebaseAuth, delegate) {
127
- this.firebaseAuth = firebaseAuth;
128
- this._authState$ = authState(this.firebaseAuth);
129
- this.currentAuthUser$ = this._authState$.pipe(timeoutStartWith(null, 1000), distinctUntilChanged(), shareReplay(1));
130
- this.currentAuthUserInfo$ = this.currentAuthUser$.pipe(map((x) => (x ? authUserInfoFromAuthUser(x) : undefined)));
131
- this.authUser$ = this.currentAuthUser$.pipe(filterMaybe());
132
- this.authUserInfo$ = this.authUser$.pipe(map(authUserInfoFromAuthUser));
133
- this.hasAuthUser$ = this.currentAuthUser$.pipe(map((x) => Boolean(x)), distinctUntilChanged(), shareReplay(1));
134
- this.isAnonymousUser$ = this.authUser$.pipe(map((x) => x.isAnonymous), distinctUntilChanged(), shareReplay(1));
135
- this.isNotAnonymousUser$ = this.isAnonymousUser$.pipe(isNot(), distinctUntilChanged(), shareReplay(1));
136
- this.isLoggedIn$ = this.hasAuthUser$;
137
- this.isNotLoggedIn$ = this.isLoggedIn$.pipe(isNot());
138
- this.onLogIn$ = loggedInObsFromIsLoggedIn(this.isLoggedIn$);
139
- this.onLogOut$ = loggedOutObsFromIsLoggedIn(this.isLoggedIn$);
140
- this.currentUid$ = this.currentAuthUser$.pipe(map((x) => x?.uid), distinctUntilChanged(), shareReplay(1));
141
- this.uid$ = this.currentUid$.pipe(map(authUserIdentifier), distinctUntilChanged(), shareReplay(1));
142
- /**
143
- * Alias for uid$
144
- */
145
- this.userIdentifier$ = this.uid$;
146
- this.currentIdTokenString$ = idToken(this.firebaseAuth).pipe(distinctUntilChanged(), shareReplay(1));
147
- this.idTokenString$ = this.currentUid$.pipe(switchMap((x) => (x ? this.currentIdTokenString$.pipe(filterMaybe()) : EMPTY)));
148
- this.currentIdTokenResult$ = this.currentAuthUser$.pipe(switchMap((x) => (x ? this.currentIdTokenString$.pipe(switchMap((y) => (y ? x.getIdTokenResult() : of(null)))) : of(null))), distinctUntilChanged(), shareReplay(1));
149
- this.idTokenResult$ = this.currentIdTokenResult$.pipe(filterMaybe());
150
- this.currentClaims$ = this.currentIdTokenResult$.pipe(map((x) => (x ? x.claims : null)), distinctUntilChanged(), shareReplay(1));
151
- this.claims$ = this.currentClaims$.pipe(filterMaybe());
152
- this.currentAuthContextInfo$ = this.currentAuthUser$.pipe(switchMap((x) => this.loadAuthContextInfoForUser(x)), shareReplay(1));
153
- this.authContextInfo$ = this.currentAuthContextInfo$.pipe(filterMaybe());
154
- delegate = delegate ?? DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE;
155
- const delegateAuthUserStateObs = delegate.authUserStateObs(this).pipe(catchError(() => of('error')), distinctUntilChanged(), shareReplay(1));
156
- if (delegate.fullControlOfAuthUserState) {
157
- this.authUserState$ = delegateAuthUserStateObs;
124
+ firebaseAuth = inject(Auth);
125
+ delegate = inject(DbxFirebaseAuthServiceDelegate, { optional: true }) ?? DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE;
126
+ _authState$ = authState(this.firebaseAuth);
127
+ currentAuthUser$ = this._authState$.pipe(timeoutStartWith(null, 1000), distinctUntilChanged(), shareReplay(1));
128
+ currentAuthUserInfo$ = this.currentAuthUser$.pipe(map((x) => (x ? authUserInfoFromAuthUser(x) : undefined)));
129
+ authUser$ = this.currentAuthUser$.pipe(filterMaybe());
130
+ authUserInfo$ = this.authUser$.pipe(map(authUserInfoFromAuthUser));
131
+ hasAuthUser$ = this.currentAuthUser$.pipe(map((x) => Boolean(x)), distinctUntilChanged(), shareReplay(1));
132
+ isAnonymousUser$ = this.authUser$.pipe(map((x) => x.isAnonymous), distinctUntilChanged(), shareReplay(1));
133
+ isNotAnonymousUser$ = this.isAnonymousUser$.pipe(isNot(), distinctUntilChanged(), shareReplay(1));
134
+ isLoggedIn$ = this.hasAuthUser$;
135
+ isNotLoggedIn$ = this.isLoggedIn$.pipe(isNot());
136
+ onLogIn$ = loggedInObsFromIsLoggedIn(this.isLoggedIn$);
137
+ onLogOut$ = loggedOutObsFromIsLoggedIn(this.isLoggedIn$);
138
+ currentUid$ = this.currentAuthUser$.pipe(map((x) => x?.uid), distinctUntilChanged(), shareReplay(1));
139
+ uid$ = this.currentUid$.pipe(map(authUserIdentifier), distinctUntilChanged(), shareReplay(1));
140
+ /**
141
+ * Alias for uid$
142
+ */
143
+ userIdentifier$ = this.uid$;
144
+ currentIdTokenString$ = idToken(this.firebaseAuth).pipe(distinctUntilChanged(), shareReplay(1));
145
+ idTokenString$ = this.currentUid$.pipe(switchMap((x) => (x ? this.currentIdTokenString$.pipe(filterMaybe()) : EMPTY)));
146
+ currentIdTokenResult$ = this.currentAuthUser$.pipe(switchMap((x) => (x ? this.currentIdTokenString$.pipe(switchMap((y) => (y ? x.getIdTokenResult() : of(null)))) : of(null))), distinctUntilChanged(), shareReplay(1));
147
+ idTokenResult$ = this.currentIdTokenResult$.pipe(filterMaybe());
148
+ currentClaims$ = this.currentIdTokenResult$.pipe(map((x) => (x ? x.claims : null)), distinctUntilChanged(), shareReplay(1));
149
+ claims$ = this.currentClaims$.pipe(filterMaybe());
150
+ currentAuthContextInfo$ = this.currentAuthUser$.pipe(switchMap((x) => this.loadAuthContextInfoForUser(x)), shareReplay(1));
151
+ authContextInfo$ = this.currentAuthContextInfo$.pipe(filterMaybe());
152
+ authUserState$ = (() => {
153
+ const delegateAuthUserStateObs = this.delegate.authUserStateObs(this).pipe(catchError(() => of('error')), distinctUntilChanged(), shareReplay(1));
154
+ let obs;
155
+ if (this.delegate.fullControlOfAuthUserState) {
156
+ obs = delegateAuthUserStateObs;
158
157
  }
159
158
  else {
160
- this.authUserState$ = this._authState$.pipe(distinctUntilChanged(), switchMap((x) => {
159
+ obs = this._authState$.pipe(distinctUntilChanged(), switchMap((x) => {
161
160
  if (x != null) {
162
161
  return delegateAuthUserStateObs;
163
162
  }
@@ -166,11 +165,12 @@ class DbxFirebaseAuthService {
166
165
  }
167
166
  }));
168
167
  }
169
- this.authRoles$ = delegate.authRolesObs(this);
170
- this.isOnboarded$ = delegate.isOnboarded(this);
171
- this._authRoleClaimsService = delegate.authRoleClaimsService;
172
- this.isAdminInAuthRoleSet = delegate.isAdminInAuthRoleSet;
173
- }
168
+ return obs;
169
+ })();
170
+ authRoles$ = this.delegate.authRolesObs(this);
171
+ isOnboarded$ = this.delegate.isOnboarded(this);
172
+ _authRoleClaimsService = this.delegate.authRoleClaimsService;
173
+ isAdminInAuthRoleSet = this.delegate.isAdminInAuthRoleSet;
174
174
  async refreshToken() {
175
175
  const user = this.firebaseAuth.currentUser;
176
176
  if (!user) {
@@ -251,25 +251,26 @@ class DbxFirebaseAuthService {
251
251
  }
252
252
  })));
253
253
  }
254
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthService, deps: [{ token: i1.Auth }, { token: DbxFirebaseAuthServiceDelegate, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
255
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthService }); }
254
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
255
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthService });
256
256
  }
257
257
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthService, decorators: [{
258
258
  type: Injectable
259
- }], ctorParameters: function () { return [{ type: i1.Auth }, { type: DbxFirebaseAuthServiceDelegate, decorators: [{
260
- type: Optional
261
- }] }]; } });
259
+ }] });
262
260
  /**
263
261
  * FirebaseAuthContextInfo implementation from DbxFirebaseAuthService.
264
262
  */
265
263
  class DbxFirebaseAuthContextInfo {
264
+ service;
265
+ user;
266
+ jwtToken;
267
+ _token = cachedGetter(() => firebaseAuthTokenFromUser(this.user));
268
+ _roles = cachedGetter(() => this.service.rolesForClaims(this.getClaims()));
269
+ _isAdmin = cachedGetter(() => this.service.isAdminInAuthRoleSet(this._roles()));
266
270
  constructor(service, user, jwtToken) {
267
271
  this.service = service;
268
272
  this.user = user;
269
273
  this.jwtToken = jwtToken;
270
- this._token = cachedGetter(() => firebaseAuthTokenFromUser(this.user));
271
- this._roles = cachedGetter(() => this.service.rolesForClaims(this.getClaims()));
272
- this._isAdmin = cachedGetter(() => this.service.isAdminInAuthRoleSet(this._roles()));
273
274
  }
274
275
  get uid() {
275
276
  return this.user.uid;
@@ -301,50 +302,46 @@ const DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY = (authUserInfo) =>
301
302
  * DbxAnalyticsUserSource implementation that uses the DbxFirebaseAuthService.
302
303
  */
303
304
  class DbxFirebaseAnalyticsUserSource {
304
- constructor(dbxFirebaseAuthService) {
305
- this.dbxFirebaseAuthService = dbxFirebaseAuthService;
306
- this._userPropertiesFactory = new BehaviorSubject(DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY);
307
- this.analyticsUser$ = combineLatest([this._userPropertiesFactory, this.dbxFirebaseAuthService.currentAuthUserInfo$]).pipe(switchMap(([userPropertiesFactory, x]) => {
308
- let analyticsUser;
309
- if (x != null) {
310
- analyticsUser = userPropertiesFactory(x).pipe(map((properties) => ({
311
- user: x.uid,
312
- properties
313
- })));
314
- }
315
- else {
316
- analyticsUser = of(null);
317
- }
318
- return analyticsUser;
319
- }), shareReplay(1));
320
- }
305
+ dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
306
+ _userPropertiesFactory = new BehaviorSubject(DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY);
307
+ analyticsUser$ = combineLatest([this._userPropertiesFactory, this.dbxFirebaseAuthService.currentAuthUserInfo$]).pipe(switchMap(([userPropertiesFactory, x]) => {
308
+ let analyticsUser;
309
+ if (x != null) {
310
+ analyticsUser = userPropertiesFactory(x).pipe(map((properties) => ({
311
+ user: x.uid,
312
+ properties
313
+ })));
314
+ }
315
+ else {
316
+ analyticsUser = of(null);
317
+ }
318
+ return analyticsUser;
319
+ }), shareReplay(1));
321
320
  get userPropertiesFactory() {
322
321
  return this._userPropertiesFactory.value;
323
322
  }
324
323
  set userPropertiesFactory(userPropertiesFactory) {
325
324
  this._userPropertiesFactory.next(userPropertiesFactory);
326
325
  }
327
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserSource, deps: [{ token: DbxFirebaseAuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
328
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserSource, providedIn: 'root' }); }
326
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
327
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserSource, providedIn: 'root' });
329
328
  }
330
329
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserSource, decorators: [{
331
330
  type: Injectable,
332
331
  args: [{
333
332
  providedIn: 'root'
334
333
  }]
335
- }], ctorParameters: function () { return [{ type: DbxFirebaseAuthService }]; } });
334
+ }] });
336
335
 
337
336
  /**
338
337
  * Service that listens for DbxFirebaseAuthService changes and emits them a user events.
339
338
  */
340
339
  class DbxFirebaseAnalyticsUserEventsListener {
341
- constructor(dbxFirebaseAuthService, dbxFirebaseAnalyticsUserSource, dbxAnalyticsService) {
342
- this.dbxFirebaseAuthService = dbxFirebaseAuthService;
343
- this.dbxFirebaseAnalyticsUserSource = dbxFirebaseAnalyticsUserSource;
344
- this.dbxAnalyticsService = dbxAnalyticsService;
345
- this._loginSub = new SubscriptionObject();
346
- this._logoutSub = new SubscriptionObject();
347
- }
340
+ dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
341
+ dbxFirebaseAnalyticsUserSource = inject(DbxFirebaseAnalyticsUserSource);
342
+ dbxAnalyticsService = inject(DbxAnalyticsService);
343
+ _loginSub = new SubscriptionObject();
344
+ _logoutSub = new SubscriptionObject();
348
345
  init() {
349
346
  this._loginSub.subscription = this.dbxFirebaseAuthService.onLogIn$.subscribe(() => {
350
347
  this.dbxFirebaseAnalyticsUserSource.analyticsUser$.pipe(filterMaybe(), first()).subscribe((analyticsUser) => {
@@ -359,15 +356,15 @@ class DbxFirebaseAnalyticsUserEventsListener {
359
356
  this._loginSub.destroy();
360
357
  this._logoutSub.destroy();
361
358
  }
362
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserEventsListener, deps: [{ token: DbxFirebaseAuthService }, { token: DbxFirebaseAnalyticsUserSource }, { token: i3.DbxAnalyticsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
363
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserEventsListener, providedIn: 'root' }); }
359
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserEventsListener, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
360
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserEventsListener, providedIn: 'root' });
364
361
  }
365
362
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAnalyticsUserEventsListener, decorators: [{
366
363
  type: Injectable,
367
364
  args: [{
368
365
  providedIn: 'root'
369
366
  }]
370
- }], ctorParameters: function () { return [{ type: DbxFirebaseAuthService }, { type: DbxFirebaseAnalyticsUserSource }, { type: i3.DbxAnalyticsService }]; } });
367
+ }] });
371
368
 
372
369
  /**
373
370
  * Enables debug token generation for AppCheck by setting FIREBASE_APPCHECK_DEBUG_TOKEN in the browser's self/window.
@@ -386,12 +383,12 @@ const DBX_FIREBASE_OPTIONS_TOKEN = new InjectionToken('DbxFirebaseOptions');
386
383
  * HTTP Interceptor that sets the X-Firebase-AppCheck for any requests to the routes configured in DbxFirebaseOptions.
387
384
  */
388
385
  class DbxFirebaseAppCheckHttpInterceptor {
389
- constructor(dbxFirebaseOptions, appCheck) {
390
- this.dbxFirebaseOptions = dbxFirebaseOptions;
391
- this.appCheck = appCheck;
386
+ appCheck = inject(AppCheck);
387
+ _appCheckRoutes = ((dbxFirebaseOptions) => {
388
+ const { appCheck } = dbxFirebaseOptions;
392
389
  let routes = [];
393
- if (appCheck != null) {
394
- routes = (this.dbxFirebaseOptions.appCheck?.appCheckRoutes ?? ['/api/*']).map((route) => {
390
+ if (appCheck?.disabled !== false) {
391
+ routes = (appCheck?.appCheckRoutes ?? ['/api/*']).map((route) => {
395
392
  const wildcardIndex = route.indexOf('*');
396
393
  const isWildcard = wildcardIndex === route.length - 1;
397
394
  const match = isWildcard ? route.substring(0, wildcardIndex) : route;
@@ -401,9 +398,9 @@ class DbxFirebaseAppCheckHttpInterceptor {
401
398
  };
402
399
  });
403
400
  }
404
- this._appCheckRoutes = routes;
405
- this._isEnabled = routes.length > 0;
406
- }
401
+ return routes;
402
+ })(inject(DBX_FIREBASE_OPTIONS_TOKEN));
403
+ _isEnabled = this._appCheckRoutes.length > 0;
407
404
  intercept(req, next) {
408
405
  let obs;
409
406
  if (this._isEnabled) {
@@ -444,39 +441,34 @@ class DbxFirebaseAppCheckHttpInterceptor {
444
441
  }
445
442
  return from(this._appCheckRoutes).pipe(first((route) => isEnabledRouteMatch(route), false), map((x) => Boolean(x)));
446
443
  }
447
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor, deps: [{ token: DBX_FIREBASE_OPTIONS_TOKEN }, { token: i1$1.AppCheck }], target: i0.ɵɵFactoryTarget.Injectable }); }
448
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor }); }
444
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
445
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor });
449
446
  }
450
447
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor, decorators: [{
451
448
  type: Injectable
452
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
453
- type: Inject,
454
- args: [DBX_FIREBASE_OPTIONS_TOKEN]
455
- }] }, { type: i1$1.AppCheck }]; } });
449
+ }] });
456
450
 
457
451
  class DbxFirebaseLoginTermsConfig {
458
452
  }
459
453
 
460
454
  class DbxFirebaseLoginTermsSimpleComponent {
461
- constructor(dbxFirebaseLoginTermsConfig) {
462
- this.dbxFirebaseLoginTermsConfig = dbxFirebaseLoginTermsConfig;
463
- this.tosAnchor = {
464
- url: this.dbxFirebaseLoginTermsConfig.tosUrl,
465
- target: '_blank'
466
- };
467
- this.privacyAnchor = {
468
- url: this.dbxFirebaseLoginTermsConfig.privacyUrl,
469
- target: '_blank'
470
- };
471
- }
472
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTermsSimpleComponent, deps: [{ token: DbxFirebaseLoginTermsConfig }], target: i0.ɵɵFactoryTarget.Component }); }
473
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginTermsSimpleComponent, selector: "ng-component", ngImport: i0, template: `
455
+ dbxFirebaseLoginTermsConfig = inject(DbxFirebaseLoginTermsConfig);
456
+ tosAnchor = {
457
+ url: this.dbxFirebaseLoginTermsConfig.tosUrl,
458
+ target: '_blank'
459
+ };
460
+ privacyAnchor = {
461
+ url: this.dbxFirebaseLoginTermsConfig.privacyUrl,
462
+ target: '_blank'
463
+ };
464
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTermsSimpleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
465
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginTermsSimpleComponent, selector: "ng-component", ngImport: i0, template: `
474
466
  <div class="dbx-firebase-login-terms-view">
475
467
  <dbx-link [anchor]="tosAnchor">Terms</dbx-link>
476
468
  <span class="dbx-link-spacer"></span>
477
469
  <dbx-link [anchor]="privacyAnchor">Privacy</dbx-link>
478
470
  </div>
479
- `, isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }] }); }
471
+ `, isInline: true, dependencies: [{ kind: "component", type: i1.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }] });
480
472
  }
481
473
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTermsSimpleComponent, decorators: [{
482
474
  type: Component,
@@ -489,7 +481,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
489
481
  </div>
490
482
  `
491
483
  }]
492
- }], ctorParameters: function () { return [{ type: DbxFirebaseLoginTermsConfig }]; } });
484
+ }] });
493
485
 
494
486
  const DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG = {
495
487
  minLength: 6
@@ -507,12 +499,13 @@ const DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN = new InjectionToken('De
507
499
  * Default providers can be configured by the DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN injectable value.
508
500
  */
509
501
  class DbxFirebaseAuthLoginService {
510
- constructor(defaultProviders, passwordConfig, termsComponentClass = DbxFirebaseLoginTermsSimpleComponent) {
511
- this.termsComponentClass = termsComponentClass;
512
- this._enableAll = false;
513
- this._providers = new Map();
514
- this._assets = new Map();
515
- this._enabled = new Set();
502
+ termsComponentClass = inject(DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN) ?? DbxFirebaseLoginTermsSimpleComponent;
503
+ _enableAll = false;
504
+ _passwordConfig;
505
+ _providers = new Map();
506
+ _assets = new Map();
507
+ _enabled = new Set();
508
+ constructor(defaultProviders, passwordConfig) {
516
509
  if (defaultProviders) {
517
510
  defaultProviders.forEach((x) => this.register(x, false));
518
511
  }
@@ -599,8 +592,8 @@ class DbxFirebaseAuthLoginService {
599
592
  setPasswordConfig(passwordConfig) {
600
593
  this._passwordConfig = passwordConfig;
601
594
  }
602
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthLoginService, deps: [{ token: DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, optional: true }, { token: DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, optional: true }, { token: DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
603
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthLoginService, providedIn: 'root' }); }
595
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthLoginService, deps: [{ token: DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, optional: true }, { token: DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
596
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthLoginService, providedIn: 'root' });
604
597
  }
605
598
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthLoginService, decorators: [{
606
599
  type: Injectable,
@@ -617,11 +610,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
617
610
  }, {
618
611
  type: Inject,
619
612
  args: [DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN]
620
- }] }, { type: i0.Type, decorators: [{
621
- type: Optional
622
- }, {
623
- type: Inject,
624
- args: [DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN]
625
613
  }] }]; } });
626
614
 
627
615
  /**
@@ -634,15 +622,7 @@ class DbxFirebaseLoginContext extends DbxInjectionContext {
634
622
  * Login button and action.
635
623
  */
636
624
  class DbxFirebaseLoginButtonComponent {
637
- constructor() {
638
- this.handleAction = () => {
639
- const loginPromise = this.config.handleLogin();
640
- return from(loginPromise);
641
- };
642
- this.onActionSuccess = () => {
643
- // todo: show checkmark on success?
644
- };
645
- }
625
+ config;
646
626
  get iconUrl() {
647
627
  return this.config?.iconUrl;
648
628
  }
@@ -658,8 +638,15 @@ class DbxFirebaseLoginButtonComponent {
658
638
  get buttonTextColor() {
659
639
  return this.config?.buttonTextColor;
660
640
  }
661
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
662
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: { config: "config" }, host: { classAttribute: "dbx-firebase-login-button" }, ngImport: i0, template: `
641
+ handleAction = () => {
642
+ const loginPromise = this.config.handleLogin();
643
+ return from(loginPromise);
644
+ };
645
+ onActionSuccess = () => {
646
+ // todo: show checkmark on success?
647
+ };
648
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
649
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: { config: "config" }, host: { classAttribute: "dbx-firebase-login-button" }, ngImport: i0, template: `
663
650
  <ng-container dbxAction [dbxActionHandler]="handleAction" dbxActionValue [dbxActionSuccessHandler]="onActionSuccess">
664
651
  <dbx-button dbxActionButton [customTextColor]="buttonTextColor" [customButtonColor]="buttonColor" [raised]="true">
665
652
  <div class="dbx-firebase-login-button-content">
@@ -671,7 +658,7 @@ class DbxFirebaseLoginButtonComponent {
671
658
  </div>
672
659
  </dbx-button>
673
660
  </ng-container>
674
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2$2.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i2$2.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "directive", type: i2$2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1$2.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }] }); }
661
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i3.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i3.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i3.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "directive", type: i3.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }] });
675
662
  }
676
663
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginButtonComponent, decorators: [{
677
664
  type: Component,
@@ -698,12 +685,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
698
685
  type: Input
699
686
  }] } });
700
687
  class DbxFirebaseLoginButtonContainerComponent {
701
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginButtonContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
702
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container", ngImport: i0, template: `
688
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginButtonContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
689
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container", ngImport: i0, template: `
703
690
  <div class="dbx-firebase-login-button-container">
704
691
  <ng-content></ng-content>
705
692
  </div>
706
- `, isInline: true }); }
693
+ `, isInline: true });
707
694
  }
708
695
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginButtonContainerComponent, decorators: [{
709
696
  type: Component,
@@ -722,11 +709,10 @@ const DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE = `
722
709
  </dbx-firebase-login-button-container>
723
710
  `;
724
711
  class AbstractConfiguredDbxFirebaseLoginButtonDirective {
725
- constructor(dbxFirebaseAuthService, dbxFirebaseAuthLoginService, dbxFirebaseLoginContext) {
726
- this.dbxFirebaseAuthService = dbxFirebaseAuthService;
727
- this.dbxFirebaseAuthLoginService = dbxFirebaseAuthLoginService;
728
- this.dbxFirebaseLoginContext = dbxFirebaseLoginContext;
729
- }
712
+ dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
713
+ dbxFirebaseAuthLoginService = inject(DbxFirebaseAuthLoginService);
714
+ dbxFirebaseLoginContext = inject(DbxFirebaseLoginContext);
715
+ _config;
730
716
  ngOnInit() {
731
717
  const assets = this.assetConfig;
732
718
  this._config = {
@@ -747,23 +733,20 @@ class AbstractConfiguredDbxFirebaseLoginButtonDirective {
747
733
  get config() {
748
734
  return this._config;
749
735
  }
750
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractConfiguredDbxFirebaseLoginButtonDirective, deps: [{ token: DbxFirebaseAuthService }, { token: DbxFirebaseAuthLoginService }, { token: DbxFirebaseLoginContext }], target: i0.ɵɵFactoryTarget.Directive }); }
751
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractConfiguredDbxFirebaseLoginButtonDirective, ngImport: i0 }); }
736
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractConfiguredDbxFirebaseLoginButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
737
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractConfiguredDbxFirebaseLoginButtonDirective, ngImport: i0 });
752
738
  }
753
739
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractConfiguredDbxFirebaseLoginButtonDirective, decorators: [{
754
740
  type: Directive
755
- }], ctorParameters: function () { return [{ type: DbxFirebaseAuthService }, { type: DbxFirebaseAuthLoginService }, { type: DbxFirebaseLoginContext }]; } });
741
+ }] });
756
742
 
757
743
  class DbxFirebaseLoginAppleComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
758
- constructor() {
759
- super(...arguments);
760
- this.loginProvider = 'apple';
761
- }
744
+ loginProvider = 'apple';
762
745
  handleLogin() {
763
746
  return this.dbxFirebaseAuthService.logInWithApple();
764
747
  }
765
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginAppleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
766
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginAppleComponent, selector: "dbx-firebase-login-apple", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
748
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginAppleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
749
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginAppleComponent, selector: "dbx-firebase-login-apple", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
767
750
  }
768
751
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginAppleComponent, decorators: [{
769
752
  type: Component,
@@ -777,15 +760,12 @@ const DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY = 'default';
777
760
  const OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY = 'oauth';
778
761
 
779
762
  class DbxFirebaseLoginAnonymousComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
780
- constructor() {
781
- super(...arguments);
782
- this.loginProvider = 'anonymous';
783
- }
763
+ loginProvider = 'anonymous';
784
764
  handleLogin() {
785
765
  return this.dbxFirebaseAuthService.logInAsAnonymous();
786
766
  }
787
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginAnonymousComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
788
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginAnonymousComponent, selector: "dbx-firebase-login-anonymous", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
767
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginAnonymousComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
768
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginAnonymousComponent, selector: "dbx-firebase-login-anonymous", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
789
769
  }
790
770
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginAnonymousComponent, decorators: [{
791
771
  type: Component,
@@ -799,13 +779,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
799
779
  * DbxFirebaseLoginContext implementation.
800
780
  */
801
781
  class DbxFirebaseLoginContextDirective extends AbstractForwardDbxInjectionContextDirective {
802
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginContextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
803
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginContextDirective, selector: "[dbxFirebaseLoginContext]", providers: [
782
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginContextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
783
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginContextDirective, selector: "[dbxFirebaseLoginContext]", providers: [
804
784
  {
805
785
  provide: DbxFirebaseLoginContext,
806
786
  useExisting: DbxFirebaseLoginContextDirective
807
787
  }
808
- ], usesInheritance: true, ngImport: i0 }); }
788
+ ], usesInheritance: true, ngImport: i0 });
809
789
  }
810
790
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginContextDirective, decorators: [{
811
791
  type: Directive,
@@ -824,31 +804,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
824
804
  * Pre-configured login component that displays all configured login types.
825
805
  */
826
806
  class DbxFirebaseLoginListComponent {
827
- constructor(dbxFirebaseAuthLoginService) {
828
- this.dbxFirebaseAuthLoginService = dbxFirebaseAuthLoginService;
829
- this._loginMode = new BehaviorSubject('login');
830
- this._inputProviderCategories = new BehaviorSubject(undefined);
831
- this._omitProviderTypes = new BehaviorSubject(undefined);
832
- this._inputProviderTypes = new BehaviorSubject(undefined);
833
- this.providerTypes$ = combineLatest([this._inputProviderTypes, this._omitProviderTypes]).pipe(map(([providerTypes, omitProviderTypes]) => {
834
- const baseTypes = providerTypes ? asArray(providerTypes) : this.dbxFirebaseAuthLoginService.getEnabledTypes();
835
- const types = omitProviderTypes ? excludeValuesFromArray(baseTypes, asArray(omitProviderTypes)) : baseTypes;
836
- return types;
837
- }), shareReplay(1));
838
- this.providers$ = combineLatest([this.providerTypes$, this._inputProviderCategories]).pipe(map(([x, inputProviderCategories]) => {
839
- const providerCategories = asArray(inputProviderCategories);
840
- let providers = this.dbxFirebaseAuthLoginService.getLoginProviders(x);
841
- if (providerCategories.length) {
842
- const categories = new Set(providerCategories);
843
- providers = providers.filter((x) => containsStringAnyCase(categories, x.category ?? ''));
844
- }
845
- return providers;
846
- }));
847
- this.providerInjectionConfigs$ = combineLatest([this._loginMode, this.providers$]).pipe(map(([mode, providers]) => {
848
- const mapFn = mode === 'register' ? (x) => ({ componentClass: x.registrationComponentClass ?? x.componentClass }) : (x) => ({ componentClass: x.componentClass });
849
- return providers.map(mapFn);
850
- }));
851
- }
807
+ dbxFirebaseAuthLoginService = inject(DbxFirebaseAuthLoginService);
808
+ _loginMode = new BehaviorSubject('login');
809
+ _inputProviderCategories = new BehaviorSubject(undefined);
810
+ _omitProviderTypes = new BehaviorSubject(undefined);
811
+ _inputProviderTypes = new BehaviorSubject(undefined);
812
+ providerTypes$ = combineLatest([this._inputProviderTypes, this._omitProviderTypes]).pipe(map(([providerTypes, omitProviderTypes]) => {
813
+ const baseTypes = providerTypes ? asArray(providerTypes) : this.dbxFirebaseAuthLoginService.getEnabledTypes();
814
+ const types = omitProviderTypes ? excludeValuesFromArray(baseTypes, asArray(omitProviderTypes)) : baseTypes;
815
+ return types;
816
+ }), shareReplay(1));
817
+ providers$ = combineLatest([this.providerTypes$, this._inputProviderCategories]).pipe(map(([x, inputProviderCategories]) => {
818
+ const providerCategories = asArray(inputProviderCategories);
819
+ let providers = this.dbxFirebaseAuthLoginService.getLoginProviders(x);
820
+ if (providerCategories.length) {
821
+ const categories = new Set(providerCategories);
822
+ providers = providers.filter((x) => containsStringAnyCase(categories, x.category ?? ''));
823
+ }
824
+ return providers;
825
+ }));
826
+ providerInjectionConfigs$ = combineLatest([this._loginMode, this.providers$]).pipe(map(([mode, providers]) => {
827
+ const mapFn = mode === 'register' ? (x) => ({ componentClass: x.registrationComponentClass ?? x.componentClass }) : (x) => ({ componentClass: x.componentClass });
828
+ return providers.map(mapFn);
829
+ }));
852
830
  ngOnDestroy() {
853
831
  this._loginMode.complete();
854
832
  this._inputProviderCategories.complete();
@@ -867,12 +845,12 @@ class DbxFirebaseLoginListComponent {
867
845
  set providerCategories(providerCategories) {
868
846
  this._inputProviderCategories.next(providerCategories);
869
847
  }
870
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginListComponent, deps: [{ token: DbxFirebaseAuthLoginService }], target: i0.ɵɵFactoryTarget.Component }); }
871
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginListComponent, selector: "dbx-firebase-login-list", inputs: { loginMode: "loginMode", providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, host: { classAttribute: "dbx-firebase-login-list" }, ngImport: i0, template: `
848
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
849
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginListComponent, selector: "dbx-firebase-login-list", inputs: { loginMode: "loginMode", providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, host: { classAttribute: "dbx-firebase-login-list" }, ngImport: i0, template: `
872
850
  <div class="dbx-firebase-login-item" *ngFor="let config of providerInjectionConfigs$ | async">
873
851
  <dbx-injection [config]="config"></dbx-injection>
874
852
  </div>
875
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
853
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
876
854
  }
877
855
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginListComponent, decorators: [{
878
856
  type: Component,
@@ -887,7 +865,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
887
865
  class: 'dbx-firebase-login-list'
888
866
  }
889
867
  }]
890
- }], ctorParameters: function () { return [{ type: DbxFirebaseAuthLoginService }]; }, propDecorators: { loginMode: [{
868
+ }], propDecorators: { loginMode: [{
891
869
  type: Input
892
870
  }], providerTypes: [{
893
871
  type: Input
@@ -901,15 +879,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
901
879
  * Pre-configured login component that displays all configured login types.
902
880
  */
903
881
  class DbxFirebaseLoginComponent {
904
- constructor() {
905
- this.loginMode = 'login';
906
- }
907
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
908
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginComponent, selector: "dbx-firebase-login", inputs: { loginMode: "loginMode", providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, host: { properties: { "class": "{ \"dbx-firebase-register\": loginMode === \"register\" }" }, classAttribute: "d-block dbx-firebase-login" }, ngImport: i0, template: `
882
+ loginMode = 'login';
883
+ providerTypes;
884
+ omitProviderTypes;
885
+ providerCategories;
886
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
887
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginComponent, selector: "dbx-firebase-login", inputs: { loginMode: "loginMode", providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, host: { properties: { "class": "{ \"dbx-firebase-register\": loginMode === \"register\" }" }, classAttribute: "d-block dbx-firebase-login" }, ngImport: i0, template: `
909
888
  <ng-container *dbxInjectionContext dbxFirebaseLoginContext>
910
889
  <dbx-firebase-login-list [providerTypes]="providerTypes" [omitProviderTypes]="omitProviderTypes" [providerCategories]="providerCategories" [loginMode]="loginMode"></dbx-firebase-login-list>
911
890
  </ng-container>
912
- `, isInline: true, dependencies: [{ kind: "directive", type: i2$2.DbxInjectionContextDirective, selector: "[dbxInjectionContext]", inputs: ["config"] }, { kind: "directive", type: DbxFirebaseLoginContextDirective, selector: "[dbxFirebaseLoginContext]" }, { kind: "component", type: DbxFirebaseLoginListComponent, selector: "dbx-firebase-login-list", inputs: ["loginMode", "providerTypes", "omitProviderTypes", "providerCategories"] }] }); }
891
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3.DbxInjectionContextDirective, selector: "[dbxInjectionContext]", inputs: ["config"] }, { kind: "directive", type: DbxFirebaseLoginContextDirective, selector: "[dbxFirebaseLoginContext]" }, { kind: "component", type: DbxFirebaseLoginListComponent, selector: "dbx-firebase-login-list", inputs: ["loginMode", "providerTypes", "omitProviderTypes", "providerCategories"] }] });
913
892
  }
914
893
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginComponent, decorators: [{
915
894
  type: Component,
@@ -936,14 +915,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
936
915
  }] } });
937
916
 
938
917
  class DbxFirebaseEmailFormComponent extends AbstractAsyncFormlyFormDirective {
939
- constructor() {
940
- super(...arguments);
941
- this._config = new BehaviorSubject({ loginMode: 'login' });
942
- this.fields$ = this._config.pipe(map(({ loginMode = 'login', passwordConfig }) => {
943
- const fields = usernamePasswordLoginFields({ username: 'email', password: passwordConfig, verifyPassword: loginMode === 'register' });
944
- return fields;
945
- }));
946
- }
918
+ _config = new BehaviorSubject({ loginMode: 'login' });
919
+ fields$ = this._config.pipe(map(({ loginMode = 'login', passwordConfig }) => {
920
+ const fields = usernamePasswordLoginFields({ username: 'email', password: passwordConfig, verifyPassword: loginMode === 'register' });
921
+ return fields;
922
+ }));
947
923
  set config(config) {
948
924
  this._config.next(config);
949
925
  }
@@ -951,10 +927,10 @@ class DbxFirebaseEmailFormComponent extends AbstractAsyncFormlyFormDirective {
951
927
  super.ngOnDestroy();
952
928
  this._config.complete();
953
929
  }
954
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmailFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
955
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: { config: "config" }, providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
930
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmailFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
931
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: { config: "config" }, providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
956
932
  <dbx-formly></dbx-formly>
957
- `, isInline: true, dependencies: [{ kind: "component", type: i1$3.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] }); }
933
+ `, isInline: true, dependencies: [{ kind: "component", type: i4.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
958
934
  }
959
935
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmailFormComponent, decorators: [{
960
936
  type: Component,
@@ -970,14 +946,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
970
946
  }] } });
971
947
 
972
948
  class DbxFirebaseEmailRecoveryFormComponent extends AbstractSyncFormlyFormDirective {
973
- constructor() {
974
- super(...arguments);
975
- this.fields = [emailField({ required: true })];
976
- }
977
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
978
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
949
+ fields = [emailField({ required: true })];
950
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
951
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
979
952
  <dbx-formly></dbx-formly>
980
- `, isInline: true, dependencies: [{ kind: "component", type: i1$3.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] }); }
953
+ `, isInline: true, dependencies: [{ kind: "component", type: i4.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
981
954
  }
982
955
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, decorators: [{
983
956
  type: Component,
@@ -991,47 +964,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
991
964
  }] });
992
965
 
993
966
  class DbxFirebaseLoginEmailContentComponent {
994
- constructor(dbxFirebaseAuthService, config) {
995
- this.dbxFirebaseAuthService = dbxFirebaseAuthService;
996
- this.config = config;
997
- this.formConfig = {
998
- loginMode: this.config.loginMode,
999
- passwordConfig: this.config.passwordConfig
1000
- };
1001
- this._emailMode = new BehaviorSubject('login');
1002
- this.emailMode$ = this._emailMode.asObservable();
1003
- this.forgotAnchor = {
1004
- onClick: () => {
1005
- this.openRecovery();
1006
- }
1007
- };
1008
- this.doneOrCancelled = new EventEmitter();
1009
- this.handleLoginAction = (value) => {
1010
- this.emailFormValue = value;
1011
- this.recoveryFormValue = { email: value.username }; // cache value for recovery
1012
- let result;
1013
- if (this.loginMode === 'register') {
1014
- result = this.dbxFirebaseAuthService.registerWithEmailAndPassword(value.username, value.password);
1015
- }
1016
- else {
1017
- result = this.dbxFirebaseAuthService.logInWithEmailAndPassword(value.username, value.password).catch((error) => {
1018
- throw firebaseAuthErrorToReadableError(error);
1019
- });
1020
- }
1021
- return from(result).pipe(tap(() => {
1022
- this.doneOrCancelled.next(true);
1023
- }));
1024
- };
1025
- this.handleRecoveryAction = (value, context) => {
1026
- this.recoveryFormValue = value;
1027
- this.emailFormValue = { username: value.email, password: '' };
1028
- context.startWorkingWithPromise(this.dbxFirebaseAuthService.sendPasswordResetEmail(value.email));
1029
- };
1030
- // MARK: Recovering
1031
- this.handleRecoverySuccess = (x) => {
1032
- this._emailMode.next('recoversent');
1033
- };
1034
- }
967
+ dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
968
+ config = inject(DBX_INJECTION_COMPONENT_DATA);
969
+ formConfig = {
970
+ loginMode: this.config.loginMode,
971
+ passwordConfig: this.config.passwordConfig
972
+ };
973
+ emailFormValue;
974
+ recoveryFormValue;
975
+ _emailMode = new BehaviorSubject('login');
976
+ emailMode$ = this._emailMode.asObservable();
977
+ forgotAnchor = {
978
+ onClick: () => {
979
+ this.openRecovery();
980
+ }
981
+ };
982
+ doneOrCancelled = new EventEmitter();
1035
983
  static openEmailLoginContext(dbxFirebaseLoginContext, config) {
1036
984
  return dbxFirebaseLoginContext.showContext({
1037
985
  config: {
@@ -1056,10 +1004,35 @@ class DbxFirebaseLoginEmailContentComponent {
1056
1004
  get buttonText() {
1057
1005
  return this.config.loginMode === 'register' ? 'Register' : 'Log In';
1058
1006
  }
1007
+ handleLoginAction = (value) => {
1008
+ this.emailFormValue = value;
1009
+ this.recoveryFormValue = { email: value.username }; // cache value for recovery
1010
+ let result;
1011
+ if (this.loginMode === 'register') {
1012
+ result = this.dbxFirebaseAuthService.registerWithEmailAndPassword(value.username, value.password);
1013
+ }
1014
+ else {
1015
+ result = this.dbxFirebaseAuthService.logInWithEmailAndPassword(value.username, value.password).catch((error) => {
1016
+ throw firebaseAuthErrorToReadableError(error);
1017
+ });
1018
+ }
1019
+ return from(result).pipe(tap(() => {
1020
+ this.doneOrCancelled.next(true);
1021
+ }));
1022
+ };
1059
1023
  // MARK: Recovery
1060
1024
  openRecovery() {
1061
1025
  this._emailMode.next('recover');
1062
1026
  }
1027
+ handleRecoveryAction = (value, context) => {
1028
+ this.recoveryFormValue = value;
1029
+ this.emailFormValue = { username: value.email, password: '' };
1030
+ context.startWorkingWithPromise(this.dbxFirebaseAuthService.sendPasswordResetEmail(value.email));
1031
+ };
1032
+ // MARK: Recovering
1033
+ handleRecoverySuccess = (x) => {
1034
+ this._emailMode.next('recoversent');
1035
+ };
1063
1036
  clickedRecoveryAcknowledged() {
1064
1037
  this._emailMode.next('login');
1065
1038
  }
@@ -1070,27 +1043,21 @@ class DbxFirebaseLoginEmailContentComponent {
1070
1043
  onCancelReset() {
1071
1044
  this.doneOrCancelled.next(false);
1072
1045
  }
1073
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginEmailContentComponent, deps: [{ token: DbxFirebaseAuthService }, { token: DBX_INJECTION_COMPONENT_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
1074
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginEmailContentComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"dbx-firebase-login-email-content\">\n <ng-container [ngSwitch]=\"emailMode$ | async\">\n <ng-container *ngSwitchCase=\"'login'\">\n <ng-container *ngTemplateOutlet=\"loginView\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recover'\">\n <ng-container *ngTemplateOutlet=\"resetPassword\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recoversent'\">\n <ng-container *ngTemplateOutlet=\"resetPasswordSent\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Login View -->\n<ng-template #loginView>\n <ng-container dbxAction [dbxActionHandler]=\"handleLoginAction\">\n <dbx-firebase-email-form [config]=\"formConfig\" dbxActionForm [dbxFormSource]=\"emailFormValue\"></dbx-firebase-email-form>\n <div class=\"dbx-firebase-login-email-forgot-prompt\" *ngIf=\"isLoginMode\">\n <dbx-link [anchor]=\"forgotAnchor\">Forgot Password?</dbx-link>\n </div>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" [text]=\"buttonText\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancel()\">Cancel</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n\n<!-- Reset Password View -->\n<ng-template #resetPassword>\n <div class=\"dbx-firebase-login-email-content-recovery\" dbxAction [dbxActionHandler]=\"handleRecoveryAction\" [dbxActionSuccessHandler]=\"handleRecoverySuccess\">\n <dbx-firebase-email-recovery-form dbxActionForm [dbxFormSource]=\"recoveryFormValue\"></dbx-firebase-email-recovery-form>\n <p class=\"dbx-hint\">An email will be sent to the above address to help you reset your password.</p>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" text=\"Send Recovery Email\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancelReset()\">Cancel Recovery</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </div>\n</ng-template>\n\n<!-- Reset Password Sent -->\n<ng-template #resetPasswordSent>\n <div class=\"dbx-firebase-login-email-content-recovery-sent\">\n <p class=\"dbx-hint\">A recovery email was sent to the specified address. Please check your email for next steps.</p>\n <button mat-raised-button (click)=\"clickedRecoveryAcknowledged()\">Ok</button>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1$2.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }, { kind: "directive", type: i1$3.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "directive", type: i1$3.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "dbxActionFormMapValue", "formDisabledOnWorking"] }, { kind: "component", type: i1$2.DbxReadableErrorComponent, selector: "dbx-error", inputs: ["error", "iconOnly"], outputs: ["popoverOpen"] }, { kind: "directive", type: i1$2.DbxActionErrorDirective, selector: "[dbxActionError]" }, { kind: "directive", type: i2$2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2$2.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "directive", type: i2$2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1$2.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i1$2.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: ["config"] }, { kind: "component", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
1046
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginEmailContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1047
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginEmailContentComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"dbx-firebase-login-email-content\">\n <ng-container [ngSwitch]=\"emailMode$ | async\">\n <ng-container *ngSwitchCase=\"'login'\">\n <ng-container *ngTemplateOutlet=\"loginView\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recover'\">\n <ng-container *ngTemplateOutlet=\"resetPassword\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recoversent'\">\n <ng-container *ngTemplateOutlet=\"resetPasswordSent\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Login View -->\n<ng-template #loginView>\n <ng-container dbxAction [dbxActionHandler]=\"handleLoginAction\">\n <dbx-firebase-email-form [config]=\"formConfig\" dbxActionForm [dbxFormSource]=\"emailFormValue\"></dbx-firebase-email-form>\n <div class=\"dbx-firebase-login-email-forgot-prompt\" *ngIf=\"isLoginMode\">\n <dbx-link [anchor]=\"forgotAnchor\">Forgot Password?</dbx-link>\n </div>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" [text]=\"buttonText\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancel()\">Cancel</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n\n<!-- Reset Password View -->\n<ng-template #resetPassword>\n <div class=\"dbx-firebase-login-email-content-recovery\" dbxAction [dbxActionHandler]=\"handleRecoveryAction\" [dbxActionSuccessHandler]=\"handleRecoverySuccess\">\n <dbx-firebase-email-recovery-form dbxActionForm [dbxFormSource]=\"recoveryFormValue\"></dbx-firebase-email-recovery-form>\n <p class=\"dbx-hint\">An email will be sent to the above address to help you reset your password.</p>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" text=\"Send Recovery Email\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancelReset()\">Cancel Recovery</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </div>\n</ng-template>\n\n<!-- Reset Password Sent -->\n<ng-template #resetPasswordSent>\n <div class=\"dbx-firebase-login-email-content-recovery-sent\">\n <p class=\"dbx-hint\">A recovery email was sent to the specified address. Please check your email for next steps.</p>\n <button mat-raised-button (click)=\"clickedRecoveryAcknowledged()\">Ok</button>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }, { kind: "directive", type: i4.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "directive", type: i4.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "dbxActionFormMapValue", "formDisabledOnWorking"] }, { kind: "component", type: i1.DbxReadableErrorComponent, selector: "dbx-error", inputs: ["error", "iconOnly"], outputs: ["popoverOpen"] }, { kind: "directive", type: i1.DbxActionErrorDirective, selector: "[dbxActionError]" }, { kind: "directive", type: i3.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i3.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i3.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { kind: "directive", type: i3.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: ["config"] }, { kind: "component", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
1075
1048
  }
1076
1049
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginEmailContentComponent, decorators: [{
1077
1050
  type: Component,
1078
1051
  args: [{ template: "<div class=\"dbx-firebase-login-email-content\">\n <ng-container [ngSwitch]=\"emailMode$ | async\">\n <ng-container *ngSwitchCase=\"'login'\">\n <ng-container *ngTemplateOutlet=\"loginView\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recover'\">\n <ng-container *ngTemplateOutlet=\"resetPassword\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'recoversent'\">\n <ng-container *ngTemplateOutlet=\"resetPasswordSent\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Login View -->\n<ng-template #loginView>\n <ng-container dbxAction [dbxActionHandler]=\"handleLoginAction\">\n <dbx-firebase-email-form [config]=\"formConfig\" dbxActionForm [dbxFormSource]=\"emailFormValue\"></dbx-firebase-email-form>\n <div class=\"dbx-firebase-login-email-forgot-prompt\" *ngIf=\"isLoginMode\">\n <dbx-link [anchor]=\"forgotAnchor\">Forgot Password?</dbx-link>\n </div>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" [text]=\"buttonText\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancel()\">Cancel</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n\n<!-- Reset Password View -->\n<ng-template #resetPassword>\n <div class=\"dbx-firebase-login-email-content-recovery\" dbxAction [dbxActionHandler]=\"handleRecoveryAction\" [dbxActionSuccessHandler]=\"handleRecoverySuccess\">\n <dbx-firebase-email-recovery-form dbxActionForm [dbxFormSource]=\"recoveryFormValue\"></dbx-firebase-email-recovery-form>\n <p class=\"dbx-hint\">An email will be sent to the above address to help you reset your password.</p>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" text=\"Send Recovery Email\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancelReset()\">Cancel Recovery</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </div>\n</ng-template>\n\n<!-- Reset Password Sent -->\n<ng-template #resetPasswordSent>\n <div class=\"dbx-firebase-login-email-content-recovery-sent\">\n <p class=\"dbx-hint\">A recovery email was sent to the specified address. Please check your email for next steps.</p>\n <button mat-raised-button (click)=\"clickedRecoveryAcknowledged()\">Ok</button>\n </div>\n</ng-template>\n" }]
1079
- }], ctorParameters: function () { return [{ type: DbxFirebaseAuthService }, { type: undefined, decorators: [{
1080
- type: Inject,
1081
- args: [DBX_INJECTION_COMPONENT_DATA]
1082
- }] }]; } });
1052
+ }] });
1083
1053
 
1084
1054
  class DbxFirebaseLoginEmailComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
1085
- constructor() {
1086
- super(...arguments);
1087
- this.loginProvider = 'email';
1088
- }
1055
+ loginProvider = 'email';
1089
1056
  handleLogin() {
1090
1057
  return DbxFirebaseLoginEmailContentComponent.openEmailLoginContext(this.dbxFirebaseLoginContext, { loginMode: 'login', passwordConfig: this.dbxFirebaseAuthLoginService.getPasswordConfig() });
1091
1058
  }
1092
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginEmailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1093
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginEmailComponent, selector: "dbx-firebase-login-email", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
1059
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginEmailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1060
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginEmailComponent, selector: "dbx-firebase-login-email", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
1094
1061
  }
1095
1062
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginEmailComponent, decorators: [{
1096
1063
  type: Component,
@@ -1101,15 +1068,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1101
1068
  }] });
1102
1069
 
1103
1070
  class DbxFirebaseLoginFacebookComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
1104
- constructor() {
1105
- super(...arguments);
1106
- this.loginProvider = 'facebook';
1107
- }
1071
+ loginProvider = 'facebook';
1108
1072
  handleLogin() {
1109
1073
  return this.dbxFirebaseAuthService.logInWithFacebook();
1110
1074
  }
1111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginFacebookComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1112
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginFacebookComponent, selector: "dbx-firebase-login-facebook", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
1075
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginFacebookComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1076
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginFacebookComponent, selector: "dbx-firebase-login-facebook", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
1113
1077
  }
1114
1078
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginFacebookComponent, decorators: [{
1115
1079
  type: Component,
@@ -1120,15 +1084,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1120
1084
  }] });
1121
1085
 
1122
1086
  class DbxFirebaseLoginGoogleComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
1123
- constructor() {
1124
- super(...arguments);
1125
- this.loginProvider = 'google';
1126
- }
1087
+ loginProvider = 'google';
1127
1088
  handleLogin() {
1128
1089
  return this.dbxFirebaseAuthService.logInWithGoogle();
1129
1090
  }
1130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginGoogleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginGoogleComponent, selector: "dbx-firebase-login-google", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
1091
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginGoogleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1092
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginGoogleComponent, selector: "dbx-firebase-login-google", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
1132
1093
  }
1133
1094
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginGoogleComponent, decorators: [{
1134
1095
  type: Component,
@@ -1142,10 +1103,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1142
1103
  * Pre-configured register component that displays all configured login types and their registration components.
1143
1104
  */
1144
1105
  class DbxFirebaseRegisterComponent {
1145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseRegisterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1146
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseRegisterComponent, selector: "dbx-firebase-register", inputs: { providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, ngImport: i0, template: `
1106
+ providerTypes;
1107
+ omitProviderTypes;
1108
+ providerCategories;
1109
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseRegisterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1110
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseRegisterComponent, selector: "dbx-firebase-register", inputs: { providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, ngImport: i0, template: `
1147
1111
  <dbx-firebase-login loginMode="register" [providerTypes]="providerTypes" [omitProviderTypes]="omitProviderTypes" [providerCategories]="providerCategories"></dbx-firebase-login>
1148
- `, isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginComponent, selector: "dbx-firebase-login", inputs: ["loginMode", "providerTypes", "omitProviderTypes", "providerCategories"] }] }); }
1112
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginComponent, selector: "dbx-firebase-login", inputs: ["loginMode", "providerTypes", "omitProviderTypes", "providerCategories"] }] });
1149
1113
  }
1150
1114
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseRegisterComponent, decorators: [{
1151
1115
  type: Component,
@@ -1164,15 +1128,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1164
1128
  }] } });
1165
1129
 
1166
1130
  class DbxFirebaseLoginGitHubComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
1167
- constructor() {
1168
- super(...arguments);
1169
- this.loginProvider = 'github';
1170
- }
1131
+ loginProvider = 'github';
1171
1132
  handleLogin() {
1172
1133
  return this.dbxFirebaseAuthService.logInWithGithub();
1173
1134
  }
1174
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginGitHubComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1175
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginGitHubComponent, selector: "dbx-firebase-login-github", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
1135
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginGitHubComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1136
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginGitHubComponent, selector: "dbx-firebase-login-github", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
1176
1137
  }
1177
1138
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginGitHubComponent, decorators: [{
1178
1139
  type: Component,
@@ -1183,15 +1144,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1183
1144
  }] });
1184
1145
 
1185
1146
  class DbxFirebaseLoginTwitterComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
1186
- constructor() {
1187
- super(...arguments);
1188
- this.loginProvider = 'twitter';
1189
- }
1147
+ loginProvider = 'twitter';
1190
1148
  handleLogin() {
1191
1149
  return this.dbxFirebaseAuthService.logInWithTwitter();
1192
1150
  }
1193
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTwitterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1194
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginTwitterComponent, selector: "dbx-firebase-login-twitter", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
1151
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTwitterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1152
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginTwitterComponent, selector: "dbx-firebase-login-twitter", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
1195
1153
  }
1196
1154
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTwitterComponent, decorators: [{
1197
1155
  type: Component,
@@ -1202,15 +1160,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1202
1160
  }] });
1203
1161
 
1204
1162
  class DbxFirebaseLoginMicrosoftComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
1205
- constructor() {
1206
- super(...arguments);
1207
- this.loginProvider = 'microsoft';
1208
- }
1163
+ loginProvider = 'microsoft';
1209
1164
  handleLogin() {
1210
1165
  return this.dbxFirebaseAuthService.logInWithMicrosoft();
1211
1166
  }
1212
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginMicrosoftComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1213
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginMicrosoftComponent, selector: "dbx-firebase-login-microsoft", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
1167
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginMicrosoftComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1168
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginMicrosoftComponent, selector: "dbx-firebase-login-microsoft", usesInheritance: true, ngImport: i0, template: "\n <dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n </dbx-firebase-login-button-container>\n", isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
1214
1169
  }
1215
1170
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginMicrosoftComponent, decorators: [{
1216
1171
  type: Component,
@@ -1221,15 +1176,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1221
1176
  }] });
1222
1177
 
1223
1178
  class DbxFirebaseRegisterEmailComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
1224
- constructor() {
1225
- super(...arguments);
1226
- this.loginProvider = 'email';
1227
- }
1179
+ loginProvider = 'email';
1228
1180
  handleLogin() {
1229
1181
  return DbxFirebaseLoginEmailContentComponent.openEmailLoginContext(this.dbxFirebaseLoginContext, { loginMode: 'register', passwordConfig: this.dbxFirebaseAuthLoginService.getPasswordConfig() });
1230
1182
  }
1231
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseRegisterEmailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1232
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseRegisterEmailComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n</dbx-firebase-login-button-container>\n", dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] }); }
1183
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseRegisterEmailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1184
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseRegisterEmailComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<dbx-firebase-login-button-container>\n <dbx-firebase-login-button [config]=\"config\"></dbx-firebase-login-button>\n</dbx-firebase-login-button-container>\n", dependencies: [{ kind: "component", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: ["config"] }, { kind: "component", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container" }] });
1233
1185
  }
1234
1186
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseRegisterEmailComponent, decorators: [{
1235
1187
  type: Component,
@@ -1237,16 +1189,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1237
1189
  }] });
1238
1190
 
1239
1191
  class DbxFirebaseLoginTermsComponent {
1240
- constructor(dbxFirebaseAuthLoginService) {
1241
- this.dbxFirebaseAuthLoginService = dbxFirebaseAuthLoginService;
1242
- this.config = {
1243
- componentClass: this.dbxFirebaseAuthLoginService.termsComponentClass
1244
- };
1245
- }
1246
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTermsComponent, deps: [{ token: DbxFirebaseAuthLoginService }], target: i0.ɵɵFactoryTarget.Component }); }
1247
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginTermsComponent, selector: "dbx-firebase-login-terms", host: { classAttribute: "dbx-firebase-login-terms d-block" }, ngImport: i0, template: `
1192
+ dbxFirebaseAuthLoginService = inject(DbxFirebaseAuthLoginService);
1193
+ config = {
1194
+ componentClass: this.dbxFirebaseAuthLoginService.termsComponentClass
1195
+ };
1196
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTermsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1197
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginTermsComponent, selector: "dbx-firebase-login-terms", host: { classAttribute: "dbx-firebase-login-terms d-block" }, ngImport: i0, template: `
1248
1198
  <dbx-injection [config]="config"></dbx-injection>
1249
- `, isInline: true, dependencies: [{ kind: "component", type: i2$2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] }); }
1199
+ `, isInline: true, dependencies: [{ kind: "component", type: i3.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] });
1250
1200
  }
1251
1201
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginTermsComponent, decorators: [{
1252
1202
  type: Component,
@@ -1259,19 +1209,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1259
1209
  class: 'dbx-firebase-login-terms d-block'
1260
1210
  }
1261
1211
  }]
1262
- }], ctorParameters: function () { return [{ type: DbxFirebaseAuthLoginService }]; } });
1212
+ }] });
1263
1213
 
1264
1214
  class DbxFirebaseLoginContextBackButtonComponent {
1265
- constructor() {
1266
- this.cancelLogin = new EventEmitter();
1267
- this.anchor = {
1268
- onClick: () => this.cancelLogin.emit()
1269
- };
1270
- }
1271
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginContextBackButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1272
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginContextBackButtonComponent, selector: "dbx-firebase-login-context-back-button", outputs: { cancelLogin: "cancelLogin" }, ngImport: i0, template: `
1215
+ cancelLogin = new EventEmitter();
1216
+ anchor = {
1217
+ onClick: () => this.cancelLogin.emit()
1218
+ };
1219
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginContextBackButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1220
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseLoginContextBackButtonComponent, selector: "dbx-firebase-login-context-back-button", outputs: { cancelLogin: "cancelLogin" }, ngImport: i0, template: `
1273
1221
  <dbx-link [anchor]="anchor">Choose other login method.</dbx-link>
1274
- `, isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }] }); }
1222
+ `, isInline: true, dependencies: [{ kind: "component", type: i1.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }] });
1275
1223
  }
1276
1224
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginContextBackButtonComponent, decorators: [{
1277
1225
  type: Component,
@@ -1386,12 +1334,13 @@ function defaultFirebaseAuthLoginProvidersFactory() {
1386
1334
  * Contains components related to logging in.
1387
1335
  */
1388
1336
  class DbxFirebaseLoginModule {
1389
- constructor(config, dbxFirebaseAuthLoginService) {
1337
+ dbxFirebaseAuthLoginService = inject(DbxFirebaseAuthLoginService);
1338
+ constructor(config) {
1390
1339
  if (config.enabledLoginMethods === true) {
1391
- dbxFirebaseAuthLoginService.setEnableAll();
1340
+ this.dbxFirebaseAuthLoginService.setEnableAll();
1392
1341
  }
1393
1342
  else {
1394
- dbxFirebaseAuthLoginService.enable(config.enabledLoginMethods); // enable the types in the service.
1343
+ this.dbxFirebaseAuthLoginService.enable(config.enabledLoginMethods); // enable the types in the service.
1395
1344
  }
1396
1345
  }
1397
1346
  static forRoot(config) {
@@ -1421,8 +1370,8 @@ class DbxFirebaseLoginModule {
1421
1370
  ]
1422
1371
  };
1423
1372
  }
1424
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginModule, deps: [{ token: DbxFirebaseLoginModuleRootConfig }, { token: DbxFirebaseAuthLoginService }], target: i0.ɵɵFactoryTarget.NgModule }); }
1425
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginModule, declarations: [DbxFirebaseLoginComponent,
1373
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginModule, deps: [{ token: DbxFirebaseLoginModuleRootConfig }], target: i0.ɵɵFactoryTarget.NgModule });
1374
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginModule, declarations: [DbxFirebaseLoginComponent,
1426
1375
  DbxFirebaseLoginContextDirective,
1427
1376
  DbxFirebaseLoginContextBackButtonComponent,
1428
1377
  DbxFirebaseRegisterComponent,
@@ -1462,8 +1411,8 @@ class DbxFirebaseLoginModule {
1462
1411
  DbxFirebaseLoginFacebookComponent,
1463
1412
  DbxFirebaseLoginAnonymousComponent,
1464
1413
  DbxFirebaseLoginTermsComponent,
1465
- DbxFirebaseLoginTermsSimpleComponent] }); }
1466
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginModule, imports: [CommonModule, MatIconModule, MatButtonModule, DbxRouterAnchorModule, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxInjectionComponentModule] }); }
1414
+ DbxFirebaseLoginTermsSimpleComponent] });
1415
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginModule, imports: [CommonModule, MatIconModule, MatButtonModule, DbxRouterAnchorModule, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxInjectionComponentModule] });
1467
1416
  }
1468
1417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseLoginModule, decorators: [{
1469
1418
  type: NgModule,
@@ -1517,7 +1466,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1517
1466
  ],
1518
1467
  providers: []
1519
1468
  }]
1520
- }], ctorParameters: function () { return [{ type: DbxFirebaseLoginModuleRootConfig }, { type: DbxFirebaseAuthLoginService }]; } });
1469
+ }], ctorParameters: function () { return [{ type: DbxFirebaseLoginModuleRootConfig, decorators: [{
1470
+ type: Inject,
1471
+ args: [DbxFirebaseLoginModuleRootConfig]
1472
+ }] }]; } });
1521
1473
 
1522
1474
  function authRolesObsWithClaimsService(config) {
1523
1475
  const { addAuthUserStateToRoles: addAuthUserState, claimsService } = config;
@@ -1564,9 +1516,9 @@ class DbxFirebaseAuthModule {
1564
1516
  providers
1565
1517
  };
1566
1518
  }
1567
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1568
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthModule }); }
1569
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthModule }); }
1519
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1520
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthModule });
1521
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthModule });
1570
1522
  }
1571
1523
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseAuthModule, decorators: [{
1572
1524
  type: NgModule,
@@ -1583,9 +1535,9 @@ const DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN = new InjectionToken('
1583
1535
  * Default providers can be configured by the DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN injectable value.
1584
1536
  */
1585
1537
  class DbxFirebaseDevelopmentWidgetService {
1586
- constructor(defaultEntries, dbxWidgetService) {
1587
- this.dbxWidgetService = dbxWidgetService;
1588
- this._entries = new Map();
1538
+ dbxWidgetService = inject(DbxWidgetService);
1539
+ _entries = new Map();
1540
+ constructor(defaultEntries) {
1589
1541
  if (defaultEntries) {
1590
1542
  defaultEntries.forEach((x) => this.register(x, false));
1591
1543
  }
@@ -1613,8 +1565,8 @@ class DbxFirebaseDevelopmentWidgetService {
1613
1565
  getEntries() {
1614
1566
  return iterableToArray(this._entries.values());
1615
1567
  }
1616
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, deps: [{ token: DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, optional: true }, { token: i1$2.DbxWidgetService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1617
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, providedIn: 'root' }); }
1568
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, deps: [{ token: DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1569
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, providedIn: 'root' });
1618
1570
  }
1619
1571
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, decorators: [{
1620
1572
  type: Injectable,
@@ -1626,7 +1578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1626
1578
  }, {
1627
1579
  type: Inject,
1628
1580
  args: [DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN]
1629
- }] }, { type: i1$2.DbxWidgetService }]; } });
1581
+ }] }]; } });
1630
1582
 
1631
1583
  /**
1632
1584
  * Whether or not the scheduler should be enabled.
@@ -1636,31 +1588,28 @@ const DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN = new InjectionToken(
1636
1588
  * Service used for hitting the scheduler in the development environment using the
1637
1589
  */
1638
1590
  class DbxFirebaseDevelopmentSchedulerService {
1639
- constructor(_startEnabled, dbxAuthService, firebaseDevelopmentFunctions) {
1640
- this._startEnabled = _startEnabled;
1641
- this.dbxAuthService = dbxAuthService;
1642
- this.firebaseDevelopmentFunctions = firebaseDevelopmentFunctions;
1643
- this._sub = new SubscriptionObject();
1644
- this._enabled = new BehaviorSubject(this._startEnabled !== false);
1645
- this._timerInterval = new BehaviorSubject(60 * 1000);
1646
- this._error = new BehaviorSubject(false);
1647
- this.enabled$ = this._enabled.asObservable();
1648
- this.running$ = combineLatest([this._enabled, this.dbxAuthService.authUserState$.pipe(map((x) => x === 'user'))]).pipe(map(([enabled, userReady]) => enabled && userReady), distinctUntilChanged(), shareReplay(1));
1649
- this.timerInterval$ = this._timerInterval.asObservable();
1650
- this.error$ = this._error.pipe(distinctUntilChanged());
1651
- this.schedulerList$ = lazyFrom(() => {
1652
- return this.firebaseDevelopmentFunctions
1653
- .scheduledFunction({ type: ScheduledFunctionDevelopmentFunctionTypeEnum.LIST })
1654
- .then((result) => {
1655
- const list = result;
1656
- return list.list;
1657
- })
1658
- .catch((e) => {
1659
- console.error('Failed to retrieve development schedule list from server.', e);
1660
- throw e;
1661
- });
1591
+ dbxAuthService = inject(DbxAuthService);
1592
+ firebaseDevelopmentFunctions = inject(FirebaseDevelopmentFunctions);
1593
+ _sub = new SubscriptionObject();
1594
+ _enabled = new BehaviorSubject(inject(DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, { optional: true }) !== false);
1595
+ _timerInterval = new BehaviorSubject(60 * 1000);
1596
+ _error = new BehaviorSubject(false);
1597
+ enabled$ = this._enabled.asObservable();
1598
+ running$ = combineLatest([this._enabled, this.dbxAuthService.authUserState$.pipe(map((x) => x === 'user'))]).pipe(map(([enabled, userReady]) => enabled && userReady), distinctUntilChanged(), shareReplay(1));
1599
+ timerInterval$ = this._timerInterval.asObservable();
1600
+ error$ = this._error.pipe(distinctUntilChanged());
1601
+ schedulerList$ = lazyFrom(() => {
1602
+ return this.firebaseDevelopmentFunctions
1603
+ .scheduledFunction({ type: ScheduledFunctionDevelopmentFunctionTypeEnum.LIST })
1604
+ .then((result) => {
1605
+ const list = result;
1606
+ return list.list;
1607
+ })
1608
+ .catch((e) => {
1609
+ console.error('Failed to retrieve development schedule list from server.', e);
1610
+ throw e;
1662
1611
  });
1663
- }
1612
+ });
1664
1613
  init() {
1665
1614
  this._sub.subscription = this.running$
1666
1615
  .pipe(switchMapWhileTrue(() => {
@@ -1695,20 +1644,15 @@ class DbxFirebaseDevelopmentSchedulerService {
1695
1644
  setTimer(timerInterval) {
1696
1645
  this._timerInterval.next(timerInterval);
1697
1646
  }
1698
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerService, deps: [{ token: DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, optional: true }, { token: i2$2.DbxAuthService }, { token: i1$4.FirebaseDevelopmentFunctions }], target: i0.ɵɵFactoryTarget.Injectable }); }
1699
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerService, providedIn: 'root' }); }
1647
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1648
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerService, providedIn: 'root' });
1700
1649
  }
1701
1650
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerService, decorators: [{
1702
1651
  type: Injectable,
1703
1652
  args: [{
1704
1653
  providedIn: 'root'
1705
1654
  }]
1706
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1707
- type: Optional
1708
- }, {
1709
- type: Inject,
1710
- args: [DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN]
1711
- }] }, { type: i2$2.DbxAuthService }, { type: i1$4.FirebaseDevelopmentFunctions }]; } });
1655
+ }] });
1712
1656
 
1713
1657
  class DbxFirebaseDevelopmentSchedulerListComponent extends AbstractDbxSelectionListWrapperDirective {
1714
1658
  constructor() {
@@ -1717,8 +1661,8 @@ class DbxFirebaseDevelopmentSchedulerListComponent extends AbstractDbxSelectionL
1717
1661
  defaultSelectionMode: 'view'
1718
1662
  });
1719
1663
  }
1720
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1721
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerListComponent, selector: "dbx-firebase-development-scheduler-list", providers: provideDbxListViewWrapper(DbxFirebaseDevelopmentSchedulerListComponent), usesInheritance: true, ngImport: i0, template: "\n<dbx-list [state$]=\"state$\" [config]=\"config$ | async\" [disabled]=\"disabled\" [selectionMode]=\"selectionMode\">\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</dbx-list>\n", isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
1664
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1665
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerListComponent, selector: "dbx-firebase-development-scheduler-list", providers: provideDbxListViewWrapper(DbxFirebaseDevelopmentSchedulerListComponent), usesInheritance: true, ngImport: i0, template: "\n<dbx-list [state$]=\"state$\" [config]=\"config$ | async\" [disabled]=\"disabled\" [selectionMode]=\"selectionMode\">\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</dbx-list>\n", isInline: true, dependencies: [{ kind: "component", type: i1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
1722
1666
  }
1723
1667
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListComponent, decorators: [{
1724
1668
  type: Component,
@@ -1729,15 +1673,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1729
1673
  }]
1730
1674
  }], ctorParameters: function () { return []; } });
1731
1675
  class DbxFirebaseDevelopmentSchedulerListViewComponent extends AbstractDbxSelectionListViewDirective {
1732
- constructor() {
1733
- super(...arguments);
1734
- this.config = {
1735
- componentClass: DbxFirebaseDevelopmentSchedulerListViewItemComponent,
1736
- mapValuesToItemValues: (x) => of(x.map((y) => ({ ...y, icon: y.icon, itemValue: y })))
1737
- };
1738
- }
1739
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1740
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerListViewComponent, selector: "dbx-firebase-development-scheduler-list-view", providers: provideDbxListView(DbxFirebaseDevelopmentSchedulerListViewComponent), usesInheritance: true, ngImport: i0, template: "<dbx-selection-list-view [config]=\"config\"></dbx-selection-list-view>", isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxSelectionValueListViewComponent, selector: "dbx-selection-list-view" }] }); }
1676
+ config = {
1677
+ componentClass: DbxFirebaseDevelopmentSchedulerListViewItemComponent,
1678
+ mapValuesToItemValues: (x) => of(x.map((y) => ({ ...y, icon: y.icon, itemValue: y })))
1679
+ };
1680
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1681
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerListViewComponent, selector: "dbx-firebase-development-scheduler-list-view", providers: provideDbxListView(DbxFirebaseDevelopmentSchedulerListViewComponent), usesInheritance: true, ngImport: i0, template: "<dbx-selection-list-view [config]=\"config\"></dbx-selection-list-view>", isInline: true, dependencies: [{ kind: "component", type: i1.DbxSelectionValueListViewComponent, selector: "dbx-selection-list-view" }] });
1741
1682
  }
1742
1683
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListViewComponent, decorators: [{
1743
1684
  type: Component,
@@ -1748,23 +1689,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1748
1689
  }]
1749
1690
  }] });
1750
1691
  class DbxFirebaseDevelopmentSchedulerListViewItemComponent extends AbstractDbxValueListViewItemComponent {
1692
+ dbxFirebaseDevelopmentSchedulerService = inject(DbxFirebaseDevelopmentSchedulerService);
1751
1693
  get name() {
1752
1694
  return this.itemValue.name;
1753
1695
  }
1754
- constructor(item, dbxFirebaseDevelopmentSchedulerService) {
1755
- super(item);
1756
- this.dbxFirebaseDevelopmentSchedulerService = dbxFirebaseDevelopmentSchedulerService;
1757
- this.handleRun = (value, context) => {
1758
- context.startWorkingWithObservable(from(this.dbxFirebaseDevelopmentSchedulerService.runScheduledFunction(this.name)));
1759
- };
1760
- }
1761
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListViewItemComponent, deps: [{ token: DBX_VALUE_LIST_VIEW_ITEM }, { token: DbxFirebaseDevelopmentSchedulerService }], target: i0.ɵɵFactoryTarget.Component }); }
1762
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerListViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1696
+ handleRun = (value, context) => {
1697
+ context.startWorkingWithObservable(from(this.dbxFirebaseDevelopmentSchedulerService.runScheduledFunction(this.name)));
1698
+ };
1699
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1700
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerListViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1763
1701
  <div dbxAction dbxActionValue fastTrigger [dbxActionHandler]="handleRun">
1764
1702
  <dbx-button dbxActionButton [text]="'Run ' + name"></dbx-button>
1765
- <dbx-success *dbxActionHasSuccess="3000" dbxActionSuccess>Success</dbx-success>
1703
+ <div *dbxActionHasSuccess="3000" class="dbx-success" dbxActionSuccess>Success</div>
1766
1704
  </div>
1767
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$2.DbxSuccessComponent, selector: "dbx-success" }, { kind: "directive", type: i2$2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2$2.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i2$2.DbxActionHasSuccessDirective, selector: "[dbxActionHasSuccess]", inputs: ["dbxActionHasSuccess"] }, { kind: "directive", type: i2$2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1$2.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }] }); }
1705
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i3.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i3.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "directive", type: i3.DbxActionHasSuccessDirective, selector: "[dbxActionHasSuccess]", inputs: ["dbxActionHasSuccess"] }, { kind: "directive", type: i3.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }] });
1768
1706
  }
1769
1707
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerListViewItemComponent, decorators: [{
1770
1708
  type: Component,
@@ -1772,14 +1710,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1772
1710
  template: `
1773
1711
  <div dbxAction dbxActionValue fastTrigger [dbxActionHandler]="handleRun">
1774
1712
  <dbx-button dbxActionButton [text]="'Run ' + name"></dbx-button>
1775
- <dbx-success *dbxActionHasSuccess="3000" dbxActionSuccess>Success</dbx-success>
1713
+ <div *dbxActionHasSuccess="3000" class="dbx-success" dbxActionSuccess>Success</div>
1776
1714
  </div>
1777
1715
  `
1778
1716
  }]
1779
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1780
- type: Inject,
1781
- args: [DBX_VALUE_LIST_VIEW_ITEM]
1782
- }] }, { type: DbxFirebaseDevelopmentSchedulerService }]; } });
1717
+ }] });
1783
1718
 
1784
1719
  const DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY = 'DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET';
1785
1720
  function developmentFirebaseServerSchedulerWidgetEntry() {
@@ -1792,17 +1727,15 @@ function developmentFirebaseServerSchedulerWidgetEntry() {
1792
1727
  };
1793
1728
  }
1794
1729
  class DbxFirebaseDevelopmentSchedulerWidgetComponent {
1795
- constructor(dbxFirebaseDevelopmentSchedulerService) {
1796
- this.dbxFirebaseDevelopmentSchedulerService = dbxFirebaseDevelopmentSchedulerService;
1797
- this.entries$ = this.dbxFirebaseDevelopmentSchedulerService.schedulerList$;
1798
- this.state$ = loadingStateFromObs(this.entries$);
1799
- }
1800
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerWidgetComponent, deps: [{ token: DbxFirebaseDevelopmentSchedulerService }], target: i0.ɵɵFactoryTarget.Component }); }
1801
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerWidgetComponent, selector: "ng-component", ngImport: i0, template: `
1730
+ dbxFirebaseDevelopmentSchedulerService = inject(DbxFirebaseDevelopmentSchedulerService);
1731
+ entries$ = this.dbxFirebaseDevelopmentSchedulerService.schedulerList$;
1732
+ state$ = loadingStateFromObs(this.entries$);
1733
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1734
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentSchedulerWidgetComponent, selector: "ng-component", ngImport: i0, template: `
1802
1735
  <div>
1803
1736
  <dbx-firebase-development-scheduler-list [state$]="state$"></dbx-firebase-development-scheduler-list>
1804
1737
  </div>
1805
- `, isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseDevelopmentSchedulerListComponent, selector: "dbx-firebase-development-scheduler-list" }] }); }
1738
+ `, isInline: true, dependencies: [{ kind: "component", type: DbxFirebaseDevelopmentSchedulerListComponent, selector: "dbx-firebase-development-scheduler-list" }] });
1806
1739
  }
1807
1740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentSchedulerWidgetComponent, decorators: [{
1808
1741
  type: Component,
@@ -1813,18 +1746,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1813
1746
  </div>
1814
1747
  `
1815
1748
  }]
1816
- }], ctorParameters: function () { return [{ type: DbxFirebaseDevelopmentSchedulerService }]; } });
1749
+ }] });
1817
1750
 
1818
1751
  class DbxFirebaseParsedEmulatorsConfig {
1752
+ host;
1753
+ /**
1754
+ * Fix used by some components to allow changing 0.0.0.0 to localhost. Defaults to true.
1755
+ */
1756
+ allow0000ToLocalhost;
1757
+ ui;
1758
+ auth;
1759
+ firestore;
1760
+ storage;
1761
+ functions;
1762
+ database;
1819
1763
  }
1820
1764
 
1821
1765
  /**
1822
1766
  * Default firebase firestore provider module.
1823
1767
  */
1824
1768
  class DbxFirebaseDefaultFirestoreProviderModule {
1825
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1826
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [i1$5.FirestoreModule] }); }
1827
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [provideFirestore((injector) => {
1769
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1770
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [i1$2.FirestoreModule] });
1771
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [provideFirestore((injector) => {
1828
1772
  const firebaseApp = injector.get(FirebaseApp);
1829
1773
  const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
1830
1774
  const firestoreSettings = {};
@@ -1849,7 +1793,7 @@ class DbxFirebaseDefaultFirestoreProviderModule {
1849
1793
  connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
1850
1794
  }
1851
1795
  return firestore;
1852
- })] }); }
1796
+ })] });
1853
1797
  }
1854
1798
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, decorators: [{
1855
1799
  type: NgModule,
@@ -1890,9 +1834,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1890
1834
  * Also configures the DbxFirebaseAppCheckHttpInterceptor with HTTP_INTERCEPTORS in order for appCheck to be appended to requests to the api.
1891
1835
  */
1892
1836
  class DbxFirebaseDefaultAppCheckProviderModule {
1893
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1894
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, imports: [i1$1.AppCheckModule] }); }
1895
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, providers: [
1837
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1838
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, imports: [i2$2.AppCheckModule] });
1839
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, providers: [
1896
1840
  {
1897
1841
  provide: HTTP_INTERCEPTORS,
1898
1842
  useClass: DbxFirebaseAppCheckHttpInterceptor,
@@ -1923,7 +1867,7 @@ class DbxFirebaseDefaultAppCheckProviderModule {
1923
1867
  }
1924
1868
  }
1925
1869
  return appCheck;
1926
- })] }); }
1870
+ })] });
1927
1871
  }
1928
1872
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, decorators: [{
1929
1873
  type: NgModule,
@@ -1969,9 +1913,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1969
1913
  * Default firebase auth provider module.
1970
1914
  */
1971
1915
  class DbxFirebaseDefaultAuthProviderModule {
1972
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1973
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [i1.AuthModule] }); }
1974
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [provideAuth((injector) => {
1916
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1917
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [i3$1.AuthModule] });
1918
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [provideAuth((injector) => {
1975
1919
  const firebaseApp = injector.get(FirebaseApp);
1976
1920
  const auth = getAuth(firebaseApp);
1977
1921
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
@@ -1979,7 +1923,7 @@ class DbxFirebaseDefaultAuthProviderModule {
1979
1923
  connectAuthEmulator(auth, `http://${emulators.auth.host}:${emulators.auth.port}`);
1980
1924
  }
1981
1925
  return auth;
1982
- })] }); }
1926
+ })] });
1983
1927
  }
1984
1928
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, decorators: [{
1985
1929
  type: NgModule,
@@ -2001,9 +1945,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2001
1945
  * Default firebase storage provider module.
2002
1946
  */
2003
1947
  class DbxFirebaseDefaultStorageProviderModule {
2004
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2005
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [i4.StorageModule] }); }
2006
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [provideStorage((injector) => {
1948
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1949
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [i4$1.StorageModule] });
1950
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [provideStorage((injector) => {
2007
1951
  const firebaseApp = injector.get(FirebaseApp);
2008
1952
  const storage = getStorage(firebaseApp);
2009
1953
  const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
@@ -2011,7 +1955,7 @@ class DbxFirebaseDefaultStorageProviderModule {
2011
1955
  connectStorageEmulator(storage, emulators.storage.host, emulators.storage.port, {});
2012
1956
  }
2013
1957
  return storage;
2014
- })] }); }
1958
+ })] });
2015
1959
  }
2016
1960
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, decorators: [{
2017
1961
  type: NgModule,
@@ -2033,9 +1977,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2033
1977
  * Default firebase functions provider module.
2034
1978
  */
2035
1979
  class DbxFirebaseDefaultFunctionsProviderModule {
2036
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2037
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [i5.FunctionsModule] }); }
2038
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [provideFunctions((injector) => {
1980
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1981
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [i5.FunctionsModule] });
1982
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [provideFunctions((injector) => {
2039
1983
  const firebaseApp = injector.get(FirebaseApp);
2040
1984
  const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
2041
1985
  const { functionsRegionOrCustomDomain } = firebaseOptions;
@@ -2045,7 +1989,7 @@ class DbxFirebaseDefaultFunctionsProviderModule {
2045
1989
  connectFunctionsEmulator(functions, emulators.functions.host, emulators.functions.port);
2046
1990
  }
2047
1991
  return functions;
2048
- })] }); }
1992
+ })] });
2049
1993
  }
2050
1994
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, decorators: [{
2051
1995
  type: NgModule,
@@ -2080,9 +2024,9 @@ class DbxFirebaseDefaultFirebaseProvidersModule {
2080
2024
  ]
2081
2025
  };
2082
2026
  }
2083
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2084
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [i6.FirebaseAppModule, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDefaultFunctionsProviderModule] }); }
2085
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [provideFirebaseApp((injector) => {
2027
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2028
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [i6.FirebaseAppModule, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDefaultFunctionsProviderModule] });
2029
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [provideFirebaseApp((injector) => {
2086
2030
  const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
2087
2031
  return initializeApp(firebaseOptions);
2088
2032
  }),
@@ -2090,7 +2034,7 @@ class DbxFirebaseDefaultFirebaseProvidersModule {
2090
2034
  DbxFirebaseDefaultFirestoreProviderModule,
2091
2035
  DbxFirebaseDefaultAuthProviderModule,
2092
2036
  DbxFirebaseDefaultStorageProviderModule,
2093
- DbxFirebaseDefaultFunctionsProviderModule] }); }
2037
+ DbxFirebaseDefaultFunctionsProviderModule] });
2094
2038
  }
2095
2039
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, decorators: [{
2096
2040
  type: NgModule,
@@ -2137,15 +2081,16 @@ class DbxFirebaseEmulatorModule {
2137
2081
  ]
2138
2082
  };
2139
2083
  }
2140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2141
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorModule }); }
2142
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorModule }); }
2084
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2085
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorModule });
2086
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorModule });
2143
2087
  }
2144
2088
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorModule, decorators: [{
2145
2089
  type: NgModule
2146
2090
  }] });
2147
2091
 
2148
2092
  class DbxFirebaseEmulatorService {
2093
+ emulatorsConfig = inject(DbxFirebaseParsedEmulatorsConfig);
2149
2094
  get useEmulators() {
2150
2095
  return this.emulatorsConfig.useEmulators || false;
2151
2096
  }
@@ -2163,18 +2108,15 @@ class DbxFirebaseEmulatorService {
2163
2108
  }
2164
2109
  : undefined;
2165
2110
  }
2166
- constructor(emulatorsConfig) {
2167
- this.emulatorsConfig = emulatorsConfig;
2168
- }
2169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorService, deps: [{ token: DbxFirebaseParsedEmulatorsConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
2170
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorService, providedIn: 'root' }); }
2111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2112
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorService, providedIn: 'root' });
2171
2113
  }
2172
2114
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseEmulatorService, decorators: [{
2173
2115
  type: Injectable,
2174
2116
  args: [{
2175
2117
  providedIn: 'root'
2176
2118
  }]
2177
- }], ctorParameters: function () { return [{ type: DbxFirebaseParsedEmulatorsConfig }]; } });
2119
+ }] });
2178
2120
 
2179
2121
  const DISPLAY_FOR_DEVELOPMENT_POPUP_STRING_VALUE = (values) => {
2180
2122
  const displayValues = values.map((x) => ({ ...x, label: x.meta?.label || x.value }));
@@ -2182,26 +2124,23 @@ const DISPLAY_FOR_DEVELOPMENT_POPUP_STRING_VALUE = (values) => {
2182
2124
  return obs;
2183
2125
  };
2184
2126
  class DbxFirebaseDevelopmentPopupContentFormComponent extends AbstractConfigAsyncFormlyFormDirective {
2185
- constructor() {
2186
- super(...arguments);
2187
- this.fields$ = this.config$.pipe(map((config) => {
2188
- return [
2189
- pickableItemChipField({
2190
- key: 'specifier',
2191
- filterLabel: 'Tools',
2192
- description: 'Pick a tool to get started.',
2193
- filterValues: filterPickableItemFieldValuesByLabel,
2194
- loadValues: () => of(config.entries.map((y) => ({ value: y.widget.type, meta: y }))),
2195
- displayForValue: DISPLAY_FOR_DEVELOPMENT_POPUP_STRING_VALUE,
2196
- asArrayValue: false
2197
- })
2198
- ];
2199
- }));
2200
- }
2201
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupContentFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2202
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentPopupContentFormComponent, selector: "dbx-firebase-development-popup-content-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
2127
+ fields$ = this.config$.pipe(map((config) => {
2128
+ return [
2129
+ pickableItemChipField({
2130
+ key: 'specifier',
2131
+ filterLabel: 'Tools',
2132
+ description: 'Pick a tool to get started.',
2133
+ filterValues: filterPickableItemFieldValuesByLabel,
2134
+ loadValues: () => of(config.entries.map((y) => ({ value: y.widget.type, meta: y }))),
2135
+ displayForValue: DISPLAY_FOR_DEVELOPMENT_POPUP_STRING_VALUE,
2136
+ asArrayValue: false
2137
+ })
2138
+ ];
2139
+ }));
2140
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupContentFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2141
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentPopupContentFormComponent, selector: "dbx-firebase-development-popup-content-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
2203
2142
  <dbx-formly></dbx-formly>
2204
- `, isInline: true, dependencies: [{ kind: "component", type: i1$3.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] }); }
2143
+ `, isInline: true, dependencies: [{ kind: "component", type: i4.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
2205
2144
  }
2206
2145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupContentFormComponent, decorators: [{
2207
2146
  type: Component,
@@ -2215,38 +2154,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2215
2154
  }] });
2216
2155
 
2217
2156
  class DbxFirebaseDevelopmentPopupContentComponent {
2218
- constructor(twoColumnsContextStore, dbxAuthService, dbxFirebaseDevelopmentWidgetService, dbxFirebaseDevelopmentSchedulerService, dbxFirebaseEmulatorService) {
2219
- this.twoColumnsContextStore = twoColumnsContextStore;
2220
- this.dbxAuthService = dbxAuthService;
2221
- this.dbxFirebaseDevelopmentWidgetService = dbxFirebaseDevelopmentWidgetService;
2222
- this.dbxFirebaseDevelopmentSchedulerService = dbxFirebaseDevelopmentSchedulerService;
2223
- this.dbxFirebaseEmulatorService = dbxFirebaseEmulatorService;
2224
- this._backSub = new SubscriptionObject();
2225
- this.showEmulatorButton = this.dbxFirebaseEmulatorService.useEmulators === true;
2226
- this.emulatorUIAnchor = this.dbxFirebaseEmulatorService.emulatorUIAnchor ?? {};
2227
- this.entries = this.dbxFirebaseDevelopmentWidgetService.getEntries();
2228
- this._activeEntrySelector = new BehaviorSubject(DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY);
2229
- this.isLoggedIn$ = this.dbxAuthService.isLoggedIn$;
2230
- this.entries$ = this.isLoggedIn$.pipe(distinctUntilChanged(), map((isLoggedIn) => this.entries), shareReplay(1));
2231
- this.formConfig$ = this.entries$.pipe(map((entries) => ({ entries })));
2232
- this.activeEntrySelector$ = this._activeEntrySelector.pipe(distinctUntilChanged());
2233
- this.currentActiveEntry$ = combineLatest([this.entries$, this.activeEntrySelector$]).pipe(map(([entries, selector]) => (selector ? entries.find((e) => e.widget.type === selector) : undefined)), shareReplay(1));
2234
- this.showRight$ = this.currentActiveEntry$.pipe(map((x) => x != null));
2235
- this.activeEntry$ = this.currentActiveEntry$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
2236
- this.rightTitle$ = this.activeEntry$.pipe(map((x) => x.label));
2237
- this.widgetConfig$ = this.activeEntry$.pipe(map((x) => ({ data: undefined, type: x.widget.type })), shareReplay(1));
2238
- this.schedulerRunning$ = this.dbxFirebaseDevelopmentSchedulerService.running$;
2239
- this.schedulerInterval$ = this.dbxFirebaseDevelopmentSchedulerService.timerInterval$.pipe(map((x) => msToSeconds(x)), shareReplay(1));
2240
- this.schedulerError$ = this.dbxFirebaseDevelopmentSchedulerService.error$.pipe(map((x) => (x ? 'Error Occured' : 'Ok')), shareReplay(1));
2241
- this.formData$ = this._activeEntrySelector.pipe(distinctUntilChanged(), map((specifier) => ({ specifier })));
2242
- this.handleFormUpdate = (value, context) => {
2243
- this._activeEntrySelector.next(value.specifier);
2244
- context.success();
2245
- };
2246
- this.isFormModified = (value) => {
2247
- return this._activeEntrySelector.pipe(map((currentSelector) => value.specifier !== currentSelector), first());
2248
- };
2249
- }
2157
+ twoColumnsContextStore = inject(TwoColumnsContextStore);
2158
+ dbxAuthService = inject(DbxAuthService);
2159
+ dbxFirebaseDevelopmentWidgetService = inject(DbxFirebaseDevelopmentWidgetService);
2160
+ dbxFirebaseDevelopmentSchedulerService = inject(DbxFirebaseDevelopmentSchedulerService);
2161
+ dbxFirebaseEmulatorService = inject(DbxFirebaseEmulatorService);
2162
+ _backSub = new SubscriptionObject();
2163
+ showEmulatorButton = this.dbxFirebaseEmulatorService.useEmulators === true;
2164
+ emulatorUIAnchor = this.dbxFirebaseEmulatorService.emulatorUIAnchor ?? {};
2165
+ entries = this.dbxFirebaseDevelopmentWidgetService.getEntries();
2166
+ _activeEntrySelector = new BehaviorSubject(DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY);
2167
+ isLoggedIn$ = this.dbxAuthService.isLoggedIn$;
2168
+ entries$ = this.isLoggedIn$.pipe(distinctUntilChanged(), map((isLoggedIn) => this.entries), shareReplay(1));
2169
+ formConfig$ = this.entries$.pipe(map((entries) => ({ entries })));
2170
+ activeEntrySelector$ = this._activeEntrySelector.pipe(distinctUntilChanged());
2171
+ currentActiveEntry$ = combineLatest([this.entries$, this.activeEntrySelector$]).pipe(map(([entries, selector]) => (selector ? entries.find((e) => e.widget.type === selector) : undefined)), shareReplay(1));
2172
+ showRight$ = this.currentActiveEntry$.pipe(map((x) => x != null));
2173
+ activeEntry$ = this.currentActiveEntry$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
2174
+ rightTitle$ = this.activeEntry$.pipe(map((x) => x.label));
2175
+ widgetConfig$ = this.activeEntry$.pipe(map((x) => ({ data: undefined, type: x.widget.type })), shareReplay(1));
2176
+ schedulerRunning$ = this.dbxFirebaseDevelopmentSchedulerService.running$;
2177
+ schedulerInterval$ = this.dbxFirebaseDevelopmentSchedulerService.timerInterval$.pipe(map((x) => msToSeconds(x)), shareReplay(1));
2178
+ schedulerError$ = this.dbxFirebaseDevelopmentSchedulerService.error$.pipe(map((x) => (x ? 'Error Occured' : 'Ok')), shareReplay(1));
2179
+ formData$ = this._activeEntrySelector.pipe(distinctUntilChanged(), map((specifier) => ({ specifier })));
2250
2180
  ngOnInit() {
2251
2181
  this.twoColumnsContextStore.setShowRight(this.showRight$);
2252
2182
  this._backSub.subscription = this.twoColumnsContextStore.back$.subscribe(() => {
@@ -2256,27 +2186,29 @@ class DbxFirebaseDevelopmentPopupContentComponent {
2256
2186
  ngOnDestroy() {
2257
2187
  this._activeEntrySelector.complete();
2258
2188
  }
2189
+ handleFormUpdate = (value, context) => {
2190
+ this._activeEntrySelector.next(value.specifier);
2191
+ context.success();
2192
+ };
2193
+ isFormModified = (value) => {
2194
+ return this._activeEntrySelector.pipe(map((currentSelector) => value.specifier !== currentSelector), first());
2195
+ };
2259
2196
  clearSelection() {
2260
2197
  this._activeEntrySelector.next(undefined);
2261
2198
  }
2262
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupContentComponent, deps: [{ token: i1$2.TwoColumnsContextStore }, { token: i2$2.DbxAuthService }, { token: DbxFirebaseDevelopmentWidgetService }, { token: DbxFirebaseDevelopmentSchedulerService }, { token: DbxFirebaseEmulatorService }], target: i0.ɵɵFactoryTarget.Component }); }
2263
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentPopupContentComponent, selector: "dbx-firebase-development-popup-content", providers: [TwoColumnsContextStore], ngImport: i0, template: "<dbx-two-column class=\"dbx-firebase-development-popup-content\" [dbxTwoColumnFullLeft]=\"true\">\n <dbx-two-block left>\n <div>\n <h4>Info</h4>\n <p>Scheduler (Running): {{ schedulerRunning$ | async }} : {{ schedulerInterval$ | async }}s : {{ schedulerError$ | async }}</p>\n <div>\n <dbx-anchor [anchor]=\"emulatorUIAnchor\" *ngIf=\"showEmulatorButton\">\n <button mat-flat-button color=\"accent\">Emulator Enabled</button>\n </dbx-anchor>\n </div>\n </div>\n <div>\n <h4>Tools</h4>\n <div dbxAction dbxActionEnforceModified dbxActionAutoTrigger instantTrigger [dbxActionHandler]=\"handleFormUpdate\">\n <dbx-firebase-development-popup-content-form dbxActionForm [dbxFormSource]=\"formData$\" dbxFormSourceMode=\"always\" [dbxActionFormModified]=\"isFormModified\" [config]=\"formConfig$ | async\"></dbx-firebase-development-popup-content-form>\n </div>\n </div>\n </dbx-two-block>\n <dbx-two-column-right right [header]=\"(rightTitle$ | async) || ''\">\n <dbx-widget-view [config]=\"widgetConfig$ | async\"></dbx-widget-view>\n </dbx-two-column-right>\n</dbx-two-column>\n", styles: [".dbx-firebase-development-popup-content{height:400px;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.DbxWidgetViewComponent, selector: "dbx-widget-view", inputs: ["config"] }, { kind: "component", type: i1$2.DbxTwoBlocksComponent, selector: "dbx-two-block", inputs: ["fixedTop"] }, { kind: "component", type: i1$2.DbxTwoColumnComponent, selector: "dbx-two-column", inputs: ["reverseSizing", "inSectionPage"], exportAs: ["columns"] }, { kind: "component", type: i1$2.DbxTwoColumnRightComponent, selector: "dbx-two-column-right", inputs: ["full", "header", "block", "showBack", "minRightWidth"] }, { kind: "directive", type: i1$2.DbxTwoColumnFullLeftDirective, selector: "[dbxTwoColumnFullLeft]", inputs: ["dbxTwoColumnFullLeft"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1$2.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "directive", type: i1$3.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "directive", type: i1$3.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "dbxActionFormMapValue", "formDisabledOnWorking"] }, { kind: "directive", type: i2$2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2$2.DbxActionEnforceModifiedDirective, selector: "[dbxActionEnforceModified]", inputs: ["dbxActionEnforceModified"] }, { kind: "directive", type: i2$2.DbxActionAutoTriggerDirective, selector: "dbxActionAutoTrigger, [dbxActionAutoTrigger]", inputs: ["dbxActionAutoTrigger", "triggerDebounce", "triggerThrottle", "triggerErrorThrottle", "fastTrigger", "instantTrigger", "triggerLimit"] }, { kind: "component", type: DbxFirebaseDevelopmentPopupContentFormComponent, selector: "dbx-firebase-development-popup-content-form" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
2199
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2200
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentPopupContentComponent, selector: "dbx-firebase-development-popup-content", providers: [TwoColumnsContextStore], ngImport: i0, template: "<dbx-two-column class=\"dbx-firebase-development-popup-content\" [dbxTwoColumnFullLeft]=\"true\">\n <dbx-two-block left>\n <div>\n <h4>Info</h4>\n <p>Scheduler (Running): {{ schedulerRunning$ | async }} : {{ schedulerInterval$ | async }}s : {{ schedulerError$ | async }}</p>\n <div>\n <dbx-anchor [anchor]=\"emulatorUIAnchor\" *ngIf=\"showEmulatorButton\">\n <button mat-flat-button color=\"accent\">Emulator Enabled</button>\n </dbx-anchor>\n </div>\n </div>\n <div>\n <h4>Tools</h4>\n <div dbxAction dbxActionEnforceModified dbxActionAutoTrigger instantTrigger [dbxActionHandler]=\"handleFormUpdate\">\n <dbx-firebase-development-popup-content-form dbxActionForm [dbxFormSource]=\"formData$\" dbxFormSourceMode=\"always\" [dbxActionFormModified]=\"isFormModified\" [config]=\"formConfig$ | async\"></dbx-firebase-development-popup-content-form>\n </div>\n </div>\n </dbx-two-block>\n <dbx-two-column-right right [header]=\"(rightTitle$ | async) || ''\">\n <dbx-widget-view [config]=\"widgetConfig$ | async\"></dbx-widget-view>\n </dbx-two-column-right>\n</dbx-two-column>\n", styles: [".dbx-firebase-development-popup-content{height:400px;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.DbxWidgetViewComponent, selector: "dbx-widget-view", inputs: ["config"] }, { kind: "component", type: i1.DbxTwoBlocksComponent, selector: "dbx-two-block", inputs: ["fixedTop"] }, { kind: "component", type: i1.DbxTwoColumnComponent, selector: "dbx-two-column", inputs: ["reverseSizing", "inSectionPage"], exportAs: ["columns"] }, { kind: "component", type: i1.DbxTwoColumnRightComponent, selector: "dbx-two-column-right", inputs: ["full", "header", "block", "showBack", "minRightWidth"] }, { kind: "directive", type: i1.DbxTwoColumnFullLeftDirective, selector: "[dbxTwoColumnFullLeft]", inputs: ["dbxTwoColumnFullLeft"] }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "directive", type: i4.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "directive", type: i4.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "dbxActionFormMapValue", "formDisabledOnWorking"] }, { kind: "directive", type: i3.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i3.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i3.DbxActionEnforceModifiedDirective, selector: "[dbxActionEnforceModified]", inputs: ["dbxActionEnforceModified"] }, { kind: "directive", type: i3.DbxActionAutoTriggerDirective, selector: "dbxActionAutoTrigger, [dbxActionAutoTrigger]", inputs: ["dbxActionAutoTrigger", "triggerDebounce", "triggerThrottle", "triggerErrorThrottle", "fastTrigger", "instantTrigger", "triggerLimit"] }, { kind: "component", type: DbxFirebaseDevelopmentPopupContentFormComponent, selector: "dbx-firebase-development-popup-content-form" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
2264
2201
  }
2265
2202
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupContentComponent, decorators: [{
2266
2203
  type: Component,
2267
2204
  args: [{ selector: 'dbx-firebase-development-popup-content', providers: [TwoColumnsContextStore], template: "<dbx-two-column class=\"dbx-firebase-development-popup-content\" [dbxTwoColumnFullLeft]=\"true\">\n <dbx-two-block left>\n <div>\n <h4>Info</h4>\n <p>Scheduler (Running): {{ schedulerRunning$ | async }} : {{ schedulerInterval$ | async }}s : {{ schedulerError$ | async }}</p>\n <div>\n <dbx-anchor [anchor]=\"emulatorUIAnchor\" *ngIf=\"showEmulatorButton\">\n <button mat-flat-button color=\"accent\">Emulator Enabled</button>\n </dbx-anchor>\n </div>\n </div>\n <div>\n <h4>Tools</h4>\n <div dbxAction dbxActionEnforceModified dbxActionAutoTrigger instantTrigger [dbxActionHandler]=\"handleFormUpdate\">\n <dbx-firebase-development-popup-content-form dbxActionForm [dbxFormSource]=\"formData$\" dbxFormSourceMode=\"always\" [dbxActionFormModified]=\"isFormModified\" [config]=\"formConfig$ | async\"></dbx-firebase-development-popup-content-form>\n </div>\n </div>\n </dbx-two-block>\n <dbx-two-column-right right [header]=\"(rightTitle$ | async) || ''\">\n <dbx-widget-view [config]=\"widgetConfig$ | async\"></dbx-widget-view>\n </dbx-two-column-right>\n</dbx-two-column>\n", styles: [".dbx-firebase-development-popup-content{height:400px;overflow:hidden}\n"] }]
2268
- }], ctorParameters: function () { return [{ type: i1$2.TwoColumnsContextStore }, { type: i2$2.DbxAuthService }, { type: DbxFirebaseDevelopmentWidgetService }, { type: DbxFirebaseDevelopmentSchedulerService }, { type: DbxFirebaseEmulatorService }]; } });
2205
+ }] });
2269
2206
 
2270
2207
  const DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY = 'devpopup';
2271
2208
  class DbxFirebaseDevelopmentPopupComponent extends AbstractPopupDirective {
2272
- constructor(popup, popupService) {
2273
- super(popup);
2274
- this.popupService = popupService;
2275
- this.header = 'Development Tools';
2276
- this.reopen = () => {
2277
- DbxFirebaseDevelopmentPopupComponent.openPopup(this.popupService, this.popup.key);
2278
- };
2279
- }
2209
+ popupService = inject(DbxPopupService);
2210
+ content;
2211
+ header = 'Development Tools';
2280
2212
  static openPopup(popupService, popupKey) {
2281
2213
  return popupService.open({
2282
2214
  key: popupKey ?? DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY,
@@ -2286,13 +2218,16 @@ class DbxFirebaseDevelopmentPopupComponent extends AbstractPopupDirective {
2286
2218
  position: 'center'
2287
2219
  });
2288
2220
  }
2289
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupComponent, deps: [{ token: i1$2.DbxPopupComponent }, { token: i1$2.DbxPopupService }], target: i0.ɵɵFactoryTarget.Component }); }
2290
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentPopupComponent, selector: "ng-component", viewQueries: [{ propertyName: "content", first: true, predicate: DbxFirebaseDevelopmentPopupContentComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
2221
+ reopen = () => {
2222
+ DbxFirebaseDevelopmentPopupComponent.openPopup(this.popupService, this.popup.key);
2223
+ };
2224
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2225
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentPopupComponent, selector: "ng-component", viewQueries: [{ propertyName: "content", first: true, predicate: DbxFirebaseDevelopmentPopupContentComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
2291
2226
  <dbx-popup-content>
2292
2227
  <dbx-popup-controls [header]="header" controls></dbx-popup-controls>
2293
2228
  <dbx-firebase-development-popup-content (shouldClose)="closePopup()"></dbx-firebase-development-popup-content>
2294
2229
  </dbx-popup-content>
2295
- `, isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxPopupContentComponent, selector: "dbx-popup-content" }, { kind: "component", type: i1$2.DbxPopupControlsComponent, selector: "dbx-popup-controls", inputs: ["header"] }, { kind: "component", type: DbxFirebaseDevelopmentPopupContentComponent, selector: "dbx-firebase-development-popup-content" }] }); }
2230
+ `, isInline: true, dependencies: [{ kind: "component", type: i1.DbxPopupContentComponent, selector: "dbx-popup-content" }, { kind: "component", type: i1.DbxPopupControlsComponent, selector: "dbx-popup-controls", inputs: ["header"] }, { kind: "component", type: DbxFirebaseDevelopmentPopupContentComponent, selector: "dbx-firebase-development-popup-content" }] });
2296
2231
  }
2297
2232
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentPopupComponent, decorators: [{
2298
2233
  type: Component,
@@ -2304,7 +2239,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2304
2239
  </dbx-popup-content>
2305
2240
  `
2306
2241
  }]
2307
- }], ctorParameters: function () { return [{ type: i1$2.DbxPopupComponent }, { type: i1$2.DbxPopupService }]; }, propDecorators: { content: [{
2242
+ }], propDecorators: { content: [{
2308
2243
  type: ViewChild,
2309
2244
  args: [DbxFirebaseDevelopmentPopupContentComponent, { static: true }]
2310
2245
  }] } });
@@ -2319,11 +2254,12 @@ const DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN = new InjectionToken('DefaultDb
2319
2254
  * Default providers can be configured by the DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN injectable value.
2320
2255
  */
2321
2256
  class DbxFirebaseDevelopmentService {
2257
+ enabled;
2322
2258
  constructor(enabled) {
2323
2259
  this.enabled = enabled;
2324
2260
  }
2325
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentService, deps: [{ token: DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2326
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentService, providedIn: 'root' }); }
2261
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentService, deps: [{ token: DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2262
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentService, providedIn: 'root' });
2327
2263
  }
2328
2264
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentService, decorators: [{
2329
2265
  type: Injectable,
@@ -2341,11 +2277,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2341
2277
  * Directive for controlling and displaying
2342
2278
  */
2343
2279
  class DbxFirebaseDevelopmentDirective {
2344
- constructor(popupService, matSnackBar, dbxFirebaseDevelopmentService) {
2345
- this.popupService = popupService;
2346
- this.matSnackBar = matSnackBar;
2347
- this.dbxFirebaseDevelopmentService = dbxFirebaseDevelopmentService;
2348
- }
2280
+ popupService = inject(DbxPopupService);
2281
+ matSnackBar = inject(MatSnackBar);
2282
+ dbxFirebaseDevelopmentService = inject(DbxFirebaseDevelopmentService);
2283
+ ref;
2349
2284
  get enabled() {
2350
2285
  return this.dbxFirebaseDevelopmentService.enabled;
2351
2286
  }
@@ -2396,15 +2331,15 @@ class DbxFirebaseDevelopmentDirective {
2396
2331
  ngOnDestroy() {
2397
2332
  this.closePopup();
2398
2333
  }
2399
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentDirective, deps: [{ token: i1$2.DbxPopupService }, { token: i2$3.MatSnackBar }, { token: DbxFirebaseDevelopmentService }], target: i0.ɵɵFactoryTarget.Directive }); }
2400
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentDirective, selector: "[dbxFirebaseDevelopment]", host: { listeners: { "window:keydown": "handleKeyboardEvent($event)" } }, ngImport: i0 }); }
2334
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2335
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDevelopmentDirective, selector: "[dbxFirebaseDevelopment]", host: { listeners: { "window:keydown": "handleKeyboardEvent($event)" } }, ngImport: i0 });
2401
2336
  }
2402
2337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentDirective, decorators: [{
2403
2338
  type: Directive,
2404
2339
  args: [{
2405
2340
  selector: '[dbxFirebaseDevelopment]'
2406
2341
  }]
2407
- }], ctorParameters: function () { return [{ type: i1$2.DbxPopupService }, { type: i2$3.MatSnackBar }, { type: DbxFirebaseDevelopmentService }]; }, propDecorators: { handleKeyboardEvent: [{
2342
+ }], propDecorators: { handleKeyboardEvent: [{
2408
2343
  type: HostListener,
2409
2344
  args: ['window:keydown', ['$event']]
2410
2345
  }] } });
@@ -2415,9 +2350,9 @@ class DbxFirebaseDevelopmentModuleRootConfig {
2415
2350
  * Contains components related to logging in.
2416
2351
  */
2417
2352
  class DbxFirebaseDevelopmentModule {
2418
- constructor(dbxFirebaseDevelopmentSchedulerService) {
2419
- this.dbxFirebaseDevelopmentSchedulerService = dbxFirebaseDevelopmentSchedulerService;
2420
- dbxFirebaseDevelopmentSchedulerService.init();
2353
+ dbxFirebaseDevelopmentSchedulerService = inject(DbxFirebaseDevelopmentSchedulerService);
2354
+ constructor() {
2355
+ this.dbxFirebaseDevelopmentSchedulerService.init();
2421
2356
  }
2422
2357
  static forRoot(config) {
2423
2358
  let entries = config.entries;
@@ -2442,8 +2377,8 @@ class DbxFirebaseDevelopmentModule {
2442
2377
  ]
2443
2378
  };
2444
2379
  }
2445
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentModule, deps: [{ token: DbxFirebaseDevelopmentSchedulerService }], target: i0.ɵɵFactoryTarget.NgModule }); }
2446
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentModule, declarations: [
2380
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2381
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentModule, declarations: [
2447
2382
  //
2448
2383
  DbxFirebaseDevelopmentPopupContentFormComponent,
2449
2384
  DbxFirebaseDevelopmentDirective,
@@ -2460,8 +2395,8 @@ class DbxFirebaseDevelopmentModule {
2460
2395
  DbxFirebaseDevelopmentSchedulerWidgetComponent,
2461
2396
  DbxFirebaseDevelopmentSchedulerListComponent,
2462
2397
  DbxFirebaseDevelopmentSchedulerListViewComponent,
2463
- DbxFirebaseDevelopmentSchedulerListViewItemComponent] }); }
2464
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentModule, imports: [CommonModule, MatIconModule, DbxWidgetModule, DbxTextModule, DbxBlockLayoutModule, DbxTwoColumnLayoutModule, MatButtonModule, DbxRouterAnchorModule, DbxPopupInteractionModule, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxInjectionComponentModule, DbxListLayoutModule] }); }
2398
+ DbxFirebaseDevelopmentSchedulerListViewItemComponent] });
2399
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentModule, imports: [CommonModule, MatIconModule, DbxWidgetModule, DbxTextModule, DbxBlockLayoutModule, DbxTwoColumnLayoutModule, MatButtonModule, DbxRouterAnchorModule, DbxPopupInteractionModule, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxInjectionComponentModule, DbxListLayoutModule] });
2465
2400
  }
2466
2401
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDevelopmentModule, decorators: [{
2467
2402
  type: NgModule,
@@ -2489,7 +2424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2489
2424
  DbxFirebaseDevelopmentSchedulerListViewItemComponent
2490
2425
  ]
2491
2426
  }]
2492
- }], ctorParameters: function () { return [{ type: DbxFirebaseDevelopmentSchedulerService }]; } });
2427
+ }], ctorParameters: function () { return []; } });
2493
2428
 
2494
2429
  /**
2495
2430
  * Token to access the FirestoreContext value.
@@ -2534,9 +2469,9 @@ class DbxFirebaseFirestoreCollectionModule {
2534
2469
  providers
2535
2470
  };
2536
2471
  }
2537
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFirestoreCollectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2538
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFirestoreCollectionModule }); }
2539
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFirestoreCollectionModule }); }
2472
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFirestoreCollectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2473
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFirestoreCollectionModule });
2474
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFirestoreCollectionModule });
2540
2475
  }
2541
2476
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFirestoreCollectionModule, decorators: [{
2542
2477
  type: NgModule
@@ -2546,21 +2481,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2546
2481
  * Service that provides access to the app's FirestoreContext.
2547
2482
  */
2548
2483
  class DbxFirestoreContextService {
2549
- constructor(firestoreContext) {
2550
- this.firestoreContext = firestoreContext;
2551
- }
2552
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirestoreContextService, deps: [{ token: DBX_FIRESTORE_CONTEXT_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
2553
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirestoreContextService, providedIn: 'root' }); }
2484
+ firestoreContext = inject(DBX_FIRESTORE_CONTEXT_TOKEN);
2485
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirestoreContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2486
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirestoreContextService, providedIn: 'root' });
2554
2487
  }
2555
2488
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirestoreContextService, decorators: [{
2556
2489
  type: Injectable,
2557
2490
  args: [{
2558
2491
  providedIn: 'root'
2559
2492
  }]
2560
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2561
- type: Inject,
2562
- args: [DBX_FIRESTORE_CONTEXT_TOKEN]
2563
- }] }]; } });
2493
+ }] });
2564
2494
 
2565
2495
  /**
2566
2496
  * Used to initialize the LazyFirebaseFunctions type for a DbxFirebase app.
@@ -2612,47 +2542,45 @@ class DbxFirebaseFunctionsModule {
2612
2542
  providers
2613
2543
  };
2614
2544
  }
2615
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFunctionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2616
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFunctionsModule }); }
2617
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFunctionsModule }); }
2545
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFunctionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2546
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFunctionsModule });
2547
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFunctionsModule });
2618
2548
  }
2619
2549
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseFunctionsModule, decorators: [{
2620
2550
  type: NgModule
2621
2551
  }] });
2622
2552
 
2623
- /**
2624
- * DbxFirebaseCollectionChangeWatcher instance
2625
- */
2626
- class DbxFirebaseCollectionChangeWatcherInstance {
2627
- constructor(store, _initialMode = 'off') {
2628
- this.store = store;
2629
- this._initialMode = _initialMode;
2630
- this._mode = new BehaviorSubject(this._initialMode);
2631
- this._sub = new SubscriptionObject();
2632
- this.mode$ = this._mode.pipe(distinctUntilChanged());
2633
- this.event$ = this.store.queryChangeWatcher$.pipe(switchMap((x) => x.event$.pipe(filter((x) => x.type !== 'none'), // do not share 'none' events.
2634
- take(1), // only need one event to mark as change is available.
2635
- startWith({
2636
- time: new Date(),
2637
- type: 'none'
2638
- }))), shareReplay(1));
2639
- this.hasChangeAvailable$ = this.event$.pipe(map((x) => x.type !== 'none'), shareReplay(1));
2640
- this.triggered$ = combineLatest([this.mode$, this.hasChangeAvailable$]).pipe(map(([mode, hasChange]) => mode === 'auto' && hasChange));
2641
- this.trigger$ = this.triggered$.pipe(filter((triggered) => triggered), map(() => undefined));
2642
- }
2643
- destroy() {
2644
- this._sub.destroy();
2645
- this._mode.complete();
2646
- }
2647
- get mode() {
2648
- return this._mode.value;
2649
- }
2650
- set mode(mode) {
2651
- this._mode.next(mode);
2652
- }
2653
- }
2654
- function dbxFirebaseCollectionChangeWatcher(store, mode) {
2655
- return new DbxFirebaseCollectionChangeWatcherInstance(store, mode);
2553
+ function dbxFirebaseCollectionChangeWatcher(store, initialMode) {
2554
+ const _mode = new BehaviorSubject(initialMode ?? 'off');
2555
+ const _sub = new SubscriptionObject();
2556
+ const mode$ = _mode.pipe(distinctUntilChanged());
2557
+ const event$ = store.queryChangeWatcher$.pipe(switchMap((x) => x.event$.pipe(filter((x) => x.type !== 'none'), // do not share 'none' events.
2558
+ take(1), // only need one event to mark as change is available.
2559
+ startWith({
2560
+ time: new Date(),
2561
+ type: 'none'
2562
+ }))), shareReplay(1));
2563
+ const hasChangeAvailable$ = event$.pipe(map((x) => x.type !== 'none'), shareReplay(1));
2564
+ const triggered$ = combineLatest([mode$, hasChangeAvailable$]).pipe(map(([mode, hasChange]) => mode === 'auto' && hasChange));
2565
+ const trigger$ = triggered$.pipe(filter((triggered) => triggered), map(() => undefined));
2566
+ function destroy() {
2567
+ _sub.destroy();
2568
+ _mode.complete();
2569
+ }
2570
+ function setMode(mode) {
2571
+ _mode.next(mode);
2572
+ }
2573
+ const instance = {
2574
+ store,
2575
+ mode$,
2576
+ event$,
2577
+ hasChangeAvailable$,
2578
+ triggered$,
2579
+ trigger$,
2580
+ destroy,
2581
+ setMode
2582
+ };
2583
+ return instance;
2656
2584
  }
2657
2585
 
2658
2586
  /**
@@ -2663,10 +2591,12 @@ function dbxFirebaseCollectionChangeWatcher(store, mode) {
2663
2591
  */
2664
2592
  const DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION = (instance) => instance.watcher.store.restart();
2665
2593
  class DbxFirebaseCollectionChangeTriggerInstance {
2594
+ config;
2595
+ watcher;
2596
+ _triggerFunction = new BehaviorSubject(undefined);
2597
+ _sub = new SubscriptionObject();
2666
2598
  constructor(config) {
2667
2599
  this.config = config;
2668
- this._triggerFunction = new BehaviorSubject(undefined);
2669
- this._sub = new SubscriptionObject();
2670
2600
  this.watcher = config.watcher;
2671
2601
  this.triggerFunction = config.triggerFunction ?? DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION;
2672
2602
  }
@@ -2731,50 +2661,55 @@ function dbxFirebaseCollectionChangeTrigger(config) {
2731
2661
  * DbxFirebaseModelLoader implementation within an instance.
2732
2662
  */
2733
2663
  class DbxFirebaseCollectionLoaderInstance {
2664
+ _initConfig;
2665
+ _collection = new BehaviorSubject(undefined);
2666
+ _maxPages = new BehaviorSubject(undefined);
2667
+ _itemsPerPage = new BehaviorSubject(undefined);
2668
+ _constraints = new BehaviorSubject(undefined);
2669
+ _restart = new Subject();
2670
+ _maxPagesSub = new SubscriptionObject();
2671
+ collection$ = this._collection.pipe(distinctUntilChanged());
2672
+ constraints$ = this._constraints.pipe(distinctUntilChanged());
2673
+ iteratorFilter$ = combineLatest([this._itemsPerPage.pipe(distinctUntilChanged()), this.constraints$]).pipe(map(([limit, constraints]) => ({ limit, constraints, maxPageLoadLimit: this.maxPages })), shareReplay(1));
2674
+ firestoreIteration$ = this.collection$.pipe(switchMap((collection) => {
2675
+ if (collection) {
2676
+ return combineLatest([this.iteratorFilter$, this._restart.pipe(startWith(undefined))]).pipe(throttleTime(100, undefined, { trailing: true }), // prevent rapid changes and executing filters too quickly.
2677
+ map(([iteratorFilter]) => collection.firestoreIteration(iteratorFilter)), cleanupDestroyable(), // cleanup the iteration
2678
+ shareReplay(1));
2679
+ }
2680
+ else {
2681
+ return NEVER; // don't emit anything until collection is provided.
2682
+ }
2683
+ }), cleanupDestroyable(), // cleanup the iteration
2684
+ shareReplay(1));
2685
+ queryChangeWatcher$ = this.firestoreIteration$.pipe(map((instance) => iterationQueryDocChangeWatcher({ instance })), shareReplay(1));
2686
+ snapshotAccumulator$ = this.firestoreIteration$.pipe(map((x) => firebaseQuerySnapshotAccumulator(x)), cleanupDestroyable(), shareReplay(1));
2687
+ snapshotAccumulatorDocumentRefs$ = this.snapshotAccumulator$.pipe(switchMap((x) => x.allItems$.pipe(map((y) => y.map((z) => z.map((zz) => zz.ref))))), shareReplay(1));
2688
+ snapshotAccumulatorDocuments$ = combineLatest([this.collection$.pipe(filterMaybe()), this.snapshotAccumulatorDocumentRefs$]).pipe(map(([collection, documentRefs]) => {
2689
+ const accessor = collection.documentAccessor();
2690
+ return documentRefs.map((y) => y.map((z) => accessor.loadDocument(z)));
2691
+ }), shareReplay(1));
2692
+ accumulator$ = this.firestoreIteration$.pipe(map((x) => firebaseQueryItemAccumulator(x)), cleanupDestroyable(), shareReplay(1));
2693
+ accumulatorPage$ = this.accumulator$.pipe(switchMap((x) => pageItemAccumulatorCurrentPage(x)), shareReplay(1));
2694
+ /**
2695
+ * Passthrough for currentAllItems$ from the accumulator.
2696
+ */
2697
+ currentAccumulatorItems$ = this.accumulator$.pipe(switchMap((x) => x.currentAllItems$), shareReplay(1));
2698
+ /**
2699
+ * Passthrough for allItems$ from the accumulator.
2700
+ */
2701
+ accumulatorItems$ = this.accumulator$.pipe(switchMap((x) => x.allItems$), shareReplay(1));
2702
+ hasDocuments$ = this.firestoreIteration$.pipe(switchMap((x) => x.firstState$.pipe(map((x) => Boolean(x.value?.length)))), shareReplay(1));
2703
+ allDocumentRefs$ = this.snapshotAccumulatorDocumentRefs$.pipe(map((x) => x.flat()), shareReplay(1));
2704
+ allDocuments$ = this.snapshotAccumulatorDocuments$.pipe(map((x) => x.flat()), shareReplay(1));
2705
+ allDocumentData$ = this.accumulatorItems$.pipe(map((x) => x.flat()), shareReplay(1));
2706
+ pageLoadingState$ = this.accumulator$.pipe(switchMap((x) => accumulatorFlattenPageListLoadingState(x)), shareReplay(1));
2734
2707
  constructor(_initConfig) {
2735
2708
  this._initConfig = _initConfig;
2736
- this._collection = new BehaviorSubject(this._initConfig?.collection);
2737
- this._maxPages = new BehaviorSubject(this._initConfig?.maxPages);
2738
- this._itemsPerPage = new BehaviorSubject(this._initConfig?.itemsPerPage);
2739
- this._constraints = new BehaviorSubject(this._initConfig?.constraints);
2740
- this._restart = new Subject();
2741
- this._maxPagesSub = new SubscriptionObject();
2742
- this.collection$ = this._collection.pipe(distinctUntilChanged());
2743
- this.constraints$ = this._constraints.pipe(distinctUntilChanged());
2744
- this.iteratorFilter$ = combineLatest([this._itemsPerPage.pipe(distinctUntilChanged()), this.constraints$]).pipe(map(([limit, constraints]) => ({ limit, constraints, maxPageLoadLimit: this.maxPages })), shareReplay(1));
2745
- this.firestoreIteration$ = this.collection$.pipe(switchMap((collection) => {
2746
- if (collection) {
2747
- return combineLatest([this.iteratorFilter$, this._restart.pipe(startWith(undefined))]).pipe(throttleTime(100, undefined, { trailing: true }), // prevent rapid changes and executing filters too quickly.
2748
- map(([iteratorFilter]) => collection.firestoreIteration(iteratorFilter)), cleanupDestroyable(), // cleanup the iteration
2749
- shareReplay(1));
2750
- }
2751
- else {
2752
- return NEVER; // don't emit anything until collection is provided.
2753
- }
2754
- }), cleanupDestroyable(), // cleanup the iteration
2755
- shareReplay(1));
2756
- this.queryChangeWatcher$ = this.firestoreIteration$.pipe(map((instance) => iterationQueryDocChangeWatcher({ instance })), shareReplay(1));
2757
- this.snapshotAccumulator$ = this.firestoreIteration$.pipe(map((x) => firebaseQuerySnapshotAccumulator(x)), cleanupDestroyable(), shareReplay(1));
2758
- this.snapshotAccumulatorDocumentRefs$ = this.snapshotAccumulator$.pipe(switchMap((x) => x.allItems$.pipe(map((y) => y.map((z) => z.map((zz) => zz.ref))))), shareReplay(1));
2759
- this.snapshotAccumulatorDocuments$ = combineLatest([this.collection$.pipe(filterMaybe()), this.snapshotAccumulatorDocumentRefs$]).pipe(map(([collection, documentRefs]) => {
2760
- const accessor = collection.documentAccessor();
2761
- return documentRefs.map((y) => y.map((z) => accessor.loadDocument(z)));
2762
- }), shareReplay(1));
2763
- this.accumulator$ = this.firestoreIteration$.pipe(map((x) => firebaseQueryItemAccumulator(x)), cleanupDestroyable(), shareReplay(1));
2764
- this.accumulatorPage$ = this.accumulator$.pipe(switchMap((x) => pageItemAccumulatorCurrentPage(x)), shareReplay(1));
2765
- /**
2766
- * Passthrough for currentAllItems$ from the accumulator.
2767
- */
2768
- this.currentAccumulatorItems$ = this.accumulator$.pipe(switchMap((x) => x.currentAllItems$), shareReplay(1));
2769
- /**
2770
- * Passthrough for allItems$ from the accumulator.
2771
- */
2772
- this.accumulatorItems$ = this.accumulator$.pipe(switchMap((x) => x.allItems$), shareReplay(1));
2773
- this.hasDocuments$ = this.firestoreIteration$.pipe(switchMap((x) => x.firstState$.pipe(map((x) => Boolean(x.value?.length)))), shareReplay(1));
2774
- this.allDocumentRefs$ = this.snapshotAccumulatorDocumentRefs$.pipe(map((x) => x.flat()), shareReplay(1));
2775
- this.allDocuments$ = this.snapshotAccumulatorDocuments$.pipe(map((x) => x.flat()), shareReplay(1));
2776
- this.allDocumentData$ = this.accumulatorItems$.pipe(map((x) => x.flat()), shareReplay(1));
2777
- this.pageLoadingState$ = this.accumulator$.pipe(switchMap((x) => accumulatorFlattenPageListLoadingState(x)), shareReplay(1));
2709
+ this._collection.next(this._initConfig?.collection);
2710
+ this._maxPages.next(this._initConfig?.maxPages);
2711
+ this._itemsPerPage.next(this._initConfig?.itemsPerPage);
2712
+ this._constraints.next(this._initConfig?.constraints);
2778
2713
  }
2779
2714
  init() {
2780
2715
  // When max pages changes, update the iteration's max page limit.
@@ -2861,28 +2796,30 @@ function dbxFirebaseCollectionLoaderInstanceWithCollection(collection) {
2861
2796
  * DbxLimitedFirebaseDocumentLoader implementation within an instance.
2862
2797
  */
2863
2798
  class DbxLimitedFirebaseDocumentLoaderInstance {
2799
+ _initConfig;
2800
+ accessor;
2801
+ _documents = new BehaviorSubject(undefined);
2802
+ _restart = new Subject();
2803
+ _sub = new SubscriptionObject();
2804
+ documents$ = this._documents.pipe(filterMaybe(), distinctUntilChanged());
2805
+ keys$ = this.documents$.pipe(map(firestoreModelKeysFromDocuments));
2806
+ ids$ = this.documents$.pipe(map(firestoreModelIdsFromDocuments));
2807
+ refs$ = this.documents$.pipe(map(documentReferencesFromDocuments));
2808
+ snapshots$ = this.documents$.pipe(switchMap((docs) => this._restart.pipe(startWith(null), exhaustMap(() => getDocumentSnapshots(docs)))), shareReplay(1));
2809
+ data$ = this.snapshots$.pipe(map((snapshots) => getDataFromDocumentSnapshots(snapshots, true)), shareReplay(1));
2810
+ /**
2811
+ * Snapshot stream of the documents
2812
+ */
2813
+ snapshotsStream$ = this.documents$.pipe(switchMap((docs) => latestSnapshotsFromDocuments(docs)), shareReplay(1));
2814
+ /**
2815
+ * Data streamd of the documents.
2816
+ */
2817
+ dataStream$ = this.snapshotsStream$.pipe(dataFromDocumentSnapshots(), shareReplay(1));
2818
+ pageLoadingState$ = pageLoadingStateFromObs(this.data$, false);
2819
+ pageLoadingStateStream$ = pageLoadingStateFromObs(this.dataStream$, false);
2864
2820
  constructor(_initConfig) {
2865
2821
  this._initConfig = _initConfig;
2866
2822
  this.accessor = this._initConfig.accessor;
2867
- this._documents = new BehaviorSubject(undefined);
2868
- this._restart = new Subject();
2869
- this._sub = new SubscriptionObject();
2870
- this.documents$ = this._documents.pipe(filterMaybe(), distinctUntilChanged());
2871
- this.keys$ = this.documents$.pipe(map(firestoreModelKeysFromDocuments));
2872
- this.ids$ = this.documents$.pipe(map(firestoreModelIdsFromDocuments));
2873
- this.refs$ = this.documents$.pipe(map(documentReferencesFromDocuments));
2874
- this.snapshots$ = this.documents$.pipe(switchMap((docs) => this._restart.pipe(startWith(null), exhaustMap(() => getDocumentSnapshots(docs)))), shareReplay(1));
2875
- this.data$ = this.snapshots$.pipe(map((snapshots) => getDataFromDocumentSnapshots(snapshots, true)), shareReplay(1));
2876
- /**
2877
- * Snapshot stream of the documents
2878
- */
2879
- this.snapshotsStream$ = this.documents$.pipe(switchMap((docs) => latestSnapshotsFromDocuments(docs)), shareReplay(1));
2880
- /**
2881
- * Data streamd of the documents.
2882
- */
2883
- this.dataStream$ = this.snapshotsStream$.pipe(dataFromDocumentSnapshots(), shareReplay(1));
2884
- this.pageLoadingState$ = pageLoadingStateFromObs(this.data$, false);
2885
- this.pageLoadingStateStream$ = pageLoadingStateFromObs(this.dataStream$, false);
2886
2823
  }
2887
2824
  destroy() {
2888
2825
  this._documents.complete();
@@ -2932,24 +2869,25 @@ function dbxFirebaseInContextFirebaseModelServiceInstanceFactory(context$) {
2932
2869
  * Wraps an InModelContextFirebaseModelService observable and provides different piped observables.
2933
2870
  */
2934
2871
  class DbxFirebaseInContextFirebaseModelServiceInstance {
2872
+ modelService$;
2935
2873
  constructor(modelService$) {
2936
2874
  this.modelService$ = modelService$;
2937
- this.key$ = this.modelService$.pipe(map((x) => x.model.key));
2938
- // MARK: Model
2939
- this.modelType$ = this.modelService$.pipe(map((x) => x.model.modelType), distinctUntilChanged());
2940
- this.model$ = this.modelService$.pipe(map((x) => x.model), distinctUntilChanged((a, b) => a.key === b.key), shareReplay(1));
2941
- this.snapshotData$ = this.model$.pipe(switchMap((x) => x.snapshotData()), shareReplay(1));
2942
- // MARK: Roles
2943
- this.roleReader$ = this.modelService$.pipe(switchMap((x) => x.roleReader()), shareReplay(1));
2944
- this.roleMap$ = this.roleReader$.pipe(map((x) => x.roleMap), shareReplay(1));
2945
- this.hasNoAccess$ = this.roleReader$.pipe(map((x) => x.hasNoAccess()), shareReplay(1));
2946
2875
  }
2876
+ key$ = this.modelService$.pipe(map((x) => x.model.key));
2877
+ // MARK: Model
2878
+ modelType$ = this.modelService$.pipe(map((x) => x.model.modelType), distinctUntilChanged());
2879
+ model$ = this.modelService$.pipe(map((x) => x.model), distinctUntilChanged((a, b) => a.key === b.key), shareReplay(1));
2880
+ snapshotData$ = this.model$.pipe(switchMap((x) => x.snapshotData()), shareReplay(1));
2947
2881
  snapshotStream(mode) {
2948
2882
  return this.model$.pipe(switchMap((x) => x.snapshotStream(mode)), shareReplay(1));
2949
2883
  }
2950
2884
  snapshotDataStream(mode, options) {
2951
2885
  return this.model$.pipe(switchMap((x) => x.snapshotDataStream(mode)), shareReplay(1));
2952
2886
  }
2887
+ // MARK: Roles
2888
+ roleReader$ = this.modelService$.pipe(switchMap((x) => x.roleReader()), shareReplay(1));
2889
+ roleMap$ = this.roleReader$.pipe(map((x) => x.roleMap), shareReplay(1));
2890
+ hasNoAccess$ = this.roleReader$.pipe(map((x) => x.hasNoAccess()), shareReplay(1));
2953
2891
  truthMap(input) {
2954
2892
  return this.roleReader$.pipe(map((x) => x.truthMap(input)), shareReplay(1));
2955
2893
  }
@@ -3019,11 +2957,11 @@ class DbxFirebaseModelTypesServiceConfig {
3019
2957
  * Automatically configures the DbxModelTypesService.
3020
2958
  */
3021
2959
  class DbxFirebaseModelTypesService {
3022
- constructor(dbxFirebaseModelContextService, dbxModelTypesService, config) {
3023
- this.dbxFirebaseModelContextService = dbxFirebaseModelContextService;
3024
- this.dbxModelTypesService = dbxModelTypesService;
3025
- if (config) {
3026
- this.register(config.entries);
2960
+ dbxFirebaseModelContextService = inject(DbxFirebaseModelContextService);
2961
+ dbxModelTypesService = inject((DbxModelTypesService));
2962
+ constructor(initialConfig) {
2963
+ if (initialConfig) {
2964
+ this.register(initialConfig.entries);
3027
2965
  }
3028
2966
  }
3029
2967
  getDisplayInfo(typeInfo, data) {
@@ -3063,21 +3001,24 @@ class DbxFirebaseModelTypesService {
3063
3001
  }));
3064
3002
  }
3065
3003
  instanceForKey(key$) {
3066
- return new DbxFirebaseModelTypesServiceInstance(this.dbxFirebaseModelContextService.modelInfoInstance(key$), this);
3004
+ return dbxFirebaseModelTypesServiceInstance(this.dbxFirebaseModelContextService.modelInfoInstance(key$), this);
3067
3005
  }
3068
3006
  instancePairsForKeys(keys) {
3069
3007
  return dbxFirebaseModelTypesServiceInstancePairForKeysFactory(this)(keys);
3070
3008
  }
3071
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, deps: [{ token: DbxFirebaseModelContextService }, { token: i1$2.DbxModelTypesService }, { token: DbxFirebaseModelTypesServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
3072
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, providedIn: 'root' }); }
3009
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, deps: [{ token: DbxFirebaseModelTypesServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
3010
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, providedIn: 'root' });
3073
3011
  }
3074
3012
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesService, decorators: [{
3075
3013
  type: Injectable,
3076
3014
  args: [{
3077
3015
  providedIn: 'root'
3078
3016
  }]
3079
- }], ctorParameters: function () { return [{ type: DbxFirebaseModelContextService }, { type: i1$2.DbxModelTypesService }, { type: DbxFirebaseModelTypesServiceConfig, decorators: [{
3017
+ }], ctorParameters: function () { return [{ type: DbxFirebaseModelTypesServiceConfig, decorators: [{
3080
3018
  type: Optional
3019
+ }, {
3020
+ type: Inject,
3021
+ args: [DbxFirebaseModelTypesServiceConfig]
3081
3022
  }] }]; } });
3082
3023
  function dbxFirebaseModelTypesServiceInstancePairForKeysFactory(service) {
3083
3024
  return (keys) => {
@@ -3085,36 +3026,49 @@ function dbxFirebaseModelTypesServiceInstancePairForKeysFactory(service) {
3085
3026
  return instances.length ? combineLatest(instances) : of([]);
3086
3027
  };
3087
3028
  }
3088
- /**
3089
- * DbxFirebaseModelTypesService instance
3090
- */
3091
- class DbxFirebaseModelTypesServiceInstance {
3092
- constructor(modelInfoInstance$, dbxFirebaseModelTypesService) {
3093
- this.modelInfoInstance$ = modelInfoInstance$;
3094
- this.dbxFirebaseModelTypesService = dbxFirebaseModelTypesService;
3095
- this.key$ = this.modelInfoInstance$.pipe(switchMap((x) => x.key$));
3096
- this.modelType$ = this.modelInfoInstance$.pipe(switchMap((x) => x.modelType$));
3097
- this.snapshotData$ = this.modelInfoInstance$.pipe(switchMap((x) => x.snapshotData$));
3098
- this.typeInfo$ = this.modelType$.pipe(switchMap((x) => this.dbxFirebaseModelTypesService.infoForType(x)), distinctUntilChanged(), shareReplay(1));
3099
- this.identity$ = this.typeInfo$.pipe(map((x) => x.identity), distinctUntilChanged());
3100
- this.segueRef$ = combineLatest([this.key$, this.typeInfo$]).pipe(map(([key, info]) => (info.sref ? info.sref(key) : undefined)), shareReplay(1));
3101
- this.displayInfo$ = combineLatest([this.typeInfo$, this.snapshotData$]).pipe(map(([typeInfo, data]) => this.dbxFirebaseModelTypesService.getDisplayInfo(typeInfo, data)), shareReplay(1));
3102
- this.clickableSegueRef$ = combineLatest([this.segueRef$, this.displayInfo$]).pipe(map(([segueRef, displayInfo]) => {
3103
- let ref = undefined;
3104
- if (segueRef) {
3105
- ref = {
3106
- ...segueRef,
3107
- title: displayInfo.title,
3108
- icon: displayInfo.icon
3109
- };
3110
- }
3111
- return ref;
3112
- }), shareReplay(1));
3113
- this.instancePair$ = combineLatest([this.clickableSegueRef$, this.displayInfo$, this.key$]).pipe(map(([segueRef, displayInfo, key]) => ({ segueRef, displayInfo, key, instance: this })), shareReplay(1));
3114
- }
3029
+ function dbxFirebaseModelTypesServiceInstance(modelInfoInstance$, dbxFirebaseModelTypesService) {
3030
+ const key$ = modelInfoInstance$.pipe(switchMap((x) => x.key$));
3031
+ const modelType$ = modelInfoInstance$.pipe(switchMap((x) => x.modelType$));
3032
+ const snapshotData$ = modelInfoInstance$.pipe(switchMap((x) => x.snapshotData$));
3033
+ const typeInfo$ = modelType$.pipe(switchMap((x) => dbxFirebaseModelTypesService.infoForType(x)), distinctUntilChanged(), shareReplay(1));
3034
+ const identity$ = typeInfo$.pipe(map((x) => x.identity), distinctUntilChanged());
3035
+ const segueRef$ = combineLatest([key$, typeInfo$]).pipe(map(([key, info]) => (info.sref ? info.sref(key) : undefined)), shareReplay(1));
3036
+ const displayInfo$ = combineLatest([typeInfo$, snapshotData$]).pipe(map(([typeInfo, data]) => dbxFirebaseModelTypesService.getDisplayInfo(typeInfo, data)), shareReplay(1));
3037
+ const clickableSegueRef$ = combineLatest([segueRef$, displayInfo$]).pipe(map(([segueRef, displayInfo]) => {
3038
+ let ref = undefined;
3039
+ if (segueRef) {
3040
+ ref = {
3041
+ ...segueRef,
3042
+ title: displayInfo.title,
3043
+ icon: displayInfo.icon
3044
+ };
3045
+ }
3046
+ return ref;
3047
+ }), shareReplay(1));
3048
+ const instancePair$ = combineLatest([clickableSegueRef$, displayInfo$, key$]).pipe(map(([segueRef, displayInfo, key]) => ({ segueRef, displayInfo, key, instance })), shareReplay(1));
3049
+ const instance = {
3050
+ modelInfoInstance$,
3051
+ dbxFirebaseModelTypesService,
3052
+ key$,
3053
+ modelType$,
3054
+ snapshotData$,
3055
+ typeInfo$,
3056
+ identity$,
3057
+ segueRef$,
3058
+ displayInfo$,
3059
+ clickableSegueRef$,
3060
+ instancePair$
3061
+ };
3062
+ return instance;
3115
3063
  }
3116
3064
 
3117
3065
  class DbxFirebaseModelTrackerService {
3066
+ dbxModelTrackerService = inject(DbxModelTrackerService);
3067
+ dbxFirebaseModelTypesService = inject(DbxFirebaseModelTypesService);
3068
+ historyKeys$ = this.dbxModelTrackerService.newEvent$.pipe(startWith(null), switchMap(() => this.loadHistoryKeys()), shareReplay(1));
3069
+ historyPairs$ = this.dbxModelTrackerService.newEvent$.pipe(startWith(null), switchMap(() => this.loadHistoryPairs()), // TODO: Improve efficiency of this to only load/remove items for new keys
3070
+ shareReplay(1));
3071
+ filterItemHistoryPairs$ = this.historyPairs$.pipe(mapEachAsync((instancePair) => instancePair.instance.identity$.pipe(map((identity) => ({ instancePair, identity }))), { onlyFirst: true }), shareReplay(1));
3118
3072
  /**
3119
3073
  * Filters from historyPairs$ using the input filter configuration, if it is provided.
3120
3074
  *
@@ -3149,23 +3103,15 @@ class DbxFirebaseModelTrackerService {
3149
3103
  const historyKeys$ = this.loadHistoryKeys();
3150
3104
  return historyKeys$.pipe(switchMap((x) => this.dbxFirebaseModelTypesService.instancePairsForKeys(x)));
3151
3105
  }
3152
- constructor(dbxModelTrackerService, dbxFirebaseModelTypesService) {
3153
- this.dbxModelTrackerService = dbxModelTrackerService;
3154
- this.dbxFirebaseModelTypesService = dbxFirebaseModelTypesService;
3155
- this.historyKeys$ = this.dbxModelTrackerService.newEvent$.pipe(startWith(null), switchMap(() => this.loadHistoryKeys()), shareReplay(1));
3156
- this.historyPairs$ = this.dbxModelTrackerService.newEvent$.pipe(startWith(null), switchMap(() => this.loadHistoryPairs()), // TODO: Improve efficiency of this to only load/remove items for new keys
3157
- shareReplay(1));
3158
- this.filterItemHistoryPairs$ = this.historyPairs$.pipe(mapEachAsync((instancePair) => instancePair.instance.identity$.pipe(map((identity) => ({ instancePair, identity }))), { onlyFirst: true }), shareReplay(1));
3159
- }
3160
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, deps: [{ token: i1$2.DbxModelTrackerService }, { token: DbxFirebaseModelTypesService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3161
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, providedIn: 'root' }); }
3106
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3107
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, providedIn: 'root' });
3162
3108
  }
3163
3109
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTrackerService, decorators: [{
3164
3110
  type: Injectable,
3165
3111
  args: [{
3166
3112
  providedIn: 'root'
3167
3113
  }]
3168
- }], ctorParameters: function () { return [{ type: i1$2.DbxModelTrackerService }, { type: DbxFirebaseModelTypesService }]; } });
3114
+ }] });
3169
3115
 
3170
3116
  /**
3171
3117
  * Renders an item as configured from the DbxFirebaseModelTypesServiceInstancePair.
@@ -3177,8 +3123,8 @@ class DbxFirebaseModelTypeInstanceComponent extends AbstractDbxSelectionListWrap
3177
3123
  defaultSelectionMode: 'view'
3178
3124
  });
3179
3125
  }
3180
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3181
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelTypeInstanceComponent, selector: "dbx-firebase-model-type-instance-list", providers: provideDbxListViewWrapper(DbxFirebaseModelTypeInstanceComponent), usesInheritance: true, ngImport: i0, template: "\n<dbx-list [state$]=\"state$\" [config]=\"config$ | async\" [disabled]=\"disabled\" [selectionMode]=\"selectionMode\">\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</dbx-list>\n", isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
3126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3127
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelTypeInstanceComponent, selector: "dbx-firebase-model-type-instance-list", providers: provideDbxListViewWrapper(DbxFirebaseModelTypeInstanceComponent), usesInheritance: true, ngImport: i0, template: "\n<dbx-list [state$]=\"state$\" [config]=\"config$ | async\" [disabled]=\"disabled\" [selectionMode]=\"selectionMode\">\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</dbx-list>\n", isInline: true, dependencies: [{ kind: "component", type: i1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
3182
3128
  }
3183
3129
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceComponent, decorators: [{
3184
3130
  type: Component,
@@ -3189,15 +3135,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3189
3135
  }]
3190
3136
  }], ctorParameters: function () { return []; } });
3191
3137
  class DbxFirebaseModelTypeInstanceViewComponent extends AbstractDbxSelectionListViewDirective {
3192
- constructor() {
3193
- super(...arguments);
3194
- this.config = {
3195
- componentClass: DbxFirebaseModelTypeInstanceViewItemComponent,
3196
- mapValuesToItemValues: (x) => of(x.map((y) => ({ itemValue: y, icon: y.displayInfo.icon ?? y.icon, anchor: y.segueRef })))
3197
- };
3198
- }
3199
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3200
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelTypeInstanceViewComponent, selector: "dbx-firebase-model-type-instance-list-view", providers: provideDbxListView(DbxFirebaseModelTypeInstanceViewComponent), usesInheritance: true, ngImport: i0, template: "<dbx-selection-list-view [config]=\"config\"></dbx-selection-list-view>", isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxSelectionValueListViewComponent, selector: "dbx-selection-list-view" }] }); }
3138
+ config = {
3139
+ componentClass: DbxFirebaseModelTypeInstanceViewItemComponent,
3140
+ mapValuesToItemValues: (x) => of(x.map((y) => ({ itemValue: y, icon: y.displayInfo.icon ?? y.icon, anchor: y.segueRef })))
3141
+ };
3142
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3143
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelTypeInstanceViewComponent, selector: "dbx-firebase-model-type-instance-list-view", providers: provideDbxListView(DbxFirebaseModelTypeInstanceViewComponent), usesInheritance: true, ngImport: i0, template: "<dbx-selection-list-view [config]=\"config\"></dbx-selection-list-view>", isInline: true, dependencies: [{ kind: "component", type: i1.DbxSelectionValueListViewComponent, selector: "dbx-selection-list-view" }] });
3201
3144
  }
3202
3145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewComponent, decorators: [{
3203
3146
  type: Component,
@@ -3211,10 +3154,10 @@ class DbxFirebaseModelTypeInstanceViewItemComponent extends AbstractDbxValueList
3211
3154
  get title() {
3212
3155
  return this.itemValue.displayInfo.title;
3213
3156
  }
3214
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3215
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelTypeInstanceViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3157
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelTypeInstanceViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3216
3159
  <span>{{ title }}</span>
3217
- `, isInline: true }); }
3160
+ `, isInline: true });
3218
3161
  }
3219
3162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypeInstanceViewItemComponent, decorators: [{
3220
3163
  type: Component,
@@ -3226,28 +3169,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3226
3169
  }] });
3227
3170
 
3228
3171
  class DbxFirebaseModelHistoryComponent {
3172
+ dbxFirebaseModelTrackerService = inject(DbxFirebaseModelTrackerService);
3173
+ _historyFilter = new BehaviorSubject(undefined);
3174
+ anchorForItem;
3229
3175
  get historyFilter() {
3230
3176
  return this._historyFilter.value;
3231
3177
  }
3232
3178
  set historyFilter(historyFilter) {
3233
3179
  this._historyFilter.next(historyFilter);
3234
3180
  }
3235
- constructor(dbxFirebaseModelTrackerService) {
3236
- this.dbxFirebaseModelTrackerService = dbxFirebaseModelTrackerService;
3237
- this._historyFilter = new BehaviorSubject(undefined);
3238
- this.historyFilter$ = this._historyFilter.asObservable();
3239
- this.historyPairs$ = this.historyFilter$.pipe(switchMap((x) => this.dbxFirebaseModelTrackerService.filterHistoryPairs(x)), shareReplay(1));
3240
- this.state$ = loadingStateFromObs(this.historyPairs$);
3241
- }
3181
+ historyFilter$ = this._historyFilter.asObservable();
3182
+ historyPairs$ = this.historyFilter$.pipe(switchMap((x) => this.dbxFirebaseModelTrackerService.filterHistoryPairs(x)), shareReplay(1));
3183
+ state$ = loadingStateFromObs(this.historyPairs$);
3242
3184
  ngOnDestroy() {
3243
3185
  this._historyFilter.complete();
3244
3186
  }
3245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryComponent, deps: [{ token: DbxFirebaseModelTrackerService }], target: i0.ɵɵFactoryTarget.Component }); }
3246
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelHistoryComponent, selector: "dbx-firebase-model-history", inputs: { anchorForItem: "anchorForItem", historyFilter: "historyFilter" }, ngImport: i0, template: `
3187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3188
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelHistoryComponent, selector: "dbx-firebase-model-history", inputs: { anchorForItem: "anchorForItem", historyFilter: "historyFilter" }, ngImport: i0, template: `
3247
3189
  <dbx-firebase-model-type-instance-list [state$]="state$" [dbxListItemModifier] [dbxListItemAnchorModifier]="anchorForItem">
3248
3190
  <ng-content empty select="[empty]"></ng-content>
3249
3191
  </dbx-firebase-model-type-instance-list>
3250
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$2.DbxListItemAnchorModifierDirective, selector: "[dbxListItemAnchorModifier]", inputs: ["dbxListItemAnchorModifier"] }, { kind: "directive", type: i1$2.DbxValueListItemModifierDirective, selector: "[dbxListItemModifier]", inputs: ["dbxListItemModifier"] }, { kind: "component", type: DbxFirebaseModelTypeInstanceComponent, selector: "dbx-firebase-model-type-instance-list" }] }); }
3192
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.DbxListItemAnchorModifierDirective, selector: "[dbxListItemAnchorModifier]", inputs: ["dbxListItemAnchorModifier"] }, { kind: "directive", type: i1.DbxValueListItemModifierDirective, selector: "[dbxListItemModifier]", inputs: ["dbxListItemModifier"] }, { kind: "component", type: DbxFirebaseModelTypeInstanceComponent, selector: "dbx-firebase-model-type-instance-list" }] });
3251
3193
  }
3252
3194
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryComponent, decorators: [{
3253
3195
  type: Component,
@@ -3259,7 +3201,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3259
3201
  </dbx-firebase-model-type-instance-list>
3260
3202
  `
3261
3203
  }]
3262
- }], ctorParameters: function () { return [{ type: DbxFirebaseModelTrackerService }]; }, propDecorators: { anchorForItem: [{
3204
+ }], propDecorators: { anchorForItem: [{
3263
3205
  type: Input
3264
3206
  }], historyFilter: [{
3265
3207
  type: Input
@@ -3281,9 +3223,6 @@ class DbxFirebaseModelHistoryPopoverComponent extends AbstractPopoverDirective {
3281
3223
  }
3282
3224
  });
3283
3225
  }
3284
- constructor(popover) {
3285
- super(popover);
3286
- }
3287
3226
  get params() {
3288
3227
  return this.popover.data;
3289
3228
  }
@@ -3302,25 +3241,24 @@ class DbxFirebaseModelHistoryPopoverComponent extends AbstractPopoverDirective {
3302
3241
  get anchorForItem() {
3303
3242
  return this.params.anchorForItem;
3304
3243
  }
3305
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryPopoverComponent, deps: [{ token: i1$2.DbxPopoverComponent }], target: i0.ɵɵFactoryTarget.Component }); }
3306
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelHistoryPopoverComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\"></dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-firebase-model-history [historyFilter]=\"historyFilter\" [anchorForItem]=\"anchorForItem\">\n <dbx-list-empty-content empty>\n <p>{{ emptyText }}</p>\n </dbx-list-empty-content>\n </dbx-firebase-model-history>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n", dependencies: [{ kind: "component", type: i1$2.DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: i1$2.DbxPopoverHeaderComponent, selector: "dbx-popover-header", inputs: ["header", "icon"] }, { kind: "component", type: i1$2.DbxPopoverScrollContentComponent, selector: "dbx-popover-scroll-content" }, { kind: "component", type: i1$2.DbxListEmptyContentComponent, selector: "dbx-list-empty-content" }, { kind: "component", type: DbxFirebaseModelHistoryComponent, selector: "dbx-firebase-model-history", inputs: ["anchorForItem", "historyFilter"] }] }); }
3244
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3245
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelHistoryPopoverComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\"></dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-firebase-model-history [historyFilter]=\"historyFilter\" [anchorForItem]=\"anchorForItem\">\n <dbx-list-empty-content empty>\n <p>{{ emptyText }}</p>\n </dbx-list-empty-content>\n </dbx-firebase-model-history>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n", dependencies: [{ kind: "component", type: i1.DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: i1.DbxPopoverHeaderComponent, selector: "dbx-popover-header", inputs: ["header", "icon"] }, { kind: "component", type: i1.DbxPopoverScrollContentComponent, selector: "dbx-popover-scroll-content" }, { kind: "component", type: i1.DbxListEmptyContentComponent, selector: "dbx-list-empty-content" }, { kind: "component", type: DbxFirebaseModelHistoryComponent, selector: "dbx-firebase-model-history", inputs: ["anchorForItem", "historyFilter"] }] });
3307
3246
  }
3308
3247
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryPopoverComponent, decorators: [{
3309
3248
  type: Component,
3310
3249
  args: [{ template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\"></dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-firebase-model-history [historyFilter]=\"historyFilter\" [anchorForItem]=\"anchorForItem\">\n <dbx-list-empty-content empty>\n <p>{{ emptyText }}</p>\n </dbx-list-empty-content>\n </dbx-firebase-model-history>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n" }]
3311
- }], ctorParameters: function () { return [{ type: i1$2.DbxPopoverComponent }]; } });
3250
+ }] });
3312
3251
 
3313
3252
  class DbxFirebaseModelHistoryPopoverButtonComponent extends AbstractPopoverRefDirective {
3314
- constructor(dbxPopoverService) {
3315
- super();
3316
- this.dbxPopoverService = dbxPopoverService;
3317
- }
3253
+ _dbxPopoverService = inject(DbxPopoverService);
3254
+ buttonElement;
3255
+ config;
3318
3256
  _makePopoverRef(origin) {
3319
3257
  const config = this.config;
3320
3258
  if (!origin) {
3321
3259
  throw new Error('Missing origin.');
3322
3260
  }
3323
- return DbxFirebaseModelHistoryPopoverComponent.openPopover(this.dbxPopoverService, {
3261
+ return DbxFirebaseModelHistoryPopoverComponent.openPopover(this._dbxPopoverService, {
3324
3262
  origin,
3325
3263
  ...config
3326
3264
  });
@@ -3329,10 +3267,10 @@ class DbxFirebaseModelHistoryPopoverButtonComponent extends AbstractPopoverRefDi
3329
3267
  const origin = this.buttonElement.nativeElement;
3330
3268
  this.showPopover(origin);
3331
3269
  }
3332
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryPopoverButtonComponent, deps: [{ token: i1$2.DbxPopoverService }], target: i0.ɵɵFactoryTarget.Component }); }
3333
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelHistoryPopoverButtonComponent, selector: "dbx-firebase-model-history-popover-button", inputs: { config: "config" }, viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
3270
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryPopoverButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3271
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseModelHistoryPopoverButtonComponent, selector: "dbx-firebase-model-history-popover-button", inputs: { config: "config" }, viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
3334
3272
  <dbx-icon-button #button (buttonClick)="showHistoryPopover()" icon="history"></dbx-icon-button>
3335
- `, isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxIconButtonComponent, selector: "dbx-icon-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3273
+ `, isInline: true, dependencies: [{ kind: "component", type: i1.DbxIconButtonComponent, selector: "dbx-icon-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3336
3274
  }
3337
3275
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryPopoverButtonComponent, decorators: [{
3338
3276
  type: Component,
@@ -3343,7 +3281,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3343
3281
  `,
3344
3282
  changeDetection: ChangeDetectionStrategy.OnPush
3345
3283
  }]
3346
- }], ctorParameters: function () { return [{ type: i1$2.DbxPopoverService }]; }, propDecorators: { buttonElement: [{
3284
+ }], propDecorators: { buttonElement: [{
3347
3285
  type: ViewChild,
3348
3286
  args: ['button', { read: ElementRef, static: false }]
3349
3287
  }], config: [{
@@ -3354,20 +3292,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3354
3292
  * Abstract directive that contains a DbxFirebaseDocumentStore and provides an interface for communicating with other directives.
3355
3293
  */
3356
3294
  class DbxFirebaseDocumentStoreDirective {
3295
+ store;
3357
3296
  constructor(store) {
3358
3297
  this.store = store;
3359
- this.exists$ = this.store.exists$;
3360
- this.document$ = this.store.document$;
3361
- this.documentLoadingState$ = this.store.documentLoadingState$;
3362
- this.id$ = this.store.id$;
3363
- this.key$ = this.store.key$;
3364
- this.ref$ = this.store.ref$;
3365
- this.snapshot$ = this.store.snapshot$;
3366
- this.snapshotLoadingState$ = this.store.snapshotLoadingState$;
3367
- this.modelIdentity$ = this.store.modelIdentity$;
3368
- this.data$ = this.store.data$;
3369
- this.loadingState$ = this.store.dataLoadingState$;
3370
3298
  }
3299
+ exists$ = this.store.exists$;
3300
+ document$ = this.store.document$;
3301
+ documentLoadingState$ = this.store.documentLoadingState$;
3302
+ id$ = this.store.id$;
3303
+ key$ = this.store.key$;
3304
+ ref$ = this.store.ref$;
3305
+ snapshot$ = this.store.snapshot$;
3306
+ snapshotLoadingState$ = this.store.snapshotLoadingState$;
3307
+ modelIdentity$ = this.store.modelIdentity$;
3308
+ data$ = this.store.data$;
3309
+ loadingState$ = this.store.dataLoadingState$;
3371
3310
  // MARK: Inputs
3372
3311
  set documentId(documentId) {
3373
3312
  this.store.setId(documentId);
@@ -3381,8 +3320,8 @@ class DbxFirebaseDocumentStoreDirective {
3381
3320
  set streamMode(streamMode) {
3382
3321
  this.store.setStreamMode(streamMode);
3383
3322
  }
3384
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
3385
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentStoreDirective, inputs: { documentId: "documentId", key: "key", ref: "ref", streamMode: "streamMode" }, ngImport: i0 }); }
3323
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
3324
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentStoreDirective, inputs: { documentId: "documentId", key: "key", ref: "ref", streamMode: "streamMode" }, ngImport: i0 });
3386
3325
  }
3387
3326
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreDirective, decorators: [{
3388
3327
  type: Directive
@@ -3412,13 +3351,11 @@ function provideDbxFirebaseDocumentStoreDirective(sourceType, storeType) {
3412
3351
  * Used with a DbxFirebaseDocumentStoreDirective to emit model viewed events.
3413
3352
  */
3414
3353
  class DbxfirebaseModelViewedEventDirective extends AbstractSubscriptionDirective {
3415
- constructor(dbxFirebaseDocumentStoreDirective, dbxModelObjectStateService, dbxFirebaseModelTypesService, ngZone) {
3416
- super();
3417
- this.dbxFirebaseDocumentStoreDirective = dbxFirebaseDocumentStoreDirective;
3418
- this.dbxModelObjectStateService = dbxModelObjectStateService;
3419
- this.dbxFirebaseModelTypesService = dbxFirebaseModelTypesService;
3420
- this.ngZone = ngZone;
3421
- }
3354
+ dbxFirebaseDocumentStoreDirective = inject(DbxFirebaseDocumentStoreDirective);
3355
+ dbxModelObjectStateService = inject(DbxModelObjectStateService);
3356
+ dbxFirebaseModelTypesService = inject(DbxFirebaseModelTypesService);
3357
+ ngZone = inject(NgZone);
3358
+ context;
3422
3359
  ngOnInit() {
3423
3360
  this.sub = this.dbxFirebaseDocumentStoreDirective.data$
3424
3361
  .pipe(
@@ -3436,24 +3373,24 @@ class DbxfirebaseModelViewedEventDirective extends AbstractSubscriptionDirective
3436
3373
  this.ngZone.run(() => this.dbxModelObjectStateService.emitModelViewEvent({ modelKeyTypeNamePair, context: this.context || undefined }));
3437
3374
  });
3438
3375
  }
3439
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxfirebaseModelViewedEventDirective, deps: [{ token: DbxFirebaseDocumentStoreDirective }, { token: i1$2.DbxModelObjectStateService }, { token: DbxFirebaseModelTypesService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
3440
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxfirebaseModelViewedEventDirective, selector: "[dbxFirebaseModelViewedEvent]", inputs: { context: ["dbxFirebaseModelViewedEvent", "context"] }, usesInheritance: true, ngImport: i0 }); }
3376
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxfirebaseModelViewedEventDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3377
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxfirebaseModelViewedEventDirective, selector: "[dbxFirebaseModelViewedEvent]", inputs: { context: ["dbxFirebaseModelViewedEvent", "context"] }, usesInheritance: true, ngImport: i0 });
3441
3378
  }
3442
3379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxfirebaseModelViewedEventDirective, decorators: [{
3443
3380
  type: Directive,
3444
3381
  args: [{
3445
3382
  selector: '[dbxFirebaseModelViewedEvent]'
3446
3383
  }]
3447
- }], ctorParameters: function () { return [{ type: DbxFirebaseDocumentStoreDirective }, { type: i1$2.DbxModelObjectStateService }, { type: DbxFirebaseModelTypesService }, { type: i0.NgZone }]; }, propDecorators: { context: [{
3384
+ }], propDecorators: { context: [{
3448
3385
  type: Input,
3449
3386
  args: ['dbxFirebaseModelViewedEvent']
3450
3387
  }] } });
3451
3388
 
3452
3389
  const declarations$3 = [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent];
3453
3390
  class DbxFirebaseModelTypesModule {
3454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3455
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, declarations: [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent], imports: [CommonModule, DbxModelInfoModule, DbxListLayoutModule], exports: [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent] }); }
3456
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, imports: [CommonModule, DbxModelInfoModule, DbxListLayoutModule] }); }
3391
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3392
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, declarations: [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent], imports: [CommonModule, DbxModelInfoModule, DbxListLayoutModule], exports: [DbxfirebaseModelViewedEventDirective, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent] });
3393
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, imports: [CommonModule, DbxModelInfoModule, DbxListLayoutModule] });
3457
3394
  }
3458
3395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelTypesModule, decorators: [{
3459
3396
  type: NgModule,
@@ -3466,9 +3403,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3466
3403
 
3467
3404
  const declarations$2 = [DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent];
3468
3405
  class DbxFirebaseModelHistoryModule {
3469
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3470
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryModule, declarations: [DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent], imports: [CommonModule, DbxButtonModule, DbxRouterListModule, DbxPopoverInteractionModule, DbxModelInfoModule, DbxListLayoutModule, DbxFirebaseModelTypesModule], exports: [DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent] }); }
3471
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryModule, imports: [CommonModule, DbxButtonModule, DbxRouterListModule, DbxPopoverInteractionModule, DbxModelInfoModule, DbxListLayoutModule, DbxFirebaseModelTypesModule] }); }
3406
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3407
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryModule, declarations: [DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent], imports: [CommonModule, DbxButtonModule, DbxRouterListModule, DbxPopoverInteractionModule, DbxModelInfoModule, DbxListLayoutModule, DbxFirebaseModelTypesModule], exports: [DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent] });
3408
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryModule, imports: [CommonModule, DbxButtonModule, DbxRouterListModule, DbxPopoverInteractionModule, DbxModelInfoModule, DbxListLayoutModule, DbxFirebaseModelTypesModule] });
3472
3409
  }
3473
3410
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelHistoryModule, decorators: [{
3474
3411
  type: NgModule,
@@ -3500,10 +3437,11 @@ function dbxFirebaseSourceSelectLoadSource(config) {
3500
3437
  * Abstract directive that contains a DbxFirebaseCollectionStore and provides an interface for communicating with other directives.
3501
3438
  */
3502
3439
  class DbxFirebaseCollectionStoreDirective {
3440
+ store;
3503
3441
  constructor(store) {
3504
3442
  this.store = store;
3505
- this.pageLoadingState$ = this.store.pageLoadingState$;
3506
3443
  }
3444
+ pageLoadingState$ = this.store.pageLoadingState$;
3507
3445
  // MARK: Inputs
3508
3446
  set maxPages(maxPages) {
3509
3447
  this.store.setMaxPages(maxPages);
@@ -3523,8 +3461,8 @@ class DbxFirebaseCollectionStoreDirective {
3523
3461
  setConstraints(constraints) {
3524
3462
  this.store.setConstraints(constraints);
3525
3463
  }
3526
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionStoreDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
3527
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionStoreDirective, inputs: { maxPages: "maxPages", itemsPerPage: "itemsPerPage", constraints: "constraints" }, ngImport: i0 }); }
3464
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionStoreDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
3465
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionStoreDirective, inputs: { maxPages: "maxPages", itemsPerPage: "itemsPerPage", constraints: "constraints" }, ngImport: i0 });
3528
3466
  }
3529
3467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionStoreDirective, decorators: [{
3530
3468
  type: Directive
@@ -3552,19 +3490,17 @@ function provideDbxFirebaseCollectionStoreDirective(sourceType, storeType) {
3552
3490
  * Used to watch query doc changes and respond to them accordingly.
3553
3491
  */
3554
3492
  class DbxFirebaseCollectionChangeDirective {
3493
+ dbxFirebaseCollectionStoreDirective = inject((DbxFirebaseCollectionStoreDirective));
3494
+ _watcher = dbxFirebaseCollectionChangeWatcher(this.dbxFirebaseCollectionStoreDirective.store);
3495
+ _trigger = dbxFirebaseCollectionChangeTriggerForWatcher(this._watcher, () => this.restart());
3496
+ mode$ = this._watcher.mode$;
3497
+ event$ = this._watcher.event$;
3498
+ hasChangeAvailable$ = this._watcher.hasChangeAvailable$;
3499
+ triggered$ = this._watcher.triggered$;
3500
+ trigger$ = this._watcher.trigger$;
3555
3501
  get store() {
3556
3502
  return this._watcher.store;
3557
3503
  }
3558
- constructor(dbxFirebaseCollectionStoreDirective) {
3559
- this.dbxFirebaseCollectionStoreDirective = dbxFirebaseCollectionStoreDirective;
3560
- this._watcher = dbxFirebaseCollectionChangeWatcher(this.dbxFirebaseCollectionStoreDirective.store);
3561
- this._trigger = dbxFirebaseCollectionChangeTriggerForWatcher(this._watcher, () => this.restart());
3562
- this.mode$ = this._watcher.mode$;
3563
- this.event$ = this._watcher.event$;
3564
- this.hasChangeAvailable$ = this._watcher.hasChangeAvailable$;
3565
- this.triggered$ = this._watcher.triggered$;
3566
- this.trigger$ = this._watcher.trigger$;
3567
- }
3568
3504
  ngOnInit() {
3569
3505
  this._trigger.init();
3570
3506
  }
@@ -3572,24 +3508,21 @@ class DbxFirebaseCollectionChangeDirective {
3572
3508
  this._watcher.destroy();
3573
3509
  this._trigger.destroy();
3574
3510
  }
3575
- get mode() {
3576
- return this._watcher.mode;
3577
- }
3578
3511
  set mode(mode) {
3579
- this._watcher.mode = mode || 'off';
3512
+ this._watcher.setMode(mode || 'off');
3580
3513
  }
3581
3514
  restart() {
3582
3515
  this.dbxFirebaseCollectionStoreDirective.store.restart();
3583
3516
  }
3584
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionChangeDirective, deps: [{ token: DbxFirebaseCollectionStoreDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
3585
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionChangeDirective, selector: "[dbxFirebaseCollectionChange]", inputs: { mode: ["dbxFirebaseCollectionChange", "mode"] }, ngImport: i0 }); }
3517
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionChangeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3518
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionChangeDirective, selector: "[dbxFirebaseCollectionChange]", inputs: { mode: ["dbxFirebaseCollectionChange", "mode"] }, ngImport: i0 });
3586
3519
  }
3587
3520
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionChangeDirective, decorators: [{
3588
3521
  type: Directive,
3589
3522
  args: [{
3590
3523
  selector: '[dbxFirebaseCollectionChange]'
3591
3524
  }]
3592
- }], ctorParameters: function () { return [{ type: DbxFirebaseCollectionStoreDirective }]; }, propDecorators: { mode: [{
3525
+ }], propDecorators: { mode: [{
3593
3526
  type: Input,
3594
3527
  args: ['dbxFirebaseCollectionChange']
3595
3528
  }] } });
@@ -3600,28 +3533,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3600
3533
  * Can specify which changes to appear on.
3601
3534
  */
3602
3535
  class DbxFirebaseCollectionHasChangeDirective extends AbstractIfDirective {
3603
- constructor(templateRef, viewContainer, directive) {
3604
- super(templateRef, viewContainer);
3605
- this.directive = directive;
3606
- this._mode = new BehaviorSubject('addedAndRemoved');
3607
- this.show$ = combineLatest([this._mode, this.directive.event$]).pipe(map(([mode, event]) => {
3608
- let show = false;
3609
- if (event.type !== 'none') {
3610
- switch (mode) {
3611
- case 'all':
3612
- show = true;
3613
- break;
3614
- case 'addedAndRemoved':
3615
- show = event.type === 'addedAndRemoved' || event.type === 'added' || event.type === 'removed';
3616
- break;
3617
- default:
3618
- show = event.type === mode;
3619
- break;
3620
- }
3536
+ _mode = new BehaviorSubject('addedAndRemoved');
3537
+ directive = inject(DbxFirebaseCollectionChangeDirective);
3538
+ show$ = combineLatest([this._mode, this.directive.event$]).pipe(map(([mode, event]) => {
3539
+ let show = false;
3540
+ if (event.type !== 'none') {
3541
+ switch (mode) {
3542
+ case 'all':
3543
+ show = true;
3544
+ break;
3545
+ case 'addedAndRemoved':
3546
+ show = event.type === 'addedAndRemoved' || event.type === 'added' || event.type === 'removed';
3547
+ break;
3548
+ default:
3549
+ show = event.type === mode;
3550
+ break;
3621
3551
  }
3622
- return show;
3623
- }), shareReplay(1));
3624
- }
3552
+ }
3553
+ return show;
3554
+ }), shareReplay(1));
3625
3555
  get mode() {
3626
3556
  return this._mode.value;
3627
3557
  }
@@ -3632,15 +3562,15 @@ class DbxFirebaseCollectionHasChangeDirective extends AbstractIfDirective {
3632
3562
  super.ngOnDestroy();
3633
3563
  this._mode.complete();
3634
3564
  }
3635
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionHasChangeDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: DbxFirebaseCollectionChangeDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
3636
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionHasChangeDirective, selector: "[dbxFirebaseCollectionHasChange]", inputs: { mode: ["dbxFirebaseCollectionHasChange", "mode"] }, usesInheritance: true, ngImport: i0 }); }
3565
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionHasChangeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3566
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionHasChangeDirective, selector: "[dbxFirebaseCollectionHasChange]", inputs: { mode: ["dbxFirebaseCollectionHasChange", "mode"] }, usesInheritance: true, ngImport: i0 });
3637
3567
  }
3638
3568
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionHasChangeDirective, decorators: [{
3639
3569
  type: Directive,
3640
3570
  args: [{
3641
3571
  selector: '[dbxFirebaseCollectionHasChange]'
3642
3572
  }]
3643
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: DbxFirebaseCollectionChangeDirective }]; }, propDecorators: { mode: [{
3573
+ }], propDecorators: { mode: [{
3644
3574
  type: Input,
3645
3575
  args: ['dbxFirebaseCollectionHasChange']
3646
3576
  }] } });
@@ -3649,10 +3579,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3649
3579
  * Directive that connects a host DbxListView to a DbxFirebaseCollectionStoreDirective to pass data for rendering items from a collection and query parameters.
3650
3580
  */
3651
3581
  class DbxFirebaseCollectionListDirective extends AbstractSubscriptionDirective {
3652
- constructor(dbxFirebaseCollectionStoreDirective, dbxListViewWrapper) {
3582
+ dbxFirebaseCollectionStoreDirective = inject((DbxFirebaseCollectionStoreDirective));
3583
+ dbxListViewWrapper = inject((DbxListViewWrapper), { host: true });
3584
+ constructor() {
3653
3585
  super();
3654
- this.dbxFirebaseCollectionStoreDirective = dbxFirebaseCollectionStoreDirective;
3655
- this.dbxListViewWrapper = dbxListViewWrapper;
3656
3586
  this.dbxListViewWrapper.state$ = this.dbxFirebaseCollectionStoreDirective.pageLoadingState$;
3657
3587
  }
3658
3588
  ngOnInit() {
@@ -3660,17 +3590,15 @@ class DbxFirebaseCollectionListDirective extends AbstractSubscriptionDirective {
3660
3590
  this.dbxFirebaseCollectionStoreDirective.next();
3661
3591
  });
3662
3592
  }
3663
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionListDirective, deps: [{ token: DbxFirebaseCollectionStoreDirective }, { token: i1$2.DbxListViewWrapper, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3664
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionListDirective, selector: "[dbxFirebaseCollectionList]", usesInheritance: true, ngImport: i0 }); }
3593
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3594
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionListDirective, selector: "[dbxFirebaseCollectionList]", usesInheritance: true, ngImport: i0 });
3665
3595
  }
3666
3596
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionListDirective, decorators: [{
3667
3597
  type: Directive,
3668
3598
  args: [{
3669
3599
  selector: '[dbxFirebaseCollectionList]'
3670
3600
  }]
3671
- }], ctorParameters: function () { return [{ type: DbxFirebaseCollectionStoreDirective }, { type: i1$2.DbxListViewWrapper, decorators: [{
3672
- type: Host
3673
- }] }]; } });
3601
+ }], ctorParameters: function () { return []; } });
3674
3602
 
3675
3603
  /**
3676
3604
  * Utility directive for a host DbxFirebaseDocumentStoreDirective that sets the document's ID to match the ID of the current user.
@@ -3678,104 +3606,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3678
3606
  * This is useful for cases where each document is keyed by the user (I.E. implements UserRelatedById).
3679
3607
  */
3680
3608
  class DbxFirebaseDocumentAuthIdDirective extends AbstractSubscriptionDirective {
3681
- constructor(dbxFirebaseAuthService, dbxFirebaseDocumentStoreDirective) {
3682
- super();
3683
- this.dbxFirebaseAuthService = dbxFirebaseAuthService;
3684
- this.dbxFirebaseDocumentStoreDirective = dbxFirebaseDocumentStoreDirective;
3685
- }
3609
+ dbxFirebaseAuthService = inject(DbxFirebaseAuthService);
3610
+ dbxFirebaseDocumentStoreDirective = inject((DbxFirebaseDocumentStoreDirective), { host: true });
3686
3611
  ngOnInit() {
3687
3612
  this.sub = this.dbxFirebaseDocumentStoreDirective.store.setId(this.dbxFirebaseAuthService.userIdentifier$);
3688
3613
  }
3689
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentAuthIdDirective, deps: [{ token: DbxFirebaseAuthService }, { token: DbxFirebaseDocumentStoreDirective, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3690
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentAuthIdDirective, selector: "[dbxFirebaseDocumentAuthId]", usesInheritance: true, ngImport: i0 }); }
3614
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentAuthIdDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3615
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentAuthIdDirective, selector: "[dbxFirebaseDocumentAuthId]", usesInheritance: true, ngImport: i0 });
3691
3616
  }
3692
3617
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentAuthIdDirective, decorators: [{
3693
3618
  type: Directive,
3694
3619
  args: [{
3695
3620
  selector: '[dbxFirebaseDocumentAuthId]'
3696
3621
  }]
3697
- }], ctorParameters: function () { return [{ type: DbxFirebaseAuthService }, { type: DbxFirebaseDocumentStoreDirective, decorators: [{
3698
- type: Host
3699
- }] }]; } });
3622
+ }] });
3700
3623
 
3701
3624
  const DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY = 'id';
3702
3625
  const DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY = 'key';
3703
3626
  const DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE = '0';
3704
- /**
3705
- * DbxFirebaseIdRouteParamRedirect instance
3706
- */
3707
- class DbxFirebaseIdRouteParamRedirectInstance {
3708
- constructor(dbxRouterService, defaultParamKey = DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY) {
3709
- this.dbxRouterService = dbxRouterService;
3710
- this.defaultParamKey = defaultParamKey;
3711
- this._paramReader = new DbxRouteParamReaderInstance(this.dbxRouterService, this.defaultParamKey);
3712
- this._paramRedirect = new DbxRouteParamDefaultRedirectInstance(this._paramReader);
3713
- this._useDefaultParamDecider = new BehaviorSubject(DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE);
3714
- this._useDefaultParam$ = this._useDefaultParamDecider.pipe(map((x) => {
3715
- let result;
3716
- if (typeof x === 'string') {
3717
- result = (value) => of(value === x);
3718
- }
3719
- else {
3720
- result = x;
3721
- }
3722
- return result;
3723
- }), shareReplay(1));
3724
- this.paramValue$ = this._paramReader.paramValue$;
3725
- this.defaultValue$ = this._paramReader.defaultValue$;
3726
- this.value$ = this._paramReader.value$;
3727
- this.idFromParams$ = this.paramValue$;
3728
- this.id$ = this.value$;
3729
- }
3730
- init() {
3731
- this._paramRedirect.setUseDefaultFilter((value) => {
3732
- return this._useDefaultParam$.pipe(switchMap((x) => x(value)));
3733
- });
3734
- this._paramRedirect.init();
3735
- }
3736
- destroy() {
3737
- this._paramReader.destroy();
3738
- this._paramRedirect.destroy();
3739
- this._useDefaultParamDecider.complete();
3740
- }
3741
- get paramKey() {
3742
- return this._paramReader.paramKey;
3743
- }
3744
- set paramKey(paramKey) {
3745
- this._paramReader.paramKey = paramKey || this.defaultParamKey;
3746
- }
3747
- setDefaultValue(defaultValue) {
3748
- this._paramReader.setDefaultValue(defaultValue);
3749
- }
3750
- setRedirectEnabled(redirect) {
3751
- this._paramRedirect.enabled = redirect !== false;
3752
- }
3753
- setDecider(decider) {
3754
- this._useDefaultParamDecider.next(decider);
3755
- }
3756
- setParamValue(value) {
3757
- this._paramReader.setParamValue(value);
3758
- }
3759
- }
3760
- function dbxFirebaseIdRouteParamRedirect(dbxRouterService, defaultParamKey) {
3761
- return new DbxFirebaseIdRouteParamRedirectInstance(dbxRouterService, defaultParamKey);
3762
- }
3763
3627
  function dbxFirebaseKeyRouteParamRedirect(dbxRouterService, defaultParamKey = DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY) {
3764
- return new DbxFirebaseIdRouteParamRedirectInstance(dbxRouterService, defaultParamKey);
3628
+ return dbxFirebaseIdRouteParamRedirect(dbxRouterService, defaultParamKey);
3629
+ }
3630
+ function dbxFirebaseIdRouteParamRedirect(dbxRouterService, defaultParamKey = DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY) {
3631
+ const _paramReader = dbxRouteParamReaderInstance(dbxRouterService, defaultParamKey);
3632
+ const _paramRedirect = new DbxRouteParamDefaultRedirectInstance(_paramReader);
3633
+ const _useDefaultParamDecider = new BehaviorSubject(DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE);
3634
+ const _useDefaultParam$ = _useDefaultParamDecider.pipe(map((x) => {
3635
+ let result;
3636
+ if (typeof x === 'string') {
3637
+ result = (value) => of(value === x);
3638
+ }
3639
+ else {
3640
+ result = x;
3641
+ }
3642
+ return result;
3643
+ }), shareReplay(1));
3644
+ const setParamKey = (paramKey) => {
3645
+ _paramReader.setParamKey(paramKey || defaultParamKey);
3646
+ };
3647
+ const paramValue$ = _paramReader.paramValue$;
3648
+ const value$ = _paramReader.value$;
3649
+ const result = {
3650
+ paramValue$,
3651
+ defaultValue$: _paramReader.defaultValue$,
3652
+ value$,
3653
+ idFromParams$: paramValue$,
3654
+ id$: value$,
3655
+ init() {
3656
+ _paramRedirect.setUseDefaultFilter((value) => {
3657
+ return _useDefaultParam$.pipe(switchMap((x) => x(value)));
3658
+ });
3659
+ _paramRedirect.init();
3660
+ },
3661
+ destroy() {
3662
+ _paramReader.destroy();
3663
+ _paramRedirect.destroy();
3664
+ _useDefaultParamDecider.complete();
3665
+ },
3666
+ getParamKey() {
3667
+ return _paramReader.getParamKey();
3668
+ },
3669
+ setParamKey,
3670
+ setDefaultValue(defaultValue) {
3671
+ _paramReader.setDefaultValue(defaultValue);
3672
+ },
3673
+ setRedirectEnabled(redirect) {
3674
+ _paramRedirect.enabled = redirect !== false;
3675
+ },
3676
+ setDecider(decider) {
3677
+ _useDefaultParamDecider.next(decider);
3678
+ },
3679
+ setParamValue(value) {
3680
+ _paramReader.setParamValue(value);
3681
+ }
3682
+ };
3683
+ return result;
3765
3684
  }
3766
3685
 
3767
3686
  /**
3768
3687
  * Used for synchronizing the document store id to the param of the route.
3769
3688
  */
3770
3689
  class DbxFirebaseDocumentStoreRouteIdDirective extends AbstractSubscriptionDirective {
3771
- constructor(dbxFirebaseDocumentStoreDirective, dbxRouterService) {
3772
- super();
3773
- this.dbxFirebaseDocumentStoreDirective = dbxFirebaseDocumentStoreDirective;
3774
- this.dbxRouterService = dbxRouterService;
3775
- this._redirectInstance = dbxFirebaseIdRouteParamRedirect(this.dbxRouterService);
3776
- this.idFromParams$ = this._redirectInstance.paramValue$;
3777
- this.id$ = this._redirectInstance.value$;
3778
- }
3690
+ dbxFirebaseDocumentStoreDirective = inject((DbxFirebaseDocumentStoreDirective), { host: true });
3691
+ dbxRouterService = inject(DbxRouterService);
3692
+ _redirectInstance = dbxFirebaseIdRouteParamRedirect(this.dbxRouterService);
3693
+ idFromParams$ = this._redirectInstance.paramValue$;
3694
+ id$ = this._redirectInstance.value$;
3779
3695
  ngOnInit() {
3780
3696
  this.sub = this.dbxFirebaseDocumentStoreDirective.store.setId(this.idFromParams$); // use from the params, as the params should get updated eventually to the id$ value
3781
3697
  this._redirectInstance.init();
@@ -3786,10 +3702,10 @@ class DbxFirebaseDocumentStoreRouteIdDirective extends AbstractSubscriptionDirec
3786
3702
  }
3787
3703
  // MARK: Input
3788
3704
  get idParam() {
3789
- return this._redirectInstance.paramKey;
3705
+ return this._redirectInstance.getParamKey();
3790
3706
  }
3791
3707
  set idParam(idParam) {
3792
- this._redirectInstance.paramKey = idParam;
3708
+ this._redirectInstance.setParamKey(idParam);
3793
3709
  }
3794
3710
  set dbxFirebaseDocumentStoreRouteIdDefault(defaultValue) {
3795
3711
  this._redirectInstance.setDefaultValue(defaultValue);
@@ -3803,17 +3719,15 @@ class DbxFirebaseDocumentStoreRouteIdDirective extends AbstractSubscriptionDirec
3803
3719
  set dbxFirebaseDocumentStoreRouteIdDefaultDecision(decider) {
3804
3720
  this._redirectInstance.setDecider(decider);
3805
3721
  }
3806
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreRouteIdDirective, deps: [{ token: DbxFirebaseDocumentStoreDirective, host: true }, { token: i2$2.DbxRouterService }], target: i0.ɵɵFactoryTarget.Directive }); }
3807
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentStoreRouteIdDirective, selector: "[dbxFirebaseDocumentStoreRouteId]", inputs: { idParam: ["dbxFirebaseDocumentStoreRouteId", "idParam"], dbxFirebaseDocumentStoreRouteIdDefault: "dbxFirebaseDocumentStoreRouteIdDefault", dbxFirebaseDocumentStoreRouteIdDefaultRedirect: "dbxFirebaseDocumentStoreRouteIdDefaultRedirect", dbxFirebaseDocumentStoreRouteIdDefaultDecision: "dbxFirebaseDocumentStoreRouteIdDefaultDecision" }, usesInheritance: true, ngImport: i0 }); }
3722
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreRouteIdDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3723
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentStoreRouteIdDirective, selector: "[dbxFirebaseDocumentStoreRouteId]", inputs: { idParam: ["dbxFirebaseDocumentStoreRouteId", "idParam"], dbxFirebaseDocumentStoreRouteIdDefault: "dbxFirebaseDocumentStoreRouteIdDefault", dbxFirebaseDocumentStoreRouteIdDefaultRedirect: "dbxFirebaseDocumentStoreRouteIdDefaultRedirect", dbxFirebaseDocumentStoreRouteIdDefaultDecision: "dbxFirebaseDocumentStoreRouteIdDefaultDecision" }, usesInheritance: true, ngImport: i0 });
3808
3724
  }
3809
3725
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreRouteIdDirective, decorators: [{
3810
3726
  type: Directive,
3811
3727
  args: [{
3812
3728
  selector: '[dbxFirebaseDocumentStoreRouteId]'
3813
3729
  }]
3814
- }], ctorParameters: function () { return [{ type: DbxFirebaseDocumentStoreDirective, decorators: [{
3815
- type: Host
3816
- }] }, { type: i2$2.DbxRouterService }]; }, propDecorators: { idParam: [{
3730
+ }], propDecorators: { idParam: [{
3817
3731
  type: Input,
3818
3732
  args: ['dbxFirebaseDocumentStoreRouteId']
3819
3733
  }], dbxFirebaseDocumentStoreRouteIdDefault: [{
@@ -3828,14 +3742,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3828
3742
  * Used for synchronizing the document store key to the param of the route. The param is interpreted as a TwoWayFlatFirestoreModelKey.
3829
3743
  */
3830
3744
  class DbxFirebaseDocumentStoreRouteKeyDirective extends AbstractSubscriptionDirective {
3831
- constructor(dbxFirebaseDocumentStoreDirective, dbxRouterService) {
3832
- super();
3833
- this.dbxFirebaseDocumentStoreDirective = dbxFirebaseDocumentStoreDirective;
3834
- this.dbxRouterService = dbxRouterService;
3835
- this._redirectInstance = dbxFirebaseKeyRouteParamRedirect(this.dbxRouterService);
3836
- this.keyFromParams$ = this._redirectInstance.paramValue$;
3837
- this.key$ = this._redirectInstance.value$;
3838
- }
3745
+ dbxFirebaseDocumentStoreDirective = inject((DbxFirebaseDocumentStoreDirective), { host: true });
3746
+ dbxRouterService = inject(DbxRouterService);
3747
+ _redirectInstance = dbxFirebaseKeyRouteParamRedirect(this.dbxRouterService);
3748
+ keyFromParams$ = this._redirectInstance.paramValue$;
3749
+ key$ = this._redirectInstance.value$;
3839
3750
  ngOnInit() {
3840
3751
  this.sub = this.dbxFirebaseDocumentStoreDirective.store.setFlatKey(this.keyFromParams$); // use from the params, as the params should get updated eventually to the key$ value
3841
3752
  this._redirectInstance.init();
@@ -3846,10 +3757,10 @@ class DbxFirebaseDocumentStoreRouteKeyDirective extends AbstractSubscriptionDire
3846
3757
  }
3847
3758
  // MARK: Input
3848
3759
  get keyParam() {
3849
- return this._redirectInstance.paramKey;
3760
+ return this._redirectInstance.getParamKey();
3850
3761
  }
3851
- set keyParam(keyParam) {
3852
- this._redirectInstance.paramKey = keyParam;
3762
+ set keyParam(idParam) {
3763
+ this._redirectInstance.setParamKey(idParam);
3853
3764
  }
3854
3765
  set dbxFirebaseDocumentStoreRouteKeyDefault(defaultValue) {
3855
3766
  this._redirectInstance.setDefaultValue(defaultValue);
@@ -3863,17 +3774,15 @@ class DbxFirebaseDocumentStoreRouteKeyDirective extends AbstractSubscriptionDire
3863
3774
  set dbxFirebaseDocumentStoreRouteKeyDefaultDecision(decider) {
3864
3775
  this._redirectInstance.setDecider(decider);
3865
3776
  }
3866
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreRouteKeyDirective, deps: [{ token: DbxFirebaseDocumentStoreDirective, host: true }, { token: i2$2.DbxRouterService }], target: i0.ɵɵFactoryTarget.Directive }); }
3867
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentStoreRouteKeyDirective, selector: "[dbxFirebaseDocumentStoreRouteKey]", inputs: { keyParam: ["dbxFirebaseDocumentStoreRouteKey", "keyParam"], dbxFirebaseDocumentStoreRouteKeyDefault: "dbxFirebaseDocumentStoreRouteKeyDefault", dbxFirebaseDocumentStoreRouteKeyDefaultRedirect: "dbxFirebaseDocumentStoreRouteKeyDefaultRedirect", dbxFirebaseDocumentStoreRouteKeyDefaultDecision: "dbxFirebaseDocumentStoreRouteKeyDefaultDecision" }, usesInheritance: true, ngImport: i0 }); }
3777
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreRouteKeyDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3778
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseDocumentStoreRouteKeyDirective, selector: "[dbxFirebaseDocumentStoreRouteKey]", inputs: { keyParam: ["dbxFirebaseDocumentStoreRouteKey", "keyParam"], dbxFirebaseDocumentStoreRouteKeyDefault: "dbxFirebaseDocumentStoreRouteKeyDefault", dbxFirebaseDocumentStoreRouteKeyDefaultRedirect: "dbxFirebaseDocumentStoreRouteKeyDefaultRedirect", dbxFirebaseDocumentStoreRouteKeyDefaultDecision: "dbxFirebaseDocumentStoreRouteKeyDefaultDecision" }, usesInheritance: true, ngImport: i0 });
3868
3779
  }
3869
3780
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseDocumentStoreRouteKeyDirective, decorators: [{
3870
3781
  type: Directive,
3871
3782
  args: [{
3872
3783
  selector: '[dbxFirebaseDocumentStoreRouteKey]'
3873
3784
  }]
3874
- }], ctorParameters: function () { return [{ type: DbxFirebaseDocumentStoreDirective, decorators: [{
3875
- type: Host
3876
- }] }, { type: i2$2.DbxRouterService }]; }, propDecorators: { keyParam: [{
3785
+ }], propDecorators: { keyParam: [{
3877
3786
  type: Input,
3878
3787
  args: ['dbxFirebaseDocumentStoreRouteKey']
3879
3788
  }], dbxFirebaseDocumentStoreRouteKeyDefault: [{
@@ -3886,9 +3795,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3886
3795
 
3887
3796
  const declarations$1 = [DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective];
3888
3797
  class DbxFirebaseModelStoreModule {
3889
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3890
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelStoreModule, declarations: [DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective], exports: [DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective] }); }
3891
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelStoreModule }); }
3798
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3799
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelStoreModule, declarations: [DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective], exports: [DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective] });
3800
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelStoreModule });
3892
3801
  }
3893
3802
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelStoreModule, decorators: [{
3894
3803
  type: NgModule,
@@ -3900,45 +3809,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3900
3809
  }] });
3901
3810
 
3902
3811
  class AbstractDbxFirebaseCollectionStore extends LockSetComponentStore {
3903
- constructor() {
3904
- super(...arguments);
3905
- // MARK: Effects
3906
- this.setMaxPages = this.effect((input) => {
3907
- return input.pipe(switchMap((maxPages) => this.loader$.pipe(tap((x) => (x.maxPages = maxPages)))));
3908
- });
3909
- this.setItemsPerPage = this.effect((input) => {
3910
- return input.pipe(switchMap((itemsPerPage) => this.loader$.pipe(tap((x) => (x.itemsPerPage = itemsPerPage)))));
3911
- });
3912
- this.setConstraints = this.effect((input) => {
3913
- return input.pipe(switchMap((constraints) => this.loader$.pipe(tap((x) => x.setConstraints(constraints)))));
3914
- });
3915
- this.next = this.effect((input) => {
3916
- return input.pipe(exhaustMap(() => this.loader$.pipe(first(), tap((x) => x.next()))));
3917
- });
3918
- this.restart = this.effect((input) => {
3919
- return input.pipe(exhaustMap(() => this.loader$.pipe(first(), tap((x) => x.restart()))));
3920
- });
3921
- // MARK: Accessors
3922
- this.currentFirestoreCollection$ = this.state$.pipe(map((x) => x.firestoreCollection), distinctUntilChanged(), shareReplay(1));
3923
- this.firestoreCollection$ = this.currentFirestoreCollection$.pipe(filterMaybe());
3924
- this.loader$ = this.currentFirestoreCollection$.pipe(switchMap((collection) => this.state$.pipe(first(), map((x) => dbxFirebaseCollectionLoaderInstance({
3925
- collection,
3926
- maxPages: x.maxPages,
3927
- itemsPerPage: x.itemsPerPage,
3928
- constraints: x.constraints
3929
- })))), cleanupDestroyable(), distinctUntilChanged(), shareReplay(1));
3930
- this.constraints$ = this.loader$.pipe(switchMap((x) => x.constraints$));
3931
- this.firestoreIteration$ = this.loader$.pipe(switchMap((x) => x.firestoreIteration$));
3932
- this.queryChangeWatcher$ = this.loader$.pipe(switchMap((x) => x.queryChangeWatcher$));
3933
- this.pageLoadingState$ = this.loader$.pipe(switchMap((x) => x.pageLoadingState$));
3934
- this.snapshotAccumulator$ = this.loader$.pipe(switchMap((x) => x.snapshotAccumulator$));
3935
- this.accumulator$ = this.loader$.pipe(switchMap((x) => x.accumulator$));
3936
- this.hasDocuments$ = this.loader$.pipe(switchMap((x) => x.hasDocuments$));
3937
- this.allDocumentRefs$ = this.loader$.pipe(switchMap((x) => x.allDocumentRefs$));
3938
- this.allDocuments$ = this.loader$.pipe(switchMap((x) => x.allDocuments$));
3939
- this.allDocumentData$ = this.loader$.pipe(switchMap((x) => x.allDocumentData$));
3940
- this.setFirestoreCollection = this.updater((state, firestoreCollection) => ({ ...state, firestoreCollection }));
3941
- }
3812
+ // MARK: Effects
3813
+ setMaxPages = this.effect((input) => {
3814
+ return input.pipe(switchMap((maxPages) => this.loader$.pipe(tap((x) => (x.maxPages = maxPages)))));
3815
+ });
3816
+ setItemsPerPage = this.effect((input) => {
3817
+ return input.pipe(switchMap((itemsPerPage) => this.loader$.pipe(tap((x) => (x.itemsPerPage = itemsPerPage)))));
3818
+ });
3819
+ setConstraints = this.effect((input) => {
3820
+ return input.pipe(switchMap((constraints) => this.loader$.pipe(tap((x) => x.setConstraints(constraints)))));
3821
+ });
3822
+ next = this.effect((input) => {
3823
+ return input.pipe(exhaustMap(() => this.loader$.pipe(first(), tap((x) => x.next()))));
3824
+ });
3825
+ restart = this.effect((input) => {
3826
+ return input.pipe(exhaustMap(() => this.loader$.pipe(first(), tap((x) => x.restart()))));
3827
+ });
3828
+ // MARK: Accessors
3829
+ currentFirestoreCollection$ = this.state$.pipe(map((x) => x.firestoreCollection), distinctUntilChanged(), shareReplay(1));
3830
+ firestoreCollection$ = this.currentFirestoreCollection$.pipe(filterMaybe());
3831
+ loader$ = this.currentFirestoreCollection$.pipe(switchMap((collection) => this.state$.pipe(first(), map((x) => dbxFirebaseCollectionLoaderInstance({
3832
+ collection,
3833
+ maxPages: x.maxPages,
3834
+ itemsPerPage: x.itemsPerPage,
3835
+ constraints: x.constraints
3836
+ })))), cleanupDestroyable(), distinctUntilChanged(), shareReplay(1));
3837
+ constraints$ = this.loader$.pipe(switchMap((x) => x.constraints$));
3838
+ firestoreIteration$ = this.loader$.pipe(switchMap((x) => x.firestoreIteration$));
3839
+ queryChangeWatcher$ = this.loader$.pipe(switchMap((x) => x.queryChangeWatcher$));
3840
+ pageLoadingState$ = this.loader$.pipe(switchMap((x) => x.pageLoadingState$));
3841
+ snapshotAccumulator$ = this.loader$.pipe(switchMap((x) => x.snapshotAccumulator$));
3842
+ accumulator$ = this.loader$.pipe(switchMap((x) => x.accumulator$));
3843
+ hasDocuments$ = this.loader$.pipe(switchMap((x) => x.hasDocuments$));
3844
+ allDocumentRefs$ = this.loader$.pipe(switchMap((x) => x.allDocumentRefs$));
3845
+ allDocuments$ = this.loader$.pipe(switchMap((x) => x.allDocuments$));
3846
+ allDocumentData$ = this.loader$.pipe(switchMap((x) => x.allDocumentData$));
3847
+ setFirestoreCollection = this.updater((state, firestoreCollection) => ({ ...state, firestoreCollection }));
3942
3848
  loadToPage(page) {
3943
3849
  return this.loader$.pipe(switchMap((x) => x.loadToPage(page)));
3944
3850
  }
@@ -3948,8 +3854,8 @@ class AbstractDbxFirebaseCollectionStore extends LockSetComponentStore {
3948
3854
  loadAllResults() {
3949
3855
  return this.loader$.pipe(switchMap((x) => x.loadAllResults()));
3950
3856
  }
3951
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3952
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionStore }); }
3857
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3858
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionStore });
3953
3859
  }
3954
3860
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionStore, decorators: [{
3955
3861
  type: Injectable
@@ -3961,101 +3867,98 @@ function modelDoesNotExistError() {
3961
3867
  }
3962
3868
 
3963
3869
  class AbstractDbxFirebaseDocumentStore extends LockSetComponentStore {
3964
- constructor() {
3965
- super(...arguments);
3966
- // MARK: Effects
3967
- // MARK: Accessors
3968
- this.currentFirestoreCollectionLike$ = this.state$.pipe(map((x) => x.firestoreCollection ?? x.firestoreCollectionLike), distinctUntilChanged(), shareReplay(1));
3969
- this.currentFirestoreCollection$ = this.state$.pipe(map((x) => x.firestoreCollection), distinctUntilChanged(), shareReplay(1));
3970
- this.firestoreCollectionLike$ = this.currentFirestoreCollectionLike$.pipe(filterMaybe());
3971
- this.firestoreCollection$ = this.currentFirestoreCollection$.pipe(filterMaybe());
3972
- this.currentInputId$ = this.state$.pipe(map((x) => x.id), distinctUntilChanged(), shareReplay(1));
3973
- this.inputId$ = this.currentInputId$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
3974
- this.currentInputKey$ = this.state$.pipe(map((x) => x.key), distinctUntilChanged(), shareReplay(1));
3975
- this.inputKey$ = this.currentInputKey$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
3976
- this.currentInputRef$ = this.state$.pipe(map((x) => x.ref), distinctUntilChanged(), shareReplay(1));
3977
- this.inputRef$ = this.currentInputRef$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
3978
- this.streamMode$ = this.state$.pipe(map((x) => x.streamMode ?? FirestoreAccessorStreamMode.STREAM), distinctUntilChanged(), shareReplay(1));
3979
- this.currentDocument$ = combineLatest([this.currentInputId$, this.currentInputKey$, this.currentInputRef$]).pipe(switchMap(([id, key, ref]) => {
3980
- let document;
3981
- if (ref) {
3982
- document = this.firestoreCollectionLike$.pipe(map((x) => x.documentAccessor().loadDocument(ref)));
3983
- }
3984
- else if (key) {
3985
- document = this.firestoreCollectionLike$.pipe(map((x) => x.documentAccessor().loadDocumentForKey(key)));
3986
- }
3987
- else if (id) {
3988
- document = this.firestoreCollection$.pipe(map((x) => x.documentAccessor().loadDocumentForId(id)));
3989
- }
3990
- else {
3991
- document = of(undefined);
3992
- }
3993
- return document;
3994
- }), distinctUntilChanged(), shareReplay(1));
3995
- /**
3996
- * Whether or not an id/ref/key has been input and currentDocument is not null.
3997
- */
3998
- this.hasRef$ = this.currentDocument$.pipe(map((x) => x?.documentRef != null), distinctUntilChanged(), shareReplay(1));
3999
- this.document$ = this.currentDocument$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
4000
- this.documentLoadingState$ = this.currentDocument$.pipe(map((x) => (x ? successResult(x) : beginLoading())), shareReplay(1));
4001
- this.id$ = this.document$.pipe(map((x) => x.id), shareReplay(1));
4002
- this.key$ = this.document$.pipe(map((x) => x.key), shareReplay(1));
4003
- this.keyModelIds$ = this.key$.pipe(map(firestoreModelIdsFromKey), shareReplay(1));
4004
- this.keyPairs$ = this.key$.pipe(map(firestoreModelKeyPartPairs), filterMaybe(), shareReplay(1));
4005
- this.keyPairObject$ = this.key$.pipe(map(firestoreModelKeyPairObject), filterMaybe(), shareReplay(1));
4006
- this.ref$ = this.document$.pipe(map((x) => x.documentRef), shareReplay(1));
4007
- this.flatKey$ = this.key$.pipe(map((x) => flatFirestoreModelKey(x)), shareReplay(1));
4008
- this.twoWayFlatKey$ = this.key$.pipe(map((x) => twoWayFlatFirestoreModelKey(x)), shareReplay(1));
4009
- this.snapshot$ = combineLatest([this.document$, this.streamMode$]).pipe(switchMap(([x, mode]) => x.snapshotStream(mode)), shareReplay(1));
4010
- this.snapshotLoadingState$ = this.currentDocument$.pipe(switchMap(() => loadingStateFromObs(this.snapshot$)), shareReplay(1));
4011
- this.currentData$ = this.snapshot$.pipe(map((x) => documentDataWithIdAndKey(x)), shareReplay(1));
4012
- this.data$ = this.currentDocument$.pipe(switchMap(() => this.currentData$.pipe(filterMaybe())), shareReplay(1));
4013
- this.dataLoadingState$ = this.snapshotLoadingState$.pipe(map((x) => {
4014
- let result;
4015
- if (x.value) {
4016
- const data = documentDataWithIdAndKey(x.value);
4017
- if (data) {
4018
- result = successResult(data);
4019
- }
4020
- else {
4021
- result = errorResult(modelDoesNotExistError());
4022
- }
4023
- }
4024
- else {
4025
- result = {
4026
- ...x,
4027
- value: undefined
4028
- };
4029
- }
4030
- return result;
4031
- }), shareReplay(1));
4032
- this.isLoadingData$ = this.dataLoadingState$.pipe(map(loadingStateIsLoading), distinctUntilChanged(), shareReplay(1));
4033
- /**
4034
- * Returns false while hasRef$ is false, and then returns exists$.
4035
- */
4036
- this.currentExists$ = this.hasRef$.pipe(switchMap((hasRef) => {
4037
- if (hasRef) {
4038
- return this.exists$;
3870
+ // MARK: Effects
3871
+ // MARK: Accessors
3872
+ currentFirestoreCollectionLike$ = this.state$.pipe(map((x) => x.firestoreCollection ?? x.firestoreCollectionLike), distinctUntilChanged(), shareReplay(1));
3873
+ currentFirestoreCollection$ = this.state$.pipe(map((x) => x.firestoreCollection), distinctUntilChanged(), shareReplay(1));
3874
+ firestoreCollectionLike$ = this.currentFirestoreCollectionLike$.pipe(filterMaybe());
3875
+ firestoreCollection$ = this.currentFirestoreCollection$.pipe(filterMaybe());
3876
+ currentInputId$ = this.state$.pipe(map((x) => x.id), distinctUntilChanged(), shareReplay(1));
3877
+ inputId$ = this.currentInputId$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
3878
+ currentInputKey$ = this.state$.pipe(map((x) => x.key), distinctUntilChanged(), shareReplay(1));
3879
+ inputKey$ = this.currentInputKey$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
3880
+ currentInputRef$ = this.state$.pipe(map((x) => x.ref), distinctUntilChanged(), shareReplay(1));
3881
+ inputRef$ = this.currentInputRef$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
3882
+ streamMode$ = this.state$.pipe(map((x) => x.streamMode ?? FirestoreAccessorStreamMode.STREAM), distinctUntilChanged(), shareReplay(1));
3883
+ currentDocument$ = combineLatest([this.currentInputId$, this.currentInputKey$, this.currentInputRef$]).pipe(switchMap(([id, key, ref]) => {
3884
+ let document;
3885
+ if (ref) {
3886
+ document = this.firestoreCollectionLike$.pipe(map((x) => x.documentAccessor().loadDocument(ref)));
3887
+ }
3888
+ else if (key) {
3889
+ document = this.firestoreCollectionLike$.pipe(map((x) => x.documentAccessor().loadDocumentForKey(key)));
3890
+ }
3891
+ else if (id) {
3892
+ document = this.firestoreCollection$.pipe(map((x) => x.documentAccessor().loadDocumentForId(id)));
3893
+ }
3894
+ else {
3895
+ document = of(undefined);
3896
+ }
3897
+ return document;
3898
+ }), distinctUntilChanged(), shareReplay(1));
3899
+ /**
3900
+ * Whether or not an id/ref/key has been input and currentDocument is not null.
3901
+ */
3902
+ hasRef$ = this.currentDocument$.pipe(map((x) => x?.documentRef != null), distinctUntilChanged(), shareReplay(1));
3903
+ document$ = this.currentDocument$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
3904
+ documentLoadingState$ = this.currentDocument$.pipe(map((x) => (x ? successResult(x) : beginLoading())), shareReplay(1));
3905
+ id$ = this.document$.pipe(map((x) => x.id), shareReplay(1));
3906
+ key$ = this.document$.pipe(map((x) => x.key), shareReplay(1));
3907
+ keyModelIds$ = this.key$.pipe(map(firestoreModelIdsFromKey), shareReplay(1));
3908
+ keyPairs$ = this.key$.pipe(map(firestoreModelKeyPartPairs), filterMaybe(), shareReplay(1));
3909
+ keyPairObject$ = this.key$.pipe(map(firestoreModelKeyPairObject), filterMaybe(), shareReplay(1));
3910
+ ref$ = this.document$.pipe(map((x) => x.documentRef), shareReplay(1));
3911
+ flatKey$ = this.key$.pipe(map((x) => flatFirestoreModelKey(x)), shareReplay(1));
3912
+ twoWayFlatKey$ = this.key$.pipe(map((x) => twoWayFlatFirestoreModelKey(x)), shareReplay(1));
3913
+ snapshot$ = combineLatest([this.document$, this.streamMode$]).pipe(switchMap(([x, mode]) => x.snapshotStream(mode)), shareReplay(1));
3914
+ snapshotLoadingState$ = this.currentDocument$.pipe(switchMap(() => loadingStateFromObs(this.snapshot$)), shareReplay(1));
3915
+ currentData$ = this.snapshot$.pipe(map((x) => documentDataWithIdAndKey(x)), shareReplay(1));
3916
+ data$ = this.currentDocument$.pipe(switchMap(() => this.currentData$.pipe(filterMaybe())), shareReplay(1));
3917
+ dataLoadingState$ = this.snapshotLoadingState$.pipe(map((x) => {
3918
+ let result;
3919
+ if (x.value) {
3920
+ const data = documentDataWithIdAndKey(x.value);
3921
+ if (data) {
3922
+ result = successResult(data);
4039
3923
  }
4040
3924
  else {
4041
- return of(false);
3925
+ result = errorResult(modelDoesNotExistError());
4042
3926
  }
4043
- }), shareReplay(1));
4044
- this.exists$ = this.currentData$.pipe(map((x) => isMaybeSo(x)), shareReplay(1));
4045
- this.doesNotExist$ = this.exists$.pipe(map((x) => !x), shareReplay(1));
4046
- this.modelIdentity$ = this.document$.pipe(map((x) => x.modelIdentity), shareReplay(1));
4047
- // MARK: State Changes
4048
- this.setId = this.updater((state, id) => (id ? { ...state, id, key: undefined, ref: undefined } : { ...state, id }));
4049
- this.setKey = this.updater((state, key) => (key ? { ...state, key, id: undefined, ref: undefined } : { ...state, key }));
4050
- this.setFlatKey = this.updater((state, key) => (key ? { ...state, key: inferKeyFromTwoWayFlatFirestoreModelKey(key), id: undefined, ref: undefined } : { ...state, key }));
4051
- this.setRef = this.updater((state, ref) => (ref ? { ...state, key: undefined, id: undefined, ref } : { ...state, ref }));
4052
- this.setStreamMode = this.updater((state, streamMode) => ({ ...state, streamMode }));
4053
- this.clearRefs = this.updater((state) => ({ ...state, id: undefined, key: undefined, ref: undefined }));
4054
- this.setFirestoreCollection = this.updater((state, firestoreCollection) => ({ ...state, firestoreCollection }));
4055
- this.setFirestoreCollectionLike = this.updater((state, firestoreCollectionLike) => ({ ...state, firestoreCollectionLike }));
4056
- }
4057
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4058
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentStore }); }
3927
+ }
3928
+ else {
3929
+ result = {
3930
+ ...x,
3931
+ value: undefined
3932
+ };
3933
+ }
3934
+ return result;
3935
+ }), shareReplay(1));
3936
+ isLoadingData$ = this.dataLoadingState$.pipe(map(isLoadingStateLoading), distinctUntilChanged(), shareReplay(1));
3937
+ /**
3938
+ * Returns false while hasRef$ is false, and then returns exists$.
3939
+ */
3940
+ currentExists$ = this.hasRef$.pipe(switchMap((hasRef) => {
3941
+ if (hasRef) {
3942
+ return this.exists$;
3943
+ }
3944
+ else {
3945
+ return of(false);
3946
+ }
3947
+ }), shareReplay(1));
3948
+ exists$ = this.currentData$.pipe(map((x) => isMaybeSo(x)), shareReplay(1));
3949
+ doesNotExist$ = this.exists$.pipe(map((x) => !x), shareReplay(1));
3950
+ modelIdentity$ = this.document$.pipe(map((x) => x.modelIdentity), shareReplay(1));
3951
+ // MARK: State Changes
3952
+ setId = this.updater((state, id) => (id ? { ...state, id, key: undefined, ref: undefined } : { ...state, id }));
3953
+ setKey = this.updater((state, key) => (key ? { ...state, key, id: undefined, ref: undefined } : { ...state, key }));
3954
+ setFlatKey = this.updater((state, key) => (key ? { ...state, key: inferKeyFromTwoWayFlatFirestoreModelKey(key), id: undefined, ref: undefined } : { ...state, key }));
3955
+ setRef = this.updater((state, ref) => (ref ? { ...state, key: undefined, id: undefined, ref } : { ...state, ref }));
3956
+ setStreamMode = this.updater((state, streamMode) => ({ ...state, streamMode }));
3957
+ clearRefs = this.updater((state) => ({ ...state, id: undefined, key: undefined, ref: undefined }));
3958
+ setFirestoreCollection = this.updater((state, firestoreCollection) => ({ ...state, firestoreCollection }));
3959
+ setFirestoreCollectionLike = this.updater((state, firestoreCollectionLike) => ({ ...state, firestoreCollectionLike }));
3960
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3961
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentStore });
4059
3962
  }
4060
3963
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentStore, decorators: [{
4061
3964
  type: Injectable
@@ -4075,43 +3978,43 @@ function injectSingleItemIdIntoState(state) {
4075
3978
  let AbstractRootSingleItemDbxFirebaseDocument = class AbstractRootSingleItemDbxFirebaseDocument extends AbstractDbxFirebaseDocumentStore {
4076
3979
  constructor(initialState) {
4077
3980
  super(injectSingleItemIdIntoState(initialState));
4078
- /**
4079
- * Sets the SingleItemFirestoreCollection to use.
4080
- */
4081
- this.setFirestoreCollection = this.updater((state, firestoreCollection) => {
4082
- if (firestoreCollection != null) {
4083
- const id = firestoreCollection.singleItemIdentifier;
4084
- if (id != null) {
4085
- return { ...state, firestoreCollection, id };
4086
- }
4087
- else {
4088
- throw new Error('AbstractRootSingleItemDbxFirebaseDocument only accepts RootSingleItemFirestoreCollection values with a singleItemIdentifier set for setFirestoreCollection.');
4089
- }
3981
+ }
3982
+ /**
3983
+ * Sets the SingleItemFirestoreCollection to use.
3984
+ */
3985
+ setFirestoreCollection = this.updater((state, firestoreCollection) => {
3986
+ if (firestoreCollection != null) {
3987
+ const id = firestoreCollection.singleItemIdentifier;
3988
+ if (id != null) {
3989
+ return { ...state, firestoreCollection, id };
4090
3990
  }
4091
3991
  else {
4092
- return { ...state, firestoreCollection: null };
3992
+ throw new Error('AbstractRootSingleItemDbxFirebaseDocument only accepts RootSingleItemFirestoreCollection values with a singleItemIdentifier set for setFirestoreCollection.');
4093
3993
  }
4094
- });
4095
- /**
4096
- * Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
4097
- *
4098
- * Ref is set with the FirestoreCollection
4099
- */
4100
- this.setId = this.updater((state, id) => state);
4101
- /**
4102
- * Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
4103
- *
4104
- * Ref is set with the FirestoreCollection
4105
- */
4106
- this.setKey = this.updater((state, key) => state);
4107
- /**
4108
- * Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
4109
- *
4110
- * Ref is set with the FirestoreCollection
4111
- */
4112
- this.setRef = this.updater((state, ref) => state);
4113
- this.clearRefs = this.updater((state) => state);
4114
- }
3994
+ }
3995
+ else {
3996
+ return { ...state, firestoreCollection: null };
3997
+ }
3998
+ });
3999
+ /**
4000
+ * Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
4001
+ *
4002
+ * Ref is set with the FirestoreCollection
4003
+ */
4004
+ setId = this.updater((state, id) => state);
4005
+ /**
4006
+ * Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
4007
+ *
4008
+ * Ref is set with the FirestoreCollection
4009
+ */
4010
+ setKey = this.updater((state, key) => state);
4011
+ /**
4012
+ * Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
4013
+ *
4014
+ * Ref is set with the FirestoreCollection
4015
+ */
4016
+ setRef = this.updater((state, ref) => state);
4017
+ clearRefs = this.updater((state) => state);
4115
4018
  };
4116
4019
  AbstractRootSingleItemDbxFirebaseDocument = __decorate([
4117
4020
  __param(0, Inject(null)),
@@ -4223,58 +4126,58 @@ function setParentStoreEffect(store) {
4223
4126
  class AbstractDbxFirebaseCollectionWithParentStore extends AbstractDbxFirebaseCollectionStore {
4224
4127
  constructor(state, defaultSourceMode) {
4225
4128
  super(state);
4226
- // MARK: Effects
4227
- this.setParentStore = setParentStoreEffect(this);
4228
- this.setSourceMode = this.effect((input) => {
4229
- return input.pipe(distinctUntilChanged(), switchMap((inputMode) => {
4230
- const mode = inputMode?.toLowerCase() ?? 'parent'; // default to parent mode
4231
- if (mode === 'group') {
4232
- return this.currentCollectionGroup$.pipe(tap((collectionGroup) => {
4233
- this.setFirestoreCollection(collectionGroup);
4234
- }));
4235
- }
4236
- else {
4237
- // parent document collection
4238
- return this.currentParent$.pipe(switchMap((parent) => {
4239
- if (parent) {
4240
- return this.collectionFactory$.pipe(tap((collectionFactory) => {
4241
- const collection = collectionFactory(parent);
4242
- this.setFirestoreCollection(collection);
4243
- }));
4244
- }
4245
- else {
4246
- this.setFirestoreCollection(undefined);
4247
- return NEVER;
4248
- }
4249
- }));
4250
- }
4251
- }));
4252
- });
4253
- // MARK: Accessors
4254
- this.currentParent$ = this.state$.pipe(map((x) => x.parent), distinctUntilChanged(), shareReplay(1));
4255
- this.parent$ = this.currentParent$.pipe(filterMaybe());
4256
- this.currentCollectionFactory$ = this.state$.pipe(map((x) => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
4257
- this.collectionFactory$ = this.currentCollectionFactory$.pipe(filterMaybe());
4258
- this.currentCollectionGroup$ = this.state$.pipe(map((x) => x.collectionGroup), distinctUntilChanged(), shareReplay(1));
4259
- this.collectionGroup$ = this.currentCollectionGroup$.pipe(filterMaybe());
4260
- // MARK: State Changes
4261
- /**
4262
- * Sets the collection factory function to use.
4263
- */
4264
- this.setCollectionFactory = this.updater((state, collectionFactory) => ({ ...state, collectionFactory }));
4265
- /**
4266
- * Sets the collection group to use.
4267
- */
4268
- this.setCollectionGroup = this.updater((state, collectionGroup) => ({ ...state, collectionGroup }));
4269
- /**
4270
- * Sets the parent on the current state.
4271
- */
4272
- this._setParentDocument = this.updater((state, parent) => ({ ...state, parent }));
4273
- this._setParent = this._setParentDocument;
4274
4129
  this.setSourceMode(defaultSourceMode || 'parent');
4275
4130
  }
4276
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionWithParentStore, deps: [{ token: null, optional: true }, { token: null, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
4277
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionWithParentStore }); }
4131
+ // MARK: Effects
4132
+ setParentStore = setParentStoreEffect(this);
4133
+ setSourceMode = this.effect((input) => {
4134
+ return input.pipe(distinctUntilChanged(), switchMap((inputMode) => {
4135
+ const mode = inputMode?.toLowerCase() ?? 'parent'; // default to parent mode
4136
+ if (mode === 'group') {
4137
+ return this.currentCollectionGroup$.pipe(tap((collectionGroup) => {
4138
+ this.setFirestoreCollection(collectionGroup);
4139
+ }));
4140
+ }
4141
+ else {
4142
+ // parent document collection
4143
+ return this.currentParent$.pipe(switchMap((parent) => {
4144
+ if (parent) {
4145
+ return this.collectionFactory$.pipe(tap((collectionFactory) => {
4146
+ const collection = collectionFactory(parent);
4147
+ this.setFirestoreCollection(collection);
4148
+ }));
4149
+ }
4150
+ else {
4151
+ this.setFirestoreCollection(undefined);
4152
+ return NEVER;
4153
+ }
4154
+ }));
4155
+ }
4156
+ }));
4157
+ });
4158
+ // MARK: Accessors
4159
+ currentParent$ = this.state$.pipe(map((x) => x.parent), distinctUntilChanged(), shareReplay(1));
4160
+ parent$ = this.currentParent$.pipe(filterMaybe());
4161
+ currentCollectionFactory$ = this.state$.pipe(map((x) => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
4162
+ collectionFactory$ = this.currentCollectionFactory$.pipe(filterMaybe());
4163
+ currentCollectionGroup$ = this.state$.pipe(map((x) => x.collectionGroup), distinctUntilChanged(), shareReplay(1));
4164
+ collectionGroup$ = this.currentCollectionGroup$.pipe(filterMaybe());
4165
+ // MARK: State Changes
4166
+ /**
4167
+ * Sets the collection factory function to use.
4168
+ */
4169
+ setCollectionFactory = this.updater((state, collectionFactory) => ({ ...state, collectionFactory }));
4170
+ /**
4171
+ * Sets the collection group to use.
4172
+ */
4173
+ setCollectionGroup = this.updater((state, collectionGroup) => ({ ...state, collectionGroup }));
4174
+ /**
4175
+ * Sets the parent on the current state.
4176
+ */
4177
+ _setParentDocument = this.updater((state, parent) => ({ ...state, parent }));
4178
+ _setParent = this._setParentDocument;
4179
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionWithParentStore, deps: [{ token: null, optional: true }, { token: null, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
4180
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionWithParentStore });
4278
4181
  }
4279
4182
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseCollectionWithParentStore, decorators: [{
4280
4183
  type: Injectable
@@ -4294,51 +4197,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4294
4197
  * Abstract DbxFirebaseDocumentStore that has a parent document from which is derives it's FiresbaseCollection from.
4295
4198
  */
4296
4199
  class AbstractDbxFirebaseDocumentWithParentStore extends AbstractDbxFirebaseDocumentStore {
4297
- constructor() {
4298
- super(...arguments);
4299
- // MARK: Effects
4300
- this.setParentStore = setParentStoreEffect(this);
4301
- this.setParent = this.effect((input) => {
4302
- return input.pipe(switchMap((parent) => {
4303
- this._setParentDocument(parent);
4304
- if (parent) {
4305
- return this.collectionFactory$.pipe(tap((collectionFactory) => {
4306
- const collection = collectionFactory(parent);
4307
- this.setFirestoreCollection(collection);
4308
- }));
4309
- }
4310
- else {
4311
- // clear the current collection
4312
- this.setFirestoreCollection(undefined);
4313
- // do nothing until a parent is returned.
4314
- return NEVER;
4315
- }
4316
- }));
4317
- });
4318
- this._setParent = this.setParent;
4319
- // MARK: Accessors
4320
- /**
4321
- * Returns the parent model key given the current key value.
4322
- */
4323
- this.keyParentKey$ = this.key$.pipe(map((x) => firestoreModelKeyParentKey(x, 1)), distinctUntilChanged(), shareReplay(1));
4324
- this.currentParent$ = this.state$.pipe(map((x) => x.parent), distinctUntilChanged(), shareReplay(1));
4325
- this.currentParentKey$ = this.state$.pipe(map((x) => x.parent?.key), distinctUntilChanged(), shareReplay(1));
4326
- this.parent$ = this.currentParent$.pipe(filterMaybe());
4327
- this.parentKey$ = this.currentParentKey$.pipe(filterMaybe());
4328
- this.currentCollectionFactory$ = this.state$.pipe(map((x) => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
4329
- this.collectionFactory$ = this.currentCollectionFactory$.pipe(filterMaybe());
4330
- // MARK: State Changes
4331
- /**
4332
- * Sets the collection factory function to use.
4333
- */
4334
- this.setCollectionFactory = this.updater((state, collectionFactory) => ({ ...state, collectionFactory }));
4335
- /**
4336
- * Sets the parent on the current state.
4337
- */
4338
- this._setParentDocument = this.updater((state, parent) => ({ ...state, parent }));
4339
- }
4340
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentWithParentStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4341
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentWithParentStore }); }
4200
+ // MARK: Effects
4201
+ setParentStore = setParentStoreEffect(this);
4202
+ setParent = this.effect((input) => {
4203
+ return input.pipe(switchMap((parent) => {
4204
+ this._setParentDocument(parent);
4205
+ if (parent) {
4206
+ return this.collectionFactory$.pipe(tap((collectionFactory) => {
4207
+ const collection = collectionFactory(parent);
4208
+ this.setFirestoreCollection(collection);
4209
+ }));
4210
+ }
4211
+ else {
4212
+ // clear the current collection
4213
+ this.setFirestoreCollection(undefined);
4214
+ // do nothing until a parent is returned.
4215
+ return NEVER;
4216
+ }
4217
+ }));
4218
+ });
4219
+ _setParent = this.setParent;
4220
+ // MARK: Accessors
4221
+ /**
4222
+ * Returns the parent model key given the current key value.
4223
+ */
4224
+ keyParentKey$ = this.key$.pipe(map((x) => firestoreModelKeyParentKey(x, 1)), distinctUntilChanged(), shareReplay(1));
4225
+ currentParent$ = this.state$.pipe(map((x) => x.parent), distinctUntilChanged(), shareReplay(1));
4226
+ currentParentKey$ = this.state$.pipe(map((x) => x.parent?.key), distinctUntilChanged(), shareReplay(1));
4227
+ parent$ = this.currentParent$.pipe(filterMaybe());
4228
+ parentKey$ = this.currentParentKey$.pipe(filterMaybe());
4229
+ currentCollectionFactory$ = this.state$.pipe(map((x) => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
4230
+ collectionFactory$ = this.currentCollectionFactory$.pipe(filterMaybe());
4231
+ // MARK: State Changes
4232
+ /**
4233
+ * Sets the collection factory function to use.
4234
+ */
4235
+ setCollectionFactory = this.updater((state, collectionFactory) => ({ ...state, collectionFactory }));
4236
+ /**
4237
+ * Sets the parent on the current state.
4238
+ */
4239
+ _setParentDocument = this.updater((state, parent) => ({ ...state, parent }));
4240
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentWithParentStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4241
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentWithParentStore });
4342
4242
  }
4343
4243
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxFirebaseDocumentWithParentStore, decorators: [{
4344
4244
  type: Injectable
@@ -4347,45 +4247,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4347
4247
  * AbstractDbxFirebaseDocumentWithParentStore extension for use with SingleItemFirestoreCollection.
4348
4248
  */
4349
4249
  class AbstractSingleItemDbxFirebaseDocument extends AbstractDbxFirebaseDocumentWithParentStore {
4350
- constructor() {
4351
- super(...arguments);
4352
- /**
4353
- * Sets the SingleItemFirestoreCollection to use.
4354
- */
4355
- this.setFirestoreCollection = this.updater((state, firestoreCollection) => {
4356
- if (firestoreCollection != null) {
4357
- const id = firestoreCollection.singleItemIdentifier;
4358
- if (id != null) {
4359
- return { ...state, firestoreCollection, id };
4360
- }
4361
- else {
4362
- throw new Error('AbstractSingleItemDbxFirebaseDocument only accepts SingleItemFirestoreCollection values with a singleItemIdentifier set for setFirestoreCollection.');
4363
- }
4250
+ /**
4251
+ * Sets the SingleItemFirestoreCollection to use.
4252
+ */
4253
+ setFirestoreCollection = this.updater((state, firestoreCollection) => {
4254
+ if (firestoreCollection != null) {
4255
+ const id = firestoreCollection.singleItemIdentifier;
4256
+ if (id != null) {
4257
+ return { ...state, firestoreCollection, id };
4364
4258
  }
4365
4259
  else {
4366
- return { ...state, firestoreCollection: null };
4260
+ throw new Error('AbstractSingleItemDbxFirebaseDocument only accepts SingleItemFirestoreCollection values with a singleItemIdentifier set for setFirestoreCollection.');
4367
4261
  }
4368
- });
4369
- /**
4370
- * Does nothing on a AbstractSingleItemDbxFirebaseDocument.
4371
- *
4372
- * Ref is set with the FirestoreCollection
4373
- */
4374
- this.setId = this.updater((state, id) => state);
4375
- /**
4376
- * Does nothing on a AbstractSingleItemDbxFirebaseDocument.
4377
- *
4378
- * Ref is set with the FirestoreCollection
4379
- */
4380
- this.setKey = this.updater((state, key) => state);
4381
- /**
4382
- * Does nothing on a AbstractSingleItemDbxFirebaseDocument.
4383
- *
4384
- * Ref is set with the FirestoreCollection
4385
- */
4386
- this.setRef = this.updater((state, ref) => state);
4387
- this.clearRefs = this.updater((state) => state);
4388
- }
4262
+ }
4263
+ else {
4264
+ return { ...state, firestoreCollection: null };
4265
+ }
4266
+ });
4267
+ /**
4268
+ * Does nothing on a AbstractSingleItemDbxFirebaseDocument.
4269
+ *
4270
+ * Ref is set with the FirestoreCollection
4271
+ */
4272
+ setId = this.updater((state, id) => state);
4273
+ /**
4274
+ * Does nothing on a AbstractSingleItemDbxFirebaseDocument.
4275
+ *
4276
+ * Ref is set with the FirestoreCollection
4277
+ */
4278
+ setKey = this.updater((state, key) => state);
4279
+ /**
4280
+ * Does nothing on a AbstractSingleItemDbxFirebaseDocument.
4281
+ *
4282
+ * Ref is set with the FirestoreCollection
4283
+ */
4284
+ setRef = this.updater((state, ref) => state);
4285
+ clearRefs = this.updater((state) => state);
4389
4286
  }
4390
4287
 
4391
4288
  /**
@@ -4396,8 +4293,8 @@ class DbxFirebaseCollectionWithParentStoreDirective extends DbxFirebaseCollectio
4396
4293
  set sourceMode(sourceMode) {
4397
4294
  this.store.setSourceMode(sourceMode);
4398
4295
  }
4399
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionWithParentStoreDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
4400
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionWithParentStoreDirective, inputs: { sourceMode: "sourceMode" }, usesInheritance: true, ngImport: i0 }); }
4296
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionWithParentStoreDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
4297
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseCollectionWithParentStoreDirective, inputs: { sourceMode: "sourceMode" }, usesInheritance: true, ngImport: i0 });
4401
4298
  }
4402
4299
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseCollectionWithParentStoreDirective, decorators: [{
4403
4300
  type: Directive
@@ -4416,23 +4313,24 @@ function provideDbxFirebaseCollectionWithParentStoreDirective(sourceType, storeT
4416
4313
  }
4417
4314
 
4418
4315
  class SystemStateCollectionStore extends AbstractDbxFirebaseCollectionStore {
4316
+ collections;
4419
4317
  constructor(collections) {
4420
4318
  super({ firestoreCollection: collections.systemStateCollection });
4421
4319
  this.collections = collections;
4422
4320
  }
4423
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateCollectionStore, deps: [{ token: i1$4.SystemStateFirestoreCollections }], target: i0.ɵɵFactoryTarget.Injectable }); }
4424
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateCollectionStore }); }
4321
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateCollectionStore, deps: [{ token: i1$3.SystemStateFirestoreCollections }], target: i0.ɵɵFactoryTarget.Injectable });
4322
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateCollectionStore });
4425
4323
  }
4426
4324
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateCollectionStore, decorators: [{
4427
4325
  type: Injectable
4428
- }], ctorParameters: function () { return [{ type: i1$4.SystemStateFirestoreCollections }]; } });
4326
+ }], ctorParameters: function () { return [{ type: i1$3.SystemStateFirestoreCollections }]; } });
4429
4327
 
4430
4328
  class DbxFirebaseSystemStateCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective {
4431
4329
  constructor(store) {
4432
4330
  super(store);
4433
4331
  }
4434
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseSystemStateCollectionStoreDirective, deps: [{ token: SystemStateCollectionStore }], target: i0.ɵɵFactoryTarget.Directive }); }
4435
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseSystemStateCollectionStoreDirective, selector: "[dbxFirebaseSystemStateCollection]", providers: provideDbxFirebaseCollectionStoreDirective(DbxFirebaseSystemStateCollectionStoreDirective, SystemStateCollectionStore), usesInheritance: true, ngImport: i0 }); }
4332
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseSystemStateCollectionStoreDirective, deps: [{ token: SystemStateCollectionStore }], target: i0.ɵɵFactoryTarget.Directive });
4333
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseSystemStateCollectionStoreDirective, selector: "[dbxFirebaseSystemStateCollection]", providers: provideDbxFirebaseCollectionStoreDirective(DbxFirebaseSystemStateCollectionStoreDirective, SystemStateCollectionStore), usesInheritance: true, ngImport: i0 });
4436
4334
  }
4437
4335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseSystemStateCollectionStoreDirective, decorators: [{
4438
4336
  type: Directive,
@@ -4442,40 +4340,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4442
4340
  }]
4443
4341
  }], ctorParameters: function () { return [{ type: SystemStateCollectionStore }]; } });
4444
4342
 
4445
- /**
4446
- * Abstract class used for accessing a SystemStateDocumentStore's data.
4447
- */
4448
- class AbstractSystemStateDocumentStoreAccessor {
4449
- constructor(systemStateDocumentStore, type) {
4450
- this.systemStateDocumentStore = systemStateDocumentStore;
4451
- this.type = type;
4452
- this.documentData$ = this.systemStateDocumentStore.data$;
4453
- this.data$ = this.documentData$.pipe(map((x) => x.data), shareReplay(1));
4454
- this.dataState$ = this.systemStateDocumentStore.dataLoadingState$.pipe(mapLoadingState({ mapValue: (x) => x.data }), shareReplay(1));
4455
- this.exists$ = this.systemStateDocumentStore.exists$;
4456
- this.doesNotExist$ = this.systemStateDocumentStore.doesNotExist$;
4457
- systemStateDocumentStore.setId(type);
4458
- }
4459
- }
4460
-
4461
4343
  class SystemStateDocumentStore extends AbstractDbxFirebaseDocumentStore {
4344
+ collections;
4462
4345
  constructor(collections) {
4463
4346
  super({ firestoreCollection: collections.systemStateCollection });
4464
4347
  this.collections = collections;
4465
4348
  }
4466
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateDocumentStore, deps: [{ token: i1$4.SystemStateFirestoreCollections }], target: i0.ɵɵFactoryTarget.Injectable }); }
4467
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateDocumentStore }); }
4349
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateDocumentStore, deps: [{ token: i1$3.SystemStateFirestoreCollections }], target: i0.ɵɵFactoryTarget.Injectable });
4350
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateDocumentStore });
4468
4351
  }
4469
4352
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SystemStateDocumentStore, decorators: [{
4470
4353
  type: Injectable
4471
- }], ctorParameters: function () { return [{ type: i1$4.SystemStateFirestoreCollections }]; } });
4354
+ }], ctorParameters: function () { return [{ type: i1$3.SystemStateFirestoreCollections }]; } });
4355
+
4356
+ /**
4357
+ * Abstract class used for accessing a SystemStateDocumentStore's data.
4358
+ */
4359
+ class AbstractSystemStateDocumentStoreAccessor {
4360
+ type;
4361
+ systemStateDocumentStore = inject((SystemStateDocumentStore));
4362
+ documentData$ = this.systemStateDocumentStore.data$;
4363
+ data$ = this.documentData$.pipe(map((x) => x.data), shareReplay(1));
4364
+ dataState$ = this.systemStateDocumentStore.dataLoadingState$.pipe(mapLoadingState({ mapValue: (x) => x.data }), shareReplay(1));
4365
+ exists$ = this.systemStateDocumentStore.exists$;
4366
+ doesNotExist$ = this.systemStateDocumentStore.doesNotExist$;
4367
+ constructor(type) {
4368
+ this.type = type;
4369
+ this.systemStateDocumentStore.setId(type);
4370
+ }
4371
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
4372
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor });
4373
+ }
4374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, decorators: [{
4375
+ type: Injectable
4376
+ }], ctorParameters: function () { return [{ type: undefined }]; } });
4472
4377
 
4473
4378
  class DbxFirebaseSystemStateDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
4474
4379
  constructor(store) {
4475
4380
  super(store);
4476
4381
  }
4477
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseSystemStateDocumentStoreDirective, deps: [{ token: SystemStateDocumentStore }], target: i0.ɵɵFactoryTarget.Directive }); }
4478
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseSystemStateDocumentStoreDirective, selector: "[dbxFirebaseSystemStateDocument]", providers: provideDbxFirebaseDocumentStoreDirective(DbxFirebaseSystemStateDocumentStoreDirective, SystemStateDocumentStore), usesInheritance: true, ngImport: i0 }); }
4382
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseSystemStateDocumentStoreDirective, deps: [{ token: SystemStateDocumentStore }], target: i0.ɵɵFactoryTarget.Directive });
4383
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFirebaseSystemStateDocumentStoreDirective, selector: "[dbxFirebaseSystemStateDocument]", providers: provideDbxFirebaseDocumentStoreDirective(DbxFirebaseSystemStateDocumentStoreDirective, SystemStateDocumentStore), usesInheritance: true, ngImport: i0 });
4479
4384
  }
4480
4385
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseSystemStateDocumentStoreDirective, decorators: [{
4481
4386
  type: Directive,
@@ -4486,9 +4391,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4486
4391
  }], ctorParameters: function () { return [{ type: SystemStateDocumentStore }]; } });
4487
4392
 
4488
4393
  class DbxFirebaseModelModule {
4489
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4490
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelModule, exports: [DbxFirebaseModelStoreModule, DbxFirebaseModelHistoryModule, DbxFirebaseModelTypesModule] }); }
4491
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelModule, imports: [DbxFirebaseModelStoreModule, DbxFirebaseModelHistoryModule, DbxFirebaseModelTypesModule] }); }
4394
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4395
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelModule, exports: [DbxFirebaseModelStoreModule, DbxFirebaseModelHistoryModule, DbxFirebaseModelTypesModule] });
4396
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelModule, imports: [DbxFirebaseModelStoreModule, DbxFirebaseModelHistoryModule, DbxFirebaseModelTypesModule] });
4492
4397
  }
4493
4398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModelModule, decorators: [{
4494
4399
  type: NgModule,
@@ -4506,8 +4411,8 @@ class FlatFirestoreModelKeyPipe {
4506
4411
  return '';
4507
4412
  }
4508
4413
  }
4509
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatFirestoreModelKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4510
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: FlatFirestoreModelKeyPipe, name: "flatFirestoreModelKey" }); }
4414
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatFirestoreModelKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4415
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: FlatFirestoreModelKeyPipe, name: "flatFirestoreModelKey" });
4511
4416
  }
4512
4417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatFirestoreModelKeyPipe, decorators: [{
4513
4418
  type: Pipe,
@@ -4522,8 +4427,8 @@ class TwoWayFlatFirestoreModelKeyPipe {
4522
4427
  return '';
4523
4428
  }
4524
4429
  }
4525
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TwoWayFlatFirestoreModelKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4526
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TwoWayFlatFirestoreModelKeyPipe, name: "twoWayFlatFirestoreModelKey" }); }
4430
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TwoWayFlatFirestoreModelKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4431
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TwoWayFlatFirestoreModelKeyPipe, name: "twoWayFlatFirestoreModelKey" });
4527
4432
  }
4528
4433
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TwoWayFlatFirestoreModelKeyPipe, decorators: [{
4529
4434
  type: Pipe,
@@ -4532,9 +4437,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4532
4437
 
4533
4438
  const declarations = [FlatFirestoreModelKeyPipe, TwoWayFlatFirestoreModelKeyPipe];
4534
4439
  class DbxFirebasePipeModule {
4535
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebasePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4536
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebasePipeModule, declarations: [FlatFirestoreModelKeyPipe, TwoWayFlatFirestoreModelKeyPipe], exports: [FlatFirestoreModelKeyPipe, TwoWayFlatFirestoreModelKeyPipe] }); }
4537
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebasePipeModule }); }
4440
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebasePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4441
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebasePipeModule, declarations: [FlatFirestoreModelKeyPipe, TwoWayFlatFirestoreModelKeyPipe], exports: [FlatFirestoreModelKeyPipe, TwoWayFlatFirestoreModelKeyPipe] });
4442
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebasePipeModule });
4538
4443
  }
4539
4444
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebasePipeModule, decorators: [{
4540
4445
  type: NgModule,
@@ -4557,9 +4462,7 @@ const DBX_FIREBASE_STORAGE_CONTEXT_TOKEN = new InjectionToken('DBX_FIREBASE_STOR
4557
4462
  * Service that provides access to the app's FirebaseStorageContext.
4558
4463
  */
4559
4464
  class DbxFirebaseStorageService {
4560
- constructor(storageContext) {
4561
- this.storageContext = storageContext;
4562
- }
4465
+ storageContext = inject(DBX_FIREBASE_STORAGE_CONTEXT_TOKEN);
4563
4466
  defaultBucket() {
4564
4467
  return this.storageContext.defaultBucket();
4565
4468
  }
@@ -4569,18 +4472,15 @@ class DbxFirebaseStorageService {
4569
4472
  folder(path) {
4570
4473
  return this.storageContext.folder(path);
4571
4474
  }
4572
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageService, deps: [{ token: DBX_FIREBASE_STORAGE_CONTEXT_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
4573
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageService, providedIn: 'root' }); }
4475
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4476
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageService, providedIn: 'root' });
4574
4477
  }
4575
4478
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageService, decorators: [{
4576
4479
  type: Injectable,
4577
4480
  args: [{
4578
4481
  providedIn: 'root'
4579
4482
  }]
4580
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4581
- type: Inject,
4582
- args: [DBX_FIREBASE_STORAGE_CONTEXT_TOKEN]
4583
- }] }]; } });
4483
+ }] });
4584
4484
 
4585
4485
  function dbxFirebaseStorageModuleContextConfigFactory(base) {
4586
4486
  return (app, injector) => {
@@ -4611,9 +4511,9 @@ class DbxFirebaseStorageModule {
4611
4511
  providers
4612
4512
  };
4613
4513
  }
4614
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4615
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageModule }); }
4616
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageModule }); }
4514
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4515
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageModule });
4516
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageModule });
4617
4517
  }
4618
4518
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseStorageModule, decorators: [{
4619
4519
  type: NgModule,
@@ -4621,9 +4521,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4621
4521
  }] });
4622
4522
 
4623
4523
  class DbxFirebaseModule {
4624
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4625
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModule, exports: [DbxFirebaseModelModule] }); }
4626
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModule, imports: [DbxFirebaseModelModule] }); }
4524
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4525
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModule, exports: [DbxFirebaseModelModule] });
4526
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModule, imports: [DbxFirebaseModelModule] });
4627
4527
  }
4628
4528
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFirebaseModule, decorators: [{
4629
4529
  type: NgModule,
@@ -4636,5 +4536,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4636
4536
  * Generated bundle index. Do not edit.
4637
4537
  */
4638
4538
 
4639
- export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, 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_OPTIONS_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_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_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListener, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthContextInfo, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionChangeWatcherInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultFunctionsProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentModuleRootConfig, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentAuthIdDirective, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseEmulatorService, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseIdRouteParamRedirectInstance, DbxFirebaseInContextFirebaseModelServiceInstance, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginModuleRootConfig, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelContextService, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryModule, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent, DbxFirebaseModelTypesModule, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelTypesServiceInstance, DbxFirebaseModule, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePipeModule, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageModule, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, DbxfirebaseModelViewedEventDirective, FlatFirestoreModelKeyPipe, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageModuleContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultFirebaseAuthLoginProvidersFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, modelDoesNotExistError, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDocumentStoreDirective, provideSystemStateFirestoreCollections, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction };
4539
+ export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, 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_OPTIONS_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_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_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListener, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthContextInfo, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultFunctionsProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentModuleRootConfig, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentAuthIdDirective, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentStoreRouteKeyDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseEmulatorService, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseInContextFirebaseModelServiceInstance, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginModuleRootConfig, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelContextService, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryModule, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceComponent, DbxFirebaseModelTypeInstanceViewComponent, DbxFirebaseModelTypeInstanceViewItemComponent, DbxFirebaseModelTypesModule, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModule, DbxFirebaseParsedEmulatorsConfig, DbxFirebasePipeModule, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageModule, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, DbxfirebaseModelViewedEventDirective, FlatFirestoreModelKeyPipe, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageModuleContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultFirebaseAuthLoginProvidersFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, modelDoesNotExistError, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDocumentStoreDirective, provideSystemStateFirestoreCollections, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction };
4640
4540
  //# sourceMappingURL=dereekb-dbx-firebase.mjs.map