@loczer/storefront-sdk 0.212.0 → 0.214.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 (62) hide show
  1. package/dist/StorefrontContext.d.ts +18 -0
  2. package/dist/StorefrontContext.d.ts.map +1 -1
  3. package/dist/StorefrontProvider.d.ts +9 -0
  4. package/dist/StorefrontProvider.d.ts.map +1 -1
  5. package/dist/chunks/pkg/ui/dist/Drawer/{index-CSvSVP_J.js → index-Dp62Y2o5.js} +10 -7
  6. package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-BVwhTZQo.js → ResponsiveDialog-BJ0RG6gh.js} +1 -1
  7. package/dist/components/BikeProductCard/index.d.ts.map +1 -1
  8. package/dist/components/BikeProductCard/index.js +5 -5
  9. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  10. package/dist/components/BookingBikeVariantDialog/index.js +23 -27
  11. package/dist/components/BookingFlowSteps/index.d.ts.map +1 -1
  12. package/dist/components/BookingFlowSteps/index.js +73 -32
  13. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  14. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  15. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +16 -16
  16. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
  17. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
  18. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +2 -2
  19. package/dist/components/BookingPeriodSelector/index.js +3 -3
  20. package/dist/components/Footer/index.d.ts +2 -1
  21. package/dist/components/Footer/index.d.ts.map +1 -1
  22. package/dist/components/Footer/index.js +64 -58
  23. package/dist/components/FulfillmentSection/index.js +10 -4
  24. package/dist/components/Header/index.d.ts.map +1 -1
  25. package/dist/components/Header/index.js +205 -100
  26. package/dist/components/Layout/index.d.ts.map +1 -1
  27. package/dist/components/Layout/index.js +3 -2
  28. package/dist/components/PlatformFooter/index.js +6 -6
  29. package/dist/components/ProductPriceBadge/index.js +16 -10
  30. package/dist/components/StorefrontCancellationPolicyNotice/index.js +1 -1
  31. package/dist/components/StorefrontInsuranceNotice/index.js +1 -1
  32. package/dist/components/StorefrontPopupMessages/index.js +1 -1
  33. package/dist/i18n/en.d.ts +13 -4
  34. package/dist/i18n/en.d.ts.map +1 -1
  35. package/dist/i18n/en.js +13 -4
  36. package/dist/i18n/fr.d.ts +13 -4
  37. package/dist/i18n/fr.d.ts.map +1 -1
  38. package/dist/i18n/fr.js +13 -4
  39. package/dist/index.d.ts +88 -11
  40. package/dist/index.js +69 -68
  41. package/dist/lib/cart.d.ts +6 -2
  42. package/dist/lib/cart.d.ts.map +1 -1
  43. package/dist/lib/cart.js +45 -23
  44. package/dist/lib/checkoutSubmit.d.ts +3 -0
  45. package/dist/lib/checkoutSubmit.d.ts.map +1 -1
  46. package/dist/lib/checkoutSubmit.js +14 -2
  47. package/dist/pages/BookingPage.d.ts.map +1 -1
  48. package/dist/pages/BookingPage.js +8 -2
  49. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  50. package/dist/pages/CheckoutPage.js +235 -245
  51. package/dist/pages/HomePage.d.ts.map +1 -1
  52. package/dist/pages/HomePage.js +253 -235
  53. package/dist/pages/RentalTermsPage.d.ts +2 -0
  54. package/dist/pages/RentalTermsPage.d.ts.map +1 -0
  55. package/dist/pages/RentalTermsPage.js +52 -0
  56. package/dist/routes.d.ts.map +1 -1
  57. package/dist/routes.js +14 -10
  58. package/dist/storefront.css +1 -1
  59. package/dist/storefrontSchemas.d.ts +19 -0
  60. package/dist/storefrontSchemas.d.ts.map +1 -1
  61. package/dist/storefrontSchemas.js +39 -35
  62. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ export default function RentalTermsPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=RentalTermsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RentalTermsPage.d.ts","sourceRoot":"","sources":["../../src/pages/RentalTermsPage.tsx"],"names":[],"mappings":"AA8CA,MAAM,CAAC,OAAO,UAAU,eAAe,4CA8CtC"}
