@loczer/storefront-sdk 0.200.0 → 0.201.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/pkg/booking-engine/dist/schemas/base-asset-B4y__1qj.js +22 -0
- package/dist/chunks/pkg/booking-engine/dist/{schemas-BfXM1Dgb.js → schemas-C2PdkXfm.js} +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +64 -64
- package/dist/lib/booking.js +1 -1
- package/dist/lib/checkoutSubmit.js +1 -1
- package/dist/storefrontSchemas.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/base-asset-BRQVuIes.js +0 -22
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n, objectIdStringSchema as r } from "../models/types-rIp4ReXN.js";
|
|
2
|
+
import { productVariantIdentifierSchema as i } from "../models/Product.shared-iVSHRdn4.js";
|
|
3
|
+
import { z as a } from "zod";
|
|
4
|
+
//#region ../booking-engine/dist/schemas/base-asset.js
|
|
5
|
+
var o = a.enum([
|
|
6
|
+
"available",
|
|
7
|
+
"maintenance",
|
|
8
|
+
"lost",
|
|
9
|
+
"blocked"
|
|
10
|
+
]), s = r.transform((e) => e.toLowerCase()), c = a.object({
|
|
11
|
+
_id: s,
|
|
12
|
+
productId: t,
|
|
13
|
+
shopId: t,
|
|
14
|
+
status: o,
|
|
15
|
+
identifiers: a.array(i).default([]),
|
|
16
|
+
productVariantId: t,
|
|
17
|
+
attributes: e.optional(),
|
|
18
|
+
createdAt: n,
|
|
19
|
+
updatedAt: n
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { s as assetIdSchema, c as baseAssetSchema, o as baseAssetStatusSchema };
|
|
@@ -9,6 +9,6 @@ import { fulfillmentModeSchema as G, publicBookingEngineConfigurationSchema as K
|
|
|
9
9
|
import { DEFAULT_BOOKING_DELIVERY_OPTION as Y, bookingCustomerInputSchema as X, bookingDeliveryOptionSchema as Z, bookingScheduleInputSchema as Q, cartItemInputSchema as $, createBookingInputBaseSchema as ee, createBookingInputSchema as te, resolveBookingDeliveryOption as ne, validateBookingDeliveryAddress as re } from "./schemas/cart-inputs-D1_Wmkca.js";
|
|
10
10
|
import { bookingInsuranceConsentSourceSchema as ie, bookingInsuranceItemSnapshotSchema as ae, bookingInsuranceSnapshotSchema as oe, buildBookingInsuranceSnapshot as se, calculateInsuranceCalendarDays as ce, insuranceProviderSchema as le } from "./schemas/insurance-CPeHsTss.js";
|
|
11
11
|
import "./schemas/base-product-BJHQLX8t.js";
|
|
12
|
-
import {
|
|
13
|
-
import { baseBookingItemSchema as
|
|
14
|
-
export { Y as DEFAULT_BOOKING_DELIVERY_OPTION, B as DEFAULT_CANCELLATION_POLICY, V as DEFAULT_PAYMENT_POLICIES, p as DEFAULT_PRODUCT_KIND, m as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, h as PRODUCT_VARIANT_CODE_MAX_LENGTH, g as accessoryProductSchema, ue as
|
|
12
|
+
import { assetIdSchema as ue, baseAssetSchema as de, baseAssetStatusSchema as fe } from "./schemas/base-asset-B4y__1qj.js";
|
|
13
|
+
import { baseBookingItemSchema as pe, baseBookingSchema as me, baseBookingStateSchema as he } from "./schemas/base-booking-Bhy2Kww1.js";
|
|
14
|
+
export { Y as DEFAULT_BOOKING_DELIVERY_OPTION, B as DEFAULT_CANCELLATION_POLICY, V as DEFAULT_PAYMENT_POLICIES, p as DEFAULT_PRODUCT_KIND, m as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, h as PRODUCT_VARIANT_CODE_MAX_LENGTH, g as accessoryProductSchema, ue as assetIdSchema, de as baseAssetSchema, fe as baseAssetStatusSchema, pe as baseBookingItemSchema, me as baseBookingSchema, he as baseBookingStateSchema, _ as bikeProductSchema, X as bookingCustomerInputSchema, Z as bookingDeliveryOptionSchema, ie as bookingInsuranceConsentSourceSchema, ae as bookingInsuranceItemSnapshotSchema, oe as bookingInsuranceSnapshotSchema, Q as bookingScheduleInputSchema, se as buildBookingInsuranceSnapshot, ce as calculateInsuranceCalendarDays, H as cancellationPolicySchema, U as cancellationPolicyTierSchema, $ as cartItemInputSchema, ee as createBookingInputBaseSchema, te as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, v as eBikeProductSchema, G as fulfillmentModeSchema, t as getLocalizedStringValue, le as insuranceProviderSchema, y as isProductVariantCodeIdentifierKind, j as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, W as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, b as productInsuranceSchema, x as productKindSchema, S as productSchema, C as productStorefrontDisplayModeSchema, w as productVariantAttributeSchema, T as productVariantCodeSchema, E as productVariantIdentifierSchema, D as productVariantSchema, K as publicBookingEngineConfigurationSchema, q as publicCheckoutConfigurationSchema, J as publicCheckoutDynamicOptionsSchema, ne as resolveBookingDeliveryOption, O as richTextJsonDocSchema, k as richTextSchema, A as richTextVersionSchema, M as shopConfigurationSchema, N as shopExtraTimeSlotRuleSchema, P as shopOpeningDayIndexSchema, F as shopOpeningDaySchema, I as shopOpeningHoursOverrideSchema, L as shopOpeningHoursPeriodSchema, R as shopOpeningSlotSchema, u as signedMoneyMinorSchema, z as timeOfDaySchema, re as validateBookingDeliveryAddress };
|
package/dist/index.d.ts
CHANGED
|
@@ -258,6 +258,8 @@ declare type AddressAutocompleteLocationRestriction = {
|
|
|
258
258
|
|
|
259
259
|
export declare const applyBookingParamsToSearch: (searchParams: URLSearchParams, booking: Partial<StorefrontBookingParams>) => URLSearchParams;
|
|
260
260
|
|
|
261
|
+
export declare const assetIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
262
|
+
|
|
261
263
|
export declare function Badge({ className, variant, asChild, ...props }: React_2.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
262
264
|
asChild?: boolean;
|
|
263
265
|
}): JSX.Element;
|
|
@@ -271,7 +273,7 @@ export declare type BaseAccessoryProduct = z.infer<typeof accessoryProductSchema
|
|
|
271
273
|
export declare type BaseAsset = z.infer<typeof baseAssetSchema>;
|
|
272
274
|
|
|
273
275
|
export declare const baseAssetSchema: z.ZodObject<{
|
|
274
|
-
_id: z.ZodString
|
|
276
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
275
277
|
productId: z.ZodString;
|
|
276
278
|
shopId: z.ZodString;
|
|
277
279
|
status: z.ZodEnum<{
|
package/dist/index.js
CHANGED
|
@@ -9,75 +9,75 @@ import { DEFAULT_CANCELLATION_POLICY as B, DEFAULT_PAYMENT_POLICIES as V, cancel
|
|
|
9
9
|
import { fulfillmentModeSchema as G, publicBookingEngineConfigurationSchema as K, publicCheckoutConfigurationSchema as q, publicCheckoutDynamicOptionsSchema as J } from "./chunks/pkg/booking-engine/dist/schemas/public-booking-engine-configuration-CEM9mexX.js";
|
|
10
10
|
import { DEFAULT_BOOKING_DELIVERY_OPTION as Y, bookingCustomerInputSchema as X, bookingDeliveryOptionSchema as Z, bookingScheduleInputSchema as Q, cartItemInputSchema as $, createBookingInputBaseSchema as ee, createBookingInputSchema as te, resolveBookingDeliveryOption as ne, validateBookingDeliveryAddress as re } from "./chunks/pkg/booking-engine/dist/schemas/cart-inputs-D1_Wmkca.js";
|
|
11
11
|
import { bookingInsuranceConsentSourceSchema as ie, bookingInsuranceItemSnapshotSchema as ae, bookingInsuranceSnapshotSchema as oe, buildBookingInsuranceSnapshot as se, calculateInsuranceCalendarDays as ce, insuranceProviderSchema as le } from "./chunks/pkg/booking-engine/dist/schemas/insurance-CPeHsTss.js";
|
|
12
|
-
import {
|
|
13
|
-
import { baseBookingItemSchema as
|
|
14
|
-
import "./chunks/pkg/booking-engine/dist/schemas-
|
|
15
|
-
import { STOREFRONT_HERO_MODES as
|
|
16
|
-
import { BOOKING_SEARCH_KEYS as
|
|
17
|
-
import { getLocalizedEntry as
|
|
18
|
-
import { CATALOG_PRODUCT_BASE_RATE_UNSET as
|
|
19
|
-
import { StorefrontCartProvider as
|
|
20
|
-
import { cn as
|
|
21
|
-
import { buildDailyPriceRows as
|
|
22
|
-
import { buildStorefrontCartSummary as
|
|
23
|
-
import { ROUTE as
|
|
24
|
-
import { formatStorefrontPhoneDisplay as
|
|
25
|
-
import { buildWhatsAppHref as
|
|
26
|
-
import { ROUTE as
|
|
27
|
-
import { ROUTE as
|
|
28
|
-
import { ROUTE as
|
|
29
|
-
import { ROUTE as
|
|
30
|
-
import { ROUTE as
|
|
31
|
-
import { Footer as
|
|
32
|
-
import { Badge as
|
|
33
|
-
import { Button as
|
|
34
|
-
import { Header as
|
|
35
|
-
import { storefront as
|
|
36
|
-
import { storefront as
|
|
37
|
-
import { PoweredByLoczerBadge as
|
|
38
|
-
import { PlatformFooter as
|
|
39
|
-
import { useWhatsAppFloatingButton as
|
|
40
|
-
import { WhatsAppFloatingButton as
|
|
12
|
+
import { assetIdSchema as ue, baseAssetSchema as de, baseAssetStatusSchema as fe } from "./chunks/pkg/booking-engine/dist/schemas/base-asset-B4y__1qj.js";
|
|
13
|
+
import { baseBookingItemSchema as pe, baseBookingSchema as me, baseBookingStateSchema as he } from "./chunks/pkg/booking-engine/dist/schemas/base-booking-Bhy2Kww1.js";
|
|
14
|
+
import "./chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.js";
|
|
15
|
+
import { STOREFRONT_HERO_MODES as ge, storefrontCheckoutModeSchema as _e, storefrontConfigurationSchema as ve, storefrontContentSchema as ye, storefrontFaqItemSchema as be, storefrontFaqSchema as xe, storefrontFulfillmentModeSchema as Se, storefrontHeroModeSchema as Ce, storefrontLocalizedRichTextSchema as we, storefrontModalMessageSchema as Te, storefrontModulesSchema as Ee, storefrontReviewsModuleSchema as De, storefrontRichTextSchema as Oe, storefrontSettingsSchema as ke, storefrontShopSchema as Ae, storefrontStatusSchema as je, storefrontWorkspaceSchema as Me } from "./storefrontSchemas.js";
|
|
16
|
+
import { BOOKING_SEARCH_KEYS as Ne, TIME_OPTIONS as Pe, applyBookingParamsToSearch as Fe, createBookingPeriodConfigFromBookingEngineConfiguration as Ie, createBookingPeriodConfigFromShopConfiguration as Le, createBookingPeriodConfigFromStorefrontConfiguration as Re, getBookingDurationLabel as ze, getBookingDurationMinutes as Be, getBookingParamsFromSearch as Ve, getBookingSessionStorageKey as He, getDefaultBookingParams as Ue, getDefaultBookingParamsForStorefrontConfiguration as We, pickBookingSearchParams as Ge, readBookingSearchParamsFromSessionStorage as Ke, readBookingSearchParamsFromStorage as qe, resolveBookingSearchParams as Je, resolveBookingSearchParamsFromSessionStorage as Ye, writeBookingSearchParamsToSessionStorage as Xe, writeBookingSearchParamsToStorage as Ze } from "./lib/booking.js";
|
|
17
|
+
import { getLocalizedEntry as Qe, getLocalizedValue as $e } from "./localization.js";
|
|
18
|
+
import { CATALOG_PRODUCT_BASE_RATE_UNSET as et, buildStorefrontProductSlug as tt, buildVariantStorefrontProductId as nt, compareCatalogProducts as rt, compareStorefrontAccessoryProducts as it, compareStorefrontBikeProducts as at, findStorefrontProduct as ot, findStorefrontProductBySlug as st, getCatalogProductBaseRateMinor as ct, getCatalogProductPaginationSort as lt, getCatalogProductSortFieldForPriceUnit as ut, getStorefrontBaseDailyRateMinor as dt, getStorefrontCheckoutProductId as ft, getStorefrontProductSelectionDisplayName as pt, getStorefrontRepresentedVariantId as mt, toStorefrontAccessoryProducts as ht, toStorefrontBikeProducts as gt, toStorefrontBookingProducts as _t, toStorefrontBookingProductsCollections as vt } from "./lib/products.js";
|
|
19
|
+
import { StorefrontCartProvider as yt, resolveStorefrontCartItemProduct as bt, useStorefrontCart as xt } from "./lib/cart.js";
|
|
20
|
+
import { cn as St, formatPriceMinor as Ct, getAvailabilityVariant as wt, getMinDayPriceMinor as Tt } from "./lib/utils.js";
|
|
21
|
+
import { buildDailyPriceRows as Et, buildPriceTierLabels as Dt, calculateDailyPriceForQuantity as Ot, formatStorefrontPriceMinor as kt } from "./lib/pricing.js";
|
|
22
|
+
import { buildStorefrontCartSummary as At } from "./lib/cartSummary.js";
|
|
23
|
+
import { ROUTE as jt, requestSchema as Mt, responseSchema as Nt } from "./lib/contactForm.js";
|
|
24
|
+
import { formatStorefrontPhoneDisplay as Pt, resolveStorefrontMapsHref as Ft, resolveStorefrontPhoneContact as It } from "./lib/storefrontContact.js";
|
|
25
|
+
import { buildWhatsAppHref as Lt, resolveStorefrontWhatsAppContact as Rt, resolveStorefrontWhatsAppHref as zt } from "./lib/whatsapp.js";
|
|
26
|
+
import { ROUTE as Bt, requestBaseSchema as Vt, requestCheckoutItemSchema as Ht, requestDeliveryRefinement as Ut, requestSchema as Wt, responseSchema as Gt } from "./lib/checkoutSubmit.js";
|
|
27
|
+
import { ROUTE as Kt, requestSchema as qt, responseSchema as Jt, storefrontPublicAccessoryProductSchema as Yt, storefrontPublicBikeAvailabilityStatusSchema as Xt, storefrontPublicBikeProductSchema as Zt, storefrontPublicProductDisplayModeSchema as Qt, storefrontPublicProductPriceSchema as $t, storefrontPublicProductVariantAttributeSchema as en, storefrontPublicProductVariantIdentifierSchema as tn, storefrontPublicProductVariantSchema as nn } from "./lib/storefrontProducts.js";
|
|
28
|
+
import { ROUTE as rn, buildStorefrontAvailabilityKey as an, doesStorefrontAvailabilityDisplaySoldOut as on, getStorefrontAvailabilityIssue as sn, getStorefrontAvailabilityStatus as cn, isStorefrontAvailabilityInsufficient as ln, publicAvailabilityDisplayModeSchema as un, requestSchema as dn, responseSchema as fn, shouldBlockStorefrontUnavailableItem as pn, storefrontAvailabilityProductSchema as mn, storefrontAvailabilityScheduleSchema as hn, storefrontPublicAvailabilityRecordSchema as gn } from "./lib/storefrontAvailability.js";
|
|
29
|
+
import { ROUTE as _n, buildStorefrontImageUrl as vn, requestSchema as yn } from "./lib/storefrontImage.js";
|
|
30
|
+
import { ROUTE as bn, requestSchema as xn, responseSchema as Sn, storefrontTimeSlotSchema as Cn, timeSlotJourneySchema as wn } from "./lib/storefrontTimeSlots.js";
|
|
31
|
+
import { Footer as Tn } from "./components/Footer/index.js";
|
|
32
|
+
import { Badge as En, badgeVariants as Dn } from "./ui/badge.js";
|
|
33
|
+
import { Button as On, buttonVariants as kn } from "./ui/button.js";
|
|
34
|
+
import { Header as An } from "./components/Header/index.js";
|
|
35
|
+
import { storefront as jn } from "./i18n/en.js";
|
|
36
|
+
import { storefront as Mn } from "./i18n/fr.js";
|
|
37
|
+
import { PoweredByLoczerBadge as Nn } from "./components/PoweredByLoczerBadge/index.js";
|
|
38
|
+
import { PlatformFooter as Pn } from "./components/PlatformFooter/index.js";
|
|
39
|
+
import { useWhatsAppFloatingButton as Fn } from "./components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js";
|
|
40
|
+
import { WhatsAppFloatingButton as In } from "./components/WhatsAppFloatingButton/WhatsAppFloatingButton.js";
|
|
41
41
|
import "./components/WhatsAppFloatingButton/index.js";
|
|
42
|
-
import { Layout as
|
|
43
|
-
import { DelayedPlaceholder as
|
|
44
|
-
import { BookingPeriodProvider as
|
|
45
|
-
import { Label as
|
|
46
|
-
import { BookingStartDateField as
|
|
47
|
-
import { BookingStartTimeField as
|
|
48
|
-
import { BookingEndDateField as
|
|
49
|
-
import { BookingEndTimeField as
|
|
50
|
-
import { BookingTimeSlotsStatus as
|
|
51
|
-
import { BookingMobileDateDrawer as
|
|
52
|
-
import { BookingPeriodSelector as
|
|
53
|
-
import { BookingFlowSteps as
|
|
54
|
-
import { Input as
|
|
55
|
-
import { DeliveryAddressSelector as
|
|
56
|
-
import { StorefrontContext as
|
|
57
|
-
import { Form as
|
|
58
|
-
import { Textarea as
|
|
59
|
-
import { ContactSection as
|
|
60
|
-
import { TestimonialsSection as
|
|
61
|
-
import { AboutSection as
|
|
62
|
-
import { StepSectionTitle as
|
|
63
|
-
import { Card as
|
|
64
|
-
import { ProductWarningNotice as
|
|
65
|
-
import { StorefrontCartPanel as
|
|
66
|
-
import { ProductPriceBadge as
|
|
67
|
-
import { ContractSaleDocument as
|
|
42
|
+
import { Layout as Ln } from "./components/Layout/index.js";
|
|
43
|
+
import { DelayedPlaceholder as Rn, DelayedReveal as zn } from "./components/DelayedReveal/index.js";
|
|
44
|
+
import { BookingPeriodProvider as Bn, useBookingPeriod as Vn } from "./components/BookingPeriodSelector/BookingPeriodContext.js";
|
|
45
|
+
import { Label as Hn } from "./ui/label.js";
|
|
46
|
+
import { BookingStartDateField as Un } from "./components/BookingPeriodSelector/components/BookingStartDateField.js";
|
|
47
|
+
import { BookingStartTimeField as Wn } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
|
|
48
|
+
import { BookingEndDateField as Gn } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
|
|
49
|
+
import { BookingEndTimeField as Kn } from "./components/BookingPeriodSelector/components/BookingEndTimeField.js";
|
|
50
|
+
import { BookingTimeSlotsStatus as qn } from "./components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
|
|
51
|
+
import { BookingMobileDateDrawer as Jn } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
|
|
52
|
+
import { BookingPeriodSelector as Yn } from "./components/BookingPeriodSelector/index.js";
|
|
53
|
+
import { BookingFlowSteps as Xn } from "./components/BookingFlowSteps/index.js";
|
|
54
|
+
import { Input as Zn } from "./ui/input.js";
|
|
55
|
+
import { DeliveryAddressSelector as Qn } from "./components/DeliveryAddressSelector/index.js";
|
|
56
|
+
import { StorefrontContext as $n, useOptionalStorefront as er, useStorefront as tr, useStorefrontBookingProducts as nr, useStorefrontConfig as rr, useStorefrontProducts as ir, useStorefrontWorkspaceLanguage as ar } from "./StorefrontContext.js";
|
|
57
|
+
import { Form as or, FormControl as sr, FormDescription as cr, FormField as lr, FormItem as ur, FormLabel as dr, FormMessage as fr, useFormField as pr } from "./ui/form.js";
|
|
58
|
+
import { Textarea as mr } from "./ui/textarea.js";
|
|
59
|
+
import { ContactSection as hr } from "./components/ContactSection/index.js";
|
|
60
|
+
import { TestimonialsSection as gr } from "./components/TestimonialsSection/index.js";
|
|
61
|
+
import { AboutSection as _r } from "./components/AboutSection/index.js";
|
|
62
|
+
import { StepSectionTitle as vr } from "./components/StepSectionTitle/index.js";
|
|
63
|
+
import { Card as yr, CardAction as br, CardContent as xr, CardDescription as Sr, CardFooter as Cr, CardHeader as wr, CardTitle as Tr } from "./ui/card.js";
|
|
64
|
+
import { ProductWarningNotice as Er } from "./components/ProductWarningNotice/index.js";
|
|
65
|
+
import { StorefrontCartPanel as Dr } from "./components/StorefrontCartPanel/index.js";
|
|
66
|
+
import { ProductPriceBadge as Or } from "./components/ProductPriceBadge/index.js";
|
|
67
|
+
import { ContractSaleDocument as kr } from "./components/ContractSaleDocument/Invoice.js";
|
|
68
68
|
import "./components/ContractSaleDocument/index.js";
|
|
69
|
-
import { RadioGroup as
|
|
69
|
+
import { RadioGroup as Ar, RadioGroupItem as jr } from "./ui/radio-group.js";
|
|
70
70
|
import "./pages/HomePage.js";
|
|
71
71
|
import "./pages/BookingPage.js";
|
|
72
72
|
import "./pages/ProductPage.js";
|
|
73
73
|
import "./pages/CheckoutPage.js";
|
|
74
74
|
import "./pages/CheckoutSuccessPage.js";
|
|
75
75
|
import "./pages/NotFoundPage.js";
|
|
76
|
-
import { accessories as
|
|
77
|
-
import
|
|
78
|
-
import { contractSaleDocumentAcceptanceLevelSchema as
|
|
79
|
-
import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as
|
|
80
|
-
import
|
|
81
|
-
import { loader as
|
|
82
|
-
import { Select as
|
|
83
|
-
export {
|
|
76
|
+
import { accessories as Mr } from "./data/accessories.js";
|
|
77
|
+
import Nr from "./data/bikes.js";
|
|
78
|
+
import { contractSaleDocumentAcceptanceLevelSchema as Pr, contractSaleDocumentAcceptanceRecordSchema as Fr, contractSaleDocumentAcceptanceSchema as Ir, contractSaleDocumentAddressSchema as Lr, contractSaleDocumentAppendixKindSchema as Rr, contractSaleDocumentAppendixSchema as zr, contractSaleDocumentContactSchema as Br, contractSaleDocumentKindSchema as Vr, contractSaleDocumentLanguageCodeSchema as Hr, contractSaleDocumentLanguageSchema as Ur, contractSaleDocumentLineItemSchema as Wr, contractSaleDocumentRentalSchema as Gr, contractSaleDocumentSchema as Kr, contractSaleDocumentSignatureSchema as qr } from "./lib/contractSaleDocument.js";
|
|
79
|
+
import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as Jr, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Yr, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Xr, acceptContractSaleDocumentRequestSchema as Zr, acceptContractSaleDocumentResponseSchema as Qr, contractSaleDocumentAcceptanceInputSchema as $r, contractSaleDocumentAcceptanceRecordInputSchema as ei, contractSaleDocumentApiAcceptanceRecordSchema as ti, contractSaleDocumentApiAcceptanceSchema as ni, contractSaleDocumentApiSchema as ri, contractSaleDocumentApiSignatureSchema as ii, contractSaleDocumentReferenceSchema as ai, contractSaleDocumentReferenceTypeSchema as oi, contractSaleDocumentSignatureInputSchema as si, downloadContractSaleDocumentPdfRequestSchema as ci, getContractSaleDocumentRequestSchema as li, getContractSaleDocumentResponseSchema as ui } from "./lib/contractSaleDocumentApi.js";
|
|
80
|
+
import di from "./routes.js";
|
|
81
|
+
import { loader as fi } from "./StorefrontProvider.js";
|
|
82
|
+
import { Select as pi, SelectContent as mi, SelectGroup as hi, SelectIcon as gi, SelectItem as _i, SelectItemIndicator as vi, SelectItemText as yi, SelectLabel as bi, SelectScrollDownButton as xi, SelectScrollUpButton as Si, SelectSeparator as Ci, SelectTrigger as wi, SelectValue as Ti } from "./ui/select.js";
|
|
83
|
+
export { Jr as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, _r as AboutSection, Ne as BOOKING_SEARCH_KEYS, En as Badge, Gn as BookingEndDateField, Kn as BookingEndTimeField, Xn as BookingFlowSteps, Jn as BookingMobileDateDrawer, Bn as BookingPeriodProvider, Yn as BookingPeriodSelector, Un as BookingStartDateField, Wn as BookingStartTimeField, qn as BookingTimeSlotsStatus, On as Button, et as CATALOG_PRODUCT_BASE_RATE_UNSET, yr as Card, br as CardAction, xr as CardContent, Sr as CardDescription, Cr as CardFooter, wr as CardHeader, Tr as CardTitle, hr as ContactSection, kr as ContractSaleDocument, Y as DEFAULT_BOOKING_DELIVERY_OPTION, B as DEFAULT_CANCELLATION_POLICY, V as DEFAULT_PAYMENT_POLICIES, p as DEFAULT_PRODUCT_KIND, Yr as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, Rn as DelayedPlaceholder, zn as DelayedReveal, Qn as DeliveryAddressSelector, Tn as Footer, or as Form, sr as FormControl, cr as FormDescription, lr as FormField, ur as FormItem, dr as FormLabel, fr as FormMessage, Xr as GET_CONTRACT_SALE_DOCUMENT_ROUTE, An as Header, Zn as Input, Hn as Label, Ln as Layout, m as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, h as PRODUCT_VARIANT_CODE_MAX_LENGTH, Pn as PlatformFooter, Nn as PoweredByLoczerBadge, Or as ProductPriceBadge, Er as ProductWarningNotice, jt as ROUTE, Ar as RadioGroup, jr as RadioGroupItem, rn as STOREFRONT_AVAILABILITY_ROUTE, Bt as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, ge as STOREFRONT_HERO_MODES, _n as STOREFRONT_IMAGE_ROUTE, Kt as STOREFRONT_PRODUCTS_ROUTE, bn as STOREFRONT_TIME_SLOTS_ROUTE, pi as Select, mi as SelectContent, hi as SelectGroup, gi as SelectIcon, _i as SelectItem, vi as SelectItemIndicator, yi as SelectItemText, bi as SelectLabel, xi as SelectScrollDownButton, Si as SelectScrollUpButton, Ci as SelectSeparator, wi as SelectTrigger, Ti as SelectValue, vr as StepSectionTitle, Dr as StorefrontCartPanel, yt as StorefrontCartProvider, $n as StorefrontContext, Pe as TIME_OPTIONS, gr as TestimonialsSection, mr as Textarea, In as WhatsAppFloatingButton, Zr as acceptContractSaleDocumentRequestSchema, Qr as acceptContractSaleDocumentResponseSchema, Mr as accessories, g as accessoryProductSchema, Fe as applyBookingParamsToSearch, ue as assetIdSchema, Dn as badgeVariants, de as baseAssetSchema, fe as baseAssetStatusSchema, pe as baseBookingItemSchema, me as baseBookingSchema, he as baseBookingStateSchema, _ as bikeProductSchema, Nr as bikes, X as bookingCustomerInputSchema, Z as bookingDeliveryOptionSchema, ie as bookingInsuranceConsentSourceSchema, ae as bookingInsuranceItemSnapshotSchema, oe as bookingInsuranceSnapshotSchema, Q as bookingScheduleInputSchema, se as buildBookingInsuranceSnapshot, Et as buildDailyPriceRows, Dt as buildPriceTierLabels, an as buildStorefrontAvailabilityKey, At as buildStorefrontCartSummary, vn as buildStorefrontImageUrl, tt as buildStorefrontProductSlug, nt as buildVariantStorefrontProductId, Lt as buildWhatsAppHref, kn as buttonVariants, Ot as calculateDailyPriceForQuantity, ce as calculateInsuranceCalendarDays, H as cancellationPolicySchema, U as cancellationPolicyTierSchema, $ as cartItemInputSchema, St as cn, rt as compareCatalogProducts, it as compareStorefrontAccessoryProducts, at as compareStorefrontBikeProducts, $r as contractSaleDocumentAcceptanceInputSchema, Pr as contractSaleDocumentAcceptanceLevelSchema, ei as contractSaleDocumentAcceptanceRecordInputSchema, Fr as contractSaleDocumentAcceptanceRecordSchema, Ir as contractSaleDocumentAcceptanceSchema, Lr as contractSaleDocumentAddressSchema, ti as contractSaleDocumentApiAcceptanceRecordSchema, ni as contractSaleDocumentApiAcceptanceSchema, ri as contractSaleDocumentApiSchema, ii as contractSaleDocumentApiSignatureSchema, Rr as contractSaleDocumentAppendixKindSchema, zr as contractSaleDocumentAppendixSchema, Br as contractSaleDocumentContactSchema, Vr as contractSaleDocumentKindSchema, Hr as contractSaleDocumentLanguageCodeSchema, Ur as contractSaleDocumentLanguageSchema, Wr as contractSaleDocumentLineItemSchema, ai as contractSaleDocumentReferenceSchema, oi as contractSaleDocumentReferenceTypeSchema, Gr as contractSaleDocumentRentalSchema, Kr as contractSaleDocumentSchema, si as contractSaleDocumentSignatureInputSchema, qr as contractSaleDocumentSignatureSchema, ee as createBookingInputBaseSchema, te as createBookingInputSchema, Ie as createBookingPeriodConfigFromBookingEngineConfiguration, Le as createBookingPeriodConfigFromShopConfiguration, Re as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, on as doesStorefrontAvailabilityDisplaySoldOut, ci as downloadContractSaleDocumentPdfRequestSchema, v as eBikeProductSchema, ot as findStorefrontProduct, st as findStorefrontProductBySlug, Ct as formatPriceMinor, Pt as formatStorefrontPhoneDisplay, kt as formatStorefrontPriceMinor, G as fulfillmentModeSchema, wt as getAvailabilityVariant, ze as getBookingDurationLabel, Be as getBookingDurationMinutes, Ve as getBookingParamsFromSearch, He as getBookingSessionStorageKey, ct as getCatalogProductBaseRateMinor, lt as getCatalogProductPaginationSort, ut as getCatalogProductSortFieldForPriceUnit, li as getContractSaleDocumentRequestSchema, ui as getContractSaleDocumentResponseSchema, Ue as getDefaultBookingParams, We as getDefaultBookingParamsForStorefrontConfiguration, Qe as getLocalizedEntry, t as getLocalizedStringValue, $e as getLocalizedValue, Tt as getMinDayPriceMinor, sn as getStorefrontAvailabilityIssue, cn as getStorefrontAvailabilityStatus, dt as getStorefrontBaseDailyRateMinor, ft as getStorefrontCheckoutProductId, pt as getStorefrontProductSelectionDisplayName, mt as getStorefrontRepresentedVariantId, le as insuranceProviderSchema, y as isProductVariantCodeIdentifierKind, ln as isStorefrontAvailabilityInsufficient, j as isoDateSchema, fi as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, W as paymentPoliciesSchema, Ge as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, b as productInsuranceSchema, x as productKindSchema, S as productSchema, C as productStorefrontDisplayModeSchema, w as productVariantAttributeSchema, T as productVariantCodeSchema, E as productVariantIdentifierSchema, D as productVariantSchema, un as publicAvailabilityDisplayModeSchema, K as publicBookingEngineConfigurationSchema, q as publicCheckoutConfigurationSchema, J as publicCheckoutDynamicOptionsSchema, Ke as readBookingSearchParamsFromSessionStorage, qe as readBookingSearchParamsFromStorage, Mt as requestSchema, ne as resolveBookingDeliveryOption, Je as resolveBookingSearchParams, Ye as resolveBookingSearchParamsFromSessionStorage, bt as resolveStorefrontCartItemProduct, Ft as resolveStorefrontMapsHref, It as resolveStorefrontPhoneContact, Rt as resolveStorefrontWhatsAppContact, zt as resolveStorefrontWhatsAppHref, Nt as responseSchema, O as richTextJsonDocSchema, k as richTextSchema, A as richTextVersionSchema, M as shopConfigurationSchema, N as shopExtraTimeSlotRuleSchema, P as shopOpeningDayIndexSchema, F as shopOpeningDaySchema, I as shopOpeningHoursOverrideSchema, L as shopOpeningHoursPeriodSchema, R as shopOpeningSlotSchema, pn as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, mn as storefrontAvailabilityProductSchema, dn as storefrontAvailabilityRequestSchema, fn as storefrontAvailabilityResponseSchema, hn as storefrontAvailabilityScheduleSchema, _e as storefrontCheckoutModeSchema, Ut as storefrontCheckoutSubmitDeliveryRefinement, Ht as storefrontCheckoutSubmitItemSchema, Vt as storefrontCheckoutSubmitRequestBaseSchema, Wt as storefrontCheckoutSubmitRequestSchema, Gt as storefrontCheckoutSubmitResponseSchema, ve as storefrontConfigurationSchema, ye as storefrontContentSchema, jn as storefrontEn, be as storefrontFaqItemSchema, xe as storefrontFaqSchema, Mn as storefrontFr, Se as storefrontFulfillmentModeSchema, Ce as storefrontHeroModeSchema, yn as storefrontImageRequestSchema, we as storefrontLocalizedRichTextSchema, Te as storefrontModalMessageSchema, Ee as storefrontModulesSchema, qt as storefrontProductsRequestSchema, Jt as storefrontProductsResponseSchema, Yt as storefrontPublicAccessoryProductSchema, gn as storefrontPublicAvailabilityRecordSchema, Xt as storefrontPublicBikeAvailabilityStatusSchema, Zt as storefrontPublicBikeProductSchema, Qt as storefrontPublicProductDisplayModeSchema, $t as storefrontPublicProductPriceSchema, en as storefrontPublicProductVariantAttributeSchema, tn as storefrontPublicProductVariantIdentifierSchema, nn as storefrontPublicProductVariantSchema, De as storefrontReviewsModuleSchema, Oe as storefrontRichTextSchema, di as storefrontRoutes, ke as storefrontSettingsSchema, Ae as storefrontShopSchema, je as storefrontStatusSchema, wn as storefrontTimeSlotJourneySchema, Cn as storefrontTimeSlotSchema, xn as storefrontTimeSlotsRequestSchema, Sn as storefrontTimeSlotsResponseSchema, Me as storefrontWorkspaceSchema, z as timeOfDaySchema, ht as toStorefrontAccessoryProducts, gt as toStorefrontBikeProducts, _t as toStorefrontBookingProducts, vt as toStorefrontBookingProductsCollections, Vn as useBookingPeriod, pr as useFormField, er as useOptionalStorefront, tr as useStorefront, nr as useStorefrontBookingProducts, xt as useStorefrontCart, rr as useStorefrontConfig, ir as useStorefrontProducts, ar as useStorefrontWorkspaceLanguage, Fn as useWhatsAppFloatingButton, re as validateBookingDeliveryAddress, Xe as writeBookingSearchParamsToSessionStorage, Ze as writeBookingSearchParamsToStorage };
|
package/dist/lib/booking.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-D1_Wmkca.js";
|
|
2
|
-
import "../chunks/pkg/booking-engine/dist/schemas-
|
|
2
|
+
import "../chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.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
1
|
import { productKindSchema as e } from "../chunks/pkg/booking-engine/dist/models/Product.shared-iVSHRdn4.js";
|
|
2
2
|
import { DEFAULT_BOOKING_DELIVERY_OPTION as t, bookingScheduleInputSchema as n } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-D1_Wmkca.js";
|
|
3
|
-
import "../chunks/pkg/booking-engine/dist/schemas-
|
|
3
|
+
import "../chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.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,6 +1,6 @@
|
|
|
1
1
|
import { timeOfDaySchema as e } from "./chunks/pkg/booking-engine/dist/schemas/shop-opening-hours-BlLD1gfz.js";
|
|
2
2
|
import { publicBookingEngineConfigurationSchema as t } from "./chunks/pkg/booking-engine/dist/schemas/public-booking-engine-configuration-CEM9mexX.js";
|
|
3
|
-
import "./chunks/pkg/booking-engine/dist/schemas-
|
|
3
|
+
import "./chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.js";
|
|
4
4
|
import { z as n } from "zod";
|
|
5
5
|
//#region src/storefrontSchemas.ts
|
|
6
6
|
var r = n.string().trim().regex(/^\+[1-9]\d{1,14}$/, { message: "Invalid phone number format (expected E.164, e.g. +14155552671)." }), i = n.object({
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n } from "../models/types-rIp4ReXN.js";
|
|
2
|
-
import { productVariantIdentifierSchema as r } from "../models/Product.shared-iVSHRdn4.js";
|
|
3
|
-
import { z as i } from "zod";
|
|
4
|
-
//#region ../booking-engine/dist/schemas/base-asset.js
|
|
5
|
-
var a = i.enum([
|
|
6
|
-
"available",
|
|
7
|
-
"maintenance",
|
|
8
|
-
"lost",
|
|
9
|
-
"blocked"
|
|
10
|
-
]), o = i.object({
|
|
11
|
-
_id: t,
|
|
12
|
-
productId: t,
|
|
13
|
-
shopId: t,
|
|
14
|
-
status: a,
|
|
15
|
-
identifiers: i.array(r).default([]),
|
|
16
|
-
productVariantId: t,
|
|
17
|
-
attributes: e.optional(),
|
|
18
|
-
createdAt: n,
|
|
19
|
-
updatedAt: n
|
|
20
|
-
});
|
|
21
|
-
//#endregion
|
|
22
|
-
export { o as baseAssetSchema, a as baseAssetStatusSchema };
|