@loczer/storefront-sdk 0.241.0 → 0.243.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/chunks/pkg/booking-engine/dist/models/{Product.shared-VisFafx-.js → Product.shared-JIXwUVrg.js} +1 -1
  2. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-BuqI-BM_.js → base-asset-DtBfhenO.js} +1 -1
  3. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-gCY-ZP5p.js → base-booking-D9S-zS-D.js} +2 -2
  4. package/dist/chunks/pkg/booking-engine/dist/schemas/{base-product-r04ZJglB.js → base-product-Dj-bv0QD.js} +1 -1
  5. package/dist/chunks/pkg/booking-engine/dist/schemas/{cart-inputs-ps94yuAR.js → cart-inputs-CIeuiTzp.js} +1 -1
  6. package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-XwIj1m3Z.js → insurance-v2GZHSVq.js} +1 -1
  7. package/dist/chunks/pkg/booking-engine/dist/{schemas-7yx45S2o.js → schemas-B82mPOxs.js} +6 -6
  8. package/dist/components/Footer/businessHoursStatus.js +1 -1
  9. package/dist/i18n/en.d.ts +1 -0
  10. package/dist/i18n/en.d.ts.map +1 -1
  11. package/dist/i18n/en.js +2 -1
  12. package/dist/i18n/fr.d.ts +1 -0
  13. package/dist/i18n/fr.d.ts.map +1 -1
  14. package/dist/i18n/fr.js +2 -1
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.js +6 -6
  17. package/dist/lib/booking-period.js +1 -1
  18. package/dist/lib/booking.js +2 -2
  19. package/dist/lib/checkoutSubmit.d.ts +4 -0
  20. package/dist/lib/checkoutSubmit.d.ts.map +1 -1
  21. package/dist/lib/checkoutSubmit.js +19 -11
  22. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  23. package/dist/pages/CheckoutPage.js +199 -199
  24. package/dist/pages/CheckoutPaymentPage.d.ts.map +1 -1
  25. package/dist/pages/CheckoutPaymentPage.js +168 -167
  26. package/dist/pages/CheckoutSuccessPage.d.ts.map +1 -1
  27. package/dist/pages/CheckoutSuccessPage.js +37 -25
  28. package/dist/storefront.css +1 -1
  29. package/dist/storefrontSchemas.js +1 -1
  30. package/dist/ui/drawer.d.ts +12 -13
  31. package/dist/ui/drawer.d.ts.map +1 -1
  32. package/dist/ui/drawer.js +119 -143
  33. package/package.json +1 -1
@@ -12,7 +12,7 @@ var c = s.enum([
12
12
  ]), l = "bike", u = s.enum(["variant_selector", "variants_as_products"]), d = s.union([
13
13
  s.string().trim().url(),
14
14
  s.string().trim().regex(/^[a-f0-9]{24}$/i),
15
- s.string().trim().regex(/^\/catalog-demo\/[a-z0-9-]+\.svg$/)
15
+ s.string().trim().regex(/^\/catalog-demo\/[a-z0-9-]+\.(?:svg|webp)$/)
16
16
  ]), f = "variant_code", p = 3, m = s.string().trim().min(1, "Variant code is required").max(3, "Variant code must be 3 characters or less");
17
17
  function h(e) {
18
18
  return e.trim().toLowerCase() === f;
@@ -1,6 +1,6 @@
1
1
  import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n, objectIdStringSchema as r } from "../models/types-ynW5hdp8.js";
2
2
  import { productIdSchema as i } from "./product-id-ChdStzgp.js";
3
- import { productVariantIdentifierSchema as a } from "../models/Product.shared-VisFafx-.js";
3
+ import { productVariantIdentifierSchema as a } from "../models/Product.shared-JIXwUVrg.js";
4
4
  import { z as o } from "zod";
5
5
  //#region ../booking-engine/dist/schemas/base-asset.js
