@loczer/storefront-sdk 0.237.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/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +38 -26
- package/dist/components/StorefrontCartPanel/index.d.ts +2 -1
- package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
- package/dist/components/StorefrontCartPanel/index.js +24 -24
- 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 +3 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +3 -0
- package/dist/i18n/fr.d.ts +3 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +3 -0
- package/dist/index.d.ts +12 -3
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +198 -184
- 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 +4 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.js +22 -20
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAIvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAIvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAUtE,KAAK,WAAW,GAAG;IACjB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,kBAAkB,EAAE,6BAA6B,CAAA;CAClD,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,uBAAuB,EACvB,kBAAkB,GACnB,EAAE,WAAW,2CA+Fb"}
|
|
@@ -17,54 +17,66 @@ import { Outlet as _, useLocation as v, useParams as y } from "@rpcbase/router";
|
|
|
17
17
|
import { useTranslation as b } from "react-i18next";
|
|
18
18
|
import { Toaster as x } from "sonner";
|
|
19
19
|
//#region src/components/Layout/index.tsx
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
var S = {
|
|
21
|
+
"--toast-close-button-start": "unset",
|
|
22
|
+
"--toast-close-button-end": "0",
|
|
23
|
+
"--toast-close-button-transform": "translate(35%, -35%)"
|
|
24
|
+
};
|
|
25
|
+
function C({ storefrontConfiguration: C, storefrontProducts: w }) {
|
|
26
|
+
let { storeSlug: T, referenceId: E } = y(), D = v(), { i18n: O } = b(), [k, A] = f(!1);
|
|
22
27
|
d(() => {
|
|
23
|
-
|
|
28
|
+
A(!0), document.documentElement.setAttribute("data-hydrated", "true");
|
|
24
29
|
}, []);
|
|
25
|
-
let
|
|
26
|
-
storefrontConfiguration:
|
|
27
|
-
language:
|
|
28
|
-
}),
|
|
30
|
+
let j = t({
|
|
31
|
+
storefrontConfiguration: C,
|
|
32
|
+
language: O.language
|
|
33
|
+
}), M = j?.href, N = typeof E == "string" && E.trim().length > 0, P = N && new URLSearchParams(D.search).get("pdf") === "1", F = /\/checkout\/?$/.test(D.pathname), I = !!(M && C?.content?.showWhatsappFloatingButton !== !1), L = F ? { bottom: I ? "calc(10rem + env(safe-area-inset-bottom))" : "calc(5.5rem + env(safe-area-inset-bottom))" } : void 0;
|
|
29
34
|
return /* @__PURE__ */ h(g, { children: [/* @__PURE__ */ m(x, {
|
|
30
35
|
id: l,
|
|
31
36
|
closeButton: !0,
|
|
37
|
+
className: F ? "lg:!bottom-6" : void 0,
|
|
38
|
+
mobileOffset: L,
|
|
39
|
+
offset: L,
|
|
32
40
|
position: "bottom-center",
|
|
41
|
+
style: S,
|
|
33
42
|
theme: "dark"
|
|
34
43
|
}), /* @__PURE__ */ m(u, { children: /* @__PURE__ */ m(e, {
|
|
35
|
-
storeSlug:
|
|
36
|
-
products:
|
|
44
|
+
storeSlug: T ?? "",
|
|
45
|
+
products: w,
|
|
37
46
|
children: /* @__PURE__ */ m("div", {
|
|
38
|
-
className: `loczer-storefront flex w-full min-w-0 flex-col overflow-x-clip bg-background text-foreground ${
|
|
39
|
-
children:
|
|
40
|
-
className: `flex-1 ${
|
|
47
|
+
className: `loczer-storefront flex w-full min-w-0 flex-col overflow-x-clip bg-background text-foreground ${N && !P ? "h-dvh overflow-hidden" : "min-h-screen"}`,
|
|
48
|
+
children: N ? /* @__PURE__ */ m("main", {
|
|
49
|
+
className: `flex-1 ${P ? "bg-white" : "overflow-hidden"}`,
|
|
41
50
|
children: /* @__PURE__ */ m(_, {})
|
|
42
51
|
}) : /* @__PURE__ */ h(p, { children: [
|
|
43
52
|
/* @__PURE__ */ m(r, {
|
|
44
|
-
storefrontConfiguration:
|
|
45
|
-
whatsappHref:
|
|
46
|
-
whatsappPhoneDisplay:
|
|
53
|
+
storefrontConfiguration: C,
|
|
54
|
+
whatsappHref: M,
|
|
55
|
+
whatsappPhoneDisplay: j?.phoneDisplay
|
|
47
56
|
}),
|
|
48
57
|
/* @__PURE__ */ m("main", {
|
|
49
58
|
className: "min-w-0 flex-1",
|
|
50
59
|
children: /* @__PURE__ */ m(_, {})
|
|
51
60
|
}),
|
|
52
61
|
/* @__PURE__ */ m(n, {
|
|
53
|
-
storeSlug:
|
|
54
|
-
shop:
|
|
55
|
-
whatsappHref:
|
|
56
|
-
whatsappPhoneDisplay:
|
|
57
|
-
openingHours:
|
|
58
|
-
openingHoursOverrides:
|
|
59
|
-
timeZone:
|
|
60
|
-
showInsuranceTerms: c(
|
|
62
|
+
storeSlug: T,
|
|
63
|
+
shop: C?.shop,
|
|
64
|
+
whatsappHref: M,
|
|
65
|
+
whatsappPhoneDisplay: j?.phoneDisplay,
|
|
66
|
+
openingHours: C?.bookingEngine.shop.openingHours,
|
|
67
|
+
openingHoursOverrides: C?.bookingEngine.shop.openingHoursOverrides,
|
|
68
|
+
timeZone: C?.bookingEngine.shop.timeZone,
|
|
69
|
+
showInsuranceTerms: c(C?.information?.insuranceTerms)
|
|
61
70
|
}),
|
|
62
71
|
/* @__PURE__ */ m(i, {}),
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
k ? /* @__PURE__ */ h(p, { children: [I ? /* @__PURE__ */ m(s, {
|
|
73
|
+
href: M,
|
|
74
|
+
avoidMobileBottomBar: F
|
|
75
|
+
}, F ? "checkout" : "default") : null, /* @__PURE__ */ m(a, {})] }) : null,
|
|
76
|
+
/* @__PURE__ */ m(o, { storefrontConfiguration: C })
|
|
65
77
|
] })
|
|
66
78
|
})
|
|
67
79
|
}) })] });
|
|
68
80
|
}
|
|
69
81
|
//#endregion
|
|
70
|
-
export {
|
|
82
|
+
export { C as Layout };
|
|
@@ -14,11 +14,12 @@ type StorefrontCartPanelProps = {
|
|
|
14
14
|
editable?: boolean;
|
|
15
15
|
summaryAddon?: ReactNode;
|
|
16
16
|
pricingSummary?: ReactNode;
|
|
17
|
+
presentation?: "card" | "flat";
|
|
17
18
|
stickyTopClassName?: string;
|
|
18
19
|
onQuantityChange?: (key: string, quantity: number) => void;
|
|
19
20
|
onRemove?: (key: string) => void;
|
|
20
21
|
onClear?: () => void;
|
|
21
22
|
};
|
|
22
|
-
export declare function StorefrontCartPanel({ lines, itemCount, baseUnitLabel, totalMinor, title, description, headerAddon, checkoutPath, showCheckoutAction, showClearAction, editable, summaryAddon, pricingSummary, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function StorefrontCartPanel({ lines, itemCount, baseUnitLabel, totalMinor, title, description, headerAddon, checkoutPath, showCheckoutAction, showClearAction, editable, summaryAddon, pricingSummary, presentation, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCartPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAQtE,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,yBAAyB,EAAE,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAA0B,EAC1B,eAAuB,EACvB,QAAe,EACf,YAAY,EACZ,cAAc,EACd,kBAA6B,EAC7B,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCartPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAQtE,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,yBAAyB,EAAE,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAA0B,EAC1B,eAAuB,EACvB,QAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAqB,EACrB,kBAA6B,EAC7B,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,2CAoK1B"}
|
|
@@ -10,22 +10,22 @@ import { useTranslation as l } from "react-i18next";
|
|
|
10
10
|
import { cn as u } from "@rpcbase/ui";
|
|
11
11
|
import { ArrowRight as d, Trash2 as f } from "lucide-react";
|
|
12
12
|
//#region src/components/StorefrontCartPanel/index.tsx
|
|
13
|
-
function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _, description: v, headerAddon: y, checkoutPath: b, showCheckoutAction: x = !1, showClearAction: S = !1, editable: C = !0, summaryAddon: w, pricingSummary: T,
|
|
14
|
-
let { t:
|
|
15
|
-
return /* @__PURE__ */ s(i, {
|
|
16
|
-
className: u("sticky border-slate-200 bg-white shadow-sm", E),
|
|
13
|
+
function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _, description: v, headerAddon: y, checkoutPath: b, showCheckoutAction: x = !1, showClearAction: S = !1, editable: C = !0, summaryAddon: w, pricingSummary: T, presentation: E = "card", stickyTopClassName: D = "top-24", onQuantityChange: O, onRemove: k, onClear: A }) {
|
|
14
|
+
let { t: j, i18n: M } = l();
|
|
15
|
+
return /* @__PURE__ */ s(E === "flat" ? "div" : i, {
|
|
16
|
+
className: u(E === "flat" ? "flex flex-col bg-transparent" : "sticky border-slate-200 bg-white shadow-sm", E === "card" ? D : void 0),
|
|
17
17
|
children: [/* @__PURE__ */ s("div", {
|
|
18
|
-
className: "border-b border-slate-200 px-4 py-4",
|
|
18
|
+
className: u("border-b border-slate-200", E === "flat" ? "pb-4" : "px-4 py-4"),
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ s("div", {
|
|
21
21
|
className: "flex items-center justify-between gap-3",
|
|
22
22
|
children: [/* @__PURE__ */ o("p", {
|
|
23
23
|
className: "text-sm font-semibold text-slate-950",
|
|
24
|
-
children: /* @__PURE__ */ o("span", { children: _ ??
|
|
24
|
+
children: /* @__PURE__ */ o("span", { children: _ ?? j("cart_title") })
|
|
25
25
|
}), /* @__PURE__ */ o(t, {
|
|
26
26
|
variant: "outline",
|
|
27
27
|
className: "border-slate-200 bg-white text-slate-700",
|
|
28
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
28
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_items_count", { count: m }) })
|
|
29
29
|
})]
|
|
30
30
|
}),
|
|
31
31
|
v ? /* @__PURE__ */ o("p", {
|
|
@@ -35,15 +35,15 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
35
35
|
y
|
|
36
36
|
]
|
|
37
37
|
}), /* @__PURE__ */ s("div", {
|
|
38
|
-
className: "grid gap-3 p-4",
|
|
38
|
+
className: u("grid gap-3", E === "flat" ? "pt-4" : "p-4"),
|
|
39
39
|
children: [
|
|
40
40
|
p.length === 0 ? /* @__PURE__ */ o("p", {
|
|
41
41
|
className: "text-sm text-slate-600",
|
|
42
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
42
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_empty") })
|
|
43
43
|
}) : /* @__PURE__ */ o("ul", {
|
|
44
44
|
className: "divide-y divide-slate-200",
|
|
45
45
|
children: p.map((i) => {
|
|
46
|
-
let c = e(i.unitPriceMinor,
|
|
46
|
+
let c = e(i.unitPriceMinor, M.language), l = i.insufficientCapacity === !0, u = i.availabilityIssue === "quantityUnavailable" ? j("availability_quantity_unavailable") : j("availability_out_of_stock");
|
|
47
47
|
return /* @__PURE__ */ s("li", {
|
|
48
48
|
className: "flex items-start justify-between gap-3 py-4 first:pt-0 last:pb-0",
|
|
49
49
|
children: [/* @__PURE__ */ s("div", {
|
|
@@ -55,7 +55,7 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
55
55
|
}),
|
|
56
56
|
i.productVariantLabel ? /* @__PURE__ */ o("p", {
|
|
57
57
|
className: "text-xs text-slate-600",
|
|
58
|
-
children: /* @__PURE__ */ o("span", { children: `${
|
|
58
|
+
children: /* @__PURE__ */ o("span", { children: `${j(i.productVariantIsSize ? "product_size_label" : "product_variant_label")}: ${i.productVariantLabel}` })
|
|
59
59
|
}) : null,
|
|
60
60
|
i.productVariantDescription ? /* @__PURE__ */ o("p", {
|
|
61
61
|
className: "text-xs text-slate-500",
|
|
@@ -64,7 +64,7 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
64
64
|
/* @__PURE__ */ o(a, { warning: i.productWarning }),
|
|
65
65
|
/* @__PURE__ */ o("p", {
|
|
66
66
|
className: "text-xs text-slate-600",
|
|
67
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
67
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_line_meta", {
|
|
68
68
|
quantity: i.quantity,
|
|
69
69
|
price: c,
|
|
70
70
|
unit: h
|
|
@@ -80,24 +80,24 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
80
80
|
]
|
|
81
81
|
}), C ? /* @__PURE__ */ s("div", {
|
|
82
82
|
className: "flex items-center gap-2",
|
|
83
|
-
children: [
|
|
83
|
+
children: [O ? /* @__PURE__ */ o(r, {
|
|
84
84
|
type: "number",
|
|
85
85
|
min: 1,
|
|
86
86
|
max: 99,
|
|
87
87
|
value: i.quantity,
|
|
88
88
|
onChange: (e) => {
|
|
89
89
|
let t = Number(e.target.value);
|
|
90
|
-
|
|
90
|
+
O(i.key, Number.isFinite(t) ? t : 0);
|
|
91
91
|
},
|
|
92
92
|
className: "h-9 w-16",
|
|
93
|
-
"aria-label":
|
|
94
|
-
}) : null,
|
|
93
|
+
"aria-label": j("quantity_label")
|
|
94
|
+
}) : null, k ? /* @__PURE__ */ o(n, {
|
|
95
95
|
type: "button",
|
|
96
96
|
variant: "ghost",
|
|
97
97
|
size: "icon",
|
|
98
98
|
className: "h-8 w-8 text-slate-500 hover:bg-slate-50 hover:text-slate-700",
|
|
99
|
-
onClick: () =>
|
|
100
|
-
"aria-label":
|
|
99
|
+
onClick: () => k(i.key),
|
|
100
|
+
"aria-label": j("remove_from_cart"),
|
|
101
101
|
children: /* @__PURE__ */ o(f, {
|
|
102
102
|
className: "h-4 w-4",
|
|
103
103
|
"aria-hidden": "true"
|
|
@@ -112,10 +112,10 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
112
112
|
className: "flex items-center justify-between gap-3 border-t border-slate-200 pt-3 text-sm",
|
|
113
113
|
children: [/* @__PURE__ */ o("p", {
|
|
114
114
|
className: "text-slate-700",
|
|
115
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
115
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_total") })
|
|
116
116
|
}), /* @__PURE__ */ o("p", {
|
|
117
117
|
className: "font-semibold text-slate-950",
|
|
118
|
-
children: /* @__PURE__ */ o("span", { children: e(g,
|
|
118
|
+
children: /* @__PURE__ */ o("span", { children: e(g, M.language) })
|
|
119
119
|
})]
|
|
120
120
|
}) : null),
|
|
121
121
|
/* @__PURE__ */ s("div", {
|
|
@@ -125,17 +125,17 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
125
125
|
className: u(p.length > 0 ? "block" : "hidden"),
|
|
126
126
|
children: /* @__PURE__ */ s(n, {
|
|
127
127
|
className: "w-full gap-2",
|
|
128
|
-
children: [/* @__PURE__ */ o("span", { children:
|
|
128
|
+
children: [/* @__PURE__ */ o("span", { children: j("checkout_button") }), /* @__PURE__ */ o(d, {
|
|
129
129
|
className: "h-4 w-4",
|
|
130
130
|
"aria-hidden": "true"
|
|
131
131
|
})]
|
|
132
132
|
})
|
|
133
|
-
}) : null, S &&
|
|
133
|
+
}) : null, S && A ? /* @__PURE__ */ o(n, {
|
|
134
134
|
type: "button",
|
|
135
135
|
variant: "outline",
|
|
136
136
|
className: u(p.length > 0 ? "w-full gap-2" : "hidden"),
|
|
137
|
-
onClick:
|
|
138
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
137
|
+
onClick: A,
|
|
138
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_clear") })
|
|
139
139
|
}) : null]
|
|
140
140
|
})
|
|
141
141
|
]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { WhatsAppFloatingButtonOptions } from './useWhatsAppFloatingButton';
|
|
2
|
-
type WhatsAppFloatingButtonProps = WhatsAppFloatingButtonOptions
|
|
3
|
-
|
|
2
|
+
type WhatsAppFloatingButtonProps = WhatsAppFloatingButtonOptions & {
|
|
3
|
+
avoidMobileBottomBar?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const WhatsAppFloatingButton: ({ avoidMobileBottomBar, ...options }: WhatsAppFloatingButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
6
|
export {};
|
|
5
7
|
//# sourceMappingURL=WhatsAppFloatingButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhatsAppFloatingButton.d.ts","sourceRoot":"","sources":["../../../src/components/WhatsAppFloatingButton/WhatsAppFloatingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,6BAA6B,CAAA;AAGpC,KAAK,2BAA2B,GAAG,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"WhatsAppFloatingButton.d.ts","sourceRoot":"","sources":["../../../src/components/WhatsAppFloatingButton/WhatsAppFloatingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,6BAA6B,CAAA;AAGpC,KAAK,2BAA2B,GAAG,6BAA6B,GAAG;IACjE,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,CAAA;AAwBD,eAAO,MAAM,sBAAsB,GAAI,sCAGpC,2BAA2B,mDAiC7B,CAAA"}
|
|
@@ -36,22 +36,22 @@ function r({ className: e }) {
|
|
|
36
36
|
]
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
var i = (i) => {
|
|
40
|
-
let { href:
|
|
41
|
-
return typeof window > "u" || !
|
|
42
|
-
ref:
|
|
43
|
-
className: "fixed bottom-
|
|
39
|
+
var i = ({ avoidMobileBottomBar: i = !1, ...a }) => {
|
|
40
|
+
let { href: o, containerRef: s, bubbleRef: c, onLinkClick: l } = e(a);
|
|
41
|
+
return typeof window > "u" || !o ? null : /* @__PURE__ */ t("div", {
|
|
42
|
+
ref: s,
|
|
43
|
+
className: i ? "pointer-events-none fixed bottom-24 right-4 z-50 select-none lg:bottom-4" : "pointer-events-none fixed bottom-4 right-4 z-50 select-none",
|
|
44
44
|
children: /* @__PURE__ */ t("div", {
|
|
45
|
-
ref:
|
|
45
|
+
ref: c,
|
|
46
46
|
className: "pointer-events-auto",
|
|
47
47
|
style: { touchAction: "none" },
|
|
48
48
|
children: /* @__PURE__ */ n("a", {
|
|
49
|
-
href:
|
|
49
|
+
href: o,
|
|
50
50
|
target: "_blank",
|
|
51
51
|
rel: "nofollow noopener noreferrer",
|
|
52
52
|
className: "group inline-flex h-14 w-14 md:h-12 md:w-12 items-center justify-center rounded-full bg-[#25D366] hover:bg-[#1DA851] shadow-lg ring-1 ring-[#1DA851] transition-colors p-1",
|
|
53
53
|
"aria-label": "WhatsApp",
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: l,
|
|
55
55
|
children: [/* @__PURE__ */ t(r, { className: "h-9 w-9 md:h-8 md:w-8" }), /* @__PURE__ */ t("span", {
|
|
56
56
|
className: "sr-only",
|
|
57
57
|
children: "WhatsApp"
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -207,6 +207,9 @@ export declare const storefront: {
|
|
|
207
207
|
checkout_booking_period_edit: string;
|
|
208
208
|
checkout_summary_title: string;
|
|
209
209
|
checkout_summary_description: string;
|
|
210
|
+
checkout_mobile_summary_button: string;
|
|
211
|
+
checkout_mobile_submit: string;
|
|
212
|
+
checkout_mobile_continue_to_payment: string;
|
|
210
213
|
checkout_booking_subtotal: string;
|
|
211
214
|
checkout_estimated_duration: string;
|
|
212
215
|
checkout_estimated_total: string;
|
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAihBtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -208,6 +208,9 @@ var e = {
|
|
|
208
208
|
checkout_booking_period_edit: "Edit",
|
|
209
209
|
checkout_summary_title: "Summary",
|
|
210
210
|
checkout_summary_description: "Cart and pricing recap.",
|
|
211
|
+
checkout_mobile_summary_button: "View summary ({{count}})",
|
|
212
|
+
checkout_mobile_submit: "Send request",
|
|
213
|
+
checkout_mobile_continue_to_payment: "Continue to payment",
|
|
211
214
|
checkout_booking_subtotal: "Subtotal",
|
|
212
215
|
checkout_estimated_duration: "Estimated duration",
|
|
213
216
|
checkout_estimated_total: "Total",
|
package/dist/i18n/fr.d.ts
CHANGED
|
@@ -208,6 +208,9 @@ export declare const storefront: {
|
|
|
208
208
|
checkout_booking_period_edit: string;
|
|
209
209
|
checkout_summary_title: string;
|
|
210
210
|
checkout_summary_description: string;
|
|
211
|
+
checkout_mobile_summary_button: string;
|
|
212
|
+
checkout_mobile_submit: string;
|
|
213
|
+
checkout_mobile_continue_to_payment: string;
|
|
211
214
|
checkout_booking_subtotal: string;
|
|
212
215
|
checkout_estimated_duration: string;
|
|
213
216
|
checkout_estimated_total: string;
|
package/dist/i18n/fr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkhBtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -209,6 +209,9 @@ var e = {
|
|
|
209
209
|
checkout_booking_period_edit: "Modifier",
|
|
210
210
|
checkout_summary_title: "Récapitulatif",
|
|
211
211
|
checkout_summary_description: "Panier et récap des montants.",
|
|
212
|
+
checkout_mobile_summary_button: "Voir le récapitulatif ({{count}})",
|
|
213
|
+
checkout_mobile_submit: "Envoyer la demande",
|
|
214
|
+
checkout_mobile_continue_to_payment: "Continuer au paiement",
|
|
212
215
|
checkout_booking_subtotal: "Sous-total",
|
|
213
216
|
checkout_estimated_duration: "Durée estimée",
|
|
214
217
|
checkout_estimated_total: "Total",
|
package/dist/index.d.ts
CHANGED
|
@@ -3572,7 +3572,7 @@ export declare type StorefrontCartItem = {
|
|
|
3572
3572
|
quantity: number;
|
|
3573
3573
|
};
|
|
3574
3574
|
|
|
3575
|
-
export declare function StorefrontCartPanel({ lines, itemCount, baseUnitLabel, totalMinor, title, description, headerAddon, checkoutPath, showCheckoutAction, showClearAction, editable, summaryAddon, pricingSummary, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): JSX.Element;
|
|
3575
|
+
export declare function StorefrontCartPanel({ lines, itemCount, baseUnitLabel, totalMinor, title, description, headerAddon, checkoutPath, showCheckoutAction, showClearAction, editable, summaryAddon, pricingSummary, presentation, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): JSX.Element;
|
|
3576
3576
|
|
|
3577
3577
|
declare type StorefrontCartPanelProps = {
|
|
3578
3578
|
lines: StorefrontCartSummaryLine[];
|
|
@@ -3588,6 +3588,7 @@ declare type StorefrontCartPanelProps = {
|
|
|
3588
3588
|
editable?: boolean;
|
|
3589
3589
|
summaryAddon?: ReactNode;
|
|
3590
3590
|
pricingSummary?: ReactNode;
|
|
3591
|
+
presentation?: "card" | "flat";
|
|
3591
3592
|
stickyTopClassName?: string;
|
|
3592
3593
|
onQuantityChange?: (key: string, quantity: number) => void;
|
|
3593
3594
|
onRemove?: (key: string) => void;
|
|
@@ -4388,6 +4389,9 @@ export declare const storefrontEn: {
|
|
|
4388
4389
|
checkout_booking_period_edit: string;
|
|
4389
4390
|
checkout_summary_title: string;
|
|
4390
4391
|
checkout_summary_description: string;
|
|
4392
|
+
checkout_mobile_summary_button: string;
|
|
4393
|
+
checkout_mobile_submit: string;
|
|
4394
|
+
checkout_mobile_continue_to_payment: string;
|
|
4391
4395
|
checkout_booking_subtotal: string;
|
|
4392
4396
|
checkout_estimated_duration: string;
|
|
4393
4397
|
checkout_estimated_total: string;
|
|
@@ -4947,6 +4951,9 @@ export declare const storefrontFr: {
|
|
|
4947
4951
|
checkout_booking_period_edit: string;
|
|
4948
4952
|
checkout_summary_title: string;
|
|
4949
4953
|
checkout_summary_description: string;
|
|
4954
|
+
checkout_mobile_summary_button: string;
|
|
4955
|
+
checkout_mobile_submit: string;
|
|
4956
|
+
checkout_mobile_continue_to_payment: string;
|
|
4950
4957
|
checkout_booking_subtotal: string;
|
|
4951
4958
|
checkout_estimated_duration: string;
|
|
4952
4959
|
checkout_estimated_total: string;
|
|
@@ -6993,13 +7000,15 @@ export declare function validateBookingDeliveryAddress(input: BookingDeliveryAdd
|
|
|
6993
7000
|
|
|
6994
7001
|
declare type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
6995
7002
|
|
|
6996
|
-
export declare const WhatsAppFloatingButton: (
|
|
7003
|
+
export declare const WhatsAppFloatingButton: ({ avoidMobileBottomBar, ...options }: WhatsAppFloatingButtonProps) => JSX.Element | null;
|
|
6997
7004
|
|
|
6998
7005
|
export declare interface WhatsAppFloatingButtonOptions {
|
|
6999
7006
|
href?: string;
|
|
7000
7007
|
}
|
|
7001
7008
|
|
|
7002
|
-
declare type WhatsAppFloatingButtonProps = WhatsAppFloatingButtonOptions
|
|
7009
|
+
declare type WhatsAppFloatingButtonProps = WhatsAppFloatingButtonOptions & {
|
|
7010
|
+
avoidMobileBottomBar?: boolean;
|
|
7011
|
+
};
|
|
7003
7012
|
|
|
7004
7013
|
export declare const writeBookingSearchParamsToSessionStorage: (storeSlug: string | undefined, booking: Partial<StorefrontBookingParams> | URLSearchParams) => void;
|
|
7005
7014
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckoutPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPage.tsx"],"names":[],"mappings":"AAsFA,MAAM,CAAC,OAAO,UAAU,YAAY,4CAorBnC"}
|