@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,42 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FieldLinkageAction, LinkageActionType } from '../../../../types';
|
|
3
|
+
import { OptionItem, SourceFieldOption } from './options';
|
|
4
|
+
export interface ActionEditorProps {
|
|
5
|
+
action: FieldLinkageAction;
|
|
6
|
+
/**
|
|
7
|
+
* Action types offered for this rule, already filtered by trigger family and
|
|
8
|
+
* keyed-ness (see `actionOptionsFor`).
|
|
9
|
+
*/
|
|
10
|
+
availableActions: Array<OptionItem<LinkageActionType>>;
|
|
11
|
+
/**
|
|
12
|
+
* Same-scope keyed fields, used as `set_field` targets.
|
|
13
|
+
*/
|
|
14
|
+
targetOptions: SourceFieldOption[];
|
|
15
|
+
/**
|
|
16
|
+
* Form-global data sources by id, used as `refresh_data_source` targets.
|
|
17
|
+
*/
|
|
18
|
+
dataSourceOptions: SourceFieldOption[];
|
|
19
|
+
/**
|
|
20
|
+
* Whether the remove control is shown (a rule keeps at least one action).
|
|
21
|
+
*/
|
|
22
|
+
canRemove: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the rule's trigger is a `condition` — only then does a side-effect
|
|
25
|
+
* action's `retrigger` (edge vs. always) apply, so the toggle shows just here.
|
|
26
|
+
*/
|
|
27
|
+
isConditionTrigger: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Declared form-variable names, feeding the expression editors' completion
|
|
30
|
+
* and unknown-key lint (same assist the condition editor gets).
|
|
31
|
+
*/
|
|
32
|
+
variableNames?: string[];
|
|
33
|
+
onChange: (next: FieldLinkageAction) => void;
|
|
34
|
+
onRemove: () => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Edits a single action within a rule's action list. The type select swaps the
|
|
38
|
+
* whole action (resetting to that type's defaults); the body below renders the
|
|
39
|
+
* type-specific inputs. A side-effect action under a `condition` trigger also
|
|
40
|
+
* gets a "repeat while held" toggle that flips its `retrigger` to `"always"`.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ActionEditor: FC<ActionEditorProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FieldLinkageAction, LinkageTriggerKind } from '../../../../types';
|
|
3
|
+
import { SourceFieldOption } from './options';
|
|
4
|
+
export interface ActionsEditorProps {
|
|
5
|
+
actions: FieldLinkageAction[];
|
|
6
|
+
/**
|
|
7
|
+
* The rule's trigger kind — selects the action palette (state actions are
|
|
8
|
+
* offered only under a `condition` trigger).
|
|
9
|
+
*/
|
|
10
|
+
triggerKind: LinkageTriggerKind;
|
|
11
|
+
isTargetKeyed: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether this scope permits state actions at all (field scope yes, form
|
|
14
|
+
* scope no — the form has no self field whose state could be derived).
|
|
15
|
+
*/
|
|
16
|
+
allowStateActions: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the rule's target is a container — narrows the state palette to
|
|
19
|
+
* the actions a container supports (`show` / `hide` / `enable` / `disable`).
|
|
20
|
+
*/
|
|
21
|
+
isContainerTarget?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Keyed fields offered as a `set_field` target.
|
|
24
|
+
*/
|
|
25
|
+
targetOptions: SourceFieldOption[];
|
|
26
|
+
/**
|
|
27
|
+
* Form-global data sources offered as a `refresh_data_source` target.
|
|
28
|
+
*/
|
|
29
|
+
dataSourceOptions: SourceFieldOption[];
|
|
30
|
+
/**
|
|
31
|
+
* Declared form-variable names, forwarded into each action's expression
|
|
32
|
+
* editors for completion / lint.
|
|
33
|
+
*/
|
|
34
|
+
variableNames?: string[];
|
|
35
|
+
onChange: (next: FieldLinkageAction[]) => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The THEN half of a rule: an ordered, add/remove list of actions. The palette
|
|
39
|
+
* is derived from the trigger kind and the target's keyed-ness, so an edge
|
|
40
|
+
* trigger can only add effect actions and a non-keyed target hides keyed-only
|
|
41
|
+
* state actions.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ActionsEditor: FC<ActionsEditorProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { LinkageCondition } from '../../../../types';
|
|
3
|
+
import { SourceFieldOption } from './options';
|
|
4
|
+
export interface ConditionEditorProps {
|
|
5
|
+
condition: LinkageCondition;
|
|
6
|
+
sourceOptions: SourceFieldOption[];
|
|
7
|
+
/**
|
|
8
|
+
* Declared form-variable names, feeding `$vars.` autocompletion in
|
|
9
|
+
* expression mode.
|
|
10
|
+
*/
|
|
11
|
+
variableNames?: string[];
|
|
12
|
+
/**
|
|
13
|
+
* The owning block's data-binding key. The expression → visual switch
|
|
14
|
+
* seeds its first condition with another field when one exists — a
|
|
15
|
+
* self-referencing show rule is almost always a mistake.
|
|
16
|
+
*/
|
|
17
|
+
selfKey?: string;
|
|
18
|
+
onChange: (next: LinkageCondition) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Top-level wrapper. The root condition is always a `group` or an
|
|
22
|
+
* `expression` — a bare `leaf` is never the rule's top condition. Mode
|
|
23
|
+
* switching here is a destructive replace (group ↔ expression) because
|
|
24
|
+
* there is no general way to reverse-translate a free-form JS expression
|
|
25
|
+
* back into a structured tree; a switch that would discard authored content
|
|
26
|
+
* is gated behind a confirmation.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ConditionEditor: FC<ConditionEditorProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ContainerNode } from '../../../../types';
|
|
3
|
+
export interface ContainerLinkageSectionProps {
|
|
4
|
+
node: ContainerNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Linkage editor for a container node (section / tabs / subform / flex /
|
|
8
|
+
* grid) — the container counterpart of the field-level `LinkageRulesEntry`.
|
|
9
|
+
* The model, validator, and runtime all support container linkage (`show` /
|
|
10
|
+
* `hide` / `enable` / `disable` propagate to descendants); this section makes
|
|
11
|
+
* it authorable. Rules are `condition`-triggered, the state palette is the
|
|
12
|
+
* container subset, and writes go through the store's `updateBlock`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ContainerLinkageSection({ node }: ContainerLinkageSectionProps): ReactElement;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
2
|
+
import { Diagnostic } from '@codemirror/lint';
|
|
3
|
+
import { EditorView } from '@codemirror/view';
|
|
4
|
+
import { SourceFieldOption } from './options';
|
|
5
|
+
import { Extension } from '@codemirror/state';
|
|
6
|
+
export interface ExpressionAssistArgs {
|
|
7
|
+
/**
|
|
8
|
+
* Keyed fields reachable from the rule's value scope.
|
|
9
|
+
*/
|
|
10
|
+
fields: SourceFieldOption[];
|
|
11
|
+
/**
|
|
12
|
+
* Declared form-variable names (completion only — hosts may inject more).
|
|
13
|
+
*/
|
|
14
|
+
variables: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Completion source: after `field.` / `$form.` offer the scope's field keys
|
|
18
|
+
* (labels as detail), after `$vars.` the declared variables, and at a bare
|
|
19
|
+
* word the scope roots themselves.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildCompletionSource(args: ExpressionAssistArgs): (context: CompletionContext) => CompletionResult | null;
|
|
22
|
+
/**
|
|
23
|
+
* Lint pass over the parsed tree: `field.x` / `$form.x` where `x` is not a
|
|
24
|
+
* key in the rule's scope gets a warning — the most common silent failure in
|
|
25
|
+
* hand-written expressions is a misspelled key that simply never matches.
|
|
26
|
+
* `$vars` / `$user` / `$node` are deliberately NOT linted: hosts inject
|
|
27
|
+
* members the schema cannot know about.
|
|
28
|
+
*/
|
|
29
|
+
export declare function lintUnknownFieldMembers(view: EditorView, fieldKeys: ReadonlySet<string>): Diagnostic[];
|
|
30
|
+
/**
|
|
31
|
+
* The complete extension set for a linkage expression / script editor.
|
|
32
|
+
*/
|
|
33
|
+
export declare function expressionAssistExtensions(args: ExpressionAssistArgs): Extension[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LinkageRulesEntry } from './linkage-rules-entry';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { EntryComponentProps, FieldLinkageDefaults } from '../../../../types';
|
|
3
|
+
export type DefaultsKey = keyof FieldLinkageDefaults;
|
|
4
|
+
export declare const LinkageRulesEntry: FC<EntryComponentProps>;
|
|
5
|
+
export interface DefaultsPanelProps {
|
|
6
|
+
defaults: FieldLinkageDefaults | undefined;
|
|
7
|
+
isTargetKeyed: boolean;
|
|
8
|
+
onChange: (key: DefaultsKey, value: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders the "默认状态" row. Order mirrors {@link FieldLinkageDefaults}:
|
|
12
|
+
* hidden → disabled → required. `required` is only meaningful on keyed
|
|
13
|
+
* leaf fields (the validator rejects it elsewhere), so the toggle is omitted
|
|
14
|
+
* when the target is non-keyed; the container linkage section reuses the
|
|
15
|
+
* panel with `isTargetKeyed=false` for the same reason.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DefaultsPanel: FC<DefaultsPanelProps>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { FieldLinkage, FieldLinkageAction, FieldLinkageRule, LinkageActionType, LinkageActionValue, LinkageCondition, LinkageConditionGroup, LinkageConditionLeaf, LinkageOperator, LinkageTrigger, LinkageTriggerKind } from '../../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Maximum nesting depth the editor UI exposes. Depth 0 = root group;
|
|
4
|
+
* depth 1 = a group nested directly inside the root. Going deeper hurts
|
|
5
|
+
* comprehension; users who need more should switch the rule to
|
|
6
|
+
* expression / script mode.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MAX_CONDITION_NESTING_DEPTH = 1;
|
|
9
|
+
export declare function createLeaf(sourceKey: string, operator?: LinkageOperator): LinkageConditionLeaf;
|
|
10
|
+
export declare function createGroup(children?: LinkageCondition[]): LinkageConditionGroup;
|
|
11
|
+
export declare function createExpression(): LinkageCondition;
|
|
12
|
+
export declare function createActionFor(type: LinkageActionType): FieldLinkageAction;
|
|
13
|
+
/**
|
|
14
|
+
* Build a fresh trigger of the given kind. A `condition` trigger seeds a group
|
|
15
|
+
* with one leaf on `sourceKey` (or an empty group when none is available);
|
|
16
|
+
* edge triggers carry no payload.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createTrigger(kind: LinkageTriggerKind, sourceKey?: string): LinkageTrigger;
|
|
19
|
+
/**
|
|
20
|
+
* Seed a new rule. With a source field it defaults to a `condition` trigger and
|
|
21
|
+
* a `show` action (the classic linkage). Without one (no sibling to reference)
|
|
22
|
+
* it seeds an edge-triggered `alert` so an event-only rule can still be authored
|
|
23
|
+
* — the edge is `change` for a keyed target (fires off its value changing) but
|
|
24
|
+
* `click` for a non-keyed block (button / divider / alert), which carries no
|
|
25
|
+
* value and whose `change` edge the validator rejects.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createRule(sourceKey: string | undefined, isTargetKeyed: boolean): FieldLinkageRule;
|
|
28
|
+
/**
|
|
29
|
+
* Reconcile a rule's actions after its trigger changes. State actions are only
|
|
30
|
+
* valid under a `condition` trigger in a state-allowing scope; when the new
|
|
31
|
+
* trigger can't carry them they are stripped (and an `alert` seeded if that
|
|
32
|
+
* empties the list). Moving to an edge trigger also strips each surviving
|
|
33
|
+
* effect's `retrigger` (meaningless there), so the editor never commits a rule
|
|
34
|
+
* the validator flags.
|
|
35
|
+
*/
|
|
36
|
+
export declare function reconcileRuleTrigger(rule: FieldLinkageRule, trigger: LinkageTrigger, allowStateActions: boolean): FieldLinkageRule;
|
|
37
|
+
/**
|
|
38
|
+
* Whether a condition tree carries user-authored content worth confirming
|
|
39
|
+
* before a destructive replace (group ↔ expression, trigger-kind change). A
|
|
40
|
+
* freshly seeded tree — an empty group, or a group holding exactly one
|
|
41
|
+
* pristine leaf (default `eq` operator, no value typed) — is trivially
|
|
42
|
+
* reconstructible, so switching away from it stays instant; anything beyond
|
|
43
|
+
* that loses real work and deserves a confirmation.
|
|
44
|
+
*/
|
|
45
|
+
export declare function conditionHasAuthoredContent(condition: LinkageCondition): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Seed a new form-scope (global "events") rule. With a root source field it
|
|
48
|
+
* defaults to a form-wide `condition`; otherwise to an `afterSubmit` lifecycle
|
|
49
|
+
* trigger. Either way the default action is an `alert` (effect-only, since the
|
|
50
|
+
* form has no self field to derive state for).
|
|
51
|
+
*/
|
|
52
|
+
export declare function createFormRule(sourceKey?: string): FieldLinkageRule;
|
|
53
|
+
/**
|
|
54
|
+
* Strips empty defaults / rules arrays so the persisted schema stays
|
|
55
|
+
* minimal. Returning `undefined` from this helper lets the caller delete
|
|
56
|
+
* the `linkage` key entirely when nothing is left.
|
|
57
|
+
*/
|
|
58
|
+
export declare function normalizeLinkage(linkage: FieldLinkage): FieldLinkage | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Immutably updates a single child within a group condition addressed by
|
|
61
|
+
* `path` (a sequence of child indices from the root). Returns the new
|
|
62
|
+
* root condition; the original tree is unchanged.
|
|
63
|
+
*/
|
|
64
|
+
export declare function updateAtPath(root: LinkageCondition, path: number[], updater: (current: LinkageCondition) => LinkageCondition): LinkageCondition;
|
|
65
|
+
export declare function removeAtPath(root: LinkageCondition, path: number[]): LinkageCondition;
|
|
66
|
+
export declare function appendChild(root: LinkageCondition, groupPath: number[], child: LinkageCondition): LinkageCondition;
|
|
67
|
+
export type ActionValueMode = LinkageActionValue["kind"];
|
|
68
|
+
/**
|
|
69
|
+
* Switch a {@link LinkageActionValue} between literal and expression mode,
|
|
70
|
+
* preserving the value when the mode is unchanged. Shared by every value-bearing
|
|
71
|
+
* action editor (`assign` / `set_field` / `alert` / `navigate`).
|
|
72
|
+
*/
|
|
73
|
+
export declare function setActionValueMode(current: LinkageActionValue, mode: ActionValueMode): LinkageActionValue;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ScopePath } from '../../../../engine/schema/walk';
|
|
2
|
+
import { EffectActionType, FormDataSource, LinkageActionType, LinkageOperator, LinkageTriggerKind, PresentationLayer, StateActionType } from '../../../../types';
|
|
3
|
+
export interface OptionItem<T extends string> {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const operatorOptions: Array<OptionItem<LinkageOperator>>;
|
|
8
|
+
/**
|
|
9
|
+
* Trigger dropdown options for a scope's allowed trigger kinds (field rules use
|
|
10
|
+
* {@link FIELD_TRIGGER_KINDS}, the form-level panel {@link FORM_TRIGGER_KINDS}).
|
|
11
|
+
*/
|
|
12
|
+
export declare function triggerOptionsFor(kinds: readonly LinkageTriggerKind[]): Array<OptionItem<LinkageTriggerKind>>;
|
|
13
|
+
export declare const stateActionOptions: Array<OptionItem<StateActionType>>;
|
|
14
|
+
export declare const effectActionOptions: Array<OptionItem<EffectActionType>>;
|
|
15
|
+
export declare const alertLevelOptions: Array<OptionItem<"info" | "success" | "warning" | "error">>;
|
|
16
|
+
export declare const logicOptions: Array<OptionItem<"all" | "any">>;
|
|
17
|
+
export declare function isLinkageOperator(value: unknown): value is LinkageOperator;
|
|
18
|
+
export declare function isLinkageTriggerKind(value: unknown): value is LinkageTriggerKind;
|
|
19
|
+
export declare function isLinkageActionType(value: unknown): value is LinkageActionType;
|
|
20
|
+
export declare function isLogicValue(value: unknown): value is "all" | "any";
|
|
21
|
+
export declare function operatorNeedsValue(operator: LinkageOperator): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The action-type palette for a rule. State actions are offered only when the
|
|
24
|
+
* scope allows them (field / container scope, not form scope) AND the trigger
|
|
25
|
+
* is a `condition` (state must be derived, not pulsed by an event); keyed-only
|
|
26
|
+
* state actions are further dropped on a non-keyed target, and a container
|
|
27
|
+
* target is narrowed to {@link CONTAINER_STATE_ACTIONS}. Effect actions are
|
|
28
|
+
* always available.
|
|
29
|
+
*/
|
|
30
|
+
export declare function actionOptionsFor(args: {
|
|
31
|
+
triggerKind: LinkageTriggerKind;
|
|
32
|
+
isTargetKeyed: boolean;
|
|
33
|
+
allowStateActions: boolean;
|
|
34
|
+
isContainerTarget?: boolean;
|
|
35
|
+
}): Array<OptionItem<LinkageActionType>>;
|
|
36
|
+
export interface SourceFieldOption {
|
|
37
|
+
value: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}
|
|
40
|
+
interface SourceCandidate {
|
|
41
|
+
key?: string;
|
|
42
|
+
label?: string;
|
|
43
|
+
type: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Collect the field candidates a linkage rule may reference, limited to the
|
|
47
|
+
* scopes the predicate accepts — a field rule's own value scope, or the root
|
|
48
|
+
* scope for form-level rules. Shared by the field and form linkage entries,
|
|
49
|
+
* which then narrow the candidates into source / target option lists via
|
|
50
|
+
* {@link getSourceFieldOptions} (so one walk feeds both lists).
|
|
51
|
+
*/
|
|
52
|
+
export declare function collectSourceCandidates(layer: PresentationLayer, inScope: (scope: ScopePath) => boolean): SourceCandidate[];
|
|
53
|
+
/**
|
|
54
|
+
* Builds the keyed-field dropdown options shared by a linkage rule's IF source
|
|
55
|
+
* and its `set_field` target — both reference the same same-scope keyed fields.
|
|
56
|
+
* Only keyed candidates appear. The field itself IS included: keying a rule off
|
|
57
|
+
* its own value (e.g. "when my value == X → alert / refresh another field") is a
|
|
58
|
+
* common need, and the runtime evaluates it like any other source. A genuine
|
|
59
|
+
* cycle — a self-referential *state* dependency, or a cross-field loop — is
|
|
60
|
+
* caught by the validator, not pruned here (the dropdown never tried to prevent
|
|
61
|
+
* cross-field cycles either). Callers pass only same-scope candidates, since a
|
|
62
|
+
* rule's source must live in the field's own value scope.
|
|
63
|
+
*/
|
|
64
|
+
export declare function getSourceFieldOptions(args: {
|
|
65
|
+
components: SourceCandidate[];
|
|
66
|
+
}): SourceFieldOption[];
|
|
67
|
+
/**
|
|
68
|
+
* Data-source dropdown options for a `refresh_data_source` action — the form's
|
|
69
|
+
* named data sources by id. An unnamed source falls back to its id as the label.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getDataSourceOptions(dataSources: FormDataSource[] | undefined): SourceFieldOption[];
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ValidationIssue } from '../../../../engine/validation';
|
|
3
|
+
/**
|
|
4
|
+
* Index rule-scoped validation issues by their `ruleId` so the rule-list
|
|
5
|
+
* editor can hang each issue onto the card of the rule that produced it.
|
|
6
|
+
* Issues without a `ruleId` (schema-envelope problems, cross-rule cycles) are
|
|
7
|
+
* not card-addressable and are dropped here.
|
|
8
|
+
*/
|
|
9
|
+
export declare function groupIssuesByRule(issues: readonly ValidationIssue[]): Map<string, ValidationIssue[]>;
|
|
10
|
+
export interface RuleDiagnosticsProps {
|
|
11
|
+
issues: readonly ValidationIssue[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Compact per-rule diagnostics list rendered inside a rule card — the editor
|
|
15
|
+
* surface of `validateLinkageSchema`, so half-configured or dangling rules are
|
|
16
|
+
* visible while authoring instead of silently dead. Severity drives the
|
|
17
|
+
* styling: warnings are legitimate mid-authoring states, errors mean the rule
|
|
18
|
+
* cannot run.
|
|
19
|
+
*/
|
|
20
|
+
export declare function RuleDiagnostics({ issues }: RuleDiagnosticsProps): ReactElement | null;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ValidationIssue } from '../../../../engine/validation';
|
|
3
|
+
import { FieldLinkageRule, LinkageTriggerKind } from '../../../../types';
|
|
4
|
+
import { SourceFieldOption } from './options';
|
|
5
|
+
export interface RuleListEditorProps {
|
|
6
|
+
rules: FieldLinkageRule[];
|
|
7
|
+
/**
|
|
8
|
+
* Trigger kinds offered, by scope (field vs container vs form).
|
|
9
|
+
*/
|
|
10
|
+
triggerKinds: readonly LinkageTriggerKind[];
|
|
11
|
+
/**
|
|
12
|
+
* Whether state actions are offered (field / container scope yes, form
|
|
13
|
+
* scope no).
|
|
14
|
+
*/
|
|
15
|
+
allowStateActions: boolean;
|
|
16
|
+
isTargetKeyed: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the rule target is a container — narrows the state-action palette
|
|
19
|
+
* to `show` / `hide` / `enable` / `disable`.
|
|
20
|
+
*/
|
|
21
|
+
isContainerTarget?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Keyed fields offered as a condition's source. Includes the rule's own
|
|
24
|
+
* field: keying a rule off its own value is legal (the validator flags only
|
|
25
|
+
* the genuinely cyclic case — a value-writing `assign` / `script` rule
|
|
26
|
+
* reading its own key).
|
|
27
|
+
*/
|
|
28
|
+
sourceOptions: SourceFieldOption[];
|
|
29
|
+
/**
|
|
30
|
+
* Declared form-variable names, feeding `$vars.` autocompletion in the
|
|
31
|
+
* expression-mode condition editor.
|
|
32
|
+
*/
|
|
33
|
+
variableNames?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* The owning block's data-binding key (when keyed). Seeds the expression →
|
|
36
|
+
* visual switch with a different field, mirroring rule creation.
|
|
37
|
+
*/
|
|
38
|
+
selfKey?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Keyed fields offered as a `set_field` target — includes the rule's own
|
|
41
|
+
* field (writing one's own value, e.g. normalising on blur, is legitimate).
|
|
42
|
+
*/
|
|
43
|
+
targetOptions: SourceFieldOption[];
|
|
44
|
+
/**
|
|
45
|
+
* Form-global data sources offered as a `refresh_data_source` target.
|
|
46
|
+
*/
|
|
47
|
+
dataSourceOptions: SourceFieldOption[];
|
|
48
|
+
/**
|
|
49
|
+
* Localized noun for the empty state and add button ("联动" / "事件").
|
|
50
|
+
*/
|
|
51
|
+
noun: string;
|
|
52
|
+
/**
|
|
53
|
+
* Live validator issues mapped per rule id (see `groupIssuesByRule`); each
|
|
54
|
+
* card renders its own bucket. Omitted means no diagnostics surface.
|
|
55
|
+
*/
|
|
56
|
+
issuesByRule?: ReadonlyMap<string, ValidationIssue[]>;
|
|
57
|
+
/**
|
|
58
|
+
* When set, the "add rule" button is disabled and this text explains why
|
|
59
|
+
* (e.g. a container scope with no keyed field to build a condition from).
|
|
60
|
+
*/
|
|
61
|
+
addDisabledReason?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Build a fresh rule when the user clicks add (scope-specific default).
|
|
64
|
+
*/
|
|
65
|
+
createRule: () => FieldLinkageRule;
|
|
66
|
+
onChange: (rules: FieldLinkageRule[]) => void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The shared rule-list editor: an add/remove list of rules, each a
|
|
70
|
+
* {@link TriggerEditor} (WHEN) over an {@link ActionsEditor} (THEN). Field
|
|
71
|
+
* linkage, container linkage, and the form-level events panel all render
|
|
72
|
+
* through it, differing only in the allowed triggers, the action palette, and
|
|
73
|
+
* the new-rule seed.
|
|
74
|
+
*/
|
|
75
|
+
export declare const RuleListEditor: FC<RuleListEditorProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/serialize';
|
|
2
|
+
export declare const rootCss: SerializedStyles;
|
|
3
|
+
export declare const ruleListRootCss: SerializedStyles;
|
|
4
|
+
export declare const headerCss: SerializedStyles;
|
|
5
|
+
export declare const titleCss: SerializedStyles;
|
|
6
|
+
export declare const hintCss: SerializedStyles;
|
|
7
|
+
export declare const defaultStatesCss: SerializedStyles;
|
|
8
|
+
export declare const defaultStateCss: SerializedStyles;
|
|
9
|
+
export declare const defaultTextCss: SerializedStyles;
|
|
10
|
+
export declare const defaultTitleCss: SerializedStyles;
|
|
11
|
+
export declare const defaultHintCss: SerializedStyles;
|
|
12
|
+
export declare const expressionHeaderLabelCss: SerializedStyles;
|
|
13
|
+
export declare const emptyCss: SerializedStyles;
|
|
14
|
+
export declare const emptyBlockedCss: SerializedStyles;
|
|
15
|
+
export declare const rulesCss: SerializedStyles;
|
|
16
|
+
export declare const ruleCardCss: SerializedStyles;
|
|
17
|
+
export declare const ruleHeaderCss: SerializedStyles;
|
|
18
|
+
export declare const ruleIndexCss: SerializedStyles;
|
|
19
|
+
export declare const ruleTitleCss: SerializedStyles;
|
|
20
|
+
export declare const deleteButtonCss: SerializedStyles;
|
|
21
|
+
export declare const ruleBodyCss: SerializedStyles;
|
|
22
|
+
export declare const sectionCss: SerializedStyles;
|
|
23
|
+
export declare const sectionLabelCss: SerializedStyles;
|
|
24
|
+
export declare const conditionGroupCss: SerializedStyles;
|
|
25
|
+
export declare const conditionGroupHeaderCss: SerializedStyles;
|
|
26
|
+
export declare const conditionRowCss: SerializedStyles;
|
|
27
|
+
export declare const conditionRowFullCss: SerializedStyles;
|
|
28
|
+
export declare const conditionRowDeleteCss: SerializedStyles;
|
|
29
|
+
export declare const addRowCss: SerializedStyles;
|
|
30
|
+
export declare const addInlineButtonCss: SerializedStyles;
|
|
31
|
+
export declare const addButtonCss: SerializedStyles;
|
|
32
|
+
export declare const codeEditorWrapperCss: SerializedStyles;
|
|
33
|
+
export declare const conditionNoticeCss: SerializedStyles;
|
|
34
|
+
export declare const missingSourceLabelCss: SerializedStyles;
|
|
35
|
+
export declare const triggerHintCss: SerializedStyles;
|
|
36
|
+
export declare const actionRetriggerCss: SerializedStyles;
|
|
37
|
+
export declare const actionRetriggerLabelCss: SerializedStyles;
|
|
38
|
+
export declare const actionsListCss: SerializedStyles;
|
|
39
|
+
export declare const actionCardCss: SerializedStyles;
|
|
40
|
+
export declare const actionHeaderCss: SerializedStyles;
|
|
41
|
+
export declare const actionDeleteCss: SerializedStyles;
|
|
42
|
+
export declare const valueEditorCss: SerializedStyles;
|
|
43
|
+
export declare const apiFieldsCss: SerializedStyles;
|
|
44
|
+
export declare const selectStyle: {
|
|
45
|
+
readonly width: "100%";
|
|
46
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { LinkageTrigger, LinkageTriggerKind } from '../../../../types';
|
|
3
|
+
import { SourceFieldOption } from './options';
|
|
4
|
+
export interface TriggerEditorProps {
|
|
5
|
+
trigger: LinkageTrigger;
|
|
6
|
+
/**
|
|
7
|
+
* Trigger kinds offered, by scope (field vs form).
|
|
8
|
+
*/
|
|
9
|
+
triggerKinds: readonly LinkageTriggerKind[];
|
|
10
|
+
sourceOptions: SourceFieldOption[];
|
|
11
|
+
/**
|
|
12
|
+
* Declared form-variable names, forwarded to the expression-mode condition
|
|
13
|
+
* editor for `$vars.` autocompletion.
|
|
14
|
+
*/
|
|
15
|
+
variableNames?: string[];
|
|
16
|
+
/**
|
|
17
|
+
* The owning block's data-binding key, forwarded so the expression → visual
|
|
18
|
+
* switch seeds with a different field when one exists.
|
|
19
|
+
*/
|
|
20
|
+
selfKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether switching away from the current trigger discards real work (an
|
|
23
|
+
* authored condition tree, or state actions the reconcile step would strip).
|
|
24
|
+
* When set, the kind switch is gated behind a confirmation; an unconfigured
|
|
25
|
+
* trigger switches instantly.
|
|
26
|
+
*/
|
|
27
|
+
confirmKindSwitch: boolean;
|
|
28
|
+
onChange: (next: LinkageTrigger) => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The WHEN half of a rule: a trigger-kind picker plus, for a `condition`
|
|
32
|
+
* trigger, the visual condition builder — or a one-line hint for an edge
|
|
33
|
+
* (event) trigger, which needs no value to compare against.
|
|
34
|
+
*/
|
|
35
|
+
export declare const TriggerEditor: FC<TriggerEditorProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FieldLinkage, FormDataSource, FormVariable, PresentationLayer } from '../../../../types';
|
|
2
|
+
import { SourceFieldOption } from './options';
|
|
3
|
+
import { groupIssuesByRule } from './rule-diagnostics';
|
|
4
|
+
export interface LinkageEditorModel {
|
|
5
|
+
/**
|
|
6
|
+
* Same-scope keyed-field options — the condition source and `set_field` target
|
|
7
|
+
* picker share this list. Stable identity (see {@link useStableOptions}).
|
|
8
|
+
*/
|
|
9
|
+
fieldOptions: SourceFieldOption[];
|
|
10
|
+
/**
|
|
11
|
+
* The form's named data sources, for a `refresh_data_source` action.
|
|
12
|
+
*/
|
|
13
|
+
dataSourceOptions: SourceFieldOption[];
|
|
14
|
+
/**
|
|
15
|
+
* Declared `$vars` names, for the expression editors' completion.
|
|
16
|
+
*/
|
|
17
|
+
variableNames: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Validator issues hung onto each rule by id, for live in-card diagnostics.
|
|
20
|
+
*/
|
|
21
|
+
issuesByRule: ReturnType<typeof groupIssuesByRule>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The shared model behind every linkage editor host — the field-level entry, the
|
|
25
|
+
* container section, and the form-level events panel. Each resolves the same
|
|
26
|
+
* four things (same-scope field options, data-source options, variable names,
|
|
27
|
+
* deferred rule diagnostics) and differed only in which layer/scope they walk
|
|
28
|
+
* and whether the form-level linkage participates; that wiring lived copy-pasted
|
|
29
|
+
* across all three.
|
|
30
|
+
*
|
|
31
|
+
* `nodeId` is the node whose own value scope the sources resolve in (`null` for
|
|
32
|
+
* the form-level root scope). `formLinkage` is threaded only by the form panel so
|
|
33
|
+
* its diagnostics see the shared linkage; field/container pass `undefined`.
|
|
34
|
+
*
|
|
35
|
+
* The structural passes (scope resolution, the candidate walk, and validation)
|
|
36
|
+
* only change on a structural edit — never on the linkage keystroke being typed —
|
|
37
|
+
* so they run against a {@link useDeferredValue} layer at transition priority,
|
|
38
|
+
* keeping per-keystroke typing latency off them.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useLinkageEditorModel(args: {
|
|
41
|
+
layer: PresentationLayer;
|
|
42
|
+
nodeId: string | null;
|
|
43
|
+
dataSources: FormDataSource[] | undefined;
|
|
44
|
+
variables: FormVariable[] | undefined;
|
|
45
|
+
formLinkage?: FieldLinkage;
|
|
46
|
+
}): LinkageEditorModel;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SourceFieldOption } from './options';
|
|
2
|
+
/**
|
|
3
|
+
* Keep an option list's identity stable while its content is unchanged.
|
|
4
|
+
*
|
|
5
|
+
* The candidate walks rebuild the array on every store edit (the layer
|
|
6
|
+
* reference moves per keystroke), but the candidate SET only changes when a
|
|
7
|
+
* field is added / removed / re-keyed / re-labeled. Downstream the array
|
|
8
|
+
* identity feeds the expression editors' `assistExtensions` memo — a fresh
|
|
9
|
+
* reference per keystroke would rebuild the CodeMirror completion / lint
|
|
10
|
+
* extensions and reconfigure the editor mid-typing (closing an open
|
|
11
|
+
* completion popup).
|
|
12
|
+
*
|
|
13
|
+
* The ref write happens during render but is idempotent for a given content,
|
|
14
|
+
* so StrictMode double-renders and discarded concurrent renders stay
|
|
15
|
+
* consistent — the same argument as the renderer's `prevRef` reconciliation.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useStableOptions<T extends SourceFieldOption>(options: T[]): T[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { EntryComponentProps } from '../../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Editor for a selection field's option source. A segmented control switches
|
|
5
|
+
* between an inline static list, a reference to a form-global data source, and
|
|
6
|
+
* an inline remote request — the three arms of {@link FieldOptionSource}, all
|
|
7
|
+
* resolved at runtime by `useFieldOptions`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const OptionsSourceEntry: FC<EntryComponentProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldOptionSource } from '../../../../types';
|
|
2
|
+
export type OptionSourceKind = FieldOptionSource["kind"];
|
|
3
|
+
/**
|
|
4
|
+
* Switch a {@link FieldOptionSource} to a different kind, preserving the inner
|
|
5
|
+
* payload when the kind is unchanged so a user does not lose their work toggling
|
|
6
|
+
* the segmented control.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setOptionSourceKind(current: FieldOptionSource | undefined, kind: OptionSourceKind): FieldOptionSource;
|
|
9
|
+
/**
|
|
10
|
+
* Whether an option source carries payload worth confirming before a
|
|
11
|
+
* destructive kind switch discards it (`setOptionSourceKind` keeps the payload
|
|
12
|
+
* only when the kind is unchanged).
|
|
13
|
+
*/
|
|
14
|
+
export declare function optionSourceHasPayload(source: FieldOptionSource): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FormDataSource } from '../../types';
|
|
3
|
+
export interface FormDataSourcesPanelProps {
|
|
4
|
+
dataSources: FormDataSource[];
|
|
5
|
+
onChange: (next: FormDataSource[]) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Form-global data-source manager. A static source carries an inline option
|
|
9
|
+
* list; a remote source carries an RPC request the host resolver runs. Selection
|
|
10
|
+
* fields reference these by id (`{ kind: "ref", dataSourceId }`).
|
|
11
|
+
*
|
|
12
|
+
* Add and in-place edits flow through `onChange` (the drawer patches
|
|
13
|
+
* `schema.dataSources`); deletion goes through the store's `removeDataSource`
|
|
14
|
+
* so the references hanging off the schema are cleaned up with it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function FormDataSourcesPanel({ dataSources, onChange }: FormDataSourcesPanelProps): ReactElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FieldLinkage, FormSchema } from '../../types';
|
|
3
|
+
export interface FormLinkagePanelProps {
|
|
4
|
+
schema: FormSchema;
|
|
5
|
+
onChange: (linkage: FieldLinkage | undefined) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Form-scope linkage editor — the global "events" panel. Reuses the shared
|
|
9
|
+
* {@link RuleListEditor} with the form policy: lifecycle / condition triggers,
|
|
10
|
+
* effect actions only, and a form-specific new-rule seed. Form-wide conditions
|
|
11
|
+
* resolve against root-scope keyed fields.
|
|
12
|
+
*/
|
|
13
|
+
export declare function FormLinkagePanel({ onChange, schema }: FormLinkagePanelProps): ReactElement;
|