@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
@@ -33,6 +33,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly locale: "en" | "ja" | "ko";
34
34
  readonly message: string;
35
35
  }[]] | undefined;
36
+ readonly required?: string | undefined;
36
37
  readonly displayName?: string | undefined;
37
38
  readonly compatibilityDate: "2026-05-28";
38
39
  readonly readonly?: string | undefined;
@@ -56,6 +57,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
56
57
  }[]];
57
58
  readonly expandAll: boolean;
58
59
  readonly cascade: "independent" | "cascade-down" | "cascade-both";
60
+ readonly validations?: readonly {
61
+ readonly message: readonly [{
62
+ readonly locale: "zh";
63
+ readonly message: string;
64
+ }, ...{
65
+ readonly locale: "en" | "ja" | "ko";
66
+ readonly message: string;
67
+ }[]];
68
+ readonly warning?: boolean | undefined;
69
+ readonly when: string;
70
+ }[] | undefined;
59
71
  readonly nodeTooltip?: readonly [{
60
72
  readonly locale: "zh";
61
73
  readonly message: string;
@@ -96,6 +108,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
96
108
  readonly locale: "en" | "ja" | "ko";
97
109
  readonly message: string;
98
110
  }[]] | undefined;
111
+ readonly required?: string | undefined;
99
112
  readonly displayName?: string | undefined;
100
113
  readonly compatibilityDate: "2026-05-28";
101
114
  readonly readonly?: string | undefined;
@@ -119,6 +132,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
119
132
  }[]];
120
133
  readonly expandAll: boolean;
121
134
  readonly cascade: "independent" | "cascade-down" | "cascade-both";
