@shwfed/config 2.4.0 → 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 (219) hide show
  1. package/dist/mcp.mjs +43 -5
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-CZ0f5xdI.js → config-BovRv7Mw.js} +1 -1
  4. package/dist/preview/assets/{config-BcQQl4v6.js → config-ByTxMBcK.js} +1 -1
  5. package/dist/preview/assets/{config-Ddh8pxIi.js → config-C7xYpB3N.js} +1 -1
  6. package/dist/preview/assets/{config-Bi9F-Jdh.js → config-CH9wsYX8.js} +1 -1
  7. package/dist/preview/assets/{config-C32yfrlg.js → config-Ch5dL5lp.js} +1 -1
  8. package/dist/preview/assets/{config-D9xGgFnF.js → config-D50Rl2n_.js} +1 -1
  9. package/dist/preview/assets/{config-CHHX7vhb.js → config-DiwVK32V.js} +1 -1
  10. package/dist/preview/assets/{config-BdFIFUa_.js → config-EKVeWrbS.js} +1 -1
  11. package/dist/preview/assets/{config-Bxkq2ZRm.js → config-Q86AhjHq.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_cjxvm1.js → definition.vue_vue_type_script_setup_true_lang-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/form/ValidationRulesField.d.vue.ts +16 -0
  29. package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
  30. package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
  31. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
  32. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
  33. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
  34. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
  35. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
  36. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
  37. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
  38. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
  39. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
  40. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
  41. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
  42. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
  43. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
  44. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
  45. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
  46. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
  47. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  48. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  49. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  50. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
  51. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
  52. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
  53. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
  54. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
  55. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
  56. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
  57. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
  58. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
  59. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
  60. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
  61. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
  62. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
  63. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
  64. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
  65. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
  66. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
  67. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
  68. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
  69. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
  70. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
  71. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
  72. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
  73. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
  74. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
  75. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
  76. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
  77. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
  78. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
  79. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
  80. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
  81. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
  82. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
  83. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
  84. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
  85. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
  86. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
  87. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
  88. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
  89. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
  90. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
  91. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
  92. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
  93. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
  94. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
  95. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  96. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  97. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  98. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
  99. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
  100. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
  101. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
  102. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
  103. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
  104. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
  105. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
  106. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
  107. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
  108. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
  109. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
  110. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
  111. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
  112. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
  113. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
  114. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
  115. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
  116. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
  117. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
  118. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
  119. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
  120. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
  121. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
  122. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
  123. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
  124. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
  125. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
  126. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
  127. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
  128. package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
  129. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  130. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  131. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  132. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
  133. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
  134. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
  135. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
  136. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
  137. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
  138. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
  139. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
  140. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
  141. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
  142. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  143. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  144. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  145. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  146. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  147. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  148. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  149. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  150. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  151. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  152. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
  153. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  154. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
  155. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  156. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  157. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
  158. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  159. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
  160. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  161. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  162. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
  163. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  164. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
  165. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  166. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  167. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
  168. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  169. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
  170. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  171. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  172. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
  173. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  174. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
  175. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  176. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
  177. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
  178. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
  179. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
  180. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
  181. package/dist/runtime/components/form/index.d.vue.ts +1 -0
  182. package/dist/runtime/components/form/index.vue +9 -0
  183. package/dist/runtime/components/form/index.vue.d.ts +1 -0
  184. package/dist/runtime/components/form/schema.js +2 -2
  185. package/dist/runtime/components/form/utils/common.d.ts +42 -0
  186. package/dist/runtime/components/form/utils/common.js +40 -2
  187. package/dist/runtime/components/form/utils/validation.d.ts +85 -0
  188. package/dist/runtime/components/form/utils/validation.js +113 -0
  189. package/dist/runtime/components/table/config.d.vue.ts +4 -2
  190. package/dist/runtime/components/table/config.vue +5 -0
  191. package/dist/runtime/components/table/config.vue.d.ts +4 -2
  192. package/dist/runtime/components/table/utils/shared.js +2 -2
  193. package/dist/runtime/components/ui/field/FieldError.vue +1 -1
  194. package/dist/runtime/components/ui/field/FieldMessages.d.vue.ts +9 -0
  195. package/dist/runtime/components/ui/field/FieldMessages.vue +21 -0
  196. package/dist/runtime/components/ui/field/FieldMessages.vue.d.ts +9 -0
  197. package/dist/runtime/components/ui/field/FieldWarning.d.vue.ts +20 -0
  198. package/dist/runtime/components/ui/field/FieldWarning.vue +51 -0
  199. package/dist/runtime/components/ui/field/FieldWarning.vue.d.ts +20 -0
  200. package/dist/runtime/components/ui/field/index.d.ts +2 -0
  201. package/dist/runtime/components/ui/field/index.js +10 -4
  202. package/dist/runtime/components/ui/locale/Locale.d.vue.ts +2 -0
  203. package/dist/runtime/components/ui/locale/Locale.vue +165 -155
  204. package/dist/runtime/components/ui/locale/Locale.vue.d.ts +2 -0
  205. package/dist/runtime/share/form-validate.d.ts +18 -0
  206. package/dist/runtime/share/form-validate.js +8 -0
  207. package/package.json +1 -1
  208. package/dist/preview/assets/index-BqOX70Hd.css +0 -1
  209. package/dist/preview/assets/index-D-VR1i8D.js +0 -659
  210. package/dist/preview/assets/index-ihZGlPdX.js +0 -1
  211. package/dist/preview/assets/runtime-Bn8mqeDH.js +0 -1
  212. package/dist/preview/assets/runtime-Cc_Wk3o-.js +0 -1
  213. package/dist/preview/assets/runtime-CttAjIgg.js +0 -1
  214. package/dist/preview/assets/runtime-Cx4f2UTl.js +0 -1
  215. package/dist/preview/assets/runtime-D1dESjXR.js +0 -1
  216. package/dist/preview/assets/runtime-DIEP1Xbh.js +0 -1
  217. package/dist/preview/assets/runtime-DKceWuBx.js +0 -1
  218. package/dist/preview/assets/runtime-Dhid9O5c.js +0 -1
  219. package/dist/preview/assets/runtime-YMiqi6WY.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-D-VR1i8D.js"></script>
14
- <link rel="stylesheet" crossorigin href="./assets/index-BqOX70Hd.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;
@@ -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;
@@ -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;
@@ -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;
@@ -27,6 +27,24 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
27
27
  id: Schema.refine<string, typeof Schema.String>;
28
28
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
29
29
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
30
+ required: Schema.optional<Schema.Schema<string, string, never>>;
31
+ validations: Schema.optional<Schema.Array$<Schema.Struct<{
32
+ when: Schema.Schema<string, string, never>;
33
+ warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
34
+ message: Schema.refine<readonly [{
35
+ readonly locale: "zh";
36
+ readonly message: string;
37
+ }, ...{
38
+ readonly locale: "en" | "ja" | "ko";
39
+ readonly message: string;
40
+ }[]], Schema.TupleType<readonly [Schema.Struct<{
41
+ locale: Schema.Literal<["zh"]>;
42
+ message: Schema.SchemaClass<string, string, never>;
43
+ }>], [Schema.Struct<{
44
+ locale: Schema.Literal<["ja", "en", "ko"]>;
45
+ message: Schema.SchemaClass<string, string, never>;
46
+ }>]>>;
47
+ }>>>;
30
48
  type: Schema.Literal<["com.shwfed.form.field.markdown"]>;
31
49
  compatibilityDate: Schema.Literal<["2026-04-22"]>;
32
50
  }>;
