@shwfed/config 2.10.12 → 2.11.1

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 (171) hide show
  1. package/dist/mcp.mjs +88 -54
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-BeqytPDr.js → FieldGroup.vue_vue_type_script_setup_true_lang-CosmpPSu.js} +1 -1
  4. package/dist/preview/assets/{badge-DkHwLDps.js → badge-BkYCxTFK.js} +1 -1
  5. package/dist/preview/assets/{config-Dx1SXsSf.js → config-74YmXQsH.js} +1 -1
  6. package/dist/preview/assets/{config-DbV3RlZz.js → config-B62b9dMF.js} +1 -1
  7. package/dist/preview/assets/{config-OPQWANCx.js → config-BHYlKhDX.js} +1 -1
  8. package/dist/preview/assets/{config-Cft-srKd.js → config-Bbbyd5lB.js} +1 -1
  9. package/dist/preview/assets/{config-Uw4cvZGX.js → config-BcZe-bR9.js} +1 -1
  10. package/dist/preview/assets/{config-DJQ2LOWo.js → config-Bt6--diX.js} +1 -1
  11. package/dist/preview/assets/{config-CVPVYMuh.js → config-COr2MFhN.js} +1 -1
  12. package/dist/preview/assets/{config-7KeAl8UU.js → config-CPsd0ppi.js} +1 -1
  13. package/dist/preview/assets/{config-DAZ2Uj6B.js → config-CYVafGLc.js} +1 -1
  14. package/dist/preview/assets/{config-DQVKd54J.js → config-C_Ia1CDq.js} +1 -1
  15. package/dist/preview/assets/{config-CZ1e9utV.js → config-Cbp7aAAw.js} +1 -1
  16. package/dist/preview/assets/{config-DCANpbtq.js → config-Dk9OegYx.js} +1 -1
  17. package/dist/preview/assets/{config-Cedm-E2H.js → config-Dt8k1gnT.js} +1 -1
  18. package/dist/preview/assets/{config-Cy6Eix27.js → config-sCP15_0f.js} +1 -1
  19. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-D4Gh9PzS.js → definition.vue_vue_type_script_setup_true_lang-C3NiB99t.js} +1 -1
  20. package/dist/preview/assets/{index-Cum0oK9u.js → index-BMOizF8g.js} +1 -1
  21. package/dist/preview/assets/index-C9G8y6qZ.js +1 -0
  22. package/dist/preview/assets/index-DjG-VVR4.js +763 -0
  23. package/dist/preview/assets/index-DqRQ67sX.css +1 -0
  24. package/dist/preview/assets/{item-H4QeOpnC.js → item-C1efxuFt.js} +1 -1
  25. package/dist/preview/assets/{runtime-C3532B0Y.js → runtime-7z9N9JGG.js} +1 -1
  26. package/dist/preview/assets/{runtime-sPGVp7yA.js → runtime-Bpa1zRxG.js} +1 -1
  27. package/dist/preview/assets/{runtime-DvCHNIPq.js → runtime-Csv04MYG.js} +1 -1
  28. package/dist/preview/assets/{runtime-CwgX0PuH.js → runtime-D0bjM4NL.js} +1 -1
  29. package/dist/preview/assets/{runtime-CNMjRr9Y.js → runtime-DoLpKFu-.js} +1 -1
  30. package/dist/preview/assets/{runtime-BotFX6qJ.js → runtime-Du0ghzR2.js} +1 -1
  31. package/dist/preview/assets/{runtime-CTnwTJlw.js → runtime-Dz3ZQYdq.js} +1 -1
  32. package/dist/preview/assets/{runtime-cKOD2A6u.js → runtime-Dz7SCudL.js} +1 -1
  33. package/dist/preview/assets/{runtime-D5HcLLLR.js → runtime-LgZuN2Tf.js} +1 -1
  34. package/dist/preview/assets/{runtime-ibuFFD1K.js → runtime-S9eZ2nJS.js} +1 -1
  35. package/dist/preview/assets/{schema-meta-DtZNwp3h.js → schema-meta-CYKPEnu9.js} +1 -1
  36. package/dist/preview/index.html +2 -2
  37. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +10 -1
  38. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +2 -2
  39. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +2 -2
  40. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +4 -4
  41. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +4 -4
  42. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +6 -6
  43. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +6 -6
  44. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
  45. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
  46. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +10 -1
  47. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
  48. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
  49. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +4 -4
  50. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +4 -4
  51. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
  52. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
  53. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
  54. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
  55. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
  56. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
  57. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
  58. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
  59. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
  60. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
  61. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +22 -22
  62. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +22 -22
  63. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/runtime.vue +23 -1
  64. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +30 -0
  65. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +2 -1
  66. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.js +1 -1
  67. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +30 -0
  68. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +2 -1
  69. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.js +7 -4
  70. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +30 -0
  71. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +2 -1
  72. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.js +1 -1
  73. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +30 -0
  74. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +2 -1
  75. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js +1 -1
  76. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +2 -1
  77. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.js +1 -0
  78. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +30 -0
  79. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +2 -1
  80. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.js +1 -1
  81. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +60 -32
  82. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +7 -9
  83. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +4 -1
  84. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +12 -6
  85. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +67 -32
  86. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue +6 -9
  87. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +4 -1
  88. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +2 -5
  89. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +66 -31
  90. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +7 -9
  91. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +4 -1
  92. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +12 -6
  93. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
  94. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
  95. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -1
  96. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.js +1 -0
  97. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  98. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  99. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -1
  100. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.js +1 -0
  101. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
  102. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
  103. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -1
  104. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.js +1 -0
  105. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  106. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  107. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -1
  108. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.js +1 -0
  109. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  110. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  111. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -1
  112. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.js +1 -0
  113. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  114. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  115. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -1
  116. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.js +1 -0
  117. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  118. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  119. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  120. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  121. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +6 -4
  122. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue +61 -22
  123. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +6 -4
  124. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue +6 -9
  125. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +4 -1
  126. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.js +3 -4
  127. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +6 -4
  128. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue +61 -22
  129. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +6 -4
  130. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue +6 -9
  131. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +4 -1
  132. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.js +3 -4
  133. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +4 -2
  134. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue +67 -23
  135. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +4 -2
  136. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue +6 -9
  137. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +4 -1
  138. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +2 -4
  139. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +4 -2
  140. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue +67 -23
  141. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +4 -2
  142. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue +6 -9
  143. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +4 -1
  144. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +2 -4
  145. package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/config.vue +67 -32
  146. package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/runtime.vue +7 -9
  147. package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +4 -1
  148. package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +2 -5
  149. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue +66 -31
  150. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +5 -8
  151. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +4 -1
  152. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +4 -6
  153. package/dist/runtime/components/table/index.vue +46 -7
  154. package/dist/runtime/components/table/utils/runtime.d.ts +1 -0
  155. package/dist/runtime/components/table/utils/runtime.js +5 -0
  156. package/dist/runtime/components/table/utils/shared.d.ts +3 -1
  157. package/dist/runtime/components/table/utils/shared.js +17 -5
  158. package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
  159. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +9 -2
  160. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
  161. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
  162. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
  163. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
  164. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +13 -4
  165. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
  166. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
  167. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
  168. package/package.json +1 -1
  169. package/dist/preview/assets/index-B3HnlKis.js +0 -763
  170. package/dist/preview/assets/index-BAY6NLoo.css +0 -1
  171. package/dist/preview/assets/index-CxUuhfsO.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { getProperty } from "dot-prop";
