@nickaux/form-configurator 1.1.244 → 1.1.245
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/FormConfigurator.esm.js +22 -5
- package/package.json +1 -1
|
@@ -119738,19 +119738,36 @@ class TypeJson extends TypeDefault {
|
|
|
119738
119738
|
"onChange",
|
|
119739
119739
|
"initComponent"
|
|
119740
119740
|
]);
|
|
119741
|
-
const [b, S] = useState(
|
|
119742
|
-
|
|
119743
|
-
|
|
119741
|
+
const [b, S] = useState(() => {
|
|
119742
|
+
const k = h();
|
|
119743
|
+
if (typeof k == "string") {
|
|
119744
|
+
const F = k.trim();
|
|
119745
|
+
if (F === "")
|
|
119746
|
+
return {};
|
|
119747
|
+
try {
|
|
119748
|
+
return JSON.parse(F);
|
|
119749
|
+
} catch (N) {
|
|
119750
|
+
return {};
|
|
119751
|
+
}
|
|
119752
|
+
}
|
|
119753
|
+
return ["object", "array"].includes(typeof k) ? k : {};
|
|
119754
|
+
});
|
|
119744
119755
|
useRef$1(!1);
|
|
119745
119756
|
const I = (k, F, { contentErrors: N, patchResult: q }) => {
|
|
119746
119757
|
try {
|
|
119747
119758
|
if (k.json)
|
|
119748
119759
|
g && g(k.json);
|
|
119749
119760
|
else if (k.text) {
|
|
119750
|
-
const Y =
|
|
119751
|
-
|
|
119761
|
+
const Y = k.text.trim();
|
|
119762
|
+
if (Y === "") {
|
|
119763
|
+
g && g({});
|
|
119764
|
+
return;
|
|
119765
|
+
}
|
|
119766
|
+
const X = JSON.parse(Y);
|
|
119767
|
+
g && g(X);
|
|
119752
119768
|
}
|
|
119753
119769
|
} catch (Y) {
|
|
119770
|
+
g && g({});
|
|
119754
119771
|
}
|
|
119755
119772
|
}, O = (!p.displayLabel || p.displayLabel !== "notDisplay") && p.label ? /* @__PURE__ */ jsx$2("label", { children: p.label }) : "";
|
|
119756
119773
|
return this.userAllow === "read-only" ? /* @__PURE__ */ jsx$2("p", { children: b }) : /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|