@wix/form-elements 1.108.0 → 1.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-ZAp8oWbK.js → appointment-rac-C9-XwsPI.js} +60 -60
- package/dist/component/{bookings-address-rac-x-Az7vHf.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-MoF_CaqB.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CWh3Rb0M.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-BVTiXUWk.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-kXRRlyHl.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C4Zr6kXE.js → bookings-login-bar-rac-4Mb7MQYe.js} +3 -3
- package/dist/component/{bookings-phone-rac-2rz1m_xi.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BEjGypQw.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-DwEQLIaz.js → checkbox-field-rac-Dwx1leKA.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-BsOww_QB.js → checkbox-group-field-headless-AFWgXzx_.js} +8 -8
- package/dist/component/{checkbox-group-field-rac-DTcZcVS6.js → checkbox-group-field-rac-CO8kmWJp.js} +4 -4
- package/dist/component/{checkbox-group-rac-DQsML-pW.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-irEBBOxP.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-B5bSAYrm.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DyScj8f4.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-C5X9-jXa.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-B0vkfmrS.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Cfil3U_e.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CtPLE-7-.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-YkzsAoBZ.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BS4j8QC-.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-z_9VsEZL.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WFkmKyZv.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-NN3rxosk.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-mdhEC3oq.js → date-input-field-rac-8oERZcqh.js} +64 -64
- package/dist/component/{date-input-rac-CGciuoTx.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-CRZVODfF.js → date-picker-field-rac-CIspU7No.js} +31 -31
- package/dist/component/{date-picker-rac-Bfbvjy8W.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-TDWBXZ44.js → date-time-input-field-rac-0daWK65I.js} +70 -70
- package/dist/component/{date-time-input-rac-DY0qdSix.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BFGM7SOt.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DPZvTeUZ.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Xd5kojsQ.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C0RIdxJW.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D1m8vJvm.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-BC81RFYY.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-Z_ih9FfX.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-s3BOnXuI.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CL3jcezs.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-wz1EyP5b.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-BY4Rf2BP.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-DRJzlsq8.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-BGcRNNAi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-CRAIm8yp.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BlTfOIlE.js → donation-rac-BboGm_k_.js} +74 -74
- package/dist/component/{dropdown-field-headless-DhzRAMcM.js → dropdown-field-headless-BTMJGUwY.js} +10 -10
- package/dist/component/{dropdown-field-rac-DXyY5we-.js → dropdown-field-rac-CDRV8ckB.js} +3 -3
- package/dist/component/{dropdown-rac-C6YM6qxm.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-CAdr7wya.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Z2VMuCbt.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +2 -2
- package/dist/component/{email-input-field-rac-DpkfunVK.js → email-input-field-rac-DdOd86NX.js} +47 -47
- package/dist/component/{events-repeater-rac-CuJkdrPo.js → events-repeater-rac-_VJ30dpB.js} +8 -8
- package/dist/component/{events-rsvp-rac-BKWlSeQ9.js → events-rsvp-rac-DA-261bq.js} +10 -10
- package/dist/component/{field-error-headless-tsg9FQ-_.js → field-error-headless-CovyN0GI.js} +11 -11
- package/dist/component/{field-label-headless-CB8dEat8.js → field-label-headless-DVvX2QaH.js} +4 -4
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/{fixed-payment-rac-CuIQEeHh.js → fixed-payment-rac-DmI6MeKc.js} +15 -15
- package/dist/component/{form-0jt4L5xo.js → form-BTDgyr54.js} +950 -913
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/{header-field-rac-CWVGzxKb.js → header-field-rac-C0rUjmo0.js} +4 -4
- package/dist/component/{header-rac-D6KsV-ko.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-CUCyVS8c.js → image-choice-rac-CQDQ7AlD.js} +9 -9
- package/dist/component/{index-iOqQidgV.js → index-B9QlosT1.js} +2 -2
- package/dist/component/{index-TJSnVtCO.js → index-CNWT9t6j.js} +43 -43
- package/dist/component/{isObjectLike-DQbx8r1c.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DtZ1NTfD.js → multiline-address-field-rac-D8bVxRsD.js} +78 -78
- package/dist/component/{multiline-address-rac-ub-_XzHU.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/{number-input-field-rac-DLItn4DK.js → number-input-field-rac-BaOwQ5Ya.js} +13 -13
- package/dist/component/{number-input-rac-UuxJzqEx.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-Di6q96Rn.js → password-rac-BB9XeSSZ.js} +15 -15
- package/dist/component/{payment-input-rac-CG6c4-Ge.js → payment-input-rac-DwnSV9rM.js} +44 -44
- package/dist/component/{phone-input-field-rac-D4JphCuT.js → phone-input-field-rac-CC3C4ToW.js} +50 -50
- package/dist/component/{phone-rac-_vDw2usa.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-CgxRlj1f.js → product-list-rac-BAESk3B6.js} +50 -50
- package/dist/component/{quiz-radio-group-rac-bi26aGxN.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-DDJq2ESf.js → radio-button-module-classes-CXcn5unY.js} +14 -14
- package/dist/component/{radio-group-field-rac-D1aMVO6l.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-HKC85M6t.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-CpRehxFB.js → rating-input-field-rac-DDHBkR4x.js} +20 -20
- package/dist/component/{rating-input-rac-BMuCZ3oj.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-mZ6xoAOd.js → rich-content-rac.module-B2vsO6fj.js} +1 -1
- package/dist/component/{rich-text-field-rac-CUK8V8Kf.js → rich-text-field-rac-CvKht2eC.js} +4 -4
- package/dist/component/{rich-text-rac-B-7sR2FJ.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-1DDNT5bn.js → service-dropdown-rac-BOpdXNjG.js} +33 -33
- package/dist/component/{services-multi-choice-rac-CB-6dwxz.js → services-multi-choice-rac-t0wdSt_T.js} +13 -13
- package/dist/component/{signature-rac-7XBci6P2.js → signature-rac-2LsIYYIX.js} +133 -133
- package/dist/component/{submit-button-rac-B1-Mk8Gg.js → submit-button-rac-BbE8dS35.js} +17 -17
- package/dist/component/{tags-field-rac-CQ9Y7mq-.js → tags-field-rac-BnsBxReU.js} +32 -32
- package/dist/component/{tags-rac-Visic-Ml.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-C8fP1g-w.js → text-area-field-rac-Ag7_gniM.js} +14 -14
- package/dist/component/{text-area-rac-B6yZxzxm.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CNjbOxD1.js → text-input-field-rac-D3MZ8teu.js} +5 -5
- package/dist/component/{text-input-headless-Bm8PJGep.js → text-input-headless-CwONErsY.js} +3 -3
- package/dist/component/{text-input-rac-BEPC1Z-4.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-3m6C_Jp5.js → time-input-rac-Bs55lTON.js} +27 -27
- package/dist/component/{url-input-field-rac-CIk_6Lf6.js → url-input-field-rac-FG-bCh-E.js} +19 -19
- package/dist/component/{url-input-rac-DyVoygXH.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-McG3ayOT.js → use-dropdown-option-class-name-DjV7FW5y.js} +2 -2
- package/dist/component/{use-element-state-class-name-B9MBWX44.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-r5G_sZsO.js → use-is-forced-open-dropdown-ifUIpuwL.js} +8 -8
- package/dist/component/{use-service-options-base-hcbkvhpw.js → use-service-options-base-B11cq0HH.js} +1 -1
- package/dist/component/{use-text-input-class-name-SnurFqAr.js → use-text-input-class-name-va1PzWFg.js} +2 -2
- package/dist/form.d.ts +18 -0
- package/package.json +2 -2
- package/dist/component/file-upload-rac-ZdgYt646.js +0 -483
package/dist/component/form.js
CHANGED
|
@@ -2,8 +2,8 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "classnames";
|
|
4
4
|
import "@wix/fed-cli-i18next";
|
|
5
|
-
import {
|
|
5
|
+
import { af as f, aA as i } from "./form-BTDgyr54.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
f as default,
|
|
8
|
+
i as defaultProps
|
|
9
9
|
};
|
|
@@ -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 S, T as h } from "./rich-content-rac.module-
|
|
5
|
-
const
|
|
3
|
+
import { b9 as u, aN as i, aM as C, aP as R, an as T, a5 as d } from "./form-BTDgyr54.js";
|
|
4
|
+
import { u as g, R as p, s as S, T as h } from "./rich-content-rac.module-B2vsO6fj.js";
|
|
5
|
+
const f = ({ truncate: t = !0 } = {}) => {
|
|
6
6
|
const { content: a, maxShownParagraphs: s } = u(), n = e.useMemo(() => ({
|
|
7
7
|
colorPalette: R(),
|
|
8
8
|
customStyles: {
|
|
@@ -20,5 +20,5 @@ const y = ({ truncate: t = !0 } = {}) => {
|
|
|
20
20
|
})));
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
f as H
|
|
24
24
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import e, { useMemo as H, useCallback as T, useRef as G } from "react";
|
|
2
2
|
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
3
|
import I from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { b9 as b, b6 as x, bb as P, b2 as B, I as q, U, w, y as V, v as z, p as K, x as Q, f } from "./form-BTDgyr54.js";
|
|
5
5
|
import { CheckboxGroup as Y, CheckboxField as $, CheckboxButton as j } from "react-aria-components";
|
|
6
6
|
import { f as p, a as h } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as J, g as W } from "./field-label-headless-
|
|
8
|
-
import { D as X, E as Z } from "./field-error-headless-
|
|
7
|
+
import { L as J, g as W } from "./field-label-headless-DVvX2QaH.js";
|
|
8
|
+
import { D as X, E as Z } from "./field-error-headless-CovyN0GI.js";
|
|
9
9
|
import { F as ee } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as O } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import { u as oe } from "./use-element-state-class-name-
|
|
12
|
+
import { u as oe } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
13
13
|
const o = ({ children: t, className: s }) => {
|
|
14
|
-
const { id: n, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, onFocus: E, hasError: C, FieldLayout: g } = b(), { inputId: L, labelId: _, ariaDescribedBy: N } = x(), R = p(t, o.Label), S = p(t, o.Options),
|
|
14
|
+
const { id: n, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, onFocus: E, hasError: C, FieldLayout: g } = b(), { inputId: L, labelId: _, ariaDescribedBy: N } = x(), R = p(t, o.Label), S = p(t, o.Options), y = p(t, o.Description), A = p(t, o.Error), D = H(() => a || [], [
|
|
15
15
|
a
|
|
16
16
|
]), M = T((v) => {
|
|
17
17
|
i == null || i(v);
|
|
@@ -31,14 +31,14 @@ const o = ({ children: t, className: s }) => {
|
|
|
31
31
|
}, /* @__PURE__ */ e.createElement(Y, {
|
|
32
32
|
className: s,
|
|
33
33
|
"aria-labelledby": _,
|
|
34
|
-
value:
|
|
34
|
+
value: D,
|
|
35
35
|
onChange: M,
|
|
36
36
|
isDisabled: l,
|
|
37
37
|
isReadOnly: r,
|
|
38
38
|
isRequired: c,
|
|
39
39
|
isInvalid: C
|
|
40
40
|
}, S)),
|
|
41
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
41
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, y)
|
|
42
42
|
});
|
|
43
43
|
}, F = ({ children: t, className: s }) => {
|
|
44
44
|
const { id: n, options: a, numberOfColumns: i } = b(), l = p(t, F.Option);
|
|
@@ -155,7 +155,7 @@ const le = "_group_1yn0h_1", ie = "_options_1yn0h_5", re = "_optionInput_1yn0h_3
|
|
|
155
155
|
}, /* @__PURE__ */ e.createElement(te, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
156
156
|
className: I(K, O.description)
|
|
157
157
|
}, ue));
|
|
158
|
-
},
|
|
158
|
+
}, Ae = () => /* @__PURE__ */ e.createElement(_e, null);
|
|
159
159
|
export {
|
|
160
|
-
|
|
160
|
+
Ae as ImageChoiceRAC
|
|
161
161
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as S, a as p, C as N,
|
|
1
|
+
import { aU as n } from "./form-BTDgyr54.js";
|
|
2
|
+
import { A as S, a as p, C as N, ao as g, aE as q, aF as D, aW as L } from "./form-BTDgyr54.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, av as _, aJ as de, aw as O, ab as Ge, B as Be, ap as qe, ai as He, ah as I, aq as Ee, az as re, at as Fe, c as B, aj as M, aV as Te, al as je, ak as he, am as q } from "./form-BTDgyr54.js";
|
|
2
|
+
import { aQ as Mn } from "./form-BTDgyr54.js";
|
|
3
|
+
import ke from "ajv";
|
|
4
|
+
import Xe 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-C4dDHvuc.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-C4dDHvuc.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: {} }, k = { 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
|
+
})(k, k.exports)), k.exports;
|
|
276
276
|
}
|
|
277
277
|
var Ae = H.exports, Ie;
|
|
278
278
|
function ht() {
|
|
@@ -723,9 +723,9 @@ const oe = "¡--
|
|
|
723
723
|
"za",
|
|
724
724
|
"zh",
|
|
725
725
|
"zu"
|
|
726
|
-
],
|
|
727
|
-
function
|
|
728
|
-
return
|
|
726
|
+
], bt = new Set(St);
|
|
727
|
+
function Ct(e) {
|
|
728
|
+
return bt.has(e);
|
|
729
729
|
}
|
|
730
730
|
function Ft(e) {
|
|
731
731
|
try {
|
|
@@ -750,7 +750,7 @@ const ye = {
|
|
|
750
750
|
email: Pt,
|
|
751
751
|
"color-hex": /^#(?:[0-9A-F]{3,4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,
|
|
752
752
|
currency: gt,
|
|
753
|
-
language:
|
|
753
|
+
language: Ct,
|
|
754
754
|
"time-zone": Ft
|
|
755
755
|
};
|
|
756
756
|
function Ut(e, t, r) {
|
|
@@ -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 ke({
|
|
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), Xe(i), At(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,7 +910,7 @@ 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 kt(e, t) {
|
|
914
914
|
return function(c) {
|
|
915
915
|
const E = c.fields || [], d = c.deletedFields || [], m = E.filter(o), T = d.filter(o), g = r(m, T), N = t === O.UNRESTRICTED_UPDATE ? [] : m.filter((A) => !u(A)).filter(i).map((A) => h(A.target, A, "target"));
|
|
916
916
|
return {
|
|
@@ -967,7 +967,7 @@ function Xt(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 Xt(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 {
|
|
@@ -1338,8 +1338,8 @@ function or() {
|
|
|
1338
1338
|
var g = d[T], N = g.type, A = g.value, P = r[N];
|
|
1339
1339
|
P >= 0 && (m[P] = parseInt(A, 10));
|
|
1340
1340
|
}
|
|
1341
|
-
var D = m[3], F = D === 24 ? 0 : D,
|
|
1342
|
-
return (o.utc(
|
|
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;
|
|
1342
|
+
return (o.utc(b).valueOf() - (L -= L % 1e3)) / 6e4;
|
|
1343
1343
|
}, l = i.prototype;
|
|
1344
1344
|
l.tz = function(c, E) {
|
|
1345
1345
|
c === void 0 && (c = a);
|
|
@@ -1364,11 +1364,11 @@ function or() {
|
|
|
1364
1364
|
}, o.tz = function(c, E, d) {
|
|
1365
1365
|
var m = d && E, T = d || E || a, g = f(+o(), T);
|
|
1366
1366
|
if (typeof c != "string") return o(c).tz(T);
|
|
1367
|
-
var N = (function(F,
|
|
1368
|
-
var
|
|
1369
|
-
if (
|
|
1370
|
-
var se = f(
|
|
1371
|
-
return $ === se ? [
|
|
1367
|
+
var N = (function(F, b, L) {
|
|
1368
|
+
var C = F - 60 * b * 1e3, $ = f(C, L);
|
|
1369
|
+
if (b === $) return [C, b];
|
|
1370
|
+
var se = f(C -= 60 * ($ - b) * 1e3, L);
|
|
1371
|
+
return $ === se ? [C, $] : [F - 60 * Math.min($, se) * 1e3, Math.max($, se)];
|
|
1372
1372
|
})(o.utc(c, m).valueOf(), g, T), A = N[0], P = N[1], D = o(A).utcOffset(P);
|
|
1373
1373
|
return D.$x.$timezone = T, D;
|
|
1374
1374
|
}, o.tz.guess = function() {
|
|
@@ -1419,8 +1419,8 @@ function mr() {
|
|
|
1419
1419
|
D === void 0 && (D = "");
|
|
1420
1420
|
var F = D.match(n);
|
|
1421
1421
|
if (!F) return null;
|
|
1422
|
-
var
|
|
1423
|
-
return
|
|
1422
|
+
var b = ("" + F[0]).match(s) || ["-", 0, 0], L = b[0], C = 60 * +b[1] + +b[2];
|
|
1423
|
+
return C === 0 ? 0 : L === "+" ? C : -C;
|
|
1424
1424
|
})(m), m === null)) return this;
|
|
1425
1425
|
var N = Math.abs(m) <= 16 ? 60 * m : m;
|
|
1426
1426
|
if (N === 0) return this.utc(T);
|
|
@@ -1663,17 +1663,17 @@ function te(e, t) {
|
|
|
1663
1663
|
type: y.OBJECT,
|
|
1664
1664
|
additionalProperties: !1,
|
|
1665
1665
|
properties: r,
|
|
1666
|
-
...
|
|
1666
|
+
...br(e, t)
|
|
1667
1667
|
};
|
|
1668
1668
|
}
|
|
1669
|
-
function
|
|
1669
|
+
function br(e, t) {
|
|
1670
1670
|
return t !== O.UNRESTRICTED_UPDATE ? {
|
|
1671
|
-
required:
|
|
1671
|
+
required: Cr(e.properties)
|
|
1672
1672
|
} : {
|
|
1673
1673
|
required: []
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function Cr(e = {}) {
|
|
1677
1677
|
return Object.keys(e).reduce((r, n) => {
|
|
1678
1678
|
const s = e[n];
|
|
1679
1679
|
return Fr(s) && r.push(n), r;
|
|
@@ -1935,7 +1935,7 @@ 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 ? Xt(wr, this.validationMode ?? O.UNKNOWN) : kt(Y, this.validationMode ?? O.UNKNOWN);
|
|
1939
1939
|
}
|
|
1940
1940
|
initAJvWithSchemas(t, r) {
|
|
1941
1941
|
const n = this.getFormSchemaMapper(), s = jt(n, this.validationMode !== O.UNRESTRICTED_UPDATE, this.lenientPhoneValidation), i = this.formSchemas.flatMap((u) => (u.nestedForms || []).flatMap(({ targets: f, form: l }) => (f || []).map((p) => ({
|
|
@@ -2048,15 +2048,15 @@ function jr(e, t) {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
};
|
|
2050
2050
|
}
|
|
2051
|
-
var
|
|
2051
|
+
var be;
|
|
2052
2052
|
(function(e) {
|
|
2053
2053
|
e.NOT_ASCEND = "NOT_ASCEND", e.FREE = "FREE", e.BASIC = "BASIC", e.PROFESSIONAL = "PROFESSIONAL", e.UNLIMITED = "UNLIMITED";
|
|
2054
|
-
})(
|
|
2054
|
+
})(be || (be = {}));
|
|
2055
2055
|
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
|
|
2059
|
+
const kr = "FILE_UPLOAD";
|
|
2060
2060
|
function gn(e, t, r) {
|
|
2061
2061
|
var s, i, o, a;
|
|
2062
2062
|
const n = [
|
|
@@ -2074,26 +2074,26 @@ function gn(e, t, r) {
|
|
|
2074
2074
|
})
|
|
2075
2075
|
];
|
|
2076
2076
|
if (nn(r)) {
|
|
2077
|
-
const u =
|
|
2077
|
+
const u = X(r.currentForm), f = X(t);
|
|
2078
2078
|
return {
|
|
2079
|
-
errors:
|
|
2079
|
+
errors: Ce(n, f, u)
|
|
2080
2080
|
};
|
|
2081
2081
|
}
|
|
2082
2082
|
if (sn(r)) {
|
|
2083
|
-
const u =
|
|
2083
|
+
const u = X(), f = X(t);
|
|
2084
2084
|
return {
|
|
2085
|
-
errors:
|
|
2085
|
+
errors: Ce([
|
|
2086
2086
|
...n,
|
|
2087
|
-
|
|
2087
|
+
Xr(W((a = e.formsLimit) == null ? void 0 : a.limit), h(r.existingFormsCount, r, "existingFormsCount"))
|
|
2088
2088
|
], f, u)
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
2091
|
throw new Error("Unknown validation action");
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
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 Xr = (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 X(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 k(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 === kr).map((n) => n.id)
|
|
2165
2165
|
};
|
|
2166
2166
|
}
|
|
2167
2167
|
function nn(e) {
|
|
@@ -2276,7 +2276,7 @@ export {
|
|
|
2276
2276
|
S as DateFieldErrorSuffix,
|
|
2277
2277
|
v as DateTimeFieldErrorSuffix,
|
|
2278
2278
|
R as ErrorTypes,
|
|
2279
|
-
|
|
2279
|
+
kr as FILE_UPLOAD_FIELD_TYPE,
|
|
2280
2280
|
On as FormSchemaValidator,
|
|
2281
2281
|
Nn as FormValidator,
|
|
2282
2282
|
O as ValidationMode,
|