@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
@@ -4,6 +4,7 @@ import { Icon } from "@iconify/vue";
4
4
  import { format as formatDate } from "date-fns";
5
5
  import { Input } from "../../../../ui/input";
6
6
  import { Separator } from "../../../../ui/separator";
7
+ import { Switch } from "../../../../ui/switch";
7
8
  import { Field, FieldLabel } from "../../../../ui/field";
8
9
  import { Locale } from "../../../../ui/locale";
9
10
  import {
@@ -37,6 +38,14 @@ const ALIGN_OPTIONS = [
37
38
  const currentAlignIcon = computed(
38
39
  () => (ALIGN_OPTIONS.find((o) => o.value === (value.value.align ?? "left")) ?? ALIGN_OPTIONS[0]).icon
39
40
  );
41
+ function onHiddenChange(v) {
42
+ if (v) {
43
+ value.value = { ...value.value, hidden: true };
44
+ } else {
45
+ const { hidden: _drop, ...rest } = value.value;
46
+ value.value = rest;
47
+ }
48
+ }
40
49
  const dateFormatExample = computed(() => {
41
50
  const fmt = value.value?.format;
42
51
  if (!fmt) return "";
@@ -238,6 +247,27 @@ const dateFormatExample = computed(() => {
238
247
  </InputGroupAddon>
239
248
  </InputGroup>
240
249
  </Field>
250
+ <Field orientation="vertical">
251
+ <FieldLabel class="text-xs text-zinc-500">
252
+ <template
253
+ v-if="fieldDescription('hidden')"
254
+ #tooltip
255
+ >
256
+ <Markdown
257
+ :source="fieldDescription('hidden')"
258
+ block
259
+ class="prose prose-sm prose-zinc"
260
+ />
261
+ </template>
262
+ {{ fieldTitle("hidden") }}
263
+ </FieldLabel>
264
+ <div>
265
+ <Switch
266
+ :model-value="value.hidden ?? false"
267
+ @update:model-value="onHiddenChange"
268
+ />
269
+ </div>
270
+ </Field>
241
271
  </div>
242
272
  </div>
243
273
  </template>
@@ -20,7 +20,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
20
20
  locale: Schema.Literal<["ja", "en", "ko"]>;
21
21
  message: Schema.SchemaClass<string, string, never>;
22
22
  }>]>;
23
- accessor: Schema.Schema<string, string, never>;
23
+ accessor: Schema.optional<Schema.Schema<string, string, never>>;
24
24
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
25
25
  sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
26
26
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
@@ -32,6 +32,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
32
32
  locale: Schema.Literal<["ja", "en", "ko"]>;
33
33
  message: Schema.SchemaClass<string, string, never>;
34
34
  }>]>>;
35
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
35
36
  id: Schema.refine<string, typeof Schema.String>;
36
37
  groupId: Schema.optional<typeof Schema.UUID>;
37
38
  type: Schema.Literal<["com.shwfed.table.column.date"]>;
@@ -24,7 +24,6 @@ export function schema(configure) {
24
24
  export function defaults() {
25
25
  return {
26
26
  title: [{ locale: "zh", message: "" }],
27
- accessor: "",
28
27
  format: "yyyy-MM-dd",
29
28
  size: 120
30
29
  };
@@ -33,6 +32,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
33
32
  return {
34
33
  header: getLocaleText(value.title),
35
34
  accessorFn: (row, index) => {
35
+ if (!value.accessor) return void 0;
36
36
  try {
37
37
  return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
38
38
  } catch (e) {
@@ -3,6 +3,7 @@ import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
5
5
  import { Separator } from "../../../../ui/separator";
6
+ import { Switch } from "../../../../ui/switch";
6
7
  import { Field, FieldLabel } from "../../../../ui/field";
7
8
  import { Locale } from "../../../../ui/locale";
8
9
  import {
@@ -50,6 +51,14 @@ const ROW_VARS = {
50
51
  row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
51
52
  index: { type: "number", label: "\u884C\u7D22\u5F15" }
52
53
  };
54
+ function onHiddenChange(v) {
55
+ if (v) {
56
+ value.value = { ...value.value, hidden: true };
57
+ } else {
58
+ const { hidden: _drop, ...rest } = value.value;
59
+ value.value = rest;
60
+ }
61
+ }
53
62
  </script>
54
63
 
55
64
  <template>
@@ -232,6 +241,27 @@ const ROW_VARS = {
232
241
  </InputGroupAddon>
233
242
  </InputGroup>
234
243
  </Field>
244
+ <Field orientation="vertical">
245
+ <FieldLabel class="text-xs text-zinc-500">
246
+ <template
247
+ v-if="fieldDescription('hidden')"
248
+ #tooltip
249
+ >
250
+ <Markdown
251
+ :source="fieldDescription('hidden')"
252
+ block
253
+ class="prose prose-sm prose-zinc"
254
+ />
255
+ </template>
256
+ {{ fieldTitle("hidden") }}
257
+ </FieldLabel>
258
+ <div>
259
+ <Switch
260
+ :model-value="value.hidden ?? false"
261
+ @update:model-value="onHiddenChange"
262
+ />
263
+ </div>
264
+ </Field>
235
265
  </div>
236
266
  </div>
237
267
  </template>
@@ -9,7 +9,7 @@ export declare const metadata: {
9
9
  readonly icon: "fluent:shapes-20-regular";
10
10
  };
11
11
  export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
12
- accessor: Schema.Schema<string, string, never>;
12
+ accessor: Schema.optional<Schema.Schema<string, string, never>>;
13
13
  color: Schema.optional<Schema.Schema<string, string, never>>;
14
14
  align: Schema.optionalWith<Schema.Literal<["left", "center", "right"]>, {
15
15
  default: () => "center";
@@ -32,6 +32,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
32
32
  locale: Schema.Literal<["ja", "en", "ko"]>;
33
33
  message: Schema.SchemaClass<string, string, never>;
34
34
  }>]>>;
35
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
35
36
  id: Schema.refine<string, typeof Schema.String>;
36
37
  groupId: Schema.optional<typeof Schema.UUID>;
37
38
  type: Schema.Literal<["com.shwfed.table.column.icon"]>;
@@ -11,10 +11,13 @@ export function schema(configure) {
11
11
  type: Schema.Literal(type),
12
12
  compatibilityDate: Schema.Literal(compatibilityDate),
13
13
  ...columnFields(configure),
14
- accessor: CelRowAccess(configure).annotations({
14
+ // Optional like every non-editable column's path: an icon column may carry
15
+ // no data binding (a fixed decorative cell), letting designers build the
16
+ // visual layer before any API contract exists.
17
+ accessor: Schema.optional(CelRowAccess(configure).annotations({
15
18
  title: "\u56FE\u6807",
16
- description: "\u56FE\u6807\u540D\u79F0 CEL \u8868\u8FBE\u5F0F\uFF08Iconify \u6807\u8BC6\u7B26\uFF09\uFF0C\u4F8B\u5982 `row.iconName`"
17
- }),
19
+ description: "\u56FE\u6807\u540D\u79F0 CEL \u8868\u8FBE\u5F0F\uFF08Iconify \u6807\u8BC6\u7B26\uFF09\uFF0C\u4F8B\u5982 `row.iconName`\uFF1B\u53EF\u7559\u7A7A\uFF0C\u7559\u7A7A\u65F6\u4E0D\u6E32\u67D3\u56FE\u6807"
20
+ })),
18
21
  color: Schema.optional(
19
22
  CelRowAccess(configure, { resultType: "string" }).annotations({
20
23
  title: "\u989C\u8272",
@@ -27,7 +30,6 @@ export function schema(configure) {
27
30
  export function defaults() {
28
31
  return {
29
32
  title: [{ locale: "zh", message: "" }],
30
- accessor: "",
31
33
  size: 120
32
34
  };
33
35
  }
@@ -35,6 +37,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
35
37
  return {
36
38
  header: getLocaleText(value.title),
37
39
  accessorFn: (row, index) => {
40
+ if (!value.accessor) return void 0;
38
41
  try {
39
42
  return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
40
43
  } catch (e) {
@@ -3,6 +3,7 @@ import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { Input } from "../../../../ui/input";
5
5
  import { Separator } from "../../../../ui/separator";
6
+ import { Switch } from "../../../../ui/switch";
6
7
  import { Field, FieldLabel } from "../../../../ui/field";
7
8
  import { Locale } from "../../../../ui/locale";
8
9
  import {
@@ -55,6 +56,14 @@ const DISPLAY_MODE_OPTIONS = [
55
56
  const currentPreserveModeLabel = computed(
56
57
  () => PRESERVE_MODE_OPTIONS.find((o) => o.value === (value.value.preserveMode ?? "round"))?.label
57
58
  );
59
+ function onHiddenChange(v) {
60
+ if (v) {
61
+ value.value = { ...value.value, hidden: true };
62
+ } else {
63
+ const { hidden: _drop, ...rest } = value.value;
64
+ value.value = rest;
65
+ }
66
+ }
58
67
  function onPreserveDigitsChange(v) {
59
68
  const next = { ...value.value, preserveDigits: v };
60
69
  if (v === void 0) {
@@ -307,6 +316,27 @@ function onPreserveDigitsChange(v) {
307
316
  </InputGroupAddon>
308
317
  </InputGroup>
309
318
  </Field>
319
+ <Field orientation="vertical">
320
+ <FieldLabel class="text-xs text-zinc-500">
321
+ <template
322
+ v-if="fieldDescription('hidden')"
323
+ #tooltip
324
+ >
325
+ <Markdown
326
+ :source="fieldDescription('hidden')"
327
+ block
328
+ class="prose prose-sm prose-zinc"
329
+ />
330
+ </template>
331
+ {{ fieldTitle("hidden") }}
332
+ </FieldLabel>
333
+ <div>
334
+ <Switch
335
+ :model-value="value.hidden ?? false"
336
+ @update:model-value="onHiddenChange"
337
+ />
338
+ </div>
339
+ </Field>
310
340
  </div>
311
341
  </div>
312
342
  </template>
@@ -24,7 +24,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
24
24
  locale: Schema.Literal<["ja", "en", "ko"]>;
25
25
  message: Schema.SchemaClass<string, string, never>;
26
26
  }>]>;
27
- accessor: Schema.Schema<string, string, never>;
27
+ accessor: Schema.optional<Schema.Schema<string, string, never>>;
28
28
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
29
29
  sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
30
30
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
@@ -36,6 +36,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
36
36
  locale: Schema.Literal<["ja", "en", "ko"]>;
37
37
  message: Schema.SchemaClass<string, string, never>;
38
38
  }>]>>;
39
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
39
40
  id: Schema.refine<string, typeof Schema.String>;
40
41
  groupId: Schema.optional<typeof Schema.UUID>;
41
42
  type: Schema.Literal<["com.shwfed.table.column.number"]>;
@@ -32,7 +32,6 @@ export function schema(configure) {
32
32
  export function defaults() {
33
33
  return {
34
34
  title: [{ locale: "zh", message: "" }],
35
- accessor: "",
36
35
  size: 120,
37
36
  align: "right"
38
37
  };
@@ -41,6 +40,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
41
40
  return {
42
41
  header: getLocaleText(value.title),
43
42
  accessorFn: (row, index) => {
43
+ if (!value.accessor) return void 0;
44
44
  try {
45
45
  return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
46
46
  } catch (e) {
@@ -4,6 +4,7 @@ import { Icon } from "@iconify/vue";
4
4
  import { Input } from "../../../../ui/input";
5
5
  import { ExpressionEditor } from "../../../../ui/expression-editor";
6
6
  import { Separator } from "../../../../ui/separator";
7
+ import { Switch } from "../../../../ui/switch";
7
8
  import { Field, FieldLabel } from "../../../../ui/field";
8
9
  import { Locale } from "../../../../ui/locale";
9
10
  import {
@@ -47,6 +48,14 @@ const DISPLAY_MODE_OPTIONS = [
47
48
  { value: "plain", label: "\u6587\u672C" },
48
49
  { value: "mono", label: "\u7B49\u5BBD" }
49
50
  ];
51
+ function onHiddenChange(v) {
52
+ if (v) {
53
+ value.value = { ...value.value, hidden: true };
54
+ } else {
55
+ const { hidden: _drop, ...rest } = value.value;
56
+ value.value = rest;
57
+ }
58
+ }
50
59
  const copyExpressionModel = computed({
51
60
  get: () => value.value.copyExpression ?? "",
52
61
  set: (v) => {
@@ -272,6 +281,27 @@ const copyExpressionModel = computed({
272
281
  </InputGroupAddon>
273
282
  </InputGroup>
274
283
  </Field>
284
+ <Field orientation="vertical">
285
+ <FieldLabel class="text-xs text-zinc-500">
286
+ <template
287
+ v-if="fieldDescription('hidden')"
288
+ #tooltip
289
+ >
290
+ <Markdown
291
+ :source="fieldDescription('hidden')"
292
+ block
293
+ class="prose prose-sm prose-zinc"
294
+ />
295
+ </template>
296
+ {{ fieldTitle("hidden") }}
297
+ </FieldLabel>
298
+ <div>
299
+ <Switch
300
+ :model-value="value.hidden ?? false"
301
+ @update:model-value="onHiddenChange"
302
+ />
303
+ </div>
304
+ </Field>
275
305
  </div>
276
306
  </div>
277
307
  </template>
@@ -23,7 +23,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
23
23
  locale: Schema.Literal<["ja", "en", "ko"]>;
24
24
  message: Schema.SchemaClass<string, string, never>;
25
25
  }>]>;
26
- accessor: Schema.Schema<string, string, never>;
26
+ accessor: Schema.optional<Schema.Schema<string, string, never>>;
27
27
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
28
28
  sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
29
29
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
@@ -35,6 +35,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
35
35
  locale: Schema.Literal<["ja", "en", "ko"]>;
36
36
  message: Schema.SchemaClass<string, string, never>;
37
37
  }>]>>;
38
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
38
39
  id: Schema.refine<string, typeof Schema.String>;
39
40
  groupId: Schema.optional<typeof Schema.UUID>;
40
41
  type: Schema.Literal<["com.shwfed.table.column.text"]>;
@@ -30,7 +30,6 @@ export function schema(configure) {
30
30
  export function defaults() {
31
31
  return {
32
32
  title: [{ locale: "zh", message: "" }],
33
- accessor: "",
34
33
  size: 120
35
34
  };
36
35
  }
@@ -38,6 +37,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
38
37
  return {
39
38
  header: getLocaleText(value.title),
40
39
  accessorFn: (row, index) => {
40
+ if (!value.accessor) return void 0;
41
41
  try {
42
42
  return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
43
43
  } catch (e) {
@@ -29,7 +29,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
29
29
  locale: Schema.Literal<["ja", "en", "ko"]>;
30
30
  message: Schema.SchemaClass<string, string, never>;
31
31
  }>]>;
32
- accessor: Schema.Schema<string, string, never>;
32
+ accessor: Schema.optional<Schema.Schema<string, string, never>>;
33
33
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
34
34
  sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
35
35
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
@@ -41,6 +41,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
41
41
  locale: Schema.Literal<["ja", "en", "ko"]>;
42
42
  message: Schema.SchemaClass<string, string, never>;
43
43
  }>]>>;
44
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
44
45
  id: Schema.refine<string, typeof Schema.String>;
45
46
  groupId: Schema.optional<typeof Schema.UUID>;
46
47
  type: Schema.Literal<["com.shwfed.table.column.switch"]>;
@@ -52,6 +52,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
52
52
  return {
53
53
  header: getLocaleText(value.title),
54
54
  accessorFn: (row, index) => {
55
+ if (!value.accessor) return void 0;
55
56
  try {
56
57
  return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
57
58
  } catch (e) {
@@ -3,6 +3,7 @@ import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
5
5
  import { Separator } from "../../../../ui/separator";
6
+ import { Switch } from "../../../../ui/switch";
6
7
  import { Field, FieldLabel } from "../../../../ui/field";
7
8
  import { Locale } from "../../../../ui/locale";
8
9
  import {
@@ -47,6 +48,14 @@ const ROW_VALUE_VARS = {
47
48
  const JSON_VARS = {
48
49
  json: { type: "dyn", label: "HTTP \u54CD\u5E94\u4F53" }
49
50
  };
51
+ function onHiddenChange(v) {
52
+ if (v) {
53
+ value.value = { ...value.value, hidden: true };
54
+ } else {
55
+ const { hidden: _drop, ...rest } = value.value;
56
+ value.value = rest;
57
+ }
58
+ }
50
59
  const disabledModel = computed({
51
60
  get: () => value.value.disabled ?? "",
52
61
  set: (v) => {
@@ -334,6 +343,27 @@ function updateTriggers(next) {
334
343
  </InputGroupAddon>
335
344
  </InputGroup>
336
345
  </Field>
346
+ <Field orientation="vertical">
347
+ <FieldLabel class="text-xs text-zinc-500">
348
+ <template
349
+ v-if="fieldDescription('hidden')"
350
+ #tooltip
351
+ >
352
+ <Markdown
353
+ :source="fieldDescription('hidden')"
354
+ block
355
+ class="prose prose-sm prose-zinc"
356
+ />
357
+ </template>
358
+ {{ fieldTitle("hidden") }}
359
+ </FieldLabel>
360
+ <div>
361
+ <Switch
362
+ :model-value="value.hidden ?? false"
363
+ @update:model-value="onHiddenChange"
364
+ />
365
+ </div>
366
+ </Field>
337
367
  </div>
338
368
  </div>
339
369
  </template>
@@ -29,7 +29,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
29
29
  locale: Schema.Literal<["ja", "en", "ko"]>;
30
30
  message: Schema.SchemaClass<string, string, never>;
31
31
  }>]>;
32
- accessor: Schema.Schema<string, string, never>;
32
+ accessor: Schema.optional<Schema.Schema<string, string, never>>;
33
33
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
34
34
  sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
35
35
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
@@ -41,6 +41,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
41
41
  locale: Schema.Literal<["ja", "en", "ko"]>;
42
42
  message: Schema.SchemaClass<string, string, never>;
43
43
  }>]>>;
44
+ hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
44
45
  id: Schema.refine<string, typeof Schema.String>;
45
46
  groupId: Schema.optional<typeof Schema.UUID>;
46
47
  type: Schema.Literal<["com.shwfed.table.column.switch.remote"]>;
@@ -51,7 +51,6 @@ export function schema(configure) {
51
51
  export function defaults() {
52
52
  return {
53
53
  title: [{ locale: "zh", message: "" }],
54
- accessor: "",
55
54
  size: 120
56
55
  };
57
56
  }
@@ -71,6 +70,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
71
70
  return {
72
71
  header: getLocaleText(value.title),
73
72
  accessorFn: (row, index) => {
73
+ if (!value.accessor) return void 0;
74
74
  try {
75
75
  return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
76
76
  } catch (e) {
@@ -34,6 +34,14 @@ const fieldSchema = schema(() => {
34
34
  });
35
35
  const fieldTitle = (field) => getStructFieldTitle(fieldSchema, field) ?? field;
36
36
  const fieldDescription = (field) => getStructFieldDescription(fieldSchema, field);
37
+ const ALIGN_OPTIONS = [
38
+ { value: "left", label: "\u5DE6\u5BF9\u9F50", icon: "fluent:text-align-left-20-regular" },
39
+ { value: "center", label: "\u5C45\u4E2D", icon: "fluent:text-align-center-20-regular" },
40
+ { value: "right", label: "\u53F3\u5BF9\u9F50", icon: "fluent:text-align-right-20-regular" }
41
+ ];
42
+ const currentAlignIcon = computed(
43
+ () => (ALIGN_OPTIONS.find((o) => o.value === (value.value.align ?? "right")) ?? ALIGN_OPTIONS[2]).icon
44
+ );
37
45
  const ROW_VARS = {
38
46
  row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
39
47
  index: { type: "number", label: "\u884C\u7D22\u5F15" }
@@ -96,17 +104,6 @@ const bindingText = computed({
96
104
  }
97
105
  }
98
106
  });
99
- const hiddenModel = computed({
100
- get: () => value.value.hidden ?? "",
101
- set: (v) => {
102
- if (v === "") {
103
- const { hidden: _drop, ...rest } = value.value;
104
- value.value = rest;
105
- } else {
106
- value.value = { ...value.value, hidden: v };
107
- }
108
- }
109
- });
110
107
  const disabledModel = computed({
111
108
  get: () => value.value.disabled ?? "",
112
109
  set: (v) => {
@@ -172,6 +169,14 @@ function onValueAsStringChange(next) {
172
169
  value.value = rest;
173
170
  }
174
171
  }
172
+ function onHiddenChange(v) {
173
+ if (v) {
174
+ value.value = { ...value.value, hidden: true };
175
+ } else {
176
+ const { hidden: _drop, ...rest } = value.value;
177
+ value.value = rest;
178
+ }
179
+ }
175
180
  function onMinChange(v) {
176
181
  if (v.length > 0) {
177
182
  value.value = { ...value.value, min: v };
@@ -300,6 +305,29 @@ function onMaxChange(v) {
300
305
  {{ fieldTitle("size") }}
301
306
  </FieldLabel>
302
307
  <InputGroup>
308
+ <InputGroupAddon align="inline-start">
309
+ <DropdownMenu>
310
+ <DropdownMenuTrigger as-child>
311
+ <InputGroupButton
312
+ variant="ghost"
313
+ size="xs"
314
+ :title="fieldTitle('align')"
315
+ >
316
+ <Icon :icon="currentAlignIcon" />
317
+ </InputGroupButton>
318
+ </DropdownMenuTrigger>
319
+ <DropdownMenuContent align="start">
320
+ <DropdownMenuItem
321
+ v-for="opt in ALIGN_OPTIONS"
322
+ :key="opt.value"
323
+ @select="value = { ...value, align: opt.value }"
324
+ >
325
+ <Icon :icon="opt.icon" />
326
+ {{ opt.label }}
327
+ </DropdownMenuItem>
328
+ </DropdownMenuContent>
329
+ </DropdownMenu>
330
+ </InputGroupAddon>
303
331
  <InputGroupNumberField
304
332
  :model-value="value.size"
305
333
  :disabled="value.grow"
@@ -461,27 +489,6 @@ function onMaxChange(v) {
461
489
  </Field>
462
490
  </div>
463
491
  <div class="grid grid-cols-2 gap-x-6 gap-y-4">
464
- <Field orientation="vertical">
465
- <FieldLabel class="text-xs text-zinc-500">
466
- <template
467
- v-if="fieldDescription('hidden')"
468
- #tooltip
469
- >
470
- <Markdown
471
- :source="fieldDescription('hidden')"
472
- block
473
- class="prose prose-sm prose-zinc"
474
- />
475
- </template>
476
- {{ fieldTitle("hidden") }}
477
- </FieldLabel>
478
- <ExpressionEditor
479
- v-model="hiddenModel"
480
- placeholder="例:row.archived"
481
- result-type="bool"
482
- :extra-vars="ROW_VARS"
483
- />
484
- </Field>
485
492
  <Field orientation="vertical">
486
493
  <FieldLabel class="text-xs text-zinc-500">
487
494
  <template
@@ -585,6 +592,27 @@ function onMaxChange(v) {
585
592
  </InputGroupAddon>
586
593
  </InputGroup>
587
594
  </Field>
595
+ <Field orientation="vertical">
596
+ <FieldLabel class="text-xs text-zinc-500">
597
+ <template
598
+ v-if="fieldDescription('hidden')"
599
+ #tooltip
600
+ >
601
+ <Markdown
602
+ :source="fieldDescription('hidden')"
603
+ block
604
+ class="prose prose-sm prose-zinc"
605
+ />
606
+ </template>
607
+ {{ fieldTitle("hidden") }}
608
+ </FieldLabel>
609
+ <div>
610
+ <Switch
611
+ :model-value="value.hidden ?? false"
612
+ @update:model-value="onHiddenChange"
613
+ />
614
+ </div>
615
+ </Field>
588
616
  </div>
589
617
  <Separator />
590
618
  <Field orientation="vertical">
@@ -10,6 +10,7 @@ import { getLocalizedText } from "../../../../../share/locale";
10
10
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupNumberField } from "../../../../ui/input-group";
11
11
  import ShwfedActions from "../../../../actions/components/group.vue";
12
12
  import { useFieldValue } from "../../../../form/utils/field-value";
13
+ import { JUSTIFY_CLASS, TEXT_ALIGN_CLASS } from "../../../utils/runtime";
13
14
  defineOptions({ name: "ShwfedTableNumberInputRendererRuntime" });
14
15
  const props = defineProps({
15
16
  column: { type: null, required: true },
@@ -40,7 +41,6 @@ function evalNumber(expression, label) {
40
41
  return void 0;
41
42
  }
42
43
  }
43
- const isHidden = computed(() => evalBool(props.column.hidden, "hidden"));
44
44
  const isDisabled = computed(() => evalBool(props.column.disabled, "disabled"));
45
45
  const formReadonly = useFormReadonly();
46
46
  const isReadonly = computed(
@@ -94,6 +94,8 @@ const addonConfig = computed(() => {
94
94
  };
95
95
  });
96
96
  const showClear = computed(() => !isDisabled.value && draft.value !== void 0);
97
+ const justifyClass = computed(() => JUSTIFY_CLASS[props.column.align ?? "right"] ?? JUSTIFY_CLASS.right);
98
+ const textAlignClass = computed(() => TEXT_ALIGN_CLASS[props.column.align ?? "right"] ?? TEXT_ALIGN_CLASS.right);
97
99
  function handleClear() {
98
100
  draft.value = void 0;
99
101
  commit();
@@ -115,16 +117,12 @@ async function onBlur() {
115
117
  <template>
116
118
  <!--
117
119
  Row budget matches the text-input cell: 2px outer inset around an `h-7`
118
- (28px) input — 32px total. Every branch (hidden / readonly / editable)
120
+ (28px) input — 32px total. Every branch (readonly / editable)
119
121
  is sized identically so rows do not jump when a CEL condition flips.
120
122
  Both `text-[0.75rem]` breakpoints are explicit so `Input`'s default
121
123
  `md:text-sm` cannot beat the override at md+.
122
124
  -->
123
125
  <div class="p-[0.125rem] w-full">
124
- <span
125
- v-if="isHidden"
126
- class="block h-7 w-full"
127
- />
128
126
  <!--
129
127
  Readonly empty state mirrors the `text` column exactly: a centered,
130
128
  faded, non-selectable `-` in `font-mono`, so a readonly grid reads
@@ -132,10 +130,10 @@ async function onBlur() {
132
130
  left-aligned dark text.
133
131
  -->
134
132
  <span
135
- v-else-if="effectiveReadonly"
133
+ v-if="effectiveReadonly"
136
134
  :class="[
137
135
  'flex items-center h-7 w-full px-2 text-[0.75rem] truncate',
138
- draft !== void 0 ? 'text-zinc-700' : 'justify-center font-mono text-zinc-300 select-none'
136
+ draft !== void 0 ? ['text-zinc-700', justifyClass] : 'justify-center font-mono text-zinc-300 select-none'
139
137
  ]"
140
138
  >
141
139
  {{ draft ?? "-" }}
@@ -154,7 +152,7 @@ async function onBlur() {
154
152
  :format-options="formatOptions"
155
153
  :disabled="isDisabled"
156
154
  :placeholder="placeholderText"
157
- input-class="h-7 text-[0.75rem] md:text-[0.75rem] px-2 text-left"
155
+ :input-class="['h-7 text-[0.75rem] md:text-[0.75rem] px-2', textAlignClass]"
158
156
  @update:model-value="(v) => draft = v"
159
157
  @blur="onBlur"
160
158
  />