@loczer/storefront-sdk 0.188.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 (46) hide show
  1. package/dist/chunks/ui/dist/Map/{MapContent-QPkuTBvK.js → MapContent-PK-ptOx6.js} +126 -94
  2. package/dist/chunks/ui/dist/Map/mapboxError-oRn0l3EE.js +25 -0
  3. package/dist/chunks/ui/dist/{Map-BXmRf5Ep.js → Map-BwXj49kV.js} +1 -1
  4. package/dist/components/BookingBikeVariantDialog/index.d.ts +2 -1
  5. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  6. package/dist/components/BookingBikeVariantDialog/index.js +39 -38
  7. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
  8. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +32 -30
  9. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts.map +1 -1
  10. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +127 -122
  11. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
  12. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +32 -30
  13. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts +7 -0
  14. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts.map +1 -0
  15. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js +29 -0
  16. package/dist/components/BookingPeriodSelector/index.d.ts +2 -1
  17. package/dist/components/BookingPeriodSelector/index.d.ts.map +1 -1
  18. package/dist/components/BookingPeriodSelector/index.js +15 -14
  19. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +11 -0
  20. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  21. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +280 -216
  22. package/dist/components/ContactSection/index.d.ts.map +1 -1
  23. package/dist/components/ContactSection/index.js +120 -116
  24. package/dist/components/Header/index.d.ts.map +1 -1
  25. package/dist/components/Header/index.js +35 -35
  26. package/dist/components/Map/index.js +1 -1
  27. package/dist/i18n/en.d.ts +5 -0
  28. package/dist/i18n/en.d.ts.map +1 -1
  29. package/dist/i18n/en.js +5 -0
  30. package/dist/i18n/fr.d.ts +5 -0
  31. package/dist/i18n/fr.d.ts.map +1 -1
  32. package/dist/i18n/fr.js +5 -0
  33. package/dist/index.d.ts +29 -0
  34. package/dist/index.js +26 -25
  35. package/dist/lib/fetchStorefrontTimeSlots.d.ts.map +1 -1
  36. package/dist/lib/fetchStorefrontTimeSlots.js +2 -1
  37. package/dist/pages/BookingPage.d.ts.map +1 -1
  38. package/dist/pages/BookingPage.js +109 -95
  39. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  40. package/dist/pages/CheckoutPage.js +229 -231
  41. package/dist/pages/HomePage.d.ts.map +1 -1
  42. package/dist/pages/HomePage.js +304 -275
  43. package/dist/pages/ProductPage.d.ts.map +1 -1
  44. package/dist/pages/ProductPage.js +60 -52
  45. package/dist/storefront.css +1 -1
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0atB,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
@@ -68,6 +68,11 @@ var e = {
68
68
  booking_start_time: "Start time",
69
69
  booking_end_date: "End date",
70
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.",
71
76
  booking_selected_days_tooltip_one: "{{count}} day",
72
77
  booking_selected_days_tooltip_other: "{{count}} days",
73
78
  booking_minimum_duration: "Minimum booking length: {{hours}} hours.",
package/dist/i18n/fr.d.ts CHANGED
@@ -67,6 +67,11 @@ export declare const storefront: {
67
67
  booking_start_time: string;
68
68
  booking_end_date: string;
69
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;
70
75
  booking_selected_days_tooltip_one: string;
71
76
  booking_selected_days_tooltip_other: string;
72
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2atB,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
@@ -68,6 +68,11 @@ var e = {
68
68
  booking_start_time: "Heure de départ",
69
69
  booking_end_date: "Date de retour",
70
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.",
71
76
  booking_selected_days_tooltip_one: "{{count}} jour",
72
77
  booking_selected_days_tooltip_other: "{{count}} jours",
73
78
  booking_minimum_duration: "Durée minimale de réservation : {{hours}} heures.",
package/dist/index.d.ts CHANGED
@@ -628,6 +628,7 @@ export declare interface BookingPeriodControllerOptions {
628
628
  buttonClassName?: string;
629
629
  bookingPeriodConfig?: BookingPeriodConfig;
630
630
  fetchTimeSlots?: BookingPeriodTimeSlotsFetcher;
631
+ onTimeSlotsAvailabilityChange?: (isAvailable: boolean) => void;
631
632
  selectionFlow?: BookingPeriodSelectionFlow;
632
633
  withMobileDateDrawer?: boolean;
633
634
  currencyCode?: string;
@@ -674,6 +675,11 @@ export declare interface BookingPeriodControllerValue {
674
675
  resetHoveredEndDate: () => void;
675
676
  startTimeSlots: TimeSlot[];
676
677
  availableEndTimeSlots: TimeSlot[];
678
+ startTimeSlotsStatus: BookingPeriodTimeSlotsStatus;
679
+ endTimeSlotsStatus: BookingPeriodTimeSlotsStatus;
680
+ retryStartTimeSlots: () => void;
681
+ retryEndTimeSlots: () => void;
682
+ canCommitTimeSlots: boolean;
677
683
  isStartToday: boolean;
678
684
  isEndToday: boolean;
679
685
  minSelectableDate: Date;
@@ -726,6 +732,10 @@ export declare type BookingPeriodLabels = {
726
732
  rentalPeriod?: string;
727
733
  dateDrawerNext?: string;
728
734
  closeDrawer?: string;
735
+ timeSlotsLoading?: string;
736
+ timeSlotsUnavailable?: string;
737
+ timeSlotsLoadError?: string;
738
+ retryTimeSlots?: string;
729
739
  };
730
740
 
731
741
  export declare const BookingPeriodProvider: ({ children, ...options }: BookingPeriodProviderProps) => JSX.Element;
@@ -744,6 +754,8 @@ declare type BookingPeriodSelectorProps = BookingPeriodControllerOptions & {
744
754
 
745
755
  export declare type BookingPeriodTimeSlotsFetcher = (date: string, journey: JourneyType) => Promise<TimeSlot[] | null>;
746
756
 
757
+ export declare type BookingPeriodTimeSlotsStatus = "local" | "loading" | "ready" | "error";
758
+
747
759
  export declare type BookingPeriodTranslator = (key: string, options?: Record<string, unknown>) => string;
748
760
 
749
761
  export declare type BookingScheduleInput = z.infer<typeof bookingScheduleInputSchema>;
@@ -761,6 +773,13 @@ export declare const BookingStartDateField: () => JSX.Element;
761
773
 
762
774
  export declare const BookingStartTimeField: () => JSX.Element;
763
775
 
776
+ export declare const BookingTimeSlotsStatus: ({ className, testId, }: BookingTimeSlotsStatusProps) => JSX.Element | null;
777
+
778
+ declare type BookingTimeSlotsStatusProps = {
779
+ className?: string;
780
+ testId?: string;
781
+ };
782
+
764
783
  declare type BookingTimingConfig = {
765
784
  slotIntervalMinutes: number;
766
785
  autoFillCutoffMinutes: number;
@@ -3555,6 +3574,11 @@ export declare const storefrontEn: {
3555
3574
  booking_start_time: string;
3556
3575
  booking_end_date: string;
3557
3576
  booking_end_time: string;
3577
+ booking_time_slots_loading: string;
3578
+ booking_time_slots_unavailable: string;
3579
+ booking_time_slots_load_error: string;
3580
+ booking_time_slots_retry: string;
3581
+ booking_time_slots_required: string;
3558
3582
  booking_selected_days_tooltip_one: string;
3559
3583
  booking_selected_days_tooltip_other: string;
3560
3584
  booking_minimum_duration: string;
@@ -4014,6 +4038,11 @@ export declare const storefrontFr: {
4014
4038
  booking_start_time: string;
4015
4039
  booking_end_date: string;
4016
4040
  booking_end_time: string;
4041
+ booking_time_slots_loading: string;
4042
+ booking_time_slots_unavailable: string;
4043
+ booking_time_slots_load_error: string;
4044
+ booking_time_slots_retry: string;
4045
+ booking_time_slots_required: string;
4017
4046
  booking_selected_days_tooltip_one: string;
4018
4047
  booking_selected_days_tooltip_other: string;
4019
4048
  booking_minimum_duration: string;
package/dist/index.js CHANGED
@@ -46,35 +46,36 @@ import { BookingStartDateField as Pn } from "./components/BookingPeriodSelector/
46
46
  import { BookingStartTimeField as Fn } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
47
47
  import { BookingEndDateField as In } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
48
48
  import { BookingEndTimeField as Ln } from "./components/BookingPeriodSelector/components/BookingEndTimeField.js";
49
- import { BookingMobileDateDrawer as Rn } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
50
- import { BookingPeriodSelector as zn } from "./components/BookingPeriodSelector/index.js";
51
- import { BookingFlowSteps as Bn } from "./components/BookingFlowSteps/index.js";
52
- import { Input as Vn } from "./ui/input.js";
53
- import { DeliveryAddressSelector as Hn } from "./components/DeliveryAddressSelector/index.js";
54
- import { loader as Un, useOptionalStorefront as Wn, useStorefront as Gn, useStorefrontBookingProducts as Kn, useStorefrontConfig as qn, useStorefrontProducts as Jn, useStorefrontWorkspaceLanguage as Yn } from "./StorefrontProvider.js";
55
- import { Form as Xn, FormControl as Zn, FormDescription as Qn, FormField as $n, FormItem as er, FormLabel as tr, FormMessage as nr, useFormField as rr } from "./ui/form.js";
56
- import { Textarea as ir } from "./ui/textarea.js";
57
- import { ContactSection as ar } from "./components/ContactSection/index.js";
58
- import { TestimonialsSection as or } from "./components/TestimonialsSection/index.js";
59
- import { AboutSection as sr } from "./components/AboutSection/index.js";
60
- import { StepSectionTitle as cr } from "./components/StepSectionTitle/index.js";
61
- import { Card as lr, CardAction as ur, CardContent as dr, CardDescription as fr, CardFooter as pr, CardHeader as mr, CardTitle as hr } from "./ui/card.js";
62
- import { ProductWarningNotice as gr } from "./components/ProductWarningNotice/index.js";
63
- import { StorefrontCartPanel as _r } from "./components/StorefrontCartPanel/index.js";
64
- import { ProductPriceBadge as vr } from "./components/ProductPriceBadge/index.js";
65
- import { ContractSaleDocument as yr } from "./components/ContractSaleDocument/Invoice.js";
49
+ import { BookingTimeSlotsStatus as Rn } from "./components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
50
+ import { BookingMobileDateDrawer as zn } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
51
+ import { BookingPeriodSelector as Bn } from "./components/BookingPeriodSelector/index.js";
52
+ import { BookingFlowSteps as Vn } from "./components/BookingFlowSteps/index.js";
53
+ import { Input as Hn } from "./ui/input.js";
54
+ import { DeliveryAddressSelector as Un } from "./components/DeliveryAddressSelector/index.js";
55
+ import { loader as Wn, useOptionalStorefront as Gn, useStorefront as Kn, useStorefrontBookingProducts as qn, useStorefrontConfig as Jn, useStorefrontProducts as Yn, useStorefrontWorkspaceLanguage as Xn } from "./StorefrontProvider.js";
56
+ import { Form as Zn, FormControl as Qn, FormDescription as $n, FormField as er, FormItem as tr, FormLabel as nr, FormMessage as rr, useFormField as ir } from "./ui/form.js";
57
+ import { Textarea as ar } from "./ui/textarea.js";
58
+ import { ContactSection as or } from "./components/ContactSection/index.js";
59
+ import { TestimonialsSection as sr } from "./components/TestimonialsSection/index.js";
60
+ import { AboutSection as cr } from "./components/AboutSection/index.js";
61
+ import { StepSectionTitle as lr } from "./components/StepSectionTitle/index.js";
62
+ import { Card as ur, CardAction as dr, CardContent as fr, CardDescription as pr, CardFooter as mr, CardHeader as hr, CardTitle as gr } from "./ui/card.js";
63
+ import { ProductWarningNotice as _r } from "./components/ProductWarningNotice/index.js";
64
+ import { StorefrontCartPanel as vr } from "./components/StorefrontCartPanel/index.js";
65
+ import { ProductPriceBadge as yr } from "./components/ProductPriceBadge/index.js";
66
+ import { ContractSaleDocument as br } from "./components/ContractSaleDocument/Invoice.js";
66
67
  import "./components/ContractSaleDocument/index.js";
67
- import { RadioGroup as br, RadioGroupItem as xr } from "./ui/radio-group.js";
68
+ import { RadioGroup as xr, RadioGroupItem as Sr } from "./ui/radio-group.js";
68
69
  import "./pages/HomePage.js";
69
70
  import "./pages/BookingPage.js";
70
71
  import "./pages/ProductPage.js";
71
72
  import "./pages/CheckoutPage.js";
72
73
  import "./pages/CheckoutSuccessPage.js";
73
74
  import "./pages/NotFoundPage.js";
74
- import { accessories as Sr } from "./data/accessories.js";
75
- import Cr from "./data/bikes.js";
76
- import { contractSaleDocumentAcceptanceLevelSchema as wr, contractSaleDocumentAcceptanceRecordSchema as Tr, contractSaleDocumentAcceptanceSchema as Er, contractSaleDocumentAddressSchema as Dr, contractSaleDocumentContactSchema as Or, contractSaleDocumentKindSchema as kr, contractSaleDocumentLanguageCodeSchema as Ar, contractSaleDocumentLanguageSchema as jr, contractSaleDocumentLineItemSchema as Mr, contractSaleDocumentSchema as Nr, contractSaleDocumentSignatureSchema as Pr } from "./lib/contractSaleDocument.js";
77
- import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as Fr, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Ir, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Lr, acceptContractSaleDocumentRequestSchema as Rr, acceptContractSaleDocumentResponseSchema as zr, contractSaleDocumentAcceptanceInputSchema as Br, contractSaleDocumentAcceptanceRecordInputSchema as Vr, contractSaleDocumentApiAcceptanceRecordSchema as Hr, contractSaleDocumentApiAcceptanceSchema as Ur, contractSaleDocumentApiSchema as Wr, contractSaleDocumentApiSignatureSchema as Gr, contractSaleDocumentReferenceSchema as Kr, contractSaleDocumentReferenceTypeSchema as qr, contractSaleDocumentSignatureInputSchema as Jr, downloadContractSaleDocumentPdfRequestSchema as Yr, getContractSaleDocumentRequestSchema as Xr, getContractSaleDocumentResponseSchema as Zr } from "./lib/contractSaleDocumentApi.js";
78
- import Qr from "./routes.js";
79
- import { Select as $r, SelectContent as ei, SelectGroup as ti, SelectIcon as ni, SelectItem as ri, SelectItemIndicator as ii, SelectItemText as ai, SelectLabel as oi, SelectScrollDownButton as si, SelectScrollUpButton as ci, SelectSeparator as li, SelectTrigger as ui, SelectValue as di } from "./ui/select.js";
80
- export { Fr as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, sr as AboutSection, Te as BOOKING_SEARCH_KEYS, _n as Badge, In as BookingEndDateField, Ln as BookingEndTimeField, Bn as BookingFlowSteps, Rn as BookingMobileDateDrawer, jn as BookingPeriodProvider, zn as BookingPeriodSelector, Pn as BookingStartDateField, Fn as BookingStartTimeField, yn as Button, We as CATALOG_PRODUCT_BASE_RATE_UNSET, lr as Card, ur as CardAction, dr as CardContent, fr as CardDescription, pr as CardFooter, mr as CardHeader, hr as CardTitle, ar as ContactSection, yr as ContractSaleDocument, J as DEFAULT_BOOKING_DELIVERY_OPTION, z as DEFAULT_CANCELLATION_POLICY, B as DEFAULT_PAYMENT_POLICIES, Ir as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, kn as DelayedPlaceholder, An as DelayedReveal, Hn as DeliveryAddressSelector, gn as Footer, Xn as Form, Zn as FormControl, Qn as FormDescription, $n as FormField, er as FormItem, tr as FormLabel, nr as FormMessage, Lr as GET_CONTRACT_SALE_DOCUMENT_ROUTE, xn as Header, Vn as Input, Nn as Label, On as Layout, p as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, m as PRODUCT_VARIANT_CODE_MAX_LENGTH, Tn as PlatformFooter, wn as PoweredByLoczerBadge, vr as ProductPriceBadge, gr as ProductWarningNotice, St as ROUTE, br as RadioGroup, xr as RadioGroupItem, Jt as STOREFRONT_AVAILABILITY_ROUTE, jt as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, ce as STOREFRONT_HERO_MODES, cn as STOREFRONT_IMAGE_ROUTE, Lt as STOREFRONT_PRODUCTS_ROUTE, dn as STOREFRONT_TIME_SLOTS_ROUTE, $r as Select, ei as SelectContent, ti as SelectGroup, ni as SelectIcon, ri as SelectItem, ii as SelectItemIndicator, ai as SelectItemText, oi as SelectLabel, si as SelectScrollDownButton, ci as SelectScrollUpButton, li as SelectSeparator, ui as SelectTrigger, di as SelectValue, cr as StepSectionTitle, _r as StorefrontCartPanel, ct as StorefrontCartProvider, Ee as TIME_OPTIONS, or as TestimonialsSection, ir as Textarea, Dn as WhatsAppFloatingButton, Rr as acceptContractSaleDocumentRequestSchema, zr as acceptContractSaleDocumentResponseSchema, Sr as accessories, h as accessoryProductSchema, De as applyBookingParamsToSearch, vn as badgeVariants, re as baseAssetSchema, ie as baseAssetStatusSchema, ae as baseBookingItemSchema, oe as baseBookingSchema, se as baseBookingStateSchema, g as bikeProductSchema, Cr as bikes, Y as bookingCustomerInputSchema, X as bookingDeliveryOptionSchema, Z as bookingScheduleInputSchema, ht as buildDailyPriceRows, gt as buildPriceTierLabels, Yt as buildStorefrontAvailabilityKey, xt as buildStorefrontCartSummary, ln as buildStorefrontImageUrl, Ge as buildStorefrontProductSlug, Ke as buildVariantStorefrontProductId, Ot as buildWhatsAppHref, bn as buttonVariants, _t as calculateDailyPriceForQuantity, V as cancellationPolicySchema, H as cancellationPolicyTierSchema, Q as cartItemInputSchema, dt as cn, qe as compareCatalogProducts, Je as compareStorefrontAccessoryProducts, Ye as compareStorefrontBikeProducts, Br as contractSaleDocumentAcceptanceInputSchema, wr as contractSaleDocumentAcceptanceLevelSchema, Vr as contractSaleDocumentAcceptanceRecordInputSchema, Tr as contractSaleDocumentAcceptanceRecordSchema, Er as contractSaleDocumentAcceptanceSchema, Dr as contractSaleDocumentAddressSchema, Hr as contractSaleDocumentApiAcceptanceRecordSchema, Ur as contractSaleDocumentApiAcceptanceSchema, Wr as contractSaleDocumentApiSchema, Gr as contractSaleDocumentApiSignatureSchema, Or as contractSaleDocumentContactSchema, kr as contractSaleDocumentKindSchema, Ar as contractSaleDocumentLanguageCodeSchema, jr as contractSaleDocumentLanguageSchema, Mr as contractSaleDocumentLineItemSchema, Kr as contractSaleDocumentReferenceSchema, qr as contractSaleDocumentReferenceTypeSchema, Nr as contractSaleDocumentSchema, Jr as contractSaleDocumentSignatureInputSchema, Pr as contractSaleDocumentSignatureSchema, $ as createBookingInputBaseSchema, ee as createBookingInputSchema, Oe as createBookingPeriodConfigFromBookingEngineConfiguration, ke as createBookingPeriodConfigFromShopConfiguration, Ae as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, Xt as doesStorefrontAvailabilityDisplaySoldOut, Yr as downloadContractSaleDocumentPdfRequestSchema, _ as eBikeProductSchema, Xe as findStorefrontProduct, Ze as findStorefrontProductBySlug, ft as formatPriceMinor, Tt as formatStorefrontPhoneDisplay, vt as formatStorefrontPriceMinor, W as fulfillmentModeSchema, pt as getAvailabilityVariant, je as getBookingDurationLabel, Me as getBookingDurationMinutes, Ne as getBookingParamsFromSearch, Pe as getBookingSessionStorageKey, Qe as getCatalogProductBaseRateMinor, $e as getCatalogProductPaginationSort, et as getCatalogProductSortFieldForPriceUnit, Xr as getContractSaleDocumentRequestSchema, Zr as getContractSaleDocumentResponseSchema, Fe as getDefaultBookingParams, Ie as getDefaultBookingParamsForStorefrontConfiguration, yt as getLocalizedEntry, t as getLocalizedStringValue, bt as getLocalizedValue, mt as getMinDayPriceMinor, Zt as getStorefrontAvailabilityIssue, Qt as getStorefrontAvailabilityStatus, tt as getStorefrontBaseDailyRateMinor, nt as getStorefrontCheckoutProductId, rt as getStorefrontRepresentedVariantId, v as isProductVariantCodeIdentifierKind, $t as isStorefrontAvailabilityInsufficient, A as isoDateSchema, Un as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, U as paymentPoliciesSchema, Le as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, y as productInsuranceSchema, b as productKindSchema, x as productSchema, S as productStorefrontDisplayModeSchema, C as productVariantAttributeSchema, w as productVariantCodeSchema, T as productVariantIdentifierSchema, E as productVariantSchema, en as publicAvailabilityDisplayModeSchema, G as publicBookingEngineConfigurationSchema, K as publicCheckoutConfigurationSchema, q as publicCheckoutDynamicOptionsSchema, Re as readBookingSearchParamsFromSessionStorage, ze as readBookingSearchParamsFromStorage, Ct as requestSchema, te as resolveBookingDeliveryOption, Be as resolveBookingSearchParams, Ve as resolveBookingSearchParamsFromSessionStorage, lt as resolveStorefrontCartItemProduct, Et as resolveStorefrontMapsHref, Dt as resolveStorefrontPhoneContact, kt as resolveStorefrontWhatsAppContact, At as resolveStorefrontWhatsAppHref, wt as responseSchema, D as richTextJsonDocSchema, O as richTextSchema, k as richTextVersionSchema, j as shopConfigurationSchema, M as shopExtraTimeSlotRuleSchema, N as shopOpeningDayIndexSchema, P as shopOpeningDaySchema, F as shopOpeningHoursOverrideSchema, I as shopOpeningHoursPeriodSchema, L as shopOpeningSlotSchema, rn as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, an as storefrontAvailabilityProductSchema, tn as storefrontAvailabilityRequestSchema, nn as storefrontAvailabilityResponseSchema, on as storefrontAvailabilityScheduleSchema, le as storefrontCheckoutModeSchema, Pt as storefrontCheckoutSubmitDeliveryRefinement, Nt as storefrontCheckoutSubmitItemSchema, Mt as storefrontCheckoutSubmitRequestBaseSchema, Ft as storefrontCheckoutSubmitRequestSchema, It as storefrontCheckoutSubmitResponseSchema, ue as storefrontConfigurationSchema, de as storefrontContentSchema, Sn as storefrontEn, fe as storefrontFaqItemSchema, pe as storefrontFaqSchema, Cn as storefrontFr, me as storefrontFulfillmentModeSchema, he as storefrontHeroModeSchema, un as storefrontImageRequestSchema, ge as storefrontLocalizedRichTextSchema, _e as storefrontModalMessageSchema, ve as storefrontModulesSchema, Rt as storefrontProductsRequestSchema, zt as storefrontProductsResponseSchema, Bt as storefrontPublicAccessoryProductSchema, sn as storefrontPublicAvailabilityRecordSchema, Vt as storefrontPublicBikeAvailabilityStatusSchema, Ht as storefrontPublicBikeProductSchema, Ut as storefrontPublicProductDisplayModeSchema, Wt as storefrontPublicProductPriceSchema, Gt as storefrontPublicProductVariantAttributeSchema, Kt as storefrontPublicProductVariantIdentifierSchema, qt as storefrontPublicProductVariantSchema, ye as storefrontReviewsModuleSchema, be as storefrontRichTextSchema, Qr as storefrontRoutes, xe as storefrontSettingsSchema, Se as storefrontShopSchema, Ce as storefrontStatusSchema, hn as storefrontTimeSlotJourneySchema, mn as storefrontTimeSlotSchema, fn as storefrontTimeSlotsRequestSchema, pn as storefrontTimeSlotsResponseSchema, we as storefrontWorkspaceSchema, R as timeOfDaySchema, it as toStorefrontAccessoryProducts, at as toStorefrontBikeProducts, ot as toStorefrontBookingProducts, st as toStorefrontBookingProductsCollections, Mn as useBookingPeriod, rr as useFormField, Wn as useOptionalStorefront, Gn as useStorefront, Kn as useStorefrontBookingProducts, ut as useStorefrontCart, qn as useStorefrontConfig, Jn as useStorefrontProducts, Yn as useStorefrontWorkspaceLanguage, En as useWhatsAppFloatingButton, ne as validateBookingDeliveryAddress, He as writeBookingSearchParamsToSessionStorage, Ue as writeBookingSearchParamsToStorage };
75
+ import { accessories as Cr } from "./data/accessories.js";
76
+ import wr from "./data/bikes.js";
77
+ import { contractSaleDocumentAcceptanceLevelSchema as Tr, contractSaleDocumentAcceptanceRecordSchema as Er, contractSaleDocumentAcceptanceSchema as Dr, contractSaleDocumentAddressSchema as Or, contractSaleDocumentContactSchema as kr, contractSaleDocumentKindSchema as Ar, contractSaleDocumentLanguageCodeSchema as jr, contractSaleDocumentLanguageSchema as Mr, contractSaleDocumentLineItemSchema as Nr, contractSaleDocumentSchema as Pr, contractSaleDocumentSignatureSchema as Fr } from "./lib/contractSaleDocument.js";
78
+ import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as Ir, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Lr, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Rr, acceptContractSaleDocumentRequestSchema as zr, acceptContractSaleDocumentResponseSchema as Br, contractSaleDocumentAcceptanceInputSchema as Vr, contractSaleDocumentAcceptanceRecordInputSchema as Hr, contractSaleDocumentApiAcceptanceRecordSchema as Ur, contractSaleDocumentApiAcceptanceSchema as Wr, contractSaleDocumentApiSchema as Gr, contractSaleDocumentApiSignatureSchema as Kr, contractSaleDocumentReferenceSchema as qr, contractSaleDocumentReferenceTypeSchema as Jr, contractSaleDocumentSignatureInputSchema as Yr, downloadContractSaleDocumentPdfRequestSchema as Xr, getContractSaleDocumentRequestSchema as Zr, getContractSaleDocumentResponseSchema as Qr } from "./lib/contractSaleDocumentApi.js";
79
+ import $r from "./routes.js";
80
+ import { Select as ei, SelectContent as ti, SelectGroup as ni, SelectIcon as ri, SelectItem as ii, SelectItemIndicator as ai, SelectItemText as oi, SelectLabel as si, SelectScrollDownButton as ci, SelectScrollUpButton as li, SelectSeparator as ui, SelectTrigger as di, SelectValue as fi } from "./ui/select.js";
81
+ export { Ir as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, cr as AboutSection, Te as BOOKING_SEARCH_KEYS, _n as Badge, In as BookingEndDateField, Ln as BookingEndTimeField, Vn as BookingFlowSteps, zn as BookingMobileDateDrawer, jn as BookingPeriodProvider, Bn as BookingPeriodSelector, Pn as BookingStartDateField, Fn as BookingStartTimeField, Rn as BookingTimeSlotsStatus, yn as Button, We as CATALOG_PRODUCT_BASE_RATE_UNSET, ur as Card, dr as CardAction, fr as CardContent, pr as CardDescription, mr as CardFooter, hr as CardHeader, gr as CardTitle, or as ContactSection, br as ContractSaleDocument, J as DEFAULT_BOOKING_DELIVERY_OPTION, z as DEFAULT_CANCELLATION_POLICY, B as DEFAULT_PAYMENT_POLICIES, Lr as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, kn as DelayedPlaceholder, An as DelayedReveal, Un as DeliveryAddressSelector, gn as Footer, Zn as Form, Qn as FormControl, $n as FormDescription, er as FormField, tr as FormItem, nr as FormLabel, rr as FormMessage, Rr as GET_CONTRACT_SALE_DOCUMENT_ROUTE, xn as Header, Hn as Input, Nn as Label, On as Layout, p as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, m as PRODUCT_VARIANT_CODE_MAX_LENGTH, Tn as PlatformFooter, wn as PoweredByLoczerBadge, yr as ProductPriceBadge, _r as ProductWarningNotice, St as ROUTE, xr as RadioGroup, Sr as RadioGroupItem, Jt as STOREFRONT_AVAILABILITY_ROUTE, jt as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, ce as STOREFRONT_HERO_MODES, cn as STOREFRONT_IMAGE_ROUTE, Lt as STOREFRONT_PRODUCTS_ROUTE, dn as STOREFRONT_TIME_SLOTS_ROUTE, ei as Select, ti as SelectContent, ni as SelectGroup, ri as SelectIcon, ii as SelectItem, ai as SelectItemIndicator, oi as SelectItemText, si as SelectLabel, ci as SelectScrollDownButton, li as SelectScrollUpButton, ui as SelectSeparator, di as SelectTrigger, fi as SelectValue, lr as StepSectionTitle, vr as StorefrontCartPanel, ct as StorefrontCartProvider, Ee as TIME_OPTIONS, sr as TestimonialsSection, ar as Textarea, Dn as WhatsAppFloatingButton, zr as acceptContractSaleDocumentRequestSchema, Br as acceptContractSaleDocumentResponseSchema, Cr as accessories, h as accessoryProductSchema, De as applyBookingParamsToSearch, vn as badgeVariants, re as baseAssetSchema, ie as baseAssetStatusSchema, ae as baseBookingItemSchema, oe as baseBookingSchema, se as baseBookingStateSchema, g as bikeProductSchema, wr as bikes, Y as bookingCustomerInputSchema, X as bookingDeliveryOptionSchema, Z as bookingScheduleInputSchema, ht as buildDailyPriceRows, gt as buildPriceTierLabels, Yt as buildStorefrontAvailabilityKey, xt as buildStorefrontCartSummary, ln as buildStorefrontImageUrl, Ge as buildStorefrontProductSlug, Ke as buildVariantStorefrontProductId, Ot as buildWhatsAppHref, bn as buttonVariants, _t as calculateDailyPriceForQuantity, V as cancellationPolicySchema, H as cancellationPolicyTierSchema, Q as cartItemInputSchema, dt as cn, qe as compareCatalogProducts, Je as compareStorefrontAccessoryProducts, Ye as compareStorefrontBikeProducts, Vr as contractSaleDocumentAcceptanceInputSchema, Tr as contractSaleDocumentAcceptanceLevelSchema, Hr as contractSaleDocumentAcceptanceRecordInputSchema, Er as contractSaleDocumentAcceptanceRecordSchema, Dr as contractSaleDocumentAcceptanceSchema, Or as contractSaleDocumentAddressSchema, Ur as contractSaleDocumentApiAcceptanceRecordSchema, Wr as contractSaleDocumentApiAcceptanceSchema, Gr as contractSaleDocumentApiSchema, Kr as contractSaleDocumentApiSignatureSchema, kr as contractSaleDocumentContactSchema, Ar as contractSaleDocumentKindSchema, jr as contractSaleDocumentLanguageCodeSchema, Mr as contractSaleDocumentLanguageSchema, Nr as contractSaleDocumentLineItemSchema, qr as contractSaleDocumentReferenceSchema, Jr as contractSaleDocumentReferenceTypeSchema, Pr as contractSaleDocumentSchema, Yr as contractSaleDocumentSignatureInputSchema, Fr as contractSaleDocumentSignatureSchema, $ as createBookingInputBaseSchema, ee as createBookingInputSchema, Oe as createBookingPeriodConfigFromBookingEngineConfiguration, ke as createBookingPeriodConfigFromShopConfiguration, Ae as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, Xt as doesStorefrontAvailabilityDisplaySoldOut, Xr as downloadContractSaleDocumentPdfRequestSchema, _ as eBikeProductSchema, Xe as findStorefrontProduct, Ze as findStorefrontProductBySlug, ft as formatPriceMinor, Tt as formatStorefrontPhoneDisplay, vt as formatStorefrontPriceMinor, W as fulfillmentModeSchema, pt as getAvailabilityVariant, je as getBookingDurationLabel, Me as getBookingDurationMinutes, Ne as getBookingParamsFromSearch, Pe as getBookingSessionStorageKey, Qe as getCatalogProductBaseRateMinor, $e as getCatalogProductPaginationSort, et as getCatalogProductSortFieldForPriceUnit, Zr as getContractSaleDocumentRequestSchema, Qr as getContractSaleDocumentResponseSchema, Fe as getDefaultBookingParams, Ie as getDefaultBookingParamsForStorefrontConfiguration, yt as getLocalizedEntry, t as getLocalizedStringValue, bt as getLocalizedValue, mt as getMinDayPriceMinor, Zt as getStorefrontAvailabilityIssue, Qt as getStorefrontAvailabilityStatus, tt as getStorefrontBaseDailyRateMinor, nt as getStorefrontCheckoutProductId, rt as getStorefrontRepresentedVariantId, v as isProductVariantCodeIdentifierKind, $t as isStorefrontAvailabilityInsufficient, A as isoDateSchema, Wn as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, U as paymentPoliciesSchema, Le as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, y as productInsuranceSchema, b as productKindSchema, x as productSchema, S as productStorefrontDisplayModeSchema, C as productVariantAttributeSchema, w as productVariantCodeSchema, T as productVariantIdentifierSchema, E as productVariantSchema, en as publicAvailabilityDisplayModeSchema, G as publicBookingEngineConfigurationSchema, K as publicCheckoutConfigurationSchema, q as publicCheckoutDynamicOptionsSchema, Re as readBookingSearchParamsFromSessionStorage, ze as readBookingSearchParamsFromStorage, Ct as requestSchema, te as resolveBookingDeliveryOption, Be as resolveBookingSearchParams, Ve as resolveBookingSearchParamsFromSessionStorage, lt as resolveStorefrontCartItemProduct, Et as resolveStorefrontMapsHref, Dt as resolveStorefrontPhoneContact, kt as resolveStorefrontWhatsAppContact, At as resolveStorefrontWhatsAppHref, wt as responseSchema, D as richTextJsonDocSchema, O as richTextSchema, k as richTextVersionSchema, j as shopConfigurationSchema, M as shopExtraTimeSlotRuleSchema, N as shopOpeningDayIndexSchema, P as shopOpeningDaySchema, F as shopOpeningHoursOverrideSchema, I as shopOpeningHoursPeriodSchema, L as shopOpeningSlotSchema, rn as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, an as storefrontAvailabilityProductSchema, tn as storefrontAvailabilityRequestSchema, nn as storefrontAvailabilityResponseSchema, on as storefrontAvailabilityScheduleSchema, le as storefrontCheckoutModeSchema, Pt as storefrontCheckoutSubmitDeliveryRefinement, Nt as storefrontCheckoutSubmitItemSchema, Mt as storefrontCheckoutSubmitRequestBaseSchema, Ft as storefrontCheckoutSubmitRequestSchema, It as storefrontCheckoutSubmitResponseSchema, ue as storefrontConfigurationSchema, de as storefrontContentSchema, Sn as storefrontEn, fe as storefrontFaqItemSchema, pe as storefrontFaqSchema, Cn as storefrontFr, me as storefrontFulfillmentModeSchema, he as storefrontHeroModeSchema, un as storefrontImageRequestSchema, ge as storefrontLocalizedRichTextSchema, _e as storefrontModalMessageSchema, ve as storefrontModulesSchema, Rt as storefrontProductsRequestSchema, zt as storefrontProductsResponseSchema, Bt as storefrontPublicAccessoryProductSchema, sn as storefrontPublicAvailabilityRecordSchema, Vt as storefrontPublicBikeAvailabilityStatusSchema, Ht as storefrontPublicBikeProductSchema, Ut as storefrontPublicProductDisplayModeSchema, Wt as storefrontPublicProductPriceSchema, Gt as storefrontPublicProductVariantAttributeSchema, Kt as storefrontPublicProductVariantIdentifierSchema, qt as storefrontPublicProductVariantSchema, ye as storefrontReviewsModuleSchema, be as storefrontRichTextSchema, $r as storefrontRoutes, xe as storefrontSettingsSchema, Se as storefrontShopSchema, Ce as storefrontStatusSchema, hn as storefrontTimeSlotJourneySchema, mn as storefrontTimeSlotSchema, fn as storefrontTimeSlotsRequestSchema, pn as storefrontTimeSlotsResponseSchema, we as storefrontWorkspaceSchema, R as timeOfDaySchema, it as toStorefrontAccessoryProducts, at as toStorefrontBikeProducts, ot as toStorefrontBookingProducts, st as toStorefrontBookingProductsCollections, Mn as useBookingPeriod, ir as useFormField, Gn as useOptionalStorefront, Kn as useStorefront, qn as useStorefrontBookingProducts, ut as useStorefrontCart, Jn as useStorefrontConfig, Yn as useStorefrontProducts, Xn as useStorefrontWorkspaceLanguage, En as useWhatsAppFloatingButton, ne as validateBookingDeliveryAddress, He as writeBookingSearchParamsToSessionStorage, Ue as writeBookingSearchParamsToStorage };
@@ -1 +1 @@
1
- {"version":3,"file":"fetchStorefrontTimeSlots.d.ts","sourceRoot":"","sources":["../../src/lib/fetchStorefrontTimeSlots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAO7E,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAA;AAI3G,eAAO,MAAM,gCAAgC,GAAI,YAAY,MAAM,KAAG,0BAA0B,GAAG,SAsBlG,CAAA"}
1
+ {"version":3,"file":"fetchStorefrontTimeSlots.d.ts","sourceRoot":"","sources":["../../src/lib/fetchStorefrontTimeSlots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAO7E,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAA;AAI3G,eAAO,MAAM,gCAAgC,GAAI,YAAY,MAAM,KAAG,0BAA0B,GAAG,SAyBlG,CAAA"}
@@ -12,7 +12,8 @@ var r = /* @__PURE__ */ new Map(), i = (i) => {
12
12
  date: r,
13
13
  journey: i
14
14
  }), s = t.parse(o);
15
- return s.success ? s.timeSlots ?? null : null;
15
+ if (!s.success) throw Error(s.message ?? "Failed to load storefront time slots");
16
+ return s.timeSlots ?? [];
16
17
  };
17
18
  return r.set(a, s), s;
18
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BookingPage.d.ts","sourceRoot":"","sources":["../../src/pages/BookingPage.tsx"],"names":[],"mappings":"AAyQA,MAAM,CAAC,OAAO,UAAU,WAAW,4CAqkBlC"}
1
+ {"version":3,"file":"BookingPage.d.ts","sourceRoot":"","sources":["../../src/pages/BookingPage.tsx"],"names":[],"mappings":"AA4QA,MAAM,CAAC,OAAO,UAAU,WAAW,4CA6lBlC"}