@loczer/storefront-sdk 0.187.0 → 0.189.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 (66) hide show
  1. package/dist/chunks/booking-engine/dist/models/{Product.shared-CTuk4fiR.js → Product.shared-IYOeC3N7.js} +12 -10
  2. package/dist/chunks/booking-engine/dist/schemas/{base-asset-B_Dm8_Vk.js → base-asset-zsUj5_3O.js} +1 -1
  3. package/dist/chunks/booking-engine/dist/schemas/{base-booking-DW8AEPKo.js → base-booking-TzCge_mR.js} +2 -2
  4. package/dist/chunks/booking-engine/dist/schemas/{base-product-1H8l2aUv.js → base-product-DvFFzAcg.js} +1 -1
  5. package/dist/chunks/booking-engine/dist/schemas/{booking-engine-configuration-D02MRF9U.js → booking-engine-configuration-LnrhShqm.js} +4 -1
  6. package/dist/chunks/booking-engine/dist/schemas/{cart-inputs-j1yWfJxO.js → cart-inputs-B0HpcFe5.js} +1 -1
  7. package/dist/chunks/booking-engine/dist/schemas/{public-booking-engine-configuration-BnJ_H-p1.js → public-booking-engine-configuration-CEM9mexX.js} +1 -1
  8. package/dist/chunks/booking-engine/dist/schemas-BNUzqsci.js +13 -0
  9. package/dist/chunks/ui/dist/Map/{MapContent-QPkuTBvK.js → MapContent-PK-ptOx6.js} +126 -94
  10. package/dist/chunks/ui/dist/Map/mapboxError-oRn0l3EE.js +25 -0
  11. package/dist/chunks/ui/dist/{Map-BXmRf5Ep.js → Map-BwXj49kV.js} +1 -1
  12. package/dist/components/BookingBikeVariantDialog/index.d.ts +2 -1
  13. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  14. package/dist/components/BookingBikeVariantDialog/index.js +39 -38
  15. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
  16. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +32 -30
  17. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts.map +1 -1
  18. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +127 -122
  19. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
  20. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +32 -30
  21. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts +7 -0
  22. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts.map +1 -0
  23. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js +29 -0
  24. package/dist/components/BookingPeriodSelector/index.d.ts +2 -1
  25. package/dist/components/BookingPeriodSelector/index.d.ts.map +1 -1
  26. package/dist/components/BookingPeriodSelector/index.js +15 -14
  27. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +11 -0
  28. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  29. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +280 -216
  30. package/dist/components/ContactSection/index.d.ts.map +1 -1
  31. package/dist/components/ContactSection/index.js +120 -116
  32. package/dist/components/Header/index.d.ts.map +1 -1
  33. package/dist/components/Header/index.js +35 -35
  34. package/dist/components/Map/index.js +1 -1
  35. package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
  36. package/dist/components/StorefrontCancellationPolicyNotice/index.js +51 -48
  37. package/dist/components/StorefrontInsuranceNotice/index.d.ts +9 -0
  38. package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -0
  39. package/dist/components/StorefrontInsuranceNotice/index.js +191 -0
  40. package/dist/i18n/en.d.ts +24 -0
  41. package/dist/i18n/en.d.ts.map +1 -1
  42. package/dist/i18n/en.js +26 -2
  43. package/dist/i18n/fr.d.ts +24 -0
  44. package/dist/i18n/fr.d.ts.map +1 -1
  45. package/dist/i18n/fr.js +26 -2
  46. package/dist/index.d.ts +91 -0
  47. package/dist/index.js +69 -68
  48. package/dist/lib/booking.js +2 -2
  49. package/dist/lib/checkoutSubmit.js +3 -3
  50. package/dist/lib/fetchStorefrontTimeSlots.d.ts.map +1 -1
  51. package/dist/lib/fetchStorefrontTimeSlots.js +2 -1
  52. package/dist/lib/storefrontProducts.d.ts +16 -0
  53. package/dist/lib/storefrontProducts.d.ts.map +1 -1
  54. package/dist/lib/storefrontProducts.js +27 -22
  55. package/dist/pages/BookingPage.d.ts.map +1 -1
  56. package/dist/pages/BookingPage.js +109 -95
  57. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  58. package/dist/pages/CheckoutPage.js +229 -231
  59. package/dist/pages/HomePage.d.ts.map +1 -1
  60. package/dist/pages/HomePage.js +339 -314
  61. package/dist/pages/ProductPage.d.ts.map +1 -1
  62. package/dist/pages/ProductPage.js +60 -52
  63. package/dist/storefront.css +1 -1
  64. package/dist/storefrontSchemas.js +2 -2
  65. package/package.json +1 -1
  66. package/dist/chunks/booking-engine/dist/schemas-DftrSnTE.js +0 -13
