@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,14 +1,17 @@
1
1
  <script setup>
2
- import { useNuxtApp } from "#app";
3
2
  import { Icon } from "@iconify/vue";
4
3
  import { Effect } from "effect";
5
- import { computed, nextTick, ref, watch } from "vue";
4
+ import { computed, nextTick, onBeforeUnmount, 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 { Field, FieldLabel } from "../../../../ui/field";
10
10
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupNumberField } from "../../../../ui/input-group";
11
+ import { Markdown } from "../../../../ui/markdown";
12
+ import { useCommitBus } from "../../../utils/commit-bus";
11
13
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
14
+ import { useFormReadonly } from "../../../utils/readonly";
12
15
  import { useFormState } from "../../../utils/state";
13
16
  defineOptions({ name: "ShwfedNumberRangeFieldRuntime" });
14
17
  const props = defineProps({
@@ -16,8 +19,7 @@ const props = defineProps({
16
19
  config: { type: null, required: true }
17
20
  });
18
21
  const { locale } = useI18n();
19
- const { state, getAt, setAt, delAt } = useFormState();
20
- const { $cel: _rawCel } = useNuxtApp();
22
+ const { state, getAt, setAt } = useFormState();
21
23
  const inherited = injectCELContext();
22
24
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
23
25
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -50,7 +52,11 @@ function evalNumber(expression, label) {
50
52
  }
51
53
  }
52
54
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
53
- const isReadonly = computed(() => evalBool(props.config.readonly, "readonly"));
55
+ const formReadonly = useFormReadonly();
56
+ const isReadonly = computed(
57
+ () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
58
+ );
59
+ const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
54
60
  const minValue = computed(() => evalNumber(props.config.min, "min"));
55
61
  const maxValue = computed(() => evalNumber(props.config.max, "max"));
56
62
  const formatOptions = computed(() => ({
@@ -77,8 +83,7 @@ const model = computed({
77
83
  uncontrolled.value = next;
78
84
  return;
79
85
  }
80
- if (next === void 0) delAt(path);
81
- else setAt(path, next);
86
+ setAt(path, next ?? null);
82
87
  }
83
88
  });
84
89
  const localStart = ref(model.value?.[0]);
@@ -98,13 +103,16 @@ function commit() {
98
103
  model.value = void 0;
99
104
  }
100
105
  }
106
+ const unregisterCommit = useCommitBus().register(commit);
107
+ onBeforeUnmount(() => {
108
+ unregisterCommit();
109
+ commit();
110
+ });
101
111
  function onStartUpdate(v) {
102
112
  localStart.value = typeof v === "number" && Number.isFinite(v) ? v : void 0;
103
- commit();
104
113
  }
105
114
  function onEndUpdate(v) {
106
115
  localEnd.value = typeof v === "number" && Number.isFinite(v) ? v : void 0;
107
- commit();
108
116
  }
109
117
  const startMax = computed(() => {
110
118
  const e = localEnd.value;
@@ -132,17 +140,17 @@ function applyRounding(n, precision, mode) {
132
140
  }
133
141
  }
134
142
  async function onBlurSide(side) {
135
- const precision = props.config.precision;
136
- if (precision === void 0) return;
137
143
  await nextTick();
138
- const ref_ = side === "start" ? localStart : localEnd;
139
- const current = ref_.value;
140
- if (current === void 0) return;
141
- const rounded = applyRounding(current, precision, props.config.roundingMode ?? "round");
142
- if (rounded !== current) {
143
- ref_.value = rounded;
144
- commit();
144
+ const precision = props.config.precision;
145
+ if (precision !== void 0) {
146
+ const ref_ = side === "start" ? localStart : localEnd;
147
+ const current = ref_.value;
148
+ if (current !== void 0) {
149
+ const rounded = applyRounding(current, precision, props.config.roundingMode ?? "round");
150
+ if (rounded !== current) ref_.value = rounded;
151
+ }
145
152
  }
153
+ commit();
146
154
  }
147
155
  const showClear = computed(
148
156
  () => !isDisabled.value && (localStart.value !== void 0 || localEnd.value !== void 0)
@@ -173,12 +181,15 @@ const readonlyText = computed(() => {
173
181
  v-if="tooltipText"
174
182
  #tooltip
175
183
  >
176
- {{ tooltipText }}
184
+ <Markdown
185
+ :source="tooltipText"
186
+ class="prose prose-xs prose-zinc"
187
+ />
177
188
  </template>
178
189
  {{ labelText }}
179
190
  </FieldLabel>
180
191
  <div
181
- v-if="isReadonly"
192
+ v-if="effectiveReadonly"
182
193
  class="min-h-9 py-1.5 text-sm text-zinc-700"
183
194
  >
184
195
  {{ readonlyText }}
@@ -220,7 +231,7 @@ const readonlyText = computed(() => {
220
231
  <InputGroupAddon
221
232
  v-if="showClear"
222
233
  align="inline-end"
223
- class="opacity-0 transition-opacity group-hover/number-range-field:opacity-100 focus-within:opacity-100"
234
+ class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/number-range-field:opacity-100 focus-within:opacity-100"
224
235
  >
225
236
  <InputGroupButton
226
237
  size="icon-xs"
@@ -49,6 +49,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
49
49
  binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
50
50
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
51
51
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
52
+ derived: Schema.optional<Schema.Struct<{
53
+ mode: Schema.Literal<["formula", "prefill"]>;
54
+ expression: Schema.Schema<string, string, never>;
55
+ }>>;
52
56
  precision: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
53
57
  roundingMode: Schema.optional<Schema.Literal<["round", "floor", "ceil"]>>;
54
58
  step: Schema.optional<Schema.refine<number, typeof Schema.Number>>;
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { Expression } 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.numberrange";
6
6
  export const compatibilityDate = "2026-04-28";
7
7
  export const metadata = {
@@ -46,6 +46,7 @@ export function schema(configure) {
46
46
  title: "\u53EA\u8BFB\u6761\u4EF6",
47
47
  description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
48
48
  })),
49
+ derived: derivedField(configure, "dyn"),
49
50
  precision: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.nonNegative()).annotations({
50
51
  title: "\u5C0F\u6570\u4F4D\u6570",
51
52
  description: "\u4FDD\u7559\u7684\u5C0F\u6570\u4F4D\u6570\uFF1B\u7559\u7A7A\u8868\u793A\u4E0D\u9650\u5236\uFF08\u4EFB\u610F\u7CBE\u5EA6\uFF09"
@@ -26,6 +26,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
26
26
  readonly compatibilityDate: "2026-04-28";
27
27
  readonly readonly?: string | undefined;
28
28
  readonly binding?: string | undefined;
29
+ readonly derived?: {
30
+ readonly mode: "formula" | "prefill";
31
+ readonly expression: string;
32
+ } | undefined;
29
33
  readonly trueLabel?: readonly [{
30
34
  readonly locale: "zh";
31
35
  readonly message: string;
@@ -65,6 +69,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
65
69
  readonly compatibilityDate: "2026-04-28";
66
70
  readonly readonly?: string | undefined;
67
71
  readonly binding?: string | undefined;
72
+ readonly derived?: {
73
+ readonly mode: "formula" | "prefill";
74
+ readonly expression: string;
75
+ } | undefined;
68
76
  readonly trueLabel?: readonly [{
69
77
  readonly locale: "zh";
70
78
  readonly message: string;
@@ -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";
@@ -113,6 +114,7 @@ const pathText = computed({
113
114
  {{ fieldTitle("tooltip") }}
114
115
  </FieldLabel>
115
116
  <LocaleField
117
+ markdown
116
118
  :model-value="value.tooltip"
117
119
  @update:model-value="(v) => value = { ...value, tooltip: v }"
118
120
  />
@@ -222,5 +224,24 @@ const pathText = computed({
222
224
  />
223
225
  </Field>
224
226
  </div>
227
+
228
+ <Field orientation="vertical">
229
+ <FieldLabel class="text-xs text-zinc-500">
230
+ <template #tooltip>
231
+ <Markdown
232
+ :source="fieldDescription('derived')"
233
+ block
234
+ class="prose prose-sm prose-zinc"
235
+ />
236
+ </template>
237
+ {{ fieldTitle("derived") }}
238
+ </FieldLabel>
239
+ <DerivedValueEditor
240
+ :model-value="value.derived"
241
+ result-type="bool"
242
+ placeholder="例:form.total > 100"
243
+ @update:model-value="(v) => value = { ...value, derived: v }"
244
+ />
245
+ </Field>
225
246
  </div>
226
247
  </template>
@@ -26,6 +26,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
26
26
  readonly compatibilityDate: "2026-04-28";
27
27
  readonly readonly?: string | undefined;
28
28
  readonly binding?: string | undefined;
29
+ readonly derived?: {
30
+ readonly mode: "formula" | "prefill";
31
+ readonly expression: string;
32
+ } | undefined;
29
33
  readonly trueLabel?: readonly [{
30
34
  readonly locale: "zh";
31
35
  readonly message: string;
@@ -65,6 +69,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
65
69
  readonly compatibilityDate: "2026-04-28";
66
70
  readonly readonly?: string | undefined;
67
71
  readonly binding?: string | undefined;
72
+ readonly derived?: {
73
+ readonly mode: "formula" | "prefill";
74
+ readonly expression: string;
75
+ } | undefined;
68
76
  readonly trueLabel?: readonly [{
69
77
  readonly locale: "zh";
70
78
  readonly message: string;
@@ -1,12 +1,14 @@
1
1
  <script setup>
2
- import { useNuxtApp } from "#app";
3
2
  import { Effect } from "effect";
4
3
  import { computed, ref } from "vue";
5
4
  import { useI18n } from "vue-i18n";
6
- import { celBindings, injectCELContext } from "../../../../../plugins/cel/context";
5
+ import { cel as _rawCel } from "../../../../../utils/cel";
6
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
7
7
  import { getLocalizedText } from "../../../../../share/locale";
8
8
  import { Field, FieldLabel } from "../../../../ui/field";
9
+ import { Markdown } from "../../../../ui/markdown";
9
10
  import { Switch } from "../../../../ui/switch";
11
+ import { useFormReadonly } from "../../../utils/readonly";
10
12
  import { useFormState } from "../../../utils/state";
11
13
  defineOptions({ name: "ShwfedSwitchFieldRuntime" });
12
14
  const props = defineProps({
@@ -15,7 +17,6 @@ const props = defineProps({
15
17
  });
16
18
  const { locale } = useI18n();
17
19
  const { state, getAt, setAt } = useFormState();
18
- const { $cel: _rawCel } = useNuxtApp();
19
20
  const inherited = injectCELContext();
20
21
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
21
22
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -38,7 +39,11 @@ function evalBool(expression, label) {
38
39
  }
39
40
  }
40
41
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
41
- const isReadonly = computed(() => evalBool(props.config.readonly, "readonly"));
42
+ const formReadonly = useFormReadonly();
43
+ const isReadonly = computed(
44
+ () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
45
+ );
46
+ const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
42
47
  const uncontrolled = ref(false);
43
48
  const model = computed({
44
49
  get: () => {
@@ -73,12 +78,15 @@ const model = computed({
73
78
  v-if="tooltipText"
74
79
  #tooltip
75
80
  >
76
- {{ tooltipText }}
81
+ <Markdown
82
+ :source="tooltipText"
83
+ class="prose prose-xs prose-zinc"
84
+ />
77
85
  </template>
78
86
  {{ labelText }}
79
87
  </FieldLabel>
80
88
  <div
81
- v-if="isReadonly"
89
+ v-if="effectiveReadonly"
82
90
  class="text-sm text-zinc-700"
83
91
  >
84
92
  {{ model ? trueText : falseText }}
@@ -48,6 +48,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
48
48
  binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
49
49
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
50
50
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
51
+ derived: Schema.optional<Schema.Struct<{
52
+ mode: Schema.Literal<["formula", "prefill"]>;
53
+ expression: Schema.Schema<string, string, never>;
54
+ }>>;
51
55
  id: Schema.refine<string, typeof Schema.String>;
52
56
  displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
53
57
  hidden: Schema.optional<Schema.Schema<string, string, never>>;
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
  import { Expression } from "../../../../../share/expression.js";
3
3
  import { Locale } from "../../../../../share/locale.js";
4
- import { commonFieldFields } from "../../../utils/common.js";
4
+ import { commonFieldFields, derivedField } from "../../../utils/common.js";
5
5
  export const type = "com.shwfed.form.field.switch";
6
6
  export const compatibilityDate = "2026-04-28";
7
7
  export const metadata = {
@@ -43,7 +43,8 @@ export function schema(configure) {
43
43
  readonly: Schema.optional(CelBool.annotations({
44
44
  title: "\u53EA\u8BFB\u6761\u4EF6",
45
45
  description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
46
- }))
46
+ })),
47
+ derived: derivedField(configure, "bool")
47
48
  }).annotations({
48
49
  title: "SwitchField",
49
50
  description: "\u5E03\u5C14\u5F00\u5173"
@@ -58,6 +58,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
58
58
  }[]] | undefined;
59
59
  readonly readonly?: string | undefined;
60
60
  readonly binding?: string | undefined;
61
+ readonly derived?: {
62
+ readonly mode: "formula" | "prefill";
63
+ readonly expression: string;
64
+ } | undefined;
61
65
  }) => any;
62
66
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
63
67
  "onUpdate:modelValue"?: ((value: {
@@ -115,6 +119,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
115
119
  }[]] | undefined;
116
120
  readonly readonly?: string | undefined;
117
121
  readonly binding?: string | undefined;
122
+ readonly derived?: {
123
+ readonly mode: "formula" | "prefill";
124
+ readonly expression: string;
125
+ } | undefined;
118
126
  }) => any) | undefined;
119
127
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
120
128
  declare const _default: typeof __VLS_export;
@@ -4,6 +4,7 @@ import { computed } from "vue";
4
4
  import { Button } from "../../../../ui/button";
5
5
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../../../ui/dropdown-menu";
6
6
  import { ExpressionEditor } from "../../../../ui/expression-editor";
7
+ import DerivedValueEditor from "../../../DerivedValueEditor.vue";
7
8
  import { Field, FieldLabel } from "../../../../ui/field";
8
9
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupNumberField } from "../../../../ui/input-group";
9
10
  import { Locale as LocaleField } from "../../../../ui/locale";
@@ -214,6 +215,7 @@ function setItemTooltip(index, tooltip) {
214
215
  {{ fieldTitle("tooltip") }}
215
216
  </FieldLabel>
216
217
  <LocaleField
218
+ markdown
217
219
  translate-hint="form field tooltip"
218
220
  :model-value="value.tooltip"
219
221
  @update:model-value="(v) => value = { ...value, tooltip: v }"
@@ -465,5 +467,24 @@ function setItemTooltip(index, tooltip) {
465
467
  />
466
468
  </Field>
467
469
  </div>
470
+
471
+ <Field orientation="vertical">
472
+ <FieldLabel class="text-xs text-zinc-500">
473
+ <template #tooltip>
474
+ <Markdown
475
+ :source="fieldDescription('derived')"
476
+ block
477
+ class="prose prose-sm prose-zinc"
478
+ />
479
+ </template>
480
+ {{ fieldTitle("derived") }}
481
+ </FieldLabel>
482
+ <DerivedValueEditor
483
+ :model-value="value.derived"
484
+ result-type="dyn"
485
+ placeholder="例:form.category"
486
+ @update:model-value="(v) => value = { ...value, derived: v }"
487
+ />
488
+ </Field>
468
489
  </div>
469
490
  </template>
@@ -58,6 +58,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
58
58
  }[]] | undefined;
59
59
  readonly readonly?: string | undefined;
60
60
  readonly binding?: string | undefined;
61
+ readonly derived?: {
62
+ readonly mode: "formula" | "prefill";
63
+ readonly expression: string;
64
+ } | undefined;
61
65
  }) => any;
62
66
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
63
67
  "onUpdate:modelValue"?: ((value: {
@@ -115,6 +119,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
115
119
  }[]] | undefined;
116
120
  readonly readonly?: string | undefined;
117
121
  readonly binding?: string | undefined;
122
+ readonly derived?: {
123
+ readonly mode: "formula" | "prefill";
124
+ readonly expression: string;
125
+ } | undefined;
118
126
  }) => any) | undefined;
119
127
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
120
128
  declare const _default: typeof __VLS_export;
@@ -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, nextTick, 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 { interpolateMarkdown } from "../../../../table/utils/runtime";
9
9
  import { getLocalizedText } from "../../../../../share/locale";
10
10
  import {
@@ -20,6 +20,7 @@ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "
20
20
  import { Markdown } from "../../../../ui/markdown";
21
21
  import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
22
22
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
23
+ import { useFormReadonly } from "../../../utils/readonly";
23
24
  import { useFormState } from "../../../utils/state";
24
25
  defineOptions({ name: "ShwfedComboboxSingleFieldRuntime" });
25
26
  const props = defineProps({
@@ -47,7 +48,6 @@ const { locale, t } = useI18n({
47
48
  }
48
49
  });
49
50
  const { state, getAt, setAt } = useFormState();
50
- const { $cel: _rawCel } = useNuxtApp();
51
51
  const inherited = injectCELContext();
52
52
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
53
53
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -67,7 +67,11 @@ function evalBool(expression, label) {
67
67
  }
68
68
  }
69
69
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
70
- const isReadonly = computed(() => evalBool(props.config.readonly, "readonly"));
70
+ const formReadonly = useFormReadonly();
71
+ const isReadonly = computed(
72
+ () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
73
+ );
74
+ const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
71
75
  function safeInterpolate(tpl, ctx) {
72
76
  try {
73
77
  return interpolateMarkdown(tpl, $cel, ctx);
@@ -166,12 +170,15 @@ const anyHasTooltip = computed(
166
170
  v-if="tooltipText"
167
171
  #tooltip
168
172
  >
169
- {{ tooltipText }}
173
+ <Markdown
174
+ :source="tooltipText"
175
+ class="prose prose-xs prose-zinc"
176
+ />
170
177
  </template>
171
178
  {{ labelText }}
172
179
  </FieldLabel>
173
180
  <div
174
- v-if="isReadonly"
181
+ v-if="effectiveReadonly"
175
182
  class="min-h-9 py-1.5 text-sm text-zinc-700"
176
183
  >
177
184
  {{ selectedLabel || "\u2014" }}
@@ -198,7 +205,7 @@ const anyHasTooltip = computed(
198
205
  <InputGroupAddon
199
206
  v-if="showClear"
200
207
  align="inline-end"
201
- class="opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"
208
+ class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"
202
209
  >
203
210
  <InputGroupButton
204
211
  size="icon-xs"
@@ -79,6 +79,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
79
79
  binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
80
80
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
81
81
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
82
+ derived: Schema.optional<Schema.Struct<{
83
+ mode: Schema.Literal<["formula", "prefill"]>;
84
+ expression: Schema.Schema<string, string, never>;
85
+ }>>;
82
86
  items: Schema.optionalWith<Schema.Array$<Schema.Struct<{
83
87
  id: Schema.refine<string, typeof Schema.String>;
84
88
  label: Schema.refine<readonly [{
@@ -2,7 +2,7 @@ import { Effect, Schema } from "effect";
2
2
  import { Expression, LocaleMarkdown } from "../../../../../share/expression.js";
3
3
  import { Locale } from "../../../../../share/locale.js";
4
4
  import { interpolateMarkdown } from "../../../../table/utils/runtime.js";
5
- import { commonFieldFields, FieldOrientationSchema } from "../../../utils/common.js";
5
+ import { commonFieldFields, derivedField, FieldOrientationSchema } from "../../../utils/common.js";
6
6
  export const type = "com.shwfed.form.field.combobox.single";
7
7
  export const compatibilityDate = "2026-04-29";
8
8
  export const metadata = {
@@ -72,6 +72,7 @@ export function schema(configure) {
72
72
  title: "\u53EA\u8BFB\u6761\u4EF6",
73
73
  description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u9009\u9879\u7684\u6807\u7B7E"
74
74
  })),
75
+ derived: derivedField(configure, "dyn"),
75
76
  items: Schema.optionalWith(Schema.Array(Item).annotations({
76
77
  title: "\u9009\u9879",
77
78
  description: "\u4E0B\u62C9\u6846\u53EF\u9009\u9879\u5217\u8868"
@@ -236,6 +236,7 @@ function setMultiple(v) {
236
236
  {{ fieldTitle("tooltip") }}
237
237
  </FieldLabel>
238
238
  <LocaleField
239
+ markdown
239
240
  translate-hint="form field tooltip"
240
241
  :model-value="value.tooltip"
241
242
  @update:model-value="(v) => value = { ...value, tooltip: v }"
@@ -1,16 +1,17 @@
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 } from "vue";
6
5
  import { useI18n } from "vue-i18n";
7
6
  import { toast } from "vue-sonner";
8
- import { celBindings, injectCELContext } from "../../../../../plugins/cel/context";
7
+ import { cel as _rawCel } from "../../../../../utils/cel";
8
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
9
9
  import { getLocalizedText } from "../../../../../share/locale";
10
10
  import { Button } from "../../../../ui/button";
11
11
  import { Field, FieldLabel } from "../../../../ui/field";
12
12
  import { Markdown } from "../../../../ui/markdown";
13
13
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
14
+ import { useFormReadonly } from "../../../utils/readonly";
14
15
  import { useFormState } from "../../../utils/state";
15
16
  const ICONS = {
16
17
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "vscode-icons:file-type-excel",
@@ -82,8 +83,7 @@ const { locale, t } = useI18n({
82
83
  }
83
84
  }
84
85
  });
85
- const { state, getAt, setAt, delAt } = useFormState();
86
- const { $cel: _rawCel } = useNuxtApp();
86
+ const { state, getAt, setAt } = useFormState();
87
87
  const inherited = injectCELContext();
88
88
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
89
89
  const labelText = computed(
@@ -108,7 +108,10 @@ function evalBool(expression, label) {
108
108
  }
109
109
  }
110
110
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
111
- const isReadonly = computed(() => evalBool(props.config.readonly, "readonly"));
111
+ const formReadonly = useFormReadonly();
112
+ const isReadonly = computed(
113
+ () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
114
+ );
112
115
  const uncontrolled = ref([]);
113
116
  const files = computed({
114
117
  get: () => {
@@ -124,8 +127,7 @@ const files = computed({
124
127
  uncontrolled.value = next;
125
128
  return;
126
129
  }
127
- if (next.length === 0) delAt(path);
128
- else setAt(path, next);
130
+ setAt(path, next.length === 0 ? null : next);
129
131
  }
130
132
  });
131
133
  const inputRef = ref();
@@ -249,7 +251,10 @@ async function onDownloadTemplate() {
249
251
  v-if="tooltipText"
250
252
  #tooltip
251
253
  >
252
- {{ tooltipText }}
254
+ <Markdown
255
+ :source="tooltipText"
256
+ class="prose prose-xs prose-zinc"
257
+ />
253
258
  </template>
254
259
  {{ labelText }}
255
260
  </FieldLabel>
@@ -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";