@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
@@ -0,0 +1 @@
1
+ import{d as u,aq as p,ag as g,ar as a,as as m,ak as l,e as d,u as x,al as E,am as _,an as h,ao as C,ap as k,o as q}from"./index-DUDlWaQI.js";import{_ as v}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";const R=u({name:"ShwfedHttpRequestActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(o){const e=o,c=C(),i=(n,s)=>E(n,{..._(c),...s}),r=k(),t=h(),f=p(()=>{const n=t?g(()=>t()):a(!0);return m(n,s=>s?l(e.config.expression,i,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}):a(void 0))});return(n,s)=>(q(),d(v,{"action-id":o.buttonId,effect:x(f)},null,8,["action-id","effect"]))}});export{R as default};
@@ -0,0 +1 @@
1
+ import{d as u,ae as i,e as l,u as p,$ as m,o as d,k as f,ah as _,ai as k,al as w,am as x,ao as g}from"./index-DUDlWaQI.js";const B=u({name:"ShwfedMarkdownItemRuntime",__name:"runtime",props:{config:{}},setup(n){const o=n,{locale:s}=i(),t=g(),c=(e,a)=>w(e,{...x(t),...a}),r=m(()=>{const e=_(o.config.content,s.value)??"";return k(e,c)});return(e,a)=>(d(),l(p(f),{"data-slot":"buttons-markdown",source:r.value,class:"prose prose-sm prose-zinc px-1"},null,8,["source"]))}});export{B as default};
@@ -0,0 +1 @@
1
+ import{d as i,aq as f,as as r,au as u,e as d,u as m,al as l,am as p,ao as _,o as g}from"./index-DUDlWaQI.js";import{_ as h}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";const B=i({name:"ShwfedNavigationActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const t=e,o=_(),c=(n,a)=>l(n,{...p(o),...a}),s=f(()=>r(c(t.config.url),n=>u(()=>{window.open(n,t.config.mode)})));return(n,a)=>(g(),d(h,{"action-id":e.buttonId,effect:m(s)},null,8,["action-id","effect"]))}});export{B as default};
@@ -0,0 +1 @@
1
+ import{_ as s}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";import{d as c,aq as o,aE as i,e as r,u as f,ap as u,o as p}from"./index-DUDlWaQI.js";const g=c({name:"ShwfedEventDispatchActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(e){const n=e,t=u(),a=o(()=>i(t,n.config.triggers));return(m,d)=>(p(),r(s,{"action-id":e.buttonId,effect:f(a)},null,8,["action-id","effect"]))}});export{g as default};
@@ -0,0 +1 @@
1
+ import{d as E,aq as _,af as S,au as r,aE as m,aF as j,aG as v,e as x,u as B,al as L,am as b,ap as k,ao as C,o as R}from"./index-DUDlWaQI.js";import{_ as T}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";const O=E({name:"ShwfedHttpDownloadActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(d){const c=d,g=C(),t=(e,n)=>L(e,{...b(g),...n}),l=k(),p=new Set(["success","error","warning","info"]);function f(e){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=e.name,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(n)}const y=_(()=>S(function*(){const{template:e,messageExpression:n,resultExpression:o}=c.config,u=yield*t(e.request);if(!e.download){const s=yield*u.file();return yield*r(()=>f(s)),yield*m(l,c.config.onSuccess)}const a={json:yield*u.json()},i=o===void 0?"success":yield*j(t(o,a),s=>p.has(s)?s:"success");if(n!==void 0){const s=yield*t(n,a);yield*r(()=>v[i](s))}if(i==="success"||i==="info"){const h=yield*(yield*t(e.download,a)).file();yield*r(()=>f(h))}const w={success:c.config.onSuccess,warning:c.config.onWarning,error:c.config.onError,info:c.config.onInfo};return yield*m(l,w[i])}));return(e,n)=>(R(),x(T,{"action-id":d.buttonId,effect:B(y)},null,8,["action-id","effect"]))}});export{O as default};
@@ -0,0 +1 @@
1
+ import{d as l,aH as g,aq as A,as as y,aE as _,e as h,u as S,al as b,am as j,ap as k,aI as C,o as B,ao as E}from"./index-DUDlWaQI.js";import{_ as I}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";const F=l({name:"ShwfedStateWriteActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(r){const s=r,i=E(),f=(e,t)=>b(e,{...j(i),...t}),n=g(),o=n.kind==="form"&&n.parent?n.parent:n,u=k(),m=C((e,t,a)=>{if(Array.isArray(e[t])&&Array.isArray(a))return e[t]=a,!0});function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e,t){return c(e)&&c(t)?m({...t},e):t}const d=A(()=>y(f(s.config.expression),e=>{for(const t of Object.keys(e)){const a=p(o.getAt(t),e[t]);o.setAt(t,a)}return _(u,s.config.onSuccess)}));return(e,t)=>(B(),h(I,{"action-id":r.buttonId,effect:S(d)},null,8,["action-id","effect"]))}});export{F as default};
@@ -0,0 +1 @@
1
+ import{d as s,ae as p,av as x,af as M,ah as c,aw as T,ax as N,e as b,w as d,u,a0 as k,a1 as w,ap as L,au as S,o as A,f as I,ay as z,g as f,az as F,aA as H,a7 as V,ao as $,aB as r,aC as m,aD as j}from"./index-DUDlWaQI.js";import{_ as K}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";const D=s({name:"ShwfedModalLayoutActionRuntime",__name:"runtime",props:{buttonId:{},config:{},buttonTitle:{}},setup(t){const n=t,{locale:l}=p(),v=e=>{},h=$(),i=w(r,void 0),g=L(),o=k(null),C=x(n.buttonId,{close:()=>S(()=>{o.value?.()})},g),y=s({name:"ModalBoundaryBridge",setup(e,{slots:a}){return H(h),m(j,C),i&&m(r,i),()=>a.default?.()}}),E=(e,a)=>V()?.(e,a),_=M(function*(){const e=c(n.config.modalTitle,l.value)??c(n.buttonTitle,l.value)??"",{modal:a,close:B}=yield*T({title:e,width:n.config.modalWidth});o.value=()=>N(B()),yield*a,o.value=null});return(e,a)=>(A(),b(K,{"action-id":t.buttonId,effect:u(_)},{default:d(()=>[I("div",{style:z(t.config.modalMinHeight?`min-height: ${t.config.modalMinHeight}`:void 0)},[f(u(y),null,{default:d(()=>[f(F,{"slot-value":t.config.slot,configure:v,"find-entry":E},null,8,["slot-value"])]),_:1})],4)]),_:1},8,["action-id","effect"]))}});export{D as default};
@@ -0,0 +1 @@
1
+ import{_ as o}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";import{d as n,e as a,u as c,o as f,at as i}from"./index-DUDlWaQI.js";const _=n({name:"ShwfedPrototypeActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(t){const e=i;return(r,s)=>(f(),a(o,{"action-id":t.buttonId,effect:c(e)},null,8,["action-id","effect"]))}});export{_ as default};
@@ -0,0 +1 @@
1
+ import{d as l,ae as u,af as g,ag as m,ah as d,ai as p,aj as x,ak as k,e as E,u as _,al as h,am as w,an as C,ao as I,ap as j,o as v}from"./index-DUDlWaQI.js";import{_ as y}from"./definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js";const q=l({name:"ShwfedHttpRequestConfirmActionRuntime",__name:"runtime",props:{buttonId:{},config:{}},setup(s){const e=s,{locale:c}=u(),i=I(),t=(n,o)=>h(n,{...w(i),...o}),r=j(),a=C(),f=g(function*(){if(a&&!(yield*m(()=>a())))return;const n=d(e.config.markdown,c.value)??"",o=p(n,t);(yield*x({content:o,icon:e.config.icon,color:e.config.color}))||(yield*k(e.config.expression,t,{messageExpression:e.config.messageExpression,resultExpression:e.config.resultExpression,channel:r,triggers:{success:e.config.onSuccess,warning:e.config.onWarning,error:e.config.onError,info:e.config.onInfo}}))});return(n,o)=>(v(),E(y,{"action-id":s.buttonId,effect:_(f)},null,8,["action-id","effect"]))}});export{q as default};
@@ -10,8 +10,8 @@
10
10
  `--primary`, the primary button variant renders as transparent. */
