@shwfed/config 2.4.0 → 2.5.0

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 (315) hide show
  1. package/dist/mcp.mjs +128 -27
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-Bxkq2ZRm.js → config-BkytEQN5.js} +1 -1
  4. package/dist/preview/assets/{config-BdFIFUa_.js → config-CK011_jJ.js} +1 -1
  5. package/dist/preview/assets/{config-BcQQl4v6.js → config-C_bBX0wD.js} +1 -1
  6. package/dist/preview/assets/{config-CHHX7vhb.js → config-Cbn8o9BY.js} +1 -1
  7. package/dist/preview/assets/{config-CZ0f5xdI.js → config-DYL6kHr3.js} +1 -1
  8. package/dist/preview/assets/{config-Ddh8pxIi.js → config-Dx0zHfGt.js} +1 -1
  9. package/dist/preview/assets/{config-D9xGgFnF.js → config-E-DM6b5t.js} +1 -1
  10. package/dist/preview/assets/{config-C32yfrlg.js → config-PjseWUbC.js} +1 -1
  11. package/dist/preview/assets/{config-Bi9F-Jdh.js → config-dwcdYHd4.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_cjxvm1.js → definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js} +1 -1
  13. package/dist/preview/assets/index-7MVXgV5n.css +1 -0
  14. package/dist/preview/assets/index-CmPiZG_4.js +1 -0
  15. package/dist/preview/assets/index-x-77enex.js +668 -0
  16. package/dist/preview/assets/runtime-BRMGkqSr.js +1 -0
  17. package/dist/preview/assets/runtime-CHLboM_z.js +1 -0
  18. package/dist/preview/assets/runtime-CeHdesjP.js +1 -0
  19. package/dist/preview/assets/runtime-D4_9FCLy.js +1 -0
  20. package/dist/preview/assets/runtime-DHBTDws7.js +1 -0
  21. package/dist/preview/assets/runtime-DJHpCLnr.js +1 -0
  22. package/dist/preview/assets/runtime-DKq86fZU.js +1 -0
  23. package/dist/preview/assets/runtime-DjpjaNec.js +1 -0
  24. package/dist/preview/assets/runtime-ZQryOEKm.js +1 -0
  25. package/dist/preview/index.html +2 -2
  26. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +7 -4
  27. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +6 -0
  28. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -1
  29. package/dist/runtime/components/form/ValidationRulesField.d.vue.ts +16 -0
  30. package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
  31. package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
  32. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
  33. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
  34. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
  35. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
  36. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
  37. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
  38. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
  39. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
  40. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
  41. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
  42. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
  43. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
  44. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
  45. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
  46. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
  47. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
  48. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  49. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  50. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  51. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
  52. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
  53. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
  54. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
  55. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
  56. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
  57. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
  58. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
  59. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
  60. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
  61. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
  62. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
  63. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
  64. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
  65. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
  66. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
  67. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
  68. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
  69. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
  70. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
  71. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
  72. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
  73. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
  74. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
  75. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
  76. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
  77. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
  78. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
  79. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
  80. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
  81. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
  82. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
  83. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
  84. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
  85. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
  86. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
  87. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
  88. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
  89. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
  90. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
  91. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
  92. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
  93. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
  94. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
  95. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
  96. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  97. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  98. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  99. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
  100. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
  101. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
  102. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
  103. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
  104. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
  105. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
  106. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
  107. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
  108. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
  109. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
  110. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
  111. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
  112. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
  113. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
  114. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
  115. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
  116. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
  117. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
  118. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
  119. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
  120. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
  121. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
  122. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
  123. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
  124. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
  125. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
  126. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
  127. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
  128. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
  129. package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
  130. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  131. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  132. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  133. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
  134. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
  135. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
  136. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
  137. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
  138. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
  139. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
  140. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
  141. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
  142. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
  143. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  144. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  145. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  146. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  147. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  148. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  149. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  150. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  151. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  152. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  153. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
  154. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  155. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
  156. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  157. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  158. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
  159. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  160. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
  161. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  162. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  163. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
  164. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  165. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
  166. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  167. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  168. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
  169. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  170. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
  171. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  172. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  173. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
  174. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  175. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
  176. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  177. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
  178. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
  179. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
  180. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
  181. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
  182. package/dist/runtime/components/form/index.d.vue.ts +1 -0
  183. package/dist/runtime/components/form/index.vue +14 -18
  184. package/dist/runtime/components/form/index.vue.d.ts +1 -0
  185. package/dist/runtime/components/form/schema.d.ts +2 -10
  186. package/dist/runtime/components/form/schema.js +2 -5
  187. package/dist/runtime/components/form/utils/cel-scope.d.ts +12 -3
  188. package/dist/runtime/components/form/utils/cel-scope.js +17 -18
  189. package/dist/runtime/components/form/utils/common.d.ts +42 -0
  190. package/dist/runtime/components/form/utils/common.js +40 -2
  191. package/dist/runtime/components/form/utils/form-vars.d.ts +19 -0
  192. package/dist/runtime/components/form/utils/form-vars.js +5 -0
  193. package/dist/runtime/components/form/utils/validation.d.ts +85 -0
  194. package/dist/runtime/components/form/utils/validation.js +113 -0
  195. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +20 -8
  196. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +1 -0
  197. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +20 -8
  198. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +1 -0
  199. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +20 -8
  200. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +1 -0
  201. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +20 -8
  202. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +1 -0
  203. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue +20 -8
  204. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +1 -0
  205. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +20 -8
  206. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
  207. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
  208. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue +20 -8
  209. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
  210. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
  211. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +20 -7
  212. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
  213. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue +20 -8
  214. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +1 -0
  215. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +20 -8
  216. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
  217. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +20 -8
  218. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
  219. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -0
  220. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue +20 -8
  221. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -0
  222. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -0
  223. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -0
  224. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue +20 -8
  225. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -0
  226. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -0
  227. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
  228. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +20 -8
  229. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
  230. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
  231. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -0
  232. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +20 -8
  233. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -0
  234. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -0
  235. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -0
  236. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +20 -8
  237. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -0
  238. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -0
  239. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
  240. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +20 -8
  241. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
  242. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
  243. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -0
  244. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue +20 -8
  245. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -0
  246. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -0
  247. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
  248. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue +20 -8
  249. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
  250. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
  251. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -0
  252. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue +20 -8
  253. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -0
  254. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -0
  255. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
  256. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
  257. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
  258. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
  259. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
  260. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
  261. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
  262. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
  263. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
  264. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +20 -8
  265. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
  266. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
  267. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +2 -1
  268. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
  269. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +20 -8
  270. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
  271. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
  272. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +2 -1
  273. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
  274. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
  275. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
  276. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
  277. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
  278. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
  279. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
  280. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
  281. package/dist/runtime/components/table/config.d.vue.ts +4 -2
  282. package/dist/runtime/components/table/config.vue +25 -45
  283. package/dist/runtime/components/table/config.vue.d.ts +4 -2
  284. package/dist/runtime/components/table/index.vue +22 -2
  285. package/dist/runtime/components/table/schema.d.ts +4 -2
  286. package/dist/runtime/components/table/schema.js +69 -13
  287. package/dist/runtime/components/table/utils/shared.d.ts +2 -0
  288. package/dist/runtime/components/table/utils/shared.js +12 -4
  289. package/dist/runtime/components/ui/field/FieldError.vue +1 -1
  290. package/dist/runtime/components/ui/field/FieldMessages.d.vue.ts +9 -0
  291. package/dist/runtime/components/ui/field/FieldMessages.vue +21 -0
  292. package/dist/runtime/components/ui/field/FieldMessages.vue.d.ts +9 -0
  293. package/dist/runtime/components/ui/field/FieldWarning.d.vue.ts +20 -0
  294. package/dist/runtime/components/ui/field/FieldWarning.vue +51 -0
  295. package/dist/runtime/components/ui/field/FieldWarning.vue.d.ts +20 -0
  296. package/dist/runtime/components/ui/field/index.d.ts +2 -0
  297. package/dist/runtime/components/ui/field/index.js +10 -4
  298. package/dist/runtime/components/ui/locale/Locale.d.vue.ts +2 -0
  299. package/dist/runtime/components/ui/locale/Locale.vue +165 -155
  300. package/dist/runtime/components/ui/locale/Locale.vue.d.ts +2 -0
  301. package/dist/runtime/share/form-validate.d.ts +18 -0
  302. package/dist/runtime/share/form-validate.js +8 -0
  303. package/package.json +1 -1
  304. package/dist/preview/assets/index-BqOX70Hd.css +0 -1
  305. package/dist/preview/assets/index-D-VR1i8D.js +0 -659
  306. package/dist/preview/assets/index-ihZGlPdX.js +0 -1
  307. package/dist/preview/assets/runtime-Bn8mqeDH.js +0 -1
  308. package/dist/preview/assets/runtime-Cc_Wk3o-.js +0 -1
  309. package/dist/preview/assets/runtime-CttAjIgg.js +0 -1
  310. package/dist/preview/assets/runtime-Cx4f2UTl.js +0 -1
  311. package/dist/preview/assets/runtime-D1dESjXR.js +0 -1
  312. package/dist/preview/assets/runtime-DIEP1Xbh.js +0 -1
  313. package/dist/preview/assets/runtime-DKceWuBx.js +0 -1
  314. package/dist/preview/assets/runtime-Dhid9O5c.js +0 -1
  315. package/dist/preview/assets/runtime-YMiqi6WY.js +0 -1
