@loczer/storefront-sdk 0.238.0 → 0.240.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 (51) hide show
  1. package/dist/StorefrontContext.d.ts +54 -0
  2. package/dist/StorefrontContext.d.ts.map +1 -1
  3. package/dist/StorefrontProvider.d.ts +27 -0
  4. package/dist/StorefrontProvider.d.ts.map +1 -1
  5. package/dist/chunks/pkg/booking-engine/dist/models/{LocalizedString-D_TRgAdr.js → LocalizedString-JmOX62C3.js} +1 -1
  6. package/dist/chunks/pkg/booking-engine/dist/models/{Product.shared-CWP_qule.js → Product.shared-C_HehlKK.js} +3 -3
  7. package/dist/chunks/pkg/booking-engine/dist/models/types-ynW5hdp8.js +8 -0
  8. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-BhIOL2rP.js → base-asset-CFAxfmRW.js} +3 -3
  9. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-BJXFzDM5.js → base-booking-CZOR9kya.js} +13 -12
  10. package/dist/chunks/pkg/booking-engine/dist/schemas/base-product-QYQBl0fQ.js +4 -0
  11. package/dist/chunks/pkg/booking-engine/dist/schemas/{booking-engine-configuration-LnrhShqm.js → booking-engine-configuration-CxKlxKCo.js} +1 -1
  12. package/dist/chunks/pkg/booking-engine/dist/schemas/booking-reference-DLKcpIa4.js +13 -0
  13. package/dist/chunks/pkg/booking-engine/dist/schemas/{cart-inputs-3lBblkB0.js → cart-inputs-D1KobIdr.js} +4 -4
  14. package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-DXc34Bzy.js → insurance-B-Vmdlxo.js} +3 -3
  15. package/dist/chunks/pkg/booking-engine/dist/schemas/{product-id--yyUTH1Y.js → product-id-ChdStzgp.js} +1 -1
  16. package/dist/chunks/pkg/booking-engine/dist/schemas/{public-booking-engine-configuration-CEM9mexX.js → public-booking-engine-configuration-BwWn9aK0.js} +1 -1
  17. package/dist/chunks/pkg/booking-engine/dist/schemas-lb2iTDMd.js +17 -0
  18. package/dist/components/ContractSaleDocument/InvoiceDetails.js +1 -1
  19. package/dist/components/ContractSaleDocument/SignatureModal.d.ts.map +1 -1
  20. package/dist/components/ContractSaleDocument/SignatureModal.js +79 -54
  21. package/dist/components/FaqSection/index.d.ts.map +1 -1
  22. package/dist/components/FaqSection/index.js +44 -26
  23. package/dist/components/Footer/businessHoursStatus.js +1 -1
  24. package/dist/components/SignatureInput/index.js +2 -1
  25. package/dist/components/SignatureInput.d.ts.map +1 -1
  26. package/dist/components/StorefrontInformationDocument/index.d.ts +4 -0
  27. package/dist/components/StorefrontInformationDocument/index.d.ts.map +1 -1
  28. package/dist/components/StorefrontInformationDocument/index.js +20 -11
  29. package/dist/i18n/en.js +1 -1
  30. package/dist/i18n/fr.js +1 -1
  31. package/dist/index.d.ts +193 -0
  32. package/dist/index.js +87 -86
  33. package/dist/lib/booking-period.js +1 -1
  34. package/dist/lib/booking.js +2 -2
  35. package/dist/lib/checkoutSubmit.d.ts.map +1 -1
  36. package/dist/lib/checkoutSubmit.js +45 -44
  37. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  38. package/dist/pages/CheckoutPage.js +152 -151
  39. package/dist/pages/InsuranceTermsPage.d.ts.map +1 -1
  40. package/dist/pages/InsuranceTermsPage.js +18 -16
  41. package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts +2 -1
  42. package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts.map +1 -1
  43. package/dist/pages/checkout/components/CheckoutDetailsCard.js +17 -14
  44. package/dist/storefront.css +1 -1
  45. package/dist/storefrontSchemas.d.ts +89 -0
  46. package/dist/storefrontSchemas.d.ts.map +1 -1
  47. package/dist/storefrontSchemas.js +21 -17
  48. package/package.json +1 -1
  49. package/dist/chunks/pkg/booking-engine/dist/models/types-rIp4ReXN.js +0 -8
  50. package/dist/chunks/pkg/booking-engine/dist/schemas/base-product-Bde9lJQD.js +0 -4
  51. package/dist/chunks/pkg/booking-engine/dist/schemas-JjiUWFIv.js +0 -16
@@ -7,18 +7,18 @@ import { useTranslation as d } from "react-i18next";
7
7
  import { PhoneNumberInput as f, cn as p } from "@rpcbase/ui";
8
8
  //#region src/pages/checkout/components/CheckoutDetailsCard.tsx
9
9
  var m = (e) => e.startsWith("fr") ? "FR" : "US";
