@wix/form-elements 1.83.0 → 1.85.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-ky2cE6hE.js → appointment-rac-CCaJ6P5r.js} +78 -78
- package/dist/component/{bookings-address-rac-Bxc6H9Pb.js → bookings-address-rac-DEt9SGPG.js} +1 -1
- package/dist/component/{bookings-email-rac-Dw1Xttdx.js → bookings-email-rac-BydOvOUZ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-dgHOrJaJ.js → bookings-first-name-rac-BoQki0Pb.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl9RYGWo.js → bookings-header-rac-DK-EcXrk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BeqYpbZq.js → bookings-last-name-rac-BuGIyd43.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C1k6o0A5.js → bookings-login-bar-rac-Cr500ehb.js} +6 -6
- package/dist/component/{bookings-phone-rac-ByhaJrwE.js → bookings-phone-rac-Bq2zdMxo.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Mw5-ZiIn.js → bookings-rich-text-rac-DRmfusX9.js} +1 -1
- package/dist/component/{checkbox-field-rac-CMEI5t4Y.js → checkbox-field-rac-b9mcZlMP.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-CP21R7_s.js → checkbox-group-field-headless-BSNhdCfs.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DGOZjSIY.js → checkbox-group-field-rac-BObfui8r.js} +6 -6
- package/dist/component/{checkbox-group-rac-CEGtshrl.js → checkbox-group-rac-CBNMgBHU.js} +1 -1
- package/dist/component/{checkbox-rac-DCnRh1WF.js → checkbox-rac-DXh-i6Ot.js} +1 -1
- package/dist/component/{contacts-address-rac-CZb_5N5o.js → contacts-address-rac-BDQLFakc.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DZlwSyp5.js → contacts-birthdate-rac-BUMVVVfb.js} +1 -1
- package/dist/component/{contacts-company-rac-BNEF6LjB.js → contacts-company-rac-CidGcaA3.js} +1 -1
- package/dist/component/{contacts-email-rac-CAgk_zfN.js → contacts-email-rac-GePAhKDQ.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DyTVcmrX.js → contacts-first-name-rac-kw5sIBEE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DrFcDcGr.js → contacts-last-name-rac-DzoZKs1n.js} +1 -1
- package/dist/component/{contacts-phone-rac-UAPALlFx.js → contacts-phone-rac-CxVW4Zp0.js} +1 -1
- package/dist/component/{contacts-position-rac-CJ1M4kJJ.js → contacts-position-rac-CXFxlSty.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-1cEd5s1l.js → contacts-subscribe-rac-kpRGeELB.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-CqnO__fd.js → contacts-tax-id-rac-B5qw-rtP.js} +1 -1
- package/dist/component/{date-availability-COM2EaRy.js → date-availability-BCDMem-_.js} +1 -1
- package/dist/component/{date-input-field-rac-CuuWbw42.js → date-input-field-rac-BLDZ4_Mw.js} +43 -43
- package/dist/component/{date-input-rac-DfVmj9Gc.js → date-input-rac-B1WGYKOp.js} +1 -1
- package/dist/component/{date-picker-field-rac-BFCZik9T.js → date-picker-field-rac-BNd8aZ0c.js} +20 -20
- package/dist/component/{date-picker-rac-C2vajJpb.js → date-picker-rac-ItWxSngw.js} +1 -1
- package/dist/component/date-time-input-field-rac-Ch8z0NRT.js +423 -0
- package/dist/component/{date-time-input-rac-D4FEieQz.js → date-time-input-rac-FebIovNN.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BDBBTNNo.js → dext-checkbox-group-rac-BXYHMQ3R.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DAAhNboR.js → dext-checkbox-rac-C78ScIGY.js} +1 -1
- package/dist/component/{dext-date-picker-rac-me7XbR5z.js → dext-date-picker-rac-BptT4fhe.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DLsUl2Eg.js → dext-date-time-input-rac-RWJ51IjA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3vVIRir.js → dext-dropdown-rac-DZDOtSIG.js} +1 -1
- package/dist/component/{dext-email-rac-a8qXYTLP.js → dext-email-rac-CJceqZsw.js} +1 -1
- package/dist/component/{dext-number-input-rac-DdDnL_fX.js → dext-number-input-rac-buSXk49E.js} +1 -1
- package/dist/component/{dext-phone-rac-ByaxbHpO.js → dext-phone-rac-CeHUOWck.js} +1 -1
- package/dist/component/{dext-radio-group-rac-Bzubt7Uy.js → dext-radio-group-rac-CNyNSfeP.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BZ1EvOkG.js → dext-rating-input-rac-mmdh9tYT.js} +1 -1
- package/dist/component/{dext-tags-rac-C_R89noV.js → dext-tags-rac-CqJ4iv-V.js} +2 -2
- package/dist/component/{dext-text-area-rac-DRpYeQ-K.js → dext-text-area-rac-P1EzLNDE.js} +1 -1
- package/dist/component/{dext-text-input-rac-D_RtbQQ-.js → dext-text-input-rac-Dtz4ZLj7.js} +1 -1
- package/dist/component/{dext-url-input-rac-BSSjSbIo.js → dext-url-input-rac-DUVbW2yl.js} +1 -1
- package/dist/component/{donation-rac-De0KyyGR.js → donation-rac-Nn7z8_to.js} +43 -43
- package/dist/component/{dropdown-field-headless-DNhnTDlD.js → dropdown-field-headless-CT4uSCPR.js} +11 -11
- package/dist/component/{dropdown-field-rac-Bq_FNv9a.js → dropdown-field-rac-CUiyFJi_.js} +5 -5
- package/dist/component/{dropdown-rac-0UIyqF15.js → dropdown-rac-Bs_PVy1q.js} +1 -1
- package/dist/component/{ecom-address-rac-7IVbvs3J.js → ecom-address-rac-BTXwDlMM.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DilgIpiG.js → ecom-subscription-checkbox-rac-CGI84A37.js} +3 -3
- package/dist/component/{email-input-field-rac-CHJ6RSGy.js → email-input-field-rac-DKD7FsQX.js} +54 -54
- package/dist/component/{events-repeater-rac-v18FFLC7.js → events-repeater-rac-B7yIRlyt.js} +30 -30
- package/dist/component/{events-rsvp-rac-BpGLrxsf.js → events-rsvp-rac-C7FOuFmH.js} +3 -3
- package/dist/component/{field-error-headless-DAy-1oAQ.js → field-error-headless-BHTkMu35.js} +1 -1
- package/dist/component/{field-label-headless-BWxHmO0c.js → field-label-headless-D3DwX65k.js} +7 -7
- package/dist/component/{file-upload-rac-BfWN27JT.js → file-upload-rac-B3n_LYYK.js} +85 -85
- package/dist/component/{fixed-payment-rac-Bha61SB4.js → fixed-payment-rac-C6jsiS4-.js} +12 -12
- package/dist/component/{form-D0eeH0lX.js → form-BkmOXzqo.js} +2510 -2487
- package/dist/component/{form-element-classes-Ct1UaxuQ.js → form-element-classes-BsXkFtp2.js} +90 -57
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-uNzfDMbv.js → header-field-rac-FG9EP9--.js} +5 -5
- package/dist/component/{header-rac-B91q4fHl.js → header-rac-DZZgqFjW.js} +1 -1
- package/dist/component/{image-choice-rac-BKcnNGPp.js → image-choice-rac-CXgE6z_f.js} +42 -42
- package/dist/component/{index-BWHymomM.js → index-CSwTHDCX.js} +2 -2
- package/dist/component/{index-BvzLLTKc.js → index-DKV2sNhD.js} +4 -4
- package/dist/component/{isObjectLike-D7Mkqoju.js → isObjectLike-DYfHbEQ3.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Avd9Vlv1.js → multiline-address-field-rac-DnCOKW8F.js} +128 -128
- package/dist/component/{multiline-address-rac-BwQOoejw.js → multiline-address-rac-BZRlzLZq.js} +1 -1
- package/dist/component/{number-input-field-rac-CRqPXDl0.js → number-input-field-rac-BOJNJ50c.js} +30 -30
- package/dist/component/{number-input-rac-0Y8K4e6K.js → number-input-rac-D8ZcIPwq.js} +1 -1
- package/dist/component/{password-rac-C7F6sEB3.js → password-rac-T9PR5j2v.js} +19 -19
- package/dist/component/{payment-input-rac-CTJr4QTK.js → payment-input-rac-C9N3LZOZ.js} +17 -17
- package/dist/component/{phone-input-field-rac-jjSmYCI1.js → phone-input-field-rac-BxUiCV5Z.js} +40 -40
- package/dist/component/{phone-rac-BwSnmgYF.js → phone-rac-BjKFrr86.js} +1 -1
- package/dist/component/{product-list-rac-CTN2wvHE.js → product-list-rac-BG-VK_Hz.js} +41 -41
- package/dist/component/{quiz-radio-group-rac-CZHEDJxr.js → quiz-radio-group-rac-B1x7Yatu.js} +2 -2
- package/dist/component/{radio-button-module-classes-DCz6XS1X.js → radio-button-module-classes-BXWANbga.js} +7 -7
- package/dist/component/{radio-group-field-rac-60MF_9DO.js → radio-group-field-rac-DmEOydAr.js} +4 -4
- package/dist/component/{radio-group-rac-Dqo-Earp.js → radio-group-rac-DAcU_lkj.js} +1 -1
- package/dist/component/{rating-input-field-rac-CzWTwWT8.js → rating-input-field-rac-Cazqeqzw.js} +16 -16
- package/dist/component/{rating-input-rac-Nq4tll2Z.js → rating-input-rac-KJ8FnJTj.js} +1 -1
- package/dist/component/{rich-content-rac.module-sUUSbcSy.js → rich-content-rac.module-PZgMV2M7.js} +1 -1
- package/dist/component/{rich-text-field-rac-BvLfS4I5.js → rich-text-field-rac-DNEeY_m8.js} +3 -3
- package/dist/component/{rich-text-rac-BWkTbWk3.js → rich-text-rac-g9upYD25.js} +1 -1
- package/dist/component/{service-dropdown-rac-DZ3USe7_.js → service-dropdown-rac-CmmWetDa.js} +20 -20
- package/dist/component/{services-multi-choice-rac-D-og7fMo.js → services-multi-choice-rac-D0PJNlq2.js} +7 -7
- package/dist/component/{signature-rac-D3c4fnvN.js → signature-rac-Q4G3uEhw.js} +41 -41
- package/dist/component/submit-button-rac-DdLPGJ6v.js +141 -0
- package/dist/component/{tags-field-rac-DXmZBcpO.js → tags-field-rac-PZ8Vfmsn.js} +72 -72
- package/dist/component/{tags-rac-CoXWx42D.js → tags-rac-DLjeR5G1.js} +1 -1
- package/dist/component/{text-area-field-rac-Cy0Mr29Z.js → text-area-field-rac-BNVK0R0Z.js} +25 -25
- package/dist/component/{text-area-rac-C3Mjmgpa.js → text-area-rac-CNOLe3Vx.js} +1 -1
- package/dist/component/{text-input-field-rac-D1TB9B_M.js → text-input-field-rac-DjdW6TCf.js} +3 -3
- package/dist/component/{text-input-headless-BUa59Rgn.js → text-input-headless-DFWQwZAN.js} +10 -10
- package/dist/component/{text-input-rac-BQ3Z9ws4.js → text-input-rac-GXPtQEjT.js} +1 -1
- package/dist/component/time-input-rac-B_g-erqu.js +159 -0
- package/dist/component/{url-input-field-rac-DINXfZdf.js → url-input-field-rac-CXWYeQLf.js} +19 -19
- package/dist/component/{url-input-rac-Ch9eTIF_.js → url-input-rac-DX-vjyXj.js} +1 -1
- package/dist/component/use-element-state-class-name-lZnP6sE6.js +22 -0
- package/dist/component/{use-service-options-base-BJZhzDyO.js → use-service-options-base-BJE86Rzo.js} +5 -5
- package/dist/component/{use-text-input-class-name-8gMUWeCb.js → use-text-input-class-name-B-GYaltW.js} +5 -5
- package/dist/form.d.ts +58 -2
- package/package.json +5 -3
- package/dist/component/date-time-input-field-rac-B7ne2emo.js +0 -423
- package/dist/component/submit-button-rac-Dn_BGt1n.js +0 -116
- package/dist/component/time-input-rac-Wi0oD5YF.js +0 -155
- package/dist/component/use-element-state-class-name-j8W1zbdG.js +0 -20
|
@@ -1,17 +1,17 @@
|
|
|
1
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,
|
|
4
|
+
import { ab as ce, aa as lt, af as ve, ae as ct, c as mt, at as ut, as as dt, aj as me, ag as Se, al as ft, ai as Dt, F as Et } from "./form-BkmOXzqo.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
8
|
import { s as De } from "./field-rac.module-D06m9T9x.js";
|
|
9
|
-
import { y as pt,
|
|
10
|
-
import { u as
|
|
11
|
-
import { ListBox as gt, Button as
|
|
9
|
+
import { y as pt, P as _t, a as yt, w as We, h as Lt, W as Nt, o as At, i as bt, a2 as It } from "./form-element-classes-BsXkFtp2.js";
|
|
10
|
+
import { u as Ot } from "./use-element-state-class-name-lZnP6sE6.js";
|
|
11
|
+
import { ListBox as gt, Button as Re, ListBoxItem as Tt, RadioGroup as vt, RadioField as Rt, RadioButton as kt } 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-BHTkMu35.js";
|
|
14
|
+
import { L as Ft } from "./field-label-headless-D3DwX65k.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";
|
|
@@ -19,7 +19,7 @@ import { V as Ze } from "./headless-styles-CmcyA_pi.js";
|
|
|
19
19
|
function Wt(e) {
|
|
20
20
|
return { evid: 40, src: 16, endpoint: "", params: e };
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var Oe = /* @__PURE__ */ (function(e) {
|
|
23
23
|
return e.BOOKING_NOT_INSTALL = "BOOKING_NOT_INSTALL", e.NO_AVAILABILITY_DATES_FOUND = "NO_AVAILABILITY_DATES_FOUND", e.GENERAL = "GENERAL", e;
|
|
24
24
|
})({}), z = /* @__PURE__ */ (function(e) {
|
|
25
25
|
return e.LOADING = "LOADING", e.DONE = "DONE", e.ERROR = "ERROR", e;
|
|
@@ -48,7 +48,7 @@ const Bt = (e) => {
|
|
|
48
48
|
});
|
|
49
49
|
}, Ve = (e) => {
|
|
50
50
|
var u;
|
|
51
|
-
const { appointmentFieldProps: n } =
|
|
51
|
+
const { appointmentFieldProps: n } = ke(), { isEditor: t, isComposer: a } = ce(), s = lt(), r = e || ((u = n == null ? void 0 : n.initialData) == null ? void 0 : u.service);
|
|
52
52
|
if (!(t || a))
|
|
53
53
|
return {
|
|
54
54
|
...s,
|
|
@@ -81,7 +81,7 @@ var Pe;
|
|
|
81
81
|
const xt = (e) => {
|
|
82
82
|
const { service: n } = e || {};
|
|
83
83
|
return (n == null ? void 0 : n.id) ? null : {
|
|
84
|
-
type:
|
|
84
|
+
type: Oe.GENERAL,
|
|
85
85
|
message: "Service ID is missing"
|
|
86
86
|
};
|
|
87
87
|
}, Pt = ({ appointmentFieldProps: e, isEditor: n, isComposer: t }) => {
|
|
@@ -164,51 +164,51 @@ function Kt(e) {
|
|
|
164
164
|
return H(() => {
|
|
165
165
|
u && !s && !r && c && (async () => {
|
|
166
166
|
var W, N, A, Y, B;
|
|
167
|
-
const v = qe(),
|
|
167
|
+
const v = qe(), O = {
|
|
168
168
|
currentSlotBulkSize: V,
|
|
169
169
|
timezone: v,
|
|
170
170
|
dataStatus: z.LOADING
|
|
171
171
|
};
|
|
172
172
|
try {
|
|
173
173
|
const U = async (oe) => {
|
|
174
|
-
var
|
|
174
|
+
var R, _;
|
|
175
175
|
const { startDate: se, endDate: $ } = zt(oe, v);
|
|
176
|
-
return (_ = (
|
|
176
|
+
return (_ = (R = l.current) == null ? void 0 : R.getAvailabilityDates) == null ? void 0 : _.call(R, {
|
|
177
177
|
serviceId: u,
|
|
178
178
|
fromDate: se,
|
|
179
179
|
toDate: $,
|
|
180
180
|
timeZone: v
|
|
181
181
|
});
|
|
182
182
|
};
|
|
183
|
-
if (
|
|
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
186
|
component: Q.NO_AVAILABILITY_AT_ALL
|
|
187
187
|
}), S({
|
|
188
188
|
dataStatus: z.ERROR,
|
|
189
189
|
error: {
|
|
190
|
-
type:
|
|
190
|
+
type: Oe.NO_AVAILABILITY_DATES_FOUND,
|
|
191
191
|
message: "No availability dates found"
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
O.selectedDate = Ht(O.availabilityDates), O.selectedDate && (O.availabilitySlots = await ((Y = (A = l.current) == null ? void 0 : A.getAvailabilitySlots) == null ? void 0 : Y.call(A, {
|
|
197
197
|
serviceId: u,
|
|
198
198
|
timeZone: v,
|
|
199
|
-
selectedDate:
|
|
199
|
+
selectedDate: O.selectedDate
|
|
200
200
|
}))), E == null || E.report({
|
|
201
201
|
action: te.LOAD,
|
|
202
|
-
component: (B =
|
|
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
|
|
206
206
|
});
|
|
207
207
|
} catch (U) {
|
|
208
208
|
console.error(U), S({
|
|
209
209
|
dataStatus: z.ERROR,
|
|
210
210
|
error: {
|
|
211
|
-
type:
|
|
211
|
+
type: Oe.GENERAL,
|
|
212
212
|
message: "An error occurred in initialAppointmentState"
|
|
213
213
|
}
|
|
214
214
|
});
|
|
@@ -248,7 +248,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
248
248
|
})
|
|
249
249
|
}
|
|
250
250
|
}, n);
|
|
251
|
-
},
|
|
251
|
+
}, ke = () => 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",
|
|
@@ -291,7 +291,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
291
291
|
toDate: a
|
|
292
292
|
};
|
|
293
293
|
}, jt = ({ setIsReloadingSlots: e }) => {
|
|
294
|
-
const { appointmentFieldProps: n, appointmentState: t, setAppointmentState: a } =
|
|
294
|
+
const { appointmentFieldProps: n, appointmentState: t, setAppointmentState: a } = ke(), { value: s } = n, { actions: r } = ve();
|
|
295
295
|
H(() => {
|
|
296
296
|
(async () => {
|
|
297
297
|
var i, l;
|
|
@@ -390,15 +390,15 @@ 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 } =
|
|
393
|
+
const { appointmentFieldProps: e, appointmentState: n, setAppointmentState: t } = ke(), { 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
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:
|
|
397
|
+
const { onChange: N, value: A, target: Y, initialData: B, formatDescription: U, locationType: oe, error: se } = e, { availabilityDates: $, availabilitySlots: R, timezone: _ = "", selectedDate: y, currentSlotBulkSize: k, 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
|
-
}), L = P(() => Qt(
|
|
401
|
-
|
|
400
|
+
}), L = P(() => Qt(R, Me), [
|
|
401
|
+
R,
|
|
402
402
|
Me
|
|
403
403
|
]);
|
|
404
404
|
H(() => {
|
|
@@ -409,16 +409,16 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
409
409
|
_
|
|
410
410
|
]), dt((D) => {
|
|
411
411
|
const b = D == null ? void 0 : D[Y];
|
|
412
|
-
|
|
413
|
-
availabilitySlots:
|
|
412
|
+
R != null && R.length && t({
|
|
413
|
+
availabilitySlots: R.filter((I) => {
|
|
414
414
|
var w;
|
|
415
|
-
return ((w =
|
|
415
|
+
return ((w = I == null ? void 0 : I.slot) == null ? void 0 : w.startDate) !== (b == null ? void 0 : b.startDate);
|
|
416
416
|
})
|
|
417
417
|
});
|
|
418
418
|
}), H(() => {
|
|
419
|
-
if (L != null && L.length &&
|
|
419
|
+
if (L != null && L.length && k) {
|
|
420
420
|
const D = en(Ee(A ?? void 0), L);
|
|
421
|
-
D && D + 1 >
|
|
421
|
+
D && D + 1 > k && t({
|
|
422
422
|
currentSlotBulkSize: D + 1
|
|
423
423
|
});
|
|
424
424
|
} else !(L != null && L.length) && A && (N == null || N(void 0));
|
|
@@ -443,7 +443,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (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, {
|
|
447
447
|
day: "numeric"
|
|
448
448
|
}), w = new Intl.DateTimeFormat(a, {
|
|
449
449
|
weekday: "long",
|
|
@@ -453,15 +453,15 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
453
453
|
return Array.from({
|
|
454
454
|
length: q
|
|
455
455
|
}, (re, be) => {
|
|
456
|
-
const x = ee(h, be),
|
|
456
|
+
const x = ee(h, be), Ie = !!y && ne(x, y), rt = Te(x) < D;
|
|
457
457
|
return {
|
|
458
458
|
key: rn(x),
|
|
459
459
|
date: x,
|
|
460
|
-
isSelected:
|
|
461
|
-
isAvailable: !Z && !X && !
|
|
462
|
-
isDisabled: rt || X && !
|
|
460
|
+
isSelected: Ie,
|
|
461
|
+
isAvailable: !Z && !X && !Ie && cn(x, $),
|
|
462
|
+
isDisabled: rt || X && !Ie,
|
|
463
463
|
isToday: ne(x, D),
|
|
464
|
-
dayOfMonthLabel:
|
|
464
|
+
dayOfMonthLabel: I.format(x),
|
|
465
465
|
weekdayLabel: b.format(x),
|
|
466
466
|
label: w.format(x),
|
|
467
467
|
availabilityLabel: i("form.appointment.accessibility.calendar.has-availability.aria-label")
|
|
@@ -476,22 +476,22 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
476
476
|
a,
|
|
477
477
|
u,
|
|
478
478
|
i
|
|
479
|
-
]), ye = Ee(A ?? void 0) || void 0, Le = P(() => Z || d ? [] : (L ?? []).slice(0,
|
|
480
|
-
const { startDate: b, endDate:
|
|
481
|
-
if (!b || !
|
|
479
|
+
]), ye = Ee(A ?? void 0) || void 0, Le = P(() => Z || d ? [] : (L ?? []).slice(0, k).flatMap((D) => {
|
|
480
|
+
const { startDate: b, endDate: I } = D.slot ?? {};
|
|
481
|
+
if (!b || !I)
|
|
482
482
|
return [];
|
|
483
483
|
const w = Ee({
|
|
484
484
|
startDate: b,
|
|
485
|
-
endDate:
|
|
485
|
+
endDate: I
|
|
486
486
|
});
|
|
487
487
|
return [
|
|
488
488
|
{
|
|
489
489
|
key: w,
|
|
490
490
|
startDate: b,
|
|
491
|
-
endDate:
|
|
491
|
+
endDate: I,
|
|
492
492
|
timeRange: Jt({
|
|
493
493
|
startDate: b,
|
|
494
|
-
endDate:
|
|
494
|
+
endDate: I,
|
|
495
495
|
locale: a,
|
|
496
496
|
timezone: _
|
|
497
497
|
}),
|
|
@@ -500,13 +500,13 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
500
500
|
];
|
|
501
501
|
}), [
|
|
502
502
|
L,
|
|
503
|
-
|
|
503
|
+
k,
|
|
504
504
|
Z,
|
|
505
505
|
d,
|
|
506
506
|
a,
|
|
507
507
|
_,
|
|
508
508
|
ye
|
|
509
|
-
]), Ne = !d && !!(L != null && L.length) && (
|
|
509
|
+
]), Ne = !d && !!(L != null && L.length) && (k || V) < L.length, Ae = h > Ye(/* @__PURE__ */ new Date(), _e), et = ie(
|
|
510
510
|
async (D) => {
|
|
511
511
|
var b;
|
|
512
512
|
if (!(X || y && ne(D, y))) {
|
|
@@ -519,7 +519,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
519
519
|
component: Q.DATE
|
|
520
520
|
});
|
|
521
521
|
try {
|
|
522
|
-
const
|
|
522
|
+
const I = await ((b = l == null ? void 0 : l.getAvailabilitySlots) == null ? void 0 : b.call(l, {
|
|
523
523
|
serviceId: K,
|
|
524
524
|
timeZone: _,
|
|
525
525
|
selectedDate: D
|
|
@@ -527,7 +527,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
527
527
|
t({
|
|
528
528
|
currentSlotBulkSize: V,
|
|
529
529
|
selectedDate: D,
|
|
530
|
-
availabilitySlots:
|
|
530
|
+
availabilitySlots: I
|
|
531
531
|
});
|
|
532
532
|
} catch {
|
|
533
533
|
} finally {
|
|
@@ -550,8 +550,8 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
550
550
|
var re;
|
|
551
551
|
if (D < 0 && !Ae)
|
|
552
552
|
return;
|
|
553
|
-
const b = h,
|
|
554
|
-
if (v(
|
|
553
|
+
const b = h, I = ee(h, D * q);
|
|
554
|
+
if (v(I), s || r)
|
|
555
555
|
return;
|
|
556
556
|
const w = ++de.current;
|
|
557
557
|
f(!0), c == null || c.report({
|
|
@@ -562,8 +562,8 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
562
562
|
const be = await ((re = l == null ? void 0 : l.getAvailabilityDates) == null ? void 0 : re.call(l, {
|
|
563
563
|
serviceId: K,
|
|
564
564
|
timeZone: _,
|
|
565
|
-
fromDate:
|
|
566
|
-
toDate: sn(ee(
|
|
565
|
+
fromDate: I,
|
|
566
|
+
toDate: sn(ee(I, q - 1))
|
|
567
567
|
}));
|
|
568
568
|
w === de.current && t({
|
|
569
569
|
availabilityDates: be
|
|
@@ -590,14 +590,14 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
590
590
|
const b = Le.find((re) => re.key === D);
|
|
591
591
|
if (!b)
|
|
592
592
|
return;
|
|
593
|
-
const { startDate:
|
|
593
|
+
const { startDate: I, endDate: w } = b;
|
|
594
594
|
c == null || c.report({
|
|
595
595
|
action: te.CLICK,
|
|
596
596
|
component: Q.SLOT,
|
|
597
|
-
startTime: new Date(
|
|
597
|
+
startTime: new Date(I).valueOf(),
|
|
598
598
|
endTime: new Date(w).valueOf()
|
|
599
599
|
}), N == null || N({
|
|
600
|
-
startDate:
|
|
600
|
+
startDate: I,
|
|
601
601
|
endDate: w,
|
|
602
602
|
timeZone: _
|
|
603
603
|
});
|
|
@@ -612,7 +612,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
612
612
|
), at = ie(() => {
|
|
613
613
|
if (!Ne)
|
|
614
614
|
return;
|
|
615
|
-
const D =
|
|
615
|
+
const D = k || V;
|
|
616
616
|
c == null || c.report({
|
|
617
617
|
action: te.CLICK,
|
|
618
618
|
component: Q.SHOW_MORE
|
|
@@ -621,7 +621,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
621
621
|
});
|
|
622
622
|
}, [
|
|
623
623
|
Ne,
|
|
624
|
-
|
|
624
|
+
k,
|
|
625
625
|
c
|
|
626
626
|
]), ot = ie(() => W(void 0), []), st = P(() => {
|
|
627
627
|
if (pe)
|
|
@@ -668,7 +668,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
668
668
|
showMoreSlotsLabel: i("form.appointment.show-more-slots.text"),
|
|
669
669
|
previousWeekLabel: i("form.appointment.accessibility.calendar.previous-week.aria-label"),
|
|
670
670
|
nextWeekLabel: i("form.appointment.accessibility.calendar.next-week.aria-label"),
|
|
671
|
-
pendingFocusIndex:
|
|
671
|
+
pendingFocusIndex: O,
|
|
672
672
|
consumePendingFocusIndex: ot
|
|
673
673
|
};
|
|
674
674
|
}, Qe = $e(void 0), Je = (e) => `${e}-timezone-note`, F = () => {
|
|
@@ -690,7 +690,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
690
690
|
return;
|
|
691
691
|
const [g] = [
|
|
692
692
|
...f
|
|
693
|
-
], v = t.find(({ key:
|
|
693
|
+
], v = t.find(({ key: O }) => O === g);
|
|
694
694
|
v && a(v.date);
|
|
695
695
|
};
|
|
696
696
|
return /* @__PURE__ */ o.createElement("div", {
|
|
@@ -721,7 +721,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
721
721
|
}, [
|
|
722
722
|
a,
|
|
723
723
|
r
|
|
724
|
-
]), /* @__PURE__ */ o.createElement(
|
|
724
|
+
]), /* @__PURE__ */ o.createElement(Re, {
|
|
725
725
|
ref: i,
|
|
726
726
|
className: n,
|
|
727
727
|
"aria-label": s,
|
|
@@ -732,7 +732,7 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
732
732
|
}, e ?? "‹");
|
|
733
733
|
}, dn = ({ children: e, className: n }) => {
|
|
734
734
|
const { changeWeek: t, nextWeekLabel: a } = F(), s = we();
|
|
735
|
-
return /* @__PURE__ */ o.createElement(
|
|
735
|
+
return /* @__PURE__ */ o.createElement(Re, {
|
|
736
736
|
className: n,
|
|
737
737
|
"aria-label": a,
|
|
738
738
|
isDisabled: s,
|
|
@@ -770,23 +770,23 @@ 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:
|
|
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
775
|
a && c ? Je(W) : void 0
|
|
776
|
-
].filter(Boolean).join(" ") || void 0,
|
|
777
|
-
var y,
|
|
778
|
-
(G = (
|
|
776
|
+
].filter(Boolean).join(" ") || void 0, R = (_) => {
|
|
777
|
+
var y, k, G;
|
|
778
|
+
(G = (k = (y = Y.current) == null ? void 0 : y.querySelectorAll(Ke)) == null ? void 0 : k[_]) == null || G.focus();
|
|
779
779
|
};
|
|
780
780
|
return ft(() => {
|
|
781
781
|
var G, ue;
|
|
782
782
|
if (!!((G = Y.current) != null && G.querySelector(Ke))) {
|
|
783
|
-
|
|
783
|
+
R(0);
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
const y = Array.from(((ue = document.getElementById(W)) == null ? void 0 : ue.querySelectorAll('[role="option"]')) ?? []),
|
|
787
|
-
|
|
786
|
+
const y = Array.from(((ue = document.getElementById(W)) == null ? void 0 : ue.querySelectorAll('[role="option"]')) ?? []), k = y.find((K) => K.getAttribute("aria-selected") === "true") ?? y.find((K) => K.getAttribute("aria-disabled") !== "true");
|
|
787
|
+
k == null || k.focus();
|
|
788
788
|
}, E), H(() => {
|
|
789
|
-
d !== void 0 && (
|
|
789
|
+
d !== void 0 && (R(d), S());
|
|
790
790
|
}, [
|
|
791
791
|
d,
|
|
792
792
|
s.length
|
|
@@ -801,7 +801,7 @@ const Ke = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) =>
|
|
|
801
801
|
isDisabled: f,
|
|
802
802
|
isReadOnly: g,
|
|
803
803
|
isRequired: v,
|
|
804
|
-
isInvalid:
|
|
804
|
+
isInvalid: O,
|
|
805
805
|
"aria-labelledby": se ? B : N,
|
|
806
806
|
"aria-describedby": $,
|
|
807
807
|
"data-refetch": l || void 0
|
|
@@ -821,10 +821,10 @@ const Ke = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) =>
|
|
|
821
821
|
}) : a) : null;
|
|
822
822
|
}, Sn = ({ children: e, className: n, ...t }) => {
|
|
823
823
|
const { slot: a } = t;
|
|
824
|
-
return /* @__PURE__ */ o.createElement(
|
|
824
|
+
return /* @__PURE__ */ o.createElement(Rt, {
|
|
825
825
|
value: a.key,
|
|
826
826
|
"aria-label": a.timeRange
|
|
827
|
-
}, /* @__PURE__ */ o.createElement(
|
|
827
|
+
}, /* @__PURE__ */ o.createElement(kt, {
|
|
828
828
|
className: n
|
|
829
829
|
}, e ? e(a) : a.timeRange));
|
|
830
830
|
};
|
|
@@ -911,7 +911,7 @@ const m = ({ children: e, className: n }) => {
|
|
|
911
911
|
}) : t) : null;
|
|
912
912
|
}, bn = ({ children: e, className: n }) => {
|
|
913
913
|
const { hasMoreSlots: t, showMoreSlots: a, showMoreSlotsLabel: s } = F(), { disabled: r, readOnly: u } = me();
|
|
914
|
-
return t ? /* @__PURE__ */ o.createElement(
|
|
914
|
+
return t ? /* @__PURE__ */ o.createElement(Re, {
|
|
915
915
|
className: n,
|
|
916
916
|
isDisabled: !!r || !!u,
|
|
917
917
|
onPress: a
|
|
@@ -929,14 +929,14 @@ m.Slots = ae;
|
|
|
929
929
|
m.ShowMoreSlots = bn;
|
|
930
930
|
m.Description = wt;
|
|
931
931
|
m.Error = Mt;
|
|
932
|
-
const
|
|
933
|
-
appointment:
|
|
934
|
-
dates:
|
|
932
|
+
const In = "_appointment_743lv_1", On = "_dates_743lv_5", gn = "_weekHeading_743lv_26", Tn = "_weekButton_743lv_35", vn = "_previousWeek_743lv_67", Rn = "_nextWeek_743lv_71", kn = "_day_743lv_83", wn = "_weekdayLabel_743lv_97", Mn = "_dayNumber_743lv_109", Fn = "_indicator_743lv_174", hn = "_hint_743lv_204", Cn = "_slots_743lv_217", Wn = "_slotsMobile_743lv_226", Bn = "_slotsLabel_743lv_230", Un = "_slot_743lv_217", xn = "_slotHover_743lv_269", Pn = "_slotSelected_743lv_277", zn = "_showMoreSlots_743lv_331", Hn = "_loader_743lv_361", Yn = "_notification_743lv_397", p = {
|
|
933
|
+
appointment: In,
|
|
934
|
+
dates: On,
|
|
935
935
|
weekHeading: gn,
|
|
936
936
|
weekButton: Tn,
|
|
937
937
|
previousWeek: vn,
|
|
938
|
-
nextWeek:
|
|
939
|
-
day:
|
|
938
|
+
nextWeek: Rn,
|
|
939
|
+
day: kn,
|
|
940
940
|
weekdayLabel: wn,
|
|
941
941
|
dayNumber: Mn,
|
|
942
942
|
indicator: Fn,
|
|
@@ -958,8 +958,8 @@ const On = "_appointment_743lv_1", In = "_dates_743lv_5", gn = "_weekHeading_743
|
|
|
958
958
|
selected: p.slotSelected,
|
|
959
959
|
hover: p.slotHover
|
|
960
960
|
}, Gn = () => {
|
|
961
|
-
const { isMobile: e } = ce(), n =
|
|
962
|
-
globalClasses:
|
|
961
|
+
const { isMobile: e } = ce(), n = Ot({
|
|
962
|
+
globalClasses: It,
|
|
963
963
|
moduleClasses: $n
|
|
964
964
|
});
|
|
965
965
|
return /* @__PURE__ */ o.createElement(m, {
|
package/dist/component/{bookings-login-bar-rac-C1k6o0A5.js → bookings-login-bar-rac-Cr500ehb.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import o from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import f from "classnames";
|
|
3
|
+
import { aj as E, at as B, ab as d, af as p } from "./form-BkmOXzqo.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 { v as _ } from "./form-element-classes-
|
|
6
|
+
import { v as _ } from "./form-element-classes-BsXkFtp2.js";
|
|
7
7
|
const a = ({ children: n }) => {
|
|
8
|
-
const { id: r, FieldLayout: t } =
|
|
8
|
+
const { id: r, FieldLayout: t } = E();
|
|
9
9
|
return /* @__PURE__ */ o.createElement(t, {
|
|
10
10
|
fieldId: r,
|
|
11
11
|
renderLabel: () => null,
|
|
@@ -50,7 +50,7 @@ const T = "_container_1mvrn_1", v = "_text_1mvrn_34", C = "_button_1mvrn_39", u
|
|
|
50
50
|
text: v,
|
|
51
51
|
button: C
|
|
52
52
|
}, A = () => {
|
|
53
|
-
const { userData: n, language: r } =
|
|
53
|
+
const { userData: n, language: r } = d(), { actions: t } = p();
|
|
54
54
|
return /* @__PURE__ */ o.createElement(a, null, /* @__PURE__ */ o.createElement(a.LoginBar, {
|
|
55
55
|
email: n == null ? void 0 : n.email,
|
|
56
56
|
isLoggedIn: !!n,
|
|
@@ -62,7 +62,7 @@ const T = "_container_1mvrn_1", v = "_text_1mvrn_34", C = "_button_1mvrn_39", u
|
|
|
62
62
|
var e;
|
|
63
63
|
return (e = t == null ? void 0 : t.requestLogout) == null ? void 0 : e.call(t);
|
|
64
64
|
},
|
|
65
|
-
className:
|
|
65
|
+
className: f(_, u.container)
|
|
66
66
|
}, /* @__PURE__ */ o.createElement(a.Text, {
|
|
67
67
|
className: u.text
|
|
68
68
|
}), /* @__PURE__ */ o.createElement(a.Button, {
|
|
@@ -2,17 +2,17 @@ import { RicosViewer as $n } from "@wix/ricos/viewer";
|
|
|
2
2
|
import U from "classnames";
|
|
3
3
|
import b, { useMemo as Xn, useRef as Jn, useCallback as Yn } from "react";
|
|
4
4
|
import { CheckboxField as Qn, CheckboxButton as Zn } from "react-aria-components";
|
|
5
|
-
import { Q as ei,
|
|
5
|
+
import { Q as ei, aj as Zr, q as Qr, R as fn, at as ri, ab as ti, $ as ai, ag as ni, al as ii, L as si } from "./form-BkmOXzqo.js";
|
|
6
6
|
import { f as W, a as oi } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as ui, E as ci } from "./field-error-headless-
|
|
7
|
+
import { D as ui, E as ci } from "./field-error-headless-BHTkMu35.js";
|
|
8
8
|
import { Node_Type as fi } from "@wix/ricos/schema";
|
|
9
|
-
import { c as re, r as X, e as R, a as J, d as li, b as _i } from "./isObjectLike-
|
|
9
|
+
import { c as re, r as X, e as R, a as J, d as li, b as _i } from "./isObjectLike-DYfHbEQ3.js";
|
|
10
10
|
import { S as vi } from "./selection-indicator-XQ8MYHUQ.js";
|
|
11
11
|
import { E as hi } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { C as pi } from "./checkbox-indicator-module-classes-Bb3xB1ve.js";
|
|
13
13
|
import { s as oe } from "./field-rac.module-D06m9T9x.js";
|
|
14
|
-
import { f as di, g as yi, b as bi,
|
|
15
|
-
import { u as Ai } from "./use-element-state-class-name-
|
|
14
|
+
import { f as di, g as yi, b as bi, P as gi, o as qi, i as Ci } from "./form-element-classes-BsXkFtp2.js";
|
|
15
|
+
import { u as Ai } from "./use-element-state-class-name-lZnP6sE6.js";
|
|
16
16
|
var ue, dt;
|
|
17
17
|
function mi() {
|
|
18
18
|
if (dt) return ue;
|