@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.
Files changed (149) hide show
  1. package/dist/mcp.mjs +4125 -3183
  2. package/dist/module.json +1 -1
  3. 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
  4. package/dist/preview/assets/{badge-D9_7atSJ.js → badge-DFZBH8N6.js} +1 -1
  5. package/dist/preview/assets/{config-B2d8SiPi.js → config-BH2BmDoD.js} +1 -1
  6. package/dist/preview/assets/{config-Bk2VSNeu.js → config-Bg7a8Rid.js} +1 -1
  7. package/dist/preview/assets/{config-DYxMKhCU.js → config-BiOW8fS2.js} +1 -1
  8. package/dist/preview/assets/{config-CNKb25Qo.js → config-Bnp547Nm.js} +1 -1
  9. package/dist/preview/assets/{config-Bf5Vckj3.js → config-CSmHhOh2.js} +1 -1
  10. package/dist/preview/assets/{config-CQrqVV1U.js → config-CTF5-TTQ.js} +1 -1
  11. package/dist/preview/assets/{config-DWA385pD.js → config-CqeWJt_H.js} +1 -1
  12. package/dist/preview/assets/{config-BLEovXei.js → config-DBtEKoan.js} +1 -1
  13. package/dist/preview/assets/{config-DyPl6K2G.js → config-DeDCNzY_.js} +1 -1
  14. package/dist/preview/assets/{config-C9WPOoA7.js → config-Dj3w2JkF.js} +1 -1
  15. package/dist/preview/assets/{config-DZlaJUlF.js → config-XGJ9V32V.js} +1 -1
  16. package/dist/preview/assets/{config-C8lCItmz.js → config-uIHUHvNR.js} +1 -1
  17. 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
  18. package/dist/preview/assets/index-CGChrBji.js +1 -0
  19. package/dist/preview/assets/{index-CXOEVGFP.js → index-CQA6q2ay.js} +1 -1
  20. package/dist/preview/assets/index-DX9_iE4h.js +743 -0
  21. package/dist/preview/assets/{index-BnJ5p1Mx.css → index-pkoEF5dC.css} +1 -1
  22. package/dist/preview/assets/{item-DCVX69_o.js → item-C4VJfiq8.js} +1 -1
  23. package/dist/preview/assets/{runtime-DEWGIyvr.js → runtime-6Zrje7Y1.js} +1 -1
  24. package/dist/preview/assets/{runtime-O6MNC3GA.js → runtime-BN-jMAt7.js} +1 -1
  25. package/dist/preview/assets/{runtime-BD1A-g1h.js → runtime-BQMnWueG.js} +1 -1
  26. package/dist/preview/assets/{runtime-BsNSI1XP.js → runtime-CBz5XstF.js} +1 -1
  27. package/dist/preview/assets/{runtime-BNk4EliL.js → runtime-CFb1tHwr.js} +1 -1
  28. package/dist/preview/assets/{runtime-Cbc5NH57.js → runtime-DQL6lCFp.js} +1 -1
  29. package/dist/preview/assets/{runtime-DSfMvph3.js → runtime-DcdmMgqL.js} +1 -1
  30. package/dist/preview/assets/{runtime-DJ9ElxWB.js → runtime-okYOTQd6.js} +1 -1
  31. package/dist/preview/assets/{runtime-BO-KY3T_.js → runtime-qPyuMgsh.js} +1 -1
  32. package/dist/preview/assets/{runtime-r1wbrr4k.js → runtime-yfWYeUh4.js} +1 -1
  33. package/dist/preview/assets/{schema-meta-ovcuERKg.js → schema-meta-6ZPO8dHv.js} +1 -1
  34. package/dist/preview/index.html +2 -2
  35. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -2
  36. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -2
  37. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +4 -4
  38. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +4 -4
  39. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +1 -1
  40. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -2
  41. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -2
  42. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -2
  43. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -2
  44. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +2 -2
  45. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
  46. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
  47. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +6 -6
  48. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +6 -6
  49. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +6 -6
  50. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +6 -6
  51. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +22 -22
  52. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +22 -22
  53. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
  54. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
  55. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +8 -8
  56. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
  57. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
  58. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
  59. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +8 -8
  60. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
  61. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
  62. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
  63. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +8 -8
  64. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
  65. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
  66. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
  67. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +8 -8
  68. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
  69. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +8 -8
  70. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +8 -8
  71. package/dist/runtime/components/form/schema.d.ts +2 -2
  72. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue +5 -1
  73. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +16 -3
  74. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/runtime.vue +5 -1
  75. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue +5 -1
  76. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +17 -3
  77. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +4 -4
  78. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +4 -4
  79. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/runtime.vue +5 -1
  80. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/runtime.vue +5 -1
  81. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue +5 -1
  82. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +4 -4
  83. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +4 -4
  84. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue +5 -1
  85. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.vue +5 -1
  86. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue +5 -1
  87. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue +5 -1
  88. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/runtime.vue +5 -1
  89. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/runtime.vue +5 -1
  90. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
  91. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
  92. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue +5 -1
  93. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
  94. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
  95. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue +5 -1
  96. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +5 -1
  97. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +5 -1
  98. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
  99. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
  100. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +5 -1
  101. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
  102. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
  103. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +5 -1
  104. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +179 -0
  105. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue +942 -0
  106. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +179 -0
  107. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
  108. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue +499 -0
  109. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
  110. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +223 -0
  111. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.js +276 -0
  112. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +179 -0
  113. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue +942 -0
  114. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +179 -0
  115. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.d.vue.ts +9 -0
  116. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue +438 -0
  117. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue.d.ts +9 -0
  118. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +223 -0
  119. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.js +276 -0
  120. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +123 -0
  121. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue +646 -0
  122. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +123 -0
  123. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
  124. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue +500 -0
  125. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
  126. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +83 -0
  127. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +179 -0
  128. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +121 -0
  129. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue +577 -0
  130. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +121 -0
  131. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
  132. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue +465 -0
  133. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
  134. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +80 -0
  135. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +171 -0
  136. package/dist/runtime/components/table/columns/2026-06-14/combobox-migrate.d.ts +18 -0
  137. package/dist/runtime/components/table/columns/2026-06-14/combobox-migrate.js +36 -0
  138. package/dist/runtime/components/table/columns/2026-06-14/tree-combobox-shared.d.ts +35 -0
  139. package/dist/runtime/components/table/columns/2026-06-14/tree-combobox-shared.js +31 -0
  140. package/dist/runtime/components/table/config.vue +74 -8
  141. package/dist/runtime/components/table/index.d.vue.ts +2 -0
  142. package/dist/runtime/components/table/index.vue +24 -0
  143. package/dist/runtime/components/table/index.vue.d.ts +2 -0
  144. package/dist/runtime/components/table/schema.d.ts +3 -3
  145. package/dist/runtime/components/table/utils/shared.d.ts +1 -0
  146. package/dist/runtime/components/table/utils/shared.js +7 -13
  147. package/package.json +1 -1
  148. package/dist/preview/assets/index-7BE56IYF.js +0 -739
  149. package/dist/preview/assets/index-Bwv0Yz_L.js +0 -1
