UNPKG

@react-form-builder/core

Version:

React JSON Schema Form Builder to create complex, validated, reusable forms with no deep React knowledge required

23 lines (22 loc) 1.37 kB
import { jsx as r } from "react/jsx-runtime"; import { useMemo as i } from "react"; import { namedObserver as m } from "../../utils/namedObserver.js"; import { useMobxConfig as a } from "../../utils/useMobxConfig.js"; import { FluentLocalizationEngine as l } from "../localization/fluent/FluentLocalizationEngine.js"; import { ViewerLocalizationProvider as c } from "../localization/ViewerLocalizationProvider.js"; import { SuppressResizeObserverErrors as s } from "../ui/SuppressResizeObserverErrors.js"; import { Viewer as w } from "./components/Viewer.js"; import { ViewerStoreProvider as f } from "./components/ViewerStoreProvider.js"; import { ViewerWrapper as p } from "./components/ViewerWrapper.js"; import { EmbeddedFormViewerProvider as d } from "./EmbeddedFormViewerContext.js"; const V = (e) => { const o = i(() => e.localizationEngine ?? new l(), [e.localizationEngine]), t = i(() => ({ ...e, localizationEngine: o }), [o, e]); return /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(f, { props: t, children: /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(w, {}) }) }) }) }); }, n = m("InternalFormViewer", V), F = (e) => (a(), /* @__PURE__ */ r(d, { value: n, children: /* @__PURE__ */ r(n, { ...e }) })), L = m("FormViewer", F); export { L as FormViewer }; //# sourceMappingURL=FormViewer.js.map