@rxap/firebase 21.0.1 → 22.0.0-dev.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/CHANGELOG.md +6 -0
- package/compodoc/changelog.html +5 -0
- package/compodoc/dependencies.html +4 -4
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +167 -167
- package/docs/html/classes/AppCheckService.html +2 -2
- package/docs/html/classes/FirebaseAppCheckHttpInterceptor.html +3 -3
- package/docs/html/classes/RxapFirebaseMessagingService.html +2 -2
- package/docs/html/functions/AnalyticsEnabledFactory.html +1 -1
- package/docs/html/functions/AppCheckEnabledFactory.html +1 -1
- package/docs/html/functions/AppCheckSiteKeyFactory.html +1 -1
- package/docs/html/functions/AppIsTokenAutoRefreshEnabledFactory.html +1 -1
- package/docs/html/functions/AuthLanguageCodeFactory.html +1 -1
- package/docs/html/functions/AuthPersistenceFactory.html +1 -1
- package/docs/html/functions/AuthSettingsFactory.html +1 -1
- package/docs/html/functions/AuthTenantIdFactory.html +1 -1
- package/docs/html/functions/AuthUseDeviceLanguageFactory.html +1 -1
- package/docs/html/functions/DataCollectionEnabledFactory.html +1 -1
- package/docs/html/functions/EnablePersistenceTokenFactory.html +1 -1
- package/docs/html/functions/FirebaseNameOrConfigTokenFactory.html +1 -1
- package/docs/html/functions/FirebaseOptionsTokenFactory.html +1 -1
- package/docs/html/functions/FirestoreSettingsTokenFactory.html +1 -1
- package/docs/html/functions/FunctionsNewOriginBehaviorFactory.html +1 -1
- package/docs/html/functions/FunctionsOriginFactory.html +1 -1
- package/docs/html/functions/FunctionsRegionFactory.html +1 -1
- package/docs/html/functions/GetAnalyticsAppName.html +1 -1
- package/docs/html/functions/InstrumentationEnabledFactory.html +1 -1
- package/docs/html/functions/PersistenceSettingsTokenFactory.html +1 -1
- package/docs/html/functions/ServiceWorkerFactory.html +1 -1
- package/docs/html/functions/StorageBucketFactory.html +1 -1
- package/docs/html/functions/StorageMaxOperationRetryTimeFactory.html +1 -1
- package/docs/html/functions/StorageMaxUploadRetryTimeFactory.html +1 -1
- package/docs/html/functions/UseAuthEmulatorFactory.html +1 -1
- package/docs/html/functions/UseFirestoreEmulatorFactory.html +1 -1
- package/docs/html/functions/UseFunctionsEmulatorFactory.html +1 -1
- package/docs/html/functions/VapidKeyFactory.html +1 -1
- package/docs/html/functions/provideAngularFireAppCheck.html +2 -2
- package/docs/html/functions/provideAngularFireStorageEmulator.html +2 -2
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/FirebaseConfig.html +2 -2
- package/docs/html/interfaces/Message.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/variables/APP_CHECK_ENABLED.html +1 -1
- package/docs/html/variables/APP_CHECK_IS_TOKEN_AUTO_REFRESH_ENABLED.html +1 -1
- package/docs/html/variables/APP_CHECK_SITE_KEY.html +1 -1
- package/docs/html/variables/FIREBASE_ANALYTICS_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_APP_CHECK_HTTP_INTERCEPTOR.html +1 -1
- package/docs/html/variables/FIREBASE_APP_CHECK_HTTP_INTERCEPTOR_URL_PATTERN.html +1 -1
- package/docs/html/variables/FIREBASE_APP_CHECK_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_APP_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_AUTH_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_FIRESTORE_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_FUNCTIONS_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_MESSAGING_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_PERFORMANCE_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_PROVIDERS.html +1 -1
- package/docs/html/variables/FIREBASE_STORAGE_PROVIDERS.html +1 -1
- package/docs/html/variables/RXAP_REQUEST_CLOUD_MESSAGING_TOKEN.html +1 -1
- package/docs/html/variables/USE_STORAGE_EMULATOR.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AppCheckService.md +6 -6
- package/docs/markdown/classes/FirebaseAppCheckHttpInterceptor.md +5 -5
- package/docs/markdown/classes/RxapFirebaseMessagingService.md +8 -8
- package/docs/markdown/functions/AnalyticsEnabledFactory.md +2 -2
- package/docs/markdown/functions/AppCheckEnabledFactory.md +2 -2
- package/docs/markdown/functions/AppCheckSiteKeyFactory.md +2 -2
- package/docs/markdown/functions/AppIsTokenAutoRefreshEnabledFactory.md +2 -2
- package/docs/markdown/functions/AuthLanguageCodeFactory.md +2 -2
- package/docs/markdown/functions/AuthPersistenceFactory.md +2 -2
- package/docs/markdown/functions/AuthSettingsFactory.md +2 -2
- package/docs/markdown/functions/AuthTenantIdFactory.md +2 -2
- package/docs/markdown/functions/AuthUseDeviceLanguageFactory.md +2 -2
- package/docs/markdown/functions/DataCollectionEnabledFactory.md +2 -2
- package/docs/markdown/functions/EnablePersistenceTokenFactory.md +2 -2
- package/docs/markdown/functions/FirebaseNameOrConfigTokenFactory.md +2 -2
- package/docs/markdown/functions/FirebaseOptionsTokenFactory.md +2 -2
- package/docs/markdown/functions/FirestoreSettingsTokenFactory.md +2 -2
- package/docs/markdown/functions/FunctionsNewOriginBehaviorFactory.md +2 -2
- package/docs/markdown/functions/FunctionsOriginFactory.md +2 -2
- package/docs/markdown/functions/FunctionsRegionFactory.md +2 -2
- package/docs/markdown/functions/GetAnalyticsAppName.md +2 -2
- package/docs/markdown/functions/InstrumentationEnabledFactory.md +2 -2
- package/docs/markdown/functions/PersistenceSettingsTokenFactory.md +2 -2
- package/docs/markdown/functions/ServiceWorkerFactory.md +2 -2
- package/docs/markdown/functions/StorageBucketFactory.md +2 -2
- package/docs/markdown/functions/StorageMaxOperationRetryTimeFactory.md +2 -2
- package/docs/markdown/functions/StorageMaxUploadRetryTimeFactory.md +2 -2
- package/docs/markdown/functions/UseAuthEmulatorFactory.md +2 -2
- package/docs/markdown/functions/UseFirestoreEmulatorFactory.md +2 -2
- package/docs/markdown/functions/UseFunctionsEmulatorFactory.md +2 -2
- package/docs/markdown/functions/VapidKeyFactory.md +2 -2
- package/docs/markdown/functions/provideAngularFireAppCheck.md +2 -2
- package/docs/markdown/functions/provideAngularFireStorageEmulator.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/FirebaseConfig.md +3 -3
- package/docs/markdown/interfaces/Message.md +5 -5
- package/docs/markdown/variables/APP_CHECK_ENABLED.md +2 -2
- package/docs/markdown/variables/APP_CHECK_IS_TOKEN_AUTO_REFRESH_ENABLED.md +2 -2
- package/docs/markdown/variables/APP_CHECK_SITE_KEY.md +2 -2
- package/docs/markdown/variables/FIREBASE_ANALYTICS_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_APP_CHECK_HTTP_INTERCEPTOR.md +2 -2
- package/docs/markdown/variables/FIREBASE_APP_CHECK_HTTP_INTERCEPTOR_URL_PATTERN.md +2 -2
- package/docs/markdown/variables/FIREBASE_APP_CHECK_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_APP_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_AUTH_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_FIRESTORE_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_FUNCTIONS_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_MESSAGING_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_PERFORMANCE_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_PROVIDERS.md +2 -2
- package/docs/markdown/variables/FIREBASE_STORAGE_PROVIDERS.md +2 -2
- package/docs/markdown/variables/RXAP_REQUEST_CLOUD_MESSAGING_TOKEN.md +2 -2
- package/docs/markdown/variables/USE_STORAGE_EMULATOR.md +2 -2
- package/docs/wiki/Class.AppCheckService.md +5 -5
- package/docs/wiki/Class.FirebaseAppCheckHttpInterceptor.md +4 -4
- package/docs/wiki/Class.RxapFirebaseMessagingService.md +7 -7
- package/docs/wiki/Function.AnalyticsEnabledFactory.md +1 -1
- package/docs/wiki/Function.AppCheckEnabledFactory.md +1 -1
- package/docs/wiki/Function.AppCheckSiteKeyFactory.md +1 -1
- package/docs/wiki/Function.AppIsTokenAutoRefreshEnabledFactory.md +1 -1
- package/docs/wiki/Function.AuthLanguageCodeFactory.md +1 -1
- package/docs/wiki/Function.AuthPersistenceFactory.md +1 -1
- package/docs/wiki/Function.AuthSettingsFactory.md +1 -1
- package/docs/wiki/Function.AuthTenantIdFactory.md +1 -1
- package/docs/wiki/Function.AuthUseDeviceLanguageFactory.md +1 -1
- package/docs/wiki/Function.DataCollectionEnabledFactory.md +1 -1
- package/docs/wiki/Function.EnablePersistenceTokenFactory.md +1 -1
- package/docs/wiki/Function.FirebaseNameOrConfigTokenFactory.md +1 -1
- package/docs/wiki/Function.FirebaseOptionsTokenFactory.md +1 -1
- package/docs/wiki/Function.FirestoreSettingsTokenFactory.md +1 -1
- package/docs/wiki/Function.FunctionsNewOriginBehaviorFactory.md +1 -1
- package/docs/wiki/Function.FunctionsOriginFactory.md +1 -1
- package/docs/wiki/Function.FunctionsRegionFactory.md +1 -1
- package/docs/wiki/Function.GetAnalyticsAppName.md +1 -1
- package/docs/wiki/Function.InstrumentationEnabledFactory.md +1 -1
- package/docs/wiki/Function.PersistenceSettingsTokenFactory.md +1 -1
- package/docs/wiki/Function.ServiceWorkerFactory.md +1 -1
- package/docs/wiki/Function.StorageBucketFactory.md +1 -1
- package/docs/wiki/Function.StorageMaxOperationRetryTimeFactory.md +1 -1
- package/docs/wiki/Function.StorageMaxUploadRetryTimeFactory.md +1 -1
- package/docs/wiki/Function.UseAuthEmulatorFactory.md +1 -1
- package/docs/wiki/Function.UseFirestoreEmulatorFactory.md +1 -1
- package/docs/wiki/Function.UseFunctionsEmulatorFactory.md +1 -1
- package/docs/wiki/Function.VapidKeyFactory.md +1 -1
- package/docs/wiki/Function.provideAngularFireAppCheck.md +1 -1
- package/docs/wiki/Function.provideAngularFireStorageEmulator.md +1 -1
- package/docs/wiki/Interface.FirebaseConfig.md +2 -2
- package/docs/wiki/Interface.Message.md +4 -4
- package/docs/wiki/Variable.APP_CHECK_ENABLED.md +1 -1
- package/docs/wiki/Variable.APP_CHECK_IS_TOKEN_AUTO_REFRESH_ENABLED.md +1 -1
- package/docs/wiki/Variable.APP_CHECK_SITE_KEY.md +1 -1
- package/docs/wiki/Variable.FIREBASE_ANALYTICS_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_APP_CHECK_HTTP_INTERCEPTOR.md +1 -1
- package/docs/wiki/Variable.FIREBASE_APP_CHECK_HTTP_INTERCEPTOR_URL_PATTERN.md +1 -1
- package/docs/wiki/Variable.FIREBASE_APP_CHECK_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_APP_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_AUTH_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_FIRESTORE_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_FUNCTIONS_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_MESSAGING_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_PERFORMANCE_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.FIREBASE_STORAGE_PROVIDERS.md +1 -1
- package/docs/wiki/Variable.RXAP_REQUEST_CLOUD_MESSAGING_TOKEN.md +1 -1
- package/docs/wiki/Variable.USE_STORAGE_EMULATOR.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-firebase-auth.mjs +99 -98
- package/fesm2022/rxap-firebase-auth.mjs.map +1 -1
- package/fesm2022/rxap-firebase.mjs +365 -374
- package/fesm2022/rxap-firebase.mjs.map +1 -1
- package/package.json +11 -11
- package/types/rxap-firebase-auth.d.ts +28 -29
- package/types/rxap-firebase.d.ts +174 -181
|
@@ -1,450 +1,441 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { ConfigService } from
|
|
4
|
-
import { EMPTY, Observable,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { HTTP_INTERCEPTORS } from
|
|
9
|
-
import { coerceArray } from
|
|
10
|
-
import { AngularFireMessaging,
|
|
11
|
-
import { FirebaseApp } from
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS, SETTINGS, USE_EMULATOR } from
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*/
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable, InjectionToken, NgZone, Optional, inject, isDevMode, makeEnvironmentProviders, provideAppInitializer } from "@angular/core";
|
|
3
|
+
import { ConfigService } from "@rxap/config";
|
|
4
|
+
import { EMPTY, Observable, ReplaySubject, from } from "rxjs";
|
|
5
|
+
import { map, mergeMapTo, shareReplay, switchMap, tap } from "rxjs/operators";
|
|
6
|
+
import { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵfirebaseAppFactory } from "@angular/fire/compat";
|
|
7
|
+
import { AppCheck, getToken, onTokenChanged, setTokenAutoRefreshEnabled } from "@angular/fire/app-check";
|
|
8
|
+
import { HTTP_INTERCEPTORS } from "@angular/common/http";
|
|
9
|
+
import { coerceArray } from "@rxap/utilities";
|
|
10
|
+
import { AngularFireMessaging, SERVICE_WORKER, VAPID_KEY } from "@angular/fire/compat/messaging";
|
|
11
|
+
import { FirebaseApp } from "@angular/fire/app";
|
|
12
|
+
import { LANGUAGE_CODE, PERSISTENCE, SETTINGS, TENANT_ID, USE_DEVICE_LANGUAGE, USE_EMULATOR } from "@angular/fire/compat/auth";
|
|
13
|
+
import { DATA_COLLECTION_ENABLED, INSTRUMENTATION_ENABLED } from "@angular/fire/compat/performance";
|
|
14
|
+
import { AngularFireStorage, BUCKET, MAX_OPERATION_RETRY_TIME, MAX_UPLOAD_RETRY_TIME } from "@angular/fire/compat/storage";
|
|
15
|
+
import { APP_NAME, COLLECTION_ENABLED } from "@angular/fire/compat/analytics";
|
|
16
|
+
import { ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS, SETTINGS as SETTINGS$1, USE_EMULATOR as USE_EMULATOR$1 } from "@angular/fire/compat/firestore";
|
|
17
|
+
import { ORIGIN, REGION, USE_EMULATOR as USE_EMULATOR$2 } from "@angular/fire/compat/functions";
|
|
18
|
+
const RXAP_REQUEST_CLOUD_MESSAGING_TOKEN = new InjectionToken("rxap/firebase/request-cloud-messaging-token");
|
|
19
|
+
const APP_CHECK_ENABLED = new InjectionToken("rxap/firebase/app-check-enabled");
|
|
20
|
+
const APP_CHECK_SITE_KEY = new InjectionToken("rxap/firebase/app-check-site-key");
|
|
21
|
+
const APP_CHECK_IS_TOKEN_AUTO_REFRESH_ENABLED = new InjectionToken("rxap/firebase/app-check-is-token-auto-refresh-enabled");
|
|
22
|
+
const FIREBASE_APP_CHECK_HTTP_INTERCEPTOR_URL_PATTERN = new InjectionToken("firebase-app-check-http-interceptor-url-pattern");
|
|
23
|
+
var AppCheckService = class AppCheckService {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.config = inject(ConfigService);
|
|
26
|
+
this.enabled = inject(APP_CHECK_ENABLED, { optional: true });
|
|
27
|
+
this.onTokenChanged$ = EMPTY;
|
|
28
|
+
this._appCheck = null;
|
|
29
|
+
const options = inject(FIREBASE_OPTIONS);
|
|
30
|
+
const nameOrConfig = inject(FIREBASE_APP_NAME, { optional: true });
|
|
31
|
+
const zone = inject(NgZone);
|
|
32
|
+
const siteKey = inject(APP_CHECK_SITE_KEY, { optional: true });
|
|
33
|
+
const isTokenAutoRefreshEnabled = inject(APP_CHECK_IS_TOKEN_AUTO_REFRESH_ENABLED, { optional: true });
|
|
34
|
+
if (this.enabled) {
|
|
35
|
+
if (siteKey) {
|
|
36
|
+
const app = ɵfirebaseAppFactory(options, zone, nameOrConfig);
|
|
37
|
+
const appCheck = this._appCheck = app.appCheck();
|
|
38
|
+
appCheck.activate(siteKey, isTokenAutoRefreshEnabled ?? void 0);
|
|
39
|
+
this.onTokenChanged$ = new Observable((subscriber) => {
|
|
40
|
+
onTokenChanged(appCheck, (tokenResult) => subscriber.next(tokenResult), (error) => subscriber.error(error), () => subscriber.complete());
|
|
41
|
+
}).pipe(shareReplay(1));
|
|
42
|
+
} else if (isDevMode()) console.error("The app check site key is not provided");
|
|
43
|
+
} else if (isDevMode()) console.warn("App check is disabled");
|
|
44
|
+
}
|
|
45
|
+
getToken(forceRefresh) {
|
|
46
|
+
if (this._appCheck) return getToken(this._appCheck, forceRefresh).then((result) => result.token) ?? Promise.reject(/* @__PURE__ */ new Error("firebase app check is not initialized"));
|
|
47
|
+
return Promise.reject(/* @__PURE__ */ new Error("firebase app check is not initialized"));
|
|
48
|
+
}
|
|
49
|
+
setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled) {
|
|
50
|
+
if (this._appCheck) setTokenAutoRefreshEnabled(this._appCheck, isTokenAutoRefreshEnabled);
|
|
51
|
+
}
|
|
52
|
+
static {
|
|
53
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.3.0",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: AppCheckService,
|
|
58
|
+
deps: [],
|
|
59
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
static {
|
|
63
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
64
|
+
minVersion: "12.0.0",
|
|
65
|
+
version: "22.3.0",
|
|
66
|
+
ngImport: i0,
|
|
67
|
+
type: AppCheckService
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
72
|
+
minVersion: "12.0.0",
|
|
73
|
+
version: "22.3.0",
|
|
74
|
+
ngImport: i0,
|
|
75
|
+
type: AppCheckService,
|
|
76
|
+
decorators: [{ type: Injectable }],
|
|
77
|
+
ctorParameters: () => []
|
|
78
|
+
});
|
|
80
79
|
function provideAngularFireAppCheck() {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
80
|
+
return makeEnvironmentProviders([AppCheckService, provideAppInitializer(() => {
|
|
81
|
+
inject(AppCheckService);
|
|
82
|
+
})]);
|
|
83
|
+
}
|
|
84
|
+
var FirebaseAppCheckHttpInterceptor = class FirebaseAppCheckHttpInterceptor {
|
|
85
|
+
constructor() {
|
|
86
|
+
this.appCheck = inject(AppCheck);
|
|
87
|
+
this.enabled = inject(APP_CHECK_ENABLED, { optional: true });
|
|
88
|
+
this.urlPattern = [];
|
|
89
|
+
const urlPattern = inject(FIREBASE_APP_CHECK_HTTP_INTERCEPTOR_URL_PATTERN);
|
|
90
|
+
this.urlPattern = coerceArray(urlPattern);
|
|
91
|
+
}
|
|
92
|
+
intercept(req, next) {
|
|
93
|
+
if (this.enabled && this.isMatch(req)) return from(getToken(this.appCheck)).pipe(map((response) => response.token), switchMap((token) => next.handle(req.clone({ setHeaders: { "X-Firebase-AppCheck": token } }))));
|
|
94
|
+
return next.handle(req);
|
|
95
|
+
}
|
|
96
|
+
isMatch(req) {
|
|
97
|
+
return this.urlPattern.some((pattern) => req.url.match(pattern));
|
|
98
|
+
}
|
|
99
|
+
static {
|
|
100
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
101
|
+
minVersion: "12.0.0",
|
|
102
|
+
version: "22.3.0",
|
|
103
|
+
ngImport: i0,
|
|
104
|
+
type: FirebaseAppCheckHttpInterceptor,
|
|
105
|
+
deps: [],
|
|
106
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
static {
|
|
110
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
111
|
+
minVersion: "12.0.0",
|
|
112
|
+
version: "22.3.0",
|
|
113
|
+
ngImport: i0,
|
|
114
|
+
type: FirebaseAppCheckHttpInterceptor
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
119
|
+
minVersion: "12.0.0",
|
|
120
|
+
version: "22.3.0",
|
|
121
|
+
ngImport: i0,
|
|
122
|
+
type: FirebaseAppCheckHttpInterceptor,
|
|
123
|
+
decorators: [{ type: Injectable }],
|
|
124
|
+
ctorParameters: () => []
|
|
125
|
+
});
|
|
116
126
|
const FIREBASE_APP_CHECK_HTTP_INTERCEPTOR = {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
provide: HTTP_INTERCEPTORS,
|
|
128
|
+
useClass: FirebaseAppCheckHttpInterceptor,
|
|
129
|
+
multi: true
|
|
120
130
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
131
|
+
var RxapFirebaseMessagingService = class RxapFirebaseMessagingService {
|
|
132
|
+
constructor() {
|
|
133
|
+
this.messaging = inject(AngularFireMessaging);
|
|
134
|
+
this.requestPermissionImminently = inject(RXAP_REQUEST_CLOUD_MESSAGING_TOKEN, { optional: true }) ?? false;
|
|
135
|
+
this.token$ = new ReplaySubject(1);
|
|
136
|
+
this.messaging.messages.pipe(tap((message) => this.showNotification(message.notification.title, message.notification.body))).subscribe();
|
|
137
|
+
if (this.requestPermissionImminently) this.requestPermission();
|
|
138
|
+
}
|
|
139
|
+
requestPermission() {
|
|
140
|
+
console.log("request notification permission");
|
|
141
|
+
this.messaging.requestPermission.pipe(mergeMapTo(this.messaging.tokenChanges)).subscribe((token) => {
|
|
142
|
+
console.info("cloud messaging permission is granted");
|
|
143
|
+
this.token$.next(token);
|
|
144
|
+
}, () => console.error("cloud messaging permission is denied"));
|
|
145
|
+
}
|
|
146
|
+
showNotification(title, body) {
|
|
147
|
+
if (!("Notification" in window)) alert("This browser does not support desktop notification");
|
|
148
|
+
else if (Notification.permission === "granted") new Notification(title, { body });
|
|
149
|
+
else console.warn("Notification permission is not granted");
|
|
150
|
+
}
|
|
151
|
+
static {
|
|
152
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
153
|
+
minVersion: "12.0.0",
|
|
154
|
+
version: "22.3.0",
|
|
155
|
+
ngImport: i0,
|
|
156
|
+
type: RxapFirebaseMessagingService,
|
|
157
|
+
deps: [],
|
|
158
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
static {
|
|
162
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
163
|
+
minVersion: "12.0.0",
|
|
164
|
+
version: "22.3.0",
|
|
165
|
+
ngImport: i0,
|
|
166
|
+
type: RxapFirebaseMessagingService,
|
|
167
|
+
providedIn: "root"
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
172
|
+
minVersion: "12.0.0",
|
|
173
|
+
version: "22.3.0",
|
|
174
|
+
ngImport: i0,
|
|
175
|
+
type: RxapFirebaseMessagingService,
|
|
176
|
+
decorators: [{
|
|
177
|
+
type: Injectable,
|
|
178
|
+
args: [{ providedIn: "root" }]
|
|
179
|
+
}],
|
|
180
|
+
ctorParameters: () => []
|
|
181
|
+
});
|
|
165
182
|
function FirebaseOptionsTokenFactory(configService) {
|
|
166
|
-
|
|
183
|
+
return configService.get("firebase.options");
|
|
167
184
|
}
|
|
168
185
|
function FirebaseNameOrConfigTokenFactory(configService) {
|
|
169
|
-
|
|
186
|
+
return configService.get("firebase.name", null);
|
|
170
187
|
}
|
|
171
188
|
function EnablePersistenceTokenFactory(configService) {
|
|
172
|
-
|
|
189
|
+
return configService.get("firebase.firestore.enablePersistence", false);
|
|
173
190
|
}
|
|
174
191
|
function PersistenceSettingsTokenFactory(configService) {
|
|
175
|
-
|
|
192
|
+
return configService.get("firebase.firestore.persistenceSettings", null);
|
|
176
193
|
}
|
|
177
194
|
function FirestoreSettingsTokenFactory(configService) {
|
|
178
|
-
|
|
195
|
+
return configService.get("firebase.firestore.settings", null);
|
|
179
196
|
}
|
|
180
197
|
function FunctionsRegionFactory(configService) {
|
|
181
|
-
|
|
198
|
+
return configService.get("firebase.functions.region", configService.get("firebase.region", null));
|
|
182
199
|
}
|
|
183
200
|
function FunctionsOriginFactory(configService) {
|
|
184
|
-
|
|
201
|
+
return configService.get("firebase.functions.origin", configService.get("firebase.origin", null));
|
|
185
202
|
}
|
|
186
203
|
function FunctionsNewOriginBehaviorFactory(configService) {
|
|
187
|
-
|
|
204
|
+
return configService.get("firebase.functions.newOriginBehavior");
|
|
188
205
|
}
|
|
189
206
|
function InstrumentationEnabledFactory(configService) {
|
|
190
|
-
|
|
207
|
+
return configService.get("firebase.performance.instrumentationEnabled");
|
|
191
208
|
}
|
|
192
209
|
function DataCollectionEnabledFactory(configService) {
|
|
193
|
-
|
|
210
|
+
return configService.get("firebase.performance.dataCollectionEnabled");
|
|
194
211
|
}
|
|
195
212
|
function VapidKeyFactory(configService) {
|
|
196
|
-
|
|
213
|
+
return configService.get("firebase.messaging.vapid", configService.get("firebase.vapid"));
|
|
197
214
|
}
|
|
198
215
|
function AnalyticsEnabledFactory(configService) {
|
|
199
|
-
|
|
216
|
+
return configService.get("firebase.analytics.enabled", null);
|
|
200
217
|
}
|
|
201
218
|
function GetAnalyticsAppName(config) {
|
|
202
|
-
|
|
219
|
+
return config.get("appName");
|
|
203
220
|
}
|
|
204
221
|
function UseFirestoreEmulatorFactory(configService) {
|
|
205
|
-
|
|
222
|
+
return configService.get("firebase.emulator.firestore", null);
|
|
206
223
|
}
|
|
207
224
|
function UseFunctionsEmulatorFactory(configService) {
|
|
208
|
-
|
|
225
|
+
return configService.get("firebase.emulator.functions", null);
|
|
209
226
|
}
|
|
210
227
|
function UseAuthEmulatorFactory(configService) {
|
|
211
|
-
|
|
228
|
+
return configService.get("firebase.emulator.auth", null);
|
|
212
229
|
}
|
|
213
230
|
function AuthTenantIdFactory(configService) {
|
|
214
|
-
|
|
231
|
+
return configService.get("firebase.auth.tenantId", null);
|
|
215
232
|
}
|
|
216
233
|
function AuthLanguageCodeFactory(configService) {
|
|
217
|
-
|
|
234
|
+
return configService.get("firebase.auth.languageCode", null);
|
|
218
235
|
}
|
|
219
236
|
function AuthUseDeviceLanguageFactory(configService) {
|
|
220
|
-
|
|
237
|
+
return configService.get("firebase.auth.useDeviceLanguage", null);
|
|
221
238
|
}
|
|
222
239
|
function AuthPersistenceFactory(configService) {
|
|
223
|
-
|
|
240
|
+
return configService.get("firebase.auth.persistence", null);
|
|
224
241
|
}
|
|
225
242
|
function AuthSettingsFactory(configService) {
|
|
226
|
-
|
|
243
|
+
return configService.get("firebase.auth.settings", null);
|
|
227
244
|
}
|
|
228
245
|
function AppCheckEnabledFactory(configService) {
|
|
229
|
-
|
|
246
|
+
return configService.get("firebase.appCheck.enabled", null);
|
|
230
247
|
}
|
|
231
248
|
function AppCheckSiteKeyFactory(configService) {
|
|
232
|
-
|
|
249
|
+
return configService.get("firebase.appCheck.siteKey", null);
|
|
233
250
|
}
|
|
234
251
|
function AppIsTokenAutoRefreshEnabledFactory(configService) {
|
|
235
|
-
|
|
252
|
+
return configService.get("firebase.appCheck.isTokenAutoRefreshEnabled", null);
|
|
236
253
|
}
|
|
237
254
|
function StorageBucketFactory(configService) {
|
|
238
|
-
|
|
255
|
+
return configService.get("firebase.storage.bucket", configService.get("firebase.storageBucket", null));
|
|
239
256
|
}
|
|
240
257
|
function StorageMaxUploadRetryTimeFactory(configService) {
|
|
241
|
-
|
|
258
|
+
return configService.get("firebase.storage.maxUploadRetryTime", null);
|
|
242
259
|
}
|
|
243
260
|
function StorageMaxOperationRetryTimeFactory(configService) {
|
|
244
|
-
|
|
261
|
+
return configService.get("firebase.storage.maxOperationRetryTime", null);
|
|
245
262
|
}
|
|
246
263
|
function ServiceWorkerFactory() {
|
|
247
|
-
|
|
264
|
+
return (typeof navigator !== "undefined" && navigator.serviceWorker?.getRegistration()) ?? void 0;
|
|
248
265
|
}
|
|
249
266
|
const FIREBASE_APP_PROVIDERS = [
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
},
|
|
267
|
+
{
|
|
268
|
+
provide: FIREBASE_OPTIONS,
|
|
269
|
+
useFactory: FirebaseOptionsTokenFactory,
|
|
270
|
+
deps: [ConfigService]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
provide: FIREBASE_APP_NAME,
|
|
274
|
+
useFactory: FirebaseNameOrConfigTokenFactory,
|
|
275
|
+
deps: [ConfigService]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
provide: FirebaseApp,
|
|
279
|
+
useFactory: ɵfirebaseAppFactory,
|
|
280
|
+
deps: [
|
|
281
|
+
FIREBASE_OPTIONS,
|
|
282
|
+
NgZone,
|
|
283
|
+
[new Optional(), FIREBASE_APP_NAME]
|
|
284
|
+
]
|
|
285
|
+
}
|
|
270
286
|
];
|
|
271
287
|
const FIREBASE_FIRESTORE_PROVIDERS = [
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
{
|
|
289
|
+
provide: ENABLE_PERSISTENCE,
|
|
290
|
+
useFactory: EnablePersistenceTokenFactory,
|
|
291
|
+
deps: [ConfigService]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
provide: PERSISTENCE_SETTINGS,
|
|
295
|
+
useFactory: PersistenceSettingsTokenFactory,
|
|
296
|
+
deps: [ConfigService]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
provide: SETTINGS$1,
|
|
300
|
+
useFactory: FirestoreSettingsTokenFactory,
|
|
301
|
+
deps: [ConfigService]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
provide: USE_EMULATOR$1,
|
|
305
|
+
useFactory: UseFirestoreEmulatorFactory,
|
|
306
|
+
deps: [ConfigService]
|
|
307
|
+
}
|
|
292
308
|
];
|
|
293
309
|
const FIREBASE_FUNCTIONS_PROVIDERS = [
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
];
|
|
310
|
-
const FIREBASE_MESSAGING_PROVIDERS = [
|
|
311
|
-
{
|
|
312
|
-
provide: VAPID_KEY,
|
|
313
|
-
useFactory: VapidKeyFactory,
|
|
314
|
-
deps: [ConfigService],
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
provide: SERVICE_WORKER,
|
|
318
|
-
useFactory: ServiceWorkerFactory,
|
|
319
|
-
deps: [],
|
|
320
|
-
},
|
|
321
|
-
];
|
|
322
|
-
const FIREBASE_PERFORMANCE_PROVIDERS = [
|
|
323
|
-
{
|
|
324
|
-
provide: INSTRUMENTATION_ENABLED,
|
|
325
|
-
useFactory: InstrumentationEnabledFactory,
|
|
326
|
-
deps: [ConfigService],
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
provide: DATA_COLLECTION_ENABLED,
|
|
330
|
-
useFactory: DataCollectionEnabledFactory,
|
|
331
|
-
deps: [ConfigService],
|
|
332
|
-
},
|
|
333
|
-
];
|
|
334
|
-
const FIREBASE_ANALYTICS_PROVIDERS = [
|
|
335
|
-
{
|
|
336
|
-
provide: COLLECTION_ENABLED,
|
|
337
|
-
useFactory: AnalyticsEnabledFactory,
|
|
338
|
-
deps: [ConfigService],
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
provide: APP_NAME,
|
|
342
|
-
useFactory: GetAnalyticsAppName,
|
|
343
|
-
deps: [ConfigService],
|
|
344
|
-
},
|
|
310
|
+
{
|
|
311
|
+
provide: REGION,
|
|
312
|
+
useFactory: FunctionsRegionFactory,
|
|
313
|
+
deps: [ConfigService]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
provide: ORIGIN,
|
|
317
|
+
useFactory: FunctionsOriginFactory,
|
|
318
|
+
deps: [ConfigService]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
provide: USE_EMULATOR$2,
|
|
322
|
+
useFactory: UseFunctionsEmulatorFactory,
|
|
323
|
+
deps: [ConfigService]
|
|
324
|
+
}
|
|
345
325
|
];
|
|
326
|
+
const FIREBASE_MESSAGING_PROVIDERS = [{
|
|
327
|
+
provide: VAPID_KEY,
|
|
328
|
+
useFactory: VapidKeyFactory,
|
|
329
|
+
deps: [ConfigService]
|
|
330
|
+
}, {
|
|
331
|
+
provide: SERVICE_WORKER,
|
|
332
|
+
useFactory: ServiceWorkerFactory,
|
|
333
|
+
deps: []
|
|
334
|
+
}];
|
|
335
|
+
const FIREBASE_PERFORMANCE_PROVIDERS = [{
|
|
336
|
+
provide: INSTRUMENTATION_ENABLED,
|
|
337
|
+
useFactory: InstrumentationEnabledFactory,
|
|
338
|
+
deps: [ConfigService]
|
|
339
|
+
}, {
|
|
340
|
+
provide: DATA_COLLECTION_ENABLED,
|
|
341
|
+
useFactory: DataCollectionEnabledFactory,
|
|
342
|
+
deps: [ConfigService]
|
|
343
|
+
}];
|
|
344
|
+
const FIREBASE_ANALYTICS_PROVIDERS = [{
|
|
345
|
+
provide: COLLECTION_ENABLED,
|
|
346
|
+
useFactory: AnalyticsEnabledFactory,
|
|
347
|
+
deps: [ConfigService]
|
|
348
|
+
}, {
|
|
349
|
+
provide: APP_NAME,
|
|
350
|
+
useFactory: GetAnalyticsAppName,
|
|
351
|
+
deps: [ConfigService]
|
|
352
|
+
}];
|
|
346
353
|
const FIREBASE_AUTH_PROVIDERS = [
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
354
|
+
{
|
|
355
|
+
provide: USE_EMULATOR,
|
|
356
|
+
useFactory: UseAuthEmulatorFactory,
|
|
357
|
+
deps: [ConfigService]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
provide: TENANT_ID,
|
|
361
|
+
useFactory: AuthTenantIdFactory,
|
|
362
|
+
deps: [ConfigService]
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
provide: LANGUAGE_CODE,
|
|
366
|
+
useFactory: AuthLanguageCodeFactory,
|
|
367
|
+
deps: [ConfigService]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
provide: USE_DEVICE_LANGUAGE,
|
|
371
|
+
useFactory: AuthUseDeviceLanguageFactory,
|
|
372
|
+
deps: [ConfigService]
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
provide: PERSISTENCE,
|
|
376
|
+
useFactory: AuthPersistenceFactory,
|
|
377
|
+
deps: [ConfigService]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
provide: SETTINGS,
|
|
381
|
+
useFactory: AuthSettingsFactory,
|
|
382
|
+
deps: [ConfigService]
|
|
383
|
+
}
|
|
377
384
|
];
|
|
378
385
|
const FIREBASE_APP_CHECK_PROVIDERS = [
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
386
|
+
{
|
|
387
|
+
provide: APP_CHECK_ENABLED,
|
|
388
|
+
useFactory: AppCheckEnabledFactory,
|
|
389
|
+
deps: [ConfigService]
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
provide: APP_CHECK_IS_TOKEN_AUTO_REFRESH_ENABLED,
|
|
393
|
+
useFactory: AppIsTokenAutoRefreshEnabledFactory,
|
|
394
|
+
deps: [ConfigService]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
provide: APP_CHECK_SITE_KEY,
|
|
398
|
+
useFactory: AppCheckSiteKeyFactory,
|
|
399
|
+
deps: [ConfigService]
|
|
400
|
+
},
|
|
401
|
+
AppCheckService
|
|
395
402
|
];
|
|
396
403
|
const FIREBASE_STORAGE_PROVIDERS = [
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
404
|
+
{
|
|
405
|
+
provide: BUCKET,
|
|
406
|
+
useFactory: StorageBucketFactory,
|
|
407
|
+
deps: [ConfigService]
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
provide: MAX_UPLOAD_RETRY_TIME,
|
|
411
|
+
useFactory: StorageMaxUploadRetryTimeFactory,
|
|
412
|
+
deps: [ConfigService]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
provide: MAX_OPERATION_RETRY_TIME,
|
|
416
|
+
useFactory: StorageMaxOperationRetryTimeFactory,
|
|
417
|
+
deps: [ConfigService]
|
|
418
|
+
}
|
|
412
419
|
];
|
|
413
420
|
const FIREBASE_PROVIDERS = [
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
FIREBASE_APP_PROVIDERS,
|
|
422
|
+
FIREBASE_FIRESTORE_PROVIDERS,
|
|
423
|
+
FIREBASE_FUNCTIONS_PROVIDERS,
|
|
424
|
+
FIREBASE_MESSAGING_PROVIDERS,
|
|
425
|
+
FIREBASE_PERFORMANCE_PROVIDERS,
|
|
426
|
+
FIREBASE_ANALYTICS_PROVIDERS,
|
|
427
|
+
FIREBASE_AUTH_PROVIDERS,
|
|
428
|
+
FIREBASE_APP_CHECK_PROVIDERS,
|
|
429
|
+
FIREBASE_STORAGE_PROVIDERS
|
|
423
430
|
];
|
|
424
|
-
|
|
425
|
-
const USE_STORAGE_EMULATOR = new InjectionToken('rxap/firebase/use-storage-emulator');
|
|
426
|
-
/**
|
|
427
|
-
* Connects the AngularFireStorage to the emulator if USE_STORAGE_EMULATOR is provided
|
|
428
|
-
* (replaces the former RxapAngularFireStorageModule).
|
|
429
|
-
*/
|
|
431
|
+
const USE_STORAGE_EMULATOR = new InjectionToken("rxap/firebase/use-storage-emulator");
|
|
430
432
|
function provideAngularFireStorageEmulator() {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
storage.storage.useEmulator(...useEmulator);
|
|
437
|
-
}
|
|
438
|
-
}),
|
|
439
|
-
]);
|
|
433
|
+
return makeEnvironmentProviders([provideAppInitializer(() => {
|
|
434
|
+
const storage = inject(AngularFireStorage);
|
|
435
|
+
const useEmulator = inject(USE_STORAGE_EMULATOR, { optional: true });
|
|
436
|
+
if (useEmulator) storage.storage.useEmulator(...useEmulator);
|
|
437
|
+
})]);
|
|
440
438
|
}
|
|
441
|
-
|
|
442
|
-
// region
|
|
443
|
-
// endregion
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* Generated bundle index. Do not edit.
|
|
447
|
-
*/
|
|
448
|
-
|
|
449
439
|
export { APP_CHECK_ENABLED, APP_CHECK_IS_TOKEN_AUTO_REFRESH_ENABLED, APP_CHECK_SITE_KEY, AnalyticsEnabledFactory, AppCheckEnabledFactory, AppCheckService, AppCheckSiteKeyFactory, AppIsTokenAutoRefreshEnabledFactory, AuthLanguageCodeFactory, AuthPersistenceFactory, AuthSettingsFactory, AuthTenantIdFactory, AuthUseDeviceLanguageFactory, DataCollectionEnabledFactory, EnablePersistenceTokenFactory, FIREBASE_ANALYTICS_PROVIDERS, FIREBASE_APP_CHECK_HTTP_INTERCEPTOR, FIREBASE_APP_CHECK_HTTP_INTERCEPTOR_URL_PATTERN, FIREBASE_APP_CHECK_PROVIDERS, FIREBASE_APP_PROVIDERS, FIREBASE_AUTH_PROVIDERS, FIREBASE_FIRESTORE_PROVIDERS, FIREBASE_FUNCTIONS_PROVIDERS, FIREBASE_MESSAGING_PROVIDERS, FIREBASE_PERFORMANCE_PROVIDERS, FIREBASE_PROVIDERS, FIREBASE_STORAGE_PROVIDERS, FirebaseAppCheckHttpInterceptor, FirebaseNameOrConfigTokenFactory, FirebaseOptionsTokenFactory, FirestoreSettingsTokenFactory, FunctionsNewOriginBehaviorFactory, FunctionsOriginFactory, FunctionsRegionFactory, GetAnalyticsAppName, InstrumentationEnabledFactory, PersistenceSettingsTokenFactory, RXAP_REQUEST_CLOUD_MESSAGING_TOKEN, RxapFirebaseMessagingService, ServiceWorkerFactory, StorageBucketFactory, StorageMaxOperationRetryTimeFactory, StorageMaxUploadRetryTimeFactory, USE_STORAGE_EMULATOR, UseAuthEmulatorFactory, UseFirestoreEmulatorFactory, UseFunctionsEmulatorFactory, VapidKeyFactory, provideAngularFireAppCheck, provideAngularFireStorageEmulator };
|
|
450
|
-
|
|
440
|
+
|
|
441
|
+
//# sourceMappingURL=rxap-firebase.mjs.map
|