@@ -0,0 +1,223 @@
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.combobox-single";
6
+ export declare const compatibilityDate: "2026-06-14";
7
+ export declare const metadata: {
8
+ readonly name: "单选";
9
+ readonly icon: "fluent:chevron-down-20-regular";
10
+ readonly selection: true;
11
+ };
12
+ export declare function itemSchema(configure: (env: Environment) => void): Schema.Struct<{
13
+ id: Schema.refine<string, typeof Schema.String>;
14
+ label: Schema.TupleType<readonly [Schema.Struct<{
15
+ locale: Schema.Literal<["zh"]>;
16
+ message: Schema.SchemaClass<string, string, never>;
17
+ }>], [Schema.Struct<{
18
+ locale: Schema.Literal<["ja", "en", "ko"]>;
19
+ message: Schema.SchemaClass<string, string, never>;
20
+ }>]>;
21
+ value: Schema.Union<[Schema.Struct<{
22
+ kind: Schema.Literal<["text"]>;
23
+ value: typeof Schema.String;
24
+ }>, Schema.Struct<{
25
+ kind: Schema.Literal<["number"]>;
26
+ value: typeof Schema.Number;
27
+ }>]>;
28
+ tooltip: Schema.optional<Schema.refine<readonly [{
29
+ readonly locale: "zh";
30
+ readonly message: string;
31
+ }, ...{
32
+ readonly locale: "en" | "ja" | "ko";
33
+ readonly message: string;
34
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
35
+ locale: Schema.Literal<["zh"]>;
36
+ message: Schema.SchemaClass<string, string, never>;
37
+ }>], [Schema.Struct<{
38
+ locale: Schema.Literal<["ja", "en", "ko"]>;
39
+ message: Schema.SchemaClass<string, string, never>;
40
+ }>]>>>;
41
+ keywords: Schema.optional<Schema.Array$<typeof Schema.String>>;
42
+ }>;
43
+ export declare function remoteOptionsSchema(configure: (env: Environment) => void): Schema.Struct<{
44
+ kind: Schema.Literal<["remote"]>;
45
+ request: Schema.Schema<string, string, never>;
46
+ options: Schema.Schema<string, string, never>;
47
+ optionValue: Schema.optionalWith<Schema.Schema<string, string, never>, {
48
+ default: () => string;
49
+ }>;
50
+ optionLabel: Schema.Schema<string, string, never>;
51
+ optionKeywords: Schema.optional<Schema.Schema<string, string, never>>;
52
+ }>;
53
+ export declare function optionsSchema(configure: (env: Environment) => void): Schema.Union<[Schema.Struct<{
54
+ kind: Schema.Literal<["static"]>;
55
+ items: Schema.optionalWith<Schema.Array$<Schema.Struct<{
56
+ id: Schema.refine<string, typeof Schema.String>;
57
+ label: Schema.TupleType<readonly [Schema.Struct<{
58
+ locale: Schema.Literal<["zh"]>;
59
+ message: Schema.SchemaClass<string, string, never>;
60
+ }>], [Schema.Struct<{
61
+ locale: Schema.Literal<["ja", "en", "ko"]>;
62
+ message: Schema.SchemaClass<string, string, never>;
63
+ }>]>;
64
+ value: Schema.Union<[Schema.Struct<{
65
+ kind: Schema.Literal<["text"]>;
66
+ value: typeof Schema.String;
67
+ }>, Schema.Struct<{
68
+ kind: Schema.Literal<["number"]>;
69
+ value: typeof Schema.Number;
70
+ }>]>;
71
+ tooltip: Schema.optional<Schema.refine<readonly [{
72
+ readonly locale: "zh";
73
+ readonly message: string;
74
+ }, ...{
75
+ readonly locale: "en" | "ja" | "ko";
76
+ readonly message: string;
77
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
78
+ locale: Schema.Literal<["zh"]>;
79
+ message: Schema.SchemaClass<string, string, never>;
80
+ }>], [Schema.Struct<{
81
+ locale: Schema.Literal<["ja", "en", "ko"]>;
82
+ message: Schema.SchemaClass<string, string, never>;
83
+ }>]>>>;
84
+ keywords: Schema.optional<Schema.Array$<typeof Schema.String>>;
85
+ }>>, {
86
+ default: () => readonly [];
87
+ }>;
88
+ }>, Schema.Struct<{
89
+ kind: Schema.Literal<["remote"]>;
90
+ request: Schema.Schema<string, string, never>;
91
+ options: Schema.Schema<string, string, never>;
92
+ optionValue: Schema.optionalWith<Schema.Schema<string, string, never>, {
93
+ default: () => string;
94
+ }>;
95
+ optionLabel: Schema.Schema<string, string, never>;
96
+ optionKeywords: Schema.optional<Schema.Schema<string, string, never>>;
97
+ }>]>;
98
+ export declare function writeSchema(configure: (env: Environment) => void): Schema.Union<[Schema.Struct<{
99
+ kind: Schema.Literal<["binding"]>;
100
+ binding: Schema.SchemaClass<string, string, never>;
101
+ }>, Schema.Struct<{
102
+ kind: Schema.Literal<["remote"]>;
103
+ accessor: Schema.Schema<string, string, never>;
104
+ onChange: Schema.optional<Schema.Schema<string, string, never>>;
105
+ successMessage: Schema.optional<Schema.Schema<string, string, never>>;
106
+ triggers: Schema.optional<Schema.Array$<Schema.Struct<{
107
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
108
+ target: Schema.refine<string, typeof Schema.String>;
109
+ operation: Schema.SchemaClass<string, string, never>;
110
+ compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
111
+ params: Schema.optional<Schema.SchemaClass<unknown, unknown, never>>;
112
+ }>>>;
113
+ }>]>;
114
+ export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
115
+ title: Schema.TupleType<readonly [Schema.Struct<{
116
+ locale: Schema.Literal<["zh"]>;
117
+ message: Schema.SchemaClass<string, string, never>;
118
+ }>], [Schema.Struct<{
119
+ locale: Schema.Literal<["ja", "en", "ko"]>;
120
+ message: Schema.SchemaClass<string, string, never>;
121
+ }>]>;
122
+ placeholder: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
123
+ locale: Schema.Literal<["zh"]>;
124
+ message: Schema.SchemaClass<string, string, never>;
125
+ }>], [Schema.Struct<{
126
+ locale: Schema.Literal<["ja", "en", "ko"]>;
127
+ message: Schema.SchemaClass<string, string, never>;
128
+ }>]>>;
129
+ hidden: Schema.optional<Schema.Schema<string, string, never>>;
130
+ disabled: Schema.optional<Schema.Schema<string, string, never>>;
131
+ readonly: Schema.optional<Schema.Schema<string, string, never>>;
132
+ enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
133
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
134
+ size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
135
+ grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
136
+ tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
137
+ locale: Schema.Literal<["zh"]>;
138
+ message: Schema.SchemaClass<string, string, never>;
139
+ }>], [Schema.Struct<{
140
+ locale: Schema.Literal<["ja", "en", "ko"]>;
141
+ message: Schema.SchemaClass<string, string, never>;
142
+ }>]>>;
143
+ options: Schema.optionalWith<Schema.Union<[Schema.Struct<{
144
+ kind: Schema.Literal<["static"]>;
145
+ items: Schema.optionalWith<Schema.Array$<Schema.Struct<{
146
+ id: Schema.refine<string, typeof Schema.String>;
147
+ label: Schema.TupleType<readonly [Schema.Struct<{
148
+ locale: Schema.Literal<["zh"]>;
149
+ message: Schema.SchemaClass<string, string, never>;
150
+ }>], [Schema.Struct<{
151
+ locale: Schema.Literal<["ja", "en", "ko"]>;
152
+ message: Schema.SchemaClass<string, string, never>;
153
+ }>]>;
154
+ value: Schema.Union<[Schema.Struct<{
155
+ kind: Schema.Literal<["text"]>;
156
+ value: typeof Schema.String;
157
+ }>, Schema.Struct<{
158
+ kind: Schema.Literal<["number"]>;
159
+ value: typeof Schema.Number;
160
+ }>]>;
161
+ tooltip: Schema.optional<Schema.refine<readonly [{
162
+ readonly locale: "zh";
163
+ readonly message: string;
164
+ }, ...{
165
+ readonly locale: "en" | "ja" | "ko";
166
+ readonly message: string;
167
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
168
+ locale: Schema.Literal<["zh"]>;
169
+ message: Schema.SchemaClass<string, string, never>;
170
+ }>], [Schema.Struct<{
171
+ locale: Schema.Literal<["ja", "en", "ko"]>;
172
+ message: Schema.SchemaClass<string, string, never>;
173
+ }>]>>>;
174
+ keywords: Schema.optional<Schema.Array$<typeof Schema.String>>;
175
+ }>>, {
176
+ default: () => readonly [];
177
+ }>;
178
+ }>, Schema.Struct<{
179
+ kind: Schema.Literal<["remote"]>;
180
+ request: Schema.Schema<string, string, never>;
181
+ options: Schema.Schema<string, string, never>;
182
+ optionValue: Schema.optionalWith<Schema.Schema<string, string, never>, {
183
+ default: () => string;
184
+ }>;
185
+ optionLabel: Schema.Schema<string, string, never>;
186
+ optionKeywords: Schema.optional<Schema.Schema<string, string, never>>;
187
+ }>]>, {
188
+ default: () => {
189
+ kind: "static";
190
+ items: readonly [];
191
+ };
192
+ }>;
193
+ write: Schema.optionalWith<Schema.Union<[Schema.Struct<{
194
+ kind: Schema.Literal<["binding"]>;
195
+ binding: Schema.SchemaClass<string, string, never>;
196
+ }>, Schema.Struct<{
197
+ kind: Schema.Literal<["remote"]>;
198
+ accessor: Schema.Schema<string, string, never>;
199
+ onChange: Schema.optional<Schema.Schema<string, string, never>>;
200
+ successMessage: Schema.optional<Schema.Schema<string, string, never>>;
201
+ triggers: Schema.optional<Schema.Array$<Schema.Struct<{
202
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
203
+ target: Schema.refine<string, typeof Schema.String>;
204
+ operation: Schema.SchemaClass<string, string, never>;
205
+ compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
206
+ params: Schema.optional<Schema.SchemaClass<unknown, unknown, never>>;
207
+ }>>>;
208
+ }>]>, {
209
+ default: () => {
210
+ kind: "binding";
211
+ binding: string;
212
+ };
213
+ }>;
214
+ id: Schema.refine<string, typeof Schema.String>;
215
+ groupId: Schema.optional<typeof Schema.UUID>;
216
+ type: Schema.Literal<["com.shwfed.table.column.combobox-single"]>;
217
+ compatibilityDate: Schema.Literal<["2026-06-14"]>;
218
+ }>;
219
+ export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
220
+ export declare function defaults(): Partial<Value>;
221
+ export declare const migrateFrom: ReadonlyArray<MigrateSource>;
222
+ export declare const migrate: MigrateFn;
223
+ export declare function toColumnDef(value: Value, { getLocaleText, $cel, inheritedContext }: ColumnDefDeps): Partial<ColumnDef<unknown, unknown>>;
@@ -0,0 +1,276 @@
1
+ import { Effect, Schema } from "effect";
2
+ import { getProperty } from "dot-prop";
3
+ import { Expression, HttpRequestResult } from "../../../../../share/expression.js";
4
+ import { Locale } from "../../../../../share/locale.js";
5
+ import { Triggers } from "../../../../../share/event-bus.js";
6
+ import {
7
+ CelRowAccess,
8
+ columnFields,
9
+ columnIdentityFields,
10
+ editableHeader,
11
+ LocaleMarkdownWithRow,
12
+ registerRowVariablesIfAbsent
13
+ } from "../../../utils/shared.js";
14
+ import { localeLabelToExpression } from "../combobox-migrate.js";
15
+ export const type = "com.shwfed.table.column.combobox-single";
16
+ export const compatibilityDate = "2026-06-14";
17
+ export const metadata = {
18
+ name: "\u5355\u9009",
19
+ icon: "fluent:chevron-down-20-regular",
20
+ // Publishes its resolved option (the source record) to the per-row
21
+ // `selections` registry (runtime.vue), readable via `selections["<id>"]`.
22
+ selection: true
23
+ };
24
+ const isListType = (actual) => actual === "dyn" || actual.startsWith("list");
25
+ const isKeywordsType = (actual) => actual === "dyn" || actual.startsWith("list") || actual.startsWith("optional");
26
+ export function itemSchema(configure) {
27
+ const LocaleMd = LocaleMarkdownWithRow(configure);
28
+ const TextValue = Schema.Struct({
29
+ kind: Schema.Literal("text"),
30
+ value: Schema.String
31
+ });
32
+ const NumberValue = Schema.Struct({
33
+ kind: Schema.Literal("number"),
34
+ value: Schema.Number
35
+ });
36
+ const ItemValue = Schema.Union(TextValue, NumberValue).annotations({
37
+ title: "\u503C",
38
+ description: "\u9009\u9879\u7ED1\u5B9A\u7684\u503C\uFF0C\u53EF\u4EE5\u662F\u6587\u672C\u6216\u6570\u5B57"
39
+ });
40
+ return Schema.Struct({
41
+ id: Schema.UUID.annotations({ description: "\u9009\u9879\u552F\u4E00\u6807\u8BC6\uFF0C\u7528\u4E8E\u7A33\u5B9A\u7684 v-for key" }),
42
+ label: Locale.annotations({
43
+ title: "\u6807\u7B7E",
44
+ description: "\u9009\u9879\u5C55\u793A\u7684\u672C\u5730\u5316\u7EAF\u6587\u672C\uFF08\u4E0D\u652F\u6301 Markdown \u6216\u63D2\u503C\uFF09"
45
+ }),
46
+ value: ItemValue,
47
+ tooltip: Schema.optional(LocaleMd.annotations({
48
+ title: "\u63D0\u793A",
49
+ description: "\u9F20\u6807\u60AC\u505C\u5728\u9009\u9879\u4E0A\u65F6\u5C55\u793A\u7684\u672C\u5730\u5316\u63D0\u793A\uFF0C\u652F\u6301 Markdown"
50
+ })),
51
+ keywords: Schema.optional(Schema.Array(Schema.String).annotations({
52
+ title: "\u5173\u952E\u8BCD",
53
+ description: "\u9664\u6807\u7B7E\u5916\u53EF\u53C2\u4E0E\u641C\u7D22\u5339\u914D\u7684\u989D\u5916\u5173\u952E\u8BCD\uFF1B\u7528\u4E8E\u8BA9\u9009\u9879\u547D\u4E2D\u6807\u7B7E\u672A\u5C55\u793A\u7684\u522B\u540D / \u4EE3\u53F7"
54
+ }))
55
+ }).annotations({
56
+ title: "ComboboxSingleItem"
57
+ });
58
+ }
59
+ export function remoteOptionsSchema(configure) {
60
+ const CelRequest = Expression({
61
+ configure: (env) => {
62
+ configure(env);
63
+ registerRowVariablesIfAbsent(env);
64
+ },
65
+ resultType: HttpRequestResult
66
+ });
67
+ const CelOptions = Expression({
68
+ configure: (env) => {
69
+ configure(env);
70
+ registerRowVariablesIfAbsent(env);
71
+ env.registerVariable("json", "dyn", { description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u8BF7\u6C42\u5931\u8D25\u6216\u5C1A\u672A\u5B8C\u6210\u65F6\u4E3A `null`" });
72
+ },
73
+ resultType: isListType
74
+ });
75
+ const CelOptionValue = Expression({
76
+ configure: (env) => {
77
+ configure(env);
78
+ registerRowVariablesIfAbsent(env);
79
+ env.registerVariable("option", "dyn", { description: "`\u9009\u9879` \u8868\u8FBE\u5F0F\u4EA7\u51FA\u7684\u6570\u7EC4\u4E2D\u8FED\u4EE3\u5230\u7684\u5355\u4E2A\u5143\u7D20" });
80
+ },
81
+ resultType: "dyn"
82
+ });
83
+ const CelOptionLabel = Expression({
84
+ configure: (env) => {
85
+ configure(env);
86
+ registerRowVariablesIfAbsent(env);
87
+ env.registerVariable("option", "dyn", { description: "`\u9009\u9879` \u8868\u8FBE\u5F0F\u4EA7\u51FA\u7684\u6570\u7EC4\u4E2D\u8FED\u4EE3\u5230\u7684\u5355\u4E2A\u5143\u7D20" });
88
+ },
89
+ resultType: "dyn"
90
+ });
91
+ const CelOptionKeywords = Expression({
92
+ configure: (env) => {
93
+ configure(env);
94
+ registerRowVariablesIfAbsent(env);
95
+ env.registerVariable("option", "dyn", { description: "`\u9009\u9879` \u8868\u8FBE\u5F0F\u4EA7\u51FA\u7684\u6570\u7EC4\u4E2D\u8FED\u4EE3\u5230\u7684\u5355\u4E2A\u5143\u7D20" });
96
+ },
97
+ resultType: isKeywordsType
98
+ });
99
+ return Schema.Struct({
100
+ kind: Schema.Literal("remote"),
101
+ request: CelRequest.annotations({
102
+ title: "\u8BF7\u6C42",
103
+ description: "\u8FD4\u56DE `HttpRequest` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u53EF\u8BBF\u95EE `row` \u4E0E `index`\u3002\u76F8\u540C\u7B7E\u540D\u7684\u8BF7\u6C42\u4F1A\u5728\u8BE5\u8868\u683C\u5185\u81EA\u52A8\u53BB\u91CD"
104
+ }),
105
+ options: CelOptions.annotations({
106
+ title: "\u9009\u9879",
107
+ description: "\u4ECE HTTP \u54CD\u5E94\u4F53\u63D0\u53D6\u9009\u9879\u6570\u7EC4\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u53EF\u8BBF\u95EE `row`\u3001`index` \u4E0E `json`\u3002\u4F8B\uFF1A`json.data`"
108
+ }),
109
+ optionValue: Schema.optionalWith(CelOptionValue.annotations({
110
+ title: "\u9009\u9879\u503C",
111
+ description: "\u4ECE\u5F53\u524D `option` \u63D0\u53D6\u5199\u5165\u503C\u7684 CEL\uFF1B\u4F8B\uFF1A`option.value`"
112
+ }), { default: () => "option" }),
113
+ optionLabel: CelOptionLabel.annotations({
114
+ title: "\u9009\u9879\u6807\u7B7E",
115
+ description: '\u8FD4\u56DE\u9009\u9879\u5C55\u793A\u6587\u672C\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `row`\u3001`index` \u4E0E `option`\uFF1B\u4F8B\uFF1A`option.name` \u6216 `string(option.code) + " - " + option.name`'
116
+ }),
117
+ optionKeywords: Schema.optional(CelOptionKeywords.annotations({
118
+ title: "\u5173\u952E\u8BCD",
119
+ description: "\u4ECE\u5F53\u524D `option` \u63D0\u53D6\u989D\u5916\u641C\u7D22\u5173\u952E\u8BCD\u7684 CEL\uFF0C\u8FD4\u56DE\u5B57\u7B26\u4E32\u5217\u8868\uFF1B\u7528\u4E8E\u8BA9\u9009\u9879\u547D\u4E2D\u6807\u7B7E\u672A\u5C55\u793A\u7684\u522B\u540D / \u4EE3\u53F7\u3002\u4F8B\uFF1A`option.aliases`"
120
+ }))
121
+ }).annotations({ title: "ComboboxSingleOptionsRemote", description: "\u8FDC\u7A0B\u52A0\u8F7D\u7684\u9009\u9879\u5217\u8868" });
122
+ }
123
+ export function optionsSchema(configure) {
124
+ const Item = itemSchema(configure);
125
+ const StaticSpec = Schema.Struct({
126
+ kind: Schema.Literal("static"),
127
+ items: Schema.optionalWith(Schema.Array(Item).annotations({
128
+ title: "\u9009\u9879",
129
+ description: "\u4E0B\u62C9\u6846\u53EF\u9009\u9879\u5217\u8868"
130
+ }), { default: () => [] })
131
+ }).annotations({ title: "ComboboxSingleOptionsStatic", description: "\u9759\u6001\u914D\u7F6E\u7684\u9009\u9879\u5217\u8868" });
132
+ const RemoteSpec = remoteOptionsSchema(configure);
133
+ return Schema.Union(StaticSpec, RemoteSpec).annotations({
134
+ title: "\u9009\u9879\u6765\u6E90",
135
+ description: '\u9009\u9879\u53EF\u4EE5\u662F\u9759\u6001\u914D\u7F6E\uFF08`kind: "static"`\uFF09\u6216\u7531\u8FDC\u7A0B\u63A5\u53E3\u52A0\u8F7D\uFF08`kind: "remote"`\uFF09'
136
+ });
137
+ }
138
+ export function writeSchema(configure) {
139
+ const CelOnChange = Expression({
140
+ configure: (env) => {
141
+ configure(env);
142
+ registerRowVariablesIfAbsent(env);
143
+ env.registerVariable("value", "dyn", { description: "\u7528\u6237\u9009\u4E2D\u7684\u65B0\u503C\uFF08\u4E0E\u6240\u9009\u9879\u7684 `value` \u4E00\u81F4\uFF1B\u6E05\u7A7A\u65F6\u4E3A `null`\uFF09" });
144
+ },
145
+ resultType: "HttpRequest"
146
+ });
147
+ const CelMessage = Expression({
148
+ configure: (env) => {
149
+ configure(env);
150
+ env.registerVariable("json", "dyn", { description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09" });
151
+ },
152
+ resultType: "string"
153
+ });
154
+ const WriteBinding = Schema.Struct({
155
+ kind: Schema.Literal("binding"),
156
+ binding: Schema.String.annotations({ title: "\u7ED1\u5B9A\u8DEF\u5F84", description: "\u5355\u5143\u683C\u8BFB\u5199\u7684 dot-prop \u8DEF\u5F84\uFF0C\u4F8B\u5982 `name` \u6216 `address.city`\uFF1B\u5199\u5165\u5373\u8986\u76D6\u8BE5\u8DEF\u5F84\u4E0A\u7684\u503C" })
157
+ }).annotations({ title: "ComboboxSingleWriteBinding", description: "\u884C\u5185\u53EF\u7F16\u8F91\uFF1A\u8BFB\u5199\u540C\u4E00 dot-prop \u8DEF\u5F84" });
158
+ const WriteRemote = Schema.Struct({
159
+ kind: Schema.Literal("remote"),
160
+ accessor: CelRowAccess(configure).annotations({ title: "\u8DEF\u5F84", description: "\u884C\u6570\u636E\u8BBF\u95EE CEL \u8868\u8FBE\u5F0F\uFF0C\u4F8B\u5982 `row.user.name`\uFF1B\u4F5C\u4E3A\u53EA\u8BFB\u56DE\u663E\u503C" }),
161
+ onChange: Schema.optional(CelOnChange.annotations({ title: "\u5207\u6362\u8BF7\u6C42", description: "\u7528\u6237\u9009\u62E9\u540E\u7ACB\u5373\u53D1\u8D77\u7684 HTTP \u8BF7\u6C42\uFF1B`value` \u4E3A\u65B0\u503C" })),
162
+ successMessage: Schema.optional(CelMessage.annotations({ title: "\u6210\u529F\u6D88\u606F", description: "\u8BF7\u6C42\u6210\u529F\u540E\u5F39\u51FA\u7684 toast\uFF1B\u672A\u914D\u7F6E\u5219\u9759\u9ED8" })),
163
+ triggers: Schema.optional(Triggers.annotations({ title: "\u6210\u529F\u540E\u89E6\u53D1", description: "\u8BF7\u6C42\u6210\u529F\u540E\u5192\u6CE1\u7684\u64CD\u4F5C" }))
164
+ }).annotations({ title: "ComboboxSingleWriteRemote", description: "\u670D\u52A1\u7AEF\u5199\u5165\uFF1A\u53EA\u8BFB\u56DE\u663E + \u5207\u6362\u8BF7\u6C42" });
165
+ return Schema.Union(WriteBinding, WriteRemote).annotations({
166
+ title: "\u5199\u5165\u65B9\u5F0F",
167
+ description: '`kind: "binding"` \u884C\u5185\u7F16\u8F91\u5199\u56DE dot-prop \u8DEF\u5F84\uFF1B`kind: "remote"` \u53EA\u8BFB\u56DE\u663E\u5E76\u901A\u8FC7\u8BF7\u6C42\u5199\u5165\u670D\u52A1\u7AEF'
168
+ });
169
+ }
170
+ export function schema(configure) {
171
+ const CelBool = CelRowAccess(configure, { resultType: "bool" });
172
+ const Options = optionsSchema(configure);
173
+ const Write = writeSchema(configure);
174
+ const display = columnFields(configure);
175
+ return Schema.Struct({
176
+ type: Schema.Literal(type),
177
+ compatibilityDate: Schema.Literal(compatibilityDate),
178
+ ...columnIdentityFields(),
179
+ title: display.title,
180
+ placeholder: Schema.optional(Locale.annotations({
181
+ title: "\u5360\u4F4D\u7B26",
182
+ description: "\u672A\u9009\u4E2D\u4EFB\u4F55\u9009\u9879\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
183
+ })),
184
+ hidden: Schema.optional(CelBool.annotations({
185
+ title: "\u9690\u85CF\u6761\u4EF6",
186
+ description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u4E0B\u62C9\u6846\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
187
+ })),
188
+ disabled: Schema.optional(CelBool.annotations({
189
+ title: "\u7981\u7528\u6761\u4EF6",
190
+ description: "\u8FD4\u56DE `true` \u65F6\u4E0B\u62C9\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u9009\u62E9"
191
+ })),
192
+ readonly: Schema.optional(CelBool.annotations({
193
+ title: "\u53EA\u8BFB\u6761\u4EF6",
194
+ description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u9009\u9879\u7684\u6807\u7B7E"
195
+ })),
196
+ enableSorting: display.enableSorting,
197
+ sortKey: display.sortKey,
198
+ size: display.size,
199
+ grow: display.grow,
200
+ tooltip: display.tooltip,
201
+ options: Schema.optionalWith(Options, {
202
+ default: () => ({ kind: "static", items: [] })
203
+ }),
204
+ write: Schema.optionalWith(Write, {
205
+ default: () => ({ kind: "binding", binding: "" })
206
+ })
207
+ }).annotations({
208
+ title: "ComboboxSingleRenderer",
209
+ description: "\u4E0B\u62C9\u5355\u9009\u6E32\u67D3\u5668"
210
+ });
211
+ }
212
+ export function defaults() {
213
+ return {
214
+ title: [{ locale: "zh", message: "" }],
215
+ size: 200,
216
+ write: { kind: "binding", binding: "" },
217
+ options: { kind: "static", items: [] }
218
+ };
219
+ }
220
+ export const migrateFrom = [
221
+ { type: "com.shwfed.table.column.combobox-single", compatibilityDate: "2026-05-28" }
222
+ ];
223
+ export const migrate = (prev) => Effect.try({
224
+ try: () => {
225
+ if (!prev || typeof prev !== "object") {
226
+ throw new Error("\u4E0B\u62C9\u5355\u9009\u8FC1\u79FB\u5931\u8D25\uFF1A\u539F\u503C\u4E0D\u662F\u5BF9\u8C61");
227
+ }
228
+ const src = prev;
229
+ const srcType = src.type;
230
+ const srcDate = src.compatibilityDate;
231
+ if (srcType === "com.shwfed.table.column.combobox-single" && srcDate === "2026-05-28") {
232
+ const { options, type: _t, compatibilityDate: _c, ...rest } = src;
233
+ let nextOptions = options;
234
+ if (options && typeof options === "object") {
235
+ const opts = options;
236
+ if (opts.kind === "remote") {
237
+ const { optionLabel, ...remoteRest } = opts;
238
+ nextOptions = { ...remoteRest, optionLabel: localeLabelToExpression(optionLabel) };
239
+ }
240
+ }
241
+ return {
242
+ ...rest,
243
+ type,
244
+ compatibilityDate,
245
+ options: nextOptions
246
+ };
247
+ }
248
+ throw new Error(`\u4E0B\u62C9\u5355\u9009\u8FC1\u79FB\u5931\u8D25\uFF1A\u672A\u8BC6\u522B\u7684\u6765\u6E90 ${String(srcType)}@${String(srcDate)}`);
249
+ },
250
+ catch: (e) => e instanceof Error ? e : new Error(String(e))
251
+ });
252
+ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
253
+ const write = value.write;
254
+ const accessorFn = write.kind === "binding" ? (row) => {
255
+ if (!row || typeof row !== "object") return void 0;
256
+ return getProperty(row, write.binding);
257
+ } : (row, index) => {
258
+ try {
259
+ return Effect.runSync($cel(write.accessor, { ...inheritedContext, row, index }));
260
+ } catch (e) {
261
+ console.error("[shwfed-table] combobox-single accessor failed", e);
262
+ return void 0;
263
+ }
264
+ };
265
+ return {
266
+ header: editableHeader(getLocaleText(value.title)),
267
+ accessorFn,
268
+ enableSorting: value.enableSorting ?? false,
269
+ sortingFn: "basic",
270
+ size: value.size,
271
+ meta: {
272
+ grow: value.grow ?? false,
273
+ tooltip: getLocaleText(value.tooltip)
274
+ }
275
+ };
276
+ }
@@ -0,0 +1,123 @@
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-multi";
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 cascade: "independent" | "cascade-down" | "cascade-both";
49
+ readonly sortKey?: string | undefined;
50
+ readonly nodeKey: string;
51
+ readonly nodeChildren: string;
52
+ readonly nodeLabel: string;
53
+ readonly nodeTooltip?: readonly [{
54
+ readonly locale: "zh";
55
+ readonly message: string;
56
+ }, ...{
57
+ readonly locale: "en" | "ja" | "ko";
58
+ readonly message: string;
59
+ }[]] | undefined;
60
+ readonly nodeSelectable?: string | undefined;
61
+ readonly expandAll: boolean;
62
+ }) => any;
63
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
64
+ "onUpdate:modelValue"?: ((value: {
65
+ readonly size?: number | undefined;
66
+ readonly disabled?: string | undefined;
67
+ readonly type: "com.shwfed.table.column.tree-combobox-multi";
68
+ readonly id: string;
69
+ readonly title: readonly [{
70
+ readonly locale: "zh";
71
+ readonly message: string;
72
+ }, ...{
73
+ readonly locale: "en" | "ja" | "ko";
74
+ readonly message: string;
75
+ }[]];
76
+ readonly hidden?: string | undefined;
77
+ readonly tooltip?: readonly [{
78
+ readonly locale: "zh";
79
+ readonly message: string;
80
+ }, ...{
81
+ readonly locale: "en" | "ja" | "ko";
82
+ readonly message: string;
83
+ }[]] | undefined;
84
+ readonly compatibilityDate: "2026-06-14";
85
+ readonly groupId?: string | undefined;
86
+ readonly placeholder?: readonly [{
87
+ readonly locale: "zh";
88
+ readonly message: string;
89
+ }, ...{
90
+ readonly locale: "en" | "ja" | "ko";
91
+ readonly message: string;
92
+ }[]] | undefined;
93
+ readonly keywords?: string | undefined;
94
+ readonly readonly?: string | undefined;
95
+ readonly dataSource: {
96
+ readonly data: string;
97
+ readonly request?: string | undefined;
98
+ };
99
+ readonly grow?: boolean | undefined;
100
+ readonly binding: string;
101
+ readonly derived?: {
102
+ readonly mode: "formula" | "prefill";
103
+ readonly expression: string;
104
+ } | undefined;
105
+ readonly enableSorting?: boolean | undefined;
106
+ readonly cascade: "independent" | "cascade-down" | "cascade-both";
107
+ readonly sortKey?: string | undefined;
108
+ readonly nodeKey: string;
109
+ readonly nodeChildren: string;
110
+ readonly nodeLabel: string;
111
+ readonly nodeTooltip?: readonly [{
112
+ readonly locale: "zh";
113
+ readonly message: string;
114
+ }, ...{
115
+ readonly locale: "en" | "ja" | "ko";
116
+ readonly message: string;
117
+ }[]] | undefined;
118
+ readonly nodeSelectable?: string | undefined;
119
+ readonly expandAll: boolean;
120
+ }) => any) | undefined;
121
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
122
+ declare const _default: typeof __VLS_export;
123
+ export default _default;