@veltra/desktop 1.3.1 → 1.3.3

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 (406) hide show
  1. package/dist/components/action/action-group.vue.d.ts +3 -3
  2. package/dist/components/action/action.vue.d.ts +4 -2
  3. package/dist/components/action/index.d.ts +3 -2
  4. package/dist/components/action/style.d.ts +2 -1
  5. package/dist/components/auto-complete/auto-complete.vue.d.ts +2 -1
  6. package/dist/components/auto-complete/index.d.ts +2 -1
  7. package/dist/components/auto-complete/style.d.ts +4 -1
  8. package/dist/components/auto-complete/use-keyboard.js +1 -1
  9. package/dist/components/auto-complete/use-keyboard.js.map +1 -1
  10. package/dist/components/badge/badge.vue.d.ts +2 -1
  11. package/dist/components/badge/index.d.ts +2 -1
  12. package/dist/components/batch-edit/batch-edit.vue.d.ts +11 -9
  13. package/dist/components/batch-edit/helper.d.ts +1 -0
  14. package/dist/components/batch-edit/index.d.ts +3 -2
  15. package/dist/components/batch-edit/style.d.ts +5 -1
  16. package/dist/components/batch-edit/use-features.js +1 -1
  17. package/dist/components/batch-edit/use-features.js.map +1 -1
  18. package/dist/components/breadcrumb/breadcrumb.vue.d.ts +2 -1
  19. package/dist/components/breadcrumb/index.d.ts +2 -1
  20. package/dist/components/button/button-group.vue.d.ts +2 -1
  21. package/dist/components/button/button.vue.d.ts +2 -1
  22. package/dist/components/button/index.d.ts +3 -2
  23. package/dist/components/button/style.d.ts +1 -1
  24. package/dist/components/calendar/calendar.vue.d.ts +2 -1
  25. package/dist/components/calendar/index.d.ts +2 -1
  26. package/dist/components/card/card-action.vue.d.ts +2 -1
  27. package/dist/components/card/card-content.vue.d.ts +2 -1
  28. package/dist/components/card/card-cover.vue.d.ts +2 -1
  29. package/dist/components/card/card-header.vue.d.ts +1 -1
  30. package/dist/components/card/card.vue.d.ts +2 -1
  31. package/dist/components/card/index.d.ts +6 -5
  32. package/dist/components/cascade/cascade.vue.d.ts +3 -2
  33. package/dist/components/cascade/index.d.ts +2 -1
  34. package/dist/components/cascade/style.d.ts +3 -1
  35. package/dist/components/check-tag/check-tag.vue.d.ts +2 -1
  36. package/dist/components/check-tag/index.d.ts +2 -1
  37. package/dist/components/checkbox/checkbox-button.vue.d.ts +3 -2
  38. package/dist/components/checkbox/checkbox.vue.d.ts +2 -1
  39. package/dist/components/checkbox/index.d.ts +3 -2
  40. package/dist/components/checkbox/style.d.ts +1 -1
  41. package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -1
  42. package/dist/components/checkbox-group/index.d.ts +2 -1
  43. package/dist/components/checkbox-group/style.d.ts +1 -1
  44. package/dist/components/code-editor/code-editor.vue.d.ts +2 -1
  45. package/dist/components/code-editor/index.d.ts +2 -1
  46. package/dist/components/code-editor/langs/spel/language.js +2 -2
  47. package/dist/components/code-editor/langs/spel/language.js.map +1 -1
  48. package/dist/components/code-editor/style.d.ts +1 -1
  49. package/dist/components/collapse/collapse-item.vue.d.ts +4 -3
  50. package/dist/components/collapse/collapse.vue.d.ts +2 -1
  51. package/dist/components/collapse/index.d.ts +3 -2
  52. package/dist/components/condition-editor/condition-editor.vue.d.ts +3 -1
  53. package/dist/components/condition-editor/core/evaluator.d.ts +1 -0
  54. package/dist/components/condition-editor/index.d.ts +3 -2
  55. package/dist/components/condition-editor/style.d.ts +2 -1
  56. package/dist/components/contextmenu/api.d.ts +1 -0
  57. package/dist/components/contextmenu/contextmenu.vue.d.ts +2 -1
  58. package/dist/components/contextmenu/index.d.ts +3 -2
  59. package/dist/components/contextmenu/style.d.ts +2 -1
  60. package/dist/components/date-panel/date-panel.vue.d.ts +3 -2
  61. package/dist/components/date-panel/index.d.ts +2 -1
  62. package/dist/components/date-picker/date-picker.vue.d.ts +3 -2
  63. package/dist/components/date-picker/index.d.ts +2 -1
  64. package/dist/components/date-picker/style.d.ts +2 -1
  65. package/dist/components/date-range-picker/date-range-picker.vue.d.ts +3 -2
  66. package/dist/components/date-range-picker/index.d.ts +2 -1
  67. package/dist/components/date-range-picker/style.d.ts +1 -1
  68. package/dist/components/dialog/dialog.vue.d.ts +5 -2
  69. package/dist/components/dialog/index.d.ts +2 -1
  70. package/dist/components/dialog/style.d.ts +1 -1
  71. package/dist/components/drawer/drawer.vue.d.ts +3 -1
  72. package/dist/components/drawer/index.d.ts +2 -1
  73. package/dist/components/drawer/style.d.ts +1 -1
  74. package/dist/components/dropdown/dropdown.vue.d.ts +6 -2
  75. package/dist/components/dropdown/index.d.ts +2 -1
  76. package/dist/components/dropdown/style.d.ts +1 -1
  77. package/dist/components/dual-nav/dual-nav.vue.d.ts +2 -1
  78. package/dist/components/dual-nav/index.d.ts +2 -1
  79. package/dist/components/dual-nav/style.d.ts +1 -1
  80. package/dist/components/empty/empty.vue.d.ts +2 -1
  81. package/dist/components/empty/index.d.ts +2 -1
  82. package/dist/components/expression-editor/expression-editor.vue.d.ts +3 -1
  83. package/dist/components/expression-editor/index.d.ts +2 -1
  84. package/dist/components/file-picker/file-picker.js +6 -3
  85. package/dist/components/file-picker/file-picker.js.map +1 -1
  86. package/dist/components/file-picker/file-picker.vue.d.ts +2 -1
  87. package/dist/components/file-picker/index.d.ts +2 -1
  88. package/dist/components/file-viewer/file-viewer.js +2 -2
  89. package/dist/components/file-viewer/file-viewer.js.map +1 -1
  90. package/dist/components/file-viewer/file-viewer.vue.d.ts +1 -2
  91. package/dist/components/file-viewer/helper.js +4 -4
  92. package/dist/components/file-viewer/helper.js.map +1 -1
  93. package/dist/components/file-viewer/index.d.ts +2 -1
  94. package/dist/components/float-button/float-button.vue.d.ts +2 -1
  95. package/dist/components/float-button/index.d.ts +2 -1
  96. package/dist/components/float-button/style.d.ts +1 -1
  97. package/dist/components/form/form.vue.d.ts +2 -1
  98. package/dist/components/form/index.d.ts +2 -1
  99. package/dist/components/form-item/form-item.js.map +1 -1
  100. package/dist/components/form-item/form-item.vue.d.ts +4 -2
  101. package/dist/components/form-item/form-item.vue_vue_type_script_setup_true_lang.js +3 -2
  102. package/dist/components/form-item/form-item.vue_vue_type_script_setup_true_lang.js.map +1 -1
  103. package/dist/components/form-item/index.d.ts +2 -1
  104. package/dist/components/gantt-chart/gantt-chart.vue.d.ts +2 -1
  105. package/dist/components/gantt-chart/index.d.ts +2 -1
  106. package/dist/components/grid/grid-item.vue.d.ts +2 -1
  107. package/dist/components/grid/grid.vue.d.ts +3 -1
  108. package/dist/components/grid/index.d.ts +3 -2
  109. package/dist/components/grid/use-responsive.js +2 -1
  110. package/dist/components/grid/use-responsive.js.map +1 -1
  111. package/dist/components/grid-input/grid-input.vue.d.ts +3 -1
  112. package/dist/components/grid-input/index.d.ts +2 -1
  113. package/dist/components/group-input/group-input.vue.d.ts +4 -3
  114. package/dist/components/group-input/index.d.ts +2 -1
  115. package/dist/components/group-input/style.d.ts +1 -1
  116. package/dist/components/group-nav/group-nav.vue.d.ts +1 -2
  117. package/dist/components/group-nav/index.d.ts +2 -1
  118. package/dist/components/icon/icon.vue.d.ts +2 -1
  119. package/dist/components/icon/index.d.ts +2 -1
  120. package/dist/components/index.d.ts +168 -92
  121. package/dist/components/index.js +5 -5
  122. package/dist/components/input/index.d.ts +2 -1
  123. package/dist/components/input/input.vue.d.ts +2 -1
  124. package/dist/components/input/style.d.ts +1 -1
  125. package/dist/components/kbd/kbd.vue.d.ts +1 -1
  126. package/dist/components/layout/index.d.ts +2 -1
  127. package/dist/components/layout/layout.vue.d.ts +2 -1
  128. package/dist/components/list/index.d.ts +3 -2
  129. package/dist/components/list/list-item.vue.d.ts +1 -1
  130. package/dist/components/list/list.vue.d.ts +2 -1
  131. package/dist/components/list/style.d.ts +1 -1
  132. package/dist/components/loading/directive.d.ts +0 -1
  133. package/dist/components/loading/index.d.ts +3 -2
  134. package/dist/components/loading/loading.vue.d.ts +3 -1
  135. package/dist/components/loading/style.d.ts +1 -1
  136. package/dist/components/message/index.d.ts +3 -2
  137. package/dist/components/message/message.d.ts +1 -0
  138. package/dist/components/message/message.vue.d.ts +3 -1
  139. package/dist/components/message-confirm/index.d.ts +3 -2
  140. package/dist/components/message-confirm/message-confirm-box.js +39 -0
  141. package/dist/components/message-confirm/message-confirm-box.js.map +1 -0
  142. package/dist/components/message-confirm/message-confirm.d.ts +5 -7
  143. package/dist/components/message-confirm/message-confirm.js +32 -46
  144. package/dist/components/message-confirm/message-confirm.js.map +1 -1
  145. package/dist/components/message-confirm/message-confirm.vue.d.ts +8 -4
  146. package/dist/components/message-confirm/message-confirm2.js +98 -23
  147. package/dist/components/message-confirm/message-confirm2.js.map +1 -1
  148. package/dist/components/message-confirm/style2.css +9 -9
  149. package/dist/components/multi-select/index.d.ts +2 -1
  150. package/dist/components/multi-select/multi-select.vue.d.ts +8 -7
  151. package/dist/components/multi-select/style.d.ts +5 -1
  152. package/dist/components/multi-tree-select/index.d.ts +2 -1
  153. package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +2 -2
  154. package/dist/components/multi-tree-select/style.d.ts +6 -1
  155. package/dist/components/nav/index.d.ts +4 -3
  156. package/dist/components/nav/nav-item.vue.d.ts +2 -1
  157. package/dist/components/nav/nav-sub.vue.d.ts +2 -1
  158. package/dist/components/nav/nav.vue.d.ts +2 -1
  159. package/dist/components/node-render/index.d.ts +2 -1
  160. package/dist/components/node-render/node-render.d.ts +1 -2
  161. package/dist/components/notification/index.d.ts +3 -8
  162. package/dist/components/notification/notification-box.js +130 -0
  163. package/dist/components/notification/notification-box.js.map +1 -0
  164. package/dist/components/notification/notification.d.ts +8 -0
  165. package/dist/components/notification/notification.js +62 -84
  166. package/dist/components/notification/notification.js.map +1 -1
  167. package/dist/components/notification/notification.vue.d.ts +10 -5
  168. package/dist/components/notification/notification2.js +134 -0
  169. package/dist/components/notification/notification2.js.map +1 -0
  170. package/dist/components/notification/style2.css +62 -32
  171. package/dist/components/number/index.d.ts +2 -1
  172. package/dist/components/number/number.vue.d.ts +2 -1
  173. package/dist/components/number-input/index.d.ts +2 -1
  174. package/dist/components/number-input/number-input.js +2 -1
  175. package/dist/components/number-input/number-input.js.map +1 -1
  176. package/dist/components/number-input/number-input.vue.d.ts +4 -2
  177. package/dist/components/number-input/style.d.ts +2 -1
  178. package/dist/components/number-range-input/index.d.ts +2 -1
  179. package/dist/components/number-range-input/number-range-input.js +4 -2
  180. package/dist/components/number-range-input/number-range-input.js.map +1 -1
  181. package/dist/components/number-range-input/number-range-input.vue.d.ts +3 -2
  182. package/dist/components/number-range-input/style.d.ts +1 -1
  183. package/dist/components/paginator/index.d.ts +2 -1
  184. package/dist/components/paginator/paginator.vue.d.ts +2 -1
  185. package/dist/components/paginator/style.d.ts +2 -1
  186. package/dist/components/palette/index.d.ts +2 -1
  187. package/dist/components/palette/palette-sv.js +4 -2
  188. package/dist/components/palette/palette-sv.js.map +1 -1
  189. package/dist/components/palette/palette.vue.d.ts +2 -1
  190. package/dist/components/palette/style.d.ts +2 -1
  191. package/dist/components/password-input/index.d.ts +2 -1
  192. package/dist/components/password-input/password-input.vue.d.ts +2 -1
  193. package/dist/components/password-input/style.d.ts +1 -1
  194. package/dist/components/pop-confirm/index.d.ts +2 -1
  195. package/dist/components/pop-confirm/pop-confirm.vue.d.ts +3 -1
  196. package/dist/components/pop-confirm/style.d.ts +1 -1
  197. package/dist/components/progress/index.d.ts +2 -1
  198. package/dist/components/progress/progress.vue.d.ts +4 -3
  199. package/dist/components/progress-nodes/index.d.ts +2 -1
  200. package/dist/components/progress-nodes/progress-nodes.js +2 -1
  201. package/dist/components/progress-nodes/progress-nodes.js.map +1 -1
  202. package/dist/components/progress-nodes/progress-nodes.vue.d.ts +8 -7
  203. package/dist/components/radio/index.d.ts +2 -1
  204. package/dist/components/radio/radio.vue.d.ts +2 -1
  205. package/dist/components/radio/style.d.ts +1 -1
  206. package/dist/components/radio-group/index.d.ts +2 -1
  207. package/dist/components/radio-group/radio-group.vue.d.ts +2 -1
  208. package/dist/components/radio-group/style.d.ts +1 -1
  209. package/dist/components/rich-text-editor/index.d.ts +2 -1
  210. package/dist/components/rich-text-editor/rich-text-editor.js +2 -1
  211. package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
  212. package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +3 -1
  213. package/dist/components/rich-text-editor/toolbar.js +2 -1
  214. package/dist/components/rich-text-editor/toolbar.js.map +1 -1
  215. package/dist/components/scroll/index.d.ts +2 -1
  216. package/dist/components/scroll/scroll.vue.d.ts +5 -2
  217. package/dist/components/select/index.d.ts +2 -1
  218. package/dist/components/select/select.vue.d.ts +5 -2
  219. package/dist/components/select/style.d.ts +3 -1
  220. package/dist/components/slider/index.d.ts +2 -1
  221. package/dist/components/slider/slider.vue.d.ts +4 -3
  222. package/dist/components/steps/index.d.ts +2 -1
  223. package/dist/components/steps/steps.vue.d.ts +4 -3
  224. package/dist/components/switch/index.d.ts +2 -1
  225. package/dist/components/switch/switch.vue.d.ts +2 -1
  226. package/dist/components/table/index.d.ts +3 -2
  227. package/dist/components/table/node/col.d.ts +1 -1
  228. package/dist/components/table/node/row.d.ts +0 -1
  229. package/dist/components/table/style.d.ts +3 -1
  230. package/dist/components/table/table-row.js +2 -1
  231. package/dist/components/table/table-row.js.map +1 -1
  232. package/dist/components/table/table.vue.d.ts +3 -1
  233. package/dist/components/table/use-columns.d.ts +3 -0
  234. package/dist/components/table/use-columns.js +2 -1
  235. package/dist/components/table/use-columns.js.map +1 -1
  236. package/dist/components/table-editor/index.d.ts +2 -1
  237. package/dist/components/table-editor/style.d.ts +2 -1
  238. package/dist/components/table-editor/table-editor.vue.d.ts +2 -1
  239. package/dist/components/tabs/index.d.ts +4 -3
  240. package/dist/components/tabs/style.d.ts +2 -1
  241. package/dist/components/tabs/tabs-horizontal.vue.d.ts +5 -4
  242. package/dist/components/tabs/tabs-vertical.vue.d.ts +5 -4
  243. package/dist/components/tabs/tabs.vue.d.ts +5 -4
  244. package/dist/components/tag/index.d.ts +2 -1
  245. package/dist/components/tag/tag.vue.d.ts +2 -1
  246. package/dist/components/text/index.d.ts +2 -1
  247. package/dist/components/text/text.vue.d.ts +2 -1
  248. package/dist/components/textarea/index.d.ts +2 -1
  249. package/dist/components/textarea/style.d.ts +1 -1
  250. package/dist/components/textarea/textarea.js +4 -2
  251. package/dist/components/textarea/textarea.js.map +1 -1
  252. package/dist/components/textarea/textarea.vue.d.ts +2 -1
  253. package/dist/components/theme/index.d.ts +2 -1
  254. package/dist/components/theme/style.d.ts +5 -1
  255. package/dist/components/theme/theme.vue.d.ts +2 -1
  256. package/dist/components/tip/index.d.ts +2 -1
  257. package/dist/components/tip/tip.js +32 -5
  258. package/dist/components/tip/tip.js.map +1 -1
  259. package/dist/components/tip/tip.vue.d.ts +4 -1
  260. package/dist/components/tree/di.d.ts +2 -0
  261. package/dist/components/tree/index.d.ts +2 -1
  262. package/dist/components/tree/style.d.ts +1 -1
  263. package/dist/components/tree/tree.vue.d.ts +3 -1
  264. package/dist/components/tree-select/index.d.ts +2 -1
  265. package/dist/components/tree-select/style.d.ts +3 -1
  266. package/dist/components/tree-select/tree-select.vue.d.ts +5 -3
  267. package/dist/components/watermark/index.d.ts +2 -1
  268. package/dist/components/watermark/watermark.vue.d.ts +2 -1
  269. package/dist/index.d.ts +97 -98
  270. package/dist/index.js +3 -3
  271. package/dist/install.d.ts +1 -1
  272. package/dist/node_modules/.bun/@codemirror_autocomplete@6.20.3/node_modules/@codemirror/autocomplete/dist/index.js +13 -4
  273. package/dist/node_modules/.bun/@codemirror_autocomplete@6.20.3/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -1
  274. package/dist/node_modules/.bun/@codemirror_commands@6.10.4/node_modules/@codemirror/commands/dist/index.js +1 -1
  275. package/dist/node_modules/.bun/@codemirror_lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js +3 -2
  276. package/dist/node_modules/.bun/@codemirror_lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js.map +1 -1
  277. package/dist/node_modules/.bun/@codemirror_lang-html@6.4.11/node_modules/@codemirror/lang-html/dist/index.js +1 -1
  278. package/dist/node_modules/.bun/@codemirror_lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js +1 -1
  279. package/dist/node_modules/.bun/@codemirror_lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js +1 -1
  280. package/dist/node_modules/.bun/@codemirror_lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js +1 -1
  281. package/dist/node_modules/.bun/@codemirror_lang-markdown@6.5.1/node_modules/@codemirror/lang-markdown/dist/index.js +1 -1
  282. package/dist/node_modules/.bun/@codemirror_lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js +31 -5
  283. package/dist/node_modules/.bun/@codemirror_lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js.map +1 -1
  284. package/dist/node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js +5 -3
  285. package/dist/node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js.map +1 -1
  286. package/dist/node_modules/.bun/@codemirror_lint@6.9.7/node_modules/@codemirror/lint/dist/index.js +1 -1
  287. package/dist/node_modules/.bun/@codemirror_search@6.7.1/node_modules/@codemirror/search/dist/index.js +3 -2
  288. package/dist/node_modules/.bun/@codemirror_search@6.7.1/node_modules/@codemirror/search/dist/index.js.map +1 -1
  289. package/dist/node_modules/.bun/@codemirror_state@6.7.0/node_modules/@codemirror/state/dist/index.js +3 -2
  290. package/dist/node_modules/.bun/@codemirror_state@6.7.0/node_modules/@codemirror/state/dist/index.js.map +1 -1
  291. package/dist/node_modules/.bun/@codemirror_theme-one-dark@6.1.3/node_modules/@codemirror/theme-one-dark/dist/index.js +30 -7
  292. package/dist/node_modules/.bun/@codemirror_theme-one-dark@6.1.3/node_modules/@codemirror/theme-one-dark/dist/index.js.map +1 -1
  293. package/dist/node_modules/.bun/@codemirror_view@6.43.4/node_modules/@codemirror/view/dist/index.js +11 -5
  294. package/dist/node_modules/.bun/@codemirror_view@6.43.4/node_modules/@codemirror/view/dist/index.js.map +1 -1
  295. package/dist/node_modules/.bun/@lezer_common@1.5.2/node_modules/@lezer/common/dist/index.js +3 -2
  296. package/dist/node_modules/.bun/@lezer_common@1.5.2/node_modules/@lezer/common/dist/index.js.map +1 -1
  297. package/dist/node_modules/.bun/@lezer_css@1.3.4/node_modules/@lezer/css/dist/index.js +20 -2
  298. package/dist/node_modules/.bun/@lezer_css@1.3.4/node_modules/@lezer/css/dist/index.js.map +1 -1
  299. package/dist/node_modules/.bun/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +15 -2
  300. package/dist/node_modules/.bun/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js.map +1 -1
  301. package/dist/node_modules/.bun/@lezer_html@1.3.13/node_modules/@lezer/html/dist/index.js +42 -3
  302. package/dist/node_modules/.bun/@lezer_html@1.3.13/node_modules/@lezer/html/dist/index.js.map +1 -1
  303. package/dist/node_modules/.bun/@lezer_javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js +23 -2
  304. package/dist/node_modules/.bun/@lezer_javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js.map +1 -1
  305. package/dist/node_modules/.bun/@lezer_lr@1.4.10/node_modules/@lezer/lr/dist/index.js +1 -1
  306. package/dist/node_modules/.bun/@lezer_markdown@1.7.2/node_modules/@lezer/markdown/dist/index.js +39 -29
  307. package/dist/node_modules/.bun/@lezer_markdown@1.7.2/node_modules/@lezer/markdown/dist/index.js.map +1 -1
  308. package/dist/node_modules/.bun/@marijn_find-cluster-break@1.0.2/node_modules/@marijn/find-cluster-break/src/index.js +3 -2
  309. package/dist/node_modules/.bun/@marijn_find-cluster-break@1.0.2/node_modules/@marijn/find-cluster-break/src/index.js.map +1 -1
  310. package/dist/style.d.ts +39 -1
  311. package/dist/types/action.d.ts +0 -1
  312. package/dist/types/animation.d.ts +0 -1
  313. package/dist/types/auto-complete.d.ts +0 -1
  314. package/dist/types/badge.d.ts +0 -1
  315. package/dist/types/batch-edit.d.ts +18 -13
  316. package/dist/types/breadcrumb.d.ts +0 -1
  317. package/dist/types/button.d.ts +0 -1
  318. package/dist/types/calendar.d.ts +0 -1
  319. package/dist/types/card.d.ts +0 -1
  320. package/dist/types/cascade.d.ts +0 -1
  321. package/dist/types/check-tag.d.ts +0 -1
  322. package/dist/types/checkbox-group.d.ts +0 -1
  323. package/dist/types/checkbox.d.ts +0 -1
  324. package/dist/types/code-editor.d.ts +0 -1
  325. package/dist/types/collapse.d.ts +0 -1
  326. package/dist/types/condition-editor.d.ts +0 -1
  327. package/dist/types/contextmenu.d.ts +0 -1
  328. package/dist/types/css-transition.d.ts +0 -1
  329. package/dist/types/date-panel.d.ts +0 -1
  330. package/dist/types/date-picker.d.ts +0 -1
  331. package/dist/types/date-range-picker.d.ts +0 -1
  332. package/dist/types/dialog.d.ts +0 -1
  333. package/dist/types/drawer.d.ts +0 -1
  334. package/dist/types/dropdown.d.ts +2 -2
  335. package/dist/types/dual-nav.d.ts +0 -1
  336. package/dist/types/empty.d.ts +0 -1
  337. package/dist/types/expression-editor.d.ts +0 -1
  338. package/dist/types/file-picker.d.ts +0 -1
  339. package/dist/types/file-viewer.d.ts +0 -1
  340. package/dist/types/float-button.d.ts +0 -1
  341. package/dist/types/form-item.d.ts +0 -1
  342. package/dist/types/form.d.ts +0 -1
  343. package/dist/types/grid-input.d.ts +0 -1
  344. package/dist/types/grid.d.ts +1 -2
  345. package/dist/types/group-input.d.ts +0 -1
  346. package/dist/types/group-nav.d.ts +0 -1
  347. package/dist/types/index.d.ts +4 -6
  348. package/dist/types/input.d.ts +0 -1
  349. package/dist/types/layout.d.ts +0 -1
  350. package/dist/types/list.d.ts +0 -1
  351. package/dist/types/loading.d.ts +0 -1
  352. package/dist/types/message-confirm.d.ts +48 -5
  353. package/dist/types/message.d.ts +3 -2
  354. package/dist/types/multi-auto-complete.d.ts +0 -1
  355. package/dist/types/multi-select.d.ts +0 -1
  356. package/dist/types/multi-tree-select.d.ts +0 -1
  357. package/dist/types/nav.d.ts +0 -1
  358. package/dist/types/node-render.d.ts +0 -1
  359. package/dist/types/notification.d.ts +67 -17
  360. package/dist/types/number-input.d.ts +0 -1
  361. package/dist/types/number-range-input.d.ts +0 -1
  362. package/dist/types/paginator.d.ts +0 -1
  363. package/dist/types/palette.d.ts +0 -1
  364. package/dist/types/password-input.d.ts +0 -1
  365. package/dist/types/pop-confirm.d.ts +0 -1
  366. package/dist/types/pop.d.ts +0 -1
  367. package/dist/types/progress-nodes.d.ts +0 -1
  368. package/dist/types/progress.d.ts +0 -1
  369. package/dist/types/quick-batch-edit.d.ts +0 -1
  370. package/dist/types/radio-group.d.ts +0 -1
  371. package/dist/types/radio.d.ts +0 -1
  372. package/dist/types/rich-text-editor.d.ts +0 -1
  373. package/dist/types/scroll.d.ts +11 -6
  374. package/dist/types/select.d.ts +0 -1
  375. package/dist/types/slider.d.ts +0 -1
  376. package/dist/types/steps.d.ts +0 -1
  377. package/dist/types/switch.d.ts +0 -1
  378. package/dist/types/table-editor.d.ts +0 -1
  379. package/dist/types/table.d.ts +0 -1
  380. package/dist/types/tabs.d.ts +2 -2
  381. package/dist/types/tag.d.ts +0 -1
  382. package/dist/types/text-editor.d.ts +0 -1
  383. package/dist/types/textarea.d.ts +0 -1
  384. package/dist/types/theme.d.ts +0 -1
  385. package/dist/types/tip.d.ts +5 -1
  386. package/dist/types/tree-select.d.ts +0 -1
  387. package/dist/types/tree.d.ts +0 -1
  388. package/dist/types/watermark.d.ts +0 -1
  389. package/package.json +19 -19
  390. package/src/components/form-item/form-item.vue +1 -1
  391. package/src/components/message-confirm/index.ts +1 -1
  392. package/src/components/message-confirm/message-confirm-box.vue +36 -0
  393. package/src/components/message-confirm/message-confirm.ts +113 -21
  394. package/src/components/message-confirm/message-confirm.vue +30 -37
  395. package/src/components/message-confirm/style.scss +10 -12
  396. package/src/components/notification/index.ts +1 -143
  397. package/src/components/notification/notification-box.vue +150 -0
  398. package/src/components/notification/notification.ts +142 -0
  399. package/src/components/notification/notification.vue +40 -66
  400. package/src/components/notification/style.scss +65 -38
  401. package/src/components/tip/tip.vue +36 -5
  402. package/src/types/message-confirm.ts +52 -3
  403. package/src/types/notification.ts +71 -15
  404. package/src/types/tip.ts +6 -0
  405. package/dist/components/notification/index.js +0 -140
  406. package/dist/components/notification/index.js.map +0 -1
