@wix/form-elements 1.187.0 → 1.188.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-DiGTD4hn.js → appointment-rac-Biwj0bKe.js} +78 -78
- package/dist/component/{bookings-address-rac-Bczo07PP.js → bookings-address-rac-B_o25LOI.js} +1 -1
- package/dist/component/{bookings-email-rac-D0cw7HFH.js → bookings-email-rac-BBcusxbS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DqxVpKqV.js → bookings-first-name-rac-CNTGannm.js} +1 -1
- package/dist/component/{bookings-header-rac-BxlD5Wje.js → bookings-header-rac-BTvG2vnk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CraNB_ut.js → bookings-last-name-rac-BQumGsz9.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BMGnVYXE.js → bookings-login-bar-rac-Cl_rwWhO.js} +8 -8
- package/dist/component/{bookings-phone-rac-CnSlSyLi.js → bookings-phone-rac-B_gXe9Fa.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CWWvRRRi.js → bookings-rich-text-rac-CbMuPVCB.js} +1 -1
- package/dist/component/{checkbox-field-rac-C2LLGbbS.js → checkbox-field-rac-QwFSqEgs.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-B2hKVuJD.js → checkbox-group-field-headless-CTDMO0TM.js} +38 -38
- package/dist/component/{checkbox-group-field-rac-Bqo7LRpI.js → checkbox-group-field-rac-DFUST9Th.js} +4 -4
- package/dist/component/{checkbox-group-rac-CHAnQW7L.js → checkbox-group-rac-CBAE-o1Q.js} +1 -1
- package/dist/component/{checkbox-rac-D09xnf-F.js → checkbox-rac-DkYPhGTU.js} +1 -1
- package/dist/component/{contacts-address-rac-CY_ff8gq.js → contacts-address-rac-DKf42iJk.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BkPpyiCP.js → contacts-birthdate-rac-ffPSb2YW.js} +1 -1
- package/dist/component/{contacts-company-rac-2I05yC97.js → contacts-company-rac-DLVdNbYz.js} +1 -1
- package/dist/component/{contacts-email-rac-B5vwkBUk.js → contacts-email-rac-CW8SdcYX.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVxn7EaP.js → contacts-first-name-rac-CGdzgpkw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DIu7T_QU.js → contacts-last-name-rac-DNQj7UcW.js} +1 -1
- package/dist/component/{contacts-phone-rac-B_9KO997.js → contacts-phone-rac-zAMIceti.js} +1 -1
- package/dist/component/{contacts-position-rac-Dll7FDN5.js → contacts-position-rac-DLwn9B2T.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DvZ0S_7T.js → contacts-subscribe-rac-Cy5rxTkC.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BmYWQGbm.js → contacts-tax-id-rac-CEfU6N6C.js} +1 -1
- package/dist/component/{date-availability-C2IYlnG_.js → date-availability-C9EOQUiy.js} +1 -1
- package/dist/component/{date-input-field-rac-TwaBKY7l.js → date-input-field-rac-F4QQeEtO.js} +57 -57
- package/dist/component/{date-input-rac-CusCOLnm.js → date-input-rac-CJeOgyF5.js} +1 -1
- package/dist/component/{date-picker-field-rac-ufxxlmpA.js → date-picker-field-rac-33ARKAxQ.js} +35 -35
- package/dist/component/{date-picker-rac-IGr_hLjg.js → date-picker-rac-Beaqh84V.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B6ZQo4Tk.js → date-time-input-field-rac-CB8FfYUM.js} +44 -44
- package/dist/component/{date-time-input-rac-X1GCfhSl.js → date-time-input-rac-DQ9P6IVp.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D9UmRqnt.js → dext-checkbox-group-rac-Cho-hueW.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DrMbQCX3.js → dext-checkbox-rac-BIwIwy-y.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Barwg8La.js → dext-date-picker-rac-C03HJdvX.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-ChIUfDk4.js → dext-date-time-input-rac-Bo4XfnRA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BCrEGvfc.js → dext-dropdown-rac-CadT1tMH.js} +1 -1
- package/dist/component/{dext-email-rac-D7l9fah1.js → dext-email-rac-DbiEws8H.js} +1 -1
- package/dist/component/{dext-number-input-rac-CrI6ChK9.js → dext-number-input-rac-XoW8CLvX.js} +1 -1
- package/dist/component/{dext-phone-rac-B_ObVduc.js → dext-phone-rac-9rFyUD8e.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DOBaXXjq.js → dext-radio-group-rac-U6BNL7IT.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D4LxflR7.js → dext-rating-input-rac-BDGUv8jU.js} +1 -1
- package/dist/component/{dext-tags-rac-nTSiW-H7.js → dext-tags-rac-CAFGVcIi.js} +2 -2
- package/dist/component/{dext-text-area-rac-DYV_gO7a.js → dext-text-area-rac-DXyzm9oe.js} +1 -1
- package/dist/component/{dext-text-input-rac-Zjq6PsXg.js → dext-text-input-rac-C27gdfyG.js} +1 -1
- package/dist/component/{dext-url-input-rac-BM7jm0Tn.js → dext-url-input-rac-DovYH3_G.js} +1 -1
- package/dist/component/{donation-rac-CGjEtI7s.js → donation-rac-DV2aRsDt.js} +60 -60
- package/dist/component/{dropdown-field-rac-c-Owb2hL.js → dropdown-field-rac-D58C7YZG.js} +3 -3
- package/dist/component/{dropdown-rac-Bp9hWnJS.js → dropdown-rac-57yZf_yZ.js} +1 -1
- package/dist/component/{ecom-address-rac-C1YRffNH.js → ecom-address-rac-Co3WhA7m.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5uCvEqP.js → ecom-subscription-checkbox-rac-CYjsuRA9.js} +2 -2
- package/dist/component/{email-input-field-rac-BDQYfj6b.js → email-input-field-rac-C5G3pVkR.js} +14 -14
- package/dist/component/{events-repeater-rac-DoZBb6e0.js → events-repeater-rac-D5PXSDIH.js} +72 -70
- package/dist/component/{events-rsvp-rac-OyYogsL5.js → events-rsvp-rac-BfyQNZh6.js} +3 -3
- package/dist/component/{field-error-headless-B41KJxbD.js → field-error-headless-RTyrenpC.js} +8 -8
- package/dist/component/{field-label-headless-DHt_Wm_S.js → field-label-headless-Bd00Hl2z.js} +4 -4
- package/dist/component/{file-upload-rac-Bed5vOYu.js → file-upload-rac-D5pTnsHO.js} +61 -61
- package/dist/component/{fixed-payment-rac-_HtF4gSw.js → fixed-payment-rac-ByxSjPu5.js} +9 -9
- package/dist/component/{form-DAUDnpk6.js → form-BG5UjjLA.js} +3276 -3217
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BwlXDMt4.js → header-field-rac-Bql6VoAi.js} +2 -2
- package/dist/component/{header-rac-CdFpA8bi.js → header-rac-DWAIn4eY.js} +1 -1
- package/dist/component/{image-choice-rac-Bfs7ixsZ.js → image-choice-rac-D5dSQ4Xd.js} +11 -11
- package/dist/component/{index-B5HfcvO_.js → index-37eV-JEp.js} +5 -5
- package/dist/component/{index-BQctPc9k.js → index-DlcCtz4h.js} +4 -4
- package/dist/component/{isObjectLike-CKRIZUUL.js → isObjectLike-ClPDcTiq.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Gs6BGlnz.js → multiline-address-field-rac-CpvwzmpC.js} +345 -345
- package/dist/component/{multiline-address-rac-6tsDZK20.js → multiline-address-rac-ENim2Bn6.js} +1 -1
- package/dist/component/{number-input-field-rac-D2vzcEDT.js → number-input-field-rac-DTRnmRDk.js} +21 -21
- package/dist/component/{number-input-rac-DJA2sjJ2.js → number-input-rac-QROlEpkx.js} +1 -1
- package/dist/component/{password-rac-DS9j5AEn.js → password-rac-jMoyzIP2.js} +47 -47
- package/dist/component/{payment-input-rac-t15HwuyR.js → payment-input-rac-DOOV4P4b.js} +31 -31
- package/dist/component/{phone-input-field-rac-DCEMaJjP.js → phone-input-field-rac-BA_mTcND.js} +47 -47
- package/dist/component/{phone-rac-R2KIpq9Y.js → phone-rac-DXcbIqHK.js} +1 -1
- package/dist/component/{product-list-rac-BCaz8EbJ.js → product-list-rac-CsxR7Ut6.js} +63 -63
- package/dist/component/{quiz-radio-group-rac-Czjt8SZW.js → quiz-radio-group-rac-IQgqvqjs.js} +1 -1
- package/dist/component/{radio-button-module-classes-B2cY0daS.js → radio-button-module-classes-DIFYfYiH.js} +36 -36
- package/dist/component/{radio-group-field-rac-BdCqn6Uq.js → radio-group-field-rac-Ca2RlxOl.js} +4 -4
- package/dist/component/{radio-group-rac-CdKWOA6d.js → radio-group-rac-DDervEEb.js} +1 -1
- package/dist/component/{rating-input-field-rac-qllcIC5u.js → rating-input-field-rac-0kyPo9cU.js} +12 -12
- package/dist/component/{rating-input-rac-Cno0IibX.js → rating-input-rac-DqPsqUKR.js} +1 -1
- package/dist/component/{rich-content-rac.module-Bj8zO5BD.js → rich-content-rac.module-2T_-7jvb.js} +5 -5
- package/dist/component/{rich-text-field-rac-CJOPMgvk.js → rich-text-field-rac-W-eKzhuC.js} +4 -4
- package/dist/component/{rich-text-rac-qJLSQUfk.js → rich-text-rac-CzJfbAyx.js} +1 -1
- package/dist/component/{service-dropdown-rac-CrrqMt0I.js → service-dropdown-rac-BMJy2pZ5.js} +25 -25
- package/dist/component/{services-multi-choice-rac-DHpIgQT8.js → services-multi-choice-rac-BBAWlI7U.js} +7 -7
- package/dist/component/{signature-rac-vHDz7aO9.js → signature-rac-Y1GLswrp.js} +22 -22
- package/dist/component/{submit-button-rac-CdSXP5MY.js → submit-button-rac-CSKbrgQ3.js} +17 -17
- package/dist/component/{tags-field-rac-BE5q3Yzp.js → tags-field-rac-D3zOYcC5.js} +19 -19
- package/dist/component/{tags-rac-DPH9Jekq.js → tags-rac-Cs77Abgs.js} +1 -1
- package/dist/component/text-area-field-rac-DZZW7rAX.js +74 -0
- package/dist/component/{text-area-rac-BWI_FwJ_.js → text-area-rac-BRPp0HnX.js} +1 -1
- package/dist/component/{text-input-field-rac-SljlZsKs.js → text-input-field-rac-tPDZmLdU.js} +3 -3
- package/dist/component/text-input-headless-tkwEZWs7.js +47 -0
- package/dist/component/{text-input-rac-OP8CxA5d.js → text-input-rac-DnHt4vkM.js} +1 -1
- package/dist/component/{time-input-rac-Dc0pojpK.js → time-input-rac-Dbg4Nqb5.js} +18 -18
- package/dist/component/url-input-field-rac-3ODFXFRP.js +77 -0
- package/dist/component/{url-input-rac-DW245AQ3.js → url-input-rac-CPb5o8Of.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CohYBaie.js → use-dropdown-option-class-name-Dd4ncVaY.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-CcyW9dW5.js → use-dropdown-trigger-class-name-zVniRqM7.js} +29 -29
- package/dist/component/{use-element-state-class-name-ByWbyT81.js → use-element-state-class-name-C8jFeDrq.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-CmYpz2Os.js → use-hoverable-input-class-name-B9diy0Mr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-D4-XPkUN.js → use-is-forced-open-dropdown-BR1U1l5w.js} +6 -6
- package/dist/component/{use-service-options-base-DGHhZKVh.js → use-service-options-base-yM4rJlq1.js} +3 -3
- package/dist/component/use-text-input-class-name-D6AnBbJx.js +6 -0
- package/package.json +2 -2
- package/dist/component/text-area-field-rac-CUSpvF_P.js +0 -74
- package/dist/component/text-input-headless-BWFcuwI4.js +0 -47
- package/dist/component/url-input-field-rac-CcUeuaJX.js +0 -77
- package/dist/component/use-text-input-class-name-VJ-nzeqS.js +0 -6
|
@@ -6,12 +6,12 @@ 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-DcyJyi2B.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 { bE as Ee, bD as mt, bI as ge, bG as ut, bX as dt, bW as Dt, bM as ie, bJ as le, bO as ft, bL as Et, F as St, h as _t, X as Nt, am 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-BG5UjjLA.js";
|
|
10
|
+
import { u as vt } from "./use-element-state-class-name-C8jFeDrq.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 Wt } from "./field-label-headless-
|
|
13
|
+
import { D as ht, E as Ct } from "./field-error-headless-RTyrenpC.js";
|
|
14
|
+
import { L as Wt } from "./field-label-headless-Bd00Hl2z.js";
|
|
15
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";
|
|
@@ -45,7 +45,7 @@ const Pt = (e) => {
|
|
|
45
45
|
staffMemberIds: e == null ? void 0 : e.staffMemberIds,
|
|
46
46
|
isOfferedAsPricingPlan: !1
|
|
47
47
|
});
|
|
48
|
-
},
|
|
48
|
+
}, Ze = (e) => {
|
|
49
49
|
var l;
|
|
50
50
|
const { appointmentFieldProps: t } = Re(), { isEditor: n, isComposer: a } = Ee(), r = mt(), s = e || ((l = t == null ? void 0 : t.initialData) == null ? void 0 : l.service);
|
|
51
51
|
if (!(n || a))
|
|
@@ -83,12 +83,12 @@ const zt = (e) => {
|
|
|
83
83
|
type: De.GENERAL,
|
|
84
84
|
message: "Service ID is missing"
|
|
85
85
|
};
|
|
86
|
-
},
|
|
86
|
+
}, Yt = ({ 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
|
-
timezone:
|
|
91
|
+
timezone: Ve(),
|
|
92
92
|
dataStatus: W.DONE
|
|
93
93
|
};
|
|
94
94
|
{
|
|
@@ -103,7 +103,7 @@ const zt = (e) => {
|
|
|
103
103
|
...r,
|
|
104
104
|
dataStatus: W.LOADING
|
|
105
105
|
};
|
|
106
|
-
},
|
|
106
|
+
}, Ht = (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", {
|
|
@@ -115,7 +115,7 @@ const zt = (e) => {
|
|
|
115
115
|
startDate: r,
|
|
116
116
|
endDate: s
|
|
117
117
|
};
|
|
118
|
-
},
|
|
118
|
+
}, Ve = () => Intl.DateTimeFormat().resolvedOptions().timeZone, Kt = (e) => {
|
|
119
119
|
var t, n, a;
|
|
120
120
|
if ((n = (t = e == null ? void 0 : e[0]) == null ? void 0 : t.slot) != null && n.startDate)
|
|
121
121
|
return new Date((a = e[0].slot) == null ? void 0 : a.startDate);
|
|
@@ -159,27 +159,27 @@ function Gt(e) {
|
|
|
159
159
|
var d;
|
|
160
160
|
const { initialData: t, onChange: n, value: a } = e, { isEditor: r, isComposer: s } = Ee(), l = (d = t == null ? void 0 : t.service) == null ? void 0 : d.id, { actions: i } = ge(), c = J(i);
|
|
161
161
|
c.current = i;
|
|
162
|
-
const D = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [u, S] = Q(null), E =
|
|
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, Y;
|
|
166
|
+
const M = Ve(), A = {
|
|
167
167
|
currentSlotBulkSize: q,
|
|
168
|
-
timezone:
|
|
168
|
+
timezone: M,
|
|
169
169
|
dataStatus: W.LOADING
|
|
170
170
|
};
|
|
171
171
|
try {
|
|
172
|
-
const
|
|
172
|
+
const H = async (oe) => {
|
|
173
173
|
var _, N;
|
|
174
|
-
const { startDate: $, endDate:
|
|
174
|
+
const { startDate: $, endDate: F } = Ht(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 H(2), (I = A.availabilityDates) != null && I.length || (A.availabilityDates = await H(6)), !((O = A.availabilityDates) != null && O.length)) {
|
|
183
183
|
E == null || E.report({
|
|
184
184
|
action: ne.LOAD,
|
|
185
185
|
component: X.NO_AVAILABILITY_AT_ALL
|
|
@@ -194,17 +194,17 @@ 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: (Y = A.availabilityDates) != null && Y.length ? X.FORM : X.NO_AVAILABILITY_FOR_DATE
|
|
202
202
|
}), a != null && a.startDate || n(void 0), S({
|
|
203
203
|
...A,
|
|
204
204
|
dataStatus: W.DONE
|
|
205
205
|
});
|
|
206
|
-
} catch (
|
|
207
|
-
console.error(
|
|
206
|
+
} catch (H) {
|
|
207
|
+
console.error(H), S({
|
|
208
208
|
dataStatus: W.ERROR,
|
|
209
209
|
error: {
|
|
210
210
|
type: De.GENERAL,
|
|
@@ -224,15 +224,15 @@ const qe = /* @__PURE__ */ Ke({
|
|
|
224
224
|
appointmentState: {},
|
|
225
225
|
setAppointmentState: () => {
|
|
226
226
|
}
|
|
227
|
-
}),
|
|
227
|
+
}), Zt = {
|
|
228
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(() => Yt({
|
|
236
236
|
appointmentFieldProps: e,
|
|
237
237
|
isEditor: n,
|
|
238
238
|
isComposer: a
|
|
@@ -247,7 +247,7 @@ const qe = /* @__PURE__ */ Ke({
|
|
|
247
247
|
]), /* @__PURE__ */ o.createElement(qe.Provider, {
|
|
248
248
|
value: {
|
|
249
249
|
appointmentFieldProps: e,
|
|
250
|
-
appointmentState: r ?
|
|
250
|
+
appointmentState: r ? Zt : s,
|
|
251
251
|
setAppointmentState: (D) => l({
|
|
252
252
|
...s,
|
|
253
253
|
...D
|
|
@@ -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
|
+
}, Ye = (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 =
|
|
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
|
Jt({
|
|
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: Y, locationType: H, 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 = J(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 ?? Ye(N ?? /* @__PURE__ */ new Date(), Ne), [
|
|
446
446
|
d,
|
|
447
447
|
N,
|
|
448
448
|
Ne
|
|
@@ -464,7 +464,7 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
464
464
|
key: mn(x),
|
|
465
465
|
date: x,
|
|
466
466
|
isSelected: Le,
|
|
467
|
-
isAvailable: !
|
|
467
|
+
isAvailable: !V && !ee && !Le && dn(x, $),
|
|
468
468
|
isDisabled: rt || ee && !Le,
|
|
469
469
|
isToday: ae(x, f),
|
|
470
470
|
dayOfMonthLabel: T.format(x),
|
|
@@ -477,11 +477,11 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
477
477
|
h,
|
|
478
478
|
N,
|
|
479
479
|
$,
|
|
480
|
-
|
|
480
|
+
V,
|
|
481
481
|
ee,
|
|
482
482
|
a,
|
|
483
483
|
l
|
|
484
|
-
]), pe = de(O ?? void 0) || void 0, Ae = B(() =>
|
|
484
|
+
]), pe = de(O ?? void 0) || void 0, Ae = B(() => V || D ? [] : (y ?? []).slice(0, R).flatMap((f) => {
|
|
485
485
|
const { startDate: L, endDate: T } = f.slot ?? {};
|
|
486
486
|
if (!L || !T)
|
|
487
487
|
return [];
|
|
@@ -506,12 +506,12 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
506
506
|
}), [
|
|
507
507
|
y,
|
|
508
508
|
R,
|
|
509
|
-
|
|
509
|
+
V,
|
|
510
510
|
D,
|
|
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 > Ye(/* @__PURE__ */ new Date(), Ne), et = re(
|
|
515
515
|
async (f) => {
|
|
516
516
|
var L;
|
|
517
517
|
if (!(ee || N && ae(f, N))) {
|
|
@@ -631,11 +631,11 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
631
631
|
]), ot = re(() => A(void 0), []), st = B(() => {
|
|
632
632
|
if (_e)
|
|
633
633
|
return l("form.appointment.empty-state.notification.text");
|
|
634
|
-
if (!
|
|
634
|
+
if (!V && !D && !(y != null && y.length))
|
|
635
635
|
return l("form.appointment.slots-not-found.text");
|
|
636
636
|
}, [
|
|
637
637
|
_e,
|
|
638
|
-
|
|
638
|
+
V,
|
|
639
639
|
D,
|
|
640
640
|
y == null ? void 0 : y.length,
|
|
641
641
|
l
|
|
@@ -651,7 +651,7 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
651
651
|
canGoToPreviousWeek: Ie,
|
|
652
652
|
hasMoreSlots: ye,
|
|
653
653
|
hasError: _e,
|
|
654
|
-
isLoading:
|
|
654
|
+
isLoading: V,
|
|
655
655
|
isRefetching: ee,
|
|
656
656
|
isReloadingSlots: D,
|
|
657
657
|
weekRangeLabel: un(h, te(h, j - 1), a),
|
|
@@ -668,12 +668,12 @@ const sn = "SLOT_UNAVAILABLE", rn = (e) => {
|
|
|
668
668
|
timezone: _,
|
|
669
669
|
language: a
|
|
670
670
|
})}` : "",
|
|
671
|
-
formatLabel:
|
|
671
|
+
formatLabel: H === on.OS_LOCATION ? l("form.appointment.meeting-format.in-person-location-method-os-location") : Y,
|
|
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`, Xe = (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,53 +774,53 @@ 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 He = '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(), Y = J(null), H = 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,
|
|
782
|
-
var R, G,
|
|
783
|
-
(
|
|
781
|
+
].filter(Boolean).join(" ") || void 0, F = (_, N) => {
|
|
782
|
+
var R, G, Z;
|
|
783
|
+
(Z = (G = (R = Y.current) == null ? void 0 : R.querySelectorAll(He)) == null ? void 0 : G[_]) == null || Z.focus(N);
|
|
784
784
|
};
|
|
785
785
|
return ft(() => {
|
|
786
|
-
var G,
|
|
787
|
-
if (!!((G =
|
|
788
|
-
|
|
786
|
+
var G, Z;
|
|
787
|
+
if (!!((G = Y.current) != null && G.querySelector(He))) {
|
|
788
|
+
F(0, {
|
|
789
789
|
preventScroll: !0
|
|
790
790
|
});
|
|
791
791
|
return;
|
|
792
792
|
}
|
|
793
|
-
const N = Array.from(((
|
|
793
|
+
const N = Array.from(((Z = document.getElementById(O)) == null ? void 0 : Z.querySelectorAll('[role="option"]')) ?? []), R = N.find((K) => K.getAttribute("aria-selected") === "true") ?? N.find((K) => K.getAttribute("aria-disabled") !== "true");
|
|
794
794
|
R == null || R.focus({
|
|
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: Y,
|
|
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 ? Xe(O) : U,
|
|
815
815
|
"aria-describedby": $,
|
|
816
816
|
"data-refetch": D || void 0
|
|
817
|
-
}, s.map((_) => Se(
|
|
817
|
+
}, s.map((_) => Se(H, {
|
|
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, {
|
|
@@ -849,7 +849,7 @@ const m = ({ children: e, className: t }) => {
|
|
|
849
849
|
renderLabel: () => Se(u, {
|
|
850
850
|
as: "div"
|
|
851
851
|
}),
|
|
852
|
-
renderInput: () => /* @__PURE__ */ o.createElement(
|
|
852
|
+
renderInput: () => /* @__PURE__ */ o.createElement(Vt, {
|
|
853
853
|
appointmentFieldProps: D
|
|
854
854
|
}, /* @__PURE__ */ o.createElement(An, {
|
|
855
855
|
className: t
|
|
@@ -859,7 +859,7 @@ 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
865
|
}, /* @__PURE__ */ o.createElement(xt, {
|
|
@@ -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)));
|
|
@@ -937,13 +937,13 @@ 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", Yn = "_slotSelected_14etx_207", Hn = "_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,
|
|
@@ -953,21 +953,21 @@ const gn = "_appointment_14etx_1", vn = "_dates_14etx_5", Rn = "_weekHeading_14e
|
|
|
953
953
|
dateTitle: Pn,
|
|
954
954
|
slot: Un,
|
|
955
955
|
slotHover: zn,
|
|
956
|
-
slotSelected:
|
|
957
|
-
showMoreSlots:
|
|
956
|
+
slotSelected: Yn,
|
|
957
|
+
showMoreSlots: Hn,
|
|
958
958
|
loader: Kn,
|
|
959
959
|
notification: $n
|
|
960
960
|
}, Gn = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(it, {
|
|
961
961
|
content: e,
|
|
962
962
|
locale: t
|
|
963
|
-
}),
|
|
963
|
+
}), Zn = {
|
|
964
964
|
base: p.slot,
|
|
965
965
|
selected: p.slotSelected,
|
|
966
966
|
hover: p.slotHover
|
|
967
|
-
},
|
|
967
|
+
}, Vn = () => {
|
|
968
968
|
const e = vt({
|
|
969
969
|
globalClasses: gt,
|
|
970
|
-
moduleClasses:
|
|
970
|
+
moduleClasses: Zn
|
|
971
971
|
});
|
|
972
972
|
return /* @__PURE__ */ o.createElement(m, {
|
|
973
973
|
className: g(_t, p.appointment)
|
|
@@ -1015,7 +1015,7 @@ const gn = "_appointment_14etx_1", vn = "_dates_14etx_5", Rn = "_weekHeading_14e
|
|
|
1015
1015
|
}, /* @__PURE__ */ o.createElement(lt, null), /* @__PURE__ */ o.createElement(m.Error.Text, null)), /* @__PURE__ */ o.createElement(m.Description, {
|
|
1016
1016
|
className: g(bt, ue.description)
|
|
1017
1017
|
}, Gn));
|
|
1018
|
-
}, da = () => /* @__PURE__ */ o.createElement(
|
|
1018
|
+
}, da = () => /* @__PURE__ */ o.createElement(Vn, null);
|
|
1019
1019
|
export {
|
|
1020
1020
|
da as AppointmentRAC
|
|
1021
1021
|
};
|
package/dist/component/{bookings-login-bar-rac-BMGnVYXE.js → bookings-login-bar-rac-Cl_rwWhO.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "react";
|
|
2
2
|
import E from "classnames";
|
|
3
|
-
import {
|
|
4
|
-
import { Button as
|
|
3
|
+
import { bM as d, bX as b, bE as f, bI as x, W as p } from "./form-BG5UjjLA.js";
|
|
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 }) => {
|
|
7
7
|
const { id: r, FieldLayout: t } = d();
|
|
@@ -36,7 +36,7 @@ const l = ({ children: n }) => {
|
|
|
36
36
|
}, c, !a && t);
|
|
37
37
|
}, F = ({ className: n, ...r }) => {
|
|
38
38
|
const { t } = b(), { isLoggedIn: e, login: a, logout: s } = r, c = t(e ? "form.login-bar.action.logout" : "form.login-bar.actions.login"), i = () => e ? s == null ? void 0 : s() : a == null ? void 0 : a();
|
|
39
|
-
return /* @__PURE__ */ o.createElement(
|
|
39
|
+
return /* @__PURE__ */ o.createElement(L, {
|
|
40
40
|
className: n,
|
|
41
41
|
onPress: i
|
|
42
42
|
}, c);
|
|
@@ -44,11 +44,11 @@ const l = ({ children: n }) => {
|
|
|
44
44
|
l.LoginBar = _;
|
|
45
45
|
l.Text = N;
|
|
46
46
|
l.Button = F;
|
|
47
|
-
const T = "_container_1ixk2_1", C = "_text_1ixk2_34",
|
|
47
|
+
const T = "_container_1ixk2_1", C = "_text_1ixk2_34", I = "_button_1ixk2_39", u = {
|
|
48
48
|
container: T,
|
|
49
49
|
text: C,
|
|
50
|
-
button:
|
|
51
|
-
},
|
|
50
|
+
button: I
|
|
51
|
+
}, k = () => {
|
|
52
52
|
const { userData: n, language: r } = f(), { actions: t } = x();
|
|
53
53
|
return /* @__PURE__ */ o.createElement(l, null, /* @__PURE__ */ o.createElement(l.LoginBar, {
|
|
54
54
|
email: n == null ? void 0 : n.email,
|
|
@@ -61,13 +61,13 @@ const T = "_container_1ixk2_1", C = "_text_1ixk2_34", k = "_button_1ixk2_39", u
|
|
|
61
61
|
var e;
|
|
62
62
|
return (e = t == null ? void 0 : t.requestLogout) == null ? void 0 : e.call(t);
|
|
63
63
|
},
|
|
64
|
-
className: E(
|
|
64
|
+
className: E(p, u.container)
|
|
65
65
|
}, /* @__PURE__ */ o.createElement(l.Text, {
|
|
66
66
|
className: u.text
|
|
67
67
|
}), /* @__PURE__ */ o.createElement(l.Button, {
|
|
68
68
|
className: u.button
|
|
69
69
|
})));
|
|
70
|
-
}, h = () => /* @__PURE__ */ o.createElement(
|
|
70
|
+
}, h = () => /* @__PURE__ */ o.createElement(k, null);
|
|
71
71
|
export {
|
|
72
72
|
h as BookingsLoginBarRAC
|
|
73
73
|
};
|