@angular/fire 7.5.0 → 7.6.0-canary.34e89a4

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.
Files changed (154) hide show
  1. package/README.md +95 -74
  2. package/analytics/is-analytics-supported-factory.d.ts +4 -0
  3. package/bundles/angular-fire-analytics.umd.js +41 -31
  4. package/bundles/angular-fire-analytics.umd.js.map +1 -1
  5. package/bundles/angular-fire-app-check.umd.js +14 -18
  6. package/bundles/angular-fire-app-check.umd.js.map +1 -1
  7. package/bundles/angular-fire-app.umd.js +14 -18
  8. package/bundles/angular-fire-app.umd.js.map +1 -1
  9. package/bundles/angular-fire-auth-guard.umd.js +5 -7
  10. package/bundles/angular-fire-auth-guard.umd.js.map +1 -1
  11. package/bundles/angular-fire-auth.umd.js +64 -68
  12. package/bundles/angular-fire-auth.umd.js.map +1 -1
  13. package/bundles/angular-fire-compat-analytics.umd.js +11 -13
  14. package/bundles/angular-fire-compat-analytics.umd.js.map +1 -1
  15. package/bundles/angular-fire-compat-auth-guard.umd.js +6 -8
  16. package/bundles/angular-fire-compat-auth-guard.umd.js.map +1 -1
  17. package/bundles/angular-fire-compat-auth.umd.js +11 -13
  18. package/bundles/angular-fire-compat-auth.umd.js.map +1 -1
  19. package/bundles/angular-fire-compat-database.umd.js +9 -11
  20. package/bundles/angular-fire-compat-database.umd.js.map +1 -1
  21. package/bundles/angular-fire-compat-firestore.umd.js +9 -11
  22. package/bundles/angular-fire-compat-firestore.umd.js.map +1 -1
  23. package/bundles/angular-fire-compat-functions.umd.js +9 -11
  24. package/bundles/angular-fire-compat-functions.umd.js.map +1 -1
  25. package/bundles/angular-fire-compat-messaging.umd.js +8 -10
  26. package/bundles/angular-fire-compat-messaging.umd.js.map +1 -1
  27. package/bundles/angular-fire-compat-performance.umd.js +8 -10
  28. package/bundles/angular-fire-compat-performance.umd.js.map +1 -1
  29. package/bundles/angular-fire-compat-remote-config.umd.js +9 -11
  30. package/bundles/angular-fire-compat-remote-config.umd.js.map +1 -1
  31. package/bundles/angular-fire-compat-storage.umd.js +8 -10
  32. package/bundles/angular-fire-compat-storage.umd.js.map +1 -1
  33. package/bundles/angular-fire-compat.umd.js +13 -15
  34. package/bundles/angular-fire-compat.umd.js.map +1 -1
  35. package/bundles/angular-fire-database.umd.js +59 -67
  36. package/bundles/angular-fire-database.umd.js.map +1 -1
  37. package/bundles/angular-fire-firestore-lite.umd.js +50 -54
  38. package/bundles/angular-fire-firestore-lite.umd.js.map +1 -1
  39. package/bundles/angular-fire-firestore.umd.js +67 -71
  40. package/bundles/angular-fire-firestore.umd.js.map +1 -1
  41. package/bundles/angular-fire-functions.umd.js +15 -19
  42. package/bundles/angular-fire-functions.umd.js.map +1 -1
  43. package/bundles/angular-fire-messaging.umd.js +33 -23
  44. package/bundles/angular-fire-messaging.umd.js.map +1 -1
  45. package/bundles/angular-fire-performance.umd.js +17 -21
  46. package/bundles/angular-fire-performance.umd.js.map +1 -1
  47. package/bundles/angular-fire-remote-config.umd.js +47 -37
  48. package/bundles/angular-fire-remote-config.umd.js.map +1 -1
  49. package/bundles/angular-fire-storage.umd.js +27 -31
  50. package/bundles/angular-fire-storage.umd.js.map +1 -1
  51. package/bundles/angular-fire.umd.js +16 -59
  52. package/bundles/angular-fire.umd.js.map +1 -1
  53. package/compat/firestore/interfaces.d.ts +4 -4
  54. package/core.d.ts +1 -12
  55. package/docs/analytics.md +67 -0
  56. package/docs/app-check.md +53 -0
  57. package/docs/auth.md +165 -0
  58. package/docs/{analytics → compat/analytics}/getting-started.md +2 -0
  59. package/docs/{auth → compat/auth}/getting-started.md +2 -0
  60. package/docs/{auth → compat/auth}/router-guards.md +2 -0
  61. package/docs/{emulators → compat/emulators}/emulators.md +2 -0
  62. package/docs/{firestore → compat/firestore}/collections.md +2 -0
  63. package/docs/{firestore → compat/firestore}/documents.md +2 -0
  64. package/docs/{firestore → compat/firestore}/offline-data.md +2 -0
  65. package/docs/{firestore → compat/firestore}/querying-collections.md +2 -0
  66. package/docs/{functions → compat/functions}/functions.md +2 -0
  67. package/docs/{messaging → compat/messaging}/messaging.md +2 -0
  68. package/docs/{performance → compat/performance}/getting-started.md +2 -0
  69. package/docs/{remote-config → compat/remote-config}/getting-started.md +2 -0
  70. package/docs/{rtdb → compat/rtdb}/lists.md +2 -0
  71. package/docs/{rtdb → compat/rtdb}/objects.md +2 -0
  72. package/docs/{rtdb → compat/rtdb}/querying-lists.md +2 -0
  73. package/docs/{storage → compat/storage}/storage.md +2 -0
  74. package/docs/compat.md +70 -0
  75. package/docs/database.md +175 -0
  76. package/docs/deploy/getting-started.md +2 -2
  77. package/docs/firestore.md +148 -0
  78. package/docs/functions.md +52 -0
  79. package/docs/images/analytics-illo_1x.png +0 -0
  80. package/docs/images/auth-illo_1x.png +0 -0
  81. package/docs/images/cloud-messaging-illo_1x.png +0 -0
  82. package/docs/images/database-illo_1x.png +0 -0
  83. package/docs/images/firestore-illo_1x.png +0 -0
  84. package/docs/images/functions-illo_1x.png +0 -0
  85. package/docs/images/hosting-illo_1x.png +0 -0
  86. package/docs/images/performance-illo_1x.png +0 -0
  87. package/docs/images/reCAPTCHA-logo@1x.png +0 -0
  88. package/docs/images/remote-config-illo_1x.png +0 -0
  89. package/docs/images/storage-illo_1x.png +0 -0
  90. package/docs/install-and-setup.md +39 -86
  91. package/docs/install-firebase-tools.md +78 -0
  92. package/docs/messaging.md +25 -0
  93. package/docs/performance.md +57 -0
  94. package/docs/remote-config.md +53 -0
  95. package/docs/storage.md +90 -0
  96. package/docs/universal/cloud-functions.md +27 -6
  97. package/docs/universal/getting-started.md +9 -134
  98. package/esm2015/analytics/analytics.module.js +7 -6
  99. package/esm2015/analytics/is-analytics-supported-factory.js +16 -0
  100. package/esm2015/analytics/overrides.js +3 -3
  101. package/esm2015/compat/firestore/interfaces.js +1 -1
  102. package/esm2015/core.js +3 -45
  103. package/esm2015/messaging/is-messaging-supported-factory.js +16 -0
  104. package/esm2015/messaging/messaging.module.js +7 -6
  105. package/esm2015/messaging/overrides.js +3 -3
  106. package/esm2015/remote-config/is-remote-config-supported-factory.js +16 -0
  107. package/esm2015/remote-config/overrides.js +3 -3
  108. package/esm2015/remote-config/remote-config.module.js +7 -6
  109. package/fesm2015/angular-fire-analytics.js +21 -7
  110. package/fesm2015/angular-fire-analytics.js.map +1 -1
  111. package/fesm2015/angular-fire-app-check.js.map +1 -1
  112. package/fesm2015/angular-fire-app.js.map +1 -1
  113. package/fesm2015/angular-fire-auth-guard.js.map +1 -1
  114. package/fesm2015/angular-fire-auth.js.map +1 -1
  115. package/fesm2015/angular-fire-compat-analytics.js.map +1 -1
  116. package/fesm2015/angular-fire-compat-auth-guard.js.map +1 -1
  117. package/fesm2015/angular-fire-compat-auth.js.map +1 -1
  118. package/fesm2015/angular-fire-compat-database.js +1 -1
  119. package/fesm2015/angular-fire-compat-database.js.map +1 -1
  120. package/fesm2015/angular-fire-compat-firestore.js +1 -1
  121. package/fesm2015/angular-fire-compat-firestore.js.map +1 -1
  122. package/fesm2015/angular-fire-compat-functions.js.map +1 -1
  123. package/fesm2015/angular-fire-compat-messaging.js.map +1 -1
  124. package/fesm2015/angular-fire-compat-performance.js.map +1 -1
  125. package/fesm2015/angular-fire-compat-remote-config.js.map +1 -1
  126. package/fesm2015/angular-fire-compat-storage.js.map +1 -1
  127. package/fesm2015/angular-fire-compat.js.map +1 -1
  128. package/fesm2015/angular-fire-database.js.map +1 -1
  129. package/fesm2015/angular-fire-firestore-lite.js.map +1 -1
  130. package/fesm2015/angular-fire-firestore.js.map +1 -1
  131. package/fesm2015/angular-fire-functions.js.map +1 -1
  132. package/fesm2015/angular-fire-messaging.js +21 -7
  133. package/fesm2015/angular-fire-messaging.js.map +1 -1
  134. package/fesm2015/angular-fire-performance.js.map +1 -1
  135. package/fesm2015/angular-fire-remote-config.js +22 -8
  136. package/fesm2015/angular-fire-remote-config.js.map +1 -1
  137. package/fesm2015/angular-fire-storage.js.map +1 -1
  138. package/fesm2015/angular-fire.js +3 -45
  139. package/fesm2015/angular-fire.js.map +1 -1
  140. package/messaging/is-messaging-supported-factory.d.ts +4 -0
  141. package/package.json +9 -10
  142. package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
  143. package/schematics/deploy/actions.js +8 -3
  144. package/schematics/deploy/builder.js +2 -2
  145. package/schematics/firebaseTools.js +4 -2
  146. package/schematics/setup/index.js +58 -29
  147. package/schematics/setup/prompts.js +18 -46
  148. package/schematics/utils.js +32 -28
  149. package/docs/ionic/authentication.md +0 -104
  150. package/docs/ionic/cli.md +0 -218
  151. package/docs/ionic/v2.md +0 -531
  152. package/docs/ionic/v3.md +0 -705
  153. package/schematics/setup/ssr.js +0 -100
  154. package/schematics/setup/static.js +0 -78
