@loczer/storefront-sdk 0.198.0 → 0.199.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/StorefrontContext.d.ts +483 -0
- package/dist/StorefrontContext.d.ts.map +1 -0
- package/dist/StorefrontContext.js +39 -0
- package/dist/StorefrontProvider.d.ts +6 -486
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/StorefrontProvider.js +34 -67
- package/dist/components/AboutSection/index.js +5 -5
- package/dist/components/BikeProductCard/index.d.ts.map +1 -1
- package/dist/components/BikeProductCard/index.js +27 -27
- package/dist/components/BookingBikeVariantDialog/index.js +14 -8
- package/dist/components/ContactSection/index.js +107 -107
- package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/Invoice.js +117 -111
- package/dist/components/Header/index.js +4 -4
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +47 -40
- package/dist/components/ProductPriceBadge/index.d.ts +2 -1
- package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
- package/dist/components/ProductPriceBadge/index.js +72 -70
- package/dist/components/TestimonialsSection/index.js +1 -1
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +1 -0
- package/dist/i18n/fr.d.ts +1 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +1 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.js +59 -58
- package/dist/lib/cartSummary.js +7 -7
- package/dist/lib/products.d.ts +6 -0
- package/dist/lib/products.d.ts.map +1 -1
- package/dist/lib/products.js +36 -32
- package/dist/lib/toast.d.ts +9 -0
- package/dist/lib/toast.d.ts.map +1 -0
- package/dist/lib/toast.js +13 -0
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +143 -138
- package/dist/pages/CheckoutPage.js +217 -217
- package/dist/pages/CheckoutPaymentPage.js +124 -124
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +83 -83
- package/dist/pages/HomePage.js +6 -3
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +177 -165
- package/package.json +2 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { pickBookingSearchParams as e } from "../lib/booking.js";
|
|
2
2
|
import { useStorefrontCart as t } from "../lib/cart.js";
|
|
3
3
|
import { Button as n } from "../ui/button.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { toast as r } from "../lib/toast.js";
|
|
5
|
+
import { Card as i } from "../ui/card.js";
|
|
6
|
+
import { apiPost as a } from "../lib/apiCall.js";
|
|
7
|
+
import { Spinner as o } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
8
|
+
import { ROUTE as s, responseSchema as c } from "../lib/checkoutPaymentSession.js";
|
|
9
|
+
import { MollieCardFieldsForm as l } from "../components/payment/MollieCardFieldsForm.js";
|
|
10
|
+
import { StripeCardFieldsForm as u } from "../components/payment/StripeCardFieldsForm.js";
|
|
10
11
|
import "../components/payment/index.js";
|
|
11
|
-
import { useEffect as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
var C = {
|
|
12
|
+
import { useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
13
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
|
+
import { Link as _, useNavigate as ee, useParams as te, useSearchParams as ne } from "@rpcbase/router";
|
|
15
|
+
import { useTranslation as v } from "react-i18next";
|
|
16
|
+
import { AlertTriangle as y, ArrowRight as b, CheckCircle2 as x, CircleDashed as re, ShieldCheck as S, XCircle as ie } from "lucide-react";
|
|
17
|
+
import { loadStripe as ae } from "@stripe/stripe-js";
|
|
18
|
+
import { Elements as oe, useStripe as C } from "@stripe/react-stripe-js";
|
|
19
|
+
var w = {
|
|
20
20
|
BASE_URL: "/",
|
|
21
21
|
DEV: !1,
|
|
22
22
|
MODE: "production",
|
|
23
23
|
PROD: !0,
|
|
24
24
|
SSR: !1
|
|
25
|
-
}.RB_PUBLIC_STRIPE_PUBLISHABLE_KEY?.trim() ?? "",
|
|
25
|
+
}.RB_PUBLIC_STRIPE_PUBLISHABLE_KEY?.trim() ?? "", T = 20, E = 2500, se = (e, t, n) => {
|
|
26
26
|
try {
|
|
27
27
|
return new Intl.NumberFormat(n, {
|
|
28
28
|
style: "currency",
|
|
@@ -32,9 +32,9 @@ var C = {
|
|
|
32
32
|
return `${(e / 100).toFixed(2)} ${t.toUpperCase()}`;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
function
|
|
36
|
-
let { t: n } =
|
|
37
|
-
return /* @__PURE__ */
|
|
35
|
+
function ce({ clientSecret: e, onSuccess: t }) {
|
|
36
|
+
let { t: n } = v(), r = C();
|
|
37
|
+
return /* @__PURE__ */ h(u, {
|
|
38
38
|
requireEmail: !1,
|
|
39
39
|
submitLabel: n("checkout_payment_authorize_button"),
|
|
40
40
|
submittingLabel: n("checkout_payment_authorizing_button"),
|
|
@@ -48,36 +48,36 @@ function le({ clientSecret: e, onSuccess: t }) {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let { t: e } =
|
|
53
|
-
return /* @__PURE__ */
|
|
51
|
+
function le() {
|
|
52
|
+
let { t: e } = v();
|
|
53
|
+
return /* @__PURE__ */ g("div", {
|
|
54
54
|
className: "flex min-h-48 items-center justify-center gap-2 text-sm text-slate-600",
|
|
55
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ h(o, {
|
|
56
56
|
className: "size-4",
|
|
57
57
|
"aria-hidden": "true"
|
|
58
|
-
}), /* @__PURE__ */
|
|
58
|
+
}), /* @__PURE__ */ h("span", { children: e("secure_payment_link.form.loading_session") })]
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
function D() {
|
|
62
|
-
let { t:
|
|
62
|
+
let { t: o, i18n: u } = v(), { storeSlug: C } = te(), D = ee(), { clear: O } = t(), [k] = ne(), [A, j] = m(null), [ue, M] = m(!0), [N, P] = m(null), [F, I] = m(0), [L, R] = m(0), z = p(!1), B = p(null), V = k.get("checkout_session_id")?.trim() ?? "", H = new URLSearchParams(k.toString());
|
|
63
63
|
H.delete("checkout_session_id");
|
|
64
|
-
let U = e(H).toString(), W = `/${
|
|
65
|
-
if (!
|
|
66
|
-
let t = await
|
|
67
|
-
storeSlug:
|
|
64
|
+
let U = e(H).toString(), W = `/${C ?? ""}/checkout${U ? `?${U}` : ""}`, G = `/${C ?? ""}/checkout/success${U ? `?${U}` : ""}`, K = async (e) => {
|
|
65
|
+
if (!C || !V) throw Error(o("checkout_payment_return_missing_session"));
|
|
66
|
+
let t = await a(s, {
|
|
67
|
+
storeSlug: C,
|
|
68
68
|
checkoutSessionId: V,
|
|
69
69
|
returnSearch: U || void 0,
|
|
70
70
|
cardToken: e
|
|
71
71
|
});
|
|
72
|
-
return
|
|
72
|
+
return c.parse(t);
|
|
73
73
|
}, q = async () => {
|
|
74
|
-
z.current || (z.current = !0,
|
|
74
|
+
z.current || (z.current = !0, r.success(o("checkout_success_toast")), await D(G, { replace: !0 }), O());
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
d(() => {
|
|
77
77
|
z.current = !1, B.current = null, j(null), M(!0), R(0);
|
|
78
|
-
}, [V]),
|
|
79
|
-
if (!
|
|
80
|
-
B.current = null, j(null), P(
|
|
78
|
+
}, [V]), d(() => {
|
|
79
|
+
if (!C || !V) {
|
|
80
|
+
B.current = null, j(null), P(o("checkout_payment_return_missing_session")), M(!1);
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
let e = !1, t = B.current === null;
|
|
@@ -86,7 +86,7 @@ function D() {
|
|
|
86
86
|
let t = await K();
|
|
87
87
|
if (e) return;
|
|
88
88
|
if (!t.success) {
|
|
89
|
-
B.current = null, j(null), P(t.message ||
|
|
89
|
+
B.current = null, j(null), P(t.message || o("checkout_payment_return_status_error"));
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
B.current = t, j(t);
|
|
@@ -94,7 +94,7 @@ function D() {
|
|
|
94
94
|
(n === "authorized" || n === "succeeded") && !z.current && await q();
|
|
95
95
|
} catch (t) {
|
|
96
96
|
if (e) return;
|
|
97
|
-
console.error("Failed to fetch checkout payment session", t), B.current = null, j(null), P(
|
|
97
|
+
console.error("Failed to fetch checkout payment session", t), B.current = null, j(null), P(o("checkout_payment_return_status_error"));
|
|
98
98
|
} finally {
|
|
99
99
|
!e && t && M(!1);
|
|
100
100
|
}
|
|
@@ -107,16 +107,16 @@ function D() {
|
|
|
107
107
|
D,
|
|
108
108
|
U,
|
|
109
109
|
F,
|
|
110
|
-
|
|
110
|
+
C,
|
|
111
111
|
G,
|
|
112
|
-
|
|
112
|
+
o
|
|
113
113
|
]);
|
|
114
114
|
let J = A?.paymentStatus ?? "pending";
|
|
115
|
-
|
|
116
|
-
if (J !== "pending" || A?.providerType === "stripe_connect_oauth" || L >=
|
|
115
|
+
d(() => {
|
|
116
|
+
if (J !== "pending" || A?.providerType === "stripe_connect_oauth" || L >= T || !A?.payment?.providerPaymentId) return;
|
|
117
117
|
let e = window.setTimeout(() => {
|
|
118
118
|
R((e) => e + 1), I((e) => e + 1);
|
|
119
|
-
},
|
|
119
|
+
}, E);
|
|
120
120
|
return () => {
|
|
121
121
|
window.clearTimeout(e);
|
|
122
122
|
};
|
|
@@ -126,200 +126,200 @@ function D() {
|
|
|
126
126
|
A?.payment?.providerPaymentId,
|
|
127
127
|
A?.providerType
|
|
128
128
|
]);
|
|
129
|
-
let Y =
|
|
130
|
-
let e = A?.stripePublishableKey?.trim() ||
|
|
131
|
-
return !e || !A?.providerAccountId ? null :
|
|
132
|
-
}, [A?.providerAccountId, A?.stripePublishableKey]), X =
|
|
129
|
+
let Y = f(() => {
|
|
130
|
+
let e = A?.stripePublishableKey?.trim() || w;
|
|
131
|
+
return !e || !A?.providerAccountId ? null : ae(e, { stripeAccount: A.providerAccountId });
|
|
132
|
+
}, [A?.providerAccountId, A?.stripePublishableKey]), X = f(() => {
|
|
133
133
|
if (A?.clientSecret) return { clientSecret: A.clientSecret };
|
|
134
134
|
}, [A?.clientSecret]);
|
|
135
|
-
if (!V) return /* @__PURE__ */
|
|
135
|
+
if (!V) return /* @__PURE__ */ h("div", {
|
|
136
136
|
className: "mx-auto max-w-3xl px-4 py-14 sm:px-6",
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ h(i, {
|
|
138
138
|
className: "border-destructive/25 bg-white p-5 sm:p-6 shadow-sm",
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ g("div", {
|
|
140
140
|
className: "space-y-4",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ g("div", {
|
|
142
142
|
className: "flex items-start gap-3",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ h(y, {
|
|
144
144
|
className: "mt-0.5 h-5 w-5 text-destructive",
|
|
145
145
|
"aria-hidden": "true"
|
|
146
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ h("p", {
|
|
147
147
|
className: "text-sm text-slate-700",
|
|
148
|
-
children: /* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_return_missing_session") })
|
|
149
149
|
})]
|
|
150
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ h(_, {
|
|
151
151
|
to: W,
|
|
152
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ h(n, {
|
|
153
153
|
variant: "outline",
|
|
154
|
-
children: /* @__PURE__ */
|
|
154
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_return_back_to_checkout") })
|
|
155
155
|
})
|
|
156
156
|
})]
|
|
157
157
|
})
|
|
158
158
|
})
|
|
159
159
|
});
|
|
160
|
-
if (ue && !A) return /* @__PURE__ */
|
|
160
|
+
if (ue && !A) return /* @__PURE__ */ h("div", {
|
|
161
161
|
className: "mx-auto max-w-3xl px-4 py-14 sm:px-6",
|
|
162
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ h(i, {
|
|
163
163
|
className: "border-slate-200 bg-white p-5 sm:p-6 shadow-sm",
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ h(le, {})
|
|
165
165
|
})
|
|
166
166
|
});
|
|
167
|
-
if (N || !A) return /* @__PURE__ */
|
|
167
|
+
if (N || !A) return /* @__PURE__ */ h("div", {
|
|
168
168
|
className: "mx-auto max-w-3xl px-4 py-14 sm:px-6",
|
|
169
|
-
children: /* @__PURE__ */
|
|
169
|
+
children: /* @__PURE__ */ h(i, {
|
|
170
170
|
className: "border-destructive/25 bg-white p-5 sm:p-6 shadow-sm",
|
|
171
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ g("div", {
|
|
172
172
|
className: "space-y-4",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ g("div", {
|
|
174
174
|
className: "flex items-start gap-3",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ h(y, {
|
|
176
176
|
className: "mt-0.5 h-5 w-5 text-destructive",
|
|
177
177
|
"aria-hidden": "true"
|
|
178
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ h("p", {
|
|
179
179
|
className: "text-sm text-slate-700",
|
|
180
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ h("span", { children: N ?? o("checkout_payment_return_status_error") })
|
|
181
181
|
})]
|
|
182
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ h(_, {
|
|
183
183
|
to: W,
|
|
184
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ h(n, {
|
|
185
185
|
variant: "outline",
|
|
186
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_return_back_to_checkout") })
|
|
187
187
|
})
|
|
188
188
|
})]
|
|
189
189
|
})
|
|
190
190
|
})
|
|
191
191
|
});
|
|
192
|
-
let Z = typeof A.amountMinor == "number" && A.currency ?
|
|
193
|
-
return /* @__PURE__ */
|
|
192
|
+
let Z = typeof A.amountMinor == "number" && A.currency ? se(A.amountMinor, A.currency, u.language) : null, Q = J === "authorized" || J === "succeeded", $ = J === "failed" || J === "cancelled", de = Q ? x : $ ? ie : re, fe = Q ? "text-success" : $ ? "text-destructive" : "text-warning";
|
|
193
|
+
return /* @__PURE__ */ h("div", {
|
|
194
194
|
className: "mx-auto max-w-5xl px-4 py-10 sm:px-6",
|
|
195
|
-
children: /* @__PURE__ */
|
|
195
|
+
children: /* @__PURE__ */ g("div", {
|
|
196
196
|
className: "grid gap-6 lg:grid-cols-[1fr_1fr]",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ h(i, {
|
|
198
198
|
className: "border-slate-200 bg-white p-5 shadow-sm",
|
|
199
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ g("div", {
|
|
200
200
|
className: "space-y-5",
|
|
201
201
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ g("div", {
|
|
203
203
|
className: "inline-flex items-center gap-2 rounded-full border border-success-border bg-success-subtle px-3 py-1 text-xs font-medium text-success",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ h(S, {
|
|
205
205
|
className: "h-3.5 w-3.5",
|
|
206
206
|
"aria-hidden": "true"
|
|
207
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ h("span", { children: o("secure_payment_link.secured_badge") })]
|
|
208
208
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
210
210
|
className: "text-2xl font-semibold tracking-tight text-slate-950",
|
|
211
|
-
children: /* @__PURE__ */
|
|
212
|
-
}), /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_title") })
|
|
212
|
+
}), /* @__PURE__ */ h("p", {
|
|
213
213
|
className: "mt-2 text-sm text-slate-600",
|
|
214
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_hold_description") })
|
|
215
215
|
})] }),
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ g("dl", {
|
|
217
217
|
className: "grid gap-3 rounded-xl border border-slate-200 bg-slate-50 p-4 text-sm",
|
|
218
|
-
children: [Z ? /* @__PURE__ */
|
|
218
|
+
children: [Z ? /* @__PURE__ */ g("div", {
|
|
219
219
|
className: "flex items-center justify-between gap-3",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
221
221
|
className: "text-slate-600",
|
|
222
|
-
children: /* @__PURE__ */
|
|
223
|
-
}), /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_hold_amount") })
|
|
223
|
+
}), /* @__PURE__ */ h("dd", {
|
|
224
224
|
className: "font-semibold text-slate-950",
|
|
225
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ h("span", { children: Z })
|
|
226
226
|
})]
|
|
227
|
-
}) : null, A.providerType ? /* @__PURE__ */
|
|
227
|
+
}) : null, A.providerType ? /* @__PURE__ */ g("div", {
|
|
228
228
|
className: "flex items-center justify-between gap-3",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ h("dt", {
|
|
230
230
|
className: "text-slate-600",
|
|
231
|
-
children: /* @__PURE__ */
|
|
232
|
-
}), /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_provider") })
|
|
232
|
+
}), /* @__PURE__ */ h("dd", {
|
|
233
233
|
className: "font-medium text-slate-950",
|
|
234
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ h("span", { children: o(`secure_payment_link.providers.${A.providerType}`) })
|
|
235
235
|
})]
|
|
236
236
|
}) : null]
|
|
237
237
|
})
|
|
238
238
|
]
|
|
239
239
|
})
|
|
240
|
-
}), /* @__PURE__ */
|
|
240
|
+
}), /* @__PURE__ */ h(i, {
|
|
241
241
|
className: "border-slate-200 bg-white p-5 shadow-sm",
|
|
242
|
-
children: Q || $ ? /* @__PURE__ */
|
|
242
|
+
children: Q || $ ? /* @__PURE__ */ g("div", {
|
|
243
243
|
className: "space-y-6 text-center",
|
|
244
244
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ h("div", {
|
|
246
246
|
className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100",
|
|
247
|
-
children: /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ h(de, {
|
|
248
248
|
className: `h-6 w-6 ${fe}`,
|
|
249
249
|
"aria-hidden": "true"
|
|
250
250
|
})
|
|
251
251
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ g("div", {
|
|
253
253
|
className: "space-y-2",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
255
255
|
className: "text-xl font-semibold text-slate-950",
|
|
256
|
-
children: /* @__PURE__ */
|
|
257
|
-
}), /* @__PURE__ */
|
|
256
|
+
children: /* @__PURE__ */ h("span", { children: o(`secure_payment_link.success_titles.${J}`) })
|
|
257
|
+
}), /* @__PURE__ */ h("p", {
|
|
258
258
|
className: "text-sm text-slate-600",
|
|
259
|
-
children: /* @__PURE__ */
|
|
259
|
+
children: /* @__PURE__ */ h("span", { children: o(`secure_payment_link.statuses.${J}`) })
|
|
260
260
|
})]
|
|
261
261
|
}),
|
|
262
|
-
Q ? /* @__PURE__ */
|
|
262
|
+
Q ? /* @__PURE__ */ h(_, {
|
|
263
263
|
to: G,
|
|
264
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ g(n, {
|
|
265
265
|
className: "gap-2",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ h("span", { children: o("checkout_payment_return_go_to_success") }), /* @__PURE__ */ h(b, {
|
|
267
267
|
className: "h-4 w-4",
|
|
268
268
|
"aria-hidden": "true"
|
|
269
269
|
})]
|
|
270
270
|
})
|
|
271
|
-
}) : /* @__PURE__ */
|
|
271
|
+
}) : /* @__PURE__ */ h(_, {
|
|
272
272
|
to: W,
|
|
273
|
-
children: /* @__PURE__ */
|
|
273
|
+
children: /* @__PURE__ */ h(n, { children: /* @__PURE__ */ h("span", { children: o("checkout_payment_return_retry_checkout") }) })
|
|
274
274
|
})
|
|
275
275
|
]
|
|
276
|
-
}) : A.providerType === "mollie_connect_oauth" ? /* @__PURE__ */
|
|
276
|
+
}) : A.providerType === "mollie_connect_oauth" ? /* @__PURE__ */ g("div", {
|
|
277
277
|
className: "space-y-4",
|
|
278
278
|
children: [
|
|
279
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ h("h2", {
|
|
280
280
|
className: "text-lg font-semibold text-slate-950",
|
|
281
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ h("span", { children: o("secure_payment_link.mollie.form_title") })
|
|
282
282
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ h("p", {
|
|
284
284
|
className: "text-sm text-slate-600",
|
|
285
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ h("span", { children: o("checkout_payment_hold_form_description") })
|
|
286
286
|
}),
|
|
287
|
-
A.profileId ? /* @__PURE__ */
|
|
287
|
+
A.profileId ? /* @__PURE__ */ h(l, {
|
|
288
288
|
profileId: A.profileId,
|
|
289
289
|
testmode: A.testmode === !0,
|
|
290
|
-
submitLabel:
|
|
291
|
-
submittingLabel:
|
|
290
|
+
submitLabel: o("checkout_payment_authorize_button"),
|
|
291
|
+
submittingLabel: o("checkout_payment_authorizing_button"),
|
|
292
292
|
onSubmit: async (e) => {
|
|
293
293
|
let t = await K(e);
|
|
294
|
-
if (!t.success) throw Error(t.message ||
|
|
294
|
+
if (!t.success) throw Error(t.message || o("secure_payment_link.errors.payment_failed"));
|
|
295
295
|
if (B.current = t, j(t), t.paymentStatus === "authorized" || t.paymentStatus === "succeeded") {
|
|
296
296
|
await q();
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
|
-
if (!t.checkoutUrl) throw Error(t.message ||
|
|
299
|
+
if (!t.checkoutUrl) throw Error(t.message || o("secure_payment_link.errors.mollie_missing_url"));
|
|
300
300
|
let n = new URL(t.checkoutUrl, window.location.origin).toString();
|
|
301
301
|
window.location.assign(n);
|
|
302
302
|
}
|
|
303
|
-
}) : /* @__PURE__ */
|
|
303
|
+
}) : /* @__PURE__ */ h("p", {
|
|
304
304
|
className: "text-sm text-destructive",
|
|
305
|
-
children: /* @__PURE__ */
|
|
305
|
+
children: /* @__PURE__ */ h("span", { children: o("secure_payment_link.errors.session_failed") })
|
|
306
306
|
})
|
|
307
307
|
]
|
|
308
|
-
}) : A.providerType === "stripe_connect_oauth" ? !A.clientSecret || !Y || !X ? /* @__PURE__ */
|
|
308
|
+
}) : A.providerType === "stripe_connect_oauth" ? !A.clientSecret || !Y || !X ? /* @__PURE__ */ h("p", {
|
|
309
309
|
className: "text-sm text-destructive",
|
|
310
|
-
children: /* @__PURE__ */
|
|
311
|
-
}) : /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ h("span", { children: o("secure_payment_link.errors.missing_publishable_key") })
|
|
311
|
+
}) : /* @__PURE__ */ h(oe, {
|
|
312
312
|
stripe: Y,
|
|
313
313
|
options: X,
|
|
314
|
-
children: /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ h(ce, {
|
|
315
315
|
clientSecret: A.clientSecret,
|
|
316
316
|
onSuccess: () => {
|
|
317
317
|
q();
|
|
318
318
|
}
|
|
319
319
|
})
|
|
320
|
-
}, A.clientSecret) : /* @__PURE__ */
|
|
320
|
+
}, A.clientSecret) : /* @__PURE__ */ h("p", {
|
|
321
321
|
className: "text-sm text-destructive",
|
|
322
|
-
children: /* @__PURE__ */
|
|
322
|
+
children: /* @__PURE__ */ h("span", { children: o("secure_payment_link.errors.session_failed") })
|
|
323
323
|
})
|
|
324
324
|
})]
|
|
325
325
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractSaleDocumentPage.d.ts","sourceRoot":"","sources":["../../src/pages/ContractSaleDocumentPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContractSaleDocumentPage.d.ts","sourceRoot":"","sources":["../../src/pages/ContractSaleDocumentPage.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAmC,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAsLnG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEA,CAAA;AAYnB,MAAM,CAAC,OAAO,UAAU,wBAAwB,4CAqP/C"}
|