@nickaux/form-configurator 1.1.215 → 1.1.216
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.
|
@@ -39335,7 +39335,7 @@ const testValue = (operator, testFieldValue, expectedValue) => {
|
|
|
39335
39335
|
}
|
|
39336
39336
|
return true;
|
|
39337
39337
|
default:
|
|
39338
|
-
console.log(`Operator ${operator} is not recognized
|
|
39338
|
+
console.log(`Operator ${operator} is not recognized.`, testFieldValue, expectedValue);
|
|
39339
39339
|
return false;
|
|
39340
39340
|
}
|
|
39341
39341
|
};
|
|
@@ -40211,7 +40211,7 @@ class TypeGroup extends TypeDefault {
|
|
|
40211
40211
|
break;
|
|
40212
40212
|
}
|
|
40213
40213
|
/* @__PURE__ */ jsx$2("label", { children: param.label });
|
|
40214
|
-
outputHtml = /* @__PURE__ */ jsxs("div", {
|
|
40214
|
+
outputHtml = /* @__PURE__ */ jsxs("div", { className: "group-content", children: [
|
|
40215
40215
|
param.customInfo ? /* @__PURE__ */ jsx$2("p", { children: param.customInfo }) : "",
|
|
40216
40216
|
groupItems
|
|
40217
40217
|
] }, param);
|
|
@@ -81701,7 +81701,6 @@ class TypeSelect extends TypeDefault {
|
|
|
81701
81701
|
className: "chips-item input-chip " + ((fieldValue2 == null ? void 0 : fieldValue2.includes(item.value)) ? "item-cheked" : ""),
|
|
81702
81702
|
style: { backgroundColor: (item == null ? void 0 : item.color) ?? "transparent" },
|
|
81703
81703
|
children: [
|
|
81704
|
-
/* @__PURE__ */ jsx$2("div", { className: "icon-checked" }),
|
|
81705
81704
|
/* @__PURE__ */ jsx$2(
|
|
81706
81705
|
"input",
|
|
81707
81706
|
{
|
|
@@ -81716,6 +81715,7 @@ class TypeSelect extends TypeDefault {
|
|
|
81716
81715
|
}
|
|
81717
81716
|
),
|
|
81718
81717
|
/* @__PURE__ */ jsxs("label", { htmlFor: props.id + "_" + i2, children: [
|
|
81718
|
+
/* @__PURE__ */ jsx$2("div", { className: "icon-checked" }),
|
|
81719
81719
|
" ",
|
|
81720
81720
|
item.label
|
|
81721
81721
|
] })
|
|
@@ -136353,7 +136353,7 @@ const getDisplayField = (fieldValue2, param, labelFields) => {
|
|
|
136353
136353
|
detailDisplay,
|
|
136354
136354
|
" "
|
|
136355
136355
|
] }),
|
|
136356
|
-
/* @__PURE__ */ jsx$2("div", {
|
|
136356
|
+
/* @__PURE__ */ jsx$2("div", { className: "img-container", children: /* @__PURE__ */ jsx$2("img", { src: fileSrc }) })
|
|
136357
136357
|
] });
|
|
136358
136358
|
break;
|
|
136359
136359
|
case "mp4":
|
|
@@ -149568,7 +149568,7 @@ function RootForm(props) {
|
|
|
149568
149568
|
return /* @__PURE__ */ jsx$2(ChildComponent, {}, index2);
|
|
149569
149569
|
}) }, "root-form") });
|
|
149570
149570
|
}
|
|
149571
|
-
|
|
149571
|
+
const FormConfigurator = forwardRef(({ form, data: data2, options: options2, parent = {}, routePath = "" }, ref2) => {
|
|
149572
149572
|
const [formManager, setFormManager] = useState();
|
|
149573
149573
|
useEffect(() => {
|
|
149574
149574
|
const manager = new FormManager(form, data2, options2, routePath);
|
|
@@ -149577,6 +149577,9 @@ function FormConfigurator({ form, data: data2, options: options2, parent = {}, r
|
|
|
149577
149577
|
parent.formManager = manager;
|
|
149578
149578
|
}
|
|
149579
149579
|
}, [form, data2, options2, routePath]);
|
|
149580
|
+
useImperativeHandle(ref2, () => ({
|
|
149581
|
+
formManager
|
|
149582
|
+
}), [formManager]);
|
|
149580
149583
|
if (!formManager)
|
|
149581
149584
|
return null;
|
|
149582
149585
|
const LayoutComponent = formManager.layout;
|
|
@@ -149584,7 +149587,7 @@ function FormConfigurator({ form, data: data2, options: options2, parent = {}, r
|
|
|
149584
149587
|
/* @__PURE__ */ jsx$2(FormContext.Provider, { value: formManager, children: /* @__PURE__ */ jsx$2(RootForm, {}) }),
|
|
149585
149588
|
formManager.options.displayData && /* @__PURE__ */ jsx$2(DisplayData, {})
|
|
149586
149589
|
] }) });
|
|
149587
|
-
}
|
|
149590
|
+
});
|
|
149588
149591
|
export {
|
|
149589
149592
|
TypeDefault,
|
|
149590
149593
|
FormConfigurator as default
|