@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
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import { ExpressionEditor } from "../../../../ui/expression-editor";
4
+ import DerivedValueEditor from "../../../DerivedValueEditor.vue";
4
5
  import { Field, FieldLabel } from "../../../../ui/field";
5
6
  import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
6
7
  import { Locale as LocaleField } from "../../../../ui/locale";
@@ -14,7 +15,7 @@ import {
14
15
  } from "../../../../ui/select";
15
16
  import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
16
17
  import { DEFAULT_FIELD_ORIENTATION, FIELD_ORIENTATION_OPTIONS } from "../../../utils/common";
17
- import { schema } from "./schema";
18
+ import { JSON_VAR, OPTION_VAR, schema } from "./schema";
18
19
  defineOptions({ name: "ShwfedComboboxSingleRemoteFieldConfig" });
19
20
  const value = defineModel({ type: null, ...{ required: true } });
20
21
  const fieldSchema = schema(() => {
@@ -141,6 +142,7 @@ const pathText = computed({
141
142
  {{ fieldTitle("tooltip") }}
142
143
  </FieldLabel>
143
144
  <LocaleField
145
+ markdown
144
146
  :model-value="value.tooltip"
145
147
  @update:model-value="(v) => value = { ...value, tooltip: v }"
146
148
  />
@@ -220,6 +222,7 @@ const pathText = computed({
220
222
  :model-value="value.options"
221
223
  placeholder="例:json.data"
222
224
  result-type="list"
225
+ :extra-vars="{ json: JSON_VAR }"
223
226
  class="min-h-10"
224
227
  @update:model-value="(v) => value = { ...value, options: v }"
225
228
  />
@@ -242,6 +245,7 @@ const pathText = computed({
242
245
  :model-value="value.optionValue"
243
246
  placeholder="例:option[&quot;value&quot;]"
244
247
  result-type="dyn"
248
+ :extra-vars="{ option: OPTION_VAR }"
245
249
  class="min-h-10"
246
250
  @update:model-value="(v) => value = { ...value, optionValue: v }"
247
251
  />
@@ -259,6 +263,7 @@ const pathText = computed({
259
263
  {{ fieldTitle("optionLabel") }}
260
264
  </FieldLabel>
261
265
  <LocaleField
266
+ markdown
262
267
  :model-value="value.optionLabel"
263
268
  @update:model-value="(v) => value = { ...value, optionLabel: v }"
264
269
  />
@@ -326,5 +331,24 @@ const pathText = computed({
326
331
  />
327
332
  </Field>
328
333
  </div>
334
+
335
+ <Field orientation="vertical">
336
+ <FieldLabel class="text-xs text-zinc-500">
337
+ <template #tooltip>
338
+ <Markdown
339
+ :source="fieldDescription('derived')"
340
+ block
341
+ class="prose prose-sm prose-zinc"
342
+ />
343
+ </template>
344
+ {{ fieldTitle("derived") }}
345
+ </FieldLabel>
346
+ <DerivedValueEditor
347
+ :model-value="value.derived"
348
+ result-type="dyn"
349
+ placeholder="例:form.category"
350
+ @update:model-value="(v) => value = { ...value, derived: v }"
351
+ />
352
+ </Field>
329
353
  </div>
330
354
  </template>
@@ -33,9 +33,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly message: string;
34
34
  }[]] | undefined;
35
35
  readonly readonly?: string | undefined;
36
+ readonly binding?: string | undefined;
37
+ readonly derived?: {
38
+ readonly mode: "formula" | "prefill";
39
+ readonly expression: string;
40
+ } | undefined;
36
41
  readonly request: string;
37
42
  readonly options: string;
38
- readonly binding?: string | undefined;
39
43
  readonly optionValue: string;
40
44
  readonly optionLabel: readonly [{
41
45
  readonly locale: "zh";
@@ -76,9 +80,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
76
80
  readonly message: string;
77
81
  }[]] | undefined;
78
82
  readonly readonly?: string | undefined;
83
+ readonly binding?: string | undefined;
84
+ readonly derived?: {
85
+ readonly mode: "formula" | "prefill";
86
+ readonly expression: string;
87
+ } | undefined;
79
88
  readonly request: string;
80
89
  readonly options: string;
81
- readonly binding?: string | undefined;
82
90
  readonly optionValue: string;
83
91
  readonly optionLabel: readonly [{
84
92
  readonly locale: "zh";
@@ -1,12 +1,12 @@
1
1
  <script setup>
2
- import { useNuxtApp } from "#app";
3
2
  import { Icon } from "@iconify/vue";
4
3
  import { watchDebounced } from "@vueuse/core";
5
4
  import { Effect } from "effect";
6
5
  import { Fetch } from "fx-fetch";
7
6
  import { computed, nextTick, ref } from "vue";
8
7
  import { useI18n } from "vue-i18n";
9
- import { celBindings, injectCELContext } from "../../../../../plugins/cel/context";
8
+ import { cel as _rawCel } from "../../../../../utils/cel";
9
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
10
10
  import { getLocalizedText } from "../../../../../share/locale";
11
11
  import { interpolateMarkdown } from "../../../../table/utils/runtime";
12
12
  import {
@@ -18,9 +18,11 @@ import {
18
18
  CommandList
19
19
  } from "../../../../ui/command";
20
20
  import { Field, FieldLabel } from "../../../../ui/field";
21
- import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
21
+ import { InputGroup, InputGroupAddon, InputGroupButton } from "../../../../ui/input-group";
22
+ import { Markdown } from "../../../../ui/markdown";
22
23
  import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
23
24
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
25
+ import { useFormReadonly } from "../../../utils/readonly";
24
26
  import { useFormState } from "../../../utils/state";
25
27
  defineOptions({ name: "ShwfedComboboxSingleRemoteFieldRuntime" });
26
28
  const props = defineProps({
@@ -31,32 +33,28 @@ const { locale, t } = useI18n({
31
33
  inheritLocale: true,
32
34
  messages: {
33
35
  zh: {
34
- "combobox-single-placeholder": "\u8BF7\u9009\u62E9",
35
36
  "combobox-single-search-placeholder": "\u641C\u7D22\u2026",
36
37
  "combobox-single-empty": "\u65E0\u5339\u914D\u9879",
37
38
  "combobox-single-loading": "\u52A0\u8F7D\u4E2D\u2026"
38
39
  },
39
40
  en: {
40
- "combobox-single-placeholder": "Select\u2026",
41
41
  "combobox-single-search-placeholder": "Search\u2026",
42
42
  "combobox-single-empty": "No matches",
43
43
  "combobox-single-loading": "Loading\u2026"
44
44
  },
45
45
  ja: {
46
- "combobox-single-placeholder": "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
47
46
  "combobox-single-search-placeholder": "\u691C\u7D22\u2026",
48
47
  "combobox-single-empty": "\u4E00\u81F4\u306A\u3057",
49
48
  "combobox-single-loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
50
49
  }
51
50
  }
52
51
  });
53
- const { state, getAt, setAt } = useFormState();
54
- const { $cel: _rawCel } = useNuxtApp();
52
+ const { state, getAt, setAt, setAtSilent } = useFormState();
55
53
  const inherited = injectCELContext();
56
54
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
57
55
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
58
56
  const placeholderText = computed(
59
- () => props.config.placeholder ? getLocalizedText(props.config.placeholder, locale.value) : t("combobox-single-placeholder")
57
+ () => props.config.placeholder ? getLocalizedText(props.config.placeholder, locale.value) : void 0
60
58
  );
61
59
  const tooltipText = computed(
62
60
  () => props.config.tooltip ? getLocalizedText(props.config.tooltip, locale.value) : void 0
@@ -71,7 +69,11 @@ function evalBool(expression, label) {
71
69
  }
72
70
  }
73
71
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
74
- const isReadonly = computed(() => evalBool(props.config.readonly, "readonly"));
72
+ const formReadonly = useFormReadonly();
73
+ const isReadonly = computed(
74
+ () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
75
+ );
76
+ const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
75
77
  function valueOf(option) {
76
78
  try {
77
79
  return Effect.runSync($cel(props.config.optionValue, { form: state.value ?? {}, option }));
@@ -87,30 +89,39 @@ function labelOf(option) {
87
89
  }
88
90
  const json = ref(null);
89
91
  const isLoading = ref(false);
92
+ const requestSignature = computed(() => {
93
+ const expr = props.config.request;
94
+ if (!expr) return null;
95
+ try {
96
+ const builder = Effect.runSync($cel(expr, { form: state.value ?? {} }));
97
+ return JSON.stringify(builder.describe());
98
+ } catch {
99
+ return null;
100
+ }
101
+ });
102
+ let fetchSeq = 0;
90
103
  async function fetchOptions() {
104
+ const seq = ++fetchSeq;
105
+ if (requestSignature.value == null) {
106
+ json.value = null;
107
+ isLoading.value = false;
108
+ return;
109
+ }
91
110
  const expr = props.config.request;
92
- if (!expr) return;
93
111
  isLoading.value = true;
94
112
  const program = Effect.gen(function* () {
95
113
  const builder = yield* $cel(expr, { form: state.value ?? {} });
96
114
  return yield* builder.json();
97
115
  });
98
116
  try {
99
- json.value = await Effect.runPromise(Effect.provide(program, Fetch.layer));
100
- } catch (err) {
101
- console.error(`[shwfed-form] failed to fetch options for ${props.fieldId}:`, err);
102
- json.value = null;
117
+ const result = await Effect.runPromise(Effect.provide(program, Fetch.layer));
118
+ if (seq === fetchSeq) json.value = result;
119
+ } catch {
120
+ if (seq === fetchSeq) json.value = null;
103
121
  } finally {
104
- isLoading.value = false;
122
+ if (seq === fetchSeq) isLoading.value = false;
105
123
  }
106
124
  }
107
- watchDebounced(
108
- [() => state.value, () => props.config.request],
109
- () => {
110
- void fetchOptions();
111
- },
112
- { deep: true, debounce: 200, immediate: true }
113
- );
114
125
  const entries = computed(() => {
115
126
  let raw;
116
127
  try {
@@ -142,6 +153,20 @@ const model = computed({
142
153
  setAt(path, next);
143
154
  }
144
155
  });
156
+ let lastRequestSignature;
157
+ watchDebounced(
158
+ requestSignature,
159
+ () => {
160
+ if (lastRequestSignature != null) {
161
+ const path = props.config.binding;
162
+ if (path == null) uncontrolled.value = void 0;
163
+ else setAtSilent(path, void 0);
164
+ }
165
+ lastRequestSignature = requestSignature.value;
166
+ void fetchOptions();
167
+ },
168
+ { debounce: 200, immediate: true }
169
+ );
145
170
  function isEqual(a, b) {
146
171
  if (a === b) return true;
147
172
  if (a == null || b == null) return false;
@@ -192,15 +217,24 @@ function handleClear() {
192
217
  v-if="tooltipText"
193
218
  #tooltip
194
219
  >
195
- {{ tooltipText }}
220
+ <Markdown
221
+ :source="tooltipText"
222
+ class="prose prose-xs prose-zinc"
223
+ />
196
224
  </template>
197
225
  {{ labelText }}
198
226
  </FieldLabel>
199
227
  <div
200
- v-if="isReadonly"
228
+ v-if="effectiveReadonly"
201
229
  class="min-h-9 py-1.5 text-sm text-zinc-700"
202
230
  >
203
- {{ selectedLabel || "\u2014" }}
231
+ <Markdown
232
+ v-if="selectedLabel"
233
+ :source="selectedLabel"
234
+ />
235
+ <template v-else>
236
+
237
+ </template>
204
238
  </div>
205
239
  <Popover
206
240
  v-else
@@ -212,14 +246,24 @@ function handleClear() {
212
246
  :data-disabled="isDisabled ? 'true' : void 0"
213
247
  >
214
248
  <PopoverTrigger as-child>
215
- <InputGroupInput
249
+ <button
216
250
  :id="fieldId"
217
- :model-value="selectedLabel"
251
+ type="button"
218
252
  :disabled="isDisabled"
219
- :placeholder="placeholderText"
220
- class="cursor-pointer text-left"
221
- readonly
222
- />
253
+ :data-value="!!selectedLabel"
254
+ data-slot="input-group-control"
255
+ class="peer flex h-9 min-w-0 flex-1 cursor-default items-center overflow-hidden rounded-none border-0 bg-transparent px-3 py-1 text-left text-sm text-zinc-700 outline-none disabled:cursor-not-allowed"
256
+ >
257
+ <Markdown
258
+ v-if="selectedLabel"
259
+ :source="selectedLabel"
260
+ class="block truncate"
261
+ />
262
+ <span
263
+ v-else-if="placeholderText"
264
+ class="block truncate text-zinc-300"
265
+ >{{ placeholderText }}</span>
266
+ </button>
223
267
  </PopoverTrigger>
224
268
  <InputGroupAddon
225
269
  v-if="isLoading"
@@ -234,7 +278,7 @@ function handleClear() {
234
278
  <InputGroupAddon
235
279
  v-else-if="showClear"
236
280
  align="inline-end"
237
- class="opacity-0 transition-opacity group-hover/combobox-single-remote:opacity-100 focus-within:opacity-100"
281
+ class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single-remote:opacity-100 focus-within:opacity-100"
238
282
  >
239
283
  <InputGroupButton
240
284
  size="icon-xs"
@@ -261,18 +305,32 @@ function handleClear() {
261
305
  >
262
306
  <CommandInput :placeholder="t('combobox-single-search-placeholder')" />
263
307
  <CommandList>
264
- <CommandEmpty class="py-6 text-center text-sm text-zinc-500">
308
+ <!-- Zero candidates: still loading, the fetch failed, or the
309
+ endpoint returned nothing. `CommandEmpty` cannot cover this
310
+ — it only renders once a search query has filtered a
311
+ non-empty list down to zero — so the empty list is given an
312
+ explicit placeholder here. -->
313
+ <div
314
+ v-if="entries.length === 0"
315
+ data-slot="combobox-single-remote-empty"
316
+ class="py-6 text-center text-sm text-zinc-500"
317
+ >
265
318
  {{ isLoading ? t("combobox-single-loading") : t("combobox-single-empty") }}
266
- </CommandEmpty>
267
- <CommandGroup>
268
- <CommandItem
269
- v-for="entry in entries"
270
- :key="entry.key"
271
- :value="entry.key"
272
- >
273
- {{ entry.label }}
274
- </CommandItem>
275
- </CommandGroup>
319
+ </div>
320
+ <template v-else>
321
+ <CommandEmpty class="py-6 text-center text-sm text-zinc-500">
322
+ {{ t("combobox-single-empty") }}
323
+ </CommandEmpty>
324
+ <CommandGroup>
325
+ <CommandItem
326
+ v-for="entry in entries"
327
+ :key="entry.key"
328
+ :value="entry.key"
329
+ >
330
+ <Markdown :source="entry.label" />
331
+ </CommandItem>
332
+ </CommandGroup>
333
+ </template>
276
334
  </CommandList>
277
335
  </Command>
278
336
  </PopoverContent>
@@ -16,6 +16,16 @@ export declare const metadata: {
16
16
  readonly max: 2;
17
17
  };
18
18
  };
19
+ export declare const OPTION_VAR: {
20
+ readonly type: "dyn";
21
+ readonly label: "当前选项";
22
+ readonly description: "`选项` 表达式产出的数组中迭代到的单个元素";
23
+ };
24
+ export declare const JSON_VAR: {
25
+ readonly type: "dyn";
26
+ readonly label: "HTTP 响应体";
27
+ readonly description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`";
28
+ };
19
29
  export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
20
30
  label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
21
31
  locale: Schema.Literal<["zh"]>;
@@ -42,6 +52,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
42
52
  binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
43
53
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
44
54
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
55
+ derived: Schema.optional<Schema.Struct<{
56
+ mode: Schema.Literal<["formula", "prefill"]>;
57
+ expression: Schema.Schema<string, string, never>;
58
+ }>>;
45
59
  request: Schema.Schema<string, string, never>;
46
60
  options: Schema.Schema<string, string, never>;
47
61
  optionValue: Schema.optionalWith<Schema.Schema<string, string, never>, {
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { Expression, LocaleMarkdown } from "../../../../../share/expression.js";
3
3
  import { Locale } from "../../../../../share/locale.js";
4
- import { commonFieldFields, FieldOrientationSchema } from "../../../utils/common.js";
4
+ import { commonFieldFields, derivedField, FieldOrientationSchema } from "../../../utils/common.js";
5
5
  export const type = "com.shwfed.form.field.combobox.single.remote";
6
6
  export const compatibilityDate = "2026-05-13";
7
7
  export const metadata = {
@@ -10,18 +10,26 @@ export const metadata = {
10
10
  w: { initial: 8, min: 4, max: Infinity },
11
11
  h: { initial: 2, min: 2, max: 2 }
12
12
  };
13
+ export const OPTION_VAR = {
14
+ type: "dyn",
15
+ label: "\u5F53\u524D\u9009\u9879",
16
+ description: "`\u9009\u9879` \u8868\u8FBE\u5F0F\u4EA7\u51FA\u7684\u6570\u7EC4\u4E2D\u8FED\u4EE3\u5230\u7684\u5355\u4E2A\u5143\u7D20"
17
+ };
18
+ export const JSON_VAR = {
19
+ type: "dyn",
20
+ label: "HTTP \u54CD\u5E94\u4F53",
21
+ description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u8BF7\u6C42\u5931\u8D25\u6216\u5C1A\u672A\u5B8C\u6210\u65F6\u4E3A `null`"
22
+ };
13
23
  function configureWithOption(configure) {
14
24
  return (env) => {
15
25
  configure(env);
16
- env.registerVariable("option", "dyn", { description: "\u5F53\u524D\u9009\u9879" });
26
+ env.registerVariable("option", OPTION_VAR.type, { description: OPTION_VAR.description });
17
27
  };
18
28
  }
19
29
  function configureWithJson(configure) {
20
30
  return (env) => {
21
31
  configure(env);
22
- env.registerVariable("json", "dyn", {
23
- description: "HTTP \u54CD\u5E94\u4F53\uFF08\u5DF2\u89E3\u6790 JSON\uFF09\uFF1B\u8BF7\u6C42\u5931\u8D25\u6216\u5C1A\u672A\u5B8C\u6210\u65F6\u4E3A `null`"
24
- });
32
+ env.registerVariable("json", JSON_VAR.type, { description: JSON_VAR.description });
25
33
  };
26
34
  }
27
35
  const isListType = (actual) => actual === "dyn" || actual.startsWith("list");
@@ -60,6 +68,7 @@ export function schema(configure) {
60
68
  title: "\u53EA\u8BFB\u6761\u4EF6",
61
69
  description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u9009\u9879\u7684\u6807\u7B7E"
62
70
  })),
71
+ derived: derivedField(configure, "dyn"),
63
72
  request: CelHttpRequest.annotations({
64
73
  title: "\u8BF7\u6C42",
65
74
  description: "\u8FD4\u56DE `HttpRequest` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u53EF\u8BBF\u95EE `form` \u5F53\u524D\u72B6\u6001\u3002\u8868\u5355\u72B6\u6001\u53D8\u5316\u540E\u4F1A\u91CD\u65B0\u62C9\u53D6\u9009\u9879"
@@ -169,6 +169,7 @@ const reorderable = computed({
169
169
  {{ fieldTitle("tooltip") }}
170
170
  </FieldLabel>
171
171
  <LocaleField
172
+ markdown
172
173
  :model-value="value.tooltip"
173
174
  @update:model-value="(v) => value = { ...value, tooltip: v }"
174
175
  />
@@ -1,8 +1,10 @@
1
1
  <script setup>
2
- import { useNuxtApp } from "#app";
2
+ import { cel as _rawCel } from "../../../../../utils/cel";
3
3
  import { Effect } from "effect";
4
4
  import { computed, onMounted, ref, watch } from "vue";
5
- import { celBindings, injectCELContext } from "../../../../../plugins/cel/context";
5
+ import { celBindings, injectCELContext, provideCELContext } from "../../../../../utils/cel-context";
6
+ import { DEFAULT_GAP } from "../../../schema";
7
+ import { useDerived, useDerivedQuiescence } from "../../../utils/derived";
6
8
  import { findField } from "../../../utils/resolve";
7
9
  import { provideFormState } from "../../../utils/state";
8
10
  defineOptions({ name: "ShwfedListFieldRow" });
@@ -10,10 +12,24 @@ const state = defineModel({ type: Object, ...{ required: true } });
10
12
  const props = defineProps({
11
13
  unit: { type: Object, required: true }
12
14
  });
13
- provideFormState(state);
14
- const { $cel: _rawCel } = useNuxtApp();
15
+ const formState = provideFormState(state);
16
+ provideCELContext({
17
+ item: {
18
+ type: "dyn",
19
+ label: "item",
20
+ description: "\u5F53\u524D\u5217\u8868\u9879",
21
+ value: () => state.value ?? {}
22
+ }
23
+ });
15
24
  const inherited = injectCELContext();
16
25
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
26
+ useDerived({
27
+ fields: () => props.unit.fields,
28
+ evaluate: (expression) => $cel(expression),
29
+ ready: Promise.resolve(),
30
+ formState,
31
+ quiescence: useDerivedQuiescence()
32
+ });
17
33
  function pickLayout(sets) {
18
34
  for (const set of sets) {
19
35
  if (!set.media) return set;
@@ -73,7 +89,8 @@ const gridStyle = computed(() => {
73
89
  "display: grid",
74
90
  `grid-template-columns: ${colTemplate}`,
75
91
  rowTemplate ? `grid-template-rows: ${rowTemplate}` : "",
76
- l.gap ? `gap: calc(${l.gap} * 0.25rem)` : "",
92
+ // Missing `gap` falls back to `DEFAULT_GAP`; see ../../../index.vue.
93
+ `gap: calc(${l.gap ?? DEFAULT_GAP} * 0.25rem)`,
77
94
  l.style ?? ""
78
95
  ].filter(Boolean);
79
96
  return parts.join("; ");
@@ -1,10 +1,10 @@
1
1
  <script setup>
2
- import { useNuxtApp } from "#app";
3
2
  import { Icon } from "@iconify/vue";
4
3
  import { Effect } from "effect";
5
4
  import { computed, ref, watch } from "vue";
6
5
  import { useI18n } from "vue-i18n";
7
- import { celBindings, injectCELContext } from "../../../../../plugins/cel/context";
6
+ import { cel as _rawCel } from "../../../../../utils/cel";
7
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
8
8
  import { getLocalizedText } from "../../../../../share/locale";
9
9
  import {
10
10
  useTreeDnd
@@ -12,6 +12,7 @@ import {
12
12
  import { Button } from "../../../../ui/button";
13
13
  import { Field, FieldLabel } from "../../../../ui/field";
14
14
  import { InputGroupButton } from "../../../../ui/input-group";
15
+ import { Markdown } from "../../../../ui/markdown";
15
16
  import { useFormState } from "../../../utils/state";
16
17
  import Row from "./row.vue";
17
18
  defineOptions({ name: "ShwfedListFieldRuntime" });
@@ -21,7 +22,6 @@ const props = defineProps({
21
22
  });
22
23
  const { locale } = useI18n();
23
24
  const { state, getAt, setAt } = useFormState();
24
- const { $cel: _rawCel } = useNuxtApp();
25
25
  const inherited = injectCELContext();
26
26
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
27
27
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -156,7 +156,10 @@ function rowConfig(i) {
156
156
  v-if="tooltipText"
157
157
  #tooltip
158
158
  >
159
- {{ tooltipText }}
159
+ <Markdown
160
+ :source="tooltipText"
161
+ class="prose prose-xs prose-zinc"
162
+ />
160
163
  </template>
161
164
  {{ labelText }}
162
165
  </FieldLabel>
@@ -13,7 +13,13 @@ export const metadata = {
13
13
  };
14
14
  export function schema(configure) {
15
15
  const CelBool = Expression({ configure, resultType: "bool" });
16
- const Unit = Schema.suspend(() => FormUnit(configure));
16
+ const unitConfigure = (env) => {
17
+ configure(env);
18
+ if (!env.getDefinitions().variables.some((v) => v.name === "item")) {
19
+ env.registerVariable("item", "dyn", { description: "\u5F53\u524D\u5217\u8868\u9879" });
20
+ }
21
+ };
22
+ const Unit = Schema.suspend(() => FormUnit(unitConfigure));
17
23
  return Schema.Struct({
18
24
  type: Schema.Literal(type),
19
25
  compatibilityDate: Schema.Literal(compatibilityDate),
@@ -0,0 +1,113 @@
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 label?: readonly [{
8
+ readonly locale: "zh";
9
+ readonly message: string;
10
+ }, ...{
11
+ readonly locale: "en" | "ja" | "ko";
12
+ readonly message: string;
13
+ }[]] | undefined;
14
+ readonly disabled?: string | undefined;
15
+ readonly type: "com.shwfed.form.field.checkbox.group";
16
+ readonly id: string;
17
+ readonly hidden?: string | undefined;
18
+ readonly tooltip?: readonly [{
19
+ readonly locale: "zh";
20
+ readonly message: string;
21
+ }, ...{
22
+ readonly locale: "en" | "ja" | "ko";
23
+ readonly message: string;
24
+ }[]] | undefined;
25
+ readonly displayName?: string | undefined;
26
+ readonly compatibilityDate: "2026-05-17";
27
+ readonly items: readonly {
28
+ readonly label: readonly [{
29
+ readonly locale: "zh";
30
+ readonly message: string;
31
+ }, ...{
32
+ readonly locale: "en" | "ja" | "ko";
33
+ readonly message: string;
34
+ }[]];
35
+ readonly id: string;
36
+ readonly tooltip?: readonly [{
37
+ readonly locale: "zh";
38
+ readonly message: string;
39
+ }, ...{
40
+ readonly locale: "en" | "ja" | "ko";
41
+ readonly message: string;
42
+ }[]] | undefined;
43
+ readonly value: {
44
+ readonly value: string;
45
+ readonly kind: "text";
46
+ } | {
47
+ readonly value: number;
48
+ readonly kind: "number";
49
+ };
50
+ }[];
51
+ readonly readonly?: string | undefined;
52
+ readonly binding?: string | undefined;
53
+ readonly derived?: {
54
+ readonly mode: "formula" | "prefill";
55
+ readonly expression: string;
56
+ } | undefined;
57
+ }) => any;
58
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
59
+ "onUpdate:modelValue"?: ((value: {
60
+ readonly label?: readonly [{
61
+ readonly locale: "zh";
62
+ readonly message: string;
63
+ }, ...{
64
+ readonly locale: "en" | "ja" | "ko";
65
+ readonly message: string;
66
+ }[]] | undefined;
67
+ readonly disabled?: string | undefined;
68
+ readonly type: "com.shwfed.form.field.checkbox.group";
69
+ readonly id: string;
70
+ readonly hidden?: string | undefined;
71
+ readonly tooltip?: readonly [{
72
+ readonly locale: "zh";
73
+ readonly message: string;
74
+ }, ...{
75
+ readonly locale: "en" | "ja" | "ko";
76
+ readonly message: string;
77
+ }[]] | undefined;
78
+ readonly displayName?: string | undefined;
79
+ readonly compatibilityDate: "2026-05-17";
80
+ readonly items: readonly {
81
+ readonly label: readonly [{
82
+ readonly locale: "zh";
83
+ readonly message: string;
84
+ }, ...{
85
+ readonly locale: "en" | "ja" | "ko";
86
+ readonly message: string;
87
+ }[]];
88
+ readonly id: string;
89
+ readonly tooltip?: readonly [{
90
+ readonly locale: "zh";
91
+ readonly message: string;
92
+ }, ...{
93
+ readonly locale: "en" | "ja" | "ko";
94
+ readonly message: string;
95
+ }[]] | undefined;
96
+ readonly value: {
97
+ readonly value: string;
98
+ readonly kind: "text";
99
+ } | {
100
+ readonly value: number;
101
+ readonly kind: "number";
102
+ };
103
+ }[];
104
+ readonly readonly?: string | undefined;
105
+ readonly binding?: string | undefined;
106
+ readonly derived?: {
107
+ readonly mode: "formula" | "prefill";
108
+ readonly expression: string;
109
+ } | undefined;
110
+ }) => any) | undefined;
111
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
112
+ declare const _default: typeof __VLS_export;
113
+ export default _default;