@shwfed/config 1.1.5 → 2.0.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 (286) hide show
  1. package/dist/module.d.mts +2 -19
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +15 -34
  4. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +36 -4
  5. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +45 -8
  6. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +36 -4
  7. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +15 -9
  8. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +17 -1
  9. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +23 -4
  10. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +36 -4
  11. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +39 -5
  12. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +36 -4
  13. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +15 -9
  14. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +17 -1
  15. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +23 -5
  16. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/config.vue +1 -0
  17. package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.d.vue.ts +2 -2
  18. package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.vue.d.ts +2 -2
  19. package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/runtime.vue +2 -3
  20. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.d.vue.ts +1 -1
  21. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue +44 -10
  22. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue.d.ts +1 -1
  23. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +24 -7
  24. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +6 -1
  25. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +6 -3
  26. package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.d.vue.ts +13 -5
  27. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue +32 -0
  28. package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.vue.d.ts +13 -5
  29. package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.search → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue +5 -7
  30. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +17 -0
  31. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +18 -0
  32. package/dist/runtime/components/actions/components/group.vue +2 -3
  33. package/dist/runtime/components/actions/components/triggers-field.d.vue.ts +17 -0
  34. package/dist/runtime/components/actions/components/triggers-field.vue +209 -0
  35. package/dist/runtime/components/actions/components/triggers-field.vue.d.ts +17 -0
  36. package/dist/runtime/components/actions/config.vue +51 -1
  37. package/dist/runtime/components/actions/schema.d.ts +4 -0
  38. package/dist/runtime/components/actions/schema.js +6 -0
  39. package/dist/runtime/components/actions/utils/resolve.d.ts +25 -1
  40. package/dist/runtime/components/actions/utils/resolve.js +37 -9
  41. package/dist/runtime/components/app.vue +1 -1
  42. package/dist/runtime/components/block-layout-editor/index.vue +11 -11
  43. package/dist/runtime/components/block-layout-editor/sidebar.vue +0 -4
  44. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -0
  45. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
  46. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
  47. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
  48. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
  49. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +6 -0
  50. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +6 -0
  51. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +6 -0
  52. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +6 -0
  53. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +7 -0
  54. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.d.vue.ts +1 -1
  55. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue +16 -2
  56. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue.d.ts +1 -1
  57. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue +1 -0
  58. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +18 -9
  59. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +8 -4
  60. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.d.vue.ts +77 -0
  61. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue +535 -0
  62. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue.d.ts +77 -0
  63. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.d.vue.ts +77 -0
  64. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue +233 -0
  65. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue.d.ts +77 -0
  66. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.d.ts +134 -0
  67. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.js +142 -0
  68. package/dist/runtime/components/config/index.vue +1 -1
  69. package/dist/runtime/components/config/use-editor.js +4 -3
  70. package/dist/runtime/components/form/DerivedValueEditor.d.vue.ts +19 -0
  71. package/dist/runtime/components/form/DerivedValueEditor.vue +77 -0
  72. package/dist/runtime/components/form/DerivedValueEditor.vue.d.ts +19 -0
  73. package/dist/runtime/components/form/config.vue +58 -24
  74. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +8 -0
  75. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +21 -0
  76. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +8 -0
  77. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +29 -31
  78. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +4 -0
  79. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +3 -2
  80. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +8 -0
  81. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +21 -0
  82. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +8 -0
  83. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +24 -26
  84. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +4 -0
  85. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +3 -2
  86. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +10 -2
  87. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue +21 -0
  88. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +10 -2
  89. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +15 -7
  90. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
  91. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.js +2 -1
  92. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +10 -2
  93. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +21 -0
  94. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +10 -2
  95. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +14 -6
  96. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +4 -0
  97. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +2 -1
  98. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +10 -2
  99. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +21 -0
  100. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +10 -2
  101. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +14 -6
  102. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +4 -0
  103. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +2 -1
  104. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +12 -4
  105. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +21 -0
  106. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +12 -4
  107. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +14 -6
  108. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +4 -0
  109. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +2 -1
  110. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +12 -4
  111. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +21 -0
  112. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +12 -4
  113. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +14 -6
  114. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +4 -0
  115. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +2 -1
  116. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +12 -4
  117. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +21 -0
  118. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +12 -4
  119. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +14 -6
  120. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +4 -0
  121. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +2 -1
  122. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +12 -4
  123. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +21 -0
  124. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +12 -4
  125. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +14 -6
  126. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +4 -0
  127. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +2 -1
  128. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +8 -0
  129. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +21 -0
  130. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +8 -0
  131. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +37 -38
  132. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +4 -0
  133. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +2 -1
  134. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +10 -2
  135. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +21 -0
  136. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +10 -2
  137. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +33 -22
  138. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +4 -0
  139. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +2 -1
  140. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +8 -0
  141. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +21 -0
  142. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +8 -0
  143. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +14 -6
  144. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +4 -0
  145. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +3 -2
  146. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +8 -0
  147. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue +21 -0
  148. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +8 -0
  149. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +14 -7
  150. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
  151. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.js +2 -1
  152. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +1 -0
  153. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +13 -8
  154. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +10 -2
  155. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +25 -1
  156. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +10 -2
  157. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +102 -44
  158. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +14 -0
  159. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +14 -5
  160. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +1 -0
  161. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/row.vue +22 -5
  162. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +7 -4
  163. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +7 -1
  164. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +113 -0
  165. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +426 -0
  166. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +113 -0
  167. package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.d.vue.ts +1 -1
  168. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +176 -0
  169. package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.vue.d.ts +1 -1
  170. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +121 -0
  171. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +78 -0
  172. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +113 -0
  173. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +426 -0
  174. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +113 -0
  175. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.d.vue.ts +8 -0
  176. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +159 -0
  177. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue.d.ts +8 -0
  178. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +121 -0
  179. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +78 -0
  180. package/dist/runtime/components/form/index.d.vue.ts +6 -0
  181. package/dist/runtime/components/form/index.vue +41 -6
  182. package/dist/runtime/components/form/index.vue.d.ts +6 -0
  183. package/dist/runtime/components/form/schema.d.ts +5 -1
  184. package/dist/runtime/components/form/schema.js +13 -1
  185. package/dist/runtime/components/form/unit-config.d.vue.ts +0 -3
  186. package/dist/runtime/components/form/unit-config.vue +4 -10
  187. package/dist/runtime/components/form/unit-config.vue.d.ts +0 -3
  188. package/dist/runtime/components/form/utils/commit-bus.d.ts +26 -0
  189. package/dist/runtime/components/form/utils/commit-bus.js +27 -0
  190. package/dist/runtime/components/form/utils/common.d.ts +27 -0
  191. package/dist/runtime/components/form/utils/common.js +31 -0
  192. package/dist/runtime/components/form/utils/derived.d.ts +72 -0
  193. package/dist/runtime/components/form/utils/derived.js +116 -0
  194. package/dist/runtime/components/form/utils/field-value.d.ts +35 -0
  195. package/dist/runtime/components/form/utils/field-value.js +40 -0
  196. package/dist/runtime/components/form/utils/history.d.ts +36 -0
  197. package/dist/runtime/components/form/utils/history.js +74 -0
  198. package/dist/runtime/components/form/utils/readonly.d.ts +8 -0
  199. package/dist/runtime/components/form/utils/readonly.js +9 -0
  200. package/dist/runtime/components/form/utils/state.d.ts +27 -1
  201. package/dist/runtime/components/form/utils/state.js +16 -8
  202. package/dist/runtime/components/table/ai/columns-button.vue +3 -4
  203. package/dist/runtime/components/table/ai/data-source-button.vue +3 -4
  204. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/runtime.vue +2 -3
  205. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/runtime.vue +2 -3
  206. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/runtime.vue +2 -3
  207. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/runtime.vue +2 -3
  208. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue +11 -6
  209. package/dist/runtime/components/table/config.vue +46 -2
  210. package/dist/runtime/components/table/index.d.vue.ts +4 -0
  211. package/dist/runtime/components/table/index.vue +28 -22
  212. package/dist/runtime/components/table/index.vue.d.ts +4 -0
  213. package/dist/runtime/components/table/schema.d.ts +33 -0
  214. package/dist/runtime/components/table/schema.js +21 -0
  215. package/dist/runtime/components/table/utils/instance.d.ts +2 -0
  216. package/dist/runtime/components/table/utils/instance.js +8 -0
  217. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +2 -2
  218. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue +2 -2
  219. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +2 -2
  220. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue +2 -2
  221. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +13 -1
  222. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +11 -3
  223. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +13 -1
  224. package/dist/runtime/components/ui/locale/Locale.vue +2 -2
  225. package/dist/runtime/components/ui/radio-group/RadioGroup.d.vue.ts +22 -0
  226. package/dist/runtime/components/ui/radio-group/RadioGroup.vue +32 -0
  227. package/dist/runtime/components/ui/radio-group/RadioGroup.vue.d.ts +22 -0
  228. package/dist/runtime/components/ui/radio-group/RadioGroupItem.d.vue.ts +8 -0
  229. package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +36 -0
  230. package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue.d.ts +8 -0
  231. package/dist/runtime/components/ui/radio-group/index.d.ts +2 -0
  232. package/dist/runtime/components/ui/radio-group/index.js +2 -0
  233. package/dist/runtime/composables/useOverlay.d.ts +1 -5
  234. package/dist/runtime/composables/useOverlay.js +4 -3
  235. package/dist/runtime/composables/useTranslateLocale.js +1 -2
  236. package/dist/runtime/share/event-bus.d.ts +118 -0
  237. package/dist/runtime/share/event-bus.js +55 -0
  238. package/dist/runtime/share/expression.d.ts +7 -0
  239. package/dist/runtime/share/expression.js +3 -1
  240. package/dist/runtime/share/layout.d.ts +1 -0
  241. package/dist/runtime/share/layout.js +3 -2
  242. package/dist/runtime/share/slot-renderer.vue +6 -4
  243. package/dist/runtime/{plugins → utils}/ai/cel-prompt.d.ts +1 -1
  244. package/dist/runtime/{plugins → utils}/ai/index.d.ts +1 -6
  245. package/dist/runtime/{plugins → utils}/ai/index.js +5 -14
  246. package/dist/runtime/utils/cel.d.ts +5 -0
  247. package/dist/runtime/utils/cel.js +42 -0
  248. package/dist/runtime/vendor/cel-js/CLAUDE.md +8 -2
  249. package/dist/runtime/vendor/cel-js/PROMPT.md +35 -10
  250. package/dist/runtime/vendor/cel-js/lib/functions.js +63 -1
  251. package/dist/runtime/vendor/cel-js/lib/http-builder.d.ts +35 -0
  252. package/dist/runtime/{plugins/http/builder.js → vendor/cel-js/lib/http-builder.js} +25 -23
  253. package/dist/runtime/vendor/cel-js/lib/http-builtins.d.ts +9 -10
  254. package/dist/runtime/vendor/cel-js/lib/http-builtins.js +53 -13
  255. package/dist/types.d.mts +7 -1
  256. package/package.json +1 -1
  257. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/config.vue +0 -10
  258. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/runtime.vue +0 -25
  259. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.d.ts +0 -13
  260. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.js +0 -16
  261. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.d.vue.ts +0 -17
  262. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue +0 -10
  263. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue.d.ts +0 -17
  264. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.d.ts +0 -13
  265. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.js +0 -16
  266. package/dist/runtime/components/table/utils/host.d.ts +0 -9
  267. package/dist/runtime/components/table/utils/host.js +0 -8
  268. package/dist/runtime/composables/useCel.d.ts +0 -16
  269. package/dist/runtime/composables/useCel.js +0 -8
  270. package/dist/runtime/middleware/token.d.ts +0 -2
  271. package/dist/runtime/middleware/token.js +0 -20
  272. package/dist/runtime/plugins/cel/http.d.ts +0 -8
  273. package/dist/runtime/plugins/cel/http.js +0 -49
  274. package/dist/runtime/plugins/cel/index.d.ts +0 -9
  275. package/dist/runtime/plugins/cel/index.js +0 -59
  276. package/dist/runtime/plugins/http/builder.d.ts +0 -14
  277. package/dist/runtime/plugins/http/index.d.ts +0 -19
  278. package/dist/runtime/plugins/http/index.js +0 -35
  279. package/dist/runtime/plugins/toast/index.d.ts +0 -108
  280. package/dist/runtime/plugins/toast/index.js +0 -10
  281. package/dist/runtime/types.d.ts +0 -25
  282. /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.d.vue.ts +0 -0
  283. /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue.d.ts +0 -0
  284. /package/dist/runtime/{plugins → utils}/ai/cel-prompt.js +0 -0
  285. /package/dist/runtime/{plugins/cel/context.d.ts → utils/cel-context.d.ts} +0 -0
  286. /package/dist/runtime/{plugins/cel/context.js → utils/cel-context.js} +0 -0
