@wix/form-elements 1.161.0 → 1.163.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-BubC8I9X.js → appointment-rac-Cskf9hxi.js} +123 -123
- package/dist/component/{bookings-address-rac-BbwvVs86.js → bookings-address-rac-C18tuPai.js} +1 -1
- package/dist/component/{bookings-email-rac-C2HCkcfa.js → bookings-email-rac-C2GL3cJg.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Uy7c5EBs.js → bookings-first-name-rac-IEklnchg.js} +1 -1
- package/dist/component/{bookings-header-rac-nmwsWRjS.js → bookings-header-rac-iwcrj5Kj.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BAioQLCg.js → bookings-last-name-rac-CXZfq3Rw.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CO6vOBjG.js → bookings-login-bar-rac-DP0MBFTm.js} +6 -6
- package/dist/component/{bookings-phone-rac-Cr16h-_R.js → bookings-phone-rac-uJGk_tzr.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CHLH3jd7.js → bookings-rich-text-rac-BerRAnFy.js} +1 -1
- package/dist/component/{calendar.module-CKCBG_Pg.js → calendar.module-BMUyMVja.js} +19 -19
- package/dist/component/{checkbox-field-rac-CMwmwFMD.js → checkbox-field-rac-BBftIi_U.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-BNs_S-nT.js → checkbox-group-field-headless-BiQ4coe6.js} +27 -27
- package/dist/component/{checkbox-group-field-rac-BA60EPAN.js → checkbox-group-field-rac-moHc5Cyu.js} +6 -6
- package/dist/component/{checkbox-group-rac-BJZ4Oer9.js → checkbox-group-rac-iuPzxN7i.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-akWZsZNn.js → checkbox-indicator-module-classes-DUTR4mcg.js} +1 -1
- package/dist/component/{checkbox-rac-KsVlI6_V.js → checkbox-rac-BwfHAeFo.js} +1 -1
- package/dist/component/{contacts-address-rac-CRYkz87z.js → contacts-address-rac-DuyEL5YR.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BIz-1-ZX.js → contacts-birthdate-rac-Mkoplu3x.js} +1 -1
- package/dist/component/{contacts-company-rac-B8G__j6I.js → contacts-company-rac-B-3QghQg.js} +1 -1
- package/dist/component/{contacts-email-rac-Dztkvp5i.js → contacts-email-rac-CqooKQl8.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVSEWpLU.js → contacts-first-name-rac-CAOu0GIH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Blz4M5bk.js → contacts-last-name-rac-Cd-wCTC3.js} +1 -1
- package/dist/component/{contacts-phone-rac-CPCE5soY.js → contacts-phone-rac-OGE6eaJc.js} +1 -1
- package/dist/component/{contacts-position-rac-Dd_kBjqG.js → contacts-position-rac-eSsV63RC.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C6AlsP10.js → contacts-subscribe-rac-19d4uPR-.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CQ1n29zI.js → contacts-tax-id-rac-TtyrAftZ.js} +1 -1
- package/dist/component/{date-availability-DDj1j0z5.js → date-availability-CudIaav_.js} +1 -1
- package/dist/component/{date-input-field-rac-D5r1n_ah.js → date-input-field-rac-DzMiQLxS.js} +89 -89
- package/dist/component/{date-input-rac-Cyi5mU_P.js → date-input-rac-BWfmwcmK.js} +1 -1
- package/dist/component/{date-picker-field-rac-CeG391Zo.js → date-picker-field-rac-w4Wf-m0I.js} +54 -54
- package/dist/component/{date-picker-rac-Ci9aHgav.js → date-picker-rac-Bejo7tOm.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CrbYEbJJ.js → date-time-input-field-rac-D6JPrbGb.js} +80 -80
- package/dist/component/{date-time-input-rac-DDJLkqs0.js → date-time-input-rac-CAK5NgC4.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-C3ftVHBA.js → dext-checkbox-group-rac-BqoHMQwI.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BGLYWn68.js → dext-checkbox-rac-BEis8bxo.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Cy9RlDlt.js → dext-date-picker-rac-DDQTy3BG.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-88ZoTd5e.js → dext-date-time-input-rac-Dp3UEXEu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CPxDUuk9.js → dext-dropdown-rac-DisXIXNb.js} +1 -1
- package/dist/component/{dext-email-rac-BAvQwDPA.js → dext-email-rac-CBv4umUC.js} +1 -1
- package/dist/component/{dext-number-input-rac-D7HYQVKq.js → dext-number-input-rac-0UNC_1Ac.js} +1 -1
- package/dist/component/{dext-phone-rac--FhcplSI.js → dext-phone-rac-CQVzz499.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DBz8iCKW.js → dext-radio-group-rac-3lhx-xxX.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cv7nThfe.js → dext-rating-input-rac-2fwxV3iY.js} +1 -1
- package/dist/component/{dext-tags-rac-CRUUc5dr.js → dext-tags-rac-DCL78ClS.js} +2 -2
- package/dist/component/{dext-text-area-rac-DQBQXV1L.js → dext-text-area-rac-WTCWYySB.js} +1 -1
- package/dist/component/{dext-text-input-rac-4CpM581y.js → dext-text-input-rac-DMCzSYAI.js} +1 -1
- package/dist/component/{dext-url-input-rac-0C1jTEr9.js → dext-url-input-rac-Bzvt5zTa.js} +1 -1
- package/dist/component/{donation-rac-Cgt0ZE50.js → donation-rac-B3YHu0bl.js} +98 -98
- package/dist/component/{dropdown-field-rac-DlGKR7pZ.js → dropdown-field-rac-y4GPpf0W.js} +4 -4
- package/dist/component/{dropdown-rac-CYFW_3x_.js → dropdown-rac-Dj7OnxJL.js} +1 -1
- package/dist/component/{ecom-address-rac-CQfQHpXC.js → ecom-address-rac-Bnc60jDw.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D2v2Upvz.js → ecom-subscription-checkbox-rac-CesTpjav.js} +2 -2
- package/dist/component/{email-input-field-rac-CVw25yRo.js → email-input-field-rac-BT2FrAEM.js} +48 -48
- package/dist/component/{events-repeater-rac-BCVUcmFj.js → events-repeater-rac-CA2yjEEk.js} +24 -24
- package/dist/component/{events-rsvp-rac-DwbqEr8z.js → events-rsvp-rac-wVpVt7-p.js} +4 -4
- package/dist/component/{field-error-headless-XnVcMmsL.js → field-error-headless-CX95bMbk.js} +8 -8
- package/dist/component/{field-label-headless-BRTLT2Yt.js → field-label-headless-niuFY6Mw.js} +17 -17
- package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
- package/dist/component/{file-upload-rac-Dkwg9Jk4.js → file-upload-rac-ByO8l8lE.js} +142 -142
- package/dist/component/{fixed-payment-rac-ST98xAa2.js → fixed-payment-rac-BNDAdNeQ.js} +18 -18
- package/dist/component/{form-BUqSKOvc.js → form-CCQN_rPn.js} +326 -336
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CzNTGYWq.js → header-field-rac-C1RySfYy.js} +6 -6
- package/dist/component/{header-rac-DUt6AIAE.js → header-rac-BaFPV0vy.js} +1 -1
- package/dist/component/image-choice-rac-BShUj92P.js +155 -0
- package/dist/component/{index-cZZeAuuu.js → index-0_YjLphg.js} +2 -2
- package/dist/component/{index-CDO22hht.js → index-DHLfweXD.js} +69 -69
- package/dist/component/{isObjectLike-cs4bARpC.js → isObjectLike-D7tbAd6O.js} +3 -3
- package/dist/component/{multiline-address-field-rac-vcEWhUCV.js → multiline-address-field-rac-CFJKE5vA.js} +41 -41
- package/dist/component/{multiline-address-rac-WQaI2eUX.js → multiline-address-rac-BlzCkwEH.js} +1 -1
- package/dist/component/{number-input-field-rac-CBUMqATk.js → number-input-field-rac-XqxdqTRV.js} +24 -24
- package/dist/component/{number-input-rac-B4j5hyzS.js → number-input-rac-CQTg0QSm.js} +1 -1
- package/dist/component/{password-rac-DwLyf45N.js → password-rac-DPE-U2xs.js} +17 -17
- package/dist/component/{payment-input-rac-D0Od---y.js → payment-input-rac-oOh04431.js} +32 -32
- package/dist/component/{phone-input-field-rac-COlu9IeC.js → phone-input-field-rac-DW2vQhjC.js} +48 -48
- package/dist/component/{phone-rac-Dh4RacOF.js → phone-rac-BB9B-Hpl.js} +1 -1
- package/dist/component/{product-list-rac-D7zHDE2D.js → product-list-rac-K53VvPJV.js} +26 -26
- package/dist/component/{quiz-radio-group-rac-1AaKphJt.js → quiz-radio-group-rac-gikcMV2I.js} +1 -1
- package/dist/component/{radio-button-module-classes-VqaP6vpA.js → radio-button-module-classes-CY883yGO.js} +34 -34
- package/dist/component/{radio-group-field-rac-Cp3LRN3C.js → radio-group-field-rac-BOEWcfT9.js} +5 -5
- package/dist/component/{radio-group-rac-KhmhzYGf.js → radio-group-rac-gKhmLMm3.js} +1 -1
- package/dist/component/{rating-input-field-rac-10n6ciCr.js → rating-input-field-rac-83FXIVpy.js} +30 -30
- package/dist/component/{rating-input-rac-XZjjY2Gp.js → rating-input-rac-XDwakrtR.js} +1 -1
- package/dist/component/{rich-content-rac.module-kMwDoLBa.js → rich-content-rac.module-Bdx8hK3J.js} +5 -5
- package/dist/component/{rich-text-field-rac-H5bd8fAt.js → rich-text-field-rac-ksEKBaYG.js} +4 -4
- package/dist/component/{rich-text-rac-88GSQR62.js → rich-text-rac-XEFBeQrz.js} +1 -1
- package/dist/component/{service-dropdown-rac-B1_Xr_X3.js → service-dropdown-rac-CjFiqV1n.js} +26 -26
- package/dist/component/{services-multi-choice-rac-DWp_Llbi.js → services-multi-choice-rac-DNut4K3I.js} +15 -15
- package/dist/component/{signature-rac-zN_6KRDp.js → signature-rac-BhWPZpwu.js} +108 -108
- package/dist/component/{submit-button-rac-Dv6UarYX.js → submit-button-rac-CWmz_JCl.js} +7 -7
- package/dist/component/{tags-field-rac-sVN6MHfJ.js → tags-field-rac-D9P1jVrz.js} +75 -75
- package/dist/component/{tags-rac-DhTHs_XN.js → tags-rac-0zEd-xYa.js} +1 -1
- package/dist/component/{text-area-field-rac-DrWkww7W.js → text-area-field-rac-D_55oi2b.js} +19 -19
- package/dist/component/{text-area-rac-CXXh-ZdY.js → text-area-rac-CpkFyXCH.js} +1 -1
- package/dist/component/{text-input-field-rac-C2YiMr-g.js → text-input-field-rac-b7RXb4Ob.js} +4 -4
- package/dist/component/{text-input-headless-BJMNbsMY.js → text-input-headless-b1TEpdit.js} +11 -11
- package/dist/component/{text-input-rac-CpsPh7FH.js → text-input-rac-CoVcg1S0.js} +1 -1
- package/dist/component/{time-input-rac-DG_1KxS4.js → time-input-rac-DE7OyzgQ.js} +20 -20
- package/dist/component/url-input-field-rac-_yxWlb3a.js +77 -0
- package/dist/component/{url-input-rac-BTStO0NP.js → url-input-rac-wguMUqug.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DbMMg1ws.js → use-dropdown-option-class-name-DdQ0sFRF.js} +12 -12
- package/dist/component/{use-dropdown-trigger-class-name-Yes4kC_0.js → use-dropdown-trigger-class-name-hB8KYv-I.js} +19 -19
- package/dist/component/{use-element-state-class-name-DlncY4hk.js → use-element-state-class-name-C2tQgxUX.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C__zqP5j.js → use-hoverable-input-class-name-C8iuzofb.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DnK_MQRO.js → use-is-forced-open-dropdown-DkIrJPsK.js} +4 -4
- package/dist/component/{use-service-options-base-DKJe52Vk.js → use-service-options-base-B-xAR-tx.js} +3 -3
- package/dist/component/use-text-input-class-name-CK4rZeSM.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
- package/dist/component/image-choice-rac-DuBgrSt2.js +0 -155
- package/dist/component/url-input-field-rac-twxRREnl.js +0 -77
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +0 -6
package/dist/component/form.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import m from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as g, R as p, s as
|
|
5
|
-
const
|
|
3
|
+
import { by as u, ba as i, b9 as C, bc as R, aL as T, at as d } from "./form-CCQN_rPn.js";
|
|
4
|
+
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-Bdx8hK3J.js";
|
|
5
|
+
const b = ({ truncate: t = !0 } = {}) => {
|
|
6
6
|
const { content: a, maxShownParagraphs: s } = u(), n = e.useMemo(() => ({
|
|
7
7
|
colorPalette: R(),
|
|
8
8
|
customStyles: {
|
|
@@ -11,14 +11,14 @@ const f = ({ truncate: t = !0 } = {}) => {
|
|
|
11
11
|
}
|
|
12
12
|
}), []), { displayedContent: o, isTruncated: r, isTruncateButtonShown: c, toggleTruncate: l } = g(a, t ? s : void 0);
|
|
13
13
|
return /* @__PURE__ */ e.createElement(p, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(T, {
|
|
14
|
-
className: m(d,
|
|
14
|
+
className: m(d, S.richContent),
|
|
15
15
|
content: o,
|
|
16
16
|
customTheme: n
|
|
17
|
-
}), c && /* @__PURE__ */ e.createElement(
|
|
17
|
+
}), c && /* @__PURE__ */ e.createElement(h, {
|
|
18
18
|
isTruncated: r,
|
|
19
19
|
onClick: l
|
|
20
20
|
})));
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
b as H
|
|
24
24
|
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import e, { useMemo as H, useCallback as T, useRef as G } from "react";
|
|
2
|
+
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
|
+
import I from "classnames";
|
|
4
|
+
import { by as b, bv as x, bA as P, br as j, U as B, aa as q, Q as U, S as w, K, G as Q, R as V, f } from "./form-CCQN_rPn.js";
|
|
5
|
+
import { CheckboxGroup as z, CheckboxField as Y, CheckboxButton as $ } from "react-aria-components";
|
|
6
|
+
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { L as J, g as W } from "./field-label-headless-niuFY6Mw.js";
|
|
8
|
+
import { D as X, E as Z } from "./field-error-headless-CX95bMbk.js";
|
|
9
|
+
import { F as ee } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
+
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
+
import { s as O } from "./field-rac.module-ts2t4WUO.js";
|
|
12
|
+
import { u as ae } from "./use-element-state-class-name-C2tQgxUX.js";
|
|
13
|
+
const a = ({ children: t, className: n }) => {
|
|
14
|
+
const { id: s, value: o, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, onFocus: p, hasError: g, FieldLayout: C } = b(), { inputId: L, labelId: _, ariaDescribedBy: N } = x(), S = m(t, a.Label), A = m(t, a.Options), D = m(t, a.Description), h = m(t, a.Error), M = H(() => o || [], [
|
|
15
|
+
o
|
|
16
|
+
]), v = T((y) => {
|
|
17
|
+
i == null || i(y);
|
|
18
|
+
}, [
|
|
19
|
+
i
|
|
20
|
+
]);
|
|
21
|
+
return /* @__PURE__ */ e.createElement(C, {
|
|
22
|
+
fieldId: s,
|
|
23
|
+
renderLabel: () => S,
|
|
24
|
+
renderInput: () => /* @__PURE__ */ e.createElement(ee, {
|
|
25
|
+
id: L,
|
|
26
|
+
ariaLabelledBy: _,
|
|
27
|
+
ariaDescribedBy: N,
|
|
28
|
+
required: c,
|
|
29
|
+
onBlur: u,
|
|
30
|
+
onFocus: p
|
|
31
|
+
}, /* @__PURE__ */ e.createElement(z, {
|
|
32
|
+
className: n,
|
|
33
|
+
"aria-labelledby": _,
|
|
34
|
+
value: M,
|
|
35
|
+
onChange: v,
|
|
36
|
+
isDisabled: l,
|
|
37
|
+
isReadOnly: r,
|
|
38
|
+
isRequired: c,
|
|
39
|
+
isInvalid: g
|
|
40
|
+
}, A)),
|
|
41
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h, D)
|
|
42
|
+
});
|
|
43
|
+
}, R = ({ children: t, className: n }) => {
|
|
44
|
+
const { id: s, options: o, numberOfColumns: i } = b(), l = m(t, R.Option);
|
|
45
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
46
|
+
className: n,
|
|
47
|
+
"data-columns": i
|
|
48
|
+
}, o == null ? void 0 : o.map((r, c) => F(l, {
|
|
49
|
+
key: r.id || r.label,
|
|
50
|
+
option: r,
|
|
51
|
+
isFirst: c === 0,
|
|
52
|
+
fieldId: s
|
|
53
|
+
})));
|
|
54
|
+
}, oe = ({ className: t }) => /* @__PURE__ */ e.createElement("div", {
|
|
55
|
+
"aria-hidden": "true",
|
|
56
|
+
className: t
|
|
57
|
+
}), ne = ({ className: t, ...n }) => {
|
|
58
|
+
var u, p;
|
|
59
|
+
const { option: s } = n, { choiceImageResize: o, choiceImageAlignment: i } = b(), l = (u = s.media) == null ? void 0 : u.image, r = l && W(l, l.width, l.height);
|
|
60
|
+
if (!l || !r)
|
|
61
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
62
|
+
className: t,
|
|
63
|
+
"data-placeholder": !0,
|
|
64
|
+
"data-hook": "image-choice-option-image"
|
|
65
|
+
});
|
|
66
|
+
const c = ((p = s.media) == null ? void 0 : p.altText) || s.altText || l.altText || "";
|
|
67
|
+
return /* @__PURE__ */ e.createElement("img", {
|
|
68
|
+
className: t,
|
|
69
|
+
src: r,
|
|
70
|
+
alt: c,
|
|
71
|
+
"data-fit": o,
|
|
72
|
+
"data-alignment": i,
|
|
73
|
+
"data-hook": "image-choice-option-image"
|
|
74
|
+
});
|
|
75
|
+
}, se = ({ className: t, ...n }) => {
|
|
76
|
+
const { option: s } = n;
|
|
77
|
+
return !s.label || s.isLabelHidden ? null : /* @__PURE__ */ e.createElement("span", {
|
|
78
|
+
className: t
|
|
79
|
+
}, s.label);
|
|
80
|
+
}, d = ({ children: t, className: n, ...s }) => {
|
|
81
|
+
const { option: o, isFirst: i = !1, fieldId: l } = s, { disabled: r, readOnly: c, hasError: u } = b(), p = G(null);
|
|
82
|
+
P(() => {
|
|
83
|
+
var _;
|
|
84
|
+
i && ((_ = p.current) == null || _.focus({
|
|
85
|
+
preventScroll: !0
|
|
86
|
+
}));
|
|
87
|
+
}, l);
|
|
88
|
+
const g = m(t, d.Input), C = m(t, d.Image), L = m(t, d.Label);
|
|
89
|
+
return /* @__PURE__ */ e.createElement(Y, {
|
|
90
|
+
value: o.label,
|
|
91
|
+
isDisabled: r,
|
|
92
|
+
isReadOnly: c,
|
|
93
|
+
isInvalid: u
|
|
94
|
+
}, /* @__PURE__ */ e.createElement($, {
|
|
95
|
+
ref: p,
|
|
96
|
+
"aria-label": o.isLabelHidden ? o.label : void 0,
|
|
97
|
+
className: n,
|
|
98
|
+
"data-hook": `image-choice-${o.label}`
|
|
99
|
+
}, g, F(C, {
|
|
100
|
+
option: o
|
|
101
|
+
}), F(L, {
|
|
102
|
+
option: o
|
|
103
|
+
})));
|
|
104
|
+
};
|
|
105
|
+
d.Input = oe;
|
|
106
|
+
d.Image = ne;
|
|
107
|
+
d.Label = se;
|
|
108
|
+
a.Label = J;
|
|
109
|
+
a.Options = R;
|
|
110
|
+
R.Option = d;
|
|
111
|
+
a.Description = X;
|
|
112
|
+
a.Error = Z;
|
|
113
|
+
const le = "_options_a5g3j_1", ie = "_optionInput_a5g3j_33", re = "_option_a5g3j_1", ce = "_optionHover_a5g3j_67", me = "_optionSelected_a5g3j_67", pe = "_optionLabel_a5g3j_107", Ee = "_optionImage_a5g3j_147", E = {
|
|
114
|
+
options: le,
|
|
115
|
+
optionInput: ie,
|
|
116
|
+
option: re,
|
|
117
|
+
optionHover: ce,
|
|
118
|
+
optionSelected: me,
|
|
119
|
+
optionLabel: pe,
|
|
120
|
+
optionImage: Ee
|
|
121
|
+
}, de = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
|
|
122
|
+
content: t,
|
|
123
|
+
locale: n
|
|
124
|
+
}), ue = {
|
|
125
|
+
base: E.option,
|
|
126
|
+
selected: E.optionSelected,
|
|
127
|
+
hover: E.optionHover
|
|
128
|
+
}, Ie = () => {
|
|
129
|
+
const t = ae({
|
|
130
|
+
globalClasses: V,
|
|
131
|
+
moduleClasses: ue
|
|
132
|
+
}), n = j(f.IMAGE_CHOICE, f.IMAGE_CHOICE_OPTION, f.IMAGE_CHOICE_OPTION_IMAGE);
|
|
133
|
+
return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
134
|
+
className: I(B, O.label)
|
|
135
|
+
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
136
|
+
className: I(q, O.requiredMark)
|
|
137
|
+
})), /* @__PURE__ */ e.createElement(a.Options, {
|
|
138
|
+
className: I(U, E.options)
|
|
139
|
+
}, /* @__PURE__ */ e.createElement(a.Options.Option, {
|
|
140
|
+
className: t
|
|
141
|
+
}, /* @__PURE__ */ e.createElement(a.Options.Option.Input, {
|
|
142
|
+
className: E.optionInput
|
|
143
|
+
}), /* @__PURE__ */ e.createElement(a.Options.Option.Image, {
|
|
144
|
+
className: I(w, E.optionImage, n)
|
|
145
|
+
}), /* @__PURE__ */ e.createElement(a.Options.Option.Label, {
|
|
146
|
+
className: E.optionLabel
|
|
147
|
+
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
148
|
+
className: I(K, O.error)
|
|
149
|
+
}, /* @__PURE__ */ e.createElement(te, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
150
|
+
className: I(Q, O.description)
|
|
151
|
+
}, de));
|
|
152
|
+
}, De = () => /* @__PURE__ */ e.createElement(Ie, null);
|
|
153
|
+
export {
|
|
154
|
+
De as ImageChoiceRAC
|
|
155
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as S, a as p, C as N,
|
|
1
|
+
import { bh as n } from "./form-CCQN_rPn.js";
|
|
2
|
+
import { A as S, a as p, C as N, aM as g, b1 as q, b2 as D, bj as L } from "./form-CCQN_rPn.js";
|
|
3
3
|
const l = (e = !1) => ({
|
|
4
4
|
country: {
|
|
5
5
|
required: e
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { e as R,
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { e as R, aT as _, b6 as de, aU as g, az as Ge, B as Be, aN as qe, aG as He, aF as A, aO as Ee, aX as re, aR as Fe, c as B, aH as M, bi as Te, aJ as je, aI as he, aK as q } from "./form-CCQN_rPn.js";
|
|
2
|
+
import { bd as Mn } from "./form-CCQN_rPn.js";
|
|
3
|
+
import Xe from "ajv";
|
|
4
|
+
import ke from "ajv-errors";
|
|
5
5
|
import We from "ajv-formats";
|
|
6
6
|
import Ke from "fast-deep-equal";
|
|
7
7
|
import { parsePhoneNumber as ze, parsePhoneNumberWithError as Ve, ParseError as Ze } from "libphonenumber-js/max";
|
|
8
8
|
import Je from "libphonenumber-js/metadata.max.json";
|
|
9
|
-
import { p as Qe, i as et } from "./date-availability-
|
|
10
|
-
import { a as Sn } from "./date-availability-
|
|
9
|
+
import { p as Qe, i as et } from "./date-availability-CudIaav_.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-CudIaav_.js";
|
|
11
11
|
import { C as tt } from "./calling-country-codes-PyWuOTmF.js";
|
|
12
12
|
function rt(e) {
|
|
13
13
|
var t, r;
|
|
@@ -214,7 +214,7 @@ const dt = (e, t) => {
|
|
|
214
214
|
var t;
|
|
215
215
|
return !!((t = e.validation) != null && t.required) && !e.hidden && !e.readOnly;
|
|
216
216
|
};
|
|
217
|
-
var H = { exports: {} },
|
|
217
|
+
var H = { exports: {} }, X = { exports: {} }, Re;
|
|
218
218
|
function Tt() {
|
|
219
219
|
return Re || (Re = 1, (function(e, t) {
|
|
220
220
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
@@ -272,7 +272,7 @@ function Tt() {
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
e.exports = s;
|
|
275
|
-
})(
|
|
275
|
+
})(X, X.exports)), X.exports;
|
|
276
276
|
}
|
|
277
277
|
var Ie = H.exports, Ae;
|
|
278
278
|
function ht() {
|
|
@@ -531,10 +531,10 @@ const Nt = [
|
|
|
531
531
|
"ZWN",
|
|
532
532
|
"ZWR"
|
|
533
533
|
], yt = new Set(Nt.map((e) => e.toLowerCase()));
|
|
534
|
-
function
|
|
534
|
+
function Ot(e) {
|
|
535
535
|
return yt.has(e.toLowerCase());
|
|
536
536
|
}
|
|
537
|
-
const oe = "¡---a-zA-Z", $e = "0-9", U = `${oe}${$e}`, Ne = "!#$%&'*+/=?^_`{|}~-",
|
|
537
|
+
const oe = "¡---a-zA-Z", $e = "0-9", U = `${oe}${$e}`, Ne = "!#$%&'*+/=?^_`{|}~-", gt = `[${U}${Ne}]+(?:\\.[${U}${Ne}]+)*`, _t = "(?:[-\b\v\f-!#-[]-]|\\[- \v\f-])*", Dt = `(?:${gt}|${_t})`, Mt = `(?:[${U}](?:[${U}-]*[${U}])?\\.)+(?:(?:[${$e}]+[${oe}][${U}]*)|(?:[${oe}][${U}]{1,}))`, Pt = "^" + Dt + "@" + Mt + "$", St = [
|
|
538
538
|
"aa",
|
|
539
539
|
"ab",
|
|
540
540
|
"ae",
|
|
@@ -749,7 +749,7 @@ const ye = {
|
|
|
749
749
|
phone: "^[\\d \\u00A0()+\\-.]+$",
|
|
750
750
|
email: Pt,
|
|
751
751
|
"color-hex": /^#(?:[0-9A-F]{3,4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,
|
|
752
|
-
currency:
|
|
752
|
+
currency: Ot,
|
|
753
753
|
language: Ct,
|
|
754
754
|
"time-zone": Ft
|
|
755
755
|
};
|
|
@@ -895,11 +895,11 @@ function Ht(e) {
|
|
|
895
895
|
}
|
|
896
896
|
function jt(e, t, r) {
|
|
897
897
|
return function(s) {
|
|
898
|
-
const i = new
|
|
898
|
+
const i = new Xe({
|
|
899
899
|
allErrors: !0,
|
|
900
900
|
multipleOfPrecision: 8
|
|
901
901
|
});
|
|
902
|
-
return We(i), vt(i, t), Ut(i, t, r),
|
|
902
|
+
return We(i), vt(i, t), Ut(i, t, r), ke(i), It(i), s.forEach((o) => {
|
|
903
903
|
if (!i.getSchema(h(o.id, o, "id"))) {
|
|
904
904
|
const u = e(o);
|
|
905
905
|
u && i.addSchema(u);
|
|
@@ -910,13 +910,13 @@ function jt(e, t, r) {
|
|
|
910
910
|
var y = /* @__PURE__ */ (function(e) {
|
|
911
911
|
return e.OBJECT = "object", e.STRING = "string", e.NUMBER = "number", e.INTEGER = "integer", e.BOOLEAN = "boolean", e.ARRAY = "array", e;
|
|
912
912
|
})({});
|
|
913
|
-
function
|
|
913
|
+
function Xt(e, t) {
|
|
914
914
|
return function(c) {
|
|
915
|
-
const E = c.fields || [], d = c.deletedFields || [], m = E.filter(o), T = d.filter(o),
|
|
915
|
+
const E = c.fields || [], d = c.deletedFields || [], m = E.filter(o), T = d.filter(o), O = r(m, T), N = t === g.UNRESTRICTED_UPDATE ? [] : m.filter((I) => !u(I)).filter(i).map((I) => h(I.target, I, "target"));
|
|
916
916
|
return {
|
|
917
917
|
$id: h(c.id, c, "id"),
|
|
918
918
|
type: y.OBJECT,
|
|
919
|
-
properties:
|
|
919
|
+
properties: O,
|
|
920
920
|
additionalProperties: !1,
|
|
921
921
|
required: N
|
|
922
922
|
};
|
|
@@ -967,7 +967,7 @@ function kt(e, t) {
|
|
|
967
967
|
return !!p.nestedFormId || ((E = (c = p.validation) == null ? void 0 : c.predefined) == null ? void 0 : E.format) === _.MULTILINE_ADDRESS;
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function kt(e, t) {
|
|
971
971
|
return function(l) {
|
|
972
972
|
const p = l.formFields || [], c = l.deletedFormFields || [], E = p.filter(a), d = c.filter(a), m = n(E, d);
|
|
973
973
|
return {
|
|
@@ -979,7 +979,7 @@ function Xt(e, t) {
|
|
|
979
979
|
};
|
|
980
980
|
};
|
|
981
981
|
function r(f) {
|
|
982
|
-
return t ===
|
|
982
|
+
return t === g.UNRESTRICTED_UPDATE ? [] : f.filter((l) => !s(l)).filter((l) => !i(l)).map((l) => l.inputOptions).filter(o).map((l) => h(l.target, l, "target"));
|
|
983
983
|
}
|
|
984
984
|
function n(f, l) {
|
|
985
985
|
return [
|
|
@@ -1038,7 +1038,7 @@ function J(e, t) {
|
|
|
1038
1038
|
};
|
|
1039
1039
|
}
|
|
1040
1040
|
function zt(e, t) {
|
|
1041
|
-
return t !==
|
|
1041
|
+
return t !== g.UNRESTRICTED_UPDATE ? {
|
|
1042
1042
|
...G(Be, e)
|
|
1043
1043
|
} : {};
|
|
1044
1044
|
}
|
|
@@ -1051,7 +1051,7 @@ function Q(e, t) {
|
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
1053
|
function Vt(e, t) {
|
|
1054
|
-
return t !==
|
|
1054
|
+
return t !== g.UNRESTRICTED_UPDATE ? {
|
|
1055
1055
|
...G(qe, e, {
|
|
1056
1056
|
maximum: (r) => Math.min(r ?? Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER),
|
|
1057
1057
|
minimum: (r) => Math.max(r ?? Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER),
|
|
@@ -1063,7 +1063,7 @@ const Zt = [
|
|
|
1063
1063
|
"minItems",
|
|
1064
1064
|
"maxItems"
|
|
1065
1065
|
], ue = 100;
|
|
1066
|
-
function
|
|
1066
|
+
function Oe(e, t) {
|
|
1067
1067
|
const n = Qt(t, (e || {}).items);
|
|
1068
1068
|
return {
|
|
1069
1069
|
type: y.ARRAY,
|
|
@@ -1075,7 +1075,7 @@ function ge(e, t) {
|
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
1077
|
function Jt(e, t) {
|
|
1078
|
-
return t !==
|
|
1078
|
+
return t !== g.UNRESTRICTED_UPDATE ? {
|
|
1079
1079
|
...xe(e)
|
|
1080
1080
|
} : {};
|
|
1081
1081
|
}
|
|
@@ -1098,20 +1098,20 @@ function er(e, t) {
|
|
|
1098
1098
|
};
|
|
1099
1099
|
}
|
|
1100
1100
|
function tr(e, t) {
|
|
1101
|
-
return t !==
|
|
1101
|
+
return t !== g.UNRESTRICTED_UPDATE ? {
|
|
1102
1102
|
...G(He, e, {
|
|
1103
1103
|
maximum: (r) => Math.min(r ?? Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER),
|
|
1104
1104
|
minimum: (r) => Math.max(r ?? Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER)
|
|
1105
1105
|
})
|
|
1106
1106
|
} : {};
|
|
1107
1107
|
}
|
|
1108
|
-
function K(e, t, r =
|
|
1108
|
+
function K(e, t, r = g.UNKNOWN) {
|
|
1109
1109
|
const { format: n } = t;
|
|
1110
1110
|
switch (n) {
|
|
1111
1111
|
case _.WIX_FILE:
|
|
1112
|
-
return Y(
|
|
1112
|
+
return Y(ge[_.WIX_FILE], r);
|
|
1113
1113
|
case _.SCHEDULING:
|
|
1114
|
-
return Y(
|
|
1114
|
+
return Y(ge[_.SCHEDULING], r);
|
|
1115
1115
|
case _.PAYMENT:
|
|
1116
1116
|
return nr(t.paymentOptions, r);
|
|
1117
1117
|
case _.OBJECT_ARRAY:
|
|
@@ -1125,10 +1125,10 @@ function K(e, t, r = O.UNKNOWN) {
|
|
|
1125
1125
|
function rr(e, t, r) {
|
|
1126
1126
|
return {
|
|
1127
1127
|
type: y.ARRAY,
|
|
1128
|
-
...t.maxItems && r !==
|
|
1128
|
+
...t.maxItems && r !== g.UNRESTRICTED_UPDATE && {
|
|
1129
1129
|
maxItems: t.maxItems
|
|
1130
1130
|
},
|
|
1131
|
-
...t.minItems && r !==
|
|
1131
|
+
...t.minItems && r !== g.UNRESTRICTED_UPDATE && {
|
|
1132
1132
|
minItems: t.minItems
|
|
1133
1133
|
},
|
|
1134
1134
|
items: {
|
|
@@ -1137,7 +1137,7 @@ function rr(e, t, r) {
|
|
|
1137
1137
|
};
|
|
1138
1138
|
}
|
|
1139
1139
|
function nr(e, t) {
|
|
1140
|
-
if (t ===
|
|
1140
|
+
if (t === g.UNRESTRICTED_UPDATE)
|
|
1141
1141
|
return {
|
|
1142
1142
|
type: y.ARRAY,
|
|
1143
1143
|
items: {
|
|
@@ -1249,7 +1249,7 @@ function sr(e) {
|
|
|
1249
1249
|
throw new Error(`Unknown price type ${t}`);
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
|
-
const
|
|
1252
|
+
const ge = {
|
|
1253
1253
|
[_.WIX_FILE]: {
|
|
1254
1254
|
array: {
|
|
1255
1255
|
maxItems: 30,
|
|
@@ -1327,15 +1327,15 @@ function or() {
|
|
|
1327
1327
|
return function(s, i, o) {
|
|
1328
1328
|
var a, u = function(c, E, d) {
|
|
1329
1329
|
d === void 0 && (d = {});
|
|
1330
|
-
var m = new Date(c), T = (function(
|
|
1330
|
+
var m = new Date(c), T = (function(O, N) {
|
|
1331
1331
|
N === void 0 && (N = {});
|
|
1332
|
-
var I = N.timeZoneName || "short", P =
|
|
1333
|
-
return D || (D = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone:
|
|
1332
|
+
var I = N.timeZoneName || "short", P = O + "|" + I, D = n[P];
|
|
1333
|
+
return D || (D = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: O, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: I }), n[P] = D), D;
|
|
1334
1334
|
})(E, d);
|
|
1335
1335
|
return T.formatToParts(m);
|
|
1336
1336
|
}, f = function(c, E) {
|
|
1337
1337
|
for (var d = u(c, E), m = [], T = 0; T < d.length; T += 1) {
|
|
1338
|
-
var
|
|
1338
|
+
var O = d[T], N = O.type, I = O.value, P = r[N];
|
|
1339
1339
|
P >= 0 && (m[P] = parseInt(I, 10));
|
|
1340
1340
|
}
|
|
1341
1341
|
var D = m[3], F = D === 24 ? 0 : D, b = m[0] + "-" + m[1] + "-" + m[2] + " " + F + ":" + m[4] + ":" + m[5] + ":000", L = +c;
|
|
@@ -1343,9 +1343,9 @@ function or() {
|
|
|
1343
1343
|
}, l = i.prototype;
|
|
1344
1344
|
l.tz = function(c, E) {
|
|
1345
1345
|
c === void 0 && (c = a);
|
|
1346
|
-
var d, m = this.utcOffset(), T = this.toDate(),
|
|
1346
|
+
var d, m = this.utcOffset(), T = this.toDate(), O = T.toLocaleString("en-US", { timeZone: c }), N = Math.round((T - new Date(O)) / 1e3 / 60), I = 15 * -Math.round(T.getTimezoneOffset() / 15) - N;
|
|
1347
1347
|
if (!Number(I)) d = this.utcOffset(0, E);
|
|
1348
|
-
else if (d = o(
|
|
1348
|
+
else if (d = o(O, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(I, !0), E) {
|
|
1349
1349
|
var P = d.utcOffset();
|
|
1350
1350
|
d = d.add(m - P, "minute");
|
|
1351
1351
|
}
|
|
@@ -1362,14 +1362,14 @@ function or() {
|
|
|
1362
1362
|
var d = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1363
1363
|
return p.call(d, c, E).tz(this.$x.$timezone, !0);
|
|
1364
1364
|
}, o.tz = function(c, E, d) {
|
|
1365
|
-
var m = d && E, T = d || E || a,
|
|
1365
|
+
var m = d && E, T = d || E || a, O = f(+o(), T);
|
|
1366
1366
|
if (typeof c != "string") return o(c).tz(T);
|
|
1367
1367
|
var N = (function(F, b, L) {
|
|
1368
1368
|
var C = F - 60 * b * 1e3, $ = f(C, L);
|
|
1369
1369
|
if (b === $) return [C, b];
|
|
1370
1370
|
var se = f(C -= 60 * ($ - b) * 1e3, L);
|
|
1371
1371
|
return $ === se ? [C, $] : [F - 60 * Math.min($, se) * 1e3, Math.max($, se)];
|
|
1372
|
-
})(o.utc(c, m).valueOf(),
|
|
1372
|
+
})(o.utc(c, m).valueOf(), O, T), I = N[0], P = N[1], D = o(I).utcOffset(P);
|
|
1373
1373
|
return D.$x.$timezone = T, D;
|
|
1374
1374
|
}, o.tz.guess = function() {
|
|
1375
1375
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -1413,8 +1413,8 @@ function mr() {
|
|
|
1413
1413
|
};
|
|
1414
1414
|
var p = u.utcOffset;
|
|
1415
1415
|
u.utcOffset = function(m, T) {
|
|
1416
|
-
var
|
|
1417
|
-
if (
|
|
1416
|
+
var O = this.$utils().u;
|
|
1417
|
+
if (O(m)) return this.$u ? 0 : O(this.$offset) ? p.call(this) : this.$offset;
|
|
1418
1418
|
if (typeof m == "string" && (m = (function(D) {
|
|
1419
1419
|
D === void 0 && (D = "");
|
|
1420
1420
|
var F = D.match(n);
|
|
@@ -1448,10 +1448,10 @@ function mr() {
|
|
|
1448
1448
|
return m === "s" && this.$offset ? a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : E.call(this);
|
|
1449
1449
|
};
|
|
1450
1450
|
var d = u.diff;
|
|
1451
|
-
u.diff = function(m, T,
|
|
1452
|
-
if (m && this.$u === m.$u) return d.call(this, m, T,
|
|
1451
|
+
u.diff = function(m, T, O) {
|
|
1452
|
+
if (m && this.$u === m.$u) return d.call(this, m, T, O);
|
|
1453
1453
|
var N = this.local(), I = a(m).local();
|
|
1454
|
-
return d.call(N, I, T,
|
|
1454
|
+
return d.call(N, I, T, O);
|
|
1455
1455
|
};
|
|
1456
1456
|
};
|
|
1457
1457
|
}));
|
|
@@ -1492,7 +1492,7 @@ function Ar(e, t) {
|
|
|
1492
1492
|
if (e === "$now")
|
|
1493
1493
|
return t;
|
|
1494
1494
|
try {
|
|
1495
|
-
const [, r, n, s] = e.match(we) ?? [], i = Nr(n), o =
|
|
1495
|
+
const [, r, n, s] = e.match(we) ?? [], i = Nr(n), o = Or(s);
|
|
1496
1496
|
return i && o ? yr(t, r)(i, o) : void 0;
|
|
1497
1497
|
} catch (r) {
|
|
1498
1498
|
console.error(`Failed to parse format ${e}`, r);
|
|
@@ -1513,7 +1513,7 @@ function yr(e, t) {
|
|
|
1513
1513
|
return () => e;
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function Or(e) {
|
|
1517
1517
|
if ([
|
|
1518
1518
|
"d",
|
|
1519
1519
|
"M",
|
|
@@ -1538,7 +1538,7 @@ function Me(e) {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
const ce = 2e4;
|
|
1540
1540
|
function ee(e, t) {
|
|
1541
|
-
const r =
|
|
1541
|
+
const r = gr(e) ? Wt(Fe, e) : {};
|
|
1542
1542
|
return {
|
|
1543
1543
|
type: y.STRING,
|
|
1544
1544
|
maxLength: ce,
|
|
@@ -1547,14 +1547,14 @@ function ee(e, t) {
|
|
|
1547
1547
|
..._r(e, t)
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function gr(e) {
|
|
1551
1551
|
return "validationMessages" in e;
|
|
1552
1552
|
}
|
|
1553
1553
|
function _r(e, t) {
|
|
1554
1554
|
const r = Sr(e), n = r ? {
|
|
1555
1555
|
dateAvailability: r
|
|
1556
1556
|
} : {};
|
|
1557
|
-
return t !==
|
|
1557
|
+
return t !== g.UNRESTRICTED_UPDATE ? {
|
|
1558
1558
|
...G(Fe.filter((s) => s !== "format"), e, {
|
|
1559
1559
|
maxLength: (s) => Math.min(s ?? ce, ce)
|
|
1560
1560
|
}),
|
|
@@ -1631,7 +1631,7 @@ function Sr(e) {
|
|
|
1631
1631
|
const t = "dateOptions" in e ? e.dateOptions : void 0;
|
|
1632
1632
|
return t == null ? void 0 : t.availability;
|
|
1633
1633
|
}
|
|
1634
|
-
function Y(e, t = void 0, r =
|
|
1634
|
+
function Y(e, t = void 0, r = g.UNKNOWN) {
|
|
1635
1635
|
if (e != null && e.string)
|
|
1636
1636
|
return ee(e.string, r);
|
|
1637
1637
|
if (e != null && e.stringOptions)
|
|
@@ -1647,9 +1647,9 @@ function Y(e, t = void 0, r = O.UNKNOWN) {
|
|
|
1647
1647
|
if (e != null && e.booleanOptions)
|
|
1648
1648
|
return J(e == null ? void 0 : e.booleanOptions, r);
|
|
1649
1649
|
if (e != null && e.array)
|
|
1650
|
-
return
|
|
1650
|
+
return Oe(e.array, r);
|
|
1651
1651
|
if (e != null && e.arrayOptions)
|
|
1652
|
-
return
|
|
1652
|
+
return Oe(e.arrayOptions, r);
|
|
1653
1653
|
if (e != null && e.object)
|
|
1654
1654
|
return te(e.object, r);
|
|
1655
1655
|
if (e != null && e.objectOptions)
|
|
@@ -1667,7 +1667,7 @@ function te(e, t) {
|
|
|
1667
1667
|
};
|
|
1668
1668
|
}
|
|
1669
1669
|
function br(e, t) {
|
|
1670
|
-
return t !==
|
|
1670
|
+
return t !== g.UNRESTRICTED_UPDATE ? {
|
|
1671
1671
|
required: Cr(e.properties)
|
|
1672
1672
|
} : {
|
|
1673
1673
|
required: []
|
|
@@ -1816,7 +1816,7 @@ class Nn {
|
|
|
1816
1816
|
if (!n)
|
|
1817
1817
|
throw new Error(`Missing form ${t} for validation`);
|
|
1818
1818
|
let s = this.submissionValueProvider ? this.submissionValueProvider(r, n) : r;
|
|
1819
|
-
return this.validationMode !==
|
|
1819
|
+
return this.validationMode !== g.UNRESTRICTED_UPDATE && (s = dt(s, n)), {
|
|
1820
1820
|
ajv: this.initAJvWithSchemas(n, s),
|
|
1821
1821
|
submission: s,
|
|
1822
1822
|
currentlyValidatableForm: n
|
|
@@ -1853,7 +1853,7 @@ class Nn {
|
|
|
1853
1853
|
});
|
|
1854
1854
|
}
|
|
1855
1855
|
validateCanUpdateFormNotDisabled(t) {
|
|
1856
|
-
return this.validationMode !==
|
|
1856
|
+
return this.validationMode !== g.UNRESTRICTED_UPDATE && this.isFormDisabled(t) ? {
|
|
1857
1857
|
errors: [
|
|
1858
1858
|
{
|
|
1859
1859
|
errorPath: "form.properties.disabled",
|
|
@@ -1935,10 +1935,10 @@ class Nn {
|
|
|
1935
1935
|
return !!((s = t == null ? void 0 : t.properties) != null && s.disabled || r);
|
|
1936
1936
|
}
|
|
1937
1937
|
getFormSchemaMapper() {
|
|
1938
|
-
return this.platformisedFieldBasedValidation ?
|
|
1938
|
+
return this.platformisedFieldBasedValidation ? kt(wr, this.validationMode ?? g.UNKNOWN) : Xt(Y, this.validationMode ?? g.UNKNOWN);
|
|
1939
1939
|
}
|
|
1940
1940
|
initAJvWithSchemas(t, r) {
|
|
1941
|
-
const n = this.getFormSchemaMapper(), s = jt(n, this.validationMode !==
|
|
1941
|
+
const n = this.getFormSchemaMapper(), s = jt(n, this.validationMode !== g.UNRESTRICTED_UPDATE, this.lenientPhoneValidation), i = this.formSchemas.flatMap((u) => (u.nestedForms || []).flatMap(({ targets: f, form: l }) => (f || []).map((p) => ({
|
|
1942
1942
|
...l,
|
|
1943
1943
|
id: p
|
|
1944
1944
|
})))), o = this.getAddressForms(t, r), a = this.getObjectArrayForms(t);
|
|
@@ -2056,8 +2056,8 @@ var fe;
|
|
|
2056
2056
|
(function(e) {
|
|
2057
2057
|
e.UNKNOWN_FEATURE = "UNKNOWN_FEATURE", e.FILE_UPLOAD_FIELD = "FILE_UPLOAD_FIELD", e.ACCEPT_PAYMENTS = "ACCEPT_PAYMENTS", e.REMOVE_WIX_BRANDING = "REMOVE_WIX_BRANDING", e.SIGNATURE_FIELD = "SIGNATURE_FIELD", e.FILE_DOWNLOAD = "FILE_DOWNLOAD";
|
|
2058
2058
|
})(fe || (fe = {}));
|
|
2059
|
-
const
|
|
2060
|
-
function
|
|
2059
|
+
const Xr = "FILE_UPLOAD";
|
|
2060
|
+
function On(e, t, r) {
|
|
2061
2061
|
var s, i, o, a;
|
|
2062
2062
|
const n = [
|
|
2063
2063
|
Wr({
|
|
@@ -2074,17 +2074,17 @@ function gn(e, t, r) {
|
|
|
2074
2074
|
})
|
|
2075
2075
|
];
|
|
2076
2076
|
if (nn(r)) {
|
|
2077
|
-
const u =
|
|
2077
|
+
const u = k(r.currentForm), f = k(t);
|
|
2078
2078
|
return {
|
|
2079
2079
|
errors: Ce(n, f, u)
|
|
2080
2080
|
};
|
|
2081
2081
|
}
|
|
2082
2082
|
if (sn(r)) {
|
|
2083
|
-
const u =
|
|
2083
|
+
const u = k(), f = k(t);
|
|
2084
2084
|
return {
|
|
2085
2085
|
errors: Ce([
|
|
2086
2086
|
...n,
|
|
2087
|
-
|
|
2087
|
+
kr(W((a = e.formsLimit) == null ? void 0 : a.limit), h(r.existingFormsCount, r, "existingFormsCount"))
|
|
2088
2088
|
], f, u)
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
@@ -2093,7 +2093,7 @@ function gn(e, t, r) {
|
|
|
2093
2093
|
function Ce(e, t, r) {
|
|
2094
2094
|
return e.map((n) => n(t, r)).filter(Boolean).map((n) => n);
|
|
2095
2095
|
}
|
|
2096
|
-
const
|
|
2096
|
+
const kr = (e, t) => () => ne(e, t, t + 1) ? Jr(e) : null, Wr = ({ limit: e }) => (t, r) => ne(e, r.inputFieldsCount, t.inputFieldsCount) || le(e, r.inputFieldsCount, t.inputFieldIds, r.inputFieldIds) ? Qr(e) : null, Kr = ({ limit: e }) => (t, r) => ne(e, r.stepsCount, t.stepsCount) || le(e, r.stepsCount, t.stepsIds, r.stepsIds) ? en(e) : null, zr = ({ limit: e }) => (t, r) => ne(e, r.rulesCount, t.rulesCount) || le(e, r.rulesCount, t.rulesIds, r.rulesIds) ? tn(e) : null, Vr = ({ featureRestricted: e }) => (t, r) => Ye(t.fileUploadFieldIds, r.fileUploadFieldIds).length && e(fe.FILE_UPLOAD_FIELD) ? rn() : null;
|
|
2097
2097
|
function Ye(e, t) {
|
|
2098
2098
|
const r = new Set(t);
|
|
2099
2099
|
return e.filter((n) => !r.has(n));
|
|
@@ -2152,7 +2152,7 @@ function rn() {
|
|
|
2152
2152
|
errorMessage: "File upload field is not enabled for the given site"
|
|
2153
2153
|
};
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2155
|
+
function k(e) {
|
|
2156
2156
|
const t = e ?? {}, r = (t.fields ?? []).filter((n) => !!n.target);
|
|
2157
2157
|
return {
|
|
2158
2158
|
inputFieldsCount: r.length,
|
|
@@ -2161,7 +2161,7 @@ function X(e) {
|
|
|
2161
2161
|
inputFieldIds: r.map((n) => n.id),
|
|
2162
2162
|
stepsIds: (t.steps ?? []).map((n) => n.id),
|
|
2163
2163
|
rulesIds: (t.rules ?? []).map((n) => n.id),
|
|
2164
|
-
fileUploadFieldIds: (t.fields ?? []).filter((n) => (n.view ?? {}).fieldType ===
|
|
2164
|
+
fileUploadFieldIds: (t.fields ?? []).filter((n) => (n.view ?? {}).fieldType === Xr).map((n) => n.id)
|
|
2165
2165
|
};
|
|
2166
2166
|
}
|
|
2167
2167
|
function nn(e) {
|
|
@@ -2233,7 +2233,7 @@ function fn(e, t, r) {
|
|
|
2233
2233
|
writable: !0
|
|
2234
2234
|
}) : e[t] = r, e;
|
|
2235
2235
|
}
|
|
2236
|
-
class
|
|
2236
|
+
class gn {
|
|
2237
2237
|
validate(t, r) {
|
|
2238
2238
|
var s;
|
|
2239
2239
|
const n = ((s = t.formFields) == null ? void 0 : s.reduce((i, { inputOptions: o }) => {
|
|
@@ -2276,15 +2276,15 @@ export {
|
|
|
2276
2276
|
S as DateFieldErrorSuffix,
|
|
2277
2277
|
v as DateTimeFieldErrorSuffix,
|
|
2278
2278
|
R as ErrorTypes,
|
|
2279
|
-
|
|
2280
|
-
|
|
2279
|
+
Xr as FILE_UPLOAD_FIELD_TYPE,
|
|
2280
|
+
gn as FormSchemaValidator,
|
|
2281
2281
|
Nn as FormValidator,
|
|
2282
|
-
|
|
2282
|
+
g as ValidationMode,
|
|
2283
2283
|
yn as compareSchemaBackwardCompatibility,
|
|
2284
2284
|
un as getDefaultValue,
|
|
2285
2285
|
Mn as groupErrorsByTarget,
|
|
2286
2286
|
et as isDateAvailable,
|
|
2287
2287
|
Qe as parseDateInput,
|
|
2288
2288
|
Sn as parseLocalDate,
|
|
2289
|
-
|
|
2289
|
+
On as validatePremiumRestrictions
|
|
2290
2290
|
};
|