3
3
  import { Locale } from "../../../../../share/locale.js";
4
- import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
4
+ import { Align, CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
5
5
  export const type = "com.shwfed.table.column.date-input";
6
6
  export const compatibilityDate = "2026-06-17";
7
7
  export const metadata = {
@@ -31,14 +31,11 @@ export function schema(configure) {
31
31
  type: Schema.Literal(type),
32
32
  compatibilityDate: Schema.Literal(compatibilityDate),
33
33
  ...editableColumnFields(),
34
+ align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
34
35
  placeholder: Schema.optional(Locale.annotations({
35
36
  title: "\u5360\u4F4D\u7B26",
36
37
  description: "\u672A\u9009\u4E2D\u65E5\u671F\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
37
38
  })),
38
- hidden: Schema.optional(CelBool.annotations({
39
- title: "\u9690\u85CF\u6761\u4EF6",
40
- description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u8F93\u5165\u6846\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
41
- })),
42
39
  disabled: Schema.optional(CelBool.annotations({
43
40
  title: "\u7981\u7528\u6761\u4EF6",
44
41
  description: "\u8FD4\u56DE `true` \u65F6\u8F93\u5165\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u7F16\u8F91"
@@ -4,6 +4,7 @@ import { Icon } from "@iconify/vue";
4
4
  import { format as formatDate } from "date-fns";
5
5
  import { ExpressionEditor } from "../../../../ui/expression-editor";
6
6
  import { Separator } from "../../../../ui/separator";
7
+ import { Switch } from "../../../../ui/switch";
7
8
  import { Button } from "../../../../ui/button";
8
9
  import { Field, FieldLabel } from "../../../../ui/field";
9
10
  import { IconPicker } from "../../../../ui/icon-picker";
@@ -16,6 +17,12 @@ import {
16
17
  InputGroupNumberField,
17
18
  InputGroupText
18
19
  } from "../../../../ui/input-group";
20
+ import {
21
+ DropdownMenu,
22
+ DropdownMenuContent,
23
+ DropdownMenuItem,
24
+ DropdownMenuTrigger
25
+ } from "../../../../ui/dropdown-menu";
19
26
  import { getStructFieldDescription, getStructFieldTitle } from "../../../utils/schema-meta";
20
27
  import { Markdown } from "../../../../ui/markdown";
21
28
  import DerivedValueEditor from "../../../../form/DerivedValueEditor.vue";
@@ -30,6 +37,14 @@ const presetFieldSchema = presetSchema(() => {
30
37
  });
31
38
  const presetFieldTitle = (field) => getStructFieldTitle(presetFieldSchema, field) ?? field;
32
39
  const presetFieldDescription = (field) => getStructFieldDescription(presetFieldSchema, field);
40
+ const ALIGN_OPTIONS = [
41
+ { value: "left", label: "\u5DE6\u5BF9\u9F50", icon: "fluent:text-align-left-20-regular" },
42
+ { value: "center", label: "\u5C45\u4E2D", icon: "fluent:text-align-center-20-regular" },
43
+ { value: "right", label: "\u53F3\u5BF9\u9F50", icon: "fluent:text-align-right-20-regular" }
44
+ ];
45
+ const currentAlignIcon = computed(
46
+ () => (ALIGN_OPTIONS.find((o) => o.value === (value.value.align ?? "left")) ?? ALIGN_OPTIONS[0]).icon
47
+ );
33
48
  const ROW_VARS = {
34
49
  row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
35
50
  index: { type: "number", label: "\u884C\u7D22\u5F15" }
@@ -156,17 +171,14 @@ function previewFormat(fmt) {
156
171
  }
157
172
  const formatExample = computed(() => previewFormat(value.value.format ?? ""));
158
173
  const valueFormatExample = computed(() => previewFormat(value.value.valueFormat ?? ""));
159
- const hiddenModel = computed({
160
- get: () => value.value.hidden ?? "",
161
- set: (v) => {
162
- if (v === "") {
163
- const { hidden: _drop, ...rest } = value.value;
164
- value.value = rest;
165
- } else {
166
- value.value = { ...value.value, hidden: v };
167
- }
174
+ function onHiddenChange(v) {
175
+ if (v) {
176
+ value.value = { ...value.value, hidden: true };
177
+ } else {
178
+ const { hidden: _drop, ...rest } = value.value;
179
+ value.value = rest;
168
180
  }
169
- });
181
+ }
170
182
  const disabledModel = computed({
171
183
  get: () => value.value.disabled ?? "",
172
184
  set: (v) => {
@@ -462,6 +474,29 @@ const derivedModel = computed({
462
474
  {{ fieldTitle("size") }}
463
475
  </FieldLabel>
464
476
  <InputGroup>
477
+ <InputGroupAddon align="inline-start">
478
+ <DropdownMenu>
479
+ <DropdownMenuTrigger as-child>
480
+ <InputGroupButton
481
+ variant="ghost"
482
+ size="xs"
483
+ :title="fieldTitle('align')"
484
+ >
485
+ <Icon :icon="currentAlignIcon" />
486
+ </InputGroupButton>
487
+ </DropdownMenuTrigger>
488
+ <DropdownMenuContent align="start">
489
+ <DropdownMenuItem
490
+ v-for="opt in ALIGN_OPTIONS"
491
+ :key="opt.value"
492
+ @select="value = { ...value, align: opt.value }"
493
+ >
494
+ <Icon :icon="opt.icon" />
495
+ {{ opt.label }}
496
+ </DropdownMenuItem>
497
+ </DropdownMenuContent>
498
+ </DropdownMenu>
499
+ </InputGroupAddon>
465
500
  <InputGroupNumberField
466
501
  :model-value="value.size"
467
502
  :disabled="value.grow"
@@ -480,27 +515,6 @@ const derivedModel = computed({
480
515
  </InputGroupAddon>
481
516
  </InputGroup>
482
517
  </Field>
483
- <Field orientation="vertical">
484
- <FieldLabel class="text-xs text-zinc-500">
485
- <template
486
- v-if="fieldDescription('hidden')"
487
- #tooltip
488
- >
489
- <Markdown
490
- :source="fieldDescription('hidden')"
491
- block
492
- class="prose prose-sm prose-zinc"
493
- />
494
- </template>
495
- {{ fieldTitle("hidden") }}
496
- </FieldLabel>
497
- <ExpressionEditor
498
- v-model="hiddenModel"
499
- placeholder="例:row.archived"
500
- result-type="bool"
501
- :extra-vars="ROW_VARS"
502
- />
503
- </Field>
504
518
  <Field orientation="vertical">
505
519
  <FieldLabel class="text-xs text-zinc-500">
506
520
  <template
@@ -712,6 +726,27 @@ const derivedModel = computed({
712
726
  </InputGroupAddon>
713
727
  </InputGroup>
714
728
  </Field>
729
+ <Field orientation="vertical">
730
+ <FieldLabel class="text-xs text-zinc-500">
731
+ <template
732
+ v-if="fieldDescription('hidden')"
733
+ #tooltip
734
+ >
735
+ <Markdown
736
+ :source="fieldDescription('hidden')"
737
+ block
738
+ class="prose prose-sm prose-zinc"
739
+ />
740
+ </template>
741
+ {{ fieldTitle("hidden") }}
742
+ </FieldLabel>
743
+ <div>
744
+ <Switch
745
+ :model-value="value.hidden ?? false"
746
+ @update:model-value="onHiddenChange"
747
+ />
748
+ </div>
749
+ </Field>
715
750
  </div>
716
751
  </div>
717
752
  </template>
@@ -9,6 +9,7 @@ import { useFormReadonly } from "../../../../form/utils/readonly";
9
9
  import { getLocalizedText } from "../../../../../share/locale";
10
10
  import { DATE_RANGE_PICKER_DEFAULT_FORMATS, DateRangePicker } from "../../../../ui/date-range-picker";
11
11
  import { useFormState } from "../../../../form/utils/state";
12
+ import { JUSTIFY_CLASS } from "../../../utils/runtime";
12
13
  defineOptions({ name: "ShwfedTableDateRangeInputRendererRuntime" });
13
14
  const props = defineProps({
14
15
  column: { type: null, required: true },
@@ -32,7 +33,6 @@ function evalBool(expression, label) {
32
33
  return false;
33
34
  }
34
35
  }
35
- const isHidden = computed(() => evalBool(props.column.hidden, "hidden"));
36
36
  const isDisabled = computed(() => evalBool(props.column.disabled, "disabled"));
37
37
  const formReadonly = useFormReadonly();
38
38
  const isReadonly = computed(
@@ -44,6 +44,7 @@ const effectiveReadonly = computed(
44
44
  const resolvedValueFormat = computed(
45
45
  () => props.column.valueFormat ?? DATE_RANGE_PICKER_DEFAULT_FORMATS.daterange.value
46
46
  );
47
+ const justifyClass = computed(() => JUSTIFY_CLASS[props.column.align ?? "left"] ?? JUSTIFY_CLASS.left);
47
48
  const shortcuts = computed(() => {
48
49
  const list = props.column.presets;
49
50
  if (!list || list.length === 0) return void 0;
@@ -103,24 +104,20 @@ const readonlyText = computed(() => {
103
104
  <template>
104
105
  <!--
105
106
  Row budget matches the editable input columns: 2px outer inset around a 28px
106
- (`h-7`) control — total 32px. Every branch (hidden / readonly / editable) is
107
+ (`h-7`) control — total 32px. Every branch (readonly / editable) is
107
108
  sized identically so rows do not jump when a CEL condition flips.
108
109
  -->
109
110
  <div class="p-[0.125rem] w-full">
110
- <span
111
- v-if="isHidden"
112
- class="block h-7 w-full"
113
- />
114
111
  <!--
115
112
  Readonly empty state mirrors the other editable columns: a centered, faded,
116
113
  non-selectable `-` so a readonly grid reads uniformly. A non-empty readonly
117
114
  range keeps left-aligned dark text joined by `~`.
118
115
  -->
119
116
  <span
120
- v-else-if="effectiveReadonly"
117
+ v-if="effectiveReadonly"
121
118
  :class="[
122
119
  'flex items-center h-7 w-full px-2 text-[0.75rem] truncate',
123
- readonlyText ? 'text-zinc-700' : 'justify-center font-mono text-zinc-300 select-none'
120
+ readonlyText ? ['text-zinc-700', justifyClass] : 'justify-center font-mono text-zinc-300 select-none'
124
121
  ]"
125
122
  >
126
123
  {{ readonlyText || "-" }}
@@ -21,6 +21,9 @@ export declare function presetSchema(configure: (env: Environment) => void): Sch
21
21
  end: Schema.Schema<string, string, never>;
22
22
  }>;
23
23
  export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
24
+ align: Schema.optionalWith<Schema.Literal<["left", "center", "right"]>, {
25
+ default: () => "left";
26
+ }>;
24
27
  binding: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.filter<Schema.Tuple2<Schema.filter<typeof Schema.String>, Schema.filter<typeof Schema.String>>>]>;
25
28
  startPlaceholder: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
26
29
  locale: Schema.Literal<["zh"]>;
@@ -36,7 +39,6 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
36
39
  locale: Schema.Literal<["ja", "en", "ko"]>;
37
40
  message: Schema.SchemaClass<string, string, never>;
38
41
  }>]>>;
39
- hidden: Schema.optional<Schema.Schema<string, string, never>>;
40
42
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
41
43
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
42
44
  derived: Schema.optional<Schema.Struct<{
@@ -77,6 +79,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
77
79
  locale: Schema.Literal<["ja", "en", "ko"]>;
78
80
  message: Schema.SchemaClass<string, string, never>;
79
81
  }>]>>;
82
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
80
83
  id: Schema.refine<string, typeof Schema.String>;
81
84
  groupId: Schema.optional<typeof Schema.UUID>;
82
85
  type: Schema.Literal<["com.shwfed.table.column.date-range-input"]>;
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { getProperty } from "dot-prop";
3
3
  import { Locale } from "../../../../../share/locale.js";
4
- import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
4
+ import { Align, CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
5
5
  export const type = "com.shwfed.table.column.date-range-input";
6
6
  export const compatibilityDate = "2026-06-22";
7
7
  export const metadata = {
@@ -45,6 +45,7 @@ export function schema(configure) {
45
45
  type: Schema.Literal(type),
46
46
  compatibilityDate: Schema.Literal(compatibilityDate),
47
47
  ...editableColumnFields(),
48
+ align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
48
49
  // Swap the inherited single-string `binding` for the range union.
49
50
  binding: bindingSchema,
50
51
  startPlaceholder: Schema.optional(Locale.annotations({
@@ -55,10 +56,6 @@ export function schema(configure) {
55
56
  title: "\u7ED3\u675F\u5360\u4F4D\u7B26",
56
57
  description: "\u672A\u9009\u4E2D\u7ED3\u675F\u65E5\u671F\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
57
58
  })),
58
- hidden: Schema.optional(CelBool.annotations({
59
- title: "\u9690\u85CF\u6761\u4EF6",
60
- description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u8F93\u5165\u6846\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
61
- })),
62
59
  disabled: Schema.optional(CelBool.annotations({
63
60
  title: "\u7981\u7528\u6761\u4EF6",
64
61
  description: "\u8FD4\u56DE `true` \u65F6\u8F93\u5165\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u7F16\u8F91"
@@ -94,7 +91,8 @@ export function defaults() {
94
91
  return {
95
92
  title: [{ locale: "zh", message: "" }],
96
93
  binding: "",
97
- size: 240
94
+ size: 240,
95
+ rangeSeparatorIcon: "fluent:arrow-right-20-regular"
98
96
  };
99
97
  }
100
98
  export function toColumnDef(value, { getLocaleText }) {
@@ -100,6 +100,34 @@ const { t, locale } = useI18n({
100
100
  const inheritedContext = injectCELContext();
101
101
  const containerRef = ref(null);
102
102
  const appliedInitialStateKey = ref("");
103
+ const frozenGrowColumns = ref(/* @__PURE__ */ new Set());
104
+ function isEffectiveGrow(column) {
105
+ return !!column.columnDef.meta?.grow && !frozenGrowColumns.value.has(column.id);
106
+ }
107
+ function freezeGrowColumns() {
108
+ const grows = tableApi.getVisibleLeafColumns().filter(isEffectiveGrow);
109
+ if (grows.length === 0) return;
110
+ const measured = {};
111
+ for (const column of grows) {
112
+ const el = containerRef.value?.querySelector(`thead [data-col-id="${column.id}"]`);
113
+ if (el) measured[column.id] = el.offsetWidth;
114
+ }
115
+ tableApi.setColumnSizing((prev) => ({ ...prev, ...measured }));
116
+ const next = new Set(frozenGrowColumns.value);
117
+ grows.forEach((column) => next.add(column.id));
118
+ frozenGrowColumns.value = next;
119
+ }
120
+ function onResizeMouseDown(header, event) {
121
+ freezeGrowColumns();
122
+ header.getResizeHandler()(event);
123
+ }
124
+ function growLeafCount(header) {
125
+ return header.getLeafHeaders().filter((h2) => isEffectiveGrow(h2.column)).length;
126
+ }
127
+ function headerGrowStyle(header) {
128
+ const n = growLeafCount(header);
129
+ return n > 0 ? { flex: `${n} 1 auto` } : {};
130
+ }
103
131
  const formReadonly = useFormReadonly();
104
132
  function isHeaderReadonly(readonlyExpr) {
105
133
  if (readonlyExpr == null) return formReadonly.value;
@@ -494,13 +522,19 @@ function getDisplayIndex(row) {
494
522
  watch(config, (config2) => {
495
523
  if (!config2) return;
496
524
  const initialState = config2.initialState;
497
- const nextKey = initialState ? JSON.stringify(initialState) : "";
498
- if (appliedInitialStateKey.value === nextKey || !initialState) {
525
+ const hiddenSeed = {};
526
+ for (const col of config2.columns) {
527
+ if (col.hidden) hiddenSeed[col.id] = false;
528
+ }
529
+ const hasSeed = Object.keys(hiddenSeed).length > 0;
530
+ const effective = initialState || hasSeed ? { ...initialState ?? {}, columnVisibility: { ...hiddenSeed, ...initialState?.columnVisibility ?? {} } } : void 0;
531
+ const nextKey = effective ? JSON.stringify(effective) : "";
532
+ if (appliedInitialStateKey.value === nextKey || !effective) {
499
533
  appliedInitialStateKey.value = nextKey;
500
534
  syncPaginationPageSize();
501
535
  return;
502
536
  }
503
- tableApi.initialState = mergeInitialState(tableApi.initialState, initialState);
537
+ tableApi.initialState = mergeInitialState(tableApi.initialState, effective);
504
538
  tableApi.reset();
505
539
  appliedInitialStateKey.value = nextKey;
506
540
  syncPaginationPageSize();
@@ -712,8 +746,8 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
712
746
  v-for="header in group.headers"
713
747
  :key="header.id"
714
748
  :colspan="header.colSpan"
749
+ :data-col-id="header.column.id"
715
750
  :class="[
716
- header.column.columnDef.meta?.grow && 'flex-1',
717
751
  'flex items-center gap-2 border-zinc-300 py-2 text-zinc-600',
718
752
  'text-xs flex items-center justify-center relative',
719
753
  'bg-[color-mix(in_srgb,var(--primary)_7%,white)] group',
@@ -722,7 +756,12 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
722
756
  shouldHaveLeftBorder(header.column) && 'border-l'
723
757
  ]"
724
758
  :style="{
759
+ // Grow until first resize (see freezeGrowColumns): fill the
760
+ // remaining space, with `width` as the flex-basis so the
761
+ // configured size acts as a floor. Group headers grow by
762
+ // the count of grow leaves they span (see headerGrowStyle).
725
763
  width: `${header.getSize()}px`,
764
+ ...headerGrowStyle(header),
726
765
  ...pinnedStyle(header.column)
727
766
  }"
728
767
  >
@@ -816,7 +855,7 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
816
855
  'hover:opacity-100',
817
856
  'cursor-col-resize'
818
857
  ]"
819
- @mousedown="header.getResizeHandler()($event)"
858
+ @mousedown="onResizeMouseDown(header, $event)"
820
859
  >
821
860
  <div class="w-2pt h-full translate-x-1pt transform-3d bg-[color-mix(in_srgb,var(--primary)_80%,white)]" />
822
861
  </div>
@@ -875,7 +914,7 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
875
914
  :key="cell.id"
876
915
  :class="[
877
916
  'border-zinc-300',
878
- cell.column.columnDef.meta?.grow && 'flex-1',
917
+ isEffectiveGrow(cell.column) && 'flex-[1_1_auto]',
879
918
  cell.column.getIsPinned() && 'sticky z-15',
880
919
  shouldHaveRightBorder(cell.column) && 'border-r',
881
920
  shouldHaveLeftBorder(cell.column) && 'border-l'
@@ -908,7 +947,6 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
908
947
  :key="header.id"
909
948
  :colspan="header.colSpan"
910
949
  :class="[
911
- header.column.columnDef.meta?.grow && 'flex-1',
912
950
  'flex items-center gap-2 border-zinc-300 text-zinc-600 p-0',
913
951
  'text-xs flex items-center justify-center relative',
914
952
  'bg-[color-mix(in_srgb,var(--primary)_7%,white)] group',
@@ -918,6 +956,7 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
918
956
  ]"
919
957
  :style="{
920
958
  width: `${header.getSize()}px`,
959
+ ...headerGrowStyle(header),
921
960
  ...pinnedStyle(header.column)
922
961
  }"
923
962
  >
@@ -1,5 +1,6 @@
1
1
  import type { Effect as EffectType } from 'effect';
2
2
  export declare const JUSTIFY_CLASS: Record<string, string>;
3
+ export declare const TEXT_ALIGN_CLASS: Record<string, string>;
3
4
  type CelEvaluator = <T>(expression: string, context?: Record<string, unknown>) => EffectType.Effect<T, any>;
4
5
  export declare function interpolateMarkdown(template: string, $cel: CelEvaluator, context: Record<string, unknown>): string;
5
6
  export declare function evaluateMarkdown(template: string, $cel: CelEvaluator, context: Record<string, unknown>): string;
@@ -5,6 +5,11 @@ export const JUSTIFY_CLASS = {
5
5
  center: "justify-center",
6
6
  right: "justify-end"
7
7
  };
8
+ export const TEXT_ALIGN_CLASS = {
9
+ left: "text-left",
10
+ center: "text-center",
11
+ right: "text-right"
12
+ };
8
13
  const INTERPOLATION_RE = /\{\{(.*?)\}\}/gs;
9
14
  function stringifyCelResult(value) {
10
15
  if (value === null || value === void 0) return "";
@@ -15,7 +15,7 @@ export declare function columnFields(configure: (env: Environment) => void): {
15
15
  locale: Schema.Literal<["ja", "en", "ko"]>;
16
16
  message: Schema.SchemaClass<string, string, never>;
17
17
  }>]>;
18
- accessor: Schema.Schema<string, string, never>;
18
+ accessor: Schema.optional<Schema.Schema<string, string, never>>;
19
19
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
20
20
  sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
21
21
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
@@ -27,6 +27,7 @@ export declare function columnFields(configure: (env: Environment) => void): {
27
27
  locale: Schema.Literal<["ja", "en", "ko"]>;
28
28
  message: Schema.SchemaClass<string, string, never>;
29
29
  }>]>>;
30
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
30
31
  id: Schema.refine<string, typeof Schema.String>;
31
32
  groupId: Schema.optional<typeof Schema.UUID>;
32
33
  };
@@ -50,6 +51,7 @@ export declare function editableColumnFields(): {
50
51
  locale: Schema.Literal<["ja", "en", "ko"]>;
51
52
  message: Schema.SchemaClass<string, string, never>;
52
53
  }>]>>;
54
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
53
55
  id: Schema.refine<string, typeof Schema.String>;
54
56
  groupId: Schema.optional<typeof Schema.UUID>;
55
57
  };
@@ -20,10 +20,14 @@ export function columnFields(configure) {
20
20
  return {
21
21
  ...columnIdentityFields(),
22
22
  title: Locale.annotations({ title: "\u540D\u79F0", description: "\u5217\u6807\u9898" }),
23
- accessor: CelRowAccess(configure).annotations({
23
+ // Optional: a purely visual column (icon, badge, computed-elsewhere cell)
24
+ // may have no backing data path, letting designers refine the display layer
25
+ // without an API contract first. Absent → the cell renders no data; present
26
+ // → still validated as a CEL expression (empty string stays invalid).
27
+ accessor: Schema.optional(CelRowAccess(configure).annotations({
24
28
  title: "\u8DEF\u5F84",
25
- description: "\u884C\u6570\u636E\u8BBF\u95EE CEL \u8868\u8FBE\u5F0F\uFF0C\u4F8B\u5982 `row.user.name`"
26
- }),
29
+ description: "\u884C\u6570\u636E\u8BBF\u95EE CEL \u8868\u8FBE\u5F0F\uFF0C\u4F8B\u5982 `row.user.name`\uFF1B\u53EF\u7559\u7A7A\uFF0C\u7559\u7A7A\u65F6\u8BE5\u5217\u4E0D\u8BFB\u53D6\u6570\u636E\uFF08\u7528\u4E8E\u7EAF\u89C6\u89C9\u5217\uFF09"
30
+ })),
27
31
  enableSorting: Schema.optional(Schema.Boolean.annotations({
28
32
  title: "\u5141\u8BB8\u6392\u5E8F",
29
33
  description: md`
@@ -48,7 +52,11 @@ export function columnFields(configure) {
48
52
  description: "\u6307\u5B9A\u4E00\u4E2A\u5408\u9002\u7684\u8868\u683C\u5217\u5BBD\u5EA6\uFF0C\u5F53\u5217\u5185\u5BB9\u957F\u5EA6\u5927\u4E8E\u8FD9\u91CC\u6307\u5B9A\u7684\u5BBD\u5EA6\u540E\uFF0C\u4F1A\u5BFC\u81F4\u8D85\u51FA\u7684\u90E8\u5206\u88AB\u622A\u65AD\u3002"
49
53
  })),
50
54
  grow: Schema.optional(Schema.Boolean.annotations({ title: "\u5360\u636E\u5269\u4F59\u5BBD\u5EA6", description: "\u5217\u662F\u5426\u5360\u636E\u5269\u4F59\u7A7A\u4F59\u5BBD\u5EA6" })),
51
- tooltip: Schema.optional(Locale.annotations({ title: "\u63D0\u793A", description: "\u5217\u6807\u9898\u60AC\u6D6E\u63D0\u793A\uFF0C\u652F\u6301 Markdown" }))
55
+ tooltip: Schema.optional(Locale.annotations({ title: "\u63D0\u793A", description: "\u5217\u6807\u9898\u60AC\u6D6E\u63D0\u793A\uFF0C\u652F\u6301 Markdown" })),
56
+ hidden: Schema.optional(Schema.Boolean.annotations({
57
+ title: "\u9ED8\u8BA4\u9690\u85CF",
58
+ description: "\u5F00\u542F\u540E\u8BE5\u5217\u9ED8\u8BA4\u9690\u85CF\uFF1B\u4F7F\u7528\u8005\u53EF\u5728\u8868\u683C\u7684\u5217\u8BBE\u7F6E\u4E2D\u91CD\u65B0\u663E\u793A\u3002\u4EC5\u4F5C\u4E3A\u521D\u59CB\u72B6\u6001\uFF0C\u4E0D\u968F\u6570\u636E\u53D8\u5316"
59
+ }))
52
60
  };
53
61
  }
54
62
  export function editableColumnFields() {
@@ -72,7 +80,11 @@ export function editableColumnFields() {
72
80
  description: "\u6307\u5B9A\u4E00\u4E2A\u5408\u9002\u7684\u8868\u683C\u5217\u5BBD\u5EA6\uFF0C\u5F53\u5217\u5185\u5BB9\u957F\u5EA6\u5927\u4E8E\u8FD9\u91CC\u6307\u5B9A\u7684\u5BBD\u5EA6\u540E\uFF0C\u4F1A\u5BFC\u81F4\u8D85\u51FA\u7684\u90E8\u5206\u88AB\u622A\u65AD\u3002"
73
81
  })),
74
82
  grow: Schema.optional(Schema.Boolean.annotations({ title: "\u5360\u636E\u5269\u4F59\u5BBD\u5EA6", description: "\u5217\u662F\u5426\u5360\u636E\u5269\u4F59\u7A7A\u4F59\u5BBD\u5EA6" })),
75
- tooltip: Schema.optional(Locale.annotations({ title: "\u63D0\u793A", description: "\u5217\u6807\u9898\u60AC\u6D6E\u63D0\u793A\uFF0C\u652F\u6301 Markdown" }))
83
+ tooltip: Schema.optional(Locale.annotations({ title: "\u63D0\u793A", description: "\u5217\u6807\u9898\u60AC\u6D6E\u63D0\u793A\uFF0C\u652F\u6301 Markdown" })),
84
+ hidden: Schema.optional(Schema.Boolean.annotations({
85
+ title: "\u9ED8\u8BA4\u9690\u85CF",
86
+ description: "\u5F00\u542F\u540E\u8BE5\u5217\u9ED8\u8BA4\u9690\u85CF\uFF1B\u4F7F\u7528\u8005\u53EF\u5728\u8868\u683C\u7684\u5217\u8BBE\u7F6E\u4E2D\u91CD\u65B0\u663E\u793A\u3002\u4EC5\u4F5C\u4E3A\u521D\u59CB\u72B6\u6001\uFF0C\u4E0D\u968F\u6570\u636E\u53D8\u5316"
87
+ }))
76
88
  };
77
89
  }
78
90
  const EDITABLE_HEADER_MARKER = Symbol("shwfed-editable-header");
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
24
24
  "onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
25
25
  }>, {
26
26
  size: "sm" | "md" | "lg";
27
- clearable: boolean;
28
27
  clearIcon: string;
28
+ clearable: boolean;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -23,6 +23,9 @@ const sizeClass = computed(() => ({
23
23
  md: "h-9 text-sm",
24
24
  lg: "h-10 text-base"
25
25
  })[props.size]);
26
+ const inputSizeClass = computed(() => ({ sm: "text-xs md:text-xs", md: "", lg: "" })[props.size]);
27
+ const clearButtonSizeClass = computed(() => props.size === "sm" ? "size-4" : "");
28
+ const clearIconSizeClass = computed(() => props.size === "sm" ? "size-3" : "");
26
29
  const emits = defineEmits(["update:modelValue", "focus", "blur", "clear"]);
27
30
  const draft = ref("");
28
31
  const focused = ref(false);
@@ -86,6 +89,7 @@ const showClear = computed(
86
89
  </InputGroupAddon>
87
90
  <InputGroupInput
88
91
  :model-value="draft"
92
+ :class="inputSizeClass"
89
93
  :placeholder="props.placeholder"
90
94
  :disabled="props.disabled"
91
95
  :readonly="props.readonly"
@@ -105,12 +109,15 @@ const showClear = computed(
105
109
  <InputGroupButton
106
110
  size="icon-xs"
107
111
  data-slot="date-picker-clear"
108
- class="text-zinc-500 hover:text-zinc-700"
112
+ :class="cn('text-zinc-500 hover:text-zinc-700', clearButtonSizeClass)"
109
113
  tabindex="-1"
110
114
  @mousedown.prevent
111
115
  @click.stop="onClear"
112
116
  >
113
- <Icon :icon="props.clearIcon" />
117
+ <Icon
118
+ :icon="props.clearIcon"
119
+ :class="clearIconSizeClass"
120
+ />
114
121
  </InputGroupButton>
115
122
  </InputGroupAddon>
116
123
  </InputGroup>
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
24
24
  "onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
25
25
  }>, {
26
26
  size: "sm" | "md" | "lg";
27
- clearable: boolean;
28
27
  clearIcon: string;
28
+ clearable: boolean;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
22
22
  size: "sm" | "md" | "lg";
23
23
  granularity: "hour" | "minute" | "second";
24
24
  hourCycle: 12 | 24;
25
- clearable: boolean;
26
25
  clearIcon: string;
26
+ clearable: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
22
22
  size: "sm" | "md" | "lg";
23
23
  granularity: "hour" | "minute" | "second";
24
24
  hourCycle: 12 | 24;
25
- clearable: boolean;
26
25
  clearIcon: string;
26
+ clearable: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -29,8 +29,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
29
29
  "onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
30
30
  }>, {
31
31
  size: "sm" | "md" | "lg";
32
- clearable: boolean;
33
32
  clearIcon: string;
33
+ clearable: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
35
  declare const _default: typeof __VLS_export;
36
36
  export default _default;
@@ -26,6 +26,9 @@ const sizeClass = computed(() => ({
26
26
  md: "h-9 text-sm",
27
27
  lg: "h-10 text-base"
28
28
  })[props.size]);
29
+ const inputTextClass = computed(() => ({ sm: "text-xs", md: "text-sm", lg: "text-base" })[props.size]);
30
+ const clearButtonSizeClass = computed(() => props.size === "sm" ? "size-4" : "");
31
+ const clearIconSizeClass = computed(() => props.size === "sm" ? "size-3" : "");
29
32
  const emits = defineEmits(["update:startValue", "update:endValue", "focus", "blur", "clear"]);
30
33
  const startDraft = ref("");
31
34
  const endDraft = ref("");
@@ -122,7 +125,8 @@ const hasValue = computed(() => props.startValue !== void 0 || props.endValue !=
122
125
  :disabled="props.disabled"
123
126
  :readonly="props.readonly"
124
127
  :class="cn(
125
- 'text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 text-sm outline-none disabled:cursor-not-allowed text-center',
128
+ 'text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 outline-none disabled:cursor-not-allowed text-center',
129
+ inputTextClass,
126
130
  !props.prefixIcon && 'pl-3'
127
131
  )"
128
132
  @focus="(e) => onFocus(e, 'start')"
@@ -143,7 +147,8 @@ const hasValue = computed(() => props.startValue !== void 0 || props.endValue !=
143
147
  :disabled="props.disabled"
144
148
  :readonly="props.readonly"
145
149
  :class="cn(
146
- 'text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 text-sm outline-none disabled:cursor-not-allowed text-center',
150
+ 'text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 outline-none disabled:cursor-not-allowed text-center',
151
+ inputTextClass,
147
152
  !showClear && 'pr-3'
148
153
  )"
149
154
  @focus="(e) => onFocus(e, 'end')"
@@ -158,12 +163,16 @@ const hasValue = computed(() => props.startValue !== void 0 || props.endValue !=
158
163
  :class="cn(
159
164
  'mr-2 shrink-0 text-zinc-500 hover:text-zinc-700 transition-opacity',
160
165
  '[@media(hover:hover)]:opacity-0',
161
- 'group-hover/date-range-input:opacity-100 focus-within:opacity-100'
166
+ 'group-hover/date-range-input:opacity-100 focus-within:opacity-100',
167
+ clearButtonSizeClass
162
168
  )"
163
169
  @mousedown.prevent
164
170
  @click.stop="onClear"
165
171
  >
166
- <Icon :icon="props.clearIcon" />
172
+ <Icon
173
+ :icon="props.clearIcon"
174
+ :class="clearIconSizeClass"
175
+ />
167
176
  </InputGroupButton>
168
177
  </div>
169
178
  </template>
@@ -29,8 +29,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
29
29
  "onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
30
30
  }>, {
31
31
  size: "sm" | "md" | "lg";
32
- clearable: boolean;
33
32
  clearIcon: string;
33
+ clearable: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
35
  declare const _default: typeof __VLS_export;
36
36
  export default _default;