@loczer/storefront-sdk 0.186.0 → 0.187.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/StorefrontProvider.d.ts +3 -0
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/components/Header/index.js +30 -29
- package/dist/components/PlaygroundDevFloatingButton/index.d.ts.map +1 -1
- package/dist/components/PlaygroundDevFloatingButton/index.js +109 -102
- package/dist/i18n/fr.d.ts +1 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +3 -2
- package/dist/index.d.ts +24 -0
- package/dist/index.js +59 -59
- package/dist/lib/playgroundDevSettings.d.ts +3 -2
- package/dist/lib/playgroundDevSettings.d.ts.map +1 -1
- package/dist/lib/playgroundDevSettings.js +28 -27
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +305 -303
- package/dist/storefrontSchemas.d.ts +17 -0
- package/dist/storefrontSchemas.d.ts.map +1 -1
- package/dist/storefrontSchemas.js +26 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,70 +11,70 @@ import { DEFAULT_BOOKING_DELIVERY_OPTION as q, bookingCustomerInputSchema as J,
|
|
|
11
11
|
import { baseAssetSchema as ne, baseAssetStatusSchema as re } from "./chunks/booking-engine/dist/schemas/base-asset-B_Dm8_Vk.js";
|
|
12
12
|
import { baseBookingItemSchema as ie, baseBookingSchema as ae, baseBookingStateSchema as oe } from "./chunks/booking-engine/dist/schemas/base-booking-DW8AEPKo.js";
|
|
13
13
|
import "./chunks/booking-engine/dist/schemas-DftrSnTE.js";
|
|
14
|
-
import {
|
|
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
|
|
14
|
+
import { STOREFRONT_HERO_MODES as se, storefrontCheckoutModeSchema as ce, storefrontConfigurationSchema as le, storefrontContentSchema as ue, storefrontFaqItemSchema as de, storefrontFaqSchema as fe, storefrontFulfillmentModeSchema as pe, storefrontHeroModeSchema as me, storefrontLocalizedRichTextSchema as he, storefrontModalMessageSchema as ge, storefrontModulesSchema as _e, storefrontReviewsModuleSchema as ve, storefrontRichTextSchema as ye, storefrontSettingsSchema as be, storefrontShopSchema as xe, storefrontStatusSchema as Se, storefrontWorkspaceSchema as Ce } from "./storefrontSchemas.js";
|
|
15
|
+
import { BOOKING_SEARCH_KEYS as we, TIME_OPTIONS as Te, applyBookingParamsToSearch as Ee, createBookingPeriodConfigFromBookingEngineConfiguration as De, createBookingPeriodConfigFromShopConfiguration as Oe, createBookingPeriodConfigFromStorefrontConfiguration as ke, getBookingDurationLabel as Ae, getBookingDurationMinutes as je, getBookingParamsFromSearch as Me, getBookingSessionStorageKey as Ne, getDefaultBookingParams as Pe, getDefaultBookingParamsForStorefrontConfiguration as Fe, pickBookingSearchParams as Ie, readBookingSearchParamsFromSessionStorage as Le, readBookingSearchParamsFromStorage as Re, resolveBookingSearchParams as ze, resolveBookingSearchParamsFromSessionStorage as Be, writeBookingSearchParamsToSessionStorage as Ve, writeBookingSearchParamsToStorage as He } from "./lib/booking.js";
|
|
16
|
+
import { CATALOG_PRODUCT_BASE_RATE_UNSET as Ue, buildStorefrontProductSlug as We, buildVariantStorefrontProductId as Ge, compareCatalogProducts as Ke, compareStorefrontAccessoryProducts as qe, compareStorefrontBikeProducts as Je, findStorefrontProduct as Ye, findStorefrontProductBySlug as Xe, getCatalogProductBaseRateMinor as Ze, getCatalogProductPaginationSort as Qe, getCatalogProductSortFieldForPriceUnit as $e, getStorefrontBaseDailyRateMinor as et, getStorefrontCheckoutProductId as tt, getStorefrontRepresentedVariantId as nt, toStorefrontAccessoryProducts as rt, toStorefrontBikeProducts as it, toStorefrontBookingProducts as at, toStorefrontBookingProductsCollections as ot } from "./lib/products.js";
|
|
17
|
+
import { StorefrontCartProvider as st, resolveStorefrontCartItemProduct as ct, useStorefrontCart as lt } from "./lib/cart.js";
|
|
18
|
+
import { cn as ut, formatPriceMinor as dt, getAvailabilityVariant as ft, getMinDayPriceMinor as pt } from "./lib/utils.js";
|
|
19
|
+
import { buildDailyPriceRows as mt, buildPriceTierLabels as ht, calculateDailyPriceForQuantity as gt, formatStorefrontPriceMinor as _t } from "./lib/pricing.js";
|
|
20
|
+
import { getLocalizedEntry as vt, getLocalizedValue as yt } from "./localization.js";
|
|
21
|
+
import { buildStorefrontCartSummary as bt } from "./lib/cartSummary.js";
|
|
22
|
+
import { ROUTE as xt, requestSchema as St, responseSchema as Ct } from "./lib/contactForm.js";
|
|
23
|
+
import { formatStorefrontPhoneDisplay as wt, resolveStorefrontMapsHref as Tt, resolveStorefrontPhoneContact as Et } from "./lib/storefrontContact.js";
|
|
24
|
+
import { buildWhatsAppHref as Dt, resolveStorefrontWhatsAppContact as Ot, resolveStorefrontWhatsAppHref as kt } from "./lib/whatsapp.js";
|
|
25
|
+
import { ROUTE as At, requestBaseSchema as jt, requestCheckoutItemSchema as Mt, requestDeliveryRefinement as Nt, requestSchema as Pt, responseSchema as Ft } from "./lib/checkoutSubmit.js";
|
|
26
|
+
import { ROUTE as It, requestSchema as Lt, responseSchema as Rt, storefrontPublicAccessoryProductSchema as zt, storefrontPublicBikeAvailabilityStatusSchema as Bt, storefrontPublicBikeProductSchema as Vt, storefrontPublicProductDisplayModeSchema as Ht, storefrontPublicProductPriceSchema as Ut, storefrontPublicProductVariantAttributeSchema as Wt, storefrontPublicProductVariantIdentifierSchema as Gt, storefrontPublicProductVariantSchema as Kt } from "./lib/storefrontProducts.js";
|
|
27
|
+
import { ROUTE as qt, buildStorefrontAvailabilityKey as Jt, doesStorefrontAvailabilityDisplaySoldOut as Yt, getStorefrontAvailabilityIssue as Xt, getStorefrontAvailabilityStatus as Zt, isStorefrontAvailabilityInsufficient as Qt, publicAvailabilityDisplayModeSchema as $t, requestSchema as en, responseSchema as tn, shouldBlockStorefrontUnavailableItem as nn, storefrontAvailabilityProductSchema as rn, storefrontAvailabilityScheduleSchema as an, storefrontPublicAvailabilityRecordSchema as on } from "./lib/storefrontAvailability.js";
|
|
28
|
+
import { ROUTE as sn, buildStorefrontImageUrl as cn, requestSchema as ln } from "./lib/storefrontImage.js";
|
|
29
|
+
import { ROUTE as un, requestSchema as dn, responseSchema as fn, storefrontTimeSlotSchema as pn, timeSlotJourneySchema as mn } from "./lib/storefrontTimeSlots.js";
|
|
30
|
+
import { Footer as hn } from "./components/Footer/index.js";
|
|
31
|
+
import { Badge as gn, badgeVariants as _n } from "./ui/badge.js";
|
|
32
|
+
import { Button as vn, buttonVariants as yn } from "./ui/button.js";
|
|
33
|
+
import { Header as bn } from "./components/Header/index.js";
|
|
34
|
+
import { storefront as xn } from "./i18n/en.js";
|
|
35
|
+
import { storefront as Sn } from "./i18n/fr.js";
|
|
36
|
+
import { PoweredByLoczerBadge as Cn } from "./components/PoweredByLoczerBadge/index.js";
|
|
37
|
+
import { PlatformFooter as wn } from "./components/PlatformFooter/index.js";
|
|
38
|
+
import { useWhatsAppFloatingButton as Tn } from "./components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js";
|
|
39
|
+
import { WhatsAppFloatingButton as En } 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 { BookingMobileDateDrawer as
|
|
50
|
-
import { BookingPeriodSelector as
|
|
51
|
-
import { BookingFlowSteps as
|
|
52
|
-
import { Input as
|
|
53
|
-
import { DeliveryAddressSelector as
|
|
54
|
-
import { loader as
|
|
55
|
-
import { Form as
|
|
56
|
-
import { Textarea as
|
|
57
|
-
import { ContactSection as
|
|
58
|
-
import { TestimonialsSection as
|
|
59
|
-
import { AboutSection as
|
|
60
|
-
import { StepSectionTitle as
|
|
61
|
-
import { Card as
|
|
62
|
-
import { ProductWarningNotice as
|
|
63
|
-
import { StorefrontCartPanel as
|
|
64
|
-
import { ProductPriceBadge as
|
|
65
|
-
import { ContractSaleDocument as
|
|
41
|
+
import { Layout as Dn } from "./components/Layout/index.js";
|
|
42
|
+
import { DelayedPlaceholder as On, DelayedReveal as kn } from "./components/DelayedReveal/index.js";
|
|
43
|
+
import { BookingPeriodProvider as An, useBookingPeriod as jn } from "./components/BookingPeriodSelector/BookingPeriodContext.js";
|
|
44
|
+
import { Label as Mn } from "./ui/label.js";
|
|
45
|
+
import { BookingStartDateField as Nn } from "./components/BookingPeriodSelector/components/BookingStartDateField.js";
|
|
46
|
+
import { BookingStartTimeField as Pn } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
|
|
47
|
+
import { BookingEndDateField as Fn } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
|
|
48
|
+
import { BookingEndTimeField as In } from "./components/BookingPeriodSelector/components/BookingEndTimeField.js";
|
|
49
|
+
import { BookingMobileDateDrawer as Ln } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
|
|
50
|
+
import { BookingPeriodSelector as Rn } from "./components/BookingPeriodSelector/index.js";
|
|
51
|
+
import { BookingFlowSteps as zn } from "./components/BookingFlowSteps/index.js";
|
|
52
|
+
import { Input as Bn } from "./ui/input.js";
|
|
53
|
+
import { DeliveryAddressSelector as Vn } from "./components/DeliveryAddressSelector/index.js";
|
|
54
|
+
import { loader as Hn, useOptionalStorefront as Un, useStorefront as Wn, useStorefrontBookingProducts as Gn, useStorefrontConfig as Kn, useStorefrontProducts as qn, useStorefrontWorkspaceLanguage as Jn } from "./StorefrontProvider.js";
|
|
55
|
+
import { Form as Yn, FormControl as Xn, FormDescription as Zn, FormField as Qn, FormItem as $n, FormLabel as er, FormMessage as tr, useFormField as nr } from "./ui/form.js";
|
|
56
|
+
import { Textarea as rr } from "./ui/textarea.js";
|
|
57
|
+
import { ContactSection as ir } from "./components/ContactSection/index.js";
|
|
58
|
+
import { TestimonialsSection as ar } from "./components/TestimonialsSection/index.js";
|
|
59
|
+
import { AboutSection as or } from "./components/AboutSection/index.js";
|
|
60
|
+
import { StepSectionTitle as sr } from "./components/StepSectionTitle/index.js";
|
|
61
|
+
import { Card as cr, CardAction as lr, CardContent as ur, CardDescription as dr, CardFooter as fr, CardHeader as pr, CardTitle as mr } from "./ui/card.js";
|
|
62
|
+
import { ProductWarningNotice as hr } from "./components/ProductWarningNotice/index.js";
|
|
63
|
+
import { StorefrontCartPanel as gr } from "./components/StorefrontCartPanel/index.js";
|
|
64
|
+
import { ProductPriceBadge as _r } from "./components/ProductPriceBadge/index.js";
|
|
65
|
+
import { ContractSaleDocument as vr } from "./components/ContractSaleDocument/Invoice.js";
|
|
66
66
|
import "./components/ContractSaleDocument/index.js";
|
|
67
|
-
import { RadioGroup as
|
|
67
|
+
import { RadioGroup as yr, RadioGroupItem as br } from "./ui/radio-group.js";
|
|
68
68
|
import "./pages/HomePage.js";
|
|
69
69
|
import "./pages/BookingPage.js";
|
|
70
70
|
import "./pages/ProductPage.js";
|
|
71
71
|
import "./pages/CheckoutPage.js";
|
|
72
72
|
import "./pages/CheckoutSuccessPage.js";
|
|
73
73
|
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 {
|
|
74
|
+
import { accessories as xr } from "./data/accessories.js";
|
|
75
|
+
import Sr from "./data/bikes.js";
|
|
76
|
+
import { contractSaleDocumentAcceptanceLevelSchema as Cr, contractSaleDocumentAcceptanceRecordSchema as wr, contractSaleDocumentAcceptanceSchema as Tr, contractSaleDocumentAddressSchema as Er, contractSaleDocumentContactSchema as Dr, contractSaleDocumentKindSchema as Or, contractSaleDocumentLanguageCodeSchema as kr, contractSaleDocumentLanguageSchema as Ar, contractSaleDocumentLineItemSchema as jr, contractSaleDocumentSchema as Mr, contractSaleDocumentSignatureSchema as Nr } from "./lib/contractSaleDocument.js";
|
|
77
|
+
import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as Pr, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Fr, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Ir, acceptContractSaleDocumentRequestSchema as Lr, acceptContractSaleDocumentResponseSchema as Rr, contractSaleDocumentAcceptanceInputSchema as zr, contractSaleDocumentAcceptanceRecordInputSchema as Br, contractSaleDocumentApiAcceptanceRecordSchema as Vr, contractSaleDocumentApiAcceptanceSchema as Hr, contractSaleDocumentApiSchema as Ur, contractSaleDocumentApiSignatureSchema as Wr, contractSaleDocumentReferenceSchema as Gr, contractSaleDocumentReferenceTypeSchema as Kr, contractSaleDocumentSignatureInputSchema as qr, downloadContractSaleDocumentPdfRequestSchema as Jr, getContractSaleDocumentRequestSchema as Yr, getContractSaleDocumentResponseSchema as Xr } from "./lib/contractSaleDocumentApi.js";
|
|
78
|
+
import Zr from "./routes.js";
|
|
79
|
+
import { Select as Qr, SelectContent as $r, SelectGroup as ei, SelectIcon as ti, SelectItem as ni, SelectItemIndicator as ri, SelectItemText as ii, SelectLabel as ai, SelectScrollDownButton as oi, SelectScrollUpButton as si, SelectSeparator as ci, SelectTrigger as li, SelectValue as ui } from "./ui/select.js";
|
|
80
|
+
export { Pr as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, or as AboutSection, we as BOOKING_SEARCH_KEYS, gn as Badge, Fn as BookingEndDateField, In as BookingEndTimeField, zn as BookingFlowSteps, Ln as BookingMobileDateDrawer, An as BookingPeriodProvider, Rn as BookingPeriodSelector, Nn as BookingStartDateField, Pn as BookingStartTimeField, vn as Button, Ue as CATALOG_PRODUCT_BASE_RATE_UNSET, cr as Card, lr as CardAction, ur as CardContent, dr as CardDescription, fr as CardFooter, pr as CardHeader, mr as CardTitle, ir as ContactSection, vr as ContractSaleDocument, q as DEFAULT_BOOKING_DELIVERY_OPTION, R as DEFAULT_CANCELLATION_POLICY, z as DEFAULT_PAYMENT_POLICIES, Fr as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, On as DelayedPlaceholder, kn as DelayedReveal, Vn as DeliveryAddressSelector, hn as Footer, Yn as Form, Xn as FormControl, Zn as FormDescription, Qn as FormField, $n as FormItem, er as FormLabel, tr as FormMessage, Ir as GET_CONTRACT_SALE_DOCUMENT_ROUTE, bn as Header, Bn as Input, Mn as Label, Dn as Layout, p as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, m as PRODUCT_VARIANT_CODE_MAX_LENGTH, wn as PlatformFooter, Cn as PoweredByLoczerBadge, _r as ProductPriceBadge, hr as ProductWarningNotice, xt as ROUTE, yr as RadioGroup, br as RadioGroupItem, qt as STOREFRONT_AVAILABILITY_ROUTE, At as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, se as STOREFRONT_HERO_MODES, sn as STOREFRONT_IMAGE_ROUTE, It as STOREFRONT_PRODUCTS_ROUTE, un as STOREFRONT_TIME_SLOTS_ROUTE, Qr as Select, $r as SelectContent, ei as SelectGroup, ti as SelectIcon, ni as SelectItem, ri as SelectItemIndicator, ii as SelectItemText, ai as SelectLabel, oi as SelectScrollDownButton, si as SelectScrollUpButton, ci as SelectSeparator, li as SelectTrigger, ui as SelectValue, sr as StepSectionTitle, gr as StorefrontCartPanel, st as StorefrontCartProvider, Te as TIME_OPTIONS, ar as TestimonialsSection, rr as Textarea, En as WhatsAppFloatingButton, Lr as acceptContractSaleDocumentRequestSchema, Rr as acceptContractSaleDocumentResponseSchema, xr as accessories, h as accessoryProductSchema, Ee as applyBookingParamsToSearch, _n as badgeVariants, ne as baseAssetSchema, re as baseAssetStatusSchema, ie as baseBookingItemSchema, ae as baseBookingSchema, oe as baseBookingStateSchema, g as bikeProductSchema, Sr as bikes, J as bookingCustomerInputSchema, Y as bookingDeliveryOptionSchema, X as bookingScheduleInputSchema, mt as buildDailyPriceRows, ht as buildPriceTierLabels, Jt as buildStorefrontAvailabilityKey, bt as buildStorefrontCartSummary, cn as buildStorefrontImageUrl, We as buildStorefrontProductSlug, Ge as buildVariantStorefrontProductId, Dt as buildWhatsAppHref, yn as buttonVariants, gt as calculateDailyPriceForQuantity, B as cancellationPolicySchema, V as cancellationPolicyTierSchema, Z as cartItemInputSchema, ut as cn, Ke as compareCatalogProducts, qe as compareStorefrontAccessoryProducts, Je as compareStorefrontBikeProducts, zr as contractSaleDocumentAcceptanceInputSchema, Cr as contractSaleDocumentAcceptanceLevelSchema, Br as contractSaleDocumentAcceptanceRecordInputSchema, wr as contractSaleDocumentAcceptanceRecordSchema, Tr as contractSaleDocumentAcceptanceSchema, Er as contractSaleDocumentAddressSchema, Vr as contractSaleDocumentApiAcceptanceRecordSchema, Hr as contractSaleDocumentApiAcceptanceSchema, Ur as contractSaleDocumentApiSchema, Wr as contractSaleDocumentApiSignatureSchema, Dr as contractSaleDocumentContactSchema, Or as contractSaleDocumentKindSchema, kr as contractSaleDocumentLanguageCodeSchema, Ar as contractSaleDocumentLanguageSchema, jr as contractSaleDocumentLineItemSchema, Gr as contractSaleDocumentReferenceSchema, Kr as contractSaleDocumentReferenceTypeSchema, Mr as contractSaleDocumentSchema, qr as contractSaleDocumentSignatureInputSchema, Nr as contractSaleDocumentSignatureSchema, Q as createBookingInputBaseSchema, $ as createBookingInputSchema, De as createBookingPeriodConfigFromBookingEngineConfiguration, Oe as createBookingPeriodConfigFromShopConfiguration, ke as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, Yt as doesStorefrontAvailabilityDisplaySoldOut, Jr as downloadContractSaleDocumentPdfRequestSchema, _ as eBikeProductSchema, Ye as findStorefrontProduct, Xe as findStorefrontProductBySlug, dt as formatPriceMinor, wt as formatStorefrontPhoneDisplay, _t as formatStorefrontPriceMinor, U as fulfillmentModeSchema, ft as getAvailabilityVariant, Ae as getBookingDurationLabel, je as getBookingDurationMinutes, Me as getBookingParamsFromSearch, Ne as getBookingSessionStorageKey, Ze as getCatalogProductBaseRateMinor, Qe as getCatalogProductPaginationSort, $e as getCatalogProductSortFieldForPriceUnit, Yr as getContractSaleDocumentRequestSchema, Xr as getContractSaleDocumentResponseSchema, Pe as getDefaultBookingParams, Fe as getDefaultBookingParamsForStorefrontConfiguration, vt as getLocalizedEntry, t as getLocalizedStringValue, yt as getLocalizedValue, pt as getMinDayPriceMinor, Xt as getStorefrontAvailabilityIssue, Zt as getStorefrontAvailabilityStatus, et as getStorefrontBaseDailyRateMinor, tt as getStorefrontCheckoutProductId, nt as getStorefrontRepresentedVariantId, v as isProductVariantCodeIdentifierKind, Qt as isStorefrontAvailabilityInsufficient, k as isoDateSchema, Hn as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, H as paymentPoliciesSchema, Ie as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, y as productKindSchema, b as productSchema, x as productStorefrontDisplayModeSchema, S as productVariantAttributeSchema, C as productVariantCodeSchema, w as productVariantIdentifierSchema, T as productVariantSchema, $t as publicAvailabilityDisplayModeSchema, W as publicBookingEngineConfigurationSchema, G as publicCheckoutConfigurationSchema, K as publicCheckoutDynamicOptionsSchema, Le as readBookingSearchParamsFromSessionStorage, Re as readBookingSearchParamsFromStorage, St as requestSchema, ee as resolveBookingDeliveryOption, ze as resolveBookingSearchParams, Be as resolveBookingSearchParamsFromSessionStorage, ct as resolveStorefrontCartItemProduct, Tt as resolveStorefrontMapsHref, Et as resolveStorefrontPhoneContact, Ot as resolveStorefrontWhatsAppContact, kt as resolveStorefrontWhatsAppHref, Ct as responseSchema, E as richTextJsonDocSchema, D as richTextSchema, O as richTextVersionSchema, A as shopConfigurationSchema, j as shopExtraTimeSlotRuleSchema, M as shopOpeningDayIndexSchema, N as shopOpeningDaySchema, P as shopOpeningHoursOverrideSchema, F as shopOpeningHoursPeriodSchema, I as shopOpeningSlotSchema, nn as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, rn as storefrontAvailabilityProductSchema, en as storefrontAvailabilityRequestSchema, tn as storefrontAvailabilityResponseSchema, an as storefrontAvailabilityScheduleSchema, ce as storefrontCheckoutModeSchema, Nt as storefrontCheckoutSubmitDeliveryRefinement, Mt as storefrontCheckoutSubmitItemSchema, jt as storefrontCheckoutSubmitRequestBaseSchema, Pt as storefrontCheckoutSubmitRequestSchema, Ft as storefrontCheckoutSubmitResponseSchema, le as storefrontConfigurationSchema, ue as storefrontContentSchema, xn as storefrontEn, de as storefrontFaqItemSchema, fe as storefrontFaqSchema, Sn as storefrontFr, pe as storefrontFulfillmentModeSchema, me as storefrontHeroModeSchema, ln as storefrontImageRequestSchema, he as storefrontLocalizedRichTextSchema, ge as storefrontModalMessageSchema, _e as storefrontModulesSchema, Lt as storefrontProductsRequestSchema, Rt as storefrontProductsResponseSchema, zt as storefrontPublicAccessoryProductSchema, on as storefrontPublicAvailabilityRecordSchema, Bt as storefrontPublicBikeAvailabilityStatusSchema, Vt as storefrontPublicBikeProductSchema, Ht as storefrontPublicProductDisplayModeSchema, Ut as storefrontPublicProductPriceSchema, Wt as storefrontPublicProductVariantAttributeSchema, Gt as storefrontPublicProductVariantIdentifierSchema, Kt as storefrontPublicProductVariantSchema, ve as storefrontReviewsModuleSchema, ye as storefrontRichTextSchema, Zr as storefrontRoutes, be as storefrontSettingsSchema, xe as storefrontShopSchema, Se as storefrontStatusSchema, mn as storefrontTimeSlotJourneySchema, pn as storefrontTimeSlotSchema, dn as storefrontTimeSlotsRequestSchema, fn as storefrontTimeSlotsResponseSchema, Ce as storefrontWorkspaceSchema, L as timeOfDaySchema, rt as toStorefrontAccessoryProducts, it as toStorefrontBikeProducts, at as toStorefrontBookingProducts, ot as toStorefrontBookingProductsCollections, jn as useBookingPeriod, nr as useFormField, Un as useOptionalStorefront, Wn as useStorefront, Gn as useStorefrontBookingProducts, lt as useStorefrontCart, Kn as useStorefrontConfig, qn as useStorefrontProducts, Jn as useStorefrontWorkspaceLanguage, Tn as useWhatsAppFloatingButton, te as validateBookingDeliveryAddress, Ve as writeBookingSearchParamsToSessionStorage, He as writeBookingSearchParamsToStorage };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { StorefrontHeroMode } from '../storefrontSchemas';
|
|
2
|
+
export type PlaygroundHeroMode = StorefrontHeroMode;
|
|
2
3
|
export type PlaygroundDevSettings = {
|
|
3
|
-
heroMode: PlaygroundHeroMode;
|
|
4
|
+
heroMode: PlaygroundHeroMode | null;
|
|
4
5
|
};
|
|
5
6
|
export declare const DEFAULT_PLAYGROUND_DEV_SETTINGS: PlaygroundDevSettings;
|
|
6
7
|
export declare const isStorefrontPlaygroundRuntime: () => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playgroundDevSettings.d.ts","sourceRoot":"","sources":["../../src/lib/playgroundDevSettings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playgroundDevSettings.d.ts","sourceRoot":"","sources":["../../src/lib/playgroundDevSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAA;AAEnD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,qBAE7C,CAAA;AAgBD,eAAO,MAAM,6BAA6B,eAOzC,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAO,qBAc5C,CAAA;AAMD,eAAO,MAAM,0BAA0B,GAAI,cAAc,qBAAqB,SAsB7E,CAAA;AAED,eAAO,MAAM,0BAA0B,YAEtC,CAAA;AAED,eAAO,MAAM,wBAAwB,6BAkCpC,CAAA"}
|
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { STOREFRONT_HERO_MODES as e } from "../storefrontSchemas.js";
|
|
2
|
+
import { useEffect as t, useState as n } from "react";
|
|
2
3
|
//#region src/lib/playgroundDevSettings.ts
|
|
3
|
-
var
|
|
4
|
-
if (!e || typeof e != "object") return
|
|
4
|
+
var r = "__LOCZER_STOREFRONT_PLAYGROUND__", i = "loczer-storefront-playground-dev-settings", a = "loczer:storefront-playground-dev-settings", o = { heroMode: null }, s = (t) => e.some((e) => e === t), c = (e) => {
|
|
5
|
+
if (!e || typeof e != "object") return o;
|
|
5
6
|
let t = e;
|
|
6
|
-
return { heroMode: t.heroMode
|
|
7
|
-
},
|
|
8
|
-
if (typeof window > "u" || !
|
|
7
|
+
return { heroMode: s(t.heroMode) ? t.heroMode : null };
|
|
8
|
+
}, l = () => typeof window > "u" ? !1 : window[r] === !0, u = () => {
|
|
9
|
+
if (typeof window > "u" || !l()) return o;
|
|
9
10
|
try {
|
|
10
|
-
let e = window.localStorage.getItem(
|
|
11
|
-
return e ?
|
|
11
|
+
let e = window.localStorage.getItem(i);
|
|
12
|
+
return e ? c(JSON.parse(e)) : o;
|
|
12
13
|
} catch {
|
|
13
|
-
return
|
|
14
|
+
return o;
|
|
14
15
|
}
|
|
15
|
-
},
|
|
16
|
-
if (typeof window > "u" || !
|
|
17
|
-
let t =
|
|
16
|
+
}, d = (e) => e.heroMode === o.heroMode, f = (e) => {
|
|
17
|
+
if (typeof window > "u" || !l()) return;
|
|
18
|
+
let t = c(e);
|
|
18
19
|
try {
|
|
19
|
-
|
|
20
|
+
d(t) ? window.localStorage.removeItem(i) : window.localStorage.setItem(i, JSON.stringify(t));
|
|
20
21
|
} catch {}
|
|
21
22
|
try {
|
|
22
|
-
window.dispatchEvent(new CustomEvent(
|
|
23
|
+
window.dispatchEvent(new CustomEvent(a, { detail: t }));
|
|
23
24
|
} catch {}
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
let [
|
|
28
|
-
return
|
|
29
|
-
if (!
|
|
25
|
+
}, p = () => {
|
|
26
|
+
f(o);
|
|
27
|
+
}, m = () => {
|
|
28
|
+
let [e, r] = n(() => u());
|
|
29
|
+
return t(() => {
|
|
30
|
+
if (!l()) return;
|
|
30
31
|
let e = (e) => {
|
|
31
|
-
e.key ===
|
|
32
|
+
e.key === i && r(u());
|
|
32
33
|
}, t = (e) => {
|
|
33
34
|
let t = e;
|
|
34
35
|
if (t.detail) {
|
|
35
|
-
|
|
36
|
+
r(c(t.detail));
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
r(u());
|
|
39
40
|
};
|
|
40
|
-
return window.addEventListener("storage", e), window.addEventListener(
|
|
41
|
-
window.removeEventListener("storage", e), window.removeEventListener(
|
|
41
|
+
return window.addEventListener("storage", e), window.addEventListener(a, t), () => {
|
|
42
|
+
window.removeEventListener("storage", e), window.removeEventListener(a, t);
|
|
42
43
|
};
|
|
43
|
-
}, []),
|
|
44
|
+
}, []), e;
|
|
44
45
|
};
|
|
45
46
|
//#endregion
|
|
46
|
-
export {
|
|
47
|
+
export { o as DEFAULT_PLAYGROUND_DEV_SETTINGS, l as isStorefrontPlaygroundRuntime, u as readPlaygroundDevSettings, p as resetPlaygroundDevSettings, m as usePlaygroundDevSettings, f as writePlaygroundDevSettings };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"AA8GA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CAwrB/B"}
|