@wix/form-elements 1.169.0 → 1.170.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-BbXyKTd7.js → appointment-rac-DZ0SFXmL.js} +83 -83
- package/dist/component/{bookings-address-rac-VJkR_U9L.js → bookings-address-rac-BW9grc77.js} +1 -1
- package/dist/component/{bookings-email-rac-_EupwXpQ.js → bookings-email-rac-D8gMaAfB.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DTZixHYj.js → bookings-first-name-rac-CAjcs7b6.js} +1 -1
- package/dist/component/{bookings-header-rac-BKbKTv5g.js → bookings-header-rac-BhKZ1kku.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BDy860-C.js → bookings-last-name-rac-DpsMDuU0.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DgNP-YNZ.js → bookings-login-bar-rac-BVdWmKS8.js} +3 -3
- package/dist/component/{bookings-phone-rac-B_I6n96b.js → bookings-phone-rac-DsqNi2mI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-prYPbIiz.js → bookings-rich-text-rac-elM4Ne3f.js} +1 -1
- package/dist/component/{checkbox-field-rac-C-4PXuxG.js → checkbox-field-rac-BU4E73fD.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-D16bAcaq.js → checkbox-group-field-headless-6yJdIbP2.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-GUQ5dO_s.js → checkbox-group-field-rac-CojbCWSF.js} +4 -4
- package/dist/component/{checkbox-group-rac-Bl6xL5-H.js → checkbox-group-rac-3qUVUc-C.js} +1 -1
- package/dist/component/{checkbox-rac-Blg0KVyP.js → checkbox-rac-DwbTapd_.js} +1 -1
- package/dist/component/{contacts-address-rac-BfOhCAj8.js → contacts-address-rac-BL7XDZuP.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DYBvDh62.js → contacts-birthdate-rac-DeJYIHAg.js} +1 -1
- package/dist/component/{contacts-company-rac-DIJr7zjA.js → contacts-company-rac-BeImf5uc.js} +1 -1
- package/dist/component/{contacts-email-rac-DjmqELhC.js → contacts-email-rac-CtacwrZ0.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DGNll7gw.js → contacts-first-name-rac-CAdOqOOA.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BJ8AZYQN.js → contacts-last-name-rac-Db9mHzCW.js} +1 -1
- package/dist/component/{contacts-phone-rac-BC-QtpEN.js → contacts-phone-rac-W0OLEbzL.js} +1 -1
- package/dist/component/{contacts-position-rac-BQia__74.js → contacts-position-rac-CV4Ibt4Z.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CTFptz01.js → contacts-subscribe-rac-CQ3Q1pjZ.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-Cy72Jouc.js → contacts-tax-id-rac-Dux-pk6r.js} +1 -1
- package/dist/component/{date-availability-BC6updcS.js → date-availability-RkX-Qw7G.js} +1 -1
- package/dist/component/date-input-field-rac-CYCT6qoa.js +309 -0
- package/dist/component/{date-input-rac-KkRyWRP_.js → date-input-rac-BkYZ7q_o.js} +1 -1
- package/dist/component/{date-picker-field-rac-BLWVJbTJ.js → date-picker-field-rac-eMidYtsl.js} +31 -31
- package/dist/component/{date-picker-rac-DKCQza7v.js → date-picker-rac-D23rxZcF.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CZxZW6fz.js → date-time-input-field-rac-BjIj4dXQ.js} +111 -111
- package/dist/component/{date-time-input-rac-DQ-iBwmr.js → date-time-input-rac-BSGAdk9L.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-kp1Jbwt-.js → dext-checkbox-group-rac-Xmb5IKrb.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CBm9cRUz.js → dext-checkbox-rac-2eA7y0ld.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DsVKWsRy.js → dext-date-picker-rac-CmLxVGGT.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CO26-8Qo.js → dext-date-time-input-rac-Cd9nwSjb.js} +1 -1
- package/dist/component/{dext-dropdown-rac-eRzu2C-y.js → dext-dropdown-rac-BKdQ0nGS.js} +1 -1
- package/dist/component/{dext-email-rac-DDrZzE_G.js → dext-email-rac-07zDPxyf.js} +1 -1
- package/dist/component/{dext-number-input-rac-Dj7sInLk.js → dext-number-input-rac-DRvGuppY.js} +1 -1
- package/dist/component/{dext-phone-rac-g8M77F7m.js → dext-phone-rac-CKtTVjFg.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BjhygC0R.js → dext-radio-group-rac-BsBmMufq.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BraNjvyA.js → dext-rating-input-rac-CcFSTAIh.js} +1 -1
- package/dist/component/{dext-tags-rac-B5mAIuDi.js → dext-tags-rac-CCTDlCvX.js} +2 -2
- package/dist/component/{dext-text-area-rac-D_YBnaWi.js → dext-text-area-rac-Cif8po9h.js} +1 -1
- package/dist/component/{dext-text-input-rac-BzeWH1jv.js → dext-text-input-rac-2118X4iF.js} +1 -1
- package/dist/component/{dext-url-input-rac-Cn0h_vx3.js → dext-url-input-rac-DDImGkQe.js} +1 -1
- package/dist/component/{donation-rac-CQRdHxWh.js → donation-rac-Dnylss1d.js} +103 -103
- package/dist/component/{dropdown-field-rac-C7LL0W5Z.js → dropdown-field-rac-DDI4ZgZH.js} +3 -3
- package/dist/component/{dropdown-rac-Nb2VyJ0x.js → dropdown-rac-DX0Z3R_8.js} +1 -1
- package/dist/component/{ecom-address-rac-_c2YIIwg.js → ecom-address-rac-D9MeEQsk.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Bma7TAVj.js → ecom-subscription-checkbox-rac-DKJ9j5dj.js} +2 -2
- package/dist/component/{email-input-field-rac-2E2tEaS5.js → email-input-field-rac-DaKrmlwe.js} +55 -55
- package/dist/component/{events-repeater-rac-COWHYBFD.js → events-repeater-rac-DWrOLT0Y.js} +45 -45
- package/dist/component/{events-rsvp-rac-CXp8j19Y.js → events-rsvp-rac-YBTR1tR0.js} +6 -6
- package/dist/component/{field-error-headless-S-ugOQQX.js → field-error-headless-jksFrezt.js} +10 -10
- package/dist/component/{field-label-headless-_n4I0_tX.js → field-label-headless-BBvJAVxI.js} +10 -10
- package/dist/component/{file-upload-rac-DCH_iwDg.js → file-upload-rac-CgdmfUZG.js} +168 -168
- package/dist/component/{fixed-payment-rac-CYkKJUfM.js → fixed-payment-rac-v6rKwzFs.js} +13 -13
- package/dist/component/{form-jK8ezTss.js → form-BsiK682r.js} +530 -502
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DnbjI6W5.js → header-field-rac-BuXybl7K.js} +6 -6
- package/dist/component/{header-rac-DKUICrni.js → header-rac-CDyaLosW.js} +1 -1
- package/dist/component/{image-choice-rac-B_9ponST.js → image-choice-rac-BRlMroBw.js} +41 -41
- package/dist/component/{index-BxdMzOvN.js → index-BanOeCAF.js} +242 -236
- package/dist/component/{index-ZYnsxY-a.js → index-y9URYGEE.js} +6 -6
- package/dist/component/{isObjectLike-BW-9QEQl.js → isObjectLike-BG9nJ-rx.js} +7 -7
- package/dist/component/{multiline-address-field-rac-k-P0ijWG.js → multiline-address-field-rac-DRAkxI1l.js} +342 -342
- package/dist/component/{multiline-address-rac-Bbn9mNDa.js → multiline-address-rac-JjTzWsEb.js} +1 -1
- package/dist/component/{number-input-field-rac--lom-B_X.js → number-input-field-rac-QrouG7Hv.js} +22 -22
- package/dist/component/{number-input-rac-Bhbd6T9S.js → number-input-rac-DGmE7cLv.js} +1 -1
- package/dist/component/{password-rac-BV_uTHb3.js → password-rac-DeyY228m.js} +28 -28
- package/dist/component/{payment-input-rac-cawyGN_t.js → payment-input-rac-DmIennLi.js} +45 -45
- package/dist/component/{phone-input-field-rac-CsElHRto.js → phone-input-field-rac-F7e74TGA.js} +76 -76
- package/dist/component/{phone-rac-XrHN5Nko.js → phone-rac-CQfB2CQD.js} +1 -1
- package/dist/component/{product-list-rac-cxv_xz7K.js → product-list-rac--GGG8vvO.js} +62 -62
- package/dist/component/{quiz-radio-group-rac-DGaxOPE1.js → quiz-radio-group-rac-DF2C2vNq.js} +1 -1
- package/dist/component/{radio-button-module-classes-Xv2Jn01x.js → radio-button-module-classes-DmpNo6F2.js} +17 -17
- package/dist/component/{radio-group-field-rac-DgGqgTql.js → radio-group-field-rac-BGcPYfKO.js} +6 -6
- package/dist/component/{radio-group-rac-Bh0E-oe1.js → radio-group-rac-CqysUMCE.js} +1 -1
- package/dist/component/{rating-input-field-rac-C3YLV971.js → rating-input-field-rac-D-ei917Y.js} +24 -24
- package/dist/component/{rating-input-rac-CfcC5EUh.js → rating-input-rac-a9zJ74fw.js} +1 -1
- package/dist/component/{rich-content-rac.module-DUjzLGtX.js → rich-content-rac.module-CvyLVlXL.js} +5 -5
- package/dist/component/{rich-text-field-rac-BmguoJhk.js → rich-text-field-rac-vf19nvyw.js} +7 -7
- package/dist/component/{rich-text-rac-BWhHcq25.js → rich-text-rac-Cx_wpoxC.js} +1 -1
- package/dist/component/{service-dropdown-rac-C5oX-ql7.js → service-dropdown-rac-DITzKQxd.js} +26 -26
- package/dist/component/{services-multi-choice-rac-C1fem9NB.js → services-multi-choice-rac-BtisN0Aq.js} +11 -11
- package/dist/component/{signature-rac-BtHqiWj1.js → signature-rac-DUeIoS5O.js} +226 -226
- package/dist/component/{submit-button-rac-OYeKJFF8.js → submit-button-rac-C8h6zeTw.js} +36 -36
- package/dist/component/{tags-field-rac-kA2RSijL.js → tags-field-rac-CjFuiB0n.js} +51 -51
- package/dist/component/{tags-rac-B_2qCZGu.js → tags-rac-BO7rwyLl.js} +1 -1
- package/dist/component/{text-area-field-rac-DeO609Mv.js → text-area-field-rac-CgUx3nQ0.js} +23 -23
- package/dist/component/{text-area-rac-BAQFBOZd.js → text-area-rac-WgXYXIaf.js} +1 -1
- package/dist/component/{text-input-field-rac-CCcKwuLZ.js → text-input-field-rac-DaxWFha-.js} +6 -6
- package/dist/component/{text-input-headless-D8-jkaYm.js → text-input-headless-hjuRJTZN.js} +6 -6
- package/dist/component/{text-input-rac-BVcgjj8g.js → text-input-rac-BzumrJBj.js} +1 -1
- package/dist/component/{time-input-rac-BYctyHgU.js → time-input-rac-2FEkpQ7M.js} +18 -18
- package/dist/component/{url-input-field-rac-COC9qgcs.js → url-input-field-rac-BZ9f8D8I.js} +26 -26
- package/dist/component/{url-input-rac-BZXLh0Ej.js → url-input-rac-D-AVlxkD.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BTltqRl1.js → use-dropdown-option-class-name-DwAAtzgX.js} +11 -11
- package/dist/component/{use-dropdown-trigger-class-name-BjJZfl3i.js → use-dropdown-trigger-class-name-D-6n9YVG.js} +18 -18
- package/dist/component/{use-element-state-class-name-CkT6Ga8t.js → use-element-state-class-name-C5auxwhj.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BkoSr6tr.js → use-hoverable-input-class-name-Nd2jqfz4.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-CKaHhCqp.js +64 -0
- package/dist/component/{use-service-options-base-Wp8RZ4Z8.js → use-service-options-base-CvluFheT.js} +3 -3
- package/dist/component/use-text-input-class-name-DGTlYJxC.js +6 -0
- package/dist/form.d.ts +19 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-b_T1yf8D.js +0 -309
- package/dist/component/use-is-forced-open-dropdown-fo_NCnSk.js +0 -53
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +0 -6
|
@@ -6,13 +6,13 @@ import { E as lt } from "./error-icon-hZxQ6DEy.js";
|
|
|
6
6
|
import { g as ct, c as Ce } from "./calendar.module-BMUyMVja.js";
|
|
7
7
|
import { H as me } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as ue } from "./field-rac.module-ts2t4WUO.js";
|
|
9
|
-
import {
|
|
10
|
-
import { u as vt } from "./use-element-state-class-name-
|
|
11
|
-
import { ListBox as Rt, Button as ve, ListBoxItem as kt, RadioGroup as
|
|
9
|
+
import { bC as Ee, bB as mt, bG as ge, bE as ut, bU as dt, bT as Dt, bK as ie, bH as le, bM as ft, bJ as Et, F as St, h as _t, X as Nt, al as pt, g as At, j as We, i as yt, n as It, k as Ot, l as Lt, M as Tt, I as bt, m as gt } from "./form-BsiK682r.js";
|
|
10
|
+
import { u as vt } from "./use-element-state-class-name-C5auxwhj.js";
|
|
11
|
+
import { ListBox as Rt, Button as ve, ListBoxItem as kt, RadioGroup as Mt, RadioField as Ft, RadioButton as wt } from "react-aria-components";
|
|
12
12
|
import { f as v, a as Se } from "./find-child-C60k4CxG.js";
|
|
13
|
-
import { D as ht, E as Ct } from "./field-error-headless-
|
|
14
|
-
import { L as
|
|
15
|
-
import { F as
|
|
13
|
+
import { D as ht, E as Ct } from "./field-error-headless-jksFrezt.js";
|
|
14
|
+
import { L as Wt } from "./field-label-headless-BBvJAVxI.js";
|
|
15
|
+
import { F as xt } from "./fieldset-headless-CD3fds9J.js";
|
|
16
16
|
import "date-fns";
|
|
17
17
|
import { V as Ge } from "./headless-styles-CmcyA_pi.js";
|
|
18
18
|
function Bt(e) {
|
|
@@ -20,7 +20,7 @@ function Bt(e) {
|
|
|
20
20
|
}
|
|
21
21
|
var De = /* @__PURE__ */ (function(e) {
|
|
22
22
|
return e.BOOKING_NOT_INSTALL = "BOOKING_NOT_INSTALL", e.NO_AVAILABILITY_DATES_FOUND = "NO_AVAILABILITY_DATES_FOUND", e.GENERAL = "GENERAL", e;
|
|
23
|
-
})({}),
|
|
23
|
+
})({}), W = /* @__PURE__ */ (function(e) {
|
|
24
24
|
return e.LOADING = "LOADING", e.DONE = "DONE", e.ERROR = "ERROR", e;
|
|
25
25
|
})({});
|
|
26
26
|
const q = 4;
|
|
@@ -61,10 +61,10 @@ var Te;
|
|
|
61
61
|
(function(e) {
|
|
62
62
|
e.UNDEFINED = "UNDEFINED", e.OWNER_BUSINESS = "OWNER_BUSINESS", e.OWNER_CUSTOM = "OWNER_CUSTOM", e.CUSTOM = "CUSTOM";
|
|
63
63
|
})(Te || (Te = {}));
|
|
64
|
-
var
|
|
64
|
+
var xe;
|
|
65
65
|
(function(e) {
|
|
66
66
|
e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
|
|
67
|
-
})(
|
|
67
|
+
})(xe || (xe = {}));
|
|
68
68
|
var Be;
|
|
69
69
|
(function(e) {
|
|
70
70
|
e.UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE", e.BUSINESS = "BUSINESS", e.CUSTOM = "CUSTOM", e.CUSTOMER = "CUSTOMER";
|
|
@@ -83,27 +83,27 @@ const zt = (e) => {
|
|
|
83
83
|
type: De.GENERAL,
|
|
84
84
|
message: "Service ID is missing"
|
|
85
85
|
};
|
|
86
|
-
},
|
|
86
|
+
}, Ht = ({ appointmentFieldProps: e, isEditor: t, isComposer: n }) => {
|
|
87
87
|
const { initialData: a } = e, r = $t();
|
|
88
88
|
if (t || n)
|
|
89
89
|
return {
|
|
90
90
|
...r,
|
|
91
91
|
timezone: Ve(),
|
|
92
|
-
dataStatus:
|
|
92
|
+
dataStatus: W.DONE
|
|
93
93
|
};
|
|
94
94
|
{
|
|
95
95
|
const s = zt(a);
|
|
96
96
|
if (s)
|
|
97
97
|
return {
|
|
98
|
-
dataStatus:
|
|
98
|
+
dataStatus: W.ERROR,
|
|
99
99
|
error: s
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
return {
|
|
103
103
|
...r,
|
|
104
|
-
dataStatus:
|
|
104
|
+
dataStatus: W.LOADING
|
|
105
105
|
};
|
|
106
|
-
},
|
|
106
|
+
}, Yt = (e, t) => {
|
|
107
107
|
const n = /* @__PURE__ */ new Date(), a = new Date(n);
|
|
108
108
|
a.setMonth(a.getMonth() + e);
|
|
109
109
|
const r = new Date(n.toLocaleString("en-US", {
|
|
@@ -162,29 +162,29 @@ function Gt(e) {
|
|
|
162
162
|
const D = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [u, S] = Q(null), E = Ze(t == null ? void 0 : t.service);
|
|
163
163
|
return P(() => {
|
|
164
164
|
l && !r && !s && D && (async () => {
|
|
165
|
-
var I, O, U, z,
|
|
166
|
-
const
|
|
165
|
+
var I, O, U, z, H;
|
|
166
|
+
const M = Ve(), A = {
|
|
167
167
|
currentSlotBulkSize: q,
|
|
168
|
-
timezone:
|
|
169
|
-
dataStatus:
|
|
168
|
+
timezone: M,
|
|
169
|
+
dataStatus: W.LOADING
|
|
170
170
|
};
|
|
171
171
|
try {
|
|
172
|
-
const
|
|
172
|
+
const Y = async (oe) => {
|
|
173
173
|
var _, N;
|
|
174
|
-
const { startDate: $, endDate:
|
|
174
|
+
const { startDate: $, endDate: F } = Yt(oe, M);
|
|
175
175
|
return (N = (_ = c.current) == null ? void 0 : _.getAvailabilityDates) == null ? void 0 : N.call(_, {
|
|
176
176
|
serviceId: l,
|
|
177
177
|
fromDate: $,
|
|
178
|
-
toDate:
|
|
179
|
-
timeZone:
|
|
178
|
+
toDate: F,
|
|
179
|
+
timeZone: M
|
|
180
180
|
});
|
|
181
181
|
};
|
|
182
|
-
if (A.availabilityDates = await
|
|
182
|
+
if (A.availabilityDates = await Y(2), (I = A.availabilityDates) != null && I.length || (A.availabilityDates = await Y(6)), !((O = A.availabilityDates) != null && O.length)) {
|
|
183
183
|
E == null || E.report({
|
|
184
184
|
action: ne.LOAD,
|
|
185
185
|
component: J.NO_AVAILABILITY_AT_ALL
|
|
186
186
|
}), S({
|
|
187
|
-
dataStatus:
|
|
187
|
+
dataStatus: W.ERROR,
|
|
188
188
|
error: {
|
|
189
189
|
type: De.NO_AVAILABILITY_DATES_FOUND,
|
|
190
190
|
message: "No availability dates found"
|
|
@@ -194,18 +194,18 @@ function Gt(e) {
|
|
|
194
194
|
}
|
|
195
195
|
A.selectedDate = Kt(A.availabilityDates), A.selectedDate && (A.availabilitySlots = await ((z = (U = c.current) == null ? void 0 : U.getAvailabilitySlots) == null ? void 0 : z.call(U, {
|
|
196
196
|
serviceId: l,
|
|
197
|
-
timeZone:
|
|
197
|
+
timeZone: M,
|
|
198
198
|
selectedDate: A.selectedDate
|
|
199
199
|
}))), E == null || E.report({
|
|
200
200
|
action: ne.LOAD,
|
|
201
|
-
component: (
|
|
201
|
+
component: (H = A.availabilityDates) != null && H.length ? J.FORM : J.NO_AVAILABILITY_FOR_DATE
|
|
202
202
|
}), a != null && a.startDate || n(void 0), S({
|
|
203
203
|
...A,
|
|
204
|
-
dataStatus:
|
|
204
|
+
dataStatus: W.DONE
|
|
205
205
|
});
|
|
206
|
-
} catch (
|
|
207
|
-
console.error(
|
|
208
|
-
dataStatus:
|
|
206
|
+
} catch (Y) {
|
|
207
|
+
console.error(Y), S({
|
|
208
|
+
dataStatus: W.ERROR,
|
|
209
209
|
error: {
|
|
210
210
|
type: De.GENERAL,
|
|
211
211
|
message: "An error occurred in initialAppointmentState"
|
|
@@ -225,14 +225,14 @@ const qe = /* @__PURE__ */ Ke({
|
|
|
225
225
|
setAppointmentState: () => {
|
|
226
226
|
}
|
|
227
227
|
}), Zt = {
|
|
228
|
-
dataStatus:
|
|
228
|
+
dataStatus: W.ERROR,
|
|
229
229
|
error: {
|
|
230
230
|
type: De.NO_AVAILABILITY_DATES_FOUND,
|
|
231
231
|
message: "No availability dates found"
|
|
232
232
|
}
|
|
233
233
|
}, Vt = ({ appointmentFieldProps: e, children: t }) => {
|
|
234
234
|
var c;
|
|
235
|
-
const { isEditor: n, isComposer: a } = Ee(), r = ((c = ut().appointment) == null ? void 0 : c.noAvailability) === !0, [s, l] = Q(() =>
|
|
235
|
+
const { isEditor: n, isComposer: a } = Ee(), r = ((c = ut().appointment) == null ? void 0 : c.noAvailability) === !0, [s, l] = Q(() => Ht({
|
|
236
236
|
appointmentFieldProps: e,
|
|
237
237
|
isEditor: n,
|
|
238
238
|
isComposer: a
|
|
@@ -301,7 +301,7 @@ const qe = /* @__PURE__ */ Ke({
|
|
|
301
301
|
P(() => {
|
|
302
302
|
(async () => {
|
|
303
303
|
var i, c;
|
|
304
|
-
if (r != null && r.startDate && (n != null && n.selectedDate) && (n == null ? void 0 : n.dataStatus) ===
|
|
304
|
+
if (r != null && r.startDate && (n != null && n.selectedDate) && (n == null ? void 0 : n.dataStatus) === W.DONE && !ae(new Date(r.startDate), n == null ? void 0 : n.selectedDate)) {
|
|
305
305
|
e(!0);
|
|
306
306
|
const u = new Date(r.startDate), { fromDate: S, toDate: E } = Jt(u, 8), [d, b] = await Promise.all([
|
|
307
307
|
(i = s == null ? void 0 : s.getAvailabilityDates) == null ? void 0 : i.call(s, {
|
|
@@ -382,7 +382,7 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
382
382
|
}, te = (e, t) => {
|
|
383
383
|
const n = new Date(e);
|
|
384
384
|
return n.setDate(n.getDate() + t), n;
|
|
385
|
-
},
|
|
385
|
+
}, He = (e, t) => {
|
|
386
386
|
const n = be(e), a = (n.getDay() - t + j) % j;
|
|
387
387
|
return te(n, -a);
|
|
388
388
|
}, mn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, un = (e, t, n) => {
|
|
@@ -396,16 +396,16 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
396
396
|
return !!((a = n.slot) != null && a.startDate) && ae(new Date(n.slot.startDate), e);
|
|
397
397
|
}), Dn = () => {
|
|
398
398
|
var we;
|
|
399
|
-
const { appointmentFieldProps: e, appointmentState: t, setAppointmentState: n } = Re(), { language: a, isEditor: r, isComposer: s } = Ee(), { t: l } = dt(), { actions: i } = ge(), c = Ze(), [D, u] = Q(!1), [S, E] = Q(!1), [d, b] = Q(), [
|
|
399
|
+
const { appointmentFieldProps: e, appointmentState: t, setAppointmentState: n } = Re(), { language: a, isEditor: r, isComposer: s } = Ee(), { t: l } = dt(), { actions: i } = ge(), c = Ze(), [D, u] = Q(!1), [S, E] = Q(!1), [d, b] = Q(), [M, A] = Q();
|
|
400
400
|
Xt({
|
|
401
401
|
setIsReloadingSlots: u
|
|
402
402
|
});
|
|
403
|
-
const { onChange: I, value: O, target: U, initialData: z, formatDescription:
|
|
403
|
+
const { onChange: I, value: O, target: U, initialData: z, formatDescription: H, locationType: Y, error: oe } = e, { availabilityDates: $, availabilitySlots: F, timezone: _ = "", selectedDate: N, currentSlotBulkSize: R, dataStatus: G, error: Z } = t, K = (we = z == null ? void 0 : z.service) == null ? void 0 : we.id, V = G === W.LOADING, ee = D || S, _e = !!Z, Me = ln({
|
|
404
404
|
error: oe,
|
|
405
405
|
selectedSlot: O
|
|
406
|
-
}), y = B(() => en(
|
|
407
|
-
|
|
408
|
-
|
|
406
|
+
}), y = B(() => en(F, Me), [
|
|
407
|
+
F,
|
|
408
|
+
Me
|
|
409
409
|
]);
|
|
410
410
|
P(() => {
|
|
411
411
|
I == null || I(jt(O));
|
|
@@ -415,8 +415,8 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
415
415
|
_
|
|
416
416
|
]), Dt((f) => {
|
|
417
417
|
const L = f == null ? void 0 : f[U];
|
|
418
|
-
|
|
419
|
-
availabilitySlots:
|
|
418
|
+
F != null && F.length && n({
|
|
419
|
+
availabilitySlots: F.filter((T) => {
|
|
420
420
|
var k;
|
|
421
421
|
return ((k = T == null ? void 0 : T.slot) == null ? void 0 : k.startDate) !== (L == null ? void 0 : L.startDate);
|
|
422
422
|
})
|
|
@@ -435,14 +435,14 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
435
435
|
]);
|
|
436
436
|
const Ne = B(() => ct(a), [
|
|
437
437
|
a
|
|
438
|
-
]),
|
|
438
|
+
]), Fe = X(N);
|
|
439
439
|
P(() => {
|
|
440
|
-
const f =
|
|
441
|
-
|
|
440
|
+
const f = Fe.current;
|
|
441
|
+
Fe.current = N, !!N && (!f || !ae(f, N)) && b(void 0);
|
|
442
442
|
}, [
|
|
443
443
|
N
|
|
444
444
|
]);
|
|
445
|
-
const h = B(() => d ??
|
|
445
|
+
const h = B(() => d ?? He(N ?? /* @__PURE__ */ new Date(), Ne), [
|
|
446
446
|
d,
|
|
447
447
|
N,
|
|
448
448
|
Ne
|
|
@@ -459,17 +459,17 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
459
459
|
return Array.from({
|
|
460
460
|
length: j
|
|
461
461
|
}, (se, Oe) => {
|
|
462
|
-
const
|
|
462
|
+
const x = te(h, Oe), Le = !!N && ae(x, N), rt = be(x) < f;
|
|
463
463
|
return {
|
|
464
|
-
key: mn(
|
|
465
|
-
date:
|
|
464
|
+
key: mn(x),
|
|
465
|
+
date: x,
|
|
466
466
|
isSelected: Le,
|
|
467
|
-
isAvailable: !V && !ee && !Le && dn(
|
|
467
|
+
isAvailable: !V && !ee && !Le && dn(x, $),
|
|
468
468
|
isDisabled: rt || ee && !Le,
|
|
469
|
-
isToday: ae(
|
|
470
|
-
dayOfMonthLabel: T.format(
|
|
471
|
-
weekdayLabel: L.format(
|
|
472
|
-
label: k.format(
|
|
469
|
+
isToday: ae(x, f),
|
|
470
|
+
dayOfMonthLabel: T.format(x),
|
|
471
|
+
weekdayLabel: L.format(x),
|
|
472
|
+
label: k.format(x),
|
|
473
473
|
availabilityLabel: l("form.appointment.accessibility.calendar.has-availability.aria-label")
|
|
474
474
|
};
|
|
475
475
|
});
|
|
@@ -511,7 +511,7 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
511
511
|
a,
|
|
512
512
|
_,
|
|
513
513
|
pe
|
|
514
|
-
]), ye = !D && !!(y != null && y.length) && (R || q) < y.length, Ie = h >
|
|
514
|
+
]), ye = !D && !!(y != null && y.length) && (R || q) < y.length, Ie = h > He(/* @__PURE__ */ new Date(), Ne), et = re(
|
|
515
515
|
async (f) => {
|
|
516
516
|
var L;
|
|
517
517
|
if (!(ee || N && ae(f, N))) {
|
|
@@ -668,12 +668,12 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
668
668
|
timezone: _,
|
|
669
669
|
language: a
|
|
670
670
|
})}` : "",
|
|
671
|
-
formatLabel:
|
|
671
|
+
formatLabel: Y === on.OS_LOCATION ? l("form.appointment.meeting-format.in-person-location-method-os-location") : H,
|
|
672
672
|
notificationMessage: st,
|
|
673
673
|
showMoreSlotsLabel: l("form.appointment.show-more-slots.text"),
|
|
674
674
|
previousWeekLabel: l("form.appointment.accessibility.calendar.previous-week.aria-label"),
|
|
675
675
|
nextWeekLabel: l("form.appointment.accessibility.calendar.next-week.aria-label"),
|
|
676
|
-
pendingFocusIndex:
|
|
676
|
+
pendingFocusIndex: M,
|
|
677
677
|
consumePendingFocusIndex: ot
|
|
678
678
|
};
|
|
679
679
|
}, je = Ke(void 0), Qe = (e) => `${e}-timezone-note`, Je = (e) => `${e}-date-title`, w = () => {
|
|
@@ -695,8 +695,8 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
695
695
|
return;
|
|
696
696
|
const [b] = [
|
|
697
697
|
...d
|
|
698
|
-
],
|
|
699
|
-
|
|
698
|
+
], M = n.find(({ key: A }) => A === b);
|
|
699
|
+
M && a(M.date);
|
|
700
700
|
};
|
|
701
701
|
return /* @__PURE__ */ o.createElement("div", {
|
|
702
702
|
className: t
|
|
@@ -774,18 +774,18 @@ C.PreviousWeek = fn;
|
|
|
774
774
|
C.Heading = Sn;
|
|
775
775
|
C.NextWeek = En;
|
|
776
776
|
C.Day = _n;
|
|
777
|
-
const
|
|
778
|
-
const { hasTimezoneNote: a, hasDateTitle: r } = n, { slots: s, selectedSlotKey: l, selectSlot: i, selectedDateLabel: c, isReloadingSlots: D, timezoneLabel: u, pendingFocusIndex: S, consumePendingFocusIndex: E } = w(), { id: d, disabled: b, readOnly:
|
|
777
|
+
const Ye = 'input[type="radio"]', fe = ({ children: e, className: t, ...n }) => {
|
|
778
|
+
const { hasTimezoneNote: a, hasDateTitle: r } = n, { slots: s, selectedSlotKey: l, selectSlot: i, selectedDateLabel: c, isReloadingSlots: D, timezoneLabel: u, pendingFocusIndex: S, consumePendingFocusIndex: E } = w(), { id: d, disabled: b, readOnly: M, required: A, hasError: I } = ie(), { inputId: O, labelId: U, ariaDescribedBy: z } = le(), H = X(null), Y = v(e, fe.Slot) ?? /* @__PURE__ */ o.createElement(fe.Slot, null), oe = !!r && !!c, $ = [
|
|
779
779
|
z,
|
|
780
780
|
a && u ? Qe(O) : void 0
|
|
781
|
-
].filter(Boolean).join(" ") || void 0,
|
|
781
|
+
].filter(Boolean).join(" ") || void 0, F = (_, N) => {
|
|
782
782
|
var R, G, Z;
|
|
783
|
-
(Z = (G = (R =
|
|
783
|
+
(Z = (G = (R = H.current) == null ? void 0 : R.querySelectorAll(Ye)) == null ? void 0 : G[_]) == null || Z.focus(N);
|
|
784
784
|
};
|
|
785
785
|
return ft(() => {
|
|
786
786
|
var G, Z;
|
|
787
|
-
if (!!((G =
|
|
788
|
-
|
|
787
|
+
if (!!((G = H.current) != null && G.querySelector(Ye))) {
|
|
788
|
+
F(0, {
|
|
789
789
|
preventScroll: !0
|
|
790
790
|
});
|
|
791
791
|
return;
|
|
@@ -795,32 +795,32 @@ const He = 'input[type="radio"]', fe = ({ children: e, className: t, ...n }) =>
|
|
|
795
795
|
preventScroll: !0
|
|
796
796
|
});
|
|
797
797
|
}, d), P(() => {
|
|
798
|
-
S !== void 0 && (
|
|
798
|
+
S !== void 0 && (F(S), E());
|
|
799
799
|
}, [
|
|
800
800
|
S,
|
|
801
801
|
s.length
|
|
802
802
|
]), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
|
|
803
803
|
role: "status",
|
|
804
804
|
style: Ge
|
|
805
|
-
}, s.length > 0 ? c : void 0), /* @__PURE__ */ o.createElement(
|
|
806
|
-
ref:
|
|
805
|
+
}, s.length > 0 ? c : void 0), /* @__PURE__ */ o.createElement(Mt, {
|
|
806
|
+
ref: H,
|
|
807
807
|
className: t,
|
|
808
808
|
value: l ?? null,
|
|
809
809
|
onChange: i,
|
|
810
810
|
isDisabled: b,
|
|
811
|
-
isReadOnly:
|
|
811
|
+
isReadOnly: M,
|
|
812
812
|
isRequired: A,
|
|
813
813
|
isInvalid: I,
|
|
814
814
|
"aria-labelledby": oe ? Je(O) : U,
|
|
815
815
|
"aria-describedby": $,
|
|
816
816
|
"data-refetch": D || void 0
|
|
817
|
-
}, s.map((_) => Se(
|
|
817
|
+
}, s.map((_) => Se(Y, {
|
|
818
818
|
key: _.key,
|
|
819
819
|
slot: _
|
|
820
820
|
}))));
|
|
821
821
|
}, Nn = ({ children: e, className: t, ...n }) => {
|
|
822
822
|
const { slot: a } = n;
|
|
823
|
-
return /* @__PURE__ */ o.createElement(
|
|
823
|
+
return /* @__PURE__ */ o.createElement(Ft, {
|
|
824
824
|
value: a.key,
|
|
825
825
|
"aria-label": a.timeRange
|
|
826
826
|
}, /* @__PURE__ */ o.createElement(wt, {
|
|
@@ -859,10 +859,10 @@ const m = ({ children: e, className: t }) => {
|
|
|
859
859
|
}, pn = {
|
|
860
860
|
visibility: "hidden"
|
|
861
861
|
}, An = ({ children: e, className: t }) => {
|
|
862
|
-
const { required: n, onFocus: a, onBlur: r } = ie(), { inputId: s, labelId: l, ariaDescribedBy: i } = le(), c = Dn(), D = v(e, m.Loader), u = v(e, m.Notification), S = v(e, m.Dates), E = v(e, m.Timezone), d = v(e, m.Format), b = v(e, m.DateTitle),
|
|
862
|
+
const { required: n, onFocus: a, onBlur: r } = ie(), { inputId: s, labelId: l, ariaDescribedBy: i } = le(), c = Dn(), D = v(e, m.Loader), u = v(e, m.Notification), S = v(e, m.Dates), E = v(e, m.Timezone), d = v(e, m.Format), b = v(e, m.DateTitle), M = v(e, m.Slots), A = v(e, m.ShowMoreSlots);
|
|
863
863
|
return /* @__PURE__ */ o.createElement(je.Provider, {
|
|
864
864
|
value: c
|
|
865
|
-
}, /* @__PURE__ */ o.createElement(
|
|
865
|
+
}, /* @__PURE__ */ o.createElement(xt, {
|
|
866
866
|
id: s,
|
|
867
867
|
className: t,
|
|
868
868
|
ariaLabelledBy: l,
|
|
@@ -872,7 +872,7 @@ const m = ({ children: e, className: t }) => {
|
|
|
872
872
|
onBlur: r
|
|
873
873
|
}, D, c.hasError ? u : /* @__PURE__ */ o.createElement("div", {
|
|
874
874
|
style: c.isLoading ? pn : void 0
|
|
875
|
-
}, S, E, d, b, Se(
|
|
875
|
+
}, S, E, d, b, Se(M, {
|
|
876
876
|
hasTimezoneNote: !!E,
|
|
877
877
|
hasDateTitle: !!b
|
|
878
878
|
}), u, A)));
|
|
@@ -926,7 +926,7 @@ const m = ({ children: e, className: t }) => {
|
|
|
926
926
|
label: r
|
|
927
927
|
}) : r) : null;
|
|
928
928
|
};
|
|
929
|
-
m.Label =
|
|
929
|
+
m.Label = Wt;
|
|
930
930
|
m.Loader = yn;
|
|
931
931
|
m.Notification = In;
|
|
932
932
|
m.Dates = C;
|
|
@@ -937,24 +937,24 @@ m.Slots = fe;
|
|
|
937
937
|
m.ShowMoreSlots = bn;
|
|
938
938
|
m.Description = ht;
|
|
939
939
|
m.Error = Ct;
|
|
940
|
-
const gn = "_appointment_14etx_1", vn = "_dates_14etx_5", Rn = "_weekHeading_14etx_30", kn = "_weekButton_14etx_36",
|
|
940
|
+
const gn = "_appointment_14etx_1", vn = "_dates_14etx_5", Rn = "_weekHeading_14etx_30", kn = "_weekButton_14etx_36", Mn = "_previousWeek_14etx_68", Fn = "_nextWeek_14etx_72", wn = "_day_14etx_84", hn = "_weekdayLabel_14etx_94", Cn = "_dayNumber_14etx_103", Wn = "_indicator_14etx_107", xn = "_hint_14etx_130", Bn = "_slots_14etx_143", Pn = "_dateTitle_14etx_157", Un = "_slot_14etx_143", zn = "_slotHover_14etx_199", Hn = "_slotSelected_14etx_207", Yn = "_showMoreSlots_14etx_261", Kn = "_loader_14etx_292", $n = "_notification_14etx_328", p = {
|
|
941
941
|
appointment: gn,
|
|
942
942
|
dates: vn,
|
|
943
943
|
weekHeading: Rn,
|
|
944
944
|
weekButton: kn,
|
|
945
|
-
previousWeek:
|
|
946
|
-
nextWeek:
|
|
945
|
+
previousWeek: Mn,
|
|
946
|
+
nextWeek: Fn,
|
|
947
947
|
day: wn,
|
|
948
948
|
weekdayLabel: hn,
|
|
949
949
|
dayNumber: Cn,
|
|
950
|
-
indicator:
|
|
951
|
-
hint:
|
|
950
|
+
indicator: Wn,
|
|
951
|
+
hint: xn,
|
|
952
952
|
slots: Bn,
|
|
953
953
|
dateTitle: Pn,
|
|
954
954
|
slot: Un,
|
|
955
955
|
slotHover: zn,
|
|
956
|
-
slotSelected:
|
|
957
|
-
showMoreSlots:
|
|
956
|
+
slotSelected: Hn,
|
|
957
|
+
showMoreSlots: Yn,
|
|
958
958
|
loader: Kn,
|
|
959
959
|
notification: $n
|
|
960
960
|
}, Gn = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(it, {
|
|
@@ -994,9 +994,9 @@ const gn = "_appointment_14etx_1", vn = "_dates_14etx_5", Rn = "_weekHeading_14e
|
|
|
994
994
|
}, t.dayOfMonthLabel, /* @__PURE__ */ o.createElement("span", {
|
|
995
995
|
className: p.indicator
|
|
996
996
|
}))))), /* @__PURE__ */ o.createElement(m.Timezone, {
|
|
997
|
-
className: g(
|
|
997
|
+
className: g(We, p.hint)
|
|
998
998
|
}), /* @__PURE__ */ o.createElement(m.Format, {
|
|
999
|
-
className: g(
|
|
999
|
+
className: g(We, p.hint)
|
|
1000
1000
|
}), /* @__PURE__ */ o.createElement(m.DateTitle, {
|
|
1001
1001
|
className: g(yt, p.dateTitle)
|
|
1002
1002
|
}), /* @__PURE__ */ o.createElement(m.Slots, {
|
package/dist/component/{bookings-login-bar-rac-DgNP-YNZ.js → bookings-login-bar-rac-BVdWmKS8.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o from "react";
|
|
2
2
|
import E from "classnames";
|
|
3
|
-
import {
|
|
3
|
+
import { bK as d, bU as b, bC as f, bG as x, W as p } from "./form-BsiK682r.js";
|
|
4
4
|
import { Button as L } from "react-aria-components";
|
|
5
5
|
import { a as m, f as g } from "./find-child-C60k4CxG.js";
|
|
6
6
|
const l = ({ children: n }) => {
|
|
@@ -67,7 +67,7 @@ const T = "_container_1ixk2_1", C = "_text_1ixk2_34", k = "_button_1ixk2_39", u
|
|
|
67
67
|
}), /* @__PURE__ */ o.createElement(l.Button, {
|
|
68
68
|
className: u.button
|
|
69
69
|
})));
|
|
70
|
-
},
|
|
70
|
+
}, h = () => /* @__PURE__ */ o.createElement(A, null);
|
|
71
71
|
export {
|
|
72
|
-
|
|
72
|
+
h as BookingsLoginBarRAC
|
|
73
73
|
};
|