@shwfed/config 2.3.29 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/dist/mcp.mjs +47 -9
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-Diuyh0Ex.js → config-BovRv7Mw.js} +1 -1
  4. package/dist/preview/assets/{config-rpX_Mc6I.js → config-ByTxMBcK.js} +1 -1
  5. package/dist/preview/assets/{config-DhsbcNzx.js → config-C7xYpB3N.js} +1 -1
  6. package/dist/preview/assets/{config-CZOeZ8ty.js → config-CH9wsYX8.js} +1 -1
  7. package/dist/preview/assets/{config-aK67Rsw5.js → config-Ch5dL5lp.js} +1 -1
  8. package/dist/preview/assets/{config-Bl80ye-i.js → config-D50Rl2n_.js} +1 -1
  9. package/dist/preview/assets/{config-BJzUh1_G.js → config-DiwVK32V.js} +1 -1
  10. package/dist/preview/assets/{config-6IiXCmyu.js → config-EKVeWrbS.js} +1 -1
  11. package/dist/preview/assets/{config-DaZD4ZSa.js → config-Q86AhjHq.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_jU8d47.js → definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js} +1 -1
  13. package/dist/preview/assets/index-65eB1l4r.css +1 -0
  14. package/dist/preview/assets/index-CIrlYN0M.js +1 -0
  15. package/dist/preview/assets/index-DUDlWaQI.js +661 -0
  16. package/dist/preview/assets/runtime-BP7zXnyG.js +1 -0
  17. package/dist/preview/assets/runtime-BQSwNpLC.js +1 -0
  18. package/dist/preview/assets/runtime-BwR_BbTu.js +1 -0
  19. package/dist/preview/assets/runtime-Ch3JIgUQ.js +1 -0
  20. package/dist/preview/assets/runtime-CjvZcU7X.js +1 -0
  21. package/dist/preview/assets/runtime-Cunk4vOs.js +1 -0
  22. package/dist/preview/assets/runtime-D34aQN00.js +1 -0
  23. package/dist/preview/assets/runtime-a9TOQRwD.js +1 -0
  24. package/dist/preview/assets/runtime-aPt-bW3F.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.form/config.d.vue.ts +2 -0
  29. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
  30. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
  31. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
  32. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
  33. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -0
  34. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -0
  35. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -0
  36. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -0
  37. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +3 -0
  38. package/dist/runtime/components/form/ValidationRulesField.d.vue.ts +16 -0
  39. package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
  40. package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
  41. package/dist/runtime/components/form/config.vue +32 -0
  42. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
  43. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
  44. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
  45. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
  46. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
  47. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
  48. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
  49. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
  50. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
  51. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
  52. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
  53. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
  54. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
  55. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
  56. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
  57. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
  58. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  59. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  60. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  61. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
  62. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
  63. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
  64. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
  65. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
  66. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
  67. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
  68. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
  69. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
  70. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
  71. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
  72. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
  73. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
  74. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
  75. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
  76. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
  77. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
  78. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
  79. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
  80. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
  81. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
  82. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
  83. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
  84. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
  85. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
  86. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
  87. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
  88. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
  89. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
  90. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
  91. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
  92. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
  93. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
  94. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
  95. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
  96. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
  97. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
  98. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
  99. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
  100. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
  101. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
  102. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
  103. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
  104. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
  105. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
  106. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  107. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  108. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  109. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
  110. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
  111. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
  112. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
  113. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
  114. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
  115. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
  116. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
  117. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
  118. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
  119. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
  120. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
  121. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
  122. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
  123. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
  124. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
  125. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
  126. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
  127. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
  128. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
  129. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
  130. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
  131. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
  132. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
  133. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
  134. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
  135. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
  136. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
  137. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
  138. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
  139. package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
  140. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  141. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  142. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  143. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
  144. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
  145. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
  146. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
  147. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
  148. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
  149. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
  150. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
  151. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
  152. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
  153. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  154. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  155. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  156. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  157. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  158. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  159. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  160. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  161. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  162. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  163. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
  164. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  165. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
  166. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  167. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  168. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
  169. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  170. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
  171. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  172. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  173. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
  174. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  175. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
  176. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  177. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  178. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
  179. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  180. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
  181. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  182. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  183. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
  184. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  185. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
  186. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  187. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
  188. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
  189. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
  190. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
  191. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
  192. package/dist/runtime/components/form/index.d.vue.ts +1 -0
  193. package/dist/runtime/components/form/index.vue +16 -5
  194. package/dist/runtime/components/form/index.vue.d.ts +1 -0
  195. package/dist/runtime/components/form/schema.d.ts +4 -0
  196. package/dist/runtime/components/form/schema.js +6 -2
  197. package/dist/runtime/components/form/utils/common.d.ts +42 -0
  198. package/dist/runtime/components/form/utils/common.js +40 -2
  199. package/dist/runtime/components/form/utils/validation.d.ts +85 -0
  200. package/dist/runtime/components/form/utils/validation.js +113 -0
  201. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/config.vue +0 -22
  202. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/header.vue +3 -15
  203. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.d.ts +0 -1
  204. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.js +0 -4
  205. package/dist/runtime/components/table/config.d.vue.ts +4 -2
  206. package/dist/runtime/components/table/config.vue +59 -52
  207. package/dist/runtime/components/table/config.vue.d.ts +4 -2
  208. package/dist/runtime/components/table/schema.d.ts +4 -0
  209. package/dist/runtime/components/table/utils/shared.js +2 -2
  210. package/dist/runtime/components/ui/field/FieldError.vue +1 -1
  211. package/dist/runtime/components/ui/field/FieldMessages.d.vue.ts +9 -0
  212. package/dist/runtime/components/ui/field/FieldMessages.vue +21 -0
  213. package/dist/runtime/components/ui/field/FieldMessages.vue.d.ts +9 -0
  214. package/dist/runtime/components/ui/field/FieldWarning.d.vue.ts +20 -0
  215. package/dist/runtime/components/ui/field/FieldWarning.vue +51 -0
  216. package/dist/runtime/components/ui/field/FieldWarning.vue.d.ts +20 -0
  217. package/dist/runtime/components/ui/field/index.d.ts +2 -0
  218. package/dist/runtime/components/ui/field/index.js +10 -4
  219. package/dist/runtime/components/ui/locale/Locale.d.vue.ts +2 -0
  220. package/dist/runtime/components/ui/locale/Locale.vue +165 -155
  221. package/dist/runtime/components/ui/locale/Locale.vue.d.ts +2 -0
  222. package/dist/runtime/share/form-validate.d.ts +18 -0
  223. package/dist/runtime/share/form-validate.js +8 -0
  224. package/package.json +1 -1
  225. package/dist/preview/assets/index-2eQR4s3q.css +0 -1
  226. package/dist/preview/assets/index-DEF3_MKr.js +0 -659
  227. package/dist/preview/assets/index-Df-thth9.js +0 -1
  228. package/dist/preview/assets/runtime-3p1K6te5.js +0 -1
  229. package/dist/preview/assets/runtime-BcLnafic.js +0 -1
  230. package/dist/preview/assets/runtime-CSaV-359.js +0 -1
  231. package/dist/preview/assets/runtime-CjR8Vi5N.js +0 -1
  232. package/dist/preview/assets/runtime-D_fJCKX_.js +0 -1
  233. package/dist/preview/assets/runtime-DpeCgGEG.js +0 -1
  234. package/dist/preview/assets/runtime-K2a1x0TJ.js +0 -1
  235. package/dist/preview/assets/runtime-g9Zu3VNQ.js +0 -1
  236. package/dist/preview/assets/runtime-jTnh_6Dm.js +0 -1