6
6
  var s = o.enum([
@@ -1,11 +1,11 @@
1
1
  import { identifierSchema as e, isoDateTimeSchema as t, objectIdStringSchema as n } from "../models/types-ynW5hdp8.js";
2
2
  import { moneyMinorSchema as r } from "./money-CVoCY4of.js";
3
3
  import { productIdSchema as i } from "./product-id-ChdStzgp.js";
4
- import { productKindSchema as a } from "../models/Product.shared-VisFafx-.js";
4
+ import { productKindSchema as a } from "../models/Product.shared-JIXwUVrg.js";
5
5
  import { bookingReferenceSchema as o } from "./booking-reference-DLKcpIa4.js";
6
6
  import { richTextSchema as s } from "./rich-text-DTRh7U3z.js";
7
7
  import { cancellationPolicySchema as c } from "./booking-engine-configuration-CxKlxKCo.js";
8
- import { bookingInsuranceSnapshotSchema as l } from "./insurance-XwIj1m3Z.js";
8
+ import { bookingInsuranceSnapshotSchema as l } from "./insurance-v2GZHSVq.js";
9
9
  import { z as u } from "zod";
10
10
  //#region ../booking-engine/dist/schemas/base-booking.js
11
11
  var d = u.enum([
@@ -1,4 +1,4 @@
1
1
  import "../models/LocalizedString-JmOX62C3.js";
2
2
  import "../models/Price-DCAgqkKh.js";
3
3
  import "./product-id-ChdStzgp.js";
4
- import "../models/Product.shared-VisFafx-.js";
4
+ import "../models/Product.shared-JIXwUVrg.js";
@@ -1,7 +1,7 @@
1
1
  import { identifierSchema as e } from "../models/types-ynW5hdp8.js";
2
2
  import { moneyMinorSchema as t } from "./money-CVoCY4of.js";
3
3
  import { productIdSchema as n } from "./product-id-ChdStzgp.js";
4
- import "../models/Product.shared-VisFafx-.js";
4
+ import "../models/Product.shared-JIXwUVrg.js";
5
5
  import { richTextSchema as r } from "./rich-text-DTRh7U3z.js";
6
6
  import { isoDateSchema as i, timeOfDaySchema as a } from "./shop-opening-hours-BlLD1gfz.js";
7
7
  import { fulfillmentModeSchema as o } from "./public-booking-engine-configuration-BwWn9aK0.js";
@@ -1,7 +1,7 @@
1
1
  import { identifierSchema as e, isoDateTimeSchema as t } from "../models/types-ynW5hdp8.js";
2
2
  import { moneyMinorSchema as n } from "./money-CVoCY4of.js";
3
3
  import { productIdSchema as r } from "./product-id-ChdStzgp.js";
4
- import { productKindSchema as i } from "../models/Product.shared-VisFafx-.js";
4
+ import { productKindSchema as i } from "../models/Product.shared-JIXwUVrg.js";
5
5
  import { z as a } from "zod";
6
6
  //#region ../booking-engine/dist/schemas/insurance.js
7
7
  var o = a.enum(["sharelock", "morio"]), s = a.enum(["storefront", "staff"]), c = a.object({
@@ -2,16 +2,16 @@ import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localize
2
2
  import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./schemas/money-CVoCY4of.js";
3
3
  import { priceSchema as d, priceUnitSchema as f } from "./models/Price-DCAgqkKh.js";
4
4
  import { productIdSchema as p } from "./schemas/product-id-ChdStzgp.js";
5
- import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./models/Product.shared-VisFafx-.js";
5
+ import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./models/Product.shared-JIXwUVrg.js";
6
6
  import { BOOKING_REFERENCE_COUNTER_MIN_DIGITS as k, BOOKING_REFERENCE_REGEX as A, BOOKING_REFERENCE_YEAR_MONTH_REGEX as j, bookingReferenceSchema as M, bookingReferenceYearMonthSchema as N, formatBookingReference as P, formatBookingReferenceYearMonth as F } from "./schemas/booking-reference-DLKcpIa4.js";
7
7
  import { richTextJsonDocSchema as I, richTextSchema as L, richTextVersionSchema as R } from "./schemas/rich-text-DTRh7U3z.js";
8
8
  import { isoDateSchema as z, shopConfigurationSchema as B, shopExtraTimeSlotRuleSchema as V, shopOpeningDayIndexSchema as H, shopOpeningDaySchema as U, shopOpeningHoursOverrideSchema as W, shopOpeningHoursPeriodSchema as G, shopOpeningSlotSchema as K, timeOfDaySchema as q } from "./schemas/shop-opening-hours-BlLD1gfz.js";
9
9
  import { DEFAULT_CANCELLATION_POLICY as J, DEFAULT_PAYMENT_POLICIES as Y, cancellationPolicySchema as X, cancellationPolicyTierSchema as Z, paymentPoliciesSchema as Q } from "./schemas/booking-engine-configuration-CxKlxKCo.js";
10
10
  import { fulfillmentModeSchema as $, publicBookingEngineConfigurationSchema as ee, publicCheckoutConfigurationSchema as te, publicCheckoutDynamicOptionsSchema as ne } from "./schemas/public-booking-engine-configuration-BwWn9aK0.js";
11
- import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./schemas/cart-inputs-ps94yuAR.js";
12
- import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./schemas/insurance-XwIj1m3Z.js";
11
+ import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./schemas/cart-inputs-CIeuiTzp.js";
12
+ import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./schemas/insurance-v2GZHSVq.js";
13
13
  import { resolveOpeningHoursForDate as ve, resolveOpeningHoursPeriodForDate as ye } from "./utils/opening-hours-period-TCyLhzZw.js";
14
- import "./schemas/base-product-r04ZJglB.js";
15
- import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./schemas/base-asset-BuqI-BM_.js";
16
- import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./schemas/base-booking-gCY-ZP5p.js";
14
+ import "./schemas/base-product-Dj-bv0QD.js";
15
+ import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./schemas/base-asset-DtBfhenO.js";
16
+ import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./schemas/base-booking-D9S-zS-D.js";
17
17
  export { k as BOOKING_REFERENCE_COUNTER_MIN_DIGITS, A as BOOKING_REFERENCE_REGEX, j as BOOKING_REFERENCE_YEAR_MONTH_REGEX, re as DEFAULT_BOOKING_DELIVERY_OPTION, J as DEFAULT_CANCELLATION_POLICY, Y as DEFAULT_PAYMENT_POLICIES, m as DEFAULT_PRODUCT_KIND, h as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, g as PRODUCT_VARIANT_CODE_MAX_LENGTH, _ as accessoryProductSchema, be as assetIdSchema, xe as baseAssetSchema, Se as baseAssetStatusSchema, Ce as baseBookingItemSchema, we as baseBookingSchema, Te as baseBookingStateSchema, v as bikeProductSchema, ie as bookingCustomerInputSchema, ae as bookingDeliveryOptionSchema, fe as bookingInsuranceConsentSourceSchema, pe as bookingInsuranceItemSnapshotSchema, me as bookingInsuranceSnapshotSchema, M as bookingReferenceSchema, N as bookingReferenceYearMonthSchema, oe as bookingScheduleInputSchema, he as buildBookingInsuranceSnapshot, ge as calculateInsuranceCalendarDays, X as cancellationPolicySchema, Z as cancellationPolicyTierSchema, se as cartItemInputSchema, ce as createBookingInputBaseSchema, le as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, y as eBikeProductSchema, P as formatBookingReference, F as formatBookingReferenceYearMonth, $ as fulfillmentModeSchema, t as getLocalizedStringValue, _e as insuranceProviderSchema, b as isProductVariantCodeIdentifierKind, z as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, Q as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, p as productIdSchema, x as productInsuranceSchema, S as productKindSchema, C as productSchema, w as productStorefrontDisplayModeSchema, T as productVariantAttributeSchema, E as productVariantCodeSchema, D as productVariantIdentifierSchema, O as productVariantSchema, ee as publicBookingEngineConfigurationSchema, te as publicCheckoutConfigurationSchema, ne as publicCheckoutDynamicOptionsSchema, ue as resolveBookingDeliveryOption, ve as resolveOpeningHoursForDate, ye as resolveOpeningHoursPeriodForDate, I as richTextJsonDocSchema, L as richTextSchema, R as richTextVersionSchema, B as shopConfigurationSchema, V as shopExtraTimeSlotRuleSchema, H as shopOpeningDayIndexSchema, U as shopOpeningDaySchema, W as shopOpeningHoursOverrideSchema, G as shopOpeningHoursPeriodSchema, K as shopOpeningSlotSchema, u as signedMoneyMinorSchema, q as timeOfDaySchema, de as validateBookingDeliveryAddress };
@@ -1,5 +1,5 @@
1
1
  import { resolveOpeningHoursForDate as e } from "../../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
2
- import "../../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
2
+ import "../../chunks/pkg/booking-engine/dist/schemas-B82mPOxs.js";
3
3
  import { businessDateStringToDate as t, calendarDateToBusinessDateString as n, instantToBusinessDateTimeParts as r, normalizeBusinessDateString as i, parseTimeToMinutes as a } from "../../lib/booking-period.js";
4
4
  //#region src/components/Footer/businessHoursStatus.ts
5
5
  var o = 370, s = (e, r) => {
package/dist/i18n/en.d.ts CHANGED
@@ -271,6 +271,7 @@ export declare const storefront: {
271
271
  checkout_submit: string;
272
272
  checkout_success_toast: string;
273
273
  checkout_success_title: string;
274
+ checkout_success_booking_number: string;
274
275
  checkout_success_description: string;
275
276
  checkout_success_back_to_products: string;
276
277
  checkout_success_back_home: string;
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAihBtB,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkhBtB,CAAA"}
package/dist/i18n/en.js CHANGED
@@ -272,7 +272,8 @@ var e = {
272
272
  checkout_submit: "Send booking request",
273
273
  checkout_success_toast: "Request sent.",
274
274
  checkout_success_title: "Request received",
275
- checkout_success_description: "Thanks, your booking request was sent.",
275
+ checkout_success_booking_number: "Here is your booking number:",
276
+ checkout_success_description: "A confirmation email has been sent to you.",
276
277
  checkout_success_back_to_products: "Back to bikes",
277
278
  checkout_success_back_home: "Back to home",
278
279
  checkout_payment_return_loading: "Checking payment status…",
package/dist/i18n/fr.d.ts CHANGED
@@ -272,6 +272,7 @@ export declare const storefront: {
272
272
  checkout_submit: string;
273
273
  checkout_success_toast: string;
274
274
  checkout_success_title: string;
275
+ checkout_success_booking_number: string;
275
276
  checkout_success_description: string;
276
277
  checkout_success_back_to_products: string;
277
278
  checkout_success_back_home: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkhBtB,CAAA"}
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmhBtB,CAAA"}
package/dist/i18n/fr.js CHANGED
@@ -273,7 +273,8 @@ var e = {
273
273
  checkout_submit: "Envoyer la demande de réservation",
274
274
  checkout_success_toast: "Demande envoyée.",
275
275
  checkout_success_title: "Demande reçue",
276
- checkout_success_description: "Merci, votre demande de réservation a bien été envoyée.",
276
+ checkout_success_booking_number: "Voici votre numéro de réservation :",
277
+ checkout_success_description: "Un e-mail de confirmation vous a été envoyé.",
277
278
  checkout_success_back_to_products: "Retour aux vélos",
278
279
  checkout_success_back_home: "Retour à l’accueil",
279
280
  checkout_payment_return_loading: "Vérification du statut du paiement…",
package/dist/index.d.ts CHANGED
@@ -4556,6 +4556,7 @@ export declare const storefrontEn: {
4556
4556
  checkout_submit: string;
4557
4557
  checkout_success_toast: string;
4558
4558
  checkout_success_title: string;
4559
+ checkout_success_booking_number: string;
4559
4560
  checkout_success_description: string;
4560
4561
  checkout_success_back_to_products: string;
4561
4562
  checkout_success_back_home: string;
@@ -5161,6 +5162,7 @@ export declare const storefrontFr: {
5161
5162
  checkout_submit: string;
5162
5163
  checkout_success_toast: string;
5163
5164
  checkout_success_title: string;
5165
+ checkout_success_booking_number: string;
5164
5166
  checkout_success_description: string;
5165
5167
  checkout_success_back_to_products: string;
5166
5168
  checkout_success_back_home: string;
package/dist/index.js CHANGED
@@ -3,18 +3,18 @@ import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localize
3
3
  import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./chunks/pkg/booking-engine/dist/schemas/money-CVoCY4of.js";
4
4
  import { priceSchema as d, priceUnitSchema as f } from "./chunks/pkg/booking-engine/dist/models/Price-DCAgqkKh.js";
5
5
  import { productIdSchema as p } from "./chunks/pkg/booking-engine/dist/schemas/product-id-ChdStzgp.js";
6
- import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./chunks/pkg/booking-engine/dist/models/Product.shared-VisFafx-.js";
6
+ import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./chunks/pkg/booking-engine/dist/models/Product.shared-JIXwUVrg.js";
7
7
  import { BOOKING_REFERENCE_COUNTER_MIN_DIGITS as k, BOOKING_REFERENCE_REGEX as A, BOOKING_REFERENCE_YEAR_MONTH_REGEX as j, bookingReferenceSchema as M, bookingReferenceYearMonthSchema as N, formatBookingReference as P, formatBookingReferenceYearMonth as F } from "./chunks/pkg/booking-engine/dist/schemas/booking-reference-DLKcpIa4.js";
8
8
  import { richTextJsonDocSchema as I, richTextSchema as L, richTextVersionSchema as R } from "./chunks/pkg/booking-engine/dist/schemas/rich-text-DTRh7U3z.js";
9
9
  import { isoDateSchema as z, shopConfigurationSchema as B, shopExtraTimeSlotRuleSchema as V, shopOpeningDayIndexSchema as H, shopOpeningDaySchema as U, shopOpeningHoursOverrideSchema as W, shopOpeningHoursPeriodSchema as G, shopOpeningSlotSchema as K, timeOfDaySchema as q } from "./chunks/pkg/booking-engine/dist/schemas/shop-opening-hours-BlLD1gfz.js";
10
10
  import { DEFAULT_CANCELLATION_POLICY as J, DEFAULT_PAYMENT_POLICIES as Y, cancellationPolicySchema as X, cancellationPolicyTierSchema as Z, paymentPoliciesSchema as Q } from "./chunks/pkg/booking-engine/dist/schemas/booking-engine-configuration-CxKlxKCo.js";
11
11
  import { fulfillmentModeSchema as $, publicBookingEngineConfigurationSchema as ee, publicCheckoutConfigurationSchema as te, publicCheckoutDynamicOptionsSchema as ne } from "./chunks/pkg/booking-engine/dist/schemas/public-booking-engine-configuration-BwWn9aK0.js";
12
- import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./chunks/pkg/booking-engine/dist/schemas/cart-inputs-ps94yuAR.js";
13
- import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./chunks/pkg/booking-engine/dist/schemas/insurance-XwIj1m3Z.js";
12
+ import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./chunks/pkg/booking-engine/dist/schemas/cart-inputs-CIeuiTzp.js";
13
+ import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./chunks/pkg/booking-engine/dist/schemas/insurance-v2GZHSVq.js";
14
14
  import { resolveOpeningHoursForDate as ve, resolveOpeningHoursPeriodForDate as ye } from "./chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
15
- import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./chunks/pkg/booking-engine/dist/schemas/base-asset-BuqI-BM_.js";
16
- import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./chunks/pkg/booking-engine/dist/schemas/base-booking-gCY-ZP5p.js";
17
- import "./chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
15
+ import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./chunks/pkg/booking-engine/dist/schemas/base-asset-DtBfhenO.js";
16
+ import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./chunks/pkg/booking-engine/dist/schemas/base-booking-D9S-zS-D.js";
17
+ import "./chunks/pkg/booking-engine/dist/schemas-B82mPOxs.js";
18
18
  import { STOREFRONT_HERO_MODES as Ee, storefrontCheckoutModeSchema as De, storefrontConfigurationSchema as Oe, storefrontContentSchema as ke, storefrontFaqAdditionalLinkSchema as Ae, storefrontFaqItemSchema as je, storefrontFaqSchema as Me, storefrontFulfillmentModeSchema as Ne, storefrontHeroModeSchema as Pe, storefrontInformationSchema as Fe, storefrontLocalizedRichTextSchema as Ie, storefrontModalMessageSchema as Le, storefrontModulesSchema as Re, storefrontReviewsModuleSchema as ze, storefrontRichTextSchema as Be, storefrontSettingsSchema as Ve, storefrontShopSchema as He, storefrontStatusSchema as Ue, storefrontWorkspaceSchema as We } from "./storefrontSchemas.js";
19
19
  import { BOOKING_SEARCH_KEYS as Ge, TIME_OPTIONS as Ke, applyBookingParamsToSearch as qe, createBookingPeriodConfigFromBookingEngineConfiguration as Je, createBookingPeriodConfigFromShopConfiguration as Ye, createBookingPeriodConfigFromStorefrontConfiguration as Xe, getBookingParamsFromSearch as Ze, getBookingSessionStorageKey as Qe, getDefaultBookingParams as $e, getDefaultBookingParamsForStorefrontConfiguration as et, pickBookingSearchParams as tt, readBookingSearchParamsFromSessionStorage as nt, readBookingSearchParamsFromStorage as rt, resolveBookingSearchParams as it, resolveBookingSearchParamsFromSessionStorage as at, writeBookingSearchParamsToSessionStorage as ot, writeBookingSearchParamsToStorage as st } from "./lib/booking.js";
20
20
  import { getLocalizedEntry as ct, getLocalizedValue as lt } from "./localization.js";
@@ -1,6 +1,6 @@
1
1
  import { __exportAll as e } from "../chunks/_virtual/_rolldown/runtime-B5ovbsoX.js";
2
2
  import { resolveOpeningHoursForDate as t } from "../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
3
- import "../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
3
+ import "../chunks/pkg/booking-engine/dist/schemas-B82mPOxs.js";
4
4
  //#region src/lib/booking-period.ts
5
5
  var n = /* @__PURE__ */ e({
6
6
  adjustBookingPeriod: () => M,
@@ -1,5 +1,5 @@
1
- import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-ps94yuAR.js";
2
- import "../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
1
+ import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-CIeuiTzp.js";
2
+ import "../chunks/pkg/booking-engine/dist/schemas-B82mPOxs.js";
3
3
  import { getDefaultBookingPeriod as t, parseTimeToMinutes as n } from "./booking-period.js";
4
4
  import { format as r } from "date-fns";
5
5
  //#region src/lib/booking.ts
@@ -1,5 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  export declare const ROUTE = "/api/public/storefront/checkout/submit";
3
+ export declare const CHECKOUT_BOOKING_NUMBER_SEARCH_PARAM = "booking_number";
4
+ export declare const parseCheckoutBookingNumber: (value: unknown) => string;
5
+ export declare const getCheckoutBookingNumberFromSearchParams: (searchParams: URLSearchParams) => string;
6
+ export declare const addCheckoutBookingNumberToPath: (path: string, bookingNumber: unknown) => string;
3
7
  export declare const requestCheckoutItemSchema: z.ZodObject<{
4
8
  kind: any;
5
9
  productId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"checkoutSubmit.d.ts","sourceRoot":"","sources":["../../src/lib/checkoutSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,eAAO,MAAM,KAAK,2CAA2C,CAAA;AAE7D,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAI3E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqB5B,CAAA;AAEF,eAAO,MAAM,yBAAyB,GACpC,SAAS;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EACxD,KAAK,CAAC,CAAC,aAAa,SAWrB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBxB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;iBAazB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"checkoutSubmit.d.ts","sourceRoot":"","sources":["../../src/lib/checkoutSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,eAAO,MAAM,KAAK,2CAA2C,CAAA;AAC7D,eAAO,MAAM,oCAAoC,mBAAmB,CAAA;AAEpE,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,MAG3D,CAAA;AAED,eAAO,MAAM,wCAAwC,GACnD,cAAc,eAAe,KAC5B,MAIF,CAAA;AAED,eAAO,MAAM,8BAA8B,GACzC,MAAM,MAAM,EACZ,eAAe,OAAO,KACrB,MAeF,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAI3E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqB5B,CAAA;AAEF,eAAO,MAAM,yBAAyB,GACpC,SAAS;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EACxD,KAAK,CAAC,CAAC,aAAa,SAWrB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBxB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;iBAazB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -1,16 +1,24 @@
1
- import { productKindSchema as e } from "../chunks/pkg/booking-engine/dist/models/Product.shared-VisFafx-.js";
1
+ import { productKindSchema as e } from "../chunks/pkg/booking-engine/dist/models/Product.shared-JIXwUVrg.js";
2
2
  import { bookingReferenceSchema as t } from "../chunks/pkg/booking-engine/dist/schemas/booking-reference-DLKcpIa4.js";
3
- import { DEFAULT_BOOKING_DELIVERY_OPTION as n, bookingScheduleInputSchema as r } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-ps94yuAR.js";
4
- import "../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
3
+ import { DEFAULT_BOOKING_DELIVERY_OPTION as n, bookingScheduleInputSchema as r } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-CIeuiTzp.js";
4
+ import "../chunks/pkg/booking-engine/dist/schemas-B82mPOxs.js";
5
5
  import { storefrontFulfillmentModeSchema as i } from "../storefrontSchemas.js";
6
6
  import { z as a } from "zod";
7
7
  //#region src/lib/checkoutSubmit.ts
8
- var o = "/api/public/storefront/checkout/submit", s = a.object({
8
+ var o = "/api/public/storefront/checkout/submit", s = "booking_number", c = (e) => {
9
+ let n = t.safeParse(e);
10
+ return n.success ? n.data : "";
11
+ }, l = (e) => c(e.get(s)), u = (e, t) => {
12
+ let n = c(t);
13
+ if (!n) return e;
14
+ let r = e.indexOf("#"), i = r >= 0 ? e.slice(0, r) : e, a = r >= 0 ? e.slice(r) : "", o = i.indexOf("?"), l = o >= 0 ? i.slice(0, o) : i, u = new URLSearchParams(o >= 0 ? i.slice(o + 1) : "");
15
+ return u.set(s, n), `${l}?${u.toString()}${a}`;
16
+ }, d = a.object({
9
17
  kind: e,
10
18
  productId: a.string().trim().min(1),
11
19
  productVariantId: a.string().trim().min(1).optional(),
12
20
  quantity: a.number().int().positive()
13
- }), c = a.object({
21
+ }), f = a.object({
14
22
  storeSlug: a.string().trim().min(1).toLowerCase(),
15
23
  checkoutSessionId: a.string().trim().min(1).max(256).optional(),
16
24
  replacesCheckoutSessionId: a.string().trim().min(1).max(256).optional(),
@@ -27,16 +35,16 @@ var o = "/api/public/storefront/checkout/submit", s = a.object({
27
35
  phone: a.string().trim().min(6),
28
36
  notes: a.string().trim().max(2e3).optional().or(a.literal(""))
29
37
  }),
30
- items: a.array(s).min(1),
38
+ items: a.array(d).min(1),
31
39
  nowIso: a.string().datetime({ offset: !0 }).optional()
32
- }), l = (e, t) => {
40
+ }), p = (e, t) => {
33
41
  e.fulfillment === "delivery" && (e.startAddress?.trim() || t.addIssue({
34
42
  code: a.ZodIssueCode.custom,
35
43
  message: "Delivery start address is required.",
36
44
  path: ["startAddress"]
37
45
  }));
38
- }, u = c.superRefine((e, t) => {
39
- l(e, t), e.replacesCheckoutSessionId && !e.checkoutSessionId && t.addIssue({
46
+ }, m = f.superRefine((e, t) => {
47
+ p(e, t), e.replacesCheckoutSessionId && !e.checkoutSessionId && t.addIssue({
40
48
  code: a.ZodIssueCode.custom,
41
49
  message: "A replacement checkout session requires a new checkout session id.",
42
50
  path: ["checkoutSessionId"]
@@ -45,7 +53,7 @@ var o = "/api/public/storefront/checkout/submit", s = a.object({
45
53
  message: "The new and replaced checkout session ids must differ.",
46
54
  path: ["replacesCheckoutSessionId"]
47
55
  });
48
- }), d = a.object({
56
+ }), h = a.object({
49
57
  success: a.boolean(),
50
58
  message: a.string().optional(),
51
59
  checkout: a.object({
@@ -58,4 +66,4 @@ var o = "/api/public/storefront/checkout/submit", s = a.object({
58
66
  }).optional()
59
67
  });
60
68
  //#endregion
61
- export { o as ROUTE, c as requestBaseSchema, s as requestCheckoutItemSchema, l as requestDeliveryRefinement, u as requestSchema, d as responseSchema };
69
+ export { s as CHECKOUT_BOOKING_NUMBER_SEARCH_PARAM, o as ROUTE, u as addCheckoutBookingNumberToPath, l as getCheckoutBookingNumberFromSearchParams, c as parseCheckoutBookingNumber, f as requestBaseSchema, d as requestCheckoutItemSchema, p as requestDeliveryRefinement, m as requestSchema, h as responseSchema };
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAsFA,MAAM,CAAC,OAAO,UAAU,YAAY,4CAwrBnC"}
1
+ {"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAuFA,MAAM,CAAC,OAAO,UAAU,YAAY,4CA2rBnC"}