@@ -1,12 +1,12 @@
1
1
  import { Button as e } from "../../ui/button.js";
2
2
  import { ResponsiveDialog as t, ResponsiveDialogContent as n, ResponsiveDialogDescription as r, ResponsiveDialogFooter as i, ResponsiveDialogHeader as a, ResponsiveDialogTitle as o } from "../../chunks/ui/dist/ResponsiveDialog-3nJFjDos.js";
3
- import { useState as s } from "react";
4
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
- import { cn as u } from "@rpcbase/ui";
3
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import { cn as l } from "@rpcbase/ui";
5
+ import { useSearchParams as u } from "@rpcbase/router";
6
6
  import { useTranslation as d } from "react-i18next";
7
7
  import { CheckCircle2 as f, Info as p } from "lucide-react";
8
8
  //#region src/components/StorefrontCancellationPolicyNotice/index.tsx
9
- var m = .95, h = (e) => e.tiers.length === 0 ? [] : [...e.tiers].sort((e, t) => e.upToHours - t.upToHours), g = (e) => h(e).find((e) => e.refundPercentage >= m) ?? null, _ = (e, t) => {
9
+ var m = .95, h = "show_cancellation_policy_modal", g = (e) => e.tiers.length === 0 ? [] : [...e.tiers].sort((e, t) => e.upToHours - t.upToHours), _ = (e) => g(e).find((e) => e.refundPercentage >= m) ?? null, v = (e, t) => {
10
10
  try {
11
11
  return new Intl.NumberFormat(t, {
12
12
  style: "percent",
@@ -16,100 +16,103 @@ var m = .95, h = (e) => e.tiers.length === 0 ? [] : [...e.tiers].sort((e, t) =>
16
16
  return `${Math.round(e * 100)}%`;
17
17
  }
18
18
  };
19
- function v({ policy: m, className: v }) {
20
- let { t: y, i18n: b } = d(), [x, S] = s(!1), C = h(m), w = g(m);
21
- if (!w) return null;
22
- let T = (e) => {
19
+ function y({ policy: m, className: y }) {
20
+ let { t: b, i18n: x } = d(), [S, C] = u(), w = S.get(h) === "true", T = g(m), E = _(m), D = (e) => {
21
+ let t = new URLSearchParams(S);
22
+ e ? t.set(h, "true") : t.delete(h), C(t, { replace: !0 });
23
+ };
24
+ if (!E) return null;
25
+ let O = (e) => {
23
26
  let t = Math.max(1, Math.round(e));
24
- return t >= 72 && t % 24 == 0 ? y("cancellation_policy_duration_days", { count: t / 24 }) : y("cancellation_policy_duration_hours", { count: t });
27
+ return t >= 72 && t % 24 == 0 ? b("cancellation_policy_duration_days", { count: t / 24 }) : b("cancellation_policy_duration_hours", { count: t });
25
28
  };
26
- return /* @__PURE__ */ l("li", {
27
- className: u("flex items-start gap-3", v),
29
+ return /* @__PURE__ */ c("li", {
30
+ className: l("flex items-start gap-3", y),
28
31
  "data-testid": "storefront-cancellation-policy-notice",
29
32
  children: [
30
- /* @__PURE__ */ c(f, {
33
+ /* @__PURE__ */ s(f, {
31
34
  className: "mt-0.5 h-5 w-5 shrink-0 text-success",
32
35
  "aria-hidden": "true"
33
36
  }),
34
- /* @__PURE__ */ l("div", {
37
+ /* @__PURE__ */ c("div", {
35
38
  className: "min-w-0 flex-1",
36
- children: [/* @__PURE__ */ l("div", {
39
+ children: [/* @__PURE__ */ c("div", {
37
40
  className: "flex min-w-0 items-start gap-1.5",
38
- children: [/* @__PURE__ */ c("p", {
41
+ children: [/* @__PURE__ */ s("p", {
39
42
  className: "min-w-0 text-sm font-medium text-slate-950",
40
- children: /* @__PURE__ */ c("span", { children: y("cancellation_policy_teaser", { duration: T(w.upToHours) }) })
41
- }), /* @__PURE__ */ c("button", {
43
+ children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_teaser", { duration: O(E.upToHours) }) })
44
+ }), /* @__PURE__ */ s("button", {
42
45
  type: "button",
43
46
  className: "mt-[-1px] inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-slate-500 transition hover:bg-slate-100 hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2",
44
- "aria-label": y("cancellation_policy_info_aria_label"),
45
- onClick: () => S(!0),
46
- children: /* @__PURE__ */ c(p, {
47
+ "aria-label": b("cancellation_policy_info_aria_label"),
48
+ onClick: () => D(!0),
49
+ children: /* @__PURE__ */ s(p, {
47
50
  className: "h-3.5 w-3.5",
48
51
  "aria-hidden": "true"
49
52
  })
50
53
  })]
51
- }), /* @__PURE__ */ c("p", {
54
+ }), /* @__PURE__ */ s("p", {
52
55
  className: "text-xs text-slate-600",
53
- children: /* @__PURE__ */ c("span", { children: y("cancellation_policy_teaser_description", { duration: T(w.upToHours) }) })
56
+ children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_teaser_description", { duration: O(E.upToHours) }) })
54
57
  })]
55
58
  }),
56
- /* @__PURE__ */ c(t, {
57
- open: x,
58
- onOpenChange: S,
59
- children: /* @__PURE__ */ c(n, {
59
+ /* @__PURE__ */ s(t, {
60
+ open: w,
61
+ onOpenChange: D,
62
+ children: /* @__PURE__ */ s(n, {
60
63
  "data-testid": "storefront-cancellation-policy-modal",
61
64
  className: "overflow-hidden border-slate-200 bg-white p-0",
62
65
  desktopClassName: "max-w-lg gap-0",
63
66
  mobileClassName: "max-h-[92dvh] gap-0",
64
- children: /* @__PURE__ */ l("div", {
67
+ children: /* @__PURE__ */ c("div", {
65
68
  className: "flex max-h-[90dvh] w-full min-w-0 flex-col",
66
69
  children: [
67
- /* @__PURE__ */ c(a, {
70
+ /* @__PURE__ */ s(a, {
68
71
  className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
69
- children: /* @__PURE__ */ l("div", {
72
+ children: /* @__PURE__ */ c("div", {
70
73
  className: "flex items-start gap-3",
71
- children: [/* @__PURE__ */ c("span", {
74
+ children: [/* @__PURE__ */ s("span", {
72
75
  className: "mt-0.5 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-slate-950 text-white",
73
- children: /* @__PURE__ */ c(p, {
76
+ children: /* @__PURE__ */ s(p, {
74
77
  className: "h-4 w-4",
75
78
  "aria-hidden": "true"
76
79
  })
77
- }), /* @__PURE__ */ l("span", {
80
+ }), /* @__PURE__ */ c("span", {
78
81
  className: "min-w-0 space-y-1",
79
- children: [/* @__PURE__ */ c(o, {
82
+ children: [/* @__PURE__ */ s(o, {
80
83
  className: "text-left text-lg font-semibold leading-6 text-slate-950",
81
- children: /* @__PURE__ */ c("span", { children: y("cancellation_policy_modal_title") })
82
- }), /* @__PURE__ */ c(r, {
84
+ children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_title") })
85
+ }), /* @__PURE__ */ s(r, {
83
86
  className: "text-left text-sm text-slate-600",
84
- children: /* @__PURE__ */ c("span", { children: y("cancellation_policy_modal_description") })
87
+ children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_description") })
85
88
  })]
86
89
  })]
87
90
  })
88
91
  }),
89
- /* @__PURE__ */ c("div", {
92
+ /* @__PURE__ */ s("div", {
90
93
  className: "overflow-y-auto px-5 py-5 sm:px-6",
91
- children: /* @__PURE__ */ c("dl", {
94
+ children: /* @__PURE__ */ s("dl", {
92
95
  className: "grid gap-3",
93
- children: C.map((e) => /* @__PURE__ */ l("div", {
96
+ children: T.map((e) => /* @__PURE__ */ c("div", {
94
97
  className: "rounded-lg border border-slate-200 bg-slate-50 px-4 py-3",
95
- children: [/* @__PURE__ */ c("dt", {
98
+ children: [/* @__PURE__ */ s("dt", {
96
99
  className: "text-sm font-medium text-slate-950",
97
- children: /* @__PURE__ */ c("span", { children: y("cancellation_policy_modal_tier_deadline", { duration: T(e.upToHours) }) })
98
- }), /* @__PURE__ */ c("dd", {
100
+ children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_tier_deadline", { duration: O(e.upToHours) }) })
101
+ }), /* @__PURE__ */ s("dd", {
99
102
  className: "mt-1 text-sm text-slate-600",
100
- children: /* @__PURE__ */ c("span", { children: y("cancellation_policy_modal_tier_refund", { percentage: _(e.refundPercentage, b.language) }) })
103
+ children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_tier_refund", { percentage: v(e.refundPercentage, x.language) }) })
101
104
  })]
102
105
  }, `${e.upToHours}-${e.refundPercentage}`))
103
106
  })
104
107
  }),
105
- /* @__PURE__ */ c(i, {
108
+ /* @__PURE__ */ s(i, {
106
109
  className: "border-t border-slate-200 px-5 py-4 sm:px-6",
107
- children: /* @__PURE__ */ c(e, {
110
+ children: /* @__PURE__ */ s(e, {
108
111
  type: "button",
109
112
  variant: "outline",
110
113
  className: "h-11 w-full rounded-xl sm:w-auto",
111
- onClick: () => S(!1),
112
- children: /* @__PURE__ */ c("span", { children: y("close_modal") })
114
+ onClick: () => D(!1),
115
+ children: /* @__PURE__ */ s("span", { children: b("close_modal") })
113
116
  })
114
117
  })
115
118
  ]
@@ -120,4 +123,4 @@ function v({ policy: m, className: v }) {
120
123
  });
121
124
  }
122
125
  //#endregion
123
- export { v as StorefrontCancellationPolicyNotice, g as resolveStorefrontCancellationPolicyTeaserTier };
126
+ export { y as StorefrontCancellationPolicyNotice, _ as resolveStorefrontCancellationPolicyTeaserTier };
@@ -0,0 +1,9 @@
1
+ import { BikeProduct } from '../../lib/products';
2
+ type StorefrontInsuranceNoticeProps = {
3
+ bikes: BikeProduct[];
4
+ currency: string;
5
+ className?: string;
6
+ };
7
+ export declare function StorefrontInsuranceNotice({ bikes, currency, className, }: StorefrontInsuranceNoticeProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInsuranceNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAOrD,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAWD,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,8BAA8B,2CAiLhC"}
@@ -0,0 +1,191 @@
1
+ import { formatStorefrontPriceMinor as e } from "../../lib/pricing.js";
2
+ import { Button as t } from "../../ui/button.js";
3
+ import { ResponsiveDialog as n, ResponsiveDialogContent as r, ResponsiveDialogDescription as i, ResponsiveDialogFooter as a, ResponsiveDialogHeader as o, ResponsiveDialogTitle as s } from "../../chunks/ui/dist/ResponsiveDialog-3nJFjDos.js";
4
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ import { cn as u } from "@rpcbase/ui";
6
+ import { useSearchParams as d } from "@rpcbase/router";
7
+ import { useTranslation as f } from "react-i18next";
8
+ import { CheckCircle2 as p, Info as m, Umbrella as h } from "lucide-react";
9
+ //#region src/components/StorefrontInsuranceNotice/index.tsx
10
+ var g = "show_insurance_modal", _ = (e, t) => {
11
+ let n = e.filter((e) => e.kind === t && e.insurance?.enabled).map((e) => e.insurance?.pricePerDayMinor).filter((e) => typeof e == "number");
12
+ return [...new Set(n)].sort((e, t) => e - t);
13
+ };
14
+ function v({ bikes: v, currency: y, className: b }) {
15
+ let { t: x, i18n: S } = f(), [C, w] = d(), T = C.get(g) === "true", E = (e) => {
16
+ let t = new URLSearchParams(C);
17
+ e ? t.set(g, "true") : t.delete(g), w(t, { replace: !0 });
18
+ }, D = (t) => {
19
+ let n = _(v, t);
20
+ if (n.length === 0) return x("insurance_modal_price_unavailable");
21
+ let r = n[0], i = n[n.length - 1], a = e(r, S.language, { currency: y });
22
+ return r === i ? x("insurance_modal_price_per_day", { price: a }) : x("insurance_modal_price_range_per_day", {
23
+ minimum_price: a,
24
+ maximum_price: e(i, S.language, { currency: y })
25
+ });
26
+ }, O = [{
27
+ kind: "bike",
28
+ label: x("insurance_modal_muscular_bike"),
29
+ price: D("bike")
30
+ }, {
31
+ kind: "e-bike",
32
+ label: x("insurance_modal_electric_bike"),
33
+ price: D("e-bike")
34
+ }];
35
+ return /* @__PURE__ */ l("li", {
36
+ className: u("flex items-start gap-3", b),
37
+ "data-testid": "storefront-insurance-notice",
38
+ children: [
39
+ /* @__PURE__ */ c(h, {
40
+ className: "mt-0.5 h-5 w-5 shrink-0 text-success",
41
+ "aria-hidden": "true"
42
+ }),
43
+ /* @__PURE__ */ l("div", {
44
+ className: "min-w-0 flex-1",
45
+ children: [/* @__PURE__ */ l("div", {
46
+ className: "flex min-w-0 items-start gap-1.5",
47
+ children: [/* @__PURE__ */ c("p", {
48
+ className: "min-w-0 text-sm font-medium text-slate-950",
49
+ children: /* @__PURE__ */ c("span", { children: x("feature_guarantee_insurance_title") })
50
+ }), /* @__PURE__ */ c("button", {
51
+ type: "button",
52
+ className: "mt-[-1px] inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-slate-500 transition hover:bg-slate-100 hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2",
53
+ "aria-label": x("insurance_info_aria_label"),
54
+ onClick: () => E(!0),
55
+ children: /* @__PURE__ */ c(m, {
56
+ className: "h-3.5 w-3.5",
57
+ "aria-hidden": "true"
58
+ })
59
+ })]
60
+ }), /* @__PURE__ */ c("p", {
61
+ className: "text-xs text-slate-600",
62
+ children: /* @__PURE__ */ c("span", { children: x("feature_guarantee_insurance_description") })
63
+ })]
64
+ }),
65
+ /* @__PURE__ */ c(n, {
66
+ open: T,
67
+ onOpenChange: E,
68
+ children: /* @__PURE__ */ c(r, {
69
+ "data-testid": "storefront-insurance-modal",
70
+ className: "overflow-hidden border-slate-200 bg-white p-0",
71
+ desktopClassName: "max-w-xl gap-0",
72
+ mobileClassName: "max-h-[92dvh] gap-0",
73
+ children: /* @__PURE__ */ l("div", {
74
+ className: "flex max-h-[90dvh] w-full min-w-0 flex-col",
75
+ children: [
76
+ /* @__PURE__ */ c(o, {
77
+ className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
78
+ children: /* @__PURE__ */ l("div", {
79
+ className: "flex items-start gap-3",
80
+ children: [/* @__PURE__ */ c("span", {
81
+ className: "mt-0.5 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-slate-950 text-white",
82
+ children: /* @__PURE__ */ c(m, {
83
+ className: "h-4 w-4",
84
+ "aria-hidden": "true"
85
+ })
86
+ }), /* @__PURE__ */ l("span", {
87
+ className: "min-w-0 space-y-1",
88
+ children: [/* @__PURE__ */ c(s, {
89
+ className: "text-left text-lg font-semibold leading-6 text-slate-950",
90
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_title") })
91
+ }), /* @__PURE__ */ c(i, {
92
+ className: "text-left text-sm text-slate-600",
93
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_description") })
94
+ })]
95
+ })]
96
+ })
97
+ }),
98
+ /* @__PURE__ */ l("div", {
99
+ className: "overflow-y-auto px-5 py-5 sm:px-6",
100
+ children: [
101
+ /* @__PURE__ */ l("section", { children: [
102
+ /* @__PURE__ */ c("h3", {
103
+ className: "text-sm font-semibold text-slate-950",
104
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_pricing_title") })
105
+ }),
106
+ /* @__PURE__ */ c("p", {
107
+ className: "mt-1 text-sm text-slate-600",
108
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_pricing_description") })
109
+ }),
110
+ /* @__PURE__ */ c("dl", {
111
+ className: "mt-3 grid gap-3 sm:grid-cols-2",
112
+ children: O.map((e) => /* @__PURE__ */ l("div", {
113
+ className: "rounded-lg border border-slate-200 bg-slate-50 px-4 py-3",
114
+ "data-testid": `storefront-insurance-price-${e.kind}`,
115
+ children: [/* @__PURE__ */ c("dt", {
116
+ className: "text-sm font-medium text-slate-950",
117
+ children: /* @__PURE__ */ c("span", { children: e.label })
118
+ }), /* @__PURE__ */ c("dd", {
119
+ className: "mt-1 text-sm text-slate-600",
120
+ children: /* @__PURE__ */ c("span", { children: e.price })
121
+ })]
122
+ }, e.kind))
123
+ })
124
+ ] }),
125
+ /* @__PURE__ */ l("section", {
126
+ className: "mt-5",
127
+ children: [/* @__PURE__ */ c("h3", {
128
+ className: "text-sm font-semibold text-slate-950",
129
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_coverage_title") })
130
+ }), /* @__PURE__ */ c("ul", {
131
+ className: "mt-2 grid gap-2",
132
+ children: [
133
+ x("insurance_modal_coverage_accidental_damage"),
134
+ x("insurance_modal_coverage_assault_or_break_in"),
135
+ x("insurance_modal_coverage_secured_bike_theft")
136
+ ].map((e) => /* @__PURE__ */ l("li", {
137
+ className: "flex items-start gap-2 text-sm text-slate-600",
138
+ children: [/* @__PURE__ */ c(p, {
139
+ className: "mt-0.5 h-4 w-4 shrink-0 text-success",
140
+ "aria-hidden": "true"
141
+ }), /* @__PURE__ */ c("span", { children: e })]
142
+ }, e))
143
+ })]
144
+ }),
145
+ /* @__PURE__ */ l("div", {
146
+ className: "mt-5 grid gap-4 sm:grid-cols-2",
147
+ children: [/* @__PURE__ */ l("section", {
148
+ className: "rounded-lg border border-slate-200 px-4 py-3",
149
+ children: [/* @__PURE__ */ c("h3", {
150
+ className: "text-sm font-semibold text-slate-950",
151
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_claim_title") })
152
+ }), /* @__PURE__ */ c("p", {
153
+ className: "mt-1 text-sm text-slate-600",
154
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_claim_description") })
155
+ })]
156
+ }), /* @__PURE__ */ l("section", {
157
+ className: "rounded-lg border border-slate-200 px-4 py-3",
158
+ children: [/* @__PURE__ */ c("h3", {
159
+ className: "text-sm font-semibold text-slate-950",
160
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_exclusions_title") })
161
+ }), /* @__PURE__ */ c("p", {
162
+ className: "mt-1 text-sm text-slate-600",
163
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_exclusions_description") })
164
+ })]
165
+ })]
166
+ }),
167
+ /* @__PURE__ */ c("p", {
168
+ className: "mt-4 rounded-lg bg-slate-100 px-4 py-3 text-xs leading-5 text-slate-600",
169
+ children: /* @__PURE__ */ c("span", { children: x("insurance_modal_terms_note") })
170
+ })
171
+ ]
172
+ }),
173
+ /* @__PURE__ */ c(a, {
174
+ className: "border-t border-slate-200 px-5 py-4 sm:px-6",
175
+ children: /* @__PURE__ */ c(t, {
176
+ type: "button",
177
+ variant: "outline",
178
+ className: "h-11 w-full rounded-xl sm:w-auto",
179
+ onClick: () => E(!1),
180
+ children: /* @__PURE__ */ c("span", { children: x("close_modal") })
181
+ })
182
+ })
183
+ ]
184
+ })
185
+ })
186
+ })
187
+ ]
188
+ });
189
+ }
190
+ //#endregion
191
+ export { v as StorefrontInsuranceNotice };
package/dist/i18n/en.d.ts CHANGED
@@ -22,6 +22,25 @@ export declare const storefront: {
22
22
  feature_delivery_description: string;
23
23
  feature_guarantee_insurance_title: string;
24
24
  feature_guarantee_insurance_description: string;
25
+ insurance_info_aria_label: string;
26
+ insurance_modal_title: string;
27
+ insurance_modal_description: string;
28
+ insurance_modal_pricing_title: string;
29
+ insurance_modal_pricing_description: string;
30
+ insurance_modal_muscular_bike: string;
31
+ insurance_modal_electric_bike: string;
32
+ insurance_modal_price_per_day: string;
33
+ insurance_modal_price_range_per_day: string;
34
+ insurance_modal_price_unavailable: string;
35
+ insurance_modal_coverage_title: string;
36
+ insurance_modal_coverage_accidental_damage: string;
37
+ insurance_modal_coverage_assault_or_break_in: string;
38
+ insurance_modal_coverage_secured_bike_theft: string;
39
+ insurance_modal_claim_title: string;
40
+ insurance_modal_claim_description: string;
41
+ insurance_modal_exclusions_title: string;
42
+ insurance_modal_exclusions_description: string;
43
+ insurance_modal_terms_note: string;
25
44
  cancellation_policy_teaser: string;
26
45
  cancellation_policy_teaser_description: string;
27
46
  cancellation_policy_info_aria_label: string;
@@ -48,6 +67,11 @@ export declare const storefront: {
48
67
  booking_start_time: string;
49
68
  booking_end_date: string;
50
69
  booking_end_time: string;
70
+ booking_time_slots_loading: string;
71
+ booking_time_slots_unavailable: string;
72
+ booking_time_slots_load_error: string;
73
+ booking_time_slots_retry: string;
74
+ booking_time_slots_required: string;
51
75
  booking_selected_days_tooltip_one: string;
52
76
  booking_selected_days_tooltip_other: string;
53
77
  booking_minimum_duration: string;
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuZtB,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+atB,CAAA"}
package/dist/i18n/en.js CHANGED
@@ -22,14 +22,33 @@ var e = {
22
22
  feature_delivery_title: "Delivery available",
23
23
  feature_delivery_description: "Ask about delivery options for your address.",
24
24
  feature_guarantee_insurance_title: "Guarantee and Insurance",
25
- feature_guarantee_insurance_description: "Rental covered according to the shop's terms",
25
+ feature_guarantee_insurance_description: "You can add theft and accidental damage coverage suited to the rented bike",
26
+ insurance_info_aria_label: "Show theft and accidental damage guarantee terms",
27
+ insurance_modal_title: "Theft and accidental damage guarantee",
28
+ insurance_modal_description: "Optional protection that limits your costs after covered accidental damage or theft.",
29
+ insurance_modal_pricing_title: "Price by category",
30
+ insurance_modal_pricing_description: "The guarantee is charged for each bike and for each rental day.",
31
+ insurance_modal_muscular_bike: "Regular bike",
32
+ insurance_modal_electric_bike: "Electric bike",
33
+ insurance_modal_price_per_day: "{{price}} per bike per day",
34
+ insurance_modal_price_range_per_day: "{{minimum_price}} to {{maximum_price}} per bike per day",
35
+ insurance_modal_price_unavailable: "Not currently offered",
36
+ insurance_modal_coverage_title: "What the guarantee covers",
37
+ insurance_modal_coverage_accidental_damage: "Accidental damage to the bike.",
38
+ insurance_modal_coverage_assault_or_break_in: "Theft following assault or a break-in.",
39
+ insurance_modal_coverage_secured_bike_theft: "Theft of a bike secured to a fixed point with the supplied lock.",
40
+ insurance_modal_claim_title: "If something happens",
41
+ insurance_modal_claim_description: "Notify the shop immediately. For theft, file a police report without delay and send the receipt. A deductible may remain payable.",
42
+ insurance_modal_exclusions_title: "Main exclusions",
43
+ insurance_modal_exclusions_description: "Normal wear, punctures, removable accessories, intentional damage or misuse, and theft of an unsecured bike.",
44
+ insurance_modal_terms_note: "The limits, deductibles, supporting documents and exclusions shown when taking out the guarantee and in the rental agreement take precedence.",
26
45
  cancellation_policy_teaser: "Refund* until {{duration}} in advance",
27
46
  cancellation_policy_teaser_description: "See cancellation conditions before booking",
28
47
  cancellation_policy_info_aria_label: "Show cancellation policy",
29
48
  cancellation_policy_modal_title: "Cancellation policy",
30
49
  cancellation_policy_modal_description: "Refunds depend on how far in advance you cancel.",
31
50
  cancellation_policy_modal_tier_deadline: "Up to {{duration}} in advance",
32
- cancellation_policy_modal_tier_refund: "{{percentage}} refund",
51
+ cancellation_policy_modal_tier_refund: "Refund of {{percentage}} of the total amount",
33
52
  cancellation_policy_duration_hours_one: "{{count}} hour",
34
53
  cancellation_policy_duration_hours_other: "{{count}} hours",
35
54
  cancellation_policy_duration_days_one: "{{count}} day",
@@ -49,6 +68,11 @@ var e = {
49
68
  booking_start_time: "Start time",
50
69
  booking_end_date: "End date",
51
70
  booking_end_time: "End time",
71
+ booking_time_slots_loading: "Checking availability…",
72
+ booking_time_slots_unavailable: "No times are available for the selected dates.",
73
+ booking_time_slots_load_error: "Availability could not be loaded.",
74
+ booking_time_slots_retry: "Try again",
75
+ booking_time_slots_required: "Select available start and return times before continuing.",
52
76
  booking_selected_days_tooltip_one: "{{count}} day",
53
77
  booking_selected_days_tooltip_other: "{{count}} days",
54
78
  booking_minimum_duration: "Minimum booking length: {{hours}} hours.",
package/dist/i18n/fr.d.ts CHANGED
@@ -22,6 +22,25 @@ export declare const storefront: {
22
22
  feature_delivery_description: string;
23
23
  feature_guarantee_insurance_title: string;
24
24
  feature_guarantee_insurance_description: string;
25
+ insurance_info_aria_label: string;
26
+ insurance_modal_title: string;
27
+ insurance_modal_description: string;
28
+ insurance_modal_pricing_title: string;
29
+ insurance_modal_pricing_description: string;
30
+ insurance_modal_muscular_bike: string;
31
+ insurance_modal_electric_bike: string;
32
+ insurance_modal_price_per_day: string;
33
+ insurance_modal_price_range_per_day: string;
34
+ insurance_modal_price_unavailable: string;
35
+ insurance_modal_coverage_title: string;
36
+ insurance_modal_coverage_accidental_damage: string;
37
+ insurance_modal_coverage_assault_or_break_in: string;
38
+ insurance_modal_coverage_secured_bike_theft: string;
39
+ insurance_modal_claim_title: string;
40
+ insurance_modal_claim_description: string;
41
+ insurance_modal_exclusions_title: string;
42
+ insurance_modal_exclusions_description: string;
43
+ insurance_modal_terms_note: string;
25
44
  cancellation_policy_teaser: string;
26
45
  cancellation_policy_teaser_description: string;
27
46
  cancellation_policy_info_aria_label: string;
@@ -48,6 +67,11 @@ export declare const storefront: {
48
67
  booking_start_time: string;
49
68
  booking_end_date: string;
50
69
  booking_end_time: string;
70
+ booking_time_slots_loading: string;
71
+ booking_time_slots_unavailable: string;
72
+ booking_time_slots_load_error: string;
73
+ booking_time_slots_retry: string;
74
+ booking_time_slots_required: string;
51
75
  booking_selected_days_tooltip_one: string;
52
76
  booking_selected_days_tooltip_other: string;
53
77
  booking_minimum_duration: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwZtB,CAAA"}
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgbtB,CAAA"}
package/dist/i18n/fr.js CHANGED
@@ -22,14 +22,33 @@ var e = {
22
22
  feature_delivery_title: "Livraison disponible",
23
23
  feature_delivery_description: "Demandez les options de livraison à votre adresse.",
24
24
  feature_guarantee_insurance_title: "Garantie et Assurance",
25
- feature_guarantee_insurance_description: "Vous pouvez souscrire à une assurance pour protéger le matériel loué",
25
+ feature_guarantee_insurance_description: "Vous pouvez souscrire une garantie casse et vol adaptée au vélo loué",
26
+ insurance_info_aria_label: "Afficher les conditions de la garantie casse et vol",
27
+ insurance_modal_title: "Garantie casse et vol",
28
+ insurance_modal_description: "Une protection facultative pour limiter les frais en cas de dommage accidentel ou de vol couvert.",
29
+ insurance_modal_pricing_title: "Tarif par catégorie",
30
+ insurance_modal_pricing_description: "La garantie est facturée pour chaque vélo et pour chaque jour de location.",
31
+ insurance_modal_muscular_bike: "Vélo musculaire",
32
+ insurance_modal_electric_bike: "Vélo électrique",
33
+ insurance_modal_price_per_day: "{{price}} par vélo et par jour",
34
+ insurance_modal_price_range_per_day: "De {{minimum_price}} à {{maximum_price}} par vélo et par jour",
35
+ insurance_modal_price_unavailable: "Non proposée actuellement",
36
+ insurance_modal_coverage_title: "Ce que la garantie couvre",
37
+ insurance_modal_coverage_accidental_damage: "La casse accidentelle du vélo.",
38
+ insurance_modal_coverage_assault_or_break_in: "Le vol par agression ou à la suite d'une effraction.",
39
+ insurance_modal_coverage_secured_bike_theft: "Le vol d'un vélo attaché à un point fixe avec l'antivol fourni.",
40
+ insurance_modal_claim_title: "En cas de sinistre",
41
+ insurance_modal_claim_description: "Prévenez immédiatement le magasin. En cas de vol, déposez plainte sans délai et transmettez le récépissé. Une franchise peut rester à votre charge.",
42
+ insurance_modal_exclusions_title: "Principales exclusions",
43
+ insurance_modal_exclusions_description: "Usure normale, crevaisons, accessoires amovibles, dommages intentionnels ou liés à une mauvaise utilisation, et vol d'un vélo non attaché.",
44
+ insurance_modal_terms_note: "Les plafonds, franchises, justificatifs et exclusions indiqués au moment de la souscription et dans le contrat de location prévalent.",
26
45
  cancellation_policy_teaser: "Annulation et remboursement* jusqu'à {{duration}} à l'avance",
27
46
  cancellation_policy_teaser_description: "Vous pouvez annuler ou modifier votre réservation jusqu'à {{duration}} avant son début",
28
47
  cancellation_policy_info_aria_label: "Afficher les conditions d'annulation",
29
48
  cancellation_policy_modal_title: "Conditions d'annulation",
30
49
  cancellation_policy_modal_description: "Le remboursement dépend du délai entre l'annulation et le début de la réservation.",
31
50
  cancellation_policy_modal_tier_deadline: "Jusqu'à {{duration}} à l'avance",
32
- cancellation_policy_modal_tier_refund: "Remboursement de {{percentage}}",
51
+ cancellation_policy_modal_tier_refund: "Remboursement de {{percentage}} du montant total",
33
52
  cancellation_policy_duration_hours_one: "{{count}} heure",
34
53
  cancellation_policy_duration_hours_other: "{{count}} heures",
35
54
  cancellation_policy_duration_days_one: "{{count}} jour",
@@ -49,6 +68,11 @@ var e = {
49
68
  booking_start_time: "Heure de départ",
50
69
  booking_end_date: "Date de retour",
51
70
  booking_end_time: "Heure de retour",
71
+ booking_time_slots_loading: "Vérification des disponibilités…",
72
+ booking_time_slots_unavailable: "Aucun horaire n’est disponible pour les dates sélectionnées.",
73
+ booking_time_slots_load_error: "Impossible de charger les disponibilités.",
74
+ booking_time_slots_retry: "Réessayer",
75
+ booking_time_slots_required: "Sélectionnez des heures de départ et de retour disponibles avant de continuer.",
52
76
  booking_selected_days_tooltip_one: "{{count}} jour",
53
77
  booking_selected_days_tooltip_other: "{{count}} jours",
54
78
  booking_minimum_duration: "Durée minimale de réservation : {{hours}} heures.",