@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
@@ -3,6 +3,7 @@ import { Icon } from "@iconify/vue";
3
3
  import { computed } from "vue";
4
4
  import { format as formatDate } from "date-fns";
5
5
  import { ExpressionEditor } from "../../../../ui/expression-editor";
6
+ import DerivedValueEditor from "../../../DerivedValueEditor.vue";
6
7
  import { Field, FieldLabel } from "../../../../ui/field";
7
8
  import { IconPicker } from "../../../../ui/icon-picker";
8
9
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "../../../../ui/input-group";
@@ -251,6 +252,7 @@ const valueFormatExample = computed(() => {
251
252
  {{ fieldTitle("tooltip") }}
252
253
  </FieldLabel>
253
254
  <LocaleField
255
+ markdown
254
256
  :model-value="value.tooltip"
255
257
  @update:model-value="(v) => value = { ...value, tooltip: v }"
256
258
  />
@@ -461,5 +463,24 @@ const valueFormatExample = computed(() => {
461
463
  />
462
464
  </Field>
463
465
  </div>
466
+
467
+ <Field orientation="vertical">
468
+ <FieldLabel class="text-xs text-zinc-500">
469
+ <template #tooltip>
470
+ <Markdown
471
+ :source="fieldDescription('derived')"
472
+ block
473
+ class="prose prose-sm prose-zinc"
474
+ />
475
+ </template>
476
+ {{ fieldTitle("derived") }}
477
+ </FieldLabel>
478
+ <DerivedValueEditor
479
+ :model-value="value.derived"
480
+ result-type="dyn"
481
+ placeholder="例:[form.from, form.to]"
482
+ @update:model-value="(v) => value = { ...value, derived: v }"
483
+ />
484
+ </Field>
464
485
  </div>
465
486
  </template>
@@ -26,11 +26,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
26
26
  readonly compatibilityDate: "2026-04-27";
27
27
  readonly orientation?: "vertical" | "floating" | undefined;
28
28
  readonly readonly?: string | undefined;
29
+ readonly binding?: string | readonly [string, string] | undefined;
30
+ readonly derived?: {
31
+ readonly mode: "formula" | "prefill";
32
+ readonly expression: string;
33
+ } | undefined;
29
34
  readonly hourCycle?: 12 | 24 | undefined;
30
35
  readonly valueFormat?: string | undefined;
31
- readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
36
+ readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
32
37
  readonly rangeSeparatorIcon?: string | undefined;
33
- readonly binding?: string | readonly [string, string] | undefined;
34
38
  }) => any;
35
39
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
36
40
  "onUpdate:modelValue"?: ((value: {
@@ -56,11 +60,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
56
60
  readonly compatibilityDate: "2026-04-27";
57
61
  readonly orientation?: "vertical" | "floating" | undefined;
58
62
  readonly readonly?: string | undefined;
63
+ readonly binding?: string | readonly [string, string] | undefined;
64
+ readonly derived?: {
65
+ readonly mode: "formula" | "prefill";
66
+ readonly expression: string;
67
+ } | undefined;
59
68
  readonly hourCycle?: 12 | 24 | undefined;
60
69
  readonly valueFormat?: string | undefined;
61
- readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
70
+ readonly timeGranularity?: "hour" | "minute" | "second" | undefined;
62
71
  readonly rangeSeparatorIcon?: string | undefined;
63
- readonly binding?: string | readonly [string, string] | undefined;
64
72
  }) => any) | undefined;
65
73
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
66
74
  declare const _default: typeof __VLS_export;
@@ -1,13 +1,15 @@
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 { DateRangePicker } from "../../../../ui/date-range-picker";
9
9
  import { Field, FieldLabel } from "../../../../ui/field";
10
+ import { Markdown } from "../../../../ui/markdown";
10
11
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
12
+ import { useFormReadonly } from "../../../utils/readonly";
11
13
  import { useFormState } from "../../../utils/state";
12
14
  defineOptions({ name: "ShwfedTimeRangeFieldRuntime" });
13
15
  const props = defineProps({
@@ -16,7 +18,6 @@ const props = defineProps({
16
18
  });
17
19
  const { locale } = useI18n();
18
20
  const { state, getAt, setAt } = useFormState();
19
- const { $cel: _rawCel } = useNuxtApp();
20
21
  const inherited = injectCELContext();
21
22
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
22
23
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -33,7 +34,11 @@ function evalBool(expression, label) {
33
34
  }
34
35
  }
35
36
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
36
- const isReadonly = computed(() => evalBool(props.config.readonly, "readonly"));
37
+ const formReadonly = useFormReadonly();
38
+ const isReadonly = computed(
39
+ () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
40
+ );
41
+ const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
37
42
  function asRange(raw) {
38
43
  if (!Array.isArray(raw) || raw.length !== 2) return void 0;
39
44
  const [a, b] = raw;
@@ -90,12 +95,15 @@ const readonlyText = computed(() => {
90
95
  v-if="tooltipText"
91
96
  #tooltip
92
97
  >
93
- {{ tooltipText }}
98
+ <Markdown
99
+ :source="tooltipText"
100
+ class="prose prose-xs prose-zinc"
101
+ />
94
102
  </template>
95
103
  {{ labelText }}
96
104
  </FieldLabel>
97
105
  <div
98
- v-if="isReadonly"
106
+ v-if="effectiveReadonly"
99
107
  class="min-h-9 py-1.5 text-sm text-zinc-700"
100
108
  >
101
109
  {{ readonlyText }}
@@ -45,6 +45,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
45
45
  binding: Schema.optional<Schema.Union<[Schema.filter<typeof Schema.String>, Schema.filter<Schema.Tuple2<Schema.filter<typeof Schema.String>, Schema.filter<typeof Schema.String>>>]>>;
46
46
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
47
47
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
48
+ derived: Schema.optional<Schema.Struct<{
49
+ mode: Schema.Literal<["formula", "prefill"]>;
50
+ expression: Schema.Schema<string, string, never>;
51
+ }>>;
48
52
  valueFormat: Schema.optional<Schema.refine<string, typeof Schema.String>>;
49
53
  rangeSeparatorIcon: Schema.optional<Schema.refine<string, typeof Schema.String>>;
50
54
  timeGranularity: Schema.optional<Schema.Literal<["hour", "minute", "second"]>>;
@@ -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.timerange";
6
6
  export const compatibilityDate = "2026-04-27";
7
7
  const BindingPath = Schema.String.pipe(Schema.minLength(1));
@@ -54,6 +54,7 @@ export function schema(configure) {
54
54
  title: "\u53EA\u8BFB\u6761\u4EF6",
55
55
  description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
56
56
  })),
57
+ derived: derivedField(configure, "dyn"),
57
58
  valueFormat: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
58
59
  title: "\u5B58\u50A8\u683C\u5F0F",
59
60
  description: "\u5199\u5165\u8868\u5355\u72B6\u6001\u7684 `date-fns` \u683C\u5F0F\u4E32\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u9ED8\u8BA4 `HH:mm:ss`"
@@ -37,6 +37,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
37
37
  readonly step?: number | undefined;
38
38
  readonly readonly?: string | undefined;
39
39
  readonly binding?: string | undefined;
40
+ readonly derived?: {
41
+ readonly mode: "formula" | "prefill";
42
+ readonly expression: string;
43
+ } | undefined;
40
44
  readonly precision?: number | undefined;
41
45
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
42
46
  }) => any;
@@ -75,6 +79,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
75
79
  readonly step?: number | undefined;
76
80
  readonly readonly?: string | undefined;
77
81
  readonly binding?: string | undefined;
82
+ readonly derived?: {
83
+ readonly mode: "formula" | "prefill";
84
+ readonly expression: string;
85
+ } | undefined;
78
86
  readonly precision?: number | undefined;
79
87
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
80
88
  }) => any) | undefined;