@@ -0,0 +1,52 @@
1
+ import { useStorefront as e } from "../StorefrontContext.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { useTranslation as r } from "react-i18next";
4
+ import { cn as i } from "@rpcbase/ui";
5
+ //#region src/pages/RentalTermsPage.tsx
6
+ var a = i("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"), o = ({ language: e, timeZone: t, value: n }) => n ? new Intl.DateTimeFormat(e, {
7
+ day: "numeric",
8
+ month: "long",
9
+ year: "numeric",
10
+ timeZone: t || "UTC"
11
+ }).format(new Date(n)) : "";
12
+ function s() {
13
+ let { t: s, i18n: c } = r(), { storefrontConfiguration: l } = e(), u = l.information?.rentalTerms, d = u?.text.trim() ? u.html.trim() : "", f = o({
14
+ language: c.resolvedLanguage || c.language || "en",
15
+ timeZone: l.shop.timeZone,
16
+ value: l.information?.rentalTermsUpdatedAt
17
+ });
18
+ return /* @__PURE__ */ t("section", {
19
+ className: "min-h-[70vh] bg-white",
20
+ children: /* @__PURE__ */ t("div", {
21
+ className: "mx-auto max-w-7xl px-4 sm:px-6",
22
+ children: /* @__PURE__ */ n("article", {
23
+ className: "mx-auto max-w-3xl py-10 sm:py-14",
24
+ children: [/* @__PURE__ */ n("header", {
25
+ className: "border-b border-slate-200 pb-8 sm:pb-10",
26
+ children: [
27
+ f ? /* @__PURE__ */ t("p", {
28
+ className: "text-sm text-slate-500",
29
+ children: /* @__PURE__ */ t("span", { children: s("rental_terms_effective_date", { date: f }) })
30
+ }) : null,
31
+ /* @__PURE__ */ t("h1", {
32
+ className: i("font-serif text-4xl font-normal leading-tight tracking-tight text-slate-950 sm:text-5xl", f && "mt-3"),
33
+ children: /* @__PURE__ */ t("span", { children: s("rental_terms_title") })
34
+ }),
35
+ /* @__PURE__ */ t("p", {
36
+ className: "mt-4 max-w-2xl text-base leading-7 text-slate-600 sm:text-lg sm:leading-8",
37
+ children: /* @__PURE__ */ t("span", { children: s("rental_terms_description", { shop_name: l.shop.name }) })
38
+ })
39
+ ]
40
+ }), d ? /* @__PURE__ */ t("div", {
41
+ className: a,
42
+ dangerouslySetInnerHTML: { __html: d }
43
+ }) : /* @__PURE__ */ t("p", {
44
+ className: "mt-10 border-l-2 border-slate-300 pl-5 text-base leading-8 text-slate-600 sm:mt-12",
45
+ children: /* @__PURE__ */ t("span", { children: s("rental_terms_unavailable") })
46
+ })]
47
+ })
48
+ })
49
+ });
50
+ }
51
+ //#endregion
52
+ export { s as default };
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.tsx"],"names":[],"mappings":";AAgCA,wBAwBC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.tsx"],"names":[],"mappings":";AAiCA,wBAyBC"}
package/dist/routes.js CHANGED
@@ -3,10 +3,10 @@ import t from "./pages/ErrorPage.js";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  import { Route as i, lazyRoute as a } from "@rpcbase/router";
5
5
  //#region src/routes.tsx