11
11
  body { --primary: #009689; }
12
12
  </style>
13
- <script type="module" crossorigin src="./assets/index-DEF3_MKr.js"></script>
14
- <link rel="stylesheet" crossorigin href="./assets/index-2eQR4s3q.css">
13
+ <script type="module" crossorigin src="./assets/index-DUDlWaQI.js"></script>
14
+ <link rel="stylesheet" crossorigin href="./assets/index-65eB1l4r.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="app"></div>
@@ -3,6 +3,7 @@ import { Effect } from "effect";
3
3
  import { cel as _rawCel } from "../../../../../utils/cel";
4
4
  import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
5
5
  import { useEventChannel } from "../../../../../share/event-bus";
6
+ import { useFormValidate } from "../../../../../share/form-validate";
6
7
  import ShwfedActionDefinition from "../../../components/definition.vue";
7
8
  import { executeHttpRequest } from "../../../utils/resolve";
8
9
  defineOptions({ name: "ShwfedHttpRequestActionRuntime" });
@@ -13,8 +14,10 @@ const props = defineProps({
13
14
  const inherited = injectCELContext();
14
15
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
15
16
  const channel = useEventChannel();
16
- const effect = Effect.suspend(
17
- () => executeHttpRequest(props.config.expression, $cel, {
17
+ const validateForm = useFormValidate();
18
+ const effect = Effect.suspend(() => {
19
+ const gate = validateForm ? Effect.promise(() => validateForm()) : Effect.succeed(true);
20
+ return Effect.flatMap(gate, (ok) => ok ? executeHttpRequest(props.config.expression, $cel, {
18
21
  messageExpression: props.config.messageExpression,
19
22
  resultExpression: props.config.resultExpression,
20
23
  channel,
@@ -24,8 +27,8 @@ const effect = Effect.suspend(
24
27
  error: props.config.onError,
25
28
  info: props.config.onInfo
26
29
  }
27
- })
28
- );
30
+ }) : Effect.succeed(void 0));
31
+ });
29
32
  </script>
30
33
 
31
34
  <template>
@@ -6,6 +6,7 @@ import { reject } from "../../../../../composables/useOverlay";
6
6
  import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
7
7
  import { getLocalizedText } from "../../../../../share/locale";
8
8
  import { useEventChannel } from "../../../../../share/event-bus";
9
+ import { useFormValidate } from "../../../../../share/form-validate";
9
10
  import ShwfedActionDefinition from "../../../components/definition.vue";
10
11
  import { executeHttpRequest, interpolateMarkdown } from "../../../utils/resolve";
11
12
  defineOptions({ name: "ShwfedHttpRequestConfirmActionRuntime" });
@@ -17,7 +18,12 @@ const { locale } = useI18n();
17
18
  const inherited = injectCELContext();
18
19
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
19
20
  const channel = useEventChannel();
21
+ const validateForm = useFormValidate();
20
22
  const effect = Effect.gen(function* () {
23
+ if (validateForm) {
24
+ const ok = yield* Effect.promise(() => validateForm());
25
+ if (!ok) return;
26
+ }
21
27
  const raw = getLocalizedText(props.config.markdown, locale.value) ?? "";
22
28
  const content = interpolateMarkdown(raw, $cel);
23
29
  if (yield* reject({ content, icon: props.config.icon, color: props.config.color })) return;
@@ -10,6 +10,7 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
10
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
11
  "update:modelValue": (value: {
12
12
  readonly form: {
13
+ readonly style?: string | undefined;
13
14
  readonly initial?: {
14
15
  readonly data: string;
15
16
  readonly request?: string | undefined;
@@ -42,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
42
43
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
43
44
  "onUpdate:modelValue"?: ((value: {
44
45
  readonly form: {
46
+ readonly style?: string | undefined;
45
47
  readonly initial?: {
46
48
  readonly data: string;
47
49
  readonly request?: string | undefined;
@@ -10,6 +10,7 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
10
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
11
  "update:modelValue": (value: {
12
12
  readonly form: {
13
+ readonly style?: string | undefined;
13
14
  readonly initial?: {
14
15
  readonly data: string;
15
16
  readonly request?: string | undefined;
@@ -42,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
42
43
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
43
44
  "onUpdate:modelValue"?: ((value: {
44
45
  readonly form: {
46
+ readonly style?: string | undefined;
45
47
  readonly initial?: {
46
48
  readonly data: string;
47
49
  readonly request?: string | undefined;
@@ -12,6 +12,7 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
13
  "update:block": (value: {
14
14
  readonly form: {
15
+ readonly style?: string | undefined;
15
16
  readonly initial?: {
16
17
  readonly data: string;
17
18
  readonly request?: string | undefined;
@@ -45,6 +46,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
45
46
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
46
47
  "onUpdate:block"?: ((value: {
47
48
  readonly form: {
49
+ readonly style?: string | undefined;
48
50
  readonly initial?: {
49
51
  readonly data: string;
50
52
  readonly request?: string | undefined;
@@ -12,6 +12,7 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
13
  "update:block": (value: {
14
14
  readonly form: {
15
+ readonly style?: string | undefined;
15
16
  readonly initial?: {
16
17
  readonly data: string;
17
18
  readonly request?: string | undefined;
@@ -45,6 +46,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
45
46
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
46
47
  "onUpdate:block"?: ((value: {
47
48
  readonly form: {
49
+ readonly style?: string | undefined;
48
50
  readonly initial?: {
49
51
  readonly data: string;
50
52
  readonly request?: string | undefined;
@@ -22,6 +22,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
22
22
  type: Schema.tag<"com.shwfed.block.form">;
23
23
  compatibilityDate: Schema.tag<"2026-05-06">;
24
24
  form: Schema.refine<{
25
+ readonly style?: string | undefined;
25
26
  readonly initial?: {
26
27
  readonly data: string;
27
28
  readonly request?: string | undefined;
@@ -88,6 +89,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
88
89
  data: Schema.Schema<string, string, never>;
89
90
  }>>>;
90
91
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
92
+ style: Schema.optional<typeof Schema.String>;
91
93
  }>>;
92
94
  }>;
93
95
  export declare function defaultBody(): Record<string, unknown>;
@@ -35,6 +35,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
35
35
  }[]] | undefined;
36
36
  }[];
37
37
  readonly query?: {
38
+ readonly style?: string | undefined;
38
39
  readonly initial?: {
39
40
  readonly data: string;
40
41
  readonly request?: string | undefined;
@@ -212,6 +213,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
212
213
  }[]] | undefined;
213
214
  }[];
214
215
  readonly query?: {
216
+ readonly style?: string | undefined;
215
217
  readonly initial?: {
216
218
  readonly data: string;
217
219
  readonly request?: string | undefined;
@@ -35,6 +35,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
35
35
  }[]] | undefined;
36
36
  }[];
37
37
  readonly query?: {
38
+ readonly style?: string | undefined;
38
39
  readonly initial?: {
39
40
  readonly data: string;
40
41
  readonly request?: string | undefined;
@@ -212,6 +213,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
212
213
  }[]] | undefined;
213
214
  }[];
214
215
  readonly query?: {
216
+ readonly style?: string | undefined;
215
217
  readonly initial?: {
216
218
  readonly data: string;
217
219
  readonly request?: string | undefined;
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
30
30
  }[]] | undefined;
31
31
  }[];
32
32
  readonly query?: {
33
+ readonly style?: string | undefined;
33
34
  readonly initial?: {
34
35
  readonly data: string;
35
36
  readonly request?: string | undefined;
@@ -207,6 +208,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
207
208
  }[]] | undefined;
208
209
  }[];
209
210
  readonly query?: {
211
+ readonly style?: string | undefined;
210
212
  readonly initial?: {
211
213
  readonly data: string;
212
214
  readonly request?: string | undefined;
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
30
30
  }[]] | undefined;
31
31
  }[];
32
32
  readonly query?: {
33
+ readonly style?: string | undefined;
33
34
  readonly initial?: {
34
35
  readonly data: string;
35
36
  readonly request?: string | undefined;
@@ -207,6 +208,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
207
208
  }[]] | undefined;
208
209
  }[];
209
210
  readonly query?: {
211
+ readonly style?: string | undefined;
210
212
  readonly initial?: {
211
213
  readonly data: string;
212
214
  readonly request?: string | undefined;
@@ -45,6 +45,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
45
45
  }[]] | undefined;
46
46
  }[];
47
47
  readonly query?: {
48
+ readonly style?: string | undefined;
48
49
  readonly initial?: {
49
50
  readonly data: string;
50
51
  readonly request?: string | undefined;
@@ -349,6 +350,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
349
350
  }, never>>;
350
351
  }>>;
351
352
  query: Schema.optional<Schema.refine<{
353
+ readonly style?: string | undefined;
352
354
  readonly initial?: {
353
355
  readonly data: string;
354
356
  readonly request?: string | undefined;
@@ -415,6 +417,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
415
417
  data: Schema.Schema<string, string, never>;
416
418
  }>>>;
417
419
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
420
+ style: Schema.optional<typeof Schema.String>;
418
421
  }>>>;
419
422
  rowKey: Schema.optional<Schema.Schema<string, string, never>>;
420
423
  cellStyle: Schema.optional<Schema.Schema<string, string, never>>;
@@ -0,0 +1,16 @@
1
+ import type { LocaleValue } from '../../share/locale.js';
2
+ type Rule = {
3
+ when: string;
4
+ warning?: boolean;
5
+ message: LocaleValue;
6
+ };
7
+ type __VLS_Props = {
8
+ modelValue?: ReadonlyArray<Rule>;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (rules: readonly Rule[]) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:modelValue"?: ((rules: readonly Rule[]) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,207 @@
1
+ <script setup>
2
+ import { computed, ref, watch } from "vue";
3
+ import { Icon } from "@iconify/vue";
4
+ import {
5
+ useTreeDnd
6
+ } from "../../composables/useTreeDnd";
7
+ import { Button } from "../ui/button";
8
+ import { ExpressionEditor } from "../ui/expression-editor";
9
+ import { Field, FieldLabel } from "../ui/field";
10
+ import { Switch } from "../ui/switch";
11
+ import { Locale as LocaleField } from "../ui/locale";
12
+ import { Markdown } from "../ui/markdown";
13
+ import { getStructFieldDescription, getStructFieldTitle } from "./utils/schema-meta";
14
+ import { validationRuleStruct } from "./utils/common";
15
+ defineOptions({ name: "ShwfedValidationRulesField" });
16
+ const RULE_META = validationRuleStruct(() => {
17
+ });
18
+ const whenTitle = getStructFieldTitle(RULE_META, "when") ?? "\u6821\u9A8C\u6761\u4EF6";
19
+ const whenDescription = getStructFieldDescription(RULE_META, "when");
20
+ const props = defineProps({
21
+ modelValue: { type: Array, required: false }
22
+ });
23
+ const emit = defineEmits(["update:modelValue"]);
24
+ const rules = computed(() => props.modelValue ?? []);
25
+ const EMPTY_MESSAGE = [{ locale: "zh", message: "" }];
26
+ function makeId() {
27
+ if (typeof crypto !== "undefined" && "randomUUID" in crypto) return crypto.randomUUID();
28
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
29
+ const r = Math.random() * 16 | 0;
30
+ return (c === "x" ? r : r & 3 | 8).toString(16);
31
+ });
32
+ }
33
+ const rowKeys = ref([]);
34
+ watch(
35
+ () => rules.value.length,
36
+ (len) => {
37
+ if (len === rowKeys.value.length) return;
38
+ rowKeys.value = Array.from({ length: len }, () => makeId());
39
+ },
40
+ { immediate: true }
41
+ );
42
+ function addRule() {
43
+ emit("update:modelValue", [...rules.value, { when: "", message: EMPTY_MESSAGE }]);
44
+ rowKeys.value = [...rowKeys.value, makeId()];
45
+ }
46
+ function removeRule(index) {
47
+ emit("update:modelValue", rules.value.filter((_, i) => i !== index));
48
+ rowKeys.value = rowKeys.value.filter((_, i) => i !== index);
49
+ }
50
+ function updateWhen(index, when) {
51
+ emit("update:modelValue", rules.value.map((rule, i) => i === index ? { ...rule, when } : rule));
52
+ }
53
+ function updateWarning(index, warning) {
54
+ emit("update:modelValue", rules.value.map((rule, i) => i === index ? { ...rule, warning } : rule));
55
+ }
56
+ function updateMessage(index, message) {
57
+ emit("update:modelValue", rules.value.map((rule, i) => i === index ? { ...rule, message } : rule));
58
+ }
59
+ function move(from, to) {
60
+ if (from === to) return;
61
+ if (from < 0 || to < 0 || from >= rules.value.length || to >= rules.value.length) return;
62
+ const next = [...rules.value];
63
+ const [rule] = next.splice(from, 1);
64
+ if (!rule) return;
65
+ next.splice(to, 0, rule);
66
+ emit("update:modelValue", next);
67
+ const keys = [...rowKeys.value];
68
+ const [key] = keys.splice(from, 1);
69
+ if (!key) return;
70
+ keys.splice(to, 0, key);
71
+ rowKeys.value = keys;
72
+ }
73
+ const ROW_KIND = "shwfed-validation-rule";
74
+ const rowId = (i) => rowKeys.value[i] ?? `idx-${i}`;
75
+ function onRowDrop(e) {
76
+ if (e.source.kind !== ROW_KIND || e.target.kind !== ROW_KIND) return;
77
+ const from = rowKeys.value.findIndex((k) => k === e.source.id);
78
+ const to = rowKeys.value.findIndex((k) => k === e.target.id);
79
+ if (from < 0 || to < 0) return;
80
+ if (e.instruction === "reorder-above") move(from, from < to ? to - 1 : to);
81
+ else if (e.instruction === "reorder-below") move(from, from <= to ? to : to + 1);
82
+ }
83
+ const dnd = useTreeDnd({ onRowDrop });
84
+ const pickDragHandle = (el) => el.querySelector(".drag-handle");
85
+ function rowConfig(i) {
86
+ return {
87
+ kind: ROW_KIND,
88
+ canDrop: (src) => src.kind === ROW_KIND,
89
+ blockInstructions: (src) => {
90
+ const block = ["make-child", "reparent"];
91
+ if (src.id === rowId(i)) block.push("reorder-above", "reorder-below");
92
+ return block;
93
+ },
94
+ dragHandle: pickDragHandle
95
+ };
96
+ }
97
+ </script>
98
+
99
+ <template>
100
+ <div class="flex flex-col gap-2">
101
+ <div
102
+ v-for="(rule, index) in rules"
103
+ :key="rowKeys[index]"
104
+ :ref="dnd.rowRef(rowId(index), rowConfig(index))"
105
+ data-slot="validation-rule"
106
+ class="relative flex items-start gap-2 rounded border border-zinc-200 bg-zinc-50/40 p-2"
107
+ :data-instruction="dnd.instructionFor(rowId(index)) ?? void 0"
108
+ >
109
+ <Icon
110
+ icon="fluent:re-order-dots-vertical-20-regular"
111
+ class="drag-handle mt-2.5 size-4 shrink-0 cursor-grab text-zinc-400"
112
+ data-slot="validation-rule-drag-handle"
113
+ />
114
+
115
+ <!--
116
+ `items-start` keeps each Field at its own content height — without it the
117
+ grid stretches both cells to the taller (multi-row message) and the
118
+ floating label centers on that inflated height instead of its control.
119
+ With the natural height restored, the standard floating behaviour is
120
+ what we want: the label rests centered (acting as the placeholder) while
121
+ the field is empty + inactive, and floats up to the top-border notch on
122
+ focus or once a value is present. The `when` editor therefore carries no
123
+ explicit placeholder — the label IS the placeholder (the syntax contract
124
+ lives in its tooltip); a separate placeholder would sit under the
125
+ resting label and double up.
126
+ -->
127
+ <div class="grid min-w-0 flex-1 grid-cols-2 items-start gap-2">
128
+ <Field orientation="floating">
129
+ <FieldLabel>
130
+ <template
131
+ v-if="whenDescription"
132
+ #tooltip
133
+ >
134
+ <Markdown
135
+ :source="whenDescription"
136
+ block
137
+ class="prose prose-sm prose-zinc"
138
+ />
139
+ </template>
140
+ {{ whenTitle }}
141
+ </FieldLabel>
142
+ <ExpressionEditor
143
+ :model-value="rule.when"
144
+ result-type="bool"
145
+ class="min-h-10"
146
+ @update:model-value="(v) => updateWhen(index, v)"
147
+ />
148
+ </Field>
149
+
150
+ <!--
151
+ The message is a multi-row Locale — one row per language — so a single
152
+ shared label can't center over the stack. `floating` gives each row
153
+ its own per-language floating label instead; the "消息" semantic is
154
+ carried by the column position opposite 校验条件.
155
+ -->
156
+ <LocaleField
157
+ floating
158
+ markdown
159
+ translate-hint="form field validation message"
160
+ :model-value="rule.message"
161
+ @update:model-value="(v) => updateMessage(index, v)"
162
+ />
163
+ </div>
164
+
165
+ <!--
166
+ Severity switch — off (default) is error (blocks submit, reds the
167
+ field), on is warning (yellow hint, never blocks). Stacked label keeps
168
+ it self-describing in the narrow action column.
169
+ -->
170
+ <label
171
+ class="mt-1 flex shrink-0 cursor-pointer flex-col items-center gap-1 text-xs text-zinc-600 select-none"
172
+ data-slot="validation-rule-severity"
173
+ >
174
+ <Switch
175
+ size="sm"
176
+ :model-value="rule.warning ?? false"
177
+ @update:model-value="(v) => updateWarning(index, v)"
178
+ />
179
+ 仅警告
180
+ </label>
181
+
182
+ <Button
183
+ variant="ghost"
184
+ size="sm"
185
+ class="mt-1.5 text-red-600 hover:text-red-700"
186
+ aria-label="移除"
187
+ @click="removeRule(index)"
188
+ >
189
+ <Icon icon="fluent:delete-20-regular" />
190
+ </Button>
191
+ </div>
192
+
193
+ <Button
194
+ type="button"
195
+ data-slot="validation-add"
196
+ class="w-full justify-center"
197
+ @click="addRule"
198
+ >
199
+ <Icon icon="fluent:add-20-regular" />
200
+ <span>添加校验规则</span>
201
+ </Button>
202
+ </div>
203
+ </template>
204
+
205
+ <style scoped>
206
+ [data-instruction=reorder-above]:before,[data-instruction=reorder-below]:after{background:var(--primary,#2563eb);content:"";height:2px;left:0;pointer-events:none;position:absolute;right:0;z-index:1}[data-instruction=reorder-above]:before{top:-5px}[data-instruction=reorder-below]:after{bottom:-5px}
207
+ </style>
@@ -0,0 +1,16 @@
1
+ import type { LocaleValue } from '../../share/locale.js';
2
+ type Rule = {
3
+ when: string;
4
+ warning?: boolean;
5
+ message: LocaleValue;
6
+ };
7
+ type __VLS_Props = {
8
+ modelValue?: ReadonlyArray<Rule>;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (rules: readonly Rule[]) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:modelValue"?: ((rules: readonly Rule[]) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -4,6 +4,7 @@ import { provideCELContext } from "../../utils/cel-context";
4
4
  import { ExpressionEditor } from "../ui/expression-editor";
5
5
  import { Field, FieldLabel } from "../ui/field";
6
6
  import { Markdown } from "../ui/markdown";
7
+ import { Textarea } from "../ui/textarea";
7
8
  import {
8
9
  FormConfig,
9
10
  getStructFieldDescription,
@@ -60,6 +61,15 @@ function updateReadonly(value) {
60
61
  config.value = { ...next, readonly: value };
61
62
  }
62
63
  }
64
+ function updateStyle(value) {
65
+ const next = { ...config.value };
66
+ if (value.trim() === "") {
67
+ const { style: _omit, ...rest } = next;
68
+ config.value = rest;
69
+ } else {
70
+ config.value = { ...next, style: value };
71
+ }
72
+ }
63
73
  </script>
64
74
 
65
75
  <template>
@@ -138,6 +148,28 @@ function updateReadonly(value) {
138
148
  @update:model-value="updateReadonly"
139
149
  />
140
150
  </Field>
151
+
152
+ <Field orientation="vertical">
153
+ <FieldLabel class="text-xs text-zinc-500">
154
+ <template
155
+ v-if="generalFieldDescription('style')"
156
+ #tooltip
157
+ >
158
+ <Markdown
159
+ :source="generalFieldDescription('style')"
160
+ block
161
+ class="prose prose-sm prose-zinc"
162
+ />
163
+ </template>
164
+ {{ generalFieldTitle("style") }}
165
+ </FieldLabel>
166
+ <Textarea
167
+ :model-value="config.style ?? ''"
168
+ placeholder="如 max-width: 640px; margin: 0 auto;"
169
+ class="min-h-20 font-mono text-xs"
170
+ @update:model-value="(v) => updateStyle(String(v))"
171
+ />
172
+ </Field>
141
173
  </div>
142
174
  </template>
143
175
  </ShwfedFormUnitConfig>
@@ -14,8 +14,20 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
14
14
  readonly locale: "en" | "ja" | "ko";
15
15
  readonly message: string;
16
16
  }[]];
17
+ readonly required?: string | undefined;
17
18
  readonly displayName?: string | undefined;
18
19
  readonly compatibilityDate: "2026-04-22";
20
+ readonly validations?: readonly {
21
+ readonly message: readonly [{
22
+ readonly locale: "zh";
23
+ readonly message: string;
24
+ }, ...{
25
+ readonly locale: "en" | "ja" | "ko";
26
+ readonly message: string;
27
+ }[]];
28
+ readonly warning?: boolean | undefined;
29
+ readonly when: string;
30
+ }[] | undefined;
19
31
  }) => any;
20
32
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
21
33
  "onUpdate:modelValue"?: ((value: {
@@ -29,8 +41,20 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
29
41
  readonly locale: "en" | "ja" | "ko";
30
42
  readonly message: string;
31
43
  }[]];
44
+ readonly required?: string | undefined;
32
45
  readonly displayName?: string | undefined;
33
46
  readonly compatibilityDate: "2026-04-22";
47
+ readonly validations?: readonly {
48
+ readonly message: readonly [{
49
+ readonly locale: "zh";
50
+ readonly message: string;
51
+ }, ...{
52
+ readonly locale: "en" | "ja" | "ko";
53
+ readonly message: string;
54
+ }[]];
55
+ readonly warning?: boolean | undefined;
56
+ readonly when: string;
57
+ }[] | undefined;
34
58
  }) => any) | undefined;
35
59
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
60
  declare const _default: typeof __VLS_export;