@@ -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-04-22";
27
28
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -38,6 +39,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
38
39
  readonly mode: "formula" | "prefill";
39
40
  readonly expression: string;
40
41
  } | undefined;
42
+ readonly validations?: readonly {
43
+ readonly message: readonly [{
44
+ readonly locale: "zh";
45
+ readonly message: string;
46
+ }, ...{
47
+ readonly locale: "en" | "ja" | "ko";
48
+ readonly message: string;
49
+ }[]];
50
+ readonly warning?: boolean | undefined;
51
+ readonly when: string;
52
+ }[] | undefined;
41
53
  }) => any;
42
54
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
43
55
  "onUpdate:modelValue"?: ((value: {
@@ -59,6 +71,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
59
71
  readonly locale: "en" | "ja" | "ko";
60
72
  readonly message: string;
61
73
  }[]] | undefined;
74
+ readonly required?: string | undefined;
62
75
  readonly displayName?: string | undefined;
63
76
  readonly compatibilityDate: "2026-04-22";
64
77
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -75,6 +88,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
75
88
  readonly mode: "formula" | "prefill";
76
89
  readonly expression: string;
77
90
  } | undefined;
91
+ readonly validations?: readonly {
92
+ readonly message: readonly [{
93
+ readonly locale: "zh";
94
+ readonly message: string;
95
+ }, ...{
96
+ readonly locale: "en" | "ja" | "ko";
97
+ readonly message: string;
98
+ }[]];
99
+ readonly warning?: boolean | undefined;
100
+ readonly when: string;
101
+ }[] | undefined;
78
102
  }) => any) | undefined;
