@loczer/storefront-sdk 0.160.0 → 0.162.0
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/chunks/booking-engine/dist/utils/{pricing-DcnUXaeI.js → pricing-CYLeWtmu.js} +6 -6
- package/dist/components/BikeProductCard/index.js +1 -1
- package/dist/components/ContactSection/index.js +2 -2
- package/dist/components/StorefrontCartPanel/index.d.ts +3 -1
- package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
- package/dist/components/StorefrontCartPanel/index.js +25 -23
- package/dist/i18n/en.js +1 -1
- package/dist/i18n/fr.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/lib/checkoutSubmit.d.ts +2 -2
- package/dist/lib/checkoutSubmit.js +1 -1
- package/dist/lib/fetchStorefrontTimeSlots.d.ts +4 -0
- package/dist/lib/fetchStorefrontTimeSlots.d.ts.map +1 -0
- package/dist/lib/fetchStorefrontTimeSlots.js +22 -0
- package/dist/lib/pricing.js +3 -3
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +98 -101
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +71 -75
- package/dist/pages/CheckoutPaymentPage.js +5 -5
- package/dist/pages/CheckoutSuccessPage.js +6 -6
- package/dist/pages/ContractSaleDocumentPage.js +1 -1
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +134 -137
- package/dist/pages/PaymentLinkPage.js +3 -3
- package/dist/pages/PaymentLinkSuccessPage.js +1 -1
- package/dist/pages/ProductPage.js +3 -3
- package/dist/pages/checkout/components/CheckoutCouponCard.d.ts +2 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.js +37 -36
- package/dist/pages/checkout/components/CheckoutDetailsCard.js +2 -2
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +21 -21
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +6 -2
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.js +26 -23
- package/dist/pages/checkout/types.d.ts +1 -1
- package/dist/pages/checkout/types.js +3 -3
- package/dist/storefront.css +1 -1
- package/dist/ui/card.js +26 -26
- package/package.json +1 -1
|
@@ -121,7 +121,7 @@ function ke() {
|
|
|
121
121
|
nt(dt);
|
|
122
122
|
};
|
|
123
123
|
if (!i)
|
|
124
|
-
return /* @__PURE__ */ t("div", { className: "mx-auto max-w-3xl px-4 py-10 sm:px-6", children: /* @__PURE__ */ s("div", { className: "rounded-
|
|
124
|
+
return /* @__PURE__ */ t("div", { className: "mx-auto max-w-3xl px-4 py-10 sm:px-6", children: /* @__PURE__ */ s("div", { className: "rounded-xl border border-slate-200 bg-white p-4 shadow-sm", children: [
|
|
125
125
|
/* @__PURE__ */ t("h1", { className: "text-xl font-semibold tracking-tight text-slate-950", children: /* @__PURE__ */ t("span", { children: e("product_not_found_title") }) }),
|
|
126
126
|
/* @__PURE__ */ t("p", { className: "mt-2 text-sm text-slate-600", children: /* @__PURE__ */ t("span", { children: e("product_not_found_description") }) }),
|
|
127
127
|
/* @__PURE__ */ t("div", { className: "mt-6", children: /* @__PURE__ */ s(b, { type: "button", className: "gap-2", onClick: q, children: [
|
|
@@ -193,11 +193,11 @@ function ke() {
|
|
|
193
193
|
] })
|
|
194
194
|
] }),
|
|
195
195
|
/* @__PURE__ */ t("div", { className: "lg:col-span-5", children: /* @__PURE__ */ s(Ot, { className: "border-slate-200 bg-white shadow-sm", children: [
|
|
196
|
-
/* @__PURE__ */ s("div", { className: "border-b border-slate-200 px-
|
|
196
|
+
/* @__PURE__ */ s("div", { className: "border-b border-slate-200 px-4 py-4", children: [
|
|
197
197
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ t("span", { children: e("add_to_cart_title") }) }),
|
|
198
198
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ t("span", { children: e("add_to_cart_description") }) })
|
|
199
199
|
] }),
|
|
200
|
-
/* @__PURE__ */ s("div", { className: "grid gap-4 px-
|
|
200
|
+
/* @__PURE__ */ s("div", { className: "grid gap-4 px-4 py-4", children: [
|
|
201
201
|
L.length > 1 ? /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
202
202
|
/* @__PURE__ */ t("p", { className: "text-xs font-medium text-slate-700", children: /* @__PURE__ */ t("span", { children: bt }) }),
|
|
203
203
|
/* @__PURE__ */ t($t, { value: u ?? "", onValueChange: P, className: "grid gap-2", children: L.map((r) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type CheckoutCouponCardProps = {
|
|
2
|
+
className?: string;
|
|
2
3
|
code: string;
|
|
3
4
|
appliedCode?: string;
|
|
4
5
|
discountLabel?: string | null;
|
|
@@ -10,6 +11,6 @@ type CheckoutCouponCardProps = {
|
|
|
10
11
|
onApply: () => void;
|
|
11
12
|
onRemove: () => void;
|
|
12
13
|
};
|
|
13
|
-
export declare function CheckoutCouponCard({ code, appliedCode, discountLabel, message, error, loading, disabled, onCodeChange, onApply, onRemove, }: CheckoutCouponCardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function CheckoutCouponCard({ className, code, appliedCode, discountLabel, message, error, loading, disabled, onCodeChange, onApply, onRemove, }: CheckoutCouponCardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=CheckoutCouponCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutCouponCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutCouponCard.tsx"],"names":[],"mappings":"AAQA,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,GACT,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"CheckoutCouponCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutCouponCard.tsx"],"names":[],"mappings":"AAQA,KAAK,uBAAuB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAI,EACJ,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,QAAQ,GACT,EAAE,uBAAuB,2CA8DzB"}
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as _ } from "@rpcbase/ui";
|
|
3
|
+
import { Tag as b, Loader2 as f, X as N } from "lucide-react";
|
|
4
|
+
import { useTranslation as v } from "react-i18next";
|
|
4
5
|
import { Button as d } from "../../../ui/button.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
code:
|
|
9
|
-
appliedCode:
|
|
10
|
-
discountLabel:
|
|
11
|
-
message:
|
|
6
|
+
import { Input as k } from "../../../ui/input.js";
|
|
7
|
+
function A({
|
|
8
|
+
className: p,
|
|
9
|
+
code: l,
|
|
10
|
+
appliedCode: o,
|
|
11
|
+
discountLabel: n,
|
|
12
|
+
message: c,
|
|
12
13
|
error: s,
|
|
13
|
-
loading:
|
|
14
|
+
loading: r,
|
|
14
15
|
disabled: i,
|
|
15
|
-
onCodeChange:
|
|
16
|
-
onApply:
|
|
16
|
+
onCodeChange: m,
|
|
17
|
+
onApply: u,
|
|
17
18
|
onRemove: h
|
|
18
19
|
}) {
|
|
19
|
-
const { t
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */ e(
|
|
23
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children:
|
|
20
|
+
const { t } = v(), x = l.trim().length > 0 && !r && !i;
|
|
21
|
+
return /* @__PURE__ */ a("div", { className: _("grid gap-3 border-t border-slate-200 pt-3", p), children: [
|
|
22
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
23
|
+
/* @__PURE__ */ e(b, { className: "h-4 w-4 text-slate-500", "aria-hidden": "true" }),
|
|
24
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: t("checkout_coupon_title") }) })
|
|
24
25
|
] }),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ a("div", { className: "grid gap-2 sm:grid-cols-[1fr_auto] lg:grid-cols-1 xl:grid-cols-[1fr_auto]", children: [
|
|
26
27
|
/* @__PURE__ */ e(
|
|
27
|
-
|
|
28
|
+
k,
|
|
28
29
|
{
|
|
29
|
-
value:
|
|
30
|
-
onChange: (
|
|
31
|
-
placeholder:
|
|
32
|
-
disabled:
|
|
33
|
-
"aria-label":
|
|
30
|
+
value: l,
|
|
31
|
+
onChange: (g) => m(g.target.value.toUpperCase()),
|
|
32
|
+
placeholder: t("checkout_coupon_placeholder"),
|
|
33
|
+
disabled: r || i,
|
|
34
|
+
"aria-label": t("checkout_coupon_label")
|
|
34
35
|
}
|
|
35
36
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ a(
|
|
37
38
|
d,
|
|
38
39
|
{
|
|
39
40
|
type: "button",
|
|
40
41
|
variant: "outline",
|
|
41
|
-
disabled: !
|
|
42
|
+
disabled: !x,
|
|
42
43
|
className: "gap-2",
|
|
43
|
-
onClick:
|
|
44
|
+
onClick: u,
|
|
44
45
|
children: [
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */ e("span", { children:
|
|
46
|
+
r ? /* @__PURE__ */ e(f, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }) : null,
|
|
47
|
+
/* @__PURE__ */ e("span", { children: t("checkout_coupon_apply") })
|
|
47
48
|
]
|
|
48
49
|
}
|
|
49
50
|
)
|
|
50
51
|
] }),
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */ e("span", { children:
|
|
52
|
+
o && n ? /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3 rounded-md border border-emerald-200 bg-emerald-50 px-3 py-2 text-sm text-emerald-800", children: [
|
|
53
|
+
/* @__PURE__ */ e("span", { children: t("checkout_coupon_applied", { code: o, amount: n }) }),
|
|
53
54
|
/* @__PURE__ */ e(
|
|
54
55
|
d,
|
|
55
56
|
{
|
|
@@ -58,15 +59,15 @@ function z({
|
|
|
58
59
|
size: "icon",
|
|
59
60
|
className: "h-7 w-7 text-emerald-800 hover:bg-emerald-100",
|
|
60
61
|
onClick: h,
|
|
61
|
-
"aria-label":
|
|
62
|
+
"aria-label": t("checkout_coupon_remove"),
|
|
62
63
|
children: /* @__PURE__ */ e(N, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
63
64
|
}
|
|
64
65
|
)
|
|
65
66
|
] }) : null,
|
|
66
|
-
|
|
67
|
+
c ? /* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: c }) }) : null,
|
|
67
68
|
s ? /* @__PURE__ */ e("p", { className: "text-xs text-red-700", children: /* @__PURE__ */ e("span", { children: s }) }) : null
|
|
68
|
-
] })
|
|
69
|
+
] });
|
|
69
70
|
}
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
A as CheckoutCouponCard
|
|
72
73
|
};
|
|
@@ -7,11 +7,11 @@ import { Textarea as _ } from "../../../ui/textarea.js";
|
|
|
7
7
|
function N({ form: c }) {
|
|
8
8
|
const { t: l } = m();
|
|
9
9
|
return /* @__PURE__ */ o(s, { className: "border-slate-200 bg-white shadow-sm", children: [
|
|
10
|
-
/* @__PURE__ */ o("div", { className: "border-b border-slate-200 px-
|
|
10
|
+
/* @__PURE__ */ o("div", { className: "border-b border-slate-200 px-4 py-4", children: [
|
|
11
11
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: l("checkout_form_title") }) }),
|
|
12
12
|
/* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: l("checkout_form_description") }) })
|
|
13
13
|
] }),
|
|
14
|
-
/* @__PURE__ */ e("div", { className: "px-
|
|
14
|
+
/* @__PURE__ */ e("div", { className: "px-4 py-4", children: /* @__PURE__ */ e(p, { ...c, children: /* @__PURE__ */ o("form", { onSubmit: (r) => r.preventDefault(), className: "grid gap-3", children: [
|
|
15
15
|
/* @__PURE__ */ e(
|
|
16
16
|
t,
|
|
17
17
|
{
|
|
@@ -7,18 +7,18 @@ function F({
|
|
|
7
7
|
estimatedTotalLabel: m,
|
|
8
8
|
couponCode: o,
|
|
9
9
|
discountAmountLabel: s,
|
|
10
|
-
totalExcludingTaxLabel:
|
|
11
|
-
vatAmountLabel:
|
|
10
|
+
totalExcludingTaxLabel: h,
|
|
11
|
+
vatAmountLabel: p,
|
|
12
12
|
vatRateLabel: u,
|
|
13
13
|
depositAmountLabel: r,
|
|
14
14
|
amountToCollectMinor: x,
|
|
15
15
|
amountToCollectLabel: _,
|
|
16
|
-
paymentSummaryHelper:
|
|
17
|
-
paymentDecisionLoading:
|
|
16
|
+
paymentSummaryHelper: n,
|
|
17
|
+
paymentDecisionLoading: c,
|
|
18
18
|
paymentDecisionError: d,
|
|
19
19
|
canChoosePaymentMethod: i,
|
|
20
|
-
showAmountDueNowRow:
|
|
21
|
-
selectedPaymentMethod:
|
|
20
|
+
showAmountDueNowRow: g,
|
|
21
|
+
selectedPaymentMethod: b,
|
|
22
22
|
submitting: N,
|
|
23
23
|
onSelectPaymentMethod: f
|
|
24
24
|
}) {
|
|
@@ -28,39 +28,39 @@ function F({
|
|
|
28
28
|
{ id: "other", label: t("checkout_payment_method_other") }
|
|
29
29
|
];
|
|
30
30
|
return /* @__PURE__ */ a(j, { className: "border-slate-200 bg-white shadow-sm", children: [
|
|
31
|
-
/* @__PURE__ */ a("div", { className: "border-b border-slate-200 px-
|
|
31
|
+
/* @__PURE__ */ a("div", { className: "border-b border-slate-200 px-4 py-4", children: [
|
|
32
32
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_totals_title") }) }),
|
|
33
33
|
i ? /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_totals_description") }) }) : null
|
|
34
34
|
] }),
|
|
35
|
-
/* @__PURE__ */ a("div", { className: "grid gap-4 px-
|
|
36
|
-
/* @__PURE__ */ a("dl", { className: "grid
|
|
37
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-[
|
|
35
|
+
/* @__PURE__ */ a("div", { className: "grid gap-4 px-4 py-4", children: [
|
|
36
|
+
/* @__PURE__ */ a("dl", { className: "grid text-sm", children: [
|
|
37
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 py-2", children: [
|
|
38
38
|
/* @__PURE__ */ e("dt", { className: "text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_estimated_total") }) }),
|
|
39
39
|
/* @__PURE__ */ e("dd", { className: "font-semibold tabular-nums text-slate-900", children: /* @__PURE__ */ e("span", { children: m }) })
|
|
40
40
|
] }),
|
|
41
|
-
s ? /* @__PURE__ */ a("div", { className: "grid grid-cols-[
|
|
41
|
+
s ? /* @__PURE__ */ a("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5", children: [
|
|
42
42
|
/* @__PURE__ */ e("dt", { className: "text-emerald-700", children: /* @__PURE__ */ e("span", { children: t("checkout_coupon_discount", { code: o ?? "" }) }) }),
|
|
43
43
|
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-emerald-700", children: /* @__PURE__ */ e("span", { children: s }) })
|
|
44
44
|
] }) : null,
|
|
45
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-[
|
|
45
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5", children: [
|
|
46
46
|
/* @__PURE__ */ e("dt", { className: "text-slate-600", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_total_excluding_tax") }) }),
|
|
47
|
-
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-slate-700", children: /* @__PURE__ */ e("span", { children:
|
|
47
|
+
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-slate-700", children: /* @__PURE__ */ e("span", { children: h }) })
|
|
48
48
|
] }),
|
|
49
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-[
|
|
49
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5", children: [
|
|
50
50
|
/* @__PURE__ */ e("dt", { className: "text-slate-600", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_vat", { rate: u }) }) }),
|
|
51
|
-
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-slate-700", children: /* @__PURE__ */ e("span", { children:
|
|
51
|
+
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-slate-700", children: /* @__PURE__ */ e("span", { children: p }) })
|
|
52
52
|
] }),
|
|
53
|
-
r ? /* @__PURE__ */ a("div", { className: "grid grid-cols-[
|
|
53
|
+
r ? /* @__PURE__ */ a("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5", children: [
|
|
54
54
|
/* @__PURE__ */ e("dt", { className: "text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_deposit_amount") }) }),
|
|
55
55
|
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-slate-900", children: /* @__PURE__ */ e("span", { children: r }) })
|
|
56
56
|
] }) : null,
|
|
57
|
-
|
|
57
|
+
g ? /* @__PURE__ */ a("div", { className: "mt-1 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-200 pt-3", children: [
|
|
58
58
|
/* @__PURE__ */ e("dt", { className: "text-sm font-semibold text-slate-900", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_amount_due_now") }) }),
|
|
59
59
|
/* @__PURE__ */ e("dd", { className: `text-base font-bold tabular-nums tracking-tight ${x > 0 ? "text-slate-950" : "text-slate-800"}`, children: /* @__PURE__ */ e("span", { children: _ }) })
|
|
60
60
|
] }) : null
|
|
61
61
|
] }),
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
n ? /* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: n }) }) : null,
|
|
63
|
+
c ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-sm text-slate-600", children: [
|
|
64
64
|
/* @__PURE__ */ e(k, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }),
|
|
65
65
|
/* @__PURE__ */ e("span", { children: t("checkout_payment_loading") })
|
|
66
66
|
] }) : null,
|
|
@@ -68,11 +68,11 @@ function F({
|
|
|
68
68
|
/* @__PURE__ */ e(v, { className: "mt-0.5 h-4 w-4", "aria-hidden": "true" }),
|
|
69
69
|
/* @__PURE__ */ e("span", { children: d })
|
|
70
70
|
] }) }) : null,
|
|
71
|
-
!
|
|
71
|
+
!c && !d && i ? /* @__PURE__ */ e("div", { className: "grid gap-2 sm:grid-cols-3", children: y.map((l) => /* @__PURE__ */ e(
|
|
72
72
|
C,
|
|
73
73
|
{
|
|
74
74
|
type: "button",
|
|
75
|
-
variant:
|
|
75
|
+
variant: b === l.id ? "default" : "outline",
|
|
76
76
|
disabled: N,
|
|
77
77
|
className: "h-9 rounded-full px-4 text-xs",
|
|
78
78
|
onClick: () => {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { StorefrontCartPanel } from '../../../components/StorefrontCartPanel';
|
|
3
|
+
import { CheckoutCouponCard } from './CheckoutCouponCard';
|
|
3
4
|
type StorefrontCartPanelProps = ComponentProps<typeof StorefrontCartPanel>;
|
|
4
|
-
type
|
|
5
|
-
|
|
5
|
+
type CheckoutCouponCardProps = ComponentProps<typeof CheckoutCouponCard>;
|
|
6
|
+
type CheckoutSummaryColumnProps = Pick<StorefrontCartPanelProps, "lines" | "itemCount" | "totalPerDayMinor" | "estimatedDays" | "estimatedTotalMinor" | "discountedEstimatedTotalMinor" | "discountAmountMinor" | "lateReturnSurchargeMinor" | "couponCode" | "durationLabel" | "onQuantityChange" | "onRemove"> & {
|
|
7
|
+
coupon?: CheckoutCouponCardProps;
|
|
8
|
+
};
|
|
9
|
+
export declare function CheckoutSummaryColumn({ lines, itemCount, totalPerDayMinor, estimatedDays, estimatedTotalMinor, discountedEstimatedTotalMinor, discountAmountMinor, lateReturnSurchargeMinor, couponCode, durationLabel, coupon, onQuantityChange, onRemove, }: CheckoutSummaryColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
6
10
|
export {};
|
|
7
11
|
//# sourceMappingURL=CheckoutSummaryColumn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutSummaryColumn.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutSummaryColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;
|
|
1
|
+
{"version":3,"file":"CheckoutSummaryColumn.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutSummaryColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAGzD,KAAK,wBAAwB,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC1E,KAAK,uBAAuB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAExE,KAAK,0BAA0B,GAAG,IAAI,CACpC,wBAAwB,EACtB,OAAO,GACP,WAAW,GACX,kBAAkB,GAClB,eAAe,GACf,qBAAqB,GACrB,+BAA+B,GAC/B,qBAAqB,GACrB,0BAA0B,GAC1B,YAAY,GACZ,eAAe,GACf,kBAAkB,GAClB,UAAU,CACb,GAAG;IACF,MAAM,CAAC,EAAE,uBAAuB,CAAA;CACjC,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,QAAQ,GACT,EAAE,0BAA0B,2CA0B5B"}
|
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as f } from "react-i18next";
|
|
3
3
|
import { StorefrontCartPanel as h } from "../../../components/StorefrontCartPanel/index.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { CheckoutCouponCard as k } from "./CheckoutCouponCard.js";
|
|
5
|
+
function N({
|
|
6
|
+
lines: e,
|
|
7
|
+
itemCount: m,
|
|
7
8
|
totalPerDayMinor: i,
|
|
8
|
-
estimatedDays:
|
|
9
|
+
estimatedDays: a,
|
|
9
10
|
estimatedTotalMinor: s,
|
|
10
|
-
discountedEstimatedTotalMinor:
|
|
11
|
+
discountedEstimatedTotalMinor: n,
|
|
11
12
|
discountAmountMinor: c,
|
|
12
|
-
lateReturnSurchargeMinor:
|
|
13
|
+
lateReturnSurchargeMinor: u,
|
|
13
14
|
couponCode: l,
|
|
14
|
-
durationLabel:
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
durationLabel: p,
|
|
16
|
+
coupon: o,
|
|
17
|
+
onQuantityChange: d,
|
|
18
|
+
onRemove: C
|
|
17
19
|
}) {
|
|
18
|
-
const { t } = f();
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
+
const { t: r } = f();
|
|
21
|
+
return /* @__PURE__ */ t("div", { className: "lg:col-span-5", children: /* @__PURE__ */ t(
|
|
20
22
|
h,
|
|
21
23
|
{
|
|
22
|
-
lines:
|
|
23
|
-
itemCount:
|
|
24
|
+
lines: e,
|
|
25
|
+
itemCount: m,
|
|
24
26
|
totalPerDayMinor: i,
|
|
25
|
-
estimatedDays:
|
|
27
|
+
estimatedDays: a,
|
|
26
28
|
estimatedTotalMinor: s,
|
|
27
|
-
discountedEstimatedTotalMinor:
|
|
29
|
+
discountedEstimatedTotalMinor: n,
|
|
28
30
|
discountAmountMinor: c,
|
|
29
|
-
lateReturnSurchargeMinor:
|
|
31
|
+
lateReturnSurchargeMinor: u,
|
|
30
32
|
couponCode: l,
|
|
31
|
-
durationLabel:
|
|
32
|
-
title:
|
|
33
|
-
description:
|
|
33
|
+
durationLabel: p,
|
|
34
|
+
title: r("checkout_summary_title"),
|
|
35
|
+
description: r("checkout_summary_description"),
|
|
34
36
|
editable: !0,
|
|
37
|
+
summaryAddon: o ? /* @__PURE__ */ t(k, { ...o }) : void 0,
|
|
35
38
|
stickyTopClassName: "top-32",
|
|
36
|
-
onQuantityChange:
|
|
37
|
-
onRemove:
|
|
39
|
+
onQuantityChange: d,
|
|
40
|
+
onRemove: C
|
|
38
41
|
}
|
|
39
42
|
) });
|
|
40
43
|
}
|
|
41
44
|
export {
|
|
42
|
-
|
|
45
|
+
N as CheckoutSummaryColumn
|
|
43
46
|
};
|
|
@@ -4,7 +4,7 @@ import { ResponsePayload as CheckoutPaymentDecisionResponse } from '../../lib/ch
|
|
|
4
4
|
export declare const checkoutFormSchema: z.ZodObject<{
|
|
5
5
|
full_name: z.ZodString;
|
|
6
6
|
email: z.ZodString;
|
|
7
|
-
phone: z.
|
|
7
|
+
phone: z.ZodString;
|
|
8
8
|
notes: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
export type CheckoutFormValues = z.infer<typeof checkoutFormSchema>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
const
|
|
2
|
+
const m = t.object({
|
|
3
3
|
full_name: t.string().trim().min(2),
|
|
4
4
|
email: t.string().trim().email(),
|
|
5
|
-
phone: t.string().trim().min(6)
|
|
5
|
+
phone: t.string().trim().min(6),
|
|
6
6
|
notes: t.string().trim().max(2e3).optional().or(t.literal(""))
|
|
7
7
|
});
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
m as checkoutFormSchema
|
|
10
10
|
};
|