@wix/form-elements 1.159.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-CpiyUOXo.js → appointment-rac-BubC8I9X.js} +388 -381
- package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-BbwvVs86.js} +1 -1
- package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-C2HCkcfa.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
- package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-nmwsWRjS.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-CO6vOBjG.js} +5 -5
- package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
- package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CMwmwFMD.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-BNs_S-nT.js} +50 -50
- package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
- package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
- package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-KsVlI6_V.js} +1 -1
- package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-CRYkz87z.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
- package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-B8G__j6I.js} +1 -1
- package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-Dztkvp5i.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
- package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-CPCE5soY.js} +1 -1
- package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
- package/dist/component/{date-availability-Df807-eN.js → date-availability-DDj1j0z5.js} +1 -1
- package/dist/component/date-input-field-rac-D5r1n_ah.js +309 -0
- package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-Cyi5mU_P.js} +1 -1
- package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-CeG391Zo.js} +79 -79
- package/dist/component/{date-picker-rac-Fp8_pxtf.js → date-picker-rac-Ci9aHgav.js} +1 -1
- package/dist/component/date-time-input-field-rac-CrbYEbJJ.js +441 -0
- package/dist/component/{date-time-input-rac-wctMR4uM.js → date-time-input-rac-DDJLkqs0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
- package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
- package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
- package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BAvQwDPA.js} +1 -1
- package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
- package/dist/component/{dext-phone-rac-C58vHEEe.js → dext-phone-rac--FhcplSI.js} +1 -1
- package/dist/component/dext-radio-group-rac-DBz8iCKW.js +18 -0
- package/dist/component/{dext-rating-input-rac-DI0k3tVa.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
- package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-CRUUc5dr.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
- package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-4CpM581y.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
- package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-Cgt0ZE50.js} +79 -79
- package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DlGKR7pZ.js} +14 -14
- package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CYFW_3x_.js} +1 -1
- package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-CQfQHpXC.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
- package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-CVw25yRo.js} +39 -39
- package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-BCVUcmFj.js} +25 -25
- package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DwbqEr8z.js} +18 -18
- package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XnVcMmsL.js} +3 -3
- package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-BRTLT2Yt.js} +16 -16
- package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-Dkwg9Jk4.js} +118 -118
- package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-ST98xAa2.js} +13 -13
- package/dist/component/{form-BTUoOcqB.js → form-BUqSKOvc.js} +785 -727
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CzNTGYWq.js} +6 -6
- package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-DUt6AIAE.js} +1 -1
- package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-DuBgrSt2.js} +23 -23
- package/dist/component/{index-DIl9BH2M.js → index-CDO22hht.js} +66 -66
- package/dist/component/{index-CoEV4QEy.js → index-cZZeAuuu.js} +2 -2
- package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-cs4bARpC.js} +11 -11
- package/dist/component/multiline-address-field-rac-vcEWhUCV.js +1664 -0
- package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-WQaI2eUX.js} +1 -1
- package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-CBUMqATk.js} +23 -23
- package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B4j5hyzS.js} +1 -1
- package/dist/component/{password-rac-BvvQgafk.js → password-rac-DwLyf45N.js} +27 -27
- package/dist/component/{payment-input-rac-CSRyOPPr.js → payment-input-rac-D0Od---y.js} +31 -31
- package/dist/component/phone-input-field-rac-COlu9IeC.js +512 -0
- package/dist/component/{phone-rac-DMP1MoRs.js → phone-rac-Dh4RacOF.js} +1 -1
- package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-D7zHDE2D.js} +39 -39
- package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
- package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-VqaP6vpA.js} +30 -30
- package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-Cp3LRN3C.js} +8 -8
- package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-KhmhzYGf.js} +1 -1
- package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-10n6ciCr.js} +39 -39
- package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-XZjjY2Gp.js} +1 -1
- package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-kMwDoLBa.js} +8 -8
- package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-H5bd8fAt.js} +4 -4
- package/dist/component/{rich-text-rac-CvZ7s1Ct.js → rich-text-rac-88GSQR62.js} +1 -1
- package/dist/component/service-dropdown-rac-B1_Xr_X3.js +145 -0
- package/dist/component/{services-multi-choice-rac-fXOov4K7.js → services-multi-choice-rac-DWp_Llbi.js} +11 -11
- package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-zN_6KRDp.js} +82 -82
- package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Dv6UarYX.js} +12 -12
- package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-sVN6MHfJ.js} +43 -43
- package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-DhTHs_XN.js} +1 -1
- package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DrWkww7W.js} +19 -19
- package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CXXh-ZdY.js} +1 -1
- package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-C2YiMr-g.js} +5 -5
- package/dist/component/text-input-headless-BJMNbsMY.js +47 -0
- package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CpsPh7FH.js} +1 -1
- package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-DG_1KxS4.js} +20 -20
- package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-twxRREnl.js} +19 -19
- package/dist/component/{url-input-rac-DHuny3d-.js → url-input-rac-BTStO0NP.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-DbMMg1ws.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-Yes4kC_0.js +96 -0
- package/dist/component/{use-element-state-class-name-BUsFQfoW.js → use-element-state-class-name-DlncY4hk.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.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-D_enm38a.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 +11 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-CEuPElMH.js +0 -303
- package/dist/component/date-time-input-field-rac-DG5KSBHe.js +0 -433
- package/dist/component/dext-radio-group-rac-Cp-I94HW.js +0 -18
- package/dist/component/dropdown-field-headless-BYEjiIUf.js +0 -93
- package/dist/component/multiline-address-field-rac-BjWzx-LH.js +0 -1659
- package/dist/component/phone-input-field-rac-BVWzH_TY.js +0 -508
- package/dist/component/service-dropdown-rac-B627AgPG.js +0 -145
- package/dist/component/text-input-headless-BGaBRrP1.js +0 -47
- package/dist/component/use-dropdown-trigger-class-name-rcGBzxI1.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-CoOk4W4i.js +0 -48
- package/dist/component/use-text-input-class-name-BLtPQoYE.js +0 -6
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
import E from "classnames";
|
|
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
|
+
import { C as J } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
|
+
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
9
|
+
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
10
|
+
import { s as i } from "./field-rac.module-DP0lkkEv.js";
|
|
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
|
+
var s;
|
|
15
|
+
return ((s = e.options) == null ? void 0 : s.map((m) => m.id ?? "")) ?? [];
|
|
16
|
+
}, [
|
|
17
|
+
e.options
|
|
18
|
+
]), O = C((s) => n ? [
|
|
19
|
+
...s,
|
|
20
|
+
{
|
|
21
|
+
value: c,
|
|
22
|
+
label: c,
|
|
23
|
+
id: j
|
|
24
|
+
}
|
|
25
|
+
] : s, [
|
|
26
|
+
n,
|
|
27
|
+
c
|
|
28
|
+
]), { isLoading: f, options: l, isEmpty: h, shouldRender: I, setIsLoading: S, setOptions: R, setIsEmpty: g, processOptions: F } = B({
|
|
29
|
+
fieldType: M.SERVICES_DROPDOWN,
|
|
30
|
+
isEditor: e.isEditor,
|
|
31
|
+
postProcessOptions: O
|
|
32
|
+
}), L = C(async () => {
|
|
33
|
+
if (a.current && (t != null && t.fetchServices) && d.length > 0) {
|
|
34
|
+
a.current = !1, S(!0);
|
|
35
|
+
let s;
|
|
36
|
+
try {
|
|
37
|
+
s = await t.fetchServices({
|
|
38
|
+
serviceIds: d
|
|
39
|
+
});
|
|
40
|
+
} catch (m) {
|
|
41
|
+
console.error(m);
|
|
42
|
+
}
|
|
43
|
+
if (s) {
|
|
44
|
+
const m = F(s);
|
|
45
|
+
g(!n && m.length === 0), R(m);
|
|
46
|
+
} else
|
|
47
|
+
a.current = !0;
|
|
48
|
+
S(!1);
|
|
49
|
+
}
|
|
50
|
+
}, [
|
|
51
|
+
t,
|
|
52
|
+
d,
|
|
53
|
+
F,
|
|
54
|
+
n,
|
|
55
|
+
S,
|
|
56
|
+
R,
|
|
57
|
+
g
|
|
58
|
+
]);
|
|
59
|
+
T(() => {
|
|
60
|
+
if (!e.isEditor && l.length > 0) {
|
|
61
|
+
const s = n ? l.length - 1 : l.length;
|
|
62
|
+
g(s === 0);
|
|
63
|
+
}
|
|
64
|
+
}, [
|
|
65
|
+
l,
|
|
66
|
+
n,
|
|
67
|
+
g,
|
|
68
|
+
e.isEditor
|
|
69
|
+
]);
|
|
70
|
+
const N = C(() => {
|
|
71
|
+
e.onFocus && e.onFocus(), a.current && L();
|
|
72
|
+
}, [
|
|
73
|
+
L,
|
|
74
|
+
e.onFocus
|
|
75
|
+
]), v = C(
|
|
76
|
+
(s) => {
|
|
77
|
+
e.onChange && e.onChange(s), a.current = !0;
|
|
78
|
+
},
|
|
79
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
|
+
[
|
|
81
|
+
e.onChange
|
|
82
|
+
]
|
|
83
|
+
);
|
|
84
|
+
return {
|
|
85
|
+
isLoading: f,
|
|
86
|
+
options: l,
|
|
87
|
+
isEmpty: h,
|
|
88
|
+
onFocus: N,
|
|
89
|
+
onChange: v,
|
|
90
|
+
shouldRender: I
|
|
91
|
+
};
|
|
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 } = z({
|
|
94
|
+
...t,
|
|
95
|
+
isEditor: p
|
|
96
|
+
}), h = _(() => ({
|
|
97
|
+
...t,
|
|
98
|
+
options: c ? [] : a,
|
|
99
|
+
isLoading: c,
|
|
100
|
+
onFocus: O,
|
|
101
|
+
onChange: f
|
|
102
|
+
}), [
|
|
103
|
+
t,
|
|
104
|
+
a,
|
|
105
|
+
c,
|
|
106
|
+
O,
|
|
107
|
+
f
|
|
108
|
+
]);
|
|
109
|
+
return !p && d && !D || !l ? null : /* @__PURE__ */ o.createElement(W.Provider, {
|
|
110
|
+
value: {
|
|
111
|
+
v2: h
|
|
112
|
+
}
|
|
113
|
+
}, /* @__PURE__ */ o.createElement(u, null, e));
|
|
114
|
+
};
|
|
115
|
+
r.Label = u.Label;
|
|
116
|
+
r.Trigger = u.Trigger;
|
|
117
|
+
r.Options = u.Options;
|
|
118
|
+
r.Description = u.Description;
|
|
119
|
+
r.Error = u.Error;
|
|
120
|
+
const X = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(b, {
|
|
121
|
+
content: e,
|
|
122
|
+
locale: t
|
|
123
|
+
}), Z = () => {
|
|
124
|
+
const e = G(i.dropdownTrigger), t = Y(Q);
|
|
125
|
+
return /* @__PURE__ */ o.createElement(r, null, /* @__PURE__ */ o.createElement(r.Label, {
|
|
126
|
+
className: E(x, i.label)
|
|
127
|
+
}, /* @__PURE__ */ o.createElement(r.Label.Required, {
|
|
128
|
+
className: E(H, i.requiredMark)
|
|
129
|
+
})), /* @__PURE__ */ o.createElement(r.Trigger, {
|
|
130
|
+
className: e
|
|
131
|
+
}, /* @__PURE__ */ o.createElement(J, {
|
|
132
|
+
className: i.dropdownIcon
|
|
133
|
+
})), /* @__PURE__ */ o.createElement(r.Options, {
|
|
134
|
+
className: E(U, i.selectPopover, i.dropdownPopover)
|
|
135
|
+
}, /* @__PURE__ */ o.createElement(r.Options.Option, {
|
|
136
|
+
className: t
|
|
137
|
+
})), /* @__PURE__ */ o.createElement(r.Error, {
|
|
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
|
+
}, X));
|
|
142
|
+
}, me = () => /* @__PURE__ */ o.createElement(Z, null);
|
|
143
|
+
export {
|
|
144
|
+
me as ServiceDropdownRAC
|
|
145
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import e, { useEffect as I, useMemo as L } from "react";
|
|
2
|
-
import { RicosViewer as
|
|
2
|
+
import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
3
3
|
import a from "classnames";
|
|
4
|
-
import { F as
|
|
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 k } from "./use-text-input-class-name-
|
|
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
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
|
-
fieldType:
|
|
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
19
|
return I(() => {
|
|
@@ -53,10 +53,10 @@ t.Label = i.Label;
|
|
|
53
53
|
t.Options = i.Options;
|
|
54
54
|
t.Description = i.Description;
|
|
55
55
|
t.Error = i.Error;
|
|
56
|
-
const B = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(
|
|
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
|
|
@@ -80,7 +80,7 @@ const B = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(R, {
|
|
|
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
82
|
}, B));
|
|
83
|
-
},
|
|
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);
|
|
@@ -24,11 +24,11 @@ const pt = typeof r.useId == "function" ? r.useId : () => V(Ue()).current, ft =
|
|
|
24
24
|
t
|
|
25
25
|
]) === e ? t : void 0;
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var A = /* @__PURE__ */ (function(e) {
|
|
28
28
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
29
29
|
})({}), C = /* @__PURE__ */ (function(e) {
|
|
30
30
|
return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
|
|
31
|
-
})({}),
|
|
31
|
+
})({}), R = /* @__PURE__ */ (function(e) {
|
|
32
32
|
return e.DRAW = "draw", e.TYPE = "type", e.IMAGE = "image", e.UPLOAD = "upload", e;
|
|
33
33
|
})({});
|
|
34
34
|
const bt = (e) => {
|
|
@@ -112,12 +112,12 @@ 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
|
-
mimeType:
|
|
117
|
+
mimeType: A.POINTS
|
|
118
118
|
}), ve = (e) => {
|
|
119
119
|
const t = Y(e);
|
|
120
|
-
if ((t == null ? void 0 : t.mimeType) ===
|
|
120
|
+
if ((t == null ? void 0 : t.mimeType) === A.POINTS)
|
|
121
121
|
try {
|
|
122
122
|
return JSON.parse(t.data);
|
|
123
123
|
} catch {
|
|
@@ -125,7 +125,7 @@ const G = 480, yt = (e) => Ae({
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}, ge = 0.8, De = "Madefor";
|
|
128
|
-
function
|
|
128
|
+
function Ae(e, t) {
|
|
129
129
|
const { width: a, actualBoundingBoxAscent: n, actualBoundingBoxDescent: o } = t.measureText(e);
|
|
130
130
|
return {
|
|
131
131
|
width: a,
|
|
@@ -136,25 +136,25 @@ function Re(e, t) {
|
|
|
136
136
|
function _t(e, t) {
|
|
137
137
|
const a = t.getContext("2d"), n = t.offsetWidth || t.width, s = (t.offsetHeight || t.height) * ge, l = n * ge;
|
|
138
138
|
a.font = `${s}px ${De}`;
|
|
139
|
-
const { width: i, height: c } =
|
|
139
|
+
const { width: i, height: c } = Ae(e, a), u = s / (i / l), d = s / (c / s);
|
|
140
140
|
return Math.min(u, d);
|
|
141
141
|
}
|
|
142
142
|
function vt(e, t, a = "black", n = !1, o) {
|
|
143
143
|
const s = e.getContext("2d"), l = _t(t, e);
|
|
144
144
|
s.font = `${l}px ${De}`, s.textBaseline = "top";
|
|
145
|
-
const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } =
|
|
145
|
+
const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } = Ae(t, s);
|
|
146
146
|
s.fillStyle = o, s.fillRect(0, 0, i, c), s.fillStyle = a;
|
|
147
147
|
const m = (i - u) / 2;
|
|
148
148
|
s.fillText(t, n ? i - m : m, (c - d) / 2 + f);
|
|
149
149
|
}
|
|
150
|
-
const
|
|
150
|
+
const Re = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
|
|
151
151
|
function Dt(e) {
|
|
152
|
-
return
|
|
152
|
+
return Re.test(e);
|
|
153
153
|
}
|
|
154
154
|
function Y(e) {
|
|
155
155
|
if (!e)
|
|
156
156
|
return;
|
|
157
|
-
const t = e.match(
|
|
157
|
+
const t = e.match(Re);
|
|
158
158
|
if (!t)
|
|
159
159
|
return;
|
|
160
160
|
const [, a, n, o] = t;
|
|
@@ -164,11 +164,11 @@ function Y(e) {
|
|
|
164
164
|
encoding: n
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Se({ data: e, mimeType: t, encoding: a = "text" }) {
|
|
168
168
|
const n = a === "base64" ? btoa(e) : encodeURI(e);
|
|
169
169
|
return `data:${a === "base64" ? `${t};base64` : t},${n}`;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function At(e, t) {
|
|
172
172
|
const a = Y(e);
|
|
173
173
|
if (!a)
|
|
174
174
|
return;
|
|
@@ -192,39 +192,39 @@ function ie(e, t = "temp") {
|
|
|
192
192
|
fileType: (a == null ? void 0 : a.mimeType) ?? ""
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
async function
|
|
195
|
+
async function Rt(e, t) {
|
|
196
196
|
const a = Y(e);
|
|
197
197
|
if (!a)
|
|
198
198
|
return e;
|
|
199
199
|
const n = a.mimeType;
|
|
200
|
-
if (n ===
|
|
201
|
-
const o = j(
|
|
200
|
+
if (n === A.TEXT) {
|
|
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;
|
|
205
205
|
}
|
|
206
|
-
if (n ===
|
|
206
|
+
if (n === A.POINTS) {
|
|
207
207
|
const o = ve(e);
|
|
208
208
|
if (!o)
|
|
209
209
|
return null;
|
|
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
|
}
|
|
224
|
-
async function
|
|
225
|
-
const a = await
|
|
224
|
+
async function St(e, t) {
|
|
225
|
+
const a = await Rt(e, t);
|
|
226
226
|
if (a)
|
|
227
|
-
return
|
|
227
|
+
return At(a, "signature");
|
|
228
228
|
}
|
|
229
229
|
const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
230
230
|
const [n, o] = X(e), { isRTL: s } = Me(), l = bt(a), { setFormStatus: i } = Ce(), c = V();
|
|
@@ -239,7 +239,7 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
239
239
|
try {
|
|
240
240
|
const p = (g == null ? void 0 : g.url) ?? "";
|
|
241
241
|
if (Dt(p)) {
|
|
242
|
-
const E = await
|
|
242
|
+
const E = await St(p, s);
|
|
243
243
|
if (E) {
|
|
244
244
|
const h = await l(E);
|
|
245
245
|
t([
|
|
@@ -286,9 +286,9 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
286
286
|
if (s == null)
|
|
287
287
|
return C.DRAW;
|
|
288
288
|
switch (l == null ? void 0 : l.mimeType) {
|
|
289
|
-
case
|
|
289
|
+
case A.POINTS:
|
|
290
290
|
return C.DRAW;
|
|
291
|
-
case
|
|
291
|
+
case A.TEXT:
|
|
292
292
|
return C.TYPE;
|
|
293
293
|
default:
|
|
294
294
|
return C.UPLOAD;
|
|
@@ -309,13 +309,13 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
309
309
|
]), m = s != null, L = xt(i, s, l), g = (() => {
|
|
310
310
|
switch (i) {
|
|
311
311
|
case C.DRAW:
|
|
312
|
-
return
|
|
312
|
+
return R.DRAW;
|
|
313
313
|
case C.TYPE:
|
|
314
|
-
return
|
|
314
|
+
return R.TYPE;
|
|
315
315
|
case C.UPLOAD:
|
|
316
|
-
return L != null ?
|
|
316
|
+
return L != null ? R.IMAGE : R.UPLOAD;
|
|
317
317
|
default:
|
|
318
|
-
return
|
|
318
|
+
return R.DRAW;
|
|
319
319
|
}
|
|
320
320
|
})();
|
|
321
321
|
return {
|
|
@@ -331,18 +331,18 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
331
331
|
handleClear: f
|
|
332
332
|
};
|
|
333
333
|
}, wt = {
|
|
334
|
-
[C.DRAW]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
335
|
-
[C.TYPE]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
336
|
-
[C.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !==
|
|
334
|
+
[C.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === A.POINTS,
|
|
335
|
+
[C.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === A.TEXT,
|
|
336
|
+
[C.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== A.POINTS && (e == null ? void 0 : e.mimeType) !== A.TEXT
|
|
337
337
|
};
|
|
338
338
|
function xt(e, t, a) {
|
|
339
339
|
return t && wt[e](a) ? t : void 0;
|
|
340
340
|
}
|
|
341
341
|
const Ut = (e) => {
|
|
342
342
|
const t = e.url ? Y(e.url) : void 0;
|
|
343
|
-
return t ? t.mimeType !==
|
|
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 {
|
|
@@ -360,15 +360,15 @@ const Ut = (e) => {
|
|
|
360
360
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, l, s)
|
|
361
361
|
});
|
|
362
362
|
}, Bt = {
|
|
363
|
-
[C.DRAW]:
|
|
364
|
-
[C.TYPE]:
|
|
365
|
-
[C.UPLOAD]:
|
|
366
|
-
},
|
|
363
|
+
[C.DRAW]: R.DRAW,
|
|
364
|
+
[C.TYPE]: R.TYPE,
|
|
365
|
+
[C.UPLOAD]: R.UPLOAD
|
|
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,
|
|
@@ -381,9 +381,9 @@ const Ut = (e) => {
|
|
|
381
381
|
return /* @__PURE__ */ r.createElement("div", {
|
|
382
382
|
className: t,
|
|
383
383
|
"data-hook": "signature-container"
|
|
384
|
-
}, !l && N(E,
|
|
385
|
-
},
|
|
386
|
-
const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c = I(e,
|
|
384
|
+
}, !l && N(E, S), N(h, S));
|
|
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, {
|
|
@@ -455,7 +455,7 @@ const Ut = (e) => {
|
|
|
455
455
|
"data-invalid": f,
|
|
456
456
|
"data-disabled": i,
|
|
457
457
|
"data-readonly": c
|
|
458
|
-
}, n ===
|
|
458
|
+
}, n === R.DRAW && N(m, {
|
|
459
459
|
value: o,
|
|
460
460
|
onChange: s,
|
|
461
461
|
onBeforeChange: l,
|
|
@@ -463,7 +463,7 @@ const Ut = (e) => {
|
|
|
463
463
|
readOnly: c,
|
|
464
464
|
onBlur: u,
|
|
465
465
|
onFocus: d
|
|
466
|
-
}), n ===
|
|
466
|
+
}), n === R.TYPE && N(L, {
|
|
467
467
|
value: o,
|
|
468
468
|
onChange: s,
|
|
469
469
|
onBeforeChange: l,
|
|
@@ -471,7 +471,7 @@ const Ut = (e) => {
|
|
|
471
471
|
readOnly: c,
|
|
472
472
|
onBlur: u,
|
|
473
473
|
onFocus: d
|
|
474
|
-
}), (n ===
|
|
474
|
+
}), (n === R.UPLOAD || n === R.IMAGE) && N(g, {
|
|
475
475
|
value: o,
|
|
476
476
|
onChange: s,
|
|
477
477
|
onBeforeChange: l,
|
|
@@ -481,7 +481,7 @@ const Ut = (e) => {
|
|
|
481
481
|
onFocus: d
|
|
482
482
|
}));
|
|
483
483
|
}, Yt = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
|
|
484
|
-
const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = W(), g = ce(), p = V(), E = V(), h = V(null),
|
|
484
|
+
const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = W(), g = ce(), p = V(), E = V(), h = V(null), S = o == null ? void 0 : o.url, [q, P] = X(!1);
|
|
485
485
|
Ie(() => {
|
|
486
486
|
var y;
|
|
487
487
|
(y = E.current) == null || y.focus({
|
|
@@ -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
|
|
@@ -517,20 +517,20 @@ const Ut = (e) => {
|
|
|
517
517
|
if (E.current = y, p.current = new _e(y, {
|
|
518
518
|
...v,
|
|
519
519
|
penColor: getComputedStyle(y).color || void 0
|
|
520
|
-
}), Ee(E.current, p.current),
|
|
521
|
-
const Z = ve(
|
|
520
|
+
}), Ee(E.current, p.current), S) {
|
|
521
|
+
const Z = ve(S);
|
|
522
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
|
-
|
|
533
|
-
|
|
532
|
+
S,
|
|
533
|
+
G,
|
|
534
534
|
$
|
|
535
535
|
]);
|
|
536
536
|
return le(() => {
|
|
@@ -546,7 +546,7 @@ const Ut = (e) => {
|
|
|
546
546
|
id: m,
|
|
547
547
|
"data-hook": "signature-canvas",
|
|
548
548
|
"data-input-id": m,
|
|
549
|
-
"data-has-value": !!
|
|
549
|
+
"data-has-value": !!S,
|
|
550
550
|
onFocus: d,
|
|
551
551
|
onBlur: u,
|
|
552
552
|
role: "img",
|
|
@@ -554,7 +554,7 @@ const Ut = (e) => {
|
|
|
554
554
|
"aria-describedby": L
|
|
555
555
|
}));
|
|
556
556
|
}, de = ({ children: e, className: t, ...a }) => {
|
|
557
|
-
const { value: n, onChange: o, onBeforeChange: s, disabled: l, readOnly: i, onBlur: c, onFocus: u } = a, { id: d, required: f, hasError: m } = x(), { inputId: L, ariaDescribedBy: g, labelId: p } = W(), E = ce(), h = n != null && n.url ? Y(n.url) : void 0, { data:
|
|
557
|
+
const { value: n, onChange: o, onBeforeChange: s, disabled: l, readOnly: i, onBlur: c, onFocus: u } = a, { id: d, required: f, hasError: m } = x(), { inputId: L, ariaDescribedBy: g, labelId: p } = W(), E = ce(), h = n != null && n.url ? Y(n.url) : void 0, { data: S = "" } = h ?? {
|
|
558
558
|
data: ""
|
|
559
559
|
};
|
|
560
560
|
Ie(() => {
|
|
@@ -572,9 +572,9 @@ const Ut = (e) => {
|
|
|
572
572
|
L
|
|
573
573
|
]);
|
|
574
574
|
const q = _((v) => {
|
|
575
|
-
s == null || s(), v.trim() ? o(ie(
|
|
575
|
+
s == null || s(), v.trim() ? o(ie(Se({
|
|
576
576
|
data: v,
|
|
577
|
-
mimeType:
|
|
577
|
+
mimeType: A.TEXT
|
|
578
578
|
}))) : o(null);
|
|
579
579
|
}, [
|
|
580
580
|
s,
|
|
@@ -582,7 +582,7 @@ const Ut = (e) => {
|
|
|
582
582
|
]), P = I(e, de.Value);
|
|
583
583
|
return /* @__PURE__ */ r.createElement(nt, {
|
|
584
584
|
"aria-labelledby": p,
|
|
585
|
-
value:
|
|
585
|
+
value: S,
|
|
586
586
|
onChange: q,
|
|
587
587
|
onBlur: c,
|
|
588
588
|
onFocus: u,
|
|
@@ -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,
|
|
@@ -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
716
|
se.Text = Zt;
|
|
717
|
-
const
|
|
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,9 +793,9 @@ 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,
|
|
@@ -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, {
|
|
@@ -910,10 +910,10 @@ const Gt = () => {
|
|
|
910
910
|
}, p.svg ? /* @__PURE__ */ r.createElement(we, {
|
|
911
911
|
...p,
|
|
912
912
|
ref: h,
|
|
913
|
-
className: F(Ze,
|
|
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
|
-
[fe.hover]: n && (
|
|
916
|
+
[fe.hover]: n && (S || P)
|
|
917
917
|
})
|
|
918
918
|
}, e.uploadLabel))))), /* @__PURE__ */ r.createElement(b.Error, {
|
|
919
919
|
className: F(Ve, ae.error)
|