@artisan-commerce/analytics-web 0.2.0-canary.76 → 0.2.0-canary.77
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/bundle.cjs.js +44 -10
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +41 -7
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.umd.js +48 -13
- package/dist/bundle.umd.js.map +1 -1
- package/package.json +4 -4
package/dist/bundle.umd.js
CHANGED
|
@@ -1,12 +1,47 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ArtisnAnalytics = {}, global.
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('snake-case'), require('@artisan-commerce/shopping-cart-core'), require('@artisan-commerce/products')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'snake-case', '@artisan-commerce/shopping-cart-core', '@artisan-commerce/products'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ArtisnAnalytics = {}, global.snakeCase, global.shoppingCartCore, global.products));
|
|
5
|
+
})(this, (function (exports, snakeCase, shoppingCartCore, products) { 'use strict';
|
|
6
|
+
|
|
7
|
+
var __defProp$41 = Object.defineProperty;
|
|
8
|
+
var __getOwnPropSymbols$41 = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp$41 = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum$41 = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp$41 = (obj, key, value) => key in obj ? __defProp$41(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues$41 = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp$41.call(b, prop))
|
|
15
|
+
__defNormalProp$41(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols$41)
|
|
17
|
+
for (var prop of __getOwnPropSymbols$41(b)) {
|
|
18
|
+
if (__propIsEnum$41.call(b, prop))
|
|
19
|
+
__defNormalProp$41(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
let state = null;
|
|
24
|
+
const initState = (initialState) => {
|
|
25
|
+
Object.freeze(initialState);
|
|
26
|
+
state = __spreadValues$41({}, initialState);
|
|
27
|
+
Object.seal(state);
|
|
28
|
+
};
|
|
29
|
+
const setState$1 = (overrides) => {
|
|
30
|
+
const tempState = state ? __spreadValues$41({}, state) : {};
|
|
31
|
+
state = null;
|
|
32
|
+
state = __spreadValues$41(__spreadValues$41({}, tempState), overrides);
|
|
33
|
+
Object.seal(state);
|
|
34
|
+
};
|
|
35
|
+
const getState$1 = () => {
|
|
36
|
+
if (state === null) {
|
|
37
|
+
throw new Error("The state has not been initialized, make sure to call initState beforehand");
|
|
38
|
+
}
|
|
39
|
+
return __spreadValues$41({}, state);
|
|
40
|
+
};
|
|
6
41
|
|
|
7
42
|
var name = "@artisan-commerce/analytics-web";
|
|
8
43
|
var description = "Artisn commerce analytics web library";
|
|
9
|
-
var version = "0.2.0-canary.
|
|
44
|
+
var version = "0.2.0-canary.76";
|
|
10
45
|
var main = "./dist/bundle.cjs.js";
|
|
11
46
|
var module = "./dist/bundle.esm.js";
|
|
12
47
|
var types = "./dist/bundle.d.ts";
|
|
@@ -39,14 +74,14 @@
|
|
|
39
74
|
"snake-case": "^3.0.4"
|
|
40
75
|
};
|
|
41
76
|
var devDependencies = {
|
|
42
|
-
"@artisan-commerce/
|
|
43
|
-
"@artisan-commerce/
|
|
44
|
-
"@artisan-commerce/state": "0.3.0-canary.
|
|
45
|
-
"@artisan-commerce/types": "0.14.0-canary.
|
|
77
|
+
"@artisan-commerce/products": "0.9.0-canary.50",
|
|
78
|
+
"@artisan-commerce/shopping-cart-core": "0.12.0-canary.73",
|
|
79
|
+
"@artisan-commerce/state": "0.3.0-canary.9",
|
|
80
|
+
"@artisan-commerce/types": "0.14.0-canary.38"
|
|
46
81
|
};
|
|
47
82
|
var peerDependencies = {
|
|
48
|
-
"@artisan-commerce/shopping-cart-core": "*",
|
|
49
83
|
"@artisan-commerce/products": "*",
|
|
84
|
+
"@artisan-commerce/shopping-cart-core": "*",
|
|
50
85
|
"@artisan-commerce/state": "*"
|
|
51
86
|
};
|
|
52
87
|
var nx = {
|
|
@@ -108,10 +143,10 @@
|
|
|
108
143
|
}
|
|
109
144
|
};
|
|
110
145
|
const setInitialState = () => {
|
|
111
|
-
|
|
146
|
+
initState(initialState);
|
|
112
147
|
};
|
|
113
|
-
const getState = () =>
|
|
114
|
-
const setState = (state
|
|
148
|
+
const getState = () => getState$1();
|
|
149
|
+
const setState = (state) => setState$1(state);
|
|
115
150
|
|
|
116
151
|
const CONSTANTS = {
|
|
117
152
|
GLOBAL_TRACKING_ID: "G-JZ7R91ZNMB"
|