@opengov/form-renderer 0.2.18-rules-beta.1 → 0.2.18-rules-beta.2
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/lib.js +13 -15
- package/dist/lib.umd.cjs +43 -43
- package/package.json +2 -2
package/dist/lib.js
CHANGED
|
@@ -20799,12 +20799,12 @@ const bf = w0(void 0), v3 = ({
|
|
|
20799
20799
|
name: "Date",
|
|
20800
20800
|
groups: [],
|
|
20801
20801
|
dateFormat: "MM/dd/yyyy",
|
|
20802
|
-
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i }) => /* @__PURE__ */ te.jsx(
|
|
20802
|
+
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i, rules: a }) => /* @__PURE__ */ te.jsx(
|
|
20803
20803
|
z1,
|
|
20804
20804
|
{
|
|
20805
20805
|
name: u ?? e.id,
|
|
20806
20806
|
label: /* @__PURE__ */ te.jsx(Cn, { ...e, readonly: n, icons: i, children: e.label }),
|
|
20807
|
-
rules:
|
|
20807
|
+
rules: { ...ou(e), ...a },
|
|
20808
20808
|
constraints: e.constraints,
|
|
20809
20809
|
dateFormat: r.dateFormat,
|
|
20810
20810
|
disabled: t,
|
|
@@ -20815,12 +20815,12 @@ const bf = w0(void 0), v3 = ({
|
|
|
20815
20815
|
type: "DROPDOWN",
|
|
20816
20816
|
name: "Dropdown",
|
|
20817
20817
|
groups: [],
|
|
20818
|
-
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i }) => /* @__PURE__ */ te.jsx(
|
|
20818
|
+
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i, rules: a }) => /* @__PURE__ */ te.jsx(
|
|
20819
20819
|
c3,
|
|
20820
20820
|
{
|
|
20821
20821
|
name: u ?? e.id,
|
|
20822
20822
|
label: /* @__PURE__ */ te.jsx(Cn, { ...e, readonly: n, icons: i, children: e.label }),
|
|
20823
|
-
rules:
|
|
20823
|
+
rules: { ...ou(e), ...a },
|
|
20824
20824
|
options: e.options,
|
|
20825
20825
|
disabled: t,
|
|
20826
20826
|
readonly: n
|
|
@@ -20830,12 +20830,12 @@ const bf = w0(void 0), v3 = ({
|
|
|
20830
20830
|
type: "CHECKBOX",
|
|
20831
20831
|
name: "Checkbox",
|
|
20832
20832
|
groups: [],
|
|
20833
|
-
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i }) => /* @__PURE__ */ te.jsx(
|
|
20833
|
+
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i, rules: a }) => /* @__PURE__ */ te.jsx(
|
|
20834
20834
|
H1,
|
|
20835
20835
|
{
|
|
20836
20836
|
name: u ?? e.id,
|
|
20837
20837
|
label: /* @__PURE__ */ te.jsx(Cn, { ...e, readonly: n, icons: i, children: e.label }),
|
|
20838
|
-
rules:
|
|
20838
|
+
rules: { ...ou(e), ...a },
|
|
20839
20839
|
disabled: t,
|
|
20840
20840
|
readonly: n
|
|
20841
20841
|
}
|
|
@@ -20846,10 +20846,10 @@ const bf = w0(void 0), v3 = ({
|
|
|
20846
20846
|
groups: [],
|
|
20847
20847
|
maxLength: 262144,
|
|
20848
20848
|
filter: (e) => e.replace(/[^\u0000-\u00FF ]/g, ""),
|
|
20849
|
-
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i }) => /* @__PURE__ */ te.jsx(
|
|
20849
|
+
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i, rules: a }) => /* @__PURE__ */ te.jsx(
|
|
20850
20850
|
W1,
|
|
20851
20851
|
{
|
|
20852
|
-
rules:
|
|
20852
|
+
rules: { ...ou(e), ...a },
|
|
20853
20853
|
label: /* @__PURE__ */ te.jsx(Cn, { ...e, readonly: n, icons: i, children: e.label }),
|
|
20854
20854
|
name: u ?? e.id,
|
|
20855
20855
|
disabled: t,
|
|
@@ -20863,12 +20863,12 @@ const bf = w0(void 0), v3 = ({
|
|
|
20863
20863
|
name: "Number",
|
|
20864
20864
|
groups: [],
|
|
20865
20865
|
decimalPlaces: 14,
|
|
20866
|
-
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i }) => /* @__PURE__ */ te.jsx(
|
|
20866
|
+
renderField: (e, r, { disabled: t, readonly: n, name: u, icons: i, rules: a }) => /* @__PURE__ */ te.jsx(
|
|
20867
20867
|
s3,
|
|
20868
20868
|
{
|
|
20869
20869
|
name: u ?? e.id,
|
|
20870
20870
|
label: /* @__PURE__ */ te.jsx(Cn, { ...e, readonly: n, icons: i, children: e.label }),
|
|
20871
|
-
rules:
|
|
20871
|
+
rules: { ...ou(e), ...a },
|
|
20872
20872
|
disabled: t,
|
|
20873
20873
|
readonly: n,
|
|
20874
20874
|
decimalPlaces: r.decimalPlaces
|
|
@@ -20878,21 +20878,19 @@ const bf = w0(void 0), v3 = ({
|
|
|
20878
20878
|
type: "CALCULATEDNUMBER",
|
|
20879
20879
|
name: "Calculated Number",
|
|
20880
20880
|
groups: [],
|
|
20881
|
-
renderField: (e, r, { readonly: t, name: n, icons: u }) => /* @__PURE__ */ te.jsx(
|
|
20881
|
+
renderField: (e, r, { readonly: t, name: n, icons: u, rules: i }) => /* @__PURE__ */ te.jsx(
|
|
20882
20882
|
o3,
|
|
20883
20883
|
{
|
|
20884
20884
|
name: n ?? e.id,
|
|
20885
20885
|
label: /* @__PURE__ */ te.jsx(Cn, { ...e, readonly: t, icons: u, children: e.label }),
|
|
20886
|
-
rules:
|
|
20886
|
+
rules: i
|
|
20887
20887
|
}
|
|
20888
20888
|
)
|
|
20889
20889
|
}, ou = (e) => ({
|
|
20890
20890
|
required: {
|
|
20891
20891
|
value: e.required ?? !1,
|
|
20892
20892
|
message: "This field is required."
|
|
20893
|
-
}
|
|
20894
|
-
...e.min ? { min: { value: e.min, message: `Value must be at least ${e.min}.` } } : {},
|
|
20895
|
-
...e.max ? { max: { value: e.max, message: `Value must be no more than ${e.max}.` } } : {}
|
|
20893
|
+
}
|
|
20896
20894
|
}), _3 = [
|
|
20897
20895
|
S3,
|
|
20898
20896
|
T3,
|