@loczer/storefront-sdk 0.191.0 → 0.192.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 (57) hide show
  1. package/dist/StorefrontProvider.d.ts +9 -0
  2. package/dist/StorefrontProvider.d.ts.map +1 -1
  3. package/dist/chunks/pkg/booking-engine/dist/models/{Product.shared-IYOeC3N7.js → Product.shared-cjcvMCMa.js} +4 -2
  4. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-zsUj5_3O.js → base-asset-CsOe0vXi.js} +1 -1
  5. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-TzCge_mR.js → base-booking-Sjsqh31e.js} +28 -23
  6. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-product-DvFFzAcg.js → base-product-C_ATjuc6.js} +1 -1
  7. package/dist/chunks/pkg/booking-engine/dist/schemas/{cart-inputs-B0HpcFe5.js → cart-inputs-D1_Wmkca.js} +11 -0
  8. package/dist/chunks/pkg/booking-engine/dist/schemas/insurance-B01h642r.js +67 -0
  9. package/dist/chunks/pkg/booking-engine/dist/schemas-D_yUBLa0.js +14 -0
  10. package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
  11. package/dist/components/ContractSaleDocument/Invoice.js +106 -106
  12. package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
  13. package/dist/components/ContractSaleDocument/InvoiceDetails.js +33 -24
  14. package/dist/i18n/en.d.ts +11 -0
  15. package/dist/i18n/en.d.ts.map +1 -1
  16. package/dist/i18n/en.js +11 -0
  17. package/dist/i18n/fr.d.ts +11 -0
  18. package/dist/i18n/fr.d.ts.map +1 -1
  19. package/dist/i18n/fr.js +11 -0
  20. package/dist/index.d.ts +193 -3
  21. package/dist/index.js +66 -65
  22. package/dist/lib/booking.js +2 -2
  23. package/dist/lib/checkoutSubmit.d.ts +8 -2
  24. package/dist/lib/checkoutSubmit.d.ts.map +1 -1
  25. package/dist/lib/checkoutSubmit.js +13 -4
  26. package/dist/lib/checkoutVerifyCoupon.d.ts +3 -0
  27. package/dist/lib/checkoutVerifyCoupon.d.ts.map +1 -1
  28. package/dist/lib/checkoutVerifyCoupon.js +4 -1
  29. package/dist/lib/contractSaleDocument.d.ts +4 -0
  30. package/dist/lib/contractSaleDocument.d.ts.map +1 -1
  31. package/dist/lib/contractSaleDocument.js +3 -1
  32. package/dist/lib/contractSaleDocumentApi.d.ts +6 -0
  33. package/dist/lib/contractSaleDocumentApi.d.ts.map +1 -1
  34. package/dist/lib/storefrontProducts.d.ts +3 -0
  35. package/dist/lib/storefrontProducts.d.ts.map +1 -1
  36. package/dist/lib/storefrontProducts.js +2 -1
  37. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  38. package/dist/pages/CheckoutPage.js +264 -237
  39. package/dist/pages/ContractSaleDocumentPage.d.ts +2 -0
  40. package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
  41. package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts.map +1 -1
  42. package/dist/pages/checkout/components/CheckoutDetailsCard.js +17 -3
  43. package/dist/pages/checkout/components/CheckoutInsuranceCard.d.ts +12 -0
  44. package/dist/pages/checkout/components/CheckoutInsuranceCard.d.ts.map +1 -0
  45. package/dist/pages/checkout/components/CheckoutInsuranceCard.js +53 -0
  46. package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.d.ts +2 -1
  47. package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.d.ts.map +1 -1
  48. package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +47 -30
  49. package/dist/pages/checkout/types.d.ts +2 -1
  50. package/dist/pages/checkout/types.d.ts.map +1 -1
  51. package/dist/pages/checkout/types.js +2 -1
  52. package/dist/storefront.css +1 -1
  53. package/dist/storefrontSchemas.d.ts +6 -0
  54. package/dist/storefrontSchemas.d.ts.map +1 -1
  55. package/dist/storefrontSchemas.js +5 -2
  56. package/package.json +1 -1
  57. package/dist/chunks/pkg/booking-engine/dist/schemas-BNUzqsci.js +0 -13
