@loczer/storefront-sdk 0.194.0 → 0.195.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/pkg/ui/dist/{Button-CxG2fSpA.js → Button-Cr_u8vnh.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{Dialog-4leTWiev.js → Dialog-CczmPDwY.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Drawer/{index-DA5V7R_q.js → index-CSvSVP_J.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Map/{MapContent-BmKjdWmq.js → MapContent-CDeWtwKa.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{Map-CsOTdTtL.js → Map-Cs7wgtH9.js} +2 -2
- package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-CfEqkJ0y.js → MorphingModalWizard-j1CgFGLe.js} +4 -3
- package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-C6IWYoIg.js → ResponsiveDialog-BVwhTZQo.js} +3 -3
- package/dist/chunks/pkg/ui/dist/{ScrollArea-Bjwo84cv.js → ScrollArea-BqLd0xZj.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Spinner/{index-DzMEU0iA.js → index-Cgi70z_E.js} +1 -1
- package/dist/chunks/pkg/ui/dist/lib/utils-DXB19bzk.js +8 -0
- package/dist/components/BikeProductCard/index.js +6 -6
- package/dist/components/BookingBikeVariantDialog/index.js +7 -7
- package/dist/components/BookingFlowSteps/index.js +11 -11
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.js +16 -18
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts +36 -0
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +830 -0
- package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.d.ts +2 -0
- package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.js +21 -0
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +35 -35
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +4 -4
- package/dist/components/ContractSaleDocument/ThumbnailSidebar.js +1 -1
- package/dist/components/DeliveryAddressSelector/index.js +5 -5
- package/dist/components/Footer/index.js +11 -11
- package/dist/components/FulfillmentSection/index.js +9 -9
- package/dist/components/Header/index.js +61 -61
- package/dist/components/Map/index.js +1 -1
- package/dist/components/PoweredByLoczerBadge/index.js +5 -5
- package/dist/components/ProductPriceBadge/index.js +73 -73
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +6 -6
- package/dist/components/StorefrontCartPanel/index.js +8 -8
- package/dist/components/StorefrontInsuranceNotice/index.js +6 -6
- package/dist/components/StorefrontPopupMessages/index.js +8 -8
- package/dist/components/payment/MollieCardFieldsForm.js +1 -1
- package/dist/components/payment/StripeCardFieldsForm.js +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/lib/utils.d.ts +3 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +9 -5
- package/dist/pages/BookingPage.js +8 -8
- package/dist/pages/CheckoutPaymentPage.js +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +15 -15
- package/dist/pages/HomePage.js +19 -19
- package/dist/pages/PaymentLinkPage.js +1 -1
- package/dist/pages/PaymentLinkSuccessPage.js +1 -1
- package/dist/pages/ProductPage.js +143 -143
- package/dist/pages/checkout/components/CheckoutCouponCard.js +5 -5
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +1 -1
- package/package.json +5 -1
- package/dist/chunks/node_modules/clsx/dist/clsx-CdyIqUTr.js +0 -16
- package/dist/chunks/node_modules/tailwind-merge/dist/bundle-mjs-CF4QheV5.js +0 -1608
- package/dist/chunks/pkg/ui/dist/lib/utils-BN5KOMSm.js +0 -8
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts +0 -22
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts.map +0 -1
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.js +0 -342
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsTouchDevice.d.ts","sourceRoot":"","sources":["../../../../../src/components/BookingPeriodSelector/components/internal/useIsTouchDevice.ts"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,YA0C/B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useEffect as e, useState as t } from "react";
|
|
2
|
+
//#region src/components/BookingPeriodSelector/components/internal/useIsTouchDevice.ts
|
|
3
|
+
var n = "(pointer: coarse)";
|
|
4
|
+
function r() {
|
|
5
|
+
let [r, i] = t(!1);
|
|
6
|
+
return e(() => {
|
|
7
|
+
if (typeof window > "u") return;
|
|
8
|
+
let e = typeof window.matchMedia == "function" ? window.matchMedia(n) : void 0, t = () => {
|
|
9
|
+
let t = e?.matches ?? !1, n = typeof navigator < "u" ? navigator : void 0, r = n?.maxTouchPoints ?? 0, i = n?.msMaxTouchPoints ?? 0;
|
|
10
|
+
return t || r > 0 || i > 0;
|
|
11
|
+
}, r = () => {
|
|
12
|
+
i(t());
|
|
13
|
+
};
|
|
14
|
+
if (r(), e) {
|
|
15
|
+
if (typeof e.addEventListener == "function") return e.addEventListener("change", r), () => e.removeEventListener("change", r);
|
|
16
|
+
if (typeof e.addListener == "function") return e.addListener(r), () => e.removeListener(r);
|
|
17
|
+
}
|
|
18
|
+
}, []), r;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as useIsTouchDevice };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Locale } from 'date-fns';
|
|
2
|
-
import { HourPickerOption } from '
|
|
2
|
+
import { HourPickerOption } from './components/internal/StorefrontHourPickerField';
|
|
3
3
|
import { BookingPeriodConfig } from '../../lib/booking-period';
|
|
4
4
|
import { JourneyType, TimeSlot } from '../../lib/booking-period-time-slots';
|
|
5
5
|
export type BookingPeriodChangeMeta = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBookingPeriodController.d.ts","sourceRoot":"","sources":["../../../src/components/BookingPeriodSelector/useBookingPeriodController.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"useBookingPeriodController.d.ts","sourceRoot":"","sources":["../../../src/components/BookingPeriodSelector/useBookingPeriodController.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAA;AACvF,OAAO,EAQL,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAiC,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAGpH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,MAAM,CAAA;AAEX,MAAM,MAAM,6BAA6B,GAAG,CAC1C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AAM,CAAC,EAAE,OAAO,CAAA;KAAE,KACtE,IAAI,CAAA;IACT;;;OAGG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC;AAmHD,eAAO,MAAM,0BAA0B,GACrC,SAAS,8BAA8B,KACtC,4BAo9BF,CAAA"}
|
|
@@ -5,23 +5,23 @@ import a from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
|
|
|
5
5
|
import { MISSING_SHOP_ADDRESS as o, MISSING_SHOP_EMAIL as s, MISSING_SHOP_PHONE_NUMBER as c, UNCONFIGURED_SHOP_MAP_CENTER as l } from "../../lib/storefrontMissingValues.js";
|
|
6
6
|
import { Button as u } from "../../ui/button.js";
|
|
7
7
|
import { Input as d } from "../../ui/input.js";
|
|
8
|
-
import { useStorefront as
|
|
9
|
-
import { Form as
|
|
10
|
-
import { Textarea as
|
|
11
|
-
import { createMarkerElement as
|
|
8
|
+
import { useStorefront as f } from "../../StorefrontProvider.js";
|
|
9
|
+
import { Form as p, FormControl as m, FormField as h, FormItem as g, FormLabel as _, FormMessage as v } from "../../ui/form.js";
|
|
10
|
+
import { Textarea as y } from "../../ui/textarea.js";
|
|
11
|
+
import { createMarkerElement as ee } from "../Map/createMarkerElement.js";
|
|
12
12
|
import { Map as b } from "../Map/index.js";
|
|
13
13
|
import { z as x } from "zod";
|
|
14
14
|
import { useMemo as S } from "react";
|
|
15
15
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { toast as T } from "@rpcbase/client";
|
|
17
|
+
import { useTranslation as E } from "react-i18next";
|
|
18
|
+
import { PhoneNumberInput as D, cn as O } from "@rpcbase/ui";
|
|
19
19
|
import { Mail as k, MapPin as A, Phone as j } from "lucide-react";
|
|
20
20
|
import { useForm as M, zodResolver as N } from "@rpcbase/form";
|
|
21
21
|
//#region src/components/ContactSection/index.tsx
|
|
22
22
|
var P = (e) => e.startsWith("fr") ? "FR" : "US", F = "text-sm font-normal text-current decoration-current underline-offset-4 group-hover:underline", I = "group flex items-start gap-3 text-slate-600 transition-colors hover:text-slate-800";
|
|
23
23
|
function L({ storeSlug: L }) {
|
|
24
|
-
let { t: R, i18n: z } =
|
|
24
|
+
let { t: R, i18n: z } = E(), { storefrontConfiguration: B, mapboxToken: V } = f(), { shop: H } = B, U = r(H), W = H.emailAddress?.trim() ?? "", G = H.address?.trim() ?? "", K = n(H), q = i({
|
|
25
25
|
storefrontConfiguration: B,
|
|
26
26
|
language: z.language
|
|
27
27
|
}), J = q?.href, Y = M({
|
|
@@ -40,7 +40,7 @@ function L({ storeSlug: L }) {
|
|
|
40
40
|
}), X = S(() => {
|
|
41
41
|
let e = H.gpsCoordinates;
|
|
42
42
|
return e ? [e[1], e[0]] : null;
|
|
43
|
-
}, [H.gpsCoordinates]), Z = X ?? l, Q = S(() =>
|
|
43
|
+
}, [H.gpsCoordinates]), Z = X ?? l, Q = S(() => ee(), []), $ = S(() => X ? {
|
|
44
44
|
coords: X,
|
|
45
45
|
element: Q || void 0,
|
|
46
46
|
offset: [0, -25.5],
|
|
@@ -61,13 +61,13 @@ function L({ storeSlug: L }) {
|
|
|
61
61
|
})
|
|
62
62
|
}), i = await r.json().then((e) => t.safeParse(e)).catch(() => ({ success: !1 }));
|
|
63
63
|
if (r.ok && "success" in i && i.success && i.data.success) {
|
|
64
|
-
|
|
64
|
+
T.success(R("contact_form_success_toast")), Y.reset();
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
let a = "success" in i && i.success && i.data.error ? i.data.error : R("contact_form_error_toast");
|
|
68
|
-
|
|
68
|
+
T.error(a);
|
|
69
69
|
} catch (e) {
|
|
70
|
-
console.warn("Storefront contact form request failed", e),
|
|
70
|
+
console.warn("Storefront contact form request failed", e), T.error(R("contact_form_error_toast"));
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
return /* @__PURE__ */ C("section", {
|
|
@@ -266,45 +266,45 @@ function L({ storeSlug: L }) {
|
|
|
266
266
|
}),
|
|
267
267
|
/* @__PURE__ */ C("div", {
|
|
268
268
|
className: "mt-6",
|
|
269
|
-
children: /* @__PURE__ */ C(
|
|
269
|
+
children: /* @__PURE__ */ C(p, {
|
|
270
270
|
...Y,
|
|
271
271
|
children: /* @__PURE__ */ w("form", {
|
|
272
272
|
onSubmit: ne,
|
|
273
273
|
className: "grid gap-4",
|
|
274
274
|
children: [
|
|
275
|
-
/* @__PURE__ */ C(
|
|
275
|
+
/* @__PURE__ */ C(h, {
|
|
276
276
|
control: Y.control,
|
|
277
277
|
name: "name",
|
|
278
|
-
render: ({ field: e }) => /* @__PURE__ */ w(
|
|
279
|
-
/* @__PURE__ */ C(
|
|
280
|
-
/* @__PURE__ */ C(
|
|
278
|
+
render: ({ field: e }) => /* @__PURE__ */ w(g, { children: [
|
|
279
|
+
/* @__PURE__ */ C(_, { children: R("contact_form_name_label") }),
|
|
280
|
+
/* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(d, {
|
|
281
281
|
...e,
|
|
282
282
|
placeholder: R("contact_form_name_placeholder"),
|
|
283
283
|
className: "h-11"
|
|
284
284
|
}) }),
|
|
285
|
-
/* @__PURE__ */ C(
|
|
285
|
+
/* @__PURE__ */ C(v, {})
|
|
286
286
|
] })
|
|
287
287
|
}),
|
|
288
|
-
/* @__PURE__ */ C(
|
|
288
|
+
/* @__PURE__ */ C(h, {
|
|
289
289
|
control: Y.control,
|
|
290
290
|
name: "emailAddress",
|
|
291
|
-
render: ({ field: e }) => /* @__PURE__ */ w(
|
|
292
|
-
/* @__PURE__ */ C(
|
|
293
|
-
/* @__PURE__ */ C(
|
|
291
|
+
render: ({ field: e }) => /* @__PURE__ */ w(g, { children: [
|
|
292
|
+
/* @__PURE__ */ C(_, { children: R("contact_form_email_label") }),
|
|
293
|
+
/* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(d, {
|
|
294
294
|
...e,
|
|
295
295
|
type: "email",
|
|
296
296
|
placeholder: R("contact_form_email_placeholder"),
|
|
297
297
|
className: "h-11"
|
|
298
298
|
}) }),
|
|
299
|
-
/* @__PURE__ */ C(
|
|
299
|
+
/* @__PURE__ */ C(v, {})
|
|
300
300
|
] })
|
|
301
301
|
}),
|
|
302
|
-
/* @__PURE__ */ C(
|
|
302
|
+
/* @__PURE__ */ C(h, {
|
|
303
303
|
control: Y.control,
|
|
304
304
|
name: "phoneNumber",
|
|
305
|
-
render: ({ field: e, fieldState: t }) => /* @__PURE__ */ w(
|
|
306
|
-
/* @__PURE__ */ C(
|
|
307
|
-
/* @__PURE__ */ C(
|
|
305
|
+
render: ({ field: e, fieldState: t }) => /* @__PURE__ */ w(g, { children: [
|
|
306
|
+
/* @__PURE__ */ C(_, { children: R("contact_form_phone_label") }),
|
|
307
|
+
/* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(D, {
|
|
308
308
|
name: e.name,
|
|
309
309
|
value: e.value ?? "",
|
|
310
310
|
onBlur: e.onBlur,
|
|
@@ -316,27 +316,27 @@ function L({ storeSlug: L }) {
|
|
|
316
316
|
locale: z.language,
|
|
317
317
|
placeholder: R("contact_form_phone_placeholder"),
|
|
318
318
|
className: "relative",
|
|
319
|
-
inputClassName:
|
|
320
|
-
renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */ C(
|
|
319
|
+
inputClassName: O("flex h-11 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", t.error && "border-destructive focus-visible:ring-destructive"),
|
|
320
|
+
renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */ C(v, {
|
|
321
321
|
style: { top: "100%" },
|
|
322
322
|
children: /* @__PURE__ */ C("span", { children: e })
|
|
323
323
|
})
|
|
324
324
|
}) }),
|
|
325
|
-
t.error?.message ? /* @__PURE__ */ C(
|
|
325
|
+
t.error?.message ? /* @__PURE__ */ C(v, {}) : null
|
|
326
326
|
] })
|
|
327
327
|
}),
|
|
328
|
-
/* @__PURE__ */ C(
|
|
328
|
+
/* @__PURE__ */ C(h, {
|
|
329
329
|
control: Y.control,
|
|
330
330
|
name: "message",
|
|
331
|
-
render: ({ field: e }) => /* @__PURE__ */ w(
|
|
332
|
-
/* @__PURE__ */ C(
|
|
333
|
-
/* @__PURE__ */ C(
|
|
331
|
+
render: ({ field: e }) => /* @__PURE__ */ w(g, { children: [
|
|
332
|
+
/* @__PURE__ */ C(_, { children: R("contact_form_message_label") }),
|
|
333
|
+
/* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(y, {
|
|
334
334
|
...e,
|
|
335
335
|
rows: 5,
|
|
336
336
|
placeholder: R("contact_form_message_placeholder"),
|
|
337
337
|
className: "min-h-[132px]"
|
|
338
338
|
}) }),
|
|
339
|
-
/* @__PURE__ */ C(
|
|
339
|
+
/* @__PURE__ */ C(v, {})
|
|
340
340
|
] })
|
|
341
341
|
}),
|
|
342
342
|
/* @__PURE__ */ w("div", {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { formatContractSaleDocumentLabel as e } from "./language.js";
|
|
2
2
|
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useTranslation as i } from "react-i18next";
|
|
4
|
+
import { cn as a } from "@rpcbase/ui";
|
|
5
5
|
//#region src/components/ContractSaleDocument/DocumentAcceptanceSection.tsx
|
|
6
6
|
function o({ saleDocument: o, documentLanguage: s, formatDate: c, className: l }) {
|
|
7
|
-
let { t: u } =
|
|
7
|
+
let { t: u } = i(), d = (t, n = {}) => e(u, s, t, n), f = o.acceptance?.mode === "signature" ? o.acceptance : null, p = o.acceptance?.mode === "acceptance" ? o.acceptance : null, m = o.acceptanceLevel === "signature" || f !== null;
|
|
8
8
|
return o.acceptanceLevel === "none" && !o.acceptance ? null : /* @__PURE__ */ n("section", {
|
|
9
|
-
className:
|
|
9
|
+
className: a("mt-auto border-t border-border pt-8", l),
|
|
10
10
|
"data-testid": "contract-sale-document-acceptance-section",
|
|
11
11
|
children: m ? /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("p", {
|
|
12
12
|
className: "mb-12 text-center text-sm text-muted-foreground",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScrollArea as e } from "../../chunks/pkg/ui/dist/ScrollArea-
|
|
1
|
+
import { ScrollArea as e } from "../../chunks/pkg/ui/dist/ScrollArea-BqLd0xZj.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/ContractSaleDocument/ThumbnailSidebar.tsx
|
|
4
4
|
function r({ thumbnails: r, activePage: i, onThumbnailClick: a, totalPages: o, heightClassName: s = "h-dvh", contentClassName: c, isLoading: l = !1 }) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AddressAutocompleteInput as e } from "../AddressAutocompleteInput/index.js";
|
|
2
2
|
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
3
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useTranslation as o } from "react-i18next";
|
|
5
|
+
import { cn as s } from "@rpcbase/ui";
|
|
6
6
|
//#region src/components/DeliveryAddressSelector/index.tsx
|
|
7
7
|
function c({ startAddress: c = "", onStartAddressChange: l, returnAddress: u = "", onReturnAddressChange: d, startAddressLabel: f, startAddressPlaceholder: p, returnAddressLabel: m, returnAddressPlaceholder: h, returnAddressHelper: g, open: _ = !0, className: v, inputClassName: y, labelClassName: b, testIdPrefix: x = "storefront-delivery-address", googleMapsApiKey: S, locationRestriction: C, allowedTypes: w }) {
|
|
8
|
-
let { t: T } =
|
|
8
|
+
let { t: T } = o(), [E, D] = r(_), O = n(_);
|
|
9
9
|
t(() => {
|
|
10
10
|
O.current !== _ && (O.current = _, D(!1));
|
|
11
11
|
}, [_]);
|
|
@@ -25,12 +25,12 @@ function c({ startAddress: c = "", onStartAddressChange: l, returnAddress: u = "
|
|
|
25
25
|
labelClassName: b
|
|
26
26
|
};
|
|
27
27
|
return /* @__PURE__ */ i("div", {
|
|
28
|
-
className:
|
|
28
|
+
className: s("flow-root transition-[max-height] duration-300 ease-in-out", _ && E ? "overflow-visible" : "overflow-hidden", _ ? "max-h-[360px]" : "max-h-0"),
|
|
29
29
|
"aria-hidden": !_,
|
|
30
30
|
"data-testid": x,
|
|
31
31
|
onTransitionEnd: k,
|
|
32
32
|
children: /* @__PURE__ */ a("div", {
|
|
33
|
-
className:
|
|
33
|
+
className: s("flex flex-col gap-4 pt-1 sm:flex-row", v, !_ && "pointer-events-none"),
|
|
34
34
|
children: [/* @__PURE__ */ i("div", {
|
|
35
35
|
className: "min-w-0 flex-1",
|
|
36
36
|
children: /* @__PURE__ */ i(e, {
|
|
@@ -3,8 +3,8 @@ import n from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
|
|
|
3
3
|
import { MISSING_SHOP_ADDRESS as r, MISSING_SHOP_EMAIL as i, MISSING_SHOP_PHONE_NUMBER as a } from "../../lib/storefrontMissingValues.js";
|
|
4
4
|
import { BusinessHours as o } from "./BusinessHours.js";
|
|
5
5
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useTranslation as l } from "react-i18next";
|
|
7
|
+
import { cn as u } from "@rpcbase/ui";
|
|
8
8
|
import { Clock as d, Mail as f, MapPin as p, Phone as m } from "lucide-react";
|
|
9
9
|
//#region src/components/Footer/index.tsx
|
|
10
10
|
var h = "group inline-flex gap-2 text-sm font-normal text-slate-600 decoration-current underline-offset-4 transition-colors hover:text-slate-800 hover:underline", g = "mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center text-current transition-colors", _ = (e) => (Math.trunc(e) % 7 + 7) % 7, v = (e) => Array.isArray(e) ? e.map((e) => ({
|
|
@@ -26,7 +26,7 @@ var h = "group inline-flex gap-2 text-sm font-normal text-slate-600 decoration-c
|
|
|
26
26
|
}))
|
|
27
27
|
})) : [];
|
|
28
28
|
function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S, openingHoursOverrides: C }) {
|
|
29
|
-
let { t: w } =
|
|
29
|
+
let { t: w } = l(), T = t(_), E = _?.emailAddress?.trim() ?? "", D = _?.address?.trim() ?? "", O = e(_), k = v(S), A = y(C), j = k.length > 0;
|
|
30
30
|
return /* @__PURE__ */ s("footer", {
|
|
31
31
|
className: "border-t bg-white",
|
|
32
32
|
children: /* @__PURE__ */ c("div", {
|
|
@@ -51,13 +51,13 @@ function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S,
|
|
|
51
51
|
className: "grid gap-2",
|
|
52
52
|
children: [
|
|
53
53
|
b ? /* @__PURE__ */ c("a", {
|
|
54
|
-
className:
|
|
54
|
+
className: u(h, "items-center"),
|
|
55
55
|
href: b,
|
|
56
56
|
target: "_blank",
|
|
57
57
|
rel: "noreferrer",
|
|
58
58
|
children: [
|
|
59
59
|
/* @__PURE__ */ s("span", {
|
|
60
|
-
className:
|
|
60
|
+
className: u(g, "h-5 w-5"),
|
|
61
61
|
children: /* @__PURE__ */ s("img", {
|
|
62
62
|
src: n,
|
|
63
63
|
className: "h-5 w-5 shrink-0",
|
|
@@ -73,7 +73,7 @@ function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S,
|
|
|
73
73
|
]
|
|
74
74
|
}) : null,
|
|
75
75
|
T ? /* @__PURE__ */ c("a", {
|
|
76
|
-
className:
|
|
76
|
+
className: u(h, "items-center"),
|
|
77
77
|
href: T.href,
|
|
78
78
|
"aria-label": T.phoneDisplay,
|
|
79
79
|
children: [/* @__PURE__ */ s("span", {
|
|
@@ -84,7 +84,7 @@ function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S,
|
|
|
84
84
|
})
|
|
85
85
|
}), /* @__PURE__ */ s("span", { children: T.phoneDisplay })]
|
|
86
86
|
}) : /* @__PURE__ */ c("div", {
|
|
87
|
-
className:
|
|
87
|
+
className: u(h, "items-center text-destructive hover:text-destructive hover:no-underline"),
|
|
88
88
|
children: [/* @__PURE__ */ s("span", {
|
|
89
89
|
className: g,
|
|
90
90
|
children: /* @__PURE__ */ s(m, {
|
|
@@ -94,7 +94,7 @@ function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S,
|
|
|
94
94
|
}), /* @__PURE__ */ s("span", { children: a })]
|
|
95
95
|
}),
|
|
96
96
|
E ? /* @__PURE__ */ c("a", {
|
|
97
|
-
className:
|
|
97
|
+
className: u(h, "items-center"),
|
|
98
98
|
href: `mailto:${E}`,
|
|
99
99
|
"aria-label": E,
|
|
100
100
|
children: [/* @__PURE__ */ s("span", {
|
|
@@ -105,7 +105,7 @@ function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S,
|
|
|
105
105
|
})
|
|
106
106
|
}), /* @__PURE__ */ s("span", { children: E })]
|
|
107
107
|
}) : /* @__PURE__ */ c("div", {
|
|
108
|
-
className:
|
|
108
|
+
className: u(h, "items-center text-destructive hover:text-destructive hover:no-underline"),
|
|
109
109
|
children: [/* @__PURE__ */ s("span", {
|
|
110
110
|
className: g,
|
|
111
111
|
children: /* @__PURE__ */ s(f, {
|
|
@@ -115,7 +115,7 @@ function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S,
|
|
|
115
115
|
}), /* @__PURE__ */ s("span", { children: i })]
|
|
116
116
|
}),
|
|
117
117
|
O && D ? /* @__PURE__ */ c("a", {
|
|
118
|
-
className:
|
|
118
|
+
className: u(h, "items-start"),
|
|
119
119
|
href: O,
|
|
120
120
|
target: "_blank",
|
|
121
121
|
rel: "noreferrer",
|
|
@@ -127,7 +127,7 @@ function b({ shop: _, whatsappHref: b, whatsappPhoneDisplay: x, openingHours: S,
|
|
|
127
127
|
})
|
|
128
128
|
}), /* @__PURE__ */ s("span", { children: D })]
|
|
129
129
|
}) : /* @__PURE__ */ c("div", {
|
|
130
|
-
className:
|
|
130
|
+
className: u(h, "items-start text-destructive hover:text-destructive hover:no-underline"),
|
|
131
131
|
children: [/* @__PURE__ */ s("span", {
|
|
132
132
|
className: g,
|
|
133
133
|
children: /* @__PURE__ */ s(p, {
|
|
@@ -2,14 +2,14 @@ import "../../lib/storefrontMissingValues.js";
|
|
|
2
2
|
import { DeliveryAddressSelector as e } from "../DeliveryAddressSelector/index.js";
|
|
3
3
|
import { RadioGroup as t, RadioGroupItem as n } from "../../ui/radio-group.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useTranslation as a } from "react-i18next";
|
|
6
|
+
import { cn as o } from "@rpcbase/ui";
|
|
7
7
|
import { MapPin as s, Store as c, Truck as l } from "lucide-react";
|
|
8
8
|
//#region src/components/FulfillmentSection/index.tsx
|
|
9
9
|
function u({ value: u, onValueChange: d, pickupAddress: f, deliveryEnabled: p, deliveryDisabledReason: m, startAddress: h, onStartAddressChange: g, endAddress: _, onEndAddressChange: v, className: y, showPickupAddressWhenPickupOnly: b = !0, testIdPrefix: x = "storefront-fulfillment", googleMapsApiKey: S, deliveryAddressLocationRestriction: C, deliveryAddressAllowedTypes: w, showDeliveryAddressSelector: T = !0 }) {
|
|
10
|
-
let { t: E } =
|
|
10
|
+
let { t: E } = a(), D = f?.trim() ?? "", O = D.length === 0, k = D || "[Missing shop address]", A = m?.trim() ?? "", j = p || A.length > 0, M = u === "delivery" && p ? "delivery" : "pickup";
|
|
11
11
|
return j ? /* @__PURE__ */ i("div", {
|
|
12
|
-
className:
|
|
12
|
+
className: o("grid gap-3", y),
|
|
13
13
|
"data-testid": x,
|
|
14
14
|
children: [/* @__PURE__ */ i(t, {
|
|
15
15
|
value: M,
|
|
@@ -18,7 +18,7 @@ function u({ value: u, onValueChange: d, pickupAddress: f, deliveryEnabled: p, d
|
|
|
18
18
|
},
|
|
19
19
|
className: "grid gap-2",
|
|
20
20
|
children: [/* @__PURE__ */ i("label", {
|
|
21
|
-
className:
|
|
21
|
+
className: o("flex items-start gap-3 rounded-xl border p-3 transition", M === "pickup" ? "border-slate-900 bg-slate-50" : "border-slate-200 bg-white"),
|
|
22
22
|
"data-testid": `${x}-pickup`,
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ r(n, {
|
|
@@ -36,13 +36,13 @@ function u({ value: u, onValueChange: d, pickupAddress: f, deliveryEnabled: p, d
|
|
|
36
36
|
className: "text-sm font-medium text-slate-950",
|
|
37
37
|
children: E("booking_pickup_label")
|
|
38
38
|
}), /* @__PURE__ */ r("span", {
|
|
39
|
-
className:
|
|
39
|
+
className: o("text-xs text-slate-600", O && "text-destructive"),
|
|
40
40
|
children: k
|
|
41
41
|
})]
|
|
42
42
|
})
|
|
43
43
|
]
|
|
44
44
|
}), /* @__PURE__ */ i("label", {
|
|
45
|
-
className:
|
|
45
|
+
className: o("flex items-start gap-3 rounded-xl border p-3 transition", p ? M === "delivery" ? "border-slate-900 bg-slate-50" : "border-slate-200 bg-white" : "cursor-not-allowed border-slate-200 bg-white opacity-60"),
|
|
46
46
|
"aria-disabled": !p,
|
|
47
47
|
"data-testid": `${x}-delivery`,
|
|
48
48
|
children: [
|
|
@@ -82,10 +82,10 @@ function u({ value: u, onValueChange: d, pickupAddress: f, deliveryEnabled: p, d
|
|
|
82
82
|
allowedTypes: w
|
|
83
83
|
}) : null]
|
|
84
84
|
}) : b ? /* @__PURE__ */ i("div", {
|
|
85
|
-
className:
|
|
85
|
+
className: o("flex items-center gap-2 text-xs text-slate-600", O && "text-destructive", y),
|
|
86
86
|
"data-testid": `${x}-pickup-address`,
|
|
87
87
|
children: [/* @__PURE__ */ r(s, {
|
|
88
|
-
className:
|
|
88
|
+
className: o("h-4 w-4 shrink-0 text-slate-900", O && "text-destructive"),
|
|
89
89
|
"aria-hidden": "true"
|
|
90
90
|
}), /* @__PURE__ */ r("span", { children: k })]
|
|
91
91
|
}) : null;
|