@nolwenture/formik-jsonschema-form 2.0.2 → 3.0.0-beta.1
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/README.md +18 -0
- package/dist/cjs/common/types/index.js +2 -0
- package/dist/cjs/index.js +15 -5
- package/dist/cjs/v3/codemod/bindings.js +124 -0
- package/dist/cjs/v3/codemod/cli.js +89 -0
- package/dist/cjs/v3/codemod/migrate.js +21 -0
- package/dist/cjs/v3/codemod/package.js +5 -0
- package/dist/cjs/v3/codemod/slots.js +27 -0
- package/dist/cjs/v3/codemod/transform.js +61 -0
- package/dist/cjs/v3/document/fromDocument.js +50 -0
- package/dist/cjs/v3/document/index.js +9 -0
- package/dist/cjs/v3/document/render.js +22 -0
- package/dist/cjs/v3/raw/compat/v2utils.js +39 -0
- package/dist/cjs/v3/raw/core/arrays.js +55 -0
- package/dist/cjs/v3/raw/core/choiceStyle.js +14 -0
- package/dist/cjs/v3/raw/core/conditionals.js +88 -0
- package/dist/cjs/v3/raw/core/dates.js +74 -0
- package/dist/cjs/v3/raw/core/defaults.js +31 -0
- package/dist/cjs/v3/raw/core/enums.js +37 -0
- package/dist/cjs/v3/raw/core/initialValues.js +68 -0
- package/dist/cjs/v3/raw/core/issues.js +42 -0
- package/dist/cjs/v3/raw/core/json.js +58 -0
- package/dist/cjs/v3/raw/core/merge.js +51 -0
- package/dist/cjs/v3/raw/core/paths.js +88 -0
- package/dist/cjs/v3/raw/core/policies/fileUploadView.js +4 -0
- package/dist/cjs/v3/raw/core/policies/optionalNumberInitial.js +7 -0
- package/dist/cjs/v3/raw/core/policies/storedFormats.js +5 -0
- package/dist/cjs/v3/raw/core/refs.js +104 -0
- package/dist/cjs/v3/raw/core/schemaType.js +75 -0
- package/dist/cjs/v3/raw/core/titles.js +30 -0
- package/dist/cjs/v3/raw/core/trail.js +18 -0
- package/dist/cjs/v3/raw/core/uiProps.js +72 -0
- package/dist/cjs/v3/raw/core/uiSchema.js +56 -0
- package/dist/cjs/v3/raw/dom/bind.js +84 -0
- package/dist/cjs/v3/raw/dom/build.js +27 -0
- package/dist/cjs/v3/raw/dom/controller.js +87 -0
- package/dist/cjs/v3/raw/dom/core.js +67 -0
- package/dist/cjs/v3/raw/dom/delegate.js +31 -0
- package/dist/cjs/v3/raw/dom/effects.js +67 -0
- package/dist/cjs/v3/raw/dom/elements.js +88 -0
- package/dist/cjs/v3/raw/dom/emitter.js +47 -0
- package/dist/cjs/v3/raw/dom/nodes.js +25 -0
- package/dist/cjs/v3/raw/dom/render.js +122 -0
- package/dist/cjs/v3/raw/dom/upload.js +186 -0
- package/dist/cjs/v3/raw/i18n/en.js +47 -0
- package/dist/cjs/v3/raw/i18n/fi.js +44 -0
- package/dist/cjs/v3/raw/i18n/index.js +14 -0
- package/dist/cjs/v3/raw/index.js +98 -0
- package/dist/cjs/v3/raw/model/classes.js +9 -0
- package/dist/cjs/v3/raw/model/form/actions.js +154 -0
- package/dist/cjs/v3/raw/model/form/any.js +27 -0
- package/dist/cjs/v3/raw/model/form/appearance.js +32 -0
- package/dist/cjs/v3/raw/model/form/array.js +69 -0
- package/dist/cjs/v3/raw/model/form/choice.js +74 -0
- package/dist/cjs/v3/raw/model/form/chrome.js +65 -0
- package/dist/cjs/v3/raw/model/form/componentTable.js +148 -0
- package/dist/cjs/v3/raw/model/form/date.js +53 -0
- package/dist/cjs/v3/raw/model/form/dispatch.js +119 -0
- package/dist/cjs/v3/raw/model/form/iconData.js +19 -0
- package/dist/cjs/v3/raw/model/form/icons.js +10 -0
- package/dist/cjs/v3/raw/model/form/index.js +43 -0
- package/dist/cjs/v3/raw/model/form/leaf.js +99 -0
- package/dist/cjs/v3/raw/model/form/markup.js +46 -0
- package/dist/cjs/v3/raw/model/form/object.js +105 -0
- package/dist/cjs/v3/raw/model/form/parts.js +26 -0
- package/dist/cjs/v3/raw/model/form/searchable.js +81 -0
- package/dist/cjs/v3/raw/model/form/templated.js +22 -0
- package/dist/cjs/v3/raw/model/form/upload.js +88 -0
- package/dist/cjs/v3/raw/model/styledChains.js +43 -0
- package/dist/cjs/v3/raw/model/view/build.js +165 -0
- package/dist/cjs/v3/raw/model/view/fields.js +102 -0
- package/dist/cjs/v3/raw/model/view/index.js +10 -0
- package/dist/cjs/v3/raw/model/view/markup.js +62 -0
- package/dist/cjs/v3/raw/model/view/toVNode.js +67 -0
- package/dist/cjs/v3/raw/model/view/values.js +58 -0
- package/dist/cjs/v3/raw/model/vnode.js +21 -0
- package/dist/cjs/v3/raw/sanitize/index.js +10 -0
- package/dist/cjs/v3/raw/sanitize/sanitizeHtml.js +128 -0
- package/dist/cjs/v3/raw/serialize/toDOM.js +150 -0
- package/dist/cjs/v3/raw/serialize/toString.js +58 -0
- package/dist/cjs/v3/raw/store/createStore.js +133 -0
- package/dist/cjs/v3/raw/styles/color.js +112 -0
- package/dist/cjs/v3/raw/styles/colorNames.js +30 -0
- package/dist/cjs/v3/raw/styles/defaultStyles.js +114 -0
- package/dist/cjs/v3/raw/styles/index.js +24 -0
- package/dist/cjs/v3/raw/styles/themeToCssVars.js +60 -0
- package/dist/cjs/v3/raw/styles/vars.js +28 -0
- package/dist/cjs/v3/raw/validation/arrays.js +78 -0
- package/dist/cjs/v3/raw/validation/conditions.js +63 -0
- package/dist/cjs/v3/raw/validation/index.js +182 -0
- package/dist/cjs/v3/raw/validation/keywords.js +113 -0
- package/dist/cjs/v3/raw/validation/messages.js +14 -0
- package/dist/cjs/v3/raw/validation/patterns.js +74 -0
- package/dist/cjs/v3/react/chain.js +7 -0
- package/dist/cjs/v3/react/compat.js +11 -0
- package/dist/cjs/v3/react/componentsProp.js +23 -0
- package/dist/cjs/v3/react/defined.js +6 -0
- package/dist/cjs/v3/react/ejs/EJSField.js +75 -0
- package/dist/cjs/v3/react/ejs/index.js +8 -0
- package/dist/cjs/v3/react/form/components.js +105 -0
- package/dist/cjs/v3/react/form/fields.js +75 -0
- package/dist/cjs/v3/react/form/host.js +100 -0
- package/dist/cjs/{Form/FormRegistry.js → v3/react/form/registry.js} +6 -7
- package/dist/cjs/v3/react/form/root.js +42 -0
- package/dist/cjs/v3/react/form/runtime.js +117 -0
- package/dist/cjs/v3/react/form/templates.js +58 -0
- package/dist/cjs/v3/react/form/upload.js +173 -0
- package/dist/cjs/v3/react/form/uploadContexts.js +27 -0
- package/dist/cjs/v3/react/form/useSetDefault.js +21 -0
- package/dist/cjs/v3/react/hostCore.js +59 -0
- package/dist/cjs/v3/react/index.js +45 -0
- package/dist/cjs/v3/react/selector.js +17 -0
- package/dist/cjs/v3/react/slots.js +19 -0
- package/dist/cjs/v3/react/toReact.js +63 -0
- package/dist/cjs/v3/react/view/components.js +63 -0
- package/dist/cjs/v3/react/view/fields.js +46 -0
- package/dist/cjs/v3/react/view/host.js +36 -0
- package/dist/cjs/v3/react/view/registry.js +20 -0
- package/dist/cjs/v3/react/view/root.js +37 -0
- package/dist/cjs/v3/react/view/templates.js +50 -0
- package/dist/esm/common/types/index.js +2 -0
- package/dist/esm/index.js +8 -5
- package/dist/esm/v3/document/fromDocument.js +46 -0
- package/dist/esm/v3/document/index.js +4 -0
- package/dist/esm/v3/document/render.js +18 -0
- package/dist/esm/v3/raw/compat/v2utils.js +15 -0
- package/dist/esm/v3/raw/core/arrays.js +49 -0
- package/dist/esm/v3/raw/core/choiceStyle.js +10 -0
- package/dist/esm/v3/raw/core/conditionals.js +82 -0
- package/dist/esm/v3/raw/core/dates.js +66 -0
- package/dist/esm/v3/raw/core/defaults.js +25 -0
- package/dist/esm/v3/raw/core/enums.js +32 -0
- package/dist/esm/v3/raw/core/initialValues.js +65 -0
- package/dist/esm/v3/raw/core/issues.js +36 -0
- package/dist/esm/v3/raw/core/json.js +49 -0
- package/dist/esm/v3/raw/core/merge.js +47 -0
- package/dist/esm/v3/raw/core/paths.js +79 -0
- package/dist/esm/v3/raw/core/policies/fileUploadView.js +1 -0
- package/dist/esm/v3/raw/core/policies/optionalNumberInitial.js +3 -0
- package/dist/esm/v3/raw/core/policies/storedFormats.js +2 -0
- package/dist/esm/v3/raw/core/refs.js +97 -0
- package/dist/esm/v3/raw/core/schemaType.js +68 -0
- package/dist/esm/v3/raw/core/titles.js +25 -0
- package/dist/esm/v3/raw/core/trail.js +14 -0
- package/dist/esm/v3/raw/core/uiProps.js +68 -0
- package/dist/esm/v3/raw/core/uiSchema.js +47 -0
- package/dist/esm/v3/raw/dom/bind.js +80 -0
- package/dist/esm/v3/raw/dom/build.js +23 -0
- package/dist/esm/v3/raw/dom/controller.js +83 -0
- package/dist/esm/v3/raw/dom/core.js +63 -0
- package/dist/esm/v3/raw/dom/delegate.js +25 -0
- package/dist/esm/v3/raw/dom/effects.js +62 -0
- package/dist/esm/v3/raw/dom/elements.js +84 -0
- package/dist/esm/v3/raw/dom/emitter.js +43 -0
- package/dist/esm/v3/raw/dom/nodes.js +20 -0
- package/dist/esm/v3/raw/dom/render.js +118 -0
- package/dist/esm/v3/raw/dom/upload.js +182 -0
- package/dist/esm/v3/raw/i18n/en.js +44 -0
- package/dist/esm/v3/raw/i18n/fi.js +41 -0
- package/dist/esm/v3/raw/i18n/index.js +9 -0
- package/dist/esm/v3/raw/index.js +33 -0
- package/dist/esm/v3/raw/model/classes.js +5 -0
- package/dist/esm/v3/raw/model/form/actions.js +150 -0
- package/dist/esm/v3/raw/model/form/any.js +23 -0
- package/dist/esm/v3/raw/model/form/appearance.js +27 -0
- package/dist/esm/v3/raw/model/form/array.js +65 -0
- package/dist/esm/v3/raw/model/form/choice.js +65 -0
- package/dist/esm/v3/raw/model/form/chrome.js +58 -0
- package/dist/esm/v3/raw/model/form/componentTable.js +145 -0
- package/dist/esm/v3/raw/model/form/date.js +48 -0
- package/dist/esm/v3/raw/model/form/dispatch.js +114 -0
- package/dist/esm/v3/raw/model/form/iconData.js +16 -0
- package/dist/esm/v3/raw/model/form/icons.js +6 -0
- package/dist/esm/v3/raw/model/form/index.js +32 -0
- package/dist/esm/v3/raw/model/form/leaf.js +89 -0
- package/dist/esm/v3/raw/model/form/markup.js +35 -0
- package/dist/esm/v3/raw/model/form/object.js +100 -0
- package/dist/esm/v3/raw/model/form/parts.js +21 -0
- package/dist/esm/v3/raw/model/form/searchable.js +76 -0
- package/dist/esm/v3/raw/model/form/templated.js +17 -0
- package/dist/esm/v3/raw/model/form/upload.js +81 -0
- package/dist/esm/v3/raw/model/styledChains.js +40 -0
- package/dist/esm/v3/raw/model/view/build.js +158 -0
- package/dist/esm/v3/raw/model/view/fields.js +90 -0
- package/dist/esm/v3/raw/model/view/index.js +6 -0
- package/dist/esm/v3/raw/model/view/markup.js +48 -0
- package/dist/esm/v3/raw/model/view/toVNode.js +63 -0
- package/dist/esm/v3/raw/model/view/values.js +50 -0
- package/dist/esm/v3/raw/model/vnode.js +13 -0
- package/dist/esm/v3/raw/sanitize/index.js +2 -0
- package/dist/esm/v3/raw/sanitize/sanitizeHtml.js +119 -0
- package/dist/esm/v3/raw/serialize/toDOM.js +145 -0
- package/dist/esm/v3/raw/serialize/toString.js +52 -0
- package/dist/esm/v3/raw/store/createStore.js +126 -0
- package/dist/esm/v3/raw/styles/color.js +104 -0
- package/dist/esm/v3/raw/styles/colorNames.js +27 -0
- package/dist/esm/v3/raw/styles/defaultStyles.js +111 -0
- package/dist/esm/v3/raw/styles/index.js +14 -0
- package/dist/esm/v3/raw/styles/themeToCssVars.js +55 -0
- package/dist/esm/v3/raw/styles/vars.js +24 -0
- package/dist/esm/v3/raw/validation/arrays.js +40 -0
- package/dist/esm/v3/raw/validation/conditions.js +60 -0
- package/dist/esm/v3/raw/validation/index.js +146 -0
- package/dist/esm/v3/raw/validation/keywords.js +73 -0
- package/dist/esm/v3/raw/validation/messages.js +10 -0
- package/dist/esm/v3/raw/validation/patterns.js +68 -0
- package/dist/esm/v3/react/chain.js +4 -0
- package/dist/esm/v3/react/compat.js +8 -0
- package/dist/esm/v3/react/componentsProp.js +18 -0
- package/dist/esm/v3/react/defined.js +2 -0
- package/dist/esm/v3/react/ejs/EJSField.js +67 -0
- package/dist/esm/v3/react/ejs/index.js +3 -0
- package/dist/esm/v3/react/form/components.js +101 -0
- package/dist/esm/v3/react/form/fields.js +70 -0
- package/dist/esm/v3/react/form/host.js +95 -0
- package/dist/esm/{Form/FormRegistry.js → v3/react/form/registry.js} +5 -3
- package/dist/esm/v3/react/form/root.js +38 -0
- package/dist/esm/v3/react/form/runtime.js +113 -0
- package/dist/esm/v3/react/form/templates.js +55 -0
- package/dist/esm/v3/react/form/upload.js +168 -0
- package/dist/esm/v3/react/form/uploadContexts.js +24 -0
- package/dist/esm/v3/react/form/useSetDefault.js +17 -0
- package/dist/esm/v3/react/hostCore.js +52 -0
- package/dist/esm/v3/react/index.js +18 -0
- package/dist/esm/v3/react/selector.js +13 -0
- package/dist/esm/v3/react/slots.js +15 -0
- package/dist/esm/v3/react/toReact.js +58 -0
- package/dist/esm/v3/react/view/components.js +59 -0
- package/dist/esm/v3/react/view/fields.js +43 -0
- package/dist/esm/v3/react/view/host.js +32 -0
- package/dist/esm/v3/react/view/registry.js +16 -0
- package/dist/esm/v3/react/view/root.js +33 -0
- package/dist/esm/v3/react/view/templates.js +47 -0
- package/dist/types/common/types/Form.d.ts +9 -32
- package/dist/types/common/types/Utils.d.ts +11 -0
- package/dist/types/common/types/index.d.ts +2 -0
- package/dist/types/index.d.ts +6 -4
- package/dist/types/v3/codemod/bindings.d.ts +18 -0
- package/dist/types/v3/codemod/cli.d.ts +2 -0
- package/dist/types/v3/codemod/migrate.d.ts +8 -0
- package/dist/types/v3/codemod/package.d.ts +2 -0
- package/dist/types/v3/codemod/slots.d.ts +13 -0
- package/dist/types/v3/codemod/transform.d.ts +29 -0
- package/dist/types/v3/document/fromDocument.d.ts +22 -0
- package/dist/types/v3/document/index.d.ts +4 -0
- package/dist/types/v3/document/render.d.ts +11 -0
- package/dist/types/v3/raw/compat/v2utils.d.ts +14 -0
- package/dist/types/v3/raw/core/arrays.d.ts +22 -0
- package/dist/types/v3/raw/core/choiceStyle.d.ts +4 -0
- package/dist/types/v3/raw/core/conditionals.d.ts +6 -0
- package/dist/types/v3/raw/core/dates.d.ts +8 -0
- package/dist/types/v3/raw/core/defaults.d.ts +15 -0
- package/dist/types/v3/raw/core/enums.d.ts +18 -0
- package/dist/types/v3/raw/core/initialValues.d.ts +12 -0
- package/dist/types/v3/raw/core/issues.d.ts +17 -0
- package/dist/types/v3/raw/core/json.d.ts +52 -0
- package/dist/types/v3/raw/core/merge.d.ts +6 -0
- package/dist/types/v3/raw/core/paths.d.ts +17 -0
- package/dist/types/v3/raw/core/policies/fileUploadView.d.ts +2 -0
- package/dist/types/v3/raw/core/policies/optionalNumberInitial.d.ts +4 -0
- package/dist/types/v3/raw/core/policies/storedFormats.d.ts +4 -0
- package/dist/types/v3/raw/core/refs.d.ts +41 -0
- package/dist/types/v3/raw/core/schemaType.d.ts +16 -0
- package/dist/types/v3/raw/core/titles.d.ts +2 -0
- package/dist/types/v3/raw/core/trail.d.ts +5 -0
- package/dist/types/v3/raw/core/uiProps.d.ts +12 -0
- package/dist/types/v3/raw/core/uiSchema.d.ts +19 -0
- package/dist/types/v3/raw/dom/bind.d.ts +2 -0
- package/dist/types/v3/raw/dom/build.d.ts +10 -0
- package/dist/types/v3/raw/dom/controller.d.ts +37 -0
- package/dist/types/v3/raw/dom/core.d.ts +43 -0
- package/dist/types/v3/raw/dom/delegate.d.ts +18 -0
- package/dist/types/v3/raw/dom/effects.d.ts +18 -0
- package/dist/types/v3/raw/dom/elements.d.ts +17 -0
- package/dist/types/v3/raw/dom/emitter.d.ts +8 -0
- package/dist/types/v3/raw/dom/nodes.d.ts +3 -0
- package/dist/types/v3/raw/dom/render.d.ts +2 -0
- package/dist/types/v3/raw/dom/types.d.ts +112 -0
- package/dist/types/v3/raw/dom/upload.d.ts +16 -0
- package/dist/types/v3/raw/i18n/en.d.ts +42 -0
- package/dist/types/v3/raw/i18n/fi.d.ts +2 -0
- package/dist/types/v3/raw/i18n/index.d.ts +9 -0
- package/dist/types/v3/raw/index.d.ts +43 -0
- package/dist/types/v3/raw/model/classes.d.ts +2 -0
- package/dist/types/v3/raw/model/form/actions.d.ts +41 -0
- package/dist/types/v3/raw/model/form/any.d.ts +5 -0
- package/dist/types/v3/raw/model/form/appearance.d.ts +9 -0
- package/dist/types/v3/raw/model/form/array.d.ts +4 -0
- package/dist/types/v3/raw/model/form/choice.d.ts +16 -0
- package/dist/types/v3/raw/model/form/chrome.d.ts +20 -0
- package/dist/types/v3/raw/model/form/componentTable.d.ts +2 -0
- package/dist/types/v3/raw/model/form/date.d.ts +13 -0
- package/dist/types/v3/raw/model/form/dispatch.d.ts +13 -0
- package/dist/types/v3/raw/model/form/iconData.d.ts +4 -0
- package/dist/types/v3/raw/model/form/icons.d.ts +2 -0
- package/dist/types/v3/raw/model/form/index.d.ts +38 -0
- package/dist/types/v3/raw/model/form/leaf.d.ts +29 -0
- package/dist/types/v3/raw/model/form/markup.d.ts +39 -0
- package/dist/types/v3/raw/model/form/object.d.ts +9 -0
- package/dist/types/v3/raw/model/form/parts.d.ts +10 -0
- package/dist/types/v3/raw/model/form/searchable.d.ts +5 -0
- package/dist/types/v3/raw/model/form/templated.d.ts +14 -0
- package/dist/types/v3/raw/model/form/types.d.ts +179 -0
- package/dist/types/v3/raw/model/form/upload.d.ts +28 -0
- package/dist/types/v3/raw/model/host.d.ts +46 -0
- package/dist/types/v3/raw/model/styledChains.d.ts +1 -0
- package/dist/types/v3/raw/model/view/build.d.ts +21 -0
- package/dist/types/v3/raw/model/view/fields.d.ts +31 -0
- package/dist/types/v3/raw/model/view/index.d.ts +6 -0
- package/dist/types/v3/raw/model/view/markup.d.ts +39 -0
- package/dist/types/v3/raw/model/view/toVNode.d.ts +3 -0
- package/dist/types/v3/raw/model/view/types.d.ts +109 -0
- package/dist/types/v3/raw/model/view/values.d.ts +10 -0
- package/dist/types/v3/raw/model/vnode.d.ts +24 -0
- package/dist/types/v3/raw/sanitize/index.d.ts +2 -0
- package/dist/types/v3/raw/sanitize/sanitizeHtml.d.ts +30 -0
- package/dist/types/v3/raw/serialize/toDOM.d.ts +14 -0
- package/dist/types/v3/raw/serialize/toString.d.ts +4 -0
- package/dist/types/v3/raw/store/createStore.d.ts +39 -0
- package/dist/types/v3/raw/styles/color.d.ts +15 -0
- package/dist/types/v3/raw/styles/colorNames.d.ts +1 -0
- package/dist/types/v3/raw/styles/defaultStyles.d.ts +1 -0
- package/dist/types/v3/raw/styles/index.d.ts +8 -0
- package/dist/types/v3/raw/styles/themeToCssVars.d.ts +4 -0
- package/dist/types/v3/raw/styles/vars.d.ts +43 -0
- package/dist/types/v3/raw/validation/arrays.d.ts +16 -0
- package/dist/types/v3/raw/validation/conditions.d.ts +10 -0
- package/dist/types/v3/raw/validation/index.d.ts +30 -0
- package/dist/types/v3/raw/validation/keywords.d.ts +10 -0
- package/dist/types/v3/raw/validation/messages.d.ts +8 -0
- package/dist/types/v3/raw/validation/patterns.d.ts +8 -0
- package/dist/types/v3/react/chain.d.ts +1 -0
- package/dist/types/v3/react/compat.d.ts +4 -0
- package/dist/types/v3/react/componentsProp.d.ts +5 -0
- package/dist/types/v3/react/defined.d.ts +1 -0
- package/dist/types/v3/react/ejs/EJSField.d.ts +14 -0
- package/dist/types/v3/react/ejs/index.d.ts +1 -0
- package/dist/types/v3/react/form/components.d.ts +3 -0
- package/dist/types/v3/react/form/fields.d.ts +8 -0
- package/dist/types/v3/react/form/host.d.ts +9 -0
- package/dist/types/v3/react/form/registry.d.ts +46 -0
- package/dist/types/v3/react/form/root.d.ts +32 -0
- package/dist/types/v3/react/form/runtime.d.ts +3 -0
- package/dist/types/v3/react/form/templates.d.ts +1 -0
- package/dist/types/v3/react/form/upload.d.ts +3 -0
- package/dist/types/v3/react/form/uploadContexts.d.ts +34 -0
- package/dist/types/v3/react/form/useSetDefault.d.ts +5 -0
- package/dist/types/v3/react/hostCore.d.ts +24 -0
- package/dist/types/v3/react/index.d.ts +23 -0
- package/dist/types/v3/react/selector.d.ts +10 -0
- package/dist/types/v3/react/slots.d.ts +4 -0
- package/dist/types/v3/react/toReact.d.ts +10 -0
- package/dist/types/v3/react/view/components.d.ts +8 -0
- package/dist/types/v3/react/view/fields.d.ts +4 -0
- package/dist/types/v3/react/view/host.d.ts +6 -0
- package/dist/types/v3/react/view/registry.d.ts +34 -0
- package/dist/types/v3/react/view/root.d.ts +32 -0
- package/dist/types/v3/react/view/templates.d.ts +15 -0
- package/package.json +97 -11
- package/styles.css +187 -0
- package/dist/cjs/Form/Form.js +0 -38
- package/dist/cjs/Form/components/Clickable.js +0 -11
- package/dist/cjs/Form/components/ErrorMessage.js +0 -23
- package/dist/cjs/Form/components/FieldInfo.js +0 -144
- package/dist/cjs/Form/components/FieldInput.js +0 -86
- package/dist/cjs/Form/components/Form.js +0 -52
- package/dist/cjs/Form/components/Icon.js +0 -5
- package/dist/cjs/Form/components/RequiredIndicator.js +0 -9
- package/dist/cjs/Form/components/index.js +0 -58
- package/dist/cjs/Form/fields/AnyField/AnyField.js +0 -30
- package/dist/cjs/Form/fields/AnyField/index.js +0 -38
- package/dist/cjs/Form/fields/AnyField/styledComponents.js +0 -6
- package/dist/cjs/Form/fields/ArrayField/ArrayField.js +0 -130
- package/dist/cjs/Form/fields/ArrayField/index.js +0 -38
- package/dist/cjs/Form/fields/ArrayField/styledComponents.js +0 -22
- package/dist/cjs/Form/fields/BooleanField/BooleanField.js +0 -26
- package/dist/cjs/Form/fields/BooleanField/index.js +0 -38
- package/dist/cjs/Form/fields/BooleanField/styledComponents.js +0 -18
- package/dist/cjs/Form/fields/DateField/DateField.js +0 -26
- package/dist/cjs/Form/fields/DateField/DateInput.js +0 -121
- package/dist/cjs/Form/fields/DateField/dateParsing.js +0 -68
- package/dist/cjs/Form/fields/DateField/index.js +0 -42
- package/dist/cjs/Form/fields/DateField/styledComponents.js +0 -60
- package/dist/cjs/Form/fields/FileUploadField/FileUploadField.js +0 -69
- package/dist/cjs/Form/fields/FileUploadField/FileUploadFieldInput.js +0 -21
- package/dist/cjs/Form/fields/FileUploadField/index.js +0 -41
- package/dist/cjs/Form/fields/FileUploadField/styledComponents.js +0 -63
- package/dist/cjs/Form/fields/FilesUploadField/FilesUploadField.js +0 -102
- package/dist/cjs/Form/fields/FilesUploadField/FilesUploadFieldInput.js +0 -174
- package/dist/cjs/Form/fields/FilesUploadField/index.js +0 -41
- package/dist/cjs/Form/fields/FilesUploadField/styledComponents.js +0 -217
- package/dist/cjs/Form/fields/MultipleChoiceField/MultipleChoiceField.js +0 -35
- package/dist/cjs/Form/fields/MultipleChoiceField/MultipleChoiceFieldInput.js +0 -40
- package/dist/cjs/Form/fields/MultipleChoiceField/index.js +0 -41
- package/dist/cjs/Form/fields/MultipleChoiceField/styledComponents.js +0 -24
- package/dist/cjs/Form/fields/NullField/NullField.js +0 -15
- package/dist/cjs/Form/fields/NullField/index.js +0 -37
- package/dist/cjs/Form/fields/NumberField/NumberField.js +0 -16
- package/dist/cjs/Form/fields/NumberField/index.js +0 -38
- package/dist/cjs/Form/fields/NumberField/styledComponents.js +0 -6
- package/dist/cjs/Form/fields/ObjectField/ObjectField.js +0 -190
- package/dist/cjs/Form/fields/ObjectField/ObjectFieldSection.js +0 -17
- package/dist/cjs/Form/fields/ObjectField/index.js +0 -41
- package/dist/cjs/Form/fields/ObjectField/styledComponents.js +0 -50
- package/dist/cjs/Form/fields/ObjectField/types.js +0 -10
- package/dist/cjs/Form/fields/RadioField/RadioField.js +0 -19
- package/dist/cjs/Form/fields/RadioField/RadioFieldInput.js +0 -11
- package/dist/cjs/Form/fields/RadioField/index.js +0 -41
- package/dist/cjs/Form/fields/RadioField/styledComponents.js +0 -78
- package/dist/cjs/Form/fields/SchemaField/SchemaField.js +0 -38
- package/dist/cjs/Form/fields/SchemaField/index.js +0 -37
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectField.js +0 -20
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectFieldInput.js +0 -27
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/index.js +0 -41
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/styledComponents.js +0 -71
- package/dist/cjs/Form/fields/SearchableSelectField/SearchableSelectField.js +0 -147
- package/dist/cjs/Form/fields/SearchableSelectField/index.js +0 -40
- package/dist/cjs/Form/fields/SearchableSelectField/styledComponents.js +0 -53
- package/dist/cjs/Form/fields/StringField/StringField.js +0 -44
- package/dist/cjs/Form/fields/StringField/index.js +0 -37
- package/dist/cjs/Form/fields/StringField/styledComponents.js +0 -6
- package/dist/cjs/Form/fields/TextAreaField/TextAreaField.js +0 -21
- package/dist/cjs/Form/fields/TextAreaField/index.js +0 -38
- package/dist/cjs/Form/fields/TextAreaField/styledComponents.js +0 -17
- package/dist/cjs/Form/fields/ToggleField/ToggleField.js +0 -19
- package/dist/cjs/Form/fields/ToggleField/ToggleFieldInput.js +0 -11
- package/dist/cjs/Form/fields/ToggleField/index.js +0 -41
- package/dist/cjs/Form/fields/ToggleField/styledComponents.js +0 -58
- package/dist/cjs/Form/fields/index.js +0 -93
- package/dist/cjs/Form/hooks/index.js +0 -17
- package/dist/cjs/Form/hooks/useSetDefault.js +0 -32
- package/dist/cjs/Form/index.js +0 -26
- package/dist/cjs/Form/styles/common.js +0 -259
- package/dist/cjs/Form/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -36
- package/dist/cjs/Form/templates/ArrayFieldTemplate/index.js +0 -38
- package/dist/cjs/Form/templates/ArrayFieldTemplate/styledComponents.js +0 -28
- package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.js +0 -41
- package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/index.js +0 -38
- package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.js +0 -55
- package/dist/cjs/Form/templates/FieldTemplate/FieldTemplate.js +0 -28
- package/dist/cjs/Form/templates/FieldTemplate/index.js +0 -37
- package/dist/cjs/Form/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -32
- package/dist/cjs/Form/templates/ObjectFieldTemplate/index.js +0 -38
- package/dist/cjs/Form/templates/ObjectFieldTemplate/styledComponents.js +0 -57
- package/dist/cjs/Form/templates/index.js +0 -55
- package/dist/cjs/Form/types/index.js +0 -17
- package/dist/cjs/FormView/FormView.js +0 -36
- package/dist/cjs/FormView/FormViewRegistry.js +0 -19
- package/dist/cjs/FormView/components/Field.js +0 -131
- package/dist/cjs/FormView/components/Form.js +0 -9
- package/dist/cjs/FormView/components/Icon.js +0 -7
- package/dist/cjs/FormView/components/index.js +0 -56
- package/dist/cjs/FormView/fields/AnyField.js +0 -26
- package/dist/cjs/FormView/fields/ArrayField.js +0 -32
- package/dist/cjs/FormView/fields/BooleanField.js +0 -33
- package/dist/cjs/FormView/fields/DateField.js +0 -12
- package/dist/cjs/FormView/fields/EJSField.js +0 -39
- package/dist/cjs/FormView/fields/FileUploadField.js +0 -7
- package/dist/cjs/FormView/fields/FilesUploadField.js +0 -7
- package/dist/cjs/FormView/fields/MultipleChoiceField.js +0 -30
- package/dist/cjs/FormView/fields/NullField.js +0 -14
- package/dist/cjs/FormView/fields/NumberField.js +0 -12
- package/dist/cjs/FormView/fields/ObjectField/ObjectField.js +0 -57
- package/dist/cjs/FormView/fields/ObjectField/ObjectFieldSection.js +0 -11
- package/dist/cjs/FormView/fields/ObjectField/index.js +0 -41
- package/dist/cjs/FormView/fields/ObjectField/styledComponents.js +0 -6
- package/dist/cjs/FormView/fields/RadioField.js +0 -15
- package/dist/cjs/FormView/fields/SchemaField.js +0 -38
- package/dist/cjs/FormView/fields/SearchableMultiTagSelectField.js +0 -14
- package/dist/cjs/FormView/fields/SearchableSelectField.js +0 -13
- package/dist/cjs/FormView/fields/StringField.js +0 -24
- package/dist/cjs/FormView/fields/TextAreaField.js +0 -18
- package/dist/cjs/FormView/fields/ToggleField.js +0 -15
- package/dist/cjs/FormView/fields/index.js +0 -81
- package/dist/cjs/FormView/index.js +0 -25
- package/dist/cjs/FormView/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -20
- package/dist/cjs/FormView/templates/ArrayFieldTemplate/index.js +0 -38
- package/dist/cjs/FormView/templates/ArrayFieldTemplate/styledComponents.js +0 -15
- package/dist/cjs/FormView/templates/FieldTemplate/FieldTemplate.js +0 -18
- package/dist/cjs/FormView/templates/FieldTemplate/index.js +0 -37
- package/dist/cjs/FormView/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -30
- package/dist/cjs/FormView/templates/ObjectFieldTemplate/index.js +0 -38
- package/dist/cjs/FormView/templates/ObjectFieldTemplate/styledComponents.js +0 -65
- package/dist/cjs/FormView/templates/index.js +0 -52
- package/dist/cjs/common/FileUploadContext.js +0 -15
- package/dist/cjs/common/FilesUploadContext.js +0 -14
- package/dist/cjs/common/constants.js +0 -13
- package/dist/cjs/common/index.js +0 -20
- package/dist/cjs/utils/createInitialValues.js +0 -38
- package/dist/cjs/utils/createValidationSchema.js +0 -397
- package/dist/cjs/utils/deepOverlap.js +0 -18
- package/dist/cjs/utils/extractUiSchema.js +0 -22
- package/dist/cjs/utils/getEnums.js +0 -56
- package/dist/cjs/utils/getHiddenProperties.js +0 -11
- package/dist/cjs/utils/getStyle.js +0 -21
- package/dist/cjs/utils/getTitleAndDescription.js +0 -19
- package/dist/cjs/utils/getTypes.js +0 -60
- package/dist/cjs/utils/immutablySwapItems.js +0 -10
- package/dist/cjs/utils/index.js +0 -31
- package/dist/cjs/utils/mergeSchemas.js +0 -30
- package/dist/cjs/utils/orderAdditionalProperties.js +0 -12
- package/dist/cjs/utils/orderByUiSchema.js +0 -29
- package/dist/cjs/utils/resolveSchema.js +0 -117
- package/dist/cjs/utils/setTitleValues.js +0 -25
- package/dist/cjs/utils/solveReferences.js +0 -25
- package/dist/esm/Form/Form.js +0 -34
- package/dist/esm/Form/components/Clickable.js +0 -7
- package/dist/esm/Form/components/ErrorMessage.js +0 -16
- package/dist/esm/Form/components/FieldInfo.js +0 -140
- package/dist/esm/Form/components/FieldInput.js +0 -50
- package/dist/esm/Form/components/Form.js +0 -13
- package/dist/esm/Form/components/Icon.js +0 -2
- package/dist/esm/Form/components/RequiredIndicator.js +0 -6
- package/dist/esm/Form/components/index.js +0 -22
- package/dist/esm/Form/fields/AnyField/AnyField.js +0 -26
- package/dist/esm/Form/fields/AnyField/index.js +0 -2
- package/dist/esm/Form/fields/AnyField/styledComponents.js +0 -3
- package/dist/esm/Form/fields/ArrayField/ArrayField.js +0 -126
- package/dist/esm/Form/fields/ArrayField/index.js +0 -2
- package/dist/esm/Form/fields/ArrayField/styledComponents.js +0 -16
- package/dist/esm/Form/fields/BooleanField/BooleanField.js +0 -22
- package/dist/esm/Form/fields/BooleanField/index.js +0 -2
- package/dist/esm/Form/fields/BooleanField/styledComponents.js +0 -15
- package/dist/esm/Form/fields/DateField/DateField.js +0 -22
- package/dist/esm/Form/fields/DateField/DateInput.js +0 -117
- package/dist/esm/Form/fields/DateField/dateParsing.js +0 -62
- package/dist/esm/Form/fields/DateField/index.js +0 -3
- package/dist/esm/Form/fields/DateField/styledComponents.js +0 -54
- package/dist/esm/Form/fields/FileUploadField/FileUploadField.js +0 -65
- package/dist/esm/Form/fields/FileUploadField/FileUploadFieldInput.js +0 -17
- package/dist/esm/Form/fields/FileUploadField/index.js +0 -5
- package/dist/esm/Form/fields/FileUploadField/styledComponents.js +0 -57
- package/dist/esm/Form/fields/FilesUploadField/FilesUploadField.js +0 -98
- package/dist/esm/Form/fields/FilesUploadField/FilesUploadFieldInput.js +0 -137
- package/dist/esm/Form/fields/FilesUploadField/index.js +0 -5
- package/dist/esm/Form/fields/FilesUploadField/styledComponents.js +0 -211
- package/dist/esm/Form/fields/MultipleChoiceField/MultipleChoiceField.js +0 -31
- package/dist/esm/Form/fields/MultipleChoiceField/MultipleChoiceFieldInput.js +0 -36
- package/dist/esm/Form/fields/MultipleChoiceField/index.js +0 -5
- package/dist/esm/Form/fields/MultipleChoiceField/styledComponents.js +0 -18
- package/dist/esm/Form/fields/NullField/NullField.js +0 -11
- package/dist/esm/Form/fields/NullField/index.js +0 -1
- package/dist/esm/Form/fields/NumberField/NumberField.js +0 -12
- package/dist/esm/Form/fields/NumberField/index.js +0 -2
- package/dist/esm/Form/fields/NumberField/styledComponents.js +0 -3
- package/dist/esm/Form/fields/ObjectField/ObjectField.js +0 -186
- package/dist/esm/Form/fields/ObjectField/ObjectFieldSection.js +0 -13
- package/dist/esm/Form/fields/ObjectField/index.js +0 -5
- package/dist/esm/Form/fields/ObjectField/styledComponents.js +0 -47
- package/dist/esm/Form/fields/ObjectField/types.js +0 -7
- package/dist/esm/Form/fields/RadioField/RadioField.js +0 -15
- package/dist/esm/Form/fields/RadioField/RadioFieldInput.js +0 -7
- package/dist/esm/Form/fields/RadioField/index.js +0 -5
- package/dist/esm/Form/fields/RadioField/styledComponents.js +0 -75
- package/dist/esm/Form/fields/SchemaField/SchemaField.js +0 -34
- package/dist/esm/Form/fields/SchemaField/index.js +0 -1
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectField.js +0 -16
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectFieldInput.js +0 -23
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/index.js +0 -5
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/styledComponents.js +0 -68
- package/dist/esm/Form/fields/SearchableSelectField/SearchableSelectField.js +0 -143
- package/dist/esm/Form/fields/SearchableSelectField/index.js +0 -4
- package/dist/esm/Form/fields/SearchableSelectField/styledComponents.js +0 -50
- package/dist/esm/Form/fields/StringField/StringField.js +0 -40
- package/dist/esm/Form/fields/StringField/index.js +0 -1
- package/dist/esm/Form/fields/StringField/styledComponents.js +0 -3
- package/dist/esm/Form/fields/TextAreaField/TextAreaField.js +0 -17
- package/dist/esm/Form/fields/TextAreaField/index.js +0 -2
- package/dist/esm/Form/fields/TextAreaField/styledComponents.js +0 -11
- package/dist/esm/Form/fields/ToggleField/ToggleField.js +0 -15
- package/dist/esm/Form/fields/ToggleField/ToggleFieldInput.js +0 -7
- package/dist/esm/Form/fields/ToggleField/index.js +0 -5
- package/dist/esm/Form/fields/ToggleField/styledComponents.js +0 -55
- package/dist/esm/Form/fields/index.js +0 -57
- package/dist/esm/Form/hooks/index.js +0 -1
- package/dist/esm/Form/hooks/useSetDefault.js +0 -28
- package/dist/esm/Form/index.js +0 -7
- package/dist/esm/Form/styles/common.js +0 -256
- package/dist/esm/Form/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -32
- package/dist/esm/Form/templates/ArrayFieldTemplate/index.js +0 -2
- package/dist/esm/Form/templates/ArrayFieldTemplate/styledComponents.js +0 -24
- package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.js +0 -37
- package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/index.js +0 -2
- package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.js +0 -51
- package/dist/esm/Form/templates/FieldTemplate/FieldTemplate.js +0 -24
- package/dist/esm/Form/templates/FieldTemplate/index.js +0 -1
- package/dist/esm/Form/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -28
- package/dist/esm/Form/templates/ObjectFieldTemplate/index.js +0 -2
- package/dist/esm/Form/templates/ObjectFieldTemplate/styledComponents.js +0 -53
- package/dist/esm/Form/templates/index.js +0 -19
- package/dist/esm/Form/types/index.js +0 -1
- package/dist/esm/FormView/FormView.js +0 -29
- package/dist/esm/FormView/FormViewRegistry.js +0 -13
- package/dist/esm/FormView/components/Field.js +0 -123
- package/dist/esm/FormView/components/Form.js +0 -6
- package/dist/esm/FormView/components/Icon.js +0 -4
- package/dist/esm/FormView/components/index.js +0 -17
- package/dist/esm/FormView/fields/AnyField.js +0 -22
- package/dist/esm/FormView/fields/ArrayField.js +0 -28
- package/dist/esm/FormView/fields/BooleanField.js +0 -29
- package/dist/esm/FormView/fields/DateField.js +0 -8
- package/dist/esm/FormView/fields/EJSField.js +0 -32
- package/dist/esm/FormView/fields/FileUploadField.js +0 -3
- package/dist/esm/FormView/fields/FilesUploadField.js +0 -3
- package/dist/esm/FormView/fields/MultipleChoiceField.js +0 -26
- package/dist/esm/FormView/fields/NullField.js +0 -10
- package/dist/esm/FormView/fields/NumberField.js +0 -8
- package/dist/esm/FormView/fields/ObjectField/ObjectField.js +0 -53
- package/dist/esm/FormView/fields/ObjectField/ObjectFieldSection.js +0 -7
- package/dist/esm/FormView/fields/ObjectField/index.js +0 -5
- package/dist/esm/FormView/fields/ObjectField/styledComponents.js +0 -3
- package/dist/esm/FormView/fields/RadioField.js +0 -11
- package/dist/esm/FormView/fields/SchemaField.js +0 -34
- package/dist/esm/FormView/fields/SearchableMultiTagSelectField.js +0 -10
- package/dist/esm/FormView/fields/SearchableSelectField.js +0 -9
- package/dist/esm/FormView/fields/StringField.js +0 -20
- package/dist/esm/FormView/fields/TextAreaField.js +0 -14
- package/dist/esm/FormView/fields/ToggleField.js +0 -11
- package/dist/esm/FormView/fields/index.js +0 -45
- package/dist/esm/FormView/index.js +0 -6
- package/dist/esm/FormView/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -16
- package/dist/esm/FormView/templates/ArrayFieldTemplate/index.js +0 -2
- package/dist/esm/FormView/templates/ArrayFieldTemplate/styledComponents.js +0 -11
- package/dist/esm/FormView/templates/FieldTemplate/FieldTemplate.js +0 -14
- package/dist/esm/FormView/templates/FieldTemplate/index.js +0 -1
- package/dist/esm/FormView/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -26
- package/dist/esm/FormView/templates/ObjectFieldTemplate/index.js +0 -2
- package/dist/esm/FormView/templates/ObjectFieldTemplate/styledComponents.js +0 -58
- package/dist/esm/FormView/templates/index.js +0 -16
- package/dist/esm/common/FileUploadContext.js +0 -12
- package/dist/esm/common/FilesUploadContext.js +0 -11
- package/dist/esm/common/constants.js +0 -10
- package/dist/esm/common/index.js +0 -4
- package/dist/esm/utils/createInitialValues.js +0 -35
- package/dist/esm/utils/createValidationSchema.js +0 -361
- package/dist/esm/utils/deepOverlap.js +0 -14
- package/dist/esm/utils/extractUiSchema.js +0 -18
- package/dist/esm/utils/getEnums.js +0 -51
- package/dist/esm/utils/getHiddenProperties.js +0 -7
- package/dist/esm/utils/getStyle.js +0 -18
- package/dist/esm/utils/getTitleAndDescription.js +0 -14
- package/dist/esm/utils/getTypes.js +0 -53
- package/dist/esm/utils/immutablySwapItems.js +0 -7
- package/dist/esm/utils/index.js +0 -15
- package/dist/esm/utils/mergeSchemas.js +0 -26
- package/dist/esm/utils/orderAdditionalProperties.js +0 -9
- package/dist/esm/utils/orderByUiSchema.js +0 -26
- package/dist/esm/utils/resolveSchema.js +0 -112
- package/dist/esm/utils/setTitleValues.js +0 -21
- package/dist/esm/utils/solveReferences.js +0 -22
- package/dist/types/Form/Form.d.ts +0 -2
- package/dist/types/Form/FormRegistry.d.ts +0 -3
- package/dist/types/Form/components/Clickable.d.ts +0 -15
- package/dist/types/Form/components/ErrorMessage.d.ts +0 -3
- package/dist/types/Form/components/FieldInfo.d.ts +0 -10
- package/dist/types/Form/components/FieldInput.d.ts +0 -19
- package/dist/types/Form/components/Form.d.ts +0 -6
- package/dist/types/Form/components/Icon.d.ts +0 -1
- package/dist/types/Form/components/RequiredIndicator.d.ts +0 -1
- package/dist/types/Form/components/index.d.ts +0 -249
- package/dist/types/Form/fields/AnyField/AnyField.d.ts +0 -2
- package/dist/types/Form/fields/AnyField/index.d.ts +0 -2
- package/dist/types/Form/fields/AnyField/styledComponents.d.ts +0 -3
- package/dist/types/Form/fields/ArrayField/ArrayField.d.ts +0 -2
- package/dist/types/Form/fields/ArrayField/index.d.ts +0 -2
- package/dist/types/Form/fields/ArrayField/styledComponents.d.ts +0 -13
- package/dist/types/Form/fields/BooleanField/BooleanField.d.ts +0 -2
- package/dist/types/Form/fields/BooleanField/index.d.ts +0 -2
- package/dist/types/Form/fields/BooleanField/styledComponents.d.ts +0 -3
- package/dist/types/Form/fields/DateField/DateField.d.ts +0 -2
- package/dist/types/Form/fields/DateField/DateInput.d.ts +0 -17
- package/dist/types/Form/fields/DateField/dateParsing.d.ts +0 -9
- package/dist/types/Form/fields/DateField/index.d.ts +0 -3
- package/dist/types/Form/fields/DateField/styledComponents.d.ts +0 -4
- package/dist/types/Form/fields/FileUploadField/FileUploadField.d.ts +0 -2
- package/dist/types/Form/fields/FileUploadField/FileUploadFieldInput.d.ts +0 -25
- package/dist/types/Form/fields/FileUploadField/index.d.ts +0 -17
- package/dist/types/Form/fields/FileUploadField/styledComponents.d.ts +0 -11
- package/dist/types/Form/fields/FilesUploadField/FilesUploadField.d.ts +0 -2
- package/dist/types/Form/fields/FilesUploadField/FilesUploadFieldInput.d.ts +0 -42
- package/dist/types/Form/fields/FilesUploadField/index.d.ts +0 -37
- package/dist/types/Form/fields/FilesUploadField/styledComponents.d.ts +0 -32
- package/dist/types/Form/fields/MultipleChoiceField/MultipleChoiceField.d.ts +0 -2
- package/dist/types/Form/fields/MultipleChoiceField/MultipleChoiceFieldInput.d.ts +0 -17
- package/dist/types/Form/fields/MultipleChoiceField/index.d.ts +0 -22
- package/dist/types/Form/fields/MultipleChoiceField/styledComponents.d.ts +0 -16
- package/dist/types/Form/fields/NullField/NullField.d.ts +0 -2
- package/dist/types/Form/fields/NullField/index.d.ts +0 -1
- package/dist/types/Form/fields/NumberField/NumberField.d.ts +0 -2
- package/dist/types/Form/fields/NumberField/index.d.ts +0 -2
- package/dist/types/Form/fields/NumberField/styledComponents.d.ts +0 -1
- package/dist/types/Form/fields/ObjectField/ObjectField.d.ts +0 -2
- package/dist/types/Form/fields/ObjectField/ObjectFieldSection.d.ts +0 -3
- package/dist/types/Form/fields/ObjectField/index.d.ts +0 -20
- package/dist/types/Form/fields/ObjectField/styledComponents.d.ts +0 -15
- package/dist/types/Form/fields/ObjectField/types.d.ts +0 -19
- package/dist/types/Form/fields/RadioField/RadioField.d.ts +0 -2
- package/dist/types/Form/fields/RadioField/RadioFieldInput.d.ts +0 -11
- package/dist/types/Form/fields/RadioField/index.d.ts +0 -22
- package/dist/types/Form/fields/RadioField/styledComponents.d.ts +0 -16
- package/dist/types/Form/fields/SchemaField/SchemaField.d.ts +0 -2
- package/dist/types/Form/fields/SchemaField/index.d.ts +0 -1
- package/dist/types/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectField.d.ts +0 -2
- package/dist/types/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectFieldInput.d.ts +0 -11
- package/dist/types/Form/fields/SearchableMultiTagSelectField/index.d.ts +0 -21
- package/dist/types/Form/fields/SearchableMultiTagSelectField/styledComponents.d.ts +0 -15
- package/dist/types/Form/fields/SearchableSelectField/SearchableSelectField.d.ts +0 -2
- package/dist/types/Form/fields/SearchableSelectField/index.d.ts +0 -2
- package/dist/types/Form/fields/SearchableSelectField/styledComponents.d.ts +0 -22
- package/dist/types/Form/fields/SearchableSelectField/types.d.ts +0 -25
- package/dist/types/Form/fields/StringField/StringField.d.ts +0 -2
- package/dist/types/Form/fields/StringField/index.d.ts +0 -1
- package/dist/types/Form/fields/StringField/styledComponents.d.ts +0 -3
- package/dist/types/Form/fields/TextAreaField/TextAreaField.d.ts +0 -2
- package/dist/types/Form/fields/TextAreaField/index.d.ts +0 -2
- package/dist/types/Form/fields/TextAreaField/styledComponents.d.ts +0 -5
- package/dist/types/Form/fields/ToggleField/ToggleField.d.ts +0 -2
- package/dist/types/Form/fields/ToggleField/ToggleFieldInput.d.ts +0 -6
- package/dist/types/Form/fields/ToggleField/index.d.ts +0 -13
- package/dist/types/Form/fields/ToggleField/styledComponents.d.ts +0 -7
- package/dist/types/Form/fields/index.d.ts +0 -191
- package/dist/types/Form/hooks/index.d.ts +0 -1
- package/dist/types/Form/hooks/useSetDefault.d.ts +0 -2
- package/dist/types/Form/index.d.ts +0 -8
- package/dist/types/Form/styles/common.d.ts +0 -2
- package/dist/types/Form/templates/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/ArrayFieldTemplate/index.d.ts +0 -2
- package/dist/types/Form/templates/ArrayFieldTemplate/styledComponents.d.ts +0 -30
- package/dist/types/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/CollapsibleObjectFieldTemplate/index.d.ts +0 -2
- package/dist/types/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.d.ts +0 -36
- package/dist/types/Form/templates/FieldTemplate/FieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/FieldTemplate/index.d.ts +0 -1
- package/dist/types/Form/templates/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/ObjectFieldTemplate/index.d.ts +0 -2
- package/dist/types/Form/templates/ObjectFieldTemplate/styledComponents.d.ts +0 -27
- package/dist/types/Form/templates/index.d.ts +0 -57
- package/dist/types/Form/types/FormRegistryContext.d.ts +0 -23
- package/dist/types/Form/types/index.d.ts +0 -1
- package/dist/types/FormView/FormView.d.ts +0 -4
- package/dist/types/FormView/FormViewRegistry.d.ts +0 -3
- package/dist/types/FormView/components/Field.d.ts +0 -35
- package/dist/types/FormView/components/Form.d.ts +0 -1
- package/dist/types/FormView/components/Icon.d.ts +0 -1
- package/dist/types/FormView/components/index.d.ts +0 -53
- package/dist/types/FormView/fields/AnyField.d.ts +0 -2
- package/dist/types/FormView/fields/ArrayField.d.ts +0 -2
- package/dist/types/FormView/fields/BooleanField.d.ts +0 -2
- package/dist/types/FormView/fields/DateField.d.ts +0 -2
- package/dist/types/FormView/fields/EJSField.d.ts +0 -2
- package/dist/types/FormView/fields/FileUploadField.d.ts +0 -2
- package/dist/types/FormView/fields/FilesUploadField.d.ts +0 -2
- package/dist/types/FormView/fields/MultipleChoiceField.d.ts +0 -2
- package/dist/types/FormView/fields/NullField.d.ts +0 -2
- package/dist/types/FormView/fields/NumberField.d.ts +0 -2
- package/dist/types/FormView/fields/ObjectField/ObjectField.d.ts +0 -2
- package/dist/types/FormView/fields/ObjectField/ObjectFieldSection.d.ts +0 -7
- package/dist/types/FormView/fields/ObjectField/index.d.ts +0 -8
- package/dist/types/FormView/fields/ObjectField/styledComponents.d.ts +0 -2
- package/dist/types/FormView/fields/RadioField.d.ts +0 -2
- package/dist/types/FormView/fields/SchemaField.d.ts +0 -2
- package/dist/types/FormView/fields/SearchableMultiTagSelectField.d.ts +0 -2
- package/dist/types/FormView/fields/SearchableSelectField.d.ts +0 -2
- package/dist/types/FormView/fields/StringField.d.ts +0 -2
- package/dist/types/FormView/fields/TextAreaField.d.ts +0 -2
- package/dist/types/FormView/fields/ToggleField.d.ts +0 -2
- package/dist/types/FormView/fields/index.d.ts +0 -9
- package/dist/types/FormView/index.d.ts +0 -7
- package/dist/types/FormView/templates/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +0 -2
- package/dist/types/FormView/templates/ArrayFieldTemplate/index.d.ts +0 -2
- package/dist/types/FormView/templates/ArrayFieldTemplate/styledComponents.d.ts +0 -10
- package/dist/types/FormView/templates/FieldTemplate/FieldTemplate.d.ts +0 -2
- package/dist/types/FormView/templates/FieldTemplate/index.d.ts +0 -1
- package/dist/types/FormView/templates/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +0 -2
- package/dist/types/FormView/templates/ObjectFieldTemplate/index.d.ts +0 -2
- package/dist/types/FormView/templates/ObjectFieldTemplate/styledComponents.d.ts +0 -10
- package/dist/types/FormView/templates/index.d.ts +0 -23
- package/dist/types/FormView/types/FormViewRegistryContext.d.ts +0 -21
- package/dist/types/FormView/types/index.d.ts +0 -1
- package/dist/types/common/FileUploadContext.d.ts +0 -18
- package/dist/types/common/FilesUploadContext.d.ts +0 -17
- package/dist/types/common/constants.d.ts +0 -10
- package/dist/types/common/index.d.ts +0 -4
- package/dist/types/styles/types.d.ts +0 -216
- package/dist/types/utils/createInitialValues.d.ts +0 -7
- package/dist/types/utils/createValidationSchema.d.ts +0 -31
- package/dist/types/utils/deepOverlap.d.ts +0 -1
- package/dist/types/utils/extractUiSchema.d.ts +0 -9
- package/dist/types/utils/getEnums.d.ts +0 -30
- package/dist/types/utils/getHiddenProperties.d.ts +0 -2
- package/dist/types/utils/getStyle.d.ts +0 -5
- package/dist/types/utils/getTitleAndDescription.d.ts +0 -12
- package/dist/types/utils/getTypes.d.ts +0 -5
- package/dist/types/utils/immutablySwapItems.d.ts +0 -1
- package/dist/types/utils/index.d.ts +0 -15
- package/dist/types/utils/mergeSchemas.d.ts +0 -1
- package/dist/types/utils/orderAdditionalProperties.d.ts +0 -2
- package/dist/types/utils/orderByUiSchema.d.ts +0 -2
- package/dist/types/utils/resolveSchema.d.ts +0 -4
- package/dist/types/utils/setTitleValues.d.ts +0 -1
- package/dist/types/utils/solveReferences.d.ts +0 -10
- /package/dist/cjs/{Form/fields/SearchableSelectField/types.js → common/types/Utils.js} +0 -0
- /package/dist/cjs/{styles → v3/raw/dom}/types.js +0 -0
- /package/dist/cjs/{Form/types/FormRegistryContext.js → v3/raw/model/form/types.js} +0 -0
- /package/dist/cjs/{FormView/types/FormViewRegistryContext.js → v3/raw/model/host.js} +0 -0
- /package/dist/cjs/{FormView/types/index.js → v3/raw/model/view/types.js} +0 -0
- /package/dist/esm/{Form/fields/SearchableSelectField/types.js → common/types/Utils.js} +0 -0
- /package/dist/esm/{styles → v3/raw/dom}/types.js +0 -0
- /package/dist/esm/{Form/types/FormRegistryContext.js → v3/raw/model/form/types.js} +0 -0
- /package/dist/esm/{FormView/types/FormViewRegistryContext.js → v3/raw/model/host.js} +0 -0
- /package/dist/esm/{FormView/types/index.js → v3/raw/model/view/types.js} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Attrs, VChild, VNode } from "../vnode";
|
|
2
|
+
/** A registry component element: the default is the first name of the chain that 2.x defines. */
|
|
3
|
+
export declare const fc: (names: string[], attrs: Attrs, ...children: Array<VChild | VChild[]>) => VNode;
|
|
4
|
+
/** Same, with another tag (2.x `formikAs`: a FieldInput rendered as select / textarea). */
|
|
5
|
+
export declare const fcAs: (tag: string | undefined, names: string[], attrs: Attrs, ...children: Array<VChild | VChild[]>) => VNode;
|
|
6
|
+
/** A styled element that is not a registry key (2.x StringFieldWrapper, ErrorText, ...). */
|
|
7
|
+
export declare const plain: (tag: string, name: string, attrs: Attrs, ...children: Array<VChild | VChild[]>) => VNode;
|
|
8
|
+
/** A 2.x function component in the registry: an override gets `props` (and `children`). */
|
|
9
|
+
export declare const fcComposite: (name: string, props: Record<string, unknown>, content: VChild[] | undefined, ...markup: VChild[]) => VNode;
|
|
10
|
+
export type FormChrome = {
|
|
11
|
+
path: string;
|
|
12
|
+
attrs: Attrs;
|
|
13
|
+
title?: VChild;
|
|
14
|
+
titleAttrs?: Attrs;
|
|
15
|
+
description?: VChild;
|
|
16
|
+
descriptionAttrs?: Attrs;
|
|
17
|
+
help?: VChild;
|
|
18
|
+
helpAttrs?: Attrs;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
/** `ui:props.disabled` (2.x: FieldWrapper's $isDisabled styles): the wrapper gets aria-disabled. */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Rendered `FieldInfo` (or null). */
|
|
23
|
+
info?: VChild;
|
|
24
|
+
/** Rendered `ErrorMessage` (or null). */
|
|
25
|
+
error?: VChild;
|
|
26
|
+
};
|
|
27
|
+
/** 2.x Form FieldTemplate. */
|
|
28
|
+
export declare const fieldTemplateMarkup: (c: FormChrome, content: VChild[]) => VNode;
|
|
29
|
+
/** 2.x ObjectFieldTemplate (fieldset + legend). */
|
|
30
|
+
export declare const objectTemplateMarkup: (c: FormChrome, content: VChild[]) => VNode;
|
|
31
|
+
/** 2.x CollapsibleObjectFieldTemplate: a toggle button around the title; ChildrenWrapper is the wrapper chain (2.x). */
|
|
32
|
+
export declare const collapsibleTemplateMarkup: (c: FormChrome, content: VChild[], o: {
|
|
33
|
+
collapsed: boolean;
|
|
34
|
+
id: string;
|
|
35
|
+
ariaLabel: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
}) => VNode;
|
|
38
|
+
/** 2.x ArrayFieldTemplate: the array names first, then the object/field fallbacks; the title keeps `for`. */
|
|
39
|
+
export declare const arrayTemplateMarkup: (c: FormChrome, items: VChild[]) => VNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VChild } from "../vnode";
|
|
2
|
+
import type { ChildProps } from "./dispatch";
|
|
3
|
+
import type { Trail } from "../../core/trail";
|
|
4
|
+
import type { FormBuildContext } from "./types";
|
|
5
|
+
/** 2.x prepareChildSchema: booleans become {}, a readOnly parent makes the child readOnly. */
|
|
6
|
+
export declare const prepareChildSchema: (child: unknown, parent: any) => Record<string, unknown> | {
|
|
7
|
+
readOnly: any;
|
|
8
|
+
};
|
|
9
|
+
export declare const objectField: (ctx: FormBuildContext, p: ChildProps, chain: string[], trail?: Trail) => VChild;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VChild } from "../vnode";
|
|
2
|
+
import type { FormAction, FormBuildContext } from "./types";
|
|
3
|
+
/** 2.x getObjectFieldButton / the ArrayField buttons: `ui:options.<x>Button.{props,content}`, D5-filtered props. */
|
|
4
|
+
export declare const buttonMarkup: (conf: any, names: string | string[], purpose: string, path: string, fallback: string, action: FormAction) => VChild;
|
|
5
|
+
/** Form ObjectFieldSection (a ui:order group); collapsible sections start collapsed (2.x useState(collapsible)). */
|
|
6
|
+
export declare const sectionMarkup: (ctx: FormBuildContext, name: string, entry: {
|
|
7
|
+
title?: unknown;
|
|
8
|
+
fields: string[];
|
|
9
|
+
collapsible?: boolean;
|
|
10
|
+
}, fields: VChild[]) => VChild;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { VChild } from "../vnode";
|
|
2
|
+
import type { FieldProps } from "./chrome";
|
|
3
|
+
import type { FormBuildContext } from "./types";
|
|
4
|
+
export declare const searchableSelectField: (ctx: FormBuildContext, p: FieldProps) => VChild;
|
|
5
|
+
export declare const searchableMultiTagField: (ctx: FormBuildContext, p: FieldProps) => VChild;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TemplateHost } from "../host";
|
|
2
|
+
import type { VChild, VNode } from "../vnode";
|
|
3
|
+
import type { FieldProps } from "./chrome";
|
|
4
|
+
import type { FormBuildContext } from "./types";
|
|
5
|
+
/** The 2.x template props: the field props plus the data-* props the field passed. */
|
|
6
|
+
export declare const templateProps: (p: FieldProps) => {
|
|
7
|
+
"data-fjsf-hidden"?: string | undefined;
|
|
8
|
+
"data-fjsf-kind"?: string | undefined;
|
|
9
|
+
required?: boolean | undefined;
|
|
10
|
+
name: string;
|
|
11
|
+
schema: any;
|
|
12
|
+
uiSchema: any;
|
|
13
|
+
};
|
|
14
|
+
export declare const templated: (_ctx: FormBuildContext, template: TemplateHost["template"], p: FieldProps, markup: VNode, children: VChild[], extra?: Partial<TemplateHost>) => VNode;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { Definitions } from "../../core/json";
|
|
2
|
+
import type { IssueSink } from "../../core/issues";
|
|
3
|
+
/** How a control's DOM value becomes a stored value (2.x: formik Field + the field's own onChange). */
|
|
4
|
+
export type Parse = "text" | "number" | "checkbox" | "enum" | "multi" | "radio";
|
|
5
|
+
export type FormAction = {
|
|
6
|
+
type: "set";
|
|
7
|
+
path: string;
|
|
8
|
+
parse: Parse;
|
|
9
|
+
consts?: unknown[];
|
|
10
|
+
} | {
|
|
11
|
+
type: "touch";
|
|
12
|
+
path: string;
|
|
13
|
+
} | {
|
|
14
|
+
type: "toggle";
|
|
15
|
+
path: string;
|
|
16
|
+
} | {
|
|
17
|
+
type: "submit";
|
|
18
|
+
} | {
|
|
19
|
+
type: "arrayAdd";
|
|
20
|
+
path: string;
|
|
21
|
+
item: unknown;
|
|
22
|
+
} | {
|
|
23
|
+
type: "arrayRemove";
|
|
24
|
+
path: string;
|
|
25
|
+
index: number;
|
|
26
|
+
} | {
|
|
27
|
+
type: "arrayMove";
|
|
28
|
+
path: string;
|
|
29
|
+
from: number;
|
|
30
|
+
to: number;
|
|
31
|
+
} | {
|
|
32
|
+
type: "propertyAdd";
|
|
33
|
+
path: string;
|
|
34
|
+
order: string[];
|
|
35
|
+
item: unknown;
|
|
36
|
+
} | {
|
|
37
|
+
type: "propertyRemove";
|
|
38
|
+
path: string;
|
|
39
|
+
key: string;
|
|
40
|
+
order: string[];
|
|
41
|
+
} | {
|
|
42
|
+
type: "propertyMove";
|
|
43
|
+
path: string;
|
|
44
|
+
order: string[];
|
|
45
|
+
next: string[];
|
|
46
|
+
} | {
|
|
47
|
+
type: "collapse";
|
|
48
|
+
id: string;
|
|
49
|
+
collapsed: boolean;
|
|
50
|
+
} | {
|
|
51
|
+
type: "anyType";
|
|
52
|
+
path: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: "info";
|
|
55
|
+
id: string;
|
|
56
|
+
display: "tooltip" | "inline";
|
|
57
|
+
} | {
|
|
58
|
+
type: "choice";
|
|
59
|
+
path: string;
|
|
60
|
+
value: unknown;
|
|
61
|
+
multi: boolean;
|
|
62
|
+
} | {
|
|
63
|
+
type: "dateText";
|
|
64
|
+
path: string;
|
|
65
|
+
} | {
|
|
66
|
+
type: "dateCommit";
|
|
67
|
+
path: string;
|
|
68
|
+
rules: DateCommitRules;
|
|
69
|
+
locked: boolean;
|
|
70
|
+
native?: boolean;
|
|
71
|
+
} | {
|
|
72
|
+
type: "datePicker";
|
|
73
|
+
id: string;
|
|
74
|
+
locked: boolean;
|
|
75
|
+
} | {
|
|
76
|
+
type: "searchInput";
|
|
77
|
+
path: string;
|
|
78
|
+
perPage: number;
|
|
79
|
+
} | {
|
|
80
|
+
type: "searchOpen";
|
|
81
|
+
path: string;
|
|
82
|
+
} | {
|
|
83
|
+
type: "searchLeave";
|
|
84
|
+
path: string;
|
|
85
|
+
} | {
|
|
86
|
+
type: "searchClear";
|
|
87
|
+
path: string;
|
|
88
|
+
} | {
|
|
89
|
+
type: "searchMore";
|
|
90
|
+
path: string;
|
|
91
|
+
perPage: number;
|
|
92
|
+
} | {
|
|
93
|
+
type: "searchSelect";
|
|
94
|
+
path: string;
|
|
95
|
+
value: unknown;
|
|
96
|
+
title: string;
|
|
97
|
+
} | {
|
|
98
|
+
type: "searchKey";
|
|
99
|
+
path: string;
|
|
100
|
+
items: Array<{
|
|
101
|
+
type: "searchSelect";
|
|
102
|
+
path: string;
|
|
103
|
+
value: unknown;
|
|
104
|
+
title: string;
|
|
105
|
+
}>;
|
|
106
|
+
open: boolean;
|
|
107
|
+
} | {
|
|
108
|
+
type: "searchText";
|
|
109
|
+
path: string;
|
|
110
|
+
} | {
|
|
111
|
+
type: "tagAdd";
|
|
112
|
+
path: string;
|
|
113
|
+
value: unknown;
|
|
114
|
+
} | {
|
|
115
|
+
type: "tagRemove";
|
|
116
|
+
path: string;
|
|
117
|
+
value: unknown;
|
|
118
|
+
} | {
|
|
119
|
+
type: "preventDefault";
|
|
120
|
+
} | {
|
|
121
|
+
type: "searchActive";
|
|
122
|
+
path: string;
|
|
123
|
+
index: number;
|
|
124
|
+
} | {
|
|
125
|
+
type: "preventEnter";
|
|
126
|
+
};
|
|
127
|
+
export type DateCommitRules = {
|
|
128
|
+
locale: string;
|
|
129
|
+
min?: string;
|
|
130
|
+
max?: string;
|
|
131
|
+
invalid: string;
|
|
132
|
+
outOfRange: string;
|
|
133
|
+
order: "DMY" | "MDY";
|
|
134
|
+
};
|
|
135
|
+
/** UI state the host keeps per mount (not form values): collapse, AnyField types, open inline infos. */
|
|
136
|
+
export type FormUiState = {
|
|
137
|
+
collapsed?: Record<string, boolean>;
|
|
138
|
+
/** Typed, uncommitted text of a control (DateField display, searchable search term). */
|
|
139
|
+
text?: Record<string, string>;
|
|
140
|
+
/** Searchable: dropdown open, how many options are listed, the keyboard-active option. */
|
|
141
|
+
open?: Record<string, boolean>;
|
|
142
|
+
shown?: Record<string, number>;
|
|
143
|
+
active?: Record<string, number>;
|
|
144
|
+
anyTypes?: Record<string, string>;
|
|
145
|
+
infoOpen?: Record<string, boolean>;
|
|
146
|
+
};
|
|
147
|
+
/** A node that appeared in this render: its default is applied once per appearance (§2.7a). */
|
|
148
|
+
export type Appearance = {
|
|
149
|
+
path: string;
|
|
150
|
+
schema: any;
|
|
151
|
+
forceDefaultValue: boolean;
|
|
152
|
+
};
|
|
153
|
+
export type FormBuildContext = {
|
|
154
|
+
values: unknown;
|
|
155
|
+
errors: unknown;
|
|
156
|
+
touched: unknown;
|
|
157
|
+
submitting: boolean;
|
|
158
|
+
customFields: string[];
|
|
159
|
+
definitions: Definitions;
|
|
160
|
+
defs: Definitions;
|
|
161
|
+
uiDefinitions: any;
|
|
162
|
+
sink: IssueSink;
|
|
163
|
+
formLocalization?: any;
|
|
164
|
+
formOptions?: any;
|
|
165
|
+
/** The host's default locale (React: navigator.language); RAW reads no browser globals. */
|
|
166
|
+
locale?: string;
|
|
167
|
+
ui: FormUiState;
|
|
168
|
+
hideUnmarkedAdditionalProperties: boolean;
|
|
169
|
+
/** `onAdditionalPropertyOrderChange` is given: additional properties get up/down buttons. */
|
|
170
|
+
orderable: boolean;
|
|
171
|
+
/** Collected while building: defaults to apply and keys to prune (React applies them in an effect). */
|
|
172
|
+
appeared: Appearance[];
|
|
173
|
+
prune: Array<{
|
|
174
|
+
path: string;
|
|
175
|
+
keys: string[];
|
|
176
|
+
}>;
|
|
177
|
+
/** AnyField types guessed in this render (no type in the UI state yet): the host keeps them (2.x useState). */
|
|
178
|
+
anyGuesses: Record<string, string>;
|
|
179
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { VChild, VNode } from "../vnode";
|
|
2
|
+
import type { FieldProps } from "./chrome";
|
|
3
|
+
import type { FormBuildContext } from "./types";
|
|
4
|
+
export type FileState = {
|
|
5
|
+
value: unknown;
|
|
6
|
+
uploadedFile: {
|
|
7
|
+
name?: unknown;
|
|
8
|
+
} | null;
|
|
9
|
+
progress: number;
|
|
10
|
+
};
|
|
11
|
+
export type UploadedFile = {
|
|
12
|
+
name: string;
|
|
13
|
+
id: string | null;
|
|
14
|
+
progressId: string;
|
|
15
|
+
mimeType?: string;
|
|
16
|
+
size?: number;
|
|
17
|
+
};
|
|
18
|
+
export type FilesState = {
|
|
19
|
+
value: unknown;
|
|
20
|
+
files: UploadedFile[];
|
|
21
|
+
progress: Record<string, number>;
|
|
22
|
+
dragging: boolean;
|
|
23
|
+
};
|
|
24
|
+
/** 2.x FilesUploadField: the files of a stored value (uploaded, so progress 100). */
|
|
25
|
+
export declare const filesOf: (value: unknown) => UploadedFile[];
|
|
26
|
+
export declare const fileUploadMarkup: (ctx: FormBuildContext, p: FieldProps, s: FileState) => VNode;
|
|
27
|
+
export declare const filesLocalization: (ctx: FormBuildContext, ui: any) => any;
|
|
28
|
+
export declare const filesUploadMarkup: (ctx: FormBuildContext, p: FieldProps, s: FilesState) => VChild;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ChildField } from "./view/types";
|
|
2
|
+
import type { VChild } from "./vnode";
|
|
3
|
+
/** A field the host provides (custom field name, overridden built-in, or a component `ui:field`). */
|
|
4
|
+
export type FieldHost = {
|
|
5
|
+
kind: "field";
|
|
6
|
+
field: string;
|
|
7
|
+
props: Record<string, unknown>;
|
|
8
|
+
chain?: string[];
|
|
9
|
+
};
|
|
10
|
+
/** A template boundary: `props` are the 2.x template props, `children` the content without the template chrome. */
|
|
11
|
+
export type TemplateHost = {
|
|
12
|
+
kind: "template";
|
|
13
|
+
template: "FieldTemplate" | "ObjectFieldTemplate" | "ArrayFieldTemplate" | "CollapsibleObjectFieldTemplate";
|
|
14
|
+
/** `ui:template`: looked up first, as in 2.x. */
|
|
15
|
+
override?: string;
|
|
16
|
+
props: Record<string, unknown>;
|
|
17
|
+
children: VChild[];
|
|
18
|
+
/** ArrayFieldTemplate: the item values and the rendered items, for `items` / `renderItem`. */
|
|
19
|
+
items?: unknown[];
|
|
20
|
+
itemNodes?: VChild[];
|
|
21
|
+
/** ObjectFieldTemplate: the 2.x `<SchemaField>` props per child, and the $ref chain they continue. */
|
|
22
|
+
childFields?: ChildField[];
|
|
23
|
+
chain?: string[];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A registry component (`registry.components`, CM-a). `names` is the 2.x lookup chain
|
|
27
|
+
* (`components.A ?? components.B`). Composite components get `props` instead of the
|
|
28
|
+
* element's attributes.
|
|
29
|
+
*/
|
|
30
|
+
export type ComponentHost = {
|
|
31
|
+
kind: "component";
|
|
32
|
+
names: string[];
|
|
33
|
+
props?: Record<string, unknown>;
|
|
34
|
+
children?: VChild[];
|
|
35
|
+
};
|
|
36
|
+
/** Where a React template puts its React children. */
|
|
37
|
+
export type HoleHost = {
|
|
38
|
+
kind: "hole";
|
|
39
|
+
name?: string;
|
|
40
|
+
};
|
|
41
|
+
/** A host value shown as is by its own renderer (a React element `ui:title`); toString shows nothing. */
|
|
42
|
+
export type ValueHost = {
|
|
43
|
+
kind: "value";
|
|
44
|
+
value: unknown;
|
|
45
|
+
};
|
|
46
|
+
export type Host = FieldHost | TemplateHost | ComponentHost | HoleHost | ValueHost;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const STYLED_CHAINS: Readonly<Record<string, readonly string[]>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Definitions, Schema } from "../../core/json";
|
|
2
|
+
import type { IssueSink } from "../../core/issues";
|
|
3
|
+
import type { FileUploadView } from "../../core/policies/fileUploadView";
|
|
4
|
+
import type { Trail } from "../../core/trail";
|
|
5
|
+
import type { FieldKind, ViewNode, ViewOptions } from "./types";
|
|
6
|
+
export type BuildContext = Required<Pick<ViewOptions, "customFields">> & Pick<ViewOptions, "formLocalization"> & {
|
|
7
|
+
values: unknown;
|
|
8
|
+
sink: IssueSink;
|
|
9
|
+
definitions: Definitions;
|
|
10
|
+
defs: Definitions;
|
|
11
|
+
uiDefinitions: any;
|
|
12
|
+
fileUploadView: FileUploadView;
|
|
13
|
+
};
|
|
14
|
+
/** 2.x FormView SchemaField: resolve refs, pick the field (ui:field, then type), render it. */
|
|
15
|
+
export declare const schemaField: (name: string, given: Schema | undefined, givenUi: any, ctx: BuildContext, kindProp?: FieldKind, chain?: string[], trail?: Trail) => ViewNode;
|
|
16
|
+
/** One built-in field by name (2.x `FormViewFields.X`), without the SchemaField dispatch. */
|
|
17
|
+
export declare const componentField: (component: string, name: string, schema: Schema, ui: any, ctx: BuildContext, kindProp?: FieldKind, nextChain?: string[], trail?: Trail) => ViewNode;
|
|
18
|
+
/** The build context for a form whose root schema/uiSchema carry the definitions. */
|
|
19
|
+
export declare const createViewContext: (schema: Schema | undefined, uiSchema: any, values: unknown, options?: ViewOptions) => BuildContext;
|
|
20
|
+
/** Root entry: the whole read-only view-model of a form. */
|
|
21
|
+
export declare const buildViewNode: (schema: Schema, uiSchema: any, values: unknown, options?: ViewOptions) => ViewNode;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Schema } from "../../core/json";
|
|
2
|
+
import type { ViewNode, FieldKind } from "./types";
|
|
3
|
+
import type { BuildContext } from "./build";
|
|
4
|
+
import type { IssueSink } from "../../core/issues";
|
|
5
|
+
/** Instrumentation attributes of a field wrapper (2.x getInstrumentationAttributes; FormView never sets required/hidden). */
|
|
6
|
+
export declare const fieldAttrs: (name: string, kind: FieldKind | undefined, schema: Schema | undefined) => Record<string, string>;
|
|
7
|
+
/** 2.x templates spread `ui:props.{wrapper,title,description}`; v3 keeps the D5 allowlist of them. */
|
|
8
|
+
export declare const elementProps: (ui: any, path: string, sink?: IssueSink) => {
|
|
9
|
+
wrapperAttrs: Record<string, string | number | boolean>;
|
|
10
|
+
titleAttrs: Record<string, string | number | boolean>;
|
|
11
|
+
descriptionAttrs: Record<string, string | number | boolean>;
|
|
12
|
+
};
|
|
13
|
+
export declare const chrome: (name: string, kind: FieldKind | undefined, schema: Schema | undefined, ui: any, sink?: IssueSink) => {
|
|
14
|
+
path: string;
|
|
15
|
+
attrs: Record<string, string>;
|
|
16
|
+
titleAttrs: Record<string, string | number | boolean>;
|
|
17
|
+
descriptionAttrs: Record<string, string | number | boolean>;
|
|
18
|
+
title: string | import("../vnode").VNode | undefined;
|
|
19
|
+
description: string | import("../vnode").VNode | undefined;
|
|
20
|
+
schema: import("json-schema").JSONSchema7 | undefined;
|
|
21
|
+
ui: any;
|
|
22
|
+
};
|
|
23
|
+
/** StringField / NumberField / DateField / SearchableSelectField: the value as text (enum consts as titles). */
|
|
24
|
+
export declare const textField: (name: string, schema: Schema, ui: any, kind: FieldKind | undefined, ctx: BuildContext) => ViewNode;
|
|
25
|
+
export declare const textAreaField: (name: string, schema: Schema, ui: any, ctx: BuildContext) => ViewNode;
|
|
26
|
+
/** BooleanField / RadioField / ToggleField: a check mark and a label. */
|
|
27
|
+
export declare const booleanField: (name: string, schema: Schema, ui: any, kind: FieldKind, ctx: BuildContext) => ViewNode;
|
|
28
|
+
/** MultipleChoiceField: every option with a check mark when selected (`onlyShowSelected` filters). */
|
|
29
|
+
export declare const choicesField: (name: string, schema: Schema, ui: any, ctx: BuildContext) => ViewNode;
|
|
30
|
+
export declare const nullField: (name: string, schema: Schema, ui: any, kind?: FieldKind) => ViewNode;
|
|
31
|
+
export declare const slotField: (name: string, schema: Schema, ui: any, field: string, chain?: string[]) => ViewNode;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Schema } from "../../core/json";
|
|
2
|
+
import type { ViewOptions } from "./types";
|
|
3
|
+
import { buildViewNode } from "./build";
|
|
4
|
+
export declare const renderViewToString: (schema: Schema, uiSchema: any, values: unknown, options?: ViewOptions) => string;
|
|
5
|
+
export { buildViewNode };
|
|
6
|
+
export type { ViewNode, ViewOptions } from "./types";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Attrs, VChild, VNode } from "../vnode";
|
|
2
|
+
/** 2.x FormView styled primitives in `registry.components` and their tags. */
|
|
3
|
+
export declare const VIEW_PRIMITIVES: Readonly<Record<string, string>>;
|
|
4
|
+
/** Override-only keys: `undefined` by default, read before their fallback (2.x getComponents). */
|
|
5
|
+
export declare const VIEW_OVERRIDE_ONLY: readonly ["ArrayFieldTemplateDescription", "ArrayFieldTemplateTitle", "ArrayFieldTemplateWrapper", "ObjectFieldTemplateDescription"];
|
|
6
|
+
export declare const viewClass: (name: string) => string;
|
|
7
|
+
/** A registry component element; its default is the first name in the chain that has one. */
|
|
8
|
+
export declare const component: (names: string[], attrs: Attrs, ...children: Array<VChild | VChild[]>) => VNode;
|
|
9
|
+
/** A composite registry component (2.x function components): an override gets `props` (and `children`). */
|
|
10
|
+
export declare const composite: (name: string, props: Record<string, unknown>, content: VChild[] | undefined, ...markup: VChild[]) => VNode;
|
|
11
|
+
export type Chrome = {
|
|
12
|
+
path: string;
|
|
13
|
+
attrs: Attrs;
|
|
14
|
+
title?: VChild;
|
|
15
|
+
description?: VChild;
|
|
16
|
+
titleAttrs?: Attrs;
|
|
17
|
+
descriptionAttrs?: Attrs;
|
|
18
|
+
};
|
|
19
|
+
/** FormView FieldTemplate: wrapper, title <label for>, description, content. */
|
|
20
|
+
export declare const fieldTemplateMarkup: (c: Chrome, content: VChild[]) => VNode;
|
|
21
|
+
export declare const objectTemplateMarkup: (c: Chrome, content: VChild[]) => VNode;
|
|
22
|
+
/** 2.x ArrayFieldTemplate: array names first, then the object/field fallbacks; the title keeps `for`. */
|
|
23
|
+
export declare const arrayTemplateMarkup: (c: Chrome, content: VChild[]) => VNode;
|
|
24
|
+
/** ObjectFieldSection (a `ui:order` group): fieldset + legend. */
|
|
25
|
+
export declare const sectionMarkup: (title: string, content: VChild[]) => VNode;
|
|
26
|
+
/** The root: FormWrapper > components.Form. */
|
|
27
|
+
export declare const formShellMarkup: (className: string | undefined, content: VChild[]) => VNode;
|
|
28
|
+
/** The check mark FormView draws for a selected value (2.x: react-icons FaCheck, an <svg>). */
|
|
29
|
+
export declare const checkIconMarkup: (className?: string) => VNode;
|
|
30
|
+
/** BooleanFieldValue's default markup. */
|
|
31
|
+
export declare const booleanValueMarkup: (selected: boolean, label: string) => VNode;
|
|
32
|
+
export type ChoiceOption = {
|
|
33
|
+
value: string;
|
|
34
|
+
title: string;
|
|
35
|
+
selected: boolean;
|
|
36
|
+
};
|
|
37
|
+
/** MultipleChoiceFieldValue's default markup. */
|
|
38
|
+
/** `style`: the ui:style layout keyword (2.x getStyle on the container). */
|
|
39
|
+
export declare const choicesValueMarkup: (options: ChoiceOption[], style?: unknown) => VNode;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { Schema } from "../../core/json";
|
|
2
|
+
import type { VNode } from "../vnode";
|
|
3
|
+
import type { IssueSink } from "../../core/issues";
|
|
4
|
+
import type { FileUploadView } from "../../core/policies/fileUploadView";
|
|
5
|
+
export type FieldKind = "string" | "number" | "boolean" | "null" | "object" | "array" | "enum" | "multi-enum" | "date" | "textarea" | "radio" | "toggle" | "file" | "files" | "searchable" | "searchable-multi" | "any" | "custom" | "error";
|
|
6
|
+
type Base = {
|
|
7
|
+
path: string;
|
|
8
|
+
/** data-fjsf-* attributes, computed once here (frozen + 2.0.4 instrumentation). */
|
|
9
|
+
attrs: Record<string, string>;
|
|
10
|
+
title?: string | VNode;
|
|
11
|
+
description?: string | VNode;
|
|
12
|
+
/** `ui:props.title` / `.description` after the D5 allowlist (the wrapper's are in `attrs`). */
|
|
13
|
+
titleAttrs?: Record<string, string | number | boolean>;
|
|
14
|
+
descriptionAttrs?: Record<string, string | number | boolean>;
|
|
15
|
+
/** The resolved schema and uiSchema, the 2.x props of templates and host fields. */
|
|
16
|
+
schema?: Schema;
|
|
17
|
+
ui?: any;
|
|
18
|
+
};
|
|
19
|
+
export type ArrayItem = {
|
|
20
|
+
node: ViewNode;
|
|
21
|
+
} | {
|
|
22
|
+
keyword?: string;
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
25
|
+
export type ViewNode = (Base & {
|
|
26
|
+
render: "object";
|
|
27
|
+
children: ViewChild[];
|
|
28
|
+
childFields: ChildField[];
|
|
29
|
+
chain: string[];
|
|
30
|
+
}) | (Base & {
|
|
31
|
+
render: "text";
|
|
32
|
+
keyword?: string;
|
|
33
|
+
text: string;
|
|
34
|
+
}) | (Base & {
|
|
35
|
+
render: "textarea";
|
|
36
|
+
text: string;
|
|
37
|
+
}) | (Base & {
|
|
38
|
+
render: "boolean";
|
|
39
|
+
selected: boolean;
|
|
40
|
+
label: string;
|
|
41
|
+
value: unknown;
|
|
42
|
+
uiLabel?: string;
|
|
43
|
+
selectedLabel?: string;
|
|
44
|
+
notSelectedLabel?: string;
|
|
45
|
+
}) | (Base & {
|
|
46
|
+
render: "choices";
|
|
47
|
+
options: Array<{
|
|
48
|
+
value: string;
|
|
49
|
+
title: string;
|
|
50
|
+
selected: boolean;
|
|
51
|
+
const: unknown;
|
|
52
|
+
}>;
|
|
53
|
+
}) | (Base & {
|
|
54
|
+
render: "array";
|
|
55
|
+
items: ArrayItem[];
|
|
56
|
+
values: unknown[];
|
|
57
|
+
}) | (Base & {
|
|
58
|
+
render: "any";
|
|
59
|
+
type: string;
|
|
60
|
+
child: ViewNode;
|
|
61
|
+
}) | (Base & {
|
|
62
|
+
render: "null";
|
|
63
|
+
}) | (Base & {
|
|
64
|
+
render: "slot";
|
|
65
|
+
field: string;
|
|
66
|
+
chain: string[];
|
|
67
|
+
}) | {
|
|
68
|
+
render: "unsupported";
|
|
69
|
+
text: string;
|
|
70
|
+
} | {
|
|
71
|
+
render: "plain";
|
|
72
|
+
text: string;
|
|
73
|
+
} | {
|
|
74
|
+
render: "none";
|
|
75
|
+
};
|
|
76
|
+
/** What 2.x ObjectField passed to `<SchemaField>` per property (or per `ui:order` section). */
|
|
77
|
+
export type ChildProps = {
|
|
78
|
+
key: string;
|
|
79
|
+
name: string;
|
|
80
|
+
schema: unknown;
|
|
81
|
+
uiSchema: unknown;
|
|
82
|
+
};
|
|
83
|
+
export type ChildField = ChildProps | {
|
|
84
|
+
section: string;
|
|
85
|
+
fields: ChildProps[];
|
|
86
|
+
};
|
|
87
|
+
export type SectionNode = {
|
|
88
|
+
render: "section";
|
|
89
|
+
title: string;
|
|
90
|
+
children: ViewNode[];
|
|
91
|
+
};
|
|
92
|
+
export type ViewChild = ViewNode | SectionNode;
|
|
93
|
+
export type ViewOptions = {
|
|
94
|
+
/** Host-provided custom field names (React components in the React layer). RAW renders a slot. */
|
|
95
|
+
customFields?: string[];
|
|
96
|
+
/** 2.x `formLocalization` (BooleanField selected/notSelected labels). */
|
|
97
|
+
formLocalization?: {
|
|
98
|
+
fields?: {
|
|
99
|
+
BooleanField?: {
|
|
100
|
+
selectedLabel?: string;
|
|
101
|
+
notSelectedLabel?: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
sink?: IssueSink;
|
|
106
|
+
/** Q-FV-2: file upload fields; defaults to FILE_UPLOAD_VIEW. */
|
|
107
|
+
fileUploadView?: FileUploadView;
|
|
108
|
+
};
|
|
109
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VNode } from "../vnode";
|
|
2
|
+
/** Text React renders for a child value. */
|
|
3
|
+
export declare const reactText: (value: unknown) => string;
|
|
4
|
+
/** Attribute value React writes for a data-* attribute, or undefined (omitted). */
|
|
5
|
+
export declare const reactAttr: (value: unknown) => string | undefined;
|
|
6
|
+
/** 2.x getTitle (getTitleAndDescription.ts) for a field: ui:title > title > last path segment. */
|
|
7
|
+
/** A uiSchema text (help, info content): a string, a React element kept for the host, or undefined. */
|
|
8
|
+
export declare const textOf: (value: unknown) => string | VNode | undefined;
|
|
9
|
+
export declare const titleOf: (uiSchema: any, schema: any, name: string) => string | VNode | undefined;
|
|
10
|
+
export declare const descriptionOf: (uiSchema: any, schema: any) => string | VNode | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Host } from "./host";
|
|
2
|
+
export type AttrValue = string | number | boolean | null | undefined;
|
|
3
|
+
export type Attrs = Record<string, AttrValue>;
|
|
4
|
+
export type VChild = VNode | string | number | null | undefined | false;
|
|
5
|
+
/**
|
|
6
|
+
* `on`: declarative event descriptors (event name -> action data), never functions. toString
|
|
7
|
+
* ignores them; toReact / toDOM bind them to the state (S4 Form, S6 RAW DOM).
|
|
8
|
+
*/
|
|
9
|
+
export type VNode = {
|
|
10
|
+
tag: string;
|
|
11
|
+
attrs: Attrs;
|
|
12
|
+
children: VChild[];
|
|
13
|
+
host?: Host;
|
|
14
|
+
on?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export declare const h: (tag: string, attrs?: Attrs, ...children: Array<VChild | VChild[]>) => VNode;
|
|
17
|
+
/** The same node, marked with the extension point that produced it (ignored by toString). */
|
|
18
|
+
export declare const withHost: (node: VNode, host: Host) => VNode;
|
|
19
|
+
/** The same node with event descriptors (merged over existing ones). */
|
|
20
|
+
export declare const withOn: (node: VNode, on: Record<string, unknown>) => VNode;
|
|
21
|
+
/** Where a React template puts its children; serialises to nothing. */
|
|
22
|
+
export declare const hole: (name?: string) => VNode;
|
|
23
|
+
/** Joins class names, skipping empty parts. */
|
|
24
|
+
export declare const cx: (...names: Array<string | false | undefined>) => string | undefined;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Config } from "dompurify";
|
|
2
|
+
import createDOMPurify from "dompurify";
|
|
3
|
+
/** Code of the error thrown when there is no DOM to sanitise with. */
|
|
4
|
+
export declare const SANITIZER_UNAVAILABLE = "SANITIZER_UNAVAILABLE";
|
|
5
|
+
export declare class SanitizerUnavailableError extends Error {
|
|
6
|
+
readonly code = "SANITIZER_UNAVAILABLE";
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
9
|
+
export declare const STRICT_CONFIG: Readonly<Config>;
|
|
10
|
+
type WindowLike = Parameters<typeof createDOMPurify>[0];
|
|
11
|
+
export type SanitizeHtmlOptions = {
|
|
12
|
+
window?: WindowLike;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Registers the DOM window `sanitizeHtml` uses where there is no global one (Node).
|
|
16
|
+
*
|
|
17
|
+
* Remote `http(s)` images are kept by policy. In a browser that is a tracking
|
|
18
|
+
* pixel; if you sanitise on the server and render the result in a headless
|
|
19
|
+
* browser (e.g. PDF generation), it is also an egress/SSRF vector: apply an
|
|
20
|
+
* egress policy or request interception there (plan §8.4).
|
|
21
|
+
*/
|
|
22
|
+
export declare const setSanitizerWindow: (window: WindowLike | undefined) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Sanitises untrusted HTML with the strict config. Isomorphic: uses the
|
|
25
|
+
* browser's window, or one supplied for Node. With no usable window it
|
|
26
|
+
* throws SanitizerUnavailableError (code SANITIZER_UNAVAILABLE): fail closed,
|
|
27
|
+
* never pass the input through.
|
|
28
|
+
*/
|
|
29
|
+
export declare const sanitizeHtml: (html: string, options?: SanitizeHtmlOptions) => string;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { VChild, VNode } from "../model/vnode";
|
|
2
|
+
export type DomEnv = {
|
|
3
|
+
doc: Document;
|
|
4
|
+
/** The `on` record of every element drawn (event delegation). */
|
|
5
|
+
on: WeakMap<Element, Record<string, unknown>>;
|
|
6
|
+
/** Host-marked node: return VChildren to draw instead (e.g. a host field), or undefined for the default markup. */
|
|
7
|
+
host?: (node: VNode) => VChild[] | undefined;
|
|
8
|
+
/** Called for every element drawn with its node (the controller's post-render work: slots, active options). */
|
|
9
|
+
drawn?: (el: Element, node: VNode) => void;
|
|
10
|
+
};
|
|
11
|
+
/** Makes `parent`'s children match `children` (in place where tags match). */
|
|
12
|
+
export declare const patchChildren: (parent: Element, children: VChild[], env: DomEnv, svg?: boolean) => void;
|
|
13
|
+
/** Draws `node` as the only content of `target`. */
|
|
14
|
+
export declare const toDOM: (target: Element, node: VChild, env: DomEnv) => void;
|