@wix/form-elements 1.107.0 → 1.109.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-D2F4vgf1.js → appointment-rac-C9-XwsPI.js} +295 -296
- package/dist/component/{bookings-address-rac-_5S8J8_i.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-6vmDR9nS.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DtTJ4T2K.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-B3dsEwzR.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-B3idkbi8.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CrRBcQwT.js → bookings-login-bar-rac-4Mb7MQYe.js} +21 -22
- package/dist/component/{bookings-phone-rac-BE0yWNnj.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CYo1l0-6.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-boTtXVEt.js → checkbox-field-rac-Dwx1leKA.js} +27 -28
- package/dist/component/{checkbox-group-field-headless-DnkUvDm8.js → checkbox-group-field-headless-AFWgXzx_.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-DrDTgHMg.js → checkbox-group-field-rac-CO8kmWJp.js} +6 -6
- package/dist/component/{checkbox-group-rac-v3ozUBpo.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-YSLE-RnG.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-C653yaHZ.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BeAQ6shx.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-BglKOoTG.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-D6m7ynfc.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Dgxn0tUJ.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-1UyIuRKH.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-BQ77BlW4.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BUDUv7lv.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DdtA0qKW.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WUaKcNl0.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-XjBFq8jt.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-aY2zuuKs.js → date-input-field-rac-8oERZcqh.js} +79 -80
- package/dist/component/{date-input-rac-DRiP2_97.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-Bzl-d3Uj.js → date-picker-field-rac-CIspU7No.js} +87 -88
- package/dist/component/{date-picker-rac-DHHUh8vn.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DP_StuLr.js → date-time-input-field-rac-0daWK65I.js} +73 -74
- package/dist/component/{date-time-input-rac-B11KIxsf.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BHZBqyWv.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BIlAqEvV.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CHBXNrZi.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BYtliKry.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C2VPSFV5.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-Fnb0Ggcs.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-DopfSyFi.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-Rn4i_2rc.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-bNaskJpK.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-DL6ZZd7d.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-TsUPoImO.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-BIuY7LTd.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-CSYPW0Qi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-_g0lqGfW.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BYKFtsyR.js → donation-rac-BboGm_k_.js} +101 -102
- package/dist/component/{dropdown-field-headless-CBaqlNZi.js → dropdown-field-headless-BTMJGUwY.js} +16 -16
- package/dist/component/{dropdown-field-rac-CCAGSMm3.js → dropdown-field-rac-CDRV8ckB.js} +5 -5
- package/dist/component/{dropdown-rac-C_EqUsZ1.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-Bw9eH0iF.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5PVOO2a.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +6 -6
- package/dist/component/{email-input-field-rac-B2kqQ6yo.js → email-input-field-rac-DdOd86NX.js} +54 -55
- package/dist/component/{events-repeater-rac--4OnUxWE.js → events-repeater-rac-_VJ30dpB.js} +62 -63
- package/dist/component/{events-rsvp-rac-CczCoo3T.js → events-rsvp-rac-DA-261bq.js} +5 -5
- package/dist/component/{field-error-headless-D3-1L5sf.js → field-error-headless-CovyN0GI.js} +8 -8
- package/dist/component/{field-label-headless-Du4ckIVy.js → field-label-headless-DVvX2QaH.js} +11 -11
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/fixed-payment-rac-DmI6MeKc.js +61 -0
- package/dist/component/{form-DQauhsho.js → form-BTDgyr54.js} +3430 -3244
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/header-field-rac-C0rUjmo0.js +24 -0
- package/dist/component/{header-rac-CR9T3Pnu.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-DJ_8v467.js → image-choice-rac-CQDQ7AlD.js} +32 -33
- package/dist/component/{index-CcUTIUWM.js → index-B9QlosT1.js} +12 -12
- package/dist/component/{index-BB7d_9Dv.js → index-CNWT9t6j.js} +66 -66
- package/dist/component/{isObjectLike-xvPa_08X.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CyaFOloE.js → multiline-address-field-rac-D8bVxRsD.js} +124 -125
- package/dist/component/{multiline-address-rac-CaHGUN_f.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/number-input-field-rac-BaOwQ5Ya.js +92 -0
- package/dist/component/{number-input-rac-DMKX6nhk.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-0RUXPAn6.js → password-rac-BB9XeSSZ.js} +36 -37
- package/dist/component/{payment-input-rac-CHSZ3-Lt.js → payment-input-rac-DwnSV9rM.js} +41 -42
- package/dist/component/{phone-input-field-rac-JmIFcP1e.js → phone-input-field-rac-CC3C4ToW.js} +56 -57
- package/dist/component/{phone-rac-BLRnAPXP.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-BkF5tDwt.js → product-list-rac-BAESk3B6.js} +74 -75
- package/dist/component/{quiz-radio-group-rac-32cCMTUS.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-IOulhuSH.js → radio-button-module-classes-CXcn5unY.js} +30 -30
- package/dist/component/{radio-group-field-rac-CJwku6e0.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-BiW-9Abj.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-B9cwaROK.js → rating-input-field-rac-DDHBkR4x.js} +43 -44
- package/dist/component/{rating-input-rac-BpwlNvzQ.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-B1uyPmtK.js → rich-content-rac.module-B2vsO6fj.js} +4 -4
- package/dist/component/rich-text-field-rac-CvKht2eC.js +21 -0
- package/dist/component/{rich-text-rac-VfeZxS27.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-BCfs8IhW.js → service-dropdown-rac-BOpdXNjG.js} +36 -37
- package/dist/component/{services-multi-choice-rac-CCqdF_7P.js → services-multi-choice-rac-t0wdSt_T.js} +20 -21
- package/dist/component/{signature-rac-DOyMo3u0.js → signature-rac-2LsIYYIX.js} +141 -142
- package/dist/component/{submit-button-rac-C2uA5DeE.js → submit-button-rac-BbE8dS35.js} +26 -27
- package/dist/component/{tags-field-rac-C_uIw2by.js → tags-field-rac-BnsBxReU.js} +44 -45
- package/dist/component/{tags-rac-1pQ-fpe_.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-DqlOkm7e.js → text-area-field-rac-Ag7_gniM.js} +28 -29
- package/dist/component/{text-area-rac-DPdkrFcH.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CmXm6r1w.js → text-input-field-rac-D3MZ8teu.js} +3 -3
- package/dist/component/{text-input-headless-DD__2DFf.js → text-input-headless-CwONErsY.js} +12 -12
- package/dist/component/{text-input-rac-DRHyQEH7.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-BJPIymQY.js → time-input-rac-Bs55lTON.js} +33 -34
- package/dist/component/url-input-field-rac-FG-bCh-E.js +74 -0
- package/dist/component/{url-input-rac-C0ChQUzq.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-DjV7FW5y.js +21 -0
- package/dist/component/{use-element-state-class-name-BatTc2bw.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B0jiPTmS.js → use-is-forced-open-dropdown-ifUIpuwL.js} +7 -7
- package/dist/component/{use-service-options-base-oeE7xszw.js → use-service-options-base-B11cq0HH.js} +7 -7
- package/dist/component/use-text-input-class-name-va1PzWFg.js +23 -0
- package/dist/form.d.ts +21 -1
- package/package.json +2 -2
- package/dist/component/file-upload-rac-DbdkUbWM.js +0 -484
- package/dist/component/fixed-payment-rac-f9-01iDN.js +0 -62
- package/dist/component/form-element-classes-bLFmhsKw.js +0 -137
- package/dist/component/header-field-rac-DamDk5BR.js +0 -25
- package/dist/component/number-input-field-rac-BuYUzDWV.js +0 -93
- package/dist/component/rich-text-field-rac-C_qE7Ykg.js +0 -22
- package/dist/component/url-input-field-rac-CFDYkZ6I.js +0 -75
- package/dist/component/use-dropdown-option-class-name-3L5ZmNLK.js +0 -21
- package/dist/component/use-text-input-class-name-LQ5S-NLh.js +0 -24
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import o, { useRef as X, useState as Q, useEffect as H, createContext as
|
|
2
|
-
import { RicosViewer as
|
|
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
|
+
import { RicosViewer as rt } from "@wix/ricos/viewer";
|
|
3
3
|
import R from "classnames";
|
|
4
4
|
import { C as Me } from "./chevron-down-icon-CcpVm6B-.js";
|
|
5
|
-
import { E as
|
|
6
|
-
import { g as
|
|
5
|
+
import { E as it } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
+
import { g as lt, c as Ce } from "./calendar.module-DnhTT4QT.js";
|
|
7
7
|
import { H as me } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as de } from "./field-rac.module-B4l_0KRU.js";
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import { ListBox as
|
|
12
|
-
import { ac as De, ab as It, ag as he, af as Ot, c as bt, au as Tt, at as ht, ak as ce, ah as Ee, am as vt, aj as kt, F as Rt } from "./form-DQauhsho.js";
|
|
9
|
+
import { b1 as De, b0 as ct, b5 as Te, bj as ut, bi as mt, 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-BTDgyr54.js";
|
|
10
|
+
import { u as gt } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
11
|
+
import { ListBox as bt, Button as he, ListBoxItem as It, RadioGroup as Ot, RadioField as Tt, RadioButton as ht } from "react-aria-components";
|
|
13
12
|
import { f as T, a as le } from "./find-child-C60k4CxG.js";
|
|
14
|
-
import { D as
|
|
15
|
-
import { L as
|
|
16
|
-
import { F as
|
|
13
|
+
import { D as vt, E as kt } from "./field-error-headless-CovyN0GI.js";
|
|
14
|
+
import { L as Rt } from "./field-label-headless-DVvX2QaH.js";
|
|
15
|
+
import { F as wt } from "./fieldset-headless-CD3fds9J.js";
|
|
17
16
|
import "date-fns";
|
|
18
|
-
import { V as
|
|
19
|
-
function
|
|
17
|
+
import { V as Ge } from "./headless-styles-CmcyA_pi.js";
|
|
18
|
+
function Ft(e) {
|
|
20
19
|
return { evid: 40, src: 16, endpoint: "", params: e };
|
|
21
20
|
}
|
|
22
|
-
var
|
|
21
|
+
var be = /* @__PURE__ */ (function(e) {
|
|
23
22
|
return e.BOOKING_NOT_INSTALL = "BOOKING_NOT_INSTALL", e.NO_AVAILABILITY_DATES_FOUND = "NO_AVAILABILITY_DATES_FOUND", e.GENERAL = "GENERAL", e;
|
|
24
23
|
})({}), z = /* @__PURE__ */ (function(e) {
|
|
25
24
|
return e.LOADING = "LOADING", e.DONE = "DONE", e.ERROR = "ERROR", e;
|
|
@@ -30,14 +29,14 @@ var J = /* @__PURE__ */ (function(e) {
|
|
|
30
29
|
})({}), ne = /* @__PURE__ */ (function(e) {
|
|
31
30
|
return e.LOAD = "load", e.CLICK = "click", e;
|
|
32
31
|
})({});
|
|
33
|
-
const
|
|
32
|
+
const Mt = (e) => {
|
|
34
33
|
var t;
|
|
35
34
|
return {
|
|
36
35
|
bookingsServiceId: e == null ? void 0 : e.id,
|
|
37
36
|
formGuid: (t = e == null ? void 0 : e.form) == null ? void 0 : t.id,
|
|
38
|
-
serviceProperties:
|
|
37
|
+
serviceProperties: Ct(e)
|
|
39
38
|
};
|
|
40
|
-
},
|
|
39
|
+
}, Ct = (e) => {
|
|
41
40
|
var t;
|
|
42
41
|
return JSON.stringify({
|
|
43
42
|
serviceId: e == null ? void 0 : e.id,
|
|
@@ -46,22 +45,22 @@ const Bt = (e) => {
|
|
|
46
45
|
staffMemberIds: e == null ? void 0 : e.staffMemberIds,
|
|
47
46
|
isOfferedAsPricingPlan: !1
|
|
48
47
|
});
|
|
49
|
-
},
|
|
48
|
+
}, Ze = (e) => {
|
|
50
49
|
var l;
|
|
51
|
-
const { appointmentFieldProps: t } = ve(), { isEditor: n, isComposer: a } = De(), s =
|
|
50
|
+
const { appointmentFieldProps: t } = ve(), { isEditor: n, isComposer: a } = De(), s = ct(), r = e || ((l = t == null ? void 0 : t.initialData) == null ? void 0 : l.service);
|
|
52
51
|
if (!(n || a))
|
|
53
52
|
return {
|
|
54
53
|
...s,
|
|
55
|
-
report: (i) => s == null ? void 0 : s.report(
|
|
56
|
-
...
|
|
54
|
+
report: (i) => s == null ? void 0 : s.report(Ft({
|
|
55
|
+
...Mt(r),
|
|
57
56
|
...i
|
|
58
57
|
}))
|
|
59
58
|
};
|
|
60
59
|
};
|
|
61
|
-
var
|
|
60
|
+
var Ie;
|
|
62
61
|
(function(e) {
|
|
63
62
|
e.UNDEFINED = "UNDEFINED", e.OWNER_BUSINESS = "OWNER_BUSINESS", e.OWNER_CUSTOM = "OWNER_CUSTOM", e.CUSTOM = "CUSTOM";
|
|
64
|
-
})(
|
|
63
|
+
})(Ie || (Ie = {}));
|
|
65
64
|
var Be;
|
|
66
65
|
(function(e) {
|
|
67
66
|
e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
|
|
@@ -78,22 +77,22 @@ var Pe;
|
|
|
78
77
|
(function(e) {
|
|
79
78
|
e.ASC = "ASC", e.DESC = "DESC";
|
|
80
79
|
})(Pe || (Pe = {}));
|
|
81
|
-
const
|
|
80
|
+
const Wt = (e) => {
|
|
82
81
|
const { service: t } = e || {};
|
|
83
82
|
return (t == null ? void 0 : t.id) ? null : {
|
|
84
|
-
type:
|
|
83
|
+
type: be.GENERAL,
|
|
85
84
|
message: "Service ID is missing"
|
|
86
85
|
};
|
|
87
|
-
},
|
|
88
|
-
const { initialData: a } = e, s =
|
|
86
|
+
}, Bt = ({ appointmentFieldProps: e, isEditor: t, isComposer: n }) => {
|
|
87
|
+
const { initialData: a } = e, s = Pt();
|
|
89
88
|
if (t || n)
|
|
90
89
|
return {
|
|
91
90
|
...s,
|
|
92
|
-
timezone:
|
|
91
|
+
timezone: Ve(),
|
|
93
92
|
dataStatus: z.DONE
|
|
94
93
|
};
|
|
95
94
|
{
|
|
96
|
-
const r =
|
|
95
|
+
const r = Wt(a);
|
|
97
96
|
if (r)
|
|
98
97
|
return {
|
|
99
98
|
dataStatus: z.ERROR,
|
|
@@ -104,7 +103,7 @@ const xt = (e) => {
|
|
|
104
103
|
...s,
|
|
105
104
|
dataStatus: z.LOADING
|
|
106
105
|
};
|
|
107
|
-
},
|
|
106
|
+
}, Ut = (e, t) => {
|
|
108
107
|
const n = /* @__PURE__ */ new Date(), a = new Date(n);
|
|
109
108
|
a.setMonth(a.getMonth() + e);
|
|
110
109
|
const s = new Date(n.toLocaleString("en-US", {
|
|
@@ -116,24 +115,24 @@ const xt = (e) => {
|
|
|
116
115
|
startDate: s,
|
|
117
116
|
endDate: r
|
|
118
117
|
};
|
|
119
|
-
},
|
|
118
|
+
}, Ve = () => Intl.DateTimeFormat().resolvedOptions().timeZone, xt = (e) => {
|
|
120
119
|
var t, n, a;
|
|
121
120
|
if ((n = (t = e == null ? void 0 : e[0]) == null ? void 0 : t.slot) != null && n.startDate)
|
|
122
121
|
return new Date((a = e[0].slot) == null ? void 0 : a.startDate);
|
|
123
|
-
},
|
|
124
|
-
var E,
|
|
122
|
+
}, Pt = ({ duration: e = 60, timezone: t = "UTC" } = {}) => {
|
|
123
|
+
var E, d;
|
|
125
124
|
const n = "267d1c11-8019-4e3d-b9c6-cd2b859c69e2", a = /* @__PURE__ */ new Date(), s = [], r = [], l = a.toISOString().split("T")[0], i = 10, c = 18;
|
|
126
|
-
let
|
|
125
|
+
let D = /* @__PURE__ */ new Date(`${l}T${i}:00:00`), m = new Date(D);
|
|
127
126
|
m.setMinutes(m.getMinutes() + e);
|
|
128
127
|
let p = !1;
|
|
129
128
|
for (; m.getHours() < c || m.getHours() === c && m.getMinutes() === 0; ) {
|
|
130
|
-
const
|
|
129
|
+
const I = {
|
|
131
130
|
slot: {
|
|
132
131
|
serviceId: n,
|
|
133
|
-
startDate:
|
|
132
|
+
startDate: D.toISOString(),
|
|
134
133
|
endDate: m.toISOString(),
|
|
135
134
|
location: {
|
|
136
|
-
locationType:
|
|
135
|
+
locationType: Ie.CUSTOM
|
|
137
136
|
}
|
|
138
137
|
},
|
|
139
138
|
bookable: !0,
|
|
@@ -146,69 +145,69 @@ const xt = (e) => {
|
|
|
146
145
|
},
|
|
147
146
|
nestedSlots: []
|
|
148
147
|
};
|
|
149
|
-
r.push(
|
|
148
|
+
r.push(I), p || (s.push(I), p = !0), D = new Date(m), m = new Date(D), m.setMinutes(m.getMinutes() + e);
|
|
150
149
|
}
|
|
151
150
|
return {
|
|
152
151
|
availabilitySlots: r,
|
|
153
152
|
availabilityDates: s,
|
|
154
153
|
timezone: t,
|
|
155
154
|
currentSlotBulkSize: q,
|
|
156
|
-
selectedDate: s.length > 0 && ((
|
|
155
|
+
selectedDate: s.length > 0 && ((d = (E = s[0]) == null ? void 0 : E.slot) != null && d.startDate) ? new Date(s[0].slot.startDate) : void 0
|
|
157
156
|
};
|
|
158
157
|
};
|
|
159
|
-
function
|
|
160
|
-
var
|
|
161
|
-
const { initialData: t, onChange: n, value: a } = e, { isEditor: s, isComposer: r } = De(), l = (
|
|
158
|
+
function zt(e) {
|
|
159
|
+
var d;
|
|
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);
|
|
162
161
|
c.current = i;
|
|
163
|
-
const
|
|
162
|
+
const D = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [m, p] = Q(null), E = Ze(t == null ? void 0 : t.service);
|
|
164
163
|
return H(() => {
|
|
165
|
-
l && !s && !r &&
|
|
166
|
-
var _,
|
|
167
|
-
const v =
|
|
164
|
+
l && !s && !r && D && (async () => {
|
|
165
|
+
var _, O, Y, M, $;
|
|
166
|
+
const v = Ve(), b = {
|
|
168
167
|
currentSlotBulkSize: q,
|
|
169
168
|
timezone: v,
|
|
170
169
|
dataStatus: z.LOADING
|
|
171
170
|
};
|
|
172
171
|
try {
|
|
173
172
|
const U = async (se) => {
|
|
174
|
-
var
|
|
175
|
-
const { startDate: G, endDate: C } =
|
|
176
|
-
return (S = (
|
|
173
|
+
var y, S;
|
|
174
|
+
const { startDate: G, endDate: C } = Ut(se, v);
|
|
175
|
+
return (S = (y = c.current) == null ? void 0 : y.getAvailabilityDates) == null ? void 0 : S.call(y, {
|
|
177
176
|
serviceId: l,
|
|
178
177
|
fromDate: G,
|
|
179
178
|
toDate: C,
|
|
180
179
|
timeZone: v
|
|
181
180
|
});
|
|
182
181
|
};
|
|
183
|
-
if (
|
|
182
|
+
if (b.availabilityDates = await U(2), (_ = b.availabilityDates) != null && _.length || (b.availabilityDates = await U(6)), !((O = b.availabilityDates) != null && O.length)) {
|
|
184
183
|
E == null || E.report({
|
|
185
184
|
action: ne.LOAD,
|
|
186
185
|
component: J.NO_AVAILABILITY_AT_ALL
|
|
187
186
|
}), p({
|
|
188
187
|
dataStatus: z.ERROR,
|
|
189
188
|
error: {
|
|
190
|
-
type:
|
|
189
|
+
type: be.NO_AVAILABILITY_DATES_FOUND,
|
|
191
190
|
message: "No availability dates found"
|
|
192
191
|
}
|
|
193
192
|
});
|
|
194
193
|
return;
|
|
195
194
|
}
|
|
196
|
-
|
|
195
|
+
b.selectedDate = xt(b.availabilityDates), b.selectedDate && (b.availabilitySlots = await ((M = (Y = c.current) == null ? void 0 : Y.getAvailabilitySlots) == null ? void 0 : M.call(Y, {
|
|
197
196
|
serviceId: l,
|
|
198
197
|
timeZone: v,
|
|
199
|
-
selectedDate:
|
|
198
|
+
selectedDate: b.selectedDate
|
|
200
199
|
}))), E == null || E.report({
|
|
201
200
|
action: ne.LOAD,
|
|
202
|
-
component: ($ =
|
|
201
|
+
component: ($ = b.availabilityDates) != null && $.length ? J.FORM : J.NO_AVAILABILITY_FOR_DATE
|
|
203
202
|
}), a != null && a.startDate || n(void 0), p({
|
|
204
|
-
...
|
|
203
|
+
...b,
|
|
205
204
|
dataStatus: z.DONE
|
|
206
205
|
});
|
|
207
206
|
} catch (U) {
|
|
208
207
|
console.error(U), p({
|
|
209
208
|
dataStatus: z.ERROR,
|
|
210
209
|
error: {
|
|
211
|
-
type:
|
|
210
|
+
type: be.GENERAL,
|
|
212
211
|
message: "An error occurred in initialAppointmentState"
|
|
213
212
|
}
|
|
214
213
|
});
|
|
@@ -218,19 +217,19 @@ function Kt(e) {
|
|
|
218
217
|
s,
|
|
219
218
|
r,
|
|
220
219
|
l,
|
|
221
|
-
|
|
220
|
+
D
|
|
222
221
|
]), m;
|
|
223
222
|
}
|
|
224
|
-
const
|
|
223
|
+
const qe = /* @__PURE__ */ Ke({
|
|
225
224
|
appointmentState: {},
|
|
226
225
|
setAppointmentState: () => {
|
|
227
226
|
}
|
|
228
|
-
}),
|
|
229
|
-
const { isEditor: n, isComposer: a } = De(), [s, r] = Q(() =>
|
|
227
|
+
}), Ht = ({ appointmentFieldProps: e, children: t }) => {
|
|
228
|
+
const { isEditor: n, isComposer: a } = De(), [s, r] = Q(() => Bt({
|
|
230
229
|
appointmentFieldProps: e,
|
|
231
230
|
isEditor: n,
|
|
232
231
|
isComposer: a
|
|
233
|
-
})), l =
|
|
232
|
+
})), l = zt(e);
|
|
234
233
|
return H(() => {
|
|
235
234
|
l && r({
|
|
236
235
|
...s,
|
|
@@ -238,7 +237,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
238
237
|
});
|
|
239
238
|
}, [
|
|
240
239
|
l
|
|
241
|
-
]), /* @__PURE__ */ o.createElement(
|
|
240
|
+
]), /* @__PURE__ */ o.createElement(qe.Provider, {
|
|
242
241
|
value: {
|
|
243
242
|
appointmentFieldProps: e,
|
|
244
243
|
appointmentState: s,
|
|
@@ -248,7 +247,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
248
247
|
})
|
|
249
248
|
}
|
|
250
249
|
}, t);
|
|
251
|
-
}, ve = () =>
|
|
250
|
+
}, ve = () => $e(qe), Yt = (e, t) => {
|
|
252
251
|
if (e.startOfWeek.getMonth() === e.endOfWeek.getMonth())
|
|
253
252
|
return new Intl.DateTimeFormat(t, {
|
|
254
253
|
month: "long",
|
|
@@ -261,7 +260,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
261
260
|
year: "numeric"
|
|
262
261
|
}).format(e.endOfWeek);
|
|
263
262
|
return `${n} - ${a}`;
|
|
264
|
-
},
|
|
263
|
+
}, Kt = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) || !(e != null && e.timeZone) ? null : {
|
|
265
264
|
startDate: e == null ? void 0 : e.startDate,
|
|
266
265
|
endDate: e == null ? void 0 : e.endDate,
|
|
267
266
|
timeZone: e == null ? void 0 : e.timeZone
|
|
@@ -271,7 +270,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
271
270
|
timeZone: e,
|
|
272
271
|
timeZoneName: n === "name" ? "long" : "short"
|
|
273
272
|
}).formatToParts(/* @__PURE__ */ new Date()).find(({ type: r }) => r === "timeZoneName")) == null ? void 0 : s.value;
|
|
274
|
-
},
|
|
273
|
+
}, $t = ({ timezone: e, language: t }) => {
|
|
275
274
|
const n = ze({
|
|
276
275
|
timezone: e,
|
|
277
276
|
language: t,
|
|
@@ -282,7 +281,7 @@ const je = /* @__PURE__ */ $e({
|
|
|
282
281
|
formatType: "offset"
|
|
283
282
|
});
|
|
284
283
|
return `${n} (${a})`;
|
|
285
|
-
}, ae = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(),
|
|
284
|
+
}, ae = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), Gt = (e, t) => {
|
|
286
285
|
const n = new Date(e);
|
|
287
286
|
n.setDate(e.getDate() - t);
|
|
288
287
|
const a = new Date(e);
|
|
@@ -290,14 +289,14 @@ const je = /* @__PURE__ */ $e({
|
|
|
290
289
|
fromDate: n,
|
|
291
290
|
toDate: a
|
|
292
291
|
};
|
|
293
|
-
},
|
|
294
|
-
const { appointmentFieldProps: t, appointmentState: n, setAppointmentState: a } = ve(), { value: s } = t, { actions: r } =
|
|
292
|
+
}, Zt = ({ setIsReloadingSlots: e }) => {
|
|
293
|
+
const { appointmentFieldProps: t, appointmentState: n, setAppointmentState: a } = ve(), { value: s } = t, { actions: r } = Te();
|
|
295
294
|
H(() => {
|
|
296
295
|
(async () => {
|
|
297
296
|
var i, c;
|
|
298
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)) {
|
|
299
298
|
e(!0);
|
|
300
|
-
const m = new Date(s.startDate), { fromDate: p, toDate: E } =
|
|
299
|
+
const m = new Date(s.startDate), { fromDate: p, toDate: E } = Gt(m, 8), [d, I] = await Promise.all([
|
|
301
300
|
(i = r == null ? void 0 : r.getAvailabilityDates) == null ? void 0 : i.call(r, {
|
|
302
301
|
serviceId: t == null ? void 0 : t.initialData.service.id,
|
|
303
302
|
timeZone: (n == null ? void 0 : n.timezone) || "",
|
|
@@ -311,9 +310,9 @@ const je = /* @__PURE__ */ $e({
|
|
|
311
310
|
})
|
|
312
311
|
]);
|
|
313
312
|
a({
|
|
314
|
-
availabilityDates:
|
|
313
|
+
availabilityDates: d,
|
|
315
314
|
selectedDate: m,
|
|
316
|
-
availabilitySlots:
|
|
315
|
+
availabilitySlots: I
|
|
317
316
|
}), e(!1);
|
|
318
317
|
}
|
|
319
318
|
})();
|
|
@@ -321,22 +320,22 @@ const je = /* @__PURE__ */ $e({
|
|
|
321
320
|
s,
|
|
322
321
|
n == null ? void 0 : n.dataStatus
|
|
323
322
|
]);
|
|
324
|
-
},
|
|
323
|
+
}, Vt = (e, t) => !e || !t.length ? e : e.filter((n) => {
|
|
325
324
|
var a;
|
|
326
325
|
return !t.includes(((a = n == null ? void 0 : n.slot) == null ? void 0 : a.startDate) ?? "");
|
|
327
|
-
}), fe = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`,
|
|
326
|
+
}), fe = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`, qt = ({ locale: e, endDate: t, startDate: n, timezone: a }) => {
|
|
328
327
|
const s = {
|
|
329
328
|
hour: "numeric",
|
|
330
329
|
minute: "numeric",
|
|
331
330
|
timeZone: a
|
|
332
331
|
}, r = new Intl.DateTimeFormat(e, s).format(new Date(n)), l = new Intl.DateTimeFormat(e, s).format(new Date(t));
|
|
333
332
|
return `${r} - ${l}`;
|
|
334
|
-
},
|
|
333
|
+
}, jt = ({ selectedDate: e, locale: t, timezone: n }) => e ? new Intl.DateTimeFormat(t, {
|
|
335
334
|
weekday: "long",
|
|
336
335
|
month: "short",
|
|
337
336
|
day: "numeric",
|
|
338
337
|
timeZone: n
|
|
339
|
-
}).format(e) : "",
|
|
338
|
+
}).format(e) : "", Qt = (e, t) => {
|
|
340
339
|
let n;
|
|
341
340
|
return t.forEach((a, s) => {
|
|
342
341
|
var r, l;
|
|
@@ -346,69 +345,69 @@ const je = /* @__PURE__ */ $e({
|
|
|
346
345
|
}) === e && (n = s);
|
|
347
346
|
}), n;
|
|
348
347
|
};
|
|
349
|
-
var
|
|
348
|
+
var Jt = /* @__PURE__ */ (function(e) {
|
|
350
349
|
return e.OS_LOCATION = "OS_LOCATION", e.CUSTOM_LOCATION = "CUSTOM_LOCATION", e;
|
|
351
350
|
})({});
|
|
352
|
-
const
|
|
351
|
+
const Xt = "SLOT_UNAVAILABLE", en = (e) => {
|
|
353
352
|
var t;
|
|
354
|
-
return ((t = e == null ? void 0 : e.params) == null ? void 0 : t.reason) ===
|
|
355
|
-
},
|
|
356
|
-
const
|
|
353
|
+
return ((t = e == null ? void 0 : e.params) == null ? void 0 : t.reason) === Xt;
|
|
354
|
+
}, tn = ({ error: e, selectedSlot: t }) => {
|
|
355
|
+
const [n, a] = Q([]), s = en(e), r = t == null ? void 0 : t.startDate, l = X(!1);
|
|
357
356
|
return H(() => {
|
|
358
|
-
if (!
|
|
359
|
-
|
|
357
|
+
if (!s) {
|
|
358
|
+
l.current = !1;
|
|
360
359
|
return;
|
|
361
360
|
}
|
|
362
|
-
|
|
363
|
-
...
|
|
364
|
-
|
|
361
|
+
l.current || (l.current = !0, r && a((i) => i.includes(r) ? i : [
|
|
362
|
+
...i,
|
|
363
|
+
r
|
|
365
364
|
]));
|
|
366
365
|
}, [
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
]),
|
|
370
|
-
}, j = 7,
|
|
366
|
+
s,
|
|
367
|
+
r
|
|
368
|
+
]), n;
|
|
369
|
+
}, j = 7, Oe = (e) => {
|
|
371
370
|
const t = new Date(e);
|
|
372
371
|
return t.setHours(0, 0, 0, 0), t;
|
|
373
|
-
},
|
|
372
|
+
}, nn = (e) => {
|
|
374
373
|
const t = new Date(e);
|
|
375
374
|
return t.setHours(23, 59, 59, 999), t;
|
|
376
375
|
}, te = (e, t) => {
|
|
377
376
|
const n = new Date(e);
|
|
378
377
|
return n.setDate(n.getDate() + t), n;
|
|
379
|
-
},
|
|
380
|
-
const n =
|
|
378
|
+
}, He = (e, t) => {
|
|
379
|
+
const n = Oe(e), a = (n.getDay() - t + j) % j;
|
|
381
380
|
return te(n, -a);
|
|
382
|
-
},
|
|
381
|
+
}, an = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, on = (e, t, n) => {
|
|
383
382
|
const a = new Intl.DateTimeFormat(n, {
|
|
384
383
|
month: "short",
|
|
385
384
|
day: "numeric"
|
|
386
385
|
});
|
|
387
386
|
return typeof a.formatRange == "function" ? a.formatRange(e, t) : `${a.format(e)} - ${a.format(t)}`;
|
|
388
|
-
},
|
|
387
|
+
}, sn = (e, t = []) => t.some((n) => {
|
|
389
388
|
var a;
|
|
390
389
|
return !!((a = n.slot) != null && a.startDate) && ae(new Date(n.slot.startDate), e);
|
|
391
|
-
}),
|
|
390
|
+
}), rn = () => {
|
|
392
391
|
var Fe;
|
|
393
|
-
const { appointmentFieldProps: e, appointmentState: t, setAppointmentState: n } = ve(), { language: a, isEditor: s, isComposer: r } = De(), { t: l } =
|
|
394
|
-
|
|
392
|
+
const { appointmentFieldProps: e, appointmentState: t, setAppointmentState: n } = ve(), { language: a, isEditor: s, isComposer: r } = De(), { t: l } = ut(), { actions: i } = Te(), c = Ze(), [D, m] = Q(!1), [p, E] = Q(!1), [d, I] = Q(), [v, b] = Q();
|
|
393
|
+
Zt({
|
|
395
394
|
setIsReloadingSlots: m
|
|
396
395
|
});
|
|
397
|
-
const { onChange: _, value:
|
|
396
|
+
const { onChange: _, value: O, target: Y, initialData: M, formatDescription: $, locationType: U, error: se } = e, { availabilityDates: G, availabilitySlots: C, timezone: y = "", selectedDate: S, currentSlotBulkSize: k, dataStatus: K, error: Z } = t, V = (Fe = M == null ? void 0 : M.service) == null ? void 0 : Fe.id, w = K === z.LOADING, ee = D || p, Se = !!Z, Re = tn({
|
|
398
397
|
error: se,
|
|
399
|
-
selectedSlot:
|
|
400
|
-
}),
|
|
398
|
+
selectedSlot: O
|
|
399
|
+
}), L = P(() => Vt(C, Re), [
|
|
401
400
|
C,
|
|
402
401
|
Re
|
|
403
402
|
]);
|
|
404
403
|
H(() => {
|
|
405
|
-
_ == null || _(
|
|
404
|
+
_ == null || _(Kt(O));
|
|
406
405
|
}, [
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
]),
|
|
411
|
-
const N =
|
|
406
|
+
O == null ? void 0 : O.startDate,
|
|
407
|
+
O == null ? void 0 : O.endDate,
|
|
408
|
+
y
|
|
409
|
+
]), mt((f) => {
|
|
410
|
+
const N = f == null ? void 0 : f[Y];
|
|
412
411
|
C != null && C.length && n({
|
|
413
412
|
availabilitySlots: C.filter((g) => {
|
|
414
413
|
var h;
|
|
@@ -416,32 +415,32 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
416
415
|
})
|
|
417
416
|
});
|
|
418
417
|
}), H(() => {
|
|
419
|
-
if (
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
currentSlotBulkSize:
|
|
418
|
+
if (L != null && L.length && k) {
|
|
419
|
+
const f = Qt(fe(O ?? void 0), L);
|
|
420
|
+
f && f + 1 > k && n({
|
|
421
|
+
currentSlotBulkSize: f + 1
|
|
423
422
|
});
|
|
424
|
-
} else !(
|
|
423
|
+
} else !(L != null && L.length) && O && (_ == null || _(void 0));
|
|
425
424
|
}, [
|
|
426
|
-
|
|
427
|
-
|
|
425
|
+
O,
|
|
426
|
+
L,
|
|
428
427
|
G
|
|
429
428
|
]);
|
|
430
|
-
const pe = P(() =>
|
|
429
|
+
const pe = P(() => lt(a), [
|
|
431
430
|
a
|
|
432
431
|
]), we = X(S);
|
|
433
432
|
H(() => {
|
|
434
|
-
const
|
|
435
|
-
we.current = S, !!S && (!
|
|
433
|
+
const f = we.current;
|
|
434
|
+
we.current = S, !!S && (!f || !ae(f, S)) && I(void 0);
|
|
436
435
|
}, [
|
|
437
436
|
S
|
|
438
437
|
]);
|
|
439
|
-
const W = P(() =>
|
|
440
|
-
|
|
438
|
+
const W = P(() => d ?? He(S ?? /* @__PURE__ */ new Date(), pe), [
|
|
439
|
+
d,
|
|
441
440
|
S,
|
|
442
441
|
pe
|
|
443
|
-
]),
|
|
444
|
-
const
|
|
442
|
+
]), Je = P(() => {
|
|
443
|
+
const f = Oe(/* @__PURE__ */ new Date()), N = new Intl.DateTimeFormat(a, {
|
|
445
444
|
weekday: "short"
|
|
446
445
|
}), g = new Intl.DateTimeFormat(a, {
|
|
447
446
|
day: "numeric"
|
|
@@ -453,14 +452,14 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
453
452
|
return Array.from({
|
|
454
453
|
length: j
|
|
455
454
|
}, (re, Ne) => {
|
|
456
|
-
const x = te(W, Ne), ge = !!S && ae(x, S),
|
|
455
|
+
const x = te(W, Ne), ge = !!S && ae(x, S), st = Oe(x) < f;
|
|
457
456
|
return {
|
|
458
|
-
key:
|
|
457
|
+
key: an(x),
|
|
459
458
|
date: x,
|
|
460
459
|
isSelected: ge,
|
|
461
|
-
isAvailable: !w && !ee && !ge &&
|
|
462
|
-
isDisabled:
|
|
463
|
-
isToday: ae(x,
|
|
460
|
+
isAvailable: !w && !ee && !ge && sn(x, G),
|
|
461
|
+
isDisabled: st || ee && !ge,
|
|
462
|
+
isToday: ae(x, f),
|
|
464
463
|
dayOfMonthLabel: g.format(x),
|
|
465
464
|
weekdayLabel: N.format(x),
|
|
466
465
|
label: h.format(x),
|
|
@@ -475,8 +474,8 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
475
474
|
ee,
|
|
476
475
|
a,
|
|
477
476
|
l
|
|
478
|
-
]), _e = fe(
|
|
479
|
-
const { startDate: N, endDate: g } =
|
|
477
|
+
]), _e = fe(O ?? void 0) || void 0, ye = P(() => w || D ? [] : (L ?? []).slice(0, k).flatMap((f) => {
|
|
478
|
+
const { startDate: N, endDate: g } = f.slot ?? {};
|
|
480
479
|
if (!N || !g)
|
|
481
480
|
return [];
|
|
482
481
|
const h = fe({
|
|
@@ -488,30 +487,30 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
488
487
|
key: h,
|
|
489
488
|
startDate: N,
|
|
490
489
|
endDate: g,
|
|
491
|
-
timeRange:
|
|
490
|
+
timeRange: qt({
|
|
492
491
|
startDate: N,
|
|
493
492
|
endDate: g,
|
|
494
493
|
locale: a,
|
|
495
|
-
timezone:
|
|
494
|
+
timezone: y
|
|
496
495
|
}),
|
|
497
496
|
isSelected: h === _e
|
|
498
497
|
}
|
|
499
498
|
];
|
|
500
499
|
}), [
|
|
501
|
-
|
|
500
|
+
L,
|
|
502
501
|
k,
|
|
503
502
|
w,
|
|
504
|
-
|
|
503
|
+
D,
|
|
505
504
|
a,
|
|
506
|
-
|
|
505
|
+
y,
|
|
507
506
|
_e
|
|
508
|
-
]),
|
|
509
|
-
async (
|
|
507
|
+
]), Le = !D && !!(L != null && L.length) && (k || q) < L.length, Ae = W > He(/* @__PURE__ */ new Date(), pe), Xe = ie(
|
|
508
|
+
async (f) => {
|
|
510
509
|
var N;
|
|
511
|
-
if (!(ee || S && ae(
|
|
510
|
+
if (!(ee || S && ae(f, S))) {
|
|
512
511
|
m(!0), _ == null || _(void 0), n({
|
|
513
512
|
currentSlotBulkSize: q,
|
|
514
|
-
selectedDate:
|
|
513
|
+
selectedDate: f,
|
|
515
514
|
availabilitySlots: void 0
|
|
516
515
|
}), c == null || c.report({
|
|
517
516
|
action: ne.CLICK,
|
|
@@ -520,12 +519,12 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
520
519
|
try {
|
|
521
520
|
const g = await ((N = i == null ? void 0 : i.getAvailabilitySlots) == null ? void 0 : N.call(i, {
|
|
522
521
|
serviceId: V,
|
|
523
|
-
timeZone:
|
|
524
|
-
selectedDate:
|
|
522
|
+
timeZone: y,
|
|
523
|
+
selectedDate: f
|
|
525
524
|
}));
|
|
526
525
|
n({
|
|
527
526
|
currentSlotBulkSize: q,
|
|
528
|
-
selectedDate:
|
|
527
|
+
selectedDate: f,
|
|
529
528
|
availabilitySlots: g
|
|
530
529
|
});
|
|
531
530
|
} catch {
|
|
@@ -539,18 +538,18 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
539
538
|
ee,
|
|
540
539
|
S,
|
|
541
540
|
V,
|
|
542
|
-
|
|
541
|
+
y,
|
|
543
542
|
i,
|
|
544
543
|
_,
|
|
545
544
|
c
|
|
546
545
|
]
|
|
547
|
-
), ue = X(0),
|
|
548
|
-
async (
|
|
546
|
+
), ue = X(0), et = ie(
|
|
547
|
+
async (f) => {
|
|
549
548
|
var re;
|
|
550
|
-
if (
|
|
549
|
+
if (f < 0 && !Ae)
|
|
551
550
|
return;
|
|
552
|
-
const N = W, g = te(W,
|
|
553
|
-
if (
|
|
551
|
+
const N = W, g = te(W, f * j);
|
|
552
|
+
if (I(g), s || r)
|
|
554
553
|
return;
|
|
555
554
|
const h = ++ue.current;
|
|
556
555
|
E(!0), c == null || c.report({
|
|
@@ -560,15 +559,15 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
560
559
|
try {
|
|
561
560
|
const Ne = await ((re = i == null ? void 0 : i.getAvailabilityDates) == null ? void 0 : re.call(i, {
|
|
562
561
|
serviceId: V,
|
|
563
|
-
timeZone:
|
|
562
|
+
timeZone: y,
|
|
564
563
|
fromDate: g,
|
|
565
|
-
toDate:
|
|
564
|
+
toDate: nn(te(g, j - 1))
|
|
566
565
|
}));
|
|
567
566
|
h === ue.current && n({
|
|
568
567
|
availabilityDates: Ne
|
|
569
568
|
});
|
|
570
569
|
} catch {
|
|
571
|
-
h === ue.current &&
|
|
570
|
+
h === ue.current && I(N);
|
|
572
571
|
} finally {
|
|
573
572
|
h === ue.current && E(!1);
|
|
574
573
|
}
|
|
@@ -580,13 +579,13 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
580
579
|
s,
|
|
581
580
|
r,
|
|
582
581
|
V,
|
|
583
|
-
|
|
582
|
+
y,
|
|
584
583
|
i,
|
|
585
584
|
c
|
|
586
585
|
]
|
|
587
|
-
),
|
|
588
|
-
(
|
|
589
|
-
const N =
|
|
586
|
+
), tt = ie(
|
|
587
|
+
(f) => {
|
|
588
|
+
const N = ye.find((re) => re.key === f);
|
|
590
589
|
if (!N)
|
|
591
590
|
return;
|
|
592
591
|
const { startDate: g, endDate: h } = N;
|
|
@@ -598,80 +597,80 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
598
597
|
}), _ == null || _({
|
|
599
598
|
startDate: g,
|
|
600
599
|
endDate: h,
|
|
601
|
-
timeZone:
|
|
600
|
+
timeZone: y
|
|
602
601
|
});
|
|
603
602
|
},
|
|
604
603
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
605
604
|
[
|
|
606
|
-
|
|
607
|
-
|
|
605
|
+
ye,
|
|
606
|
+
y,
|
|
608
607
|
_,
|
|
609
608
|
c
|
|
610
609
|
]
|
|
611
|
-
),
|
|
612
|
-
if (!
|
|
610
|
+
), nt = ie(() => {
|
|
611
|
+
if (!Le)
|
|
613
612
|
return;
|
|
614
|
-
const
|
|
613
|
+
const f = k || q;
|
|
615
614
|
c == null || c.report({
|
|
616
615
|
action: ne.CLICK,
|
|
617
616
|
component: J.SHOW_MORE
|
|
618
|
-
}),
|
|
619
|
-
currentSlotBulkSize:
|
|
617
|
+
}), b(f), n({
|
|
618
|
+
currentSlotBulkSize: f + q
|
|
620
619
|
});
|
|
621
620
|
}, [
|
|
622
|
-
|
|
621
|
+
Le,
|
|
623
622
|
k,
|
|
624
623
|
c
|
|
625
|
-
]),
|
|
624
|
+
]), at = ie(() => b(void 0), []), ot = P(() => {
|
|
626
625
|
if (Se)
|
|
627
626
|
return l("form.appointment.empty-state.notification.text");
|
|
628
|
-
if (!w && !
|
|
627
|
+
if (!w && !D && !(L != null && L.length))
|
|
629
628
|
return l("form.appointment.slots-not-found.text");
|
|
630
629
|
}, [
|
|
631
630
|
Se,
|
|
632
631
|
w,
|
|
633
|
-
|
|
634
|
-
|
|
632
|
+
D,
|
|
633
|
+
L == null ? void 0 : L.length,
|
|
635
634
|
l
|
|
636
635
|
]);
|
|
637
636
|
return {
|
|
638
|
-
days:
|
|
639
|
-
slots:
|
|
637
|
+
days: Je,
|
|
638
|
+
slots: ye,
|
|
640
639
|
selectedSlotKey: _e,
|
|
641
|
-
selectDate:
|
|
642
|
-
selectSlot:
|
|
643
|
-
changeWeek:
|
|
644
|
-
showMoreSlots:
|
|
640
|
+
selectDate: Xe,
|
|
641
|
+
selectSlot: tt,
|
|
642
|
+
changeWeek: et,
|
|
643
|
+
showMoreSlots: nt,
|
|
645
644
|
canGoToPreviousWeek: Ae,
|
|
646
|
-
hasMoreSlots:
|
|
645
|
+
hasMoreSlots: Le,
|
|
647
646
|
hasError: Se,
|
|
648
647
|
isLoading: w,
|
|
649
648
|
isRefetching: ee,
|
|
650
|
-
isReloadingSlots:
|
|
651
|
-
weekRangeLabel:
|
|
652
|
-
weekCaptionLabel:
|
|
649
|
+
isReloadingSlots: D,
|
|
650
|
+
weekRangeLabel: on(W, te(W, j - 1), a),
|
|
651
|
+
weekCaptionLabel: Yt({
|
|
653
652
|
startOfWeek: W,
|
|
654
653
|
endOfWeek: te(W, j - 1)
|
|
655
654
|
}, a),
|
|
656
|
-
selectedDateLabel:
|
|
655
|
+
selectedDateLabel: jt({
|
|
657
656
|
selectedDate: S,
|
|
658
657
|
locale: a,
|
|
659
|
-
timezone:
|
|
658
|
+
timezone: y
|
|
660
659
|
}),
|
|
661
|
-
timezoneLabel:
|
|
662
|
-
timezone:
|
|
660
|
+
timezoneLabel: y ? `${l("form.appointment.timezone.label")}: ${$t({
|
|
661
|
+
timezone: y,
|
|
663
662
|
language: a
|
|
664
663
|
})}` : "",
|
|
665
|
-
formatLabel: U ===
|
|
666
|
-
notificationMessage:
|
|
664
|
+
formatLabel: U === Jt.OS_LOCATION ? l("form.appointment.meeting-format.in-person-location-method-os-location") : $,
|
|
665
|
+
notificationMessage: ot,
|
|
667
666
|
showMoreSlotsLabel: l("form.appointment.show-more-slots.text"),
|
|
668
667
|
previousWeekLabel: l("form.appointment.accessibility.calendar.previous-week.aria-label"),
|
|
669
668
|
nextWeekLabel: l("form.appointment.accessibility.calendar.next-week.aria-label"),
|
|
670
669
|
pendingFocusIndex: v,
|
|
671
|
-
consumePendingFocusIndex:
|
|
670
|
+
consumePendingFocusIndex: at
|
|
672
671
|
};
|
|
673
|
-
},
|
|
674
|
-
const e =
|
|
672
|
+
}, je = Ke(void 0), Qe = (e) => `${e}-timezone-note`, F = () => {
|
|
673
|
+
const e = $e(je);
|
|
675
674
|
if (typeof e > "u")
|
|
676
675
|
throw new Error("Appointment parts must be used inside an <Appointment> component");
|
|
677
676
|
return e;
|
|
@@ -679,48 +678,48 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
679
678
|
const { disabled: e, readOnly: t } = ce();
|
|
680
679
|
return !!e || !!t;
|
|
681
680
|
}, B = ({ children: e, className: t }) => {
|
|
682
|
-
const { days: n, selectDate: a, weekRangeLabel: s } = F(), 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),
|
|
681
|
+
const { days: n, selectDate: a, weekRangeLabel: s } = F(), 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), [
|
|
683
682
|
n
|
|
684
|
-
]), m = ke(), p = P(() => n.filter((
|
|
683
|
+
]), m = ke(), p = P(() => n.filter((d) => m || d.isDisabled).map((d) => d.key), [
|
|
685
684
|
n,
|
|
686
685
|
m
|
|
687
|
-
]), E = (
|
|
688
|
-
if (
|
|
686
|
+
]), E = (d) => {
|
|
687
|
+
if (d === "all")
|
|
689
688
|
return;
|
|
690
|
-
const [
|
|
691
|
-
...
|
|
692
|
-
], v = n.find(({ key:
|
|
689
|
+
const [I] = [
|
|
690
|
+
...d
|
|
691
|
+
], v = n.find(({ key: b }) => b === I);
|
|
693
692
|
v && a(v.date);
|
|
694
693
|
};
|
|
695
694
|
return /* @__PURE__ */ o.createElement("div", {
|
|
696
695
|
className: t
|
|
697
|
-
}, r, l, i, /* @__PURE__ */ o.createElement(
|
|
696
|
+
}, r, l, i, /* @__PURE__ */ o.createElement(bt, {
|
|
698
697
|
"aria-label": s,
|
|
699
698
|
orientation: "horizontal",
|
|
700
699
|
selectionMode: "single",
|
|
701
|
-
selectedKeys:
|
|
700
|
+
selectedKeys: D,
|
|
702
701
|
disabledKeys: p,
|
|
703
702
|
onSelectionChange: E
|
|
704
|
-
}, n.map((
|
|
705
|
-
key:
|
|
706
|
-
day:
|
|
703
|
+
}, n.map((d) => le(c, {
|
|
704
|
+
key: d.key,
|
|
705
|
+
day: d
|
|
707
706
|
}))));
|
|
708
|
-
},
|
|
707
|
+
}, ln = ({ children: e, className: t }) => {
|
|
709
708
|
const { changeWeek: n, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), l = ke(), i = X(null), c = X(!1);
|
|
710
709
|
return H(() => {
|
|
711
|
-
var p, E,
|
|
710
|
+
var p, E, d;
|
|
712
711
|
if (a || !c.current)
|
|
713
712
|
return;
|
|
714
713
|
c.current = !1;
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
714
|
+
const D = document.activeElement;
|
|
715
|
+
if (D !== document.body && D !== i.current)
|
|
717
716
|
return;
|
|
718
717
|
const m = ((E = (p = i.current) == null ? void 0 : p.closest("fieldset")) == null ? void 0 : E.querySelectorAll("button")) ?? [];
|
|
719
|
-
(
|
|
718
|
+
(d = Array.from(m).find((I) => I.getAttribute("aria-label") === r)) == null || d.focus();
|
|
720
719
|
}, [
|
|
721
720
|
a,
|
|
722
721
|
r
|
|
723
|
-
]), /* @__PURE__ */ o.createElement(
|
|
722
|
+
]), /* @__PURE__ */ o.createElement(he, {
|
|
724
723
|
ref: i,
|
|
725
724
|
className: t,
|
|
726
725
|
"aria-label": s,
|
|
@@ -729,15 +728,15 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
729
728
|
c.current = !0, n(-1);
|
|
730
729
|
}
|
|
731
730
|
}, e ?? "‹");
|
|
732
|
-
},
|
|
731
|
+
}, cn = ({ children: e, className: t }) => {
|
|
733
732
|
const { changeWeek: n, nextWeekLabel: a } = F(), s = ke();
|
|
734
|
-
return /* @__PURE__ */ o.createElement(
|
|
733
|
+
return /* @__PURE__ */ o.createElement(he, {
|
|
735
734
|
className: t,
|
|
736
735
|
"aria-label": a,
|
|
737
736
|
isDisabled: s,
|
|
738
737
|
onPress: () => n(1)
|
|
739
738
|
}, e ?? "›");
|
|
740
|
-
},
|
|
739
|
+
}, un = ({ children: e, className: t }) => {
|
|
741
740
|
const { weekCaptionLabel: n, weekRangeLabel: a } = F();
|
|
742
741
|
return /* @__PURE__ */ o.createElement("span", {
|
|
743
742
|
className: t,
|
|
@@ -748,11 +747,11 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
748
747
|
}) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
|
|
749
748
|
"aria-hidden": "true"
|
|
750
749
|
}, n), /* @__PURE__ */ o.createElement("span", {
|
|
751
|
-
style:
|
|
750
|
+
style: Ge
|
|
752
751
|
}, a)));
|
|
753
|
-
},
|
|
752
|
+
}, mn = ({ children: e, className: t, ...n }) => {
|
|
754
753
|
const { day: a } = n;
|
|
755
|
-
return /* @__PURE__ */ o.createElement(
|
|
754
|
+
return /* @__PURE__ */ o.createElement(It, {
|
|
756
755
|
id: a.key,
|
|
757
756
|
className: t,
|
|
758
757
|
textValue: a.label,
|
|
@@ -764,44 +763,44 @@ const nn = "SLOT_UNAVAILABLE", He = [], an = (e) => {
|
|
|
764
763
|
date: new Date(a.date)
|
|
765
764
|
}) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", null, a.weekdayLabel), /* @__PURE__ */ o.createElement("span", null, a.dayOfMonthLabel)));
|
|
766
765
|
};
|
|
767
|
-
B.PreviousWeek =
|
|
768
|
-
B.Heading =
|
|
769
|
-
B.NextWeek =
|
|
770
|
-
B.Day =
|
|
771
|
-
const
|
|
772
|
-
const { hasTimezoneNote: a } = n, { slots: s, selectedSlotKey: r, selectSlot: l, selectedDateLabel: i, isReloadingSlots: c, timezoneLabel:
|
|
766
|
+
B.PreviousWeek = ln;
|
|
767
|
+
B.Heading = un;
|
|
768
|
+
B.NextWeek = cn;
|
|
769
|
+
B.Day = mn;
|
|
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: m, consumePendingFocusIndex: p } = F(), { id: E, disabled: d, readOnly: I, required: v, hasError: b } = ce(), { inputId: _, labelId: O, 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 = [
|
|
773
772
|
Y,
|
|
774
|
-
a &&
|
|
775
|
-
].filter(Boolean).join(" ") || void 0,
|
|
773
|
+
a && D ? Qe(_) : void 0
|
|
774
|
+
].filter(Boolean).join(" ") || void 0, y = (S) => {
|
|
776
775
|
var k, K, Z;
|
|
777
|
-
(Z = (K = (k = M.current) == null ? void 0 : k.querySelectorAll(
|
|
776
|
+
(Z = (K = (k = M.current) == null ? void 0 : k.querySelectorAll(Ye)) == null ? void 0 : K[S]) == null || Z.focus();
|
|
778
777
|
};
|
|
779
|
-
return
|
|
778
|
+
return dt(() => {
|
|
780
779
|
var Z, V;
|
|
781
|
-
if (!!((Z = M.current) != null && Z.querySelector(
|
|
782
|
-
|
|
780
|
+
if (!!((Z = M.current) != null && Z.querySelector(Ye))) {
|
|
781
|
+
y(0);
|
|
783
782
|
return;
|
|
784
783
|
}
|
|
785
784
|
const k = Array.from(((V = document.getElementById(_)) == null ? void 0 : V.querySelectorAll('[role="option"]')) ?? []), K = k.find((w) => w.getAttribute("aria-selected") === "true") ?? k.find((w) => w.getAttribute("aria-disabled") !== "true");
|
|
786
785
|
K == null || K.focus();
|
|
787
786
|
}, E), H(() => {
|
|
788
|
-
m !== void 0 && (
|
|
787
|
+
m !== void 0 && (y(m), p());
|
|
789
788
|
}, [
|
|
790
789
|
m,
|
|
791
790
|
s.length
|
|
792
791
|
]), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
|
|
793
792
|
role: "status",
|
|
794
|
-
style:
|
|
795
|
-
}, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(
|
|
793
|
+
style: Ge
|
|
794
|
+
}, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(Ot, {
|
|
796
795
|
ref: M,
|
|
797
796
|
className: t,
|
|
798
797
|
value: r ?? null,
|
|
799
798
|
onChange: l,
|
|
800
|
-
isDisabled:
|
|
801
|
-
isReadOnly:
|
|
799
|
+
isDisabled: d,
|
|
800
|
+
isReadOnly: I,
|
|
802
801
|
isRequired: v,
|
|
803
|
-
isInvalid:
|
|
804
|
-
"aria-labelledby": G ? $ :
|
|
802
|
+
isInvalid: b,
|
|
803
|
+
"aria-labelledby": G ? $ : O,
|
|
805
804
|
"aria-describedby": C,
|
|
806
805
|
"data-refetch": c || void 0
|
|
807
806
|
}, le(U, {
|
|
@@ -810,7 +809,7 @@ const Ke = 'input[type="radio"]', oe = ({ children: e, className: t, ...n }) =>
|
|
|
810
809
|
key: S.key,
|
|
811
810
|
slot: S
|
|
812
811
|
}))));
|
|
813
|
-
},
|
|
812
|
+
}, dn = ({ children: e, className: t, ...n }) => {
|
|
814
813
|
const { selectedDateLabel: a } = F(), { labelId: s } = n;
|
|
815
814
|
return a ? /* @__PURE__ */ o.createElement("div", {
|
|
816
815
|
id: s,
|
|
@@ -818,19 +817,19 @@ const Ke = 'input[type="radio"]', oe = ({ children: e, className: t, ...n }) =>
|
|
|
818
817
|
}, e ? e({
|
|
819
818
|
label: a
|
|
820
819
|
}) : a) : null;
|
|
821
|
-
},
|
|
820
|
+
}, fn = ({ children: e, className: t, ...n }) => {
|
|
822
821
|
const { slot: a } = n;
|
|
823
|
-
return /* @__PURE__ */ o.createElement(
|
|
822
|
+
return /* @__PURE__ */ o.createElement(Tt, {
|
|
824
823
|
value: a.key,
|
|
825
824
|
"aria-label": a.timeRange
|
|
826
|
-
}, /* @__PURE__ */ o.createElement(
|
|
825
|
+
}, /* @__PURE__ */ o.createElement(ht, {
|
|
827
826
|
className: t
|
|
828
827
|
}, e ? e(a) : a.timeRange));
|
|
829
828
|
};
|
|
830
|
-
oe.Label =
|
|
831
|
-
oe.Slot =
|
|
829
|
+
oe.Label = dn;
|
|
830
|
+
oe.Slot = fn;
|
|
832
831
|
const u = ({ children: e, className: t }) => {
|
|
833
|
-
const n = ce(), { id: a, FieldLayout: s } = n, { labelId: r, inputId: l, ariaDescribedBy: i } = Ee(), c =
|
|
832
|
+
const n = ce(), { id: a, FieldLayout: s } = n, { labelId: r, inputId: l, ariaDescribedBy: i } = Ee(), c = ft(Dt.APPOINTMENT), D = P(() => ({
|
|
834
833
|
...n,
|
|
835
834
|
initialData: c,
|
|
836
835
|
inputId: l,
|
|
@@ -850,20 +849,20 @@ const u = ({ children: e, className: t }) => {
|
|
|
850
849
|
renderLabel: () => le(m, {
|
|
851
850
|
as: "div"
|
|
852
851
|
}),
|
|
853
|
-
renderInput: () => /* @__PURE__ */ o.createElement(
|
|
854
|
-
appointmentFieldProps:
|
|
855
|
-
}, /* @__PURE__ */ o.createElement(
|
|
852
|
+
renderInput: () => /* @__PURE__ */ o.createElement(Ht, {
|
|
853
|
+
appointmentFieldProps: D
|
|
854
|
+
}, /* @__PURE__ */ o.createElement(En, {
|
|
856
855
|
className: t
|
|
857
856
|
}, e)),
|
|
858
857
|
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, E, p)
|
|
859
858
|
});
|
|
860
|
-
},
|
|
859
|
+
}, Dn = {
|
|
861
860
|
visibility: "hidden"
|
|
862
|
-
},
|
|
863
|
-
const { required: n, onFocus: a, onBlur: s } = ce(), { inputId: r, labelId: l, ariaDescribedBy: i } = Ee(), c =
|
|
864
|
-
return /* @__PURE__ */ o.createElement(
|
|
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, u.Loader), m = T(e, u.Notification), p = T(e, u.Dates), E = T(e, u.Timezone), d = T(e, u.Format), I = T(e, u.Slots), v = T(e, u.ShowMoreSlots);
|
|
863
|
+
return /* @__PURE__ */ o.createElement(je.Provider, {
|
|
865
864
|
value: c
|
|
866
|
-
}, /* @__PURE__ */ o.createElement(
|
|
865
|
+
}, /* @__PURE__ */ o.createElement(wt, {
|
|
867
866
|
id: r,
|
|
868
867
|
className: t,
|
|
869
868
|
ariaLabelledBy: l,
|
|
@@ -871,12 +870,12 @@ const u = ({ children: e, className: t }) => {
|
|
|
871
870
|
required: n,
|
|
872
871
|
onFocus: a,
|
|
873
872
|
onBlur: s
|
|
874
|
-
},
|
|
875
|
-
style: c.isLoading ?
|
|
876
|
-
}, p, E,
|
|
873
|
+
}, D, c.hasError ? m : /* @__PURE__ */ o.createElement("div", {
|
|
874
|
+
style: c.isLoading ? Dn : void 0
|
|
875
|
+
}, p, E, d, le(I, {
|
|
877
876
|
hasTimezoneNote: !!E
|
|
878
877
|
}), m, v)));
|
|
879
|
-
},
|
|
878
|
+
}, Sn = ({ children: e, className: t }) => {
|
|
880
879
|
const { isLoading: n, isRefetching: a } = F();
|
|
881
880
|
return !n && !a ? null : /* @__PURE__ */ o.createElement("div", {
|
|
882
881
|
className: t,
|
|
@@ -885,7 +884,7 @@ const u = ({ children: e, className: t }) => {
|
|
|
885
884
|
"data-initial": n || void 0,
|
|
886
885
|
"data-refetch": !n && a || void 0
|
|
887
886
|
}, e);
|
|
888
|
-
},
|
|
887
|
+
}, pn = ({ children: e, className: t }) => {
|
|
889
888
|
const { notificationMessage: n } = F();
|
|
890
889
|
return n ? /* @__PURE__ */ o.createElement("div", {
|
|
891
890
|
className: t,
|
|
@@ -893,24 +892,24 @@ const u = ({ children: e, className: t }) => {
|
|
|
893
892
|
}, e ? e({
|
|
894
893
|
message: n
|
|
895
894
|
}) : n) : null;
|
|
896
|
-
},
|
|
895
|
+
}, _n = ({ children: e, className: t }) => {
|
|
897
896
|
const { timezoneLabel: n } = F(), { inputId: a } = Ee();
|
|
898
897
|
return n ? /* @__PURE__ */ o.createElement("span", {
|
|
899
|
-
id:
|
|
898
|
+
id: Qe(a),
|
|
900
899
|
className: t
|
|
901
900
|
}, e ? e({
|
|
902
901
|
label: n
|
|
903
902
|
}) : n) : null;
|
|
904
|
-
},
|
|
903
|
+
}, yn = ({ children: e, className: t }) => {
|
|
905
904
|
const { formatLabel: n } = F();
|
|
906
905
|
return n ? /* @__PURE__ */ o.createElement("span", {
|
|
907
906
|
className: t
|
|
908
907
|
}, e ? e({
|
|
909
908
|
label: n
|
|
910
909
|
}) : n) : null;
|
|
911
|
-
},
|
|
910
|
+
}, Ln = ({ children: e, className: t }) => {
|
|
912
911
|
const { hasMoreSlots: n, showMoreSlots: a, showMoreSlotsLabel: s } = F(), { disabled: r, readOnly: l } = ce();
|
|
913
|
-
return n ? /* @__PURE__ */ o.createElement(
|
|
912
|
+
return n ? /* @__PURE__ */ o.createElement(he, {
|
|
914
913
|
className: t,
|
|
915
914
|
isDisabled: !!r || !!l,
|
|
916
915
|
onPress: a
|
|
@@ -918,57 +917,57 @@ const u = ({ children: e, className: t }) => {
|
|
|
918
917
|
label: s
|
|
919
918
|
}) : s) : null;
|
|
920
919
|
};
|
|
921
|
-
u.Label =
|
|
922
|
-
u.Loader =
|
|
923
|
-
u.Notification =
|
|
920
|
+
u.Label = Rt;
|
|
921
|
+
u.Loader = Sn;
|
|
922
|
+
u.Notification = pn;
|
|
924
923
|
u.Dates = B;
|
|
925
|
-
u.Timezone =
|
|
926
|
-
u.Format =
|
|
924
|
+
u.Timezone = _n;
|
|
925
|
+
u.Format = yn;
|
|
927
926
|
u.Slots = oe;
|
|
928
|
-
u.ShowMoreSlots =
|
|
929
|
-
u.Description =
|
|
930
|
-
u.Error =
|
|
931
|
-
const
|
|
932
|
-
appointment:
|
|
933
|
-
dates:
|
|
934
|
-
weekHeading:
|
|
935
|
-
weekButton:
|
|
936
|
-
previousWeek:
|
|
937
|
-
nextWeek:
|
|
938
|
-
day:
|
|
939
|
-
weekdayLabel:
|
|
940
|
-
indicator:
|
|
941
|
-
hint:
|
|
942
|
-
slots:
|
|
943
|
-
slotsLabel:
|
|
944
|
-
slot:
|
|
945
|
-
slotHover:
|
|
946
|
-
slotSelected:
|
|
947
|
-
showMoreSlots:
|
|
948
|
-
loader:
|
|
949
|
-
notification:
|
|
950
|
-
},
|
|
927
|
+
u.ShowMoreSlots = Ln;
|
|
928
|
+
u.Description = vt;
|
|
929
|
+
u.Error = kt;
|
|
930
|
+
const An = "_appointment_14hug_1", Nn = "_dates_14hug_6", gn = "_weekHeading_14hug_27", bn = "_weekButton_14hug_36", In = "_previousWeek_14hug_68", On = "_nextWeek_14hug_72", Tn = "_day_14hug_84", hn = "_weekdayLabel_14hug_96", vn = "_indicator_14hug_108", kn = "_hint_14hug_131", Rn = "_slots_14hug_144", wn = "_slotsLabel_14hug_159", Fn = "_slot_14hug_144", Mn = "_slotHover_14hug_198", Cn = "_slotSelected_14hug_206", Wn = "_showMoreSlots_14hug_260", Bn = "_loader_14hug_290", Un = "_notification_14hug_326", A = {
|
|
931
|
+
appointment: An,
|
|
932
|
+
dates: Nn,
|
|
933
|
+
weekHeading: gn,
|
|
934
|
+
weekButton: bn,
|
|
935
|
+
previousWeek: In,
|
|
936
|
+
nextWeek: On,
|
|
937
|
+
day: Tn,
|
|
938
|
+
weekdayLabel: hn,
|
|
939
|
+
indicator: vn,
|
|
940
|
+
hint: kn,
|
|
941
|
+
slots: Rn,
|
|
942
|
+
slotsLabel: wn,
|
|
943
|
+
slot: Fn,
|
|
944
|
+
slotHover: Mn,
|
|
945
|
+
slotSelected: Cn,
|
|
946
|
+
showMoreSlots: Wn,
|
|
947
|
+
loader: Bn,
|
|
948
|
+
notification: Un
|
|
949
|
+
}, xn = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(rt, {
|
|
951
950
|
content: e,
|
|
952
951
|
locale: t
|
|
953
|
-
}),
|
|
952
|
+
}), Pn = {
|
|
954
953
|
base: A.slot,
|
|
955
954
|
selected: A.slotSelected,
|
|
956
955
|
hover: A.slotHover
|
|
957
|
-
},
|
|
958
|
-
const e =
|
|
959
|
-
globalClasses:
|
|
960
|
-
moduleClasses:
|
|
956
|
+
}, zn = () => {
|
|
957
|
+
const e = gt({
|
|
958
|
+
globalClasses: Nt,
|
|
959
|
+
moduleClasses: Pn
|
|
961
960
|
});
|
|
962
961
|
return /* @__PURE__ */ o.createElement(u, {
|
|
963
962
|
className: A.appointment
|
|
964
963
|
}, /* @__PURE__ */ o.createElement(u.Label, {
|
|
965
|
-
className: R(
|
|
964
|
+
className: R(Et, de.label)
|
|
966
965
|
}, /* @__PURE__ */ o.createElement(u.Label.Required, {
|
|
967
|
-
className: R(
|
|
966
|
+
className: R(St, de.requiredMark)
|
|
968
967
|
})), /* @__PURE__ */ o.createElement(u.Loader, {
|
|
969
968
|
className: A.loader
|
|
970
969
|
}), /* @__PURE__ */ o.createElement(u.Dates, {
|
|
971
|
-
className: R(
|
|
970
|
+
className: R(pt, A.dates)
|
|
972
971
|
}, /* @__PURE__ */ o.createElement(u.Dates.PreviousWeek, {
|
|
973
972
|
className: R(me, A.weekButton, A.previousWeek)
|
|
974
973
|
}, /* @__PURE__ */ o.createElement(Me, null)), /* @__PURE__ */ o.createElement(u.Dates.Heading, {
|
|
@@ -990,7 +989,7 @@ const In = "_appointment_14hug_1", On = "_dates_14hug_6", bn = "_weekHeading_14h
|
|
|
990
989
|
}), /* @__PURE__ */ o.createElement(u.Slots, {
|
|
991
990
|
className: A.slots
|
|
992
991
|
}, /* @__PURE__ */ o.createElement(u.Slots.Label, {
|
|
993
|
-
className: R(
|
|
992
|
+
className: R(_t, A.slotsLabel)
|
|
994
993
|
}), /* @__PURE__ */ o.createElement(u.Slots.Slot, {
|
|
995
994
|
className: ({ isSelected: t, isHovered: n, isDisabled: a, isReadOnly: s }) => e({
|
|
996
995
|
isSelected: t,
|
|
@@ -999,13 +998,13 @@ const In = "_appointment_14hug_1", On = "_dates_14hug_6", bn = "_weekHeading_14h
|
|
|
999
998
|
}, (t) => t.timeRange)), /* @__PURE__ */ o.createElement(u.Notification, {
|
|
1000
999
|
className: A.notification
|
|
1001
1000
|
}), /* @__PURE__ */ o.createElement(u.ShowMoreSlots, {
|
|
1002
|
-
className: R(
|
|
1001
|
+
className: R(yt, me, A.showMoreSlots)
|
|
1003
1002
|
}), /* @__PURE__ */ o.createElement(u.Error, {
|
|
1004
|
-
className: R(
|
|
1005
|
-
}, /* @__PURE__ */ o.createElement(
|
|
1006
|
-
className: R(
|
|
1007
|
-
},
|
|
1008
|
-
},
|
|
1003
|
+
className: R(Lt, de.error)
|
|
1004
|
+
}, /* @__PURE__ */ o.createElement(it, null), /* @__PURE__ */ o.createElement(u.Error.Text, null)), /* @__PURE__ */ o.createElement(u.Description, {
|
|
1005
|
+
className: R(At, de.description)
|
|
1006
|
+
}, xn));
|
|
1007
|
+
}, sa = () => /* @__PURE__ */ o.createElement(zn, null);
|
|
1009
1008
|
export {
|
|
1010
|
-
|
|
1009
|
+
sa as AppointmentRAC
|
|
1011
1010
|
};
|