@loczer/storefront-sdk 0.231.0 → 0.232.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/ui/dist/LanguagePicker/index-D7_3voTe.js +83 -0
- package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -1
- package/dist/components/BookingBikeQuickAddCard/index.js +0 -3
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +7 -9
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +62 -56
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +56 -56
- package/dist/components/LanguageSelector/index.d.ts.map +1 -1
- package/dist/components/LanguageSelector/index.js +19 -64
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +3 -1
- package/dist/i18n/fr.d.ts +2 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +3 -1
- package/dist/index.d.ts +5 -0
- package/dist/lib/cart.d.ts +1 -0
- package/dist/lib/cart.d.ts.map +1 -1
- package/dist/lib/cart.js +2 -0
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +292 -292
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +107 -103
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +117 -171
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +31 -31
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts +7 -0
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts.map +1 -0
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.js +105 -0
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-j1CgFGLe.js → MorphingModalWizard-Q8O5Rjfq.js} +1 -1
|
@@ -5,46 +5,46 @@ import { buildStorefrontImageUrl as r } from "../../lib/storefrontImage.js";
|
|
|
5
5
|
import ee from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
|
|
6
6
|
import { MISSING_SHOP_EMAIL as te } from "../../lib/storefrontMissingValues.js";
|
|
7
7
|
import { formatStorefrontAddressTagline as i } from "../../lib/storefrontAddress.js";
|
|
8
|
-
import { Badge as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { LanguageSelector as
|
|
11
|
-
import { Drawer as
|
|
8
|
+
import { Badge as ne } from "../../ui/badge.js";
|
|
9
|
+
import { Button as a } from "../../ui/button.js";
|
|
10
|
+
import { LanguageSelector as o } from "../LanguageSelector/index.js";
|
|
11
|
+
import { Drawer as re, DrawerClose as s, DrawerContent as c, DrawerDescription as l, DrawerHeader as u, DrawerTitle as d, DrawerTrigger as ie } from "../../ui/drawer.js";
|
|
12
12
|
import { useOptionalStorefront as ae } from "../../StorefrontContext.js";
|
|
13
13
|
import { useState as oe } from "react";
|
|
14
14
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
15
|
-
import { useMediaQuery as
|
|
15
|
+
import { useMediaQuery as se, useThrottledMeasure as m } from "@rpcbase/client";
|
|
16
16
|
import { Link as h, useLocation as ce, useParams as le } from "@rpcbase/router";
|
|
17
17
|
import { useTranslation as ue } from "react-i18next";
|
|
18
|
-
import { cn as
|
|
18
|
+
import { cn as de, useScrollHideOnDown as g } from "@rpcbase/ui";
|
|
19
19
|
import { ArrowRight as _, Menu as v, ShoppingCart as y } from "lucide-react";
|
|
20
20
|
//#region src/components/Header/index.tsx
|
|
21
|
-
var
|
|
21
|
+
var fe = 36, b = (e, t) => {
|
|
22
22
|
let n = e?.trim() ?? "";
|
|
23
23
|
return n ? r(n, t ?? "") : "";
|
|
24
24
|
};
|
|
25
|
-
function
|
|
26
|
-
let { t:
|
|
25
|
+
function x({ storefrontConfiguration: r, whatsappHref: x, whatsappPhoneDisplay: S }) {
|
|
26
|
+
let { t: C, i18n: w } = ue(), T = ae(), { storeSlug: E } = le(), pe = ce(), { itemCount: D, isReady: O } = n(), k = se("(max-width: 640px)"), [A, j] = oe(!1), [M, N] = m(), P = N?.height ?? fe, F = g({
|
|
27
27
|
enabled: k,
|
|
28
28
|
thresholdPx: P
|
|
29
|
-
}), I = k && F ? `translateY(-${P}px)` : "translateY(0)", L = `/${
|
|
29
|
+
}), I = k && F ? `translateY(-${P}px)` : "translateY(0)", L = `/${E ?? ""}`, R = e(new URLSearchParams(pe.search), E), z = R.toString(), B = !!(R.get("start_time")?.trim() && R.get("end_time")?.trim()), V = z ? `?${z}` : "", H = `${L}/booking${V}`, me = `${L}/checkout${V}`, he = D > 0 && B ? me : H, U = r?.shop.name?.trim() ?? "", W = r?.shop.emailAddress?.trim() ?? "", G = r?.workspace?.workspaceLanguage, K = r?.workspace?.languages, q = t(r?.content?.tagline, w.language, G).trim(), J = i(r?.shop), Y = q || J || "[Missing shop address]", ge = !q && !J, _e = t(r?.content?.topBannerMessage, w.language, G).trim() || C("top_bar_message"), X = b(r?.content?.logoWideImageId, E), Z = b(r?.shop.logoImageId ?? r?.content?.logoSquareImageId, E), Q = X.length > 0, $ = Z.length > 0, ve = [
|
|
30
30
|
{
|
|
31
|
-
label:
|
|
31
|
+
label: C("nav_categories"),
|
|
32
32
|
to: `${L}${V}#categories`
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
label:
|
|
35
|
+
label: C("nav_featured"),
|
|
36
36
|
to: `${L}${V}#featured`
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
label:
|
|
39
|
+
label: C("nav_products"),
|
|
40
40
|
to: H
|
|
41
41
|
},
|
|
42
|
-
...(
|
|
43
|
-
label:
|
|
42
|
+
...(T?.itineraries.length ?? 0) > 0 ? [{
|
|
43
|
+
label: C("nav_itineraries"),
|
|
44
44
|
to: `${L}/itineraries`
|
|
45
45
|
}] : [],
|
|
46
46
|
{
|
|
47
|
-
label:
|
|
47
|
+
label: C("nav_contact"),
|
|
48
48
|
to: `${L}${V}#contact`
|
|
49
49
|
}
|
|
50
50
|
];
|
|
@@ -60,21 +60,21 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
|
|
|
60
60
|
className: "mx-auto flex max-w-7xl items-center justify-start gap-3 px-4 py-2 text-left text-xs leading-4 sm:justify-between sm:px-6",
|
|
61
61
|
children: [/* @__PURE__ */ f("p", {
|
|
62
62
|
className: "w-full min-w-0 break-words sm:w-auto",
|
|
63
|
-
children: /* @__PURE__ */ f("span", { children:
|
|
63
|
+
children: /* @__PURE__ */ f("span", { children: _e })
|
|
64
64
|
}), /* @__PURE__ */ p("div", {
|
|
65
65
|
className: "hidden items-center gap-4 sm:flex",
|
|
66
|
-
children: [
|
|
66
|
+
children: [x ? /* @__PURE__ */ p("a", {
|
|
67
67
|
className: "inline-flex items-center gap-2 rounded-md px-2 py-1 text-white/90 hover:bg-white/10 hover:text-white",
|
|
68
|
-
href:
|
|
68
|
+
href: x,
|
|
69
69
|
target: "_blank",
|
|
70
70
|
rel: "noreferrer",
|
|
71
|
-
"aria-label": `WhatsApp${
|
|
71
|
+
"aria-label": `WhatsApp${S ? ` ${S}` : ""}`,
|
|
72
72
|
children: [/* @__PURE__ */ f("img", {
|
|
73
73
|
src: ee,
|
|
74
74
|
className: "h-5 w-5 shrink-0",
|
|
75
75
|
alt: "",
|
|
76
76
|
"aria-hidden": "true"
|
|
77
|
-
}),
|
|
77
|
+
}), S ? /* @__PURE__ */ f("span", { children: S }) : null]
|
|
78
78
|
}) : null, W ? /* @__PURE__ */ f("a", {
|
|
79
79
|
className: "inline-flex items-center gap-2 rounded-md px-2 py-1 text-white/90 hover:bg-white/10 hover:text-white",
|
|
80
80
|
href: `mailto:${W}`,
|
|
@@ -121,7 +121,7 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
|
|
|
121
121
|
className: "truncate text-sm font-semibold",
|
|
122
122
|
children: U
|
|
123
123
|
}), /* @__PURE__ */ f("span", {
|
|
124
|
-
className:
|
|
124
|
+
className: de("truncate text-xs text-slate-600", ge && "text-destructive"),
|
|
125
125
|
children: Y
|
|
126
126
|
})]
|
|
127
127
|
})]
|
|
@@ -132,45 +132,45 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
|
|
|
132
132
|
/* @__PURE__ */ f(h, {
|
|
133
133
|
className: "hover:text-slate-950",
|
|
134
134
|
to: `${L}${V}#categories`,
|
|
135
|
-
children: /* @__PURE__ */ f("span", { children:
|
|
135
|
+
children: /* @__PURE__ */ f("span", { children: C("nav_categories") })
|
|
136
136
|
}),
|
|
137
137
|
/* @__PURE__ */ f(h, {
|
|
138
138
|
className: "hover:text-slate-950",
|
|
139
139
|
to: `${L}${V}#featured`,
|
|
140
|
-
children: /* @__PURE__ */ f("span", { children:
|
|
140
|
+
children: /* @__PURE__ */ f("span", { children: C("nav_featured") })
|
|
141
141
|
}),
|
|
142
142
|
/* @__PURE__ */ f(h, {
|
|
143
143
|
className: "hover:text-slate-950",
|
|
144
144
|
to: H,
|
|
145
|
-
children: /* @__PURE__ */ f("span", { children:
|
|
145
|
+
children: /* @__PURE__ */ f("span", { children: C("nav_products") })
|
|
146
146
|
}),
|
|
147
|
-
(
|
|
147
|
+
(T?.itineraries.length ?? 0) > 0 ? /* @__PURE__ */ f(h, {
|
|
148
148
|
className: "hover:text-slate-950",
|
|
149
149
|
to: `${L}/itineraries`,
|
|
150
|
-
children: /* @__PURE__ */ f("span", { children:
|
|
150
|
+
children: /* @__PURE__ */ f("span", { children: C("nav_itineraries") })
|
|
151
151
|
}) : null,
|
|
152
152
|
/* @__PURE__ */ f(h, {
|
|
153
153
|
className: "hover:text-slate-950",
|
|
154
154
|
to: `${L}${V}#contact`,
|
|
155
|
-
children: /* @__PURE__ */ f("span", { children:
|
|
155
|
+
children: /* @__PURE__ */ f("span", { children: C("nav_contact") })
|
|
156
156
|
})
|
|
157
157
|
]
|
|
158
158
|
}),
|
|
159
159
|
/* @__PURE__ */ p("div", {
|
|
160
160
|
className: "flex shrink-0 items-center gap-1.5 sm:gap-2",
|
|
161
161
|
children: [
|
|
162
|
-
/* @__PURE__ */ f(
|
|
162
|
+
/* @__PURE__ */ f(o, {
|
|
163
163
|
languages: K,
|
|
164
164
|
className: "hidden sm:inline-flex"
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */ f(
|
|
166
|
+
/* @__PURE__ */ f(a, {
|
|
167
167
|
asChild: !0,
|
|
168
168
|
variant: "outline",
|
|
169
169
|
size: "sm",
|
|
170
|
-
className:
|
|
170
|
+
className: "relative h-9 w-9 gap-2 px-0 sm:w-auto sm:px-3",
|
|
171
171
|
children: /* @__PURE__ */ p(h, {
|
|
172
|
-
to:
|
|
173
|
-
"aria-label": `${
|
|
172
|
+
to: he,
|
|
173
|
+
"aria-label": O ? `${C("cart_button")} (${D})` : C("cart_button"),
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ f(y, {
|
|
176
176
|
className: "h-4 w-4",
|
|
@@ -178,30 +178,30 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
|
|
|
178
178
|
}),
|
|
179
179
|
/* @__PURE__ */ f("span", {
|
|
180
180
|
className: "hidden sm:inline",
|
|
181
|
-
children:
|
|
181
|
+
children: C("cart_button")
|
|
182
182
|
}),
|
|
183
|
-
/* @__PURE__ */ f(
|
|
183
|
+
O && D > 0 ? /* @__PURE__ */ f(ne, {
|
|
184
184
|
className: "absolute -right-2 -top-2 h-5 min-w-5 rounded-full px-1.5 text-xs",
|
|
185
|
-
children: /* @__PURE__ */ f("span", { children:
|
|
186
|
-
})
|
|
185
|
+
children: /* @__PURE__ */ f("span", { children: D })
|
|
186
|
+
}) : null
|
|
187
187
|
]
|
|
188
188
|
})
|
|
189
189
|
}),
|
|
190
|
-
/* @__PURE__ */ f(
|
|
190
|
+
/* @__PURE__ */ f(a, {
|
|
191
191
|
asChild: !0,
|
|
192
192
|
size: "sm",
|
|
193
193
|
className: "h-9 gap-1.5 px-2 sm:gap-2 sm:px-3",
|
|
194
194
|
children: /* @__PURE__ */ p(h, {
|
|
195
195
|
to: H,
|
|
196
|
-
"aria-label":
|
|
196
|
+
"aria-label": C("cta_book_now"),
|
|
197
197
|
children: [
|
|
198
198
|
/* @__PURE__ */ f("span", {
|
|
199
199
|
className: "sm:hidden",
|
|
200
|
-
children:
|
|
200
|
+
children: C("cta_book_short")
|
|
201
201
|
}),
|
|
202
202
|
/* @__PURE__ */ f("span", {
|
|
203
203
|
className: "hidden sm:inline",
|
|
204
|
-
children:
|
|
204
|
+
children: C("cta_book_now")
|
|
205
205
|
}),
|
|
206
206
|
/* @__PURE__ */ f(_, {
|
|
207
207
|
className: "h-4 w-4",
|
|
@@ -210,40 +210,40 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
|
|
|
210
210
|
]
|
|
211
211
|
})
|
|
212
212
|
}),
|
|
213
|
-
/* @__PURE__ */ p(
|
|
213
|
+
/* @__PURE__ */ p(re, {
|
|
214
214
|
open: A,
|
|
215
215
|
onOpenChange: j,
|
|
216
216
|
direction: "right",
|
|
217
217
|
children: [/* @__PURE__ */ f(ie, {
|
|
218
218
|
asChild: !0,
|
|
219
|
-
children: /* @__PURE__ */ f(
|
|
219
|
+
children: /* @__PURE__ */ f(a, {
|
|
220
220
|
type: "button",
|
|
221
221
|
variant: "outline",
|
|
222
222
|
size: "icon",
|
|
223
223
|
className: "h-9 w-9 md:hidden",
|
|
224
|
-
"aria-label":
|
|
224
|
+
"aria-label": C("mobile_menu_open"),
|
|
225
225
|
children: /* @__PURE__ */ f(v, {
|
|
226
226
|
className: "h-4 w-4",
|
|
227
227
|
"aria-hidden": "true"
|
|
228
228
|
})
|
|
229
229
|
})
|
|
230
|
-
}), /* @__PURE__ */ p(
|
|
230
|
+
}), /* @__PURE__ */ p(c, {
|
|
231
231
|
className: "w-[min(22rem,calc(100vw-1.5rem))] bg-white",
|
|
232
|
-
"aria-label":
|
|
233
|
-
closeLabel:
|
|
232
|
+
"aria-label": C("mobile_menu_label"),
|
|
233
|
+
closeLabel: C("mobile_menu_close"),
|
|
234
234
|
showCloseButton: !0,
|
|
235
235
|
children: [
|
|
236
|
-
/* @__PURE__ */ p(
|
|
236
|
+
/* @__PURE__ */ p(u, {
|
|
237
237
|
className: "border-b border-slate-200 px-5 pb-4 pt-6 text-left",
|
|
238
|
-
children: [/* @__PURE__ */ f(
|
|
238
|
+
children: [/* @__PURE__ */ f(d, { children: U }), /* @__PURE__ */ f(l, {
|
|
239
239
|
className: "break-words",
|
|
240
240
|
children: Y
|
|
241
241
|
})]
|
|
242
242
|
}),
|
|
243
243
|
/* @__PURE__ */ f("nav", {
|
|
244
244
|
className: "grid gap-1 overflow-y-auto p-3",
|
|
245
|
-
"aria-label":
|
|
246
|
-
children:
|
|
245
|
+
"aria-label": C("mobile_menu_label"),
|
|
246
|
+
children: ve.map((e) => /* @__PURE__ */ f(s, {
|
|
247
247
|
asChild: !0,
|
|
248
248
|
children: /* @__PURE__ */ f(h, {
|
|
249
249
|
to: e.to,
|
|
@@ -254,20 +254,20 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
|
|
|
254
254
|
}),
|
|
255
255
|
/* @__PURE__ */ p("div", {
|
|
256
256
|
className: "mt-auto grid gap-3 border-t border-slate-200 p-4",
|
|
257
|
-
children: [/* @__PURE__ */ f(
|
|
257
|
+
children: [/* @__PURE__ */ f(s, {
|
|
258
258
|
asChild: !0,
|
|
259
|
-
children: /* @__PURE__ */ f(
|
|
259
|
+
children: /* @__PURE__ */ f(a, {
|
|
260
260
|
asChild: !0,
|
|
261
261
|
className: "w-full gap-2",
|
|
262
262
|
children: /* @__PURE__ */ p(h, {
|
|
263
263
|
to: H,
|
|
264
|
-
children: [/* @__PURE__ */ f("span", { children:
|
|
264
|
+
children: [/* @__PURE__ */ f("span", { children: C("cta_book_now") }), /* @__PURE__ */ f(_, {
|
|
265
265
|
className: "h-4 w-4",
|
|
266
266
|
"aria-hidden": "true"
|
|
267
267
|
})]
|
|
268
268
|
})
|
|
269
269
|
})
|
|
270
|
-
}), /* @__PURE__ */ f(
|
|
270
|
+
}), /* @__PURE__ */ f(o, {
|
|
271
271
|
languages: K,
|
|
272
272
|
className: "h-10 w-full justify-between"
|
|
273
273
|
})]
|
|
@@ -283,4 +283,4 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
|
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
|
-
export {
|
|
286
|
+
export { x as Header };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSelector/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSelector/index.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;CACnC,CAAA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,SAAS,EACT,KAAa,GACd,EAAE,qBAAqB,kDAqBvB"}
|
|
@@ -1,69 +1,24 @@
|
|
|
1
1
|
import { normalizeStorefrontI18nLanguage as e, resolveStorefrontI18nLanguageOptions as t } from "../../i18n/languages.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as i
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { ChevronDown as c } from "lucide-react";
|
|
8
|
-
import { Menu as l } from "@base-ui/react/menu";
|
|
2
|
+
import { storefrontButtonRadiusClassName as n } from "../../ui/button.js";
|
|
3
|
+
import { LanguagePicker as r } from "../../chunks/pkg/ui/dist/LanguagePicker/index-D7_3voTe.js";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
import { useTranslation as a } from "react-i18next";
|
|
6
|
+
import { cn as o } from "@rpcbase/ui";
|
|
9
7
|
//#region src/components/LanguageSelector/index.tsx
|
|
10
|
-
function
|
|
11
|
-
let { t:
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"data-testid": "storefront-language-selector-trigger",
|
|
24
|
-
children: [/* @__PURE__ */ a("span", {
|
|
25
|
-
className: "flex items-center gap-1",
|
|
26
|
-
children: [/* @__PURE__ */ i("span", {
|
|
27
|
-
"aria-hidden": "true",
|
|
28
|
-
children: y.flag
|
|
29
|
-
}), /* @__PURE__ */ i("span", { children: y.code })]
|
|
30
|
-
}), /* @__PURE__ */ i(c, {
|
|
31
|
-
className: "size-3.5",
|
|
32
|
-
"aria-hidden": "true"
|
|
33
|
-
})]
|
|
34
|
-
})
|
|
35
|
-
}), /* @__PURE__ */ i(l.Portal, { children: /* @__PURE__ */ i(l.Positioner, {
|
|
36
|
-
align: f,
|
|
37
|
-
sideOffset: 4,
|
|
38
|
-
positionMethod: "fixed",
|
|
39
|
-
className: "z-[60]",
|
|
40
|
-
collisionPadding: 8,
|
|
41
|
-
collisionAvoidance: {
|
|
42
|
-
side: "flip",
|
|
43
|
-
align: "shift",
|
|
44
|
-
fallbackAxisSide: "none"
|
|
45
|
-
},
|
|
46
|
-
children: /* @__PURE__ */ i(l.Popup, {
|
|
47
|
-
className: "min-w-44 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-opacity duration-75 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0",
|
|
48
|
-
children: _.map((e) => /* @__PURE__ */ a(l.Item, {
|
|
49
|
-
onClick: (t) => {
|
|
50
|
-
t.defaultPrevented || (m.changeLanguage(e.code), g(!1));
|
|
51
|
-
},
|
|
52
|
-
className: s("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground", y.code === e.code && "bg-accent"),
|
|
53
|
-
"data-testid": `storefront-language-selector-option-${e.code}`,
|
|
54
|
-
children: [/* @__PURE__ */ i("span", {
|
|
55
|
-
"aria-hidden": "true",
|
|
56
|
-
children: e.flag
|
|
57
|
-
}), /* @__PURE__ */ a("span", { children: [
|
|
58
|
-
e.name,
|
|
59
|
-
" (",
|
|
60
|
-
e.code.toUpperCase(),
|
|
61
|
-
")"
|
|
62
|
-
] })]
|
|
63
|
-
}, e.code))
|
|
64
|
-
})
|
|
65
|
-
}) })]
|
|
8
|
+
function s({ languages: s, className: c, align: l = "end" }) {
|
|
9
|
+
let { t: u, i18n: d } = a(), f = t(s), p = e(d.resolvedLanguage ?? d.language);
|
|
10
|
+
return f.length < 2 ? null : /* @__PURE__ */ i(r, {
|
|
11
|
+
value: p ?? f[0].code,
|
|
12
|
+
onValueChange: (e) => {
|
|
13
|
+
d.changeLanguage(e);
|
|
14
|
+
},
|
|
15
|
+
options: f,
|
|
16
|
+
align: l,
|
|
17
|
+
ariaLabel: u("language_selector_label"),
|
|
18
|
+
triggerClassName: o("h-9 px-2", n, c),
|
|
19
|
+
triggerTestId: "storefront-language-selector-trigger",
|
|
20
|
+
optionTestIdPrefix: "storefront-language-selector-option"
|
|
66
21
|
});
|
|
67
22
|
}
|
|
68
23
|
//#endregion
|
|
69
|
-
export {
|
|
24
|
+
export { s as LanguageSelector };
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -183,6 +183,7 @@ export declare const storefront: {
|
|
|
183
183
|
cart_empty: string;
|
|
184
184
|
cart_empty_title: string;
|
|
185
185
|
cart_empty_description: string;
|
|
186
|
+
cart_loading: string;
|
|
186
187
|
cart_line_meta: string;
|
|
187
188
|
remove_from_cart: string;
|
|
188
189
|
cart_total: string;
|
|
@@ -298,6 +299,7 @@ export declare const storefront: {
|
|
|
298
299
|
docs_contract_sale_quote_date_label: string;
|
|
299
300
|
docs_contract_sale_credit_note_date_label: string;
|
|
300
301
|
docs_contract_sale_due_date_label: string;
|
|
302
|
+
docs_contract_sale_issuer_label: string;
|
|
301
303
|
docs_contract_sale_invoice_recipient_label: string;
|
|
302
304
|
docs_contract_sale_credit_note_recipient_label: string;
|
|
303
305
|
docs_contract_sale_legal_description_label: 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6gBtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -184,6 +184,7 @@ var e = {
|
|
|
184
184
|
cart_empty: "Your cart is empty.",
|
|
185
185
|
cart_empty_title: "Your cart is empty",
|
|
186
186
|
cart_empty_description: "Add a bike (and accessories) to continue.",
|
|
187
|
+
cart_loading: "Loading cart…",
|
|
187
188
|
cart_line_meta: "Qty {{quantity}} · {{price}} / {{unit}}",
|
|
188
189
|
remove_from_cart: "Remove from cart",
|
|
189
190
|
cart_total: "Total",
|
|
@@ -299,7 +300,8 @@ var e = {
|
|
|
299
300
|
docs_contract_sale_quote_date_label: "Quote Date:",
|
|
300
301
|
docs_contract_sale_credit_note_date_label: "Credit Note Date:",
|
|
301
302
|
docs_contract_sale_due_date_label: "Due Date:",
|
|
302
|
-
|
|
303
|
+
docs_contract_sale_issuer_label: "Issuer:",
|
|
304
|
+
docs_contract_sale_invoice_recipient_label: "Billed To:",
|
|
303
305
|
docs_contract_sale_credit_note_recipient_label: "Issued To:",
|
|
304
306
|
docs_contract_sale_legal_description_label: "Description",
|
|
305
307
|
docs_contract_sale_legal_company_registration_label: "Company registration no.",
|
package/dist/i18n/fr.d.ts
CHANGED
|
@@ -184,6 +184,7 @@ export declare const storefront: {
|
|
|
184
184
|
cart_empty: string;
|
|
185
185
|
cart_empty_title: string;
|
|
186
186
|
cart_empty_description: string;
|
|
187
|
+
cart_loading: string;
|
|
187
188
|
cart_line_meta: string;
|
|
188
189
|
remove_from_cart: string;
|
|
189
190
|
cart_total: string;
|
|
@@ -299,6 +300,7 @@ export declare const storefront: {
|
|
|
299
300
|
docs_contract_sale_quote_date_label: string;
|
|
300
301
|
docs_contract_sale_credit_note_date_label: string;
|
|
301
302
|
docs_contract_sale_due_date_label: string;
|
|
303
|
+
docs_contract_sale_issuer_label: string;
|
|
302
304
|
docs_contract_sale_invoice_recipient_label: string;
|
|
303
305
|
docs_contract_sale_credit_note_recipient_label: string;
|
|
304
306
|
docs_contract_sale_legal_description_label: 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8gBtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -185,6 +185,7 @@ var e = {
|
|
|
185
185
|
cart_empty: "Votre panier est vide.",
|
|
186
186
|
cart_empty_title: "Votre panier est vide",
|
|
187
187
|
cart_empty_description: "Ajoutez un vélo (et des accessoires) pour continuer.",
|
|
188
|
+
cart_loading: "Chargement du panier…",
|
|
188
189
|
cart_line_meta: "Qté {{quantity}} · {{price}} / {{unit}}",
|
|
189
190
|
remove_from_cart: "Retirer du panier",
|
|
190
191
|
cart_total: "Total",
|
|
@@ -300,7 +301,8 @@ var e = {
|
|
|
300
301
|
docs_contract_sale_quote_date_label: "Date du devis :",
|
|
301
302
|
docs_contract_sale_credit_note_date_label: "Date de l'avoir :",
|
|
302
303
|
docs_contract_sale_due_date_label: "Date d'échéance :",
|
|
303
|
-
|
|
304
|
+
docs_contract_sale_issuer_label: "Émetteur :",
|
|
305
|
+
docs_contract_sale_invoice_recipient_label: "Client :",
|
|
304
306
|
docs_contract_sale_credit_note_recipient_label: "Émis à :",
|
|
305
307
|
docs_contract_sale_legal_description_label: "Description",
|
|
306
308
|
docs_contract_sale_legal_company_registration_label: "N° d’immatriculation",
|
package/dist/index.d.ts
CHANGED
|
@@ -3550,6 +3550,7 @@ export declare const storefrontButtonRadiusClassName = "rounded-[var(--storefron
|
|
|
3550
3550
|
declare type StorefrontCartContextValue = {
|
|
3551
3551
|
items: StorefrontCartItem[];
|
|
3552
3552
|
itemCount: number;
|
|
3553
|
+
isReady: boolean;
|
|
3553
3554
|
addItem: (item: Omit<StorefrontCartItem, "key"> & {
|
|
3554
3555
|
key?: string;
|
|
3555
3556
|
}) => void;
|
|
@@ -4360,6 +4361,7 @@ export declare const storefrontEn: {
|
|
|
4360
4361
|
cart_empty: string;
|
|
4361
4362
|
cart_empty_title: string;
|
|
4362
4363
|
cart_empty_description: string;
|
|
4364
|
+
cart_loading: string;
|
|
4363
4365
|
cart_line_meta: string;
|
|
4364
4366
|
remove_from_cart: string;
|
|
4365
4367
|
cart_total: string;
|
|
@@ -4475,6 +4477,7 @@ export declare const storefrontEn: {
|
|
|
4475
4477
|
docs_contract_sale_quote_date_label: string;
|
|
4476
4478
|
docs_contract_sale_credit_note_date_label: string;
|
|
4477
4479
|
docs_contract_sale_due_date_label: string;
|
|
4480
|
+
docs_contract_sale_issuer_label: string;
|
|
4478
4481
|
docs_contract_sale_invoice_recipient_label: string;
|
|
4479
4482
|
docs_contract_sale_credit_note_recipient_label: string;
|
|
4480
4483
|
docs_contract_sale_legal_description_label: string;
|
|
@@ -4917,6 +4920,7 @@ export declare const storefrontFr: {
|
|
|
4917
4920
|
cart_empty: string;
|
|
4918
4921
|
cart_empty_title: string;
|
|
4919
4922
|
cart_empty_description: string;
|
|
4923
|
+
cart_loading: string;
|
|
4920
4924
|
cart_line_meta: string;
|
|
4921
4925
|
remove_from_cart: string;
|
|
4922
4926
|
cart_total: string;
|
|
@@ -5032,6 +5036,7 @@ export declare const storefrontFr: {
|
|
|
5032
5036
|
docs_contract_sale_quote_date_label: string;
|
|
5033
5037
|
docs_contract_sale_credit_note_date_label: string;
|
|
5034
5038
|
docs_contract_sale_due_date_label: string;
|
|
5039
|
+
docs_contract_sale_issuer_label: string;
|
|
5035
5040
|
docs_contract_sale_invoice_recipient_label: string;
|
|
5036
5041
|
docs_contract_sale_credit_note_recipient_label: string;
|
|
5037
5042
|
docs_contract_sale_legal_description_label: string;
|
package/dist/lib/cart.d.ts
CHANGED
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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"}
|
package/dist/lib/cart.js
CHANGED
|
@@ -146,6 +146,7 @@ function h({ storeSlug: e, products: t, children: r }) {
|
|
|
146
146
|
}), k = O.reduce((e, t) => e + t.quantity, 0), A = a(() => ({
|
|
147
147
|
items: O,
|
|
148
148
|
itemCount: k,
|
|
149
|
+
isReady: h,
|
|
149
150
|
addItem: x,
|
|
150
151
|
setQuantity: S,
|
|
151
152
|
removeItem: C,
|
|
@@ -161,6 +162,7 @@ function h({ storeSlug: e, products: t, children: r }) {
|
|
|
161
162
|
T,
|
|
162
163
|
k,
|
|
163
164
|
O,
|
|
165
|
+
h,
|
|
164
166
|
C,
|
|
165
167
|
S
|
|
166
168
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingPage.d.ts","sourceRoot":"","sources":["../../src/pages/BookingPage.tsx"],"names":[],"mappings":"AA+MA,MAAM,CAAC,OAAO,UAAU,WAAW,
|
|
1
|
+
{"version":3,"file":"BookingPage.d.ts","sourceRoot":"","sources":["../../src/pages/BookingPage.tsx"],"names":[],"mappings":"AA+MA,MAAM,CAAC,OAAO,UAAU,WAAW,4CA+qBlC"}
|