@vef-framework-react/form-editor 2.24.1 → 2.25.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/editor/canvas/canvas-field.cjs +1 -1
- package/dist/cjs/editor/data-source-apis.cjs +1 -0
- package/dist/cjs/editor/footer/footer.cjs +1 -1
- package/dist/cjs/editor/form-config/form-config-drawer.cjs +1 -1
- package/dist/cjs/editor/form-editor.cjs +1 -1
- package/dist/cjs/editor/host-validation.cjs +1 -0
- package/dist/cjs/editor/issue-location.cjs +1 -0
- package/dist/cjs/editor/preview-runtime-context.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/action-editor.cjs +2 -2
- package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/styles.cjs +1 -1
- package/dist/cjs/editor/properties/entries/options-source/index.cjs +1 -1
- package/dist/cjs/editor/properties/form-data-sources-panel.cjs +1 -1
- package/dist/cjs/editor/properties/option-editors.cjs +1 -1
- package/dist/cjs/editor/properties/remote-option-source-editor.cjs +1 -0
- package/dist/cjs/editor/properties/remote-request-editor.cjs +1 -0
- package/dist/cjs/editor/properties/system-variables-panel.cjs +1 -0
- package/dist/cjs/editor/styles.cjs +1 -1
- package/dist/cjs/editor/toolbar/toolbar.cjs +2 -2
- package/dist/cjs/editor/validation-summary.cjs +1 -1
- package/dist/cjs/engine/linkage/default-evaluator.cjs +1 -1
- package/dist/cjs/engine/linkage/operators.cjs +1 -1
- package/dist/cjs/engine/linkage/scope.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/option-mapping.cjs +1 -0
- package/dist/cjs/engine/schema/edit-ops.cjs +1 -1
- package/dist/cjs/engine/schema/reconcile.cjs +1 -1
- package/dist/cjs/engine/validation.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/render/data-source-context.cjs +1 -1
- package/dist/cjs/render/form-renderer.cjs +1 -1
- package/dist/es/components/button/index.js +1 -1
- package/dist/es/components/checkbox-group-field/index.js +1 -1
- package/dist/es/components/code-editor/code-editor-input.js +1 -1
- package/dist/es/components/code-editor/index.js +1 -1
- 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 +1 -1
- 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 +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 +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 +1 -1
- 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 +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 +1 -1
- package/dist/es/components/upload-field/index.js +1 -1
- package/dist/es/editor/canvas/canvas-field.js +28 -27
- package/dist/es/editor/canvas/canvas.js +1 -1
- package/dist/es/editor/canvas/container-drag-chip.js +1 -1
- 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/data-source-apis.js +30 -0
- package/dist/es/editor/dnd.js +1 -1
- package/dist/es/editor/editor-layout-context.js +1 -1
- package/dist/es/editor/footer/footer.js +119 -82
- package/dist/es/editor/form-config/form-basics-tab.js +1 -1
- package/dist/es/editor/form-config/form-config-drawer.js +120 -99
- package/dist/es/editor/form-config/linkage-overview.js +1 -1
- package/dist/es/editor/form-config/outline-tab.js +1 -1
- package/dist/es/editor/form-editor.js +113 -105
- package/dist/es/editor/host-validation.js +17 -0
- package/dist/es/editor/issue-location.js +127 -0
- 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 +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 +58 -18
- package/dist/es/editor/properties/block-layout-section.js +1 -1
- package/dist/es/editor/properties/container-properties.js +1 -1
- package/dist/es/editor/properties/dynamic-value-editor.js +1 -1
- 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 +24 -40
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +13 -12
- package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +1 -1
- 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 +1 -1
- package/dist/es/editor/properties/entries/linkage/mutators.js +1 -1
- package/dist/es/editor/properties/entries/linkage/options.js +1 -1
- package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +1 -1
- package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/styles.js +42 -49
- package/dist/es/editor/properties/entries/linkage/trigger-editor.js +1 -1
- 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 +7 -6
- 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 +44 -36
- package/dist/es/editor/properties/form-linkage-panel.js +1 -1
- package/dist/es/editor/properties/form-variables-panel.js +1 -1
- package/dist/es/editor/properties/option-editors.js +87 -252
- 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 +1 -1
- 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/remote-option-source-editor.js +207 -0
- package/dist/es/editor/properties/remote-request-editor.js +357 -0
- package/dist/es/editor/properties/system-variables-panel.js +114 -0
- package/dist/es/editor/properties/use-confirmable-kind-switch.js +1 -1
- package/dist/es/editor/remove-node-confirm.js +1 -1
- package/dist/es/editor/schema-apply.js +1 -1
- package/dist/es/editor/styles.js +6 -6
- 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 +175 -171
- package/dist/es/editor/use-editor-shortcuts.js +1 -1
- package/dist/es/editor/validation-summary.js +130 -48
- 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 +1 -1
- package/dist/es/engine/ids.js +1 -1
- package/dist/es/engine/keys.js +1 -1
- package/dist/es/engine/linkage/cycle.js +1 -1
- package/dist/es/engine/linkage/default-evaluator.js +38 -27
- package/dist/es/engine/linkage/effects.js +1 -1
- package/dist/es/engine/linkage/evaluator.js +1 -1
- package/dist/es/engine/linkage/index.js +1 -1
- package/dist/es/engine/linkage/operators.js +20 -44
- package/dist/es/engine/linkage/scope.js +84 -0
- package/dist/es/engine/linkage/shape.js +1 -1
- package/dist/es/engine/linkage/source-tracking.js +19 -15
- package/dist/es/engine/linkage/taxonomy.js +1 -1
- package/dist/es/engine/linkage/validator.js +101 -81
- package/dist/es/engine/option-mapping.js +18 -0
- 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 +1 -1
- package/dist/es/engine/schema/column-type.js +1 -1
- package/dist/es/engine/schema/edit-ops.js +84 -83
- 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 +1 -1
- package/dist/es/engine/schema/presentation.js +1 -1
- package/dist/es/engine/schema/reconcile.js +55 -51
- 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 +1 -1
- package/dist/es/engine/schema/walk.js +1 -1
- package/dist/es/engine/validation.js +8 -4
- package/dist/es/icons.js +1 -1
- package/dist/es/index.js +49 -48
- 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 +44 -43
- package/dist/es/render/data-source-param-scope.js +1 -1
- 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 +184 -180
- 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/option-order.js +1 -1
- 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 +1 -1
- package/dist/es/render/submit.js +1 -1
- package/dist/es/runtime/effects.js +1 -1
- package/dist/es/runtime/field-write.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/es/types/index.js +1 -1
- 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/editor/data-source-apis.d.ts +24 -0
- package/dist/types/editor/form-editor.d.ts +33 -9
- package/dist/types/editor/host-validation.d.ts +20 -0
- package/dist/types/editor/issue-location.d.ts +43 -0
- package/dist/types/editor/preview-runtime-context.d.ts +27 -2
- package/dist/types/editor/properties/entries/linkage/styles.d.ts +0 -1
- package/dist/types/editor/properties/option-editors.d.ts +1 -12
- package/dist/types/editor/properties/remote-option-source-editor.d.ts +15 -0
- package/dist/types/editor/properties/remote-request-editor.d.ts +70 -0
- package/dist/types/editor/properties/system-variables-panel.d.ts +8 -0
- package/dist/types/editor/styles.d.ts +2 -2
- package/dist/types/editor/validation-summary.d.ts +37 -14
- package/dist/types/engine/linkage/scope.d.ts +73 -0
- package/dist/types/engine/linkage/source-tracking.d.ts +3 -3
- package/dist/types/engine/option-mapping.d.ts +9 -0
- package/dist/types/engine/validation.d.ts +27 -8
- package/dist/types/index.d.ts +3 -1
- package/dist/types/render/form-renderer.d.ts +4 -3
- package/dist/types/types/data-source.d.ts +64 -0
- package/dist/types/types/linkage.d.ts +34 -16
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { isPlainObject as e } from "@vef-framework-react/shared";
|
|
3
3
|
//#region src/engine/validation.ts
|
|
4
4
|
var t = /* @__PURE__ */ new Set([
|
|
@@ -7,6 +7,7 @@ var t = /* @__PURE__ */ new Set([
|
|
|
7
7
|
"condition_group_empty",
|
|
8
8
|
"source_key_empty",
|
|
9
9
|
"source_key_unresolved",
|
|
10
|
+
"source_scope_unknown",
|
|
10
11
|
"source_empty",
|
|
11
12
|
"actions_empty",
|
|
12
13
|
"target_key_empty",
|
|
@@ -41,7 +42,6 @@ var t = /* @__PURE__ */ new Set([
|
|
|
41
42
|
pattern_invalid: "pattern 不是合法的正则表达式",
|
|
42
43
|
data_source_invalid: "数据源定义无效:kind 须为 static / ref / remote 且结构完整",
|
|
43
44
|
request_malformed: "request 必须是对象且 resource / action 为字符串",
|
|
44
|
-
request_incomplete: "request 的 resource / action 尚未填写",
|
|
45
45
|
linkage_malformed: "linkage 结构无效:必须是对象",
|
|
46
46
|
rules_not_array: "rules 必须是数组",
|
|
47
47
|
rule_malformed: "规则结构无效:必须是对象",
|
|
@@ -50,7 +50,7 @@ var t = /* @__PURE__ */ new Set([
|
|
|
50
50
|
condition_malformed: "条件结构无效",
|
|
51
51
|
condition_kind_invalid: "kind 不是受支持的条件类型",
|
|
52
52
|
logic_invalid: "logic 必须为 \"all\" 或 \"any\"",
|
|
53
|
-
condition_group_empty: "
|
|
53
|
+
condition_group_empty: "条件组没有子条件:「全部满足」时规则始终生效,「任一满足」时规则永不生效",
|
|
54
54
|
operator_invalid: "operator 不是受支持的联动操作符",
|
|
55
55
|
source_key_empty: "sourceKey 尚未选择",
|
|
56
56
|
source_empty: "表达式 / 脚本内容为空",
|
|
@@ -81,12 +81,14 @@ var t = /* @__PURE__ */ new Set([
|
|
|
81
81
|
columns_invalid: "columns 必须为 1 到 {max} 之间的整数",
|
|
82
82
|
validate_range_invalid: "{lower} 不能大于 {upper}",
|
|
83
83
|
data_source_ref_unknown: "引用的数据源不存在:{id}",
|
|
84
|
+
request_incomplete: "请求尚未配置完整:缺少{missing}",
|
|
84
85
|
trigger_kind_invalid: "kind \"{kind}\" 不能用于该作用域",
|
|
85
86
|
action_unknown_type: "type \"{type}\" 不是受支持的联动动作",
|
|
86
87
|
state_action_on_edge_trigger: "\"{type}\" 是状态动作,只能用于条件触发",
|
|
87
88
|
state_action_on_form_scope: "\"{type}\" 是状态动作,不能用于表单级联动",
|
|
88
89
|
action_requires_keyed_leaf: "\"{type}\" 只能用于 keyed 叶子字段",
|
|
89
90
|
source_key_unresolved: "sourceKey 未指向同一作用域内已存在的 keyed 节点:{key}",
|
|
91
|
+
source_scope_unknown: "sourceKey 的变量作用域不存在(可用 $form / $vars / $user / $node / $applicant / $globals):{key}",
|
|
90
92
|
target_key_unresolved: "targetKey 未指向同一作用域内已存在的 keyed 节点:{key}",
|
|
91
93
|
cycle_detected: "联动规则存在循环依赖:{cycle}"
|
|
92
94
|
};
|
|
@@ -122,7 +124,9 @@ function u(t) {
|
|
|
122
124
|
function d(e, t, n) {
|
|
123
125
|
if (!u(e)) return [c(t, "request_malformed", void 0, n)];
|
|
124
126
|
let r = [], { action: i, resource: a } = e;
|
|
125
|
-
|
|
127
|
+
typeof a != "string" && r.push(c(`${t}.resource`, "request_malformed", void 0, n)), typeof i != "string" && r.push(c(`${t}.action`, "request_malformed", void 0, n));
|
|
128
|
+
let o = a === "", s = i === "";
|
|
129
|
+
return o && s ? r.push(c(t, "request_incomplete", { missing: "资源(resource)和动作(action)" }, n)) : o ? r.push(c(`${t}.resource`, "request_incomplete", { missing: "资源(resource)" }, n)) : s && r.push(c(`${t}.action`, "request_incomplete", { missing: "动作(action)" }, n)), r;
|
|
126
130
|
}
|
|
127
131
|
//#endregion
|
|
128
132
|
export { c as createIssue, s as formatIssueLine, o as formatIssueMessage, l as hasErrorIssues, u as isRecord, d as validateRemoteRequest };
|
package/dist/es/icons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { DynamicIcon as t, Icon as n } from "@vef-framework-react/components";
|
|
4
4
|
import { BracesIcon as r, CalendarIcon as i, CalendarRangeIcon as a, ChevronDownIcon as o, ChevronRightIcon as s, ChevronUpIcon as c, CircleDotIcon as l, CircleHelpIcon as u, CircleXIcon as d, ClipboardListIcon as f, ClockIcon as p, Code2Icon as m, CodeIcon as h, CopyIcon as g, DatabaseIcon as _, DownloadIcon as v, EllipsisIcon as y, EyeIcon as b, FolderPlusIcon as x, GitBranchIcon as S, GripVerticalIcon as C, HashIcon as w, InfoIcon as T, LayoutGridIcon as E, LayoutListIcon as D, LayoutPanelTopIcon as O, Link2Icon as ee, ListChecksIcon as k, ListTreeIcon as A, MinusIcon as j, MonitorIcon as M, MousePointer2Icon as N, MousePointerClickIcon as P, PaletteIcon as F, PilcrowIcon as I, PlusIcon as L, Redo2Icon as R, RocketIcon as z, SearchIcon as B, Settings2Icon as V, ShieldCheckIcon as H, SlidersHorizontalIcon as U, SmartphoneIcon as W, SquareIcon as G, SquarePenIcon as K, StretchHorizontalIcon as q, TableIcon as J, TextIcon as Y, ToggleLeftIcon as X, Trash2Icon as Z, TriangleAlertIcon as Q, TypeIcon as $, Undo2Icon as te, UploadIcon as ne, XIcon as re } from "lucide-react";
|
package/dist/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { defineContainerDefinition as e, defineFieldDefinition as t } from "./types/component.js";
|
|
3
3
|
import { noopDataSourceResolver as n } from "./types/data-source.js";
|
|
4
4
|
import { isDynamicValue as r } from "./types/dynamic-value.js";
|
|
@@ -9,50 +9,51 @@ import { formatIssueMessage as u } from "./engine/validation.js";
|
|
|
9
9
|
import { createId as d } from "./engine/ids.js";
|
|
10
10
|
import { createEmptySchema as f } from "./engine/schema/nodes.js";
|
|
11
11
|
import { findField as p, findNode as m, findParentContainer as h, isContainerNode as g, isLeafField as _, walkFields as v, walkNodes as y } from "./engine/schema/walk.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
|
|
12
|
+
import { normalizeOptionMapping as b } from "./engine/option-mapping.js";
|
|
13
|
+
import { defaultEvaluateAssignExpression as x, defaultEvaluateExpression as S, defaultEvaluateScriptAction as C, resolveLinkageEvaluators as w } from "./engine/linkage/default-evaluator.js";
|
|
14
|
+
import { generateUniqueKey as T, isKeyedField as E, isKeyedNode as D, nextUniqueKey as O, sanitizeKey as k } from "./engine/keys.js";
|
|
15
|
+
import { LINKAGE_OPERATORS as A } from "./engine/linkage/operators.js";
|
|
16
|
+
import { ALERT_LEVELS as j, EFFECT_ACTION_TYPES as M, FIELD_EVENT_TRIGGER_KINDS as N, FIELD_TRIGGER_KINDS as P, FORM_TRIGGER_KINDS as F, KEYED_ONLY_ACTIONS as I, LINKAGE_ACTION_TYPES as L, STATE_ACTION_TYPES as R, isEffectAction as z, isFieldEventTriggerKind as B, isStateAction as V } from "./engine/linkage/taxonomy.js";
|
|
17
|
+
import { getFieldPermission as H, isWritableFieldPermission as U } from "./engine/linkage/evaluator.js";
|
|
18
|
+
import { validateLinkageSchema as W } from "./engine/linkage/validator.js";
|
|
19
|
+
import { DataSourceProvider as G, useFieldOptions as K } from "./render/data-source-context.js";
|
|
20
|
+
import { Label as q } from "./render/parts/label.js";
|
|
21
|
+
import { FieldShell as J } from "./render/parts/field-shell.js";
|
|
22
|
+
import { checkboxGroupFieldDefinition as Y } from "./components/checkbox-group-field/index.js";
|
|
23
|
+
import { codeEditorDefinition as X } from "./components/code-editor/index.js";
|
|
24
|
+
import { flexDefinition as Z, gridDefinition as Q, sectionDefinition as $, subformDefinition as ee, tabsDefinition as te } from "./components/containers/index.js";
|
|
25
|
+
import { dateFieldDefinition as ne, dateRangeFieldDefinition as re, datetimeFieldDefinition as ie } from "./components/date-field/index.js";
|
|
26
|
+
import { alertBlockDefinition as ae, dividerDefinition as oe, paragraphDefinition as se } from "./components/display/index.js";
|
|
27
|
+
import { numberFieldDefinition as ce } from "./components/number-field/index.js";
|
|
28
|
+
import { radioFieldDefinition as le } from "./components/radio-field/index.js";
|
|
29
|
+
import { selectFieldDefinition as ue } from "./components/select-field/index.js";
|
|
30
|
+
import { switchFieldDefinition as de } from "./components/switch-field/index.js";
|
|
31
|
+
import { textareaFieldDefinition as fe } from "./components/textarea-field/index.js";
|
|
32
|
+
import { textfieldDefinition as pe } from "./components/textfield/index.js";
|
|
33
|
+
import { uploadFieldDefinition as me } from "./components/upload-field/index.js";
|
|
34
|
+
import { useMobileScopeContainer as he } from "./components/mobile/scope.js";
|
|
35
|
+
import { mobileFieldDefinitions as ge } from "./components/mobile/definitions.js";
|
|
36
|
+
import { FormFieldRegistry as _e } from "./engine/registry/form-field-registry.js";
|
|
37
|
+
import { createDefaultRegistry as ve, registerDefaults as ye } from "./engine/registry/defaults.js";
|
|
38
|
+
import { createDefaultMobileRegistry as be } from "./engine/registry/defaults-mobile.js";
|
|
39
|
+
import { DeviceProvider as xe, RegistryProvider as Se, useDeviceRegistries as Ce, useFieldRegistry as we } from "./store/engine-provider.js";
|
|
40
|
+
import { editField as Te, removeBlock as Ee, updateNode as De } from "./engine/schema/mutate.js";
|
|
41
|
+
import { cloneBlock as Oe, insertBlock as ke, moveBlock as Ae, setFlex as je, setSpan as Me } from "./engine/schema/edit-ops.js";
|
|
42
|
+
import { currentLayer as Ne, emptyLayer as Pe, resolvePresentation as Fe, toRuntimeSchema as Ie, withPresentation as Le } from "./engine/schema/presentation.js";
|
|
43
|
+
import { validateSchema as Re } from "./engine/schema/validate.js";
|
|
44
|
+
import { FormEditorStoreProvider as ze, isPaletteVisible as Be, useCurrentLayer as Ve, useFormEditorStore as He, useFormEditorStoreApi as Ue } from "./store/form-store.js";
|
|
45
|
+
import { FormRenderer as We } from "./render/form-renderer.js";
|
|
46
|
+
import { ConversionRegistry as Ge, convertPresentation as Ke, createDefaultConversionRules as qe } from "./engine/conversion/index.js";
|
|
47
|
+
import { LinkageRulesEntry as Je } from "./editor/properties/entries/linkage/linkage-rules-entry.js";
|
|
48
|
+
import { CheckboxEntry as Ye } from "./editor/properties/entries/checkbox-entry.js";
|
|
49
|
+
import { IconEntry as Xe } from "./editor/properties/entries/icon-entry.js";
|
|
50
|
+
import { KeyEntry as Ze } from "./editor/properties/entries/key-entry.js";
|
|
51
|
+
import { NumberEntry as Qe } from "./editor/properties/entries/number-entry.js";
|
|
52
|
+
import { OptionsSourceEntry as $e } from "./editor/properties/entries/options-source/index.js";
|
|
53
|
+
import { SelectEntry as et } from "./editor/properties/entries/select-entry.js";
|
|
54
|
+
import { TextEntry as tt } from "./editor/properties/entries/text-entry.js";
|
|
55
|
+
import { Toolbar as nt } from "./editor/toolbar/toolbar.js";
|
|
56
|
+
import { FormEditor as rt, FormEditorProvider as it, FormEditorShell as at, FormEditorStage as ot, FormEditorWorkspace as st } from "./editor/form-editor.js";
|
|
57
|
+
import { inferColumnType as ct, toColumnDefinitions as lt } from "./engine/schema/column-type.js";
|
|
58
|
+
import { toFormFieldDefinitions as ut } from "./engine/schema/permission-bridge.js";
|
|
59
|
+
export { j as ALERT_LEVELS, a as CONTAINER_TYPES, Ye as CheckboxEntry, Ge as ConversionRegistry, o as DEFAULT_GAP_SCALE, G as DataSourceProvider, xe as DeviceProvider, M as EFFECT_ACTION_TYPES, N as FIELD_EVENT_TRIGGER_KINDS, P as FIELD_TRIGGER_KINDS, F as FORM_TRIGGER_KINDS, J as FieldShell, rt as FormEditor, it as FormEditorProvider, at as FormEditorShell, ot as FormEditorStage, ze as FormEditorStoreProvider, nt as FormEditorToolbar, st as FormEditorWorkspace, _e as FormFieldRegistry, We as FormRenderer, s as GAP_SCALES, Xe as IconEntry, I as KEYED_ONLY_ACTIONS, Ze as KeyEntry, L as LINKAGE_ACTION_TYPES, A as LINKAGE_OPERATORS, q as Label, Je as LinkageRulesEntry, Qe as NumberEntry, $e as OptionsSourceEntry, c as ROW_COLS, Se as RegistryProvider, R as STATE_ACTION_TYPES, et as SelectEntry, tt as TextEntry, ae as alertBlockDefinition, l as buttonDefinition, Y as checkboxGroupFieldDefinition, Oe as cloneBlock, X as codeEditorDefinition, Ke as convertPresentation, qe as createDefaultConversionRules, be as createDefaultMobileRegistry, ve as createDefaultRegistry, f as createEmptySchema, d as createId, Ne as currentLayer, ne as dateFieldDefinition, re as dateRangeFieldDefinition, ie as datetimeFieldDefinition, x as defaultEvaluateAssignExpression, S as defaultEvaluateExpression, C as defaultEvaluateScriptAction, e as defineContainerDefinition, t as defineFieldDefinition, i as definePropertyEntry, oe as dividerDefinition, Te as editField, Pe as emptyLayer, p as findField, m as findNode, h as findParentContainer, Z as flexDefinition, u as formatIssueMessage, T as generateUniqueKey, H as getFieldPermission, Q as gridDefinition, ct as inferColumnType, ke as insertBlock, g as isContainerNode, r as isDynamicValue, z as isEffectAction, B as isFieldEventTriggerKind, E as isKeyedField, D as isKeyedNode, _ as isLeafField, Be as isPaletteVisible, V as isStateAction, U as isWritableFieldPermission, ge as mobileFieldDefinitions, Ae as moveBlock, O as nextUniqueKey, n as noopDataSourceResolver, b as normalizeOptionMapping, ce as numberFieldDefinition, se as paragraphDefinition, le as radioFieldDefinition, ye as registerDefaults, Ee as removeBlock, w as resolveLinkageEvaluators, Fe as resolvePresentation, k as sanitizeKey, $ as sectionDefinition, ue as selectFieldDefinition, je as setFlex, Me as setSpan, ee as subformDefinition, de as switchFieldDefinition, te as tabsDefinition, fe as textareaFieldDefinition, pe as textfieldDefinition, lt as toColumnDefinitions, ut as toFormFieldDefinitions, Ie as toRuntimeSchema, De as updateNode, me as uploadFieldDefinition, Ve as useCurrentLayer, Ce as useDeviceRegistries, K as useFieldOptions, we as useFieldRegistry, He as useFormEditorStore, Ue as useFormEditorStoreApi, he as useMobileScopeContainer, W as validateLinkageSchema, Re as validateSchema, v as walkFields, y as walkNodes, Le as withPresentation };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
3
|
import { FieldFooter as t } from "../parts/field-shell.js";
|
|
4
4
|
import { SECTION_PANEL_KEY as n, subformBodyCss as r, subformRemoveCss as i, subformRowBodyCss as a, subformRowCss as o } from "./subform-shell.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { EditorIcon as e } from "../../icons.js";
|
|
3
3
|
import { FieldFooter as t } from "../parts/field-shell.js";
|
|
4
4
|
import { SECTION_PANEL_KEY as n, subformBodyCss as r, subformRemoveCss as i, subformRowBodyCss as a, subformRowCss as o } from "./subform-shell.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { css as e } from "@emotion/react";
|
|
3
3
|
import { globalCssVars as t } from "@vef-framework-react/components";
|
|
4
4
|
//#region src/render/chrome/subform-shell.ts
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { noopDataSourceResolver as e } from "../types/data-source.js";
|
|
3
3
|
import { resolveRequestParams as t } from "../engine/data-source-params.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { normalizeOptionMapping as n } from "../engine/option-mapping.js";
|
|
5
|
+
import { paramEvaluatorFor as r, useDataSourceParamScope as i } from "./data-source-param-scope.js";
|
|
6
|
+
import { jsx as a } from "@emotion/react/jsx-runtime";
|
|
7
|
+
import { createContext as o, use as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
7
8
|
//#region src/render/data-source-context.tsx
|
|
8
|
-
var
|
|
9
|
-
dataSources:
|
|
9
|
+
var f = {}, p = [], m = o({
|
|
10
|
+
dataSources: p,
|
|
10
11
|
resolver: e,
|
|
11
|
-
versions:
|
|
12
|
+
versions: f,
|
|
12
13
|
cache: /* @__PURE__ */ new Map()
|
|
13
14
|
});
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
let [o] =
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
value:
|
|
19
|
-
dataSources: n ??
|
|
15
|
+
m.displayName = "DataSourceContext";
|
|
16
|
+
function h({ children: t, dataSources: n, resolver: r, versions: i }) {
|
|
17
|
+
let [o] = d(() => /* @__PURE__ */ new Map());
|
|
18
|
+
return /* @__PURE__ */ a(m, {
|
|
19
|
+
value: l(() => ({
|
|
20
|
+
dataSources: n ?? p,
|
|
20
21
|
resolver: r ?? e,
|
|
21
|
-
versions:
|
|
22
|
+
versions: i ?? f,
|
|
22
23
|
cache: o
|
|
23
24
|
}), [
|
|
24
25
|
n,
|
|
25
26
|
r,
|
|
26
|
-
|
|
27
|
+
i,
|
|
27
28
|
o
|
|
28
29
|
]),
|
|
29
30
|
children: t
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function g(e, t) {
|
|
33
34
|
if (!e || e.kind === "static") return {
|
|
34
35
|
kind: "static",
|
|
35
36
|
options: e?.kind === "static" ? e.options : []
|
|
@@ -37,40 +38,40 @@ function h(e, t) {
|
|
|
37
38
|
if (e.kind === "remote") return {
|
|
38
39
|
kind: "remote",
|
|
39
40
|
request: e.request,
|
|
40
|
-
mapping: e.mapping
|
|
41
|
+
mapping: n(e.mapping)
|
|
41
42
|
};
|
|
42
|
-
let
|
|
43
|
-
return
|
|
43
|
+
let r = t.find((t) => t.id === e.dataSourceId);
|
|
44
|
+
return r ? r.kind === "static" ? {
|
|
44
45
|
kind: "static",
|
|
45
|
-
options:
|
|
46
|
+
options: r.options
|
|
46
47
|
} : {
|
|
47
48
|
kind: "remote",
|
|
48
|
-
request:
|
|
49
|
-
mapping: n.mapping,
|
|
50
|
-
refreshId:
|
|
49
|
+
request: r.request,
|
|
50
|
+
mapping: n(r.mapping),
|
|
51
|
+
refreshId: r.id
|
|
51
52
|
} : {
|
|
52
53
|
kind: "static",
|
|
53
54
|
options: []
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
|
-
var
|
|
57
|
+
var _ = {
|
|
57
58
|
loading: !1,
|
|
58
59
|
error: !1
|
|
59
60
|
};
|
|
60
|
-
function
|
|
61
|
-
let { cache:
|
|
62
|
-
|
|
61
|
+
function v(e) {
|
|
62
|
+
let { cache: n, dataSources: a, resolver: o, versions: f } = s(m), p = l(() => g(e, a), [e, a]), h = i(), v = l(() => p.kind === "remote" ? t(p.request, r(h)) : null, [p, h]), y = p.kind === "remote" ? p.refreshId : void 0, b = p.kind === "remote" ? p.mapping : void 0, x = y === void 0 ? 0 : f[y] ?? 0, S = l(() => p.kind === "remote" && v !== null ? `${x}\u{0}${JSON.stringify(v)}\u{0}${JSON.stringify(p.mapping ?? null)}` : null, [
|
|
63
|
+
p,
|
|
63
64
|
v,
|
|
64
65
|
x
|
|
65
|
-
]), [C, w] =
|
|
66
|
-
options: (S === null ? void 0 :
|
|
66
|
+
]), [C, w] = d(() => ({
|
|
67
|
+
options: (S === null ? void 0 : n.get(S)) ?? [],
|
|
67
68
|
loading: !1,
|
|
68
69
|
error: !1
|
|
69
|
-
})), T =
|
|
70
|
-
return T.current = v,
|
|
70
|
+
})), T = u(v);
|
|
71
|
+
return T.current = v, c(() => {
|
|
71
72
|
let e = T.current;
|
|
72
73
|
if (e === null || S === null) return;
|
|
73
|
-
let t =
|
|
74
|
+
let t = n.get(S);
|
|
74
75
|
if (t) {
|
|
75
76
|
w({
|
|
76
77
|
options: t,
|
|
@@ -79,36 +80,36 @@ function _(e) {
|
|
|
79
80
|
});
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
|
-
let
|
|
83
|
+
let r = !1;
|
|
83
84
|
return w((e) => ({
|
|
84
85
|
options: e.options,
|
|
85
86
|
loading: !0,
|
|
86
87
|
error: !1
|
|
87
|
-
})),
|
|
88
|
-
|
|
88
|
+
})), o.resolve(e, b).then((e) => {
|
|
89
|
+
n.set(S, e), r || w({
|
|
89
90
|
options: e,
|
|
90
91
|
loading: !1,
|
|
91
92
|
error: !1
|
|
92
93
|
});
|
|
93
94
|
}).catch((e) => {
|
|
94
|
-
|
|
95
|
+
r || (console.warn(`[form-editor] data source "${y ?? "(inline remote)"}" failed to resolve:`, e), w((e) => ({
|
|
95
96
|
options: e.options,
|
|
96
97
|
loading: !1,
|
|
97
98
|
error: !0
|
|
98
99
|
})));
|
|
99
100
|
}), () => {
|
|
100
|
-
|
|
101
|
+
r = !0;
|
|
101
102
|
};
|
|
102
103
|
}, [
|
|
103
|
-
|
|
104
|
+
n,
|
|
104
105
|
S,
|
|
105
106
|
b,
|
|
106
107
|
y,
|
|
107
|
-
|
|
108
|
-
]),
|
|
109
|
-
options:
|
|
110
|
-
...
|
|
108
|
+
o
|
|
109
|
+
]), p.kind === "static" ? {
|
|
110
|
+
options: p.options,
|
|
111
|
+
..._
|
|
111
112
|
} : C;
|
|
112
113
|
}
|
|
113
114
|
//#endregion
|
|
114
|
-
export {
|
|
115
|
+
export { h as DataSourceProvider, v as useFieldOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { resolveLinkageEvaluators as e } from "../engine/linkage/default-evaluator.js";
|
|
3
3
|
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { createContext as n, use as r, useMemo as i } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
2
|
import { isKeyedField as e } from "../engine/keys.js";
|
|
3
3
|
import { useFieldRegistry as t } from "../store/engine-provider.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
|