@nextblock-cms/ecom 0.18.8 → 0.19.2
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/index.cjs.js +1 -1
- package/index.es.js +26 -25
- package/lib/CurrencyProvider.cjs.js +1 -1
- package/lib/CurrencyProvider.es.js +41 -45
- package/lib/PaymentReadinessProvider.cjs.js +1 -1
- package/lib/PaymentReadinessProvider.es.js +15 -19
- package/lib/cart-store.cjs.js +1 -1
- package/lib/cart-store.d.ts +4 -0
- package/lib/cart-store.es.js +77 -69
- package/lib/components/AccountNavigationMenu.cjs.js +1 -1
- package/lib/components/AccountNavigationMenu.es.js +44 -62
- package/lib/components/AddToCartButton.cjs.js +1 -1
- package/lib/components/AddToCartButton.es.js +50 -78
- package/lib/components/Cart.cjs.js +1 -1
- package/lib/components/Cart.es.js +154 -381
- package/lib/components/CartDrawer.cjs.js +1 -1
- package/lib/components/CartDrawer.es.js +143 -297
- package/lib/components/CartIcon.cjs.js +1 -1
- package/lib/components/CartIcon.es.js +21 -47
- package/lib/components/Checkout.cjs.js +1 -1
- package/lib/components/Checkout.es.js +814 -1614
- package/lib/components/CouponForm.cjs.js +1 -1
- package/lib/components/CouponForm.es.js +104 -155
- package/lib/components/CurrencySwitcher.cjs.js +1 -1
- package/lib/components/CurrencySwitcher.es.js +14 -33
- package/lib/components/CustomerProfileForm.cjs.js +1 -1
- package/lib/components/CustomerProfileForm.es.js +264 -672
- package/lib/components/FeaturedProduct.cjs.js +1 -1
- package/lib/components/FeaturedProduct.es.js +46 -125
- package/lib/components/FreemiusLicensePanel.cjs.js +1 -1
- package/lib/components/FreemiusLicensePanel.es.js +45 -125
- package/lib/components/InvoiceDocument.cjs.js +1 -1
- package/lib/components/InvoiceDocument.es.js +148 -487
- package/lib/components/InvoiceViewerShell.cjs.js +2 -2
- package/lib/components/InvoiceViewerShell.d.ts +4 -1
- package/lib/components/InvoiceViewerShell.es.js +59 -142
- package/lib/components/ProductCard.cjs.js +1 -1
- package/lib/components/ProductCard.d.ts +3 -1
- package/lib/components/ProductCard.es.js +128 -242
- package/lib/components/ProductDetailsLayout.cjs.js +1 -1
- package/lib/components/ProductDetailsLayout.es.js +311 -652
- package/lib/components/ProductGallery.cjs.js +1 -1
- package/lib/components/ProductGallery.d.ts +2 -0
- package/lib/components/ProductGallery.es.js +37 -66
- package/lib/components/ProductGrid.cjs.js +1 -1
- package/lib/components/ProductGrid.es.js +23 -32
- package/lib/components/ShippingEstimator.cjs.js +1 -1
- package/lib/components/ShippingEstimator.es.js +118 -231
- package/lib/components/SimpleTiptapRenderer.cjs.js +1 -1
- package/lib/components/SimpleTiptapRenderer.es.js +111 -294
- package/lib/components/SubscriptionSelector.cjs.js +1 -1
- package/lib/components/SubscriptionSelector.es.js +120 -181
- package/lib/freemius-trial-provision.cjs.js +1 -0
- package/lib/freemius-trial-provision.d.ts +85 -0
- package/lib/freemius-trial-provision.es.js +136 -0
- package/lib/invoice.cjs.js +1 -1
- package/lib/invoice.d.ts +1 -1
- package/lib/invoice.es.js +6 -5
- package/lib/pages/cms/coupons/CouponEditorForm.cjs.js +1 -1
- package/lib/pages/cms/coupons/CouponEditorForm.es.js +115 -375
- package/lib/pages/cms/coupons/CouponsPage.cjs.js +2 -2
- package/lib/pages/cms/coupons/CouponsPage.es.js +116 -368
- package/lib/pages/cms/coupons/CreateCouponDialog.cjs.js +1 -1
- package/lib/pages/cms/coupons/CreateCouponDialog.es.js +26 -62
- package/lib/pages/cms/coupons/EditCouponPage.cjs.js +1 -1
- package/lib/pages/cms/coupons/EditCouponPage.es.js +35 -71
- package/lib/pages/cms/coupons/ProductScopePicker.cjs.js +1 -1
- package/lib/pages/cms/coupons/ProductScopePicker.es.js +72 -167
- package/lib/pages/cms/orders/ExportReportsDialog.cjs.js +1 -1
- package/lib/pages/cms/orders/ExportReportsDialog.es.js +87 -247
- package/lib/pages/cms/orders/OrderDetailPage.cjs.js +1 -1
- package/lib/pages/cms/orders/OrderDetailPage.es.js +95 -283
- package/lib/pages/cms/orders/OrderPrintButton.cjs.js +1 -1
- package/lib/pages/cms/orders/OrderPrintButton.es.js +9 -21
- package/lib/pages/cms/orders/OrderStatusForm.cjs.js +1 -1
- package/lib/pages/cms/orders/OrderStatusForm.es.js +46 -106
- package/lib/pages/cms/orders/OrdersPage.cjs.js +1 -1
- package/lib/pages/cms/orders/OrdersPage.es.js +78 -257
- package/lib/pages/cms/payments/PaymentsClient.cjs.js +1 -1
- package/lib/pages/cms/payments/PaymentsClient.es.js +192 -580
- package/lib/pages/cms/payments/PaymentsPage.cjs.js +1 -1
- package/lib/pages/cms/payments/PaymentsPage.es.js +14 -22
- package/lib/pages/cms/products/ProductsPage.cjs.js +1 -1
- package/lib/pages/cms/products/ProductsPage.es.js +47 -87
- package/lib/pages/cms/products/_id_/edit/EditProductPage.cjs.js +1 -1
- package/lib/pages/cms/products/_id_/edit/EditProductPage.es.js +97 -177
- package/lib/pages/cms/products/attributes/AttributeManagementPage.cjs.js +1 -1
- package/lib/pages/cms/products/attributes/AttributeManagementPage.es.js +40 -84
- package/lib/pages/cms/products/attributes/components/AttributeManager.cjs.js +1 -1
- package/lib/pages/cms/products/attributes/components/AttributeManager.es.js +192 -455
- package/lib/pages/cms/products/categories/CategoryManagementPage.cjs.js +1 -1
- package/lib/pages/cms/products/categories/CategoryManagementPage.es.js +28 -72
- package/lib/pages/cms/products/categories/components/CategoryManager.cjs.js +1 -1
- package/lib/pages/cms/products/categories/components/CategoryManager.es.js +183 -490
- package/lib/pages/cms/products/components/CopyProductFromLanguage.cjs.js +1 -1
- package/lib/pages/cms/products/components/CopyProductFromLanguage.es.js +69 -177
- package/lib/pages/cms/products/components/CurrencyPriceFields.cjs.js +1 -1
- package/lib/pages/cms/products/components/CurrencyPriceFields.es.js +102 -213
- package/lib/pages/cms/products/components/DeleteProductButton.cjs.js +1 -1
- package/lib/pages/cms/products/components/DeleteProductButton.es.js +25 -45
- package/lib/pages/cms/products/components/FreemiusPricingDashboard.cjs.js +1 -1
- package/lib/pages/cms/products/components/FreemiusPricingDashboard.es.js +58 -202
- package/lib/pages/cms/products/components/ProductCategorySelector.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductCategorySelector.es.js +89 -235
- package/lib/pages/cms/products/components/ProductForm.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductForm.es.js +526 -1110
- package/lib/pages/cms/products/components/ProductMediaManager.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductMediaManager.es.js +63 -154
- package/lib/pages/cms/products/components/ProductsBulkTable.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductsBulkTable.es.js +213 -544
- package/lib/pages/cms/products/components/SaleScheduleFields.cjs.js +1 -1
- package/lib/pages/cms/products/components/SaleScheduleFields.es.js +91 -207
- package/lib/pages/cms/products/components/SyncFreemiusButton.cjs.js +1 -1
- package/lib/pages/cms/products/components/SyncFreemiusButton.es.js +16 -28
- package/lib/pages/cms/products/components/SyncFreemiusPricingButton.cjs.js +2 -2
- package/lib/pages/cms/products/components/SyncFreemiusPricingButton.es.js +25 -37
- package/lib/pages/cms/products/components/VariationsEditor.cjs.js +1 -1
- package/lib/pages/cms/products/components/VariationsEditor.es.js +261 -492
- package/lib/pages/cms/products/inventory/InventoryPage.cjs.js +1 -1
- package/lib/pages/cms/products/inventory/InventoryPage.es.js +12 -32
- package/lib/pages/cms/products/inventory/InventoryTableClient.cjs.js +2 -2
- package/lib/pages/cms/products/inventory/InventoryTableClient.es.js +145 -365
- package/lib/pages/cms/products/new/NewProductPage.cjs.js +1 -1
- package/lib/pages/cms/products/new/NewProductPage.es.js +30 -42
- package/lib/pages/cms/shipping/ShippingPage.cjs.js +2 -2
- package/lib/pages/cms/shipping/ShippingPage.es.js +155 -507
- package/lib/pages/cms/shipping/components/RateForm.cjs.js +1 -1
- package/lib/pages/cms/shipping/components/RateForm.es.js +334 -717
- package/lib/pages/cms/shipping/components/ZoneForm.cjs.js +1 -1
- package/lib/pages/cms/shipping/components/ZoneForm.es.js +158 -392
- package/lib/pages/cms/taxes/TaxesPage.cjs.js +1 -1
- package/lib/pages/cms/taxes/TaxesPage.es.js +119 -447
- package/lib/pages/cms/taxes/components/TaxRateForm.cjs.js +1 -1
- package/lib/pages/cms/taxes/components/TaxRateForm.es.js +52 -156
- package/lib/product-context.cjs.js +1 -1
- package/lib/product-context.es.js +10 -14
- package/lib/trials.cjs.js +1 -1
- package/lib/trials.d.ts +10 -3
- package/lib/trials.es.js +28 -21
- package/lib/types.d.ts +2 -0
- package/lib/use-price-formatter.cjs.js +1 -0
- package/lib/use-price-formatter.d.ts +11 -0
- package/lib/use-price-formatter.es.js +13 -0
- package/lib/variation-utils.cjs.js +1 -1
- package/lib/variation-utils.d.ts +10 -0
- package/lib/variation-utils.es.js +139 -123
- package/package.json +4 -4
- package/server.cjs.js +1 -1
- package/server.d.ts +1 -0
- package/server.es.js +180 -172
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("@nextblock-cms/ui"),u=require("react"),m=require("../../../../countries.cjs.js"),c=require("../../../../states.cjs.js"),S=require("../actions.cjs.js");function C({initialData:e,submitLabel:p="Save tax rate",compact:a=!1}){const l=m.normalizeCountryCode(e?.country_code)||"US",[d,h]=u.useState(l),[o,n]=u.useState(c.normalizeSubdivisionCode(l,e?.state_code)||e?.state_code||""),y=u.useMemo(()=>c.getStatesForCountry(d),[d]),j=c.countryUsesStructuredStates(d);return t.jsxs("form",{action:S.saveTaxRateAction,className:"space-y-4",children:[e?.id?t.jsx("input",{type:"hidden",name:"id",value:e.id}):null,t.jsxs("div",{className:a?"grid gap-4 md:grid-cols-4":"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx(s.Label,{htmlFor:e?.id?`country-${e.id}`:"tax-rate-country",children:"Country"}),t.jsx("select",{id:e?.id?`country-${e.id}`:"tax-rate-country",name:"country_code",value:d,onChange:r=>{const x=r.target.value,g=c.getStatesForCountry(x);h(x),n(g.some(v=>v.code===o)?o:"")},className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:m.countries.map(r=>t.jsx("option",{value:r.code,children:r.name},r.code))})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(s.Label,{htmlFor:e?.id?`state-${e.id}`:"tax-rate-state",children:"State / Province"}),j?t.jsxs("select",{id:e?.id?`state-${e.id}`:"tax-rate-state",name:"state_code",value:o,onChange:r=>n(r.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:[t.jsx("option",{value:"",children:"Country-wide / federal"}),y.map(r=>t.jsx("option",{value:r.code,children:r.name},r.code))]}):t.jsx(s.Input,{id:e?.id?`state-${e.id}`:"tax-rate-state",name:"state_code",value:o,onChange:r=>n(r.target.value),placeholder:"Optional"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(s.Label,{htmlFor:e?.id?`name-${e.id}`:"tax-rate-name",children:"Tax name"}),t.jsx(s.Input,{id:e?.id?`name-${e.id}`:"tax-rate-name",name:"tax_name",defaultValue:e?.tax_name||"",placeholder:"GST, PST, State Sales Tax",required:!0})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(s.Label,{htmlFor:e?.id?`rate-${e.id}`:"tax-rate-rate",children:"Rate (%)"}),t.jsx(s.Input,{id:e?.id?`rate-${e.id}`:"tax-rate-rate",name:"tax_rate",type:"number",min:"0",max:"100",step:"0.0001",defaultValue:typeof e?.tax_rate=="number"?e.tax_rate.toString():"",placeholder:"5.0000",required:!0})]})]}),t.jsx("div",{className:"flex justify-end",children:t.jsx(s.Button,{type:"submit",size:a?"sm":"default",children:p})})]})}exports.TaxRateForm=C;
|
|
@@ -1,129 +1,69 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { Label as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { normalizeCountryCode as
|
|
6
|
-
import { normalizeSubdivisionCode as
|
|
7
|
-
import { saveTaxRateAction as
|
|
8
|
-
function
|
|
2
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { Label as c, Input as a, Button as S } from "@nextblock-cms/ui";
|
|
4
|
+
import { useState as p, useMemo as b } from "react";
|
|
5
|
+
import { normalizeCountryCode as i, countries as _ } from "../../../../countries.es.js";
|
|
6
|
+
import { normalizeSubdivisionCode as N, getStatesForCountry as x, countryUsesStructuredStates as $ } from "../../../../states.es.js";
|
|
7
|
+
import { saveTaxRateAction as F } from "../actions.es.js";
|
|
8
|
+
function q({
|
|
9
9
|
initialData: e,
|
|
10
|
-
submitLabel:
|
|
11
|
-
compact:
|
|
10
|
+
submitLabel: h = "Save tax rate",
|
|
11
|
+
compact: u = !1
|
|
12
12
|
}) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
),
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
e?.id ? /* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/* @__PURE__ */ s("div", { className: n ? "grid gap-4 md:grid-cols-4" : "grid gap-4 md:grid-cols-2 xl:grid-cols-4", children: [
|
|
23
|
-
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
24
|
-
/* @__PURE__ */ s(m, { htmlFor: e?.id ? `country-${e.id}` : "tax-rate-country", children: "Country" }, void 0, !1, {
|
|
25
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
26
|
-
lineNumber: 43,
|
|
27
|
-
columnNumber: 11
|
|
28
|
-
}, this),
|
|
29
|
-
/* @__PURE__ */ s(
|
|
13
|
+
const m = i(e?.country_code) || "US", [o, y] = p(m), [s, n] = p(
|
|
14
|
+
N(m, e?.state_code) || e?.state_code || ""
|
|
15
|
+
), f = b(() => x(o), [o]), v = $(o);
|
|
16
|
+
return /* @__PURE__ */ t("form", { action: F, className: "space-y-4", children: [
|
|
17
|
+
e?.id ? /* @__PURE__ */ r("input", { type: "hidden", name: "id", value: e.id }) : null,
|
|
18
|
+
/* @__PURE__ */ t("div", { className: u ? "grid gap-4 md:grid-cols-4" : "grid gap-4 md:grid-cols-2 xl:grid-cols-4", children: [
|
|
19
|
+
/* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
20
|
+
/* @__PURE__ */ r(c, { htmlFor: e?.id ? `country-${e.id}` : "tax-rate-country", children: "Country" }),
|
|
21
|
+
/* @__PURE__ */ r(
|
|
30
22
|
"select",
|
|
31
23
|
{
|
|
32
24
|
id: e?.id ? `country-${e.id}` : "tax-rate-country",
|
|
33
25
|
name: "country_code",
|
|
34
26
|
value: o,
|
|
35
|
-
onChange: (
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
onChange: (d) => {
|
|
28
|
+
const l = d.target.value, g = x(l);
|
|
29
|
+
y(l), n(
|
|
30
|
+
g.some((C) => C.code === s) ? s : ""
|
|
39
31
|
);
|
|
40
32
|
},
|
|
41
33
|
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
42
|
-
children:
|
|
43
|
-
|
|
44
|
-
lineNumber: 62,
|
|
45
|
-
columnNumber: 15
|
|
46
|
-
}, this))
|
|
47
|
-
},
|
|
48
|
-
void 0,
|
|
49
|
-
!1,
|
|
50
|
-
{
|
|
51
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
52
|
-
lineNumber: 46,
|
|
53
|
-
columnNumber: 11
|
|
54
|
-
},
|
|
55
|
-
this
|
|
34
|
+
children: _.map((d) => /* @__PURE__ */ r("option", { value: d.code, children: d.name }, d.code))
|
|
35
|
+
}
|
|
56
36
|
)
|
|
57
|
-
] },
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, this),
|
|
62
|
-
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
63
|
-
/* @__PURE__ */ s(m, { htmlFor: e?.id ? `state-${e.id}` : "tax-rate-state", children: "State / Province" }, void 0, !1, {
|
|
64
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
65
|
-
lineNumber: 70,
|
|
66
|
-
columnNumber: 11
|
|
67
|
-
}, this),
|
|
68
|
-
b ? /* @__PURE__ */ s(
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
39
|
+
/* @__PURE__ */ r(c, { htmlFor: e?.id ? `state-${e.id}` : "tax-rate-state", children: "State / Province" }),
|
|
40
|
+
v ? /* @__PURE__ */ t(
|
|
69
41
|
"select",
|
|
70
42
|
{
|
|
71
43
|
id: e?.id ? `state-${e.id}` : "tax-rate-state",
|
|
72
44
|
name: "state_code",
|
|
73
|
-
value:
|
|
74
|
-
onChange: (
|
|
45
|
+
value: s,
|
|
46
|
+
onChange: (d) => n(d.target.value),
|
|
75
47
|
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
76
48
|
children: [
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
79
|
-
lineNumber: 81,
|
|
80
|
-
columnNumber: 15
|
|
81
|
-
}, this),
|
|
82
|
-
p.map((r) => /* @__PURE__ */ s("option", { value: r.code, children: r.name }, r.code, !1, {
|
|
83
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
84
|
-
lineNumber: 83,
|
|
85
|
-
columnNumber: 17
|
|
86
|
-
}, this))
|
|
49
|
+
/* @__PURE__ */ r("option", { value: "", children: "Country-wide / federal" }),
|
|
50
|
+
f.map((d) => /* @__PURE__ */ r("option", { value: d.code, children: d.name }, d.code))
|
|
87
51
|
]
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
!0,
|
|
91
|
-
{
|
|
92
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
93
|
-
lineNumber: 74,
|
|
94
|
-
columnNumber: 13
|
|
95
|
-
},
|
|
96
|
-
this
|
|
97
|
-
) : /* @__PURE__ */ s(
|
|
52
|
+
}
|
|
53
|
+
) : /* @__PURE__ */ r(
|
|
98
54
|
a,
|
|
99
55
|
{
|
|
100
56
|
id: e?.id ? `state-${e.id}` : "tax-rate-state",
|
|
101
57
|
name: "state_code",
|
|
102
|
-
value:
|
|
103
|
-
onChange: (
|
|
58
|
+
value: s,
|
|
59
|
+
onChange: (d) => n(d.target.value),
|
|
104
60
|
placeholder: "Optional"
|
|
105
|
-
}
|
|
106
|
-
void 0,
|
|
107
|
-
!1,
|
|
108
|
-
{
|
|
109
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
110
|
-
lineNumber: 89,
|
|
111
|
-
columnNumber: 13
|
|
112
|
-
},
|
|
113
|
-
this
|
|
61
|
+
}
|
|
114
62
|
)
|
|
115
|
-
] },
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}, this),
|
|
120
|
-
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
121
|
-
/* @__PURE__ */ s(m, { htmlFor: e?.id ? `name-${e.id}` : "tax-rate-name", children: "Tax name" }, void 0, !1, {
|
|
122
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
123
|
-
lineNumber: 100,
|
|
124
|
-
columnNumber: 11
|
|
125
|
-
}, this),
|
|
126
|
-
/* @__PURE__ */ s(
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
65
|
+
/* @__PURE__ */ r(c, { htmlFor: e?.id ? `name-${e.id}` : "tax-rate-name", children: "Tax name" }),
|
|
66
|
+
/* @__PURE__ */ r(
|
|
127
67
|
a,
|
|
128
68
|
{
|
|
129
69
|
id: e?.id ? `name-${e.id}` : "tax-rate-name",
|
|
@@ -131,28 +71,12 @@ function _({
|
|
|
131
71
|
defaultValue: e?.tax_name || "",
|
|
132
72
|
placeholder: "GST, PST, State Sales Tax",
|
|
133
73
|
required: !0
|
|
134
|
-
}
|
|
135
|
-
void 0,
|
|
136
|
-
!1,
|
|
137
|
-
{
|
|
138
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
139
|
-
lineNumber: 103,
|
|
140
|
-
columnNumber: 11
|
|
141
|
-
},
|
|
142
|
-
this
|
|
74
|
+
}
|
|
143
75
|
)
|
|
144
|
-
] },
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}, this),
|
|
149
|
-
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
150
|
-
/* @__PURE__ */ s(m, { htmlFor: e?.id ? `rate-${e.id}` : "tax-rate-rate", children: "Rate (%)" }, void 0, !1, {
|
|
151
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
152
|
-
lineNumber: 113,
|
|
153
|
-
columnNumber: 11
|
|
154
|
-
}, this),
|
|
155
|
-
/* @__PURE__ */ s(
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
78
|
+
/* @__PURE__ */ r(c, { htmlFor: e?.id ? `rate-${e.id}` : "tax-rate-rate", children: "Rate (%)" }),
|
|
79
|
+
/* @__PURE__ */ r(
|
|
156
80
|
a,
|
|
157
81
|
{
|
|
158
82
|
id: e?.id ? `rate-${e.id}` : "tax-rate-rate",
|
|
@@ -164,41 +88,13 @@ function _({
|
|
|
164
88
|
defaultValue: typeof e?.tax_rate == "number" ? e.tax_rate.toString() : "",
|
|
165
89
|
placeholder: "5.0000",
|
|
166
90
|
required: !0
|
|
167
|
-
}
|
|
168
|
-
void 0,
|
|
169
|
-
!1,
|
|
170
|
-
{
|
|
171
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
172
|
-
lineNumber: 116,
|
|
173
|
-
columnNumber: 11
|
|
174
|
-
},
|
|
175
|
-
this
|
|
91
|
+
}
|
|
176
92
|
)
|
|
177
|
-
] }
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}, this)
|
|
182
|
-
] }, void 0, !0, {
|
|
183
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
184
|
-
lineNumber: 41,
|
|
185
|
-
columnNumber: 7
|
|
186
|
-
}, this),
|
|
187
|
-
/* @__PURE__ */ s("div", { className: "flex justify-end", children: /* @__PURE__ */ s(R, { type: "submit", size: n ? "sm" : "default", children: x }, void 0, !1, {
|
|
188
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
189
|
-
lineNumber: 133,
|
|
190
|
-
columnNumber: 9
|
|
191
|
-
}, this) }, void 0, !1, {
|
|
192
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
193
|
-
lineNumber: 132,
|
|
194
|
-
columnNumber: 7
|
|
195
|
-
}, this)
|
|
196
|
-
] }, void 0, !0, {
|
|
197
|
-
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/pages/cms/taxes/components/TaxRateForm.tsx",
|
|
198
|
-
lineNumber: 38,
|
|
199
|
-
columnNumber: 5
|
|
200
|
-
}, this);
|
|
93
|
+
] })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ r("div", { className: "flex justify-end", children: /* @__PURE__ */ r(S, { type: "submit", size: u ? "sm" : "default", children: h }) })
|
|
96
|
+
] });
|
|
201
97
|
}
|
|
202
98
|
export {
|
|
203
|
-
|
|
99
|
+
q as TaxRateForm
|
|
204
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),e=require("react"),r=e.createContext(void 0),c=({product:t,children:o})=>u.jsx(r.Provider,{value:{product:t},children:o}),n=()=>{const t=e.useContext(r);if(!t)throw new Error("useProduct must be used within a ProductProvider. Ensure the component is wrapped in a ProductProvider.");return t.product};exports.ProductProvider=c;exports.useProduct=n;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { createContext as n, useContext as
|
|
4
|
-
const
|
|
5
|
-
product:
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as n, useContext as u } from "react";
|
|
4
|
+
const t = n(void 0), i = ({
|
|
5
|
+
product: r,
|
|
6
6
|
children: o
|
|
7
|
-
}) => /* @__PURE__ */ t
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
columnNumber: 5
|
|
11
|
-
}, void 0), i = () => {
|
|
12
|
-
const e = c(r);
|
|
13
|
-
if (!e)
|
|
7
|
+
}) => /* @__PURE__ */ e(t.Provider, { value: { product: r }, children: o }), s = () => {
|
|
8
|
+
const r = u(t);
|
|
9
|
+
if (!r)
|
|
14
10
|
throw new Error("useProduct must be used within a ProductProvider. Ensure the component is wrapped in a ProductProvider.");
|
|
15
|
-
return
|
|
11
|
+
return r.product;
|
|
16
12
|
};
|
|
17
13
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
i as ProductProvider,
|
|
15
|
+
s as useProduct
|
|
20
16
|
};
|
package/lib/trials.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(e){const r=Number(e?.trial_period_days??0);return!Number.isFinite(r)||r<=0?0:Math.round(r)}function o(e){return i(e)===0?null:e?.trial_requires_payment_method?"paid":"free"}function a(e,r,t,d){if(!e)return t;const n=e(r,d);return n===r?t:n}function l(e,r){const t=i(typeof e=="number"?{trial_period_days:e}:e);return t>0?a(r,"ecommerce.trial_days",`${t}-day free trial`,{count:t}):null}function u(e,r){return e?.trial_requires_payment_method?a(r,"ecommerce.trial_payment_required","Payment method required"):a(r,"ecommerce.trial_no_card","No credit card required")}function m(e,r){const t=l(e,r);return t?{label:t,paymentRequirementLabel:u(e,r),checkoutMode:o(e)}:null}exports.getTrialCheckoutMode=o;exports.getTrialLabel=l;exports.getTrialPaymentRequirementLabel=u;exports.getTrialPeriodDays=i;exports.getTrialSummary=m;
|
package/lib/trials.d.ts
CHANGED
|
@@ -5,9 +5,16 @@ type TrialCarrier = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function getTrialPeriodDays(value: TrialCarrier | null | undefined): number;
|
|
7
7
|
export declare function getTrialCheckoutMode(value: TrialCarrier | null | undefined): FreemiusTrialMode | null;
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
8
|
+
/** The `t` of `useTranslations()`. It answers an unseeded key with the key itself. */
|
|
9
|
+
export type TrialTranslate = (key: string, params?: Record<string, string | number>) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Pass `t` from a component to get the label in the visitor's language. Without it the copy
|
|
12
|
+
* is English: these helpers used to return English only, so every product card, the cart
|
|
13
|
+
* and the checkout showed "14-day free trial" on French pages.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getTrialLabel(value: TrialCarrier | number | null | undefined, t?: TrialTranslate): string | null;
|
|
16
|
+
export declare function getTrialPaymentRequirementLabel(value: TrialCarrier | null | undefined, t?: TrialTranslate): string;
|
|
17
|
+
export declare function getTrialSummary(value: TrialCarrier | null | undefined, t?: TrialTranslate): {
|
|
11
18
|
label: string;
|
|
12
19
|
paymentRequirementLabel: string;
|
|
13
20
|
checkoutMode: FreemiusTrialMode | null;
|
package/lib/trials.es.js
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
3
|
-
return !Number.isFinite(
|
|
1
|
+
function i(r) {
|
|
2
|
+
const e = Number(r?.trial_period_days ?? 0);
|
|
3
|
+
return !Number.isFinite(e) || e <= 0 ? 0 : Math.round(e);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function u(r) {
|
|
6
|
+
return i(r) === 0 ? null : r?.trial_requires_payment_method ? "paid" : "free";
|
|
7
7
|
}
|
|
8
|
-
function n(e) {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
function n(r, e, t, o) {
|
|
9
|
+
if (!r) return t;
|
|
10
|
+
const a = r(e, o);
|
|
11
|
+
return a === e ? t : a;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
13
|
+
function d(r, e) {
|
|
14
|
+
const t = i(typeof r == "number" ? { trial_period_days: r } : r);
|
|
15
|
+
return t > 0 ? n(e, "ecommerce.trial_days", `${t}-day free trial`, {
|
|
16
|
+
count: t
|
|
17
|
+
}) : null;
|
|
14
18
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
function l(r, e) {
|
|
20
|
+
return r?.trial_requires_payment_method ? n(e, "ecommerce.trial_payment_required", "Payment method required") : n(e, "ecommerce.trial_no_card", "No credit card required");
|
|
21
|
+
}
|
|
22
|
+
function c(r, e) {
|
|
23
|
+
const t = d(r, e);
|
|
24
|
+
return t ? {
|
|
25
|
+
label: t,
|
|
26
|
+
paymentRequirementLabel: l(r, e),
|
|
27
|
+
checkoutMode: u(r)
|
|
21
28
|
} : null;
|
|
22
29
|
}
|
|
23
30
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
u as getTrialCheckoutMode,
|
|
32
|
+
d as getTrialLabel,
|
|
33
|
+
l as getTrialPaymentRequirementLabel,
|
|
34
|
+
i as getTrialPeriodDays,
|
|
35
|
+
c as getTrialSummary
|
|
29
36
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@nextblock-cms/utils");function t(e){return e?e==="fr"?"fr-CA":e==="en"?"en-US":e:"en-US"}function c(){const{lang:e}=r.useTranslations(),n=t(e);return(i,o)=>r.formatPrice(i,o,n)}exports.getPriceLocale=t;exports.usePriceFormatter=c;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The regional locale prices are formatted in, from the site language. */
|
|
2
|
+
export declare function getPriceLocale(lang?: string | null): string;
|
|
3
|
+
/**
|
|
4
|
+
* `formatPrice` bound to the visitor's language.
|
|
5
|
+
*
|
|
6
|
+
* The shared helper defaults to `en-US`, and no shop component passed a locale, so a French
|
|
7
|
+
* page showed `$1,234.50` instead of `1 234,50 $`. Components take this hook and keep calling
|
|
8
|
+
* `formatPrice(amount, currency)` as before. The language comes from the translations
|
|
9
|
+
* provider, which is the same on the server and in the browser: no hydration mismatch.
|
|
10
|
+
*/
|
|
11
|
+
export declare function usePriceFormatter(): (amount: number, currencyCode?: string) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useTranslations as o, formatPrice as i } from "@nextblock-cms/utils";
|
|
3
|
+
function c(r) {
|
|
4
|
+
return r ? r === "fr" ? "fr-CA" : r === "en" ? "en-US" : r : "en-US";
|
|
5
|
+
}
|
|
6
|
+
function u() {
|
|
7
|
+
const { lang: r } = o(), e = c(r);
|
|
8
|
+
return (t, n) => i(t, n, e);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
c as getPriceLocale,
|
|
12
|
+
u as usePriceFormatter
|
|
13
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./currency.cjs.js");function f(e){return!e||typeof e!="object"||Array.isArray(e)?null:Object.entries(e).reduce((
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./currency.cjs.js");function f(e){return!e||typeof e!="object"||Array.isArray(e)?null:Object.entries(e).reduce((i,[n,t])=>(typeof t=="string"&&t.trim()&&(i[n]=t.trim()),i),{})}function p(e,i,n){return!n||!i?e:i[n]?.trim()||e}function V(e,i){return p(e.name,e.name_translations,i)}function M(e,i){return p(e.value,e.value_translations,i)}function E(e){return e?e.startsWith("http")?e:process.env.NEXT_PUBLIC_R2_BASE_URL?`${process.env.NEXT_PUBLIC_R2_BASE_URL}/${e}`:process.env.NEXT_PUBLIC_SUPABASE_URL?`${process.env.NEXT_PUBLIC_SUPABASE_URL}/storage/v1/object/public/media/${e}`:e:null}function I(e){return e.toLowerCase().trim().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function S(e){return[...e].sort().join("__")}function A(e){return e.map(i=>i.term_value).join(" / ")}function P(e){return e.length===0?[]:e.reduce((i,n)=>i.flatMap(t=>n.map(a=>[...t,a])),[[]])}function B(e){const{baseSku:i,basePrice:n,basePrices:t={},baseSalePrice:a=null,baseSalePrices:r={},selectedAttributes:s,previousVariants:c=[]}=e;if(s.length===0||s.some(o=>o.terms.length===0))return[];const u=new Map(c.map(o=>[o.combination_key,o])),l=s.map(o=>o.terms.map(d=>({attribute_id:o.attribute_id,attribute_name:o.attribute_name,term:d})));return P(l).map(o=>{const d=o.map(({attribute_id:m,attribute_name:k,term:g})=>({attribute_id:m,attribute_name:k,term_id:g.id,term_value:g.value,term_slug:g.slug})),h=d.map(m=>m.term_id),y=S(h),_=u.get(y),v=d.map(m=>(m.term_slug?m.term_slug:I(m.term_value)).toUpperCase()).filter(Boolean).join("-");return{id:_?.id,combination_key:y,sku:_?.sku||[i.trim(),v].filter(Boolean).join("-"),upc:_?.upc??null,price:_?.price??n,prices:_?.prices??b.normalizePriceMap(t),sale_price:_?.sale_price??a,sale_prices:_?.sale_prices??b.normalizeSalePriceMap(r),sale_start_at:_?.sale_start_at??null,sale_end_at:_?.sale_end_at??null,stock_quantity:_?.stock_quantity??0,main_media_id:_?.main_media_id??null,main_image_url:_?.main_image_url??null,attribute_term_ids:h,selected_options:d,label:A(d)}})}function R(e){const i={};for(const n of e)for(const t of n.selected_options??[]){const a=new Set(i[t.attribute_id]??[]);a.add(t.term_id),i[t.attribute_id]=[...a]}return i}function U(e,i){const n=Object.values(i).filter(Boolean);return n.length===0?null:e.find(t=>t.attribute_term_ids.length===n.length&&n.every(a=>t.attribute_term_ids.includes(a)))??null}function T(e,i,n){const t=new Set;for(const a of e){if(!Object.entries(n).every(([c,u])=>!u||c===i?!0:a.attribute_term_ids.includes(u)))continue;const s=a.selected_options.find(c=>c.attribute_id===i);s&&t.add(s.term_id)}return t}function j(e,i){const n=i.find(t=>t.stock_quantity>0)??i[0]??null;return n?n.selected_options.reduce((t,a)=>(t[a.attribute_id]=a.term_id,t),{}):e.reduce((t,a)=>{const r=a.terms[0];return r&&(t[a.id]=r.id),t},{})}function z(e,i,n,t,a){const r={[t]:a};for(const s of e){if(s.id===t)continue;const c=T(i,s.id,r),u=n[s.id];if(u&&c.has(u)){r[s.id]=u;continue}const l=s.terms.find(o=>c.has(o.id));l&&(r[s.id]=l.id)}return r}function L(e,i,n){const t={...n};for(const a of e){const r=T(i,a.id,t);if(r.size===0){delete t[a.id];continue}const s=t[a.id];if(s&&r.has(s))continue;const c=a.terms.find(u=>r.has(u.id));c&&(t[a.id]=c.id)}return t}function N(e=[],i){const n=new Map,t=e.map(r=>{const s=(r.variant_attribute_mapping||[]).map(u=>{const l=u.product_attribute_terms,o=l?.product_attributes;if(!l||!o)return null;const d=n.get(o.id)||{id:o.id,name:p(o.name,f(o.name_translations),i),slug:o.slug,name_translations:f(o.name_translations),terms:[],_termIds:new Set};return d._termIds.has(l.id)||(d.terms.push({id:l.id,attribute_id:l.attribute_id,value:p(l.value,f(l.value_translations),i),slug:l.slug,sort_order:l.sort_order??null,value_translations:f(l.value_translations)}),d._termIds.add(l.id)),n.set(o.id,d),{attribute_id:o.id,attribute_name:p(o.name,f(o.name_translations),i),term_id:l.id,term_value:p(l.value,f(l.value_translations),i),term_slug:l.slug}}).filter(u=>u!==null).sort((u,l)=>u.attribute_name.localeCompare(l.attribute_name)),c=s.map(u=>u.term_id);return{id:r.id,combination_key:S(c),sku:r.sku,upc:r.upc??null,price:r.price??0,prices:b.normalizePriceMap(r.prices),sale_price:r.sale_price??null,sale_prices:b.normalizeSalePriceMap(r.sale_prices),sale_start_at:r.sale_start_at??null,sale_end_at:r.sale_end_at??null,scheduled_price:r.scheduled_price??null,scheduled_prices:b.normalizePriceMap(r.scheduled_prices),scheduled_price_at:r.scheduled_price_at??null,stock_quantity:r.stock_quantity??0,main_media_id:r.main_media_id??null,image_url:E(r.media?.file_path??r.media?.object_key??null),attribute_term_ids:c,selected_options:s,label:A(s)}});return{attributes:[...n.values()].map(r=>({id:r.id,name:r.name,slug:r.slug,name_translations:r.name_translations,terms:[...r.terms].sort((s,c)=>{const u=s.sort_order??Number.MAX_SAFE_INTEGER,l=c.sort_order??Number.MAX_SAFE_INTEGER;return u!==l?u-l:s.value.localeCompare(c.value)})})).sort((r,s)=>r.name.localeCompare(s.name)),variants:t}}function O(e,i){if(!e.length)return null;const n=e.map(t=>b.isSaleWindowActive({saleStartAt:t.sale_start_at,saleEndAt:t.sale_end_at,now:i})&&typeof t.sale_price=="number"?t.sale_price:t.price);return{min:Math.min(...n),max:Math.max(...n)}}exports.applyVariantSelection=z;exports.buildCombinationKey=S;exports.buildVariantLabel=A;exports.chooseInitialVariantSelections=j;exports.extractSelectedTermsByAttribute=R;exports.findMatchingVariant=U;exports.generateVariantDrafts=B;exports.getAvailableTermIdsForAttribute=T;exports.getVariantEffectivePriceRange=O;exports.mapRawVariantRelations=N;exports.normalizeSelectionsToAvailableVariants=L;exports.resolveAttributeName=V;exports.resolveTermValue=M;exports.resolveTranslatedText=p;
|
package/lib/variation-utils.d.ts
CHANGED
|
@@ -59,6 +59,16 @@ export declare function extractSelectedTermsByAttribute(variants: Array<{
|
|
|
59
59
|
export declare function findMatchingVariant(variants: ProductVariant[], selections: Record<string, string | undefined>): ProductVariant | null;
|
|
60
60
|
export declare function getAvailableTermIdsForAttribute(variants: ProductVariant[], attributeId: string, selections: Record<string, string | undefined>): Set<string>;
|
|
61
61
|
export declare function chooseInitialVariantSelections(attributes: ProductAttribute[], variants: ProductVariant[]): Record<string, string>;
|
|
62
|
+
/**
|
|
63
|
+
* The selections after the shopper picks `termId` for `attributeId`.
|
|
64
|
+
*
|
|
65
|
+
* The pick always wins. Every other attribute keeps its current term when some variant
|
|
66
|
+
* combines it with everything chosen so far, and otherwise moves to the first term that
|
|
67
|
+
* does. With a sparse matrix (only Red/S and Blue/M exist) choosing Blue therefore lands on
|
|
68
|
+
* Blue/M. The old flow re-normalized `{...current, [attributeId]: termId}` attribute by
|
|
69
|
+
* attribute, which reverted the pick itself whenever it clashed with another dropdown.
|
|
70
|
+
*/
|
|
71
|
+
export declare function applyVariantSelection(attributes: ProductAttribute[], variants: ProductVariant[], current: Record<string, string | undefined>, attributeId: string, termId: string): Record<string, string | undefined>;
|
|
62
72
|
export declare function normalizeSelectionsToAvailableVariants(attributes: ProductAttribute[], variants: ProductVariant[], selections: Record<string, string | undefined>): {
|
|
63
73
|
[x: string]: string | undefined;
|
|
64
74
|
};
|