@@ -107,6 +107,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
107
107
  id: Schema.refine<string, typeof Schema.String>;
108
108
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
109
109
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
110
+ required: Schema.optional<Schema.Schema<string, string, never>>;
111
+ validations: Schema.optional<Schema.Array$<Schema.Struct<{
112
+ when: Schema.Schema<string, string, never>;
113
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
114
+ message: Schema.refine<readonly [{
115
+ readonly locale: "zh";
116
+ readonly message: string;
117
+ }, ...{
118
+ readonly locale: "en" | "ja" | "ko";
119
+ readonly message: string;
120
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
121
+ locale: Schema.Literal<["zh"]>;
122
+ message: Schema.SchemaClass<string, string, never>;
123
+ }>], [Schema.Struct<{
124
+ locale: Schema.Literal<["ja", "en", "ko"]>;
125
+ message: Schema.SchemaClass<string, string, never>;
126
+ }>]>>;
127
+ }>>>;
110
128
  type: Schema.Literal<["com.shwfed.form.field.table"]>;
111
129
  compatibilityDate: Schema.Literal<["2026-05-18"]>;
112
130
  }>;
@@ -10,6 +10,7 @@ import { interpolate } from "../../../../../utils/interpolate";
10
10
  import { InputGroupButton } from "../../../../ui/input-group";
