@loczer/storefront-sdk 0.225.0 → 0.227.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 (42) hide show
  1. package/dist/chunks/pkg/booking-engine/dist/{schemas-DGn2a1my.js → schemas-DW5gdDYz.js} +4 -3
  2. package/dist/chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js +82 -0
  3. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts +2 -1
  4. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts.map +1 -1
  5. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +27 -27
  6. package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
  7. package/dist/components/ContractSaleDocument/Invoice.js +6 -3
  8. package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts +2 -1
  9. package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
  10. package/dist/components/ContractSaleDocument/InvoiceDetails.js +147 -90
  11. package/dist/components/ContractSaleDocument/PageFooter.d.ts +2 -1
  12. package/dist/components/ContractSaleDocument/PageFooter.d.ts.map +1 -1
  13. package/dist/components/ContractSaleDocument/PageFooter.js +10 -9
  14. package/dist/components/ContractSaleDocument/PageHeader.d.ts +2 -1
  15. package/dist/components/ContractSaleDocument/PageHeader.d.ts.map +1 -1
  16. package/dist/components/ContractSaleDocument/PageHeader.js +10 -9
  17. package/dist/components/Footer/businessHoursStatus.d.ts.map +1 -1
  18. package/dist/components/Footer/businessHoursStatus.js +21 -36
  19. package/dist/components/Footer/businessHoursUtils.d.ts.map +1 -1
  20. package/dist/components/Footer/businessHoursUtils.js +2 -1
  21. package/dist/i18n/en.d.ts +6 -0
  22. package/dist/i18n/en.d.ts.map +1 -1
  23. package/dist/i18n/en.js +6 -0
  24. package/dist/i18n/fr.d.ts +6 -0
  25. package/dist/i18n/fr.d.ts.map +1 -1
  26. package/dist/i18n/fr.js +6 -0
  27. package/dist/index.d.ts +144 -0
  28. package/dist/index.js +75 -74
  29. package/dist/lib/booking-period.d.ts.map +1 -1
  30. package/dist/lib/booking-period.js +120 -138
  31. package/dist/lib/booking.js +1 -1
  32. package/dist/lib/checkoutSubmit.js +1 -1
  33. package/dist/lib/contractSaleDocument.d.ts +41 -0
  34. package/dist/lib/contractSaleDocument.d.ts.map +1 -1
  35. package/dist/lib/contractSaleDocument.js +40 -30
  36. package/dist/lib/contractSaleDocumentApi.d.ts +60 -0
  37. package/dist/lib/contractSaleDocumentApi.d.ts.map +1 -1
  38. package/dist/pages/ContractSaleDocumentPage.d.ts +20 -0
  39. package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
  40. package/dist/storefront.css +1 -1
  41. package/dist/storefrontSchemas.js +1 -1
  42. package/package.json +1 -1
@@ -1,68 +1,70 @@
1
1
  import { __exportAll as e } from "../chunks/_virtual/_rolldown/runtime-B5ovbsoX.js";
2
+ import { resolveOpeningHoursForDate as t } from "../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
3
+ import "../chunks/pkg/booking-engine/dist/schemas-DW5gdDYz.js";
2
4
  //#region src/lib/booking-period.ts
