@shwfed/config 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/dist/mcp.mjs +128 -27
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-Bxkq2ZRm.js → config-BkytEQN5.js} +1 -1
  4. package/dist/preview/assets/{config-BdFIFUa_.js → config-CK011_jJ.js} +1 -1
  5. package/dist/preview/assets/{config-BcQQl4v6.js → config-C_bBX0wD.js} +1 -1
  6. package/dist/preview/assets/{config-CHHX7vhb.js → config-Cbn8o9BY.js} +1 -1
  7. package/dist/preview/assets/{config-CZ0f5xdI.js → config-DYL6kHr3.js} +1 -1
  8. package/dist/preview/assets/{config-Ddh8pxIi.js → config-Dx0zHfGt.js} +1 -1
  9. package/dist/preview/assets/{config-D9xGgFnF.js → config-E-DM6b5t.js} +1 -1
  10. package/dist/preview/assets/{config-C32yfrlg.js → config-PjseWUbC.js} +1 -1
  11. package/dist/preview/assets/{config-Bi9F-Jdh.js → config-dwcdYHd4.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_cjxvm1.js → definition.vue_vue_type_script_setup_true_lang-uJFJXxli.js} +1 -1
  13. package/dist/preview/assets/index-7MVXgV5n.css +1 -0
  14. package/dist/preview/assets/index-CmPiZG_4.js +1 -0
  15. package/dist/preview/assets/index-x-77enex.js +668 -0
  16. package/dist/preview/assets/runtime-BRMGkqSr.js +1 -0
  17. package/dist/preview/assets/runtime-CHLboM_z.js +1 -0
  18. package/dist/preview/assets/runtime-CeHdesjP.js +1 -0
  19. package/dist/preview/assets/runtime-D4_9FCLy.js +1 -0
  20. package/dist/preview/assets/runtime-DHBTDws7.js +1 -0
  21. package/dist/preview/assets/runtime-DJHpCLnr.js +1 -0
  22. package/dist/preview/assets/runtime-DKq86fZU.js +1 -0
  23. package/dist/preview/assets/runtime-DjpjaNec.js +1 -0
  24. package/dist/preview/assets/runtime-ZQryOEKm.js +1 -0
  25. package/dist/preview/index.html +2 -2
  26. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +7 -4
  27. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +6 -0
  28. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -1
  29. package/dist/runtime/components/form/ValidationRulesField.d.vue.ts +16 -0
  30. package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
  31. package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
  32. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
  33. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
  34. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
  35. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
  36. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
  37. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
  38. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
  39. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
  40. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
  41. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
  42. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
  43. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
  44. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
  45. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
  46. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
  47. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
  48. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  49. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  50. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  51. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
  52. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
  53. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
  54. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
  55. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
  56. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
  57. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
  58. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
  59. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
  60. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
  61. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
  62. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
  63. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
  64. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
  65. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
  66. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
  67. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
  68. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
  69. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
  70. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
  71. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
  72. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
  73. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
  74. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
  75. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
  76. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
  77. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
  78. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
  79. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
  80. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
  81. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
  82. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
  83. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
  84. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
  85. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
  86. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
  87. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
  88. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
  89. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
  90. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
  91. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
  92. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
  93. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
  94. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
  95. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
  96. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  97. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  98. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  99. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
  100. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
  101. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
  102. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
  103. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
  104. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
  105. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
  106. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
  107. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
  108. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
  109. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
  110. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
  111. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
  112. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
  113. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
  114. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
  115. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
  116. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
  117. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
  118. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
  119. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
  120. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
  121. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
  122. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
  123. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
  124. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
  125. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
  126. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
  127. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
  128. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
  129. package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
  130. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  131. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  132. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  133. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
  134. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
  135. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
  136. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
  137. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
  138. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
  139. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
  140. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
  141. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
  142. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
  143. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  144. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  145. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  146. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  147. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  148. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  149. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  150. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  151. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  152. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  153. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
  154. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  155. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
  156. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  157. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  158. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
  159. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  160. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
  161. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  162. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  163. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
  164. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  165. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
  166. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  167. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  168. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
  169. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  170. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
  171. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  172. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  173. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
  174. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  175. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
  176. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  177. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
  178. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
  179. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
  180. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
  181. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
  182. package/dist/runtime/components/form/index.d.vue.ts +1 -0
  183. package/dist/runtime/components/form/index.vue +14 -18
  184. package/dist/runtime/components/form/index.vue.d.ts +1 -0
  185. package/dist/runtime/components/form/schema.d.ts +2 -10
  186. package/dist/runtime/components/form/schema.js +2 -5
  187. package/dist/runtime/components/form/utils/cel-scope.d.ts +12 -3
  188. package/dist/runtime/components/form/utils/cel-scope.js +17 -18
  189. package/dist/runtime/components/form/utils/common.d.ts +42 -0
  190. package/dist/runtime/components/form/utils/common.js +40 -2
  191. package/dist/runtime/components/form/utils/form-vars.d.ts +19 -0
  192. package/dist/runtime/components/form/utils/form-vars.js +5 -0
  193. package/dist/runtime/components/form/utils/validation.d.ts +85 -0
  194. package/dist/runtime/components/form/utils/validation.js +113 -0
  195. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +20 -8
  196. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +1 -0
  197. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +20 -8
  198. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +1 -0
  199. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +20 -8
  200. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +1 -0
  201. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +20 -8
  202. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +1 -0
  203. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue +20 -8
  204. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +1 -0
  205. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +20 -8
  206. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
  207. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
  208. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue +20 -8
  209. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
  210. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
  211. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +20 -7
  212. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
  213. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue +20 -8
  214. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +1 -0
  215. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +20 -8
  216. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
  217. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +20 -8
  218. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
  219. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -0
  220. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue +20 -8
  221. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -0
  222. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -0
  223. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -0
  224. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue +20 -8
  225. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -0
  226. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -0
  227. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
  228. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +20 -8
  229. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
  230. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
  231. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -0
  232. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +20 -8
  233. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -0
  234. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -0
  235. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -0
  236. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +20 -8
  237. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -0
  238. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -0
  239. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
  240. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +20 -8
  241. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
  242. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
  243. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -0
  244. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue +20 -8
  245. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -0
  246. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -0
  247. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
  248. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue +20 -8
  249. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
  250. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
  251. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -0
  252. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue +20 -8
  253. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -0
  254. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -0
  255. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
  256. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
  257. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
  258. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
  259. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
  260. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
  261. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
  262. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
  263. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
  264. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +20 -8
  265. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
  266. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
  267. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +2 -1
  268. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
  269. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +20 -8
  270. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
  271. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
  272. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +2 -1
  273. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
  274. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
  275. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
  276. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
  277. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
  278. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
  279. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
  280. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
  281. package/dist/runtime/components/table/config.d.vue.ts +4 -2
  282. package/dist/runtime/components/table/config.vue +25 -45
  283. package/dist/runtime/components/table/config.vue.d.ts +4 -2
  284. package/dist/runtime/components/table/index.vue +22 -2
  285. package/dist/runtime/components/table/schema.d.ts +4 -2
  286. package/dist/runtime/components/table/schema.js +69 -13
  287. package/dist/runtime/components/table/utils/shared.d.ts +2 -0
  288. package/dist/runtime/components/table/utils/shared.js +12 -4
  289. package/dist/runtime/components/ui/field/FieldError.vue +1 -1
  290. package/dist/runtime/components/ui/field/FieldMessages.d.vue.ts +9 -0
  291. package/dist/runtime/components/ui/field/FieldMessages.vue +21 -0
  292. package/dist/runtime/components/ui/field/FieldMessages.vue.d.ts +9 -0
  293. package/dist/runtime/components/ui/field/FieldWarning.d.vue.ts +20 -0
  294. package/dist/runtime/components/ui/field/FieldWarning.vue +51 -0
  295. package/dist/runtime/components/ui/field/FieldWarning.vue.d.ts +20 -0
  296. package/dist/runtime/components/ui/field/index.d.ts +2 -0
  297. package/dist/runtime/components/ui/field/index.js +10 -4
  298. package/dist/runtime/components/ui/locale/Locale.d.vue.ts +2 -0
  299. package/dist/runtime/components/ui/locale/Locale.vue +165 -155
  300. package/dist/runtime/components/ui/locale/Locale.vue.d.ts +2 -0
  301. package/dist/runtime/share/form-validate.d.ts +18 -0
  302. package/dist/runtime/share/form-validate.js +8 -0
  303. package/package.json +1 -1
  304. package/dist/preview/assets/index-BqOX70Hd.css +0 -1
  305. package/dist/preview/assets/index-D-VR1i8D.js +0 -659
  306. package/dist/preview/assets/index-ihZGlPdX.js +0 -1
  307. package/dist/preview/assets/runtime-Bn8mqeDH.js +0 -1
  308. package/dist/preview/assets/runtime-Cc_Wk3o-.js +0 -1
  309. package/dist/preview/assets/runtime-CttAjIgg.js +0 -1
  310. package/dist/preview/assets/runtime-Cx4f2UTl.js +0 -1
  311. package/dist/preview/assets/runtime-D1dESjXR.js +0 -1
  312. package/dist/preview/assets/runtime-DIEP1Xbh.js +0 -1
  313. package/dist/preview/assets/runtime-DKceWuBx.js +0 -1
  314. package/dist/preview/assets/runtime-Dhid9O5c.js +0 -1
  315. package/dist/preview/assets/runtime-YMiqi6WY.js +0 -1