11
11
  import { Markdown } from "../../../../ui/markdown";
12
12
  import FormUnitRenderer from "../../../FormUnitRenderer.vue";
13
+ import { useValidationProvider } from "../../../utils/validation";
13
14
  defineOptions({ name: "ShwfedCollapsibleFieldRuntime" });
14
15
  const props = defineProps({
15
16
  fieldId: { type: String, required: true },
@@ -51,6 +52,21 @@ function isHidden(field) {
51
52
  return false;
52
53
  }
53
54
  }
55
+ const validation = useValidationProvider();
56
+ function collectFieldIds(fields) {
57
+ const ids = [];
58
+ for (const field of fields) {
59
+ ids.push(field.id);
60
+ const unit = field.unit;
61
+ if (unit?.fields) ids.push(...collectFieldIds(unit.fields));
62
+ }
63
+ return ids;
64
+ }
65
+ const childResults = computed(
66
+ () => validation?.revealed.value ? validation.resultsFor(collectFieldIds(props.config.unit.fields)) : []
67
+ );
68
+ const errorCount = computed(() => childResults.value.filter((r) => r.severity === "error").length);
69
+ const warningCount = computed(() => childResults.value.filter((r) => r.severity === "warning").length);
54
70
  </script>
55
71
 
56
72
  <template>
@@ -85,6 +101,16 @@ function isHidden(field) {
85
101
  class="prose prose-sm prose-zinc max-w-none"
86
102
  />
87
103
  </div>
104
+ <span
105
+ v-if="errorCount > 0"
106
+ data-slot="collapsible-error-count"
107
+ class="shrink-0 text-xs text-red-600"
108
+ >{{ errorCount }} 个错误</span>
109
+ <span
110
+ v-else-if="warningCount > 0"
111
+ data-slot="collapsible-warning-count"
112
+ class="shrink-0 text-xs text-amber-600"
113
+ >{{ warningCount }} 个警告</span>
88
114
  </div>
89
115
 
90
116
  <!-- `v-show` (not `v-if`) so children stay mounted while collapsed:
@@ -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-23";
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-23";
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;
@@ -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-23";
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-23";
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;
@@ -92,6 +92,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
92
92
  id: Schema.refine<string, typeof Schema.String>;
93
93
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
94
94
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
95
+ required: Schema.optional<Schema.Schema<string, string, never>>;
96
+ validations: Schema.optional<Schema.Array$<Schema.Struct<{
97
+ when: Schema.Schema<string, string, never>;
98
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
99
+ message: Schema.refine<readonly [{
100
+ readonly locale: "zh";
101
+ readonly message: string;
102
+ }, ...{
103
+ readonly locale: "en" | "ja" | "ko";
104
+ readonly message: string;
105
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
106
+ locale: Schema.Literal<["zh"]>;
107
+ message: Schema.SchemaClass<string, string, never>;
108
+ }>], [Schema.Struct<{
109
+ locale: Schema.Literal<["ja", "en", "ko"]>;
110
+ message: Schema.SchemaClass<string, string, never>;
111
+ }>]>>;
112
+ }>>>;
95
113
  type: Schema.Literal<["com.shwfed.form.field.tree.multi"]>;
96
114
  compatibilityDate: Schema.Literal<["2026-05-23"]>;
97
115
  }>;
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
22
22
  readonly locale: "en" | "ja" | "ko";
23
23
  readonly message: string;
24
24
  }[]] | undefined;
25
+ readonly required?: string | undefined;
25
26
  readonly displayName?: string | undefined;
26
27
  readonly compatibilityDate: "2026-05-24";
27
28
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -40,6 +41,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
40
41
  } | undefined;
41
42
  readonly format?: string | undefined;
42
43
  readonly valueFormat?: string | undefined;
