@wix/form-elements 1.74.0 → 1.76.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-BQsFMmBg.js +1016 -0
- package/dist/component/{bookings-address-rac-BcrkXf63.js → bookings-address-rac-AJNyTdok.js} +1 -1
- package/dist/component/{bookings-email-rac-DYq5RxOP.js → bookings-email-rac-BHZ0MFgI.js} +1 -1
- package/dist/component/{bookings-first-name-rac-ZJ_sQ-01.js → bookings-first-name-rac-Bw5FuWNX.js} +1 -1
- package/dist/component/{bookings-header-rac-Cv8kl01f.js → bookings-header-rac-C1M2Pg1f.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BmnulSZ6.js → bookings-last-name-rac-DKkPY0CO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Bdi4xs9y.js → bookings-login-bar-rac-P6pziSl1.js} +2 -2
- package/dist/component/{bookings-phone-rac-C8DjSzUY.js → bookings-phone-rac-CiOZWKHz.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DYu011oy.js → bookings-rich-text-rac-D9ZComtY.js} +1 -1
- package/dist/component/{checkbox-field-rac-BH3yEE5j.js → checkbox-field-rac-4zG3Sf1c.js} +328 -320
- package/dist/component/checkbox-group-field-headless-DN2aNw9g.js +205 -0
- package/dist/component/checkbox-group-field-rac-B1qhet83.js +41 -0
- package/dist/component/{checkbox-group-rac-CgW0DnhX.js → checkbox-group-rac-DGsE7xGu.js} +1 -1
- package/dist/component/checkbox-indicator-module-classes-BcScu147.js +17 -0
- package/dist/component/{checkbox-rac-DOAYMMsi.js → checkbox-rac-CFWQW9_K.js} +1 -1
- package/dist/component/{contacts-address-rac-DXJa4J_k.js → contacts-address-rac-G5ZH3Odo.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CVsuRq3B.js → contacts-birthdate-rac-C7TDUfT0.js} +1 -1
- package/dist/component/{contacts-company-rac-b2bwHSNC.js → contacts-company-rac-8queUhWT.js} +1 -1
- package/dist/component/{contacts-email-rac-DMPcpQ1c.js → contacts-email-rac-CYOs5N_I.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CL2BsHuJ.js → contacts-first-name-rac-D8Goc_Ym.js} +1 -1
- package/dist/component/{contacts-last-name-rac-hdBsWaqb.js → contacts-last-name-rac-lBmtuEnr.js} +1 -1
- package/dist/component/{contacts-phone-rac-DQF6aV9B.js → contacts-phone-rac-DSUWUNBX.js} +1 -1
- package/dist/component/{contacts-position-rac-CVX-WCfx.js → contacts-position-rac-wA-aw5Id.js} +1 -1
- package/dist/component/contacts-subscribe-rac-CAbBbFxZ.js +13 -0
- package/dist/component/{contacts-tax-id-rac-0KTXvF81.js → contacts-tax-id-rac-BpjVM1Ye.js} +1 -1
- package/dist/component/{date-availability-DBljhBgO.js → date-availability-CeiMjrtD.js} +1 -1
- package/dist/component/{date-input-field-rac-CfflD2Ar.js → date-input-field-rac-CVaajAFM.js} +30 -30
- package/dist/component/{date-input-rac-fQclCKoa.js → date-input-rac-DhEzawuM.js} +1 -1
- package/dist/component/{date-picker-field-rac-BSmFOaH-.js → date-picker-field-rac-1Q6yyNmK.js} +35 -35
- package/dist/component/{date-picker-rac-D7I3ramu.js → date-picker-rac-BCGtmXMJ.js} +1 -1
- package/dist/component/{date-time-input-field-rac-vjZDQ_Fp.js → date-time-input-field-rac-Dd-HNgKP.js} +35 -35
- package/dist/component/{date-time-input-rac-CDbS0VZR.js → date-time-input-rac-CsCWEsH5.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BBiPt6_a.js → dext-checkbox-group-rac-CauN5uuV.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Cqp--0SO.js → dext-checkbox-rac-q-g9gDnw.js} +1 -1
- package/dist/component/{dext-date-picker-rac-5Wft0w9m.js → dext-date-picker-rac-CZT3dTLv.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Bbs7bgtn.js → dext-date-time-input-rac-DVUoZZbX.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CSvhtqbc.js → dext-dropdown-rac-GRltutt5.js} +1 -1
- package/dist/component/{dext-email-rac-BoLeXqyI.js → dext-email-rac-74Y8S9GA.js} +1 -1
- package/dist/component/{dext-number-input-rac-DzaJYTSz.js → dext-number-input-rac-CF9d_GTl.js} +1 -1
- package/dist/component/{dext-phone-rac-BagPg_CT.js → dext-phone-rac-DObx_gOd.js} +1 -1
- package/dist/component/{dext-radio-group-rac-B5HSQt7a.js → dext-radio-group-rac-CzU9KX5_.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DrtaAf-E.js → dext-rating-input-rac-BjRwwgXr.js} +1 -1
- package/dist/component/{dext-tags-rac-Cg4jJ4jr.js → dext-tags-rac-Vif4x1yF.js} +2 -2
- package/dist/component/{dext-text-area-rac-C_t-W7lk.js → dext-text-area-rac-DmZwl_ax.js} +1 -1
- package/dist/component/{dext-text-input-rac-ChvV21Jf.js → dext-text-input-rac-B6FVbjUM.js} +1 -1
- package/dist/component/{dext-url-input-rac-DclbSYTr.js → dext-url-input-rac-17Dj3ICM.js} +1 -1
- package/dist/component/donation-rac-bgHep0Xi.js +307 -0
- package/dist/component/{dropdown-field-headless-CTZ-zGqZ.js → dropdown-field-headless-BGfJ1FyZ.js} +3 -3
- package/dist/component/{dropdown-field-rac-C1KVtxwv.js → dropdown-field-rac-DGiysJQY.js} +7 -7
- package/dist/component/{dropdown-rac-CkkDEDje.js → dropdown-rac-FHjz8fKp.js} +1 -1
- package/dist/component/{ecom-address-rac-BOuugSxX.js → ecom-address-rac-DSbpf4z8.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-IZeMlljb.js → ecom-subscription-checkbox-rac-DiZWNwnt.js} +6 -6
- package/dist/component/{email-input-field-rac-CNzmm1j7.js → email-input-field-rac-BQKK2O7L.js} +44 -44
- package/dist/component/events-repeater-rac-Dudnyhal.js +255 -0
- package/dist/component/{events-rsvp-rac-BmjboAco.js → events-rsvp-rac-008H5Ska.js} +3 -3
- package/dist/component/{field-error-headless-DQZ5XAdn.js → field-error-headless-C5ZsFUKv.js} +1 -1
- package/dist/component/{field-label-headless-DoxfHHaj.js → field-label-headless-CS5OYsiI.js} +1 -1
- package/dist/component/field-rac.module-DjmaTYkc.js +23 -0
- package/dist/component/{file-upload-rac-YEQ7uXhm.js → file-upload-rac-bQ2QOO8Q.js} +48 -48
- package/dist/component/{fixed-payment-rac-DDufIQBT.js → fixed-payment-rac-B6FvXoCU.js} +17 -17
- package/dist/component/{form-C6WwBcGP.js → form-BpHElSwH.js} +69 -69
- package/dist/component/form-element-classes-BXNs5k3q.js +119 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DGfjrjQC.js → header-field-rac-D4UYcmok.js} +3 -3
- package/dist/component/{header-rac-C_JE2cTg.js → header-rac-KavPiBdn.js} +1 -1
- package/dist/component/{image-choice-rac-LDLPQwrN.js → image-choice-rac-BJQqBhBD.js} +35 -36
- package/dist/component/{index-CIOoaQ8Z.js → index-RSEYrQef.js} +2 -2
- package/dist/component/{index-C2srcuHD.js → index-Y8iTxLat.js} +4 -4
- package/dist/component/{isObjectLike-E5QfEa1u.js → isObjectLike-jwHec4Ap.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Biyj2tIN.js → multiline-address-field-rac-D4Ibno80.js} +110 -110
- package/dist/component/{multiline-address-rac-BCqCvG7a.js → multiline-address-rac-CrTSjzBN.js} +1 -1
- package/dist/component/{number-input-field-rac-CwUoIbM8.js → number-input-field-rac-DW1SjB-Z.js} +16 -16
- package/dist/component/{number-input-rac-CdYdTDem.js → number-input-rac-CdE_hRbA.js} +1 -1
- package/dist/component/{password-rac-D62npVHY.js → password-rac-BCxl5mMQ.js} +20 -20
- package/dist/component/{payment-input-rac-D4u-3vcW.js → payment-input-rac-DmO4s4ue.js} +9 -9
- package/dist/component/{phone-input-field-rac-uHxR3ozd.js → phone-input-field-rac-BYAnwk5h.js} +25 -25
- package/dist/component/{phone-rac-Bf99_BGi.js → phone-rac-gS4k9Yn8.js} +1 -1
- package/dist/component/product-list-rac-CO0o3yOg.js +271 -0
- package/dist/component/{quiz-radio-group-rac-CPGS0LEb.js → quiz-radio-group-rac-Dhk7nkzb.js} +2 -2
- package/dist/component/{radio-group-field-rac-BWpTNAbO.js → radio-group-field-rac-DdlyQ3m6.js} +3 -3
- package/dist/component/{radio-group-field-rac.module-WxU5zxvM.js → radio-group-field-rac.module-emin6sSc.js} +3 -3
- package/dist/component/{radio-group-rac-dA4WZ1Vj.js → radio-group-rac-B-9q91fJ.js} +1 -1
- package/dist/component/{rating-input-field-rac-CJnFsBvH.js → rating-input-field-rac-VDaJKq-n.js} +27 -28
- package/dist/component/{rating-input-rac-DXVYozFV.js → rating-input-rac-BVO62LmE.js} +1 -1
- package/dist/component/{rich-content-rac.module-DkKwzJS7.js → rich-content-rac.module-CdiaAjxG.js} +1 -1
- package/dist/component/{rich-text-field-rac-8FWCRrpb.js → rich-text-field-rac-C4RrbyEX.js} +3 -3
- package/dist/component/{rich-text-rac-OeM_mPRy.js → rich-text-rac-BG376ww9.js} +1 -1
- package/dist/component/{service-dropdown-rac-mvUMpcS_.js → service-dropdown-rac-Dy6-OpVR.js} +18 -18
- package/dist/component/services-multi-choice-rac-BKW9MP_b.js +84 -0
- package/dist/component/{signature-rac-D44U9Uyp.js → signature-rac-Cxgixp4o.js} +56 -56
- package/dist/component/{submit-button-rac-BqtcgVAn.js → submit-button-rac-BqPJ7WPI.js} +2 -2
- package/dist/component/{tags-field-rac-CemsTKWz.js → tags-field-rac-wwqpztG7.js} +36 -37
- package/dist/component/{tags-rac-fVjCf6qo.js → tags-rac-DUxITYxU.js} +1 -1
- package/dist/component/{text-area-field-rac-BPciZlZb.js → text-area-field-rac-Cen6O33S.js} +16 -16
- package/dist/component/{text-area-rac-CRTORdZM.js → text-area-rac-CRlO56GA.js} +1 -1
- package/dist/component/{text-input-field-rac-CvFoWlRN.js → text-input-field-rac-CbnKn03g.js} +6 -6
- package/dist/component/{text-input-headless-BQ3TWU9G.js → text-input-headless-C_NTJmLe.js} +3 -3
- package/dist/component/{text-input-rac-DSFkEmob.js → text-input-rac-DvwV7Igm.js} +1 -1
- package/dist/component/{time-input-rac-CGgs7ncp.js → time-input-rac-TSEXiODs.js} +15 -15
- package/dist/component/{url-input-field-rac-CqvgTc-F.js → url-input-field-rac-Cxgh9T8s.js} +20 -20
- package/dist/component/{url-input-rac-C45KOwnr.js → url-input-rac-DNw-Jg1U.js} +1 -1
- package/dist/component/use-element-state-class-name-CC65g9mT.js +15 -0
- package/dist/component/{use-service-options-base-D4Zl-iGW.js → use-service-options-base-EFrxTpGm.js} +1 -1
- package/package.json +2 -2
- package/dist/component/appointment-rac-Bze1s2XD.js +0 -1005
- package/dist/component/checkbox-group-field-headless-D_GG5LHM.js +0 -210
- package/dist/component/checkbox-group-field-rac-Cj7Erubs.js +0 -41
- package/dist/component/contacts-subscribe-rac-Dl1ot9qw.js +0 -13
- package/dist/component/donation-rac-FYQIMm5m.js +0 -308
- package/dist/component/events-repeater-rac-CMV0Lmwz.js +0 -247
- package/dist/component/field-rac.module-Cac83bU5.js +0 -21
- package/dist/component/form-element-classes-DDKCTFQj.js +0 -65
- package/dist/component/form-element-keys-D0sEdpFo.js +0 -8
- package/dist/component/product-list-rac-iRf6Ra7i.js +0 -263
- package/dist/component/services-multi-choice-rac-DrgUrn_N.js +0 -76
|
@@ -0,0 +1,1016 @@
|
|
|
1
|
+
import o, { useRef as X, useState as Q, useEffect as H, createContext as $e, useContext as Ge, useMemo as P, useCallback as ie } from "react";
|
|
2
|
+
import { RicosViewer as it } from "@wix/ricos/viewer";
|
|
3
|
+
import M from "classnames";
|
|
4
|
+
import { ab as ce, aa as lt, ae as ve, ad as ct, c as mt, as as ut, ar as dt, ai as me, af as Se, ak as ft, ah as Dt, F as Et } from "./form-BpHElSwH.js";
|
|
5
|
+
import { C as Ce } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
|
+
import { E as St } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
+
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
8
|
+
import { s as De } from "./field-rac.module-DjmaTYkc.js";
|
|
9
|
+
import { z as pt, Q as _t, a as Lt, x as We, h as yt, X as Nt, p as At, i as bt, a3 as It } from "./form-element-classes-BXNs5k3q.js";
|
|
10
|
+
import { u as Ot } from "./use-element-state-class-name-CC65g9mT.js";
|
|
11
|
+
import { ListBox as gt, Button as ke, ListBoxItem as Tt, RadioGroup as vt, RadioField as kt, RadioButton as Rt } from "react-aria-components";
|
|
12
|
+
import { f as T, a as le } from "./find-child-C60k4CxG.js";
|
|
13
|
+
import { D as wt, E as Mt } from "./field-error-headless-C5ZsFUKv.js";
|
|
14
|
+
import { L as Ft } from "./field-label-headless-CS5OYsiI.js";
|
|
15
|
+
import { F as ht } from "./fieldset-headless-CD3fds9J.js";
|
|
16
|
+
import { g as Ct } from "./get-first-day-of-the-week-DvnsxYhQ.js";
|
|
17
|
+
import "date-fns";
|
|
18
|
+
import { V as Ze } from "./headless-styles-CmcyA_pi.js";
|
|
19
|
+
function Wt(e) {
|
|
20
|
+
return { evid: 40, src: 16, endpoint: "", params: e };
|
|
21
|
+
}
|
|
22
|
+
var Oe = /* @__PURE__ */ (function(e) {
|
|
23
|
+
return e.BOOKING_NOT_INSTALL = "BOOKING_NOT_INSTALL", e.NO_AVAILABILITY_DATES_FOUND = "NO_AVAILABILITY_DATES_FOUND", e.GENERAL = "GENERAL", e;
|
|
24
|
+
})({}), z = /* @__PURE__ */ (function(e) {
|
|
25
|
+
return e.LOADING = "LOADING", e.DONE = "DONE", e.ERROR = "ERROR", e;
|
|
26
|
+
})({});
|
|
27
|
+
const V = 4;
|
|
28
|
+
var j = /* @__PURE__ */ (function(e) {
|
|
29
|
+
return e.FORM = "form", e.NO_AVAILABILITY_FOR_DATE = "no availability for date empty state", e.NO_AVAILABILITY_AT_ALL = "no availability at all empty state", e.SLOT = "slot", e.DATE = "date", e.PAGINATION = "pagination", e.SHOW_MORE = "show more", e;
|
|
30
|
+
})({}), te = /* @__PURE__ */ (function(e) {
|
|
31
|
+
return e.LOAD = "load", e.CLICK = "click", e;
|
|
32
|
+
})({});
|
|
33
|
+
const Bt = (e) => {
|
|
34
|
+
var n;
|
|
35
|
+
return {
|
|
36
|
+
bookingsServiceId: e == null ? void 0 : e.id,
|
|
37
|
+
formGuid: (n = e == null ? void 0 : e.form) == null ? void 0 : n.id,
|
|
38
|
+
serviceProperties: Ut(e)
|
|
39
|
+
};
|
|
40
|
+
}, Ut = (e) => {
|
|
41
|
+
var n;
|
|
42
|
+
return JSON.stringify({
|
|
43
|
+
serviceId: e == null ? void 0 : e.id,
|
|
44
|
+
serviceType: e == null ? void 0 : e.type,
|
|
45
|
+
locationIds: (n = e == null ? void 0 : e.locations) == null ? void 0 : n.map((t) => t.id).filter((t) => t),
|
|
46
|
+
staffMemberIds: e == null ? void 0 : e.staffMemberIds,
|
|
47
|
+
isOfferedAsPricingPlan: !1
|
|
48
|
+
});
|
|
49
|
+
}, Ve = (e) => {
|
|
50
|
+
var u;
|
|
51
|
+
const { appointmentFieldProps: n } = Re(), { isEditor: t, isComposer: a } = ce(), s = lt(), r = e || ((u = n == null ? void 0 : n.initialData) == null ? void 0 : u.service);
|
|
52
|
+
if (!(t || a))
|
|
53
|
+
return {
|
|
54
|
+
...s,
|
|
55
|
+
report: (i) => s == null ? void 0 : s.report(Wt({
|
|
56
|
+
...Bt(r),
|
|
57
|
+
...i
|
|
58
|
+
}))
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
var ge;
|
|
62
|
+
(function(e) {
|
|
63
|
+
e.UNDEFINED = "UNDEFINED", e.OWNER_BUSINESS = "OWNER_BUSINESS", e.OWNER_CUSTOM = "OWNER_CUSTOM", e.CUSTOM = "CUSTOM";
|
|
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
|
+
var Ue;
|
|
70
|
+
(function(e) {
|
|
71
|
+
e.UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE", e.BUSINESS = "BUSINESS", e.CUSTOM = "CUSTOM", e.CUSTOMER = "CUSTOMER";
|
|
72
|
+
})(Ue || (Ue = {}));
|
|
73
|
+
var xe;
|
|
74
|
+
(function(e) {
|
|
75
|
+
e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
|
|
76
|
+
})(xe || (xe = {}));
|
|
77
|
+
var Pe;
|
|
78
|
+
(function(e) {
|
|
79
|
+
e.ASC = "ASC", e.DESC = "DESC";
|
|
80
|
+
})(Pe || (Pe = {}));
|
|
81
|
+
const xt = (e) => {
|
|
82
|
+
const { service: n } = e || {};
|
|
83
|
+
return (n == null ? void 0 : n.id) ? null : {
|
|
84
|
+
type: Oe.GENERAL,
|
|
85
|
+
message: "Service ID is missing"
|
|
86
|
+
};
|
|
87
|
+
}, Pt = ({ appointmentFieldProps: e, isEditor: n, isComposer: t }) => {
|
|
88
|
+
const { initialData: a } = e, s = Yt();
|
|
89
|
+
if (n || t)
|
|
90
|
+
return {
|
|
91
|
+
...s,
|
|
92
|
+
timezone: qe(),
|
|
93
|
+
dataStatus: z.DONE
|
|
94
|
+
};
|
|
95
|
+
{
|
|
96
|
+
const r = xt(a);
|
|
97
|
+
if (r)
|
|
98
|
+
return {
|
|
99
|
+
dataStatus: z.ERROR,
|
|
100
|
+
error: r
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
...s,
|
|
105
|
+
dataStatus: z.LOADING
|
|
106
|
+
};
|
|
107
|
+
}, zt = (e, n) => {
|
|
108
|
+
const t = /* @__PURE__ */ new Date(), a = new Date(t);
|
|
109
|
+
a.setMonth(a.getMonth() + e);
|
|
110
|
+
const s = new Date(t.toLocaleString("en-US", {
|
|
111
|
+
timeZone: n
|
|
112
|
+
})), r = new Date(a.toLocaleString("en-US", {
|
|
113
|
+
timeZone: n
|
|
114
|
+
}));
|
|
115
|
+
return {
|
|
116
|
+
startDate: s,
|
|
117
|
+
endDate: r
|
|
118
|
+
};
|
|
119
|
+
}, qe = () => Intl.DateTimeFormat().resolvedOptions().timeZone, Ht = (e) => {
|
|
120
|
+
var n, t, a;
|
|
121
|
+
if ((t = (n = e == null ? void 0 : e[0]) == null ? void 0 : n.slot) != null && t.startDate)
|
|
122
|
+
return new Date((a = e[0].slot) == null ? void 0 : a.startDate);
|
|
123
|
+
}, Yt = ({ duration: e = 60, timezone: n = "UTC" } = {}) => {
|
|
124
|
+
var E, f;
|
|
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
|
+
let c = /* @__PURE__ */ new Date(`${u}T${i}:00:00`), d = new Date(c);
|
|
127
|
+
d.setMinutes(d.getMinutes() + e);
|
|
128
|
+
let S = !1;
|
|
129
|
+
for (; d.getHours() < l || d.getHours() === l && d.getMinutes() === 0; ) {
|
|
130
|
+
const g = {
|
|
131
|
+
slot: {
|
|
132
|
+
serviceId: t,
|
|
133
|
+
startDate: c.toISOString(),
|
|
134
|
+
endDate: d.toISOString(),
|
|
135
|
+
location: {
|
|
136
|
+
locationType: ge.CUSTOM
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
bookable: !0,
|
|
140
|
+
totalSpots: 1,
|
|
141
|
+
openSpots: 1,
|
|
142
|
+
bookingPolicyViolations: {
|
|
143
|
+
tooEarlyToBook: !1,
|
|
144
|
+
tooLateToBook: !1,
|
|
145
|
+
bookOnlineDisabled: !1
|
|
146
|
+
},
|
|
147
|
+
nestedSlots: []
|
|
148
|
+
};
|
|
149
|
+
r.push(g), S || (s.push(g), S = !0), c = new Date(d), d = new Date(c), d.setMinutes(d.getMinutes() + e);
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
availabilitySlots: r,
|
|
153
|
+
availabilityDates: s,
|
|
154
|
+
timezone: n,
|
|
155
|
+
currentSlotBulkSize: V,
|
|
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
|
+
};
|
|
158
|
+
};
|
|
159
|
+
function Kt(e) {
|
|
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 } = ve(), l = X(i);
|
|
162
|
+
l.current = i;
|
|
163
|
+
const c = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [d, S] = Q(null), E = Ve(n == null ? void 0 : n.service);
|
|
164
|
+
return H(() => {
|
|
165
|
+
u && !s && !r && c && (async () => {
|
|
166
|
+
var W, N, A, Y, B;
|
|
167
|
+
const v = qe(), O = {
|
|
168
|
+
currentSlotBulkSize: V,
|
|
169
|
+
timezone: v,
|
|
170
|
+
dataStatus: z.LOADING
|
|
171
|
+
};
|
|
172
|
+
try {
|
|
173
|
+
const U = async (oe) => {
|
|
174
|
+
var k, _;
|
|
175
|
+
const { startDate: se, endDate: $ } = zt(oe, v);
|
|
176
|
+
return (_ = (k = l.current) == null ? void 0 : k.getAvailabilityDates) == null ? void 0 : _.call(k, {
|
|
177
|
+
serviceId: u,
|
|
178
|
+
fromDate: se,
|
|
179
|
+
toDate: $,
|
|
180
|
+
timeZone: v
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
if (O.availabilityDates = await U(2), (W = O.availabilityDates) != null && W.length || (O.availabilityDates = await U(6)), !((N = O.availabilityDates) != null && N.length)) {
|
|
184
|
+
E == null || E.report({
|
|
185
|
+
action: te.LOAD,
|
|
186
|
+
component: j.NO_AVAILABILITY_AT_ALL
|
|
187
|
+
}), S({
|
|
188
|
+
dataStatus: z.ERROR,
|
|
189
|
+
error: {
|
|
190
|
+
type: Oe.NO_AVAILABILITY_DATES_FOUND,
|
|
191
|
+
message: "No availability dates found"
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
O.selectedDate = Ht(O.availabilityDates), O.selectedDate && (O.availabilitySlots = await ((Y = (A = l.current) == null ? void 0 : A.getAvailabilitySlots) == null ? void 0 : Y.call(A, {
|
|
197
|
+
serviceId: u,
|
|
198
|
+
timeZone: v,
|
|
199
|
+
selectedDate: O.selectedDate
|
|
200
|
+
}))), E == null || E.report({
|
|
201
|
+
action: te.LOAD,
|
|
202
|
+
component: (B = O.availabilityDates) != null && B.length ? j.FORM : j.NO_AVAILABILITY_FOR_DATE
|
|
203
|
+
}), a != null && a.startDate || t(void 0), S({
|
|
204
|
+
...O,
|
|
205
|
+
dataStatus: z.DONE
|
|
206
|
+
});
|
|
207
|
+
} catch (U) {
|
|
208
|
+
console.error(U), S({
|
|
209
|
+
dataStatus: z.ERROR,
|
|
210
|
+
error: {
|
|
211
|
+
type: Oe.GENERAL,
|
|
212
|
+
message: "An error occurred in initialAppointmentState"
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
})();
|
|
217
|
+
}, [
|
|
218
|
+
s,
|
|
219
|
+
r,
|
|
220
|
+
u,
|
|
221
|
+
c
|
|
222
|
+
]), d;
|
|
223
|
+
}
|
|
224
|
+
const Qe = /* @__PURE__ */ $e({
|
|
225
|
+
appointmentState: {},
|
|
226
|
+
setAppointmentState: () => {
|
|
227
|
+
}
|
|
228
|
+
}), $t = ({ appointmentFieldProps: e, children: n }) => {
|
|
229
|
+
const { isEditor: t, isComposer: a } = ce(), [s, r] = Q(() => Pt({
|
|
230
|
+
appointmentFieldProps: e,
|
|
231
|
+
isEditor: t,
|
|
232
|
+
isComposer: a
|
|
233
|
+
})), u = Kt(e);
|
|
234
|
+
return H(() => {
|
|
235
|
+
u && r({
|
|
236
|
+
...s,
|
|
237
|
+
...u
|
|
238
|
+
});
|
|
239
|
+
}, [
|
|
240
|
+
u
|
|
241
|
+
]), /* @__PURE__ */ o.createElement(Qe.Provider, {
|
|
242
|
+
value: {
|
|
243
|
+
appointmentFieldProps: e,
|
|
244
|
+
appointmentState: s,
|
|
245
|
+
setAppointmentState: (i) => r({
|
|
246
|
+
...s,
|
|
247
|
+
...i
|
|
248
|
+
})
|
|
249
|
+
}
|
|
250
|
+
}, n);
|
|
251
|
+
}, Re = () => Ge(Qe), Gt = (e, n) => {
|
|
252
|
+
if (e.startOfWeek.getMonth() === e.endOfWeek.getMonth())
|
|
253
|
+
return new Intl.DateTimeFormat(n, {
|
|
254
|
+
month: "long",
|
|
255
|
+
year: "numeric"
|
|
256
|
+
}).format(e.endOfWeek);
|
|
257
|
+
const t = new Intl.DateTimeFormat(n, {
|
|
258
|
+
month: "short"
|
|
259
|
+
}).format(e.startOfWeek), a = new Intl.DateTimeFormat(n, {
|
|
260
|
+
month: "short",
|
|
261
|
+
year: "numeric"
|
|
262
|
+
}).format(e.endOfWeek);
|
|
263
|
+
return `${t} - ${a}`;
|
|
264
|
+
}, Zt = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) || !(e != null && e.timeZone) ? null : {
|
|
265
|
+
startDate: e == null ? void 0 : e.startDate,
|
|
266
|
+
endDate: e == null ? void 0 : e.endDate,
|
|
267
|
+
timeZone: e == null ? void 0 : e.timeZone
|
|
268
|
+
}, ze = ({ timezone: e, language: n, formatType: t }) => {
|
|
269
|
+
var s;
|
|
270
|
+
return (s = new Intl.DateTimeFormat(n, {
|
|
271
|
+
timeZone: e,
|
|
272
|
+
timeZoneName: t === "name" ? "long" : "short"
|
|
273
|
+
}).formatToParts(/* @__PURE__ */ new Date()).find(({ type: r }) => r === "timeZoneName")) == null ? void 0 : s.value;
|
|
274
|
+
}, Vt = ({ timezone: e, language: n }) => {
|
|
275
|
+
const t = ze({
|
|
276
|
+
timezone: e,
|
|
277
|
+
language: n,
|
|
278
|
+
formatType: "name"
|
|
279
|
+
}), a = ze({
|
|
280
|
+
timezone: e,
|
|
281
|
+
language: n,
|
|
282
|
+
formatType: "offset"
|
|
283
|
+
});
|
|
284
|
+
return `${t} (${a})`;
|
|
285
|
+
}, ne = (e, n) => e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate(), qt = (e, n) => {
|
|
286
|
+
const t = new Date(e);
|
|
287
|
+
t.setDate(e.getDate() - n);
|
|
288
|
+
const a = new Date(e);
|
|
289
|
+
return a.setDate(e.getDate() + n), {
|
|
290
|
+
fromDate: t,
|
|
291
|
+
toDate: a
|
|
292
|
+
};
|
|
293
|
+
}, Qt = ({ setIsReloadingSlots: e }) => {
|
|
294
|
+
const { appointmentFieldProps: n, appointmentState: t, setAppointmentState: a } = Re(), { value: s } = n, { actions: r } = ve();
|
|
295
|
+
H(() => {
|
|
296
|
+
(async () => {
|
|
297
|
+
var i, l;
|
|
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
|
+
e(!0);
|
|
300
|
+
const d = new Date(s.startDate), { fromDate: S, toDate: E } = qt(d, 8), [f, g] = await Promise.all([
|
|
301
|
+
(i = r == null ? void 0 : r.getAvailabilityDates) == null ? void 0 : i.call(r, {
|
|
302
|
+
serviceId: n == null ? void 0 : n.initialData.service.id,
|
|
303
|
+
timeZone: (t == null ? void 0 : t.timezone) || "",
|
|
304
|
+
fromDate: S,
|
|
305
|
+
toDate: E
|
|
306
|
+
}),
|
|
307
|
+
(l = r == null ? void 0 : r.getAvailabilitySlots) == null ? void 0 : l.call(r, {
|
|
308
|
+
serviceId: n == null ? void 0 : n.initialData.service.id,
|
|
309
|
+
timeZone: (t == null ? void 0 : t.timezone) || "",
|
|
310
|
+
selectedDate: d
|
|
311
|
+
})
|
|
312
|
+
]);
|
|
313
|
+
a({
|
|
314
|
+
availabilityDates: f,
|
|
315
|
+
selectedDate: d,
|
|
316
|
+
availabilitySlots: g
|
|
317
|
+
}), e(!1);
|
|
318
|
+
}
|
|
319
|
+
})();
|
|
320
|
+
}, [
|
|
321
|
+
s,
|
|
322
|
+
t == null ? void 0 : t.dataStatus
|
|
323
|
+
]);
|
|
324
|
+
}, jt = (e, n) => !e || !n.length ? e : e.filter((t) => {
|
|
325
|
+
var a;
|
|
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}`, Xt = ({ locale: e, endDate: n, startDate: t, timezone: a }) => {
|
|
328
|
+
const s = {
|
|
329
|
+
hour: "numeric",
|
|
330
|
+
minute: "numeric",
|
|
331
|
+
timeZone: a
|
|
332
|
+
}, r = new Intl.DateTimeFormat(e, s).format(new Date(t)), u = new Intl.DateTimeFormat(e, s).format(new Date(n));
|
|
333
|
+
return `${r} - ${u}`;
|
|
334
|
+
}, Jt = ({ selectedDate: e, locale: n, timezone: t }) => e ? new Intl.DateTimeFormat(n, {
|
|
335
|
+
weekday: "long",
|
|
336
|
+
month: "short",
|
|
337
|
+
day: "numeric",
|
|
338
|
+
timeZone: t
|
|
339
|
+
}).format(e) : "", en = (e, n) => {
|
|
340
|
+
let t;
|
|
341
|
+
return n.forEach((a, s) => {
|
|
342
|
+
var r, u;
|
|
343
|
+
Ee({
|
|
344
|
+
startDate: (r = a == null ? void 0 : a.slot) == null ? void 0 : r.startDate,
|
|
345
|
+
endDate: (u = a == null ? void 0 : a.slot) == null ? void 0 : u.endDate
|
|
346
|
+
}) === e && (t = s);
|
|
347
|
+
}), t;
|
|
348
|
+
};
|
|
349
|
+
var tn = /* @__PURE__ */ (function(e) {
|
|
350
|
+
return e.OS_LOCATION = "OS_LOCATION", e.CUSTOM_LOCATION = "CUSTOM_LOCATION", e;
|
|
351
|
+
})({});
|
|
352
|
+
const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
353
|
+
var n;
|
|
354
|
+
return ((n = e == null ? void 0 : e.params) == null ? void 0 : n.reason) === nn;
|
|
355
|
+
}, on = ({ error: e, selectedSlot: n }) => {
|
|
356
|
+
const { isExperimentEnabled: t } = ct(), a = t(mt.BIF_SLOT_HOLD), [s, r] = Q(He), u = a && an(e), i = n == null ? void 0 : n.startDate, l = X(!1);
|
|
357
|
+
return H(() => {
|
|
358
|
+
if (!u) {
|
|
359
|
+
l.current = !1;
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
l.current || (l.current = !0, i && r((c) => c.includes(i) ? c : [
|
|
363
|
+
...c,
|
|
364
|
+
i
|
|
365
|
+
]));
|
|
366
|
+
}, [
|
|
367
|
+
u,
|
|
368
|
+
i
|
|
369
|
+
]), a ? s : He;
|
|
370
|
+
}, q = 7, Te = (e) => {
|
|
371
|
+
const n = new Date(e);
|
|
372
|
+
return n.setHours(0, 0, 0, 0), n;
|
|
373
|
+
}, sn = (e) => {
|
|
374
|
+
const n = new Date(e);
|
|
375
|
+
return n.setHours(23, 59, 59, 999), n;
|
|
376
|
+
}, ee = (e, n) => {
|
|
377
|
+
const t = new Date(e);
|
|
378
|
+
return t.setDate(t.getDate() + n), t;
|
|
379
|
+
}, Ye = (e, n) => {
|
|
380
|
+
const t = Te(e), a = (t.getDay() - n + q) % q;
|
|
381
|
+
return ee(t, -a);
|
|
382
|
+
}, rn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, ln = (e, n, t) => {
|
|
383
|
+
const a = new Intl.DateTimeFormat(t, {
|
|
384
|
+
month: "short",
|
|
385
|
+
day: "numeric"
|
|
386
|
+
});
|
|
387
|
+
return typeof a.formatRange == "function" ? a.formatRange(e, n) : `${a.format(e)} - ${a.format(n)}`;
|
|
388
|
+
}, cn = (e, n = []) => n.some((t) => {
|
|
389
|
+
var a;
|
|
390
|
+
return !!((a = t.slot) != null && a.startDate) && ne(new Date(t.slot.startDate), e);
|
|
391
|
+
}), mn = () => {
|
|
392
|
+
var he;
|
|
393
|
+
const { appointmentFieldProps: e, appointmentState: n, setAppointmentState: t } = Re(), { language: a, isEditor: s, isComposer: r, isMobile: u } = ce(), { t: i } = ut(), { actions: l } = ve(), c = Ve(), [d, S] = Q(!1), [E, f] = Q(!1), [g, v] = Q(), [O, W] = Q();
|
|
394
|
+
Qt({
|
|
395
|
+
setIsReloadingSlots: S
|
|
396
|
+
});
|
|
397
|
+
const { onChange: N, value: A, target: Y, initialData: B, formatDescription: U, locationType: oe, error: se } = e, { availabilityDates: $, availabilitySlots: k, timezone: _ = "", selectedDate: L, currentSlotBulkSize: R, dataStatus: G, error: ue } = n, K = (he = B == null ? void 0 : B.service) == null ? void 0 : he.id, Z = G === z.LOADING, J = d || E, pe = !!ue, Me = on({
|
|
398
|
+
error: se,
|
|
399
|
+
selectedSlot: A
|
|
400
|
+
}), y = P(() => jt(k, Me), [
|
|
401
|
+
k,
|
|
402
|
+
Me
|
|
403
|
+
]);
|
|
404
|
+
H(() => {
|
|
405
|
+
N == null || N(Zt(A));
|
|
406
|
+
}, [
|
|
407
|
+
A == null ? void 0 : A.startDate,
|
|
408
|
+
A == null ? void 0 : A.endDate,
|
|
409
|
+
_
|
|
410
|
+
]), dt((D) => {
|
|
411
|
+
const b = D == null ? void 0 : D[Y];
|
|
412
|
+
k != null && k.length && t({
|
|
413
|
+
availabilitySlots: k.filter((I) => {
|
|
414
|
+
var w;
|
|
415
|
+
return ((w = I == null ? void 0 : I.slot) == null ? void 0 : w.startDate) !== (b == null ? void 0 : b.startDate);
|
|
416
|
+
})
|
|
417
|
+
});
|
|
418
|
+
}), H(() => {
|
|
419
|
+
if (y != null && y.length && R) {
|
|
420
|
+
const D = en(Ee(A ?? void 0), y);
|
|
421
|
+
D && D + 1 > R && t({
|
|
422
|
+
currentSlotBulkSize: D + 1
|
|
423
|
+
});
|
|
424
|
+
} else !(y != null && y.length) && A && (N == null || N(void 0));
|
|
425
|
+
}, [
|
|
426
|
+
A,
|
|
427
|
+
y,
|
|
428
|
+
$
|
|
429
|
+
]);
|
|
430
|
+
const _e = P(() => Ct(a), [
|
|
431
|
+
a
|
|
432
|
+
]), Fe = X(L);
|
|
433
|
+
H(() => {
|
|
434
|
+
const D = Fe.current;
|
|
435
|
+
Fe.current = L, !!L && (!D || !ne(D, L)) && v(void 0);
|
|
436
|
+
}, [
|
|
437
|
+
L
|
|
438
|
+
]);
|
|
439
|
+
const h = P(() => g ?? Ye(L ?? /* @__PURE__ */ new Date(), _e), [
|
|
440
|
+
g,
|
|
441
|
+
L,
|
|
442
|
+
_e
|
|
443
|
+
]), Je = P(() => {
|
|
444
|
+
const D = Te(/* @__PURE__ */ new Date()), b = new Intl.DateTimeFormat(a, {
|
|
445
|
+
weekday: u ? "narrow" : "short"
|
|
446
|
+
}), I = new Intl.DateTimeFormat(a, {
|
|
447
|
+
day: "numeric"
|
|
448
|
+
}), w = new Intl.DateTimeFormat(a, {
|
|
449
|
+
weekday: "long",
|
|
450
|
+
month: "long",
|
|
451
|
+
day: "numeric"
|
|
452
|
+
});
|
|
453
|
+
return Array.from({
|
|
454
|
+
length: q
|
|
455
|
+
}, (re, be) => {
|
|
456
|
+
const x = ee(h, be), Ie = !!L && ne(x, L), rt = Te(x) < D;
|
|
457
|
+
return {
|
|
458
|
+
key: rn(x),
|
|
459
|
+
date: x,
|
|
460
|
+
isSelected: Ie,
|
|
461
|
+
isAvailable: !Z && !J && !Ie && cn(x, $),
|
|
462
|
+
isDisabled: rt || J && !Ie,
|
|
463
|
+
isToday: ne(x, D),
|
|
464
|
+
dayOfMonthLabel: I.format(x),
|
|
465
|
+
weekdayLabel: b.format(x),
|
|
466
|
+
label: w.format(x),
|
|
467
|
+
availabilityLabel: i("form.appointment.accessibility.calendar.has-availability.aria-label")
|
|
468
|
+
};
|
|
469
|
+
});
|
|
470
|
+
}, [
|
|
471
|
+
h,
|
|
472
|
+
L,
|
|
473
|
+
$,
|
|
474
|
+
Z,
|
|
475
|
+
J,
|
|
476
|
+
a,
|
|
477
|
+
u,
|
|
478
|
+
i
|
|
479
|
+
]), Le = Ee(A ?? void 0) || void 0, ye = P(() => Z || d ? [] : (y ?? []).slice(0, R).flatMap((D) => {
|
|
480
|
+
const { startDate: b, endDate: I } = D.slot ?? {};
|
|
481
|
+
if (!b || !I)
|
|
482
|
+
return [];
|
|
483
|
+
const w = Ee({
|
|
484
|
+
startDate: b,
|
|
485
|
+
endDate: I
|
|
486
|
+
});
|
|
487
|
+
return [
|
|
488
|
+
{
|
|
489
|
+
key: w,
|
|
490
|
+
startDate: b,
|
|
491
|
+
endDate: I,
|
|
492
|
+
timeRange: Xt({
|
|
493
|
+
startDate: b,
|
|
494
|
+
endDate: I,
|
|
495
|
+
locale: a,
|
|
496
|
+
timezone: _
|
|
497
|
+
}),
|
|
498
|
+
isSelected: w === Le
|
|
499
|
+
}
|
|
500
|
+
];
|
|
501
|
+
}), [
|
|
502
|
+
y,
|
|
503
|
+
R,
|
|
504
|
+
Z,
|
|
505
|
+
d,
|
|
506
|
+
a,
|
|
507
|
+
_,
|
|
508
|
+
Le
|
|
509
|
+
]), Ne = !d && !!(y != null && y.length) && (R || V) < y.length, Ae = h > Ye(/* @__PURE__ */ new Date(), _e), et = ie(
|
|
510
|
+
async (D) => {
|
|
511
|
+
var b;
|
|
512
|
+
if (!(J || L && ne(D, L))) {
|
|
513
|
+
S(!0), N == null || N(void 0), t({
|
|
514
|
+
currentSlotBulkSize: V,
|
|
515
|
+
selectedDate: D,
|
|
516
|
+
availabilitySlots: void 0
|
|
517
|
+
}), c == null || c.report({
|
|
518
|
+
action: te.CLICK,
|
|
519
|
+
component: j.DATE
|
|
520
|
+
});
|
|
521
|
+
try {
|
|
522
|
+
const I = await ((b = l == null ? void 0 : l.getAvailabilitySlots) == null ? void 0 : b.call(l, {
|
|
523
|
+
serviceId: K,
|
|
524
|
+
timeZone: _,
|
|
525
|
+
selectedDate: D
|
|
526
|
+
}));
|
|
527
|
+
t({
|
|
528
|
+
currentSlotBulkSize: V,
|
|
529
|
+
selectedDate: D,
|
|
530
|
+
availabilitySlots: I
|
|
531
|
+
});
|
|
532
|
+
} catch {
|
|
533
|
+
} finally {
|
|
534
|
+
S(!1);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
539
|
+
[
|
|
540
|
+
J,
|
|
541
|
+
L,
|
|
542
|
+
K,
|
|
543
|
+
_,
|
|
544
|
+
l,
|
|
545
|
+
N,
|
|
546
|
+
c
|
|
547
|
+
]
|
|
548
|
+
), de = X(0), tt = ie(
|
|
549
|
+
async (D) => {
|
|
550
|
+
var re;
|
|
551
|
+
if (D < 0 && !Ae)
|
|
552
|
+
return;
|
|
553
|
+
const b = h, I = ee(h, D * q);
|
|
554
|
+
if (v(I), s || r)
|
|
555
|
+
return;
|
|
556
|
+
const w = ++de.current;
|
|
557
|
+
f(!0), c == null || c.report({
|
|
558
|
+
action: te.CLICK,
|
|
559
|
+
component: j.PAGINATION
|
|
560
|
+
});
|
|
561
|
+
try {
|
|
562
|
+
const be = await ((re = l == null ? void 0 : l.getAvailabilityDates) == null ? void 0 : re.call(l, {
|
|
563
|
+
serviceId: K,
|
|
564
|
+
timeZone: _,
|
|
565
|
+
fromDate: I,
|
|
566
|
+
toDate: sn(ee(I, q - 1))
|
|
567
|
+
}));
|
|
568
|
+
w === de.current && t({
|
|
569
|
+
availabilityDates: be
|
|
570
|
+
});
|
|
571
|
+
} catch {
|
|
572
|
+
w === de.current && v(b);
|
|
573
|
+
} finally {
|
|
574
|
+
w === de.current && f(!1);
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
578
|
+
[
|
|
579
|
+
Ae,
|
|
580
|
+
h,
|
|
581
|
+
s,
|
|
582
|
+
r,
|
|
583
|
+
K,
|
|
584
|
+
_,
|
|
585
|
+
l,
|
|
586
|
+
c
|
|
587
|
+
]
|
|
588
|
+
), nt = ie(
|
|
589
|
+
(D) => {
|
|
590
|
+
const b = ye.find((re) => re.key === D);
|
|
591
|
+
if (!b)
|
|
592
|
+
return;
|
|
593
|
+
const { startDate: I, endDate: w } = b;
|
|
594
|
+
c == null || c.report({
|
|
595
|
+
action: te.CLICK,
|
|
596
|
+
component: j.SLOT,
|
|
597
|
+
startTime: new Date(I).valueOf(),
|
|
598
|
+
endTime: new Date(w).valueOf()
|
|
599
|
+
}), N == null || N({
|
|
600
|
+
startDate: I,
|
|
601
|
+
endDate: w,
|
|
602
|
+
timeZone: _
|
|
603
|
+
});
|
|
604
|
+
},
|
|
605
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
606
|
+
[
|
|
607
|
+
ye,
|
|
608
|
+
_,
|
|
609
|
+
N,
|
|
610
|
+
c
|
|
611
|
+
]
|
|
612
|
+
), at = ie(() => {
|
|
613
|
+
if (!Ne)
|
|
614
|
+
return;
|
|
615
|
+
const D = R || V;
|
|
616
|
+
c == null || c.report({
|
|
617
|
+
action: te.CLICK,
|
|
618
|
+
component: j.SHOW_MORE
|
|
619
|
+
}), W(D), t({
|
|
620
|
+
currentSlotBulkSize: D + V
|
|
621
|
+
});
|
|
622
|
+
}, [
|
|
623
|
+
Ne,
|
|
624
|
+
R,
|
|
625
|
+
c
|
|
626
|
+
]), ot = ie(() => W(void 0), []), st = P(() => {
|
|
627
|
+
if (pe)
|
|
628
|
+
return i("form.appointment.empty-state.notification.text");
|
|
629
|
+
if (!Z && !d && !(y != null && y.length))
|
|
630
|
+
return i("form.appointment.slots-not-found.text");
|
|
631
|
+
}, [
|
|
632
|
+
pe,
|
|
633
|
+
Z,
|
|
634
|
+
d,
|
|
635
|
+
y == null ? void 0 : y.length,
|
|
636
|
+
i
|
|
637
|
+
]);
|
|
638
|
+
return {
|
|
639
|
+
days: Je,
|
|
640
|
+
slots: ye,
|
|
641
|
+
selectedSlotKey: Le,
|
|
642
|
+
selectDate: et,
|
|
643
|
+
selectSlot: nt,
|
|
644
|
+
changeWeek: tt,
|
|
645
|
+
showMoreSlots: at,
|
|
646
|
+
canGoToPreviousWeek: Ae,
|
|
647
|
+
hasMoreSlots: Ne,
|
|
648
|
+
hasError: pe,
|
|
649
|
+
isLoading: Z,
|
|
650
|
+
isRefetching: J,
|
|
651
|
+
isReloadingSlots: d,
|
|
652
|
+
weekRangeLabel: ln(h, ee(h, q - 1), a),
|
|
653
|
+
weekCaptionLabel: Gt({
|
|
654
|
+
startOfWeek: h,
|
|
655
|
+
endOfWeek: ee(h, q - 1)
|
|
656
|
+
}, a),
|
|
657
|
+
selectedDateLabel: Jt({
|
|
658
|
+
selectedDate: L,
|
|
659
|
+
locale: a,
|
|
660
|
+
timezone: _
|
|
661
|
+
}),
|
|
662
|
+
timezoneLabel: _ ? `${i("form.appointment.timezone.label")}: ${Vt({
|
|
663
|
+
timezone: _,
|
|
664
|
+
language: a
|
|
665
|
+
})}` : "",
|
|
666
|
+
formatLabel: oe === tn.OS_LOCATION ? i("form.appointment.meeting-format.in-person-location-method-os-location") : U,
|
|
667
|
+
notificationMessage: st,
|
|
668
|
+
showMoreSlotsLabel: i("form.appointment.show-more-slots.text"),
|
|
669
|
+
previousWeekLabel: i("form.appointment.accessibility.calendar.previous-week.aria-label"),
|
|
670
|
+
nextWeekLabel: i("form.appointment.accessibility.calendar.next-week.aria-label"),
|
|
671
|
+
pendingFocusIndex: O,
|
|
672
|
+
consumePendingFocusIndex: ot
|
|
673
|
+
};
|
|
674
|
+
}, je = $e(void 0), Xe = (e) => `${e}-timezone-note`, F = () => {
|
|
675
|
+
const e = Ge(je);
|
|
676
|
+
if (typeof e > "u")
|
|
677
|
+
throw new Error("Appointment parts must be used inside an <Appointment> component");
|
|
678
|
+
return e;
|
|
679
|
+
}, we = () => {
|
|
680
|
+
const { disabled: e, readOnly: n } = me();
|
|
681
|
+
return !!e || !!n;
|
|
682
|
+
}, C = ({ children: e, className: n }) => {
|
|
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
|
+
t
|
|
685
|
+
]), d = we(), S = P(() => t.filter((f) => d || f.isDisabled).map((f) => f.key), [
|
|
686
|
+
t,
|
|
687
|
+
d
|
|
688
|
+
]), E = (f) => {
|
|
689
|
+
if (f === "all")
|
|
690
|
+
return;
|
|
691
|
+
const [g] = [
|
|
692
|
+
...f
|
|
693
|
+
], v = t.find(({ key: O }) => O === g);
|
|
694
|
+
v && a(v.date);
|
|
695
|
+
};
|
|
696
|
+
return /* @__PURE__ */ o.createElement("div", {
|
|
697
|
+
className: n
|
|
698
|
+
}, r, u, i, /* @__PURE__ */ o.createElement(gt, {
|
|
699
|
+
"aria-label": s,
|
|
700
|
+
orientation: "horizontal",
|
|
701
|
+
selectionMode: "single",
|
|
702
|
+
selectedKeys: c,
|
|
703
|
+
disabledKeys: S,
|
|
704
|
+
onSelectionChange: E
|
|
705
|
+
}, t.map((f) => le(l, {
|
|
706
|
+
key: f.key,
|
|
707
|
+
day: f
|
|
708
|
+
}))));
|
|
709
|
+
}, un = ({ children: e, className: n }) => {
|
|
710
|
+
const { changeWeek: t, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), u = we(), i = X(null), l = X(!1);
|
|
711
|
+
return H(() => {
|
|
712
|
+
var S, E, f;
|
|
713
|
+
if (a || !l.current)
|
|
714
|
+
return;
|
|
715
|
+
l.current = !1;
|
|
716
|
+
const c = document.activeElement;
|
|
717
|
+
if (c !== document.body && c !== i.current)
|
|
718
|
+
return;
|
|
719
|
+
const d = ((E = (S = i.current) == null ? void 0 : S.closest("fieldset")) == null ? void 0 : E.querySelectorAll("button")) ?? [];
|
|
720
|
+
(f = Array.from(d).find((g) => g.getAttribute("aria-label") === r)) == null || f.focus();
|
|
721
|
+
}, [
|
|
722
|
+
a,
|
|
723
|
+
r
|
|
724
|
+
]), /* @__PURE__ */ o.createElement(ke, {
|
|
725
|
+
ref: i,
|
|
726
|
+
className: n,
|
|
727
|
+
"aria-label": s,
|
|
728
|
+
isDisabled: !a || u,
|
|
729
|
+
onPress: () => {
|
|
730
|
+
l.current = !0, t(-1);
|
|
731
|
+
}
|
|
732
|
+
}, e ?? "‹");
|
|
733
|
+
}, dn = ({ children: e, className: n }) => {
|
|
734
|
+
const { changeWeek: t, nextWeekLabel: a } = F(), s = we();
|
|
735
|
+
return /* @__PURE__ */ o.createElement(ke, {
|
|
736
|
+
className: n,
|
|
737
|
+
"aria-label": a,
|
|
738
|
+
isDisabled: s,
|
|
739
|
+
onPress: () => t(1)
|
|
740
|
+
}, e ?? "›");
|
|
741
|
+
}, fn = ({ children: e, className: n }) => {
|
|
742
|
+
const { weekCaptionLabel: t, weekRangeLabel: a } = F();
|
|
743
|
+
return /* @__PURE__ */ o.createElement("span", {
|
|
744
|
+
className: n,
|
|
745
|
+
"aria-live": "polite"
|
|
746
|
+
}, e ? e({
|
|
747
|
+
label: t,
|
|
748
|
+
weekRange: a
|
|
749
|
+
}) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
|
|
750
|
+
"aria-hidden": "true"
|
|
751
|
+
}, t), /* @__PURE__ */ o.createElement("span", {
|
|
752
|
+
style: Ze
|
|
753
|
+
}, a)));
|
|
754
|
+
}, Dn = ({ children: e, className: n, ...t }) => {
|
|
755
|
+
const { day: a } = t;
|
|
756
|
+
return /* @__PURE__ */ o.createElement(Tt, {
|
|
757
|
+
id: a.key,
|
|
758
|
+
className: n,
|
|
759
|
+
textValue: a.label,
|
|
760
|
+
"aria-label": a.isAvailable ? `${a.label}, ${a.availabilityLabel}` : a.label,
|
|
761
|
+
"data-available": a.isAvailable || void 0,
|
|
762
|
+
"data-today": a.isToday || void 0
|
|
763
|
+
}, e ? e({
|
|
764
|
+
...a,
|
|
765
|
+
date: new Date(a.date)
|
|
766
|
+
}) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", null, a.weekdayLabel), /* @__PURE__ */ o.createElement("span", null, a.dayOfMonthLabel)));
|
|
767
|
+
};
|
|
768
|
+
C.PreviousWeek = un;
|
|
769
|
+
C.Heading = fn;
|
|
770
|
+
C.NextWeek = dn;
|
|
771
|
+
C.Day = Dn;
|
|
772
|
+
const Ke = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) => {
|
|
773
|
+
const { hasTimezoneNote: a } = t, { slots: s, selectedSlotKey: r, selectSlot: u, selectedDateLabel: i, isReloadingSlots: l, timezoneLabel: c, pendingFocusIndex: d, consumePendingFocusIndex: S } = F(), { id: E, disabled: f, readOnly: g, required: v, hasError: O } = me(), { inputId: W, labelId: N, ariaDescribedBy: A } = Se(), Y = X(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
|
+
A,
|
|
775
|
+
a && c ? Xe(W) : void 0
|
|
776
|
+
].filter(Boolean).join(" ") || void 0, k = (_) => {
|
|
777
|
+
var L, R, G;
|
|
778
|
+
(G = (R = (L = Y.current) == null ? void 0 : L.querySelectorAll(Ke)) == null ? void 0 : R[_]) == null || G.focus();
|
|
779
|
+
};
|
|
780
|
+
return ft(() => {
|
|
781
|
+
var G, ue;
|
|
782
|
+
if (!!((G = Y.current) != null && G.querySelector(Ke))) {
|
|
783
|
+
k(0);
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
const L = Array.from(((ue = document.getElementById(W)) == null ? void 0 : ue.querySelectorAll('[role="option"]')) ?? []), R = L.find((K) => K.getAttribute("aria-selected") === "true") ?? L.find((K) => K.getAttribute("aria-disabled") !== "true");
|
|
787
|
+
R == null || R.focus();
|
|
788
|
+
}, E), H(() => {
|
|
789
|
+
d !== void 0 && (k(d), S());
|
|
790
|
+
}, [
|
|
791
|
+
d,
|
|
792
|
+
s.length
|
|
793
|
+
]), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
|
|
794
|
+
role: "status",
|
|
795
|
+
style: Ze
|
|
796
|
+
}, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(vt, {
|
|
797
|
+
ref: Y,
|
|
798
|
+
className: n,
|
|
799
|
+
value: r ?? null,
|
|
800
|
+
onChange: u,
|
|
801
|
+
isDisabled: f,
|
|
802
|
+
isReadOnly: g,
|
|
803
|
+
isRequired: v,
|
|
804
|
+
isInvalid: O,
|
|
805
|
+
"aria-labelledby": se ? B : N,
|
|
806
|
+
"aria-describedby": $,
|
|
807
|
+
"data-refetch": l || void 0
|
|
808
|
+
}, le(U, {
|
|
809
|
+
labelId: B
|
|
810
|
+
}), s.map((_) => le(oe, {
|
|
811
|
+
key: _.key,
|
|
812
|
+
slot: _
|
|
813
|
+
}))));
|
|
814
|
+
}, En = ({ children: e, className: n, ...t }) => {
|
|
815
|
+
const { selectedDateLabel: a } = F(), { labelId: s } = t;
|
|
816
|
+
return a ? /* @__PURE__ */ o.createElement("div", {
|
|
817
|
+
id: s,
|
|
818
|
+
className: n
|
|
819
|
+
}, e ? e({
|
|
820
|
+
label: a
|
|
821
|
+
}) : a) : null;
|
|
822
|
+
}, Sn = ({ children: e, className: n, ...t }) => {
|
|
823
|
+
const { slot: a } = t;
|
|
824
|
+
return /* @__PURE__ */ o.createElement(kt, {
|
|
825
|
+
value: a.key,
|
|
826
|
+
"aria-label": a.timeRange
|
|
827
|
+
}, /* @__PURE__ */ o.createElement(Rt, {
|
|
828
|
+
className: n
|
|
829
|
+
}, e ? e(a) : a.timeRange));
|
|
830
|
+
};
|
|
831
|
+
ae.Label = En;
|
|
832
|
+
ae.Slot = Sn;
|
|
833
|
+
const m = ({ children: e, className: n }) => {
|
|
834
|
+
const t = me(), { id: a, FieldLayout: s } = t, { labelId: r, inputId: u, ariaDescribedBy: i } = Se(), l = Dt(Et.APPOINTMENT), c = P(() => ({
|
|
835
|
+
...t,
|
|
836
|
+
initialData: l,
|
|
837
|
+
inputId: u,
|
|
838
|
+
ariaLabelledBy: r,
|
|
839
|
+
ariaDescribedBy: i,
|
|
840
|
+
fieldId: a
|
|
841
|
+
}), [
|
|
842
|
+
t,
|
|
843
|
+
l,
|
|
844
|
+
u,
|
|
845
|
+
r,
|
|
846
|
+
i,
|
|
847
|
+
a
|
|
848
|
+
]), d = T(e, m.Label), S = T(e, m.Description), E = T(e, m.Error);
|
|
849
|
+
return /* @__PURE__ */ o.createElement(s, {
|
|
850
|
+
fieldId: a,
|
|
851
|
+
renderLabel: () => le(d, {
|
|
852
|
+
as: "div"
|
|
853
|
+
}),
|
|
854
|
+
renderInput: () => /* @__PURE__ */ o.createElement($t, {
|
|
855
|
+
appointmentFieldProps: c
|
|
856
|
+
}, /* @__PURE__ */ o.createElement(_n, {
|
|
857
|
+
className: n
|
|
858
|
+
}, e)),
|
|
859
|
+
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, E, S)
|
|
860
|
+
});
|
|
861
|
+
}, pn = {
|
|
862
|
+
visibility: "hidden"
|
|
863
|
+
}, _n = ({ children: e, className: n }) => {
|
|
864
|
+
const { required: t, onFocus: a, onBlur: s } = me(), { inputId: r, labelId: u, ariaDescribedBy: i } = Se(), l = mn(), 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), v = T(e, m.ShowMoreSlots);
|
|
865
|
+
return /* @__PURE__ */ o.createElement(je.Provider, {
|
|
866
|
+
value: l
|
|
867
|
+
}, /* @__PURE__ */ o.createElement(ht, {
|
|
868
|
+
id: r,
|
|
869
|
+
className: n,
|
|
870
|
+
ariaLabelledBy: u,
|
|
871
|
+
ariaDescribedBy: i,
|
|
872
|
+
required: t,
|
|
873
|
+
onFocus: a,
|
|
874
|
+
onBlur: s
|
|
875
|
+
}, c, l.hasError ? d : /* @__PURE__ */ o.createElement("div", {
|
|
876
|
+
style: l.isLoading ? pn : void 0
|
|
877
|
+
}, S, E, f, le(g, {
|
|
878
|
+
hasTimezoneNote: !!E
|
|
879
|
+
}), d, v)));
|
|
880
|
+
}, Ln = ({ children: e, className: n }) => {
|
|
881
|
+
const { isLoading: t, isRefetching: a } = F();
|
|
882
|
+
return !t && !a ? null : /* @__PURE__ */ o.createElement("div", {
|
|
883
|
+
className: n,
|
|
884
|
+
role: "status",
|
|
885
|
+
"aria-live": "polite",
|
|
886
|
+
"data-initial": t || void 0,
|
|
887
|
+
"data-refetch": !t && a || void 0
|
|
888
|
+
}, e);
|
|
889
|
+
}, yn = ({ children: e, className: n }) => {
|
|
890
|
+
const { notificationMessage: t } = F();
|
|
891
|
+
return t ? /* @__PURE__ */ o.createElement("div", {
|
|
892
|
+
className: n,
|
|
893
|
+
role: "status"
|
|
894
|
+
}, e ? e({
|
|
895
|
+
message: t
|
|
896
|
+
}) : t) : null;
|
|
897
|
+
}, Nn = ({ children: e, className: n }) => {
|
|
898
|
+
const { timezoneLabel: t } = F(), { inputId: a } = Se();
|
|
899
|
+
return t ? /* @__PURE__ */ o.createElement("span", {
|
|
900
|
+
id: Xe(a),
|
|
901
|
+
className: n
|
|
902
|
+
}, e ? e({
|
|
903
|
+
label: t
|
|
904
|
+
}) : t) : null;
|
|
905
|
+
}, An = ({ children: e, className: n }) => {
|
|
906
|
+
const { formatLabel: t } = F();
|
|
907
|
+
return t ? /* @__PURE__ */ o.createElement("span", {
|
|
908
|
+
className: n
|
|
909
|
+
}, e ? e({
|
|
910
|
+
label: t
|
|
911
|
+
}) : t) : null;
|
|
912
|
+
}, bn = ({ children: e, className: n }) => {
|
|
913
|
+
const { hasMoreSlots: t, showMoreSlots: a, showMoreSlotsLabel: s } = F(), { disabled: r, readOnly: u } = me();
|
|
914
|
+
return t ? /* @__PURE__ */ o.createElement(ke, {
|
|
915
|
+
className: n,
|
|
916
|
+
isDisabled: !!r || !!u,
|
|
917
|
+
onPress: a
|
|
918
|
+
}, e ? e({
|
|
919
|
+
label: s
|
|
920
|
+
}) : s) : null;
|
|
921
|
+
};
|
|
922
|
+
m.Label = Ft;
|
|
923
|
+
m.Loader = Ln;
|
|
924
|
+
m.Notification = yn;
|
|
925
|
+
m.Dates = C;
|
|
926
|
+
m.Timezone = Nn;
|
|
927
|
+
m.Format = An;
|
|
928
|
+
m.Slots = ae;
|
|
929
|
+
m.ShowMoreSlots = bn;
|
|
930
|
+
m.Description = wt;
|
|
931
|
+
m.Error = Mt;
|
|
932
|
+
const In = "_appointment_743lv_1", On = "_dates_743lv_5", gn = "_weekHeading_743lv_26", Tn = "_weekButton_743lv_35", vn = "_previousWeek_743lv_67", kn = "_nextWeek_743lv_71", Rn = "_day_743lv_83", wn = "_weekdayLabel_743lv_97", Mn = "_dayNumber_743lv_109", Fn = "_indicator_743lv_174", hn = "_hint_743lv_204", Cn = "_slots_743lv_217", Wn = "_slotsMobile_743lv_226", Bn = "_slotsLabel_743lv_230", Un = "_slot_743lv_217", xn = "_slotHover_743lv_269", Pn = "_slotSelected_743lv_277", zn = "_showMoreSlots_743lv_331", Hn = "_loader_743lv_361", Yn = "_notification_743lv_397", p = {
|
|
933
|
+
appointment: In,
|
|
934
|
+
dates: On,
|
|
935
|
+
weekHeading: gn,
|
|
936
|
+
weekButton: Tn,
|
|
937
|
+
previousWeek: vn,
|
|
938
|
+
nextWeek: kn,
|
|
939
|
+
day: Rn,
|
|
940
|
+
weekdayLabel: wn,
|
|
941
|
+
dayNumber: Mn,
|
|
942
|
+
indicator: Fn,
|
|
943
|
+
hint: hn,
|
|
944
|
+
slots: Cn,
|
|
945
|
+
slotsMobile: Wn,
|
|
946
|
+
slotsLabel: Bn,
|
|
947
|
+
slot: Un,
|
|
948
|
+
slotHover: xn,
|
|
949
|
+
slotSelected: Pn,
|
|
950
|
+
showMoreSlots: zn,
|
|
951
|
+
loader: Hn,
|
|
952
|
+
notification: Yn
|
|
953
|
+
}, Kn = ({ content: e, locale: n }) => /* @__PURE__ */ o.createElement(it, {
|
|
954
|
+
content: e,
|
|
955
|
+
locale: n
|
|
956
|
+
}), $n = {
|
|
957
|
+
base: p.slot,
|
|
958
|
+
selected: p.slotSelected,
|
|
959
|
+
hover: p.slotHover
|
|
960
|
+
}, Gn = () => {
|
|
961
|
+
const { isMobile: e } = ce(), n = Ot({
|
|
962
|
+
globalClasses: It,
|
|
963
|
+
moduleClasses: $n
|
|
964
|
+
});
|
|
965
|
+
return /* @__PURE__ */ o.createElement(m, {
|
|
966
|
+
className: p.appointment
|
|
967
|
+
}, /* @__PURE__ */ o.createElement(m.Label, {
|
|
968
|
+
className: M(pt, De.label)
|
|
969
|
+
}, /* @__PURE__ */ o.createElement(m.Label.Required, {
|
|
970
|
+
className: M(_t, De.requiredMark)
|
|
971
|
+
})), /* @__PURE__ */ o.createElement(m.Loader, {
|
|
972
|
+
className: p.loader
|
|
973
|
+
}), /* @__PURE__ */ o.createElement(m.Dates, {
|
|
974
|
+
className: M(Lt, p.dates)
|
|
975
|
+
}, /* @__PURE__ */ o.createElement(m.Dates.PreviousWeek, {
|
|
976
|
+
className: M(fe, p.weekButton, p.previousWeek)
|
|
977
|
+
}, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(m.Dates.Heading, {
|
|
978
|
+
className: p.weekHeading
|
|
979
|
+
}), /* @__PURE__ */ o.createElement(m.Dates.NextWeek, {
|
|
980
|
+
className: M(fe, p.weekButton, p.nextWeek)
|
|
981
|
+
}, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(m.Dates.Day, {
|
|
982
|
+
className: M(fe, p.day)
|
|
983
|
+
}, (t) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
|
|
984
|
+
className: p.weekdayLabel
|
|
985
|
+
}, t.weekdayLabel), /* @__PURE__ */ o.createElement("span", {
|
|
986
|
+
className: p.dayNumber
|
|
987
|
+
}, t.dayOfMonthLabel, /* @__PURE__ */ o.createElement("span", {
|
|
988
|
+
className: p.indicator
|
|
989
|
+
}))))), /* @__PURE__ */ o.createElement(m.Timezone, {
|
|
990
|
+
className: M(We, p.hint)
|
|
991
|
+
}), /* @__PURE__ */ o.createElement(m.Format, {
|
|
992
|
+
className: M(We, p.hint)
|
|
993
|
+
}), /* @__PURE__ */ o.createElement(m.Slots, {
|
|
994
|
+
className: M(p.slots, {
|
|
995
|
+
[p.slotsMobile]: e
|
|
996
|
+
})
|
|
997
|
+
}, /* @__PURE__ */ o.createElement(m.Slots.Label, {
|
|
998
|
+
className: M(yt, p.slotsLabel)
|
|
999
|
+
}), /* @__PURE__ */ o.createElement(m.Slots.Slot, {
|
|
1000
|
+
className: ({ isSelected: t, isHovered: a, isDisabled: s, isReadOnly: r }) => n({
|
|
1001
|
+
isSelected: t,
|
|
1002
|
+
isHovered: a && !t && !s && !r
|
|
1003
|
+
})
|
|
1004
|
+
}, (t) => t.timeRange)), /* @__PURE__ */ o.createElement(m.Notification, {
|
|
1005
|
+
className: p.notification
|
|
1006
|
+
}), /* @__PURE__ */ o.createElement(m.ShowMoreSlots, {
|
|
1007
|
+
className: M(Nt, fe, p.showMoreSlots)
|
|
1008
|
+
}), /* @__PURE__ */ o.createElement(m.Error, {
|
|
1009
|
+
className: M(At, De.error)
|
|
1010
|
+
}, /* @__PURE__ */ o.createElement(St, null), /* @__PURE__ */ o.createElement(m.Error.Text, null)), /* @__PURE__ */ o.createElement(m.Description, {
|
|
1011
|
+
className: M(bt, De.description)
|
|
1012
|
+
}, Kn));
|
|
1013
|
+
}, ua = () => /* @__PURE__ */ o.createElement(Gn, null);
|
|
1014
|
+
export {
|
|
1015
|
+
ua as AppointmentRAC
|
|
1016
|
+
};
|