@cimplify/sdk 0.44.14 → 0.44.16
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/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +21 -21
- package/dist/advanced.mjs +2 -2
- package/dist/{chunk-6TVQQYQ5.mjs → chunk-6AZZ6AOF.mjs} +21 -1
- package/dist/{chunk-EZK2FXTM.mjs → chunk-7NML226B.mjs} +1 -1
- package/dist/{chunk-BAWKQRIB.js → chunk-CFD4J32N.js} +21 -21
- package/dist/{chunk-OMAP327U.js → chunk-MBGQP6FZ.js} +62 -61
- package/dist/{chunk-V2O5AO7I.js → chunk-MNIKXG7W.js} +26 -0
- package/dist/{chunk-3WD6U5RD.mjs → chunk-UXLQ7WXI.mjs} +4 -3
- package/dist/chunk-XL4CX75J.js +9370 -0
- package/dist/chunk-ZLEFMQC6.mjs +9318 -0
- package/dist/cli/commands/deploy.mjs +9 -1
- package/dist/{client-lvLvB1_K.d.ts → client-D6ZisKco.d.ts} +7 -0
- package/dist/{client-CkGlXZRd.d.mts → client-Dh-bHyhU.d.mts} +7 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +106 -106
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +2 -1
- package/dist/mock/library.js +2 -1
- package/dist/mock/library.mjs +2 -1
- package/dist/mock/msw.js +2 -1
- package/dist/mock/msw.mjs +2 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +80 -80
- package/dist/react.mjs +3 -3
- package/dist/server-CWpUlLOQ.d.mts +1003 -0
- package/dist/server-CWpUlLOQ.d.ts +1003 -0
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/dist/testing/suite.d.mts +60 -0
- package/dist/testing/suite.d.ts +60 -0
- package/dist/testing/suite.js +169 -0
- package/dist/testing/suite.mjs +165 -0
- package/dist/testing.d.mts +1359 -0
- package/dist/testing.d.ts +1359 -0
- package/dist/testing.js +213 -0
- package/dist/testing.mjs +4 -0
- package/dist/utils.js +28 -28
- package/dist/utils.mjs +1 -1
- package/package.json +18 -3
- package/templates/storefront-bakery/__tests__/brand.test.ts +4 -0
- package/templates/storefront-bakery/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-bakery/__tests__/contract.test.ts +4 -0
- package/templates/storefront-bakery/package.json +11 -3
- package/templates/storefront-bakery/vitest.config.ts +9 -0
- package/templates/storefront-fashion/__tests__/brand.test.ts +4 -0
- package/templates/storefront-fashion/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-fashion/__tests__/contract.test.ts +4 -0
- package/templates/storefront-fashion/package.json +11 -3
- package/templates/storefront-fashion/vitest.config.ts +9 -0
- package/templates/storefront-grocery/__tests__/brand.test.ts +4 -0
- package/templates/storefront-grocery/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-grocery/__tests__/contract.test.ts +4 -0
- package/templates/storefront-grocery/package.json +11 -3
- package/templates/storefront-grocery/vitest.config.ts +9 -0
- package/templates/storefront-restaurant/__tests__/brand.test.ts +4 -0
- package/templates/storefront-restaurant/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-restaurant/__tests__/contract.test.ts +4 -0
- package/templates/storefront-restaurant/package.json +11 -3
- package/templates/storefront-restaurant/vitest.config.ts +9 -0
- package/templates/storefront-retail/__tests__/brand.test.ts +4 -0
- package/templates/storefront-retail/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-retail/__tests__/contract.test.ts +4 -0
- package/templates/storefront-retail/package.json +11 -3
- package/templates/storefront-retail/vitest.config.ts +9 -0
- package/templates/storefront-services/__tests__/brand.test.ts +4 -0
- package/templates/storefront-services/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-services/__tests__/contract.test.ts +4 -0
- package/templates/storefront-services/package.json +11 -3
- package/templates/storefront-services/vitest.config.ts +9 -0
package/dist/react.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkBGCEKFLA_js = require('./chunk-BGCEKFLA.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunkMBGQP6FZ_js = require('./chunk-MBGQP6FZ.js');
|
|
6
|
+
var chunkCFD4J32N_js = require('./chunk-CFD4J32N.js');
|
|
7
|
+
var chunkMNIKXG7W_js = require('./chunk-MNIKXG7W.js');
|
|
8
8
|
var React10 = require('react');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
var clsx = require('clsx');
|
|
@@ -568,12 +568,12 @@ function attachInternalItemMetadata(item) {
|
|
|
568
568
|
return { ...item, _lineKey: lineKeyFromItem(item) };
|
|
569
569
|
}
|
|
570
570
|
function calculateLineSubtotal(item) {
|
|
571
|
-
let unitPrice =
|
|
571
|
+
let unitPrice = chunkMNIKXG7W_js.parsePrice(item.product.default_price);
|
|
572
572
|
if (item.variant?.price_adjustment) {
|
|
573
|
-
unitPrice +=
|
|
573
|
+
unitPrice += chunkMNIKXG7W_js.parsePrice(item.variant.price_adjustment);
|
|
574
574
|
}
|
|
575
575
|
for (const option of item.addOnOptions || []) {
|
|
576
|
-
if (option.default_price) unitPrice +=
|
|
576
|
+
if (option.default_price) unitPrice += chunkMNIKXG7W_js.parsePrice(option.default_price);
|
|
577
577
|
}
|
|
578
578
|
return roundMoney(unitPrice * item.quantity);
|
|
579
579
|
}
|
|
@@ -1152,7 +1152,7 @@ var DEFAULT_COUNTRY = "US";
|
|
|
1152
1152
|
function createDefaultClient() {
|
|
1153
1153
|
const processRef = globalThis.process;
|
|
1154
1154
|
const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
|
|
1155
|
-
return
|
|
1155
|
+
return chunkMBGQP6FZ_js.createCimplifyClient({ publicKey: envPublicKey });
|
|
1156
1156
|
}
|
|
1157
1157
|
function getStoredLocationId() {
|
|
1158
1158
|
if (typeof window === "undefined" || !window.localStorage) {
|
|
@@ -1236,7 +1236,7 @@ function CimplifyProvider({
|
|
|
1236
1236
|
const setDisplayCurrency = React10.useCallback(
|
|
1237
1237
|
(currency) => {
|
|
1238
1238
|
const normalized = currency?.trim().toUpperCase() || null;
|
|
1239
|
-
if (normalized && !
|
|
1239
|
+
if (normalized && !chunkMNIKXG7W_js.isSupportedCurrency(normalized)) {
|
|
1240
1240
|
return;
|
|
1241
1241
|
}
|
|
1242
1242
|
setDisplayCurrencyOverride(normalized);
|
|
@@ -1898,7 +1898,7 @@ function Price({ amount, currency, className, prefix }) {
|
|
|
1898
1898
|
const resolvedAmount = typeof convertedAmount === "string" ? parseFloat(convertedAmount) || 0 : convertedAmount;
|
|
1899
1899
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className, children: [
|
|
1900
1900
|
prefix,
|
|
1901
|
-
|
|
1901
|
+
chunkMNIKXG7W_js.formatPrice(resolvedAmount, resolvedCurrency)
|
|
1902
1902
|
] });
|
|
1903
1903
|
}
|
|
1904
1904
|
function createCachedQuery(config) {
|
|
@@ -2905,16 +2905,16 @@ function useProductPrice(input) {
|
|
|
2905
2905
|
if (bundleTotalPrice != null) {
|
|
2906
2906
|
unitPrice = bundleTotalPrice;
|
|
2907
2907
|
} else if (compositePrice) {
|
|
2908
|
-
unitPrice =
|
|
2908
|
+
unitPrice = chunkMNIKXG7W_js.parsePrice(compositePrice.final_price);
|
|
2909
2909
|
} else {
|
|
2910
|
-
unitPrice =
|
|
2910
|
+
unitPrice = chunkMNIKXG7W_js.parsePrice(product.default_price);
|
|
2911
2911
|
if (variant?.price_adjustment) {
|
|
2912
|
-
unitPrice +=
|
|
2912
|
+
unitPrice += chunkMNIKXG7W_js.parsePrice(variant.price_adjustment);
|
|
2913
2913
|
}
|
|
2914
2914
|
if (addOnOptions) {
|
|
2915
2915
|
for (const option of addOnOptions) {
|
|
2916
2916
|
if (option.default_price) {
|
|
2917
|
-
unitPrice +=
|
|
2917
|
+
unitPrice += chunkMNIKXG7W_js.parsePrice(option.default_price);
|
|
2918
2918
|
}
|
|
2919
2919
|
}
|
|
2920
2920
|
}
|
|
@@ -3658,19 +3658,19 @@ function AuthElement({
|
|
|
3658
3658
|
}, [onReady, onAuthenticated, onRequiresOtp, onError]);
|
|
3659
3659
|
React10.useEffect(() => {
|
|
3660
3660
|
if (!elements || !containerRef.current) return;
|
|
3661
|
-
const element = elements.create(
|
|
3661
|
+
const element = elements.create(chunkCFD4J32N_js.ELEMENT_TYPES.AUTH, { prefillEmail });
|
|
3662
3662
|
elementRef.current = element;
|
|
3663
|
-
element.on(
|
|
3663
|
+
element.on(chunkCFD4J32N_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
3664
3664
|
element.on(
|
|
3665
|
-
|
|
3665
|
+
chunkCFD4J32N_js.EVENT_TYPES.AUTHENTICATED,
|
|
3666
3666
|
(data) => onAuthenticatedRef.current?.(data)
|
|
3667
3667
|
);
|
|
3668
3668
|
element.on(
|
|
3669
|
-
|
|
3669
|
+
chunkCFD4J32N_js.EVENT_TYPES.REQUIRES_OTP,
|
|
3670
3670
|
(data) => onRequiresOtpRef.current?.(data)
|
|
3671
3671
|
);
|
|
3672
3672
|
element.on(
|
|
3673
|
-
|
|
3673
|
+
chunkCFD4J32N_js.EVENT_TYPES.ERROR,
|
|
3674
3674
|
(data) => onErrorRef.current?.(data)
|
|
3675
3675
|
);
|
|
3676
3676
|
element.mount(containerRef.current);
|
|
@@ -3699,15 +3699,15 @@ function AddressElement({
|
|
|
3699
3699
|
}, [onReady, onChange, onError]);
|
|
3700
3700
|
React10.useEffect(() => {
|
|
3701
3701
|
if (!elements || !containerRef.current) return;
|
|
3702
|
-
const element = elements.create(
|
|
3702
|
+
const element = elements.create(chunkCFD4J32N_js.ELEMENT_TYPES.ADDRESS, { mode });
|
|
3703
3703
|
elementRef.current = element;
|
|
3704
|
-
element.on(
|
|
3704
|
+
element.on(chunkCFD4J32N_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
3705
3705
|
element.on(
|
|
3706
|
-
|
|
3706
|
+
chunkCFD4J32N_js.EVENT_TYPES.CHANGE,
|
|
3707
3707
|
(data) => onChangeRef.current?.(data)
|
|
3708
3708
|
);
|
|
3709
3709
|
element.on(
|
|
3710
|
-
|
|
3710
|
+
chunkCFD4J32N_js.EVENT_TYPES.ERROR,
|
|
3711
3711
|
(data) => onErrorRef.current?.(data)
|
|
3712
3712
|
);
|
|
3713
3713
|
element.mount(containerRef.current);
|
|
@@ -3737,15 +3737,15 @@ function PaymentElement({
|
|
|
3737
3737
|
}, [onReady, onChange, onError]);
|
|
3738
3738
|
React10.useEffect(() => {
|
|
3739
3739
|
if (!elements || !containerRef.current) return;
|
|
3740
|
-
const element = elements.create(
|
|
3740
|
+
const element = elements.create(chunkCFD4J32N_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
|
|
3741
3741
|
elementRef.current = element;
|
|
3742
|
-
element.on(
|
|
3742
|
+
element.on(chunkCFD4J32N_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
3743
3743
|
element.on(
|
|
3744
|
-
|
|
3744
|
+
chunkCFD4J32N_js.EVENT_TYPES.CHANGE,
|
|
3745
3745
|
(data) => onChangeRef.current?.(data)
|
|
3746
3746
|
);
|
|
3747
3747
|
element.on(
|
|
3748
|
-
|
|
3748
|
+
chunkCFD4J32N_js.EVENT_TYPES.ERROR,
|
|
3749
3749
|
(data) => onErrorRef.current?.(data)
|
|
3750
3750
|
);
|
|
3751
3751
|
element.mount(containerRef.current);
|
|
@@ -3901,7 +3901,7 @@ function VariantSelector({
|
|
|
3901
3901
|
if (!variants || variants.length <= 1) {
|
|
3902
3902
|
return null;
|
|
3903
3903
|
}
|
|
3904
|
-
basePrice != null ?
|
|
3904
|
+
basePrice != null ? chunkMNIKXG7W_js.parsePrice(basePrice) : 0;
|
|
3905
3905
|
if (variantAxes && variantAxes.length > 0) {
|
|
3906
3906
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-variant-selector": true, className: cn("space-y-5", className, classNames?.root), children: variantAxes.map((axis) => {
|
|
3907
3907
|
const labelId = `${idPrefix}-axis-${axis.id}`;
|
|
@@ -3977,7 +3977,7 @@ function VariantSelector({
|
|
|
3977
3977
|
className: cn("divide-y divide-border", classNames?.list),
|
|
3978
3978
|
children: variants.map((variant) => {
|
|
3979
3979
|
const isSelected = selectedVariantId === variant.id;
|
|
3980
|
-
const adjustment =
|
|
3980
|
+
const adjustment = chunkMNIKXG7W_js.parsePrice(variant.price_adjustment);
|
|
3981
3981
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3982
3982
|
radio.Radio.Root,
|
|
3983
3983
|
{
|
|
@@ -4243,16 +4243,16 @@ function BundleSelector({
|
|
|
4243
4243
|
}, [components, selections, onReady]);
|
|
4244
4244
|
const totalPrice = React10.useMemo(() => {
|
|
4245
4245
|
if (pricingType === "fixed" && bundlePrice) {
|
|
4246
|
-
return
|
|
4246
|
+
return chunkMNIKXG7W_js.parsePrice(bundlePrice);
|
|
4247
4247
|
}
|
|
4248
4248
|
const componentsTotal = components.reduce((sum, comp) => {
|
|
4249
4249
|
return sum + getComponentPrice(comp, variantChoices[comp.id]) * comp.quantity;
|
|
4250
4250
|
}, 0);
|
|
4251
4251
|
if (pricingType === "percentage_discount" && discountValue) {
|
|
4252
|
-
return componentsTotal * (1 -
|
|
4252
|
+
return componentsTotal * (1 - chunkMNIKXG7W_js.parsePrice(discountValue) / 100);
|
|
4253
4253
|
}
|
|
4254
4254
|
if (pricingType === "fixed_discount" && discountValue) {
|
|
4255
|
-
return componentsTotal -
|
|
4255
|
+
return componentsTotal - chunkMNIKXG7W_js.parsePrice(discountValue);
|
|
4256
4256
|
}
|
|
4257
4257
|
return componentsTotal;
|
|
4258
4258
|
}, [components, variantChoices, pricingType, bundlePrice, discountValue]);
|
|
@@ -4313,15 +4313,15 @@ function BundleSelector({
|
|
|
4313
4313
|
}
|
|
4314
4314
|
function getComponentPrice(component, selectedVariantId) {
|
|
4315
4315
|
if (!selectedVariantId || component.available_variants.length === 0) {
|
|
4316
|
-
return
|
|
4316
|
+
return chunkMNIKXG7W_js.parsePrice(component.effective_price);
|
|
4317
4317
|
}
|
|
4318
4318
|
if (selectedVariantId === component.variant_id) {
|
|
4319
|
-
return
|
|
4319
|
+
return chunkMNIKXG7W_js.parsePrice(component.effective_price);
|
|
4320
4320
|
}
|
|
4321
4321
|
const bakedAdj = component.variant_id ? component.available_variants.find((v) => v.id === component.variant_id) : void 0;
|
|
4322
4322
|
const selectedAdj = component.available_variants.find((v) => v.id === selectedVariantId);
|
|
4323
|
-
if (!selectedAdj) return
|
|
4324
|
-
return
|
|
4323
|
+
if (!selectedAdj) return chunkMNIKXG7W_js.parsePrice(component.effective_price);
|
|
4324
|
+
return chunkMNIKXG7W_js.parsePrice(component.effective_price) - chunkMNIKXG7W_js.parsePrice(bakedAdj?.price_adjustment ?? "0") + chunkMNIKXG7W_js.parsePrice(selectedAdj.price_adjustment);
|
|
4325
4325
|
}
|
|
4326
4326
|
function formatDuration(minutes, unit) {
|
|
4327
4327
|
if (unit === "hours" || !unit && minutes >= 60 && minutes % 60 === 0) {
|
|
@@ -4434,7 +4434,7 @@ function BundleComponentCard({
|
|
|
4434
4434
|
className: cn("mt-3 divide-y divide-border", classNames?.variantPicker),
|
|
4435
4435
|
children: component.available_variants.map((variant) => {
|
|
4436
4436
|
const isSelected = selectedVariantId === variant.id;
|
|
4437
|
-
const adjustment =
|
|
4437
|
+
const adjustment = chunkMNIKXG7W_js.parsePrice(variant.price_adjustment);
|
|
4438
4438
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4439
4439
|
radio.Radio.Root,
|
|
4440
4440
|
{
|
|
@@ -4880,7 +4880,7 @@ function CompositeSelector({
|
|
|
4880
4880
|
"data-cimplify-composite-summary": true,
|
|
4881
4881
|
className: cn("border-t border-border pt-4 space-y-1 text-sm", classNames?.summary),
|
|
4882
4882
|
children: [
|
|
4883
|
-
|
|
4883
|
+
chunkMNIKXG7W_js.parsePrice(priceResult.base_price) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4884
4884
|
"div",
|
|
4885
4885
|
{
|
|
4886
4886
|
"data-cimplify-composite-summary-line": true,
|
|
@@ -4891,7 +4891,7 @@ function CompositeSelector({
|
|
|
4891
4891
|
]
|
|
4892
4892
|
}
|
|
4893
4893
|
),
|
|
4894
|
-
|
|
4894
|
+
chunkMNIKXG7W_js.parsePrice(priceResult.components_total) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4895
4895
|
"div",
|
|
4896
4896
|
{
|
|
4897
4897
|
"data-cimplify-composite-summary-line": true,
|
|
@@ -5187,7 +5187,7 @@ function InputField({
|
|
|
5187
5187
|
onFileUpload,
|
|
5188
5188
|
classNames
|
|
5189
5189
|
}) {
|
|
5190
|
-
const hasPriceAdjustment = field.price_adjustment != null &&
|
|
5190
|
+
const hasPriceAdjustment = field.price_adjustment != null && chunkMNIKXG7W_js.parsePrice(field.price_adjustment) > 0;
|
|
5191
5191
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-customer-input": true, "data-field-type": field.field_type, className: classNames?.field, children: [
|
|
5192
5192
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
|
|
5193
5193
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: cn("text-sm font-semibold", classNames?.label), children: field.name }),
|
|
@@ -6081,18 +6081,18 @@ function ProductCustomizer({
|
|
|
6081
6081
|
}, [selectedAddOnOptionIds]);
|
|
6082
6082
|
const localTotalPrice = React10.useMemo(() => {
|
|
6083
6083
|
if (isComposite && compositePrice) {
|
|
6084
|
-
return
|
|
6084
|
+
return chunkMNIKXG7W_js.parsePrice(compositePrice.final_price) * quantity;
|
|
6085
6085
|
}
|
|
6086
6086
|
if (isBundle && bundleTotalPrice != null) {
|
|
6087
6087
|
return bundleTotalPrice * quantity;
|
|
6088
6088
|
}
|
|
6089
|
-
let price =
|
|
6089
|
+
let price = chunkMNIKXG7W_js.parsePrice(product.default_price);
|
|
6090
6090
|
if (selectedVariant?.price_adjustment) {
|
|
6091
|
-
price +=
|
|
6091
|
+
price += chunkMNIKXG7W_js.parsePrice(selectedVariant.price_adjustment);
|
|
6092
6092
|
}
|
|
6093
6093
|
for (const option of selectedAddOnOptions) {
|
|
6094
6094
|
if (option.default_price) {
|
|
6095
|
-
price +=
|
|
6095
|
+
price += chunkMNIKXG7W_js.parsePrice(option.default_price);
|
|
6096
6096
|
}
|
|
6097
6097
|
}
|
|
6098
6098
|
return price * quantity;
|
|
@@ -6141,7 +6141,7 @@ function ProductCustomizer({
|
|
|
6141
6141
|
const priceInfo = quote.quoted_total_price_info ?? quote.final_price_info;
|
|
6142
6142
|
const perUnit = priceInfo.pre_tax_price;
|
|
6143
6143
|
if (perUnit === void 0 || perUnit === null) return void 0;
|
|
6144
|
-
return
|
|
6144
|
+
return chunkMNIKXG7W_js.parsePrice(perUnit) * quantity;
|
|
6145
6145
|
}, [quote, quantity]);
|
|
6146
6146
|
const displayTotalPrice = quotedTotalPrice ?? localTotalPrice;
|
|
6147
6147
|
const handleVariantChange = React10.useCallback(
|
|
@@ -6263,7 +6263,7 @@ function ProductCustomizer({
|
|
|
6263
6263
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.deposit_amount })
|
|
6264
6264
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
6265
6265
|
"Deposit required: ",
|
|
6266
|
-
|
|
6266
|
+
chunkMNIKXG7W_js.parsePrice(product.deposit_amount),
|
|
6267
6267
|
"%"
|
|
6268
6268
|
] }) }),
|
|
6269
6269
|
product.allergies && product.allergies.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-customizer-allergens": true, className: cn("flex flex-wrap gap-1.5", classNames?.allergens), children: product.allergies.map((allergen) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6324,7 +6324,7 @@ function ProductCustomizer({
|
|
|
6324
6324
|
] })
|
|
6325
6325
|
] }),
|
|
6326
6326
|
product.quantity_pricing && product.quantity_pricing.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-customizer-unit-price": true, className: "text-sm text-muted-foreground text-right shrink-0", children: [
|
|
6327
|
-
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount:
|
|
6327
|
+
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getUnitPriceAtQuantity(product.quantity_pricing, quantity, chunkMNIKXG7W_js.parsePrice(product.default_price)), className: "font-medium text-foreground" }),
|
|
6328
6328
|
" ea."
|
|
6329
6329
|
] }),
|
|
6330
6330
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6448,7 +6448,7 @@ function CartLineItemRow({
|
|
|
6448
6448
|
const hasComposite = item.compositeSelections && item.compositeSelections.length > 0;
|
|
6449
6449
|
const hasBundle = item.bundleSelections && item.bundleSelections.length > 0;
|
|
6450
6450
|
const isOptimistic = item.isOptimistic === true;
|
|
6451
|
-
const lineTotal =
|
|
6451
|
+
const lineTotal = chunkMNIKXG7W_js.parsePrice(unitPrice) * item.quantity;
|
|
6452
6452
|
const imageUrl = item.product.image_url;
|
|
6453
6453
|
const variantLabel = item.variant ? chunkBGCEKFLA_js.getVariantDisplayName(item.variant, item.product.name) : null;
|
|
6454
6454
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6681,15 +6681,15 @@ function CartSummary({
|
|
|
6681
6681
|
] }),
|
|
6682
6682
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: subtotal, className: "tabular-nums" })
|
|
6683
6683
|
] }),
|
|
6684
|
-
totalDiscounts != null &&
|
|
6684
|
+
totalDiscounts != null && chunkMNIKXG7W_js.parsePrice(totalDiscounts) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-discount": true, className: cn("flex items-baseline justify-between", classNames?.discount), children: [
|
|
6685
6685
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Discount" }),
|
|
6686
6686
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: totalDiscounts, prefix: "-", className: "tabular-nums text-primary" })
|
|
6687
6687
|
] }),
|
|
6688
6688
|
deliveryFee != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-delivery-fee": true, className: cn("flex items-baseline justify-between", classNames?.deliveryFee), children: [
|
|
6689
6689
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Delivery" }),
|
|
6690
|
-
|
|
6690
|
+
chunkMNIKXG7W_js.parsePrice(deliveryFee) > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: deliveryFee, className: "tabular-nums" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-primary", children: "Free" })
|
|
6691
6691
|
] }),
|
|
6692
|
-
serviceCharge != null &&
|
|
6692
|
+
serviceCharge != null && chunkMNIKXG7W_js.parsePrice(serviceCharge) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-service-charge": true, className: cn("flex items-baseline justify-between", classNames?.serviceCharge), children: [
|
|
6693
6693
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Service charge" }),
|
|
6694
6694
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: serviceCharge, className: "tabular-nums" })
|
|
6695
6695
|
] }),
|
|
@@ -6779,16 +6779,16 @@ function SaleBadge({
|
|
|
6779
6779
|
className,
|
|
6780
6780
|
classNames
|
|
6781
6781
|
}) {
|
|
6782
|
-
const onSale =
|
|
6782
|
+
const onSale = chunkMNIKXG7W_js.isOnSale(product);
|
|
6783
6783
|
const hasDeal = dealInfo !== void 0;
|
|
6784
6784
|
if (!hasDeal && !onSale && !label) {
|
|
6785
6785
|
return null;
|
|
6786
6786
|
}
|
|
6787
6787
|
let percentage = null;
|
|
6788
6788
|
if (hasDeal && dealInfo.benefit_type === "percentage") {
|
|
6789
|
-
percentage =
|
|
6789
|
+
percentage = chunkMNIKXG7W_js.parsePrice(dealInfo.value);
|
|
6790
6790
|
} else if (onSale) {
|
|
6791
|
-
percentage =
|
|
6791
|
+
percentage = chunkMNIKXG7W_js.getDiscountPercentage(product);
|
|
6792
6792
|
}
|
|
6793
6793
|
const badgeText = label ?? dealInfo?.label ?? (percentage != null && percentage > 0 ? `${percentage}% off` : null);
|
|
6794
6794
|
if (!badgeText) {
|
|
@@ -6807,7 +6807,7 @@ function SaleBadge({
|
|
|
6807
6807
|
"%"
|
|
6808
6808
|
] }),
|
|
6809
6809
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-label": true, className: classNames?.label, children: badgeText }),
|
|
6810
|
-
showOriginalPrice && onSale && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount:
|
|
6810
|
+
showOriginalPrice && onSale && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product) }) })
|
|
6811
6811
|
]
|
|
6812
6812
|
}
|
|
6813
6813
|
);
|
|
@@ -7060,8 +7060,8 @@ function SoldOutOverlay() {
|
|
|
7060
7060
|
);
|
|
7061
7061
|
}
|
|
7062
7062
|
function SaleBadge2({ product }) {
|
|
7063
|
-
if (!
|
|
7064
|
-
const pct =
|
|
7063
|
+
if (!chunkMNIKXG7W_js.isOnSale(product)) return null;
|
|
7064
|
+
const pct = chunkMNIKXG7W_js.getDiscountPercentage(product);
|
|
7065
7065
|
if (!pct || pct <= 0) return null;
|
|
7066
7066
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-card-sale-badge": true, className: "inline-flex items-center text-[11px] font-semibold tracking-wide bg-destructive text-destructive-foreground px-2 py-0.5 rounded-md", children: [
|
|
7067
7067
|
"-",
|
|
@@ -7154,7 +7154,7 @@ function RetailProductCard({
|
|
|
7154
7154
|
}) {
|
|
7155
7155
|
const image = product.image_url || product.images?.[0] || "";
|
|
7156
7156
|
const outOfStock = product.inventory_status?.in_stock === false;
|
|
7157
|
-
const onSale =
|
|
7157
|
+
const onSale = chunkMNIKXG7W_js.isOnSale(product);
|
|
7158
7158
|
const swatches = getColorSwatches(product);
|
|
7159
7159
|
return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, disabled: outOfStock, className, children: [
|
|
7160
7160
|
outOfStock && /* @__PURE__ */ jsxRuntime.jsx(SoldOutOverlay, {}),
|
|
@@ -7172,7 +7172,7 @@ function RetailProductCard({
|
|
|
7172
7172
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[14.5px] font-semibold text-foreground leading-snug tracking-tight mt-1 truncate", children: product.name }),
|
|
7173
7173
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-2", children: [
|
|
7174
7174
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
|
|
7175
|
-
onSale && /* @__PURE__ */ jsxRuntime.jsx(Price, { amount:
|
|
7175
|
+
onSale && /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product), className: "text-xs text-muted-foreground line-through" })
|
|
7176
7176
|
] }),
|
|
7177
7177
|
swatches.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 mt-2.5", children: swatches.map((name) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7178
7178
|
"span",
|
|
@@ -7189,9 +7189,9 @@ function RetailProductCard({
|
|
|
7189
7189
|
function PriceRange({ product, currency, className }) {
|
|
7190
7190
|
const context = useOptionalCimplify();
|
|
7191
7191
|
const resolvedCurrency = currency ?? context?.displayCurrency ?? "USD";
|
|
7192
|
-
const range =
|
|
7192
|
+
const range = chunkMNIKXG7W_js.getPriceRange(product);
|
|
7193
7193
|
if (!range) return null;
|
|
7194
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-price-range": true, className, children:
|
|
7194
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-price-range": true, className, children: chunkMNIKXG7W_js.formatPriceRange(range.min, range.max, resolvedCurrency) });
|
|
7195
7195
|
}
|
|
7196
7196
|
function WholesaleProductCard({
|
|
7197
7197
|
product,
|
|
@@ -7280,8 +7280,8 @@ function BundleProductCard({
|
|
|
7280
7280
|
const image = product.image_url || product.images?.[0] || "";
|
|
7281
7281
|
const components = product.components || [];
|
|
7282
7282
|
const componentCount = components.length;
|
|
7283
|
-
const onSale =
|
|
7284
|
-
const discount =
|
|
7283
|
+
const onSale = chunkMNIKXG7W_js.isOnSale(product);
|
|
7284
|
+
const discount = chunkMNIKXG7W_js.getDiscountPercentage(product);
|
|
7285
7285
|
const hasVariantChoice = components.some((c) => c.allow_variant_choice);
|
|
7286
7286
|
return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
|
|
7287
7287
|
/* @__PURE__ */ jsxRuntime.jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "square", renderImage, children: [
|
|
@@ -7308,7 +7308,7 @@ function BundleProductCard({
|
|
|
7308
7308
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-2.5", children: [
|
|
7309
7309
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
|
|
7310
7310
|
onSale && product.bundle_price && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7311
|
-
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount:
|
|
7311
|
+
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product), className: "text-xs text-muted-foreground line-through" }),
|
|
7312
7312
|
discount != null && discount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] font-semibold text-emerald-600", children: [
|
|
7313
7313
|
"Save ",
|
|
7314
7314
|
discount,
|
|
@@ -8220,7 +8220,7 @@ function SearchInput({
|
|
|
8220
8220
|
}
|
|
8221
8221
|
),
|
|
8222
8222
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-name": true, className: classNames?.resultName, style: { flex: 1, textAlign: "left" }, children: product.name }),
|
|
8223
|
-
product.default_price !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-price": true, className: classNames?.resultPrice, style: { flexShrink: 0 }, children:
|
|
8223
|
+
product.default_price !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-price": true, className: classNames?.resultPrice, style: { flexShrink: 0 }, children: chunkMNIKXG7W_js.formatPrice(product.default_price) })
|
|
8224
8224
|
] })
|
|
8225
8225
|
},
|
|
8226
8226
|
product.id
|
|
@@ -8714,19 +8714,19 @@ function OrderSummary({
|
|
|
8714
8714
|
order.customer_notes.map((note, index) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-cimplify-order-note": true, children: note }, index))
|
|
8715
8715
|
] }),
|
|
8716
8716
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-totals": true, className: classNames?.totals, children: [
|
|
8717
|
-
order.total_discount != null &&
|
|
8717
|
+
order.total_discount != null && chunkMNIKXG7W_js.parsePrice(order.total_discount) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-discount": true, children: [
|
|
8718
8718
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Discount" }),
|
|
8719
8719
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.total_discount, prefix: "-" })
|
|
8720
8720
|
] }),
|
|
8721
|
-
order.delivery_fee != null &&
|
|
8721
|
+
order.delivery_fee != null && chunkMNIKXG7W_js.parsePrice(order.delivery_fee) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-delivery-fee": true, children: [
|
|
8722
8722
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Delivery fee" }),
|
|
8723
8723
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.delivery_fee })
|
|
8724
8724
|
] }),
|
|
8725
|
-
order.service_charge != null &&
|
|
8725
|
+
order.service_charge != null && chunkMNIKXG7W_js.parsePrice(order.service_charge) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-service-charge": true, children: [
|
|
8726
8726
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Service charge" }),
|
|
8727
8727
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.service_charge })
|
|
8728
8728
|
] }),
|
|
8729
|
-
order.tax != null &&
|
|
8729
|
+
order.tax != null && chunkMNIKXG7W_js.parsePrice(order.tax) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-tax": true, children: [
|
|
8730
8730
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Tax" }),
|
|
8731
8731
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.tax })
|
|
8732
8732
|
] }),
|
|
@@ -10015,7 +10015,7 @@ function DefaultProductLayout({
|
|
|
10015
10015
|
}) {
|
|
10016
10016
|
const images = product.images || (product.image_url ? [product.image_url] : []);
|
|
10017
10017
|
const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
|
|
10018
|
-
const onSale =
|
|
10018
|
+
const onSale = chunkMNIKXG7W_js.isOnSale(product);
|
|
10019
10019
|
const hasPhysicalDetails = product.sku || product.vendor || product.material;
|
|
10020
10020
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "default", className: cn("space-y-8", className), children: [
|
|
10021
10021
|
renderBreadcrumb?.(product),
|
|
@@ -10037,10 +10037,10 @@ function DefaultProductLayout({
|
|
|
10037
10037
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
|
|
10038
10038
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-3", children: hasRange ? /* @__PURE__ */ jsxRuntime.jsx(PriceRange, { product, className: "text-2xl font-extrabold" }) : onSale ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10039
10039
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-2xl font-extrabold" }),
|
|
10040
|
-
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount:
|
|
10040
|
+
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product), className: "text-lg text-muted-foreground line-through" }),
|
|
10041
10041
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-bold text-destructive bg-destructive/10 px-2 py-0.5", children: [
|
|
10042
10042
|
"Save ",
|
|
10043
|
-
|
|
10043
|
+
chunkMNIKXG7W_js.getDiscountPercentage(product),
|
|
10044
10044
|
"%"
|
|
10045
10045
|
] })
|
|
10046
10046
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold" }) }),
|
|
@@ -10259,7 +10259,7 @@ function ServiceProductLayout({
|
|
|
10259
10259
|
}) {
|
|
10260
10260
|
const images = product.images || (product.image_url ? [product.image_url] : []);
|
|
10261
10261
|
const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
|
|
10262
|
-
const depositAmount = hasDeposit ?
|
|
10262
|
+
const depositAmount = hasDeposit ? chunkMNIKXG7W_js.parsePrice(product.deposit_amount) : 0;
|
|
10263
10263
|
const cancellationHours = product.cancellation_window_minutes ? Math.floor(product.cancellation_window_minutes / 60) : null;
|
|
10264
10264
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "service", className: cn("space-y-8", className), children: [
|
|
10265
10265
|
renderBreadcrumb?.(product),
|
|
@@ -10327,7 +10327,7 @@ function ServiceProductLayout({
|
|
|
10327
10327
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount, className: "font-medium text-foreground" }),
|
|
10328
10328
|
" deposit charged at booking"
|
|
10329
10329
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10330
|
-
|
|
10330
|
+
chunkMNIKXG7W_js.parsePrice(product.deposit_amount),
|
|
10331
10331
|
"% deposit charged at booking"
|
|
10332
10332
|
] }) })
|
|
10333
10333
|
] })
|
|
@@ -10486,13 +10486,13 @@ function BundleProductLayout({
|
|
|
10486
10486
|
}) {
|
|
10487
10487
|
const images = product.images || (product.image_url ? [product.image_url] : []);
|
|
10488
10488
|
const components = product.components || [];
|
|
10489
|
-
const onSale =
|
|
10490
|
-
const discount =
|
|
10489
|
+
const onSale = chunkMNIKXG7W_js.isOnSale(product);
|
|
10490
|
+
const discount = chunkMNIKXG7W_js.getDiscountPercentage(product);
|
|
10491
10491
|
const baseTotal = components.reduce(
|
|
10492
|
-
(sum, c) => sum +
|
|
10492
|
+
(sum, c) => sum + chunkMNIKXG7W_js.parsePrice(c.effective_price ?? 0) * (c.quantity ?? 1),
|
|
10493
10493
|
0
|
|
10494
10494
|
);
|
|
10495
|
-
const bundlePrice =
|
|
10495
|
+
const bundlePrice = chunkMNIKXG7W_js.parsePrice(product.default_price);
|
|
10496
10496
|
const savings = baseTotal > bundlePrice ? baseTotal - bundlePrice : 0;
|
|
10497
10497
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "bundle", className: cn("space-y-8", className), children: [
|
|
10498
10498
|
renderBreadcrumb?.(product),
|
|
@@ -10984,7 +10984,7 @@ function CartDrawer({
|
|
|
10984
10984
|
}) {
|
|
10985
10985
|
const { isOpen, close } = useCartDrawer();
|
|
10986
10986
|
const cart = useCart();
|
|
10987
|
-
const subtotalNum =
|
|
10987
|
+
const subtotalNum = chunkMNIKXG7W_js.parsePrice(cart.subtotal);
|
|
10988
10988
|
const animatedSubtotal = useAnimatedNumber(subtotalNum);
|
|
10989
10989
|
React10.useEffect(() => {
|
|
10990
10990
|
if (!isOpen) return;
|
|
@@ -11378,9 +11378,9 @@ function CatalogueCollectionLayout({
|
|
|
11378
11378
|
result = result.filter((p) => p.tags?.includes(activeCategory));
|
|
11379
11379
|
}
|
|
11380
11380
|
if (sortBy === "price-asc") {
|
|
11381
|
-
result = [...result].sort((a, b) =>
|
|
11381
|
+
result = [...result].sort((a, b) => chunkMNIKXG7W_js.parsePrice(a.default_price) - chunkMNIKXG7W_js.parsePrice(b.default_price));
|
|
11382
11382
|
} else if (sortBy === "price-desc") {
|
|
11383
|
-
result = [...result].sort((a, b) =>
|
|
11383
|
+
result = [...result].sort((a, b) => chunkMNIKXG7W_js.parsePrice(b.default_price) - chunkMNIKXG7W_js.parsePrice(a.default_price));
|
|
11384
11384
|
} else if (sortBy === "name") {
|
|
11385
11385
|
result = [...result].sort((a, b) => a.name.localeCompare(b.name));
|
|
11386
11386
|
}
|
package/dist/react.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT } from './chunk-IRJFDKFV.mjs';
|
|
3
3
|
export { getVariantDisplayName } from './chunk-IRJFDKFV.mjs';
|
|
4
|
-
import { createCimplifyClient } from './chunk-
|
|
5
|
-
import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-
|
|
6
|
-
import { isSupportedCurrency, formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-
|
|
4
|
+
import { createCimplifyClient } from './chunk-UXLQ7WXI.mjs';
|
|
5
|
+
import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-7NML226B.mjs';
|
|
6
|
+
import { isSupportedCurrency, formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-6AZZ6AOF.mjs';
|
|
7
7
|
import React10, { createContext, useRef, useState, useCallback, useEffect, useContext, useMemo, useId, useSyncExternalStore } from 'react';
|
|
8
8
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
import { clsx } from 'clsx';
|