@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
@@ -144,6 +144,8 @@ size(b"hello") // 5
144
144
  ```cel
145
145
  date("2023-06-15") // create a Date
146
146
  date("2023-06-15T10:30:00Z") // with time component
147
+ date(1718409600) // from a Unix timestamp — seconds...
148
+ date(1718409600000) // ...or milliseconds (unit auto-detected by magnitude)
147
149
 
148
150
  // Comparisons:
149
151
  date("2023-01-01") < date("2024-01-01") // true
@@ -172,44 +174,67 @@ d.format("yyyy-MM-dd") // "2023-06-15"
172
174
  d.format("MMMM d, yyyy") // "June 15, 2023"
173
175
  ```
174
176
 
177
+ ### Ranges
178
+ `range()` builds a list. It is **end-exclusive** (Rust `..` style) and the
179
+ direction is taken from the operands — when `start > end` it counts down.
180
+ ```cel
181
+ range(0, 5) // [0, 1, 2, 3, 4]
182
+ range(0, 10, 2) // [0, 2, 4, 6, 8] — with a step
183
+ range(5, 0) // [5, 4, 3, 2, 1] — counts down
184
+ range(date("2024-01-01"), date("2024-04-01"), "month")
185
+ // [2024-01-01, 2024-02-01, 2024-03-01]
186
+ // Date unit is one of: "year", "month", "day", "hour", "minute".
187
+ ```
188
+
189
+ ### URL
190
+ A `URL` value is supplied by the host (e.g. a `location` variable bound to the
191
+ current page URL). You cannot construct one in CEL.
192
+ ```cel
193
+ location.param("tab") // value of the ?tab= search param
194
+ location.param("missing") // "" — absent params yield empty string
195
+ location.param("id") // first value when a param repeats
196
+ ```
197
+
175
198
  ## HTTP
176
199
 
177
200
  Build HTTP requests using the `http` builder. CEL expressions only *describe* a request — the host dispatches it. There is no way to send a request or read a response from CEL.
178
201
 
202
+ **URLs must be absolute** — pass a full `https://…` URL. There is no base URL, so relative paths like `/api/users` will not resolve.
203
+
179
204
  ### Creating requests
180
205
  ```cel
181
- http.get("/api/users") // GET request
182
- http.post("/api/users") // POST request
183
- http.put("/api/users/1") // PUT request
184
- http.patch("/api/users/1") // PATCH request
185
- http.delete("/api/users/1") // DELETE request
206
+ http.get("https://api.example.com/users") // GET request
207
+ http.post("https://api.example.com/users") // POST request
208
+ http.put("https://api.example.com/users/1") // PUT request
209
+ http.patch("https://api.example.com/users/1") // PATCH request
210
+ http.delete("https://api.example.com/users/1") // DELETE request
186
211
  ```
187
212
 
188
213
  ### Builder methods (chainable)
189
214
  ```cel
190
215
  // Add headers:
191
- http.get("/api/users")
216
+ http.get("https://api.example.com/users")
192
217
  .header("Authorization", "Bearer token")
193
218
  .header("Accept", "application/json")
194
219
 
195
220
  // Add query parameters:
196
- http.get("/api/users")
221
+ http.get("https://api.example.com/users")
197
222
  .query("page", "1")
198
223
  .query("limit", "10")
199
224
 
200
225
  // Splat a record (e.g. a form) into query parameters.
201
226
  // null, undefined and "" values are skipped; arrays append one entry per item;
202
227
  // nested objects throw.
203
- http.get("/api/users")
228
+ http.get("https://api.example.com/users")
204
229
  .query(form)
205
230
  .query("page", string(pageIndex))
206
231
 
207
232
  // Set request body (auto-serializes to JSON):
208
- http.post("/api/users")
233
+ http.post("https://api.example.com/users")
209
234
  .body({"name": "Alice", "email": "alice@example.com"})
210
235
 
211
236
  // Full example — the expression returns an HttpRequest; the host sends it:
212
- http.post("/api/users")
237
+ http.post("https://api.example.com/users")
213
238
  .header("Authorization", "Bearer " + token)
214
239
  .body({"name": "Alice"})
215
240
  ```
@@ -4,7 +4,7 @@ import { TYPES, Type } from "./registry.js";
4
4
  import { register as registerOptional } from "./optional.js";
