@loczer/storefront-sdk 0.182.0 → 0.184.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.
Files changed (85) hide show
  1. package/dist/StorefrontProvider.d.ts +18 -15
  2. package/dist/StorefrontProvider.d.ts.map +1 -1
  3. package/dist/StorefrontProvider.js +24 -34
  4. package/dist/chunks/booking-engine/dist/models/{Product.shared-CJ6vPb6n.js → Product.shared-CTuk4fiR.js} +2 -2
  5. package/dist/chunks/booking-engine/dist/schemas/{base-asset-PqhtKnZA.js → base-asset-B_Dm8_Vk.js} +1 -1
  6. package/dist/chunks/booking-engine/dist/schemas/{base-booking-BM3jZzqu.js → base-booking-DW8AEPKo.js} +1 -1
  7. package/dist/chunks/booking-engine/dist/schemas/{base-product-BJd4ttMP.js → base-product-1H8l2aUv.js} +1 -1
  8. package/dist/chunks/booking-engine/dist/schemas/{cart-inputs-9vM8GCrc.js → cart-inputs-j1yWfJxO.js} +8 -5
  9. package/dist/chunks/booking-engine/dist/schemas-DftrSnTE.js +13 -0
  10. package/dist/chunks/ui/dist/Map/{MapContent--PwVTg2W.js → MapContent-QPkuTBvK.js} +2 -2
  11. package/dist/chunks/ui/dist/Map/{constants-DqrK8UkE.js → constants-BNmiJXfg.js} +1 -1
  12. package/dist/chunks/ui/dist/{Map-B45AxZ-D.js → Map-BXmRf5Ep.js} +3 -3
  13. package/dist/chunks/ui/dist/static/strings-1T2w7LqX.js +4 -0
  14. package/dist/components/AboutSection/index.d.ts +1 -6
  15. package/dist/components/AboutSection/index.d.ts.map +1 -1
  16. package/dist/components/AboutSection/index.js +43 -39
  17. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  18. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +152 -148
  19. package/dist/components/ContactSection/index.d.ts +1 -3
  20. package/dist/components/ContactSection/index.d.ts.map +1 -1
  21. package/dist/components/ContactSection/index.js +222 -164
  22. package/dist/components/Footer/index.d.ts +3 -4
  23. package/dist/components/Footer/index.d.ts.map +1 -1
  24. package/dist/components/Footer/index.js +98 -69
  25. package/dist/components/FulfillmentSection/index.d.ts.map +1 -1
  26. package/dist/components/FulfillmentSection/index.js +17 -16
  27. package/dist/components/Header/index.d.ts +1 -3
  28. package/dist/components/Header/index.d.ts.map +1 -1
  29. package/dist/components/Header/index.js +77 -72
  30. package/dist/components/Layout/index.d.ts +3 -1
  31. package/dist/components/Layout/index.d.ts.map +1 -1
  32. package/dist/components/Layout/index.js +45 -47
  33. package/dist/components/Map/index.js +1 -1
  34. package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
  35. package/dist/components/ProductPriceBadge/index.js +68 -60
  36. package/dist/i18n/I18nProvider.js +1 -1
  37. package/dist/i18n/fr.js +1 -1
  38. package/dist/index.d.ts +159 -150
  39. package/dist/index.js +64 -64
  40. package/dist/lib/booking.d.ts +3 -0
  41. package/dist/lib/booking.d.ts.map +1 -1
  42. package/dist/lib/booking.js +76 -74
  43. package/dist/lib/cart.d.ts +4 -1
  44. package/dist/lib/cart.d.ts.map +1 -1
  45. package/dist/lib/cart.js +64 -40
  46. package/dist/lib/cartSummary.d.ts.map +1 -1
  47. package/dist/lib/cartSummary.js +4 -3
  48. package/dist/lib/checkoutSubmit.d.ts.map +1 -1
  49. package/dist/lib/checkoutSubmit.js +36 -36
  50. package/dist/lib/productVariants.d.ts.map +1 -1
  51. package/dist/lib/productVariants.js +20 -9
  52. package/dist/lib/storefrontAddress.d.ts +5 -0
  53. package/dist/lib/storefrontAddress.d.ts.map +1 -0
  54. package/dist/lib/storefrontAddress.js +24 -0
  55. package/dist/lib/storefrontAvailability.d.ts +6 -6
  56. package/dist/lib/storefrontContact.d.ts +10 -0
  57. package/dist/lib/storefrontContact.d.ts.map +1 -0
  58. package/dist/lib/storefrontContact.js +24 -0
  59. package/dist/lib/storefrontMissingValues.d.ts +5 -0
  60. package/dist/lib/storefrontMissingValues.d.ts.map +1 -0
  61. package/dist/lib/storefrontMissingValues.js +4 -0
  62. package/dist/lib/storefrontProducts.d.ts +23 -21
  63. package/dist/lib/storefrontProducts.d.ts.map +1 -1
  64. package/dist/lib/storefrontProducts.js +7 -5
  65. package/dist/lib/whatsapp.d.ts +8 -6
  66. package/dist/lib/whatsapp.d.ts.map +1 -1
  67. package/dist/lib/whatsapp.js +16 -43
  68. package/dist/pages/BookingPage.js +36 -36
  69. package/dist/pages/HomePage.d.ts.map +1 -1
  70. package/dist/pages/HomePage.js +126 -128
  71. package/dist/pages/ProductPage.js +160 -160
  72. package/dist/storefront.css +1 -1
  73. package/dist/storefrontSchemas.d.ts +14 -12
  74. package/dist/storefrontSchemas.d.ts.map +1 -1
  75. package/dist/storefrontSchemas.js +3 -2
  76. package/dist/ui/radio-group.d.ts +1 -1
  77. package/package.json +7 -6
  78. package/dist/chunks/booking-engine/dist/schemas-BNlwu75Z.js +0 -13
  79. package/dist/chunks/ui/dist/static/strings-CPnO-KbA.js +0 -4
  80. package/dist/data/config.d.ts +0 -15
  81. package/dist/data/config.d.ts.map +0 -1
  82. package/dist/data/config.js +0 -24
  83. package/dist/static/strings.d.ts +0 -2
  84. package/dist/static/strings.d.ts.map +0 -1
  85. package/dist/static/strings.js +0 -4
