@angular/fire 17.1.0 → 18.0.0-canary.c866d08
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/README.md +10 -0
- package/compat/proxy.d.ts +2 -2
- package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -2
- package/docs/analytics.md +14 -20
- package/docs/app-check.md +12 -9
- package/docs/auth.md +44 -9
- package/docs/database.md +12 -12
- package/docs/firestore.md +15 -23
- package/docs/functions.md +11 -9
- package/docs/messaging.md +30 -8
- package/docs/performance.md +11 -9
- package/docs/remote-config.md +11 -9
- package/docs/storage.md +11 -10
- package/docs/vertexai.md +53 -0
- package/esm2022/analytics/analytics.module.mjs +5 -5
- package/esm2022/analytics/is-analytics-supported-factory.mjs +1 -1
- package/esm2022/analytics/screen-tracking.service.mjs +4 -4
- package/esm2022/analytics/user-tracking.service.mjs +4 -4
- package/esm2022/app/app.module.mjs +5 -5
- package/esm2022/app-check/app-check.module.mjs +5 -5
- package/esm2022/auth/auth.module.mjs +5 -5
- package/esm2022/auth-guard/auth-guard.mjs +4 -4
- package/esm2022/auth-guard/auth-guard.module.mjs +5 -5
- package/esm2022/compat/analytics/analytics.mjs +4 -4
- package/esm2022/compat/analytics/analytics.module.mjs +5 -5
- package/esm2022/compat/analytics/screen-tracking.service.mjs +4 -4
- package/esm2022/compat/analytics/user-tracking.service.mjs +4 -4
- package/esm2022/compat/auth/auth.mjs +4 -4
- package/esm2022/compat/auth/auth.module.mjs +5 -5
- package/esm2022/compat/auth-guard/auth-guard.mjs +4 -4
- package/esm2022/compat/auth-guard/auth-guard.module.mjs +5 -5
- package/esm2022/compat/cache.mjs +1 -1
- package/esm2022/compat/database/database.mjs +4 -4
- package/esm2022/compat/database/database.module.mjs +5 -5
- package/esm2022/compat/database/list/changes.mjs +1 -1
- package/esm2022/compat/database/list/create-reference.mjs +1 -1
- package/esm2022/compat/database/list/remove.mjs +1 -1
- package/esm2022/compat/database/list/utils.mjs +1 -1
- package/esm2022/compat/database/observable/fromRef.mjs +1 -1
- package/esm2022/compat/database/utils.mjs +1 -1
- package/esm2022/compat/firebase.app.module.mjs +5 -5
- package/esm2022/compat/firestore/collection/changes.mjs +1 -1
- package/esm2022/compat/firestore/collection/collection.mjs +1 -1
- package/esm2022/compat/firestore/collection-group/collection-group.mjs +1 -1
- package/esm2022/compat/firestore/firestore.mjs +4 -4
- package/esm2022/compat/firestore/firestore.module.mjs +5 -5
- package/esm2022/compat/firestore/observable/fromRef.mjs +1 -1
- package/esm2022/compat/functions/functions.mjs +4 -4
- package/esm2022/compat/functions/functions.module.mjs +5 -5
- package/esm2022/compat/messaging/messaging.mjs +4 -4
- package/esm2022/compat/messaging/messaging.module.mjs +5 -5
- package/esm2022/compat/performance/performance.mjs +4 -4
- package/esm2022/compat/performance/performance.module.mjs +5 -5
- package/esm2022/compat/performance/performance.service.mjs +4 -4
- package/esm2022/compat/proxy.mjs +1 -1
- package/esm2022/compat/remote-config/remote-config.mjs +4 -4
- package/esm2022/compat/remote-config/remote-config.module.mjs +5 -5
- package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +10 -12
- package/esm2022/compat/storage/storage.mjs +4 -4
- package/esm2022/compat/storage/storage.module.mjs +5 -5
- package/esm2022/core.mjs +1 -1
- package/esm2022/database/database.module.mjs +5 -5
- package/esm2022/firestore/firestore.module.mjs +5 -5
- package/esm2022/firestore/lite/lite.module.mjs +5 -5
- package/esm2022/functions/functions.module.mjs +5 -5
- package/esm2022/messaging/is-messaging-supported-factory.mjs +1 -1
- package/esm2022/messaging/messaging.module.mjs +5 -5
- package/esm2022/performance/performance.module.mjs +5 -5
- package/esm2022/remote-config/is-remote-config-supported-factory.mjs +1 -1
- package/esm2022/remote-config/remote-config.module.mjs +5 -5
- package/esm2022/storage/storage.module.mjs +5 -5
- package/esm2022/vertexai-preview/vertexai.module.mjs +5 -5
- package/esm2022/zones.mjs +4 -4
- package/fesm2022/angular-fire-analytics.mjs +410 -297
- package/fesm2022/angular-fire-analytics.mjs.map +7 -1
- package/fesm2022/angular-fire-app-check.mjs +162 -91
- package/fesm2022/angular-fire-app-check.mjs.map +7 -1
- package/fesm2022/angular-fire-app.mjs +181 -108
- package/fesm2022/angular-fire-app.mjs.map +7 -1
- package/fesm2022/angular-fire-auth-guard.mjs +83 -73
- package/fesm2022/angular-fire-auth-guard.mjs.map +7 -1
- package/fesm2022/angular-fire-auth.mjs +421 -142
- package/fesm2022/angular-fire-auth.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-analytics.mjs +261 -270
- package/fesm2022/angular-fire-compat-analytics.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-auth-guard.mjs +83 -72
- package/fesm2022/angular-fire-compat-auth-guard.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-auth.mjs +214 -213
- package/fesm2022/angular-fire-compat-auth.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-database.mjs +375 -378
- package/fesm2022/angular-fire-compat-database.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-firestore.mjs +537 -677
- package/fesm2022/angular-fire-compat-firestore.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-functions.mjs +97 -93
- package/fesm2022/angular-fire-compat-functions.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-messaging.mjs +106 -106
- package/fesm2022/angular-fire-compat-messaging.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-performance.mjs +157 -151
- package/fesm2022/angular-fire-compat-performance.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-remote-config.mjs +215 -231
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-storage.mjs +226 -233
- package/fesm2022/angular-fire-compat-storage.mjs.map +7 -1
- package/fesm2022/angular-fire-compat.mjs +140 -153
- package/fesm2022/angular-fire-compat.mjs.map +7 -1
- package/fesm2022/angular-fire-database.mjs +376 -136
- package/fesm2022/angular-fire-database.mjs.map +7 -1
- package/fesm2022/angular-fire-firestore-lite.mjs +388 -139
- package/fesm2022/angular-fire-firestore-lite.mjs.map +7 -1
- package/fesm2022/angular-fire-firestore.mjs +526 -167
- package/fesm2022/angular-fire-firestore.mjs.map +7 -1
- package/fesm2022/angular-fire-functions.mjs +166 -93
- package/fesm2022/angular-fire-functions.mjs.map +7 -1
- package/fesm2022/angular-fire-messaging.mjs +196 -118
- package/fesm2022/angular-fire-messaging.mjs.map +7 -1
- package/fesm2022/angular-fire-performance.mjs +178 -104
- package/fesm2022/angular-fire-performance.mjs.map +7 -1
- package/fesm2022/angular-fire-remote-config.mjs +254 -132
- package/fesm2022/angular-fire-remote-config.mjs.map +7 -1
- package/fesm2022/angular-fire-storage.mjs +225 -105
- package/fesm2022/angular-fire-storage.mjs.map +7 -1
- package/fesm2022/angular-fire-vertexai-preview.mjs +146 -85
- package/fesm2022/angular-fire-vertexai-preview.mjs.map +7 -1
- package/fesm2022/angular-fire.mjs +183 -213
- package/fesm2022/angular-fire.mjs.map +7 -1
- package/package.json +7 -7
- package/schematics/deploy/actions.js +2 -2
- package/schematics/setup/prompts.js +1 -1
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { EMPTY, of, Observable, concat } from 'rxjs';
|
|
8
|
-
import { subscribeOn, observeOn, switchMap, map, shareReplay, switchMapTo, catchError, mergeMap, defaultIfEmpty } from 'rxjs/operators';
|
|
9
|
-
import firebase from 'firebase/compat/app';
|
|
10
|
-
|
|
11
|
-
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
12
|
-
// Export a null object with the same keys as firebase/compat/messaging, so Proxy can work with proxy-polyfill in Internet Explorer
|
|
13
|
-
const proxyPolyfillCompat = {
|
|
14
|
-
deleteToken: null,
|
|
15
|
-
getToken: null,
|
|
16
|
-
onMessage: null,
|
|
17
|
-
onBackgroundMessage: null,
|
|
1
|
+
// base.mjs
|
|
2
|
+
var proxyPolyfillCompat = {
|
|
3
|
+
deleteToken: null,
|
|
4
|
+
getToken: null,
|
|
5
|
+
onMessage: null,
|
|
6
|
+
onBackgroundMessage: null
|
|
18
7
|
};
|
|
19
8
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
const
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
9
|
+
// messaging.mjs
|
|
10
|
+
import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from "@angular/core";
|
|
11
|
+
import { ɵAngularFireSchedulers } from "@angular/fire";
|
|
12
|
+
import { ɵapplyMixins, ɵlazySDKProxy } from "@angular/fire/compat";
|
|
13
|
+
import { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from "@angular/fire/compat";
|
|
14
|
+
import { isSupported } from "firebase/messaging";
|
|
15
|
+
import { EMPTY, Observable, concat, of } from "rxjs";
|
|
16
|
+
import { catchError, defaultIfEmpty, map, mergeMap, observeOn, shareReplay, subscribeOn, switchMap, switchMapTo } from "rxjs/operators";
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
import * as i1 from "@angular/fire";
|
|
19
|
+
var VAPID_KEY = new InjectionToken("angularfire2.messaging.vapid-key");
|
|
20
|
+
var SERVICE_WORKER = new InjectionToken("angularfire2.messaging.service-worker-registeration");
|
|
21
|
+
var AngularFireMessaging = class _AngularFireMessaging {
|
|
22
|
+
requestPermission;
|
|
23
|
+
getToken;
|
|
24
|
+
tokenChanges;
|
|
25
|
+
messages;
|
|
26
|
+
requestToken;
|
|
27
|
+
deleteToken;
|
|
28
|
+
constructor(options, name, platformId, zone, schedulers, vapidKey, _serviceWorker) {
|
|
29
|
+
const serviceWorker = _serviceWorker;
|
|
30
|
+
const messaging = of(void 0).pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(isSupported), switchMap((supported) => supported ? import("firebase/compat/messaging") : EMPTY), map(() => ɵfirebaseAppFactory(options, zone, name)), switchMap((app) => ɵcacheInstance(`${app.name}.messaging`, "AngularFireMessaging", app.name, () => {
|
|
31
|
+
return of(app.messaging());
|
|
32
|
+
}, [])), shareReplay({ bufferSize: 1, refCount: false }));
|
|
33
|
+
this.requestPermission = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => Notification.requestPermission()));
|
|
34
|
+
this.getToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(async (messaging2) => {
|
|
35
|
+
if (Notification.permission === "granted") {
|
|
36
|
+
const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;
|
|
37
|
+
return await messaging2.getToken({ vapidKey, serviceWorkerRegistration });
|
|
38
|
+
} else {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
const notificationPermission$ = new Observable((emitter) => {
|
|
43
|
+
navigator.permissions.query({ name: "notifications" }).then((notificationPerm) => {
|
|
44
|
+
notificationPerm.onchange = () => emitter.next();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
const tokenChange$ = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMapTo(notificationPermission$), switchMapTo(this.getToken));
|
|
48
|
+
this.tokenChanges = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => concat(this.getToken, tokenChange$)));
|
|
49
|
+
this.messages = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap((messaging2) => new Observable((emitter) => messaging2.onMessage(emitter))));
|
|
50
|
+
this.requestToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => this.requestPermission), catchError(() => of(null)), mergeMap(() => this.tokenChanges));
|
|
51
|
+
this.deleteToken = () => messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap((messaging2) => messaging2.deleteToken()), defaultIfEmpty(false));
|
|
52
|
+
return ɵlazySDKProxy(this, messaging, zone);
|
|
53
|
+
}
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFireMessaging, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: VAPID_KEY, optional: true }, { token: SERVICE_WORKER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFireMessaging, providedIn: "any" });
|
|
56
|
+
};
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: AngularFireMessaging, decorators: [{
|
|
58
|
+
type: Injectable,
|
|
59
|
+
args: [{
|
|
60
|
+
providedIn: "any"
|
|
61
|
+
}]
|
|
62
|
+
}], ctorParameters: () => [{ type: void 0, decorators: [{
|
|
63
|
+
type: Inject,
|
|
64
|
+
args: [FIREBASE_OPTIONS]
|
|
65
|
+
}] }, { type: void 0, decorators: [{
|
|
66
|
+
type: Optional
|
|
67
|
+
}, {
|
|
68
|
+
type: Inject,
|
|
69
|
+
args: [FIREBASE_APP_NAME]
|
|
70
|
+
}] }, { type: Object, decorators: [{
|
|
71
|
+
type: Inject,
|
|
72
|
+
args: [PLATFORM_ID]
|
|
73
|
+
}] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: void 0, decorators: [{
|
|
74
|
+
type: Optional
|
|
75
|
+
}, {
|
|
76
|
+
type: Inject,
|
|
77
|
+
args: [VAPID_KEY]
|
|
78
|
+
}] }, { type: void 0, decorators: [{
|
|
79
|
+
type: Optional
|
|
80
|
+
}, {
|
|
81
|
+
type: Inject,
|
|
82
|
+
args: [SERVICE_WORKER]
|
|
83
|
+
}] }] });
|
|
89
84
|
ɵapplyMixins(AngularFireMessaging, [proxyPolyfillCompat]);
|
|
90
85
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
export {
|
|
86
|
+
// messaging.module.mjs
|
|
87
|
+
import { NgModule } from "@angular/core";
|
|
88
|
+
import { VERSION } from "@angular/fire";
|
|
89
|
+
import firebase from "firebase/compat/app";
|
|
90
|
+
import * as i02 from "@angular/core";
|
|
91
|
+
var AngularFireMessagingModule = class _AngularFireMessagingModule {
|
|
92
|
+
constructor() {
|
|
93
|
+
firebase.registerVersion("angularfire", VERSION.full, "fcm-compat");
|
|
94
|
+
}
|
|
95
|
+
static ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AngularFireMessagingModule, deps: [], target: i02.ɵɵFactoryTarget.NgModule });
|
|
96
|
+
static ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AngularFireMessagingModule });
|
|
97
|
+
static ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AngularFireMessagingModule, providers: [AngularFireMessaging] });
|
|
98
|
+
};
|
|
99
|
+
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: AngularFireMessagingModule, decorators: [{
|
|
100
|
+
type: NgModule,
|
|
101
|
+
args: [{
|
|
102
|
+
providers: [AngularFireMessaging]
|
|
103
|
+
}]
|
|
104
|
+
}], ctorParameters: () => [] });
|
|
105
|
+
export {
|
|
106
|
+
AngularFireMessaging,
|
|
107
|
+
AngularFireMessagingModule,
|
|
108
|
+
SERVICE_WORKER,
|
|
109
|
+
VAPID_KEY
|
|
110
|
+
};
|
|
111
111
|
//# sourceMappingURL=angular-fire-compat-messaging.mjs.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"angular-fire-compat-messaging.mjs","sources":["../../../src/compat/messaging/base.ts","../../../src/compat/messaging/messaging.ts","../../../src/compat/messaging/messaging.module.ts","../../../src/compat/messaging/angular-fire-compat-messaging.ts"],"sourcesContent":["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/messaging, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n deleteToken: null,\n getToken: null,\n onMessage: null,\n onBackgroundMessage: null,\n};\n","import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { isSupported } from 'firebase/messaging';\nimport { EMPTY, Observable, concat, of } from 'rxjs';\nimport { catchError, defaultIfEmpty, map, mergeMap, observeOn, shareReplay, subscribeOn, switchMap, switchMapTo } from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\n\nexport const VAPID_KEY = new InjectionToken<string>('angularfire2.messaging.vapid-key');\nexport const SERVICE_WORKER = new InjectionToken<Promise<ServiceWorkerRegistration>>('angularfire2.messaging.service-worker-registeration');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFireMessaging extends Omit<ɵPromiseProxy<firebase.messaging.Messaging>, 'deleteToken' | 'getToken' | 'requestPermission'> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireMessaging {\n\n public readonly requestPermission: Observable<NotificationPermission>;\n public readonly getToken: Observable<string | null>;\n public readonly tokenChanges: Observable<string | null>;\n public readonly messages: Observable<firebase.messaging.MessagePayload>;\n public readonly requestToken: Observable<string | null>;\n public readonly deleteToken: (token: string) => Observable<boolean>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object,\n zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n @Optional() @Inject(VAPID_KEY) vapidKey: string|null,\n @Optional() @Inject(SERVICE_WORKER) _serviceWorker: any,\n ) {\n const serviceWorker: Promise<ServiceWorkerRegistration> | null = _serviceWorker;\n\n const messaging = of(undefined).pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(isSupported),\n switchMap(supported => supported ? import('firebase/compat/messaging') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n switchMap(app => ɵcacheInstance(`${app.name}.messaging`, 'AngularFireMessaging', app.name, () => {\n return of(app.messaging());\n }, [])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n\n this.requestPermission = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => Notification.requestPermission())\n );\n\n this.getToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(async messaging => {\n if (Notification.permission === 'granted') {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;\n return await messaging.getToken({ vapidKey, serviceWorkerRegistration });\n } else {\n return null;\n }\n })\n );\n\n const notificationPermission$ = new Observable<string>(emitter => {\n navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {\n notificationPerm.onchange = () => emitter.next();\n });\n });\n\n\n const tokenChange$ = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMapTo(notificationPermission$),\n switchMapTo(this.getToken)\n );\n\n this.tokenChanges = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => concat(this.getToken, tokenChange$))\n );\n\n\n this.messages = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => new Observable<firebase.messaging.MessagePayload>(emitter =>\n messaging.onMessage(emitter)\n )),\n );\n\n this.requestToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => this.requestPermission),\n catchError(() => of(null)),\n mergeMap(() => this.tokenChanges)\n );\n\n this.deleteToken = () => messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => messaging.deleteToken()),\n defaultIfEmpty(false)\n );\n\n return ɵlazySDKProxy(this, messaging, zone);\n }\n\n}\n\nɵapplyMixins(AngularFireMessaging, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireMessaging } from './messaging';\n\n@NgModule({\n providers: [ AngularFireMessaging ]\n})\nexport class AngularFireMessagingModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACO,MAAM,mBAAmB,GAAG;AACjC,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,mBAAmB,EAAE,IAAI;CAC1B;;MCIY,SAAS,GAAG,IAAI,cAAc,CAAS,kCAAkC,EAAE;MAC3E,cAAc,GAAG,IAAI,cAAc,CAAqC,qDAAqD,EAAE;MAS/H,oBAAoB,CAAA;AAEf,IAAA,iBAAiB,CAAqC;AACtD,IAAA,QAAQ,CAA4B;AACpC,IAAA,YAAY,CAA4B;AACxC,IAAA,QAAQ,CAAgD;AACxD,IAAA,YAAY,CAA4B;AACxC,IAAA,WAAW,CAAyC;IAEpE,WAC4B,CAAA,OAAwB,EACX,IAA+B;;AAEjD,IAAA,UAAkB,EACvC,IAAY,EACZ,UAAkC,EACH,QAAqB,EAChB,cAAmB,EAAA;QAEvD,MAAM,aAAa,GAA8C,cAAc,CAAC;AAEhF,QAAA,MAAM,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,CAClC,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC,EACtC,SAAS,CAAC,UAAU,CAAC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;;0BAEpC,MAAM;2BAAC,WAAW,CAAA;;0BAGlB,QAAQ;;0BAAI,MAAM;2BAAC,SAAS,CAAA;;0BAC5B,QAAQ;;0BAAI,MAAM;2BAAC,cAAc,CAAA;;AAsFtC,YAAY,CAAC,oBAAoB,EAAE,CAAC,mBAAmB,CAAC,CAAC;;MCpH5C,0BAA0B,CAAA;AACrC,IAAA,WAAA,GAAA;QACE,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;KACrE;uGAHU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAA1B,0BAA0B,EAAA,CAAA,CAAA;wGAA1B,0BAA0B,EAAA,SAAA,EAF1B,CAAE,oBAAoB,CAAE,EAAA,CAAA,CAAA;;2FAExB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,oBAAoB,CAAE;AACpC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/compat/messaging/base.ts", "../../../src/compat/messaging/messaging.ts", "../../../src/compat/messaging/messaging.module.ts"],
|
|
4
|
+
"sourcesContent": ["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/messaging, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n deleteToken: null,\n getToken: null,\n onMessage: null,\n onBackgroundMessage: null,\n};\n", "import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { isSupported } from 'firebase/messaging';\nimport { EMPTY, Observable, concat, of } from 'rxjs';\nimport { catchError, defaultIfEmpty, map, mergeMap, observeOn, shareReplay, subscribeOn, switchMap, switchMapTo } from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\n\nexport const VAPID_KEY = new InjectionToken<string>('angularfire2.messaging.vapid-key');\nexport const SERVICE_WORKER = new InjectionToken<Promise<ServiceWorkerRegistration>>('angularfire2.messaging.service-worker-registeration');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFireMessaging extends Omit<ɵPromiseProxy<firebase.messaging.Messaging>, 'deleteToken' | 'getToken' | 'requestPermission'> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireMessaging {\n\n public readonly requestPermission: Observable<NotificationPermission>;\n public readonly getToken: Observable<string | null>;\n public readonly tokenChanges: Observable<string | null>;\n public readonly messages: Observable<firebase.messaging.MessagePayload>;\n public readonly requestToken: Observable<string | null>;\n public readonly deleteToken: (token: string) => Observable<boolean>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object,\n zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n @Optional() @Inject(VAPID_KEY) vapidKey: string|null,\n @Optional() @Inject(SERVICE_WORKER) _serviceWorker: any,\n ) {\n const serviceWorker: Promise<ServiceWorkerRegistration> | null = _serviceWorker;\n\n const messaging = of(undefined).pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(isSupported),\n switchMap(supported => supported ? import('firebase/compat/messaging') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n switchMap(app => ɵcacheInstance(`${app.name}.messaging`, 'AngularFireMessaging', app.name, () => {\n return of(app.messaging());\n }, [])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n\n this.requestPermission = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => Notification.requestPermission())\n );\n\n this.getToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(async messaging => {\n if (Notification.permission === 'granted') {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;\n return await messaging.getToken({ vapidKey, serviceWorkerRegistration });\n } else {\n return null;\n }\n })\n );\n\n const notificationPermission$ = new Observable<string>(emitter => {\n navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {\n notificationPerm.onchange = () => emitter.next();\n });\n });\n\n\n const tokenChange$ = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMapTo(notificationPermission$),\n switchMapTo(this.getToken)\n );\n\n this.tokenChanges = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => concat(this.getToken, tokenChange$))\n );\n\n\n this.messages = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => new Observable<firebase.messaging.MessagePayload>(emitter =>\n messaging.onMessage(emitter)\n )),\n );\n\n this.requestToken = messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(() => this.requestPermission),\n catchError(() => of(null)),\n mergeMap(() => this.tokenChanges)\n );\n\n this.deleteToken = () => messaging.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n switchMap(messaging => messaging.deleteToken()),\n defaultIfEmpty(false)\n );\n\n return ɵlazySDKProxy(this, messaging, zone);\n }\n\n}\n\nɵapplyMixins(AngularFireMessaging, [proxyPolyfillCompat]);\n", "import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireMessaging } from './messaging';\n\n@NgModule({\n providers: [ AngularFireMessaging ]\n})\nexport class AngularFireMessagingModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAEO,IAAM,sBAAsB;EACjC,aAAa;EACb,UAAU;EACV,WAAW;EACX,qBAAqB;;;;ACNvB,SAAS,QAAQ,YAAY,gBAAgB,QAAQ,UAAU,mBAAmB;AAClF,SAAS,8BAA8B;AACvC,SAAwB,cAAc,qBAAqB;AAC3D,SAAS,mBAAmB,kBAAkB,gBAAgB,2BAA2B;AAGzF,SAAS,mBAAmB;AAC5B,SAAS,OAAO,YAAY,QAAQ,UAAU;AAC9C,SAAS,YAAY,gBAAgB,KAAK,UAAU,WAAW,aAAa,aAAa,WAAW,mBAAmB;;;AAGhH,IAAM,YAAY,IAAI,eAAuB,kCAAkC;AAC/E,IAAM,iBAAiB,IAAI,eAAmD,qDAAqD;AASpI,IAAO,uBAAP,MAAO,sBAAoB;EAEf;EACA;EACA;EACA;EACA;EACA;EAEhB,YAC4B,SACa,MAElB,YACrB,MACA,YAC+B,UACK,gBAAmB;AAEvD,UAAM,gBAA2D;AAEjE,UAAM,YAAY,GAAG,MAAS,EAAE,KAC9B,YAAY,WAAW,cAAc,GACrC,UAAU,WAAW,aAAa,GAClC,UAAU,WAAW,GACrB,UAAU,eAAa,YAAY,OAAO,2BAA2B,IAAI,KAAK,GAC9E,IAAI,MAAM,oBAAoB,SAAS,MAAM,IAAI,CAAC,GAClD,UAAU,SAAO,eAAe,GAAG,IAAI,IAAI,cAAc,wBAAwB,IAAI,MAAM,MAAK;AAC9F,aAAO,GAAG,IAAI,UAAS,CAAE;IAC3B,GAAG,CAAA,CAAE,CAAC,GACN,YAAY,EAAE,YAAY,GAAG,UAAU,MAAK,CAAE,CAAC;AAIjD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ION } from '@angular/fire';
|
|
9
|
-
import firebase from 'firebase/compat/app';
|
|
10
|
-
|
|
11
|
-
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
12
|
-
// Export a null object with the same keys as firebase/compat/performance, so Proxy can work with proxy-polyfill in Internet Explorer
|
|
13
|
-
const proxyPolyfillCompat = {
|
|
14
|
-
app: null,
|
|
15
|
-
trace: null,
|
|
16
|
-
instrumentationEnabled: null,
|
|
17
|
-
dataCollectionEnabled: null,
|
|
1
|
+
// base.mjs
|
|
2
|
+
var proxyPolyfillCompat = {
|
|
3
|
+
app: null,
|
|
4
|
+
trace: null,
|
|
5
|
+
instrumentationEnabled: null,
|
|
6
|
+
dataCollectionEnabled: null
|
|
18
7
|
};
|
|
19
8
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
type: Optional
|
|
51
|
-
}, {
|
|
52
|
-
type: Inject,
|
|
53
|
-
args: [INSTRUMENTATION_ENABLED]
|
|
54
|
-
}] }, { type: undefined, decorators: [{
|
|
55
|
-
type: Optional
|
|
56
|
-
}, {
|
|
57
|
-
type: Inject,
|
|
58
|
-
args: [DATA_COLLECTION_ENABLED]
|
|
59
|
-
}] }, { type: i0.NgZone }, { type: Object, decorators: [{
|
|
60
|
-
type: Inject,
|
|
61
|
-
args: [PLATFORM_ID]
|
|
62
|
-
}] }] });
|
|
63
|
-
const trace$ = (traceId) => {
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
65
|
-
if (typeof window !== 'undefined' && window.performance?.mark) {
|
|
66
|
-
const entries = window.performance.getEntriesByName(traceId, 'measure') || [];
|
|
67
|
-
const startMarkName = `_${traceId}Start[${entries.length}]`;
|
|
68
|
-
const endMarkName = `_${traceId}End[${entries.length}]`;
|
|
69
|
-
return new Observable(emitter => {
|
|
70
|
-
window.performance.mark(startMarkName);
|
|
71
|
-
emitter.next();
|
|
72
|
-
return {
|
|
73
|
-
unsubscribe: () => {
|
|
74
|
-
window.performance.mark(endMarkName);
|
|
75
|
-
window.performance.measure(traceId, startMarkName, endMarkName);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
return EMPTY;
|
|
82
|
-
}
|
|
9
|
+
// performance.mjs
|
|
10
|
+
import { isPlatformBrowser } from "@angular/common";
|
|
11
|
+
import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from "@angular/core";
|
|
12
|
+
import { ɵapplyMixins, ɵcacheInstance, ɵlazySDKProxy } from "@angular/fire/compat";
|
|
13
|
+
import { FirebaseApp } from "@angular/fire/compat";
|
|
14
|
+
import { EMPTY, Observable, of } from "rxjs";
|
|
15
|
+
import { map, shareReplay, switchMap, tap } from "rxjs/operators";
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
import * as i1 from "@angular/fire/compat";
|
|
18
|
+
var INSTRUMENTATION_ENABLED = new InjectionToken("angularfire2.performance.instrumentationEnabled");
|
|
19
|
+
var DATA_COLLECTION_ENABLED = new InjectionToken("angularfire2.performance.dataCollectionEnabled");
|
|
20
|
+
var AngularFirePerformance = class _AngularFirePerformance {
|
|
21
|
+
zone;
|
|
22
|
+
performance;
|
|
23
|
+
constructor(app, instrumentationEnabled, dataCollectionEnabled, zone, platformId) {
|
|
24
|
+
this.zone = zone;
|
|
25
|
+
this.performance = of(void 0).pipe(switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import("firebase/compat/performance")) : EMPTY), map(() => ɵcacheInstance(`performance`, "AngularFirePerformance", app.name, () => {
|
|
26
|
+
const performance = zone.runOutsideAngular(() => app.performance());
|
|
27
|
+
if (instrumentationEnabled === false) {
|
|
28
|
+
performance.instrumentationEnabled = false;
|
|
29
|
+
}
|
|
30
|
+
if (dataCollectionEnabled === false) {
|
|
31
|
+
performance.dataCollectionEnabled = false;
|
|
32
|
+
}
|
|
33
|
+
return performance;
|
|
34
|
+
}, [instrumentationEnabled, dataCollectionEnabled])), shareReplay({ bufferSize: 1, refCount: false }));
|
|
35
|
+
return ɵlazySDKProxy(this, this.performance, zone);
|
|
36
|
+
}
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFirePerformance, deps: [{ token: i1.FirebaseApp }, { token: INSTRUMENTATION_ENABLED, optional: true }, { token: DATA_COLLECTION_ENABLED, optional: true }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
38
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFirePerformance, providedIn: "any" });
|
|
83
39
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: AngularFirePerformance, decorators: [{
|
|
41
|
+
type: Injectable,
|
|
42
|
+
args: [{
|
|
43
|
+
providedIn: "any"
|
|
44
|
+
}]
|
|
45
|
+
}], ctorParameters: () => [{ type: i1.FirebaseApp }, { type: void 0, decorators: [{
|
|
46
|
+
type: Optional
|
|
47
|
+
}, {
|
|
48
|
+
type: Inject,
|
|
49
|
+
args: [INSTRUMENTATION_ENABLED]
|
|
50
|
+
}] }, { type: void 0, decorators: [{
|
|
51
|
+
type: Optional
|
|
52
|
+
}, {
|
|
53
|
+
type: Inject,
|
|
54
|
+
args: [DATA_COLLECTION_ENABLED]
|
|
55
|
+
}] }, { type: i0.NgZone }, { type: Object, decorators: [{
|
|
56
|
+
type: Inject,
|
|
57
|
+
args: [PLATFORM_ID]
|
|
58
|
+
}] }] });
|
|
59
|
+
var trace$ = (traceId) => {
|
|
60
|
+
if (typeof window !== "undefined" && window.performance?.mark) {
|
|
61
|
+
const entries = window.performance.getEntriesByName(traceId, "measure") || [];
|
|
62
|
+
const startMarkName = `_${traceId}Start[${entries.length}]`;
|
|
63
|
+
const endMarkName = `_${traceId}End[${entries.length}]`;
|
|
64
|
+
return new Observable((emitter) => {
|
|
65
|
+
window.performance.mark(startMarkName);
|
|
66
|
+
emitter.next();
|
|
67
|
+
return {
|
|
68
|
+
unsubscribe: () => {
|
|
69
|
+
window.performance.mark(endMarkName);
|
|
70
|
+
window.performance.measure(traceId, startMarkName, endMarkName);
|
|
93
71
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
return EMPTY;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
var traceUntil = (name, test, options) => (source$) => new Observable((subscriber) => {
|
|
79
|
+
const traceSubscription = trace$(name).subscribe();
|
|
80
|
+
return source$.pipe(tap((a) => test(a) && traceSubscription.unsubscribe(), () => void 0, () => options && options.orComplete && traceSubscription.unsubscribe())).subscribe(subscriber);
|
|
81
|
+
});
|
|
82
|
+
var traceWhile = (name, test, options) => (source$) => new Observable((subscriber) => {
|
|
83
|
+
let traceSubscription;
|
|
84
|
+
return source$.pipe(tap((a) => {
|
|
85
|
+
if (test(a)) {
|
|
86
|
+
traceSubscription = traceSubscription || trace$(name).subscribe();
|
|
87
|
+
} else {
|
|
88
|
+
if (traceSubscription) {
|
|
89
|
+
traceSubscription.unsubscribe();
|
|
90
|
+
}
|
|
91
|
+
traceSubscription = void 0;
|
|
92
|
+
}
|
|
93
|
+
}, () => void 0, () => options && options.orComplete && traceSubscription && traceSubscription.unsubscribe())).subscribe(subscriber);
|
|
101
94
|
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
var traceUntilComplete = (name) => (source$) => new Observable((subscriber) => {
|
|
96
|
+
const traceSubscription = trace$(name).subscribe();
|
|
97
|
+
return source$.pipe(tap(() => void 0, () => void 0, () => traceSubscription.unsubscribe())).subscribe(subscriber);
|
|
105
98
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
var traceUntilFirst = (name) => (source$) => new Observable((subscriber) => {
|
|
100
|
+
const traceSubscription = trace$(name).subscribe();
|
|
101
|
+
return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => void 0, () => void 0)).subscribe(subscriber);
|
|
109
102
|
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
var trace = (name) => (source$) => new Observable((subscriber) => {
|
|
104
|
+
const traceSubscription = trace$(name).subscribe();
|
|
105
|
+
return source$.pipe(tap(() => traceSubscription.unsubscribe(), () => void 0, () => traceSubscription.unsubscribe())).subscribe(subscriber);
|
|
113
106
|
});
|
|
114
107
|
ɵapplyMixins(AngularFirePerformance, [proxyPolyfillCompat]);
|
|
115
108
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (this.disposable) {
|
|
131
|
-
this.disposable.unsubscribe();
|
|
132
|
-
}
|
|
109
|
+
// performance.service.mjs
|
|
110
|
+
import { ApplicationRef, Injectable as Injectable2 } from "@angular/core";
|
|
111
|
+
import { first, tap as tap2 } from "rxjs/operators";
|
|
112
|
+
import * as i02 from "@angular/core";
|
|
113
|
+
var IS_STABLE_START_MARK = "Zone";
|
|
114
|
+
var IS_STABLE_END_MARK = "_isStableEnd";
|
|
115
|
+
var PerformanceMonitoringService = class _PerformanceMonitoringService {
|
|
116
|
+
disposable;
|
|
117
|
+
constructor(appRef) {
|
|
118
|
+
if (typeof window !== "undefined" && window.performance?.mark) {
|
|
119
|
+
this.disposable = appRef.isStable.pipe(first((it) => it), tap2(() => {
|
|
120
|
+
window.performance.mark(IS_STABLE_END_MARK);
|
|
121
|
+
window.performance.measure("isStable", IS_STABLE_START_MARK, IS_STABLE_END_MARK);
|
|
122
|
+
})).subscribe();
|
|
133
123
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
type: Injectable
|
|
139
|
-
}], ctorParameters: () => [{ type: i0.ApplicationRef }] });
|
|
140
|
-
|
|
141
|
-
class AngularFirePerformanceModule {
|
|
142
|
-
constructor(perf, _) {
|
|
143
|
-
firebase.registerVersion('angularfire', VERSION.full, 'perf-compat');
|
|
144
|
-
// call anything here to get perf loading
|
|
145
|
-
perf.dataCollectionEnabled.then(() => undefined);
|
|
124
|
+
}
|
|
125
|
+
ngOnDestroy() {
|
|
126
|
+
if (this.disposable) {
|
|
127
|
+
this.disposable.unsubscribe();
|
|
146
128
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
providers: [AngularFirePerformance]
|
|
155
|
-
}]
|
|
156
|
-
}], ctorParameters: () => [{ type: AngularFirePerformance }, { type: PerformanceMonitoringService, decorators: [{
|
|
157
|
-
type: Optional
|
|
158
|
-
}] }] });
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Generated bundle index. Do not edit.
|
|
162
|
-
*/
|
|
129
|
+
}
|
|
130
|
+
static ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _PerformanceMonitoringService, deps: [{ token: i02.ApplicationRef }], target: i02.ɵɵFactoryTarget.Injectable });
|
|
131
|
+
static ɵprov = i02.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _PerformanceMonitoringService });
|
|
132
|
+
};
|
|
133
|
+
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: PerformanceMonitoringService, decorators: [{
|
|
134
|
+
type: Injectable2
|
|
135
|
+
}], ctorParameters: () => [{ type: i02.ApplicationRef }] });
|
|
163
136
|
|
|
164
|
-
|
|
137
|
+
// performance.module.mjs
|
|
138
|
+
import { NgModule, Optional as Optional2 } from "@angular/core";
|
|
139
|
+
import { VERSION } from "@angular/fire";
|
|
140
|
+
import firebase from "firebase/compat/app";
|
|
141
|
+
import * as i03 from "@angular/core";
|
|
142
|
+
var AngularFirePerformanceModule = class _AngularFirePerformanceModule {
|
|
143
|
+
constructor(perf, _) {
|
|
144
|
+
firebase.registerVersion("angularfire", VERSION.full, "perf-compat");
|
|
145
|
+
perf.dataCollectionEnabled.then(() => void 0);
|
|
146
|
+
}
|
|
147
|
+
static ɵfac = i03.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFirePerformanceModule, deps: [{ token: AngularFirePerformance }, { token: PerformanceMonitoringService, optional: true }], target: i03.ɵɵFactoryTarget.NgModule });
|
|
148
|
+
static ɵmod = i03.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFirePerformanceModule });
|
|
149
|
+
static ɵinj = i03.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFirePerformanceModule, providers: [AngularFirePerformance] });
|
|
150
|
+
};
|
|
151
|
+
i03.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: AngularFirePerformanceModule, decorators: [{
|
|
152
|
+
type: NgModule,
|
|
153
|
+
args: [{
|
|
154
|
+
providers: [AngularFirePerformance]
|
|
155
|
+
}]
|
|
156
|
+
}], ctorParameters: () => [{ type: AngularFirePerformance }, { type: PerformanceMonitoringService, decorators: [{
|
|
157
|
+
type: Optional2
|
|
158
|
+
}] }] });
|
|
159
|
+
export {
|
|
160
|
+
AngularFirePerformance,
|
|
161
|
+
AngularFirePerformanceModule,
|
|
162
|
+
DATA_COLLECTION_ENABLED,
|
|
163
|
+
INSTRUMENTATION_ENABLED,
|
|
164
|
+
PerformanceMonitoringService,
|
|
165
|
+
trace,
|
|
166
|
+
traceUntil,
|
|
167
|
+
traceUntilComplete,
|
|
168
|
+
traceUntilFirst,
|
|
169
|
+
traceWhile
|
|
170
|
+
};
|
|
165
171
|
//# sourceMappingURL=angular-fire-compat-performance.mjs.map
|