@@ -8,6 +8,7 @@ import {
8
8
  DropdownMenuTrigger
9
9
  } from "../../../../ui/dropdown-menu";
10
10
  import { ExpressionEditor } from "../../../../ui/expression-editor";
11
+ import DerivedValueEditor from "../../../DerivedValueEditor.vue";
11
12
  import { Field, FieldLabel } from "../../../../ui/field";
12
13
  import {
13
14
  InputGroup,
@@ -183,6 +184,7 @@ function onStepChange(v) {
183
184
  {{ fieldTitle("tooltip") }}
184
185
  </FieldLabel>
185
186
  <LocaleField
187
+ markdown
186
188
  :model-value="value.tooltip"
187
189
  @update:model-value="(v) => value = { ...value, tooltip: v }"
188
190
  />
@@ -401,5 +403,24 @@ function onStepChange(v) {
401
403
  />
402
404
  </Field>
403
405
  </div>
406
+
407
+ <Field orientation="vertical">
408
+ <FieldLabel class="text-xs text-zinc-500">
409
+ <template #tooltip>
410
+ <Markdown
411
+ :source="fieldDescription('derived')"
412
+ block
413
+ class="prose prose-sm prose-zinc"
414
+ />
415
+ </template>
416
+ {{ fieldTitle("derived") }}
417
+ </FieldLabel>
418
+ <DerivedValueEditor
419
+ :model-value="value.derived"
420
+ result-type="number"
421
+ placeholder="例:form.price * form.qty"
422
+ @update:model-value="(v) => value = { ...value, derived: v }"
423
+ />
424
+ </Field>
404
425
  </div>
405
426
  </template>
@@ -37,6 +37,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
37
37
  readonly step?: number | undefined;
38
38
  readonly readonly?: string | undefined;
39
39
  readonly binding?: string | undefined;
40
+ readonly derived?: {
41
+ readonly mode: "formula" | "prefill";
42
+ readonly expression: string;
43
+ } | undefined;
40
44
  readonly precision?: number | undefined;
41
45
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
42
46
  }) => any;
@@ -75,6 +79,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
75
79
  readonly step?: number | undefined;
76
80
  readonly readonly?: string | undefined;
77
81
  readonly binding?: string | undefined;
82
+ readonly derived?: {
83
+ readonly mode: "formula" | "prefill";
84
+ readonly expression: string;
85
+ } | undefined;
78
86
  readonly precision?: number | undefined;
79
87
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
80
88
  }) => any) | undefined;
