@loczer/storefront-sdk 0.161.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/pricing.js +3 -3
- package/dist/pages/BookingPage.js +1 -1
- 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.js +7 -7
- 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
|
@@ -131,7 +131,7 @@ function Be() {
|
|
|
131
131
|
};
|
|
132
132
|
}, [r?.clientSecret]);
|
|
133
133
|
if (!m)
|
|
134
|
-
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-red-200 bg-white p-
|
|
134
|
+
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-red-200 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
135
135
|
/* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
136
136
|
/* @__PURE__ */ e(K, { className: "mt-0.5 h-5 w-5 text-red-600", "aria-hidden": "true" }),
|
|
137
137
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_missing_session") }) })
|
|
@@ -139,9 +139,9 @@ function Be() {
|
|
|
139
139
|
/* @__PURE__ */ e(b, { to: v, children: /* @__PURE__ */ e(f, { variant: "outline", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_back_to_checkout") }) }) })
|
|
140
140
|
] }) }) });
|
|
141
141
|
if (h && !r)
|
|
142
|
-
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-
|
|
142
|
+
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ e(q, {}) }) });
|
|
143
143
|
if (A || !r)
|
|
144
|
-
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-red-200 bg-white p-
|
|
144
|
+
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(y, { className: "border-red-200 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
145
145
|
/* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
146
146
|
/* @__PURE__ */ e(K, { className: "mt-0.5 h-5 w-5 text-red-600", "aria-hidden": "true" }),
|
|
147
147
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-700", children: /* @__PURE__ */ e("span", { children: A ?? t("checkout_payment_return_status_error") }) })
|
|
@@ -150,7 +150,7 @@ function Be() {
|
|
|
150
150
|
] }) }) });
|
|
151
151
|
const F = typeof r.amountMinor == "number" && r.currency ? xe(r.amountMinor, r.currency, i.language) : null, w = o === "authorized" || o === "succeeded", L = o === "failed" || o === "cancelled", H = w ? se : L ? ne : ae, X = w ? "text-emerald-600" : L ? "text-red-600" : "text-amber-600";
|
|
152
152
|
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-5xl px-4 py-10 sm:px-6", children: /* @__PURE__ */ n("div", { className: "grid gap-6 lg:grid-cols-[1fr_1fr]", children: [
|
|
153
|
-
/* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-
|
|
153
|
+
/* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-5", children: [
|
|
154
154
|
/* @__PURE__ */ n("div", { className: "inline-flex items-center gap-2 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-xs font-medium text-emerald-700", children: [
|
|
155
155
|
/* @__PURE__ */ e(re, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
156
156
|
/* @__PURE__ */ e("span", { children: t("secure_payment_link.secured_badge") })
|
|
@@ -174,7 +174,7 @@ function Be() {
|
|
|
174
174
|
/* @__PURE__ */ e("span", { children: t("checkout_payment_return_loading") })
|
|
175
175
|
] }) : null
|
|
176
176
|
] }) }),
|
|
177
|
-
/* @__PURE__ */ n(y, { className: "border-slate-200 bg-white p-
|
|
177
|
+
/* @__PURE__ */ n(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: [
|
|
178
178
|
w || L ? /* @__PURE__ */ n("div", { className: "space-y-6 text-center", children: [
|
|
179
179
|
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(H, { className: `h-6 w-6 ${X}`, "aria-hidden": "true" }) }),
|
|
180
180
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
@@ -5,15 +5,15 @@ import { useTranslation as x } from "react-i18next";
|
|
|
5
5
|
import { resolveBookingSearchParamsFromSessionStorage as p } from "../lib/booking.js";
|
|
6
6
|
import { Button as o } from "../ui/button.js";
|
|
7
7
|
function b() {
|
|
8
|
-
const { t } = x(), { storeSlug: r } = m(), [l] = h(),
|
|
9
|
-
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ c("div", { className: "rounded-
|
|
8
|
+
const { t: s } = x(), { storeSlug: r } = m(), [l] = h(), t = p(l, r).toString(), i = `/${r ?? ""}/booking${t ? `?${t}` : ""}`, n = `/${r ?? ""}${t ? `?${t}` : ""}`;
|
|
9
|
+
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-slate-200 bg-white p-5 shadow-sm sm:p-6", children: [
|
|
10
10
|
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-600", children: /* @__PURE__ */ e(d, { className: "h-6 w-6", "aria-hidden": "true" }) }),
|
|
11
|
-
/* @__PURE__ */ e("h1", { className: "mt-6 text-center text-2xl font-semibold tracking-tight text-slate-950", children: /* @__PURE__ */ e("span", { children:
|
|
12
|
-
/* @__PURE__ */ e("p", { className: "mt-2 text-center text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children:
|
|
11
|
+
/* @__PURE__ */ e("h1", { className: "mt-6 text-center text-2xl font-semibold tracking-tight text-slate-950", children: /* @__PURE__ */ e("span", { children: s("checkout_success_title") }) }),
|
|
12
|
+
/* @__PURE__ */ e("p", { className: "mt-2 text-center text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: s("checkout_success_description") }) }),
|
|
13
13
|
/* @__PURE__ */ c("div", { className: "mt-8 flex flex-col gap-3 sm:flex-row sm:justify-center", children: [
|
|
14
|
-
/* @__PURE__ */ e(a, { to: i, children: /* @__PURE__ */ e(o, { variant: "outline", className: "w-full sm:w-auto", children: /* @__PURE__ */ e("span", { children:
|
|
14
|
+
/* @__PURE__ */ e(a, { to: i, children: /* @__PURE__ */ e(o, { variant: "outline", className: "w-full sm:w-auto", children: /* @__PURE__ */ e("span", { children: s("checkout_success_back_to_products") }) }) }),
|
|
15
15
|
/* @__PURE__ */ e(a, { to: n, children: /* @__PURE__ */ c(o, { className: "w-full gap-2 sm:w-auto", children: [
|
|
16
|
-
/* @__PURE__ */ e("span", { children:
|
|
16
|
+
/* @__PURE__ */ e("span", { children: s("checkout_success_back_home") }),
|
|
17
17
|
/* @__PURE__ */ e(u, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
18
18
|
] }) })
|
|
19
19
|
] })
|
|
@@ -205,7 +205,7 @@ function Ce() {
|
|
|
205
205
|
s(`${a.pathname}${m ? `?${m}` : ""}${a.hash || ""}`, { replace: !0 });
|
|
206
206
|
};
|
|
207
207
|
if (!w)
|
|
208
|
-
return /* @__PURE__ */ t("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ t(ae, { className: "border-slate-200 bg-white p-
|
|
208
|
+
return /* @__PURE__ */ t("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ t(ae, { className: "border-slate-200 bg-white p-5 shadow-sm sm:p-6", children: /* @__PURE__ */ g("div", { className: "space-y-4", children: [
|
|
209
209
|
/* @__PURE__ */ t("h1", { className: "text-lg font-semibold text-slate-950", children: /* @__PURE__ */ t("span", { children: e("docs_contract_sale_not_found_title") }) }),
|
|
210
210
|
/* @__PURE__ */ t("p", { className: "text-sm text-red-600", children: /* @__PURE__ */ t("span", { children: y ?? e("docs_contract_sale_load_error") }) }),
|
|
211
211
|
/* @__PURE__ */ t(I, { to: `/${c ?? ""}`, children: /* @__PURE__ */ g(P, { className: "gap-2", children: [
|
package/dist/pages/HomePage.js
CHANGED
|
@@ -147,7 +147,7 @@ function sa() {
|
|
|
147
147
|
] }),
|
|
148
148
|
/* @__PURE__ */ e("h1", { className: "mt-4 text-3xl font-semibold tracking-tight sm:text-4xl", children: /* @__PURE__ */ e("span", { children: a("hero_title", { fallback: x.hero_title }) }) }),
|
|
149
149
|
/* @__PURE__ */ e("p", { className: "mt-3 text-sm text-slate-700 sm:text-base", children: /* @__PURE__ */ e("span", { children: a("hero_description", { fallback: x.hero_description }) }) }),
|
|
150
|
-
/* @__PURE__ */ e("div", { className: m("mt-6", !_ && "rounded-xl border bg-white/70 p-
|
|
150
|
+
/* @__PURE__ */ e("div", { className: m("mt-6", !_ && "rounded-xl border bg-white/70 p-3"), children: /* @__PURE__ */ r("ul", { className: m("space-y-3", _ && "space-y-2"), children: [
|
|
151
151
|
!_ && /* @__PURE__ */ r("li", { className: "flex items-start gap-3", children: [
|
|
152
152
|
/* @__PURE__ */ e(Ke, { className: "mt-0.5 h-5 w-5 text-slate-900", "aria-hidden": "true" }),
|
|
153
153
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
@@ -205,11 +205,11 @@ function sa() {
|
|
|
205
205
|
testIdPrefix: t
|
|
206
206
|
}
|
|
207
207
|
) : null, Me = ae("storefront-home-fulfillment-delivery-address"), Re = ae("storefront-home-compact-fulfillment-delivery-address"), Te = /* @__PURE__ */ r(me, { className: "border-slate-200 bg-white/80 shadow-sm", children: [
|
|
208
|
-
/* @__PURE__ */ r("div", { className: "border-b border-slate-200 px-
|
|
208
|
+
/* @__PURE__ */ r("div", { className: "border-b border-slate-200 px-4 py-4", children: [
|
|
209
209
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: a("booking_title") }) }),
|
|
210
210
|
/* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("booking_subtitle") }) })
|
|
211
211
|
] }),
|
|
212
|
-
/* @__PURE__ */ r("div", { className: "grid gap-4 px-
|
|
212
|
+
/* @__PURE__ */ r("div", { className: "grid gap-4 px-4 py-4", children: [
|
|
213
213
|
/* @__PURE__ */ e(
|
|
214
214
|
pe,
|
|
215
215
|
{
|
|
@@ -236,7 +236,7 @@ function sa() {
|
|
|
236
236
|
/* @__PURE__ */ e(j, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
237
237
|
] })
|
|
238
238
|
] })
|
|
239
|
-
] }), re = /* @__PURE__ */ e(me, { className: "border-slate-200 bg-white/95 shadow-xl", children: /* @__PURE__ */ r("div", { className: "grid gap-3
|
|
239
|
+
] }), re = /* @__PURE__ */ e(me, { className: "border-slate-200 bg-white/95 shadow-xl", children: /* @__PURE__ */ r("div", { className: "grid gap-3 p-4", children: [
|
|
240
240
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
241
241
|
pe,
|
|
242
242
|
{
|
|
@@ -413,14 +413,14 @@ function sa() {
|
|
|
413
413
|
return /* @__PURE__ */ r(
|
|
414
414
|
"div",
|
|
415
415
|
{
|
|
416
|
-
className: "group flex h-full flex-col gap-
|
|
416
|
+
className: "group flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 text-left shadow-sm transition hover:border-slate-400",
|
|
417
417
|
children: [
|
|
418
418
|
/* @__PURE__ */ r(
|
|
419
419
|
le,
|
|
420
420
|
{
|
|
421
421
|
to: X(s),
|
|
422
422
|
state: Z,
|
|
423
|
-
className: "flex flex-1 flex-col gap-
|
|
423
|
+
className: "flex flex-1 flex-col gap-2",
|
|
424
424
|
children: [
|
|
425
425
|
/* @__PURE__ */ e(
|
|
426
426
|
"span",
|
|
@@ -471,7 +471,7 @@ function sa() {
|
|
|
471
471
|
] }) }),
|
|
472
472
|
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: Y.slice(0, 4).map((t) => {
|
|
473
473
|
const l = A(t.name, i.language, o), s = A(t.description, i.language, o), k = A(t.warning, i.language, o), y = typeof t.images?.[0] == "string" ? t.images[0].trim() : "", g = he(t.primaryImageStyle);
|
|
474
|
-
return /* @__PURE__ */ r("div", { className: "flex h-full flex-col gap-
|
|
474
|
+
return /* @__PURE__ */ r("div", { className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm", children: [
|
|
475
475
|
/* @__PURE__ */ e(
|
|
476
476
|
"div",
|
|
477
477
|
{
|
|
@@ -179,7 +179,7 @@ function we() {
|
|
|
179
179
|
clientSecret: m.clientSecret
|
|
180
180
|
};
|
|
181
181
|
}, [m?.clientSecret]), O = s ? oe(s.amountMinor, s.currency, o.language) : "—";
|
|
182
|
-
return N || !s ? /* @__PURE__ */ e("div", { className: "mx-auto max-w-4xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(x, { className: "border-red-200 bg-white p-
|
|
182
|
+
return N || !s ? /* @__PURE__ */ e("div", { className: "mx-auto max-w-4xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(x, { className: "border-red-200 bg-white p-5 sm:p-6 shadow-sm", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-3", children: [
|
|
183
183
|
/* @__PURE__ */ e(Q, { className: "mt-0.5 h-5 w-5 text-red-600", "aria-hidden": "true" }),
|
|
184
184
|
/* @__PURE__ */ c("div", { className: "space-y-3", children: [
|
|
185
185
|
/* @__PURE__ */ e("h1", { className: "text-xl font-semibold tracking-tight text-slate-950", children: /* @__PURE__ */ e("span", { children: r("secure_payment_link.errors.title") }) }),
|
|
@@ -187,7 +187,7 @@ function we() {
|
|
|
187
187
|
/* @__PURE__ */ e(q, { to: `/${n ?? ""}`, children: /* @__PURE__ */ e(ie, { variant: "outline", children: /* @__PURE__ */ e("span", { children: r("secure_payment_link.back_to_store") }) }) })
|
|
188
188
|
] })
|
|
189
189
|
] }) }) }) : /* @__PURE__ */ e("div", { className: "mx-auto max-w-5xl px-4 py-10 sm:px-6", children: /* @__PURE__ */ c("div", { className: "grid gap-6 lg:grid-cols-[1fr_1fr]", children: [
|
|
190
|
-
/* @__PURE__ */ e(x, { className: "border-slate-200 bg-white p-
|
|
190
|
+
/* @__PURE__ */ e(x, { className: "border-slate-200 bg-white p-5 shadow-sm", children: /* @__PURE__ */ c("div", { className: "space-y-5", children: [
|
|
191
191
|
/* @__PURE__ */ c("div", { className: "inline-flex items-center gap-2 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-xs font-medium text-emerald-700", children: [
|
|
192
192
|
/* @__PURE__ */ e(V, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
193
193
|
/* @__PURE__ */ e("span", { children: r("secure_payment_link.secured_badge") })
|
|
@@ -211,7 +211,7 @@ function we() {
|
|
|
211
211
|
] })
|
|
212
212
|
] })
|
|
213
213
|
] }) }),
|
|
214
|
-
/* @__PURE__ */ e(x, { className: "border-slate-200 bg-white p-
|
|
214
|
+
/* @__PURE__ */ e(x, { className: "border-slate-200 bg-white p-5 shadow-sm", children: s.providerType === "mollie_connect_oauth" ? /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
215
215
|
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: r("secure_payment_link.mollie.form_title") }) }),
|
|
216
216
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: r("secure_payment_link.mollie.form_description") }) }),
|
|
217
217
|
F ? /* @__PURE__ */ e(A, {}) : E ? /* @__PURE__ */ e("p", { className: "text-sm text-red-600", children: /* @__PURE__ */ e("span", { children: E }) }) : y?.profileId ? /* @__PURE__ */ e(
|
|
@@ -106,7 +106,7 @@ function J() {
|
|
|
106
106
|
return () => {
|
|
107
107
|
window.clearTimeout(o);
|
|
108
108
|
};
|
|
109
|
-
}, [p, _, t, n]), /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(j, { className: "border-slate-200 bg-white p-
|
|
109
|
+
}, [p, _, t, n]), /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ e(j, { className: "border-slate-200 bg-white p-5 shadow-sm sm:p-6", children: _ && !t ? /* @__PURE__ */ i("div", { className: "flex items-center gap-2 text-sm text-slate-600", children: [
|
|
110
110
|
/* @__PURE__ */ e(w, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }),
|
|
111
111
|
/* @__PURE__ */ e("span", { children: s("secure_payment_link.loading") })
|
|
112
112
|
] }) : p || !t ? /* @__PURE__ */ e("p", { className: "text-sm text-red-600", children: /* @__PURE__ */ e("span", { children: p ?? s("secure_payment_link.errors.invalid_link") }) }) : n === "pending" ? /* @__PURE__ */ i("div", { className: "space-y-4 text-center", children: [
|
|
@@ -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
|
};
|