@wix/form-elements 1.160.0 → 1.161.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-BmHu56e5.js → appointment-rac-BubC8I9X.js} +395 -388
- package/dist/component/{bookings-address-rac-DY9l2g0h.js → bookings-address-rac-BbwvVs86.js} +1 -1
- package/dist/component/{bookings-email-rac-B5vNSOsS.js → bookings-email-rac-C2HCkcfa.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CJiefCNz.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
- package/dist/component/{bookings-header-rac-BFu7Ko5w.js → bookings-header-rac-nmwsWRjS.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DegMM13h.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrA-5tBH.js → bookings-login-bar-rac-CO6vOBjG.js} +7 -7
- package/dist/component/{bookings-phone-rac-DsaeqxCI.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-jRHiwqi8.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
- package/dist/component/{checkbox-field-rac-CyoBb6Yf.js → checkbox-field-rac-CMwmwFMD.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Bv1gU3oL.js → checkbox-group-field-headless-BNs_S-nT.js} +24 -24
- package/dist/component/{checkbox-group-field-rac-DasArcdV.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
- package/dist/component/{checkbox-group-rac-CzmufV1U.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
- package/dist/component/{checkbox-rac-6C7XoUoZ.js → checkbox-rac-KsVlI6_V.js} +1 -1
- package/dist/component/{contacts-address-rac-BZobbFtz.js → contacts-address-rac-CRYkz87z.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DIzf41DS.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
- package/dist/component/{contacts-company-rac-BiBDO28r.js → contacts-company-rac-B8G__j6I.js} +1 -1
- package/dist/component/{contacts-email-rac-5mqokCSD.js → contacts-email-rac-Dztkvp5i.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BXe3_Nz5.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cfqgh7u1.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
- package/dist/component/{contacts-phone-rac-cmLUWnAc.js → contacts-phone-rac-CPCE5soY.js} +1 -1
- package/dist/component/{contacts-position-rac-DTyvklfN.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-D-ZEX1A3.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B4NYJwWt.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
- package/dist/component/{date-availability-Dach9aRC.js → date-availability-DDj1j0z5.js} +1 -1
- package/dist/component/{date-input-field-rac-B72mHcya.js → date-input-field-rac-D5r1n_ah.js} +59 -59
- package/dist/component/{date-input-rac-CYix11gT.js → date-input-rac-Cyi5mU_P.js} +1 -1
- package/dist/component/{date-picker-field-rac-B8pvtPir.js → date-picker-field-rac-CeG391Zo.js} +34 -34
- package/dist/component/{date-picker-rac-D6cR0zH9.js → date-picker-rac-Ci9aHgav.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B7Y3Yf5l.js → date-time-input-field-rac-CrbYEbJJ.js} +89 -89
- package/dist/component/{date-time-input-rac-DMN-noQX.js → date-time-input-rac-DDJLkqs0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Kq0GnteP.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BY9GZ4n1.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CXArIddp.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-B39TtxGq.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3y0G8cS.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
- package/dist/component/{dext-email-rac-BIg3cq7Q.js → dext-email-rac-BAvQwDPA.js} +1 -1
- package/dist/component/{dext-number-input-rac-27sHJ7yN.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
- package/dist/component/{dext-phone-rac-CcohoFQp.js → dext-phone-rac--FhcplSI.js} +1 -1
- package/dist/component/{dext-radio-group-rac-eead3Gve.js → dext-radio-group-rac-DBz8iCKW.js} +2 -2
- package/dist/component/{dext-rating-input-rac-B_E6OcBr.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
- package/dist/component/{dext-tags-rac-Yd9aAtnF.js → dext-tags-rac-CRUUc5dr.js} +2 -2
- package/dist/component/{dext-text-area-rac-CMACri2C.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
- package/dist/component/{dext-text-input-rac-sNjSCfQ-.js → dext-text-input-rac-4CpM581y.js} +1 -1
- package/dist/component/{dext-url-input-rac-DwhbzJty.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
- package/dist/component/{donation-rac-BVAN3kMk.js → donation-rac-Cgt0ZE50.js} +68 -68
- package/dist/component/{dropdown-field-rac-DdoGigWx.js → dropdown-field-rac-DlGKR7pZ.js} +3 -3
- package/dist/component/{dropdown-rac-CRkt5w47.js → dropdown-rac-CYFW_3x_.js} +1 -1
- package/dist/component/{ecom-address-rac-C36hFHW0.js → ecom-address-rac-CQfQHpXC.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BKfQ348w.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
- package/dist/component/{email-input-field-rac-MOaISYxa.js → email-input-field-rac-CVw25yRo.js} +45 -45
- package/dist/component/{events-repeater-rac-D6p-NgE8.js → events-repeater-rac-BCVUcmFj.js} +22 -22
- package/dist/component/{events-rsvp-rac-DVpgN8gm.js → events-rsvp-rac-DwbqEr8z.js} +3 -3
- package/dist/component/{field-error-headless-XNWmDH3E.js → field-error-headless-XnVcMmsL.js} +3 -3
- package/dist/component/{field-label-headless-CORRAJGt.js → field-label-headless-BRTLT2Yt.js} +14 -14
- package/dist/component/{file-upload-rac-DRMr7E4b.js → file-upload-rac-Dkwg9Jk4.js} +115 -115
- package/dist/component/{fixed-payment-rac-BUXzNex9.js → fixed-payment-rac-ST98xAa2.js} +20 -20
- package/dist/component/{form-DSpx-AO8.js → form-BUqSKOvc.js} +235 -234
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CiDXlNsa.js → header-field-rac-CzNTGYWq.js} +5 -5
- package/dist/component/{header-rac-B5Rg-h8u.js → header-rac-DUt6AIAE.js} +1 -1
- package/dist/component/{image-choice-rac-CtoA_KDp.js → image-choice-rac-DuBgrSt2.js} +21 -21
- package/dist/component/{index-Bz7ZhQsF.js → index-CDO22hht.js} +106 -106
- package/dist/component/{index-CwruESwc.js → index-cZZeAuuu.js} +5 -5
- package/dist/component/{isObjectLike-C5dHxHP0.js → isObjectLike-cs4bARpC.js} +3 -3
- package/dist/component/{multiline-address-field-rac-Z-qF366L.js → multiline-address-field-rac-vcEWhUCV.js} +73 -73
- package/dist/component/{multiline-address-rac-CJIHTMw5.js → multiline-address-rac-WQaI2eUX.js} +1 -1
- package/dist/component/{number-input-field-rac-D4vf6I6N.js → number-input-field-rac-CBUMqATk.js} +26 -26
- package/dist/component/{number-input-rac-B2jW6JUQ.js → number-input-rac-B4j5hyzS.js} +1 -1
- package/dist/component/{password-rac-DGRZ17Jl.js → password-rac-DwLyf45N.js} +28 -28
- package/dist/component/{payment-input-rac-BtD-tAKv.js → payment-input-rac-D0Od---y.js} +28 -28
- package/dist/component/{phone-input-field-rac-KD4-APhr.js → phone-input-field-rac-COlu9IeC.js} +64 -64
- package/dist/component/{phone-rac-Cw2yccgg.js → phone-rac-Dh4RacOF.js} +1 -1
- package/dist/component/{product-list-rac-XbzTDdbp.js → product-list-rac-D7zHDE2D.js} +47 -47
- package/dist/component/{quiz-radio-group-rac-BDw_mAw5.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
- package/dist/component/{radio-button-module-classes-CFGf0Hzh.js → radio-button-module-classes-VqaP6vpA.js} +29 -29
- package/dist/component/{radio-group-field-rac-CXN7tyVu.js → radio-group-field-rac-Cp3LRN3C.js} +6 -6
- package/dist/component/{radio-group-rac-COHzqjBh.js → radio-group-rac-KhmhzYGf.js} +1 -1
- package/dist/component/{rating-input-field-rac-DCXNZgf1.js → rating-input-field-rac-10n6ciCr.js} +22 -22
- package/dist/component/{rating-input-rac-DwQt9ML7.js → rating-input-rac-XZjjY2Gp.js} +1 -1
- package/dist/component/{rich-content-rac.module-B7rPwNns.js → rich-content-rac.module-kMwDoLBa.js} +1 -1
- package/dist/component/{rich-text-field-rac-DlER7NRD.js → rich-text-field-rac-H5bd8fAt.js} +6 -6
- package/dist/component/{rich-text-rac-CjicsHA7.js → rich-text-rac-88GSQR62.js} +1 -1
- package/dist/component/{service-dropdown-rac-B81LC_6_.js → service-dropdown-rac-B1_Xr_X3.js} +31 -31
- package/dist/component/{services-multi-choice-rac-BR6gZeHk.js → services-multi-choice-rac-DWp_Llbi.js} +17 -17
- package/dist/component/{signature-rac-XFj7Ddtp.js → signature-rac-zN_6KRDp.js} +44 -44
- package/dist/component/{submit-button-rac-Bz7zs_3W.js → submit-button-rac-Dv6UarYX.js} +2 -2
- package/dist/component/{tags-field-rac-DWWkNKqc.js → tags-field-rac-sVN6MHfJ.js} +38 -38
- package/dist/component/{tags-rac-BXyiQ9i1.js → tags-rac-DhTHs_XN.js} +1 -1
- package/dist/component/{text-area-field-rac-DsIRYi0d.js → text-area-field-rac-DrWkww7W.js} +21 -21
- package/dist/component/{text-area-rac-CF9pDP9d.js → text-area-rac-CXXh-ZdY.js} +1 -1
- package/dist/component/{text-input-field-rac-BwIDZACz.js → text-input-field-rac-C2YiMr-g.js} +3 -3
- package/dist/component/{text-input-headless-5kQs2_Xu.js → text-input-headless-BJMNbsMY.js} +12 -12
- package/dist/component/{text-input-rac-CRmSuw1k.js → text-input-rac-CpsPh7FH.js} +1 -1
- package/dist/component/{time-input-rac-BRMNpe51.js → time-input-rac-DG_1KxS4.js} +23 -23
- package/dist/component/{url-input-field-rac-CKLS3QDk.js → url-input-field-rac-twxRREnl.js} +26 -26
- package/dist/component/{url-input-rac-Dv-kp50D.js → url-input-rac-BTStO0NP.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BQi_qE_-.js → use-dropdown-option-class-name-DbMMg1ws.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-bAK8aHiG.js → use-dropdown-trigger-class-name-Yes4kC_0.js} +17 -17
- package/dist/component/{use-element-state-class-name-rXM_lHug.js → use-element-state-class-name-DlncY4hk.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BnV_uerV.js → use-hoverable-input-class-name-C__zqP5j.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-DnK_MQRO.js +53 -0
- package/dist/component/{use-service-options-base-CLeE9-Tx.js → use-service-options-base-DKJe52Vk.js} +6 -6
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +6 -0
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +0 -53
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +0 -6
package/dist/component/{service-dropdown-rac-B81LC_6_.js → service-dropdown-rac-B1_Xr_X3.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import o, { useRef as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import o, { useRef as w, useMemo as _, useCallback as C, useEffect as T } from "react";
|
|
2
|
+
import { RicosViewer as b } from "@wix/ricos/viewer";
|
|
3
3
|
import E from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import { D as u, u as
|
|
4
|
+
import { bw as P, bK as A, F as M, bA as y, bs as V, aC as W, W as x, ac as H, J as U, M as k, G as q } from "./form-BUqSKOvc.js";
|
|
5
|
+
import { u as B } from "./use-service-options-base-DKJe52Vk.js";
|
|
6
|
+
import { D as u, u as G } from "./use-dropdown-trigger-class-name-Yes4kC_0.js";
|
|
7
7
|
import { C as J } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
|
-
import { E as
|
|
9
|
-
import { H as
|
|
8
|
+
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
9
|
+
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
10
10
|
import { s as i } from "./field-rac.module-DP0lkkEv.js";
|
|
11
|
-
import { u as
|
|
12
|
-
const
|
|
13
|
-
const { actions: t } = P(), { t: D } = A(), { addOther: n, addOtherLabel: p } = e, c = p || D("add-other.default-other-option-label"), a =
|
|
11
|
+
import { u as Y } from "./use-dropdown-option-class-name-DbMMg1ws.js";
|
|
12
|
+
const j = "00000000-0000-0000-0000-000000000000", z = (e) => {
|
|
13
|
+
const { actions: t } = P(), { t: D } = A(), { addOther: n, addOtherLabel: p } = e, c = p || D("add-other.default-other-option-label"), a = w(!0), d = _(() => {
|
|
14
14
|
var s;
|
|
15
15
|
return ((s = e.options) == null ? void 0 : s.map((m) => m.id ?? "")) ?? [];
|
|
16
16
|
}, [
|
|
@@ -20,16 +20,16 @@ const G = "00000000-0000-0000-0000-000000000000", K = (e) => {
|
|
|
20
20
|
{
|
|
21
21
|
value: c,
|
|
22
22
|
label: c,
|
|
23
|
-
id:
|
|
23
|
+
id: j
|
|
24
24
|
}
|
|
25
25
|
] : s, [
|
|
26
26
|
n,
|
|
27
27
|
c
|
|
28
|
-
]), { isLoading: f, options: l, isEmpty: h, shouldRender: I, setIsLoading: S, setOptions:
|
|
28
|
+
]), { isLoading: f, options: l, isEmpty: h, shouldRender: I, setIsLoading: S, setOptions: R, setIsEmpty: g, processOptions: F } = B({
|
|
29
29
|
fieldType: M.SERVICES_DROPDOWN,
|
|
30
30
|
isEditor: e.isEditor,
|
|
31
31
|
postProcessOptions: O
|
|
32
|
-
}),
|
|
32
|
+
}), L = C(async () => {
|
|
33
33
|
if (a.current && (t != null && t.fetchServices) && d.length > 0) {
|
|
34
34
|
a.current = !1, S(!0);
|
|
35
35
|
let s;
|
|
@@ -41,8 +41,8 @@ const G = "00000000-0000-0000-0000-000000000000", K = (e) => {
|
|
|
41
41
|
console.error(m);
|
|
42
42
|
}
|
|
43
43
|
if (s) {
|
|
44
|
-
const m =
|
|
45
|
-
g(!n && m.length === 0),
|
|
44
|
+
const m = F(s);
|
|
45
|
+
g(!n && m.length === 0), R(m);
|
|
46
46
|
} else
|
|
47
47
|
a.current = !0;
|
|
48
48
|
S(!1);
|
|
@@ -50,10 +50,10 @@ const G = "00000000-0000-0000-0000-000000000000", K = (e) => {
|
|
|
50
50
|
}, [
|
|
51
51
|
t,
|
|
52
52
|
d,
|
|
53
|
-
|
|
53
|
+
F,
|
|
54
54
|
n,
|
|
55
55
|
S,
|
|
56
|
-
|
|
56
|
+
R,
|
|
57
57
|
g
|
|
58
58
|
]);
|
|
59
59
|
T(() => {
|
|
@@ -67,12 +67,12 @@ const G = "00000000-0000-0000-0000-000000000000", K = (e) => {
|
|
|
67
67
|
g,
|
|
68
68
|
e.isEditor
|
|
69
69
|
]);
|
|
70
|
-
const
|
|
71
|
-
e.onFocus && e.onFocus(), a.current &&
|
|
70
|
+
const N = C(() => {
|
|
71
|
+
e.onFocus && e.onFocus(), a.current && L();
|
|
72
72
|
}, [
|
|
73
|
-
|
|
73
|
+
L,
|
|
74
74
|
e.onFocus
|
|
75
|
-
]),
|
|
75
|
+
]), v = C(
|
|
76
76
|
(s) => {
|
|
77
77
|
e.onChange && e.onChange(s), a.current = !0;
|
|
78
78
|
},
|
|
@@ -85,12 +85,12 @@ const G = "00000000-0000-0000-0000-000000000000", K = (e) => {
|
|
|
85
85
|
isLoading: f,
|
|
86
86
|
options: l,
|
|
87
87
|
isEmpty: h,
|
|
88
|
-
onFocus:
|
|
89
|
-
onChange:
|
|
88
|
+
onFocus: N,
|
|
89
|
+
onChange: v,
|
|
90
90
|
shouldRender: I
|
|
91
91
|
};
|
|
92
92
|
}, r = ({ children: e }) => {
|
|
93
|
-
const t = y(), { addOther: D } = t, n = V(), p = t.isEditor || n.isEditor || n.isComposer, { isLoading: c, options: a, isEmpty: d, onFocus: O, onChange: f, shouldRender: l } =
|
|
93
|
+
const t = y(), { addOther: D } = t, n = V(), p = t.isEditor || n.isEditor || n.isComposer, { isLoading: c, options: a, isEmpty: d, onFocus: O, onChange: f, shouldRender: l } = z({
|
|
94
94
|
...t,
|
|
95
95
|
isEditor: p
|
|
96
96
|
}), h = _(() => ({
|
|
@@ -106,7 +106,7 @@ const G = "00000000-0000-0000-0000-000000000000", K = (e) => {
|
|
|
106
106
|
O,
|
|
107
107
|
f
|
|
108
108
|
]);
|
|
109
|
-
return !p && d && !D || !l ? null : /* @__PURE__ */ o.createElement(
|
|
109
|
+
return !p && d && !D || !l ? null : /* @__PURE__ */ o.createElement(W.Provider, {
|
|
110
110
|
value: {
|
|
111
111
|
v2: h
|
|
112
112
|
}
|
|
@@ -117,13 +117,13 @@ r.Trigger = u.Trigger;
|
|
|
117
117
|
r.Options = u.Options;
|
|
118
118
|
r.Description = u.Description;
|
|
119
119
|
r.Error = u.Error;
|
|
120
|
-
const X = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(
|
|
120
|
+
const X = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(b, {
|
|
121
121
|
content: e,
|
|
122
122
|
locale: t
|
|
123
123
|
}), Z = () => {
|
|
124
|
-
const e =
|
|
124
|
+
const e = G(i.dropdownTrigger), t = Y(Q);
|
|
125
125
|
return /* @__PURE__ */ o.createElement(r, null, /* @__PURE__ */ o.createElement(r.Label, {
|
|
126
|
-
className: E(
|
|
126
|
+
className: E(x, i.label)
|
|
127
127
|
}, /* @__PURE__ */ o.createElement(r.Label.Required, {
|
|
128
128
|
className: E(H, i.requiredMark)
|
|
129
129
|
})), /* @__PURE__ */ o.createElement(r.Trigger, {
|
|
@@ -135,9 +135,9 @@ const X = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(w, {
|
|
|
135
135
|
}, /* @__PURE__ */ o.createElement(r.Options.Option, {
|
|
136
136
|
className: t
|
|
137
137
|
})), /* @__PURE__ */ o.createElement(r.Error, {
|
|
138
|
-
className: E(
|
|
139
|
-
}, /* @__PURE__ */ o.createElement(
|
|
140
|
-
className: E(
|
|
138
|
+
className: E(k, i.error)
|
|
139
|
+
}, /* @__PURE__ */ o.createElement(K, null), /* @__PURE__ */ o.createElement(r.Error.Text, null)), /* @__PURE__ */ o.createElement(r.Description, {
|
|
140
|
+
className: E(q, i.description)
|
|
141
141
|
}, X));
|
|
142
142
|
}, me = () => /* @__PURE__ */ o.createElement(Z, null);
|
|
143
143
|
export {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import e, { useEffect as
|
|
1
|
+
import e, { useEffect as I, useMemo as L } from "react";
|
|
2
2
|
import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
3
3
|
import a from "classnames";
|
|
4
|
-
import { F as R,
|
|
5
|
-
import { u as v } from "./use-service-options-base-
|
|
6
|
-
import { C as i } from "./checkbox-group-field-headless-
|
|
4
|
+
import { F as R, bA as d, aC as D, W as F, ac as N, p as f, r as h, M as b, G as M, q as A } from "./form-BUqSKOvc.js";
|
|
5
|
+
import { u as v } from "./use-service-options-base-DKJe52Vk.js";
|
|
6
|
+
import { C as i } from "./checkbox-group-field-headless-BNs_S-nT.js";
|
|
7
7
|
import { E as x } from "./error-icon-hZxQ6DEy.js";
|
|
8
8
|
import { C as P } from "./checkbox-indicator-module-classes-akWZsZNn.js";
|
|
9
9
|
import { s as n } from "./field-rac.module-DP0lkkEv.js";
|
|
10
10
|
import { o as _ } from "./options-rac.module-_THNq6Qq.js";
|
|
11
|
-
import { u as T } from "./use-element-state-class-name-
|
|
12
|
-
import { u as
|
|
13
|
-
const
|
|
11
|
+
import { u as T } from "./use-element-state-class-name-DlncY4hk.js";
|
|
12
|
+
import { u as k } from "./use-text-input-class-name-D9tJTR-b.js";
|
|
13
|
+
const y = (s) => {
|
|
14
14
|
var C;
|
|
15
15
|
const { isLoading: o, options: r, isEmpty: l, shouldRender: E, setOptions: c, setIsEmpty: m, setHasInitialDataLoaded: p } = v({
|
|
16
16
|
fieldType: R.SERVICES_MULTI_CHOICE,
|
|
17
17
|
isEditor: s.isEditor
|
|
18
18
|
}), u = (C = s.options) == null ? void 0 : C.every((O) => O.label && O.id);
|
|
19
|
-
return
|
|
19
|
+
return I(() => {
|
|
20
20
|
if (u && s.options) {
|
|
21
21
|
c(s.options), m(s.options.length === 0), p(!0);
|
|
22
22
|
return;
|
|
@@ -34,7 +34,7 @@ const k = (s) => {
|
|
|
34
34
|
shouldRender: E
|
|
35
35
|
};
|
|
36
36
|
}, t = ({ children: s, className: o }) => {
|
|
37
|
-
const r = d(), { options: l, isEmpty: E, shouldRender: c } =
|
|
37
|
+
const r = d(), { options: l, isEmpty: E, shouldRender: c } = y(r), m = L(() => ({
|
|
38
38
|
...r,
|
|
39
39
|
options: l
|
|
40
40
|
}), [
|
|
@@ -53,14 +53,14 @@ t.Label = i.Label;
|
|
|
53
53
|
t.Options = i.Options;
|
|
54
54
|
t.Description = i.Description;
|
|
55
55
|
t.Error = i.Error;
|
|
56
|
-
const
|
|
56
|
+
const B = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(S, {
|
|
57
57
|
content: s,
|
|
58
58
|
locale: o
|
|
59
|
-
}),
|
|
59
|
+
}), G = () => {
|
|
60
60
|
const s = T({
|
|
61
61
|
globalClasses: A,
|
|
62
62
|
moduleClasses: P
|
|
63
|
-
}), o =
|
|
63
|
+
}), o = k();
|
|
64
64
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
65
65
|
className: a(F, n.label)
|
|
66
66
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
@@ -72,15 +72,15 @@ const y = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(S, {
|
|
|
72
72
|
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
73
73
|
className: s
|
|
74
74
|
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
75
|
-
className: a(
|
|
75
|
+
className: a(h, _.optionLabel)
|
|
76
76
|
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
77
77
|
inputClassName: o
|
|
78
78
|
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
79
|
-
className: a(
|
|
79
|
+
className: a(b, n.error)
|
|
80
80
|
}, /* @__PURE__ */ e.createElement(x, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
81
81
|
className: a(M, n.description)
|
|
82
|
-
},
|
|
83
|
-
},
|
|
82
|
+
}, B));
|
|
83
|
+
}, z = () => /* @__PURE__ */ e.createElement(G, null);
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
z as ServicesMultiChoiceRAC
|
|
86
86
|
};
|
|
@@ -2,17 +2,17 @@ import r, { useRef as V, useContext as Ne, useMemo as be, useCallback as _, useS
|
|
|
2
2
|
import we from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as xe } from "@wix/ricos/viewer";
|
|
4
4
|
import F from "classnames";
|
|
5
|
-
import {
|
|
6
|
-
import { useHover as
|
|
5
|
+
import { b2 as Ue, bu as Te, aG as Be, F as Oe, bw as Pe, bs as Me, bI as Ce, E as me, aw as oe, bA as x, bx as W, bC as Ie, bK as He, bt as We, W as Ye, ac as qe, ad as Ge, G as pe, b as Ze, aj as ke, ak as fe, M as Ve, ae as $e, ah as ze, af as Xe, ai as je, f as ne, ag as Ke } from "./form-BUqSKOvc.js";
|
|
6
|
+
import { useHover as Je, useFocusRing as Qe, mergeProps as et } from "react-aria";
|
|
7
7
|
import { RadioGroup as tt, Button as ye, TextField as nt, DropZone as at, Input as ot, FileTrigger as st, RadioField as rt, RadioButton as lt } from "react-aria-components";
|
|
8
8
|
import _e from "signature_pad";
|
|
9
9
|
import { f as I, a as N } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as it, E as ct } from "./field-error-headless-
|
|
11
|
-
import { L as ut } from "./field-label-headless-
|
|
10
|
+
import { D as it, E as ct } from "./field-error-headless-XnVcMmsL.js";
|
|
11
|
+
import { L as ut } from "./field-label-headless-BRTLT2Yt.js";
|
|
12
12
|
import { D as dt } from "./data-hooks-Dkw1pbRj.js";
|
|
13
13
|
import { E as mt } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { s as ae } from "./field-rac.module-DP0lkkEv.js";
|
|
15
|
-
import { u as z } from "./use-element-state-class-name-
|
|
15
|
+
import { u as z } from "./use-element-state-class-name-DlncY4hk.js";
|
|
16
16
|
const pt = typeof r.useId == "function" ? r.useId : () => V(Ue()).current, ft = ({ properties: e }) => e.uploadEnabled === !0, ht = (e, t) => e.fieldType === Oe.SIGNATURE && !e.properties.hidden && !e.properties.disabled && !e.properties.readOnly && (t !== "upload" || ft(e)), Et = (e, t) => e.layout.row - t.layout.row || e.layout.column - t.layout.column, gt = (e) => {
|
|
17
17
|
var o;
|
|
18
18
|
const t = (o = Te().signature) == null ? void 0 : o.signatureMode, a = Ne(Be);
|
|
@@ -112,7 +112,7 @@ function Ee(e, t) {
|
|
|
112
112
|
const a = e.getContext("2d"), n = e.offsetWidth, o = e.offsetHeight, s = Math.max(window.devicePixelRatio || 1, 1), l = n * s, i = o * s;
|
|
113
113
|
return (e.width !== l || e.height !== i) && a ? (e.width = l, e.height = i, a.scale(s, s), t == null || t.redraw(), !0) : !1;
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const k = 480, yt = (e) => Se({
|
|
116
116
|
data: JSON.stringify(e),
|
|
117
117
|
mimeType: A.POINTS
|
|
118
118
|
}), ve = (e) => {
|
|
@@ -198,7 +198,7 @@ async function Rt(e, t) {
|
|
|
198
198
|
return e;
|
|
199
199
|
const n = a.mimeType;
|
|
200
200
|
if (n === A.TEXT) {
|
|
201
|
-
const o = j(
|
|
201
|
+
const o = j(k * 20, k, 1);
|
|
202
202
|
vt(o, a.data, "black", t, "white");
|
|
203
203
|
const s = re(o, "white");
|
|
204
204
|
return (s == null ? void 0 : s.toDataURL("image/jpeg", 0.7)) ?? null;
|
|
@@ -210,14 +210,14 @@ async function Rt(e, t) {
|
|
|
210
210
|
const s = o.map((d) => ({
|
|
211
211
|
...d,
|
|
212
212
|
penColor: "black"
|
|
213
|
-
})), l = j(
|
|
213
|
+
})), l = j(k * 20, k, Math.max(window.devicePixelRatio || 1, 1));
|
|
214
214
|
new _e(l).fromData(s);
|
|
215
215
|
const c = re(l);
|
|
216
|
-
return c ? he(c, void 0,
|
|
216
|
+
return c ? he(c, void 0, k, "white").toDataURL("image/jpeg", 0.7) : null;
|
|
217
217
|
}
|
|
218
218
|
if (n != null && n.startsWith("image/")) {
|
|
219
219
|
const o = await It(e), s = re(o);
|
|
220
|
-
return s ? he(s, void 0,
|
|
220
|
+
return s ? he(s, void 0, k).toDataURL("image/jpeg", 0.7) : null;
|
|
221
221
|
}
|
|
222
222
|
return e;
|
|
223
223
|
}
|
|
@@ -342,7 +342,7 @@ const Ut = (e) => {
|
|
|
342
342
|
const t = e.url ? Y(e.url) : void 0;
|
|
343
343
|
return t ? t.mimeType !== A.POINTS && t.mimeType !== A.TEXT : !0;
|
|
344
344
|
}, ce = () => {
|
|
345
|
-
const { hoverProps: e, isHovered: t } =
|
|
345
|
+
const { hoverProps: e, isHovered: t } = Je({}), { focusProps: a, isFocused: n, isFocusVisible: o } = Qe({
|
|
346
346
|
within: !0
|
|
347
347
|
});
|
|
348
348
|
return {
|
|
@@ -363,12 +363,12 @@ const Ut = (e) => {
|
|
|
363
363
|
[C.DRAW]: R.DRAW,
|
|
364
364
|
[C.TYPE]: R.TYPE,
|
|
365
365
|
[C.UPLOAD]: R.UPLOAD
|
|
366
|
-
},
|
|
366
|
+
}, K = ({ children: e, className: t }) => {
|
|
367
367
|
const { id: a, value: n, onChange: o, target: s, readOnly: l } = x(), i = gt(a), { signatureMode: c, setSignatureMode: u, handleClear: d, clearable: f, signatureView: m, signatureValueForView: L, handleChange: g, handleBeforeChange: p } = Ft({
|
|
368
368
|
target: s,
|
|
369
369
|
value: n,
|
|
370
370
|
onChange: o
|
|
371
|
-
}), E = I(e,
|
|
371
|
+
}), E = I(e, K.Header), h = I(e, K.Value), S = {
|
|
372
372
|
signatureMode: i ?? c,
|
|
373
373
|
setSignatureMode: u,
|
|
374
374
|
handleClear: d,
|
|
@@ -382,8 +382,8 @@ const Ut = (e) => {
|
|
|
382
382
|
className: t,
|
|
383
383
|
"data-hook": "signature-container"
|
|
384
384
|
}, !l && N(E, S), N(h, S));
|
|
385
|
-
},
|
|
386
|
-
const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c = I(e,
|
|
385
|
+
}, J = ({ children: e, className: t, ...a }) => {
|
|
386
|
+
const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c = I(e, J.Tabs), u = I(e, J.Clear);
|
|
387
387
|
return /* @__PURE__ */ r.createElement("div", {
|
|
388
388
|
className: t
|
|
389
389
|
}, N(c, {
|
|
@@ -507,7 +507,7 @@ const Ut = (e) => {
|
|
|
507
507
|
}, [
|
|
508
508
|
ee,
|
|
509
509
|
s
|
|
510
|
-
]),
|
|
510
|
+
]), G = _(() => {
|
|
511
511
|
l == null || l();
|
|
512
512
|
}, [
|
|
513
513
|
l
|
|
@@ -518,19 +518,19 @@ const Ut = (e) => {
|
|
|
518
518
|
...v,
|
|
519
519
|
penColor: getComputedStyle(y).color || void 0
|
|
520
520
|
}), Ee(E.current, p.current), S) {
|
|
521
|
-
const
|
|
522
|
-
|
|
521
|
+
const Z = ve(S);
|
|
522
|
+
Z && (p.current.fromData(Z), P(!0));
|
|
523
523
|
} else
|
|
524
524
|
p.current.clear(), P(!1);
|
|
525
|
-
p.current.addEventListener("beginStroke",
|
|
525
|
+
p.current.addEventListener("beginStroke", G), p.current.addEventListener("endStroke", $), typeof ResizeObserver < "u" && !h.current && (h.current = new ResizeObserver(() => {
|
|
526
526
|
E.current && Ee(E.current, p == null ? void 0 : p.current);
|
|
527
527
|
})), (U = h.current) == null || U.observe(y);
|
|
528
528
|
} else
|
|
529
|
-
(B = h.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", $), (O = p.current) == null || O.removeEventListener("beginStroke",
|
|
529
|
+
(B = h.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", $), (O = p.current) == null || O.removeEventListener("beginStroke", G);
|
|
530
530
|
}, [
|
|
531
531
|
v,
|
|
532
532
|
S,
|
|
533
|
-
|
|
533
|
+
G,
|
|
534
534
|
$
|
|
535
535
|
]);
|
|
536
536
|
return le(() => {
|
|
@@ -648,7 +648,7 @@ const Ut = (e) => {
|
|
|
648
648
|
onBlur: i,
|
|
649
649
|
onFocus: c
|
|
650
650
|
}));
|
|
651
|
-
},
|
|
651
|
+
}, Gt = ({ className: e, imageAlt: t, ...a }) => {
|
|
652
652
|
const { value: n } = a, { inputId: o } = W(), s = ce();
|
|
653
653
|
return /* @__PURE__ */ r.createElement("div", {
|
|
654
654
|
className: e,
|
|
@@ -689,7 +689,7 @@ const Ut = (e) => {
|
|
|
689
689
|
onHoverEnd: n,
|
|
690
690
|
onFocusChange: o
|
|
691
691
|
}, E));
|
|
692
|
-
},
|
|
692
|
+
}, Zt = ({ children: e, className: t, ...a }) => {
|
|
693
693
|
const { textId: n } = a;
|
|
694
694
|
return /* @__PURE__ */ r.createElement("span", {
|
|
695
695
|
id: n,
|
|
@@ -697,13 +697,13 @@ const Ut = (e) => {
|
|
|
697
697
|
}, e);
|
|
698
698
|
};
|
|
699
699
|
b.Label = ut;
|
|
700
|
-
b.Input =
|
|
700
|
+
b.Input = K;
|
|
701
701
|
b.Description = it;
|
|
702
702
|
b.Error = ct;
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
703
|
+
K.Header = J;
|
|
704
|
+
K.Value = H;
|
|
705
|
+
J.Tabs = M;
|
|
706
|
+
J.Clear = Wt;
|
|
707
707
|
M.Draw = Pt;
|
|
708
708
|
M.Type = Mt;
|
|
709
709
|
M.Upload = Ht;
|
|
@@ -711,10 +711,10 @@ H.Canvas = Yt;
|
|
|
711
711
|
H.Type = de;
|
|
712
712
|
H.Upload = Q;
|
|
713
713
|
de.Value = qt;
|
|
714
|
-
Q.Preview =
|
|
714
|
+
Q.Preview = Gt;
|
|
715
715
|
Q.Button = se;
|
|
716
|
-
se.Text =
|
|
717
|
-
const
|
|
716
|
+
se.Text = Zt;
|
|
717
|
+
const kt = () => {
|
|
718
718
|
const { t: e } = He();
|
|
719
719
|
return {
|
|
720
720
|
drawLabel: e("field.signature.mode.draw.label"),
|
|
@@ -770,10 +770,10 @@ const Gt = () => {
|
|
|
770
770
|
}, /* @__PURE__ */ r.createElement("path", {
|
|
771
771
|
fillRule: "evenodd",
|
|
772
772
|
d: "M12,4 L12,5 L8,5 L8,16 L7,16 L7,5 L3,5 L3,4 L12,4 Z M18,8 L18,9 L15,9 L15,16 L14,16 L14,9 L11,9 L11,8 L18,8 Z"
|
|
773
|
-
})), jt = "_container_1qhus_1",
|
|
773
|
+
})), jt = "_container_1qhus_1", Kt = "_header_1qhus_7", Jt = "_tabs_1qhus_13", Qt = "_tab_1qhus_13", en = "_tabHover_1qhus_43", tn = "_tabSelected_1qhus_48", nn = "_tabIcon_1qhus_78", an = "_uploadButton_1qhus_85", on = "_uploadButtonHover_1qhus_138", sn = "_uploadButtonLabel_1qhus_155", rn = "_clear_1qhus_159", ln = "_value_1qhus_191", cn = "_box_1qhus_196", un = "_uploadBox_1qhus_197", dn = "_dropZone_1qhus_228", mn = "_dropZoneHover_1qhus_244", pn = "_boxHover_1qhus_281", fn = "_typeInput_1qhus_341", T = {
|
|
774
774
|
container: jt,
|
|
775
|
-
header:
|
|
776
|
-
tabs:
|
|
775
|
+
header: Kt,
|
|
776
|
+
tabs: Jt,
|
|
777
777
|
tab: Qt,
|
|
778
778
|
tabHover: en,
|
|
779
779
|
tabSelected: tn,
|
|
@@ -793,18 +793,18 @@ const Gt = () => {
|
|
|
793
793
|
content: e,
|
|
794
794
|
locale: t
|
|
795
795
|
}), En = () => {
|
|
796
|
-
var
|
|
797
|
-
const e =
|
|
798
|
-
globalClasses:
|
|
796
|
+
var G, te, y, w, U, B;
|
|
797
|
+
const e = kt(), { disabled: t, readOnly: a } = x(), n = !t && !a, o = z({
|
|
798
|
+
globalClasses: Ke,
|
|
799
799
|
moduleClasses: {
|
|
800
800
|
base: T.tab,
|
|
801
801
|
hover: T.tabHover,
|
|
802
802
|
selected: T.tabSelected
|
|
803
803
|
}
|
|
804
|
-
}), s = ({ isSelected: D, isHovered: O, isFocused:
|
|
804
|
+
}), s = ({ isSelected: D, isHovered: O, isFocused: Z }) => o({
|
|
805
805
|
isSelected: D,
|
|
806
806
|
isHovered: O,
|
|
807
|
-
isFocused:
|
|
807
|
+
isFocused: Z,
|
|
808
808
|
isInteractive: n
|
|
809
809
|
}), i = z({
|
|
810
810
|
globalClasses: $e,
|
|
@@ -838,7 +838,7 @@ const Gt = () => {
|
|
|
838
838
|
base: T.uploadButton,
|
|
839
839
|
hover: T.uploadButtonHover
|
|
840
840
|
}
|
|
841
|
-
}), m = (B = (U = (w = (y = (te = (
|
|
841
|
+
}), m = (B = (U = (w = (y = (te = (G = Te().signature) == null ? void 0 : G.elementProps) == null ? void 0 : te.dropZone) == null ? void 0 : y.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : U.elementProps) == null ? void 0 : B.icon, { wix: L, className: g, ...p } = m ?? {}, E = We(ne.SIGNATURE, ne.SIGNATURE_DROP_ZONE, ne.SIGNATURE_UPLOAD_BUTTON, ne.UPLOAD_BUTTON_LABEL), h = V(null), [S, q] = X(!1), [P, v] = X(!1), ee = _(() => {
|
|
842
842
|
var D;
|
|
843
843
|
q(!0), (D = h.current) == null || D.runAnimationForward();
|
|
844
844
|
}, []), $ = _(() => {
|
|
@@ -850,7 +850,7 @@ const Gt = () => {
|
|
|
850
850
|
}, /* @__PURE__ */ r.createElement(b.Label.Required, {
|
|
851
851
|
className: F(qe, ae.requiredMark)
|
|
852
852
|
})), /* @__PURE__ */ r.createElement(b.Input, {
|
|
853
|
-
className: F(
|
|
853
|
+
className: F(Ge, T.container)
|
|
854
854
|
}, /* @__PURE__ */ r.createElement(b.Input.Header, {
|
|
855
855
|
className: T.header
|
|
856
856
|
}, /* @__PURE__ */ r.createElement(b.Input.Header.Tabs, {
|
|
@@ -888,9 +888,9 @@ const Gt = () => {
|
|
|
888
888
|
className: T.typeInput,
|
|
889
889
|
placeholder: e.placeholder
|
|
890
890
|
})), /* @__PURE__ */ r.createElement(b.Input.Value.Upload, {
|
|
891
|
-
className: ({ isHovered: D, isFocused: O, isDropTarget:
|
|
891
|
+
className: ({ isHovered: D, isFocused: O, isDropTarget: Z }) => F(T.uploadBox, d({
|
|
892
892
|
isSelected: !1,
|
|
893
|
-
isHovered: D ||
|
|
893
|
+
isHovered: D || Z,
|
|
894
894
|
isFocused: O,
|
|
895
895
|
isInteractive: n
|
|
896
896
|
}))
|
|
@@ -910,7 +910,7 @@ const Gt = () => {
|
|
|
910
910
|
}, p.svg ? /* @__PURE__ */ r.createElement(we, {
|
|
911
911
|
...p,
|
|
912
912
|
ref: h,
|
|
913
|
-
className: F(
|
|
913
|
+
className: F(Ze, ke, g)
|
|
914
914
|
}) : null, /* @__PURE__ */ r.createElement(b.Input.Value.Upload.Button.Text, {
|
|
915
915
|
className: F(fe.base, T.uploadButtonLabel, E, {
|
|
916
916
|
[fe.hover]: n && (S || P)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import t, { useRef as V, useCallback as y } from "react";
|
|
2
2
|
import X from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { bA as B, bu as q, au as $, at as j, ar as G, aq as J, az as K, ay as Q, as as Y, b as Z, ap as tt, ax as et } from "./form-BUqSKOvc.js";
|
|
5
5
|
import { ProgressBar as nt, Button as w } from "react-aria-components";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { u as x } from "./use-element-state-class-name-
|
|
7
|
+
import { u as x } from "./use-element-state-class-name-DlncY4hk.js";
|
|
8
8
|
function ot(e) {
|
|
9
9
|
const s = "calc(50% - 2px)";
|
|
10
10
|
return /* @__PURE__ */ t.createElement(nt, {
|