@moonbase.sh/vue
Advanced tools
Comparing version 0.2.64 to 0.2.66
@@ -147,3 +147,3 @@ // src/index.ts | ||
this.currentOrder = ref(JSON.parse(cachedOrderJson)); | ||
const _1 = this.refreshOrder(); | ||
this.refreshOrder(); | ||
} else { | ||
@@ -158,3 +158,3 @@ this.currentOrder = ref({ | ||
if (this.hasUtm) { | ||
const _ = this.pushOrderContent(); | ||
this.pushOrderContent(); | ||
} | ||
@@ -177,4 +177,4 @@ } | ||
} | ||
const _2 = this.updateStorefront(); | ||
const _3 = this.updateUser(); | ||
this.updateStorefront(); | ||
this.updateUser(); | ||
if (window.location) { | ||
@@ -255,3 +255,3 @@ const urlParams2 = new URLSearchParams(window.location.search); | ||
localStorage.setItem(_StorefrontContextImpl.sessionKey, JSON.stringify(this.currentOrder.value)); | ||
const _ = this.debouncedPushOrderContent(this.currentOrder.value); | ||
this.debouncedPushOrderContent(this.currentOrder.value); | ||
} | ||
@@ -328,3 +328,3 @@ handleStorageUpdate(event) { | ||
// src/composables/useBundle.ts | ||
import { computed as computed2, inject } from "vue"; | ||
import { computed, inject } from "vue"; | ||
function useBundle(bundleId, context) { | ||
@@ -334,7 +334,7 @@ const storefront = context != null ? context : inject(storefrontKey); | ||
throw new Error("No storefront configured"); | ||
return computed2(() => storefront.storefront.value.bundles.find((b) => b.id === bundleId) || null); | ||
return computed(() => storefront.storefront.value.bundles.find((b) => b.id === bundleId) || null); | ||
} | ||
// src/composables/useBundles.ts | ||
import { computed as computed3, inject as inject2 } from "vue"; | ||
import { computed as computed2, inject as inject2 } from "vue"; | ||
function useBundles(context) { | ||
@@ -344,7 +344,7 @@ const storefront = context != null ? context : inject2(storefrontKey); | ||
throw new Error("No storefront configured"); | ||
return computed3(() => storefront.storefront.value.bundles); | ||
return computed2(() => storefront.storefront.value.bundles); | ||
} | ||
// src/composables/useProduct.ts | ||
import { computed as computed4, inject as inject3 } from "vue"; | ||
import { computed as computed3, inject as inject3 } from "vue"; | ||
function useProduct(productId, context) { | ||
@@ -354,7 +354,7 @@ const storefront = context != null ? context : inject3(storefrontKey); | ||
throw new Error("No storefront configured"); | ||
return computed4(() => storefront.storefront.value.products.find((p) => p.id === productId) || null); | ||
return computed3(() => storefront.storefront.value.products.find((p) => p.id === productId) || null); | ||
} | ||
// src/composables/useProducts.ts | ||
import { computed as computed5, inject as inject4 } from "vue"; | ||
import { computed as computed4, inject as inject4 } from "vue"; | ||
function useProducts(context) { | ||
@@ -364,3 +364,3 @@ const storefront = context != null ? context : inject4(storefrontKey); | ||
throw new Error("No storefront configured"); | ||
return computed5(() => storefront.storefront.value.products); | ||
return computed4(() => storefront.storefront.value.products); | ||
} | ||
@@ -409,3 +409,3 @@ | ||
import { ActivationRequestStatus } from "@moonbase.sh/storefront-api"; | ||
import { computed as computed6, inject as inject6, onBeforeUnmount, toValue, watch as watch2 } from "vue"; | ||
import { computed as computed5, inject as inject6, onBeforeUnmount, toValue, watch as watch2 } from "vue"; | ||
function useActivationRequest(token, context) { | ||
@@ -476,3 +476,3 @@ const storefront = context != null ? context : inject6(storefrontKey); | ||
error, | ||
isInstalled: computed6(() => { | ||
isInstalled: computed5(() => { | ||
var _a; | ||
@@ -533,3 +533,3 @@ return activationRequest && ((_a = activationRequest.value) == null ? void 0 : _a.status) === ActivationRequestStatus.Completed; | ||
// src/composables/useCart.ts | ||
import { computed as computed7, inject as inject8, unref } from "vue"; | ||
import { computed as computed6, inject as inject8, unref } from "vue"; | ||
import { MoonbaseError as MoonbaseError2 } from "@moonbase.sh/storefront-api"; | ||
@@ -541,3 +541,3 @@ function useCart(context) { | ||
return { | ||
items: computed7(() => storefront.currentOrder.value.items.map((item) => { | ||
items: computed6(() => storefront.currentOrder.value.items.map((item) => { | ||
var _a, _b; | ||
@@ -568,4 +568,4 @@ if (item.type === "Product") { | ||
})), | ||
currency: computed7(() => storefront.currentOrder.value.currency || storefront.storefront.value.suggestedCurrency), | ||
total: computed7(() => { | ||
currency: computed6(() => storefront.currentOrder.value.currency || storefront.storefront.value.suggestedCurrency), | ||
total: computed6(() => { | ||
const currency = storefront.currentOrder.value.currency || storefront.storefront.value.suggestedCurrency; | ||
@@ -572,0 +572,0 @@ const total = storefront.currentOrder.value.items.reduce((agg, item) => { |
{ | ||
"name": "@moonbase.sh/vue", | ||
"type": "module", | ||
"version": "0.2.64", | ||
"version": "0.2.66", | ||
"description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider", | ||
@@ -22,3 +22,3 @@ "author": "Tobias Lønnerød Madsen <m@dsen.tv>", | ||
"zod": "^3.23.8", | ||
"@moonbase.sh/storefront-api": "0.2.64" | ||
"@moonbase.sh/storefront-api": "0.2.66" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
127478
+ Added@moonbase.sh/storefront-api@0.2.66(transitive)
- Removed@moonbase.sh/storefront-api@0.2.64(transitive)