@loczer/storefront-sdk 0.177.0 → 0.179.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/ui/dist/Map/{MapContent-BqCzk6pD.js → MapContent-DUHBHUBa.js} +7 -7
- package/dist/chunks/ui/dist/Map/constants-DlJEohkl.js +4 -0
- package/dist/chunks/ui/dist/{Map-Cqn7INdm.js → Map-_kbTiMe4.js} +7 -7
- package/dist/chunks/ui/dist/Spinner/index-SbbUxcsT.js +48 -0
- package/dist/components/BookingBikeVariantDialog/index.js +12 -12
- package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/Invoice.js +10 -10
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +57 -57
- package/dist/components/Map/index.js +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +11 -11
- package/dist/components/StorefrontCartPanel/index.js +7 -7
- package/dist/components/TestimonialsSection/index.d.ts.map +1 -1
- package/dist/components/TestimonialsSection/index.js +108 -117
- package/dist/components/payment/MollieCardFieldsForm.d.ts.map +1 -1
- package/dist/components/payment/MollieCardFieldsForm.js +16 -15
- package/dist/components/payment/StripeCardFieldsForm.d.ts.map +1 -1
- package/dist/components/payment/StripeCardFieldsForm.js +11 -10
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +2 -0
- package/dist/i18n/fr.d.ts +2 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +2 -0
- package/dist/index.d.ts +9 -0
- package/dist/lib/contractSaleDocument.d.ts +2 -0
- package/dist/lib/contractSaleDocument.d.ts.map +1 -1
- package/dist/lib/contractSaleDocument.js +1 -1
- package/dist/lib/contractSaleDocumentApi.d.ts +3 -0
- package/dist/lib/contractSaleDocumentApi.d.ts.map +1 -1
- package/dist/lib/nameInitials.d.ts +3 -0
- package/dist/lib/nameInitials.d.ts.map +1 -0
- package/dist/lib/nameInitials.js +19 -0
- package/dist/pages/CheckoutPaymentPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPaymentPage.js +42 -41
- package/dist/pages/CheckoutSuccessPage.js +11 -11
- package/dist/pages/ContractSaleDocumentPage.d.ts +1 -1
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +29 -28
- package/dist/pages/HomePage.js +36 -36
- package/dist/pages/PaymentLinkPage.d.ts.map +1 -1
- package/dist/pages/PaymentLinkPage.js +44 -43
- package/dist/pages/PaymentLinkSuccessPage.d.ts.map +1 -1
- package/dist/pages/PaymentLinkSuccessPage.js +15 -14
- package/dist/pages/ProductPage.js +1 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.js +36 -35
- package/dist/pages/checkout/components/CheckoutPaymentCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +10 -9
- package/dist/storefront.css +1 -1
- package/package.json +3 -2
- package/dist/chunks/ui/dist/Map/constants-AiBwXZf6.js +0 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { useState as h, useRef as
|
|
2
|
+
import { useState as h, useRef as L, useEffect as y } from "react";
|
|
3
3
|
import { useLoaderData as C, Link as M } from "@rpcbase/router";
|
|
4
|
-
import {
|
|
4
|
+
import { Spinner as S } from "../chunks/ui/dist/Spinner/index-SbbUxcsT.js";
|
|
5
|
+
import { CheckCircle2 as K, XCircle as R, CircleDashed as T } from "lucide-react";
|
|
5
6
|
import { useTranslation as D } from "react-i18next";
|
|
6
|
-
import { apiGet as
|
|
7
|
+
import { apiGet as w } from "../lib/apiCall.js";
|
|
7
8
|
import { GET_SECURE_PAYMENT_LINK_ROUTE as v, getSecurePaymentLinkResponseSchema as b } from "../lib/securePaymentLink.js";
|
|
8
9
|
import { Button as $ } from "../ui/button.js";
|
|
9
10
|
import { Card as j } from "../ui/card.js";
|
|
@@ -16,7 +17,7 @@ const I = (s, l, r) => {
|
|
|
16
17
|
} catch {
|
|
17
18
|
return `${(s / 100).toFixed(2)} ${l.toUpperCase()}`;
|
|
18
19
|
}
|
|
19
|
-
},
|
|
20
|
+
}, E = 2500, P = E * 3, J = (async ({ ctx: s, params: l }) => {
|
|
20
21
|
const r = typeof l.storeSlug == "string" ? l.storeSlug.trim().toLowerCase() : "", a = typeof l.token == "string" ? l.token.trim() : "";
|
|
21
22
|
if (!r || !a)
|
|
22
23
|
return {
|
|
@@ -27,7 +28,7 @@ const I = (s, l, r) => {
|
|
|
27
28
|
errorKey: "invalid_link"
|
|
28
29
|
};
|
|
29
30
|
try {
|
|
30
|
-
const c = await
|
|
31
|
+
const c = await w(
|
|
31
32
|
v,
|
|
32
33
|
{
|
|
33
34
|
storeSlug: r,
|
|
@@ -58,10 +59,10 @@ const I = (s, l, r) => {
|
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
});
|
|
61
|
-
function
|
|
62
|
+
function Q() {
|
|
62
63
|
const { t: s, i18n: l } = D(), r = C(), { storeSlug: a, token: c } = r, [t, x] = h(r.session), [_, u] = h(!1), [p, d] = h(
|
|
63
64
|
r.errorMessage ?? (r.errorKey ? s(`secure_payment_link.errors.${r.errorKey}`) : null)
|
|
64
|
-
), [g, N] = h(0), k =
|
|
65
|
+
), [g, N] = h(0), k = L(Date.now());
|
|
65
66
|
y(() => {
|
|
66
67
|
x(r.session), u(!1), d(
|
|
67
68
|
r.errorMessage ?? (r.errorKey ? s(`secure_payment_link.errors.${r.errorKey}`) : null)
|
|
@@ -76,7 +77,7 @@ function J() {
|
|
|
76
77
|
return (async () => {
|
|
77
78
|
u(!0), d(null);
|
|
78
79
|
try {
|
|
79
|
-
const m = await
|
|
80
|
+
const m = await w(v, {
|
|
80
81
|
storeSlug: a,
|
|
81
82
|
token: c,
|
|
82
83
|
reconcileStripeStatus: Date.now() - k.current >= P ? "true" : void 0
|
|
@@ -102,21 +103,21 @@ function J() {
|
|
|
102
103
|
if (!t || p || _ || n !== "pending") return;
|
|
103
104
|
const o = window.setTimeout(() => {
|
|
104
105
|
N((m) => m + 1);
|
|
105
|
-
},
|
|
106
|
+
}, E);
|
|
106
107
|
return () => {
|
|
107
108
|
window.clearTimeout(o);
|
|
108
109
|
};
|
|
109
110
|
}, [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
|
-
/* @__PURE__ */ e(
|
|
111
|
+
/* @__PURE__ */ e(S, { className: "size-4", "aria-hidden": "true" }),
|
|
111
112
|
/* @__PURE__ */ e("span", { children: s("secure_payment_link.loading") })
|
|
112
113
|
] }) : p || !t ? /* @__PURE__ */ e("p", { className: "text-sm text-destructive", 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: [
|
|
113
|
-
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(
|
|
114
|
+
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(S, { className: "size-6 text-slate-600", "aria-hidden": "true" }) }),
|
|
114
115
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
115
116
|
/* @__PURE__ */ e("h1", { className: "text-2xl font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: s("secure_payment_link.confirmation_loading_title") }) }),
|
|
116
117
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: s("secure_payment_link.confirmation_loading_description") }) })
|
|
117
118
|
] })
|
|
118
119
|
] }) : /* @__PURE__ */ i("div", { className: "space-y-6 text-center", children: [
|
|
119
|
-
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(n === "succeeded" || n === "authorized" ? K : n === "failed" || n === "cancelled" ? R : T, { className: `h-6 w-6 ${n === "succeeded" || n === "authorized" ? "text-
|
|
120
|
+
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(n === "succeeded" || n === "authorized" ? K : n === "failed" || n === "cancelled" ? R : T, { className: `h-6 w-6 ${n === "succeeded" || n === "authorized" ? "text-success" : n === "failed" || n === "cancelled" ? "text-destructive" : "text-warning"}`, "aria-hidden": "true" }) }),
|
|
120
121
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
121
122
|
/* @__PURE__ */ e("h1", { className: "text-2xl font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: s(`secure_payment_link.success_titles.${n}`) }) }),
|
|
122
123
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: s(`secure_payment_link.statuses.${n}`) }) })
|
|
@@ -135,6 +136,6 @@ function J() {
|
|
|
135
136
|
] }) }) });
|
|
136
137
|
}
|
|
137
138
|
export {
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
Q as default,
|
|
140
|
+
J as loader
|
|
140
141
|
};
|
|
@@ -185,7 +185,7 @@ function ka() {
|
|
|
185
185
|
i.features?.length ? /* @__PURE__ */ r("div", { className: "mt-2 space-y-2", children: [
|
|
186
186
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ t("span", { children: a("product_features_title") }) }),
|
|
187
187
|
/* @__PURE__ */ t("ul", { className: "grid gap-1 text-sm text-slate-700", children: i.features.map((n, c) => /* @__PURE__ */ r("li", { className: "inline-flex items-start gap-2", children: [
|
|
188
|
-
/* @__PURE__ */ t(Pt, { className: "mt-0.5 h-4 w-4 text-
|
|
188
|
+
/* @__PURE__ */ t(Pt, { className: "mt-0.5 h-4 w-4 text-success", "aria-hidden": "true" }),
|
|
189
189
|
/* @__PURE__ */ t("span", { children: I(n, s.language, y) })
|
|
190
190
|
] }, `${i.id}-${c}`)) })
|
|
191
191
|
] }) : null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutCouponCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutCouponCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckoutCouponCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutCouponCard.tsx"],"names":[],"mappings":"AASA,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,73 +1,74 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as g } from "@rpcbase/ui";
|
|
3
|
+
import { Spinner as f } from "../../../chunks/ui/dist/Spinner/index-SbbUxcsT.js";
|
|
4
|
+
import { Tag as _, X as v } from "lucide-react";
|
|
5
|
+
import { useTranslation as N } from "react-i18next";
|
|
6
|
+
import { Button as p } from "../../../ui/button.js";
|
|
6
7
|
import { Input as k } from "../../../ui/input.js";
|
|
7
|
-
function
|
|
8
|
-
className:
|
|
9
|
-
code:
|
|
10
|
-
appliedCode:
|
|
11
|
-
discountLabel:
|
|
12
|
-
message:
|
|
13
|
-
error:
|
|
14
|
-
loading:
|
|
8
|
+
function B({
|
|
9
|
+
className: u,
|
|
10
|
+
code: r,
|
|
11
|
+
appliedCode: a,
|
|
12
|
+
discountLabel: l,
|
|
13
|
+
message: o,
|
|
14
|
+
error: n,
|
|
15
|
+
loading: c,
|
|
15
16
|
disabled: i,
|
|
16
|
-
onCodeChange:
|
|
17
|
-
onApply:
|
|
17
|
+
onCodeChange: d,
|
|
18
|
+
onApply: m,
|
|
18
19
|
onRemove: h
|
|
19
20
|
}) {
|
|
20
|
-
const { t } =
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ e(
|
|
21
|
+
const { t } = N(), x = r.trim().length > 0 && !c && !i;
|
|
22
|
+
return /* @__PURE__ */ s("div", { className: g("grid gap-3 border-t border-slate-200 pt-3", u), children: [
|
|
23
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ e(_, { className: "h-4 w-4 text-slate-500", "aria-hidden": "true" }),
|
|
24
25
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: t("checkout_coupon_title") }) })
|
|
25
26
|
] }),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ s("div", { className: "grid gap-2 sm:grid-cols-[1fr_auto] lg:grid-cols-1 xl:grid-cols-[1fr_auto]", children: [
|
|
27
28
|
/* @__PURE__ */ e(
|
|
28
29
|
k,
|
|
29
30
|
{
|
|
30
|
-
value:
|
|
31
|
-
onChange: (
|
|
31
|
+
value: r,
|
|
32
|
+
onChange: (b) => d(b.target.value.toUpperCase()),
|
|
32
33
|
placeholder: t("checkout_coupon_placeholder"),
|
|
33
|
-
disabled:
|
|
34
|
+
disabled: c || i,
|
|
34
35
|
"aria-label": t("checkout_coupon_label")
|
|
35
36
|
}
|
|
36
37
|
),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
38
|
+
/* @__PURE__ */ s(
|
|
39
|
+
p,
|
|
39
40
|
{
|
|
40
41
|
type: "button",
|
|
41
42
|
variant: "outline",
|
|
42
43
|
disabled: !x,
|
|
43
44
|
className: "gap-2",
|
|
44
|
-
onClick:
|
|
45
|
+
onClick: m,
|
|
45
46
|
children: [
|
|
46
|
-
|
|
47
|
+
c ? /* @__PURE__ */ e(f, { className: "size-4", "aria-hidden": "true" }) : null,
|
|
47
48
|
/* @__PURE__ */ e("span", { children: t("checkout_coupon_apply") })
|
|
48
49
|
]
|
|
49
50
|
}
|
|
50
51
|
)
|
|
51
52
|
] }),
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */ e("span", { children: t("checkout_coupon_applied", { code:
|
|
53
|
+
a && l ? /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3 rounded-md border border-success-border bg-success-subtle px-3 py-2 text-sm text-success", children: [
|
|
54
|
+
/* @__PURE__ */ e("span", { children: t("checkout_coupon_applied", { code: a, amount: l }) }),
|
|
54
55
|
/* @__PURE__ */ e(
|
|
55
|
-
|
|
56
|
+
p,
|
|
56
57
|
{
|
|
57
58
|
type: "button",
|
|
58
59
|
variant: "ghost",
|
|
59
60
|
size: "icon",
|
|
60
|
-
className: "h-7 w-7 text-
|
|
61
|
+
className: "h-7 w-7 text-success hover:bg-success-subtle-hover",
|
|
61
62
|
onClick: h,
|
|
62
63
|
"aria-label": t("checkout_coupon_remove"),
|
|
63
|
-
children: /* @__PURE__ */ e(
|
|
64
|
+
children: /* @__PURE__ */ e(v, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
64
65
|
}
|
|
65
66
|
)
|
|
66
67
|
] }) : null,
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
o ? /* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: o }) }) : null,
|
|
69
|
+
n ? /* @__PURE__ */ e("p", { className: "text-xs text-destructive", children: /* @__PURE__ */ e("span", { children: n }) }) : null
|
|
69
70
|
] });
|
|
70
71
|
}
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
B as CheckoutCouponCard
|
|
73
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutPaymentCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutPaymentCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"CheckoutPaymentCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutPaymentCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAK/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAMrF,KAAK,wBAAwB,GAAG;IAC9B,oBAAoB,EAAE,sBAAsB,GAAG,sBAAsB,CAAA;IACrE,qBAAqB,EAAE,6BAA6B,CAAA;IACpD,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE;QACN,cAAc,EAAE,OAAO,CAAA;QACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;QAC3B,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAA;QACtC,iBAAiB,EAAE,MAAM,CAAA;QACzB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAC/C,CAAA;IACD,MAAM,EAAE;QACN,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;QACtC,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAC9B,CAAA;CACF,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,oBAAoB,EACpB,qBAAqB,EACrB,QAAQ,EACR,MAAM,EACN,MAAM,GACP,EAAE,wBAAwB,2CA+E1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutPaymentSummaryCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutPaymentSummaryCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckoutPaymentSummaryCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutPaymentSummaryCard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAK7D,KAAK,+BAA+B,GAAG;IACrC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,oBAAoB,EAAE,MAAM,CAAA;IAC5B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,sBAAsB,EAAE,OAAO,CAAA;IAC/B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,sBAAsB,EAAE,OAAO,CAAA;IAC/B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,qBAAqB,EAAE,6BAA6B,CAAA;IACpD,UAAU,EAAE,OAAO,CAAA;IACnB,qBAAqB,EAAE,CAAC,MAAM,EAAE,6BAA6B,KAAK,IAAI,CAAA;CACvE,CAAA;AAED,wBAAgB,0BAA0B,CAAC,EACzC,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,UAAU,EACV,qBAAqB,GACtB,EAAE,+BAA+B,2CAgIjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Spinner as y } from "../../../chunks/ui/dist/Spinner/index-SbbUxcsT.js";
|
|
3
|
+
import { AlertTriangle as k } from "lucide-react";
|
|
3
4
|
import { useTranslation as w } from "react-i18next";
|
|
4
5
|
import { Button as C } from "../../../ui/button.js";
|
|
5
6
|
import { Card as j } from "../../../ui/card.js";
|
|
@@ -14,9 +15,9 @@ function F({
|
|
|
14
15
|
amountToCollectMinor: x,
|
|
15
16
|
amountToCollectLabel: _,
|
|
16
17
|
paymentSummaryHelper: c,
|
|
17
|
-
paymentDecisionLoading:
|
|
18
|
+
paymentDecisionLoading: i,
|
|
18
19
|
paymentDecisionError: s,
|
|
19
|
-
canChoosePaymentMethod:
|
|
20
|
+
canChoosePaymentMethod: n,
|
|
20
21
|
showAmountDueNowRow: g,
|
|
21
22
|
selectedPaymentMethod: b,
|
|
22
23
|
submitting: N,
|
|
@@ -30,7 +31,7 @@ function F({
|
|
|
30
31
|
return /* @__PURE__ */ a(j, { className: "border-slate-200 bg-white shadow-sm", children: [
|
|
31
32
|
/* @__PURE__ */ a("div", { className: "border-b border-slate-200 px-4 py-4", children: [
|
|
32
33
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_totals_title") }) }),
|
|
33
|
-
|
|
34
|
+
n ? /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_totals_description") }) }) : null
|
|
34
35
|
] }),
|
|
35
36
|
/* @__PURE__ */ a("div", { className: "grid gap-4 px-4 py-4", children: [
|
|
36
37
|
/* @__PURE__ */ a("dl", { className: "grid text-sm", children: [
|
|
@@ -39,8 +40,8 @@ function F({
|
|
|
39
40
|
/* @__PURE__ */ e("dd", { className: "font-semibold tabular-nums text-slate-900", children: /* @__PURE__ */ e("span", { children: m }) })
|
|
40
41
|
] }),
|
|
41
42
|
d ? /* @__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
|
-
/* @__PURE__ */ e("dt", { className: "text-
|
|
43
|
-
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-
|
|
43
|
+
/* @__PURE__ */ e("dt", { className: "text-success", children: /* @__PURE__ */ e("span", { children: t("checkout_coupon_discount", { code: o ?? "" }) }) }),
|
|
44
|
+
/* @__PURE__ */ e("dd", { className: "font-medium tabular-nums text-success", children: /* @__PURE__ */ e("span", { children: d }) })
|
|
44
45
|
] }) : null,
|
|
45
46
|
/* @__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
47
|
/* @__PURE__ */ e("dt", { className: "text-slate-600", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_total_excluding_tax") }) }),
|
|
@@ -60,15 +61,15 @@ function F({
|
|
|
60
61
|
] }) : null
|
|
61
62
|
] }),
|
|
62
63
|
c ? /* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: c }) }) : null,
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */ e(y, { className: "
|
|
64
|
+
i ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-sm text-slate-600", children: [
|
|
65
|
+
/* @__PURE__ */ e(y, { className: "size-4", "aria-hidden": "true" }),
|
|
65
66
|
/* @__PURE__ */ e("span", { children: t("checkout_payment_loading") })
|
|
66
67
|
] }) : null,
|
|
67
68
|
s ? /* @__PURE__ */ e("div", { className: "grid gap-3 rounded-xl border border-destructive/25 bg-destructive/5 p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-2 text-sm text-destructive", children: [
|
|
68
69
|
/* @__PURE__ */ e(k, { className: "mt-0.5 h-4 w-4", "aria-hidden": "true" }),
|
|
69
70
|
/* @__PURE__ */ e("span", { children: s })
|
|
70
71
|
] }) }) : null,
|
|
71
|
-
!
|
|
72
|
+
!i && !s && n ? /* @__PURE__ */ e("div", { className: "grid gap-2 sm:grid-cols-3", children: v.map((l) => /* @__PURE__ */ e(
|
|
72
73
|
C,
|
|
73
74
|
{
|
|
74
75
|
type: "button",
|