@@ -1,6 +1,27 @@
1
1
  import { Schema } from "effect";
2
- import { Expression } from "../../../share/expression.js";
2
+ import { Expression, LocaleMarkdown } from "../../../share/expression.js";
3
3
  import { md } from "../../../share/markdown.js";
4
+ export function validationRuleStruct(configure) {
5
+ const CelBool = Expression({ configure, resultType: "bool" });
6
+ return Schema.Struct({
7
+ when: CelBool.annotations({
8
+ title: "\u89C4\u5219",
9
+ description: md`
10
+ 返回 \`true\` 时视为校验**未**通过,返回 \`false\` 视为通过
11
+ `
12
+ }),
13
+ // Severity toggle. Off (default / absent) ⇒ error: standard blocks submit
14
+ // and reds the field. On ⇒ warning: yellow hint only, never blocks submit.
15
+ warning: Schema.optional(Schema.Boolean.annotations({
16
+ title: "\u4EC5\u8B66\u544A",
17
+ description: "\u5F00\u542F\u540E\u8BE5\u89C4\u5219\u4EC5\u9EC4\u8272\u63D0\u793A\u3001\u4E0D\u963B\u6B62\u63D0\u4EA4"
18
+ })),
19
+ message: LocaleMarkdown({ configure }).annotations({
20
+ title: "\u6D88\u606F",
21
+ description: "\u6821\u9A8C\u672A\u901A\u8FC7\u65F6\u5C55\u793A\u7684\u672C\u5730\u5316\u6D88\u606F\uFF0C\u652F\u6301 inline Markdown \u4E0E `{{ \u8868\u8FBE\u5F0F }}` \u63D2\u503C"
22
+ })
23
+ });
24
+ }
4
25
  export function commonFieldFields(configure) {
5
26
  const CelBool = Expression({ configure, resultType: "bool" });
6
27
  return {
@@ -12,7 +33,24 @@ export function commonFieldFields(configure) {
12
33
  hidden: Schema.optional(CelBool.annotations({
13
34
  title: "\u9690\u85CF\u6761\u4EF6",
14
35
  description: "\u8FD4\u56DE `true` \u65F6\u5B57\u6BB5\u5728\u6240\u6709\u5E03\u5C40\u4E2D\u90FD\u4E0D\u6E32\u67D3"
15
- }))
36
+ })),
37
+ // Required marker + non-empty check share one expression — no drift
38
+ // between the star the user sees and the rule that gates submit.
39
+ required: Schema.optional(CelBool.annotations({
40
+ title: "\u5FC5\u586B\u6761\u4EF6",
41
+ description: "\u8FD4\u56DE `true` \u65F6\u663E\u793A\u5FC5\u586B\u661F\u53F7\u5E76\u8981\u6C42\u975E\u7A7A\uFF0C\u7559\u7A7A\u8868\u793A\u4E0D\u5FC5\u586B"
42
+ })),
43
+ // Field-owned rules. `when` returns a bool — `true` triggers the rule; the
44
+ // per-rule `warning` switch picks the severity (error by default, warning
45
+ // when on). The message is a localized Markdown template with `{{ 表达式 }}`
46
+ // interpolation. Cross-field rules read `form.*` and live on the field where
47
+ // the error should appear.
48
+ validations: Schema.optional(
49
+ Schema.Array(validationRuleStruct(configure)).annotations({
50
+ title: "\u6821\u9A8C\u89C4\u5219",
51
+ description: "\u53CD\u9988\u6D88\u606F\u5C06\u6309\u7167\u6821\u9A8C\u89C4\u5219\u5217\u8868\u987A\u5E8F\u5C55\u793A"
52
+ })
53
+ )
16
54
  };
