@dereekb/dbx-firebase 4.1.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/_index.scss +4 -4
- package/esm2020/lib/auth/appcheck/appcheck.interceptor.mjs +80 -0
- package/esm2020/lib/auth/appcheck/appcheck.mjs +11 -0
- package/esm2020/lib/auth/appcheck/index.mjs +3 -0
- package/esm2020/lib/auth/auth.mjs +1 -1
- package/esm2020/lib/auth/error.mjs +1 -1
- package/esm2020/lib/auth/firebase.auth.module.mjs +1 -1
- package/esm2020/lib/auth/index.mjs +2 -1
- package/esm2020/lib/auth/login/firebase.login.module.mjs +49 -57
- package/esm2020/lib/auth/login/login.anonymous.component.mjs +3 -3
- package/esm2020/lib/auth/login/login.apple.component.mjs +3 -3
- package/esm2020/lib/auth/login/login.button.component.mjs +36 -38
- package/esm2020/lib/auth/login/login.component.mjs +3 -3
- package/esm2020/lib/auth/login/login.context.back.component.mjs +8 -8
- package/esm2020/lib/auth/login/login.context.directive.mjs +13 -9
- package/esm2020/lib/auth/login/login.context.mjs +2 -2
- package/esm2020/lib/auth/login/login.email.component.mjs +4 -4
- package/esm2020/lib/auth/login/login.email.content.component.mjs +9 -9
- package/esm2020/lib/auth/login/login.email.form.component.mjs +12 -8
- package/esm2020/lib/auth/login/login.email.recovery.form.component.mjs +10 -6
- package/esm2020/lib/auth/login/login.facebook.component.mjs +3 -3
- package/esm2020/lib/auth/login/login.github.component.mjs +3 -3
- package/esm2020/lib/auth/login/login.google.component.mjs +3 -3
- package/esm2020/lib/auth/login/login.list.component.mjs +11 -13
- package/esm2020/lib/auth/login/login.microsoft.component.mjs +3 -3
- package/esm2020/lib/auth/login/login.mjs +1 -1
- package/esm2020/lib/auth/login/login.password.mjs +1 -1
- package/esm2020/lib/auth/login/login.service.mjs +8 -8
- package/esm2020/lib/auth/login/login.terms.component.mjs +10 -6
- package/esm2020/lib/auth/login/login.terms.mjs +1 -1
- package/esm2020/lib/auth/login/login.terms.simple.component.mjs +12 -12
- package/esm2020/lib/auth/login/login.twitter.component.mjs +3 -3
- package/esm2020/lib/auth/login/register.component.mjs +8 -4
- package/esm2020/lib/auth/login/register.email.component.mjs +4 -4
- package/esm2020/lib/auth/service/firebase.auth.rxjs.mjs +3 -3
- package/esm2020/lib/auth/service/firebase.auth.service.mjs +12 -12
- package/esm2020/lib/firebase/appcheck.mjs +2 -0
- package/esm2020/lib/firebase/emulators.mjs +1 -1
- package/esm2020/lib/firebase/firebase.emulator.module.mjs +6 -4
- package/esm2020/lib/firebase/firebase.module.mjs +137 -32
- package/esm2020/lib/firebase/index.mjs +2 -1
- package/esm2020/lib/firebase/options.mjs +3 -2
- package/esm2020/lib/firestore/firebase.firestore.context.service.mjs +1 -1
- package/esm2020/lib/firestore/firebase.firestore.module.mjs +11 -8
- package/esm2020/lib/function/firebase.function.module.mjs +8 -6
- package/esm2020/lib/model/error.mjs +2 -2
- package/esm2020/lib/model/loader/collection.loader.instance.mjs +9 -10
- package/esm2020/lib/model/loader/collection.loader.mjs +1 -1
- package/esm2020/lib/model/model.module.mjs +4 -6
- package/esm2020/lib/model/store/model.store.module.mjs +10 -30
- package/esm2020/lib/model/store/store.collection.change.directive.mjs +6 -4
- package/esm2020/lib/model/store/store.collection.change.if.directive.mjs +1 -1
- package/esm2020/lib/model/store/store.collection.directive.mjs +5 -3
- package/esm2020/lib/model/store/store.collection.list.directive.mjs +2 -2
- package/esm2020/lib/model/store/store.collection.mjs +8 -8
- package/esm2020/lib/model/store/store.document.auth.directive.mjs +4 -4
- package/esm2020/lib/model/store/store.document.directive.mjs +5 -3
- package/esm2020/lib/model/store/store.document.mjs +13 -13
- package/esm2020/lib/model/store/store.document.router.directive.mjs +2 -4
- package/esm2020/lib/model/store/store.subcollection.document.mjs +3 -3
- package/esm2020/lib/model/store/store.subcollection.mjs +3 -3
- package/esm2020/lib/model/store/store.subcollection.rxjs.mjs +3 -3
- package/esm2020/lib/module.mjs +4 -6
- package/fesm2015/dereekb-dbx-firebase.mjs +460 -272
- package/fesm2015/dereekb-dbx-firebase.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-firebase.mjs +455 -272
- package/fesm2020/dereekb-dbx-firebase.mjs.map +1 -1
- package/lib/auth/appcheck/appcheck.d.ts +8 -0
- package/lib/auth/appcheck/appcheck.interceptor.d.ts +19 -0
- package/lib/auth/appcheck/index.d.ts +2 -0
- package/lib/auth/auth.d.ts +2 -3
- package/lib/auth/error.d.ts +2 -2
- package/lib/auth/index.d.ts +1 -0
- package/lib/auth/login/_login.scss +5 -5
- package/lib/auth/login/firebase.login.module.d.ts +1 -1
- package/lib/auth/login/login.anonymous.component.d.ts +2 -2
- package/lib/auth/login/login.apple.component.d.ts +2 -2
- package/lib/auth/login/login.button.component.d.ts +11 -12
- package/lib/auth/login/login.context.back.component.d.ts +3 -3
- package/lib/auth/login/login.context.d.ts +1 -1
- package/lib/auth/login/login.context.directive.d.ts +2 -2
- package/lib/auth/login/login.email.component.d.ts +2 -2
- package/lib/auth/login/login.email.content.component.d.ts +5 -5
- package/lib/auth/login/login.email.form.component.d.ts +7 -8
- package/lib/auth/login/login.email.recovery.form.component.d.ts +2 -2
- package/lib/auth/login/login.facebook.component.d.ts +2 -2
- package/lib/auth/login/login.github.component.d.ts +2 -2
- package/lib/auth/login/login.google.component.d.ts +2 -2
- package/lib/auth/login/login.list.component.d.ts +2 -2
- package/lib/auth/login/login.microsoft.component.d.ts +2 -2
- package/lib/auth/login/login.password.d.ts +2 -3
- package/lib/auth/login/login.service.d.ts +10 -10
- package/lib/auth/login/login.terms.component.d.ts +1 -1
- package/lib/auth/login/login.twitter.component.d.ts +2 -2
- package/lib/auth/login/register.email.component.d.ts +2 -2
- package/lib/auth/service/firebase.auth.rxjs.d.ts +1 -1
- package/lib/auth/service/firebase.auth.service.d.ts +3 -3
- package/lib/firebase/appcheck.d.ts +21 -0
- package/lib/firebase/firebase.module.d.ts +20 -10
- package/lib/firebase/index.d.ts +1 -0
- package/lib/firebase/options.d.ts +14 -3
- package/lib/firestore/firebase.firestore.module.d.ts +3 -3
- package/lib/function/firebase.function.module.d.ts +7 -7
- package/lib/model/loader/collection.loader.d.ts +5 -5
- package/lib/model/loader/collection.loader.instance.d.ts +4 -4
- package/lib/model/store/store.collection.change.directive.d.ts +5 -4
- package/lib/model/store/store.collection.change.if.directive.d.ts +2 -2
- package/lib/model/store/store.collection.d.ts +3 -3
- package/lib/model/store/store.collection.directive.d.ts +3 -3
- package/lib/model/store/store.document.auth.directive.d.ts +4 -4
- package/lib/model/store/store.document.d.ts +4 -4
- package/lib/model/store/store.document.directive.d.ts +3 -3
- package/lib/model/store/store.document.router.directive.d.ts +8 -9
- package/lib/model/store/store.subcollection.rxjs.d.ts +7 -7
- package/lib/style/_config.scss +8 -6
- package/lib/style/_core.scss +1 -1
- package/lib/style/_mixin.scss +1 -1
- package/lib/style/_theming.scss +2 -12
- package/lib/style/_variables.scss +1 -1
- package/package.json +8 -7
|
@@ -1,34 +1,125 @@
|
|
|
1
|
+
import { urlWithoutParameters, addToSet, removeFromSet, filterMaybeValues, mapIterable, asArray, excludeValuesFromArray, containsStringAnyCase, forEachKeyValue, readableError, isMaybeSo } from '@dereekb/util';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, Injectable, Inject, Optional, Component, Input, Directive, EventEmitter, Output, NgModule, Injector, forwardRef, Host } from '@angular/core';
|
|
4
|
+
import { getToken, initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check';
|
|
5
|
+
import { switchMap, from, first, map, of, shareReplay, timeout, startWith, distinctUntilChanged, BehaviorSubject, combineLatest, tap, firstValueFrom, Subject, throttleTime, NEVER, filter, take, exhaustMap } from 'rxjs';
|
|
6
|
+
import * as i1 from '@angular/fire/app-check';
|
|
7
|
+
import { provideAppCheck } from '@angular/fire/app-check';
|
|
1
8
|
import * as i4 from '@angular/material/button';
|
|
2
9
|
import { MatButtonModule } from '@angular/material/button';
|
|
3
10
|
import * as i2 from '@angular/material/icon';
|
|
4
11
|
import { MatIconModule } from '@angular/material/icon';
|
|
5
12
|
import * as i6 from '@angular/common';
|
|
6
13
|
import { CommonModule } from '@angular/common';
|
|
7
|
-
import * as i0 from '@angular/core';
|
|
8
|
-
import { Injectable, Optional, Component, InjectionToken, Inject, Input, Directive, EventEmitter, Output, NgModule, Injector, forwardRef, Host } from '@angular/core';
|
|
9
|
-
import { of, switchMap, shareReplay, map, timeout, startWith, distinctUntilChanged, from, BehaviorSubject, combineLatest, tap, firstValueFrom, Subject, throttleTime, NEVER, filter, take, exhaustMap, first } from 'rxjs';
|
|
10
14
|
import * as i3 from '@dereekb/dbx-web';
|
|
11
15
|
import { DbxRouterAnchorModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule } from '@dereekb/dbx-web';
|
|
12
16
|
import * as i3$1 from '@dereekb/dbx-core';
|
|
13
17
|
import { loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, authUserIdentifier, DbxInjectionContext, AbstractForwardDbxInjectionContextDirective, DBX_INJECTION_COMPONENT_DATA, DbxInjectionComponentModule, DbxAuthService, AbstractSubscriptionDirective, AbstractIfDirective, LockSetComponentStore } from '@dereekb/dbx-core';
|
|
14
18
|
import { filterMaybe, isNot, SubscriptionObject, cleanupDestroyable, accumulatorFlattenPageListLoadingState, useFirst, successResult, beginLoading, loadingStateFromObs, errorResult, cleanup } from '@dereekb/rxjs';
|
|
15
|
-
import * as i1 from '@angular/fire/auth';
|
|
19
|
+
import * as i1$1 from '@angular/fire/auth';
|
|
16
20
|
import { authState, GoogleAuthProvider, FacebookAuthProvider, TwitterAuthProvider, GithubAuthProvider, signInWithPopup, createUserWithEmailAndPassword, signInWithEmailAndPassword, signInAnonymously, provideAuth, getAuth, connectAuthEmulator } from '@angular/fire/auth';
|
|
17
21
|
import { sendPasswordResetEmail } from 'firebase/auth';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { AbstractAsyncFormlyFormDirective, usernamePasswordLoginFields, ProvideFormlyContext, AbstractSyncFormlyFormDirective, emailField, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule } from '@dereekb/dbx-form';
|
|
22
|
+
import * as i1$2 from '@dereekb/dbx-form';
|
|
23
|
+
import { AbstractAsyncFormlyFormDirective, usernamePasswordLoginFields, provideFormlyContext, AbstractSyncFormlyFormDirective, emailField, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule } from '@dereekb/dbx-form';
|
|
21
24
|
import { initializeApp } from 'firebase/app';
|
|
22
|
-
import * as
|
|
23
|
-
import { provideFirebaseApp } from '@angular/fire/app';
|
|
24
|
-
import * as
|
|
25
|
+
import * as i6$1 from '@angular/fire/app';
|
|
26
|
+
import { FirebaseApp, provideFirebaseApp } from '@angular/fire/app';
|
|
27
|
+
import * as i4$1 from '@angular/fire/storage';
|
|
25
28
|
import { provideStorage, getStorage, connectStorageEmulator } from '@angular/fire/storage';
|
|
26
|
-
import * as
|
|
29
|
+
import * as i5 from '@angular/fire/functions';
|
|
27
30
|
import { provideFunctions, getFunctions, connectFunctionsEmulator, Functions } from '@angular/fire/functions';
|
|
28
|
-
import * as i1$
|
|
31
|
+
import * as i1$3 from '@angular/fire/firestore';
|
|
29
32
|
import { provideFirestore, getFirestore, connectFirestoreEmulator, enableIndexedDbPersistence, Firestore } from '@angular/fire/firestore';
|
|
33
|
+
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
30
34
|
import { firebaseFirestoreContextFactory, iterationQueryDocChangeWatcher, firebaseQueryItemAccumulator, documentDataWithId } from '@dereekb/firebase';
|
|
31
|
-
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Enables debug token generation for AppCheck by setting FIREBASE_APPCHECK_DEBUG_TOKEN in the browser's self/window.
|
|
38
|
+
*
|
|
39
|
+
* https://firebase.google.com/docs/app-check/web/debug-provider
|
|
40
|
+
*
|
|
41
|
+
* @param enable
|
|
42
|
+
*/
|
|
43
|
+
function enableAppCheckDebugTokenGeneration(enable = true) {
|
|
44
|
+
self.FIREBASE_APPCHECK_DEBUG_TOKEN = enable;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const DBX_FIREBASE_OPTIONS_TOKEN = new InjectionToken('DbxFirebaseOptions');
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* HTTP Interceptor that sets the X-Firebase-AppCheck for any requests to the routes configured in DbxFirebaseOptions.
|
|
51
|
+
*/
|
|
52
|
+
class DbxFirebaseAppCheckHttpInterceptor {
|
|
53
|
+
constructor(dbxFirebaseOptions, appCheck) {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
this.dbxFirebaseOptions = dbxFirebaseOptions;
|
|
56
|
+
this.appCheck = appCheck;
|
|
57
|
+
let routes = [];
|
|
58
|
+
if (appCheck != null) {
|
|
59
|
+
routes = ((_b = (_a = this.dbxFirebaseOptions.appCheck) === null || _a === void 0 ? void 0 : _a.appCheckRoutes) !== null && _b !== void 0 ? _b : ['/api/*']).map((route) => {
|
|
60
|
+
const wildcardIndex = route.indexOf('*');
|
|
61
|
+
const isWildcard = (wildcardIndex === route.length - 1);
|
|
62
|
+
const match = (isWildcard) ? route.substring(0, wildcardIndex) : route;
|
|
63
|
+
return {
|
|
64
|
+
isWildcard,
|
|
65
|
+
match
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
this._appCheckRoutes = routes;
|
|
70
|
+
this._isEnabled = routes.length > 0;
|
|
71
|
+
}
|
|
72
|
+
intercept(req, next) {
|
|
73
|
+
let obs;
|
|
74
|
+
if (this._isEnabled) {
|
|
75
|
+
obs = this.matchesAnyRoute(req.url).pipe(switchMap((isMatch) => {
|
|
76
|
+
let nextEvent;
|
|
77
|
+
if (isMatch) {
|
|
78
|
+
nextEvent = from(getToken(this.appCheck).then((appCheckTokenResponse) => {
|
|
79
|
+
const token = appCheckTokenResponse.token;
|
|
80
|
+
let nextRequest = req;
|
|
81
|
+
if (token) {
|
|
82
|
+
nextRequest = req.clone({
|
|
83
|
+
headers: req.headers.set('X-Firebase-AppCheck', token)
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return nextRequest;
|
|
87
|
+
})).pipe(switchMap((nextRequest) => next.handle(nextRequest)));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
nextEvent = next.handle(req);
|
|
91
|
+
}
|
|
92
|
+
return nextEvent;
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
obs = next.handle(req);
|
|
97
|
+
}
|
|
98
|
+
return obs;
|
|
99
|
+
}
|
|
100
|
+
matchesAnyRoute(inputUrl) {
|
|
101
|
+
const url = urlWithoutParameters(inputUrl);
|
|
102
|
+
function isEnabledRouteMatch(enabledRoute) {
|
|
103
|
+
if (enabledRoute.isWildcard) {
|
|
104
|
+
return url.startsWith(enabledRoute.match);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return url === enabledRoute.match;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return from(this._appCheckRoutes).pipe(first((route) => isEnabledRouteMatch(route), false), map(x => Boolean(x)));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
DbxFirebaseAppCheckHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor, deps: [{ token: DBX_FIREBASE_OPTIONS_TOKEN }, { token: i1.AppCheck }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
114
|
+
DbxFirebaseAppCheckHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor });
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAppCheckHttpInterceptor, decorators: [{
|
|
116
|
+
type: Injectable
|
|
117
|
+
}], ctorParameters: function () {
|
|
118
|
+
return [{ type: undefined, decorators: [{
|
|
119
|
+
type: Inject,
|
|
120
|
+
args: [DBX_FIREBASE_OPTIONS_TOKEN]
|
|
121
|
+
}] }, { type: i1.AppCheck }];
|
|
122
|
+
} });
|
|
32
123
|
|
|
33
124
|
/**
|
|
34
125
|
* Derives a user state from the input firebase auth service.
|
|
@@ -41,7 +132,7 @@ function authUserStateFromFirebaseAuthService(dbxFirebaseAuthService, stateForLo
|
|
|
41
132
|
return dbxFirebaseAuthService.hasAuthUser$.pipe(switchMap((hasUser) => {
|
|
42
133
|
let obs;
|
|
43
134
|
if (hasUser) {
|
|
44
|
-
obs = dbxFirebaseAuthService.isAnonymousUser$.pipe(switchMap((isAnon) => isAnon ? of('anon') : stateForLoggedInUser(dbxFirebaseAuthService)));
|
|
135
|
+
obs = dbxFirebaseAuthService.isAnonymousUser$.pipe(switchMap((isAnon) => (isAnon ? of('anon') : stateForLoggedInUser(dbxFirebaseAuthService))));
|
|
45
136
|
}
|
|
46
137
|
else {
|
|
47
138
|
obs = of('none');
|
|
@@ -60,7 +151,7 @@ function authUserStateFromFirebaseAuthService(dbxFirebaseAuthService, stateForLo
|
|
|
60
151
|
function readValueFromIdToken(dbxFirebaseAuthService, readBooleanFromIdToken, defaultValue) {
|
|
61
152
|
return dbxFirebaseAuthService.currentAuthUserInfo$.pipe(switchMap((x) => {
|
|
62
153
|
if (x) {
|
|
63
|
-
return dbxFirebaseAuthService.idTokenResult$.pipe(switchMap(x => readBooleanFromIdToken(x)));
|
|
154
|
+
return dbxFirebaseAuthService.idTokenResult$.pipe(switchMap((x) => readBooleanFromIdToken(x)));
|
|
64
155
|
}
|
|
65
156
|
else {
|
|
66
157
|
return of(defaultValue);
|
|
@@ -85,10 +176,10 @@ const DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE = {
|
|
|
85
176
|
return authUserStateFromFirebaseAuthService(dbxFirebaseAuthService);
|
|
86
177
|
},
|
|
87
178
|
authRolesObs(dbxFirebaseAuthService) {
|
|
88
|
-
return dbxFirebaseAuthService.authUserState$.pipe(map(x => x === 'user' ? new Set(['user']) : new Set()));
|
|
179
|
+
return dbxFirebaseAuthService.authUserState$.pipe(map((x) => (x === 'user' ? new Set(['user']) : new Set())));
|
|
89
180
|
},
|
|
90
181
|
isOnboarded(dbxFirebaseAuthService) {
|
|
91
|
-
return dbxFirebaseAuthService.authUserState$.pipe(map(x => x === 'user'));
|
|
182
|
+
return dbxFirebaseAuthService.authUserState$.pipe(map((x) => x === 'user'));
|
|
92
183
|
}
|
|
93
184
|
};
|
|
94
185
|
class DbxFirebaseAuthService {
|
|
@@ -99,19 +190,19 @@ class DbxFirebaseAuthService {
|
|
|
99
190
|
first: 1000,
|
|
100
191
|
with: () => this._authState$.pipe(startWith(null))
|
|
101
192
|
}), distinctUntilChanged(), shareReplay(1));
|
|
102
|
-
this.currentAuthUserInfo$ = this.currentAuthUser$.pipe(map((x) => (x
|
|
193
|
+
this.currentAuthUserInfo$ = this.currentAuthUser$.pipe(map((x) => (x ? authUserInfoFromAuthUser(x) : undefined)));
|
|
103
194
|
this.authUser$ = this.currentAuthUser$.pipe(filterMaybe());
|
|
104
195
|
this.authUserInfo$ = this.authUser$.pipe(map(authUserInfoFromAuthUser));
|
|
105
|
-
this.hasAuthUser$ = this.currentAuthUser$.pipe(map(x => Boolean(x)), distinctUntilChanged(), shareReplay(1));
|
|
106
|
-
this.isAnonymousUser$ = this.authUser$.pipe(map(x => x.isAnonymous), distinctUntilChanged(), shareReplay(1));
|
|
196
|
+
this.hasAuthUser$ = this.currentAuthUser$.pipe(map((x) => Boolean(x)), distinctUntilChanged(), shareReplay(1));
|
|
197
|
+
this.isAnonymousUser$ = this.authUser$.pipe(map((x) => x.isAnonymous), distinctUntilChanged(), shareReplay(1));
|
|
107
198
|
this.isNotAnonymousUser$ = this.isAnonymousUser$.pipe(isNot());
|
|
108
199
|
this.isLoggedIn$ = this.hasAuthUser$;
|
|
109
200
|
this.isNotLoggedIn$ = this.isLoggedIn$.pipe(isNot());
|
|
110
201
|
this.onLogIn$ = loggedInObsFromIsLoggedIn(this.isLoggedIn$);
|
|
111
202
|
this.onLogOut$ = loggedOutObsFromIsLoggedIn(this.isLoggedIn$);
|
|
112
|
-
this.userIdentifier$ = this.currentAuthUser$.pipe(map(x => authUserIdentifier(x === null || x === void 0 ? void 0 : x.uid)));
|
|
113
|
-
this.idTokenResult$ = this.authUser$.pipe(switchMap(x => x.getIdTokenResult()));
|
|
114
|
-
this.claims$ = this.idTokenResult$.pipe(map(x => x.claims));
|
|
203
|
+
this.userIdentifier$ = this.currentAuthUser$.pipe(map((x) => authUserIdentifier(x === null || x === void 0 ? void 0 : x.uid)));
|
|
204
|
+
this.idTokenResult$ = this.authUser$.pipe(switchMap((x) => x.getIdTokenResult()));
|
|
205
|
+
this.claims$ = this.idTokenResult$.pipe(map((x) => x.claims));
|
|
115
206
|
delegate = delegate !== null && delegate !== void 0 ? delegate : DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE;
|
|
116
207
|
this.authUserState$ = delegate.authUserStateObs(this).pipe(distinctUntilChanged(), shareReplay(1));
|
|
117
208
|
this.authRoles$ = delegate.authRolesObs(this);
|
|
@@ -159,12 +250,12 @@ class DbxFirebaseAuthService {
|
|
|
159
250
|
return this.firebaseAuth.signOut();
|
|
160
251
|
}
|
|
161
252
|
}
|
|
162
|
-
DbxFirebaseAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAuthService, deps: [{ token: i1.Auth }, { token: DbxFirebaseAuthServiceDelegate, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
253
|
+
DbxFirebaseAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAuthService, deps: [{ token: i1$1.Auth }, { token: DbxFirebaseAuthServiceDelegate, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
163
254
|
DbxFirebaseAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAuthService });
|
|
164
255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAuthService, decorators: [{
|
|
165
256
|
type: Injectable
|
|
166
257
|
}], ctorParameters: function () {
|
|
167
|
-
return [{ type: i1.Auth }, { type: DbxFirebaseAuthServiceDelegate, decorators: [{
|
|
258
|
+
return [{ type: i1$1.Auth }, { type: DbxFirebaseAuthServiceDelegate, decorators: [{
|
|
168
259
|
type: Optional
|
|
169
260
|
}] }];
|
|
170
261
|
} });
|
|
@@ -187,21 +278,21 @@ class DbxFirebaseLoginTermsSimpleComponent {
|
|
|
187
278
|
}
|
|
188
279
|
DbxFirebaseLoginTermsSimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginTermsSimpleComponent, deps: [{ token: DbxFirebaseLoginTermsConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
189
280
|
DbxFirebaseLoginTermsSimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginTermsSimpleComponent, selector: "ng-component", ngImport: i0, template: `
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
281
|
+
<div class="dbx-firebase-login-terms-view">
|
|
282
|
+
<dbx-link [anchor]="tosAnchor">Terms</dbx-link>
|
|
283
|
+
<span class="dbx-link-spacer"></span>
|
|
284
|
+
<dbx-link [anchor]="privacyAnchor">Privacy</dbx-link>
|
|
285
|
+
</div>
|
|
195
286
|
`, isInline: true, components: [{ type: i3.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }] });
|
|
196
287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginTermsSimpleComponent, decorators: [{
|
|
197
288
|
type: Component,
|
|
198
289
|
args: [{
|
|
199
290
|
template: `
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
291
|
+
<div class="dbx-firebase-login-terms-view">
|
|
292
|
+
<dbx-link [anchor]="tosAnchor">Terms</dbx-link>
|
|
293
|
+
<span class="dbx-link-spacer"></span>
|
|
294
|
+
<dbx-link [anchor]="privacyAnchor">Privacy</dbx-link>
|
|
295
|
+
</div>
|
|
205
296
|
`
|
|
206
297
|
}]
|
|
207
298
|
}], ctorParameters: function () { return [{ type: DbxFirebaseLoginTermsConfig }]; } });
|
|
@@ -288,7 +379,7 @@ class DbxFirebaseAuthLoginService {
|
|
|
288
379
|
return Array.from(this._providers.keys());
|
|
289
380
|
}
|
|
290
381
|
getEnabledTypes() {
|
|
291
|
-
return
|
|
382
|
+
return this._enableAll ? this.getRegisteredTypes() : Array.from(this._enabled);
|
|
292
383
|
}
|
|
293
384
|
getLoginProvider(type) {
|
|
294
385
|
return this._providers.get(type);
|
|
@@ -300,7 +391,7 @@ class DbxFirebaseAuthLoginService {
|
|
|
300
391
|
return this._providers.get(type);
|
|
301
392
|
}
|
|
302
393
|
getRegisterProviders(types) {
|
|
303
|
-
return filterMaybeValues(mapIterable(types !== null && types !== void 0 ? types : [], (x) => this._providers.get(x))).filter(x => x.registrationComponentClass !== false);
|
|
394
|
+
return filterMaybeValues(mapIterable(types !== null && types !== void 0 ? types : [], (x) => this._providers.get(x))).filter((x) => x.registrationComponentClass !== false);
|
|
304
395
|
}
|
|
305
396
|
getProviderAssets(type) {
|
|
306
397
|
return this._assets.get(type);
|
|
@@ -317,7 +408,7 @@ DbxFirebaseAuthLoginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "1
|
|
|
317
408
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseAuthLoginService, decorators: [{
|
|
318
409
|
type: Injectable,
|
|
319
410
|
args: [{
|
|
320
|
-
providedIn: 'root'
|
|
411
|
+
providedIn: 'root'
|
|
321
412
|
}]
|
|
322
413
|
}], ctorParameters: function () {
|
|
323
414
|
return [{ type: undefined, decorators: [{
|
|
@@ -349,11 +440,11 @@ class DbxFirebaseLoginContext extends DbxInjectionContext {
|
|
|
349
440
|
*/
|
|
350
441
|
class DbxFirebaseLoginButtonComponent {
|
|
351
442
|
constructor() {
|
|
352
|
-
this.handleAction = (
|
|
443
|
+
this.handleAction = () => {
|
|
353
444
|
const loginPromise = this.config.handleLogin();
|
|
354
445
|
return from(loginPromise);
|
|
355
446
|
};
|
|
356
|
-
this.onActionSuccess = (
|
|
447
|
+
this.onActionSuccess = () => {
|
|
357
448
|
// todo: show checkmark on success?
|
|
358
449
|
};
|
|
359
450
|
}
|
|
@@ -380,39 +471,37 @@ class DbxFirebaseLoginButtonComponent {
|
|
|
380
471
|
}
|
|
381
472
|
DbxFirebaseLoginButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
382
473
|
DbxFirebaseLoginButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginButtonComponent, selector: "dbx-firebase-login-button", inputs: { config: "config" }, host: { classAttribute: "dbx-firebase-login-button" }, ngImport: i0, template: `
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
</
|
|
393
|
-
</
|
|
394
|
-
</ng-container>
|
|
474
|
+
<ng-container dbxAction [dbxActionHandler]="handleAction" dbxActionValue [dbxActionSuccessHandler]="onActionSuccess">
|
|
475
|
+
<dbx-button dbxActionButton [customTextColor]="buttonTextColor" [customButtonColor]="buttonColor" [raised]="true">
|
|
476
|
+
<div class="dbx-firebase-login-button-content">
|
|
477
|
+
<span class="dbx-firebase-login-button-icon dbx-icon-spacer">
|
|
478
|
+
<img *ngIf="iconUrl" [src]="iconUrl" />
|
|
479
|
+
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
480
|
+
</span>
|
|
481
|
+
<span class="dbx-firebase-login-button-text">{{ text }}</span>
|
|
482
|
+
</div>
|
|
483
|
+
</dbx-button>
|
|
484
|
+
</ng-container>
|
|
395
485
|
`, isInline: true, components: [{ type: i3.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3$1.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { type: i3$1.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { type: i3$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { type: i3$1.DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: ["dbxActionSuccessHandler"] }, { type: i3$1.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
396
486
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginButtonComponent, decorators: [{
|
|
397
487
|
type: Component,
|
|
398
488
|
args: [{
|
|
399
489
|
selector: 'dbx-firebase-login-button',
|
|
400
490
|
template: `
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
</
|
|
411
|
-
</
|
|
412
|
-
</ng-container>
|
|
491
|
+
<ng-container dbxAction [dbxActionHandler]="handleAction" dbxActionValue [dbxActionSuccessHandler]="onActionSuccess">
|
|
492
|
+
<dbx-button dbxActionButton [customTextColor]="buttonTextColor" [customButtonColor]="buttonColor" [raised]="true">
|
|
493
|
+
<div class="dbx-firebase-login-button-content">
|
|
494
|
+
<span class="dbx-firebase-login-button-icon dbx-icon-spacer">
|
|
495
|
+
<img *ngIf="iconUrl" [src]="iconUrl" />
|
|
496
|
+
<mat-icon *ngIf="icon">{{ icon }}</mat-icon>
|
|
497
|
+
</span>
|
|
498
|
+
<span class="dbx-firebase-login-button-text">{{ text }}</span>
|
|
499
|
+
</div>
|
|
500
|
+
</dbx-button>
|
|
501
|
+
</ng-container>
|
|
413
502
|
`,
|
|
414
503
|
host: {
|
|
415
|
-
|
|
504
|
+
class: 'dbx-firebase-login-button'
|
|
416
505
|
}
|
|
417
506
|
}]
|
|
418
507
|
}], propDecorators: { config: [{
|
|
@@ -422,18 +511,18 @@ class DbxFirebaseLoginButtonContainerComponent {
|
|
|
422
511
|
}
|
|
423
512
|
DbxFirebaseLoginButtonContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginButtonContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
424
513
|
DbxFirebaseLoginButtonContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginButtonContainerComponent, selector: "dbx-firebase-login-button-container", ngImport: i0, template: `
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
514
|
+
<div class="dbx-firebase-login-button-container">
|
|
515
|
+
<ng-content></ng-content>
|
|
516
|
+
</div>
|
|
428
517
|
`, isInline: true });
|
|
429
518
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginButtonContainerComponent, decorators: [{
|
|
430
519
|
type: Component,
|
|
431
520
|
args: [{
|
|
432
521
|
selector: 'dbx-firebase-login-button-container',
|
|
433
522
|
template: `
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
523
|
+
<div class="dbx-firebase-login-button-container">
|
|
524
|
+
<ng-content></ng-content>
|
|
525
|
+
</div>
|
|
437
526
|
`
|
|
438
527
|
}]
|
|
439
528
|
}] });
|
|
@@ -527,8 +616,8 @@ class DbxFirebaseLoginListComponent {
|
|
|
527
616
|
this._omitProviderTypes = new BehaviorSubject(undefined);
|
|
528
617
|
this._inputProviderTypes = new BehaviorSubject(undefined);
|
|
529
618
|
this.providerTypes$ = combineLatest([this._inputProviderTypes, this._omitProviderTypes]).pipe(map(([providerTypes, omitProviderTypes]) => {
|
|
530
|
-
const baseTypes =
|
|
531
|
-
const types =
|
|
619
|
+
const baseTypes = providerTypes ? asArray(providerTypes) : this.dbxFirebaseAuthLoginService.getEnabledTypes();
|
|
620
|
+
const types = omitProviderTypes ? excludeValuesFromArray(baseTypes, asArray(omitProviderTypes)) : baseTypes;
|
|
532
621
|
return types;
|
|
533
622
|
}), shareReplay(1));
|
|
534
623
|
this.providers$ = combineLatest([this.providerTypes$, this._inputProviderCategories]).pipe(map(([x, inputProviderCategories]) => {
|
|
@@ -536,14 +625,12 @@ class DbxFirebaseLoginListComponent {
|
|
|
536
625
|
let providers = this.dbxFirebaseAuthLoginService.getLoginProviders(x);
|
|
537
626
|
if (providerCategories.length) {
|
|
538
627
|
const categories = new Set(providerCategories);
|
|
539
|
-
providers = providers.filter(x => { var _a; return containsStringAnyCase(categories, (_a = x.category) !== null && _a !== void 0 ? _a : ''); });
|
|
628
|
+
providers = providers.filter((x) => { var _a; return containsStringAnyCase(categories, (_a = x.category) !== null && _a !== void 0 ? _a : ''); });
|
|
540
629
|
}
|
|
541
630
|
return providers;
|
|
542
631
|
}));
|
|
543
632
|
this.providerInjectionConfigs$ = combineLatest([this._loginMode, this.providers$]).pipe(map(([mode, providers]) => {
|
|
544
|
-
const mapFn =
|
|
545
|
-
((x) => { var _a; return ({ componentClass: (_a = x.registrationComponentClass) !== null && _a !== void 0 ? _a : x.componentClass }); }) :
|
|
546
|
-
((x) => ({ componentClass: x.componentClass }));
|
|
633
|
+
const mapFn = mode === 'register' ? (x) => { var _a; return ({ componentClass: (_a = x.registrationComponentClass) !== null && _a !== void 0 ? _a : x.componentClass }); } : (x) => ({ componentClass: x.componentClass });
|
|
547
634
|
return providers.map(mapFn);
|
|
548
635
|
}));
|
|
549
636
|
}
|
|
@@ -568,21 +655,21 @@ class DbxFirebaseLoginListComponent {
|
|
|
568
655
|
}
|
|
569
656
|
DbxFirebaseLoginListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginListComponent, deps: [{ token: DbxFirebaseAuthLoginService }], target: i0.ɵɵFactoryTarget.Component });
|
|
570
657
|
DbxFirebaseLoginListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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: `
|
|
571
|
-
<div class="dbx-firebase-login-item" *ngFor="let config of
|
|
658
|
+
<div class="dbx-firebase-login-item" *ngFor="let config of providerInjectionConfigs$ | async">
|
|
572
659
|
<dbx-injection [config]="config"></dbx-injection>
|
|
573
660
|
</div>
|
|
574
|
-
`, isInline: true, components: [{ type: i3$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i6.AsyncPipe } });
|
|
661
|
+
`, isInline: true, components: [{ type: i3$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i6.AsyncPipe } });
|
|
575
662
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginListComponent, decorators: [{
|
|
576
663
|
type: Component,
|
|
577
664
|
args: [{
|
|
578
665
|
selector: 'dbx-firebase-login-list',
|
|
579
666
|
template: `
|
|
580
|
-
<div class="dbx-firebase-login-item" *ngFor="let config of
|
|
667
|
+
<div class="dbx-firebase-login-item" *ngFor="let config of providerInjectionConfigs$ | async">
|
|
581
668
|
<dbx-injection [config]="config"></dbx-injection>
|
|
582
669
|
</div>
|
|
583
|
-
`,
|
|
670
|
+
`,
|
|
584
671
|
host: {
|
|
585
|
-
|
|
672
|
+
class: 'dbx-firebase-login-list'
|
|
586
673
|
}
|
|
587
674
|
}]
|
|
588
675
|
}], ctorParameters: function () { return [{ type: DbxFirebaseAuthLoginService }]; }, propDecorators: { loginMode: [{
|
|
@@ -601,18 +688,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
601
688
|
class DbxFirebaseLoginContextDirective extends AbstractForwardDbxInjectionContextDirective {
|
|
602
689
|
}
|
|
603
690
|
DbxFirebaseLoginContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginContextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
604
|
-
DbxFirebaseLoginContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginContextDirective, selector: "[dbxFirebaseLoginContext]", providers: [
|
|
691
|
+
DbxFirebaseLoginContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginContextDirective, selector: "[dbxFirebaseLoginContext]", providers: [
|
|
692
|
+
{
|
|
605
693
|
provide: DbxFirebaseLoginContext,
|
|
606
694
|
useExisting: DbxFirebaseLoginContextDirective
|
|
607
|
-
}
|
|
695
|
+
}
|
|
696
|
+
], usesInheritance: true, ngImport: i0 });
|
|
608
697
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginContextDirective, decorators: [{
|
|
609
698
|
type: Directive,
|
|
610
699
|
args: [{
|
|
611
|
-
|
|
612
|
-
providers: [
|
|
700
|
+
selector: '[dbxFirebaseLoginContext]',
|
|
701
|
+
providers: [
|
|
702
|
+
{
|
|
613
703
|
provide: DbxFirebaseLoginContext,
|
|
614
704
|
useExisting: DbxFirebaseLoginContextDirective
|
|
615
|
-
}
|
|
705
|
+
}
|
|
706
|
+
]
|
|
616
707
|
}]
|
|
617
708
|
}] });
|
|
618
709
|
|
|
@@ -640,7 +731,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
640
731
|
</ng-container>
|
|
641
732
|
`,
|
|
642
733
|
host: {
|
|
643
|
-
|
|
734
|
+
class: 'd-block dbx-firebase-login',
|
|
644
735
|
'[class]': '{ "dbx-firebase-register": loginMode === "register" }'
|
|
645
736
|
}
|
|
646
737
|
}]
|
|
@@ -687,7 +778,7 @@ class DbxFirebaseEmailFormComponent extends AbstractAsyncFormlyFormDirective {
|
|
|
687
778
|
super(...arguments);
|
|
688
779
|
this._config = new BehaviorSubject({ loginMode: 'login' });
|
|
689
780
|
this.fields$ = this._config.pipe(map(({ loginMode = 'login', passwordConfig }) => {
|
|
690
|
-
const fields = usernamePasswordLoginFields({ username: 'email', password: passwordConfig, verifyPassword:
|
|
781
|
+
const fields = usernamePasswordLoginFields({ username: 'email', password: passwordConfig, verifyPassword: loginMode === 'register' });
|
|
691
782
|
return fields;
|
|
692
783
|
}));
|
|
693
784
|
}
|
|
@@ -700,13 +791,17 @@ class DbxFirebaseEmailFormComponent extends AbstractAsyncFormlyFormDirective {
|
|
|
700
791
|
}
|
|
701
792
|
}
|
|
702
793
|
DbxFirebaseEmailFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
703
|
-
DbxFirebaseEmailFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: { config: "config" }, providers: [
|
|
794
|
+
DbxFirebaseEmailFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: { config: "config" }, providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
|
|
795
|
+
<dbx-formly></dbx-formly>
|
|
796
|
+
`, isInline: true, components: [{ type: i1$2.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
|
|
704
797
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailFormComponent, decorators: [{
|
|
705
798
|
type: Component,
|
|
706
799
|
args: [{
|
|
707
|
-
template:
|
|
800
|
+
template: `
|
|
801
|
+
<dbx-formly></dbx-formly>
|
|
802
|
+
`,
|
|
708
803
|
selector: 'dbx-firebase-email-form',
|
|
709
|
-
providers: [
|
|
804
|
+
providers: [provideFormlyContext()]
|
|
710
805
|
}]
|
|
711
806
|
}], propDecorators: { config: [{
|
|
712
807
|
type: Input
|
|
@@ -719,13 +814,17 @@ class DbxFirebaseEmailRecoveryFormComponent extends AbstractSyncFormlyFormDirect
|
|
|
719
814
|
}
|
|
720
815
|
}
|
|
721
816
|
DbxFirebaseEmailRecoveryFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
722
|
-
DbxFirebaseEmailRecoveryFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form", providers: [
|
|
817
|
+
DbxFirebaseEmailRecoveryFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
|
|
818
|
+
<dbx-formly></dbx-formly>
|
|
819
|
+
`, isInline: true, components: [{ type: i1$2.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
|
|
723
820
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, decorators: [{
|
|
724
821
|
type: Component,
|
|
725
822
|
args: [{
|
|
726
|
-
template:
|
|
823
|
+
template: `
|
|
824
|
+
<dbx-formly></dbx-formly>
|
|
825
|
+
`,
|
|
727
826
|
selector: 'dbx-firebase-email-recovery-form',
|
|
728
|
-
providers: [
|
|
827
|
+
providers: [provideFormlyContext()]
|
|
729
828
|
}]
|
|
730
829
|
}] });
|
|
731
830
|
|
|
@@ -764,15 +863,12 @@ class DbxFirebaseLoginEmailContentComponent {
|
|
|
764
863
|
this.handleRecoveryAction = (value) => {
|
|
765
864
|
this.recoveryFormValue = value;
|
|
766
865
|
this.emailFormValue = { username: value.email, password: '' };
|
|
767
|
-
|
|
866
|
+
const result = this.dbxFirebaseAuthService.sendPasswordResetEmail(value.email);
|
|
768
867
|
return from(result).pipe(tap(() => {
|
|
769
868
|
this.onRecoveringSuccess();
|
|
770
869
|
}));
|
|
771
870
|
};
|
|
772
871
|
}
|
|
773
|
-
ngOnDestroy() {
|
|
774
|
-
this._emailMode.complete();
|
|
775
|
-
}
|
|
776
872
|
static openEmailLoginContext(dbxFirebaseLoginContext, config) {
|
|
777
873
|
return dbxFirebaseLoginContext.showContext({
|
|
778
874
|
config: {
|
|
@@ -782,6 +878,9 @@ class DbxFirebaseLoginEmailContentComponent {
|
|
|
782
878
|
use: (instance) => firstValueFrom(instance.doneOrCancelled)
|
|
783
879
|
});
|
|
784
880
|
}
|
|
881
|
+
ngOnDestroy() {
|
|
882
|
+
this._emailMode.complete();
|
|
883
|
+
}
|
|
785
884
|
get loginMode() {
|
|
786
885
|
return this.config.loginMode;
|
|
787
886
|
}
|
|
@@ -800,6 +899,7 @@ class DbxFirebaseLoginEmailContentComponent {
|
|
|
800
899
|
}
|
|
801
900
|
// MARK: Recovering
|
|
802
901
|
onRecoveringSuccess() {
|
|
902
|
+
// optionally override in parent
|
|
803
903
|
}
|
|
804
904
|
// MARK: Cancel
|
|
805
905
|
onCancel() {
|
|
@@ -810,10 +910,10 @@ class DbxFirebaseLoginEmailContentComponent {
|
|
|
810
910
|
}
|
|
811
911
|
}
|
|
812
912
|
DbxFirebaseLoginEmailContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginEmailContentComponent, deps: [{ token: DbxFirebaseAuthService }, { token: DBX_INJECTION_COMPONENT_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
813
|
-
DbxFirebaseLoginEmailContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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>\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\"
|
|
913
|
+
DbxFirebaseLoginEmailContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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>\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-wide-button\" [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 <ng-container dbxAction [dbxActionHandler]=\"handleRecoveryAction\">\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-wide-button\" 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 </ng-container>\n</ng-template>\n", components: [{ type: DbxFirebaseEmailFormComponent, selector: "dbx-firebase-email-form", inputs: ["config"] }, { type: i3.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }, { type: i3.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3.DbxReadableErrorComponent, selector: "dbx-error", inputs: ["error"] }, { type: DbxFirebaseEmailRecoveryFormComponent, selector: "dbx-firebase-email-recovery-form" }], directives: [{ type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$1.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { type: i3$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { type: i1$2.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "formDisabledOnWorking"] }, { type: i1$2.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { type: i3.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { type: i3.DbxActionErrorDirective, selector: "[dbxActionError]" }], pipes: { "async": i6.AsyncPipe } });
|
|
814
914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginEmailContentComponent, decorators: [{
|
|
815
915
|
type: Component,
|
|
816
|
-
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>\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\"
|
|
916
|
+
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>\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-wide-button\" [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 <ng-container dbxAction [dbxActionHandler]=\"handleRecoveryAction\">\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-wide-button\" 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 </ng-container>\n</ng-template>\n" }]
|
|
817
917
|
}], ctorParameters: function () {
|
|
818
918
|
return [{ type: DbxFirebaseAuthService }, { type: undefined, decorators: [{
|
|
819
919
|
type: Inject,
|
|
@@ -881,12 +981,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
881
981
|
class DbxFirebaseRegisterComponent {
|
|
882
982
|
}
|
|
883
983
|
DbxFirebaseRegisterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseRegisterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
884
|
-
DbxFirebaseRegisterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseRegisterComponent, selector: "dbx-firebase-register", inputs: { providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, ngImport: i0, template:
|
|
984
|
+
DbxFirebaseRegisterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseRegisterComponent, selector: "dbx-firebase-register", inputs: { providerTypes: "providerTypes", omitProviderTypes: "omitProviderTypes", providerCategories: "providerCategories" }, ngImport: i0, template: `
|
|
985
|
+
<dbx-firebase-login loginMode="register" [providerTypes]="providerTypes" [omitProviderTypes]="omitProviderTypes" [providerCategories]="providerCategories"></dbx-firebase-login>
|
|
986
|
+
`, isInline: true, components: [{ type: DbxFirebaseLoginComponent, selector: "dbx-firebase-login", inputs: ["loginMode", "providerTypes", "omitProviderTypes", "providerCategories"] }] });
|
|
885
987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseRegisterComponent, decorators: [{
|
|
886
988
|
type: Component,
|
|
887
989
|
args: [{
|
|
888
990
|
selector: 'dbx-firebase-register',
|
|
889
|
-
template:
|
|
991
|
+
template: `
|
|
992
|
+
<dbx-firebase-login loginMode="register" [providerTypes]="providerTypes" [omitProviderTypes]="omitProviderTypes" [providerCategories]="providerCategories"></dbx-firebase-login>
|
|
993
|
+
`
|
|
890
994
|
}]
|
|
891
995
|
}], propDecorators: { providerTypes: [{
|
|
892
996
|
type: Input
|
|
@@ -975,39 +1079,43 @@ class DbxFirebaseLoginTermsComponent {
|
|
|
975
1079
|
}
|
|
976
1080
|
}
|
|
977
1081
|
DbxFirebaseLoginTermsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginTermsComponent, deps: [{ token: DbxFirebaseAuthLoginService }], target: i0.ɵɵFactoryTarget.Component });
|
|
978
|
-
DbxFirebaseLoginTermsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginTermsComponent, selector: "dbx-firebase-login-terms", host: { classAttribute: "dbx-firebase-login-terms d-block" }, ngImport: i0, template:
|
|
1082
|
+
DbxFirebaseLoginTermsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginTermsComponent, selector: "dbx-firebase-login-terms", host: { classAttribute: "dbx-firebase-login-terms d-block" }, ngImport: i0, template: `
|
|
1083
|
+
<dbx-injection [config]="config"></dbx-injection>
|
|
1084
|
+
`, isInline: true, components: [{ type: i3$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] });
|
|
979
1085
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginTermsComponent, decorators: [{
|
|
980
1086
|
type: Component,
|
|
981
1087
|
args: [{
|
|
982
1088
|
selector: 'dbx-firebase-login-terms',
|
|
983
|
-
template:
|
|
1089
|
+
template: `
|
|
1090
|
+
<dbx-injection [config]="config"></dbx-injection>
|
|
1091
|
+
`,
|
|
984
1092
|
host: {
|
|
985
|
-
|
|
1093
|
+
class: 'dbx-firebase-login-terms d-block'
|
|
986
1094
|
}
|
|
987
1095
|
}]
|
|
988
1096
|
}], ctorParameters: function () { return [{ type: DbxFirebaseAuthLoginService }]; } });
|
|
989
1097
|
|
|
990
1098
|
class DbxFirebaseLoginContextBackButtonComponent {
|
|
991
1099
|
constructor() {
|
|
992
|
-
this.
|
|
1100
|
+
this.cancelLogin = new EventEmitter();
|
|
993
1101
|
this.anchor = {
|
|
994
|
-
onClick: () => this.
|
|
1102
|
+
onClick: () => this.cancelLogin.emit()
|
|
995
1103
|
};
|
|
996
1104
|
}
|
|
997
1105
|
}
|
|
998
1106
|
DbxFirebaseLoginContextBackButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginContextBackButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
999
|
-
DbxFirebaseLoginContextBackButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginContextBackButtonComponent, selector: "dbx-firebase-login-context-back-button", outputs: {
|
|
1107
|
+
DbxFirebaseLoginContextBackButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFirebaseLoginContextBackButtonComponent, selector: "dbx-firebase-login-context-back-button", outputs: { cancelLogin: "cancelLogin" }, ngImport: i0, template: `
|
|
1000
1108
|
<dbx-link [anchor]="anchor">Choose other login method.</dbx-link>
|
|
1001
1109
|
`, isInline: true, components: [{ type: i3.DbxAnchorLinkComponent, selector: "dbx-link", inputs: ["anchor", "ref", "href"] }] });
|
|
1002
1110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginContextBackButtonComponent, decorators: [{
|
|
1003
1111
|
type: Component,
|
|
1004
1112
|
args: [{
|
|
1005
|
-
|
|
1006
|
-
|
|
1113
|
+
selector: 'dbx-firebase-login-context-back-button',
|
|
1114
|
+
template: `
|
|
1007
1115
|
<dbx-link [anchor]="anchor">Choose other login method.</dbx-link>
|
|
1008
1116
|
`
|
|
1009
1117
|
}]
|
|
1010
|
-
}], propDecorators: {
|
|
1118
|
+
}], propDecorators: { cancelLogin: [{
|
|
1011
1119
|
type: Output
|
|
1012
1120
|
}] } });
|
|
1013
1121
|
|
|
@@ -1018,7 +1126,8 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1018
1126
|
// https://firebase.google.com/docs/auth/web/firebaseui
|
|
1019
1127
|
const baseFirebaseJSUrl = `https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth`;
|
|
1020
1128
|
// NOTE: Colors are from https://brandcolors.net/
|
|
1021
|
-
return [
|
|
1129
|
+
return [
|
|
1130
|
+
{
|
|
1022
1131
|
category: DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1023
1132
|
loginMethodType: 'email',
|
|
1024
1133
|
componentClass: DbxFirebaseLoginEmailComponent,
|
|
@@ -1029,7 +1138,8 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1029
1138
|
backgroundColor: '#ea4335',
|
|
1030
1139
|
textColor: '#FFF'
|
|
1031
1140
|
}
|
|
1032
|
-
},
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1033
1143
|
category: OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1034
1144
|
loginMethodType: 'google',
|
|
1035
1145
|
componentClass: DbxFirebaseLoginGoogleComponent,
|
|
@@ -1039,7 +1149,8 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1039
1149
|
backgroundColor: '#FFF',
|
|
1040
1150
|
textColor: '#757575'
|
|
1041
1151
|
}
|
|
1042
|
-
},
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1043
1154
|
category: OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1044
1155
|
loginMethodType: 'facebook',
|
|
1045
1156
|
componentClass: DbxFirebaseLoginFacebookComponent,
|
|
@@ -1049,7 +1160,8 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1049
1160
|
backgroundColor: '#4267B2',
|
|
1050
1161
|
textColor: '#FFF'
|
|
1051
1162
|
}
|
|
1052
|
-
},
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1053
1165
|
category: OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1054
1166
|
loginMethodType: 'twitter',
|
|
1055
1167
|
componentClass: DbxFirebaseLoginTwitterComponent,
|
|
@@ -1059,7 +1171,8 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1059
1171
|
backgroundColor: '#1da1f2',
|
|
1060
1172
|
textColor: '#FFF'
|
|
1061
1173
|
}
|
|
1062
|
-
},
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1063
1176
|
category: OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1064
1177
|
loginMethodType: 'github',
|
|
1065
1178
|
componentClass: DbxFirebaseLoginGitHubComponent,
|
|
@@ -1070,7 +1183,27 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1070
1183
|
textColor: '#FFF'
|
|
1071
1184
|
}
|
|
1072
1185
|
},
|
|
1073
|
-
{
|
|
1186
|
+
/*{
|
|
1187
|
+
category: OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1188
|
+
loginMethodType: 'apple' as KnownFirebaseLoginMethodType,
|
|
1189
|
+
componentClass: DbxFirebaseLoginGitHubComponent,
|
|
1190
|
+
assets: {
|
|
1191
|
+
logoUrl: `${baseFirebaseJSUrl}/apple.svg`,
|
|
1192
|
+
loginText: 'Continue with Apple',
|
|
1193
|
+
backgroundColor: '#333',
|
|
1194
|
+
textColor: '#FFF'
|
|
1195
|
+
}
|
|
1196
|
+
}, {
|
|
1197
|
+
category: OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1198
|
+
loginMethodType: 'microsoft' as KnownFirebaseLoginMethodType,
|
|
1199
|
+
componentClass: DbxFirebaseLoginGitHubComponent,
|
|
1200
|
+
assets: {
|
|
1201
|
+
logoUrl: `${baseFirebaseJSUrl}/microsoft.svg`,
|
|
1202
|
+
loginText: 'Continue with Microsoft',
|
|
1203
|
+
backgroundColor: '#ea3e23',
|
|
1204
|
+
textColor: '#FFF'
|
|
1205
|
+
}
|
|
1206
|
+
},*/ {
|
|
1074
1207
|
category: DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY,
|
|
1075
1208
|
loginMethodType: 'anonymous',
|
|
1076
1209
|
componentClass: DbxFirebaseLoginAnonymousComponent,
|
|
@@ -1080,7 +1213,8 @@ function defaultFirebaseAuthLoginProvidersFactory() {
|
|
|
1080
1213
|
backgroundColor: '#000',
|
|
1081
1214
|
textColor: '#FFF'
|
|
1082
1215
|
}
|
|
1083
|
-
}
|
|
1216
|
+
}
|
|
1217
|
+
];
|
|
1084
1218
|
}
|
|
1085
1219
|
/**
|
|
1086
1220
|
* Contains components related to logging in.
|
|
@@ -1097,22 +1231,28 @@ class DbxFirebaseLoginModule {
|
|
|
1097
1231
|
static forRoot(config) {
|
|
1098
1232
|
return {
|
|
1099
1233
|
ngModule: DbxFirebaseLoginModule,
|
|
1100
|
-
providers: [
|
|
1234
|
+
providers: [
|
|
1235
|
+
{
|
|
1101
1236
|
provide: DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN,
|
|
1102
1237
|
useFactory: defaultFirebaseAuthLoginProvidersFactory
|
|
1103
|
-
},
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1104
1240
|
provide: DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN,
|
|
1105
1241
|
useValue: config.termsComponentClass
|
|
1106
|
-
},
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1107
1244
|
provide: DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN,
|
|
1108
1245
|
useValue: config.passwordConfig
|
|
1109
|
-
},
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1110
1248
|
provide: DbxFirebaseLoginModuleRootConfig,
|
|
1111
1249
|
useValue: config
|
|
1112
|
-
},
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1113
1252
|
provide: DbxFirebaseLoginTermsConfig,
|
|
1114
1253
|
useValue: config
|
|
1115
|
-
}
|
|
1254
|
+
}
|
|
1255
|
+
]
|
|
1116
1256
|
};
|
|
1117
1257
|
}
|
|
1118
1258
|
}
|
|
@@ -1137,19 +1277,7 @@ DbxFirebaseLoginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
1137
1277
|
DbxFirebaseLoginFacebookComponent,
|
|
1138
1278
|
DbxFirebaseLoginAnonymousComponent,
|
|
1139
1279
|
DbxFirebaseLoginTermsComponent,
|
|
1140
|
-
DbxFirebaseLoginTermsSimpleComponent], imports: [CommonModule,
|
|
1141
|
-
MatIconModule,
|
|
1142
|
-
MatButtonModule,
|
|
1143
|
-
DbxRouterAnchorModule,
|
|
1144
|
-
DbxFormIoModule,
|
|
1145
|
-
DbxFormModule,
|
|
1146
|
-
DbxFormlyModule,
|
|
1147
|
-
DbxFormActionModule,
|
|
1148
|
-
DbxFormFormlyTextFieldModule,
|
|
1149
|
-
DbxReadableErrorModule,
|
|
1150
|
-
DbxActionModule,
|
|
1151
|
-
DbxButtonModule,
|
|
1152
|
-
DbxInjectionComponentModule], exports: [DbxFirebaseLoginComponent,
|
|
1280
|
+
DbxFirebaseLoginTermsSimpleComponent], imports: [CommonModule, MatIconModule, MatButtonModule, DbxRouterAnchorModule, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxInjectionComponentModule], exports: [DbxFirebaseLoginComponent,
|
|
1153
1281
|
DbxFirebaseLoginContextDirective,
|
|
1154
1282
|
DbxFirebaseLoginContextBackButtonComponent,
|
|
1155
1283
|
DbxFirebaseRegisterComponent,
|
|
@@ -1170,39 +1298,11 @@ DbxFirebaseLoginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
1170
1298
|
DbxFirebaseLoginAnonymousComponent,
|
|
1171
1299
|
DbxFirebaseLoginTermsComponent,
|
|
1172
1300
|
DbxFirebaseLoginTermsSimpleComponent] });
|
|
1173
|
-
DbxFirebaseLoginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginModule, providers: [], imports: [[
|
|
1174
|
-
CommonModule,
|
|
1175
|
-
MatIconModule,
|
|
1176
|
-
MatButtonModule,
|
|
1177
|
-
DbxRouterAnchorModule,
|
|
1178
|
-
DbxFormIoModule,
|
|
1179
|
-
DbxFormModule,
|
|
1180
|
-
DbxFormlyModule,
|
|
1181
|
-
DbxFormActionModule,
|
|
1182
|
-
DbxFormFormlyTextFieldModule,
|
|
1183
|
-
DbxReadableErrorModule,
|
|
1184
|
-
DbxActionModule,
|
|
1185
|
-
DbxButtonModule,
|
|
1186
|
-
DbxInjectionComponentModule
|
|
1187
|
-
]] });
|
|
1301
|
+
DbxFirebaseLoginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginModule, providers: [], imports: [[CommonModule, MatIconModule, MatButtonModule, DbxRouterAnchorModule, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxInjectionComponentModule]] });
|
|
1188
1302
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseLoginModule, decorators: [{
|
|
1189
1303
|
type: NgModule,
|
|
1190
1304
|
args: [{
|
|
1191
|
-
imports: [
|
|
1192
|
-
CommonModule,
|
|
1193
|
-
MatIconModule,
|
|
1194
|
-
MatButtonModule,
|
|
1195
|
-
DbxRouterAnchorModule,
|
|
1196
|
-
DbxFormIoModule,
|
|
1197
|
-
DbxFormModule,
|
|
1198
|
-
DbxFormlyModule,
|
|
1199
|
-
DbxFormActionModule,
|
|
1200
|
-
DbxFormFormlyTextFieldModule,
|
|
1201
|
-
DbxReadableErrorModule,
|
|
1202
|
-
DbxActionModule,
|
|
1203
|
-
DbxButtonModule,
|
|
1204
|
-
DbxInjectionComponentModule
|
|
1205
|
-
],
|
|
1305
|
+
imports: [CommonModule, MatIconModule, MatButtonModule, DbxRouterAnchorModule, DbxFormIoModule, DbxFormModule, DbxFormlyModule, DbxFormActionModule, DbxFormFormlyTextFieldModule, DbxReadableErrorModule, DbxActionModule, DbxButtonModule, DbxInjectionComponentModule],
|
|
1206
1306
|
declarations: [
|
|
1207
1307
|
DbxFirebaseLoginComponent,
|
|
1208
1308
|
DbxFirebaseLoginContextDirective,
|
|
@@ -1293,10 +1393,11 @@ class DbxFirebaseParsedEmulatorsConfig {
|
|
|
1293
1393
|
class DbxFirebaseDefaultFirestoreProviderModule {
|
|
1294
1394
|
}
|
|
1295
1395
|
DbxFirebaseDefaultFirestoreProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1296
|
-
DbxFirebaseDefaultFirestoreProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [i1$
|
|
1396
|
+
DbxFirebaseDefaultFirestoreProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [i1$3.FirestoreModule] });
|
|
1297
1397
|
DbxFirebaseDefaultFirestoreProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirestoreProviderModule, imports: [[
|
|
1298
1398
|
provideFirestore(((injector) => {
|
|
1299
|
-
const
|
|
1399
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1400
|
+
const firestore = getFirestore(firebaseApp);
|
|
1300
1401
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1301
1402
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.firestore)) {
|
|
1302
1403
|
connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
|
|
@@ -1310,7 +1411,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1310
1411
|
args: [{
|
|
1311
1412
|
imports: [
|
|
1312
1413
|
provideFirestore(((injector) => {
|
|
1313
|
-
const
|
|
1414
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1415
|
+
const firestore = getFirestore(firebaseApp);
|
|
1314
1416
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1315
1417
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.firestore)) {
|
|
1316
1418
|
connectFirestoreEmulator(firestore, emulators.firestore.host, emulators.firestore.port, {});
|
|
@@ -1321,16 +1423,102 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1321
1423
|
]
|
|
1322
1424
|
}]
|
|
1323
1425
|
}] });
|
|
1426
|
+
/**
|
|
1427
|
+
* Default firebase app check provider module.
|
|
1428
|
+
*
|
|
1429
|
+
* Also configures the DbxFirebaseAppCheckHttpInterceptor with HTTP_INTERCEPTORS in order for appCheck to be appended to requests to the api.
|
|
1430
|
+
*/
|
|
1431
|
+
class DbxFirebaseDefaultAppCheckProviderModule {
|
|
1432
|
+
}
|
|
1433
|
+
DbxFirebaseDefaultAppCheckProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1434
|
+
DbxFirebaseDefaultAppCheckProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, imports: [i1.AppCheckModule] });
|
|
1435
|
+
DbxFirebaseDefaultAppCheckProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, providers: [
|
|
1436
|
+
{
|
|
1437
|
+
provide: HTTP_INTERCEPTORS,
|
|
1438
|
+
useClass: DbxFirebaseAppCheckHttpInterceptor,
|
|
1439
|
+
multi: true
|
|
1440
|
+
}
|
|
1441
|
+
], imports: [[
|
|
1442
|
+
provideAppCheck(((injector) => {
|
|
1443
|
+
var _a, _b, _c;
|
|
1444
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1445
|
+
const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
|
|
1446
|
+
const appCheckOptions = firebaseOptions.appCheck;
|
|
1447
|
+
const appCheckKnowinglyDisabled = (appCheckOptions === null || appCheckOptions === void 0 ? void 0 : appCheckOptions.disabled) === true || ((_a = firebaseOptions.emulators) === null || _a === void 0 ? void 0 : _a.useEmulators) === true;
|
|
1448
|
+
let appCheck;
|
|
1449
|
+
if (appCheckOptions && !appCheckKnowinglyDisabled) {
|
|
1450
|
+
// enable the debug tokens if not using emulators and allowDebugTokens is set true
|
|
1451
|
+
if (((_b = firebaseOptions.emulators) === null || _b === void 0 ? void 0 : _b.useEmulators) !== true && appCheckOptions.allowDebugTokens) {
|
|
1452
|
+
enableAppCheckDebugTokenGeneration(true);
|
|
1453
|
+
}
|
|
1454
|
+
// Only enabled outside of app-check environments. The emulators will not use appcheck.
|
|
1455
|
+
appCheck = initializeAppCheck(firebaseApp, {
|
|
1456
|
+
provider: new ReCaptchaV3Provider(appCheckOptions.reCaptchaV3),
|
|
1457
|
+
isTokenAutoRefreshEnabled: (_c = appCheckOptions.isTokenAutoRefreshEnabled) !== null && _c !== void 0 ? _c : true
|
|
1458
|
+
});
|
|
1459
|
+
console.debug('Enabled AppCheck.');
|
|
1460
|
+
}
|
|
1461
|
+
else {
|
|
1462
|
+
appCheck = undefined;
|
|
1463
|
+
if (!appCheckKnowinglyDisabled) {
|
|
1464
|
+
console.error('dbx-firebase: No appcheck configuration for the app, and not specifically disabled in config either.');
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
return appCheck;
|
|
1468
|
+
}))
|
|
1469
|
+
]] });
|
|
1470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAppCheckProviderModule, decorators: [{
|
|
1471
|
+
type: NgModule,
|
|
1472
|
+
args: [{
|
|
1473
|
+
imports: [
|
|
1474
|
+
provideAppCheck(((injector) => {
|
|
1475
|
+
var _a, _b, _c;
|
|
1476
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1477
|
+
const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
|
|
1478
|
+
const appCheckOptions = firebaseOptions.appCheck;
|
|
1479
|
+
const appCheckKnowinglyDisabled = (appCheckOptions === null || appCheckOptions === void 0 ? void 0 : appCheckOptions.disabled) === true || ((_a = firebaseOptions.emulators) === null || _a === void 0 ? void 0 : _a.useEmulators) === true;
|
|
1480
|
+
let appCheck;
|
|
1481
|
+
if (appCheckOptions && !appCheckKnowinglyDisabled) {
|
|
1482
|
+
// enable the debug tokens if not using emulators and allowDebugTokens is set true
|
|
1483
|
+
if (((_b = firebaseOptions.emulators) === null || _b === void 0 ? void 0 : _b.useEmulators) !== true && appCheckOptions.allowDebugTokens) {
|
|
1484
|
+
enableAppCheckDebugTokenGeneration(true);
|
|
1485
|
+
}
|
|
1486
|
+
// Only enabled outside of app-check environments. The emulators will not use appcheck.
|
|
1487
|
+
appCheck = initializeAppCheck(firebaseApp, {
|
|
1488
|
+
provider: new ReCaptchaV3Provider(appCheckOptions.reCaptchaV3),
|
|
1489
|
+
isTokenAutoRefreshEnabled: (_c = appCheckOptions.isTokenAutoRefreshEnabled) !== null && _c !== void 0 ? _c : true
|
|
1490
|
+
});
|
|
1491
|
+
console.debug('Enabled AppCheck.');
|
|
1492
|
+
}
|
|
1493
|
+
else {
|
|
1494
|
+
appCheck = undefined;
|
|
1495
|
+
if (!appCheckKnowinglyDisabled) {
|
|
1496
|
+
console.error('dbx-firebase: No appcheck configuration for the app, and not specifically disabled in config either.');
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
return appCheck;
|
|
1500
|
+
}))
|
|
1501
|
+
],
|
|
1502
|
+
providers: [
|
|
1503
|
+
{
|
|
1504
|
+
provide: HTTP_INTERCEPTORS,
|
|
1505
|
+
useClass: DbxFirebaseAppCheckHttpInterceptor,
|
|
1506
|
+
multi: true
|
|
1507
|
+
}
|
|
1508
|
+
]
|
|
1509
|
+
}]
|
|
1510
|
+
}] });
|
|
1324
1511
|
/**
|
|
1325
1512
|
* Default firebase auth provider module.
|
|
1326
1513
|
*/
|
|
1327
1514
|
class DbxFirebaseDefaultAuthProviderModule {
|
|
1328
1515
|
}
|
|
1329
1516
|
DbxFirebaseDefaultAuthProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1330
|
-
DbxFirebaseDefaultAuthProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [i1.AuthModule] });
|
|
1517
|
+
DbxFirebaseDefaultAuthProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [i1$1.AuthModule] });
|
|
1331
1518
|
DbxFirebaseDefaultAuthProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultAuthProviderModule, imports: [[
|
|
1332
1519
|
provideAuth(((injector) => {
|
|
1333
|
-
const
|
|
1520
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1521
|
+
const auth = getAuth(firebaseApp);
|
|
1334
1522
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1335
1523
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.auth)) {
|
|
1336
1524
|
connectAuthEmulator(auth, `http://${emulators.auth.host}:${emulators.auth.port}`);
|
|
@@ -1343,7 +1531,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1343
1531
|
args: [{
|
|
1344
1532
|
imports: [
|
|
1345
1533
|
provideAuth(((injector) => {
|
|
1346
|
-
const
|
|
1534
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1535
|
+
const auth = getAuth(firebaseApp);
|
|
1347
1536
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1348
1537
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.auth)) {
|
|
1349
1538
|
connectAuthEmulator(auth, `http://${emulators.auth.host}:${emulators.auth.port}`);
|
|
@@ -1359,10 +1548,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1359
1548
|
class DbxFirebaseDefaultStorageProviderModule {
|
|
1360
1549
|
}
|
|
1361
1550
|
DbxFirebaseDefaultStorageProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1362
|
-
DbxFirebaseDefaultStorageProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [
|
|
1551
|
+
DbxFirebaseDefaultStorageProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [i4$1.StorageModule] });
|
|
1363
1552
|
DbxFirebaseDefaultStorageProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultStorageProviderModule, imports: [[
|
|
1364
1553
|
provideStorage(((injector) => {
|
|
1365
|
-
const
|
|
1554
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1555
|
+
const storage = getStorage(firebaseApp);
|
|
1366
1556
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1367
1557
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.storage)) {
|
|
1368
1558
|
connectStorageEmulator(storage, emulators.storage.host, emulators.storage.port, {});
|
|
@@ -1375,7 +1565,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1375
1565
|
args: [{
|
|
1376
1566
|
imports: [
|
|
1377
1567
|
provideStorage(((injector) => {
|
|
1378
|
-
const
|
|
1568
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1569
|
+
const storage = getStorage(firebaseApp);
|
|
1379
1570
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1380
1571
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.storage)) {
|
|
1381
1572
|
connectStorageEmulator(storage, emulators.storage.host, emulators.storage.port, {});
|
|
@@ -1391,10 +1582,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1391
1582
|
class DbxFirebaseDefaultFunctionsProviderModule {
|
|
1392
1583
|
}
|
|
1393
1584
|
DbxFirebaseDefaultFunctionsProviderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1394
|
-
DbxFirebaseDefaultFunctionsProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [
|
|
1585
|
+
DbxFirebaseDefaultFunctionsProviderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [i5.FunctionsModule] });
|
|
1395
1586
|
DbxFirebaseDefaultFunctionsProviderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFunctionsProviderModule, imports: [[
|
|
1396
1587
|
provideFunctions(((injector) => {
|
|
1397
|
-
const
|
|
1588
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1589
|
+
const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
|
|
1590
|
+
const { functionsRegionOrCustomDomain } = firebaseOptions;
|
|
1591
|
+
const functions = getFunctions(firebaseApp, functionsRegionOrCustomDomain);
|
|
1398
1592
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1399
1593
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.functions)) {
|
|
1400
1594
|
connectFunctionsEmulator(functions, emulators.functions.host, emulators.functions.port);
|
|
@@ -1407,7 +1601,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1407
1601
|
args: [{
|
|
1408
1602
|
imports: [
|
|
1409
1603
|
provideFunctions(((injector) => {
|
|
1410
|
-
const
|
|
1604
|
+
const firebaseApp = injector.get(FirebaseApp);
|
|
1605
|
+
const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
|
|
1606
|
+
const { functionsRegionOrCustomDomain } = firebaseOptions;
|
|
1607
|
+
const functions = getFunctions(firebaseApp, functionsRegionOrCustomDomain);
|
|
1411
1608
|
const emulators = injector.get(DbxFirebaseParsedEmulatorsConfig, undefined);
|
|
1412
1609
|
if ((emulators === null || emulators === void 0 ? void 0 : emulators.useEmulators) && (emulators === null || emulators === void 0 ? void 0 : emulators.functions)) {
|
|
1413
1610
|
connectFunctionsEmulator(functions, emulators.functions.host, emulators.functions.port);
|
|
@@ -1417,7 +1614,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1417
1614
|
]
|
|
1418
1615
|
}]
|
|
1419
1616
|
}] });
|
|
1420
|
-
const DBX_FIREBASE_OPTIONS_TOKEN = new InjectionToken('DbxFirebaseOptions');
|
|
1421
1617
|
/**
|
|
1422
1618
|
* Default provider module.
|
|
1423
1619
|
*/
|
|
@@ -1425,37 +1621,41 @@ class DbxFirebaseDefaultFirebaseProvidersModule {
|
|
|
1425
1621
|
static forRoot(firebaseOptions) {
|
|
1426
1622
|
return {
|
|
1427
1623
|
ngModule: DbxFirebaseDefaultFirebaseProvidersModule,
|
|
1428
|
-
providers: [
|
|
1624
|
+
providers: [
|
|
1625
|
+
{
|
|
1429
1626
|
provide: DBX_FIREBASE_OPTIONS_TOKEN,
|
|
1430
1627
|
useValue: firebaseOptions
|
|
1431
|
-
}
|
|
1628
|
+
}
|
|
1629
|
+
]
|
|
1432
1630
|
};
|
|
1433
1631
|
}
|
|
1434
1632
|
}
|
|
1435
1633
|
DbxFirebaseDefaultFirebaseProvidersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1436
|
-
DbxFirebaseDefaultFirebaseProvidersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDefaultFunctionsProviderModule
|
|
1634
|
+
DbxFirebaseDefaultFirebaseProvidersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [i6$1.FirebaseAppModule, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDefaultFunctionsProviderModule] });
|
|
1437
1635
|
DbxFirebaseDefaultFirebaseProvidersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, imports: [[
|
|
1438
|
-
DbxFirebaseDefaultFirestoreProviderModule,
|
|
1439
|
-
DbxFirebaseDefaultAuthProviderModule,
|
|
1440
|
-
DbxFirebaseDefaultStorageProviderModule,
|
|
1441
|
-
DbxFirebaseDefaultFunctionsProviderModule,
|
|
1442
1636
|
provideFirebaseApp(((injector) => {
|
|
1443
1637
|
const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
|
|
1444
1638
|
return initializeApp(firebaseOptions);
|
|
1445
|
-
}))
|
|
1639
|
+
})),
|
|
1640
|
+
DbxFirebaseDefaultAppCheckProviderModule,
|
|
1641
|
+
DbxFirebaseDefaultFirestoreProviderModule,
|
|
1642
|
+
DbxFirebaseDefaultAuthProviderModule,
|
|
1643
|
+
DbxFirebaseDefaultStorageProviderModule,
|
|
1644
|
+
DbxFirebaseDefaultFunctionsProviderModule
|
|
1446
1645
|
]] });
|
|
1447
1646
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseDefaultFirebaseProvidersModule, decorators: [{
|
|
1448
1647
|
type: NgModule,
|
|
1449
1648
|
args: [{
|
|
1450
1649
|
imports: [
|
|
1451
|
-
DbxFirebaseDefaultFirestoreProviderModule,
|
|
1452
|
-
DbxFirebaseDefaultAuthProviderModule,
|
|
1453
|
-
DbxFirebaseDefaultStorageProviderModule,
|
|
1454
|
-
DbxFirebaseDefaultFunctionsProviderModule,
|
|
1455
1650
|
provideFirebaseApp(((injector) => {
|
|
1456
1651
|
const firebaseOptions = injector.get(DBX_FIREBASE_OPTIONS_TOKEN);
|
|
1457
1652
|
return initializeApp(firebaseOptions);
|
|
1458
|
-
}))
|
|
1653
|
+
})),
|
|
1654
|
+
DbxFirebaseDefaultAppCheckProviderModule,
|
|
1655
|
+
DbxFirebaseDefaultFirestoreProviderModule,
|
|
1656
|
+
DbxFirebaseDefaultAuthProviderModule,
|
|
1657
|
+
DbxFirebaseDefaultStorageProviderModule,
|
|
1658
|
+
DbxFirebaseDefaultFunctionsProviderModule
|
|
1459
1659
|
]
|
|
1460
1660
|
}]
|
|
1461
1661
|
}] });
|
|
@@ -1469,7 +1669,7 @@ class DbxFirebaseEmulatorModule {
|
|
|
1469
1669
|
const defaultHost = (_a = config.host) !== null && _a !== void 0 ? _a : 'localhost';
|
|
1470
1670
|
function emulatorConfig(emulator) {
|
|
1471
1671
|
var _a;
|
|
1472
|
-
return
|
|
1672
|
+
return emulator ? { host: (_a = emulator.host) !== null && _a !== void 0 ? _a : defaultHost, port: emulator.port } : undefined;
|
|
1473
1673
|
}
|
|
1474
1674
|
const finalConfig = {
|
|
1475
1675
|
useEmulators: config.useEmulators !== false,
|
|
@@ -1481,10 +1681,12 @@ class DbxFirebaseEmulatorModule {
|
|
|
1481
1681
|
};
|
|
1482
1682
|
return {
|
|
1483
1683
|
ngModule: DbxFirebaseEmulatorModule,
|
|
1484
|
-
providers: [
|
|
1684
|
+
providers: [
|
|
1685
|
+
{
|
|
1485
1686
|
provide: DbxFirebaseParsedEmulatorsConfig,
|
|
1486
1687
|
useValue: finalConfig
|
|
1487
|
-
}
|
|
1688
|
+
}
|
|
1689
|
+
]
|
|
1488
1690
|
};
|
|
1489
1691
|
}
|
|
1490
1692
|
}
|
|
@@ -1507,15 +1709,18 @@ class DbxFirebaseFirestoreCollectionModule {
|
|
|
1507
1709
|
static forRoot(config) {
|
|
1508
1710
|
return {
|
|
1509
1711
|
ngModule: DbxFirebaseFirestoreCollectionModule,
|
|
1510
|
-
providers: [
|
|
1712
|
+
providers: [
|
|
1713
|
+
{
|
|
1511
1714
|
provide: DBX_FIRESTORE_CONTEXT_TOKEN,
|
|
1512
1715
|
useFactory: firebaseFirestoreContextFactory,
|
|
1513
1716
|
deps: [Firestore]
|
|
1514
|
-
},
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1515
1719
|
provide: config.appCollectionClass,
|
|
1516
1720
|
useFactory: config.collectionFactory,
|
|
1517
1721
|
deps: [DBX_FIRESTORE_CONTEXT_TOKEN]
|
|
1518
|
-
}
|
|
1722
|
+
}
|
|
1723
|
+
]
|
|
1519
1724
|
};
|
|
1520
1725
|
}
|
|
1521
1726
|
}
|
|
@@ -1553,11 +1758,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1553
1758
|
*/
|
|
1554
1759
|
class DbxFirebaseFunctionsModule {
|
|
1555
1760
|
static forRoot(config) {
|
|
1556
|
-
const providers = [
|
|
1761
|
+
const providers = [
|
|
1762
|
+
{
|
|
1557
1763
|
provide: config.functionsGetterToken,
|
|
1558
1764
|
useFactory: config.functionsGetterFactory,
|
|
1559
1765
|
deps: [Functions]
|
|
1560
|
-
}
|
|
1766
|
+
}
|
|
1767
|
+
];
|
|
1561
1768
|
if (config.functionsConfigMap) {
|
|
1562
1769
|
forEachKeyValue(config.functionsConfigMap, {
|
|
1563
1770
|
forEach: ([key, entry]) => {
|
|
@@ -1606,10 +1813,7 @@ class DbxFirebaseCollectionLoaderInstance {
|
|
|
1606
1813
|
this._maxPagesSub = new SubscriptionObject();
|
|
1607
1814
|
this.collection$ = this._collection.pipe(distinctUntilChanged());
|
|
1608
1815
|
this.constraints$ = this._constraints.pipe(distinctUntilChanged());
|
|
1609
|
-
this.iteratorFilter$ = combineLatest([
|
|
1610
|
-
this._itemsPerPage.pipe(distinctUntilChanged()),
|
|
1611
|
-
this.constraints$
|
|
1612
|
-
]).pipe(map(([limit, constraints]) => ({ limit, constraints, maxPageLoadLimit: this.maxPages })), shareReplay(1));
|
|
1816
|
+
this.iteratorFilter$ = combineLatest([this._itemsPerPage.pipe(distinctUntilChanged()), this.constraints$]).pipe(map(([limit, constraints]) => ({ limit, constraints, maxPageLoadLimit: this.maxPages })), shareReplay(1));
|
|
1613
1817
|
this.firestoreIteration$ = this.collection$.pipe(switchMap((collection) => {
|
|
1614
1818
|
if (collection) {
|
|
1615
1819
|
return combineLatest([this.iteratorFilter$, this._restart.pipe(startWith(undefined))]).pipe(throttleTime(100, undefined, { trailing: true }), // prevent rapid changes and executing filters too quickly.
|
|
@@ -1621,16 +1825,18 @@ class DbxFirebaseCollectionLoaderInstance {
|
|
|
1621
1825
|
}
|
|
1622
1826
|
}), cleanupDestroyable(), // cleanup the iteration
|
|
1623
1827
|
shareReplay(1));
|
|
1624
|
-
this.queryChangeWatcher$ = this.firestoreIteration$.pipe(map(instance => iterationQueryDocChangeWatcher({ instance })), shareReplay(1));
|
|
1625
|
-
this.accumulator$ = this.firestoreIteration$.pipe(map(x => firebaseQueryItemAccumulator(x)), cleanupDestroyable(), shareReplay(1));
|
|
1626
|
-
this.pageLoadingState$ = this.accumulator$.pipe(switchMap(x => accumulatorFlattenPageListLoadingState(x)), shareReplay(1));
|
|
1828
|
+
this.queryChangeWatcher$ = this.firestoreIteration$.pipe(map((instance) => iterationQueryDocChangeWatcher({ instance })), shareReplay(1));
|
|
1829
|
+
this.accumulator$ = this.firestoreIteration$.pipe(map((x) => firebaseQueryItemAccumulator(x)), cleanupDestroyable(), shareReplay(1));
|
|
1830
|
+
this.pageLoadingState$ = this.accumulator$.pipe(switchMap((x) => accumulatorFlattenPageListLoadingState(x)), shareReplay(1));
|
|
1627
1831
|
}
|
|
1628
1832
|
init() {
|
|
1629
1833
|
// When max pages changes, update the iteration's max page limit.
|
|
1630
|
-
this._maxPagesSub.subscription = this._maxPages
|
|
1834
|
+
this._maxPagesSub.subscription = this._maxPages
|
|
1835
|
+
.pipe(distinctUntilChanged(), filterMaybe(), // do not pass null/undefined values
|
|
1631
1836
|
switchMap((maxPageLoadLimit) => this.firestoreIteration$.pipe(tap((iteration) => {
|
|
1632
1837
|
iteration.maxPageLoadLimit = maxPageLoadLimit;
|
|
1633
|
-
}))))
|
|
1838
|
+
}))))
|
|
1839
|
+
.subscribe();
|
|
1634
1840
|
}
|
|
1635
1841
|
destroy() {
|
|
1636
1842
|
this._maxPages.complete();
|
|
@@ -1730,10 +1936,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1730
1936
|
type: Input
|
|
1731
1937
|
}] } });
|
|
1732
1938
|
function provideDbxFirebaseCollectionStoreDirective(sourceType, storeType) {
|
|
1733
|
-
const providers = [
|
|
1939
|
+
const providers = [
|
|
1940
|
+
{
|
|
1734
1941
|
provide: DbxFirebaseCollectionStoreDirective,
|
|
1735
1942
|
useExisting: forwardRef(() => sourceType)
|
|
1736
|
-
}
|
|
1943
|
+
}
|
|
1944
|
+
];
|
|
1737
1945
|
if (storeType) {
|
|
1738
1946
|
providers.push(storeType);
|
|
1739
1947
|
}
|
|
@@ -1749,16 +1957,18 @@ class DbxFirebaseCollectionChangeDirective extends AbstractSubscriptionDirective
|
|
|
1749
1957
|
this.dbxFirebaseCollectionStoreDirective = dbxFirebaseCollectionStoreDirective;
|
|
1750
1958
|
this._mode = new BehaviorSubject('manual');
|
|
1751
1959
|
this.mode$ = this._mode.pipe(distinctUntilChanged());
|
|
1752
|
-
this.event$ = this.dbxFirebaseCollectionStoreDirective.store.queryChangeWatcher$.pipe(switchMap((x) => x.event$.pipe(filter(x => x.type !== 'none'), // do not share 'none' events.
|
|
1960
|
+
this.event$ = this.dbxFirebaseCollectionStoreDirective.store.queryChangeWatcher$.pipe(switchMap((x) => x.event$.pipe(filter((x) => x.type !== 'none'), // do not share 'none' events.
|
|
1753
1961
|
take(1), // only need one event to mark as change is available.
|
|
1754
1962
|
startWith({
|
|
1755
1963
|
time: new Date(),
|
|
1756
1964
|
type: 'none'
|
|
1757
1965
|
}))), shareReplay(1));
|
|
1758
|
-
this.hasChangeAvailable$ = this.event$.pipe(map(x => x.type !== 'none'), shareReplay(1));
|
|
1966
|
+
this.hasChangeAvailable$ = this.event$.pipe(map((x) => x.type !== 'none'), shareReplay(1));
|
|
1759
1967
|
}
|
|
1760
1968
|
ngOnInit() {
|
|
1761
|
-
this.sub = combineLatest([this.mode$, this.hasChangeAvailable$])
|
|
1969
|
+
this.sub = combineLatest([this.mode$, this.hasChangeAvailable$])
|
|
1970
|
+
.pipe(filter(([mode, hasChange]) => mode === 'auto' && hasChange))
|
|
1971
|
+
.subscribe(() => {
|
|
1762
1972
|
this.restart();
|
|
1763
1973
|
});
|
|
1764
1974
|
}
|
|
@@ -1896,10 +2106,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1896
2106
|
type: Input
|
|
1897
2107
|
}] } });
|
|
1898
2108
|
function provideDbxFirebaseDocumentStoreDirective(sourceType, storeType) {
|
|
1899
|
-
const providers = [
|
|
2109
|
+
const providers = [
|
|
2110
|
+
{
|
|
1900
2111
|
provide: DbxFirebaseDocumentStoreDirective,
|
|
1901
2112
|
useExisting: forwardRef(() => sourceType)
|
|
1902
|
-
}
|
|
2113
|
+
}
|
|
2114
|
+
];
|
|
1903
2115
|
if (storeType) {
|
|
1904
2116
|
providers.push(storeType);
|
|
1905
2117
|
}
|
|
@@ -1948,7 +2160,7 @@ class DbxFirebaseDocumentStoreRouteIdDirective extends AbstractSubscriptionDirec
|
|
|
1948
2160
|
this.idFromParams$ = combineLatest([this.idParamKey$, this.dbxRouterService.params$]).pipe(map(([key, params]) => {
|
|
1949
2161
|
var _a;
|
|
1950
2162
|
return (_a = params[key]) !== null && _a !== void 0 ? _a : undefined;
|
|
1951
|
-
}), distinctUntilChanged(), shareReplay
|
|
2163
|
+
}), distinctUntilChanged(), shareReplay(1));
|
|
1952
2164
|
}
|
|
1953
2165
|
ngOnInit() {
|
|
1954
2166
|
this.sub = this.dbxFirebaseDocumentStoreDirective.store.setId(this.idFromParams$);
|
|
@@ -1984,34 +2196,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1984
2196
|
class DbxFirebaseModelStoreModule {
|
|
1985
2197
|
}
|
|
1986
2198
|
DbxFirebaseModelStoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseModelStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1987
|
-
DbxFirebaseModelStoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseModelStoreModule, declarations: [DbxFirebaseCollectionListDirective,
|
|
1988
|
-
DbxFirebaseCollectionChangeDirective,
|
|
1989
|
-
DbxFirebaseCollectionHasChangeDirective,
|
|
1990
|
-
DbxFirebaseDocumentStoreRouteIdDirective,
|
|
1991
|
-
DbxFirebaseDocumentAuthIdDirective], exports: [DbxFirebaseCollectionListDirective,
|
|
1992
|
-
DbxFirebaseCollectionChangeDirective,
|
|
1993
|
-
DbxFirebaseCollectionHasChangeDirective,
|
|
1994
|
-
DbxFirebaseDocumentStoreRouteIdDirective,
|
|
1995
|
-
DbxFirebaseDocumentAuthIdDirective] });
|
|
2199
|
+
DbxFirebaseModelStoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseModelStoreModule, declarations: [DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective], exports: [DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective] });
|
|
1996
2200
|
DbxFirebaseModelStoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseModelStoreModule, imports: [[]] });
|
|
1997
2201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseModelStoreModule, decorators: [{
|
|
1998
2202
|
type: NgModule,
|
|
1999
2203
|
args: [{
|
|
2000
2204
|
imports: [],
|
|
2001
|
-
declarations: [
|
|
2002
|
-
|
|
2003
|
-
DbxFirebaseCollectionChangeDirective,
|
|
2004
|
-
DbxFirebaseCollectionHasChangeDirective,
|
|
2005
|
-
DbxFirebaseDocumentStoreRouteIdDirective,
|
|
2006
|
-
DbxFirebaseDocumentAuthIdDirective
|
|
2007
|
-
],
|
|
2008
|
-
exports: [
|
|
2009
|
-
DbxFirebaseCollectionListDirective,
|
|
2010
|
-
DbxFirebaseCollectionChangeDirective,
|
|
2011
|
-
DbxFirebaseCollectionHasChangeDirective,
|
|
2012
|
-
DbxFirebaseDocumentStoreRouteIdDirective,
|
|
2013
|
-
DbxFirebaseDocumentAuthIdDirective
|
|
2014
|
-
]
|
|
2205
|
+
declarations: [DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective],
|
|
2206
|
+
exports: [DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseDocumentAuthIdDirective]
|
|
2015
2207
|
}]
|
|
2016
2208
|
}] });
|
|
2017
2209
|
|
|
@@ -2023,10 +2215,10 @@ class AbstractDbxFirebaseCollectionStore extends LockSetComponentStore {
|
|
|
2023
2215
|
super(...arguments);
|
|
2024
2216
|
// MARK: Effects
|
|
2025
2217
|
this.setMaxPages = this.effect((input) => {
|
|
2026
|
-
return input.pipe(switchMap((maxPages) => this.loader$.pipe(tap((x) => x.maxPages = maxPages))));
|
|
2218
|
+
return input.pipe(switchMap((maxPages) => this.loader$.pipe(tap((x) => (x.maxPages = maxPages)))));
|
|
2027
2219
|
});
|
|
2028
2220
|
this.setItemsPerPage = this.effect((input) => {
|
|
2029
|
-
return input.pipe(switchMap((itemsPerPage) => this.loader$.pipe(tap((x) => x.itemsPerPage = itemsPerPage))));
|
|
2221
|
+
return input.pipe(switchMap((itemsPerPage) => this.loader$.pipe(tap((x) => (x.itemsPerPage = itemsPerPage)))));
|
|
2030
2222
|
});
|
|
2031
2223
|
this.setConstraints = this.effect((input) => {
|
|
2032
2224
|
return input.pipe(switchMap((constraints) => this.loader$.pipe(tap((x) => x.setConstraints(constraints)))));
|
|
@@ -2040,16 +2232,16 @@ class AbstractDbxFirebaseCollectionStore extends LockSetComponentStore {
|
|
|
2040
2232
|
// MARK: Accessors
|
|
2041
2233
|
this.currentFirestoreCollection$ = this.state$.pipe(map((x) => x.firestoreCollection), distinctUntilChanged(), shareReplay(1));
|
|
2042
2234
|
this.firestoreCollection$ = this.currentFirestoreCollection$.pipe(filterMaybe());
|
|
2043
|
-
this.loader$ = this.currentFirestoreCollection$.pipe(switchMap((collection) => this.state$.pipe(first(), map(x => dbxFirebaseCollectionLoaderInstance({
|
|
2235
|
+
this.loader$ = this.currentFirestoreCollection$.pipe(switchMap((collection) => this.state$.pipe(first(), map((x) => dbxFirebaseCollectionLoaderInstance({
|
|
2044
2236
|
collection,
|
|
2045
2237
|
maxPages: x.maxPages,
|
|
2046
2238
|
itemsPerPage: x.itemsPerPage,
|
|
2047
2239
|
constraints: x.constraints
|
|
2048
2240
|
})))), cleanupDestroyable(), distinctUntilChanged(), shareReplay(1));
|
|
2049
|
-
this.firestoreIteration$ = this.loader$.pipe(switchMap(x => x.firestoreIteration$));
|
|
2050
|
-
this.queryChangeWatcher$ = this.loader$.pipe(switchMap(x => x.queryChangeWatcher$));
|
|
2051
|
-
this.accumulator$ = this.loader$.pipe(switchMap(x => x.accumulator$));
|
|
2052
|
-
this.pageLoadingState$ = this.loader$.pipe(switchMap(x => x.pageLoadingState$));
|
|
2241
|
+
this.firestoreIteration$ = this.loader$.pipe(switchMap((x) => x.firestoreIteration$));
|
|
2242
|
+
this.queryChangeWatcher$ = this.loader$.pipe(switchMap((x) => x.queryChangeWatcher$));
|
|
2243
|
+
this.accumulator$ = this.loader$.pipe(switchMap((x) => x.accumulator$));
|
|
2244
|
+
this.pageLoadingState$ = this.loader$.pipe(switchMap((x) => x.pageLoadingState$));
|
|
2053
2245
|
this.setFirestoreCollection = this.updater((state, firestoreCollection) => (Object.assign(Object.assign({}, state), { firestoreCollection })));
|
|
2054
2246
|
}
|
|
2055
2247
|
}
|
|
@@ -2074,9 +2266,9 @@ class AbstractDbxFirebaseDocumentStore extends LockSetComponentStore {
|
|
|
2074
2266
|
// MARK: Accessors
|
|
2075
2267
|
this.currentFirestoreCollection$ = this.state$.pipe(map((x) => x.firestoreCollection), distinctUntilChanged(), shareReplay(1));
|
|
2076
2268
|
this.firestoreCollection$ = this.currentFirestoreCollection$.pipe(filterMaybe());
|
|
2077
|
-
this.currentInputId$ = this.state$.pipe(map(x => x.id), distinctUntilChanged(), shareReplay(1));
|
|
2269
|
+
this.currentInputId$ = this.state$.pipe(map((x) => x.id), distinctUntilChanged(), shareReplay(1));
|
|
2078
2270
|
this.inputId$ = this.currentInputId$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
|
|
2079
|
-
this.currentInputRef$ = this.state$.pipe(map(x => x.ref), distinctUntilChanged(), shareReplay(1));
|
|
2271
|
+
this.currentInputRef$ = this.state$.pipe(map((x) => x.ref), distinctUntilChanged(), shareReplay(1));
|
|
2080
2272
|
this.inputRef$ = this.currentInputRef$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
|
|
2081
2273
|
this.currentDocument$ = combineLatest([this.currentFirestoreCollection$, this.currentInputId$, this.currentInputRef$]).pipe(map(([collection, id, ref]) => {
|
|
2082
2274
|
let document;
|
|
@@ -2091,12 +2283,12 @@ class AbstractDbxFirebaseDocumentStore extends LockSetComponentStore {
|
|
|
2091
2283
|
return document;
|
|
2092
2284
|
}), distinctUntilChanged(), shareReplay(1));
|
|
2093
2285
|
this.document$ = this.currentDocument$.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
|
|
2094
|
-
this.documentLoadingState$ = this.currentDocument$.pipe(map(x => (x
|
|
2095
|
-
this.id$ = this.document$.pipe(map(x => x.id), shareReplay());
|
|
2096
|
-
this.ref$ = this.document$.pipe(map(x => x.documentRef), shareReplay());
|
|
2097
|
-
this.snapshot$ = this.document$.pipe(switchMap(x => x.accessor.stream()), shareReplay(1));
|
|
2098
|
-
this.snapshotLoadingState$ = this.currentDocument$.pipe(switchMap(
|
|
2099
|
-
this.currentData$ = this.document$.pipe(switchMap(x => x.accessor.stream().pipe(map(y => documentDataWithId(y)))), shareReplay(1));
|
|
2286
|
+
this.documentLoadingState$ = this.currentDocument$.pipe(map((x) => (x ? successResult(x) : beginLoading())), shareReplay(1));
|
|
2287
|
+
this.id$ = this.document$.pipe(map((x) => x.id), shareReplay());
|
|
2288
|
+
this.ref$ = this.document$.pipe(map((x) => x.documentRef), shareReplay());
|
|
2289
|
+
this.snapshot$ = this.document$.pipe(switchMap((x) => x.accessor.stream()), shareReplay(1));
|
|
2290
|
+
this.snapshotLoadingState$ = this.currentDocument$.pipe(switchMap(() => loadingStateFromObs(this.snapshot$)), shareReplay(1));
|
|
2291
|
+
this.currentData$ = this.document$.pipe(switchMap((x) => x.accessor.stream().pipe(map((y) => documentDataWithId(y)))), shareReplay(1));
|
|
2100
2292
|
this.data$ = this.currentDocument$.pipe(switchMap(() => this.currentData$.pipe(filterMaybe())), shareReplay(1));
|
|
2101
2293
|
this.dataLoadingState$ = this.snapshotLoadingState$.pipe(map((x) => {
|
|
2102
2294
|
let result;
|
|
@@ -2114,17 +2306,17 @@ class AbstractDbxFirebaseDocumentStore extends LockSetComponentStore {
|
|
|
2114
2306
|
}
|
|
2115
2307
|
return result;
|
|
2116
2308
|
}), shareReplay(1));
|
|
2117
|
-
this.exists$ = this.currentData$.pipe(map(x => isMaybeSo(x)), shareReplay(1));
|
|
2118
|
-
this.doesNotExist$ = this.exists$.pipe(map(x => !x), shareReplay(1));
|
|
2309
|
+
this.exists$ = this.currentData$.pipe(map((x) => isMaybeSo(x)), shareReplay(1));
|
|
2310
|
+
this.doesNotExist$ = this.exists$.pipe(map((x) => !x), shareReplay(1));
|
|
2119
2311
|
// MARK: State Changes
|
|
2120
2312
|
/**
|
|
2121
2313
|
* Sets the id of the document to load.
|
|
2122
2314
|
*/
|
|
2123
|
-
this.setId = this.updater((state, id) => (id
|
|
2315
|
+
this.setId = this.updater((state, id) => (id ? Object.assign(Object.assign({}, state), { id, ref: undefined }) : Object.assign(Object.assign({}, state), { id })));
|
|
2124
2316
|
/**
|
|
2125
2317
|
* Sets the ref of the document to load.
|
|
2126
2318
|
*/
|
|
2127
|
-
this.setRef = this.updater((state, ref) => (ref
|
|
2319
|
+
this.setRef = this.updater((state, ref) => (ref ? Object.assign(Object.assign({}, state), { id: undefined, ref }) : Object.assign(Object.assign({}, state), { ref })));
|
|
2128
2320
|
this.setFirestoreCollection = this.updater((state, firestoreCollection) => (Object.assign(Object.assign({}, state), { firestoreCollection })));
|
|
2129
2321
|
}
|
|
2130
2322
|
}
|
|
@@ -2184,9 +2376,9 @@ class AbstractDbxFirebaseCollectionWithParentStore extends AbstractDbxFirebaseCo
|
|
|
2184
2376
|
this.setParent = setParentEffect(this);
|
|
2185
2377
|
this.setParentStore = setParentStoreEffect(this);
|
|
2186
2378
|
// MARK: Accessors
|
|
2187
|
-
this.currentParent$ = this.state$.pipe(map(x => x.parent), distinctUntilChanged(), shareReplay(1));
|
|
2379
|
+
this.currentParent$ = this.state$.pipe(map((x) => x.parent), distinctUntilChanged(), shareReplay(1));
|
|
2188
2380
|
this.parent$ = this.currentParent$.pipe(filterMaybe());
|
|
2189
|
-
this.currentCollectionFactory$ = this.state$.pipe(map(x => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
|
|
2381
|
+
this.currentCollectionFactory$ = this.state$.pipe(map((x) => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
|
|
2190
2382
|
this.collectionFactory$ = this.currentCollectionFactory$.pipe(filterMaybe());
|
|
2191
2383
|
// MARK: State Changes
|
|
2192
2384
|
/**
|
|
@@ -2215,9 +2407,9 @@ class AbstractDbxFirebaseDocumentWithParentStore extends AbstractDbxFirebaseDocu
|
|
|
2215
2407
|
this.setParent = setParentEffect(this);
|
|
2216
2408
|
this.setParentStore = setParentStoreEffect(this);
|
|
2217
2409
|
// MARK: Accessors
|
|
2218
|
-
this.currentParent$ = this.state$.pipe(map(x => x.parent), distinctUntilChanged(), shareReplay(1));
|
|
2410
|
+
this.currentParent$ = this.state$.pipe(map((x) => x.parent), distinctUntilChanged(), shareReplay(1));
|
|
2219
2411
|
this.parent$ = this.currentParent$.pipe(filterMaybe());
|
|
2220
|
-
this.currentCollectionFactory$ = this.state$.pipe(map(x => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
|
|
2412
|
+
this.currentCollectionFactory$ = this.state$.pipe(map((x) => x.collectionFactory), distinctUntilChanged(), shareReplay(1));
|
|
2221
2413
|
this.collectionFactory$ = this.currentCollectionFactory$.pipe(filterMaybe());
|
|
2222
2414
|
// MARK: State Changes
|
|
2223
2415
|
/**
|
|
@@ -2244,9 +2436,7 @@ DbxFirebaseModelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
2244
2436
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseModelModule, decorators: [{
|
|
2245
2437
|
type: NgModule,
|
|
2246
2438
|
args: [{
|
|
2247
|
-
exports: [
|
|
2248
|
-
DbxFirebaseModelStoreModule
|
|
2249
|
-
]
|
|
2439
|
+
exports: [DbxFirebaseModelStoreModule]
|
|
2250
2440
|
}]
|
|
2251
2441
|
}] });
|
|
2252
2442
|
|
|
@@ -2258,9 +2448,7 @@ DbxFirebaseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
|
2258
2448
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFirebaseModule, decorators: [{
|
|
2259
2449
|
type: NgModule,
|
|
2260
2450
|
args: [{
|
|
2261
|
-
exports: [
|
|
2262
|
-
DbxFirebaseModelModule
|
|
2263
|
-
]
|
|
2451
|
+
exports: [DbxFirebaseModelModule]
|
|
2264
2452
|
}]
|
|
2265
2453
|
}] });
|
|
2266
2454
|
|
|
@@ -2268,5 +2456,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2268
2456
|
* Generated bundle index. Do not edit.
|
|
2269
2457
|
*/
|
|
2270
2458
|
|
|
2271
|
-
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_OPTIONS_TOKEN, DBX_FIREBASE_ROUTER_SYNC_DEFAULT_ID_PARAM_KEY, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, 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_LOGIN_METHOD_CATEGORY, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultFunctionsProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDocumentAuthIdDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginModuleRootConfig, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModule, DbxFirebaseParsedEmulatorsConfig, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirestoreContextService, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthService, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, defaultFirebaseAuthLoginProvidersFactory, firebaseAuthErrorToReadableError, modelDoesNotExistError, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseDocumentStoreDirective, readValueFromIdToken, setParentEffect, setParentStoreEffect };
|
|
2459
|
+
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_OPTIONS_TOKEN, DBX_FIREBASE_ROUTER_SYNC_DEFAULT_ID_PARAM_KEY, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, 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_LOGIN_METHOD_CATEGORY, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthLoginService, DbxFirebaseAuthModule, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseDefaultAppCheckProviderModule, DbxFirebaseDefaultAuthProviderModule, DbxFirebaseDefaultFirebaseProvidersModule, DbxFirebaseDefaultFirestoreProviderModule, DbxFirebaseDefaultFunctionsProviderModule, DbxFirebaseDefaultStorageProviderModule, DbxFirebaseDocumentAuthIdDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreRouteIdDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorModule, DbxFirebaseFirestoreCollectionModule, DbxFirebaseFunctionsModule, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginModule, DbxFirebaseLoginModuleRootConfig, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModule, DbxFirebaseParsedEmulatorsConfig, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirestoreContextService, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthService, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, defaultFirebaseAuthLoginProvidersFactory, enableAppCheckDebugTokenGeneration, firebaseAuthErrorToReadableError, modelDoesNotExistError, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseDocumentStoreDirective, readValueFromIdToken, setParentEffect, setParentStoreEffect };
|
|
2272
2460
|
//# sourceMappingURL=dereekb-dbx-firebase.mjs.map
|