@loczer/storefront-sdk 0.192.0 → 0.194.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/booking-engine/dist/models/{Product.shared-cjcvMCMa.js → Product.shared-iVSHRdn4.js} +21 -21
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-CsOe0vXi.js → base-asset-BRQVuIes.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-Sjsqh31e.js → base-booking-Bhy2Kww1.js} +2 -2
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-product-C_ATjuc6.js → base-product-BJHQLX8t.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-B01h642r.js → insurance-CPeHsTss.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas-BfXM1Dgb.js +14 -0
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +35 -53
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +35 -53
- package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts +7 -0
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.js +29 -0
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.js +11 -2
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +3 -0
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +114 -110
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts +10 -0
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts.map +1 -0
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +104 -0
- package/dist/components/ContractSaleDocument/Invoice.d.ts +2 -2
- package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/Invoice.js +182 -135
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +106 -138
- package/dist/components/ContractSaleDocument/TermsAndConditionsContent.d.ts +0 -2
- package/dist/components/ContractSaleDocument/TermsAndConditionsContent.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/TermsAndConditionsContent.js +32 -37
- package/dist/i18n/en.d.ts +4 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +4 -0
- package/dist/i18n/fr.d.ts +4 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +4 -0
- package/dist/index.d.ts +126 -9
- package/dist/index.js +70 -70
- package/dist/lib/booking.js +1 -1
- package/dist/lib/checkoutSubmit.js +2 -2
- package/dist/lib/contractSaleDocument.d.ts +44 -3
- package/dist/lib/contractSaleDocument.d.ts.map +1 -1
- package/dist/lib/contractSaleDocument.js +33 -17
- package/dist/lib/contractSaleDocumentApi.d.ts +54 -6
- package/dist/lib/contractSaleDocumentApi.d.ts.map +1 -1
- package/dist/lib/contractSaleDocumentApi.js +41 -37
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +180 -152
- package/dist/pages/ContractSaleDocumentPage.d.ts +21 -9
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +263 -257
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas-D_yUBLa0.js +0 -14
|
@@ -49,21 +49,21 @@ var ie = (e) => e, ae = {
|
|
|
49
49
|
}
|
|
50
50
|
return null;
|
|
51
51
|
}, de = (e, t) => e.find((e) => le(e) && e.startMinutes >= t) ?? null, _ = (te) => {
|
|
52
|
-
let { startDate: m, onStartDateChange: ne, startTime: h, onStartTimeChange: re, endDate: g, onEndDateChange: _, endTime: v, onEndTimeChange: fe, onEndDateCommit: pe, onEndTimeCommit: me, errors: he = {}, labels: ge, t: _e = ie, language: ve, labelClassName: ye, inputClassName: be, buttonClassName: xe, bookingPeriodConfig: y, fetchTimeSlots: b, onTimeSlotsAvailabilityChange: Se, selectionFlow: x = "chained-times", withMobileDateDrawer:
|
|
53
|
-
locale:
|
|
52
|
+
let { startDate: m, onStartDateChange: ne, startTime: h, onStartTimeChange: re, endDate: g, onEndDateChange: _, endTime: v, onEndTimeChange: fe, onEndDateCommit: pe, onEndTimeCommit: me, errors: he = {}, labels: ge, t: _e = ie, language: ve, labelClassName: ye, inputClassName: be, buttonClassName: xe, bookingPeriodConfig: y, fetchTimeSlots: b, onTimeSlotsAvailabilityChange: Se, onTimeSlotsConfirmationChange: Ce, selectionFlow: x = "chained-times", withMobileDateDrawer: we = !1, currencyCode: Te = "EUR", disableAutomaticTimeCorrection: S = !1, openDatePickerOnFocus: Ee = !0, startTimeOptions: C = [], endTimeOptions: De, locale: Oe, localeCode: ke } = te, w = ee("(max-width: 767px)"), T = ke ?? ve ?? "en-US", Ae = d(() => oe({
|
|
53
|
+
locale: Oe,
|
|
54
54
|
localeCode: T
|
|
55
|
-
}), [
|
|
56
|
-
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
}, []),
|
|
55
|
+
}), [Oe, T]), E = d(() => y ? t(y) : null, [y]), D = d(() => y?.timing.slotIntervalMinutes ? y.timing.slotIntervalMinutes : se(C) ?? 30, [y?.timing.slotIntervalMinutes, C]), [je, O] = p(!1), [Me, Ne] = p(!1), [Pe, k] = p(!1), [Fe, Ie] = p(!1), [Le, Re] = p(void 0), [ze, Be] = p(!1), [Ve, He] = p(!1), [Ue, A] = p([]), [We, j] = p(void 0), [Ge, Ke] = p(void 0), [qe, Je] = p(0), [Ye, Xe] = p([]), [M, Ze] = p(void 0), [Qe, $e] = p(void 0), [et, tt] = p(0), N = f(null), nt = f(0), rt = f(0), it = f(0), at = f(void 0), P = f(void 0), ot = f(b);
|
|
56
|
+
ot.current = b;
|
|
57
|
+
let st = !!b, ct = l(() => {
|
|
58
|
+
Re(void 0);
|
|
59
|
+
}, []), F = d(() => !m || !g ? !1 : c(g, m) === 0, [m, g]), I = d(() => o(h), [h]), L = l((e) => {
|
|
60
60
|
let t = (e instanceof Date ? e : e ? new Date(e) : void 0) ?? /* @__PURE__ */ new Date();
|
|
61
61
|
return E ? n(t, E.timeZone) ?? void 0 : `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
|
|
62
62
|
}, [E]), R = d(() => L(m), [m, L]), z = d(() => L(g ?? m), [
|
|
63
63
|
g,
|
|
64
64
|
m,
|
|
65
65
|
L
|
|
66
|
-
]),
|
|
66
|
+
]), lt = E ? i(/* @__PURE__ */ new Date(), E.timeZone) : null, B = lt?.dateString, V = lt?.minutesFromMidnight, H = d(() => B ? !!(m && R && R === B) : !!m && c(m, /* @__PURE__ */ new Date()) === 0, [
|
|
67
67
|
m,
|
|
68
68
|
R,
|
|
69
69
|
B
|
|
@@ -71,7 +71,7 @@ var ie = (e) => e, ae = {
|
|
|
71
71
|
g,
|
|
72
72
|
z,
|
|
73
73
|
B
|
|
74
|
-
]),
|
|
74
|
+
]), ut = d(() => {
|
|
75
75
|
if (B) return e(B);
|
|
76
76
|
let t = /* @__PURE__ */ new Date();
|
|
77
77
|
return t.setHours(0, 0, 0, 0), t;
|
|
@@ -85,7 +85,7 @@ var ie = (e) => e, ae = {
|
|
|
85
85
|
U,
|
|
86
86
|
H,
|
|
87
87
|
W
|
|
88
|
-
]),
|
|
88
|
+
]), dt = d(() => H ? G : null, [G, H]), ft = l((e) => {
|
|
89
89
|
if (!E) return;
|
|
90
90
|
let t = L(e);
|
|
91
91
|
if (!t) return E.defaultEndTime;
|
|
@@ -93,114 +93,116 @@ var ie = (e) => e, ae = {
|
|
|
93
93
|
return typeof i == "number" ? a(i) : E.defaultEndTime;
|
|
94
94
|
}, [E, L]);
|
|
95
95
|
u(() => {
|
|
96
|
-
let e =
|
|
96
|
+
let e = ot.current;
|
|
97
97
|
if (!e) return;
|
|
98
98
|
if (!R) {
|
|
99
|
-
A([]),
|
|
99
|
+
A([]), j(void 0), Ke(void 0);
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
let t = !0;
|
|
103
|
-
return A([]),
|
|
104
|
-
t && (A(e ?? []),
|
|
103
|
+
return A([]), j(void 0), Ke(void 0), e(R, "start").then((e) => {
|
|
104
|
+
t && (A(e ?? []), j(R), Ke(void 0));
|
|
105
105
|
}).catch((e) => {
|
|
106
|
-
console.warn("Failed to fetch availability time slots", e), t && (A([]),
|
|
106
|
+
console.warn("Failed to fetch availability time slots", e), t && (A([]), j(void 0), Ke(R));
|
|
107
107
|
}), () => {
|
|
108
108
|
t = !1;
|
|
109
109
|
};
|
|
110
110
|
}, [
|
|
111
|
-
|
|
111
|
+
st,
|
|
112
112
|
R,
|
|
113
113
|
qe
|
|
114
114
|
]), u(() => {
|
|
115
|
-
if (!
|
|
116
|
-
let e =
|
|
117
|
-
|
|
118
|
-
}, [z,
|
|
119
|
-
let e =
|
|
115
|
+
if (!st) return;
|
|
116
|
+
let e = at.current, t = e !== void 0 && e !== z;
|
|
117
|
+
at.current = z, t && z && (P.current = z);
|
|
118
|
+
}, [z, st]), u(() => {
|
|
119
|
+
let e = ot.current;
|
|
120
120
|
if (!e) return;
|
|
121
121
|
if (!z) {
|
|
122
|
-
Xe([]),
|
|
122
|
+
Xe([]), Ze(void 0), $e(void 0);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
let t = !0;
|
|
126
|
-
return Xe([]),
|
|
127
|
-
t && (Xe(e ?? []),
|
|
126
|
+
return Xe([]), Ze(void 0), $e(void 0), e(z, "end").then((e) => {
|
|
127
|
+
t && (Xe(e ?? []), Ze(z), $e(void 0));
|
|
128
128
|
}).catch((e) => {
|
|
129
|
-
console.warn("Failed to fetch availability time slots", e), t && (Xe([]),
|
|
129
|
+
console.warn("Failed to fetch availability time slots", e), t && (Xe([]), Ze(void 0), $e(z));
|
|
130
130
|
}), () => {
|
|
131
131
|
t = !1;
|
|
132
132
|
};
|
|
133
133
|
}, [
|
|
134
134
|
z,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
et,
|
|
136
|
+
st
|
|
137
137
|
]);
|
|
138
|
-
let
|
|
138
|
+
let pt = d(() => b || !y ? null : s(y, { date: R }).startTimeSlots, [
|
|
139
139
|
y,
|
|
140
140
|
b,
|
|
141
141
|
R
|
|
142
|
-
]),
|
|
142
|
+
]), mt = d(() => b || !y ? null : s(y, { date: z }).endTimeSlots, [
|
|
143
143
|
y,
|
|
144
144
|
z,
|
|
145
145
|
b
|
|
146
|
-
]), K = d(() => b ?
|
|
146
|
+
]), K = d(() => b ? We === R ? Ue : [] : y ? pt ?? [] : ce(C, D), [
|
|
147
147
|
y,
|
|
148
|
-
|
|
148
|
+
pt,
|
|
149
149
|
b,
|
|
150
|
-
He,
|
|
151
150
|
Ue,
|
|
151
|
+
We,
|
|
152
152
|
R,
|
|
153
153
|
D,
|
|
154
154
|
C
|
|
155
|
-
]), q = d(() => b ?
|
|
155
|
+
]), q = d(() => b ? M === z ? Ye : [] : y ? mt ?? [] : ce(De ?? C, D), [
|
|
156
156
|
y,
|
|
157
|
-
|
|
157
|
+
mt,
|
|
158
158
|
z,
|
|
159
|
-
|
|
159
|
+
De,
|
|
160
160
|
b,
|
|
161
161
|
Ye,
|
|
162
|
-
|
|
162
|
+
M,
|
|
163
163
|
D,
|
|
164
164
|
C
|
|
165
|
-
]),
|
|
165
|
+
]), ht = K.some((e) => e.isDisabled ? !1 : !H || G == null || e.startMinutes >= G), gt = q.some((e) => e.isDisabled || U && G != null && e.startMinutes < G ? !1 : !F || I == null || e.startMinutes > I), _t = K.some((e) => e.value !== h || e.isDisabled ? !1 : !H || G == null || e.startMinutes >= G), vt = q.some((e) => !(e.value !== v || e.isDisabled || U && G != null && e.startMinutes < G || F && (I == null || e.startMinutes <= I))), J = b ? Ge === R ? "error" : We === R ? "ready" : "loading" : "local", Y = b ? Qe === z ? "error" : M === z ? "ready" : "loading" : "local", X = (J === "local" || J === "ready" && ht) && (Y === "local" || Y === "ready" && gt), yt = X && _t && vt, bt = X, xt = () => {
|
|
166
166
|
Je((e) => e + 1);
|
|
167
|
-
},
|
|
168
|
-
|
|
167
|
+
}, St = () => {
|
|
168
|
+
tt((e) => e + 1);
|
|
169
169
|
};
|
|
170
170
|
u(() => {
|
|
171
171
|
Se?.(X);
|
|
172
|
-
}, [X, Se])
|
|
172
|
+
}, [X, Se]), u(() => {
|
|
173
|
+
Ce?.(yt);
|
|
174
|
+
}, [yt, Ce]);
|
|
173
175
|
let Z = l((e, t) => {
|
|
174
|
-
e !== h && (
|
|
176
|
+
e !== h && (He(t === "user"), re(e, { source: t }));
|
|
175
177
|
}, [re, h]), Q = l((e, t = "auto") => {
|
|
176
178
|
e !== v && (t !== "user" && e && q.find((t) => t.value === e)?.isExtra || fe(e, { source: t }));
|
|
177
179
|
}, [
|
|
178
180
|
q,
|
|
179
181
|
v,
|
|
180
182
|
fe
|
|
181
|
-
]), $ = d(() => K.length ? K.find((e) => !(e.isDisabled ||
|
|
183
|
+
]), $ = d(() => K.length ? K.find((e) => !(e.isDisabled || dt != null && e.startMinutes < dt)) ?? null : null, [dt, K]);
|
|
182
184
|
u(() => {
|
|
183
|
-
!b || J === "ready" &&
|
|
185
|
+
!b || !(J === "error" || J === "ready" && !ht) || !h || Z("", "auto");
|
|
184
186
|
}, [
|
|
185
187
|
b,
|
|
186
|
-
|
|
188
|
+
ht,
|
|
187
189
|
h,
|
|
188
190
|
J,
|
|
189
191
|
Z
|
|
190
192
|
]), u(() => {
|
|
191
|
-
!b || Y === "ready" &&
|
|
193
|
+
!b || !(Y === "error" || Y === "ready" && !gt) || !v || Q("");
|
|
192
194
|
}, [
|
|
193
195
|
v,
|
|
194
196
|
Y,
|
|
195
197
|
b,
|
|
196
|
-
|
|
198
|
+
gt,
|
|
197
199
|
Q
|
|
198
200
|
]), u(() => {
|
|
199
|
-
S ||
|
|
201
|
+
S || Ve || $ && h !== $.value && Z($.value, "auto");
|
|
200
202
|
}, [
|
|
201
203
|
S,
|
|
202
204
|
$,
|
|
203
|
-
|
|
205
|
+
Ve,
|
|
204
206
|
h,
|
|
205
207
|
Z
|
|
206
208
|
]), u(() => {
|
|
@@ -231,8 +233,8 @@ var ie = (e) => e, ae = {
|
|
|
231
233
|
Z
|
|
232
234
|
]), u(() => {
|
|
233
235
|
if (S || !q.length) return;
|
|
234
|
-
if (b &&
|
|
235
|
-
|
|
236
|
+
if (b && P.current === z && M === z) {
|
|
237
|
+
P.current = void 0;
|
|
236
238
|
let e = ue(q);
|
|
237
239
|
if (e && e.value !== v) {
|
|
238
240
|
Q(e.value);
|
|
@@ -240,7 +242,7 @@ var ie = (e) => e, ae = {
|
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
244
|
let e = o(h), t = o(v), n = v ? q.find((e) => e.value === v) : void 0, r = [];
|
|
243
|
-
U && G != null && r.push(G),
|
|
245
|
+
U && G != null && r.push(G), F && e != null && r.push(e + D);
|
|
244
246
|
let i = r.length ? Math.max(...r) : null, a = (e) => {
|
|
245
247
|
let t = typeof e == "number" ? e : null, n = q.find((e) => !(!le(e) || t != null && e.startMinutes < t));
|
|
246
248
|
n && n.value !== v ? Q(n.value) : !n && v && Q("");
|
|
@@ -263,32 +265,32 @@ var ie = (e) => e, ae = {
|
|
|
263
265
|
z,
|
|
264
266
|
v,
|
|
265
267
|
b,
|
|
266
|
-
|
|
268
|
+
M,
|
|
267
269
|
U,
|
|
268
|
-
|
|
270
|
+
F,
|
|
269
271
|
D,
|
|
270
272
|
h,
|
|
271
273
|
Q
|
|
272
|
-
]), u(() => (
|
|
273
|
-
|
|
274
|
+
]), u(() => (Be(!0), () => {
|
|
275
|
+
N.current != null && clearTimeout(N.current);
|
|
274
276
|
}), []), u(() => {
|
|
275
|
-
|
|
276
|
-
}, [
|
|
277
|
-
|
|
278
|
-
}, [
|
|
279
|
-
let
|
|
280
|
-
e &&
|
|
281
|
-
}, []),
|
|
282
|
-
e &&
|
|
283
|
-
}, []),
|
|
284
|
-
e &&
|
|
285
|
-
}, []),
|
|
277
|
+
Me && je && O(!1);
|
|
278
|
+
}, [je, Me]), u(() => {
|
|
279
|
+
Fe && Pe && k(!1);
|
|
280
|
+
}, [Pe, Fe]);
|
|
281
|
+
let Ct = l((e) => {
|
|
282
|
+
e && nt.current && Date.now() < nt.current || O(e);
|
|
283
|
+
}, []), wt = l((e) => {
|
|
284
|
+
e && rt.current && Date.now() < rt.current || k(e);
|
|
285
|
+
}, []), Tt = l((e) => {
|
|
286
|
+
e && it.current && Date.now() < it.current || Ie(e);
|
|
287
|
+
}, []), Et = l((e, { openTimePicker: t, openEndDatePicker: n, close: r = !0 } = {}) => {
|
|
286
288
|
let i = t ?? x === "chained-times", a = n ?? x === "dates-first";
|
|
287
289
|
if (!e) {
|
|
288
290
|
r && O(!1);
|
|
289
291
|
return;
|
|
290
292
|
}
|
|
291
|
-
ne(e), (r || a) && (
|
|
293
|
+
ne(e), (r || a) && (nt.current = Date.now() + 250, O(!1)), g && e > g && _(e), i && Ne(!0), a && (N.current != null && clearTimeout(N.current), w ? (k(!0), N.current = null) : N.current = setTimeout(() => {
|
|
292
294
|
k(!0);
|
|
293
295
|
}, 100));
|
|
294
296
|
}, [
|
|
@@ -297,22 +299,22 @@ var ie = (e) => e, ae = {
|
|
|
297
299
|
_,
|
|
298
300
|
ne,
|
|
299
301
|
x
|
|
300
|
-
]),
|
|
301
|
-
Z(e, "user"),
|
|
302
|
+
]), Dt = l((e) => {
|
|
303
|
+
Z(e, "user"), Ne(!1), N.current != null && clearTimeout(N.current), x === "chained-times" && e && m ? N.current = setTimeout(() => {
|
|
302
304
|
k(!0);
|
|
303
|
-
}, 100) :
|
|
305
|
+
}, 100) : N.current = null;
|
|
304
306
|
}, [
|
|
305
307
|
x,
|
|
306
308
|
m,
|
|
307
309
|
Z
|
|
308
|
-
]),
|
|
310
|
+
]), Ot = l((e) => {
|
|
309
311
|
e && e !== h && Z(e, "user");
|
|
310
|
-
}, [h, Z]),
|
|
312
|
+
}, [h, Z]), kt = l((e, { openTimePicker: t, close: n = !0, commit: r = x === "dates-first" && w } = {}) => {
|
|
311
313
|
let i = t ?? x === "chained-times", a = v, o = !0;
|
|
312
314
|
if (e && x === "dates-first") if (b) {
|
|
313
315
|
let t = L(e);
|
|
314
|
-
t && (
|
|
315
|
-
let n =
|
|
316
|
+
t && (P.current = t);
|
|
317
|
+
let n = M === t ? Ye : [], r = [];
|
|
316
318
|
if (B ? t === B : c(e, /* @__PURE__ */ new Date()) === 0) if (V != null) r.push(V + W);
|
|
317
319
|
else {
|
|
318
320
|
let e = /* @__PURE__ */ new Date();
|
|
@@ -320,20 +322,20 @@ var ie = (e) => e, ae = {
|
|
|
320
322
|
}
|
|
321
323
|
m && I != null && c(e, m) === 0 && r.push(I + D);
|
|
322
324
|
let i = ue(n, r.length ? Math.max(...r) : null);
|
|
323
|
-
a = i?.value, o = !!i &&
|
|
325
|
+
a = i?.value, o = !!i && bt, a ? Q(a) : v && Q("");
|
|
324
326
|
} else {
|
|
325
|
-
let t =
|
|
327
|
+
let t = ft(e);
|
|
326
328
|
t && (a = t, Q(t));
|
|
327
329
|
}
|
|
328
|
-
_(e),
|
|
330
|
+
_(e), Re(void 0), n && (!r || o) && (rt.current = Date.now() + 250, k(!1)), e && i && Ie(!0), e && r && o && pe && (typeof window > "u" ? pe(e, a) : requestAnimationFrame(() => pe(e, a)));
|
|
329
331
|
}, [
|
|
330
332
|
v,
|
|
331
|
-
|
|
333
|
+
bt,
|
|
332
334
|
V,
|
|
333
335
|
b,
|
|
334
336
|
Ye,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
+
M,
|
|
338
|
+
ft,
|
|
337
339
|
w,
|
|
338
340
|
W,
|
|
339
341
|
_,
|
|
@@ -345,10 +347,10 @@ var ie = (e) => e, ae = {
|
|
|
345
347
|
B,
|
|
346
348
|
L,
|
|
347
349
|
Q
|
|
348
|
-
]),
|
|
350
|
+
]), At = l((e) => {
|
|
349
351
|
Q(e, "user");
|
|
350
|
-
}, [Q]),
|
|
351
|
-
|
|
352
|
+
}, [Q]), jt = l((e) => {
|
|
353
|
+
P.current = void 0, Q(e, "user"), it.current = Date.now() + 250, Ie(!1), me && (typeof window > "u" ? me() : requestAnimationFrame(() => {
|
|
352
354
|
requestAnimationFrame(me);
|
|
353
355
|
}));
|
|
354
356
|
}, [me, Q]);
|
|
@@ -367,46 +369,48 @@ var ie = (e) => e, ae = {
|
|
|
367
369
|
labelClassName: ye,
|
|
368
370
|
inputClassName: be,
|
|
369
371
|
buttonClassName: xe,
|
|
370
|
-
currencyCode:
|
|
372
|
+
currencyCode: Te,
|
|
371
373
|
localeCode: T,
|
|
372
374
|
slotIntervalMinutes: D,
|
|
373
|
-
dateLocale:
|
|
375
|
+
dateLocale: Ae,
|
|
374
376
|
numberOfMonths: w ? 1 : 2,
|
|
375
377
|
isMobile: w,
|
|
376
|
-
isHydrated:
|
|
377
|
-
openDatePickerOnFocus:
|
|
378
|
-
withMobileDateDrawer:
|
|
378
|
+
isHydrated: ze,
|
|
379
|
+
openDatePickerOnFocus: Ee,
|
|
380
|
+
withMobileDateDrawer: we,
|
|
379
381
|
selectionFlow: x,
|
|
380
|
-
isStartDatePopoverOpen:
|
|
381
|
-
setIsStartDatePopoverOpen:
|
|
382
|
-
isStartTimeSelectOpen:
|
|
383
|
-
setIsStartTimeSelectOpen:
|
|
384
|
-
isEndDatePopoverOpen:
|
|
385
|
-
setIsEndDatePopoverOpen:
|
|
386
|
-
isEndTimeSelectOpen:
|
|
387
|
-
setIsEndTimeSelectOpen:
|
|
388
|
-
hoveredEndDate:
|
|
389
|
-
setHoveredEndDate:
|
|
390
|
-
resetHoveredEndDate:
|
|
382
|
+
isStartDatePopoverOpen: je,
|
|
383
|
+
setIsStartDatePopoverOpen: Ct,
|
|
384
|
+
isStartTimeSelectOpen: Me,
|
|
385
|
+
setIsStartTimeSelectOpen: Ne,
|
|
386
|
+
isEndDatePopoverOpen: Pe,
|
|
387
|
+
setIsEndDatePopoverOpen: wt,
|
|
388
|
+
isEndTimeSelectOpen: Fe,
|
|
389
|
+
setIsEndTimeSelectOpen: Tt,
|
|
390
|
+
hoveredEndDate: Le,
|
|
391
|
+
setHoveredEndDate: Re,
|
|
392
|
+
resetHoveredEndDate: ct,
|
|
391
393
|
startTimeSlots: K,
|
|
392
394
|
availableEndTimeSlots: q,
|
|
393
395
|
startTimeSlotsStatus: J,
|
|
394
396
|
endTimeSlotsStatus: Y,
|
|
395
|
-
retryStartTimeSlots:
|
|
396
|
-
retryEndTimeSlots:
|
|
397
|
-
|
|
397
|
+
retryStartTimeSlots: xt,
|
|
398
|
+
retryEndTimeSlots: St,
|
|
399
|
+
hasAvailableTimeSlots: X,
|
|
400
|
+
hasConfirmedTimeSlots: yt,
|
|
401
|
+
canCommitTimeSlots: bt,
|
|
398
402
|
isStartToday: H,
|
|
399
403
|
isEndToday: U,
|
|
400
|
-
minSelectableDate:
|
|
404
|
+
minSelectableDate: ut,
|
|
401
405
|
earliestMinutesForToday: G,
|
|
402
406
|
startMinutesValue: I,
|
|
403
|
-
isSameDaySelection:
|
|
404
|
-
updateStartTime:
|
|
405
|
-
selectStartDate:
|
|
406
|
-
selectStartTime:
|
|
407
|
-
selectEndDate:
|
|
408
|
-
updateEndTime:
|
|
409
|
-
selectEndTime:
|
|
407
|
+
isSameDaySelection: F,
|
|
408
|
+
updateStartTime: Ot,
|
|
409
|
+
selectStartDate: Et,
|
|
410
|
+
selectStartTime: Dt,
|
|
411
|
+
selectEndDate: kt,
|
|
412
|
+
updateEndTime: At,
|
|
413
|
+
selectEndTime: jt
|
|
410
414
|
};
|
|
411
415
|
};
|
|
412
416
|
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContractSaleDocument, ContractSaleDocumentLanguage } from '../../lib/contractSaleDocument';
|
|
2
|
+
type DocumentAcceptanceSectionProps = {
|
|
3
|
+
saleDocument: ContractSaleDocument;
|
|
4
|
+
documentLanguage: ContractSaleDocumentLanguage;
|
|
5
|
+
formatDate: (date: Date | string | number) => string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function DocumentAcceptanceSection({ saleDocument, documentLanguage, formatDate, className, }: DocumentAcceptanceSectionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=DocumentAcceptanceSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentAcceptanceSection.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/DocumentAcceptanceSection.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AAIvC,KAAK,8BAA8B,GAAG;IACpC,YAAY,EAAE,oBAAoB,CAAA;IAClC,gBAAgB,EAAE,4BAA4B,CAAA;IAC9C,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAA;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,SAAS,GACV,EAAE,8BAA8B,kDAuGhC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { formatContractSaleDocumentLabel as e } from "./language.js";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { cn as i } from "@rpcbase/ui";
|
|
4
|
+
import { useTranslation as a } from "react-i18next";
|
|
5
|
+
//#region src/components/ContractSaleDocument/DocumentAcceptanceSection.tsx
|
|
6
|
+
function o({ saleDocument: o, documentLanguage: s, formatDate: c, className: l }) {
|
|
7
|
+
let { t: u } = a(), 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
|
+
return o.acceptanceLevel === "none" && !o.acceptance ? null : /* @__PURE__ */ n("section", {
|
|
9
|
+
className: i("mt-auto border-t border-border pt-8", l),
|
|
10
|
+
"data-testid": "contract-sale-document-acceptance-section",
|
|
11
|
+
children: m ? /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("p", {
|
|
12
|
+
className: "mb-12 text-center text-sm text-muted-foreground",
|
|
13
|
+
children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_acknowledgement") })
|
|
14
|
+
}), f ? /* @__PURE__ */ r("div", {
|
|
15
|
+
className: "flex flex-col justify-between md:flex-row",
|
|
16
|
+
children: [/* @__PURE__ */ r("div", {
|
|
17
|
+
className: "mb-8 w-full md:mb-0 md:w-2/5",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ n("p", {
|
|
20
|
+
className: "font-semibold text-foreground",
|
|
21
|
+
children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_issuer_label") })
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ n("p", {
|
|
24
|
+
className: "mb-2 mt-2 text-sm text-muted-foreground",
|
|
25
|
+
children: /* @__PURE__ */ r("span", { children: [d("docs_contract_sale_signature_date_label"), ": ___________________"] })
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ n("div", { className: "h-24 rounded-lg bg-muted/40" })
|
|
28
|
+
]
|
|
29
|
+
}), /* @__PURE__ */ r("div", {
|
|
30
|
+
className: "w-full text-left md:w-2/5",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ n("p", {
|
|
33
|
+
className: "font-semibold text-foreground",
|
|
34
|
+
children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_customer_label") })
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ n("p", {
|
|
37
|
+
className: "mb-2 mt-2 text-sm text-muted-foreground",
|
|
38
|
+
children: /* @__PURE__ */ r("span", { children: [
|
|
39
|
+
d("docs_contract_sale_signature_date_label"),
|
|
40
|
+
": ",
|
|
41
|
+
c(f.date)
|
|
42
|
+
] })
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ n("div", {
|
|
45
|
+
className: "flex h-24 items-center justify-center rounded-lg bg-muted/40 p-2",
|
|
46
|
+
children: /* @__PURE__ */ n("img", {
|
|
47
|
+
src: f.signature,
|
|
48
|
+
alt: d("docs_contract_sale_signature_image_alt"),
|
|
49
|
+
className: "max-h-full max-w-full"
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ n("p", {
|
|
53
|
+
className: "mt-2 text-sm text-foreground",
|
|
54
|
+
children: /* @__PURE__ */ n("span", { children: f.name })
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ n("p", {
|
|
57
|
+
className: "text-sm text-muted-foreground",
|
|
58
|
+
children: /* @__PURE__ */ n("span", { children: f.phone })
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
})]
|
|
62
|
+
}) : /* @__PURE__ */ r("div", {
|
|
63
|
+
className: "flex flex-col justify-between md:flex-row",
|
|
64
|
+
children: [/* @__PURE__ */ r("div", {
|
|
65
|
+
className: "mb-8 w-full md:mb-0 md:w-2/5",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ n("p", {
|
|
68
|
+
className: "font-semibold text-foreground",
|
|
69
|
+
children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_issuer_label") })
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ n("p", {
|
|
72
|
+
className: "mb-2 mt-2 text-sm text-muted-foreground",
|
|
73
|
+
children: /* @__PURE__ */ r("span", { children: [d("docs_contract_sale_signature_date_label"), ": ___________________"] })
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ n("div", { className: "h-24 rounded-lg bg-muted/40" })
|
|
76
|
+
]
|
|
77
|
+
}), /* @__PURE__ */ r("div", {
|
|
78
|
+
className: "w-full md:w-2/5",
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ n("p", {
|
|
81
|
+
className: "font-semibold text-foreground",
|
|
82
|
+
children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_customer_label") })
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ n("p", {
|
|
85
|
+
className: "mb-2 mt-2 text-sm text-muted-foreground",
|
|
86
|
+
children: /* @__PURE__ */ r("span", { children: [d("docs_contract_sale_signature_date_label"), ": ___________________"] })
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ n("div", { className: "h-24 rounded-lg bg-muted/40" })
|
|
89
|
+
]
|
|
90
|
+
})]
|
|
91
|
+
})] }) : /* @__PURE__ */ r("div", {
|
|
92
|
+
className: "rounded-lg border border-border bg-muted/30 p-4",
|
|
93
|
+
children: [/* @__PURE__ */ n("p", {
|
|
94
|
+
className: "text-sm font-medium text-foreground",
|
|
95
|
+
children: /* @__PURE__ */ n("span", { children: d(p ? "docs_contract_sale_acceptance_section_accepted_title" : "docs_contract_sale_acceptance_section_required_title") })
|
|
96
|
+
}), /* @__PURE__ */ n("p", {
|
|
97
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
98
|
+
children: /* @__PURE__ */ n("span", { children: p ? d("docs_contract_sale_acceptance_section_accepted_date", { date: c(p.date) }) : d("docs_contract_sale_acceptance_section_required_description") })
|
|
99
|
+
})]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { o as DocumentAcceptanceSection };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ContractSaleDocument as ContractSaleDocumentData, ContractSaleDocumentAcceptanceRecord } from '../../lib/contractSaleDocument';
|
|
2
2
|
type ContractSaleDocumentProps = {
|
|
3
3
|
data: ContractSaleDocumentData;
|
|
4
|
-
|
|
4
|
+
showAppendices?: boolean;
|
|
5
5
|
withEnglishTranslation?: boolean;
|
|
6
6
|
heightMode?: "parent" | "viewport";
|
|
7
7
|
renderMode?: "interactive" | "pdf";
|
|
8
8
|
publicDocumentUrl?: string;
|
|
9
9
|
onAccept?: (acceptance: ContractSaleDocumentAcceptanceRecord) => Promise<ContractSaleDocumentData | void> | ContractSaleDocumentData | void;
|
|
10
10
|
};
|
|
11
|
-
export declare function ContractSaleDocument({ data: initialData,
|
|
11
|
+
export declare function ContractSaleDocument({ data: initialData, showAppendices, withEnglishTranslation, heightMode, renderMode, publicDocumentUrl, onAccept, }: ContractSaleDocumentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export type { ContractSaleDocumentProps };
|
|
13
13
|
//# sourceMappingURL=Invoice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Invoice.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/Invoice.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,oBAAoB,IAAI,wBAAwB,EAChD,oCAAoC,
|
|
1
|
+
{"version":3,"file":"Invoice.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/Invoice.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,oBAAoB,IAAI,wBAAwB,EAChD,oCAAoC,EAKrC,MAAM,gCAAgC,CAAA;AAYvC,OAAO,eAAe,CAAA;AAGtB,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,wBAAwB,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,UAAU,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAClC,UAAU,CAAC,EAAE,aAAa,GAAG,KAAK,CAAA;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,CACT,UAAU,EAAE,oCAAoC,KAC7C,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,GAAG,wBAAwB,GAAG,IAAI,CAAA;CAChF,CAAA;AAsKD,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EAAE,WAAW,EACjB,cAAqB,EACrB,sBAA6B,EAC7B,UAAuB,EACvB,UAA0B,EAC1B,iBAAiB,EACjB,QAAQ,GACT,EAAE,yBAAyB,2CAshB3B;AAED,YAAY,EAAE,yBAAyB,EAAE,CAAA"}
|