@shwfed/config 2.3.27 → 2.3.29
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/mcp.mjs +3963 -1597
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-CRqRJ0oF.js → config-6IiXCmyu.js} +1 -1
- package/dist/preview/assets/{config-C45AT0tt.js → config-BJzUh1_G.js} +1 -1
- package/dist/preview/assets/{config-CIcy6Jwg.js → config-Bl80ye-i.js} +1 -1
- package/dist/preview/assets/{config-D0YS2Bpj.js → config-CZOeZ8ty.js} +1 -1
- package/dist/preview/assets/{config-l3KurfL5.js → config-DaZD4ZSa.js} +1 -1
- package/dist/preview/assets/{config-D-i-AFgH.js → config-DhsbcNzx.js} +1 -1
- package/dist/preview/assets/{config-CXaH7a2G.js → config-Diuyh0Ex.js} +1 -1
- package/dist/preview/assets/{config-Bv_hUugV.js → config-aK67Rsw5.js} +1 -1
- package/dist/preview/assets/{config-DrpESRR5.js → config-rpX_Mc6I.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Ck8Pbwem.js → definition.vue_vue_type_script_setup_true_lang-C_jU8d47.js} +1 -1
- package/dist/preview/assets/index-2eQR4s3q.css +1 -0
- package/dist/preview/assets/index-DEF3_MKr.js +659 -0
- package/dist/preview/assets/index-Df-thth9.js +1 -0
- package/dist/preview/assets/{runtime-Df715bRA.js → runtime-3p1K6te5.js} +1 -1
- package/dist/preview/assets/{runtime-D42ecZyC.js → runtime-BcLnafic.js} +1 -1
- package/dist/preview/assets/{runtime-D6twt5H_.js → runtime-CSaV-359.js} +1 -1
- package/dist/preview/assets/{runtime-z_QPMN-R.js → runtime-CjR8Vi5N.js} +1 -1
- package/dist/preview/assets/{runtime-CvuGnDIa.js → runtime-D_fJCKX_.js} +1 -1
- package/dist/preview/assets/{runtime-tobnPKdV.js → runtime-DpeCgGEG.js} +1 -1
- package/dist/preview/assets/{runtime-CmCvUWLV.js → runtime-K2a1x0TJ.js} +1 -1
- package/dist/preview/assets/{runtime-BSASeqgI.js → runtime-g9Zu3VNQ.js} +1 -1
- package/dist/preview/assets/{runtime-DUyUjFqF.js → runtime-jTnh_6Dm.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/block-layout-editor/index.d.vue.ts +10 -2
- package/dist/runtime/components/block-layout-editor/index.vue +44 -8
- package/dist/runtime/components/block-layout-editor/index.vue.d.ts +10 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue +57 -3
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +4 -0
- package/dist/runtime/components/config/config.vue +35 -0
- package/dist/runtime/components/config/use-editor.d.ts +11 -1
- package/dist/runtime/components/config/use-editor.js +27 -1
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +4 -4
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue +593 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue +465 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +95 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.js +112 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +125 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue +525 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +125 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue +460 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +92 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.js +104 -0
- package/dist/runtime/components/form/fields/2026-05-26/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/form/fields/2026-05-26/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +745 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +383 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +264 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +183 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +745 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +402 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +264 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +209 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +129 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +618 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +129 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +501 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +99 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +133 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +550 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +496 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +96 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +125 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +133 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +605 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +133 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +401 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +102 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +142 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +131 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +560 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +131 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +395 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +96 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +118 -0
- package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/form/unit-config.vue +45 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +607 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue +447 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +90 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.js +143 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +129 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +538 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +129 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue +429 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +87 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.js +135 -0
- package/dist/runtime/components/table/columns/2026-05-27/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/table/columns/2026-05-27/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +931 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +463 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +283 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +275 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +931 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +414 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +283 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +275 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +632 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +461 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +93 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +161 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +563 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +443 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +90 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +153 -0
- package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/table/config.vue +16 -16
- package/dist/runtime/components/ui/command/CommandItem.d.vue.ts +7 -0
- package/dist/runtime/components/ui/command/CommandItem.vue +13 -4
- package/dist/runtime/components/ui/command/CommandItem.vue.d.ts +7 -0
- package/dist/runtime/components/ui/tree/Tree.d.vue.ts +2 -0
- package/dist/runtime/components/ui/tree/Tree.vue +7 -2
- package/dist/runtime/components/ui/tree/Tree.vue.d.ts +2 -0
- package/dist/runtime/components/ui/tree/TreeNode.vue +16 -26
- package/dist/runtime/share/clipboard.d.ts +26 -0
- package/dist/runtime/share/clipboard.js +82 -0
- package/dist/runtime/share/layout.d.ts +4 -0
- package/dist/runtime/share/layout.js +35 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-BCE-G4Ha.css +0 -1
- package/dist/preview/assets/index-C3Ycah5_.js +0 -643
- package/dist/preview/assets/index-hWT4_I5k.js +0 -1
package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { Expression, LocaleMarkdown } from "../../../../../share/expression.js";
|
|
3
|
+
import { Locale } from "../../../../../share/locale.js";
|
|
4
|
+
import { DataSource } from "../../../../table/schema.js";
|
|
5
|
+
import { commonFieldFields, derivedField } from "../../../utils/common.js";
|
|
6
|
+
export const type = "com.shwfed.form.field.tree.multi";
|
|
7
|
+
export const compatibilityDate = "2026-05-28";
|
|
8
|
+
export const metadata = {
|
|
9
|
+
name: "\u6811\uFF08\u591A\u9009\uFF09",
|
|
10
|
+
icon: "fluent:tree-evergreen-20-regular",
|
|
11
|
+
w: { initial: 8, min: 4, max: Infinity },
|
|
12
|
+
h: { initial: 8, min: 4, max: Infinity, grow: true }
|
|
13
|
+
};
|
|
14
|
+
export function schema(configure) {
|
|
15
|
+
const CelBool = Expression({ configure, resultType: "bool" });
|
|
16
|
+
const nodeConfigure = (env) => {
|
|
17
|
+
configure(env);
|
|
18
|
+
env.registerVariable("node", "dyn", { description: "\u5F53\u524D\u8282\u70B9\uFF1B\u7531 `\u6570\u636E` \u8868\u8FBE\u5F0F\u8FD4\u56DE\u7684\u6BCF\u4E00\u9879" });
|
|
19
|
+
};
|
|
20
|
+
const CelNodeKey = Expression({
|
|
21
|
+
configure: nodeConfigure,
|
|
22
|
+
resultType: (t) => t === "string" || t === "number" || t === "dyn"
|
|
23
|
+
});
|
|
24
|
+
const CelNodeChildren = Expression({
|
|
25
|
+
configure: nodeConfigure,
|
|
26
|
+
// Accept lists, optional lists, and `dyn` — CEL infers an empty literal
|
|
27
|
+
// such as `[]` as `list<dyn>` which a strict `list<dyn>` predicate would
|
|
28
|
+
// accept, but a configured expression like `has(node.kids) ? node.kids :
|
|
29
|
+
// null` lands on `dyn` once one branch is `null`. The looser predicate
|
|
30
|
+
// mirrors the table's `data` expression.
|
|
31
|
+
resultType: (t) => t === "dyn" || t.startsWith("list") || t.startsWith("optional")
|
|
32
|
+
});
|
|
33
|
+
const CelNodeBool = Expression({ configure: nodeConfigure, resultType: "bool" });
|
|
34
|
+
const NodeLocaleMd = LocaleMarkdown({ configure: nodeConfigure });
|
|
35
|
+
const CelKeywords = Expression({
|
|
36
|
+
configure: nodeConfigure,
|
|
37
|
+
// Empty list literals (`[]`) check as `list<dyn>`, and a
|
|
38
|
+
// `node.?keywords` access lands on `optional<dyn>` — accept either by
|
|
39
|
+
// sharing the same loose predicate the data expression uses.
|
|
40
|
+
resultType: (t) => t === "dyn" || t.startsWith("list") || t.startsWith("optional")
|
|
41
|
+
});
|
|
42
|
+
return Schema.Struct({
|
|
43
|
+
type: Schema.Literal(type),
|
|
44
|
+
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
45
|
+
...commonFieldFields(configure),
|
|
46
|
+
label: Schema.optional(Locale.annotations({
|
|
47
|
+
title: "\u6807\u7B7E",
|
|
48
|
+
description: "\u5B57\u6BB5\u524D\u5C55\u793A\u7684\u6587\u672C\uFF1B\u7559\u7A7A\u5219\u4E0D\u6E32\u67D3\u6807\u7B7E"
|
|
49
|
+
})),
|
|
50
|
+
tooltip: Schema.optional(Locale.annotations({
|
|
51
|
+
title: "\u63D0\u793A",
|
|
52
|
+
description: "\u9F20\u6807\u60AC\u505C\u5728\u6807\u7B7E\u4E0A\u65F6\u5C55\u793A\u7684\u8BF4\u660E"
|
|
53
|
+
})),
|
|
54
|
+
binding: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
55
|
+
title: "\u7ED1\u5B9A\u8DEF\u5F84",
|
|
56
|
+
description: "\u5199\u5165\u8868\u5355\u72B6\u6001\u7684 `dot-prop` \u8DEF\u5F84\uFF1B\u5199\u5165\u503C\u4E3A\u5DF2\u52FE\u9009\u8282\u70B9 ID \u7684\u6570\u7EC4\uFF1B\u7559\u7A7A\u5219\u4E3A\u975E\u53D7\u63A7\u5B57\u6BB5"
|
|
57
|
+
})),
|
|
58
|
+
disabled: Schema.optional(CelBool.annotations({
|
|
59
|
+
title: "\u7981\u7528\u6761\u4EF6",
|
|
60
|
+
description: "\u8FD4\u56DE `true` \u65F6\u4ECD\u6E32\u67D3\u4F46\u4E0D\u53EF\u52FE\u9009"
|
|
61
|
+
})),
|
|
62
|
+
readonly: Schema.optional(CelBool.annotations({
|
|
63
|
+
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
64
|
+
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u5DF2\u52FE\u9009\u8282\u70B9\u7684\u6807\u7B7E"
|
|
65
|
+
})),
|
|
66
|
+
derived: derivedField(configure, "dyn"),
|
|
67
|
+
dataSource: DataSource(configure).annotations({
|
|
68
|
+
title: "\u6570\u636E\u6E90",
|
|
69
|
+
description: "\u8FD4\u56DE\u5B8C\u6574\u6811\uFF08\u6839\u8282\u70B9\u5217\u8868\uFF09\u7684\u6570\u636E\u6E90\uFF1B\u6811\u901A\u8FC7 `\u8282\u70B9\u5B50\u7EA7` \u8868\u8FBE\u5F0F\u9010\u5C42\u5411\u4E0B\u8BFB\u53D6\u5B50\u7EA7"
|
|
70
|
+
}),
|
|
71
|
+
nodeKey: CelNodeKey.annotations({
|
|
72
|
+
title: "\u8282\u70B9 ID",
|
|
73
|
+
description: "\u4E3A\u6BCF\u4E2A\u8282\u70B9\u8BA1\u7B97\u7A33\u5B9A\u552F\u4E00 ID \u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `node`\uFF1B\u8FD0\u884C\u65F6\u4EE5\u5B57\u7B26\u4E32\u5F62\u5F0F\u5B58\u50A8"
|
|
74
|
+
}),
|
|
75
|
+
nodeChildren: CelNodeChildren.annotations({
|
|
76
|
+
title: "\u8282\u70B9\u5B50\u7EA7",
|
|
77
|
+
description: "\u8FD4\u56DE\u5F53\u524D\u8282\u70B9\u7684\u5B50\u7EA7\u5217\u8868\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u8FD4\u56DE `none` / `null` \u89C6\u4E3A\u53F6\u5B50\u8282\u70B9"
|
|
78
|
+
}),
|
|
79
|
+
nodeLabel: NodeLocaleMd.annotations({
|
|
80
|
+
title: "\u8282\u70B9\u6807\u7B7E",
|
|
81
|
+
description: "\u8282\u70B9\u5C55\u793A\u7684\u672C\u5730\u5316\u6587\u672C\uFF0C\u652F\u6301 Markdown \u4E0E `{{ node.foo }}` / `{{ form.foo }}` \u63D2\u503C"
|
|
82
|
+
}),
|
|
83
|
+
nodeTooltip: Schema.optional(NodeLocaleMd.annotations({
|
|
84
|
+
title: "\u8282\u70B9\u63D0\u793A",
|
|
85
|
+
description: "\u9F20\u6807\u60AC\u505C\u5728\u8282\u70B9\u4E0A\u65F6\u5C55\u793A\u7684\u672C\u5730\u5316\u63D0\u793A\uFF0C\u652F\u6301 Markdown \u4E0E\u63D2\u503C"
|
|
86
|
+
})),
|
|
87
|
+
nodeSelectable: Schema.optional(CelNodeBool.annotations({
|
|
88
|
+
title: "\u8282\u70B9\u53EF\u9009\u6761\u4EF6",
|
|
89
|
+
description: "\u8FD4\u56DE `true` \u8868\u793A\u8BE5\u8282\u70B9\u53EF\u88AB\u52FE\u9009\uFF1B\u7EA7\u8054\u9009\u62E9\u4ECD\u5C0A\u91CD\u8BE5\u6761\u4EF6"
|
|
90
|
+
})),
|
|
91
|
+
cascade: Schema.optionalWith(Schema.Literal("independent", "cascade-down", "cascade-both"), {
|
|
92
|
+
default: () => "cascade-both"
|
|
93
|
+
}).annotations({
|
|
94
|
+
title: "\u7EA7\u8054\u6A21\u5F0F",
|
|
95
|
+
description: "`\u72EC\u7ACB`\uFF1A\u4EC5\u52FE\u9009\u5F53\u524D\u8282\u70B9\uFF1B`\u5411\u4E0B\u7EA7\u8054`\uFF1A\u52FE\u9009\u7236\u8282\u70B9\u540C\u65F6\u52FE\u9009\u6240\u6709\u53EF\u9009\u540E\u4EE3\uFF1B`\u53CC\u5411\u7EA7\u8054`\uFF1A\u5728\u5411\u4E0B\u7EA7\u8054\u57FA\u7840\u4E0A\uFF0C\u7236\u8282\u70B9\u53CD\u6620\u540E\u4EE3\u52FE\u9009\u72B6\u6001\uFF08\u90E8\u5206\u9009\u4E2D\u663E\u793A\u4E3A\u534A\u9009\uFF09"
|
|
96
|
+
}),
|
|
97
|
+
expandAll: Schema.optionalWith(Schema.Boolean, { default: () => false }).annotations({
|
|
98
|
+
title: "\u9ED8\u8BA4\u5168\u90E8\u5C55\u5F00",
|
|
99
|
+
description: "\u5F00\u542F\u540E\u6302\u8F7D\u65F6\u5C55\u5F00\u6240\u6709\u975E\u53F6\u5B50\u8282\u70B9"
|
|
100
|
+
}),
|
|
101
|
+
filter: Schema.optional(Schema.Struct({
|
|
102
|
+
enabled: Schema.Boolean.annotations({ title: "\u542F\u7528", description: "\u662F\u5426\u5728\u6811\u4E0A\u65B9\u663E\u793A\u641C\u7D22\u8F93\u5165\u6846" }),
|
|
103
|
+
label: Schema.optional(Locale.annotations({
|
|
104
|
+
title: "\u6807\u7B7E",
|
|
105
|
+
description: "\u641C\u7D22\u8F93\u5165\u6846\u7684\u6D6E\u52A8\u6807\u7B7E\uFF1B\u7559\u7A7A\u5219\u4F7F\u7528\u9ED8\u8BA4\u503C\u300C\u641C\u7D22\u300D"
|
|
106
|
+
})),
|
|
107
|
+
keywords: Schema.optional(CelKeywords.annotations({
|
|
108
|
+
title: "\u989D\u5916\u5173\u952E\u8BCD",
|
|
109
|
+
description: "\u8FD4\u56DE\u5B57\u7B26\u4E32\u5217\u8868\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `node`\uFF1B\u5339\u914D\u89C4\u5219\u4E3A\u300C\u8282\u70B9\u6807\u7B7E \u6216 \u4EFB\u4E00\u5173\u952E\u8BCD\u300D\u5305\u542B\u641C\u7D22\u8BCD\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09"
|
|
110
|
+
}))
|
|
111
|
+
}).annotations({
|
|
112
|
+
title: "\u8FC7\u6EE4",
|
|
113
|
+
description: "\u5BA2\u6237\u7AEF\u8FC7\u6EE4\uFF1B\u8FC7\u6EE4\u4E0D\u4F1A\u5F71\u54CD\u5DF2\u9009\u4E2D\u7684\u8282\u70B9 ID"
|
|
114
|
+
}))
|
|
115
|
+
}).annotations({
|
|
116
|
+
title: "TreeMultiField",
|
|
117
|
+
description: "\u57FA\u4E8E\u6811\u5F62\u6570\u636E\u7684\u591A\u9009\u8F93\u5165"
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export function defaults() {
|
|
121
|
+
return {
|
|
122
|
+
dataSource: { data: "[]" },
|
|
123
|
+
nodeKey: "string(node.id)",
|
|
124
|
+
nodeChildren: "has(node.children) ? node.children : null",
|
|
125
|
+
nodeLabel: [{ locale: "zh", message: "{{ node.label }}" }],
|
|
126
|
+
cascade: "cascade-both",
|
|
127
|
+
expandAll: false
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export const migrateFrom = [
|
|
131
|
+
{ type: "com.shwfed.form.field.tree.multi", compatibilityDate: "2026-05-23" }
|
|
132
|
+
];
|
|
133
|
+
export const migrate = (prev, _ctx) => Effect.try({
|
|
134
|
+
try: () => {
|
|
135
|
+
const { compatibilityDate: _legacyDate, ...carryover } = prev;
|
|
136
|
+
return {
|
|
137
|
+
...carryover,
|
|
138
|
+
compatibilityDate
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
catch: (err) => err instanceof Error ? err : new Error(String(err))
|
|
142
|
+
});
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly filter?: {
|
|
8
|
+
readonly label?: readonly [{
|
|
9
|
+
readonly locale: "zh";
|
|
10
|
+
readonly message: string;
|
|
11
|
+
}, ...{
|
|
12
|
+
readonly locale: "en" | "ja" | "ko";
|
|
13
|
+
readonly message: string;
|
|
14
|
+
}[]] | undefined;
|
|
15
|
+
readonly enabled: boolean;
|
|
16
|
+
readonly keywords?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
readonly label?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly disabled?: string | undefined;
|
|
26
|
+
readonly type: "com.shwfed.form.field.tree.single";
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly hidden?: string | undefined;
|
|
29
|
+
readonly tooltip?: readonly [{
|
|
30
|
+
readonly locale: "zh";
|
|
31
|
+
readonly message: string;
|
|
32
|
+
}, ...{
|
|
33
|
+
readonly locale: "en" | "ja" | "ko";
|
|
34
|
+
readonly message: string;
|
|
35
|
+
}[]] | undefined;
|
|
36
|
+
readonly displayName?: string | undefined;
|
|
37
|
+
readonly compatibilityDate: "2026-05-28";
|
|
38
|
+
readonly readonly?: string | undefined;
|
|
39
|
+
readonly binding?: string | undefined;
|
|
40
|
+
readonly derived?: {
|
|
41
|
+
readonly mode: "formula" | "prefill";
|
|
42
|
+
readonly expression: string;
|
|
43
|
+
} | undefined;
|
|
44
|
+
readonly dataSource: {
|
|
45
|
+
readonly data: string;
|
|
46
|
+
readonly request?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
readonly nodeKey: string;
|
|
49
|
+
readonly nodeChildren: string;
|
|
50
|
+
readonly nodeLabel: readonly [{
|
|
51
|
+
readonly locale: "zh";
|
|
52
|
+
readonly message: string;
|
|
53
|
+
}, ...{
|
|
54
|
+
readonly locale: "en" | "ja" | "ko";
|
|
55
|
+
readonly message: string;
|
|
56
|
+
}[]];
|
|
57
|
+
readonly expandAll: boolean;
|
|
58
|
+
readonly nodeTooltip?: readonly [{
|
|
59
|
+
readonly locale: "zh";
|
|
60
|
+
readonly message: string;
|
|
61
|
+
}, ...{
|
|
62
|
+
readonly locale: "en" | "ja" | "ko";
|
|
63
|
+
readonly message: string;
|
|
64
|
+
}[]] | undefined;
|
|
65
|
+
readonly nodeSelectable?: string | undefined;
|
|
66
|
+
}) => any;
|
|
67
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
68
|
+
"onUpdate:modelValue"?: ((value: {
|
|
69
|
+
readonly filter?: {
|
|
70
|
+
readonly label?: readonly [{
|
|
71
|
+
readonly locale: "zh";
|
|
72
|
+
readonly message: string;
|
|
73
|
+
}, ...{
|
|
74
|
+
readonly locale: "en" | "ja" | "ko";
|
|
75
|
+
readonly message: string;
|
|
76
|
+
}[]] | undefined;
|
|
77
|
+
readonly enabled: boolean;
|
|
78
|
+
readonly keywords?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
readonly label?: readonly [{
|
|
81
|
+
readonly locale: "zh";
|
|
82
|
+
readonly message: string;
|
|
83
|
+
}, ...{
|
|
84
|
+
readonly locale: "en" | "ja" | "ko";
|
|
85
|
+
readonly message: string;
|
|
86
|
+
}[]] | undefined;
|
|
87
|
+
readonly disabled?: string | undefined;
|
|
88
|
+
readonly type: "com.shwfed.form.field.tree.single";
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly hidden?: string | undefined;
|
|
91
|
+
readonly tooltip?: readonly [{
|
|
92
|
+
readonly locale: "zh";
|
|
93
|
+
readonly message: string;
|
|
94
|
+
}, ...{
|
|
95
|
+
readonly locale: "en" | "ja" | "ko";
|
|
96
|
+
readonly message: string;
|
|
97
|
+
}[]] | undefined;
|
|
98
|
+
readonly displayName?: string | undefined;
|
|
99
|
+
readonly compatibilityDate: "2026-05-28";
|
|
100
|
+
readonly readonly?: string | undefined;
|
|
101
|
+
readonly binding?: string | undefined;
|
|
102
|
+
readonly derived?: {
|
|
103
|
+
readonly mode: "formula" | "prefill";
|
|
104
|
+
readonly expression: string;
|
|
105
|
+
} | undefined;
|
|
106
|
+
readonly dataSource: {
|
|
107
|
+
readonly data: string;
|
|
108
|
+
readonly request?: string | undefined;
|
|
109
|
+
};
|
|
110
|
+
readonly nodeKey: string;
|
|
111
|
+
readonly nodeChildren: string;
|
|
112
|
+
readonly nodeLabel: readonly [{
|
|
113
|
+
readonly locale: "zh";
|
|
114
|
+
readonly message: string;
|
|
115
|
+
}, ...{
|
|
116
|
+
readonly locale: "en" | "ja" | "ko";
|
|
117
|
+
readonly message: string;
|
|
118
|
+
}[]];
|
|
119
|
+
readonly expandAll: boolean;
|
|
120
|
+
readonly nodeTooltip?: readonly [{
|
|
121
|
+
readonly locale: "zh";
|
|
122
|
+
readonly message: string;
|
|
123
|
+
}, ...{
|
|
124
|
+
readonly locale: "en" | "ja" | "ko";
|
|
125
|
+
readonly message: string;
|
|
126
|
+
}[]] | undefined;
|
|
127
|
+
readonly nodeSelectable?: string | undefined;
|
|
128
|
+
}) => any) | undefined;
|
|
129
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
130
|
+
declare const _default: typeof __VLS_export;
|
|
131
|
+
export default _default;
|