@shwfed/config 2.10.0 → 2.10.2
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 +4125 -3183
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-CCaOWk_7.js → FieldGroup.vue_vue_type_script_setup_true_lang-DX5M_WNF.js} +1 -1
- package/dist/preview/assets/{badge-D9_7atSJ.js → badge-DFZBH8N6.js} +1 -1
- package/dist/preview/assets/{config-B2d8SiPi.js → config-BH2BmDoD.js} +1 -1
- package/dist/preview/assets/{config-Bk2VSNeu.js → config-Bg7a8Rid.js} +1 -1
- package/dist/preview/assets/{config-DYxMKhCU.js → config-BiOW8fS2.js} +1 -1
- package/dist/preview/assets/{config-CNKb25Qo.js → config-Bnp547Nm.js} +1 -1
- package/dist/preview/assets/{config-Bf5Vckj3.js → config-CSmHhOh2.js} +1 -1
- package/dist/preview/assets/{config-CQrqVV1U.js → config-CTF5-TTQ.js} +1 -1
- package/dist/preview/assets/{config-DWA385pD.js → config-CqeWJt_H.js} +1 -1
- package/dist/preview/assets/{config-BLEovXei.js → config-DBtEKoan.js} +1 -1
- package/dist/preview/assets/{config-DyPl6K2G.js → config-DeDCNzY_.js} +1 -1
- package/dist/preview/assets/{config-C9WPOoA7.js → config-Dj3w2JkF.js} +1 -1
- package/dist/preview/assets/{config-DZlaJUlF.js → config-XGJ9V32V.js} +1 -1
- package/dist/preview/assets/{config-C8lCItmz.js → config-uIHUHvNR.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CFzQ7icU.js → definition.vue_vue_type_script_setup_true_lang-Cu0CEKYT.js} +1 -1
- package/dist/preview/assets/index-CGChrBji.js +1 -0
- package/dist/preview/assets/{index-CXOEVGFP.js → index-CQA6q2ay.js} +1 -1
- package/dist/preview/assets/index-DX9_iE4h.js +743 -0
- package/dist/preview/assets/{index-BnJ5p1Mx.css → index-pkoEF5dC.css} +1 -1
- package/dist/preview/assets/{item-DCVX69_o.js → item-C4VJfiq8.js} +1 -1
- package/dist/preview/assets/{runtime-DEWGIyvr.js → runtime-6Zrje7Y1.js} +1 -1
- package/dist/preview/assets/{runtime-O6MNC3GA.js → runtime-BN-jMAt7.js} +1 -1
- package/dist/preview/assets/{runtime-BD1A-g1h.js → runtime-BQMnWueG.js} +1 -1
- package/dist/preview/assets/{runtime-BsNSI1XP.js → runtime-CBz5XstF.js} +1 -1
- package/dist/preview/assets/{runtime-BNk4EliL.js → runtime-CFb1tHwr.js} +1 -1
- package/dist/preview/assets/{runtime-Cbc5NH57.js → runtime-DQL6lCFp.js} +1 -1
- package/dist/preview/assets/{runtime-DSfMvph3.js → runtime-DcdmMgqL.js} +1 -1
- package/dist/preview/assets/{runtime-DJ9ElxWB.js → runtime-okYOTQd6.js} +1 -1
- package/dist/preview/assets/{runtime-BO-KY3T_.js → runtime-qPyuMgsh.js} +1 -1
- package/dist/preview/assets/{runtime-r1wbrr4k.js → runtime-yfWYeUh4.js} +1 -1
- package/dist/preview/assets/{schema-meta-ovcuERKg.js → schema-meta-6ZPO8dHv.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +4 -4
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +4 -4
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/schema.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +16 -3
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +17 -3
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +5 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +179 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue +942 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +179 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue +499 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +223 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.js +276 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +179 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue +942 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +179 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue +438 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +223 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.js +276 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +123 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue +646 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +123 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue +500 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +83 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +179 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +121 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue +577 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +121 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue +465 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +80 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +171 -0
- package/dist/runtime/components/table/columns/2026-06-14/combobox-migrate.d.ts +18 -0
- package/dist/runtime/components/table/columns/2026-06-14/combobox-migrate.js +36 -0
- package/dist/runtime/components/table/columns/2026-06-14/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/table/columns/2026-06-14/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/table/config.vue +74 -8
- package/dist/runtime/components/table/index.d.vue.ts +2 -0
- package/dist/runtime/components/table/index.vue +24 -0
- package/dist/runtime/components/table/index.vue.d.ts +2 -0
- package/dist/runtime/components/table/schema.d.ts +3 -3
- package/dist/runtime/components/table/utils/shared.d.ts +1 -0
- package/dist/runtime/components/table/utils/shared.js +7 -13
- package/package.json +1 -1
- package/dist/preview/assets/index-7BE56IYF.js +0 -739
- package/dist/preview/assets/index-Bwv0Yz_L.js +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import type { ColumnDef } from '@tanstack/vue-table';
|
|
3
|
+
import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
|
|
4
|
+
import type { ColumnDefDeps, MigrateFn, MigrateSource } from '../../../utils/resolve.js';
|
|
5
|
+
export declare const type: "com.shwfed.table.column.tree-combobox-multi";
|
|
6
|
+
export declare const compatibilityDate: "2026-06-14";
|
|
7
|
+
export declare const metadata: {
|
|
8
|
+
readonly name: "下拉树(多选)";
|
|
9
|
+
readonly icon: "fluent:tree-evergreen-20-regular";
|
|
10
|
+
readonly selection: true;
|
|
11
|
+
};
|
|
12
|
+
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
13
|
+
placeholder: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
14
|
+
locale: Schema.Literal<["zh"]>;
|
|
15
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
16
|
+
}>], [Schema.Struct<{
|
|
17
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
18
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
19
|
+
}>]>>;
|
|
20
|
+
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
21
|
+
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
22
|
+
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
23
|
+
derived: Schema.optional<Schema.Struct<{
|
|
24
|
+
mode: Schema.Literal<["formula", "prefill"]>;
|
|
25
|
+
expression: Schema.Schema<string, string, never>;
|
|
26
|
+
}>>;
|
|
27
|
+
dataSource: Schema.Struct<{
|
|
28
|
+
request: Schema.optional<Schema.Schema<string, string, never>>;
|
|
29
|
+
data: Schema.Schema<string, string, never>;
|
|
30
|
+
}>;
|
|
31
|
+
nodeKey: Schema.Schema<string, string, never>;
|
|
32
|
+
nodeChildren: Schema.Schema<string, string, never>;
|
|
33
|
+
nodeLabel: Schema.Schema<string, string, never>;
|
|
34
|
+
nodeTooltip: Schema.optional<Schema.refine<readonly [{
|
|
35
|
+
readonly locale: "zh";
|
|
36
|
+
readonly message: string;
|
|
37
|
+
}, ...{
|
|
38
|
+
readonly locale: "en" | "ja" | "ko";
|
|
39
|
+
readonly message: string;
|
|
40
|
+
}[]], Schema.TupleType<readonly [Schema.Struct<{
|
|
41
|
+
locale: Schema.Literal<["zh"]>;
|
|
42
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
43
|
+
}>], [Schema.Struct<{
|
|
44
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
45
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
46
|
+
}>]>>>;
|
|
47
|
+
keywords: Schema.optional<Schema.Schema<string, string, never>>;
|
|
48
|
+
nodeSelectable: Schema.optional<Schema.Schema<string, string, never>>;
|
|
49
|
+
cascade: Schema.optionalWith<Schema.Literal<["independent", "cascade-down", "cascade-both"]>, {
|
|
50
|
+
default: () => "independent";
|
|
51
|
+
}>;
|
|
52
|
+
expandAll: Schema.optionalWith<typeof Schema.Boolean, {
|
|
53
|
+
default: () => false;
|
|
54
|
+
}>;
|
|
55
|
+
title: Schema.TupleType<readonly [Schema.Struct<{
|
|
56
|
+
locale: Schema.Literal<["zh"]>;
|
|
57
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
58
|
+
}>], [Schema.Struct<{
|
|
59
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
60
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
61
|
+
}>]>;
|
|
62
|
+
binding: Schema.refine<string, typeof Schema.String>;
|
|
63
|
+
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
64
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
65
|
+
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
66
|
+
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
67
|
+
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
68
|
+
locale: Schema.Literal<["zh"]>;
|
|
69
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
70
|
+
}>], [Schema.Struct<{
|
|
71
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
72
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
73
|
+
}>]>>;
|
|
74
|
+
id: Schema.refine<string, typeof Schema.String>;
|
|
75
|
+
groupId: Schema.optional<typeof Schema.UUID>;
|
|
76
|
+
type: Schema.Literal<["com.shwfed.table.column.tree-combobox-multi"]>;
|
|
77
|
+
compatibilityDate: Schema.Literal<["2026-06-14"]>;
|
|
78
|
+
}>;
|
|
79
|
+
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
80
|
+
export declare function defaults(): Partial<Value>;
|
|
81
|
+
export declare const migrateFrom: ReadonlyArray<MigrateSource>;
|
|
82
|
+
export declare const migrate: MigrateFn;
|
|
83
|
+
export declare function toColumnDef(value: Value, { getLocaleText }: ColumnDefDeps): Partial<ColumnDef<unknown, unknown>>;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { getProperty } from "dot-prop";
|
|
3
|
+
import { Locale } from "../../../../../share/locale.js";
|
|
4
|
+
import { Expression, HttpRequestResult, LocaleMarkdown } from "../../../../../share/expression.js";
|
|
5
|
+
import {
|
|
6
|
+
CelRowAccess,
|
|
7
|
+
derivedRowField,
|
|
8
|
+
editableColumnFields,
|
|
9
|
+
editableHeader,
|
|
10
|
+
registerRowVariablesIfAbsent
|
|
11
|
+
} from "../../../utils/shared.js";
|
|
12
|
+
import { localeLabelToExpression } from "../combobox-migrate.js";
|
|
13
|
+
export const type = "com.shwfed.table.column.tree-combobox-multi";
|
|
14
|
+
export const compatibilityDate = "2026-06-14";
|
|
15
|
+
export const metadata = {
|
|
16
|
+
name: "\u4E0B\u62C9\u6811\uFF08\u591A\u9009\uFF09",
|
|
17
|
+
icon: "fluent:tree-evergreen-20-regular",
|
|
18
|
+
// Publishes its resolved nodes (array) to the per-row `selections` registry (runtime.vue), readable via `selections["<id>"]`.
|
|
19
|
+
selection: true
|
|
20
|
+
};
|
|
21
|
+
const isListLike = (t) => t === "dyn" || t.startsWith("list") || t.startsWith("optional");
|
|
22
|
+
const isKeyType = (t) => t === "string" || t === "number" || t === "dyn";
|
|
23
|
+
function withRowAndNode(configure) {
|
|
24
|
+
return (env) => {
|
|
25
|
+
configure(env);
|
|
26
|
+
registerRowVariablesIfAbsent(env);
|
|
27
|
+
env.registerVariable("node", "dyn", { description: "`\u6570\u636E\u6E90` \u8FD4\u56DE\u7684\u8282\u70B9\uFF1B\u7531\u6811\u9010\u5C42\u5411\u4E0B\u8BFB\u53D6" });
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export function schema(configure) {
|
|
31
|
+
const CelBool = CelRowAccess(configure, { resultType: "bool" });
|
|
32
|
+
const CelNodeKey = Expression({ configure: withRowAndNode(configure), resultType: isKeyType });
|
|
33
|
+
const CelNodeChildren = Expression({ configure: withRowAndNode(configure), resultType: isListLike });
|
|
34
|
+
const CelNodeBool = Expression({ configure: withRowAndNode(configure), resultType: "bool" });
|
|
35
|
+
const CelKeywords = Expression({ configure: withRowAndNode(configure), resultType: isListLike });
|
|
36
|
+
const CelNodeLabel = Expression({ configure: withRowAndNode(configure), resultType: "dyn" });
|
|
37
|
+
const NodeLocaleMd = LocaleMarkdown({ configure: withRowAndNode(configure) });
|
|
38
|
+
const dataSourceConfigure = (env) => {
|
|
39
|
+
configure(env);
|
|
40
|
+
registerRowVariablesIfAbsent(env);
|
|
41
|
+
};
|
|
42
|
+
const CelDataSourceRequest = Expression({
|
|
43
|
+
configure: dataSourceConfigure,
|
|
44
|
+
resultType: HttpRequestResult
|
|
45
|
+
});
|
|
46
|
+
const CelDataSourceData = Expression({
|
|
47
|
+
configure: (env) => {
|
|
48
|
+
dataSourceConfigure(env);
|
|
49
|
+
env.registerVariable("json", "optional<dyn>", {
|
|
50
|
+
description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u672A\u914D\u7F6E `request` \u65F6\u4E3A `none`"
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
resultType: (t) => t.startsWith("list") || t === "dyn" || t.startsWith("optional")
|
|
54
|
+
});
|
|
55
|
+
const TreeDataSource = Schema.Struct({
|
|
56
|
+
request: Schema.optional(CelDataSourceRequest).annotations({
|
|
57
|
+
title: "\u8BF7\u6C42",
|
|
58
|
+
description: "\u53EF\u9009\u7684 HTTP \u8BF7\u6C42\u8868\u8FBE\u5F0F\uFF1B\u672A\u914D\u7F6E\u65F6\u6570\u636E\u4ECE `data` \u8868\u8FBE\u5F0F\u4E2D\u8BFB\u53D6"
|
|
59
|
+
}),
|
|
60
|
+
data: CelDataSourceData.annotations({
|
|
61
|
+
title: "\u6570\u636E",
|
|
62
|
+
description: "\u8FD4\u56DE\u884C\u6570\u636E\u5217\u8868\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u914D\u7F6E\u4E86 `request` \u65F6\u53EF\u901A\u8FC7 `json` \u5F15\u7528\u54CD\u5E94\u4F53"
|
|
63
|
+
})
|
|
64
|
+
}).annotations({ title: "DataSource", description: "\u6570\u636E\u6E90\u914D\u7F6E" });
|
|
65
|
+
return Schema.Struct({
|
|
66
|
+
type: Schema.Literal(type),
|
|
67
|
+
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
68
|
+
...editableColumnFields(),
|
|
69
|
+
placeholder: Schema.optional(Locale.annotations({
|
|
70
|
+
title: "\u5360\u4F4D\u7B26",
|
|
71
|
+
description: "\u672A\u9009\u4E2D\u4EFB\u4F55\u9009\u9879\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
|
|
72
|
+
})),
|
|
73
|
+
hidden: Schema.optional(CelBool.annotations({
|
|
74
|
+
title: "\u9690\u85CF\u6761\u4EF6",
|
|
75
|
+
description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u4E0B\u62C9\u6811\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
|
|
76
|
+
})),
|
|
77
|
+
disabled: Schema.optional(CelBool.annotations({
|
|
78
|
+
title: "\u7981\u7528\u6761\u4EF6",
|
|
79
|
+
description: "\u8FD4\u56DE `true` \u65F6\u4E0B\u62C9\u6811\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u9009\u62E9"
|
|
80
|
+
})),
|
|
81
|
+
readonly: Schema.optional(CelBool.annotations({
|
|
82
|
+
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
83
|
+
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u5DF2\u9009\u9879\u7684\u6807\u7B7E"
|
|
84
|
+
})),
|
|
85
|
+
derived: derivedRowField(configure, isListLike),
|
|
86
|
+
dataSource: TreeDataSource.annotations({
|
|
87
|
+
title: "\u6570\u636E\u6E90",
|
|
88
|
+
description: "\u8FD4\u56DE\u5B8C\u6574\u6811\uFF08\u6839\u8282\u70B9\u5217\u8868\uFF09\u7684\u6570\u636E\u6E90\uFF1B\u901A\u8FC7 `\u8282\u70B9\u5B50\u7EA7` \u8868\u8FBE\u5F0F\u9010\u5C42\u5411\u4E0B\u8BFB\u53D6\uFF1B\u53EF\u8BBF\u95EE `row`\u3001`index`"
|
|
89
|
+
}),
|
|
90
|
+
nodeKey: CelNodeKey.annotations({
|
|
91
|
+
title: "\u8282\u70B9 ID",
|
|
92
|
+
description: "\u4E3A\u6BCF\u4E2A\u8282\u70B9\u8BA1\u7B97\u7A33\u5B9A\u552F\u4E00 ID \u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `node`\u3001`row`\u3001`index`\uFF1B\u8FD0\u884C\u65F6\u4EE5\u5B57\u7B26\u4E32\u5F62\u5F0F\u5B58\u50A8"
|
|
93
|
+
}),
|
|
94
|
+
nodeChildren: CelNodeChildren.annotations({
|
|
95
|
+
title: "\u8282\u70B9\u5B50\u7EA7",
|
|
96
|
+
description: "\u8FD4\u56DE\u5F53\u524D\u8282\u70B9\u5B50\u7EA7\u5217\u8868\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u8FD4\u56DE `none`/`null` \u6216\u7A7A\u6570\u7EC4\u65F6\u8BE5\u8282\u70B9\u89C6\u4E3A\u53F6\u5B50\uFF08\u7EC8\u7AEF\u8282\u70B9\uFF09"
|
|
97
|
+
}),
|
|
98
|
+
nodeLabel: CelNodeLabel.annotations({
|
|
99
|
+
title: "\u8282\u70B9\u6807\u7B7E",
|
|
100
|
+
description: '\u8FD4\u56DE\u8282\u70B9\u5C55\u793A\u6587\u672C\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `node`\u3001`row`\u3001`index`\uFF1B\u4F8B\uFF1A`node.label` \u6216 `string(node.code) + " " + node.name`'
|
|
101
|
+
}),
|
|
102
|
+
nodeTooltip: Schema.optional(NodeLocaleMd.annotations({
|
|
103
|
+
title: "\u8282\u70B9\u63D0\u793A",
|
|
104
|
+
description: "\u9F20\u6807\u60AC\u505C\u5728\u8282\u70B9\u4E0A\u65F6\u5C55\u793A\u7684\u672C\u5730\u5316\u63D0\u793A"
|
|
105
|
+
})),
|
|
106
|
+
keywords: Schema.optional(CelKeywords.annotations({
|
|
107
|
+
title: "\u989D\u5916\u5173\u952E\u8BCD",
|
|
108
|
+
description: "\u8FD4\u56DE\u5B57\u7B26\u4E32\u5217\u8868\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `node`\u3001`row`\u3001`index`\uFF1B\u641C\u7D22\u65F6\u53EA\u8981 `\u8282\u70B9\u6807\u7B7E` \u6216 \u4EFB\u4E00\u5173\u952E\u8BCD \u5305\u542B\u67E5\u8BE2\u8BCD\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09\u5373\u547D\u4E2D"
|
|
109
|
+
})),
|
|
110
|
+
nodeSelectable: Schema.optional(CelNodeBool.annotations({
|
|
111
|
+
title: "\u8282\u70B9\u53EF\u9009\u6761\u4EF6",
|
|
112
|
+
description: "\u8FD4\u56DE `true` \u8868\u793A\u8BE5\u8282\u70B9\u53EF\u88AB\u9009\u4E2D\uFF1B\u9ED8\u8BA4\u5168\u90E8\u53EF\u9009"
|
|
113
|
+
})),
|
|
114
|
+
cascade: Schema.optionalWith(
|
|
115
|
+
Schema.Literal("independent", "cascade-down", "cascade-both"),
|
|
116
|
+
{ default: () => "independent" }
|
|
117
|
+
).annotations({
|
|
118
|
+
title: "\u7EA7\u8054\u6A21\u5F0F",
|
|
119
|
+
description: "`\u72EC\u7ACB`\uFF1A\u52FE\u9009 / \u53D6\u6D88\u53EA\u4F5C\u7528\u4E8E\u5F53\u524D\u8282\u70B9\uFF1B`\u5411\u4E0B\u7EA7\u8054`\uFF1A\u52FE\u9009\u7236\u8282\u70B9\u81EA\u52A8\u52FE\u9009\u5176\u5168\u90E8\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"
|
|
120
|
+
}),
|
|
121
|
+
expandAll: Schema.optionalWith(Schema.Boolean, { default: () => false }).annotations({
|
|
122
|
+
title: "\u9ED8\u8BA4\u5168\u90E8\u5C55\u5F00",
|
|
123
|
+
description: "\u5F00\u542F\u540E\u6302\u8F7D\u65F6\u5C55\u5F00\u6240\u6709\u975E\u53F6\u5B50\u8282\u70B9"
|
|
124
|
+
})
|
|
125
|
+
}).annotations({ title: "TreeComboboxMultiRenderer", description: "\u4E0B\u62C9\u6811\u591A\u9009\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
|
|
126
|
+
}
|
|
127
|
+
export function defaults() {
|
|
128
|
+
return {
|
|
129
|
+
title: [{ locale: "zh", message: "" }],
|
|
130
|
+
binding: "",
|
|
131
|
+
size: 200,
|
|
132
|
+
dataSource: { data: "[]" },
|
|
133
|
+
nodeKey: "string(node.id)",
|
|
134
|
+
nodeChildren: "has(node.children) ? node.children : null",
|
|
135
|
+
nodeLabel: "node.label",
|
|
136
|
+
cascade: "independent",
|
|
137
|
+
expandAll: false
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export const migrateFrom = [
|
|
141
|
+
{ type: "com.shwfed.table.column.tree-combobox-multi", compatibilityDate: "2026-05-28" }
|
|
142
|
+
];
|
|
143
|
+
export const migrate = (prev) => Effect.try({
|
|
144
|
+
try: () => {
|
|
145
|
+
if (!prev || typeof prev !== "object") {
|
|
146
|
+
throw new Error("\u4E0B\u62C9\u6811\uFF08\u591A\u9009\uFF09\u8FC1\u79FB\u5931\u8D25\uFF1A\u539F\u503C\u4E0D\u662F\u5BF9\u8C61");
|
|
147
|
+
}
|
|
148
|
+
const src = prev;
|
|
149
|
+
const srcType = src.type;
|
|
150
|
+
const srcDate = src.compatibilityDate;
|
|
151
|
+
if (srcType === "com.shwfed.table.column.tree-combobox-multi" && srcDate === "2026-05-28") {
|
|
152
|
+
const { nodeLabel, type: _t, compatibilityDate: _c, ...rest } = src;
|
|
153
|
+
return {
|
|
154
|
+
...rest,
|
|
155
|
+
type,
|
|
156
|
+
compatibilityDate,
|
|
157
|
+
nodeLabel: localeLabelToExpression(nodeLabel)
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
throw new Error(`\u4E0B\u62C9\u6811\uFF08\u591A\u9009\uFF09\u8FC1\u79FB\u5931\u8D25\uFF1A\u672A\u8BC6\u522B\u7684\u6765\u6E90 ${String(srcType)}@${String(srcDate)}`);
|
|
161
|
+
},
|
|
162
|
+
catch: (e) => e instanceof Error ? e : new Error(String(e))
|
|
163
|
+
});
|
|
164
|
+
export function toColumnDef(value, { getLocaleText }) {
|
|
165
|
+
return {
|
|
166
|
+
header: editableHeader(getLocaleText(value.title)),
|
|
167
|
+
accessorFn: (row) => {
|
|
168
|
+
if (!row || typeof row !== "object") return void 0;
|
|
169
|
+
return getProperty(row, value.binding);
|
|
170
|
+
},
|
|
171
|
+
enableSorting: value.enableSorting ?? false,
|
|
172
|
+
sortingFn: "basic",
|
|
173
|
+
size: value.size,
|
|
174
|
+
meta: {
|
|
175
|
+
grow: value.grow ?? false,
|
|
176
|
+
tooltip: getLocaleText(value.tooltip)
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
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 size?: number | undefined;
|
|
8
|
+
readonly disabled?: string | undefined;
|
|
9
|
+
readonly type: "com.shwfed.table.column.tree-combobox-single";
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly title: readonly [{
|
|
12
|
+
readonly locale: "zh";
|
|
13
|
+
readonly message: string;
|
|
14
|
+
}, ...{
|
|
15
|
+
readonly locale: "en" | "ja" | "ko";
|
|
16
|
+
readonly message: string;
|
|
17
|
+
}[]];
|
|
18
|
+
readonly hidden?: string | undefined;
|
|
19
|
+
readonly tooltip?: readonly [{
|
|
20
|
+
readonly locale: "zh";
|
|
21
|
+
readonly message: string;
|
|
22
|
+
}, ...{
|
|
23
|
+
readonly locale: "en" | "ja" | "ko";
|
|
24
|
+
readonly message: string;
|
|
25
|
+
}[]] | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-06-14";
|
|
27
|
+
readonly groupId?: string | undefined;
|
|
28
|
+
readonly placeholder?: readonly [{
|
|
29
|
+
readonly locale: "zh";
|
|
30
|
+
readonly message: string;
|
|
31
|
+
}, ...{
|
|
32
|
+
readonly locale: "en" | "ja" | "ko";
|
|
33
|
+
readonly message: string;
|
|
34
|
+
}[]] | undefined;
|
|
35
|
+
readonly keywords?: string | undefined;
|
|
36
|
+
readonly readonly?: string | undefined;
|
|
37
|
+
readonly dataSource: {
|
|
38
|
+
readonly data: string;
|
|
39
|
+
readonly request?: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
readonly grow?: boolean | undefined;
|
|
42
|
+
readonly binding: string;
|
|
43
|
+
readonly derived?: {
|
|
44
|
+
readonly mode: "formula" | "prefill";
|
|
45
|
+
readonly expression: string;
|
|
46
|
+
} | undefined;
|
|
47
|
+
readonly enableSorting?: boolean | undefined;
|
|
48
|
+
readonly sortKey?: string | undefined;
|
|
49
|
+
readonly nodeKey: string;
|
|
50
|
+
readonly nodeChildren: string;
|
|
51
|
+
readonly nodeLabel: string;
|
|
52
|
+
readonly nodeTooltip?: readonly [{
|
|
53
|
+
readonly locale: "zh";
|
|
54
|
+
readonly message: string;
|
|
55
|
+
}, ...{
|
|
56
|
+
readonly locale: "en" | "ja" | "ko";
|
|
57
|
+
readonly message: string;
|
|
58
|
+
}[]] | undefined;
|
|
59
|
+
readonly nodeSelectable?: string | undefined;
|
|
60
|
+
readonly expandAll: boolean;
|
|
61
|
+
}) => any;
|
|
62
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
63
|
+
"onUpdate:modelValue"?: ((value: {
|
|
64
|
+
readonly size?: number | undefined;
|
|
65
|
+
readonly disabled?: string | undefined;
|
|
66
|
+
readonly type: "com.shwfed.table.column.tree-combobox-single";
|
|
67
|
+
readonly id: string;
|
|
68
|
+
readonly title: readonly [{
|
|
69
|
+
readonly locale: "zh";
|
|
70
|
+
readonly message: string;
|
|
71
|
+
}, ...{
|
|
72
|
+
readonly locale: "en" | "ja" | "ko";
|
|
73
|
+
readonly message: string;
|
|
74
|
+
}[]];
|
|
75
|
+
readonly hidden?: string | undefined;
|
|
76
|
+
readonly tooltip?: readonly [{
|
|
77
|
+
readonly locale: "zh";
|
|
78
|
+
readonly message: string;
|
|
79
|
+
}, ...{
|
|
80
|
+
readonly locale: "en" | "ja" | "ko";
|
|
81
|
+
readonly message: string;
|
|
82
|
+
}[]] | undefined;
|
|
83
|
+
readonly compatibilityDate: "2026-06-14";
|
|
84
|
+
readonly groupId?: string | undefined;
|
|
85
|
+
readonly placeholder?: readonly [{
|
|
86
|
+
readonly locale: "zh";
|
|
87
|
+
readonly message: string;
|
|
88
|
+
}, ...{
|
|
89
|
+
readonly locale: "en" | "ja" | "ko";
|
|
90
|
+
readonly message: string;
|
|
91
|
+
}[]] | undefined;
|
|
92
|
+
readonly keywords?: string | undefined;
|
|
93
|
+
readonly readonly?: string | undefined;
|
|
94
|
+
readonly dataSource: {
|
|
95
|
+
readonly data: string;
|
|
96
|
+
readonly request?: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
readonly grow?: boolean | undefined;
|
|
99
|
+
readonly binding: string;
|
|
100
|
+
readonly derived?: {
|
|
101
|
+
readonly mode: "formula" | "prefill";
|
|
102
|
+
readonly expression: string;
|
|
103
|
+
} | undefined;
|
|
104
|
+
readonly enableSorting?: boolean | undefined;
|
|
105
|
+
readonly sortKey?: string | undefined;
|
|
106
|
+
readonly nodeKey: string;
|
|
107
|
+
readonly nodeChildren: string;
|
|
108
|
+
readonly nodeLabel: string;
|
|
109
|
+
readonly nodeTooltip?: readonly [{
|
|
110
|
+
readonly locale: "zh";
|
|
111
|
+
readonly message: string;
|
|
112
|
+
}, ...{
|
|
113
|
+
readonly locale: "en" | "ja" | "ko";
|
|
114
|
+
readonly message: string;
|
|
115
|
+
}[]] | undefined;
|
|
116
|
+
readonly nodeSelectable?: string | undefined;
|
|
117
|
+
readonly expandAll: boolean;
|
|
118
|
+
}) => any) | undefined;
|
|
119
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
120
|
+
declare const _default: typeof __VLS_export;
|
|
121
|
+
export default _default;
|