soma-kit 0.1.11 → 0.1.13
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/README.md +106 -112
- package/bin/soma-kit.mjs +32 -2
- package/bin/soma.mjs +22 -0
- package/package.json +14 -7
- package/packs/finance/reconcile-board.ts +5 -2
- package/packs/finance/reconcile-desk/compile.ts +3 -2
- package/spec/generated/kit-app.schema.json +929 -37
- package/spec/generated/kit-page.schema.json +1684 -161
- package/spec/kit-grammar.json +1176 -584
- package/spec/kit-grammar.schema.json +1971 -393
- package/src/app/app-config.ts +449 -347
- package/src/app/component-gate.ts +283 -28
- package/src/app/compose-apps.ts +79 -8
- package/src/app/define-kit-actions.ts +245 -41
- package/src/app/define-kit-app.ts +176 -33
- package/src/app/define-kit-view.ts +104 -0
- package/src/app/dev-diagnostic.ts +5 -0
- package/src/app/envelope.ts +1 -161
- package/src/app/index.ts +29 -6
- package/src/app/kit-view-context.ts +439 -0
- package/src/app/notify-renderer.ts +1 -115
- package/src/app/paged-list-adapter.ts +1 -240
- package/src/app/render-ports.ts +18 -0
- package/src/app/server-pages.ts +11 -3
- package/src/app/server.ts +530 -103
- package/src/app/submit.types.ts +1 -1
- package/src/app/theme-endpoint.ts +63 -0
- package/src/app/theme-runtime-shared.ts +1 -0
- package/src/app/theme-runtime.ts +667 -0
- package/src/base/action-busy.ts +103 -6
- package/src/base/action-gate.ts +4 -255
- package/src/base/action-slots.ts +58 -0
- package/src/base/alert.ts +5 -3
- package/src/base/anchored-layer.ts +50 -0
- package/src/base/avatar.ts +2 -2
- package/src/base/button.ts +99 -37
- package/src/base/cascader.ts +11 -12
- package/src/base/check-core.ts +9 -1
- package/src/base/checkbox.ts +2 -1
- package/src/base/choice.ts +49 -28
- package/src/base/class-candidates.ts +17 -0
- package/src/base/color-picker.ts +16 -11
- package/src/base/combobox.ts +5 -3
- package/src/base/command-palette.ts +10 -6
- package/src/base/context-menu.ts +10 -7
- package/src/base/countdown.ts +1 -1
- package/src/base/date-range.ts +32 -18
- package/src/base/date.ts +135 -28
- package/src/base/delta.ts +72 -0
- package/src/base/divider.ts +2 -2
- package/src/base/end-edge.ts +49 -0
- package/src/base/fab.ts +12 -5
- package/src/base/gap-value.ts +148 -0
- package/src/base/hint-tips.ts +170 -0
- package/src/base/icons.ts +8 -0
- package/src/base/illustrations.ts +94 -0
- package/src/base/image.ts +1 -1
- package/src/base/index.ts +35 -11
- package/src/base/input.ts +42 -13
- package/src/base/kbd.ts +3 -1
- package/src/base/link.ts +4 -4
- package/src/base/listbox-core.ts +56 -35
- package/src/base/loading-gate.ts +186 -0
- package/src/base/mentions.ts +7 -6
- package/src/base/menu-button.ts +28 -12
- package/src/base/menu-core.ts +41 -8
- package/src/base/motion/aura.ts +2 -2
- package/src/base/motion/hover-3d.ts +3 -3
- package/src/base/motion/hover-gallery.ts +2 -2
- package/src/base/motion/marquee.ts +3 -3
- package/src/base/motion/text-rotate.ts +2 -2
- package/src/base/number.ts +93 -80
- package/src/base/otp.ts +9 -5
- package/src/base/overlay-runtime.ts +235 -0
- package/src/base/permission-gate.ts +6 -0
- package/src/base/popover.ts +48 -16
- package/src/base/popup.ts +143 -19
- package/src/base/portal-core.ts +4 -0
- package/src/base/price-text.ts +2 -2
- package/src/base/progress.ts +2 -2
- package/src/base/qr-code.ts +4 -4
- package/src/base/qty-stepper.ts +14 -8
- package/src/base/radio.ts +2 -1
- package/src/base/range.ts +21 -4
- package/src/base/rating.ts +12 -7
- package/src/base/reason-tip.ts +150 -0
- package/src/base/segmented.ts +27 -21
- package/src/base/select.ts +4 -3
- package/src/base/shared.ts +387 -49
- package/src/base/state-panel.ts +346 -0
- package/src/base/status-tone.ts +27 -0
- package/src/base/sticky-edge.ts +116 -0
- package/src/base/swap.ts +10 -7
- package/src/base/switch.ts +11 -6
- package/src/base/tag-input.ts +20 -16
- package/src/base/tag.ts +68 -34
- package/src/base/text.ts +80 -18
- package/src/base/textarea.ts +37 -11
- package/src/base/time-picker.ts +18 -13
- package/src/base/tree-select.ts +21 -12
- package/src/base/trend-tone.ts +9 -0
- package/src/base/upload.ts +48 -14
- package/src/base/view-transition.ts +77 -0
- package/src/base/virtual-list.ts +107 -1
- package/src/biz/approval-desk/compile.ts +23 -41
- package/src/biz/approval-desk/shell.ts +11 -8
- package/src/biz/auth-panel/compile.ts +37 -52
- package/src/biz/auth-panel/index.ts +1 -1
- package/src/biz/auth-panel/shell.ts +5 -4
- package/src/biz/category-crud/compile.ts +23 -37
- package/src/biz/category-crud/shell.ts +2 -1
- package/src/biz/checkout-page/compile.ts +22 -5
- package/src/biz/checkout-page/shell.ts +4 -3
- package/src/biz/compose.ts +13 -27
- package/src/biz/define.ts +5 -4
- package/src/biz/import-wizard/compile.ts +22 -26
- package/src/biz/import-wizard/hub.ts +126 -61
- package/src/biz/import-wizard/shell.ts +5 -4
- package/src/biz/index.ts +3 -3
- package/src/biz/landing-page/compile.ts +19 -3
- package/src/biz/link/hub.ts +69 -22
- package/src/biz/link/shared.ts +127 -119
- package/src/biz/master-sub/compile.ts +127 -48
- package/src/biz/master-sub/index.ts +5 -2
- package/src/biz/master-sub/shell.ts +95 -18
- package/src/biz/multi-board/compile.ts +38 -50
- package/src/biz/multi-board/index.ts +18 -1
- package/src/biz/multi-board/shell.ts +32 -20
- package/src/biz/notification-center/compile.ts +21 -33
- package/src/biz/notification-center/shell.ts +6 -4
- package/src/biz/page-templates/domain-templates.ts +80 -13
- package/src/biz/page-templates/result-page/compile.ts +11 -2
- package/src/biz/page-templates/result-page/shell.ts +2 -1
- package/src/biz/page-templates/shared.ts +34 -36
- package/src/biz/page-templates/sign-in-page/shell.ts +2 -2
- package/src/biz/record-detail/compile.ts +48 -43
- package/src/biz/record-detail/index.ts +11 -1
- package/src/biz/record-detail/shell.ts +8 -6
- package/src/biz/settings-center/compile.ts +7 -5
- package/src/biz/settings-center/shell.ts +6 -4
- package/src/biz/shared/action-host.ts +97 -211
- package/src/biz/shared/compile-helpers.ts +98 -0
- package/src/biz/shared/coordinator.ts +472 -92
- package/src/biz/shared/index.ts +13 -2
- package/src/biz/shared/object-aliases.ts +154 -0
- package/src/biz/shared/overlay-compile.ts +239 -0
- package/src/biz/shared/overlay-shell.ts +209 -0
- package/src/biz/shared/pipes.ts +50 -31
- package/src/biz/shared/remove-wire.ts +14 -0
- package/src/biz/shared/runtime-hub.ts +226 -24
- package/src/biz/single-form/compile.ts +16 -37
- package/src/biz/single-form/shell.ts +4 -3
- package/src/biz/standard-crud/compile.ts +72 -255
- package/src/biz/standard-crud/shell.ts +21 -99
- package/src/biz/step-form/compile.ts +26 -97
- package/src/biz/step-form/hub.ts +34 -41
- package/src/biz/step-form/shell.ts +5 -5
- package/src/biz/types.ts +4 -3
- package/src/cli/core-imports.ts +54 -0
- package/src/cli/kit-cli.ts +254 -25
- package/src/cli/kit-init.ts +227 -0
- package/src/cli/layout-cli.ts +167 -0
- package/src/cli/migrate/index.ts +10 -0
- package/src/cli/migrate/migrate.ts +248 -0
- package/src/cli/migrate/text-utils.ts +306 -0
- package/src/cli/migrate/theme-map.ts +104 -0
- package/src/cli/migrate/ts-rules.ts +235 -0
- package/src/cli/migrate/types.ts +95 -0
- package/src/cli/migrate/view-skeleton.ts +159 -0
- package/src/cli/migrate/yaml-report.ts +376 -0
- package/src/cli/migrate/yaml-rules.ts +465 -0
- package/src/cli/service-endpoint-check.ts +425 -0
- package/src/cli/source-path-check.d.mts +17 -0
- package/src/cli/source-path-check.mjs +334 -0
- package/src/cli/view-writes.ts +761 -0
- package/src/compile/action-host-attach.ts +21 -29
- package/src/compile/closed-set.ts +570 -0
- package/src/compile/compile-page.ts +267 -76
- package/src/compile/component-candidates.ts +13 -2
- package/src/compile/hints.ts +30 -1
- package/src/compile/index.ts +1 -0
- package/src/compile/kit-error.ts +1 -0
- package/src/compile/layout-lint/engine.ts +82 -0
- package/src/compile/layout-lint/index.ts +55 -0
- package/src/compile/layout-lint/rules-composition.ts +218 -0
- package/src/compile/layout-lint/rules-form.ts +192 -0
- package/src/compile/layout-lint/rules-table.ts +194 -0
- package/src/compile/layout-lint/score.ts +52 -0
- package/src/compile/layout-lint/types.ts +51 -0
- package/src/compile/locate.ts +21 -1
- package/src/compile/parse.ts +370 -41
- package/src/compile/redirect.ts +6 -2
- package/src/compile/remove-guard.ts +10 -7
- package/src/compile/styles.ts +63 -2
- package/src/compile/types.ts +31 -3
- package/src/compile/view-check.ts +284 -0
- package/src/data/amount-breakdown.ts +8 -3
- package/src/data/anchor-nav.ts +2 -2
- package/src/data/approval-flow.ts +3 -3
- package/src/data/assignment-picker.ts +92 -55
- package/src/data/async-result-panel.ts +111 -9
- package/src/data/breadcrumbs.ts +5 -4
- package/src/data/calendar.ts +24 -27
- package/src/data/carousel.ts +13 -8
- package/src/data/chart.ts +183 -44
- package/src/data/checklist.ts +20 -7
- package/src/data/code-view.ts +12 -6
- package/src/data/comment-thread.ts +7 -4
- package/src/data/confirm-dialog.ts +81 -18
- package/src/data/context-menu.ts +29 -37
- package/src/data/d9-util.ts +2 -18
- package/src/data/diff.ts +4 -2
- package/src/data/dock.ts +3 -3
- package/src/data/embed.ts +233 -30
- package/src/data/field-mapper.ts +35 -30
- package/src/data/flow-editor-contract.ts +8 -1
- package/src/data/flow-editor.ts +113 -108
- package/src/data/flow-node-options.ts +120 -0
- package/src/data/flow-remote-options.ts +0 -103
- package/src/data/footer.ts +2 -2
- package/src/data/form-draft-registry.ts +2 -4
- package/src/data/gantt.ts +19 -19
- package/src/data/hero.ts +4 -3
- package/src/data/image-viewer.ts +27 -30
- package/src/data/index.ts +5 -2
- package/src/data/item-list.ts +48 -31
- package/src/data/kanban.ts +82 -52
- package/src/data/media-grid.ts +20 -20
- package/src/data/mega-menu.ts +6 -4
- package/src/data/menu-dom.ts +4 -2
- package/src/data/menu.ts +47 -15
- package/src/data/mockup.ts +10 -6
- package/src/data/modal-dialog.ts +49 -25
- package/src/data/navbar.ts +12 -7
- package/src/data/notice-list.ts +268 -0
- package/src/data/notify-renderer.ts +250 -0
- package/src/data/object-form.ts +1360 -666
- package/src/data/outcome-watch.ts +61 -2
- package/src/data/pager.ts +80 -34
- package/src/data/permission-matrix.ts +52 -31
- package/src/data/permission-tree.ts +71 -44
- package/src/data/pricing-table.ts +30 -14
- package/src/data/prompt-dialog.ts +124 -194
- package/src/data/reaction-bar.ts +83 -92
- package/src/data/read-rollback.ts +73 -0
- package/src/data/record-card.ts +26 -5
- package/src/data/record-picker.ts +104 -55
- package/src/data/redirect.ts +32 -32
- package/src/data/remote-options.ts +13 -6
- package/src/data/request-console.ts +5 -3
- package/src/data/resident.ts +2 -1
- package/src/data/result-panel.ts +8 -4
- package/src/data/rich-text.ts +61 -55
- package/src/data/row-editor.ts +362 -76
- package/src/data/rule-builder.ts +26 -20
- package/src/data/shape-util.ts +27 -9
- package/src/data/stat-group.ts +392 -109
- package/src/data/static-lazy.ts +1 -0
- package/src/data/static-registry.ts +24 -11
- package/src/data/steps.ts +10 -5
- package/src/data/survey.ts +27 -32
- package/src/data/system-switcher.ts +3 -3
- package/src/data/text-action-button.ts +17 -0
- package/src/data/timeline.ts +19 -8
- package/src/data/tour-guide.ts +23 -30
- package/src/data/transfer.ts +62 -38
- package/src/data/tree-table.ts +152 -78
- package/src/data/tree.ts +49 -36
- package/src/data/trend-line.ts +6 -24
- package/src/data/virtual-rows.ts +133 -82
- package/src/data/watermark.ts +2 -2
- package/src/data/wrap.ts +63 -38
- package/src/data/wrapped-candidates.ts +10 -0
- package/src/frames/blank-frame.ts +1 -0
- package/src/frames/index.ts +2 -2
- package/src/frames/page-bar.ts +26 -24
- package/src/frames/page-header.ts +14 -5
- package/src/frames/page-status.ts +9 -7
- package/src/frames/shared.ts +36 -25
- package/src/frames/single-frame.ts +1 -0
- package/src/frames/split-frame/shell.ts +6 -6
- package/src/frames/split-frame/wiring.ts +2 -2
- package/src/frames/tabs-frame/shell.ts +4 -14
- package/src/frames/tabs-frame/wiring.ts +5 -8
- package/src/frames/top-main-frame.ts +3 -2
- package/src/frames/types.ts +13 -2
- package/src/frames/workspace-frame/extras.ts +21 -5
- package/src/frames/workspace-frame/index.ts +1 -1
- package/src/frames/workspace-frame/shell.ts +3 -2
- package/src/frames/workspace-frame/state.ts +13 -6
- package/src/frames/workspace-frame/view.ts +250 -48
- package/src/generated/kit-grammar-runtime.ts +645 -397
- package/src/generated/page-origin.ts +0 -11
- package/src/i18n/kit-text.ts +84 -29
- package/src/i18n/resolve-text-refs.ts +22 -6
- package/src/index.ts +2 -1
- package/src/object-renderer/action-gate.ts +11 -147
- package/src/object-renderer/arrange.ts +112 -84
- package/src/object-renderer/collapse-wiring.ts +2 -2
- package/src/object-renderer/collection-expand.ts +2 -2
- package/src/object-renderer/collection-parts.ts +401 -104
- package/src/object-renderer/collection-table.ts +287 -45
- package/src/object-renderer/collection.ts +258 -104
- package/src/object-renderer/compile-data.ts +112 -102
- package/src/object-renderer/crud-bridge.ts +32 -0
- package/src/object-renderer/defaults.ts +38 -16
- package/src/object-renderer/display-checks.ts +4 -25
- package/src/object-renderer/emit-events.ts +224 -176
- package/src/object-renderer/emit-object.ts +15 -2
- package/src/object-renderer/emit-static.ts +533 -151
- package/src/object-renderer/field-value.ts +593 -396
- package/src/object-renderer/filter-reload.ts +70 -0
- package/src/object-renderer/form-detail.ts +111 -2
- package/src/object-renderer/form-notify.ts +45 -0
- package/src/object-renderer/index.ts +26 -0
- package/src/object-renderer/key-field.ts +12 -0
- package/src/object-renderer/layout-facts.ts +386 -0
- package/src/object-renderer/layout-plan.ts +132 -0
- package/src/object-renderer/layout-plan.types.ts +22 -0
- package/src/object-renderer/linkage.ts +7 -270
- package/src/object-renderer/merge-class.ts +18 -1
- package/src/object-renderer/parts.ts +252 -1
- package/src/object-renderer/path-pick.ts +27 -0
- package/src/object-renderer/render-object.ts +456 -89
- package/src/object-renderer/request-actions.ts +232 -249
- package/src/object-renderer/skeleton.ts +58 -19
- package/src/object-renderer/table-actions.ts +319 -111
- package/src/object-renderer/table-summary.ts +2 -2
- package/src/object-renderer/table-tools.ts +429 -94
- package/src/object-renderer/types.ts +204 -127
- package/src/object-renderer/view-binding.ts +393 -0
- package/src/page-target/ai-surface.ts +37 -0
- package/src/page-target/compile.ts +48 -8
- package/src/page-target/index.ts +8 -1
- package/src/page-target/intent-schema.ts +165 -28
- package/src/page-target/target.ts +262 -51
- package/src/page-target/writer-policy.ts +14 -3
- package/src/recipes/container.ts +210 -0
- package/src/recipes/control.ts +277 -0
- package/src/recipes/index.ts +312 -0
- package/src/recipes/nowrap.ts +16 -0
- package/src/recipes/overlay.ts +240 -0
- package/src/recipes/placeholder.ts +79 -0
- package/src/recipes/rail-grid.ts +45 -0
- package/src/recipes/slot-align.ts +56 -0
- package/src/recipes/state.ts +99 -0
- package/src/recipes/status.ts +139 -0
- package/src/recipes/surface.ts +40 -0
- package/src/recipes/table-row.ts +88 -0
- package/src/recipes/title-row.ts +37 -0
- package/src/recipes/typography.ts +99 -0
- package/src/shared/action-field-guard.ts +41 -0
- package/src/shared/confirm-decl.ts +118 -0
- package/src/shared/envelope.ts +207 -0
- package/src/shared/escape.ts +57 -0
- package/src/shared/kit-error.ts +21 -0
- package/src/shared/paged-list-adapter.ts +15 -0
- package/src/shared/path-guard.ts +127 -0
- package/src/shared/theme-runtime-shared.ts +180 -0
- package/src/shared/view-info.ts +10 -0
- package/src/theme/index.ts +13 -0
- package/src/theme/kit-theme-text.ts +1 -1
- package/src/theme/kit-theme.css +407 -10
- package/src/theme/kit-theme.tpl +407 -10
- package/src/theme/nine-dim-structure.ts +247 -0
- package/src/theme/surface-layers.ts +101 -0
- package/src/theme/theme-tokens.ts +130 -84
- package/src/theme/theme-types.ts +103 -0
- package/src/theme/typography.ts +17 -17
- package/src/biz/shared/step-values.ts +0 -25
- package/src/biz/step-form/steps-ref.ts +0 -112
- package/src/data/options-bus.ts +0 -24
- package/src/object-renderer/adopt-gate.ts +0 -333
- package/src/object-renderer/field-policy.ts +0 -89
- package/src/object-renderer/outcome-draft.ts +0 -61
- package/src/theme/nine-dim-palettes.ts +0 -1473
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
// 对象渲染内核的全部类型(C 组独占;D、E 只 import)。
|
|
2
2
|
// renderObject(KitObject, KitRenderContext) -> KitObjectIR,纯函数,不碰 DOM。
|
|
3
3
|
|
|
4
|
+
import type { SomaConfirmSpec } from 'soma-core';
|
|
5
|
+
|
|
4
6
|
export type KitType =
|
|
5
7
|
| 'text' | 'longtext' | 'int' | 'decimal' | 'money' | 'percent' | 'bool'
|
|
6
8
|
| 'enum' | 'enums' | 'date' | 'datetime' | 'daterange';
|
|
7
9
|
export type KitPermission = 'r' | 'w' | 'create';
|
|
10
|
+
export type KitFieldAccess = 'read' | 'write' | 'create' | KitPermission;
|
|
11
|
+
export type KitFieldEmphasis = 'strong' | 'muted';
|
|
12
|
+
export type KitContainerEmphasis = 'primary' | 'normal' | 'subtle';
|
|
13
|
+
export type KitSurfaceRecipe = 'card' | 'flush' | 'plain';
|
|
8
14
|
/** 基础组件名:内置 13 个 + 应用登记的 App*。 */
|
|
9
15
|
export type KitBaseName = string;
|
|
10
16
|
export type KitMode = 'show' | 'edit';
|
|
@@ -22,34 +28,15 @@ export interface KitOptionDecl {
|
|
|
22
28
|
|
|
23
29
|
// ---------------------------------------------------------------- M 波 G3:字段联动(条件 / 后续链 / 远程选项)
|
|
24
30
|
|
|
25
|
-
/** 闭集条件叶子:{ field, op, value? }(op 取 formLinkage.conditions.ops) */
|
|
26
|
-
export interface KitCondition {
|
|
27
|
-
field: string;
|
|
28
|
-
op: string;
|
|
29
|
-
value?: unknown;
|
|
30
|
-
}
|
|
31
|
-
/** 闭集谓词:叶子,或一层 all / any 组合 */
|
|
32
|
-
export type KitPredicate = KitCondition | { all: KitCondition[] } | { any: KitCondition[] };
|
|
33
|
-
/** 字段项 `when` 的场景:新建 / 编辑 / 只读 */
|
|
34
|
-
export type KitScene = 'add' | 'edit' | 'view';
|
|
35
|
-
|
|
36
|
-
/** 动作后续链的一项:恰好一个键 */
|
|
37
|
-
export type KitThenItem =
|
|
38
|
-
| { link: string }
|
|
39
|
-
| { toast: string | { text: string; tone?: 'success' | 'info' | 'warning' | 'danger' | 'neutral' } }
|
|
40
|
-
| { reload: true };
|
|
41
|
-
|
|
42
31
|
/** schema.<字段>.options 的对象写法:远程选项 */
|
|
43
32
|
export interface KitOptionsFromDecl {
|
|
44
33
|
from: string;
|
|
45
|
-
/**
|
|
34
|
+
/** 请求参数:字面量 */
|
|
46
35
|
params?: Record<string, unknown>;
|
|
47
36
|
valueKey?: string;
|
|
48
37
|
labelKey?: string;
|
|
49
38
|
/** 响应体里行数组的路径(缺省依次试 formLinkage.optionsFrom.rowsPathCandidates) */
|
|
50
39
|
rowsPath?: string;
|
|
51
|
-
/** 所选选项行回填其它字段:{ 目标字段: 选项行的键 } */
|
|
52
|
-
fill?: Record<string, string>;
|
|
53
40
|
/** 远程搜索:搜索框(组件抛 search)的关键字作为这个参数重取 */
|
|
54
41
|
searchParam?: string;
|
|
55
42
|
/** 级联(Cascader)按层懒加载:展开节点时以 `<lazy>=<节点值>` 重取子级;根层不带该参数 */
|
|
@@ -62,17 +49,6 @@ export interface KitOptionsFromDecl {
|
|
|
62
49
|
childrenKey?: string;
|
|
63
50
|
}
|
|
64
51
|
|
|
65
|
-
/** view.form.policy:{ by: 字段名, table: { 取值: { hide | readonly | required: [字段] } } } */
|
|
66
|
-
export interface KitFieldPolicyDecl {
|
|
67
|
-
by: string;
|
|
68
|
-
table: Record<string, { hide?: string[]; readonly?: string[]; required?: string[] }>;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** behavior.poll:对象级轮询(命中 while 的行还在,就每 every 秒重取) */
|
|
72
|
-
export interface KitPollDecl {
|
|
73
|
-
every: number;
|
|
74
|
-
while: { field: string; in: Array<string | number | boolean> };
|
|
75
|
-
}
|
|
76
52
|
/** behavior.subscribe 的一条(refresh 恒为本对象) */
|
|
77
53
|
export interface KitSubscribeDecl {
|
|
78
54
|
channel: string;
|
|
@@ -84,6 +60,8 @@ export interface KitRule {
|
|
|
84
60
|
required?: boolean;
|
|
85
61
|
max_len?: number;
|
|
86
62
|
min_len?: number;
|
|
63
|
+
maxLength?: number;
|
|
64
|
+
minLength?: number;
|
|
87
65
|
pattern?: string;
|
|
88
66
|
min?: number;
|
|
89
67
|
max?: number;
|
|
@@ -95,7 +73,15 @@ export interface KitFieldSchema {
|
|
|
95
73
|
name: string;
|
|
96
74
|
type: KitType;
|
|
97
75
|
key?: boolean;
|
|
98
|
-
permission?: KitPermission; // 缺省 'r'
|
|
76
|
+
permission?: KitPermission; // 缺省 'r'(有 write 接口的非主键字段缺省 'w')
|
|
77
|
+
/** 字段读写权限:read / write / create(与 permission 等价) */
|
|
78
|
+
access?: KitFieldAccess;
|
|
79
|
+
/** 字段显式只读标记 */
|
|
80
|
+
readonly?: boolean;
|
|
81
|
+
/** 字段级语义强调:strong(粗体高亮)/ muted(弱化文字) */
|
|
82
|
+
emphasis?: KitFieldEmphasis;
|
|
83
|
+
/** 指标项/字段格主色高亮强调 */
|
|
84
|
+
highlight?: boolean;
|
|
99
85
|
/** 静态选项数组;写成对象 { from, params?, ... } 即远程选项(M 波 G3,renderObject 规整后进 KitCell.optionsFrom) */
|
|
100
86
|
options?: KitOptionDecl[] | KitOptionsFromDecl;
|
|
101
87
|
rules?: KitRule[];
|
|
@@ -103,15 +89,15 @@ export interface KitFieldSchema {
|
|
|
103
89
|
edit?: KitBaseName; // 第二优先级(编辑态)
|
|
104
90
|
format?: string; // 覆盖 types 表的 format,如 'currency:CNY'
|
|
105
91
|
ref?: string; // 共享顶层 schema 里的同名字段
|
|
106
|
-
/** 字段初值(GB2,human-only
|
|
92
|
+
/** 字段初值(GB2,human-only):字面量;只在新建时填「空且没改过」的字段 */
|
|
107
93
|
default?: unknown;
|
|
108
94
|
/** 隐藏草稿字段(GB3,human-only):值随草稿提交但表单不画;须可提交(permission w / create),不是安全边界 */
|
|
109
95
|
hidden?: boolean;
|
|
110
|
-
/** 由草稿派生的只读展示字段(GB6,human-only):{ template },闭集模板,permission 须为 r */
|
|
111
|
-
derive?: { template: string };
|
|
112
96
|
}
|
|
113
97
|
export type KitSchema = Record<string, KitFieldSchema>;
|
|
114
98
|
|
|
99
|
+
export type KitActionTone = 'primary' | 'neutral' | 'danger' | 'ghost' | 'tonal';
|
|
100
|
+
|
|
115
101
|
export interface KitAction {
|
|
116
102
|
id: string;
|
|
117
103
|
name: string;
|
|
@@ -119,34 +105,33 @@ export interface KitAction {
|
|
|
119
105
|
submit?: string; // 具名动作名
|
|
120
106
|
builtin?: string;
|
|
121
107
|
targetOverlay?: string; // 由第 3 层业务组件解释
|
|
122
|
-
|
|
123
|
-
|
|
108
|
+
/**
|
|
109
|
+
* 二次确认:字符串 = plain 文案(逐字写进 core 的 confirm 尾段);对象 = core 确认规格 { level, text, phrase?, impact? }(字面量,
|
|
110
|
+
* 对象形只给普通动作,删除动作与批量动作只收字符串)。判据见 shared/confirm-decl.ts
|
|
111
|
+
*/
|
|
112
|
+
confirm?: string | SomaConfirmSpec;
|
|
113
|
+
tone?: KitActionTone;
|
|
114
|
+
/** 纯字段名提取列表(仅 request 动作允许,从当前行/上下文取纯字段名,禁止表达式) */
|
|
115
|
+
pick?: string[];
|
|
116
|
+
/** 纯字段名重命名映射(仅 request 动作允许:{ 请求体键名: 源字段名 },禁止表达式) */
|
|
117
|
+
bodyMap?: Record<string, string>;
|
|
124
118
|
/** 单个权限码;写成数组报 KIT-OBJ-006(运行期类型保持宽松以便诊断)。 */
|
|
125
119
|
permission?: string | string[];
|
|
126
|
-
/** 执行后的写死后续:`reload` = 动作成功后经协调组件重取(K-5);业务组件之外的对象直接 window-reload */
|
|
127
|
-
after?: 'reload';
|
|
128
|
-
/** 执行后的有序后续链(M 波 G3,上限 formLinkage.then.maxItems):link / toast / reload */
|
|
129
|
-
then?: KitThenItem[];
|
|
130
|
-
/** 行操作可用条件(只用于 on: row):编进 steps 前置,行字段写在叶子 field 里 */
|
|
131
|
-
when?: KitPredicate;
|
|
132
120
|
/** 行操作固定折叠进「更多」菜单(B8;超过内联上限的也自动折叠) */
|
|
133
121
|
more?: boolean;
|
|
134
122
|
/** 声明式请求动作(P1):与 submit / builtin 三选一,由页面级 KitActionHost 经 core 写通道执行 */
|
|
135
123
|
request?: KitRequestDecl;
|
|
136
124
|
/** 声明式下载动作(P1):触发浏览器下载(GET 链接 / POST 表单),不经 fetch */
|
|
137
125
|
download?: KitDownloadDecl;
|
|
138
|
-
/**
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
export interface KitRequestThenItem {
|
|
148
|
-
reload: true | string;
|
|
149
|
-
on?: 'success' | 'failed' | 'always';
|
|
126
|
+
/** on: toolbar:展示对象路径 `view.<成员>`;on: row:行字段路径 `row.<字段>`。路径取值为真时动作置灰;只许纯路径,见 view-binding.ts */
|
|
127
|
+
disabled?: string;
|
|
128
|
+
/**
|
|
129
|
+
* 置灰原因(必须与 disabled 同写,只在动作置灰时显示):字面量文案 | `view.<成员>`(toolbar / row)| `row.<字段>`(仅 row)。
|
|
130
|
+
* 呈现写死:按钮保持可聚焦(只留 aria-disabled)、原因走气泡与 aria-describedby,菜单项带描述文字;见 base/reason-tip.ts
|
|
131
|
+
*/
|
|
132
|
+
disabledReason?: string;
|
|
133
|
+
/** on: row:行字段路径 `row.<字段>`,取值为真时该行不显示这个动作(业务对象逐行给出);只许纯路径 */
|
|
134
|
+
hidden?: string;
|
|
150
135
|
}
|
|
151
136
|
|
|
152
137
|
/** 按行分槽的结果命名:结果按「名字 + 行键」分开存;key 是 `$row.<主键字段>`(须是对象的 key: true 字段),行内动作的 outcome 条件默认读本行那一份 */
|
|
@@ -154,42 +139,36 @@ export interface KitIntoDecl {
|
|
|
154
139
|
name: string;
|
|
155
140
|
/** 按行分槽:`$row.<主键字段>`;写了 keyBy 时是列表项里的键字段名(拆分成 `<name>#<键值>` 的按行结果) */
|
|
156
141
|
key: string;
|
|
157
|
-
/**
|
|
142
|
+
/** 拆分:响应体里的列表路径(点路径);把一次请求的结果按列表项拆成按行结果,每项各按信封判状态 */
|
|
158
143
|
keyBy?: string;
|
|
159
144
|
}
|
|
160
145
|
|
|
161
|
-
/** request / download 的取值路径:`$row.字段` / `$focus.字段` / `$filter.字段` / `$page.page` / `$value` / `$selected.字段`;非 `$` 开头是字面量 */
|
|
162
146
|
export interface KitRequestDecl {
|
|
163
147
|
api: string;
|
|
164
148
|
method?: 'POST' | 'PUT' | 'PATCH';
|
|
165
|
-
body?: Record<string, unknown>;
|
|
166
149
|
/** 结果命名(outcome 范围名):组件用 outcome prop 订阅 pending / saved / failed 与响应 */
|
|
167
150
|
into?: string | KitIntoDecl;
|
|
168
|
-
/**
|
|
151
|
+
/** 处理中可取消:在原位置(结果槽)显示「取消」,点了真正中止请求,结果记为「已取消」(outcome 状态 cancelled,不是失败也不是成功) */
|
|
169
152
|
cancelable?: boolean;
|
|
170
|
-
/** 业务信封判定:path 取到的值不等于 equals 视为失败,message 取失败文案路径 */
|
|
171
|
-
ok?: { path?: string; equals?: unknown; message?: string };
|
|
172
153
|
/** 成功提示(词条或文案) */
|
|
173
154
|
notify?: string;
|
|
174
155
|
/** 页头状态行文案(配 page.status.follow):ok 成功后一行、failed 失败一行(可含 {字段} 插值与 {message});没写退回通用词条 */
|
|
175
156
|
status?: { ok?: string; failed?: string };
|
|
176
|
-
/**
|
|
177
|
-
then?: 'reload' | 'none' | KitRequestThenItem[];
|
|
178
|
-
/** H1d / H1e:声明该接口只读(POST 仅为带体查询);自动触发(on: mount / view.form.onChange)只许 read 的请求;read 的请求 then 缺省为 none */
|
|
157
|
+
/** H1d:声明该接口只读(POST 仅为带体查询);自动触发(on: mount)只许 read 的请求;只读请求成功后不重取(写操作成功后宿主固定重取) */
|
|
179
158
|
read?: boolean;
|
|
180
159
|
/** H1d:页面挂载时自动发一次(只许 read: true 的 POST) */
|
|
181
160
|
on?: 'mount';
|
|
182
|
-
/** GA4 请求前输入:发请求之前先弹出自绘输入表单,输入值作 $prompt 取值根 */
|
|
183
|
-
prompt?: { title?: string; submitLabel?: string; fields: Array<Record<string, unknown>> };
|
|
184
161
|
/** GA6 请求超时毫秒(区间读 core 语法真源 write.timeoutMs) */
|
|
185
162
|
timeoutMs?: number;
|
|
163
|
+
/** 纯字段名提取列表(从当前行/上下文取纯字段名,禁止表达式) */
|
|
164
|
+
pick?: string[];
|
|
165
|
+
/** 纯字段名重命名映射({ 请求体键名: 源字段名 },禁止表达式) */
|
|
166
|
+
bodyMap?: Record<string, string>;
|
|
186
167
|
}
|
|
187
168
|
|
|
188
169
|
export interface KitDownloadDecl {
|
|
189
170
|
api: string;
|
|
190
171
|
method?: 'GET' | 'POST';
|
|
191
|
-
body?: Record<string, unknown>;
|
|
192
|
-
query?: Record<string, unknown>;
|
|
193
172
|
filename?: string;
|
|
194
173
|
}
|
|
195
174
|
|
|
@@ -212,11 +191,11 @@ export interface KitBehavior {
|
|
|
212
191
|
params?: Record<string, string>;
|
|
213
192
|
/** 必填关联参数名(biz 联动组件内部写:子对象缺关联键时 core 跳过请求,编成 from[].require;须是 params 的键) */
|
|
214
193
|
requireParams?: string[];
|
|
194
|
+
/** 必填请求参数(J14,人写页公开写法):名字须是 params 的键;任一为空时 core 不发读请求、对象保持 idle;与 requireParams 同编成 from[].require */
|
|
195
|
+
require?: Array<string | string[]>;
|
|
215
196
|
list?: Partial<KitListShape> & { rowsPath?: string; totalPath?: string };
|
|
216
197
|
linkKey?: string;
|
|
217
198
|
actions?: KitAction[];
|
|
218
|
-
/** 对象级轮询:原样编成 core 的 data.<对象>.poll(core 运行时执行) */
|
|
219
|
-
poll?: KitPollDecl;
|
|
220
199
|
/** 地址栏同步(D8):true = 页码 / 每页条数 / 排序 / 筛选字段同步到查询串(复用 core 的 state.query) */
|
|
221
200
|
syncUrl?: boolean;
|
|
222
201
|
/** 数据变更订阅(D5):refresh 恒为本对象,编成顶层 subscribe */
|
|
@@ -225,8 +204,6 @@ export interface KitBehavior {
|
|
|
225
204
|
validateOn?: Array<'change' | 'blur' | 'submit'>;
|
|
226
205
|
/** 离开守卫(D5):草稿有改动时拦截刷新 / 关闭 / 站内链接;true 等价 confirm */
|
|
227
206
|
leaveGuard?: boolean | 'confirm' | 'none';
|
|
228
|
-
/** 接口适配(D4):{ 目标字段: 源路径 [| 管道] },原样编成 core 的 transform */
|
|
229
|
-
adapter?: Record<string, string>;
|
|
230
207
|
/** 编辑详情:打开编辑表单时先按选中行取详情,成功后详情盖行作初值(见 object-renderer/form-detail.ts,KIT-DET-001) */
|
|
231
208
|
detail?: { from: { api: string; params?: Record<string, string | number | boolean> }; unwrap?: string };
|
|
232
209
|
}
|
|
@@ -238,20 +215,10 @@ export interface KitFieldRef {
|
|
|
238
215
|
label?: string;
|
|
239
216
|
/** 逐视图覆写占位文案(K-3);等价于 props.placeholder,props 里显式写的优先 */
|
|
240
217
|
placeholder?: string;
|
|
241
|
-
/**
|
|
218
|
+
/** 字段说明文字:编辑态格(form / filter)渲染在控件下;只读视图(列表列头 / 摘要标签旁)显示成「i」说明气泡(J9) */
|
|
242
219
|
help?: string;
|
|
243
|
-
/** 条件显示(form / filter):草稿满足谓词才显示;不显示的字段不进 model、不过校验 */
|
|
244
|
-
showWhen?: KitPredicate;
|
|
245
|
-
/** 条件必填(form):编成字段 rules[].when 的必填规则,标签随条件加星号 */
|
|
246
|
-
requiredWhen?: KitPredicate;
|
|
247
|
-
/** 条件禁用(form / filter):草稿满足谓词时控件置灰(值保留、仍进 model) */
|
|
248
|
-
disabledWhen?: KitPredicate;
|
|
249
220
|
/** 字段 action 绑定的组件事件名(闭集 = 该组件契约 emits);缺省 Button / Link 绑 click、其余绑 change */
|
|
250
221
|
on?: string;
|
|
251
|
-
/** 选记录类组件(抛 pick,如 RecordPicker)的回填:{ 源记录键: 目标表单字段 },单选取 item、多选取 items */
|
|
252
|
-
fill?: Record<string, string>;
|
|
253
|
-
/** 场景显隐:只在列出的场景出现(add = 新建表单,edit = 编辑表单,view = 只读视图) */
|
|
254
|
-
when?: KitScene | KitScene[];
|
|
255
222
|
component?: KitBaseName;
|
|
256
223
|
props?: Record<string, unknown>;
|
|
257
224
|
action?: string;
|
|
@@ -276,8 +243,29 @@ export interface KitFieldRef {
|
|
|
276
243
|
class?: string;
|
|
277
244
|
labelClass?: string;
|
|
278
245
|
valueClass?: string;
|
|
246
|
+
/** 字段级语义强调:strong / muted */
|
|
247
|
+
emphasis?: KitFieldEmphasis;
|
|
248
|
+
/** 指标项/字段格高亮 */
|
|
249
|
+
highlight?: boolean;
|
|
279
250
|
/** 内部:normalizeRef 把 `{ divider }` 字段项规范成它(用户不直接写) */
|
|
280
251
|
divider?: KitDividerDecl;
|
|
252
|
+
/** 展示对象路径 `view.<成员>`(表单字段项):字段隐藏(值保留);只许纯路径,见 view-binding.ts */
|
|
253
|
+
hidden?: string;
|
|
254
|
+
/** 展示对象路径 `view.<成员>`(表单字段项):字段置灰 */
|
|
255
|
+
disabled?: string;
|
|
256
|
+
/** 展示对象路径 `view.<成员>`(表单字段项):字段必填 */
|
|
257
|
+
required?: string;
|
|
258
|
+
/** 展示对象路径 `view.<成员>`(表单字段项):候选项来源,成员是 [{ value, label }] 数组(展示对象按另一字段取数后写入);替换该字段的静态 / 远程候选 */
|
|
259
|
+
options?: string;
|
|
260
|
+
/** 展示对象路径 `view.<成员>`(表单里的画布字段 FlowEditor):节点字段候选项,成员是 { "<节点类型>.<字段键>": [{ value, label, meta? }] } 对象(整体替换引用写入);并进画布对应 select 字段的 options */
|
|
261
|
+
nodeOptions?: string;
|
|
262
|
+
/** 子表字段(RowEditor)的列候选项:view.<对象成员> { "<列键>": [{ value, label }] } */
|
|
263
|
+
columnOptions?: string;
|
|
264
|
+
/**
|
|
265
|
+
* 展示对象路径 `view.<成员>`(表单里的画布字段 FlowEditor):AI 建议,成员是 [{ id, label, reason?, nodes, edges }] 数组(展示对象持有状态,整体替换引用写入);
|
|
266
|
+
* 画布把它们画成虚影并给「采纳 / 忽略」。采纳把建议并进草稿值,采纳 / 忽略都经 `view.form.onDraft` 的载荷(`suggestion: { id, action }`)回到展示对象,由它清掉对应建议
|
|
267
|
+
*/
|
|
268
|
+
suggestions?: string;
|
|
281
269
|
}
|
|
282
270
|
|
|
283
271
|
/** 分隔线字段项的内容(对象渲染里的 `{ divider: ... }`,编成基础件 KitDivider) */
|
|
@@ -364,9 +352,9 @@ export interface KitBatchActionDecl {
|
|
|
364
352
|
submit?: string;
|
|
365
353
|
builtin?: string;
|
|
366
354
|
confirm?: string;
|
|
367
|
-
tone?:
|
|
355
|
+
tone?: KitActionTone;
|
|
368
356
|
permission?: string;
|
|
369
|
-
/** 经 `@动作id` 引用 behavior.actions 里的 request / download
|
|
357
|
+
/** 经 `@动作id` 引用 behavior.actions 里的 request / download 动作时带过来 */
|
|
370
358
|
request?: KitRequestDecl;
|
|
371
359
|
download?: KitDownloadDecl;
|
|
372
360
|
}
|
|
@@ -381,7 +369,9 @@ export interface KitColumnGroupDecl {
|
|
|
381
369
|
export type KitCollection =
|
|
382
370
|
| ({
|
|
383
371
|
type: 'table'; tree?: KitTreeDecl; select?: KitSelectDecl; rowActions?: string[]; page?: KitPageDecl; stickyHeader?: boolean; expand?: KitExpandDecl;
|
|
384
|
-
|
|
372
|
+
striped?: boolean; bordered?: boolean;
|
|
373
|
+
/** 标题旁的「共 N 条」(有标题行的非分页集合缺省显示;写 false 关闭;分页集合由分页器显示总数,写 true 也不重复) */
|
|
374
|
+
count?: boolean;
|
|
385
375
|
/** 工具栏:reload / density / columns / export(顺序即显示顺序) */
|
|
386
376
|
toolbar?: Array<'reload' | 'density' | 'columns' | 'export'>;
|
|
387
377
|
/** 批量操作:`@动作id` 引用 behavior.actions,或内联 { id, name, submit | builtin, confirm?, tone?, permission? };confirm 里 `{n}` 换成已选个数 */
|
|
@@ -399,9 +389,15 @@ export type KitCollection =
|
|
|
399
389
|
/** 列宽拖拽(Q 波 G4):true = 所有非固定列可拖(10 个预置档);字段级 resizable 可单列开关;写了视同进入滚动模式 */
|
|
400
390
|
resizable?: boolean;
|
|
401
391
|
} & KitCollectionStateDecl)
|
|
402
|
-
| ({ type: 'treeTable'; tree?: KitTreeDecl; select?: 'none' | 'single' | 'multi'; rowActions?: string[]; page?: KitPageDecl; stickyHeader?: boolean;
|
|
403
|
-
| ({ type: 'cards'; cols: 1 | 2 | 3 | 4 | 6; class?: string; rowActions?: string[]; page?: KitPageDecl; contextMenu?: string[]; bordered?: boolean } & KitCollectionStateDecl)
|
|
404
|
-
| ({ type: 'stack'; class?: string; rowActions?: string[]; page?: KitPageDecl; contextMenu?: string[]; bordered?: boolean } & KitCollectionStateDecl)
|
|
392
|
+
| ({ type: 'treeTable'; tree?: KitTreeDecl; select?: 'none' | 'single' | 'multi'; rowActions?: string[]; page?: KitPageDecl; stickyHeader?: boolean; striped?: boolean; bordered?: boolean; contextMenu?: string[] } & KitCollectionStateDecl)
|
|
393
|
+
| ({ type: 'cards'; cols: 1 | 2 | 3 | 4 | 6; class?: string; rowActions?: string[]; page?: KitPageDecl; contextMenu?: string[]; bordered?: boolean; count?: boolean } & KitCollectionStateDecl)
|
|
394
|
+
| ({ type: 'stack'; class?: string; rowActions?: string[]; page?: KitPageDecl; contextMenu?: string[]; bordered?: boolean; count?: boolean } & KitCollectionStateDecl)
|
|
395
|
+
/**
|
|
396
|
+
* 紧凑列表(主栏 / 侧栏用):每条两行——主标题(fields 第一项)+ 次要信息(其余字段以「·」分隔的辅助文字,枚举 / 状态字段以圆点 + 文字呈现),
|
|
397
|
+
* 右侧行操作为文字链接;选中态与表格行选中同一条事件通道与区域切片;行高由密度令牌决定(py-N)。
|
|
398
|
+
* 外观写死(bordered 无意义、被忽略;class 只作列表容器的覆写);分页、右键菜单、三态、count 与 stack 同。
|
|
399
|
+
*/
|
|
400
|
+
| ({ type: 'compact-list'; class?: string; bordered?: boolean; rowActions?: string[]; page?: KitPageDecl; contextMenu?: string[]; count?: boolean } & KitCollectionStateDecl);
|
|
405
401
|
|
|
406
402
|
export interface KitViewForm {
|
|
407
403
|
/**
|
|
@@ -411,14 +407,23 @@ export interface KitViewForm {
|
|
|
411
407
|
title?: string | { create?: string; edit?: string };
|
|
412
408
|
/** form 视图:提交按钮文案(K-7) */
|
|
413
409
|
submitLabel?: string;
|
|
410
|
+
/**
|
|
411
|
+
* form 视图:保存成功的提示文案(字面量;含义同请求动作 `request.notify`),替换默认的「已保存」类提示。
|
|
412
|
+
* 只对 SingleObjectForm / CheckoutPage / SettingsCenter 的表单生效;不许 view. / row. 路径、{…} 占位、管道符;空串 / 缺省 = 默认文案。
|
|
413
|
+
*/
|
|
414
|
+
notify?: string;
|
|
415
|
+
/** form 视图:表单草稿变化时调用的展示对象方法名(只写方法名,编成 UI_REFRESH | page.<方法>) */
|
|
416
|
+
onDraft?: string;
|
|
417
|
+
/** form 视图:提交闸门,展示对象路径 `view.<成员>`;为真时禁用提交按钮(字段仍可编辑),如分步表单某步先验证通过才可「下一步」 */
|
|
418
|
+
submitDisabled?: string;
|
|
414
419
|
arrange?: KitArrangeInput;
|
|
415
420
|
collection?: KitCollection;
|
|
416
421
|
fields?: KitFieldItem[];
|
|
417
422
|
class?: string;
|
|
418
423
|
cellClass?: string;
|
|
419
424
|
rowClass?: string;
|
|
420
|
-
/**
|
|
421
|
-
|
|
425
|
+
/** 行样式档位:`row.<字段>`,字段取值是 viewObject.rowState.toneTiers 的档位名(业务对象逐行给出);只许纯路径,对所有集合(table / treeTable / 虚拟滚动表 / cards / stack)生效 */
|
|
426
|
+
rowTone?: string;
|
|
422
427
|
replaceClass?: boolean;
|
|
423
428
|
staticComponent?: string;
|
|
424
429
|
accept?: 'single' | 'list';
|
|
@@ -462,30 +467,30 @@ export interface KitViewForm {
|
|
|
462
467
|
inline?: boolean;
|
|
463
468
|
/** form:校验失败后滚到首个出错字段并聚焦 */
|
|
464
469
|
scrollToError?: boolean;
|
|
465
|
-
/** form
|
|
466
|
-
afterSave?: KitThenItem[];
|
|
467
|
-
/** form:字段策略表——按状态 / 角色字段的取值声明各字段的 hide / readonly / required,编成 showWhen / disabledWhen / requiredWhen */
|
|
468
|
-
policy?: KitFieldPolicyDecl;
|
|
469
|
-
/** form:采纳建议(某 request 动作的 into 返回建议值,用户点「采纳」才写进草稿,不自动提交) */
|
|
470
|
-
adopt?: { from: string; path?: string; map?: Record<string, string>; label?: string; ask?: string; askLabel?: string };
|
|
471
|
-
/** form:底栏动作——behavior.actions 里 request / download 动作的 id,在提交旁多画按钮(可带 $draft 把未保存草稿发出去) */
|
|
470
|
+
/** form:底栏动作——behavior.actions 里 request / download 动作的 id,在提交旁多画按钮 */
|
|
472
471
|
footerActions?: string[];
|
|
473
|
-
/** H1e:字段值变化时自动发 request 动作(防抖):{ 字段名: 动作 id },动作须是 request.read 的请求 */
|
|
474
|
-
onChange?: Record<string, string>;
|
|
475
472
|
/** 请求结果常驻槽(GA3):request 动作 into 的名字,或 { outcome, title? };form 视图画在字段与按钮之间,其它视图编成只展示结果的 AsyncResultPanel */
|
|
476
473
|
result?: string | { outcome: string; title?: string };
|
|
477
474
|
/** filter:折叠时保留的行数(collapsible: true 时生效,1~4) */
|
|
478
475
|
collapsedRows?: number;
|
|
476
|
+
/** filter:首屏常驻筛选字段数量上限(缺省 4;超过时自动启用折叠) */
|
|
477
|
+
defaultCollapsedCount?: number;
|
|
479
478
|
/** filter:触发方式 submit(缺省)/ change */
|
|
480
479
|
trigger?: 'submit' | 'change';
|
|
480
|
+
/** 面板/区块语义强调档位 */
|
|
481
|
+
emphasis?: KitContainerEmphasis;
|
|
482
|
+
/** 面板/视图容器表面配方 */
|
|
483
|
+
surface?: KitSurfaceRecipe;
|
|
484
|
+
/** 面板/指标块主色高亮强调 */
|
|
485
|
+
highlight?: boolean;
|
|
481
486
|
/**
|
|
482
487
|
* 写死形状数据组件的事件接线:{ 组件事件名: 动作 }。动作 = 具名动作名 / `data.orderMove` /
|
|
483
|
-
* 内置角色 `reload` `saved` `cancel` `close`(交协调组件),或 `{ action
|
|
488
|
+
* 内置角色 `reload` `saved` `cancel` `close`(交协调组件),或 `{ action }`。事件名必须在组件契约 emits 里。
|
|
484
489
|
*/
|
|
485
490
|
on?: Record<string, KitViewOnValue>;
|
|
486
491
|
}
|
|
487
|
-
/** view.on
|
|
488
|
-
export type KitViewOnValue = string | { action: string
|
|
492
|
+
/** view.on 的值:动作字符串,或 `{ action }` 对象形态(只绑一条动作管道,之后要做的事写在具名动作里) */
|
|
493
|
+
export type KitViewOnValue = string | { action: string };
|
|
489
494
|
/** view.summary.groups 的一节 */
|
|
490
495
|
export interface KitViewGroup {
|
|
491
496
|
title: string;
|
|
@@ -496,6 +501,10 @@ export interface KitViewGroup {
|
|
|
496
501
|
defaultOpen?: boolean;
|
|
497
502
|
/** 本节上方画一条分隔线;字符串即分隔线文字 */
|
|
498
503
|
divider?: string | boolean;
|
|
504
|
+
/** 本节语义强调档位 */
|
|
505
|
+
emphasis?: KitContainerEmphasis;
|
|
506
|
+
/** 本节容器表面配方 */
|
|
507
|
+
surface?: KitSurfaceRecipe;
|
|
499
508
|
}
|
|
500
509
|
/** view.<槽>.chart:{ type, x, y[], stack?, min?, max?, warnAt?, dangerAt? } */
|
|
501
510
|
export interface KitChartDecl {
|
|
@@ -519,6 +528,14 @@ export interface KitObject {
|
|
|
519
528
|
schema: KitSchema;
|
|
520
529
|
behavior: KitBehavior;
|
|
521
530
|
view?: KitView;
|
|
531
|
+
/** 对象主键字段名(缺省 'id') */
|
|
532
|
+
primaryKey?: string;
|
|
533
|
+
/** 对象级容器语义强调 */
|
|
534
|
+
emphasis?: KitContainerEmphasis;
|
|
535
|
+
/** 对象级容器表面配方 */
|
|
536
|
+
surface?: KitSurfaceRecipe;
|
|
537
|
+
/** 对象级高亮强调 */
|
|
538
|
+
highlight?: boolean;
|
|
522
539
|
}
|
|
523
540
|
|
|
524
541
|
// ---------------------------------------------------------------- 渲染上下文
|
|
@@ -530,6 +547,8 @@ export interface KitStaticContract {
|
|
|
530
547
|
emits?: readonly string[];
|
|
531
548
|
/** 组件契约 props 的键名;用于判断可写静态组件是否走内置 data.submit 通道 */
|
|
532
549
|
props?: readonly string[];
|
|
550
|
+
/** 契约 props 各键的 `type` 字段(无 type 为空串);给了才按类型做缺省绑定(如 error 为 string 时绑读状态错误文案) */
|
|
551
|
+
propTypes?: Readonly<Record<string, string>>;
|
|
533
552
|
}
|
|
534
553
|
|
|
535
554
|
export interface KitRenderContext {
|
|
@@ -552,6 +571,10 @@ export interface KitRenderContext {
|
|
|
552
571
|
* 缺省 = 本对象没有协调组件,`collection.expand.list` 报 KIT-TBL-003 并忽略
|
|
553
572
|
*/
|
|
554
573
|
expandHosts?: ReadonlySet<string>;
|
|
574
|
+
/** 应用级枚举字典(供 renderObject 直接调用时展开 $dict.*) */
|
|
575
|
+
dicts?: Readonly<Record<string, ReadonlyArray<{ value: string | number | boolean; label: string; tone?: string }>>>;
|
|
576
|
+
/** 应用级实体定义(供 renderObject 直接调用时展开 $entity.*) */
|
|
577
|
+
entities?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
555
578
|
}
|
|
556
579
|
|
|
557
580
|
// ---------------------------------------------------------------- 诊断
|
|
@@ -571,6 +594,27 @@ export interface KitDiagnostic {
|
|
|
571
594
|
hint?: string;
|
|
572
595
|
}
|
|
573
596
|
|
|
597
|
+
/**
|
|
598
|
+
* 布局体检建议(RV-1117 T05):与 diagnostics 并行的新通道,`ok` / diagnostics 契约不变。
|
|
599
|
+
* 严重级沿用 diagnostic-registry.severities:error / warn / advice(该档案下不适用的规则不产出)。
|
|
600
|
+
*/
|
|
601
|
+
export type KitAdvisorySeverity = 'error' | 'warn' | 'advice';
|
|
602
|
+
export interface KitAdvisory {
|
|
603
|
+
/** 布局气味码:`KIT-LAYOUT-` 加三位序号(001 起,登记在 kit-grammar.json#diagnostics) */
|
|
604
|
+
code: string;
|
|
605
|
+
severity: KitAdvisorySeverity;
|
|
606
|
+
/** 位置,如 `main.entity.view.list.fields[2]` */
|
|
607
|
+
path: string;
|
|
608
|
+
/** 问题(三段式的「问题」) */
|
|
609
|
+
message: string;
|
|
610
|
+
/** 建议(三段式的「建议」) */
|
|
611
|
+
hint: string;
|
|
612
|
+
/** 来源文件(应用装配编译页面时补,相对应用根) */
|
|
613
|
+
file?: string;
|
|
614
|
+
line?: number;
|
|
615
|
+
column?: number;
|
|
616
|
+
}
|
|
617
|
+
|
|
574
618
|
// ---------------------------------------------------------------- IR
|
|
575
619
|
|
|
576
620
|
/** 12 份制在三个关键档上的份数:base 窄档恒 12;wide = md 档;full = 最宽档。 */
|
|
@@ -591,6 +635,8 @@ export interface KitCell {
|
|
|
591
635
|
label: string;
|
|
592
636
|
/** 传给组件的 props(含 options / format / ref.props)。options 保持 kit 形状(value/label/tone)。 */
|
|
593
637
|
props: Record<string, unknown>;
|
|
638
|
+
/** 列表字段项 props 里绑 row.<字段> 的项({ prop 名: 行字段名 },已核字段在 schema 里);发射层按行变量换成 core 行路径,不进 props */
|
|
639
|
+
rowProps?: Record<string, string>;
|
|
594
640
|
action?: string;
|
|
595
641
|
parts: KitCellParts;
|
|
596
642
|
/** 格容器类:栅格跨度类 + 基准类 + 覆写,已 mergeClass。 */
|
|
@@ -601,6 +647,8 @@ export interface KitCell {
|
|
|
601
647
|
errorClass: string;
|
|
602
648
|
/** 说明文字(编辑态格,来自 fields[].help;缺省不出现) */
|
|
603
649
|
help?: string;
|
|
650
|
+
/** 说明气泡文字(只读格:列表列头 / 摘要标签旁的「i」图标钮,来自 fields[].help,J9;编辑态走上面的 help 行,两者互斥) */
|
|
651
|
+
helpTip?: string;
|
|
604
652
|
placeholder?: boolean;
|
|
605
653
|
/** 分隔线格(字段项 `{ divider }`):不对应 schema 字段、不参与提交 / 筛选镜像 */
|
|
606
654
|
divider?: boolean;
|
|
@@ -611,26 +659,22 @@ export interface KitCell {
|
|
|
611
659
|
group?: KitCellGroup;
|
|
612
660
|
/** summary 的 hideEmpty:值为空时整个格不渲染(发射层给格加 show[id].when = 字段值路径) */
|
|
613
661
|
hideEmpty?: boolean;
|
|
614
|
-
/** 条件(M 波 G3 D1,form / filter 的 KitObjectForm 对草稿求值;谓词已规整成 core 形状 all_of / any_of) */
|
|
615
|
-
showWhen?: Record<string, unknown>;
|
|
616
|
-
disabledWhen?: Record<string, unknown>;
|
|
617
|
-
requiredWhen?: Record<string, unknown>;
|
|
618
662
|
/** 静态必填星号位置(编辑 / 新建态的必填字段;星号单独成红色子元素,不并入 label 文本) */
|
|
619
663
|
required?: 'start' | 'end';
|
|
620
664
|
/** 字段 action 绑定的事件名(fields[].on,已按契约 emits 校验) */
|
|
621
665
|
event?: string;
|
|
622
|
-
/** pick 回填映射(fields[].fill) */
|
|
623
|
-
fill?: Record<string, string>;
|
|
624
|
-
/** 场景显隐(form 按 mode 求值;静态视图编译期已过滤,不进这里) */
|
|
625
|
-
scenes?: Array<'add' | 'edit'>;
|
|
626
666
|
/** 远程选项(D3,form / filter) */
|
|
627
667
|
optionsFrom?: KitOptionsFromIR;
|
|
628
668
|
/** 表格列:文字单行省略(单元格带 data-kit-ellipsis,KitTableTools 补 title) */
|
|
629
669
|
ellipsis?: boolean;
|
|
630
670
|
/** 表格列:可就地编辑(单元格带 data-kit-editable,由 KitTableTools 接管) */
|
|
631
671
|
editable?: boolean;
|
|
632
|
-
/**
|
|
633
|
-
|
|
672
|
+
/** 字段级语义强调(strong / muted) */
|
|
673
|
+
emphasis?: KitFieldEmphasis;
|
|
674
|
+
/** 字段/指标格主色高亮(data-kit-highlight="true") */
|
|
675
|
+
highlight?: boolean;
|
|
676
|
+
/** filter 超过常驻上限(4 项)自动归入折叠区的溢出字段标记 */
|
|
677
|
+
overflow?: boolean;
|
|
634
678
|
}
|
|
635
679
|
|
|
636
680
|
/** 远程选项的 IR(缺省已补全) */
|
|
@@ -640,10 +684,7 @@ export interface KitOptionsFromIR {
|
|
|
640
684
|
valueKey: string;
|
|
641
685
|
labelKey: string;
|
|
642
686
|
rowsPath: string;
|
|
643
|
-
fill: Record<string, string>;
|
|
644
687
|
searchParam: string;
|
|
645
|
-
/** params 里 { field } 引用的同对象字段(依赖字段变化时清值并重取) */
|
|
646
|
-
deps: string[];
|
|
647
688
|
/** 级联:树形选项(整棵树嵌套,或按层懒加载);缺省 = 平铺选项 */
|
|
648
689
|
tree?: { childrenKey: string; leafKey: string; lazy: string; levels: number };
|
|
649
690
|
}
|
|
@@ -685,6 +726,8 @@ export interface KitHeadCell {
|
|
|
685
726
|
group?: number;
|
|
686
727
|
/** 叶子表头格右缘带列宽拖拽手柄(需要 col;手柄由 KitTableTools 补) */
|
|
687
728
|
resizable?: boolean;
|
|
729
|
+
/** 字段说明(fields[].help):标签旁「i」图标钮,悬停 / 聚焦显示(J9);缺省不出现 */
|
|
730
|
+
help?: string;
|
|
688
731
|
}
|
|
689
732
|
|
|
690
733
|
/** 多级表头的一个列组(Q 波 G4,单层):组块 = flex 列(上组标题格 + 下叶子表头行) */
|
|
@@ -723,7 +766,7 @@ export interface KitTableColumnMeta {
|
|
|
723
766
|
export interface KitBatchActionIR {
|
|
724
767
|
id: string;
|
|
725
768
|
name: string;
|
|
726
|
-
tone:
|
|
769
|
+
tone: KitActionTone;
|
|
727
770
|
confirm: string;
|
|
728
771
|
permission?: string;
|
|
729
772
|
action: KitAction;
|
|
@@ -745,6 +788,8 @@ export interface KitStateIR {
|
|
|
745
788
|
error: string;
|
|
746
789
|
/** loading: skeleton -> 加载态画骨架屏(形态随集合:table 行 / cards 卡 / stack 条) */
|
|
747
790
|
skeleton: boolean;
|
|
791
|
+
/** state: false 关闭内置三态后的兜底:只在读取失败时显示失败面板(含重试),加载 / 空态一律不画;错误永不静默 */
|
|
792
|
+
errorOnly?: boolean;
|
|
748
793
|
}
|
|
749
794
|
|
|
750
795
|
/** 树表的层级 IR(collection: treeTable;全部补完缺省) */
|
|
@@ -773,7 +818,7 @@ export interface KitExpandIR {
|
|
|
773
818
|
}
|
|
774
819
|
|
|
775
820
|
export type KitLayoutIR =
|
|
776
|
-
| { kind: 'grid'; wrapClass: string; gridClass: string; cells: KitCell[] }
|
|
821
|
+
| { kind: 'grid'; wrapClass: string; gridClass: string; cells: KitCell[]; /** filter 视图(cols 排布):动作区在同一栅格里的跨度类,见 parts.ts#filterActionSpanClasses */ actionsClass?: string; /** filter 视图(cols 排布):定宽流式版式(字段定宽 + 查询 / 重置紧跟其后),不折叠的筛选栏用它替换栅格跨度,见 parts.ts#filterFlowOf */ filterFlow?: import('./parts').KitFilterFlow; /** filter 视图(cols 排布):按字段数装行的版式(列等分行宽,动作区当一格),不折叠的筛选栏发射时优先用它,见 parts.ts#filterPackOf */ filterPack?: import('./parts').KitFilterPack }
|
|
777
822
|
| { kind: 'rows'; wrapClass: string; rowClass: string; rows: KitCell[][] }
|
|
778
823
|
| { kind: 'flex'; wrapClass: string; cells: KitCell[] }
|
|
779
824
|
/** summary.groups:每节 = 小标题 + 一个单对象排布(grid / rows / flex) */
|
|
@@ -797,6 +842,8 @@ export type KitLayoutIR =
|
|
|
797
842
|
open: boolean;
|
|
798
843
|
/** 本节上方的分隔线(false = 无;字符串 = 分隔线文字,'' = 纯线) */
|
|
799
844
|
divider: string | false;
|
|
845
|
+
emphasis?: KitContainerEmphasis;
|
|
846
|
+
surface?: KitSurfaceRecipe;
|
|
800
847
|
}>;
|
|
801
848
|
}
|
|
802
849
|
| {
|
|
@@ -806,6 +853,8 @@ export type KitLayoutIR =
|
|
|
806
853
|
headClass: string;
|
|
807
854
|
head: KitHeadCell[];
|
|
808
855
|
rowClass: string;
|
|
856
|
+
/** 行样式档位取自的行字段名(view.list.rowTone: row.<字段>);table(含树表 / 虚拟滚动表)与 cards / stack 都有 */
|
|
857
|
+
rowTone?: string;
|
|
809
858
|
cells: KitCell[];
|
|
810
859
|
rowActions: KitAction[];
|
|
811
860
|
select: 'none' | 'single' | 'multi';
|
|
@@ -813,6 +862,8 @@ export type KitLayoutIR =
|
|
|
813
862
|
selectClass: string;
|
|
814
863
|
actionsClass: string;
|
|
815
864
|
pager: KitPagerIR | null;
|
|
865
|
+
/** collection.count: false 才有(关闭标题旁的「共 N 条」);缺省不写 */
|
|
866
|
+
showCount?: boolean;
|
|
816
867
|
/** 有可排序列:表头发射成 KitTableHead */
|
|
817
868
|
sort: boolean;
|
|
818
869
|
stickyHeader: boolean;
|
|
@@ -820,8 +871,6 @@ export type KitLayoutIR =
|
|
|
820
871
|
stripeClass: string;
|
|
821
872
|
/** 完整网格线模式(collection.bordered: true) */
|
|
822
873
|
bordered?: boolean;
|
|
823
|
-
/** 单元格内边距档位 */
|
|
824
|
-
density: 'compact' | 'standard' | 'comfortable';
|
|
825
874
|
expand: KitExpandIR | null;
|
|
826
875
|
state: KitStateIR | null;
|
|
827
876
|
/** 树表:非 null 时列表体由 KitTreeTable 渲染(表头仍按 sort 走 KitTableHead / 静态头) */
|
|
@@ -840,8 +889,6 @@ export type KitLayoutIR =
|
|
|
840
889
|
summaryCellClasses?: string[];
|
|
841
890
|
/** 滚动模式的合计行类;缺省 '' */
|
|
842
891
|
summaryRowClass?: string;
|
|
843
|
-
/** 条件行类(D9):行满足 core 谓词时在行容器上加这串类 */
|
|
844
|
-
rowClassWhen?: Array<{ when: Record<string, unknown>; class: string }>;
|
|
845
892
|
/** 表头里的选择列 / 操作列类(滚动模式有 fixed 时与行里的不同:底色随表头);缺省同 selectClass / actionsClass */
|
|
846
893
|
selectHeadClass?: string;
|
|
847
894
|
actionsHeadClass?: string;
|
|
@@ -861,11 +908,20 @@ export type KitLayoutIR =
|
|
|
861
908
|
itemClass: string;
|
|
862
909
|
inner: KitLayoutIR;
|
|
863
910
|
rowActions: KitAction[];
|
|
911
|
+
/** 行样式档位取自的行字段名(view.list.rowTone: row.<字段>);走 itemToneTiers(描边 / 透明度,不改底色) */
|
|
912
|
+
rowTone?: string;
|
|
864
913
|
/** 声明了 page 才有分页器(M1-2);缺省不分页 */
|
|
865
914
|
pager: KitPagerIR | null;
|
|
915
|
+
/** collection.count: false 才有(关闭标题旁的「共 N 条」);缺省不写 */
|
|
916
|
+
showCount?: boolean;
|
|
866
917
|
state: KitStateIR | null;
|
|
867
918
|
/** 右键菜单动作(Q 波 G6,已解析;空 / 缺省 = 无) */
|
|
868
919
|
contextMenu?: KitAction[];
|
|
920
|
+
/**
|
|
921
|
+
* 紧凑列表(collection.type: compact-list):仍是 stack 形态(事件 / 分页 / 三态 / 右键菜单全走 stack 的路径),
|
|
922
|
+
* 条目换成「主标题 + 次要信息」两行:title = 主标题字段,meta = 次要字段(枚举 / 状态字段以圆点 + 文字呈现),见 collection.ts compactListOf
|
|
923
|
+
*/
|
|
924
|
+
compact?: { title: KitCell; meta: KitCell[] };
|
|
869
925
|
}
|
|
870
926
|
| {
|
|
871
927
|
kind: 'static'; component: string; accept: 'single' | 'list'; map: Record<string, string>; class: string; chart?: KitChartDecl;
|
|
@@ -875,6 +931,17 @@ export type KitLayoutIR =
|
|
|
875
931
|
/** 组件契约同时含 emits.submit 与 props.object 且对象声明了 write:走内置 data.submit 通道 */
|
|
876
932
|
dataSubmit?: boolean;
|
|
877
933
|
hasScopeProp?: boolean;
|
|
934
|
+
/** 组件契约声明了 loading 属性,且对象有数据来源:缺省把 loading 绑到数据对象的读状态 */
|
|
935
|
+
hasLoadingProp?: boolean;
|
|
936
|
+
/** 组件契约声明了 error_text 属性,且对象有数据来源:缺省把 error_text 绑到数据对象的 errorMessage */
|
|
937
|
+
hasErrorTextProp?: boolean;
|
|
938
|
+
/** 组件契约没有 error_text、但有 string 型的 error 属性,且对象有数据来源:缺省把 error 绑到数据对象的 errorMessage */
|
|
939
|
+
hasErrorProp?: boolean;
|
|
940
|
+
/**
|
|
941
|
+
* 读失败自动重试:已绑读取错误(hasErrorTextProp / hasErrorProp),且组件契约同时声明 emits.retry 与 props.retry_text。
|
|
942
|
+
* 发射时缺省补 retry_text 文案,并在页面没接 retry 事件时把它接到 `SCOPE | window-reload | <作用域>` 重取本对象。
|
|
943
|
+
*/
|
|
944
|
+
autoRetry?: boolean;
|
|
878
945
|
/** 右键菜单动作(B1 B 组,仅 ItemList / Tree / Kanban,已解析;空 / 缺省 = 无) */
|
|
879
946
|
contextMenu?: KitAction[];
|
|
880
947
|
};
|
|
@@ -891,6 +958,12 @@ export interface KitViewIR {
|
|
|
891
958
|
mode: KitMode | 'mixed';
|
|
892
959
|
/** 表单布局参数(form / filter,M 波 G3 D6 / D7):已校验、补全缺省 */
|
|
893
960
|
formOpts?: KitFormOpts;
|
|
961
|
+
/** 区块/视图级语义强调档位 */
|
|
962
|
+
emphasis?: KitContainerEmphasis;
|
|
963
|
+
/** 面板/视图级容器表面配方 */
|
|
964
|
+
surface?: KitSurfaceRecipe;
|
|
965
|
+
/** 视图/指标卡高亮强调 */
|
|
966
|
+
highlight?: boolean;
|
|
894
967
|
}
|
|
895
968
|
|
|
896
969
|
/** KitObjectForm 的布局 / 行为参数(IR 形态) */
|
|
@@ -904,18 +977,22 @@ export interface KitFormOpts {
|
|
|
904
977
|
/** filter:可折叠 + 折叠行数 + 触发方式 */
|
|
905
978
|
collapsible?: boolean;
|
|
906
979
|
collapsedRows?: number;
|
|
980
|
+
defaultCollapsedCount?: number;
|
|
981
|
+
/** filter 字段数 > 4(或 > defaultCollapsedCount)时自动开启的更多筛选溢出标记 */
|
|
982
|
+
filterOverflow?: boolean;
|
|
907
983
|
trigger?: 'submit' | 'change';
|
|
908
984
|
/** groupsAs: tabs(form 的 groups 平铺成页签) */
|
|
909
985
|
groupTabs?: boolean;
|
|
910
|
-
afterSave?: KitThenItem[];
|
|
911
|
-
/** 采纳建议(已校验) */
|
|
912
|
-
adopt?: { from: string; path?: string; map?: Record<string, string>; label?: string; ask?: string; askLabel?: string };
|
|
913
986
|
/** 底栏动作 id(已校验为字符串数组;是否 request / download 动作在 emit 阶段核对) */
|
|
914
987
|
footerActions?: string[];
|
|
915
|
-
/** 字段变化触发的 request 动作(已校验为 { 字段: 动作 id };是否 read 的 request 在 emit 阶段核对) */
|
|
916
|
-
onChange?: Record<string, string>;
|
|
917
988
|
/** 请求结果常驻槽(已校验):outcome 是 request 动作 into 的名字 */
|
|
918
989
|
result?: { outcome: string; title?: string };
|
|
990
|
+
/** 草稿变化时调用的展示对象方法名(已校验为标识符;是否存在由 compile/view-check 核) */
|
|
991
|
+
onDraft?: string;
|
|
992
|
+
/** 提交闸门(view.form.submitDisabled -> core 路径 page.<成员>) */
|
|
993
|
+
submitDisabled?: string;
|
|
994
|
+
/** 字段项状态绑定(hidden / disabled / required -> core 路径 page.<成员>):编成表单的 fieldState prop */
|
|
995
|
+
fieldState?: Record<string, Partial<Record<'hidden' | 'disabled' | 'required' | 'options', string>>>;
|
|
919
996
|
}
|
|
920
997
|
|
|
921
998
|
export interface KitObjectIR {
|