@@ -3,33 +3,33 @@ import { getBookingPeriodTimeSlotsSync as s } from "../../lib/booking-period-tim
3
3
  import { differenceInCalendarDays as c } from "date-fns";
4
4
  import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
5
5
  import { useMediaQuery as ee } from "@rpcbase/client";
6
- import { de as te, enUS as m, es as h, fr as g, it as ne } from "date-fns/locale";
6
+ import { de as te, enUS as m, es as ne, fr as h, it as re } from "date-fns/locale";
7
7
  //#region src/components/BookingPeriodSelector/useBookingPeriodController.ts
8
- var re = (e) => e, ie = {
8
+ var ie = (e) => e, ae = {
9
9
  startDate: "Start date",
10
10
  pickStartDate: "Pick a date",
11
11
  startTime: "Start time",
12
12
  endDate: "End date",
13
13
  pickEndDate: "Pick a date",
14
14
  endTime: "End time"
15
- }, ae = ({ locale: e, localeCode: t }) => {
15
+ }, oe = ({ locale: e, localeCode: t }) => {
16
16
  if (e) return e;
17
17
  let n = t?.toLowerCase() ?? "";
18
- return n.startsWith("fr") ? g : n.startsWith("de") ? te : n.startsWith("es") ? h : n.startsWith("it") ? ne : m;
19
- }, oe = (e) => {
18
+ return n.startsWith("fr") ? h : n.startsWith("de") ? te : n.startsWith("es") ? ne : n.startsWith("it") ? re : m;
19
+ }, se = (e) => {
20
20
  if (!e?.length) return null;
21
21
  let t = e.map((e) => o(e.value)).filter((e) => typeof e == "number").sort((e, t) => e - t);
22
22
  if (t.length < 2) return null;
23
23
  let n = t[1] - t[0];
24
24
  return !Number.isFinite(n) || n <= 0 ? null : n;
25
- }, _ = (e) => {
25
+ }, g = (e) => {
26
26
  if (typeof e != "string") return null;
27
27
  let t = e.match(/(\d{1,2}:\d{2})\s*-\s*(\d{1,2}:\d{2})/);
28
28
  return t ? o(t[2]) : null;
29
- }, se = (e, t) => e.map((e) => {
29
+ }, ce = (e, t) => e.map((e) => {
30
30
  let n = o(e.value);
31
31
  if (n == null) return null;
32
- let r = _(e.label) ?? n + t, i = typeof e.label == "string" ? e.label : e.value;
32
+ let r = g(e.label) ?? n + t, i = typeof e.label == "string" ? e.label : e.value;
33
33
  return {
34
34
  value: e.value,
35
35
  label: i,
@@ -38,135 +38,139 @@ var re = (e) => e, ie = {
38
38
  isExtra: !1,
39
39
  isDisabled: !!e.disabled
40
40
  };
41
- }).filter((e) => !!e), ce = (e) => !e.isDisabled && !e.isExtra, le = (e) => {
42
- for (let t = e.length - 1; t >= 0; --t) if (ce(e[t])) return e[t];
41
+ }).filter((e) => !!e), _ = (e) => !e.isDisabled && !e.isExtra, le = (e) => {
42
+ for (let t = e.length - 1; t >= 0; --t) if (_(e[t])) return e[t];
43
43
  return null;
44
- }, ue = (e, t) => e.find((e) => ce(e) && e.startMinutes >= t) ?? null, v = (te) => {
45
- let { startDate: m, onStartDateChange: h, startTime: g, onStartTimeChange: ne, endDate: _, onEndDateChange: v, endTime: y, onEndTimeChange: de, onEndDateCommit: b, onEndTimeCommit: x, errors: fe = {}, labels: pe, t: me = re, language: he, labelClassName: ge, inputClassName: _e, buttonClassName: ve, bookingPeriodConfig: S, fetchTimeSlots: C, selectionFlow: w = "chained-times", withMobileDateDrawer: ye = !1, currencyCode: be = "EUR", disableAutomaticTimeCorrection: T = !1, openDatePickerOnFocus: xe = !0, startTimeOptions: E = [], endTimeOptions: Se, locale: Ce, localeCode: we } = te, D = ee("(max-width: 767px)"), O = we ?? he ?? "en-US", Te = d(() => ae({
44
+ }, ue = (e, t) => e.find((e) => _(e) && e.startMinutes >= t) ?? null, v = (te) => {
45
+ let { startDate: m, onStartDateChange: ne, startTime: h, onStartTimeChange: re, endDate: g, onEndDateChange: v, endTime: y, onEndTimeChange: de, onEndDateCommit: b, onEndTimeCommit: x, errors: fe = {}, labels: pe, t: me = ie, language: he, labelClassName: ge, inputClassName: _e, buttonClassName: ve, bookingPeriodConfig: S, fetchTimeSlots: C, selectionFlow: w = "chained-times", withMobileDateDrawer: ye = !1, currencyCode: be = "EUR", disableAutomaticTimeCorrection: T = !1, openDatePickerOnFocus: xe = !0, startTimeOptions: E = [], endTimeOptions: Se, locale: Ce, localeCode: we } = te, D = ee("(max-width: 767px)"), O = we ?? he ?? "en-US", Te = d(() => oe({
46
46
  locale: Ce,
47
47
  localeCode: O
48
- }), [Ce, O]), k = d(() => S ? t(S) : null, [S]), A = d(() => S?.timing.slotIntervalMinutes ? S.timing.slotIntervalMinutes : oe(E) ?? 30, [S?.timing.slotIntervalMinutes, E]), [Ee, j] = p(!1), [De, Oe] = p(!1), [ke, M] = p(!1), [Ae, je] = p(!1), [Me, Ne] = p(void 0), [Pe, Fe] = p(!1), [Ie, Le] = p(!1), [N, Re] = p([]), [ze, P] = p([]), [F, I] = p(void 0), L = f(null), R = f(0), Be = f(0), Ve = f(0), He = f(void 0), z = f(void 0), Ue = l(() => {
49
- Ne(void 0);
50
- }, []), We = d(() => !m || !_ ? !1 : c(_, m) === 0, [m, _]), Ge = d(() => o(g), [g]), B = l((e) => {
48
+ }), [Ce, O]), k = d(() => S ? t(S) : null, [S]), A = d(() => S?.timing.slotIntervalMinutes ? S.timing.slotIntervalMinutes : se(E) ?? 30, [S?.timing.slotIntervalMinutes, E]), [j, M] = p(!1), [N, Ee] = p(!1), [De, P] = p(!1), [F, Oe] = p(!1), [ke, Ae] = p(void 0), [je, Me] = p(!1), [Ne, Pe] = p(!1), [Fe, Ie] = p([]), [Le, I] = p([]), [L, R] = p(void 0), z = f(null), Re = f(0), ze = f(0), Be = f(0), Ve = f(void 0), B = f(void 0), He = l(() => {
49
+ Ae(void 0);
50
+ }, []), Ue = d(() => !m || !g ? !1 : c(g, m) === 0, [m, g]), We = d(() => o(h), [h]), V = l((e) => {
51
51
  let t = (e instanceof Date ? e : e ? new Date(e) : void 0) ?? /* @__PURE__ */ new Date();
52
52
  return k ? n(t, k.timeZone) ?? void 0 : `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
53
- }, [k]), V = d(() => B(m), [m, B]), H = d(() => B(_ ?? m), [
54
- _,
53
+ }, [k]), H = d(() => V(m), [m, V]), U = d(() => V(g ?? m), [
54
+ g,
55
55
  m,
56
- B
57
- ]), Ke = k ? i(/* @__PURE__ */ new Date(), k.timeZone) : null, U = Ke?.dateString, qe = Ke?.minutesFromMidnight, W = d(() => U ? !!(m && V && V === U) : !!m && c(m, /* @__PURE__ */ new Date()) === 0, [
56
+ V
57
+ ]), Ge = k ? i(/* @__PURE__ */ new Date(), k.timeZone) : null, W = Ge?.dateString, Ke = Ge?.minutesFromMidnight, G = d(() => W ? !!(m && H && H === W) : !!m && c(m, /* @__PURE__ */ new Date()) === 0, [
58
58
  m,
59
- V,
60
- U
61
- ]), G = d(() => U ? !!(_ && H && H === U) : !!_ && c(_, /* @__PURE__ */ new Date()) === 0, [
62
- _,
63
59
  H,
64
- U
65
- ]), Je = d(() => {
66
- if (U) return e(U);
60
+ W
61
+ ]), K = d(() => W ? !!(g && U && U === W) : !!g && c(g, /* @__PURE__ */ new Date()) === 0, [
62
+ g,
63
+ U,
64
+ W
65
+ ]), qe = d(() => {
66
+ if (W) return e(W);
67
67
  let t = /* @__PURE__ */ new Date();
68
68
  return t.setHours(0, 0, 0, 0), t;
69
- }, [U]), K = S?.timing.minBufferMinutes ?? 10, q = d(() => {
70
- if (!W && !G) return null;
71
- if (qe != null) return qe + K;
69
+ }, [W]), Je = S?.timing.minBufferMinutes ?? 10, q = d(() => {
70
+ if (!G && !K) return null;
71
+ if (Ke != null) return Ke + Je;
72
72
  let e = /* @__PURE__ */ new Date();
73
- return e.setMinutes(e.getMinutes() + K), e.getHours() * 60 + e.getMinutes();
73
+ return e.setMinutes(e.getMinutes() + Je), e.getHours() * 60 + e.getMinutes();
74
74
  }, [
75
- qe,
75
+ Ke,
76
+ K,
76
77
  G,
77
- W,
78
- K
79
- ]), Ye = d(() => W ? q : null, [q, W]), Xe = l((e) => {
78
+ Je
79
+ ]), J = d(() => G ? q : null, [q, G]), Ye = l((e) => {
80
80
  if (!k) return;
81
- let t = B(e);
81
+ let t = V(e);
82
82
  if (!t) return k.defaultEndTime;
83
83
  let n = r(t), i = k.getLastStartMinutesForWeekday(n, { dateString: t });
84
84
  return typeof i == "number" ? a(i) : k.defaultEndTime;
85
- }, [k, B]);
85
+ }, [k, V]);
86
86
  u(() => {
87
- if (!C || !V) return;
87
+ if (!C || !H) return;
88
88
  let e = !0;
89
- return C(V, "start").then((t) => {
90
- e && t && Re(t);
89
+ return C(H, "start").then((t) => {
90
+ e && t && Ie(t);
91
91
  }).catch((e) => {
92
92
  console.error("Failed to fetch availability time slots", e);
93
93
  }), () => {
94
94
  e = !1;
95
95
  };
96
- }, [C, V]), u(() => {
96
+ }, [C, H]), u(() => {
97
97
  if (!C) return;
98
- let e = He.current, t = e !== void 0 && e !== H;
99
- He.current = H, t && H && (z.current = H);
100
- }, [H, C]), u(() => {
98
+ let e = Ve.current, t = e !== void 0 && e !== U;
99
+ Ve.current = U, t && U && (B.current = U);
100
+ }, [U, C]), u(() => {
101
101
  if (!C) return;
102
- if (!H) {
103
- P([]), I(void 0);
102
+ if (!U) {
103
+ I([]), R(void 0);
104
104
  return;
105
105
  }
106
106
  let e = !0;
107
- return I(void 0), C(H, "end").then((t) => {
108
- e && (t ? (P(t), I(H)) : (P([]), I(void 0)));
107
+ return R(void 0), C(U, "end").then((t) => {
108
+ e && (t ? (I(t), R(U)) : (I([]), R(void 0)));
109
109
  }).catch((t) => {
110
- console.error("Failed to fetch availability time slots", t), e && (P([]), I(void 0));
110
+ console.error("Failed to fetch availability time slots", t), e && (I([]), R(void 0));
111
111
  }), () => {
112
112
  e = !1;
113
113
  };
114
- }, [H, C]);
115
- let J = d(() => C || !S ? null : s(S, { date: V }), [
114
+ }, [U, C]);
115
+ let Xe = d(() => C || !S ? null : s(S, { date: H }).startTimeSlots, [
116
116
  S,
117
117
  C,
118
- V
119
- ]), Ze = d(() => !C || !S ? null : s(S, { date: V }).startTimeSlots, [
118
+ H
119
+ ]), Ze = d(() => C || !S ? null : s(S, { date: U }).endTimeSlots, [
120
+ S,
121
+ U,
122
+ C
123
+ ]), Qe = d(() => !C || !S ? null : s(S, { date: H }).startTimeSlots, [
120
124
  S,
121
125
  C,
122
- V
123
- ]), Qe = d(() => !C || !S ? null : s(S, { date: H }).endTimeSlots, [
126
+ H
127
+ ]), $e = d(() => !C || !S ? null : s(S, { date: U }).endTimeSlots, [
124
128
  S,
125
- H,
129
+ U,
126
130
  C
127
- ]), Y = d(() => C ? N.length ? N : Ze ?? [] : S ? J?.startTimeSlots ?? [] : se(E, A), [
131
+ ]), Y = d(() => C ? Fe.length ? Fe : Qe ?? [] : S ? Xe ?? [] : ce(E, A), [
128
132
  S,
129
- J?.startTimeSlots,
130
- Ze,
133
+ Xe,
134
+ Qe,
131
135
  C,
132
- N,
136
+ Fe,
133
137
  A,
134
138
  E
135
- ]), X = d(() => C ? F === H ? ze : Qe ?? [] : S ? J?.endTimeSlots ?? [] : se(Se ?? E, A), [
139
+ ]), X = d(() => C ? L === U ? Le : $e ?? [] : S ? Ze ?? [] : ce(Se ?? E, A), [
136
140
  S,
137
- J?.endTimeSlots,
138
- H,
141
+ Ze,
142
+ U,
139
143
  Se,
140
- Qe,
144
+ $e,
141
145
  C,
142
- ze,
143
- F,
146
+ Le,
147
+ L,
144
148
  A,
145
149
  E
146
150
  ]), Z = l((e, t) => {
147
- e !== g && (Le(t === "user"), ne(e, { source: t }));
148
- }, [ne, g]), Q = l((e, t = "auto") => {
151
+ e !== h && (Pe(t === "user"), re(e, { source: t }));
152
+ }, [re, h]), Q = l((e, t = "auto") => {
149
153
  e !== y && (t !== "user" && e && X.find((t) => t.value === e)?.isExtra || de(e, { source: t }));
150
154
  }, [
151
155
  X,
152
156
  y,
153
157
  de
154
- ]), $ = d(() => Y.length ? Y.find((e) => !(e.isDisabled || Ye != null && e.startMinutes < Ye)) ?? null : null, [Ye, Y]);
158
+ ]), $ = d(() => Y.length ? Y.find((e) => !(e.isDisabled || J != null && e.startMinutes < J)) ?? null : null, [J, Y]);
155
159
  u(() => {
156
- T || Ie || $ && g !== $.value && Z($.value, "auto");
160
+ T || Ne || $ && h !== $.value && Z($.value, "auto");
157
161
  }, [
158
162
  T,
159
163
  $,
160
- Ie,
161
- g,
164
+ Ne,
165
+ h,
162
166
  Z
163
167
  ]), u(() => {
164
168
  if (T || !Y.length) return;
165
- let e = g ? Y.find((e) => e.value === g) : void 0, t = q ?? void 0, n = W ? t : null, r = (e) => {
169
+ let e = h ? Y.find((e) => e.value === h) : void 0, t = q ?? void 0, n = G ? t : null, r = (e) => {
166
170
  let t = typeof e == "number" ? e : null, n = Y.find((e) => !(e.isDisabled || t != null && e.startMinutes < t));
167
- n && n.value !== g ? Z(n.value, "auto") : !n && g && Z("", "auto");
171
+ n && n.value !== h ? Z(n.value, "auto") : !n && h && Z("", "auto");
168
172
  };
169
- if (g && !e) {
173
+ if (h && !e) {
170
174
  r(n);
171
175
  return;
172
176
  }
@@ -174,32 +178,32 @@ var re = (e) => e, ie = {
174
178
  r(n);
175
179
  return;
176
180
  }
177
- if (!W || t == null) return;
178
- let i = o(g);
181
+ if (!G || t == null) return;
182
+ let i = o(h);
179
183
  if (i != null && i >= t && !e?.isDisabled) return;
180
184
  let a = Y.find((e) => !e.isDisabled && e.startMinutes >= t);
181
- a && a.value !== g && Z(a.value, "auto");
185
+ a && a.value !== h && Z(a.value, "auto");
182
186
  }, [
183
187
  T,
184
188
  q,
185
- W,
186
- g,
189
+ G,
190
+ h,
187
191
  Y,
188
192
  Z
189
193
  ]), u(() => {
190
194
  if (T || !X.length) return;
191
- if (C && z.current === H && F === H) {
192
- z.current = void 0;
195
+ if (C && B.current === U && L === U) {
196
+ B.current = void 0;
193
197
  let e = le(X);
194
198
  if (e && e.value !== y) {
195
199
  Q(e.value);
196
200
  return;
197
201
  }
198
202
  }
199
- let e = o(g), t = o(y), n = y ? X.find((e) => e.value === y) : void 0, r = [];
200
- G && q != null && r.push(q), We && e != null && r.push(e + A);
203
+ let e = o(h), t = o(y), n = y ? X.find((e) => e.value === y) : void 0, r = [];
204
+ K && q != null && r.push(q), Ue && e != null && r.push(e + A);
201
205
  let i = r.length ? Math.max(...r) : null, a = (e) => {
202
- let t = typeof e == "number" ? e : null, n = X.find((e) => !(!ce(e) || t != null && e.startMinutes < t));
206
+ let t = typeof e == "number" ? e : null, n = X.find((e) => !(!_(e) || t != null && e.startMinutes < t));
203
207
  n && n.value !== y ? Q(n.value) : !n && y && Q("");
204
208
  };
205
209
  if (C && y && !n) {
@@ -217,88 +221,88 @@ var re = (e) => e, ie = {
217
221
  X,
218
222
  T,
219
223
  q,
220
- H,
224
+ U,
221
225
  y,
222
226
  C,
223
- F,
224
- G,
225
- We,
227
+ L,
228
+ K,
229
+ Ue,
226
230
  A,
227
- g,
231
+ h,
228
232
  Q
229
- ]), u(() => (Fe(!0), () => {
230
- L.current != null && clearTimeout(L.current);
233
+ ]), u(() => (Me(!0), () => {
234
+ z.current != null && clearTimeout(z.current);
231
235
  }), []), u(() => {
232
- De && Ee && j(!1);
233
- }, [Ee, De]), u(() => {
234
- Ae && ke && M(!1);
235
- }, [ke, Ae]);
236
- let $e = l((e) => {
237
- e && R.current && Date.now() < R.current || j(e);
238
- }, []), et = l((e) => {
239
- e && Be.current && Date.now() < Be.current || M(e);
236
+ N && j && M(!1);
237
+ }, [j, N]), u(() => {
238
+ F && De && P(!1);
239
+ }, [De, F]);
240
+ let et = l((e) => {
241
+ e && Re.current && Date.now() < Re.current || M(e);
240
242
  }, []), tt = l((e) => {
241
- e && Ve.current && Date.now() < Ve.current || je(e);
242
- }, []), nt = l((e, { openTimePicker: t, openEndDatePicker: n, close: r = !0 } = {}) => {
243
+ e && ze.current && Date.now() < ze.current || P(e);
244
+ }, []), nt = l((e) => {
245
+ e && Be.current && Date.now() < Be.current || Oe(e);
246
+ }, []), rt = l((e, { openTimePicker: t, openEndDatePicker: n, close: r = !0 } = {}) => {
243
247
  let i = t ?? w === "chained-times", a = n ?? w === "dates-first";
244
248
  if (!e) {
245
- r && j(!1);
249
+ r && M(!1);
246
250
  return;
247
251
  }
248
- h(e), (r || a) && (R.current = Date.now() + 250, j(!1)), _ && e > _ && v(e), i && Oe(!0), a && (L.current != null && clearTimeout(L.current), D ? (M(!0), L.current = null) : L.current = setTimeout(() => {
249
- M(!0);
252
+ ne(e), (r || a) && (Re.current = Date.now() + 250, M(!1)), g && e > g && v(e), i && Ee(!0), a && (z.current != null && clearTimeout(z.current), D ? (P(!0), z.current = null) : z.current = setTimeout(() => {
253
+ P(!0);
250
254
  }, 100));
251
255
  }, [
252
- _,
256
+ g,
253
257
  D,
254
258
  v,
255
- h,
259
+ ne,
256
260
  w
257
- ]), rt = l((e) => {
258
- Z(e, "user"), Oe(!1), L.current != null && clearTimeout(L.current), w === "chained-times" && e && m ? L.current = setTimeout(() => {
259
- M(!0);
260
- }, 100) : L.current = null;
261
+ ]), it = l((e) => {
262
+ Z(e, "user"), Ee(!1), z.current != null && clearTimeout(z.current), w === "chained-times" && e && m ? z.current = setTimeout(() => {
263
+ P(!0);
264
+ }, 100) : z.current = null;
261
265
  }, [
262
266
  w,
263
267
  m,
264
268
  Z
265
- ]), it = l((e) => {
266
- e && e !== g && Z(e, "user");
267
- }, [g, Z]), at = l((e, { openTimePicker: t, close: n = !0, commit: r = w === "dates-first" && D } = {}) => {
269
+ ]), at = l((e) => {
270
+ e && e !== h && Z(e, "user");
271
+ }, [h, Z]), ot = l((e, { openTimePicker: t, close: n = !0, commit: r = w === "dates-first" && D } = {}) => {
268
272
  let i = t ?? w === "chained-times", a = y;
269
273
  if (e && w === "dates-first") {
270
274
  if (C) {
271
- let t = B(e);
272
- t && (z.current = t);
275
+ let t = V(e);
276
+ t && (B.current = t);
273
277
  }
274
- let t = Xe(e);
278
+ let t = Ye(e);
275
279
  t && (a = t, Q(t));
276
280
  }
277
- v(e), Ne(void 0), n && (Be.current = Date.now() + 250, M(!1)), e && i && je(!0), e && r && b && (typeof window > "u" ? b(e, a) : requestAnimationFrame(() => b(e, a)));
281
+ v(e), Ae(void 0), n && (ze.current = Date.now() + 250, P(!1)), e && i && Oe(!0), e && r && b && (typeof window > "u" ? b(e, a) : requestAnimationFrame(() => b(e, a)));
278
282
  }, [
279
283
  y,
280
284
  C,
281
- Xe,
285
+ Ye,
282
286
  D,
283
287
  v,
284
288
  b,
285
289
  w,
286
- B,
290
+ V,
287
291
  Q
288
- ]), ot = l((e) => {
292
+ ]), st = l((e) => {
289
293
  Q(e, "user");
290
- }, [Q]), st = l((e) => {
291
- z.current = void 0, Q(e, "user"), Ve.current = Date.now() + 250, je(!1), x && (typeof window > "u" ? x() : requestAnimationFrame(() => {
294
+ }, [Q]), ct = l((e) => {
295
+ B.current = void 0, Q(e, "user"), Be.current = Date.now() + 250, Oe(!1), x && (typeof window > "u" ? x() : requestAnimationFrame(() => {
292
296
  requestAnimationFrame(x);
293
297
  }));
294
298
  }, [x, Q]);
295
299
  return {
296
300
  startDate: m,
297
- startTime: g,
298
- endDate: _,
301
+ startTime: h,
302
+ endDate: g,
299
303
  endTime: y,
300
304
  errors: fe,
301
- labels: pe ?? ie,
305
+ labels: pe ?? ae,
302
306
  t: me,
303
307
  language: he ?? O,
304
308
  labelClassName: ge,
@@ -310,35 +314,35 @@ var re = (e) => e, ie = {
310
314
  dateLocale: Te,
311
315
  numberOfMonths: D ? 1 : 2,
312
316
  isMobile: D,
313
- isHydrated: Pe,
317
+ isHydrated: je,
314
318
  openDatePickerOnFocus: xe,
315
319
  withMobileDateDrawer: ye,
316
320
  selectionFlow: w,
317
- isStartDatePopoverOpen: Ee,
318
- setIsStartDatePopoverOpen: $e,
319
- isStartTimeSelectOpen: De,
320
- setIsStartTimeSelectOpen: Oe,
321
- isEndDatePopoverOpen: ke,
322
- setIsEndDatePopoverOpen: et,
323
- isEndTimeSelectOpen: Ae,
324
- setIsEndTimeSelectOpen: tt,
325
- hoveredEndDate: Me,
326
- setHoveredEndDate: Ne,
327
- resetHoveredEndDate: Ue,
321
+ isStartDatePopoverOpen: j,
322
+ setIsStartDatePopoverOpen: et,
323
+ isStartTimeSelectOpen: N,
324
+ setIsStartTimeSelectOpen: Ee,
325
+ isEndDatePopoverOpen: De,
326
+ setIsEndDatePopoverOpen: tt,
327
+ isEndTimeSelectOpen: F,
328
+ setIsEndTimeSelectOpen: nt,
329
+ hoveredEndDate: ke,
330
+ setHoveredEndDate: Ae,
331
+ resetHoveredEndDate: He,
328
332
  startTimeSlots: Y,
329
333
  availableEndTimeSlots: X,
330
- isStartToday: W,
331
- isEndToday: G,
332
- minSelectableDate: Je,
334
+ isStartToday: G,
335
+ isEndToday: K,
336
+ minSelectableDate: qe,
333
337
  earliestMinutesForToday: q,
334
- startMinutesValue: Ge,
335
- isSameDaySelection: We,
336
- updateStartTime: it,
337
- selectStartDate: nt,
338
- selectStartTime: rt,
339
- selectEndDate: at,
340
- updateEndTime: ot,
341
- selectEndTime: st
338
+ startMinutesValue: We,
339
+ isSameDaySelection: Ue,
340
+ updateStartTime: at,
341
+ selectStartDate: rt,
342
+ selectStartTime: it,
343
+ selectEndDate: ot,
344
+ updateEndTime: st,
345
+ selectEndTime: ct
342
346
  };
343
347
  };
344
348
  //#endregion
@@ -1,6 +1,4 @@
1
- import { StorefrontPreset } from '../../data/config';
2
- export declare function ContactSection({ preset, storeSlug }: {
3
- preset: StorefrontPreset;
1
+ export declare function ContactSection({ storeSlug }: {
4
2
  storeSlug: string;
5
3
  }): import("react/jsx-runtime").JSX.Element;
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContactSection/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAoBzD,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;IAAE,MAAM,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,2CAmRpG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContactSection/index.tsx"],"names":[],"mappings":"AAmCA,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,2CAiUlE"}