@angular/fire 7.5.0-canary.57d9005 → 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.
- package/README.md +95 -74
- package/analytics/is-analytics-supported-factory.d.ts +4 -0
- package/bundles/angular-fire-analytics.umd.js +41 -31
- package/bundles/angular-fire-analytics.umd.js.map +1 -1
- package/bundles/angular-fire-app-check.umd.js +14 -18
- package/bundles/angular-fire-app-check.umd.js.map +1 -1
- package/bundles/angular-fire-app.umd.js +14 -18
- package/bundles/angular-fire-app.umd.js.map +1 -1
- package/bundles/angular-fire-auth-guard.umd.js +5 -7
- package/bundles/angular-fire-auth-guard.umd.js.map +1 -1
- package/bundles/angular-fire-auth.umd.js +64 -68
- package/bundles/angular-fire-auth.umd.js.map +1 -1
- package/bundles/angular-fire-compat-analytics.umd.js +11 -13
- package/bundles/angular-fire-compat-analytics.umd.js.map +1 -1
- package/bundles/angular-fire-compat-auth-guard.umd.js +6 -8
- package/bundles/angular-fire-compat-auth-guard.umd.js.map +1 -1
- package/bundles/angular-fire-compat-auth.umd.js +11 -13
- package/bundles/angular-fire-compat-auth.umd.js.map +1 -1
- package/bundles/angular-fire-compat-database.umd.js +9 -11
- package/bundles/angular-fire-compat-database.umd.js.map +1 -1
- package/bundles/angular-fire-compat-firestore.umd.js +9 -11
- package/bundles/angular-fire-compat-firestore.umd.js.map +1 -1
- package/bundles/angular-fire-compat-functions.umd.js +9 -11
- package/bundles/angular-fire-compat-functions.umd.js.map +1 -1
- package/bundles/angular-fire-compat-messaging.umd.js +8 -10
- package/bundles/angular-fire-compat-messaging.umd.js.map +1 -1
- package/bundles/angular-fire-compat-performance.umd.js +8 -10
- package/bundles/angular-fire-compat-performance.umd.js.map +1 -1
- package/bundles/angular-fire-compat-remote-config.umd.js +9 -11
- package/bundles/angular-fire-compat-remote-config.umd.js.map +1 -1
- package/bundles/angular-fire-compat-storage.umd.js +8 -10
- package/bundles/angular-fire-compat-storage.umd.js.map +1 -1
- package/bundles/angular-fire-compat.umd.js +13 -15
- package/bundles/angular-fire-compat.umd.js.map +1 -1
- package/bundles/angular-fire-database.umd.js +59 -67
- package/bundles/angular-fire-database.umd.js.map +1 -1
- package/bundles/angular-fire-firestore-lite.umd.js +50 -54
- package/bundles/angular-fire-firestore-lite.umd.js.map +1 -1
- package/bundles/angular-fire-firestore.umd.js +67 -71
- package/bundles/angular-fire-firestore.umd.js.map +1 -1
- package/bundles/angular-fire-functions.umd.js +15 -19
- package/bundles/angular-fire-functions.umd.js.map +1 -1
- package/bundles/angular-fire-messaging.umd.js +33 -23
- package/bundles/angular-fire-messaging.umd.js.map +1 -1
- package/bundles/angular-fire-performance.umd.js +17 -21
- package/bundles/angular-fire-performance.umd.js.map +1 -1
- package/bundles/angular-fire-remote-config.umd.js +47 -37
- package/bundles/angular-fire-remote-config.umd.js.map +1 -1
- package/bundles/angular-fire-storage.umd.js +27 -31
- package/bundles/angular-fire-storage.umd.js.map +1 -1
- package/bundles/angular-fire.umd.js +16 -59
- package/bundles/angular-fire.umd.js.map +1 -1
- package/compat/firestore/interfaces.d.ts +4 -4
- package/core.d.ts +1 -12
- package/docs/analytics.md +67 -0
- package/docs/app-check.md +53 -0
- package/docs/auth.md +165 -0
- package/docs/{analytics → compat/analytics}/getting-started.md +2 -0
- package/docs/{auth → compat/auth}/getting-started.md +2 -0
- package/docs/{auth → compat/auth}/router-guards.md +2 -0
- package/docs/{emulators → compat/emulators}/emulators.md +2 -0
- package/docs/{firestore → compat/firestore}/collections.md +2 -0
- package/docs/{firestore → compat/firestore}/documents.md +2 -0
- package/docs/{firestore → compat/firestore}/offline-data.md +2 -0
- package/docs/{firestore → compat/firestore}/querying-collections.md +2 -0
- package/docs/{functions → compat/functions}/functions.md +2 -0
- package/docs/{messaging → compat/messaging}/messaging.md +2 -0
- package/docs/{performance → compat/performance}/getting-started.md +2 -0
- package/docs/{remote-config → compat/remote-config}/getting-started.md +2 -0
- package/docs/{rtdb → compat/rtdb}/lists.md +2 -0
- package/docs/{rtdb → compat/rtdb}/objects.md +2 -0
- package/docs/{rtdb → compat/rtdb}/querying-lists.md +2 -0
- package/docs/{storage → compat/storage}/storage.md +2 -0
- package/docs/compat.md +70 -0
- package/docs/database.md +175 -0
- package/docs/deploy/getting-started.md +2 -2
- package/docs/firestore.md +148 -0
- package/docs/functions.md +52 -0
- package/docs/images/analytics-illo_1x.png +0 -0
- package/docs/images/auth-illo_1x.png +0 -0
- package/docs/images/cloud-messaging-illo_1x.png +0 -0
- package/docs/images/database-illo_1x.png +0 -0
- package/docs/images/firestore-illo_1x.png +0 -0
- package/docs/images/functions-illo_1x.png +0 -0
- package/docs/images/hosting-illo_1x.png +0 -0
- package/docs/images/performance-illo_1x.png +0 -0
- package/docs/images/reCAPTCHA-logo@1x.png +0 -0
- package/docs/images/remote-config-illo_1x.png +0 -0
- package/docs/images/storage-illo_1x.png +0 -0
- package/docs/install-and-setup.md +39 -86
- package/docs/install-firebase-tools.md +78 -0
- package/docs/messaging.md +25 -0
- package/docs/performance.md +57 -0
- package/docs/remote-config.md +53 -0
- package/docs/storage.md +90 -0
- package/docs/universal/cloud-functions.md +27 -6
- package/docs/universal/getting-started.md +9 -134
- package/esm2015/analytics/analytics.module.js +7 -6
- package/esm2015/analytics/is-analytics-supported-factory.js +16 -0
- package/esm2015/analytics/overrides.js +3 -3
- package/esm2015/compat/firestore/interfaces.js +1 -1
- package/esm2015/core.js +3 -45
- package/esm2015/messaging/is-messaging-supported-factory.js +16 -0
- package/esm2015/messaging/messaging.module.js +7 -6
- package/esm2015/messaging/overrides.js +3 -3
- package/esm2015/remote-config/is-remote-config-supported-factory.js +16 -0
- package/esm2015/remote-config/overrides.js +3 -3
- package/esm2015/remote-config/remote-config.module.js +7 -6
- package/fesm2015/angular-fire-analytics.js +21 -7
- package/fesm2015/angular-fire-analytics.js.map +1 -1
- package/fesm2015/angular-fire-app-check.js.map +1 -1
- package/fesm2015/angular-fire-app.js.map +1 -1
- package/fesm2015/angular-fire-auth-guard.js.map +1 -1
- package/fesm2015/angular-fire-auth.js.map +1 -1
- package/fesm2015/angular-fire-compat-analytics.js.map +1 -1
- package/fesm2015/angular-fire-compat-auth-guard.js.map +1 -1
- package/fesm2015/angular-fire-compat-auth.js.map +1 -1
- package/fesm2015/angular-fire-compat-database.js +1 -1
- package/fesm2015/angular-fire-compat-database.js.map +1 -1
- package/fesm2015/angular-fire-compat-firestore.js +1 -1
- package/fesm2015/angular-fire-compat-firestore.js.map +1 -1
- package/fesm2015/angular-fire-compat-functions.js.map +1 -1
- package/fesm2015/angular-fire-compat-messaging.js.map +1 -1
- package/fesm2015/angular-fire-compat-performance.js.map +1 -1
- package/fesm2015/angular-fire-compat-remote-config.js.map +1 -1
- package/fesm2015/angular-fire-compat-storage.js.map +1 -1
- package/fesm2015/angular-fire-compat.js.map +1 -1
- package/fesm2015/angular-fire-database.js.map +1 -1
- package/fesm2015/angular-fire-firestore-lite.js.map +1 -1
- package/fesm2015/angular-fire-firestore.js.map +1 -1
- package/fesm2015/angular-fire-functions.js.map +1 -1
- package/fesm2015/angular-fire-messaging.js +21 -7
- package/fesm2015/angular-fire-messaging.js.map +1 -1
- package/fesm2015/angular-fire-performance.js.map +1 -1
- package/fesm2015/angular-fire-remote-config.js +22 -8
- package/fesm2015/angular-fire-remote-config.js.map +1 -1
- package/fesm2015/angular-fire-storage.js.map +1 -1
- package/fesm2015/angular-fire.js +3 -45
- package/fesm2015/angular-fire.js.map +1 -1
- package/messaging/is-messaging-supported-factory.d.ts +4 -0
- package/package.json +9 -10
- package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
- package/schematics/deploy/actions.js +8 -3
- package/schematics/deploy/builder.js +2 -2
- package/schematics/firebaseTools.js +4 -2
- package/schematics/setup/index.js +58 -29
- package/schematics/setup/prompts.js +18 -46
- package/schematics/utils.js +32 -28
- package/docs/ionic/authentication.md +0 -104
- package/docs/ionic/cli.md +0 -218
- package/docs/ionic/v2.md +0 -531
- package/docs/ionic/v3.md +0 -705
- package/schematics/setup/ssr.js +0 -100
- 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
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
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 "
|
|
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
|
-
|
|
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
|
-
|
|
131
|
+
[See the v7 upgrade guide for more information on this change.](docs/version-7-upgrade.md).
|
|
168
132
|
|
|
169
|
-
|
|
133
|
+
### Firebase product integrations
|
|
170
134
|
|
|
171
|
-
|
|
135
|
+
<table>
|
|
136
|
+
<tr>
|
|
137
|
+
<td>
|
|
172
138
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
139
|
+
#### [Analytics](docs/analytics.md#analytics)
|
|
140
|
+
```ts
|
|
141
|
+
import { } from '@angular/fire/analytics';
|
|
142
|
+
```
|
|
143
|
+
</td>
|
|
144
|
+
<td>
|
|
176
145
|
|
|
177
|
-
|
|
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
|
-
|
|
155
|
+
#### [Cloud Firestore](docs/firestore.md#cloud-firestore)
|
|
156
|
+
```ts
|
|
157
|
+
import { } from '@angular/fire/firestore';
|
|
158
|
+
```
|
|
159
|
+
</td>
|
|
160
|
+
<td>
|
|
180
161
|
|
|
181
|
-
|
|
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
|
-
|
|
171
|
+
#### [Cloud Messaging](docs/messaging.md#cloud-messaging)
|
|
172
|
+
```ts
|
|
173
|
+
import { } from '@angular/fire/messaging';
|
|
174
|
+
```
|
|
175
|
+
</td>
|
|
176
|
+
<td>
|
|
184
177
|
|
|
185
|
-
|
|
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
|
-
|
|
187
|
+
#### [Performance Monitoring](docs/performance.md#performance-monitoring)
|
|
188
|
+
```ts
|
|
189
|
+
import { } from '@angular/fire/performance';
|
|
190
|
+
```
|
|
191
|
+
</td>
|
|
192
|
+
<td>
|
|
188
193
|
|
|
189
|
-
####
|
|
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
|
-
|
|
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
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
###
|
|
218
|
+
### Deploying your site
|
|
198
219
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
220
|
+
* Deploy to Firebase Hosting
|
|
221
|
+
* Angular Universal: Deploy to Cloud Functions
|
|
222
|
+
* Angular Universal: Deploy to Cloud Run
|
|
@@ -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('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@angular/fire/analytics', ['exports', '@angular/fire', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/fire/app', 'firebase/app', '
|
|
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
|
|
5
|
-
}(this, (function (exports, fire, rxjs, operators, i0, app$1, app, i1$1,
|
|
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[
|
|
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
|
|
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
|
|
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
|
|
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
|
|
363
|
-
var initializeAnalytics = fire
|
|
364
|
-
var logEvent = fire
|
|
365
|
-
var setAnalyticsCollectionEnabled = fire
|
|
366
|
-
var setCurrentScreen = fire
|
|
367
|
-
var settings = fire
|
|
368
|
-
var setUserId = fire
|
|
369
|
-
var setUserProperties = fire
|
|
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
|
|
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 (!
|
|
565
|
+
if (!isAnalyticsSupportedFactory.sync()) {
|
|
554
566
|
return null;
|
|
555
567
|
}
|
|
556
|
-
var defaultAnalytics = fire
|
|
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 (!
|
|
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:
|
|
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:
|
|
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
|
|
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
|
|
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
|