@loczer/storefront-sdk 0.239.0 → 0.241.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 (42) 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/{Product.shared-C_HehlKK.js → Product.shared-VisFafx-.js} +6 -1
  6. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-CFAxfmRW.js → base-asset-BuqI-BM_.js} +2 -1
  7. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-CZOR9kya.js → base-booking-gCY-ZP5p.js} +2 -2
  8. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-product-QYQBl0fQ.js → base-product-r04ZJglB.js} +1 -1
  9. package/dist/chunks/pkg/booking-engine/dist/schemas/{cart-inputs-D1KobIdr.js → cart-inputs-ps94yuAR.js} +1 -1
  10. package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-B-Vmdlxo.js → insurance-XwIj1m3Z.js} +1 -1
  11. package/dist/chunks/pkg/booking-engine/dist/{schemas-lb2iTDMd.js → schemas-7yx45S2o.js} +6 -6
  12. package/dist/components/ContractSaleDocument/InvoiceDetails.js +1 -1
  13. package/dist/components/ContractSaleDocument/SignatureModal.d.ts.map +1 -1
  14. package/dist/components/ContractSaleDocument/SignatureModal.js +79 -54
  15. package/dist/components/FaqSection/index.d.ts.map +1 -1
  16. package/dist/components/FaqSection/index.js +44 -26
  17. package/dist/components/Footer/businessHoursStatus.js +1 -1
  18. package/dist/components/SignatureInput/index.js +2 -1
  19. package/dist/components/SignatureInput.d.ts.map +1 -1
  20. package/dist/components/StorefrontInformationDocument/index.d.ts +4 -0
  21. package/dist/components/StorefrontInformationDocument/index.d.ts.map +1 -1
  22. package/dist/components/StorefrontInformationDocument/index.js +20 -11
  23. package/dist/i18n/en.js +1 -1
  24. package/dist/i18n/fr.js +1 -1
  25. package/dist/index.d.ts +185 -6
  26. package/dist/index.js +79 -79
  27. package/dist/lib/booking-period.d.ts.map +1 -1
  28. package/dist/lib/booking-period.js +12 -12
  29. package/dist/lib/booking.js +2 -2
  30. package/dist/lib/checkoutSubmit.js +3 -3
  31. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  32. package/dist/pages/CheckoutPage.js +152 -151
  33. package/dist/pages/InsuranceTermsPage.d.ts.map +1 -1
  34. package/dist/pages/InsuranceTermsPage.js +18 -16
  35. package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts +2 -1
  36. package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts.map +1 -1
  37. package/dist/pages/checkout/components/CheckoutDetailsCard.js +17 -14
  38. package/dist/storefront.css +1 -1
  39. package/dist/storefrontSchemas.d.ts +89 -0
  40. package/dist/storefrontSchemas.d.ts.map +1 -1
  41. package/dist/storefrontSchemas.js +20 -16
  42. package/package.json +1 -1
@@ -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
  ] })