5
5
  import { objKeys, arrayFrom } from "./globals.js";
6
6
  import { TZDate } from "@date-fns/tz";
7
- import { startOfDay, startOfWeek, startOfMonth, startOfYear, endOfDay, endOfWeek, endOfMonth, endOfYear, addDays, addWeeks, addMonths, addYears, setDate as setDayOfMonth, setMonth, setYear, format as formatDate } from "date-fns";
7
+ import { startOfDay, startOfWeek, startOfMonth, startOfYear, endOfDay, endOfWeek, endOfMonth, endOfYear, addDays, addWeeks, addMonths, addYears, addHours, addMinutes, setDate as setDayOfMonth, setMonth, setYear, format as formatDate } from "date-fns";
8
8
  function toNum(v) {
9
9
  if (v instanceof Decimal) return v.toNumber();
10
10
  if (typeof v === "bigint") return Number(v);
@@ -269,6 +269,66 @@ export function registerFunctions(registry) {
269
269
  if (Number.isNaN(d.getTime())) throw evaluationError("invalid_date", `date() requires a valid date string, got "${v}"`);
270
270
  return d;
271
271
  });
272
+ functionOverload("date(number): Date", (v) => {
273
+ const n = toNum(v);
274
+ if (!Number.isFinite(n)) {
275
+ throw evaluationError("invalid_date", `date() requires a finite timestamp, got ${v}`);
276
+ }
277
+ const ms = Math.abs(n) < 1e11 ? n * 1e3 : n;
278
+ const d = new TZDate(ms);
279
+ if (Number.isNaN(d.getTime())) {
280
+ throw evaluationError("invalid_date", `date() got an out-of-range timestamp: ${v}`);
281
+ }
282
+ return d;
283
+ });
284
+ const RANGE_LIMIT = 1e5;
285
+ function numericRange(startD, endD, stepD) {
286
+ const step = stepD.toNumber();
287
+ if (!(step > 0)) {
288
+ throw evaluationError("invalid_range", `range(): step must be greater than 0, got ${step}`);
289
+ }
290
+ const end = endD.toNumber();
291
+ const ascending = startD.toNumber() < end;
292
+ const delta = ascending ? stepD : stepD.neg();
293
+ const out = [];
294
+ let cur = startD;
295
+ while (ascending ? cur.toNumber() < end : cur.toNumber() > end) {
296
+ out.push(cur);
297
+ if (out.length > RANGE_LIMIT) {
298
+ throw evaluationError("range_too_large", `range(): exceeded the ${RANGE_LIMIT}-item limit`);
299
+ }
300
+ cur = cur.add(delta);
301
+ }
302
+ return out;
303
+ }
304
+ functionOverload("range(number, number): list<dyn>", (start, end) => numericRange(start, end, Decimal.from(1)));
305
+ functionOverload("range(number, number, number): list<dyn>", (start, end, step) => numericRange(start, end, step));
306
+ const rangeSteppers = {
307
+ year: addYears,
308
+ month: addMonths,
309
+ day: addDays,
310
+ hour: addHours,
311
+ minute: addMinutes
312
+ };
313
+ functionOverload("range(Date, Date, string): list<dyn>", (startV, endV, unitV) => {
314
+ const start = startV;
315
+ const stepFn = rangeSteppers[unitV];
316
+ if (!stepFn) {
317
+ throw evaluationError("invalid_unit", `range(): unknown unit "${unitV}" (expected year / month / day / hour / minute)`);
318
+ }
319
+ const endMs = endV.getTime();
320
+ const ascending = start.getTime() < endMs;
321
+ const out = [];
322
+ let cur = start;
323
+ while (ascending ? cur.getTime() < endMs : cur.getTime() > endMs) {
324
+ out.push(cur);
325
+ if (out.length > RANGE_LIMIT) {
326
+ throw evaluationError("range_too_large", `range(): exceeded the ${RANGE_LIMIT}-item limit`);
327
+ }
328
+ cur = wrapTZ(stepFn(cur, ascending ? 1 : -1), start);
329
+ }
330
+ return out;
331
+ });
272
332
  functionOverload("Date.startOf(string): Date", (d, unit) => {
273
333
  const date = d;
274
334
  switch (unit) {
@@ -331,6 +391,8 @@ export function registerFunctions(registry) {
331
391
  });
332
392
  functionOverload("Date.format(string): string", (d, fmt) => formatDate(d, fmt));
333
393
  registry.registerType("File", File);
394
+ registry.registerType("URL", URL);
395
+ functionOverload("URL.param(string): string", (url, key) => url.searchParams.get(key) ?? "");
334
396
  registerOptional(registry);
335
397
  }
336
398
  function stringSize(str) {
@@ -0,0 +1,35 @@
1
+ /**
2
+ * `HttpRequestBuilder` — the value an `http.*` CEL expression evaluates to.
3
+ *
4
+ * A local (non-upstream) extension. CEL only *describes* a request; the host
5
+ * dispatches it by calling `.json()` / `.file()` on the returned builder.
6
+ *
7
+ * Endpoints are used verbatim — there is no base-URL resolution, so callers
8
+ * must pass absolute URLs.
9
+ */
10
+ import { Effect } from 'effect';
11
+ import { Fetch } from 'fx-fetch';
12
+ export declare class HttpRequestBuilder {
13
+ #private;
14
+ constructor(url: string, method: string);
15
+ header(name: string, value: string): this;
16
+ query(key: string, value: string | number): this;
17
+ query(record: Record<string, unknown>): this;
18
+ body(data: FormData | unknown): this;
19
+ /**
20
+ * A structural snapshot of the request this builder will issue — an equal
21
+ * snapshot means an equal HTTP request. Handy for change-detection, e.g.
22
+ * deciding whether a refetch is warranted. Non-string bodies (`FormData`,
23
+ * `Blob`, `ArrayBuffer`) collapse to a `'[binary]'` marker, so equal
24
+ * snapshots do not guarantee equal bodies in that case.
25
+ */
26
+ describe(): {
27
+ url: string;
28
+ method: string;
29
+ headers: ReadonlyArray<readonly [string, string]>;
30
+ queries: ReadonlyArray<readonly [string, string]>;
31
+ body: string | null;
32
+ };
33
+ json(): Effect.Effect<unknown, import("fx-fetch/Cause").MalformedJsonError | Fetch.Fetch.ErrorType, Fetch.Fetch>;
34
+ file(): Effect.Effect<File, Fetch.Fetch.ErrorType | import("fx-fetch/Cause").MalformedBlobError, Fetch.Fetch>;
35
+ }
@@ -4,9 +4,6 @@ import {
4
4
  Request as FxRequest,
5
5
  Response as FxResponse
6
6
  } from "fx-fetch";
7
- export function resolveUrl(baseUrl, endpoint) {
8
- return /^https?:\/\//.test(endpoint) ? endpoint : baseUrl + endpoint;
9
- }
10
7
  function extractFilename(response, url) {
11
8
  const disposition = FxResponse.getHeader(response, "content-disposition");
12
9
  if (disposition) {
@@ -22,14 +19,9 @@ export class HttpRequestBuilder {
22
19
  #headers = [];
23
20
  #queries = [];
24
21
  #body;
25
- #intercept;
26
- constructor(url, method, defaultHeaders, intercept) {
22
+ constructor(url, method) {
27
23
  this.#url = url;
28
24
  this.#method = method;
29
- if (defaultHeaders) {
30
- this.#headers = [...defaultHeaders];
31
- }
32
- this.#intercept = intercept;
33
25
  }
34
26
  header(name, value) {
35
27
  this.#headers.push([name, value]);
@@ -68,24 +60,34 @@ export class HttpRequestBuilder {
68
60
  }
69
61
  return this;
70
62
  }
63
+ /**
64
+ * A structural snapshot of the request this builder will issue — an equal
65
+ * snapshot means an equal HTTP request. Handy for change-detection, e.g.
66
+ * deciding whether a refetch is warranted. Non-string bodies (`FormData`,
67
+ * `Blob`, `ArrayBuffer`) collapse to a `'[binary]'` marker, so equal
68
+ * snapshots do not guarantee equal bodies in that case.
69
+ */
70
+ describe() {
71
+ return {
72
+ url: this.#url,
73
+ method: this.#method,
74
+ headers: this.#headers.map(([k, v]) => [k, v]),
75
+ queries: this.#queries.map(([k, v]) => [k, v]),
76
+ body: typeof this.#body === "string" ? this.#body : this.#body === void 0 ? null : "[binary]"
77
+ };
78
+ }
71
79
  json() {
72
- const run = () => Fetch.fetchJson(this.#buildRequest());
73
- const intercept = this.#intercept;
74
- return intercept ? Effect.flatMap(intercept(this), run) : run();
80
+ return Fetch.fetchJson(this.#buildRequest());
75
81
  }
76
82
  file() {
77
83
  const url = this.#url;
78
- const run = () => {
79
- const request = this.#buildRequest();
80
- return Effect.gen(function* () {
81
- const response = yield* Fetch.fetch(request);
82
- yield* FxResponse.ensureOk(response);
83
- const blob = yield* FxResponse.readBlob(response);
84
- return new File([blob], extractFilename(response, url));
85
- });
86
- };
87
- const intercept = this.#intercept;
88
- return intercept ? Effect.flatMap(intercept(this), run) : run();
84
+ const request = this.#buildRequest();
85
+ return Effect.gen(function* () {
86
+ const response = yield* Fetch.fetch(request);
87
+ yield* FxResponse.ensureOk(response);
88
+ const blob = yield* FxResponse.readBlob(response);
89
+ return new File([blob], extractFilename(response, url));
90
+ });
89
91
  }
90
92
  #buildRequest() {
91
93
  const parts = {
@@ -1,16 +1,15 @@
1
1
  /**
2
- * Registers HTTP type declarations, the `http` variable, and function signatures
3
- * on the global registry for compile-time CEL type checking.
2
+ * HTTP built-ins for CEL a local (non-upstream) extension.
4
3
  *
5
- * At runtime, `registerHttpFunctions` from `plugins/cel/http.ts` replaces these
6
- * stub function handlers with real implementations and registers the actual
7
- * constructors via `registerType`.
4
+ * Registers the `http` / `HttpRequest` types, the `http` constant, and the
5
+ * request-builder functions on the registry. A CEL expression only *describes*
6
+ * a request `http.get(url).header(...).body(...)` evaluates to an
7
+ * `HttpRequestBuilder`; the host dispatches it via `.json()` / `.file()`.
8
8
  *
9
- * This works because:
10
- * - `declareType` only populates `#typeDeclarations`, not `objectTypes`.
11
- * So `registerType(name, ctor)` at runtime does not conflict.
12
- * - `registerFunctionOverload` with `#checkOverlappingSignatures` allows
13
- * replacing an existing overload, so runtime handlers override the stubs.
9
+ * Wired into `globalRegistry` at module load (see `evaluator.ts`), so every
10
+ * `Environment` gets HTTP for free — both type-checking and evaluation.
11
+ *
12
+ * Endpoints must be absolute URLs; there is no base-URL resolution.
14
13
  */
15
14
  import type { Registry } from './registry.js.js';
16
15
  export declare function registerHttpBuiltins(registry: Registry): void;
@@ -1,15 +1,55 @@
1
+ import { HttpRequestBuilder } from "./http-builder.js";
2
+ class Http {
3
+ brand = "http";
4
+ }
5
+ const HTTP_INSTANCE = new Http();
1
6
  export function registerHttpBuiltins(registry) {
2
- registry.declareType("http");
3
- registry.declareType("HttpRequest");
4
- registry.registerVariable("http", "http", { description: "HTTP \u5BA2\u6237\u7AEF" });
5
- registry.registerFunctionOverload("http.get(string): HttpRequest");
6
- registry.registerFunctionOverload("http.post(string): HttpRequest");
7
- registry.registerFunctionOverload("http.put(string): HttpRequest");
8
- registry.registerFunctionOverload("http.patch(string): HttpRequest");
9
- registry.registerFunctionOverload("http.delete(string): HttpRequest");
10
- registry.registerFunctionOverload("HttpRequest.header(string, string): HttpRequest");
11
- registry.registerFunctionOverload("HttpRequest.query(string, string): HttpRequest");
12
- registry.registerFunctionOverload("HttpRequest.query(string, number): HttpRequest");
13
- registry.registerFunctionOverload("HttpRequest.query(dyn): HttpRequest");
14
- registry.registerFunctionOverload("HttpRequest.body(dyn): HttpRequest");
7
+ registry.registerType("http", Http);
8
+ registry.registerType("HttpRequest", HttpRequestBuilder);
9
+ registry.registerVariable({
10
+ name: "http",
11
+ type: "http",
12
+ value: HTTP_INSTANCE,
13
+ description: "HTTP \u5BA2\u6237\u7AEF"
14
+ });
15
+ registry.registerFunctionOverload(
16
+ "http.get(string): HttpRequest",
17
+ (_r, url) => new HttpRequestBuilder(url, "GET")
18
+ );
19
+ registry.registerFunctionOverload(
20
+ "http.post(string): HttpRequest",
21
+ (_r, url) => new HttpRequestBuilder(url, "POST")
22
+ );
23
+ registry.registerFunctionOverload(
24
+ "http.put(string): HttpRequest",
25
+ (_r, url) => new HttpRequestBuilder(url, "PUT")
26
+ );
27
+ registry.registerFunctionOverload(
28
+ "http.patch(string): HttpRequest",
29
+ (_r, url) => new HttpRequestBuilder(url, "PATCH")
30
+ );
31
+ registry.registerFunctionOverload(
32
+ "http.delete(string): HttpRequest",
33
+ (_r, url) => new HttpRequestBuilder(url, "DELETE")
34
+ );
35
+ registry.registerFunctionOverload(
36
+ "HttpRequest.header(string, string): HttpRequest",
37
+ (b, k, v) => b.header(k, v)
38
+ );
39
+ registry.registerFunctionOverload(
40
+ "HttpRequest.query(string, string): HttpRequest",
41
+ (b, k, v) => b.query(k, v)
42
+ );
43
+ registry.registerFunctionOverload(
44
+ "HttpRequest.query(string, number): HttpRequest",
45
+ (b, k, v) => b.query(k, Number(v))
46
+ );
47
+ registry.registerFunctionOverload(
48
+ "HttpRequest.query(dyn): HttpRequest",
49
+ (b, record) => b.query(record)
50
+ );
51
+ registry.registerFunctionOverload(
52
+ "HttpRequest.body(dyn): HttpRequest",
53
+ (b, data) => b.body(data)
54
+ );
15
55
  }
package/dist/types.d.mts CHANGED
@@ -1,3 +1,9 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
2
+
3
+ import type { default as Module } from './module.mjs'
4
+
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
+
1
7
  export { default } from './module.mjs'
2
8
 
3
- export { type Env, type ModuleOptions } from './module.mjs'
9
+ export { type Env } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "1.1.5",
3
+ "version": "2.0.1",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,10 +0,0 @@
1
- <script setup>
2
- defineOptions({ name: "ShwfedTableResetButtonConfig" });
3
- defineModel({ type: null, ...{ required: true } });
4
- </script>
5
-
6
- <template>
7
- <p class="text-xs text-zinc-500">
8
- 点击后将搜索条件重置为 <code>query.initial</code> 表达式的求值结果,随后将分页重置为第一页并重新发起数据请求。需放置于 <code>shwfed-table</code> 内部。
9
- </p>
10
- </template>
@@ -1,25 +0,0 @@
1
- <script setup>
2
- import { Effect } from "effect";
3
- import ShwfedActionDefinition from "../../../components/definition.vue";
4
- import { useTableHost } from "../../../../table/utils/host";
5
- defineOptions({ name: "ShwfedTableResetButtonRuntime" });
6
- defineProps({
7
- buttonId: { type: String, required: true },
8
- config: { type: null, required: true }
9
- });
10
- const host = useTableHost();
11
- const effect = Effect.suspend(() => {
12
- if (!host) return Effect.void;
13
- return Effect.promise(async () => {
14
- await host.resetQuery();
15
- await host.search();
16
- });
17
- });
18
- </script>
19
-
20
- <template>
21
- <ShwfedActionDefinition
22
- :action-id="buttonId"
23
- :effect="effect"
24
- />
25
- </template>
@@ -1,13 +0,0 @@
1
- import { Schema } from 'effect';
2
- import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
3
- export declare const type: "com.shwfed.actions.button.table.reset";
4
- export declare const compatibilityDate: "2026-04-27";
5
- export declare const metadata: {
6
- readonly name: "重置(查询表格)";
7
- readonly icon: "fluent:arrow-reset-20-regular";
8
- };
9
- export declare function schema(_configure: (env: Environment) => void): Schema.Struct<{
10
- type: Schema.Literal<["com.shwfed.actions.button.table.reset"]>;
11
- compatibilityDate: Schema.Literal<["2026-04-27"]>;
12
- }>;
13
- export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
@@ -1,16 +0,0 @@
1
- import { Schema } from "effect";
2
- export const type = "com.shwfed.actions.button.table.reset";
3
- export const compatibilityDate = "2026-04-27";
4
- export const metadata = {
5
- name: "\u91CD\u7F6E\uFF08\u67E5\u8BE2\u8868\u683C\uFF09",
6
- icon: "fluent:arrow-reset-20-regular"
7
- };
8
- export function schema(_configure) {
9
- return Schema.Struct({
10
- type: Schema.Literal(type),
11
- compatibilityDate: Schema.Literal(compatibilityDate)
12
- }).annotations({
13
- title: "TableResetButton",
14
- description: "\u5C06\u641C\u7D22\u6761\u4EF6\u91CD\u7F6E\u4E3A `query.initial` \u8868\u8FBE\u5F0F\u7684\u6C42\u503C\u7ED3\u679C\uFF0C\u968F\u540E\u5C06\u5206\u9875\u91CD\u7F6E\u4E3A\u7B2C\u4E00\u9875\u5E76\u91CD\u65B0\u62C9\u53D6\u6570\u636E\u3002\u9700\u653E\u7F6E\u4E8E `shwfed-table` \u5185\u90E8\u3002"
15
- });
16
- }
@@ -1,17 +0,0 @@
1
- import type { Value } from './schema.js';
2
- type __VLS_ModelProps = {
3
- modelValue: Value;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
- "update:modelValue": (value: {
7
- readonly type: "com.shwfed.actions.button.table.search";
8
- readonly compatibilityDate: "2026-04-27";
9
- }) => any;
10
- }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
11
- "onUpdate:modelValue"?: ((value: {
12
- readonly type: "com.shwfed.actions.button.table.search";
13
- readonly compatibilityDate: "2026-04-27";
14
- }) => any) | undefined;
15
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
- declare const _default: typeof __VLS_export;
17
- export default _default;
@@ -1,10 +0,0 @@
1
- <script setup>
2
- defineOptions({ name: "ShwfedTableSearchButtonConfig" });
3
- defineModel({ type: null, ...{ required: true } });
4
- </script>
5
-
6
- <template>
7
- <p class="text-xs text-zinc-500">
8
- 点击后将查询表格的分页重置为第一页并重新发起数据请求。需放置于 <code>shwfed-table</code> 内部。
9
- </p>
10
- </template>
@@ -1,17 +0,0 @@
1
- import type { Value } from './schema.js';
2
- type __VLS_ModelProps = {
3
- modelValue: Value;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
- "update:modelValue": (value: {
7
- readonly type: "com.shwfed.actions.button.table.search";
8
- readonly compatibilityDate: "2026-04-27";
9
- }) => any;
10
- }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
11
- "onUpdate:modelValue"?: ((value: {
12
- readonly type: "com.shwfed.actions.button.table.search";
13
- readonly compatibilityDate: "2026-04-27";
14
- }) => any) | undefined;
15
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
- declare const _default: typeof __VLS_export;
17
- export default _default;
@@ -1,13 +0,0 @@
1
- import { Schema } from 'effect';
2
- import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
3
- export declare const type: "com.shwfed.actions.button.table.search";
4
- export declare const compatibilityDate: "2026-04-27";
5
- export declare const metadata: {
6
- readonly name: "搜索(查询表格)";
7
- readonly icon: "fluent:search-20-regular";
8
- };
9
- export declare function schema(_configure: (env: Environment) => void): Schema.Struct<{
10
- type: Schema.Literal<["com.shwfed.actions.button.table.search"]>;
11
- compatibilityDate: Schema.Literal<["2026-04-27"]>;
12
- }>;
13
- export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
@@ -1,16 +0,0 @@
1
- import { Schema } from "effect";
2
- export const type = "com.shwfed.actions.button.table.search";
3
- export const compatibilityDate = "2026-04-27";
4
- export const metadata = {
5
- name: "\u641C\u7D22\uFF08\u67E5\u8BE2\u8868\u683C\uFF09",
6
- icon: "fluent:search-20-regular"
7
- };
8
- export function schema(_configure) {
9
- return Schema.Struct({
10
- type: Schema.Literal(type),
11
- compatibilityDate: Schema.Literal(compatibilityDate)
12
- }).annotations({
13
- title: "TableSearchButton",
14
- description: "\u5C06\u67E5\u8BE2\u8868\u683C\u7684\u5206\u9875\u91CD\u7F6E\u4E3A\u7B2C\u4E00\u9875\u5E76\u91CD\u65B0\u62C9\u53D6\u6570\u636E\uFF1B\u641C\u7D22\u6761\u4EF6\u4FDD\u6301\u4E0D\u53D8\u3002\u9700\u653E\u7F6E\u4E8E `shwfed-table` \u5185\u90E8\u3002"
15
- });
16
- }
@@ -1,9 +0,0 @@
1
- import type { InjectionKey } from 'vue';
2
- export type TableHost = Readonly<{
3
- search: () => Promise<void>;
4
- refetch: () => Promise<void>;
5
- resetQuery: () => Promise<void>;
6
- }>;
7
- export declare const TABLE_HOST_KEY: InjectionKey<TableHost>;
8
- export declare function provideTableHost(host: TableHost): void;
9
- export declare function useTableHost(): TableHost | undefined;
@@ -1,8 +0,0 @@
1
- import { inject, provide } from "vue";
2
- export const TABLE_HOST_KEY = Symbol("shwfed-table-host");
3
- export function provideTableHost(host) {
4
- provide(TABLE_HOST_KEY, host);
5
- }
6
- export function useTableHost() {
7
- return inject(TABLE_HOST_KEY, void 0);
8
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * Composable that returns a CEL evaluator bound to the current component's
3
- * injected context. Must be called during `setup()` so that `inject` works.
4
- *
5
- * @example
6
- * ```vue
7
- * <script setup>
8
- * const cel = useCel()
9
- * </script>
10
- *
11
- * <template>
12
- * <div>{{ cel('1 + 2') }}</div>
13
- * </template>
14
- * ```
15
- */
16
- export declare function useCel(): <T>(expression: string, context?: Record<string, unknown>) => any;
@@ -1,8 +0,0 @@
1
- import { useNuxtApp } from "#app";
2
- import defu from "defu";
3
- import { celBindings, injectCELContext } from "../plugins/cel/context.js";
4
- export function useCel() {
5
- const { $cel } = useNuxtApp();
6
- const inherited = injectCELContext();
7
- return (expression, context) => $cel(expression, defu(celBindings(inherited), context));
8
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("#app").RouteMiddleware;
2
- export default _default;
@@ -1,20 +0,0 @@
1
- import { defineNuxtRouteMiddleware, navigateTo, useRuntimeConfig } from "#app";
2
- const TOKEN_PARAMS = ["token", "code", "access_token", "authorization"];
3
- export default defineNuxtRouteMiddleware((to, from) => {
4
- if (from.name) return;
5
- const queryKeys = Object.keys(to.query);
6
- let matchedKey;
7
- for (const param of TOKEN_PARAMS) {
8
- matchedKey = queryKeys.find((k) => k.toLowerCase() === param);
9
- if (matchedKey) break;
10
- }
11
- if (!matchedKey) return;
12
- const value = to.query[matchedKey];
13
- if (!value || Array.isArray(value)) return;
14
- if (import.meta.client) {
15
- const config = useRuntimeConfig().public.shwfed;
16
- localStorage.setItem(config.ci.job || "token", value);
17
- }
18
- const { [matchedKey]: _, ...remainingQuery } = to.query;
19
- return navigateTo({ ...to, query: remainingQuery }, { replace: true });
20
- });
@@ -1,8 +0,0 @@
1
- import type { NuxtApp } from '#app';
2
- import type { Environment } from '../../vendor/cel-js/lib/index.js';
3
- declare class Http {
4
- readonly brand: "http";
5
- }
6
- export declare const HTTP_INSTANCE: Http;
7
- export declare function registerHttpFunctions(env: Environment, http: NuxtApp['$http']): void;
8
- export {};