@wix/form-elements 1.143.0 → 1.145.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-BAwonF75.js → appointment-rac-De-uH9rz.js} +93 -93
- package/dist/component/{bookings-address-rac-xhj2n7jK.js → bookings-address-rac-DB6QCMQJ.js} +1 -1
- package/dist/component/{bookings-email-rac-BGjeAwgm.js → bookings-email-rac-g6ZdB_BO.js} +1 -1
- package/dist/component/{bookings-first-name-rac-l392yYAU.js → bookings-first-name-rac-DQgL_VHl.js} +1 -1
- package/dist/component/{bookings-header-rac-JwIo7hsJ.js → bookings-header-rac-DAnIm-Oq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CJp81BPl.js → bookings-last-name-rac-D62jNdDb.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BiPklGE_.js → bookings-login-bar-rac-5z8HfBhU.js} +1 -1
- package/dist/component/{bookings-phone-rac-mQfDJGkK.js → bookings-phone-rac-D0gu-_wy.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BOfHn2EU.js → bookings-rich-text-rac-b4J1HcdI.js} +1 -1
- package/dist/component/{checkbox-field-rac-CA6SeM0c.js → checkbox-field-rac-CmRRc9Dz.js} +83 -83
- package/dist/component/{checkbox-group-field-headless-ChLT0zKA.js → checkbox-group-field-headless-CB8yAfMe.js} +61 -61
- package/dist/component/{checkbox-group-field-rac-_Fkre79S.js → checkbox-group-field-rac-C5gRZRTd.js} +4 -4
- package/dist/component/{checkbox-group-rac-esBLJZ6Y.js → checkbox-group-rac-DNDF1Irh.js} +1 -1
- package/dist/component/{checkbox-rac-C3vXtbJh.js → checkbox-rac-B9vztGBU.js} +1 -1
- package/dist/component/{contacts-address-rac-BuBBBt19.js → contacts-address-rac-CKZeSncj.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BMBJeVOK.js → contacts-birthdate-rac-BbpNNQgF.js} +1 -1
- package/dist/component/{contacts-company-rac-CZl168-E.js → contacts-company-rac-BX2KT201.js} +1 -1
- package/dist/component/{contacts-email-rac-CJgVzCns.js → contacts-email-rac-5Irzx1mA.js} +1 -1
- package/dist/component/{contacts-first-name-rac-9ZNYKQeb.js → contacts-first-name-rac-CxKp8_2u.js} +1 -1
- package/dist/component/{contacts-last-name-rac-KgylQwHW.js → contacts-last-name-rac-BDCbSv5I.js} +1 -1
- package/dist/component/{contacts-phone-rac-DYr30FLP.js → contacts-phone-rac-BM_PV_uH.js} +1 -1
- package/dist/component/{contacts-position-rac-B9BZZ3K9.js → contacts-position-rac-1aqthQSi.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DOQb2GLm.js → contacts-subscribe-rac-CdqXs4kp.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-cYE1ehXN.js → contacts-tax-id-rac-BKHpcDb6.js} +1 -1
- package/dist/component/{date-availability-BOKvA8w-.js → date-availability-DmFFTX8p.js} +1 -1
- package/dist/component/{date-input-field-rac-BwY53gNr.js → date-input-field-rac-BnlAOn12.js} +45 -45
- package/dist/component/{date-input-rac-Cgg4QJbB.js → date-input-rac-BB6qZ16w.js} +1 -1
- package/dist/component/{date-picker-field-rac-0Ue6uiCM.js → date-picker-field-rac-Ckwu2vD6.js} +11 -11
- package/dist/component/{date-picker-rac-CgICj33f.js → date-picker-rac-DSqzUAaH.js} +1 -1
- package/dist/component/{date-time-input-field-rac-ChRCMk7_.js → date-time-input-field-rac-DO-iRdkW.js} +21 -21
- package/dist/component/{date-time-input-rac-B8tRZrri.js → date-time-input-rac-smVCCxdY.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B_qjx1QD.js → dext-checkbox-group-rac-B8bx3rT2.js} +4 -4
- package/dist/component/{dext-checkbox-rac-Bw9SyhHA.js → dext-checkbox-rac-x8VLGRbc.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Bzn28zNq.js → dext-date-picker-rac-D2a9NXap.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-7Cuk3PoA.js → dext-date-time-input-rac-Cp5XjpGv.js} +1 -1
- package/dist/component/{dext-dropdown-rac-Md1VI5pc.js → dext-dropdown-rac-nWgEvyxt.js} +1 -1
- package/dist/component/{dext-email-rac-DbHwHGKz.js → dext-email-rac-CkX6ya8p.js} +1 -1
- package/dist/component/{dext-number-input-rac-DIVk3zXL.js → dext-number-input-rac-CKT0MS1x.js} +1 -1
- package/dist/component/{dext-phone-rac-ZIya63UJ.js → dext-phone-rac-DM2E7zW_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DV1xHkOD.js → dext-radio-group-rac-Czr5yY3K.js} +4 -4
- package/dist/component/{dext-rating-input-rac-YRIYgeT4.js → dext-rating-input-rac-CKWNpFuu.js} +1 -1
- package/dist/component/{dext-tags-rac-DTJ6Pz_x.js → dext-tags-rac-6AskGGTp.js} +4 -4
- package/dist/component/{dext-text-area-rac-V-d9i95A.js → dext-text-area-rac-ClGLD7sD.js} +1 -1
- package/dist/component/{dext-text-input-rac-ccrundX-.js → dext-text-input-rac-Blbk53d4.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bd5SZ2U4.js → dext-url-input-rac-BuitmJU0.js} +1 -1
- package/dist/component/{donation-rac-BFmpW-3b.js → donation-rac-DOifFCD7.js} +52 -52
- package/dist/component/{dropdown-field-headless-C2qgeReH.js → dropdown-field-headless-m2P6s7X5.js} +22 -22
- package/dist/component/{dropdown-field-rac-Bj1YSgpT.js → dropdown-field-rac-5e6wWJBl.js} +4 -4
- package/dist/component/{dropdown-rac-DfdvX5I5.js → dropdown-rac-BGxE9pJB.js} +1 -1
- package/dist/component/{ecom-address-rac-DOWNQhhX.js → ecom-address-rac-kbD9qW5Y.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-2ELdC1ql.js → ecom-subscription-checkbox-rac-CE-Yixnj.js} +5 -5
- package/dist/component/{email-input-field-rac-CY0U6vEM.js → email-input-field-rac-CbwcB33o.js} +46 -46
- package/dist/component/{events-repeater-rac-C2oo_RZt.js → events-repeater-rac-CGhUscBr.js} +4 -4
- package/dist/component/{events-rsvp-rac-BrimIo0r.js → events-rsvp-rac-AQ33zPTe.js} +3 -3
- package/dist/component/{field-error-headless-r0fX50xw.js → field-error-headless-ClPQ03Jc.js} +9 -9
- package/dist/component/field-label-headless-DhN8Lkuq.js +52 -0
- package/dist/component/{file-upload-rac-Beb2BcFK.js → file-upload-rac-yTx1ZRhZ.js} +53 -53
- package/dist/component/{fixed-payment-rac-DGFWYMZG.js → fixed-payment-rac-nlyxa9nB.js} +12 -12
- package/dist/component/{form-DtzwuBIo.js → form-D3iU18lh.js} +2386 -2352
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-CVmGSa0E.js → header-field-rac-DAEzcleV.js} +4 -4
- package/dist/component/{header-rac-C3AEJmYN.js → header-rac-CJZ4qMFg.js} +1 -1
- package/dist/component/{image-choice-rac-Ch-mxLgP.js → image-choice-rac-BFAMHwPh.js} +10 -10
- package/dist/component/{index-CTn6AQ3A.js → index-DQW26cnX.js} +2 -2
- package/dist/component/{index-CmqLlW8X.js → index-W7GOFnq8.js} +43 -43
- package/dist/component/{isObjectLike-iyypwAQL.js → isObjectLike-CE8eaxSI.js} +7 -7
- package/dist/component/{multiline-address-field-rac-DJXcb6NG.js → multiline-address-field-rac-FbJO0HFf.js} +94 -94
- package/dist/component/{multiline-address-rac-DcZgTx1c.js → multiline-address-rac-CI-vt6Pm.js} +1 -1
- package/dist/component/{number-input-field-rac-W3TqQGhC.js → number-input-field-rac-BRVAr7LL.js} +21 -21
- package/dist/component/{number-input-rac-CdXigsba.js → number-input-rac-C8hCiJiu.js} +1 -1
- package/dist/component/{password-rac-Dph6984u.js → password-rac-Baslr6Ga.js} +7 -7
- package/dist/component/{payment-input-rac-D5ARk1lF.js → payment-input-rac-CfJSKxYz.js} +17 -17
- package/dist/component/{phone-input-field-rac-BUfe-B2i.js → phone-input-field-rac-Dqh4CXdC.js} +24 -24
- package/dist/component/{phone-rac-DTiWT1uy.js → phone-rac-DaLuGuxd.js} +1 -1
- package/dist/component/{product-list-rac-1_Q2JYwH.js → product-list-rac-PNMwRBtL.js} +31 -31
- package/dist/component/{quiz-radio-group-rac-iyBhi0wJ.js → quiz-radio-group-rac-DN8vY-oM.js} +1 -1
- package/dist/component/{radio-button-module-classes-DwfobXBe.js → radio-button-module-classes-DlJi9a2f.js} +11 -11
- package/dist/component/{radio-group-field-rac-BkKNVwMi.js → radio-group-field-rac-C0tLXhl5.js} +4 -4
- package/dist/component/{radio-group-rac-CH0nkJ8V.js → radio-group-rac-FAk7PYgP.js} +1 -1
- package/dist/component/{rating-input-field-rac-CUUUlgZi.js → rating-input-field-rac-Cl1kH_uu.js} +12 -12
- package/dist/component/{rating-input-rac-8yEiqBR5.js → rating-input-rac-D9p-0pkI.js} +1 -1
- package/dist/component/{rich-content-rac.module-DeKU0pwh.js → rich-content-rac.module-Dkr46kPC.js} +3 -3
- package/dist/component/{rich-text-field-rac-Cwd-RWTi.js → rich-text-field-rac-DthhTvTp.js} +4 -4
- package/dist/component/{rich-text-rac-C5-jPNYP.js → rich-text-rac-DqZX4NeB.js} +1 -1
- package/dist/component/{service-dropdown-rac-DBGAnsut.js → service-dropdown-rac-BMOGLU2Z.js} +30 -30
- package/dist/component/{services-multi-choice-rac-CqEoGsuw.js → services-multi-choice-rac-DcdUewzJ.js} +5 -5
- package/dist/component/{signature-rac-Cq3y66Cr.js → signature-rac-BRvN6kUW.js} +37 -37
- package/dist/component/submit-button-rac-B70UC8eS.js +228 -0
- package/dist/component/{tags-field-rac-CpJ0O9f_.js → tags-field-rac-NpYyV8X4.js} +16 -16
- package/dist/component/{tags-rac-BPjw67Po.js → tags-rac-BMEbpJ-z.js} +1 -1
- package/dist/component/{text-area-field-rac-BG6MJuIW.js → text-area-field-rac-BLSrNwJ6.js} +9 -9
- package/dist/component/{text-area-rac-BAS4F4VC.js → text-area-rac-Cm7aAfIz.js} +1 -1
- package/dist/component/{text-input-field-rac-BhMktcEd.js → text-input-field-rac-BDqV7s0M.js} +3 -3
- package/dist/component/{text-input-headless-Bpjd70nh.js → text-input-headless-B0jcwDev.js} +7 -7
- package/dist/component/{text-input-rac-Bj21XKGA.js → text-input-rac-Cc_SkCCS.js} +1 -1
- package/dist/component/{time-input-rac-DBpRHdnX.js → time-input-rac-DDCiAFe2.js} +33 -33
- package/dist/component/{url-input-field-rac-B_EMXVWh.js → url-input-field-rac-jen6pbz7.js} +24 -24
- package/dist/component/{url-input-rac-D0Ck-9KV.js → url-input-rac-BWh6udtS.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CkpHwC6t.js → use-dropdown-option-class-name-OD8brKoy.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-DmDwpAVn.js → use-dropdown-trigger-class-name-BrkmG0ad.js} +4 -4
- package/dist/component/{use-element-state-class-name-BrgdwHYP.js → use-element-state-class-name-B1r_nXW1.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-qVo45l-t.js → use-hoverable-input-class-name-B-FhrcyQ.js} +6 -6
- package/dist/component/{use-service-options-base-Dlqs4p0Z.js → use-service-options-base-CTA_43F3.js} +1 -1
- package/dist/component/use-text-input-class-name-BXuk3TK7.js +6 -0
- package/dist/form.d.ts +36 -0
- package/package.json +2 -2
- package/dist/component/field-label-headless-D-kCfg8j.js +0 -52
- package/dist/component/submit-button-rac-CKM7yUL4.js +0 -172
- package/dist/component/use-text-input-class-name-CP2VJOso.js +0 -6
package/dist/component/{rating-input-field-rac-CUUUlgZi.js → rating-input-field-rac-Cl1kH_uu.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as y } from "@wix/ricos/viewer";
|
|
2
2
|
import u from "classnames";
|
|
3
3
|
import e, { useCallback as N, useState as O, useRef as A } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { RadioGroup as
|
|
4
|
+
import { bn as I, bk as v, bx as T, R as H, $ as M, Z as w, G as B, u as P, _ as G } from "./form-D3iU18lh.js";
|
|
5
|
+
import { RadioGroup as k, RadioField as q, RadioButton as x } from "react-aria-components";
|
|
6
6
|
import { f as E, a as U } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Z, E as
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
7
|
+
import { D as Z, E as z } from "./field-error-headless-ClPQ03Jc.js";
|
|
8
|
+
import { L as Q } from "./field-label-headless-DhN8Lkuq.js";
|
|
9
|
+
import { E as $ } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as g } from "./field-rac.module-DfEb7pBp.js";
|
|
11
|
-
import { u as
|
|
11
|
+
import { u as j } from "./use-element-state-class-name-B1r_nXW1.js";
|
|
12
12
|
const t = ({ children: a }) => {
|
|
13
13
|
const { id: n, value: r, onChange: i, disabled: l, readOnly: m, required: d, hasError: c, onBlur: o, onFocus: R, FieldLayout: C } = I(), { labelId: _ } = v(), L = N((D) => i(Number(D)), [
|
|
14
14
|
i
|
|
@@ -16,7 +16,7 @@ const t = ({ children: a }) => {
|
|
|
16
16
|
return /* @__PURE__ */ e.createElement(C, {
|
|
17
17
|
fieldId: n,
|
|
18
18
|
renderLabel: () => f,
|
|
19
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
19
|
+
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
20
20
|
"aria-labelledby": _,
|
|
21
21
|
value: r ? String(r) : void 0,
|
|
22
22
|
onChange: L,
|
|
@@ -64,7 +64,7 @@ const t = ({ children: a }) => {
|
|
|
64
64
|
whiteSpace: "nowrap"
|
|
65
65
|
}, F = ({ className: a, children: n, ...r }) => {
|
|
66
66
|
const { value: i, isSelected: l, onHoverChange: m, label: d } = r;
|
|
67
|
-
return /* @__PURE__ */ e.createElement(
|
|
67
|
+
return /* @__PURE__ */ e.createElement(q, {
|
|
68
68
|
value: i
|
|
69
69
|
}, /* @__PURE__ */ e.createElement(x, {
|
|
70
70
|
className: ({ isHovered: c, isFocused: o }) => typeof a == "function" ? a({
|
|
@@ -83,11 +83,11 @@ const t = ({ children: a }) => {
|
|
|
83
83
|
}, d) : null)));
|
|
84
84
|
};
|
|
85
85
|
b.Rating = F;
|
|
86
|
-
t.Label =
|
|
86
|
+
t.Label = Q;
|
|
87
87
|
t.Ratings = b;
|
|
88
88
|
t.Rating = F;
|
|
89
89
|
t.Description = Z;
|
|
90
|
-
t.Error =
|
|
90
|
+
t.Error = z;
|
|
91
91
|
const K = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
92
92
|
viewBox: "0 0 32 32",
|
|
93
93
|
width: 32,
|
|
@@ -111,7 +111,7 @@ const K = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
111
111
|
selected: p.ratingSelected,
|
|
112
112
|
hover: p.ratingHover
|
|
113
113
|
}, Ee = () => {
|
|
114
|
-
const { t: a } = T(), n =
|
|
114
|
+
const { t: a } = T(), n = j({
|
|
115
115
|
globalClasses: G,
|
|
116
116
|
moduleClasses: te
|
|
117
117
|
});
|
|
@@ -128,7 +128,7 @@ const K = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
128
128
|
className: n
|
|
129
129
|
}, /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
130
130
|
className: u(B, g.error)
|
|
131
|
-
}, /* @__PURE__ */ e.createElement(
|
|
131
|
+
}, /* @__PURE__ */ e.createElement($, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
132
132
|
className: u(P, g.description)
|
|
133
133
|
}, ee));
|
|
134
134
|
};
|
package/dist/component/{rich-content-rac.module-DeKU0pwh.js → rich-content-rac.module-Dkr46kPC.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { bn as a, bf as i, bx as T } from "./form-D3iU18lh.js";
|
|
3
3
|
import { Button as d } from "react-aria-components";
|
|
4
4
|
import { D as r } from "./data-hooks-Dkw1pbRj.js";
|
|
5
5
|
import { truncateRichContent as _ } from "@wix/ricos/content";
|
|
@@ -38,8 +38,8 @@ function B(e, t) {
|
|
|
38
38
|
toggleTruncate: s
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
richContent:
|
|
41
|
+
const C = "_richContent_1galb_1", D = {
|
|
42
|
+
richContent: C
|
|
43
43
|
};
|
|
44
44
|
export {
|
|
45
45
|
O as R,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import l from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-
|
|
3
|
+
import { bn as i, aA as m, ai as u, a_ as R, b1 as T } from "./form-D3iU18lh.js";
|
|
4
|
+
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-Dkr46kPC.js";
|
|
5
5
|
const h = {
|
|
6
6
|
colorPalette: T(),
|
|
7
7
|
customStyles: R()
|
|
8
8
|
}, P = ({ truncate: t = !0 } = {}) => {
|
|
9
|
-
const { content: a, maxShownParagraphs: s } =
|
|
10
|
-
return /* @__PURE__ */ e.createElement(d, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
9
|
+
const { content: a, maxShownParagraphs: s } = i(), { displayedContent: n, isTruncated: o, isTruncateButtonShown: r, toggleTruncate: c } = C(a, t ? s : void 0);
|
|
10
|
+
return /* @__PURE__ */ e.createElement(d, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(m, {
|
|
11
11
|
className: l(u, g.richContent),
|
|
12
12
|
content: n,
|
|
13
13
|
customTheme: h
|
package/dist/component/{service-dropdown-rac-DBGAnsut.js → service-dropdown-rac-BMOGLU2Z.js}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t, { useRef as T, useMemo as _, useCallback as C, useEffect as b } from "react";
|
|
2
2
|
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
3
|
import E from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { u as B } from "./use-service-options-base-
|
|
6
|
-
import { D as u } from "./dropdown-field-headless-
|
|
4
|
+
import { bj as P, bx as A, F as M, bn as y, bf as x, ap as V, R as H, $ as U, x as W, G as k, u as q } from "./form-D3iU18lh.js";
|
|
5
|
+
import { u as B } from "./use-service-options-base-CTA_43F3.js";
|
|
6
|
+
import { D as u } from "./dropdown-field-headless-m2P6s7X5.js";
|
|
7
7
|
import { C as j } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
8
|
import { E as G } from "./error-icon-hZxQ6DEy.js";
|
|
9
9
|
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
10
10
|
import { s as a } from "./field-rac.module-DfEb7pBp.js";
|
|
11
|
-
import { u as Y } from "./use-dropdown-option-class-name-
|
|
12
|
-
import { u as $ } from "./use-dropdown-trigger-class-name-
|
|
11
|
+
import { u as Y } from "./use-dropdown-option-class-name-OD8brKoy.js";
|
|
12
|
+
import { u as $ } from "./use-dropdown-trigger-class-name-BrkmG0ad.js";
|
|
13
13
|
const z = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
14
|
-
const { actions:
|
|
14
|
+
const { actions: o } = P(), { t: D } = A(), { addOther: n, addOtherLabel: p } = e, c = p || D("add-other.default-other-option-label"), i = T(!0), d = _(() => {
|
|
15
15
|
var s;
|
|
16
16
|
return ((s = e.options) == null ? void 0 : s.map((m) => m.id ?? "")) ?? [];
|
|
17
17
|
}, [
|
|
@@ -31,11 +31,11 @@ const z = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
31
31
|
isEditor: e.isEditor,
|
|
32
32
|
postProcessOptions: O
|
|
33
33
|
}), L = C(async () => {
|
|
34
|
-
if (i.current && (
|
|
34
|
+
if (i.current && (o != null && o.fetchServices) && d.length > 0) {
|
|
35
35
|
i.current = !1, S(!0);
|
|
36
36
|
let s;
|
|
37
37
|
try {
|
|
38
|
-
s = await
|
|
38
|
+
s = await o.fetchServices({
|
|
39
39
|
serviceIds: d
|
|
40
40
|
});
|
|
41
41
|
} catch (m) {
|
|
@@ -49,7 +49,7 @@ const z = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
49
49
|
S(!1);
|
|
50
50
|
}
|
|
51
51
|
}, [
|
|
52
|
-
|
|
52
|
+
o,
|
|
53
53
|
d,
|
|
54
54
|
F,
|
|
55
55
|
n,
|
|
@@ -57,7 +57,7 @@ const z = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
57
57
|
R,
|
|
58
58
|
g
|
|
59
59
|
]);
|
|
60
|
-
|
|
60
|
+
b(() => {
|
|
61
61
|
if (!e.isEditor && l.length > 0) {
|
|
62
62
|
const s = n ? l.length - 1 : l.length;
|
|
63
63
|
g(s === 0);
|
|
@@ -91,56 +91,56 @@ const z = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
91
91
|
shouldRender: I
|
|
92
92
|
};
|
|
93
93
|
}, r = ({ children: e }) => {
|
|
94
|
-
const
|
|
95
|
-
...
|
|
94
|
+
const o = y(), { addOther: D } = o, n = x(), p = o.isEditor || n.isEditor || n.isComposer, { isLoading: c, options: i, isEmpty: d, onFocus: O, onChange: f, shouldRender: l } = J({
|
|
95
|
+
...o,
|
|
96
96
|
isEditor: p
|
|
97
97
|
}), h = _(() => ({
|
|
98
|
-
...
|
|
98
|
+
...o,
|
|
99
99
|
options: c ? [] : i,
|
|
100
100
|
isLoading: c,
|
|
101
101
|
onFocus: O,
|
|
102
102
|
onChange: f
|
|
103
103
|
}), [
|
|
104
|
-
|
|
104
|
+
o,
|
|
105
105
|
i,
|
|
106
106
|
c,
|
|
107
107
|
O,
|
|
108
108
|
f
|
|
109
109
|
]);
|
|
110
|
-
return !p && d && !D || !l ? null : /* @__PURE__ */
|
|
110
|
+
return !p && d && !D || !l ? null : /* @__PURE__ */ t.createElement(V.Provider, {
|
|
111
111
|
value: {
|
|
112
112
|
v2: h
|
|
113
113
|
}
|
|
114
|
-
}, /* @__PURE__ */
|
|
114
|
+
}, /* @__PURE__ */ t.createElement(u, null, e));
|
|
115
115
|
};
|
|
116
116
|
r.Label = u.Label;
|
|
117
117
|
r.Trigger = u.Trigger;
|
|
118
118
|
r.Options = u.Options;
|
|
119
119
|
r.Description = u.Description;
|
|
120
120
|
r.Error = u.Error;
|
|
121
|
-
const K = ({ content: e, locale:
|
|
121
|
+
const K = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(w, {
|
|
122
122
|
content: e,
|
|
123
|
-
locale:
|
|
123
|
+
locale: o
|
|
124
124
|
}), X = () => {
|
|
125
|
-
const e = $(a.dropdownTrigger),
|
|
126
|
-
return /* @__PURE__ */
|
|
125
|
+
const e = $(a.dropdownTrigger), o = Y(Q);
|
|
126
|
+
return /* @__PURE__ */ t.createElement(r, null, /* @__PURE__ */ t.createElement(r.Label, {
|
|
127
127
|
className: E(H, a.label)
|
|
128
|
-
}, /* @__PURE__ */
|
|
128
|
+
}, /* @__PURE__ */ t.createElement(r.Label.Required, {
|
|
129
129
|
className: E(U, a.requiredMark)
|
|
130
|
-
})), /* @__PURE__ */
|
|
130
|
+
})), /* @__PURE__ */ t.createElement(r.Trigger, {
|
|
131
131
|
className: e
|
|
132
|
-
}, /* @__PURE__ */
|
|
132
|
+
}, /* @__PURE__ */ t.createElement(j, {
|
|
133
133
|
className: a.dropdownIcon
|
|
134
|
-
})), /* @__PURE__ */
|
|
134
|
+
})), /* @__PURE__ */ t.createElement(r.Options, {
|
|
135
135
|
className: E(W, a.selectPopover, a.dropdownPopover)
|
|
136
|
-
}, /* @__PURE__ */
|
|
137
|
-
className:
|
|
138
|
-
})), /* @__PURE__ */
|
|
136
|
+
}, /* @__PURE__ */ t.createElement(r.Options.Option, {
|
|
137
|
+
className: o
|
|
138
|
+
})), /* @__PURE__ */ t.createElement(r.Error, {
|
|
139
139
|
className: E(k, a.error)
|
|
140
|
-
}, /* @__PURE__ */
|
|
140
|
+
}, /* @__PURE__ */ t.createElement(G, null), /* @__PURE__ */ t.createElement(r.Error.Text, null)), /* @__PURE__ */ t.createElement(r.Description, {
|
|
141
141
|
className: E(q, a.description)
|
|
142
142
|
}, K));
|
|
143
|
-
}, ue = () => /* @__PURE__ */
|
|
143
|
+
}, ue = () => /* @__PURE__ */ t.createElement(X, null);
|
|
144
144
|
export {
|
|
145
145
|
ue as ServiceDropdownRAC
|
|
146
146
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useEffect as I, useMemo as L } from "react";
|
|
2
2
|
import { RicosViewer as R } from "@wix/ricos/viewer";
|
|
3
3
|
import a from "classnames";
|
|
4
|
-
import { F as S,
|
|
5
|
-
import { u as v } from "./use-service-options-base-
|
|
6
|
-
import { C as i } from "./checkbox-group-field-headless-
|
|
4
|
+
import { F as S, bn as d, ap as D, R as F, $ as N, o as f, q as h, G as b, u as M, p as A } from "./form-D3iU18lh.js";
|
|
5
|
+
import { u as v } from "./use-service-options-base-CTA_43F3.js";
|
|
6
|
+
import { C as i } from "./checkbox-group-field-headless-CB8yAfMe.js";
|
|
7
7
|
import { E as x } from "./error-icon-hZxQ6DEy.js";
|
|
8
8
|
import { C as P } from "./checkbox-indicator-module-classes-6173wvuW.js";
|
|
9
9
|
import { s as n } from "./field-rac.module-DfEb7pBp.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-B1r_nXW1.js";
|
|
12
|
+
import { u as k } from "./use-text-input-class-name-BXuk3TK7.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({
|
|
@@ -2,17 +2,17 @@ import s, { useRef as $, useContext as Ae, 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 {
|
|
5
|
+
import { aR as Ue, bh as Te, at as Be, F as Oe, bj as Pe, bf as Me, bv as ye, E as me, aj as oe, bn as x, bk as W, bp as Ce, bx as He, bg as We, R as Ye, $ as Ze, a1 as ke, u as pe, b as Ge, a6 as Ve, a7 as fe, G as $e, a0 as ze, a4 as Xe, a2 as qe, a5 as je, f as ne, a3 as Je } from "./form-D3iU18lh.js";
|
|
6
6
|
import { useHover as Ke, useFocusRing as Qe, mergeProps as et } from "react-aria";
|
|
7
7
|
import { RadioGroup as tt, Button as Ie, TextField as nt, DropZone as at, Input as ot, FileTrigger as rt, RadioField as st, RadioButton as lt } from "react-aria-components";
|
|
8
8
|
import _e from "signature_pad";
|
|
9
9
|
import { f as C, a as A } 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-ClPQ03Jc.js";
|
|
11
|
+
import { L as ut } from "./field-label-headless-DhN8Lkuq.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-DfEb7pBp.js";
|
|
15
|
-
import { u as X } from "./use-element-state-class-name-
|
|
15
|
+
import { u as X } from "./use-element-state-class-name-B1r_nXW1.js";
|
|
16
16
|
const pt = typeof s.useId == "function" ? s.useId : () => $(Ue()).current, ft = ({ properties: e }) => e.uploadEnabled === !0, Et = (e, t) => e.fieldType === Oe.SIGNATURE && !e.properties.hidden && !e.properties.disabled && !e.properties.readOnly && (t !== "upload" || ft(e)), gt = (e, t) => e.layout.row - t.layout.row || e.layout.column - t.layout.column, ht = (e) => {
|
|
17
17
|
var o;
|
|
18
18
|
const t = (o = Te().signatureContainer) == null ? void 0 : o.signatureMode, a = Ae(Be);
|
|
@@ -24,11 +24,11 @@ const pt = typeof s.useId == "function" ? s.useId : () => $(Ue()).current, ft =
|
|
|
24
24
|
t
|
|
25
25
|
]) === e ? t : void 0;
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var R = /* @__PURE__ */ (function(e) {
|
|
28
28
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
29
29
|
})({}), y = /* @__PURE__ */ (function(e) {
|
|
30
30
|
return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
|
|
31
|
-
})({}),
|
|
31
|
+
})({}), N = /* @__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) => {
|
|
@@ -114,10 +114,10 @@ function ge(e, t) {
|
|
|
114
114
|
}
|
|
115
115
|
const V = 480, It = (e) => Se({
|
|
116
116
|
data: JSON.stringify(e),
|
|
117
|
-
mimeType:
|
|
117
|
+
mimeType: R.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) === R.POINTS)
|
|
121
121
|
try {
|
|
122
122
|
return JSON.parse(t.data);
|
|
123
123
|
} catch {
|
|
@@ -125,7 +125,7 @@ const V = 480, It = (e) => Se({
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}, he = 0.8, De = "Madefor";
|
|
128
|
-
function
|
|
128
|
+
function Re(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 Ne(e, t) {
|
|
|
136
136
|
function _t(e, t) {
|
|
137
137
|
const a = t.getContext("2d"), n = t.offsetWidth || t.width, r = (t.offsetHeight || t.height) * he, l = n * he;
|
|
138
138
|
a.font = `${r}px ${De}`;
|
|
139
|
-
const { width: i, height: c } =
|
|
139
|
+
const { width: i, height: c } = Re(e, a), u = r / (i / l), d = r / (c / r);
|
|
140
140
|
return Math.min(u, d);
|
|
141
141
|
}
|
|
142
142
|
function vt(e, t, a = "black", n = !1, o) {
|
|
143
143
|
const r = e.getContext("2d"), l = _t(t, e);
|
|
144
144
|
r.font = `${l}px ${De}`, r.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 } = Re(t, r);
|
|
146
146
|
r.fillStyle = o, r.fillRect(0, 0, i, c), r.fillStyle = a;
|
|
147
147
|
const m = (i - u) / 2;
|
|
148
148
|
r.fillText(t, n ? i - m : m, (c - d) / 2 + f);
|
|
149
149
|
}
|
|
150
|
-
const
|
|
150
|
+
const Ne = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
|
|
151
151
|
function Dt(e) {
|
|
152
|
-
return
|
|
152
|
+
return Ne.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(Ne);
|
|
158
158
|
if (!t)
|
|
159
159
|
return;
|
|
160
160
|
const [, a, n, o] = t;
|
|
@@ -168,7 +168,7 @@ 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 Rt(e, t) {
|
|
172
172
|
const a = Y(e);
|
|
173
173
|
if (!a)
|
|
174
174
|
return;
|
|
@@ -192,18 +192,18 @@ function ie(e, t = "temp") {
|
|
|
192
192
|
fileType: (a == null ? void 0 : a.mimeType) ?? ""
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
async function
|
|
195
|
+
async function Nt(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 ===
|
|
200
|
+
if (n === R.TEXT) {
|
|
201
201
|
const o = j(V * 20, V, 1);
|
|
202
202
|
vt(o, a.data, "black", t, "white");
|
|
203
203
|
const r = se(o, "white");
|
|
204
204
|
return (r == null ? void 0 : r.toDataURL("image/jpeg", 0.7)) ?? null;
|
|
205
205
|
}
|
|
206
|
-
if (n ===
|
|
206
|
+
if (n === R.POINTS) {
|
|
207
207
|
const o = ve(e);
|
|
208
208
|
if (!o)
|
|
209
209
|
return null;
|
|
@@ -222,9 +222,9 @@ async function Rt(e, t) {
|
|
|
222
222
|
return e;
|
|
223
223
|
}
|
|
224
224
|
async function St(e, t) {
|
|
225
|
-
const a = await
|
|
225
|
+
const a = await Nt(e, t);
|
|
226
226
|
if (a)
|
|
227
|
-
return
|
|
227
|
+
return Rt(a, "signature");
|
|
228
228
|
}
|
|
229
229
|
const At = ({ value: e, onChange: t, target: a }) => {
|
|
230
230
|
const [n, o] = q(e), { isRTL: r } = Me(), l = bt(a), { setFormStatus: i } = ye(), c = $();
|
|
@@ -286,9 +286,9 @@ const At = ({ value: e, onChange: t, target: a }) => {
|
|
|
286
286
|
if (r == null)
|
|
287
287
|
return y.DRAW;
|
|
288
288
|
switch (l == null ? void 0 : l.mimeType) {
|
|
289
|
-
case
|
|
289
|
+
case R.POINTS:
|
|
290
290
|
return y.DRAW;
|
|
291
|
-
case
|
|
291
|
+
case R.TEXT:
|
|
292
292
|
return y.TYPE;
|
|
293
293
|
default:
|
|
294
294
|
return y.UPLOAD;
|
|
@@ -309,13 +309,13 @@ const At = ({ value: e, onChange: t, target: a }) => {
|
|
|
309
309
|
]), m = r != null, L = xt(i, r, l), h = (() => {
|
|
310
310
|
switch (i) {
|
|
311
311
|
case y.DRAW:
|
|
312
|
-
return
|
|
312
|
+
return N.DRAW;
|
|
313
313
|
case y.TYPE:
|
|
314
|
-
return
|
|
314
|
+
return N.TYPE;
|
|
315
315
|
case y.UPLOAD:
|
|
316
|
-
return L != null ?
|
|
316
|
+
return L != null ? N.IMAGE : N.UPLOAD;
|
|
317
317
|
default:
|
|
318
|
-
return
|
|
318
|
+
return N.DRAW;
|
|
319
319
|
}
|
|
320
320
|
})();
|
|
321
321
|
return {
|
|
@@ -331,16 +331,16 @@ const At = ({ value: e, onChange: t, target: a }) => {
|
|
|
331
331
|
handleClear: f
|
|
332
332
|
};
|
|
333
333
|
}, wt = {
|
|
334
|
-
[y.DRAW]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
335
|
-
[y.TYPE]: (e) => (e == null ? void 0 : e.mimeType) ===
|
|
336
|
-
[y.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !==
|
|
334
|
+
[y.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === R.POINTS,
|
|
335
|
+
[y.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === R.TEXT,
|
|
336
|
+
[y.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== R.POINTS && (e == null ? void 0 : e.mimeType) !== R.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 !== R.POINTS && t.mimeType !== R.TEXT : !0;
|
|
344
344
|
}, ce = () => {
|
|
345
345
|
const { hoverProps: e, isHovered: t } = Ke({}), { focusProps: a, isFocused: n, isFocusVisible: o } = Qe({
|
|
346
346
|
within: !0
|
|
@@ -360,9 +360,9 @@ const Ut = (e) => {
|
|
|
360
360
|
renderDescription: () => /* @__PURE__ */ s.createElement(s.Fragment, null, l, r)
|
|
361
361
|
});
|
|
362
362
|
}, Bt = {
|
|
363
|
-
[y.DRAW]:
|
|
364
|
-
[y.TYPE]:
|
|
365
|
-
[y.UPLOAD]:
|
|
363
|
+
[y.DRAW]: N.DRAW,
|
|
364
|
+
[y.TYPE]: N.TYPE,
|
|
365
|
+
[y.UPLOAD]: N.UPLOAD
|
|
366
366
|
}, J = ({ children: e, className: t }) => {
|
|
367
367
|
const { id: a, value: n, onChange: o, target: r, readOnly: l } = x(), i = ht(a), { signatureMode: c, setSignatureMode: u, handleClear: d, clearable: f, signatureView: m, signatureValueForView: L, handleChange: h, handleBeforeChange: p } = Ft({
|
|
368
368
|
target: r,
|
|
@@ -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 === N.DRAW && A(m, {
|
|
459
459
|
value: o,
|
|
460
460
|
onChange: r,
|
|
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 === N.TYPE && A(L, {
|
|
467
467
|
value: o,
|
|
468
468
|
onChange: r,
|
|
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 === N.UPLOAD || n === N.IMAGE) && A(h, {
|
|
475
475
|
value: o,
|
|
476
476
|
onChange: r,
|
|
477
477
|
onBeforeChange: l,
|
|
@@ -572,7 +572,7 @@ const Ut = (e) => {
|
|
|
572
572
|
const Z = _((v) => {
|
|
573
573
|
r == null || r(), v.trim() ? o(ie(Se({
|
|
574
574
|
data: v,
|
|
575
|
-
mimeType:
|
|
575
|
+
mimeType: R.TEXT
|
|
576
576
|
}))) : o(null);
|
|
577
577
|
}, [
|
|
578
578
|
r,
|