package/dist/module.d.mts CHANGED
@@ -1,11 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
- interface ModuleOptions {
4
- api?: {
5
- expired?: string;
6
- interception?: string;
7
- };
8
- }
9
3
  interface Env {
10
4
  git: Readonly<{
11
5
  commit?: string;
@@ -15,14 +9,6 @@ interface Env {
15
9
  job?: string;
16
10
  build?: number;
17
11
  }>;
18
- api: Readonly<{
19
- host?: string;
20
- logout?: string;
21
- interception?: string;
22
- }>;
23
- headers: Readonly<{
24
- token?: string;
25
- }>;
26
12
  }
27
13
  declare module 'nuxt/schema' {
28
14
  interface PublicRuntimeConfig {
@@ -33,12 +19,9 @@ declare global {
33
19
  interface ImportMetaEnv {
34
20
  readonly GIT_COMMIT?: string;
35
21
  readonly GIT_LOCAL_BRANCH?: string;
36
- readonly NUXT_PUBLIC_API_URI?: string;
37
- readonly NUXT_PUBLIC_SSO_LOGOUT_URI?: string;
38
- readonly NUXT_PUBLIC_TOKEN_HEADER_NAME?: string;
39
22
  }
40
23
  }
41
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
24
+ declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions, _nuxt_schema.ModuleOptions, false>;
42
25
 
43
26
  export { _default as default };
44
- export type { Env, ModuleOptions };
27
+ export type { Env };
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shwfed",
3
3
  "configKey": "shwfed",
4
- "version": "1.1.5",
4
+ "version": "2.0.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  import { readdirSync } from 'node:fs';
2
- import { defineNuxtModule, createResolver, addVitePlugin, extendViteConfig, addPlugin, addRouteMiddleware, addComponent, addImports } from '@nuxt/kit';
2
+ import { defineNuxtModule, createResolver, addVitePlugin, extendViteConfig, addPlugin, addComponent, addImports } from '@nuxt/kit';
3
3
  import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
4
4
  import TailwindCSS from '@tailwindcss/vite';
5
- import { defu } from 'defu';
6
5
 
7
6
  const EXPOSED_UI_FOLDERS = [
8
7
  "alert-dialog",
@@ -66,10 +65,9 @@ const module$1 = defineNuxtModule({
66
65
  }
67
66
  }
68
67
  },
69
- defaults: {},
70
- setup(options, nuxt) {
68
+ setup(_options, nuxt) {
71
69
  const resolver = createResolver(import.meta.url);
72
- const resolvedConfig = defu(options, {
70
+ const resolvedConfig = {
73
71
  git: {
74
72
  commit: process.env.GIT_COMMIT,
75
73
  branch: process.env.GIT_LOCAL_BRANCH
@@ -77,16 +75,8 @@ const module$1 = defineNuxtModule({
77
75
  ci: {
78
76
  job: process.env.JOB_NAME,
79
77
  build: process.env.BUILD_NUMBER ? Number.parseInt(process.env.BUILD_NUMBER) : void 0
80
- },
81
- api: {
82
- host: process.env.NUXT_PUBLIC_API_URI,
83
- logout: process.env.NUXT_PUBLIC_SSO_LOGOUT_URI
84
- },
85
- headers: {
86
- token: process.env.NUXT_PUBLIC_TOKEN_HEADER_NAME
87
- },
88
- config: options
89
- });
78
+ }
79
+ };
90
80
  nuxt.options.runtimeConfig.public.shwfed = resolvedConfig;
91
81
  addVitePlugin(VueI18nPlugin({
92
82
  ssr: true
@@ -120,27 +110,16 @@ const module$1 = defineNuxtModule({
120
110
  "vaul-vue",
121
111
  "dot-prop",
122
112
  "@internationalized/date",
123
- "reka-ui/date"
113
+ "reka-ui/date",
114
+ "@unovis/ts",
115
+ "@unovis/vue"
124
116
  );
125
117
  });
126
118
  addPlugin(resolver.resolve("./runtime/plugins/i18n"));
127
- addPlugin(resolver.resolve("./runtime/plugins/http"));
128
- addPlugin(resolver.resolve("./runtime/plugins/cel"));
129
- addPlugin(resolver.resolve("./runtime/plugins/toast"));
130
- addPlugin(resolver.resolve("./runtime/plugins/ai"));
131
- addRouteMiddleware({
132
- path: resolver.resolve("./runtime/middleware/token"),
133
- name: "shwfed-token",
134
- global: true
135
- });
136
119
  addComponent({
137
120
  name: "ShwfedApp",
138
121
  filePath: resolver.resolve("./runtime/components/app.vue")
139
122
  });
140
- addComponent({
141
- name: "ShwfedModal",
142
- filePath: resolver.resolve("./runtime/components/modal.vue")
143
- });
144
123
  addComponent({
145
124
  name: "ShwfedConfig",
146
125
  filePath: resolver.resolve("./runtime/components/config/index.vue")
@@ -160,11 +139,13 @@ const module$1 = defineNuxtModule({
160
139
  // Type-only auto-import: hosts binding `<ShwfedConfig v-model:config>`
161
140
  // get `PageConfigValue` globally without reaching into `runtime/`.
162
141
  { name: "PageConfigValue", from: resolver.resolve("./runtime/components/config/schema"), type: true },
163
- { name: "provideCELContext", from: resolver.resolve("./runtime/plugins/cel/context") },
164
- { name: "openModal", from: resolver.resolve("./runtime/composables/useOverlay") },
165
- { name: "confirm", from: resolver.resolve("./runtime/composables/useOverlay") },
166
- { name: "reject", from: resolver.resolve("./runtime/composables/useOverlay") },
167
- { name: "useCel", from: resolver.resolve("./runtime/composables/useCel") }
142
+ // `provideCELContext` lets the host app inject CEL variables (e.g. an
143
+ // auth token) into the config-driven components.
144
+ { name: "provideCELContext", from: resolver.resolve("./runtime/utils/cel-context") },
145
+ // `md` lets the host app author Markdown text (with shared trimming /
146
+ // de-indenting) for config-driven components; `Markdown` is its type.
147
+ { name: "md", from: resolver.resolve("./runtime/share/markdown") },
148
+ { name: "Markdown", from: resolver.resolve("./runtime/share/markdown"), type: true }
168
149
  ]);
169
150
  }
170
151
  });
@@ -4,19 +4,51 @@ type __VLS_ModelProps = {
4
4
  };
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  "update:modelValue": (value: {
7
+ readonly onError?: readonly {
8
+ readonly target: string;
9
+ readonly operation: string;
10
+ }[] | undefined;
7
11
  readonly type: "com.shwfed.actions.button.http.request.json";
8
12
  readonly compatibilityDate: "2026-04-18";
9
- readonly expression: string;
10
13
  readonly messageExpression?: string | undefined;
11
- readonly styleExpression?: string | undefined;
14
+ readonly resultExpression?: string | undefined;
15
+ readonly expression: string;
16
+ readonly onSuccess?: readonly {
17
+ readonly target: string;
18
+ readonly operation: string;
19
+ }[] | undefined;
20
+ readonly onWarning?: readonly {
21
+ readonly target: string;
22
+ readonly operation: string;
23
+ }[] | undefined;
24
+ readonly onInfo?: readonly {
25
+ readonly target: string;
26
+ readonly operation: string;
27
+ }[] | undefined;
12
28
  }) => any;
13
29
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
14
30
  "onUpdate:modelValue"?: ((value: {
31
+ readonly onError?: readonly {
32
+ readonly target: string;
33
+ readonly operation: string;
34
+ }[] | undefined;
15
35
  readonly type: "com.shwfed.actions.button.http.request.json";
16
36
  readonly compatibilityDate: "2026-04-18";
17
- readonly expression: string;
18
37
  readonly messageExpression?: string | undefined;
19
- readonly styleExpression?: string | undefined;
38
+ readonly resultExpression?: string | undefined;
39
+ readonly expression: string;
40
+ readonly onSuccess?: readonly {
41
+ readonly target: string;
42
+ readonly operation: string;
43
+ }[] | undefined;
44
+ readonly onWarning?: readonly {
45
+ readonly target: string;
46
+ readonly operation: string;
47
+ }[] | undefined;
48
+ readonly onInfo?: readonly {
49
+ readonly target: string;
50
+ readonly operation: string;
51
+ }[] | undefined;
20
52
  }) => any) | undefined;
21
53
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
54
  declare const _default: typeof __VLS_export;
@@ -3,6 +3,7 @@ import { Field, FieldLabel } from "../../../../ui/field";
3
3
  import { ExpressionEditor } from "../../../../ui/expression-editor";
4
4
  import { Markdown } from "../../../../ui/markdown";
5
5
  import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
6
+ import TriggersField from "../../../components/triggers-field.vue";
6
7
  import { schema } from "./schema";
7
8
  defineOptions({ name: "ShwfedHttpRequestActionConfig" });
8
9
  const value = defineModel({ type: null, ...{ required: true } });
@@ -10,18 +11,25 @@ const actionSchema = schema(() => {
10
11
  });
11
12
  const fieldTitle = (f) => getStructFieldTitle(actionSchema, f) ?? f;
12
13
  const fieldDescription = (f) => getStructFieldDescription(actionSchema, f);
14
+ const RESULT_FIELDS = ["onSuccess", "onWarning", "onError", "onInfo"];
13
15
  function updateMessageExpression(v) {
14
16
  const next = { ...value.value };
15
17
  if (v.length === 0) delete next.messageExpression;
16
18
  else next.messageExpression = v;
17
19
  value.value = next;
18
20
  }
19
- function updateStyleExpression(v) {
21
+ function updateResultExpression(v) {
20
22
  const next = { ...value.value };
21
- if (v.length === 0) delete next.styleExpression;
22
- else next.styleExpression = v;
23
+ if (v.length === 0) delete next.resultExpression;
24
+ else next.resultExpression = v;
23
25
  value.value = next;
24
26
  }
27
+ function updateTriggers(key, next) {
28
+ const draft = { ...value.value };
29
+ if (next.length === 0) Reflect.deleteProperty(draft, key);
30
+ else draft[key] = next;
31
+ value.value = draft;
32
+ }
25
33
  </script>
26
34
 
27
35
  <template>
@@ -83,23 +91,52 @@ function updateStyleExpression(v) {
83
91
  >
84
92
  <FieldLabel class="text-xs text-zinc-500">
85
93
  <template
86
- v-if="fieldDescription('styleExpression')"
94
+ v-if="fieldDescription('resultExpression')"
87
95
  #tooltip
88
96
  >
89
97
  <Markdown
90
- :source="fieldDescription('styleExpression')"
98
+ :source="fieldDescription('resultExpression')"
91
99
  block
92
100
  class="prose prose-sm prose-zinc"
93
101
  />
94
102
  </template>
95
- {{ fieldTitle("styleExpression") }}
103
+ {{ fieldTitle("resultExpression") }}
96
104
  </FieldLabel>
97
105
  <ExpressionEditor
98
- :model-value="value.styleExpression ?? ''"
106
+ :model-value="value.resultExpression ?? ''"
99
107
  placeholder="例:json.code == 0 ? 'success' : 'error'"
100
108
  result-type="string"
101
109
  :extra-vars="{ json: { type: 'dyn', label: 'HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09' } }"
102
- @update:model-value="updateStyleExpression"
110
+ @update:model-value="updateResultExpression"
111
+ />
112
+ </Field>
113
+ </div>
114
+
115
+ <!-- One trigger list per 「执行结果」: the request completes, the result
116
+ classifies the outcome, and the matching cell's operations run. -->
117
+ <div class="grid grid-cols-2 gap-3">
118
+ <Field
119
+ v-for="key in RESULT_FIELDS"
120
+ :key="key"
121
+ orientation="vertical"
122
+ class="min-w-0"
123
+ >
124
+ <FieldLabel class="text-xs text-zinc-500">
125
+ <template
126
+ v-if="fieldDescription(key)"
127
+ #tooltip
128
+ >
129
+ <Markdown
130
+ :source="fieldDescription(key)"
131
+ block
132
+ class="prose prose-sm prose-zinc"
133
+ />
134
+ </template>
135
+ {{ fieldTitle(key) }}
136
+ </FieldLabel>
137
+ <TriggersField
138
+ :triggers="value[key] ?? []"
139
+ @update:triggers="(v) => updateTriggers(key, v)"
103
140
  />
104
141
  </Field>
105
142
  </div>
@@ -4,19 +4,51 @@ type __VLS_ModelProps = {
4
4
  };
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  "update:modelValue": (value: {
7
+ readonly onError?: readonly {
8
+ readonly target: string;
9
+ readonly operation: string;
10
+ }[] | undefined;
7
11
  readonly type: "com.shwfed.actions.button.http.request.json";
8
12
  readonly compatibilityDate: "2026-04-18";
9
- readonly expression: string;
10
13
  readonly messageExpression?: string | undefined;
11
- readonly styleExpression?: string | undefined;
14
+ readonly resultExpression?: string | undefined;
15
+ readonly expression: string;
16
+ readonly onSuccess?: readonly {
17
+ readonly target: string;
18
+ readonly operation: string;
19
+ }[] | undefined;
20
+ readonly onWarning?: readonly {
21
+ readonly target: string;
22
+ readonly operation: string;
23
+ }[] | undefined;
24
+ readonly onInfo?: readonly {
25
+ readonly target: string;
26
+ readonly operation: string;
27
+ }[] | undefined;
12
28
  }) => any;
13
29
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
14
30
  "onUpdate:modelValue"?: ((value: {
31
+ readonly onError?: readonly {
32
+ readonly target: string;
33
+ readonly operation: string;
34
+ }[] | undefined;
15
35
  readonly type: "com.shwfed.actions.button.http.request.json";
16
36
  readonly compatibilityDate: "2026-04-18";
17
- readonly expression: string;
18
37
  readonly messageExpression?: string | undefined;
19
- readonly styleExpression?: string | undefined;
38
+ readonly resultExpression?: string | undefined;
39
+ readonly expression: string;
40
+ readonly onSuccess?: readonly {
41
+ readonly target: string;
42
+ readonly operation: string;
43
+ }[] | undefined;
44
+ readonly onWarning?: readonly {
45
+ readonly target: string;
46
+ readonly operation: string;
47
+ }[] | undefined;
48
+ readonly onInfo?: readonly {
49
+ readonly target: string;
50
+ readonly operation: string;
51
+ }[] | undefined;
20
52
  }) => any) | undefined;
21
53
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
54
  declare const _default: typeof __VLS_export;
@@ -1,7 +1,8 @@
1
1
  <script setup>
2
- import { useNuxtApp } from "#app";
3
2
  import { Effect } from "effect";
4
- import { celBindings, injectCELContext } from "../../../../../plugins/cel/context";
3
+ import { cel as _rawCel } from "../../../../../utils/cel";
4
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
5
+ import { useEventChannel } from "../../../../../share/event-bus";
5
6
  import ShwfedActionDefinition from "../../../components/definition.vue";
6
7
  import { executeHttpRequest } from "../../../utils/resolve";
7
8
  defineOptions({ name: "ShwfedHttpRequestActionRuntime" });
@@ -9,16 +10,21 @@ const props = defineProps({
9
10
  buttonId: { type: String, required: true },
10
11
  config: { type: null, required: true }
11
12
  });
12
- const { $cel: _rawCel } = useNuxtApp();
13
13
  const inherited = injectCELContext();
14
14
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
15
+ const channel = useEventChannel();
15
16
  const effect = Effect.suspend(
16
- () => executeHttpRequest(
17
- props.config.expression,
18
- $cel,
19
- props.config.messageExpression,
20
- props.config.styleExpression
21
- )
17
+ () => executeHttpRequest(props.config.expression, $cel, {
18
+ messageExpression: props.config.messageExpression,
19
+ resultExpression: props.config.resultExpression,
20
+ channel,
21
+ triggers: {
22
+ success: props.config.onSuccess,
23
+ warning: props.config.onWarning,
24
+ error: props.config.onError,
25
+ info: props.config.onInfo
26
+ }
27
+ })
22
28
  );
23
29
  </script>
24
30
 
@@ -11,6 +11,22 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
11
11
  compatibilityDate: Schema.Literal<["2026-04-18"]>;
12
12
  expression: Schema.Schema<string, string, never>;
13
13
  messageExpression: Schema.optional<Schema.Schema<string, string, never>>;
14
- styleExpression: Schema.optional<Schema.Schema<string, string, never>>;
14
+ resultExpression: Schema.optional<Schema.Schema<string, string, never>>;
15
+ onSuccess: Schema.optional<Schema.Array$<Schema.Struct<{
16
+ target: Schema.refine<string, typeof Schema.String>;
17
+ operation: Schema.SchemaClass<string, string, never>;
18
+ }>>>;
19
+ onWarning: Schema.optional<Schema.Array$<Schema.Struct<{
20
+ target: Schema.refine<string, typeof Schema.String>;
21
+ operation: Schema.SchemaClass<string, string, never>;
22
+ }>>>;
23
+ onError: Schema.optional<Schema.Array$<Schema.Struct<{
24
+ target: Schema.refine<string, typeof Schema.String>;
25
+ operation: Schema.SchemaClass<string, string, never>;
26
+ }>>>;
27
+ onInfo: Schema.optional<Schema.Array$<Schema.Struct<{
28
+ target: Schema.refine<string, typeof Schema.String>;
29
+ operation: Schema.SchemaClass<string, string, never>;
30
+ }>>>;
15
31
  }>;
16
32
  export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
@@ -1,5 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { Expression } from "../../../../../share/expression.js";
3
+ import { Triggers } from "../../../../../share/event-bus.js";
3
4
  import { md } from "../../../../../share/markdown.js";
4
5
  export const type = "com.shwfed.actions.button.http.request.json";
5
6
  export const compatibilityDate = "2026-04-18";
@@ -34,12 +35,30 @@ export function schema(configure) {
34
35
  不配置则不显示。
35
36
  `
36
37
  })),
37
- styleExpression: Schema.optional(CelMessage.annotations({
38
- title: "\u6D88\u606F\u6837\u5F0F",
38
+ resultExpression: Schema.optional(CelMessage.annotations({
39
+ title: "\u6267\u884C\u7ED3\u679C",
39
40
  description: md`
40
- 决定 toast 样式,返回 \`string\`。
41
- 支持 \`'success' | 'error' | 'warning' | 'info'\`;其他值按 \`success\` 处理。不配置则使用 \`success\`。
41
+ 在响应体解析为 JSON 后对其求值,返回 \`string\`。
42
+ 支持 \`'success' | 'warning' | 'error' | 'info'\`;其他值按 \`success\` 处理。不配置则按 \`success\` 处理。
43
+
44
+ 它同时决定 toast 的样式,以及请求完成后执行下方哪一组操作。
42
45
  `
46
+ })),
47
+ onSuccess: Schema.optional(Triggers.annotations({
48
+ title: "\u6210\u529F",
49
+ description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `success` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
50
+ })),
51
+ onWarning: Schema.optional(Triggers.annotations({
52
+ title: "\u8B66\u544A",
53
+ description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `warning` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
54
+ })),
55
+ onError: Schema.optional(Triggers.annotations({
56
+ title: "\u9519\u8BEF",
57
+ description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `error` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
58
+ })),
59
+ onInfo: Schema.optional(Triggers.annotations({
60
+ title: "\u4FE1\u606F",
61
+ description: "\u300C\u6267\u884C\u7ED3\u679C\u300D\u4E3A `info` \u65F6\uFF0C\u8BF7\u6C42\u5B8C\u6210\u540E\u6267\u884C\u7684\u64CD\u4F5C"
43
62
  }))
44
63
  }).annotations({
45
64
  title: "HttpRequestAction",
@@ -4,10 +4,16 @@ type __VLS_ModelProps = {
4
4
  };
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  "update:modelValue": (value: {
7
+ readonly onError?: readonly {
8
+ readonly target: string;
9
+ readonly operation: string;
10
+ }[] | undefined;
7
11
  readonly type: "com.shwfed.actions.button.http.request.json.confirm";
8
12
  readonly icon?: string | undefined;
9
13
  readonly color?: string | undefined;
10
14
  readonly compatibilityDate: "2026-04-18";
15
+ readonly messageExpression?: string | undefined;
16
+ readonly resultExpression?: string | undefined;
11
17
  readonly markdown: readonly [{
12
18
  readonly locale: "zh";
13
19
  readonly message: string;
@@ -16,15 +22,31 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
16
22
  readonly message: string;
17
23
  }[]];
18
24
  readonly expression: string;
19
- readonly messageExpression?: string | undefined;
20
- readonly styleExpression?: string | undefined;
25
+ readonly onSuccess?: readonly {
26
+ readonly target: string;
27
+ readonly operation: string;
28
+ }[] | undefined;
29
+ readonly onWarning?: readonly {
30
+ readonly target: string;
31
+ readonly operation: string;
32
+ }[] | undefined;
33
+ readonly onInfo?: readonly {
34
+ readonly target: string;
35
+ readonly operation: string;
36
+ }[] | undefined;
21
37
  }) => any;
22
38
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
23
39
  "onUpdate:modelValue"?: ((value: {
40
+ readonly onError?: readonly {
41
+ readonly target: string;
42
+ readonly operation: string;
43
+ }[] | undefined;
24
44
  readonly type: "com.shwfed.actions.button.http.request.json.confirm";
25
45
  readonly icon?: string | undefined;
26
46
  readonly color?: string | undefined;
27
47
  readonly compatibilityDate: "2026-04-18";
48
+ readonly messageExpression?: string | undefined;
49
+ readonly resultExpression?: string | undefined;
28
50
  readonly markdown: readonly [{
29
51
  readonly locale: "zh";
30
52
  readonly message: string;
@@ -33,8 +55,18 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
55
  readonly message: string;
34
56
  }[]];
35
57
  readonly expression: string;
36
- readonly messageExpression?: string | undefined;
37
- readonly styleExpression?: string | undefined;
58
+ readonly onSuccess?: readonly {
59
+ readonly target: string;
60
+ readonly operation: string;
61
+ }[] | undefined;
62
+ readonly onWarning?: readonly {
63
+ readonly target: string;
64
+ readonly operation: string;
65
+ }[] | undefined;
66
+ readonly onInfo?: readonly {
67
+ readonly target: string;
68
+ readonly operation: string;
69
+ }[] | undefined;
38
70
  }) => any) | undefined;
39
71
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
72
  declare const _default: typeof __VLS_export;
@@ -6,6 +6,7 @@ import { Locale as LocaleField } from "../../../../ui/locale";
6
6
  import { ExpressionEditor } from "../../../../ui/expression-editor";
7
7
  import { Markdown } from "../../../../ui/markdown";
8
8
  import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
9
+ import TriggersField from "../../../components/triggers-field.vue";
9
10
  import { schema } from "./schema";
10
11
  defineOptions({ name: "ShwfedHttpRequestConfirmActionConfig" });
11
12
  const value = defineModel({ type: null, ...{ required: true } });
@@ -20,6 +21,10 @@ function patch(patchValue) {
20
21
  }
21
22
  value.value = next;
22
23
  }
24
+ const RESULT_FIELDS = ["onSuccess", "onWarning", "onError", "onInfo"];
25
+ function updateTriggers(key, next) {
26
+ patch({ [key]: next.length === 0 ? void 0 : next });
27
+ }
23
28
  </script>
24
29
 
25
30
  <template>
@@ -146,23 +151,52 @@ function patch(patchValue) {
146
151
  >
147
152
  <FieldLabel class="text-xs text-zinc-500">
148
153
  <template
149
- v-if="fieldDescription('styleExpression')"
154
+ v-if="fieldDescription('resultExpression')"
150
155
  #tooltip
151
156
  >
152
157
  <Markdown
153
- :source="fieldDescription('styleExpression')"
158
+ :source="fieldDescription('resultExpression')"
154
159
  block
155
160
  class="prose prose-sm prose-zinc"
156
161
  />
157
162
  </template>
158
- {{ fieldTitle("styleExpression") }}
163
+ {{ fieldTitle("resultExpression") }}
159
164
  </FieldLabel>
160
165
  <ExpressionEditor
161
- :model-value="value.styleExpression ?? ''"
166
+ :model-value="value.resultExpression ?? ''"
162
167
  placeholder="例:json.code == 0 ? 'success' : 'error'"
163
168
  result-type="string"
164
169
  :extra-vars="{ json: { type: 'dyn', label: 'HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09' } }"
165
- @update:model-value="(v) => patch({ styleExpression: v === '' ? void 0 : v })"
170
+ @update:model-value="(v) => patch({ resultExpression: v === '' ? void 0 : v })"
171
+ />
172
+ </Field>
173
+ </div>
174
+
175
+ <!-- One trigger list per 「执行结果」: the request completes, the result
176
+ classifies the outcome, and the matching cell's operations run. -->
177
+ <div class="grid grid-cols-2 gap-3">
178
+ <Field
179
+ v-for="key in RESULT_FIELDS"
180
+ :key="key"
181
+ orientation="vertical"
182
+ class="min-w-0"
183
+ >
184
+ <FieldLabel class="text-xs text-zinc-500">
185
+ <template
186
+ v-if="fieldDescription(key)"
187
+ #tooltip
188
+ >
189
+ <Markdown
190
+ :source="fieldDescription(key)"
191
+ block
192
+ class="prose prose-sm prose-zinc"
193
+ />
194
+ </template>
195
+ {{ fieldTitle(key) }}
196
+ </FieldLabel>
197
+ <TriggersField
198
+ :triggers="value[key] ?? []"
199
+ @update:triggers="(v) => updateTriggers(key, v)"
166
200
  />
167
201
  </Field>
168
202
  </div>