@@ -1,4 +1,6 @@
1
1
  import { RichTextEditorProps, RichTextFormat, ToolbarItem } from "../../types/rich-text-editor.js";
2
+ import "../../types/index.js";
3
+ import "../../index.js";
2
4
  //#region src/components/rich-text-editor/rich-text-editor.vue.d.ts
3
5
  declare const _default: typeof __VLS_export;
4
6
  declare const __VLS_export: import("vue").DefineComponent<RichTextEditorProps & {
@@ -17,5 +19,5 @@ declare const __VLS_export: import("vue").DefineComponent<RichTextEditorProps &
17
19
  toolbar: ToolbarItem[];
18
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
21
  //#endregion
20
- export { _default };
22
+ export { _default as default };
21
23
  //# sourceMappingURL=rich-text-editor.vue.d.ts.map
@@ -63,7 +63,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
63
63
  isOrderedList.value = false;
64
64
  }
65
65
  isBlockquote.value = $isQuoteNode(element);
66
- isLink.value = $isLinkNode(anchorNode.getParent());
66
+ const parent = anchorNode.getParent();
67
+ isLink.value = $isLinkNode(parent);
67
68
  }
68
69
  watch(() => props.editor, (editorInstance) => {
69
70
  if (editorInstance) setupListener(editorInstance);
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.js","names":[],"sources":["../../../src/components/rich-text-editor/toolbar.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('toolbar')\">\n <template v-for=\"(item, index) in toolbar\" :key=\"index\">\n <div v-if=\"item === '|'\" :class=\"cls.e('separator')\"></div>\n\n <div v-else-if=\"item === 'heading'\" :class=\"[cls.e('toolbar-dropdown')]\">\n <select\n :class=\"[cls.e('heading-select'), { 'is-disabled': disabled }]\"\n :value=\"activeHeading\"\n :disabled=\"disabled\"\n @change=\"onHeadingChange\"\n >\n <option value=\"paragraph\">正文</option>\n <option value=\"h1\">Heading 1</option>\n <option value=\"h2\">Heading 2</option>\n <option value=\"h3\">Heading 3</option>\n <option value=\"h4\">Heading 4</option>\n <option value=\"h5\">Heading 5</option>\n <option value=\"h6\">Heading 6</option>\n </select>\n </div>\n\n <button\n v-else\n type=\"button\"\n :class=\"[\n cls.e('toolbar-btn'),\n { 'is-active': isActive(item) },\n { 'is-disabled': disabled }\n ]\"\n :disabled=\"disabled\"\n :title=\"getTitle(item)\"\n @click=\"onToolbarAction(item)\"\n >\n <span :class=\"cls.e('toolbar-icon')\" v-html=\"getIcon(item)\"></span>\n </button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link'\nimport { INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, ListNode } from '@lexical/list'\nimport { $createHeadingNode, $isHeadingNode, type HeadingTagType } from '@lexical/rich-text'\nimport { $isQuoteNode, $createQuoteNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getNearestNodeOfType } from '@lexical/utils'\nimport { bem } from '@veltra/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n FORMAT_TEXT_COMMAND,\n UNDO_COMMAND,\n REDO_COMMAND,\n type LexicalEditor,\n $createParagraphNode,\n type RangeSelection\n} from 'lexical'\nimport { ref, onBeforeUnmount, watch } from 'vue'\n\nimport type { ToolbarItem } from '../../types'\n\nconst props = defineProps<{\n editor: LexicalEditor | null\n toolbar: ToolbarItem[]\n disabled: boolean\n}>()\n\nconst cls = bem('rich-text-editor')\n\n// Active states\nconst isBold = ref(false)\nconst isItalic = ref(false)\nconst isUnderline = ref(false)\nconst isStrikethrough = ref(false)\nconst isLink = ref(false)\nconst isBulletList = ref(false)\nconst isOrderedList = ref(false)\nconst isBlockquote = ref(false)\nconst activeHeading = ref('paragraph')\n\nlet cleanupListener: (() => void) | null = null\n\nfunction setupListener(editorInstance: LexicalEditor) {\n cleanupListener?.()\n cleanupListener = editorInstance.registerUpdateListener(({ editorState }) => {\n editorState.read(\n () => {\n const selection = $getSelection()\n if (!$isRangeSelection(selection)) return\n\n updateToolbarState(selection)\n },\n { editor: editorInstance }\n )\n })\n}\n\nfunction updateToolbarState(selection: RangeSelection) {\n isBold.value = selection.hasFormat('bold')\n isItalic.value = selection.hasFormat('italic')\n isUnderline.value = selection.hasFormat('underline')\n isStrikethrough.value = selection.hasFormat('strikethrough')\n\n // Check block type\n const anchorNode = selection.anchor.getNode()\n let element = anchorNode.getKey() === 'root' ? anchorNode : anchorNode.getTopLevelElementOrThrow()\n\n if ($isHeadingNode(element)) {\n activeHeading.value = (element as any).getTag()\n } else {\n activeHeading.value = 'paragraph'\n }\n\n // Check list\n const parentList = $getNearestNodeOfType(anchorNode, ListNode)\n if (parentList) {\n const listType = (parentList as any).getListType()\n isBulletList.value = listType === 'bullet'\n isOrderedList.value = listType === 'number'\n } else {\n isBulletList.value = false\n isOrderedList.value = false\n }\n\n // Check blockquote\n isBlockquote.value = $isQuoteNode(element)\n\n // Check link\n const parent = anchorNode.getParent()\n isLink.value = $isLinkNode(parent)\n}\n\nwatch(\n () => props.editor,\n (editorInstance) => {\n if (editorInstance) {\n setupListener(editorInstance)\n }\n },\n { immediate: true }\n)\n\nfunction isActive(item: ToolbarItem): boolean {\n switch (item) {\n case 'bold':\n return isBold.value\n case 'italic':\n return isItalic.value\n case 'underline':\n return isUnderline.value\n case 'strikethrough':\n return isStrikethrough.value\n case 'bullet-list':\n return isBulletList.value\n case 'ordered-list':\n return isOrderedList.value\n case 'blockquote':\n return isBlockquote.value\n case 'link':\n return isLink.value\n default:\n return false\n }\n}\n\nfunction onToolbarAction(item: ToolbarItem) {\n const editorInstance = props.editor\n if (!editorInstance || props.disabled) return\n\n switch (item) {\n case 'bold':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n break\n case 'italic':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')\n break\n case 'underline':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline')\n break\n case 'strikethrough':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')\n break\n case 'code':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n break\n case 'bullet-list':\n editorInstance.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n break\n case 'ordered-list':\n editorInstance.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n break\n case 'blockquote':\n editorInstance.update(() => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n if (isBlockquote.value) {\n $setBlocksType(selection, () => $createParagraphNode())\n } else {\n $setBlocksType(selection, () => $createQuoteNode())\n }\n }\n })\n break\n case 'link':\n toggleLink(editorInstance)\n break\n case 'undo':\n editorInstance.dispatchCommand(UNDO_COMMAND, undefined)\n break\n case 'redo':\n editorInstance.dispatchCommand(REDO_COMMAND, undefined)\n break\n }\n\n // Keep focus on editor\n editorInstance.focus()\n}\n\nfunction onHeadingChange(event: Event) {\n const editorInstance = props.editor\n if (!editorInstance || props.disabled) return\n\n const value = (event.target as HTMLSelectElement).value\n\n editorInstance.update(() => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n if (value === 'paragraph') {\n $setBlocksType(selection, () => $createParagraphNode())\n } else {\n $setBlocksType(selection, () => $createHeadingNode(value as HeadingTagType))\n }\n }\n })\n\n editorInstance.focus()\n}\n\nfunction toggleLink(editorInstance: LexicalEditor) {\n let shouldRemoveLink = false\n\n editorInstance.read(() => {\n const selection = $getSelection()\n if (!$isRangeSelection(selection)) return\n\n const parent = selection.anchor.getNode().getParent()\n shouldRemoveLink = $isLinkNode(parent)\n })\n\n if (shouldRemoveLink) {\n editorInstance.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n return\n }\n\n const url = prompt('请输入链接地址:', 'https://')\n if (url && url !== 'https://') {\n editorInstance.dispatchCommand(TOGGLE_LINK_COMMAND, url)\n }\n}\n\nfunction getTitle(item: ToolbarItem): string {\n const titles: Record<string, string> = {\n bold: '加粗',\n italic: '斜体',\n underline: '下划线',\n strikethrough: '删除线',\n code: '行内代码',\n 'bullet-list': '无序列表',\n 'ordered-list': '有序列表',\n blockquote: '引用',\n 'code-block': '代码块',\n link: '链接',\n undo: '撤销',\n redo: '重做'\n }\n return titles[item] ?? item\n}\n\nfunction getIcon(item: ToolbarItem): string {\n const icons: Record<string, string> = {\n bold: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z\"/><path d=\"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z\"/></svg>',\n italic:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"19\" y1=\"4\" x2=\"10\" y2=\"4\"/><line x1=\"14\" y1=\"20\" x2=\"5\" y2=\"20\"/><line x1=\"15\" y1=\"4\" x2=\"9\" y2=\"20\"/></svg>',\n underline:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3\"/><line x1=\"4\" y1=\"21\" x2=\"20\" y2=\"21\"/></svg>',\n strikethrough:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16 4H9a3 3 0 0 0-2.83 4\"/><path d=\"M14 12a4 4 0 0 1 0 8H6\"/><line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\"/></svg>',\n code: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"16 18 22 12 16 6\"/><polyline points=\"8 6 2 12 8 18\"/></svg>',\n 'bullet-list':\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"/><line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"/><line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"/><line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"/><line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"/><line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"/></svg>',\n 'ordered-list':\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"10\" y1=\"6\" x2=\"21\" y2=\"6\"/><line x1=\"10\" y1=\"12\" x2=\"21\" y2=\"12\"/><line x1=\"10\" y1=\"18\" x2=\"21\" y2=\"18\"/><path d=\"M4 6h1v4\"/><path d=\"M4 10h2\"/><path d=\"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1\"/></svg>',\n blockquote:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21z\"/><path d=\"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3z\"/></svg>',\n 'code-block':\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"3\" width=\"20\" height=\"18\" rx=\"2\"/><path d=\"m8 10-3 2 3 2\"/><path d=\"m16 10 3 2-3 2\"/><path d=\"m13 7-2 10\"/></svg>',\n link: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></svg>',\n undo: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"/><path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\"/></svg>',\n redo: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 7v6h-6\"/><path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3L21 13\"/></svg>'\n }\n return icons[item] ?? ''\n}\n\nonBeforeUnmount(() => {\n cleanupListener?.()\n cleanupListener = null\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA8DA,MAAM,QAAQ;EAMd,MAAM,MAAM,IAAI,kBAAkB;EAGlC,MAAM,SAAS,IAAI,KAAK;EACxB,MAAM,WAAW,IAAI,KAA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AAoB,MAAK,GAAA,CACzC,SAAI,OAAA,UAAA,GAAf,mBAA2D,OAAA;;KAAjC,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,WAAA,CAAA;mBAEtB,SAAI,aAAA,UAAA,GAApB,mBAeM,OAAA;;KAf+B,OAAK,eAAA,CAAG,MAAA,GAAA,CAAG,CAAC,EAAC,kBAAA,CAAA,CAAA;QAChD,mBAaS,UAAA;KAZN,OAAK,eAAA,CAAG,MAAA,GAAA,CAAG,CAAC,EAAC,gBAAA,GAAA,EAAA,eAAqC,QAAA,SAAQ,CAAA,CAAA;KAC1D,OAAO,cAAA;KACP,UAAU,QAAA;KACV,UAAQ;0XAYb,mBAaS,UAAA;;KAXP,MAAK;KACJ,OAAK,eAAA;MAAc,MAAA,GAAA,CAAG,CAAC,EAAC,aAAA;qBAA0C,SAAS,IAAI,EAAA;uBAAgC,QAAA,SAAQ;;KAKvH,UAAU,QAAA;KACV,OAAO,SAAS,IAAI;KACpB,UAAK,WAAE,gBAAgB,IAAI;QAE5B,mBAAmE,QAAA;KAA5D,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,cAAA,CAAA;KAAkB,WAAQ,QAAQ,IAAI"}
1
+ {"version":3,"file":"toolbar.js","names":[],"sources":["../../../src/components/rich-text-editor/toolbar.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('toolbar')\">\n <template v-for=\"(item, index) in toolbar\" :key=\"index\">\n <div v-if=\"item === '|'\" :class=\"cls.e('separator')\"></div>\n\n <div v-else-if=\"item === 'heading'\" :class=\"[cls.e('toolbar-dropdown')]\">\n <select\n :class=\"[cls.e('heading-select'), { 'is-disabled': disabled }]\"\n :value=\"activeHeading\"\n :disabled=\"disabled\"\n @change=\"onHeadingChange\"\n >\n <option value=\"paragraph\">正文</option>\n <option value=\"h1\">Heading 1</option>\n <option value=\"h2\">Heading 2</option>\n <option value=\"h3\">Heading 3</option>\n <option value=\"h4\">Heading 4</option>\n <option value=\"h5\">Heading 5</option>\n <option value=\"h6\">Heading 6</option>\n </select>\n </div>\n\n <button\n v-else\n type=\"button\"\n :class=\"[\n cls.e('toolbar-btn'),\n { 'is-active': isActive(item) },\n { 'is-disabled': disabled }\n ]\"\n :disabled=\"disabled\"\n :title=\"getTitle(item)\"\n @click=\"onToolbarAction(item)\"\n >\n <span :class=\"cls.e('toolbar-icon')\" v-html=\"getIcon(item)\"></span>\n </button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link'\nimport { INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, ListNode } from '@lexical/list'\nimport { $createHeadingNode, $isHeadingNode, type HeadingTagType } from '@lexical/rich-text'\nimport { $isQuoteNode, $createQuoteNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getNearestNodeOfType } from '@lexical/utils'\nimport { bem } from '@veltra/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n FORMAT_TEXT_COMMAND,\n UNDO_COMMAND,\n REDO_COMMAND,\n type LexicalEditor,\n $createParagraphNode,\n type RangeSelection\n} from 'lexical'\nimport { ref, onBeforeUnmount, watch } from 'vue'\n\nimport type { ToolbarItem } from '../../types'\n\nconst props = defineProps<{\n editor: LexicalEditor | null\n toolbar: ToolbarItem[]\n disabled: boolean\n}>()\n\nconst cls = bem('rich-text-editor')\n\n// Active states\nconst isBold = ref(false)\nconst isItalic = ref(false)\nconst isUnderline = ref(false)\nconst isStrikethrough = ref(false)\nconst isLink = ref(false)\nconst isBulletList = ref(false)\nconst isOrderedList = ref(false)\nconst isBlockquote = ref(false)\nconst activeHeading = ref('paragraph')\n\nlet cleanupListener: (() => void) | null = null\n\nfunction setupListener(editorInstance: LexicalEditor) {\n cleanupListener?.()\n cleanupListener = editorInstance.registerUpdateListener(({ editorState }) => {\n editorState.read(\n () => {\n const selection = $getSelection()\n if (!$isRangeSelection(selection)) return\n\n updateToolbarState(selection)\n },\n { editor: editorInstance }\n )\n })\n}\n\nfunction updateToolbarState(selection: RangeSelection) {\n isBold.value = selection.hasFormat('bold')\n isItalic.value = selection.hasFormat('italic')\n isUnderline.value = selection.hasFormat('underline')\n isStrikethrough.value = selection.hasFormat('strikethrough')\n\n // Check block type\n const anchorNode = selection.anchor.getNode()\n let element = anchorNode.getKey() === 'root' ? anchorNode : anchorNode.getTopLevelElementOrThrow()\n\n if ($isHeadingNode(element)) {\n activeHeading.value = (element as any).getTag()\n } else {\n activeHeading.value = 'paragraph'\n }\n\n // Check list\n const parentList = $getNearestNodeOfType(anchorNode, ListNode)\n if (parentList) {\n const listType = (parentList as any).getListType()\n isBulletList.value = listType === 'bullet'\n isOrderedList.value = listType === 'number'\n } else {\n isBulletList.value = false\n isOrderedList.value = false\n }\n\n // Check blockquote\n isBlockquote.value = $isQuoteNode(element)\n\n // Check link\n const parent = anchorNode.getParent()\n isLink.value = $isLinkNode(parent)\n}\n\nwatch(\n () => props.editor,\n (editorInstance) => {\n if (editorInstance) {\n setupListener(editorInstance)\n }\n },\n { immediate: true }\n)\n\nfunction isActive(item: ToolbarItem): boolean {\n switch (item) {\n case 'bold':\n return isBold.value\n case 'italic':\n return isItalic.value\n case 'underline':\n return isUnderline.value\n case 'strikethrough':\n return isStrikethrough.value\n case 'bullet-list':\n return isBulletList.value\n case 'ordered-list':\n return isOrderedList.value\n case 'blockquote':\n return isBlockquote.value\n case 'link':\n return isLink.value\n default:\n return false\n }\n}\n\nfunction onToolbarAction(item: ToolbarItem) {\n const editorInstance = props.editor\n if (!editorInstance || props.disabled) return\n\n switch (item) {\n case 'bold':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n break\n case 'italic':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')\n break\n case 'underline':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline')\n break\n case 'strikethrough':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')\n break\n case 'code':\n editorInstance.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n break\n case 'bullet-list':\n editorInstance.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n break\n case 'ordered-list':\n editorInstance.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n break\n case 'blockquote':\n editorInstance.update(() => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n if (isBlockquote.value) {\n $setBlocksType(selection, () => $createParagraphNode())\n } else {\n $setBlocksType(selection, () => $createQuoteNode())\n }\n }\n })\n break\n case 'link':\n toggleLink(editorInstance)\n break\n case 'undo':\n editorInstance.dispatchCommand(UNDO_COMMAND, undefined)\n break\n case 'redo':\n editorInstance.dispatchCommand(REDO_COMMAND, undefined)\n break\n }\n\n // Keep focus on editor\n editorInstance.focus()\n}\n\nfunction onHeadingChange(event: Event) {\n const editorInstance = props.editor\n if (!editorInstance || props.disabled) return\n\n const value = (event.target as HTMLSelectElement).value\n\n editorInstance.update(() => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n if (value === 'paragraph') {\n $setBlocksType(selection, () => $createParagraphNode())\n } else {\n $setBlocksType(selection, () => $createHeadingNode(value as HeadingTagType))\n }\n }\n })\n\n editorInstance.focus()\n}\n\nfunction toggleLink(editorInstance: LexicalEditor) {\n let shouldRemoveLink = false\n\n editorInstance.read(() => {\n const selection = $getSelection()\n if (!$isRangeSelection(selection)) return\n\n const parent = selection.anchor.getNode().getParent()\n shouldRemoveLink = $isLinkNode(parent)\n })\n\n if (shouldRemoveLink) {\n editorInstance.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n return\n }\n\n const url = prompt('请输入链接地址:', 'https://')\n if (url && url !== 'https://') {\n editorInstance.dispatchCommand(TOGGLE_LINK_COMMAND, url)\n }\n}\n\nfunction getTitle(item: ToolbarItem): string {\n const titles: Record<string, string> = {\n bold: '加粗',\n italic: '斜体',\n underline: '下划线',\n strikethrough: '删除线',\n code: '行内代码',\n 'bullet-list': '无序列表',\n 'ordered-list': '有序列表',\n blockquote: '引用',\n 'code-block': '代码块',\n link: '链接',\n undo: '撤销',\n redo: '重做'\n }\n return titles[item] ?? item\n}\n\nfunction getIcon(item: ToolbarItem): string {\n const icons: Record<string, string> = {\n bold: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z\"/><path d=\"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z\"/></svg>',\n italic:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"19\" y1=\"4\" x2=\"10\" y2=\"4\"/><line x1=\"14\" y1=\"20\" x2=\"5\" y2=\"20\"/><line x1=\"15\" y1=\"4\" x2=\"9\" y2=\"20\"/></svg>',\n underline:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3\"/><line x1=\"4\" y1=\"21\" x2=\"20\" y2=\"21\"/></svg>',\n strikethrough:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16 4H9a3 3 0 0 0-2.83 4\"/><path d=\"M14 12a4 4 0 0 1 0 8H6\"/><line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\"/></svg>',\n code: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"16 18 22 12 16 6\"/><polyline points=\"8 6 2 12 8 18\"/></svg>',\n 'bullet-list':\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"/><line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"/><line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"/><line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"/><line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"/><line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"/></svg>',\n 'ordered-list':\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"10\" y1=\"6\" x2=\"21\" y2=\"6\"/><line x1=\"10\" y1=\"12\" x2=\"21\" y2=\"12\"/><line x1=\"10\" y1=\"18\" x2=\"21\" y2=\"18\"/><path d=\"M4 6h1v4\"/><path d=\"M4 10h2\"/><path d=\"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1\"/></svg>',\n blockquote:\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21z\"/><path d=\"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3z\"/></svg>',\n 'code-block':\n '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"3\" width=\"20\" height=\"18\" rx=\"2\"/><path d=\"m8 10-3 2 3 2\"/><path d=\"m16 10 3 2-3 2\"/><path d=\"m13 7-2 10\"/></svg>',\n link: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></svg>',\n undo: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"/><path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\"/></svg>',\n redo: '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 7v6h-6\"/><path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3L21 13\"/></svg>'\n }\n return icons[item] ?? ''\n}\n\nonBeforeUnmount(() => {\n cleanupListener?.()\n cleanupListener = null\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA8DA,MAAM,QAAQ;EAMd,MAAM,MAAM,IAAI,kBAAkB;EAGlC,MAAM,SAAS,IAAI,KAAK;EACxB,MAAM,WAAW,IAAI,KAAK;EAC1B,MAAM,cAAc,IAAI,KAAK;EAC7B,MAAM,kBAAkB,IAAI,KAAK;EACjC,MAAM,SAAS,IAAI,KAAK;EACxB,MAAM,eAAe,IAAI,K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AAC,EAAC,WAAA,CAAA;mBAEtB,SAAI,aAAA,UAAA,GAApB,mBAeM,OAAA;;KAf+B,OAAK,eAAA,CAAG,MAAA,GAAA,CAAG,CAAC,EAAC,kBAAA,CAAA,CAAA;QAChD,mBAaS,UAAA;KAZN,OAAK,eAAA,CAAG,MAAA,GAAA,CAAG,CAAC,EAAC,gBAAA,GAAA,EAAA,eAAqC,QAAA,SAAQ,CAAA,CAAA;KAC1D,OAAO,cAAA;KACP,UAAU,QAAA;KACV,UAAQ;0XAYb,mBAaS,UAAA;;KAXP,MAAK;KACJ,OAAK,eAAA;MAAc,MAAA,GAAA,CAAG,CAAC,EAAC,aAAA;qBAA0C,SAAS,IAAI,EAAA;uBAAgC,QAAA,SAAQ;;KAKvH,UAAU,QAAA;KACV,OAAO,SAAS,IAAI;KACpB,UAAK,WAAE,gBAAgB,IAAI;QAE5B,mBAAmE,QAAA;KAA5D,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,cAAA,CAAA;KAAkB,WAAQ,QAAQ,IAAI"}
@@ -1 +1,2 @@
1
- import { _default } from "./scroll.vue.js";
1
+ import _default from "./scroll.vue.js";
2
+ export { _default as UScroll };
@@ -1,7 +1,10 @@
1
1
  import { ScrollPosition, ScrollProps, _ScrollExposed } from "../../types/scroll.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/scroll/scroll.vue.d.ts
3
4
  type __VLS_Slots = {
4
- /** 默认插槽 */default(): any; /** 内容插槽 */
5
+ /** 默认插槽 */
6
+ default(): any;
7
+ /** 内容插槽 */
5
8
  content(): any;
6
9
  };
7
10
  declare const __VLS_base: import("vue").DefineComponent<ScrollProps, _ScrollExposed, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
@@ -21,5 +24,5 @@ type __VLS_WithSlots<T, S> = T & {
21
24
  };
22
25
  };
23
26
  //#endregion
24
- export { _default };
27
+ export { _default as default };
25
28
  //# sourceMappingURL=scroll.vue.d.ts.map
@@ -1 +1,2 @@
1
- import { _default } from "./select.vue.js";
1
+ import _default from "./select.vue.js";
2
+ export { _default as USelect };
@@ -1,8 +1,11 @@
1
1
  import { SelectProps } from "../../types/select.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/select/select.vue.d.ts
3
4
  type __VLS_Props = SelectProps;
4
5
  type __VLS_Slots = {
5
- /** 前缀插槽 */prefix?: () => any; /** 默认插槽 */
6
+ /** 前缀插槽 */
7
+ prefix?: () => any;
8
+ /** 默认插槽 */
6
9
  default?: (scope: {
7
10
  option: Record<string, any>;
8
11
  index: number;
@@ -39,5 +42,5 @@ type __VLS_WithSlots<T, S> = T & {
39
42
  };
40
43
  };
41
44
  //#endregion
42
- export { _default };
45
+ export { _default as default };
43
46
  //# sourceMappingURL=select.vue.d.ts.map
@@ -1 +1,3 @@
1
- export { };
1
+ import "../dropdown/style.js";
2
+ import "../input/style.js";
3
+ import "@veltra/directives/ripple/style.js";
@@ -1 +1,2 @@
1
- import { _default } from "./slider.vue.js";
1
+ import _default from "./slider.vue.js";
2
+ export { _default as USlider };
@@ -1,4 +1,5 @@
1
1
  import { SliderEmits, SliderProps } from "../../types/slider.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/slider/slider.vue.d.ts
3
4
  declare const __VLS_export: <T extends number | [number, number]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
5
  props: import("vue").PublicProps & __VLS_PrettifyLocal<SliderProps<T> & {
@@ -11,10 +12,10 @@ declare const __VLS_export: <T extends number | [number, number]>(__VLS_props: N
11
12
  slots: {};
12
13
  emit: SliderEmits<T>;
13
14
  }>) => import("vue").VNode & {
14
- __ctx?: Awaited<typeof __VLS_setup>;
15
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
15
16
  };
16
17
  declare const _default: typeof __VLS_export;
17
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
18
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
18
19
  //#endregion
19
- export { _default };
20
+ export { _default as default };
20
21
  //# sourceMappingURL=slider.vue.d.ts.map
@@ -1 +1,2 @@
1
- import { _default } from "./steps.vue.js";
1
+ import _default from "./steps.vue.js";
2
+ export { _default as USteps };
@@ -1,4 +1,5 @@
1
1
  import { StepsProps, StepsSlotScope } from "../../types/steps.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/steps/steps.vue.d.ts
3
4
  type __VLS_Slots = {
4
5
  icon?: (scope: StepsSlotScope) => any;
@@ -6,11 +7,11 @@ type __VLS_Slots = {
6
7
  tip?: (scope: StepsSlotScope) => any;
7
8
  };
8
9
  declare const __VLS_base: import("vue").DefineComponent<StepsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
- "update:current": (value?: string | number | undefined) => any;
10
10
  "item-click": (item: Record<string, any>, index: number) => any;
11
+ "update:current": (value?: string | number | undefined) => any;
11
12
  }, string, import("vue").PublicProps, Readonly<StepsProps> & Readonly<{
12
- "onUpdate:current"?: ((value?: string | number | undefined) => any) | undefined;
13
13
  "onItem-click"?: ((item: Record<string, any>, index: number) => any) | undefined;
14
+ "onUpdate:current"?: ((value?: string | number | undefined) => any) | undefined;
14
15
  }>, {
15
16
  labelKey: string;
16
17
  direction: "horizontal" | "vertical";
@@ -24,5 +25,5 @@ type __VLS_WithSlots<T, S> = T & {
24
25
  };
25
26
  };
26
27
  //#endregion
27
- export { _default };
28
+ export { _default as default };
28
29
  //# sourceMappingURL=steps.vue.d.ts.map
@@ -1 +1,2 @@
1
- import { _default } from "./switch.vue.js";
1
+ import _default from "./switch.vue.js";
2
+ export { _default as USwitch };
@@ -1,4 +1,5 @@
1
1
  import { SwitchProps } from "../../types/switch.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/switch/switch.vue.d.ts
3
4
  type __VLS_Props = SwitchProps;
4
5
  type __VLS_ModelProps = {
@@ -19,5 +20,5 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
19
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
21
  declare const _default: typeof __VLS_export;
21
22
  //#endregion
22
- export { _default };
23
+ export { _default as default };
23
24
  //# sourceMappingURL=switch.vue.d.ts.map
@@ -1,2 +1,3 @@
1
- import { _default } from "./table.vue.js";
2
- import { defineTableColumns } from "./use-columns.js";
1
+ import _default from "./table.vue.js";
2
+ import { defineTableColumns } from "./use-columns.js";
3
+ export { _default as UTable, defineTableColumns };
@@ -1,6 +1,6 @@
1
1
  import { TableColumn, TableColumnAlign } from "../../../types/table.js";
2
+ import "../../../types/index.js";
2
3
  import { TreeNode } from "@cat-kit/core";
3
-
4
4
  //#region src/components/table/node/col.d.ts
5
5
  declare class ColumnNode extends TreeNode<TableColumn, ColumnNode> {
6
6
  children?: ColumnNode[] | undefined;
@@ -1,5 +1,4 @@
1
1
  import { TreeNode } from "@cat-kit/core";
2
-
3
2
  //#region src/components/table/node/row.d.ts
4
3
  /**
5
4
  * TODO: 优化参数,对大数据量来说,对象字面量参数会使内存占用过高
@@ -1 +1,3 @@
1
- export { };
1
+ import "../button/style.js";
2
+ import "../checkbox/style.js";
3
+ import "../radio/style.js";
@@ -28,7 +28,8 @@ const ROW_MOD_CLASS = [
28
28
  "is-current is-checked is-expanded"
29
29
  ];
30
30
  function rowModCls(row) {
31
- return ROW_MOD_CLASS[(row.isCurrent ? 4 : 0) | (row.checked ? 2 : 0) | (row.expanded ? 1 : 0)];
31
+ const i = (row.isCurrent ? 4 : 0) | (row.checked ? 2 : 0) | (row.expanded ? 1 : 0);
32
+ return ROW_MOD_CLASS[i];
32
33
  }
33
34
  const UTableRow = defineComponent({
34
35
  name: "TableRow",
@@ -1 +1 @@
1
- {"version":3,"file":"table-row.js","names":[],"sources":["../../../src/components/table/table-row.tsx"],"sourcesContent":["import { ArrowRight } from '@veltra/icons/normal'\nimport { defineComponent, type DefineComponent } from 'vue'\nimport { inject, onUnmounted } from 'vue'\nimport type { JSX } from 'vue/jsx-runtime'\n\nimport type { TableRow as ITableRow } from '../../types'\nimport { UButton } from '../button'\nimport { UIcon } from '../icon'\nimport { TableDIKey } from './di'\nimport UTabelCell from './table-cell.vue'\n\n/**\n * A3:行修饰类组合静态查找表。\n *\n * 位模式:bit2 = isCurrent, bit1 = checked, bit0 = expanded。\n * 与 `bem.is('...')` 对于 `'current' | 'checked' | 'expanded'` 的输出完全等价,\n * 直接从 index 读字符串,消除每行渲染期间的字符串拼接和 3 次 bem.is 调用。\n *\n * 放在模块顶层使所有 TableRow 实例共享一份引用(不会随 setup 重建)。\n */\nconst ROW_MOD_CLASS: readonly string[] = [\n '',\n 'is-expanded',\n 'is-checked',\n 'is-checked is-expanded',\n 'is-current',\n 'is-current is-expanded',\n 'is-current is-checked',\n 'is-current is-checked is-expanded'\n] as const\n\nfunction rowModCls(row: ITableRow): string {\n const i = (row.isCurrent ? 4 : 0) | (row.checked ? 2 : 0) | (row.expanded ? 1 : 0)\n return ROW_MOD_CLASS[i]!\n}\n\nexport const UTableRow: DefineComponent<{ row: ITableRow; index: number }> = defineComponent({\n name: 'TableRow',\n\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n\n setup(props) {\n const {\n cls,\n columnConfig,\n getColumnSlotsNode,\n toggleTreeRowExpand,\n getCellCtx,\n handleRowClick,\n handleCellClick,\n tableProps,\n measureElement,\n getCellClass\n } = inject(TableDIKey)!\n\n // A1:把 cls.e('row') / cls.e('expand-toggle') 等静态字符串提升到 setup 一次性计算,\n // 避免每次 render 重新走 `cls.e` 拼接。\n const rowBaseCls = cls.e('row')\n const expandToggleCls = cls.e('expand-toggle')\n const expandSpaceCls = cls.e('expand-space')\n\n // A2:measureRef 按 index 缓存闭包。\n // 行虚拟化下,同一 TableRow 实例的 props.index 大多稳定,但在虚拟化重排或展开行切换时\n // 仍会发生变化;把 (index) → refFn 缓存起来,既保证引用稳定(利于 Vue 的 ref diff),\n // 又避免在未来可能的\"同实例跨 index 复用\"情形下重复分配闭包。\n const measureRefCache = new Map<number, (el: unknown) => void>()\n const getMeasureRef = (index: number): ((el: unknown) => void) => {\n let ref = measureRefCache.get(index)\n if (ref === undefined) {\n ref = (el: unknown) => {\n measureElement(index, el as Element | null)\n }\n measureRefCache.set(index, ref)\n }\n return ref\n }\n onUnmounted(() => {\n measureRefCache.clear()\n })\n\n const { columns, expandColumn } = columnConfig\n\n return () => {\n const { row } = props\n const _expandColumn = expandColumn.value\n\n let expandCell: JSX.Element | null = null\n if (_expandColumn) {\n const expandCtx = getCellCtx(row, _expandColumn)\n const cellSpan = tableProps.mergeCell?.(expandCtx)\n\n if (!cellSpan || (cellSpan.colspan && cellSpan.rowspan)) {\n const marginLeft = tableProps.tree ? row.depth * 14 : 0\n expandCell = (\n <UTabelCell\n cellClass={getCellClass(_expandColumn)}\n left={_expandColumn.style.left}\n right={_expandColumn.style.right}\n key={row.uid + _expandColumn.key}\n {...tableProps.mergeCell?.(expandCtx)}\n >\n {!row.isLeaf || (tableProps.expandable && !row.isExpandRow) ? (\n <UButton\n text\n class={expandToggleCls}\n type='primary'\n size='small'\n circle\n onClick={(e) => {\n e.stopPropagation()\n toggleTreeRowExpand(row)\n }}\n style={`margin-left: ${marginLeft}px`}\n >\n <UIcon>\n <ArrowRight />\n </UIcon>\n </UButton>\n ) : (\n <i class={expandSpaceCls} style={`margin-left: ${marginLeft}px`}></i>\n )}\n\n {getColumnSlotsNode(expandCtx)}\n </UTabelCell>\n )\n }\n }\n\n // A3:行 class 由 base + 3-bit 组合查找产出,避免 Vue 的 class 数组归一化开销。\n const mod = rowModCls(row)\n const rowCls = mod ? rowBaseCls + ' ' + mod : rowBaseCls\n\n return (\n <tr\n class={rowCls}\n onClick={(e) => handleRowClick(row, e)}\n ref={getMeasureRef(props.index)}\n key={row.uid}\n >\n {expandCell}\n\n {columns.value.map((column) => {\n const cellCtx = getCellCtx(row, column)\n const cellSpan = tableProps.mergeCell?.(cellCtx)\n if (cellSpan && (!cellSpan.colspan || !cellSpan.rowspan)) {\n return null\n }\n\n const cellNode = getColumnSlotsNode(cellCtx)\n\n return (\n <UTabelCell\n cellClass={getCellClass(column)}\n left={column.style.left}\n right={column.style.right}\n key={row.uid + column.key}\n // @ts-ignore\n onClick={(e) => handleCellClick(row, column, e)}\n {...cellSpan}\n >\n {cellNode}\n </UTabelCell>\n )\n })}\n </tr>\n )\n }\n }\n})\n\nexport const UExpandTableRow = defineComponent({\n name: 'ExpandTableRow',\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n setup(props) {\n const { getExpandRowSlotsNode, cls, measureElement, columnConfig } = inject(TableDIKey)!\n const { leafColumns } = columnConfig\n\n const rowBaseCls = cls.e('row')\n const cellCls = cls.e('cell')\n\n const measureRef = (el: unknown) => {\n measureElement(props.index, el as Element | null)\n }\n\n return () => {\n const { row } = props\n const node = getExpandRowSlotsNode({\n row,\n index: row.index,\n columns: leafColumns.value,\n rowData: row.data\n })\n return (\n <tr class={rowBaseCls} ref={measureRef}>\n <td colspan={leafColumns.value.length} class={cellCls}>\n {node}\n </td>\n </tr>\n )\n }\n }\n})\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,SAAA,QAAA,GAAA;CAAA,OAAA,OAAA,MAAA,cAAA,OAAA,UAAA,SAAA,KAAA,CAAA,MAAA,qBAAA,CAAA,QAAA,CAAA;AAAA;AASA,MAAM,gBAAmC;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAAmC;AAGrC,SAAS,UAAU,KAAwB;CAEzC,OAAO,eADI,IAAI,YAAY,IAAI,MAAM,IAAI,UAAU,IAAI,MAAM,IAAI,WAAW,IAA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AAK;CACxC;CACA,MAAM,OAAO;EACX,MAAM,EAAE,uBAAuB,KAAK,gBAAgB,iBAAiB,OAAO,UAAU;EACtF,MAAM,EAAE,gBAAgB;EAExB,MAAM,aAAa,IAAI,EAAE,KAAK;EAC9B,MAAM,UAAU,IAAI,EAAE,MAAM;EAE5B,MAAM,cAAc,OAAgB;GAClC,eAAe,MAAM,OAAO,EAAoB;EAClD;EAEA,aAAa;GACX,MAAM,EAAE,QAAQ;GAChB,MAAM,OAAO,sBAAsB;IACjC;IACA,OAAO,IAAI;IACX,SAAS,YAAY;IACrB,SAAS,IAAI;GACf,CAAC;GACD,OAAA,YAAA,MAAA;IAAA,SACa;IAAU,OAAO;GAAU,GAAA,CAAA,YAAA,MAAA;IAAA,WACvB,YAAY,MAAM;IAAM,SAAS;GAAO,GAAA,CAClD,IAAI,CAAA,CAAA,CAAA;EAIb;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"table-row.js","names":[],"sources":["../../../src/components/table/table-row.tsx"],"sourcesContent":["import { ArrowRight } from '@veltra/icons/normal'\nimport { defineComponent, type DefineComponent } from 'vue'\nimport { inject, onUnmounted } from 'vue'\nimport type { JSX } from 'vue/jsx-runtime'\n\nimport type { TableRow as ITableRow } from '../../types'\nimport { UButton } from '../button'\nimport { UIcon } from '../icon'\nimport { TableDIKey } from './di'\nimport UTabelCell from './table-cell.vue'\n\n/**\n * A3:行修饰类组合静态查找表。\n *\n * 位模式:bit2 = isCurrent, bit1 = checked, bit0 = expanded。\n * 与 `bem.is('...')` 对于 `'current' | 'checked' | 'expanded'` 的输出完全等价,\n * 直接从 index 读字符串,消除每行渲染期间的字符串拼接和 3 次 bem.is 调用。\n *\n * 放在模块顶层使所有 TableRow 实例共享一份引用(不会随 setup 重建)。\n */\nconst ROW_MOD_CLASS: readonly string[] = [\n '',\n 'is-expanded',\n 'is-checked',\n 'is-checked is-expanded',\n 'is-current',\n 'is-current is-expanded',\n 'is-current is-checked',\n 'is-current is-checked is-expanded'\n] as const\n\nfunction rowModCls(row: ITableRow): string {\n const i = (row.isCurrent ? 4 : 0) | (row.checked ? 2 : 0) | (row.expanded ? 1 : 0)\n return ROW_MOD_CLASS[i]!\n}\n\nexport const UTableRow: DefineComponent<{ row: ITableRow; index: number }> = defineComponent({\n name: 'TableRow',\n\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n\n setup(props) {\n const {\n cls,\n columnConfig,\n getColumnSlotsNode,\n toggleTreeRowExpand,\n getCellCtx,\n handleRowClick,\n handleCellClick,\n tableProps,\n measureElement,\n getCellClass\n } = inject(TableDIKey)!\n\n // A1:把 cls.e('row') / cls.e('expand-toggle') 等静态字符串提升到 setup 一次性计算,\n // 避免每次 render 重新走 `cls.e` 拼接。\n const rowBaseCls = cls.e('row')\n const expandToggleCls = cls.e('expand-toggle')\n const expandSpaceCls = cls.e('expand-space')\n\n // A2:measureRef 按 index 缓存闭包。\n // 行虚拟化下,同一 TableRow 实例的 props.index 大多稳定,但在虚拟化重排或展开行切换时\n // 仍会发生变化;把 (index) → refFn 缓存起来,既保证引用稳定(利于 Vue 的 ref diff),\n // 又避免在未来可能的\"同实例跨 index 复用\"情形下重复分配闭包。\n const measureRefCache = new Map<number, (el: unknown) => void>()\n const getMeasureRef = (index: number): ((el: unknown) => void) => {\n let ref = measureRefCache.get(index)\n if (ref === undefined) {\n ref = (el: unknown) => {\n measureElement(index, el as Element | null)\n }\n measureRefCache.set(index, ref)\n }\n return ref\n }\n onUnmounted(() => {\n measureRefCache.clear()\n })\n\n const { columns, expandColumn } = columnConfig\n\n return () => {\n const { row } = props\n const _expandColumn = expandColumn.value\n\n let expandCell: JSX.Element | null = null\n if (_expandColumn) {\n const expandCtx = getCellCtx(row, _expandColumn)\n const cellSpan = tableProps.mergeCell?.(expandCtx)\n\n if (!cellSpan || (cellSpan.colspan && cellSpan.rowspan)) {\n const marginLeft = tableProps.tree ? row.depth * 14 : 0\n expandCell = (\n <UTabelCell\n cellClass={getCellClass(_expandColumn)}\n left={_expandColumn.style.left}\n right={_expandColumn.style.right}\n key={row.uid + _expandColumn.key}\n {...tableProps.mergeCell?.(expandCtx)}\n >\n {!row.isLeaf || (tableProps.expandable && !row.isExpandRow) ? (\n <UButton\n text\n class={expandToggleCls}\n type='primary'\n size='small'\n circle\n onClick={(e) => {\n e.stopPropagation()\n toggleTreeRowExpand(row)\n }}\n style={`margin-left: ${marginLeft}px`}\n >\n <UIcon>\n <ArrowRight />\n </UIcon>\n </UButton>\n ) : (\n <i class={expandSpaceCls} style={`margin-left: ${marginLeft}px`}></i>\n )}\n\n {getColumnSlotsNode(expandCtx)}\n </UTabelCell>\n )\n }\n }\n\n // A3:行 class 由 base + 3-bit 组合查找产出,避免 Vue 的 class 数组归一化开销。\n const mod = rowModCls(row)\n const rowCls = mod ? rowBaseCls + ' ' + mod : rowBaseCls\n\n return (\n <tr\n class={rowCls}\n onClick={(e) => handleRowClick(row, e)}\n ref={getMeasureRef(props.index)}\n key={row.uid}\n >\n {expandCell}\n\n {columns.value.map((column) => {\n const cellCtx = getCellCtx(row, column)\n const cellSpan = tableProps.mergeCell?.(cellCtx)\n if (cellSpan && (!cellSpan.colspan || !cellSpan.rowspan)) {\n return null\n }\n\n const cellNode = getColumnSlotsNode(cellCtx)\n\n return (\n <UTabelCell\n cellClass={getCellClass(column)}\n left={column.style.left}\n right={column.style.right}\n key={row.uid + column.key}\n // @ts-ignore\n onClick={(e) => handleCellClick(row, column, e)}\n {...cellSpan}\n >\n {cellNode}\n </UTabelCell>\n )\n })}\n </tr>\n )\n }\n }\n})\n\nexport const UExpandTableRow = defineComponent({\n name: 'ExpandTableRow',\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n setup(props) {\n const { getExpandRowSlotsNode, cls, measureElement, columnConfig } = inject(TableDIKey)!\n const { leafColumns } = columnConfig\n\n const rowBaseCls = cls.e('row')\n const cellCls = cls.e('cell')\n\n const measureRef = (el: unknown) => {\n measureElement(props.index, el as Element | null)\n }\n\n return () => {\n const { row } = props\n const node = getExpandRowSlotsNode({\n row,\n index: row.index,\n columns: leafColumns.value,\n rowData: row.data\n })\n return (\n <tr class={rowBaseCls} ref={measureRef}>\n <td colspan={leafColumns.value.length} class={cellCls}>\n {node}\n </td>\n </tr>\n )\n }\n }\n})\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,SAAA,QAAA,GAAA;CAAA,OAAA,OAAA,MAAA,cAAA,OAAA,UAAA,SAAA,KAAA,CAAA,MAAA,qBAAA,CAAA,QAAA,CAAA;AAAA;AASA,MAAM,gBAAmC;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAAmC;AAGrC,SAAS,UAAU,KAAwB;CACzC,MAAM,KAAK,IAAI,YAAY,IAAI,MAAM,IAAI,UAAU,IAAI,MAAM,IAAI,WAAW,IAAI;CAChF,OAAO,cAAc;AACvB;AAEA,MAAa,YAAgE,gBAAgB;CAC3F,MAAM;CAEN,OAAO;EACL,KAAK;GAAE,MAAM;GAA2B,UAAU;EAAK;EACvD,OAAO;GAAE,MAAM;GAAQ,UAAU;EAAK;CACxC;CAEA,MAAM,OAAO;EACX,MAAM,EACJ,KACA,cACA,oBACA,qBACA,YACA,gBACA,iBACA,YACA,gBACA,iBACE,OAAO,UAAU;EAIrB,MAAM,aAAa,IAAI,EAAE,KAAK;EAC9B,MAAM,kBAAkB,IAAI,EAAE,eAAe;EAC7C,MAAM,iBAAiB,IAAI,EAAE,cAAc;EAM3C,MAAM,kCAAkB,IAAI,IAAmC;EAC/D,MAAM,iBAAiB,UAA2C;GAChE,IAAI,MAAM,gBAAgB,IAAI,KAAK;GACnC,IAAI,QAAQ,KAAA,GAAW;IACrB,OAAO,OAAgB;KACrB,eAAe,OAAO,EAAoB;IAC5C;IACA,gBAAgB,IAAI,OAAO,GAAG;GAChC;GACA,OAAO;EACT;EACA,kBAAkB;GAChB,gBAAgB,MAAM;EACxB,CAAC;EAED,MAAM,EAAE,SAAS,iBAAiB;EAElC,aA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,IAAI,aAAa,CAAC,SAAS,WAAW,CAAC,SAAS,UAC9C,OAAO;IAGT,MAAM,WAAW,mBAAmB,OAAO;IAE3C,OAAA,YAAA,aAAA,WAAA;KAAA,aAEe,aAAa,MAAM;KAAC,QACzB,OAAO,MAAM;KAAI,SAChB,OAAO,MAAM;KAAK,OACpB,IAAI,MAAM,OAAO;KAAG,YAEf,MAAM,gBAAgB,KAAK,QAAQ,CAAC;IAAC,GAC3C,QAAQ,GAAA,QAEX,QAAQ,IAAR,WAAQ,EAAA,eAAA,CAAR,QAAQ,EAAA,CAAA;GAGf,CAAC,CAAC,CAAA;EAGR;CACF;AACF,CAAC;AAED,MAAa,kBAAkB,gBAAgB;CAC7C,MAAM;CACN,OAAO;EACL,KAAK;GAAE,MAAM;GAA2B,UAAU;EAAK;EACvD,OAAO;GAAE,MAAM;GAAQ,UAAU;EAAK;CACxC;CACA,MAAM,OAAO;EACX,MAAM,EAAE,uBAAuB,KAAK,gBAAgB,iBAAiB,OAAO,UAAU;EACtF,MAAM,EAAE,gBAAgB;EAExB,MAAM,aAAa,IAAI,EAAE,KAAK;EAC9B,MAAM,UAAU,IAAI,EAAE,MAAM;EAE5B,MAAM,cAAc,OAAgB;GAClC,eAAe,MAAM,OAAO,EAAoB;EAClD;EAEA,aAAa;GACX,MAAM,EAAE,QAAQ;GAChB,MAAM,OAAO,sBAAsB;IACjC;IACA,OAAO,IAAI;IACX,SAAS,YAAY;IACrB,SAAS,IAAI;GACf,CAAC;GACD,OAAA,YAAA,MAAA;IAAA,SACa;IAAU,OAAO;GAAU,GAAA,CAAA,YAAA,MAAA;IAAA,WACvB,YAAY,MAAM;IAAM,SAAS;GAAO,GAAA,CAClD,IAAI,CAAA,CAAA,CAAA;EAIb;CACF;AACF,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import { TableColumn, TableColumnSlotsScope, TableProps, TableRow, TableRowSlotsScope, _TableExposed } from "../../types/table.js";
2
+ import "../../types/index.js";
2
3
  import { ColumnNode } from "./node/col.js";
3
4
  import { TableRowNode } from "./node/row.js";
5
+ import "../../index.js";
4
6
  //#region src/components/table/table.vue.d.ts
5
7
  type __VLS_Slots = {
6
8
  [key: `column:${string}`]: (props: TableColumnSlotsScope) => any;
@@ -48,5 +50,5 @@ type __VLS_WithSlots<T, S> = T & {
48
50
  };
49
51
  };
50
52
  //#endregion
51
- export { _default };
53
+ export { _default as default };
52
54
  //# sourceMappingURL=table.vue.d.ts.map
@@ -1,5 +1,8 @@
1
1
  import { TableColumn } from "../../types/table.js";
2
+ import "../../types/index.js";
3
+ import "./node/col.js";
2
4
  import { ComputedRef, ShallowRef } from "vue";
5
+ import "@veltra/utils";
3
6
  //#region src/components/table/use-columns.d.ts
4
7
  /**
5
8
  * 定义表格列
@@ -98,12 +98,13 @@ function useColumns(options) {
98
98
  };
99
99
  }
100
100
  }
101
- columnForest.value = new Forest({
101
+ const result = new Forest({
102
102
  data: sortedColumns,
103
103
  createNode(data, index, depth, _f, parent) {
104
104
  return new ColumnNode(data, index, depth, parent);
105
105
  }
106
106
  });
107
+ columnForest.value = result;
107
108
  }, { immediate: true });
108
109
  const headers = computed(() => {
109
110
  const headers = [];
@@ -1 +1 @@
1
- {"version":3,"file":"use-columns.js","names":["UButton","UIcon"],"sources":["../../../src/components/table/use-columns.ts"],"sourcesContent":["import { Forest, dfs, last } from '@cat-kit/core'\nimport { ArrowRight } from '@veltra/icons/normal'\nimport { type BEM } from '@veltra/utils'\nimport { computed, createVNode, shallowRef, watch, type ComputedRef, type ShallowRef } from 'vue'\n\nimport type { TableColumn, TableProps } from '../../types'\nimport { UButton } from '../button'\nimport { UIcon } from '../icon'\nimport { ColumnNode } from './node/col'\n\n/**\n * 定义表格列\n * @param columns 表格列\n */\nexport function defineTableColumns(\n columns: TableColumn[],\n commonProps?: Partial<Pick<TableColumn, 'align' | 'minWidth'>>\n): TableColumn[] {\n columns.forEach((col) => {\n dfs(col, (node) => {\n for (const key in commonProps) {\n if (node[key] !== undefined) continue\n node[key] = commonProps[key]\n }\n })\n })\n return columns\n}\n\nexport interface ColumnConfig {\n /** 表头 */\n headers: ComputedRef<ColumnNode[][]>\n\n /**\n * body列, 在body中使用\n */\n columns: ShallowRef<ColumnNode[]>\n\n /** 所有叶子列 */\n leafColumns: ShallowRef<ColumnNode[]>\n\n /** 第一列 */\n expandColumn: ShallowRef<ColumnNode | undefined>\n}\n\ninterface Options {\n props: TableProps\n cls: BEM<'table'>\n /** 创建复选框 */\n createCheckColumn: () => TableColumn\n createSelectColumn: () => TableColumn\n toggleAllTreeRowExpand: () => void\n}\n\nexport function useColumns(options: Options): ColumnConfig {\n const { props, createCheckColumn, createSelectColumn, toggleAllTreeRowExpand, cls } = options\n\n /** 前置列 */\n const preColumns = computed<TableColumn[]>(() => {\n const { selectable, checkable, showIndex } = props\n\n const columns: TableColumn[] = []\n\n if (selectable) {\n columns.push(createSelectColumn())\n } else if (checkable) {\n columns.push(createCheckColumn())\n }\n if (showIndex) {\n columns.push({\n key: '__index__',\n name: '#',\n resizable: false,\n width: 60,\n minWidth: 60,\n align: 'center',\n fixed: 'left',\n render({ row }) {\n return row.index + 1\n }\n })\n }\n\n return columns\n })\n\n const columnForest = shallowRef<Forest<TableColumn, any>>()\n\n const renderExpandAll = () =>\n createVNode(\n UButton,\n {\n text: true,\n title: '展开或收起全部',\n class: cls.e('expand-all'),\n type: 'primary',\n size: 'small',\n circle: true,\n onClick: (e) => {\n e.stopPropagation()\n toggleAllTreeRowExpand()\n }\n },\n () => [createVNode(UIcon, undefined, () => [createVNode(ArrowRight)])]\n )\n\n watch(\n [preColumns, () => props.columns, () => props.tree, () => props.expandable],\n ([preColumns, columns, tree, expandable]) => {\n /** 固定到左侧的列 */\n const fixedOnLeft: TableColumn[] = [...preColumns]\n /** 未固定的列 */\n const unfixed: TableColumn[] = []\n /** 固定到右侧的列 */\n const fixedOnRight: TableColumn[] = []\n\n columns?.forEach((column) => {\n if (!column.fixed || column.children) {\n column.fixed = undefined\n return unfixed.push(column)\n }\n if (column.fixed === 'left') {\n fixedOnLeft.push(column)\n } else {\n fixedOnRight.push(column)\n }\n })\n\n if (last(fixedOnLeft)) {\n last(fixedOnLeft)!.isLastFixed = true\n }\n if (fixedOnRight[0]) {\n fixedOnRight[0].isFirstFixed = true\n }\n\n const sortedColumns = [...fixedOnLeft, ...unfixed, ...fixedOnRight]\n\n if (sortedColumns.length > 0) {\n // 操作时避免改变原数据\n const firstColumn = { ...sortedColumns[0] } as TableColumn\n sortedColumns[0] = firstColumn\n\n // 树形表格需要给第一列添加展开按钮\n // 因此要重新设置第一列的宽度和对齐方式\n if (tree || expandable) {\n firstColumn.align = 'left'\n firstColumn.width = firstColumn.width ? firstColumn.width + 60 : undefined\n\n const oldNameRender = firstColumn.nameRender\n\n firstColumn.nameRender = oldNameRender\n ? (ctx) => {\n const oldNodes = oldNameRender!(ctx)\n return [renderExpandAll(), ...(Array.isArray(oldNodes) ? oldNodes : [oldNodes])]\n }\n : () => {\n return [renderExpandAll(), firstColumn.name]\n }\n }\n }\n\n const result = new Forest<TableColumn, any>({\n data: sortedColumns,\n createNode(data, index, depth, _f, parent) {\n return new ColumnNode(data, index, depth, parent)\n }\n })\n\n columnForest.value = result\n },\n { immediate: true }\n )\n\n const headers = computed(() => {\n const headers: ColumnNode[][] = []\n const forest = columnForest.value\n if (!forest) return headers\n\n // Forest.bfs 对每个根单独 BFS,按 depth 拼行会把后续根节点错放到深层,且根节点无 parent,\n // 回溯 leafs 时会读到 undefined。这里从所有根一次性层序遍历,与多列表头布局一致。\n const queue: ColumnNode[] = [...forest.roots]\n while (queue.length > 0) {\n const size = queue.length\n const layer: ColumnNode[] = []\n for (let i = 0; i < size; i++) {\n const node = queue.shift()!\n layer.push(node)\n const ch = node.children\n if (ch?.length) {\n for (const c of ch) {\n queue.push(c)\n }\n }\n }\n headers.push(layer)\n }\n\n // 从叶子节点开始回溯计算每个节点的累计叶子节点数量,叶子节点数量代表表头的宽度\n for (let i = headers.length - 1; i > 0; i--) {\n const header = headers[i]!\n\n header.forEach((node) => {\n const parent = node.parent\n if (!parent) return\n if (parent.leafs !== undefined) return\n parent.leafs = parent.children!.reduce((sum, node) => {\n return sum + (node.leafs ?? 1)\n }, 0)\n })\n }\n\n return headers\n })\n\n /** 除展开按钮之外的列 */\n const columns = shallowRef<ColumnNode[]>([])\n\n /** 所有叶子节点 */\n const leafColumns = shallowRef<ColumnNode[]>([])\n\n const expandColumn = shallowRef<ColumnNode>()\n\n // 监听列的变化\n watch(\n [columnForest, () => props.tree, () => props.expandable],\n ([forest, tree, expandable]) => {\n const _columns: ColumnNode[] = []\n\n forest?.dfs((node) => {\n if (node.isLeaf) {\n _columns.push(node)\n }\n })\n\n leafColumns.value = _columns\n\n if (tree || expandable) {\n expandColumn.value = _columns[0]\n columns.value = _columns.slice(1)\n } else {\n columns.value = _columns\n expandColumn.value = undefined\n }\n },\n { immediate: true }\n )\n\n return {\n /** 第一列 */\n expandColumn,\n /** 所有列 */\n leafColumns,\n /** 列 */\n columns,\n /** 表格头的分层展示 */\n headers\n }\n}\n"],"mappings":";;;;;;;;;;;;AAcA,SAAgB,mBACd,SACA,aACe;CACf,QAAQ,SAAS,QAAQ;EACvB,IAAI,MAAM,SAAS;GACjB,KAAK,MAAM,OAAO,aAAa;IAC7B,IAAI,KAAK,SAAS,KAAA,GAAW;IAC7B,KAAK,OAAO,YAAY;GAC1B;EACF,CAAC;CACH,CAAC;CACD,OAAO;AACT;AA2BA,SAAgB,WAAW,SAAgC;CACzD,MAAM,EAAE,OAAO,mBAAmB,oBAAoB,wBAAwB,QAAQ;;CAGtF,MAAM,aAAa,eAA8B;EAC/C,MAAM,EAAE,YAAY,WAAW,cAAc;EAE7C,MAAM,UAAyB,CAAC;EAEhC,IAAI,YACF,QAAQ,KAAK,mBAAmB,CAAC;OAC5B,IAAI,WACT,QAAQ,KAAK,kBAAkB,CAAC;EAElC,IAAI,WACF,QAAQ,KAAK;GACX,KAAK;GACL,MAAM;GACN,WAAW;GACX,OAAO;GACP,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AE/C,MAAM,eAAe,WAAuB;CAG5C,MACE;EAAC;QAAoB,MAAM;QAAY,MAAM;CAAU,IACtD,CAAC,QAAQ,MAAM,gBAAgB;EAC9B,MAAM,WAAyB,CAAC;EAEhC,QAAQ,KAAK,SAAS;GACpB,IAAI,KAAK,QACP,SAAS,KAAK,IAAI;EAEtB,CAAC;EAED,YAAY,QAAQ;EAEpB,IAAI,QAAQ,YAAY;GACtB,aAAa,QAAQ,SAAS;GAC9B,QAAQ,QAAQ,SAAS,MAAM,CAAC;EAClC,OAAO;GACL,QAAQ,QAAQ;GAChB,aAAa,QAAQ,KAAA;EACvB;CACF,GACA,EAAE,WAAW,KAAK,CACpB;CAEA,OAAO;;EAEL;;EAEA;;EAEA;;EAEA;CACF;AACF"}
1
+ {"version":3,"file":"use-columns.js","names":["UButton","UIcon"],"sources":["../../../src/components/table/use-columns.ts"],"sourcesContent":["import { Forest, dfs, last } from '@cat-kit/core'\nimport { ArrowRight } from '@veltra/icons/normal'\nimport { type BEM } from '@veltra/utils'\nimport { computed, createVNode, shallowRef, watch, type ComputedRef, type ShallowRef } from 'vue'\n\nimport type { TableColumn, TableProps } from '../../types'\nimport { UButton } from '../button'\nimport { UIcon } from '../icon'\nimport { ColumnNode } from './node/col'\n\n/**\n * 定义表格列\n * @param columns 表格列\n */\nexport function defineTableColumns(\n columns: TableColumn[],\n commonProps?: Partial<Pick<TableColumn, 'align' | 'minWidth'>>\n): TableColumn[] {\n columns.forEach((col) => {\n dfs(col, (node) => {\n for (const key in commonProps) {\n if (node[key] !== undefined) continue\n node[key] = commonProps[key]\n }\n })\n })\n return columns\n}\n\nexport interface ColumnConfig {\n /** 表头 */\n headers: ComputedRef<ColumnNode[][]>\n\n /**\n * body列, 在body中使用\n */\n columns: ShallowRef<ColumnNode[]>\n\n /** 所有叶子列 */\n leafColumns: ShallowRef<ColumnNode[]>\n\n /** 第一列 */\n expandColumn: ShallowRef<ColumnNode | undefined>\n}\n\ninterface Options {\n props: TableProps\n cls: BEM<'table'>\n /** 创建复选框 */\n createCheckColumn: () => TableColumn\n createSelectColumn: () => TableColumn\n toggleAllTreeRowExpand: () => void\n}\n\nexport function useColumns(options: Options): ColumnConfig {\n const { props, createCheckColumn, createSelectColumn, toggleAllTreeRowExpand, cls } = options\n\n /** 前置列 */\n const preColumns = computed<TableColumn[]>(() => {\n const { selectable, checkable, showIndex } = props\n\n const columns: TableColumn[] = []\n\n if (selectable) {\n columns.push(createSelectColumn())\n } else if (checkable) {\n columns.push(createCheckColumn())\n }\n if (showIndex) {\n columns.push({\n key: '__index__',\n name: '#',\n resizable: false,\n width: 60,\n minWidth: 60,\n align: 'center',\n fixed: 'left',\n render({ row }) {\n return row.index + 1\n }\n })\n }\n\n return columns\n })\n\n const columnForest = shallowRef<Forest<TableColumn, any>>()\n\n const renderExpandAll = () =>\n createVNode(\n UButton,\n {\n text: true,\n title: '展开或收起全部',\n class: cls.e('expand-all'),\n type: 'primary',\n size: 'small',\n circle: true,\n onClick: (e) => {\n e.stopPropagation()\n toggleAllTreeRowExpand()\n }\n },\n () => [createVNode(UIcon, undefined, () => [createVNode(ArrowRight)])]\n )\n\n watch(\n [preColumns, () => props.columns, () => props.tree, () => props.expandable],\n ([preColumns, columns, tree, expandable]) => {\n /** 固定到左侧的列 */\n const fixedOnLeft: TableColumn[] = [...preColumns]\n /** 未固定的列 */\n const unfixed: TableColumn[] = []\n /** 固定到右侧的列 */\n const fixedOnRight: TableColumn[] = []\n\n columns?.forEach((column) => {\n if (!column.fixed || column.children) {\n column.fixed = undefined\n return unfixed.push(column)\n }\n if (column.fixed === 'left') {\n fixedOnLeft.push(column)\n } else {\n fixedOnRight.push(column)\n }\n })\n\n if (last(fixedOnLeft)) {\n last(fixedOnLeft)!.isLastFixed = true\n }\n if (fixedOnRight[0]) {\n fixedOnRight[0].isFirstFixed = true\n }\n\n const sortedColumns = [...fixedOnLeft, ...unfixed, ...fixedOnRight]\n\n if (sortedColumns.length > 0) {\n // 操作时避免改变原数据\n const firstColumn = { ...sortedColumns[0] } as TableColumn\n sortedColumns[0] = firstColumn\n\n // 树形表格需要给第一列添加展开按钮\n // 因此要重新设置第一列的宽度和对齐方式\n if (tree || expandable) {\n firstColumn.align = 'left'\n firstColumn.width = firstColumn.width ? firstColumn.width + 60 : undefined\n\n const oldNameRender = firstColumn.nameRender\n\n firstColumn.nameRender = oldNameRender\n ? (ctx) => {\n const oldNodes = oldNameRender!(ctx)\n return [renderExpandAll(), ...(Array.isArray(oldNodes) ? oldNodes : [oldNodes])]\n }\n : () => {\n return [renderExpandAll(), firstColumn.name]\n }\n }\n }\n\n const result = new Forest<TableColumn, any>({\n data: sortedColumns,\n createNode(data, index, depth, _f, parent) {\n return new ColumnNode(data, index, depth, parent)\n }\n })\n\n columnForest.value = result\n },\n { immediate: true }\n )\n\n const headers = computed(() => {\n const headers: ColumnNode[][] = []\n const forest = columnForest.value\n if (!forest) return headers\n\n // Forest.bfs 对每个根单独 BFS,按 depth 拼行会把后续根节点错放到深层,且根节点无 parent,\n // 回溯 leafs 时会读到 undefined。这里从所有根一次性层序遍历,与多列表头布局一致。\n const queue: ColumnNode[] = [...forest.roots]\n while (queue.length > 0) {\n const size = queue.length\n const layer: ColumnNode[] = []\n for (let i = 0; i < size; i++) {\n const node = queue.shift()!\n layer.push(node)\n const ch = node.children\n if (ch?.length) {\n for (const c of ch) {\n queue.push(c)\n }\n }\n }\n headers.push(layer)\n }\n\n // 从叶子节点开始回溯计算每个节点的累计叶子节点数量,叶子节点数量代表表头的宽度\n for (let i = headers.length - 1; i > 0; i--) {\n const header = headers[i]!\n\n header.forEach((node) => {\n const parent = node.parent\n if (!parent) return\n if (parent.leafs !== undefined) return\n parent.leafs = parent.children!.reduce((sum, node) => {\n return sum + (node.leafs ?? 1)\n }, 0)\n })\n }\n\n return headers\n })\n\n /** 除展开按钮之外的列 */\n const columns = shallowRef<ColumnNode[]>([])\n\n /** 所有叶子节点 */\n const leafColumns = shallowRef<ColumnNode[]>([])\n\n const expandColumn = shallowRef<ColumnNode>()\n\n // 监听列的变化\n watch(\n [columnForest, () => props.tree, () => props.expandable],\n ([forest, tree, expandable]) => {\n const _columns: ColumnNode[] = []\n\n forest?.dfs((node) => {\n if (node.isLeaf) {\n _columns.push(node)\n }\n })\n\n leafColumns.value = _columns\n\n if (tree || expandable) {\n expandColumn.value = _columns[0]\n columns.value = _columns.slice(1)\n } else {\n columns.value = _columns\n expandColumn.value = undefined\n }\n },\n { immediate: true }\n )\n\n return {\n /** 第一列 */\n expandColumn,\n /** 所有列 */\n leafColumns,\n /** 列 */\n columns,\n /** 表格头的分层展示 */\n headers\n }\n}\n"],"mappings":";;;;;;;;;;;;AAcA,SAAgB,mBACd,SACA,aACe;CACf,QAAQ,SAAS,QAAQ;EACvB,IAAI,MAAM,SAAS;GACjB,KAAK,MAAM,OAAO,aAAa;IAC7B,IAAI,KAAK,SAAS,KAAA,GAAW;IAC7B,KAAK,OAAO,YAAY;GAC1B;EACF,CAAC;CACH,CAAC;CACD,OAAO;AACT;AA2BA,SAAgB,WAAW,SAAgC;CACzD,MAAM,EAAE,OAAO,mBAAmB,oBAAoB,wBAAwB,QAAQ;;CAGtF,MAAM,aAAa,eAA8B;EAC/C,MAAM,EAAE,YAAY,WAAW,cAAc;EAE7C,MAAM,UAAyB,CAAC;EAEhC,IAAI,YACF,QAAQ,KAAK,mBAAmB,CAAC;OAC5B,IAAI,WACT,QAAQ,KAAK,kBAAkB,CAAC;EAElC,IAAI,WACF,QAAQ,KAAK;GACX,KAAK;GACL,MAAM;GACN,WAAW;GACX,OAAO;GACP,UAAU;GACV,OAAO;GACP,OAAO;GACP,OAAO,EAAE,OAAO;IACd,OAAO,IAAI,QAAQ;GACrB;EACF,CAAC;EAGH,OAAO;CACT,CAAC;CAED,MAAM,eAAe,WAAqC;CAE1D,MAAM,wBACJ,YACEA,aACA;EACE,MAAM;EACN,OAAO;EACP,OAAO,IAAI,EAAE,YAAY;EACzB,MAAM;EACN,MAAM;EACN,QAAQ;EACR,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I,QAAQ,YAAY;GACtB,aAAa,QAAQ,SAAS;GAC9B,QAAQ,QAAQ,SAAS,MAAM,CAAC;EAClC,OAAO;GACL,QAAQ,QAAQ;GAChB,aAAa,QAAQ,KAAA;EACvB;CACF,GACA,EAAE,WAAW,KAAK,CACpB;CAEA,OAAO;;EAEL;;EAEA;;EAEA;;EAEA;CACF;AACF"}
@@ -1 +1,2 @@
1
- import { _default } from "./table-editor.vue.js";
1
+ import _default from "./table-editor.vue.js";
2
+ export { _default as UTableEditor };
@@ -1 +1,2 @@
1
- export { };
1
+ import "../button/style.js";
2
+ import "../table/style.js";
@@ -1,4 +1,5 @@
1
1
  import { TableEditorProps } from "../../types/table-editor.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/table-editor/table-editor.vue.d.ts
3
4
  declare const __VLS_export: import("vue").DefineComponent<TableEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
5
  "update:modelValue": (value: any[]) => any;
@@ -7,5 +8,5 @@ declare const __VLS_export: import("vue").DefineComponent<TableEditorProps, {},
7
8
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
9
  declare const _default: typeof __VLS_export;
9
10
  //#endregion
10
- export { _default };
11
+ export { _default as default };
11
12
  //# sourceMappingURL=table-editor.vue.d.ts.map
@@ -1,3 +1,4 @@
1
- import { _default } from "./tabs.vue.js";
2
- import { _default as _default$1 } from "./tabs-horizontal.vue.js";
3
- import { _default as _default$2 } from "./tabs-vertical.vue.js";
1
+ import _default from "./tabs.vue.js";
2
+ import _default$1 from "./tabs-horizontal.vue.js";
3
+ import _default$2 from "./tabs-vertical.vue.js";
4
+ export { _default as UTabs, _default$1 as UTabsHorizontal, _default$2 as UTabsVertical };
@@ -1 +1,2 @@
1
- export { };
1
+ import "@veltra/directives/ripple/style.js";
2
+ import "@veltra/styles/transitions/fade.scss";
@@ -1,4 +1,5 @@
1
1
  import { TabItem, TabsHorizontalProps } from "../../types/tabs.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/tabs/tabs-horizontal.vue.d.ts
3
4
  type __VLS_Props = TabsHorizontalProps;
4
5
  type __VLS_Slots = {
@@ -15,17 +16,17 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
15
16
  "update:modelValue": (value: string | undefined) => any;
16
17
  } & {
17
18
  "update:modelValue": (value: string) => any;
18
- close: (item: TabItem, index: number) => any;
19
19
  click: (item: TabItem, index: number) => any;
20
+ close: (item: TabItem, index: number) => any;
20
21
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
22
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
22
- onClose?: ((item: TabItem, index: number) => any) | undefined;
23
23
  onClick?: ((item: TabItem, index: number) => any) | undefined;
24
+ onClose?: ((item: TabItem, index: number) => any) | undefined;
24
25
  }>, {
25
26
  closable: boolean;
26
- position: "top" | "bottom";
27
27
  block: boolean;
28
28
  rounded: boolean;
29
+ position: "top" | "bottom";
29
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
31
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
32
  declare const _default: typeof __VLS_export;
@@ -35,5 +36,5 @@ type __VLS_WithSlots<T, S> = T & {
35
36
  };
36
37
  };
37
38
  //#endregion
38
- export { _default };
39
+ export { _default as default };
39
40
  //# sourceMappingURL=tabs-horizontal.vue.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { TabItem, TabsVerticalProps } from "../../types/tabs.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/tabs/tabs-vertical.vue.d.ts
3
4
  type __VLS_Props = TabsVerticalProps;
4
5
  type __VLS_Slots = {
@@ -15,16 +16,16 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
15
16
  "update:modelValue": (value: string | undefined) => any;
16
17
  } & {
17
18
  "update:modelValue": (value: string) => any;
18
- close: (item: TabItem, index: number) => any;
19
19
  click: (item: TabItem, index: number) => any;
20
+ close: (item: TabItem, index: number) => any;
20
21
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
22
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
22
- onClose?: ((item: TabItem, index: number) => any) | undefined;
23
23
  onClick?: ((item: TabItem, index: number) => any) | undefined;
24
+ onClose?: ((item: TabItem, index: number) => any) | undefined;
24
25
  }>, {
25
26
  closable: boolean;
26
- position: "left" | "right";
27
27
  rounded: boolean;
28
+ position: "left" | "right";
28
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
30
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
31
  declare const _default: typeof __VLS_export;
@@ -34,5 +35,5 @@ type __VLS_WithSlots<T, S> = T & {
34
35
  };
35
36
  };
36
37
  //#endregion
37
- export { _default };
38
+ export { _default as default };
38
39
  //# sourceMappingURL=tabs-vertical.vue.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { TabItem, TabsProps } from "../../types/tabs.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/tabs/tabs.vue.d.ts
3
4
  type __VLS_Props = TabsProps;
4
5
  type __VLS_Slots = Record<string, (props: any) => any>;
@@ -10,17 +11,17 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
10
11
  "update:modelValue": (value: string | undefined) => any;
11
12
  } & {
12
13
  "update:modelValue": (value: string) => any;
13
- close: (item: TabItem, index: number) => any;
14
14
  click: (item: TabItem, index: number) => any;
15
+ close: (item: TabItem, index: number) => any;
15
16
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
17
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
17
- onClose?: ((item: TabItem, index: number) => any) | undefined;
18
18
  onClick?: ((item: TabItem, index: number) => any) | undefined;
19
+ onClose?: ((item: TabItem, index: number) => any) | undefined;
19
20
  }>, {
20
21
  closable: boolean;
21
- position: "left" | "right" | "top" | "bottom";
22
22
  block: boolean;
23
23
  rounded: boolean;
24
+ position: "left" | "right" | "top" | "bottom";
24
25
  keepAlive: boolean;
25
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
27
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -31,5 +32,5 @@ type __VLS_WithSlots<T, S> = T & {
31
32
  };
32
33
  };
33
34
  //#endregion
34
- export { _default };
35
+ export { _default as default };
35
36
  //# sourceMappingURL=tabs.vue.d.ts.map
@@ -1 +1,2 @@
1
- import { _default } from "./tag.vue.js";
1
+ import _default from "./tag.vue.js";
2
+ export { _default as UTag };
@@ -1,4 +1,5 @@
1
1
  import { TagProps } from "../../types/tag.js";
2
+ import "../../types/index.js";
2
3
  //#region src/components/tag/tag.vue.d.ts
3
4
  declare var __VLS_1: {};
4
5
  type __VLS_Slots = {} & {
@@ -17,5 +18,5 @@ type __VLS_WithSlots<T, S> = T & {
17
18
  };
18
19
  };
19
20
  //#endregion
20
- export { _default };
21
+ export { _default as default };
21
22
  //# sourceMappingURL=tag.vue.d.ts.map
@@ -1 +1,2 @@
1
- import { _default } from "./text.vue.js";
1
+ import _default from "./text.vue.js";
2
+ export { _default as UText };