@firebase/analytics-compat 0.1.2-2021822203916

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/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # @firebase/analytics-compat
2
+
3
+ ## 0.1.2-2021822203916
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422) [#5506](https://github.com/firebase/firebase-js-sdk/pull/5506) - checking isSupported led to runtime errors in certain environments
8
+
9
+ - Updated dependencies [[`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422), [`b835b4cba`](https://github.com/firebase/firebase-js-sdk/commit/b835b4cbabc4b7b180ae38b908c49205ce31a422)]:
10
+ - @firebase/analytics@0.7.1-2021822203916
11
+ - @firebase/util@1.3.1-2021822203916
12
+ - @firebase/app-compat@0.1.2-2021822203916
13
+ - @firebase/component@0.5.7-2021822203916
14
+
15
+ ## 0.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [`cd15df0d1`](https://github.com/firebase/firebase-js-sdk/commit/cd15df0d1f51110f448e4284244b06be8d37f1c3) [#5400](https://github.com/firebase/firebase-js-sdk/pull/5400) (fixes [#2903](https://github.com/firebase/firebase-js-sdk/issues/2903)) - Fix cjs builds by removing the named export from app-compat
20
+
21
+ ## 0.1.0
22
+
23
+ ### Minor Changes
24
+
25
+ - [`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6) [#5345](https://github.com/firebase/firebase-js-sdk/pull/5345) (fixes [#5015](https://github.com/firebase/firebase-js-sdk/issues/5015)) - Release modularized SDKs
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [[`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6)]:
30
+ - @firebase/analytics@0.7.0
31
+ - @firebase/analytics-types@0.7.0
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @firebase/analytics-compat
2
+
3
+ This is the compatibility layer for the Firebase Analytics component of the Firebase JS SDK.
4
+
5
+ **This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
@@ -0,0 +1,152 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var firebase = require('@firebase/app-compat');
6
+ var analytics = require('@firebase/analytics');
7
+ var component = require('@firebase/component');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
12
+
13
+ var name = "@firebase/analytics-compat";
14
+ var version = "0.1.2-2021822203916";
15
+
16
+ /**
17
+ * @license
18
+ * Copyright 2020 Google LLC
19
+ *
20
+ * Licensed under the Apache License, Version 2.0 (the "License");
21
+ * you may not use this file except in compliance with the License.
22
+ * You may obtain a copy of the License at
23
+ *
24
+ * http://www.apache.org/licenses/LICENSE-2.0
25
+ *
26
+ * Unless required by applicable law or agreed to in writing, software
27
+ * distributed under the License is distributed on an "AS IS" BASIS,
28
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
+ * See the License for the specific language governing permissions and
30
+ * limitations under the License.
31
+ */
32
+ var AnalyticsService = /** @class */ (function () {
33
+ function AnalyticsService(app, _delegate) {
34
+ this.app = app;
35
+ this._delegate = _delegate;
36
+ }
37
+ AnalyticsService.prototype.logEvent = function (eventName, eventParams, options) {
38
+ analytics.logEvent(this._delegate, eventName, eventParams, options);
39
+ };
40
+ AnalyticsService.prototype.setCurrentScreen = function (screenName, options) {
41
+ analytics.setCurrentScreen(this._delegate, screenName, options);
42
+ };
43
+ AnalyticsService.prototype.setUserId = function (id, options) {
44
+ analytics.setUserId(this._delegate, id, options);
45
+ };
46
+ AnalyticsService.prototype.setUserProperties = function (properties, options) {
47
+ analytics.setUserProperties(this._delegate, properties, options);
48
+ };
49
+ AnalyticsService.prototype.setAnalyticsCollectionEnabled = function (enabled) {
50
+ analytics.setAnalyticsCollectionEnabled(this._delegate, enabled);
51
+ };
52
+ return AnalyticsService;
53
+ }());
54
+
55
+ /**
56
+ * @license
57
+ * Copyright 2021 Google LLC
58
+ *
59
+ * Licensed under the Apache License, Version 2.0 (the "License");
60
+ * you may not use this file except in compliance with the License.
61
+ * You may obtain a copy of the License at
62
+ *
63
+ * http://www.apache.org/licenses/LICENSE-2.0
64
+ *
65
+ * Unless required by applicable law or agreed to in writing, software
66
+ * distributed under the License is distributed on an "AS IS" BASIS,
67
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
68
+ * See the License for the specific language governing permissions and
69
+ * limitations under the License.
70
+ */
71
+ /**
72
+ * Officially recommended event names for gtag.js
73
+ * Any other string is also allowed.
74
+ */
75
+ var EventName;
76
+ (function (EventName) {
77
+ EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
78
+ EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
79
+ EventName["ADD_TO_CART"] = "add_to_cart";
80
+ EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
81
+ EventName["BEGIN_CHECKOUT"] = "begin_checkout";
82
+ /**
83
+ * @deprecated
84
+ * This event name is deprecated and is unsupported in updated
85
+ * Enhanced Ecommerce reports.
86
+ */
87
+ EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
88
+ EventName["EXCEPTION"] = "exception";
89
+ EventName["GENERATE_LEAD"] = "generate_lead";
90
+ EventName["LOGIN"] = "login";
91
+ EventName["PAGE_VIEW"] = "page_view";
92
+ EventName["PURCHASE"] = "purchase";
93
+ EventName["REFUND"] = "refund";
94
+ EventName["REMOVE_FROM_CART"] = "remove_from_cart";
95
+ EventName["SCREEN_VIEW"] = "screen_view";
96
+ EventName["SEARCH"] = "search";
97
+ EventName["SELECT_CONTENT"] = "select_content";
98
+ EventName["SELECT_ITEM"] = "select_item";
99
+ EventName["SELECT_PROMOTION"] = "select_promotion";
100
+ /** @deprecated */
101
+ EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
102
+ EventName["SHARE"] = "share";
103
+ EventName["SIGN_UP"] = "sign_up";
104
+ EventName["TIMING_COMPLETE"] = "timing_complete";
105
+ EventName["VIEW_CART"] = "view_cart";
106
+ EventName["VIEW_ITEM"] = "view_item";
107
+ EventName["VIEW_ITEM_LIST"] = "view_item_list";
108
+ EventName["VIEW_PROMOTION"] = "view_promotion";
109
+ EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
110
+ })(EventName || (EventName = {}));
111
+
112
+ /**
113
+ * @license
114
+ * Copyright 2021 Google LLC
115
+ *
116
+ * Licensed under the Apache License, Version 2.0 (the "License");
117
+ * you may not use this file except in compliance with the License.
118
+ * You may obtain a copy of the License at
119
+ *
120
+ * http://www.apache.org/licenses/LICENSE-2.0
121
+ *
122
+ * Unless required by applicable law or agreed to in writing, software
123
+ * distributed under the License is distributed on an "AS IS" BASIS,
124
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
125
+ * See the License for the specific language governing permissions and
126
+ * limitations under the License.
127
+ */
128
+ var factory = function (container) {
129
+ // Dependencies
130
+ var app = container.getProvider('app-compat').getImmediate();
131
+ var analyticsServiceExp = container
132
+ .getProvider('analytics')
133
+ .getImmediate();
134
+ return new AnalyticsService(app, analyticsServiceExp);
135
+ };
136
+ function registerAnalytics() {
137
+ var namespaceExports = {
138
+ Analytics: AnalyticsService,
139
+ settings: analytics.settings,
140
+ isSupported: analytics.isSupported,
141
+ // We removed this enum in exp so need to re-create it here for compat.
142
+ EventName: EventName
143
+ };
144
+ firebase__default['default'].INTERNAL.registerComponent(new component.Component('analytics-compat', factory, "PUBLIC" /* PUBLIC */)
145
+ .setServiceProps(namespaceExports)
146
+ .setMultipleInstances(true));
147
+ }
148
+ registerAnalytics();
149
+ firebase__default['default'].registerVersion(name, version);
150
+
151
+ exports.registerAnalytics = registerAnalytics;
152
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/service.ts","../src/constants.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AnalyticsCallOptions,\n CustomParams,\n EventParams,\n FirebaseAnalytics\n} from '@firebase/analytics-types';\nimport {\n Analytics as AnalyticsServiceExp,\n logEvent as logEventExp,\n setAnalyticsCollectionEnabled as setAnalyticsCollectionEnabledExp,\n setCurrentScreen as setCurrentScreenExp,\n setUserId as setUserIdExp,\n setUserProperties as setUserPropertiesExp\n} from '@firebase/analytics';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\n\nexport class AnalyticsService implements FirebaseAnalytics, _FirebaseService {\n constructor(\n public app: FirebaseApp,\n readonly _delegate: AnalyticsServiceExp\n ) {}\n\n logEvent(\n eventName: string,\n eventParams?: EventParams | CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n logEventExp(this._delegate, eventName as '', eventParams, options);\n }\n\n setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void {\n setCurrentScreenExp(this._delegate, screenName, options);\n }\n\n setUserId(id: string, options?: AnalyticsCallOptions): void {\n setUserIdExp(this._delegate, id, options);\n }\n\n setUserProperties(\n properties: CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n setUserPropertiesExp(this._delegate, properties, options);\n }\n\n setAnalyticsCollectionEnabled(enabled: boolean): void {\n setAnalyticsCollectionEnabledExp(this._delegate, enabled);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Officially recommended event names for gtag.js\n * Any other string is also allowed.\n */\nexport enum EventName {\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n BEGIN_CHECKOUT = 'begin_checkout',\n /**\n * @deprecated\n * This event name is deprecated and is unsupported in updated\n * Enhanced Ecommerce reports.\n */\n CHECKOUT_PROGRESS = 'checkout_progress',\n EXCEPTION = 'exception',\n GENERATE_LEAD = 'generate_lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n REMOVE_FROM_CART = 'remove_from_cart',\n SCREEN_VIEW = 'screen_view',\n SEARCH = 'search',\n SELECT_CONTENT = 'select_content',\n SELECT_ITEM = 'select_item',\n SELECT_PROMOTION = 'select_promotion',\n /** @deprecated */\n SET_CHECKOUT_OPTION = 'set_checkout_option',\n SHARE = 'share',\n SIGN_UP = 'sign_up',\n TIMING_COMPLETE = 'timing_complete',\n VIEW_CART = 'view_cart',\n VIEW_ITEM = 'view_item',\n VIEW_ITEM_LIST = 'view_item_list',\n VIEW_PROMOTION = 'view_promotion',\n VIEW_SEARCH_RESULTS = 'view_search_results'\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { FirebaseAnalytics } from '@firebase/analytics-types';\nimport { name, version } from '../package.json';\nimport { AnalyticsService } from './service';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport {\n settings as settingsExp,\n isSupported as isSupportedExp\n} from '@firebase/analytics';\nimport { EventName } from './constants';\n\nconst factory: InstanceFactory<'analytics-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const analyticsServiceExp = container\n .getProvider('analytics')\n .getImmediate();\n\n return new AnalyticsService(app as FirebaseApp, analyticsServiceExp);\n};\n\nexport function registerAnalytics(): void {\n const namespaceExports = {\n Analytics: AnalyticsService,\n settings: settingsExp,\n isSupported: isSupportedExp,\n // We removed this enum in exp so need to re-create it here for compat.\n EventName\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('analytics-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n\nregisterAnalytics();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAnalytics`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n analytics(app?: FirebaseApp): FirebaseAnalytics;\n }\n interface FirebaseApp {\n analytics(): FirebaseAnalytics;\n }\n}\n"],"names":["logEventExp","setCurrentScreenExp","setUserIdExp","setUserPropertiesExp","setAnalyticsCollectionEnabledExp","settingsExp","isSupportedExp","firebase","Component"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAiCA;IACE,0BACS,GAAgB,EACd,SAA8B;QADhC,QAAG,GAAH,GAAG,CAAa;QACd,cAAS,GAAT,SAAS,CAAqB;KACrC;IAEJ,mCAAQ,GAAR,UACE,SAAiB,EACjB,WAAwC,EACxC,OAA8B;QAE9BA,kBAAW,CAAC,IAAI,CAAC,SAAS,EAAE,SAAe,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;KACpE;IAED,2CAAgB,GAAhB,UAAiB,UAAkB,EAAE,OAA8B;QACjEC,0BAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC1D;IAED,oCAAS,GAAT,UAAU,EAAU,EAAE,OAA8B;QAClDC,mBAAY,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;KAC3C;IAED,4CAAiB,GAAjB,UACE,UAAwB,EACxB,OAA8B;QAE9BC,2BAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC3D;IAED,wDAA6B,GAA7B,UAA8B,OAAgB;QAC5CC,uCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;KAC3D;IACH,uBAAC;AAAD,CAAC;;ACjED;;;;;;;;;;;;;;;;AAiBA;;;;AAIA,IAAY,SAkCX;AAlCD,WAAY,SAAS;IACnB,oDAAuC,CAAA;IACvC,kDAAqC,CAAA;IACrC,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;;;;;;IAMjC,oDAAuC,CAAA;IACvC,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;IAC/B,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,kDAAqC,CAAA;IACrC,wCAA2B,CAAA;IAC3B,8BAAiB,CAAA;IACjB,8CAAiC,CAAA;IACjC,wCAA2B,CAAA;IAC3B,kDAAqC,CAAA;;IAErC,wDAA2C,CAAA;IAC3C,4BAAe,CAAA;IACf,gCAAmB,CAAA;IACnB,gDAAmC,CAAA;IACnC,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;IACvB,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;AAC7C,CAAC,EAlCW,SAAS,KAAT,SAAS;;ACrBrB;;;;;;;;;;;;;;;;AAoCA,IAAM,OAAO,GAAwC,UACnD,SAA6B;;IAG7B,IAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;IAC/D,IAAM,mBAAmB,GAAG,SAAS;SAClC,WAAW,CAAC,WAAW,CAAC;SACxB,YAAY,EAAE,CAAC;IAElB,OAAO,IAAI,gBAAgB,CAAC,GAAkB,EAAE,mBAAmB,CAAC,CAAC;AACvE,CAAC,CAAC;SAEc,iBAAiB;IAC/B,IAAM,gBAAgB,GAAG;QACvB,SAAS,EAAE,gBAAgB;QAC3B,QAAQ,EAAEC,kBAAW;QACrB,WAAW,EAAEC,qBAAc;;QAE3B,SAAS,WAAA;KACV,CAAC;IACDC,4BAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAIC,mBAAS,CAAC,kBAAkB,EAAE,OAAO,wBAAuB;SAC7D,eAAe,CAAC,gBAAgB,CAAC;SACjC,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,iBAAiB,EAAE,CAAC;AACpBD,4BAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;"}
@@ -0,0 +1,144 @@
1
+ import firebase from '@firebase/app-compat';
2
+ import { logEvent, setCurrentScreen, setUserId, setUserProperties, setAnalyticsCollectionEnabled, settings, isSupported } from '@firebase/analytics';
3
+ import { Component } from '@firebase/component';
4
+
5
+ var name = "@firebase/analytics-compat";
6
+ var version = "0.1.2-2021822203916";
7
+
8
+ /**
9
+ * @license
10
+ * Copyright 2020 Google LLC
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+ var AnalyticsService = /** @class */ (function () {
25
+ function AnalyticsService(app, _delegate) {
26
+ this.app = app;
27
+ this._delegate = _delegate;
28
+ }
29
+ AnalyticsService.prototype.logEvent = function (eventName, eventParams, options) {
30
+ logEvent(this._delegate, eventName, eventParams, options);
31
+ };
32
+ AnalyticsService.prototype.setCurrentScreen = function (screenName, options) {
33
+ setCurrentScreen(this._delegate, screenName, options);
34
+ };
35
+ AnalyticsService.prototype.setUserId = function (id, options) {
36
+ setUserId(this._delegate, id, options);
37
+ };
38
+ AnalyticsService.prototype.setUserProperties = function (properties, options) {
39
+ setUserProperties(this._delegate, properties, options);
40
+ };
41
+ AnalyticsService.prototype.setAnalyticsCollectionEnabled = function (enabled) {
42
+ setAnalyticsCollectionEnabled(this._delegate, enabled);
43
+ };
44
+ return AnalyticsService;
45
+ }());
46
+
47
+ /**
48
+ * @license
49
+ * Copyright 2021 Google LLC
50
+ *
51
+ * Licensed under the Apache License, Version 2.0 (the "License");
52
+ * you may not use this file except in compliance with the License.
53
+ * You may obtain a copy of the License at
54
+ *
55
+ * http://www.apache.org/licenses/LICENSE-2.0
56
+ *
57
+ * Unless required by applicable law or agreed to in writing, software
58
+ * distributed under the License is distributed on an "AS IS" BASIS,
59
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
60
+ * See the License for the specific language governing permissions and
61
+ * limitations under the License.
62
+ */
63
+ /**
64
+ * Officially recommended event names for gtag.js
65
+ * Any other string is also allowed.
66
+ */
67
+ var EventName;
68
+ (function (EventName) {
69
+ EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
70
+ EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
71
+ EventName["ADD_TO_CART"] = "add_to_cart";
72
+ EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
73
+ EventName["BEGIN_CHECKOUT"] = "begin_checkout";
74
+ /**
75
+ * @deprecated
76
+ * This event name is deprecated and is unsupported in updated
77
+ * Enhanced Ecommerce reports.
78
+ */
79
+ EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
80
+ EventName["EXCEPTION"] = "exception";
81
+ EventName["GENERATE_LEAD"] = "generate_lead";
82
+ EventName["LOGIN"] = "login";
83
+ EventName["PAGE_VIEW"] = "page_view";
84
+ EventName["PURCHASE"] = "purchase";
85
+ EventName["REFUND"] = "refund";
86
+ EventName["REMOVE_FROM_CART"] = "remove_from_cart";
87
+ EventName["SCREEN_VIEW"] = "screen_view";
88
+ EventName["SEARCH"] = "search";
89
+ EventName["SELECT_CONTENT"] = "select_content";
90
+ EventName["SELECT_ITEM"] = "select_item";
91
+ EventName["SELECT_PROMOTION"] = "select_promotion";
92
+ /** @deprecated */
93
+ EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
94
+ EventName["SHARE"] = "share";
95
+ EventName["SIGN_UP"] = "sign_up";
96
+ EventName["TIMING_COMPLETE"] = "timing_complete";
97
+ EventName["VIEW_CART"] = "view_cart";
98
+ EventName["VIEW_ITEM"] = "view_item";
99
+ EventName["VIEW_ITEM_LIST"] = "view_item_list";
100
+ EventName["VIEW_PROMOTION"] = "view_promotion";
101
+ EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
102
+ })(EventName || (EventName = {}));
103
+
104
+ /**
105
+ * @license
106
+ * Copyright 2021 Google LLC
107
+ *
108
+ * Licensed under the Apache License, Version 2.0 (the "License");
109
+ * you may not use this file except in compliance with the License.
110
+ * You may obtain a copy of the License at
111
+ *
112
+ * http://www.apache.org/licenses/LICENSE-2.0
113
+ *
114
+ * Unless required by applicable law or agreed to in writing, software
115
+ * distributed under the License is distributed on an "AS IS" BASIS,
116
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
117
+ * See the License for the specific language governing permissions and
118
+ * limitations under the License.
119
+ */
120
+ var factory = function (container) {
121
+ // Dependencies
122
+ var app = container.getProvider('app-compat').getImmediate();
123
+ var analyticsServiceExp = container
124
+ .getProvider('analytics')
125
+ .getImmediate();
126
+ return new AnalyticsService(app, analyticsServiceExp);
127
+ };
128
+ function registerAnalytics() {
129
+ var namespaceExports = {
130
+ Analytics: AnalyticsService,
131
+ settings: settings,
132
+ isSupported: isSupported,
133
+ // We removed this enum in exp so need to re-create it here for compat.
134
+ EventName: EventName
135
+ };
136
+ firebase.INTERNAL.registerComponent(new Component('analytics-compat', factory, "PUBLIC" /* PUBLIC */)
137
+ .setServiceProps(namespaceExports)
138
+ .setMultipleInstances(true));
139
+ }
140
+ registerAnalytics();
141
+ firebase.registerVersion(name, version);
142
+
143
+ export { registerAnalytics };
144
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/service.ts","../src/constants.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AnalyticsCallOptions,\n CustomParams,\n EventParams,\n FirebaseAnalytics\n} from '@firebase/analytics-types';\nimport {\n Analytics as AnalyticsServiceExp,\n logEvent as logEventExp,\n setAnalyticsCollectionEnabled as setAnalyticsCollectionEnabledExp,\n setCurrentScreen as setCurrentScreenExp,\n setUserId as setUserIdExp,\n setUserProperties as setUserPropertiesExp\n} from '@firebase/analytics';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\n\nexport class AnalyticsService implements FirebaseAnalytics, _FirebaseService {\n constructor(\n public app: FirebaseApp,\n readonly _delegate: AnalyticsServiceExp\n ) {}\n\n logEvent(\n eventName: string,\n eventParams?: EventParams | CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n logEventExp(this._delegate, eventName as '', eventParams, options);\n }\n\n setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void {\n setCurrentScreenExp(this._delegate, screenName, options);\n }\n\n setUserId(id: string, options?: AnalyticsCallOptions): void {\n setUserIdExp(this._delegate, id, options);\n }\n\n setUserProperties(\n properties: CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n setUserPropertiesExp(this._delegate, properties, options);\n }\n\n setAnalyticsCollectionEnabled(enabled: boolean): void {\n setAnalyticsCollectionEnabledExp(this._delegate, enabled);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Officially recommended event names for gtag.js\n * Any other string is also allowed.\n */\nexport enum EventName {\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n BEGIN_CHECKOUT = 'begin_checkout',\n /**\n * @deprecated\n * This event name is deprecated and is unsupported in updated\n * Enhanced Ecommerce reports.\n */\n CHECKOUT_PROGRESS = 'checkout_progress',\n EXCEPTION = 'exception',\n GENERATE_LEAD = 'generate_lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n REMOVE_FROM_CART = 'remove_from_cart',\n SCREEN_VIEW = 'screen_view',\n SEARCH = 'search',\n SELECT_CONTENT = 'select_content',\n SELECT_ITEM = 'select_item',\n SELECT_PROMOTION = 'select_promotion',\n /** @deprecated */\n SET_CHECKOUT_OPTION = 'set_checkout_option',\n SHARE = 'share',\n SIGN_UP = 'sign_up',\n TIMING_COMPLETE = 'timing_complete',\n VIEW_CART = 'view_cart',\n VIEW_ITEM = 'view_item',\n VIEW_ITEM_LIST = 'view_item_list',\n VIEW_PROMOTION = 'view_promotion',\n VIEW_SEARCH_RESULTS = 'view_search_results'\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { FirebaseAnalytics } from '@firebase/analytics-types';\nimport { name, version } from '../package.json';\nimport { AnalyticsService } from './service';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport {\n settings as settingsExp,\n isSupported as isSupportedExp\n} from '@firebase/analytics';\nimport { EventName } from './constants';\n\nconst factory: InstanceFactory<'analytics-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const analyticsServiceExp = container\n .getProvider('analytics')\n .getImmediate();\n\n return new AnalyticsService(app as FirebaseApp, analyticsServiceExp);\n};\n\nexport function registerAnalytics(): void {\n const namespaceExports = {\n Analytics: AnalyticsService,\n settings: settingsExp,\n isSupported: isSupportedExp,\n // We removed this enum in exp so need to re-create it here for compat.\n EventName\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('analytics-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n\nregisterAnalytics();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAnalytics`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n analytics(app?: FirebaseApp): FirebaseAnalytics;\n }\n interface FirebaseApp {\n analytics(): FirebaseAnalytics;\n }\n}\n"],"names":["logEventExp","setCurrentScreenExp","setUserIdExp","setUserPropertiesExp","setAnalyticsCollectionEnabledExp","settingsExp","isSupportedExp"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;AAiCA;IACE,0BACS,GAAgB,EACd,SAA8B;QADhC,QAAG,GAAH,GAAG,CAAa;QACd,cAAS,GAAT,SAAS,CAAqB;KACrC;IAEJ,mCAAQ,GAAR,UACE,SAAiB,EACjB,WAAwC,EACxC,OAA8B;QAE9BA,QAAW,CAAC,IAAI,CAAC,SAAS,EAAE,SAAe,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;KACpE;IAED,2CAAgB,GAAhB,UAAiB,UAAkB,EAAE,OAA8B;QACjEC,gBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC1D;IAED,oCAAS,GAAT,UAAU,EAAU,EAAE,OAA8B;QAClDC,SAAY,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;KAC3C;IAED,4CAAiB,GAAjB,UACE,UAAwB,EACxB,OAA8B;QAE9BC,iBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC3D;IAED,wDAA6B,GAA7B,UAA8B,OAAgB;QAC5CC,6BAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;KAC3D;IACH,uBAAC;AAAD,CAAC;;ACjED;;;;;;;;;;;;;;;;AAiBA;;;;AAIA,IAAY,SAkCX;AAlCD,WAAY,SAAS;IACnB,oDAAuC,CAAA;IACvC,kDAAqC,CAAA;IACrC,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;;;;;;IAMjC,oDAAuC,CAAA;IACvC,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;IAC/B,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,kDAAqC,CAAA;IACrC,wCAA2B,CAAA;IAC3B,8BAAiB,CAAA;IACjB,8CAAiC,CAAA;IACjC,wCAA2B,CAAA;IAC3B,kDAAqC,CAAA;;IAErC,wDAA2C,CAAA;IAC3C,4BAAe,CAAA;IACf,gCAAmB,CAAA;IACnB,gDAAmC,CAAA;IACnC,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;IACvB,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;AAC7C,CAAC,EAlCW,SAAS,KAAT,SAAS;;ACrBrB;;;;;;;;;;;;;;;;AAoCA,IAAM,OAAO,GAAwC,UACnD,SAA6B;;IAG7B,IAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;IAC/D,IAAM,mBAAmB,GAAG,SAAS;SAClC,WAAW,CAAC,WAAW,CAAC;SACxB,YAAY,EAAE,CAAC;IAElB,OAAO,IAAI,gBAAgB,CAAC,GAAkB,EAAE,mBAAmB,CAAC,CAAC;AACvE,CAAC,CAAC;SAEc,iBAAiB;IAC/B,IAAM,gBAAgB,GAAG;QACvB,SAAS,EAAE,gBAAgB;QAC3B,QAAQ,EAAEC,QAAW;QACrB,WAAW,EAAEC,WAAc;;QAE3B,SAAS,WAAA;KACV,CAAC;IACD,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAI,SAAS,CAAC,kBAAkB,EAAE,OAAO,wBAAuB;SAC7D,eAAe,CAAC,gBAAgB,CAAC;SACjC,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,iBAAiB,EAAE,CAAC;AACpB,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;"}
@@ -0,0 +1,143 @@
1
+ import firebase from '@firebase/app-compat';
2
+ import { logEvent, setCurrentScreen, setUserId, setUserProperties, setAnalyticsCollectionEnabled, settings, isSupported } from '@firebase/analytics';
3
+ import { Component } from '@firebase/component';
4
+
5
+ const name = "@firebase/analytics-compat";
6
+ const version = "0.1.2-2021822203916";
7
+
8
+ /**
9
+ * @license
10
+ * Copyright 2020 Google LLC
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+ class AnalyticsService {
25
+ constructor(app, _delegate) {
26
+ this.app = app;
27
+ this._delegate = _delegate;
28
+ }
29
+ logEvent(eventName, eventParams, options) {
30
+ logEvent(this._delegate, eventName, eventParams, options);
31
+ }
32
+ setCurrentScreen(screenName, options) {
33
+ setCurrentScreen(this._delegate, screenName, options);
34
+ }
35
+ setUserId(id, options) {
36
+ setUserId(this._delegate, id, options);
37
+ }
38
+ setUserProperties(properties, options) {
39
+ setUserProperties(this._delegate, properties, options);
40
+ }
41
+ setAnalyticsCollectionEnabled(enabled) {
42
+ setAnalyticsCollectionEnabled(this._delegate, enabled);
43
+ }
44
+ }
45
+
46
+ /**
47
+ * @license
48
+ * Copyright 2021 Google LLC
49
+ *
50
+ * Licensed under the Apache License, Version 2.0 (the "License");
51
+ * you may not use this file except in compliance with the License.
52
+ * You may obtain a copy of the License at
53
+ *
54
+ * http://www.apache.org/licenses/LICENSE-2.0
55
+ *
56
+ * Unless required by applicable law or agreed to in writing, software
57
+ * distributed under the License is distributed on an "AS IS" BASIS,
58
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
+ * See the License for the specific language governing permissions and
60
+ * limitations under the License.
61
+ */
62
+ /**
63
+ * Officially recommended event names for gtag.js
64
+ * Any other string is also allowed.
65
+ */
66
+ var EventName;
67
+ (function (EventName) {
68
+ EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
69
+ EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
70
+ EventName["ADD_TO_CART"] = "add_to_cart";
71
+ EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
72
+ EventName["BEGIN_CHECKOUT"] = "begin_checkout";
73
+ /**
74
+ * @deprecated
75
+ * This event name is deprecated and is unsupported in updated
76
+ * Enhanced Ecommerce reports.
77
+ */
78
+ EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
79
+ EventName["EXCEPTION"] = "exception";
80
+ EventName["GENERATE_LEAD"] = "generate_lead";
81
+ EventName["LOGIN"] = "login";
82
+ EventName["PAGE_VIEW"] = "page_view";
83
+ EventName["PURCHASE"] = "purchase";
84
+ EventName["REFUND"] = "refund";
85
+ EventName["REMOVE_FROM_CART"] = "remove_from_cart";
86
+ EventName["SCREEN_VIEW"] = "screen_view";
87
+ EventName["SEARCH"] = "search";
88
+ EventName["SELECT_CONTENT"] = "select_content";
89
+ EventName["SELECT_ITEM"] = "select_item";
90
+ EventName["SELECT_PROMOTION"] = "select_promotion";
91
+ /** @deprecated */
92
+ EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
93
+ EventName["SHARE"] = "share";
94
+ EventName["SIGN_UP"] = "sign_up";
95
+ EventName["TIMING_COMPLETE"] = "timing_complete";
96
+ EventName["VIEW_CART"] = "view_cart";
97
+ EventName["VIEW_ITEM"] = "view_item";
98
+ EventName["VIEW_ITEM_LIST"] = "view_item_list";
99
+ EventName["VIEW_PROMOTION"] = "view_promotion";
100
+ EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
101
+ })(EventName || (EventName = {}));
102
+
103
+ /**
104
+ * @license
105
+ * Copyright 2021 Google LLC
106
+ *
107
+ * Licensed under the Apache License, Version 2.0 (the "License");
108
+ * you may not use this file except in compliance with the License.
109
+ * You may obtain a copy of the License at
110
+ *
111
+ * http://www.apache.org/licenses/LICENSE-2.0
112
+ *
113
+ * Unless required by applicable law or agreed to in writing, software
114
+ * distributed under the License is distributed on an "AS IS" BASIS,
115
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
116
+ * See the License for the specific language governing permissions and
117
+ * limitations under the License.
118
+ */
119
+ const factory = (container) => {
120
+ // Dependencies
121
+ const app = container.getProvider('app-compat').getImmediate();
122
+ const analyticsServiceExp = container
123
+ .getProvider('analytics')
124
+ .getImmediate();
125
+ return new AnalyticsService(app, analyticsServiceExp);
126
+ };
127
+ function registerAnalytics() {
128
+ const namespaceExports = {
129
+ Analytics: AnalyticsService,
130
+ settings: settings,
131
+ isSupported: isSupported,
132
+ // We removed this enum in exp so need to re-create it here for compat.
133
+ EventName
134
+ };
135
+ firebase.INTERNAL.registerComponent(new Component('analytics-compat', factory, "PUBLIC" /* PUBLIC */)
136
+ .setServiceProps(namespaceExports)
137
+ .setMultipleInstances(true));
138
+ }
139
+ registerAnalytics();
140
+ firebase.registerVersion(name, version);
141
+
142
+ export { registerAnalytics };
143
+ //# sourceMappingURL=index.esm2017.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm2017.js","sources":["../src/service.ts","../src/constants.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AnalyticsCallOptions,\n CustomParams,\n EventParams,\n FirebaseAnalytics\n} from '@firebase/analytics-types';\nimport {\n Analytics as AnalyticsServiceExp,\n logEvent as logEventExp,\n setAnalyticsCollectionEnabled as setAnalyticsCollectionEnabledExp,\n setCurrentScreen as setCurrentScreenExp,\n setUserId as setUserIdExp,\n setUserProperties as setUserPropertiesExp\n} from '@firebase/analytics';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\n\nexport class AnalyticsService implements FirebaseAnalytics, _FirebaseService {\n constructor(\n public app: FirebaseApp,\n readonly _delegate: AnalyticsServiceExp\n ) {}\n\n logEvent(\n eventName: string,\n eventParams?: EventParams | CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n logEventExp(this._delegate, eventName as '', eventParams, options);\n }\n\n setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void {\n setCurrentScreenExp(this._delegate, screenName, options);\n }\n\n setUserId(id: string, options?: AnalyticsCallOptions): void {\n setUserIdExp(this._delegate, id, options);\n }\n\n setUserProperties(\n properties: CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n setUserPropertiesExp(this._delegate, properties, options);\n }\n\n setAnalyticsCollectionEnabled(enabled: boolean): void {\n setAnalyticsCollectionEnabledExp(this._delegate, enabled);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Officially recommended event names for gtag.js\n * Any other string is also allowed.\n */\nexport enum EventName {\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n BEGIN_CHECKOUT = 'begin_checkout',\n /**\n * @deprecated\n * This event name is deprecated and is unsupported in updated\n * Enhanced Ecommerce reports.\n */\n CHECKOUT_PROGRESS = 'checkout_progress',\n EXCEPTION = 'exception',\n GENERATE_LEAD = 'generate_lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n REMOVE_FROM_CART = 'remove_from_cart',\n SCREEN_VIEW = 'screen_view',\n SEARCH = 'search',\n SELECT_CONTENT = 'select_content',\n SELECT_ITEM = 'select_item',\n SELECT_PROMOTION = 'select_promotion',\n /** @deprecated */\n SET_CHECKOUT_OPTION = 'set_checkout_option',\n SHARE = 'share',\n SIGN_UP = 'sign_up',\n TIMING_COMPLETE = 'timing_complete',\n VIEW_CART = 'view_cart',\n VIEW_ITEM = 'view_item',\n VIEW_ITEM_LIST = 'view_item_list',\n VIEW_PROMOTION = 'view_promotion',\n VIEW_SEARCH_RESULTS = 'view_search_results'\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { FirebaseAnalytics } from '@firebase/analytics-types';\nimport { name, version } from '../package.json';\nimport { AnalyticsService } from './service';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport {\n settings as settingsExp,\n isSupported as isSupportedExp\n} from '@firebase/analytics';\nimport { EventName } from './constants';\n\nconst factory: InstanceFactory<'analytics-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const analyticsServiceExp = container\n .getProvider('analytics')\n .getImmediate();\n\n return new AnalyticsService(app as FirebaseApp, analyticsServiceExp);\n};\n\nexport function registerAnalytics(): void {\n const namespaceExports = {\n Analytics: AnalyticsService,\n settings: settingsExp,\n isSupported: isSupportedExp,\n // We removed this enum in exp so need to re-create it here for compat.\n EventName\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('analytics-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n\nregisterAnalytics();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAnalytics`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n analytics(app?: FirebaseApp): FirebaseAnalytics;\n }\n interface FirebaseApp {\n analytics(): FirebaseAnalytics;\n }\n}\n"],"names":["logEventExp","setCurrentScreenExp","setUserIdExp","setUserPropertiesExp","setAnalyticsCollectionEnabledExp","settingsExp","isSupportedExp"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;MAiCa,gBAAgB;IAC3B,YACS,GAAgB,EACd,SAA8B;QADhC,QAAG,GAAH,GAAG,CAAa;QACd,cAAS,GAAT,SAAS,CAAqB;KACrC;IAEJ,QAAQ,CACN,SAAiB,EACjB,WAAwC,EACxC,OAA8B;QAE9BA,QAAW,CAAC,IAAI,CAAC,SAAS,EAAE,SAAe,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;KACpE;IAED,gBAAgB,CAAC,UAAkB,EAAE,OAA8B;QACjEC,gBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC1D;IAED,SAAS,CAAC,EAAU,EAAE,OAA8B;QAClDC,SAAY,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;KAC3C;IAED,iBAAiB,CACf,UAAwB,EACxB,OAA8B;QAE9BC,iBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC3D;IAED,6BAA6B,CAAC,OAAgB;QAC5CC,6BAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;KAC3D;;;AChEH;;;;;;;;;;;;;;;;AAiBA;;;;AAIA,IAAY,SAkCX;AAlCD,WAAY,SAAS;IACnB,oDAAuC,CAAA;IACvC,kDAAqC,CAAA;IACrC,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;;;;;;IAMjC,oDAAuC,CAAA;IACvC,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;IAC/B,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,kDAAqC,CAAA;IACrC,wCAA2B,CAAA;IAC3B,8BAAiB,CAAA;IACjB,8CAAiC,CAAA;IACjC,wCAA2B,CAAA;IAC3B,kDAAqC,CAAA;;IAErC,wDAA2C,CAAA;IAC3C,4BAAe,CAAA;IACf,gCAAmB,CAAA;IACnB,gDAAmC,CAAA;IACnC,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;IACvB,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;AAC7C,CAAC,EAlCW,SAAS,KAAT,SAAS;;ACrBrB;;;;;;;;;;;;;;;;AAoCA,MAAM,OAAO,GAAwC,CACnD,SAA6B;;IAG7B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,CAAC;IAC/D,MAAM,mBAAmB,GAAG,SAAS;SAClC,WAAW,CAAC,WAAW,CAAC;SACxB,YAAY,EAAE,CAAC;IAElB,OAAO,IAAI,gBAAgB,CAAC,GAAkB,EAAE,mBAAmB,CAAC,CAAC;AACvE,CAAC,CAAC;SAEc,iBAAiB;IAC/B,MAAM,gBAAgB,GAAG;QACvB,SAAS,EAAE,gBAAgB;QAC3B,QAAQ,EAAEC,QAAW;QACrB,WAAW,EAAEC,WAAc;;QAE3B,SAAS;KACV,CAAC;IACD,QAA+B,CAAC,QAAQ,CAAC,iBAAiB,CACzD,IAAI,SAAS,CAAC,kBAAkB,EAAE,OAAO,wBAAuB;SAC7D,eAAe,CAAC,gBAAgB,CAAC;SACjC,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,iBAAiB,EAAE,CAAC;AACpB,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Officially recommended event names for gtag.js
19
+ * Any other string is also allowed.
20
+ */
21
+ export declare enum EventName {
22
+ ADD_SHIPPING_INFO = "add_shipping_info",
23
+ ADD_PAYMENT_INFO = "add_payment_info",
24
+ ADD_TO_CART = "add_to_cart",
25
+ ADD_TO_WISHLIST = "add_to_wishlist",
26
+ BEGIN_CHECKOUT = "begin_checkout",
27
+ /**
28
+ * @deprecated
29
+ * This event name is deprecated and is unsupported in updated
30
+ * Enhanced Ecommerce reports.
31
+ */
32
+ CHECKOUT_PROGRESS = "checkout_progress",
33
+ EXCEPTION = "exception",
34
+ GENERATE_LEAD = "generate_lead",
35
+ LOGIN = "login",
36
+ PAGE_VIEW = "page_view",
37
+ PURCHASE = "purchase",
38
+ REFUND = "refund",
39
+ REMOVE_FROM_CART = "remove_from_cart",
40
+ SCREEN_VIEW = "screen_view",
41
+ SEARCH = "search",
42
+ SELECT_CONTENT = "select_content",
43
+ SELECT_ITEM = "select_item",
44
+ SELECT_PROMOTION = "select_promotion",
45
+ /** @deprecated */
46
+ SET_CHECKOUT_OPTION = "set_checkout_option",
47
+ SHARE = "share",
48
+ SIGN_UP = "sign_up",
49
+ TIMING_COMPLETE = "timing_complete",
50
+ VIEW_CART = "view_cart",
51
+ VIEW_ITEM = "view_item",
52
+ VIEW_ITEM_LIST = "view_item_list",
53
+ VIEW_PROMOTION = "view_promotion",
54
+ VIEW_SEARCH_RESULTS = "view_search_results"
55
+ }
@@ -0,0 +1,172 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { FirebaseAnalytics } from '@firebase/analytics-types';
18
+ export declare function registerAnalytics(): void;
19
+ /**
20
+ * Define extension behavior of `registerAnalytics`
21
+ */
22
+ declare module '@firebase/app-compat' {
23
+ interface FirebaseNamespace {
24
+ analytics(app?: FirebaseApp): FirebaseAnalytics;
25
+ }
26
+ interface FirebaseApp {
27
+ analytics(): FirebaseAnalytics;
28
+ }
29
+ }
30
+
31
+ import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
32
+ import { Analytics, AnalyticsSettings, EventParams, AnalyticsCallOptions, CustomEventName, CustomParams } from "@firebase/analytics";
33
+ declare module "@firebase/analytics" {
34
+ function getAnalytics(app?: FirebaseAppCompat): Analytics;
35
+ function initializeAnalytics(app: FirebaseAppCompat, options?: AnalyticsSettings): Analytics;
36
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_payment_info', eventParams?: {
37
+ coupon?: EventParams['coupon'];
38
+ currency?: EventParams['currency'];
39
+ items?: EventParams['items'];
40
+ payment_type?: EventParams['payment_type'];
41
+ value?: EventParams['value'];
42
+ [key: string]: any;
43
+ }, options?: AnalyticsCallOptions): void;
44
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_shipping_info', eventParams?: {
45
+ coupon?: EventParams['coupon'];
46
+ currency?: EventParams['currency'];
47
+ items?: EventParams['items'];
48
+ shipping_tier?: EventParams['shipping_tier'];
49
+ value?: EventParams['value'];
50
+ [key: string]: any;
51
+ }, options?: AnalyticsCallOptions): void;
52
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: {
53
+ currency?: EventParams['currency'];
54
+ value?: EventParams['value'];
55
+ items?: EventParams['items'];
56
+ [key: string]: any;
57
+ }, options?: AnalyticsCallOptions): void;
58
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'begin_checkout', eventParams?: {
59
+ currency?: EventParams['currency'];
60
+ coupon?: EventParams['coupon'];
61
+ value?: EventParams['value'];
62
+ items?: EventParams['items'];
63
+ [key: string]: any;
64
+ }, options?: AnalyticsCallOptions): void;
65
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'checkout_progress', eventParams?: {
66
+ currency?: EventParams['currency'];
67
+ coupon?: EventParams['coupon'];
68
+ value?: EventParams['value'];
69
+ items?: EventParams['items'];
70
+ checkout_step?: EventParams['checkout_step'];
71
+ checkout_option?: EventParams['checkout_option'];
72
+ [key: string]: any;
73
+ }, options?: AnalyticsCallOptions): void;
74
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'exception', eventParams?: {
75
+ description?: EventParams['description'];
76
+ fatal?: EventParams['fatal'];
77
+ [key: string]: any;
78
+ }, options?: AnalyticsCallOptions): void;
79
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'generate_lead', eventParams?: {
80
+ value?: EventParams['value'];
81
+ currency?: EventParams['currency'];
82
+ [key: string]: any;
83
+ }, options?: AnalyticsCallOptions): void;
84
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'login', eventParams?: {
85
+ method?: EventParams['method'];
86
+ [key: string]: any;
87
+ }, options?: AnalyticsCallOptions): void;
88
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'page_view', eventParams?: {
89
+ page_title?: string;
90
+ page_location?: string;
91
+ page_path?: string;
92
+ [key: string]: any;
93
+ }, options?: AnalyticsCallOptions): void;
94
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'purchase' | 'refund', eventParams?: {
95
+ value?: EventParams['value'];
96
+ currency?: EventParams['currency'];
97
+ transaction_id: EventParams['transaction_id'];
98
+ tax?: EventParams['tax'];
99
+ shipping?: EventParams['shipping'];
100
+ items?: EventParams['items'];
101
+ coupon?: EventParams['coupon'];
102
+ affiliation?: EventParams['affiliation'];
103
+ [key: string]: any;
104
+ }, options?: AnalyticsCallOptions): void;
105
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'screen_view', eventParams?: {
106
+ firebase_screen: EventParams['firebase_screen'];
107
+ firebase_screen_class: EventParams['firebase_screen_class'];
108
+ [key: string]: any;
109
+ }, options?: AnalyticsCallOptions): void;
110
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'search' | 'view_search_results', eventParams?: {
111
+ search_term?: EventParams['search_term'];
112
+ [key: string]: any;
113
+ }, options?: AnalyticsCallOptions): void;
114
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_content', eventParams?: {
115
+ content_type?: EventParams['content_type'];
116
+ item_id?: EventParams['item_id'];
117
+ [key: string]: any;
118
+ }, options?: AnalyticsCallOptions): void;
119
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_item', eventParams?: {
120
+ items?: EventParams['items'];
121
+ item_list_name?: EventParams['item_list_name'];
122
+ item_list_id?: EventParams['item_list_id'];
123
+ [key: string]: any;
124
+ }, options?: AnalyticsCallOptions): void;
125
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: {
126
+ items?: EventParams['items'];
127
+ promotion_id?: EventParams['promotion_id'];
128
+ promotion_name?: EventParams['promotion_name'];
129
+ [key: string]: any;
130
+ }, options?: AnalyticsCallOptions): void;
131
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'set_checkout_option', eventParams?: {
132
+ checkout_step?: EventParams['checkout_step'];
133
+ checkout_option?: EventParams['checkout_option'];
134
+ [key: string]: any;
135
+ }, options?: AnalyticsCallOptions): void;
136
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'share', eventParams?: {
137
+ method?: EventParams['method'];
138
+ content_type?: EventParams['content_type'];
139
+ item_id?: EventParams['item_id'];
140
+ [key: string]: any;
141
+ }, options?: AnalyticsCallOptions): void;
142
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'sign_up', eventParams?: {
143
+ method?: EventParams['method'];
144
+ [key: string]: any;
145
+ }, options?: AnalyticsCallOptions): void;
146
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'timing_complete', eventParams?: {
147
+ name: string;
148
+ value: number;
149
+ event_category?: string;
150
+ event_label?: string;
151
+ [key: string]: any;
152
+ }, options?: AnalyticsCallOptions): void;
153
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_cart' | 'view_item', eventParams?: {
154
+ currency?: EventParams['currency'];
155
+ items?: EventParams['items'];
156
+ value?: EventParams['value'];
157
+ [key: string]: any;
158
+ }, options?: AnalyticsCallOptions): void;
159
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_item_list', eventParams?: {
160
+ items?: EventParams['items'];
161
+ item_list_name?: EventParams['item_list_name'];
162
+ item_list_id?: EventParams['item_list_id'];
163
+ [key: string]: any;
164
+ }, options?: AnalyticsCallOptions): void;
165
+ function logEvent<T extends string>(analyticsInstance: FirebaseAnalytics, eventName: CustomEventName<T>, eventParams?: {
166
+ [key: string]: any;
167
+ }, options?: AnalyticsCallOptions): void;
168
+ function setAnalyticsCollectionEnabled(analyticsInstance: FirebaseAnalytics, enabled: boolean): void;
169
+ function setCurrentScreen(analyticsInstance: FirebaseAnalytics, screenName: string, options?: AnalyticsCallOptions): void;
170
+ function setUserId(analyticsInstance: FirebaseAnalytics, id: string, options?: AnalyticsCallOptions): void;
171
+ function setUserProperties(analyticsInstance: FirebaseAnalytics, properties: CustomParams, options?: AnalyticsCallOptions): void;
172
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { AnalyticsCallOptions, CustomParams, EventParams, FirebaseAnalytics } from '@firebase/analytics-types';
18
+ import { Analytics as AnalyticsServiceExp } from '@firebase/analytics';
19
+ import { _FirebaseService, FirebaseApp } from '@firebase/app-compat';
20
+ export declare class AnalyticsService implements FirebaseAnalytics, _FirebaseService {
21
+ app: FirebaseApp;
22
+ readonly _delegate: AnalyticsServiceExp;
23
+ constructor(app: FirebaseApp, _delegate: AnalyticsServiceExp);
24
+ logEvent(eventName: string, eventParams?: EventParams | CustomParams, options?: AnalyticsCallOptions): void;
25
+ setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void;
26
+ setUserId(id: string, options?: AnalyticsCallOptions): void;
27
+ setUserProperties(properties: CustomParams, options?: AnalyticsCallOptions): void;
28
+ setAnalyticsCollectionEnabled(enabled: boolean): void;
29
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@firebase/analytics-compat",
3
+ "version": "0.1.2-2021822203916",
4
+ "description": "",
5
+ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
+ "main": "dist/index.cjs.js",
7
+ "browser": "dist/index.esm2017.js",
8
+ "module": "dist/index.esm2017.js",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "license": "Apache-2.0",
13
+ "peerDependencies": {
14
+ "@firebase/app-compat": "0.1.2-2021822203916"
15
+ },
16
+ "devDependencies": {
17
+ "@firebase/app-compat": "0.1.2-2021822203916",
18
+ "rollup": "2.56.3",
19
+ "@rollup/plugin-json": "4.1.0",
20
+ "rollup-plugin-typescript2": "0.30.0",
21
+ "typescript": "4.2.2"
22
+ },
23
+ "repository": {
24
+ "directory": "packages/analytics-compat",
25
+ "type": "git",
26
+ "url": "https://github.com/firebase/firebase-js-sdk.git"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/firebase/firebase-js-sdk/issues"
30
+ },
31
+ "scripts": {
32
+ "lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
33
+ "lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
34
+ "build": "rollup -c",
35
+ "build:deps": "lerna run --scope @firebase/analytics-compat --include-dependencies build",
36
+ "build:release": "yarn build && yarn add-compat-overloads",
37
+ "dev": "rollup -c -w",
38
+ "test": "run-p lint test:browser",
39
+ "test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
40
+ "test:browser": "karma start --single-run",
41
+ "test:browser:debug": "karma start --browsers=Chrome --auto-watch",
42
+ "add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../analytics/dist/analytics-public.d.ts -o dist/src/index.d.ts -a -r Analytics:FirebaseAnalytics -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/analytics"
43
+ },
44
+ "typings": "dist/src/index.d.ts",
45
+ "dependencies": {
46
+ "@firebase/component": "0.5.7-2021822203916",
47
+ "@firebase/analytics": "0.7.1-2021822203916",
48
+ "@firebase/analytics-types": "0.7.0",
49
+ "@firebase/util": "1.3.1-2021822203916",
50
+ "tslib": "^2.1.0"
51
+ },
52
+ "nyc": {
53
+ "extension": [
54
+ ".ts"
55
+ ],
56
+ "reportDir": "./coverage/node"
57
+ },
58
+ "esm5": "dist/index.esm.js"
59
+ }