@aithe/aithe-ui 26.2.3 → 26.3.2

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 (620) hide show
  1. package/README.md +19 -11
  2. package/dist/apps/admin/app.js +12 -0
  3. package/dist/apps/admin/components/admin-app.js +83 -0
  4. package/dist/apps/admin/components/admin-layout.d.ts +0 -1
  5. package/dist/apps/admin/components/admin-layout.d.ts.map +1 -1
  6. package/dist/apps/admin/components/admin-layout.js +250 -0
  7. package/dist/apps/admin/datahub/auth.js +24 -0
  8. package/dist/apps/admin/datahub/dashboard.js +16 -0
  9. package/dist/apps/admin/datahub/index.js +42 -0
  10. package/dist/apps/admin/datahub/menu.js +16 -0
  11. package/dist/apps/admin/datahub/mock/auth.js +11 -0
  12. package/dist/apps/admin/datahub/mock/dashboard.js +10 -0
  13. package/dist/apps/admin/datahub/mock/menu.js +42 -0
  14. package/dist/apps/admin/i18n/de-DE.js +37 -0
  15. package/dist/apps/admin/i18n/en-US.js +37 -0
  16. package/dist/apps/admin/i18n/es-ES.js +38 -0
  17. package/dist/apps/admin/i18n/fr-FR.js +37 -0
  18. package/dist/apps/admin/i18n/index.js +27 -0
  19. package/dist/apps/admin/i18n/ja-JP.js +38 -0
  20. package/dist/apps/admin/i18n/ko-KR.js +37 -0
  21. package/dist/apps/admin/i18n/pt-BR.js +37 -0
  22. package/dist/apps/admin/i18n/zh-CN.js +37 -0
  23. package/dist/apps/admin/i18n/zh-HK.js +37 -0
  24. package/dist/apps/admin/i18n/zh-TW.js +37 -0
  25. package/dist/apps/admin/pages/dashboard-page.d.ts +1 -0
  26. package/dist/apps/admin/pages/dashboard-page.d.ts.map +1 -1
  27. package/dist/apps/admin/pages/dashboard-page.js +199 -0
  28. package/dist/apps/admin/pages/login-page.js +278 -0
  29. package/dist/apps/admin/pages/not-found-page.js +57 -0
  30. package/dist/apps/admin/pages/role-page.js +76 -0
  31. package/dist/apps/admin/pages/settings-page.js +95 -0
  32. package/dist/apps/admin/pages/user-page.js +76 -0
  33. package/dist/apps/admin/router/index.js +43 -0
  34. package/dist/apps/admin/standalone.js +1 -0
  35. package/dist/apps/admin/store/auth.js +42 -0
  36. package/dist/apps/api/app.js +82 -0
  37. package/dist/apps/api/demo-data.d.ts.map +1 -1
  38. package/dist/apps/api/demo-data.js +965 -0
  39. package/dist/apps/api/docs-viewer.js +684 -0
  40. package/dist/apps/api/i18n/de-DE.d.ts.map +1 -1
  41. package/dist/apps/api/i18n/de-DE.js +131 -0
  42. package/dist/apps/api/i18n/en-US.d.ts.map +1 -1
  43. package/dist/apps/api/i18n/en-US.js +141 -0
  44. package/dist/apps/api/i18n/es-ES.d.ts.map +1 -1
  45. package/dist/apps/api/i18n/es-ES.js +131 -0
  46. package/dist/apps/api/i18n/fr-FR.d.ts.map +1 -1
  47. package/dist/apps/api/i18n/fr-FR.js +131 -0
  48. package/dist/apps/api/i18n/index.js +27 -0
  49. package/dist/apps/api/i18n/ja-JP.d.ts.map +1 -1
  50. package/dist/apps/api/i18n/ja-JP.js +131 -0
  51. package/dist/apps/api/i18n/ko-KR.d.ts.map +1 -1
  52. package/dist/apps/api/i18n/ko-KR.js +131 -0
  53. package/dist/apps/api/i18n/pt-BR.d.ts.map +1 -1
  54. package/dist/apps/api/i18n/pt-BR.js +131 -0
  55. package/dist/apps/api/i18n/zh-CN.d.ts.map +1 -1
  56. package/dist/apps/api/i18n/zh-CN.js +141 -0
  57. package/dist/apps/api/i18n/zh-HK.d.ts.map +1 -1
  58. package/dist/apps/api/i18n/zh-HK.js +131 -0
  59. package/dist/apps/api/i18n/zh-TW.d.ts.map +1 -1
  60. package/dist/apps/api/i18n/zh-TW.js +131 -0
  61. package/dist/apps/api/pages/docs.d.ts.map +1 -1
  62. package/dist/apps/api/pages/docs.js +369 -0
  63. package/dist/apps/api/standalone.js +1 -0
  64. package/dist/apps/demo/app.d.ts.map +1 -1
  65. package/dist/apps/demo/app.js +275 -0
  66. package/dist/apps/demo/editor.d.ts.map +1 -1
  67. package/dist/apps/demo/editor.js +270 -0
  68. package/dist/apps/demo/helpers.js +7 -0
  69. package/dist/apps/demo/i18n/de-DE.d.ts.map +1 -1
  70. package/dist/apps/demo/i18n/de-DE.js +289 -0
  71. package/dist/apps/demo/i18n/en-US.d.ts.map +1 -1
  72. package/dist/apps/demo/i18n/en-US.js +301 -0
  73. package/dist/apps/demo/i18n/es-ES.d.ts.map +1 -1
  74. package/dist/apps/demo/i18n/es-ES.js +289 -0
  75. package/dist/apps/demo/i18n/fr-FR.d.ts.map +1 -1
  76. package/dist/apps/demo/i18n/fr-FR.js +289 -0
  77. package/dist/apps/demo/i18n/index.js +27 -0
  78. package/dist/apps/demo/i18n/ja-JP.d.ts.map +1 -1
  79. package/dist/apps/demo/i18n/ja-JP.js +289 -0
  80. package/dist/apps/demo/i18n/ko-KR.d.ts.map +1 -1
  81. package/dist/apps/demo/i18n/ko-KR.js +289 -0
  82. package/dist/apps/demo/i18n/pt-BR.d.ts.map +1 -1
  83. package/dist/apps/demo/i18n/pt-BR.js +289 -0
  84. package/dist/apps/demo/i18n/zh-CN.d.ts.map +1 -1
  85. package/dist/apps/demo/i18n/zh-CN.js +301 -0
  86. package/dist/apps/demo/i18n/zh-HK.d.ts.map +1 -1
  87. package/dist/apps/demo/i18n/zh-HK.js +289 -0
  88. package/dist/apps/demo/i18n/zh-TW.d.ts.map +1 -1
  89. package/dist/apps/demo/i18n/zh-TW.js +289 -0
  90. package/dist/apps/demo/pages/autoform.d.ts.map +1 -1
  91. package/dist/apps/demo/pages/autoform.js +422 -0
  92. package/dist/apps/demo/pages/autoview.d.ts +3 -0
  93. package/dist/apps/demo/pages/autoview.d.ts.map +1 -0
  94. package/dist/apps/demo/pages/autoview.js +310 -0
  95. package/dist/apps/demo/pages/basic.js +157 -0
  96. package/dist/apps/demo/pages/code.js +1088 -0
  97. package/dist/apps/demo/pages/container.js +42 -0
  98. package/dist/apps/demo/pages/dashboard.js +159 -0
  99. package/dist/apps/demo/pages/data.d.ts.map +1 -1
  100. package/dist/apps/demo/pages/data.js +327 -0
  101. package/dist/apps/demo/pages/display.d.ts.map +1 -1
  102. package/dist/apps/demo/pages/display.js +295 -0
  103. package/dist/apps/demo/pages/feedback.js +94 -0
  104. package/dist/apps/demo/pages/form.d.ts.map +1 -1
  105. package/dist/apps/demo/pages/form.js +119 -0
  106. package/dist/apps/demo/pages/layout.js +74 -0
  107. package/dist/apps/demo/pages/navigation.js +54 -0
  108. package/dist/apps/demo/pages/progress.js +42 -0
  109. package/dist/apps/demo/pages/theme.js +126 -0
  110. package/dist/apps/demo/standalone.js +1 -0
  111. package/dist/components/basic/AGENTS.md +1 -0
  112. package/dist/components/basic/avatar.js +168 -0
  113. package/dist/components/basic/badge.js +157 -0
  114. package/dist/components/basic/button-group.js +70 -0
  115. package/dist/components/basic/button.d.ts +2 -4
  116. package/dist/components/basic/button.d.ts.map +1 -1
  117. package/dist/components/basic/button.js +315 -0
  118. package/dist/components/basic/card.js +186 -0
  119. package/dist/components/basic/chip.js +103 -0
  120. package/dist/components/basic/divider.js +127 -0
  121. package/dist/components/basic/empty.js +72 -0
  122. package/dist/components/basic/icon.js +129 -0
  123. package/dist/components/basic/input.d.ts.map +1 -1
  124. package/dist/components/basic/input.js +314 -0
  125. package/dist/components/basic/tag.d.ts +7 -2
  126. package/dist/components/basic/tag.d.ts.map +1 -1
  127. package/dist/components/basic/tag.js +248 -0
  128. package/dist/components/basic/textarea.d.ts +0 -1
  129. package/dist/components/basic/textarea.d.ts.map +1 -1
  130. package/dist/components/basic/textarea.js +130 -0
  131. package/dist/components/container/callout.js +108 -0
  132. package/dist/components/container/details.js +117 -0
  133. package/dist/components/container/scroller.js +144 -0
  134. package/dist/components/container/split-panel.js +150 -0
  135. package/dist/components/data/AGENTS.md +1 -1
  136. package/dist/components/data/box-table.d.ts +53 -0
  137. package/dist/components/data/box-table.d.ts.map +1 -0
  138. package/dist/components/data/box-table.js +220 -0
  139. package/dist/components/data/dropdown.d.ts +8 -5
  140. package/dist/components/data/dropdown.d.ts.map +1 -1
  141. package/dist/components/data/dropdown.js +219 -0
  142. package/dist/components/data/metrics-group.js +180 -0
  143. package/dist/components/data/metrics.d.ts +11 -0
  144. package/dist/components/data/metrics.d.ts.map +1 -1
  145. package/dist/components/data/metrics.js +309 -0
  146. package/dist/components/data/pagination.js +119 -0
  147. package/dist/components/data/tab-pane.d.ts +58 -12
  148. package/dist/components/data/tab-pane.d.ts.map +1 -1
  149. package/dist/components/data/tab-pane.js +130 -0
  150. package/dist/components/data/table-column.d.ts +29 -5
  151. package/dist/components/data/table-column.d.ts.map +1 -1
  152. package/dist/components/data/table-column.js +123 -0
  153. package/dist/components/data/table.d.ts +134 -54
  154. package/dist/components/data/table.d.ts.map +1 -1
  155. package/dist/components/data/table.js +1210 -0
  156. package/dist/components/data/tabs.d.ts +60 -3
  157. package/dist/components/data/tabs.d.ts.map +1 -1
  158. package/dist/components/data/tabs.js +416 -0
  159. package/dist/components/data/timeline-item.js +127 -0
  160. package/dist/components/data/timeline.js +204 -0
  161. package/dist/components/data/tree-menu.d.ts +12 -2
  162. package/dist/components/data/tree-menu.d.ts.map +1 -1
  163. package/dist/components/data/tree-menu.js +482 -0
  164. package/dist/components/data/tree.js +269 -0
  165. package/dist/components/display/AGENTS.md +5 -2
  166. package/dist/components/display/animated-image.js +98 -0
  167. package/dist/components/display/autoview.d.ts +139 -0
  168. package/dist/components/display/autoview.d.ts.map +1 -0
  169. package/dist/components/display/autoview.js +460 -0
  170. package/dist/components/display/brief-box.d.ts +42 -0
  171. package/dist/components/display/brief-box.d.ts.map +1 -0
  172. package/dist/components/display/brief-box.js +117 -0
  173. package/dist/components/display/carousel.js +223 -0
  174. package/dist/components/display/code-editor.d.ts.map +1 -1
  175. package/dist/components/display/code-editor.js +976 -0
  176. package/dist/components/display/comparison.js +132 -0
  177. package/dist/components/display/desc-item.d.ts +48 -0
  178. package/dist/components/display/desc-item.d.ts.map +1 -0
  179. package/dist/components/display/desc-item.js +150 -0
  180. package/dist/components/display/desc.d.ts +68 -0
  181. package/dist/components/display/desc.d.ts.map +1 -0
  182. package/dist/components/display/desc.js +405 -0
  183. package/dist/components/display/detail-box.d.ts +51 -0
  184. package/dist/components/display/detail-box.d.ts.map +1 -0
  185. package/dist/components/display/detail-box.js +157 -0
  186. package/dist/components/display/label.js +166 -0
  187. package/dist/components/display/markdown-editor.js +319 -0
  188. package/dist/components/display/markdown.d.ts.map +1 -1
  189. package/dist/components/display/markdown.js +193 -0
  190. package/dist/components/display/mini-box.d.ts +31 -0
  191. package/dist/components/display/mini-box.d.ts.map +1 -0
  192. package/dist/components/display/mini-box.js +137 -0
  193. package/dist/components/display/profile.d.ts +18 -0
  194. package/dist/components/display/profile.d.ts.map +1 -0
  195. package/dist/components/display/profile.js +164 -0
  196. package/dist/components/feedback/AGENTS.md +1 -0
  197. package/dist/components/feedback/alert.js +150 -0
  198. package/dist/components/feedback/dialog.js +228 -0
  199. package/dist/components/feedback/drawer.d.ts.map +1 -1
  200. package/dist/components/feedback/drawer.js +338 -0
  201. package/dist/components/feedback/loading.js +130 -0
  202. package/dist/components/feedback/modal.d.ts.map +1 -1
  203. package/dist/components/feedback/modal.js +303 -0
  204. package/dist/components/feedback/notification.js +170 -0
  205. package/dist/components/feedback/popover.d.ts +1 -1
  206. package/dist/components/feedback/popover.js +124 -0
  207. package/dist/components/feedback/toast.js +142 -0
  208. package/dist/components/feedback/tooltip.d.ts +1 -1
  209. package/dist/components/feedback/tooltip.js +153 -0
  210. package/dist/components/form/AGENTS.md +4 -0
  211. package/dist/components/form/autoform-item.d.ts +6 -0
  212. package/dist/components/form/autoform-item.d.ts.map +1 -1
  213. package/dist/components/form/autoform-item.js +791 -0
  214. package/dist/components/form/autoform.d.ts +15 -5
  215. package/dist/components/form/autoform.d.ts.map +1 -1
  216. package/dist/components/form/autoform.js +303 -0
  217. package/dist/components/form/checkbox-group.js +118 -0
  218. package/dist/components/form/checkbox.js +123 -0
  219. package/dist/components/form/color-picker.js +148 -0
  220. package/dist/components/form/combobox.d.ts +4 -0
  221. package/dist/components/form/combobox.d.ts.map +1 -1
  222. package/dist/components/form/combobox.js +325 -0
  223. package/dist/components/form/date-picker.js +123 -0
  224. package/dist/components/form/form-item.d.ts.map +1 -1
  225. package/dist/components/form/form-item.js +141 -0
  226. package/dist/components/form/form.js +94 -0
  227. package/dist/components/form/radio-group.js +106 -0
  228. package/dist/components/form/radio.js +110 -0
  229. package/dist/components/form/rate.js +116 -0
  230. package/dist/components/form/select.d.ts +5 -1
  231. package/dist/components/form/select.d.ts.map +1 -1
  232. package/dist/components/form/select.js +539 -0
  233. package/dist/components/form/slider.js +134 -0
  234. package/dist/components/form/switch.js +146 -0
  235. package/dist/components/form/time-picker.js +92 -0
  236. package/dist/components/form/transfer.js +273 -0
  237. package/dist/components/form/upload.js +138 -0
  238. package/dist/components/framework/body.js +333 -0
  239. package/dist/components/framework/dashboard-panel.js +519 -0
  240. package/dist/components/framework/dashboard.d.ts.map +1 -1
  241. package/dist/components/framework/dashboard.js +1084 -0
  242. package/dist/components/framework/header.js +237 -0
  243. package/dist/components/framework/log-panel.js +637 -0
  244. package/dist/components/framework/page.js +151 -0
  245. package/dist/components/framework/sidebar.d.ts +4 -10
  246. package/dist/components/framework/sidebar.d.ts.map +1 -1
  247. package/dist/components/framework/sidebar.js +477 -0
  248. package/dist/components/layout/affix.js +137 -0
  249. package/dist/components/layout/col.js +103 -0
  250. package/dist/components/layout/collapse-item.js +165 -0
  251. package/dist/components/layout/collapse.js +108 -0
  252. package/dist/components/layout/container.js +92 -0
  253. package/dist/components/layout/flex.js +100 -0
  254. package/dist/components/layout/row.js +103 -0
  255. package/dist/components/layout/space.js +85 -0
  256. package/dist/components/navigation/back-top.js +127 -0
  257. package/dist/components/navigation/breadcrumb-item.js +108 -0
  258. package/dist/components/navigation/breadcrumb.js +70 -0
  259. package/dist/components/navigation/menu-item.js +181 -0
  260. package/dist/components/navigation/menu.js +126 -0
  261. package/dist/components/navigation/steps.js +183 -0
  262. package/dist/components/navigation/sub-menu.d.ts.map +1 -1
  263. package/dist/components/navigation/sub-menu.js +252 -0
  264. package/dist/components/progress/progress-bar.js +97 -0
  265. package/dist/components/progress/progress-ring.js +111 -0
  266. package/dist/components/progress/skeleton.js +108 -0
  267. package/dist/components/progress/spinner.js +129 -0
  268. package/dist/components/theme/locale-switch.js +241 -0
  269. package/dist/components/theme/shadow-picker.js +233 -0
  270. package/dist/components/theme/shape-picker.js +232 -0
  271. package/dist/components/theme/theme-picker.js +236 -0
  272. package/dist/components/theme/theme-preview.d.ts +1 -2
  273. package/dist/components/theme/theme-preview.d.ts.map +1 -1
  274. package/dist/components/theme/theme-preview.js +376 -0
  275. package/dist/components/theme/theme-switch.d.ts.map +1 -1
  276. package/dist/components/theme/theme-switch.js +318 -0
  277. package/dist/components/theme/typo-picker.js +219 -0
  278. package/dist/core/AGENTS.md +6 -1
  279. package/dist/core/aithe-element.d.ts +2 -2
  280. package/dist/core/aithe-element.js +135 -0
  281. package/dist/core/aithe-widget.js +30 -0
  282. package/dist/core/anchored-overlay.d.ts +3 -0
  283. package/dist/core/anchored-overlay.d.ts.map +1 -1
  284. package/dist/core/anchored-overlay.js +111 -0
  285. package/dist/core/autoform/autoform.js +79 -0
  286. package/dist/core/autoform/autoview.d.ts +86 -0
  287. package/dist/core/autoform/autoview.d.ts.map +1 -0
  288. package/dist/core/autoform/autoview.js +37 -0
  289. package/dist/core/autoform/condition.js +170 -0
  290. package/dist/core/autoform/index.d.ts +2 -0
  291. package/dist/core/autoform/index.d.ts.map +1 -1
  292. package/dist/core/autoform/index.js +9 -0
  293. package/dist/core/autoform/types.js +7 -0
  294. package/dist/core/datahub/__tests__/force-options.test.d.ts +8 -0
  295. package/dist/core/datahub/__tests__/force-options.test.d.ts.map +1 -0
  296. package/dist/core/datahub/__tests__/force-options.test.js +161 -0
  297. package/dist/core/datahub/config/strategy.d.ts +1 -1
  298. package/dist/core/datahub/config/strategy.d.ts.map +1 -1
  299. package/dist/core/datahub/config/strategy.js +50 -0
  300. package/dist/core/datahub/core/adapter/fetch-adapter.d.ts +1 -1
  301. package/dist/core/datahub/core/adapter/fetch-adapter.d.ts.map +1 -1
  302. package/dist/core/datahub/core/adapter/fetch-adapter.js +118 -0
  303. package/dist/core/datahub/core/adapter/index.js +7 -0
  304. package/dist/core/datahub/core/adapter/mock-adapter.d.ts +1 -1
  305. package/dist/core/datahub/core/adapter/mock-adapter.d.ts.map +1 -1
  306. package/dist/core/datahub/core/adapter/mock-adapter.js +58 -0
  307. package/dist/core/datahub/core/api-styles.d.ts +1 -1
  308. package/dist/core/datahub/core/api-styles.d.ts.map +1 -1
  309. package/dist/core/datahub/core/api-styles.js +136 -0
  310. package/dist/core/datahub/core/datahub-core.d.ts +53 -3
  311. package/dist/core/datahub/core/datahub-core.d.ts.map +1 -1
  312. package/dist/core/datahub/core/datahub-core.js +520 -0
  313. package/dist/core/datahub/core/index.js +7 -0
  314. package/dist/core/datahub/index.js +50 -0
  315. package/dist/core/datahub/types.d.ts +24 -0
  316. package/dist/core/datahub/types.d.ts.map +1 -1
  317. package/dist/core/datahub/types.js +31 -0
  318. package/dist/core/datahub/utils/cache.js +55 -0
  319. package/dist/core/datahub/utils/common.js +23 -0
  320. package/dist/core/datahub/utils/dedup.d.ts +1 -1
  321. package/dist/core/datahub/utils/dedup.d.ts.map +1 -1
  322. package/dist/core/datahub/utils/dedup.js +52 -0
  323. package/dist/core/datahub/utils/idempotent.js +61 -0
  324. package/dist/core/datahub/utils/is-query.js +53 -0
  325. package/dist/core/datahub/utils/loading.js +78 -0
  326. package/dist/core/filter/__tests__/index.test.d.ts +2 -0
  327. package/dist/core/filter/__tests__/index.test.d.ts.map +1 -0
  328. package/dist/core/filter/__tests__/index.test.js +230 -0
  329. package/dist/core/filter/builtins.d.ts +60 -0
  330. package/dist/core/filter/builtins.d.ts.map +1 -0
  331. package/dist/core/filter/builtins.js +172 -0
  332. package/dist/core/filter/factory.d.ts +54 -0
  333. package/dist/core/filter/factory.d.ts.map +1 -0
  334. package/dist/core/filter/factory.js +96 -0
  335. package/dist/core/filter/index.d.ts +11 -0
  336. package/dist/core/filter/index.d.ts.map +1 -0
  337. package/dist/core/filter/index.js +9 -0
  338. package/dist/core/filter/types.d.ts +12 -0
  339. package/dist/core/filter/types.d.ts.map +1 -0
  340. package/dist/core/filter/types.js +1 -0
  341. package/dist/core/floating.js +132 -0
  342. package/dist/core/highlight/index.js +43 -0
  343. package/dist/core/highlight/lang-bash.js +27 -0
  344. package/dist/core/highlight/lang-c.js +27 -0
  345. package/dist/core/highlight/lang-cmake.js +27 -0
  346. package/dist/core/highlight/lang-cpp.js +27 -0
  347. package/dist/core/highlight/lang-css.js +24 -0
  348. package/dist/core/highlight/lang-dart.js +27 -0
  349. package/dist/core/highlight/lang-dockerfile.js +16 -0
  350. package/dist/core/highlight/lang-fsharp.js +23 -0
  351. package/dist/core/highlight/lang-go.js +22 -0
  352. package/dist/core/highlight/lang-html.js +12 -0
  353. package/dist/core/highlight/lang-java.js +22 -0
  354. package/dist/core/highlight/lang-javascript.js +26 -0
  355. package/dist/core/highlight/lang-json.js +13 -0
  356. package/dist/core/highlight/lang-jsonline.js +13 -0
  357. package/dist/core/highlight/lang-jsx.js +30 -0
  358. package/dist/core/highlight/lang-kotlin.js +27 -0
  359. package/dist/core/highlight/lang-latex.js +22 -0
  360. package/dist/core/highlight/lang-lua.js +26 -0
  361. package/dist/core/highlight/lang-makefile.js +22 -0
  362. package/dist/core/highlight/lang-markdown.js +18 -0
  363. package/dist/core/highlight/lang-objectivec.js +24 -0
  364. package/dist/core/highlight/lang-perl.js +30 -0
  365. package/dist/core/highlight/lang-powershell.js +23 -0
  366. package/dist/core/highlight/lang-python.js +27 -0
  367. package/dist/core/highlight/lang-r.js +21 -0
  368. package/dist/core/highlight/lang-ruby.js +29 -0
  369. package/dist/core/highlight/lang-rust.js +24 -0
  370. package/dist/core/highlight/lang-scala.js +26 -0
  371. package/dist/core/highlight/lang-sql.js +21 -0
  372. package/dist/core/highlight/lang-svelte.js +27 -0
  373. package/dist/core/highlight/lang-swift.js +28 -0
  374. package/dist/core/highlight/lang-tsx.js +35 -0
  375. package/dist/core/highlight/lang-typescript.js +31 -0
  376. package/dist/core/highlight/lang-vue.js +29 -0
  377. package/dist/core/highlight/lang-wasm.js +22 -0
  378. package/dist/core/highlight/lang-xml.js +12 -0
  379. package/dist/core/highlight/lang-yaml.js +14 -0
  380. package/dist/core/highlight/registry.js +99 -0
  381. package/dist/core/logger/LoggerCore.js +626 -0
  382. package/dist/core/logger/index.js +10 -0
  383. package/dist/core/logger/types.js +29 -0
  384. package/dist/core/markdown/index.js +20 -0
  385. package/dist/core/markdown/parser.d.ts +2 -0
  386. package/dist/core/markdown/parser.d.ts.map +1 -1
  387. package/dist/core/markdown/parser.js +376 -0
  388. package/dist/core/markdown/plugins.d.ts +2 -1
  389. package/dist/core/markdown/plugins.d.ts.map +1 -1
  390. package/dist/core/markdown/plugins.js +755 -0
  391. package/dist/core/markdown/types.d.ts +5 -0
  392. package/dist/core/markdown/types.d.ts.map +1 -1
  393. package/dist/core/markdown/types.js +7 -0
  394. package/dist/core/router/index.js +244 -0
  395. package/dist/core/styles.js +44 -0
  396. package/dist/core/types.d.ts +52 -3
  397. package/dist/core/types.d.ts.map +1 -1
  398. package/dist/core/types.js +1 -0
  399. package/dist/index.d.ts +9 -0
  400. package/dist/index.d.ts.map +1 -1
  401. package/dist/index.js +3695 -1622
  402. package/dist/index.js.map +1 -1
  403. package/dist/index.umd.js +1844 -758
  404. package/dist/index.umd.js.map +1 -1
  405. package/dist/styles/aithe-ui.d.ts +23 -0
  406. package/dist/styles/aithe-ui.d.ts.map +1 -1
  407. package/dist/styles/aithe-ui.js +185 -0
  408. package/dist/styles/global.css.d.ts +1 -1
  409. package/dist/styles/global.css.d.ts.map +1 -1
  410. package/dist/styles/global.css.js +119 -0
  411. package/dist/styles/i18n/index.js +206 -0
  412. package/dist/styles/i18n/locales/de-DE.d.ts.map +1 -1
  413. package/dist/styles/i18n/locales/de-DE.js +151 -0
  414. package/dist/styles/i18n/locales/en-US.d.ts.map +1 -1
  415. package/dist/styles/i18n/locales/en-US.js +160 -0
  416. package/dist/styles/i18n/locales/es-ES.d.ts.map +1 -1
  417. package/dist/styles/i18n/locales/es-ES.js +151 -0
  418. package/dist/styles/i18n/locales/fr-FR.d.ts.map +1 -1
  419. package/dist/styles/i18n/locales/fr-FR.js +151 -0
  420. package/dist/styles/i18n/locales/index.js +14 -0
  421. package/dist/styles/i18n/locales/ja-JP.d.ts.map +1 -1
  422. package/dist/styles/i18n/locales/ja-JP.js +151 -0
  423. package/dist/styles/i18n/locales/ko-KR.d.ts.map +1 -1
  424. package/dist/styles/i18n/locales/ko-KR.js +151 -0
  425. package/dist/styles/i18n/locales/pt-BR.d.ts.map +1 -1
  426. package/dist/styles/i18n/locales/pt-BR.js +151 -0
  427. package/dist/styles/i18n/locales/zh-CN.d.ts.map +1 -1
  428. package/dist/styles/i18n/locales/zh-CN.js +160 -0
  429. package/dist/styles/i18n/locales/zh-HK.d.ts.map +1 -1
  430. package/dist/styles/i18n/locales/zh-HK.js +151 -0
  431. package/dist/styles/i18n/locales/zh-TW.d.ts.map +1 -1
  432. package/dist/styles/i18n/locales/zh-TW.js +151 -0
  433. package/dist/styles/layout/index.js +88 -0
  434. package/dist/styles/mixins.js +43 -0
  435. package/dist/styles/shadow/cyber.js +19 -0
  436. package/dist/styles/shadow/deep.js +19 -0
  437. package/dist/styles/shadow/diffuse.js +19 -0
  438. package/dist/styles/shadow/flat.js +19 -0
  439. package/dist/styles/shadow/glassmorphism.js +19 -0
  440. package/dist/styles/shadow/index.js +129 -0
  441. package/dist/styles/shadow/neumorphism.js +21 -0
  442. package/dist/styles/shadow/retro.js +19 -0
  443. package/dist/styles/shadow/sharp-business.js +19 -0
  444. package/dist/styles/shadow/skeuomorphic.js +21 -0
  445. package/dist/styles/shape/chamfer.js +19 -0
  446. package/dist/styles/shape/circle.js +19 -0
  447. package/dist/styles/shape/index.js +174 -0
  448. package/dist/styles/shape/organic.js +19 -0
  449. package/dist/styles/shape/pill.js +19 -0
  450. package/dist/styles/shape/rounded.js +21 -0
  451. package/dist/styles/shape/rounder.js +19 -0
  452. package/dist/styles/shape/sharp.js +19 -0
  453. package/dist/styles/shape/smooth.js +19 -0
  454. package/dist/styles/theme/aliyun.d.ts +1 -1
  455. package/dist/styles/theme/aliyun.d.ts.map +1 -1
  456. package/dist/styles/theme/aliyun.js +102 -0
  457. package/dist/styles/theme/amber.d.ts +1 -1
  458. package/dist/styles/theme/amber.d.ts.map +1 -1
  459. package/dist/styles/theme/amber.js +101 -0
  460. package/dist/styles/theme/blue.d.ts +1 -1
  461. package/dist/styles/theme/blue.d.ts.map +1 -1
  462. package/dist/styles/theme/blue.js +101 -0
  463. package/dist/styles/theme/charcoal.d.ts +1 -1
  464. package/dist/styles/theme/charcoal.d.ts.map +1 -1
  465. package/dist/styles/theme/charcoal.js +106 -0
  466. package/dist/styles/theme/cyan.d.ts +1 -1
  467. package/dist/styles/theme/cyan.d.ts.map +1 -1
  468. package/dist/styles/theme/cyan.js +96 -0
  469. package/dist/styles/theme/dark.d.ts +1 -1
  470. package/dist/styles/theme/dark.d.ts.map +1 -1
  471. package/dist/styles/theme/dark.js +106 -0
  472. package/dist/styles/theme/ebony.d.ts +1 -1
  473. package/dist/styles/theme/ebony.d.ts.map +1 -1
  474. package/dist/styles/theme/ebony.js +106 -0
  475. package/dist/styles/theme/festive.d.ts +1 -1
  476. package/dist/styles/theme/festive.d.ts.map +1 -1
  477. package/dist/styles/theme/festive.js +101 -0
  478. package/dist/styles/theme/graphite.d.ts +1 -1
  479. package/dist/styles/theme/graphite.d.ts.map +1 -1
  480. package/dist/styles/theme/graphite.js +106 -0
  481. package/dist/styles/theme/gray.d.ts +1 -1
  482. package/dist/styles/theme/gray.d.ts.map +1 -1
  483. package/dist/styles/theme/gray.js +101 -0
  484. package/dist/styles/theme/huawei.d.ts +1 -1
  485. package/dist/styles/theme/huawei.d.ts.map +1 -1
  486. package/dist/styles/theme/huawei.js +102 -0
  487. package/dist/styles/theme/index.d.ts +1 -1
  488. package/dist/styles/theme/index.d.ts.map +1 -1
  489. package/dist/styles/theme/index.js +276 -0
  490. package/dist/styles/theme/indigo.d.ts +1 -1
  491. package/dist/styles/theme/indigo.d.ts.map +1 -1
  492. package/dist/styles/theme/indigo.js +101 -0
  493. package/dist/styles/theme/ink.d.ts +1 -1
  494. package/dist/styles/theme/ink.d.ts.map +1 -1
  495. package/dist/styles/theme/ink.js +106 -0
  496. package/dist/styles/theme/light.d.ts +1 -1
  497. package/dist/styles/theme/light.d.ts.map +1 -1
  498. package/dist/styles/theme/light.js +102 -0
  499. package/dist/styles/theme/midnight.d.ts +1 -1
  500. package/dist/styles/theme/midnight.d.ts.map +1 -1
  501. package/dist/styles/theme/midnight.js +106 -0
  502. package/dist/styles/theme/navy.d.ts +1 -1
  503. package/dist/styles/theme/navy.d.ts.map +1 -1
  504. package/dist/styles/theme/navy.js +106 -0
  505. package/dist/styles/theme/obsidian.d.ts +1 -1
  506. package/dist/styles/theme/obsidian.d.ts.map +1 -1
  507. package/dist/styles/theme/obsidian.js +106 -0
  508. package/dist/styles/theme/onyx.d.ts +1 -1
  509. package/dist/styles/theme/onyx.d.ts.map +1 -1
  510. package/dist/styles/theme/onyx.js +106 -0
  511. package/dist/styles/theme/orange.d.ts +1 -1
  512. package/dist/styles/theme/orange.d.ts.map +1 -1
  513. package/dist/styles/theme/orange.js +101 -0
  514. package/dist/styles/theme/pink.d.ts +1 -1
  515. package/dist/styles/theme/pink.d.ts.map +1 -1
  516. package/dist/styles/theme/pink.js +101 -0
  517. package/dist/styles/theme/purple.d.ts +1 -1
  518. package/dist/styles/theme/purple.d.ts.map +1 -1
  519. package/dist/styles/theme/purple.js +101 -0
  520. package/dist/styles/theme/raisin.d.ts +1 -1
  521. package/dist/styles/theme/raisin.d.ts.map +1 -1
  522. package/dist/styles/theme/raisin.js +106 -0
  523. package/dist/styles/theme/slate.d.ts +1 -1
  524. package/dist/styles/theme/slate.d.ts.map +1 -1
  525. package/dist/styles/theme/slate.js +106 -0
  526. package/dist/styles/theme/teal.d.ts +1 -1
  527. package/dist/styles/theme/teal.d.ts.map +1 -1
  528. package/dist/styles/theme/teal.js +101 -0
  529. package/dist/styles/theme/tianyi.d.ts +1 -1
  530. package/dist/styles/theme/tianyi.d.ts.map +1 -1
  531. package/dist/styles/theme/tianyi.js +102 -0
  532. package/dist/styles/types.js +1 -0
  533. package/dist/styles/typo/business.js +34 -0
  534. package/dist/styles/typo/compact.js +34 -0
  535. package/dist/styles/typo/index.js +99 -0
  536. package/dist/styles/typo/luxury.js +34 -0
  537. package/dist/styles/typo/minimal.js +34 -0
  538. package/dist/types/index.js +2 -0
  539. package/dist/utils/dom.js +51 -0
  540. package/dist/utils/events.js +32 -0
  541. package/dist/utils/icon.js +176 -0
  542. package/dist/utils/index.js +4 -0
  543. package/dist/utils/utils.d.ts +5 -5
  544. package/dist/utils/utils.js +89 -0
  545. package/dist/utils/validation.js +52 -0
  546. package/docs/api/basic/button.md +9 -6
  547. package/docs/api/basic/tag.md +24 -17
  548. package/docs/api/data/box-table.md +73 -0
  549. package/docs/api/data/dropdown.md +3 -2
  550. package/docs/api/data/metrics.md +2 -0
  551. package/docs/api/data/table-column.md +37 -23
  552. package/docs/api/data/table.md +158 -44
  553. package/docs/api/data/tabs.md +46 -1
  554. package/docs/api/data/tree-menu.md +55 -2
  555. package/docs/api/display/autoview.md +277 -0
  556. package/docs/api/display/box.md +66 -0
  557. package/docs/api/display/brief-box.md +73 -0
  558. package/docs/api/display/desc-item.md +57 -0
  559. package/docs/api/display/desc.md +246 -0
  560. package/docs/api/display/detail-box.md +75 -0
  561. package/docs/api/display/mini-box.md +100 -0
  562. package/docs/api/display/profile.md +92 -0
  563. package/docs/api/feedback/popover.md +10 -10
  564. package/docs/api/feedback/tooltip.md +14 -14
  565. package/docs/api/form/autoform-item.md +115 -0
  566. package/docs/api/form/autoform.md +7 -3
  567. package/docs/api/form/combobox.md +27 -7
  568. package/docs/api/form/select.md +50 -28
  569. package/docs/api/framework/log-panel.md +46 -0
  570. package/docs/api/framework/sidebar.md +3 -2
  571. package/docs/api/summary.md +46 -35
  572. package/docs/api/theme/theme-switch.md +1 -1
  573. package/docs/autoform.md +14 -33
  574. package/docs/changelog/CHANGELOG.md +155 -0
  575. package/docs/changelog/VERSION_26.3.1.md +966 -0
  576. package/docs/changelog/VERSION_26.3.2.md +852 -0
  577. package/docs/datahub.md +4 -1
  578. package/docs/filter.md +332 -0
  579. package/docs/framework-integration.md +2 -2
  580. package/docs/guide.md +72 -6
  581. package/docs/i18n.md +2 -4
  582. package/docs/issue/26.3.1/issue_26.3.1.0.md +84 -0
  583. package/docs/issue/26.3.1/issue_26.3.1.1.md +72 -0
  584. package/docs/issue/26.3.1/issue_26.3.1.2.md +75 -0
  585. package/docs/issue/26.3.1/issue_26.3.1.3.md +78 -0
  586. package/docs/issue/26.3.1/issue_26.3.1.4.md +113 -0
  587. package/docs/issue/26.3.1/issue_26.3.1.5.md +142 -0
  588. package/docs/issue/26.3.1/issue_26.3.1.6.md +100 -0
  589. package/docs/issue/26.3.1/issue_26.3.1.7.md +78 -0
  590. package/docs/issue/26.3.2/issue_26.3.2.1.md +46 -0
  591. package/docs/issue/26.3.2/issue_26.3.2.2.md +82 -0
  592. package/docs/issue/26.3.2/issue_26.3.2.3.md +57 -0
  593. package/docs/issue/26.3.2/issue_26.3.2.4.md +43 -0
  594. package/docs/issue/AGENTS.md +24 -3
  595. package/docs/markdown.md +2 -2
  596. package/docs/quickstart.md +5 -5
  597. package/docs/theming.md +5 -4
  598. package/package.json +5 -2
  599. package/dist/components/navigation/dropdown.d.ts +0 -56
  600. package/dist/components/navigation/dropdown.d.ts.map +0 -1
  601. /package/docs/issue/{issue_26.2.2.1.md → 26.2.2/issue_26.2.2.1.md} +0 -0
  602. /package/docs/issue/{issue_26.2.2.2.md → 26.2.2/issue_26.2.2.2.md} +0 -0
  603. /package/docs/issue/{issue_26.2.2.3.md → 26.2.2/issue_26.2.2.3.md} +0 -0
  604. /package/docs/issue/{issue_26.2.2.4.md → 26.2.2/issue_26.2.2.4.md} +0 -0
  605. /package/docs/issue/{issue_26.2.3.1.md → 26.2.3/issue_26.2.3.1.md} +0 -0
  606. /package/docs/issue/{issue_26.2.3.10.md → 26.2.3/issue_26.2.3.10.md} +0 -0
  607. /package/docs/issue/{issue_26.2.3.11.md → 26.2.3/issue_26.2.3.11.md} +0 -0
  608. /package/docs/issue/{issue_26.2.3.12.md → 26.2.3/issue_26.2.3.12.md} +0 -0
  609. /package/docs/issue/{issue_26.2.3.13.md → 26.2.3/issue_26.2.3.13.md} +0 -0
  610. /package/docs/issue/{issue_26.2.3.14.md → 26.2.3/issue_26.2.3.14.md} +0 -0
  611. /package/docs/issue/{issue_26.2.3.15.md → 26.2.3/issue_26.2.3.15.md} +0 -0
  612. /package/docs/issue/{issue_26.2.3.16.md → 26.2.3/issue_26.2.3.16.md} +0 -0
  613. /package/docs/issue/{issue_26.2.3.2.md → 26.2.3/issue_26.2.3.2.md} +0 -0
  614. /package/docs/issue/{issue_26.2.3.3.md → 26.2.3/issue_26.2.3.3.md} +0 -0
  615. /package/docs/issue/{issue_26.2.3.4.md → 26.2.3/issue_26.2.3.4.md} +0 -0
  616. /package/docs/issue/{issue_26.2.3.5.md → 26.2.3/issue_26.2.3.5.md} +0 -0
  617. /package/docs/issue/{issue_26.2.3.6.md → 26.2.3/issue_26.2.3.6.md} +0 -0
  618. /package/docs/issue/{issue_26.2.3.7.md → 26.2.3/issue_26.2.3.7.md} +0 -0
  619. /package/docs/issue/{issue_26.2.3.8.md → 26.2.3/issue_26.2.3.8.md} +0 -0
  620. /package/docs/issue/{issue_26.2.3.9.md → 26.2.3/issue_26.2.3.9.md} +0 -0
