@moonbase.sh/vue 0.2.54 → 0.2.57
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 +6 -5
- package/dist/index.js +6 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -165,9 +165,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
165
165
|
term: urlParams.get("utm_term") || void 0,
|
|
166
166
|
content: urlParams.get("utm_content") || void 0
|
|
167
167
|
});
|
|
168
|
-
if (this.hasUtm) {
|
|
168
|
+
if (this.hasUtm && configuration.persistUtm) {
|
|
169
169
|
localStorage.setItem(_StorefrontContextImpl.utmKey, JSON.stringify(this.utm.value));
|
|
170
|
-
} else {
|
|
170
|
+
} else if (configuration.persistUtm) {
|
|
171
171
|
const cachedUtm = localStorage.getItem(_StorefrontContextImpl.utmKey);
|
|
172
172
|
if (cachedUtm) {
|
|
173
173
|
try {
|
|
@@ -188,6 +188,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
188
188
|
items: [],
|
|
189
189
|
couponsApplied: []
|
|
190
190
|
});
|
|
191
|
+
if (this.hasUtm) {
|
|
192
|
+
const _ = this.pushOrderContent();
|
|
193
|
+
}
|
|
191
194
|
}
|
|
192
195
|
const cachedStorefrontJson = localStorage.getItem(_StorefrontContextImpl.storefrontKey);
|
|
193
196
|
if (cachedStorefrontJson) {
|
|
@@ -319,10 +322,8 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
319
322
|
items: [],
|
|
320
323
|
couponsApplied: []
|
|
321
324
|
};
|
|
322
|
-
if (typeof window !== "undefined")
|
|
325
|
+
if (typeof window !== "undefined")
|
|
323
326
|
localStorage.removeItem(_StorefrontContextImpl.sessionKey);
|
|
324
|
-
localStorage.removeItem(_StorefrontContextImpl.utmKey);
|
|
325
|
-
}
|
|
326
327
|
}
|
|
327
328
|
async surrenderOrder() {
|
|
328
329
|
try {
|
package/dist/index.js
CHANGED
|
@@ -130,9 +130,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
130
130
|
term: urlParams.get("utm_term") || void 0,
|
|
131
131
|
content: urlParams.get("utm_content") || void 0
|
|
132
132
|
});
|
|
133
|
-
if (this.hasUtm) {
|
|
133
|
+
if (this.hasUtm && configuration.persistUtm) {
|
|
134
134
|
localStorage.setItem(_StorefrontContextImpl.utmKey, JSON.stringify(this.utm.value));
|
|
135
|
-
} else {
|
|
135
|
+
} else if (configuration.persistUtm) {
|
|
136
136
|
const cachedUtm = localStorage.getItem(_StorefrontContextImpl.utmKey);
|
|
137
137
|
if (cachedUtm) {
|
|
138
138
|
try {
|
|
@@ -153,6 +153,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
153
153
|
items: [],
|
|
154
154
|
couponsApplied: []
|
|
155
155
|
});
|
|
156
|
+
if (this.hasUtm) {
|
|
157
|
+
const _ = this.pushOrderContent();
|
|
158
|
+
}
|
|
156
159
|
}
|
|
157
160
|
const cachedStorefrontJson = localStorage.getItem(_StorefrontContextImpl.storefrontKey);
|
|
158
161
|
if (cachedStorefrontJson) {
|
|
@@ -284,10 +287,8 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
284
287
|
items: [],
|
|
285
288
|
couponsApplied: []
|
|
286
289
|
};
|
|
287
|
-
if (typeof window !== "undefined")
|
|
290
|
+
if (typeof window !== "undefined")
|
|
288
291
|
localStorage.removeItem(_StorefrontContextImpl.sessionKey);
|
|
289
|
-
localStorage.removeItem(_StorefrontContextImpl.utmKey);
|
|
290
|
-
}
|
|
291
292
|
}
|
|
292
293
|
async surrenderOrder() {
|
|
293
294
|
try {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.57",
|
|
5
5
|
"description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@vue/devtools-api": "^6.6.3",
|
|
20
20
|
"uuid": "^9.0.1",
|
|
21
21
|
"zod": "^3.23.8",
|
|
22
|
-
"@moonbase.sh/storefront-api": "0.2.
|
|
22
|
+
"@moonbase.sh/storefront-api": "0.2.57"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/uuid": "^9.0.8",
|