@vef-framework-react/form-editor 2.4.0
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/cjs/_internal/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/components/button/index.cjs +1 -0
- package/dist/cjs/components/checkbox-group-field/index.cjs +1 -0
- package/dist/cjs/components/code-editor/code-editor-input.cjs +1 -0
- package/dist/cjs/components/code-editor/index.cjs +1 -0
- package/dist/cjs/components/containers/index.cjs +1 -0
- package/dist/cjs/components/date-field/index.cjs +1 -0
- package/dist/cjs/components/display/index.cjs +1 -0
- package/dist/cjs/components/field-entries.cjs +1 -0
- package/dist/cjs/components/mobile/alert-block.cjs +1 -0
- package/dist/cjs/components/mobile/button.cjs +1 -0
- package/dist/cjs/components/mobile/checkbox-group.cjs +1 -0
- package/dist/cjs/components/mobile/date-adapters.cjs +1 -0
- package/dist/cjs/components/mobile/date.cjs +1 -0
- package/dist/cjs/components/mobile/daterange.cjs +1 -0
- package/dist/cjs/components/mobile/datetime.cjs +1 -0
- package/dist/cjs/components/mobile/definitions.cjs +1 -0
- package/dist/cjs/components/mobile/divider.cjs +1 -0
- package/dist/cjs/components/mobile/input-cell.cjs +1 -0
- package/dist/cjs/components/mobile/number.cjs +1 -0
- package/dist/cjs/components/mobile/option-group.cjs +1 -0
- package/dist/cjs/components/mobile/paragraph.cjs +1 -0
- package/dist/cjs/components/mobile/picker-trigger.cjs +1 -0
- package/dist/cjs/components/mobile/radio.cjs +1 -0
- package/dist/cjs/components/mobile/scope.cjs +1 -0
- package/dist/cjs/components/mobile/select.cjs +1 -0
- package/dist/cjs/components/mobile/switch.cjs +1 -0
- package/dist/cjs/components/mobile/textarea.cjs +1 -0
- package/dist/cjs/components/mobile/textfield.cjs +1 -0
- package/dist/cjs/components/mobile/theme.cjs +1 -0
- package/dist/cjs/components/number-field/index.cjs +1 -0
- package/dist/cjs/components/radio-field/index.cjs +1 -0
- package/dist/cjs/components/select-field/index.cjs +1 -0
- package/dist/cjs/components/switch-field/index.cjs +1 -0
- package/dist/cjs/components/textarea-field/index.cjs +1 -0
- package/dist/cjs/components/textfield/index.cjs +1 -0
- package/dist/cjs/editor/canvas/canvas-field.cjs +1 -0
- package/dist/cjs/editor/canvas/canvas.cjs +1 -0
- package/dist/cjs/editor/canvas/drop-indicator.cjs +1 -0
- package/dist/cjs/editor/canvas/drop-zones.cjs +1 -0
- package/dist/cjs/editor/canvas/json-split-view.cjs +1 -0
- package/dist/cjs/editor/canvas/mobile-seed-state.cjs +2 -0
- package/dist/cjs/editor/canvas/phone-frame.cjs +1 -0
- package/dist/cjs/editor/dnd.cjs +1 -0
- package/dist/cjs/editor/editor-layout-context.cjs +1 -0
- package/dist/cjs/editor/footer/footer.cjs +1 -0
- package/dist/cjs/editor/form-config/form-basics-tab.cjs +1 -0
- package/dist/cjs/editor/form-config/form-config-drawer.cjs +1 -0
- package/dist/cjs/editor/form-config/outline-tab.cjs +1 -0
- package/dist/cjs/editor/form-editor.cjs +1 -0
- package/dist/cjs/editor/palette/field-groups.cjs +1 -0
- package/dist/cjs/editor/palette/palette-group.cjs +1 -0
- package/dist/cjs/editor/palette/palette-item.cjs +1 -0
- package/dist/cjs/editor/palette/palette-panel.cjs +1 -0
- package/dist/cjs/editor/preview-effects.cjs +1 -0
- package/dist/cjs/editor/preview-runtime-context.cjs +1 -0
- package/dist/cjs/editor/properties/block-layout-section.cjs +1 -0
- package/dist/cjs/editor/properties/container-properties.cjs +1 -0
- package/dist/cjs/editor/properties/entries/built-ins.cjs +1 -0
- package/dist/cjs/editor/properties/entries/checkbox-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/coerce.cjs +1 -0
- package/dist/cjs/editor/properties/entries/entry-field.cjs +1 -0
- package/dist/cjs/editor/properties/entries/icon-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/index.cjs +1 -0
- package/dist/cjs/editor/properties/entries/key-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/action-editor.cjs +2 -0
- package/dist/cjs/editor/properties/entries/linkage/actions-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/container-linkage-section.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/expression-assist.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/index.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/linkage-rules-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/mutators.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/options.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/rule-diagnostics.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/rule-list-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/styles.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/trigger-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/use-linkage-editor-model.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/use-stable-options.cjs +1 -0
- package/dist/cjs/editor/properties/entries/number-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/options-source/index.cjs +1 -0
- package/dist/cjs/editor/properties/entries/options-source/source-mutators.cjs +1 -0
- package/dist/cjs/editor/properties/entries/select-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/text-entry.cjs +1 -0
- package/dist/cjs/editor/properties/form-data-sources-panel.cjs +1 -0
- package/dist/cjs/editor/properties/form-linkage-panel.cjs +1 -0
- package/dist/cjs/editor/properties/form-variables-panel.cjs +1 -0
- package/dist/cjs/editor/properties/option-editors.cjs +1 -0
- package/dist/cjs/editor/properties/panel-header.cjs +1 -0
- package/dist/cjs/editor/properties/properties-empty.cjs +1 -0
- package/dist/cjs/editor/properties/properties-header.cjs +1 -0
- package/dist/cjs/editor/properties/properties-panel.cjs +1 -0
- package/dist/cjs/editor/properties/properties-provider.cjs +1 -0
- package/dist/cjs/editor/properties/properties-tabs.cjs +1 -0
- package/dist/cjs/editor/properties/use-confirmable-kind-switch.cjs +1 -0
- package/dist/cjs/editor/remove-node-confirm.cjs +1 -0
- package/dist/cjs/editor/schema-apply.cjs +2 -0
- package/dist/cjs/editor/styles.cjs +1 -0
- package/dist/cjs/editor/toolbar/notify.cjs +1 -0
- package/dist/cjs/editor/toolbar/schema-io.cjs +1 -0
- package/dist/cjs/editor/toolbar/toolbar.cjs +1 -0
- package/dist/cjs/editor/use-editor-shortcuts.cjs +1 -0
- package/dist/cjs/editor/validation-summary.cjs +1 -0
- package/dist/cjs/engine/assert-never.cjs +1 -0
- package/dist/cjs/engine/conversion/index.cjs +1 -0
- package/dist/cjs/engine/ids.cjs +1 -0
- package/dist/cjs/engine/keys.cjs +1 -0
- package/dist/cjs/engine/linkage/cycle.cjs +1 -0
- package/dist/cjs/engine/linkage/default-evaluator.cjs +1 -0
- package/dist/cjs/engine/linkage/effects.cjs +1 -0
- package/dist/cjs/engine/linkage/evaluator.cjs +1 -0
- package/dist/cjs/engine/linkage/index.cjs +1 -0
- package/dist/cjs/engine/linkage/operators.cjs +1 -0
- package/dist/cjs/engine/linkage/source-tracking.cjs +1 -0
- package/dist/cjs/engine/linkage/taxonomy.cjs +1 -0
- package/dist/cjs/engine/linkage/validator.cjs +1 -0
- package/dist/cjs/engine/registry/defaults-mobile.cjs +1 -0
- package/dist/cjs/engine/registry/defaults.cjs +1 -0
- package/dist/cjs/engine/registry/form-field-registry.cjs +1 -0
- package/dist/cjs/engine/schema/edit-ops.cjs +1 -0
- package/dist/cjs/engine/schema/mutate.cjs +1 -0
- package/dist/cjs/engine/schema/nodes.cjs +1 -0
- package/dist/cjs/engine/schema/permission-bridge.cjs +1 -0
- package/dist/cjs/engine/schema/presentation.cjs +1 -0
- package/dist/cjs/engine/schema/reconcile.cjs +1 -0
- package/dist/cjs/engine/schema/removal-impact.cjs +1 -0
- package/dist/cjs/engine/schema/rewrite.cjs +1 -0
- package/dist/cjs/engine/schema/validate.cjs +1 -0
- package/dist/cjs/engine/schema/walk.cjs +1 -0
- package/dist/cjs/engine/validation.cjs +1 -0
- package/dist/cjs/icons.cjs +1 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/render/chrome/mobile-chrome.cjs +1 -0
- package/dist/cjs/render/chrome/pc-chrome.cjs +1 -0
- package/dist/cjs/render/chrome/subform-shell.cjs +1 -0
- package/dist/cjs/render/data-source-context.cjs +0 -0
- package/dist/cjs/render/flex-style.cjs +1 -0
- package/dist/cjs/render/form-field.cjs +1 -0
- package/dist/cjs/render/form-renderer.cjs +1 -0
- package/dist/cjs/render/grid-style.cjs +1 -0
- package/dist/cjs/render/parts/field-shell.cjs +1 -0
- package/dist/cjs/render/parts/label.cjs +1 -0
- package/dist/cjs/render/parts/options-status.cjs +1 -0
- package/dist/cjs/render/stack-style.cjs +1 -0
- package/dist/cjs/render/subform-columns.cjs +1 -0
- package/dist/cjs/render/submit.cjs +1 -0
- package/dist/cjs/runtime/effects.cjs +1 -0
- package/dist/cjs/runtime/resolve-scope-values.cjs +1 -0
- package/dist/cjs/runtime/runtime-context.cjs +1 -0
- package/dist/cjs/runtime/runtime-state-controller.cjs +1 -0
- package/dist/cjs/runtime/stabilize-state-map.cjs +1 -0
- package/dist/cjs/store/engine-provider.cjs +1 -0
- package/dist/cjs/store/form-store.cjs +1 -0
- package/dist/cjs/types/chrome.cjs +0 -0
- package/dist/cjs/types/component.cjs +1 -0
- package/dist/cjs/types/data-source.cjs +1 -0
- package/dist/cjs/types/index.cjs +1 -0
- package/dist/cjs/types/linkage.cjs +0 -0
- package/dist/cjs/types/properties.cjs +1 -0
- package/dist/cjs/types/schema.cjs +1 -0
- package/dist/es/components/button/index.js +183 -0
- package/dist/es/components/checkbox-group-field/index.js +103 -0
- package/dist/es/components/code-editor/code-editor-input.js +3 -0
- package/dist/es/components/code-editor/index.js +212 -0
- package/dist/es/components/containers/index.js +72 -0
- package/dist/es/components/date-field/index.js +197 -0
- package/dist/es/components/display/index.js +276 -0
- package/dist/es/components/field-entries.js +184 -0
- package/dist/es/components/mobile/alert-block.js +40 -0
- package/dist/es/components/mobile/button.js +41 -0
- package/dist/es/components/mobile/checkbox-group.js +35 -0
- package/dist/es/components/mobile/date-adapters.js +16 -0
- package/dist/es/components/mobile/date.js +42 -0
- package/dist/es/components/mobile/daterange.js +48 -0
- package/dist/es/components/mobile/datetime.js +42 -0
- package/dist/es/components/mobile/definitions.js +58 -0
- package/dist/es/components/mobile/divider.js +10 -0
- package/dist/es/components/mobile/input-cell.js +56 -0
- package/dist/es/components/mobile/number.js +73 -0
- package/dist/es/components/mobile/option-group.js +34 -0
- package/dist/es/components/mobile/paragraph.js +30 -0
- package/dist/es/components/mobile/picker-trigger.js +94 -0
- package/dist/es/components/mobile/radio.js +35 -0
- package/dist/es/components/mobile/scope.js +61 -0
- package/dist/es/components/mobile/select.js +45 -0
- package/dist/es/components/mobile/switch.js +22 -0
- package/dist/es/components/mobile/textarea.js +32 -0
- package/dist/es/components/mobile/textfield.js +30 -0
- package/dist/es/components/mobile/theme.js +8 -0
- package/dist/es/components/number-field/index.js +186 -0
- package/dist/es/components/radio-field/index.js +139 -0
- package/dist/es/components/select-field/index.js +128 -0
- package/dist/es/components/switch-field/index.js +133 -0
- package/dist/es/components/textarea-field/index.js +137 -0
- package/dist/es/components/textfield/index.js +138 -0
- package/dist/es/editor/canvas/canvas-field.js +202 -0
- package/dist/es/editor/canvas/canvas.js +415 -0
- package/dist/es/editor/canvas/drop-indicator.js +42 -0
- package/dist/es/editor/canvas/drop-zones.js +42 -0
- package/dist/es/editor/canvas/json-split-view.js +148 -0
- package/dist/es/editor/canvas/mobile-seed-state.js +103 -0
- package/dist/es/editor/canvas/phone-frame.js +109 -0
- package/dist/es/editor/dnd.js +75 -0
- package/dist/es/editor/editor-layout-context.js +34 -0
- package/dist/es/editor/footer/footer.js +154 -0
- package/dist/es/editor/form-config/form-basics-tab.js +184 -0
- package/dist/es/editor/form-config/form-config-drawer.js +224 -0
- package/dist/es/editor/form-config/outline-tab.js +132 -0
- package/dist/es/editor/form-editor.js +179 -0
- package/dist/es/editor/palette/field-groups.js +19 -0
- package/dist/es/editor/palette/palette-group.js +147 -0
- package/dist/es/editor/palette/palette-item.js +153 -0
- package/dist/es/editor/palette/palette-panel.js +109 -0
- package/dist/es/editor/preview-effects.js +22 -0
- package/dist/es/editor/preview-runtime-context.js +24 -0
- package/dist/es/editor/properties/block-layout-section.js +161 -0
- package/dist/es/editor/properties/container-properties.js +575 -0
- package/dist/es/editor/properties/entries/built-ins.js +21 -0
- package/dist/es/editor/properties/entries/checkbox-entry.js +31 -0
- package/dist/es/editor/properties/entries/coerce.js +8 -0
- package/dist/es/editor/properties/entries/entry-field.js +43 -0
- package/dist/es/editor/properties/entries/icon-entry.js +21 -0
- package/dist/es/editor/properties/entries/index.js +9 -0
- package/dist/es/editor/properties/entries/key-entry.js +29 -0
- package/dist/es/editor/properties/entries/linkage/action-editor.js +260 -0
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +64 -0
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +265 -0
- package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +71 -0
- package/dist/es/editor/properties/entries/linkage/expression-assist.js +87 -0
- package/dist/es/editor/properties/entries/linkage/index.js +3 -0
- package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +110 -0
- package/dist/es/editor/properties/entries/linkage/mutators.js +209 -0
- package/dist/es/editor/properties/entries/linkage/options.js +155 -0
- package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +58 -0
- package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +126 -0
- package/dist/es/editor/properties/entries/linkage/styles.js +276 -0
- package/dist/es/editor/properties/entries/linkage/trigger-editor.js +64 -0
- package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +20 -0
- package/dist/es/editor/properties/entries/linkage/use-stable-options.js +12 -0
- package/dist/es/editor/properties/entries/number-entry.js +25 -0
- package/dist/es/editor/properties/entries/options-source/index.js +122 -0
- package/dist/es/editor/properties/entries/options-source/source-mutators.js +31 -0
- package/dist/es/editor/properties/entries/select-entry.js +23 -0
- package/dist/es/editor/properties/entries/text-entry.js +23 -0
- package/dist/es/editor/properties/form-data-sources-panel.js +170 -0
- package/dist/es/editor/properties/form-linkage-panel.js +36 -0
- package/dist/es/editor/properties/form-variables-panel.js +184 -0
- package/dist/es/editor/properties/option-editors.js +170 -0
- package/dist/es/editor/properties/panel-header.js +93 -0
- package/dist/es/editor/properties/properties-empty.js +62 -0
- package/dist/es/editor/properties/properties-header.js +31 -0
- package/dist/es/editor/properties/properties-panel.js +195 -0
- package/dist/es/editor/properties/properties-provider.js +95 -0
- package/dist/es/editor/properties/properties-tabs.js +91 -0
- package/dist/es/editor/properties/use-confirmable-kind-switch.js +26 -0
- package/dist/es/editor/remove-node-confirm.js +60 -0
- package/dist/es/editor/schema-apply.js +36 -0
- package/dist/es/editor/styles.js +74 -0
- package/dist/es/editor/toolbar/notify.js +59 -0
- package/dist/es/editor/toolbar/schema-io.js +107 -0
- package/dist/es/editor/toolbar/toolbar.js +394 -0
- package/dist/es/editor/use-editor-shortcuts.js +43 -0
- package/dist/es/editor/validation-summary.js +66 -0
- package/dist/es/engine/assert-never.js +8 -0
- package/dist/es/engine/conversion/index.js +127 -0
- package/dist/es/engine/ids.js +18 -0
- package/dist/es/engine/keys.js +48 -0
- package/dist/es/engine/linkage/cycle.js +25 -0
- package/dist/es/engine/linkage/default-evaluator.js +79 -0
- package/dist/es/engine/linkage/effects.js +41 -0
- package/dist/es/engine/linkage/evaluator.js +119 -0
- package/dist/es/engine/linkage/index.js +9 -0
- package/dist/es/engine/linkage/operators.js +44 -0
- package/dist/es/engine/linkage/source-tracking.js +17 -0
- package/dist/es/engine/linkage/taxonomy.js +51 -0
- package/dist/es/engine/linkage/validator.js +360 -0
- package/dist/es/engine/registry/defaults-mobile.js +12 -0
- package/dist/es/engine/registry/defaults.js +25 -0
- package/dist/es/engine/registry/form-field-registry.js +52 -0
- package/dist/es/engine/schema/edit-ops.js +264 -0
- package/dist/es/engine/schema/mutate.js +39 -0
- package/dist/es/engine/schema/nodes.js +61 -0
- package/dist/es/engine/schema/permission-bridge.js +46 -0
- package/dist/es/engine/schema/presentation.js +37 -0
- package/dist/es/engine/schema/reconcile.js +258 -0
- package/dist/es/engine/schema/removal-impact.js +59 -0
- package/dist/es/engine/schema/rewrite.js +11 -0
- package/dist/es/engine/schema/validate.js +320 -0
- package/dist/es/engine/schema/walk.js +103 -0
- package/dist/es/engine/validation.js +122 -0
- package/dist/es/icons.js +74 -0
- package/dist/es/index.js +54 -0
- package/dist/es/render/chrome/mobile-chrome.js +119 -0
- package/dist/es/render/chrome/pc-chrome.js +76 -0
- package/dist/es/render/chrome/subform-shell.js +38 -0
- package/dist/es/render/data-source-context.js +0 -0
- package/dist/es/render/flex-style.js +24 -0
- package/dist/es/render/form-field.js +37 -0
- package/dist/es/render/form-renderer.js +516 -0
- package/dist/es/render/grid-style.js +23 -0
- package/dist/es/render/parts/field-shell.js +119 -0
- package/dist/es/render/parts/label.js +44 -0
- package/dist/es/render/parts/options-status.js +19 -0
- package/dist/es/render/stack-style.js +13 -0
- package/dist/es/render/subform-columns.js +118 -0
- package/dist/es/render/submit.js +112 -0
- package/dist/es/runtime/effects.js +109 -0
- package/dist/es/runtime/resolve-scope-values.js +14 -0
- package/dist/es/runtime/runtime-context.js +10 -0
- package/dist/es/runtime/runtime-state-controller.js +99 -0
- package/dist/es/runtime/stabilize-state-map.js +14 -0
- package/dist/es/store/engine-provider.js +37 -0
- package/dist/es/store/form-store.js +306 -0
- package/dist/es/types/chrome.js +1 -0
- package/dist/es/types/component.js +13 -0
- package/dist/es/types/data-source.js +5 -0
- package/dist/es/types/index.js +5 -0
- package/dist/es/types/linkage.js +1 -0
- package/dist/es/types/properties.js +7 -0
- package/dist/es/types/schema.js +15 -0
- package/dist/types/src/components/button/index.d.ts +8 -0
- package/dist/types/src/components/checkbox-group-field/index.d.ts +2 -0
- package/dist/types/src/components/code-editor/code-editor-input.d.ts +1 -0
- package/dist/types/src/components/code-editor/index.d.ts +4 -0
- package/dist/types/src/components/containers/index.d.ts +12 -0
- package/dist/types/src/components/date-field/index.d.ts +4 -0
- package/dist/types/src/components/display/index.d.ts +4 -0
- package/dist/types/src/components/field-entries.d.ts +103 -0
- package/dist/types/src/components/mobile/alert-block.d.ts +12 -0
- package/dist/types/src/components/mobile/button.d.ts +9 -0
- package/dist/types/src/components/mobile/checkbox-group.d.ts +11 -0
- package/dist/types/src/components/mobile/date-adapters.d.ts +28 -0
- package/dist/types/src/components/mobile/date.d.ts +10 -0
- package/dist/types/src/components/mobile/daterange.d.ts +11 -0
- package/dist/types/src/components/mobile/datetime.d.ts +10 -0
- package/dist/types/src/components/mobile/definitions.d.ts +9 -0
- package/dist/types/src/components/mobile/divider.d.ts +10 -0
- package/dist/types/src/components/mobile/input-cell.d.ts +30 -0
- package/dist/types/src/components/mobile/number.d.ts +25 -0
- package/dist/types/src/components/mobile/option-group.d.ts +17 -0
- package/dist/types/src/components/mobile/paragraph.d.ts +10 -0
- package/dist/types/src/components/mobile/picker-trigger.d.ts +31 -0
- package/dist/types/src/components/mobile/radio.d.ts +12 -0
- package/dist/types/src/components/mobile/scope.d.ts +42 -0
- package/dist/types/src/components/mobile/select.d.ts +12 -0
- package/dist/types/src/components/mobile/switch.d.ts +14 -0
- package/dist/types/src/components/mobile/textarea.d.ts +3 -0
- package/dist/types/src/components/mobile/textfield.d.ts +11 -0
- package/dist/types/src/components/mobile/theme.d.ts +16 -0
- package/dist/types/src/components/number-field/index.d.ts +2 -0
- package/dist/types/src/components/radio-field/index.d.ts +2 -0
- package/dist/types/src/components/select-field/index.d.ts +2 -0
- package/dist/types/src/components/switch-field/index.d.ts +2 -0
- package/dist/types/src/components/textarea-field/index.d.ts +2 -0
- package/dist/types/src/components/textfield/index.d.ts +11 -0
- package/dist/types/src/editor/canvas/canvas-field.d.ts +24 -0
- package/dist/types/src/editor/canvas/canvas.d.ts +11 -0
- package/dist/types/src/editor/canvas/drop-indicator.d.ts +14 -0
- package/dist/types/src/editor/canvas/drop-zones.d.ts +48 -0
- package/dist/types/src/editor/canvas/json-split-view.d.ts +15 -0
- package/dist/types/src/editor/canvas/mobile-seed-state.d.ts +9 -0
- package/dist/types/src/editor/canvas/phone-frame.d.ts +15 -0
- package/dist/types/src/editor/dnd.d.ts +88 -0
- package/dist/types/src/editor/editor-layout-context.d.ts +53 -0
- package/dist/types/src/editor/footer/footer.d.ts +7 -0
- package/dist/types/src/editor/form-config/form-basics-tab.d.ts +34 -0
- package/dist/types/src/editor/form-config/form-config-drawer.d.ts +8 -0
- package/dist/types/src/editor/form-config/outline-tab.d.ts +2 -0
- package/dist/types/src/editor/form-editor.d.ts +142 -0
- package/dist/types/src/editor/palette/field-groups.d.ts +12 -0
- package/dist/types/src/editor/palette/palette-group.d.ts +31 -0
- package/dist/types/src/editor/palette/palette-item.d.ts +34 -0
- package/dist/types/src/editor/palette/palette-panel.d.ts +17 -0
- package/dist/types/src/editor/preview-effects.d.ts +14 -0
- package/dist/types/src/editor/preview-runtime-context.d.ts +23 -0
- package/dist/types/src/editor/properties/block-layout-section.d.ts +19 -0
- package/dist/types/src/editor/properties/container-properties.d.ts +19 -0
- package/dist/types/src/editor/properties/entries/built-ins.d.ts +19 -0
- package/dist/types/src/editor/properties/entries/checkbox-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/entries/coerce.d.ts +6 -0
- package/dist/types/src/editor/properties/entries/entry-field.d.ts +29 -0
- package/dist/types/src/editor/properties/entries/icon-entry.d.ts +8 -0
- package/dist/types/src/editor/properties/entries/index.d.ts +8 -0
- package/dist/types/src/editor/properties/entries/key-entry.d.ts +14 -0
- package/dist/types/src/editor/properties/entries/linkage/action-editor.d.ts +42 -0
- package/dist/types/src/editor/properties/entries/linkage/actions-editor.d.ts +43 -0
- package/dist/types/src/editor/properties/entries/linkage/condition-editor.d.ts +28 -0
- package/dist/types/src/editor/properties/entries/linkage/container-linkage-section.d.ts +14 -0
- package/dist/types/src/editor/properties/entries/linkage/expression-assist.d.ts +33 -0
- package/dist/types/src/editor/properties/entries/linkage/index.d.ts +1 -0
- package/dist/types/src/editor/properties/entries/linkage/linkage-rules-entry.d.ts +17 -0
- package/dist/types/src/editor/properties/entries/linkage/mutators.d.ts +73 -0
- package/dist/types/src/editor/properties/entries/linkage/options.d.ts +72 -0
- package/dist/types/src/editor/properties/entries/linkage/rule-diagnostics.d.ts +20 -0
- package/dist/types/src/editor/properties/entries/linkage/rule-list-editor.d.ts +75 -0
- package/dist/types/src/editor/properties/entries/linkage/styles.d.ts +46 -0
- package/dist/types/src/editor/properties/entries/linkage/trigger-editor.d.ts +35 -0
- package/dist/types/src/editor/properties/entries/linkage/use-linkage-editor-model.d.ts +46 -0
- package/dist/types/src/editor/properties/entries/linkage/use-stable-options.d.ts +17 -0
- package/dist/types/src/editor/properties/entries/number-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/entries/options-source/index.d.ts +9 -0
- package/dist/types/src/editor/properties/entries/options-source/source-mutators.d.ts +14 -0
- package/dist/types/src/editor/properties/entries/select-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/entries/text-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/form-data-sources-panel.d.ts +16 -0
- package/dist/types/src/editor/properties/form-linkage-panel.d.ts +13 -0
- package/dist/types/src/editor/properties/form-variables-panel.d.ts +17 -0
- package/dist/types/src/editor/properties/option-editors.d.ts +33 -0
- package/dist/types/src/editor/properties/panel-header.d.ts +21 -0
- package/dist/types/src/editor/properties/properties-empty.d.ts +13 -0
- package/dist/types/src/editor/properties/properties-header.d.ts +13 -0
- package/dist/types/src/editor/properties/properties-panel.d.ts +18 -0
- package/dist/types/src/editor/properties/properties-provider.d.ts +42 -0
- package/dist/types/src/editor/properties/properties-tabs.d.ts +24 -0
- package/dist/types/src/editor/properties/use-confirmable-kind-switch.d.ts +38 -0
- package/dist/types/src/editor/remove-node-confirm.d.ts +8 -0
- package/dist/types/src/editor/schema-apply.d.ts +25 -0
- package/dist/types/src/editor/styles.d.ts +37 -0
- package/dist/types/src/editor/toolbar/notify.d.ts +13 -0
- package/dist/types/src/editor/toolbar/schema-io.d.ts +12 -0
- package/dist/types/src/editor/toolbar/toolbar.d.ts +42 -0
- package/dist/types/src/editor/use-editor-shortcuts.d.ts +23 -0
- package/dist/types/src/editor/validation-summary.d.ts +19 -0
- package/dist/types/src/engine/assert-never.d.ts +18 -0
- package/dist/types/src/engine/conversion/index.d.ts +87 -0
- package/dist/types/src/engine/ids.d.ts +14 -0
- package/dist/types/src/engine/keys.d.ts +70 -0
- package/dist/types/src/engine/linkage/cycle.d.ts +28 -0
- package/dist/types/src/engine/linkage/default-evaluator.d.ts +10 -0
- package/dist/types/src/engine/linkage/effects.d.ts +76 -0
- package/dist/types/src/engine/linkage/evaluator.d.ts +72 -0
- package/dist/types/src/engine/linkage/index.d.ts +8 -0
- package/dist/types/src/engine/linkage/operators.d.ts +23 -0
- package/dist/types/src/engine/linkage/source-tracking.d.ts +25 -0
- package/dist/types/src/engine/linkage/taxonomy.d.ts +49 -0
- package/dist/types/src/engine/linkage/validator.d.ts +23 -0
- package/dist/types/src/engine/registry/defaults-mobile.d.ts +17 -0
- package/dist/types/src/engine/registry/defaults.d.ts +22 -0
- package/dist/types/src/engine/registry/form-field-registry.d.ts +79 -0
- package/dist/types/src/engine/schema/edit-ops.d.ts +101 -0
- package/dist/types/src/engine/schema/mutate.d.ts +41 -0
- package/dist/types/src/engine/schema/nodes.d.ts +34 -0
- package/dist/types/src/engine/schema/permission-bridge.d.ts +37 -0
- package/dist/types/src/engine/schema/presentation.d.ts +30 -0
- package/dist/types/src/engine/schema/reconcile.d.ts +80 -0
- package/dist/types/src/engine/schema/removal-impact.d.ts +39 -0
- package/dist/types/src/engine/schema/rewrite.d.ts +15 -0
- package/dist/types/src/engine/schema/validate.d.ts +36 -0
- package/dist/types/src/engine/schema/walk.d.ts +90 -0
- package/dist/types/src/engine/validation.d.ts +139 -0
- package/dist/types/src/icons.d.ts +8 -0
- package/dist/types/src/index.d.ts +39 -0
- package/dist/types/src/render/chrome/mobile-chrome.d.ts +9 -0
- package/dist/types/src/render/chrome/pc-chrome.d.ts +7 -0
- package/dist/types/src/render/chrome/subform-shell.d.ts +17 -0
- package/dist/types/src/render/data-source-context.d.ts +42 -0
- package/dist/types/src/render/flex-style.d.ts +26 -0
- package/dist/types/src/render/form-field.d.ts +32 -0
- package/dist/types/src/render/form-renderer.d.ts +65 -0
- package/dist/types/src/render/grid-style.d.ts +24 -0
- package/dist/types/src/render/parts/field-shell.d.ts +33 -0
- package/dist/types/src/render/parts/label.d.ts +20 -0
- package/dist/types/src/render/parts/options-status.d.ts +14 -0
- package/dist/types/src/render/stack-style.d.ts +19 -0
- package/dist/types/src/render/subform-columns.d.ts +16 -0
- package/dist/types/src/render/submit.d.ts +91 -0
- package/dist/types/src/runtime/effects.d.ts +77 -0
- package/dist/types/src/runtime/resolve-scope-values.d.ts +8 -0
- package/dist/types/src/runtime/runtime-context.d.ts +21 -0
- package/dist/types/src/runtime/runtime-state-controller.d.ts +33 -0
- package/dist/types/src/runtime/stabilize-state-map.d.ts +12 -0
- package/dist/types/src/runtime/types.d.ts +13 -0
- package/dist/types/src/store/engine-provider.d.ts +50 -0
- package/dist/types/src/store/form-store.d.ts +234 -0
- package/dist/types/src/types/chrome.d.ts +51 -0
- package/dist/types/src/types/component.d.ts +116 -0
- package/dist/types/src/types/data-source.d.ts +70 -0
- package/dist/types/src/types/index.d.ts +6 -0
- package/dist/types/src/types/linkage.d.ts +350 -0
- package/dist/types/src/types/properties.d.ts +122 -0
- package/dist/types/src/types/schema.d.ts +839 -0
- package/package.json +77 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { FieldLinkage, FormSchema, PresentationLayer } from '../../types';
|
|
2
|
+
import { ScopeKeyBucket } from '../keys';
|
|
3
|
+
import { ScopePath } from './walk';
|
|
4
|
+
/**
|
|
5
|
+
* Rewrite every `leaf.sourceKey` / `set_field.targetKey` reference to `oldKey`
|
|
6
|
+
* inside one linkage payload. Scope-blind by design: the caller decides which
|
|
7
|
+
* linkage resolves in the affected scope — the layer-level
|
|
8
|
+
* {@link renameKeyReferences} filters per node, and the store applies this
|
|
9
|
+
* directly to the form-level `schema.linkage` when a pc root-scope key is
|
|
10
|
+
* renamed.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renameLinkageKeyReferences(linkage: FieldLinkage, oldKey: string, newKey: string): FieldLinkage;
|
|
13
|
+
/**
|
|
14
|
+
* Rewrite condition `sourceKey`s and `set_field.targetKey`s from `oldKey` to
|
|
15
|
+
* `newKey` across the layer, for the nodes whose linkage resolves in exactly
|
|
16
|
+
* `scope`. Subform templates open their own scope, so a same-named key inside
|
|
17
|
+
* (or outside) them is a different binding and is left untouched.
|
|
18
|
+
*
|
|
19
|
+
* Identity contract: no reference to `oldKey` in that scope ⇒ the input layer
|
|
20
|
+
* reference is returned.
|
|
21
|
+
*/
|
|
22
|
+
export declare function renameKeyReferences(layer: PresentationLayer, scope: ScopePath, oldKey: string, newKey: string): PresentationLayer;
|
|
23
|
+
/**
|
|
24
|
+
* Prune every reference to a removed key inside one linkage payload. Cascades
|
|
25
|
+
* bottom-up: leaf → enclosing group → rule, and action → rule. Scope-blind by
|
|
26
|
+
* design, mirroring {@link renameLinkageKeyReferences} — the store applies
|
|
27
|
+
* this directly to the form-level `schema.linkage` when pc root-scope keys are
|
|
28
|
+
* removed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function pruneLinkageKeyReferences(linkage: FieldLinkage, removedKeys: ReadonlySet<string>): FieldLinkage;
|
|
31
|
+
/**
|
|
32
|
+
* Drop every reference to the removed keys across the layer, for the nodes
|
|
33
|
+
* whose linkage resolves in exactly `scope`: leaf conditions on a removed
|
|
34
|
+
* `sourceKey` are pruned (cascading group → rule removal), and `set_field`
|
|
35
|
+
* actions on a removed `targetKey` are dropped (a rule emptied of actions is
|
|
36
|
+
* removed). Subform templates are separate key namespaces and are left
|
|
37
|
+
* untouched unless `scope` names them.
|
|
38
|
+
*
|
|
39
|
+
* Identity contract: nothing referenced a removed key in that scope ⇒ the
|
|
40
|
+
* input layer reference is returned.
|
|
41
|
+
*/
|
|
42
|
+
export declare function pruneKeyReferences(layer: PresentationLayer, scope: ScopePath, removedKeys: ReadonlySet<string>): PresentationLayer;
|
|
43
|
+
/**
|
|
44
|
+
* Prune layer-level linkage references to a set of removed keys, scope by scope.
|
|
45
|
+
* The composite the store and the removal-impact preview share: a subtree
|
|
46
|
+
* removal (or a cross-scope move's departure) collects its dying keys into
|
|
47
|
+
* {@link ScopeKeyBucket}s, and this applies {@link pruneKeyReferences} once per
|
|
48
|
+
* bucket. Identity-preserving — returns the input layer when nothing matched.
|
|
49
|
+
*/
|
|
50
|
+
export declare function pruneScopedReferences(layer: PresentationLayer, buckets: readonly ScopeKeyBucket[]): PresentationLayer;
|
|
51
|
+
/**
|
|
52
|
+
* Prune the form-level linkage (the PC root scope) against the root bucket of a
|
|
53
|
+
* removal — the keys that died at `scope === []`. Mobile / nested-scope buckets
|
|
54
|
+
* never touch it. Identity-preserving: returns the input linkage when there is
|
|
55
|
+
* no root bucket or nothing matched. Pairs with {@link pruneScopedReferences} so
|
|
56
|
+
* every caller treats the form linkage's root-scope special case identically.
|
|
57
|
+
*/
|
|
58
|
+
export declare function pruneFormLinkageForRootBucket(linkage: FieldLinkage, buckets: readonly ScopeKeyBucket[]): FieldLinkage;
|
|
59
|
+
/**
|
|
60
|
+
* Rewrite every `set_variable` action targeting variable `name` to
|
|
61
|
+
* `nextName`, across **both** presentations and the form-level
|
|
62
|
+
* `schema.linkage`. Variables are form-global, so there is no scope filter.
|
|
63
|
+
*
|
|
64
|
+
* Identity contract: no action targeted `name` ⇒ the input schema reference is
|
|
65
|
+
* returned.
|
|
66
|
+
*/
|
|
67
|
+
export declare function renameVariableReferences(schema: FormSchema, name: string, nextName: string): FormSchema;
|
|
68
|
+
/**
|
|
69
|
+
* Drop every reference to a removed form-global data source: field-level
|
|
70
|
+
* `{ kind: "ref" }` option sources lose their `dataSource` key (the field
|
|
71
|
+
* becomes source-less), and `refresh_data_source` actions naming it are
|
|
72
|
+
* dropped (a rule emptied of actions is removed) — across **both**
|
|
73
|
+
* presentations and the form-level `schema.linkage`. Data sources are
|
|
74
|
+
* form-global, so there is no scope filter. The declaration itself lives in
|
|
75
|
+
* `schema.dataSources` and is the caller's to remove.
|
|
76
|
+
*
|
|
77
|
+
* Identity contract: nothing referenced the source ⇒ the input schema
|
|
78
|
+
* reference is returned.
|
|
79
|
+
*/
|
|
80
|
+
export declare function pruneDataSourceReferences(schema: FormSchema, dataSourceId: string): FormSchema;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FieldLinkage, PresentationLayer } from '../../types';
|
|
2
|
+
export interface RemovalImpactOwner {
|
|
3
|
+
ownerId: string;
|
|
4
|
+
ownerLabel: string;
|
|
5
|
+
/**
|
|
6
|
+
* Rules this surviving owner loses to the reference prune.
|
|
7
|
+
*/
|
|
8
|
+
count: number;
|
|
9
|
+
}
|
|
10
|
+
export interface RemovalImpactField {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RemovalImpact {
|
|
15
|
+
/**
|
|
16
|
+
* Rules on blocks OUTSIDE the removed subtree that the prune will drop.
|
|
17
|
+
*/
|
|
18
|
+
removedRules: RemovalImpactOwner[];
|
|
19
|
+
/**
|
|
20
|
+
* Surviving fields the removal leaves default-hidden with no `show` rule —
|
|
21
|
+
* permanently invisible at runtime.
|
|
22
|
+
*/
|
|
23
|
+
unreachable: RemovalImpactField[];
|
|
24
|
+
/**
|
|
25
|
+
* Form-level (pc root scope) rules the prune will drop.
|
|
26
|
+
*/
|
|
27
|
+
formRulesRemoved: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function hasRemovalImpact(impact: RemovalImpact): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* What deleting `nodeId` (and its subtree) does to the REST of the schema —
|
|
32
|
+
* computed by simulating the exact removal + reference-prune pipeline the
|
|
33
|
+
* store runs, then diffing the before/after trees. Pure, so the editor can
|
|
34
|
+
* show a truthful confirmation before committing the destructive action.
|
|
35
|
+
*
|
|
36
|
+
* `formLinkage` is the form-level linkage to consider; pass it only when the
|
|
37
|
+
* removal happens on the presentation it resolves against (the pc layer).
|
|
38
|
+
*/
|
|
39
|
+
export declare function collectRemovalImpact(layer: PresentationLayer, nodeId: string, formLinkage?: FieldLinkage): RemovalImpact;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Block } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Rewrite a container's child block-lists through `transformBody`, preserving
|
|
4
|
+
* identity: when every body returns its own reference (nothing beneath changed),
|
|
5
|
+
* the original `block` reference is returned, so the reference-equality bail-outs
|
|
6
|
+
* the canvas memoization and reconcile passes depend on still fire. A non-container
|
|
7
|
+
* block is returned untouched.
|
|
8
|
+
*
|
|
9
|
+
* This is the one structural-sharing recursion primitive. The tree operations in
|
|
10
|
+
* `mutate` (rewrite / prune), `edit-ops` (insert / append / move), and
|
|
11
|
+
* `reconcile` all descend through it instead of re-deriving the
|
|
12
|
+
* `containerBodies → map → withContainerBodies` skeleton, so the per-keystroke
|
|
13
|
+
* identity contract lives in exactly one place.
|
|
14
|
+
*/
|
|
15
|
+
export declare function rewriteContainerBodies(block: Block, transformBody: (body: Block[]) => Block[]): Block;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FormSchema } from '../../types';
|
|
2
|
+
import { DeviceRegistries } from '../registry/form-field-registry';
|
|
3
|
+
import { ValidationIssue } from '../validation';
|
|
4
|
+
/**
|
|
5
|
+
* Result of a `validateSchema` run. `valid` is true when no issue carries
|
|
6
|
+
* error severity — warning-only schemas (incomplete / dangling authoring
|
|
7
|
+
* state) are valid and round-trip through export → import. `schema` is the
|
|
8
|
+
* input narrowed to `FormSchema` whenever the result is valid.
|
|
9
|
+
*/
|
|
10
|
+
export interface ValidateSchemaResult {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
schema?: FormSchema;
|
|
13
|
+
issues: ValidationIssue[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Whether a string is a legal `$vars` access name (identifier-shaped, no digit
|
|
17
|
+
* lead). The single source of truth for the variable-name grammar: the store's
|
|
18
|
+
* rename guard imports this so a rename can never mint a declaration the import
|
|
19
|
+
* boundary would reject.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isValidVariableName(name: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Defensive runtime check for an externally-supplied schema (JSON pasted into
|
|
24
|
+
* the import dialog, or an API payload). The editor's own mutators always
|
|
25
|
+
* produce well-formed trees; this is the boundary that protects the store and
|
|
26
|
+
* renderer from malformed input.
|
|
27
|
+
*
|
|
28
|
+
* The type system already forbids the tree-grammar illegal state (a leaf with
|
|
29
|
+
* children). This guard covers what the types can't: the data envelope
|
|
30
|
+
* (variables / data sources), per-presentation id uniqueness, per-scope key
|
|
31
|
+
* uniqueness and key grammar, span range, known field types, keyed/non-keyed
|
|
32
|
+
* consistency, option-source shapes, and linkage. Each device presentation is
|
|
33
|
+
* checked against its own registry; the pc and mobile trees keep independent
|
|
34
|
+
* id / key namespaces.
|
|
35
|
+
*/
|
|
36
|
+
export declare function validateSchema(candidate: unknown, registries: DeviceRegistries): ValidateSchemaResult;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Block, ContainerNode, FormField, PresentationLayer } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Scope path of a node: the chain of subform keys enclosing it. The root
|
|
4
|
+
* scope is `[]`; a node inside subform `"lines"` is `["lines"]`; nested
|
|
5
|
+
* subforms append further keys. Per-scope key uniqueness and runtime value
|
|
6
|
+
* binding both key off this path.
|
|
7
|
+
*/
|
|
8
|
+
export type ScopePath = readonly string[];
|
|
9
|
+
export declare function isContainerNode(node: Block): node is ContainerNode;
|
|
10
|
+
/**
|
|
11
|
+
* A leaf field is any node that is not a container. Defined by exclusion so
|
|
12
|
+
* consumer-augmented field types (arbitrary `type` strings) narrow correctly.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isLeafField(node: Block): node is FormField;
|
|
15
|
+
/**
|
|
16
|
+
* Whether two scope paths are equal (same subform-key chain).
|
|
17
|
+
*/
|
|
18
|
+
export declare function scopeEquals(a: ScopePath, b: ScopePath): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The PC root scope (the empty path). Linkage state, defaults, and the form-level
|
|
21
|
+
* events all resolve here; subform templates open deeper scopes and are evaluated
|
|
22
|
+
* per row, so traversals that only handle the top level skip non-root nodes.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isRootScope(scope: ScopePath): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The human-facing label of a node: its `label`, else its `title`, else
|
|
27
|
+
* `undefined`. Both are optional probes on the union (fields carry `label`,
|
|
28
|
+
* sections/tabs carry `title`), read through `in`-narrowing and required to be
|
|
29
|
+
* non-empty so a blank string never masks a caller's own fallback. Callers
|
|
30
|
+
* supply the fallback (`?? node.id`, `?? node.key`, `?? config.name`) they want.
|
|
31
|
+
*/
|
|
32
|
+
export declare function nodeLabel(node: Block): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Depth-first walk of every block in the tree (including the blocks nested
|
|
35
|
+
* inside containers). The visitor receives each block along with its
|
|
36
|
+
* {@link ScopePath}.
|
|
37
|
+
*/
|
|
38
|
+
export declare function walkNodes(schema: PresentationLayer, visit: (node: Block, scope: ScopePath) => void): void;
|
|
39
|
+
/**
|
|
40
|
+
* Depth-first walk of every leaf field in the tree, recursing through all
|
|
41
|
+
* containers and subform templates. The visitor receives each field and its
|
|
42
|
+
* {@link ScopePath}.
|
|
43
|
+
*/
|
|
44
|
+
export declare function walkFields(schema: PresentationLayer, visit: (field: FormField, scope: ScopePath) => void): void;
|
|
45
|
+
/**
|
|
46
|
+
* Count every leaf field in the tree, across all containers and subform
|
|
47
|
+
* templates. Backs the editor's "field count" stat.
|
|
48
|
+
*/
|
|
49
|
+
export declare function countFields(schema: PresentationLayer): number;
|
|
50
|
+
/**
|
|
51
|
+
* Find any node by id within the tree. Returns `undefined` when missing.
|
|
52
|
+
*/
|
|
53
|
+
export declare function findNode(schema: PresentationLayer, id: string): Block | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Find a leaf field by id within the tree. Returns `undefined` when missing.
|
|
56
|
+
*/
|
|
57
|
+
export declare function findField(schema: PresentationLayer, id: string): FormField | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The {@link ScopePath} a node lives in (the subform-key chain enclosing it),
|
|
60
|
+
* or `undefined` when the id is not in the tree.
|
|
61
|
+
*/
|
|
62
|
+
export declare function findScope(schema: PresentationLayer, id: string): ScopePath | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Collect the ids of `node` and every node beneath it.
|
|
65
|
+
*/
|
|
66
|
+
export declare function collectNodeIds(node: Block): Set<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Whether `candidateId` is `root` itself or any node nested beneath it. Used to
|
|
69
|
+
* reject moving a container onto a drop target inside its own subtree (which
|
|
70
|
+
* would otherwise delete the dragged subtree).
|
|
71
|
+
*/
|
|
72
|
+
export declare function containsNode(root: Block, candidateId: string): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The container that directly owns the block with the given id (the container
|
|
75
|
+
* whose body holds the block), or `undefined` when the block sits at the root.
|
|
76
|
+
* Drives layout decisions that depend on the parent — e.g. a block under a flex
|
|
77
|
+
* container is sized by `flex`, under any other parent by `span`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function findParentContainer(schema: PresentationLayer, blockId: string): ContainerNode | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Locate a node by id together with the container that directly owns it, in a
|
|
82
|
+
* single depth-first pass. Equivalent to {@link findNode} plus
|
|
83
|
+
* {@link findParentContainer} for the same id, but walks the tree once — the
|
|
84
|
+
* properties panel resolves both on every property keystroke. `parent` is
|
|
85
|
+
* `undefined` for a node sitting at the root.
|
|
86
|
+
*/
|
|
87
|
+
export declare function findNodeWithParentContainer(schema: PresentationLayer, id: string): {
|
|
88
|
+
node: Block;
|
|
89
|
+
parent: ContainerNode | undefined;
|
|
90
|
+
} | undefined;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured validation issues shared by the schema validator
|
|
3
|
+
* (`engine/schema/validate.ts`) and the linkage validator
|
|
4
|
+
* (`engine/linkage/validator.ts`).
|
|
5
|
+
*
|
|
6
|
+
* Hosts program against `code` + `path` (stable, machine-readable); `message`
|
|
7
|
+
* is the zh-CN product copy, produced exclusively through
|
|
8
|
+
* {@link formatIssueMessage} so every user-facing string lives in this module.
|
|
9
|
+
*
|
|
10
|
+
* Severity policy:
|
|
11
|
+
* - `"error"` — the schema is structurally broken (malformed envelope,
|
|
12
|
+
* non-object rule / trigger / action, unknown types, duplicate ids / keys,
|
|
13
|
+
* invalid key charset, state actions on edge triggers, dependency cycles).
|
|
14
|
+
* The renderer / runtime cannot safely consume such a schema.
|
|
15
|
+
* - `"warning"` — the schema is well-formed but incomplete or dangling (empty
|
|
16
|
+
* `targetKey` / `variable` / expression sources, unresolved key or data-source
|
|
17
|
+
* references, empty condition groups). The editor legitimately produces these
|
|
18
|
+
* mid-authoring, so they must round-trip through export → import: a result is
|
|
19
|
+
* `valid` as long as it carries no error-severity issue.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Stable machine-readable identifiers for every issue the validators emit.
|
|
23
|
+
*/
|
|
24
|
+
export type ValidationIssueCode = "schema_not_object" | "id_required" | "duplicate_id" | "version_unsupported" | "presentation_not_object" | "variables_invalid" | "data_sources_invalid" | "block_not_object" | "children_not_array" | "tabs_empty" | "tab_malformed" | "type_required" | "unknown_field_type" | "key_required" | "stray_key" | "stray_key_on_container" | "duplicate_key" | "key_invalid_charset" | "span_invalid" | "flex_invalid" | "gap_invalid" | "columns_invalid" | "variant_invalid" | "title_invalid" | "display_text_invalid" | "rows_bound_invalid" | "subform_table_column" | "validate_malformed" | "validate_range_invalid" | "pattern_invalid" | "data_source_invalid" | "data_source_ref_unknown" | "request_malformed" | "request_incomplete" | "linkage_malformed" | "rules_not_array" | "rule_malformed" | "trigger_malformed" | "trigger_kind_invalid" | "trigger_requires_keyed_leaf" | "condition_malformed" | "condition_kind_invalid" | "logic_invalid" | "condition_group_empty" | "operator_invalid" | "source_key_empty" | "source_key_unresolved" | "source_empty" | "actions_not_array" | "actions_empty" | "action_malformed" | "action_unknown_type" | "state_action_on_edge_trigger" | "state_action_on_form_scope" | "action_requires_keyed_leaf" | "defaults_requires_keyed_leaf" | "defaults_on_form_scope" | "default_hidden_unreachable" | "target_key_empty" | "target_key_unresolved" | "variable_empty" | "data_source_id_empty" | "value_malformed" | "alert_level_invalid" | "retrigger_invalid" | "retrigger_ignored" | "self_reference" | "cycle_detected";
|
|
25
|
+
export type ValidationSeverity = "error" | "warning";
|
|
26
|
+
/**
|
|
27
|
+
* One problem found while validating a schema. `path` points at the offending
|
|
28
|
+
* location (`presentations.pc.children[0].key`, `node[Field_1].linkage.rules[0]`,
|
|
29
|
+
* …); `ruleId` is set on rule-scoped linkage issues whose rule id is known, so
|
|
30
|
+
* the editor can map diagnostics onto rule cards.
|
|
31
|
+
*/
|
|
32
|
+
export interface ValidationIssue {
|
|
33
|
+
path: string;
|
|
34
|
+
code: ValidationIssueCode;
|
|
35
|
+
severity: ValidationSeverity;
|
|
36
|
+
message: string;
|
|
37
|
+
ruleId?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Message parameters per param-bearing code. Codes absent from this interface
|
|
41
|
+
* take no parameters.
|
|
42
|
+
*/
|
|
43
|
+
interface ValidationIssueParams {
|
|
44
|
+
duplicate_id: {
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
unknown_field_type: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
key_required: {
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
stray_key: {
|
|
54
|
+
type: string;
|
|
55
|
+
};
|
|
56
|
+
stray_key_on_container: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
duplicate_key: {
|
|
60
|
+
key: string;
|
|
61
|
+
};
|
|
62
|
+
key_invalid_charset: {
|
|
63
|
+
key: string;
|
|
64
|
+
};
|
|
65
|
+
span_invalid: {
|
|
66
|
+
max: number;
|
|
67
|
+
};
|
|
68
|
+
columns_invalid: {
|
|
69
|
+
max: number;
|
|
70
|
+
};
|
|
71
|
+
display_text_invalid: {
|
|
72
|
+
prop: string;
|
|
73
|
+
};
|
|
74
|
+
validate_range_invalid: {
|
|
75
|
+
lower: string;
|
|
76
|
+
upper: string;
|
|
77
|
+
};
|
|
78
|
+
data_source_ref_unknown: {
|
|
79
|
+
id: string;
|
|
80
|
+
};
|
|
81
|
+
trigger_kind_invalid: {
|
|
82
|
+
kind: string;
|
|
83
|
+
};
|
|
84
|
+
action_unknown_type: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
state_action_on_edge_trigger: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
state_action_on_form_scope: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
action_requires_keyed_leaf: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
source_key_unresolved: {
|
|
97
|
+
key: string;
|
|
98
|
+
};
|
|
99
|
+
target_key_unresolved: {
|
|
100
|
+
key: string;
|
|
101
|
+
};
|
|
102
|
+
cycle_detected: {
|
|
103
|
+
cycle: string;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
type ParamCode = keyof ValidationIssueParams;
|
|
107
|
+
type ParamlessCode = Exclude<ValidationIssueCode, ParamCode>;
|
|
108
|
+
/**
|
|
109
|
+
* Render the zh-CN message for an issue code. The single place every
|
|
110
|
+
* user-facing validation string is produced.
|
|
111
|
+
*/
|
|
112
|
+
export declare function formatIssueMessage<C extends ParamCode>(code: C, params: ValidationIssueParams[C]): string;
|
|
113
|
+
export declare function formatIssueMessage(code: ParamlessCode): string;
|
|
114
|
+
/**
|
|
115
|
+
* Build a {@link ValidationIssue}, deriving `severity` and `message` from the
|
|
116
|
+
* central tables so emit sites only state location + code (+ params / rule id).
|
|
117
|
+
*/
|
|
118
|
+
export declare function createIssue<C extends ParamCode>(path: string, code: C, params: ValidationIssueParams[C], ruleId?: string): ValidationIssue;
|
|
119
|
+
export declare function createIssue(path: string, code: ParamlessCode, params?: undefined, ruleId?: string): ValidationIssue;
|
|
120
|
+
/**
|
|
121
|
+
* Whether any issue is error-severity — the complement of a result's `valid`.
|
|
122
|
+
*/
|
|
123
|
+
export declare function hasErrorIssues(issues: readonly ValidationIssue[]): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Null-safe plain-object guard narrowed to a string-keyed record so the
|
|
126
|
+
* validators can read members of untrusted input without casts. Delegates to
|
|
127
|
+
* the shared `isPlainObject` (rejects `null`, arrays, and class instances);
|
|
128
|
+
* re-typed here because the shared predicate narrows only to `object`.
|
|
129
|
+
*/
|
|
130
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
131
|
+
/**
|
|
132
|
+
* Shape-check a {@link "../types/data-source"!RemoteDataSourceRequest}. Used for
|
|
133
|
+
* `api_call` linkage actions, form-global remote data sources, and inline
|
|
134
|
+
* `remote` option sources. A non-object request or non-string `resource` /
|
|
135
|
+
* `action` is structural breakage (error); empty strings are the editor's
|
|
136
|
+
* freshly-seeded state and only warn.
|
|
137
|
+
*/
|
|
138
|
+
export declare function validateRemoteRequest(request: unknown, path: string, ruleId?: string): ValidationIssue[];
|
|
139
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DynamicIconProps } from '@vef-framework-react/components';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a Lucide icon by name. Statically-known names (the common case) render
|
|
5
|
+
* synchronously from {@link STATIC_ICONS}; unknown names degrade to the async
|
|
6
|
+
* {@link DynamicIcon}. Drop-in replacement for `DynamicIcon` across the editor.
|
|
7
|
+
*/
|
|
8
|
+
export declare function EditorIcon({ name, ...props }: DynamicIconProps): ReactElement;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { buttonDefinition } from './components/button';
|
|
2
|
+
export { checkboxGroupFieldDefinition } from './components/checkbox-group-field';
|
|
3
|
+
export { codeEditorDefinition } from './components/code-editor';
|
|
4
|
+
export { flexDefinition, gridDefinition, sectionDefinition, subformDefinition, tabsDefinition } from './components/containers';
|
|
5
|
+
export { dateFieldDefinition, dateRangeFieldDefinition, datetimeFieldDefinition } from './components/date-field';
|
|
6
|
+
export { alertBlockDefinition, dividerDefinition, paragraphDefinition } from './components/display';
|
|
7
|
+
export { mobileFieldDefinitions } from './components/mobile/definitions';
|
|
8
|
+
export { useMobileScopeContainer } from './components/mobile/scope';
|
|
9
|
+
export { numberFieldDefinition } from './components/number-field';
|
|
10
|
+
export { radioFieldDefinition } from './components/radio-field';
|
|
11
|
+
export { selectFieldDefinition } from './components/select-field';
|
|
12
|
+
export { switchFieldDefinition } from './components/switch-field';
|
|
13
|
+
export { textareaFieldDefinition } from './components/textarea-field';
|
|
14
|
+
export { textfieldDefinition } from './components/textfield';
|
|
15
|
+
export { FormEditor, FormEditorProvider, FormEditorShell, FormEditorStage, FormEditorWorkspace, type FormEditorApi, type FormEditorProps, type FormEditorProviderProps, type FormEditorShellProps } from './editor/form-editor';
|
|
16
|
+
export { CheckboxEntry, IconEntry, KeyEntry, LinkageRulesEntry, NumberEntry, OptionsSourceEntry, SelectEntry, TextEntry } from './editor/properties/entries';
|
|
17
|
+
export { Toolbar as FormEditorToolbar, type ToolbarBrand, type ToolbarProps } from './editor/toolbar/toolbar';
|
|
18
|
+
export { ConversionRegistry, convertPresentation, createDefaultConversionRules, type BlockConversion, type BlockConversionRule, type ConversionContext, type ConversionReport } from './engine/conversion';
|
|
19
|
+
export { createId } from './engine/ids';
|
|
20
|
+
export { generateUniqueKey, isKeyedField, isKeyedNode, nextUniqueKey, sanitizeKey } from './engine/keys';
|
|
21
|
+
export { ALERT_LEVELS, defaultEvaluateAssignExpression, defaultEvaluateExpression, defaultEvaluateScriptAction, EFFECT_ACTION_TYPES, FIELD_EVENT_TRIGGER_KINDS, FIELD_TRIGGER_KINDS, FORM_TRIGGER_KINDS, isEffectAction, isFieldEventTriggerKind, isStateAction, KEYED_ONLY_ACTIONS, LINKAGE_ACTION_TYPES, LINKAGE_OPERATORS, resolveLinkageEvaluators, STATE_ACTION_TYPES, validateLinkageSchema, type LinkageValidationResult } from './engine/linkage';
|
|
22
|
+
export { createDefaultRegistry, registerDefaults } from './engine/registry/defaults';
|
|
23
|
+
export { createDefaultMobileRegistry } from './engine/registry/defaults-mobile';
|
|
24
|
+
export { FormFieldRegistry, type DeviceRegistries } from './engine/registry/form-field-registry';
|
|
25
|
+
export { cloneBlock, insertBlock, moveBlock, setFlex, setSpan, type DropTarget } from './engine/schema/edit-ops';
|
|
26
|
+
export { editField, removeBlock, updateNode } from './engine/schema/mutate';
|
|
27
|
+
export { createEmptySchema } from './engine/schema/nodes';
|
|
28
|
+
export { toFormFieldDefinitions, type FieldKind, type FormFieldDefinition } from './engine/schema/permission-bridge';
|
|
29
|
+
export { currentLayer, emptyLayer, resolvePresentation, toRuntimeSchema, withPresentation } from './engine/schema/presentation';
|
|
30
|
+
export { validateSchema, type ValidateSchemaResult } from './engine/schema/validate';
|
|
31
|
+
export { findField, findNode, findParentContainer, isContainerNode, isLeafField, walkFields, walkNodes } from './engine/schema/walk';
|
|
32
|
+
export { formatIssueMessage, type ValidationIssue, type ValidationIssueCode, type ValidationSeverity } from './engine/validation';
|
|
33
|
+
export { DataSourceProvider, useFieldOptions } from './render/data-source-context';
|
|
34
|
+
export { FormRenderer, type FormRendererApi, type FormRendererProps } from './render/form-renderer';
|
|
35
|
+
export { FieldShell, type FieldShellProps } from './render/parts/field-shell';
|
|
36
|
+
export { Label, type LabelProps } from './render/parts/label';
|
|
37
|
+
export { DeviceProvider, RegistryProvider, useDeviceRegistries, useFieldRegistry } from './store/engine-provider';
|
|
38
|
+
export { FormEditorStoreProvider, isPaletteVisible, useCurrentLayer, useFormEditorStore, useFormEditorStoreApi, type EditCoalesceOptions, type EditorDeviceMode, type EditorViewMode, type FormConfigTabId, type FormEditorStoreApi, type FormEditorStoreState, type FormSchemaPatch, type HistoryEntry } from './store/form-store';
|
|
39
|
+
export * from './types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContainerChromeSet } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* The mobile container chrome — antd-mobile `Collapse` / `Tabs` / `Button`
|
|
4
|
+
* primitives plus token-styled card surfaces (antd-mobile has no `Card`),
|
|
5
|
+
* mirroring {@link pcContainerChrome}. Every member is purely presentational:
|
|
6
|
+
* recursion, value binding, and array handlers stay in the renderer, which
|
|
7
|
+
* passes already-built bodies in as `children`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const mobileContainerChrome: ContainerChromeSet;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ContainerChromeSet } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* The PC container chrome — antd `Card` / `Collapse` / `Tabs` / `Button` shells,
|
|
4
|
+
* lifted verbatim from the former inline renderers so device-aware routing is a
|
|
5
|
+
* no-op visual change on PC.
|
|
6
|
+
*/
|
|
7
|
+
export declare const pcContainerChrome: ContainerChromeSet;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/serialize';
|
|
2
|
+
/**
|
|
3
|
+
* Shared chrome styling for the subform shell and section collapse, identical
|
|
4
|
+
* across the PC and mobile container chrome sets. Both render the same
|
|
5
|
+
* token-driven row surface (the visual contract is device-independent), so the
|
|
6
|
+
* styles live once here instead of being copied per device module.
|
|
7
|
+
*/
|
|
8
|
+
export declare const subformBodyCss: SerializedStyles;
|
|
9
|
+
export declare const subformRowCss: SerializedStyles;
|
|
10
|
+
export declare const subformRowBodyCss: SerializedStyles;
|
|
11
|
+
export declare const subformRemoveCss: SerializedStyles;
|
|
12
|
+
/**
|
|
13
|
+
* The single-item collapse key used by the `collapse` Section variant. Local to
|
|
14
|
+
* each `Section` instance, so a stable literal is enough — `defaultActiveKey`
|
|
15
|
+
* only has to match this item's `key`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SECTION_PANEL_KEY = "panel";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { DataSourceResolver, FieldOption, FieldOptionSource, FormDataSource } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Provides the form-global data sources and the host's option resolver to the
|
|
5
|
+
* selection fields below. Installed by `FormRenderer` (runtime) and the editor
|
|
6
|
+
* canvas (design time) so `useFieldOptions` can resolve `ref` / `remote`
|
|
7
|
+
* sources. Absent a provider the defaults make every remote source resolve to
|
|
8
|
+
* an empty list rather than error.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DataSourceProvider({ children, dataSources, resolver, versions }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
dataSources?: FormDataSource[];
|
|
13
|
+
resolver?: DataSourceResolver;
|
|
14
|
+
/**
|
|
15
|
+
* Refresh nonces from the runtime's data-source store. Omitted at design time
|
|
16
|
+
* (the editor canvas), where nothing fires a `refresh_data_source` effect.
|
|
17
|
+
*/
|
|
18
|
+
versions?: Record<string, number>;
|
|
19
|
+
}): ReactElement;
|
|
20
|
+
/**
|
|
21
|
+
* A field's resolved options plus the remote-fetch status flags.
|
|
22
|
+
*/
|
|
23
|
+
export interface FieldOptionsResult {
|
|
24
|
+
options: FieldOption[];
|
|
25
|
+
loading: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* True when the latest resolve attempt rejected. The previous options are
|
|
28
|
+
* kept (not blanked), so a consumer can keep rendering them and surface the
|
|
29
|
+
* failure however it sees fit.
|
|
30
|
+
*/
|
|
31
|
+
error: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a selection field's options. Static (and `ref`-to-static) sources
|
|
35
|
+
* return synchronously from the schema; `remote` (and `ref`-to-remote) sources
|
|
36
|
+
* fetch through the host-injected resolver, exposing a `loading` flag while the
|
|
37
|
+
* request is in flight. The previously resolved options are kept while a
|
|
38
|
+
* refresh is in flight (and after a failure), so a `refresh_data_source` effect
|
|
39
|
+
* does not blank every consuming select until the new response lands. A stale
|
|
40
|
+
* request is ignored if the source changes first.
|
|
41
|
+
*/
|
|
42
|
+
export declare function useFieldOptions(source: FieldOptionSource | undefined): FieldOptionsResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { FlexSlot } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Shared flex-layout mapping for the runtime renderer and the editor canvas, so
|
|
5
|
+
* a {@link import("../types").FlexNode}'s axis options render identically in
|
|
6
|
+
* both. The schema's friendly enums map to the CSS values antd `<Flex>` expects.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FLEX_JUSTIFY_MAP: {
|
|
9
|
+
readonly start: "flex-start";
|
|
10
|
+
readonly center: "center";
|
|
11
|
+
readonly end: "flex-end";
|
|
12
|
+
readonly between: "space-between";
|
|
13
|
+
readonly around: "space-around";
|
|
14
|
+
};
|
|
15
|
+
export declare const FLEX_ALIGN_MAP: {
|
|
16
|
+
readonly start: "flex-start";
|
|
17
|
+
readonly center: "center";
|
|
18
|
+
readonly end: "flex-end";
|
|
19
|
+
readonly stretch: "stretch";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Resolve a block's per-slot flex sizing to a style. `minWidth: 0` lets an
|
|
23
|
+
* input-bearing slot shrink below its content's intrinsic width (the standard
|
|
24
|
+
* flex-overflow fix) instead of forcing the line to overflow.
|
|
25
|
+
*/
|
|
26
|
+
export declare function flexSlotStyle(flex: FlexSlot | undefined): CSSProperties;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FormField, LabelPosition } from '../types';
|
|
3
|
+
export interface FormFieldRendererProps {
|
|
4
|
+
field: FormField;
|
|
5
|
+
value?: unknown;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
errors?: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Whether the field is currently required (static + runtime linkage). Drives
|
|
10
|
+
* the label asterisk so it tracks the live required state.
|
|
11
|
+
*/
|
|
12
|
+
required?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Resolved label placement (field override falling back to the form default).
|
|
15
|
+
*/
|
|
16
|
+
labelPosition?: LabelPosition;
|
|
17
|
+
/**
|
|
18
|
+
* DOM id for the control and its label. Defaults to `field-${field.id}`, but
|
|
19
|
+
* subform rows pass a per-row id so repeated template instances never collide.
|
|
20
|
+
*/
|
|
21
|
+
domId?: string;
|
|
22
|
+
onChange?: (value: unknown) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Look up the field definition in the registry and delegate rendering to it.
|
|
26
|
+
*
|
|
27
|
+
* Value/onChange wiring only applies to keyed fields; non-keyed fields
|
|
28
|
+
* (e.g. Button) receive `undefined` value and a no-op change handler. The owner
|
|
29
|
+
* already knows which field changed (it wires one handler per field), so the
|
|
30
|
+
* callback carries only the new value.
|
|
31
|
+
*/
|
|
32
|
+
export declare function FormFieldRenderer({ disabled, domId, errors, field, labelPosition, required, value, onChange }: FormFieldRendererProps): ReactElement;
|