@loczer/storefront-sdk 0.236.0 → 0.238.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/FaqSection/index.d.ts +2 -0
- package/dist/components/FaqSection/index.d.ts.map +1 -0
- package/dist/components/FaqSection/index.js +76 -0
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +38 -26
- package/dist/components/StorefrontCartPanel/index.d.ts +3 -1
- package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
- package/dist/components/StorefrontCartPanel/index.js +45 -41
- package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -1
- package/dist/components/StorefrontInsuranceNotice/index.js +3 -12
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.d.ts +4 -2
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.d.ts.map +1 -1
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.js +8 -8
- package/dist/i18n/en.d.ts +6 -2
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +6 -2
- package/dist/i18n/fr.d.ts +6 -2
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +6 -2
- package/dist/index.d.ts +25 -7
- package/dist/index.js +27 -26
- package/dist/lib/storefrontProducts.d.ts +4 -0
- package/dist/lib/storefrontProducts.d.ts.map +1 -1
- package/dist/lib/storefrontProducts.js +2 -0
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +198 -177
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +397 -388
- package/dist/pages/checkout/components/CheckoutBookingPeriodSummary.d.ts +9 -0
- package/dist/pages/checkout/components/CheckoutBookingPeriodSummary.d.ts.map +1 -0
- package/dist/pages/checkout/components/CheckoutBookingPeriodSummary.js +83 -0
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.js +10 -6
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.d.ts +13 -0
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.d.ts.map +1 -0
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.js +95 -0
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +6 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.js +38 -34
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type CheckoutBookingPeriodSummaryProps = {
|
|
2
|
+
bookingPath: string;
|
|
3
|
+
startDate: string;
|
|
4
|
+
startTime: string;
|
|
5
|
+
endDate: string;
|
|
6
|
+
endTime: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function CheckoutBookingPeriodSummary({ bookingPath, startDate, startTime, endDate, endTime, }: CheckoutBookingPeriodSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=CheckoutBookingPeriodSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckoutBookingPeriodSummary.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutBookingPeriodSummary.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,iCAAiC,GAAG;IAC9C,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAwDD,wBAAgB,4BAA4B,CAAC,EAC3C,WAAW,EACX,SAAS,EACT,SAAS,EACT,OAAO,EACP,OAAO,GACR,EAAE,iCAAiC,2CAoCnC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { normalizeBusinessDateString as e } from "../../../lib/booking-period.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { Link as r } from "@rpcbase/router";
|
|
4
|
+
import { useTranslation as i } from "react-i18next";
|
|
5
|
+
import { ArrowRight as a, Clock3 as o } from "lucide-react";
|
|
6
|
+
//#region src/pages/checkout/components/CheckoutBookingPeriodSummary.tsx
|
|
7
|
+
var s = (t, n) => {
|
|
8
|
+
let r = e(t);
|
|
9
|
+
if (!r) return t;
|
|
10
|
+
let [i = 0, a = 1, o = 1] = r.split("-").map(Number), s = new Date(Date.UTC(i, a - 1, o));
|
|
11
|
+
try {
|
|
12
|
+
return new Intl.DateTimeFormat(n, {
|
|
13
|
+
weekday: "short",
|
|
14
|
+
year: "numeric",
|
|
15
|
+
month: "short",
|
|
16
|
+
day: "numeric",
|
|
17
|
+
timeZone: "UTC"
|
|
18
|
+
}).format(s);
|
|
19
|
+
} catch {
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function c({ date: e, label: r, labelAction: i, language: a, testId: c, time: l }) {
|
|
24
|
+
return /* @__PURE__ */ n("div", {
|
|
25
|
+
className: "min-w-0",
|
|
26
|
+
"data-testid": c,
|
|
27
|
+
children: [/* @__PURE__ */ n("div", {
|
|
28
|
+
className: "flex items-center justify-between gap-2",
|
|
29
|
+
children: [/* @__PURE__ */ t("p", {
|
|
30
|
+
className: "min-w-0 text-xs font-medium text-slate-600",
|
|
31
|
+
children: /* @__PURE__ */ t("span", { children: r })
|
|
32
|
+
}), i]
|
|
33
|
+
}), /* @__PURE__ */ n("time", {
|
|
34
|
+
dateTime: `${e}T${l}`,
|
|
35
|
+
className: "mt-1 block text-sm font-semibold text-slate-950",
|
|
36
|
+
children: [/* @__PURE__ */ t("span", { children: s(e, a) }), /* @__PURE__ */ n("span", {
|
|
37
|
+
className: "mt-1 flex items-center gap-1.5 text-sm font-medium text-slate-700",
|
|
38
|
+
children: [/* @__PURE__ */ t(o, {
|
|
39
|
+
className: "size-3.5",
|
|
40
|
+
"aria-hidden": "true"
|
|
41
|
+
}), /* @__PURE__ */ t("span", { children: l })]
|
|
42
|
+
})]
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function l({ bookingPath: e, startDate: o, startTime: s, endDate: l, endTime: u }) {
|
|
47
|
+
let { t: d, i18n: f } = i();
|
|
48
|
+
return /* @__PURE__ */ t("section", {
|
|
49
|
+
className: "mt-3 border-t border-slate-200 pt-3",
|
|
50
|
+
"aria-label": d("booking_rental_period"),
|
|
51
|
+
"data-testid": "checkout-booking-period",
|
|
52
|
+
children: /* @__PURE__ */ n("div", {
|
|
53
|
+
className: "grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ t(c, {
|
|
56
|
+
date: o,
|
|
57
|
+
label: d("booking_start_date"),
|
|
58
|
+
language: f.language,
|
|
59
|
+
testId: "checkout-booking-start",
|
|
60
|
+
time: s
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ t(a, {
|
|
63
|
+
className: "size-4 shrink-0 text-slate-400",
|
|
64
|
+
"aria-hidden": "true"
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ t(c, {
|
|
67
|
+
date: l,
|
|
68
|
+
label: d("booking_end_date"),
|
|
69
|
+
labelAction: /* @__PURE__ */ t(r, {
|
|
70
|
+
to: e,
|
|
71
|
+
className: "shrink-0 text-xs font-semibold text-primary underline-offset-4 hover:underline",
|
|
72
|
+
children: /* @__PURE__ */ t("span", { children: d("checkout_booking_period_edit") })
|
|
73
|
+
}),
|
|
74
|
+
language: f.language,
|
|
75
|
+
testId: "checkout-booking-end",
|
|
76
|
+
time: u
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { l as CheckoutBookingPeriodSummary };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutLoadingSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutLoadingSkeleton.tsx"],"names":[],"mappings":"AAMA,KAAK,4BAA4B,GAAG;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAMD,wBAAgB,uBAAuB,CAAC,EACtC,WAAW,EACX,YAAY,GACb,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"CheckoutLoadingSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutLoadingSkeleton.tsx"],"names":[],"mappings":"AAMA,KAAK,4BAA4B,GAAG;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAMD,wBAAgB,uBAAuB,CAAC,EACtC,WAAW,EACX,YAAY,GACb,EAAE,4BAA4B,2CA8F9B"}
|
|
@@ -6,14 +6,14 @@ import { cn as i } from "@rpcbase/ui";
|
|
|
6
6
|
var a = ({ className: e }) => /* @__PURE__ */ t("div", { className: i("rounded bg-slate-200", e) });
|
|
7
7
|
function o({ bookingPath: i, checkoutPath: o }) {
|
|
8
8
|
let { t: s } = r();
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ n(e, {
|
|
10
10
|
currentStep: "checkout",
|
|
11
11
|
bookingPath: i,
|
|
12
12
|
checkoutPath: o,
|
|
13
13
|
backPath: i,
|
|
14
14
|
backLabel: s("back_to_booking"),
|
|
15
|
-
children: /* @__PURE__ */ n("div", {
|
|
16
|
-
className: "grid animate-pulse gap-6 lg:grid-cols-12",
|
|
15
|
+
children: [/* @__PURE__ */ n("div", {
|
|
16
|
+
className: "grid animate-pulse gap-6 pb-24 lg:grid-cols-12 lg:pb-0",
|
|
17
17
|
"data-testid": "checkout-cart-skeleton",
|
|
18
18
|
role: "status",
|
|
19
19
|
"aria-busy": "true",
|
|
@@ -47,11 +47,11 @@ function o({ bookingPath: i, checkoutPath: o }) {
|
|
|
47
47
|
})]
|
|
48
48
|
})]
|
|
49
49
|
}),
|
|
50
|
-
/* @__PURE__ */ t(a, { className: "mt-8 h-11 w-52" })
|
|
50
|
+
/* @__PURE__ */ t(a, { className: "mt-8 hidden h-11 w-52 lg:block" })
|
|
51
51
|
]
|
|
52
52
|
}),
|
|
53
53
|
/* @__PURE__ */ t("div", {
|
|
54
|
-
className: "lg:col-span-5",
|
|
54
|
+
className: "hidden lg:col-span-5 lg:block",
|
|
55
55
|
"aria-hidden": "true",
|
|
56
56
|
children: /* @__PURE__ */ n("div", {
|
|
57
57
|
className: "overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm",
|
|
@@ -98,7 +98,11 @@ function o({ bookingPath: i, checkoutPath: o }) {
|
|
|
98
98
|
})
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
|
-
})
|
|
101
|
+
}), /* @__PURE__ */ n("div", {
|
|
102
|
+
className: "fixed inset-x-0 bottom-0 z-40 flex animate-pulse gap-2 border-t border-slate-200/80 bg-white/95 p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] shadow-[0_-12px_30px_-22px_rgba(15,23,42,0.45)] backdrop-blur-lg lg:hidden",
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
children: [/* @__PURE__ */ t(a, { className: "h-12 min-w-0 flex-1" }), /* @__PURE__ */ t(a, { className: "h-12 min-w-0 flex-1" })]
|
|
105
|
+
})]
|
|
102
106
|
});
|
|
103
107
|
}
|
|
104
108
|
//#endregion
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type CheckoutMobileSummaryDrawerProps = {
|
|
3
|
+
canSubmit: boolean;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
compactSubmitLabel: string;
|
|
6
|
+
itemCount: number;
|
|
7
|
+
onSubmit: () => void;
|
|
8
|
+
submitLabel: string;
|
|
9
|
+
totalLabel: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function CheckoutMobileSummaryDrawer({ canSubmit, children, compactSubmitLabel, itemCount, onSubmit, submitLabel, totalLabel, }: CheckoutMobileSummaryDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=CheckoutMobileSummaryDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckoutMobileSummaryDrawer.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutMobileSummaryDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAiB3D,KAAK,gCAAgC,GAAG;IACtC,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,GACX,EAAE,gCAAgC,2CAuFlC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Button as e } from "../../../ui/button.js";
|
|
2
|
+
import { Drawer as t, DrawerContent as n, DrawerFooter as r, DrawerHeader as i, DrawerTitle as a, DrawerTrigger as o } from "../../../ui/drawer.js";
|
|
3
|
+
import { useEffect as s, useState as c } from "react";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
import { useMediaQuery as d } from "@rpcbase/client";
|
|
6
|
+
import { useTranslation as f } from "react-i18next";
|
|
7
|
+
import { toast as p } from "sonner";
|
|
8
|
+
import { ShoppingCart as m } from "lucide-react";
|
|
9
|
+
//#region src/pages/checkout/components/CheckoutMobileSummaryDrawer.tsx
|
|
10
|
+
function h({ canSubmit: h, children: g, compactSubmitLabel: _, itemCount: v, onSubmit: y, submitLabel: b, totalLabel: x }) {
|
|
11
|
+
let { t: S } = f(), [C, w] = c(!1), T = d("(min-width: 64rem)");
|
|
12
|
+
return s(() => {
|
|
13
|
+
T && w(!1);
|
|
14
|
+
}, [T]), /* @__PURE__ */ l("div", {
|
|
15
|
+
className: "lg:hidden",
|
|
16
|
+
children: /* @__PURE__ */ u(t, {
|
|
17
|
+
open: C && !T,
|
|
18
|
+
onOpenChange: (e) => {
|
|
19
|
+
e && p.dismiss(), w(e);
|
|
20
|
+
},
|
|
21
|
+
children: [/* @__PURE__ */ u("div", {
|
|
22
|
+
className: "fixed inset-x-0 bottom-0 z-40 flex gap-2 border-t border-slate-200/80 bg-white/95 p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] shadow-[0_-12px_30px_-22px_rgba(15,23,42,0.45)] backdrop-blur-lg",
|
|
23
|
+
"data-testid": "checkout-mobile-action-bar",
|
|
24
|
+
children: [/* @__PURE__ */ l(o, {
|
|
25
|
+
asChild: !0,
|
|
26
|
+
children: /* @__PURE__ */ l(e, {
|
|
27
|
+
type: "button",
|
|
28
|
+
variant: "outline",
|
|
29
|
+
className: "h-12 min-w-0 flex-1 border-primary/20 px-3 text-primary hover:bg-primary/5 hover:text-primary",
|
|
30
|
+
"aria-label": S("checkout_mobile_summary_button", { count: v }),
|
|
31
|
+
"data-testid": "checkout-mobile-summary-trigger",
|
|
32
|
+
children: /* @__PURE__ */ u("span", {
|
|
33
|
+
className: "flex w-full min-w-0 items-center justify-between gap-2",
|
|
34
|
+
children: [/* @__PURE__ */ u("span", {
|
|
35
|
+
className: "flex shrink-0 items-center gap-2",
|
|
36
|
+
children: [/* @__PURE__ */ l(m, {
|
|
37
|
+
className: "size-4",
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
}), /* @__PURE__ */ l("span", {
|
|
40
|
+
className: "inline-flex min-w-5 items-center justify-center rounded-full bg-primary/10 px-1.5 py-0.5 text-xs font-bold",
|
|
41
|
+
children: v
|
|
42
|
+
})]
|
|
43
|
+
}), /* @__PURE__ */ l("span", {
|
|
44
|
+
className: "truncate text-sm font-semibold",
|
|
45
|
+
"aria-live": "polite",
|
|
46
|
+
children: x
|
|
47
|
+
})]
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
}), /* @__PURE__ */ l(e, {
|
|
51
|
+
type: "button",
|
|
52
|
+
className: "h-12 min-w-0 flex-1 px-3 text-sm font-semibold",
|
|
53
|
+
"aria-label": b,
|
|
54
|
+
"data-testid": "checkout-mobile-submit",
|
|
55
|
+
disabled: !h,
|
|
56
|
+
onClick: y,
|
|
57
|
+
children: /* @__PURE__ */ l("span", {
|
|
58
|
+
className: "line-clamp-2 whitespace-normal leading-tight",
|
|
59
|
+
children: _
|
|
60
|
+
})
|
|
61
|
+
})]
|
|
62
|
+
}), /* @__PURE__ */ u(n, {
|
|
63
|
+
className: "max-h-[90dvh] rounded-t-2xl bg-white",
|
|
64
|
+
closeLabel: S("close_modal"),
|
|
65
|
+
"data-testid": "checkout-mobile-summary-drawer",
|
|
66
|
+
showCloseButton: !0,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ l(i, {
|
|
69
|
+
className: "sr-only",
|
|
70
|
+
children: /* @__PURE__ */ l(a, { children: S("checkout_summary_title") })
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ l("div", {
|
|
73
|
+
className: "min-h-0 flex-1 overflow-y-auto px-4 pb-4 pt-8",
|
|
74
|
+
children: g
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ l(r, {
|
|
77
|
+
className: "mt-auto shrink-0 border-t border-slate-200 bg-white pb-[calc(1rem+env(safe-area-inset-bottom))] pt-4",
|
|
78
|
+
children: /* @__PURE__ */ l(e, {
|
|
79
|
+
type: "button",
|
|
80
|
+
size: "lg",
|
|
81
|
+
className: "w-full font-semibold",
|
|
82
|
+
disabled: !h,
|
|
83
|
+
onClick: () => {
|
|
84
|
+
w(!1), y();
|
|
85
|
+
},
|
|
86
|
+
children: /* @__PURE__ */ l("span", { children: b })
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
})]
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { h as CheckoutMobileSummaryDrawer };
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { StorefrontCartPanel } from '../../../components/StorefrontCartPanel';
|
|
3
|
+
import { CheckoutBookingPeriodSummaryProps } from './CheckoutBookingPeriodSummary';
|
|
3
4
|
import { CheckoutCouponCard } from './CheckoutCouponCard';
|
|
4
5
|
type StorefrontCartPanelProps = ComponentProps<typeof StorefrontCartPanel>;
|
|
5
6
|
type CheckoutCouponCardProps = ComponentProps<typeof CheckoutCouponCard>;
|
|
6
7
|
type CheckoutSummaryColumnProps = Pick<StorefrontCartPanelProps, "lines" | "itemCount" | "baseUnitLabel" | "onQuantityChange" | "onRemove"> & {
|
|
7
8
|
coupon?: CheckoutCouponCardProps;
|
|
9
|
+
bookingPeriod?: CheckoutBookingPeriodSummaryProps;
|
|
8
10
|
bookingSubtotalLabel: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
presentation?: StorefrontCartPanelProps["presentation"];
|
|
13
|
+
stickyTopClassName?: string;
|
|
9
14
|
vatAmountLabel: string;
|
|
10
15
|
vatRateLabel: string;
|
|
11
16
|
bookingTotalLabel: string;
|
|
12
17
|
};
|
|
13
|
-
export declare function CheckoutSummaryColumn({ lines, itemCount, baseUnitLabel, coupon, bookingSubtotalLabel, vatAmountLabel, vatRateLabel, bookingTotalLabel, onQuantityChange, onRemove, }: CheckoutSummaryColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function CheckoutSummaryColumn({ lines, itemCount, baseUnitLabel, coupon, bookingPeriod, bookingSubtotalLabel, className, presentation, stickyTopClassName, vatAmountLabel, vatRateLabel, bookingTotalLabel, onQuantityChange, onRemove, }: CheckoutSummaryColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
14
19
|
export {};
|
|
15
20
|
//# sourceMappingURL=CheckoutSummaryColumn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutSummaryColumn.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutSummaryColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"CheckoutSummaryColumn.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutSummaryColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAI3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAC7E,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAGzD,KAAK,wBAAwB,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC1E,KAAK,uBAAuB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAExE,KAAK,0BAA0B,GAAG,IAAI,CACpC,wBAAwB,EACtB,OAAO,GACP,WAAW,GACX,eAAe,GACf,kBAAkB,GAClB,UAAU,CACb,GAAG;IACF,MAAM,CAAC,EAAE,uBAAuB,CAAA;IAChC,aAAa,CAAC,EAAE,iCAAiC,CAAA;IACjD,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAA;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,SAAS,EACT,aAAa,EACb,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,kBAA6B,EAC7B,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,GACT,EAAE,0BAA0B,2CAiD5B"}
|
|
@@ -1,61 +1,65 @@
|
|
|
1
1
|
import { StorefrontCartPanel as e } from "../../../components/StorefrontCartPanel/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { CheckoutBookingPeriodSummary as t } from "./CheckoutBookingPeriodSummary.js";
|
|
3
|
+
import { CheckoutCouponCard as n } from "./CheckoutCouponCard.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { useTranslation as a } from "react-i18next";
|
|
6
|
+
import { cn as o } from "@rpcbase/ui";
|
|
5
7
|
//#region src/pages/checkout/components/CheckoutSummaryColumn.tsx
|
|
6
|
-
function
|
|
7
|
-
let { t:
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
className: "lg:col-span-5",
|
|
10
|
-
children: /* @__PURE__ */
|
|
11
|
-
lines:
|
|
12
|
-
itemCount:
|
|
13
|
-
baseUnitLabel:
|
|
14
|
-
title:
|
|
15
|
-
description:
|
|
8
|
+
function s({ lines: s, itemCount: c, baseUnitLabel: l, coupon: u, bookingPeriod: d, bookingSubtotalLabel: f, className: p, presentation: m, stickyTopClassName: h = "top-32", vatAmountLabel: g, vatRateLabel: _, bookingTotalLabel: v, onQuantityChange: y, onRemove: b }) {
|
|
9
|
+
let { t: x } = a();
|
|
10
|
+
return /* @__PURE__ */ r("div", {
|
|
11
|
+
className: o("lg:col-span-5", p),
|
|
12
|
+
children: /* @__PURE__ */ r(e, {
|
|
13
|
+
lines: s,
|
|
14
|
+
itemCount: c,
|
|
15
|
+
baseUnitLabel: l,
|
|
16
|
+
title: x("checkout_summary_title"),
|
|
17
|
+
description: x("checkout_summary_description"),
|
|
18
|
+
headerAddon: d ? /* @__PURE__ */ r(t, { ...d }) : void 0,
|
|
16
19
|
editable: !0,
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
presentation: m,
|
|
21
|
+
summaryAddon: u ? /* @__PURE__ */ r(n, { ...u }) : void 0,
|
|
22
|
+
pricingSummary: /* @__PURE__ */ i("dl", {
|
|
19
23
|
className: "grid border-t border-slate-200 pt-3 text-sm",
|
|
20
24
|
"data-testid": "checkout-booking-totals",
|
|
21
25
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ i("div", {
|
|
23
27
|
className: "flex items-center justify-between gap-3 py-1.5",
|
|
24
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ r("dt", {
|
|
25
29
|
className: "text-slate-700",
|
|
26
|
-
children: /* @__PURE__ */
|
|
27
|
-
}), /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ r("span", { children: x("checkout_booking_subtotal") })
|
|
31
|
+
}), /* @__PURE__ */ r("dd", {
|
|
28
32
|
className: "font-medium tabular-nums text-slate-900",
|
|
29
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ r("span", { children: f })
|
|
30
34
|
})]
|
|
31
35
|
}),
|
|
32
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ i("div", {
|
|
33
37
|
className: "flex items-center justify-between gap-3 py-1.5",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ r("dt", {
|
|
35
39
|
className: "text-slate-700",
|
|
36
|
-
children: /* @__PURE__ */
|
|
37
|
-
}), /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ r("span", { children: x("checkout_payment_vat", { rate: _ }) })
|
|
41
|
+
}), /* @__PURE__ */ r("dd", {
|
|
38
42
|
className: "font-medium tabular-nums text-slate-900",
|
|
39
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ r("span", { children: g })
|
|
40
44
|
})]
|
|
41
45
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ i("div", {
|
|
43
47
|
className: "mt-1 flex items-center justify-between gap-3 border-t border-slate-200 pt-3",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ r("dt", {
|
|
45
49
|
className: "font-semibold text-slate-950",
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
}), /* @__PURE__ */
|
|
50
|
+
children: /* @__PURE__ */ r("span", { children: x("checkout_estimated_total") })
|
|
51
|
+
}), /* @__PURE__ */ r("dd", {
|
|
48
52
|
className: "text-base font-bold tabular-nums tracking-tight text-slate-950",
|
|
49
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ r("span", { children: v })
|
|
50
54
|
})]
|
|
51
55
|
})
|
|
52
56
|
]
|
|
53
57
|
}),
|
|
54
|
-
stickyTopClassName:
|
|
55
|
-
onQuantityChange:
|
|
56
|
-
onRemove:
|
|
58
|
+
stickyTopClassName: h,
|
|
59
|
+
onQuantityChange: y,
|
|
60
|
+
onRemove: b
|
|
57
61
|
})
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
//#endregion
|
|
61
|
-
export {
|
|
65
|
+
export { s as CheckoutSummaryColumn };
|