@wix/form-elements 1.94.0 → 1.96.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-CNIizm60.js → appointment-rac-BKgRKq3j.js} +309 -310
- package/dist/component/{bookings-address-rac-C7ukrF1D.js → bookings-address-rac-C87x19gw.js} +1 -1
- package/dist/component/{bookings-email-rac-DnzbLEmf.js → bookings-email-rac-f4nuC_pb.js} +1 -1
- package/dist/component/{bookings-first-name-rac-8Krm-3QK.js → bookings-first-name-rac-BGmuAmbu.js} +1 -1
- package/dist/component/{bookings-header-rac-WRILbKeE.js → bookings-header-rac-CoyxHljp.js} +1 -1
- package/dist/component/{bookings-last-name-rac-C0-yWBLa.js → bookings-last-name-rac-D2mBYwcR.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Bc9u_rn_.js → bookings-login-bar-rac-BH2Mi6TR.js} +4 -4
- package/dist/component/{bookings-phone-rac-BaBlg7f7.js → bookings-phone-rac-Dz78ybFV.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DR-Ngu_b.js → bookings-rich-text-rac-8_h0cOoy.js} +1 -1
- package/dist/component/{get-first-day-of-the-week-DvnsxYhQ.js → calendar.module-DnhTT4QT.js} +23 -18
- package/dist/component/{checkbox-field-rac-Cqr57TgJ.js → checkbox-field-rac-CJnegjvL.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-Bgcvavr3.js → checkbox-group-field-headless-CrA7Gx2Y.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-Bcsowjwp.js → checkbox-group-field-rac-DMg75l5Q.js} +12 -12
- package/dist/component/{checkbox-group-rac-38j0b8_U.js → checkbox-group-rac-C9XWlO5D.js} +1 -1
- package/dist/component/{checkbox-rac-Bb5ZxZo7.js → checkbox-rac-CrqhH4z9.js} +1 -1
- package/dist/component/{contacts-address-rac-gaOhfztb.js → contacts-address-rac-C2mqTiPg.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DAIPR64p.js → contacts-birthdate-rac-i7_RMona.js} +1 -1
- package/dist/component/{contacts-company-rac-DVPQrcfN.js → contacts-company-rac-7sdIosaG.js} +1 -1
- package/dist/component/{contacts-email-rac-qMyFjz_2.js → contacts-email-rac-CrsksJ9G.js} +1 -1
- package/dist/component/{contacts-first-name-rac-OVPtHcde.js → contacts-first-name-rac-I5xIYxgD.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BmLQrJ2D.js → contacts-last-name-rac-DnzJYJh7.js} +1 -1
- package/dist/component/{contacts-phone-rac-D7waZc1q.js → contacts-phone-rac-Cx1jpYmv.js} +1 -1
- package/dist/component/{contacts-position-rac-DnI3o3Am.js → contacts-position-rac-CxddG_cE.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-P8zn8_GS.js → contacts-subscribe-rac-C1nTAhnd.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-9CBr2KkR.js → contacts-tax-id-rac-B1lzfrj_.js} +1 -1
- package/dist/component/{date-availability--ntpBDiI.js → date-availability-LN33GU7O.js} +1 -1
- package/dist/component/{date-input-field-rac-Don2tz5U.js → date-input-field-rac-zTcw6Mxx.js} +57 -56
- package/dist/component/{date-input-rac-Du3e8Hcu.js → date-input-rac-NfVbrcoO.js} +1 -1
- package/dist/component/date-picker-field-rac-Cc9hJloJ.js +317 -0
- package/dist/component/{date-picker-rac-BsCMkfHV.js → date-picker-rac-C5iXyKdf.js} +1 -1
- package/dist/component/{date-time-input-field-rac-LLF1UdUD.js → date-time-input-field-rac-Cp34u7cC.js} +53 -52
- package/dist/component/{date-time-input-rac-KYqrNgbb.js → date-time-input-rac-CfFd56Xf.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DaOY9Cb6.js → dext-checkbox-group-rac-BVx7XXwR.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Ceu5q9xf.js → dext-checkbox-rac-CmUOLx_w.js} +1 -1
- package/dist/component/{dext-date-picker-rac-iop0XEpQ.js → dext-date-picker-rac-XDrLGVTQ.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DJB_fMiN.js → dext-date-time-input-rac-ZLCq_taK.js} +1 -1
- package/dist/component/{dext-dropdown-rac-Dhp4CUZ5.js → dext-dropdown-rac-C74zBq3M.js} +1 -1
- package/dist/component/{dext-email-rac-BIr9RxhQ.js → dext-email-rac-CqS9HcdY.js} +1 -1
- package/dist/component/{dext-number-input-rac-Q8p3NeKN.js → dext-number-input-rac-DszjJDT-.js} +1 -1
- package/dist/component/{dext-phone-rac-DRdRLIvr.js → dext-phone-rac-wt7T8hpM.js} +1 -1
- package/dist/component/{dext-radio-group-rac-D1N_wBhO.js → dext-radio-group-rac-BvRnaWP0.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BQIMl7oQ.js → dext-rating-input-rac-D1Lt9M3c.js} +1 -1
- package/dist/component/{dext-tags-rac-C52jiu1I.js → dext-tags-rac-70YO5CJH.js} +2 -2
- package/dist/component/{dext-text-area-rac-BWmSs4mb.js → dext-text-area-rac-CC5RCvWh.js} +1 -1
- package/dist/component/{dext-text-input-rac-BnAJ-7Hs.js → dext-text-input-rac-s487DzPW.js} +1 -1
- package/dist/component/{dext-url-input-rac-CvGn3KHo.js → dext-url-input-rac-DEKwUh2a.js} +1 -1
- package/dist/component/{donation-rac-DsFRs16V.js → donation-rac-C2bCFVHP.js} +30 -30
- package/dist/component/{dropdown-field-headless-K0AM4AAs.js → dropdown-field-headless-BMWwkydq.js} +4 -4
- package/dist/component/{dropdown-field-rac-CMEB8ZQN.js → dropdown-field-rac-Cw5Cbpg0.js} +5 -5
- package/dist/component/{dropdown-rac-BakYShkm.js → dropdown-rac-CEmlDY3w.js} +1 -1
- package/dist/component/{ecom-address-rac-A_Aj5CX0.js → ecom-address-rac-Dv6asnf_.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Ddol0N03.js → ecom-subscription-checkbox-rac-DOwH-Ebd.js} +3 -3
- package/dist/component/{email-input-field-rac-B7yOMDWB.js → email-input-field-rac-CeFXPibq.js} +41 -41
- package/dist/component/events-repeater-rac-BUk5Qc8n.js +267 -0
- package/dist/component/{events-rsvp-rac-DfjqTM7C.js → events-rsvp-rac-CtFkVzUy.js} +20 -20
- package/dist/component/{field-error-headless-CONyKitA.js → field-error-headless-B6x_cVEi.js} +1 -1
- package/dist/component/{field-label-headless-tf9QXhMi.js → field-label-headless-BibCD8xx.js} +1 -1
- package/dist/component/{file-upload-rac-Bng5Yew9.js → file-upload-rac-BUcktluW.js} +43 -43
- package/dist/component/{fixed-payment-rac-CXIv7_Oj.js → fixed-payment-rac-BMSBSo5c.js} +10 -10
- package/dist/component/{form-Lv-a47BN.js → form-9WmwgGNc.js} +1120 -1108
- package/dist/component/{form-element-classes-CLZXu-91.js → form-element-classes-BtKlobUX.js} +60 -59
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BZdYszfP.js → header-field-rac-CxUuHOic.js} +3 -3
- package/dist/component/{header-rac-BNeqoDyT.js → header-rac-DejI69X7.js} +1 -1
- package/dist/component/{image-choice-rac-aSKDRo51.js → image-choice-rac-BjI5a_co.js} +15 -15
- package/dist/component/{index-DnNA6zNR.js → index-Csso-2QH.js} +2 -2
- package/dist/component/{index-CWZfskEy.js → index-Dz2hV2_S.js} +4 -4
- package/dist/component/{isObjectLike-C9ogbjhq.js → isObjectLike-BN_BZMhy.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CHE1mE_b.js → multiline-address-field-rac-CYfphmfr.js} +86 -85
- package/dist/component/{multiline-address-rac-wxJunvdU.js → multiline-address-rac-Ccujt2bd.js} +1 -1
- package/dist/component/{number-input-field-rac-ore1oi9q.js → number-input-field-rac-CfnRCRar.js} +18 -18
- package/dist/component/{number-input-rac-DU-rCrjJ.js → number-input-rac-DnTO9d8P.js} +1 -1
- package/dist/component/{password-rac-Dkqv0AIm.js → password-rac-Be_YSb-Q.js} +37 -37
- package/dist/component/{payment-input-rac-CsTcFhQ5.js → payment-input-rac-DXUf5iYb.js} +22 -22
- package/dist/component/{phone-input-field-rac-lIVKt7ge.js → phone-input-field-rac-DYAwLuvJ.js} +32 -31
- package/dist/component/{phone-rac-CZlsXHRM.js → phone-rac-BlsvDmER.js} +1 -1
- package/dist/component/{product-list-rac-UebyHfhC.js → product-list-rac-DdXwRSc2.js} +15 -15
- package/dist/component/{quiz-radio-group-rac-ORLTYxdR.js → quiz-radio-group-rac-B0yiKdbu.js} +2 -2
- package/dist/component/{radio-button-module-classes-CEQr0hKB.js → radio-button-module-classes-t1jsWYpT.js} +3 -3
- package/dist/component/{radio-group-field-rac-t_Dj1_4p.js → radio-group-field-rac-Cug1TtSq.js} +4 -4
- package/dist/component/{radio-group-rac-CC_35nq4.js → radio-group-rac-_O5T0Pt8.js} +1 -1
- package/dist/component/{rating-input-field-rac-BU66cRhy.js → rating-input-field-rac-BSKzQ3fq.js} +31 -31
- package/dist/component/{rating-input-rac-KgNbgchh.js → rating-input-rac-B71q44YO.js} +1 -1
- package/dist/component/{rich-content-rac.module-oGcFL-hl.js → rich-content-rac.module-BJuoKIOt.js} +1 -1
- package/dist/component/{rich-text-field-rac-CiwMiMv7.js → rich-text-field-rac-CiSR82Fw.js} +3 -3
- package/dist/component/{rich-text-rac-Dmp0xxpi.js → rich-text-rac-Bo6UBwOg.js} +1 -1
- package/dist/component/{service-dropdown-rac-_QBi8_AO.js → service-dropdown-rac-BJ7V-g8M.js} +35 -35
- package/dist/component/{services-multi-choice-rac-C2e3xL9O.js → services-multi-choice-rac-CtBcc9WH.js} +12 -12
- package/dist/component/{signature-rac-Dj3aYMvJ.js → signature-rac-yvrHr1he.js} +102 -102
- package/dist/component/{submit-button-rac-C-BVXga7.js → submit-button-rac-s-JdZgq7.js} +2 -2
- package/dist/component/{tags-field-rac-CcOUcsCd.js → tags-field-rac-g_W0RMod.js} +66 -66
- package/dist/component/{tags-rac-p68DA4Mq.js → tags-rac-DmvIH6HU.js} +1 -1
- package/dist/component/{text-area-field-rac-DubIcKTn.js → text-area-field-rac-Duja5xOA.js} +27 -27
- package/dist/component/{text-area-rac-CygfUB6z.js → text-area-rac-DzRxgG6u.js} +1 -1
- package/dist/component/{text-input-field-rac-C7JZRcCX.js → text-input-field-rac-C2eXeoBC.js} +7 -7
- package/dist/component/{text-input-headless-D1xcxxNE.js → text-input-headless-d1WK0nqR.js} +3 -3
- package/dist/component/{text-input-rac-C5lfqJCN.js → text-input-rac-DM9MnoQs.js} +1 -1
- package/dist/component/{time-input-rac-BNxceC-R.js → time-input-rac-CxVZ3USX.js} +25 -25
- package/dist/component/{url-input-field-rac-DH_STwmd.js → url-input-field-rac-4oVJMr1a.js} +19 -19
- package/dist/component/{url-input-rac-C2VOzCis.js → url-input-rac--T-FnskQ.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BFHRYpVL.js +21 -0
- package/dist/component/{use-element-state-class-name-CITSBXT8.js → use-element-state-class-name-De5YnxMK.js} +1 -1
- package/dist/component/use-is-forced-open-dropdown-CWvcd9Ex.js +41 -0
- package/dist/component/{use-service-options-base-DVBmOiRh.js → use-service-options-base-CD1EVWRE.js} +1 -1
- package/dist/component/{use-text-input-class-name-COw61iUf.js → use-text-input-class-name-BYwXccvO.js} +3 -3
- package/package.json +4 -3
- package/dist/component/date-picker-field-rac-Wxmz-O7r.js +0 -304
- package/dist/component/events-repeater-rac-bp8gFHXQ.js +0 -256
- package/dist/component/use-dropdown-option-class-name-CKRu4ERM.js +0 -57
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import o, { useRef as J, useState as j, useEffect as H, createContext as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import o, { useRef as J, useState as j, useEffect as H, createContext as Ge, useContext as Ze, useMemo as P, useCallback as ie } from "react";
|
|
2
|
+
import { RicosViewer as lt } from "@wix/ricos/viewer";
|
|
3
3
|
import M from "classnames";
|
|
4
|
-
import { ac as ce, ab as
|
|
4
|
+
import { ac as ce, ab as ct, ag as we, af as mt, c as ut, au as dt, at as ft, ak as me, ah as Se, am as Dt, aj as Et, F as St } from "./form-9WmwgGNc.js";
|
|
5
5
|
import { C as Ce } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
|
-
import { E as
|
|
6
|
+
import { E as pt } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
+
import { g as _t, c as We } from "./calendar.module-DnhTT4QT.js";
|
|
7
8
|
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
8
9
|
import { s as De } from "./field-rac.module-DobpyqOd.js";
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import { ListBox as
|
|
10
|
+
import { C as Lt, S as yt, a as At, z as Be, i as Nt, W as It, r as Ot, j as bt, a2 as gt } from "./form-element-classes-BtKlobUX.js";
|
|
11
|
+
import { u as Tt } from "./use-element-state-class-name-De5YnxMK.js";
|
|
12
|
+
import { ListBox as wt, Button as ve, ListBoxItem as vt, RadioGroup as kt, RadioField as Rt, RadioButton as Mt } from "react-aria-components";
|
|
12
13
|
import { f as T, a as le } from "./find-child-C60k4CxG.js";
|
|
13
|
-
import { D as
|
|
14
|
-
import { L as
|
|
15
|
-
import { F as
|
|
16
|
-
import { g as Ct } from "./get-first-day-of-the-week-DvnsxYhQ.js";
|
|
14
|
+
import { D as Ft, E as ht } from "./field-error-headless-B6x_cVEi.js";
|
|
15
|
+
import { L as Ct } from "./field-label-headless-BibCD8xx.js";
|
|
16
|
+
import { F as Wt } from "./fieldset-headless-CD3fds9J.js";
|
|
17
17
|
import "date-fns";
|
|
18
|
-
import { V as
|
|
19
|
-
function
|
|
18
|
+
import { V as Ve } from "./headless-styles-CmcyA_pi.js";
|
|
19
|
+
function Bt(e) {
|
|
20
20
|
return { evid: 40, src: 16, endpoint: "", params: e };
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var be = /* @__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;
|
|
@@ -30,14 +30,14 @@ var Q = /* @__PURE__ */ (function(e) {
|
|
|
30
30
|
})({}), te = /* @__PURE__ */ (function(e) {
|
|
31
31
|
return e.LOAD = "load", e.CLICK = "click", e;
|
|
32
32
|
})({});
|
|
33
|
-
const
|
|
33
|
+
const Ut = (e) => {
|
|
34
34
|
var n;
|
|
35
35
|
return {
|
|
36
36
|
bookingsServiceId: e == null ? void 0 : e.id,
|
|
37
37
|
formGuid: (n = e == null ? void 0 : e.form) == null ? void 0 : n.id,
|
|
38
|
-
serviceProperties:
|
|
38
|
+
serviceProperties: xt(e)
|
|
39
39
|
};
|
|
40
|
-
},
|
|
40
|
+
}, xt = (e) => {
|
|
41
41
|
var n;
|
|
42
42
|
return JSON.stringify({
|
|
43
43
|
serviceId: e == null ? void 0 : e.id,
|
|
@@ -46,14 +46,14 @@ const Bt = (e) => {
|
|
|
46
46
|
staffMemberIds: e == null ? void 0 : e.staffMemberIds,
|
|
47
47
|
isOfferedAsPricingPlan: !1
|
|
48
48
|
});
|
|
49
|
-
},
|
|
49
|
+
}, qe = (e) => {
|
|
50
50
|
var u;
|
|
51
|
-
const { appointmentFieldProps: n } = ke(), { isEditor: t, isComposer: a } = ce(), s =
|
|
51
|
+
const { appointmentFieldProps: n } = ke(), { isEditor: t, isComposer: a } = ce(), s = ct(), 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,
|
|
55
|
-
report: (i) => s == null ? void 0 : s.report(
|
|
56
|
-
...
|
|
55
|
+
report: (i) => s == null ? void 0 : s.report(Bt({
|
|
56
|
+
...Ut(r),
|
|
57
57
|
...i
|
|
58
58
|
}))
|
|
59
59
|
};
|
|
@@ -62,38 +62,38 @@ var ge;
|
|
|
62
62
|
(function(e) {
|
|
63
63
|
e.UNDEFINED = "UNDEFINED", e.OWNER_BUSINESS = "OWNER_BUSINESS", e.OWNER_CUSTOM = "OWNER_CUSTOM", e.CUSTOM = "CUSTOM";
|
|
64
64
|
})(ge || (ge = {}));
|
|
65
|
-
var Be;
|
|
66
|
-
(function(e) {
|
|
67
|
-
e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
|
|
68
|
-
})(Be || (Be = {}));
|
|
69
65
|
var Ue;
|
|
70
66
|
(function(e) {
|
|
71
|
-
e.
|
|
67
|
+
e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
|
|
72
68
|
})(Ue || (Ue = {}));
|
|
73
69
|
var xe;
|
|
74
70
|
(function(e) {
|
|
75
|
-
e.
|
|
71
|
+
e.UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE", e.BUSINESS = "BUSINESS", e.CUSTOM = "CUSTOM", e.CUSTOMER = "CUSTOMER";
|
|
76
72
|
})(xe || (xe = {}));
|
|
77
73
|
var Pe;
|
|
78
74
|
(function(e) {
|
|
79
|
-
e.
|
|
75
|
+
e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
|
|
80
76
|
})(Pe || (Pe = {}));
|
|
81
|
-
|
|
77
|
+
var ze;
|
|
78
|
+
(function(e) {
|
|
79
|
+
e.ASC = "ASC", e.DESC = "DESC";
|
|
80
|
+
})(ze || (ze = {}));
|
|
81
|
+
const Pt = (e) => {
|
|
82
82
|
const { service: n } = e || {};
|
|
83
83
|
return (n == null ? void 0 : n.id) ? null : {
|
|
84
|
-
type:
|
|
84
|
+
type: be.GENERAL,
|
|
85
85
|
message: "Service ID is missing"
|
|
86
86
|
};
|
|
87
|
-
},
|
|
88
|
-
const { initialData: a } = e, s =
|
|
87
|
+
}, zt = ({ appointmentFieldProps: e, isEditor: n, isComposer: t }) => {
|
|
88
|
+
const { initialData: a } = e, s = Kt();
|
|
89
89
|
if (n || t)
|
|
90
90
|
return {
|
|
91
91
|
...s,
|
|
92
|
-
timezone:
|
|
92
|
+
timezone: je(),
|
|
93
93
|
dataStatus: z.DONE
|
|
94
94
|
};
|
|
95
95
|
{
|
|
96
|
-
const r =
|
|
96
|
+
const r = Pt(a);
|
|
97
97
|
if (r)
|
|
98
98
|
return {
|
|
99
99
|
dataStatus: z.ERROR,
|
|
@@ -104,7 +104,7 @@ const xt = (e) => {
|
|
|
104
104
|
...s,
|
|
105
105
|
dataStatus: z.LOADING
|
|
106
106
|
};
|
|
107
|
-
},
|
|
107
|
+
}, Ht = (e, n) => {
|
|
108
108
|
const t = /* @__PURE__ */ new Date(), a = new Date(t);
|
|
109
109
|
a.setMonth(a.getMonth() + e);
|
|
110
110
|
const s = new Date(t.toLocaleString("en-US", {
|
|
@@ -116,11 +116,11 @@ const xt = (e) => {
|
|
|
116
116
|
startDate: s,
|
|
117
117
|
endDate: r
|
|
118
118
|
};
|
|
119
|
-
},
|
|
119
|
+
}, je = () => Intl.DateTimeFormat().resolvedOptions().timeZone, Yt = (e) => {
|
|
120
120
|
var n, t, a;
|
|
121
121
|
if ((t = (n = e == null ? void 0 : e[0]) == null ? void 0 : n.slot) != null && t.startDate)
|
|
122
122
|
return new Date((a = e[0].slot) == null ? void 0 : a.startDate);
|
|
123
|
-
},
|
|
123
|
+
}, Kt = ({ duration: e = 60, timezone: n = "UTC" } = {}) => {
|
|
124
124
|
var E, f;
|
|
125
125
|
const t = "267d1c11-8019-4e3d-b9c6-cd2b859c69e2", a = /* @__PURE__ */ new Date(), s = [], r = [], u = a.toISOString().split("T")[0], i = 10, l = 18;
|
|
126
126
|
let c = /* @__PURE__ */ new Date(`${u}T${i}:00:00`), d = new Date(c);
|
|
@@ -156,59 +156,59 @@ const xt = (e) => {
|
|
|
156
156
|
selectedDate: s.length > 0 && ((f = (E = s[0]) == null ? void 0 : E.slot) != null && f.startDate) ? new Date(s[0].slot.startDate) : void 0
|
|
157
157
|
};
|
|
158
158
|
};
|
|
159
|
-
function
|
|
159
|
+
function $t(e) {
|
|
160
160
|
var f;
|
|
161
|
-
const { initialData: n, onChange: t, value: a } = e, { isEditor: s, isComposer: r } = ce(), u = (f = n == null ? void 0 : n.service) == null ? void 0 : f.id, { actions: i } =
|
|
161
|
+
const { initialData: n, onChange: t, value: a } = e, { isEditor: s, isComposer: r } = ce(), u = (f = n == null ? void 0 : n.service) == null ? void 0 : f.id, { actions: i } = we(), l = J(i);
|
|
162
162
|
l.current = i;
|
|
163
|
-
const c = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [d, S] = j(null), E =
|
|
163
|
+
const c = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [d, S] = j(null), E = qe(n == null ? void 0 : n.service);
|
|
164
164
|
return H(() => {
|
|
165
165
|
u && !s && !r && c && (async () => {
|
|
166
|
-
var W,
|
|
167
|
-
const
|
|
166
|
+
var W, A, N, Y, B;
|
|
167
|
+
const w = je(), b = {
|
|
168
168
|
currentSlotBulkSize: V,
|
|
169
|
-
timezone:
|
|
169
|
+
timezone: w,
|
|
170
170
|
dataStatus: z.LOADING
|
|
171
171
|
};
|
|
172
172
|
try {
|
|
173
173
|
const U = async (oe) => {
|
|
174
|
-
var
|
|
175
|
-
const { startDate: se, endDate: $ } =
|
|
176
|
-
return (
|
|
174
|
+
var v, p;
|
|
175
|
+
const { startDate: se, endDate: $ } = Ht(oe, w);
|
|
176
|
+
return (p = (v = l.current) == null ? void 0 : v.getAvailabilityDates) == null ? void 0 : p.call(v, {
|
|
177
177
|
serviceId: u,
|
|
178
178
|
fromDate: se,
|
|
179
179
|
toDate: $,
|
|
180
|
-
timeZone:
|
|
180
|
+
timeZone: w
|
|
181
181
|
});
|
|
182
182
|
};
|
|
183
|
-
if (
|
|
183
|
+
if (b.availabilityDates = await U(2), (W = b.availabilityDates) != null && W.length || (b.availabilityDates = await U(6)), !((A = b.availabilityDates) != null && A.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: be.NO_AVAILABILITY_DATES_FOUND,
|
|
191
191
|
message: "No availability dates found"
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
b.selectedDate = Yt(b.availabilityDates), b.selectedDate && (b.availabilitySlots = await ((Y = (N = l.current) == null ? void 0 : N.getAvailabilitySlots) == null ? void 0 : Y.call(N, {
|
|
197
197
|
serviceId: u,
|
|
198
|
-
timeZone:
|
|
199
|
-
selectedDate:
|
|
198
|
+
timeZone: w,
|
|
199
|
+
selectedDate: b.selectedDate
|
|
200
200
|
}))), E == null || E.report({
|
|
201
201
|
action: te.LOAD,
|
|
202
|
-
component: (B =
|
|
202
|
+
component: (B = b.availabilityDates) != null && B.length ? Q.FORM : Q.NO_AVAILABILITY_FOR_DATE
|
|
203
203
|
}), a != null && a.startDate || t(void 0), S({
|
|
204
|
-
...
|
|
204
|
+
...b,
|
|
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: be.GENERAL,
|
|
212
212
|
message: "An error occurred in initialAppointmentState"
|
|
213
213
|
}
|
|
214
214
|
});
|
|
@@ -221,16 +221,16 @@ function Kt(e) {
|
|
|
221
221
|
c
|
|
222
222
|
]), d;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const Qe = /* @__PURE__ */ Ge({
|
|
225
225
|
appointmentState: {},
|
|
226
226
|
setAppointmentState: () => {
|
|
227
227
|
}
|
|
228
|
-
}),
|
|
229
|
-
const { isEditor: t, isComposer: a } = ce(), [s, r] = j(() =>
|
|
228
|
+
}), Gt = ({ appointmentFieldProps: e, children: n }) => {
|
|
229
|
+
const { isEditor: t, isComposer: a } = ce(), [s, r] = j(() => zt({
|
|
230
230
|
appointmentFieldProps: e,
|
|
231
231
|
isEditor: t,
|
|
232
232
|
isComposer: a
|
|
233
|
-
})), u =
|
|
233
|
+
})), u = $t(e);
|
|
234
234
|
return H(() => {
|
|
235
235
|
u && r({
|
|
236
236
|
...s,
|
|
@@ -238,7 +238,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
238
238
|
});
|
|
239
239
|
}, [
|
|
240
240
|
u
|
|
241
|
-
]), /* @__PURE__ */ o.createElement(
|
|
241
|
+
]), /* @__PURE__ */ o.createElement(Qe.Provider, {
|
|
242
242
|
value: {
|
|
243
243
|
appointmentFieldProps: e,
|
|
244
244
|
appointmentState: s,
|
|
@@ -248,7 +248,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
248
248
|
})
|
|
249
249
|
}
|
|
250
250
|
}, n);
|
|
251
|
-
}, ke = () =>
|
|
251
|
+
}, ke = () => Ze(Qe), Zt = (e, n) => {
|
|
252
252
|
if (e.startOfWeek.getMonth() === e.endOfWeek.getMonth())
|
|
253
253
|
return new Intl.DateTimeFormat(n, {
|
|
254
254
|
month: "long",
|
|
@@ -261,28 +261,28 @@ const je = /* @__PURE__ */ $e({
|
|
|
261
261
|
year: "numeric"
|
|
262
262
|
}).format(e.endOfWeek);
|
|
263
263
|
return `${t} - ${a}`;
|
|
264
|
-
},
|
|
264
|
+
}, Vt = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) || !(e != null && e.timeZone) ? null : {
|
|
265
265
|
startDate: e == null ? void 0 : e.startDate,
|
|
266
266
|
endDate: e == null ? void 0 : e.endDate,
|
|
267
267
|
timeZone: e == null ? void 0 : e.timeZone
|
|
268
|
-
},
|
|
268
|
+
}, He = ({ timezone: e, language: n, formatType: t }) => {
|
|
269
269
|
var s;
|
|
270
270
|
return (s = new Intl.DateTimeFormat(n, {
|
|
271
271
|
timeZone: e,
|
|
272
272
|
timeZoneName: t === "name" ? "long" : "short"
|
|
273
273
|
}).formatToParts(/* @__PURE__ */ new Date()).find(({ type: r }) => r === "timeZoneName")) == null ? void 0 : s.value;
|
|
274
|
-
},
|
|
275
|
-
const t =
|
|
274
|
+
}, qt = ({ timezone: e, language: n }) => {
|
|
275
|
+
const t = He({
|
|
276
276
|
timezone: e,
|
|
277
277
|
language: n,
|
|
278
278
|
formatType: "name"
|
|
279
|
-
}), a =
|
|
279
|
+
}), a = He({
|
|
280
280
|
timezone: e,
|
|
281
281
|
language: n,
|
|
282
282
|
formatType: "offset"
|
|
283
283
|
});
|
|
284
284
|
return `${t} (${a})`;
|
|
285
|
-
}, ne = (e, n) => e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate(),
|
|
285
|
+
}, ne = (e, n) => e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate(), jt = (e, n) => {
|
|
286
286
|
const t = new Date(e);
|
|
287
287
|
t.setDate(e.getDate() - n);
|
|
288
288
|
const a = new Date(e);
|
|
@@ -290,14 +290,14 @@ const je = /* @__PURE__ */ $e({
|
|
|
290
290
|
fromDate: t,
|
|
291
291
|
toDate: a
|
|
292
292
|
};
|
|
293
|
-
},
|
|
294
|
-
const { appointmentFieldProps: n, appointmentState: t, setAppointmentState: a } = ke(), { value: s } = n, { actions: r } =
|
|
293
|
+
}, Qt = ({ setIsReloadingSlots: e }) => {
|
|
294
|
+
const { appointmentFieldProps: n, appointmentState: t, setAppointmentState: a } = ke(), { value: s } = n, { actions: r } = we();
|
|
295
295
|
H(() => {
|
|
296
296
|
(async () => {
|
|
297
297
|
var i, l;
|
|
298
298
|
if (s != null && s.startDate && (t != null && t.selectedDate) && (t == null ? void 0 : t.dataStatus) === z.DONE && !ne(new Date(s.startDate), t == null ? void 0 : t.selectedDate)) {
|
|
299
299
|
e(!0);
|
|
300
|
-
const d = new Date(s.startDate), { fromDate: S, toDate: E } =
|
|
300
|
+
const d = new Date(s.startDate), { fromDate: S, toDate: E } = jt(d, 8), [f, g] = await Promise.all([
|
|
301
301
|
(i = r == null ? void 0 : r.getAvailabilityDates) == null ? void 0 : i.call(r, {
|
|
302
302
|
serviceId: n == null ? void 0 : n.initialData.service.id,
|
|
303
303
|
timeZone: (t == null ? void 0 : t.timezone) || "",
|
|
@@ -321,22 +321,22 @@ const je = /* @__PURE__ */ $e({
|
|
|
321
321
|
s,
|
|
322
322
|
t == null ? void 0 : t.dataStatus
|
|
323
323
|
]);
|
|
324
|
-
},
|
|
324
|
+
}, Jt = (e, n) => !e || !n.length ? e : e.filter((t) => {
|
|
325
325
|
var a;
|
|
326
326
|
return !n.includes(((a = t == null ? void 0 : t.slot) == null ? void 0 : a.startDate) ?? "");
|
|
327
|
-
}), Ee = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`,
|
|
327
|
+
}), Ee = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`, Xt = ({ locale: e, endDate: n, startDate: t, timezone: a }) => {
|
|
328
328
|
const s = {
|
|
329
329
|
hour: "numeric",
|
|
330
330
|
minute: "numeric",
|
|
331
331
|
timeZone: a
|
|
332
332
|
}, r = new Intl.DateTimeFormat(e, s).format(new Date(t)), u = new Intl.DateTimeFormat(e, s).format(new Date(n));
|
|
333
333
|
return `${r} - ${u}`;
|
|
334
|
-
},
|
|
334
|
+
}, en = ({ selectedDate: e, locale: n, timezone: t }) => e ? new Intl.DateTimeFormat(n, {
|
|
335
335
|
weekday: "long",
|
|
336
336
|
month: "short",
|
|
337
337
|
day: "numeric",
|
|
338
338
|
timeZone: t
|
|
339
|
-
}).format(e) : "",
|
|
339
|
+
}).format(e) : "", tn = (e, n) => {
|
|
340
340
|
let t;
|
|
341
341
|
return n.forEach((a, s) => {
|
|
342
342
|
var r, u;
|
|
@@ -346,14 +346,14 @@ const je = /* @__PURE__ */ $e({
|
|
|
346
346
|
}) === e && (t = s);
|
|
347
347
|
}), t;
|
|
348
348
|
};
|
|
349
|
-
var
|
|
349
|
+
var nn = /* @__PURE__ */ (function(e) {
|
|
350
350
|
return e.OS_LOCATION = "OS_LOCATION", e.CUSTOM_LOCATION = "CUSTOM_LOCATION", e;
|
|
351
351
|
})({});
|
|
352
|
-
const
|
|
352
|
+
const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
|
|
353
353
|
var n;
|
|
354
|
-
return ((n = e == null ? void 0 : e.params) == null ? void 0 : n.reason) ===
|
|
355
|
-
},
|
|
356
|
-
const { isExperimentEnabled: t } =
|
|
354
|
+
return ((n = e == null ? void 0 : e.params) == null ? void 0 : n.reason) === an;
|
|
355
|
+
}, sn = ({ error: e, selectedSlot: n }) => {
|
|
356
|
+
const { isExperimentEnabled: t } = mt(), a = t(ut.BIF_SLOT_HOLD), [s, r] = j(Ye), u = a && on(e), i = n == null ? void 0 : n.startDate, l = J(!1);
|
|
357
357
|
return H(() => {
|
|
358
358
|
if (!u) {
|
|
359
359
|
l.current = !1;
|
|
@@ -366,151 +366,151 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
366
366
|
}, [
|
|
367
367
|
u,
|
|
368
368
|
i
|
|
369
|
-
]), a ? s :
|
|
369
|
+
]), a ? s : Ye;
|
|
370
370
|
}, q = 7, Te = (e) => {
|
|
371
371
|
const n = new Date(e);
|
|
372
372
|
return n.setHours(0, 0, 0, 0), n;
|
|
373
|
-
},
|
|
373
|
+
}, rn = (e) => {
|
|
374
374
|
const n = new Date(e);
|
|
375
375
|
return n.setHours(23, 59, 59, 999), n;
|
|
376
376
|
}, ee = (e, n) => {
|
|
377
377
|
const t = new Date(e);
|
|
378
378
|
return t.setDate(t.getDate() + n), t;
|
|
379
|
-
},
|
|
379
|
+
}, Ke = (e, n) => {
|
|
380
380
|
const t = Te(e), a = (t.getDay() - n + q) % q;
|
|
381
381
|
return ee(t, -a);
|
|
382
|
-
},
|
|
382
|
+
}, ln = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, cn = (e, n, t) => {
|
|
383
383
|
const a = new Intl.DateTimeFormat(t, {
|
|
384
384
|
month: "short",
|
|
385
385
|
day: "numeric"
|
|
386
386
|
});
|
|
387
387
|
return typeof a.formatRange == "function" ? a.formatRange(e, n) : `${a.format(e)} - ${a.format(n)}`;
|
|
388
|
-
},
|
|
388
|
+
}, mn = (e, n = []) => n.some((t) => {
|
|
389
389
|
var a;
|
|
390
390
|
return !!((a = t.slot) != null && a.startDate) && ne(new Date(t.slot.startDate), e);
|
|
391
|
-
}),
|
|
391
|
+
}), un = () => {
|
|
392
392
|
var he;
|
|
393
|
-
const { appointmentFieldProps: e, appointmentState: n, setAppointmentState: t } = ke(), { language: a, isEditor: s, isComposer: r, isMobile: u } = ce(), { t: i } =
|
|
394
|
-
|
|
393
|
+
const { appointmentFieldProps: e, appointmentState: n, setAppointmentState: t } = ke(), { language: a, isEditor: s, isComposer: r, isMobile: u } = ce(), { t: i } = dt(), { actions: l } = we(), c = qe(), [d, S] = j(!1), [E, f] = j(!1), [g, w] = j(), [b, W] = j();
|
|
394
|
+
Qt({
|
|
395
395
|
setIsReloadingSlots: S
|
|
396
396
|
});
|
|
397
|
-
const { onChange:
|
|
397
|
+
const { onChange: A, value: N, target: Y, initialData: B, formatDescription: U, locationType: oe, error: se } = e, { availabilityDates: $, availabilitySlots: v, timezone: p = "", selectedDate: L, 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 = sn({
|
|
398
398
|
error: se,
|
|
399
|
-
selectedSlot:
|
|
400
|
-
}),
|
|
401
|
-
|
|
399
|
+
selectedSlot: N
|
|
400
|
+
}), y = P(() => Jt(v, Me), [
|
|
401
|
+
v,
|
|
402
402
|
Me
|
|
403
403
|
]);
|
|
404
404
|
H(() => {
|
|
405
|
-
|
|
405
|
+
A == null || A(Vt(N));
|
|
406
406
|
}, [
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
]),
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
availabilitySlots:
|
|
414
|
-
var
|
|
415
|
-
return ((
|
|
407
|
+
N == null ? void 0 : N.startDate,
|
|
408
|
+
N == null ? void 0 : N.endDate,
|
|
409
|
+
p
|
|
410
|
+
]), ft((D) => {
|
|
411
|
+
const I = D == null ? void 0 : D[Y];
|
|
412
|
+
v != null && v.length && t({
|
|
413
|
+
availabilitySlots: v.filter((O) => {
|
|
414
|
+
var R;
|
|
415
|
+
return ((R = O == null ? void 0 : O.slot) == null ? void 0 : R.startDate) !== (I == null ? void 0 : I.startDate);
|
|
416
416
|
})
|
|
417
417
|
});
|
|
418
418
|
}), H(() => {
|
|
419
|
-
if (
|
|
420
|
-
const D =
|
|
419
|
+
if (y != null && y.length && k) {
|
|
420
|
+
const D = tn(Ee(N ?? void 0), y);
|
|
421
421
|
D && D + 1 > k && t({
|
|
422
422
|
currentSlotBulkSize: D + 1
|
|
423
423
|
});
|
|
424
|
-
} else !(
|
|
424
|
+
} else !(y != null && y.length) && N && (A == null || A(void 0));
|
|
425
425
|
}, [
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
N,
|
|
427
|
+
y,
|
|
428
428
|
$
|
|
429
429
|
]);
|
|
430
|
-
const _e = P(() =>
|
|
430
|
+
const _e = P(() => _t(a), [
|
|
431
431
|
a
|
|
432
|
-
]), Fe = J(
|
|
432
|
+
]), Fe = J(L);
|
|
433
433
|
H(() => {
|
|
434
434
|
const D = Fe.current;
|
|
435
|
-
Fe.current =
|
|
435
|
+
Fe.current = L, !!L && (!D || !ne(D, L)) && w(void 0);
|
|
436
436
|
}, [
|
|
437
|
-
|
|
437
|
+
L
|
|
438
438
|
]);
|
|
439
|
-
const h = P(() => g ??
|
|
439
|
+
const h = P(() => g ?? Ke(L ?? /* @__PURE__ */ new Date(), _e), [
|
|
440
440
|
g,
|
|
441
|
-
|
|
441
|
+
L,
|
|
442
442
|
_e
|
|
443
|
-
]),
|
|
444
|
-
const D = Te(/* @__PURE__ */ new Date()),
|
|
443
|
+
]), et = P(() => {
|
|
444
|
+
const D = Te(/* @__PURE__ */ new Date()), I = new Intl.DateTimeFormat(a, {
|
|
445
445
|
weekday: u ? "narrow" : "short"
|
|
446
|
-
}),
|
|
446
|
+
}), O = new Intl.DateTimeFormat(a, {
|
|
447
447
|
day: "numeric"
|
|
448
|
-
}),
|
|
448
|
+
}), R = new Intl.DateTimeFormat(a, {
|
|
449
449
|
weekday: "long",
|
|
450
450
|
month: "long",
|
|
451
451
|
day: "numeric"
|
|
452
452
|
});
|
|
453
453
|
return Array.from({
|
|
454
454
|
length: q
|
|
455
|
-
}, (re,
|
|
456
|
-
const x = ee(h,
|
|
455
|
+
}, (re, Ie) => {
|
|
456
|
+
const x = ee(h, Ie), Oe = !!L && ne(x, L), it = Te(x) < D;
|
|
457
457
|
return {
|
|
458
|
-
key:
|
|
458
|
+
key: ln(x),
|
|
459
459
|
date: x,
|
|
460
|
-
isSelected:
|
|
461
|
-
isAvailable: !Z && !X && !
|
|
462
|
-
isDisabled:
|
|
460
|
+
isSelected: Oe,
|
|
461
|
+
isAvailable: !Z && !X && !Oe && mn(x, $),
|
|
462
|
+
isDisabled: it || X && !Oe,
|
|
463
463
|
isToday: ne(x, D),
|
|
464
|
-
dayOfMonthLabel:
|
|
465
|
-
weekdayLabel:
|
|
466
|
-
label:
|
|
464
|
+
dayOfMonthLabel: O.format(x),
|
|
465
|
+
weekdayLabel: I.format(x),
|
|
466
|
+
label: R.format(x),
|
|
467
467
|
availabilityLabel: i("form.appointment.accessibility.calendar.has-availability.aria-label")
|
|
468
468
|
};
|
|
469
469
|
});
|
|
470
470
|
}, [
|
|
471
471
|
h,
|
|
472
|
-
|
|
472
|
+
L,
|
|
473
473
|
$,
|
|
474
474
|
Z,
|
|
475
475
|
X,
|
|
476
476
|
a,
|
|
477
477
|
u,
|
|
478
478
|
i
|
|
479
|
-
]),
|
|
480
|
-
const { startDate:
|
|
481
|
-
if (!
|
|
479
|
+
]), Le = Ee(N ?? void 0) || void 0, ye = P(() => Z || d ? [] : (y ?? []).slice(0, k).flatMap((D) => {
|
|
480
|
+
const { startDate: I, endDate: O } = D.slot ?? {};
|
|
481
|
+
if (!I || !O)
|
|
482
482
|
return [];
|
|
483
|
-
const
|
|
484
|
-
startDate:
|
|
485
|
-
endDate:
|
|
483
|
+
const R = Ee({
|
|
484
|
+
startDate: I,
|
|
485
|
+
endDate: O
|
|
486
486
|
});
|
|
487
487
|
return [
|
|
488
488
|
{
|
|
489
|
-
key:
|
|
490
|
-
startDate:
|
|
491
|
-
endDate:
|
|
492
|
-
timeRange:
|
|
493
|
-
startDate:
|
|
494
|
-
endDate:
|
|
489
|
+
key: R,
|
|
490
|
+
startDate: I,
|
|
491
|
+
endDate: O,
|
|
492
|
+
timeRange: Xt({
|
|
493
|
+
startDate: I,
|
|
494
|
+
endDate: O,
|
|
495
495
|
locale: a,
|
|
496
|
-
timezone:
|
|
496
|
+
timezone: p
|
|
497
497
|
}),
|
|
498
|
-
isSelected:
|
|
498
|
+
isSelected: R === Le
|
|
499
499
|
}
|
|
500
500
|
];
|
|
501
501
|
}), [
|
|
502
|
-
|
|
502
|
+
y,
|
|
503
503
|
k,
|
|
504
504
|
Z,
|
|
505
505
|
d,
|
|
506
506
|
a,
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
]),
|
|
507
|
+
p,
|
|
508
|
+
Le
|
|
509
|
+
]), Ae = !d && !!(y != null && y.length) && (k || V) < y.length, Ne = h > Ke(/* @__PURE__ */ new Date(), _e), tt = ie(
|
|
510
510
|
async (D) => {
|
|
511
|
-
var
|
|
512
|
-
if (!(X ||
|
|
513
|
-
S(!0),
|
|
511
|
+
var I;
|
|
512
|
+
if (!(X || L && ne(D, L))) {
|
|
513
|
+
S(!0), A == null || A(void 0), t({
|
|
514
514
|
currentSlotBulkSize: V,
|
|
515
515
|
selectedDate: D,
|
|
516
516
|
availabilitySlots: void 0
|
|
@@ -519,15 +519,15 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
519
519
|
component: Q.DATE
|
|
520
520
|
});
|
|
521
521
|
try {
|
|
522
|
-
const
|
|
522
|
+
const O = await ((I = l == null ? void 0 : l.getAvailabilitySlots) == null ? void 0 : I.call(l, {
|
|
523
523
|
serviceId: K,
|
|
524
|
-
timeZone:
|
|
524
|
+
timeZone: p,
|
|
525
525
|
selectedDate: D
|
|
526
526
|
}));
|
|
527
527
|
t({
|
|
528
528
|
currentSlotBulkSize: V,
|
|
529
529
|
selectedDate: D,
|
|
530
|
-
availabilitySlots:
|
|
530
|
+
availabilitySlots: O
|
|
531
531
|
});
|
|
532
532
|
} catch {
|
|
533
533
|
} finally {
|
|
@@ -538,79 +538,79 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
538
538
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
539
539
|
[
|
|
540
540
|
X,
|
|
541
|
-
|
|
541
|
+
L,
|
|
542
542
|
K,
|
|
543
|
-
|
|
543
|
+
p,
|
|
544
544
|
l,
|
|
545
|
-
|
|
545
|
+
A,
|
|
546
546
|
c
|
|
547
547
|
]
|
|
548
|
-
), de = J(0),
|
|
548
|
+
), de = J(0), nt = ie(
|
|
549
549
|
async (D) => {
|
|
550
550
|
var re;
|
|
551
|
-
if (D < 0 && !
|
|
551
|
+
if (D < 0 && !Ne)
|
|
552
552
|
return;
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
553
|
+
const I = h, O = ee(h, D * q);
|
|
554
|
+
if (w(O), s || r)
|
|
555
555
|
return;
|
|
556
|
-
const
|
|
556
|
+
const R = ++de.current;
|
|
557
557
|
f(!0), c == null || c.report({
|
|
558
558
|
action: te.CLICK,
|
|
559
559
|
component: Q.PAGINATION
|
|
560
560
|
});
|
|
561
561
|
try {
|
|
562
|
-
const
|
|
562
|
+
const Ie = await ((re = l == null ? void 0 : l.getAvailabilityDates) == null ? void 0 : re.call(l, {
|
|
563
563
|
serviceId: K,
|
|
564
|
-
timeZone:
|
|
565
|
-
fromDate:
|
|
566
|
-
toDate:
|
|
564
|
+
timeZone: p,
|
|
565
|
+
fromDate: O,
|
|
566
|
+
toDate: rn(ee(O, q - 1))
|
|
567
567
|
}));
|
|
568
|
-
|
|
569
|
-
availabilityDates:
|
|
568
|
+
R === de.current && t({
|
|
569
|
+
availabilityDates: Ie
|
|
570
570
|
});
|
|
571
571
|
} catch {
|
|
572
|
-
|
|
572
|
+
R === de.current && w(I);
|
|
573
573
|
} finally {
|
|
574
|
-
|
|
574
|
+
R === de.current && f(!1);
|
|
575
575
|
}
|
|
576
576
|
},
|
|
577
577
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
578
578
|
[
|
|
579
|
-
|
|
579
|
+
Ne,
|
|
580
580
|
h,
|
|
581
581
|
s,
|
|
582
582
|
r,
|
|
583
583
|
K,
|
|
584
|
-
|
|
584
|
+
p,
|
|
585
585
|
l,
|
|
586
586
|
c
|
|
587
587
|
]
|
|
588
|
-
),
|
|
588
|
+
), at = ie(
|
|
589
589
|
(D) => {
|
|
590
|
-
const
|
|
591
|
-
if (!
|
|
590
|
+
const I = ye.find((re) => re.key === D);
|
|
591
|
+
if (!I)
|
|
592
592
|
return;
|
|
593
|
-
const { startDate:
|
|
593
|
+
const { startDate: O, endDate: R } = I;
|
|
594
594
|
c == null || c.report({
|
|
595
595
|
action: te.CLICK,
|
|
596
596
|
component: Q.SLOT,
|
|
597
|
-
startTime: new Date(
|
|
598
|
-
endTime: new Date(
|
|
599
|
-
}),
|
|
600
|
-
startDate:
|
|
601
|
-
endDate:
|
|
602
|
-
timeZone:
|
|
597
|
+
startTime: new Date(O).valueOf(),
|
|
598
|
+
endTime: new Date(R).valueOf()
|
|
599
|
+
}), A == null || A({
|
|
600
|
+
startDate: O,
|
|
601
|
+
endDate: R,
|
|
602
|
+
timeZone: p
|
|
603
603
|
});
|
|
604
604
|
},
|
|
605
605
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
606
606
|
[
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
607
|
+
ye,
|
|
608
|
+
p,
|
|
609
|
+
A,
|
|
610
610
|
c
|
|
611
611
|
]
|
|
612
|
-
),
|
|
613
|
-
if (!
|
|
612
|
+
), ot = ie(() => {
|
|
613
|
+
if (!Ae)
|
|
614
614
|
return;
|
|
615
615
|
const D = k || V;
|
|
616
616
|
c == null || c.report({
|
|
@@ -620,69 +620,69 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
620
620
|
currentSlotBulkSize: D + V
|
|
621
621
|
});
|
|
622
622
|
}, [
|
|
623
|
-
|
|
623
|
+
Ae,
|
|
624
624
|
k,
|
|
625
625
|
c
|
|
626
|
-
]),
|
|
626
|
+
]), st = ie(() => W(void 0), []), rt = P(() => {
|
|
627
627
|
if (pe)
|
|
628
628
|
return i("form.appointment.empty-state.notification.text");
|
|
629
|
-
if (!Z && !d && !(
|
|
629
|
+
if (!Z && !d && !(y != null && y.length))
|
|
630
630
|
return i("form.appointment.slots-not-found.text");
|
|
631
631
|
}, [
|
|
632
632
|
pe,
|
|
633
633
|
Z,
|
|
634
634
|
d,
|
|
635
|
-
|
|
635
|
+
y == null ? void 0 : y.length,
|
|
636
636
|
i
|
|
637
637
|
]);
|
|
638
638
|
return {
|
|
639
|
-
days:
|
|
640
|
-
slots:
|
|
641
|
-
selectedSlotKey:
|
|
642
|
-
selectDate:
|
|
643
|
-
selectSlot:
|
|
644
|
-
changeWeek:
|
|
645
|
-
showMoreSlots:
|
|
646
|
-
canGoToPreviousWeek:
|
|
647
|
-
hasMoreSlots:
|
|
639
|
+
days: et,
|
|
640
|
+
slots: ye,
|
|
641
|
+
selectedSlotKey: Le,
|
|
642
|
+
selectDate: tt,
|
|
643
|
+
selectSlot: at,
|
|
644
|
+
changeWeek: nt,
|
|
645
|
+
showMoreSlots: ot,
|
|
646
|
+
canGoToPreviousWeek: Ne,
|
|
647
|
+
hasMoreSlots: Ae,
|
|
648
648
|
hasError: pe,
|
|
649
649
|
isLoading: Z,
|
|
650
650
|
isRefetching: X,
|
|
651
651
|
isReloadingSlots: d,
|
|
652
|
-
weekRangeLabel:
|
|
653
|
-
weekCaptionLabel:
|
|
652
|
+
weekRangeLabel: cn(h, ee(h, q - 1), a),
|
|
653
|
+
weekCaptionLabel: Zt({
|
|
654
654
|
startOfWeek: h,
|
|
655
655
|
endOfWeek: ee(h, q - 1)
|
|
656
656
|
}, a),
|
|
657
|
-
selectedDateLabel:
|
|
658
|
-
selectedDate:
|
|
657
|
+
selectedDateLabel: en({
|
|
658
|
+
selectedDate: L,
|
|
659
659
|
locale: a,
|
|
660
|
-
timezone:
|
|
660
|
+
timezone: p
|
|
661
661
|
}),
|
|
662
|
-
timezoneLabel:
|
|
663
|
-
timezone:
|
|
662
|
+
timezoneLabel: p ? `${i("form.appointment.timezone.label")}: ${qt({
|
|
663
|
+
timezone: p,
|
|
664
664
|
language: a
|
|
665
665
|
})}` : "",
|
|
666
|
-
formatLabel: oe ===
|
|
667
|
-
notificationMessage:
|
|
666
|
+
formatLabel: oe === nn.OS_LOCATION ? i("form.appointment.meeting-format.in-person-location-method-os-location") : U,
|
|
667
|
+
notificationMessage: rt,
|
|
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:
|
|
672
|
-
consumePendingFocusIndex:
|
|
671
|
+
pendingFocusIndex: b,
|
|
672
|
+
consumePendingFocusIndex: st
|
|
673
673
|
};
|
|
674
|
-
},
|
|
675
|
-
const e =
|
|
674
|
+
}, Je = Ge(void 0), Xe = (e) => `${e}-timezone-note`, F = () => {
|
|
675
|
+
const e = Ze(Je);
|
|
676
676
|
if (typeof e > "u")
|
|
677
677
|
throw new Error("Appointment parts must be used inside an <Appointment> component");
|
|
678
678
|
return e;
|
|
679
|
-
},
|
|
679
|
+
}, Re = () => {
|
|
680
680
|
const { disabled: e, readOnly: n } = me();
|
|
681
681
|
return !!e || !!n;
|
|
682
682
|
}, C = ({ children: e, className: n }) => {
|
|
683
683
|
const { days: t, selectDate: a, weekRangeLabel: s } = F(), r = T(e, C.PreviousWeek), u = T(e, C.Heading), i = T(e, C.NextWeek), l = T(e, C.Day) ?? /* @__PURE__ */ o.createElement(C.Day, null), c = P(() => t.filter((f) => f.isSelected).map((f) => f.key), [
|
|
684
684
|
t
|
|
685
|
-
]), d =
|
|
685
|
+
]), d = Re(), S = P(() => t.filter((f) => d || f.isDisabled).map((f) => f.key), [
|
|
686
686
|
t,
|
|
687
687
|
d
|
|
688
688
|
]), E = (f) => {
|
|
@@ -690,12 +690,12 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
690
690
|
return;
|
|
691
691
|
const [g] = [
|
|
692
692
|
...f
|
|
693
|
-
],
|
|
694
|
-
|
|
693
|
+
], w = t.find(({ key: b }) => b === g);
|
|
694
|
+
w && a(w.date);
|
|
695
695
|
};
|
|
696
696
|
return /* @__PURE__ */ o.createElement("div", {
|
|
697
697
|
className: n
|
|
698
|
-
}, r, u, i, /* @__PURE__ */ o.createElement(
|
|
698
|
+
}, r, u, i, /* @__PURE__ */ o.createElement(wt, {
|
|
699
699
|
"aria-label": s,
|
|
700
700
|
orientation: "horizontal",
|
|
701
701
|
selectionMode: "single",
|
|
@@ -706,8 +706,8 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
706
706
|
key: f.key,
|
|
707
707
|
day: f
|
|
708
708
|
}))));
|
|
709
|
-
},
|
|
710
|
-
const { changeWeek: t, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), u =
|
|
709
|
+
}, dn = ({ children: e, className: n }) => {
|
|
710
|
+
const { changeWeek: t, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), u = Re(), i = J(null), l = J(!1);
|
|
711
711
|
return H(() => {
|
|
712
712
|
var S, E, f;
|
|
713
713
|
if (a || !l.current)
|
|
@@ -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(ve, {
|
|
725
725
|
ref: i,
|
|
726
726
|
className: n,
|
|
727
727
|
"aria-label": s,
|
|
@@ -730,15 +730,15 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
730
730
|
l.current = !0, t(-1);
|
|
731
731
|
}
|
|
732
732
|
}, e ?? "‹");
|
|
733
|
-
},
|
|
734
|
-
const { changeWeek: t, nextWeekLabel: a } = F(), s =
|
|
735
|
-
return /* @__PURE__ */ o.createElement(
|
|
733
|
+
}, fn = ({ children: e, className: n }) => {
|
|
734
|
+
const { changeWeek: t, nextWeekLabel: a } = F(), s = Re();
|
|
735
|
+
return /* @__PURE__ */ o.createElement(ve, {
|
|
736
736
|
className: n,
|
|
737
737
|
"aria-label": a,
|
|
738
738
|
isDisabled: s,
|
|
739
739
|
onPress: () => t(1)
|
|
740
740
|
}, e ?? "›");
|
|
741
|
-
},
|
|
741
|
+
}, Dn = ({ children: e, className: n }) => {
|
|
742
742
|
const { weekCaptionLabel: t, weekRangeLabel: a } = F();
|
|
743
743
|
return /* @__PURE__ */ o.createElement("span", {
|
|
744
744
|
className: n,
|
|
@@ -749,11 +749,11 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
749
749
|
}) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
|
|
750
750
|
"aria-hidden": "true"
|
|
751
751
|
}, t), /* @__PURE__ */ o.createElement("span", {
|
|
752
|
-
style:
|
|
752
|
+
style: Ve
|
|
753
753
|
}, a)));
|
|
754
|
-
},
|
|
754
|
+
}, En = ({ children: e, className: n, ...t }) => {
|
|
755
755
|
const { day: a } = t;
|
|
756
|
-
return /* @__PURE__ */ o.createElement(
|
|
756
|
+
return /* @__PURE__ */ o.createElement(vt, {
|
|
757
757
|
id: a.key,
|
|
758
758
|
className: n,
|
|
759
759
|
textValue: a.label,
|
|
@@ -765,53 +765,53 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
765
765
|
date: new Date(a.date)
|
|
766
766
|
}) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", null, a.weekdayLabel), /* @__PURE__ */ o.createElement("span", null, a.dayOfMonthLabel)));
|
|
767
767
|
};
|
|
768
|
-
C.PreviousWeek =
|
|
769
|
-
C.Heading =
|
|
770
|
-
C.NextWeek =
|
|
771
|
-
C.Day =
|
|
772
|
-
const
|
|
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:
|
|
774
|
-
|
|
775
|
-
a && c ?
|
|
776
|
-
].filter(Boolean).join(" ") || void 0,
|
|
777
|
-
var
|
|
778
|
-
(G = (k = (
|
|
768
|
+
C.PreviousWeek = dn;
|
|
769
|
+
C.Heading = Dn;
|
|
770
|
+
C.NextWeek = fn;
|
|
771
|
+
C.Day = En;
|
|
772
|
+
const $e = '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: w, hasError: b } = me(), { inputId: W, labelId: A, ariaDescribedBy: N } = 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
|
+
N,
|
|
775
|
+
a && c ? Xe(W) : void 0
|
|
776
|
+
].filter(Boolean).join(" ") || void 0, v = (p) => {
|
|
777
|
+
var L, k, G;
|
|
778
|
+
(G = (k = (L = Y.current) == null ? void 0 : L.querySelectorAll($e)) == null ? void 0 : k[p]) == null || G.focus();
|
|
779
779
|
};
|
|
780
|
-
return
|
|
780
|
+
return Dt(() => {
|
|
781
781
|
var G, ue;
|
|
782
|
-
if (!!((G = Y.current) != null && G.querySelector(
|
|
783
|
-
|
|
782
|
+
if (!!((G = Y.current) != null && G.querySelector($e))) {
|
|
783
|
+
v(0);
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
const
|
|
786
|
+
const L = Array.from(((ue = document.getElementById(W)) == null ? void 0 : ue.querySelectorAll('[role="option"]')) ?? []), k = L.find((K) => K.getAttribute("aria-selected") === "true") ?? L.find((K) => K.getAttribute("aria-disabled") !== "true");
|
|
787
787
|
k == null || k.focus();
|
|
788
788
|
}, E), H(() => {
|
|
789
|
-
d !== void 0 && (
|
|
789
|
+
d !== void 0 && (v(d), S());
|
|
790
790
|
}, [
|
|
791
791
|
d,
|
|
792
792
|
s.length
|
|
793
793
|
]), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
|
|
794
794
|
role: "status",
|
|
795
|
-
style:
|
|
796
|
-
}, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(
|
|
795
|
+
style: Ve
|
|
796
|
+
}, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(kt, {
|
|
797
797
|
ref: Y,
|
|
798
798
|
className: n,
|
|
799
799
|
value: r ?? null,
|
|
800
800
|
onChange: u,
|
|
801
801
|
isDisabled: f,
|
|
802
802
|
isReadOnly: g,
|
|
803
|
-
isRequired:
|
|
804
|
-
isInvalid:
|
|
805
|
-
"aria-labelledby": se ? B :
|
|
803
|
+
isRequired: w,
|
|
804
|
+
isInvalid: b,
|
|
805
|
+
"aria-labelledby": se ? B : A,
|
|
806
806
|
"aria-describedby": $,
|
|
807
807
|
"data-refetch": l || void 0
|
|
808
808
|
}, le(U, {
|
|
809
809
|
labelId: B
|
|
810
|
-
}), s.map((
|
|
811
|
-
key:
|
|
812
|
-
slot:
|
|
810
|
+
}), s.map((p) => le(oe, {
|
|
811
|
+
key: p.key,
|
|
812
|
+
slot: p
|
|
813
813
|
}))));
|
|
814
|
-
},
|
|
814
|
+
}, Sn = ({ children: e, className: n, ...t }) => {
|
|
815
815
|
const { selectedDateLabel: a } = F(), { labelId: s } = t;
|
|
816
816
|
return a ? /* @__PURE__ */ o.createElement("div", {
|
|
817
817
|
id: s,
|
|
@@ -819,19 +819,19 @@ const Ke = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) =>
|
|
|
819
819
|
}, e ? e({
|
|
820
820
|
label: a
|
|
821
821
|
}) : a) : null;
|
|
822
|
-
},
|
|
822
|
+
}, pn = ({ children: e, className: n, ...t }) => {
|
|
823
823
|
const { slot: a } = t;
|
|
824
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(Mt, {
|
|
828
828
|
className: n
|
|
829
829
|
}, e ? e(a) : a.timeRange));
|
|
830
830
|
};
|
|
831
|
-
ae.Label =
|
|
832
|
-
ae.Slot =
|
|
831
|
+
ae.Label = Sn;
|
|
832
|
+
ae.Slot = pn;
|
|
833
833
|
const m = ({ children: e, className: n }) => {
|
|
834
|
-
const t = me(), { id: a, FieldLayout: s } = t, { labelId: r, inputId: u, ariaDescribedBy: i } = Se(), l =
|
|
834
|
+
const t = me(), { id: a, FieldLayout: s } = t, { labelId: r, inputId: u, ariaDescribedBy: i } = Se(), l = Et(St.APPOINTMENT), c = P(() => ({
|
|
835
835
|
...t,
|
|
836
836
|
initialData: l,
|
|
837
837
|
inputId: u,
|
|
@@ -851,20 +851,20 @@ const m = ({ children: e, className: n }) => {
|
|
|
851
851
|
renderLabel: () => le(d, {
|
|
852
852
|
as: "div"
|
|
853
853
|
}),
|
|
854
|
-
renderInput: () => /* @__PURE__ */ o.createElement(
|
|
854
|
+
renderInput: () => /* @__PURE__ */ o.createElement(Gt, {
|
|
855
855
|
appointmentFieldProps: c
|
|
856
|
-
}, /* @__PURE__ */ o.createElement(
|
|
856
|
+
}, /* @__PURE__ */ o.createElement(Ln, {
|
|
857
857
|
className: n
|
|
858
858
|
}, e)),
|
|
859
859
|
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, E, S)
|
|
860
860
|
});
|
|
861
|
-
},
|
|
861
|
+
}, _n = {
|
|
862
862
|
visibility: "hidden"
|
|
863
|
-
},
|
|
864
|
-
const { required: t, onFocus: a, onBlur: s } = me(), { inputId: r, labelId: u, ariaDescribedBy: i } = Se(), l =
|
|
865
|
-
return /* @__PURE__ */ o.createElement(
|
|
863
|
+
}, Ln = ({ children: e, className: n }) => {
|
|
864
|
+
const { required: t, onFocus: a, onBlur: s } = me(), { inputId: r, labelId: u, ariaDescribedBy: i } = Se(), l = un(), c = T(e, m.Loader), d = T(e, m.Notification), S = T(e, m.Dates), E = T(e, m.Timezone), f = T(e, m.Format), g = T(e, m.Slots), w = T(e, m.ShowMoreSlots);
|
|
865
|
+
return /* @__PURE__ */ o.createElement(Je.Provider, {
|
|
866
866
|
value: l
|
|
867
|
-
}, /* @__PURE__ */ o.createElement(
|
|
867
|
+
}, /* @__PURE__ */ o.createElement(Wt, {
|
|
868
868
|
id: r,
|
|
869
869
|
className: n,
|
|
870
870
|
ariaLabelledBy: u,
|
|
@@ -873,10 +873,10 @@ const m = ({ children: e, className: n }) => {
|
|
|
873
873
|
onFocus: a,
|
|
874
874
|
onBlur: s
|
|
875
875
|
}, c, l.hasError ? d : /* @__PURE__ */ o.createElement("div", {
|
|
876
|
-
style: l.isLoading ?
|
|
876
|
+
style: l.isLoading ? _n : void 0
|
|
877
877
|
}, S, E, f, le(g, {
|
|
878
878
|
hasTimezoneNote: !!E
|
|
879
|
-
}), d,
|
|
879
|
+
}), d, w)));
|
|
880
880
|
}, yn = ({ children: e, className: n }) => {
|
|
881
881
|
const { isLoading: t, isRefetching: a } = F();
|
|
882
882
|
return !t && !a ? null : /* @__PURE__ */ o.createElement("div", {
|
|
@@ -886,7 +886,7 @@ const m = ({ children: e, className: n }) => {
|
|
|
886
886
|
"data-initial": t || void 0,
|
|
887
887
|
"data-refetch": !t && a || void 0
|
|
888
888
|
}, e);
|
|
889
|
-
},
|
|
889
|
+
}, An = ({ children: e, className: n }) => {
|
|
890
890
|
const { notificationMessage: t } = F();
|
|
891
891
|
return t ? /* @__PURE__ */ o.createElement("div", {
|
|
892
892
|
className: n,
|
|
@@ -897,21 +897,21 @@ const m = ({ children: e, className: n }) => {
|
|
|
897
897
|
}, Nn = ({ children: e, className: n }) => {
|
|
898
898
|
const { timezoneLabel: t } = F(), { inputId: a } = Se();
|
|
899
899
|
return t ? /* @__PURE__ */ o.createElement("span", {
|
|
900
|
-
id:
|
|
900
|
+
id: Xe(a),
|
|
901
901
|
className: n
|
|
902
902
|
}, e ? e({
|
|
903
903
|
label: t
|
|
904
904
|
}) : t) : null;
|
|
905
|
-
},
|
|
905
|
+
}, In = ({ children: e, className: n }) => {
|
|
906
906
|
const { formatLabel: t } = F();
|
|
907
907
|
return t ? /* @__PURE__ */ o.createElement("span", {
|
|
908
908
|
className: n
|
|
909
909
|
}, e ? e({
|
|
910
910
|
label: t
|
|
911
911
|
}) : t) : null;
|
|
912
|
-
},
|
|
912
|
+
}, On = ({ 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(ve, {
|
|
915
915
|
className: n,
|
|
916
916
|
isDisabled: !!r || !!u,
|
|
917
917
|
onPress: a
|
|
@@ -919,26 +919,25 @@ const m = ({ children: e, className: n }) => {
|
|
|
919
919
|
label: s
|
|
920
920
|
}) : s) : null;
|
|
921
921
|
};
|
|
922
|
-
m.Label =
|
|
922
|
+
m.Label = Ct;
|
|
923
923
|
m.Loader = yn;
|
|
924
|
-
m.Notification =
|
|
924
|
+
m.Notification = An;
|
|
925
925
|
m.Dates = C;
|
|
926
926
|
m.Timezone = Nn;
|
|
927
|
-
m.Format =
|
|
927
|
+
m.Format = In;
|
|
928
928
|
m.Slots = ae;
|
|
929
|
-
m.ShowMoreSlots =
|
|
930
|
-
m.Description =
|
|
931
|
-
m.Error =
|
|
932
|
-
const
|
|
933
|
-
appointment:
|
|
934
|
-
dates:
|
|
935
|
-
weekHeading:
|
|
936
|
-
weekButton:
|
|
929
|
+
m.ShowMoreSlots = On;
|
|
930
|
+
m.Description = Ft;
|
|
931
|
+
m.Error = ht;
|
|
932
|
+
const bn = "_appointment_1ndw3_1", gn = "_dates_1ndw3_5", Tn = "_weekHeading_1ndw3_26", wn = "_weekButton_1ndw3_35", vn = "_previousWeek_1ndw3_67", kn = "_nextWeek_1ndw3_71", Rn = "_day_1ndw3_83", Mn = "_weekdayLabel_1ndw3_95", Fn = "_indicator_1ndw3_107", hn = "_hint_1ndw3_130", Cn = "_slots_1ndw3_143", Wn = "_slotsMobile_1ndw3_152", Bn = "_slotsLabel_1ndw3_156", Un = "_slot_1ndw3_143", xn = "_slotHover_1ndw3_195", Pn = "_slotSelected_1ndw3_203", zn = "_showMoreSlots_1ndw3_257", Hn = "_loader_1ndw3_287", Yn = "_notification_1ndw3_323", _ = {
|
|
933
|
+
appointment: bn,
|
|
934
|
+
dates: gn,
|
|
935
|
+
weekHeading: Tn,
|
|
936
|
+
weekButton: wn,
|
|
937
937
|
previousWeek: vn,
|
|
938
|
-
nextWeek:
|
|
939
|
-
day:
|
|
940
|
-
weekdayLabel:
|
|
941
|
-
dayNumber: Mn,
|
|
938
|
+
nextWeek: kn,
|
|
939
|
+
day: Rn,
|
|
940
|
+
weekdayLabel: Mn,
|
|
942
941
|
indicator: Fn,
|
|
943
942
|
hint: hn,
|
|
944
943
|
slots: Cn,
|
|
@@ -950,64 +949,64 @@ const In = "_appointment_743lv_1", On = "_dates_743lv_5", gn = "_weekHeading_743
|
|
|
950
949
|
showMoreSlots: zn,
|
|
951
950
|
loader: Hn,
|
|
952
951
|
notification: Yn
|
|
953
|
-
}, Kn = ({ content: e, locale: n }) => /* @__PURE__ */ o.createElement(
|
|
952
|
+
}, Kn = ({ content: e, locale: n }) => /* @__PURE__ */ o.createElement(lt, {
|
|
954
953
|
content: e,
|
|
955
954
|
locale: n
|
|
956
955
|
}), $n = {
|
|
957
|
-
base:
|
|
958
|
-
selected:
|
|
959
|
-
hover:
|
|
956
|
+
base: _.slot,
|
|
957
|
+
selected: _.slotSelected,
|
|
958
|
+
hover: _.slotHover
|
|
960
959
|
}, Gn = () => {
|
|
961
|
-
const { isMobile: e } = ce(), n =
|
|
962
|
-
globalClasses:
|
|
960
|
+
const { isMobile: e } = ce(), n = Tt({
|
|
961
|
+
globalClasses: gt,
|
|
963
962
|
moduleClasses: $n
|
|
964
963
|
});
|
|
965
964
|
return /* @__PURE__ */ o.createElement(m, {
|
|
966
|
-
className:
|
|
965
|
+
className: _.appointment
|
|
967
966
|
}, /* @__PURE__ */ o.createElement(m.Label, {
|
|
968
|
-
className: M(
|
|
967
|
+
className: M(Lt, De.label)
|
|
969
968
|
}, /* @__PURE__ */ o.createElement(m.Label.Required, {
|
|
970
|
-
className: M(
|
|
969
|
+
className: M(yt, De.requiredMark)
|
|
971
970
|
})), /* @__PURE__ */ o.createElement(m.Loader, {
|
|
972
|
-
className:
|
|
971
|
+
className: _.loader
|
|
973
972
|
}), /* @__PURE__ */ o.createElement(m.Dates, {
|
|
974
|
-
className: M(
|
|
973
|
+
className: M(At, _.dates)
|
|
975
974
|
}, /* @__PURE__ */ o.createElement(m.Dates.PreviousWeek, {
|
|
976
|
-
className: M(fe,
|
|
975
|
+
className: M(fe, _.weekButton, _.previousWeek)
|
|
977
976
|
}, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(m.Dates.Heading, {
|
|
978
|
-
className:
|
|
977
|
+
className: _.weekHeading
|
|
979
978
|
}), /* @__PURE__ */ o.createElement(m.Dates.NextWeek, {
|
|
980
|
-
className: M(fe,
|
|
979
|
+
className: M(fe, _.weekButton, _.nextWeek)
|
|
981
980
|
}, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(m.Dates.Day, {
|
|
982
|
-
className: M(fe,
|
|
981
|
+
className: M(fe, We.day, _.day)
|
|
983
982
|
}, (t) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
|
|
984
|
-
className:
|
|
983
|
+
className: _.weekdayLabel
|
|
985
984
|
}, t.weekdayLabel), /* @__PURE__ */ o.createElement("span", {
|
|
986
|
-
className:
|
|
985
|
+
className: We.dayNumber
|
|
987
986
|
}, t.dayOfMonthLabel, /* @__PURE__ */ o.createElement("span", {
|
|
988
|
-
className:
|
|
987
|
+
className: _.indicator
|
|
989
988
|
}))))), /* @__PURE__ */ o.createElement(m.Timezone, {
|
|
990
|
-
className: M(
|
|
989
|
+
className: M(Be, _.hint)
|
|
991
990
|
}), /* @__PURE__ */ o.createElement(m.Format, {
|
|
992
|
-
className: M(
|
|
991
|
+
className: M(Be, _.hint)
|
|
993
992
|
}), /* @__PURE__ */ o.createElement(m.Slots, {
|
|
994
|
-
className: M(
|
|
995
|
-
[
|
|
993
|
+
className: M(_.slots, {
|
|
994
|
+
[_.slotsMobile]: e
|
|
996
995
|
})
|
|
997
996
|
}, /* @__PURE__ */ o.createElement(m.Slots.Label, {
|
|
998
|
-
className: M(
|
|
997
|
+
className: M(Nt, _.slotsLabel)
|
|
999
998
|
}), /* @__PURE__ */ o.createElement(m.Slots.Slot, {
|
|
1000
999
|
className: ({ isSelected: t, isHovered: a, isDisabled: s, isReadOnly: r }) => n({
|
|
1001
1000
|
isSelected: t,
|
|
1002
1001
|
isHovered: a && !t && !s && !r
|
|
1003
1002
|
})
|
|
1004
1003
|
}, (t) => t.timeRange)), /* @__PURE__ */ o.createElement(m.Notification, {
|
|
1005
|
-
className:
|
|
1004
|
+
className: _.notification
|
|
1006
1005
|
}), /* @__PURE__ */ o.createElement(m.ShowMoreSlots, {
|
|
1007
|
-
className: M(
|
|
1006
|
+
className: M(It, fe, _.showMoreSlots)
|
|
1008
1007
|
}), /* @__PURE__ */ o.createElement(m.Error, {
|
|
1009
|
-
className: M(
|
|
1010
|
-
}, /* @__PURE__ */ o.createElement(
|
|
1008
|
+
className: M(Ot, De.error)
|
|
1009
|
+
}, /* @__PURE__ */ o.createElement(pt, null), /* @__PURE__ */ o.createElement(m.Error.Text, null)), /* @__PURE__ */ o.createElement(m.Description, {
|
|
1011
1010
|
className: M(bt, De.description)
|
|
1012
1011
|
}, Kn));
|
|
1013
1012
|
}, ua = () => /* @__PURE__ */ o.createElement(Gn, null);
|