@vef-framework-react/form-editor 2.18.0 → 2.20.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/checkbox-group-field/index.cjs +1 -1
- package/dist/cjs/components/code-editor/index.cjs +1 -1
- package/dist/cjs/components/mobile/checkbox-group.cjs +1 -1
- package/dist/cjs/components/mobile/date-adapters.cjs +1 -1
- package/dist/cjs/components/mobile/date.cjs +1 -1
- package/dist/cjs/components/mobile/datetime.cjs +1 -1
- package/dist/cjs/components/mobile/definitions.cjs +1 -1
- package/dist/cjs/components/mobile/radio.cjs +1 -1
- package/dist/cjs/components/mobile/select.cjs +1 -1
- package/dist/cjs/components/mobile/switch.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/upload-field/index.cjs +1 -0
- package/dist/cjs/editor/canvas/canvas.cjs +1 -1
- package/dist/cjs/editor/canvas/container-drag-chip.cjs +1 -1
- package/dist/cjs/editor/dnd.cjs +1 -1
- package/dist/cjs/editor/form-config/linkage-overview.cjs +1 -1
- package/dist/cjs/editor/form-config/outline-tab.cjs +1 -1
- package/dist/cjs/editor/palette/palette-item.cjs +1 -1
- package/dist/cjs/editor/properties/container-properties.cjs +1 -1
- package/dist/cjs/editor/properties/dynamic-value-editor.cjs +1 -0
- 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/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-list-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/trigger-editor.cjs +1 -1
- package/dist/cjs/editor/properties/form-data-sources-panel.cjs +1 -1
- package/dist/cjs/editor/properties/form-variables-panel.cjs +1 -1
- package/dist/cjs/editor/properties/option-editors.cjs +1 -1
- package/dist/cjs/editor/properties/properties-panel.cjs +1 -1
- package/dist/cjs/editor/remove-node-confirm.cjs +2 -2
- package/dist/cjs/editor/toolbar/toolbar.cjs +2 -2
- package/dist/cjs/engine/data-source-params.cjs +1 -0
- package/dist/cjs/engine/keys.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/operators.cjs +1 -1
- package/dist/cjs/engine/linkage/shape.cjs +1 -0
- package/dist/cjs/engine/linkage/source-tracking.cjs +1 -1
- package/dist/cjs/engine/linkage/validator.cjs +1 -1
- package/dist/cjs/engine/registry/defaults.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/removal-impact.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/render/chrome/mobile-chrome.cjs +1 -1
- package/dist/cjs/render/chrome/pc-chrome.cjs +1 -1
- package/dist/cjs/render/data-source-context.cjs +0 -0
- package/dist/cjs/render/data-source-param-scope.cjs +1 -0
- package/dist/cjs/render/form-field.cjs +1 -1
- package/dist/cjs/render/form-renderer.cjs +1 -1
- package/dist/cjs/render/parts/field-shell.cjs +1 -1
- package/dist/cjs/render/parts/label.cjs +1 -1
- package/dist/cjs/render/parts/option-order.cjs +1 -0
- package/dist/cjs/render/subform-columns.cjs +1 -1
- package/dist/cjs/render/submit.cjs +1 -1
- package/dist/cjs/runtime/effects.cjs +1 -1
- package/dist/cjs/runtime/field-write.cjs +1 -1
- package/dist/cjs/runtime/runtime-state-controller.cjs +1 -1
- package/dist/cjs/store/form-store.cjs +1 -1
- package/dist/cjs/types/dynamic-value.cjs +1 -0
- package/dist/cjs/types/index.cjs +1 -1
- package/dist/es/components/button/index.js +1 -1
- package/dist/es/components/checkbox-group-field/index.js +24 -22
- package/dist/es/components/code-editor/code-editor-input.js +1 -1
- package/dist/es/components/code-editor/index.js +3 -2
- package/dist/es/components/containers/index.js +1 -1
- package/dist/es/components/date-field/index.js +1 -1
- package/dist/es/components/display/index.js +1 -1
- package/dist/es/components/field-entries.js +1 -1
- 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 +26 -24
- package/dist/es/components/mobile/date-adapters.js +3 -2
- package/dist/es/components/mobile/date.js +36 -34
- package/dist/es/components/mobile/daterange.js +1 -1
- package/dist/es/components/mobile/datetime.js +36 -34
- package/dist/es/components/mobile/definitions.js +34 -32
- package/dist/es/components/mobile/divider.js +1 -1
- package/dist/es/components/mobile/input-cell.js +1 -1
- package/dist/es/components/mobile/number.js +1 -1
- 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 +2 -1
- package/dist/es/components/mobile/scope.js +1 -1
- package/dist/es/components/mobile/select.js +2 -2
- package/dist/es/components/mobile/switch.js +17 -11
- package/dist/es/components/mobile/textarea.js +1 -1
- package/dist/es/components/mobile/textfield.js +1 -1
- package/dist/es/components/mobile/theme.js +1 -1
- package/dist/es/components/number-field/index.js +1 -1
- package/dist/es/components/radio-field/index.js +3 -2
- package/dist/es/components/select-field/index.js +14 -13
- 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 +1 -1
- package/dist/es/components/upload-field/index.js +105 -0
- package/dist/es/editor/canvas/canvas-field.js +1 -1
- package/dist/es/editor/canvas/canvas.js +103 -103
- package/dist/es/editor/canvas/container-drag-chip.js +8 -8
- package/dist/es/editor/canvas/drop-indicator.js +1 -1
- package/dist/es/editor/canvas/drop-zones.js +1 -1
- package/dist/es/editor/canvas/json-split-view.js +1 -1
- 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 +1 -1
- package/dist/es/editor/canvas/subform-table-cell.js +1 -1
- package/dist/es/editor/canvas/use-scroll-selection-into-view.js +1 -1
- package/dist/es/editor/context-sources.js +1 -1
- package/dist/es/editor/dnd.js +18 -18
- package/dist/es/editor/editor-layout-context.js +1 -1
- 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 +1 -1
- package/dist/es/editor/form-config/linkage-overview.js +9 -9
- package/dist/es/editor/form-config/outline-tab.js +6 -6
- package/dist/es/editor/form-editor.js +1 -1
- package/dist/es/editor/palette/field-groups.js +1 -1
- package/dist/es/editor/palette/palette-group.js +1 -1
- package/dist/es/editor/palette/palette-item.js +71 -70
- 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 +1 -1
- package/dist/es/editor/properties/block-layout-section.js +1 -1
- package/dist/es/editor/properties/container-properties.js +198 -200
- package/dist/es/editor/properties/dynamic-value-editor.js +57 -0
- 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 +1 -1
- package/dist/es/editor/properties/entries/key-entry.js +1 -1
- package/dist/es/editor/properties/entries/linkage/action-editor.js +75 -110
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +10 -10
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +123 -123
- package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +7 -7
- package/dist/es/editor/properties/entries/linkage/expression-input.js +1 -1
- package/dist/es/editor/properties/entries/linkage/index.js +1 -1
- package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +60 -59
- package/dist/es/editor/properties/entries/linkage/mutators.js +2 -11
- package/dist/es/editor/properties/entries/linkage/options.js +5 -2
- package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +1 -1
- package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +29 -29
- package/dist/es/editor/properties/entries/linkage/styles.js +1 -1
- package/dist/es/editor/properties/entries/linkage/trigger-editor.js +36 -36
- package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +1 -1
- 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 +7 -7
- package/dist/es/editor/properties/form-linkage-panel.js +1 -1
- package/dist/es/editor/properties/form-variables-panel.js +68 -67
- package/dist/es/editor/properties/option-editors.js +244 -123
- 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 +17 -17
- package/dist/es/editor/properties/properties-provider.js +1 -1
- 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 +36 -29
- package/dist/es/editor/schema-apply.js +1 -1
- package/dist/es/editor/styles.js +1 -1
- package/dist/es/editor/toolbar/notify.js +1 -1
- package/dist/es/editor/toolbar/schema-io.js +1 -1
- package/dist/es/editor/toolbar/toolbar.js +173 -172
- 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 +1 -1
- package/dist/es/engine/data-source-params.js +38 -0
- package/dist/es/engine/ids.js +1 -1
- package/dist/es/engine/keys.js +6 -3
- package/dist/es/engine/linkage/cycle.js +1 -1
- package/dist/es/engine/linkage/default-evaluator.js +1 -1
- package/dist/es/engine/linkage/effects.js +38 -32
- package/dist/es/engine/linkage/evaluator.js +70 -60
- package/dist/es/engine/linkage/index.js +1 -1
- package/dist/es/engine/linkage/operators.js +3 -3
- package/dist/es/engine/linkage/shape.js +21 -0
- package/dist/es/engine/linkage/source-tracking.js +20 -11
- package/dist/es/engine/linkage/taxonomy.js +1 -1
- package/dist/es/engine/linkage/validator.js +187 -186
- package/dist/es/engine/registry/defaults-mobile.js +1 -1
- package/dist/es/engine/registry/defaults.js +10 -9
- package/dist/es/engine/registry/form-field-registry.js +1 -1
- package/dist/es/engine/schema/column-type.js +6 -2
- package/dist/es/engine/schema/edit-ops.js +9 -9
- 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 +4 -3
- package/dist/es/engine/schema/presentation.js +1 -1
- package/dist/es/engine/schema/reconcile.js +1 -1
- package/dist/es/engine/schema/removal-impact.js +60 -39
- package/dist/es/engine/schema/rewrite.js +1 -1
- package/dist/es/engine/schema/validate.js +1 -1
- package/dist/es/engine/schema/walk.js +1 -1
- package/dist/es/engine/validation.js +1 -1
- package/dist/es/icons.js +1 -1
- package/dist/es/index.js +55 -54
- package/dist/es/render/chrome/mobile-chrome.js +67 -66
- package/dist/es/render/chrome/pc-chrome.js +38 -37
- package/dist/es/render/chrome/subform-shell.js +1 -1
- package/dist/es/render/data-source-context.js +0 -0
- package/dist/es/render/data-source-param-scope.js +33 -0
- package/dist/es/render/flex-style.js +1 -1
- package/dist/es/render/form-field.js +5 -5
- package/dist/es/render/form-renderer.js +250 -237
- package/dist/es/render/grid-style.js +1 -1
- package/dist/es/render/parts/field-shell.js +29 -22
- package/dist/es/render/parts/label.js +12 -10
- package/dist/es/render/parts/option-order.js +8 -0
- package/dist/es/render/parts/options-status.js +1 -1
- package/dist/es/render/stack-style.js +1 -1
- package/dist/es/render/subform-columns.js +49 -48
- package/dist/es/render/submit.js +73 -53
- package/dist/es/runtime/effects.js +75 -58
- package/dist/es/runtime/field-write.js +15 -5
- 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 +91 -78
- package/dist/es/runtime/stabilize-state-map.js +1 -1
- package/dist/es/store/engine-provider.js +1 -1
- package/dist/es/store/form-store.js +147 -111
- 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/dynamic-value.js +9 -0
- package/dist/es/types/index.js +5 -4
- 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/date-adapters.d.ts +21 -0
- package/dist/types/components/mobile/switch.d.ts +5 -3
- package/dist/types/components/upload-field/index.d.ts +2 -0
- package/dist/types/editor/properties/dynamic-value-editor.d.ts +23 -0
- package/dist/types/editor/properties/entries/linkage/mutators.d.ts +1 -8
- package/dist/types/editor/properties/entries/linkage/options.d.ts +16 -0
- package/dist/types/editor/remove-node-confirm.d.ts +6 -0
- package/dist/types/engine/data-source-params.d.ts +33 -0
- package/dist/types/engine/keys.d.ts +5 -0
- package/dist/types/engine/linkage/effects.d.ts +13 -3
- package/dist/types/engine/linkage/shape.d.ts +54 -0
- package/dist/types/engine/linkage/source-tracking.d.ts +20 -1
- package/dist/types/engine/schema/removal-impact.d.ts +23 -0
- package/dist/types/render/data-source-param-scope.d.ts +58 -0
- package/dist/types/render/parts/field-shell.d.ts +16 -1
- package/dist/types/render/parts/label.d.ts +14 -1
- package/dist/types/render/parts/option-order.d.ts +20 -0
- package/dist/types/render/submit.d.ts +7 -4
- package/dist/types/runtime/effects.d.ts +1 -0
- package/dist/types/runtime/field-write.d.ts +7 -1
- package/dist/types/runtime/runtime-state-controller.d.ts +4 -2
- package/dist/types/store/form-store.d.ts +15 -3
- package/dist/types/types/chrome.d.ts +7 -0
- package/dist/types/types/data-source.d.ts +26 -1
- package/dist/types/types/dynamic-value.d.ts +21 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/linkage.d.ts +9 -8
- package/dist/types/types/schema.d.ts +48 -5
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { findNode as t, isContainerNode as n } from "../../engine/schema/walk.js";
|
|
4
|
+
import { assertNever as r } from "../../engine/assert-never.js";
|
|
5
|
+
import { useFieldRegistry as i } from "../../store/engine-provider.js";
|
|
6
6
|
import { currentLayer as a } from "../../engine/schema/presentation.js";
|
|
7
7
|
import { useFormEditorStore as o } from "../../store/form-store.js";
|
|
8
8
|
import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
|
|
@@ -65,12 +65,12 @@ function g(e) {
|
|
|
65
65
|
case "tabs":
|
|
66
66
|
case "flex":
|
|
67
67
|
case "grid": return;
|
|
68
|
-
default: return
|
|
68
|
+
default: return r(e);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function _({ nodeId:
|
|
72
|
-
let l = o((e) =>
|
|
73
|
-
if (l === void 0 || !
|
|
71
|
+
function _({ nodeId: r }) {
|
|
72
|
+
let l = o((e) => t(a(e.schema, e.device), r)), u = i();
|
|
73
|
+
if (l === void 0 || !n(l)) return null;
|
|
74
74
|
let d = u.get(l.type), _ = g(l) ?? d?.config.name ?? "容器";
|
|
75
75
|
return /* @__PURE__ */ c("div", {
|
|
76
76
|
css: f,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { css as t } from "@emotion/react";
|
|
4
4
|
import { globalCssVars as n } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { dropZoneId as e, isEditorDragData as t } from "../dnd.js";
|
|
3
3
|
import { CollisionPriority as n } from "@vef-framework-react/core";
|
|
4
4
|
//#region src/editor/canvas/drop-zones.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
3
|
import { useDeviceRegistries as t } from "../../store/engine-provider.js";
|
|
4
4
|
import { useFormEditorStore as n, useFormEditorStoreApi as r } from "../../store/form-store.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
3
|
import { useDeviceRegistries as t } from "../../store/engine-provider.js";
|
|
4
4
|
import { currentLayer as n, emptyLayer as r } from "../../engine/schema/presentation.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { OverlayContainerProvider as e } from "../../components/mobile/scope.js";
|
|
3
3
|
import { jsx as t, jsxs as n } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { css as r } from "@emotion/react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { findNode as e, isLeafField as t } from "../../engine/schema/walk.js";
|
|
3
3
|
import { isKeyedField as n } from "../../engine/keys.js";
|
|
4
4
|
import { isEditorDragData as r } from "../dnd.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { css as t } from "@emotion/react";
|
|
4
4
|
import { Checkbox as n, DatePicker as r, Input as i, InputNumber as a, Radio as o, Select as s, Switch as c, globalCssVars as l } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { useFormEditorStore as e } from "../../store/form-store.js";
|
|
3
3
|
import { useEffect as t } from "react";
|
|
4
4
|
//#region src/editor/canvas/use-scroll-selection-into-view.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { createContext as t, use as n, useRef as r } from "react";
|
|
4
4
|
//#region src/editor/context-sources.tsx
|
package/dist/es/editor/dnd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
|
+
import { assertNever as e } from "../engine/assert-never.js";
|
|
3
|
+
import { useFieldRegistry as t } from "../store/engine-provider.js";
|
|
4
4
|
import { useFormEditorStoreApi as n } from "../store/form-store.js";
|
|
5
5
|
import { KeyboardSensor as r, PointerActivationConstraints as i, PointerSensor as a } from "@vef-framework-react/core";
|
|
6
6
|
//#region src/editor/dnd.ts
|
|
@@ -18,20 +18,20 @@ function u(e) {
|
|
|
18
18
|
function d(e) {
|
|
19
19
|
return `fallback-${u(e)}`;
|
|
20
20
|
}
|
|
21
|
-
function f(
|
|
22
|
-
switch (
|
|
21
|
+
function f(t) {
|
|
22
|
+
switch (t.zone) {
|
|
23
23
|
case "beside": return {
|
|
24
24
|
kind: "beside",
|
|
25
|
-
anchorId:
|
|
26
|
-
side:
|
|
25
|
+
anchorId: t.anchorId,
|
|
26
|
+
side: t.side
|
|
27
27
|
};
|
|
28
28
|
case "container": return {
|
|
29
29
|
kind: "container",
|
|
30
|
-
containerId:
|
|
31
|
-
tabIndex:
|
|
30
|
+
containerId: t.containerId,
|
|
31
|
+
tabIndex: t.tabIndex
|
|
32
32
|
};
|
|
33
33
|
case "root": return { kind: "append" };
|
|
34
|
-
default: return t
|
|
34
|
+
default: return e(t);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
function p(e) {
|
|
@@ -53,22 +53,22 @@ function h(e) {
|
|
|
53
53
|
return m(e) && e.kind === "block" && e.isContainer;
|
|
54
54
|
}
|
|
55
55
|
function g() {
|
|
56
|
-
let
|
|
57
|
-
return (
|
|
58
|
-
let { source: n, target: i } =
|
|
59
|
-
if (
|
|
56
|
+
let e = n(), r = t();
|
|
57
|
+
return (t) => {
|
|
58
|
+
let { source: n, target: i } = t.operation;
|
|
59
|
+
if (t.canceled || !n || !i) return;
|
|
60
60
|
let a = n.data, o = i.data;
|
|
61
61
|
if (!m(a) || !p(o)) return;
|
|
62
62
|
let s = f(o);
|
|
63
63
|
if (a.kind === "palette") {
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
definition:
|
|
64
|
+
let t = r.get(a.type);
|
|
65
|
+
t && e.getState().insertField({
|
|
66
|
+
definition: t,
|
|
67
67
|
target: s
|
|
68
68
|
});
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
e.getState().moveNode({
|
|
72
72
|
nodeId: a.nodeId,
|
|
73
73
|
target: s
|
|
74
74
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { createContext as t, use as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
4
|
//#region src/editor/editor-layout-context.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
3
|
import { hasErrorIssues as t } from "../../engine/validation.js";
|
|
4
4
|
import { selectFieldCount as n, selectLinkageRuleCount as r, useFormEditorStore as i, useFormEditorStoreApi as a } from "../../store/form-store.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
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 { Input as r, Select as i, globalCssVars as a } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
3
|
import { assertNever as t } from "../../engine/assert-never.js";
|
|
4
4
|
import { selectFieldCount as n, selectLinkageRuleCount as r, useCurrentLayer as i, useFormEditorStore as a, useFormEditorStoreApi as o } from "../../store/form-store.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { nodeLabel as t, walkNodes as n } from "../../engine/schema/walk.js";
|
|
4
|
+
import { useFieldRegistry as r } from "../../store/engine-provider.js";
|
|
5
5
|
import { useCurrentLayer as i, useFormEditorStoreApi as a } from "../../store/form-store.js";
|
|
6
6
|
import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
|
|
7
7
|
import { css as c } from "@emotion/react";
|
|
@@ -52,8 +52,8 @@ var d = process.env.NODE_ENV === "production" ? {
|
|
|
52
52
|
color: l.colorTextTertiary
|
|
53
53
|
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpbmthZ2Utb3ZlcnZpZXcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBEcUIiLCJmaWxlIjoibGlua2FnZS1vdmVydmlldy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB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IGNzcz17bGFiZWxUZXh0Q3NzfT57bGFiZWx9PC9zcGFuPlxuICAgICAgICAgICAge25vZGVLZXkgPyA8c3BhbiBjc3M9e2tleVRhZ0Nzc30+e25vZGVLZXl9PC9zcGFuPiA6IG51bGx9XG5cbiAgICAgICAgICAgIDxzcGFuIGNzcz17Y291bnRUYWdDc3N9PlxuICAgICAgICAgICAgICB7cnVsZUNvdW50fVxuICAgICAgICAgICAgICB7XCIgXCJ9XG4gICAgICAgICAgICAgIOadoeinhOWImVxuICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgICAgfSl9XG4gICAgPC9kaXY+XG4gICk7XG59XG4iXX0= */");
|
|
54
54
|
function _() {
|
|
55
|
-
let c = i(), l =
|
|
56
|
-
return
|
|
55
|
+
let c = i(), l = r(), u = a(), _ = [];
|
|
56
|
+
return n(c, (e) => {
|
|
57
57
|
let t = e.linkage?.rules?.length ?? 0;
|
|
58
58
|
t > 0 && _.push({
|
|
59
59
|
block: e,
|
|
@@ -64,11 +64,11 @@ function _() {
|
|
|
64
64
|
children: "当前设备层还没有字段级联动规则,可在控件属性面板的「联动」页配置。"
|
|
65
65
|
}) : /* @__PURE__ */ o("div", {
|
|
66
66
|
css: d,
|
|
67
|
-
children: _.map(({ block:
|
|
68
|
-
let i = l.get(
|
|
67
|
+
children: _.map(({ block: n, ruleCount: r }) => {
|
|
68
|
+
let i = l.get(n.type), a = i?.config.icon ?? "square", c = "key" in n && typeof n.key == "string" && n.key.length > 0 ? n.key : void 0, d = t(n) ?? c ?? i?.config.name ?? n.type;
|
|
69
69
|
return /* @__PURE__ */ s("div", {
|
|
70
70
|
css: f,
|
|
71
|
-
onClick: () => u.getState().selectNode(
|
|
71
|
+
onClick: () => u.getState().selectNode(n.id),
|
|
72
72
|
children: [
|
|
73
73
|
/* @__PURE__ */ o(e, { name: a }),
|
|
74
74
|
/* @__PURE__ */ o("span", {
|
|
@@ -88,7 +88,7 @@ function _() {
|
|
|
88
88
|
]
|
|
89
89
|
})
|
|
90
90
|
]
|
|
91
|
-
},
|
|
91
|
+
}, n.id);
|
|
92
92
|
})
|
|
93
93
|
});
|
|
94
94
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { containerBodies as t } from "../../engine/schema/nodes.js";
|
|
4
|
+
import { isContainerNode as n, nodeLabel as r } from "../../engine/schema/walk.js";
|
|
5
|
+
import { useFieldRegistry as i } from "../../store/engine-provider.js";
|
|
6
6
|
import { useCurrentLayer as a, useFormEditorStore as o, useFormEditorStoreApi as s } from "../../store/form-store.js";
|
|
7
7
|
import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
8
8
|
import { css as d } from "@emotion/react";
|
|
@@ -103,7 +103,7 @@ function w() {
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
var T = p(function a({ block: d, depth: f }) {
|
|
106
|
-
let p =
|
|
106
|
+
let p = i(), m = s(), h = o((e) => e.selectedId === d.id), g = p.get(d.type), _ = g?.config.icon ?? "square", v = "key" in d && typeof d.key == "string" && d.key.length > 0 ? d.key : void 0, y = r(d) ?? v ?? g?.config.name ?? d.type, w = n(d) ? void 0 : v;
|
|
107
107
|
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("div", {
|
|
108
108
|
css: [
|
|
109
109
|
b,
|
|
@@ -123,7 +123,7 @@ var T = p(function a({ block: d, depth: f }) {
|
|
|
123
123
|
children: w
|
|
124
124
|
}) : null
|
|
125
125
|
]
|
|
126
|
-
}),
|
|
126
|
+
}), n(d) ? t(d).flat().map((e) => /* @__PURE__ */ l(a, {
|
|
127
127
|
block: e,
|
|
128
128
|
depth: f + 1
|
|
129
129
|
}, e.id)) : null] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { createDefaultRegistry as e } from "../engine/registry/defaults.js";
|
|
3
3
|
import { createDefaultMobileRegistry as t } from "../engine/registry/defaults-mobile.js";
|
|
4
4
|
import { DeviceProvider as n, RegistryProvider as r } from "../store/engine-provider.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.20.0 made by Venus | 2026-09-07T11:07:17.087Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
3
|
import { FIELD_GROUP_LABELS as t } from "./field-groups.js";
|
|
4
4
|
import { PaletteItem as n } from "./palette-item.js";
|