@@ -71,6 +71,8 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
71
71
  description: string;
72
72
  quantity: number;
73
73
  unitPrice: number;
74
+ taxRate?: number | undefined;
75
+ taxExemptionReason?: string | undefined;
74
76
  }[];
75
77
  acceptanceLevel: "none" | "acceptance" | "signature";
76
78
  date: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"ContractSaleDocumentPage.d.ts","sourceRoot":"","sources":["../../src/pages/ContractSaleDocumentPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAmC,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAsLnG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEA,CAAA;AAYnB,MAAM,CAAC,OAAO,UAAU,wBAAwB,4CAqP/C"}
1
+ {"version":3,"file":"ContractSaleDocumentPage.d.ts","sourceRoot":"","sources":["../../src/pages/ContractSaleDocumentPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAmC,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAsLnG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEA,CAAA;AAYnB,MAAM,CAAC,OAAO,UAAU,wBAAwB,4CAqP/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutDetailsCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutDetailsCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AAG5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAOlD,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAA;AAElE,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,EAAE,wBAAwB,2CA6ErE"}
1
+ {"version":3,"file":"CheckoutDetailsCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutDetailsCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AAG5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAOlD,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAA;AAElE,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,EAAE,wBAAwB,2CA2FrE"}
@@ -28,12 +28,26 @@ function f({ form: f }) {
28
28
  children: [
29
29
  /* @__PURE__ */ l(r, {
30
30
  control: f.control,
31
- name: "full_name",
31
+ name: "first_name",
32
32
  render: ({ field: t }) => /* @__PURE__ */ u(i, { children: [
33
- /* @__PURE__ */ l(a, { children: p("checkout_full_name_label") }),
33
+ /* @__PURE__ */ l(a, { children: p("checkout_first_name_label") }),
34
34
  /* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(e, {
35
35
  ...t,
36
- placeholder: p("checkout_full_name_placeholder")
36
+ autoComplete: "given-name",
37
+ placeholder: p("checkout_first_name_placeholder")
38
+ }) }),
39
+ /* @__PURE__ */ l(o, {})
40
+ ] })
41
+ }),
42
+ /* @__PURE__ */ l(r, {
43
+ control: f.control,
44
+ name: "last_name",
45
+ render: ({ field: t }) => /* @__PURE__ */ u(i, { children: [
46
+ /* @__PURE__ */ l(a, { children: p("checkout_last_name_label") }),
47
+ /* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(e, {
48
+ ...t,
49
+ autoComplete: "family-name",
50
+ placeholder: p("checkout_last_name_placeholder")
37
51
  }) }),
38
52
  /* @__PURE__ */ l(o, {})
39
53
  ] })
@@ -0,0 +1,12 @@
1
+ type CheckoutInsuranceCardProps = {
2
+ accepted: boolean;
3
+ disabled: boolean;
4
+ dailyAmountLabel: string;
5
+ totalAmountLabel?: string;
6
+ billableDays?: number;
7
+ deductibleLabel?: string;
8
+ onAcceptedChange: (accepted: boolean) => void;
9
+ };
10
+ export declare function CheckoutInsuranceCard({ accepted, disabled, dailyAmountLabel, totalAmountLabel, billableDays, deductibleLabel, onAcceptedChange, }: CheckoutInsuranceCardProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=CheckoutInsuranceCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckoutInsuranceCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutInsuranceCard.tsx"],"names":[],"mappings":"AAMA,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;CAC9C,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,gBAAgB,GACjB,EAAE,0BAA0B,2CAsC5B"}
@@ -0,0 +1,53 @@
1
+ import { Card as e } from "../../../ui/card.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { useTranslation as r } from "react-i18next";
4
+ import { ShieldCheck as i } from "lucide-react";
5
+ //#region src/pages/checkout/components/CheckoutInsuranceCard.tsx
6
+ function a({ accepted: a, disabled: o, dailyAmountLabel: s, totalAmountLabel: c, billableDays: l, deductibleLabel: u, onAcceptedChange: d }) {
7
+ let { t: f } = r();
8
+ return /* @__PURE__ */ t(e, {
9
+ className: "border-slate-200 bg-white shadow-sm",
10
+ children: /* @__PURE__ */ n("label", {
11
+ className: "flex cursor-pointer items-start gap-3 px-4 py-4",
12
+ children: [
13
+ /* @__PURE__ */ t("input", {
14
+ type: "checkbox",
15
+ checked: a,
16
+ disabled: o,
17
+ onChange: (e) => d(e.target.checked),
18
+ className: "mt-1 size-4 rounded border-slate-300 text-slate-950 focus:ring-slate-500"
19
+ }),
20
+ /* @__PURE__ */ t(i, {
21
+ className: "mt-0.5 size-5 shrink-0 text-slate-700",
22
+ "aria-hidden": "true"
23
+ }),
24
+ /* @__PURE__ */ n("span", {
25
+ className: "grid min-w-0 flex-1 gap-1",
26
+ children: [
27
+ /* @__PURE__ */ t("span", {
28
+ className: "text-sm font-semibold text-slate-950",
29
+ children: f("checkout_insurance_title")
30
+ }),
31
+ /* @__PURE__ */ t("span", {
32
+ className: "text-xs leading-5 text-slate-600",
33
+ children: f("checkout_insurance_description", { amount: s })
34
+ }),
35
+ u ? /* @__PURE__ */ t("span", {
36
+ className: "text-xs text-slate-600",
37
+ children: f("checkout_insurance_deductible", { amount: u })
38
+ }) : null,
39
+ a && c && l ? /* @__PURE__ */ t("span", {
40
+ className: "mt-1 text-sm font-medium text-slate-900",
41
+ children: f("checkout_insurance_total", {
42
+ amount: c,
43
+ count: l
44
+ })
45
+ }) : null
46
+ ]
47
+ })
48
+ ]
49
+ })
50
+ });
51
+ }
52
+ //#endregion
53
+ export { a as CheckoutInsuranceCard };
@@ -6,6 +6,7 @@ type CheckoutPaymentSummaryCardProps = {
6
6
  totalExcludingTaxLabel: string;
7
7
  vatAmountLabel: string;
8
8
  vatRateLabel: string;
9
+ insuranceAmountLabel?: string;
9
10
  depositAmountLabel: string | null;
10
11
  amountToCollectMinor: number;
11
12
  amountToCollectLabel: string;
@@ -18,6 +19,6 @@ type CheckoutPaymentSummaryCardProps = {
18
19
  submitting: boolean;
19
20
  onSelectPaymentMethod: (method: CheckoutSelectedPaymentMethod) => void;
20
21
  };
21
- export declare function CheckoutPaymentSummaryCard({ estimatedTotalLabel, couponCode, discountAmountLabel, totalExcludingTaxLabel, vatAmountLabel, vatRateLabel, depositAmountLabel, amountToCollectMinor, amountToCollectLabel, paymentSummaryHelper, paymentDecisionLoading, paymentDecisionError, canChoosePaymentMethod, showAmountDueNowRow, selectedPaymentMethod, submitting, onSelectPaymentMethod, }: CheckoutPaymentSummaryCardProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function CheckoutPaymentSummaryCard({ estimatedTotalLabel, couponCode, discountAmountLabel, totalExcludingTaxLabel, vatAmountLabel, vatRateLabel, insuranceAmountLabel, depositAmountLabel, amountToCollectMinor, amountToCollectLabel, paymentSummaryHelper, paymentDecisionLoading, paymentDecisionError, canChoosePaymentMethod, showAmountDueNowRow, selectedPaymentMethod, submitting, onSelectPaymentMethod, }: CheckoutPaymentSummaryCardProps): import("react/jsx-runtime").JSX.Element;
22
23
  export {};
23
24
  //# sourceMappingURL=CheckoutPaymentSummaryCard.d.ts.map
@@ -1 +1 @@
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
+ {"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,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,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,oBAAoB,EACpB,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,2CA8IjC"}
@@ -5,19 +5,19 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  import { useTranslation as a } from "react-i18next";
6
6
  import { AlertTriangle as o } from "lucide-react";
7
7
  //#region src/pages/checkout/components/CheckoutPaymentSummaryCard.tsx
8
- function s({ estimatedTotalLabel: s, couponCode: c, discountAmountLabel: l, totalExcludingTaxLabel: u, vatAmountLabel: d, vatRateLabel: f, depositAmountLabel: p, amountToCollectMinor: m, amountToCollectLabel: h, paymentSummaryHelper: g, paymentDecisionLoading: _, paymentDecisionError: v, canChoosePaymentMethod: y, showAmountDueNowRow: b, selectedPaymentMethod: x, submitting: S, onSelectPaymentMethod: C }) {
9
- let { t: w } = a(), T = [
8
+ function s({ estimatedTotalLabel: s, couponCode: c, discountAmountLabel: l, totalExcludingTaxLabel: u, vatAmountLabel: d, vatRateLabel: f, insuranceAmountLabel: p, depositAmountLabel: m, amountToCollectMinor: h, amountToCollectLabel: g, paymentSummaryHelper: _, paymentDecisionLoading: v, paymentDecisionError: y, canChoosePaymentMethod: b, showAmountDueNowRow: x, selectedPaymentMethod: S, submitting: C, onSelectPaymentMethod: w }) {
9
+ let { t: T } = a(), E = [
10
10
  {
11
11
  id: "card",
12
- label: w("checkout_payment_method_card")
12
+ label: T("checkout_payment_method_card")
13
13
  },
14
14
  {
15
15
  id: "apple_pay",
16
- label: w("checkout_payment_method_apple_pay")
16
+ label: T("checkout_payment_method_apple_pay")
17
17
  },
18
18
  {
19
19
  id: "other",
20
- label: w("checkout_payment_method_other")
20
+ label: T("checkout_payment_method_other")
21
21
  }
22
22
  ];
23
23
  return /* @__PURE__ */ i(t, {
@@ -26,10 +26,10 @@ function s({ estimatedTotalLabel: s, couponCode: c, discountAmountLabel: l, tota
26
26
  className: "border-b border-slate-200 px-4 py-4",
27
27
  children: [/* @__PURE__ */ r("p", {
28
28
  className: "text-sm font-semibold text-slate-950",
29
- children: /* @__PURE__ */ r("span", { children: w("checkout_payment_totals_title") })
30
- }), y ? /* @__PURE__ */ r("p", {
29
+ children: /* @__PURE__ */ r("span", { children: T("checkout_payment_totals_title") })
30
+ }), b ? /* @__PURE__ */ r("p", {
31
31
  className: "mt-1 text-xs text-slate-600",
32
- children: /* @__PURE__ */ r("span", { children: w("checkout_payment_totals_description") })
32
+ children: /* @__PURE__ */ r("span", { children: T("checkout_payment_totals_description") })
33
33
  }) : null]
34
34
  }), /* @__PURE__ */ i("div", {
35
35
  className: "grid gap-4 px-4 py-4",
@@ -41,7 +41,7 @@ function s({ estimatedTotalLabel: s, couponCode: c, discountAmountLabel: l, tota
41
41
  className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 py-2",
42
42
  children: [/* @__PURE__ */ r("dt", {
43
43
  className: "text-slate-700",
44
- children: /* @__PURE__ */ r("span", { children: w("checkout_estimated_total") })
44
+ children: /* @__PURE__ */ r("span", { children: T("checkout_estimated_total") })
45
45
  }), /* @__PURE__ */ r("dd", {
46
46
  className: "font-semibold tabular-nums text-slate-900",
47
47
  children: /* @__PURE__ */ r("span", { children: s })
@@ -51,17 +51,34 @@ function s({ estimatedTotalLabel: s, couponCode: c, discountAmountLabel: l, tota
51
51
  className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
52
52
  children: [/* @__PURE__ */ r("dt", {
53
53
  className: "text-success",
54
- children: /* @__PURE__ */ r("span", { children: w("checkout_coupon_discount", { code: c ?? "" }) })
54
+ children: /* @__PURE__ */ r("span", { children: T("checkout_coupon_discount", { code: c ?? "" }) })
55
55
  }), /* @__PURE__ */ r("dd", {
56
56
  className: "font-medium tabular-nums text-success",
57
57
  children: /* @__PURE__ */ r("span", { children: l })
58
58
  })]
59
59
  }) : null,
60
+ p ? /* @__PURE__ */ i("div", {
61
+ className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
62
+ children: [
63
+ /* @__PURE__ */ r("dt", {
64
+ className: "text-slate-600",
65
+ children: /* @__PURE__ */ r("span", { children: T("checkout_insurance_exempt_line") })
66
+ }),
67
+ /* @__PURE__ */ r("dd", {
68
+ className: "font-medium tabular-nums text-slate-700",
69
+ children: /* @__PURE__ */ r("span", { children: p })
70
+ }),
71
+ /* @__PURE__ */ r("dd", {
72
+ className: "col-span-2 mt-1 text-[11px] text-slate-500",
73
+ children: /* @__PURE__ */ r("span", { children: T("checkout_insurance_tax_notice") })
74
+ })
75
+ ]
76
+ }) : null,
60
77
  /* @__PURE__ */ i("div", {
61
78
  className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
62
79
  children: [/* @__PURE__ */ r("dt", {
63
80
  className: "text-slate-600",
64
- children: /* @__PURE__ */ r("span", { children: w("checkout_payment_total_excluding_tax") })
81
+ children: /* @__PURE__ */ r("span", { children: T("checkout_payment_total_excluding_tax") })
65
82
  }), /* @__PURE__ */ r("dd", {
66
83
  className: "font-medium tabular-nums text-slate-700",
67
84
  children: /* @__PURE__ */ r("span", { children: u })
@@ -71,64 +88,64 @@ function s({ estimatedTotalLabel: s, couponCode: c, discountAmountLabel: l, tota
71
88
  className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
72
89
  children: [/* @__PURE__ */ r("dt", {
73
90
  className: "text-slate-600",
74
- children: /* @__PURE__ */ r("span", { children: w("checkout_payment_vat", { rate: f }) })
91
+ children: /* @__PURE__ */ r("span", { children: T("checkout_payment_vat", { rate: f }) })
75
92
  }), /* @__PURE__ */ r("dd", {
76
93
  className: "font-medium tabular-nums text-slate-700",
77
94
  children: /* @__PURE__ */ r("span", { children: d })
78
95
  })]
79
96
  }),
80
- p ? /* @__PURE__ */ i("div", {
97
+ m ? /* @__PURE__ */ i("div", {
81
98
  className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
82
99
  children: [/* @__PURE__ */ r("dt", {
83
100
  className: "text-slate-700",
84
- children: /* @__PURE__ */ r("span", { children: w("checkout_payment_deposit_amount") })
101
+ children: /* @__PURE__ */ r("span", { children: T("checkout_payment_deposit_amount") })
85
102
  }), /* @__PURE__ */ r("dd", {
86
103
  className: "font-medium tabular-nums text-slate-900",
87
- children: /* @__PURE__ */ r("span", { children: p })
104
+ children: /* @__PURE__ */ r("span", { children: m })
88
105
  })]
89
106
  }) : null,
90
- b ? /* @__PURE__ */ i("div", {
107
+ x ? /* @__PURE__ */ i("div", {
91
108
  className: "mt-1 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-200 pt-3",
92
109
  children: [/* @__PURE__ */ r("dt", {
93
110
  className: "text-sm font-semibold text-slate-900",
94
- children: /* @__PURE__ */ r("span", { children: w("checkout_payment_amount_due_now") })
111
+ children: /* @__PURE__ */ r("span", { children: T("checkout_payment_amount_due_now") })
95
112
  }), /* @__PURE__ */ r("dd", {
96
- className: `text-base font-bold tabular-nums tracking-tight ${m > 0 ? "text-slate-950" : "text-slate-800"}`,
97
- children: /* @__PURE__ */ r("span", { children: h })
113
+ className: `text-base font-bold tabular-nums tracking-tight ${h > 0 ? "text-slate-950" : "text-slate-800"}`,
114
+ children: /* @__PURE__ */ r("span", { children: g })
98
115
  })]
99
116
  }) : null
100
117
  ]
101
118
  }),
102
- g ? /* @__PURE__ */ r("p", {
119
+ _ ? /* @__PURE__ */ r("p", {
103
120
  className: "text-xs text-slate-600",
104
- children: /* @__PURE__ */ r("span", { children: g })
121
+ children: /* @__PURE__ */ r("span", { children: _ })
105
122
  }) : null,
106
- _ ? /* @__PURE__ */ i("div", {
123
+ v ? /* @__PURE__ */ i("div", {
107
124
  className: "flex items-center gap-2 text-sm text-slate-600",
108
125
  children: [/* @__PURE__ */ r(n, {
109
126
  className: "size-4",
110
127
  "aria-hidden": "true"
111
- }), /* @__PURE__ */ r("span", { children: w("checkout_payment_loading") })]
128
+ }), /* @__PURE__ */ r("span", { children: T("checkout_payment_loading") })]
112
129
  }) : null,
113
- v ? /* @__PURE__ */ r("div", {
130
+ y ? /* @__PURE__ */ r("div", {
114
131
  className: "grid gap-3 rounded-md bg-destructive p-3 text-destructive-foreground shadow-sm",
115
132
  children: /* @__PURE__ */ i("div", {
116
133
  className: "flex items-start gap-2 text-sm",
117
134
  children: [/* @__PURE__ */ r(o, {
118
135
  className: "mt-0.5 h-4 w-4",
119
136
  "aria-hidden": "true"
120
- }), /* @__PURE__ */ r("span", { children: v })]
137
+ }), /* @__PURE__ */ r("span", { children: y })]
121
138
  })
122
139
  }) : null,
123
- !_ && !v && y ? /* @__PURE__ */ r("div", {
140
+ !v && !y && b ? /* @__PURE__ */ r("div", {
124
141
  className: "grid gap-2 sm:grid-cols-3",
125
- children: T.map((t) => /* @__PURE__ */ r(e, {
142
+ children: E.map((t) => /* @__PURE__ */ r(e, {
126
143
  type: "button",
127
- variant: x === t.id ? "default" : "outline",
128
- disabled: S,
144
+ variant: S === t.id ? "default" : "outline",
145
+ disabled: C,
129
146
  className: "h-9 rounded-full px-4 text-xs",
130
147
  onClick: () => {
131
- C(t.id);
148
+ w(t.id);
132
149
  },
133
150
  children: /* @__PURE__ */ r("span", { children: t.label })
134
151
  }, t.id))
@@ -2,7 +2,8 @@ import { z } from 'zod';
2
2
  import { ResponsePayload as CheckoutPaymentSessionResponse } from '../../lib/checkoutPaymentSession';
3
3
  import { ResponsePayload as CheckoutPaymentDecisionResponse } from '../../lib/checkoutPaymentDecision';
4
4
  export declare const checkoutFormSchema: z.ZodObject<{
5
- full_name: z.ZodString;
5
+ first_name: z.ZodString;
6
+ last_name: z.ZodString;
6
7
  email: z.ZodString;
7
8
  phone: z.ZodString;
8
9
  notes: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/pages/checkout/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,eAAe,IAAI,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AACzG,OAAO,KAAK,EAAE,eAAe,IAAI,+BAA+B,EAAE,MAAM,mCAAmC,CAAA;AAG3G,eAAO,MAAM,kBAAkB;;;;;iBAK7B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AACnE,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAC,+BAA+B,CAAC,UAAU,CAAC,CAAC,CAAA;AAC9F,MAAM,MAAM,sBAAsB,GAAG,8BAA8B,CAAA;AACnE,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/pages/checkout/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,eAAe,IAAI,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AACzG,OAAO,KAAK,EAAE,eAAe,IAAI,+BAA+B,EAAE,MAAM,mCAAmC,CAAA;AAG3G,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AACnE,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAC,+BAA+B,CAAC,UAAU,CAAC,CAAC,CAAA;AAC9F,MAAM,MAAM,sBAAsB,GAAG,8BAA8B,CAAA;AACnE,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAA"}
@@ -1,7 +1,8 @@
1
1
  import { z as e } from "zod";
2
2
  //#region src/pages/checkout/types.ts
3
3
  var t = e.object({
4
- full_name: e.string().trim().min(2),
4
+ first_name: e.string().trim().min(1),
5
+ last_name: e.string().trim().min(1),
5
6
  email: e.string().trim().email(),
6
7
  phone: e.string().trim().min(6),
7
8
  notes: e.string().trim().max(2e3).optional().or(e.literal(""))