@wix/form-elements 1.77.0 → 1.79.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/component/{appointment-rac-BQsFMmBg.js → appointment-rac-lokvpd_p.js} +48 -48
- package/dist/component/{bookings-address-rac-AJNyTdok.js → bookings-address-rac-CU5NjBsy.js} +1 -1
- package/dist/component/{bookings-email-rac-BHZ0MFgI.js → bookings-email-rac-h3VGXrSQ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Bw5FuWNX.js → bookings-first-name-rac-BtsTk_1b.js} +1 -1
- package/dist/component/{bookings-header-rac-C1M2Pg1f.js → bookings-header-rac-BApE1hIE.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DKkPY0CO.js → bookings-last-name-rac-BnO5iij1.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-P6pziSl1.js → bookings-login-bar-rac-BT1npKru.js} +2 -2
- package/dist/component/{bookings-phone-rac-CiOZWKHz.js → bookings-phone-rac-DWf0haGa.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-D9ZComtY.js → bookings-rich-text-rac-C79XHlRL.js} +1 -1
- package/dist/component/{checkbox-field-rac-4zG3Sf1c.js → checkbox-field-rac-DNvhTChN.js} +90 -89
- package/dist/component/{checkbox-group-field-headless-DN2aNw9g.js → checkbox-group-field-headless-6hzWQkif.js} +53 -53
- package/dist/component/{checkbox-group-field-rac-B1qhet83.js → checkbox-group-field-rac-DbaB5Fx6.js} +5 -5
- package/dist/component/{checkbox-group-rac-DGsE7xGu.js → checkbox-group-rac-BsKKhTeh.js} +1 -1
- package/dist/component/checkbox-indicator-module-classes-DqzGZQRQ.js +9 -0
- package/dist/component/{checkbox-rac-CFWQW9_K.js → checkbox-rac-Dx7LXOdw.js} +1 -1
- package/dist/component/{contacts-address-rac-G5ZH3Odo.js → contacts-address-rac-DJZ8_DKm.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C7TDUfT0.js → contacts-birthdate-rac-CWvsa7Kq.js} +1 -1
- package/dist/component/{contacts-company-rac-8queUhWT.js → contacts-company-rac-DgF8QpOb.js} +1 -1
- package/dist/component/{contacts-email-rac-CYOs5N_I.js → contacts-email-rac-CVqiij34.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D8Goc_Ym.js → contacts-first-name-rac-BwsRVRHq.js} +1 -1
- package/dist/component/{contacts-last-name-rac-lBmtuEnr.js → contacts-last-name-rac-Blgm2DBB.js} +1 -1
- package/dist/component/{contacts-phone-rac-DSUWUNBX.js → contacts-phone-rac-Dhtv3PGY.js} +1 -1
- package/dist/component/{contacts-position-rac-wA-aw5Id.js → contacts-position-rac-DYebFQea.js} +1 -1
- package/dist/component/contacts-subscribe-rac-B_cvGaYj.js +13 -0
- package/dist/component/{contacts-tax-id-rac-BpjVM1Ye.js → contacts-tax-id-rac-B_F4I7rf.js} +1 -1
- package/dist/component/{date-availability-CeiMjrtD.js → date-availability-Cc4kd1Yk.js} +1 -1
- package/dist/component/{date-input-field-rac-CVaajAFM.js → date-input-field-rac-C__QbeDM.js} +9 -9
- package/dist/component/{date-input-rac-DhEzawuM.js → date-input-rac-BhzbmHYK.js} +1 -1
- package/dist/component/{date-picker-field-rac-1Q6yyNmK.js → date-picker-field-rac-CASH891N.js} +9 -9
- package/dist/component/{date-picker-rac-BCGtmXMJ.js → date-picker-rac-CMYAA925.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dd-HNgKP.js → date-time-input-field-rac-DPuxZ68o.js} +16 -16
- package/dist/component/{date-time-input-rac-CsCWEsH5.js → date-time-input-rac-BTJhrUXG.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CauN5uuV.js → dext-checkbox-group-rac-5zlp2x1M.js} +2 -2
- package/dist/component/{dext-checkbox-rac-q-g9gDnw.js → dext-checkbox-rac-Cn5u395b.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CZT3dTLv.js → dext-date-picker-rac-CFfQwbC_.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DVUoZZbX.js → dext-date-time-input-rac-zRYi-0W6.js} +1 -1
- package/dist/component/{dext-dropdown-rac-GRltutt5.js → dext-dropdown-rac-CtlNh5vF.js} +1 -1
- package/dist/component/{dext-email-rac-74Y8S9GA.js → dext-email-rac-BQF4M5Mf.js} +1 -1
- package/dist/component/{dext-number-input-rac-CF9d_GTl.js → dext-number-input-rac-GR4vTWMp.js} +1 -1
- package/dist/component/{dext-phone-rac-DObx_gOd.js → dext-phone-rac-COCdZPr9.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CzU9KX5_.js → dext-radio-group-rac-ZpHitbT0.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BjRwwgXr.js → dext-rating-input-rac-Er2HC9eD.js} +1 -1
- package/dist/component/{dext-tags-rac-Vif4x1yF.js → dext-tags-rac-EciVMPQ0.js} +2 -2
- package/dist/component/{dext-text-area-rac-DmZwl_ax.js → dext-text-area-rac-D6JxrykV.js} +1 -1
- package/dist/component/{dext-text-input-rac-B6FVbjUM.js → dext-text-input-rac-CD3xkLpw.js} +1 -1
- package/dist/component/{dext-url-input-rac-17Dj3ICM.js → dext-url-input-rac-BNqCYy-H.js} +1 -1
- package/dist/component/{donation-rac-bgHep0Xi.js → donation-rac-Du_qsPD6.js} +24 -24
- package/dist/component/{dropdown-field-headless-BGfJ1FyZ.js → dropdown-field-headless-NMc4cFx2.js} +3 -3
- package/dist/component/{dropdown-field-rac-DGiysJQY.js → dropdown-field-rac-hSbwxz3M.js} +3 -3
- package/dist/component/{dropdown-rac-FHjz8fKp.js → dropdown-rac-DY2QSx-Q.js} +1 -1
- package/dist/component/{ecom-address-rac-DSbpf4z8.js → ecom-address-rac-CGlQmW6l.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DiZWNwnt.js → ecom-subscription-checkbox-rac-K3Dx-Boa.js} +3 -3
- package/dist/component/{email-input-field-rac-BQKK2O7L.js → email-input-field-rac-DCKR6Yco.js} +48 -48
- package/dist/component/{events-repeater-rac-Dudnyhal.js → events-repeater-rac-DS2hIZ81.js} +61 -60
- package/dist/component/events-rsvp-rac-iSG0hWt3.js +45 -0
- package/dist/component/{field-error-headless-C5ZsFUKv.js → field-error-headless-Lb5aaoR3.js} +1 -1
- package/dist/component/{field-label-headless-CS5OYsiI.js → field-label-headless-C1VDQVhB.js} +1 -1
- package/dist/component/field-rac.module-ColNPUt0.js +23 -0
- package/dist/component/{file-upload-rac-bQ2QOO8Q.js → file-upload-rac-BEUXTVXa.js} +35 -35
- package/dist/component/{fixed-payment-rac-B6FvXoCU.js → fixed-payment-rac-BwrQJQ6w.js} +5 -5
- package/dist/component/{form-BpHElSwH.js → form-1k13yOes.js} +69 -69
- package/dist/component/form-element-classes-BuM-vthE.js +141 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-D4UYcmok.js → header-field-rac-BeFf5qfw.js} +3 -3
- package/dist/component/{header-rac-KavPiBdn.js → header-rac-Cqvmjc8G.js} +1 -1
- package/dist/component/{image-choice-rac-BJQqBhBD.js → image-choice-rac-DU1Tf2-T.js} +9 -9
- package/dist/component/{index-Y8iTxLat.js → index-B0SdXZJm.js} +4 -4
- package/dist/component/{index-RSEYrQef.js → index-DhL-iYwY.js} +2 -2
- package/dist/component/{isObjectLike-jwHec4Ap.js → isObjectLike-DOWF1bjK.js} +1 -1
- package/dist/component/{multiline-address-field-rac-D4Ibno80.js → multiline-address-field-rac-CBhxL2MB.js} +38 -38
- package/dist/component/{multiline-address-rac-CrTSjzBN.js → multiline-address-rac-BgZnu3UR.js} +1 -1
- package/dist/component/{number-input-field-rac-DW1SjB-Z.js → number-input-field-rac-Cq0KLrSv.js} +8 -8
- package/dist/component/{number-input-rac-CdE_hRbA.js → number-input-rac-ovbP_aP5.js} +1 -1
- package/dist/component/{password-rac-BCxl5mMQ.js → password-rac-DLKw8FXz.js} +11 -11
- package/dist/component/{payment-input-rac-DmO4s4ue.js → payment-input-rac-EHufj8Y0.js} +11 -11
- package/dist/component/{phone-input-field-rac-BYAnwk5h.js → phone-input-field-rac-D1KzskYy.js} +27 -27
- package/dist/component/{phone-rac-gS4k9Yn8.js → phone-rac-D71sfMS7.js} +1 -1
- package/dist/component/{product-list-rac-CO0o3yOg.js → product-list-rac-BGrTM8kv.js} +23 -22
- package/dist/component/quiz-radio-group-rac-BU2GBlqo.js +13 -0
- package/dist/component/radio-button-module-classes-BqNsWvgU.js +132 -0
- package/dist/component/radio-group-field-rac-BSY-fyxl.js +47 -0
- package/dist/component/{radio-group-rac-B-9q91fJ.js → radio-group-rac-geRsORyh.js} +1 -1
- package/dist/component/rating-input-field-rac-D6gRUiSX.js +136 -0
- package/dist/component/{rating-input-rac-BVO62LmE.js → rating-input-rac-BMtu7e5q.js} +1 -1
- package/dist/component/{rich-content-rac.module-CdiaAjxG.js → rich-content-rac.module-CFMzPWHV.js} +1 -1
- package/dist/component/{rich-text-field-rac-C4RrbyEX.js → rich-text-field-rac-D0Klsdj7.js} +3 -3
- package/dist/component/{rich-text-rac-BG376ww9.js → rich-text-rac-o7idQY51.js} +1 -1
- package/dist/component/selection-indicator-XQ8MYHUQ.js +11 -0
- package/dist/component/{service-dropdown-rac-Dy6-OpVR.js → service-dropdown-rac-BXq358Pw.js} +12 -12
- package/dist/component/{services-multi-choice-rac-BKW9MP_b.js → services-multi-choice-rac-DVRk7Ayt.js} +13 -13
- package/dist/component/{signature-rac-Cxgixp4o.js → signature-rac-CblU7c_6.js} +36 -36
- package/dist/component/{submit-button-rac-BqPJ7WPI.js → submit-button-rac-DYz_oLbv.js} +2 -2
- package/dist/component/{tags-field-rac-wwqpztG7.js → tags-field-rac-D068ijAD.js} +16 -16
- package/dist/component/{tags-rac-DUxITYxU.js → tags-rac-yRjGACmm.js} +1 -1
- package/dist/component/{text-area-field-rac-Cen6O33S.js → text-area-field-rac-C4ytlqwT.js} +14 -14
- package/dist/component/{text-area-rac-CRlO56GA.js → text-area-rac-DkCdp41z.js} +1 -1
- package/dist/component/{text-input-field-rac-CbnKn03g.js → text-input-field-rac-TSY90sCu.js} +3 -3
- package/dist/component/{text-input-headless-C_NTJmLe.js → text-input-headless-D3b0XErK.js} +3 -3
- package/dist/component/{text-input-rac-DvwV7Igm.js → text-input-rac-CKiScYKV.js} +1 -1
- package/dist/component/{time-input-rac-TSEXiODs.js → time-input-rac-Cjs21F9f.js} +8 -8
- package/dist/component/{url-input-field-rac-Cxgh9T8s.js → url-input-field-rac-Bf5NoN4o.js} +15 -15
- package/dist/component/{url-input-rac-DNw-Jg1U.js → url-input-rac-DqgvJboS.js} +1 -1
- package/dist/component/{use-element-state-class-name-CC65g9mT.js → use-element-state-class-name-DkaI8J4Y.js} +1 -1
- package/dist/component/{use-service-options-base-EFrxTpGm.js → use-service-options-base-cL2N21mJ.js} +1 -1
- package/package.json +2 -2
- package/dist/component/checkbox-indicator-module-classes-BcScu147.js +0 -17
- package/dist/component/contacts-subscribe-rac-CAbBbFxZ.js +0 -13
- package/dist/component/events-rsvp-rac-008H5Ska.js +0 -38
- package/dist/component/field-rac.module-DjmaTYkc.js +0 -23
- package/dist/component/form-element-classes-BXNs5k3q.js +0 -119
- package/dist/component/quiz-radio-group-rac-Dhk7nkzb.js +0 -13
- package/dist/component/radio-group-field-rac-DdlyQ3m6.js +0 -40
- package/dist/component/radio-group-field-rac.module-emin6sSc.js +0 -124
- package/dist/component/rating-input-field-rac-VDaJKq-n.js +0 -126
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import o, { useRef as
|
|
1
|
+
import o, { useRef as J, useState as j, useEffect as H, createContext as $e, useContext as Ge, useMemo as P, useCallback as ie } from "react";
|
|
2
2
|
import { RicosViewer as it } from "@wix/ricos/viewer";
|
|
3
3
|
import M from "classnames";
|
|
4
|
-
import { ab as ce, aa as lt, ae as ve, ad as ct, c as mt, as as ut, ar as dt, ai as me, af as Se, ak as ft, ah as Dt, F as Et } from "./form-
|
|
4
|
+
import { ab as ce, aa as lt, ae as ve, ad as ct, c as mt, as as ut, ar as dt, ai as me, af as Se, ak as ft, ah as Dt, F as Et } from "./form-1k13yOes.js";
|
|
5
5
|
import { C as Ce } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
6
|
import { E as St } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
8
|
-
import { s as De } from "./field-rac.module-
|
|
9
|
-
import { z as pt,
|
|
10
|
-
import { u as Ot } from "./use-element-state-class-name-
|
|
8
|
+
import { s as De } from "./field-rac.module-ColNPUt0.js";
|
|
9
|
+
import { z as pt, P as _t, a as Lt, x as We, h as yt, W as Nt, p as At, i as bt, a2 as It } from "./form-element-classes-BuM-vthE.js";
|
|
10
|
+
import { u as Ot } from "./use-element-state-class-name-DkaI8J4Y.js";
|
|
11
11
|
import { ListBox as gt, Button as ke, ListBoxItem as Tt, RadioGroup as vt, RadioField as kt, RadioButton as Rt } from "react-aria-components";
|
|
12
12
|
import { f as T, a as le } from "./find-child-C60k4CxG.js";
|
|
13
|
-
import { D as wt, E as Mt } from "./field-error-headless-
|
|
14
|
-
import { L as Ft } from "./field-label-headless-
|
|
13
|
+
import { D as wt, E as Mt } from "./field-error-headless-Lb5aaoR3.js";
|
|
14
|
+
import { L as Ft } from "./field-label-headless-C1VDQVhB.js";
|
|
15
15
|
import { F as ht } from "./fieldset-headless-CD3fds9J.js";
|
|
16
16
|
import { g as Ct } from "./get-first-day-of-the-week-DvnsxYhQ.js";
|
|
17
17
|
import "date-fns";
|
|
@@ -25,7 +25,7 @@ var Oe = /* @__PURE__ */ (function(e) {
|
|
|
25
25
|
return e.LOADING = "LOADING", e.DONE = "DONE", e.ERROR = "ERROR", e;
|
|
26
26
|
})({});
|
|
27
27
|
const V = 4;
|
|
28
|
-
var
|
|
28
|
+
var Q = /* @__PURE__ */ (function(e) {
|
|
29
29
|
return e.FORM = "form", e.NO_AVAILABILITY_FOR_DATE = "no availability for date empty state", e.NO_AVAILABILITY_AT_ALL = "no availability at all empty state", e.SLOT = "slot", e.DATE = "date", e.PAGINATION = "pagination", e.SHOW_MORE = "show more", e;
|
|
30
30
|
})({}), te = /* @__PURE__ */ (function(e) {
|
|
31
31
|
return e.LOAD = "load", e.CLICK = "click", e;
|
|
@@ -158,9 +158,9 @@ const xt = (e) => {
|
|
|
158
158
|
};
|
|
159
159
|
function Kt(e) {
|
|
160
160
|
var f;
|
|
161
|
-
const { initialData: n, onChange: t, value: a } = e, { isEditor: s, isComposer: r } = ce(), u = (f = n == null ? void 0 : n.service) == null ? void 0 : f.id, { actions: i } = ve(), l =
|
|
161
|
+
const { initialData: n, onChange: t, value: a } = e, { isEditor: s, isComposer: r } = ce(), u = (f = n == null ? void 0 : n.service) == null ? void 0 : f.id, { actions: i } = ve(), l = J(i);
|
|
162
162
|
l.current = i;
|
|
163
|
-
const c = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [d, S] =
|
|
163
|
+
const c = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [d, S] = j(null), E = Ve(n == null ? void 0 : n.service);
|
|
164
164
|
return H(() => {
|
|
165
165
|
u && !s && !r && c && (async () => {
|
|
166
166
|
var W, N, A, Y, B;
|
|
@@ -183,7 +183,7 @@ function Kt(e) {
|
|
|
183
183
|
if (O.availabilityDates = await U(2), (W = O.availabilityDates) != null && W.length || (O.availabilityDates = await U(6)), !((N = O.availabilityDates) != null && N.length)) {
|
|
184
184
|
E == null || E.report({
|
|
185
185
|
action: te.LOAD,
|
|
186
|
-
component:
|
|
186
|
+
component: Q.NO_AVAILABILITY_AT_ALL
|
|
187
187
|
}), S({
|
|
188
188
|
dataStatus: z.ERROR,
|
|
189
189
|
error: {
|
|
@@ -199,7 +199,7 @@ function Kt(e) {
|
|
|
199
199
|
selectedDate: O.selectedDate
|
|
200
200
|
}))), E == null || E.report({
|
|
201
201
|
action: te.LOAD,
|
|
202
|
-
component: (B = O.availabilityDates) != null && B.length ?
|
|
202
|
+
component: (B = O.availabilityDates) != null && B.length ? Q.FORM : Q.NO_AVAILABILITY_FOR_DATE
|
|
203
203
|
}), a != null && a.startDate || t(void 0), S({
|
|
204
204
|
...O,
|
|
205
205
|
dataStatus: z.DONE
|
|
@@ -221,12 +221,12 @@ function Kt(e) {
|
|
|
221
221
|
c
|
|
222
222
|
]), d;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const je = /* @__PURE__ */ $e({
|
|
225
225
|
appointmentState: {},
|
|
226
226
|
setAppointmentState: () => {
|
|
227
227
|
}
|
|
228
228
|
}), $t = ({ appointmentFieldProps: e, children: n }) => {
|
|
229
|
-
const { isEditor: t, isComposer: a } = ce(), [s, r] =
|
|
229
|
+
const { isEditor: t, isComposer: a } = ce(), [s, r] = j(() => Pt({
|
|
230
230
|
appointmentFieldProps: e,
|
|
231
231
|
isEditor: t,
|
|
232
232
|
isComposer: a
|
|
@@ -238,7 +238,7 @@ const Qe = /* @__PURE__ */ $e({
|
|
|
238
238
|
});
|
|
239
239
|
}, [
|
|
240
240
|
u
|
|
241
|
-
]), /* @__PURE__ */ o.createElement(
|
|
241
|
+
]), /* @__PURE__ */ o.createElement(je.Provider, {
|
|
242
242
|
value: {
|
|
243
243
|
appointmentFieldProps: e,
|
|
244
244
|
appointmentState: s,
|
|
@@ -248,7 +248,7 @@ const Qe = /* @__PURE__ */ $e({
|
|
|
248
248
|
})
|
|
249
249
|
}
|
|
250
250
|
}, n);
|
|
251
|
-
}, Re = () => Ge(
|
|
251
|
+
}, Re = () => Ge(je), Gt = (e, n) => {
|
|
252
252
|
if (e.startOfWeek.getMonth() === e.endOfWeek.getMonth())
|
|
253
253
|
return new Intl.DateTimeFormat(n, {
|
|
254
254
|
month: "long",
|
|
@@ -290,7 +290,7 @@ const Qe = /* @__PURE__ */ $e({
|
|
|
290
290
|
fromDate: t,
|
|
291
291
|
toDate: a
|
|
292
292
|
};
|
|
293
|
-
},
|
|
293
|
+
}, jt = ({ setIsReloadingSlots: e }) => {
|
|
294
294
|
const { appointmentFieldProps: n, appointmentState: t, setAppointmentState: a } = Re(), { value: s } = n, { actions: r } = ve();
|
|
295
295
|
H(() => {
|
|
296
296
|
(async () => {
|
|
@@ -321,17 +321,17 @@ const Qe = /* @__PURE__ */ $e({
|
|
|
321
321
|
s,
|
|
322
322
|
t == null ? void 0 : t.dataStatus
|
|
323
323
|
]);
|
|
324
|
-
},
|
|
324
|
+
}, Qt = (e, n) => !e || !n.length ? e : e.filter((t) => {
|
|
325
325
|
var a;
|
|
326
326
|
return !n.includes(((a = t == null ? void 0 : t.slot) == null ? void 0 : a.startDate) ?? "");
|
|
327
|
-
}), Ee = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`,
|
|
327
|
+
}), Ee = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`, Jt = ({ locale: e, endDate: n, startDate: t, timezone: a }) => {
|
|
328
328
|
const s = {
|
|
329
329
|
hour: "numeric",
|
|
330
330
|
minute: "numeric",
|
|
331
331
|
timeZone: a
|
|
332
332
|
}, r = new Intl.DateTimeFormat(e, s).format(new Date(t)), u = new Intl.DateTimeFormat(e, s).format(new Date(n));
|
|
333
333
|
return `${r} - ${u}`;
|
|
334
|
-
},
|
|
334
|
+
}, Xt = ({ selectedDate: e, locale: n, timezone: t }) => e ? new Intl.DateTimeFormat(n, {
|
|
335
335
|
weekday: "long",
|
|
336
336
|
month: "short",
|
|
337
337
|
day: "numeric",
|
|
@@ -353,7 +353,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
353
353
|
var n;
|
|
354
354
|
return ((n = e == null ? void 0 : e.params) == null ? void 0 : n.reason) === nn;
|
|
355
355
|
}, on = ({ error: e, selectedSlot: n }) => {
|
|
356
|
-
const { isExperimentEnabled: t } = ct(), a = t(mt.BIF_SLOT_HOLD), [s, r] =
|
|
356
|
+
const { isExperimentEnabled: t } = ct(), a = t(mt.BIF_SLOT_HOLD), [s, r] = j(He), u = a && an(e), i = n == null ? void 0 : n.startDate, l = J(!1);
|
|
357
357
|
return H(() => {
|
|
358
358
|
if (!u) {
|
|
359
359
|
l.current = !1;
|
|
@@ -390,14 +390,14 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
390
390
|
return !!((a = t.slot) != null && a.startDate) && ne(new Date(t.slot.startDate), e);
|
|
391
391
|
}), mn = () => {
|
|
392
392
|
var he;
|
|
393
|
-
const { appointmentFieldProps: e, appointmentState: n, setAppointmentState: t } = Re(), { language: a, isEditor: s, isComposer: r, isMobile: u } = ce(), { t: i } = ut(), { actions: l } = ve(), c = Ve(), [d, S] =
|
|
394
|
-
|
|
393
|
+
const { appointmentFieldProps: e, appointmentState: n, setAppointmentState: t } = Re(), { language: a, isEditor: s, isComposer: r, isMobile: u } = ce(), { t: i } = ut(), { actions: l } = ve(), c = Ve(), [d, S] = j(!1), [E, f] = j(!1), [g, v] = j(), [O, W] = j();
|
|
394
|
+
jt({
|
|
395
395
|
setIsReloadingSlots: S
|
|
396
396
|
});
|
|
397
|
-
const { onChange: N, value: A, target: Y, initialData: B, formatDescription: U, locationType: oe, error: se } = e, { availabilityDates: $, availabilitySlots: k, timezone: _ = "", selectedDate: L, currentSlotBulkSize: R, dataStatus: G, error: ue } = n, K = (he = B == null ? void 0 : B.service) == null ? void 0 : he.id, Z = G === z.LOADING,
|
|
397
|
+
const { onChange: N, value: A, target: Y, initialData: B, formatDescription: U, locationType: oe, error: se } = e, { availabilityDates: $, availabilitySlots: k, timezone: _ = "", selectedDate: L, currentSlotBulkSize: R, dataStatus: G, error: ue } = n, K = (he = B == null ? void 0 : B.service) == null ? void 0 : he.id, Z = G === z.LOADING, X = d || E, pe = !!ue, Me = on({
|
|
398
398
|
error: se,
|
|
399
399
|
selectedSlot: A
|
|
400
|
-
}), y = P(() =>
|
|
400
|
+
}), y = P(() => Qt(k, Me), [
|
|
401
401
|
k,
|
|
402
402
|
Me
|
|
403
403
|
]);
|
|
@@ -429,7 +429,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
429
429
|
]);
|
|
430
430
|
const _e = P(() => Ct(a), [
|
|
431
431
|
a
|
|
432
|
-
]), Fe =
|
|
432
|
+
]), Fe = J(L);
|
|
433
433
|
H(() => {
|
|
434
434
|
const D = Fe.current;
|
|
435
435
|
Fe.current = L, !!L && (!D || !ne(D, L)) && v(void 0);
|
|
@@ -440,7 +440,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
440
440
|
g,
|
|
441
441
|
L,
|
|
442
442
|
_e
|
|
443
|
-
]),
|
|
443
|
+
]), Xe = P(() => {
|
|
444
444
|
const D = Te(/* @__PURE__ */ new Date()), b = new Intl.DateTimeFormat(a, {
|
|
445
445
|
weekday: u ? "narrow" : "short"
|
|
446
446
|
}), I = new Intl.DateTimeFormat(a, {
|
|
@@ -458,8 +458,8 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
458
458
|
key: rn(x),
|
|
459
459
|
date: x,
|
|
460
460
|
isSelected: Ie,
|
|
461
|
-
isAvailable: !Z && !
|
|
462
|
-
isDisabled: rt ||
|
|
461
|
+
isAvailable: !Z && !X && !Ie && cn(x, $),
|
|
462
|
+
isDisabled: rt || X && !Ie,
|
|
463
463
|
isToday: ne(x, D),
|
|
464
464
|
dayOfMonthLabel: I.format(x),
|
|
465
465
|
weekdayLabel: b.format(x),
|
|
@@ -472,7 +472,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
472
472
|
L,
|
|
473
473
|
$,
|
|
474
474
|
Z,
|
|
475
|
-
|
|
475
|
+
X,
|
|
476
476
|
a,
|
|
477
477
|
u,
|
|
478
478
|
i
|
|
@@ -489,7 +489,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
489
489
|
key: w,
|
|
490
490
|
startDate: b,
|
|
491
491
|
endDate: I,
|
|
492
|
-
timeRange:
|
|
492
|
+
timeRange: Jt({
|
|
493
493
|
startDate: b,
|
|
494
494
|
endDate: I,
|
|
495
495
|
locale: a,
|
|
@@ -509,14 +509,14 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
509
509
|
]), Ne = !d && !!(y != null && y.length) && (R || V) < y.length, Ae = h > Ye(/* @__PURE__ */ new Date(), _e), et = ie(
|
|
510
510
|
async (D) => {
|
|
511
511
|
var b;
|
|
512
|
-
if (!(
|
|
512
|
+
if (!(X || L && ne(D, L))) {
|
|
513
513
|
S(!0), N == null || N(void 0), t({
|
|
514
514
|
currentSlotBulkSize: V,
|
|
515
515
|
selectedDate: D,
|
|
516
516
|
availabilitySlots: void 0
|
|
517
517
|
}), c == null || c.report({
|
|
518
518
|
action: te.CLICK,
|
|
519
|
-
component:
|
|
519
|
+
component: Q.DATE
|
|
520
520
|
});
|
|
521
521
|
try {
|
|
522
522
|
const I = await ((b = l == null ? void 0 : l.getAvailabilitySlots) == null ? void 0 : b.call(l, {
|
|
@@ -537,7 +537,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
537
537
|
},
|
|
538
538
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
539
539
|
[
|
|
540
|
-
|
|
540
|
+
X,
|
|
541
541
|
L,
|
|
542
542
|
K,
|
|
543
543
|
_,
|
|
@@ -545,7 +545,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
545
545
|
N,
|
|
546
546
|
c
|
|
547
547
|
]
|
|
548
|
-
), de =
|
|
548
|
+
), de = J(0), tt = ie(
|
|
549
549
|
async (D) => {
|
|
550
550
|
var re;
|
|
551
551
|
if (D < 0 && !Ae)
|
|
@@ -556,7 +556,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
556
556
|
const w = ++de.current;
|
|
557
557
|
f(!0), c == null || c.report({
|
|
558
558
|
action: te.CLICK,
|
|
559
|
-
component:
|
|
559
|
+
component: Q.PAGINATION
|
|
560
560
|
});
|
|
561
561
|
try {
|
|
562
562
|
const be = await ((re = l == null ? void 0 : l.getAvailabilityDates) == null ? void 0 : re.call(l, {
|
|
@@ -593,7 +593,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
593
593
|
const { startDate: I, endDate: w } = b;
|
|
594
594
|
c == null || c.report({
|
|
595
595
|
action: te.CLICK,
|
|
596
|
-
component:
|
|
596
|
+
component: Q.SLOT,
|
|
597
597
|
startTime: new Date(I).valueOf(),
|
|
598
598
|
endTime: new Date(w).valueOf()
|
|
599
599
|
}), N == null || N({
|
|
@@ -615,7 +615,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
615
615
|
const D = R || V;
|
|
616
616
|
c == null || c.report({
|
|
617
617
|
action: te.CLICK,
|
|
618
|
-
component:
|
|
618
|
+
component: Q.SHOW_MORE
|
|
619
619
|
}), W(D), t({
|
|
620
620
|
currentSlotBulkSize: D + V
|
|
621
621
|
});
|
|
@@ -636,7 +636,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
636
636
|
i
|
|
637
637
|
]);
|
|
638
638
|
return {
|
|
639
|
-
days:
|
|
639
|
+
days: Xe,
|
|
640
640
|
slots: ye,
|
|
641
641
|
selectedSlotKey: Le,
|
|
642
642
|
selectDate: et,
|
|
@@ -647,14 +647,14 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
647
647
|
hasMoreSlots: Ne,
|
|
648
648
|
hasError: pe,
|
|
649
649
|
isLoading: Z,
|
|
650
|
-
isRefetching:
|
|
650
|
+
isRefetching: X,
|
|
651
651
|
isReloadingSlots: d,
|
|
652
652
|
weekRangeLabel: ln(h, ee(h, q - 1), a),
|
|
653
653
|
weekCaptionLabel: Gt({
|
|
654
654
|
startOfWeek: h,
|
|
655
655
|
endOfWeek: ee(h, q - 1)
|
|
656
656
|
}, a),
|
|
657
|
-
selectedDateLabel:
|
|
657
|
+
selectedDateLabel: Xt({
|
|
658
658
|
selectedDate: L,
|
|
659
659
|
locale: a,
|
|
660
660
|
timezone: _
|
|
@@ -671,8 +671,8 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
671
671
|
pendingFocusIndex: O,
|
|
672
672
|
consumePendingFocusIndex: ot
|
|
673
673
|
};
|
|
674
|
-
},
|
|
675
|
-
const e = Ge(
|
|
674
|
+
}, Qe = $e(void 0), Je = (e) => `${e}-timezone-note`, F = () => {
|
|
675
|
+
const e = Ge(Qe);
|
|
676
676
|
if (typeof e > "u")
|
|
677
677
|
throw new Error("Appointment parts must be used inside an <Appointment> component");
|
|
678
678
|
return e;
|
|
@@ -707,7 +707,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
707
707
|
day: f
|
|
708
708
|
}))));
|
|
709
709
|
}, un = ({ children: e, className: n }) => {
|
|
710
|
-
const { changeWeek: t, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), u = we(), i =
|
|
710
|
+
const { changeWeek: t, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), u = we(), i = J(null), l = J(!1);
|
|
711
711
|
return H(() => {
|
|
712
712
|
var S, E, f;
|
|
713
713
|
if (a || !l.current)
|
|
@@ -770,9 +770,9 @@ C.Heading = fn;
|
|
|
770
770
|
C.NextWeek = dn;
|
|
771
771
|
C.Day = Dn;
|
|
772
772
|
const Ke = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) => {
|
|
773
|
-
const { hasTimezoneNote: a } = t, { slots: s, selectedSlotKey: r, selectSlot: u, selectedDateLabel: i, isReloadingSlots: l, timezoneLabel: c, pendingFocusIndex: d, consumePendingFocusIndex: S } = F(), { id: E, disabled: f, readOnly: g, required: v, hasError: O } = me(), { inputId: W, labelId: N, ariaDescribedBy: A } = Se(), Y =
|
|
773
|
+
const { hasTimezoneNote: a } = t, { slots: s, selectedSlotKey: r, selectSlot: u, selectedDateLabel: i, isReloadingSlots: l, timezoneLabel: c, pendingFocusIndex: d, consumePendingFocusIndex: S } = F(), { id: E, disabled: f, readOnly: g, required: v, hasError: O } = me(), { inputId: W, labelId: N, ariaDescribedBy: A } = Se(), Y = J(null), B = `${W}-slots-label`, U = T(e, ae.Label), oe = T(e, ae.Slot) ?? /* @__PURE__ */ o.createElement(ae.Slot, null), se = !!U && !!i, $ = [
|
|
774
774
|
A,
|
|
775
|
-
a && c ?
|
|
775
|
+
a && c ? Je(W) : void 0
|
|
776
776
|
].filter(Boolean).join(" ") || void 0, k = (_) => {
|
|
777
777
|
var L, R, G;
|
|
778
778
|
(G = (R = (L = Y.current) == null ? void 0 : L.querySelectorAll(Ke)) == null ? void 0 : R[_]) == null || G.focus();
|
|
@@ -862,7 +862,7 @@ const m = ({ children: e, className: n }) => {
|
|
|
862
862
|
visibility: "hidden"
|
|
863
863
|
}, _n = ({ children: e, className: n }) => {
|
|
864
864
|
const { required: t, onFocus: a, onBlur: s } = me(), { inputId: r, labelId: u, ariaDescribedBy: i } = Se(), l = mn(), c = T(e, m.Loader), d = T(e, m.Notification), S = T(e, m.Dates), E = T(e, m.Timezone), f = T(e, m.Format), g = T(e, m.Slots), v = T(e, m.ShowMoreSlots);
|
|
865
|
-
return /* @__PURE__ */ o.createElement(
|
|
865
|
+
return /* @__PURE__ */ o.createElement(Qe.Provider, {
|
|
866
866
|
value: l
|
|
867
867
|
}, /* @__PURE__ */ o.createElement(ht, {
|
|
868
868
|
id: r,
|
|
@@ -897,7 +897,7 @@ const m = ({ children: e, className: n }) => {
|
|
|
897
897
|
}, Nn = ({ children: e, className: n }) => {
|
|
898
898
|
const { timezoneLabel: t } = F(), { inputId: a } = Se();
|
|
899
899
|
return t ? /* @__PURE__ */ o.createElement("span", {
|
|
900
|
-
id:
|
|
900
|
+
id: Je(a),
|
|
901
901
|
className: n
|
|
902
902
|
}, e ? e({
|
|
903
903
|
label: t
|
package/dist/component/{bookings-login-bar-rac-P6pziSl1.js → bookings-login-bar-rac-BT1npKru.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import o from "react";
|
|
2
2
|
import E from "classnames";
|
|
3
|
-
import { ai as d, as as B, ab as f, ae as p } from "./form-
|
|
3
|
+
import { ai as d, as as B, ab as f, ae as p } from "./form-1k13yOes.js";
|
|
4
4
|
import { Button as L } from "react-aria-components";
|
|
5
5
|
import { a as i, f as g } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { w as _ } from "./form-element-classes-
|
|
6
|
+
import { w as _ } from "./form-element-classes-BuM-vthE.js";
|
|
7
7
|
const a = ({ children: n }) => {
|
|
8
8
|
const { id: r, FieldLayout: t } = d();
|
|
9
9
|
return /* @__PURE__ */ o.createElement(t, {
|