@angular/fire 7.6.0 → 16.0.0-canary.1350920
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -27
- package/analytics/analytics.module.d.ts +2 -2
- package/analytics/firebase.d.ts +4 -1
- 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/firebase.d.ts +2 -1
- package/app-check/public_api.d.ts +2 -1
- package/auth/auth.module.d.ts +2 -2
- package/auth/firebase.d.ts +3 -1
- 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/docs/app-check.md +1 -1
- package/docs/auth.md +6 -6
- package/docs/database.md +1 -1
- package/docs/deploy/getting-started.md +2 -2
- package/docs/firestore.md +1 -1
- package/docs/install-and-setup.md +1 -1
- package/docs/install-firebase-tools.md +78 -0
- package/docs/universal/cloud-functions.md +27 -6
- package/docs/universal/getting-started.md +9 -134
- package/{esm2015/analytics/analytics.js → esm2022/analytics/analytics.mjs} +1 -1
- package/esm2022/analytics/analytics.module.mjs +94 -0
- package/esm2022/analytics/firebase.mjs +17 -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/firebase.mjs +10 -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/firebase.mjs +58 -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/esm2022/firestore/firebase.mjs +73 -0
- package/{esm2015/firestore/firestore.js → esm2022/firestore/firestore.mjs} +1 -1
- package/esm2022/firestore/firestore.module.mjs +74 -0
- package/esm2022/firestore/lite/firebase.mjs +48 -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/lite/rxfire.mjs +12 -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} +68 -41
- package/fesm2022/angular-fire-analytics.mjs.map +1 -0
- package/{fesm2015/angular-fire-app-check.js → fesm2022/angular-fire-app-check.mjs} +18 -25
- 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} +14 -13
- 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} +25 -15
- package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -0
- package/fesm2022/angular-fire-firestore.mjs +180 -0
- 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/firebase.d.ts +21 -1
- package/firestore/firestore.module.d.ts +2 -2
- package/firestore/lite/firebase.d.ts +10 -1
- package/firestore/lite/lite.module.d.ts +2 -2
- package/firestore/lite/rxfire.d.ts +3 -1
- 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 +170 -20
- package/performance/performance.module.d.ts +2 -2
- 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/interfaces.js +9 -8
- package/schematics/setup/index.js +48 -64
- 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 +87 -71
- package/storage/storage.module.d.ts +2 -2
- 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/esm2015/analytics/analytics.module.js +0 -93
- package/esm2015/analytics/firebase.js +0 -14
- 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/firebase.js +0 -9
- package/esm2015/app-check/public_api.js +0 -4
- package/esm2015/auth/auth.module.js +0 -71
- package/esm2015/auth/firebase.js +0 -56
- 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/firebase.js +0 -53
- package/esm2015/firestore/firestore.module.js +0 -74
- package/esm2015/firestore/lite/firebase.js +0 -39
- package/esm2015/firestore/lite/lite.module.js +0 -74
- package/esm2015/firestore/lite/rxfire.js +0 -10
- 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 +0 -159
- 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/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/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/auth/angular-fire-auth.js → esm2022/auth/angular-fire-auth.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/lite/angular-fire-firestore-lite.js → esm2022/firestore/lite/angular-fire-firestore-lite.mjs} +0 -0
- /package/{esm2015/firestore/lite/public_api.js → esm2022/firestore/lite/public_api.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
|
@@ -1,49 +1,41 @@
|
|
|
1
|
-
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
|
1
|
+
import { ɵgetAllInstancesOf, ɵAPP_CHECK_PROVIDER_NAME, ɵgetDefaultInstanceOf, ɵAppCheckInstances, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';
|
|
2
|
+
export { ɵAppCheckInstances as AppCheckInstances } from '@angular/fire';
|
|
2
3
|
import { timer, from } from 'rxjs';
|
|
3
4
|
import { concatMap, distinct } from 'rxjs/operators';
|
|
5
|
+
import { isPlatformServer } from '@angular/common';
|
|
4
6
|
import * as i0 from '@angular/core';
|
|
5
7
|
import { InjectionToken, isDevMode, Optional, PLATFORM_ID, NgModule, NgZone, Injector } from '@angular/core';
|
|
6
8
|
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
|
7
9
|
import { registerVersion } from 'firebase/app';
|
|
8
|
-
import {
|
|
9
|
-
import { getToken as getToken$1, initializeAppCheck as initializeAppCheck$1, onTokenChanged as onTokenChanged$1, setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabled$1 } from 'firebase/app-check';
|
|
10
|
+
import { getLimitedUseToken as getLimitedUseToken$1, getToken as getToken$1, initializeAppCheck as initializeAppCheck$1, onTokenChanged as onTokenChanged$1, setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabled$1 } from 'firebase/app-check';
|
|
10
11
|
export * from 'firebase/app-check';
|
|
11
12
|
|
|
12
|
-
const APP_CHECK_PROVIDER_NAME = 'app-check';
|
|
13
13
|
class AppCheck {
|
|
14
14
|
constructor(appCheck) {
|
|
15
15
|
return appCheck;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
constructor() {
|
|
20
|
-
return ɵgetAllInstancesOf(APP_CHECK_PROVIDER_NAME);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const appCheckInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(APP_CHECK_PROVIDER_NAME))), distinct());
|
|
18
|
+
const appCheckInstance$ = timer(0, 300).pipe(concatMap(() => from(ɵgetAllInstancesOf(ɵAPP_CHECK_PROVIDER_NAME))), distinct());
|
|
24
19
|
|
|
25
20
|
const PROVIDED_APP_CHECK_INSTANCES = new InjectionToken('angularfire2.app-check-instances');
|
|
26
|
-
const APP_CHECK_NAMESPACE_SYMBOL = Symbol('angularfire2.app-check.namespace');
|
|
27
21
|
function defaultAppCheckInstanceFactory(provided, defaultApp) {
|
|
28
|
-
const defaultAppCheck = ɵgetDefaultInstanceOf(APP_CHECK_PROVIDER_NAME, provided, defaultApp);
|
|
22
|
+
const defaultAppCheck = ɵgetDefaultInstanceOf(ɵAPP_CHECK_PROVIDER_NAME, provided, defaultApp);
|
|
29
23
|
return defaultAppCheck && new AppCheck(defaultAppCheck);
|
|
30
24
|
}
|
|
31
25
|
const LOCALHOSTS = ['localhost', '0.0.0.0', '127.0.0.1'];
|
|
32
26
|
const isLocalhost = typeof window !== 'undefined' && LOCALHOSTS.includes(window.location.hostname);
|
|
33
27
|
function appCheckInstanceFactory(fn) {
|
|
34
|
-
// tslint:disable-next-line:ban-types
|
|
35
28
|
return (zone, injector, platformId) => {
|
|
36
|
-
var _a;
|
|
37
29
|
// Node should use admin token provider, browser devmode and localhost should use debug token
|
|
38
30
|
if (!isPlatformServer(platformId) && (isDevMode() || isLocalhost)) {
|
|
39
|
-
|
|
31
|
+
globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN ??= true;
|
|
40
32
|
}
|
|
41
33
|
const appCheck = zone.runOutsideAngular(() => fn(injector));
|
|
42
34
|
return new AppCheck(appCheck);
|
|
43
35
|
};
|
|
44
36
|
}
|
|
45
37
|
const APP_CHECK_INSTANCES_PROVIDER = {
|
|
46
|
-
provide:
|
|
38
|
+
provide: ɵAppCheckInstances,
|
|
47
39
|
deps: [
|
|
48
40
|
[new Optional(), PROVIDED_APP_CHECK_INSTANCES],
|
|
49
41
|
]
|
|
@@ -61,14 +53,14 @@ class AppCheckModule {
|
|
|
61
53
|
constructor() {
|
|
62
54
|
registerVersion('angularfire', VERSION.full, 'app-check');
|
|
63
55
|
}
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AppCheckModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
57
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: AppCheckModule });
|
|
58
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AppCheckModule, providers: [
|
|
59
|
+
DEFAULT_APP_CHECK_INSTANCE_PROVIDER,
|
|
60
|
+
APP_CHECK_INSTANCES_PROVIDER,
|
|
61
|
+
] });
|
|
64
62
|
}
|
|
65
|
-
|
|
66
|
-
AppCheckModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AppCheckModule });
|
|
67
|
-
AppCheckModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AppCheckModule, providers: [
|
|
68
|
-
DEFAULT_APP_CHECK_INSTANCE_PROVIDER,
|
|
69
|
-
APP_CHECK_INSTANCES_PROVIDER,
|
|
70
|
-
] });
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AppCheckModule, decorators: [{
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AppCheckModule, decorators: [{
|
|
72
64
|
type: NgModule,
|
|
73
65
|
args: [{
|
|
74
66
|
providers: [
|
|
@@ -97,6 +89,7 @@ function provideAppCheck(fn, ...deps) {
|
|
|
97
89
|
}
|
|
98
90
|
|
|
99
91
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
92
|
+
const getLimitedUseToken = ɵzoneWrap(getLimitedUseToken$1, true);
|
|
100
93
|
const getToken = ɵzoneWrap(getToken$1, true);
|
|
101
94
|
const initializeAppCheck = ɵzoneWrap(initializeAppCheck$1, true);
|
|
102
95
|
const onTokenChanged = ɵzoneWrap(onTokenChanged$1, true);
|
|
@@ -106,5 +99,5 @@ const setTokenAutoRefreshEnabled = ɵzoneWrap(setTokenAutoRefreshEnabled$1, true
|
|
|
106
99
|
* Generated bundle index. Do not edit.
|
|
107
100
|
*/
|
|
108
101
|
|
|
109
|
-
export { AppCheck,
|
|
110
|
-
//# sourceMappingURL=angular-fire-app-check.
|
|
102
|
+
export { AppCheck, AppCheckModule, appCheckInstance$, getLimitedUseToken, getToken, initializeAppCheck, onTokenChanged, provideAppCheck, setTokenAutoRefreshEnabled };
|
|
103
|
+
//# sourceMappingURL=angular-fire-app-check.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-fire-app-check.mjs","sources":["../../../src/app-check/app-check.ts","../../../src/app-check/app-check.module.ts","../../../src/app-check/firebase.ts","../../../src/app-check/angular-fire-app-check.ts"],"sourcesContent":["import { ɵAPP_CHECK_PROVIDER_NAME, ɵgetAllInstancesOf } from '@angular/fire';\nimport { AppCheck as FirebaseAppCheck } from 'firebase/app-check';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\n// see notes in core/firebase.app.module.ts for why we're building the class like this\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AppCheck extends FirebaseAppCheck {}\n\nexport class AppCheck {\n constructor(appCheck: FirebaseAppCheck) {\n return appCheck;\n }\n}\n\nexport const appCheckInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseAppCheck>(ɵAPP_CHECK_PROVIDER_NAME))),\n distinct(),\n);\n","import { isPlatformServer } from '@angular/common';\nimport { InjectionToken, Injector, ModuleWithProviders, NgModule, NgZone, Optional, PLATFORM_ID, isDevMode } from '@angular/core';\nimport { VERSION, ɵAPP_CHECK_PROVIDER_NAME, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { AppCheck as FirebaseAppCheck } from 'firebase/app-check';\nimport { AppCheck } from './app-check';\n\nexport const PROVIDED_APP_CHECK_INSTANCES = new InjectionToken<AppCheck[]>('angularfire2.app-check-instances');\n\nexport function defaultAppCheckInstanceFactory(provided: FirebaseAppCheck[]|undefined, defaultApp: FirebaseApp) {\n const defaultAppCheck = ɵgetDefaultInstanceOf<FirebaseAppCheck>(ɵAPP_CHECK_PROVIDER_NAME, provided, defaultApp);\n return defaultAppCheck && new AppCheck(defaultAppCheck);\n}\n\nconst LOCALHOSTS = ['localhost', '0.0.0.0', '127.0.0.1'];\nconst isLocalhost = typeof window !== 'undefined' && LOCALHOSTS.includes(window.location.hostname);\n\nexport function appCheckInstanceFactory(fn: (injector: Injector) => FirebaseAppCheck) {\n return (zone: NgZone, injector: Injector, platformId: unknown) => {\n // Node should use admin token provider, browser devmode and localhost should use debug token\n if (!isPlatformServer(platformId) && (isDevMode() || isLocalhost)) {\n globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN ??= true;\n }\n const appCheck = zone.runOutsideAngular(() => fn(injector));\n return new AppCheck(appCheck);\n };\n}\n\nconst APP_CHECK_INSTANCES_PROVIDER = {\n provide: ɵAppCheckInstances,\n deps: [\n [new Optional(), PROVIDED_APP_CHECK_INSTANCES ],\n ]\n};\n\nconst DEFAULT_APP_CHECK_INSTANCE_PROVIDER = {\n provide: AppCheck,\n useFactory: defaultAppCheckInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_APP_CHECK_INSTANCES ],\n FirebaseApp,\n PLATFORM_ID,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_APP_CHECK_INSTANCE_PROVIDER,\n APP_CHECK_INSTANCES_PROVIDER,\n ]\n})\nexport class AppCheckModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'app-check');\n }\n}\n\nexport function provideAppCheck(fn: (injector: Injector) => FirebaseAppCheck, ...deps: any[]): ModuleWithProviders<AppCheckModule> {\n return {\n ngModule: AppCheckModule,\n providers: [{\n provide: PROVIDED_APP_CHECK_INSTANCES,\n useFactory: appCheckInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n PLATFORM_ID,\n ɵAngularFireSchedulers,\n FirebaseApps,\n ...deps,\n ]\n }]\n };\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/app-check';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n getLimitedUseToken as _getLimitedUseToken,\n getToken as _getToken,\n initializeAppCheck as _initializeAppCheck,\n onTokenChanged as _onTokenChanged,\n setTokenAutoRefreshEnabled as _setTokenAutoRefreshEnabled\n} from 'firebase/app-check';\n\nexport const getLimitedUseToken = ɵzoneWrap(_getLimitedUseToken, true);\nexport const getToken = ɵzoneWrap(_getToken, true);\nexport const initializeAppCheck = ɵzoneWrap(_initializeAppCheck, true);\nexport const onTokenChanged = ɵzoneWrap(_onTokenChanged, true);\nexport const setTokenAutoRefreshEnabled = ɵzoneWrap(_setTokenAutoRefreshEnabled, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["_getLimitedUseToken","_getToken","_initializeAppChe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BAAA,UAAU,EAAE,uBAAuB,CAAC,EAAE,CAAC;AACvC,gBAAA,KAAK,EAAE,IAAI;AACX,gBAAA,IAAI,EAAE;oBACJ,MAAM;oBACN,QAAQ;oBACR,WAAW;oBACX,sBAAsB;oBACtB,YAAY;AACZ,oBAAA,GAAG,IAAI;AACR,iBAAA;aACF,CAAC;KACH,CAAC;AACJ;;AC3EA;AAWa,MAAA,kBAAkB,GAAG,SAAS,CAACA,oBAAmB,EAAE,IAAI,EAAE;AAC1D,MAAA,QAAQ,GAAG,SAAS,CAACC,UAAS,EAAE,IAAI,EAAE;AACtC,MAAA,kBAAkB,GAAG,SAAS,CAACC,oBAAmB,EAAE,IAAI,EAAE;AAC1D,MAAA,cAAc,GAAG,SAAS,CAACC,gBAAe,EAAE,IAAI,EAAE;AAClD,MAAA,0BAA0B,GAAG,SAAS,CAACC,4BAA2B,EAAE,IAAI;;ACfrF;;AAEG;;;;"}
|
|
@@ -52,20 +52,21 @@ function firebaseAppFactory(fn) {
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
class FirebaseAppModule {
|
|
55
|
-
//
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
56
56
|
constructor(platformId) {
|
|
57
57
|
registerVersion$1('angularfire', VERSION.full, 'core');
|
|
58
58
|
registerVersion$1('angularfire', VERSION.full, 'app');
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
59
60
|
registerVersion$1('angular', VERSION$1.full, platformId.toString());
|
|
60
61
|
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: FirebaseAppModule, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
63
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: FirebaseAppModule });
|
|
64
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: FirebaseAppModule, providers: [
|
|
65
|
+
DEFAULT_FIREBASE_APP_PROVIDER,
|
|
66
|
+
FIREBASE_APPS_PROVIDER,
|
|
67
|
+
] });
|
|
61
68
|
}
|
|
62
|
-
|
|
63
|
-
FirebaseAppModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirebaseAppModule });
|
|
64
|
-
FirebaseAppModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirebaseAppModule, providers: [
|
|
65
|
-
DEFAULT_FIREBASE_APP_PROVIDER,
|
|
66
|
-
FIREBASE_APPS_PROVIDER,
|
|
67
|
-
] });
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: FirebaseAppModule, decorators: [{
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: FirebaseAppModule, decorators: [{
|
|
69
70
|
type: NgModule,
|
|
70
71
|
args: [{
|
|
71
72
|
providers: [
|
|
@@ -111,4 +112,4 @@ const setLogLevel = ɵzoneWrap(setLogLevel$1, true);
|
|
|
111
112
|
*/
|
|
112
113
|
|
|
113
114
|
export { FirebaseApp, FirebaseAppModule, FirebaseApps, deleteApp, firebaseApp$, getApp, getApps, initializeApp, onLog, provideFirebaseApp, registerVersion, setLogLevel };
|
|
114
|
-
//# sourceMappingURL=angular-fire-app.
|
|
115
|
+
//# sourceMappingURL=angular-fire-app.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-fire-app.mjs","sources":["../../../src/app/app.ts","../../../src/app/app.module.ts","../../../src/app/firebase.ts","../../../src/app/angular-fire-app.ts"],"sourcesContent":["import { FirebaseApp as IFirebaseApp, getApps } from 'firebase/app';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\n// Need to turn the FirebaseApp interface exported by firebase/app into a class\n// as types don't work in Angular DI. We want developers to be able to inject FirebaseApp like so\n// constructor(app: FirebaseApp)\n// the cleanest way to achieve this that I found is to export a new interface and class\n// the interface just extends the interface you want to turn into the class. This informs tyepscript\n// that the class has all the same methods/properties as the interface you want to extend without\n// breaking if Firebase adds/removes APIs in future releases. This was a big problem for @angular/fire\n// back when we constructed our own class. Then in the \"new class\" we just return the FirebaseApp in the\n// constructor, this also has the added benefit of Firebase methods taking our DI class without\n// casting. E.g,\n// constructor(private app: FirebaseApp) { }\n// ngOnDestroy() { deleteApp(this.app); }\n//\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface FirebaseApp extends IFirebaseApp {}\n\nexport class FirebaseApp {\n constructor(app: IFirebaseApp) {\n return app;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface FirebaseApps extends Array<IFirebaseApp> {}\n\nexport class FirebaseApps {\n constructor() {\n return getApps();\n }\n}\n\nexport const firebaseApp$ = timer(0, 300).pipe(\n concatMap(() => from(getApps())),\n distinct(),\n);\n","import {\n Inject,\n InjectionToken,\n Injector,\n ModuleWithProviders,\n VERSION as NG_VERSION,\n NgModule,\n NgZone,\n Optional,\n PLATFORM_ID,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers } from '@angular/fire';\nimport { FirebaseApp as IFirebaseApp, getApp, registerVersion } from 'firebase/app';\nimport { FirebaseApp, FirebaseApps } from './app';\n\nexport function defaultFirebaseAppFactory(provided: FirebaseApp[]|undefined) {\n // Use the provided app, if there is only one, otherwise fetch the default app\n if (provided && provided.length === 1) { return provided[0]; }\n return new FirebaseApp(getApp());\n}\n\n// With FIREBASE_APPS I wanted to capture the default app instance, if it is initialized by\n// the reserved URL; ɵPROVIDED_FIREBASE_APPS is not for public consumption and serves to ensure that all\n// provideFirebaseApp(...) calls are satisfied before FirebaseApp$ or FirebaseApp is resolved\nexport const PROVIDED_FIREBASE_APPS = new InjectionToken<FirebaseApp[]>('angularfire2._apps');\n\n// Injecting FirebaseApp will now only inject the default Firebase App\n// this allows allows beginners to import /__/firebase/init.js to auto initialize Firebase App\n// from the reserved URL.\nconst DEFAULT_FIREBASE_APP_PROVIDER = {\n provide: FirebaseApp,\n useFactory: defaultFirebaseAppFactory,\n deps: [\n [new Optional(), PROVIDED_FIREBASE_APPS ],\n ],\n};\n\nconst FIREBASE_APPS_PROVIDER = {\n provide: FirebaseApps,\n deps: [\n [new Optional(), PROVIDED_FIREBASE_APPS ],\n ],\n};\n\nexport function firebaseAppFactory(fn: (injector: Injector) => IFirebaseApp) {\n return (zone: NgZone, injector: Injector) => {\n const app = zone.runOutsideAngular(() => fn(injector));\n return new FirebaseApp(app);\n };\n}\n\n@NgModule({\n providers: [\n DEFAULT_FIREBASE_APP_PROVIDER,\n FIREBASE_APPS_PROVIDER,\n ]\n})\nexport class FirebaseAppModule {\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(@Inject(PLATFORM_ID) platformId: Object) {\n registerVersion('angularfire', VERSION.full, 'core');\n registerVersion('angularfire', VERSION.full, 'app');\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n registerVersion('angular', NG_VERSION.full, platformId.toString());\n }\n}\n\n// Calling initializeApp({ ... }, 'name') multiple times will add more FirebaseApps into the FIREBASE_APPS\n// injection scope. This allows developers to more easily work with multiple Firebase Applications. Downside\n// is that DI for app name and options doesn't really make sense anymore.\nexport function provideFirebaseApp(fn: (injector: Injector) => IFirebaseApp, ...deps: any[]): ModuleWithProviders<FirebaseAppModule> {\n return {\n ngModule: FirebaseAppModule,\n providers: [{\n provide: PROVIDED_FIREBASE_APPS,\n useFactory: firebaseAppFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n ɵAngularFireSchedulers,\n ...deps,\n ],\n }],\n };\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/app';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n deleteApp as _deleteApp,\n getApp as _getApp,\n getApps as _getApps,\n initializeApp as _initializeApp,\n onLog as _onLog,\n registerVersion as _registerVersion,\n setLogLevel as _setLogLevel\n} from 'firebase/app';\n\nexport const deleteApp = ɵzoneWrap(_deleteApp, true);\nexport const getApp = ɵzoneWrap(_getApp, true);\nexport const getApps = ɵzoneWrap(_getApps, true);\nexport const initializeApp = ɵzoneWrap(_initializeApp, true);\nexport const onLog = ɵzoneWrap(_onLog, true);\nexport const registerVersion = ɵzoneWrap(_registerVersion, true);\nexport const setLogLevel = ɵzoneWrap(_setLogLevel, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["getApps","getApp","registerVersion","NG_VERSION","_deleteApp","_getApp","_getApps","_initializeApp","_onLog","_registerVersion","_setLogLevel"],"mappings":";;;;;;;;MAoBa,WAAW,CAAA;AACtB,IAAA,WAAA,CAAY,GAAiB,EAAA;AAC3B,QAAA,OAAO,GAAG,CAAC;KACZ;AACF,CAAA;MAKY,YAAY,CAAA;AACvB,IAAA,WAAA,GAAA;QACE,OAAOA,SAAO,EAAE,CAAC;KAClB;AACF,CAAA;AAEM,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAC5C,SAAS,CAAC,MAAM,IAAI,CAACA,SAAO,EAAE,CAAC,CAAC,EAChC,QAAQ,EAAE;;ACtBN,SAAU,yBAAyB,CAAC,QAAiC,EAAA;;AAEzE,IAAA,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,QAAA,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAE,KAAA;AAC9D,IAAA,OAAO,IAAI,WAAW,CAACC,QAAM,EAAE,CAAC,CAAC;AACnC,CAAC;AAED;AACA;AACA;AACO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAgB,oBAAoB,CAAC,CAAC;AAE9F;AACA;AACA;AACA,MAAM,6BAA6B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E,IAAI;;ACnBvD;;AAEG;;;;"}
|
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/fire/auth';
|
|
4
|
+
import { user } from '@angular/fire/auth';
|
|
3
5
|
import * as i1 from '@angular/router';
|
|
4
6
|
import { of, pipe } from 'rxjs';
|
|
5
7
|
import { map, take, switchMap } from 'rxjs/operators';
|
|
6
|
-
import * as i2 from '@angular/fire/auth';
|
|
7
|
-
import { user } from '@angular/fire/auth';
|
|
8
|
-
import { registerVersion } from 'firebase/app';
|
|
9
8
|
import { VERSION } from '@angular/fire';
|
|
9
|
+
import { registerVersion } from 'firebase/app';
|
|
10
10
|
|
|
11
11
|
const loggedIn = map(user => !!user);
|
|
12
12
|
class AuthGuard {
|
|
13
|
+
router;
|
|
14
|
+
auth;
|
|
13
15
|
constructor(router, auth) {
|
|
14
16
|
this.router = router;
|
|
15
17
|
this.auth = auth;
|
|
16
|
-
this.canActivate = (next, state) => {
|
|
17
|
-
const authPipeFactory = next.data.authGuardPipe || (() => loggedIn);
|
|
18
|
-
return user(this.auth).pipe(take(1), authPipeFactory(next, state), map(can => {
|
|
19
|
-
if (typeof can === 'boolean') {
|
|
20
|
-
return can;
|
|
21
|
-
}
|
|
22
|
-
else if (Array.isArray(can)) {
|
|
23
|
-
return this.router.createUrlTree(can);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
// TODO(EdricChan03): Add tests
|
|
27
|
-
return this.router.parseUrl(can);
|
|
28
|
-
}
|
|
29
|
-
}));
|
|
30
|
-
};
|
|
31
18
|
}
|
|
19
|
+
canActivate = (next, state) => {
|
|
20
|
+
const authPipeFactory = next.data.authGuardPipe || (() => loggedIn);
|
|
21
|
+
return user(this.auth).pipe(take(1), authPipeFactory(next, state), map(can => {
|
|
22
|
+
if (typeof can === 'boolean') {
|
|
23
|
+
return can;
|
|
24
|
+
}
|
|
25
|
+
else if (Array.isArray(can)) {
|
|
26
|
+
return this.router.createUrlTree(can);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
// TODO(EdricChan03): Add tests
|
|
30
|
+
return this.router.parseUrl(can);
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthGuard, deps: [{ token: i1.Router }, { token: i2.Auth }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
35
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthGuard, providedIn: 'any' });
|
|
32
36
|
}
|
|
33
|
-
|
|
34
|
-
AuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuard, providedIn: 'any' });
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuard, decorators: [{
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthGuard, decorators: [{
|
|
36
38
|
type: Injectable,
|
|
37
39
|
args: [{
|
|
38
40
|
providedIn: 'any'
|
|
@@ -45,7 +47,9 @@ const isNotAnonymous = map(user => !!user && !user.isAnonymous);
|
|
|
45
47
|
const idTokenResult = switchMap((user) => user ? user.getIdTokenResult() : of(null));
|
|
46
48
|
const emailVerified = map(user => !!user && user.emailVerified);
|
|
47
49
|
const customClaims = pipe(idTokenResult, map(idTokenResult => idTokenResult ? idTokenResult.claims : []));
|
|
48
|
-
const hasCustomClaim =
|
|
50
|
+
const hasCustomClaim =
|
|
51
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
52
|
+
(claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)));
|
|
49
53
|
const redirectUnauthorizedTo = (redirect) => pipe(loggedIn, map(loggedIn => loggedIn || redirect));
|
|
50
54
|
const redirectLoggedInTo = (redirect) => pipe(loggedIn, map(loggedIn => loggedIn && redirect || true));
|
|
51
55
|
|
|
@@ -53,11 +57,11 @@ class AuthGuardModule {
|
|
|
53
57
|
constructor() {
|
|
54
58
|
registerVersion('angularfire', VERSION.full, 'auth-guard');
|
|
55
59
|
}
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthGuardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
61
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: AuthGuardModule });
|
|
62
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthGuardModule, providers: [AuthGuard] });
|
|
56
63
|
}
|
|
57
|
-
|
|
58
|
-
AuthGuardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuardModule });
|
|
59
|
-
AuthGuardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuardModule, providers: [AuthGuard] });
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthGuardModule, decorators: [{
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthGuardModule, decorators: [{
|
|
61
65
|
type: NgModule,
|
|
62
66
|
args: [{
|
|
63
67
|
providers: [AuthGuard]
|
|
@@ -69,4 +73,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
69
73
|
*/
|
|
70
74
|
|
|
71
75
|
export { AuthGuard, AuthGuardModule, canActivate, customClaims, emailVerified, hasCustomClaim, idTokenResult, isNotAnonymous, loggedIn, redirectLoggedInTo, redirectUnauthorizedTo };
|
|
72
|
-
//# sourceMappingURL=angular-fire-auth-guard.
|
|
76
|
+
//# sourceMappingURL=angular-fire-auth-guard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-fire-auth-guard.mjs","sources":["../../../src/auth-guard/auth-guard.ts","../../../src/auth-guard/auth-guard.module.ts","../../../src/auth-guard/angular-fire-auth-guard.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Auth, user } from '@angular/fire/auth';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { User } from 'firebase/auth';\nimport { Observable, UnaryFunction, of, pipe } from 'rxjs';\nimport { map, switchMap, take } from 'rxjs/operators';\n\nexport type AuthPipeGenerator = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => AuthPipe;\nexport type AuthPipe = UnaryFunction<Observable<User|null>, Observable<boolean|string|any[]>>;\n\nexport const loggedIn: AuthPipe = map(user => !!user);\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AuthGuard implements CanActivate {\n\n constructor(private router: Router, private auth: Auth) {}\n\n canActivate = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const authPipeFactory = next.data.authGuardPipe as AuthPipeGenerator || (() => loggedIn);\n return user(this.auth).pipe(\n take(1),\n authPipeFactory(next, state),\n map(can => {\n if (typeof can === 'boolean') {\n return can;\n } else if (Array.isArray(can)) {\n return this.router.createUrlTree(can);\n } else {\n // TODO(EdricChan03): Add tests\n return this.router.parseUrl(can);\n }\n })\n );\n }\n\n}\n\nexport const canActivate = (pipe: AuthPipeGenerator) => ({\n canActivate: [ AuthGuard ], data: { authGuardPipe: pipe }\n});\n\nexport const isNotAnonymous: AuthPipe = map(user => !!user && !user.isAnonymous);\nexport const idTokenResult = switchMap((user: User|null) => user ? user.getIdTokenResult() : of(null));\nexport const emailVerified: AuthPipe = map(user => !!user && user.emailVerified);\nexport const customClaims = pipe(idTokenResult, map(idTokenResult => idTokenResult ? idTokenResult.claims : []));\nexport const hasCustomClaim: (claim: string) => AuthPipe =\n // eslint-disable-next-line no-prototype-builtins\n (claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)));\nexport const redirectUnauthorizedTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn || redirect));\nexport const redirectLoggedInTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn && redirect || true));\n","import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport { registerVersion } from 'firebase/app';\nimport { AuthGuard } from './auth-guard';\n\n@NgModule({\n providers: [ AuthGuard ]\n})\nexport class AuthGuardModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'auth-guard');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAUO,MAAM,QAAQ,GAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE;MAKzC,SAAS,CAAA;AAEA,IAAA,MAAA,CAAA;AAAwB,IAAA,IAAA,CAAA;IAA5C,WAAoB,CAAA,MAAc,EAAU,IAAU,EAAA;QAAlC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAAU,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAM;KAAI;AAE1D,IAAA,WAAW,GAAG,CAAC,IAA4B,EAAE,KAA0B,KAAI;AACzE,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,aAAkC,KAAK,MAAM,QAAQ,CAAC,CAAC;QACzF,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACzB,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAC5B,GAAG,CAAC,GAAG,IAAG;AACR,YAAA,IAAI,OAAO,GAA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fire';
|
|
1
|
+
import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵzoneWrap } from '@angular/fire';
|
|
2
2
|
import { timer, from } from 'rxjs';
|
|
3
3
|
import { concatMap, distinct } from 'rxjs/operators';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';
|
|
6
6
|
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
|
7
7
|
import { registerVersion } from 'firebase/app';
|
|
8
|
-
import { AppCheckInstances } from '@angular/fire/app-check';
|
|
9
8
|
import { authState as authState$1, user as user$1, idToken as idToken$1 } from 'rxfire/auth';
|
|
10
|
-
import { applyActionCode as applyActionCode$1, beforeAuthStateChanged as beforeAuthStateChanged$1, checkActionCode as checkActionCode$1, confirmPasswordReset as confirmPasswordReset$1, connectAuthEmulator as connectAuthEmulator$1, createUserWithEmailAndPassword as createUserWithEmailAndPassword$1, deleteUser as deleteUser$1, fetchSignInMethodsForEmail as fetchSignInMethodsForEmail$1, getAdditionalUserInfo as getAdditionalUserInfo$1, getAuth as getAuth$1, getIdToken as getIdToken$1, getIdTokenResult as getIdTokenResult$1, getMultiFactorResolver as getMultiFactorResolver$1, getRedirectResult as getRedirectResult$1, initializeAuth as initializeAuth$1, isSignInWithEmailLink as isSignInWithEmailLink$1, linkWithCredential as linkWithCredential$1, linkWithPhoneNumber as linkWithPhoneNumber$1, linkWithPopup as linkWithPopup$1, linkWithRedirect as linkWithRedirect$1, multiFactor as multiFactor$1, onAuthStateChanged as onAuthStateChanged$1, onIdTokenChanged as onIdTokenChanged$1, parseActionCodeURL as parseActionCodeURL$1, reauthenticateWithCredential as reauthenticateWithCredential$1, reauthenticateWithPhoneNumber as reauthenticateWithPhoneNumber$1, reauthenticateWithPopup as reauthenticateWithPopup$1, reauthenticateWithRedirect as reauthenticateWithRedirect$1, reload as reload$1, sendEmailVerification as sendEmailVerification$1, sendPasswordResetEmail as sendPasswordResetEmail$1, sendSignInLinkToEmail as sendSignInLinkToEmail$1, setPersistence as setPersistence$1, signInAnonymously as signInAnonymously$1, signInWithCredential as signInWithCredential$1, signInWithCustomToken as signInWithCustomToken$1, signInWithEmailAndPassword as signInWithEmailAndPassword$1, signInWithEmailLink as signInWithEmailLink$1, signInWithPhoneNumber as signInWithPhoneNumber$1, signInWithPopup as signInWithPopup$1, signInWithRedirect as signInWithRedirect$1, signOut as signOut$1, unlink as unlink$1, updateCurrentUser as updateCurrentUser$1, updateEmail as updateEmail$1, updatePassword as updatePassword$1, updatePhoneNumber as updatePhoneNumber$1, updateProfile as updateProfile$1, useDeviceLanguage as useDeviceLanguage$1, verifyBeforeUpdateEmail as verifyBeforeUpdateEmail$1, verifyPasswordResetCode as verifyPasswordResetCode$1 } from 'firebase/auth';
|
|
9
|
+
import { applyActionCode as applyActionCode$1, beforeAuthStateChanged as beforeAuthStateChanged$1, checkActionCode as checkActionCode$1, confirmPasswordReset as confirmPasswordReset$1, connectAuthEmulator as connectAuthEmulator$1, createUserWithEmailAndPassword as createUserWithEmailAndPassword$1, deleteUser as deleteUser$1, fetchSignInMethodsForEmail as fetchSignInMethodsForEmail$1, getAdditionalUserInfo as getAdditionalUserInfo$1, getAuth as getAuth$1, getIdToken as getIdToken$1, getIdTokenResult as getIdTokenResult$1, getMultiFactorResolver as getMultiFactorResolver$1, getRedirectResult as getRedirectResult$1, initializeAuth as initializeAuth$1, initializeRecaptchaConfig as initializeRecaptchaConfig$1, isSignInWithEmailLink as isSignInWithEmailLink$1, linkWithCredential as linkWithCredential$1, linkWithPhoneNumber as linkWithPhoneNumber$1, linkWithPopup as linkWithPopup$1, linkWithRedirect as linkWithRedirect$1, multiFactor as multiFactor$1, onAuthStateChanged as onAuthStateChanged$1, onIdTokenChanged as onIdTokenChanged$1, parseActionCodeURL as parseActionCodeURL$1, reauthenticateWithCredential as reauthenticateWithCredential$1, reauthenticateWithPhoneNumber as reauthenticateWithPhoneNumber$1, reauthenticateWithPopup as reauthenticateWithPopup$1, reauthenticateWithRedirect as reauthenticateWithRedirect$1, reload as reload$1, sendEmailVerification as sendEmailVerification$1, sendPasswordResetEmail as sendPasswordResetEmail$1, sendSignInLinkToEmail as sendSignInLinkToEmail$1, setPersistence as setPersistence$1, signInAnonymously as signInAnonymously$1, signInWithCredential as signInWithCredential$1, signInWithCustomToken as signInWithCustomToken$1, signInWithEmailAndPassword as signInWithEmailAndPassword$1, signInWithEmailLink as signInWithEmailLink$1, signInWithPhoneNumber as signInWithPhoneNumber$1, signInWithPopup as signInWithPopup$1, signInWithRedirect as signInWithRedirect$1, signOut as signOut$1, unlink as unlink$1, updateCurrentUser as updateCurrentUser$1, updateEmail as updateEmail$1, updatePassword as updatePassword$1, updatePhoneNumber as updatePhoneNumber$1, updateProfile as updateProfile$1, useDeviceLanguage as useDeviceLanguage$1, validatePassword as validatePassword$1, verifyBeforeUpdateEmail as verifyBeforeUpdateEmail$1, verifyPasswordResetCode as verifyPasswordResetCode$1 } from 'firebase/auth';
|
|
11
10
|
export * from 'firebase/auth';
|
|
12
11
|
|
|
13
12
|
const AUTH_PROVIDER_NAME = 'auth';
|
|
@@ -52,14 +51,14 @@ class AuthModule {
|
|
|
52
51
|
constructor() {
|
|
53
52
|
registerVersion('angularfire', VERSION.full, 'auth');
|
|
54
53
|
}
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
55
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: AuthModule });
|
|
56
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthModule, providers: [
|
|
57
|
+
DEFAULT_AUTH_INSTANCE_PROVIDER,
|
|
58
|
+
AUTH_INSTANCES_PROVIDER,
|
|
59
|
+
] });
|
|
55
60
|
}
|
|
56
|
-
|
|
57
|
-
AuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthModule });
|
|
58
|
-
AuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthModule, providers: [
|
|
59
|
-
DEFAULT_AUTH_INSTANCE_PROVIDER,
|
|
60
|
-
AUTH_INSTANCES_PROVIDER,
|
|
61
|
-
] });
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AuthModule, decorators: [{
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AuthModule, decorators: [{
|
|
63
62
|
type: NgModule,
|
|
64
63
|
args: [{
|
|
65
64
|
providers: [
|
|
@@ -80,7 +79,7 @@ function provideAuth(fn, ...deps) {
|
|
|
80
79
|
Injector,
|
|
81
80
|
ɵAngularFireSchedulers,
|
|
82
81
|
FirebaseApps,
|
|
83
|
-
[new Optional(),
|
|
82
|
+
[new Optional(), ɵAppCheckInstances],
|
|
84
83
|
...deps,
|
|
85
84
|
]
|
|
86
85
|
}]
|
|
@@ -108,6 +107,7 @@ const getIdTokenResult = ɵzoneWrap(getIdTokenResult$1, true);
|
|
|
108
107
|
const getMultiFactorResolver = ɵzoneWrap(getMultiFactorResolver$1, true);
|
|
109
108
|
const getRedirectResult = ɵzoneWrap(getRedirectResult$1, true);
|
|
110
109
|
const initializeAuth = ɵzoneWrap(initializeAuth$1, true);
|
|
110
|
+
const initializeRecaptchaConfig = ɵzoneWrap(initializeRecaptchaConfig$1, true);
|
|
111
111
|
const isSignInWithEmailLink = ɵzoneWrap(isSignInWithEmailLink$1, true);
|
|
112
112
|
const linkWithCredential = ɵzoneWrap(linkWithCredential$1, true);
|
|
113
113
|
const linkWithPhoneNumber = ɵzoneWrap(linkWithPhoneNumber$1, true);
|
|
@@ -142,6 +142,7 @@ const updatePassword = ɵzoneWrap(updatePassword$1, true);
|
|
|
142
142
|
const updatePhoneNumber = ɵzoneWrap(updatePhoneNumber$1, true);
|
|
143
143
|
const updateProfile = ɵzoneWrap(updateProfile$1, true);
|
|
144
144
|
const useDeviceLanguage = ɵzoneWrap(useDeviceLanguage$1, true);
|
|
145
|
+
const validatePassword = ɵzoneWrap(validatePassword$1, true);
|
|
145
146
|
const verifyBeforeUpdateEmail = ɵzoneWrap(verifyBeforeUpdateEmail$1, true);
|
|
146
147
|
const verifyPasswordResetCode = ɵzoneWrap(verifyPasswordResetCode$1, true);
|
|
147
148
|
|
|
@@ -149,5 +150,5 @@ const verifyPasswordResetCode = ɵzoneWrap(verifyPasswordResetCode$1, true);
|
|
|
149
150
|
* Generated bundle index. Do not edit.
|
|
150
151
|
*/
|
|
151
152
|
|
|
152
|
-
export { Auth, AuthInstances, AuthModule, applyActionCode, authInstance$, authState, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, getRedirectResult, idToken, initializeAuth, isSignInWithEmailLink, linkWithCredential, linkWithPhoneNumber, linkWithPopup, linkWithRedirect, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, provideAuth, reauthenticateWithCredential, reauthenticateWithPhoneNumber, reauthenticateWithPopup, reauthenticateWithRedirect, reload, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updatePhoneNumber, updateProfile, useDeviceLanguage, user, verifyBeforeUpdateEmail, verifyPasswordResetCode };
|
|
153
|
-
//# sourceMappingURL=angular-fire-auth.
|
|
153
|
+
export { Auth, AuthInstances, AuthModule, applyActionCode, authInstance$, authState, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, getRedirectResult, idToken, initializeAuth, initializeRecaptchaConfig, isSignInWithEmailLink, linkWithCredential, linkWithPhoneNumber, linkWithPopup, linkWithRedirect, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, provideAuth, reauthenticateWithCredential, reauthenticateWithPhoneNumber, reauthenticateWithPopup, reauthenticateWithRedirect, reload, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updatePhoneNumber, updateProfile, useDeviceLanguage, user, validatePassword, verifyBeforeUpdateEmail, verifyPasswordResetCode };
|
|
154
|
+
//# sourceMappingURL=angular-fire-auth.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-fire-auth.mjs","sources":["../../../src/auth/auth.ts","../../../src/auth/auth.module.ts","../../../src/auth/rxfire.ts","../../../src/auth/firebase.ts","../../../src/auth/angular-fire-auth.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { Auth as FirebaseAuth } from 'firebase/auth';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\nexport const AUTH_PROVIDER_NAME = 'auth';\n\n// see notes in core/firebase.app.module.ts for why we're building the class like this\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface Auth extends FirebaseAuth {}\n\nexport class Auth {\n constructor(auth: FirebaseAuth) {\n return auth;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AuthInstances extends Array<FirebaseAuth> {}\n\nexport class AuthInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseAuth>(AUTH_PROVIDER_NAME);\n }\n}\n\nexport const authInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseAuth>(AUTH_PROVIDER_NAME))),\n distinct(),\n);\n","import { InjectionToken, Injector, ModuleWithProviders, NgModule, NgZone, Optional } from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { ɵAppCheckInstances } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { Auth as FirebaseAuth } from 'firebase/auth';\nimport { AUTH_PROVIDER_NAME, Auth, AuthInstances } from './auth';\n\nexport const PROVIDED_AUTH_INSTANCES = new InjectionToken<Auth[]>('angularfire2.auth-instances');\n\nexport function defaultAuthInstanceFactory(provided: FirebaseAuth[]|undefined, defaultApp: FirebaseApp) {\n const defaultAuth = ɵgetDefaultInstanceOf<FirebaseAuth>(AUTH_PROVIDER_NAME, provided, defaultApp);\n return defaultAuth && new Auth(defaultAuth);\n}\n\nexport function authInstanceFactory(fn: (injector: Injector) => FirebaseAuth) {\n return (zone: NgZone, injector: Injector) => {\n const auth = zone.runOutsideAngular(() => fn(injector));\n return new Auth(auth);\n };\n}\n\nconst AUTH_INSTANCES_PROVIDER = {\n provide: AuthInstances,\n deps: [\n [new Optional(), PROVIDED_AUTH_INSTANCES ],\n ]\n};\n\nconst DEFAULT_AUTH_INSTANCE_PROVIDER = {\n provide: Auth,\n useFactory: defaultAuthInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_AUTH_INSTANCES ],\n FirebaseApp,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_AUTH_INSTANCE_PROVIDER,\n AUTH_INSTANCES_PROVIDER,\n ]\n})\nexport class AuthModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'auth');\n }\n}\n\nexport function provideAuth(fn: (injector: Injector) => FirebaseAuth, ...deps: any[]): ModuleWithProviders<AuthModule> {\n return {\n ngModule: AuthModule,\n providers: [{\n provide: PROVIDED_AUTH_INSTANCES,\n useFactory: authInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n ɵAngularFireSchedulers,\n FirebaseApps,\n [new Optional(), ɵAppCheckInstances ],\n ...deps,\n ]\n }]\n };\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n authState as _authState,\n user as _user,\n idToken as _idToken\n} from 'rxfire/auth';\n\nexport const authState = ɵzoneWrap(_authState, true);\nexport const user = ɵzoneWrap(_user, true);\nexport const idToken = ɵzoneWrap(_idToken, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/auth';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n applyActionCode as _applyActionCode,\n beforeAuthStateChanged as _beforeAuthStateChanged,\n checkActionCode as _checkActionCode,\n confirmPasswordReset as _confirmPasswordReset,\n connectAuthEmulator as _connectAuthEmulator,\n createUserWithEmailAndPassword as _createUserWithEmailAndPassword,\n deleteUser as _deleteUser,\n fetchSignInMethodsForEmail as _fetchSignInMethodsForEmail,\n getAdditionalUserInfo as _getAdditionalUserInfo,\n getAuth as _getAuth,\n getIdToken as _getIdToken,\n getIdTokenResult as _getIdTokenResult,\n getMultiFactorResolver as _getMultiFactorResolver,\n getRedirectResult as _getRedirectResult,\n initializeAuth as _initializeAuth,\n initializeRecaptchaConfig as _initializeRecaptchaConfig,\n isSignInWithEmailLink as _isSignInWithEmailLink,\n linkWithCredential as _linkWithCredential,\n linkWithPhoneNumber as _linkWithPhoneNumber,\n linkWithPopup as _linkWithPopup,\n linkWithRedirect as _linkWithRedirect,\n multiFactor as _multiFactor,\n onAuthStateChanged as _onAuthStateChanged,\n onIdTokenChanged as _onIdTokenChanged,\n parseActionCodeURL as _parseActionCodeURL,\n reauthenticateWithCredential as _reauthenticateWithCredential,\n reauthenticateWithPhoneNumber as _reauthenticateWithPhoneNumber,\n reauthenticateWithPopup as _reauthenticateWithPopup,\n reauthenticateWithRedirect as _reauthenticateWithRedirect,\n reload as _reload,\n sendEmailVerification as _sendEmailVerification,\n sendPasswordResetEmail as _sendPasswordResetEmail,\n sendSignInLinkToEmail as _sendSignInLinkToEmail,\n setPersistence as _setPersistence,\n signInAnonymously as _signInAnonymously,\n signInWithCredential as _signInWithCredential,\n signInWithCustomToken as _signInWithCustomToken,\n signInWithEmailAndPassword as _signInWithEmailAndPassword,\n signInWithEmailLink as _signInWithEmailLink,\n signInWithPhoneNumber as _signInWithPhoneNumber,\n signInWithPopup as _signInWithPopup,\n signInWithRedirect as _signInWithRedirect,\n signOut as _signOut,\n unlink as _unlink,\n updateCurrentUser as _updateCurrentUser,\n updateEmail as _updateEmail,\n updatePassword as _updatePassword,\n updatePhoneNumber as _updatePhoneNumber,\n updateProfile as _updateProfile,\n useDeviceLanguage as _useDeviceLanguage,\n validatePassword as _validatePassword,\n verifyBeforeUpdateEmail as _verifyBeforeUpdateEmail,\n verifyPasswordResetCode as _verifyPasswordResetCode\n} from 'firebase/auth';\n\nexport const applyActionCode = ɵzoneWrap(_applyActionCode, true);\nexport const beforeAuthStateChanged = ɵzoneWrap(_beforeAuthStateChanged, true);\nexport const checkActionCode = ɵzoneWrap(_checkActionCode, true);\nexport const confirmPasswordReset = ɵzoneWrap(_confirmPasswordReset, true);\nexport const connectAuthEmulator = ɵzoneWrap(_connectAuthEmulator, true);\nexport const createUserWithEmailAndPassword = ɵzoneWrap(_createUserWithEmailAndPassword, true);\nexport const deleteUser = ɵzoneWrap(_deleteUser, true);\nexport const fetchSignInMethodsForEmail = ɵzoneWrap(_fetchSignInMethodsForEmail, true);\nexport const getAdditionalUserInfo = ɵzoneWrap(_getAdditionalUserInfo, true);\nexport const getAuth = ɵzoneWrap(_getAuth, true);\nexport const getIdToken = ɵzoneWrap(_getIdToken, true);\nexport const getIdTokenResult = ɵzoneWrap(_getIdTokenResult, true);\nexport const getMultiFactorResolver = ɵzoneWrap(_getMultiFactorResolver, true);\nexport const getRedirectResult = ɵzoneWrap(_getRedirectResult, true);\nexport const initializeAuth = ɵzoneWrap(_initializeAuth, true);\nexport const initializeRecaptchaConfig = ɵzoneWrap(_initializeRecaptchaConfig, true);\nexport const isSignInWithEmailLink = ɵzoneWrap(_isSignInWithEmailLink, true);\nexport const linkWithCredential = ɵzoneWrap(_linkWithCredential, true);\nexport const linkWithPhoneNumber = ɵzoneWrap(_linkWithPhoneNumber, true);\nexport const linkWithPopup = ɵzoneWrap(_linkWithPopup, true);\nexport const linkWithRedirect = ɵzoneWrap(_linkWithRedirect, true);\nexport const multiFactor = ɵzoneWrap(_multiFactor, true);\nexport const onAuthStateChanged = ɵzoneWrap(_onAuthStateChanged, true);\nexport const onIdTokenChanged = ɵzoneWrap(_onIdTokenChanged, true);\nexport const parseActionCodeURL = ɵzoneWrap(_parseActionCodeURL, true);\nexport const reauthenticateWithCredential = ɵzoneWrap(_reauthenticateWithCredential, true);\nexport const reauthenticateWithPhoneNumber = ɵzoneWrap(_reauthenticateWithPhoneNumber, true);\nexport const reauthenticateWithPopup = ɵzoneWrap(_reauthenticateWithPopup, true);\nexport const reauthenticateWithRedirect = ɵzoneWrap(_reauthenticateWithRedirect, true);\nexport const reload = ɵzoneWrap(_reload, true);\nexport const sendEmailVerification = ɵzoneWrap(_sendEmailVerification, true);\nexport const sendPasswordResetEmail = ɵzoneWrap(_sendPasswordResetEmail, true);\nexport const sendSignInLinkToEmail = ɵzoneWrap(_sendSignInLinkToEmail, true);\nexport const setPersistence = ɵzoneWrap(_setPersistence, true);\nexport const signInAnonymously = ɵzoneWrap(_signInAnonymously, true);\nexport const signInWithCredential = ɵzoneWrap(_signInWithCredential, true);\nexport const signInWithCustomToken = ɵzoneWrap(_signInWithCustomToken, true);\nexport const signInWithEmailAndPassword = ɵzoneWrap(_signInWithEmailAndPassword, true);\nexport const signInWithEmailLink = ɵzoneWrap(_signInWithEmailLink, true);\nexport const signInWithPhoneNumber = ɵzoneWrap(_signInWithPhoneNumber, true);\nexport const signInWithPopup = ɵzoneWrap(_signInWithPopup, true);\nexport const signInWithRedirect = ɵzoneWrap(_signInWithRedirect, true);\nexport const signOut = ɵzoneWrap(_signOut, true);\nexport const unlink = ɵzoneWrap(_unlink, true);\nexport const updateCurrentUser = ɵzoneWrap(_updateCurrentUser, true);\nexport const updateEmail = ɵzoneWrap(_updateEmail, true);\nexport const updatePassword = ɵzoneWrap(_updatePassword, true);\nexport const updatePhoneNumber = ɵzoneWrap(_updatePhoneNumber, true);\nexport const updateProfile = ɵzoneWrap(_updateProfile, true);\nexport const useDeviceLanguage = ɵzoneWrap(_useDeviceLanguage, true);\nexport const validatePassword = ɵzoneWrap(_validatePassword, true);\nexport const verifyBeforeUpdateEmail = ɵzoneWrap(_verifyBeforeUpdateEmail, true);\nexport const verifyPasswordResetCode = ɵzoneWrap(_verifyPasswordResetCode, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["_authState","_user","_idToken","_applyActionCode","_beforeAuthStateChanged","_checkActionCode","_confirmPasswordReset","_connectAuthEmulator","_createUserWithEmailAndPassword","_deleteUser","_fetchSignInMethodsForEmail","_getAdditionalUserInfo","_getAuth","_getIdToken","_getIdTokenResult","_getMultiFactorResolver","_getRedirectResult","_initializeAuth","_initializeRecaptchaConfig","_isSignInWithEmailLink","_linkWithCredential","_linkWithPhoneNumber","_linkWithPopup","_linkWithRedirect","_multiFactor","_onAuthStateChanged","_onIdTokenChanged","_parseActionCodeURL","_reauthenticateWithCredential","_reauthenticateWithPhoneNumber","_reauthenticateWithPopup","_reauthenticateWithRedirect","_reload","_sendEmailVerification","_sendPasswordResetEmail","_sendSignInLinkToEmail","_setPersistence","_signInAnonymously","_signInWithCredential","_signInWithCustomToken","_signInWithEmailAndPassword","_signInWithEmailLink","_signInWithPhoneNumber","_signInWithPopup","_signInWithRedirect","_signOut","_unlink","_updateCurrentUser","_updateEmail","_updatePassword","_updatePhoneNumber","_updateProfile","_useDeviceLanguage","_validatePassword","_verifyBeforeUpdateEmail","_verifyPasswordResetCode"],"mappings":";;;;;;;;;;;AAKO,MAAM,kBAAkB,GAAG,MAAM,CAAC;MAM5B,IAAI,CAAA;AACf,IAAA,WAAA,CAAY,IAAkB,EAAA;AAC5B,QAAA,OAAO,IAAI,CAAC;KACb;AACF,CAAA;MAKY,aAAa,CAAA;AACxB,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,kBAAkB,CAAe,kBAAkB,CAAC,CAAC;KAC7D;AACF,CAAA;AAEM,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAC7C,SAAS,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAe,kBAAkB,CAAC,CAAC,CAAC,EAC3E,QAAQ,EAAE;;ACpBL,MAAM,uBAAuB,GAAG,IAAI,cAAc,CAAS,6BAA6B,CAAC,CAAC;AAEjF,SAAA,0BAA0B,CAAC,QAAkC,EAAE,UAAuB,EAAA;IACpG,MAAM,WAAW,GAAG,qBAAqB,CAAe,kBAAkB,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAClG,IAAA,OAAO,WAAW,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;AAC9C,CAAC;AAEK,SAAU,mBAAmB,CAAC,EAAwC,EAAA;AAC1E,IAAA,OAAO,CAAC,IAAY,EAAE,QAAkB,KAAI;AAC1C,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxD,QAAA,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,KAAC,CAAC;AACJ,CAAC;AAED,MAAM,uBAAuB,GAAG;AAC9B,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,IAAI,EAAE;AACJ,QAAA,CAAC,IA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BAAwB,EAAE,IAAI;;AC/G/E;;AAEG;;;;"}
|
package/{fesm2015/angular-fire-compat-analytics.js → fesm2022/angular-fire-compat-analytics.mjs}
RENAMED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, PLATFORM_ID, Injectable, Optional, Inject, NgModule } from '@angular/core';
|
|
4
|
-
import { of, EMPTY } from 'rxjs';
|
|
5
|
-
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
6
|
-
import { observeOn, switchMap, map, shareReplay } from 'rxjs/operators';
|
|
7
4
|
import * as i2 from '@angular/fire';
|
|
8
5
|
import { VERSION } from '@angular/fire';
|
|
9
6
|
import * as i1 from '@angular/fire/compat';
|
|
10
7
|
import { ɵcacheInstance, ɵlazySDKProxy, ɵapplyMixins } from '@angular/fire/compat';
|
|
11
8
|
import { isSupported } from 'firebase/analytics';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import * as i2$1 from '@angular/fire/compat/auth';
|
|
9
|
+
import { of, EMPTY } from 'rxjs';
|
|
10
|
+
import { observeOn, switchMap, map, shareReplay } from 'rxjs/operators';
|
|
15
11
|
import firebase from 'firebase/compat/app';
|
|
16
12
|
import { ɵscreenViewEvent } from '@angular/fire/analytics';
|
|
13
|
+
import * as i3 from '@angular/platform-browser';
|
|
14
|
+
import * as i2$2 from '@angular/router';
|
|
15
|
+
import * as i2$1 from '@angular/fire/compat/auth';
|
|
17
16
|
|
|
18
17
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
19
18
|
// Export a null object with the same keys as firebase/compat/analytics, so Proxy can work with proxy-polyfill in Internet Explorer
|
|
@@ -39,10 +38,15 @@ const GTAG_FUNCTION_NAME = 'gtag'; // TODO rename these
|
|
|
39
38
|
const DATA_LAYER_NAME = 'dataLayer';
|
|
40
39
|
const SEND_TO_KEY = 'send_to';
|
|
41
40
|
class AngularFireAnalytics {
|
|
41
|
+
measurementId;
|
|
42
|
+
analyticsInitialized = new Promise(() => undefined);
|
|
43
|
+
async updateConfig(config) {
|
|
44
|
+
await this.analyticsInitialized;
|
|
45
|
+
window[GTAG_FUNCTION_NAME](GTAG_CONFIG_COMMAND, this.measurementId, { ...config, update: true });
|
|
46
|
+
}
|
|
42
47
|
constructor(app, analyticsCollectionEnabled, providedAppVersion, providedAppName, debugModeEnabled, providedConfig,
|
|
43
|
-
//
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
44
49
|
platformId, zone, schedulers) {
|
|
45
|
-
this.analyticsInitialized = new Promise(() => { });
|
|
46
50
|
if (isPlatformBrowser(platformId)) {
|
|
47
51
|
window[DATA_LAYER_NAME] = window[DATA_LAYER_NAME] || [];
|
|
48
52
|
// It turns out we can't rely on the measurementId in the Firebase config JSON
|
|
@@ -77,7 +81,7 @@ class AngularFireAnalytics {
|
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
83
|
if (debugModeEnabled && typeof console !== 'undefined') {
|
|
80
|
-
//
|
|
84
|
+
// eslint-disable-next-line no-console
|
|
81
85
|
console.info(...args);
|
|
82
86
|
}
|
|
83
87
|
/**
|
|
@@ -86,7 +90,6 @@ class AngularFireAnalytics {
|
|
|
86
90
|
* like an array and contains more information then just indexes. Transforming this into arrow function
|
|
87
91
|
* caused issue #2505 where analytics no longer sent any data.
|
|
88
92
|
*/
|
|
89
|
-
// tslint:disable-next-line: only-arrow-functions
|
|
90
93
|
(function (..._args) {
|
|
91
94
|
window[DATA_LAYER_NAME].push(arguments);
|
|
92
95
|
})(...args);
|
|
@@ -131,16 +134,10 @@ class AngularFireAnalytics {
|
|
|
131
134
|
}), shareReplay({ bufferSize: 1, refCount: false }));
|
|
132
135
|
return ɵlazySDKProxy(this, analytics, zone);
|
|
133
136
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
yield this.analyticsInitialized;
|
|
137
|
-
window[GTAG_FUNCTION_NAME](GTAG_CONFIG_COMMAND, this.measurementId, Object.assign(Object.assign({}, config), { update: true }));
|
|
138
|
-
});
|
|
139
|
-
}
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AngularFireAnalytics, deps: [{ token: i1.FirebaseApp }, { token: COLLECTION_ENABLED, optional: true }, { token: APP_VERSION, optional: true }, { token: APP_NAME, optional: true }, { token: DEBUG_MODE, optional: true }, { token: CONFIG, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i2.ɵAngularFireSchedulers }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
138
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AngularFireAnalytics, providedIn: 'any' });
|
|
140
139
|
}
|
|
141
|
-
|
|
142
|
-
AngularFireAnalytics.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalytics, providedIn: 'any' });
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalytics, decorators: [{
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AngularFireAnalytics, decorators: [{
|
|
144
141
|
type: Injectable,
|
|
145
142
|
args: [{
|
|
146
143
|
providedIn: 'any'
|
|
@@ -177,18 +174,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
177
174
|
ɵapplyMixins(AngularFireAnalytics, [proxyPolyfillCompat]);
|
|
178
175
|
|
|
179
176
|
class UserTrackingService {
|
|
177
|
+
initialized;
|
|
178
|
+
disposables = [];
|
|
180
179
|
// TODO a user properties injector
|
|
181
180
|
constructor(analytics,
|
|
182
|
-
//
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
183
182
|
platformId, auth, zone) {
|
|
184
|
-
this.disposables = [];
|
|
185
183
|
firebase.registerVersion('angularfire', VERSION.full, 'compat-user-tracking');
|
|
186
184
|
if (!isPlatformServer(platformId)) {
|
|
187
185
|
let resolveInitialized;
|
|
188
186
|
this.initialized = zone.runOutsideAngular(() => new Promise(resolve => resolveInitialized = resolve));
|
|
189
187
|
this.disposables = [
|
|
190
188
|
auth.authState.subscribe(user => {
|
|
191
|
-
analytics.setUserId(user
|
|
189
|
+
analytics.setUserId(user?.uid);
|
|
192
190
|
resolveInitialized();
|
|
193
191
|
}),
|
|
194
192
|
auth.credential.subscribe(credential => {
|
|
@@ -209,10 +207,10 @@ class UserTrackingService {
|
|
|
209
207
|
ngOnDestroy() {
|
|
210
208
|
this.disposables.forEach(it => it.unsubscribe());
|
|
211
209
|
}
|
|
210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: UserTrackingService, deps: [{ token: AngularFireAnalytics }, { token: PLATFORM_ID }, { token: i2$1.AngularFireAuth }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
211
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: UserTrackingService });
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
UserTrackingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService });
|
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: UserTrackingService, decorators: [{
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: UserTrackingService, decorators: [{
|
|
216
214
|
type: Injectable
|
|
217
215
|
}], ctorParameters: function () { return [{ type: AngularFireAnalytics }, { type: Object, decorators: [{
|
|
218
216
|
type: Inject,
|
|
@@ -221,18 +219,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
221
219
|
|
|
222
220
|
const SCREEN_VIEW_EVENT = 'screen_view';
|
|
223
221
|
class ScreenTrackingService {
|
|
222
|
+
disposable;
|
|
224
223
|
constructor(analytics, router, title, componentFactoryResolver, zone, userTrackingService) {
|
|
225
224
|
firebase.registerVersion('angularfire', VERSION.full, 'compat-screen-tracking');
|
|
226
225
|
if (!router || !analytics) {
|
|
227
226
|
return this;
|
|
228
227
|
}
|
|
229
228
|
zone.runOutsideAngular(() => {
|
|
230
|
-
this.disposable = ɵscreenViewEvent(router, title, componentFactoryResolver).pipe(switchMap((params) =>
|
|
229
|
+
this.disposable = ɵscreenViewEvent(router, title, componentFactoryResolver).pipe(switchMap(async (params) => {
|
|
231
230
|
if (userTrackingService) {
|
|
232
|
-
|
|
231
|
+
await userTrackingService.initialized;
|
|
233
232
|
}
|
|
234
|
-
return
|
|
235
|
-
}))
|
|
233
|
+
return await analytics.logEvent(SCREEN_VIEW_EVENT, params);
|
|
234
|
+
})).subscribe();
|
|
236
235
|
});
|
|
237
236
|
}
|
|
238
237
|
ngOnDestroy() {
|
|
@@ -240,10 +239,10 @@ class ScreenTrackingService {
|
|
|
240
239
|
this.disposable.unsubscribe();
|
|
241
240
|
}
|
|
242
241
|
}
|
|
242
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ScreenTrackingService, deps: [{ token: AngularFireAnalytics }, { token: i2$2.Router, optional: true }, { token: i3.Title, optional: true }, { token: i0.ComponentFactoryResolver }, { token: i0.NgZone }, { token: UserTrackingService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
243
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ScreenTrackingService });
|
|
243
244
|
}
|
|
244
|
-
|
|
245
|
-
ScreenTrackingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService });
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: ScreenTrackingService, decorators: [{
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ScreenTrackingService, decorators: [{
|
|
247
246
|
type: Injectable
|
|
248
247
|
}], ctorParameters: function () { return [{ type: AngularFireAnalytics }, { type: i2$2.Router, decorators: [{
|
|
249
248
|
type: Optional
|
|
@@ -254,17 +253,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
254
253
|
}] }]; } });
|
|
255
254
|
|
|
256
255
|
class AngularFireAnalyticsModule {
|
|
257
|
-
constructor(analytics,
|
|
256
|
+
constructor(analytics,
|
|
257
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
258
|
+
screenTracking,
|
|
259
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
260
|
+
userTracking) {
|
|
258
261
|
firebase.registerVersion('angularfire', VERSION.full, 'analytics-compat');
|
|
259
262
|
// calling anything on analytics will eagerly load the SDK
|
|
260
|
-
|
|
261
|
-
analytics.app.then(() => { });
|
|
263
|
+
analytics.app.then(() => undefined);
|
|
262
264
|
}
|
|
265
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AngularFireAnalyticsModule, deps: [{ token: AngularFireAnalytics }, { token: ScreenTrackingService, optional: true }, { token: UserTrackingService, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
266
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: AngularFireAnalyticsModule });
|
|
267
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AngularFireAnalyticsModule, providers: [AngularFireAnalytics] });
|
|
263
268
|
}
|
|
264
|
-
|
|
265
|
-
AngularFireAnalyticsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalyticsModule });
|
|
266
|
-
AngularFireAnalyticsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalyticsModule, providers: [AngularFireAnalytics] });
|
|
267
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0, type: AngularFireAnalyticsModule, decorators: [{
|
|
269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AngularFireAnalyticsModule, decorators: [{
|
|
268
270
|
type: NgModule,
|
|
269
271
|
args: [{
|
|
270
272
|
providers: [AngularFireAnalytics]
|
|
@@ -280,4 +282,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImpor
|
|
|
280
282
|
*/
|
|
281
283
|
|
|
282
284
|
export { APP_NAME, APP_VERSION, AngularFireAnalytics, AngularFireAnalyticsModule, COLLECTION_ENABLED, CONFIG, DEBUG_MODE, ScreenTrackingService, UserTrackingService };
|
|
283
|
-
//# sourceMappingURL=angular-fire-compat-analytics.
|
|
285
|
+
//# sourceMappingURL=angular-fire-compat-analytics.mjs.map
|