@@ -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 } from "vue";
4
+ import { computed, nextTick } 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";
11
12
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
13
+ import { useFieldValue } from "../../../utils/field-value";
14
+ import { useFormReadonly } from "../../../utils/readonly";
12
15
  import { useFormState } from "../../../utils/state";
13
16
  defineOptions({ name: "ShwfedNumberFieldRuntime" });
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 } = 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));
@@ -47,31 +49,21 @@ function evalNumber(expression, label) {
47
49
  }
48
50
  }
49
51
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
50
- const isReadonly = computed(() => evalBool(props.config.readonly, "readonly"));
52
+ const formReadonly = useFormReadonly();
53
+ const isReadonly = computed(
54
+ () => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
55
+ );
56
+ const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
51
57
  const minValue = computed(() => evalNumber(props.config.min, "min"));
52
58
  const maxValue = computed(() => evalNumber(props.config.max, "max"));
53
59
  const formatOptions = computed(() => ({
54
60
  useGrouping: false,
55
61
  maximumFractionDigits: 20
56
62
  }));
57
- const uncontrolled = ref(void 0);
58
- const model = computed({
59
- get: () => {
60
- const path = props.config.binding;
61
- if (path == null) return uncontrolled.value;
62
- const raw = getAt(path);
63
- return typeof raw === "number" && Number.isFinite(raw) ? raw : void 0;
64
- },
65
- set: (next) => {
66
- const path = props.config.binding;
67
- const value = typeof next === "number" && Number.isFinite(next) ? next : void 0;
68
- if (path == null) {
69
- uncontrolled.value = value;
70
- return;
71
- }
72
- if (value === void 0) delAt(path);
73
- else setAt(path, value);
74
- }
63
+ const { draft, commit } = useFieldValue({
64
+ binding: () => props.config.binding,
65
+ fromState: (raw) => typeof raw === "number" && Number.isFinite(raw) ? raw : void 0,
66
+ toState: (next) => typeof next === "number" && Number.isFinite(next) ? next : null
75
67
  });
76
68
  function applyRounding(n, precision, mode) {
77
69
  const factor = 10 ** precision;
@@ -84,18 +76,22 @@ function applyRounding(n, precision, mode) {
84
76
  return Math.round(n * factor) / factor;
85
77
  }
86
78
  }
87
- const showClear = computed(() => !isDisabled.value && model.value !== void 0);
79
+ const showClear = computed(() => !isDisabled.value && draft.value !== void 0);
88
80
  function handleClear() {
89
- model.value = void 0;
81
+ draft.value = void 0;
82
+ commit();
90
83
  }
91
84
  async function onBlur() {
92
- const precision = props.config.precision;
93
- if (precision === void 0) return;
94
85
  await nextTick();
95
- const current = model.value;
96
- if (current === void 0) return;
97
- const rounded = applyRounding(current, precision, props.config.roundingMode ?? "round");
98
- if (rounded !== current) model.value = rounded;
86
+ const precision = props.config.precision;
87
+ if (precision !== void 0) {
88
+ const current = draft.value;
89
+ if (current !== void 0) {
90
+ const rounded = applyRounding(current, precision, props.config.roundingMode ?? "round");
91
+ if (rounded !== current) draft.value = rounded;
92
+ }
93
+ }
94
+ commit();
99
95
  }
100
96
  </script>
101
97
 
@@ -113,15 +109,18 @@ async function onBlur() {
113
109
  v-if="tooltipText"
114
110
  #tooltip
115
111
  >
116
- {{ tooltipText }}
112
+ <Markdown
113
+ :source="tooltipText"
114
+ class="prose prose-xs prose-zinc"
115
+ />
117
116
  </template>
118
117
  {{ labelText }}
119
118
  </FieldLabel>
120
119
  <div
121
- v-if="isReadonly"
120
+ v-if="effectiveReadonly"
122
121
  class="min-h-9 py-1.5 text-sm text-zinc-700"
123
122
  >
124
- {{ model ?? "\u2014" }}
123
+ {{ draft ?? "\u2014" }}
125
124
  </div>
126
125
  <InputGroup
127
126
  v-else
@@ -130,7 +129,7 @@ async function onBlur() {
130
129
  >
131
130
  <InputGroupNumberField
132
131
  :id="fieldId"
133
- :model-value="model"
132
+ :model-value="draft"
134
133
  :step="config.step"
135
134
  :step-snapping="config.step !== void 0"
136
135
  :min="minValue"
@@ -139,13 +138,13 @@ async function onBlur() {
139
138
  :disabled="isDisabled"
140
139
  :placeholder="placeholderText"
141
140
  input-class="text-left"
142
- @update:model-value="(v) => model = v"
141
+ @update:model-value="(v) => draft = v"
143
142
  @blur="onBlur"
144
143
  />
145
144
  <InputGroupAddon
146
145
  v-if="showClear"
147
146
  align="inline-end"
148
- class="opacity-0 transition-opacity group-hover/number-field:opacity-100 focus-within:opacity-100"
147
+ class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/number-field:opacity-100 focus-within:opacity-100"
149
148
  >
150
149
  <InputGroupButton
151
150
  size="icon-xs"
@@ -42,6 +42,10 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
42
42
  binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
43
43
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
44
44
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
45
+ derived: Schema.optional<Schema.Struct<{
46
+ mode: Schema.Literal<["formula", "prefill"]>;
47
+ expression: Schema.Schema<string, string, never>;
48
+ }>>;
45
49
  precision: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
46
50
  roundingMode: Schema.optional<Schema.Literal<["round", "floor", "ceil"]>>;
47
51
  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.number";
6
6
  export const compatibilityDate = "2026-04-28";
7
7
  export const metadata = {
@@ -42,6 +42,7 @@ export function schema(configure) {
42
42
  title: "\u53EA\u8BFB\u6761\u4EF6",
43
43
  description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
44
44
  })),
45
+ derived: derivedField(configure, "number"),
45
46
  precision: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.nonNegative()).annotations({
46
47
  title: "\u5C0F\u6570\u4F4D\u6570",
47
48
  description: "\u4FDD\u7559\u7684\u5C0F\u6570\u4F4D\u6570\uFF1B\u7559\u7A7A\u8868\u793A\u4E0D\u9650\u5236\uFF08\u4EFB\u610F\u7CBE\u5EA6\uFF09"
@@ -29,6 +29,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
29
29
  readonly max?: string | undefined;
30
30
  readonly step?: number | undefined;
31
31
  readonly readonly?: string | undefined;
32
+ readonly binding?: string | undefined;
33
+ readonly derived?: {
34
+ readonly mode: "formula" | "prefill";
35
+ readonly expression: string;
36
+ } | undefined;
32
37
  readonly rangeSeparatorIcon?: string | undefined;
33
38
  readonly startPlaceholder?: readonly [{
34
39
  readonly locale: "zh";
@@ -44,7 +49,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
44
49
  readonly locale: "en" | "ja" | "ko";
45
50
  readonly message: string;
46
51
  }[]] | undefined;
47
- readonly binding?: string | undefined;
48
52
  readonly precision?: number | undefined;
49
53
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
50
54
  }) => any;
@@ -75,6 +79,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
75
79
  readonly max?: string | undefined;
76
80
  readonly step?: number | undefined;
77
81
  readonly readonly?: string | undefined;
82
+ readonly binding?: string | undefined;
83
+ readonly derived?: {
84
+ readonly mode: "formula" | "prefill";
85
+ readonly expression: string;
86
+ } | undefined;
78
87
  readonly rangeSeparatorIcon?: string | undefined;
79
88
  readonly startPlaceholder?: readonly [{
80
89
  readonly locale: "zh";
@@ -90,7 +99,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
99
  readonly locale: "en" | "ja" | "ko";
91
100
  readonly message: string;
92
101
  }[]] | undefined;
93
- readonly binding?: string | undefined;
94
102
  readonly precision?: number | undefined;
95
103
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
96
104
  }) => any) | undefined;
