@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,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 { lru as e } from "@vef-framework-react/shared";
|
|
3
3
|
//#region src/engine/linkage/default-evaluator.ts
|
|
4
4
|
var t = 500, n = Object.freeze({}), r = e(t), i = e(t), a = [
|
|
@@ -7,73 +7,84 @@ var t = 500, n = Object.freeze({}), r = e(t), i = e(t), a = [
|
|
|
7
7
|
"$vars",
|
|
8
8
|
"$user",
|
|
9
9
|
"$node",
|
|
10
|
+
"$applicant",
|
|
11
|
+
"$globals",
|
|
10
12
|
"$now"
|
|
11
13
|
];
|
|
12
14
|
function o(e) {
|
|
13
|
-
|
|
14
|
-
return ((e, n, r, i, a) => t(e, e, n, r, i, a));
|
|
15
|
+
return (t) => e(t.form, t.form, t.vars, t.user, t.node, t.applicant, t.globals, t.now);
|
|
15
16
|
}
|
|
16
17
|
function s(e) {
|
|
17
|
-
|
|
18
|
-
return ((e, n, r, i, a) => t(e, e, n, r, i, a));
|
|
18
|
+
return o(Function(...a, `"use strict"; return (${e}\n);`));
|
|
19
19
|
}
|
|
20
|
-
function c() {
|
|
21
|
-
|
|
20
|
+
function c(e) {
|
|
21
|
+
return o(Function(...a, `"use strict"; ${e}`));
|
|
22
|
+
}
|
|
23
|
+
function l() {}
|
|
24
|
+
function u(e) {
|
|
22
25
|
let t = r.get(e);
|
|
23
26
|
if (!t) {
|
|
24
27
|
try {
|
|
25
|
-
t =
|
|
28
|
+
t = s(e);
|
|
26
29
|
} catch {
|
|
27
|
-
t =
|
|
30
|
+
t = l;
|
|
28
31
|
}
|
|
29
32
|
r.set(e, t);
|
|
30
33
|
}
|
|
31
34
|
return t;
|
|
32
35
|
}
|
|
33
|
-
function
|
|
36
|
+
function d(e) {
|
|
34
37
|
let t = i.get(e);
|
|
35
38
|
if (!t) {
|
|
36
39
|
try {
|
|
37
|
-
t =
|
|
40
|
+
t = c(e);
|
|
38
41
|
} catch {
|
|
39
|
-
t =
|
|
42
|
+
t = l;
|
|
40
43
|
}
|
|
41
44
|
i.set(e, t);
|
|
42
45
|
}
|
|
43
46
|
return t;
|
|
44
47
|
}
|
|
45
|
-
function
|
|
46
|
-
return e(
|
|
48
|
+
function f(e, t, r) {
|
|
49
|
+
return e({
|
|
50
|
+
form: t,
|
|
51
|
+
vars: r?.variables ?? n,
|
|
52
|
+
user: r?.user ?? n,
|
|
53
|
+
node: r?.node ?? n,
|
|
54
|
+
applicant: r?.applicant ?? n,
|
|
55
|
+
globals: r?.globals ?? n,
|
|
56
|
+
now: /* @__PURE__ */ new Date()
|
|
57
|
+
});
|
|
47
58
|
}
|
|
48
|
-
function
|
|
59
|
+
function p(e, t, n) {
|
|
49
60
|
try {
|
|
50
|
-
return
|
|
61
|
+
return f(u(e), t, n) === !0;
|
|
51
62
|
} catch {
|
|
52
63
|
return !1;
|
|
53
64
|
}
|
|
54
65
|
}
|
|
55
|
-
function
|
|
66
|
+
function m(e, t, n) {
|
|
56
67
|
try {
|
|
57
|
-
return
|
|
68
|
+
return f(u(e), t, n);
|
|
58
69
|
} catch {
|
|
59
70
|
return;
|
|
60
71
|
}
|
|
61
72
|
}
|
|
62
|
-
function
|
|
73
|
+
function h(e, t, n) {
|
|
63
74
|
try {
|
|
64
|
-
return d(
|
|
75
|
+
return f(d(e), t, n);
|
|
65
76
|
} catch {
|
|
66
77
|
return;
|
|
67
78
|
}
|
|
68
79
|
}
|
|
69
|
-
function
|
|
70
|
-
function
|
|
80
|
+
function g() {}
|
|
81
|
+
function _(e) {
|
|
71
82
|
return {
|
|
72
|
-
evaluateExpression: e?.evaluateExpression ??
|
|
73
|
-
evaluateScriptAction: e?.evaluateScriptAction ??
|
|
74
|
-
evaluateAssignExpression: e?.evaluateAssignExpression ??
|
|
75
|
-
dispatchEffect: e?.dispatchEffect ??
|
|
83
|
+
evaluateExpression: e?.evaluateExpression ?? p,
|
|
84
|
+
evaluateScriptAction: e?.evaluateScriptAction ?? h,
|
|
85
|
+
evaluateAssignExpression: e?.evaluateAssignExpression ?? m,
|
|
86
|
+
dispatchEffect: e?.dispatchEffect ?? g
|
|
76
87
|
};
|
|
77
88
|
}
|
|
78
89
|
//#endregion
|
|
79
|
-
export {
|
|
90
|
+
export { m as defaultEvaluateAssignExpression, p as defaultEvaluateExpression, h as defaultEvaluateScriptAction, _ as resolveLinkageEvaluators };
|
|
@@ -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 { ruleActions as e, ruleCondition as t, ruleTriggerKind as n } from "./shape.js";
|
|
3
3
|
import { isRootScope as r, walkNodes as i } from "../schema/walk.js";
|
|
4
4
|
import { isEffectAction as a, isFieldEventTriggerKind as o } from "./taxonomy.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 { isRecord as e } from "../validation.js";
|
|
3
3
|
import { linkageRules as t } from "./shape.js";
|
|
4
4
|
import { isLeafField as n, isRootScope as r, walkNodes as i } from "../schema/walk.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 "../validation.js";
|
|
3
3
|
import { defaultEvaluateAssignExpression as e, defaultEvaluateExpression as t, defaultEvaluateScriptAction as n, resolveLinkageEvaluators as r } from "./default-evaluator.js";
|
|
4
4
|
import { LINKAGE_OPERATORS as i, isEmptyRuntimeValue as a } from "./operators.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
2
|
-
import { isRecord as e } from "../validation.js";
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
3
2
|
import "../assert-never.js";
|
|
3
|
+
import { resolveLeafSourceValue as e } from "./scope.js";
|
|
4
4
|
import { isNullish as t } from "@vef-framework-react/shared";
|
|
5
5
|
//#region src/engine/linkage/operators.ts
|
|
6
6
|
var n = [
|
|
@@ -17,55 +17,31 @@ var n = [
|
|
|
17
17
|
function r(e) {
|
|
18
18
|
return t(e) ? !0 : typeof e == "string" ? e.trim().length === 0 : Array.isArray(e) ? e.every((e) => r(e)) : !1;
|
|
19
19
|
}
|
|
20
|
-
function i(t, n,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
case "
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
case "
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
case "
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
case "$node":
|
|
34
|
-
o = r?.node;
|
|
35
|
-
break;
|
|
36
|
-
default: return;
|
|
37
|
-
}
|
|
38
|
-
for (let t of a) {
|
|
39
|
-
if (!e(o)) return;
|
|
40
|
-
o = o[t];
|
|
41
|
-
}
|
|
42
|
-
return o;
|
|
43
|
-
}
|
|
44
|
-
function a(e, t, n) {
|
|
45
|
-
let a = i(e.sourceKey, t, n), l = e.value;
|
|
46
|
-
switch (e.operator) {
|
|
47
|
-
case "eq": return o(a, l);
|
|
48
|
-
case "ne": return !o(a, l);
|
|
49
|
-
case "gt": return s(a, l, (e, t) => e > t);
|
|
50
|
-
case "lt": return s(a, l, (e, t) => e < t);
|
|
51
|
-
case "gte": return s(a, l, (e, t) => e >= t);
|
|
52
|
-
case "lte": return s(a, l, (e, t) => e <= t);
|
|
53
|
-
case "contains": return c(a, l);
|
|
54
|
-
case "empty": return r(a);
|
|
55
|
-
case "notEmpty": return !r(a);
|
|
56
|
-
default: return e.operator, !1;
|
|
20
|
+
function i(t, n, i) {
|
|
21
|
+
let c = e(t.sourceKey, n, i), l = t.value;
|
|
22
|
+
switch (t.operator) {
|
|
23
|
+
case "eq": return a(c, l);
|
|
24
|
+
case "ne": return !a(c, l);
|
|
25
|
+
case "gt": return o(c, l, (e, t) => e > t);
|
|
26
|
+
case "lt": return o(c, l, (e, t) => e < t);
|
|
27
|
+
case "gte": return o(c, l, (e, t) => e >= t);
|
|
28
|
+
case "lte": return o(c, l, (e, t) => e <= t);
|
|
29
|
+
case "contains": return s(c, l);
|
|
30
|
+
case "empty": return r(c);
|
|
31
|
+
case "notEmpty": return !r(c);
|
|
32
|
+
default: return t.operator, !1;
|
|
57
33
|
}
|
|
58
34
|
}
|
|
59
|
-
function
|
|
35
|
+
function a(e, n) {
|
|
60
36
|
return Object.is(e, n) ? !0 : t(e) || t(n) || typeof e == "object" || typeof n == "object" ? !1 : String(e) === String(n);
|
|
61
37
|
}
|
|
62
|
-
function
|
|
38
|
+
function o(e, t, n) {
|
|
63
39
|
if (r(e) || r(t)) return !1;
|
|
64
40
|
let i = Number(e), a = Number(t);
|
|
65
41
|
return !Number.isFinite(i) || !Number.isFinite(a) ? !1 : n(i, a);
|
|
66
42
|
}
|
|
67
|
-
function
|
|
68
|
-
return r(t) ? !1 : typeof e == "string" ? e.includes(String(t)) : Array.isArray(e) ? e.some((e) =>
|
|
43
|
+
function s(e, t) {
|
|
44
|
+
return r(t) ? !1 : typeof e == "string" ? e.includes(String(t)) : Array.isArray(e) ? e.some((e) => a(e, t)) : !1;
|
|
69
45
|
}
|
|
70
46
|
//#endregion
|
|
71
|
-
export { n as LINKAGE_OPERATORS, r as isEmptyRuntimeValue,
|
|
47
|
+
export { n as LINKAGE_OPERATORS, r as isEmptyRuntimeValue, i as matchLeaf };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.25.0 made by Venus | 2026-10-13T08:58:25.850Z */
|
|
2
|
+
import { isRecord as e } from "../validation.js";
|
|
3
|
+
import { assertNever as t } from "../assert-never.js";
|
|
4
|
+
//#region src/engine/linkage/scope.ts
|
|
5
|
+
var n = {
|
|
6
|
+
$vars: "variables",
|
|
7
|
+
$user: "user",
|
|
8
|
+
$node: "node",
|
|
9
|
+
$applicant: "applicant",
|
|
10
|
+
$globals: "globals"
|
|
11
|
+
};
|
|
12
|
+
function r(e) {
|
|
13
|
+
return Object.hasOwn(n, e);
|
|
14
|
+
}
|
|
15
|
+
function i(e) {
|
|
16
|
+
if (!e.startsWith("$")) return {
|
|
17
|
+
kind: "form",
|
|
18
|
+
key: e,
|
|
19
|
+
path: []
|
|
20
|
+
};
|
|
21
|
+
let [t = "", ...n] = e.split(".");
|
|
22
|
+
if (r(t)) return {
|
|
23
|
+
kind: "context",
|
|
24
|
+
root: t,
|
|
25
|
+
path: n
|
|
26
|
+
};
|
|
27
|
+
let [i, ...a] = n;
|
|
28
|
+
return t !== "$form" || i === void 0 || i.length === 0 ? { kind: "unknown" } : {
|
|
29
|
+
kind: "form",
|
|
30
|
+
key: i,
|
|
31
|
+
path: a
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function a(e) {
|
|
35
|
+
let t = i(e);
|
|
36
|
+
return t.kind === "form" ? t.key : void 0;
|
|
37
|
+
}
|
|
38
|
+
function o(e, t) {
|
|
39
|
+
let n = i(e);
|
|
40
|
+
return n.kind === "form" ? e.startsWith("$") ? [
|
|
41
|
+
"$form",
|
|
42
|
+
t,
|
|
43
|
+
...n.path
|
|
44
|
+
].join(".") : t : e;
|
|
45
|
+
}
|
|
46
|
+
function s(t, n) {
|
|
47
|
+
return e(t) && Object.hasOwn(t, n) ? t[n] : void 0;
|
|
48
|
+
}
|
|
49
|
+
function c(e, t) {
|
|
50
|
+
let n = e;
|
|
51
|
+
for (let e of t) if (n = s(n, e), n === void 0) return;
|
|
52
|
+
return n;
|
|
53
|
+
}
|
|
54
|
+
function l(e, r, a) {
|
|
55
|
+
let o = i(e);
|
|
56
|
+
switch (o.kind) {
|
|
57
|
+
case "form": return c(s(r, o.key), o.path);
|
|
58
|
+
case "context": return c(a?.[n[o.root]], o.path);
|
|
59
|
+
case "unknown": return;
|
|
60
|
+
default: return t(o);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function u(t, n, r) {
|
|
64
|
+
let [i, ...a] = n, o = e(t) ? t : {};
|
|
65
|
+
return i === void 0 ? o : {
|
|
66
|
+
...o,
|
|
67
|
+
[i]: a.length === 0 ? r : u(o[i], a, r)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function d(e, t) {
|
|
71
|
+
let r = e;
|
|
72
|
+
for (let [e, a] of t) {
|
|
73
|
+
let t = i(e);
|
|
74
|
+
if (t.kind !== "context" || t.path.length === 0) continue;
|
|
75
|
+
let o = n[t.root];
|
|
76
|
+
r = {
|
|
77
|
+
...r,
|
|
78
|
+
[o]: u(r?.[o], t.path, a)
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return r;
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { a as leafSourceFormKey, i as parseLeafSource, l as resolveLeafSourceValue, d as withContextValues, o as withLeafSourceFormKey };
|
|
@@ -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 { isRecord as e } from "../validation.js";
|
|
3
3
|
//#region src/engine/linkage/shape.ts
|
|
4
4
|
function t(e) {
|
|
@@ -1,29 +1,33 @@
|
|
|
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 { isRecord as e } from "../validation.js";
|
|
3
|
-
import {
|
|
3
|
+
import { leafSourceFormKey as t } from "./scope.js";
|
|
4
|
+
import { isStateAction as n } from "./taxonomy.js";
|
|
4
5
|
//#region src/engine/linkage/source-tracking.ts
|
|
5
|
-
function
|
|
6
|
-
let r =
|
|
7
|
-
for (let
|
|
8
|
-
return [...
|
|
6
|
+
function r(t) {
|
|
7
|
+
let r = t.linkage?.rules ?? [], i = /* @__PURE__ */ new Set();
|
|
8
|
+
for (let t of r) !e(t) || !e(t.trigger) || t.trigger.kind !== "condition" || !Array.isArray(t.actions) || t.actions.every((t) => !e(t) || !n(t)) || a(t.trigger.condition, i);
|
|
9
|
+
return [...i];
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
let t = /* @__PURE__ */ new Set(), n =
|
|
11
|
+
function i(e) {
|
|
12
|
+
let t = /* @__PURE__ */ new Set(), n = a(e, t);
|
|
12
13
|
return {
|
|
13
14
|
keys: [...t],
|
|
14
15
|
opaque: n
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
if (!e(
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
function a(n, r) {
|
|
19
|
+
if (!e(n)) return !1;
|
|
20
|
+
if (n.kind === "leaf") {
|
|
21
|
+
let e = typeof n.sourceKey == "string" && n.sourceKey.length > 0 ? t(n.sourceKey) : void 0;
|
|
22
|
+
return e !== void 0 && r.add(e), !1;
|
|
23
|
+
}
|
|
24
|
+
if (n.kind === "expression") return !0;
|
|
25
|
+
if (n.kind === "group" && Array.isArray(n.children)) {
|
|
22
26
|
let e = !1;
|
|
23
|
-
for (let
|
|
27
|
+
for (let t of n.children) e = a(t, r) || e;
|
|
24
28
|
return e;
|
|
25
29
|
}
|
|
26
30
|
return !1;
|
|
27
31
|
}
|
|
28
32
|
//#endregion
|
|
29
|
-
export {
|
|
33
|
+
export { a as collectConditionSourceKeys, i as describeConditionSources, r as getLinkageSourceKeys };
|