@vef-framework-react/form-editor 2.6.0 → 2.8.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/components/button/index.cjs +1 -1
- package/dist/cjs/components/checkbox-group-field/index.cjs +1 -1
- package/dist/cjs/components/code-editor/index.cjs +1 -1
- package/dist/cjs/components/date-field/index.cjs +1 -1
- package/dist/cjs/components/field-entries.cjs +1 -1
- package/dist/cjs/components/mobile/checkbox-group.cjs +1 -1
- package/dist/cjs/components/mobile/input-cell.cjs +1 -1
- package/dist/cjs/components/mobile/number.cjs +1 -1
- package/dist/cjs/components/mobile/switch.cjs +1 -1
- package/dist/cjs/components/mobile/textfield.cjs +1 -1
- package/dist/cjs/components/number-field/index.cjs +1 -1
- package/dist/cjs/components/textfield/index.cjs +1 -1
- package/dist/cjs/editor/canvas/canvas-field.cjs +1 -1
- package/dist/cjs/editor/canvas/canvas.cjs +1 -1
- package/dist/cjs/editor/canvas/drop-zones.cjs +1 -1
- package/dist/cjs/editor/canvas/json-split-view.cjs +1 -1
- package/dist/cjs/editor/canvas/subform-column-eligibility.cjs +1 -1
- package/dist/cjs/editor/context-sources.cjs +1 -0
- package/dist/cjs/editor/dnd.cjs +1 -1
- package/dist/cjs/editor/editor-layout-context.cjs +1 -1
- package/dist/cjs/editor/form-config/form-config-drawer.cjs +1 -1
- package/dist/cjs/editor/form-config/linkage-overview.cjs +1 -0
- package/dist/cjs/editor/form-editor.cjs +1 -1
- package/dist/cjs/editor/palette/palette-group.cjs +1 -1
- package/dist/cjs/editor/preview-runtime-context.cjs +1 -1
- package/dist/cjs/editor/properties/container-properties.cjs +1 -1
- package/dist/cjs/editor/properties/entries/index.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/action-editor.cjs +2 -2
- package/dist/cjs/editor/properties/entries/linkage/actions-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/container-linkage-section.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/expression-input.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/linkage-rules-entry.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/mutators.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/options.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/rule-diagnostics.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/rule-list-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/trigger-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/use-linkage-editor-model.cjs +1 -1
- package/dist/cjs/editor/properties/form-linkage-panel.cjs +1 -1
- package/dist/cjs/editor/properties/form-variables-panel.cjs +1 -1
- package/dist/cjs/editor/properties/properties-panel.cjs +1 -1
- package/dist/cjs/editor/properties/properties-provider.cjs +1 -1
- package/dist/cjs/editor/remove-node-confirm.cjs +2 -1
- package/dist/cjs/editor/schema-apply.cjs +2 -2
- package/dist/cjs/editor/toolbar/notify.cjs +1 -1
- package/dist/cjs/editor/toolbar/toolbar.cjs +2 -1
- package/dist/cjs/engine/conversion/index.cjs +1 -1
- package/dist/cjs/engine/keys.cjs +1 -1
- package/dist/cjs/engine/linkage/cycle.cjs +1 -1
- package/dist/cjs/engine/linkage/default-evaluator.cjs +1 -1
- package/dist/cjs/engine/linkage/effects.cjs +1 -1
- package/dist/cjs/engine/linkage/evaluator.cjs +1 -1
- package/dist/cjs/engine/linkage/index.cjs +1 -1
- package/dist/cjs/engine/linkage/operators.cjs +1 -1
- package/dist/cjs/engine/linkage/source-tracking.cjs +1 -1
- package/dist/cjs/engine/linkage/taxonomy.cjs +1 -1
- package/dist/cjs/engine/linkage/validator.cjs +1 -1
- package/dist/cjs/engine/registry/form-field-registry.cjs +1 -1
- package/dist/cjs/engine/schema/column-type.cjs +1 -1
- package/dist/cjs/engine/schema/edit-ops.cjs +1 -1
- package/dist/cjs/engine/schema/permission-bridge.cjs +1 -1
- package/dist/cjs/engine/schema/presentation.cjs +1 -1
- package/dist/cjs/engine/schema/reconcile.cjs +1 -1
- package/dist/cjs/engine/schema/validate.cjs +1 -1
- package/dist/cjs/engine/schema/walk.cjs +1 -1
- package/dist/cjs/engine/validation.cjs +1 -1
- package/dist/cjs/render/form-renderer.cjs +1 -1
- package/dist/cjs/render/stack-style.cjs +1 -1
- package/dist/cjs/render/submit.cjs +1 -1
- package/dist/cjs/runtime/effects.cjs +1 -1
- package/dist/cjs/runtime/runtime-state-controller.cjs +1 -1
- package/dist/cjs/runtime/stabilize-state-map.cjs +1 -1
- package/dist/cjs/store/form-store.cjs +1 -1
- package/dist/cjs/types/index.cjs +1 -1
- package/dist/es/components/button/index.js +18 -18
- package/dist/es/components/checkbox-group-field/index.js +20 -19
- package/dist/es/components/code-editor/code-editor-input.js +1 -1
- package/dist/es/components/code-editor/index.js +31 -31
- package/dist/es/components/containers/index.js +1 -1
- package/dist/es/components/date-field/index.js +4 -2
- package/dist/es/components/display/index.js +1 -1
- package/dist/es/components/field-entries.js +5 -5
- package/dist/es/components/mobile/alert-block.js +1 -1
- package/dist/es/components/mobile/button.js +1 -1
- package/dist/es/components/mobile/checkbox-group.js +18 -18
- package/dist/es/components/mobile/date-adapters.js +1 -1
- package/dist/es/components/mobile/date.js +1 -1
- package/dist/es/components/mobile/daterange.js +1 -1
- package/dist/es/components/mobile/datetime.js +1 -1
- package/dist/es/components/mobile/definitions.js +1 -1
- package/dist/es/components/mobile/divider.js +1 -1
- package/dist/es/components/mobile/input-cell.js +13 -9
- package/dist/es/components/mobile/number.js +30 -35
- package/dist/es/components/mobile/option-group.js +1 -1
- package/dist/es/components/mobile/paragraph.js +1 -1
- package/dist/es/components/mobile/picker-trigger.js +1 -1
- package/dist/es/components/mobile/radio.js +1 -1
- package/dist/es/components/mobile/scope.js +1 -1
- package/dist/es/components/mobile/select.js +1 -1
- package/dist/es/components/mobile/switch.js +43 -19
- package/dist/es/components/mobile/textarea.js +1 -1
- package/dist/es/components/mobile/textfield.js +30 -26
- package/dist/es/components/mobile/theme.js +1 -1
- package/dist/es/components/number-field/index.js +2 -2
- package/dist/es/components/radio-field/index.js +1 -1
- package/dist/es/components/select-field/index.js +1 -1
- package/dist/es/components/switch-field/index.js +1 -1
- package/dist/es/components/textarea-field/index.js +1 -1
- package/dist/es/components/textfield/index.js +29 -28
- package/dist/es/editor/canvas/canvas-field.js +13 -11
- package/dist/es/editor/canvas/canvas.js +259 -248
- package/dist/es/editor/canvas/drop-indicator.js +1 -1
- package/dist/es/editor/canvas/drop-zones.js +31 -23
- package/dist/es/editor/canvas/json-split-view.js +73 -73
- package/dist/es/editor/canvas/mobile-seed-state.js +1 -1
- package/dist/es/editor/canvas/phone-frame.js +1 -1
- package/dist/es/editor/canvas/subform-column-eligibility.js +2 -2
- package/dist/es/editor/canvas/subform-table-cell.js +1 -1
- package/dist/es/editor/context-sources.js +21 -0
- package/dist/es/editor/dnd.js +2 -2
- package/dist/es/editor/editor-layout-context.js +2 -2
- package/dist/es/editor/footer/footer.js +1 -1
- package/dist/es/editor/form-config/form-basics-tab.js +1 -1
- package/dist/es/editor/form-config/form-config-drawer.js +125 -103
- package/dist/es/editor/form-config/linkage-overview.js +96 -0
- package/dist/es/editor/form-config/outline-tab.js +1 -1
- package/dist/es/editor/form-editor.js +94 -90
- package/dist/es/editor/palette/field-groups.js +1 -1
- package/dist/es/editor/palette/palette-group.js +3 -2
- package/dist/es/editor/palette/palette-item.js +1 -1
- package/dist/es/editor/palette/palette-panel.js +1 -1
- package/dist/es/editor/preview-effects.js +1 -1
- package/dist/es/editor/preview-runtime-context.js +3 -3
- package/dist/es/editor/properties/block-layout-section.js +1 -1
- package/dist/es/editor/properties/container-properties.js +16 -24
- package/dist/es/editor/properties/entries/built-ins.js +1 -1
- package/dist/es/editor/properties/entries/checkbox-entry.js +1 -1
- package/dist/es/editor/properties/entries/coerce.js +1 -1
- package/dist/es/editor/properties/entries/entry-field.js +1 -1
- package/dist/es/editor/properties/entries/icon-entry.js +1 -1
- package/dist/es/editor/properties/entries/index.js +10 -9
- package/dist/es/editor/properties/entries/key-entry.js +1 -1
- package/dist/es/editor/properties/entries/linkage/action-editor.js +117 -136
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +13 -14
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +158 -163
- package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +18 -20
- package/dist/es/editor/properties/entries/linkage/expression-input.js +17 -0
- package/dist/es/editor/properties/entries/linkage/index.js +1 -1
- package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +9 -11
- package/dist/es/editor/properties/entries/linkage/mutators.js +13 -13
- package/dist/es/editor/properties/entries/linkage/options.js +4 -4
- package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +30 -20
- package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +29 -32
- package/dist/es/editor/properties/entries/linkage/styles.js +1 -1
- package/dist/es/editor/properties/entries/linkage/trigger-editor.js +10 -11
- package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +12 -13
- package/dist/es/editor/properties/entries/linkage/use-stable-options.js +1 -1
- package/dist/es/editor/properties/entries/number-entry.js +1 -1
- package/dist/es/editor/properties/entries/options-source/index.js +1 -1
- package/dist/es/editor/properties/entries/options-source/source-mutators.js +1 -1
- package/dist/es/editor/properties/entries/select-entry.js +1 -1
- package/dist/es/editor/properties/entries/text-entry.js +1 -1
- package/dist/es/editor/properties/form-data-sources-panel.js +1 -1
- package/dist/es/editor/properties/form-linkage-panel.js +2 -4
- package/dist/es/editor/properties/form-variables-panel.js +4 -4
- package/dist/es/editor/properties/option-editors.js +1 -1
- package/dist/es/editor/properties/panel-header.js +1 -1
- package/dist/es/editor/properties/properties-empty.js +1 -1
- package/dist/es/editor/properties/properties-header.js +1 -1
- package/dist/es/editor/properties/properties-panel.js +9 -9
- package/dist/es/editor/properties/properties-provider.js +6 -10
- package/dist/es/editor/properties/properties-tabs.js +1 -1
- package/dist/es/editor/properties/use-confirmable-kind-switch.js +1 -1
- package/dist/es/editor/remove-node-confirm.js +24 -29
- package/dist/es/editor/schema-apply.js +15 -17
- package/dist/es/editor/styles.js +1 -1
- package/dist/es/editor/toolbar/notify.js +9 -8
- package/dist/es/editor/toolbar/schema-io.js +1 -1
- package/dist/es/editor/toolbar/toolbar.js +29 -24
- package/dist/es/editor/use-editor-shortcuts.js +1 -1
- package/dist/es/editor/validation-summary.js +1 -1
- package/dist/es/engine/assert-never.js +1 -1
- package/dist/es/engine/conversion/index.js +2 -2
- package/dist/es/engine/ids.js +1 -1
- package/dist/es/engine/keys.js +28 -20
- package/dist/es/engine/linkage/cycle.js +6 -6
- package/dist/es/engine/linkage/default-evaluator.js +37 -32
- package/dist/es/engine/linkage/effects.js +13 -12
- package/dist/es/engine/linkage/evaluator.js +50 -47
- package/dist/es/engine/linkage/index.js +9 -8
- package/dist/es/engine/linkage/operators.js +51 -24
- package/dist/es/engine/linkage/source-tracking.js +15 -12
- package/dist/es/engine/linkage/taxonomy.js +12 -12
- package/dist/es/engine/linkage/validator.js +59 -50
- package/dist/es/engine/registry/defaults-mobile.js +1 -1
- package/dist/es/engine/registry/defaults.js +1 -1
- package/dist/es/engine/registry/form-field-registry.js +6 -6
- package/dist/es/engine/schema/column-type.js +20 -25
- package/dist/es/engine/schema/edit-ops.js +14 -11
- package/dist/es/engine/schema/mutate.js +1 -1
- package/dist/es/engine/schema/nodes.js +1 -1
- package/dist/es/engine/schema/permission-bridge.js +17 -22
- package/dist/es/engine/schema/presentation.js +2 -3
- package/dist/es/engine/schema/reconcile.js +4 -8
- package/dist/es/engine/schema/removal-impact.js +1 -1
- package/dist/es/engine/schema/rewrite.js +1 -1
- package/dist/es/engine/schema/validate.js +74 -71
- package/dist/es/engine/schema/walk.js +2 -2
- package/dist/es/engine/validation.js +15 -11
- package/dist/es/icons.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/render/chrome/mobile-chrome.js +1 -1
- package/dist/es/render/chrome/pc-chrome.js +1 -1
- package/dist/es/render/chrome/subform-shell.js +1 -1
- package/dist/es/render/data-source-context.js +0 -0
- package/dist/es/render/flex-style.js +1 -1
- package/dist/es/render/form-field.js +1 -1
- package/dist/es/render/form-renderer.js +180 -217
- package/dist/es/render/grid-style.js +1 -1
- package/dist/es/render/parts/field-shell.js +1 -1
- package/dist/es/render/parts/label.js +1 -1
- package/dist/es/render/parts/options-status.js +1 -1
- package/dist/es/render/stack-style.js +2 -2
- package/dist/es/render/subform-columns.js +1 -1
- package/dist/es/render/submit.js +6 -6
- package/dist/es/runtime/effects.js +37 -34
- package/dist/es/runtime/resolve-scope-values.js +1 -1
- package/dist/es/runtime/runtime-context.js +1 -1
- package/dist/es/runtime/runtime-state-controller.js +8 -8
- package/dist/es/runtime/stabilize-state-map.js +5 -3
- package/dist/es/store/engine-provider.js +1 -1
- package/dist/es/store/form-store.js +14 -8
- package/dist/es/types/chrome.js +1 -1
- package/dist/es/types/component.js +1 -1
- package/dist/es/types/data-source.js +1 -1
- package/dist/es/types/index.js +6 -5
- package/dist/es/types/linkage.js +1 -1
- package/dist/es/types/properties.js +1 -1
- package/dist/es/types/schema.js +1 -1
- package/dist/types/components/mobile/input-cell.d.ts +5 -0
- package/dist/types/components/mobile/switch.d.ts +9 -8
- package/dist/types/components/mobile/textfield.d.ts +3 -0
- package/dist/types/editor/canvas/drop-zones.d.ts +12 -1
- package/dist/types/editor/context-sources.d.ts +19 -0
- package/dist/types/editor/dnd.d.ts +5 -4
- package/dist/types/editor/form-config/linkage-overview.d.ts +8 -0
- package/dist/types/editor/form-editor.d.ts +12 -4
- package/dist/types/editor/preview-runtime-context.d.ts +3 -3
- package/dist/types/editor/properties/entries/linkage/action-editor.d.ts +0 -5
- package/dist/types/editor/properties/entries/linkage/actions-editor.d.ts +0 -5
- package/dist/types/editor/properties/entries/linkage/condition-editor.d.ts +1 -6
- package/dist/types/editor/properties/entries/linkage/expression-input.d.ts +22 -0
- package/dist/types/editor/properties/entries/linkage/rule-diagnostics.d.ts +10 -0
- package/dist/types/editor/properties/entries/linkage/rule-list-editor.d.ts +0 -5
- package/dist/types/editor/properties/entries/linkage/trigger-editor.d.ts +0 -5
- package/dist/types/editor/properties/entries/linkage/use-linkage-editor-model.d.ts +5 -10
- package/dist/types/editor/properties/entries/linkage/use-stable-options.d.ts +4 -4
- package/dist/types/editor/properties/form-variables-panel.d.ts +1 -1
- package/dist/types/editor/toolbar/notify.d.ts +17 -1
- package/dist/types/engine/keys.d.ts +11 -1
- package/dist/types/engine/linkage/default-evaluator.d.ts +6 -7
- package/dist/types/engine/linkage/effects.d.ts +2 -2
- package/dist/types/engine/linkage/evaluator.d.ts +12 -6
- package/dist/types/engine/linkage/index.d.ts +1 -1
- package/dist/types/engine/linkage/operators.d.ts +7 -5
- package/dist/types/engine/linkage/taxonomy.d.ts +4 -3
- package/dist/types/engine/registry/form-field-registry.d.ts +1 -1
- package/dist/types/engine/schema/permission-bridge.d.ts +7 -0
- package/dist/types/engine/validation.d.ts +7 -1
- package/dist/types/render/form-renderer.d.ts +6 -7
- package/dist/types/render/submit.d.ts +4 -4
- package/dist/types/runtime/effects.d.ts +3 -3
- package/dist/types/runtime/runtime-state-controller.d.ts +5 -5
- package/dist/types/store/form-store.d.ts +7 -0
- package/dist/types/types/linkage.d.ts +30 -10
- package/dist/types/types/schema.d.ts +1 -1
- package/package.json +6 -12
- package/dist/cjs/editor/properties/entries/linkage/expression-assist.cjs +0 -1
- package/dist/es/editor/properties/entries/linkage/expression-assist.js +0 -86
- package/dist/types/editor/properties/entries/linkage/expression-assist.d.ts +0 -33
- package/dist/types/editor/properties/entries/linkage/expression-assist.test.d.ts +0 -1
- package/dist/types/test-expression-engine.d.ts +0 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { Label as e } from "./label.js";
|
|
3
3
|
import { Fragment as t, jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { css as i } from "@emotion/react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { jsx as e, jsxs as t } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { css as n } from "@emotion/react";
|
|
4
4
|
import { globalCssVars as r } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { errorTextCss as e, helperTextCss as t } from "./field-shell.js";
|
|
3
3
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/render/parts/options-status.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { DEFAULT_GAP_SCALE as e } from "../types/schema.js";
|
|
3
3
|
//#region src/render/stack-style.ts
|
|
4
4
|
var t = {
|
|
@@ -10,4 +10,4 @@ function r(e, n) {
|
|
|
10
10
|
return e === void 0 ? n : t[e];
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export { n as DEFAULT_STACK_GAP, r as resolveStackGap };
|
|
13
|
+
export { n as DEFAULT_STACK_GAP, t as GAP_SCALE_PX, r as resolveStackGap };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { isContainerNode as e } from "../engine/schema/walk.js";
|
|
3
3
|
import { isKeyedField as t, isValidatableField as n } from "../engine/keys.js";
|
|
4
4
|
import { validateKeyedFieldValue as r } from "./submit.js";
|
package/dist/es/render/submit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { containerBodies as e } from "../engine/schema/nodes.js";
|
|
3
3
|
import { isContainerNode as t, walkNodes as n } from "../engine/schema/walk.js";
|
|
4
4
|
import { isKeyedNode as r, isValidatableField as i } from "../engine/keys.js";
|
|
@@ -22,7 +22,7 @@ function l(n, i, a, o) {
|
|
|
22
22
|
function u(e) {
|
|
23
23
|
let t = {
|
|
24
24
|
evaluators: e.evaluators,
|
|
25
|
-
|
|
25
|
+
evaluationContext: e.evaluationContext
|
|
26
26
|
}, n = {};
|
|
27
27
|
return l(e.blocks, e.values, t, (t, r) => {
|
|
28
28
|
if (!r.hidden) if (t.type === "subform") {
|
|
@@ -30,7 +30,7 @@ function u(e) {
|
|
|
30
30
|
n[t.key] = i.map((n) => u({
|
|
31
31
|
blocks: t.template,
|
|
32
32
|
evaluators: e.evaluators,
|
|
33
|
-
|
|
33
|
+
evaluationContext: e.evaluationContext,
|
|
34
34
|
values: b(n)
|
|
35
35
|
}));
|
|
36
36
|
} else n[t.key] = e.values[t.key];
|
|
@@ -41,7 +41,7 @@ function d(e) {
|
|
|
41
41
|
if (e.disabled) return t;
|
|
42
42
|
let n = {
|
|
43
43
|
evaluators: e.evaluators,
|
|
44
|
-
|
|
44
|
+
evaluationContext: e.evaluationContext
|
|
45
45
|
};
|
|
46
46
|
return f(e.blocks, e.values, e.namePrefix, n, t), t;
|
|
47
47
|
}
|
|
@@ -61,7 +61,7 @@ function p(e) {
|
|
|
61
61
|
if (e.disabled) return;
|
|
62
62
|
let t = c(e.values, e.namePrefix), n = s(e.field, t, {
|
|
63
63
|
evaluators: e.evaluators,
|
|
64
|
-
|
|
64
|
+
evaluationContext: e.evaluationContext
|
|
65
65
|
});
|
|
66
66
|
if (!(n.hidden || n.disabled)) return m(e.field, h(e.field, n), e.value);
|
|
67
67
|
}
|
|
@@ -109,4 +109,4 @@ function b(e) {
|
|
|
109
109
|
return typeof e == "object" && e ? e : {};
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
|
-
export { v as blankSubformRow, y as buildRuntimeFormId, d as collectSubmitErrors, u as filterSubmitValues, h as isRuntimeRequired, m as validateKeyedFieldValue, p as validateRuntimeField };
|
|
112
|
+
export { v as blankSubformRow, y as buildRuntimeFormId, d as collectSubmitErrors, u as filterSubmitValues, h as isRuntimeRequired, g as validateFieldConstraints, m as validateKeyedFieldValue, p as validateRuntimeField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import "../engine/assert-never.js";
|
|
3
3
|
import { resolveLinkageEvaluators as e } from "../engine/linkage/default-evaluator.js";
|
|
4
4
|
import { resolveActionValue as t } from "../engine/linkage/evaluator.js";
|
|
@@ -21,67 +21,70 @@ function h({ children: e, run: t }) {
|
|
|
21
21
|
async function g(e) {
|
|
22
22
|
let n = i(e.form.store.state.values, e.prefix), r = {
|
|
23
23
|
values: n,
|
|
24
|
-
resolveValue: (r) => t(r, n, e.evaluators, e.
|
|
24
|
+
resolveValue: (r) => t(r, n, e.evaluators, e.evaluationContext)
|
|
25
25
|
}, a = [];
|
|
26
|
-
for (let t of e.actions)
|
|
26
|
+
for (let t of e.actions) _(t, e, r, a);
|
|
27
|
+
await Promise.all(a);
|
|
28
|
+
}
|
|
29
|
+
function _(e, t, n, r) {
|
|
30
|
+
switch (e.type) {
|
|
27
31
|
case "set_field": {
|
|
28
|
-
let
|
|
29
|
-
f(
|
|
32
|
+
let r = `${t.prefix}${e.targetKey}`, i = n.resolveValue(e.value);
|
|
33
|
+
f(t.form.getFieldValue(r), i) || t.form.setFieldValue(r, i, {
|
|
30
34
|
dontRunListeners: !0,
|
|
31
35
|
dontUpdateMeta: !0
|
|
32
36
|
});
|
|
33
|
-
|
|
37
|
+
return;
|
|
34
38
|
}
|
|
35
39
|
case "set_variable":
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
t.sinks.setVariable(e.variable, n.resolveValue(e.value));
|
|
41
|
+
return;
|
|
38
42
|
case "refresh_data_source":
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
t.sinks.refreshDataSource(e.dataSourceId);
|
|
44
|
+
return;
|
|
41
45
|
case "submit":
|
|
42
|
-
|
|
46
|
+
t.form.handleSubmit().catch((e) => {
|
|
43
47
|
console.error("[form-editor] submit effect failed:", e);
|
|
44
48
|
});
|
|
45
|
-
|
|
49
|
+
return;
|
|
46
50
|
case "reset":
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
t.form.reset();
|
|
52
|
+
return;
|
|
49
53
|
case "alert":
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
r.push(Promise.resolve(t.evaluators.dispatchEffect(e, n)));
|
|
55
|
+
return;
|
|
52
56
|
case "api_call":
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
r.push(Promise.resolve(t.evaluators.dispatchEffect(e, n)));
|
|
58
|
+
return;
|
|
55
59
|
case "navigate":
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
default:
|
|
60
|
+
r.push(Promise.resolve(t.evaluators.dispatchEffect(e, n)));
|
|
61
|
+
return;
|
|
62
|
+
default:
|
|
59
63
|
}
|
|
60
|
-
await Promise.all(a);
|
|
61
64
|
}
|
|
62
|
-
function
|
|
65
|
+
function v(t) {
|
|
63
66
|
return t.actions.length === 0 ? Promise.resolve() : g({
|
|
64
67
|
actions: t.actions,
|
|
65
68
|
evaluators: e(t.evaluators),
|
|
66
|
-
|
|
69
|
+
evaluationContext: t.evaluationContext,
|
|
67
70
|
form: t.form,
|
|
68
71
|
prefix: "",
|
|
69
72
|
sinks: t.sinks
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
|
-
function
|
|
75
|
+
function y(e, t) {
|
|
73
76
|
return e.length === 0 ? null : e.map((e) => t[e]);
|
|
74
77
|
}
|
|
75
|
-
function
|
|
76
|
-
let { evaluators: i,
|
|
77
|
-
C.current !==
|
|
78
|
+
function b(t) {
|
|
79
|
+
let { evaluators: i, evaluationContext: a, form: o, prefix: s, schema: p, sinks: m, values: h } = t, _ = u(() => e(i), [i]), v = u(() => n(p), [p]), b = d(null), x = d(null), S = d(null), C = d(v);
|
|
80
|
+
C.current !== v && (C.current = v, b.current = null, x.current = null);
|
|
78
81
|
let w = d(a);
|
|
79
82
|
w.current = a;
|
|
80
83
|
let T = c((e) => {
|
|
81
84
|
e.length > 0 && g({
|
|
82
85
|
actions: e,
|
|
83
86
|
evaluators: _,
|
|
84
|
-
|
|
87
|
+
evaluationContext: w.current,
|
|
85
88
|
form: o,
|
|
86
89
|
prefix: s,
|
|
87
90
|
sinks: m
|
|
@@ -95,16 +98,16 @@ function y(t) {
|
|
|
95
98
|
m
|
|
96
99
|
]);
|
|
97
100
|
return l(() => {
|
|
98
|
-
if (
|
|
99
|
-
let e = r(
|
|
100
|
-
if (b.current = e, x.current = t, S.current = h, n) for (let [r, a] of
|
|
101
|
+
if (v.length === 0) return;
|
|
102
|
+
let e = r(v, h, _, a), t = v.map((e) => e.alwaysActions.length > 0 ? y(e.sourceKeys, h) : null), n = b.current, i = x.current, o = S.current;
|
|
103
|
+
if (b.current = e, x.current = t, S.current = h, n) for (let [r, a] of v.entries()) e[r] && (n[r] ? a.alwaysActions.length > 0 && (t[r] === null ? h !== o : !f(t[r], i?.[r])) && T(a.alwaysActions) : T(a.actions));
|
|
101
104
|
}, [
|
|
102
105
|
h,
|
|
103
|
-
|
|
106
|
+
v,
|
|
104
107
|
_,
|
|
105
108
|
a,
|
|
106
109
|
T
|
|
107
110
|
]), T;
|
|
108
111
|
}
|
|
109
112
|
//#endregion
|
|
110
|
-
export { h as EffectDispatchProvider,
|
|
113
|
+
export { h as EffectDispatchProvider, v as dispatchFormEffects, m as useEffectDispatch, b as useScopeEffects };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
//#region src/runtime/resolve-scope-values.ts
|
|
3
3
|
function e(e, t) {
|
|
4
4
|
if (t === "") return e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { emptyRuntimeState as e } from "../engine/linkage/evaluator.js";
|
|
3
3
|
import { createContextWithSelector as t } from "@vef-framework-react/core";
|
|
4
4
|
//#region src/runtime/runtime-context.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { isRootScope as e, walkFields as t } from "../engine/schema/walk.js";
|
|
3
3
|
import { isKeyedField as n } from "../engine/keys.js";
|
|
4
4
|
import { evaluateRuntimeStates as r } from "../engine/linkage/evaluator.js";
|
|
@@ -11,10 +11,10 @@ import { useFormStore as u } from "@vef-framework-react/components";
|
|
|
11
11
|
import { useEffect as d, useRef as f } from "react";
|
|
12
12
|
import { isDeepEqual as p } from "@vef-framework-react/shared";
|
|
13
13
|
//#region src/runtime/runtime-state-controller.tsx
|
|
14
|
-
function m({ children: e, evaluators: t,
|
|
14
|
+
function m({ children: e, evaluators: t, evaluationContext: n, form: i, prefix: u, schema: p, sinks: m, values: h }) {
|
|
15
15
|
let g = f(void 0), v = r(p, h, {
|
|
16
16
|
evaluators: t,
|
|
17
|
-
|
|
17
|
+
evaluationContext: n
|
|
18
18
|
}), y = c(g.current, v);
|
|
19
19
|
g.current = y;
|
|
20
20
|
let b = f(null);
|
|
@@ -24,7 +24,7 @@ function m({ children: e, evaluators: t, expressionContext: n, form: i, prefix:
|
|
|
24
24
|
});
|
|
25
25
|
let x = b.current.applied, S = o({
|
|
26
26
|
evaluators: t,
|
|
27
|
-
|
|
27
|
+
evaluationContext: n,
|
|
28
28
|
form: i,
|
|
29
29
|
prefix: u,
|
|
30
30
|
schema: p,
|
|
@@ -53,10 +53,10 @@ function m({ children: e, evaluators: t, expressionContext: n, form: i, prefix:
|
|
|
53
53
|
})
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function h({ children: e, evaluators: t,
|
|
56
|
+
function h({ children: e, evaluators: t, evaluationContext: n, form: r, schema: i, sinks: a }) {
|
|
57
57
|
return /* @__PURE__ */ l(m, {
|
|
58
|
+
evaluationContext: n,
|
|
58
59
|
evaluators: t,
|
|
59
|
-
expressionContext: n,
|
|
60
60
|
form: r,
|
|
61
61
|
prefix: "",
|
|
62
62
|
schema: i,
|
|
@@ -65,10 +65,10 @@ function h({ children: e, evaluators: t, expressionContext: n, form: r, schema:
|
|
|
65
65
|
children: e
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function g({ children: e, evaluators: t,
|
|
68
|
+
function g({ children: e, evaluators: t, evaluationContext: n, form: r, prefix: a, sinks: o, templateSchema: s }) {
|
|
69
69
|
return /* @__PURE__ */ l(m, {
|
|
70
|
+
evaluationContext: n,
|
|
70
71
|
evaluators: t,
|
|
71
|
-
expressionContext: n,
|
|
72
72
|
form: r,
|
|
73
73
|
prefix: a,
|
|
74
74
|
schema: s,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { isDeepEqual as e } from "@vef-framework-react/shared";
|
|
3
3
|
//#region src/runtime/stabilize-state-map.ts
|
|
4
4
|
function t(t, n) {
|
|
5
5
|
if (!t) return n;
|
|
6
6
|
let r = {}, i = Object.keys(n), a = !1;
|
|
7
7
|
for (let o of i) {
|
|
8
|
-
let i = n[o]
|
|
9
|
-
|
|
8
|
+
let i = n[o];
|
|
9
|
+
if (i === void 0) continue;
|
|
10
|
+
let s = t[o];
|
|
11
|
+
s !== void 0 && e(s, i) ? r[o] = s : (r[o] = i, a = !0);
|
|
10
12
|
}
|
|
11
13
|
return !a && i.length === Object.keys(t).length ? t : r;
|
|
12
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { createContext as t, use as n, useCallback as r, useSyncExternalStore as i } from "react";
|
|
4
4
|
//#region src/store/engine-provider.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
import { createId as e, idPrefixForType as t } from "../engine/ids.js";
|
|
3
3
|
import { createEmptySchema as n } from "../engine/schema/nodes.js";
|
|
4
4
|
import { countFields as r, findField as i, findNode as a, findScope as o, scopeEquals as s, walkNodes as c } from "../engine/schema/walk.js";
|
|
@@ -56,6 +56,12 @@ var R = P("FormEditor", (e, t) => {
|
|
|
56
56
|
future: []
|
|
57
57
|
});
|
|
58
58
|
},
|
|
59
|
+
clearSchema: () => {
|
|
60
|
+
d(), e({
|
|
61
|
+
schema: n(),
|
|
62
|
+
selectedId: null
|
|
63
|
+
});
|
|
64
|
+
},
|
|
59
65
|
patchSchema: (n) => {
|
|
60
66
|
let { device: r, schema: i } = t(), { gap: a, ...o } = n, s = Object.keys(o).some((e) => i[e] !== o[e]), c = "gap" in n && T(i, r).gap !== a;
|
|
61
67
|
if (!s && !c) return;
|
|
@@ -68,7 +74,7 @@ var R = P("FormEditor", (e, t) => {
|
|
|
68
74
|
"linkage",
|
|
69
75
|
"variables",
|
|
70
76
|
"dataSources"
|
|
71
|
-
]) e
|
|
77
|
+
]) Object.hasOwn(o, e) && o[e] === void 0 && delete l[e];
|
|
72
78
|
if (c) {
|
|
73
79
|
let t = { ...T(l, r) };
|
|
74
80
|
a === void 0 ? delete t.gap : t.gap = a, e({ schema: E(l, r, t) });
|
|
@@ -179,15 +185,15 @@ var R = P("FormEditor", (e, t) => {
|
|
|
179
185
|
},
|
|
180
186
|
setSpan: ({ nodeId: n, span: r }) => {
|
|
181
187
|
let { device: i, schema: a } = t(), o = T(a, i), s = C(o, n, r);
|
|
182
|
-
s !== o && (
|
|
188
|
+
s !== o && (P(`span:${n}`), e({ schema: E(a, i, s) }));
|
|
183
189
|
},
|
|
184
190
|
setFlex: ({ nodeId: n, flex: r }) => {
|
|
185
191
|
let { device: i, schema: a } = t(), o = T(a, i), s = S(o, n, r);
|
|
186
|
-
s !== o && (
|
|
192
|
+
s !== o && (P(`flex:${n}`), e({ schema: E(a, i, s) }));
|
|
187
193
|
},
|
|
188
194
|
setColumnWidth: ({ nodeId: n, width: r }) => {
|
|
189
195
|
let { device: i, schema: a } = t(), o = T(a, i), s = x(o, n, r);
|
|
190
|
-
s !== o && (
|
|
196
|
+
s !== o && (P(`column-width:${n}`), e({ schema: E(a, i, s) }));
|
|
191
197
|
},
|
|
192
198
|
editField: ({ fieldId: n, updater: r }, i) => {
|
|
193
199
|
let { device: a, schema: o } = t(), s = T(o, a), c = h(s, n, r);
|
|
@@ -219,7 +225,7 @@ var R = P("FormEditor", (e, t) => {
|
|
|
219
225
|
},
|
|
220
226
|
renameVariable: (n, r) => {
|
|
221
227
|
let { schema: i } = t(), a = i.variables ?? [];
|
|
222
|
-
r === n || !N(r) ||
|
|
228
|
+
r === n || !N(r) || a.every((e) => e.name !== n) || a.some((e) => e.name === r) || (d(), e({ schema: {
|
|
223
229
|
...M(i, n, r),
|
|
224
230
|
variables: a.map((e) => e.name === n ? {
|
|
225
231
|
...e,
|
|
@@ -229,7 +235,7 @@ var R = P("FormEditor", (e, t) => {
|
|
|
229
235
|
},
|
|
230
236
|
removeVariable: (n) => {
|
|
231
237
|
let { schema: r } = t(), i = r.variables ?? [];
|
|
232
|
-
if (
|
|
238
|
+
if (i.every((e) => e.name !== n)) return;
|
|
233
239
|
let a = i.filter((e) => e.name !== n), o = {
|
|
234
240
|
...r,
|
|
235
241
|
variables: a
|
|
@@ -238,7 +244,7 @@ var R = P("FormEditor", (e, t) => {
|
|
|
238
244
|
},
|
|
239
245
|
removeDataSource: (n) => {
|
|
240
246
|
let { schema: r } = t(), i = r.dataSources ?? [];
|
|
241
|
-
if (
|
|
247
|
+
if (i.every((e) => e.id !== n)) return;
|
|
242
248
|
let a = i.filter((e) => e.id !== n), o = {
|
|
243
249
|
...D(r, n),
|
|
244
250
|
dataSources: a
|
package/dist/es/types/chrome.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
2
|
//#region src/types/data-source.ts
|
|
3
3
|
var e = { resolve: () => Promise.resolve([]) };
|
|
4
4
|
//#endregion
|
package/dist/es/types/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
2
|
-
import "./component.js";
|
|
3
|
-
import "./data-source.js";
|
|
4
|
-
import "./properties.js";
|
|
5
|
-
import "./schema.js";
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
|
2
|
+
import { defineContainerDefinition as e, defineFieldDefinition as t } from "./component.js";
|
|
3
|
+
import { noopDataSourceResolver as n } from "./data-source.js";
|
|
4
|
+
import { definePropertyEntry as r } from "./properties.js";
|
|
5
|
+
import { CONTAINER_TYPES as i, DEFAULT_GAP_SCALE as a, GAP_SCALES as o, ROW_COLS as s } from "./schema.js";
|
|
6
|
+
export { i as CONTAINER_TYPES, a as DEFAULT_GAP_SCALE, o as GAP_SCALES, s as ROW_COLS, e as defineContainerDefinition, t as defineFieldDefinition, r as definePropertyEntry, n as noopDataSourceResolver };
|
package/dist/es/types/linkage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.8.0 made by Venus | 2026-07-07T01:43:36.017Z */
|
package/dist/es/types/schema.js
CHANGED
|
@@ -13,6 +13,11 @@ import { SerializedStyles } from '@emotion/serialize';
|
|
|
13
13
|
export declare const inputCellCss: SerializedStyles;
|
|
14
14
|
export declare const inputCellErrorCss: SerializedStyles;
|
|
15
15
|
export declare const inputCellDisabledCss: SerializedStyles;
|
|
16
|
+
/**
|
|
17
|
+
* A prefix / suffix adornment inside the cell (a unit label, a leading icon).
|
|
18
|
+
* Shared by the free-text fields so their affixes align identically.
|
|
19
|
+
*/
|
|
20
|
+
export declare const inputCellAffixCss: SerializedStyles;
|
|
16
21
|
export interface InputCellProps {
|
|
17
22
|
children: ReactNode;
|
|
18
23
|
disabled?: boolean;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { FieldComponentProps, SwitchField } from '../../types';
|
|
3
3
|
/**
|
|
4
|
-
* Mobile renderer for the switch field. Stores the same `boolean` value
|
|
5
|
-
* `SwitchInput`
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Mobile renderer for the switch field. Stores the same `boolean` value and
|
|
5
|
+
* mirrors the PC `SwitchInput` layout (`components/switch-field/index.tsx`):
|
|
6
|
+
* the label sits inline to the toggle's right — a switch is not an input-like
|
|
7
|
+
* field, so it does not use {@link FieldShell} (whose label-column layouts are
|
|
8
|
+
* built for text-style controls) on either device.
|
|
8
9
|
*
|
|
9
|
-
* antd-mobile's `Switch` renders a `role="switch"` element
|
|
10
|
-
* so the
|
|
11
|
-
* accessible via its own `aria-checked`. `onChange(checked)` maps directly
|
|
12
|
-
* the field's boolean value.
|
|
10
|
+
* antd-mobile's `Switch` renders a `role="switch"` element with no labelable
|
|
11
|
+
* `id`, so the inline label is presentational while the control stays
|
|
12
|
+
* accessible via its own `aria-checked`. `onChange(checked)` maps directly
|
|
13
|
+
* onto the field's boolean value.
|
|
13
14
|
*/
|
|
14
15
|
export declare const MobileSwitch: FC<FieldComponentProps<SwitchField, boolean>>;
|
|
@@ -7,5 +7,8 @@ import { FieldComponentProps, TextfieldField } from '../../types';
|
|
|
7
7
|
* wiring through {@link FieldShell}. Only the control differs — an antd-mobile
|
|
8
8
|
* `Input` (borderless by design, so it wears the shared {@link InputCell})
|
|
9
9
|
* whose `onChange(string)` maps directly onto the field's string value.
|
|
10
|
+
* antd-mobile's `Input` has no affix slot, so `prefixIcon` renders as a leading
|
|
11
|
+
* cell adornment — the same pattern the mobile number field uses for its
|
|
12
|
+
* `prefix` / `suffix` text.
|
|
10
13
|
*/
|
|
11
14
|
export declare const MobileTextfield: FC<FieldComponentProps<TextfieldField, string>>;
|
|
@@ -48,12 +48,23 @@ export interface InlineSlot {
|
|
|
48
48
|
block: Block;
|
|
49
49
|
beside: DropZoneDescriptor[];
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* AND-compose two acceptance tests, treating an absent one as "accept all".
|
|
53
|
+
* Lets a caller layer its own test (the table's column eligibility) over a
|
|
54
|
+
* descriptor's built-in self-anchor suppression instead of replacing it.
|
|
55
|
+
*/
|
|
56
|
+
export declare function composeAccept(a: DropZoneAccept | undefined, b: DropZoneAccept | undefined): DropZoneAccept;
|
|
51
57
|
/**
|
|
52
58
|
* Describe an inline body (flex / grid) as a list of slots with their beside
|
|
53
59
|
* zones. The N+1 dedup that every inline container would otherwise re-implement
|
|
54
60
|
* is done once here, so a new inline container inherits it by passing its blocks.
|
|
61
|
+
*
|
|
62
|
+
* `orientation` is the axis the indicators render on and must match the body's
|
|
63
|
+
* actual layout axis: a row of slots gets `"vertical"` edge bands (the
|
|
64
|
+
* default), a column-direction flex gets `"horizontal"` ones — a left/right
|
|
65
|
+
* hairline on a top-to-bottom stack would point at the wrong insertion axis.
|
|
55
66
|
*/
|
|
56
|
-
export declare function inlineSlots(blocks: Block[]): InlineSlot[];
|
|
67
|
+
export declare function inlineSlots(blocks: Block[], orientation?: ZoneOrientation): InlineSlot[];
|
|
57
68
|
/**
|
|
58
69
|
* Describe the gap zone that precedes a stacked block. A stack body has one such
|
|
59
70
|
* zone per block (insert before that block); appending after the last block is
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LinkageContextSource } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Publishes the host's declared global-context sources (see
|
|
5
|
+
* {@link LinkageContextSource}) to the visual condition builder, which offers
|
|
6
|
+
* them as leaf-condition sources beside the form's own fields. Deliberately a
|
|
7
|
+
* dedicated context rather than a slot on the preview runtime: this is
|
|
8
|
+
* design-time metadata for the pick list, not a runtime capability —
|
|
9
|
+
* evaluation reads the live `evaluationContext` regardless of what is
|
|
10
|
+
* declared here.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ContextSourcesProvider({ children, sources }: {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
sources: LinkageContextSource[] | undefined;
|
|
15
|
+
}): ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The host-declared global-context sources, empty when none were provided.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useContextSources(): LinkageContextSource[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DragEndEvent, KeyboardSensor, PointerSensor } from '@vef-framework-react/core';
|
|
2
|
-
import { PluginDescriptor } from '@dnd-kit/abstract';
|
|
2
|
+
import { PluginDescriptor, Plugin } from '@dnd-kit/abstract';
|
|
3
|
+
import { PointerSensorOptions } from '@dnd-kit/dom';
|
|
3
4
|
/**
|
|
4
5
|
* Shared drag-and-drop contract for the editor canvas, built on dnd-kit v0.4.
|
|
5
6
|
*
|
|
@@ -18,7 +19,7 @@ import { PluginDescriptor } from '@dnd-kit/abstract';
|
|
|
18
19
|
* interactive-element gating is preserved. Module-scoped so the descriptor
|
|
19
20
|
* keeps a stable identity across renders.
|
|
20
21
|
*/
|
|
21
|
-
export declare const editorPointerSensor: PluginDescriptor<any, any, typeof PointerSensor>;
|
|
22
|
+
export declare const editorPointerSensor: PluginDescriptor<any, Plugin<any, PointerSensorOptions>, typeof PointerSensor>;
|
|
22
23
|
/**
|
|
23
24
|
* Sensors for the editor's `DragDropProvider`: the gated pointer sensor plus
|
|
24
25
|
* keyboard dragging (pick a canvas block up with Enter on its grip, move it
|
|
@@ -26,7 +27,7 @@ export declare const editorPointerSensor: PluginDescriptor<any, any, typeof Poin
|
|
|
26
27
|
* {@link palettePointerSensors} — on a palette card, Enter/Space mean
|
|
27
28
|
* "append", not "pick up".
|
|
28
29
|
*/
|
|
29
|
-
export declare const editorSensors: ( PluginDescriptor<any, any, typeof PointerSensor> | typeof KeyboardSensor)[];
|
|
30
|
+
export declare const editorSensors: ( PluginDescriptor<any, Plugin<any, PointerSensorOptions>, typeof PointerSensor> | typeof KeyboardSensor)[];
|
|
30
31
|
/**
|
|
31
32
|
* Per-source sensor list for palette items: pointer only. dnd-kit's
|
|
32
33
|
* KeyboardSensor activates on Enter/Space and swallows the event
|
|
@@ -35,7 +36,7 @@ export declare const editorSensors: ( PluginDescriptor<any, any, typeof PointerS
|
|
|
35
36
|
* field — to ever fire. Canvas blocks keep the full {@link editorSensors},
|
|
36
37
|
* so keyboard-driven moving stays available where it is meaningful.
|
|
37
38
|
*/
|
|
38
|
-
export declare const palettePointerSensors: PluginDescriptor<any, any, typeof PointerSensor>[];
|
|
39
|
+
export declare const palettePointerSensors: PluginDescriptor<any, Plugin<any, PointerSensorOptions>, typeof PointerSensor>[];
|
|
39
40
|
/**
|
|
40
41
|
* Data attached to a draggable.
|
|
41
42
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Read-only index of every node on the active layer that carries linkage
|
|
4
|
+
* rules — the field-level share of the footer's "联动" count. Rules are
|
|
5
|
+
* authored per field, so each row simply selects its node: the properties
|
|
6
|
+
* panel then shows the field whose 联动 tab owns the rules.
|
|
7
|
+
*/
|
|
8
|
+
export declare function LinkageOverview(): ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, Ref } from 'react';
|
|
2
2
|
import { DeviceRegistries, FormFieldRegistry } from '../engine/registry/form-field-registry';
|
|
3
3
|
import { EditorDeviceMode, EditorViewMode } from '../store/form-store';
|
|
4
|
-
import { DataSourceResolver,
|
|
4
|
+
import { DataSourceResolver, EvaluationContext, FormSchema, LinkageContextSource, LinkageEvaluators } from '../types';
|
|
5
5
|
import { ToolbarBrand, Toolbar } from './toolbar/toolbar';
|
|
6
6
|
import { PalettePanel } from './palette/palette-panel';
|
|
7
7
|
import { PropertiesPanel } from './properties/properties-panel';
|
|
@@ -51,10 +51,18 @@ export interface FormEditorProviderProps {
|
|
|
51
51
|
*/
|
|
52
52
|
dataSourceResolver?: DataSourceResolver;
|
|
53
53
|
/**
|
|
54
|
-
* Host
|
|
54
|
+
* Host evaluation scope (`$user` / `$node`, variable overrides), forwarded to
|
|
55
55
|
* the live preview so host-context expressions evaluate truthfully.
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
evaluationContext?: EvaluationContext;
|
|
58
|
+
/**
|
|
59
|
+
* Host-declared global-context properties the visual condition builder
|
|
60
|
+
* offers as leaf-condition sources beside the form's own fields — e.g.
|
|
61
|
+
* `{ key: "$user.departmentId", label: "发起人部门" }`. Pure design-time
|
|
62
|
+
* metadata: the runtime resolves the path against `evaluationContext`
|
|
63
|
+
* whether or not it was declared here.
|
|
64
|
+
*/
|
|
65
|
+
contextSources?: LinkageContextSource[];
|
|
58
66
|
onSchemaChange?: (schema: FormSchema) => void;
|
|
59
67
|
/**
|
|
60
68
|
* Curated imperative handle — lets a host shell read/replace the schema and
|
|
@@ -72,7 +80,7 @@ export interface FormEditorProviderProps {
|
|
|
72
80
|
* render; updating them afterwards has no effect (editor state is bootstrapped
|
|
73
81
|
* once per mount — use {@link FormEditorApi.setSchema} to replace the schema).
|
|
74
82
|
*/
|
|
75
|
-
export declare function FormEditorProvider({ apiRef, children, dataSourceResolver, evaluators,
|
|
83
|
+
export declare function FormEditorProvider({ apiRef, children, contextSources, dataSourceResolver, evaluators, evaluationContext, initialSchema, onSchemaChange, registries: registriesProp, registry: registryProp }: FormEditorProviderProps): ReactElement;
|
|
76
84
|
export interface FormEditorShellProps {
|
|
77
85
|
children: ReactNode;
|
|
78
86
|
}
|