@angular/fire 7.6.1 → 16.0.0-canary.e04cd7f
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/analytics/is-analytics-supported-factory.d.ts +4 -0
- package/auth-guard/auth-guard.d.ts +4 -4
- package/compat/auth/auth.d.ts +1 -1
- package/compat/auth-guard/auth-guard.d.ts +6 -4
- package/compat/database/interfaces.d.ts +12 -12
- package/compat/firestore/interfaces.d.ts +17 -17
- package/compat/proxy.d.ts +8 -8
- package/compat/remote-config/interfaces.d.ts +1 -1
- package/compat/storage/interfaces.d.ts +8 -8
- package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -1
- package/core.d.ts +1 -12
- package/esm2022/analytics/analytics.module.mjs +94 -0
- package/esm2022/analytics/is-analytics-supported-factory.mjs +16 -0
- package/esm2022/analytics/overrides.mjs +3 -0
- package/esm2022/analytics/screen-tracking.service.mjs +147 -0
- package/esm2022/analytics/user-tracking.service.mjs +44 -0
- package/esm2022/app/app.module.mjs +84 -0
- package/esm2022/app-check/app-check.module.mjs +80 -0
- package/{esm2015/auth/auth.module.js → esm2022/auth/auth.module.mjs} +8 -8
- package/esm2022/auth-guard/auth-guard.mjs +51 -0
- package/{esm2015/auth-guard/auth-guard.module.js → esm2022/auth-guard/auth-guard.module.mjs} +5 -5
- package/esm2022/compat/analytics/analytics.mjs +161 -0
- package/{esm2015/compat/analytics/analytics.module.js → esm2022/compat/analytics/analytics.module.mjs} +5 -5
- package/esm2022/compat/analytics/screen-tracking.service.mjs +49 -0
- package/esm2022/compat/analytics/user-tracking.service.mjs +53 -0
- package/esm2022/compat/auth/auth.mjs +161 -0
- package/{esm2015/compat/auth/auth.module.js → esm2022/compat/auth/auth.module.mjs} +5 -5
- package/{esm2015/compat/auth/public_api.js → esm2022/compat/auth/public_api.mjs} +1 -1
- package/esm2022/compat/auth-guard/auth-guard.mjs +51 -0
- package/{esm2015/compat/auth-guard/auth-guard.module.js → esm2022/compat/auth-guard/auth-guard.module.mjs} +5 -5
- package/{esm2015/compat/cache.js → esm2022/compat/cache.mjs} +3 -3
- package/esm2022/compat/database/database.mjs +119 -0
- package/{esm2015/compat/database/database.module.js → esm2022/compat/database/database.module.mjs} +5 -5
- package/esm2022/compat/database/list/create-reference.mjs +44 -0
- package/{esm2015/compat/firebase.app.module.js → esm2022/compat/firebase.app.module.mjs} +11 -11
- package/esm2022/compat/firestore/collection/changes.mjs +108 -0
- package/esm2022/compat/firestore/collection/collection.mjs +123 -0
- package/esm2022/compat/firestore/collection-group/collection-group.mjs +86 -0
- package/esm2022/compat/firestore/document/document.mjs +87 -0
- package/esm2022/compat/firestore/firestore.mjs +257 -0
- package/{esm2015/compat/firestore/firestore.module.js → esm2022/compat/firestore/firestore.module.mjs} +5 -5
- package/esm2022/compat/firestore/interfaces.mjs +2 -0
- package/esm2022/compat/firestore/observable/fromRef.mjs +40 -0
- package/esm2022/compat/functions/functions.mjs +69 -0
- package/{esm2015/compat/functions/functions.module.js → esm2022/compat/functions/functions.module.mjs} +5 -5
- package/{esm2015/compat/functions/public_api.js → esm2022/compat/functions/public_api.mjs} +1 -1
- package/esm2022/compat/messaging/messaging.mjs +80 -0
- package/{esm2015/compat/messaging/messaging.module.js → esm2022/compat/messaging/messaging.module.mjs} +5 -5
- package/{esm2015/compat/performance/performance.js → esm2022/compat/performance/performance.mjs} +7 -6
- package/{esm2015/compat/performance/performance.module.js → esm2022/compat/performance/performance.module.mjs} +5 -5
- package/esm2022/compat/performance/performance.service.mjs +27 -0
- package/esm2022/compat/proxy.mjs +59 -0
- package/esm2022/compat/remote-config/remote-config.mjs +207 -0
- package/{esm2015/compat/remote-config/remote-config.module.js → esm2022/compat/remote-config/remote-config.module.mjs} +5 -5
- package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +58 -0
- package/esm2022/compat/storage/storage.mjs +95 -0
- package/{esm2015/compat/storage/storage.module.js → esm2022/compat/storage/storage.module.mjs} +5 -5
- package/esm2022/core.mjs +37 -0
- package/{esm2015/database/database.module.js → esm2022/database/database.module.mjs} +8 -8
- package/{esm2015/firestore/firestore.module.js → esm2022/firestore/firestore.module.mjs} +8 -8
- package/{esm2015/firestore/lite/lite.module.js → esm2022/firestore/lite/lite.module.mjs} +8 -8
- package/esm2022/firestore/rxfire.mjs +15 -0
- package/{esm2015/functions/functions.module.js → esm2022/functions/functions.module.mjs} +8 -8
- package/esm2022/messaging/is-messaging-supported-factory.mjs +16 -0
- package/esm2022/messaging/messaging.module.mjs +86 -0
- package/esm2022/messaging/overrides.mjs +3 -0
- package/{esm2015/performance/performance.module.js → esm2022/performance/performance.module.mjs} +8 -8
- package/esm2022/remote-config/is-remote-config-supported-factory.mjs +16 -0
- package/esm2022/remote-config/overrides.mjs +3 -0
- package/esm2022/remote-config/remote-config.module.mjs +86 -0
- package/{esm2015/storage/storage.module.js → esm2022/storage/storage.module.mjs} +8 -8
- package/esm2022/zones.mjs +196 -0
- package/{fesm2015/angular-fire-analytics.js → fesm2022/angular-fire-analytics.mjs} +61 -38
- package/fesm2022/angular-fire-analytics.mjs.map +1 -0
- package/{fesm2015/angular-fire-app-check.js → fesm2022/angular-fire-app-check.mjs} +9 -10
- package/fesm2022/angular-fire-app-check.mjs.map +1 -0
- package/{fesm2015/angular-fire-app.js → fesm2022/angular-fire-app.mjs} +8 -8
- package/fesm2022/angular-fire-app.mjs.map +1 -0
- package/{fesm2015/angular-fire-auth-guard.js → fesm2022/angular-fire-auth-guard.mjs} +25 -23
- package/fesm2022/angular-fire-auth-guard.mjs.map +1 -0
- package/{fesm2015/angular-fire-auth.js → fesm2022/angular-fire-auth.mjs} +8 -8
- package/fesm2022/angular-fire-auth.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-analytics.js → fesm2022/angular-fire-compat-analytics.mjs} +28 -28
- package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-auth-guard.js → fesm2022/angular-fire-compat-auth-guard.mjs} +25 -23
- package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-auth.js → fesm2022/angular-fire-compat-auth.mjs} +32 -10
- package/fesm2022/angular-fire-compat-auth.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-database.js → fesm2022/angular-fire-compat-database.mjs} +17 -12
- package/fesm2022/angular-fire-compat-database.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-firestore.js → fesm2022/angular-fire-compat-firestore.mjs} +37 -16
- package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-functions.js → fesm2022/angular-fire-compat-functions.mjs} +10 -9
- package/fesm2022/angular-fire-compat-functions.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs} +20 -15
- package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-performance.js → fesm2022/angular-fire-compat-performance.mjs} +16 -15
- package/fesm2022/angular-fire-compat-performance.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-remote-config.js → fesm2022/angular-fire-compat-remote-config.mjs} +33 -19
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-storage.js → fesm2022/angular-fire-compat-storage.mjs} +23 -18
- package/fesm2022/angular-fire-compat-storage.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat.js → fesm2022/angular-fire-compat.mjs} +15 -17
- package/fesm2022/angular-fire-compat.mjs.map +1 -0
- package/{fesm2015/angular-fire-database.js → fesm2022/angular-fire-database.mjs} +8 -8
- package/fesm2022/angular-fire-database.mjs.map +1 -0
- package/{fesm2015/angular-fire-firestore-lite.js → fesm2022/angular-fire-firestore-lite.mjs} +8 -8
- package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -0
- package/{fesm2015/angular-fire-firestore.js → fesm2022/angular-fire-firestore.mjs} +12 -10
- package/fesm2022/angular-fire-firestore.mjs.map +1 -0
- package/{fesm2015/angular-fire-functions.js → fesm2022/angular-fire-functions.mjs} +8 -8
- package/fesm2022/angular-fire-functions.mjs.map +1 -0
- package/{fesm2015/angular-fire-messaging.js → fesm2022/angular-fire-messaging.mjs} +33 -19
- package/fesm2022/angular-fire-messaging.mjs.map +1 -0
- package/{fesm2015/angular-fire-performance.js → fesm2022/angular-fire-performance.mjs} +8 -8
- package/fesm2022/angular-fire-performance.mjs.map +1 -0
- package/{fesm2015/angular-fire-remote-config.js → fesm2022/angular-fire-remote-config.mjs} +34 -20
- package/fesm2022/angular-fire-remote-config.mjs.map +1 -0
- package/{fesm2015/angular-fire-storage.js → fesm2022/angular-fire-storage.mjs} +8 -8
- package/fesm2022/angular-fire-storage.mjs.map +1 -0
- package/{fesm2015/angular-fire.js → fesm2022/angular-fire.mjs} +23 -52
- package/fesm2022/angular-fire.mjs.map +1 -0
- package/firestore/rxfire.d.ts +3 -1
- package/messaging/is-messaging-supported-factory.d.ts +4 -0
- package/package.json +158 -7
- package/publish.sh +1 -0
- package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
- package/schematics/add/index.js +1 -1
- package/schematics/common.js +8 -4
- package/schematics/deploy/actions.js +59 -59
- package/schematics/deploy/builder.js +5 -5
- package/schematics/firebaseTools.js +9 -5
- package/schematics/setup/index.js +24 -23
- package/schematics/setup/prompts.js +20 -15
- package/schematics/update/v7/index.js +5 -5
- package/schematics/utils.js +30 -30
- package/README.md +0 -216
- package/analytics/package.json +0 -11
- package/app/package.json +0 -11
- package/app-check/package.json +0 -11
- package/auth/package.json +0 -11
- package/auth-guard/package.json +0 -11
- package/bundles/angular-fire-analytics.umd.js +0 -673
- package/bundles/angular-fire-analytics.umd.js.map +0 -1
- package/bundles/angular-fire-app-check.umd.js +0 -465
- package/bundles/angular-fire-app-check.umd.js.map +0 -1
- package/bundles/angular-fire-app.umd.js +0 -477
- package/bundles/angular-fire-app.umd.js.map +0 -1
- package/bundles/angular-fire-auth-guard.umd.js +0 -109
- package/bundles/angular-fire-auth-guard.umd.js.map +0 -1
- package/bundles/angular-fire-auth.umd.js +0 -557
- package/bundles/angular-fire-auth.umd.js.map +0 -1
- package/bundles/angular-fire-compat-analytics.umd.js +0 -672
- package/bundles/angular-fire-compat-analytics.umd.js.map +0 -1
- package/bundles/angular-fire-compat-auth-guard.umd.js +0 -112
- package/bundles/angular-fire-compat-auth-guard.umd.js.map +0 -1
- package/bundles/angular-fire-compat-auth.umd.js +0 -559
- package/bundles/angular-fire-compat-auth.umd.js.map +0 -1
- package/bundles/angular-fire-compat-database.umd.js +0 -799
- package/bundles/angular-fire-compat-database.umd.js.map +0 -1
- package/bundles/angular-fire-compat-firestore.umd.js +0 -1073
- package/bundles/angular-fire-compat-firestore.umd.js.map +0 -1
- package/bundles/angular-fire-compat-functions.umd.js +0 -443
- package/bundles/angular-fire-compat-functions.umd.js.map +0 -1
- package/bundles/angular-fire-compat-messaging.umd.js +0 -465
- package/bundles/angular-fire-compat-messaging.umd.js.map +0 -1
- package/bundles/angular-fire-compat-performance.umd.js +0 -212
- package/bundles/angular-fire-compat-performance.umd.js.map +0 -1
- package/bundles/angular-fire-compat-remote-config.umd.js +0 -605
- package/bundles/angular-fire-compat-remote-config.umd.js.map +0 -1
- package/bundles/angular-fire-compat-storage.umd.js +0 -598
- package/bundles/angular-fire-compat-storage.umd.js.map +0 -1
- package/bundles/angular-fire-compat.umd.js +0 -535
- package/bundles/angular-fire-compat.umd.js.map +0 -1
- package/bundles/angular-fire-database.umd.js +0 -557
- package/bundles/angular-fire-database.umd.js.map +0 -1
- package/bundles/angular-fire-firestore-lite.umd.js +0 -531
- package/bundles/angular-fire-firestore-lite.umd.js.map +0 -1
- package/bundles/angular-fire-firestore.umd.js +0 -565
- package/bundles/angular-fire-firestore.umd.js.map +0 -1
- package/bundles/angular-fire-functions.umd.js +0 -461
- package/bundles/angular-fire-functions.umd.js.map +0 -1
- package/bundles/angular-fire-messaging.umd.js +0 -473
- package/bundles/angular-fire-messaging.umd.js.map +0 -1
- package/bundles/angular-fire-performance.umd.js +0 -473
- package/bundles/angular-fire-performance.umd.js.map +0 -1
- package/bundles/angular-fire-remote-config.umd.js +0 -499
- package/bundles/angular-fire-remote-config.umd.js.map +0 -1
- package/bundles/angular-fire-storage.umd.js +0 -485
- package/bundles/angular-fire-storage.umd.js.map +0 -1
- package/bundles/angular-fire.umd.js +0 -308
- package/bundles/angular-fire.umd.js.map +0 -1
- package/compat/analytics/package.json +0 -11
- package/compat/auth/package.json +0 -11
- package/compat/auth-guard/package.json +0 -11
- package/compat/database/package.json +0 -11
- package/compat/firestore/package.json +0 -11
- package/compat/functions/package.json +0 -11
- package/compat/messaging/package.json +0 -11
- package/compat/package.json +0 -11
- package/compat/performance/package.json +0 -11
- package/compat/remote-config/package.json +0 -11
- package/compat/storage/package.json +0 -11
- package/database/package.json +0 -11
- package/docs/analytics.md +0 -67
- package/docs/app-check.md +0 -53
- package/docs/auth.md +0 -165
- package/docs/compat/analytics/getting-started.md +0 -137
- package/docs/compat/auth/getting-started.md +0 -162
- package/docs/compat/auth/router-guards.md +0 -104
- package/docs/compat/emulators/emulators.md +0 -134
- package/docs/compat/firestore/collections.md +0 -326
- package/docs/compat/firestore/documents.md +0 -115
- package/docs/compat/firestore/offline-data.md +0 -39
- package/docs/compat/firestore/querying-collections.md +0 -204
- package/docs/compat/functions/functions.md +0 -166
- package/docs/compat/messaging/messaging.md +0 -232
- package/docs/compat/performance/getting-started.md +0 -132
- package/docs/compat/remote-config/getting-started.md +0 -134
- package/docs/compat/rtdb/lists.md +0 -257
- package/docs/compat/rtdb/objects.md +0 -182
- package/docs/compat/rtdb/querying-lists.md +0 -155
- package/docs/compat/storage/storage.md +0 -257
- package/docs/compat.md +0 -70
- package/docs/database.md +0 -175
- package/docs/deploy/getting-started.md +0 -204
- package/docs/firebase.json +0 -16
- package/docs/firestore.md +0 -148
- package/docs/functions.md +0 -52
- package/docs/images/analytics-illo_1x.png +0 -0
- package/docs/images/auth-illo_1x.png +0 -0
- package/docs/images/cloud-messaging-illo_1x.png +0 -0
- package/docs/images/database-illo_1x.png +0 -0
- package/docs/images/firestore-illo_1x.png +0 -0
- package/docs/images/functions-illo_1x.png +0 -0
- package/docs/images/hosting-illo_1x.png +0 -0
- package/docs/images/performance-illo_1x.png +0 -0
- package/docs/images/reCAPTCHA-logo@1x.png +0 -0
- package/docs/images/remote-config-illo_1x.png +0 -0
- package/docs/images/storage-illo_1x.png +0 -0
- package/docs/install-and-setup.md +0 -114
- package/docs/install-angular-cli-windows10.md +0 -82
- package/docs/messaging.md +0 -25
- package/docs/performance.md +0 -57
- package/docs/remote-config.md +0 -53
- package/docs/storage.md +0 -90
- package/docs/universal/cloud-functions.md +0 -75
- package/docs/universal/getting-started.md +0 -153
- package/docs/universal/prerendering.md +0 -72
- package/docs/version-4-upgrade.md +0 -119
- package/docs/version-5-upgrade.md +0 -82
- package/docs/version-6-upgrade.md +0 -16
- package/docs/version-7-upgrade.md +0 -298
- package/esm2015/analytics/analytics.module.js +0 -93
- package/esm2015/analytics/overrides.js +0 -3
- package/esm2015/analytics/screen-tracking.service.js +0 -139
- package/esm2015/analytics/user-tracking.service.js +0 -43
- package/esm2015/app/app.module.js +0 -84
- package/esm2015/app-check/app-check.module.js +0 -81
- package/esm2015/auth-guard/auth-guard.js +0 -49
- package/esm2015/compat/analytics/analytics.js +0 -163
- package/esm2015/compat/analytics/screen-tracking.service.js +0 -49
- package/esm2015/compat/analytics/user-tracking.service.js +0 -52
- package/esm2015/compat/auth/auth.js +0 -139
- package/esm2015/compat/auth-guard/auth-guard.js +0 -49
- package/esm2015/compat/database/database.js +0 -117
- package/esm2015/compat/database/list/create-reference.js +0 -41
- package/esm2015/compat/firestore/collection/changes.js +0 -107
- package/esm2015/compat/firestore/collection/collection.js +0 -117
- package/esm2015/compat/firestore/collection-group/collection-group.js +0 -81
- package/esm2015/compat/firestore/document/document.js +0 -82
- package/esm2015/compat/firestore/firestore.js +0 -254
- package/esm2015/compat/firestore/interfaces.js +0 -2
- package/esm2015/compat/firestore/observable/fromRef.js +0 -39
- package/esm2015/compat/functions/functions.js +0 -68
- package/esm2015/compat/messaging/messaging.js +0 -75
- package/esm2015/compat/performance/performance.service.js +0 -27
- package/esm2015/compat/proxy.js +0 -61
- package/esm2015/compat/remote-config/remote-config.js +0 -193
- package/esm2015/compat/storage/pipes/storageUrl.pipe.js +0 -54
- package/esm2015/compat/storage/storage.js +0 -94
- package/esm2015/core.js +0 -79
- package/esm2015/firestore/rxfire.js +0 -13
- package/esm2015/messaging/messaging.module.js +0 -85
- package/esm2015/messaging/overrides.js +0 -3
- package/esm2015/remote-config/overrides.js +0 -3
- package/esm2015/remote-config/remote-config.module.js +0 -85
- package/esm2015/zones.js +0 -183
- package/fesm2015/angular-fire-analytics.js.map +0 -1
- package/fesm2015/angular-fire-app-check.js.map +0 -1
- package/fesm2015/angular-fire-app.js.map +0 -1
- package/fesm2015/angular-fire-auth-guard.js.map +0 -1
- package/fesm2015/angular-fire-auth.js.map +0 -1
- package/fesm2015/angular-fire-compat-analytics.js.map +0 -1
- package/fesm2015/angular-fire-compat-auth-guard.js.map +0 -1
- package/fesm2015/angular-fire-compat-auth.js.map +0 -1
- package/fesm2015/angular-fire-compat-database.js.map +0 -1
- package/fesm2015/angular-fire-compat-firestore.js.map +0 -1
- package/fesm2015/angular-fire-compat-functions.js.map +0 -1
- package/fesm2015/angular-fire-compat-messaging.js.map +0 -1
- package/fesm2015/angular-fire-compat-performance.js.map +0 -1
- package/fesm2015/angular-fire-compat-remote-config.js.map +0 -1
- package/fesm2015/angular-fire-compat-storage.js.map +0 -1
- package/fesm2015/angular-fire-compat.js.map +0 -1
- package/fesm2015/angular-fire-database.js.map +0 -1
- package/fesm2015/angular-fire-firestore-lite.js.map +0 -1
- package/fesm2015/angular-fire-firestore.js.map +0 -1
- package/fesm2015/angular-fire-functions.js.map +0 -1
- package/fesm2015/angular-fire-messaging.js.map +0 -1
- package/fesm2015/angular-fire-performance.js.map +0 -1
- package/fesm2015/angular-fire-remote-config.js.map +0 -1
- package/fesm2015/angular-fire-storage.js.map +0 -1
- package/fesm2015/angular-fire.js.map +0 -1
- package/firestore/lite/package.json +0 -11
- package/firestore/package.json +0 -11
- package/firestore-protos.js +0 -4
- package/functions/package.json +0 -11
- package/messaging/package.json +0 -11
- package/performance/package.json +0 -11
- package/remote-config/package.json +0 -11
- package/schematics/add/schema.json +0 -16
- package/schematics/builders.json +0 -10
- package/schematics/collection.json +0 -15
- package/schematics/deploy/schema.json +0 -119
- package/schematics/migration.json +0 -15
- package/schematics/setup/schema.json +0 -16
- package/storage/package.json +0 -11
- /package/analytics/{angular-fire-analytics.d.ts → index.d.ts} +0 -0
- /package/app/{angular-fire-app.d.ts → index.d.ts} +0 -0
- /package/app-check/{angular-fire-app-check.d.ts → index.d.ts} +0 -0
- /package/auth/{angular-fire-auth.d.ts → index.d.ts} +0 -0
- /package/auth-guard/{angular-fire-auth-guard.d.ts → index.d.ts} +0 -0
- /package/compat/analytics/{angular-fire-compat-analytics.d.ts → index.d.ts} +0 -0
- /package/compat/auth/{angular-fire-compat-auth.d.ts → index.d.ts} +0 -0
- /package/compat/auth-guard/{angular-fire-compat-auth-guard.d.ts → index.d.ts} +0 -0
- /package/compat/database/{angular-fire-compat-database.d.ts → index.d.ts} +0 -0
- /package/compat/firestore/{angular-fire-compat-firestore.d.ts → index.d.ts} +0 -0
- /package/compat/functions/{angular-fire-compat-functions.d.ts → index.d.ts} +0 -0
- /package/compat/{angular-fire-compat.d.ts → index.d.ts} +0 -0
- /package/compat/messaging/{angular-fire-compat-messaging.d.ts → index.d.ts} +0 -0
- /package/compat/performance/{angular-fire-compat-performance.d.ts → index.d.ts} +0 -0
- /package/compat/remote-config/{angular-fire-compat-remote-config.d.ts → index.d.ts} +0 -0
- /package/compat/storage/{angular-fire-compat-storage.d.ts → index.d.ts} +0 -0
- /package/database/{angular-fire-database.d.ts → index.d.ts} +0 -0
- /package/{esm2015/analytics/analytics.js → esm2022/analytics/analytics.mjs} +0 -0
- /package/{esm2015/analytics/angular-fire-analytics.js → esm2022/analytics/angular-fire-analytics.mjs} +0 -0
- /package/{esm2015/analytics/firebase.js → esm2022/analytics/firebase.mjs} +0 -0
- /package/{esm2015/analytics/public_api.js → esm2022/analytics/public_api.mjs} +0 -0
- /package/{esm2015/angular-fire.js → esm2022/angular-fire.mjs} +0 -0
- /package/{esm2015/app/angular-fire-app.js → esm2022/app/angular-fire-app.mjs} +0 -0
- /package/{esm2015/app/app.js → esm2022/app/app.mjs} +0 -0
- /package/{esm2015/app/firebase.js → esm2022/app/firebase.mjs} +0 -0
- /package/{esm2015/app/public_api.js → esm2022/app/public_api.mjs} +0 -0
- /package/{esm2015/app-check/angular-fire-app-check.js → esm2022/app-check/angular-fire-app-check.mjs} +0 -0
- /package/{esm2015/app-check/app-check.js → esm2022/app-check/app-check.mjs} +0 -0
- /package/{esm2015/app-check/firebase.js → esm2022/app-check/firebase.mjs} +0 -0
- /package/{esm2015/app-check/public_api.js → esm2022/app-check/public_api.mjs} +0 -0
- /package/{esm2015/auth/angular-fire-auth.js → esm2022/auth/angular-fire-auth.mjs} +0 -0
- /package/{esm2015/auth/auth.js → esm2022/auth/auth.mjs} +0 -0
- /package/{esm2015/auth/firebase.js → esm2022/auth/firebase.mjs} +0 -0
- /package/{esm2015/auth/public_api.js → esm2022/auth/public_api.mjs} +0 -0
- /package/{esm2015/auth/rxfire.js → esm2022/auth/rxfire.mjs} +0 -0
- /package/{esm2015/auth-guard/angular-fire-auth-guard.js → esm2022/auth-guard/angular-fire-auth-guard.mjs} +0 -0
- /package/{esm2015/auth-guard/public_api.js → esm2022/auth-guard/public_api.mjs} +0 -0
- /package/{esm2015/compat/analytics/angular-fire-compat-analytics.js → esm2022/compat/analytics/angular-fire-compat-analytics.mjs} +0 -0
- /package/{esm2015/compat/analytics/base.js → esm2022/compat/analytics/base.mjs} +0 -0
- /package/{esm2015/compat/analytics/public_api.js → esm2022/compat/analytics/public_api.mjs} +0 -0
- /package/{esm2015/compat/angular-fire-compat.js → esm2022/compat/angular-fire-compat.mjs} +0 -0
- /package/{esm2015/compat/auth/angular-fire-compat-auth.js → esm2022/compat/auth/angular-fire-compat-auth.mjs} +0 -0
- /package/{esm2015/compat/auth/base.js → esm2022/compat/auth/base.mjs} +0 -0
- /package/{esm2015/compat/auth-guard/angular-fire-compat-auth-guard.js → esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs} +0 -0
- /package/{esm2015/compat/auth-guard/public_api.js → esm2022/compat/auth-guard/public_api.mjs} +0 -0
- /package/{esm2015/compat/database/angular-fire-compat-database.js → esm2022/compat/database/angular-fire-compat-database.mjs} +0 -0
- /package/{esm2015/compat/database/interfaces.js → esm2022/compat/database/interfaces.mjs} +0 -0
- /package/{esm2015/compat/database/list/audit-trail.js → esm2022/compat/database/list/audit-trail.mjs} +0 -0
- /package/{esm2015/compat/database/list/changes.js → esm2022/compat/database/list/changes.mjs} +0 -0
- /package/{esm2015/compat/database/list/data-operation.js → esm2022/compat/database/list/data-operation.mjs} +0 -0
- /package/{esm2015/compat/database/list/remove.js → esm2022/compat/database/list/remove.mjs} +0 -0
- /package/{esm2015/compat/database/list/snapshot-changes.js → esm2022/compat/database/list/snapshot-changes.mjs} +0 -0
- /package/{esm2015/compat/database/list/state-changes.js → esm2022/compat/database/list/state-changes.mjs} +0 -0
- /package/{esm2015/compat/database/list/utils.js → esm2022/compat/database/list/utils.mjs} +0 -0
- /package/{esm2015/compat/database/object/create-reference.js → esm2022/compat/database/object/create-reference.mjs} +0 -0
- /package/{esm2015/compat/database/object/snapshot-changes.js → esm2022/compat/database/object/snapshot-changes.mjs} +0 -0
- /package/{esm2015/compat/database/observable/fromRef.js → esm2022/compat/database/observable/fromRef.mjs} +0 -0
- /package/{esm2015/compat/database/public_api.js → esm2022/compat/database/public_api.mjs} +0 -0
- /package/{esm2015/compat/database/utils.js → esm2022/compat/database/utils.mjs} +0 -0
- /package/{esm2015/compat/firebase.app.js → esm2022/compat/firebase.app.mjs} +0 -0
- /package/{esm2015/compat/firestore/angular-fire-compat-firestore.js → esm2022/compat/firestore/angular-fire-compat-firestore.mjs} +0 -0
- /package/{esm2015/compat/firestore/public_api.js → esm2022/compat/firestore/public_api.mjs} +0 -0
- /package/{esm2015/compat/functions/angular-fire-compat-functions.js → esm2022/compat/functions/angular-fire-compat-functions.mjs} +0 -0
- /package/{esm2015/compat/functions/base.js → esm2022/compat/functions/base.mjs} +0 -0
- /package/{esm2015/compat/messaging/angular-fire-compat-messaging.js → esm2022/compat/messaging/angular-fire-compat-messaging.mjs} +0 -0
- /package/{esm2015/compat/messaging/base.js → esm2022/compat/messaging/base.mjs} +0 -0
- /package/{esm2015/compat/messaging/public_api.js → esm2022/compat/messaging/public_api.mjs} +0 -0
- /package/{esm2015/compat/performance/angular-fire-compat-performance.js → esm2022/compat/performance/angular-fire-compat-performance.mjs} +0 -0
- /package/{esm2015/compat/performance/base.js → esm2022/compat/performance/base.mjs} +0 -0
- /package/{esm2015/compat/performance/public_api.js → esm2022/compat/performance/public_api.mjs} +0 -0
- /package/{esm2015/compat/public_api.js → esm2022/compat/public_api.mjs} +0 -0
- /package/{esm2015/compat/remote-config/angular-fire-compat-remote-config.js → esm2022/compat/remote-config/angular-fire-compat-remote-config.mjs} +0 -0
- /package/{esm2015/compat/remote-config/base.js → esm2022/compat/remote-config/base.mjs} +0 -0
- /package/{esm2015/compat/remote-config/interfaces.js → esm2022/compat/remote-config/interfaces.mjs} +0 -0
- /package/{esm2015/compat/remote-config/public_api.js → esm2022/compat/remote-config/public_api.mjs} +0 -0
- /package/{esm2015/compat/storage/angular-fire-compat-storage.js → esm2022/compat/storage/angular-fire-compat-storage.mjs} +0 -0
- /package/{esm2015/compat/storage/interfaces.js → esm2022/compat/storage/interfaces.mjs} +0 -0
- /package/{esm2015/compat/storage/observable/fromTask.js → esm2022/compat/storage/observable/fromTask.mjs} +0 -0
- /package/{esm2015/compat/storage/public_api.js → esm2022/compat/storage/public_api.mjs} +0 -0
- /package/{esm2015/compat/storage/ref.js → esm2022/compat/storage/ref.mjs} +0 -0
- /package/{esm2015/compat/storage/task.js → esm2022/compat/storage/task.mjs} +0 -0
- /package/{esm2015/database/angular-fire-database.js → esm2022/database/angular-fire-database.mjs} +0 -0
- /package/{esm2015/database/database.js → esm2022/database/database.mjs} +0 -0
- /package/{esm2015/database/firebase.js → esm2022/database/firebase.mjs} +0 -0
- /package/{esm2015/database/public_api.js → esm2022/database/public_api.mjs} +0 -0
- /package/{esm2015/database/rxfire.js → esm2022/database/rxfire.mjs} +0 -0
- /package/{esm2015/firestore/angular-fire-firestore.js → esm2022/firestore/angular-fire-firestore.mjs} +0 -0
- /package/{esm2015/firestore/firebase.js → esm2022/firestore/firebase.mjs} +0 -0
- /package/{esm2015/firestore/firestore.js → esm2022/firestore/firestore.mjs} +0 -0
- /package/{esm2015/firestore/lite/angular-fire-firestore-lite.js → esm2022/firestore/lite/angular-fire-firestore-lite.mjs} +0 -0
- /package/{esm2015/firestore/lite/firebase.js → esm2022/firestore/lite/firebase.mjs} +0 -0
- /package/{esm2015/firestore/lite/lite.js → esm2022/firestore/lite/lite.mjs} +0 -0
- /package/{esm2015/firestore/lite/public_api.js → esm2022/firestore/lite/public_api.mjs} +0 -0
- /package/{esm2015/firestore/lite/rxfire.js → esm2022/firestore/lite/rxfire.mjs} +0 -0
- /package/{esm2015/firestore/public_api.js → esm2022/firestore/public_api.mjs} +0 -0
- /package/{esm2015/functions/angular-fire-functions.js → esm2022/functions/angular-fire-functions.mjs} +0 -0
- /package/{esm2015/functions/firebase.js → esm2022/functions/firebase.mjs} +0 -0
- /package/{esm2015/functions/functions.js → esm2022/functions/functions.mjs} +0 -0
- /package/{esm2015/functions/public_api.js → esm2022/functions/public_api.mjs} +0 -0
- /package/{esm2015/functions/rxfire.js → esm2022/functions/rxfire.mjs} +0 -0
- /package/{esm2015/messaging/angular-fire-messaging.js → esm2022/messaging/angular-fire-messaging.mjs} +0 -0
- /package/{esm2015/messaging/firebase.js → esm2022/messaging/firebase.mjs} +0 -0
- /package/{esm2015/messaging/messaging.js → esm2022/messaging/messaging.mjs} +0 -0
- /package/{esm2015/messaging/public_api.js → esm2022/messaging/public_api.mjs} +0 -0
- /package/{esm2015/performance/angular-fire-performance.js → esm2022/performance/angular-fire-performance.mjs} +0 -0
- /package/{esm2015/performance/firebase.js → esm2022/performance/firebase.mjs} +0 -0
- /package/{esm2015/performance/performance.js → esm2022/performance/performance.mjs} +0 -0
- /package/{esm2015/performance/public_api.js → esm2022/performance/public_api.mjs} +0 -0
- /package/{esm2015/performance/rxfire.js → esm2022/performance/rxfire.mjs} +0 -0
- /package/{esm2015/public_api.js → esm2022/public_api.mjs} +0 -0
- /package/{esm2015/remote-config/angular-fire-remote-config.js → esm2022/remote-config/angular-fire-remote-config.mjs} +0 -0
- /package/{esm2015/remote-config/firebase.js → esm2022/remote-config/firebase.mjs} +0 -0
- /package/{esm2015/remote-config/public_api.js → esm2022/remote-config/public_api.mjs} +0 -0
- /package/{esm2015/remote-config/remote-config.js → esm2022/remote-config/remote-config.mjs} +0 -0
- /package/{esm2015/remote-config/rxfire.js → esm2022/remote-config/rxfire.mjs} +0 -0
- /package/{esm2015/storage/angular-fire-storage.js → esm2022/storage/angular-fire-storage.mjs} +0 -0
- /package/{esm2015/storage/firebase.js → esm2022/storage/firebase.mjs} +0 -0
- /package/{esm2015/storage/public_api.js → esm2022/storage/public_api.mjs} +0 -0
- /package/{esm2015/storage/rxfire.js → esm2022/storage/rxfire.mjs} +0 -0
- /package/{esm2015/storage/storage.js → esm2022/storage/storage.mjs} +0 -0
- /package/firestore/{angular-fire-firestore.d.ts → index.d.ts} +0 -0
- /package/firestore/lite/{angular-fire-firestore-lite.d.ts → index.d.ts} +0 -0
- /package/functions/{angular-fire-functions.d.ts → index.d.ts} +0 -0
- /package/{angular-fire.d.ts → index.d.ts} +0 -0
- /package/messaging/{angular-fire-messaging.d.ts → index.d.ts} +0 -0
- /package/performance/{angular-fire-performance.d.ts → index.d.ts} +0 -0
- /package/remote-config/{angular-fire-remote-config.d.ts → index.d.ts} +0 -0
- /package/storage/{angular-fire-storage.d.ts → index.d.ts} +0 -0
package/{fesm2015/angular-fire-compat-firestore.js → fesm2022/angular-fire-compat-firestore.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Observable, asyncScheduler, from, of } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/fire';
|
|
5
5
|
import { keepUnstableUntilFirst, VERSION } from '@angular/fire';
|
|
6
6
|
import { startWith, pairwise, map, scan, distinctUntilChanged, filter } from 'rxjs/operators';
|
|
@@ -36,11 +36,12 @@ function fromRef(ref, scheduler) {
|
|
|
36
36
|
}
|
|
37
37
|
function fromDocRef(ref, scheduler) {
|
|
38
38
|
return fromRef(ref, scheduler)
|
|
39
|
-
.pipe(startWith(undefined), pairwise(), map((
|
|
39
|
+
.pipe(startWith(undefined), pairwise(), map((snapshots) => {
|
|
40
|
+
const [priorPayload, payload] = snapshots;
|
|
40
41
|
if (!payload.exists) {
|
|
41
42
|
return { payload, type: 'removed' };
|
|
42
43
|
}
|
|
43
|
-
if (!
|
|
44
|
+
if (!priorPayload?.exists) {
|
|
44
45
|
return { payload, type: 'added' };
|
|
45
46
|
}
|
|
46
47
|
return { payload, type: 'modified' };
|
|
@@ -56,7 +57,8 @@ function fromCollectionRef(ref, scheduler) {
|
|
|
56
57
|
*/
|
|
57
58
|
function docChanges(query, scheduler) {
|
|
58
59
|
return fromCollectionRef(query, scheduler)
|
|
59
|
-
.pipe(startWith(undefined), pairwise(), map((
|
|
60
|
+
.pipe(startWith(undefined), pairwise(), map((actionTuple) => {
|
|
61
|
+
const [priorAction, action] = actionTuple;
|
|
60
62
|
const docChanges = action.payload.docChanges();
|
|
61
63
|
const actions = docChanges.map(change => ({ type: change.type, payload: change }));
|
|
62
64
|
// the metadata has changed from the prior emission
|
|
@@ -64,7 +66,7 @@ function docChanges(query, scheduler) {
|
|
|
64
66
|
// go through all the docs in payload and figure out which ones changed
|
|
65
67
|
action.payload.docs.forEach((currentDoc, currentIndex) => {
|
|
66
68
|
const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));
|
|
67
|
-
const priorDoc = priorAction
|
|
69
|
+
const priorDoc = priorAction?.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));
|
|
68
70
|
if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) ||
|
|
69
71
|
!docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {
|
|
70
72
|
// document doesn't appear to have changed, don't log another action
|
|
@@ -185,6 +187,9 @@ function validateEventsArray(events) {
|
|
|
185
187
|
* fakeStock.valueChanges().subscribe(value => console.log(value));
|
|
186
188
|
*/
|
|
187
189
|
class AngularFirestoreCollection {
|
|
190
|
+
ref;
|
|
191
|
+
query;
|
|
192
|
+
afs;
|
|
188
193
|
/**
|
|
189
194
|
* The constructor takes in a CollectionReference and Query to provide wrapper methods
|
|
190
195
|
* for data operations and data streaming.
|
|
@@ -234,7 +239,10 @@ class AngularFirestoreCollection {
|
|
|
234
239
|
return fromCollectionRef(this.query, this.afs.schedulers.outsideAngular)
|
|
235
240
|
.pipe(map(actions => actions.payload.docs.map(a => {
|
|
236
241
|
if (options.idField) {
|
|
237
|
-
return
|
|
242
|
+
return {
|
|
243
|
+
...a.data(),
|
|
244
|
+
...{ [options.idField]: a.id }
|
|
245
|
+
};
|
|
238
246
|
}
|
|
239
247
|
else {
|
|
240
248
|
return a.data();
|
|
@@ -289,6 +297,8 @@ class AngularFirestoreCollection {
|
|
|
289
297
|
* Observable.from(fakeStock).subscribe(value => console.log(value));
|
|
290
298
|
*/
|
|
291
299
|
class AngularFirestoreDocument {
|
|
300
|
+
ref;
|
|
301
|
+
afs;
|
|
292
302
|
/**
|
|
293
303
|
* The constructor takes in a DocumentReference to provide wrapper methods
|
|
294
304
|
* for data operations, data streaming, and Symbol.observable.
|
|
@@ -332,7 +342,10 @@ class AngularFirestoreDocument {
|
|
|
332
342
|
return scheduledFromDocRef$.pipe(keepUnstableUntilFirst);
|
|
333
343
|
}
|
|
334
344
|
valueChanges(options = {}) {
|
|
335
|
-
return this.snapshotChanges().pipe(map(({ payload }) => options.idField ?
|
|
345
|
+
return this.snapshotChanges().pipe(map(({ payload }) => options.idField ? {
|
|
346
|
+
...payload.data(),
|
|
347
|
+
...{ [options.idField]: payload.id }
|
|
348
|
+
} : payload.data()));
|
|
336
349
|
}
|
|
337
350
|
/**
|
|
338
351
|
* Retrieve the document once.
|
|
@@ -361,6 +374,8 @@ class AngularFirestoreDocument {
|
|
|
361
374
|
* fakeStock.valueChanges().subscribe(value => console.log(value));
|
|
362
375
|
*/
|
|
363
376
|
class AngularFirestoreCollectionGroup {
|
|
377
|
+
query;
|
|
378
|
+
afs;
|
|
364
379
|
/**
|
|
365
380
|
* The constructor takes in a CollectionGroupQuery to provide wrapper methods
|
|
366
381
|
* for data operations and data streaming.
|
|
@@ -402,7 +417,10 @@ class AngularFirestoreCollectionGroup {
|
|
|
402
417
|
return fromCollectionRefScheduled$
|
|
403
418
|
.pipe(map(actions => actions.payload.docs.map(a => {
|
|
404
419
|
if (options.idField) {
|
|
405
|
-
return
|
|
420
|
+
return {
|
|
421
|
+
[options.idField]: a.id,
|
|
422
|
+
...a.data()
|
|
423
|
+
};
|
|
406
424
|
}
|
|
407
425
|
else {
|
|
408
426
|
return a.data();
|
|
@@ -497,6 +515,9 @@ function associateQuery(collectionRef, queryFn = ref => ref) {
|
|
|
497
515
|
* }
|
|
498
516
|
*/
|
|
499
517
|
class AngularFirestore {
|
|
518
|
+
schedulers;
|
|
519
|
+
firestore;
|
|
520
|
+
persistenceEnabled$;
|
|
500
521
|
/**
|
|
501
522
|
* Each Feature of AngularFire has a FirebaseApp injected. This way we
|
|
502
523
|
* don't rely on the main Firebase App instance and we can create named
|
|
@@ -580,10 +601,10 @@ class AngularFirestore {
|
|
|
580
601
|
createId() {
|
|
581
602
|
return this.firestore.collection('_').doc().id;
|
|
582
603
|
}
|
|
604
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirestore, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: ENABLE_PERSISTENCE, optional: true }, { token: SETTINGS, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: PERSISTENCE_SETTINGS, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AngularFireAuth, optional: true }, { token: USE_EMULATOR$1, optional: true }, { token: SETTINGS$1, optional: true }, { token: TENANT_ID, optional: true }, { token: LANGUAGE_CODE, optional: true }, { token: USE_DEVICE_LANGUAGE, optional: true }, { token: PERSISTENCE, optional: true }, { token: i3.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
605
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirestore, providedIn: 'any' });
|
|
583
606
|
}
|
|
584
|
-
|
|
585
|
-
AngularFirestore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestore, providedIn: 'any' });
|
|
586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestore, decorators: [{
|
|
607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirestore, decorators: [{
|
|
587
608
|
type: Injectable,
|
|
588
609
|
args: [{
|
|
589
610
|
providedIn: 'any'
|
|
@@ -671,11 +692,11 @@ class AngularFirestoreModule {
|
|
|
671
692
|
]
|
|
672
693
|
};
|
|
673
694
|
}
|
|
695
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
696
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: AngularFirestoreModule });
|
|
697
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirestoreModule, providers: [AngularFirestore] });
|
|
674
698
|
}
|
|
675
|
-
|
|
676
|
-
AngularFirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestoreModule });
|
|
677
|
-
AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestoreModule, providers: [AngularFirestore] });
|
|
678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
679
700
|
type: NgModule,
|
|
680
701
|
args: [{
|
|
681
702
|
providers: [AngularFirestore]
|
|
@@ -687,4 +708,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
687
708
|
*/
|
|
688
709
|
|
|
689
710
|
export { AngularFirestore, AngularFirestoreCollection, AngularFirestoreCollectionGroup, AngularFirestoreDocument, AngularFirestoreModule, ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS, SETTINGS, USE_EMULATOR, associateQuery, combineChange, combineChanges, docChanges, fromCollectionRef, fromDocRef, fromRef, sortedChanges, validateEventsArray };
|
|
690
|
-
//# sourceMappingURL=angular-fire-compat-firestore.
|
|
711
|
+
//# sourceMappingURL=angular-fire-compat-firestore.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-fire-compat-firestore.mjs","sources":["../../../src/compat/firestore/observable/fromRef.ts","../../../src/compat/firestore/collection/changes.ts","../../../src/compat/firestore/collection/collection.ts","../../../src/compat/firestore/document/document.ts","../../../src/compat/firestore/collection-group/collection-group.ts","../../../src/compat/firestore/firestore.ts","../../../src/compat/firestore/firestore.module.ts","../../../src/compat/firestore/angular-fire-compat-firestore.ts"],"sourcesContent":["import { asyncScheduler, Observable, SchedulerLike } from 'rxjs';\nimport { Action, DocumentReference, DocumentSnapshot, Query, QuerySnapshot, Reference } from '../interfaces';\nimport { map, pairwise, startWith } from 'rxjs/operators';\n\nfunction _fromRef<T, R>(ref: Reference<T>, scheduler: SchedulerLike = asyncScheduler): Observable<R> {\n return new Observable(subscriber => {\n let unsubscribe: () => void;\n if (scheduler != null) {\n scheduler.schedule(() => {\n unsubscribe = ref.onSnapshot({ includeMetadataChanges: true }, subscriber);\n });\n } else {\n unsubscribe = ref.onSnapshot({ includeMetadataChanges: true }, subscriber);\n }\n\n return () => {\n if (unsubscribe != null) {\n unsubscribe();\n }\n };\n });\n}\n\nexport function fromRef<R, T>(ref: DocumentReference<T> | Query<T>, scheduler?: SchedulerLike) {\n return _fromRef<typeof ref, R>(ref, scheduler);\n}\n\nexport function fromDocRef<T>(ref: DocumentReference<T>, scheduler?: SchedulerLike): Observable<Action<DocumentSnapshot<T>>> {\n return fromRef<DocumentSnapshot<T>, T>(ref, scheduler)\n .pipe(\n startWith<DocumentSnapshot<T>, undefined>(undefined),\n pairwise(),\n map((snapshots: [DocumentSnapshot<T>, DocumentSnapshot<T>]) => {\n const [priorPayload, payload] = snapshots;\n if (!payload.exists) {\n return { payload, type: 'removed' };\n }\n if (!priorPayload?.exists) {\n return { payload, type: 'added' };\n }\n return { payload, type: 'modified' };\n })\n );\n}\n\nexport function fromCollectionRef<T>(ref: Query<T>, scheduler?: SchedulerLike): Observable<Action<QuerySnapshot<T>>> {\n return fromRef<QuerySnapshot<T>, T>(ref, scheduler).pipe(map(payload => ({ payload, type: 'query' })));\n}\n","import { fromCollectionRef } from '../observable/fromRef';\nimport { Observable, SchedulerLike } from 'rxjs';\nimport { distinctUntilChanged, map, pairwise, scan, startWith } from 'rxjs/operators';\nimport { Action, QuerySnapshot, DocumentChange, DocumentChangeAction, DocumentChangeType, Query } from '../interfaces';\nimport firebase from 'firebase/compat/app';\n\n\ntype ActionTupe = [Action<QuerySnapshot<firebase.firestore.DocumentData>>, Action<QuerySnapshot<firebase.firestore.DocumentData>>]\n/**\n * Return a stream of document changes on a query. These results are not in sort order but in\n * order of occurence.\n */\nexport function docChanges<T>(query: Query, scheduler?: SchedulerLike): Observable<DocumentChangeAction<T>[]> {\n return fromCollectionRef(query, scheduler)\n .pipe(\n startWith<Action<QuerySnapshot<firebase.firestore.DocumentData>>, undefined>(undefined),\n pairwise(),\n map((actionTuple: ActionTupe) => {\n const [priorAction, action] = actionTuple;\n const docChanges = action.payload.docChanges();\n const actions = docChanges.map(change => ({ type: change.type, payload: change }));\n // the metadata has changed from the prior emission\n if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {\n // go through all the docs in payload and figure out which ones changed\n action.payload.docs.forEach((currentDoc, currentIndex) => {\n const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));\n const priorDoc = priorAction?.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));\n if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) ||\n !docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {\n // document doesn't appear to have changed, don't log another action\n } else {\n // since the actions are processed in order just push onto the array\n actions.push({\n type: 'modified',\n payload: {\n oldIndex: currentIndex,\n newIndex: currentIndex,\n type: 'modified',\n doc: currentDoc\n }\n });\n }\n });\n }\n return actions as DocumentChangeAction<T>[];\n }),\n );\n}\n\n/**\n * Return a stream of document changes on a query. These results are in sort order.\n */\nexport function sortedChanges<T>(\n query: Query,\n events: DocumentChangeType[],\n scheduler?: SchedulerLike): Observable<DocumentChangeAction<T>[]> {\n return docChanges<T>(query, scheduler)\n .pipe(\n scan((current, changes) => combineChanges<T>(current, changes.map(it => it.payload), events), []),\n distinctUntilChanged(), // cut down on unneed change cycles\n map(changes => changes.map(c => ({ type: c.type, payload: c } as DocumentChangeAction<T>))));\n}\n\n/**\n * Combines the total result set from the current set of changes from an incoming set\n * of changes.\n */\nexport function combineChanges<T>(current: DocumentChange<T>[], changes: DocumentChange<T>[], events: DocumentChangeType[]) {\n changes.forEach(change => {\n // skip unwanted change types\n if (events.indexOf(change.type) > -1) {\n current = combineChange(current, change);\n }\n });\n return current;\n}\n\n/**\n * Splice arguments on top of a sliced array, to break top-level ===\n * this is useful for change-detection\n */\nfunction sliceAndSplice<T>(\n original: T[],\n start: number,\n deleteCount: number,\n ...args: T[]\n): T[] {\n const returnArray = original.slice();\n returnArray.splice(start, deleteCount, ...args);\n return returnArray;\n}\n\n/**\n * Creates a new sorted array from a new change.\n * Build our own because we allow filtering of action types ('added', 'removed', 'modified') before scanning\n * and so we have greater control over change detection (by breaking ===)\n */\nexport function combineChange<T>(combined: DocumentChange<T>[], change: DocumentChange<T>): DocumentChange<T>[] {\n switch (change.type) {\n case 'added':\n if (combined[change.newIndex] && combined[change.newIndex].doc.ref.isEqual(change.doc.ref)) {\n // Not sure why the duplicates are getting fired\n } else {\n return sliceAndSplice(combined, change.newIndex, 0, change);\n }\n break;\n case 'modified':\n if (combined[change.oldIndex] == null || combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n // When an item changes position we first remove it\n // and then add it's new position\n if (change.oldIndex !== change.newIndex) {\n const copiedArray = combined.slice();\n copiedArray.splice(change.oldIndex, 1);\n copiedArray.splice(change.newIndex, 0, change);\n return copiedArray;\n } else {\n return sliceAndSplice(combined, change.newIndex, 1, change);\n }\n }\n break;\n case 'removed':\n if (combined[change.oldIndex] && combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n return sliceAndSplice(combined, change.oldIndex, 1);\n }\n break;\n }\n return combined;\n}\n","import { from, Observable } from 'rxjs';\nimport { filter, map, pairwise, scan, startWith } from 'rxjs/operators';\nimport firebase from 'firebase/compat/app';\nimport { keepUnstableUntilFirst } from '@angular/fire';\n\nimport { CollectionReference, DocumentChangeAction, DocumentChangeType, DocumentData, DocumentReference, Query } from '../interfaces';\nimport { docChanges, sortedChanges } from './changes';\nimport { AngularFirestoreDocument } from '../document/document';\nimport { fromCollectionRef } from '../observable/fromRef';\nimport { AngularFirestore } from '../firestore';\n\ntype DocumentChangeTuple<T> = [DocumentChangeAction<T>[], DocumentChangeAction<T>[]];\n\nexport function validateEventsArray(events?: DocumentChangeType[]) {\n if (!events || events.length === 0) {\n events = ['added', 'removed', 'modified'];\n }\n return events;\n}\n\n/**\n * AngularFirestoreCollection service\n *\n * This class creates a reference to a Firestore Collection. A reference and a query are provided in\n * in the constructor. The query can be the unqueried reference if no query is desired.The class\n * is generic which gives you type safety for data update methods and data streaming.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const collectionRef = firebase.firestore.collection('stocks');\n * const query = collectionRef.where('price', '>', '0.01');\n * const fakeStock = new AngularFirestoreCollection<Stock>(collectionRef, query);\n *\n * // NOTE!: the updates are performed on the reference not the query\n * await fakeStock.add({ name: 'FAKE', price: 0.01 });\n *\n * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.\n * fakeStock.valueChanges().subscribe(value => console.log(value));\n */\nexport class AngularFirestoreCollection<T = DocumentData> {\n /**\n * The constructor takes in a CollectionReference and Query to provide wrapper methods\n * for data operations and data streaming.\n *\n * Note: Data operation methods are done on the reference not the query. This means\n * when you update data it is not updating data to the window of your query unless\n * the data fits the criteria of the query. See the AssociatedRefence type for details\n * on this implication.\n */\n constructor(\n public readonly ref: CollectionReference<T>,\n private readonly query: Query<T>,\n private readonly afs: AngularFirestore) { }\n\n /**\n * Listen to the latest change in the stream. This method returns changes\n * as they occur and they are not sorted by query order. This allows you to construct\n * your own data structure.\n */\n stateChanges(events?: DocumentChangeType[]): Observable<DocumentChangeAction<T>[]> {\n let source = docChanges<T>(this.query, this.afs.schedulers.outsideAngular);\n if (events && events.length > 0) {\n source = source.pipe(\n map(actions => actions.filter(change => events.indexOf(change.type) > -1))\n );\n }\n return source.pipe(\n // We want to filter out empty arrays, but always emit at first, so the developer knows\n // that the collection has been resolve; even if it's empty\n startWith<DocumentChangeAction<T>[], undefined>(undefined),\n pairwise(),\n filter(([prior, current]: DocumentChangeTuple<T>) => current.length > 0 || !prior),\n map(([prior, current]) => current),\n keepUnstableUntilFirst\n );\n }\n\n /**\n * Create a stream of changes as they occur it time. This method is similar to stateChanges()\n * but it collects each event in an array over time.\n */\n auditTrail(events?: DocumentChangeType[]): Observable<DocumentChangeAction<T>[]> {\n return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));\n }\n\n /**\n * Create a stream of synchronized changes. This method keeps the local array in sorted\n * query order.\n */\n snapshotChanges(events?: DocumentChangeType[]): Observable<DocumentChangeAction<T>[]> {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges<T>(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(\n keepUnstableUntilFirst\n );\n }\n\n /**\n * Listen to all documents in the collection and its possible query as an Observable.\n *\n * If the `idField` option is provided, document IDs are included and mapped to the\n * provided `idField` property name.\n */\n valueChanges(): Observable<T[]>;\n // tslint:disable-next-line:unified-signatures\n valueChanges({}): Observable<T[]>;\n valueChanges<K extends string>(options: {idField: K}): Observable<(T & { [T in K]: string })[]>;\n valueChanges<K extends string>(options: {idField?: K} = {}): Observable<T[]> {\n return fromCollectionRef<T>(this.query, this.afs.schedulers.outsideAngular)\n .pipe(\n map(actions => actions.payload.docs.map(a => {\n if (options.idField) {\n return {\n ...a.data() as {},\n ...{ [options.idField]: a.id }\n } as T & { [T in K]: string };\n } else {\n return a.data();\n }\n })),\n keepUnstableUntilFirst\n );\n }\n\n /**\n * Retrieve the results of the query once.\n */\n get(options?: firebase.firestore.GetOptions) {\n return from(this.query.get(options)).pipe(\n keepUnstableUntilFirst,\n );\n }\n\n /**\n * Add data to a collection reference.\n *\n * Note: Data operation methods are done on the reference not the query. This means\n * when you update data it is not updating data to the window of your query unless\n * the data fits the criteria of the query.\n */\n add(data: T): Promise<DocumentReference<T>> {\n return this.ref.add(data);\n }\n\n /**\n * Create a reference to a single document in a collection.\n */\n doc<T2 = T>(path?: string): AngularFirestoreDocument<T2> {\n // TODO is there a better way to solve this type issue\n return new AngularFirestoreDocument(this.ref.doc(path) as any, this.afs);\n }\n}\n","import { from, Observable } from 'rxjs';\nimport { keepUnstableUntilFirst } from '@angular/fire';\nimport { Action, DocumentData, DocumentReference, DocumentSnapshot, QueryFn, SetOptions } from '../interfaces';\nimport { fromDocRef } from '../observable/fromRef';\nimport { map } from 'rxjs/operators';\nimport { AngularFirestore, associateQuery } from '../firestore';\nimport { AngularFirestoreCollection } from '../collection/collection';\nimport firebase from 'firebase/compat/app';\n\n/**\n * AngularFirestoreDocument service\n *\n * This class creates a reference to a Firestore Document. A reference is provided in\n * in the constructor. The class is generic which gives you type safety for data update\n * methods and data streaming.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const fakeStock = new AngularFirestoreDocument<Stock>(doc('stocks/FAKE'));\n * await fakeStock.set({ name: 'FAKE', price: 0.01 });\n * fakeStock.valueChanges().map(snap => {\n * if(snap.exists) return snap.data();\n * return null;\n * }).subscribe(value => console.log(value));\n * // OR! Transform using Observable.from() and the data is unwrapped for you\n * Observable.from(fakeStock).subscribe(value => console.log(value));\n */\nexport class AngularFirestoreDocument<T = DocumentData> {\n\n /**\n * The constructor takes in a DocumentReference to provide wrapper methods\n * for data operations, data streaming, and Symbol.observable.\n */\n constructor(public ref: DocumentReference<T>, private afs: AngularFirestore) { }\n\n /**\n * Create or overwrite a single document.\n */\n set(data: T, options?: SetOptions): Promise<void> {\n return this.ref.set(data, options);\n }\n\n /**\n * Update some fields of a document without overwriting the entire document.\n */\n update(data: Partial<T>): Promise<void> {\n return this.ref.update(data);\n }\n\n /**\n * Delete a document.\n */\n delete(): Promise<void> {\n return this.ref.delete();\n }\n\n /**\n * Create a reference to a sub-collection given a path and an optional query\n * function.\n */\n collection<R = DocumentData>(path: string, queryFn?: QueryFn): AngularFirestoreCollection<R> {\n const collectionRef = this.ref.collection(path) as firebase.firestore.CollectionReference<R>;\n const { ref, query } = associateQuery(collectionRef, queryFn);\n return new AngularFirestoreCollection(ref, query, this.afs);\n }\n\n /**\n * Listen to snapshot updates from the document.\n */\n snapshotChanges(): Observable<Action<DocumentSnapshot<T>>> {\n const scheduledFromDocRef$ = fromDocRef<T>(this.ref, this.afs.schedulers.outsideAngular);\n return scheduledFromDocRef$.pipe(\n keepUnstableUntilFirst\n );\n }\n\n /**\n * Listen to unwrapped snapshot updates from the document.\n *\n * If the `idField` option is provided, document IDs are included and mapped to the\n * provided `idField` property name.\n */\n valueChanges(options?: { }): Observable<T | undefined>;\n valueChanges<K extends string>(options: { idField: K }): Observable<(T & { [T in K]: string }) | undefined>;\n valueChanges<K extends string>(options: { idField?: K } = {}): Observable<T | undefined> {\n return this.snapshotChanges().pipe(\n map(({ payload }) =>\n options.idField ? {\n ...payload.data(),\n ...{ [options.idField]: payload.id }\n } as T & { [T in K]: string } : payload.data()\n )\n );\n }\n\n /**\n * Retrieve the document once.\n */\n get(options?: firebase.firestore.GetOptions) {\n return from(this.ref.get(options)).pipe(\n keepUnstableUntilFirst,\n );\n }\n}\n","import { from, Observable } from 'rxjs';\nimport { fromCollectionRef } from '../observable/fromRef';\nimport { filter, map, scan } from 'rxjs/operators';\nimport firebase from 'firebase/compat/app';\nimport { keepUnstableUntilFirst } from '@angular/fire';\n\nimport { DocumentChangeAction, DocumentChangeType, DocumentData, Query } from '../interfaces';\nimport { validateEventsArray } from '../collection/collection';\nimport { docChanges, sortedChanges } from '../collection/changes';\nimport { AngularFirestore } from '../firestore';\n\n/**\n * AngularFirestoreCollectionGroup service\n *\n * This class holds a reference to a Firestore Collection Group Query.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const collectionGroup = firebase.firestore.collectionGroup('stocks');\n * const query = collectionRef.where('price', '>', '0.01');\n * const fakeStock = new AngularFirestoreCollectionGroup<Stock>(query, afs);\n *\n * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.\n * fakeStock.valueChanges().subscribe(value => console.log(value));\n */\nexport class AngularFirestoreCollectionGroup<T = DocumentData> {\n /**\n * The constructor takes in a CollectionGroupQuery to provide wrapper methods\n * for data operations and data streaming.\n */\n constructor(\n private readonly query: Query<T>,\n private readonly afs: AngularFirestore) { }\n\n /**\n * Listen to the latest change in the stream. This method returns changes\n * as they occur and they are not sorted by query order. This allows you to construct\n * your own data structure.\n */\n stateChanges(events?: DocumentChangeType[]): Observable<DocumentChangeAction<T>[]> {\n if (!events || events.length === 0) {\n return docChanges<T>(this.query, this.afs.schedulers.outsideAngular).pipe(\n keepUnstableUntilFirst\n );\n }\n return docChanges<T>(this.query, this.afs.schedulers.outsideAngular)\n .pipe(\n map(actions => actions.filter(change => events.indexOf(change.type) > -1)),\n filter(changes => changes.length > 0),\n keepUnstableUntilFirst\n );\n }\n\n /**\n * Create a stream of changes as they occur it time. This method is similar to stateChanges()\n * but it collects each event in an array over time.\n */\n auditTrail(events?: DocumentChangeType[]): Observable<DocumentChangeAction<T>[]> {\n return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));\n }\n\n /**\n * Create a stream of synchronized changes. This method keeps the local array in sorted\n * query order.\n */\n snapshotChanges(events?: DocumentChangeType[]): Observable<DocumentChangeAction<T>[]> {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges<T>(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(\n keepUnstableUntilFirst\n );\n }\n\n /**\n * Listen to all documents in the collection and its possible query as an Observable.\n *\n * If the `idField` option is provided, document IDs are included and mapped to the\n * provided `idField` property name.\n */\n valueChanges(): Observable<T[]>;\n // tslint:disable-next-line:unified-signatures\n valueChanges({}): Observable<T[]>;\n valueChanges<K extends string>(options: {idField: K}): Observable<(T & { [T in K]: string })[]>;\n valueChanges<K extends string>(options: {idField?: K} = {}): Observable<T[]> {\n const fromCollectionRefScheduled$ = fromCollectionRef<T>(this.query, this.afs.schedulers.outsideAngular);\n return fromCollectionRefScheduled$\n .pipe(\n map(actions => actions.payload.docs.map(a => {\n if (options.idField) {\n return {\n [options.idField]: a.id,\n ...a.data()\n } as T & { [T in K]: string };\n } else {\n return a.data();\n }\n })),\n keepUnstableUntilFirst\n );\n }\n\n /**\n * Retrieve the results of the query once.\n */\n get(options?: firebase.firestore.GetOptions) {\n return from(this.query.get(options)).pipe(\n keepUnstableUntilFirst\n );\n }\n\n}\n","import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { from, Observable, of } from 'rxjs';\nimport {\n AssociatedReference,\n CollectionReference,\n DocumentReference,\n PersistenceSettings,\n Query,\n QueryFn,\n QueryGroupFn,\n Settings\n} from './interfaces';\nimport { AngularFirestoreDocument } from './document/document';\nimport { AngularFirestoreCollection } from './collection/collection';\nimport { AngularFirestoreCollectionGroup } from './collection-group/collection-group';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { FirebaseApp, ɵfirebaseAppFactory, FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport { isPlatformServer } from '@angular/common';\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\nimport {\n AngularFireAuth,\n USE_EMULATOR as USE_AUTH_EMULATOR,\n SETTINGS as AUTH_SETTINGS,\n TENANT_ID,\n LANGUAGE_CODE,\n USE_DEVICE_LANGUAGE,\n PERSISTENCE,\n ɵauthFactory,\n} from '@angular/fire/compat/auth';\nimport { AppCheckInstances } from '@angular/fire/app-check';\n\n/**\n * The value of this token determines whether or not the firestore will have persistance enabled\n */\nexport const ENABLE_PERSISTENCE = new InjectionToken<boolean>('angularfire2.enableFirestorePersistence');\nexport const PERSISTENCE_SETTINGS = new InjectionToken<PersistenceSettings | undefined>('angularfire2.firestore.persistenceSettings');\nexport const SETTINGS = new InjectionToken<Settings>('angularfire2.firestore.settings');\n\ntype UseEmulatorArguments = Parameters<firebase.firestore.Firestore['useEmulator']>;\nexport const USE_EMULATOR = new InjectionToken<UseEmulatorArguments>('angularfire2.firestore.use-emulator');\n\n/**\n * A utility methods for associating a collection reference with\n * a query.\n *\n * @param collectionRef - A collection reference to query\n * @param queryFn - The callback to create a query\n *\n * Example:\n * const { query, ref } = associateQuery(docRef.collection('items'), ref => {\n * return ref.where('age', '<', 200);\n * });\n */\nexport function associateQuery<T>(collectionRef: CollectionReference<T>, queryFn = ref => ref): AssociatedReference<T> {\n const query = queryFn(collectionRef);\n const ref = collectionRef;\n return { query, ref };\n}\n\ntype InstanceCache = Map<FirebaseApp, [\n firebase.firestore.Firestore,\n firebase.firestore.Settings | null,\n UseEmulatorArguments | null,\n boolean | null]\n>;\n\n/**\n * AngularFirestore Service\n *\n * This service is the main entry point for this feature module. It provides\n * an API for creating Collection and Reference services. These services can\n * then be used to do data updates and observable streams of the data.\n *\n * Example:\n *\n * import { Component } from '@angular/core';\n * import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from '@angular/fire/firestore';\n * import { Observable } from 'rxjs/Observable';\n * import { from } from 'rxjs/observable';\n *\n * @Component({\n * selector: 'app-my-component',\n * template: `\n * <h2>Items for {{ (profile | async)?.name }}\n * <ul>\n * <li *ngFor=\"let item of items | async\">{{ item.name }}</li>\n * </ul>\n * <div class=\"control-input\">\n * <input type=\"text\" #itemname />\n * <button (click)=\"addItem(itemname.value)\">Add Item</button>\n * </div>\n * `\n * })\n * export class MyComponent implements OnInit {\n *\n * // services for data operations and data streaming\n * private readonly itemsRef: AngularFirestoreCollection<Item>;\n * private readonly profileRef: AngularFirestoreDocument<Profile>;\n *\n * // observables for template\n * items: Observable<Item[]>;\n * profile: Observable<Profile>;\n *\n * // inject main service\n * constructor(private readonly afs: AngularFirestore) {}\n *\n * ngOnInit() {\n * this.itemsRef = afs.collection('items', ref => ref.where('user', '==', 'davideast').limit(10));\n * this.items = this.itemsRef.valueChanges().map(snap => snap.docs.map(data => doc.data()));\n * // this.items = from(this.itemsRef); // you can also do this with no mapping\n *\n * this.profileRef = afs.doc('users/davideast');\n * this.profile = this.profileRef.valueChanges();\n * }\n *\n * addItem(name: string) {\n * const user = 'davideast';\n * this.itemsRef.add({ name, user });\n * }\n * }\n */\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFirestore {\n public readonly firestore: firebase.firestore.Firestore;\n public readonly persistenceEnabled$: Observable<boolean>;\n\n /**\n * Each Feature of AngularFire has a FirebaseApp injected. This way we\n * don't rely on the main Firebase App instance and we can create named\n * apps and use multiple apps.\n */\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n @Optional() @Inject(ENABLE_PERSISTENCE) shouldEnablePersistence: boolean | null,\n @Optional() @Inject(SETTINGS) settings: Settings | null,\n // tslint:disable-next-line:ban-types\n @Inject(PLATFORM_ID) platformId: Object,\n zone: NgZone,\n public schedulers: ɵAngularFireSchedulers,\n @Optional() @Inject(PERSISTENCE_SETTINGS) persistenceSettings: PersistenceSettings | null,\n @Optional() @Inject(USE_EMULATOR) _useEmulator: any,\n @Optional() auth: AngularFireAuth,\n @Optional() @Inject(USE_AUTH_EMULATOR) useAuthEmulator: any,\n @Optional() @Inject(AUTH_SETTINGS) authSettings: any, // can't use firebase.auth.AuthSettings here\n @Optional() @Inject(TENANT_ID) tenantId: string | null,\n @Optional() @Inject(LANGUAGE_CODE) languageCode: string | null,\n @Optional() @Inject(USE_DEVICE_LANGUAGE) useDeviceLanguage: boolean | null,\n @Optional() @Inject(PERSISTENCE) persistence: string | null,\n @Optional() _appCheckInstances: AppCheckInstances,\n ) {\n const app = ɵfirebaseAppFactory(options, zone, name);\n const useEmulator: UseEmulatorArguments | null = _useEmulator;\n\n if (auth) {\n ɵauthFactory(app, zone, useAuthEmulator, tenantId, languageCode, useDeviceLanguage, authSettings, persistence);\n }\n\n [this.firestore, this.persistenceEnabled$] = ɵcacheInstance(`${app.name}.firestore`, 'AngularFirestore', app.name, () => {\n const firestore = zone.runOutsideAngular(() => app.firestore());\n if (settings) {\n firestore.settings(settings);\n }\n if (useEmulator) {\n firestore.useEmulator(...useEmulator);\n }\n\n if (shouldEnablePersistence && !isPlatformServer(platformId)) {\n // We need to try/catch here because not all enablePersistence() failures are caught\n // https://github.com/firebase/firebase-js-sdk/issues/608\n const enablePersistence = () => {\n try {\n return from(firestore.enablePersistence(persistenceSettings || undefined).then(() => true, () => false));\n } catch (e) {\n if (typeof console !== 'undefined') { console.warn(e); }\n return of(false);\n }\n };\n return [firestore, zone.runOutsideAngular(enablePersistence)];\n } else {\n return [firestore, of(false)];\n }\n\n }, [settings, useEmulator, shouldEnablePersistence]);\n }\n\n /**\n * Create a reference to a Firestore Collection based on a path or\n * CollectionReference and an optional query function to narrow the result\n * set.\n */\n collection<T>(path: string, queryFn?: QueryFn): AngularFirestoreCollection<T>;\n // tslint:disable-next-line:unified-signatures\n collection<T>(ref: CollectionReference, queryFn?: QueryFn): AngularFirestoreCollection<T>;\n collection<T>(pathOrRef: string | CollectionReference<T>, queryFn?: QueryFn): AngularFirestoreCollection<T> {\n let collectionRef: CollectionReference<T>;\n if (typeof pathOrRef === 'string') {\n collectionRef = this.firestore.collection(pathOrRef) as firebase.firestore.CollectionReference<T>;\n } else {\n collectionRef = pathOrRef;\n }\n const { ref, query } = associateQuery<T>(collectionRef, queryFn);\n const refInZone = this.schedulers.ngZone.run(() => ref);\n return new AngularFirestoreCollection<T>(refInZone, query, this);\n }\n\n /**\n * Create a reference to a Firestore Collection Group based on a collectionId\n * and an optional query function to narrow the result\n * set.\n */\n collectionGroup<T>(collectionId: string, queryGroupFn?: QueryGroupFn<T>): AngularFirestoreCollectionGroup<T> {\n const queryFn = queryGroupFn || (ref => ref);\n const collectionGroup: Query<T> = this.firestore.collectionGroup(collectionId) as firebase.firestore.Query<T>;\n return new AngularFirestoreCollectionGroup<T>(queryFn(collectionGroup), this);\n }\n\n /**\n * Create a reference to a Firestore Document based on a path or\n * DocumentReference. Note that documents are not queryable because they are\n * simply objects. However, documents have sub-collections that return a\n * Collection reference and can be queried.\n */\n doc<T>(path: string): AngularFirestoreDocument<T>;\n // tslint:disable-next-line:unified-signatures\n doc<T>(ref: DocumentReference): AngularFirestoreDocument<T>;\n doc<T>(pathOrRef: string | DocumentReference<T>): AngularFirestoreDocument<T> {\n let ref: DocumentReference<T>;\n if (typeof pathOrRef === 'string') {\n ref = this.firestore.doc(pathOrRef) as firebase.firestore.DocumentReference<T>;\n } else {\n ref = pathOrRef;\n }\n const refInZone = this.schedulers.ngZone.run(() => ref);\n return new AngularFirestoreDocument<T>(refInZone, this);\n }\n\n /**\n * Returns a generated Firestore Document Id.\n */\n createId() {\n return this.firestore.collection('_').doc().id;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { PersistenceSettings } from './interfaces';\nimport { AngularFirestore, ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS } from './firestore';\nimport firebase from 'firebase/compat/app';\nimport { VERSION } from '@angular/fire';\n\n@NgModule({\n providers: [ AngularFirestore ]\n})\nexport class AngularFirestoreModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fst-compat');\n }\n /**\n * Attempt to enable persistent storage, if possible\n */\n static enablePersistence(persistenceSettings?: PersistenceSettings): ModuleWithProviders<AngularFirestoreModule> {\n return {\n ngModule: AngularFirestoreModule,\n providers: [\n { provide: ENABLE_PERSISTENCE, useValue: true },\n { provide: PERSISTENCE_SETTINGS, useValue: persistenceSettings },\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["USE_AUTH_EMULATOR","AUTH_SETTINGS"],"mappings":";;;;;;;;;;;;;;;AAIA,SAAS,QAAQ,CAAO,GAAiB,EAAE,YAA2B,cAAc,EAAA;AAClF,IAAA,OAAO,IAAI,UAAU,CAAC,UAAU,IAAG;AACjC,QAAA,IAAI,WAAuB,CAAC;QAC5B,IAAI,SAAS,IAAI,IAAI,EAAE;AACrB,YAAA,SAAS,CAAC,QAAQ,CAAC,MAAK;AACtB,gBAAA,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC,EAAE,sBAAsB,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;AAC7E,aAAC,CAAC,CAAC;AACJ,SAAA;AAAM,aAAA;AACL,YAAA,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC,EAAE,sBAAsB,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;AAC5E,SAAA;AAED,QAAA,OAAO,MAAK;YACV,IAAI,WAAW,IAAI,IAAI,EAAE;AACvB,gBAAA,WAAW,EAAE,CAAC;AACf,aAAA;AACH,SAAC,CAAC;AACJ,KAAC,CAAC,CAAC;AACL,CAAC;AAEe,SAAA,OAAO,CAAO,GAAoC,EAAE,SAAyB,EAAA;AAC3F,IAAA,OAAO,QAAQ,CAAgB,GAAG,EAAE,SAAS,CAAC,CAAC;AACjD,CAAC;AAEe,SAAA,UAAU,CAAI,GAAyB,EAAE,SAAyB,EAAA;AAChF,IAAA,OAAO,OAAO,CAAyB,GAAG,EAAE,SAAS,CAAC;AACnD,SAAA,IAAI,CACH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CAAA,CAAA;wGAAtB,sBAAsB,EAAA,SAAA,EAFtB,CAAE,gBAAgB,CAAE,EAAA,CAAA,CAAA;;2FAEpB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,gBAAgB,CAAE;AAChC,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
package/{fesm2015/angular-fire-compat-functions.js → fesm2022/angular-fire-compat-functions.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import 'firebase/compat/functions';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
|
4
4
|
import { of, from } from 'rxjs';
|
|
@@ -21,6 +21,7 @@ const ORIGIN = new InjectionToken('angularfire2.functions.origin');
|
|
|
21
21
|
const REGION = new InjectionToken('angularfire2.functions.region');
|
|
22
22
|
const USE_EMULATOR = new InjectionToken('angularfire2.functions.use-emulator');
|
|
23
23
|
class AngularFireFunctions {
|
|
24
|
+
httpsCallable;
|
|
24
25
|
constructor(options, name, zone, schedulers, region, origin, _useEmulator, // can't use the tuple here
|
|
25
26
|
_appCheckInstances) {
|
|
26
27
|
const useEmulator = _useEmulator;
|
|
@@ -38,10 +39,10 @@ class AngularFireFunctions {
|
|
|
38
39
|
this.httpsCallable = (name, options) => (data) => from(functions).pipe(observeOn(schedulers.insideAngular), switchMap(functions => functions.httpsCallable(name, options)(data)), map(r => r.data));
|
|
39
40
|
return ɵlazySDKProxy(this, functions, zone);
|
|
40
41
|
}
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireFunctions, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: REGION, optional: true }, { token: ORIGIN, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireFunctions, providedIn: 'any' });
|
|
41
44
|
}
|
|
42
|
-
|
|
43
|
-
AngularFireFunctions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctions, providedIn: 'any' });
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctions, decorators: [{
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireFunctions, decorators: [{
|
|
45
46
|
type: Injectable,
|
|
46
47
|
args: [{
|
|
47
48
|
providedIn: 'any'
|
|
@@ -78,11 +79,11 @@ class AngularFireFunctionsModule {
|
|
|
78
79
|
constructor() {
|
|
79
80
|
firebase.registerVersion('angularfire', VERSION.full, 'fn-compat');
|
|
80
81
|
}
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireFunctionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
83
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: AngularFireFunctionsModule });
|
|
84
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireFunctionsModule, providers: [AngularFireFunctions] });
|
|
81
85
|
}
|
|
82
|
-
|
|
83
|
-
AngularFireFunctionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctionsModule });
|
|
84
|
-
AngularFireFunctionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctionsModule, providers: [AngularFireFunctions] });
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireFunctionsModule, decorators: [{
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireFunctionsModule, decorators: [{
|
|
86
87
|
type: NgModule,
|
|
87
88
|
args: [{
|
|
88
89
|
providers: [AngularFireFunctions]
|
|
@@ -94,4 +95,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
94
95
|
*/
|
|
95
96
|
|
|
96
97
|
export { AngularFireFunctions, AngularFireFunctionsModule, ORIGIN, REGION, USE_EMULATOR };
|
|
97
|
-
//# sourceMappingURL=angular-fire-compat-functions.
|
|
98
|
+
//# sourceMappingURL=angular-fire-compat-functions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-fire-compat-functions.mjs","sources":["../../../src/compat/functions/base.ts","../../../src/compat/functions/functions.ts","../../../src/compat/functions/functions.module.ts","../../../src/compat/functions/angular-fire-compat-functions.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/functions, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n useEmulator: null,\n useFunctionsEmulator: null,\n httpsCallable: null,\n};\n","import { Inject, Injectable, InjectionToken, NgZone, Optional } from '@angular/core';\nimport { from, Observable, of } from 'rxjs';\nimport { map, observeOn, shareReplay, switchMap } from 'rxjs/operators';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵlazySDKProxy, ɵPromiseProxy, ɵapplyMixins } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport { ɵfirebaseAppFactory, FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance } from '@angular/fire/compat';\nimport firebase from 'firebase/compat/app';\nimport { proxyPolyfillCompat } from './base';\nimport { HttpsCallableOptions } from '@firebase/functions-types';\nimport { AppCheckInstances } from '@angular/fire/app-check';\n\nexport const ORIGIN = new InjectionToken<string>('angularfire2.functions.origin');\nexport const REGION = new InjectionToken<string>('angularfire2.functions.region');\n\ntype UseEmulatorArguments = Parameters<firebase.functions.Functions['useEmulator']>;\nexport const USE_EMULATOR = new InjectionToken<UseEmulatorArguments>('angularfire2.functions.use-emulator');\n\n// override httpsCallable for compatibility with 5.x\nexport interface AngularFireFunctions extends Omit<ɵPromiseProxy<firebase.functions.Functions>, 'httpsCallable'> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireFunctions {\n\n public readonly httpsCallable: <T = any, R = any>(name: string, options?: HttpsCallableOptions) => (data: T) => Observable<R>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n @Optional() @Inject(REGION) region: string | null,\n @Optional() @Inject(ORIGIN) origin: string | null,\n @Optional() @Inject(USE_EMULATOR) _useEmulator: any, // can't use the tuple here\n @Optional() _appCheckInstances: AppCheckInstances,\n ) {\n const useEmulator: UseEmulatorArguments | null = _useEmulator;\n\n const functions = of(undefined).pipe(\n observeOn(schedulers.outsideAngular),\n switchMap(() => import('firebase/compat/functions')),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n map(app => ɵcacheInstance(`${app.name}.functions.${region || origin}`, 'AngularFireFunctions', app.name, () => {\n let functions: firebase.functions.Functions;\n if (region && origin) {\n throw new Error('REGION and ORIGIN can\\'t be used at the same time.');\n }\n functions = app.functions(region || origin || undefined);\n if (useEmulator) {\n functions.useEmulator(...useEmulator);\n }\n return functions;\n }, [region, origin, useEmulator])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n this.httpsCallable = <T = any, R = any>(name: string, options?: HttpsCallableOptions) =>\n (data: T) => from(functions).pipe(\n observeOn(schedulers.insideAngular),\n switchMap(functions => functions.httpsCallable(name, options)(data)),\n map(r => r.data as R)\n );\n\n return ɵlazySDKProxy(this, functions, zone);\n\n }\n\n}\n\nɵapplyMixins(AngularFireFunctions, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { AngularFireFunctions } from './functions';\nimport firebase from 'firebase/compat/app';\nimport { VERSION } from '@angular/fire';\n\n@NgModule({\n providers: [ AngularFireFunctions ]\n})\nexport class AngularFireFunctionsModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fn-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,oBAAoB,EAAE,IAAI;AAC1B,IAAA,aAAa,EAAE,IAAI;CACpB;;MCMY,MAAM,GAAG,IAAI,cAAc,CAAS,+BAA+B,EAAE;MACrE,MAAM,GAAG,IAAI,cAAc,CAAS,+BAA+B,EAAE;MAGrE,YAAY,GAAG,IAAI,cAAc,CAAuB,qCAAqC,EAAE;MAS/F,oBAAoB,CAAA;AAEf,IAAA,aAAa,CAAiG;AAE9H,IAAA,WAAA,CAC4B,OAAwB,EACX,IAA+B,EACtE,IAAY,EACZ,UAAkC,EACN,MAAqB,EACrB,MAAqB,EACf,YAAiB;IACvC,kBAAqC,EAAA;QAEjD,MAAM,WAAW,GAAgC,YAAY,CAAC;AAE9D,QAAA,MAAM,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,CAClC,SAAS,CAAC,UAAU,CAAC,cAAc,CAAC,EACpC,SAAS,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC,EACpD,GAAG,CAAC,MAAM,mBAAmB,CAAC,OAAO,EAA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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;;;;"}
|
package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs}
RENAMED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter } from 'tslib';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
|
4
3
|
import { of, EMPTY, Observable, concat } from 'rxjs';
|
|
@@ -21,23 +20,29 @@ const proxyPolyfillCompat = {
|
|
|
21
20
|
const VAPID_KEY = new InjectionToken('angularfire2.messaging.vapid-key');
|
|
22
21
|
const SERVICE_WORKER = new InjectionToken('angularfire2.messaging.service-worker-registeration');
|
|
23
22
|
class AngularFireMessaging {
|
|
23
|
+
requestPermission;
|
|
24
|
+
getToken;
|
|
25
|
+
tokenChanges;
|
|
26
|
+
messages;
|
|
27
|
+
requestToken;
|
|
28
|
+
deleteToken;
|
|
24
29
|
constructor(options, name,
|
|
25
30
|
// tslint:disable-next-line:ban-types
|
|
26
31
|
platformId, zone, schedulers, vapidKey, _serviceWorker) {
|
|
27
32
|
const serviceWorker = _serviceWorker;
|
|
28
|
-
const messaging = of(undefined).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, () =>
|
|
33
|
+
const messaging = of(undefined).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, async () => {
|
|
29
34
|
return app.messaging();
|
|
30
|
-
}
|
|
35
|
+
}, [])), shareReplay({ bufferSize: 1, refCount: false }));
|
|
31
36
|
this.requestPermission = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(() => Notification.requestPermission()));
|
|
32
|
-
this.getToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap((messaging) =>
|
|
37
|
+
this.getToken = messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(async (messaging) => {
|
|
33
38
|
if (Notification.permission === 'granted') {
|
|
34
|
-
const serviceWorkerRegistration = serviceWorker ?
|
|
35
|
-
return
|
|
39
|
+
const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;
|
|
40
|
+
return await messaging.getToken({ vapidKey, serviceWorkerRegistration });
|
|
36
41
|
}
|
|
37
42
|
else {
|
|
38
43
|
return null;
|
|
39
44
|
}
|
|
40
|
-
}))
|
|
45
|
+
}));
|
|
41
46
|
const notificationPermission$ = new Observable(emitter => {
|
|
42
47
|
navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {
|
|
43
48
|
notificationPerm.onchange = () => emitter.next();
|
|
@@ -50,10 +55,10 @@ class AngularFireMessaging {
|
|
|
50
55
|
this.deleteToken = () => messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(messaging => messaging.deleteToken()), defaultIfEmpty(false));
|
|
51
56
|
return ɵlazySDKProxy(this, messaging, zone);
|
|
52
57
|
}
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.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 });
|
|
59
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessaging, providedIn: 'any' });
|
|
53
60
|
}
|
|
54
|
-
|
|
55
|
-
AngularFireMessaging.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessaging, providedIn: 'any' });
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessaging, decorators: [{
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessaging, decorators: [{
|
|
57
62
|
type: Injectable,
|
|
58
63
|
args: [{
|
|
59
64
|
providedIn: 'any'
|
|
@@ -86,11 +91,11 @@ class AngularFireMessagingModule {
|
|
|
86
91
|
constructor() {
|
|
87
92
|
firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');
|
|
88
93
|
}
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
95
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule });
|
|
96
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule, providers: [AngularFireMessaging] });
|
|
89
97
|
}
|
|
90
|
-
|
|
91
|
-
AngularFireMessagingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessagingModule });
|
|
92
|
-
AngularFireMessagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessagingModule, providers: [AngularFireMessaging] });
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireMessagingModule, decorators: [{
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule, decorators: [{
|
|
94
99
|
type: NgModule,
|
|
95
100
|
args: [{
|
|
96
101
|
providers: [AngularFireMessaging]
|
|
@@ -102,4 +107,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
102
107
|
*/
|
|
103
108
|
|
|
104
109
|
export { AngularFireMessaging, AngularFireMessagingModule, SERVICE_WORKER, VAPID_KEY };
|
|
105
|
-
//# sourceMappingURL=angular-fire-compat-messaging.
|
|
110
|
+
//# sourceMappingURL=angular-fire-compat-messaging.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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 firebase from 'firebase/compat/app';\nimport { concat, EMPTY, Observable, of } from 'rxjs';\nimport { catchError, defaultIfEmpty, map, mergeMap, observeOn, switchMap, switchMapTo, shareReplay, subscribeOn } from 'rxjs/operators';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵlazySDKProxy, ɵPromiseProxy, ɵapplyMixins } from '@angular/fire/compat';\nimport { ɵfirebaseAppFactory, FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport { proxyPolyfillCompat } from './base';\nimport { isSupported } from 'firebase/messaging';\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\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 // tslint:disable-next-line: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, async () => {\n return 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 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 { AngularFireMessaging } from './messaging';\nimport firebase from 'firebase/compat/app';\nimport { VERSION } from '@angular/fire';\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;MAQ/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,aAAa,CAAC,EACnC,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,CAAC,SAAS,IAAI,SAAS,GAAG,OAAO,2BAA2B,CAAC,GAAG,KAAK,CAAC,EAC/E,GAAG,CAAC,MAAM,mBAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EACnD,SAAS,CAAC,GAAG,IAAI,cAAc,CAAC,CAAA,EAAG,GAAG,CAAC,IAAI,YAAY,EAAE,sBAAsB,EAAE,GAAG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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;;;;"}
|
package/{fesm2015/angular-fire-compat-performance.js → fesm2022/angular-fire-compat-performance.mjs}
RENAMED
|
@@ -20,6 +20,8 @@ const proxyPolyfillCompat = {
|
|
|
20
20
|
const INSTRUMENTATION_ENABLED = new InjectionToken('angularfire2.performance.instrumentationEnabled');
|
|
21
21
|
const DATA_COLLECTION_ENABLED = new InjectionToken('angularfire2.performance.dataCollectionEnabled');
|
|
22
22
|
class AngularFirePerformance {
|
|
23
|
+
zone;
|
|
24
|
+
performance;
|
|
23
25
|
constructor(app, instrumentationEnabled, dataCollectionEnabled, zone,
|
|
24
26
|
// tslint:disable-next-line:ban-types
|
|
25
27
|
platformId) {
|
|
@@ -36,10 +38,10 @@ class AngularFirePerformance {
|
|
|
36
38
|
}, [instrumentationEnabled, dataCollectionEnabled])), shareReplay({ bufferSize: 1, refCount: false }));
|
|
37
39
|
return ɵlazySDKProxy(this, this.performance, zone);
|
|
38
40
|
}
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.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 });
|
|
42
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirePerformance, providedIn: 'any' });
|
|
39
43
|
}
|
|
40
|
-
|
|
41
|
-
AngularFirePerformance.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformance, providedIn: 'any' });
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformance, decorators: [{
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirePerformance, decorators: [{
|
|
43
45
|
type: Injectable,
|
|
44
46
|
args: [{
|
|
45
47
|
providedIn: 'any'
|
|
@@ -59,8 +61,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
59
61
|
args: [PLATFORM_ID]
|
|
60
62
|
}] }]; } });
|
|
61
63
|
const trace$ = (traceId) => {
|
|
62
|
-
|
|
63
|
-
if (typeof window !== 'undefined' && ((_a = window.performance) === null || _a === void 0 ? void 0 : _a.mark)) {
|
|
64
|
+
if (typeof window !== 'undefined' && window.performance?.mark) {
|
|
64
65
|
const entries = window.performance.getEntriesByName(traceId, 'measure') || [];
|
|
65
66
|
const startMarkName = `_${traceId}Start[${entries.length}]`;
|
|
66
67
|
const endMarkName = `_${traceId}End[${entries.length}]`;
|
|
@@ -121,9 +122,9 @@ const trace = (name) => (source$) => new Observable(subscriber => {
|
|
|
121
122
|
const IS_STABLE_START_MARK = 'Zone';
|
|
122
123
|
const IS_STABLE_END_MARK = '_isStableEnd';
|
|
123
124
|
class PerformanceMonitoringService {
|
|
125
|
+
disposable;
|
|
124
126
|
constructor(appRef) {
|
|
125
|
-
|
|
126
|
-
if (typeof window !== 'undefined' && ((_a = window.performance) === null || _a === void 0 ? void 0 : _a.mark)) {
|
|
127
|
+
if (typeof window !== 'undefined' && window.performance?.mark) {
|
|
127
128
|
this.disposable = appRef.isStable.pipe(first(it => it), tap(() => {
|
|
128
129
|
window.performance.mark(IS_STABLE_END_MARK);
|
|
129
130
|
window.performance.measure('isStable', IS_STABLE_START_MARK, IS_STABLE_END_MARK);
|
|
@@ -135,10 +136,10 @@ class PerformanceMonitoringService {
|
|
|
135
136
|
this.disposable.unsubscribe();
|
|
136
137
|
}
|
|
137
138
|
}
|
|
139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: PerformanceMonitoringService, deps: [{ token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
140
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: PerformanceMonitoringService });
|
|
138
141
|
}
|
|
139
|
-
|
|
140
|
-
PerformanceMonitoringService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceMonitoringService });
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: PerformanceMonitoringService, decorators: [{
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: PerformanceMonitoringService, decorators: [{
|
|
142
143
|
type: Injectable
|
|
143
144
|
}], ctorParameters: function () { return [{ type: i0.ApplicationRef }]; } });
|
|
144
145
|
|
|
@@ -149,11 +150,11 @@ class AngularFirePerformanceModule {
|
|
|
149
150
|
// tslint:disable-next-line:no-unused-expression
|
|
150
151
|
perf.dataCollectionEnabled.then(() => { });
|
|
151
152
|
}
|
|
153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirePerformanceModule, deps: [{ token: AngularFirePerformance }, { token: PerformanceMonitoringService, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
154
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: AngularFirePerformanceModule });
|
|
155
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirePerformanceModule, providers: [AngularFirePerformance] });
|
|
152
156
|
}
|
|
153
|
-
|
|
154
|
-
AngularFirePerformanceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformanceModule });
|
|
155
|
-
AngularFirePerformanceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformanceModule, providers: [AngularFirePerformance] });
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFirePerformanceModule, decorators: [{
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFirePerformanceModule, decorators: [{
|
|
157
158
|
type: NgModule,
|
|
158
159
|
args: [{
|
|
159
160
|
providers: [AngularFirePerformance]
|
|
@@ -167,4 +168,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
167
168
|
*/
|
|
168
169
|
|
|
169
170
|
export { AngularFirePerformance, AngularFirePerformanceModule, DATA_COLLECTION_ENABLED, INSTRUMENTATION_ENABLED, PerformanceMonitoringService, trace, traceUntil, traceUntilComplete, traceUntilFirst, traceWhile };
|
|
170
|
-
//# sourceMappingURL=angular-fire-compat-performance.
|
|
171
|
+
//# sourceMappingURL=angular-fire-compat-performance.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-fire-compat-performance.mjs","sources":["../../../src/compat/performance/base.ts","../../../src/compat/performance/performance.ts","../../../src/compat/performance/performance.service.ts","../../../src/compat/performance/performance.module.ts","../../../src/compat/performance/angular-fire-compat-performance.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/performance, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n trace: null,\n instrumentationEnabled: null,\n dataCollectionEnabled: null,\n};\n","import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { EMPTY, Observable, of, Subscription } from 'rxjs';\nimport { map, shareReplay, switchMap, tap } from 'rxjs/operators';\nimport firebase from 'firebase/compat/app';\nimport { ɵapplyMixins, ɵlazySDKProxy, ɵPromiseProxy, ɵcacheInstance } from '@angular/fire/compat';\nimport { FirebaseApp } from '@angular/fire/compat';\nimport { isPlatformBrowser } from '@angular/common';\nimport { proxyPolyfillCompat } from './base';\n\nexport const INSTRUMENTATION_ENABLED = new InjectionToken<boolean>('angularfire2.performance.instrumentationEnabled');\nexport const DATA_COLLECTION_ENABLED = new InjectionToken<boolean>('angularfire2.performance.dataCollectionEnabled');\n\nexport interface AngularFirePerformance extends ɵPromiseProxy<firebase.performance.Performance> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFirePerformance {\n\n private readonly performance: Observable<firebase.performance.Performance>;\n\n constructor(\n app: FirebaseApp,\n @Optional() @Inject(INSTRUMENTATION_ENABLED) instrumentationEnabled: boolean | null,\n @Optional() @Inject(DATA_COLLECTION_ENABLED) dataCollectionEnabled: boolean | null,\n private zone: NgZone,\n // tslint:disable-next-line:ban-types\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n\n this.performance = of(undefined).pipe(\n switchMap(() => isPlatformBrowser(platformId) ? zone.runOutsideAngular(() => import('firebase/compat/performance')) : EMPTY),\n map(() => ɵcacheInstance(`performance`, 'AngularFirePerformance', app.name, () => {\n const performance = zone.runOutsideAngular(() => app.performance());\n if (instrumentationEnabled === false) {\n performance.instrumentationEnabled = false;\n }\n if (dataCollectionEnabled === false) {\n performance.dataCollectionEnabled = false;\n }\n return performance;\n }, [instrumentationEnabled, dataCollectionEnabled])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n return ɵlazySDKProxy(this, this.performance, zone);\n\n }\n\n}\n\nconst trace$ = (traceId: string) => {\n if (typeof window !== 'undefined' && window.performance?.mark) {\n const entries = window.performance.getEntriesByName(traceId, 'measure') || [];\n const startMarkName = `_${traceId}Start[${entries.length}]`;\n const endMarkName = `_${traceId}End[${entries.length}]`;\n return new Observable<void>(emitter => {\n window.performance.mark(startMarkName);\n emitter.next();\n return {\n unsubscribe: () => {\n window.performance.mark(endMarkName);\n window.performance.measure(traceId, startMarkName, endMarkName);\n }\n };\n });\n } else {\n return EMPTY;\n }\n};\n\nexport const traceUntil = <T = any>(\n name: string,\n test: (a: T) => boolean,\n options?: { orComplete?: boolean }\n) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n a => test(a) && traceSubscription.unsubscribe(),\n () => {\n },\n () => options && options.orComplete && traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceWhile = <T = any>(\n name: string,\n test: (a: T) => boolean,\n options?: { orComplete?: boolean }\n) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n let traceSubscription: Subscription | undefined;\n return source$.pipe(\n tap(\n a => {\n if (test(a)) {\n traceSubscription = traceSubscription || trace$(name).subscribe();\n } else {\n if (traceSubscription) {\n traceSubscription.unsubscribe();\n }\n\n traceSubscription = undefined;\n }\n },\n () => {\n },\n () => options && options.orComplete && traceSubscription && traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceUntilComplete = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => {\n },\n () => {\n },\n () => traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nexport const traceUntilFirst = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => traceSubscription.unsubscribe(),\n () => {\n },\n () => {\n }\n )\n ).subscribe(subscriber);\n});\n\nexport const trace = <T = any>(name: string) => (source$: Observable<T>) => new Observable<T>(subscriber => {\n const traceSubscription = trace$(name).subscribe();\n return source$.pipe(\n tap(\n () => traceSubscription.unsubscribe(),\n () => {\n },\n () => traceSubscription.unsubscribe()\n )\n ).subscribe(subscriber);\n});\n\nɵapplyMixins(AngularFirePerformance, [proxyPolyfillCompat]);\n","import { ApplicationRef, Injectable, OnDestroy } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\n\nconst IS_STABLE_START_MARK = 'Zone';\nconst IS_STABLE_END_MARK = '_isStableEnd';\n\n@Injectable()\nexport class PerformanceMonitoringService implements OnDestroy {\n\n private disposable: Subscription|undefined;\n\n constructor(appRef: ApplicationRef) {\n if (typeof window !== 'undefined' && window.performance?.mark) {\n this.disposable = appRef.isStable.pipe(\n first(it => it),\n tap(() => {\n window.performance.mark(IS_STABLE_END_MARK);\n window.performance.measure('isStable', IS_STABLE_START_MARK, IS_STABLE_END_MARK);\n })\n ).subscribe();\n }\n }\n\n ngOnDestroy() {\n if (this.disposable) { this.disposable.unsubscribe(); }\n }\n\n}\n","import { NgModule, Optional } from '@angular/core';\nimport { AngularFirePerformance } from './performance';\nimport { PerformanceMonitoringService } from './performance.service';\nimport firebase from 'firebase/compat/app';\nimport { VERSION } from '@angular/fire';\n\n@NgModule({\n providers: [ AngularFirePerformance ]\n})\nexport class AngularFirePerformanceModule {\n constructor(\n perf: AngularFirePerformance,\n @Optional() _: PerformanceMonitoringService\n ) {\n firebase.registerVersion('angularfire', VERSION.full, 'perf-compat');\n // call anything here to get perf loading\n // tslint:disable-next-line:no-unused-expression\n perf.dataCollectionEnabled.then(() => {});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.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