@loczer/storefront-sdk 0.231.0 → 0.232.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/pkg/ui/dist/LanguagePicker/index-D7_3voTe.js +83 -0
- package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -1
- package/dist/components/BookingBikeQuickAddCard/index.js +0 -3
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +7 -9
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +62 -56
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +56 -56
- package/dist/components/LanguageSelector/index.d.ts.map +1 -1
- package/dist/components/LanguageSelector/index.js +19 -64
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +3 -1
- package/dist/i18n/fr.d.ts +2 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +3 -1
- package/dist/index.d.ts +5 -0
- package/dist/lib/cart.d.ts +1 -0
- package/dist/lib/cart.d.ts.map +1 -1
- package/dist/lib/cart.js +2 -0
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +292 -292
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +107 -103
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +117 -171
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +31 -31
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts +7 -0
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts.map +1 -0
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.js +105 -0
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-j1CgFGLe.js → MorphingModalWizard-Q8O5Rjfq.js} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAqFA,MAAM,CAAC,OAAO,UAAU,YAAY,4CA+oBnC"}
|
|
@@ -15,16 +15,17 @@ import { ROUTE as _e, responseSchema as ve } from "../lib/checkoutPaymentDecisio
|
|
|
15
15
|
import { ROUTE as ye, responseSchema as be } from "../lib/checkoutVerifyCoupon.js";
|
|
16
16
|
import { CheckoutDetailsCard as xe } from "./checkout/components/CheckoutDetailsCard.js";
|
|
17
17
|
import { CheckoutInsuranceCard as Se } from "./checkout/components/CheckoutInsuranceCard.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
18
|
+
import { CheckoutLoadingSkeleton as Ce } from "./checkout/components/CheckoutLoadingSkeleton.js";
|
|
19
|
+
import { CheckoutSummaryColumn as we } from "./checkout/components/CheckoutSummaryColumn.js";
|
|
20
|
+
import { checkoutFormSchema as Te } from "./checkout/types.js";
|
|
21
|
+
import { useEffect as s, useMemo as c, useRef as Ee, useState as l } from "react";
|
|
21
22
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
22
|
-
import { Link as
|
|
23
|
-
import { useTranslation as
|
|
24
|
-
import { AlertTriangle as
|
|
25
|
-
import { useForm as
|
|
23
|
+
import { Link as De, useNavigate as Oe, useParams as ke, useSearchParams as Ae } from "@rpcbase/router";
|
|
24
|
+
import { useTranslation as je } from "react-i18next";
|
|
25
|
+
import { AlertTriangle as Me, ArrowLeft as Ne } from "lucide-react";
|
|
26
|
+
import { useForm as Pe, zodResolver as Fe } from "@rpcbase/form";
|
|
26
27
|
//#region src/pages/CheckoutPage.tsx
|
|
27
|
-
var
|
|
28
|
+
var Ie = .2, f = (e, t, n) => {
|
|
28
29
|
try {
|
|
29
30
|
return new Intl.NumberFormat(n, {
|
|
30
31
|
style: "currency",
|
|
@@ -33,7 +34,7 @@ var Fe = .2, f = (e, t, n) => {
|
|
|
33
34
|
} catch {
|
|
34
35
|
return `${(e / 100).toFixed(2)} ${t.toUpperCase()}`;
|
|
35
36
|
}
|
|
36
|
-
},
|
|
37
|
+
}, Le = (e, t) => {
|
|
37
38
|
try {
|
|
38
39
|
return new Intl.NumberFormat(t, {
|
|
39
40
|
style: "percent",
|
|
@@ -45,8 +46,8 @@ var Fe = .2, f = (e, t, n) => {
|
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
function p() {
|
|
48
|
-
let { t: p, i18n: m } =
|
|
49
|
-
let e = t(
|
|
49
|
+
let { t: p, i18n: m } = je(), { storefrontConfiguration: h } = fe(), Re = h.workspace?.workspaceLanguage, { bikes: g, accessories: ze } = pe(), { storeSlug: _ } = ke(), [v, Be] = Ae(), Ve = Oe(), { items: He, itemCount: Ue, isReady: We, setQuantity: Ge, removeItem: Ke, beginCheckoutSubmission: qe, confirmCheckoutPaymentSession: Je, clearCheckoutSession: Ye, clear: Xe } = ee(), [y, Ze] = l(!1), b = Ee(!1), [x, S] = l(null), [Qe, C] = l(!1), [w, T] = l(null), $e = v.get("coupon") ?? v.get("code") ?? "", [et, E] = l($e), [tt, nt] = l($e.trim()), [D, O] = l(null), [k, A] = l(null), [j, M] = l(!1), [rt, N] = l(null), [it, P] = l(null), [F, at] = l(!1), [I, ot] = l(!1), st = n(v).toString(), ct = c(() => r(new URLSearchParams(st), _), [st, _]), L = h.settings.fulfillmentModes.includes("delivery"), lt = h.settings.deliveryDisabledReason.trim(), ut = L || lt.length > 0, dt = h.shop.address?.trim() ?? "", R = c(() => {
|
|
50
|
+
let e = t(ct, {
|
|
50
51
|
startTime: "",
|
|
51
52
|
endTime: ""
|
|
52
53
|
});
|
|
@@ -54,40 +55,40 @@ function p() {
|
|
|
54
55
|
...e,
|
|
55
56
|
fulfillment: "pickup"
|
|
56
57
|
} : e;
|
|
57
|
-
}, [
|
|
58
|
-
items:
|
|
58
|
+
}, [ct, L]), z = c(() => le(R), [R]), B = h.bookingEngine.pricing, ft = te(R, B, h.bookingEngine.shop.timeZone), pt = ne(B.baseUnit, p), mt = ft?.billableUnitCount, V = c(() => re({
|
|
59
|
+
items: He,
|
|
59
60
|
language: m.language,
|
|
60
|
-
fallbackLanguage:
|
|
61
|
+
fallbackLanguage: Re,
|
|
61
62
|
products: {
|
|
62
63
|
bikes: g,
|
|
63
|
-
accessories:
|
|
64
|
+
accessories: ze
|
|
64
65
|
},
|
|
65
66
|
priceUnit: B.baseUnit,
|
|
66
|
-
billableUnitCount:
|
|
67
|
+
billableUnitCount: mt
|
|
67
68
|
}), [
|
|
68
|
-
|
|
69
|
+
ze,
|
|
69
70
|
g,
|
|
70
|
-
|
|
71
|
+
mt,
|
|
71
72
|
m.language,
|
|
72
|
-
|
|
73
|
+
He,
|
|
73
74
|
B.baseUnit,
|
|
74
|
-
|
|
75
|
+
Re
|
|
75
76
|
]), H = c(() => V.lines.map((e) => ({
|
|
76
77
|
productId: e.checkoutProductId,
|
|
77
78
|
productVariantId: e.productVariantId,
|
|
78
79
|
quantity: e.quantity
|
|
79
|
-
})), [V.lines]), [
|
|
80
|
+
})), [V.lines]), [ht, U] = l([]), [gt, W] = l(!1);
|
|
80
81
|
s(() => {
|
|
81
82
|
if (!_ || H.length === 0) {
|
|
82
|
-
U([]),
|
|
83
|
+
U([]), W(!1);
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
86
|
if (!z) {
|
|
86
|
-
U([]),
|
|
87
|
+
U([]), W(!1);
|
|
87
88
|
return;
|
|
88
89
|
}
|
|
89
90
|
let e = !1;
|
|
90
|
-
return
|
|
91
|
+
return W(!0), U([]), (async () => {
|
|
91
92
|
try {
|
|
92
93
|
let t = await o(oe, {
|
|
93
94
|
storeSlug: _,
|
|
@@ -100,7 +101,7 @@ function p() {
|
|
|
100
101
|
if (e) return;
|
|
101
102
|
console.error("Failed to load checkout cart availability", t), U([]);
|
|
102
103
|
} finally {
|
|
103
|
-
e ||
|
|
104
|
+
e || W(!1);
|
|
104
105
|
}
|
|
105
106
|
})(), () => {
|
|
106
107
|
e = !0;
|
|
@@ -114,34 +115,34 @@ function p() {
|
|
|
114
115
|
H,
|
|
115
116
|
_
|
|
116
117
|
]);
|
|
117
|
-
let
|
|
118
|
+
let _t = c(() => new Map(ht.map((e) => [se(e.productId, e.productVariantId), e])), [ht]), vt = c(() => ({
|
|
118
119
|
...V,
|
|
119
120
|
lines: V.lines.map((e) => {
|
|
120
|
-
let t =
|
|
121
|
+
let t = _t.get(se(e.checkoutProductId, e.productVariantId)), n = t ? ce(t) : e.availabilityStatus === "OUT_OF_STOCK" ? "unavailable" : void 0;
|
|
121
122
|
return {
|
|
122
123
|
...e,
|
|
123
|
-
insufficientCapacity: !
|
|
124
|
-
availabilityIssue:
|
|
124
|
+
insufficientCapacity: !gt && n !== void 0,
|
|
125
|
+
availabilityIssue: gt ? void 0 : n
|
|
125
126
|
};
|
|
126
127
|
})
|
|
127
128
|
}), [
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
_t,
|
|
130
|
+
gt,
|
|
130
131
|
V
|
|
131
|
-
]),
|
|
132
|
+
]), G = c(() => V.lines.map((e) => ({
|
|
132
133
|
kind: e.kind,
|
|
133
134
|
productId: e.checkoutProductId,
|
|
134
135
|
productVariantId: e.productVariantId,
|
|
135
136
|
quantity: e.quantity
|
|
136
|
-
})), [V.lines]),
|
|
137
|
-
let t =
|
|
137
|
+
})), [V.lines]), yt = new Map(g.map((e) => [e.checkoutProductId?.trim() || e.id, e])), bt = V.lines.flatMap((e) => {
|
|
138
|
+
let t = yt.get(e.checkoutProductId);
|
|
138
139
|
return t?.insurance?.enabled ? [{
|
|
139
140
|
quantity: e.quantity,
|
|
140
141
|
pricePerDayMinor: t.insurance.pricePerDayMinor,
|
|
141
142
|
deductibleAmountMinor: t.insurance.deductibleAmountMinor
|
|
142
143
|
}] : [];
|
|
143
|
-
}),
|
|
144
|
-
resolver:
|
|
144
|
+
}), K = h.modules?.insurance?.enabled === !0 && bt.length > 0, q = K && I, xt = bt.reduce((e, t) => e + t.pricePerDayMinor * t.quantity, 0), St = bt.reduce((e, t) => Math.max(e, t.deductibleAmountMinor), 0), Ct = V.totalMinor ?? 0, J = k?.totalMinor ?? Ct, Y = k?.insuranceSubtotalMinor ?? 0, wt = D?.discountAmountMinor ?? 0, X = e(new URLSearchParams(), R).toString(), Z = `/${_ ?? ""}/booking${X ? `?${X}` : ""}`, Tt = `/${_ ?? ""}/checkout${X ? `?${X}` : ""}`, Et = Pe({
|
|
145
|
+
resolver: Fe(Te),
|
|
145
146
|
defaultValues: {
|
|
146
147
|
fullName: "",
|
|
147
148
|
email: "",
|
|
@@ -152,30 +153,30 @@ function p() {
|
|
|
152
153
|
s(() => {
|
|
153
154
|
i(_, R);
|
|
154
155
|
}, [R, _]), s(() => {
|
|
155
|
-
!
|
|
156
|
-
}, [I,
|
|
157
|
-
let
|
|
156
|
+
!K && I && ot(!1);
|
|
157
|
+
}, [I, K]);
|
|
158
|
+
let Q = (t) => {
|
|
158
159
|
let n = {
|
|
159
160
|
...R,
|
|
160
161
|
...t
|
|
161
162
|
}, r = e(v, n);
|
|
162
|
-
r.toString() !== v.toString() && (
|
|
163
|
+
r.toString() !== v.toString() && (Be(r, { replace: !0 }), i(_, r));
|
|
163
164
|
};
|
|
164
165
|
s(() => {
|
|
165
|
-
if (!_ ||
|
|
166
|
+
if (!_ || G.length === 0 || !z) {
|
|
166
167
|
O(null), A(null), M(!1), N(null), P(null);
|
|
167
168
|
return;
|
|
168
169
|
}
|
|
169
|
-
let e =
|
|
170
|
+
let e = tt.trim(), t = e.length === 0 && !F, n = !1;
|
|
170
171
|
return M(!0), P(null), N(null), (async () => {
|
|
171
172
|
try {
|
|
172
173
|
let r = await o(ye, {
|
|
173
174
|
storeSlug: _,
|
|
174
175
|
schedule: z,
|
|
175
|
-
items:
|
|
176
|
+
items: G,
|
|
176
177
|
couponCode: e || void 0,
|
|
177
178
|
includeAutoApply: t,
|
|
178
|
-
insuranceAccepted:
|
|
179
|
+
insuranceAccepted: q
|
|
179
180
|
}), i = be.parse(r);
|
|
180
181
|
if (n) return;
|
|
181
182
|
if (A(typeof i.subtotalMinor == "number" && typeof i.totalMinor == "number" ? {
|
|
@@ -205,10 +206,10 @@ function p() {
|
|
|
205
206
|
R.startDate,
|
|
206
207
|
R.startTime,
|
|
207
208
|
z,
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
G,
|
|
210
|
+
q,
|
|
210
211
|
_,
|
|
211
|
-
|
|
212
|
+
tt,
|
|
212
213
|
p
|
|
213
214
|
]), s(() => {
|
|
214
215
|
if (!_ || V.lines.length === 0 || !z) {
|
|
@@ -221,8 +222,8 @@ function p() {
|
|
|
221
222
|
let t = await o(_e, {
|
|
222
223
|
storeSlug: _,
|
|
223
224
|
schedule: z,
|
|
224
|
-
estimatedTotalMinor:
|
|
225
|
-
insuranceAmountMinor:
|
|
225
|
+
estimatedTotalMinor: J,
|
|
226
|
+
insuranceAmountMinor: Y
|
|
226
227
|
}), n = ve.parse(t);
|
|
227
228
|
if (e) return;
|
|
228
229
|
if (!n.success || !n.decision) {
|
|
@@ -245,16 +246,16 @@ function p() {
|
|
|
245
246
|
R.startDate,
|
|
246
247
|
R.startTime,
|
|
247
248
|
z,
|
|
248
|
-
|
|
249
|
+
J,
|
|
249
250
|
V.lines.length,
|
|
250
|
-
|
|
251
|
+
Y,
|
|
251
252
|
_,
|
|
252
253
|
p
|
|
253
254
|
]);
|
|
254
|
-
let $ = x?.currency ?? "EUR",
|
|
255
|
-
if (!_ ||
|
|
256
|
-
|
|
257
|
-
let t =
|
|
255
|
+
let $ = x?.currency ?? "EUR", Dt = f(J, $, m.language), Ot = Math.max(0, J - Y), kt = Math.round(Ot / 1.2), At = kt + Y, jt = Math.max(0, Ot - kt), Mt = f(At, $, m.language), Nt = f(jt, $, m.language), Pt = Le(Ie, m.language), Ft = Y > 0 ? f(Y, $, m.language) : void 0, It = x?.amountToCollectMinor ?? 0, Lt = x?.shouldCollectOnlinePayment === !0 && It > 0, Rt = Et.handleSubmit(async (e) => {
|
|
256
|
+
if (!_ || G.length === 0 || !z || b.current) return;
|
|
257
|
+
Ze(!0), b.current = !0;
|
|
258
|
+
let t = qe();
|
|
258
259
|
try {
|
|
259
260
|
let n = await o(ie, {
|
|
260
261
|
storeSlug: _,
|
|
@@ -266,27 +267,27 @@ function p() {
|
|
|
266
267
|
endAddress: R.fulfillment === "delivery" ? R.endAddress : void 0,
|
|
267
268
|
couponCode: D?.code,
|
|
268
269
|
couponAutoApplied: !F && D?.autoApplied,
|
|
269
|
-
insuranceAccepted:
|
|
270
|
+
insuranceAccepted: q,
|
|
270
271
|
customer: {
|
|
271
272
|
name: e.fullName,
|
|
272
273
|
email: e.email,
|
|
273
274
|
phone: e.phone,
|
|
274
275
|
notes: e.notes
|
|
275
276
|
},
|
|
276
|
-
items:
|
|
277
|
+
items: G
|
|
277
278
|
}), r = ae.parse(n);
|
|
278
279
|
if (!r.success || !r.checkout) {
|
|
279
|
-
|
|
280
|
+
Ye(), a.error(r.message || p("checkout_payment_error"));
|
|
280
281
|
return;
|
|
281
282
|
}
|
|
282
|
-
r.checkout.requiresPayment ?
|
|
283
|
+
r.checkout.requiresPayment ? Je(r.checkout.checkoutSessionId ?? t.checkoutSessionId) : a.success(p("checkout_success_toast")), await Ve(r.checkout.nextPath), r.checkout.requiresPayment || Xe();
|
|
283
284
|
} catch (e) {
|
|
284
285
|
console.error("Failed to submit storefront checkout", e), a.error(p("checkout_payment_error"));
|
|
285
286
|
} finally {
|
|
286
|
-
b.current = !1,
|
|
287
|
+
b.current = !1, Ze(!1);
|
|
287
288
|
}
|
|
288
|
-
}),
|
|
289
|
-
return V.lines.length === 0 ? /* @__PURE__ */ u("div", {
|
|
289
|
+
}), zt = p(Lt ? "checkout_continue_to_payment" : "checkout_submit"), Bt = R.fulfillment === "delivery" && R.startAddress.trim().length === 0, Vt = !y && !Qe && !w && !j && !it && !!x && !!z && !Bt && G.length > 0;
|
|
290
|
+
return We ? V.lines.length === 0 ? /* @__PURE__ */ u("div", {
|
|
290
291
|
className: "mx-auto max-w-3xl px-4 py-10 sm:px-6",
|
|
291
292
|
children: /* @__PURE__ */ d("div", {
|
|
292
293
|
className: "rounded-xl border border-slate-200 bg-white p-4 shadow-sm",
|
|
@@ -301,11 +302,11 @@ function p() {
|
|
|
301
302
|
}),
|
|
302
303
|
/* @__PURE__ */ u("div", {
|
|
303
304
|
className: "mt-6",
|
|
304
|
-
children: /* @__PURE__ */ u(
|
|
305
|
-
to:
|
|
305
|
+
children: /* @__PURE__ */ u(De, {
|
|
306
|
+
to: Z,
|
|
306
307
|
children: /* @__PURE__ */ d(de, {
|
|
307
308
|
className: "gap-2",
|
|
308
|
-
children: [/* @__PURE__ */ u(
|
|
309
|
+
children: [/* @__PURE__ */ u(Ne, {
|
|
309
310
|
className: "h-4 w-4",
|
|
310
311
|
"aria-hidden": "true"
|
|
311
312
|
}), /* @__PURE__ */ u("span", { children: p("back_to_booking") })]
|
|
@@ -316,9 +317,9 @@ function p() {
|
|
|
316
317
|
})
|
|
317
318
|
}) : /* @__PURE__ */ u(he, {
|
|
318
319
|
currentStep: "checkout",
|
|
319
|
-
bookingPath:
|
|
320
|
-
checkoutPath:
|
|
321
|
-
backPath:
|
|
320
|
+
bookingPath: Z,
|
|
321
|
+
checkoutPath: Tt,
|
|
322
|
+
backPath: Z,
|
|
322
323
|
backLabel: p("back_to_booking"),
|
|
323
324
|
children: /* @__PURE__ */ d("div", {
|
|
324
325
|
className: "grid gap-6 lg:grid-cols-12",
|
|
@@ -337,33 +338,33 @@ function p() {
|
|
|
337
338
|
/* @__PURE__ */ d("div", {
|
|
338
339
|
className: "mt-5 grid gap-4",
|
|
339
340
|
children: [
|
|
340
|
-
|
|
341
|
+
ut ? /* @__PURE__ */ u("div", {
|
|
341
342
|
className: "rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
|
|
342
343
|
children: /* @__PURE__ */ u(me, {
|
|
343
344
|
value: R.fulfillment,
|
|
344
|
-
onValueChange: (e) =>
|
|
345
|
-
pickupAddress:
|
|
345
|
+
onValueChange: (e) => Q({ fulfillment: e }),
|
|
346
|
+
pickupAddress: dt,
|
|
346
347
|
deliveryEnabled: L,
|
|
347
|
-
deliveryDisabledReason:
|
|
348
|
+
deliveryDisabledReason: lt,
|
|
348
349
|
startAddress: R.startAddress,
|
|
349
|
-
onStartAddressChange: (e) =>
|
|
350
|
+
onStartAddressChange: (e) => Q({ startAddress: e }),
|
|
350
351
|
endAddress: R.endAddress,
|
|
351
|
-
onEndAddressChange: (e) =>
|
|
352
|
+
onEndAddressChange: (e) => Q({ endAddress: e }),
|
|
352
353
|
showPickupAddressWhenPickupOnly: !1,
|
|
353
354
|
testIdPrefix: "storefront-checkout-fulfillment"
|
|
354
355
|
})
|
|
355
356
|
}) : null,
|
|
356
|
-
/* @__PURE__ */ u(xe, { form:
|
|
357
|
-
|
|
358
|
-
accepted:
|
|
357
|
+
/* @__PURE__ */ u(xe, { form: Et }),
|
|
358
|
+
K ? /* @__PURE__ */ u(Se, {
|
|
359
|
+
accepted: q,
|
|
359
360
|
disabled: y || j,
|
|
360
|
-
dailyAmountLabel: f(
|
|
361
|
-
totalAmountLabel:
|
|
361
|
+
dailyAmountLabel: f(xt, $, m.language),
|
|
362
|
+
totalAmountLabel: Ft,
|
|
362
363
|
billableDays: k?.insuranceBillableDays,
|
|
363
|
-
deductibleLabel:
|
|
364
|
-
onAcceptedChange:
|
|
364
|
+
deductibleLabel: St > 0 ? f(St, $, m.language) : void 0,
|
|
365
|
+
onAcceptedChange: ot
|
|
365
366
|
}) : null,
|
|
366
|
-
|
|
367
|
+
Qe ? /* @__PURE__ */ d("div", {
|
|
367
368
|
className: "flex items-center gap-2 text-sm text-slate-600",
|
|
368
369
|
role: "status",
|
|
369
370
|
children: [/* @__PURE__ */ u(ge, {
|
|
@@ -374,7 +375,7 @@ function p() {
|
|
|
374
375
|
w ? /* @__PURE__ */ d("div", {
|
|
375
376
|
className: "flex items-start gap-2 rounded-md bg-destructive p-3 text-sm text-destructive-foreground shadow-sm",
|
|
376
377
|
role: "alert",
|
|
377
|
-
children: [/* @__PURE__ */ u(
|
|
378
|
+
children: [/* @__PURE__ */ u(Me, {
|
|
378
379
|
className: "mt-0.5 h-4 w-4",
|
|
379
380
|
"aria-hidden": "true"
|
|
380
381
|
}), /* @__PURE__ */ u("span", { children: w })]
|
|
@@ -383,49 +384,52 @@ function p() {
|
|
|
383
384
|
type: "button",
|
|
384
385
|
size: "lg",
|
|
385
386
|
onClick: () => {
|
|
386
|
-
|
|
387
|
+
Rt();
|
|
387
388
|
},
|
|
388
|
-
disabled: !
|
|
389
|
+
disabled: !Vt,
|
|
389
390
|
className: "mt-4 w-fit",
|
|
390
|
-
children: /* @__PURE__ */ u("span", { children:
|
|
391
|
+
children: /* @__PURE__ */ u("span", { children: zt })
|
|
391
392
|
}),
|
|
392
|
-
|
|
393
|
+
Bt ? /* @__PURE__ */ u("p", {
|
|
393
394
|
className: "text-sm text-slate-600",
|
|
394
395
|
children: /* @__PURE__ */ u("span", { children: p("checkout_delivery_address_required") })
|
|
395
396
|
}) : null
|
|
396
397
|
]
|
|
397
398
|
})
|
|
398
399
|
]
|
|
399
|
-
}), /* @__PURE__ */ u(
|
|
400
|
-
lines:
|
|
401
|
-
itemCount:
|
|
402
|
-
baseUnitLabel:
|
|
403
|
-
bookingSubtotalLabel:
|
|
404
|
-
vatAmountLabel:
|
|
405
|
-
vatRateLabel:
|
|
406
|
-
bookingTotalLabel:
|
|
407
|
-
onQuantityChange:
|
|
408
|
-
onRemove:
|
|
400
|
+
}), /* @__PURE__ */ u(we, {
|
|
401
|
+
lines: vt.lines,
|
|
402
|
+
itemCount: Ue,
|
|
403
|
+
baseUnitLabel: pt,
|
|
404
|
+
bookingSubtotalLabel: Mt,
|
|
405
|
+
vatAmountLabel: Nt,
|
|
406
|
+
vatRateLabel: Pt,
|
|
407
|
+
bookingTotalLabel: Dt,
|
|
408
|
+
onQuantityChange: Ge,
|
|
409
|
+
onRemove: Ke,
|
|
409
410
|
coupon: {
|
|
410
|
-
code:
|
|
411
|
+
code: et,
|
|
411
412
|
appliedCode: D?.code,
|
|
412
|
-
discountLabel: D &&
|
|
413
|
-
message:
|
|
414
|
-
error:
|
|
413
|
+
discountLabel: D && wt > 0 ? f(wt, $, m.language) : null,
|
|
414
|
+
message: rt,
|
|
415
|
+
error: it,
|
|
415
416
|
loading: j,
|
|
416
417
|
disabled: y,
|
|
417
418
|
onCodeChange: (e) => {
|
|
418
419
|
E(e), P(null), N(null);
|
|
419
420
|
},
|
|
420
421
|
onApply: () => {
|
|
421
|
-
|
|
422
|
+
at(!1), nt(et.trim());
|
|
422
423
|
},
|
|
423
424
|
onRemove: () => {
|
|
424
|
-
E(""),
|
|
425
|
+
E(""), nt(""), O(null), A(null), P(null), N(null), at(!0);
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
428
|
})]
|
|
428
429
|
})
|
|
430
|
+
}) : /* @__PURE__ */ u(Ce, {
|
|
431
|
+
bookingPath: Z,
|
|
432
|
+
checkoutPath: Tt
|
|
429
433
|
});
|
|
430
434
|
}
|
|
431
435
|
//#endregion
|
|
@@ -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":"AACA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAoC7C,eAAO,MAAM,mCAAmC,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,IAe7E,CAAA;AAsFD,KAAK,8BAA8B,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG;IAC5D,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,MAAM,6BAAqC,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEnE,CAAA;AAYnB,MAAM,CAAC,OAAO,UAAU,wBAAwB,4CAyQ/C"}
|