package/README.md CHANGED
@@ -3,7 +3,13 @@ The official [Angular](https://angular.io/) library for [Firebase](https://fireb
3
3
 
4
4
  <strong><pre>ng add @angular/fire</pre></strong>
5
5
 
6
- AngularFire smooths over the rough edges an Angular developer might encounter when implementing the framework-agnostic [Firebase JS SDK](https://github.com/firebase/firebase-js-sdk) & aims to provide a more natural developer experience by conforming to Angular conventions.
6
+ _Note: If you want to ng add AngularFire and will be using Hosting/Cloud Functions, you need to configure the
7
+ Firebase CLI first so that you are logged in for the schematics that are run as part of `ng add @angular/fire`.
8
+ Follow [this guide](docs/install-firebase-tools.md) to have the Firebase CLI walk you through the setup._
9
+
10
+ AngularFire smooths over the rough edges an Angular developer might encounter when implementing the framework-agnostic
11
+ [Firebase JS SDK](https://github.com/firebase/firebase-js-sdk) & aims to provide a more natural developer experience
12
+ by conforming to Angular conventions.
7
13
 
8
14
  - **Dependency injection** - Provide and Inject Firebase services in your components
9
15
  - **Zone.js wrappers** - Stable zones allow proper functionality of service workers, forms, SSR, and pre-rendering
@@ -31,6 +37,7 @@ export class AppModule { }
31
37
  ```
32
38
 
33
39
  ```ts
40
+ import { inject } from '@angular/core';
34
41
  import { Firestore, collectionData, collection } from '@angular/fire/firestore';
35
42
  import { Observable } from 'rxjs';
36
43
 
@@ -51,9 +58,11 @@ interface Item {
51
58
  })
52
59
  export class AppComponent {
53
60
  item$: Observable<Item[]>;
54
- constructor(firestore: Firestore) {
55
- const collection = collection(firestore, 'items');
56
- this.item$ = collectionData(collection);
61
+ firestore: Firestore = inject(Firestore);
62
+
63
+ constructor() {
64
+ const itemCollection = collection(this.firestore, 'items');
65
+ this.item$ = collectionData(itemCollection);
57
66
  }
58
67
  }
59
68
  ```
@@ -66,6 +75,7 @@ AngularFire doesn't follow Angular's versioning as Firebase also has breaking ch
66
75
 
67
76
  | Angular | Firebase | AngularFire |
68
77
  | --------|----------|--------------|
78
+ | 16 | 9 | ^7.6 |
69
79
  | 15 | 9 | ^7.5 |
70
80
  | 14 | 9 | ^7.4 |
71
81
  | 13 | 9 | ^7.2 |
@@ -81,7 +91,7 @@ AngularFire doesn't follow Angular's versioning as Firebase also has breaking ch
81
91
 
82
92
  ### Polyfills
83
93
 
84
- Neither AngularFire or Firebase ship with polyfills. To have compatability across as wide-range of environments we suggest the following polyfills be added to your application:
94
+ Neither AngularFire or Firebase ship with polyfills. To have compatibility across as wide-range of environments we suggest the following polyfills be added to your application:
85
95
 
86
96
  | API | Environments | Suggested Polyfill | License |
87
97
  |-----|--------------|--------------------|---------|
@@ -104,7 +114,7 @@ Neither AngularFire or Firebase ship with polyfills. To have compatability acros
104
114
 
105
115
  We have three sample apps in this repository:
106
116
 
107
- 1. [`samples/compat`](samples/compat) a kitchen sink application that demonstrates use of the "compatability" API
117
+ 1. [`samples/compat`](samples/compat) a kitchen sink application that demonstrates use of the "compatibility" API
108
118
  1. [`samples/modular`](samples/modular) a kitchen sink application that demonstrates the new tree-shakable API
109
119
  1. [`samples/advanced`](samples/advanced) the same app as `samples/modular` but demonstrates more advanced concepts such as Angular Universal state-transfer, dynamically importing Firebase feature modules, and Firestore data bundling.
110
120
 
@@ -116,86 +126,97 @@ Get help on our [Q&A board](https://github.com/angular/angularfire/discussions?d
116
126
 
117
127
  ## Developer Guide
118
128
 
119
- AngularFire has a new tree-shakable API, however this is still under active development and documentation is in the works, so we suggest most developers stick with the Compatiability API for the time being. [See the v7 upgrade guide for more information.](docs/version-7-upgrade.md).
120
-
121
- This developer guide assumes you're using the Compatiability API (`@angular/fire/compat/*`).
122
-
123
- ### Monitor usage of your application in production
124
-
125
- > `AngularFireAnalytics` provides a convenient method of interacting with Google Analytics in your Angular application. The provided `ScreenTrackingService` and `UserTrackingService` automatically log events when you're using the Angular Router or Firebase Authentication respectively. [Learn more about Google Analytics](https://firebase.google.com/docs/analytics).
126
-
127
- - [Getting started with Google Analytics](docs/analytics/getting-started.md)
128
-
129
- ### Interacting with your database(s)
130
-
131
- Firebase offers two cloud-based, client-accessible database solutions that support realtime data syncing. [Learn about the differences between them in the Firebase Documentation](https://firebase.google.com/docs/firestore/rtdb-vs-firestore).
132
-
133
- #### Cloud Firestore
134
-
135
- > `AngularFirestore` allows you to work with Cloud Firestore, the new flagship database for mobile app development. It improves on the successes of Realtime Database with a new, more intuitive data model. Cloud Firestore also features richer, faster queries and scales better than Realtime Database.
136
-
137
- - [Documents](docs/firestore/documents.md)
138
- - [Collections](docs/firestore/collections.md)
139
- - [Querying Collections](docs/firestore/querying-collections.md)
140
- - [Offline data](docs/firestore/offline-data.md)
141
-
142
- #### Realtime Database
143
-
144
- > `AngularFireDatabase` allows you to work with the Realtime Database, Firebase's original database. It's an efficient, low-latency solution for mobile apps that require synced states across clients in realtime.
145
-
146
- - [Objects](docs/rtdb/objects.md)
147
- - [Lists](docs/rtdb/lists.md)
148
- - [Querying lists](docs/rtdb/querying-lists.md)
149
-
150
- ### Authenticate users
151
-
152
- - [Getting started with Firebase Authentication](docs/auth/getting-started.md)
153
- - [Route users with AngularFire guards](docs/auth/router-guards.md)
154
-
155
- ### Local Emulator Suite
156
-
157
- - [Getting started with Firebase Emulator Suite](docs/emulators/emulators.md)
158
-
159
- ### Upload files
160
-
161
- - [Getting started with Cloud Storage](docs/storage/storage.md)
162
-
163
- ### Receive push notifications
164
-
165
- - [Getting started with Firebase Messaging](docs/messaging/messaging.md)
129
+ This developer guide assimes you're using the new tree-shakable AngularFire API, [if you're looking for the compatability API you can find the documentation here](docs/compat.md).
166
130
 
167
- ### **BETA:** Change behavior and appearance of your application without deploying
131
+ [See the v7 upgrade guide for more information on this change.](docs/version-7-upgrade.md).
168
132
 
169
- > Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update. [Learn more about Remote Config](https://firebase.google.com/docs/remote-config).
133
+ ### Firebase product integrations
170
134
 
171
- - [Getting started with Remote Config](docs/remote-config/getting-started.md)
135
+ <table>
136
+ <tr>
137
+ <td>
172
138
 
173
- ### Monitor your application performance in production
174
-
175
- > Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS, Android, and web apps. [Learn more about Performance Monitoring](https://firebase.google.com/docs/perf-mon).
139
+ #### [Analytics](docs/analytics.md#analytics)
140
+ ```ts
141
+ import { } from '@angular/fire/analytics';
142
+ ```
143
+ </td>
144
+ <td>
176
145
 
177
- - [Getting started with Performance Monitoring](docs/performance/getting-started.md)
146
+ #### [Authentication](docs/auth.md#authentication)
147
+ ```ts
148
+ import { } from '@angular/fire/auth';
149
+ ```
150
+ </td>
151
+ </tr>
152
+ <tr>
153
+ <td>
178
154
 
179
- ### Directly call Cloud Functions
155
+ #### [Cloud Firestore](docs/firestore.md#cloud-firestore)
156
+ ```ts
157
+ import { } from '@angular/fire/firestore';
158
+ ```
159
+ </td>
160
+ <td>
180
161
 
181
- - [Getting started with Callable Functions](docs/functions/functions.md)
162
+ #### [Cloud Functions](docs/functions.md#cloud-functions)
163
+ ```ts
164
+ import { } from '@angular/fire/functions';
165
+ ```
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <td>
182
170
 
183
- ### Deploying your application
171
+ #### [Cloud Messaging](docs/messaging.md#cloud-messaging)
172
+ ```ts
173
+ import { } from '@angular/fire/messaging';
174
+ ```
175
+ </td>
176
+ <td>
184
177
 
185
- > Firebase Hosting is production-grade web content hosting for developers. With Hosting, you can quickly and easily deploy web apps and static content to a global content delivery network (CDN) with a single command.
178
+ #### [Cloud Storage](docs/storage.md#cloud-storage)
179
+ ```ts
180
+ import { } from '@angular/fire/storage';
181
+ ```
182
+ </td>
183
+ </tr>
184
+ <tr>
185
+ <td>
186
186
 
187
- - [Deploy your application on Firebase Hosting](docs/deploy/getting-started.md)
187
+ #### [Performance Monitoring](docs/performance.md#performance-monitoring)
188
+ ```ts
189
+ import { } from '@angular/fire/performance';
190
+ ```
191
+ </td>
192
+ <td>
188
193
 
189
- #### Server-side rendering
194
+ #### [Realtime Database](docs/database.md#realtime-database)
195
+ ```ts
196
+ import { } from '@angular/fire/database';
197
+ ```
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <td>
190
202
 
191
- > Angular Universal is a technology that allows you to run your Angular application on a server. This allows you to generate your HTML in a process called server-side rendering (SSR). AngularFire is compatible with server-side rendering; allowing you to take advantage of the Search Engine Optimization, link previews, the performance gains granted by the technology, and more. [Learn more about Angular Universal](https://angular.io/guide/universal).
203
+ #### [Remote Config](docs/remote-config.md#remote-config)
204
+ ```ts
205
+ import { } from '@angular/fire/remote-config';
206
+ ```
207
+ </td>
208
+ <td>
192
209
 
193
- - [Getting started with Angular Universal](docs/universal/getting-started.md)
194
- - [Deploying your Universal application on Cloud Functions for Firebase](docs/universal/cloud-functions.md)
195
- - [Prerendering your Universal application](docs/universal/prerendering.md)
210
+ #### [App Check](docs/app-check.md#app-check)
211
+ ```ts
212
+ import { } from '@angular/fire/app-check';
213
+ ```
214
+ </td>
215
+ </tr>
216
+ </table>
196
217
 
197
- ### Ionic
218
+ ### Deploying your site
198
219
 
199
- - [Installation and Setup with Ionic CLI](docs/ionic/cli.md)
200
- - [Using AngularFire with Ionic 2](docs/ionic/v2.md)
201
- - [Using AngularFire with Ionic 3](docs/ionic/v3.md)
220
+ * Deploy to Firebase Hosting
221
+ * Angular Universal: Deploy to Cloud Functions
222
+ * Angular Universal: Deploy to Cloud Run
@@ -0,0 +1,4 @@
1
+ export declare const isAnalyticsSupportedFactory: {
2
+ async: () => any;
3
+ sync: () => any;
4
+ };
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/fire'), require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/fire/app'), require('firebase/app'), require('@angular/router'), require('firebase/analytics'), require('@angular/platform-browser'), require('@angular/fire/auth')) :
3
- typeof define === 'function' && define.amd ? define('@angular/fire/analytics', ['exports', '@angular/fire', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/fire/app', 'firebase/app', '@angular/router', 'firebase/analytics', '@angular/platform-browser', '@angular/fire/auth'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.angular = global.angular || {}, global.angular.fire = global.angular.fire || {}, global.angular.fire.analytics = {}), global.angular.fire, global.rxjs, global.rxjs.operators, global.ng.core, global.angular.fire.app, global.app, global.ng.router, global['firebase-analytics'], global.ng.platformBrowser, global.angular.fire.auth));
5
- }(this, (function (exports, fire, rxjs, operators, i0, app$1, app, i1$1, analytics, i2, i1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/fire'), require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/fire/app'), require('firebase/app'), require('firebase/analytics'), require('@angular/router'), require('@angular/platform-browser'), require('@angular/fire/auth')) :
3
+ typeof define === 'function' && define.amd ? define('@angular/fire/analytics', ['exports', '@angular/fire', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/fire/app', 'firebase/app', 'firebase/analytics', '@angular/router', '@angular/platform-browser', '@angular/fire/auth'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.angular = global.angular || {}, global.angular.fire = global.angular.fire || {}, global.angular.fire.analytics = {}), global.angular.fire, global.rxjs, global.rxjs.operators, global.ng.core, global.angular.fire.app, global.app, global["firebase-analytics"], global.ng.router, global.ng.platformBrowser, global.angular.fire.auth));
5
+ })(this, (function (exports, fire, rxjs, operators, i0, app$1, app, analytics, i1$1, i2, i1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -13,14 +13,12 @@
13
13
  var d = Object.getOwnPropertyDescriptor(e, k);
14
14
  Object.defineProperty(n, k, d.get ? d : {
15
15
  enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
16
+ get: function () { return e[k]; }
19
17
  });
20
18
  }
21
19
  });
22
20
  }
23
- n['default'] = e;
21
+ n["default"] = e;
24
22
  return Object.freeze(n);
25
23
  }
26
24
 
@@ -38,11 +36,11 @@
38
36
  var ANALYTICS_PROVIDER_NAME = 'analytics';
39
37
  var AnalyticsInstances = /** @class */ (function () {
40
38
  function AnalyticsInstances() {
41
- return fire.ɵgetAllInstancesOf(ANALYTICS_PROVIDER_NAME);
39
+ return fire["ɵgetAllInstancesOf"](ANALYTICS_PROVIDER_NAME);
42
40
  }
43
41
  return AnalyticsInstances;
44
42
  }());
45
- var analyticInstance$ = rxjs.timer(0, 300).pipe(operators.concatMap(function () { return rxjs.from(fire.ɵgetAllInstancesOf(ANALYTICS_PROVIDER_NAME)); }), operators.distinct());
43
+ var analyticInstance$ = rxjs.timer(0, 300).pipe(operators.concatMap(function () { return rxjs.from(fire["ɵgetAllInstancesOf"](ANALYTICS_PROVIDER_NAME)); }), operators.distinct());
46
44
 
47
45
  /*! *****************************************************************************
48
46
  Copyright (c) Microsoft Corporation.
@@ -356,17 +354,31 @@
356
354
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
357
355
  }
358
356
 
359
- var isSupported = fire.ɵisAnalyticsSupportedFactory.async;
357
+ var isAnalyticsSupportedValueSymbol = '__angularfire_symbol__analyticsIsSupportedValue';
358
+ var isAnalyticsSupportedPromiseSymbol = '__angularfire_symbol__analyticsIsSupported';
359
+ globalThis[isAnalyticsSupportedPromiseSymbol] || (globalThis[isAnalyticsSupportedPromiseSymbol] = analytics.isSupported().then(function (it) { return globalThis[isAnalyticsSupportedValueSymbol] = it; }).catch(function () { return globalThis[isAnalyticsSupportedValueSymbol] = false; }));
360
+ var isAnalyticsSupportedFactory = {
361
+ async: function () { return globalThis[isAnalyticsSupportedPromiseSymbol]; },
362
+ sync: function () {
363
+ var ret = globalThis[isAnalyticsSupportedValueSymbol];
364
+ if (ret === undefined) {
365
+ throw new Error(fire["ɵisSupportedError"]('Analytics'));
366
+ }
367
+ return ret;
368
+ }
369
+ };
370
+
371
+ var isSupported = isAnalyticsSupportedFactory.async;
360
372
 
361
373
  // DO NOT MODIFY, this file is autogenerated by tools/build.ts
362
- var getAnalytics = fire.ɵzoneWrap(analytics.getAnalytics, true);
363
- var initializeAnalytics = fire.ɵzoneWrap(analytics.initializeAnalytics, true);
364
- var logEvent = fire.ɵzoneWrap(analytics.logEvent, true);
365
- var setAnalyticsCollectionEnabled = fire.ɵzoneWrap(analytics.setAnalyticsCollectionEnabled, true);
366
- var setCurrentScreen = fire.ɵzoneWrap(analytics.setCurrentScreen, true);
367
- var settings = fire.ɵzoneWrap(analytics.settings, true);
368
- var setUserId = fire.ɵzoneWrap(analytics.setUserId, true);
369
- var setUserProperties = fire.ɵzoneWrap(analytics.setUserProperties, true);
374
+ var getAnalytics = fire["ɵzoneWrap"](analytics.getAnalytics, true);
375
+ var initializeAnalytics = fire["ɵzoneWrap"](analytics.initializeAnalytics, true);
376
+ var logEvent = fire["ɵzoneWrap"](analytics.logEvent, true);
377
+ var setAnalyticsCollectionEnabled = fire["ɵzoneWrap"](analytics.setAnalyticsCollectionEnabled, true);
378
+ var setCurrentScreen = fire["ɵzoneWrap"](analytics.setCurrentScreen, true);
379
+ var settings = fire["ɵzoneWrap"](analytics.settings, true);
380
+ var setUserId = fire["ɵzoneWrap"](analytics.setUserId, true);
381
+ var setUserProperties = fire["ɵzoneWrap"](analytics.setUserProperties, true);
370
382
 
371
383
  var UserTrackingService = /** @class */ (function () {
372
384
  function UserTrackingService(auth, zone, injector) {
@@ -468,7 +480,7 @@
468
480
  }
469
481
  var component = actualSnapshot.component;
470
482
  if (component) {
471
- if (component === i1$1.ɵEmptyOutletComponent) {
483
+ if (component === i1$1["ɵEmptyOutletComponent"]) {
472
484
  var deepSnapshot = activationEnd.snapshot;
473
485
  // TODO when might there be mutple children, different outlets? explore
474
486
  while (deepSnapshot.firstChild) {
@@ -550,15 +562,15 @@
550
562
 
551
563
  var PROVIDED_ANALYTICS_INSTANCES = new i0.InjectionToken('angularfire2.analytics-instances');
552
564
  function defaultAnalyticsInstanceFactory(provided, defaultApp) {
553
- if (!fire.ɵisAnalyticsSupportedFactory.sync()) {
565
+ if (!isAnalyticsSupportedFactory.sync()) {
554
566
  return null;
555
567
  }
556
- var defaultAnalytics = fire.ɵgetDefaultInstanceOf(ANALYTICS_PROVIDER_NAME, provided, defaultApp);
568
+ var defaultAnalytics = fire["ɵgetDefaultInstanceOf"](ANALYTICS_PROVIDER_NAME, provided, defaultApp);
557
569
  return defaultAnalytics && new Analytics(defaultAnalytics);
558
570
  }
559
571
  function analyticsInstanceFactory(fn) {
560
572
  return function (zone, injector) {
561
- if (!fire.ɵisAnalyticsSupportedFactory.sync()) {
573
+ if (!isAnalyticsSupportedFactory.sync()) {
562
574
  return null;
563
575
  }
564
576
  var analytics = zone.runOutsideAngular(function () { return fn(injector); });
@@ -592,7 +604,7 @@
592
604
  ANALYTICS_INSTANCES_PROVIDER,
593
605
  {
594
606
  provide: i0.APP_INITIALIZER,
595
- useValue: fire.ɵisAnalyticsSupportedFactory.async,
607
+ useValue: isAnalyticsSupportedFactory.async,
596
608
  multi: true,
597
609
  }
598
610
  ] });
@@ -604,7 +616,7 @@
604
616
  ANALYTICS_INSTANCES_PROVIDER,
605
617
  {
606
618
  provide: i0.APP_INITIALIZER,
607
- useValue: fire.ɵisAnalyticsSupportedFactory.async,
619
+ useValue: isAnalyticsSupportedFactory.async,
608
620
  multi: true,
609
621
  }
610
622
  ]
@@ -630,7 +642,7 @@
630
642
  deps: __spreadArray([
631
643
  i0.NgZone,
632
644
  i0.Injector,
633
- fire.ɵAngularFireSchedulers,
645
+ fire["ɵAngularFireSchedulers"],
634
646
  app$1.FirebaseApps
635
647
  ], __read(deps))
636
648
  }]
@@ -657,17 +669,15 @@
657
669
  exports.setUserId = setUserId;
658
670
  exports.setUserProperties = setUserProperties;
659
671
  exports.settings = settings;
660
- exports.ɵscreenViewEvent = ɵscreenViewEvent;
672
+ exports["ɵscreenViewEvent"] = ɵscreenViewEvent;
661
673
  Object.keys(analytics).forEach(function (k) {
662
674
  if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
663
675
  enumerable: true,
664
- get: function () {
665
- return analytics[k];
666
- }
676
+ get: function () { return analytics[k]; }
667
677
  });
668
678
  });
669
679
 
670
680
  Object.defineProperty(exports, '__esModule', { value: true });
671
681
 
672
- })));
682
+ }));
673
683
  //# sourceMappingURL=angular-fire-analytics.umd.js.map