@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
59 lines (58 loc) • 1.7 kB
JavaScript
import { jsx as r } from "react/jsx-runtime";
import { getRegistryEntry as B } from "@open-formulieren/formio-renderer";
import { extractInitialValues as D } from "@open-formulieren/formio-renderer/values.js";
import { Formik as E } from "formik";
import { BuilderContext as R } from "../context.js";
import V from "./designer/FormioDefinitionDesigner.js";
const q = ({
components: i,
onChange: o,
uniquifyKey: e,
supportedLanguageCodes: t = ["nl", "en"],
richTextColors: n,
theme: m,
formType: l,
getFormComponents: a,
getValidatorPlugins: s,
getRegistrationAttributes: f,
getServices: p,
getReferenceListsTables: u,
getReferenceListsTableItems: d,
getPrefillPlugins: c,
getPrefillAttributes: g,
getFileTypes: h,
serverUploadLimit: x,
getAuthPlugins: C,
getMapTileLayers: b,
getMapOverlayTileLayers: v
}) => {
const w = D(i, B);
return /* @__PURE__ */ r(R.Provider, { value: {
uniquifyKey: e,
supportedLanguageCodes: t,
richTextColors: n,
formType: l,
getMapTileLayers: b,
getMapOverlayTileLayers: v,
theme: m,
getFormComponents: a,
getValidatorPlugins: s,
getRegistrationAttributes: f,
getServices: p,
getReferenceListsTables: u,
getReferenceListsTableItems: d,
getPrefillPlugins: c,
getPrefillAttributes: g,
getFileTypes: h,
serverUploadLimit: x,
getAuthPlugins: C
}, children: /* @__PURE__ */ r(E, { enableReinitialize: !0, initialValues: w, onSubmit: () => {
throw new Error("Can't submit preview form");
}, children: /* @__PURE__ */ r(V, { initialComponents: i, onChange: (y, F) => o({
display: "form",
components: y
}, F) }) }) });
};
export {
q as default
};