@wix/form-elements 1.113.0 → 1.115.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-BZ9sCf_L.js → appointment-rac-CN3z7X0K.js} +204 -204
- package/dist/component/{bookings-address-rac-DDisJZwl.js → bookings-address-rac-C3_L2-L5.js} +1 -1
- package/dist/component/{bookings-email-rac-ovewChXn.js → bookings-email-rac-jf6DBtqR.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CyudJnHy.js → bookings-first-name-rac-Dv5X7Xdt.js} +1 -1
- package/dist/component/{bookings-header-rac-BSN_BoC0.js → bookings-header-rac-B7pVOaU9.js} +1 -1
- package/dist/component/{bookings-last-name-rac-SdX5IANy.js → bookings-last-name-rac-DUwYiliZ.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-COQ2BOsY.js → bookings-login-bar-rac-NJDeVd7j.js} +1 -1
- package/dist/component/{bookings-phone-rac-DlUfTzEz.js → bookings-phone-rac-Bkr85nD5.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Dx0uxbQc.js → bookings-rich-text-rac-Wa8I8MHJ.js} +1 -1
- package/dist/component/{checkbox-field-rac-DueJINhA.js → checkbox-field-rac-DbKz4tNx.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-wj9ITlbE.js → checkbox-group-field-headless-CfXdn4Ff.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CrD849TZ.js → checkbox-group-field-rac-D6I8L5vF.js} +8 -10
- package/dist/component/{checkbox-group-rac-Wdz1ShJh.js → checkbox-group-rac-C3qVOH_9.js} +1 -1
- package/dist/component/{checkbox-rac-BC7A8y2w.js → checkbox-rac-CKsZjKGO.js} +1 -1
- package/dist/component/{contacts-address-rac-DoWo8zyH.js → contacts-address-rac-iX8JJdvR.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CEXkyOuk.js → contacts-birthdate-rac-B7U3XVSs.js} +1 -1
- package/dist/component/{contacts-company-rac-CYaVpLCk.js → contacts-company-rac-gTys-wAp.js} +1 -1
- package/dist/component/{contacts-email-rac-teBI-Rpu.js → contacts-email-rac-Bo0GTj47.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BOPuOgk1.js → contacts-first-name-rac-D2723xQx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DdRhuv9q.js → contacts-last-name-rac-BrTL8dWN.js} +1 -1
- package/dist/component/{contacts-phone-rac-BMiop0kR.js → contacts-phone-rac-CPrOsDjh.js} +1 -1
- package/dist/component/{contacts-position-rac-C8iM62rN.js → contacts-position-rac-CXK8WpP3.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CkToH-f2.js → contacts-subscribe-rac-BJXzn1dy.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-JM0KJre8.js → contacts-tax-id-rac-Dkx_VwKM.js} +1 -1
- package/dist/component/{date-availability-DJyvNJ6w.js → date-availability-CvLIxT4E.js} +1 -1
- package/dist/component/{date-input-field-rac-CStB2jP7.js → date-input-field-rac-CHLxtBFZ.js} +42 -42
- package/dist/component/{date-input-rac-DUSJH8am.js → date-input-rac-CKK-Gx0P.js} +1 -1
- package/dist/component/{date-picker-field-rac-6xffgnXB.js → date-picker-field-rac-DQEWIIOn.js} +5 -5
- package/dist/component/{date-picker-rac-Dpe0w0G6.js → date-picker-rac-DCXIiPH7.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CX39V3G1.js → date-time-input-field-rac-Cdko026n.js} +32 -32
- package/dist/component/{date-time-input-rac-DBVMIbom.js → date-time-input-rac-CHYJiwQN.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CAxyCWQY.js → dext-checkbox-group-rac-CSbzWhrQ.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CRBzElbv.js → dext-checkbox-rac-DynyHr0h.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DNzXwBkg.js → dext-date-picker-rac-DR87-bl9.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-D2W3buJP.js → dext-date-time-input-rac-BUDSzPar.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CTTreT77.js → dext-dropdown-rac-CXn0jJKa.js} +1 -1
- package/dist/component/{dext-email-rac-BwI4-hML.js → dext-email-rac-DSO2U9wf.js} +1 -1
- package/dist/component/{dext-number-input-rac-DT5pQiC3.js → dext-number-input-rac-B5NmGYdT.js} +1 -1
- package/dist/component/{dext-phone-rac-MA6wyUxM.js → dext-phone-rac-DAIqe6sm.js} +1 -1
- package/dist/component/{dext-radio-group-rac-3PYEgYHn.js → dext-radio-group-rac-C28aYLZj.js} +2 -2
- package/dist/component/{dext-rating-input-rac-I3e9k3Tp.js → dext-rating-input-rac-BOuSmqPF.js} +1 -1
- package/dist/component/{dext-tags-rac-Bf4tEUAW.js → dext-tags-rac-yLwjhfPp.js} +2 -2
- package/dist/component/{dext-text-area-rac-5oOAM6zJ.js → dext-text-area-rac-8tlma9gL.js} +1 -1
- package/dist/component/{dext-text-input-rac-8nHhvQfO.js → dext-text-input-rac-D_okxmlQ.js} +1 -1
- package/dist/component/{dext-url-input-rac-DSAfDqx1.js → dext-url-input-rac-BA9iqu2_.js} +1 -1
- package/dist/component/{donation-rac-DJiD7Fel.js → donation-rac-CeGI5IS5.js} +70 -70
- package/dist/component/{dropdown-field-headless-B_W8kD-t.js → dropdown-field-headless-De1WEEXn.js} +4 -4
- package/dist/component/{dropdown-field-rac-IDVaMgoc.js → dropdown-field-rac-CqX5mLGE.js} +3 -3
- package/dist/component/{dropdown-rac-I2ZO66jF.js → dropdown-rac-7iaHY50r.js} +1 -1
- package/dist/component/{ecom-address-rac-B1knDuog.js → ecom-address-rac-PAnE6xQW.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BQPJb2kl.js → ecom-subscription-checkbox-rac-0uCN5_Dz.js} +2 -2
- package/dist/component/{email-input-field-rac-DsjMnxGw.js → email-input-field-rac-CdQLnxHp.js} +3 -3
- package/dist/component/{events-repeater-rac-CT7scvgS.js → events-repeater-rac-BQQveKCR.js} +4 -4
- package/dist/component/events-rsvp-rac-DSsAsXGm.js +48 -0
- package/dist/component/{field-error-headless-DRkkbv__.js → field-error-headless-E5JcyvTx.js} +1 -1
- package/dist/component/{field-label-headless-m633nF93.js → field-label-headless-iSxxobxd.js} +1 -1
- package/dist/component/{file-upload-rac-DaExm5ny.js → file-upload-rac-BOyE5XpC.js} +4 -4
- package/dist/component/{fixed-payment-rac-BglZ8zc0.js → fixed-payment-rac-Bz0J89wO.js} +3 -3
- package/dist/component/{form-CY-iFZdC.js → form-CJ_Fa4im.js} +1201 -1196
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-B6Mzqr3b.js → header-field-rac-B3LiQV-q.js} +2 -2
- package/dist/component/{header-rac-CB2NDeCJ.js → header-rac-wqjuLzYn.js} +1 -1
- package/dist/component/{image-choice-rac-gtYrnTGg.js → image-choice-rac-CGukvBje.js} +54 -57
- package/dist/component/{index-wR-OU2AH.js → index-Bd0x52fb.js} +4 -4
- package/dist/component/{index-Ozpoh9do.js → index-CNgJ9B-N.js} +2 -2
- package/dist/component/{isObjectLike-DsBVSQ_O.js → isObjectLike-CSA_-cuj.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Z4hKy_B_.js → multiline-address-field-rac-BHXDan0o.js} +7 -7
- package/dist/component/{multiline-address-rac-DWV0BZHX.js → multiline-address-rac-B1L72JOQ.js} +1 -1
- package/dist/component/{number-input-field-rac-DKpSb1S_.js → number-input-field-rac-BgfwQQSP.js} +4 -4
- package/dist/component/{number-input-rac-Di7Q8CH9.js → number-input-rac-DMIjiN5s.js} +1 -1
- package/dist/component/options-rac.module-_THNq6Qq.js +7 -0
- package/dist/component/{password-rac-B9RT0izw.js → password-rac-BhgMZqAu.js} +4 -4
- package/dist/component/{payment-input-rac-DdGNnPcd.js → payment-input-rac-D1VqfYhh.js} +4 -4
- package/dist/component/{phone-input-field-rac-B-5gHBXY.js → phone-input-field-rac-DeDVNdf0.js} +6 -6
- package/dist/component/{phone-rac-CmZwJyH7.js → phone-rac-DXS3Mogp.js} +1 -1
- package/dist/component/{product-list-rac-BInJ4cw_.js → product-list-rac-ByQz3AOS.js} +5 -5
- package/dist/component/{quiz-radio-group-rac-B1EIBOt5.js → quiz-radio-group-rac-B1MDx7gg.js} +1 -1
- package/dist/component/radio-button-module-classes-mIRaJBuM.js +131 -0
- package/dist/component/{radio-group-field-rac-DAwCG8w2.js → radio-group-field-rac-DOVrrH9g.js} +15 -16
- package/dist/component/{radio-group-rac-CExbY0aw.js → radio-group-rac-Brc8ZKVX.js} +1 -1
- package/dist/component/{rating-input-field-rac-DTeubyLu.js → rating-input-field-rac-MfJkvu8m.js} +4 -4
- package/dist/component/{rating-input-rac-P7Fdwrm3.js → rating-input-rac-CqcZ73CF.js} +1 -1
- package/dist/component/{rich-content-rac.module-DgQubdPj.js → rich-content-rac.module-En_EemWS.js} +1 -1
- package/dist/component/{rich-text-field-rac-8dkTMWKw.js → rich-text-field-rac-BcxoOePq.js} +2 -2
- package/dist/component/{rich-text-rac-C6u_hF5R.js → rich-text-rac-B_2paTxf.js} +1 -1
- package/dist/component/{service-dropdown-rac-CTSCew5q.js → service-dropdown-rac-BklQyiab.js} +4 -4
- package/dist/component/{services-multi-choice-rac-BUFJHq-l.js → services-multi-choice-rac-ChBS2WU3.js} +27 -29
- package/dist/component/{signature-rac-yO924Qfv.js → signature-rac-Cf9YLYPi.js} +3 -3
- package/dist/component/{submit-button-rac-BurhcqZP.js → submit-button-rac-CZTeK1uB.js} +1 -1
- package/dist/component/{tags-field-rac-qbNQcwnE.js → tags-field-rac-9v2644JD.js} +54 -54
- package/dist/component/{tags-rac-DVHcpxNG.js → tags-rac-CeUucfxg.js} +1 -1
- package/dist/component/{text-area-field-rac-BKhGX0CL.js → text-area-field-rac-BdCpgmgG.js} +4 -4
- package/dist/component/{text-area-rac-CHHEDeUX.js → text-area-rac-6fZvUFD8.js} +1 -1
- package/dist/component/{text-input-field-rac-BGitxCuC.js → text-input-field-rac-C7G_xyfv.js} +3 -3
- package/dist/component/{text-input-headless-BBn1G2s9.js → text-input-headless-BiNwU3sG.js} +3 -3
- package/dist/component/{text-input-rac-CHX-U7Kp.js → text-input-rac-DOaoH5TA.js} +1 -1
- package/dist/component/{time-input-rac-Bp6B2gO3.js → time-input-rac-MqQpSz7I.js} +4 -4
- package/dist/component/{url-input-field-rac-CPibLAWz.js → url-input-field-rac-DukAWJtU.js} +4 -4
- package/dist/component/{url-input-rac-Bj4PV2YJ.js → url-input-rac-BRFCsqH0.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CE1u4RLT.js → use-dropdown-option-class-name-Bm5e7RIh.js} +2 -2
- package/dist/component/{use-element-state-class-name-Dn_LpP1k.js → use-element-state-class-name-jIzS-0f1.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B2mdY7ku.js → use-is-forced-open-dropdown-CjqjVZmI.js} +1 -1
- package/dist/component/{use-service-options-base-DBvqU30V.js → use-service-options-base-1CckNmPE.js} +1 -1
- package/dist/component/{use-text-input-class-name-BUW0svzK.js → use-text-input-class-name-Bce8xMys.js} +2 -2
- package/dist/form.d.ts +1 -1
- package/package.json +2 -2
- package/dist/component/events-rsvp-rac-Dcrc1yxR.js +0 -49
- package/dist/component/options-rac.module-CTDdATiz.js +0 -8
- package/dist/component/radio-button-module-classes-CjDU2x_m.js +0 -133
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import o, { useRef as X, useState as Q, useEffect as H, createContext as Ke, useContext as $e, useMemo as P, useCallback as ie } from "react";
|
|
2
2
|
import { RicosViewer as rt } from "@wix/ricos/viewer";
|
|
3
|
-
import
|
|
3
|
+
import w from "classnames";
|
|
4
4
|
import { C as Me } from "./chevron-down-icon-CcpVm6B-.js";
|
|
5
5
|
import { E as it } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { g as lt, c as Ce } from "./calendar.module-DnhTT4QT.js";
|
|
7
|
-
import { H as
|
|
7
|
+
import { H as ue } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as de } from "./field-rac.module-B4l_0KRU.js";
|
|
9
|
-
import { b1 as De, b0 as ct, b5 as Te, bj as
|
|
10
|
-
import { u as
|
|
11
|
-
import { ListBox as
|
|
9
|
+
import { b1 as De, b0 as ct, b5 as Te, bj as mt, bi as ut, b9 as ce, b6 as Ee, bb as dt, b8 as ft, F as Dt, I as Et, U as St, g as pt, G as We, o as _t, V as yt, v as Lt, p as At, $ as Nt } from "./form-CJ_Fa4im.js";
|
|
10
|
+
import { u as bt } from "./use-element-state-class-name-jIzS-0f1.js";
|
|
11
|
+
import { ListBox as It, Button as ke, ListBoxItem as Ot, RadioGroup as gt, RadioField as Tt, 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 vt, E as
|
|
14
|
-
import { L as
|
|
15
|
-
import { F as
|
|
13
|
+
import { D as vt, E as Rt } from "./field-error-headless-E5JcyvTx.js";
|
|
14
|
+
import { L as wt } from "./field-label-headless-iSxxobxd.js";
|
|
15
|
+
import { F as Ft } from "./fieldset-headless-CD3fds9J.js";
|
|
16
16
|
import "date-fns";
|
|
17
17
|
import { V as Ge } from "./headless-styles-CmcyA_pi.js";
|
|
18
|
-
function
|
|
18
|
+
function ht(e) {
|
|
19
19
|
return { evid: 40, src: 16, endpoint: "", params: e };
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var Ie = /* @__PURE__ */ (function(e) {
|
|
22
22
|
return e.BOOKING_NOT_INSTALL = "BOOKING_NOT_INSTALL", e.NO_AVAILABILITY_DATES_FOUND = "NO_AVAILABILITY_DATES_FOUND", e.GENERAL = "GENERAL", e;
|
|
23
23
|
})({}), z = /* @__PURE__ */ (function(e) {
|
|
24
24
|
return e.LOADING = "LOADING", e.DONE = "DONE", e.ERROR = "ERROR", e;
|
|
@@ -51,16 +51,16 @@ const Mt = (e) => {
|
|
|
51
51
|
if (!(n || a))
|
|
52
52
|
return {
|
|
53
53
|
...s,
|
|
54
|
-
report: (i) => s == null ? void 0 : s.report(
|
|
54
|
+
report: (i) => s == null ? void 0 : s.report(ht({
|
|
55
55
|
...Mt(r),
|
|
56
56
|
...i
|
|
57
57
|
}))
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
var
|
|
60
|
+
var Oe;
|
|
61
61
|
(function(e) {
|
|
62
62
|
e.UNDEFINED = "UNDEFINED", e.OWNER_BUSINESS = "OWNER_BUSINESS", e.OWNER_CUSTOM = "OWNER_CUSTOM", e.CUSTOM = "CUSTOM";
|
|
63
|
-
})(
|
|
63
|
+
})(Oe || (Oe = {}));
|
|
64
64
|
var Be;
|
|
65
65
|
(function(e) {
|
|
66
66
|
e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
|
|
@@ -80,7 +80,7 @@ var Pe;
|
|
|
80
80
|
const Wt = (e) => {
|
|
81
81
|
const { service: t } = e || {};
|
|
82
82
|
return (t == null ? void 0 : t.id) ? null : {
|
|
83
|
-
type:
|
|
83
|
+
type: Ie.GENERAL,
|
|
84
84
|
message: "Service ID is missing"
|
|
85
85
|
};
|
|
86
86
|
}, Bt = ({ appointmentFieldProps: e, isEditor: t, isComposer: n }) => {
|
|
@@ -122,17 +122,17 @@ const Wt = (e) => {
|
|
|
122
122
|
}, Pt = ({ duration: e = 60, timezone: t = "UTC" } = {}) => {
|
|
123
123
|
var E, d;
|
|
124
124
|
const n = "267d1c11-8019-4e3d-b9c6-cd2b859c69e2", a = /* @__PURE__ */ new Date(), s = [], r = [], l = a.toISOString().split("T")[0], i = 10, c = 18;
|
|
125
|
-
let D = /* @__PURE__ */ new Date(`${l}T${i}:00:00`),
|
|
126
|
-
|
|
125
|
+
let D = /* @__PURE__ */ new Date(`${l}T${i}:00:00`), u = new Date(D);
|
|
126
|
+
u.setMinutes(u.getMinutes() + e);
|
|
127
127
|
let p = !1;
|
|
128
|
-
for (;
|
|
129
|
-
const
|
|
128
|
+
for (; u.getHours() < c || u.getHours() === c && u.getMinutes() === 0; ) {
|
|
129
|
+
const O = {
|
|
130
130
|
slot: {
|
|
131
131
|
serviceId: n,
|
|
132
132
|
startDate: D.toISOString(),
|
|
133
|
-
endDate:
|
|
133
|
+
endDate: u.toISOString(),
|
|
134
134
|
location: {
|
|
135
|
-
locationType:
|
|
135
|
+
locationType: Oe.CUSTOM
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
bookable: !0,
|
|
@@ -145,7 +145,7 @@ const Wt = (e) => {
|
|
|
145
145
|
},
|
|
146
146
|
nestedSlots: []
|
|
147
147
|
};
|
|
148
|
-
r.push(
|
|
148
|
+
r.push(O), p || (s.push(O), p = !0), D = new Date(u), u = new Date(D), u.setMinutes(u.getMinutes() + e);
|
|
149
149
|
}
|
|
150
150
|
return {
|
|
151
151
|
availabilitySlots: r,
|
|
@@ -159,11 +159,11 @@ function zt(e) {
|
|
|
159
159
|
var d;
|
|
160
160
|
const { initialData: t, onChange: n, value: a } = e, { isEditor: s, isComposer: r } = De(), l = (d = t == null ? void 0 : t.service) == null ? void 0 : d.id, { actions: i } = Te(), c = X(i);
|
|
161
161
|
c.current = i;
|
|
162
|
-
const D = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [
|
|
162
|
+
const D = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [u, p] = Q(null), E = Ze(t == null ? void 0 : t.service);
|
|
163
163
|
return H(() => {
|
|
164
164
|
l && !s && !r && D && (async () => {
|
|
165
|
-
var _,
|
|
166
|
-
const v = Ve(),
|
|
165
|
+
var _, g, Y, M, $;
|
|
166
|
+
const v = Ve(), I = {
|
|
167
167
|
currentSlotBulkSize: q,
|
|
168
168
|
timezone: v,
|
|
169
169
|
dataStatus: z.LOADING
|
|
@@ -179,35 +179,35 @@ function zt(e) {
|
|
|
179
179
|
timeZone: v
|
|
180
180
|
});
|
|
181
181
|
};
|
|
182
|
-
if (
|
|
182
|
+
if (I.availabilityDates = await U(2), (_ = I.availabilityDates) != null && _.length || (I.availabilityDates = await U(6)), !((g = I.availabilityDates) != null && g.length)) {
|
|
183
183
|
E == null || E.report({
|
|
184
184
|
action: ne.LOAD,
|
|
185
185
|
component: J.NO_AVAILABILITY_AT_ALL
|
|
186
186
|
}), p({
|
|
187
187
|
dataStatus: z.ERROR,
|
|
188
188
|
error: {
|
|
189
|
-
type:
|
|
189
|
+
type: Ie.NO_AVAILABILITY_DATES_FOUND,
|
|
190
190
|
message: "No availability dates found"
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
I.selectedDate = xt(I.availabilityDates), I.selectedDate && (I.availabilitySlots = await ((M = (Y = c.current) == null ? void 0 : Y.getAvailabilitySlots) == null ? void 0 : M.call(Y, {
|
|
196
196
|
serviceId: l,
|
|
197
197
|
timeZone: v,
|
|
198
|
-
selectedDate:
|
|
198
|
+
selectedDate: I.selectedDate
|
|
199
199
|
}))), E == null || E.report({
|
|
200
200
|
action: ne.LOAD,
|
|
201
|
-
component: ($ =
|
|
201
|
+
component: ($ = I.availabilityDates) != null && $.length ? J.FORM : J.NO_AVAILABILITY_FOR_DATE
|
|
202
202
|
}), a != null && a.startDate || n(void 0), p({
|
|
203
|
-
...
|
|
203
|
+
...I,
|
|
204
204
|
dataStatus: z.DONE
|
|
205
205
|
});
|
|
206
206
|
} catch (U) {
|
|
207
207
|
console.error(U), p({
|
|
208
208
|
dataStatus: z.ERROR,
|
|
209
209
|
error: {
|
|
210
|
-
type:
|
|
210
|
+
type: Ie.GENERAL,
|
|
211
211
|
message: "An error occurred in initialAppointmentState"
|
|
212
212
|
}
|
|
213
213
|
});
|
|
@@ -218,7 +218,7 @@ function zt(e) {
|
|
|
218
218
|
r,
|
|
219
219
|
l,
|
|
220
220
|
D
|
|
221
|
-
]),
|
|
221
|
+
]), u;
|
|
222
222
|
}
|
|
223
223
|
const qe = /* @__PURE__ */ Ke({
|
|
224
224
|
appointmentState: {},
|
|
@@ -296,7 +296,7 @@ const qe = /* @__PURE__ */ Ke({
|
|
|
296
296
|
var i, c;
|
|
297
297
|
if (s != null && s.startDate && (n != null && n.selectedDate) && (n == null ? void 0 : n.dataStatus) === z.DONE && !ae(new Date(s.startDate), n == null ? void 0 : n.selectedDate)) {
|
|
298
298
|
e(!0);
|
|
299
|
-
const
|
|
299
|
+
const u = new Date(s.startDate), { fromDate: p, toDate: E } = Gt(u, 8), [d, O] = await Promise.all([
|
|
300
300
|
(i = r == null ? void 0 : r.getAvailabilityDates) == null ? void 0 : i.call(r, {
|
|
301
301
|
serviceId: t == null ? void 0 : t.initialData.service.id,
|
|
302
302
|
timeZone: (n == null ? void 0 : n.timezone) || "",
|
|
@@ -306,13 +306,13 @@ const qe = /* @__PURE__ */ Ke({
|
|
|
306
306
|
(c = r == null ? void 0 : r.getAvailabilitySlots) == null ? void 0 : c.call(r, {
|
|
307
307
|
serviceId: t == null ? void 0 : t.initialData.service.id,
|
|
308
308
|
timeZone: (n == null ? void 0 : n.timezone) || "",
|
|
309
|
-
selectedDate:
|
|
309
|
+
selectedDate: u
|
|
310
310
|
})
|
|
311
311
|
]);
|
|
312
312
|
a({
|
|
313
313
|
availabilityDates: d,
|
|
314
|
-
selectedDate:
|
|
315
|
-
availabilitySlots:
|
|
314
|
+
selectedDate: u,
|
|
315
|
+
availabilitySlots: O
|
|
316
316
|
}), e(!1);
|
|
317
317
|
}
|
|
318
318
|
})();
|
|
@@ -366,7 +366,7 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
366
366
|
s,
|
|
367
367
|
r
|
|
368
368
|
]), n;
|
|
369
|
-
}, j = 7,
|
|
369
|
+
}, j = 7, ge = (e) => {
|
|
370
370
|
const t = new Date(e);
|
|
371
371
|
return t.setHours(0, 0, 0, 0), t;
|
|
372
372
|
}, nn = (e) => {
|
|
@@ -376,7 +376,7 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
376
376
|
const n = new Date(e);
|
|
377
377
|
return n.setDate(n.getDate() + t), n;
|
|
378
378
|
}, He = (e, t) => {
|
|
379
|
-
const n =
|
|
379
|
+
const n = ge(e), a = (n.getDay() - t + j) % j;
|
|
380
380
|
return te(n, -a);
|
|
381
381
|
}, an = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, on = (e, t, n) => {
|
|
382
382
|
const a = new Intl.DateTimeFormat(n, {
|
|
@@ -388,50 +388,50 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
388
388
|
var a;
|
|
389
389
|
return !!((a = n.slot) != null && a.startDate) && ae(new Date(n.slot.startDate), e);
|
|
390
390
|
}), rn = () => {
|
|
391
|
-
var
|
|
392
|
-
const { appointmentFieldProps: e, appointmentState: t, setAppointmentState: n } = ve(), { language: a, isEditor: s, isComposer: r } = De(), { t: l } =
|
|
391
|
+
var he;
|
|
392
|
+
const { appointmentFieldProps: e, appointmentState: t, setAppointmentState: n } = ve(), { language: a, isEditor: s, isComposer: r } = De(), { t: l } = mt(), { actions: i } = Te(), c = Ze(), [D, u] = Q(!1), [p, E] = Q(!1), [d, O] = Q(), [v, I] = Q();
|
|
393
393
|
Zt({
|
|
394
|
-
setIsReloadingSlots:
|
|
394
|
+
setIsReloadingSlots: u
|
|
395
395
|
});
|
|
396
|
-
const { onChange: _, value:
|
|
396
|
+
const { onChange: _, value: g, target: Y, initialData: M, formatDescription: $, locationType: U, error: se } = e, { availabilityDates: G, availabilitySlots: C, timezone: y = "", selectedDate: S, currentSlotBulkSize: R, dataStatus: K, error: Z } = t, V = (he = M == null ? void 0 : M.service) == null ? void 0 : he.id, F = K === z.LOADING, ee = D || p, Se = !!Z, we = tn({
|
|
397
397
|
error: se,
|
|
398
|
-
selectedSlot:
|
|
399
|
-
}), L = P(() => Vt(C,
|
|
398
|
+
selectedSlot: g
|
|
399
|
+
}), L = P(() => Vt(C, we), [
|
|
400
400
|
C,
|
|
401
|
-
|
|
401
|
+
we
|
|
402
402
|
]);
|
|
403
403
|
H(() => {
|
|
404
|
-
_ == null || _(Kt(
|
|
404
|
+
_ == null || _(Kt(g));
|
|
405
405
|
}, [
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
g == null ? void 0 : g.startDate,
|
|
407
|
+
g == null ? void 0 : g.endDate,
|
|
408
408
|
y
|
|
409
|
-
]),
|
|
409
|
+
]), ut((f) => {
|
|
410
410
|
const N = f == null ? void 0 : f[Y];
|
|
411
411
|
C != null && C.length && n({
|
|
412
|
-
availabilitySlots: C.filter((
|
|
413
|
-
var
|
|
414
|
-
return ((
|
|
412
|
+
availabilitySlots: C.filter((b) => {
|
|
413
|
+
var k;
|
|
414
|
+
return ((k = b == null ? void 0 : b.slot) == null ? void 0 : k.startDate) !== (N == null ? void 0 : N.startDate);
|
|
415
415
|
})
|
|
416
416
|
});
|
|
417
417
|
}), H(() => {
|
|
418
|
-
if (L != null && L.length &&
|
|
419
|
-
const f = Qt(fe(
|
|
420
|
-
f && f + 1 >
|
|
418
|
+
if (L != null && L.length && R) {
|
|
419
|
+
const f = Qt(fe(g ?? void 0), L);
|
|
420
|
+
f && f + 1 > R && n({
|
|
421
421
|
currentSlotBulkSize: f + 1
|
|
422
422
|
});
|
|
423
|
-
} else !(L != null && L.length) &&
|
|
423
|
+
} else !(L != null && L.length) && g && (_ == null || _(void 0));
|
|
424
424
|
}, [
|
|
425
|
-
|
|
425
|
+
g,
|
|
426
426
|
L,
|
|
427
427
|
G
|
|
428
428
|
]);
|
|
429
429
|
const pe = P(() => lt(a), [
|
|
430
430
|
a
|
|
431
|
-
]),
|
|
431
|
+
]), Fe = X(S);
|
|
432
432
|
H(() => {
|
|
433
|
-
const f =
|
|
434
|
-
|
|
433
|
+
const f = Fe.current;
|
|
434
|
+
Fe.current = S, !!S && (!f || !ae(f, S)) && O(void 0);
|
|
435
435
|
}, [
|
|
436
436
|
S
|
|
437
437
|
]);
|
|
@@ -440,11 +440,11 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
440
440
|
S,
|
|
441
441
|
pe
|
|
442
442
|
]), Je = P(() => {
|
|
443
|
-
const f =
|
|
443
|
+
const f = ge(/* @__PURE__ */ new Date()), N = new Intl.DateTimeFormat(a, {
|
|
444
444
|
weekday: "short"
|
|
445
|
-
}),
|
|
445
|
+
}), b = new Intl.DateTimeFormat(a, {
|
|
446
446
|
day: "numeric"
|
|
447
|
-
}),
|
|
447
|
+
}), k = new Intl.DateTimeFormat(a, {
|
|
448
448
|
weekday: "long",
|
|
449
449
|
month: "long",
|
|
450
450
|
day: "numeric"
|
|
@@ -452,17 +452,17 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
452
452
|
return Array.from({
|
|
453
453
|
length: j
|
|
454
454
|
}, (re, Ne) => {
|
|
455
|
-
const x = te(W, Ne),
|
|
455
|
+
const x = te(W, Ne), be = !!S && ae(x, S), st = ge(x) < f;
|
|
456
456
|
return {
|
|
457
457
|
key: an(x),
|
|
458
458
|
date: x,
|
|
459
|
-
isSelected:
|
|
460
|
-
isAvailable: !
|
|
461
|
-
isDisabled: st || ee && !
|
|
459
|
+
isSelected: be,
|
|
460
|
+
isAvailable: !F && !ee && !be && sn(x, G),
|
|
461
|
+
isDisabled: st || ee && !be,
|
|
462
462
|
isToday: ae(x, f),
|
|
463
|
-
dayOfMonthLabel:
|
|
463
|
+
dayOfMonthLabel: b.format(x),
|
|
464
464
|
weekdayLabel: N.format(x),
|
|
465
|
-
label:
|
|
465
|
+
label: k.format(x),
|
|
466
466
|
availabilityLabel: l("form.appointment.accessibility.calendar.has-availability.aria-label")
|
|
467
467
|
};
|
|
468
468
|
});
|
|
@@ -470,45 +470,45 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
470
470
|
W,
|
|
471
471
|
S,
|
|
472
472
|
G,
|
|
473
|
-
|
|
473
|
+
F,
|
|
474
474
|
ee,
|
|
475
475
|
a,
|
|
476
476
|
l
|
|
477
|
-
]), _e = fe(
|
|
478
|
-
const { startDate: N, endDate:
|
|
479
|
-
if (!N || !
|
|
477
|
+
]), _e = fe(g ?? void 0) || void 0, ye = P(() => F || D ? [] : (L ?? []).slice(0, R).flatMap((f) => {
|
|
478
|
+
const { startDate: N, endDate: b } = f.slot ?? {};
|
|
479
|
+
if (!N || !b)
|
|
480
480
|
return [];
|
|
481
|
-
const
|
|
481
|
+
const k = fe({
|
|
482
482
|
startDate: N,
|
|
483
|
-
endDate:
|
|
483
|
+
endDate: b
|
|
484
484
|
});
|
|
485
485
|
return [
|
|
486
486
|
{
|
|
487
|
-
key:
|
|
487
|
+
key: k,
|
|
488
488
|
startDate: N,
|
|
489
|
-
endDate:
|
|
489
|
+
endDate: b,
|
|
490
490
|
timeRange: qt({
|
|
491
491
|
startDate: N,
|
|
492
|
-
endDate:
|
|
492
|
+
endDate: b,
|
|
493
493
|
locale: a,
|
|
494
494
|
timezone: y
|
|
495
495
|
}),
|
|
496
|
-
isSelected:
|
|
496
|
+
isSelected: k === _e
|
|
497
497
|
}
|
|
498
498
|
];
|
|
499
499
|
}), [
|
|
500
500
|
L,
|
|
501
|
-
|
|
502
|
-
|
|
501
|
+
R,
|
|
502
|
+
F,
|
|
503
503
|
D,
|
|
504
504
|
a,
|
|
505
505
|
y,
|
|
506
506
|
_e
|
|
507
|
-
]), Le = !D && !!(L != null && L.length) && (
|
|
507
|
+
]), Le = !D && !!(L != null && L.length) && (R || q) < L.length, Ae = W > He(/* @__PURE__ */ new Date(), pe), Xe = ie(
|
|
508
508
|
async (f) => {
|
|
509
509
|
var N;
|
|
510
510
|
if (!(ee || S && ae(f, S))) {
|
|
511
|
-
|
|
511
|
+
u(!0), _ == null || _(void 0), n({
|
|
512
512
|
currentSlotBulkSize: q,
|
|
513
513
|
selectedDate: f,
|
|
514
514
|
availabilitySlots: void 0
|
|
@@ -517,7 +517,7 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
517
517
|
component: J.DATE
|
|
518
518
|
});
|
|
519
519
|
try {
|
|
520
|
-
const
|
|
520
|
+
const b = await ((N = i == null ? void 0 : i.getAvailabilitySlots) == null ? void 0 : N.call(i, {
|
|
521
521
|
serviceId: V,
|
|
522
522
|
timeZone: y,
|
|
523
523
|
selectedDate: f
|
|
@@ -525,11 +525,11 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
525
525
|
n({
|
|
526
526
|
currentSlotBulkSize: q,
|
|
527
527
|
selectedDate: f,
|
|
528
|
-
availabilitySlots:
|
|
528
|
+
availabilitySlots: b
|
|
529
529
|
});
|
|
530
530
|
} catch {
|
|
531
531
|
} finally {
|
|
532
|
-
|
|
532
|
+
u(!1);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
},
|
|
@@ -543,15 +543,15 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
543
543
|
_,
|
|
544
544
|
c
|
|
545
545
|
]
|
|
546
|
-
),
|
|
546
|
+
), me = X(0), et = ie(
|
|
547
547
|
async (f) => {
|
|
548
548
|
var re;
|
|
549
549
|
if (f < 0 && !Ae)
|
|
550
550
|
return;
|
|
551
|
-
const N = W,
|
|
552
|
-
if (
|
|
551
|
+
const N = W, b = te(W, f * j);
|
|
552
|
+
if (O(b), s || r)
|
|
553
553
|
return;
|
|
554
|
-
const
|
|
554
|
+
const k = ++me.current;
|
|
555
555
|
E(!0), c == null || c.report({
|
|
556
556
|
action: ne.CLICK,
|
|
557
557
|
component: J.PAGINATION
|
|
@@ -560,16 +560,16 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
560
560
|
const Ne = await ((re = i == null ? void 0 : i.getAvailabilityDates) == null ? void 0 : re.call(i, {
|
|
561
561
|
serviceId: V,
|
|
562
562
|
timeZone: y,
|
|
563
|
-
fromDate:
|
|
564
|
-
toDate: nn(te(
|
|
563
|
+
fromDate: b,
|
|
564
|
+
toDate: nn(te(b, j - 1))
|
|
565
565
|
}));
|
|
566
|
-
|
|
566
|
+
k === me.current && n({
|
|
567
567
|
availabilityDates: Ne
|
|
568
568
|
});
|
|
569
569
|
} catch {
|
|
570
|
-
|
|
570
|
+
k === me.current && O(N);
|
|
571
571
|
} finally {
|
|
572
|
-
|
|
572
|
+
k === me.current && E(!1);
|
|
573
573
|
}
|
|
574
574
|
},
|
|
575
575
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -588,15 +588,15 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
588
588
|
const N = ye.find((re) => re.key === f);
|
|
589
589
|
if (!N)
|
|
590
590
|
return;
|
|
591
|
-
const { startDate:
|
|
591
|
+
const { startDate: b, endDate: k } = N;
|
|
592
592
|
c == null || c.report({
|
|
593
593
|
action: ne.CLICK,
|
|
594
594
|
component: J.SLOT,
|
|
595
|
-
startTime: new Date(
|
|
596
|
-
endTime: new Date(
|
|
595
|
+
startTime: new Date(b).valueOf(),
|
|
596
|
+
endTime: new Date(k).valueOf()
|
|
597
597
|
}), _ == null || _({
|
|
598
|
-
startDate:
|
|
599
|
-
endDate:
|
|
598
|
+
startDate: b,
|
|
599
|
+
endDate: k,
|
|
600
600
|
timeZone: y
|
|
601
601
|
});
|
|
602
602
|
},
|
|
@@ -610,25 +610,25 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
610
610
|
), nt = ie(() => {
|
|
611
611
|
if (!Le)
|
|
612
612
|
return;
|
|
613
|
-
const f =
|
|
613
|
+
const f = R || q;
|
|
614
614
|
c == null || c.report({
|
|
615
615
|
action: ne.CLICK,
|
|
616
616
|
component: J.SHOW_MORE
|
|
617
|
-
}),
|
|
617
|
+
}), I(f), n({
|
|
618
618
|
currentSlotBulkSize: f + q
|
|
619
619
|
});
|
|
620
620
|
}, [
|
|
621
621
|
Le,
|
|
622
|
-
|
|
622
|
+
R,
|
|
623
623
|
c
|
|
624
|
-
]), at = ie(() =>
|
|
624
|
+
]), at = ie(() => I(void 0), []), ot = P(() => {
|
|
625
625
|
if (Se)
|
|
626
626
|
return l("form.appointment.empty-state.notification.text");
|
|
627
|
-
if (!
|
|
627
|
+
if (!F && !D && !(L != null && L.length))
|
|
628
628
|
return l("form.appointment.slots-not-found.text");
|
|
629
629
|
}, [
|
|
630
630
|
Se,
|
|
631
|
-
|
|
631
|
+
F,
|
|
632
632
|
D,
|
|
633
633
|
L == null ? void 0 : L.length,
|
|
634
634
|
l
|
|
@@ -644,7 +644,7 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
644
644
|
canGoToPreviousWeek: Ae,
|
|
645
645
|
hasMoreSlots: Le,
|
|
646
646
|
hasError: Se,
|
|
647
|
-
isLoading:
|
|
647
|
+
isLoading: F,
|
|
648
648
|
isRefetching: ee,
|
|
649
649
|
isReloadingSlots: D,
|
|
650
650
|
weekRangeLabel: on(W, te(W, j - 1), a),
|
|
@@ -669,31 +669,31 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
669
669
|
pendingFocusIndex: v,
|
|
670
670
|
consumePendingFocusIndex: at
|
|
671
671
|
};
|
|
672
|
-
}, je = Ke(void 0), Qe = (e) => `${e}-timezone-note`,
|
|
672
|
+
}, je = Ke(void 0), Qe = (e) => `${e}-timezone-note`, h = () => {
|
|
673
673
|
const e = $e(je);
|
|
674
674
|
if (typeof e > "u")
|
|
675
675
|
throw new Error("Appointment parts must be used inside an <Appointment> component");
|
|
676
676
|
return e;
|
|
677
|
-
},
|
|
677
|
+
}, Re = () => {
|
|
678
678
|
const { disabled: e, readOnly: t } = ce();
|
|
679
679
|
return !!e || !!t;
|
|
680
680
|
}, B = ({ children: e, className: t }) => {
|
|
681
|
-
const { days: n, selectDate: a, weekRangeLabel: s } =
|
|
681
|
+
const { days: n, selectDate: a, weekRangeLabel: s } = h(), r = T(e, B.PreviousWeek), l = T(e, B.Heading), i = T(e, B.NextWeek), c = T(e, B.Day) ?? /* @__PURE__ */ o.createElement(B.Day, null), D = P(() => n.filter((d) => d.isSelected).map((d) => d.key), [
|
|
682
682
|
n
|
|
683
|
-
]),
|
|
683
|
+
]), u = Re(), p = P(() => n.filter((d) => u || d.isDisabled).map((d) => d.key), [
|
|
684
684
|
n,
|
|
685
|
-
|
|
685
|
+
u
|
|
686
686
|
]), E = (d) => {
|
|
687
687
|
if (d === "all")
|
|
688
688
|
return;
|
|
689
|
-
const [
|
|
689
|
+
const [O] = [
|
|
690
690
|
...d
|
|
691
|
-
], v = n.find(({ key:
|
|
691
|
+
], v = n.find(({ key: I }) => I === O);
|
|
692
692
|
v && a(v.date);
|
|
693
693
|
};
|
|
694
694
|
return /* @__PURE__ */ o.createElement("div", {
|
|
695
695
|
className: t
|
|
696
|
-
}, r, l, i, /* @__PURE__ */ o.createElement(
|
|
696
|
+
}, r, l, i, /* @__PURE__ */ o.createElement(It, {
|
|
697
697
|
"aria-label": s,
|
|
698
698
|
orientation: "horizontal",
|
|
699
699
|
selectionMode: "single",
|
|
@@ -705,7 +705,7 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
705
705
|
day: d
|
|
706
706
|
}))));
|
|
707
707
|
}, ln = ({ children: e, className: t }) => {
|
|
708
|
-
const { changeWeek: n, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } =
|
|
708
|
+
const { changeWeek: n, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = h(), l = Re(), i = X(null), c = X(!1);
|
|
709
709
|
return H(() => {
|
|
710
710
|
var p, E, d;
|
|
711
711
|
if (a || !c.current)
|
|
@@ -714,12 +714,12 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
714
714
|
const D = document.activeElement;
|
|
715
715
|
if (D !== document.body && D !== i.current)
|
|
716
716
|
return;
|
|
717
|
-
const
|
|
718
|
-
(d = Array.from(
|
|
717
|
+
const u = ((E = (p = i.current) == null ? void 0 : p.closest("fieldset")) == null ? void 0 : E.querySelectorAll("button")) ?? [];
|
|
718
|
+
(d = Array.from(u).find((O) => O.getAttribute("aria-label") === r)) == null || d.focus();
|
|
719
719
|
}, [
|
|
720
720
|
a,
|
|
721
721
|
r
|
|
722
|
-
]), /* @__PURE__ */ o.createElement(
|
|
722
|
+
]), /* @__PURE__ */ o.createElement(ke, {
|
|
723
723
|
ref: i,
|
|
724
724
|
className: t,
|
|
725
725
|
"aria-label": s,
|
|
@@ -729,15 +729,15 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
729
729
|
}
|
|
730
730
|
}, e ?? "‹");
|
|
731
731
|
}, cn = ({ children: e, className: t }) => {
|
|
732
|
-
const { changeWeek: n, nextWeekLabel: a } =
|
|
733
|
-
return /* @__PURE__ */ o.createElement(
|
|
732
|
+
const { changeWeek: n, nextWeekLabel: a } = h(), s = Re();
|
|
733
|
+
return /* @__PURE__ */ o.createElement(ke, {
|
|
734
734
|
className: t,
|
|
735
735
|
"aria-label": a,
|
|
736
736
|
isDisabled: s,
|
|
737
737
|
onPress: () => n(1)
|
|
738
738
|
}, e ?? "›");
|
|
739
|
-
},
|
|
740
|
-
const { weekCaptionLabel: n, weekRangeLabel: a } =
|
|
739
|
+
}, mn = ({ children: e, className: t }) => {
|
|
740
|
+
const { weekCaptionLabel: n, weekRangeLabel: a } = h();
|
|
741
741
|
return /* @__PURE__ */ o.createElement("span", {
|
|
742
742
|
className: t,
|
|
743
743
|
"aria-live": "polite"
|
|
@@ -749,9 +749,9 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
749
749
|
}, n), /* @__PURE__ */ o.createElement("span", {
|
|
750
750
|
style: Ge
|
|
751
751
|
}, a)));
|
|
752
|
-
},
|
|
752
|
+
}, un = ({ children: e, className: t, ...n }) => {
|
|
753
753
|
const { day: a } = n;
|
|
754
|
-
return /* @__PURE__ */ o.createElement(
|
|
754
|
+
return /* @__PURE__ */ o.createElement(Ot, {
|
|
755
755
|
id: a.key,
|
|
756
756
|
className: t,
|
|
757
757
|
textValue: a.label,
|
|
@@ -764,16 +764,16 @@ const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
|
764
764
|
}) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", null, a.weekdayLabel), /* @__PURE__ */ o.createElement("span", null, a.dayOfMonthLabel)));
|
|
765
765
|
};
|
|
766
766
|
B.PreviousWeek = ln;
|
|
767
|
-
B.Heading =
|
|
767
|
+
B.Heading = mn;
|
|
768
768
|
B.NextWeek = cn;
|
|
769
|
-
B.Day =
|
|
769
|
+
B.Day = un;
|
|
770
770
|
const Ye = 'input[type="radio"]', oe = ({ children: e, className: t, ...n }) => {
|
|
771
|
-
const { hasTimezoneNote: a } = n, { slots: s, selectedSlotKey: r, selectSlot: l, selectedDateLabel: i, isReloadingSlots: c, timezoneLabel: D, pendingFocusIndex:
|
|
771
|
+
const { hasTimezoneNote: a } = n, { slots: s, selectedSlotKey: r, selectSlot: l, selectedDateLabel: i, isReloadingSlots: c, timezoneLabel: D, pendingFocusIndex: u, consumePendingFocusIndex: p } = h(), { id: E, disabled: d, readOnly: O, required: v, hasError: I } = ce(), { inputId: _, labelId: g, ariaDescribedBy: Y } = Ee(), M = X(null), $ = `${_}-slots-label`, U = T(e, oe.Label), se = T(e, oe.Slot) ?? /* @__PURE__ */ o.createElement(oe.Slot, null), G = !!U && !!i, C = [
|
|
772
772
|
Y,
|
|
773
773
|
a && D ? Qe(_) : void 0
|
|
774
774
|
].filter(Boolean).join(" ") || void 0, y = (S) => {
|
|
775
|
-
var
|
|
776
|
-
(Z = (K = (
|
|
775
|
+
var R, K, Z;
|
|
776
|
+
(Z = (K = (R = M.current) == null ? void 0 : R.querySelectorAll(Ye)) == null ? void 0 : K[S]) == null || Z.focus();
|
|
777
777
|
};
|
|
778
778
|
return dt(() => {
|
|
779
779
|
var Z, V;
|
|
@@ -781,26 +781,26 @@ const Ye = 'input[type="radio"]', oe = ({ children: e, className: t, ...n }) =>
|
|
|
781
781
|
y(0);
|
|
782
782
|
return;
|
|
783
783
|
}
|
|
784
|
-
const
|
|
784
|
+
const R = Array.from(((V = document.getElementById(_)) == null ? void 0 : V.querySelectorAll('[role="option"]')) ?? []), K = R.find((F) => F.getAttribute("aria-selected") === "true") ?? R.find((F) => F.getAttribute("aria-disabled") !== "true");
|
|
785
785
|
K == null || K.focus();
|
|
786
786
|
}, E), H(() => {
|
|
787
|
-
|
|
787
|
+
u !== void 0 && (y(u), p());
|
|
788
788
|
}, [
|
|
789
|
-
|
|
789
|
+
u,
|
|
790
790
|
s.length
|
|
791
791
|
]), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
|
|
792
792
|
role: "status",
|
|
793
793
|
style: Ge
|
|
794
|
-
}, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(
|
|
794
|
+
}, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(gt, {
|
|
795
795
|
ref: M,
|
|
796
796
|
className: t,
|
|
797
797
|
value: r ?? null,
|
|
798
798
|
onChange: l,
|
|
799
799
|
isDisabled: d,
|
|
800
|
-
isReadOnly:
|
|
800
|
+
isReadOnly: O,
|
|
801
801
|
isRequired: v,
|
|
802
|
-
isInvalid:
|
|
803
|
-
"aria-labelledby": G ? $ :
|
|
802
|
+
isInvalid: I,
|
|
803
|
+
"aria-labelledby": G ? $ : g,
|
|
804
804
|
"aria-describedby": C,
|
|
805
805
|
"data-refetch": c || void 0
|
|
806
806
|
}, le(U, {
|
|
@@ -810,7 +810,7 @@ const Ye = 'input[type="radio"]', oe = ({ children: e, className: t, ...n }) =>
|
|
|
810
810
|
slot: S
|
|
811
811
|
}))));
|
|
812
812
|
}, dn = ({ children: e, className: t, ...n }) => {
|
|
813
|
-
const { selectedDateLabel: a } =
|
|
813
|
+
const { selectedDateLabel: a } = h(), { labelId: s } = n;
|
|
814
814
|
return a ? /* @__PURE__ */ o.createElement("div", {
|
|
815
815
|
id: s,
|
|
816
816
|
className: t
|
|
@@ -822,13 +822,13 @@ const Ye = 'input[type="radio"]', oe = ({ children: e, className: t, ...n }) =>
|
|
|
822
822
|
return /* @__PURE__ */ o.createElement(Tt, {
|
|
823
823
|
value: a.key,
|
|
824
824
|
"aria-label": a.timeRange
|
|
825
|
-
}, /* @__PURE__ */ o.createElement(
|
|
825
|
+
}, /* @__PURE__ */ o.createElement(kt, {
|
|
826
826
|
className: t
|
|
827
827
|
}, e ? e(a) : a.timeRange));
|
|
828
828
|
};
|
|
829
829
|
oe.Label = dn;
|
|
830
830
|
oe.Slot = fn;
|
|
831
|
-
const
|
|
831
|
+
const m = ({ children: e, className: t }) => {
|
|
832
832
|
const n = ce(), { id: a, FieldLayout: s } = n, { labelId: r, inputId: l, ariaDescribedBy: i } = Ee(), c = ft(Dt.APPOINTMENT), D = P(() => ({
|
|
833
833
|
...n,
|
|
834
834
|
initialData: c,
|
|
@@ -843,10 +843,10 @@ const u = ({ children: e, className: t }) => {
|
|
|
843
843
|
r,
|
|
844
844
|
i,
|
|
845
845
|
a
|
|
846
|
-
]),
|
|
846
|
+
]), u = T(e, m.Label), p = T(e, m.Description), E = T(e, m.Error);
|
|
847
847
|
return /* @__PURE__ */ o.createElement(s, {
|
|
848
848
|
fieldId: a,
|
|
849
|
-
renderLabel: () => le(
|
|
849
|
+
renderLabel: () => le(u, {
|
|
850
850
|
as: "div"
|
|
851
851
|
}),
|
|
852
852
|
renderInput: () => /* @__PURE__ */ o.createElement(Ht, {
|
|
@@ -859,10 +859,10 @@ const u = ({ children: e, className: t }) => {
|
|
|
859
859
|
}, Dn = {
|
|
860
860
|
visibility: "hidden"
|
|
861
861
|
}, En = ({ children: e, className: t }) => {
|
|
862
|
-
const { required: n, onFocus: a, onBlur: s } = ce(), { inputId: r, labelId: l, ariaDescribedBy: i } = Ee(), c = rn(), D = T(e,
|
|
862
|
+
const { required: n, onFocus: a, onBlur: s } = ce(), { inputId: r, labelId: l, ariaDescribedBy: i } = Ee(), c = rn(), D = T(e, m.Loader), u = T(e, m.Notification), p = T(e, m.Dates), E = T(e, m.Timezone), d = T(e, m.Format), O = T(e, m.Slots), v = T(e, m.ShowMoreSlots);
|
|
863
863
|
return /* @__PURE__ */ o.createElement(je.Provider, {
|
|
864
864
|
value: c
|
|
865
|
-
}, /* @__PURE__ */ o.createElement(
|
|
865
|
+
}, /* @__PURE__ */ o.createElement(Ft, {
|
|
866
866
|
id: r,
|
|
867
867
|
className: t,
|
|
868
868
|
ariaLabelledBy: l,
|
|
@@ -870,13 +870,13 @@ const u = ({ children: e, className: t }) => {
|
|
|
870
870
|
required: n,
|
|
871
871
|
onFocus: a,
|
|
872
872
|
onBlur: s
|
|
873
|
-
}, D, c.hasError ?
|
|
873
|
+
}, D, c.hasError ? u : /* @__PURE__ */ o.createElement("div", {
|
|
874
874
|
style: c.isLoading ? Dn : void 0
|
|
875
|
-
}, p, E, d, le(
|
|
875
|
+
}, p, E, d, le(O, {
|
|
876
876
|
hasTimezoneNote: !!E
|
|
877
|
-
}),
|
|
877
|
+
}), u, v)));
|
|
878
878
|
}, Sn = ({ children: e, className: t }) => {
|
|
879
|
-
const { isLoading: n, isRefetching: a } =
|
|
879
|
+
const { isLoading: n, isRefetching: a } = h();
|
|
880
880
|
return !n && !a ? null : /* @__PURE__ */ o.createElement("div", {
|
|
881
881
|
className: t,
|
|
882
882
|
role: "status",
|
|
@@ -885,7 +885,7 @@ const u = ({ children: e, className: t }) => {
|
|
|
885
885
|
"data-refetch": !n && a || void 0
|
|
886
886
|
}, e);
|
|
887
887
|
}, pn = ({ children: e, className: t }) => {
|
|
888
|
-
const { notificationMessage: n } =
|
|
888
|
+
const { notificationMessage: n } = h();
|
|
889
889
|
return n ? /* @__PURE__ */ o.createElement("div", {
|
|
890
890
|
className: t,
|
|
891
891
|
role: "status"
|
|
@@ -893,7 +893,7 @@ const u = ({ children: e, className: t }) => {
|
|
|
893
893
|
message: n
|
|
894
894
|
}) : n) : null;
|
|
895
895
|
}, _n = ({ children: e, className: t }) => {
|
|
896
|
-
const { timezoneLabel: n } =
|
|
896
|
+
const { timezoneLabel: n } = h(), { inputId: a } = Ee();
|
|
897
897
|
return n ? /* @__PURE__ */ o.createElement("span", {
|
|
898
898
|
id: Qe(a),
|
|
899
899
|
className: t
|
|
@@ -901,15 +901,15 @@ const u = ({ children: e, className: t }) => {
|
|
|
901
901
|
label: n
|
|
902
902
|
}) : n) : null;
|
|
903
903
|
}, yn = ({ children: e, className: t }) => {
|
|
904
|
-
const { formatLabel: n } =
|
|
904
|
+
const { formatLabel: n } = h();
|
|
905
905
|
return n ? /* @__PURE__ */ o.createElement("span", {
|
|
906
906
|
className: t
|
|
907
907
|
}, e ? e({
|
|
908
908
|
label: n
|
|
909
909
|
}) : n) : null;
|
|
910
910
|
}, Ln = ({ children: e, className: t }) => {
|
|
911
|
-
const { hasMoreSlots: n, showMoreSlots: a, showMoreSlotsLabel: s } =
|
|
912
|
-
return n ? /* @__PURE__ */ o.createElement(
|
|
911
|
+
const { hasMoreSlots: n, showMoreSlots: a, showMoreSlotsLabel: s } = h(), { disabled: r, readOnly: l } = ce();
|
|
912
|
+
return n ? /* @__PURE__ */ o.createElement(ke, {
|
|
913
913
|
className: t,
|
|
914
914
|
isDisabled: !!r || !!l,
|
|
915
915
|
onPress: a
|
|
@@ -917,30 +917,30 @@ const u = ({ children: e, className: t }) => {
|
|
|
917
917
|
label: s
|
|
918
918
|
}) : s) : null;
|
|
919
919
|
};
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
const An = "
|
|
920
|
+
m.Label = wt;
|
|
921
|
+
m.Loader = Sn;
|
|
922
|
+
m.Notification = pn;
|
|
923
|
+
m.Dates = B;
|
|
924
|
+
m.Timezone = _n;
|
|
925
|
+
m.Format = yn;
|
|
926
|
+
m.Slots = oe;
|
|
927
|
+
m.ShowMoreSlots = Ln;
|
|
928
|
+
m.Description = vt;
|
|
929
|
+
m.Error = Rt;
|
|
930
|
+
const An = "_appointment_1397k_1", Nn = "_dates_1397k_5", bn = "_weekHeading_1397k_26", In = "_weekButton_1397k_35", On = "_previousWeek_1397k_67", gn = "_nextWeek_1397k_71", Tn = "_day_1397k_83", kn = "_weekdayLabel_1397k_95", vn = "_indicator_1397k_107", Rn = "_hint_1397k_130", wn = "_slots_1397k_143", Fn = "_slotsLabel_1397k_158", hn = "_slot_1397k_143", Mn = "_slotHover_1397k_197", Cn = "_slotSelected_1397k_205", Wn = "_showMoreSlots_1397k_259", Bn = "_loader_1397k_289", Un = "_notification_1397k_325", A = {
|
|
931
931
|
appointment: An,
|
|
932
932
|
dates: Nn,
|
|
933
|
-
weekHeading:
|
|
934
|
-
weekButton:
|
|
935
|
-
previousWeek:
|
|
936
|
-
nextWeek:
|
|
933
|
+
weekHeading: bn,
|
|
934
|
+
weekButton: In,
|
|
935
|
+
previousWeek: On,
|
|
936
|
+
nextWeek: gn,
|
|
937
937
|
day: Tn,
|
|
938
|
-
weekdayLabel:
|
|
938
|
+
weekdayLabel: kn,
|
|
939
939
|
indicator: vn,
|
|
940
|
-
hint:
|
|
941
|
-
slots:
|
|
942
|
-
slotsLabel:
|
|
943
|
-
slot:
|
|
940
|
+
hint: Rn,
|
|
941
|
+
slots: wn,
|
|
942
|
+
slotsLabel: Fn,
|
|
943
|
+
slot: hn,
|
|
944
944
|
slotHover: Mn,
|
|
945
945
|
slotSelected: Cn,
|
|
946
946
|
showMoreSlots: Wn,
|
|
@@ -954,55 +954,55 @@ const An = "_appointment_14hug_1", Nn = "_dates_14hug_6", gn = "_weekHeading_14h
|
|
|
954
954
|
selected: A.slotSelected,
|
|
955
955
|
hover: A.slotHover
|
|
956
956
|
}, zn = () => {
|
|
957
|
-
const e =
|
|
957
|
+
const e = bt({
|
|
958
958
|
globalClasses: Nt,
|
|
959
959
|
moduleClasses: Pn
|
|
960
960
|
});
|
|
961
|
-
return /* @__PURE__ */ o.createElement(
|
|
961
|
+
return /* @__PURE__ */ o.createElement(m, {
|
|
962
962
|
className: A.appointment
|
|
963
|
-
}, /* @__PURE__ */ o.createElement(
|
|
964
|
-
className:
|
|
965
|
-
}, /* @__PURE__ */ o.createElement(
|
|
966
|
-
className:
|
|
967
|
-
})), /* @__PURE__ */ o.createElement(
|
|
963
|
+
}, /* @__PURE__ */ o.createElement(m.Label, {
|
|
964
|
+
className: w(Et, de.label)
|
|
965
|
+
}, /* @__PURE__ */ o.createElement(m.Label.Required, {
|
|
966
|
+
className: w(St, de.requiredMark)
|
|
967
|
+
})), /* @__PURE__ */ o.createElement(m.Loader, {
|
|
968
968
|
className: A.loader
|
|
969
|
-
}), /* @__PURE__ */ o.createElement(
|
|
970
|
-
className:
|
|
971
|
-
}, /* @__PURE__ */ o.createElement(
|
|
972
|
-
className:
|
|
973
|
-
}, /* @__PURE__ */ o.createElement(Me, null)), /* @__PURE__ */ o.createElement(
|
|
969
|
+
}), /* @__PURE__ */ o.createElement(m.Dates, {
|
|
970
|
+
className: w(pt, A.dates)
|
|
971
|
+
}, /* @__PURE__ */ o.createElement(m.Dates.PreviousWeek, {
|
|
972
|
+
className: w(ue, A.weekButton, A.previousWeek)
|
|
973
|
+
}, /* @__PURE__ */ o.createElement(Me, null)), /* @__PURE__ */ o.createElement(m.Dates.Heading, {
|
|
974
974
|
className: A.weekHeading
|
|
975
|
-
}), /* @__PURE__ */ o.createElement(
|
|
976
|
-
className:
|
|
977
|
-
}, /* @__PURE__ */ o.createElement(Me, null)), /* @__PURE__ */ o.createElement(
|
|
978
|
-
className:
|
|
975
|
+
}), /* @__PURE__ */ o.createElement(m.Dates.NextWeek, {
|
|
976
|
+
className: w(ue, A.weekButton, A.nextWeek)
|
|
977
|
+
}, /* @__PURE__ */ o.createElement(Me, null)), /* @__PURE__ */ o.createElement(m.Dates.Day, {
|
|
978
|
+
className: w(ue, Ce.day, A.day)
|
|
979
979
|
}, (t) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
|
|
980
980
|
className: A.weekdayLabel
|
|
981
981
|
}, t.weekdayLabel), /* @__PURE__ */ o.createElement("span", {
|
|
982
982
|
className: Ce.dayNumber
|
|
983
983
|
}, t.dayOfMonthLabel, /* @__PURE__ */ o.createElement("span", {
|
|
984
984
|
className: A.indicator
|
|
985
|
-
}))))), /* @__PURE__ */ o.createElement(
|
|
986
|
-
className:
|
|
987
|
-
}), /* @__PURE__ */ o.createElement(
|
|
988
|
-
className:
|
|
989
|
-
}), /* @__PURE__ */ o.createElement(
|
|
985
|
+
}))))), /* @__PURE__ */ o.createElement(m.Timezone, {
|
|
986
|
+
className: w(We, A.hint)
|
|
987
|
+
}), /* @__PURE__ */ o.createElement(m.Format, {
|
|
988
|
+
className: w(We, A.hint)
|
|
989
|
+
}), /* @__PURE__ */ o.createElement(m.Slots, {
|
|
990
990
|
className: A.slots
|
|
991
|
-
}, /* @__PURE__ */ o.createElement(
|
|
992
|
-
className:
|
|
993
|
-
}), /* @__PURE__ */ o.createElement(
|
|
991
|
+
}, /* @__PURE__ */ o.createElement(m.Slots.Label, {
|
|
992
|
+
className: w(_t, A.slotsLabel)
|
|
993
|
+
}), /* @__PURE__ */ o.createElement(m.Slots.Slot, {
|
|
994
994
|
className: ({ isSelected: t, isHovered: n, isDisabled: a, isReadOnly: s }) => e({
|
|
995
995
|
isSelected: t,
|
|
996
996
|
isHovered: n && !t && !a && !s
|
|
997
997
|
})
|
|
998
|
-
}, (t) => t.timeRange)), /* @__PURE__ */ o.createElement(
|
|
998
|
+
}, (t) => t.timeRange)), /* @__PURE__ */ o.createElement(m.Notification, {
|
|
999
999
|
className: A.notification
|
|
1000
|
-
}), /* @__PURE__ */ o.createElement(
|
|
1001
|
-
className:
|
|
1002
|
-
}), /* @__PURE__ */ o.createElement(
|
|
1003
|
-
className:
|
|
1004
|
-
}, /* @__PURE__ */ o.createElement(it, null), /* @__PURE__ */ o.createElement(
|
|
1005
|
-
className:
|
|
1000
|
+
}), /* @__PURE__ */ o.createElement(m.ShowMoreSlots, {
|
|
1001
|
+
className: w(yt, ue, A.showMoreSlots)
|
|
1002
|
+
}), /* @__PURE__ */ o.createElement(m.Error, {
|
|
1003
|
+
className: w(Lt, de.error)
|
|
1004
|
+
}, /* @__PURE__ */ o.createElement(it, null), /* @__PURE__ */ o.createElement(m.Error.Text, null)), /* @__PURE__ */ o.createElement(m.Description, {
|
|
1005
|
+
className: w(At, de.description)
|
|
1006
1006
|
}, xn));
|
|
1007
1007
|
}, sa = () => /* @__PURE__ */ o.createElement(zn, null);
|
|
1008
1008
|
export {
|