@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.
Files changed (39) hide show
  1. package/dist/chunks/pkg/ui/dist/LanguagePicker/index-D7_3voTe.js +83 -0
  2. package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -1
  3. package/dist/components/BookingBikeQuickAddCard/index.js +0 -3
  4. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  5. package/dist/components/BookingBikeVariantDialog/index.js +7 -9
  6. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  7. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  8. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
  9. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
  10. package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
  11. package/dist/components/ContractSaleDocument/InvoiceDetails.js +62 -56
  12. package/dist/components/Header/index.d.ts.map +1 -1
  13. package/dist/components/Header/index.js +56 -56
  14. package/dist/components/LanguageSelector/index.d.ts.map +1 -1
  15. package/dist/components/LanguageSelector/index.js +19 -64
  16. package/dist/i18n/en.d.ts +2 -0
  17. package/dist/i18n/en.d.ts.map +1 -1
  18. package/dist/i18n/en.js +3 -1
  19. package/dist/i18n/fr.d.ts +2 -0
  20. package/dist/i18n/fr.d.ts.map +1 -1
  21. package/dist/i18n/fr.js +3 -1
  22. package/dist/index.d.ts +5 -0
  23. package/dist/lib/cart.d.ts +1 -0
  24. package/dist/lib/cart.d.ts.map +1 -1
  25. package/dist/lib/cart.js +2 -0
  26. package/dist/pages/BookingPage.d.ts.map +1 -1
  27. package/dist/pages/BookingPage.js +292 -292
  28. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  29. package/dist/pages/CheckoutPage.js +107 -103
  30. package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
  31. package/dist/pages/ContractSaleDocumentPage.js +117 -171
  32. package/dist/pages/ProductPage.d.ts.map +1 -1
  33. package/dist/pages/ProductPage.js +31 -31
  34. package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts +7 -0
  35. package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts.map +1 -0
  36. package/dist/pages/checkout/components/CheckoutLoadingSkeleton.js +105 -0
  37. package/dist/storefront.css +1 -1
  38. package/package.json +1 -1
  39. 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":"AAoFA,MAAM,CAAC,OAAO,UAAU,YAAY,4CAqoBnC"}
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 { CheckoutSummaryColumn as Ce } from "./checkout/components/CheckoutSummaryColumn.js";
19
- import { checkoutFormSchema as we } from "./checkout/types.js";
20
- import { useEffect as s, useMemo as c, useRef as Te, useState as l } from "react";
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 Ee, useNavigate as De, useParams as Oe, useSearchParams as ke } from "@rpcbase/router";
23
- import { useTranslation as Ae } from "react-i18next";
24
- import { AlertTriangle as je, ArrowLeft as Me } from "lucide-react";
25
- import { useForm as Ne, zodResolver as Pe } from "@rpcbase/form";
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 Fe = .2, f = (e, t, n) => {
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
- }, Ie = (e, t) => {
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 } = Ae(), { storefrontConfiguration: h } = fe(), Le = h.workspace?.workspaceLanguage, { bikes: g, accessories: Re } = pe(), { storeSlug: _ } = Oe(), [v, ze] = ke(), Be = De(), { items: Ve, itemCount: He, setQuantity: Ue, removeItem: We, beginCheckoutSubmission: Ge, confirmCheckoutPaymentSession: Ke, clearCheckoutSession: qe, clear: Je } = ee(), [y, Ye] = l(!1), b = Te(!1), [x, S] = l(null), [Xe, C] = l(!1), [w, T] = l(null), Ze = v.get("coupon") ?? v.get("code") ?? "", [Qe, E] = l(Ze), [$e, et] = l(Ze.trim()), [D, O] = l(null), [k, A] = l(null), [j, M] = l(!1), [tt, N] = l(null), [nt, P] = l(null), [F, rt] = l(!1), [I, it] = l(!1), at = n(v).toString(), ot = c(() => r(new URLSearchParams(at), _), [at, _]), L = h.settings.fulfillmentModes.includes("delivery"), st = h.settings.deliveryDisabledReason.trim(), ct = L || st.length > 0, lt = h.shop.address?.trim() ?? "", R = c(() => {
49
- let e = t(ot, {
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
- }, [ot, L]), z = c(() => le(R), [R]), B = h.bookingEngine.pricing, ut = te(R, B, h.bookingEngine.shop.timeZone), dt = ne(B.baseUnit, p), ft = ut?.billableUnitCount, V = c(() => re({
58
- items: Ve,
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: Le,
61
+ fallbackLanguage: Re,
61
62
  products: {
62
63
  bikes: g,
63
- accessories: Re
64
+ accessories: ze
64
65
  },
65
66
  priceUnit: B.baseUnit,
66
- billableUnitCount: ft
67
+ billableUnitCount: mt
67
68
  }), [
68
- Re,
69
+ ze,
69
70
  g,
70
- ft,
71
+ mt,
71
72
  m.language,
72
- Ve,
73
+ He,
73
74
  B.baseUnit,
74
- Le
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]), [pt, U] = l([]), [W, G] = l(!1);
80
+ })), [V.lines]), [ht, U] = l([]), [gt, W] = l(!1);
80
81
  s(() => {
81
82
  if (!_ || H.length === 0) {
82
- U([]), G(!1);
83
+ U([]), W(!1);
83
84
  return;
84
85
  }
85
86
  if (!z) {
86
- U([]), G(!1);
87
+ U([]), W(!1);
87
88
  return;
88
89
  }
89
90
  let e = !1;
90
- return G(!0), U([]), (async () => {
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 || G(!1);
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 mt = c(() => new Map(pt.map((e) => [se(e.productId, e.productVariantId), e])), [pt]), ht = c(() => ({
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 = mt.get(se(e.checkoutProductId, e.productVariantId)), n = t ? ce(t) : e.availabilityStatus === "OUT_OF_STOCK" ? "unavailable" : void 0;
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: !W && n !== void 0,
124
- availabilityIssue: W ? void 0 : n
124
+ insufficientCapacity: !gt && n !== void 0,
125
+ availabilityIssue: gt ? void 0 : n
125
126
  };
126
127
  })
127
128
  }), [
128
- mt,
129
- W,
129
+ _t,
130
+ gt,
130
131
  V
131
- ]), K = c(() => V.lines.map((e) => ({
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]), gt = new Map(g.map((e) => [e.checkoutProductId?.trim() || e.id, e])), q = V.lines.flatMap((e) => {
137
- let t = gt.get(e.checkoutProductId);
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
- }), J = h.modules?.insurance?.enabled === !0 && q.length > 0, Y = J && I, _t = q.reduce((e, t) => e + t.pricePerDayMinor * t.quantity, 0), vt = q.reduce((e, t) => Math.max(e, t.deductibleAmountMinor), 0), yt = V.totalMinor ?? 0, X = k?.totalMinor ?? yt, Z = k?.insuranceSubtotalMinor ?? 0, bt = D?.discountAmountMinor ?? 0, Q = e(new URLSearchParams(), R).toString(), xt = `/${_ ?? ""}/booking${Q ? `?${Q}` : ""}`, St = `/${_ ?? ""}/checkout${Q ? `?${Q}` : ""}`, Ct = Ne({
144
- resolver: Pe(we),
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
- !J && I && it(!1);
156
- }, [I, J]);
157
- let wt = (t) => {
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() && (ze(r, { replace: !0 }), i(_, r));
163
+ r.toString() !== v.toString() && (Be(r, { replace: !0 }), i(_, r));
163
164
  };
164
165
  s(() => {
165
- if (!_ || K.length === 0 || !z) {
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 = $e.trim(), t = e.length === 0 && !F, n = !1;
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: K,
176
+ items: G,
176
177
  couponCode: e || void 0,
177
178
  includeAutoApply: t,
178
- insuranceAccepted: Y
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
- K,
209
- Y,
209
+ G,
210
+ q,
210
211
  _,
211
- $e,
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: X,
225
- insuranceAmountMinor: Z
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
- X,
249
+ J,
249
250
  V.lines.length,
250
- Z,
251
+ Y,
251
252
  _,
252
253
  p
253
254
  ]);
254
- let $ = x?.currency ?? "EUR", Tt = f(X, $, m.language), Et = Math.max(0, X - Z), Dt = Math.round(Et / 1.2), Ot = Dt + Z, kt = Math.max(0, Et - Dt), At = f(Ot, $, m.language), jt = f(kt, $, m.language), Mt = Ie(Fe, m.language), Nt = Z > 0 ? f(Z, $, m.language) : void 0, Pt = x?.amountToCollectMinor ?? 0, Ft = x?.shouldCollectOnlinePayment === !0 && Pt > 0, It = Ct.handleSubmit(async (e) => {
255
- if (!_ || K.length === 0 || !z || b.current) return;
256
- Ye(!0), b.current = !0;
257
- let t = Ge();
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: Y,
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: K
277
+ items: G
277
278
  }), r = ae.parse(n);
278
279
  if (!r.success || !r.checkout) {
279
- qe(), a.error(r.message || p("checkout_payment_error"));
280
+ Ye(), a.error(r.message || p("checkout_payment_error"));
280
281
  return;
281
282
  }
282
- r.checkout.requiresPayment ? Ke(r.checkout.checkoutSessionId ?? t.checkoutSessionId) : a.success(p("checkout_success_toast")), await Be(r.checkout.nextPath), r.checkout.requiresPayment || Je();
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, Ye(!1);
287
+ b.current = !1, Ze(!1);
287
288
  }
288
- }), Lt = p(Ft ? "checkout_continue_to_payment" : "checkout_submit"), Rt = R.fulfillment === "delivery" && R.startAddress.trim().length === 0, zt = !y && !Xe && !w && !j && !nt && !!x && !!z && !Rt && K.length > 0;
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(Ee, {
305
- to: xt,
305
+ children: /* @__PURE__ */ u(De, {
306
+ to: Z,
306
307
  children: /* @__PURE__ */ d(de, {
307
308
  className: "gap-2",
308
- children: [/* @__PURE__ */ u(Me, {
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: xt,
320
- checkoutPath: St,
321
- backPath: xt,
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
- ct ? /* @__PURE__ */ u("div", {
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) => wt({ fulfillment: e }),
345
- pickupAddress: lt,
345
+ onValueChange: (e) => Q({ fulfillment: e }),
346
+ pickupAddress: dt,
346
347
  deliveryEnabled: L,
347
- deliveryDisabledReason: st,
348
+ deliveryDisabledReason: lt,
348
349
  startAddress: R.startAddress,
349
- onStartAddressChange: (e) => wt({ startAddress: e }),
350
+ onStartAddressChange: (e) => Q({ startAddress: e }),
350
351
  endAddress: R.endAddress,
351
- onEndAddressChange: (e) => wt({ endAddress: 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: Ct }),
357
- J ? /* @__PURE__ */ u(Se, {
358
- accepted: Y,
357
+ /* @__PURE__ */ u(xe, { form: Et }),
358
+ K ? /* @__PURE__ */ u(Se, {
359
+ accepted: q,
359
360
  disabled: y || j,
360
- dailyAmountLabel: f(_t, $, m.language),
361
- totalAmountLabel: Nt,
361
+ dailyAmountLabel: f(xt, $, m.language),
362
+ totalAmountLabel: Ft,
362
363
  billableDays: k?.insuranceBillableDays,
363
- deductibleLabel: vt > 0 ? f(vt, $, m.language) : void 0,
364
- onAcceptedChange: it
364
+ deductibleLabel: St > 0 ? f(St, $, m.language) : void 0,
365
+ onAcceptedChange: ot
365
366
  }) : null,
366
- Xe ? /* @__PURE__ */ d("div", {
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(je, {
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
- It();
387
+ Rt();
387
388
  },
388
- disabled: !zt,
389
+ disabled: !Vt,
389
390
  className: "mt-4 w-fit",
390
- children: /* @__PURE__ */ u("span", { children: Lt })
391
+ children: /* @__PURE__ */ u("span", { children: zt })
391
392
  }),
392
- Rt ? /* @__PURE__ */ u("p", {
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(Ce, {
400
- lines: ht.lines,
401
- itemCount: He,
402
- baseUnitLabel: dt,
403
- bookingSubtotalLabel: At,
404
- vatAmountLabel: jt,
405
- vatRateLabel: Mt,
406
- bookingTotalLabel: Tt,
407
- onQuantityChange: Ue,
408
- onRemove: We,
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: Qe,
411
+ code: et,
411
412
  appliedCode: D?.code,
412
- discountLabel: D && bt > 0 ? f(bt, $, m.language) : null,
413
- message: tt,
414
- error: nt,
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
- rt(!1), et(Qe.trim());
422
+ at(!1), nt(et.trim());
422
423
  },
423
424
  onRemove: () => {
424
- E(""), et(""), O(null), A(null), P(null), N(null), rt(!0);
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":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAmC7C,eAAO,MAAM,mCAAmC,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,IAe7E,CAAA;AA0KD,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,4CA8P/C"}
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"}