44
+ readonly validations?: readonly {
45
+ readonly message: readonly [{
46
+ readonly locale: "zh";
47
+ readonly message: string;
48
+ }, ...{
49
+ readonly locale: "en" | "ja" | "ko";
50
+ readonly message: string;
51
+ }[]];
52
+ readonly warning?: boolean | undefined;
53
+ readonly when: string;
54
+ }[] | undefined;
43
55
  readonly presets?: readonly {
44
56
  readonly label: readonly [{
45
57
  readonly locale: "zh";
@@ -72,6 +84,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
72
84
  readonly locale: "en" | "ja" | "ko";
73
85
  readonly message: string;
74
86
  }[]] | undefined;
87
+ readonly required?: string | undefined;
75
88
  readonly displayName?: string | undefined;
76
89
  readonly compatibilityDate: "2026-05-24";
77
90
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -90,6 +103,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
103
  } | undefined;
91
104
  readonly format?: string | undefined;
92
105
  readonly valueFormat?: string | undefined;
106
+ readonly validations?: readonly {
107
+ readonly message: readonly [{
108
+ readonly locale: "zh";
109
+ readonly message: string;
110
+ }, ...{
111
+ readonly locale: "en" | "ja" | "ko";
112
+ readonly message: string;
113
+ }[]];
114
+ readonly warning?: boolean | undefined;
115
+ readonly when: string;
116
+ }[] | undefined;
93
117
  readonly presets?: readonly {
94
118
  readonly label: readonly [{
95
119
  readonly locale: "zh";
@@ -5,6 +5,7 @@ import { format as formatDate } from "date-fns";
5
5
  import { Button } from "../../../../ui/button";
6
6
  import { ExpressionEditor } from "../../../../ui/expression-editor";
7
7
  import DerivedValueEditor from "../../../DerivedValueEditor.vue";
8
+ import ValidationRulesField from "../../../ValidationRulesField.vue";
8
9
  import { Field, FieldLabel } from "../../../../ui/field";
9
10
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "../../../../ui/input-group";
10
11
  import { Locale as LocaleField } from "../../../../ui/locale";
@@ -410,6 +411,26 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
410
411
  </Field>
411
412
 
412
413
  <div class="grid grid-cols-3 gap-3">
414
+ <Field orientation="vertical">
415
+ <FieldLabel class="text-xs text-zinc-500">
416
+ <template #tooltip>
417
+ <Markdown
418
+ :source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
419
+ block
420
+ class="prose prose-sm prose-zinc"
421
+ />
422
+ </template>
423
+ {{ fieldTitle("required") }}
424
+ </FieldLabel>
425
+ <ExpressionEditor
426
+ :model-value="value.required ?? ''"
427
+ placeholder="例:form.type == 'company'"
428
+ result-type="bool"
429
+ class="min-h-10"
430
+ @update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
431
+ />
432
+ </Field>
433
+
413
434
  <Field orientation="vertical">
414
435
  <FieldLabel class="text-xs text-zinc-500">
415
436
  <template #tooltip>
@@ -489,5 +510,22 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
489
510
  @update:model-value="(v) => value = { ...value, derived: v }"
490
511
  />
491
512
  </Field>
513
+
514
+ <Field orientation="vertical">
515
+ <FieldLabel class="text-xs text-zinc-500">
516
+ <template #tooltip>
517
+ <Markdown
518
+ :source="fieldDescription('validations')"
519
+ block
520
+ class="prose prose-sm prose-zinc"
521
+ />
522
+ </template>
523
+ {{ fieldTitle("validations") }}
524
+ </FieldLabel>
525
+ <ValidationRulesField
526
+ :model-value="value.validations"
527
+ @update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
528
+ />
529
+ </Field>
492
530
  </div>
493
531
  </template>
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
22
22
  readonly locale: "en" | "ja" | "ko";
23
23
  readonly message: string;
24
24
  }[]] | undefined;
25
+ readonly required?: string | undefined;
25
26
  readonly displayName?: string | undefined;
26
27
  readonly compatibilityDate: "2026-05-24";
27
28
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -40,6 +41,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
40
41
  } | undefined;
41
42
  readonly format?: string | undefined;
42
43
  readonly valueFormat?: string | undefined;
