@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,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;
@@ -0,0 +1,9 @@
1
+ import type { CellContext } from '@tanstack/vue-table';
2
+ import type { Value } from './schema.js';
3
+ type __VLS_Props = {
4
+ column: Value;
5
+ ctx: CellContext<unknown, unknown>;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,500 @@
1
+ <script setup>
2
+ import { Icon } from "@iconify/vue";
3
+ import { Effect, Fiber, Option } from "effect";
4
+ import { computed, ref, shallowRef, watch } from "vue";
5
+ import { useI18n } from "vue-i18n";
6
+ import { cel as _rawCel } from "../../../../../utils/cel";
7
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
8
+ import { useFormReadonly } from "../../../../form/utils/readonly";
9
+ import { publishSelection } from "../../../../../utils/selections-registry";
10
+ import { getLocalizedText } from "../../../../../share/locale";
11
+ import { fetchJsonOption } from "../../../../../share/request";
12
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
13
+ import { Markdown } from "../../../../ui/markdown";
14
+ import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
15
+ import { Skeleton } from "../../../../ui/skeleton";
16
+ import { Tree as UiTree } from "../../../../ui/tree";
17
+ import { useFormState } from "../../../../form/utils/state";
18
+ import { interpolateMarkdown } from "../../../utils/runtime";
19
+ import { useSharedFetchLayer } from "../../../utils/shared-fetch";
20
+ import {
21
+ findWrappedPath,
22
+ getWrappedChildren,
23
+ wrapStructuralAll
24
+ } from "../tree-combobox-shared";
25
+ defineOptions({ name: "ShwfedTableTreeComboboxMultiRendererRuntime" });
26
+ const props = defineProps({
27
+ column: { type: null, required: true },
28
+ ctx: { type: Object, required: true }
29
+ });
30
+ const { locale, t } = useI18n({
31
+ inheritLocale: true,
32
+ messages: {
33
+ zh: {
34
+ "tree-combobox-multi-placeholder": "\u8BF7\u9009\u62E9",
35
+ "tree-combobox-multi-search-placeholder": "\u641C\u7D22\u2026",
36
+ "tree-combobox-multi-empty": "\u65E0\u53EF\u9009\u9879",
37
+ "tree-combobox-multi-load-error": "\u52A0\u8F7D\u5931\u8D25",
38
+ "tree-combobox-multi-retry": "\u91CD\u8BD5"
39
+ },
40
+ en: {
41
+ "tree-combobox-multi-placeholder": "Select\u2026",
42
+ "tree-combobox-multi-search-placeholder": "Search\u2026",
43
+ "tree-combobox-multi-empty": "No options",
44
+ "tree-combobox-multi-load-error": "Failed to load",
45
+ "tree-combobox-multi-retry": "Retry"
46
+ },
47
+ ja: {
48
+ "tree-combobox-multi-placeholder": "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
49
+ "tree-combobox-multi-search-placeholder": "\u691C\u7D22\u2026",
50
+ "tree-combobox-multi-empty": "\u9078\u629E\u80A2\u306A\u3057",
51
+ "tree-combobox-multi-load-error": "\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
52
+ "tree-combobox-multi-retry": "\u518D\u8A66\u884C"
53
+ }
54
+ }
55
+ });
56
+ const formState = useFormState();
57
+ const inherited = injectCELContext();
58
+ const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
59
+ const sharedFetchLayer = useSharedFetchLayer();
60
+ const row = computed(() => props.ctx.row.original);
61
+ const rowIndex = computed(() => props.ctx.row.index);
62
+ const placeholderText = computed(
63
+ () => props.column.placeholder ? getLocalizedText(props.column.placeholder, locale.value) : t("tree-combobox-multi-placeholder")
64
+ );
65
+ function evalBool(expression, label) {
66
+ if (!expression) return false;
67
+ try {
68
+ return Effect.runSync($cel(expression, { row: row.value, index: rowIndex.value })) === true;
69
+ } catch (e) {
70
+ console.error(`[shwfed-table] tree-combobox-multi ${label} failed`, e);
71
+ return false;
72
+ }
73
+ }
74
+ const isHidden = computed(() => evalBool(props.column.hidden, "hidden"));
75
+ const isDisabled = computed(() => evalBool(props.column.disabled, "disabled"));
76
+ const formReadonly = useFormReadonly();
77
+ const isReadonly = computed(
78
+ () => props.column.readonly != null ? evalBool(props.column.readonly, "readonly") : formReadonly.value
79
+ );
80
+ const effectiveReadonly = computed(
81
+ () => isReadonly.value || props.column.derived?.mode === "formula"
82
+ );
83
+ const committedKeys = computed(() => {
84
+ const raw = formState.getAt(props.column.binding);
85
+ return Array.isArray(raw) ? raw.map((v) => String(v)) : [];
86
+ });
87
+ function commit(next) {
88
+ formState.setAt(props.column.binding, next.map((v) => String(v)));
89
+ }
90
+ function nodeCtx(raw) {
91
+ return { row: row.value, index: rowIndex.value, node: raw };
92
+ }
93
+ function nodeKey(raw) {
94
+ try {
95
+ return String(Effect.runSync($cel(props.column.nodeKey, nodeCtx(raw))));
96
+ } catch (e) {
97
+ console.error("[shwfed-table] tree-combobox-multi nodeKey failed", e);
98
+ return "";
99
+ }
100
+ }
101
+ function nodeChildrenList(raw) {
102
+ let v;
103
+ try {
104
+ v = Effect.runSync($cel(props.column.nodeChildren, nodeCtx(raw)));
105
+ } catch (e) {
106
+ console.error("[shwfed-table] tree-combobox-multi nodeChildren failed", e);
107
+ return void 0;
108
+ }
109
+ if (v == null) return void 0;
110
+ if (!Array.isArray(v)) return void 0;
111
+ return v;
112
+ }
113
+ function safeInterpolate(tpl, raw) {
114
+ try {
115
+ return interpolateMarkdown(tpl, $cel, nodeCtx(raw));
116
+ } catch (e) {
117
+ console.error("[shwfed-table] tree-combobox-multi node interpolation failed", e);
118
+ return tpl;
119
+ }
120
+ }
121
+ function wrappedLabelText(w) {
122
+ try {
123
+ const raw = Effect.runSync($cel(props.column.nodeLabel, nodeCtx(w.raw)));
124
+ return raw == null ? "" : String(raw);
125
+ } catch (e) {
126
+ console.error("[shwfed-table] tree-combobox-multi nodeLabel failed", e);
127
+ return "";
128
+ }
129
+ }
130
+ function wrappedTooltipText(w) {
131
+ if (!props.column.nodeTooltip) return void 0;
132
+ const tpl = getLocalizedText(props.column.nodeTooltip, locale.value);
133
+ return tpl ? safeInterpolate(tpl, w.raw) : void 0;
134
+ }
135
+ function wrappedKeywords(w) {
136
+ const expr = props.column.keywords;
137
+ if (!expr) return [];
138
+ let v;
139
+ try {
140
+ v = Effect.runSync($cel(expr, nodeCtx(w.raw)));
141
+ } catch (e) {
142
+ console.error("[shwfed-table] tree-combobox-multi keywords failed", e);
143
+ return [];
144
+ }
145
+ if (!Array.isArray(v)) return [];
146
+ return v.filter((k) => k != null).map((k) => String(k).trim().toLowerCase()).filter((k) => k.length > 0);
147
+ }
148
+ function wrappedSelectable(w, _depth) {
149
+ if (isDisabled.value) return false;
150
+ const expr = props.column.nodeSelectable;
151
+ if (!expr) return true;
152
+ try {
153
+ return Effect.runSync($cel(expr, nodeCtx(w.raw)));
154
+ } catch {
155
+ return false;
156
+ }
157
+ }
158
+ const rawRoots = shallowRef([]);
159
+ const loading = ref(false);
160
+ const fetchError = ref(null);
161
+ async function fetchTree() {
162
+ const dataSource = props.column.dataSource;
163
+ if (!dataSource) {
164
+ rawRoots.value = [];
165
+ return;
166
+ }
167
+ const effect = Effect.gen(function* () {
168
+ let jsonOpt = Option.none();
169
+ if (dataSource.request) {
170
+ jsonOpt = yield* fetchJsonOption(yield* $cel(dataSource.request, {
171
+ row: row.value,
172
+ index: rowIndex.value
173
+ }));
174
+ }
175
+ const dataRaw = yield* $cel(dataSource.data, {
176
+ row: row.value,
177
+ index: rowIndex.value,
178
+ json: jsonOpt
179
+ });
180
+ return Array.isArray(dataRaw) ? dataRaw : [];
181
+ });
182
+ const program = Effect.gen(function* () {
183
+ const showMaskFiber = yield* Effect.fork(
184
+ Effect.sync(() => {
185
+ loading.value = true;
186
+ }).pipe(Effect.delay("30 millis"))
187
+ );
188
+ return yield* Effect.ensuring(effect, Fiber.interrupt(showMaskFiber));
189
+ }).pipe(
190
+ Effect.ensuring(Effect.sync(() => {
191
+ loading.value = false;
192
+ }))
193
+ );
194
+ try {
195
+ const result = await Effect.runPromise(Effect.provide(program, sharedFetchLayer));
196
+ rawRoots.value = result;
197
+ fetchError.value = null;
198
+ } catch (e) {
199
+ console.warn("[shwfed-table] tree-combobox-multi dataSource fetch failed", e);
200
+ fetchError.value = e;
201
+ }
202
+ }
203
+ watch(
204
+ () => [props.column.dataSource?.request, props.column.dataSource?.data],
205
+ () => {
206
+ void fetchTree();
207
+ },
208
+ { immediate: true }
209
+ );
210
+ const roots = computed(
211
+ () => wrapStructuralAll(rawRoots.value, {
212
+ nodeKey,
213
+ nodeChildren: nodeChildrenList
214
+ })
215
+ );
216
+ const selectedLeaves = computed(
217
+ () => committedKeys.value.map((k) => {
218
+ const path = findWrappedPath(roots.value, k);
219
+ if (!path || path.length === 0) return void 0;
220
+ return path[path.length - 1];
221
+ }).filter((node) => node !== void 0)
222
+ );
223
+ publishSelection(
224
+ props.column.id,
225
+ () => selectedLeaves.value.length > 0 ? selectedLeaves.value : void 0,
226
+ {
227
+ identity: (list) => list.map((w) => w.key).join(" "),
228
+ raw: (list) => list.map((w) => w.raw)
229
+ }
230
+ );
231
+ const pendingKeys = ref(null);
232
+ const open = ref(false);
233
+ watch(open, (next, prev) => {
234
+ if (!prev && next) {
235
+ pendingKeys.value = [...committedKeys.value];
236
+ return;
237
+ }
238
+ if (prev && !next && pendingKeys.value !== null) {
239
+ commit(pendingKeys.value);
240
+ pendingKeys.value = null;
241
+ }
242
+ });
243
+ const displayKeys = computed(
244
+ () => pendingKeys.value ?? committedKeys.value
245
+ );
246
+ function handleUpdate(next) {
247
+ const arr = Array.isArray(next) ? next : [];
248
+ pendingKeys.value = arr;
249
+ }
250
+ function labelForKey(k) {
251
+ const path = findWrappedPath(roots.value, k);
252
+ if (!path || path.length === 0) return null;
253
+ const leaf = path[path.length - 1];
254
+ return wrappedLabelText(leaf);
255
+ }
256
+ const triggerLabel = computed(() => {
257
+ const arr = displayKeys.value;
258
+ if (arr.length === 0) return "";
259
+ const head = labelForKey(arr[0]);
260
+ if (head === null || head.length === 0) return "";
261
+ if (arr.length === 1) return head;
262
+ return `${head} +${arr.length - 1}`;
263
+ });
264
+ const readonlyLabel = computed(() => {
265
+ const labels = committedKeys.value.map((k) => labelForKey(k)).filter((l) => l != null && l.length > 0);
266
+ if (labels.length === 0) return "";
267
+ try {
268
+ return new Intl.ListFormat(locale.value, { type: "conjunction", style: "narrow" }).format(labels);
269
+ } catch {
270
+ return labels.join("\u3001");
271
+ }
272
+ });
273
+ const initialExpanded = computed(() => {
274
+ if (!props.column.expandAll) return [];
275
+ const out = [];
276
+ const stack = [...roots.value];
277
+ while (stack.length) {
278
+ const n = stack.pop();
279
+ if (n.kind === "branch") {
280
+ out.push(n.key);
281
+ stack.push(...n.children);
282
+ }
283
+ }
284
+ return out;
285
+ });
286
+ const filterQuery = ref("");
287
+ function filterPredicate(w, query) {
288
+ const q = query.trim().toLowerCase();
289
+ if (!q) return true;
290
+ if (wrappedLabelText(w).trim().toLowerCase().includes(q)) return true;
291
+ return wrappedKeywords(w).some((k) => k.includes(q));
292
+ }
293
+ const showClear = computed(
294
+ () => !isDisabled.value && !loading.value && displayKeys.value.length > 0
295
+ );
296
+ function handleClear() {
297
+ pendingKeys.value = null;
298
+ commit([]);
299
+ open.value = false;
300
+ }
301
+ const hoveredKey = ref(null);
302
+ watch(open, (isOpen) => {
303
+ if (!isOpen) hoveredKey.value = null;
304
+ });
305
+ function collectTooltipNodes(out, siblings) {
306
+ for (const n of siblings) {
307
+ if (wrappedTooltipText(n)) out.push(n.key);
308
+ if (n.kind === "branch") collectTooltipNodes(out, n.children);
309
+ }
310
+ }
311
+ const anyHasTooltip = computed(() => {
312
+ if (!props.column.nodeTooltip) return false;
313
+ const out = [];
314
+ collectTooltipNodes(out, roots.value);
315
+ return out.length > 0;
316
+ });
317
+ const hoveredTooltip = computed(() => {
318
+ const k = hoveredKey.value;
319
+ if (!k) return void 0;
320
+ const path = findWrappedPath(roots.value, k);
321
+ if (!path || path.length === 0) return void 0;
322
+ return wrappedTooltipText(path[path.length - 1]);
323
+ });
324
+ </script>
325
+
326
+ <template>
327
+ <div class="p-[0.125rem] w-full">
328
+ <span
329
+ v-if="isHidden"
330
+ class="block h-7 w-full"
331
+ />
332
+ <!--
333
+ Readonly empty state mirrors the `text` column exactly: a centered,
334
+ faded, non-selectable `-` in `font-mono`, so a readonly grid reads
335
+ uniformly regardless of column type. A resolved label keeps the
336
+ left-aligned dark text.
337
+ -->
338
+ <span
339
+ v-else-if="effectiveReadonly"
340
+ :class="[
341
+ 'flex items-center h-7 w-full px-2 text-[0.75rem] truncate',
342
+ readonlyLabel ? 'text-zinc-700' : 'justify-center font-mono text-zinc-300 select-none'
343
+ ]"
344
+ >
345
+ {{ readonlyLabel || "-" }}
346
+ </span>
347
+ <Popover
348
+ v-else
349
+ v-model:open="open"
350
+ >
351
+ <PopoverAnchor as-child>
352
+ <InputGroup
353
+ class="group/tree-combobox-multi h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180"
354
+ :data-disabled="isDisabled ? 'true' : void 0"
355
+ >
356
+ <PopoverTrigger as-child>
357
+ <InputGroupInput
358
+ :model-value="triggerLabel"
359
+ :disabled="isDisabled"
360
+ :placeholder="placeholderText"
361
+ class="h-7 text-[0.75rem] md:text-[0.75rem] px-2 cursor-pointer text-left"
362
+ readonly
363
+ />
364
+ </PopoverTrigger>
365
+ <InputGroupAddon
366
+ v-if="loading"
367
+ align="inline-end"
368
+ data-slot="tree-combobox-multi-loading"
369
+ class="text-zinc-400"
370
+ >
371
+ <Icon
372
+ icon="fluent:spinner-ios-20-regular"
373
+ class="size-3 animate-spin"
374
+ />
375
+ </InputGroupAddon>
376
+ <InputGroupAddon
377
+ v-else-if="showClear"
378
+ align="inline-end"
379
+ class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/tree-combobox-multi:opacity-100 focus-within:opacity-100"
380
+ >
381
+ <InputGroupButton
382
+ size="icon-xs"
383
+ data-slot="tree-combobox-multi-clear"
384
+ class="size-4 text-zinc-500 hover:text-zinc-700"
385
+ tabindex="-1"
386
+ @mousedown.prevent
387
+ @click.stop="handleClear"
388
+ >
389
+ <Icon
390
+ icon="fluent:dismiss-20-regular"
391
+ class="size-3"
392
+ />
393
+ </InputGroupButton>
394
+ </InputGroupAddon>
395
+ </InputGroup>
396
+ </PopoverAnchor>
397
+ <PopoverContent
398
+ class="p-0"
399
+ :style="{ width: 'var(--reka-popover-trigger-width)' }"
400
+ >
401
+ <div
402
+ data-slot="tree-combobox-multi-search"
403
+ class="flex h-7 items-center gap-2 border-b border-zinc-200 px-2"
404
+ >
405
+ <Icon
406
+ icon="fluent:search-20-filled"
407
+ class="size-3 shrink-0 opacity-50"
408
+ />
409
+ <input
410
+ v-model="filterQuery"
411
+ :disabled="isDisabled"
412
+ :placeholder="t('tree-combobox-multi-search-placeholder')"
413
+ class="flex h-7 w-full bg-transparent text-[0.75rem] outline-hidden placeholder:text-zinc-500 disabled:cursor-not-allowed disabled:opacity-50"
414
+ >
415
+ </div>
416
+ <div class="flex flex-col p-1">
417
+ <div
418
+ v-if="fetchError && roots.length === 0"
419
+ class="min-h-7 px-2 py-1 text-[0.75rem] text-red-500"
420
+ >
421
+ {{ t("tree-combobox-multi-load-error") }}
422
+ </div>
423
+ <div
424
+ v-else-if="loading && roots.length === 0"
425
+ class="flex flex-col gap-1 px-2 py-1"
426
+ aria-busy="true"
427
+ >
428
+ <Skeleton class="h-4 w-2/3" />
429
+ <Skeleton class="h-4 w-1/2" />
430
+ <Skeleton class="h-4 w-3/5" />
431
+ </div>
432
+
433
+ <UiTree
434
+ v-else
435
+ :roots="roots"
436
+ :get-key="(w) => w.key"
437
+ :get-children="getWrappedChildren"
438
+ selection-mode="multi"
439
+ :cascade="column.cascade ?? 'independent'"
440
+ :model-value="displayKeys"
441
+ :selectable="wrappedSelectable"
442
+ :filter-predicate="filterPredicate"
443
+ :filter-query="filterQuery"
444
+ :initial-expanded="initialExpanded"
445
+ :show-focused-row="false"
446
+ :class="isDisabled ? 'pointer-events-none opacity-60' : void 0"
447
+ class="max-h-72 overflow-y-auto"
448
+ @update:model-value="handleUpdate"
449
+ >
450
+ <template #node="{ node, selected }">
451
+ <span
452
+ class="flex flex-1 min-w-0 items-center justify-between gap-2"
453
+ @mouseenter="hoveredKey = node.key"
454
+ @focusin="hoveredKey = node.key"
455
+ >
456
+ <span class="min-w-0 truncate text-[0.75rem] text-zinc-700">{{ wrappedLabelText(node) }}</span>
457
+ <Icon
458
+ v-if="selected"
459
+ icon="fluent:checkmark-20-regular"
460
+ class="size-3 shrink-0 text-zinc-700"
461
+ />
462
+ </span>
463
+ </template>
464
+
465
+ <template #empty>
466
+ <div class="min-h-7 px-2 py-1 text-[0.75rem] text-zinc-400">
467
+ {{ t("tree-combobox-multi-empty") }}
468
+ </div>
469
+ </template>
470
+
471
+ <template #error="{ error, retry }">
472
+ <span class="inline-flex items-center gap-1 text-xs text-red-500">
473
+ {{ t("tree-combobox-multi-load-error") }}
474
+ <button
475
+ type="button"
476
+ class="underline hover:text-red-600"
477
+ @click.stop="retry"
478
+ >
479
+ {{ t("tree-combobox-multi-retry") }}
480
+ </button>
481
+ <span class="sr-only">{{ String(error) }}</span>
482
+ </span>
483
+ </template>
484
+ </UiTree>
485
+ </div>
486
+ <div
487
+ v-if="anyHasTooltip && hoveredTooltip"
488
+ data-slot="tree-combobox-multi-tooltip"
489
+ class="border-t border-zinc-200 px-2 py-1.5"
490
+ >
491
+ <Markdown
492
+ :source="hoveredTooltip"
493
+ block
494
+ class="prose prose-xs prose-zinc"
495
+ />
496
+ </div>
497
+ </PopoverContent>
498
+ </Popover>
499
+ </div>
500
+ </template>
@@ -0,0 +1,9 @@
1
+ import type { CellContext } from '@tanstack/vue-table';
2
+ import type { Value } from './schema.js';
3
+ type __VLS_Props = {
4
+ column: Value;
5
+ ctx: CellContext<unknown, unknown>;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;