@vef-framework-react/form-editor 2.19.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/checkbox-group-field/index.cjs +1 -1
- package/dist/cjs/components/code-editor/index.cjs +1 -1
- package/dist/cjs/components/mobile/checkbox-group.cjs +1 -1
- package/dist/cjs/components/mobile/date-adapters.cjs +1 -1
- package/dist/cjs/components/mobile/date.cjs +1 -1
- package/dist/cjs/components/mobile/datetime.cjs +1 -1
- package/dist/cjs/components/mobile/radio.cjs +1 -1
- package/dist/cjs/components/mobile/select.cjs +1 -1
- package/dist/cjs/components/mobile/switch.cjs +1 -1
- package/dist/cjs/components/radio-field/index.cjs +1 -1
- package/dist/cjs/components/select-field/index.cjs +1 -1
- package/dist/cjs/components/upload-field/index.cjs +1 -1
- package/dist/cjs/editor/palette/palette-item.cjs +1 -1
- package/dist/cjs/editor/properties/container-properties.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/linkage-rules-entry.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/options.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/trigger-editor.cjs +1 -1
- package/dist/cjs/editor/properties/form-variables-panel.cjs +1 -1
- package/dist/cjs/editor/properties/option-editors.cjs +1 -1
- package/dist/cjs/editor/remove-node-confirm.cjs +2 -2
- package/dist/cjs/editor/toolbar/toolbar.cjs +2 -2
- package/dist/cjs/engine/data-source-params.cjs +1 -1
- package/dist/cjs/engine/keys.cjs +1 -1
- package/dist/cjs/engine/linkage/effects.cjs +1 -1
- package/dist/cjs/engine/linkage/evaluator.cjs +1 -1
- package/dist/cjs/engine/linkage/operators.cjs +1 -1
- package/dist/cjs/engine/linkage/shape.cjs +1 -0
- package/dist/cjs/engine/linkage/source-tracking.cjs +1 -1
- package/dist/cjs/engine/linkage/validator.cjs +1 -1
- package/dist/cjs/engine/schema/column-type.cjs +1 -1
- package/dist/cjs/engine/schema/permission-bridge.cjs +1 -1
- package/dist/cjs/engine/schema/removal-impact.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/render/chrome/mobile-chrome.cjs +1 -1
- package/dist/cjs/render/chrome/pc-chrome.cjs +1 -1
- package/dist/cjs/render/data-source-context.cjs +0 -0
- package/dist/cjs/render/data-source-param-scope.cjs +1 -1
- package/dist/cjs/render/form-renderer.cjs +1 -1
- package/dist/cjs/render/parts/field-shell.cjs +1 -1
- package/dist/cjs/render/parts/label.cjs +1 -1
- package/dist/cjs/render/parts/option-order.cjs +1 -0
- package/dist/cjs/render/subform-columns.cjs +1 -1
- package/dist/cjs/render/submit.cjs +1 -1
- package/dist/cjs/runtime/effects.cjs +1 -1
- package/dist/cjs/runtime/field-write.cjs +1 -1
- package/dist/cjs/runtime/runtime-state-controller.cjs +1 -1
- package/dist/cjs/store/form-store.cjs +1 -1
- package/dist/es/components/button/index.js +1 -1
- package/dist/es/components/checkbox-group-field/index.js +24 -22
- package/dist/es/components/code-editor/code-editor-input.js +1 -1
- package/dist/es/components/code-editor/index.js +3 -2
- package/dist/es/components/containers/index.js +1 -1
- package/dist/es/components/date-field/index.js +1 -1
- package/dist/es/components/display/index.js +1 -1
- package/dist/es/components/field-entries.js +1 -1
- package/dist/es/components/mobile/alert-block.js +1 -1
- package/dist/es/components/mobile/button.js +1 -1
- package/dist/es/components/mobile/checkbox-group.js +26 -24
- package/dist/es/components/mobile/date-adapters.js +3 -2
- package/dist/es/components/mobile/date.js +36 -34
- package/dist/es/components/mobile/daterange.js +1 -1
- package/dist/es/components/mobile/datetime.js +36 -34
- package/dist/es/components/mobile/definitions.js +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 +2 -1
- package/dist/es/components/mobile/scope.js +1 -1
- package/dist/es/components/mobile/select.js +2 -2
- package/dist/es/components/mobile/switch.js +17 -11
- package/dist/es/components/mobile/textarea.js +1 -1
- package/dist/es/components/mobile/textfield.js +1 -1
- package/dist/es/components/mobile/theme.js +1 -1
- package/dist/es/components/number-field/index.js +1 -1
- package/dist/es/components/radio-field/index.js +3 -2
- package/dist/es/components/select-field/index.js +14 -13
- package/dist/es/components/switch-field/index.js +1 -1
- package/dist/es/components/textarea-field/index.js +1 -1
- package/dist/es/components/textfield/index.js +1 -1
- package/dist/es/components/upload-field/index.js +2 -1
- package/dist/es/editor/canvas/canvas-field.js +1 -1
- 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/dnd.js +1 -1
- package/dist/es/editor/editor-layout-context.js +1 -1
- package/dist/es/editor/footer/footer.js +1 -1
- package/dist/es/editor/form-config/form-basics-tab.js +1 -1
- package/dist/es/editor/form-config/form-config-drawer.js +1 -1
- package/dist/es/editor/form-config/linkage-overview.js +1 -1
- package/dist/es/editor/form-config/outline-tab.js +1 -1
- package/dist/es/editor/form-editor.js +1 -1
- package/dist/es/editor/palette/field-groups.js +1 -1
- package/dist/es/editor/palette/palette-group.js +1 -1
- package/dist/es/editor/palette/palette-item.js +71 -70
- package/dist/es/editor/palette/palette-panel.js +1 -1
- package/dist/es/editor/preview-effects.js +1 -1
- package/dist/es/editor/preview-runtime-context.js +1 -1
- package/dist/es/editor/properties/block-layout-section.js +1 -1
- package/dist/es/editor/properties/container-properties.js +198 -200
- package/dist/es/editor/properties/dynamic-value-editor.js +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 +1 -1
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +55 -55
- 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 +43 -42
- package/dist/es/editor/properties/entries/linkage/mutators.js +1 -1
- package/dist/es/editor/properties/entries/linkage/options.js +5 -2
- package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +1 -1
- package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/styles.js +1 -1
- package/dist/es/editor/properties/entries/linkage/trigger-editor.js +29 -29
- package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +1 -1
- package/dist/es/editor/properties/entries/linkage/use-stable-options.js +1 -1
- package/dist/es/editor/properties/entries/number-entry.js +1 -1
- package/dist/es/editor/properties/entries/options-source/index.js +1 -1
- package/dist/es/editor/properties/entries/options-source/source-mutators.js +1 -1
- package/dist/es/editor/properties/entries/select-entry.js +1 -1
- package/dist/es/editor/properties/entries/text-entry.js +1 -1
- package/dist/es/editor/properties/form-data-sources-panel.js +1 -1
- package/dist/es/editor/properties/form-linkage-panel.js +1 -1
- package/dist/es/editor/properties/form-variables-panel.js +68 -67
- package/dist/es/editor/properties/option-editors.js +102 -85
- 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/use-confirmable-kind-switch.js +1 -1
- package/dist/es/editor/remove-node-confirm.js +36 -29
- package/dist/es/editor/schema-apply.js +1 -1
- package/dist/es/editor/styles.js +1 -1
- package/dist/es/editor/toolbar/notify.js +1 -1
- package/dist/es/editor/toolbar/schema-io.js +1 -1
- package/dist/es/editor/toolbar/toolbar.js +169 -168
- package/dist/es/editor/use-editor-shortcuts.js +1 -1
- package/dist/es/editor/validation-summary.js +1 -1
- package/dist/es/engine/assert-never.js +1 -1
- package/dist/es/engine/conversion/index.js +1 -1
- package/dist/es/engine/data-source-params.js +17 -17
- package/dist/es/engine/ids.js +1 -1
- package/dist/es/engine/keys.js +6 -3
- package/dist/es/engine/linkage/cycle.js +1 -1
- package/dist/es/engine/linkage/default-evaluator.js +1 -1
- package/dist/es/engine/linkage/effects.js +38 -32
- package/dist/es/engine/linkage/evaluator.js +67 -57
- package/dist/es/engine/linkage/index.js +1 -1
- package/dist/es/engine/linkage/operators.js +2 -2
- package/dist/es/engine/linkage/shape.js +21 -0
- package/dist/es/engine/linkage/source-tracking.js +20 -11
- package/dist/es/engine/linkage/taxonomy.js +1 -1
- package/dist/es/engine/linkage/validator.js +175 -174
- 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 +6 -2
- package/dist/es/engine/schema/edit-ops.js +1 -1
- package/dist/es/engine/schema/mutate.js +1 -1
- package/dist/es/engine/schema/nodes.js +1 -1
- package/dist/es/engine/schema/permission-bridge.js +4 -3
- package/dist/es/engine/schema/presentation.js +1 -1
- package/dist/es/engine/schema/reconcile.js +1 -1
- package/dist/es/engine/schema/removal-impact.js +60 -39
- package/dist/es/engine/schema/rewrite.js +1 -1
- package/dist/es/engine/schema/validate.js +1 -1
- package/dist/es/engine/schema/walk.js +1 -1
- package/dist/es/engine/validation.js +1 -1
- package/dist/es/icons.js +1 -1
- package/dist/es/index.js +6 -6
- package/dist/es/render/chrome/mobile-chrome.js +67 -66
- package/dist/es/render/chrome/pc-chrome.js +38 -37
- package/dist/es/render/chrome/subform-shell.js +1 -1
- package/dist/es/render/data-source-context.js +0 -0
- package/dist/es/render/data-source-param-scope.js +19 -20
- 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 +261 -256
- package/dist/es/render/grid-style.js +1 -1
- package/dist/es/render/parts/field-shell.js +29 -22
- package/dist/es/render/parts/label.js +12 -10
- package/dist/es/render/parts/option-order.js +8 -0
- package/dist/es/render/parts/options-status.js +1 -1
- package/dist/es/render/stack-style.js +1 -1
- package/dist/es/render/subform-columns.js +49 -48
- package/dist/es/render/submit.js +73 -53
- package/dist/es/runtime/effects.js +68 -53
- package/dist/es/runtime/field-write.js +15 -5
- package/dist/es/runtime/resolve-scope-values.js +1 -1
- package/dist/es/runtime/runtime-context.js +1 -1
- package/dist/es/runtime/runtime-state-controller.js +91 -78
- package/dist/es/runtime/stabilize-state-map.js +1 -1
- package/dist/es/store/engine-provider.js +1 -1
- package/dist/es/store/form-store.js +147 -111
- package/dist/es/types/chrome.js +1 -1
- package/dist/es/types/component.js +1 -1
- package/dist/es/types/data-source.js +1 -1
- package/dist/es/types/dynamic-value.js +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/components/mobile/date-adapters.d.ts +21 -0
- package/dist/types/components/mobile/switch.d.ts +5 -3
- package/dist/types/editor/properties/entries/linkage/options.d.ts +16 -0
- package/dist/types/editor/remove-node-confirm.d.ts +6 -0
- package/dist/types/engine/keys.d.ts +5 -0
- package/dist/types/engine/linkage/effects.d.ts +13 -3
- package/dist/types/engine/linkage/shape.d.ts +54 -0
- package/dist/types/engine/linkage/source-tracking.d.ts +20 -1
- package/dist/types/engine/schema/removal-impact.d.ts +23 -0
- package/dist/types/render/data-source-param-scope.d.ts +18 -8
- package/dist/types/render/parts/field-shell.d.ts +16 -1
- package/dist/types/render/parts/label.d.ts +14 -1
- package/dist/types/render/parts/option-order.d.ts +20 -0
- package/dist/types/render/submit.d.ts +7 -4
- package/dist/types/runtime/effects.d.ts +1 -0
- package/dist/types/runtime/field-write.d.ts +7 -1
- package/dist/types/runtime/runtime-state-controller.d.ts +4 -2
- package/dist/types/store/form-store.d.ts +15 -3
- package/dist/types/types/chrome.d.ts +7 -0
- package/dist/types/types/schema.d.ts +19 -5
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
import { useFormEditorStoreApi as e } from "../store/form-store.js";
|
|
3
3
|
import { removeNodeWithConfirm as t } from "./remove-node-confirm.js";
|
|
4
4
|
import { useEffect as n } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
import { useDeviceRegistries as e } from "../store/engine-provider.js";
|
|
3
3
|
import { validateSchema as t } from "../engine/schema/validate.js";
|
|
4
4
|
import { useFormEditorStore as n } from "../store/form-store.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
//#region src/engine/assert-never.ts
|
|
3
3
|
function e(e) {
|
|
4
4
|
throw Error(`Unexpected value: ${String(e)}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
import { containerBodies as e, withContainerBodies as t } from "../schema/nodes.js";
|
|
3
3
|
import { isContainerNode as n, nodeLabel as r } from "../schema/walk.js";
|
|
4
4
|
import { cloneBlock as i } from "../schema/edit-ops.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
2
|
-
import {
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
|
+
import { linkageRules as e, ruleActions as t } from "./linkage/shape.js";
|
|
3
|
+
import { walkFields as n } from "./schema/walk.js";
|
|
3
4
|
//#region src/engine/data-source-params.ts
|
|
4
|
-
function
|
|
5
|
+
function r(e) {
|
|
5
6
|
return Object.values(e.params ?? {}).some((e) => e.kind === "expression");
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
-
if ((
|
|
9
|
-
let
|
|
10
|
-
return
|
|
11
|
-
if (
|
|
12
|
-
let
|
|
13
|
-
if (
|
|
14
|
-
|
|
8
|
+
function i(i) {
|
|
9
|
+
if ((i.dataSources ?? []).some((e) => e.kind === "remote" && r(e.request))) return !0;
|
|
10
|
+
let a = !1;
|
|
11
|
+
return n(i, (n) => {
|
|
12
|
+
if (a) return;
|
|
13
|
+
let i = "dataSource" in n ? n.dataSource : void 0;
|
|
14
|
+
if (i?.kind === "remote" && r(i.request)) {
|
|
15
|
+
a = !0;
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
|
-
let i
|
|
18
|
-
|
|
19
|
-
r = !0;
|
|
18
|
+
for (let i of e(n.linkage)) for (let e of t(i)) if (e.type === "api_call" && r(e.request)) {
|
|
19
|
+
a = !0;
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
}),
|
|
22
|
+
}), a;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function a(e, t) {
|
|
25
25
|
let { params: n, ...r } = e;
|
|
26
26
|
if (!n) return r;
|
|
27
27
|
let i = {}, a = Object.entries(n);
|
|
@@ -35,4 +35,4 @@ function r(e, t) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
|
-
export {
|
|
38
|
+
export { r as hasBoundParams, a as resolveRequestParams, i as schemaHasBoundParams };
|
package/dist/es/engine/ids.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
import { generateId as e } from "@vef-framework-react/shared";
|
|
3
3
|
//#region src/engine/ids.ts
|
|
4
4
|
function t(t) {
|
package/dist/es/engine/keys.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
import { isRootScope as e, scopeEquals as t, walkFields as n, walkNodes as r } from "./schema/walk.js";
|
|
3
3
|
//#region src/engine/keys.ts
|
|
4
4
|
function i(e, t, n = []) {
|
|
@@ -42,8 +42,11 @@ function d(e, n) {
|
|
|
42
42
|
}), i;
|
|
43
43
|
}
|
|
44
44
|
function f(e, t) {
|
|
45
|
+
return p([e], t);
|
|
46
|
+
}
|
|
47
|
+
function p(e, t) {
|
|
45
48
|
let n = /* @__PURE__ */ new Map();
|
|
46
|
-
return r({ children:
|
|
49
|
+
return r({ children: e }, (e, r) => {
|
|
47
50
|
if (!s(e)) return;
|
|
48
51
|
let i = [...t, ...r], a = i.join("/"), o = n.get(a) ?? {
|
|
49
52
|
scope: i,
|
|
@@ -53,4 +56,4 @@ function f(e, t) {
|
|
|
53
56
|
}), n.values().toArray();
|
|
54
57
|
}
|
|
55
58
|
//#endregion
|
|
56
|
-
export { d as collectScopeKeys, f as collectSubtreeKeysByScope, i as generateUniqueKey, c as isKeyedField, s as isKeyedNode, l as isValidatableField, a as nextUniqueKey, o as sanitizeKey, u as walkUniqueRootKeyedFields };
|
|
59
|
+
export { p as collectBlocksKeysByScope, d as collectScopeKeys, f as collectSubtreeKeysByScope, i as generateUniqueKey, c as isKeyedField, s as isKeyedNode, l as isValidatableField, a as nextUniqueKey, o as sanitizeKey, u as walkUniqueRootKeyedFields };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
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 = [
|
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
|
+
import { ruleActions as e, ruleCondition as t, ruleTriggerKind as n } from "./shape.js";
|
|
3
|
+
import { isRootScope as r, walkNodes as i } from "../schema/walk.js";
|
|
4
|
+
import { isEffectAction as a, isFieldEventTriggerKind as o } from "./taxonomy.js";
|
|
5
|
+
import { matchCondition as s } from "./evaluator.js";
|
|
6
|
+
import { describeConditionSources as c } from "./source-tracking.js";
|
|
6
7
|
//#region src/engine/linkage/effects.ts
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
}),
|
|
8
|
+
function l(e) {
|
|
9
|
+
let t = [];
|
|
10
|
+
return u(e.linkage?.rules, t), i(e, (e, n) => {
|
|
11
|
+
r(n) && u(e.linkage?.rules, t);
|
|
12
|
+
}), t;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
let
|
|
15
|
-
for (let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
function u(n, r) {
|
|
15
|
+
let i = Array.isArray(n) ? n : [];
|
|
16
|
+
for (let n of i) {
|
|
17
|
+
let i = t(n);
|
|
18
|
+
if (i === void 0) continue;
|
|
19
|
+
let o = e(n).filter((e) => a(e));
|
|
20
|
+
if (o.length > 0) {
|
|
21
|
+
let e = c(i);
|
|
22
|
+
r.push({
|
|
23
|
+
ruleId: n.id,
|
|
24
|
+
condition: i,
|
|
25
|
+
sourceKeys: e.keys,
|
|
26
|
+
opaque: e.opaque,
|
|
27
|
+
actions: o,
|
|
28
|
+
alwaysActions: o.filter((e) => e.retrigger === "always")
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
|
-
function
|
|
31
|
-
return e.map((e) =>
|
|
33
|
+
function d(e, t, n, r) {
|
|
34
|
+
return e.map((e) => s(e.condition, t, n, r));
|
|
32
35
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
36
|
+
function f(t, r) {
|
|
37
|
+
return Array.isArray(t) ? t.filter((e) => n(e) === r).flatMap((t) => e(t).filter((e) => a(e))) : [];
|
|
35
38
|
}
|
|
36
|
-
function
|
|
37
|
-
let
|
|
38
|
-
for (let
|
|
39
|
-
|
|
39
|
+
function p(t) {
|
|
40
|
+
let r = /* @__PURE__ */ new Set(), i = Array.isArray(t) ? t : [];
|
|
41
|
+
for (let t of i) {
|
|
42
|
+
let i = n(t);
|
|
43
|
+
i !== void 0 && o(i) && e(t).some((e) => a(e)) && r.add(i);
|
|
44
|
+
}
|
|
45
|
+
return r;
|
|
40
46
|
}
|
|
41
47
|
//#endregion
|
|
42
|
-
export {
|
|
48
|
+
export { l as collectConditionEffectRules, d as evaluateConditionEffectTruths, p as getFieldEventTriggerKinds, f as getTriggerEffectActions };
|
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
|
+
import { isRecord as e } from "../validation.js";
|
|
3
|
+
import { linkageRules as t } from "./shape.js";
|
|
4
|
+
import { isLeafField as n, isRootScope as r, walkNodes as i } from "../schema/walk.js";
|
|
5
|
+
import { resolveLinkageEvaluators as a } from "./default-evaluator.js";
|
|
5
6
|
import "../assert-never.js";
|
|
6
|
-
import { isKeyedField as
|
|
7
|
-
import { matchLeaf as
|
|
8
|
-
import { isStateAction as
|
|
7
|
+
import { isKeyedField as o, isKeyedNode as s, isValidatableField as c } from "../keys.js";
|
|
8
|
+
import { matchLeaf as l } from "./operators.js";
|
|
9
|
+
import { isStateAction as u } from "./taxonomy.js";
|
|
9
10
|
//#region src/engine/linkage/evaluator.ts
|
|
10
|
-
var
|
|
11
|
+
var d = Object.freeze({
|
|
11
12
|
hidden: !1,
|
|
12
13
|
disabled: !1,
|
|
13
14
|
required: !1,
|
|
14
15
|
assigned: !1
|
|
16
|
+
}), f = Object.freeze({
|
|
17
|
+
hidden: !1,
|
|
18
|
+
disabled: !1,
|
|
19
|
+
required: !0,
|
|
20
|
+
assigned: !1
|
|
15
21
|
});
|
|
16
|
-
function
|
|
22
|
+
function p(e, t) {
|
|
17
23
|
return e !== void 0 && Object.hasOwn(e, t) ? e[t] : void 0;
|
|
18
24
|
}
|
|
19
|
-
function
|
|
25
|
+
function m(e) {
|
|
20
26
|
return e === void 0 || e === "editable" || e === "required";
|
|
21
27
|
}
|
|
22
|
-
function
|
|
23
|
-
if (n === void 0 || !
|
|
24
|
-
let r =
|
|
28
|
+
function h(e, t, n) {
|
|
29
|
+
if (n === void 0 || !s(e)) return t;
|
|
30
|
+
let r = p(n, e.key);
|
|
25
31
|
if (r === void 0 || r === "editable") return t;
|
|
26
|
-
let i =
|
|
32
|
+
let i = m(r), a = {
|
|
27
33
|
...t,
|
|
28
34
|
hidden: r === "hidden" || t.hidden,
|
|
29
35
|
disabled: !i || t.disabled,
|
|
@@ -31,37 +37,37 @@ function f(e, t, n) {
|
|
|
31
37
|
};
|
|
32
38
|
return !i && a.assigned && (a.assigned = !1, a.assignedValue = void 0), a;
|
|
33
39
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
40
|
+
function g(e, t, n = {}) {
|
|
41
|
+
return h(e, _(e, t, a(n.evaluators), n.evaluationContext), n.fieldPermissions);
|
|
36
42
|
}
|
|
37
|
-
function
|
|
38
|
-
let { linkage:
|
|
39
|
-
if (!
|
|
40
|
-
let
|
|
41
|
-
...
|
|
42
|
-
hidden:
|
|
43
|
-
disabled:
|
|
44
|
-
required:
|
|
45
|
-
}
|
|
46
|
-
for (let
|
|
47
|
-
return
|
|
43
|
+
function _(r, i, a, s) {
|
|
44
|
+
let { linkage: l } = r, p = n(r) && c(r) && r.validate?.required === !0;
|
|
45
|
+
if (!l) return p ? f : d;
|
|
46
|
+
let m = {
|
|
47
|
+
...d,
|
|
48
|
+
hidden: l.defaults?.hidden === !0,
|
|
49
|
+
disabled: l.defaults?.disabled === !0,
|
|
50
|
+
required: p || l.defaults?.required === !0
|
|
51
|
+
};
|
|
52
|
+
for (let n of t(l)) if (!(!e(n) || !e(n.trigger) || n.trigger.kind !== "condition") && y(n.trigger.condition, i, a, s) && Array.isArray(n.actions)) for (let t of n.actions) e(t) && u(t) && b(m, t, i, a, s);
|
|
53
|
+
return m.assigned && !(n(r) && o(r)) && (m.assigned = !1, m.assignedValue = void 0), m;
|
|
48
54
|
}
|
|
49
|
-
function
|
|
50
|
-
let o =
|
|
51
|
-
return
|
|
52
|
-
|
|
55
|
+
function v(e, t, n = {}) {
|
|
56
|
+
let o = a(n.evaluators), s = {};
|
|
57
|
+
return i(e, (e, i) => {
|
|
58
|
+
r(i) && (s[e.id] = h(e, _(e, t, o, n.evaluationContext), n.fieldPermissions));
|
|
53
59
|
}), s;
|
|
54
60
|
}
|
|
55
|
-
function
|
|
56
|
-
if (!
|
|
57
|
-
switch (
|
|
58
|
-
case "leaf": return
|
|
59
|
-
case "group": return Array.isArray(
|
|
60
|
-
case "expression": return
|
|
61
|
+
function y(t, n, r, i) {
|
|
62
|
+
if (!e(t)) return !1;
|
|
63
|
+
switch (t.kind) {
|
|
64
|
+
case "leaf": return l(t, n, i);
|
|
65
|
+
case "group": return Array.isArray(t.children) ? t.logic === "all" ? t.children.every((e) => y(e, n, r, i)) : t.children.some((e) => y(e, n, r, i)) : !1;
|
|
66
|
+
case "expression": return r.evaluateExpression(t.source, n, i);
|
|
61
67
|
default: return !1;
|
|
62
68
|
}
|
|
63
69
|
}
|
|
64
|
-
function
|
|
70
|
+
function b(e, t, n, r, i) {
|
|
65
71
|
switch (t.type) {
|
|
66
72
|
case "show":
|
|
67
73
|
e.hidden = !1;
|
|
@@ -82,7 +88,7 @@ function _(e, t, n, r, i) {
|
|
|
82
88
|
e.required = !1;
|
|
83
89
|
return;
|
|
84
90
|
case "assign":
|
|
85
|
-
e.assigned = !0, e.assignedValue =
|
|
91
|
+
e.assigned = !0, e.assignedValue = x(t.value, n, r, i);
|
|
86
92
|
return;
|
|
87
93
|
case "script": {
|
|
88
94
|
let a = r.evaluateScriptAction(t.source, n, i);
|
|
@@ -93,48 +99,52 @@ function _(e, t, n, r, i) {
|
|
|
93
99
|
default:
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
|
-
function
|
|
102
|
+
function x(e, t, n, r) {
|
|
97
103
|
return e.kind === "literal" ? e.value : n.evaluateAssignExpression(e.source, t, r);
|
|
98
104
|
}
|
|
99
|
-
function
|
|
105
|
+
function S(e) {
|
|
100
106
|
let t = {}, n = e.variables ?? [];
|
|
101
107
|
for (let e of n) e.name.length > 0 && (t[e.name] = e.defaultValue);
|
|
102
108
|
return t;
|
|
103
109
|
}
|
|
104
|
-
function
|
|
110
|
+
function C(t, a = {}) {
|
|
105
111
|
let s = {};
|
|
106
|
-
return
|
|
107
|
-
if (
|
|
108
|
-
if (
|
|
109
|
-
let
|
|
110
|
-
s[
|
|
111
|
-
...
|
|
112
|
-
id:
|
|
113
|
-
children:
|
|
112
|
+
return i(t, (t, i) => {
|
|
113
|
+
if (r(i)) {
|
|
114
|
+
if (t.type === "subform") {
|
|
115
|
+
let n = w(a, t.key);
|
|
116
|
+
s[t.key] = Array.isArray(n) ? n.map((n) => ({
|
|
117
|
+
...C({
|
|
118
|
+
id: t.id,
|
|
119
|
+
children: t.template
|
|
114
120
|
}),
|
|
115
|
-
...
|
|
116
|
-
})) :
|
|
121
|
+
...e(n) && n
|
|
122
|
+
})) : T(t);
|
|
117
123
|
return;
|
|
118
124
|
}
|
|
119
|
-
|
|
125
|
+
n(t) && o(t) && (s[t.key] = w(a, t.key) ?? E(t));
|
|
120
126
|
}
|
|
121
127
|
}), s;
|
|
122
128
|
}
|
|
123
|
-
function
|
|
129
|
+
function w(e, t) {
|
|
130
|
+
return Object.hasOwn(e, t) ? e[t] : void 0;
|
|
131
|
+
}
|
|
132
|
+
function T(e) {
|
|
124
133
|
let t = e.minRows ?? 0;
|
|
125
|
-
return Array.from({ length: t }, () =>
|
|
134
|
+
return Array.from({ length: t }, () => C({
|
|
126
135
|
id: e.id,
|
|
127
136
|
children: e.template
|
|
128
137
|
}));
|
|
129
138
|
}
|
|
130
|
-
function
|
|
139
|
+
function E(e) {
|
|
131
140
|
switch (e.type) {
|
|
132
141
|
case "number": return;
|
|
133
142
|
case "switch": return !1;
|
|
134
143
|
case "checkbox-group": return [];
|
|
135
144
|
case "daterange": return [];
|
|
145
|
+
case "upload": return (e.maxCount ?? 1) > 1 ? [] : null;
|
|
136
146
|
default: return "";
|
|
137
147
|
}
|
|
138
148
|
}
|
|
139
149
|
//#endregion
|
|
140
|
-
export {
|
|
150
|
+
export { C as deriveDefaultValues, S as deriveEvaluationVariables, d as emptyRuntimeState, g as evaluateLinkage, v as evaluateRuntimeStates, p as getFieldPermission, m as isWritableFieldPermission, y as matchCondition, x as resolveActionValue };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
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,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
import { isRecord as e } from "../validation.js";
|
|
3
3
|
import "../assert-never.js";
|
|
4
4
|
import { isNullish as t } from "@vef-framework-react/shared";
|
|
@@ -18,7 +18,7 @@ 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
20
|
function i(t, n, r) {
|
|
21
|
-
if (!t.startsWith("$")) return n[t];
|
|
21
|
+
if (!t.startsWith("$")) return Object.hasOwn(n, t) ? n[t] : void 0;
|
|
22
22
|
let [i, ...a] = t.split("."), o;
|
|
23
23
|
switch (i) {
|
|
24
24
|
case "$form":
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
|
+
import { isRecord as e } from "../validation.js";
|
|
3
|
+
//#region src/engine/linkage/shape.ts
|
|
4
|
+
function t(e) {
|
|
5
|
+
let t = e?.rules;
|
|
6
|
+
return Array.isArray(t) ? t : [];
|
|
7
|
+
}
|
|
8
|
+
function n(t) {
|
|
9
|
+
if (!(!e(t) || !e(t.trigger))) return t.trigger.kind;
|
|
10
|
+
}
|
|
11
|
+
function r(t) {
|
|
12
|
+
if (!(!e(t) || !e(t.trigger) || t.trigger.kind !== "condition")) return t.trigger.condition;
|
|
13
|
+
}
|
|
14
|
+
function i(t) {
|
|
15
|
+
return !e(t) || !Array.isArray(t.actions) ? [] : t.actions;
|
|
16
|
+
}
|
|
17
|
+
function a(t) {
|
|
18
|
+
return Array.isArray(t) ? t.some((t) => r(t) !== void 0 && i(t).some((t) => e(t) && t.type === "show")) : !1;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as hasConditionTriggeredShow, t as linkageRules, i as ruleActions, r as ruleCondition, n as ruleTriggerKind };
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.21.0 made by Venus | 2026-09-14T13:39:26.088Z */
|
|
2
2
|
import { isRecord as e } from "../validation.js";
|
|
3
3
|
import { isStateAction as t } from "./taxonomy.js";
|
|
4
4
|
//#region src/engine/linkage/source-tracking.ts
|
|
5
5
|
function n(n) {
|
|
6
|
-
let
|
|
7
|
-
for (let n of
|
|
6
|
+
let r = n.linkage?.rules ?? [], a = /* @__PURE__ */ new Set();
|
|
7
|
+
for (let n of r) !e(n) || !e(n.trigger) || n.trigger.kind !== "condition" || !Array.isArray(n.actions) || n.actions.every((n) => !e(n) || !t(n)) || i(n.trigger.condition, a);
|
|
8
8
|
return [...a];
|
|
9
9
|
}
|
|
10
|
-
function r(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
function r(e) {
|
|
11
|
+
let t = /* @__PURE__ */ new Set(), n = i(e, t);
|
|
12
|
+
return {
|
|
13
|
+
keys: [...t],
|
|
14
|
+
opaque: n
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function i(t, n) {
|
|
18
|
+
if (!e(t)) return !1;
|
|
19
|
+
if (t.kind === "leaf") return typeof t.sourceKey == "string" && t.sourceKey.length > 0 && !t.sourceKey.startsWith("$") && n.add(t.sourceKey), !1;
|
|
20
|
+
if (t.kind === "expression") return !0;
|
|
21
|
+
if (t.kind === "group" && Array.isArray(t.children)) {
|
|
22
|
+
let e = !1;
|
|
23
|
+
for (let r of t.children) e = i(r, n) || e;
|
|
24
|
+
return e;
|
|
17
25
|
}
|
|
26
|
+
return !1;
|
|
18
27
|
}
|
|
19
28
|
//#endregion
|
|
20
|
-
export {
|
|
29
|
+
export { i as collectConditionSourceKeys, r as describeConditionSources, n as getLinkageSourceKeys };
|