@@ -95,7 +95,13 @@ function getLocaleText(value) {
95
95
  return getLocalizedText(value, locale.value);
96
96
  }
97
97
  function mergeCelContext(local) {
98
- return { ...celBindings(inheritedContext), query: queryState.value, ...local };
98
+ return { ...celBindings(inheritedContext), query: queryState.value, sorts: currentSorts(), ...local };
99
+ }
100
+ function currentSorts() {
101
+ const sortKeyById = new Map(
102
+ (config.value?.columns ?? []).map((c) => [c.id, c.sortKey]).filter((e) => typeof e[1] === "string" && e[1].length > 0)
103
+ );
104
+ return tableApi.getState().sorting.map((s) => ({ key: sortKeyById.get(s.id), mode: s.desc ? "desc" : "asc" })).filter((s) => s.key !== void 0);
99
105
  }
100
106
  function translateColumn(column) {
101
107
  const entry = findColumn(column.type, column.compatibilityDate);
@@ -222,6 +228,11 @@ const tableApi = useVueTable({
222
228
  get manualPagination() {
223
229
  return isManualPagination.value;
224
230
  },
231
+ // Defer to server order under server pagination — the page only holds one
232
+ // server-sorted slice, so client re-sorting it would be wrong.
233
+ get manualSorting() {
234
+ return isManualPagination.value;
235
+ },
225
236
  get rowCount() {
226
237
  return isManualPagination.value ? serverTotal.value : void 0;
227
238
  },
@@ -256,6 +267,14 @@ provideCELContext({
256
267
  get value() {
257
268
  return queryState.value;
258
269
  }
270
+ },
271
+ sorts: {
272
+ type: "list<map<string, string>>",
273
+ label: "\u6392\u5E8F\u72B6\u6001",
274
+ description: '\u5F53\u524D\u6392\u5E8F\u5217\u8868\uFF0C\u6BCF\u9879\u4E3A `{key, mode}`\uFF1B`key` \u53D6\u81EA\u5217\u7684\u300C\u6392\u5E8F\u5B57\u6BB5\u300D(sortKey)\uFF0C`mode` \u4E3A `"asc"`/`"desc"`\uFF1B\u672A\u6392\u5E8F\u65F6\u4E3A\u7A7A\u6570\u7EC4\u3002',
275
+ get value() {
276
+ return currentSorts();
277
+ }
259
278
  }
260
279
  });
261
280
  provideSharedFetchLayer();
@@ -423,7 +442,8 @@ watch(
423
442
  () => {
424
443
  if (!isManualPagination.value) return null;
425
444
  const { pageIndex, pageSize } = tableApi.getState().pagination;
426
- return `${pageIndex}:${pageSize}`;
445
+ const sorting = tableApi.getState().sorting;
446
+ return `${pageIndex}:${pageSize}:${JSON.stringify(sorting)}`;
427
447
  },
428
448
  (next, prev) => {
429
449
  if (next !== null && next !== prev) void fetchDataSource();
@@ -96,6 +96,8 @@ export declare const ColumnGroup: Schema.Struct<{
96
96
  }>]>>;
97
97
  }>;
98
98
  export declare function configureTableActionsScope(env: Environment, configure: (env: Environment) => void): void;
99
+ export declare function registerDataSourceRequestVars(env: Environment): void;
100
+ export declare function registerDataSourceResponseVars(env: Environment): void;
99
101
  export declare function DataSource(configure: (env: Environment) => void, extras?: {
100
102
  request?: (env: Environment) => void;
101
103
  data?: (env: Environment) => void;
@@ -104,9 +106,9 @@ export declare function DataSource(configure: (env: Environment) => void, extras
104
106
  data: Schema.Schema<string, string, never>;
105
107
  }>;
106
108
  export declare function tableDataSource(configure: (env: Environment) => void): Schema.Struct<{
107
- total: Schema.optional<Schema.Schema<string, string, never>>;
108
109
  request: Schema.optional<Schema.Schema<string, string, never>>;
109
110
  data: Schema.Schema<string, string, never>;
111
+ total: Schema.optional<Schema.Schema<string, string, never>>;
110
112
  }>;
111
113
  export declare function TableConfig(configure: (env: Environment) => void): Schema.refine<{
112
114
  readonly style?: string | undefined;
@@ -304,9 +306,9 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
304
306
  default: () => never[];
305
307
  }>;
306
308
  dataSource: Schema.optional<Schema.Struct<{
307
- total: Schema.optional<Schema.Schema<string, string, never>>;
308
309
  request: Schema.optional<Schema.Schema<string, string, never>>;
309
310
  data: Schema.Schema<string, string, never>;
311
+ total: Schema.optional<Schema.Schema<string, string, never>>;
310
312
  }>>;
311
313
  actions: Schema.optional<Schema.Struct<{
312
314
  size: Schema.optionalWith<Schema.Literal<["default", "sm", "xs"]>, {
@@ -1,6 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { Expression } from "../../share/expression.js";
3
3
  import { Locale } from "../../share/locale.js";
4
+ import { md } from "../../share/markdown.js";
4
5
  import { ActionSchemaFields } from "../actions/schema.js";
5
6
  import { FormConfig } from "../form/schema.js";
6
7
  import { allColumnSchemas } from "./utils/resolve.js";
@@ -127,6 +128,15 @@ export const ColumnGroup = Schema.Struct({
127
128
  description: "\u5217\u5206\u7EC4\u5B9A\u4E49"
128
129
  });
129
130
  const QUERY_VAR_DESCRIPTION = "\u641C\u7D22\u6761\u4EF6\u5F53\u524D\u72B6\u6001\uFF1B\u672A\u914D\u7F6E\u641C\u7D22\u6761\u4EF6\u65F6\u4E3A\u7A7A\u5BF9\u8C61";
131
+ const JSON_VAR_DESCRIPTION = "\u5DF2\u89E3\u6790\u7684 JSON \u54CD\u5E94\uFF1B\u672A\u914D\u7F6E `request` \u65F6\u4E3A `none`";
132
+ const SORTS_VAR_DESCRIPTION = md`
133
+ 当前的排序状态,为一个**列表**,每个元素包含两个字段:
134
+
135
+ - \`key: string\` 为该列上配置的键
136
+ - \`mode: 'asc' | 'desc'\` 为该列的排序状态
137
+
138
+ 未排序的字段,**不会出现在这个列表中**。
139
+ `;
130
140
  export function configureTableActionsScope(env, configure) {
131
141
  configure(env);
132
142
  env.registerVariable("selected", "list<dyn>", {
@@ -137,6 +147,38 @@ export function configureTableActionsScope(env, configure) {
137
147
  label: "\u641C\u7D22\u6761\u4EF6",
138
148
  description: QUERY_VAR_DESCRIPTION
139
149
  });
150
+ env.registerVariable("sorts", "list<map<string, string>>", {
151
+ label: "\u6392\u5E8F\u72B6\u6001",
152
+ description: SORTS_VAR_DESCRIPTION
153
+ });
154
+ }
155
+ export function registerDataSourceRequestVars(env) {
156
+ env.registerVariable("pageIndex", "number", {
157
+ label: "\u5F53\u524D\u9875\u7801",
158
+ description: "\u4ECE `0` \u5F00\u59CB\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
159
+ });
160
+ env.registerVariable("pageSize", "number", {
161
+ label: "\u6BCF\u9875\u884C\u6570",
162
+ description: "\u5F53\u524D\u6BCF\u9875\u884C\u6570\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A `0`"
163
+ });
164
+ env.registerVariable("sorts", "list<map<string, string>>", {
165
+ label: "\u6392\u5E8F\u72B6\u6001",
166
+ description: SORTS_VAR_DESCRIPTION
167
+ });
168
+ env.registerVariable("query", "dyn", {
169
+ label: "\u641C\u7D22\u6761\u4EF6",
170
+ description: QUERY_VAR_DESCRIPTION
171
+ });
172
+ }
173
+ export function registerDataSourceResponseVars(env) {
174
+ env.registerVariable("json", "optional<dyn>", {
175
+ label: "HTTP \u54CD\u5E94\u4F53",
176
+ description: JSON_VAR_DESCRIPTION
177
+ });
178
+ env.registerVariable("query", "dyn", {
179
+ label: "\u641C\u7D22\u6761\u4EF6",
180
+ description: QUERY_VAR_DESCRIPTION
181
+ });
140
182
  }
141
183
  export function DataSource(configure, extras) {
142
184
  const CelRequest = Expression({
@@ -171,28 +213,36 @@ export function DataSource(configure, extras) {
171
213
  });
172
214
  }
173
215
  export function tableDataSource(configure) {
174
- const base = DataSource(configure, {
175
- request: (env) => {
176
- env.registerVariable("pageIndex", "number", { description: "\u5F53\u524D\u9875\u7801\uFF08\u4ECE 0 \u5F00\u59CB\uFF09\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A 0" });
177
- env.registerVariable("pageSize", "number", { description: "\u6BCF\u9875\u884C\u6570\uFF1B\u672A\u542F\u7528\u5206\u9875\u65F6\u4E3A 0" });
178
- env.registerVariable("query", "dyn", { description: QUERY_VAR_DESCRIPTION });
216
+ const CelRequest = Expression({
217
+ configure: (env) => {
218
+ configure(env);
219
+ registerDataSourceRequestVars(env);
179
220
  },
180
- data: (env) => {
181
- env.registerVariable("query", "dyn", { description: QUERY_VAR_DESCRIPTION });
182
- }
221
+ resultType: "HttpRequest"
222
+ });
223
+ const CelRows = Expression({
224
+ configure: (env) => {
225
+ configure(env);
226
+ registerDataSourceResponseVars(env);
227
+ },
228
+ resultType: (type) => type.startsWith("list") || type === "dyn" || type.startsWith("optional")
183
229
  });
184
230
  const CelTotal = Expression({
185
231
  configure: (env) => {
186
232
  configure(env);
187
- env.registerVariable("json", "optional<dyn>", {
188
- description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u672A\u914D\u7F6E request \u65F6\u4E3A none"
189
- });
190
- env.registerVariable("query", "dyn", { description: QUERY_VAR_DESCRIPTION });
233
+ registerDataSourceResponseVars(env);
191
234
  },
192
235
  resultType: (type) => type === "number" || type === "dyn" || type.startsWith("optional")
193
236
  });
194
237
  return Schema.Struct({
195
- ...base.fields,
238
+ request: Schema.optional(CelRequest).annotations({
239
+ title: "\u8BF7\u6C42",
240
+ description: "\u53EF\u9009\u7684 HTTP \u8BF7\u6C42\u8868\u8FBE\u5F0F\uFF1B\u672A\u914D\u7F6E\u65F6\u6570\u636E\u4ECE `data` \u8868\u8FBE\u5F0F\u4E2D\u8BFB\u53D6\uFF08\u901A\u5E38\u5F15\u7528\u4E0A\u4E0B\u6587\u53D8\u91CF\uFF09"
241
+ }),
242
+ data: CelRows.annotations({
243
+ title: "\u6570\u636E",
244
+ description: "\u8FD4\u56DE\u884C\u6570\u636E\u5217\u8868\uFF08`list<dyn>`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u5728\u914D\u7F6E\u4E86 `request` \u65F6\u53EF\u901A\u8FC7 `json` \u5F15\u7528\u54CD\u5E94\u4F53"
245
+ }),
196
246
  total: Schema.optional(CelTotal).annotations({
197
247
  title: "\u603B\u6570",
198
248
  description: "\u8FD4\u56DE\u603B\u884C\u6570\uFF08`number`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u914D\u7F6E\u540E\u542F\u7528\u670D\u52A1\u7AEF\u5206\u9875\uFF0C\u7559\u7A7A\u5219\u8D70\u524D\u7AEF\u5206\u9875"
@@ -283,6 +333,12 @@ export function TableConfig(configure) {
283
333
  if (cfg.dataSource?.total !== void 0 && cfg.pagination === void 0) {
284
334
  return "\u914D\u7F6E\u4E86 dataSource.total \u65F6\u5FC5\u987B\u542F\u7528\u5206\u9875";
285
335
  }
336
+ for (const col of cfg.columns) {
337
+ const c = col;
338
+ if (c.enableSorting === true && (c.sortKey === void 0 || c.sortKey.length === 0)) {
339
+ return "\u542F\u7528\u6392\u5E8F\u7684\u5217\u5FC5\u987B\u586B\u5199\u300C\u6392\u5E8F\u5B57\u6BB5\u300D(sortKey)";
340
+ }
341
+ }
286
342
  return true;
287
343
  })).annotations({
288
344
  title: "TableConfig",
@@ -17,6 +17,7 @@ export declare function columnFields(configure: (env: Environment) => void): {
17
17
  }>]>;
18
18
  accessor: Schema.Schema<string, string, never>;
19
19
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
20
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
20
21
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
21
22
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
22
23
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -39,6 +40,7 @@ export declare function editableColumnFields(): {
39
40
  }>]>;
40
41
  binding: Schema.refine<string, typeof Schema.String>;
41
42
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
43
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
42
44
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
43
45
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
44
46
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -36,9 +36,13 @@ export function columnFields(configure) {
36
36
  | 数据量 | **全量**,能够跨越多页 | 当前页 |
37
37
  | 开发量 | 需要后端支持,可能影响性能 | **配置即启用,无需后端支持** |
38
38
 
39
- 注意:对于服务端排序,除了在这里打开排序开关,你还需要在「通用配置 → 数据源 → 请求」处,**将正在排序字段、排序状态传给后端**。
39
+ 注意:对于服务端排序,除了在这里打开排序开关,你还需要在「通用配置 → 数据源 → 请求」处,通过 \`sorts\` 变量**将各列「排序字段」(sortKey)、排序方向传给后端**。
40
40
  `
41
41
  })),
42
+ sortKey: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
43
+ title: "\u6392\u5E8F\u5B57\u6BB5",
44
+ description: "\u670D\u52A1\u7AEF\u6392\u5E8F\u65F6\u901A\u8FC7\u6570\u636E\u6E90\u8BF7\u6C42\u7684 `sorts` \u53D8\u91CF\u4F20\u7ED9\u540E\u7AEF\u7684\u5B57\u6BB5\u6807\u8BC6\uFF1B\u542F\u7528\u6392\u5E8F\u65F6\u5FC5\u586B"
45
+ })),
42
46
  size: Schema.optional(Schema.Number.pipe(Schema.finite(), Schema.positive()).annotations({
43
47
  title: "\u5217\u5BBD",
44
48
  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"
@@ -57,7 +61,11 @@ export function editableColumnFields() {
57
61
  }),
58
62
  enableSorting: Schema.optional(Schema.Boolean.annotations({
59
63
  title: "\u5141\u8BB8\u6392\u5E8F",
60
- description: "\u663E\u793A\u6392\u5E8F\u6309\u94AE\uFF1B\u542F\u7528\u5BA2\u6237\u7AEF\u6392\u5E8F\uFF0C\u6309\u5F53\u524D `binding` \u8DEF\u5F84\u4E0A\u7684\u503C\u6392\u5E8F"
64
+ description: "\u663E\u793A\u6392\u5E8F\u6309\u94AE\uFF1B\u5BA2\u6237\u7AEF\u6392\u5E8F\u6309\u5F53\u524D `binding` \u8DEF\u5F84\u4E0A\u7684\u503C\u6392\u5E8F\uFF0C\u670D\u52A1\u7AEF\u6392\u5E8F\u5219\u901A\u8FC7\u6570\u636E\u6E90\u8BF7\u6C42\u7684 `sorts` \u53D8\u91CF\u5C06\u300C\u6392\u5E8F\u5B57\u6BB5\u300D(sortKey) \u4F20\u7ED9\u540E\u7AEF"
65
+ })),
66
+ sortKey: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
67
+ title: "\u6392\u5E8F\u5B57\u6BB5",
68
+ description: "\u670D\u52A1\u7AEF\u6392\u5E8F\u65F6\u901A\u8FC7\u6570\u636E\u6E90\u8BF7\u6C42\u7684 `sorts` \u53D8\u91CF\u4F20\u7ED9\u540E\u7AEF\u7684\u5B57\u6BB5\u6807\u8BC6\uFF1B\u542F\u7528\u6392\u5E8F\u65F6\u5FC5\u586B"
61
69
  })),
62
70
  size: Schema.optional(Schema.Number.pipe(Schema.finite(), Schema.positive()).annotations({
63
71
  title: "\u5217\u5BBD",
@@ -84,10 +92,10 @@ export function editableHeader(titleText) {
84
92
  export function registerRowVariablesIfAbsent(env) {
85
93
  const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
86
94
  if (!declared.has("row")) {
87
- env.registerVariable("row", "dyn", { description: "\u5F53\u524D\u884C\u6570\u636E" });
95
+ env.registerVariable("row", "dyn", { label: "\u5F53\u524D\u884C", description: "\u5F53\u524D\u884C\u6570\u636E" });
88
96
  }
89
97
  if (!declared.has("index")) {
90
- env.registerVariable("index", "number", { description: "\u884C\u7D22\u5F15" });
98
+ env.registerVariable("index", "number", { label: "\u884C\u5E8F\u53F7", description: "\u884C\u7D22\u5F15" });
91
99
  }
92
100
  }
93
101
  function configureWithRow(configure) {
@@ -28,7 +28,7 @@ const content = computed(() => {
28
28
  v-if="$slots.default || content"
29
29
  role="alert"
30
30
  data-slot="field-error"
31
- :class="cn('absolute left-0 top-full z-10 max-w-full pt-0.25 text-red-600 text-xs leading-tight font-normal', props.class)"
31
+ :class="cn('max-w-full pt-0.25 text-red-600 text-xs leading-tight font-normal', props.class)"
32
32
  >
33
33
  <slot v-if="$slots.default" />
34
34
 
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ errors?: ReadonlyArray<string>;
5
+ warnings?: ReadonlyArray<string>;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,21 @@
1
+ <script setup>
2
+ import { cn } from "../../../utils/cn";
3
+ import FieldError from "./FieldError.vue";
4
+ import FieldWarning from "./FieldWarning.vue";
5
+ const props = defineProps({
6
+ class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
7
+ errors: { type: Array, required: false },
8
+ warnings: { type: Array, required: false }
9
+ });
10
+ </script>
11
+
12
+ <template>
13
+ <div
14
+ v-if="errors && errors.length || warnings && warnings.length"
15
+ data-slot="field-messages"
16
+ :class="cn('absolute left-0 top-full z-10 flex w-full flex-col gap-0.5', props.class)"
17
+ >
18
+ <FieldError :errors="errors ? [...errors] : void 0" />
19
+ <FieldWarning :errors="warnings ? [...warnings] : void 0" />
20
+ </div>
21
+ </template>
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ errors?: ReadonlyArray<string>;
5
+ warnings?: ReadonlyArray<string>;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ errors?: Array<string | {
5
+ message: string | undefined;
6
+ } | undefined>;
7
+ };
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,51 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { cn } from "../../../utils/cn";
4
+ const props = defineProps({
5
+ class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
6
+ errors: { type: Array, required: false }
7
+ });
8
+ const content = computed(() => {
9
+ if (!props.errors || props.errors.length === 0)
10
+ return null;
11
+ const unique = [
12
+ ...new Map(
13
+ props.errors.filter(Boolean).map((error) => {
14
+ const message = typeof error === "string" ? error : error?.message;
15
+ return [message, error];
16
+ })
17
+ ).values()
18
+ ];
19
+ if (unique.length === 1 && unique[0]) {
20
+ return typeof unique[0] === "string" ? unique[0] : unique[0].message;
21
+ }
22
+ return unique.map((error) => typeof error === "string" ? error : error?.message);
23
+ });
24
+ </script>
25
+
26
+ <template>
27
+ <div
28
+ v-if="$slots.default || content"
29
+ role="status"
30
+ data-slot="field-warning"
31
+ :class="cn('max-w-full pt-0.25 text-amber-600 text-xs leading-tight font-normal', props.class)"
32
+ >
33
+ <slot v-if="$slots.default" />
34
+
35
+ <template v-else-if="typeof content === 'string'">
36
+ {{ content }}
37
+ </template>
38
+
39
+ <ul
40
+ v-else-if="Array.isArray(content)"
41
+ class="ml-3 flex list-disc flex-col gap-0.5"
42
+ >
43
+ <li
44
+ v-for="(warning, index) in content"
45
+ :key="index"
46
+ >
47
+ {{ warning }}
48
+ </li>
49
+ </ul>
50
+ </div>
51
+ </template>
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ errors?: Array<string | {
5
+ message: string | undefined;
6
+ } | undefined>;
7
+ };
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -10,6 +10,8 @@ export { default as FieldError } from './FieldError.vue.js';
10
10
  export { default as FieldGroup } from './FieldGroup.vue.js';
11
11
  export { default as FieldLabel } from './FieldLabel.vue.js';
12
12
  export { default as FieldLegend } from './FieldLegend.vue.js';
13
+ export { default as FieldMessages } from './FieldMessages.vue.js';
13
14
  export { default as FieldSeparator } from './FieldSeparator.vue.js';
15
+ export { default as FieldWarning } from './FieldWarning.vue.js';
14
16
  export { default as FieldSet } from './FieldSet.vue.js';
15
17
  export { default as FieldTitle } from './FieldTitle.vue.js';
@@ -1,6 +1,6 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  export const fieldVariants = cva(
3
- "group/field flex w-full gap-2 data-[invalid=true]:text-red-400",
3
+ "group/field relative flex w-full gap-2 data-[invalid=true]:text-red-400",
4
4
  {
5
5
  variants: {
6
6
  orientation: {
@@ -25,11 +25,15 @@ export const fieldVariants = cva(
25
25
  "**:data-[slot=field-label]:px-1",
26
26
  "**:data-[slot=field-label]:text-sm",
27
27
  "has-data-[value=true]:**:data-[slot=field-label]:text-[0.625rem]",
28
- "has-[[data-slot=input-group-control]:focus]:**:data-[slot=field-label]:top-0",
28
+ // Float on focus via `focus-within`, NOT `[data-slot=input-group-control]:focus`:
29
+ // `InputGroupInput`/`InputGroupTextarea` forward that slot to `Input`/`Textarea`,
30
+ // which hard-code `data-slot=input`/`textarea` on the focusable element, so the
31
+ // forwarded slot never lands there and the focus selector would never match.
32
+ "focus-within:**:data-[slot=field-label]:top-0",
29
33
  "has-data-[state=open]:**:data-[slot=field-label]:top-0",
30
- "has-[[data-slot=input-group-control]:focus]:**:data-[slot=field-label]:text-[0.625rem]",
34
+ "focus-within:**:data-[slot=field-label]:text-[0.625rem]",
31
35
  "has-data-[state=open]:**:data-[slot=field-label]:text-[0.625rem]",
32
- "has-[[data-slot=input-group-control]:focus]:**:data-[slot=field-label]:text-zinc-700",
36
+ "focus-within:**:data-[slot=field-label]:text-zinc-700",
33
37
  "has-data-[state=open]:**:data-[slot=field-label]:text-zinc-700",
34
38
  "has-data-[value=true]:**:data-[slot=field-label]:text-zinc-700",
35
39
  "data-[disabled=true]:**:data-[slot=field-label]:text-zinc-400",
@@ -61,6 +65,8 @@ export { default as FieldError } from "./FieldError.vue";
61
65
  export { default as FieldGroup } from "./FieldGroup.vue";
62
66
  export { default as FieldLabel } from "./FieldLabel.vue";
63
67
  export { default as FieldLegend } from "./FieldLegend.vue";
68
+ export { default as FieldMessages } from "./FieldMessages.vue";
64
69
  export { default as FieldSeparator } from "./FieldSeparator.vue";
70
+ export { default as FieldWarning } from "./FieldWarning.vue";
65
71
  export { default as FieldSet } from "./FieldSet.vue";
66
72
  export { default as FieldTitle } from "./FieldTitle.vue";
@@ -5,6 +5,8 @@ type __VLS_Props = {
5
5
  class?: HTMLAttributes['class'];
6
6
  multiline?: boolean;
7
7
  markdown?: boolean;
8
+ floating?: boolean;
9
+ placeholder?: string;
8
10
  translateHint?: string;
9
11
  };
10
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {