@vef-framework-react/form-editor 2.24.0 → 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,21 +1,22 @@
|
|
|
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 { createIssue as e, isRecord as t, validateRemoteRequest as n } from "../validation.js";
|
|
3
3
|
import { hasConditionTriggeredShow as r } from "./shape.js";
|
|
4
4
|
import { isLeafField as i, walkNodes as a } from "../schema/walk.js";
|
|
5
|
-
import "../assert-never.js";
|
|
6
|
-
import { isKeyedNode as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { assertNever as o } from "../assert-never.js";
|
|
6
|
+
import { isKeyedNode as s } from "../keys.js";
|
|
7
|
+
import { parseLeafSource as c } from "./scope.js";
|
|
8
|
+
import { LINKAGE_OPERATORS as l } from "./operators.js";
|
|
9
|
+
import { ALERT_LEVELS as u, FIELD_TRIGGER_KINDS as d, FORM_TRIGGER_KINDS as f, KEYED_ONLY_ACTIONS as p, LINKAGE_ACTION_TYPES as m, isStateAction as h } from "./taxonomy.js";
|
|
10
|
+
import { collectConditionSourceKeys as g } from "./source-tracking.js";
|
|
11
|
+
import { findLinkageCycles as _ } from "./cycle.js";
|
|
11
12
|
//#region src/engine/linkage/validator.ts
|
|
12
|
-
var
|
|
13
|
-
triggerKinds:
|
|
13
|
+
var v = {
|
|
14
|
+
triggerKinds: d,
|
|
14
15
|
allowStateActions: !0
|
|
15
|
-
},
|
|
16
|
-
triggerKinds:
|
|
16
|
+
}, y = {
|
|
17
|
+
triggerKinds: f,
|
|
17
18
|
allowStateActions: !1
|
|
18
|
-
},
|
|
19
|
+
}, b = new Set(m), x = new Set(l), S = new Set(u), C = {
|
|
19
20
|
show: !1,
|
|
20
21
|
hide: !1,
|
|
21
22
|
enable: !1,
|
|
@@ -24,78 +25,78 @@ var g = {
|
|
|
24
25
|
optional: !1,
|
|
25
26
|
assign: !0,
|
|
26
27
|
script: !0
|
|
27
|
-
},
|
|
28
|
-
function
|
|
28
|
+
}, w = new Set(Object.keys(C).filter((e) => C[e]));
|
|
29
|
+
function T(e) {
|
|
29
30
|
return e.join("/");
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
let i = [],
|
|
32
|
+
function E(n, r) {
|
|
33
|
+
let i = [], o = /* @__PURE__ */ new Map();
|
|
33
34
|
a(n, (e, t) => {
|
|
34
|
-
if (!
|
|
35
|
-
let n =
|
|
36
|
-
r.set(e.key, e),
|
|
35
|
+
if (!s(e)) return;
|
|
36
|
+
let n = T(t), r = o.get(n) ?? /* @__PURE__ */ new Map();
|
|
37
|
+
r.set(e.key, e), o.set(n, r);
|
|
37
38
|
});
|
|
38
39
|
let c = /* @__PURE__ */ new Map();
|
|
39
40
|
a(n, (n, r) => {
|
|
40
41
|
let { linkage: a } = n;
|
|
41
42
|
if (a === void 0) return;
|
|
42
|
-
let
|
|
43
|
+
let s = `node[${n.id}].linkage`;
|
|
43
44
|
if (!t(a)) {
|
|
44
|
-
i.push(e(
|
|
45
|
+
i.push(e(s, "linkage_malformed"));
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
let l =
|
|
48
|
-
|
|
48
|
+
let l = T(r), u = o.get(l) ?? /* @__PURE__ */ new Map();
|
|
49
|
+
O({
|
|
49
50
|
block: n,
|
|
50
51
|
defaults: a.defaults,
|
|
51
52
|
issues: i,
|
|
52
|
-
where:
|
|
53
|
-
}),
|
|
53
|
+
where: s
|
|
54
|
+
}), A({
|
|
54
55
|
block: n,
|
|
55
56
|
edges: c,
|
|
56
57
|
issues: i,
|
|
57
58
|
keyedNodes: u,
|
|
58
|
-
policy:
|
|
59
|
+
policy: v,
|
|
59
60
|
rules: a.rules,
|
|
60
61
|
scopeKey: l,
|
|
61
|
-
where:
|
|
62
|
-
}),
|
|
62
|
+
where: s
|
|
63
|
+
}), k({
|
|
63
64
|
defaults: a.defaults,
|
|
64
65
|
issues: i,
|
|
65
66
|
rules: a.rules,
|
|
66
|
-
where:
|
|
67
|
+
where: s
|
|
67
68
|
});
|
|
68
|
-
}), r !== void 0 && (t(r) ? (r.defaults !== void 0 && i.push(e("schema.linkage.defaults", "defaults_on_form_scope")),
|
|
69
|
+
}), r !== void 0 && (t(r) ? (r.defaults !== void 0 && i.push(e("schema.linkage.defaults", "defaults_on_form_scope")), A({
|
|
69
70
|
block: null,
|
|
70
71
|
edges: c,
|
|
71
72
|
issues: i,
|
|
72
|
-
keyedNodes:
|
|
73
|
-
policy:
|
|
73
|
+
keyedNodes: o.get(T([])) ?? /* @__PURE__ */ new Map(),
|
|
74
|
+
policy: y,
|
|
74
75
|
rules: r.rules,
|
|
75
|
-
scopeKey:
|
|
76
|
+
scopeKey: T([]),
|
|
76
77
|
where: "schema.linkage"
|
|
77
78
|
})) : i.push(e("schema.linkage", "linkage_malformed")));
|
|
78
|
-
for (let t of
|
|
79
|
+
for (let t of _(c)) i.push(e("linkage", "cycle_detected", { cycle: t }));
|
|
79
80
|
return { issues: i };
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
return i(e) &&
|
|
82
|
+
function D(e) {
|
|
83
|
+
return i(e) && s(e);
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function O(n) {
|
|
85
86
|
let { block: r, defaults: i, issues: a, where: o } = n;
|
|
86
87
|
if (i !== void 0) {
|
|
87
88
|
if (!t(i)) {
|
|
88
89
|
a.push(e(`${o}.defaults`, "linkage_malformed"));
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
91
|
-
i.required === !0 && !
|
|
92
|
+
i.required === !0 && !D(r) && a.push(e(`${o}.defaults.required`, "defaults_requires_keyed_leaf"));
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function k(n) {
|
|
95
96
|
let { defaults: i, issues: a, rules: o, where: s } = n;
|
|
96
97
|
!t(i) || i.hidden !== !0 || r(o) || a.push(e(`${s}.defaults.hidden`, "default_hidden_unreachable"));
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
+
function A(t) {
|
|
99
100
|
let { block: n, edges: r, issues: i, keyedNodes: a, policy: o, rules: s, scopeKey: c, where: l } = t;
|
|
100
101
|
if (s === void 0) return;
|
|
101
102
|
if (!Array.isArray(s)) {
|
|
@@ -103,7 +104,7 @@ function O(t) {
|
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
106
|
let u = s;
|
|
106
|
-
for (let [e, t] of u.entries())
|
|
107
|
+
for (let [e, t] of u.entries()) j({
|
|
107
108
|
block: n,
|
|
108
109
|
edges: r,
|
|
109
110
|
issues: i,
|
|
@@ -114,38 +115,38 @@ function O(t) {
|
|
|
114
115
|
where: `${l}.rules[${e}]`
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
-
let { block: r, edges: i, issues: a, keyedNodes:
|
|
118
|
+
function j(n) {
|
|
119
|
+
let { block: r, edges: i, issues: a, keyedNodes: o, policy: c, rule: l, scopeKey: u, where: d } = n;
|
|
119
120
|
if (!t(l)) {
|
|
120
121
|
a.push(e(d, "rule_malformed"));
|
|
121
122
|
return;
|
|
122
123
|
}
|
|
123
124
|
let f = typeof l.id == "string" && l.id.length > 0 ? l.id : void 0;
|
|
124
125
|
f === void 0 && a.push(e(`${d}.id`, "id_required"));
|
|
125
|
-
let
|
|
126
|
+
let p = M({
|
|
126
127
|
block: r,
|
|
127
128
|
issues: a,
|
|
128
|
-
keyedNodes:
|
|
129
|
+
keyedNodes: o,
|
|
129
130
|
policy: c,
|
|
130
131
|
ruleId: f,
|
|
131
132
|
trigger: l.trigger,
|
|
132
133
|
where: `${d}.trigger`
|
|
133
|
-
}),
|
|
134
|
+
}), m = p !== void 0 && p.kind !== "condition", g = N({
|
|
134
135
|
actions: l.actions,
|
|
135
136
|
block: r,
|
|
136
|
-
isEdge:
|
|
137
|
+
isEdge: m,
|
|
137
138
|
issues: a,
|
|
138
|
-
keyedNodes:
|
|
139
|
+
keyedNodes: o,
|
|
139
140
|
policy: c,
|
|
140
141
|
ruleId: f,
|
|
141
142
|
where: `${d}.actions`
|
|
142
|
-
}), _ = g.some((e) =>
|
|
143
|
-
if (
|
|
143
|
+
}), _ = g.some((e) => h(e) && w.has(e.type));
|
|
144
|
+
if (p?.kind === "condition") {
|
|
144
145
|
let e = [];
|
|
145
|
-
c.allowStateActions && _ && r &&
|
|
146
|
+
c.allowStateActions && _ && r && s(r) && e.push(r.key);
|
|
146
147
|
for (let t of g) t.type === "set_field" && t.retrigger === "always" && t.targetKey !== "" && e.push(t.targetKey);
|
|
147
|
-
for (let t of e)
|
|
148
|
-
condition:
|
|
148
|
+
for (let t of e) H({
|
|
149
|
+
condition: p.condition,
|
|
149
150
|
edges: i,
|
|
150
151
|
issues: a,
|
|
151
152
|
ruleId: f,
|
|
@@ -155,7 +156,7 @@ function k(n) {
|
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
+
function M(n) {
|
|
159
160
|
let { block: r, issues: i, keyedNodes: a, policy: o, ruleId: s, trigger: c, where: l } = n;
|
|
160
161
|
if (!t(c) || typeof c.kind != "string") {
|
|
161
162
|
i.push(e(l, "trigger_malformed", void 0, s));
|
|
@@ -165,11 +166,11 @@ function A(n) {
|
|
|
165
166
|
i.push(e(`${l}.kind`, "trigger_kind_invalid", { kind: c.kind }, s));
|
|
166
167
|
return;
|
|
167
168
|
}
|
|
168
|
-
if (c.kind === "change" && r !== null && !
|
|
169
|
+
if (c.kind === "change" && r !== null && !D(r)) {
|
|
169
170
|
i.push(e(`${l}.kind`, "trigger_requires_keyed_leaf", void 0, s));
|
|
170
171
|
return;
|
|
171
172
|
}
|
|
172
|
-
if (!(c.kind === "condition" && !
|
|
173
|
+
if (!(c.kind === "condition" && !L({
|
|
173
174
|
condition: c.condition,
|
|
174
175
|
issues: i,
|
|
175
176
|
keyedNodes: a,
|
|
@@ -177,13 +178,13 @@ function A(n) {
|
|
|
177
178
|
where: `${l}.condition`
|
|
178
179
|
}))) return c;
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
+
function N(t) {
|
|
181
182
|
let { actions: n, block: r, isEdge: i, issues: a, keyedNodes: o, policy: s, ruleId: c, where: l } = t;
|
|
182
183
|
if (!Array.isArray(n)) return a.push(e(l, "actions_not_array", void 0, c)), [];
|
|
183
184
|
if (n.length === 0) return a.push(e(l, "actions_empty", void 0, c)), [];
|
|
184
185
|
let u = n, d = [];
|
|
185
186
|
for (let [e, t] of u.entries()) {
|
|
186
|
-
let n =
|
|
187
|
+
let n = P({
|
|
187
188
|
action: t,
|
|
188
189
|
block: r,
|
|
189
190
|
isEdge: i,
|
|
@@ -197,18 +198,18 @@ function j(t) {
|
|
|
197
198
|
}
|
|
198
199
|
return d;
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
+
function P(n) {
|
|
201
202
|
let { action: r, block: i, isEdge: a, issues: o, keyedNodes: s, policy: c, ruleId: l, where: u } = n;
|
|
202
203
|
if (!t(r)) {
|
|
203
204
|
o.push(e(u, "action_malformed", void 0, l));
|
|
204
205
|
return;
|
|
205
206
|
}
|
|
206
|
-
if (typeof r.type != "string" || !
|
|
207
|
+
if (typeof r.type != "string" || !b.has(r.type)) {
|
|
207
208
|
o.push(e(`${u}.type`, "action_unknown_type", { type: String(r.type) }, l));
|
|
208
209
|
return;
|
|
209
210
|
}
|
|
210
211
|
let d = r;
|
|
211
|
-
if (
|
|
212
|
+
if (h(d)) {
|
|
212
213
|
if (a) {
|
|
213
214
|
o.push(e(`${u}.type`, "state_action_on_edge_trigger", { type: d.type }, l));
|
|
214
215
|
return;
|
|
@@ -217,7 +218,7 @@ function M(n) {
|
|
|
217
218
|
o.push(e(`${u}.type`, "state_action_on_form_scope", { type: d.type }, l));
|
|
218
219
|
return;
|
|
219
220
|
}
|
|
220
|
-
return
|
|
221
|
+
return F({
|
|
221
222
|
action: d,
|
|
222
223
|
block: i,
|
|
223
224
|
issues: o,
|
|
@@ -226,7 +227,7 @@ function M(n) {
|
|
|
226
227
|
}), d;
|
|
227
228
|
}
|
|
228
229
|
let { retrigger: f } = r;
|
|
229
|
-
return f !== void 0 && (f !== "edge" && f !== "always" ? o.push(e(`${u}.retrigger`, "retrigger_invalid", void 0, l)) : a && o.push(e(`${u}.retrigger`, "retrigger_ignored", void 0, l))),
|
|
230
|
+
return f !== void 0 && (f !== "edge" && f !== "always" ? o.push(e(`${u}.retrigger`, "retrigger_invalid", void 0, l)) : a && o.push(e(`${u}.retrigger`, "retrigger_ignored", void 0, l))), I({
|
|
230
231
|
action: d,
|
|
231
232
|
issues: o,
|
|
232
233
|
keyedNodes: s,
|
|
@@ -234,21 +235,21 @@ function M(n) {
|
|
|
234
235
|
where: u
|
|
235
236
|
}), d;
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function F(t) {
|
|
238
239
|
let { action: n, block: r, issues: i, ruleId: a, where: o } = t;
|
|
239
|
-
|
|
240
|
+
p.has(n.type) && (!r || !D(r)) && i.push(e(`${o}.type`, "action_requires_keyed_leaf", { type: n.type }, a)), n.type === "assign" ? V({
|
|
240
241
|
issues: i,
|
|
241
242
|
ruleId: a,
|
|
242
243
|
value: n.value,
|
|
243
244
|
where: `${o}.value`
|
|
244
245
|
}) : n.type === "script" && (typeof n.source == "string" ? n.source.length === 0 && i.push(e(`${o}.source`, "source_empty", void 0, a)) : i.push(e(`${o}.source`, "action_malformed", void 0, a)));
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
+
function I(t) {
|
|
247
248
|
let { action: r, issues: i, keyedNodes: a, ruleId: o, where: s } = t;
|
|
248
249
|
switch (r.type) {
|
|
249
250
|
case "set_field": {
|
|
250
251
|
let { targetKey: t } = r;
|
|
251
|
-
typeof t == "string" ? t.length === 0 ? i.push(e(`${s}.targetKey`, "target_key_empty", void 0, o)) : a.has(t) || i.push(e(`${s}.targetKey`, "target_key_unresolved", { key: t }, o)) : i.push(e(`${s}.targetKey`, "action_malformed", void 0, o)),
|
|
252
|
+
typeof t == "string" ? t.length === 0 ? i.push(e(`${s}.targetKey`, "target_key_empty", void 0, o)) : a.has(t) || i.push(e(`${s}.targetKey`, "target_key_unresolved", { key: t }, o)) : i.push(e(`${s}.targetKey`, "action_malformed", void 0, o)), V({
|
|
252
253
|
issues: i,
|
|
253
254
|
ruleId: o,
|
|
254
255
|
value: r.value,
|
|
@@ -258,7 +259,7 @@ function P(t) {
|
|
|
258
259
|
}
|
|
259
260
|
case "set_variable": {
|
|
260
261
|
let { variable: t } = r;
|
|
261
|
-
typeof t == "string" ? t.length === 0 && i.push(e(`${s}.variable`, "variable_empty", void 0, o)) : i.push(e(`${s}.variable`, "action_malformed", void 0, o)),
|
|
262
|
+
typeof t == "string" ? t.length === 0 && i.push(e(`${s}.variable`, "variable_empty", void 0, o)) : i.push(e(`${s}.variable`, "action_malformed", void 0, o)), V({
|
|
262
263
|
issues: i,
|
|
263
264
|
ruleId: o,
|
|
264
265
|
value: r.value,
|
|
@@ -273,7 +274,7 @@ function P(t) {
|
|
|
273
274
|
}
|
|
274
275
|
case "alert": {
|
|
275
276
|
let { level: t } = r;
|
|
276
|
-
t !== void 0 && !
|
|
277
|
+
t !== void 0 && !S.has(t) && i.push(e(`${s}.level`, "alert_level_invalid", void 0, o)), V({
|
|
277
278
|
issues: i,
|
|
278
279
|
ruleId: o,
|
|
279
280
|
value: r.message,
|
|
@@ -282,7 +283,7 @@ function P(t) {
|
|
|
282
283
|
return;
|
|
283
284
|
}
|
|
284
285
|
case "navigate":
|
|
285
|
-
|
|
286
|
+
V({
|
|
286
287
|
issues: i,
|
|
287
288
|
ruleId: o,
|
|
288
289
|
value: r.to,
|
|
@@ -297,18 +298,18 @@ function P(t) {
|
|
|
297
298
|
default:
|
|
298
299
|
}
|
|
299
300
|
}
|
|
300
|
-
function
|
|
301
|
+
function L(n) {
|
|
301
302
|
let { condition: r, issues: i, keyedNodes: a, ruleId: o, where: s } = n;
|
|
302
303
|
if (!t(r)) return i.push(e(s, "condition_malformed", void 0, o)), !1;
|
|
303
304
|
switch (r.kind) {
|
|
304
|
-
case "leaf": return
|
|
305
|
+
case "leaf": return z({
|
|
305
306
|
condition: r,
|
|
306
307
|
issues: i,
|
|
307
308
|
keyedNodes: a,
|
|
308
309
|
ruleId: o,
|
|
309
310
|
where: s
|
|
310
311
|
});
|
|
311
|
-
case "group": return
|
|
312
|
+
case "group": return B({
|
|
312
313
|
condition: r,
|
|
313
314
|
issues: i,
|
|
314
315
|
keyedNodes: a,
|
|
@@ -319,17 +320,36 @@ function F(n) {
|
|
|
319
320
|
default: return i.push(e(`${s}.kind`, "condition_kind_invalid", void 0, o)), !1;
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
|
-
function
|
|
323
|
+
function R(t) {
|
|
324
|
+
let { issues: n, keyedNodes: r, ruleId: i, sourceKey: a, where: s } = t, l = c(a);
|
|
325
|
+
switch (l.kind) {
|
|
326
|
+
case "form":
|
|
327
|
+
r.has(l.key) || n.push(e(s, "source_key_unresolved", { key: a }, i));
|
|
328
|
+
return;
|
|
329
|
+
case "context": return;
|
|
330
|
+
case "unknown":
|
|
331
|
+
n.push(e(s, "source_scope_unknown", { key: a }, i));
|
|
332
|
+
return;
|
|
333
|
+
default: o(l);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function z(t) {
|
|
323
337
|
let { condition: n, issues: r, keyedNodes: i, ruleId: a, where: o } = t, s = !0, { operator: c, sourceKey: l } = n;
|
|
324
|
-
return typeof l == "string" ? l.length === 0 ? r.push(e(`${o}.sourceKey`, "source_key_empty", void 0, a)) :
|
|
338
|
+
return typeof l == "string" ? l.length === 0 ? r.push(e(`${o}.sourceKey`, "source_key_empty", void 0, a)) : R({
|
|
339
|
+
issues: r,
|
|
340
|
+
keyedNodes: i,
|
|
341
|
+
ruleId: a,
|
|
342
|
+
sourceKey: l,
|
|
343
|
+
where: `${o}.sourceKey`
|
|
344
|
+
}) : (r.push(e(`${o}.sourceKey`, "condition_malformed", void 0, a)), s = !1), (typeof c != "string" || !x.has(c)) && (r.push(e(`${o}.operator`, "operator_invalid", void 0, a)), s = !1), s;
|
|
325
345
|
}
|
|
326
|
-
function
|
|
346
|
+
function B(t) {
|
|
327
347
|
let { condition: n, issues: r, keyedNodes: i, ruleId: a, where: o } = t, s = !0;
|
|
328
348
|
if (n.logic !== "all" && n.logic !== "any" && (r.push(e(`${o}.logic`, "logic_invalid", void 0, a)), s = !1), !Array.isArray(n.children)) return r.push(e(`${o}.children`, "children_not_array", void 0, a)), !1;
|
|
329
349
|
let { children: c } = n;
|
|
330
350
|
c.length === 0 && r.push(e(`${o}.children`, "condition_group_empty", void 0, a));
|
|
331
351
|
for (let [e, t] of c.entries()) {
|
|
332
|
-
let n =
|
|
352
|
+
let n = L({
|
|
333
353
|
condition: t,
|
|
334
354
|
issues: r,
|
|
335
355
|
keyedNodes: i,
|
|
@@ -340,7 +360,7 @@ function L(t) {
|
|
|
340
360
|
}
|
|
341
361
|
return s;
|
|
342
362
|
}
|
|
343
|
-
function
|
|
363
|
+
function V(n) {
|
|
344
364
|
let { issues: r, ruleId: i, value: a, where: o } = n;
|
|
345
365
|
if (!t(a)) {
|
|
346
366
|
r.push(e(o, "value_malformed", void 0, i));
|
|
@@ -354,9 +374,9 @@ function R(n) {
|
|
|
354
374
|
r.push(e(`${o}.kind`, "value_malformed", void 0, i));
|
|
355
375
|
}
|
|
356
376
|
}
|
|
357
|
-
function
|
|
377
|
+
function H(t) {
|
|
358
378
|
let { condition: n, edges: r, issues: i, ruleId: a, scopeKey: o, targetKey: s, where: c } = t, l = /* @__PURE__ */ new Set();
|
|
359
|
-
|
|
379
|
+
g(n, l);
|
|
360
380
|
for (let t of l) {
|
|
361
381
|
if (t === s) {
|
|
362
382
|
i.push(e(c, "self_reference", void 0, a));
|
|
@@ -367,4 +387,4 @@ function z(t) {
|
|
|
367
387
|
}
|
|
368
388
|
}
|
|
369
389
|
//#endregion
|
|
370
|
-
export {
|
|
390
|
+
export { E as validateLinkageSchema };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
|
+
//#region src/engine/option-mapping.ts
|
|
3
|
+
var e = [
|
|
4
|
+
"labelKey",
|
|
5
|
+
"valueKey",
|
|
6
|
+
"disabledKey",
|
|
7
|
+
"descriptionKey"
|
|
8
|
+
];
|
|
9
|
+
function t(t) {
|
|
10
|
+
if (t === void 0) return;
|
|
11
|
+
let n = e.flatMap((e) => {
|
|
12
|
+
let n = t[e];
|
|
13
|
+
return typeof n == "string" && n.trim().length > 0 ? [[e, n.trim()]] : [];
|
|
14
|
+
});
|
|
15
|
+
return n.length === 0 ? void 0 : Object.fromEntries(n);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as normalizeOptionMapping };
|
|
@@ -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 { mobileFieldDefinitions as e } from "../../components/mobile/definitions.js";
|
|
3
3
|
import { FormFieldRegistry as t } from "./form-field-registry.js";
|
|
4
4
|
import { mobileContainerChrome as n } from "../../render/chrome/mobile-chrome.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 { buttonDefinition as e } from "../../components/button/index.js";
|
|
3
3
|
import { checkboxGroupFieldDefinition as t } from "../../components/checkbox-group-field/index.js";
|
|
4
4
|
import { codeEditorDefinition as n } from "../../components/code-editor/index.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
|
//#region src/engine/registry/form-field-registry.ts
|
|
3
3
|
var e = class {
|
|
4
4
|
fields = /* @__PURE__ */ new Map();
|
|
@@ -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 { walkUniqueRootKeyedFields as e } from "../keys.js";
|
|
3
3
|
//#region src/engine/schema/column-type.ts
|
|
4
4
|
var t = {
|