135
+ readonly validations?: readonly {
136
+ readonly message: readonly [{
137
+ readonly locale: "zh";
138
+ readonly message: string;
139
+ }, ...{
140
+ readonly locale: "en" | "ja" | "ko";
141
+ readonly message: string;
142
+ }[]];
143
+ readonly warning?: boolean | undefined;
144
+ readonly when: string;
145
+ }[] | undefined;
122
146
  readonly nodeTooltip?: readonly [{
123
147
  readonly locale: "zh";
124
148
  readonly message: string;
@@ -8,7 +8,7 @@ import { cel as _rawCel } from "../../../../../utils/cel";
8
8
  import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
9
9
  import { getLocalizedText } from "../../../../../share/locale";
10
10
  import { Checkbox } from "../../../../ui/checkbox";
11
- import { Field, FieldLabel } from "../../../../ui/field";
11
+ import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
12
12
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
13
13
  import { Markdown } from "../../../../ui/markdown";
14
14
  import { Skeleton } from "../../../../ui/skeleton";
@@ -16,6 +16,7 @@ import { Tree as UiTree } from "../../../../ui/tree";
16
16
  import { interpolateMarkdown } from "../../../../table/utils/runtime";
17
17
  import { useFormReadonly } from "../../../utils/readonly";
18
18
  import { useFormState } from "../../../utils/state";
19
+ import { useFieldValidation } from "../../../utils/validation";
19
20
  defineOptions({ name: "ShwfedTreeMultiFieldRuntime" });
20
21
  const props = defineProps({
21
22
  fieldId: { type: String, required: true },
@@ -72,6 +73,12 @@ const isReadonly = computed(
72
73
  () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
73
74
  );
74
75
  const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
76
+ const { isRequired, errors, warnings, visible } = useFieldValidation({
77
+ fieldId: () => props.fieldId,
78
+ config: () => props.config,
79
+ $cel,
80
+ locale: () => locale.value
81
+ });
75
82
  const uncontrolled = ref([]);
76
83
  const model = computed({
77
84
  get: () => {
@@ -292,7 +299,11 @@ const readonlyText = computed(() => {
292
299
  class="prose prose-xs prose-zinc"
293
300
  />
294
301
  </template>
295
- {{ labelText }}
302
+ {{ labelText }}<span
303
+ v-if="isRequired"
304
+ aria-hidden="true"
305
+ class="text-red-600"
306
+ > *</span>
296
307
  </FieldLabel>
297
308
 
298
309
  <div
@@ -397,5 +408,10 @@ const readonlyText = computed(() => {
397
408
  </template>
398
409
  </UiTree>
399
410
  </template>
411
+ <FieldMessages
412
+ v-if="visible"
413
+ :errors="errors"
414
+ :warnings="warnings"
415
+ />
400
416
  </Field>
401
417
  </template>
@@ -93,6 +93,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
93
93
  id: Schema.refine<string, typeof Schema.String>;
94
94
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
95
95
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
96
+ required: Schema.optional<Schema.Schema<string, string, never>>;
97
+ validations: Schema.optional<Schema.Array$<Schema.Struct<{
98
+ when: Schema.Schema<string, string, never>;
99
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
100
+ message: Schema.refine<readonly [{
101
+ readonly locale: "zh";
102
+ readonly message: string;
103
+ }, ...{
104
+ readonly locale: "en" | "ja" | "ko";
105
+ readonly message: string;
106
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
107
+ locale: Schema.Literal<["zh"]>;
108
+ message: Schema.SchemaClass<string, string, never>;
109
+ }>], [Schema.Struct<{
110
+ locale: Schema.Literal<["ja", "en", "ko"]>;
111
+ message: Schema.SchemaClass<string, string, never>;
112
+ }>]>>;
113
+ }>>>;
96
114
  type: Schema.Literal<["com.shwfed.form.field.tree.multi"]>;
97
115
  compatibilityDate: Schema.Literal<["2026-05-28"]>;
98
116
  }>;
@@ -33,6 +33,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly locale: "en" | "ja" | "ko";
34
34
  readonly message: string;
35
35
  }[]] | undefined;
36
+ readonly required?: string | undefined;
36
37
  readonly displayName?: string | undefined;
37
38
  readonly compatibilityDate: "2026-05-28";
38
39
  readonly readonly?: string | undefined;
@@ -55,6 +56,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
55
56
  readonly message: string;
56
57
  }[]];
57
58
  readonly expandAll: boolean;
59
+ readonly validations?: readonly {
60
+ readonly message: readonly [{
61
+ readonly locale: "zh";
62
+ readonly message: string;
63
+ }, ...{
64
+ readonly locale: "en" | "ja" | "ko";
65
+ readonly message: string;
66
+ }[]];
67
+ readonly warning?: boolean | undefined;
68
+ readonly when: string;
69
+ }[] | undefined;
58
70
  readonly nodeTooltip?: readonly [{
59
71
  readonly locale: "zh";
60
72
  readonly message: string;
@@ -95,6 +107,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
95
107
  readonly locale: "en" | "ja" | "ko";
96
108
  readonly message: string;
97
109
  }[]] | undefined;
110
+ readonly required?: string | undefined;
98
111
  readonly displayName?: string | undefined;
99
112
  readonly compatibilityDate: "2026-05-28";
100
113
  readonly readonly?: string | undefined;
@@ -117,6 +130,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
117
130
  readonly message: string;
118
131
  }[]];
119
132
  readonly expandAll: boolean;
133
+ readonly validations?: readonly {
134
+ readonly message: readonly [{
135
+ readonly locale: "zh";
136
+ readonly message: string;
137
+ }, ...{
138
+ readonly locale: "en" | "ja" | "ko";
139
+ readonly message: string;
140
+ }[]];
141
+ readonly warning?: boolean | undefined;
142
+ readonly when: string;
143
+ }[] | undefined;
120
144
  readonly nodeTooltip?: readonly [{
121
145
  readonly locale: "zh";
122
146
  readonly message: string;
@@ -2,6 +2,7 @@
2
2
  import { computed } from "vue";
3
3
  import { ExpressionEditor } from "../../../../ui/expression-editor";
4
4
  import DerivedValueEditor from "../../../DerivedValueEditor.vue";
5
+ import ValidationRulesField from "../../../ValidationRulesField.vue";
5
6
  import { Field, FieldLabel } from "../../../../ui/field";
6
7
  import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
7
8
  import { Locale as LocaleField } from "../../../../ui/locale";
@@ -477,6 +478,26 @@ function setFilterKeywords(next) {
477
478
 
478
479
  <!-- 通用:隐藏 / 禁用 / 只读 + 派生值 — conventionally last -->
479
480
  <div class="grid grid-cols-3 gap-3">
481
+ <Field orientation="vertical">
482
+ <FieldLabel class="text-xs text-zinc-500">
483
+ <template #tooltip>
484
+ <Markdown
485
+ :source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
486
+ block
487
+ class="prose prose-sm prose-zinc"
488
+ />
489
+ </template>
490
+ {{ fieldTitle("required") }}
491
+ </FieldLabel>
492
+ <ExpressionEditor
493
+ :model-value="value.required ?? ''"
494
+ placeholder="例:form.type == 'company'"
495
+ result-type="bool"
496
+ class="min-h-10"
497
+ @update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
498
+ />
499
+ </Field>
500
+
480
501
  <Field orientation="vertical">
481
502
  <FieldLabel class="text-xs text-zinc-500">
482
503
  <template #tooltip>
@@ -556,5 +577,22 @@ function setFilterKeywords(next) {
556
577
  @update:model-value="(v) => value = { ...value, derived: v }"
557
578
  />
558
579
  </Field>
580
+
581
+ <Field orientation="vertical">
582
+ <FieldLabel class="text-xs text-zinc-500">
583
+ <template #tooltip>
584
+ <Markdown
585
+ :source="fieldDescription('validations')"
586
+ block
587
+ class="prose prose-sm prose-zinc"
588
+ />
589
+ </template>
590
+ {{ fieldTitle("validations") }}
591
+ </FieldLabel>
592
+ <ValidationRulesField
593
+ :model-value="value.validations"
594
+ @update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
595
+ />
596
+ </Field>
559
597
  </div>
560
598
  </template>
@@ -33,6 +33,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly locale: "en" | "ja" | "ko";
34
34
  readonly message: string;
35
35
  }[]] | undefined;
36
+ readonly required?: string | undefined;
36
37
  readonly displayName?: string | undefined;
37
38
  readonly compatibilityDate: "2026-05-28";
38
39
  readonly readonly?: string | undefined;
@@ -55,6 +56,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
55
56
  readonly message: string;
56
57
  }[]];
57
58
  readonly expandAll: boolean;
59
+ readonly validations?: readonly {
60
+ readonly message: readonly [{
61
+ readonly locale: "zh";
62
+ readonly message: string;
63
+ }, ...{
64
+ readonly locale: "en" | "ja" | "ko";
65
+ readonly message: string;
66
+ }[]];
67
+ readonly warning?: boolean | undefined;
68
+ readonly when: string;
69
+ }[] | undefined;
58
70
  readonly nodeTooltip?: readonly [{
59
71
  readonly locale: "zh";
60
72
  readonly message: string;
@@ -95,6 +107,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
95
107
  readonly locale: "en" | "ja" | "ko";
96
108
  readonly message: string;
97
109
  }[]] | undefined;
110
+ readonly required?: string | undefined;
98
111
  readonly displayName?: string | undefined;
99
112
  readonly compatibilityDate: "2026-05-28";
100
113
  readonly readonly?: string | undefined;
@@ -117,6 +130,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
117
130
  readonly message: string;
118
131
  }[]];
119
132
  readonly expandAll: boolean;
133
+ readonly validations?: readonly {
134
+ readonly message: readonly [{
135
+ readonly locale: "zh";
136
+ readonly message: string;
137
+ }, ...{
138
+ readonly locale: "en" | "ja" | "ko";
139
+ readonly message: string;
140
+ }[]];
141
+ readonly warning?: boolean | undefined;
142
+ readonly when: string;
143
+ }[] | undefined;
120
144
  readonly nodeTooltip?: readonly [{
121
145
  readonly locale: "zh";
122
146
  readonly message: string;
@@ -7,7 +7,7 @@ import { useI18n } from "vue-i18n";
7
7
  import { cel as _rawCel } from "../../../../../utils/cel";
8
8
  import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
9
9
  import { getLocalizedText } from "../../../../../share/locale";
10
- import { Field, FieldLabel } from "../../../../ui/field";
10
+ import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
11
11
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
12
12
  import { Markdown } from "../../../../ui/markdown";
13
13
  import { Skeleton } from "../../../../ui/skeleton";
@@ -15,6 +15,7 @@ import { Tree as UiTree } from "../../../../ui/tree";
15
15
  import { interpolateMarkdown } from "../../../../table/utils/runtime";
16
16
  import { useFormReadonly } from "../../../utils/readonly";
17
17
  import { useFormState } from "../../../utils/state";
18
+ import { useFieldValidation } from "../../../utils/validation";
18
19
  defineOptions({ name: "ShwfedTreeSingleFieldRuntime" });
19
20
  const props = defineProps({
20
21
  fieldId: { type: String, required: true },
@@ -68,6 +69,12 @@ const isReadonly = computed(
68
69
  () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
69
70
  );
70
71
  const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
72
+ const { isRequired, errors, warnings, visible } = useFieldValidation({
73
+ fieldId: () => props.fieldId,
74
+ config: () => props.config,
75
+ $cel,
76
+ locale: () => locale.value
77
+ });
71
78
  const uncontrolled = ref(void 0);
72
79
  const model = computed({
73
80
  get: () => {
@@ -288,7 +295,11 @@ const readonlyText = computed(() => {
288
295
  class="prose prose-xs prose-zinc"
289
296
  />
290
297
  </template>
291
- {{ labelText }}
298
+ {{ labelText }}<span
299
+ v-if="isRequired"
300
+ aria-hidden="true"
301
+ class="text-red-600"
302
+ > *</span>
292
303
  </FieldLabel>
293
304
 
294
305
  <div
@@ -391,5 +402,10 @@ const readonlyText = computed(() => {
391
402
  </template>
392
403
  </UiTree>
393
404
  </template>
405
+ <FieldMessages
406
+ v-if="visible"
407
+ :errors="errors"
408
+ :warnings="warnings"
409
+ />
394
410
  </Field>
395
411
  </template>
@@ -89,6 +89,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
89
89
  id: Schema.refine<string, typeof Schema.String>;
90
90
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
91
91
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
92
+ required: Schema.optional<Schema.Schema<string, string, never>>;
93
+ validations: Schema.optional<Schema.Array$<Schema.Struct<{
94
+ when: Schema.Schema<string, string, never>;
95
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
96
+ message: Schema.refine<readonly [{
97
+ readonly locale: "zh";
98
+ readonly message: string;
99
+ }, ...{
100
+ readonly locale: "en" | "ja" | "ko";
101
+ readonly message: string;
102
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
103
+ locale: Schema.Literal<["zh"]>;
104
+ message: Schema.SchemaClass<string, string, never>;
105
+ }>], [Schema.Struct<{
106
+ locale: Schema.Literal<["ja", "en", "ko"]>;
107
+ message: Schema.SchemaClass<string, string, never>;
108
+ }>]>>;
109
+ }>>>;
92
110
  type: Schema.Literal<["com.shwfed.form.field.tree.single"]>;
93
111
  compatibilityDate: Schema.Literal<["2026-05-28"]>;
94
112
  }>;
@@ -13,6 +13,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
13
13
  seeded: Promise<void>;
14
14
  flush: () => void;
15
15
  settled: () => Promise<void>;
16
+ validate: () => Promise<boolean>;
16
17
  undo: () => void;
17
18
  redo: () => void;
18
19
  canUndo: import("vue").Ref<boolean, boolean>;
@@ -10,12 +10,15 @@ import {
10
10
  provideCELContext
11
11
  } from "../../utils/cel-context";
12
12
  import FormUnitRenderer from "./FormUnitRenderer.vue";
13
+ import { buildFormRuntimeScope } from "./utils/cel-scope";
13
14
  import { provideCommitBus } from "./utils/commit-bus";
14
15
  import { provideDerivedQuiescence, useDerived } from "./utils/derived";
15
16
  import { useFormHistory } from "./utils/history";
16
17
  import { evaluateInitial } from "./utils/initial";
18
+ import { provideFormValidate } from "../../share/form-validate";
17
19
  import { provideFormReadonly } from "./utils/readonly";
18
20
  import { provideFormState } from "./utils/state";
21
+ import { provideValidation } from "./utils/validation";
19
22
  defineOptions({ name: "ShwfedForm" });
20
23
  const state = defineModel({ type: Object, ...{ default: () => ({}) } });
21
24
  const config = defineModel("config", { type: Object, ...{ required: true } });
@@ -25,24 +28,10 @@ const props = defineProps({
25
28
  const configure = props.configure ?? (() => {
26
29
  });
27
30
  void configure;
28
- provideCELContext({
29
- form: {
30
- type: "dyn",
31
- label: "form",
32
- description: "\u5F53\u524D\u8868\u5355\u72B6\u6001",
33
- value: () => state.value ?? {}
34
- },
35
- // Same thunk pattern: `now` stays live (fresh Date at click time, not at
36
- // provide time). Must be a `TZDate`: CEL's type registry maps the `Date`
37
- // type to the `TZDate` constructor exactly, so a plain `new Date()` fails
38
- // the constructor lookup.
39
- now: {
40
- type: "Date",
41
- label: "now",
42
- description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4",
43
- value: () => new TZDate()
44
- }
45
- });
31
+ provideCELContext(buildFormRuntimeScope({
32
+ form: () => state.value ?? {},
33
+ now: () => new TZDate()
34
+ }));
46
35
  const inherited = injectCELContext();
47
36
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
48
37
  const formState = provideFormState(state);
@@ -82,11 +71,18 @@ useDerived({
82
71
  formState,
83
72
  quiescence
84
73
  });
74
+ const validation = provideValidation({
75
+ flush: commitBus.flushAll,
76
+ seeded,
77
+ settled: quiescence.settled
78
+ });
79
+ provideFormValidate(validation.validate);
85
80
  const formHistory = useFormHistory(state, { quiescence, seeded, dirty: formState.dirty });
86
81
  defineExpose({
87
82
  seeded,
88
83
  flush: commitBus.flushAll,
89
84
  settled: quiescence.settled,
85
+ validate: validation.validate,
90
86
  undo: formHistory.undo,
91
87
  redo: formHistory.redo,
92
88
  canUndo: formHistory.canUndo,
@@ -13,6 +13,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
13
13
  seeded: Promise<void>;
14
14
  flush: () => void;
15
15
  settled: () => Promise<void>;
16
+ validate: () => Promise<boolean>;
16
17
  undo: () => void;
17
18
  redo: () => void;
18
19
  canUndo: import("vue").Ref<boolean, boolean>;
@@ -1,6 +1,7 @@
1
1
  import { Schema } from 'effect';
2
2
  import type { Environment } from '../../vendor/cel-js/lib/index.js';
3
3
  import type { InitialSource } from './utils/initial.js';
4
+ import { registerFormVariablesIfAbsent } from './utils/form-vars.js';
4
5
  import { type LayoutSetValue } from '../../share/layout.js';
5
6
  export { commonFieldFields } from './utils/common.js';
6
7
  export { getStructFieldTitle, getStructFieldDescription } from './utils/schema-meta.js';
@@ -69,16 +70,7 @@ export declare function FormUnit(configure: (env: Environment) => void): Schema.
69
70
  }>;
70
71
  }>>>;
71
72
  }>>;
72
- /**
73
- * Register the form-wide `now` / `form` live variables on `env`, skipping any
74
- * already declared. Idempotent so it composes safely from either side: a
75
- * `FormConfig` nested inside another (the `table` form field embeds a table
76
- * whose `query` is its own sub-form, and the embedding `configure` advertises
77
- * the same pair) would otherwise register `form` twice on one env and the CEL
78
- * registry throws `'form' is already registered`. Mirrors
79
- * `registerRowVariablesIfAbsent`.
80
- */
81
- export declare function registerFormVariablesIfAbsent(env: Environment): void;
73
+ export { registerFormVariablesIfAbsent };
82
74
  export declare function FormConfig(configure: (env: Environment) => void): Schema.refine<{
83
75
  readonly style?: string | undefined;
84
76
  readonly initial?: {
@@ -1,6 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { Expression } from "../../share/expression.js";
3
3
  import { allFieldSchemas } from "./utils/resolve.js";
4
+ import { registerFormVariablesIfAbsent } from "./utils/form-vars.js";
4
5
  import { md } from "../../share/markdown.js";
5
6
  import {
6
7
  LayoutSet,
@@ -37,11 +38,7 @@ export function FormUnit(configure) {
37
38
  description: "\u4E00\u7EC4\u8868\u5355\u5B57\u6BB5\u53CA\u5176\u5E03\u5C40"
38
39
  });
39
40
  }
40
- export function registerFormVariablesIfAbsent(env) {
41
- const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
42
- if (!declared.has("now")) env.registerVariable("now", "Date", { description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4" });
43
- if (!declared.has("form")) env.registerVariable("form", "dyn", { description: "\u5F53\u524D\u8868\u5355\u72B6\u6001" });
44
- }
41
+ export { registerFormVariablesIfAbsent };
45
42
  export function FormConfig(configure) {
46
43
  const formConfigure = (env) => {
47
44
  registerFormVariablesIfAbsent(env);
@@ -2,12 +2,21 @@ import { Environment } from '../../../vendor/cel-js/lib/index.js';
2
2
  import type { CELContext } from '../../../utils/cel-context.js';
3
3
  /**
4
4
  * Builds the CEL variable scope advertised to a form's expression editors and
5
- * AI assists. Seeds the form-wide `form` / `now` live variables, then probes a
6
- * throwaway `Environment` with the host's `configure` to surface any
7
- * host-registered variables (their type / label / description).
5
+ * AI assists. Probes the form-wide `form` / `now` registrar
6
+ * (`registerFormVariablesIfAbsent` the single source of truth, also feeding
7
+ * every field's expression validator) plus the host's `configure` to surface
8
+ * host-registered variables.
8
9
  *
9
10
  * Values are left `undefined` — this scope is for designer-time advertising
10
11
  * and prompt rendering, never evaluation. Extracted from `form/config.vue` so
11
12
  * the field-list AI button can reuse the exact same scope.
12
13
  */
13
14
  export declare function buildFormCelScope(configure: (env: Environment) => void): CELContext;
15
+ /**
16
+ * Builds the runtime form-wide scope provided by `form/index.vue`. The `form` /
17
+ * `now` metadata (type/label/description) is probed from the same
18
+ * `registerFormVariablesIfAbsent` registrar as the designer scope above, so the
19
+ * two can't drift; `values` overlays the live evaluation thunks the designer
20
+ * scope leaves `undefined`, keyed by variable name.
21
+ */
22
+ export declare function buildFormRuntimeScope(values: Record<string, () => unknown>): CELContext;
@@ -1,24 +1,10 @@
1
1
  import { Environment } from "../../../vendor/cel-js/lib/index.js";
2
- export function buildFormCelScope(configure) {
2
+ import { registerFormVariablesIfAbsent } from "./form-vars.js";
3
+ function probeCELContext(register) {
3
4
  const probe = new Environment({ unlistedVariablesAreDyn: false });
4
5
  const baseline = new Set(probe.getDefinitions().variables.map((v) => v.name));
5
- configure(probe);
6
- const out = {
7
- form: {
8
- type: "dyn",
9
- label: "\u8868\u5355\u503C",
10
- description: "\u5F53\u524D\u8868\u5355\u72B6\u6001",
11
- value: void 0
12
- },
13
- // Mirrors the runtime `now` binding in `form/index.vue`. Editors and
14
- // prompts never evaluate, so we leave `value` undefined.
15
- now: {
16
- type: "Date",
17
- label: "now",
18
- description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4",
19
- value: void 0
20
- }
21
- };
6
+ register(probe);
7
+ const out = {};
22
8
  for (const v of probe.getDefinitions().variables) {
23
9
  if (baseline.has(v.name)) continue;
24
10
  out[v.name] = {
@@ -30,3 +16,16 @@ export function buildFormCelScope(configure) {
30
16
  }
31
17
  return out;
32
18
  }
19
+ export function buildFormCelScope(configure) {
20
+ return probeCELContext((env) => {
21
+ registerFormVariablesIfAbsent(env);
22
+ configure(env);
23
+ });
24
+ }
25
+ export function buildFormRuntimeScope(values) {
26
+ const out = probeCELContext(registerFormVariablesIfAbsent);
27
+ for (const [name, value] of Object.entries(values)) {
28
+ if (out[name]) out[name].value = value;
29
+ }
30
+ return out;
31
+ }
@@ -1,9 +1,51 @@
1
1
  import { Schema } from 'effect';
2
2
  import type { Environment } from '../../../vendor/cel-js/lib/index.js';
3
+ /**
4
+ * One field-owned validation rule. Extracted so the config editor
5
+ * (`ValidationRulesField`) can read the `when` / `message` `@title` +
6
+ * `@description` straight off this struct — single source of truth, no
7
+ * duplicated label/tooltip copy. `configure` only shapes the CEL environment;
8
+ * the annotations are static, so a no-op `configure` is fine for metadata.
9
+ */
10
+ export declare function validationRuleStruct(configure: (env: Environment) => void): Schema.Struct<{
11
+ when: Schema.Schema<string, string, never>;
12
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
13
+ message: Schema.refine<readonly [{
14
+ readonly locale: "zh";
15
+ readonly message: string;
16
+ }, ...{
17
+ readonly locale: "en" | "ja" | "ko";
18
+ readonly message: string;
19
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
20
+ locale: Schema.Literal<["zh"]>;
21
+ message: Schema.SchemaClass<string, string, never>;
22
+ }>], [Schema.Struct<{
23
+ locale: Schema.Literal<["ja", "en", "ko"]>;
24
+ message: Schema.SchemaClass<string, string, never>;
25
+ }>]>>;
26
+ }>;
3
27
  export declare function commonFieldFields(configure: (env: Environment) => void): {
4
28
  id: Schema.refine<string, typeof Schema.String>;
5
29
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
6
30
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
31
+ required: Schema.optional<Schema.Schema<string, string, never>>;
32
+ validations: Schema.optional<Schema.Array$<Schema.Struct<{
33
+ when: Schema.Schema<string, string, never>;
34
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
35
+ message: Schema.refine<readonly [{
36
+ readonly locale: "zh";
37
+ readonly message: string;
38
+ }, ...{
39
+ readonly locale: "en" | "ja" | "ko";
40
+ readonly message: string;
41
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
42
+ locale: Schema.Literal<["zh"]>;
43
+ message: Schema.SchemaClass<string, string, never>;
44
+ }>], [Schema.Struct<{
45
+ locale: Schema.Literal<["ja", "en", "ko"]>;
46
+ message: Schema.SchemaClass<string, string, never>;
47
+ }>]>>;
48
+ }>>>;
7
49
  };
8
50
  export declare const FIELD_ORIENTATIONS: readonly ["vertical", "floating"];
9
51
  export type FieldOrientation = typeof FIELD_ORIENTATIONS[number];