package/docs/datahub.md CHANGED
@@ -664,8 +664,11 @@ interface DataHubRequestOptions {
664
664
  skipCache?: boolean;
665
665
  skipDedup?: boolean;
666
666
  skipIdempotent?: boolean;
667
+ forceDedup?: boolean; // 强制启用去重,无视 URL 命名约定
668
+ forceCache?: boolean; // 强制启用缓存,无视 URL 命名约定
667
669
  mock?: boolean;
668
670
  mockData?: unknown;
671
+ mockPath?: string; // Mock JSON 文件路径,加载本地 mock 数据文件
669
672
  mockDelay?: number; // 默认 300
670
673
  traceId?: string;
671
674
  adapter?: string;
@@ -827,6 +830,6 @@ export async function getDashboardStats(options?: DataHubRequestOptions) {
827
830
  ## 下一步
828
831
 
829
832
  - [使用指南](guide.md) — 组件通用 API、事件、插槽
830
- - [主题系统](theming.md) — 22 种内置主题、自定义主题
833
+ - [主题系统](theming.md) — 25 种内置主题、自定义主题
831
834
  - [国际化](i18n.md) — 多语言支持、自定义翻译
832
835
  - [API 参考](api/summary.md) — 全部组件详细 API
package/docs/filter.md ADDED
@@ -0,0 +1,332 @@
1
+ # Filter 数据格式化 / Data Formatting with Filters
2
+
3
+ > Aithe UI 内置轻量 Filter 数据格式化框架,支持声明式过滤器表达式,零第三方依赖。
4
+ > Aithe UI provides a lightweight filter-based data formatting framework with declarative filter expressions and zero third-party dependencies.
5
+
6
+ ---
7
+
8
+ ## 概述 / Overview
9
+
10
+ Filter 模块提供了一套统一的**数据格式化方案**,通过声明式的过滤器表达式对数据进行格式化处理。核心特性:
11
+
12
+ - **声明式表达式**:如 `"amount"`、`"date yyyy/MM/dd"`、`"date yyyy/MM/dd | empty"`
13
+ - **链式处理**:多个过滤器通过 `|` 串联,前一个输出作为后一个输入
14
+ - **内置过滤器**:金额、日期、空值替换、字节数、时间友好显示
15
+ - **可扩展**:通过 `FilterFactory.register()` 注册自定义过滤器
16
+ - **组件集成**:`<aithe-metrics>` 和 `<aithe-table-column>` 原生支持 `filter` 属性
17
+
18
+ ---
19
+
20
+ ## 快速开始 / Quick Start
21
+
22
+ ```ts
23
+ import { filterFactory } from '@aithe/aithe-ui';
24
+
25
+ // 单个过滤器
26
+ filterFactory.format(123.456, 'amount'); // "123.46"
27
+
28
+ // 带参数的过滤器
29
+ filterFactory.format('2024-01-15', 'date yyyy/MM/dd'); // "2024/01/15"
30
+
31
+ // 链式过滤
32
+ filterFactory.format('2024-01-15', 'date yyyy/MM/dd | empty'); // "2024/01/15"
33
+ filterFactory.format(null, 'date yyyy/MM/dd | empty'); // "--"
34
+ ```
35
+
36
+ ---
37
+
38
+ ## 内置过滤器 / Built-in Filters
39
+
40
+ ### amount — 金额格式化
41
+
42
+ 保留两位小数,非数字返回 `--`。
43
+
44
+ | 输入 | 输出 |
45
+ |------|------|
46
+ | `123.4` | `123.40` |
47
+ | `"100"` | `100.00` |
48
+ | `null` | `--` |
49
+ | `"abc"` | `--` |
50
+
51
+ ```ts
52
+ filterFactory.format(123.4, 'amount'); // "123.40"
53
+ ```
54
+
55
+ ### date — 日期格式化
56
+
57
+ 支持 `Date` 对象、时间戳(毫秒)、日期字符串。默认格式 `yyyy-MM-dd HH:mm:ss`,支持自定义格式。
58
+
59
+ | 参数 | 说明 | 默认值 |
60
+ |------|------|--------|
61
+ | `format` | 日期格式字符串 | `yyyy-MM-dd HH:mm:ss` |
62
+
63
+ **格式占位符**:
64
+
65
+ | 占位符 | 含义 | 示例 |
66
+ |--------|------|------|
67
+ | `yyyy` | 四位年份 | 2024 |
68
+ | `MM` | 两位月份 | 01 |
69
+ | `dd` | 两位日期 | 15 |
70
+ | `HH` | 两位小时 | 09 |
71
+ | `mm` | 两位分钟 | 05 |
72
+ | `ss` | 两位秒数 | 30 |
73
+
74
+ ```ts
75
+ filterFactory.format(new Date('2024-01-15'), 'date'); // "2024-01-15 08:00:00"
76
+ filterFactory.format('2024-01-15', 'date yyyy/MM/dd'); // "2024/01/15"
77
+ filterFactory.format(1705305600000, 'date yyyy-MM-dd'); // "2024-01-15"
78
+ filterFactory.format(null, 'date yyyy/MM/dd'); // "--"
79
+ ```
80
+
81
+ ### empty — 空值替换
82
+
83
+ 将 `null`、`undefined`、空字符串、`NaN` 替换为指定文本。
84
+
85
+ | 参数 | 说明 | 默认值 |
86
+ |------|------|--------|
87
+ | `placeholder` | 替换文本 | `--` |
88
+
89
+ ```ts
90
+ filterFactory.format(null, 'empty'); // "--"
91
+ filterFactory.format(undefined, 'empty'); // "--"
92
+ filterFactory.format('', 'empty'); // "--"
93
+ filterFactory.format('hello', 'empty'); // "hello"
94
+ filterFactory.format(null, 'empty N/A'); // "N/A"
95
+ ```
96
+
97
+ ### bytes — 字节数格式化
98
+
99
+ 将字节数转换为可读的大小字符串,支持 IEC(1024 进制)和 SI(1000 进制)两种标准。
100
+
101
+ | 参数 | 说明 | 默认值 |
102
+ |------|------|--------|
103
+ | `base` | 进制标准:`1024`(IEC)或 `1000`(SI) | `1024` |
104
+
105
+ **IEC 标准(默认)**:
106
+
107
+ | 输入 | 输出 |
108
+ |------|------|
109
+ | `500` | `500 B` |
110
+ | `1024` | `1.00 KiB` |
111
+ | `1536` | `1.50 KiB` |
112
+ | `1048576` | `1.00 MiB` |
113
+ | `1073741824` | `1.00 GiB` |
114
+
115
+ **SI 标准**:
116
+
117
+ | 输入 | 输出 |
118
+ |------|------|
119
+ | `1000` | `1.00 KB` |
120
+ | `1000000` | `1.00 MB` |
121
+
122
+ ```ts
123
+ filterFactory.format(1024, 'bytes'); // "1.00 KiB"
124
+ filterFactory.format(1000, 'bytes 1000'); // "1.00 KB"
125
+ filterFactory.format(1536, 'bytes'); // "1.50 KiB"
126
+ filterFactory.format(1048576, 'bytes 1024'); // "1.00 MiB"
127
+ ```
128
+
129
+ ### timeAgo — 时间友好显示
130
+
131
+ 根据输入时间与当前时间的差值,按规则输出友好文案。超过 1 年显示 `yyyy-MM-dd` 格式日期。
132
+
133
+ | 时间差 | 输出示例 |
134
+ |--------|----------|
135
+ | < 1 分钟 | `just now` |
136
+ | < 1 小时 | `5 minutes ago` / `in 5 minutes` |
137
+ | < 1 天 | `3 hours ago` / `in 3 hours` |
138
+ | < 1 月 | `2 days ago` / `in 2 days` |
139
+ | < 1 年 | `1 month ago` / `in 1 month` |
140
+ | >= 1 年 | `2025-03-15` |
141
+
142
+ > 文案通过国际化系统 `t()` 实现,支持 `zh-CN` / `en-US` 切换。
143
+
144
+ ```ts
145
+ filterFactory.format(Date.now() - 300000, 'timeAgo'); // "5 minutes ago"
146
+ filterFactory.format(Date.now() + 600000, 'timeAgo'); // "in 10 minutes"
147
+ filterFactory.format('2025-03-15', 'timeAgo'); // "2025-03-15"
148
+ ```
149
+
150
+ ---
151
+
152
+ ## 过滤器表达式语法 / Filter Expression Syntax
153
+
154
+ 过滤器表达式支持以下格式:
155
+
156
+ | 格式 | 说明 | 示例 |
157
+ |------|------|------|
158
+ | `name` | 仅过滤器名 | `"amount"` |
159
+ | `name arg1 arg2` | 过滤器名 + 参数 | `"date yyyy/MM/dd"` |
160
+ | `name1 \| name2` | 链式过滤 | `"date yyyy/MM/dd \| empty"` |
161
+
162
+ ### 链式过滤规则
163
+
164
+ 多个过滤器通过 `|` 分隔,从左到右依次执行,前一个过滤器的输出作为后一个过滤器的输入。
165
+
166
+ ```ts
167
+ // 先格式化日期,再对空值做兜底
168
+ filterFactory.format(null, 'date yyyy/MM/dd | empty'); // "--"
169
+ filterFactory.format('2024-01-15', 'date yyyy/MM/dd | empty'); // "2024/01/15"
170
+ ```
171
+
172
+ ---
173
+
174
+ ## 在组件中使用 / Usage in Components
175
+
176
+ ### `<aithe-metrics>`
177
+
178
+ 通过 `filter` 属性或 `data.filter` / `params.filter` 设置过滤器表达式:
179
+
180
+ ```html
181
+ <!-- 属性模式 -->
182
+ <aithe-metrics label="Revenue" value="1234.5" filter="amount"></aithe-metrics>
183
+
184
+ <!-- 数据驱动模式 -->
185
+ <aithe-metrics data='{"label":"Revenue","value":"1234.5","filter":"amount"}'></aithe-metrics>
186
+ ```
187
+
188
+ 优先级:`data.filter` > `params.filter` > 无过滤。
189
+
190
+ ### `<aithe-table-column>`
191
+
192
+ 通过 `filter` 属性设置过滤器表达式,对列单元格值进行格式化:
193
+
194
+ ```html
195
+ <aithe-table .data=${records}>
196
+ <aithe-table-column id="price" title="Price" filter="amount"></aithe-table-column>
197
+ <aithe-table-column id="createdAt" title="Created" filter="date yyyy/MM/dd"></aithe-table-column>
198
+ <aithe-table-column id="size" title="Size" filter="bytes"></aithe-table-column>
199
+ </aithe-table>
200
+ ```
201
+
202
+ 优先级:`cellRenderer` > `filter` > 原始值。
203
+
204
+ ### 数据驱动模式(`AitheTableColumnMeta`)
205
+
206
+ ```ts
207
+ const columns = [
208
+ { id: 'price', title: 'Price', filter: 'amount' },
209
+ { id: 'createdAt', title: 'Created', filter: 'date yyyy/MM/dd' },
210
+ { id: 'size', title: 'Size', filter: 'bytes' },
211
+ ];
212
+ ```
213
+
214
+ ---
215
+
216
+ ## 编程式使用 / Programmatic Usage
217
+
218
+ ### 直接格式化
219
+
220
+ ```ts
221
+ import { filterFactory } from '@aithe/aithe-ui';
222
+
223
+ filterFactory.format(123.456, 'amount'); // "123.46"
224
+ filterFactory.format('2024-01-15', 'date yyyy/MM/dd'); // "2024/01/15"
225
+ filterFactory.format(1024, 'bytes'); // "1.00 KiB"
226
+ ```
227
+
228
+ ### 获取过滤器实例
229
+
230
+ ```ts
231
+ const amountFilter = filterFactory.get('amount');
232
+ amountFilter?.apply(123.456); // "123.46"
233
+ ```
234
+
235
+ ### 解析表达式
236
+
237
+ ```ts
238
+ filterFactory.parse('date yyyy/MM/dd | empty');
239
+ // [
240
+ // { name: 'date', args: ['yyyy/MM/dd'] },
241
+ // { name: 'empty', args: [] },
242
+ // ]
243
+ ```
244
+
245
+ ### 序列化表达式
246
+
247
+ ```ts
248
+ filterFactory.stringify([
249
+ { name: 'date', args: ['yyyy/MM/dd'] },
250
+ { name: 'empty', args: [] },
251
+ ]);
252
+ // "date yyyy/MM/dd | empty"
253
+ ```
254
+
255
+ ---
256
+
257
+ ## 自定义过滤器 / Custom Filters
258
+
259
+ ### 实现 Filter 接口
260
+
261
+ 所有过滤器需实现 `Filter<T, R>` 接口:
262
+
263
+ ```ts
264
+ import type { Filter } from '@aithe/aithe-ui';
265
+ import { filterFactory } from '@aithe/aithe-ui';
266
+
267
+ // 实现接口(无状态,参数通过 apply 变参传入)
268
+ class PhoneFilter implements Filter<string, string> {
269
+ apply(value: string): string {
270
+ if (value == null || value.length !== 11) return value;
271
+ return `${value.slice(0, 3)}****${value.slice(7)}`;
272
+ }
273
+ }
274
+
275
+ // 注册
276
+ filterFactory.register('phone', PhoneFilter);
277
+
278
+ // 使用
279
+ filterFactory.format('13812345678', 'phone'); // "138****5678"
280
+ ```
281
+
282
+ ### 设计约束
283
+
284
+ - **无状态**:过滤器实例不持有状态,所有参数通过 `apply(value, ...args)` 传入
285
+ - **单例复用**:注册时实例化一次并缓存,后续复用同一实例
286
+ - **参数传递**:表达式中的参数通过 `apply` 的变参传入
287
+
288
+ ---
289
+
290
+ ## 类型定义 / Type Definitions
291
+
292
+ ```ts
293
+ /** 过滤器接口 */
294
+ interface Filter<T = unknown, R = unknown> {
295
+ apply(value: T, ...args: string[]): R;
296
+ }
297
+
298
+ /** 过滤器表达式解析结果 */
299
+ interface FilterExpression {
300
+ name: string;
301
+ args: string[];
302
+ }
303
+
304
+ /** 过滤器链配置 */
305
+ type FilterConfig = string | FilterExpression;
306
+ ```
307
+
308
+ ---
309
+
310
+ ## API 参考 / API Reference
311
+
312
+ ### FilterFactory
313
+
314
+ | 方法 | 签名 | 说明 |
315
+ |------|------|------|
316
+ | `register` | `(name: string, ctor: new () => Filter): void` | 注册过滤器 |
317
+ | `get` | `(name: string): Filter \| null` | 获取过滤器实例 |
318
+ | `has` | `(name: string): boolean` | 检查过滤器是否已注册 |
319
+ | `names` | `(): string[]` | 获取所有已注册的过滤器名称 |
320
+ | `format` | `(value: T, config: FilterConfig): unknown` | 使用表达式直接格式化值 |
321
+ | `parse` | `(config: FilterConfig): FilterExpression[]` | 解析过滤器表达式 |
322
+ | `stringify` | `(expressions: FilterExpression[]): string` | 序列化表达式列表 |
323
+
324
+ ### 内置过滤器
325
+
326
+ | 注册名 | 类 | 说明 |
327
+ |--------|-----|------|
328
+ | `amount` | `AmountFilter` | 金额保留两位小数 |
329
+ | `date` | `DateFilter` | 日期格式化 |
330
+ | `empty` | `EmptyFilter` | 空值替换 |
331
+ | `bytes` | `BytesFilter` | 字节数格式化 |
332
+ | `timeAgo` | `TimeAgoFilter` | 时间友好显示 |
@@ -565,6 +565,6 @@ if (typeof globalThis !== 'undefined') {
565
565
 
566
566
  - [快速上手](quickstart.md) — 安装和基本使用
567
567
  - [使用指南](guide.md) — 组件通用 API
568
- - [主题系统](theming.md) — 22 种内置主题
568
+ - [主题系统](theming.md) — 25 种内置主题
569
569
  - [国际化](i18n.md) — 多语言支持
570
- - [API 参考](api/summary.md) — 全部 83 个组件详细 API
570
+ - [API 参考](api/summary.md) — 全部 103 个组件详细 API
package/docs/guide.md CHANGED
@@ -66,6 +66,7 @@ element.addEventListener('aithe-change', (e) => {
66
66
  | `aithe-confirm` | 确认操作时 | — |
67
67
  | `aithe-cancel` | 取消操作时 | — |
68
68
  | `aithe-open-change` | 展开/收起时 | `{ open: boolean }` |
69
+ | `aithe-dropdown-change` | 下拉开关状态变更时 | `{ open: boolean }` |
69
70
  | `aithe-clear` | 清除时 | — |
70
71
  | `aithe-theme-change` | 主题变更时 | `{ theme: string }` |
71
72
  | `aithe-shape-change` | 形状风格变更时 | `{ shape: string }` |
@@ -170,7 +171,7 @@ select.addEventListener('aithe-change', (e) => {
170
171
  <aithe-select .options=${myOptions}></aithe-select>
171
172
 
172
173
  <!-- 原生 JS -->
173
- <select.options = myOptions;
174
+ select.options = myOptions;
174
175
  ```
175
176
 
176
177
  ### JSON 字符串属性
@@ -294,8 +295,6 @@ const msg: string = 'Hello';
294
295
  ```
295
296
  ````
296
297
 
297
- ````
298
-
299
298
  ### 使用底层解析器
300
299
 
301
300
  ```ts
@@ -316,7 +315,7 @@ parser.parse('**bold**'); // '<strong>bold</strong>'
316
315
  // 自定义 link hooks
317
316
  const parser = new FullMarkdownParser();
318
317
  parser.addLinkHook((url) => url.startsWith('/') ? url : '');
319
- ````
318
+ ```
320
319
 
321
320
  > 完整文档见 [Markdown 模块](markdown.md)。
322
321
 
@@ -399,10 +398,13 @@ interface AitheSelectOption {
399
398
  disabled?: boolean;
400
399
  description?: string;
401
400
  icon?: string;
402
- intent?: AitheVariant;
401
+ variant?: AitheVariant;
402
+ group?: string;
403
403
  }
404
404
  ```
405
405
 
406
+ `group` 字段用于选项分组显示:当 `aithe-select` 或 `aithe-combobox` 的 `options` 中任一选项携带 `group` 字段时,所有选项按 `group` 聚合,每组前置分组标题,组内选项缩进显示。未携带 `group` 字段的选项归入无标题分组;无任何 `group` 字段时回退为扁平列表渲染。
407
+
406
408
  ---
407
409
 
408
410
  ## 样式定制
@@ -1078,6 +1080,69 @@ const locale: AitheLocale = 'zh-CN';
1078
1080
 
1079
1081
  ---
1080
1082
 
1083
+ ## Filter 数据格式化
1084
+
1085
+ Aithe UI 内置轻量 Filter 数据格式化框架,支持声明式过滤器表达式,零第三方依赖。
1086
+
1087
+ ### 基本用法
1088
+
1089
+ ```ts
1090
+ import { filterFactory } from '@aithe/aithe-ui';
1091
+
1092
+ // 单个过滤器
1093
+ filterFactory.format(123.456, 'amount'); // "123.46"
1094
+
1095
+ // 带参数的过滤器
1096
+ filterFactory.format('2024-01-15', 'date yyyy/MM/dd'); // "2024/01/15"
1097
+
1098
+ // 链式过滤
1099
+ filterFactory.format(null, 'date yyyy/MM/dd | empty'); // "--"
1100
+ ```
1101
+
1102
+ ### 内置过滤器
1103
+
1104
+ | 注册名 | 说明 | 示例 |
1105
+ |--------|------|------|
1106
+ | `amount` | 金额保留两位小数 | `123.4` → `123.40` |
1107
+ | `date` | 日期格式化 | `'2024-01-15'` → `2024/01/15` |
1108
+ | `empty` | 空值替换为 `--` | `null` → `--` |
1109
+ | `bytes` | 字节数格式化 | `1024` → `1.00 KiB` |
1110
+ | `timeAgo` | 时间友好显示 | `5 minutes ago` |
1111
+
1112
+ ### 在组件中使用
1113
+
1114
+ ```html
1115
+ <!-- metrics 使用 filter -->
1116
+ <aithe-metrics label="Revenue" value="1234.5" filter="amount"></aithe-metrics>
1117
+
1118
+ <!-- table-column 使用 filter -->
1119
+ <aithe-table .data=${records}>
1120
+ <aithe-table-column id="price" title="Price" filter="amount"></aithe-table-column>
1121
+ <aithe-table-column id="createdAt" title="Created" filter="date yyyy/MM/dd"></aithe-table-column>
1122
+ </aithe-table>
1123
+ ```
1124
+
1125
+ ### 自定义过滤器
1126
+
1127
+ ```ts
1128
+ import type { Filter } from '@aithe/aithe-ui';
1129
+ import { filterFactory } from '@aithe/aithe-ui';
1130
+
1131
+ class PhoneFilter implements Filter<string, string> {
1132
+ apply(value: string): string {
1133
+ if (value == null || value.length !== 11) return value;
1134
+ return `${value.slice(0, 3)}****${value.slice(7)}`;
1135
+ }
1136
+ }
1137
+
1138
+ filterFactory.register('phone', PhoneFilter);
1139
+ filterFactory.format('13812345678', 'phone'); // "138****5678"
1140
+ ```
1141
+
1142
+ > 完整文档见 [Filter 数据格式化](filter.md)。
1143
+
1144
+ ---
1145
+
1081
1146
  ## 下一步
1082
1147
 
1083
1148
  - [主题系统](theming.md) — 25 种内置主题、8 种形状风格、9 种阴影风格、4 种排版风格、自定义主题
@@ -1085,5 +1150,6 @@ const locale: AitheLocale = 'zh-CN';
1085
1150
  - [DataHub 数据中间层](datahub.md) — 请求调度、缓存、去重、Mock
1086
1151
  - [语法高亮引擎](highlight.md) — 自研语法高亮引擎,多语言注册与自定义规则
1087
1152
  - [Markdown 模块](markdown.md) — 零依赖 Markdown 解析与渲染引擎
1153
+ - [Filter 数据格式化](filter.md) — 声明式过滤器表达式,零依赖数据格式化
1088
1154
  - [框架集成](framework-integration.md) — React / Vue / Angular / Svelte
1089
- - [API 参考](api/summary.md) — 全部 85 个组件详细 API
1155
+ - [API 参考](api/summary.md) — 全部 103 个组件详细 API
package/docs/i18n.md CHANGED
@@ -284,8 +284,6 @@ aitheUI.t('app.greeting', 'Hello, {name}!', { name: 'Alice' }); // 'Hello, Alice
284
284
  aitheUI.t('app.itemCount', '{count} items', { count: 5 }); // '5 items'
285
285
  ```
286
286
 
287
- 翻译值也兼容函数类型,函数会在无参情况下被调用:
288
-
289
287
  ---
290
288
 
291
289
  ## 持久化
@@ -329,7 +327,7 @@ aitheUI.t('app.itemCount', '{count} items', { count: 5 }); // '5 items'
329
327
 
330
328
  ## 下一步
331
329
 
332
- - [主题系统](theming.md) — 22 种内置主题
330
+ - [主题系统](theming.md) — 25 种内置主题
333
331
  - [使用指南](guide.md) — 组件通用 API
334
332
  - [框架集成](framework-integration.md) — React / Vue / Angular / Svelte
335
- - [API 参考](api/summary.md) — 全部 83 个组件详细 API
333
+ - [API 参考](api/summary.md) — 全部 103 个组件详细 API
@@ -0,0 +1,84 @@
1
+ # Issue 26.3.1.0
2
+
3
+ ## 版本信息
4
+
5
+ - **版本号**: 26.3.1.0
6
+ - **基线版本**: 26.3.1
7
+ - **类型**: Feature
8
+ - **日期**: 2026-06-15
9
+
10
+ ## 变更概述
11
+
12
+ 1. **aithe-tree-menu 伸缩功能** — 新增 `collapsible`、`collapsed`、`collapsed-width`、`expanded-width` 属性,支持侧边栏收起/展开场景;collapsed 状态下隐藏标签和箭头、按钮居中、无图标时显示首字母 fallback;子菜单无浮层效果,正常向下展开
13
+ 2. **aithe-sidebar 改用 aithe-tree-menu** — 移除自有菜单渲染逻辑(`renderItems`/`renderIcon`/`toggleExpand`/`selectItem`/`isGroupActive`/`collectKeys` 等),center 区域改用 `<aithe-tree-menu>` 组件;`handleTreeSelect` 仅更新 `this.active`,不再 re-emit(事件 `composed: true` 自动穿透 shadow DOM)
14
+ 3. **aithe-dropdown 移除 findItemById** — `handleTreeSelect` 仅关闭面板,不再 re-emit;移除 `findItemById` 递归方法;删除 `src/components/navigation/dropdown.ts` 旧文件
15
+ 4. **aithe-theme-switch 用 item.category 替代遍历** — `buildThemeMenu` 给每个子项添加 `category` 字段;`handleTreeSelect` 直接从 `item.category` 读取分类,替代遍历菜单数组
16
+ 5. **aithe-admin-layout 移除 findMenuNode** — `handleSidebarSelect` 直接使用事件中的 `item` 对象,移除 `findMenuNode` 递归方法
17
+ 6. **aithe-tree-menu 选中背景内缩** — `.item.active` 增加 `padding` 和 `margin`,选中背景不铺满
18
+ 7. **aithe-tree-menu selectItem 改为接收 AitheTreeNodeMeta** — `aithe-select` 事件 detail 从 `{ value }` 改为 `{ value, item }`
19
+ 8. **Admin 仪表盘取数修复** — `fetchStats` 增加 `AbortController` 防竞态、`disconnectedCallback` 中 abort、loading URL 匹配从 `includes` 改为 `endsWith`、双重解包防御
20
+ 9. **文档同步更新** — tree-menu.md、dropdown.md、sidebar.md、theme-switch.md 更新
21
+
22
+ ## 破坏性变更
23
+
24
+ | 变更项 | 旧值 | 新值 |
25
+ |--------|------|------|
26
+ | `aithe-tree-menu` 的 `aithe-select` 事件 detail | `{ value: string }` | `{ value: string, item: AitheTreeNodeMeta }` |
27
+ | `aithe-dropdown` 的 `aithe-select` 事件 | 组件 re-emit,detail 含 `{ item, path, id }` | 不再 re-emit,事件由 `aithe-tree-menu` 的 `composed: true` 自动穿透,detail 为 `{ value, item }` |
28
+ | `aithe-sidebar` 的 `aithe-select` 事件 | 组件 re-emit | 不再 re-emit,事件由 `aithe-tree-menu` 的 `composed: true` 自动穿透 |
29
+ | `aithe-tree-menu.selectItem` 参数 | `key: string` | `item: AitheTreeNodeMeta` |
30
+ | `src/components/navigation/dropdown.ts` | 存在(旧版 dropdown) | 删除 |
31
+
32
+ ## 变更内容
33
+
34
+ ### 新增
35
+
36
+ - **`aithe-tree-menu` 的 `collapsible` 属性** — 布尔属性,控制树菜单是否支持伸缩切换
37
+ - **`aithe-tree-menu` 的 `collapsed` 属性** — 布尔属性(reflect),控制树菜单当前是否收起
38
+ - **`aithe-tree-menu` 的 `collapsed-width` 属性** — 收起时的宽度,默认 `64px`
39
+ - **`aithe-tree-menu` 的 `expanded-width` 属性** — 展开时的宽度,默认 `260px`
40
+ - **`aithe-tree-menu` 的 `renderIcon` 方法** — 统一渲染图标逻辑,collapsed 无图标时显示首字母 fallback(`.fallback-icon` 样式)
41
+ - **`aithe-tree-menu` collapsed 样式** — `:host([collapsed])` 下隐藏 `.item-label`/`.group-toggle-text`/`.arrow`;按钮居中;子菜单 `padding-left: 0`、`position: relative`、`z-index` 溢出显示
42
+ - **`aithe-tree-menu` 选中背景内缩** — `.item.active` 增加 `padding: var(--aithe-space-1) var(--aithe-space-3)` 和 `margin: 0`
43
+ - **`aithe-tree-menu` 宽度过渡动画** — `:host` 增加 `transition: width` 动画
44
+
45
+ ### 修改
46
+
47
+ #### aithe-tree-menu 伸缩与事件改造
48
+
49
+ - **`src/components/data/tree-menu.ts`** — 新增 `collapsible`/`collapsed`/`collapsedWidth`/`expandedWidth` 四个属性;`selectItem` 参数从 `key: string` 改为 `item: AitheTreeNodeMeta`,事件 detail 从 `{ value }` 改为 `{ value, item }`;新增 `renderIcon` 方法统一图标渲染逻辑;`handleDocumentPointer` 仅 horizontal 模式点击外部关闭;`renderItems` 中 group-toggle 和 leaf item 均改用 `renderIcon`;leaf item 标签包裹 `<span class="item-label">`;group-toggle 文本包裹 `<span class="group-toggle-text">`;collapsed 时按钮增加 `title` 属性;新增 `applyWidth` 方法和 `updated` 中监听 `collapsed`/`expandedWidth`/`collapsedWidth` 变化
50
+
51
+ #### aithe-sidebar 改用 aithe-tree-menu
52
+
53
+ - **`src/components/framework/sidebar.ts`** — 移除 `expanded` 状态、`collectKeys`/`isGroupActive`/`toggleExpand`/`selectItem`/`renderIcon`/`renderItems` 方法;移除 `.menu`/`.item`/`.item-icon`/`.fallback-icon`/`.item-label`/`.item.active`/`.group-toggle`/`.group-toggle-label`/`.group-toggle-icon`/`.group-toggle-text`/`.arrow`/`.children` 等大量 CSS 样式;center 区域改为 `<aithe-tree-menu>` 组件,传入 `items`/`active`/`expandAll`/`collapsible`/`collapsed`/`itemFilter`/`collapsedWidth`/`expandedWidth`;`handleTreeSelect` 仅更新 `this.active`;`:host([collapsed])` 增加 `overflow: visible`;`:host([collapsed]) .center` 增加 `overflow: visible`;移除 `classMap`/`translateNodeLabel` 导入
54
+
55
+ #### aithe-dropdown 移除 findItemById
56
+
57
+ - **`src/components/data/dropdown.ts`** — `handleTreeSelect` 不再 re-emit,仅关闭面板;移除 `findItemById` 递归方法;导入路径从相对路径改为 `@core/` 别名
58
+ - **`src/components/navigation/dropdown.ts`** — 删除旧版 dropdown 文件
59
+
60
+ #### aithe-theme-switch 用 item.category 替代遍历
61
+
62
+ - **`src/components/theme/theme-switch.ts`** — `buildThemeMenu` 中 theme 组子项添加 `category: 'theme'`;shadow/shape/typo 子项分别添加 `category` 字段;`handleTreeSelect` 直接从 `item.category` 读取分类,移除遍历 `themeMenu`/`shadowMenu`/`shapeMenu`/`typoMenu` 的逻辑
63
+
64
+ #### aithe-admin-layout 移除 findMenuNode
65
+
66
+ - **`src/apps/admin/components/admin-layout.ts`** — `handleSidebarSelect` 直接使用 `e.detail.item` 替代 `findMenuNode` 递归查找;移除 `findMenuNode` 方法;`fetchMenuData` 调用加 `void`;`router.navigate` 调用加 `void`
67
+
68
+ #### Admin 仪表盘取数修复
69
+
70
+ - **`src/apps/admin/pages/dashboard-page.ts`** — 新增 `abortController` 属性;`fetchStats` 中每次请求前 abort 上一次、创建新 `AbortController`、传入 `signal`;请求后检查 `aborted` 跳过;双重解包防御(`res.data` 仍有 `data` 嵌套时自动解包);`disconnectedCallback` 中 abort;loading URL 匹配从 `includes` 改为 `endsWith`
71
+
72
+ #### 文档更新
73
+
74
+ - **`docs/api/data/tree-menu.md`** — 新增 `collapsible`/`collapsed`/`collapsed-width`/`expanded-width` 属性文档;`itemRenderer` 说明;collapsed 模式行为说明;`aithe-select` 事件 detail 更新为 `{ value, item }`;事件传播说明(`composed: true`)
75
+ - **`docs/api/data/dropdown.md`** — `aithe-select` 事件 detail 更新为 `{ value, item }`
76
+ - **`docs/api/framework/sidebar.md`** — 新增 composed 透传说明
77
+ - **`docs/api/theme/theme-switch.md`** — `category` 来自 `item.category` 说明
78
+
79
+ ### 删除
80
+
81
+ - **`src/components/navigation/dropdown.ts`** — 删除旧版 dropdown 文件(已迁移至 `src/components/data/dropdown.ts`)
82
+ - **`aithe-sidebar` 自有菜单渲染逻辑** — 移除 `renderItems`/`renderIcon`/`toggleExpand`/`selectItem`/`isGroupActive`/`collectKeys`/`expanded` 状态及对应 CSS 样式
83
+ - **`aithe-dropdown` 的 `findItemById` 方法** — 移除递归查找方法
84
+ - **`aithe-admin-layout` 的 `findMenuNode` 方法** — 移除递归查找方法
@@ -0,0 +1,72 @@
1
+ # Issue 26.3.1.1
2
+
3
+ ## 版本信息
4
+
5
+ - **版本号**: 26.3.1.1
6
+ - **基线版本**: 26.3.1
7
+ - **类型**: Feature
8
+ - **日期**: 2026-06-16
9
+
10
+ ## 变更概述
11
+
12
+ 1. **`AitheSidebarItemFilter` 类型重命名** — 改为 `AitheTreeNodeFilter`,语义更通用,适用于所有树形菜单组件的过滤场景
13
+ 2. **`aithe-tree-menu` 默认权限过滤** — 新增内置 `itemFilter` 默认值,检查 `item.hasPermission !== false`,支持通过 `hasPermission` 字段控制菜单项显隐
14
+ 3. **`aithe-dropdown` 新增 `itemFilter` 属性** — 透传给内部 `<aithe-tree-menu>`,支持上层使用者定制菜单项过滤
15
+ 4. **`Markdown`解析器增强** — 新增 `RawInlineNode` 类型和 `_resolveRawInlines` 方法,支持列表项内行内解析(粗体、链接等);`paragraph` 渲染增加 `md-p` CSS 类;新增 `span` 节点类型渲染;新增粗体 CSS 样式
16
+ 5. **`Dashboard CSS` 变量修复** — `border-radius` 使用 `--aithe-container-radius-lg` 替代硬编码 `--aithe-radius-lg`
17
+ 6. **`publish.js` 跨平台兼容** — Windows 平台下 spawn 增加 `shell: true` 选项
18
+ 7. **文档同步更新** — `aithe-tree-menu`、`aithe-sidebar`、`aithe-dropdown` API 文档更新 `item-filter` 属性描述,新增 `hasPermission` 字段说明
19
+ 8. **Sonar 技术债务清理** — 共修复 11 处 Sonar 问题:
20
+ - `code.ts`:LaTeX 字符串改用 `String.raw` 消除转义反斜杠
21
+ - `code-editor.ts`:移除冗余类型断言 `as AitheBuiltinTheme`;移除未使用的 `AitheBuiltinTheme` 导入
22
+ - `form-item.ts`:合并 `querySelector` 泛型与类型断言,移除中间变量
23
+ - `affix.ts` / `back-top.ts`:移除 `removeEventListener` 中多余的 `as EventListener` 断言
24
+ - `theme-preview.ts`:`value` 属性类型由 `AitheBuiltinTheme | string` 简化为 `string`;移除未使用的 `AitheBuiltinTheme` 导入
25
+ - `theme-switch.ts`:移除 `as ThemeCategory` 冗余类型断言
26
+ - `dedup.ts`:`data` 参数移除多余的 `| undefined` 联合类型
27
+ - `LoggerCore.ts`:移除 `payload as unknown[]` 冗余类型断言
28
+ - `index.ts`(i18n):移除 `raw as AitheLocale` 冗余类型断言
29
+ - `plugins.ts`:所有 `String.match()` 替换为 `RegExp.exec()`
30
+
31
+ ## 破坏性变更
32
+
33
+ | 变更项 | 旧值 | 新值 |
34
+ |--------|------|------|
35
+ | `AitheSidebarItemFilter` 类型名 | `AitheSidebarItemFilter` | `AitheTreeNodeFilter` |
36
+ | `aithe-tree-menu.itemFilter` 默认值 | `null`(不过滤) | `(item) => item.hasPermission !== false`(过滤 `hasPermission: false` 的项) |
37
+
38
+ ## 变更内容
39
+
40
+ ### 新增
41
+
42
+ - **`aithe-dropdown.itemFilter` 属性** — `src/components/data/dropdown.ts` 新增 `itemFilter: AitheTreeNodeFilter | null` 属性,透传给内部 `<aithe-tree-menu>`,支持上层使用者定制菜单项过滤
43
+ - **`RawInlineNode` 类型** — `src/core/markdown/types.ts` 新增 `raw-inline` 节点类型定义,用于列表项内行内文本的二次解析
44
+ - **`_resolveRawInlines` 方法** — `src/core/markdown/parser.ts` 新增私有方法,递归遍历 AST 将 `raw-inline` 节点解析为行内 AST 节点(粗体、链接等)
45
+ - **`span` 节点渲染** — `src/core/markdown/parser.ts` `renderAst` 新增 `span` 类型处理,渲染子节点
46
+ - **粗体 CSS 样式** — `src/components/display/markdown.ts` 新增 `.md-strong` 样式,`font-weight: 700`
47
+
48
+ ### 修改
49
+
50
+ - **`src/core/types.ts`** — `AitheSidebarItemFilter` 类型重命名为 `AitheTreeNodeFilter`,JSDoc 同步更新
51
+ - **`src/components/data/tree-menu.ts`** — 属性类型 `AitheSidebarItemFilter` → `AitheTreeNodeFilter`;`renderItems` 中 `itemFilter` 默认值改为 `(item) => item.hasPermission !== false`,当未设置自定义 filter 时自动过滤 `hasPermission: false` 的节点;`updated` 中 `collapsed`/`expandedWidth`/`collapsedWidth` 条件合并;`render` 中移除冗余的 `applyWidth` 调用(已由 `updated` 处理)
52
+ - **`src/components/framework/sidebar.ts`** — 属性类型 `AitheSidebarItemFilter` → `AitheTreeNodeFilter`
53
+ - **`src/components/data/dropdown.ts`** — 导入新增 `AitheTreeNodeFilter` 类型;模板中透传 `.itemFilter` 给内部 `<aithe-tree-menu>`
54
+ - **`src/core/markdown/parser.ts`** — `parseBlocks` 末尾调用 `_resolveRawInlines`;`renderAst` 中 `paragraph` 渲染增加 `<p class="md-p">` 包裹;新增 `span` 节点渲染
55
+ - **`src/core/markdown/plugins.ts`** — `listPlugin` 和 `taskListPlugin` 中列表项文本节点类型由 `text` 改为 `raw-inline`,以支持行内解析;所有 `String.match()` 替换为 `RegExp.exec()`(Sonar 规则 `prefer-regexp-exec`)
56
+ - **`src/components/framework/dashboard.ts`** — CSS `border-radius` 使用 `--aithe-container-radius-lg` 替代 `--aithe-radius-lg`
57
+ - **`src/components/display/markdown.ts`** — 新增 `.md-strong` CSS 样式
58
+ - **`publish.js`** — Windows 平台兼容,spawn 增加 `shell: process.platform === 'win32'` 选项
59
+ - **Sonar 技术债务修复**:
60
+ - **`src/apps/demo/pages/code.ts`** — LaTeX 字符串改用 `String.raw` 模板字面量,消除转义反斜杠
61
+ - **`src/components/display/code-editor.ts`** — 移除冗余类型断言 `as AitheBuiltinTheme` 及未使用的 `AitheBuiltinTheme` 导入
62
+ - **`src/components/form/form-item.ts`** — 合并 `querySelector` 泛型与类型断言,移除中间变量 `typedControl`
63
+ - **`src/components/layout/affix.ts`** — 移除 `removeEventListener` 中多余的 `as EventListener` 断言
64
+ - **`src/components/navigation/back-top.ts`** — 同上
65
+ - **`src/components/theme/theme-preview.ts`** — `value` 属性类型由 `AitheBuiltinTheme | string` 简化为 `string`;移除未使用的 `AitheBuiltinTheme` 导入
66
+ - **`src/components/theme/theme-switch.ts`** — 移除 `as ThemeCategory` 冗余类型断言
67
+ - **`src/core/datahub/utils/dedup.ts`** — `data` 参数移除多余的 `| undefined` 联合类型
68
+ - **`src/core/logger/LoggerCore.ts`** — 移除 `payload as unknown[]` 冗余类型断言
69
+ - **`src/styles/i18n/index.ts`** — 移除 `raw as AitheLocale` 冗余类型断言
70
+ - **`docs/api/data/tree-menu.md`** — `item-filter` 属性 Default 改为"内置默认值",描述补充默认过滤逻辑;Data Item Fields 新增 `hasPermission` 字段
71
+ - **`docs/api/framework/sidebar.md`** — 同上
72
+ - **`docs/api/data/dropdown.md`** — Properties 表格新增 `item-filter` 属性行