@angular/fire 7.6.1 → 16.0.0-canary.4172abd
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/analytics.module.d.ts +2 -2
- package/analytics/is-analytics-supported-factory.d.ts +4 -0
- package/analytics/screen-tracking.service.d.ts +3 -3
- package/app-check/app-check.d.ts +0 -6
- package/app-check/app-check.module.d.ts +3 -4
- package/app-check/public_api.d.ts +2 -1
- package/auth/auth.module.d.ts +2 -2
- package/auth-guard/auth-guard.d.ts +6 -6
- package/compat/analytics/analytics.d.ts +1 -3
- package/compat/analytics/analytics.module.d.ts +1 -1
- package/compat/analytics/screen-tracking.service.d.ts +1 -1
- package/compat/analytics/user-tracking.service.d.ts +1 -1
- package/compat/auth/auth.d.ts +4 -4
- package/compat/auth-guard/auth-guard.d.ts +8 -6
- package/compat/database/database.d.ts +4 -4
- package/compat/database/interfaces.d.ts +14 -14
- package/compat/database/list/audit-trail.d.ts +1 -1
- package/compat/database/list/create-reference.d.ts +1 -1
- package/compat/database/list/data-operation.d.ts +1 -1
- package/compat/database/list/state-changes.d.ts +1 -1
- package/compat/database/object/create-reference.d.ts +1 -1
- package/compat/database/observable/fromRef.d.ts +1 -1
- package/compat/database/utils.d.ts +1 -1
- package/compat/firebase.app.module.d.ts +1 -1
- package/compat/firestore/collection/collection.d.ts +2 -2
- package/compat/firestore/collection-group/collection-group.d.ts +2 -2
- package/compat/firestore/document/document.d.ts +4 -4
- package/compat/firestore/firestore.d.ts +7 -7
- package/compat/firestore/interfaces.d.ts +19 -19
- package/compat/functions/functions.d.ts +3 -3
- package/compat/messaging/messaging.d.ts +2 -2
- package/compat/performance/performance.d.ts +2 -2
- package/compat/proxy.d.ts +8 -8
- package/compat/remote-config/interfaces.d.ts +1 -1
- package/compat/remote-config/remote-config.d.ts +15 -49
- package/compat/storage/interfaces.d.ts +8 -8
- package/compat/storage/observable/fromTask.d.ts +1 -2
- package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -1
- package/compat/storage/ref.d.ts +1 -1
- package/compat/storage/storage.d.ts +3 -3
- package/compat/storage/task.d.ts +1 -1
- package/core.d.ts +8 -12
- package/database/database.module.d.ts +2 -2
- package/{esm2015/analytics/analytics.js → esm2022/analytics/analytics.mjs} +1 -1
- 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 +148 -0
- package/esm2022/analytics/user-tracking.service.mjs +44 -0
- package/{esm2015/app/app.js → esm2022/app/app.mjs} +1 -1
- package/esm2022/app/app.module.mjs +85 -0
- package/esm2022/app-check/app-check.mjs +10 -0
- package/esm2022/app-check/app-check.module.mjs +78 -0
- package/esm2022/app-check/public_api.mjs +5 -0
- package/{esm2015/auth/auth.js → esm2022/auth/auth.mjs} +1 -1
- package/esm2022/auth/auth.module.mjs +71 -0
- package/esm2022/auth-guard/auth-guard.mjs +53 -0
- package/{esm2015/auth-guard/auth-guard.module.js → esm2022/auth-guard/auth-guard.module.mjs} +7 -7
- package/esm2022/compat/analytics/analytics.mjs +160 -0
- package/esm2022/compat/analytics/analytics.module.mjs +35 -0
- 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} +7 -7
- package/{esm2015/compat/auth/public_api.js → esm2022/compat/auth/public_api.mjs} +1 -1
- package/esm2022/compat/auth-guard/auth-guard.mjs +53 -0
- package/{esm2015/compat/auth-guard/auth-guard.module.js → esm2022/compat/auth-guard/auth-guard.module.mjs} +7 -7
- package/{esm2015/compat/cache.js → esm2022/compat/cache.mjs} +4 -3
- package/esm2022/compat/database/database.mjs +119 -0
- package/{esm2015/compat/database/database.module.js → esm2022/compat/database/database.module.mjs} +7 -7
- package/esm2022/compat/database/interfaces.mjs +2 -0
- package/{esm2015/compat/database/list/audit-trail.js → esm2022/compat/database/list/audit-trail.mjs} +3 -3
- package/esm2022/compat/database/list/changes.mjs +85 -0
- package/esm2022/compat/database/list/create-reference.mjs +44 -0
- package/{esm2015/compat/database/list/data-operation.js → esm2022/compat/database/list/data-operation.mjs} +1 -1
- package/{esm2015/compat/database/list/snapshot-changes.js → esm2022/compat/database/list/snapshot-changes.mjs} +1 -1
- package/{esm2015/compat/database/list/state-changes.js → esm2022/compat/database/list/state-changes.mjs} +2 -2
- package/{esm2015/compat/database/object/create-reference.js → esm2022/compat/database/object/create-reference.mjs} +2 -2
- package/{esm2015/compat/database/object/snapshot-changes.js → esm2022/compat/database/object/snapshot-changes.mjs} +1 -1
- package/esm2022/compat/database/observable/fromRef.mjs +48 -0
- package/{esm2015/compat/database/utils.js → esm2022/compat/database/utils.mjs} +1 -1
- package/{esm2015/compat/firebase.app.js → esm2022/compat/firebase.app.mjs} +1 -1
- package/esm2022/compat/firebase.app.module.mjs +71 -0
- 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} +7 -7
- 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} +7 -7
- package/{esm2015/compat/functions/public_api.js → esm2022/compat/functions/public_api.mjs} +1 -1
- package/esm2022/compat/messaging/messaging.mjs +81 -0
- package/{esm2015/compat/messaging/messaging.module.js → esm2022/compat/messaging/messaging.module.mjs} +7 -7
- package/esm2022/compat/performance/performance.mjs +105 -0
- package/esm2022/compat/performance/performance.module.mjs +27 -0
- package/esm2022/compat/performance/performance.service.mjs +28 -0
- package/esm2022/compat/proxy.mjs +58 -0
- package/esm2022/compat/remote-config/remote-config.mjs +206 -0
- package/{esm2015/compat/remote-config/remote-config.module.js → esm2022/compat/remote-config/remote-config.module.mjs} +7 -7
- package/esm2022/compat/storage/observable/fromTask.mjs +36 -0
- package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +58 -0
- package/{esm2015/compat/storage/ref.js → esm2022/compat/storage/ref.mjs} +3 -3
- package/esm2022/compat/storage/storage.mjs +95 -0
- package/esm2022/compat/storage/storage.module.mjs +22 -0
- package/{esm2015/compat/storage/task.js → esm2022/compat/storage/task.mjs} +2 -2
- package/esm2022/core.mjs +43 -0
- package/{esm2015/database/database.js → esm2022/database/database.mjs} +1 -1
- package/esm2022/database/database.module.mjs +74 -0
- package/{esm2015/firestore/firestore.js → esm2022/firestore/firestore.mjs} +1 -1
- package/esm2022/firestore/firestore.module.mjs +74 -0
- package/{esm2015/firestore/lite/lite.js → esm2022/firestore/lite/lite.mjs} +1 -1
- package/esm2022/firestore/lite/lite.module.mjs +73 -0
- package/esm2022/firestore/rxfire.mjs +15 -0
- package/{esm2015/functions/functions.js → esm2022/functions/functions.mjs} +1 -1
- package/esm2022/functions/functions.module.mjs +74 -0
- package/esm2022/messaging/is-messaging-supported-factory.mjs +16 -0
- package/{esm2015/messaging/messaging.js → esm2022/messaging/messaging.mjs} +1 -1
- package/esm2022/messaging/messaging.module.mjs +86 -0
- package/esm2022/messaging/overrides.mjs +3 -0
- package/{esm2015/performance/performance.js → esm2022/performance/performance.mjs} +1 -1
- package/esm2022/performance/performance.module.mjs +81 -0
- package/esm2022/remote-config/is-remote-config-supported-factory.mjs +16 -0
- package/esm2022/remote-config/overrides.mjs +3 -0
- package/{esm2015/remote-config/remote-config.js → esm2022/remote-config/remote-config.mjs} +1 -1
- package/esm2022/remote-config/remote-config.module.mjs +86 -0
- package/{esm2015/storage/storage.js → esm2022/storage/storage.mjs} +1 -1
- package/esm2022/storage/storage.module.mjs +74 -0
- package/esm2022/zones.mjs +194 -0
- package/{fesm2015/angular-fire-analytics.js → fesm2022/angular-fire-analytics.mjs} +64 -40
- package/fesm2022/angular-fire-analytics.mjs.map +1 -0
- package/{fesm2015/angular-fire-app-check.js → fesm2022/angular-fire-app-check.mjs} +16 -24
- package/fesm2022/angular-fire-app-check.mjs.map +1 -0
- package/{fesm2015/angular-fire-app.js → fesm2022/angular-fire-app.mjs} +10 -9
- package/fesm2022/angular-fire-app.mjs.map +1 -0
- package/{fesm2015/angular-fire-auth-guard.js → fesm2022/angular-fire-auth-guard.mjs} +31 -27
- package/fesm2022/angular-fire-auth-guard.mjs.map +1 -0
- package/{fesm2015/angular-fire-auth.js → fesm2022/angular-fire-auth.mjs} +10 -11
- package/fesm2022/angular-fire-auth.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-analytics.js → fesm2022/angular-fire-compat-analytics.mjs} +43 -41
- 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} +30 -26
- package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-auth.js → fesm2022/angular-fire-compat-auth.mjs} +38 -16
- package/fesm2022/angular-fire-compat-auth.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-database.js → fesm2022/angular-fire-compat-database.mjs} +138 -132
- package/fesm2022/angular-fire-compat-database.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-firestore.js → fesm2022/angular-fire-compat-firestore.mjs} +119 -98
- package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-functions.js → fesm2022/angular-fire-compat-functions.mjs} +13 -12
- package/fesm2022/angular-fire-compat-functions.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs} +25 -19
- package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-performance.js → fesm2022/angular-fire-compat-performance.mjs} +29 -34
- 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} +35 -22
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-storage.js → fesm2022/angular-fire-compat-storage.mjs} +30 -23
- package/fesm2022/angular-fire-compat-storage.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat.js → fesm2022/angular-fire-compat.mjs} +25 -25
- package/fesm2022/angular-fire-compat.mjs.map +1 -0
- package/{fesm2015/angular-fire-database.js → fesm2022/angular-fire-database.mjs} +11 -12
- package/fesm2022/angular-fire-database.mjs.map +1 -0
- package/{fesm2015/angular-fire-firestore-lite.js → fesm2022/angular-fire-firestore-lite.mjs} +11 -12
- package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -0
- package/{fesm2015/angular-fire-firestore.js → fesm2022/angular-fire-firestore.mjs} +15 -14
- package/fesm2022/angular-fire-firestore.mjs.map +1 -0
- package/{fesm2015/angular-fire-functions.js → fesm2022/angular-fire-functions.mjs} +12 -13
- 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} +11 -11
- 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} +10 -11
- package/fesm2022/angular-fire-storage.mjs.map +1 -0
- package/{fesm2015/angular-fire.js → fesm2022/angular-fire.mjs} +33 -58
- package/fesm2022/angular-fire.mjs.map +1 -0
- package/firestore/firestore.module.d.ts +2 -2
- package/firestore/lite/lite.module.d.ts +2 -2
- package/firestore/rxfire.d.ts +3 -1
- package/functions/functions.module.d.ts +2 -2
- package/messaging/is-messaging-supported-factory.d.ts +4 -0
- package/messaging/messaging.module.d.ts +2 -2
- package/package.json +158 -7
- package/performance/performance.module.d.ts +2 -2
- package/publish.sh +1 -0
- package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
- package/remote-config/remote-config.module.d.ts +2 -2
- package/schematics/add/index.js +2 -2
- package/schematics/common.js +9 -5
- package/schematics/deploy/actions.js +69 -69
- package/schematics/deploy/builder.js +7 -7
- package/schematics/firebaseTools.js +9 -5
- package/schematics/setup/index.js +27 -27
- package/schematics/setup/prompts.js +22 -18
- package/schematics/update/index.js +1 -1
- package/schematics/update/v7/index.js +7 -7
- package/schematics/utils.js +34 -34
- package/storage/storage.module.d.ts +2 -2
- 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.js +0 -16
- package/esm2015/app-check/app-check.module.js +0 -81
- package/esm2015/app-check/public_api.js +0 -4
- package/esm2015/auth/auth.module.js +0 -71
- package/esm2015/auth-guard/auth-guard.js +0 -49
- package/esm2015/compat/analytics/analytics.js +0 -163
- package/esm2015/compat/analytics/analytics.module.js +0 -32
- 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/interfaces.js +0 -2
- package/esm2015/compat/database/list/changes.js +0 -85
- package/esm2015/compat/database/list/create-reference.js +0 -41
- package/esm2015/compat/database/observable/fromRef.js +0 -47
- package/esm2015/compat/firebase.app.module.js +0 -69
- 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.js +0 -110
- package/esm2015/compat/performance/performance.module.js +0 -28
- 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/observable/fromTask.js +0 -34
- package/esm2015/compat/storage/pipes/storageUrl.pipe.js +0 -54
- package/esm2015/compat/storage/storage.js +0 -94
- package/esm2015/compat/storage/storage.module.js +0 -22
- package/esm2015/core.js +0 -79
- package/esm2015/database/database.module.js +0 -74
- package/esm2015/firestore/firestore.module.js +0 -74
- package/esm2015/firestore/lite/lite.module.js +0 -74
- package/esm2015/firestore/rxfire.js +0 -13
- package/esm2015/functions/functions.module.js +0 -74
- package/esm2015/messaging/messaging.module.js +0 -85
- package/esm2015/messaging/overrides.js +0 -3
- package/esm2015/performance/performance.module.js +0 -81
- package/esm2015/remote-config/overrides.js +0 -3
- package/esm2015/remote-config/remote-config.module.js +0 -85
- package/esm2015/storage/storage.module.js +0 -74
- 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/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/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/firebase.js → esm2022/app-check/firebase.mjs} +0 -0
- /package/{esm2015/auth/angular-fire-auth.js → esm2022/auth/angular-fire-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/list/remove.js → esm2022/compat/database/list/remove.mjs} +0 -0
- /package/{esm2015/compat/database/list/utils.js → esm2022/compat/database/list/utils.mjs} +0 -0
- /package/{esm2015/compat/database/public_api.js → esm2022/compat/database/public_api.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/public_api.js → esm2022/compat/storage/public_api.mjs} +0 -0
- /package/{esm2015/database/angular-fire-database.js → esm2022/database/angular-fire-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/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/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/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/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/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/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/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,16 +1,16 @@
|
|
|
1
|
+
import { isPlatformServer } from '@angular/common';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
|
|
3
|
-
import { asyncScheduler, Observable, from, of } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/fire';
|
|
5
5
|
import { keepUnstableUntilFirst, VERSION } from '@angular/fire';
|
|
6
|
-
import
|
|
6
|
+
import * as i3 from '@angular/fire/app-check';
|
|
7
7
|
import { ɵfirebaseAppFactory, ɵcacheInstance, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire/compat';
|
|
8
|
-
import { isPlatformServer } from '@angular/common';
|
|
9
|
-
import 'firebase/compat/auth';
|
|
10
|
-
import 'firebase/compat/firestore';
|
|
11
8
|
import * as i2 from '@angular/fire/compat/auth';
|
|
12
9
|
import { ɵauthFactory, USE_EMULATOR as USE_EMULATOR$1, SETTINGS as SETTINGS$1, TENANT_ID, LANGUAGE_CODE, USE_DEVICE_LANGUAGE, PERSISTENCE } from '@angular/fire/compat/auth';
|
|
13
|
-
import
|
|
10
|
+
import { Observable, asyncScheduler, from, of } from 'rxjs';
|
|
11
|
+
import { startWith, pairwise, map, scan, distinctUntilChanged, filter } from 'rxjs/operators';
|
|
12
|
+
import 'firebase/compat/auth';
|
|
13
|
+
import 'firebase/compat/firestore';
|
|
14
14
|
import firebase from 'firebase/compat/app';
|
|
15
15
|
|
|
16
16
|
function _fromRef(ref, scheduler = asyncScheduler) {
|
|
@@ -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' };
|
|
@@ -50,13 +51,95 @@ function fromCollectionRef(ref, scheduler) {
|
|
|
50
51
|
return fromRef(ref, scheduler).pipe(map(payload => ({ payload, type: 'query' })));
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* AngularFirestoreDocument service
|
|
56
|
+
*
|
|
57
|
+
* This class creates a reference to a Firestore Document. A reference is provided in
|
|
58
|
+
* in the constructor. The class is generic which gives you type safety for data update
|
|
59
|
+
* methods and data streaming.
|
|
60
|
+
*
|
|
61
|
+
* This class uses Symbol.observable to transform into Observable using Observable.from().
|
|
62
|
+
*
|
|
63
|
+
* This class is rarely used directly and should be created from the AngularFirestore service.
|
|
64
|
+
*
|
|
65
|
+
* Example:
|
|
66
|
+
*
|
|
67
|
+
* const fakeStock = new AngularFirestoreDocument<Stock>(doc('stocks/FAKE'));
|
|
68
|
+
* await fakeStock.set({ name: 'FAKE', price: 0.01 });
|
|
69
|
+
* fakeStock.valueChanges().map(snap => {
|
|
70
|
+
* if(snap.exists) return snap.data();
|
|
71
|
+
* return null;
|
|
72
|
+
* }).subscribe(value => console.log(value));
|
|
73
|
+
* // OR! Transform using Observable.from() and the data is unwrapped for you
|
|
74
|
+
* Observable.from(fakeStock).subscribe(value => console.log(value));
|
|
75
|
+
*/
|
|
76
|
+
class AngularFirestoreDocument {
|
|
77
|
+
ref;
|
|
78
|
+
afs;
|
|
79
|
+
/**
|
|
80
|
+
* The constructor takes in a DocumentReference to provide wrapper methods
|
|
81
|
+
* for data operations, data streaming, and Symbol.observable.
|
|
82
|
+
*/
|
|
83
|
+
constructor(ref, afs) {
|
|
84
|
+
this.ref = ref;
|
|
85
|
+
this.afs = afs;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Create or overwrite a single document.
|
|
89
|
+
*/
|
|
90
|
+
set(data, options) {
|
|
91
|
+
return this.ref.set(data, options);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Update some fields of a document without overwriting the entire document.
|
|
95
|
+
*/
|
|
96
|
+
update(data) {
|
|
97
|
+
return this.ref.update(data);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Delete a document.
|
|
101
|
+
*/
|
|
102
|
+
delete() {
|
|
103
|
+
return this.ref.delete();
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Create a reference to a sub-collection given a path and an optional query
|
|
107
|
+
* function.
|
|
108
|
+
*/
|
|
109
|
+
collection(path, queryFn) {
|
|
110
|
+
const collectionRef = this.ref.collection(path);
|
|
111
|
+
const { ref, query } = associateQuery(collectionRef, queryFn);
|
|
112
|
+
return new AngularFirestoreCollection(ref, query, this.afs);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Listen to snapshot updates from the document.
|
|
116
|
+
*/
|
|
117
|
+
snapshotChanges() {
|
|
118
|
+
const scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);
|
|
119
|
+
return scheduledFromDocRef$.pipe(keepUnstableUntilFirst);
|
|
120
|
+
}
|
|
121
|
+
valueChanges(options = {}) {
|
|
122
|
+
return this.snapshotChanges().pipe(map(({ payload }) => options.idField ? {
|
|
123
|
+
...payload.data(),
|
|
124
|
+
...{ [options.idField]: payload.id }
|
|
125
|
+
} : payload.data()));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Retrieve the document once.
|
|
129
|
+
*/
|
|
130
|
+
get(options) {
|
|
131
|
+
return from(this.ref.get(options)).pipe(keepUnstableUntilFirst);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
53
135
|
/**
|
|
54
136
|
* Return a stream of document changes on a query. These results are not in sort order but in
|
|
55
137
|
* order of occurence.
|
|
56
138
|
*/
|
|
57
139
|
function docChanges(query, scheduler) {
|
|
58
140
|
return fromCollectionRef(query, scheduler)
|
|
59
|
-
.pipe(startWith(undefined), pairwise(), map((
|
|
141
|
+
.pipe(startWith(undefined), pairwise(), map((actionTuple) => {
|
|
142
|
+
const [priorAction, action] = actionTuple;
|
|
60
143
|
const docChanges = action.payload.docChanges();
|
|
61
144
|
const actions = docChanges.map(change => ({ type: change.type, payload: change }));
|
|
62
145
|
// the metadata has changed from the prior emission
|
|
@@ -64,7 +147,7 @@ function docChanges(query, scheduler) {
|
|
|
64
147
|
// go through all the docs in payload and figure out which ones changed
|
|
65
148
|
action.payload.docs.forEach((currentDoc, currentIndex) => {
|
|
66
149
|
const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));
|
|
67
|
-
const priorDoc = priorAction
|
|
150
|
+
const priorDoc = priorAction?.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));
|
|
68
151
|
if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) ||
|
|
69
152
|
!docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {
|
|
70
153
|
// document doesn't appear to have changed, don't log another action
|
|
@@ -185,6 +268,9 @@ function validateEventsArray(events) {
|
|
|
185
268
|
* fakeStock.valueChanges().subscribe(value => console.log(value));
|
|
186
269
|
*/
|
|
187
270
|
class AngularFirestoreCollection {
|
|
271
|
+
ref;
|
|
272
|
+
query;
|
|
273
|
+
afs;
|
|
188
274
|
/**
|
|
189
275
|
* The constructor takes in a CollectionReference and Query to provide wrapper methods
|
|
190
276
|
* for data operations and data streaming.
|
|
@@ -212,7 +298,7 @@ class AngularFirestoreCollection {
|
|
|
212
298
|
return source.pipe(
|
|
213
299
|
// We want to filter out empty arrays, but always emit at first, so the developer knows
|
|
214
300
|
// that the collection has been resolve; even if it's empty
|
|
215
|
-
startWith(undefined), pairwise(), filter(([prior, current]) => current.length > 0 || !prior), map(([
|
|
301
|
+
startWith(undefined), pairwise(), filter(([prior, current]) => current.length > 0 || !prior), map(([, current]) => current), keepUnstableUntilFirst);
|
|
216
302
|
}
|
|
217
303
|
/**
|
|
218
304
|
* Create a stream of changes as they occur it time. This method is similar to stateChanges()
|
|
@@ -234,7 +320,10 @@ class AngularFirestoreCollection {
|
|
|
234
320
|
return fromCollectionRef(this.query, this.afs.schedulers.outsideAngular)
|
|
235
321
|
.pipe(map(actions => actions.payload.docs.map(a => {
|
|
236
322
|
if (options.idField) {
|
|
237
|
-
return
|
|
323
|
+
return {
|
|
324
|
+
...a.data(),
|
|
325
|
+
...{ [options.idField]: a.id }
|
|
326
|
+
};
|
|
238
327
|
}
|
|
239
328
|
else {
|
|
240
329
|
return a.data();
|
|
@@ -266,82 +355,6 @@ class AngularFirestoreCollection {
|
|
|
266
355
|
}
|
|
267
356
|
}
|
|
268
357
|
|
|
269
|
-
/**
|
|
270
|
-
* AngularFirestoreDocument service
|
|
271
|
-
*
|
|
272
|
-
* This class creates a reference to a Firestore Document. A reference is provided in
|
|
273
|
-
* in the constructor. The class is generic which gives you type safety for data update
|
|
274
|
-
* methods and data streaming.
|
|
275
|
-
*
|
|
276
|
-
* This class uses Symbol.observable to transform into Observable using Observable.from().
|
|
277
|
-
*
|
|
278
|
-
* This class is rarely used directly and should be created from the AngularFirestore service.
|
|
279
|
-
*
|
|
280
|
-
* Example:
|
|
281
|
-
*
|
|
282
|
-
* const fakeStock = new AngularFirestoreDocument<Stock>(doc('stocks/FAKE'));
|
|
283
|
-
* await fakeStock.set({ name: 'FAKE', price: 0.01 });
|
|
284
|
-
* fakeStock.valueChanges().map(snap => {
|
|
285
|
-
* if(snap.exists) return snap.data();
|
|
286
|
-
* return null;
|
|
287
|
-
* }).subscribe(value => console.log(value));
|
|
288
|
-
* // OR! Transform using Observable.from() and the data is unwrapped for you
|
|
289
|
-
* Observable.from(fakeStock).subscribe(value => console.log(value));
|
|
290
|
-
*/
|
|
291
|
-
class AngularFirestoreDocument {
|
|
292
|
-
/**
|
|
293
|
-
* The constructor takes in a DocumentReference to provide wrapper methods
|
|
294
|
-
* for data operations, data streaming, and Symbol.observable.
|
|
295
|
-
*/
|
|
296
|
-
constructor(ref, afs) {
|
|
297
|
-
this.ref = ref;
|
|
298
|
-
this.afs = afs;
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Create or overwrite a single document.
|
|
302
|
-
*/
|
|
303
|
-
set(data, options) {
|
|
304
|
-
return this.ref.set(data, options);
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Update some fields of a document without overwriting the entire document.
|
|
308
|
-
*/
|
|
309
|
-
update(data) {
|
|
310
|
-
return this.ref.update(data);
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Delete a document.
|
|
314
|
-
*/
|
|
315
|
-
delete() {
|
|
316
|
-
return this.ref.delete();
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Create a reference to a sub-collection given a path and an optional query
|
|
320
|
-
* function.
|
|
321
|
-
*/
|
|
322
|
-
collection(path, queryFn) {
|
|
323
|
-
const collectionRef = this.ref.collection(path);
|
|
324
|
-
const { ref, query } = associateQuery(collectionRef, queryFn);
|
|
325
|
-
return new AngularFirestoreCollection(ref, query, this.afs);
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Listen to snapshot updates from the document.
|
|
329
|
-
*/
|
|
330
|
-
snapshotChanges() {
|
|
331
|
-
const scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);
|
|
332
|
-
return scheduledFromDocRef$.pipe(keepUnstableUntilFirst);
|
|
333
|
-
}
|
|
334
|
-
valueChanges(options = {}) {
|
|
335
|
-
return this.snapshotChanges().pipe(map(({ payload }) => options.idField ? Object.assign(Object.assign({}, payload.data()), { [options.idField]: payload.id }) : payload.data()));
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Retrieve the document once.
|
|
339
|
-
*/
|
|
340
|
-
get(options) {
|
|
341
|
-
return from(this.ref.get(options)).pipe(keepUnstableUntilFirst);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
358
|
/**
|
|
346
359
|
* AngularFirestoreCollectionGroup service
|
|
347
360
|
*
|
|
@@ -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,13 +515,16 @@ 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
|
|
503
524
|
* apps and use multiple apps.
|
|
504
525
|
*/
|
|
505
526
|
constructor(options, name, shouldEnablePersistence, settings,
|
|
506
|
-
//
|
|
527
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
507
528
|
platformId, zone, schedulers, persistenceSettings, _useEmulator, auth, useAuthEmulator, authSettings, // can't use firebase.auth.AuthSettings here
|
|
508
529
|
tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {
|
|
509
530
|
this.schedulers = schedulers;
|
|
@@ -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/document/document.ts","../../../src/compat/firestore/collection/changes.ts","../../../src/compat/firestore/collection/collection.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 { Observable, SchedulerLike, asyncScheduler } from 'rxjs';\nimport { map, pairwise, startWith } from 'rxjs/operators';\nimport { Action, DocumentReference, DocumentSnapshot, Query, QuerySnapshot, Reference } from '../interfaces';\n\nfunction _fromRef<R>(ref: Reference, 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<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 { keepUnstableUntilFirst } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { Observable, from } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { AngularFirestoreCollection } from '../collection/collection';\nimport { AngularFirestore, associateQuery } from '../firestore';\nimport { Action, DocumentData, DocumentReference, DocumentSnapshot, QueryFn, SetOptions } from '../interfaces';\nimport { fromDocRef } from '../observable/fromRef';\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?: unknown): 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 firebase from 'firebase/compat/app';\nimport { Observable, SchedulerLike } from 'rxjs';\nimport { distinctUntilChanged, map, pairwise, scan, startWith } from 'rxjs/operators';\nimport { Action, DocumentChange, DocumentChangeAction, DocumentChangeType, Query, QuerySnapshot } from '../interfaces';\nimport { fromCollectionRef } from '../observable/fromRef';\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 { keepUnstableUntilFirst } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { Observable, from } from 'rxjs';\nimport { filter, map, pairwise, scan, startWith } from 'rxjs/operators';\nimport { AngularFirestoreDocument } from '../document/document';\nimport { AngularFirestore } from '../firestore';\nimport { CollectionReference, DocumentChangeAction, DocumentChangeType, DocumentData, DocumentReference, Query } from '../interfaces';\nimport { fromCollectionRef } from '../observable/fromRef';\nimport { docChanges, sortedChanges } from './changes';\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(([, 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 // eslint-disable-next-line no-empty-pattern\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 any,\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 { keepUnstableUntilFirst } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { Observable, from } from 'rxjs';\nimport { filter, map, scan } from 'rxjs/operators';\nimport { docChanges, sortedChanges } from '../collection/changes';\nimport { validateEventsArray } from '../collection/collection';\nimport { AngularFirestore } from '../firestore';\nimport { DocumentChangeAction, DocumentChangeType, DocumentData, Query } from '../interfaces';\nimport { fromCollectionRef } from '../observable/fromRef';\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 // eslint-disable-next-line no-empty-pattern\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 { isPlatformServer } from '@angular/common';\nimport { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { AppCheckInstances } from '@angular/fire/app-check';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport {\n SETTINGS as AUTH_SETTINGS,\n AngularFireAuth,\n LANGUAGE_CODE,\n PERSISTENCE,\n TENANT_ID,\n USE_EMULATOR as USE_AUTH_EMULATOR,\n USE_DEVICE_LANGUAGE,\n ɵauthFactory,\n} from '@angular/fire/compat/auth';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { Observable, from, of } from 'rxjs';\nimport { AngularFirestoreCollection } from './collection/collection';\nimport { AngularFirestoreCollectionGroup } from './collection-group/collection-group';\nimport { AngularFirestoreDocument } from './document/document';\nimport {\n AssociatedReference,\n CollectionReference,\n DocumentReference,\n PersistenceSettings,\n Query,\n QueryFn,\n QueryGroupFn,\n Settings\n} from './interfaces';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\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\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 // eslint-disable-next-line @typescript-eslint/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 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 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 { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFirestore, ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS } from './firestore';\nimport { PersistenceSettings } from './interfaces';\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,CAAI,GAAc,EAAE,YAA2B,cAAc,EAAA;AAC5E,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,CAAI,GAAG,EAAE,SAAS,CAAC,CAAC;AACrC,CAAC;AAEe,SAAA,UAAU,CAAI,GAAyB,EAAE,SAAyB,EAAA;AAChF,IAAA,OAAO,OAAO,CAAyB,GAAG,EAAE,SAAS,CAAC;AACnD,SAAA,IAAI,CACH,SAA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AA;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,12 +1,12 @@
|
|
|
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
|
-
import { of, from } from 'rxjs';
|
|
5
|
-
import { observeOn, switchMap, map, shareReplay } from 'rxjs/operators';
|
|
6
4
|
import * as i1 from '@angular/fire';
|
|
7
5
|
import { VERSION } from '@angular/fire';
|
|
8
|
-
import { ɵfirebaseAppFactory, ɵcacheInstance, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';
|
|
9
6
|
import * as i2 from '@angular/fire/app-check';
|
|
7
|
+
import { ɵfirebaseAppFactory, ɵcacheInstance, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';
|
|
8
|
+
import { of, from } from 'rxjs';
|
|
9
|
+
import { observeOn, switchMap, map, shareReplay } from 'rxjs/operators';
|
|
10
10
|
import firebase from 'firebase/compat/app';
|
|
11
11
|
|
|
12
12
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
@@ -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 { ɵAngularFireSchedulers } from '@angular/fire';\nimport { AppCheckInstances } from '@angular/fire/app-check';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport { HttpsCallableOptions } from '@firebase/functions-types';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { Observable, from, of } from 'rxjs';\nimport { map, observeOn, shareReplay, switchMap } from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\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\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\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 { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireFunctions } from './functions';\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,IA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BAAgB,CAAA;;0BACvB,QAAQ;;0BAAI,MAAM;2BAAC,iBAAiB,CAAA;;0BAGpC,QAAQ;;0BAAI,MAAM;2BAAC,MAAM,CAAA;;0BACzB,QAAQ;;0BAAI,MAAM;2BAAC,MAAM,CAAA;;0BACzB,QAAQ;;0BAAI,MAAM;2BAAC,YAAY,CAAA;;0BAC/B,QAAQ;;AAmCb,YAAY,CAAC,oBAAoB,EAAE,CAAC,mBAAmB,CAAC,CAAC;;MCjE5C,0BAA0B,CAAA;AACrC,IAAA,WAAA,GAAA;QACE,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;KACpE;uGAHU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAA1B,0BAA0B,EAAA,CAAA,CAAA;wGAA1B,0BAA0B,EAAA,SAAA,EAF1B,CAAE,oBAAoB,CAAE,EAAA,CAAA,CAAA;;2FAExB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,oBAAoB,CAAE;AACpC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs}
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
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
|
-
import { of, EMPTY, Observable, concat } from 'rxjs';
|
|
5
|
-
import { subscribeOn, observeOn, switchMap, map, shareReplay, switchMapTo, catchError, mergeMap, defaultIfEmpty } from 'rxjs/operators';
|
|
6
3
|
import * as i1 from '@angular/fire';
|
|
7
4
|
import { VERSION } from '@angular/fire';
|
|
8
5
|
import { ɵfirebaseAppFactory, ɵcacheInstance, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';
|
|
9
6
|
import { isSupported } from 'firebase/messaging';
|
|
7
|
+
import { of, EMPTY, Observable, concat } from 'rxjs';
|
|
8
|
+
import { subscribeOn, observeOn, switchMap, map, shareReplay, switchMapTo, catchError, mergeMap, defaultIfEmpty } from 'rxjs/operators';
|
|
10
9
|
import firebase from 'firebase/compat/app';
|
|
11
10
|
|
|
12
11
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
@@ -21,23 +20,30 @@ 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
|
+
// eslint-disable-next-line @typescript-eslint/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, () =>
|
|
29
|
-
return app.messaging();
|
|
30
|
-
}
|
|
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, () => {
|
|
34
|
+
return of(app.messaging());
|
|
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
|
-
|
|
35
|
-
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
40
|
+
const serviceWorkerRegistration = serviceWorker ? await serviceWorker : null;
|
|
41
|
+
return await messaging.getToken({ vapidKey, serviceWorkerRegistration });
|
|
36
42
|
}
|
|
37
43
|
else {
|
|
38
44
|
return null;
|
|
39
45
|
}
|
|
40
|
-
}))
|
|
46
|
+
}));
|
|
41
47
|
const notificationPermission$ = new Observable(emitter => {
|
|
42
48
|
navigator.permissions.query({ name: 'notifications' }).then(notificationPerm => {
|
|
43
49
|
notificationPerm.onchange = () => emitter.next();
|
|
@@ -50,10 +56,10 @@ class AngularFireMessaging {
|
|
|
50
56
|
this.deleteToken = () => messaging.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), switchMap(messaging => messaging.deleteToken()), defaultIfEmpty(false));
|
|
51
57
|
return ɵlazySDKProxy(this, messaging, zone);
|
|
52
58
|
}
|
|
59
|
+
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 });
|
|
60
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessaging, providedIn: 'any' });
|
|
53
61
|
}
|
|
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: [{
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessaging, decorators: [{
|
|
57
63
|
type: Injectable,
|
|
58
64
|
args: [{
|
|
59
65
|
providedIn: 'any'
|
|
@@ -86,11 +92,11 @@ class AngularFireMessagingModule {
|
|
|
86
92
|
constructor() {
|
|
87
93
|
firebase.registerVersion('angularfire', VERSION.full, 'fcm-compat');
|
|
88
94
|
}
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
96
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule });
|
|
97
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule, providers: [AngularFireMessaging] });
|
|
89
98
|
}
|
|
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: [{
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AngularFireMessagingModule, decorators: [{
|
|
94
100
|
type: NgModule,
|
|
95
101
|
args: [{
|
|
96
102
|
providers: [AngularFireMessaging]
|
|
@@ -102,4 +108,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
102
108
|
*/
|
|
103
109
|
|
|
104
110
|
export { AngularFireMessaging, AngularFireMessagingModule, SERVICE_WORKER, VAPID_KEY };
|
|
105
|
-
//# sourceMappingURL=angular-fire-compat-messaging.
|
|
111
|
+
//# sourceMappingURL=angular-fire-compat-messaging.mjs.map
|