@loczer/storefront-sdk 0.211.0 → 0.213.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/components/BikeProductCard/index.d.ts.map +1 -1
- package/dist/components/BikeProductCard/index.js +5 -5
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +5 -4
- package/dist/components/BookingFlowSteps/index.d.ts.map +1 -1
- package/dist/components/BookingFlowSteps/index.js +73 -32
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +16 -16
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +2 -2
- package/dist/components/BookingPeriodSelector/index.js +3 -3
- package/dist/components/FulfillmentSection/index.js +10 -4
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +205 -100
- package/dist/components/Layout/index.js +2 -2
- package/dist/components/ProductPriceBadge/index.js +16 -10
- package/dist/i18n/en.d.ts +7 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +7 -1
- package/dist/i18n/fr.d.ts +7 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +7 -1
- package/dist/index.d.ts +24 -4
- package/dist/lib/cart.d.ts +6 -2
- package/dist/lib/cart.d.ts.map +1 -1
- package/dist/lib/cart.js +45 -23
- package/dist/lib/checkoutSubmit.d.ts +3 -0
- package/dist/lib/checkoutSubmit.d.ts.map +1 -1
- package/dist/lib/checkoutSubmit.js +14 -2
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +7 -2
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +235 -245
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +252 -235
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3367,13 +3367,13 @@ export declare const storefrontButtonRadiusClassName = "rounded-[var(--storefron
|
|
|
3367
3367
|
declare type StorefrontCartContextValue = {
|
|
3368
3368
|
items: StorefrontCartItem[];
|
|
3369
3369
|
itemCount: number;
|
|
3370
|
-
checkoutSessionId?: string;
|
|
3371
3370
|
addItem: (item: Omit<StorefrontCartItem, "key"> & {
|
|
3372
3371
|
key?: string;
|
|
3373
3372
|
}) => void;
|
|
3374
3373
|
setQuantity: (key: string, quantity: number) => void;
|
|
3375
3374
|
removeItem: (key: string) => void;
|
|
3376
|
-
|
|
3375
|
+
beginCheckoutSubmission: () => StorefrontCheckoutSubmission;
|
|
3376
|
+
confirmCheckoutPaymentSession: (checkoutSessionId: string) => void;
|
|
3377
3377
|
clearCheckoutSession: () => void;
|
|
3378
3378
|
clear: () => void;
|
|
3379
3379
|
};
|
|
@@ -3447,6 +3447,11 @@ export declare const storefrontCheckoutModeSchema: z.ZodEnum<{
|
|
|
3447
3447
|
manual_approval_required: "manual_approval_required";
|
|
3448
3448
|
}>;
|
|
3449
3449
|
|
|
3450
|
+
declare type StorefrontCheckoutSubmission = {
|
|
3451
|
+
checkoutSessionId: string;
|
|
3452
|
+
replacesCheckoutSessionId?: string;
|
|
3453
|
+
};
|
|
3454
|
+
|
|
3450
3455
|
export declare const storefrontCheckoutSubmitDeliveryRefinement: (payload: {
|
|
3451
3456
|
fulfillment?: string;
|
|
3452
3457
|
startAddress?: string;
|
|
@@ -3464,6 +3469,7 @@ export declare const storefrontCheckoutSubmitItemSchema: z.ZodObject<{
|
|
|
3464
3469
|
export declare const storefrontCheckoutSubmitRequestBaseSchema: z.ZodObject<{
|
|
3465
3470
|
storeSlug: z.ZodString;
|
|
3466
3471
|
checkoutSessionId: z.ZodOptional<z.ZodString>;
|
|
3472
|
+
replacesCheckoutSessionId: z.ZodOptional<z.ZodString>;
|
|
3467
3473
|
schedule: z.ZodObject<{
|
|
3468
3474
|
startDate: z.ZodString;
|
|
3469
3475
|
endDate: z.ZodString;
|
|
@@ -3501,6 +3507,7 @@ export declare type StorefrontCheckoutSubmitRequestPayload = z.infer<typeof stor
|
|
|
3501
3507
|
export declare const storefrontCheckoutSubmitRequestSchema: z.ZodObject<{
|
|
3502
3508
|
storeSlug: z.ZodString;
|
|
3503
3509
|
checkoutSessionId: z.ZodOptional<z.ZodString>;
|
|
3510
|
+
replacesCheckoutSessionId: z.ZodOptional<z.ZodString>;
|
|
3504
3511
|
schedule: z.ZodObject<{
|
|
3505
3512
|
startDate: z.ZodString;
|
|
3506
3513
|
endDate: z.ZodString;
|
|
@@ -3545,6 +3552,7 @@ export declare const storefrontCheckoutSubmitResponseSchema: z.ZodObject<{
|
|
|
3545
3552
|
nextPath: z.ZodString;
|
|
3546
3553
|
successPath: z.ZodString;
|
|
3547
3554
|
requiresPayment: z.ZodBoolean;
|
|
3555
|
+
checkoutSessionId: z.ZodOptional<z.ZodString>;
|
|
3548
3556
|
}, z.core.$strip>>;
|
|
3549
3557
|
}, z.core.$strip>;
|
|
3550
3558
|
|
|
@@ -3995,6 +4003,10 @@ export declare const storefrontEn: {
|
|
|
3995
4003
|
nav_contact: string;
|
|
3996
4004
|
language_toggle: string;
|
|
3997
4005
|
cta_book_now: string;
|
|
4006
|
+
cta_book_short: string;
|
|
4007
|
+
mobile_menu_open: string;
|
|
4008
|
+
mobile_menu_close: string;
|
|
4009
|
+
mobile_menu_label: string;
|
|
3998
4010
|
cart_button: string;
|
|
3999
4011
|
checkout_button: string;
|
|
4000
4012
|
storefront_popup_title_fallback: string;
|
|
@@ -4059,7 +4071,9 @@ export declare const storefrontEn: {
|
|
|
4059
4071
|
booking_time_slots_required: string;
|
|
4060
4072
|
booking_selected_days_tooltip_one: string;
|
|
4061
4073
|
booking_selected_days_tooltip_other: string;
|
|
4062
|
-
|
|
4074
|
+
booking_rental_period: string;
|
|
4075
|
+
booking_date_drawer_continue: string;
|
|
4076
|
+
booking_date_drawer_close: string;
|
|
4063
4077
|
booking_submit: string;
|
|
4064
4078
|
flow_step_booking: string;
|
|
4065
4079
|
flow_step_checkout: string;
|
|
@@ -4523,6 +4537,10 @@ export declare const storefrontFr: {
|
|
|
4523
4537
|
nav_contact: string;
|
|
4524
4538
|
language_toggle: string;
|
|
4525
4539
|
cta_book_now: string;
|
|
4540
|
+
cta_book_short: string;
|
|
4541
|
+
mobile_menu_open: string;
|
|
4542
|
+
mobile_menu_close: string;
|
|
4543
|
+
mobile_menu_label: string;
|
|
4526
4544
|
cart_button: string;
|
|
4527
4545
|
checkout_button: string;
|
|
4528
4546
|
storefront_popup_title_fallback: string;
|
|
@@ -4587,7 +4605,9 @@ export declare const storefrontFr: {
|
|
|
4587
4605
|
booking_time_slots_required: string;
|
|
4588
4606
|
booking_selected_days_tooltip_one: string;
|
|
4589
4607
|
booking_selected_days_tooltip_other: string;
|
|
4590
|
-
|
|
4608
|
+
booking_rental_period: string;
|
|
4609
|
+
booking_date_drawer_continue: string;
|
|
4610
|
+
booking_date_drawer_close: string;
|
|
4591
4611
|
booking_submit: string;
|
|
4592
4612
|
flow_step_booking: string;
|
|
4593
4613
|
flow_step_checkout: string;
|
package/dist/lib/cart.d.ts
CHANGED
|
@@ -7,16 +7,20 @@ export type StorefrontCartItem = {
|
|
|
7
7
|
productVariantId?: string;
|
|
8
8
|
quantity: number;
|
|
9
9
|
};
|
|
10
|
+
type StorefrontCheckoutSubmission = {
|
|
11
|
+
checkoutSessionId: string;
|
|
12
|
+
replacesCheckoutSessionId?: string;
|
|
13
|
+
};
|
|
10
14
|
type StorefrontCartContextValue = {
|
|
11
15
|
items: StorefrontCartItem[];
|
|
12
16
|
itemCount: number;
|
|
13
|
-
checkoutSessionId?: string;
|
|
14
17
|
addItem: (item: Omit<StorefrontCartItem, "key"> & {
|
|
15
18
|
key?: string;
|
|
16
19
|
}) => void;
|
|
17
20
|
setQuantity: (key: string, quantity: number) => void;
|
|
18
21
|
removeItem: (key: string) => void;
|
|
19
|
-
|
|
22
|
+
beginCheckoutSubmission: () => StorefrontCheckoutSubmission;
|
|
23
|
+
confirmCheckoutPaymentSession: (checkoutSessionId: string) => void;
|
|
20
24
|
clearCheckoutSession: () => void;
|
|
21
25
|
clear: () => void;
|
|
22
26
|
};
|
package/dist/lib/cart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../src/lib/cart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE5G,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EACnC,MAAM,YAAY,CAAA;AAGnB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAA;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;
|
|
1
|
+
{"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../src/lib/cart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE5G,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EACnC,MAAM,YAAY,CAAA;AAGnB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAA;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AASD,KAAK,4BAA4B,GAAG;IAClC,iBAAiB,EAAE,MAAM,CAAA;IACzB,yBAAyB,CAAC,EAAE,MAAM,CAAA;CACnC,CAAA;AAED,KAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC3E,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACpD,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;IAC3D,6BAA6B,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,IAAI,CAAA;IAClE,oBAAoB,EAAE,MAAM,IAAI,CAAA;IAChC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAiBD,eAAO,MAAM,gCAAgC,GAC3C,MAAM,kBAAkB,EACxB,UAAU,6BAA6B,KACtC,iBAAiB,GAAG,IAQtB,CAAA;AAmED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,6BAA6B,CAAA;IACvC,QAAQ,EAAE,SAAS,CAAA;CACpB,2CA8KA;AAED,eAAO,MAAM,iBAAiB,kCAM7B,CAAA"}
|
package/dist/lib/cart.js
CHANGED
|
@@ -14,7 +14,7 @@ var c = t(void 0), l = "loczer.storefront.cart.v5", u = () => globalThis.crypto?
|
|
|
14
14
|
}, m = (e) => {
|
|
15
15
|
if (!e) return { items: [] };
|
|
16
16
|
try {
|
|
17
|
-
let t = JSON.parse(e), n = typeof t.checkoutSessionId == "string" ? t.checkoutSessionId.trim() : "";
|
|
17
|
+
let t = JSON.parse(e), n = typeof t.checkoutSessionId == "string" ? t.checkoutSessionId.trim() : "", r = t.checkoutSessionStage === "submitting" ? "submitting" : n ? "payment" : void 0, i = r === "submitting" && typeof t.replacesCheckoutSessionId == "string" ? t.replacesCheckoutSessionId.trim() : "";
|
|
18
18
|
return {
|
|
19
19
|
items: (Array.isArray(t.items) ? t.items : []).map((e) => {
|
|
20
20
|
let t = e ?? {}, n = t.kind === "accessory" ? "accessory" : t.kind === "e-bike" ? "e-bike" : t.kind === "bike" ? "bike" : null, r = typeof t.productId == "string" ? t.productId.trim() : "", i = typeof t.productVariantId == "string" ? t.productVariantId.trim() : "", a = typeof t.quantity == "number" ? Math.floor(t.quantity) : 0;
|
|
@@ -30,7 +30,9 @@ var c = t(void 0), l = "loczer.storefront.cart.v5", u = () => globalThis.crypto?
|
|
|
30
30
|
...o
|
|
31
31
|
};
|
|
32
32
|
}).filter((e) => e !== null),
|
|
33
|
-
...n ? { checkoutSessionId: n } : {}
|
|
33
|
+
...n ? { checkoutSessionId: n } : {},
|
|
34
|
+
...r ? { checkoutSessionStage: r } : {},
|
|
35
|
+
...i && i !== n ? { replacesCheckoutSessionId: i } : {}
|
|
34
36
|
};
|
|
35
37
|
} catch {
|
|
36
38
|
return { items: [] };
|
|
@@ -107,43 +109,63 @@ function h({ storeSlug: e, products: t, children: r }) {
|
|
|
107
109
|
}));
|
|
108
110
|
}, []), w = n(() => {
|
|
109
111
|
let e = _.checkoutSessionId?.trim();
|
|
110
|
-
if (e) return
|
|
112
|
+
if (e && _.checkoutSessionStage === "submitting") return {
|
|
113
|
+
checkoutSessionId: e,
|
|
114
|
+
..._.replacesCheckoutSessionId ? { replacesCheckoutSessionId: _.replacesCheckoutSessionId } : {}
|
|
115
|
+
};
|
|
111
116
|
let t = u(), n = {
|
|
112
|
-
|
|
113
|
-
checkoutSessionId: t
|
|
117
|
+
items: _.items,
|
|
118
|
+
checkoutSessionId: t,
|
|
119
|
+
checkoutSessionStage: "submitting",
|
|
120
|
+
...e ? { replacesCheckoutSessionId: e } : {}
|
|
121
|
+
};
|
|
122
|
+
return v(n), typeof window < "u" && window.localStorage.setItem(f, JSON.stringify(n)), {
|
|
123
|
+
checkoutSessionId: t,
|
|
124
|
+
...e ? { replacesCheckoutSessionId: e } : {}
|
|
114
125
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
126
|
+
}, [_, f]), T = n((e) => {
|
|
127
|
+
let t = e.trim();
|
|
128
|
+
t && v((e) => {
|
|
129
|
+
let n = {
|
|
130
|
+
items: e.items,
|
|
131
|
+
checkoutSessionId: t,
|
|
132
|
+
checkoutSessionStage: "payment"
|
|
133
|
+
};
|
|
134
|
+
return typeof window < "u" && window.localStorage.setItem(f, JSON.stringify(n)), n;
|
|
135
|
+
});
|
|
136
|
+
}, [f]), E = n(() => {
|
|
137
|
+
v((e) => {
|
|
138
|
+
let t = { items: e.items };
|
|
139
|
+
return typeof window < "u" && window.localStorage.setItem(f, JSON.stringify(t)), t;
|
|
140
|
+
});
|
|
141
|
+
}, [f]), D = n(() => {
|
|
120
142
|
v({ items: [] });
|
|
121
|
-
}, []),
|
|
143
|
+
}, []), O = p(_.items, {
|
|
122
144
|
bikes: y,
|
|
123
145
|
accessories: b
|
|
124
|
-
}),
|
|
125
|
-
items:
|
|
126
|
-
itemCount:
|
|
127
|
-
checkoutSessionId: _.checkoutSessionId,
|
|
146
|
+
}), k = O.reduce((e, t) => e + t.quantity, 0), A = a(() => ({
|
|
147
|
+
items: O,
|
|
148
|
+
itemCount: k,
|
|
128
149
|
addItem: x,
|
|
129
150
|
setQuantity: S,
|
|
130
151
|
removeItem: C,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
152
|
+
beginCheckoutSubmission: w,
|
|
153
|
+
confirmCheckoutPaymentSession: T,
|
|
154
|
+
clearCheckoutSession: E,
|
|
155
|
+
clear: D
|
|
134
156
|
}), [
|
|
135
157
|
x,
|
|
158
|
+
w,
|
|
159
|
+
D,
|
|
136
160
|
E,
|
|
137
161
|
T,
|
|
138
|
-
|
|
162
|
+
k,
|
|
139
163
|
O,
|
|
140
|
-
D,
|
|
141
164
|
C,
|
|
142
|
-
S
|
|
143
|
-
_.checkoutSessionId
|
|
165
|
+
S
|
|
144
166
|
]);
|
|
145
167
|
return /* @__PURE__ */ s(c.Provider, {
|
|
146
|
-
value:
|
|
168
|
+
value: A,
|
|
147
169
|
children: r
|
|
148
170
|
});
|
|
149
171
|
}
|
|
@@ -12,6 +12,7 @@ export type RequestCheckoutItem = z.infer<typeof requestCheckoutItemSchema>;
|
|
|
12
12
|
export declare const requestBaseSchema: z.ZodObject<{
|
|
13
13
|
storeSlug: z.ZodString;
|
|
14
14
|
checkoutSessionId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
replacesCheckoutSessionId: z.ZodOptional<z.ZodString>;
|
|
15
16
|
schedule: z.ZodObject<{
|
|
16
17
|
startDate: z.ZodString;
|
|
17
18
|
endDate: z.ZodString;
|
|
@@ -50,6 +51,7 @@ export declare const requestDeliveryRefinement: (payload: {
|
|
|
50
51
|
export declare const requestSchema: z.ZodObject<{
|
|
51
52
|
storeSlug: z.ZodString;
|
|
52
53
|
checkoutSessionId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
replacesCheckoutSessionId: z.ZodOptional<z.ZodString>;
|
|
53
55
|
schedule: z.ZodObject<{
|
|
54
56
|
startDate: z.ZodString;
|
|
55
57
|
endDate: z.ZodString;
|
|
@@ -92,6 +94,7 @@ export declare const responseSchema: z.ZodObject<{
|
|
|
92
94
|
nextPath: z.ZodString;
|
|
93
95
|
successPath: z.ZodString;
|
|
94
96
|
requiresPayment: z.ZodBoolean;
|
|
97
|
+
checkoutSessionId: z.ZodOptional<z.ZodString>;
|
|
95
98
|
}, z.core.$strip>>;
|
|
96
99
|
}, z.core.$strip>;
|
|
97
100
|
export type ResponsePayload = z.infer<typeof responseSchema>;
|
|
@@ -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;AAQvB,OAAO,EAEL,0CAA0C,EAC3C,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,0CAA0C,EAAE,CAAA;AAGrD,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
|
|
1
|
+
{"version":3,"file":"checkoutSubmit.d.ts","sourceRoot":"","sources":["../../src/lib/checkoutSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,OAAO,EAEL,0CAA0C,EAC3C,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,0CAA0C,EAAE,CAAA;AAGrD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+B5B,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;;;;;;;;;;;;iBAczB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -13,6 +13,7 @@ var s = "/api/public/storefront/checkout/submit", c = o.object({
|
|
|
13
13
|
}), l = o.object({
|
|
14
14
|
storeSlug: o.string().trim().min(1).toLowerCase(),
|
|
15
15
|
checkoutSessionId: o.string().trim().min(1).max(256).optional(),
|
|
16
|
+
replacesCheckoutSessionId: o.string().trim().min(1).max(256).optional(),
|
|
16
17
|
schedule: n,
|
|
17
18
|
fulfillment: r.default(t),
|
|
18
19
|
startAddress: o.string().trim().max(500).optional(),
|
|
@@ -42,7 +43,17 @@ var s = "/api/public/storefront/checkout/submit", c = o.object({
|
|
|
42
43
|
message: "Delivery start address is required.",
|
|
43
44
|
path: ["startAddress"]
|
|
44
45
|
}));
|
|
45
|
-
}, d = l.superRefine(
|
|
46
|
+
}, d = l.superRefine((e, t) => {
|
|
47
|
+
u(e, t), e.replacesCheckoutSessionId && !e.checkoutSessionId && t.addIssue({
|
|
48
|
+
code: o.ZodIssueCode.custom,
|
|
49
|
+
message: "A replacement checkout session requires a new checkout session id.",
|
|
50
|
+
path: ["checkoutSessionId"]
|
|
51
|
+
}), e.checkoutSessionId && e.replacesCheckoutSessionId === e.checkoutSessionId && t.addIssue({
|
|
52
|
+
code: o.ZodIssueCode.custom,
|
|
53
|
+
message: "The new and replaced checkout session ids must differ.",
|
|
54
|
+
path: ["replacesCheckoutSessionId"]
|
|
55
|
+
});
|
|
56
|
+
}), f = o.object({
|
|
46
57
|
success: o.boolean(),
|
|
47
58
|
message: o.string().optional(),
|
|
48
59
|
errorCode: a.optional(),
|
|
@@ -51,7 +62,8 @@ var s = "/api/public/storefront/checkout/submit", c = o.object({
|
|
|
51
62
|
saleId: o.string().trim().min(1),
|
|
52
63
|
nextPath: o.string().trim().min(1),
|
|
53
64
|
successPath: o.string().trim().min(1),
|
|
54
|
-
requiresPayment: o.boolean()
|
|
65
|
+
requiresPayment: o.boolean(),
|
|
66
|
+
checkoutSessionId: o.string().trim().min(1).max(256).optional()
|
|
55
67
|
}).optional()
|
|
56
68
|
});
|
|
57
69
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingPage.d.ts","sourceRoot":"","sources":["../../src/pages/BookingPage.tsx"],"names":[],"mappings":"AAuMA,MAAM,CAAC,OAAO,UAAU,WAAW,
|
|
1
|
+
{"version":3,"file":"BookingPage.d.ts","sourceRoot":"","sources":["../../src/pages/BookingPage.tsx"],"names":[],"mappings":"AAuMA,MAAM,CAAC,OAAO,UAAU,WAAW,4CAgoBlC"}
|
|
@@ -185,6 +185,9 @@ function S() {
|
|
|
185
185
|
pickEndDate: v("booking_end_date"),
|
|
186
186
|
endTime: v("booking_end_time"),
|
|
187
187
|
selectedDaysTooltip: ({ count: e }) => v("booking_selected_days_tooltip", { count: e }),
|
|
188
|
+
rentalPeriod: v("booking_rental_period"),
|
|
189
|
+
dateDrawerNext: v("booking_date_drawer_continue"),
|
|
190
|
+
closeDrawer: v("booking_date_drawer_close"),
|
|
188
191
|
timeSlotsLoading: v("booking_time_slots_loading"),
|
|
189
192
|
timeSlotsUnavailable: v("booking_time_slots_unavailable"),
|
|
190
193
|
timeSlotsLoadError: v("booking_time_slots_load_error"),
|
|
@@ -211,6 +214,7 @@ function S() {
|
|
|
211
214
|
endTime: I.end_time,
|
|
212
215
|
onEndTimeChange: (e) => W({ end_time: e }),
|
|
213
216
|
bookingPeriodConfig: Qe,
|
|
217
|
+
withMobileDateDrawer: !0,
|
|
214
218
|
fetchTimeSlots: ft,
|
|
215
219
|
onTimeSlotsConfirmationChange: (e) => {
|
|
216
220
|
it(e ? at : void 0);
|
|
@@ -358,7 +362,7 @@ function S() {
|
|
|
358
362
|
/* @__PURE__ */ g("div", {
|
|
359
363
|
className: "grid gap-6 lg:grid-cols-12",
|
|
360
364
|
children: [/* @__PURE__ */ h("div", {
|
|
361
|
-
className: "lg:col-span-8",
|
|
365
|
+
className: "min-w-0 lg:col-span-8",
|
|
362
366
|
children: /* @__PURE__ */ g("div", {
|
|
363
367
|
className: "space-y-6",
|
|
364
368
|
children: [
|
|
@@ -385,6 +389,7 @@ function S() {
|
|
|
385
389
|
onStartAddressChange: (e) => W({ start_address: e }),
|
|
386
390
|
endAddress: I.end_address,
|
|
387
391
|
onEndAddressChange: (e) => W({ end_address: e }),
|
|
392
|
+
showPickupAddressWhenPickupOnly: !1,
|
|
388
393
|
testIdPrefix: "storefront-booking-fulfillment"
|
|
389
394
|
})
|
|
390
395
|
]
|
|
@@ -513,7 +518,7 @@ function S() {
|
|
|
513
518
|
]
|
|
514
519
|
})
|
|
515
520
|
}), /* @__PURE__ */ h("div", {
|
|
516
|
-
className: "lg:col-span-4",
|
|
521
|
+
className: "min-w-0 lg:col-span-4",
|
|
517
522
|
children: /* @__PURE__ */ h(ve, {
|
|
518
523
|
lines: _t.lines,
|
|
519
524
|
itemCount: j,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAuGA,MAAM,CAAC,OAAO,UAAU,YAAY,
|
|
1
|
+
{"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAuGA,MAAM,CAAC,OAAO,UAAU,YAAY,4CA6sBnC"}
|