@firebase/analytics-compat 0.2.15-canary.a97ac88db → 0.2.15-canary.e577a408c

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/dist/index.cjs.js CHANGED
@@ -11,142 +11,142 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
12
12
 
13
13
  const name = "@firebase/analytics-compat";
14
- const version = "0.2.15-canary.a97ac88db";
14
+ const version = "0.2.15-canary.e577a408c";
15
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
- class AnalyticsService {
33
- constructor(app, _delegate) {
34
- this.app = app;
35
- this._delegate = _delegate;
36
- }
37
- logEvent(eventName, eventParams, options) {
38
- analytics.logEvent(this._delegate, eventName, eventParams, options);
39
- }
40
- /**
41
- * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
42
- * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
43
- */
44
- setCurrentScreen(screenName, options) {
45
- analytics.setCurrentScreen(this._delegate, screenName, options);
46
- }
47
- setUserId(id, options) {
48
- analytics.setUserId(this._delegate, id, options);
49
- }
50
- setUserProperties(properties, options) {
51
- analytics.setUserProperties(this._delegate, properties, options);
52
- }
53
- setAnalyticsCollectionEnabled(enabled) {
54
- analytics.setAnalyticsCollectionEnabled(this._delegate, enabled);
55
- }
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
+ class AnalyticsService {
33
+ constructor(app, _delegate) {
34
+ this.app = app;
35
+ this._delegate = _delegate;
36
+ }
37
+ logEvent(eventName, eventParams, options) {
38
+ analytics.logEvent(this._delegate, eventName, eventParams, options);
39
+ }
40
+ /**
41
+ * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
42
+ * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
43
+ */
44
+ setCurrentScreen(screenName, options) {
45
+ analytics.setCurrentScreen(this._delegate, screenName, options);
46
+ }
47
+ setUserId(id, options) {
48
+ analytics.setUserId(this._delegate, id, options);
49
+ }
50
+ setUserProperties(properties, options) {
51
+ analytics.setUserProperties(this._delegate, properties, options);
52
+ }
53
+ setAnalyticsCollectionEnabled(enabled) {
54
+ analytics.setAnalyticsCollectionEnabled(this._delegate, enabled);
55
+ }
56
56
  }
57
57
 
58
- /**
59
- * @license
60
- * Copyright 2021 Google LLC
61
- *
62
- * Licensed under the Apache License, Version 2.0 (the "License");
63
- * you may not use this file except in compliance with the License.
64
- * You may obtain a copy of the License at
65
- *
66
- * http://www.apache.org/licenses/LICENSE-2.0
67
- *
68
- * Unless required by applicable law or agreed to in writing, software
69
- * distributed under the License is distributed on an "AS IS" BASIS,
70
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
- * See the License for the specific language governing permissions and
72
- * limitations under the License.
73
- */
74
- /**
75
- * Officially recommended event names for gtag.js
76
- * Any other string is also allowed.
77
- */
78
- var EventName;
79
- (function (EventName) {
80
- EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
81
- EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
82
- EventName["ADD_TO_CART"] = "add_to_cart";
83
- EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
84
- EventName["BEGIN_CHECKOUT"] = "begin_checkout";
85
- /**
86
- * @deprecated
87
- * This event name is deprecated and is unsupported in updated
88
- * Enhanced Ecommerce reports.
89
- */
90
- EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
91
- EventName["EXCEPTION"] = "exception";
92
- EventName["GENERATE_LEAD"] = "generate_lead";
93
- EventName["LOGIN"] = "login";
94
- EventName["PAGE_VIEW"] = "page_view";
95
- EventName["PURCHASE"] = "purchase";
96
- EventName["REFUND"] = "refund";
97
- EventName["REMOVE_FROM_CART"] = "remove_from_cart";
98
- EventName["SCREEN_VIEW"] = "screen_view";
99
- EventName["SEARCH"] = "search";
100
- EventName["SELECT_CONTENT"] = "select_content";
101
- EventName["SELECT_ITEM"] = "select_item";
102
- EventName["SELECT_PROMOTION"] = "select_promotion";
103
- /** @deprecated */
104
- EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
105
- EventName["SHARE"] = "share";
106
- EventName["SIGN_UP"] = "sign_up";
107
- EventName["TIMING_COMPLETE"] = "timing_complete";
108
- EventName["VIEW_CART"] = "view_cart";
109
- EventName["VIEW_ITEM"] = "view_item";
110
- EventName["VIEW_ITEM_LIST"] = "view_item_list";
111
- EventName["VIEW_PROMOTION"] = "view_promotion";
112
- EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
58
+ /**
59
+ * @license
60
+ * Copyright 2021 Google LLC
61
+ *
62
+ * Licensed under the Apache License, Version 2.0 (the "License");
63
+ * you may not use this file except in compliance with the License.
64
+ * You may obtain a copy of the License at
65
+ *
66
+ * http://www.apache.org/licenses/LICENSE-2.0
67
+ *
68
+ * Unless required by applicable law or agreed to in writing, software
69
+ * distributed under the License is distributed on an "AS IS" BASIS,
70
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
+ * See the License for the specific language governing permissions and
72
+ * limitations under the License.
73
+ */
74
+ /**
75
+ * Officially recommended event names for gtag.js
76
+ * Any other string is also allowed.
77
+ */
78
+ var EventName;
79
+ (function (EventName) {
80
+ EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
81
+ EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
82
+ EventName["ADD_TO_CART"] = "add_to_cart";
83
+ EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
84
+ EventName["BEGIN_CHECKOUT"] = "begin_checkout";
85
+ /**
86
+ * @deprecated
87
+ * This event name is deprecated and is unsupported in updated
88
+ * Enhanced Ecommerce reports.
89
+ */
90
+ EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
91
+ EventName["EXCEPTION"] = "exception";
92
+ EventName["GENERATE_LEAD"] = "generate_lead";
93
+ EventName["LOGIN"] = "login";
94
+ EventName["PAGE_VIEW"] = "page_view";
95
+ EventName["PURCHASE"] = "purchase";
96
+ EventName["REFUND"] = "refund";
97
+ EventName["REMOVE_FROM_CART"] = "remove_from_cart";
98
+ EventName["SCREEN_VIEW"] = "screen_view";
99
+ EventName["SEARCH"] = "search";
100
+ EventName["SELECT_CONTENT"] = "select_content";
101
+ EventName["SELECT_ITEM"] = "select_item";
102
+ EventName["SELECT_PROMOTION"] = "select_promotion";
103
+ /** @deprecated */
104
+ EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
105
+ EventName["SHARE"] = "share";
106
+ EventName["SIGN_UP"] = "sign_up";
107
+ EventName["TIMING_COMPLETE"] = "timing_complete";
108
+ EventName["VIEW_CART"] = "view_cart";
109
+ EventName["VIEW_ITEM"] = "view_item";
110
+ EventName["VIEW_ITEM_LIST"] = "view_item_list";
111
+ EventName["VIEW_PROMOTION"] = "view_promotion";
112
+ EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
113
113
  })(EventName || (EventName = {}));
114
114
 
115
- /**
116
- * @license
117
- * Copyright 2021 Google LLC
118
- *
119
- * Licensed under the Apache License, Version 2.0 (the "License");
120
- * you may not use this file except in compliance with the License.
121
- * You may obtain a copy of the License at
122
- *
123
- * http://www.apache.org/licenses/LICENSE-2.0
124
- *
125
- * Unless required by applicable law or agreed to in writing, software
126
- * distributed under the License is distributed on an "AS IS" BASIS,
127
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128
- * See the License for the specific language governing permissions and
129
- * limitations under the License.
130
- */
131
- const factory = (container) => {
132
- // Dependencies
133
- const app = container.getProvider('app-compat').getImmediate();
134
- const analyticsServiceExp = container.getProvider('analytics').getImmediate();
135
- return new AnalyticsService(app, analyticsServiceExp);
136
- };
137
- function registerAnalytics() {
138
- const namespaceExports = {
139
- Analytics: AnalyticsService,
140
- settings: analytics.settings,
141
- isSupported: analytics.isSupported,
142
- // We removed this enum in exp so need to re-create it here for compat.
143
- EventName
144
- };
145
- firebase__default["default"].INTERNAL.registerComponent(new component.Component('analytics-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
146
- .setServiceProps(namespaceExports)
147
- .setMultipleInstances(true));
148
- }
149
- registerAnalytics();
115
+ /**
116
+ * @license
117
+ * Copyright 2021 Google LLC
118
+ *
119
+ * Licensed under the Apache License, Version 2.0 (the "License");
120
+ * you may not use this file except in compliance with the License.
121
+ * You may obtain a copy of the License at
122
+ *
123
+ * http://www.apache.org/licenses/LICENSE-2.0
124
+ *
125
+ * Unless required by applicable law or agreed to in writing, software
126
+ * distributed under the License is distributed on an "AS IS" BASIS,
127
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128
+ * See the License for the specific language governing permissions and
129
+ * limitations under the License.
130
+ */
131
+ const factory = (container) => {
132
+ // Dependencies
133
+ const app = container.getProvider('app-compat').getImmediate();
134
+ const analyticsServiceExp = container.getProvider('analytics').getImmediate();
135
+ return new AnalyticsService(app, analyticsServiceExp);
136
+ };
137
+ function registerAnalytics() {
138
+ const namespaceExports = {
139
+ Analytics: AnalyticsService,
140
+ settings: analytics.settings,
141
+ isSupported: analytics.isSupported,
142
+ // We removed this enum in exp so need to re-create it here for compat.
143
+ EventName
144
+ };
145
+ firebase__default["default"].INTERNAL.registerComponent(new component.Component('analytics-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
146
+ .setServiceProps(namespaceExports)
147
+ .setMultipleInstances(true));
148
+ }
149
+ registerAnalytics();
150
150
  firebase__default["default"].registerVersion(name, version);
151
151
 
152
152
  exports.registerAnalytics = registerAnalytics;
@@ -1,55 +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
- }
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
+ }