@vef-framework-react/form-editor 2.30.0 → 2.31.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/render/form-renderer.cjs +1 -1
- package/dist/cjs/render/subform-columns.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 +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/code-set-catalog.js +1 -1
- package/dist/es/editor/context-sources.js +1 -1
- package/dist/es/editor/data-source-apis.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/host-validation.js +1 -1
- package/dist/es/editor/issue-location.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 +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 +1 -1
- 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 +1 -1
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +1 -1
- 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 +1 -1
- 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/code-set-source.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 +1 -1
- package/dist/es/editor/properties/option-editors.js +1 -1
- 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 +1 -1
- package/dist/es/editor/properties/remote-request-editor.js +1 -1
- package/dist/es/editor/properties/system-variables-panel.js +1 -1
- 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 +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 +1 -1
- 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/code-sets.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 +1 -1
- 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 +1 -1
- package/dist/es/engine/linkage/scope.js +1 -1
- package/dist/es/engine/linkage/shape.js +1 -1
- package/dist/es/engine/linkage/source-tracking.js +1 -1
- package/dist/es/engine/linkage/taxonomy.js +1 -1
- package/dist/es/engine/linkage/validator.js +1 -1
- package/dist/es/engine/option-mapping.js +1 -1
- 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 +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 +1 -1
- 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 +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 +1 -1
- package/dist/es/icons.js +1 -1
- package/dist/es/index.js +1 -1
- 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/code-set-context.js +1 -1
- package/dist/es/render/data-source-context.js +1 -1
- 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 +227 -196
- 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 +135 -87
- 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/render/form-renderer.d.ts +14 -2
- package/dist/types/render/subform-columns.d.ts +7 -2
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { Label as e } from "./label.js";
|
|
3
3
|
import { Fragment as t, jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { css as i } from "@emotion/react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { jsx as e, jsxs as t } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { css as n } from "@emotion/react";
|
|
4
4
|
import { globalCssVars as r } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
//#region src/render/parts/option-order.ts
|
|
3
3
|
function e(e, t) {
|
|
4
4
|
let n = new Map(t.map((e, t) => [e.value, t]));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { errorTextCss as e, helperTextCss as t } from "./field-shell.js";
|
|
3
3
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/render/parts/options-status.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { DEFAULT_GAP_SCALE as e } from "../types/schema.js";
|
|
3
3
|
//#region src/render/stack-style.ts
|
|
4
4
|
var t = {
|
|
@@ -1,133 +1,181 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { isContainerNode as e } from "../engine/schema/walk.js";
|
|
3
3
|
import { isKeyedField as t, isValidatableField as n } from "../engine/keys.js";
|
|
4
4
|
import { validateKeyedFieldValue as r } from "./submit.js";
|
|
5
|
-
import {
|
|
6
|
-
import { createEditableColumn as
|
|
7
|
-
import { DEFAULT_DATETIME_FORMAT as
|
|
5
|
+
import { Fragment as i, jsx as a, jsxs as o } from "@emotion/react/jsx-runtime";
|
|
6
|
+
import { Flex as s, Text as c, createEditableColumn as l, filterOptionByLabel as u } from "@vef-framework-react/components";
|
|
7
|
+
import { DEFAULT_DATETIME_FORMAT as d, DEFAULT_DATE_FORMAT as f } from "@vef-framework-react/shared";
|
|
8
8
|
//#region src/render/subform-columns.tsx
|
|
9
|
-
function
|
|
9
|
+
function p(e, t) {
|
|
10
10
|
let n = [];
|
|
11
11
|
return e?.kind === "static" ? n = e.options : e?.kind === "codeSet" && (n = t?.[e.codeSet] ?? []), n.map((e) => ({
|
|
12
12
|
label: e.label,
|
|
13
13
|
value: String(e.value)
|
|
14
14
|
}));
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function m(e) {
|
|
17
17
|
return n(e) && e.validate?.required === !0;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
renderEditor: (e) => /* @__PURE__ */ i(e.Input, {
|
|
19
|
+
function h(e, t) {
|
|
20
|
+
let n = e.label ?? e.key, i = e.columnWidth, o = { onChange: ({ value: t }) => r(e, m(e), t) };
|
|
21
|
+
switch (e.type) {
|
|
22
|
+
case "textfield": return l(e.key, {
|
|
23
|
+
title: n,
|
|
24
|
+
width: i,
|
|
25
|
+
validators: o,
|
|
26
|
+
renderEditor: (t) => /* @__PURE__ */ a(t.Input, {
|
|
28
27
|
noWrapper: !0,
|
|
29
|
-
maxLength:
|
|
30
|
-
placeholder:
|
|
28
|
+
maxLength: e.maxLength,
|
|
29
|
+
placeholder: e.placeholder
|
|
31
30
|
})
|
|
32
31
|
});
|
|
33
|
-
case "textarea": return
|
|
34
|
-
title:
|
|
35
|
-
width:
|
|
36
|
-
validators:
|
|
37
|
-
renderEditor: (
|
|
32
|
+
case "textarea": return l(e.key, {
|
|
33
|
+
title: n,
|
|
34
|
+
width: i,
|
|
35
|
+
validators: o,
|
|
36
|
+
renderEditor: (t) => /* @__PURE__ */ a(t.TextArea, {
|
|
38
37
|
noWrapper: !0,
|
|
39
|
-
maxLength:
|
|
40
|
-
placeholder:
|
|
38
|
+
maxLength: e.maxLength,
|
|
39
|
+
placeholder: e.placeholder
|
|
41
40
|
})
|
|
42
41
|
});
|
|
43
|
-
case "number": return
|
|
44
|
-
title:
|
|
45
|
-
width:
|
|
46
|
-
validators:
|
|
47
|
-
renderEditor: (
|
|
42
|
+
case "number": return l(e.key, {
|
|
43
|
+
title: n,
|
|
44
|
+
width: i,
|
|
45
|
+
validators: o,
|
|
46
|
+
renderEditor: (t) => /* @__PURE__ */ a(t.InputNumber, {
|
|
48
47
|
noWrapper: !0,
|
|
49
|
-
max:
|
|
50
|
-
min:
|
|
51
|
-
placeholder:
|
|
52
|
-
precision:
|
|
53
|
-
step:
|
|
48
|
+
max: e.max,
|
|
49
|
+
min: e.min,
|
|
50
|
+
placeholder: e.placeholder,
|
|
51
|
+
precision: e.precision,
|
|
52
|
+
step: e.step
|
|
54
53
|
})
|
|
55
54
|
});
|
|
56
|
-
case "select": return
|
|
57
|
-
title:
|
|
58
|
-
width:
|
|
59
|
-
validators:
|
|
60
|
-
renderEditor: (
|
|
55
|
+
case "select": return l(e.key, {
|
|
56
|
+
title: n,
|
|
57
|
+
width: i,
|
|
58
|
+
validators: o,
|
|
59
|
+
renderEditor: (n) => /* @__PURE__ */ a(n.Select, {
|
|
61
60
|
noWrapper: !0,
|
|
62
|
-
allowClear:
|
|
63
|
-
filterOption:
|
|
64
|
-
options:
|
|
65
|
-
placeholder:
|
|
66
|
-
showSearch:
|
|
61
|
+
allowClear: e.allowClear,
|
|
62
|
+
filterOption: u,
|
|
63
|
+
options: p(e.dataSource, t),
|
|
64
|
+
placeholder: e.placeholder,
|
|
65
|
+
showSearch: e.showSearch
|
|
67
66
|
})
|
|
68
67
|
});
|
|
69
|
-
case "radio": return
|
|
70
|
-
title:
|
|
71
|
-
width:
|
|
72
|
-
validators:
|
|
73
|
-
renderEditor: (
|
|
68
|
+
case "radio": return l(e.key, {
|
|
69
|
+
title: n,
|
|
70
|
+
width: i,
|
|
71
|
+
validators: o,
|
|
72
|
+
renderEditor: (n) => /* @__PURE__ */ a(n.Radio, {
|
|
74
73
|
noWrapper: !0,
|
|
75
|
-
options:
|
|
74
|
+
options: p(e.dataSource, t)
|
|
76
75
|
})
|
|
77
76
|
});
|
|
78
|
-
case "checkbox-group": return
|
|
79
|
-
title:
|
|
80
|
-
width:
|
|
81
|
-
validators:
|
|
82
|
-
renderEditor: (
|
|
77
|
+
case "checkbox-group": return l(e.key, {
|
|
78
|
+
title: n,
|
|
79
|
+
width: i,
|
|
80
|
+
validators: o,
|
|
81
|
+
renderEditor: (n) => /* @__PURE__ */ a(n.CheckboxGroup, {
|
|
83
82
|
noWrapper: !0,
|
|
84
|
-
options:
|
|
83
|
+
options: p(e.dataSource, t)
|
|
85
84
|
})
|
|
86
85
|
});
|
|
87
|
-
case "switch": return
|
|
88
|
-
title:
|
|
89
|
-
width:
|
|
90
|
-
validators:
|
|
91
|
-
renderEditor: (e) => /* @__PURE__ */
|
|
86
|
+
case "switch": return l(e.key, {
|
|
87
|
+
title: n,
|
|
88
|
+
width: i,
|
|
89
|
+
validators: o,
|
|
90
|
+
renderEditor: (e) => /* @__PURE__ */ a(e.Bool, { noWrapper: !0 })
|
|
92
91
|
});
|
|
93
|
-
case "date": return
|
|
94
|
-
title:
|
|
95
|
-
width:
|
|
96
|
-
validators:
|
|
97
|
-
renderEditor: (
|
|
92
|
+
case "date": return l(e.key, {
|
|
93
|
+
title: n,
|
|
94
|
+
width: i,
|
|
95
|
+
validators: o,
|
|
96
|
+
renderEditor: (t) => /* @__PURE__ */ a(t.DatePicker, {
|
|
98
97
|
noWrapper: !0,
|
|
99
|
-
format:
|
|
100
|
-
placeholder:
|
|
98
|
+
format: f,
|
|
99
|
+
placeholder: e.placeholder
|
|
101
100
|
})
|
|
102
101
|
});
|
|
103
|
-
case "datetime": return
|
|
104
|
-
title:
|
|
105
|
-
width:
|
|
106
|
-
validators:
|
|
107
|
-
renderEditor: (
|
|
102
|
+
case "datetime": return l(e.key, {
|
|
103
|
+
title: n,
|
|
104
|
+
width: i,
|
|
105
|
+
validators: o,
|
|
106
|
+
renderEditor: (t) => /* @__PURE__ */ a(t.DatePicker, {
|
|
108
107
|
noWrapper: !0,
|
|
109
108
|
showTime: !0,
|
|
110
|
-
format:
|
|
111
|
-
placeholder:
|
|
109
|
+
format: d,
|
|
110
|
+
placeholder: e.placeholder
|
|
112
111
|
})
|
|
113
112
|
});
|
|
114
|
-
case "daterange": return
|
|
115
|
-
title:
|
|
116
|
-
width:
|
|
117
|
-
validators:
|
|
118
|
-
renderEditor: (e) => /* @__PURE__ */
|
|
113
|
+
case "daterange": return l(e.key, {
|
|
114
|
+
title: n,
|
|
115
|
+
width: i,
|
|
116
|
+
validators: o,
|
|
117
|
+
renderEditor: (e) => /* @__PURE__ */ a(e.DateRangePicker, {
|
|
119
118
|
noWrapper: !0,
|
|
120
|
-
format:
|
|
119
|
+
format: f
|
|
121
120
|
})
|
|
122
121
|
});
|
|
123
|
-
default: return
|
|
124
|
-
title:
|
|
125
|
-
width:
|
|
122
|
+
default: return l(e.key, {
|
|
123
|
+
title: n,
|
|
124
|
+
width: i
|
|
126
125
|
});
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
128
|
+
function g(n, r, a) {
|
|
129
|
+
let s = [];
|
|
130
|
+
for (let c of n) {
|
|
131
|
+
if (e(c) || !t(c)) continue;
|
|
132
|
+
let n = h(c, r);
|
|
133
|
+
if (!a) {
|
|
134
|
+
s.push(n);
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
let { subform: l, render: u } = a, d = s.length === 0, f = {
|
|
138
|
+
key: l.key,
|
|
139
|
+
column: c.key,
|
|
140
|
+
type: c.type,
|
|
141
|
+
label: c.label
|
|
142
|
+
}, p = u(f), m = n.renderEditor;
|
|
143
|
+
function g(e, t) {
|
|
144
|
+
let n = d && _(l, t, u), r = u({
|
|
145
|
+
...f,
|
|
146
|
+
row: t
|
|
147
|
+
});
|
|
148
|
+
return !n && r == null ? e : /* @__PURE__ */ o(i, { children: [
|
|
149
|
+
n,
|
|
150
|
+
e,
|
|
151
|
+
r
|
|
152
|
+
] });
|
|
153
|
+
}
|
|
154
|
+
s.push({
|
|
155
|
+
...n,
|
|
156
|
+
title: p == null ? n.title : /* @__PURE__ */ o("span", { children: [c.label ?? c.key, p] }),
|
|
157
|
+
renderView: (e, t, r) => g(n.renderView ? n.renderView(e, t, r) : e, r),
|
|
158
|
+
renderEditor: m && ((e, t) => g(m(e, t), t.index))
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
return s;
|
|
162
|
+
}
|
|
163
|
+
function _(e, t, n) {
|
|
164
|
+
let r = n?.({
|
|
165
|
+
key: e.key,
|
|
166
|
+
type: e.type,
|
|
167
|
+
label: e.label,
|
|
168
|
+
row: t
|
|
169
|
+
});
|
|
170
|
+
return r == null ? null : /* @__PURE__ */ o(s, {
|
|
171
|
+
align: "center",
|
|
172
|
+
gap: 4,
|
|
173
|
+
wrap: "wrap",
|
|
174
|
+
children: [/* @__PURE__ */ a(c, {
|
|
175
|
+
strong: !0,
|
|
176
|
+
children: `第 ${t + 1} 行`
|
|
177
|
+
}), r]
|
|
178
|
+
});
|
|
131
179
|
}
|
|
132
180
|
//#endregion
|
|
133
|
-
export {
|
|
181
|
+
export { g as buildSubformColumns, p as columnOptions, _ as subformRowHeading };
|
package/dist/es/render/submit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { containerBodies as e } from "../engine/schema/nodes.js";
|
|
3
3
|
import { isContainerNode as t, isLeafField as n, nodeLabel as r, walkNodes as i } from "../engine/schema/walk.js";
|
|
4
4
|
import { isKeyedField as a, isKeyedNode as o, isValidatableField as s } from "../engine/keys.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { isRootScope as e, walkFields as t } from "../engine/schema/walk.js";
|
|
3
3
|
import { resolveRequestParams as n } from "../engine/data-source-params.js";
|
|
4
4
|
import { resolveLinkageEvaluators as r } from "../engine/linkage/default-evaluator.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { getFieldPermission as e, isWritableFieldPermission as t } from "../engine/linkage/evaluator.js";
|
|
3
3
|
import { isDeepEqual as n } from "@vef-framework-react/shared";
|
|
4
4
|
//#region src/runtime/field-write.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
//#region src/runtime/resolve-scope-values.ts
|
|
3
3
|
function e(e, t) {
|
|
4
4
|
if (t === "") return e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { emptyRuntimeState as e } from "../engine/linkage/evaluator.js";
|
|
3
3
|
import { createContextWithSelector as t } from "@vef-framework-react/core";
|
|
4
4
|
//#region src/runtime/runtime-context.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { isRootScope as e, walkFields as t } from "../engine/schema/walk.js";
|
|
3
3
|
import { isKeyedField as n } from "../engine/keys.js";
|
|
4
4
|
import { evaluateRuntimeStates as r } from "../engine/linkage/evaluator.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { isDeepEqual as e } from "@vef-framework-react/shared";
|
|
3
3
|
//#region src/runtime/stabilize-state-map.ts
|
|
4
4
|
function t(t, n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { createContext as t, use as n, useCallback as r, useSyncExternalStore as i } from "react";
|
|
4
4
|
//#region src/store/engine-provider.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { createId as e, idPrefixForType as t } from "../engine/ids.js";
|
|
3
3
|
import { createEmptySchema as n } from "../engine/schema/nodes.js";
|
|
4
4
|
import { countFields as r, findField as i, findNode as a, findScope as o, scopeEquals as s, walkFields as c, walkNodes as l } from "../engine/schema/walk.js";
|
package/dist/es/types/chrome.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
//#region src/types/data-source.ts
|
|
3
3
|
var e = { resolve: () => Promise.resolve([]) };
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
//#region src/types/dynamic-value.ts
|
|
3
3
|
function e(e) {
|
|
4
4
|
if (typeof e != "object" || !e) return !1;
|
package/dist/es/types/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
|
2
2
|
import { defineContainerDefinition as e, defineFieldDefinition as t } from "./component.js";
|
|
3
3
|
import { noopDataSourceResolver as n } from "./data-source.js";
|
|
4
4
|
import { isDynamicValue as r } from "./dynamic-value.js";
|
package/dist/es/types/linkage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.31.0 made by Venus | 2026-11-19T01:42:22.623Z */
|
package/dist/es/types/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactElement, Ref } from 'react';
|
|
1
|
+
import { ReactElement, ReactNode, Ref } from 'react';
|
|
2
2
|
import { RuntimeFormValues } from '../runtime/types';
|
|
3
|
-
import { CodeSetQueryFn, DataSourceResolver, EvaluationContext, FieldPermission, FormSchema, LinkageEvaluators, PresentationDevice } from '../types';
|
|
3
|
+
import { Block, CodeSetQueryFn, DataSourceResolver, EvaluationContext, FieldPermission, FormSchema, LinkageEvaluators, PresentationDevice } from '../types';
|
|
4
4
|
export interface FormRendererProps {
|
|
5
5
|
schema: FormSchema;
|
|
6
6
|
/**
|
|
@@ -67,6 +67,18 @@ export interface FormRendererProps {
|
|
|
67
67
|
* native viewport-anchored overlay behavior is correct.
|
|
68
68
|
*/
|
|
69
69
|
containOverlays?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Content beside a visible keyed field. A subform is addressed once by its key.
|
|
72
|
+
* Both layouts expose row headings and cells with a zero-based row. Desktop tables
|
|
73
|
+
* also expose column headers. All use the subform key and optional column key.
|
|
74
|
+
*/
|
|
75
|
+
renderFieldExtra?: (field: {
|
|
76
|
+
key: string;
|
|
77
|
+
type: Block["type"];
|
|
78
|
+
label?: string;
|
|
79
|
+
row?: number;
|
|
80
|
+
column?: string;
|
|
81
|
+
}) => ReactNode;
|
|
70
82
|
}
|
|
71
83
|
/**
|
|
72
84
|
* The curated imperative surface of a rendered form. `submit` runs the same
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditableColumn } from '@vef-framework-react/components';
|
|
2
|
-
import { Block, FieldOption, FieldOptionSource } from '../types';
|
|
2
|
+
import { Block, FieldOption, FieldOptionSource, SubformNode } from '../types';
|
|
3
|
+
import { FormRendererProps } from './form-renderer';
|
|
3
4
|
/**
|
|
4
5
|
* A subform row is a flat record keyed by the template fields' `key`s. The
|
|
5
6
|
* `table` variant edits it through the components `EditableTable`, one column
|
|
@@ -26,5 +27,9 @@ export declare function columnOptions(source: FieldOptionSource | undefined, cod
|
|
|
26
27
|
* Build the `EditableTable` columns for a subform template, one per keyed leaf
|
|
27
28
|
* field in document order. Non-keyed blocks are dropped.
|
|
28
29
|
*/
|
|
29
|
-
export declare function buildSubformColumns(template: Block[], codeSets?: CodeSetOptions
|
|
30
|
+
export declare function buildSubformColumns(template: Block[], codeSets?: CodeSetOptions, extras?: {
|
|
31
|
+
subform: SubformNode;
|
|
32
|
+
render: NonNullable<FormRendererProps["renderFieldExtra"]>;
|
|
33
|
+
}): Array<EditableColumn<Row>>;
|
|
34
|
+
export declare function subformRowHeading(subform: SubformNode, row: number, render?: FormRendererProps["renderFieldExtra"]): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
30
35
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework-react/form-editor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Form editor for VEF framework",
|
|
6
6
|
"keywords": [
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@emotion/react": "^11.14.0",
|
|
47
47
|
"antd-mobile": "^5.42.3",
|
|
48
48
|
"lucide-react": "^1.23.0",
|
|
49
|
-
"@vef-framework-react/components": "2.
|
|
50
|
-
"@vef-framework-react/
|
|
51
|
-
"@vef-framework-react/
|
|
52
|
-
"@vef-framework-react/
|
|
49
|
+
"@vef-framework-react/components": "2.31.0",
|
|
50
|
+
"@vef-framework-react/hooks": "2.31.0",
|
|
51
|
+
"@vef-framework-react/shared": "2.31.0",
|
|
52
|
+
"@vef-framework-react/core": "2.31.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"react": "^19.2.7"
|