@firebase/analytics-compat 0.2.15-canary.4db3d3e7b → 0.2.15-canary.612335d76

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