@angular/fire 7.1.0-rc.3 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analytics/analytics.module.d.ts +9 -6
- package/analytics/firebase.d.ts +2 -2
- package/analytics/overrides.d.ts +1 -0
- package/analytics/public_api.d.ts +2 -0
- package/analytics/screen-tracking.service.d.ts +40 -0
- package/analytics/user-tracking.service.d.ts +11 -0
- package/app/app.module.d.ts +3 -3
- package/app-check/app-check.module.d.ts +3 -3
- package/auth/auth.module.d.ts +3 -3
- package/auth-guard/angular-fire-auth-guard.d.ts +5 -0
- package/auth-guard/auth-guard.d.ts +29 -0
- package/auth-guard/auth-guard.module.d.ts +7 -0
- package/auth-guard/package.json +11 -0
- package/auth-guard/public_api.d.ts +2 -0
- package/bundles/angular-fire-analytics.umd.js +548 -41
- package/bundles/angular-fire-analytics.umd.js.map +1 -1
- package/bundles/angular-fire-app-check.umd.js +336 -18
- package/bundles/angular-fire-app-check.umd.js.map +1 -1
- package/bundles/angular-fire-app.umd.js +323 -3
- package/bundles/angular-fire-app.umd.js.map +1 -1
- package/bundles/angular-fire-auth-guard.umd.js +109 -0
- package/bundles/angular-fire-auth-guard.umd.js.map +1 -0
- package/bundles/angular-fire-auth.umd.js +324 -9
- package/bundles/angular-fire-auth.umd.js.map +1 -1
- package/bundles/angular-fire-compat-analytics.umd.js +16 -112
- package/bundles/angular-fire-compat-analytics.umd.js.map +1 -1
- package/bundles/angular-fire-compat-auth.umd.js +1 -1
- package/bundles/angular-fire-compat-auth.umd.js.map +1 -1
- package/bundles/angular-fire-compat-database.umd.js +1 -1
- package/bundles/angular-fire-compat-database.umd.js.map +1 -1
- package/bundles/angular-fire-compat-firestore.umd.js +1 -1
- package/bundles/angular-fire-compat-firestore.umd.js.map +1 -1
- package/bundles/angular-fire-compat-functions.umd.js +1 -1
- package/bundles/angular-fire-compat-functions.umd.js.map +1 -1
- package/bundles/angular-fire-compat-messaging.umd.js +5 -5
- package/bundles/angular-fire-compat-messaging.umd.js.map +1 -1
- package/bundles/angular-fire-compat-performance.umd.js +5 -5
- package/bundles/angular-fire-compat-performance.umd.js.map +1 -1
- package/bundles/angular-fire-compat-remote-config.umd.js +5 -5
- package/bundles/angular-fire-compat-remote-config.umd.js.map +1 -1
- package/bundles/angular-fire-compat-storage.umd.js +2 -1
- package/bundles/angular-fire-compat-storage.umd.js.map +1 -1
- package/bundles/angular-fire-compat.umd.js +38 -2
- package/bundles/angular-fire-compat.umd.js.map +1 -1
- package/bundles/angular-fire-database.umd.js +323 -6
- package/bundles/angular-fire-database.umd.js.map +1 -1
- package/bundles/angular-fire-firestore-lite.umd.js +327 -9
- package/bundles/angular-fire-firestore-lite.umd.js.map +1 -1
- package/bundles/angular-fire-firestore.umd.js +323 -8
- package/bundles/angular-fire-firestore.umd.js.map +1 -1
- package/bundles/angular-fire-functions.umd.js +323 -6
- package/bundles/angular-fire-functions.umd.js.map +1 -1
- package/bundles/angular-fire-messaging.umd.js +339 -24
- package/bundles/angular-fire-messaging.umd.js.map +1 -1
- package/bundles/angular-fire-performance.umd.js +339 -11
- package/bundles/angular-fire-performance.umd.js.map +1 -1
- package/bundles/angular-fire-remote-config.umd.js +342 -6
- package/bundles/angular-fire-remote-config.umd.js.map +1 -1
- package/bundles/angular-fire-storage.umd.js +324 -7
- package/bundles/angular-fire-storage.umd.js.map +1 -1
- package/bundles/angular-fire.umd.js +43 -371
- package/bundles/angular-fire.umd.js.map +1 -1
- package/compat/analytics/screen-tracking.service.d.ts +2 -2
- package/compat/cache.d.ts +1 -0
- package/compat/public_api.d.ts +1 -0
- package/compat/storage/interfaces.d.ts +1 -0
- package/compat/storage/ref.d.ts +2 -1
- package/core.d.ts +13 -3
- package/database/database.module.d.ts +3 -3
- package/docs/deploy/getting-started.md +62 -1
- package/docs/version-7-upgrade.md +1 -1
- package/esm2015/analytics/analytics.module.js +33 -27
- package/esm2015/analytics/firebase.js +3 -3
- package/esm2015/analytics/overrides.js +3 -0
- package/esm2015/analytics/public_api.js +3 -1
- package/esm2015/analytics/screen-tracking.service.js +139 -0
- package/esm2015/analytics/user-tracking.service.js +43 -0
- package/esm2015/app/app.module.js +12 -7
- package/esm2015/app-check/app-check.js +1 -2
- package/esm2015/app-check/app-check.module.js +19 -14
- package/esm2015/auth/auth.js +1 -2
- package/esm2015/auth/auth.module.js +10 -9
- package/esm2015/auth-guard/angular-fire-auth-guard.js +5 -0
- package/esm2015/auth-guard/auth-guard.js +49 -0
- package/esm2015/auth-guard/auth-guard.module.js +20 -0
- package/esm2015/auth-guard/public_api.js +3 -0
- package/esm2015/compat/analytics/analytics.js +2 -3
- package/esm2015/compat/analytics/screen-tracking.service.js +11 -100
- package/esm2015/compat/auth/auth.js +2 -3
- package/esm2015/compat/cache.js +32 -0
- package/esm2015/compat/database/database.js +2 -3
- package/esm2015/compat/firestore/firestore.js +2 -3
- package/esm2015/compat/functions/functions.js +2 -3
- package/esm2015/compat/messaging/messaging.js +3 -3
- package/esm2015/compat/performance/performance.js +2 -3
- package/esm2015/compat/public_api.js +2 -1
- package/esm2015/compat/remote-config/remote-config.js +4 -5
- package/esm2015/compat/storage/interfaces.js +1 -1
- package/esm2015/compat/storage/ref.js +2 -1
- package/esm2015/compat/storage/storage.js +3 -3
- package/esm2015/core.js +44 -52
- package/esm2015/database/database.module.js +9 -7
- package/esm2015/firestore/firestore.module.js +9 -9
- package/esm2015/firestore/lite/lite.module.js +11 -7
- package/esm2015/functions/functions.module.js +9 -7
- package/esm2015/messaging/firebase.js +3 -3
- package/esm2015/messaging/messaging.module.js +19 -21
- package/esm2015/messaging/overrides.js +3 -0
- package/esm2015/performance/performance.module.js +22 -8
- package/esm2015/remote-config/firebase.js +2 -1
- package/esm2015/remote-config/overrides.js +3 -0
- package/esm2015/remote-config/remote-config.module.js +25 -7
- package/esm2015/storage/storage.module.js +10 -8
- package/esm2015/zones.js +3 -2
- package/fesm2015/angular-fire-analytics.js +209 -40
- package/fesm2015/angular-fire-analytics.js.map +1 -1
- package/fesm2015/angular-fire-app-check.js +18 -14
- package/fesm2015/angular-fire-app-check.js.map +1 -1
- package/fesm2015/angular-fire-app.js +11 -6
- package/fesm2015/angular-fire-app.js.map +1 -1
- package/fesm2015/angular-fire-auth-guard.js +72 -0
- package/fesm2015/angular-fire-auth-guard.js.map +1 -0
- package/fesm2015/angular-fire-auth.js +9 -9
- package/fesm2015/angular-fire-auth.js.map +1 -1
- package/fesm2015/angular-fire-compat-analytics.js +10 -98
- package/fesm2015/angular-fire-compat-analytics.js.map +1 -1
- package/fesm2015/angular-fire-compat-auth.js +2 -2
- package/fesm2015/angular-fire-compat-auth.js.map +1 -1
- package/fesm2015/angular-fire-compat-database.js +2 -2
- package/fesm2015/angular-fire-compat-database.js.map +1 -1
- package/fesm2015/angular-fire-compat-firestore.js +2 -2
- package/fesm2015/angular-fire-compat-firestore.js.map +1 -1
- package/fesm2015/angular-fire-compat-functions.js +2 -2
- package/fesm2015/angular-fire-compat-functions.js.map +1 -1
- package/fesm2015/angular-fire-compat-messaging.js +2 -2
- package/fesm2015/angular-fire-compat-messaging.js.map +1 -1
- package/fesm2015/angular-fire-compat-performance.js +2 -2
- package/fesm2015/angular-fire-compat-performance.js.map +1 -1
- package/fesm2015/angular-fire-compat-remote-config.js +4 -4
- package/fesm2015/angular-fire-compat-remote-config.js.map +1 -1
- package/fesm2015/angular-fire-compat-storage.js +3 -2
- package/fesm2015/angular-fire-compat-storage.js.map +1 -1
- package/fesm2015/angular-fire-compat.js +34 -3
- package/fesm2015/angular-fire-compat.js.map +1 -1
- package/fesm2015/angular-fire-database.js +8 -6
- package/fesm2015/angular-fire-database.js.map +1 -1
- package/fesm2015/angular-fire-firestore-lite.js +10 -6
- package/fesm2015/angular-fire-firestore-lite.js.map +1 -1
- package/fesm2015/angular-fire-firestore.js +8 -8
- package/fesm2015/angular-fire-firestore.js.map +1 -1
- package/fesm2015/angular-fire-functions.js +8 -6
- package/fesm2015/angular-fire-functions.js.map +1 -1
- package/fesm2015/angular-fire-messaging.js +22 -22
- package/fesm2015/angular-fire-messaging.js.map +1 -1
- package/fesm2015/angular-fire-performance.js +21 -7
- package/fesm2015/angular-fire-performance.js.map +1 -1
- package/fesm2015/angular-fire-remote-config.js +27 -7
- package/fesm2015/angular-fire-remote-config.js.map +1 -1
- package/fesm2015/angular-fire-storage.js +9 -7
- package/fesm2015/angular-fire-storage.js.map +1 -1
- package/fesm2015/angular-fire.js +46 -53
- package/fesm2015/angular-fire.js.map +1 -1
- package/firestore/firestore.module.d.ts +3 -3
- package/firestore/lite/lite.module.d.ts +3 -3
- package/functions/functions.module.d.ts +3 -3
- package/messaging/firebase.d.ts +2 -2
- package/messaging/messaging.module.d.ts +4 -4
- package/messaging/overrides.d.ts +1 -0
- package/package.json +9 -3
- package/performance/performance.module.d.ts +4 -4
- package/remote-config/firebase.d.ts +1 -0
- package/remote-config/overrides.d.ts +1 -0
- package/remote-config/remote-config.module.d.ts +3 -3
- package/schematics/deploy/actions.js +40 -26
- package/schematics/deploy/schema.json +4 -0
- package/schematics/firebaseTools.js +22 -2
- package/schematics/setup/index.js +9 -2
- package/schematics/setup/prompts.js +1 -1
- package/schematics/setup/ssr.js +7 -1
- package/schematics/setup/static.js +9 -3
- package/schematics/utils.js +1 -1
- package/schematics/versions.json +1 -1
- package/storage/storage.module.d.ts +3 -3
|
@@ -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('firebase/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@angular/fire/analytics', ['exports', '@angular/fire', 'rxjs', 'rxjs/operators', '@angular/core', 'firebase/
|
|
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['firebase-analytics'], global.
|
|
5
|
-
}(this, (function (exports, fire, rxjs, operators, i0,
|
|
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';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
29
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
31
|
|
|
29
32
|
var Analytics = /** @class */ (function () {
|
|
30
33
|
function Analytics(analytics) {
|
|
@@ -41,18 +44,524 @@
|
|
|
41
44
|
}());
|
|
42
45
|
var analyticInstance$ = rxjs.timer(0, 300).pipe(operators.concatMap(function () { return rxjs.from(fire.ɵgetAllInstancesOf(ANALYTICS_PROVIDER_NAME)); }), operators.distinct());
|
|
43
46
|
|
|
47
|
+
/*! *****************************************************************************
|
|
48
|
+
Copyright (c) Microsoft Corporation.
|
|
49
|
+
|
|
50
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
51
|
+
purpose with or without fee is hereby granted.
|
|
52
|
+
|
|
53
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
54
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
55
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
56
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
57
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
58
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
59
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
60
|
+
***************************************************************************** */
|
|
61
|
+
/* global Reflect, Promise */
|
|
62
|
+
var extendStatics = function (d, b) {
|
|
63
|
+
extendStatics = Object.setPrototypeOf ||
|
|
64
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
65
|
+
function (d, b) { for (var p in b)
|
|
66
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
67
|
+
d[p] = b[p]; };
|
|
68
|
+
return extendStatics(d, b);
|
|
69
|
+
};
|
|
70
|
+
function __extends(d, b) {
|
|
71
|
+
if (typeof b !== "function" && b !== null)
|
|
72
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
73
|
+
extendStatics(d, b);
|
|
74
|
+
function __() { this.constructor = d; }
|
|
75
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
76
|
+
}
|
|
77
|
+
var __assign = function () {
|
|
78
|
+
__assign = Object.assign || function __assign(t) {
|
|
79
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
80
|
+
s = arguments[i];
|
|
81
|
+
for (var p in s)
|
|
82
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
83
|
+
t[p] = s[p];
|
|
84
|
+
}
|
|
85
|
+
return t;
|
|
86
|
+
};
|
|
87
|
+
return __assign.apply(this, arguments);
|
|
88
|
+
};
|
|
89
|
+
function __rest(s, e) {
|
|
90
|
+
var t = {};
|
|
91
|
+
for (var p in s)
|
|
92
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
93
|
+
t[p] = s[p];
|
|
94
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
95
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
96
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
97
|
+
t[p[i]] = s[p[i]];
|
|
98
|
+
}
|
|
99
|
+
return t;
|
|
100
|
+
}
|
|
101
|
+
function __decorate(decorators, target, key, desc) {
|
|
102
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
103
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
104
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
105
|
+
else
|
|
106
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
107
|
+
if (d = decorators[i])
|
|
108
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
109
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
110
|
+
}
|
|
111
|
+
function __param(paramIndex, decorator) {
|
|
112
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
113
|
+
}
|
|
114
|
+
function __metadata(metadataKey, metadataValue) {
|
|
115
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
116
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
117
|
+
}
|
|
118
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
119
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
120
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
121
|
+
function fulfilled(value) { try {
|
|
122
|
+
step(generator.next(value));
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
reject(e);
|
|
126
|
+
} }
|
|
127
|
+
function rejected(value) { try {
|
|
128
|
+
step(generator["throw"](value));
|
|
129
|
+
}
|
|
130
|
+
catch (e) {
|
|
131
|
+
reject(e);
|
|
132
|
+
} }
|
|
133
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
134
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function __generator(thisArg, body) {
|
|
138
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
139
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
140
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
141
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
142
|
+
function step(op) {
|
|
143
|
+
if (f)
|
|
144
|
+
throw new TypeError("Generator is already executing.");
|
|
145
|
+
while (_)
|
|
146
|
+
try {
|
|
147
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
148
|
+
return t;
|
|
149
|
+
if (y = 0, t)
|
|
150
|
+
op = [op[0] & 2, t.value];
|
|
151
|
+
switch (op[0]) {
|
|
152
|
+
case 0:
|
|
153
|
+
case 1:
|
|
154
|
+
t = op;
|
|
155
|
+
break;
|
|
156
|
+
case 4:
|
|
157
|
+
_.label++;
|
|
158
|
+
return { value: op[1], done: false };
|
|
159
|
+
case 5:
|
|
160
|
+
_.label++;
|
|
161
|
+
y = op[1];
|
|
162
|
+
op = [0];
|
|
163
|
+
continue;
|
|
164
|
+
case 7:
|
|
165
|
+
op = _.ops.pop();
|
|
166
|
+
_.trys.pop();
|
|
167
|
+
continue;
|
|
168
|
+
default:
|
|
169
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
170
|
+
_ = 0;
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
174
|
+
_.label = op[1];
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
178
|
+
_.label = t[1];
|
|
179
|
+
t = op;
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
if (t && _.label < t[2]) {
|
|
183
|
+
_.label = t[2];
|
|
184
|
+
_.ops.push(op);
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
if (t[2])
|
|
188
|
+
_.ops.pop();
|
|
189
|
+
_.trys.pop();
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
op = body.call(thisArg, _);
|
|
193
|
+
}
|
|
194
|
+
catch (e) {
|
|
195
|
+
op = [6, e];
|
|
196
|
+
y = 0;
|
|
197
|
+
}
|
|
198
|
+
finally {
|
|
199
|
+
f = t = 0;
|
|
200
|
+
}
|
|
201
|
+
if (op[0] & 5)
|
|
202
|
+
throw op[1];
|
|
203
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
207
|
+
if (k2 === undefined)
|
|
208
|
+
k2 = k;
|
|
209
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
210
|
+
}) : (function (o, m, k, k2) {
|
|
211
|
+
if (k2 === undefined)
|
|
212
|
+
k2 = k;
|
|
213
|
+
o[k2] = m[k];
|
|
214
|
+
});
|
|
215
|
+
function __exportStar(m, o) {
|
|
216
|
+
for (var p in m)
|
|
217
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
218
|
+
__createBinding(o, m, p);
|
|
219
|
+
}
|
|
220
|
+
function __values(o) {
|
|
221
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
222
|
+
if (m)
|
|
223
|
+
return m.call(o);
|
|
224
|
+
if (o && typeof o.length === "number")
|
|
225
|
+
return {
|
|
226
|
+
next: function () {
|
|
227
|
+
if (o && i >= o.length)
|
|
228
|
+
o = void 0;
|
|
229
|
+
return { value: o && o[i++], done: !o };
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
233
|
+
}
|
|
234
|
+
function __read(o, n) {
|
|
235
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
236
|
+
if (!m)
|
|
237
|
+
return o;
|
|
238
|
+
var i = m.call(o), r, ar = [], e;
|
|
239
|
+
try {
|
|
240
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
241
|
+
ar.push(r.value);
|
|
242
|
+
}
|
|
243
|
+
catch (error) {
|
|
244
|
+
e = { error: error };
|
|
245
|
+
}
|
|
246
|
+
finally {
|
|
247
|
+
try {
|
|
248
|
+
if (r && !r.done && (m = i["return"]))
|
|
249
|
+
m.call(i);
|
|
250
|
+
}
|
|
251
|
+
finally {
|
|
252
|
+
if (e)
|
|
253
|
+
throw e.error;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return ar;
|
|
257
|
+
}
|
|
258
|
+
/** @deprecated */
|
|
259
|
+
function __spread() {
|
|
260
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
261
|
+
ar = ar.concat(__read(arguments[i]));
|
|
262
|
+
return ar;
|
|
263
|
+
}
|
|
264
|
+
/** @deprecated */
|
|
265
|
+
function __spreadArrays() {
|
|
266
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
267
|
+
s += arguments[i].length;
|
|
268
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
269
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
270
|
+
r[k] = a[j];
|
|
271
|
+
return r;
|
|
272
|
+
}
|
|
273
|
+
function __spreadArray(to, from) {
|
|
274
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
275
|
+
to[j] = from[i];
|
|
276
|
+
return to;
|
|
277
|
+
}
|
|
278
|
+
function __await(v) {
|
|
279
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
280
|
+
}
|
|
281
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
282
|
+
if (!Symbol.asyncIterator)
|
|
283
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
285
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
286
|
+
function verb(n) { if (g[n])
|
|
287
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
288
|
+
function resume(n, v) { try {
|
|
289
|
+
step(g[n](v));
|
|
290
|
+
}
|
|
291
|
+
catch (e) {
|
|
292
|
+
settle(q[0][3], e);
|
|
293
|
+
} }
|
|
294
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
295
|
+
function fulfill(value) { resume("next", value); }
|
|
296
|
+
function reject(value) { resume("throw", value); }
|
|
297
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
298
|
+
resume(q[0][0], q[0][1]); }
|
|
299
|
+
}
|
|
300
|
+
function __asyncDelegator(o) {
|
|
301
|
+
var i, p;
|
|
302
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
303
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
304
|
+
}
|
|
305
|
+
function __asyncValues(o) {
|
|
306
|
+
if (!Symbol.asyncIterator)
|
|
307
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
308
|
+
var m = o[Symbol.asyncIterator], i;
|
|
309
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
310
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
311
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
312
|
+
}
|
|
313
|
+
function __makeTemplateObject(cooked, raw) {
|
|
314
|
+
if (Object.defineProperty) {
|
|
315
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
cooked.raw = raw;
|
|
319
|
+
}
|
|
320
|
+
return cooked;
|
|
321
|
+
}
|
|
322
|
+
;
|
|
323
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
324
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
325
|
+
}) : function (o, v) {
|
|
326
|
+
o["default"] = v;
|
|
327
|
+
};
|
|
328
|
+
function __importStar(mod) {
|
|
329
|
+
if (mod && mod.__esModule)
|
|
330
|
+
return mod;
|
|
331
|
+
var result = {};
|
|
332
|
+
if (mod != null)
|
|
333
|
+
for (var k in mod)
|
|
334
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
335
|
+
__createBinding(result, mod, k);
|
|
336
|
+
__setModuleDefault(result, mod);
|
|
337
|
+
return result;
|
|
338
|
+
}
|
|
339
|
+
function __importDefault(mod) {
|
|
340
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
341
|
+
}
|
|
342
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
343
|
+
if (kind === "a" && !f)
|
|
344
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
345
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
346
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
347
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
348
|
+
}
|
|
349
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
350
|
+
if (kind === "m")
|
|
351
|
+
throw new TypeError("Private method is not writable");
|
|
352
|
+
if (kind === "a" && !f)
|
|
353
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
354
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
355
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
356
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
var isSupported = fire.ɵisAnalyticsSupportedFactory.async;
|
|
360
|
+
|
|
361
|
+
// 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);
|
|
370
|
+
|
|
371
|
+
var UserTrackingService = /** @class */ (function () {
|
|
372
|
+
function UserTrackingService(auth, zone, injector) {
|
|
373
|
+
var _this = this;
|
|
374
|
+
this.disposables = [];
|
|
375
|
+
app.registerVersion('angularfire', fire.VERSION.full, 'user-tracking');
|
|
376
|
+
var resolveInitialized;
|
|
377
|
+
this.initialized = zone.runOutsideAngular(function () { return new Promise(function (resolve) { resolveInitialized = resolve; }); });
|
|
378
|
+
// The APP_INITIALIZER that is making isSupported() sync for the sake of convenient DI
|
|
379
|
+
// may not be done when services are initialized. Guard the functionality by first ensuring
|
|
380
|
+
// that the (global) promise has resolved, then get Analytics from the injector.
|
|
381
|
+
isSupported().then(function () {
|
|
382
|
+
var analytics = injector.get(Analytics);
|
|
383
|
+
if (analytics) {
|
|
384
|
+
_this.disposables = [
|
|
385
|
+
// TODO add credential tracking back in
|
|
386
|
+
i1.authState(auth).subscribe(function (user) {
|
|
387
|
+
setUserId(analytics, user === null || user === void 0 ? void 0 : user.uid);
|
|
388
|
+
resolveInitialized();
|
|
389
|
+
}),
|
|
390
|
+
];
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
resolveInitialized();
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
UserTrackingService.prototype.ngOnDestroy = function () {
|
|
398
|
+
this.disposables.forEach(function (it) { return it.unsubscribe(); });
|
|
399
|
+
};
|
|
400
|
+
return UserTrackingService;
|
|
401
|
+
}());
|
|
402
|
+
UserTrackingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: UserTrackingService, deps: [{ token: i1__namespace.Auth }, { token: i0__namespace.NgZone }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
403
|
+
UserTrackingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: UserTrackingService });
|
|
404
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: UserTrackingService, decorators: [{
|
|
405
|
+
type: i0.Injectable
|
|
406
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Auth }, { type: i0__namespace.NgZone }, { type: i0__namespace.Injector }]; } });
|
|
407
|
+
|
|
408
|
+
var FIREBASE_EVENT_ORIGIN_KEY = 'firebase_event_origin';
|
|
409
|
+
var FIREBASE_PREVIOUS_SCREEN_CLASS_KEY = 'firebase_previous_class';
|
|
410
|
+
var FIREBASE_PREVIOUS_SCREEN_INSTANCE_ID_KEY = 'firebase_previous_id';
|
|
411
|
+
var FIREBASE_PREVIOUS_SCREEN_NAME_KEY = 'firebase_previous_screen';
|
|
412
|
+
var FIREBASE_SCREEN_CLASS_KEY = 'firebase_screen_class';
|
|
413
|
+
var FIREBASE_SCREEN_INSTANCE_ID_KEY = 'firebase_screen_id';
|
|
414
|
+
var FIREBASE_SCREEN_NAME_KEY = 'firebase_screen';
|
|
415
|
+
var OUTLET_KEY = 'outlet';
|
|
416
|
+
var PAGE_PATH_KEY = 'page_path';
|
|
417
|
+
var PAGE_TITLE_KEY = 'page_title';
|
|
418
|
+
var SCREEN_CLASS_KEY = 'screen_class';
|
|
419
|
+
var SCREEN_NAME_KEY = 'screen_name';
|
|
420
|
+
var SCREEN_VIEW_EVENT = 'screen_view';
|
|
421
|
+
var EVENT_ORIGIN_AUTO = 'auto';
|
|
422
|
+
var SCREEN_INSTANCE_DELIMITER = '#';
|
|
423
|
+
// this is an INT64 in iOS/Android but use INT32 cause javascript
|
|
424
|
+
var nextScreenInstanceID = Math.floor(Math.random() * (Math.pow(2, 32) - 1)) - Math.pow(2, 31);
|
|
425
|
+
var knownScreenInstanceIDs = {};
|
|
426
|
+
var getScreenInstanceID = function (params) {
|
|
427
|
+
// unique the screen class against the outlet name
|
|
428
|
+
var screenInstanceKey = [
|
|
429
|
+
params[SCREEN_CLASS_KEY],
|
|
430
|
+
params[OUTLET_KEY]
|
|
431
|
+
].join(SCREEN_INSTANCE_DELIMITER);
|
|
432
|
+
if (knownScreenInstanceIDs.hasOwnProperty(screenInstanceKey)) {
|
|
433
|
+
return knownScreenInstanceIDs[screenInstanceKey];
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
var ret = nextScreenInstanceID++;
|
|
437
|
+
knownScreenInstanceIDs[screenInstanceKey] = ret;
|
|
438
|
+
return ret;
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
var ɵscreenViewEvent = function (router, title, componentFactoryResolver) {
|
|
442
|
+
var activationEndEvents = router.events.pipe(operators.filter(function (e) { return e instanceof i1$1.ActivationEnd; }));
|
|
443
|
+
return activationEndEvents.pipe(operators.switchMap(function (activationEnd) {
|
|
444
|
+
var _b, _c, _d;
|
|
445
|
+
var _a;
|
|
446
|
+
// router parseUrl is having trouble with outlets when they're empty
|
|
447
|
+
// e.g, /asdf/1(bob://sally:asdf), so put another slash in when empty
|
|
448
|
+
var urlTree = router.parseUrl(router.url.replace(/(?:\().+(?:\))/g, function (a) { return a.replace('://', ':///'); }));
|
|
449
|
+
var pagePath = ((_a = urlTree.root.children[activationEnd.snapshot.outlet]) === null || _a === void 0 ? void 0 : _a.toString()) || '';
|
|
450
|
+
var actualSnapshot = router.routerState.root.children.map(function (it) { return it; }).find(function (it) { return it.outlet === activationEnd.snapshot.outlet; });
|
|
451
|
+
if (!actualSnapshot) {
|
|
452
|
+
return rxjs.of(null);
|
|
453
|
+
}
|
|
454
|
+
var actualDeep = actualSnapshot;
|
|
455
|
+
while (actualDeep.firstChild) {
|
|
456
|
+
actualDeep = actualDeep.firstChild;
|
|
457
|
+
}
|
|
458
|
+
var screenName = actualDeep.pathFromRoot.map(function (s) { var _a; return (_a = s.routeConfig) === null || _a === void 0 ? void 0 : _a.path; }).filter(function (it) { return it; }).join('/') || '/';
|
|
459
|
+
var params = (_b = {},
|
|
460
|
+
_b[SCREEN_NAME_KEY] = screenName,
|
|
461
|
+
_b[PAGE_PATH_KEY] = "/" + pagePath,
|
|
462
|
+
_b[FIREBASE_EVENT_ORIGIN_KEY] = EVENT_ORIGIN_AUTO,
|
|
463
|
+
_b[FIREBASE_SCREEN_NAME_KEY] = screenName,
|
|
464
|
+
_b[OUTLET_KEY] = activationEnd.snapshot.outlet,
|
|
465
|
+
_b);
|
|
466
|
+
if (title) {
|
|
467
|
+
params[PAGE_TITLE_KEY] = title.getTitle();
|
|
468
|
+
}
|
|
469
|
+
var component = actualSnapshot.component;
|
|
470
|
+
if (component) {
|
|
471
|
+
if (component === i1$1.ɵEmptyOutletComponent) {
|
|
472
|
+
var deepSnapshot = activationEnd.snapshot;
|
|
473
|
+
// TODO when might there be mutple children, different outlets? explore
|
|
474
|
+
while (deepSnapshot.firstChild) {
|
|
475
|
+
deepSnapshot = deepSnapshot.firstChild;
|
|
476
|
+
}
|
|
477
|
+
component = deepSnapshot.component;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
component = activationEnd.snapshot.component;
|
|
482
|
+
}
|
|
483
|
+
if (typeof component === 'string') {
|
|
484
|
+
return rxjs.of(Object.assign(Object.assign({}, params), (_c = {}, _c[SCREEN_CLASS_KEY] = component, _c)));
|
|
485
|
+
}
|
|
486
|
+
else if (component) {
|
|
487
|
+
var componentFactory = componentFactoryResolver.resolveComponentFactory(component);
|
|
488
|
+
return rxjs.of(Object.assign(Object.assign({}, params), (_d = {}, _d[SCREEN_CLASS_KEY] = componentFactory.selector, _d)));
|
|
489
|
+
}
|
|
490
|
+
// lazy loads cause extra activations, ignore
|
|
491
|
+
return rxjs.of(null);
|
|
492
|
+
}), operators.filter(function (it) { return !!it; }), operators.map(function (params) {
|
|
493
|
+
var _b;
|
|
494
|
+
return (Object.assign((_b = {}, _b[FIREBASE_SCREEN_CLASS_KEY] = params[SCREEN_CLASS_KEY], _b[FIREBASE_SCREEN_INSTANCE_ID_KEY] = getScreenInstanceID(params), _b), params));
|
|
495
|
+
}), operators.groupBy(function (it) { return it[OUTLET_KEY]; }), operators.mergeMap(function (it) { return it.pipe(operators.distinctUntilChanged(function (a, b) { return JSON.stringify(a) === JSON.stringify(b); }), operators.startWith(undefined), operators.pairwise(), operators.map(function (_b) {
|
|
496
|
+
var _c;
|
|
497
|
+
var _d = __read(_b, 2), prior = _d[0], current = _d[1];
|
|
498
|
+
return prior ? Object.assign((_c = {}, _c[FIREBASE_PREVIOUS_SCREEN_CLASS_KEY] = prior[SCREEN_CLASS_KEY], _c[FIREBASE_PREVIOUS_SCREEN_NAME_KEY] = prior[SCREEN_NAME_KEY], _c[FIREBASE_PREVIOUS_SCREEN_INSTANCE_ID_KEY] = prior[FIREBASE_SCREEN_INSTANCE_ID_KEY], _c), current) : current;
|
|
499
|
+
})); }));
|
|
500
|
+
};
|
|
501
|
+
var ScreenTrackingService = /** @class */ (function () {
|
|
502
|
+
function ScreenTrackingService(router, title, componentFactoryResolver, zone, userTrackingService, injector) {
|
|
503
|
+
var _this = this;
|
|
504
|
+
app.registerVersion('angularfire', fire.VERSION.full, 'screen-tracking');
|
|
505
|
+
// The APP_INITIALIZER that is making isSupported() sync for the sake of convenient DI
|
|
506
|
+
// may not be done when services are initialized. Guard the functionality by first ensuring
|
|
507
|
+
// that the (global) promise has resolved, then get Analytics from the injector.
|
|
508
|
+
isSupported().then(function () {
|
|
509
|
+
var analytics = injector.get(Analytics);
|
|
510
|
+
if (!router || !analytics) {
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
zone.runOutsideAngular(function () {
|
|
514
|
+
_this.disposable = ɵscreenViewEvent(router, title, componentFactoryResolver).pipe(operators.switchMap(function (params) { return __awaiter(_this, void 0, void 0, function () {
|
|
515
|
+
return __generator(this, function (_b) {
|
|
516
|
+
switch (_b.label) {
|
|
517
|
+
case 0:
|
|
518
|
+
if (!userTrackingService) return [3 /*break*/, 2];
|
|
519
|
+
return [4 /*yield*/, userTrackingService.initialized];
|
|
520
|
+
case 1:
|
|
521
|
+
_b.sent();
|
|
522
|
+
_b.label = 2;
|
|
523
|
+
case 2: return [2 /*return*/, logEvent(analytics, SCREEN_VIEW_EVENT, params)];
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
}); })).subscribe();
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
ScreenTrackingService.prototype.ngOnDestroy = function () {
|
|
531
|
+
if (this.disposable) {
|
|
532
|
+
this.disposable.unsubscribe();
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
return ScreenTrackingService;
|
|
536
|
+
}());
|
|
537
|
+
ScreenTrackingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: ScreenTrackingService, deps: [{ token: i1__namespace$1.Router, optional: true }, { token: i2__namespace.Title, optional: true }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.NgZone }, { token: UserTrackingService, optional: true }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
538
|
+
ScreenTrackingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: ScreenTrackingService });
|
|
539
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: ScreenTrackingService, decorators: [{
|
|
540
|
+
type: i0.Injectable
|
|
541
|
+
}], ctorParameters: function () {
|
|
542
|
+
return [{ type: i1__namespace$1.Router, decorators: [{
|
|
543
|
+
type: i0.Optional
|
|
544
|
+
}] }, { type: i2__namespace.Title, decorators: [{
|
|
545
|
+
type: i0.Optional
|
|
546
|
+
}] }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.NgZone }, { type: UserTrackingService, decorators: [{
|
|
547
|
+
type: i0.Optional
|
|
548
|
+
}] }, { type: i0__namespace.Injector }];
|
|
549
|
+
} });
|
|
550
|
+
|
|
44
551
|
var PROVIDED_ANALYTICS_INSTANCES = new i0.InjectionToken('angularfire2.analytics-instances');
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return new Analytics(defaultAnalytics);
|
|
552
|
+
function defaultAnalyticsInstanceFactory(provided, defaultApp) {
|
|
553
|
+
if (!fire.ɵisAnalyticsSupportedFactory.sync()) {
|
|
554
|
+
return null;
|
|
555
|
+
}
|
|
556
|
+
var defaultAnalytics = fire.ɵgetDefaultInstanceOf(ANALYTICS_PROVIDER_NAME, provided, defaultApp);
|
|
557
|
+
return defaultAnalytics && new Analytics(defaultAnalytics);
|
|
52
558
|
}
|
|
53
559
|
function analyticsInstanceFactory(fn) {
|
|
54
|
-
return function (zone,
|
|
55
|
-
|
|
560
|
+
return function (zone, injector) {
|
|
561
|
+
if (!fire.ɵisAnalyticsSupportedFactory.sync()) {
|
|
562
|
+
return null;
|
|
563
|
+
}
|
|
564
|
+
var analytics = zone.runOutsideAngular(function () { return fn(injector); });
|
|
56
565
|
return new Analytics(analytics);
|
|
57
566
|
};
|
|
58
567
|
}
|
|
@@ -66,27 +575,26 @@
|
|
|
66
575
|
provide: Analytics,
|
|
67
576
|
useFactory: defaultAnalyticsInstanceFactory,
|
|
68
577
|
deps: [
|
|
69
|
-
IS_SUPPORTED,
|
|
70
578
|
[new i0.Optional(), PROVIDED_ANALYTICS_INSTANCES],
|
|
71
|
-
app.FirebaseApp,
|
|
579
|
+
app$1.FirebaseApp,
|
|
72
580
|
]
|
|
73
581
|
};
|
|
74
582
|
var AnalyticsModule = /** @class */ (function () {
|
|
75
|
-
function AnalyticsModule() {
|
|
76
|
-
app
|
|
583
|
+
function AnalyticsModule(_screenTrackingService, _userTrackingService) {
|
|
584
|
+
app.registerVersion('angularfire', fire.VERSION.full, 'analytics');
|
|
77
585
|
}
|
|
78
586
|
return AnalyticsModule;
|
|
79
587
|
}());
|
|
80
|
-
AnalyticsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AnalyticsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
588
|
+
AnalyticsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AnalyticsModule, deps: [{ token: ScreenTrackingService, optional: true }, { token: UserTrackingService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
81
589
|
AnalyticsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AnalyticsModule });
|
|
82
590
|
AnalyticsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AnalyticsModule, providers: [
|
|
83
591
|
DEFAULT_ANALYTICS_INSTANCE_PROVIDER,
|
|
84
592
|
ANALYTICS_INSTANCES_PROVIDER,
|
|
85
593
|
{
|
|
86
594
|
provide: i0.APP_INITIALIZER,
|
|
87
|
-
useValue:
|
|
595
|
+
useValue: fire.ɵisAnalyticsSupportedFactory.async,
|
|
88
596
|
multi: true,
|
|
89
|
-
}
|
|
597
|
+
}
|
|
90
598
|
] });
|
|
91
599
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AnalyticsModule, decorators: [{
|
|
92
600
|
type: i0.NgModule,
|
|
@@ -96,43 +604,39 @@
|
|
|
96
604
|
ANALYTICS_INSTANCES_PROVIDER,
|
|
97
605
|
{
|
|
98
606
|
provide: i0.APP_INITIALIZER,
|
|
99
|
-
useValue:
|
|
607
|
+
useValue: fire.ɵisAnalyticsSupportedFactory.async,
|
|
100
608
|
multi: true,
|
|
101
|
-
}
|
|
609
|
+
}
|
|
102
610
|
]
|
|
103
611
|
}]
|
|
104
|
-
}], ctorParameters: function () {
|
|
612
|
+
}], ctorParameters: function () {
|
|
613
|
+
return [{ type: ScreenTrackingService, decorators: [{
|
|
614
|
+
type: i0.Optional
|
|
615
|
+
}] }, { type: UserTrackingService, decorators: [{
|
|
616
|
+
type: i0.Optional
|
|
617
|
+
}] }];
|
|
618
|
+
} });
|
|
105
619
|
function provideAnalytics(fn) {
|
|
620
|
+
var deps = [];
|
|
621
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
622
|
+
deps[_i - 1] = arguments[_i];
|
|
623
|
+
}
|
|
106
624
|
return {
|
|
107
625
|
ngModule: AnalyticsModule,
|
|
108
626
|
providers: [{
|
|
109
|
-
provide: IS_SUPPORTED,
|
|
110
|
-
useFactory: function () { return globalThis[isSupportedSymbol]; },
|
|
111
|
-
}, {
|
|
112
627
|
provide: PROVIDED_ANALYTICS_INSTANCES,
|
|
113
628
|
useFactory: analyticsInstanceFactory(fn),
|
|
114
629
|
multi: true,
|
|
115
|
-
deps: [
|
|
630
|
+
deps: __spreadArray([
|
|
116
631
|
i0.NgZone,
|
|
117
|
-
|
|
632
|
+
i0.Injector,
|
|
118
633
|
fire.ɵAngularFireSchedulers,
|
|
119
|
-
app.FirebaseApps
|
|
120
|
-
]
|
|
634
|
+
app$1.FirebaseApps
|
|
635
|
+
], __read(deps))
|
|
121
636
|
}]
|
|
122
637
|
};
|
|
123
638
|
}
|
|
124
639
|
|
|
125
|
-
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
126
|
-
var getAnalytics = fire.ɵzoneWrap(analytics.getAnalytics, true);
|
|
127
|
-
var initializeAnalytics = fire.ɵzoneWrap(analytics.initializeAnalytics, true);
|
|
128
|
-
var isSupported = fire.ɵzoneWrap(analytics.isSupported, true);
|
|
129
|
-
var logEvent = fire.ɵzoneWrap(analytics.logEvent, true);
|
|
130
|
-
var setAnalyticsCollectionEnabled = fire.ɵzoneWrap(analytics.setAnalyticsCollectionEnabled, true);
|
|
131
|
-
var setCurrentScreen = fire.ɵzoneWrap(analytics.setCurrentScreen, true);
|
|
132
|
-
var settings = fire.ɵzoneWrap(analytics.settings, true);
|
|
133
|
-
var setUserId = fire.ɵzoneWrap(analytics.setUserId, true);
|
|
134
|
-
var setUserProperties = fire.ɵzoneWrap(analytics.setUserProperties, true);
|
|
135
|
-
|
|
136
640
|
/**
|
|
137
641
|
* Generated bundle index. Do not edit.
|
|
138
642
|
*/
|
|
@@ -140,6 +644,8 @@
|
|
|
140
644
|
exports.Analytics = Analytics;
|
|
141
645
|
exports.AnalyticsInstances = AnalyticsInstances;
|
|
142
646
|
exports.AnalyticsModule = AnalyticsModule;
|
|
647
|
+
exports.ScreenTrackingService = ScreenTrackingService;
|
|
648
|
+
exports.UserTrackingService = UserTrackingService;
|
|
143
649
|
exports.analyticInstance$ = analyticInstance$;
|
|
144
650
|
exports.getAnalytics = getAnalytics;
|
|
145
651
|
exports.initializeAnalytics = initializeAnalytics;
|
|
@@ -151,6 +657,7 @@
|
|
|
151
657
|
exports.setUserId = setUserId;
|
|
152
658
|
exports.setUserProperties = setUserProperties;
|
|
153
659
|
exports.settings = settings;
|
|
660
|
+
exports.ɵscreenViewEvent = ɵscreenViewEvent;
|
|
154
661
|
Object.keys(analytics).forEach(function (k) {
|
|
155
662
|
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
156
663
|
enumerable: true,
|