@@ -8,6 +8,7 @@ import {
8
8
  DropdownMenuTrigger
9
9
  } from "../../../../ui/dropdown-menu";
10
10
  import { ExpressionEditor } from "../../../../ui/expression-editor";
11
+ import DerivedValueEditor from "../../../DerivedValueEditor.vue";
11
12
  import { Field, FieldLabel } from "../../../../ui/field";
12
13
  import { IconPicker } from "../../../../ui/icon-picker";
13
14
  import {
@@ -173,6 +174,7 @@ function setSeparatorIcon(next) {
173
174
  {{ fieldTitle("tooltip") }}
174
175
  </FieldLabel>
175
176
  <LocaleField
177
+ markdown
176
178
  :model-value="value.tooltip"
177
179
  @update:model-value="(v) => value = { ...value, tooltip: v }"
178
180
  />
@@ -453,5 +455,24 @@ function setSeparatorIcon(next) {
453
455
  />
454
456
  </Field>
455
457
  </div>
458
+
459
+ <Field orientation="vertical">
460
+ <FieldLabel class="text-xs text-zinc-500">
461
+ <template #tooltip>
462
+ <Markdown
463
+ :source="fieldDescription('derived')"
464
+ block
465
+ class="prose prose-sm prose-zinc"
466
+ />
467
+ </template>
468
+ {{ fieldTitle("derived") }}
469
+ </FieldLabel>
470
+ <DerivedValueEditor
471
+ :model-value="value.derived"
472
+ result-type="dyn"
473
+ placeholder="例:[form.lo, form.hi]"
474
+ @update:model-value="(v) => value = { ...value, derived: v }"
475
+ />
476
+ </Field>
456
477
  </div>
457
478
  </template>
@@ -29,6 +29,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
29
29
  readonly max?: string | undefined;
30
30
  readonly step?: number | undefined;
31
31
  readonly readonly?: string | undefined;
32
+ readonly binding?: string | undefined;
33
+ readonly derived?: {
34
+ readonly mode: "formula" | "prefill";
35
+ readonly expression: string;
36
+ } | undefined;
32
37
  readonly rangeSeparatorIcon?: string | undefined;
33
38
  readonly startPlaceholder?: readonly [{
34
39
  readonly locale: "zh";
@@ -44,7 +49,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
44
49
  readonly locale: "en" | "ja" | "ko";
45
50
  readonly message: string;
46
51
  }[]] | undefined;
47
- readonly binding?: string | undefined;
48
52
  readonly precision?: number | undefined;
49
53
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
50
54
  }) => any;
@@ -75,6 +79,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
75
79
  readonly max?: string | undefined;
76
80
  readonly step?: number | undefined;
77
81
  readonly readonly?: string | undefined;
82
+ readonly binding?: string | undefined;
83
+ readonly derived?: {
84
+ readonly mode: "formula" | "prefill";
85
+ readonly expression: string;
86
+ } | undefined;
78
87
  readonly rangeSeparatorIcon?: string | undefined;
79
88
  readonly startPlaceholder?: readonly [{
80
89
  readonly locale: "zh";
@@ -90,7 +99,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
99
  readonly locale: "en" | "ja" | "ko";
91
100
  readonly message: string;
92
101
  }[]] | undefined;
93
- readonly binding?: string | undefined;
94
102
  readonly precision?: number | undefined;
95
103
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
96
104
  }) => any) | undefined;