44
+ readonly validations?: readonly {
45
+ readonly message: readonly [{
46
+ readonly locale: "zh";
47
+ readonly message: string;
48
+ }, ...{
49
+ readonly locale: "en" | "ja" | "ko";
50
+ readonly message: string;
51
+ }[]];
52
+ readonly warning?: boolean | undefined;
53
+ readonly when: string;
54
+ }[] | undefined;
43
55
  readonly presets?: readonly {
44
56
  readonly label: readonly [{
45
57
  readonly locale: "zh";
@@ -72,6 +84,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
72
84
  readonly locale: "en" | "ja" | "ko";
73
85
  readonly message: string;
74
86
  }[]] | undefined;
87
+ readonly required?: string | undefined;
75
88
  readonly displayName?: string | undefined;
76
89
  readonly compatibilityDate: "2026-05-24";
77
90
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -90,6 +103,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
103
  } | undefined;
91
104
  readonly format?: string | undefined;
92
105
  readonly valueFormat?: string | undefined;
106
+ readonly validations?: readonly {
107
+ readonly message: readonly [{
108
+ readonly locale: "zh";
109
+ readonly message: string;
110
+ }, ...{
111
+ readonly locale: "en" | "ja" | "ko";
112
+ readonly message: string;
113
+ }[]];
114
+ readonly warning?: boolean | undefined;
115
+ readonly when: string;
116
+ }[] | undefined;
93
117
  readonly presets?: readonly {
94
118
  readonly label: readonly [{
95
119
  readonly locale: "zh";
@@ -7,9 +7,10 @@ import { cel as _rawCel } from "../../../../../utils/cel";
7
7
  import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
8
8
  import { getLocalizedText } from "../../../../../share/locale";
9
9
  import { DatePicker, DATE_PICKER_DEFAULT_FORMATS } from "../../../../ui/date-picker";
10
- import { Field, FieldLabel } from "../../../../ui/field";
10
+ import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
11
11
  import { Markdown } from "../../../../ui/markdown";
12
12
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
13
+ import { useFieldValidation } from "../../../utils/validation";
13
14
  import { useFormReadonly } from "../../../utils/readonly";
14
15
  import { useFormState } from "../../../utils/state";
15
16
  defineOptions({ name: "ShwfedMonthFieldRuntime" });
@@ -43,6 +44,12 @@ const isReadonly = computed(
43
44
  () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
44
45
  );
45
46
  const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
47
+ const { isRequired, errors, warnings, visible } = useFieldValidation({
48
+ fieldId: () => props.fieldId,
49
+ config: () => props.config,
50
+ $cel,
51
+ locale: () => locale.value
52
+ });
46
53
  const resolvedValueFormat = computed(
47
54
  () => props.config.valueFormat ?? DATE_PICKER_DEFAULT_FORMATS.month.value
48
55
  );
@@ -100,7 +107,11 @@ const model = computed({
100
107
  class="prose prose-xs prose-zinc"
101
108
  />
102
109
  </template>
103
- {{ labelText }}
110
+ {{ labelText }}<span
111
+ v-if="isRequired"
112
+ aria-hidden="true"
113
+ class="text-red-600"
114
+ > *</span>
104
115
  </FieldLabel>
105
116
  <div
106
117
  v-if="effectiveReadonly"
@@ -119,5 +130,10 @@ const model = computed({
119
130
  :disabled="isDisabled"
120
131
  :shortcuts="shortcuts"
121
132
  />
133
+ <FieldMessages
134
+ v-if="visible"
135
+ :errors="errors"
136
+ :warnings="warnings"
137
+ />
122
138
  </Field>
123
139
  </template>
@@ -73,6 +73,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
73
73
  id: Schema.refine<string, typeof Schema.String>;
74
74
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
75
75
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
76
+ required: Schema.optional<Schema.Schema<string, string, never>>;
77
+ validations: Schema.optional<Schema.Array$<Schema.Struct<{
78
+ when: Schema.Schema<string, string, never>;
79
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
80
+ message: Schema.refine<readonly [{
81
+ readonly locale: "zh";
82
+ readonly message: string;
83
+ }, ...{
84
+ readonly locale: "en" | "ja" | "ko";
85
+ readonly message: string;
86
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
87
+ locale: Schema.Literal<["zh"]>;
88
+ message: Schema.SchemaClass<string, string, never>;
89
+ }>], [Schema.Struct<{
90
+ locale: Schema.Literal<["ja", "en", "ko"]>;
91
+ message: Schema.SchemaClass<string, string, never>;
92
+ }>]>>;
93
+ }>>>;
76
94
  type: Schema.Literal<["com.shwfed.form.field.month"]>;
77
95
  compatibilityDate: Schema.Literal<["2026-05-24"]>;
78
96
  }>;
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
22
22
  readonly locale: "en" | "ja" | "ko";
23
23
  readonly message: string;
24
24
  }[]] | undefined;
25
+ readonly required?: string | undefined;
25
26
  readonly displayName?: string | undefined;
26
27
  readonly compatibilityDate: "2026-05-24";
27
28
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -48,6 +49,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
48
49
  readonly locale: "en" | "ja" | "ko";
49
50
  readonly message: string;
50
51
  }[]] | undefined;
52
+ readonly validations?: readonly {
53
+ readonly message: readonly [{
54
+ readonly locale: "zh";
55
+ readonly message: string;
56
+ }, ...{
57
+ readonly locale: "en" | "ja" | "ko";
58
+ readonly message: string;
59
+ }[]];
60
+ readonly warning?: boolean | undefined;
61
+ readonly when: string;
62
+ }[] | undefined;
51
63
  readonly presets?: readonly {
52
64
  readonly label: readonly [{
53
65
  readonly locale: "zh";
@@ -81,6 +93,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
81
93
  readonly locale: "en" | "ja" | "ko";
82
94
  readonly message: string;
83
95
  }[]] | undefined;
96
+ readonly required?: string | undefined;
84
97
  readonly displayName?: string | undefined;
85
98
  readonly compatibilityDate: "2026-05-24";
86
99
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -107,6 +120,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
107
120
  readonly locale: "en" | "ja" | "ko";
108
121
  readonly message: string;
109
122
  }[]] | undefined;
123
+ readonly validations?: readonly {
124
+ readonly message: readonly [{
125
+ readonly locale: "zh";
126
+ readonly message: string;
127
+ }, ...{
128
+ readonly locale: "en" | "ja" | "ko";
129
+ readonly message: string;
130
+ }[]];
131
+ readonly warning?: boolean | undefined;
132
+ readonly when: string;
133
+ }[] | undefined;
110
134
  readonly presets?: readonly {
111
135
  readonly label: readonly [{
112
136
  readonly locale: "zh";
@@ -5,6 +5,7 @@ import { computed } from "vue";
5
5
  import { Button } from "../../../../ui/button";
6
6
  import { ExpressionEditor } from "../../../../ui/expression-editor";
7
7
  import DerivedValueEditor from "../../../DerivedValueEditor.vue";
8
+ import ValidationRulesField from "../../../ValidationRulesField.vue";
8
9
  import { Field, FieldLabel } from "../../../../ui/field";
9
10
  import { IconPicker } from "../../../../ui/icon-picker";
10
11
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "../../../../ui/input-group";
@@ -562,6 +563,26 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
562
563
  </Field>
563
564
 
564
565
  <div class="grid grid-cols-3 gap-3">
566
+ <Field orientation="vertical">
567
+ <FieldLabel class="text-xs text-zinc-500">
568
+ <template #tooltip>
569
+ <Markdown
570
+ :source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
571
+ block
572
+ class="prose prose-sm prose-zinc"
573
+ />
574
+ </template>
575
+ {{ fieldTitle("required") }}
576
+ </FieldLabel>
577
+ <ExpressionEditor
578
+ :model-value="value.required ?? ''"
579
+ placeholder="例:form.type == 'company'"
580
+ result-type="bool"
581
+ class="min-h-10"
582
+ @update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
583
+ />
584
+ </Field>
585
+
565
586
  <Field orientation="vertical">
566
587
  <FieldLabel class="text-xs text-zinc-500">
567
588
  <template #tooltip>
@@ -641,5 +662,22 @@ const valueFormatExample = computed(() => previewFormat(value.value.valueFormat
641
662
  @update:model-value="(v) => value = { ...value, derived: v }"
642
663
  />
643
664
  </Field>
665
+
666
+ <Field orientation="vertical">
667
+ <FieldLabel class="text-xs text-zinc-500">
668
+ <template #tooltip>
669
+ <Markdown
670
+ :source="fieldDescription('validations')"
671
+ block
672
+ class="prose prose-sm prose-zinc"
673
+ />
674
+ </template>
675
+ {{ fieldTitle("validations") }}
676
+ </FieldLabel>
677
+ <ValidationRulesField
678
+ :model-value="value.validations"
679
+ @update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
680
+ />
681
+ </Field>
644
682
  </div>
645
683
  </template>
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
22
22
  readonly locale: "en" | "ja" | "ko";
23
23
  readonly message: string;
24
24
  }[]] | undefined;
25
+ readonly required?: string | undefined;
25
26
  readonly displayName?: string | undefined;
26
27
  readonly compatibilityDate: "2026-05-24";
27
28
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -48,6 +49,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
48
49
  readonly locale: "en" | "ja" | "ko";
49
50
  readonly message: string;
50
51
  }[]] | undefined;
52
+ readonly validations?: readonly {
53
+ readonly message: readonly [{
54
+ readonly locale: "zh";
55
+ readonly message: string;
56
+ }, ...{
57
+ readonly locale: "en" | "ja" | "ko";
58
+ readonly message: string;
59
+ }[]];
60
+ readonly warning?: boolean | undefined;
61
+ readonly when: string;
62
+ }[] | undefined;
51
63
  readonly presets?: readonly {
52
64
  readonly label: readonly [{
53
65
  readonly locale: "zh";
@@ -81,6 +93,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
81
93
  readonly locale: "en" | "ja" | "ko";
82
94
  readonly message: string;
83
95
  }[]] | undefined;
96
+ readonly required?: string | undefined;
84
97
  readonly displayName?: string | undefined;
85
98
  readonly compatibilityDate: "2026-05-24";
86
99
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -107,6 +120,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
107
120
  readonly locale: "en" | "ja" | "ko";
108
121
  readonly message: string;
109
122
  }[]] | undefined;
123
+ readonly validations?: readonly {
124
+ readonly message: readonly [{
125
+ readonly locale: "zh";
126
+ readonly message: string;
127
+ }, ...{
128
+ readonly locale: "en" | "ja" | "ko";
129
+ readonly message: string;
130
+ }[]];
131
+ readonly warning?: boolean | undefined;
132
+ readonly when: string;
133
+ }[] | undefined;
110
134
  readonly presets?: readonly {
111
135
  readonly label: readonly [{
112
136
  readonly locale: "zh";
@@ -7,9 +7,10 @@ import { cel as _rawCel } from "../../../../../utils/cel";
7
7
  import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
8
8
  import { getLocalizedText } from "../../../../../share/locale";
9
9
  import { DATE_RANGE_PICKER_DEFAULT_FORMATS, DateRangePicker } from "../../../../ui/date-range-picker";
10
- import { Field, FieldLabel } from "../../../../ui/field";
10
+ import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
11
11
  import { Markdown } from "../../../../ui/markdown";
12
12
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
13
+ import { useFieldValidation } from "../../../utils/validation";
13
14
  import { useFormReadonly } from "../../../utils/readonly";
14
15
  import { useFormState } from "../../../utils/state";
15
16
  defineOptions({ name: "ShwfedMonthRangeFieldRuntime" });
@@ -46,6 +47,12 @@ const isReadonly = computed(
46
47
  () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
47
48
  );
48
49
  const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
50
+ const { isRequired, errors, warnings, visible } = useFieldValidation({
51
+ fieldId: () => props.fieldId,
52
+ config: () => props.config,
53
+ $cel,
54
+ locale: () => locale.value
55
+ });
49
56
  const resolvedValueFormat = computed(
50
57
  () => props.config.valueFormat ?? DATE_RANGE_PICKER_DEFAULT_FORMATS.monthrange.value
51
58
  );
@@ -130,7 +137,11 @@ const readonlyText = computed(() => {
130
137
  class="prose prose-xs prose-zinc"
131
138
  />
132
139
  </template>
133
- {{ labelText }}
140
+ {{ labelText }}<span
141
+ v-if="isRequired"
142
+ aria-hidden="true"
143
+ class="text-red-600"
144
+ > *</span>
134
145
  </FieldLabel>
135
146
  <div
136
147
  v-if="effectiveReadonly"
@@ -151,5 +162,10 @@ const readonlyText = computed(() => {
151
162
  :disabled="isDisabled"
152
163
  :shortcuts="shortcuts"
153
164
  />
165
+ <FieldMessages
166
+ v-if="visible"
167
+ :errors="errors"
168
+ :warnings="warnings"
169
+ />
154
170
  </Field>
155
171
  </template>