@moonbase.sh/vue 0.2.58 → 0.2.60

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 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.d.cts CHANGED
@@ -64,6 +64,7 @@ declare function useInventory(context?: StorefrontContext): {
64
64
  maxActivations?: number | undefined;
65
65
  version?: string | undefined;
66
66
  prerelease?: boolean | undefined;
67
+ releaseDescription?: string | undefined;
67
68
  downloads?: {
68
69
  path: string | null;
69
70
  name: string;
@@ -99,6 +100,7 @@ declare function useInventory(context?: StorefrontContext): {
99
100
  maxActivations?: number | undefined;
100
101
  version?: string | undefined;
101
102
  prerelease?: boolean | undefined;
103
+ releaseDescription?: string | undefined;
102
104
  downloads?: {
103
105
  path: string | null;
104
106
  name: string;
@@ -122,6 +124,7 @@ declare function useInventory(context?: StorefrontContext): {
122
124
  maxActivations?: number | undefined;
123
125
  version?: string | undefined;
124
126
  prerelease?: boolean | undefined;
127
+ releaseDescription?: string | undefined;
125
128
  downloads?: {
126
129
  path: string | null;
127
130
  name: string;
@@ -148,6 +151,7 @@ declare function useInventory(context?: StorefrontContext): {
148
151
  maxActivations?: number | undefined;
149
152
  version?: string | undefined;
150
153
  prerelease?: boolean | undefined;
154
+ releaseDescription?: string | undefined;
151
155
  downloads?: {
152
156
  path: string | null;
153
157
  name: string;
@@ -188,6 +192,7 @@ declare function useInventory(context?: StorefrontContext): {
188
192
  maxActivations?: number | undefined;
189
193
  version?: string | undefined;
190
194
  prerelease?: boolean | undefined;
195
+ releaseDescription?: string | undefined;
191
196
  downloads?: {
192
197
  path: string | null;
193
198
  name: string;
package/dist/index.d.ts CHANGED
@@ -64,6 +64,7 @@ declare function useInventory(context?: StorefrontContext): {
64
64
  maxActivations?: number | undefined;
65
65
  version?: string | undefined;
66
66
  prerelease?: boolean | undefined;
67
+ releaseDescription?: string | undefined;
67
68
  downloads?: {
68
69
  path: string | null;
69
70
  name: string;
@@ -99,6 +100,7 @@ declare function useInventory(context?: StorefrontContext): {
99
100
  maxActivations?: number | undefined;
100
101
  version?: string | undefined;
101
102
  prerelease?: boolean | undefined;
103
+ releaseDescription?: string | undefined;
102
104
  downloads?: {
103
105
  path: string | null;
104
106
  name: string;
@@ -122,6 +124,7 @@ declare function useInventory(context?: StorefrontContext): {
122
124
  maxActivations?: number | undefined;
123
125
  version?: string | undefined;
124
126
  prerelease?: boolean | undefined;
127
+ releaseDescription?: string | undefined;
125
128
  downloads?: {
126
129
  path: string | null;
127
130
  name: string;
@@ -148,6 +151,7 @@ declare function useInventory(context?: StorefrontContext): {
148
151
  maxActivations?: number | undefined;
149
152
  version?: string | undefined;
150
153
  prerelease?: boolean | undefined;
154
+ releaseDescription?: string | undefined;
151
155
  downloads?: {
152
156
  path: string | null;
153
157
  name: string;
@@ -188,6 +192,7 @@ declare function useInventory(context?: StorefrontContext): {
188
192
  maxActivations?: number | undefined;
189
193
  version?: string | undefined;
190
194
  prerelease?: boolean | undefined;
195
+ releaseDescription?: string | undefined;
191
196
  downloads?: {
192
197
  path: string | null;
193
198
  name: string;
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.58",
4
+ "version": "0.2.60",
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.58"
22
+ "@moonbase.sh/storefront-api": "0.2.60"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/uuid": "^9.0.8",