79
103
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
80
104
  declare const _default: typeof __VLS_export;
@@ -3,6 +3,7 @@ import { computed } from "vue";
3
3
  import { Field, FieldLabel } from "../../../../ui/field";
4
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
5
5
  import DerivedValueEditor from "../../../DerivedValueEditor.vue";
6
+ import ValidationRulesField from "../../../ValidationRulesField.vue";
6
7
  import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
7
8
  import { Locale as LocaleField } from "../../../../ui/locale";
8
9
  import { Markdown } from "../../../../ui/markdown";
@@ -185,6 +186,26 @@ const pathText = computed({
185
186
  </div>
186
187
 
187
188
  <div class="grid grid-cols-3 gap-3">
189
+ <Field orientation="vertical">
190
+ <FieldLabel class="text-xs text-zinc-500">
191
+ <template #tooltip>
192
+ <Markdown
193
+ :source="fieldDescription('required') ?? '\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A'"
194
+ block
195
+ class="prose prose-sm prose-zinc"
196
+ />
197
+ </template>
198
+ {{ fieldTitle("required") }}
199
+ </FieldLabel>
200
+ <ExpressionEditor
201
+ :model-value="value.required ?? ''"
202
+ placeholder="例:form.type == 'company'"
203
+ result-type="bool"
204
+ class="min-h-10"
205
+ @update:model-value="(v) => value = { ...value, required: v.length > 0 ? v : void 0 }"
206
+ />
207
+ </Field>
208
+
188
209
  <Field orientation="vertical">
189
210
  <FieldLabel class="text-xs text-zinc-500">
190
211
  <template #tooltip>
@@ -264,5 +285,22 @@ const pathText = computed({
264
285
  @update:model-value="(v) => value = { ...value, derived: v }"
265
286
  />
266
287
  </Field>
288
+
289
+ <Field orientation="vertical">
290
+ <FieldLabel class="text-xs text-zinc-500">
291
+ <template #tooltip>
292
+ <Markdown
293
+ :source="fieldDescription('validations')"
294
+ block
295
+ class="prose prose-sm prose-zinc"
296
+ />
297
+ </template>
298
+ {{ fieldTitle("validations") }}
299
+ </FieldLabel>
300
+ <ValidationRulesField
301
+ :model-value="value.validations"
302
+ @update:model-value="(v) => value = { ...value, validations: v.length > 0 ? v : void 0 }"
303
+ />
304
+ </Field>
267
305
  </div>
268
306
  </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-04-22";
27
28
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -38,6 +39,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
38
39
  readonly mode: "formula" | "prefill";
39
40
  readonly expression: string;
40
41
  } | undefined;
42
+ readonly validations?: readonly {
43
+ readonly message: readonly [{
44
+ readonly locale: "zh";
45
+ readonly message: string;
46
+ }, ...{
47
+ readonly locale: "en" | "ja" | "ko";
48
+ readonly message: string;
49
+ }[]];
50
+ readonly warning?: boolean | undefined;
51
+ readonly when: string;
52
+ }[] | undefined;
41
53
  }) => any;
42
54
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
43
55
  "onUpdate:modelValue"?: ((value: {
@@ -59,6 +71,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
59
71
  readonly locale: "en" | "ja" | "ko";
60
72
  readonly message: string;
61
73
  }[]] | undefined;
74
+ readonly required?: string | undefined;
62
75
  readonly displayName?: string | undefined;
63
76
  readonly compatibilityDate: "2026-04-22";
64
77
  readonly orientation?: "vertical" | "floating" | undefined;
@@ -75,6 +88,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
75
88
  readonly mode: "formula" | "prefill";
76
89
  readonly expression: string;
77
90
  } | undefined;
91
+ readonly validations?: readonly {
92
+ readonly message: readonly [{
93
+ readonly locale: "zh";
94
+ readonly message: string;
95
+ }, ...{
96
+ readonly locale: "en" | "ja" | "ko";
97
+ readonly message: string;
98
+ }[]];
99
+ readonly warning?: boolean | undefined;
100
+ readonly when: string;
101
+ }[] | undefined;
78
102
  }) => any) | undefined;
79
103
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
80
104
  declare const _default: typeof __VLS_export;