@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,65 @@
|
|
|
1
|
+
import { ReactElement, Ref } from 'react';
|
|
2
|
+
import { RuntimeFormValues } from '../runtime/types';
|
|
3
|
+
import { DataSourceResolver, ExpressionContext, FormSchema, LinkageEvaluators, PresentationDevice } from '../types';
|
|
4
|
+
export interface FormRendererProps {
|
|
5
|
+
schema: FormSchema;
|
|
6
|
+
/**
|
|
7
|
+
* Which device's presentation to render. Defaults to `"pc"`. When that device
|
|
8
|
+
* has no design yet (an undesigned mobile), an empty state is shown rather than
|
|
9
|
+
* falling back to the other device.
|
|
10
|
+
*/
|
|
11
|
+
device?: PresentationDevice;
|
|
12
|
+
defaultValues?: RuntimeFormValues;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Overrides for the dynamic linkage evaluators. Each slot falls back to the
|
|
16
|
+
* default `new Function`-based implementation when not supplied — host
|
|
17
|
+
* projects only need overrides for a sandbox, a custom JS engine, or a DSL.
|
|
18
|
+
*/
|
|
19
|
+
evaluators?: LinkageEvaluators;
|
|
20
|
+
/**
|
|
21
|
+
* Host-injected resolver for `remote` option sources. Falls back to a no-op
|
|
22
|
+
* (empty options) when omitted — static / ref-to-static sources never need it.
|
|
23
|
+
*/
|
|
24
|
+
dataSourceResolver?: DataSourceResolver;
|
|
25
|
+
/**
|
|
26
|
+
* Host-supplied expression scope. `$vars` here merges over (and overrides) the
|
|
27
|
+
* schema's variable defaults; `$user` / `$node` carry runtime context. The
|
|
28
|
+
* form derives `$vars` from `schema.variables` on its own, so this is only
|
|
29
|
+
* needed to supply user / node context or override a variable at runtime.
|
|
30
|
+
*/
|
|
31
|
+
expressionContext?: ExpressionContext;
|
|
32
|
+
onSubmit?: (values: RuntimeFormValues) => void | Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Imperative handle for host chrome (a Modal footer's 确定/取消, an external
|
|
35
|
+
* save button): submit / reset / read the live values without a schema
|
|
36
|
+
* button. The schema's own `submit` buttons keep working either way.
|
|
37
|
+
*/
|
|
38
|
+
apiRef?: Ref<FormRendererApi>;
|
|
39
|
+
/**
|
|
40
|
+
* Pen mobile picker overlays (masks + sheets) to this renderer's box instead
|
|
41
|
+
* of the browser viewport. Only meaningful when `device === "mobile"`, and
|
|
42
|
+
* intended for a desktop "picture-in-picture" preview where the form is shown
|
|
43
|
+
* inside a phone-sized frame (the form editor's own preview). Defaults to
|
|
44
|
+
* `false`: at real mobile runtime the viewport is the phone screen, so the
|
|
45
|
+
* native viewport-anchored overlay behavior is correct.
|
|
46
|
+
*/
|
|
47
|
+
containOverlays?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The curated imperative surface of a rendered form. `submit` runs the same
|
|
51
|
+
* validation + `onSubmit` pipeline as a schema submit button.
|
|
52
|
+
*/
|
|
53
|
+
export interface FormRendererApi {
|
|
54
|
+
submit: () => Promise<void>;
|
|
55
|
+
reset: () => void;
|
|
56
|
+
getValues: () => RuntimeFormValues;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Runtime renderer for a form schema.
|
|
60
|
+
*
|
|
61
|
+
* Resolves the requested device's design into a {@link RuntimeSchema} (an
|
|
62
|
+
* undesigned device shows an empty state) and provides the device to the field
|
|
63
|
+
* registry. The inner component owns the actual runtime form state.
|
|
64
|
+
*/
|
|
65
|
+
export declare function FormRenderer({ containOverlays, device, schema, ...rest }: FormRendererProps): ReactElement;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { GridNode } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Shared grid-layout mapping for the runtime renderer and the editor canvas, so
|
|
5
|
+
* a {@link GridNode}'s columns / gaps render identically in both. The explicit
|
|
6
|
+
* grid is a real CSS grid (`grid-template-columns: repeat(N, 1fr)`) — its cells
|
|
7
|
+
* flow across the columns and wrap, and a cell's `span` widens it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GRID_DEFAULT_COLUMNS = 2;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve a grid's effective column count, clamped to `1..ROW_COLS`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function gridColumnCount(grid: GridNode): number;
|
|
14
|
+
/**
|
|
15
|
+
* Style for the grid container: the track template plus column / row gaps. The
|
|
16
|
+
* gaps fall back to `gap`, then to the form density gutter.
|
|
17
|
+
*/
|
|
18
|
+
export declare function gridContainerStyle(grid: GridNode, gutter: number): CSSProperties;
|
|
19
|
+
/**
|
|
20
|
+
* Style for one grid cell: how many columns it spans (`1..columns`). `minWidth: 0`
|
|
21
|
+
* lets an input-bearing cell shrink below its content's intrinsic width instead
|
|
22
|
+
* of forcing the track to overflow.
|
|
23
|
+
*/
|
|
24
|
+
export declare function gridCellStyle(span: number | undefined, columns: number): CSSProperties;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { LabelPosition } from '../../types';
|
|
3
|
+
import { SerializedStyles } from '@emotion/serialize';
|
|
4
|
+
/**
|
|
5
|
+
* Secondary text scales, exported so switch-field (which lays its label inline
|
|
6
|
+
* and cannot use FieldShell) shares the exact token set instead of re-hardcoding
|
|
7
|
+
* `fontSize: 12` / a divergent error style. Helper and error share one small
|
|
8
|
+
* scale so the footer band reads as one type level.
|
|
9
|
+
*/
|
|
10
|
+
export declare const helperTextCss: SerializedStyles;
|
|
11
|
+
export declare const errorTextCss: SerializedStyles;
|
|
12
|
+
export interface FieldFooterProps {
|
|
13
|
+
errors?: string[];
|
|
14
|
+
helperText?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The helper-text + error band shared by {@link FieldShell} and the switch field
|
|
18
|
+
* (which lays its label inline and so cannot use FieldShell). Centralizes the
|
|
19
|
+
* small-scale token set, the `errors.join("、")` separator, and the `role="alert"`
|
|
20
|
+
* contract so the two paths can never drift. Renders nothing when there is neither
|
|
21
|
+
* helper text nor an error.
|
|
22
|
+
*/
|
|
23
|
+
export declare function FieldFooter({ errors, helperText }: FieldFooterProps): ReactElement | null;
|
|
24
|
+
export interface FieldShellProps {
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
domId: string;
|
|
27
|
+
errors?: string[];
|
|
28
|
+
helperText?: string;
|
|
29
|
+
label: ReactNode;
|
|
30
|
+
labelPosition?: LabelPosition;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function FieldShell({ children, domId, errors, helperText, label, labelPosition, required }: FieldShellProps): ReactElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { LabelPosition } from '../../types';
|
|
3
|
+
export interface LabelProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
htmlFor?: string;
|
|
6
|
+
position?: LabelPosition;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Native tooltip text, surfaced when a fixed-width side label truncates its
|
|
10
|
+
* text to a single line. Top labels pass it too (harmless) so the full label
|
|
11
|
+
* is always discoverable on hover.
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Reusable form field label with an optional red asterisk for required fields.
|
|
17
|
+
* `position` only affects its own spacing; the surrounding {@link FieldShell}
|
|
18
|
+
* owns the label-vs-control axis.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Label({ children, htmlFor, position, required, title }: LabelProps): ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export interface OptionsStatusProps {
|
|
3
|
+
error: boolean;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The placeholder a selection field (radio / checkbox group) shows in place of
|
|
8
|
+
* an option list it has none of yet: a quiet hint while a remote source loads or
|
|
9
|
+
* a static source is empty, an error line when the resolver failed. Keeps a
|
|
10
|
+
* freshly-dropped or failed field from rendering as a blank void. A field that
|
|
11
|
+
* already has options renders the control instead (a refresh spins over the
|
|
12
|
+
* existing options), so this only ever stands in for the empty state.
|
|
13
|
+
*/
|
|
14
|
+
export declare function OptionsStatus({ error, loading }: OptionsStatusProps): ReactElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GapScale } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Pixel realization of each {@link GapScale}, shared by the runtime renderer and
|
|
4
|
+
* the editor canvas so a stack's vertical rhythm reads identically in both. The
|
|
5
|
+
* schema stores only the named scale; this is the one place it becomes pixels,
|
|
6
|
+
* so the rhythm can be re-tuned here without touching any persisted data.
|
|
7
|
+
*/
|
|
8
|
+
export declare const GAP_SCALE_PX: Record<GapScale, number>;
|
|
9
|
+
/**
|
|
10
|
+
* The pixel gap a stack falls back to when neither the container nor the form
|
|
11
|
+
* pins one — the {@link DEFAULT_GAP_SCALE} in pixels.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_STACK_GAP: number;
|
|
14
|
+
/**
|
|
15
|
+
* Resolve a stack's gap to pixels: the container's own {@link GapScale} when set,
|
|
16
|
+
* otherwise the inherited `fallback` (the form-level gap for a container body, or
|
|
17
|
+
* {@link DEFAULT_STACK_GAP} for the root document).
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveStackGap(scale: GapScale | undefined, fallback: number): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EditableColumn } from '@vef-framework-react/components';
|
|
2
|
+
import { Block } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* A subform row is a flat record keyed by the template fields' `key`s. The
|
|
5
|
+
* `table` variant edits it through the components `EditableTable`, one column
|
|
6
|
+
* per template leaf field — mapping each field type to the matching `EditableTable`
|
|
7
|
+
* cell editor (`fieldComponents`). The two systems share a TanStack-Form
|
|
8
|
+
* foundation, so the editors bind to the row's draft form directly.
|
|
9
|
+
*/
|
|
10
|
+
type Row = Record<string, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* Build the `EditableTable` columns for a subform template, one per keyed leaf
|
|
13
|
+
* field in document order. Non-keyed blocks are dropped.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildSubformColumns(template: Block[]): Array<EditableColumn<Row>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { RuntimeFieldState } from '../engine/linkage';
|
|
2
|
+
import { RuntimeFormValues } from '../runtime/types';
|
|
3
|
+
import { Block, ExpressionContext, KeyedFormField, LinkageEvaluators, RuntimeSchema, SubformNode } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Build the submit payload for one value scope: each keyed field / subform that
|
|
6
|
+
* is not **effectively** hidden — by its own linkage or any ancestor container's
|
|
7
|
+
* (a field inside a linkage-hidden section is just as invisible as a field
|
|
8
|
+
* hidden directly) — contributes its value; a hidden one is dropped whole.
|
|
9
|
+
* Subforms recurse per row against that row's own record, so "hidden ⇒ not
|
|
10
|
+
* submitted" holds at every scope. Runs only on submit (a cold path), so the
|
|
11
|
+
* per-call tree walk is fine.
|
|
12
|
+
*/
|
|
13
|
+
export declare function filterSubmitValues(args: {
|
|
14
|
+
blocks: Block[];
|
|
15
|
+
evaluators: LinkageEvaluators | undefined;
|
|
16
|
+
expressionContext: ExpressionContext | undefined;
|
|
17
|
+
values: RuntimeFormValues;
|
|
18
|
+
}): RuntimeFormValues;
|
|
19
|
+
/**
|
|
20
|
+
* Schema-driven submit validation: run the same required / constraint checks as
|
|
21
|
+
* the live per-field validators over EVERY keyed field of the schema — root
|
|
22
|
+
* scope and each subform row — independent of what is currently mounted.
|
|
23
|
+
*
|
|
24
|
+
* This is the second layer of a two-layer design:
|
|
25
|
+
*
|
|
26
|
+
* 1. **Live layer** — each mounted `AppField` registers
|
|
27
|
+
* {@link validateRuntimeField} for immediate change-time feedback.
|
|
28
|
+
* 2. **Submit gate (this pass)** — antd Tabs / Collapse (and their antd-mobile
|
|
29
|
+
* counterparts) mount pane content lazily, so a required field in a
|
|
30
|
+
* never-activated tab or a collapsed-by-default section has no mounted
|
|
31
|
+
* validator at all. This pass closes that hole at the form level without
|
|
32
|
+
* forcing panes to mount (which would defeat the lazy mount at 100s of
|
|
33
|
+
* fields). Failures are returned as a per-field-name error map; the runtime
|
|
34
|
+
* form feeds it to TanStack's `fields` error channel so each error blocks
|
|
35
|
+
* submission now and surfaces on the field when its pane is visited.
|
|
36
|
+
*
|
|
37
|
+
* Effectively-hidden fields (own linkage or any ancestor container's — the same
|
|
38
|
+
* fold as {@link filterSubmitValues}) and effectively-disabled fields are
|
|
39
|
+
* exempt: a value that is not submitted, or not editable, must not hold the
|
|
40
|
+
* form hostage. Runs only on submit, so the full walk (rows included) is off
|
|
41
|
+
* the per-keystroke path.
|
|
42
|
+
*/
|
|
43
|
+
export declare function collectSubmitErrors(args: {
|
|
44
|
+
blocks: Block[];
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
evaluators: LinkageEvaluators | undefined;
|
|
47
|
+
expressionContext: ExpressionContext | undefined;
|
|
48
|
+
namePrefix: string;
|
|
49
|
+
values: RuntimeFormValues;
|
|
50
|
+
}): Record<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* Live per-field validator, registered by each mounted `AppField` for both the
|
|
53
|
+
* change and submit causes (one callback keeps the two lanes from drifting).
|
|
54
|
+
* The schema-driven submit gate ({@link collectSubmitErrors}) applies the same
|
|
55
|
+
* required / constraint logic to fields that never mounted.
|
|
56
|
+
*/
|
|
57
|
+
export declare function validateRuntimeField(args: {
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
evaluators: LinkageEvaluators | undefined;
|
|
60
|
+
expressionContext: ExpressionContext | undefined;
|
|
61
|
+
field: KeyedFormField;
|
|
62
|
+
namePrefix: string;
|
|
63
|
+
value: unknown;
|
|
64
|
+
values: RuntimeFormValues;
|
|
65
|
+
}): string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* The value-level check shared by the live validators and the submit gate.
|
|
68
|
+
* Required catches an absent value; the constraint rules then apply only to a
|
|
69
|
+
* value that is actually present (an empty optional field is not "too short").
|
|
70
|
+
*/
|
|
71
|
+
export declare function validateKeyedFieldValue(field: KeyedFormField, required: boolean, value: unknown): string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Whether a keyed field is currently required — its static `validate.required`
|
|
74
|
+
* (read through the `Validatable` shape, no cast) or a runtime `require`
|
|
75
|
+
* linkage outcome.
|
|
76
|
+
*/
|
|
77
|
+
export declare function isRuntimeRequired(field: KeyedFormField, runtimeState: RuntimeFieldState): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Static constraint rules (`minLength` / `maxLength` / `min` / `max` / `pattern`)
|
|
80
|
+
* checked against a present value. `validate.message`, when set, overrides the
|
|
81
|
+
* default per-rule text. String rules apply to string values, numeric rules to
|
|
82
|
+
* number values, so one `validate` shape serves text and number fields without
|
|
83
|
+
* misfiring across types.
|
|
84
|
+
*/
|
|
85
|
+
export declare function validateFieldConstraints(field: KeyedFormField, value: unknown): string | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Seed a fresh subform row: type-appropriate empty values for keyed leaf
|
|
88
|
+
* fields, nested subforms seeded to their own `minRows`.
|
|
89
|
+
*/
|
|
90
|
+
export declare function blankSubformRow(subform: SubformNode): Record<string, unknown>;
|
|
91
|
+
export declare function buildRuntimeFormId(schema: RuntimeSchema): string;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { EffectAction, ExpressionContext, LinkageEvaluators, RuntimeSchema } from '../types';
|
|
3
|
+
import { RuntimeForm, RuntimeFormValues } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Run a list of effect actions in one value scope (root form or subform row).
|
|
6
|
+
*/
|
|
7
|
+
export type RunEffects = (actions: EffectAction[]) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Write a form-global variable (`$vars`). Owned by `FormRenderer`'s reactive
|
|
10
|
+
* variable store; a `set_variable` effect calls it.
|
|
11
|
+
*/
|
|
12
|
+
export type SetVariable = (name: string, value: unknown) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Re-resolve a form-global data source by id. Owned by `FormRenderer`'s
|
|
15
|
+
* data-source version store; a `refresh_data_source` effect calls it, bumping a
|
|
16
|
+
* nonce so every field referencing that source re-fetches (see `useFieldOptions`).
|
|
17
|
+
*/
|
|
18
|
+
export type RefreshDataSource = (dataSourceId: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* The renderer-owned imperative sinks the effect lane writes to, beyond the form
|
|
21
|
+
* api itself. Bundled into one object so a new native effect adds a field here,
|
|
22
|
+
* not another callback threaded through every value scope and lifecycle hook.
|
|
23
|
+
*/
|
|
24
|
+
export interface EffectSinks {
|
|
25
|
+
setVariable: SetVariable;
|
|
26
|
+
refreshDataSource: RefreshDataSource;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Read the nearest value scope's effect dispatcher. A field reads this to fire
|
|
30
|
+
* its own event-triggered effects (`change` / `focus` / `blur` / `click`); the
|
|
31
|
+
* nearest provider is the field's value scope (root form or subform row), so a
|
|
32
|
+
* subform field's effects run against that row's record.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useEffectDispatch(): RunEffects;
|
|
35
|
+
/**
|
|
36
|
+
* Publishes a scope's {@link RunEffects} to its descendant fields. Installed by
|
|
37
|
+
* `LinkageScope` alongside the runtime-state context.
|
|
38
|
+
*/
|
|
39
|
+
export declare function EffectDispatchProvider({ children, run }: {
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
run: RunEffects;
|
|
42
|
+
}): ReactElement;
|
|
43
|
+
/**
|
|
44
|
+
* Run form-scope effect actions (the global `load` / `beforeSubmit` /
|
|
45
|
+
* `afterSubmit` lifecycle) against the root value scope. Used by `FormRenderer`,
|
|
46
|
+
* which owns the form directly and has no surrounding scope provider. Returns a
|
|
47
|
+
* promise so `beforeSubmit` can complete (including async host effects) before
|
|
48
|
+
* the submission proceeds.
|
|
49
|
+
*/
|
|
50
|
+
export declare function dispatchFormEffects(args: {
|
|
51
|
+
actions: EffectAction[];
|
|
52
|
+
evaluators: LinkageEvaluators | undefined;
|
|
53
|
+
expressionContext: ExpressionContext | undefined;
|
|
54
|
+
form: RuntimeForm;
|
|
55
|
+
sinks: EffectSinks;
|
|
56
|
+
}): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Per-scope side-effect runtime. Returns the {@link RunEffects} dispatcher (used
|
|
59
|
+
* by both event-triggered fields and the condition-edge detector) and, in an
|
|
60
|
+
* effect, fires each condition-effect rule's actions on the false→true rising
|
|
61
|
+
* edge, then repeats any per-action `"always"` ({@link ConditionRetrigger})
|
|
62
|
+
* effects while the condition keeps holding and one of its source fields changes.
|
|
63
|
+
*
|
|
64
|
+
* Mirrors `LinkageScope`'s scoping — root or one subform row — so each row
|
|
65
|
+
* tracks its own edges and dispatches against its own record. Edge detection
|
|
66
|
+
* runs in an effect (never in render) so the render path stays pure, matching
|
|
67
|
+
* `LinkageScope`'s assignment effect.
|
|
68
|
+
*/
|
|
69
|
+
export declare function useScopeEffects(args: {
|
|
70
|
+
evaluators: LinkageEvaluators | undefined;
|
|
71
|
+
expressionContext: ExpressionContext | undefined;
|
|
72
|
+
form: RuntimeForm;
|
|
73
|
+
prefix: string;
|
|
74
|
+
schema: RuntimeSchema;
|
|
75
|
+
sinks: EffectSinks;
|
|
76
|
+
values: RuntimeFormValues;
|
|
77
|
+
}): RunEffects;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RuntimeFormValues } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the value object at a name prefix (e.g. `"lines[0]."`) within the
|
|
4
|
+
* full form values, so a subform field evaluates against its row record. The
|
|
5
|
+
* root scope (prefix `""`) returns the whole values object; a path that does
|
|
6
|
+
* not resolve to an object returns `{}`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveScopeValues(values: RuntimeFormValues, namePrefix: string): RuntimeFormValues;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RuntimeFieldState } from '../engine/linkage';
|
|
2
|
+
import { RuntimeStateMap } from './types';
|
|
3
|
+
import { ComponentType } from 'react';
|
|
4
|
+
import { SelectorContextProviderProps } from '@vef-framework-react/core';
|
|
5
|
+
/**
|
|
6
|
+
* Selector-backed runtime-state scope. The `Provider` publishes a
|
|
7
|
+
* `RuntimeStateMap` (the root form, or one subform row); descendants read a
|
|
8
|
+
* single field's slice via {@link useRuntimeFieldState}. The runtime controllers
|
|
9
|
+
* own the Provider — see `runtime-state-controller.tsx`.
|
|
10
|
+
*/
|
|
11
|
+
declare const RuntimeStateContextProvider: ComponentType<SelectorContextProviderProps<RuntimeStateMap>>;
|
|
12
|
+
export { RuntimeStateContextProvider };
|
|
13
|
+
/**
|
|
14
|
+
* Read one field's runtime state. Backed by a selector context: the inline
|
|
15
|
+
* selector closes over `fieldId` and `useSyncExternalStore` bails on the
|
|
16
|
+
* result's `Object.is`, so a field re-renders only when its OWN state object
|
|
17
|
+
* reference changes — which the controller's `stabilizeStateMap` makes true
|
|
18
|
+
* for exactly the fields whose linkage outcome flipped. The `?? emptyRuntimeState`
|
|
19
|
+
* fallback is a module singleton, so unlinked fields stay reference-stable too.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useRuntimeFieldState(fieldId: string): RuntimeFieldState;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ExpressionContext, LinkageEvaluators, RuntimeSchema } from '../types';
|
|
3
|
+
import { EffectSinks } from './effects';
|
|
4
|
+
import { RuntimeForm } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Root runtime-state controller: the only React subscriber to the whole
|
|
7
|
+
* form-values object. `form.store.state.values` is one shared reference per
|
|
8
|
+
* write, so the default `Object.is` compare on the selector is correct here.
|
|
9
|
+
*/
|
|
10
|
+
export declare function RuntimeStateController({ children, evaluators, expressionContext, form, schema, sinks }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
evaluators: LinkageEvaluators | undefined;
|
|
13
|
+
expressionContext: ExpressionContext | undefined;
|
|
14
|
+
form: RuntimeForm;
|
|
15
|
+
schema: RuntimeSchema;
|
|
16
|
+
sinks: EffectSinks;
|
|
17
|
+
}): ReactElement;
|
|
18
|
+
/**
|
|
19
|
+
* Per-subform-row controller. Subscribes to ONLY this row's value slice — deep
|
|
20
|
+
* compared, because `resolveScopeValues` returns a fresh object each call — so
|
|
21
|
+
* it re-evaluates when this row's record changes, not on every keystroke
|
|
22
|
+
* elsewhere. Installs a NESTED selector-context Provider so the template field
|
|
23
|
+
* ids (which repeat across rows) resolve to this row's own state map.
|
|
24
|
+
*/
|
|
25
|
+
export declare function SubformRowController({ children, evaluators, expressionContext, form, prefix, sinks, templateSchema }: {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
evaluators: LinkageEvaluators | undefined;
|
|
28
|
+
expressionContext: ExpressionContext | undefined;
|
|
29
|
+
form: RuntimeForm;
|
|
30
|
+
prefix: string;
|
|
31
|
+
sinks: EffectSinks;
|
|
32
|
+
templateSchema: RuntimeSchema;
|
|
33
|
+
}): ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RuntimeStateMap } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Reference-reconcile a freshly-evaluated runtime state map against the prior
|
|
4
|
+
* one. `evaluateRuntimeStates` rebuilds every `RuntimeFieldState` on each call,
|
|
5
|
+
* so a per-field selector would see a new object for every unchanged field and
|
|
6
|
+
* re-render the whole tree. This preserves the prior object reference for any
|
|
7
|
+
* field whose state is deeply equal — so `Object.is(map[id], prev[id])` holds
|
|
8
|
+
* for the n-k unchanged fields and only the k flipped fields re-render — and
|
|
9
|
+
* returns the prior whole-map reference when nothing changed at all (which the
|
|
10
|
+
* assignment effect relies on, replacing the old whole-map `useDeepMemo`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function stabilizeStateMap(prev: RuntimeStateMap | undefined, next: RuntimeStateMap): RuntimeStateMap;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormApi } from '@vef-framework-react/components';
|
|
2
|
+
import { RuntimeFieldState } from '../engine/linkage';
|
|
3
|
+
export type RuntimeFormValues = Record<string, unknown>;
|
|
4
|
+
export type RuntimeStateMap = Record<string, RuntimeFieldState>;
|
|
5
|
+
/**
|
|
6
|
+
* The runtime form instance the renderer drives. Aliased here (not re-declared
|
|
7
|
+
* per file) so the state controller, effect lane, and `FormRenderer` share one
|
|
8
|
+
* shape. The validator generics are deliberately `any` — TanStack's `AnyFormApi`
|
|
9
|
+
* convention: `FormApi` is invariant in them, and the runtime lane only drives
|
|
10
|
+
* values / submission, so it must accept the renderer's form regardless of
|
|
11
|
+
* which form-level validators it registers (e.g. the schema-driven submit gate).
|
|
12
|
+
*/
|
|
13
|
+
export type RuntimeForm = FormApi<RuntimeFormValues, any, any, any, any, any, any, any, any, any, any>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { DeviceRegistries, FormFieldRegistry } from '../engine/registry/form-field-registry';
|
|
3
|
+
import { ContainerChromeSet, PresentationDevice } from '../types';
|
|
4
|
+
export interface RegistryProviderProps {
|
|
5
|
+
registries: DeviceRegistries;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Inject the per-device field registries into the React tree. Store injection is
|
|
10
|
+
* handled separately by `FormEditorStoreProvider` (built on `createComponentStore`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function RegistryProvider({ children, registries }: RegistryProviderProps): ReactElement;
|
|
13
|
+
export interface DeviceProviderProps {
|
|
14
|
+
device: PresentationDevice;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Set the active device for registry resolution. Every {@link useFieldRegistry}
|
|
19
|
+
* consumer (palette, properties panel, field renderers) switches with it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function DeviceProvider({ children, device }: DeviceProviderProps): ReactElement;
|
|
22
|
+
/**
|
|
23
|
+
* The active presentation device. Renderers that branch on device — e.g. the
|
|
24
|
+
* subform's `table` variant, which mounts the desktop `EditableTable` only on
|
|
25
|
+
* PC and falls back to the stacked layout on mobile — read it here.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useDevice(): PresentationDevice;
|
|
28
|
+
/**
|
|
29
|
+
* The full per-device registry set. Consumers that need a specific device's
|
|
30
|
+
* registry regardless of the active one (e.g. the PC → mobile converter, which
|
|
31
|
+
* targets the mobile registry) read it here.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useDeviceRegistries(): DeviceRegistries;
|
|
34
|
+
/**
|
|
35
|
+
* Subscribe to the field registry for the active device. Components that read
|
|
36
|
+
* from the registry (palette, properties panel, field renderers) re-render
|
|
37
|
+
* automatically when the device switches or when fields / property-entry
|
|
38
|
+
* renderers are added/removed at runtime.
|
|
39
|
+
*
|
|
40
|
+
* The hook returns the registry instance itself; identity is stable across
|
|
41
|
+
* re-renders for a given device — the re-render is triggered by a separate
|
|
42
|
+
* revision snapshot managed by `useSyncExternalStore`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function useFieldRegistry(): FormFieldRegistry;
|
|
45
|
+
/**
|
|
46
|
+
* The active device's container chrome — the presentational shells for
|
|
47
|
+
* `section` / `tabs` / `subform`. Resolved from the active registry, so it
|
|
48
|
+
* switches with the device exactly like {@link useFieldRegistry}.
|
|
49
|
+
*/
|
|
50
|
+
export declare function useContainerChrome(): ContainerChromeSet;
|