@vef-framework-react/form-editor 2.5.0 → 2.7.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/radio-field/index.cjs +1 -1
- package/dist/cjs/components/select-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 -0
- 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/index.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 +22 -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 +28 -16
- package/dist/es/components/radio-field/index.js +30 -18
- package/dist/es/components/select-field/index.js +28 -16
- 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 +97 -91
- 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 +61 -55
- 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 +38 -0
- 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 +4 -3
- 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/field-entries.d.ts +15 -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 +23 -5
- 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/editor/toolbar/toolbar.d.ts +9 -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/column-type.d.ts +30 -0
- package/dist/types/engine/validation.d.ts +7 -1
- package/dist/types/index.d.ts +1 -0
- 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 +15 -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/test-expression-engine.d.ts +0 -25
- /package/dist/types/{editor/properties/entries/linkage/expression-assist.test.d.ts → engine/schema/column-type.test.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
2
2
|
import { CheckboxEntry as e } from "./checkbox-entry.js";
|
|
3
3
|
import { IconEntry as t } from "./icon-entry.js";
|
|
4
4
|
import { KeyEntry as n } from "./key-entry.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
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 { Checkbox as r, globalCssVars as i } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
2
2
|
import { isNullish as e, isString as t } from "@vef-framework-react/shared";
|
|
3
3
|
//#region src/editor/properties/entries/coerce.ts
|
|
4
4
|
function n(n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
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.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
2
2
|
import { EntryField as e } from "./entry-field.js";
|
|
3
3
|
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { IconPicker as n } from "@vef-framework-react/components";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
2
|
-
import "./linkage/linkage-rules-entry.js";
|
|
3
|
-
import "./checkbox-entry.js";
|
|
4
|
-
import "./icon-entry.js";
|
|
5
|
-
import "./key-entry.js";
|
|
6
|
-
import "./number-entry.js";
|
|
7
|
-
import "./options-source/index.js";
|
|
8
|
-
import "./select-entry.js";
|
|
9
|
-
import "./text-entry.js";
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
2
|
+
import { LinkageRulesEntry as e } from "./linkage/linkage-rules-entry.js";
|
|
3
|
+
import { CheckboxEntry as t } from "./checkbox-entry.js";
|
|
4
|
+
import { IconEntry as n } from "./icon-entry.js";
|
|
5
|
+
import { KeyEntry as r } from "./key-entry.js";
|
|
6
|
+
import { NumberEntry as i } from "./number-entry.js";
|
|
7
|
+
import { OptionsSourceEntry as a } from "./options-source/index.js";
|
|
8
|
+
import { SelectEntry as o } from "./select-entry.js";
|
|
9
|
+
import { TextEntry as s } from "./text-entry.js";
|
|
10
|
+
export { t as CheckboxEntry, n as IconEntry, r as KeyEntry, e as LinkageRulesEntry, i as NumberEntry, a as OptionsSourceEntry, o as SelectEntry, s as TextEntry };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
2
2
|
import { coerceToString as e } from "./coerce.js";
|
|
3
3
|
import { EntryField as t } from "./entry-field.js";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
2
2
|
import { EditorIcon as e } from "../../../../icons.js";
|
|
3
3
|
import { sanitizeKey as t } from "../../../../engine/keys.js";
|
|
4
4
|
import { isEffectAction as n } from "../../../../engine/linkage/taxonomy.js";
|
|
5
5
|
import { createActionFor as r, setActionValueMode as i } from "./mutators.js";
|
|
6
6
|
import { coerceToString as a } from "../coerce.js";
|
|
7
|
-
import {
|
|
8
|
-
import { alertLevelOptions as
|
|
9
|
-
import { actionCardCss as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { Button as
|
|
12
|
-
import { useMemo as k } from "react";
|
|
7
|
+
import { ExpressionInput as o, NO_COMPLETION_SETUP as s } from "./expression-input.js";
|
|
8
|
+
import { alertLevelOptions as c, isLinkageActionType as l } from "./options.js";
|
|
9
|
+
import { actionCardCss as u, actionDeleteCss as d, actionHeaderCss as f, actionRetriggerCss as p, actionRetriggerLabelCss as m, apiFieldsCss as h, codeEditorWrapperCss as g, defaultHintCss as _, defaultTextCss as v, selectStyle as y, valueEditorCss as b } from "./styles.js";
|
|
10
|
+
import { Fragment as x, jsx as S, jsxs as C } from "@emotion/react/jsx-runtime";
|
|
11
|
+
import { Button as w, CodeEditor as T, Input as E, Segmented as D, Select as O, Switch as k } from "@vef-framework-react/components";
|
|
13
12
|
//#region src/editor/properties/entries/linkage/action-editor.tsx
|
|
14
13
|
var A = [{
|
|
15
14
|
value: "literal",
|
|
@@ -17,179 +16,166 @@ var A = [{
|
|
|
17
16
|
}, {
|
|
18
17
|
value: "expression",
|
|
19
18
|
label: "表达式"
|
|
20
|
-
}], j = ({ action: t, availableActions: i, canRemove: a, dataSourceOptions:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
}], j = ({ action: t, availableActions: i, canRemove: a, dataSourceOptions: o, isConditionTrigger: s, targetOptions: c, onChange: h, onRemove: g }) => /* @__PURE__ */ C("div", {
|
|
20
|
+
css: u,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ C("div", {
|
|
23
|
+
css: f,
|
|
24
|
+
children: [/* @__PURE__ */ S(O, {
|
|
25
|
+
options: i,
|
|
26
|
+
style: y,
|
|
27
|
+
value: t.type,
|
|
28
|
+
onChange: (e) => {
|
|
29
|
+
if (!l(e)) return;
|
|
30
|
+
let n = r(e);
|
|
31
|
+
h(t.id === void 0 ? n : {
|
|
32
|
+
...n,
|
|
33
|
+
id: t.id
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}), a ? /* @__PURE__ */ S(w, {
|
|
37
|
+
"aria-label": "删除动作",
|
|
29
38
|
css: d,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}) : null]
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ x(M, {
|
|
53
|
-
action: t,
|
|
54
|
-
assistExtensions: T,
|
|
55
|
-
dataSourceOptions: s,
|
|
56
|
-
targetOptions: h,
|
|
57
|
-
onChange: b
|
|
58
|
-
}),
|
|
59
|
-
m && n(t) && /* @__PURE__ */ S("div", {
|
|
60
|
-
css: f,
|
|
61
|
-
children: [/* @__PURE__ */ S("div", {
|
|
39
|
+
icon: /* @__PURE__ */ S(e, { name: "x" }),
|
|
40
|
+
size: "small",
|
|
41
|
+
type: "text",
|
|
42
|
+
onClick: g
|
|
43
|
+
}) : null]
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ S(M, {
|
|
46
|
+
action: t,
|
|
47
|
+
dataSourceOptions: o,
|
|
48
|
+
targetOptions: c,
|
|
49
|
+
onChange: h
|
|
50
|
+
}),
|
|
51
|
+
s && n(t) && /* @__PURE__ */ C("div", {
|
|
52
|
+
css: p,
|
|
53
|
+
children: [/* @__PURE__ */ C("div", {
|
|
54
|
+
css: v,
|
|
55
|
+
children: [/* @__PURE__ */ S("span", {
|
|
56
|
+
css: m,
|
|
57
|
+
children: "重复触发"
|
|
58
|
+
}), /* @__PURE__ */ S("span", {
|
|
62
59
|
css: _,
|
|
63
|
-
children:
|
|
64
|
-
css: p,
|
|
65
|
-
children: "重复触发"
|
|
66
|
-
}), /* @__PURE__ */ x("span", {
|
|
67
|
-
css: g,
|
|
68
|
-
children: "条件持续满足期间,依赖字段每次变化都重新触发;关闭(默认)则仅在条件首次满足时触发一次。"
|
|
69
|
-
})]
|
|
70
|
-
}), /* @__PURE__ */ x(O, {
|
|
71
|
-
"aria-label": "重复触发",
|
|
72
|
-
checked: t.retrigger === "always",
|
|
73
|
-
size: "small",
|
|
74
|
-
onChange: (e) => {
|
|
75
|
-
if (e) {
|
|
76
|
-
b({
|
|
77
|
-
...t,
|
|
78
|
-
retrigger: "always"
|
|
79
|
-
});
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
let n = { ...t };
|
|
83
|
-
delete n.retrigger, b(n);
|
|
84
|
-
}
|
|
60
|
+
children: "条件持续满足期间,依赖字段每次变化都重新触发;关闭(默认)则仅在条件首次满足时触发一次。"
|
|
85
61
|
})]
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
62
|
+
}), /* @__PURE__ */ S(k, {
|
|
63
|
+
"aria-label": "重复触发",
|
|
64
|
+
checked: t.retrigger === "always",
|
|
65
|
+
size: "small",
|
|
66
|
+
onChange: (e) => {
|
|
67
|
+
if (e) {
|
|
68
|
+
h({
|
|
69
|
+
...t,
|
|
70
|
+
retrigger: "always"
|
|
71
|
+
});
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let n = { ...t };
|
|
75
|
+
delete n.retrigger, h(n);
|
|
76
|
+
}
|
|
77
|
+
})]
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
function M({ action: e, dataSourceOptions: n, targetOptions: r, onChange: i }) {
|
|
91
82
|
switch (e.type) {
|
|
92
|
-
case "assign": return /* @__PURE__ */
|
|
93
|
-
assistExtensions: n,
|
|
83
|
+
case "assign": return /* @__PURE__ */ S(N, {
|
|
94
84
|
expressionPlaceholder: "field.A + field.B",
|
|
95
85
|
literalPlaceholder: "赋值内容",
|
|
96
86
|
value: e.value,
|
|
97
|
-
onChange: (t) =>
|
|
87
|
+
onChange: (t) => i({
|
|
98
88
|
...e,
|
|
99
89
|
value: t
|
|
100
90
|
})
|
|
101
91
|
});
|
|
102
|
-
case "set_field": return /* @__PURE__ */
|
|
103
|
-
options:
|
|
92
|
+
case "set_field": return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(O, {
|
|
93
|
+
options: r,
|
|
104
94
|
placeholder: "选择目标字段",
|
|
105
|
-
style:
|
|
95
|
+
style: y,
|
|
106
96
|
value: e.targetKey.length > 0 ? e.targetKey : void 0,
|
|
107
|
-
onChange: (t) =>
|
|
97
|
+
onChange: (t) => i({
|
|
108
98
|
...e,
|
|
109
99
|
targetKey: String(t)
|
|
110
100
|
})
|
|
111
|
-
}), /* @__PURE__ */
|
|
112
|
-
assistExtensions: n,
|
|
101
|
+
}), /* @__PURE__ */ S(N, {
|
|
113
102
|
expressionPlaceholder: "field.A",
|
|
114
103
|
literalPlaceholder: "写入的值",
|
|
115
104
|
value: e.value,
|
|
116
|
-
onChange: (t) =>
|
|
105
|
+
onChange: (t) => i({
|
|
117
106
|
...e,
|
|
118
107
|
value: t
|
|
119
108
|
})
|
|
120
109
|
})] });
|
|
121
|
-
case "set_variable": return /* @__PURE__ */
|
|
110
|
+
case "set_variable": return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(E, {
|
|
122
111
|
placeholder: "变量名($vars.名称)",
|
|
123
112
|
value: e.variable,
|
|
124
|
-
onChange: (n) =>
|
|
113
|
+
onChange: (n) => i({
|
|
125
114
|
...e,
|
|
126
115
|
variable: t(n.target.value)
|
|
127
116
|
})
|
|
128
|
-
}), /* @__PURE__ */
|
|
129
|
-
assistExtensions: n,
|
|
117
|
+
}), /* @__PURE__ */ S(N, {
|
|
130
118
|
expressionPlaceholder: "$vars.count + 1",
|
|
131
119
|
literalPlaceholder: "写入的值",
|
|
132
120
|
value: e.value,
|
|
133
|
-
onChange: (t) =>
|
|
121
|
+
onChange: (t) => i({
|
|
134
122
|
...e,
|
|
135
123
|
value: t
|
|
136
124
|
})
|
|
137
125
|
})] });
|
|
138
|
-
case "refresh_data_source": return /* @__PURE__ */
|
|
126
|
+
case "refresh_data_source": return /* @__PURE__ */ S(O, {
|
|
139
127
|
notFoundContent: "请先在表单「数据源」中创建",
|
|
140
|
-
options:
|
|
128
|
+
options: n,
|
|
141
129
|
placeholder: "选择数据源",
|
|
142
|
-
style:
|
|
130
|
+
style: y,
|
|
143
131
|
value: e.dataSourceId.length > 0 ? e.dataSourceId : void 0,
|
|
144
|
-
onChange: (t) =>
|
|
132
|
+
onChange: (t) => i({
|
|
145
133
|
...e,
|
|
146
134
|
dataSourceId: String(t)
|
|
147
135
|
})
|
|
148
136
|
});
|
|
149
|
-
case "alert": return /* @__PURE__ */
|
|
150
|
-
options:
|
|
151
|
-
style:
|
|
137
|
+
case "alert": return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(O, {
|
|
138
|
+
options: c,
|
|
139
|
+
style: y,
|
|
152
140
|
value: e.level ?? "info",
|
|
153
|
-
onChange: (t) =>
|
|
141
|
+
onChange: (t) => i({
|
|
154
142
|
...e,
|
|
155
143
|
level: P(t)
|
|
156
144
|
})
|
|
157
|
-
}), /* @__PURE__ */
|
|
158
|
-
assistExtensions: n,
|
|
145
|
+
}), /* @__PURE__ */ S(N, {
|
|
159
146
|
expressionPlaceholder: "field.name + ' 已保存'",
|
|
160
147
|
literalPlaceholder: "提示内容",
|
|
161
148
|
value: e.message,
|
|
162
|
-
onChange: (t) =>
|
|
149
|
+
onChange: (t) => i({
|
|
163
150
|
...e,
|
|
164
151
|
message: t
|
|
165
152
|
})
|
|
166
153
|
})] });
|
|
167
|
-
case "navigate": return /* @__PURE__ */
|
|
168
|
-
assistExtensions: n,
|
|
154
|
+
case "navigate": return /* @__PURE__ */ S(N, {
|
|
169
155
|
expressionPlaceholder: "'/orders/' + field.id",
|
|
170
156
|
literalPlaceholder: "目标路径,如 /orders",
|
|
171
157
|
value: e.to,
|
|
172
|
-
onChange: (t) =>
|
|
158
|
+
onChange: (t) => i({
|
|
173
159
|
...e,
|
|
174
160
|
to: t
|
|
175
161
|
})
|
|
176
162
|
});
|
|
177
|
-
case "api_call": return /* @__PURE__ */
|
|
178
|
-
css:
|
|
179
|
-
children: [/* @__PURE__ */
|
|
163
|
+
case "api_call": return /* @__PURE__ */ C("div", {
|
|
164
|
+
css: h,
|
|
165
|
+
children: [/* @__PURE__ */ S(E, {
|
|
180
166
|
placeholder: "资源 (resource)",
|
|
181
167
|
value: e.request.resource,
|
|
182
|
-
onChange: (t) =>
|
|
168
|
+
onChange: (t) => i({
|
|
183
169
|
...e,
|
|
184
170
|
request: {
|
|
185
171
|
...e.request,
|
|
186
172
|
resource: t.target.value
|
|
187
173
|
}
|
|
188
174
|
})
|
|
189
|
-
}), /* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ S(E, {
|
|
190
176
|
placeholder: "动作 (action)",
|
|
191
177
|
value: e.request.action,
|
|
192
|
-
onChange: (t) =>
|
|
178
|
+
onChange: (t) => i({
|
|
193
179
|
...e,
|
|
194
180
|
request: {
|
|
195
181
|
...e.request,
|
|
@@ -198,18 +184,18 @@ function M({ action: e, assistExtensions: n, dataSourceOptions: r, targetOptions
|
|
|
198
184
|
})
|
|
199
185
|
})]
|
|
200
186
|
});
|
|
201
|
-
case "script": return /* @__PURE__ */
|
|
202
|
-
css:
|
|
203
|
-
children: /* @__PURE__ */
|
|
187
|
+
case "script": return /* @__PURE__ */ S("div", {
|
|
188
|
+
css: g,
|
|
189
|
+
children: /* @__PURE__ */ S(T, {
|
|
204
190
|
showLineNumbers: !0,
|
|
205
|
-
|
|
191
|
+
basicSetupOptions: s,
|
|
206
192
|
language: "javascript",
|
|
207
193
|
minHeight: 90,
|
|
208
194
|
showFoldGutter: !1,
|
|
209
195
|
size: "small",
|
|
210
196
|
value: e.source,
|
|
211
197
|
placeholder: "if (field.A === \"x\") return { hidden: true };\nreturn { value: field.B + field.C };",
|
|
212
|
-
onChange: (t) =>
|
|
198
|
+
onChange: (t) => i({
|
|
213
199
|
...e,
|
|
214
200
|
source: t
|
|
215
201
|
})
|
|
@@ -218,33 +204,28 @@ function M({ action: e, assistExtensions: n, dataSourceOptions: r, targetOptions
|
|
|
218
204
|
default: return null;
|
|
219
205
|
}
|
|
220
206
|
}
|
|
221
|
-
function N({
|
|
222
|
-
return /* @__PURE__ */
|
|
223
|
-
css:
|
|
224
|
-
children: [/* @__PURE__ */
|
|
207
|
+
function N({ expressionPlaceholder: e, literalPlaceholder: t, value: n, onChange: r }) {
|
|
208
|
+
return /* @__PURE__ */ C("div", {
|
|
209
|
+
css: b,
|
|
210
|
+
children: [/* @__PURE__ */ S(D, {
|
|
225
211
|
options: [...A],
|
|
226
|
-
value:
|
|
212
|
+
value: n.kind,
|
|
227
213
|
onChange: (e) => {
|
|
228
|
-
(e === "literal" || e === "expression") &&
|
|
214
|
+
(e === "literal" || e === "expression") && r(i(n, e));
|
|
229
215
|
}
|
|
230
|
-
}),
|
|
231
|
-
placeholder:
|
|
232
|
-
value: a(
|
|
233
|
-
onChange: (e) =>
|
|
216
|
+
}), n.kind === "literal" ? /* @__PURE__ */ S(E, {
|
|
217
|
+
placeholder: t,
|
|
218
|
+
value: a(n.value),
|
|
219
|
+
onChange: (e) => r({
|
|
234
220
|
kind: "literal",
|
|
235
221
|
value: e.target.value
|
|
236
222
|
})
|
|
237
|
-
}) : /* @__PURE__ */
|
|
238
|
-
css:
|
|
239
|
-
children: /* @__PURE__ */
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
showFoldGutter: !1,
|
|
244
|
-
showLineNumbers: !1,
|
|
245
|
-
size: "small",
|
|
246
|
-
value: r.source,
|
|
247
|
-
onChange: (e) => o({
|
|
223
|
+
}) : /* @__PURE__ */ S("div", {
|
|
224
|
+
css: g,
|
|
225
|
+
children: /* @__PURE__ */ S(o, {
|
|
226
|
+
placeholder: e,
|
|
227
|
+
value: n.source,
|
|
228
|
+
onChange: (e) => r({
|
|
248
229
|
kind: "expression",
|
|
249
230
|
source: e
|
|
250
231
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.7.0 made by Venus | 2026-07-06T01:41:21.201Z */
|
|
2
2
|
import { EditorIcon as e } from "../../../../icons.js";
|
|
3
3
|
import { createActionFor as t } from "./mutators.js";
|
|
4
4
|
import { actionOptionsFor as n } from "./options.js";
|
|
@@ -8,8 +8,8 @@ import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
|
8
8
|
import { Button as u } from "@vef-framework-react/components";
|
|
9
9
|
import { useMemo as d } from "react";
|
|
10
10
|
//#region src/editor/properties/entries/linkage/actions-editor.tsx
|
|
11
|
-
var f = ({ actions: f, allowStateActions: p, dataSourceOptions: m, isContainerTarget: h = !1, isTargetKeyed: g, targetOptions: _, triggerKind: v,
|
|
12
|
-
let
|
|
11
|
+
var f = ({ actions: f, allowStateActions: p, dataSourceOptions: m, isContainerTarget: h = !1, isTargetKeyed: g, targetOptions: _, triggerKind: v, onChange: y }) => {
|
|
12
|
+
let b = d(() => n({
|
|
13
13
|
triggerKind: v,
|
|
14
14
|
isTargetKeyed: g,
|
|
15
15
|
allowStateActions: p,
|
|
@@ -19,10 +19,10 @@ var f = ({ actions: f, allowStateActions: p, dataSourceOptions: m, isContainerTa
|
|
|
19
19
|
g,
|
|
20
20
|
p,
|
|
21
21
|
h
|
|
22
|
-
]),
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
22
|
+
]), x = (e, t) => {
|
|
23
|
+
y(f.map((n, r) => r === e ? t : n));
|
|
24
|
+
}, S = (e) => {
|
|
25
|
+
y(f.filter((t, n) => n !== e));
|
|
26
26
|
};
|
|
27
27
|
return /* @__PURE__ */ l("div", {
|
|
28
28
|
css: a,
|
|
@@ -35,25 +35,24 @@ var f = ({ actions: f, allowStateActions: p, dataSourceOptions: m, isContainerTa
|
|
|
35
35
|
css: r,
|
|
36
36
|
children: f.map((e, t) => /* @__PURE__ */ c(s, {
|
|
37
37
|
action: e,
|
|
38
|
-
availableActions:
|
|
38
|
+
availableActions: b,
|
|
39
39
|
canRemove: f.length > 1,
|
|
40
40
|
dataSourceOptions: m,
|
|
41
41
|
isConditionTrigger: v === "condition",
|
|
42
42
|
targetOptions: _,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
onRemove: () => C(t)
|
|
43
|
+
onChange: (e) => x(t, e),
|
|
44
|
+
onRemove: () => S(t)
|
|
46
45
|
}, e.id ?? t))
|
|
47
46
|
}),
|
|
48
47
|
/* @__PURE__ */ c(u, {
|
|
49
48
|
css: i,
|
|
50
|
-
disabled:
|
|
49
|
+
disabled: b.length === 0,
|
|
51
50
|
icon: /* @__PURE__ */ c(e, { name: "plus" }),
|
|
52
51
|
size: "small",
|
|
53
52
|
type: "dashed",
|
|
54
53
|
onClick: () => {
|
|
55
|
-
let e =
|
|
56
|
-
e &&
|
|
54
|
+
let e = b[0]?.value;
|
|
55
|
+
e && y([...f, t(e)]);
|
|
57
56
|
},
|
|
58
57
|
children: "新增动作"
|
|
59
58
|
})
|