@loczer/storefront-sdk 0.182.0 → 0.183.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/StorefrontProvider.d.ts +18 -15
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/StorefrontProvider.js +24 -34
- package/dist/chunks/booking-engine/dist/models/{Product.shared-CJ6vPb6n.js → Product.shared-CTuk4fiR.js} +2 -2
- package/dist/chunks/booking-engine/dist/schemas/{base-asset-PqhtKnZA.js → base-asset-B_Dm8_Vk.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{base-booking-BM3jZzqu.js → base-booking-DW8AEPKo.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{base-product-BJd4ttMP.js → base-product-1H8l2aUv.js} +1 -1
- package/dist/chunks/booking-engine/dist/{schemas-BNlwu75Z.js → schemas-34QQv0EH.js} +4 -4
- package/dist/chunks/ui/dist/Map/{MapContent--PwVTg2W.js → MapContent-QPkuTBvK.js} +2 -2
- package/dist/chunks/ui/dist/Map/{constants-DqrK8UkE.js → constants-BNmiJXfg.js} +1 -1
- package/dist/chunks/ui/dist/{Map-B45AxZ-D.js → Map-BXmRf5Ep.js} +3 -3
- package/dist/chunks/ui/dist/static/strings-1T2w7LqX.js +4 -0
- package/dist/components/AboutSection/index.d.ts +1 -6
- package/dist/components/AboutSection/index.d.ts.map +1 -1
- package/dist/components/AboutSection/index.js +43 -39
- package/dist/components/ContactSection/index.d.ts +1 -3
- package/dist/components/ContactSection/index.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +222 -164
- package/dist/components/Footer/index.d.ts +3 -4
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +98 -69
- package/dist/components/FulfillmentSection/index.d.ts.map +1 -1
- package/dist/components/FulfillmentSection/index.js +17 -16
- package/dist/components/Header/index.d.ts +1 -3
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +77 -72
- package/dist/components/Layout/index.d.ts +3 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +45 -47
- package/dist/components/Map/index.js +1 -1
- package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
- package/dist/components/ProductPriceBadge/index.js +68 -60
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/fr.js +1 -1
- package/dist/index.d.ts +151 -150
- package/dist/index.js +62 -62
- package/dist/lib/cart.d.ts +4 -1
- package/dist/lib/cart.d.ts.map +1 -1
- package/dist/lib/cart.js +64 -40
- package/dist/lib/cartSummary.d.ts.map +1 -1
- package/dist/lib/cartSummary.js +4 -3
- package/dist/lib/checkoutSubmit.js +2 -2
- package/dist/lib/productVariants.d.ts.map +1 -1
- package/dist/lib/productVariants.js +20 -9
- package/dist/lib/storefrontAddress.d.ts +5 -0
- package/dist/lib/storefrontAddress.d.ts.map +1 -0
- package/dist/lib/storefrontAddress.js +24 -0
- package/dist/lib/storefrontAvailability.d.ts +6 -6
- package/dist/lib/storefrontContact.d.ts +10 -0
- package/dist/lib/storefrontContact.d.ts.map +1 -0
- package/dist/lib/storefrontContact.js +24 -0
- package/dist/lib/storefrontMissingValues.d.ts +5 -0
- package/dist/lib/storefrontMissingValues.d.ts.map +1 -0
- package/dist/lib/storefrontMissingValues.js +4 -0
- package/dist/lib/storefrontProducts.d.ts +23 -21
- package/dist/lib/storefrontProducts.d.ts.map +1 -1
- package/dist/lib/storefrontProducts.js +7 -5
- package/dist/lib/whatsapp.d.ts +8 -6
- package/dist/lib/whatsapp.d.ts.map +1 -1
- package/dist/lib/whatsapp.js +16 -43
- package/dist/pages/BookingPage.js +36 -36
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +126 -128
- package/dist/pages/ProductPage.js +160 -160
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.d.ts +14 -12
- package/dist/storefrontSchemas.d.ts.map +1 -1
- package/dist/storefrontSchemas.js +3 -2
- package/dist/ui/radio-group.d.ts +1 -1
- package/package.json +7 -6
- package/dist/chunks/ui/dist/static/strings-CPnO-KbA.js +0 -4
- package/dist/data/config.d.ts +0 -15
- package/dist/data/config.d.ts.map +0 -1
- package/dist/data/config.js +0 -24
- package/dist/static/strings.d.ts +0 -2
- package/dist/static/strings.d.ts.map +0 -1
- package/dist/static/strings.js +0 -4
|
@@ -1,248 +1,306 @@
|
|
|
1
1
|
import { ROUTE as e, responseSchema as t } from "../../lib/contactForm.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
2
|
+
import { resolveStorefrontMapsHref as n, resolveStorefrontPhoneContact as r } from "../../lib/storefrontContact.js";
|
|
3
|
+
import { resolveStorefrontWhatsAppContact as i } from "../../lib/whatsapp.js";
|
|
4
|
+
import a from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
|
|
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
|
+
import { Button as u } from "../../ui/button.js";
|
|
7
|
+
import { Input as d } from "../../ui/input.js";
|
|
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 b } from "../Map/createMarkerElement.js";
|
|
12
|
+
import { Map as x } from "../Map/index.js";
|
|
13
|
+
import { z as S } from "zod";
|
|
14
|
+
import { useMemo as C } from "react";
|
|
15
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
16
|
+
import { PhoneNumberInput as ee, cn as E } from "@rpcbase/ui";
|
|
17
|
+
import { toast as D } from "@rpcbase/client";
|
|
18
|
+
import { useTranslation as O } from "react-i18next";
|
|
19
|
+
import { Mail as k, MapPin as A, Phone as j } from "lucide-react";
|
|
20
|
+
import { useForm as M, zodResolver as N } from "@rpcbase/form";
|
|
20
21
|
//#region src/components/ContactSection/index.tsx
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
let { t:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}), [F, I.language])),
|
|
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
|
+
function L({ storeSlug: L }) {
|
|
24
|
+
let { t: R, i18n: z } = O(), { 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
|
+
storefrontConfiguration: B,
|
|
26
|
+
language: z.language
|
|
27
|
+
}), J = q?.href, Y = M({
|
|
28
|
+
resolver: N(C(() => S.object({
|
|
29
|
+
name: S.string().trim().min(1, R("contact_form_validation_name_required")),
|
|
30
|
+
emailAddress: S.string().trim().email(R("contact_form_validation_email_invalid")),
|
|
31
|
+
phoneNumber: S.string().trim().min(6, R("contact_form_validation_phone_invalid")),
|
|
32
|
+
message: S.string().trim().min(1, R("contact_form_validation_message_required")).max(8192, R("contact_form_validation_message_too_long"))
|
|
33
|
+
}), [R, z.language])),
|
|
34
34
|
defaultValues: {
|
|
35
35
|
name: "",
|
|
36
36
|
emailAddress: "",
|
|
37
37
|
phoneNumber: "",
|
|
38
38
|
message: ""
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
41
|
-
let e =
|
|
42
|
-
return e ? [e[1], e[0]] :
|
|
43
|
-
}, [
|
|
44
|
-
coords:
|
|
45
|
-
element:
|
|
40
|
+
}), X = C(() => {
|
|
41
|
+
let e = H.gpsCoordinates;
|
|
42
|
+
return e ? [e[1], e[0]] : null;
|
|
43
|
+
}, [H.gpsCoordinates]), Z = X ?? l, Q = C(() => b(), []), $ = C(() => X ? {
|
|
44
|
+
coords: X,
|
|
45
|
+
element: Q || void 0,
|
|
46
46
|
offset: [0, -25.5],
|
|
47
|
-
popupHTML:
|
|
47
|
+
popupHTML: G || "[Missing shop address]",
|
|
48
48
|
popupCloseButton: !1
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]),
|
|
49
|
+
} : null, [
|
|
50
|
+
G,
|
|
51
|
+
X,
|
|
52
|
+
Q
|
|
53
|
+
]), te = C(() => $ ? [$] : [], [$]), ne = Y.handleSubmit(async (n) => {
|
|
54
54
|
let r = await fetch(e, {
|
|
55
55
|
method: "POST",
|
|
56
56
|
headers: { "Content-Type": "application/json" },
|
|
57
57
|
body: JSON.stringify({
|
|
58
|
-
storeSlug:
|
|
58
|
+
storeSlug: L,
|
|
59
59
|
...n
|
|
60
60
|
})
|
|
61
61
|
}), i = await r.json().then((e) => t.safeParse(e)).catch(() => ({ success: !1 }));
|
|
62
62
|
if (r.ok && "success" in i && i.success && i.data.success) {
|
|
63
|
-
|
|
63
|
+
D.success(R("contact_form_success_toast")), Y.reset();
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
let a = "success" in i && i.success && i.data.error ? i.data.error :
|
|
67
|
-
|
|
66
|
+
let a = "success" in i && i.success && i.data.error ? i.data.error : R("contact_form_error_toast");
|
|
67
|
+
D.error(a);
|
|
68
68
|
});
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ w("section", {
|
|
70
70
|
id: "contact",
|
|
71
71
|
className: "border-t bg-slate-50 py-12 scroll-mt-16 sm:scroll-mt-20 sm:py-16",
|
|
72
72
|
"data-testid": "storefront-contact-form",
|
|
73
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ T("div", {
|
|
74
74
|
className: "mx-auto max-w-7xl px-4 sm:px-6",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ T("div", {
|
|
76
76
|
className: "mx-auto max-w-2xl text-center",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
78
78
|
className: "text-3xl font-semibold tracking-tight text-slate-950",
|
|
79
|
-
children:
|
|
80
|
-
}), /* @__PURE__ */
|
|
79
|
+
children: R("contact_section_title")
|
|
80
|
+
}), /* @__PURE__ */ w("p", {
|
|
81
81
|
className: "mt-3 text-sm text-slate-600 sm:text-base",
|
|
82
|
-
children:
|
|
82
|
+
children: R("contact_section_subtitle")
|
|
83
83
|
})]
|
|
84
|
-
}), /* @__PURE__ */
|
|
84
|
+
}), /* @__PURE__ */ T("div", {
|
|
85
85
|
className: "mt-8 grid gap-6 rounded-xl border border-slate-200 bg-white p-4 shadow-sm lg:grid-cols-2 lg:p-6",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ T("div", {
|
|
87
87
|
className: "flex flex-col gap-6 lg:border-r lg:border-slate-200 lg:pr-6",
|
|
88
88
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
90
90
|
className: "text-lg font-semibold text-slate-950",
|
|
91
|
-
children:
|
|
92
|
-
}), /* @__PURE__ */
|
|
91
|
+
children: R("contact_section_info_title")
|
|
92
|
+
}), /* @__PURE__ */ w("p", {
|
|
93
93
|
className: "mt-2 text-sm text-slate-600",
|
|
94
|
-
children:
|
|
94
|
+
children: R(J ? "contact_section_info_description" : "contact_section_info_description_without_whatsapp")
|
|
95
95
|
})] }),
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ T("div", {
|
|
97
97
|
className: "grid gap-5",
|
|
98
98
|
children: [
|
|
99
|
-
|
|
100
|
-
className:
|
|
101
|
-
href:
|
|
99
|
+
q ? /* @__PURE__ */ T("a", {
|
|
100
|
+
className: I,
|
|
101
|
+
href: q.href,
|
|
102
102
|
target: "_blank",
|
|
103
103
|
rel: "noreferrer",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ w("span", {
|
|
105
105
|
className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
src:
|
|
106
|
+
children: /* @__PURE__ */ w("img", {
|
|
107
|
+
src: a,
|
|
108
108
|
className: "h-6 w-6",
|
|
109
109
|
alt: "",
|
|
110
110
|
"aria-hidden": "true"
|
|
111
111
|
})
|
|
112
|
-
}), /* @__PURE__ */
|
|
112
|
+
}), /* @__PURE__ */ T("span", {
|
|
113
113
|
className: "flex min-w-0 flex-col gap-1",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ w("span", {
|
|
115
115
|
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
116
|
-
children:
|
|
117
|
-
}), /* @__PURE__ */
|
|
118
|
-
className:
|
|
119
|
-
children:
|
|
116
|
+
children: R("contact_section_whatsapp_label")
|
|
117
|
+
}), /* @__PURE__ */ w("span", {
|
|
118
|
+
className: F,
|
|
119
|
+
children: q.phoneDisplay
|
|
120
120
|
})]
|
|
121
121
|
})]
|
|
122
122
|
}) : null,
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
className:
|
|
125
|
-
href:
|
|
126
|
-
children: [/* @__PURE__ */
|
|
123
|
+
U ? /* @__PURE__ */ T("a", {
|
|
124
|
+
className: I,
|
|
125
|
+
href: U.href,
|
|
126
|
+
children: [/* @__PURE__ */ w("span", {
|
|
127
127
|
className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ w(j, {
|
|
129
129
|
className: "h-5 w-5",
|
|
130
130
|
"aria-hidden": "true"
|
|
131
131
|
})
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ T("span", {
|
|
133
133
|
className: "flex min-w-0 flex-col gap-1",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ w("span", {
|
|
135
135
|
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
136
|
-
children:
|
|
137
|
-
}), /* @__PURE__ */
|
|
138
|
-
className:
|
|
139
|
-
children:
|
|
136
|
+
children: R("contact_section_phone_label")
|
|
137
|
+
}), /* @__PURE__ */ w("span", {
|
|
138
|
+
className: F,
|
|
139
|
+
children: U.phoneDisplay
|
|
140
|
+
})]
|
|
141
|
+
})]
|
|
142
|
+
}) : /* @__PURE__ */ T("div", {
|
|
143
|
+
className: "flex items-start gap-3 text-destructive",
|
|
144
|
+
children: [/* @__PURE__ */ w("span", {
|
|
145
|
+
className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current",
|
|
146
|
+
children: /* @__PURE__ */ w(j, {
|
|
147
|
+
className: "h-5 w-5",
|
|
148
|
+
"aria-hidden": "true"
|
|
149
|
+
})
|
|
150
|
+
}), /* @__PURE__ */ T("span", {
|
|
151
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
152
|
+
children: [/* @__PURE__ */ w("span", {
|
|
153
|
+
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
154
|
+
children: R("contact_section_phone_label")
|
|
155
|
+
}), /* @__PURE__ */ w("span", {
|
|
156
|
+
className: "text-sm font-normal",
|
|
157
|
+
children: c
|
|
140
158
|
})]
|
|
141
159
|
})]
|
|
142
160
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
className:
|
|
145
|
-
href: `mailto:${
|
|
146
|
-
children: [/* @__PURE__ */
|
|
161
|
+
W ? /* @__PURE__ */ T("a", {
|
|
162
|
+
className: I,
|
|
163
|
+
href: `mailto:${W}`,
|
|
164
|
+
children: [/* @__PURE__ */ w("span", {
|
|
147
165
|
className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
|
|
148
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ w(k, {
|
|
149
167
|
className: "h-5 w-5",
|
|
150
168
|
"aria-hidden": "true"
|
|
151
169
|
})
|
|
152
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ T("span", {
|
|
153
171
|
className: "flex min-w-0 flex-col gap-1",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ w("span", {
|
|
155
173
|
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
156
|
-
children:
|
|
157
|
-
}), /* @__PURE__ */
|
|
158
|
-
className:
|
|
159
|
-
children:
|
|
174
|
+
children: R("contact_section_email_label")
|
|
175
|
+
}), /* @__PURE__ */ w("span", {
|
|
176
|
+
className: F,
|
|
177
|
+
children: W
|
|
178
|
+
})]
|
|
179
|
+
})]
|
|
180
|
+
}) : /* @__PURE__ */ T("div", {
|
|
181
|
+
className: "flex items-start gap-3 text-destructive",
|
|
182
|
+
children: [/* @__PURE__ */ w("span", {
|
|
183
|
+
className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current",
|
|
184
|
+
children: /* @__PURE__ */ w(k, {
|
|
185
|
+
className: "h-5 w-5",
|
|
186
|
+
"aria-hidden": "true"
|
|
187
|
+
})
|
|
188
|
+
}), /* @__PURE__ */ T("span", {
|
|
189
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
190
|
+
children: [/* @__PURE__ */ w("span", {
|
|
191
|
+
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
192
|
+
children: R("contact_section_email_label")
|
|
193
|
+
}), /* @__PURE__ */ w("span", {
|
|
194
|
+
className: "text-sm font-normal",
|
|
195
|
+
children: s
|
|
160
196
|
})]
|
|
161
197
|
})]
|
|
162
198
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
className:
|
|
165
|
-
href:
|
|
199
|
+
K && G ? /* @__PURE__ */ T("a", {
|
|
200
|
+
className: I,
|
|
201
|
+
href: K,
|
|
166
202
|
target: "_blank",
|
|
167
203
|
rel: "noreferrer",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ w("span", {
|
|
169
205
|
className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
|
|
170
|
-
children: /* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ w(A, {
|
|
171
207
|
className: "h-5 w-5",
|
|
172
208
|
"aria-hidden": "true"
|
|
173
209
|
})
|
|
174
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ T("span", {
|
|
175
211
|
className: "flex min-w-0 flex-col gap-1",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ w("span", {
|
|
177
213
|
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
178
|
-
children:
|
|
179
|
-
}), /* @__PURE__ */
|
|
180
|
-
className:
|
|
181
|
-
children:
|
|
214
|
+
children: R("contact_section_address_label")
|
|
215
|
+
}), /* @__PURE__ */ w("span", {
|
|
216
|
+
className: F,
|
|
217
|
+
children: G
|
|
218
|
+
})]
|
|
219
|
+
})]
|
|
220
|
+
}) : /* @__PURE__ */ T("div", {
|
|
221
|
+
className: "flex items-start gap-3 text-destructive",
|
|
222
|
+
children: [/* @__PURE__ */ w("span", {
|
|
223
|
+
className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current",
|
|
224
|
+
children: /* @__PURE__ */ w(A, {
|
|
225
|
+
className: "h-5 w-5",
|
|
226
|
+
"aria-hidden": "true"
|
|
227
|
+
})
|
|
228
|
+
}), /* @__PURE__ */ T("span", {
|
|
229
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
230
|
+
children: [/* @__PURE__ */ w("span", {
|
|
231
|
+
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
232
|
+
children: R("contact_section_address_label")
|
|
233
|
+
}), /* @__PURE__ */ w("span", {
|
|
234
|
+
className: "text-sm font-normal",
|
|
235
|
+
children: o
|
|
182
236
|
})]
|
|
183
237
|
})]
|
|
184
238
|
})
|
|
185
239
|
]
|
|
186
240
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
241
|
+
/* @__PURE__ */ w("div", {
|
|
242
|
+
className: "relative",
|
|
243
|
+
"data-testid": "storefront-contact-map",
|
|
244
|
+
children: /* @__PURE__ */ w(x, {
|
|
245
|
+
mapboxToken: V,
|
|
246
|
+
initialCenter: Z,
|
|
247
|
+
initialZoom: X ? 10 : 1,
|
|
248
|
+
markers: te,
|
|
249
|
+
showNavigationControl: !1,
|
|
250
|
+
className: "overflow-clip w-full h-52 rounded-lg"
|
|
251
|
+
})
|
|
252
|
+
})
|
|
195
253
|
]
|
|
196
|
-
}), /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ T("div", { children: [
|
|
255
|
+
/* @__PURE__ */ w("h3", {
|
|
198
256
|
className: "text-lg font-semibold text-slate-950",
|
|
199
|
-
children:
|
|
257
|
+
children: R("contact_section_form_title")
|
|
200
258
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ w("p", {
|
|
202
260
|
className: "mt-2 text-sm text-slate-600",
|
|
203
|
-
children:
|
|
261
|
+
children: R("contact_section_form_description")
|
|
204
262
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ w("div", {
|
|
206
264
|
className: "mt-6",
|
|
207
|
-
children: /* @__PURE__ */
|
|
208
|
-
...
|
|
209
|
-
children: /* @__PURE__ */
|
|
210
|
-
onSubmit:
|
|
265
|
+
children: /* @__PURE__ */ w(p, {
|
|
266
|
+
...Y,
|
|
267
|
+
children: /* @__PURE__ */ T("form", {
|
|
268
|
+
onSubmit: ne,
|
|
211
269
|
className: "grid gap-4",
|
|
212
270
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
control:
|
|
271
|
+
/* @__PURE__ */ w(h, {
|
|
272
|
+
control: Y.control,
|
|
215
273
|
name: "name",
|
|
216
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
274
|
+
render: ({ field: e }) => /* @__PURE__ */ T(g, { children: [
|
|
275
|
+
/* @__PURE__ */ w(_, { children: R("contact_form_name_label") }),
|
|
276
|
+
/* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(d, {
|
|
219
277
|
...e,
|
|
220
|
-
placeholder:
|
|
278
|
+
placeholder: R("contact_form_name_placeholder"),
|
|
221
279
|
className: "h-11"
|
|
222
280
|
}) }),
|
|
223
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ w(v, {})
|
|
224
282
|
] })
|
|
225
283
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
control:
|
|
284
|
+
/* @__PURE__ */ w(h, {
|
|
285
|
+
control: Y.control,
|
|
228
286
|
name: "emailAddress",
|
|
229
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
287
|
+
render: ({ field: e }) => /* @__PURE__ */ T(g, { children: [
|
|
288
|
+
/* @__PURE__ */ w(_, { children: R("contact_form_email_label") }),
|
|
289
|
+
/* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(d, {
|
|
232
290
|
...e,
|
|
233
291
|
type: "email",
|
|
234
|
-
placeholder:
|
|
292
|
+
placeholder: R("contact_form_email_placeholder"),
|
|
235
293
|
className: "h-11"
|
|
236
294
|
}) }),
|
|
237
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ w(v, {})
|
|
238
296
|
] })
|
|
239
297
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
control:
|
|
298
|
+
/* @__PURE__ */ w(h, {
|
|
299
|
+
control: Y.control,
|
|
242
300
|
name: "phoneNumber",
|
|
243
|
-
render: ({ field: e, fieldState: t }) => /* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
301
|
+
render: ({ field: e, fieldState: t }) => /* @__PURE__ */ T(g, { children: [
|
|
302
|
+
/* @__PURE__ */ w(_, { children: R("contact_form_phone_label") }),
|
|
303
|
+
/* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(ee, {
|
|
246
304
|
name: e.name,
|
|
247
305
|
value: e.value ?? "",
|
|
248
306
|
onBlur: e.onBlur,
|
|
@@ -250,42 +308,42 @@ function N({ preset: N, storeSlug: P }) {
|
|
|
250
308
|
let n = t.e164 || t.formattedInternational || t.rawInput || "";
|
|
251
309
|
e.onChange(n);
|
|
252
310
|
},
|
|
253
|
-
defaultCountry:
|
|
254
|
-
locale:
|
|
255
|
-
placeholder:
|
|
311
|
+
defaultCountry: P(z.language),
|
|
312
|
+
locale: z.language,
|
|
313
|
+
placeholder: R("contact_form_phone_placeholder"),
|
|
256
314
|
className: "relative",
|
|
257
|
-
inputClassName:
|
|
258
|
-
renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */
|
|
315
|
+
inputClassName: E("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"),
|
|
316
|
+
renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */ w(v, {
|
|
259
317
|
style: { top: "100%" },
|
|
260
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ w("span", { children: e })
|
|
261
319
|
})
|
|
262
320
|
}) }),
|
|
263
|
-
t.error?.message ? /* @__PURE__ */
|
|
321
|
+
t.error?.message ? /* @__PURE__ */ w(v, {}) : null
|
|
264
322
|
] })
|
|
265
323
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
control:
|
|
324
|
+
/* @__PURE__ */ w(h, {
|
|
325
|
+
control: Y.control,
|
|
268
326
|
name: "message",
|
|
269
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
327
|
+
render: ({ field: e }) => /* @__PURE__ */ T(g, { children: [
|
|
328
|
+
/* @__PURE__ */ w(_, { children: R("contact_form_message_label") }),
|
|
329
|
+
/* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(y, {
|
|
272
330
|
...e,
|
|
273
331
|
rows: 5,
|
|
274
|
-
placeholder:
|
|
332
|
+
placeholder: R("contact_form_message_placeholder"),
|
|
275
333
|
className: "min-h-[132px]"
|
|
276
334
|
}) }),
|
|
277
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ w(v, {})
|
|
278
336
|
] })
|
|
279
337
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ T("div", {
|
|
281
339
|
className: "mt-2 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ w("p", {
|
|
283
341
|
className: "text-xs text-slate-500",
|
|
284
|
-
children:
|
|
285
|
-
}), /* @__PURE__ */
|
|
342
|
+
children: R("contact_form_privacy_hint")
|
|
343
|
+
}), /* @__PURE__ */ w(u, {
|
|
286
344
|
type: "submit",
|
|
287
|
-
disabled:
|
|
288
|
-
children:
|
|
345
|
+
disabled: Y.formState.isSubmitting,
|
|
346
|
+
children: Y.formState.isSubmitting ? R("contact_form_submitting_button") : R("contact_form_submit_button")
|
|
289
347
|
})]
|
|
290
348
|
})
|
|
291
349
|
]
|
|
@@ -298,4 +356,4 @@ function N({ preset: N, storeSlug: P }) {
|
|
|
298
356
|
});
|
|
299
357
|
}
|
|
300
358
|
//#endregion
|
|
301
|
-
export {
|
|
359
|
+
export { L as ContactSection };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StorefrontConfiguration } from '../../storefrontSchemas';
|
|
1
|
+
import { StorefrontConfiguration, StorefrontShop } from '../../storefrontSchemas';
|
|
3
2
|
type FooterProps = {
|
|
4
|
-
|
|
3
|
+
shop?: StorefrontShop;
|
|
5
4
|
whatsappHref?: string;
|
|
6
5
|
whatsappPhoneDisplay?: string;
|
|
7
6
|
openingHours?: StorefrontConfiguration["bookingEngine"]["shop"]["openingHours"];
|
|
8
7
|
openingHoursOverrides?: StorefrontConfiguration["bookingEngine"]["shop"]["openingHoursOverrides"];
|
|
9
8
|
};
|
|
10
|
-
export declare function Footer({
|
|
9
|
+
export declare function Footer({ shop, whatsappHref, whatsappPhoneDisplay, openingHours, openingHoursOverrides, }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
12
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAStF,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAA;IAC/E,qBAAqB,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,uBAAuB,CAAC,CAAA;CAClG,CAAA;AAyCD,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,GACtB,EAAE,WAAW,2CA8Ib"}
|