@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
@@ -2,53 +2,71 @@ import { getLocalizedValue as e } from "../../localization.js";
2
2
  import { useStorefront as t } from "../../StorefrontContext.js";
3
3
  import { useState as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { useTranslation as a } from "react-i18next";
6
- import { ChevronDown as o } from "lucide-react";
7
- import { Accordion as s } from "@base-ui/react/accordion";
5
+ import { Link as a } from "@rpcbase/router";
6
+ import { useTranslation as o } from "react-i18next";
7
+ import { ArrowRight as s, ChevronDown as c } from "lucide-react";
8
+ import { Accordion as l } from "@base-ui/react/accordion";
8
9
  //#region src/components/FaqSection/index.tsx
9
- var c = [
10
+ var u = [
10
11
  "general",
11
12
  "deliveries",
12
13
  "booking"
13
14
  ];
14
- function l({ items: e }) {
15
- let [t, a] = n([]);
16
- return /* @__PURE__ */ r(s.Root, {
15
+ function d({ items: e }) {
16
+ let [t, o] = n([]);
17
+ return /* @__PURE__ */ r(l.Root, {
17
18
  className: "w-full",
18
19
  value: t,
19
- onValueChange: a,
20
+ onValueChange: o,
20
21
  keepMounted: !0,
21
22
  "data-testid": "storefront-faq-column",
22
- children: e.map((e) => /* @__PURE__ */ i(s.Item, {
23
+ children: e.map((e) => /* @__PURE__ */ i(l.Item, {
23
24
  value: e.id,
24
25
  className: "border-b border-slate-200",
25
- children: [/* @__PURE__ */ r(s.Header, {
26
+ children: [/* @__PURE__ */ r(l.Header, {
26
27
  className: "flex",
27
- children: /* @__PURE__ */ i(s.Trigger, {
28
- className: "flex w-full flex-1 items-center justify-between gap-4 py-4 text-left text-lg font-medium text-slate-700 transition-colors hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[panel-open]:[&>svg]:rotate-180",
29
- children: [/* @__PURE__ */ r("span", { children: e.question }), /* @__PURE__ */ r(o, {
30
- className: "h-4 w-4 shrink-0 transition-transform duration-200",
31
- "aria-hidden": "true"
28
+ children: /* @__PURE__ */ i(l.Trigger, {
29
+ className: "group flex w-full flex-1 items-center justify-between gap-4 py-4 text-left text-base font-semibold text-slate-950 transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[panel-open]:text-primary",
30
+ children: [/* @__PURE__ */ r("span", { children: e.question }), /* @__PURE__ */ r("span", {
31
+ className: "grid size-7 shrink-0 place-items-center rounded-full border border-slate-200 bg-white text-slate-500 transition-colors group-hover:border-primary/30 group-hover:text-primary group-data-[panel-open]:border-primary/30 group-data-[panel-open]:text-primary",
32
+ children: /* @__PURE__ */ r(c, {
33
+ className: "size-4 transition-transform duration-200 group-data-[panel-open]:rotate-180",
34
+ "aria-hidden": "true"
35
+ })
32
36
  })]
33
37
  })
34
- }), /* @__PURE__ */ r(s.Panel, {
38
+ }), /* @__PURE__ */ r(l.Panel, {
35
39
  keepMounted: !0,
36
40
  className: "h-[var(--accordion-panel-height)] overflow-hidden transition-[height,opacity] duration-200 ease-out data-[ending-style]:h-0 data-[ending-style]:opacity-0 data-[starting-style]:h-0 data-[starting-style]:opacity-0",
37
- children: /* @__PURE__ */ r("p", {
38
- className: "whitespace-pre-line pb-4 text-base leading-7 text-slate-600",
39
- children: /* @__PURE__ */ r("span", { children: e.answer })
41
+ children: /* @__PURE__ */ i("div", {
42
+ className: "pb-4",
43
+ children: [/* @__PURE__ */ r("p", {
44
+ className: "whitespace-pre-line text-sm leading-6 text-slate-700 sm:text-base sm:leading-7",
45
+ children: /* @__PURE__ */ r("span", { children: e.answer })
46
+ }), e.additionalLink ? /* @__PURE__ */ i(a, {
47
+ to: e.additionalLink.href,
48
+ className: "mt-3 flex w-fit items-center gap-1.5 text-sm font-medium text-primary underline decoration-primary/30 underline-offset-4 transition-colors hover:decoration-primary",
49
+ children: [/* @__PURE__ */ r("span", { children: e.additionalLink.label }), /* @__PURE__ */ r(s, {
50
+ className: "size-4",
51
+ "aria-hidden": "true"
52
+ })]
53
+ }) : null]
40
54
  })
41
55
  })]
42
56
  }, e.id))
43
57
  });
44
58
  }
45
- function u() {
46
- let { i18n: n, t: o } = a(), { storefrontConfiguration: s } = t(), u = s.workspace?.workspaceLanguage, d = s.content?.faq, f = c.flatMap((t) => (d?.[t] ?? []).flatMap((r) => {
47
- let i = e(r.question, n.language, u).trim(), a = e(r.answer, n.language, u).trim();
59
+ function f() {
60
+ let { i18n: n, t: a } = o(), { storefrontConfiguration: s } = t(), c = s.workspace?.workspaceLanguage, l = s.content?.faq, f = u.flatMap((t) => (l?.[t] ?? []).flatMap((r) => {
61
+ let i = e(r.question, n.language, c).trim(), a = e(r.answer, n.language, c).trim(), o = r.additionalLink ? e(r.additionalLink.label, n.language, c).trim() : "", s = r.additionalLink?.href.trim() ?? "";
48
62
  return i && a ? [{
49
63
  id: `${t}-${r.id}`,
50
64
  question: i,
51
- answer: a
65
+ answer: a,
66
+ ...o && s ? { additionalLink: {
67
+ label: o,
68
+ href: s
69
+ } } : {}
52
70
  }] : [];
53
71
  }));
54
72
  if (f.length === 0) return null;
@@ -63,14 +81,14 @@ function u() {
63
81
  className: "text-center",
64
82
  children: /* @__PURE__ */ r("h2", {
65
83
  className: "text-3xl font-semibold tracking-tight text-slate-950",
66
- children: /* @__PURE__ */ r("span", { children: o("faq_section_title") })
84
+ children: /* @__PURE__ */ r("span", { children: a("faq_section_title") })
67
85
  })
68
86
  }), /* @__PURE__ */ i("div", {
69
87
  className: "mx-auto mt-8 grid max-w-6xl grid-cols-1 gap-x-8 gap-y-0 lg:grid-cols-2",
70
- children: [/* @__PURE__ */ r(l, { items: f.slice(0, p) }), /* @__PURE__ */ r(l, { items: f.slice(p) })]
88
+ children: [/* @__PURE__ */ r(d, { items: f.slice(0, p) }), /* @__PURE__ */ r(d, { items: f.slice(p) })]
71
89
  })]
72
90
  })
73
91
  });
74
92
  }
75
93
  //#endregion
76
- export { u as FaqSection };
94
+ export { f as FaqSection };
@@ -1,5 +1,5 @@
1
1
  import { resolveOpeningHoursForDate as e } from "../../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
2
- import "../../chunks/pkg/booking-engine/dist/schemas-JjiUWFIv.js";
2
+ import "../../chunks/pkg/booking-engine/dist/schemas-lb2iTDMd.js";
3
3
  import { businessDateStringToDate as t, calendarDateToBusinessDateString as n, instantToBusinessDateTimeParts as r, normalizeBusinessDateString as i, parseTimeToMinutes as a } from "../../lib/booking-period.js";
4
4
  //#region src/components/Footer/businessHoursStatus.ts
5
5
  var o = 370, s = (e, r) => {
@@ -14,7 +14,7 @@ function d({ value: d, onChange: f, clearLabel: p, ariaLabel: m, id: h, disabled
14
14
  let e = y.current?.getCanvas();
15
15
  if (!e || typeof PointerEvent > "u") return;
16
16
  let t = (t) => {
17
- t.isPrimary && e.setPointerCapture(t.pointerId);
17
+ t.isPrimary && (e.focus({ preventScroll: !0 }), e.setPointerCapture(t.pointerId));
18
18
  }, n = (t) => {
19
19
  e.hasPointerCapture(t.pointerId) && e.releasePointerCapture(t.pointerId);
20
20
  };
@@ -36,6 +36,7 @@ function d({ value: d, onChange: f, clearLabel: p, ariaLabel: m, id: h, disabled
36
36
  id: h,
37
37
  "aria-label": m,
38
38
  "aria-disabled": g,
39
+ tabIndex: g ? void 0 : -1,
39
40
  className: o("absolute inset-0 h-full w-full touch-none", g && "pointer-events-none")
40
41
  },
41
42
  onEnd: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureInput.d.ts","sourceRoot":"","sources":["../../src/components/SignatureInput.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACT,EAAE,EACF,QAAgB,EAChB,SAAS,EACT,MAAM,GACP,EAAE,mBAAmB,2CA+GrB"}
1
+ {"version":3,"file":"SignatureInput.d.ts","sourceRoot":"","sources":["../../src/components/SignatureInput.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACT,EAAE,EACF,QAAgB,EAChB,SAAS,EACT,MAAM,GACP,EAAE,mBAAmB,2CAiHrB"}
@@ -3,6 +3,10 @@ export declare function formatStorefrontInformationDocumentDate({ language, time
3
3
  timeZone?: string;
4
4
  value?: string | null;
5
5
  }): string;
6
+ export declare function StorefrontInformationDocumentBody({ contentHtml, unavailableLabel, }: {
7
+ contentHtml: string;
8
+ unavailableLabel: string;
9
+ }): import("react/jsx-runtime").JSX.Element;
6
10
  export declare function StorefrontInformationDocument({ title, description, effectiveDateLabel, contentHtml, unavailableLabel, }: {
7
11
  title: string;
8
12
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInformationDocument/index.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,uCAAuC,CAAC,EACtD,QAAQ,EACR,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB,UASA;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;CACzB,2CAoCA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInformationDocument/index.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,uCAAuC,CAAC,EACtD,QAAQ,EACR,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB,UASA;AAED,wBAAgB,iCAAiC,CAAC,EAChD,WAAW,EACX,gBAAgB,GACjB,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;CACzB,2CAWA;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;CACzB,2CAgCA"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { cn as n } from "@rpcbase/ui";
3
3
  //#region src/components/StorefrontInformationDocument/index.tsx
4
- var r = n("mt-10 text-[0.9375rem] leading-7 text-slate-700 sm:mt-12 sm:text-base sm:leading-8", "[&_a]:font-medium [&_a]:text-primary [&_a]:underline [&_a]:decoration-primary/30 [&_a]:underline-offset-4 [&_a:hover]:decoration-primary", "[&_blockquote]:my-6 [&_blockquote]:border-l-2 [&_blockquote]:border-slate-300 [&_blockquote]:pl-5 [&_blockquote]:text-slate-600", "[&_code]:rounded [&_code]:bg-slate-100 [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:text-sm [&_code]:text-slate-900", "[&_h1]:mt-10 [&_h1]:border-t [&_h1]:border-slate-200 [&_h1]:pt-8 [&_h1]:font-serif [&_h1]:text-2xl [&_h1]:font-normal [&_h1]:leading-tight [&_h1]:tracking-tight [&_h1]:text-slate-950 sm:[&_h1]:mt-12 sm:[&_h1]:pt-9 sm:[&_h1]:text-3xl", "[&_h1:first-child]:mt-0 [&_h1:first-child]:border-t-0 [&_h1:first-child]:pt-0", "[&_h2]:mt-10 [&_h2]:border-t [&_h2]:border-slate-200 [&_h2]:pt-8 [&_h2]:font-serif [&_h2]:text-xl [&_h2]:font-normal [&_h2]:leading-tight [&_h2]:tracking-tight [&_h2]:text-slate-950 sm:[&_h2]:mt-12 sm:[&_h2]:pt-9 sm:[&_h2]:text-2xl", "[&_h2:first-child]:mt-0 [&_h2:first-child]:border-t-0 [&_h2:first-child]:pt-0", "[&_h3]:mt-8 [&_h3]:font-serif [&_h3]:text-lg [&_h3]:font-normal [&_h3]:leading-tight [&_h3]:tracking-tight [&_h3]:text-slate-950", "[&_hr]:my-10 [&_hr]:border-slate-200", "[&_img]:my-8 [&_img]:max-w-full", "[&_li]:pl-1 [&_ol]:my-5 [&_ol]:list-decimal [&_ol]:space-y-2 [&_ol]:pl-6", "[&_p]:my-4 [&_p]:whitespace-pre-wrap", "[&_strong]:font-semibold [&_strong]:text-slate-950", "[&_table]:my-8 [&_table]:w-full [&_table]:border-collapse [&_table]:text-sm", "[&_td]:border [&_td]:border-slate-200 [&_td]:p-3 [&_td]:align-top", "[&_th]:border [&_th]:border-slate-200 [&_th]:bg-slate-50 [&_th]:p-3 [&_th]:text-left [&_th]:font-semibold [&_th]:text-slate-950", "[&_ul]:my-5 [&_ul]:list-disc [&_ul]:space-y-2 [&_ul]:pl-6");
4
+ var r = n("text-[0.9375rem] leading-7 text-slate-700 sm:text-base sm:leading-8", "[&_a]:font-medium [&_a]:text-primary [&_a]:underline [&_a]:decoration-primary/30 [&_a]:underline-offset-4 [&_a:hover]:decoration-primary", "[&_blockquote]:my-6 [&_blockquote]:border-l-2 [&_blockquote]:border-slate-300 [&_blockquote]:pl-5 [&_blockquote]:text-slate-600", "[&_code]:rounded [&_code]:bg-slate-100 [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:text-sm [&_code]:text-slate-900", "[&_h1]:mt-10 [&_h1]:border-t [&_h1]:border-slate-200 [&_h1]:pt-8 [&_h1]:font-serif [&_h1]:text-2xl [&_h1]:font-normal [&_h1]:leading-tight [&_h1]:tracking-tight [&_h1]:text-slate-950 sm:[&_h1]:mt-12 sm:[&_h1]:pt-9 sm:[&_h1]:text-3xl", "[&_h1:first-child]:mt-0 [&_h1:first-child]:border-t-0 [&_h1:first-child]:pt-0", "[&_h2]:mt-10 [&_h2]:border-t [&_h2]:border-slate-200 [&_h2]:pt-8 [&_h2]:font-serif [&_h2]:text-xl [&_h2]:font-normal [&_h2]:leading-tight [&_h2]:tracking-tight [&_h2]:text-slate-950 sm:[&_h2]:mt-12 sm:[&_h2]:pt-9 sm:[&_h2]:text-2xl", "[&_h2:first-child]:mt-0 [&_h2:first-child]:border-t-0 [&_h2:first-child]:pt-0", "[&_h3]:mt-8 [&_h3]:font-serif [&_h3]:text-lg [&_h3]:font-normal [&_h3]:leading-tight [&_h3]:tracking-tight [&_h3]:text-slate-950", "[&_hr]:my-10 [&_hr]:border-slate-200", "[&_img]:my-8 [&_img]:max-w-full", "[&_li]:pl-1 [&_ol]:my-5 [&_ol]:list-decimal [&_ol]:space-y-2 [&_ol]:pl-6", "[&_p]:my-4 [&_p]:whitespace-pre-wrap", "[&_strong]:font-semibold [&_strong]:text-slate-950", "[&_table]:my-8 [&_table]:w-full [&_table]:border-collapse [&_table]:text-sm", "[&_td]:border [&_td]:border-slate-200 [&_td]:p-3 [&_td]:align-top", "[&_th]:border [&_th]:border-slate-200 [&_th]:bg-slate-50 [&_th]:p-3 [&_th]:text-left [&_th]:font-semibold [&_th]:text-slate-950", "[&_ul]:my-5 [&_ul]:list-disc [&_ul]:space-y-2 [&_ul]:pl-6");
5
5
  function i({ language: e, timeZone: t, value: n }) {
6
6
  return n ? new Intl.DateTimeFormat(e, {
7
7
  day: "numeric",
@@ -10,7 +10,16 @@ function i({ language: e, timeZone: t, value: n }) {
10
10
  timeZone: t || "UTC"
11
11
  }).format(new Date(n)) : "";
12
12
  }
13
- function a({ title: i, description: a, effectiveDateLabel: o, contentHtml: s, unavailableLabel: c }) {
13
+ function a({ contentHtml: t, unavailableLabel: n }) {
14
+ return t ? /* @__PURE__ */ e("div", {
15
+ className: r,
16
+ dangerouslySetInnerHTML: { __html: t }
17
+ }) : /* @__PURE__ */ e("p", {
18
+ className: "border-l-2 border-slate-300 pl-5 text-base leading-8 text-slate-600",
19
+ children: /* @__PURE__ */ e("span", { children: n })
20
+ });
21
+ }
22
+ function o({ title: r, description: i, effectiveDateLabel: o, contentHtml: s, unavailableLabel: c }) {
14
23
  return /* @__PURE__ */ e("section", {
15
24
  className: "min-h-[70vh] bg-white",
16
25
  children: /* @__PURE__ */ e("div", {
@@ -26,23 +35,23 @@ function a({ title: i, description: a, effectiveDateLabel: o, contentHtml: s, un
26
35
  }) : null,
27
36
  /* @__PURE__ */ e("h1", {
28
37
  className: n("font-serif text-4xl font-normal leading-tight tracking-tight text-slate-950 sm:text-5xl", o && "mt-3"),
29
- children: /* @__PURE__ */ e("span", { children: i })
38
+ children: /* @__PURE__ */ e("span", { children: r })
30
39
  }),
31
40
  /* @__PURE__ */ e("p", {
32
41
  className: "mt-4 max-w-2xl text-base leading-7 text-slate-600 sm:text-lg sm:leading-8",
33
- children: /* @__PURE__ */ e("span", { children: a })
42
+ children: /* @__PURE__ */ e("span", { children: i })
34
43
  })
35
44
  ]
36
- }), s ? /* @__PURE__ */ e("div", {
37
- className: r,
38
- dangerouslySetInnerHTML: { __html: s }
39
- }) : /* @__PURE__ */ e("p", {
40
- className: "mt-10 border-l-2 border-slate-300 pl-5 text-base leading-8 text-slate-600 sm:mt-12",
41
- children: /* @__PURE__ */ e("span", { children: c })
45
+ }), /* @__PURE__ */ e("div", {
46
+ className: "mt-10 sm:mt-12",
47
+ children: /* @__PURE__ */ e(a, {
48
+ contentHtml: s,
49
+ unavailableLabel: c
50
+ })
42
51
  })]
43
52
  })
44
53
  })
45
54
  });
46
55
  }
47
56
  //#endregion
48
- export { a as StorefrontInformationDocument, i as formatStorefrontInformationDocumentDate };
57
+ export { o as StorefrontInformationDocument, a as StorefrontInformationDocumentBody, i as formatStorefrontInformationDocumentDate };
package/dist/i18n/en.js CHANGED
@@ -398,7 +398,7 @@ var e = {
398
398
  insurance_terms_title: "Insurance",
399
399
  insurance_terms_description: "Read about the insurance offered by {{shop_name}}.",
400
400
  insurance_terms_effective_date: "Version in effect on {{date}}.",
401
- insurance_terms_unavailable: "The insurance document has not been published yet.",
401
+ insurance_terms_unavailable: "{{shop_name}} has not produced this document yet.",
402
402
  footer_contact_title: "Contact",
403
403
  footer_whatsapp_link: "WhatsApp",
404
404
  footer_hours_title: "Opening hours",
package/dist/i18n/fr.js CHANGED
@@ -399,7 +399,7 @@ var e = {
399
399
  insurance_terms_title: "Assurance",
400
400
  insurance_terms_description: "Consultez les informations sur l’assurance proposée par {{shop_name}}.",
401
401
  insurance_terms_effective_date: "Version en vigueur au {{date}}.",
402
- insurance_terms_unavailable: "Le document d’assurance n’a pas encore été publié.",
402
+ insurance_terms_unavailable: "{{shop_name}} n’a pas encore produit ce document.",
403
403
  footer_contact_title: "Contact",
404
404
  footer_whatsapp_link: "WhatsApp",
405
405
  footer_hours_title: "Horaires d’ouverture",
package/dist/index.d.ts CHANGED
@@ -623,6 +623,12 @@ export declare const bikes: ({
623
623
  productVariants?: undefined;
624
624
  })[];
625
625
 
626
+ export declare const BOOKING_REFERENCE_COUNTER_MIN_DIGITS = 4;
627
+
628
+ export declare const BOOKING_REFERENCE_REGEX: RegExp;
629
+
630
+ export declare const BOOKING_REFERENCE_YEAR_MONTH_REGEX: RegExp;
631
+
626
632
  export declare const BOOKING_SEARCH_KEYS: readonly ["fulfillment", "start_date", "start_time", "end_date", "end_time", "start_address", "end_address"];
627
633
 
628
634
  export declare type BookingCustomerInput = z.infer<typeof bookingCustomerInputSchema>;
@@ -893,6 +899,10 @@ export declare type BookingPeriodTimeSlotsStatus = "local" | "loading" | "ready"
893
899
 
894
900
  export declare type BookingPeriodTranslator = (key: string, options?: Record<string, unknown>) => string;
895
901
 
902
+ export declare const bookingReferenceSchema: z.ZodString;
903
+
904
+ export declare const bookingReferenceYearMonthSchema: z.ZodString;
905
+
896
906
  export declare type BookingRentalUnitSummary = {
897
907
  priceUnit: PriceUnit_2;
898
908
  billableUnitCount: number;
@@ -1840,6 +1850,17 @@ declare type FooterProps = {
1840
1850
 
1841
1851
  export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React_2.JSX.Element;
1842
1852
 
1853
+ export declare function formatBookingReference(params: {
1854
+ workspaceTrackingPrefix: string;
1855
+ startYearMonth: string;
1856
+ sequenceValue: number;
1857
+ }): string;
1858
+
1859
+ export declare function formatBookingReferenceYearMonth(params: {
1860
+ startYear: number;
1861
+ startMonth: number;
1862
+ }): string;
1863
+
1843
1864
  export declare const formatPriceMinor: (valueMinor: MoneyMinor_2, language: string, { currency, minimumFractionDigits, maximumFractionDigits, }?: {
1844
1865
  currency?: string;
1845
1866
  minimumFractionDigits?: number;
@@ -2407,6 +2428,15 @@ export declare const loader: ({ ctx, params }: LoaderArgs) => Promise<{
2407
2428
  updatedAt: Date;
2408
2429
  autoTranslated?: boolean | undefined;
2409
2430
  }>;
2431
+ additionalLink?: {
2432
+ label: Record<string, {
2433
+ [x: string]: unknown;
2434
+ value: string;
2435
+ updatedAt: Date;
2436
+ autoTranslated?: boolean | undefined;
2437
+ }>;
2438
+ href: string;
2439
+ } | undefined;
2410
2440
  }[];
2411
2441
  deliveries: {
2412
2442
  id: string;
@@ -2422,6 +2452,15 @@ export declare const loader: ({ ctx, params }: LoaderArgs) => Promise<{
2422
2452
  updatedAt: Date;
2423
2453
  autoTranslated?: boolean | undefined;
2424
2454
  }>;
2455
+ additionalLink?: {
2456
+ label: Record<string, {
2457
+ [x: string]: unknown;
2458
+ value: string;
2459
+ updatedAt: Date;
2460
+ autoTranslated?: boolean | undefined;
2461
+ }>;
2462
+ href: string;
2463
+ } | undefined;
2425
2464
  }[];
2426
2465
  booking: {
2427
2466
  id: string;
@@ -2437,6 +2476,15 @@ export declare const loader: ({ ctx, params }: LoaderArgs) => Promise<{
2437
2476
  updatedAt: Date;
2438
2477
  autoTranslated?: boolean | undefined;
2439
2478
  }>;
2479
+ additionalLink?: {
2480
+ label: Record<string, {
2481
+ [x: string]: unknown;
2482
+ value: string;
2483
+ updatedAt: Date;
2484
+ autoTranslated?: boolean | undefined;
2485
+ }>;
2486
+ href: string;
2487
+ } | undefined;
2440
2488
  }[];
2441
2489
  };
2442
2490
  tagline?: Record<string, {
@@ -4005,6 +4053,14 @@ export declare const storefrontConfigurationSchema: z.ZodObject<{
4005
4053
  updatedAt: z.ZodCoercedDate<unknown>;
4006
4054
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4007
4055
  }, z.core.$loose>>;
4056
+ additionalLink: z.ZodOptional<z.ZodObject<{
4057
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4058
+ value: z.ZodString;
4059
+ updatedAt: z.ZodCoercedDate<unknown>;
4060
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4061
+ }, z.core.$loose>>;
4062
+ href: z.ZodString;
4063
+ }, z.core.$strip>>;
4008
4064
  }, z.core.$strip>>>;
4009
4065
  deliveries: z.ZodDefault<z.ZodArray<z.ZodObject<{
4010
4066
  id: z.ZodString;
@@ -4018,6 +4074,14 @@ export declare const storefrontConfigurationSchema: z.ZodObject<{
4018
4074
  updatedAt: z.ZodCoercedDate<unknown>;
4019
4075
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4020
4076
  }, z.core.$loose>>;
4077
+ additionalLink: z.ZodOptional<z.ZodObject<{
4078
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4079
+ value: z.ZodString;
4080
+ updatedAt: z.ZodCoercedDate<unknown>;
4081
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4082
+ }, z.core.$loose>>;
4083
+ href: z.ZodString;
4084
+ }, z.core.$strip>>;
4021
4085
  }, z.core.$strip>>>;
4022
4086
  booking: z.ZodDefault<z.ZodArray<z.ZodObject<{
4023
4087
  id: z.ZodString;
@@ -4031,6 +4095,14 @@ export declare const storefrontConfigurationSchema: z.ZodObject<{
4031
4095
  updatedAt: z.ZodCoercedDate<unknown>;
4032
4096
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4033
4097
  }, z.core.$loose>>;
4098
+ additionalLink: z.ZodOptional<z.ZodObject<{
4099
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4100
+ value: z.ZodString;
4101
+ updatedAt: z.ZodCoercedDate<unknown>;
4102
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4103
+ }, z.core.$loose>>;
4104
+ href: z.ZodString;
4105
+ }, z.core.$strip>>;
4034
4106
  }, z.core.$strip>>>;
4035
4107
  }, z.core.$strip>>;
4036
4108
  }, z.core.$strip>>;
@@ -4135,6 +4207,14 @@ export declare const storefrontContentSchema: z.ZodObject<{
4135
4207
  updatedAt: z.ZodCoercedDate<unknown>;
4136
4208
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4137
4209
  }, z.core.$loose>>;
4210
+ additionalLink: z.ZodOptional<z.ZodObject<{
4211
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4212
+ value: z.ZodString;
4213
+ updatedAt: z.ZodCoercedDate<unknown>;
4214
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4215
+ }, z.core.$loose>>;
4216
+ href: z.ZodString;
4217
+ }, z.core.$strip>>;
4138
4218
  }, z.core.$strip>>>;
4139
4219
  deliveries: z.ZodDefault<z.ZodArray<z.ZodObject<{
4140
4220
  id: z.ZodString;
@@ -4148,6 +4228,14 @@ export declare const storefrontContentSchema: z.ZodObject<{
4148
4228
  updatedAt: z.ZodCoercedDate<unknown>;
4149
4229
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4150
4230
  }, z.core.$loose>>;
4231
+ additionalLink: z.ZodOptional<z.ZodObject<{
4232
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4233
+ value: z.ZodString;
4234
+ updatedAt: z.ZodCoercedDate<unknown>;
4235
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4236
+ }, z.core.$loose>>;
4237
+ href: z.ZodString;
4238
+ }, z.core.$strip>>;
4151
4239
  }, z.core.$strip>>>;
4152
4240
  booking: z.ZodDefault<z.ZodArray<z.ZodObject<{
4153
4241
  id: z.ZodString;
@@ -4161,6 +4249,14 @@ export declare const storefrontContentSchema: z.ZodObject<{
4161
4249
  updatedAt: z.ZodCoercedDate<unknown>;
4162
4250
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4163
4251
  }, z.core.$loose>>;
4252
+ additionalLink: z.ZodOptional<z.ZodObject<{
4253
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4254
+ value: z.ZodString;
4255
+ updatedAt: z.ZodCoercedDate<unknown>;
4256
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4257
+ }, z.core.$loose>>;
4258
+ href: z.ZodString;
4259
+ }, z.core.$strip>>;
4164
4260
  }, z.core.$strip>>>;
4165
4261
  }, z.core.$strip>>;
4166
4262
  }, z.core.$strip>;
@@ -4683,6 +4779,17 @@ export declare const storefrontEn: {
4683
4779
 
4684
4780
  export declare type StorefrontFaq = z.infer<typeof storefrontFaqSchema>;
4685
4781
 
4782
+ export declare type StorefrontFaqAdditionalLink = z.infer<typeof storefrontFaqAdditionalLinkSchema>;
4783
+
4784
+ export declare const storefrontFaqAdditionalLinkSchema: z.ZodObject<{
4785
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4786
+ value: z.ZodString;
4787
+ updatedAt: z.ZodCoercedDate<unknown>;
4788
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4789
+ }, z.core.$loose>>;
4790
+ href: z.ZodString;
4791
+ }, z.core.$strip>;
4792
+
4686
4793
  export declare type StorefrontFaqItem = z.infer<typeof storefrontFaqItemSchema>;
4687
4794
 
4688
4795
  export declare const storefrontFaqItemSchema: z.ZodObject<{
@@ -4697,6 +4804,14 @@ export declare const storefrontFaqItemSchema: z.ZodObject<{
4697
4804
  updatedAt: z.ZodCoercedDate<unknown>;
4698
4805
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4699
4806
  }, z.core.$loose>>;
4807
+ additionalLink: z.ZodOptional<z.ZodObject<{
4808
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4809
+ value: z.ZodString;
4810
+ updatedAt: z.ZodCoercedDate<unknown>;
4811
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4812
+ }, z.core.$loose>>;
4813
+ href: z.ZodString;
4814
+ }, z.core.$strip>>;
4700
4815
  }, z.core.$strip>;
4701
4816
 
4702
4817
  export declare const storefrontFaqSchema: z.ZodObject<{
@@ -4712,6 +4827,14 @@ export declare const storefrontFaqSchema: z.ZodObject<{
4712
4827
  updatedAt: z.ZodCoercedDate<unknown>;
4713
4828
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4714
4829
  }, z.core.$loose>>;
4830
+ additionalLink: z.ZodOptional<z.ZodObject<{
4831
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4832
+ value: z.ZodString;
4833
+ updatedAt: z.ZodCoercedDate<unknown>;
4834
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4835
+ }, z.core.$loose>>;
4836
+ href: z.ZodString;
4837
+ }, z.core.$strip>>;
4715
4838
  }, z.core.$strip>>>;
4716
4839
  deliveries: z.ZodDefault<z.ZodArray<z.ZodObject<{
4717
4840
  id: z.ZodString;
@@ -4725,6 +4848,14 @@ export declare const storefrontFaqSchema: z.ZodObject<{
4725
4848
  updatedAt: z.ZodCoercedDate<unknown>;
4726
4849
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4727
4850
  }, z.core.$loose>>;
4851
+ additionalLink: z.ZodOptional<z.ZodObject<{
4852
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4853
+ value: z.ZodString;
4854
+ updatedAt: z.ZodCoercedDate<unknown>;
4855
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4856
+ }, z.core.$loose>>;
4857
+ href: z.ZodString;
4858
+ }, z.core.$strip>>;
4728
4859
  }, z.core.$strip>>>;
4729
4860
  booking: z.ZodDefault<z.ZodArray<z.ZodObject<{
4730
4861
  id: z.ZodString;
@@ -4738,6 +4869,14 @@ export declare const storefrontFaqSchema: z.ZodObject<{
4738
4869
  updatedAt: z.ZodCoercedDate<unknown>;
4739
4870
  autoTranslated: z.ZodOptional<z.ZodBoolean>;
4740
4871
  }, z.core.$loose>>;
4872
+ additionalLink: z.ZodOptional<z.ZodObject<{
4873
+ label: z.ZodRecord<z.ZodString, z.ZodObject<{
4874
+ value: z.ZodString;
4875
+ updatedAt: z.ZodCoercedDate<unknown>;
4876
+ autoTranslated: z.ZodOptional<z.ZodBoolean>;
4877
+ }, z.core.$loose>>;
4878
+ href: z.ZodString;
4879
+ }, z.core.$strip>>;
4741
4880
  }, z.core.$strip>>>;
4742
4881
  }, z.core.$strip>;
4743
4882
 
@@ -6566,6 +6705,15 @@ export declare function useStorefrontConfig(): {
6566
6705
  updatedAt: Date;
6567
6706
  autoTranslated?: boolean | undefined;
6568
6707
  }>;
6708
+ additionalLink?: {
6709
+ label: Record<string, {
6710
+ [x: string]: unknown;
6711
+ value: string;
6712
+ updatedAt: Date;
6713
+ autoTranslated?: boolean | undefined;
6714
+ }>;
6715
+ href: string;
6716
+ } | undefined;
6569
6717
  }[];
6570
6718
  deliveries: {
6571
6719
  id: string;
@@ -6581,6 +6729,15 @@ export declare function useStorefrontConfig(): {
6581
6729
  updatedAt: Date;
6582
6730
  autoTranslated?: boolean | undefined;
6583
6731
  }>;
6732
+ additionalLink?: {
6733
+ label: Record<string, {
6734
+ [x: string]: unknown;
6735
+ value: string;
6736
+ updatedAt: Date;
6737
+ autoTranslated?: boolean | undefined;
6738
+ }>;
6739
+ href: string;
6740
+ } | undefined;
6584
6741
  }[];
6585
6742
  booking: {
6586
6743
  id: string;
@@ -6596,6 +6753,15 @@ export declare function useStorefrontConfig(): {
6596
6753
  updatedAt: Date;
6597
6754
  autoTranslated?: boolean | undefined;
6598
6755
  }>;
6756
+ additionalLink?: {
6757
+ label: Record<string, {
6758
+ [x: string]: unknown;
6759
+ value: string;
6760
+ updatedAt: Date;
6761
+ autoTranslated?: boolean | undefined;
6762
+ }>;
6763
+ href: string;
6764
+ } | undefined;
6599
6765
  }[];
6600
6766
  };
6601
6767
  tagline?: Record<string, {
@@ -6808,6 +6974,15 @@ export declare function useStorefrontConfig(): {
6808
6974
  updatedAt: Date;
6809
6975
  autoTranslated?: boolean | undefined;
6810
6976
  }>;
6977
+ additionalLink?: {
6978
+ label: Record<string, {
6979
+ [x: string]: unknown;
6980
+ value: string;
6981
+ updatedAt: Date;
6982
+ autoTranslated?: boolean | undefined;
6983
+ }>;
6984
+ href: string;
6985
+ } | undefined;
6811
6986
  }[];
6812
6987
  deliveries: {
6813
6988
  id: string;
@@ -6823,6 +6998,15 @@ export declare function useStorefrontConfig(): {
6823
6998
  updatedAt: Date;
6824
6999
  autoTranslated?: boolean | undefined;
6825
7000
  }>;
7001
+ additionalLink?: {
7002
+ label: Record<string, {
7003
+ [x: string]: unknown;
7004
+ value: string;
7005
+ updatedAt: Date;
7006
+ autoTranslated?: boolean | undefined;
7007
+ }>;
7008
+ href: string;
7009
+ } | undefined;
6826
7010
  }[];
6827
7011
  booking: {
6828
7012
  id: string;
@@ -6838,6 +7022,15 @@ export declare function useStorefrontConfig(): {
6838
7022
  updatedAt: Date;
6839
7023
  autoTranslated?: boolean | undefined;
6840
7024
  }>;
7025
+ additionalLink?: {
7026
+ label: Record<string, {
7027
+ [x: string]: unknown;
7028
+ value: string;
7029
+ updatedAt: Date;
7030
+ autoTranslated?: boolean | undefined;
7031
+ }>;
7032
+ href: string;
7033
+ } | undefined;
6841
7034
  }[];
6842
7035
  };
6843
7036
  tagline?: Record<string, {