3
- var t = /* @__PURE__ */ e({
4
- adjustBookingPeriod: () => j,
5
- businessDateStringToDate: () => O,
6
- calendarDateToBusinessDateString: () => S,
7
- createBookingPeriodConstants: () => m,
8
- dateToBusinessDateString: () => D,
9
- getDefaultBookingPeriod: () => E,
10
- getWeekdayFromDateString: () => k,
11
- instantToBusinessDateString: () => C,
12
- instantToBusinessDateTimeParts: () => v,
13
- minutesToTimeString: () => n,
14
- normalizeBusinessDateString: () => x,
15
- normalizeOpeningHours: () => p,
16
- parseTimeToMinutes: () => r
17
- }), n = (e) => {
5
+ var n = /* @__PURE__ */ e({
6
+ adjustBookingPeriod: () => M,
7
+ businessDateStringToDate: () => k,
8
+ calendarDateToBusinessDateString: () => C,
9
+ createBookingPeriodConstants: () => h,
10
+ dateToBusinessDateString: () => O,
11
+ getDefaultBookingPeriod: () => D,
12
+ getWeekdayFromDateString: () => A,
13
+ instantToBusinessDateString: () => w,
14
+ instantToBusinessDateTimeParts: () => y,
15
+ minutesToTimeString: () => r,
16
+ normalizeBusinessDateString: () => S,
17
+ normalizeOpeningHours: () => m,
18
+ parseTimeToMinutes: () => i
19
+ }), r = (e) => {
18
20
  let t = Math.max(0, e), n = Math.floor(t / 60) % 24, r = t % 60;
19
21
  return `${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
20
- }, r = (e) => {
22
+ }, i = (e) => {
21
23
  if (!e) return null;
22
24
  let [t, n] = e.split(":"), r = Number(t), i = Number(n);
23
25
  return !Number.isFinite(r) || !Number.isFinite(i) || r < 0 || i < 0 ? null : r * 60 + i;
24
- }, i = (e) => {
26
+ }, a = (e) => {
25
27
  let t = e.includes("-") ? e.replace(/-/g, "") : e;
26
28
  return /^\d{8}$/.test(t) ? Number(t) : null;
27
- }, a = (e) => {
29
+ }, o = (e) => {
28
30
  let t = String(Math.trunc(e)).padStart(8, "0");
29
31
  return `${t.slice(0, 4)}-${t.slice(4, 6)}-${t.slice(6, 8)}`;
30
- }, o = (e) => {
32
+ }, s = (e) => {
31
33
  let t = e.getFullYear(), n = e.getMonth() + 1, r = e.getDate(), i = String(n).padStart(2, "0"), a = String(r).padStart(2, "0");
32
34
  return Number(`${t}${i}${a}`);
33
- }, s = (e) => {
35
+ }, c = (e) => {
34
36
  if (!e) return null;
35
- if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : o(e);
36
- let t = i(e);
37
+ if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : s(e);
38
+ let t = a(e);
37
39
  if (t != null) return t;
38
40
  let n = new Date(e);
39
- return Number.isNaN(n.getTime()) ? null : o(n);
40
- }, c = (e, t) => {
41
- let n = e ? s(e) : null;
42
- return n == null ? e || a(t) : a(n);
43
- }, l = (e) => {
44
- let [t, n, r] = a(e).split("-").map(Number), i = new Date(t, (n || 1) - 1, r || 1).getDay();
41
+ return Number.isNaN(n.getTime()) ? null : s(n);
42
+ }, l = (e, t) => {
43
+ let n = e ? c(e) : null;
44
+ return n == null ? e || o(t) : o(n);
45
+ }, u = (e) => {
46
+ let [t, n, r] = o(e).split("-").map(Number), i = new Date(t, (n || 1) - 1, r || 1).getDay();
45
47
  return Number.isNaN(i) ? 0 : (i + 6) % 7;
46
- }, u = (e) => Array.isArray(e) ? e.map((e) => {
48
+ }, d = (e) => Array.isArray(e) ? e.map((e) => {
47
49
  if (!e || typeof e != "object") return null;
48
50
  let t = typeof e.start == "string" ? e.start : "", n = typeof e.end == "string" ? e.end : "";
49
51
  return !t || !n ? null : {
50
52
  start: t,
51
53
  end: n
52
54
  };
53
- }).filter((e) => !!e) : [], d = (e) => {
54
- let t = r(e.start), i = r(e.end);
55
- if (t == null || i == null || i <= t) return null;
56
- let a = n(t), o = n(i);
55
+ }).filter((e) => !!e) : [], f = (e) => {
56
+ let t = i(e.start), n = i(e.end);
57
+ if (t == null || n == null || n <= t) return null;
58
+ let a = r(t), o = r(n);
57
59
  return {
58
60
  startMinutes: t,
59
- endMinutes: i,
61
+ endMinutes: n,
60
62
  startLabel: a,
61
63
  endLabel: o,
62
64
  rangeLabel: `${a} - ${o}`
63
65
  };
64
- }, f = (e, t) => {
65
- let n = t.map(d).filter((e) => !!e).sort((e, t) => e.startMinutes - t.startMinutes);
66
+ }, p = (e, t) => {
67
+ let n = t.map(f).filter((e) => !!e).sort((e, t) => e.startMinutes - t.startMinutes);
66
68
  if (!n.length) return {
67
69
  day: e,
68
70
  isClosed: !0,
@@ -80,69 +82,49 @@ var t = /* @__PURE__ */ e({
80
82
  closingMinutes: i.endMinutes,
81
83
  summaryLabel: n.map((e) => e.rangeLabel).join(" / ")
82
84
  };
83
- }, p = (e, t, n = {}) => {
84
- let r = Array.isArray(e) ? e : [], i = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
85
- for (let e of i) {
86
- if (!e || typeof e != "object") continue;
87
- let t = s(e.date);
88
- t != null && a.set(t, u(e.openingSlots));
89
- }
90
- let d = s(n.referenceDate) ?? o(/* @__PURE__ */ new Date()), p = l(d), m = a.get(d), h, g;
91
- for (let e of r) {
92
- if (!e || typeof e != "object") continue;
93
- let t = s(e.startDate), n = s(e.endDate);
94
- if (t == null || n == null) {
95
- g ||= e;
96
- continue;
97
- }
98
- if (d >= Math.min(t, n) && d <= Math.max(t, n)) {
99
- h = e;
100
- break;
101
- }
102
- g ||= e;
103
- }
104
- let _ = h ?? g ?? null, v = Array.isArray(_?.openingHours) ? _.openingHours : [], y = /* @__PURE__ */ new Map();
105
- for (let e of v) {
85
+ }, m = (e, n, r = {}) => {
86
+ let i = Array.isArray(e) ? e : [], a = Array.isArray(n) ? n : [], f = c(r.referenceDate) ?? s(/* @__PURE__ */ new Date()), m = t(i.filter((e) => !!(e && typeof e == "object")), a.filter((e) => !!(e && typeof e == "object")), o(f)), h = m.weekday ?? u(f), g = m.period ?? null, _ = Array.isArray(g?.openingHours) ? g.openingHours : [], v = /* @__PURE__ */ new Map();
87
+ for (let e of _) {
106
88
  if (!e || typeof e.day != "number") continue;
107
- let t = (e.day % 7 + 7) % 7, n = u(e.openingSlots);
108
- y.set(t, n);
89
+ let t = (e.day % 7 + 7) % 7, n = d(e.openingSlots);
90
+ v.set(t, n);
109
91
  }
110
- m && y.set(p, m);
111
- let b = [];
92
+ m.override && v.set(h, d(m.openingSlots));
93
+ let y = [];
112
94
  for (let e = 0; e < 7; e += 1) {
113
- let t = e, n = y.get(t) ?? [];
114
- b.push(f(t, n));
95
+ let t = e, n = v.get(t) ?? [];
96
+ y.push(p(t, n));
115
97
  }
116
- let x = b.flatMap((e) => e.openingSlots);
117
- if (!x.length) return {
118
- days: b,
98
+ let b = y.flatMap((e) => e.openingSlots);
99
+ if (!b.length) return {
100
+ days: y,
119
101
  defaultOpeningMinutes: 0,
120
102
  defaultClosingMinutes: 0,
121
103
  defaultOpeningLabel: "00:00",
122
104
  defaultClosingLabel: "00:00",
123
105
  defaultSummaryLabel: "",
124
- season: _ ? {
125
- name: typeof _.name == "string" ? _.name : void 0,
126
- startDate: c(_.startDate, d),
127
- endDate: c(_.endDate, d)
106
+ season: g ? {
107
+ name: typeof g.name == "string" ? g.name : void 0,
108
+ startDate: l(g.startDate, f),
109
+ endDate: l(g.endDate, f)
128
110
  } : null
129
111
  };
130
- let S = x.reduce((e, t) => t.startMinutes < e.startMinutes ? t : e), C = x.reduce((e, t) => t.endMinutes > e.endMinutes ? t : e), w = b.find((e) => !e.isClosed && e.summaryLabel) ?? b[0];
112
+ let x = b.reduce((e, t) => t.startMinutes < e.startMinutes ? t : e), S = b.reduce((e, t) => t.endMinutes > e.endMinutes ? t : e), C = y.find((e) => !e.isClosed && e.summaryLabel) ?? y[0];
131
113
  return {
132
- days: b,
133
- defaultOpeningMinutes: S.startMinutes,
134
- defaultClosingMinutes: C.endMinutes,
135
- defaultOpeningLabel: S.startLabel,
136
- defaultClosingLabel: C.endLabel,
137
- defaultSummaryLabel: w.summaryLabel ?? `${S.startLabel} - ${C.endLabel}`,
138
- season: _ ? {
139
- name: typeof _.name == "string" ? _.name : void 0,
140
- startDate: c(_.startDate, d),
141
- endDate: c(_.endDate, d)
114
+ days: y,
115
+ defaultOpeningMinutes: x.startMinutes,
116
+ defaultClosingMinutes: S.endMinutes,
117
+ defaultOpeningLabel: x.startLabel,
118
+ defaultClosingLabel: S.endLabel,
119
+ defaultSummaryLabel: C.summaryLabel ?? `${x.startLabel} - ${S.endLabel}`,
120
+ season: g ? {
121
+ name: typeof g.name == "string" ? g.name : void 0,
122
+ startDate: l(g.startDate, f),
123
+ endDate: l(g.endDate, f)
142
124
  } : null
143
125
  };
144
- }, m = (e) => {
145
- let { timing: t, openingHours: r, openingHoursOverrides: i, timeZone: a } = e, o = t.slotIntervalMinutes, s = p(r, i), c = p(r, []), l = (e) => e?.dateString ? p(r, i, { referenceDate: e.dateString }) : s, u = (e) => e?.dateString ? p(r, [], { referenceDate: e.dateString }) : c, d = (e, t) => l(t).days.find((t) => t.day === e), f = (e, t) => d(e, t)?.openingSlots ?? [], m = (e, t) => u(t).days.find((t) => t.day === e), h = (e, t) => m(e, t)?.openingSlots ?? [], g = (e, t, n) => {
126
+ }, h = (e) => {
127
+ let { timing: t, openingHours: n, openingHoursOverrides: i, timeZone: a } = e, o = t.slotIntervalMinutes, s = m(n, i), c = m(n, []), l = (e) => e?.dateString ? m(n, i, { referenceDate: e.dateString }) : s, u = (e) => e?.dateString ? m(n, [], { referenceDate: e.dateString }) : c, d = (e, t) => l(t).days.find((t) => t.day === e), f = (e, t) => d(e, t)?.openingSlots ?? [], p = (e, t) => u(t).days.find((t) => t.day === e), h = (e, t) => p(e, t)?.openingSlots ?? [], g = (e, t, n) => {
146
128
  let r = f(e, n);
147
129
  if (!r.length) return null;
148
130
  let i = typeof t == "number" ? Math.max(t, 0) : -Infinity;
@@ -184,12 +166,12 @@ var t = /* @__PURE__ */ e({
184
166
  defaultWeekday: y,
185
167
  defaultSeasonWeekday: b,
186
168
  defaultStartMinutes: E,
187
- defaultStartTime: n(E),
169
+ defaultStartTime: r(E),
188
170
  defaultEndMinutes: D,
189
- defaultEndTime: n(D),
171
+ defaultEndTime: r(D),
190
172
  getDayHours: d,
191
173
  getIntervalsForWeekday: f,
192
- getSeasonDayHours: m,
174
+ getSeasonDayHours: p,
193
175
  getSeasonIntervalsForWeekday: h,
194
176
  getFirstStartMinutesForWeekday: g,
195
177
  getLastStartMinutesForWeekday: _,
@@ -197,10 +179,10 @@ var t = /* @__PURE__ */ e({
197
179
  getNormalizedOpeningHours: l,
198
180
  getSeasonNormalizedOpeningHours: u
199
181
  };
200
- }, h = (e, t, n) => new Intl.DateTimeFormat("en-CA", {
182
+ }, g = (e, t, n) => new Intl.DateTimeFormat("en-CA", {
201
183
  timeZone: t,
202
184
  ...n
203
- }).format(e), g = (e, t) => {
185
+ }).format(e), _ = (e, t) => {
204
186
  let n = new Intl.DateTimeFormat("en-CA", {
205
187
  timeZone: t,
206
188
  hour12: !1,
@@ -215,7 +197,7 @@ var t = /* @__PURE__ */ e({
215
197
  timeString: `${r.hour}:${r.minute}`,
216
198
  minutesFromMidnight: Number(r.hour) * 60 + Number(r.minute)
217
199
  };
218
- }, _ = (e) => {
200
+ }, v = (e) => {
219
201
  let t = (e.includes("-") ? e.replace(/-/g, "") : e).match(/^(\d{4})(\d{2})(\d{2})$/);
220
202
  if (!t) return {
221
203
  year: NaN,
@@ -228,28 +210,28 @@ var t = /* @__PURE__ */ e({
228
210
  month: Number(r),
229
211
  day: Number(i)
230
212
  };
231
- }, v = (e, t) => {
232
- if (!Number.isNaN(e.getTime())) return g(e, t);
233
- }, y = (e, t, n) => `${String(e).padStart(4, "0")}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`, b = (e, t, n) => {
213
+ }, y = (e, t) => {
214
+ if (!Number.isNaN(e.getTime())) return _(e, t);
215
+ }, b = (e, t, n) => `${String(e).padStart(4, "0")}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`, x = (e, t, n) => {
234
216
  if (!Number.isInteger(e) || !Number.isInteger(t) || !Number.isInteger(n)) return !1;
235
217
  let r = new Date(e, t - 1, n);
236
218
  return r.getFullYear() === e && r.getMonth() === t - 1 && r.getDate() === n;
237
- }, x = (e) => {
238
- let { year: t, month: n, day: r } = _(e);
239
- if (b(t, n, r)) return y(t, n, r);
240
219
  }, S = (e) => {
241
- if (!(!e || Number.isNaN(e.getTime()))) return y(e.getFullYear(), e.getMonth() + 1, e.getDate());
242
- }, C = (e, t) => {
243
- if (!Number.isNaN(e.getTime())) return h(e, t, {
220
+ let { year: t, month: n, day: r } = v(e);
221
+ if (x(t, n, r)) return b(t, n, r);
222
+ }, C = (e) => {
223
+ if (!(!e || Number.isNaN(e.getTime()))) return b(e.getFullYear(), e.getMonth() + 1, e.getDate());
224
+ }, w = (e, t) => {
225
+ if (!Number.isNaN(e.getTime())) return g(e, t, {
244
226
  year: "numeric",
245
227
  month: "2-digit",
246
228
  day: "2-digit"
247
229
  });
248
- }, w = (e, t) => {
230
+ }, T = (e, t) => {
249
231
  let n = new Date(e.getTime());
250
232
  return n.setUTCDate(n.getUTCDate() + t), n;
251
- }, T = (e, t) => {
252
- let { dateString: n, minutesFromMidnight: r } = g(e, t.timeZone), i = O(n);
233
+ }, E = (e, t) => {
234
+ let { dateString: n, minutesFromMidnight: r } = _(e, t.timeZone), i = k(n);
253
235
  if (Number.isNaN(i.getTime())) return {
254
236
  baseDate: /* @__PURE__ */ new Date(),
255
237
  minutesFromMidnight: r
@@ -259,8 +241,8 @@ var t = /* @__PURE__ */ e({
259
241
  baseDate: a,
260
242
  minutesFromMidnight: r
261
243
  };
262
- }, E = (e) => {
263
- let t = e.referenceDate ?? /* @__PURE__ */ new Date(), n = m(e.config), { baseDate: r } = T(t, n), i = new Date(r.getTime()), a = new Date(r.getTime()), o = n.defaultStartTime, s = n.defaultEndTime, c = j({
244
+ }, D = (e) => {
245
+ let t = e.referenceDate ?? /* @__PURE__ */ new Date(), n = h(e.config), { baseDate: r } = E(t, n), i = new Date(r.getTime()), a = new Date(r.getTime()), o = n.defaultStartTime, s = n.defaultEndTime, c = M({
264
246
  startDate: i,
265
247
  startTime: o,
266
248
  endDate: a,
@@ -268,37 +250,37 @@ var t = /* @__PURE__ */ e({
268
250
  }, {
269
251
  referenceDate: t,
270
252
  config: e.config
271
- }), l = c.startDateString ? O(c.startDateString) : i, u = c.shouldResetEnd ? new Date(l.getTime()) : c.endDateString ? O(c.endDateString) : a, d = c.startTime ?? o, f = c.endTime ?? s;
253
+ }), l = c.startDateString ? k(c.startDateString) : i, u = c.shouldResetEnd ? new Date(l.getTime()) : c.endDateString ? k(c.endDateString) : a, d = c.startTime ?? o, f = c.endTime ?? s;
272
254
  return {
273
255
  startDate: new Date(l.getTime()),
274
256
  startTime: d,
275
257
  endDate: new Date(u.getTime()),
276
258
  endTime: f
277
259
  };
278
- }, D = (e, t) => {
279
- if (e) return typeof e == "string" ? x(e) : S(e);
280
- }, O = (e) => {
281
- let { year: t, month: n, day: r } = _(e);
282
- return new Date(t, n - 1, r);
260
+ }, O = (e, t) => {
261
+ if (e) return typeof e == "string" ? S(e) : C(e);
283
262
  }, k = (e) => {
284
- let t = O(e).getDay();
263
+ let { year: t, month: n, day: r } = v(e);
264
+ return new Date(t, n - 1, r);
265
+ }, A = (e) => {
266
+ let t = k(e).getDay();
285
267
  return Number.isNaN(t) ? 0 : (t + 6) % 7;
286
- }, A = (e, t, r) => {
287
- let { dateString: i, minutesFromMidnight: a } = g(e, t.timeZone), o = t.slotIntervalMinutes, s = k(i), c = typeof r == "number" ? r : a + t.minBufferMinutes, l = Math.ceil(Math.max(c, 0) / o) * o, u = e, d = i, f = s, p = 0;
268
+ }, j = (e, t, n) => {
269
+ let { dateString: i, minutesFromMidnight: a } = _(e, t.timeZone), o = t.slotIntervalMinutes, s = A(i), c = typeof n == "number" ? n : a + t.minBufferMinutes, l = Math.ceil(Math.max(c, 0) / o) * o, u = e, d = i, f = s, p = 0;
288
270
  for (; p < 14;) {
289
271
  let e = t.getFirstStartMinutesForWeekday(f, p === 0 ? l : null, { dateString: d });
290
272
  if (typeof e == "number") return {
291
273
  dateString: d,
292
- time: n(e)
274
+ time: r(e)
293
275
  };
294
- p += 1, u = w(u, 1), d = g(u, t.timeZone).dateString, f = k(d), l = 0;
276
+ p += 1, u = T(u, 1), d = _(u, t.timeZone).dateString, f = A(d), l = 0;
295
277
  }
296
278
  return {
297
279
  dateString: i,
298
- time: n(t.defaultStartMinutes)
280
+ time: r(t.defaultStartMinutes)
299
281
  };
300
- }, j = (e, t) => {
301
- let i = t.referenceDate ?? /* @__PURE__ */ new Date(), a = m(t.config), o = t.toleranceMinutes ?? a.pastToleranceMinutes, s = D(e.startDate, a.timeZone), c = D(e.endDate, a.timeZone), l = e.startTime ?? null;
282
+ }, M = (e, t) => {
283
+ let n = t.referenceDate ?? /* @__PURE__ */ new Date(), a = h(t.config), o = t.toleranceMinutes ?? a.pastToleranceMinutes, s = O(e.startDate, a.timeZone), c = O(e.endDate, a.timeZone), l = e.startTime ?? null;
302
284
  if (!s) return {
303
285
  startDateString: s,
304
286
  startTime: l,
@@ -307,44 +289,44 @@ var t = /* @__PURE__ */ e({
307
289
  wasAdjusted: !1,
308
290
  shouldResetEnd: !1
309
291
  };
310
- let u = g(i, a.timeZone), d = s, f = l, p, h = !1;
292
+ let u = _(n, a.timeZone), d = s, f = l, p, m = !1;
311
293
  if (s < u.dateString) {
312
- let e = A(i, a);
313
- d = e.dateString, f = e.time, p = "start_date_in_past", h = !0;
294
+ let e = j(n, a);
295
+ d = e.dateString, f = e.time, p = "start_date_in_past", m = !0;
314
296
  } else if (s === u.dateString) {
315
- let e = r(l), t = u.minutesFromMidnight - o;
297
+ let e = i(l), t = u.minutesFromMidnight - o;
316
298
  if (e == null || e < t) {
317
- let e = A(i, a);
318
- d = e.dateString, f = e.time, p = "start_time_in_past", h = !0;
299
+ let e = j(n, a);
300
+ d = e.dateString, f = e.time, p = "start_time_in_past", m = !0;
319
301
  }
320
302
  }
321
- let _ = d ?? s;
322
- if (_) {
323
- let e = k(_), t = r(f);
324
- if (!a.isValidStartMinutesForWeekday(e, t, { dateString: _ })) {
325
- let t = a.getFirstStartMinutesForWeekday(e, null, { dateString: _ });
326
- if (typeof t == "number") f = n(t), h = !0;
303
+ let g = d ?? s;
304
+ if (g) {
305
+ let e = A(g), t = i(f);
306
+ if (!a.isValidStartMinutesForWeekday(e, t, { dateString: g })) {
307
+ let t = a.getFirstStartMinutesForWeekday(e, null, { dateString: g });
308
+ if (typeof t == "number") f = r(t), m = !0;
327
309
  else {
328
- let e = A(O(_), a, 0);
329
- d = e.dateString, f = e.time, h = !0;
310
+ let e = j(k(g), a, 0);
311
+ d = e.dateString, f = e.time, m = !0;
330
312
  }
331
313
  }
332
314
  }
333
- let v = h, y = v ? void 0 : c, b = (() => {
315
+ let v = m, y = v ? void 0 : c, b = (() => {
334
316
  let e = d ?? s;
335
317
  if (!e) return a.defaultEndTime;
336
- let t = k(e), r = a.getLastStartMinutesForWeekday(t, { dateString: e });
337
- return typeof r == "number" ? n(r) : a.defaultEndTime;
318
+ let t = A(e), n = a.getLastStartMinutesForWeekday(t, { dateString: e });
319
+ return typeof n == "number" ? r(n) : a.defaultEndTime;
338
320
  })(), x = v ? b : e.endTime ?? null;
339
321
  return {
340
322
  startDateString: d,
341
323
  startTime: f,
342
324
  endDateString: y,
343
325
  endTime: x,
344
- wasAdjusted: h,
326
+ wasAdjusted: m,
345
327
  adjustmentReason: p,
346
328
  shouldResetEnd: v
347
329
  };
348
330
  };
349
331
  //#endregion
350
- export { j as adjustBookingPeriod, t as booking_period_exports, O as businessDateStringToDate, S as calendarDateToBusinessDateString, m as createBookingPeriodConstants, D as dateToBusinessDateString, E as getDefaultBookingPeriod, k as getWeekdayFromDateString, C as instantToBusinessDateString, v as instantToBusinessDateTimeParts, n as minutesToTimeString, x as normalizeBusinessDateString, p as normalizeOpeningHours, r as parseTimeToMinutes };
332
+ export { M as adjustBookingPeriod, n as booking_period_exports, k as businessDateStringToDate, C as calendarDateToBusinessDateString, h as createBookingPeriodConstants, O as dateToBusinessDateString, D as getDefaultBookingPeriod, A as getWeekdayFromDateString, w as instantToBusinessDateString, y as instantToBusinessDateTimeParts, r as minutesToTimeString, S as normalizeBusinessDateString, m as normalizeOpeningHours, i as parseTimeToMinutes };
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-epi7FXIk.js";
2
- import "../chunks/pkg/booking-engine/dist/schemas-DGn2a1my.js";
2
+ import "../chunks/pkg/booking-engine/dist/schemas-DW5gdDYz.js";
3
3
  import { getDefaultBookingPeriod as t, parseTimeToMinutes as n } from "./booking-period.js";
4
4
  import { format as r } from "date-fns";
5
5
  //#region src/lib/booking.ts
@@ -1,6 +1,6 @@
1
1
  import { productKindSchema as e } from "../chunks/pkg/booking-engine/dist/models/Product.shared-CWP_qule.js";
2
2
  import { DEFAULT_BOOKING_DELIVERY_OPTION as t, bookingScheduleInputSchema as n } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-epi7FXIk.js";
3
- import "../chunks/pkg/booking-engine/dist/schemas-DGn2a1my.js";
3
+ import "../chunks/pkg/booking-engine/dist/schemas-DW5gdDYz.js";
4
4
  import { storefrontFulfillmentModeSchema as r } from "../storefrontSchemas.js";
5
5
  import { z as i } from "zod";
6
6
  //#region src/lib/checkoutSubmit.ts
@@ -1,5 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  export declare const contractSaleDocumentAddressSchema: z.ZodString;
3
+ export declare const contractSaleDocumentLegalIdentitySchema: z.ZodObject<{
4
+ legalName: z.ZodOptional<z.ZodString>;
5
+ registeredAddress: z.ZodOptional<z.ZodString>;
6
+ companyRegistrationNumber: z.ZodOptional<z.ZodString>;
7
+ establishmentRegistrationNumber: z.ZodOptional<z.ZodString>;
8
+ vatNumber: z.ZodOptional<z.ZodString>;
9
+ legalForm: z.ZodOptional<z.ZodString>;
10
+ shareCapital: z.ZodOptional<z.ZodString>;
11
+ tradeRegister: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strict>;
3
13
  export declare const contractSaleDocumentContactSchema: z.ZodObject<{
4
14
  name: z.ZodString;
5
15
  address: z.ZodOptional<z.ZodString>;
@@ -23,6 +33,16 @@ export declare const contractSaleDocumentContactSchema: z.ZodObject<{
23
33
  }, z.core.$strict>>;
24
34
  email: z.ZodOptional<z.ZodString>;
25
35
  phone: z.ZodOptional<z.ZodString>;
36
+ legalIdentity: z.ZodOptional<z.ZodObject<{
37
+ legalName: z.ZodOptional<z.ZodString>;
38
+ registeredAddress: z.ZodOptional<z.ZodString>;
39
+ companyRegistrationNumber: z.ZodOptional<z.ZodString>;
40
+ establishmentRegistrationNumber: z.ZodOptional<z.ZodString>;
41
+ vatNumber: z.ZodOptional<z.ZodString>;
42
+ legalForm: z.ZodOptional<z.ZodString>;
43
+ shareCapital: z.ZodOptional<z.ZodString>;
44
+ tradeRegister: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strict>>;
26
46
  }, z.core.$strip>;
27
47
  export declare const contractSaleDocumentLineItemSchema: z.ZodObject<{
28
48
  id: z.ZodNumber;
@@ -172,6 +192,16 @@ export declare const contractSaleDocumentSchema: z.ZodObject<{
172
192
  }, z.core.$strict>>;
173
193
  email: z.ZodOptional<z.ZodString>;
174
194
  phone: z.ZodOptional<z.ZodString>;
195
+ legalIdentity: z.ZodOptional<z.ZodObject<{
196
+ legalName: z.ZodOptional<z.ZodString>;
197
+ registeredAddress: z.ZodOptional<z.ZodString>;
198
+ companyRegistrationNumber: z.ZodOptional<z.ZodString>;
199
+ establishmentRegistrationNumber: z.ZodOptional<z.ZodString>;
200
+ vatNumber: z.ZodOptional<z.ZodString>;
201
+ legalForm: z.ZodOptional<z.ZodString>;
202
+ shareCapital: z.ZodOptional<z.ZodString>;
203
+ tradeRegister: z.ZodOptional<z.ZodString>;
204
+ }, z.core.$strict>>;
175
205
  }, z.core.$strip>;
176
206
  recipient: z.ZodObject<{
177
207
  name: z.ZodString;
@@ -196,6 +226,16 @@ export declare const contractSaleDocumentSchema: z.ZodObject<{
196
226
  }, z.core.$strict>>;
197
227
  email: z.ZodOptional<z.ZodString>;
198
228
  phone: z.ZodOptional<z.ZodString>;
229
+ legalIdentity: z.ZodOptional<z.ZodObject<{
230
+ legalName: z.ZodOptional<z.ZodString>;
231
+ registeredAddress: z.ZodOptional<z.ZodString>;
232
+ companyRegistrationNumber: z.ZodOptional<z.ZodString>;
233
+ establishmentRegistrationNumber: z.ZodOptional<z.ZodString>;
234
+ vatNumber: z.ZodOptional<z.ZodString>;
235
+ legalForm: z.ZodOptional<z.ZodString>;
236
+ shareCapital: z.ZodOptional<z.ZodString>;
237
+ tradeRegister: z.ZodOptional<z.ZodString>;
238
+ }, z.core.$strict>>;
199
239
  }, z.core.$strip>;
200
240
  items: z.ZodArray<z.ZodObject<{
201
241
  id: z.ZodNumber;
@@ -253,6 +293,7 @@ export declare const contractSaleDocumentSchema: z.ZodObject<{
253
293
  export type ContractSaleDocument = z.infer<typeof contractSaleDocumentSchema>;
254
294
  export type ContractSaleDocumentLineItem = z.infer<typeof contractSaleDocumentLineItemSchema>;
255
295
  export type ContractSaleDocumentContact = z.infer<typeof contractSaleDocumentContactSchema>;
296
+ export type ContractSaleDocumentLegalIdentity = z.infer<typeof contractSaleDocumentLegalIdentitySchema>;
256
297
  export type ContractSaleDocumentTermArticle = z.infer<typeof contractSaleDocumentTermArticleSchema>;
257
298
  export type ContractSaleDocumentAppendixKind = z.infer<typeof contractSaleDocumentAppendixKindSchema>;
258
299
  export type ContractSaleDocumentAppendix = z.infer<typeof contractSaleDocumentAppendixSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"contractSaleDocument.d.ts","sourceRoot":"","sources":["../../src/lib/contractSaleDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,iCAAiC,aAA2B,CAAA;AAEzE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;iBAM5C,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;;;iBAO7C,CAAA;AAEF,eAAO,MAAM,qCAAqC;;;;;;;;iBAQhD,CAAA;AAEF,eAAO,MAAM,sCAAsC;;;;;EAKjD,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;iBAK7C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;iBAO3C,CAAA;AAEF,eAAO,MAAM,yCAAyC;;;;EAA8C,CAAA;AAEpG,eAAO,MAAM,oCAAoC;;;iBAG/C,CAAA;AAEF,eAAO,MAAM,mCAAmC;;;;;;iBAM9C,CAAA;AAEF,eAAO,MAAM,0CAA0C;;;;;;;;;2BAGrD,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;EAA8C,CAAA;AACzF,eAAO,MAAM,sCAAsC;;;EAAuB,CAAA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AAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AACrF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAA;AACrG,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA"}
@@ -2,19 +2,29 @@ import { richAddressSchema as e } from "./richAddress.js";
2
2
  import { z as t } from "zod";
3
3
  //#region src/lib/contractSaleDocument.ts
4
4
  var n = t.string().trim().min(1), r = t.object({
5
+ legalName: t.string().trim().min(1).optional(),
6
+ registeredAddress: t.string().trim().min(1).optional(),
7
+ companyRegistrationNumber: t.string().trim().min(1).optional(),
8
+ establishmentRegistrationNumber: t.string().trim().min(1).optional(),
9
+ vatNumber: t.string().trim().min(1).optional(),
10
+ legalForm: t.string().trim().min(1).optional(),
11
+ shareCapital: t.string().trim().min(1).optional(),
12
+ tradeRegister: t.string().trim().min(1).optional()
13
+ }).strict(), i = t.object({
5
14
  name: t.string().trim().min(1),
6
15
  address: n.optional(),
7
16
  richAddress: e.optional(),
8
17
  email: t.string().trim().email().optional(),
9
- phone: t.string().trim().min(1).optional()
10
- }), i = t.object({
18
+ phone: t.string().trim().min(1).optional(),
19
+ legalIdentity: r.optional()
20
+ }), a = t.object({
11
21
  id: t.number(),
12
22
  description: t.string(),
13
23
  quantity: t.number().positive(),
14
24
  unitPrice: t.number(),
15
25
  taxRate: t.number().min(0).max(1).optional(),
16
26
  taxExemptionReason: t.string().trim().min(1).optional()
17
- }), a = t.object({
27
+ }), o = t.object({
18
28
  id: t.string(),
19
29
  title: t.string(),
20
30
  body: t.string(),
@@ -22,69 +32,69 @@ var n = t.string().trim().min(1), r = t.object({
22
32
  translationTitle: t.string().optional(),
23
33
  translationBody: t.string().optional(),
24
34
  translationBodyHtml: t.string().optional()
25
- }), o = t.enum([
35
+ }), s = t.enum([
26
36
  "rental_contract",
27
37
  "rental_terms",
28
38
  "insurance_terms",
29
39
  "sale_terms"
30
- ]), s = t.object({
40
+ ]), c = t.object({
31
41
  id: t.string().trim().min(1),
32
- kind: o,
42
+ kind: s,
33
43
  title: t.string(),
34
- articles: t.array(a).min(1)
35
- }), c = t.object({
44
+ articles: t.array(o).min(1)
45
+ }), l = t.object({
36
46
  bookingNumber: t.string().trim().min(1),
37
47
  start: t.date(),
38
48
  end: t.date(),
39
49
  pickupAddress: t.string().trim().min(1).optional(),
40
50
  returnAddress: t.string().trim().min(1).optional(),
41
51
  timeZone: t.string().trim().min(1).optional()
42
- }), l = t.enum([
52
+ }), u = t.enum([
43
53
  "none",
44
54
  "acceptance",
45
55
  "signature"
46
- ]), u = t.object({
56
+ ]), d = t.object({
47
57
  mode: t.literal("acceptance"),
48
58
  date: t.date()
49
- }), d = t.object({
59
+ }), f = t.object({
50
60
  mode: t.literal("signature"),
51
61
  name: t.string().min(1, "Name is required"),
52
62
  phone: t.string().min(1, "Phone number is required"),
53
63
  signature: t.string().min(1, "Signature is required"),
54
64
  date: t.date()
55
- }), f = t.discriminatedUnion("mode", [u, d]), p = t.enum([
65
+ }), p = t.discriminatedUnion("mode", [d, f]), m = t.enum([
56
66
  "quote",
57
67
  "invoice",
58
68
  "credit_note"
59
- ]), m = t.enum(["fr", "en"]);
60
- function h(e) {
69
+ ]), h = t.enum(["fr", "en"]);
70
+ function g(e) {
61
71
  if (typeof e != "string") return null;
62
72
  let [t] = e.trim().toLowerCase().split(/[-_]/);
63
73
  if (!t) return null;
64
- let n = m.safeParse(t);
74
+ let n = h.safeParse(t);
65
75
  return n.success ? n.data : "en";
66
76
  }
67
- var g = t.object({
68
- legal: m,
69
- customer: m,
70
- translation: m.optional()
71
- }), _ = t.object({
77
+ var _ = t.object({
78
+ legal: h,
79
+ customer: h,
80
+ translation: h.optional()
81
+ }), v = t.object({
72
82
  id: t.string(),
73
- kind: p,
74
- language: g.optional(),
83
+ kind: m,
84
+ language: _.optional(),
75
85
  saleDocumentNumber: t.string().trim().min(1),
76
86
  currency: t.string().trim().min(1).transform((e) => e.toUpperCase()),
77
87
  date: t.date(),
78
88
  dueDate: t.date(),
79
- issuer: r,
80
- recipient: r,
81
- items: t.array(i),
82
- appendices: t.array(s).default([]),
83
- rental: c.optional(),
89
+ issuer: i,
90
+ recipient: i,
91
+ items: t.array(a),
92
+ appendices: t.array(c).default([]),
93
+ rental: l.optional(),
84
94
  taxRate: t.number().min(0).max(1).optional(),
85
- acceptanceLevel: l.default("none"),
86
- acceptance: f.optional(),
95
+ acceptanceLevel: u.default("none"),
96
+ acceptance: p.optional(),
87
97
  notes: t.string().optional()
88
98
  });
89
99
  //#endregion
90
- export { l as contractSaleDocumentAcceptanceLevelSchema, f as contractSaleDocumentAcceptanceRecordSchema, u as contractSaleDocumentAcceptanceSchema, n as contractSaleDocumentAddressSchema, o as contractSaleDocumentAppendixKindSchema, s as contractSaleDocumentAppendixSchema, r as contractSaleDocumentContactSchema, p as contractSaleDocumentKindSchema, m as contractSaleDocumentLanguageCodeSchema, g as contractSaleDocumentLanguageSchema, i as contractSaleDocumentLineItemSchema, c as contractSaleDocumentRentalSchema, _ as contractSaleDocumentSchema, d as contractSaleDocumentSignatureSchema, a as contractSaleDocumentTermArticleSchema, h as resolveContractSaleDocumentRequestLanguage };
100
+ export { u as contractSaleDocumentAcceptanceLevelSchema, p as contractSaleDocumentAcceptanceRecordSchema, d as contractSaleDocumentAcceptanceSchema, n as contractSaleDocumentAddressSchema, s as contractSaleDocumentAppendixKindSchema, c as contractSaleDocumentAppendixSchema, i as contractSaleDocumentContactSchema, m as contractSaleDocumentKindSchema, h as contractSaleDocumentLanguageCodeSchema, _ as contractSaleDocumentLanguageSchema, r as contractSaleDocumentLegalIdentitySchema, a as contractSaleDocumentLineItemSchema, l as contractSaleDocumentRentalSchema, v as contractSaleDocumentSchema, f as contractSaleDocumentSignatureSchema, o as contractSaleDocumentTermArticleSchema, g as resolveContractSaleDocumentRequestLanguage };