@loczer/storefront-sdk 0.193.0 → 0.195.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/models/{Product.shared-cjcvMCMa.js → Product.shared-iVSHRdn4.js} +21 -21
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-CsOe0vXi.js → base-asset-BRQVuIes.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-Sjsqh31e.js → base-booking-Bhy2Kww1.js} +2 -2
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-product-C_ATjuc6.js → base-product-BJHQLX8t.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-B01h642r.js → insurance-CPeHsTss.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas-BfXM1Dgb.js +14 -0
- package/dist/chunks/pkg/ui/dist/{Button-CxG2fSpA.js → Button-Cr_u8vnh.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{Dialog-4leTWiev.js → Dialog-CczmPDwY.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Drawer/{index-DA5V7R_q.js → index-CSvSVP_J.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Map/{MapContent-BmKjdWmq.js → MapContent-CDeWtwKa.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{Map-CsOTdTtL.js → Map-Cs7wgtH9.js} +2 -2
- package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-CfEqkJ0y.js → MorphingModalWizard-j1CgFGLe.js} +4 -3
- package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-C6IWYoIg.js → ResponsiveDialog-BVwhTZQo.js} +3 -3
- package/dist/chunks/pkg/ui/dist/{ScrollArea-Bjwo84cv.js → ScrollArea-BqLd0xZj.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Spinner/{index-DzMEU0iA.js → index-Cgi70z_E.js} +1 -1
- package/dist/chunks/pkg/ui/dist/lib/utils-DXB19bzk.js +8 -0
- package/dist/components/BikeProductCard/index.js +6 -6
- package/dist/components/BookingBikeVariantDialog/index.js +7 -7
- package/dist/components/BookingFlowSteps/index.js +11 -11
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +36 -54
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +36 -54
- package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts +7 -0
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.js +27 -0
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts +36 -0
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +830 -0
- package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.d.ts +2 -0
- package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.js +21 -0
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +4 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +114 -110
- package/dist/components/ContactSection/index.js +35 -35
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +4 -4
- package/dist/components/ContractSaleDocument/ThumbnailSidebar.js +1 -1
- package/dist/components/DeliveryAddressSelector/index.js +5 -5
- package/dist/components/Footer/index.js +11 -11
- package/dist/components/FulfillmentSection/index.js +9 -9
- package/dist/components/Header/index.js +61 -61
- package/dist/components/Map/index.js +1 -1
- package/dist/components/PoweredByLoczerBadge/index.js +5 -5
- package/dist/components/ProductPriceBadge/index.js +73 -73
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +6 -6
- package/dist/components/StorefrontCartPanel/index.js +8 -8
- package/dist/components/StorefrontInsuranceNotice/index.js +6 -6
- package/dist/components/StorefrontPopupMessages/index.js +8 -8
- package/dist/components/payment/MollieCardFieldsForm.js +1 -1
- package/dist/components/payment/StripeCardFieldsForm.js +1 -1
- package/dist/index.d.ts +15 -3
- package/dist/index.js +70 -70
- package/dist/lib/booking.js +1 -1
- package/dist/lib/checkoutSubmit.js +2 -2
- package/dist/lib/utils.d.ts +3 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +9 -5
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +187 -159
- package/dist/pages/CheckoutPaymentPage.js +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +15 -15
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +263 -257
- package/dist/pages/PaymentLinkPage.js +1 -1
- package/dist/pages/PaymentLinkSuccessPage.js +1 -1
- package/dist/pages/ProductPage.js +143 -143
- package/dist/pages/checkout/components/CheckoutCouponCard.js +5 -5
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +1 -1
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.js +1 -1
- package/package.json +5 -1
- package/dist/chunks/node_modules/clsx/dist/clsx-CdyIqUTr.js +0 -16
- package/dist/chunks/node_modules/tailwind-merge/dist/bundle-mjs-CF4QheV5.js +0 -1608
- package/dist/chunks/pkg/booking-engine/dist/schemas-D_yUBLa0.js +0 -14
- package/dist/chunks/pkg/ui/dist/lib/utils-BN5KOMSm.js +0 -8
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts +0 -22
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts.map +0 -1
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.js +0 -333
|
@@ -8,45 +8,45 @@ var s = o.enum([
|
|
|
8
8
|
"bike",
|
|
9
9
|
"e-bike",
|
|
10
10
|
"accessory"
|
|
11
|
-
]), c = o.enum(["variant_selector", "variants_as_products"]),
|
|
12
|
-
function
|
|
13
|
-
return e.trim().toLowerCase() ===
|
|
11
|
+
]), c = "bike", l = o.enum(["variant_selector", "variants_as_products"]), u = o.union([o.string().trim().url(), o.string().trim().regex(/^[a-f0-9]{24}$/i)]), d = "variant_code", f = 3, p = o.string().trim().min(1, "Variant code is required").max(3, "Variant code must be 3 characters or less");
|
|
12
|
+
function m(e) {
|
|
13
|
+
return e.trim().toLowerCase() === d;
|
|
14
14
|
}
|
|
15
|
-
var
|
|
15
|
+
var h = o.object({
|
|
16
16
|
kind: e,
|
|
17
17
|
value: e
|
|
18
18
|
}).superRefine((e, t) => {
|
|
19
|
-
if (!
|
|
20
|
-
let n =
|
|
19
|
+
if (!m(e.kind)) return;
|
|
20
|
+
let n = p.safeParse(e.value);
|
|
21
21
|
if (!n.success) for (let e of n.error.issues) t.addIssue({
|
|
22
22
|
code: o.ZodIssueCode.custom,
|
|
23
23
|
path: ["value"],
|
|
24
24
|
message: e.message
|
|
25
25
|
});
|
|
26
|
-
}),
|
|
26
|
+
}), g = o.object({
|
|
27
27
|
key: e,
|
|
28
28
|
label: o.string().min(1).optional(),
|
|
29
29
|
value: o.string().min(1)
|
|
30
|
-
}),
|
|
30
|
+
}), _ = o.object({
|
|
31
31
|
id: e,
|
|
32
32
|
computedName: o.string().min(1),
|
|
33
|
-
attributes: o.array(
|
|
34
|
-
identifiers: o.array(
|
|
35
|
-
}),
|
|
33
|
+
attributes: o.array(g).default([]),
|
|
34
|
+
identifiers: o.array(h).default([])
|
|
35
|
+
}), v = o.object({
|
|
36
36
|
enabled: o.boolean().default(!1),
|
|
37
37
|
pricePerDayMinor: i.default(0),
|
|
38
38
|
deductibleAmountMinor: i.default(0),
|
|
39
39
|
insuredValueMinor: i.default(0)
|
|
40
|
-
}),
|
|
40
|
+
}), y = o.object({
|
|
41
41
|
_id: e,
|
|
42
42
|
kind: s,
|
|
43
43
|
name: r,
|
|
44
44
|
description: r.optional(),
|
|
45
45
|
warning: r.optional(),
|
|
46
|
-
images: o.array(
|
|
46
|
+
images: o.array(u).optional(),
|
|
47
47
|
prices: o.array(a).optional(),
|
|
48
48
|
depositAmount: i.default(0),
|
|
49
|
-
insurance:
|
|
49
|
+
insurance: v.default({
|
|
50
50
|
enabled: !1,
|
|
51
51
|
pricePerDayMinor: 0,
|
|
52
52
|
deductibleAmountMinor: 0,
|
|
@@ -54,17 +54,17 @@ var m = o.object({
|
|
|
54
54
|
}),
|
|
55
55
|
bufferStartMinutes: o.number().int().min(0).optional(),
|
|
56
56
|
bufferEndMinutes: o.number().int().min(0).optional(),
|
|
57
|
-
storefrontDisplayMode:
|
|
57
|
+
storefrontDisplayMode: l.default("variant_selector"),
|
|
58
58
|
createdAt: t,
|
|
59
59
|
updatedAt: t,
|
|
60
|
-
productVariants: o.array(
|
|
61
|
-
}),
|
|
60
|
+
productVariants: o.array(_).min(1)
|
|
61
|
+
}), b = y.extend({ features: n.optional() }), x = b.extend({ kind: o.literal("bike") }), S = b.extend({ kind: o.literal("e-bike") }), C = y.extend({
|
|
62
62
|
kind: o.literal("accessory"),
|
|
63
63
|
prices: o.array(a)
|
|
64
|
-
}),
|
|
65
|
-
b,
|
|
64
|
+
}), w = o.discriminatedUnion("kind", [
|
|
66
65
|
x,
|
|
67
|
-
S
|
|
66
|
+
S,
|
|
67
|
+
C
|
|
68
68
|
]);
|
|
69
69
|
//#endregion
|
|
70
|
-
export {
|
|
70
|
+
export { c as DEFAULT_PRODUCT_KIND, d as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, f as PRODUCT_VARIANT_CODE_MAX_LENGTH, C as accessoryProductSchema, x as bikeProductSchema, S as eBikeProductSchema, m as isProductVariantCodeIdentifierKind, v as productInsuranceSchema, s as productKindSchema, w as productSchema, l as productStorefrontDisplayModeSchema, g as productVariantAttributeSchema, p as productVariantCodeSchema, h as productVariantIdentifierSchema, _ as productVariantSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { productVariantIdentifierSchema as r } from "../models/Product.shared-iVSHRdn4.js";
|
|
3
3
|
import { z as i } from "zod";
|
|
4
4
|
//#region ../booking-engine/dist/schemas/base-asset.js
|
|
5
5
|
var a = i.enum([
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { identifierSchema as e, isoDateTimeSchema as t, objectIdStringSchema as n, ulidStringSchema as r } from "../models/types-rIp4ReXN.js";
|
|
2
2
|
import { moneyMinorSchema as i } from "./money-CVoCY4of.js";
|
|
3
|
-
import { productKindSchema as a } from "../models/Product.shared-
|
|
3
|
+
import { productKindSchema as a } from "../models/Product.shared-iVSHRdn4.js";
|
|
4
4
|
import { richTextSchema as o } from "./rich-text-DTRh7U3z.js";
|
|
5
5
|
import { cancellationPolicySchema as s } from "./booking-engine-configuration-LnrhShqm.js";
|
|
6
|
-
import { bookingInsuranceSnapshotSchema as c } from "./insurance-
|
|
6
|
+
import { bookingInsuranceSnapshotSchema as c } from "./insurance-CPeHsTss.js";
|
|
7
7
|
import { z as l } from "zod";
|
|
8
8
|
//#region ../booking-engine/dist/schemas/base-booking.js
|
|
9
9
|
var u = l.enum([
|
package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-B01h642r.js → insurance-CPeHsTss.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { identifierSchema as e, isoDateTimeSchema as t } from "../models/types-rIp4ReXN.js";
|
|
2
2
|
import { moneyMinorSchema as n } from "./money-CVoCY4of.js";
|
|
3
|
-
import { productKindSchema as r } from "../models/Product.shared-
|
|
3
|
+
import { productKindSchema as r } from "../models/Product.shared-iVSHRdn4.js";
|
|
4
4
|
import { z as i } from "zod";
|
|
5
5
|
//#region ../booking-engine/dist/schemas/insurance.js
|
|
6
6
|
var a = i.enum(["sharelock", "morio"]), o = i.enum(["storefront", "staff"]), s = i.object({
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localizedStringArraySchema as n, localizedStringEntrySchema as r, localizedStringSchema as i } from "./models/LocalizedString-D_TRgAdr.js";
|
|
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
|
+
import { priceSchema as d, priceUnitSchema as f } from "./models/Price-DCAgqkKh.js";
|
|
4
|
+
import { DEFAULT_PRODUCT_KIND as p, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as m, PRODUCT_VARIANT_CODE_MAX_LENGTH as h, accessoryProductSchema as g, bikeProductSchema as _, eBikeProductSchema as v, isProductVariantCodeIdentifierKind as y, productInsuranceSchema as b, productKindSchema as x, productSchema as S, productStorefrontDisplayModeSchema as C, productVariantAttributeSchema as w, productVariantCodeSchema as T, productVariantIdentifierSchema as E, productVariantSchema as D } from "./models/Product.shared-iVSHRdn4.js";
|
|
5
|
+
import { richTextJsonDocSchema as O, richTextSchema as k, richTextVersionSchema as A } from "./schemas/rich-text-DTRh7U3z.js";
|
|
6
|
+
import { isoDateSchema as j, shopConfigurationSchema as M, shopExtraTimeSlotRuleSchema as N, shopOpeningDayIndexSchema as P, shopOpeningDaySchema as F, shopOpeningHoursOverrideSchema as I, shopOpeningHoursPeriodSchema as L, shopOpeningSlotSchema as R, timeOfDaySchema as z } from "./schemas/shop-opening-hours-BlLD1gfz.js";
|
|
7
|
+
import { DEFAULT_CANCELLATION_POLICY as B, DEFAULT_PAYMENT_POLICIES as V, cancellationPolicySchema as H, cancellationPolicyTierSchema as U, paymentPoliciesSchema as W } from "./schemas/booking-engine-configuration-LnrhShqm.js";
|
|
8
|
+
import { fulfillmentModeSchema as G, publicBookingEngineConfigurationSchema as K, publicCheckoutConfigurationSchema as q, publicCheckoutDynamicOptionsSchema as J } from "./schemas/public-booking-engine-configuration-CEM9mexX.js";
|
|
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
|
+
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
|
+
import "./schemas/base-product-BJHQLX8t.js";
|
|
12
|
+
import { baseAssetSchema as ue, baseAssetStatusSchema as de } from "./schemas/base-asset-BRQVuIes.js";
|
|
13
|
+
import { baseBookingItemSchema as fe, baseBookingSchema as pe, baseBookingStateSchema as me } 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 baseAssetSchema, de as baseAssetStatusSchema, fe as baseBookingItemSchema, pe as baseBookingSchema, me 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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as e } from "./lib/utils-
|
|
1
|
+
import { cn as e } from "./lib/utils-DXB19bzk.js";
|
|
2
2
|
import { composeRefs as t, createAutoFocusHandler as n } from "./lib/slot-FQrvG282.js";
|
|
3
3
|
import { useBodyPointerEventsLock as r } from "./lib/body-pointer-events-DLBTed3C.js";
|
|
4
4
|
import { SsrHydratablePortal as i } from "./SsrHydratablePortal/index-eGyYZilF.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as e } from "../lib/utils-
|
|
1
|
+
import { cn as e } from "../lib/utils-DXB19bzk.js";
|
|
2
2
|
import { useBodyPointerEventsLock as t } from "../lib/body-pointer-events-DLBTed3C.js";
|
|
3
3
|
import { SsrHydratablePortal as n } from "../SsrHydratablePortal/index-eGyYZilF.js";
|
|
4
4
|
import * as r from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __toESM as e } from "../../../../_virtual/_rolldown/runtime-CkxIErRK.js";
|
|
2
|
-
import { cn as t } from "../lib/utils-
|
|
2
|
+
import { cn as t } from "../lib/utils-DXB19bzk.js";
|
|
3
3
|
import { DEFAULT_MAP_SKELETON_COLOR as n } from "./constants-BNmiJXfg.js";
|
|
4
4
|
import { DEFAULT_MAP_CENTER as r } from "../static/strings-1T2w7LqX.js";
|
|
5
5
|
import { classifyMapboxError as i, toSanitizedMapboxError as a } from "./mapboxError-oRn0l3EE.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as e } from "./lib/utils-
|
|
1
|
+
import { cn as e } from "./lib/utils-DXB19bzk.js";
|
|
2
2
|
import { isAutomationRuntime as t } from "./lib/isAutomationRuntime-CZ6KXlyz.js";
|
|
3
3
|
import { Suspense as n, lazy as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
4
4
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -14,7 +14,7 @@ var l = ({ className: t, style: n, color: r }) => /* @__PURE__ */ c("div", {
|
|
|
14
14
|
style: { backgroundColor: r ?? "rgb(201 221 176)" }
|
|
15
15
|
})
|
|
16
16
|
}), /* @__PURE__ */ s("div", { className: "h-full w-full transition-opacity duration-500 ease-out pointer-events-none opacity-0" })]
|
|
17
|
-
}), u = r(() => import("./Map/MapContent-
|
|
17
|
+
}), u = r(() => import("./Map/MapContent-CDeWtwKa.js")), d = (e) => {
|
|
18
18
|
let r = a(null), [c, d] = o(!1);
|
|
19
19
|
i(() => {
|
|
20
20
|
if (t()) return;
|
package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-CfEqkJ0y.js → MorphingModalWizard-j1CgFGLe.js}
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
1
|
+
import "./lib/utils-DXB19bzk.js";
|
|
2
|
+
import "./Dialog-CczmPDwY.js";
|
|
3
|
+
import "./ScrollArea-BqLd0xZj.js";
|
|
4
|
+
import "./Button-Cr_u8vnh.js";
|
|
4
5
|
import { createContext as e, useContext as t } from "react";
|
|
5
6
|
import "react/jsx-runtime";
|
|
6
7
|
import "lucide-react";
|
package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-C6IWYoIg.js → ResponsiveDialog-BVwhTZQo.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cn as e } from "./lib/utils-
|
|
2
|
-
import { Dialog as t, DialogClose as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, DialogTrigger as c } from "./Dialog-
|
|
3
|
-
import { Drawer as l, DrawerClose as u, DrawerContent as d, DrawerDescription as f, DrawerFooter as p, DrawerHeader as m, DrawerTitle as h, DrawerTrigger as g } from "./Drawer/index-
|
|
1
|
+
import { cn as e } from "./lib/utils-DXB19bzk.js";
|
|
2
|
+
import { Dialog as t, DialogClose as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, DialogTrigger as c } from "./Dialog-CczmPDwY.js";
|
|
3
|
+
import { Drawer as l, DrawerClose as u, DrawerContent as d, DrawerDescription as f, DrawerFooter as p, DrawerHeader as m, DrawerTitle as h, DrawerTrigger as g } from "./Drawer/index-CSvSVP_J.js";
|
|
4
4
|
import { useMediaQuery as _ } from "./lib/useMediaQuery-CrZFwD6A.js";
|
|
5
5
|
import * as v from "react";
|
|
6
6
|
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
@@ -5,13 +5,13 @@ import { Button as r } from "../../ui/button.js";
|
|
|
5
5
|
import { ProductPriceBadge as i } from "../ProductPriceBadge/index.js";
|
|
6
6
|
import { resolveProductImageContainerStyle as a } from "../../lib/productImageStyles.js";
|
|
7
7
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { Link as l } from "@rpcbase/router";
|
|
9
|
+
import { useTranslation as u } from "react-i18next";
|
|
10
|
+
import { cn as d } from "@rpcbase/ui";
|
|
11
11
|
import { ArrowRight as f, Bike as p } from "lucide-react";
|
|
12
12
|
//#region src/components/BikeProductCard/index.tsx
|
|
13
13
|
function m({ bike: m, detailsPath: h, productDetailsLinkState: g, actionLabelKey: _ = "product_cta", onAction: v, actionDisabled: y = !1, availabilityLabel: b, fallbackLanguage: x, variant: S = "default", testId: C }) {
|
|
14
|
-
let { t: w, i18n: T } =
|
|
14
|
+
let { t: w, i18n: T } = u(), E = t(m.name, T.language, x), D = t(m.description, T.language, x), O = typeof m.images?.[0] == "string" ? m.images[0].trim() : "", k = a(m.primaryImageStyle), A = e(m.availabilityStatus), j = S === "booking", M = m.availabilityStatus === "OUT_OF_STOCK";
|
|
15
15
|
return /* @__PURE__ */ c("div", {
|
|
16
16
|
className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
|
|
17
17
|
"data-testid": C,
|
|
@@ -20,7 +20,7 @@ function m({ bike: m, detailsPath: h, productDetailsLinkState: g, actionLabelKey
|
|
|
20
20
|
children: [/* @__PURE__ */ s("div", {
|
|
21
21
|
className: "w-24 shrink-0 sm:w-28",
|
|
22
22
|
children: /* @__PURE__ */ c("div", {
|
|
23
|
-
className:
|
|
23
|
+
className: d("relative h-full min-h-20 overflow-hidden rounded-xl", k.className),
|
|
24
24
|
style: k.style,
|
|
25
25
|
children: [O ? /* @__PURE__ */ s("img", {
|
|
26
26
|
src: O,
|
|
@@ -66,7 +66,7 @@ function m({ bike: m, detailsPath: h, productDetailsLinkState: g, actionLabelKey
|
|
|
66
66
|
className: "text-slate-400",
|
|
67
67
|
children: "·"
|
|
68
68
|
})] }),
|
|
69
|
-
/* @__PURE__ */ s(
|
|
69
|
+
/* @__PURE__ */ s(l, {
|
|
70
70
|
to: h,
|
|
71
71
|
state: g,
|
|
72
72
|
className: "text-xs font-medium text-slate-700 hover:text-slate-950",
|
|
@@ -3,7 +3,7 @@ import { getAvailabilityVariant as n } from "../../lib/utils.js";
|
|
|
3
3
|
import { getLocalizedValue as r } from "../../localization.js";
|
|
4
4
|
import { Badge as i } from "../../ui/badge.js";
|
|
5
5
|
import { Button as a } from "../../ui/button.js";
|
|
6
|
-
import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as o, ResponsiveDialog as s, ResponsiveDialogContent as c, ResponsiveDialogDescription as l, ResponsiveDialogFooter as u, ResponsiveDialogHeader as d, ResponsiveDialogTitle as f } from "../../chunks/pkg/ui/dist/ResponsiveDialog-
|
|
6
|
+
import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as o, ResponsiveDialog as s, ResponsiveDialogContent as c, ResponsiveDialogDescription as l, ResponsiveDialogFooter as u, ResponsiveDialogHeader as d, ResponsiveDialogTitle as f } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
|
|
7
7
|
import { Input as p } from "../../ui/input.js";
|
|
8
8
|
import { useStorefrontWorkspaceLanguage as m } from "../../StorefrontProvider.js";
|
|
9
9
|
import { ProductWarningNotice as h } from "../ProductWarningNotice/index.js";
|
|
@@ -11,13 +11,13 @@ import { ProductPriceBadge as g } from "../ProductPriceBadge/index.js";
|
|
|
11
11
|
import { resolveProductImageContainerStyle as _ } from "../../lib/productImageStyles.js";
|
|
12
12
|
import { useEffect as v, useState as y } from "react";
|
|
13
13
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { useMediaQuery as S } from "@rpcbase/client";
|
|
15
|
+
import { useTranslation as C } from "react-i18next";
|
|
16
|
+
import { cn as w } from "@rpcbase/ui";
|
|
17
17
|
import { Bike as T, CheckCircle2 as E, Plus as D } from "lucide-react";
|
|
18
18
|
//#region src/components/BookingBikeVariantDialog/index.tsx
|
|
19
19
|
function O({ open: p, product: O, onOpenChange: A, getVariantAvailabilityLabel: j, isVariantOutOfCapacity: M, addDisabled: N = !1, onAddVariant: P }) {
|
|
20
|
-
let { t: F, i18n: I } =
|
|
20
|
+
let { t: F, i18n: I } = C(), L = S(o), R = m(), [z, B] = y({});
|
|
21
21
|
if (v(() => {
|
|
22
22
|
!O || !p || B((O.productVariants ?? []).reduce((e, t) => (e[t.id] = 1, e), {}));
|
|
23
23
|
}, [p, O]), !O) return null;
|
|
@@ -57,7 +57,7 @@ function O({ open: p, product: O, onOpenChange: A, getVariantAvailabilityLabel:
|
|
|
57
57
|
className: "grid gap-4",
|
|
58
58
|
children: [
|
|
59
59
|
/* @__PURE__ */ b("div", {
|
|
60
|
-
className:
|
|
60
|
+
className: w("relative aspect-[1618/1000] overflow-hidden rounded-2xl", K.className),
|
|
61
61
|
style: K.style,
|
|
62
62
|
children: G ? /* @__PURE__ */ b("img", {
|
|
63
63
|
src: G,
|
|
@@ -140,7 +140,7 @@ function O({ open: p, product: O, onOpenChange: A, getVariantAvailabilityLabel:
|
|
|
140
140
|
let n = `storefront-booking-bike-dialog-variant-option-${O.id}-${e.id}`.toLowerCase(), { label: r, description: o } = t(e), s = z[e.id] ?? 1, c = M?.(e.id) === !0, l = j?.(e.id) ?? null;
|
|
141
141
|
return /* @__PURE__ */ x("div", {
|
|
142
142
|
"data-testid": n,
|
|
143
|
-
className:
|
|
143
|
+
className: w("flex flex-col gap-3 rounded-2xl border p-3 sm:flex-row sm:items-center sm:justify-between", "border-slate-200 bg-slate-50"),
|
|
144
144
|
children: [/* @__PURE__ */ x("div", {
|
|
145
145
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
146
146
|
children: [
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Link as n } from "@rpcbase/router";
|
|
3
|
+
import { useTranslation as r } from "react-i18next";
|
|
4
|
+
import { cn as i } from "@rpcbase/ui";
|
|
5
5
|
//#region src/components/BookingFlowSteps/index.tsx
|
|
6
|
-
var a = ({ index:
|
|
6
|
+
var a = ({ index: r, label: a, state: o, href: s }) => {
|
|
7
7
|
let c = /* @__PURE__ */ t("span", {
|
|
8
|
-
className:
|
|
8
|
+
className: i("inline-flex items-center gap-2 rounded-full border px-3 py-1.5 text-xs font-medium sm:text-sm", o === "active" && "border-slate-900 bg-slate-900 text-white", o === "done" && "border-slate-300 bg-white text-slate-900", o === "pending" && "border-slate-200 bg-slate-50 text-slate-500"),
|
|
9
9
|
children: [/* @__PURE__ */ e("span", {
|
|
10
|
-
className:
|
|
11
|
-
children:
|
|
10
|
+
className: i("inline-flex h-5 w-5 items-center justify-center rounded-full text-xs font-semibold", o === "active" && "bg-white/20 text-white", o === "done" && "bg-slate-100 text-slate-800", o === "pending" && "bg-slate-200 text-slate-600"),
|
|
11
|
+
children: r
|
|
12
12
|
}), /* @__PURE__ */ e("span", { children: a })]
|
|
13
13
|
});
|
|
14
|
-
return !s || o === "active" ? c : /* @__PURE__ */ e(
|
|
14
|
+
return !s || o === "active" ? c : /* @__PURE__ */ e(n, {
|
|
15
15
|
to: s,
|
|
16
16
|
className: "inline-flex",
|
|
17
17
|
children: c
|
|
18
18
|
});
|
|
19
|
-
}, o = ({ currentStep: n, bookingPath:
|
|
20
|
-
let { t: c } =
|
|
19
|
+
}, o = ({ currentStep: n, bookingPath: i, checkoutPath: o, checkoutEnabled: s = !0 }) => {
|
|
20
|
+
let { t: c } = r(), l = n === "booking" ? "active" : "done", u = n === "checkout" ? "active" : "pending";
|
|
21
21
|
return /* @__PURE__ */ t("div", {
|
|
22
22
|
className: "flex flex-wrap items-center gap-2",
|
|
23
23
|
children: [
|
|
@@ -25,7 +25,7 @@ var a = ({ index: i, label: a, state: o, href: s }) => {
|
|
|
25
25
|
index: 1,
|
|
26
26
|
label: c("flow_step_booking"),
|
|
27
27
|
state: l,
|
|
28
|
-
href: n === "checkout" ?
|
|
28
|
+
href: n === "checkout" ? i : void 0
|
|
29
29
|
}),
|
|
30
30
|
/* @__PURE__ */ e("span", {
|
|
31
31
|
className: "text-slate-300",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Content as e, Provider as t, Root as n, TooltipTrigger as r } from "../../../ui/tooltip.js";
|
|
2
2
|
import { useBookingPeriod as i } from "../BookingPeriodContext.js";
|
|
3
|
-
import { useMorphingModalWizardOverlayLayer as a } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-
|
|
3
|
+
import { useMorphingModalWizardOverlayLayer as a } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-j1CgFGLe.js";
|
|
4
4
|
import { DayPicker as o } from "../../../ui/day-picker.js";
|
|
5
5
|
import { Label as s } from "../../../ui/label.js";
|
|
6
6
|
import { BookingPeriodFieldErrorMessage as c } from "./BookingPeriodFieldErrorMessage.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingEndTimeField.d.ts","sourceRoot":"","sources":["../../../../src/components/BookingPeriodSelector/components/BookingEndTimeField.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,mBAAmB,+
|
|
1
|
+
{"version":3,"file":"BookingEndTimeField.d.ts","sourceRoot":"","sources":["../../../../src/components/BookingPeriodSelector/components/BookingEndTimeField.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,mBAAmB,+CAmJ/B,CAAA"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { useBookingPeriod as e } from "../BookingPeriodContext.js";
|
|
2
|
-
import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-
|
|
2
|
+
import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-j1CgFGLe.js";
|
|
3
3
|
import { Label as n } from "../../../ui/label.js";
|
|
4
4
|
import { BookingPeriodFieldErrorMessage as r } from "./BookingPeriodFieldErrorMessage.js";
|
|
5
|
-
import {
|
|
5
|
+
import { BookingHourPickerField as i } from "./internal/BookingHourPickerField.js";
|
|
6
6
|
import { useEffect as a, useRef as o } from "react";
|
|
7
7
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { cn as u } from "@rpcbase/ui";
|
|
9
9
|
//#region src/components/BookingPeriodSelector/components/BookingEndTimeField.tsx
|
|
10
|
-
var
|
|
10
|
+
var d = (e, t, n) => new Intl.NumberFormat(t, {
|
|
11
11
|
style: "currency",
|
|
12
12
|
currency: n,
|
|
13
13
|
minimumFractionDigits: 0,
|
|
14
14
|
maximumFractionDigits: 0
|
|
15
|
-
}).format(e / 100),
|
|
16
|
-
let { labels:
|
|
17
|
-
let t = !!
|
|
15
|
+
}).format(e / 100), f = () => {
|
|
16
|
+
let { labels: f, localeCode: p, currencyCode: m, endTime: h, selectEndTime: g, availableEndTimeSlots: _, endTimeSlotsStatus: v, isEndTimeSelectOpen: y, setIsEndTimeSelectOpen: b, labelClassName: x, inputClassName: S, buttonClassName: C, errors: w, isHydrated: T, startMinutesValue: E, isSameDaySelection: D, isEndToday: O, earliestMinutesForToday: k } = e(), A = _.map((e) => {
|
|
17
|
+
let t = !!D && E != null && e.startMinutes <= E, n = O && k != null && e.startMinutes < k, r = e.isDisabled || t || n, i = e.disabledReason === "closed" ? f.timeSlotClosedLabel ?? "Closed" : e.disabledReason, a = e.isExtra && e.extraAmount != null ? f.timeSlotExtraFee?.({ amount: d(e.extraAmount, p, m) }) ?? `Extra fee: ${d(e.extraAmount, p, m)}` : null, o = e.isDisabled && i ? i : null, u = a && o ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("span", {
|
|
18
18
|
className: "block",
|
|
19
19
|
children: a
|
|
20
20
|
}), /* @__PURE__ */ c("span", {
|
|
@@ -27,79 +27,61 @@ var f = (e, t, n) => new Intl.NumberFormat(t, {
|
|
|
27
27
|
disabled: r,
|
|
28
28
|
description: u
|
|
29
29
|
};
|
|
30
|
-
}),
|
|
30
|
+
}), j = A.some((e) => !e.disabled), M = v !== "local" && (v !== "ready" || !j), N = v === "loading" ? f.timeSlotsLoading : v === "error" ? f.timeSlotsLoadError : v === "ready" && !j ? f.timeSlotsUnavailable : f.endTime, P = A.find((e) => !e.disabled)?.value, F = o(h ?? P ?? null), I = t();
|
|
31
31
|
return a(() => {
|
|
32
|
-
|
|
32
|
+
y || (F.current = h ?? P ?? null);
|
|
33
33
|
}, [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
h,
|
|
35
|
+
P,
|
|
36
|
+
y
|
|
37
37
|
]), a(() => {
|
|
38
38
|
let e = document.getElementById("end-time-picker");
|
|
39
39
|
if (!(e instanceof HTMLInputElement)) return;
|
|
40
40
|
let t = (e) => {
|
|
41
|
-
if (e.key !== "Enter" || !
|
|
41
|
+
if (e.key !== "Enter" || !y) return;
|
|
42
42
|
e.preventDefault(), e.stopPropagation();
|
|
43
|
-
let t =
|
|
44
|
-
t &&
|
|
43
|
+
let t = F.current ?? h ?? P;
|
|
44
|
+
t && g(t);
|
|
45
45
|
};
|
|
46
46
|
return e.addEventListener("keydown", t, !0), () => {
|
|
47
47
|
e.removeEventListener("keydown", t, !0);
|
|
48
48
|
};
|
|
49
49
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
h,
|
|
51
|
+
P,
|
|
52
|
+
y,
|
|
53
|
+
g
|
|
54
54
|
]), /* @__PURE__ */ l("div", {
|
|
55
|
-
className: "group/form-item relative w-[150px]",
|
|
55
|
+
className: "group/form-item relative min-w-0 w-[150px] md:shrink-0",
|
|
56
56
|
children: [
|
|
57
57
|
/* @__PURE__ */ c(n, {
|
|
58
58
|
htmlFor: "end-time-picker",
|
|
59
|
-
className:
|
|
60
|
-
children: /* @__PURE__ */ c("span", { children:
|
|
59
|
+
className: u("mb-1 block text-sm font-medium", x),
|
|
60
|
+
children: /* @__PURE__ */ c("span", { children: f.endTime })
|
|
61
61
|
}),
|
|
62
|
-
|
|
62
|
+
/* @__PURE__ */ c(i, {
|
|
63
63
|
id: "end-time-picker",
|
|
64
|
-
placeholder:
|
|
65
|
-
value:
|
|
64
|
+
placeholder: N,
|
|
65
|
+
value: h ?? null,
|
|
66
66
|
onValueUpdate: (e) => {
|
|
67
|
-
e && (
|
|
67
|
+
e && (F.current = e);
|
|
68
68
|
},
|
|
69
69
|
onChange: (e) => {
|
|
70
|
-
e && (
|
|
70
|
+
e && (F.current = e, g(e));
|
|
71
71
|
},
|
|
72
|
-
options:
|
|
73
|
-
disabled:
|
|
74
|
-
open:
|
|
75
|
-
onOpenChange:
|
|
72
|
+
options: A,
|
|
73
|
+
disabled: M,
|
|
74
|
+
open: y,
|
|
75
|
+
onOpenChange: b,
|
|
76
76
|
triggerTestId: "end-time-trigger",
|
|
77
77
|
contentTestId: "end-time-select-content",
|
|
78
|
-
isHydrated:
|
|
79
|
-
inputClassName:
|
|
80
|
-
portalContainer:
|
|
81
|
-
}) : /* @__PURE__ */ c(u, {
|
|
82
|
-
id: "end-time-picker",
|
|
83
|
-
placeholder: P,
|
|
84
|
-
value: g ?? null,
|
|
85
|
-
onValueUpdate: (e) => {
|
|
86
|
-
e && (I.current = e);
|
|
87
|
-
},
|
|
88
|
-
onChange: (e) => {
|
|
89
|
-
e && (I.current = e, _(e));
|
|
90
|
-
},
|
|
91
|
-
options: j,
|
|
92
|
-
disabled: N,
|
|
93
|
-
open: b,
|
|
94
|
-
onOpenChange: x,
|
|
95
|
-
triggerTestId: "end-time-trigger",
|
|
96
|
-
contentTestId: "end-time-select-content",
|
|
97
|
-
isHydrated: E,
|
|
98
|
-
inputClassName: d(T.endTime && "border-destructive", C, w)
|
|
78
|
+
isHydrated: T,
|
|
79
|
+
inputClassName: u(w.endTime && "border-destructive", S, C),
|
|
80
|
+
portalContainer: I
|
|
99
81
|
}),
|
|
100
|
-
|
|
82
|
+
w.endTime && /* @__PURE__ */ c(r, { children: w.endTime })
|
|
101
83
|
]
|
|
102
84
|
});
|
|
103
85
|
};
|
|
104
86
|
//#endregion
|
|
105
|
-
export {
|
|
87
|
+
export { f as BookingEndTimeField };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBookingPeriod as e } from "../BookingPeriodContext.js";
|
|
2
|
-
import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-
|
|
2
|
+
import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-j1CgFGLe.js";
|
|
3
3
|
import { DayPicker as n } from "../../../ui/day-picker.js";
|
|
4
4
|
import { Label as r } from "../../../ui/label.js";
|
|
5
5
|
import { BookingPeriodFieldErrorMessage as i } from "./BookingPeriodFieldErrorMessage.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingStartTimeField.d.ts","sourceRoot":"","sources":["../../../../src/components/BookingPeriodSelector/components/BookingStartTimeField.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,qBAAqB,+
|
|
1
|
+
{"version":3,"file":"BookingStartTimeField.d.ts","sourceRoot":"","sources":["../../../../src/components/BookingPeriodSelector/components/BookingStartTimeField.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,qBAAqB,+CA6IjC,CAAA"}
|