10
- function h({ form: h }) {
11
- let { t: g, i18n: _ } = d();
10
+ function h({ form: h, onSubmit: g }) {
11
+ let { t: _, i18n: v } = d();
12
12
  return /* @__PURE__ */ u(c, {
13
13
  className: "border-slate-200 bg-white shadow-sm",
14
14
  children: [/* @__PURE__ */ u("div", {
15
15
  className: "border-b border-slate-200 px-4 py-4",
16
16
  children: [/* @__PURE__ */ l("p", {
17
17
  className: "text-sm font-semibold text-slate-950",
18
- children: /* @__PURE__ */ l("span", { children: g("checkout_form_title") })
18
+ children: /* @__PURE__ */ l("span", { children: _("checkout_form_title") })
19
19
  }), /* @__PURE__ */ l("p", {
20
20
  className: "mt-1 text-xs text-slate-600",
21
- children: /* @__PURE__ */ l("span", { children: g("checkout_form_description") })
21
+ children: /* @__PURE__ */ l("span", { children: _("checkout_form_description") })
22
22
  })]
23
23
  }), /* @__PURE__ */ l("div", {
24
24
  className: "px-4 py-4",
@@ -26,17 +26,20 @@ function h({ form: h }) {
26
26
  ...h,
27
27
  children: /* @__PURE__ */ u("form", {
28
28
  onSubmit: (e) => e.preventDefault(),
29
+ onKeyDown: (e) => {
30
+ e.key !== "Enter" || !e.metaKey && !e.ctrlKey || (e.preventDefault(), g());
31
+ },
29
32
  className: "grid gap-3",
30
33
  children: [
31
34
  /* @__PURE__ */ l(r, {
32
35
  control: h.control,
33
36
  name: "fullName",
34
37
  render: ({ field: t }) => /* @__PURE__ */ u(i, { children: [
35
- /* @__PURE__ */ l(a, { children: g("checkout_full_name_label") }),
38
+ /* @__PURE__ */ l(a, { children: _("checkout_full_name_label") }),
36
39
  /* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(e, {
37
40
  ...t,
38
41
  autoComplete: "name",
39
- placeholder: g("checkout_full_name_placeholder")
42
+ placeholder: _("checkout_full_name_placeholder")
40
43
  }) }),
41
44
  /* @__PURE__ */ l(o, {})
42
45
  ] })
@@ -45,11 +48,11 @@ function h({ form: h }) {
45
48
  control: h.control,
46
49
  name: "email",
47
50
  render: ({ field: t }) => /* @__PURE__ */ u(i, { children: [
48
- /* @__PURE__ */ l(a, { children: g("checkout_email_label") }),
51
+ /* @__PURE__ */ l(a, { children: _("checkout_email_label") }),
49
52
  /* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(e, {
50
53
  ...t,
51
54
  type: "email",
52
- placeholder: g("checkout_email_placeholder")
55
+ placeholder: _("checkout_email_placeholder")
53
56
  }) }),
54
57
  /* @__PURE__ */ l(o, {})
55
58
  ] })
@@ -58,7 +61,7 @@ function h({ form: h }) {
58
61
  control: h.control,
59
62
  name: "phone",
60
63
  render: ({ field: e, fieldState: t }) => /* @__PURE__ */ u(i, { children: [
61
- /* @__PURE__ */ l(a, { children: g("checkout_phone_label") }),
64
+ /* @__PURE__ */ l(a, { children: _("checkout_phone_label") }),
62
65
  /* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(f, {
63
66
  name: e.name,
64
67
  value: e.value ?? "",
@@ -67,9 +70,9 @@ function h({ form: h }) {
67
70
  let n = t.e164 || t.formattedInternational || t.rawInput || "";
68
71
  e.onChange(n);
69
72
  },
70
- defaultCountry: m(_.language),
71
- locale: _.language,
72
- placeholder: g("checkout_phone_placeholder"),
73
+ defaultCountry: m(v.language),
74
+ locale: v.language,
75
+ placeholder: _("checkout_phone_placeholder"),
73
76
  className: "relative",
74
77
  inputClassName: p(t.error && "border-destructive focus-visible:ring-destructive"),
75
78
  renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */ l(o, { children: /* @__PURE__ */ l("span", { children: e }) })
@@ -81,11 +84,11 @@ function h({ form: h }) {
81
84
  control: h.control,
82
85
  name: "notes",
83
86
  render: ({ field: e }) => /* @__PURE__ */ u(i, { children: [
84
- /* @__PURE__ */ l(a, { children: g("checkout_notes_label") }),
87
+ /* @__PURE__ */ l(a, { children: _("checkout_notes_label") }),
85
88
  /* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(s, {
86
89
  ...e,
87
90
  rows: 4,
88
- placeholder: g("checkout_notes_placeholder")
91
+ placeholder: _("checkout_notes_placeholder")
89
92
  }) }),
90
93
  /* @__PURE__ */ l(o, {})
91
94
  ] })