@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.
- package/dist/chunks/booking-engine/dist/models/{Product.shared-CTuk4fiR.js → Product.shared-IYOeC3N7.js} +12 -10
- package/dist/chunks/booking-engine/dist/schemas/{base-asset-B_Dm8_Vk.js → base-asset-zsUj5_3O.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{base-booking-DW8AEPKo.js → base-booking-TzCge_mR.js} +2 -2
- package/dist/chunks/booking-engine/dist/schemas/{base-product-1H8l2aUv.js → base-product-DvFFzAcg.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{booking-engine-configuration-D02MRF9U.js → booking-engine-configuration-LnrhShqm.js} +4 -1
- package/dist/chunks/booking-engine/dist/schemas/{cart-inputs-j1yWfJxO.js → cart-inputs-B0HpcFe5.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{public-booking-engine-configuration-BnJ_H-p1.js → public-booking-engine-configuration-CEM9mexX.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas-BNUzqsci.js +13 -0
- package/dist/chunks/ui/dist/Map/{MapContent-QPkuTBvK.js → MapContent-PK-ptOx6.js} +126 -94
- package/dist/chunks/ui/dist/Map/mapboxError-oRn0l3EE.js +25 -0
- package/dist/chunks/ui/dist/{Map-BXmRf5Ep.js → Map-BwXj49kV.js} +1 -1
- package/dist/components/BookingBikeVariantDialog/index.d.ts +2 -1
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +39 -38
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +32 -30
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +127 -122
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +32 -30
- package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts +7 -0
- package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js +29 -0
- package/dist/components/BookingPeriodSelector/index.d.ts +2 -1
- package/dist/components/BookingPeriodSelector/index.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/index.js +15 -14
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +11 -0
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +280 -216
- package/dist/components/ContactSection/index.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +120 -116
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +35 -35
- package/dist/components/Map/index.js +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +51 -48
- package/dist/components/StorefrontInsuranceNotice/index.d.ts +9 -0
- package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -0
- package/dist/components/StorefrontInsuranceNotice/index.js +191 -0
- package/dist/i18n/en.d.ts +24 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +26 -2
- package/dist/i18n/fr.d.ts +24 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +26 -2
- package/dist/index.d.ts +91 -0
- package/dist/index.js +69 -68
- package/dist/lib/booking.js +2 -2
- package/dist/lib/checkoutSubmit.js +3 -3
- package/dist/lib/fetchStorefrontTimeSlots.d.ts.map +1 -1
- package/dist/lib/fetchStorefrontTimeSlots.js +2 -1
- package/dist/lib/storefrontProducts.d.ts +16 -0
- package/dist/lib/storefrontProducts.d.ts.map +1 -1
- package/dist/lib/storefrontProducts.js +27 -22
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +109 -95
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +229 -231
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +339 -314
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +60 -52
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/booking-engine/dist/schemas-DftrSnTE.js +0 -13
package/dist/index.d.ts
CHANGED
|
@@ -193,6 +193,7 @@ export declare const accessoryProductSchema: z.ZodObject<{
|
|
|
193
193
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
194
194
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
195
195
|
pricePerDayMinor: z.ZodDefault<z.ZodNumber>;
|
|
196
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
196
197
|
}, z.core.$strip>>;
|
|
197
198
|
bufferStartMinutes: z.ZodOptional<z.ZodNumber>;
|
|
198
199
|
bufferEndMinutes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -415,6 +416,7 @@ export declare const bikeProductSchema: z.ZodObject<{
|
|
|
415
416
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
416
417
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
417
418
|
pricePerDayMinor: z.ZodDefault<z.ZodNumber>;
|
|
419
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
418
420
|
}, z.core.$strip>>;
|
|
419
421
|
bufferStartMinutes: z.ZodOptional<z.ZodNumber>;
|
|
420
422
|
bufferEndMinutes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -626,6 +628,7 @@ export declare interface BookingPeriodControllerOptions {
|
|
|
626
628
|
buttonClassName?: string;
|
|
627
629
|
bookingPeriodConfig?: BookingPeriodConfig;
|
|
628
630
|
fetchTimeSlots?: BookingPeriodTimeSlotsFetcher;
|
|
631
|
+
onTimeSlotsAvailabilityChange?: (isAvailable: boolean) => void;
|
|
629
632
|
selectionFlow?: BookingPeriodSelectionFlow;
|
|
630
633
|
withMobileDateDrawer?: boolean;
|
|
631
634
|
currencyCode?: string;
|
|
@@ -672,6 +675,11 @@ export declare interface BookingPeriodControllerValue {
|
|
|
672
675
|
resetHoveredEndDate: () => void;
|
|
673
676
|
startTimeSlots: TimeSlot[];
|
|
674
677
|
availableEndTimeSlots: TimeSlot[];
|
|
678
|
+
startTimeSlotsStatus: BookingPeriodTimeSlotsStatus;
|
|
679
|
+
endTimeSlotsStatus: BookingPeriodTimeSlotsStatus;
|
|
680
|
+
retryStartTimeSlots: () => void;
|
|
681
|
+
retryEndTimeSlots: () => void;
|
|
682
|
+
canCommitTimeSlots: boolean;
|
|
675
683
|
isStartToday: boolean;
|
|
676
684
|
isEndToday: boolean;
|
|
677
685
|
minSelectableDate: Date;
|
|
@@ -724,6 +732,10 @@ export declare type BookingPeriodLabels = {
|
|
|
724
732
|
rentalPeriod?: string;
|
|
725
733
|
dateDrawerNext?: string;
|
|
726
734
|
closeDrawer?: string;
|
|
735
|
+
timeSlotsLoading?: string;
|
|
736
|
+
timeSlotsUnavailable?: string;
|
|
737
|
+
timeSlotsLoadError?: string;
|
|
738
|
+
retryTimeSlots?: string;
|
|
727
739
|
};
|
|
728
740
|
|
|
729
741
|
export declare const BookingPeriodProvider: ({ children, ...options }: BookingPeriodProviderProps) => JSX.Element;
|
|
@@ -742,6 +754,8 @@ declare type BookingPeriodSelectorProps = BookingPeriodControllerOptions & {
|
|
|
742
754
|
|
|
743
755
|
export declare type BookingPeriodTimeSlotsFetcher = (date: string, journey: JourneyType) => Promise<TimeSlot[] | null>;
|
|
744
756
|
|
|
757
|
+
export declare type BookingPeriodTimeSlotsStatus = "local" | "loading" | "ready" | "error";
|
|
758
|
+
|
|
745
759
|
export declare type BookingPeriodTranslator = (key: string, options?: Record<string, unknown>) => string;
|
|
746
760
|
|
|
747
761
|
export declare type BookingScheduleInput = z.infer<typeof bookingScheduleInputSchema>;
|
|
@@ -759,6 +773,13 @@ export declare const BookingStartDateField: () => JSX.Element;
|
|
|
759
773
|
|
|
760
774
|
export declare const BookingStartTimeField: () => JSX.Element;
|
|
761
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
|
+
|
|
762
783
|
declare type BookingTimingConfig = {
|
|
763
784
|
slotIntervalMinutes: number;
|
|
764
785
|
autoFillCutoffMinutes: number;
|
|
@@ -1487,6 +1508,7 @@ export declare const eBikeProductSchema: z.ZodObject<{
|
|
|
1487
1508
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
1488
1509
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1489
1510
|
pricePerDayMinor: z.ZodDefault<z.ZodNumber>;
|
|
1511
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
1490
1512
|
}, z.core.$strip>>;
|
|
1491
1513
|
bufferStartMinutes: z.ZodOptional<z.ZodNumber>;
|
|
1492
1514
|
bufferEndMinutes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2117,6 +2139,14 @@ export declare interface ProductAccessory {
|
|
|
2117
2139
|
productVariants?: ProductVariant[];
|
|
2118
2140
|
}
|
|
2119
2141
|
|
|
2142
|
+
export declare type ProductInsurance = z.infer<typeof productInsuranceSchema>;
|
|
2143
|
+
|
|
2144
|
+
export declare const productInsuranceSchema: z.ZodObject<{
|
|
2145
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2146
|
+
pricePerDayMinor: z.ZodDefault<z.ZodNumber>;
|
|
2147
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
2148
|
+
}, z.core.$strip>;
|
|
2149
|
+
|
|
2120
2150
|
export declare type ProductKind = z.infer<typeof productKindSchema>;
|
|
2121
2151
|
|
|
2122
2152
|
export declare const productKindSchema: z.ZodEnum<{
|
|
@@ -2166,6 +2196,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2166
2196
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
2167
2197
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2168
2198
|
pricePerDayMinor: z.ZodDefault<z.ZodNumber>;
|
|
2199
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
2169
2200
|
}, z.core.$strip>>;
|
|
2170
2201
|
bufferStartMinutes: z.ZodOptional<z.ZodNumber>;
|
|
2171
2202
|
bufferEndMinutes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2227,6 +2258,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2227
2258
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
2228
2259
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2229
2260
|
pricePerDayMinor: z.ZodDefault<z.ZodNumber>;
|
|
2261
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
2230
2262
|
}, z.core.$strip>>;
|
|
2231
2263
|
bufferStartMinutes: z.ZodOptional<z.ZodNumber>;
|
|
2232
2264
|
bufferEndMinutes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2277,6 +2309,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2277
2309
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
2278
2310
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2279
2311
|
pricePerDayMinor: z.ZodDefault<z.ZodNumber>;
|
|
2312
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
2280
2313
|
}, z.core.$strip>>;
|
|
2281
2314
|
bufferStartMinutes: z.ZodOptional<z.ZodNumber>;
|
|
2282
2315
|
bufferEndMinutes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3496,6 +3529,25 @@ export declare const storefrontEn: {
|
|
|
3496
3529
|
feature_delivery_description: string;
|
|
3497
3530
|
feature_guarantee_insurance_title: string;
|
|
3498
3531
|
feature_guarantee_insurance_description: string;
|
|
3532
|
+
insurance_info_aria_label: string;
|
|
3533
|
+
insurance_modal_title: string;
|
|
3534
|
+
insurance_modal_description: string;
|
|
3535
|
+
insurance_modal_pricing_title: string;
|
|
3536
|
+
insurance_modal_pricing_description: string;
|
|
3537
|
+
insurance_modal_muscular_bike: string;
|
|
3538
|
+
insurance_modal_electric_bike: string;
|
|
3539
|
+
insurance_modal_price_per_day: string;
|
|
3540
|
+
insurance_modal_price_range_per_day: string;
|
|
3541
|
+
insurance_modal_price_unavailable: string;
|
|
3542
|
+
insurance_modal_coverage_title: string;
|
|
3543
|
+
insurance_modal_coverage_accidental_damage: string;
|
|
3544
|
+
insurance_modal_coverage_assault_or_break_in: string;
|
|
3545
|
+
insurance_modal_coverage_secured_bike_theft: string;
|
|
3546
|
+
insurance_modal_claim_title: string;
|
|
3547
|
+
insurance_modal_claim_description: string;
|
|
3548
|
+
insurance_modal_exclusions_title: string;
|
|
3549
|
+
insurance_modal_exclusions_description: string;
|
|
3550
|
+
insurance_modal_terms_note: string;
|
|
3499
3551
|
cancellation_policy_teaser: string;
|
|
3500
3552
|
cancellation_policy_teaser_description: string;
|
|
3501
3553
|
cancellation_policy_info_aria_label: string;
|
|
@@ -3522,6 +3574,11 @@ export declare const storefrontEn: {
|
|
|
3522
3574
|
booking_start_time: string;
|
|
3523
3575
|
booking_end_date: string;
|
|
3524
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;
|
|
3525
3582
|
booking_selected_days_tooltip_one: string;
|
|
3526
3583
|
booking_selected_days_tooltip_other: string;
|
|
3527
3584
|
booking_minimum_duration: string;
|
|
@@ -3936,6 +3993,25 @@ export declare const storefrontFr: {
|
|
|
3936
3993
|
feature_delivery_description: string;
|
|
3937
3994
|
feature_guarantee_insurance_title: string;
|
|
3938
3995
|
feature_guarantee_insurance_description: string;
|
|
3996
|
+
insurance_info_aria_label: string;
|
|
3997
|
+
insurance_modal_title: string;
|
|
3998
|
+
insurance_modal_description: string;
|
|
3999
|
+
insurance_modal_pricing_title: string;
|
|
4000
|
+
insurance_modal_pricing_description: string;
|
|
4001
|
+
insurance_modal_muscular_bike: string;
|
|
4002
|
+
insurance_modal_electric_bike: string;
|
|
4003
|
+
insurance_modal_price_per_day: string;
|
|
4004
|
+
insurance_modal_price_range_per_day: string;
|
|
4005
|
+
insurance_modal_price_unavailable: string;
|
|
4006
|
+
insurance_modal_coverage_title: string;
|
|
4007
|
+
insurance_modal_coverage_accidental_damage: string;
|
|
4008
|
+
insurance_modal_coverage_assault_or_break_in: string;
|
|
4009
|
+
insurance_modal_coverage_secured_bike_theft: string;
|
|
4010
|
+
insurance_modal_claim_title: string;
|
|
4011
|
+
insurance_modal_claim_description: string;
|
|
4012
|
+
insurance_modal_exclusions_title: string;
|
|
4013
|
+
insurance_modal_exclusions_description: string;
|
|
4014
|
+
insurance_modal_terms_note: string;
|
|
3939
4015
|
cancellation_policy_teaser: string;
|
|
3940
4016
|
cancellation_policy_teaser_description: string;
|
|
3941
4017
|
cancellation_policy_info_aria_label: string;
|
|
@@ -3962,6 +4038,11 @@ export declare const storefrontFr: {
|
|
|
3962
4038
|
booking_start_time: string;
|
|
3963
4039
|
booking_end_date: string;
|
|
3964
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;
|
|
3965
4046
|
booking_selected_days_tooltip_one: string;
|
|
3966
4047
|
booking_selected_days_tooltip_other: string;
|
|
3967
4048
|
booking_minimum_duration: string;
|
|
@@ -4428,6 +4509,11 @@ export declare const storefrontProductsResponseSchema: z.ZodDiscriminatedUnion<[
|
|
|
4428
4509
|
quantity: z.ZodNumber;
|
|
4429
4510
|
currency: z.ZodOptional<z.ZodString>;
|
|
4430
4511
|
}, z.core.$strip>>>;
|
|
4512
|
+
insurance: z.ZodOptional<z.ZodObject<{
|
|
4513
|
+
enabled: z.ZodBoolean;
|
|
4514
|
+
pricePerDayMinor: z.ZodNumber;
|
|
4515
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
4516
|
+
}, z.core.$strip>>;
|
|
4431
4517
|
features: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4432
4518
|
value: z.ZodString;
|
|
4433
4519
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -4676,6 +4762,11 @@ export declare const storefrontPublicBikeProductSchema: z.ZodObject<{
|
|
|
4676
4762
|
quantity: z.ZodNumber;
|
|
4677
4763
|
currency: z.ZodOptional<z.ZodString>;
|
|
4678
4764
|
}, z.core.$strip>>>;
|
|
4765
|
+
insurance: z.ZodOptional<z.ZodObject<{
|
|
4766
|
+
enabled: z.ZodBoolean;
|
|
4767
|
+
pricePerDayMinor: z.ZodNumber;
|
|
4768
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
4769
|
+
}, z.core.$strip>>;
|
|
4679
4770
|
features: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4680
4771
|
value: z.ZodString;
|
|
4681
4772
|
updatedAt: z.ZodCoercedDate<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -2,79 +2,80 @@
|
|
|
2
2
|
import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localizedStringArraySchema as n, localizedStringEntrySchema as r, localizedStringSchema as i } from "./chunks/booking-engine/dist/models/LocalizedString-D_TRgAdr.js";
|
|
3
3
|
import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./chunks/booking-engine/dist/schemas/money-CVoCY4of.js";
|
|
4
4
|
import { priceSchema as d, priceUnitSchema as f } from "./chunks/booking-engine/dist/models/Price-DCAgqkKh.js";
|
|
5
|
-
import { PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as p, PRODUCT_VARIANT_CODE_MAX_LENGTH as m, accessoryProductSchema as h, bikeProductSchema as g, eBikeProductSchema as _, isProductVariantCodeIdentifierKind as v,
|
|
6
|
-
import { richTextJsonDocSchema as
|
|
7
|
-
import { isoDateSchema as
|
|
8
|
-
import { DEFAULT_CANCELLATION_POLICY as
|
|
9
|
-
import { fulfillmentModeSchema as
|
|
10
|
-
import { DEFAULT_BOOKING_DELIVERY_OPTION as
|
|
11
|
-
import { baseAssetSchema as
|
|
12
|
-
import { baseBookingItemSchema as
|
|
13
|
-
import "./chunks/booking-engine/dist/schemas-
|
|
14
|
-
import { STOREFRONT_HERO_MODES as
|
|
15
|
-
import { BOOKING_SEARCH_KEYS as
|
|
16
|
-
import { CATALOG_PRODUCT_BASE_RATE_UNSET as
|
|
17
|
-
import { StorefrontCartProvider as
|
|
18
|
-
import { cn as
|
|
19
|
-
import { buildDailyPriceRows as
|
|
20
|
-
import { getLocalizedEntry as
|
|
21
|
-
import { buildStorefrontCartSummary as
|
|
22
|
-
import { ROUTE as
|
|
23
|
-
import { formatStorefrontPhoneDisplay as
|
|
24
|
-
import { buildWhatsAppHref as
|
|
25
|
-
import { ROUTE as
|
|
26
|
-
import { ROUTE as
|
|
27
|
-
import { ROUTE as
|
|
28
|
-
import { ROUTE as
|
|
29
|
-
import { ROUTE as
|
|
30
|
-
import { Footer as
|
|
31
|
-
import { Badge as
|
|
32
|
-
import { Button as
|
|
33
|
-
import { Header as
|
|
34
|
-
import { storefront as
|
|
35
|
-
import { storefront as
|
|
36
|
-
import { PoweredByLoczerBadge as
|
|
37
|
-
import { PlatformFooter as
|
|
38
|
-
import { useWhatsAppFloatingButton as
|
|
39
|
-
import { WhatsAppFloatingButton as
|
|
5
|
+
import { PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as p, PRODUCT_VARIANT_CODE_MAX_LENGTH as m, accessoryProductSchema as h, bikeProductSchema as g, eBikeProductSchema as _, isProductVariantCodeIdentifierKind as v, productInsuranceSchema as y, productKindSchema as b, productSchema as x, productStorefrontDisplayModeSchema as S, productVariantAttributeSchema as C, productVariantCodeSchema as w, productVariantIdentifierSchema as T, productVariantSchema as E } from "./chunks/booking-engine/dist/models/Product.shared-IYOeC3N7.js";
|
|
6
|
+
import { richTextJsonDocSchema as D, richTextSchema as O, richTextVersionSchema as k } from "./chunks/booking-engine/dist/schemas/rich-text-DTRh7U3z.js";
|
|
7
|
+
import { isoDateSchema as A, shopConfigurationSchema as j, shopExtraTimeSlotRuleSchema as M, shopOpeningDayIndexSchema as N, shopOpeningDaySchema as P, shopOpeningHoursOverrideSchema as F, shopOpeningHoursPeriodSchema as I, shopOpeningSlotSchema as L, timeOfDaySchema as R } from "./chunks/booking-engine/dist/schemas/shop-opening-hours-BlLD1gfz.js";
|
|
8
|
+
import { DEFAULT_CANCELLATION_POLICY as z, DEFAULT_PAYMENT_POLICIES as B, cancellationPolicySchema as V, cancellationPolicyTierSchema as H, paymentPoliciesSchema as U } from "./chunks/booking-engine/dist/schemas/booking-engine-configuration-LnrhShqm.js";
|
|
9
|
+
import { fulfillmentModeSchema as W, publicBookingEngineConfigurationSchema as G, publicCheckoutConfigurationSchema as K, publicCheckoutDynamicOptionsSchema as q } from "./chunks/booking-engine/dist/schemas/public-booking-engine-configuration-CEM9mexX.js";
|
|
10
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as J, bookingCustomerInputSchema as Y, bookingDeliveryOptionSchema as X, bookingScheduleInputSchema as Z, cartItemInputSchema as Q, createBookingInputBaseSchema as $, createBookingInputSchema as ee, resolveBookingDeliveryOption as te, validateBookingDeliveryAddress as ne } from "./chunks/booking-engine/dist/schemas/cart-inputs-B0HpcFe5.js";
|
|
11
|
+
import { baseAssetSchema as re, baseAssetStatusSchema as ie } from "./chunks/booking-engine/dist/schemas/base-asset-zsUj5_3O.js";
|
|
12
|
+
import { baseBookingItemSchema as ae, baseBookingSchema as oe, baseBookingStateSchema as se } from "./chunks/booking-engine/dist/schemas/base-booking-TzCge_mR.js";
|
|
13
|
+
import "./chunks/booking-engine/dist/schemas-BNUzqsci.js";
|
|
14
|
+
import { STOREFRONT_HERO_MODES as ce, storefrontCheckoutModeSchema as le, storefrontConfigurationSchema as ue, storefrontContentSchema as de, storefrontFaqItemSchema as fe, storefrontFaqSchema as pe, storefrontFulfillmentModeSchema as me, storefrontHeroModeSchema as he, storefrontLocalizedRichTextSchema as ge, storefrontModalMessageSchema as _e, storefrontModulesSchema as ve, storefrontReviewsModuleSchema as ye, storefrontRichTextSchema as be, storefrontSettingsSchema as xe, storefrontShopSchema as Se, storefrontStatusSchema as Ce, storefrontWorkspaceSchema as we } from "./storefrontSchemas.js";
|
|
15
|
+
import { BOOKING_SEARCH_KEYS as Te, TIME_OPTIONS as Ee, applyBookingParamsToSearch as De, createBookingPeriodConfigFromBookingEngineConfiguration as Oe, createBookingPeriodConfigFromShopConfiguration as ke, createBookingPeriodConfigFromStorefrontConfiguration as Ae, getBookingDurationLabel as je, getBookingDurationMinutes as Me, getBookingParamsFromSearch as Ne, getBookingSessionStorageKey as Pe, getDefaultBookingParams as Fe, getDefaultBookingParamsForStorefrontConfiguration as Ie, pickBookingSearchParams as Le, readBookingSearchParamsFromSessionStorage as Re, readBookingSearchParamsFromStorage as ze, resolveBookingSearchParams as Be, resolveBookingSearchParamsFromSessionStorage as Ve, writeBookingSearchParamsToSessionStorage as He, writeBookingSearchParamsToStorage as Ue } from "./lib/booking.js";
|
|
16
|
+
import { CATALOG_PRODUCT_BASE_RATE_UNSET as We, buildStorefrontProductSlug as Ge, buildVariantStorefrontProductId as Ke, compareCatalogProducts as qe, compareStorefrontAccessoryProducts as Je, compareStorefrontBikeProducts as Ye, findStorefrontProduct as Xe, findStorefrontProductBySlug as Ze, getCatalogProductBaseRateMinor as Qe, getCatalogProductPaginationSort as $e, getCatalogProductSortFieldForPriceUnit as et, getStorefrontBaseDailyRateMinor as tt, getStorefrontCheckoutProductId as nt, getStorefrontRepresentedVariantId as rt, toStorefrontAccessoryProducts as it, toStorefrontBikeProducts as at, toStorefrontBookingProducts as ot, toStorefrontBookingProductsCollections as st } from "./lib/products.js";
|
|
17
|
+
import { StorefrontCartProvider as ct, resolveStorefrontCartItemProduct as lt, useStorefrontCart as ut } from "./lib/cart.js";
|
|
18
|
+
import { cn as dt, formatPriceMinor as ft, getAvailabilityVariant as pt, getMinDayPriceMinor as mt } from "./lib/utils.js";
|
|
19
|
+
import { buildDailyPriceRows as ht, buildPriceTierLabels as gt, calculateDailyPriceForQuantity as _t, formatStorefrontPriceMinor as vt } from "./lib/pricing.js";
|
|
20
|
+
import { getLocalizedEntry as yt, getLocalizedValue as bt } from "./localization.js";
|
|
21
|
+
import { buildStorefrontCartSummary as xt } from "./lib/cartSummary.js";
|
|
22
|
+
import { ROUTE as St, requestSchema as Ct, responseSchema as wt } from "./lib/contactForm.js";
|
|
23
|
+
import { formatStorefrontPhoneDisplay as Tt, resolveStorefrontMapsHref as Et, resolveStorefrontPhoneContact as Dt } from "./lib/storefrontContact.js";
|
|
24
|
+
import { buildWhatsAppHref as Ot, resolveStorefrontWhatsAppContact as kt, resolveStorefrontWhatsAppHref as At } from "./lib/whatsapp.js";
|
|
25
|
+
import { ROUTE as jt, requestBaseSchema as Mt, requestCheckoutItemSchema as Nt, requestDeliveryRefinement as Pt, requestSchema as Ft, responseSchema as It } from "./lib/checkoutSubmit.js";
|
|
26
|
+
import { ROUTE as Lt, requestSchema as Rt, responseSchema as zt, storefrontPublicAccessoryProductSchema as Bt, storefrontPublicBikeAvailabilityStatusSchema as Vt, storefrontPublicBikeProductSchema as Ht, storefrontPublicProductDisplayModeSchema as Ut, storefrontPublicProductPriceSchema as Wt, storefrontPublicProductVariantAttributeSchema as Gt, storefrontPublicProductVariantIdentifierSchema as Kt, storefrontPublicProductVariantSchema as qt } from "./lib/storefrontProducts.js";
|
|
27
|
+
import { ROUTE as Jt, buildStorefrontAvailabilityKey as Yt, doesStorefrontAvailabilityDisplaySoldOut as Xt, getStorefrontAvailabilityIssue as Zt, getStorefrontAvailabilityStatus as Qt, isStorefrontAvailabilityInsufficient as $t, publicAvailabilityDisplayModeSchema as en, requestSchema as tn, responseSchema as nn, shouldBlockStorefrontUnavailableItem as rn, storefrontAvailabilityProductSchema as an, storefrontAvailabilityScheduleSchema as on, storefrontPublicAvailabilityRecordSchema as sn } from "./lib/storefrontAvailability.js";
|
|
28
|
+
import { ROUTE as cn, buildStorefrontImageUrl as ln, requestSchema as un } from "./lib/storefrontImage.js";
|
|
29
|
+
import { ROUTE as dn, requestSchema as fn, responseSchema as pn, storefrontTimeSlotSchema as mn, timeSlotJourneySchema as hn } from "./lib/storefrontTimeSlots.js";
|
|
30
|
+
import { Footer as gn } from "./components/Footer/index.js";
|
|
31
|
+
import { Badge as _n, badgeVariants as vn } from "./ui/badge.js";
|
|
32
|
+
import { Button as yn, buttonVariants as bn } from "./ui/button.js";
|
|
33
|
+
import { Header as xn } from "./components/Header/index.js";
|
|
34
|
+
import { storefront as Sn } from "./i18n/en.js";
|
|
35
|
+
import { storefront as Cn } from "./i18n/fr.js";
|
|
36
|
+
import { PoweredByLoczerBadge as wn } from "./components/PoweredByLoczerBadge/index.js";
|
|
37
|
+
import { PlatformFooter as Tn } from "./components/PlatformFooter/index.js";
|
|
38
|
+
import { useWhatsAppFloatingButton as En } from "./components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js";
|
|
39
|
+
import { WhatsAppFloatingButton as Dn } from "./components/WhatsAppFloatingButton/WhatsAppFloatingButton.js";
|
|
40
40
|
import "./components/WhatsAppFloatingButton/index.js";
|
|
41
|
-
import { Layout as
|
|
42
|
-
import { DelayedPlaceholder as
|
|
43
|
-
import { BookingPeriodProvider as
|
|
44
|
-
import { Label as
|
|
45
|
-
import { BookingStartDateField as
|
|
46
|
-
import { BookingStartTimeField as
|
|
47
|
-
import { BookingEndDateField as
|
|
48
|
-
import { BookingEndTimeField as
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
41
|
+
import { Layout as On } from "./components/Layout/index.js";
|
|
42
|
+
import { DelayedPlaceholder as kn, DelayedReveal as An } from "./components/DelayedReveal/index.js";
|
|
43
|
+
import { BookingPeriodProvider as jn, useBookingPeriod as Mn } from "./components/BookingPeriodSelector/BookingPeriodContext.js";
|
|
44
|
+
import { Label as Nn } from "./ui/label.js";
|
|
45
|
+
import { BookingStartDateField as Pn } from "./components/BookingPeriodSelector/components/BookingStartDateField.js";
|
|
46
|
+
import { BookingStartTimeField as Fn } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
|
|
47
|
+
import { BookingEndDateField as In } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
|
|
48
|
+
import { BookingEndTimeField as Ln } from "./components/BookingPeriodSelector/components/BookingEndTimeField.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
|
|
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
|
|
75
|
-
import
|
|
76
|
-
import { contractSaleDocumentAcceptanceLevelSchema as
|
|
77
|
-
import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as
|
|
78
|
-
import
|
|
79
|
-
import { Select as
|
|
80
|
-
export {
|
|
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 };
|
package/dist/lib/booking.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/booking-engine/dist/schemas/cart-inputs-
|
|
2
|
-
import "../chunks/booking-engine/dist/schemas-
|
|
1
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/booking-engine/dist/schemas/cart-inputs-B0HpcFe5.js";
|
|
2
|
+
import "../chunks/booking-engine/dist/schemas-BNUzqsci.js";
|
|
3
3
|
import { getDefaultBookingPeriod as t, parseTimeToMinutes as n } from "./booking-period.js";
|
|
4
4
|
import { differenceInMinutes as r, format as i } from "date-fns";
|
|
5
5
|
//#region src/lib/booking.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { productKindSchema as e } from "../chunks/booking-engine/dist/models/Product.shared-
|
|
2
|
-
import { DEFAULT_BOOKING_DELIVERY_OPTION as t, bookingScheduleInputSchema as n } from "../chunks/booking-engine/dist/schemas/cart-inputs-
|
|
3
|
-
import "../chunks/booking-engine/dist/schemas-
|
|
1
|
+
import { productKindSchema as e } from "../chunks/booking-engine/dist/models/Product.shared-IYOeC3N7.js";
|
|
2
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as t, bookingScheduleInputSchema as n } from "../chunks/booking-engine/dist/schemas/cart-inputs-B0HpcFe5.js";
|
|
3
|
+
import "../chunks/booking-engine/dist/schemas-BNUzqsci.js";
|
|
4
4
|
import { storefrontFulfillmentModeSchema as r } from "../storefrontSchemas.js";
|
|
5
5
|
import { MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE as i, checkoutPaymentErrorCodeSchema as a } from "./checkoutPaymentDecision.js";
|
|
6
6
|
import { z as o } from "zod";
|
|
@@ -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,
|
|
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
|
-
|
|
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
|
};
|
|
@@ -12,6 +12,12 @@ export declare const storefrontPublicProductPriceSchema: z.ZodObject<{
|
|
|
12
12
|
currency: z.ZodOptional<z.ZodString>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
export type StorefrontPublicProductPrice = z.infer<typeof storefrontPublicProductPriceSchema>;
|
|
15
|
+
export declare const storefrontPublicProductInsuranceSchema: z.ZodObject<{
|
|
16
|
+
enabled: z.ZodBoolean;
|
|
17
|
+
pricePerDayMinor: z.ZodNumber;
|
|
18
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type StorefrontPublicProductInsurance = z.infer<typeof storefrontPublicProductInsuranceSchema>;
|
|
15
21
|
export declare const storefrontPublicProductVariantIdentifierSchema: z.ZodObject<{
|
|
16
22
|
kind: z.ZodString;
|
|
17
23
|
value: z.ZodString;
|
|
@@ -114,6 +120,11 @@ export declare const storefrontPublicBikeProductSchema: z.ZodObject<{
|
|
|
114
120
|
quantity: z.ZodNumber;
|
|
115
121
|
currency: z.ZodOptional<z.ZodString>;
|
|
116
122
|
}, z.core.$strip>>>;
|
|
123
|
+
insurance: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
enabled: z.ZodBoolean;
|
|
125
|
+
pricePerDayMinor: z.ZodNumber;
|
|
126
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
117
128
|
features: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
118
129
|
value: z.ZodString;
|
|
119
130
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -268,6 +279,11 @@ export declare const responseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
268
279
|
quantity: z.ZodNumber;
|
|
269
280
|
currency: z.ZodOptional<z.ZodString>;
|
|
270
281
|
}, z.core.$strip>>>;
|
|
282
|
+
insurance: z.ZodOptional<z.ZodObject<{
|
|
283
|
+
enabled: z.ZodBoolean;
|
|
284
|
+
pricePerDayMinor: z.ZodNumber;
|
|
285
|
+
deductibleAmountMinor: z.ZodDefault<z.ZodNumber>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
271
287
|
features: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
272
288
|
value: z.ZodString;
|
|
273
289
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storefrontProducts.d.ts","sourceRoot":"","sources":["../../src/lib/storefrontProducts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAevB,eAAO,MAAM,kCAAkC;;;;;;;;;;;iBAK7C,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAE7F,eAAO,MAAM,8CAA8C;;;iBAGzD,CAAA;AACF,MAAM,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8CAA8C,CAAC,CAAA;AAErH,eAAO,MAAM,6CAA6C;;;;iBAIxD,CAAA;AACF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6CAA6C,CAAC,CAAA;AAEnH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;iBAK/C,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AAEjG,eAAO,MAAM,4CAA4C;;;;EAAqD,CAAA;AAC9G,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAA;AACjH,eAAO,MAAM,8BAA8B;;;EAA6B,CAAA;AACxE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AACrF,eAAO,MAAM,iCAAiC,aAA2B,CAAA;AACzE,eAAO,MAAM,wCAAwC;;;EAGnD,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAA;AAEzG,eAAO,MAAM,gCAAgC;;;;;;;;;;iBAUzC,CAAA;AACJ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,eAAO,MAAM,iCAAiC
|
|
1
|
+
{"version":3,"file":"storefrontProducts.d.ts","sourceRoot":"","sources":["../../src/lib/storefrontProducts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAevB,eAAO,MAAM,kCAAkC;;;;;;;;;;;iBAK7C,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAE7F,eAAO,MAAM,sCAAsC;;;;iBAIjD,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAA;AAErG,eAAO,MAAM,8CAA8C;;;iBAGzD,CAAA;AACF,MAAM,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8CAA8C,CAAC,CAAA;AAErH,eAAO,MAAM,6CAA6C;;;;iBAIxD,CAAA;AACF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6CAA6C,CAAC,CAAA;AAEnH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;iBAK/C,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AAEjG,eAAO,MAAM,4CAA4C;;;;EAAqD,CAAA;AAC9G,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAA;AACjH,eAAO,MAAM,8BAA8B;;;EAA6B,CAAA;AACxE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AACrF,eAAO,MAAM,iCAAiC,aAA2B,CAAA;AACzE,eAAO,MAAM,wCAAwC;;;EAGnD,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAA;AAEzG,eAAO,MAAM,gCAAgC;;;;;;;;;;iBAUzC,CAAA;AACJ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB5C,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAE3F,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAcjD,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAA;AAErG,eAAO,MAAM,KAAK,oCAAoC,CAAA;AAEtD,eAAO,MAAM,aAAa;;iBAExB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAC1D,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAA;AAE7D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAYzB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAC5D,MAAM,MAAM,iCAAiC,GAAG,eAAe,CAAA"}
|