17
55
  }
18
56
  export const FIELD_ORIENTATIONS = ["vertical", "floating"];
@@ -0,0 +1,19 @@
1
+ import type { Environment } from '../../../vendor/cel-js/lib/index.js';
2
+ /**
3
+ * Register the form-wide `now` / `form` live variables on `env`, skipping any
4
+ * already declared. Idempotent so it composes safely from either side: a
5
+ * `FormConfig` nested inside another (the `table` form field embeds a table
6
+ * whose `query` is its own sub-form, and the embedding `configure` advertises
7
+ * the same pair) would otherwise register `form` twice on one env and the CEL
8
+ * registry throws `'form' is already registered`. Mirrors
9
+ * `registerRowVariablesIfAbsent`.
10
+ *
11
+ * This is the single source of truth for the `form` / `now` metadata: the
12
+ * schema's expression validators register it here, the designer-time picker
13
+ * probes it (`buildFormCelScope`), and the runtime scope derives its
14
+ * type/label/description from it too (`buildFormRuntimeScope`). Lives in this
15
+ * dependency-light module — not `schema.ts` — so the scope helpers can import it
16
+ * without pulling `utils/resolve` (and its `import.meta.glob`) into per-folder
17
+ * unit tests. `schema.ts` re-exports it for existing call sites.
18
+ */
19
+ export declare function registerFormVariablesIfAbsent(env: Environment): void;
@@ -0,0 +1,5 @@
1
+ export function registerFormVariablesIfAbsent(env) {
2
+ const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
3
+ if (!declared.has("now")) env.registerVariable("now", "Date", { label: "\u5F53\u524D\u65F6\u95F4", description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4" });
4
+ if (!declared.has("form")) env.registerVariable("form", "dyn", { label: "\u8868\u5355\u503C", description: "\u5F53\u524D\u8868\u5355\u72B6\u6001" });
5
+ }
@@ -0,0 +1,85 @@
1
+ import { Effect } from 'effect';
2
+ import type { ComputedRef, Ref } from 'vue';
3
+ import { type LocaleValue } from '../../../share/locale.js';
4
+ export type Severity = 'error' | 'warning';
5
+ export type FieldValidationResult = {
6
+ severity: Severity;
7
+ /** Already i18n-resolved and `{{ }}`-interpolated — ready to render. */
8
+ message: string;
9
+ /** Index in the field's `validations[]`; `-1` for the implicit required rule. */
10
+ ruleIndex: number;
11
+ };
12
+ /** The slice of a field's config the validation engine reads. */
13
+ export type ValidatableConfig = {
14
+ required?: string;
15
+ validations?: ReadonlyArray<{
16
+ when: string;
17
+ warning?: boolean;
18
+ message: LocaleValue;
19
+ }>;
20
+ binding?: string | readonly [string, string];
21
+ };
22
+ type Registration = () => ReadonlyArray<FieldValidationResult>;
23
+ export type ValidationProvider = {
24
+ /**
25
+ * Global reveal gate. Errors on a pristine field stay hidden until that
26
+ * field's binding is dirtied (first blur) or `reveal()` flips this true.
27
+ * Once true it never retracts during the form's life — only a full unmount
28
+ * resets it. `undo`/`redo` do not touch it (they roll back state, not the
29
+ * gate).
30
+ */
31
+ revealed: Ref<boolean>;
32
+ reveal: () => void;
33
+ /** Register a mounted field's id + live results thunk; returns an unregister fn. */
34
+ register: (fieldId: () => string, results: Registration) => () => void;
35
+ /**
36
+ * Drain pending drafts, await the seed and derived-value settlement, then
37
+ * read every registered field's results. `true` ⇒ no `error`-severity
38
+ * result anywhere. Always calls `reveal()` so the failing fields surface.
39
+ */
40
+ validate: () => Promise<boolean>;
41
+ /** Union of results across the given field ids — used by collapsible aggregation. */
42
+ resultsFor: (fieldIds: ReadonlyArray<string>) => ReadonlyArray<FieldValidationResult>;
43
+ };
44
+ export type ValidationHost = {
45
+ /** Drain pending field commits (the form's commit bus). */
46
+ flush: () => void;
47
+ /** Resolves once the initial seed has landed. */
48
+ seeded: Promise<void>;
49
+ /** Resolves once every derived value — cascades included — has settled. */
50
+ settled: () => Promise<void>;
51
+ };
52
+ /**
53
+ * Provide the form-wide validation registry. Called once at the top-level form
54
+ * host, after the commit bus / quiescence are available; nested list rows
55
+ * inherit it through `inject`, so every field in the form — at any nesting
56
+ * depth — registers into this single provider.
57
+ */
58
+ export declare function provideValidation(host: ValidationHost): ValidationProvider;
59
+ /**
60
+ * Inject the form's validation provider. Returns `undefined` when used outside
61
+ * a `<Form>` host (e.g. a submit button placed on a bare page) — callers treat
62
+ * that as "no validation".
63
+ */
64
+ export declare function useValidationProvider(): ValidationProvider | undefined;
65
+ /**
66
+ * Field-level validation. Called inside an input field's `runtime.vue`. Reads
67
+ * the field's `required` / `validations` config, evaluates them synchronously
68
+ * against the field's CEL context (`form`, plus a list row's `item`/`index`),
69
+ * registers the live results into the form-wide provider for as long as the
70
+ * field is mounted, and returns the bits the field renders: the required star,
71
+ * the error/warning message lists, and the dirty-gated `visible` flag.
72
+ */
73
+ export declare function useFieldValidation(options: {
74
+ fieldId: () => string;
75
+ config: () => ValidatableConfig;
76
+ $cel: <T>(expression: string, context?: Record<string, unknown>) => Effect.Effect<T, any>;
77
+ /** Current i18n locale, for resolving the message `Locale`. */
78
+ locale: () => string;
79
+ }): {
80
+ isRequired: ComputedRef<boolean>;
81
+ errors: ComputedRef<ReadonlyArray<string>>;
82
+ warnings: ComputedRef<ReadonlyArray<string>>;
83
+ visible: ComputedRef<boolean>;
84
+ };
85
+ export {};
@@ -0,0 +1,113 @@
1
+ import { Effect } from "effect";
2
+ import { computed, inject, nextTick, onScopeDispose, provide, ref } from "vue";
3
+ import { getLocalizedText } from "../../../share/locale.js";
4
+ import { interpolate } from "../../../utils/interpolate.js";
5
+ import { useFormState } from "./state.js";
6
+ const VALIDATION_KEY = Symbol("shwfed-form-validation");
7
+ export function provideValidation(host) {
8
+ const revealed = ref(false);
9
+ const entries = /* @__PURE__ */ new Map();
10
+ function union() {
11
+ const out = [];
12
+ for (const entry of entries.values()) out.push(...entry.results());
13
+ return out;
14
+ }
15
+ const provider = {
16
+ revealed,
17
+ reveal: () => {
18
+ revealed.value = true;
19
+ },
20
+ register: (fieldId, results) => {
21
+ const token = Symbol("field");
22
+ entries.set(token, { fieldId, results });
23
+ return () => {
24
+ entries.delete(token);
25
+ };
26
+ },
27
+ async validate() {
28
+ host.flush();
29
+ await host.seeded;
30
+ await host.settled();
31
+ await nextTick();
32
+ const results = union();
33
+ provider.reveal();
34
+ return results.every((r) => r.severity !== "error");
35
+ },
36
+ resultsFor(fieldIds) {
37
+ const wanted = new Set(fieldIds);
38
+ const out = [];
39
+ for (const entry of entries.values()) {
40
+ if (wanted.has(entry.fieldId())) out.push(...entry.results());
41
+ }
42
+ return out;
43
+ }
44
+ };
45
+ provide(VALIDATION_KEY, provider);
46
+ return provider;
47
+ }
48
+ export function useValidationProvider() {
49
+ return inject(VALIDATION_KEY, void 0);
50
+ }
51
+ const DEFAULT_REQUIRED_MESSAGE = {
52
+ zh: "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5",
53
+ ja: "\u3053\u306E\u9805\u76EE\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
54
+ en: "Please fill in this field",
55
+ ko: "\uC774 \uD56D\uBAA9\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694"
56
+ };
57
+ function defaultRequiredMessage(locale) {
58
+ return DEFAULT_REQUIRED_MESSAGE[locale] ?? DEFAULT_REQUIRED_MESSAGE.zh;
59
+ }
60
+ function isEmptyValue(value) {
61
+ return value == null || value === "" || Array.isArray(value) && value.length === 0;
62
+ }
63
+ export function useFieldValidation(options) {
64
+ const { getAt, dirty } = useFormState();
65
+ const provider = useValidationProvider();
66
+ function evalBool(expression) {
67
+ if (!expression) return false;
68
+ try {
69
+ return Effect.runSync(options.$cel(expression));
70
+ } catch {
71
+ return false;
72
+ }
73
+ }
74
+ const isRequired = computed(() => evalBool(options.config().required));
75
+ function resolveMessage(message) {
76
+ const template = getLocalizedText(message, options.locale()) ?? "";
77
+ if (!template) return "";
78
+ return interpolate(template, (expression) => {
79
+ try {
80
+ const out = Effect.runSync(options.$cel(expression));
81
+ return out == null ? "" : String(out);
82
+ } catch {
83
+ return "";
84
+ }
85
+ });
86
+ }
87
+ const results = computed(() => {
88
+ const config = options.config();
89
+ const out = [];
90
+ if (typeof config.binding === "string" && isRequired.value && isEmptyValue(getAt(config.binding))) {
91
+ out.push({ severity: "error", message: defaultRequiredMessage(options.locale()), ruleIndex: -1 });
92
+ }
93
+ const rules = config.validations ?? [];
94
+ rules.forEach((rule, ruleIndex) => {
95
+ if (!evalBool(rule.when)) return;
96
+ const severity = rule.warning ? "warning" : "error";
97
+ out.push({ severity, message: resolveMessage(rule.message), ruleIndex });
98
+ });
99
+ return out;
100
+ });
101
+ if (provider) {
102
+ const unregister = provider.register(options.fieldId, () => results.value);
103
+ onScopeDispose(unregister);
104
+ }
105
+ const errors = computed(() => results.value.filter((r) => r.severity === "error").map((r) => r.message));
106
+ const warnings = computed(() => results.value.filter((r) => r.severity === "warning").map((r) => r.message));
107
+ const visible = computed(() => {
108
+ if (provider?.revealed.value) return true;
109
+ const binding = options.config().binding;
110
+ return typeof binding === "string" && dirty.value.has(binding);
111
+ });
112
+ return { isRequired, errors, warnings, visible };
113
+ }
@@ -3,7 +3,6 @@ import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { format as formatDate } from "date-fns";
5
5
  import { Input } from "../../../../ui/input";
6
- import { Switch } from "../../../../ui/switch";
7
6
  import { Separator } from "../../../../ui/separator";
8
7
  import { Field, FieldLabel } from "../../../../ui/field";
9
8
  import { Locale } from "../../../../ui/locale";
@@ -199,14 +198,10 @@ const dateFormatExample = computed(() => {
199
198
  <Separator />
200
199
  <div class="flex flex-wrap gap-x-8 gap-y-3">
201
200
  <Field
202
- orientation="horizontal"
203
- class="w-auto gap-2"
201
+ orientation="vertical"
202
+ class="w-full max-w-xs"
204
203
  >
205
- <Switch
206
- :model-value="value.enableSorting ?? false"
207
- @update:model-value="(v) => value.enableSorting = v"
208
- />
209
- <FieldLabel class="text-sm text-zinc-600">
204
+ <FieldLabel class="text-xs text-zinc-500">
210
205
  <template
211
206
  v-if="fieldDescription('enableSorting')"
212
207
  #tooltip
@@ -219,6 +214,23 @@ const dateFormatExample = computed(() => {
219
214
  </template>
220
215
  {{ fieldTitle("enableSorting") }}
221
216
  </FieldLabel>
217
+ <InputGroup>
218
+ <InputGroupInput
219
+ :model-value="value.sortKey"
220
+ placeholder="例:created_at"
221
+ @update:model-value="(v) => value.sortKey = v || void 0"
222
+ />
223
+ <InputGroupAddon align="inline-end">
224
+ <InputGroupButton
225
+ :variant="value.enableSorting ? 'primary' : 'ghost'"
226
+ size="xs"
227
+ @click="value.enableSorting = !value.enableSorting"
228
+ >
229
+ <Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
230
+ {{ fieldTitle("enableSorting") }}
231
+ </InputGroupButton>
232
+ </InputGroupAddon>
233
+ </InputGroup>
222
234
  </Field>
223
235
  </div>
224
236
  </div>
@@ -22,6 +22,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
22
22
  }>]>;
23
23
  accessor: Schema.Schema<string, string, never>;
24
24
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
25
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
25
26
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
26
27
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
27
28
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -2,7 +2,6 @@
2
2
  import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
5
- import { Switch } from "../../../../ui/switch";
6
5
  import { Separator } from "../../../../ui/separator";
7
6
  import { Field, FieldLabel } from "../../../../ui/field";
8
7
  import { Locale } from "../../../../ui/locale";
@@ -189,14 +188,10 @@ const ROW_VARS = {
189
188
  <Separator />
190
189
  <div class="flex flex-wrap gap-x-8 gap-y-3">
191
190
  <Field
192
- orientation="horizontal"
193
- class="w-auto gap-2"
191
+ orientation="vertical"
192
+ class="w-full max-w-xs"
194
193
  >
195
- <Switch
196
- :model-value="value.enableSorting ?? false"
197
- @update:model-value="(v) => value.enableSorting = v"
198
- />
199
- <FieldLabel class="text-sm text-zinc-600">
194
+ <FieldLabel class="text-xs text-zinc-500">
200
195
  <template
201
196
  v-if="fieldDescription('enableSorting')"
202
197
  #tooltip
@@ -209,6 +204,23 @@ const ROW_VARS = {
209
204
  </template>
210
205
  {{ fieldTitle("enableSorting") }}
211
206
  </FieldLabel>
207
+ <InputGroup>
208
+ <InputGroupInput
209
+ :model-value="value.sortKey"
210
+ placeholder="例:created_at"
211
+ @update:model-value="(v) => value.sortKey = v || void 0"
212
+ />
213
+ <InputGroupAddon align="inline-end">
214
+ <InputGroupButton
215
+ :variant="value.enableSorting ? 'primary' : 'ghost'"
216
+ size="xs"
217
+ @click="value.enableSorting = !value.enableSorting"
218
+ >
219
+ <Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
220
+ {{ fieldTitle("enableSorting") }}
221
+ </InputGroupButton>
222
+ </InputGroupAddon>
223
+ </InputGroup>
212
224
  </Field>
213
225
  </div>
214
226
  </div>
@@ -22,6 +22,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
22
22
  message: Schema.SchemaClass<string, string, never>;
23
23
  }>]>;
24
24
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
25
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
25
26
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
26
27
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
27
28
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -2,7 +2,6 @@
2
2
  import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { Input } from "../../../../ui/input";
5
- import { Switch } from "../../../../ui/switch";
6
5
  import { Separator } from "../../../../ui/separator";
7
6
  import { Field, FieldLabel } from "../../../../ui/field";
8
7
  import { Locale } from "../../../../ui/locale";
@@ -267,14 +266,10 @@ function onPreserveDigitsChange(v) {
267
266
  <Separator />
268
267
  <div class="flex flex-wrap gap-x-8 gap-y-3">
269
268
  <Field
270
- orientation="horizontal"
271
- class="w-auto gap-2"
269
+ orientation="vertical"
270
+ class="w-full max-w-xs"
272
271
  >
273
- <Switch
274
- :model-value="value.enableSorting ?? false"
275
- @update:model-value="(v) => value.enableSorting = v"
276
- />
277
- <FieldLabel class="text-sm text-zinc-600">
272
+ <FieldLabel class="text-xs text-zinc-500">
278
273
  <template
279
274
  v-if="fieldDescription('enableSorting')"
280
275
  #tooltip
@@ -287,6 +282,23 @@ function onPreserveDigitsChange(v) {
287
282
  </template>
288
283
  {{ fieldTitle("enableSorting") }}
289
284
  </FieldLabel>
285
+ <InputGroup>
286
+ <InputGroupInput
287
+ :model-value="value.sortKey"
288
+ placeholder="例:created_at"
289
+ @update:model-value="(v) => value.sortKey = v || void 0"
290
+ />
291
+ <InputGroupAddon align="inline-end">
292
+ <InputGroupButton
293
+ :variant="value.enableSorting ? 'primary' : 'ghost'"
294
+ size="xs"
295
+ @click="value.enableSorting = !value.enableSorting"
296
+ >
297
+ <Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
298
+ {{ fieldTitle("enableSorting") }}
299
+ </InputGroupButton>
300
+ </InputGroupAddon>
301
+ </InputGroup>
290
302
  </Field>
291
303
  </div>
292
304
  </div>
@@ -26,6 +26,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
26
26
  }>]>;
27
27
  accessor: Schema.Schema<string, string, never>;
28
28
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
29
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
29
30
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
30
31
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
31
32
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -3,7 +3,6 @@ import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { Input } from "../../../../ui/input";
5
5
  import { ExpressionEditor } from "../../../../ui/expression-editor";
6
- import { Switch } from "../../../../ui/switch";
7
6
  import { Separator } from "../../../../ui/separator";
8
7
  import { Field, FieldLabel } from "../../../../ui/field";
9
8
  import { Locale } from "../../../../ui/locale";
@@ -229,14 +228,10 @@ const copyExpressionModel = computed({
229
228
  <Separator />
230
229
  <div class="flex flex-wrap gap-x-8 gap-y-3">
231
230
  <Field
232
- orientation="horizontal"
233
- class="w-auto gap-2"
231
+ orientation="vertical"
232
+ class="w-full max-w-xs"
234
233
  >
235
- <Switch
236
- :model-value="value.enableSorting ?? false"
237
- @update:model-value="(v) => value.enableSorting = v"
238
- />
239
- <FieldLabel class="text-sm text-zinc-600">
234
+ <FieldLabel class="text-xs text-zinc-500">
240
235
  <template
241
236
  v-if="fieldDescription('enableSorting')"
242
237
  #tooltip
@@ -249,6 +244,23 @@ const copyExpressionModel = computed({
249
244
  </template>
250
245
  {{ fieldTitle("enableSorting") }}
251
246
  </FieldLabel>
247
+ <InputGroup>
248
+ <InputGroupInput
249
+ :model-value="value.sortKey"
250
+ placeholder="例:created_at"
251
+ @update:model-value="(v) => value.sortKey = v || void 0"
252
+ />
253
+ <InputGroupAddon align="inline-end">
254
+ <InputGroupButton
255
+ :variant="value.enableSorting ? 'primary' : 'ghost'"
256
+ size="xs"
257
+ @click="value.enableSorting = !value.enableSorting"
258
+ >
259
+ <Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
260
+ {{ fieldTitle("enableSorting") }}
261
+ </InputGroupButton>
262
+ </InputGroupAddon>
263
+ </InputGroup>
252
264
  </Field>
253
265
  </div>
254
266
  </div>
@@ -25,6 +25,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
25
25
  }>]>;
26
26
  accessor: Schema.Schema<string, string, never>;
27
27
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
28
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
28
29
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
29
30
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
30
31
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -2,7 +2,6 @@
2
2
  import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
5
- import { Switch } from "../../../../ui/switch";
6
5
  import { Separator } from "../../../../ui/separator";
7
6
  import { Field, FieldLabel } from "../../../../ui/field";
8
7
  import { Locale } from "../../../../ui/locale";
@@ -279,14 +278,10 @@ function updateTriggers(next) {
279
278
  <Separator />
280
279
  <div class="flex flex-wrap gap-x-8 gap-y-3">
281
280
  <Field
282
- orientation="horizontal"
283
- class="w-auto gap-2"
281
+ orientation="vertical"
282
+ class="w-full max-w-xs"
284
283
  >
285
- <Switch
286
- :model-value="value.enableSorting ?? false"
287
- @update:model-value="(v) => value.enableSorting = v"
288
- />
289
- <FieldLabel class="text-sm text-zinc-600">
284
+ <FieldLabel class="text-xs text-zinc-500">
290
285
  <template
291
286
  v-if="fieldDescription('enableSorting')"
292
287
  #tooltip
@@ -299,6 +294,23 @@ function updateTriggers(next) {
299
294
  </template>
300
295
  {{ fieldTitle("enableSorting") }}
301
296
  </FieldLabel>
297
+ <InputGroup>
298
+ <InputGroupInput
299
+ :model-value="value.sortKey"
300
+ placeholder="例:created_at"
301
+ @update:model-value="(v) => value.sortKey = v || void 0"
302
+ />
303
+ <InputGroupAddon align="inline-end">
304
+ <InputGroupButton
305
+ :variant="value.enableSorting ? 'primary' : 'ghost'"
306
+ size="xs"
307
+ @click="value.enableSorting = !value.enableSorting"
308
+ >
309
+ <Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
310
+ {{ fieldTitle("enableSorting") }}
311
+ </InputGroupButton>
312
+ </InputGroupAddon>
313
+ </InputGroup>
302
314
  </Field>
303
315
  </div>
304
316
  </div>
@@ -28,6 +28,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
28
28
  }>]>;
29
29
  accessor: Schema.Schema<string, string, never>;
30
30
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
31
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
31
32
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
32
33
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
33
34
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -2,7 +2,6 @@
2
2
  import { computed } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
5
- import { Switch } from "../../../../ui/switch";
6
5
  import { Separator } from "../../../../ui/separator";
7
6
  import { Field, FieldLabel } from "../../../../ui/field";
8
7
  import { Locale } from "../../../../ui/locale";
@@ -279,14 +278,10 @@ function updateTriggers(next) {
279
278
  <Separator />
280
279
  <div class="flex flex-wrap gap-x-8 gap-y-3">
281
280
  <Field
282
- orientation="horizontal"
283
- class="w-auto gap-2"
281
+ orientation="vertical"
282
+ class="w-full max-w-xs"
284
283
  >
285
- <Switch
286
- :model-value="value.enableSorting ?? false"
287
- @update:model-value="(v) => value.enableSorting = v"
288
- />
289
- <FieldLabel class="text-sm text-zinc-600">
284
+ <FieldLabel class="text-xs text-zinc-500">
290
285
  <template
291
286
  v-if="fieldDescription('enableSorting')"
292
287
  #tooltip
@@ -299,6 +294,23 @@ function updateTriggers(next) {
299
294
  </template>
300
295
  {{ fieldTitle("enableSorting") }}
301
296
  </FieldLabel>
297
+ <InputGroup>
298
+ <InputGroupInput
299
+ :model-value="value.sortKey"
300
+ placeholder="例:created_at"
301
+ @update:model-value="(v) => value.sortKey = v || void 0"
302
+ />
303
+ <InputGroupAddon align="inline-end">
304
+ <InputGroupButton
305
+ :variant="value.enableSorting ? 'primary' : 'ghost'"
306
+ size="xs"
307
+ @click="value.enableSorting = !value.enableSorting"
308
+ >
309
+ <Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
310
+ {{ fieldTitle("enableSorting") }}
311
+ </InputGroupButton>
312
+ </InputGroupAddon>
313
+ </InputGroup>
302
314
  </Field>
303
315
  </div>
304
316
  </div>
@@ -28,6 +28,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
28
28
  }>]>;
29
29
  accessor: Schema.Schema<string, string, never>;
30
30
  enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
31
+ sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
31
32
  size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
32
33
  grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
33
34
  tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -64,6 +64,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
64
64
  readonly expression: string;
65
65
  } | undefined;
66
66
  readonly enableSorting?: boolean | undefined;
67
+ readonly sortKey?: string | undefined;
67
68
  }) => any;
68
69
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
69
70
  "onUpdate:modelValue"?: ((value: {
@@ -127,6 +128,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
127
128
  readonly expression: string;
128
129
  } | undefined;
129
130
  readonly enableSorting?: boolean | undefined;
131
+ readonly sortKey?: string | undefined;
130
132
  }) => any) | undefined;
131
133
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
132
134
  declare const _default: typeof __VLS_export;