6
- var o = a(() => import("./StorefrontProvider.js")), s = a(() => import("./pages/HomePage.js")), c = a(() => import("./pages/BookingPage.js")), l = a(() => import("./pages/ProductPage.js")), u = a(() => import("./pages/ItinerariesPage.js")), d = a(() => import("./pages/ItineraryDetailsPage.js")), f = a(() => import("./pages/CheckoutPage.js")), p = a(() => import("./pages/CheckoutPaymentPage.js")), m = a(() => import("./pages/CheckoutSuccessPage.js")), h = a(() => import("./pages/ContractSaleDocumentPage.js")), g = a(() => import("./pages/PaymentLinkPage.js")), _ = a(() => import("./pages/PaymentLinkSuccessPage.js")), v = a(() => import("./pages/NotFoundPage.js")), y = ({ currentParams: e, nextParams: t, defaultShouldRevalidate: n }) => e.storeSlug !== t.storeSlug && n, b = /* @__PURE__ */ r(i, {
6
+ var o = a(() => import("./StorefrontProvider.js")), s = a(() => import("./pages/HomePage.js")), c = a(() => import("./pages/BookingPage.js")), l = a(() => import("./pages/ProductPage.js")), u = a(() => import("./pages/ItinerariesPage.js")), d = a(() => import("./pages/ItineraryDetailsPage.js")), f = a(() => import("./pages/RentalTermsPage.js")), p = a(() => import("./pages/CheckoutPage.js")), m = a(() => import("./pages/CheckoutPaymentPage.js")), h = a(() => import("./pages/CheckoutSuccessPage.js")), g = a(() => import("./pages/ContractSaleDocumentPage.js")), _ = a(() => import("./pages/PaymentLinkPage.js")), v = a(() => import("./pages/PaymentLinkSuccessPage.js")), y = a(() => import("./pages/NotFoundPage.js")), b = ({ currentParams: e, nextParams: t, defaultShouldRevalidate: n }) => e.storeSlug !== t.storeSlug && n, x = /* @__PURE__ */ r(i, {
7
7
  path: ":storeSlug/*",
8
8
  ...o,
9
- shouldRevalidate: y,
9
+ shouldRevalidate: b,
10
10
  errorElement: /* @__PURE__ */ n(e, { children: /* @__PURE__ */ n(t, {}) }),
11
11
  children: [
12
12
  /* @__PURE__ */ n(i, {
@@ -30,34 +30,38 @@ var o = a(() => import("./StorefrontProvider.js")), s = a(() => import("./pages/
30
30
  ...d
31
31
  }),
32
32
  /* @__PURE__ */ n(i, {
33
- path: "checkout",
33
+ path: "rental-terms",
34
34
  ...f
35
35
  }),
36
36
  /* @__PURE__ */ n(i, {
37
- path: "checkout/payment",
37
+ path: "checkout",
38
38
  ...p
39
39
  }),
40
40
  /* @__PURE__ */ n(i, {
41
- path: "checkout/success",
41
+ path: "checkout/payment",
42
42
  ...m
43
43
  }),
44
44
  /* @__PURE__ */ n(i, {
45
- path: "docs/:referenceId/:saleDocumentId",
45
+ path: "checkout/success",
46
46
  ...h
47
47
  }),
48
48
  /* @__PURE__ */ n(i, {
49
- path: "secure-payment-link/:token",
49
+ path: "docs/:referenceId/:saleDocumentId",
50
50
  ...g
51
51
  }),
52
52
  /* @__PURE__ */ n(i, {
53
- path: "secure-payment-link/:token/success",
53
+ path: "secure-payment-link/:token",
54
54
  ..._
55
55
  }),
56
56
  /* @__PURE__ */ n(i, {
57
- path: "*",
57
+ path: "secure-payment-link/:token/success",
58
58
  ...v
59
+ }),
60
+ /* @__PURE__ */ n(i, {
61
+ path: "*",
62
+ ...y
59
63
  })
60
64
  ]
61
65
  });
62
66
  //#endregion
63
- export { b as default };
67
+ export { x as default };