@moonbase.sh/vue 0.2.58 → 0.2.59
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 +11 -1
- package/dist/index.js +11 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -287,13 +287,23 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
287
287
|
const _ = this.debouncedPushOrderContent(this.currentOrder.value);
|
|
288
288
|
}
|
|
289
289
|
handleStorageUpdate(event) {
|
|
290
|
+
var _a;
|
|
290
291
|
switch (event.key) {
|
|
291
292
|
case _StorefrontContextImpl.sessionKey:
|
|
292
|
-
this.currentOrder.value = JSON.parse(event.newValue)
|
|
293
|
+
this.currentOrder.value = event.newValue ? JSON.parse(event.newValue) : {
|
|
294
|
+
id: (0, import_uuid.v4)(),
|
|
295
|
+
currency: ((_a = this.storefront.value) == null ? void 0 : _a.suggestedCurrency) || "",
|
|
296
|
+
status: import_storefront_api2.OrderStatus.Open,
|
|
297
|
+
items: [],
|
|
298
|
+
couponsApplied: []
|
|
299
|
+
};
|
|
293
300
|
break;
|
|
294
301
|
case _StorefrontContextImpl.storefrontKey:
|
|
295
302
|
this.storefront.value = JSON.parse(event.newValue);
|
|
296
303
|
break;
|
|
304
|
+
case _StorefrontContextImpl.utmKey:
|
|
305
|
+
this.utm.value = JSON.parse(event.newValue);
|
|
306
|
+
break;
|
|
297
307
|
}
|
|
298
308
|
}
|
|
299
309
|
async refreshOrder() {
|
package/dist/index.js
CHANGED
|
@@ -252,13 +252,23 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
252
252
|
const _ = this.debouncedPushOrderContent(this.currentOrder.value);
|
|
253
253
|
}
|
|
254
254
|
handleStorageUpdate(event) {
|
|
255
|
+
var _a;
|
|
255
256
|
switch (event.key) {
|
|
256
257
|
case _StorefrontContextImpl.sessionKey:
|
|
257
|
-
this.currentOrder.value = JSON.parse(event.newValue)
|
|
258
|
+
this.currentOrder.value = event.newValue ? JSON.parse(event.newValue) : {
|
|
259
|
+
id: uuidv4(),
|
|
260
|
+
currency: ((_a = this.storefront.value) == null ? void 0 : _a.suggestedCurrency) || "",
|
|
261
|
+
status: OrderStatus.Open,
|
|
262
|
+
items: [],
|
|
263
|
+
couponsApplied: []
|
|
264
|
+
};
|
|
258
265
|
break;
|
|
259
266
|
case _StorefrontContextImpl.storefrontKey:
|
|
260
267
|
this.storefront.value = JSON.parse(event.newValue);
|
|
261
268
|
break;
|
|
269
|
+
case _StorefrontContextImpl.utmKey:
|
|
270
|
+
this.utm.value = JSON.parse(event.newValue);
|
|
271
|
+
break;
|
|
262
272
|
}
|
|
263
273
|
}
|
|
264
274
|
async refreshOrder() {
|
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.59",
|
|
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.59"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/uuid": "^9.0.8",
|