@gi-base/ui 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +32 -2
  3. package/dist/chunks/badge.vue_vue_type_style_index_0_lang-CY33mp7-.mjs +63 -0
  4. package/dist/chunks/button.vue_vue_type_style_index_0_lang-R3M50qg6.mjs +261 -0
  5. package/dist/chunks/card.vue_vue_type_style_index_0_lang-D8ofADym.mjs +140 -0
  6. package/dist/chunks/chart-card-CkzKgoNn.mjs +4 -0
  7. package/dist/chunks/chart-card.vue_vue_type_style_index_0_lang-O3dB4zv4.mjs +111 -0
  8. package/dist/chunks/chart-pxel8ocW.mjs +4 -0
  9. package/dist/chunks/chart.vue_vue_type_style_index_0_lang-Dt4-6E5R.mjs +1512 -0
  10. package/dist/chunks/context-ft3Pl675.mjs +4 -0
  11. package/dist/chunks/dialog.vue_vue_type_style_index_0_lang-DjG-cRmI.mjs +285 -0
  12. package/dist/chunks/icon.vue_vue_type_style_index_0_lang-CupFXcqv.mjs +93 -0
  13. package/dist/chunks/index-BQJqnh5l.mjs +181 -0
  14. package/dist/chunks/index-D0dJjV1u.mjs +127 -0
  15. package/dist/chunks/overlay.vue_vue_type_style_index_0_lang-BbOIddAC.mjs +58 -0
  16. package/dist/chunks/select.vue_vue_type_style_index_0_lang-CTXa4r_r.mjs +774 -0
  17. package/dist/chunks/sub-menu.vue_vue_type_script_setup_true_lang-D7eESzZS.mjs +775 -0
  18. package/dist/chunks/tag.vue_vue_type_style_index_0_lang-DEpBCkCG.mjs +146 -0
  19. package/dist/chunks/useClickOutside-C1JC115M.mjs +27 -0
  20. package/dist/chunks/useFloating-D4y_Ynh2.mjs +1067 -0
  21. package/dist/chunks/z-index-DpEcb64l.mjs +6 -0
  22. package/dist/components/affix/index.d.ts +134 -0
  23. package/dist/components/affix/index.mjs +62 -0
  24. package/dist/components/affix/src/affix.d.ts +32 -0
  25. package/dist/components/affix/src/affix.vue.d.ts +83 -0
  26. package/dist/components/ai/index.d.ts +1472 -0
  27. package/dist/components/ai/index.mjs +1107 -0
  28. package/dist/components/ai/src/console.vue.d.ts +23 -0
  29. package/dist/components/ai/src/cursor.vue.d.ts +59 -0
  30. package/dist/components/ai/src/focus-ring.vue.d.ts +77 -0
  31. package/dist/components/ai/src/ghost-input.vue.d.ts +74 -0
  32. package/dist/components/ai/src/guide.vue.d.ts +41 -0
  33. package/dist/components/ai/src/interact-lock.vue.d.ts +65 -0
  34. package/dist/components/ai/src/page-renderer.d.ts +62 -0
  35. package/dist/components/ai/src/page-renderer.vue.d.ts +50 -0
  36. package/dist/components/ai/src/progress.vue.d.ts +70 -0
  37. package/dist/components/ai/src/provider.vue.d.ts +61 -0
  38. package/dist/components/ai/src/review-panel.vue.d.ts +69 -0
  39. package/dist/components/ai/src/spotlight.vue.d.ts +78 -0
  40. package/dist/components/ai/src/step-tip.vue.d.ts +87 -0
  41. package/dist/components/ai/src/summary-panel.vue.d.ts +66 -0
  42. package/dist/components/ai/src/target.d.ts +33 -0
  43. package/dist/components/ai/src/useAi.d.ts +11 -0
  44. package/dist/components/alert/index.d.ts +178 -0
  45. package/dist/components/alert/index.mjs +92 -0
  46. package/dist/components/alert/src/alert.d.ts +45 -0
  47. package/dist/components/alert/src/alert.vue.d.ts +112 -0
  48. package/dist/components/anchor/index.d.ts +203 -0
  49. package/dist/components/anchor/index.mjs +118 -0
  50. package/dist/components/anchor/src/anchor-link.vue.d.ts +39 -0
  51. package/dist/components/anchor/src/anchor.d.ts +48 -0
  52. package/dist/components/anchor/src/anchor.vue.d.ts +98 -0
  53. package/dist/components/app-shell/index.d.ts +352 -0
  54. package/dist/components/app-shell/index.mjs +229 -0
  55. package/dist/components/app-shell/src/app-shell.d.ts +99 -0
  56. package/dist/components/app-shell/src/app-shell.vue.d.ts +213 -0
  57. package/dist/components/autocomplete/index.d.ts +330 -0
  58. package/dist/components/autocomplete/index.mjs +166 -0
  59. package/dist/components/autocomplete/src/autocomplete.d.ts +83 -0
  60. package/dist/components/autocomplete/src/autocomplete.vue.d.ts +204 -0
  61. package/dist/components/avatar/index.d.ts +215 -0
  62. package/dist/components/avatar/index.mjs +99 -0
  63. package/dist/components/avatar/src/avatar-group.vue.d.ts +48 -0
  64. package/dist/components/avatar/src/avatar.d.ts +48 -0
  65. package/dist/components/avatar/src/avatar.vue.d.ts +96 -0
  66. package/dist/components/backtop/index.d.ts +124 -0
  67. package/dist/components/backtop/index.mjs +80 -0
  68. package/dist/components/backtop/src/backtop.d.ts +31 -0
  69. package/dist/components/backtop/src/backtop.vue.d.ts +78 -0
  70. package/dist/components/badge/index.d.ts +177 -0
  71. package/dist/components/badge/index.mjs +7 -0
  72. package/dist/components/badge/src/badge.d.ts +46 -0
  73. package/dist/components/badge/src/badge.vue.d.ts +112 -0
  74. package/dist/components/breadcrumb/index.d.ts +148 -0
  75. package/dist/components/breadcrumb/index.mjs +98 -0
  76. package/dist/components/breadcrumb/src/breadcrumb-item.vue.d.ts +51 -0
  77. package/dist/components/breadcrumb/src/breadcrumb.d.ts +46 -0
  78. package/dist/components/breadcrumb/src/breadcrumb.vue.d.ts +47 -0
  79. package/dist/components/button/index.d.ts +460 -0
  80. package/dist/components/button/index.mjs +7 -0
  81. package/dist/components/button/src/button.d.ts +144 -0
  82. package/dist/components/button/src/button.vue.d.ts +270 -0
  83. package/dist/components/button-group/index.d.ts +94 -0
  84. package/dist/components/button-group/index.mjs +49 -0
  85. package/dist/components/button-group/src/button-group.d.ts +27 -0
  86. package/dist/components/button-group/src/button-group.vue.d.ts +62 -0
  87. package/dist/components/button-group/src/context.d.ts +7 -0
  88. package/dist/components/calendar/index.d.ts +151 -0
  89. package/dist/components/calendar/index.mjs +199 -0
  90. package/dist/components/calendar/src/calendar.d.ts +35 -0
  91. package/dist/components/calendar/src/calendar.vue.d.ts +96 -0
  92. package/dist/components/card/index.d.ts +230 -0
  93. package/dist/components/card/index.mjs +7 -0
  94. package/dist/components/card/src/card.d.ts +67 -0
  95. package/dist/components/card/src/card.vue.d.ts +148 -0
  96. package/dist/components/carousel/index.d.ts +300 -0
  97. package/dist/components/carousel/index.mjs +166 -0
  98. package/dist/components/carousel/src/carousel-item.vue.d.ts +17 -0
  99. package/dist/components/carousel/src/carousel.d.ts +71 -0
  100. package/dist/components/carousel/src/carousel.vue.d.ts +171 -0
  101. package/dist/components/cascader/index.d.ts +322 -0
  102. package/dist/components/cascader/index.mjs +177 -0
  103. package/dist/components/cascader/src/cascader.d.ts +87 -0
  104. package/dist/components/cascader/src/cascader.vue.d.ts +182 -0
  105. package/dist/components/chart/index.d.ts +605 -0
  106. package/dist/components/chart/index.mjs +20 -0
  107. package/dist/components/chart/src/chart-option.d.ts +62 -0
  108. package/dist/components/chart/src/chart.d.ts +186 -0
  109. package/dist/components/chart/src/chart.vue.d.ts +341 -0
  110. package/dist/components/chart-card/index.d.ts +638 -0
  111. package/dist/components/chart-card/index.mjs +7 -0
  112. package/dist/components/chart-card/src/chart-card.d.ts +167 -0
  113. package/dist/components/chart-card/src/chart-card.vue.d.ts +387 -0
  114. package/dist/components/check-tag/index.d.ts +181 -0
  115. package/dist/components/check-tag/index.mjs +92 -0
  116. package/dist/components/check-tag/src/check-tag.d.ts +49 -0
  117. package/dist/components/check-tag/src/check-tag.vue.d.ts +111 -0
  118. package/dist/components/checkbox/constants.d.ts +20 -0
  119. package/dist/components/checkbox/index.d.ts +340 -0
  120. package/dist/components/checkbox/index.mjs +6 -0
  121. package/dist/components/checkbox/src/checkbox.d.ts +100 -0
  122. package/dist/components/checkbox/src/checkbox.vue.d.ts +207 -0
  123. package/dist/components/checkbox-group/index.d.ts +249 -0
  124. package/dist/components/checkbox-group/index.mjs +108 -0
  125. package/dist/components/checkbox-group/src/checkbox-group.d.ts +84 -0
  126. package/dist/components/checkbox-group/src/checkbox-group.vue.d.ts +153 -0
  127. package/dist/components/col/index.d.ts +213 -0
  128. package/dist/components/col/index.mjs +82 -0
  129. package/dist/components/col/src/col.d.ts +74 -0
  130. package/dist/components/col/src/col.vue.d.ts +133 -0
  131. package/dist/components/collapse/index.d.ts +249 -0
  132. package/dist/components/collapse/index.mjs +231 -0
  133. package/dist/components/collapse/src/collapse-item.vue.d.ts +80 -0
  134. package/dist/components/collapse/src/collapse.d.ts +82 -0
  135. package/dist/components/collapse/src/collapse.vue.d.ts +75 -0
  136. package/dist/components/color-picker/index.d.ts +212 -0
  137. package/dist/components/color-picker/index.mjs +274 -0
  138. package/dist/components/color-picker/src/color-picker.d.ts +53 -0
  139. package/dist/components/color-picker/src/color-picker.vue.d.ts +118 -0
  140. package/dist/components/config-provider/index.d.ts +153 -0
  141. package/dist/components/config-provider/index.mjs +56 -0
  142. package/dist/components/config-provider/src/config-provider.d.ts +34 -0
  143. package/dist/components/config-provider/src/config-provider.vue.d.ts +94 -0
  144. package/dist/components/container/index.d.ts +424 -0
  145. package/dist/components/container/index.mjs +246 -0
  146. package/dist/components/container/src/aside.d.ts +19 -0
  147. package/dist/components/container/src/aside.vue.d.ts +49 -0
  148. package/dist/components/container/src/container.d.ts +23 -0
  149. package/dist/components/container/src/container.vue.d.ts +49 -0
  150. package/dist/components/container/src/footer.d.ts +14 -0
  151. package/dist/components/container/src/footer.vue.d.ts +38 -0
  152. package/dist/components/container/src/header.d.ts +43 -0
  153. package/dist/components/container/src/header.vue.d.ts +89 -0
  154. package/dist/components/container/src/main.d.ts +24 -0
  155. package/dist/components/container/src/main.vue.d.ts +56 -0
  156. package/dist/components/countdown/index.d.ts +140 -0
  157. package/dist/components/countdown/index.mjs +55 -0
  158. package/dist/components/countdown/src/countdown.d.ts +35 -0
  159. package/dist/components/countdown/src/countdown.vue.d.ts +74 -0
  160. package/dist/components/crud/index.d.ts +1424 -0
  161. package/dist/components/crud/index.mjs +1728 -0
  162. package/dist/components/crud/src/crud-dialog.vue.d.ts +675 -0
  163. package/dist/components/crud/src/crud-field-control.vue.d.ts +15 -0
  164. package/dist/components/crud/src/crud-pagination.vue.d.ts +18 -0
  165. package/dist/components/crud/src/crud-search.vue.d.ts +40 -0
  166. package/dist/components/crud/src/crud-table.vue.d.ts +106 -0
  167. package/dist/components/crud/src/crud-toolbar.vue.d.ts +55 -0
  168. package/dist/components/crud/src/crud.d.ts +180 -0
  169. package/dist/components/crud/src/crud.vue.d.ts +1756 -0
  170. package/dist/components/crud/src/types.d.ts +266 -0
  171. package/dist/components/crud/src/useCrud.d.ts +27 -0
  172. package/dist/components/date-picker/index.d.ts +557 -0
  173. package/dist/components/date-picker/index.mjs +865 -0
  174. package/dist/components/date-picker/src/date-panel.vue.d.ts +55 -0
  175. package/dist/components/date-picker/src/date-picker.d.ts +160 -0
  176. package/dist/components/date-picker/src/date-picker.vue.d.ts +335 -0
  177. package/dist/components/date-picker/src/date-utils.d.ts +26 -0
  178. package/dist/components/descriptions/index.d.ts +272 -0
  179. package/dist/components/descriptions/index.mjs +94 -0
  180. package/dist/components/descriptions/src/descriptions-item.vue.d.ts +79 -0
  181. package/dist/components/descriptions/src/descriptions.d.ts +67 -0
  182. package/dist/components/descriptions/src/descriptions.vue.d.ts +98 -0
  183. package/dist/components/dialog/index.d.ts +547 -0
  184. package/dist/components/dialog/index.mjs +10 -0
  185. package/dist/components/dialog/src/dialog.d.ts +132 -0
  186. package/dist/components/dialog/src/dialog.vue.d.ts +319 -0
  187. package/dist/components/divider/index.d.ts +93 -0
  188. package/dist/components/divider/index.mjs +38 -0
  189. package/dist/components/divider/src/divider.d.ts +24 -0
  190. package/dist/components/divider/src/divider.vue.d.ts +62 -0
  191. package/dist/components/drawer/index.d.ts +449 -0
  192. package/dist/components/drawer/index.mjs +233 -0
  193. package/dist/components/drawer/src/drawer.d.ts +108 -0
  194. package/dist/components/drawer/src/drawer.vue.d.ts +249 -0
  195. package/dist/components/dropdown/index.d.ts +445 -0
  196. package/dist/components/dropdown/index.mjs +192 -0
  197. package/dist/components/dropdown/src/dropdown-item.vue.d.ts +56 -0
  198. package/dist/components/dropdown/src/dropdown-menu.vue.d.ts +17 -0
  199. package/dist/components/dropdown/src/dropdown.d.ts +102 -0
  200. package/dist/components/dropdown/src/dropdown.vue.d.ts +208 -0
  201. package/dist/components/empty/index.d.ts +103 -0
  202. package/dist/components/empty/index.mjs +67 -0
  203. package/dist/components/empty/src/empty.d.ts +25 -0
  204. package/dist/components/empty/src/empty.vue.d.ts +67 -0
  205. package/dist/components/empty/src/presets.d.ts +3 -0
  206. package/dist/components/footer-bar/index.d.ts +119 -0
  207. package/dist/components/footer-bar/index.mjs +100 -0
  208. package/dist/components/footer-bar/src/footer-bar.d.ts +41 -0
  209. package/dist/components/footer-bar/src/footer-bar.vue.d.ts +76 -0
  210. package/dist/components/form/index.d.ts +626 -0
  211. package/dist/components/form/index.mjs +675 -0
  212. package/dist/components/form/src/constants.d.ts +17 -0
  213. package/dist/components/form/src/form-item.vue.d.ts +168 -0
  214. package/dist/components/form/src/form.d.ts +177 -0
  215. package/dist/components/form/src/form.vue.d.ts +218 -0
  216. package/dist/components/form/src/types.d.ts +91 -0
  217. package/dist/components/icon/index.d.ts +150 -0
  218. package/dist/components/icon/index.mjs +7 -0
  219. package/dist/components/icon/src/icon.d.ts +54 -0
  220. package/dist/components/icon/src/icon.vue.d.ts +94 -0
  221. package/dist/components/image/index.d.ts +328 -0
  222. package/dist/components/image/index.mjs +101 -0
  223. package/dist/components/image/src/image.d.ts +80 -0
  224. package/dist/components/image/src/image.vue.d.ts +194 -0
  225. package/dist/components/image-viewer/index.d.ts +344 -0
  226. package/dist/components/image-viewer/index.mjs +305 -0
  227. package/dist/components/image-viewer/src/image-viewer.d.ts +88 -0
  228. package/dist/components/image-viewer/src/image-viewer.vue.d.ts +189 -0
  229. package/dist/components/infinite-scroll/index.d.ts +4 -0
  230. package/dist/components/infinite-scroll/index.mjs +35 -0
  231. package/dist/components/input/index.d.ts +550 -0
  232. package/dist/components/input/index.mjs +298 -0
  233. package/dist/components/input/src/input.d.ts +133 -0
  234. package/dist/components/input/src/input.vue.d.ts +327 -0
  235. package/dist/components/input-otp/index.d.ts +203 -0
  236. package/dist/components/input-otp/index.mjs +94 -0
  237. package/dist/components/input-otp/src/input-otp.d.ts +51 -0
  238. package/dist/components/input-otp/src/input-otp.vue.d.ts +109 -0
  239. package/dist/components/input-tag/index.d.ts +357 -0
  240. package/dist/components/input-tag/index.mjs +205 -0
  241. package/dist/components/input-tag/src/input-tag.d.ts +91 -0
  242. package/dist/components/input-tag/src/input-tag.vue.d.ts +201 -0
  243. package/dist/components/layout/index.d.ts +91 -0
  244. package/dist/components/layout/index.mjs +181 -0
  245. package/dist/components/layout/src/layout-executor.d.ts +24 -0
  246. package/dist/components/layout/src/layout-executor.vue.d.ts +62 -0
  247. package/dist/components/layout/src/layout.d.ts +60 -0
  248. package/dist/components/link/index.d.ts +162 -0
  249. package/dist/components/link/index.mjs +102 -0
  250. package/dist/components/link/src/link.d.ts +44 -0
  251. package/dist/components/link/src/link.vue.d.ts +103 -0
  252. package/dist/components/loading/index.d.ts +11 -0
  253. package/dist/components/loading/index.mjs +167 -0
  254. package/dist/components/loading/src/directive.d.ts +5 -0
  255. package/dist/components/loading/src/loading.d.ts +67 -0
  256. package/dist/components/loading/src/loading.vue.d.ts +40 -0
  257. package/dist/components/loading/src/service.d.ts +11 -0
  258. package/dist/components/mention/index.d.ts +211 -0
  259. package/dist/components/mention/index.mjs +126 -0
  260. package/dist/components/mention/src/mention.d.ts +50 -0
  261. package/dist/components/mention/src/mention.vue.d.ts +114 -0
  262. package/dist/components/menu/index.d.ts +814 -0
  263. package/dist/components/menu/index.mjs +50 -0
  264. package/dist/components/menu/src/menu-item-group.vue.d.ts +30 -0
  265. package/dist/components/menu/src/menu-item.vue.d.ts +72 -0
  266. package/dist/components/menu/src/menu.d.ts +294 -0
  267. package/dist/components/menu/src/menu.vue.d.ts +263 -0
  268. package/dist/components/menu/src/sub-menu.vue.d.ts +154 -0
  269. package/dist/components/message-box/index.d.ts +16 -0
  270. package/dist/components/message-box/index.mjs +288 -0
  271. package/dist/components/message-box/src/message-box.d.ts +171 -0
  272. package/dist/components/message-box/src/message-box.vue.d.ts +69 -0
  273. package/dist/components/message-box/src/service.d.ts +12 -0
  274. package/dist/components/notice/index.d.ts +252 -0
  275. package/dist/components/notice/index.mjs +307 -0
  276. package/dist/components/notice/src/notice.d.ts +79 -0
  277. package/dist/components/notice/src/notice.vue.d.ts +137 -0
  278. package/dist/components/notice/src/service.d.ts +34 -0
  279. package/dist/components/notification/index.d.ts +5 -0
  280. package/dist/components/notification/index.mjs +131 -0
  281. package/dist/components/notification/src/notification-item.vue.d.ts +28 -0
  282. package/dist/components/notification/src/notification.d.ts +26 -0
  283. package/dist/components/notification/src/service.d.ts +3 -0
  284. package/dist/components/number/index.d.ts +400 -0
  285. package/dist/components/number/index.mjs +257 -0
  286. package/dist/components/number/src/number.d.ts +114 -0
  287. package/dist/components/number/src/number.vue.d.ts +227 -0
  288. package/dist/components/overlay/index.d.ts +124 -0
  289. package/dist/components/overlay/index.mjs +7 -0
  290. package/dist/components/overlay/src/overlay.vue.d.ts +70 -0
  291. package/dist/components/page-header/index.d.ts +83 -0
  292. package/dist/components/page-header/index.mjs +79 -0
  293. package/dist/components/page-header/src/page-header.d.ts +17 -0
  294. package/dist/components/page-header/src/page-header.vue.d.ts +55 -0
  295. package/dist/components/pagination/index.d.ts +390 -0
  296. package/dist/components/pagination/index.mjs +195 -0
  297. package/dist/components/pagination/src/pagination.d.ts +101 -0
  298. package/dist/components/pagination/src/pagination.vue.d.ts +232 -0
  299. package/dist/components/popconfirm/index.d.ts +1146 -0
  300. package/dist/components/popconfirm/index.mjs +130 -0
  301. package/dist/components/popconfirm/src/popconfirm.d.ts +82 -0
  302. package/dist/components/popconfirm/src/popconfirm.vue.d.ts +1855 -0
  303. package/dist/components/popover/index.d.ts +873 -0
  304. package/dist/components/popover/index.mjs +110 -0
  305. package/dist/components/popover/src/popover.d.ts +85 -0
  306. package/dist/components/popover/src/popover.vue.d.ts +1271 -0
  307. package/dist/components/progress/index.d.ts +254 -0
  308. package/dist/components/progress/index.mjs +120 -0
  309. package/dist/components/progress/src/progress.d.ts +68 -0
  310. package/dist/components/progress/src/progress.vue.d.ts +146 -0
  311. package/dist/components/radio/constants.d.ts +17 -0
  312. package/dist/components/radio/index.d.ts +233 -0
  313. package/dist/components/radio/index.mjs +6 -0
  314. package/dist/components/radio/src/radio.d.ts +65 -0
  315. package/dist/components/radio/src/radio.vue.d.ts +143 -0
  316. package/dist/components/radio-group/index.d.ts +235 -0
  317. package/dist/components/radio-group/index.mjs +91 -0
  318. package/dist/components/radio-group/src/radio-group.d.ts +77 -0
  319. package/dist/components/radio-group/src/radio-group.vue.d.ts +144 -0
  320. package/dist/components/rate/index.d.ts +320 -0
  321. package/dist/components/rate/index.mjs +115 -0
  322. package/dist/components/rate/src/rate.d.ts +84 -0
  323. package/dist/components/rate/src/rate.vue.d.ts +182 -0
  324. package/dist/components/result/index.d.ts +91 -0
  325. package/dist/components/result/index.mjs +74 -0
  326. package/dist/components/result/src/result.d.ts +21 -0
  327. package/dist/components/result/src/result.vue.d.ts +62 -0
  328. package/dist/components/rolling-notice/index.d.ts +187 -0
  329. package/dist/components/rolling-notice/index.mjs +176 -0
  330. package/dist/components/rolling-notice/src/rolling-notice.d.ts +57 -0
  331. package/dist/components/rolling-notice/src/rolling-notice.vue.d.ts +102 -0
  332. package/dist/components/row/index.d.ts +105 -0
  333. package/dist/components/row/index.mjs +64 -0
  334. package/dist/components/row/src/row.d.ts +33 -0
  335. package/dist/components/row/src/row.vue.d.ts +69 -0
  336. package/dist/components/scrollbar/index.d.ts +386 -0
  337. package/dist/components/scrollbar/index.mjs +235 -0
  338. package/dist/components/scrollbar/src/scrollbar.d.ts +101 -0
  339. package/dist/components/scrollbar/src/scrollbar.vue.d.ts +237 -0
  340. package/dist/components/segmented/index.d.ts +252 -0
  341. package/dist/components/segmented/index.mjs +177 -0
  342. package/dist/components/segmented/src/segmented.d.ts +88 -0
  343. package/dist/components/segmented/src/segmented.vue.d.ts +159 -0
  344. package/dist/components/select/index.d.ts +1107 -0
  345. package/dist/components/select/index.mjs +36 -0
  346. package/dist/components/select/src/constants.d.ts +34 -0
  347. package/dist/components/select/src/option-group.vue.d.ts +39 -0
  348. package/dist/components/select/src/option.vue.d.ts +56 -0
  349. package/dist/components/select/src/remote.d.ts +6 -0
  350. package/dist/components/select/src/select.d.ts +336 -0
  351. package/dist/components/select/src/select.vue.d.ts +583 -0
  352. package/dist/components/select-virtual/index.d.ts +884 -0
  353. package/dist/components/select-virtual/index.mjs +18 -0
  354. package/dist/components/select-virtual/src/select-virtual.vue.d.ts +522 -0
  355. package/dist/components/sidebar/index.d.ts +279 -0
  356. package/dist/components/sidebar/index.mjs +283 -0
  357. package/dist/components/sidebar/src/sidebar.d.ts +106 -0
  358. package/dist/components/sidebar/src/sidebar.vue.d.ts +170 -0
  359. package/dist/components/skeleton/index.d.ts +186 -0
  360. package/dist/components/skeleton/index.mjs +87 -0
  361. package/dist/components/skeleton/src/skeleton-item.vue.d.ts +58 -0
  362. package/dist/components/skeleton/src/skeleton.d.ts +43 -0
  363. package/dist/components/skeleton/src/skeleton.vue.d.ts +66 -0
  364. package/dist/components/slider/index.d.ts +282 -0
  365. package/dist/components/slider/index.mjs +190 -0
  366. package/dist/components/slider/src/slider.d.ts +73 -0
  367. package/dist/components/slider/src/slider.vue.d.ts +159 -0
  368. package/dist/components/space/index.d.ts +164 -0
  369. package/dist/components/space/index.mjs +132 -0
  370. package/dist/components/space/src/space.d.ts +55 -0
  371. package/dist/components/space/src/space.vue.d.ts +92 -0
  372. package/dist/components/sparkline/index.d.ts +219 -0
  373. package/dist/components/sparkline/index.mjs +109 -0
  374. package/dist/components/sparkline/src/sparkline.d.ts +57 -0
  375. package/dist/components/sparkline/src/sparkline.vue.d.ts +124 -0
  376. package/dist/components/splitter/index.d.ts +263 -0
  377. package/dist/components/splitter/index.mjs +299 -0
  378. package/dist/components/splitter/src/context.d.ts +35 -0
  379. package/dist/components/splitter/src/split-panel.vue.d.ts +87 -0
  380. package/dist/components/splitter/src/splitter.d.ts +64 -0
  381. package/dist/components/splitter/src/splitter.vue.d.ts +79 -0
  382. package/dist/components/statistic/index.d.ts +207 -0
  383. package/dist/components/statistic/index.mjs +92 -0
  384. package/dist/components/statistic/src/statistic.d.ts +52 -0
  385. package/dist/components/statistic/src/statistic.vue.d.ts +131 -0
  386. package/dist/components/steps/index.d.ts +271 -0
  387. package/dist/components/steps/index.mjs +128 -0
  388. package/dist/components/steps/src/step.vue.d.ts +73 -0
  389. package/dist/components/steps/src/steps.d.ts +65 -0
  390. package/dist/components/steps/src/steps.vue.d.ts +104 -0
  391. package/dist/components/switch/index.d.ts +426 -0
  392. package/dist/components/switch/index.mjs +214 -0
  393. package/dist/components/switch/src/switch.d.ts +129 -0
  394. package/dist/components/switch/src/switch.vue.d.ts +244 -0
  395. package/dist/components/table/index.d.ts +1709 -0
  396. package/dist/components/table/index.mjs +1304 -0
  397. package/dist/components/table/src/table-column.vue.d.ts +341 -0
  398. package/dist/components/table/src/table.d.ts +564 -0
  399. package/dist/components/table/src/table.vue.d.ts +623 -0
  400. package/dist/components/table-v2/index.d.ts +302 -0
  401. package/dist/components/table-v2/index.mjs +147 -0
  402. package/dist/components/table-v2/src/table-v2.d.ts +89 -0
  403. package/dist/components/table-v2/src/table-v2.vue.d.ts +165 -0
  404. package/dist/components/tabs/index.d.ts +355 -0
  405. package/dist/components/tabs/index.mjs +278 -0
  406. package/dist/components/tabs/src/tab-pane.vue.d.ts +76 -0
  407. package/dist/components/tabs/src/tabs.d.ts +113 -0
  408. package/dist/components/tabs/src/tabs.vue.d.ts +147 -0
  409. package/dist/components/tag/index.d.ts +323 -0
  410. package/dist/components/tag/index.mjs +7 -0
  411. package/dist/components/tag/src/tag.d.ts +88 -0
  412. package/dist/components/tag/src/tag.vue.d.ts +194 -0
  413. package/dist/components/text/index.d.ts +138 -0
  414. package/dist/components/text/index.mjs +66 -0
  415. package/dist/components/text/src/text.d.ts +45 -0
  416. package/dist/components/text/src/text.vue.d.ts +89 -0
  417. package/dist/components/textarea/index.d.ts +417 -0
  418. package/dist/components/textarea/index.mjs +189 -0
  419. package/dist/components/textarea/src/textarea.d.ts +97 -0
  420. package/dist/components/textarea/src/textarea.vue.d.ts +231 -0
  421. package/dist/components/time-picker/index.d.ts +216 -0
  422. package/dist/components/time-picker/index.mjs +228 -0
  423. package/dist/components/time-picker/src/time-picker.d.ts +53 -0
  424. package/dist/components/time-picker/src/time-picker.vue.d.ts +120 -0
  425. package/dist/components/time-select/index.d.ts +188 -0
  426. package/dist/components/time-select/index.mjs +124 -0
  427. package/dist/components/time-select/src/time-select.d.ts +46 -0
  428. package/dist/components/time-select/src/time-select.vue.d.ts +104 -0
  429. package/dist/components/timeline/index.d.ts +206 -0
  430. package/dist/components/timeline/index.mjs +81 -0
  431. package/dist/components/timeline/src/timeline-item.vue.d.ts +107 -0
  432. package/dist/components/timeline/src/timeline.d.ts +49 -0
  433. package/dist/components/timeline/src/timeline.vue.d.ts +29 -0
  434. package/dist/components/toast/index.d.ts +8 -0
  435. package/dist/components/toast/index.mjs +170 -0
  436. package/dist/components/toast/src/service.d.ts +4 -0
  437. package/dist/components/toast/src/toast-item.vue.d.ts +37 -0
  438. package/dist/components/toast/src/toast.d.ts +48 -0
  439. package/dist/components/tooltip/index.d.ts +636 -0
  440. package/dist/components/tooltip/index.mjs +342 -0
  441. package/dist/components/tooltip/src/tooltip.d.ts +197 -0
  442. package/dist/components/tooltip/src/tooltip.vue.d.ts +383 -0
  443. package/dist/components/tour/index.d.ts +337 -0
  444. package/dist/components/tour/index.mjs +180 -0
  445. package/dist/components/tour/src/tour.d.ts +91 -0
  446. package/dist/components/tour/src/tour.vue.d.ts +203 -0
  447. package/dist/components/transfer/index.d.ts +319 -0
  448. package/dist/components/transfer/index.mjs +298 -0
  449. package/dist/components/transfer/src/transfer.d.ts +79 -0
  450. package/dist/components/transfer/src/transfer.vue.d.ts +190 -0
  451. package/dist/components/tree/index.d.ts +536 -0
  452. package/dist/components/tree/index.mjs +312 -0
  453. package/dist/components/tree/src/tree-node.vue.d.ts +25 -0
  454. package/dist/components/tree/src/tree.d.ts +136 -0
  455. package/dist/components/tree/src/tree.vue.d.ts +298 -0
  456. package/dist/components/tree-select/index.d.ts +683 -0
  457. package/dist/components/tree-select/index.mjs +599 -0
  458. package/dist/components/tree-select/src/tree-select.d.ts +229 -0
  459. package/dist/components/tree-select/src/tree-select.vue.d.ts +390 -0
  460. package/dist/components/tree-v2/index.d.ts +255 -0
  461. package/dist/components/tree-v2/index.mjs +149 -0
  462. package/dist/components/tree-v2/src/tree-v2.d.ts +63 -0
  463. package/dist/components/tree-v2/src/tree-v2.vue.d.ts +139 -0
  464. package/dist/components/upload/index.d.ts +736 -0
  465. package/dist/components/upload/index.mjs +616 -0
  466. package/dist/components/upload/src/upload.d.ts +233 -0
  467. package/dist/components/upload/src/upload.vue.d.ts +421 -0
  468. package/dist/components/virtual-list/index.d.ts +159 -0
  469. package/dist/components/virtual-list/index.mjs +89 -0
  470. package/dist/components/virtual-list/src/virtual-list.d.ts +38 -0
  471. package/dist/components/virtual-list/src/virtual-list.vue.d.ts +103 -0
  472. package/dist/components/watermark/index.d.ts +264 -0
  473. package/dist/components/watermark/index.mjs +72 -0
  474. package/dist/components/watermark/src/watermark.d.ts +67 -0
  475. package/dist/components/watermark/src/watermark.vue.d.ts +164 -0
  476. package/dist/hooks/useClickOutside.d.ts +12 -0
  477. package/dist/hooks/useFloating.d.ts +49 -0
  478. package/dist/index.d.ts +116 -0
  479. package/dist/index.mjs +396 -0
  480. package/dist/style.css +1 -0
  481. package/dist/utils/form.d.ts +51 -0
  482. package/dist/utils/z-index.d.ts +9 -0
  483. package/package.json +61 -3
@@ -0,0 +1,1304 @@
1
+ import { useNamespace as Nt, useAiTarget as qn, withInstall as Wt } from "@gi-base/utils";
2
+ import { defineComponent as Ht, reactive as _, computed as w, ref as M, provide as _t, watch as te, nextTick as le, onMounted as Un, onBeforeUnmount as It, openBlock as c, createElementBlock as h, normalizeStyle as E, normalizeClass as p, createElementVNode as b, unref as u, renderSlot as Ue, Fragment as $, renderList as ee, withModifiers as N, createBlock as U, resolveDynamicComponent as he, createTextVNode as Je, toDisplayString as se, createCommentVNode as C, createVNode as Jn, withDirectives as Qe, vShow as Ft, Teleport as Dt, vModelText as Qn, isVNode as Zn, getCurrentInstance as er, inject as At, h as Lt } from "vue";
3
+ import { GiEmpty as tr } from "../empty/index.mjs";
4
+ const nr = {
5
+ /** 表格数据 */
6
+ data: { type: Array, default: () => [] },
7
+ /** 表格宽度 */
8
+ width: { type: [String, Number], default: void 0 },
9
+ /** 固定表头高度(超出滚动) */
10
+ height: { type: [String, Number], default: void 0 },
11
+ /** 最大高度(超出滚动) */
12
+ maxHeight: { type: [String, Number], default: void 0 },
13
+ /** 斑马纹 */
14
+ stripe: { type: Boolean, default: !1 },
15
+ /** 纵向边框 */
16
+ border: { type: Boolean, default: !1 },
17
+ /** 尺寸 */
18
+ size: { type: String, default: "default" },
19
+ /** 列宽是否自适应 */
20
+ fit: { type: Boolean, default: !0 },
21
+ /** 是否显示表头 */
22
+ showHeader: { type: Boolean, default: !0 },
23
+ /** 高亮当前行 */
24
+ highlightCurrentRow: { type: Boolean, default: !1 },
25
+ /** 当前行 key */
26
+ currentRowKey: { type: [String, Number], default: void 0 },
27
+ /** 行数据唯一 key(字段名或取值函数) */
28
+ rowKey: { type: [String, Function], default: "" },
29
+ /** 空数据文案 */
30
+ emptyText: { type: String, default: "暂无数据" },
31
+ /** 行类名 */
32
+ rowClassName: { type: [String, Function], default: void 0 },
33
+ /** 行内联样式 */
34
+ rowStyle: { type: [Object, Function], default: void 0 },
35
+ /** 单元格类名 */
36
+ cellClassName: { type: [String, Function], default: void 0 },
37
+ /** 单元格内联样式 */
38
+ cellStyle: { type: [Object, Function], default: void 0 },
39
+ /** 表头行类名 */
40
+ headerRowClassName: { type: [String, Function], default: void 0 },
41
+ /** 表头行样式 */
42
+ headerRowStyle: { type: [Object, Function], default: void 0 },
43
+ /** 表头单元格类名 */
44
+ headerCellClassName: { type: [String, Function], default: void 0 },
45
+ /** 表头单元格样式 */
46
+ headerCellStyle: { type: [Object, Function], default: void 0 },
47
+ /** 默认排序列 */
48
+ defaultSort: { type: Object, default: void 0 },
49
+ /** 表格布局 */
50
+ tableLayout: { type: String, default: "fixed" },
51
+ /** 选择变化时是否保持选中(数据刷新后按 rowKey 保留) */
52
+ reserveSelection: { type: Boolean, default: !1 },
53
+ /** 显示汇总行 */
54
+ showSummary: { type: Boolean, default: !1 },
55
+ /** 汇总行首列文案 */
56
+ sumText: { type: String, default: "合计" },
57
+ /** 自定义汇总方法 */
58
+ summaryMethod: { type: Function, default: void 0 },
59
+ /** 合并单元格 */
60
+ spanMethod: { type: Function, default: void 0 },
61
+ /** 半选时点击表头复选框是否全选 */
62
+ selectOnIndeterminate: { type: Boolean, default: !0 },
63
+ /** 默认展开所有行(展开行 / 树形) */
64
+ defaultExpandAll: { type: Boolean, default: !1 },
65
+ /** 默认展开的行 key */
66
+ expandRowKeys: { type: Array, default: () => [] },
67
+ /** 行是否可展开 */
68
+ rowExpandable: { type: Function, default: void 0 },
69
+ /** 折叠后是否保留展开内容 DOM */
70
+ preserveExpandedContent: { type: Boolean, default: !1 },
71
+ /** 溢出 tooltip 主题 */
72
+ tooltipEffect: { type: String, default: "dark" },
73
+ /** 溢出 tooltip 配置 */
74
+ tooltipOptions: { type: Object, default: void 0 },
75
+ /** 溢出 tooltip 内容格式化 */
76
+ tooltipFormatter: { type: Function, default: void 0 },
77
+ /** 全表默认开启溢出 tooltip */
78
+ showOverflowTooltip: { type: [Boolean, Object], default: !1 },
79
+ /** 树形缩进 px */
80
+ indent: { type: Number, default: 16 },
81
+ /** 树形字段配置 */
82
+ treeProps: { type: Object, default: () => ({}) },
83
+ /** 是否懒加载子节点 */
84
+ lazy: { type: Boolean, default: !1 },
85
+ /** 懒加载方法 */
86
+ load: { type: Function, default: void 0 },
87
+ /** 始终显示滚动条 */
88
+ scrollbarAlwaysOn: { type: Boolean, default: !1 },
89
+ /** 列宽弹性:主列不被内容撑开 */
90
+ flexible: { type: Boolean, default: !1 },
91
+ /** 是否允许拖拽最后一列宽度 */
92
+ allowDragLastColumn: { type: Boolean, default: !1 },
93
+ /** 使用原生滚动条 */
94
+ nativeScrollbar: { type: Boolean, default: !0 },
95
+ /** 允许拖拽表头调整列顺序(仅平铺列生效) */
96
+ columnDrag: { type: Boolean, default: !1 },
97
+ /** 筛选面板挂载点 */
98
+ appendFilterPanelTo: { type: String, default: "" },
99
+ /** 行虚拟滚动:开启后只渲染可视区行,需配合固定 rowHeight(默认关闭) */
100
+ virtual: { type: Boolean, default: !1 },
101
+ /** 虚拟滚动的行高,开启 virtual 时必填 */
102
+ rowHeight: { type: Number, default: 48 },
103
+ /** 虚拟滚动的上下缓冲行数 */
104
+ virtualOverscan: { type: Number, default: 3 },
105
+ /** AI 语义目标码 */
106
+ aiTarget: { type: String, default: void 0 }
107
+ }, rr = {
108
+ /** 字段名 */
109
+ prop: { type: String, default: void 0 },
110
+ /** 字段名别名 */
111
+ property: { type: String, default: void 0 },
112
+ /** 列标题 */
113
+ label: { type: String, default: "" },
114
+ /** 固定宽度 */
115
+ width: { type: [String, Number], default: void 0 },
116
+ /** 最小宽度 */
117
+ minWidth: { type: [String, Number], default: void 0 },
118
+ /** 固定列:left / right */
119
+ fixed: { type: [String, Boolean], default: void 0 },
120
+ /** 内容对齐 */
121
+ align: { type: String, default: void 0 },
122
+ /** 表头对齐 */
123
+ headerAlign: { type: String, default: void 0 },
124
+ /** 可排序 */
125
+ sortable: { type: [Boolean, String], default: !1 },
126
+ /** 自定义排序方法 */
127
+ sortMethod: { type: Function, default: void 0 },
128
+ /** 自定义排序触发字段 */
129
+ sortBy: { type: [String, Array, Function], default: void 0 },
130
+ /** 排序顺序 */
131
+ sortOrders: { type: Array, default: () => ["ascending", "descending", null] },
132
+ /** 单元格格式化 */
133
+ formatter: { type: Function, default: void 0 },
134
+ /** 内容溢出显示 tooltip */
135
+ showOverflowTooltip: { type: [Boolean, Object], default: void 0 },
136
+ /** 溢出 tooltip 内容格式化 */
137
+ tooltipFormatter: { type: Function, default: void 0 },
138
+ /** 列类型:默认 / 选择 / 序号 / 展开 */
139
+ type: { type: String, default: "default" },
140
+ /** 序号列起始值与格式化 */
141
+ index: { type: [Number, Function], default: void 0 },
142
+ /** 单元格类名 */
143
+ className: { type: [String, Function], default: "" },
144
+ /** 表头类名 */
145
+ labelClassName: { type: [String, Function], default: "" },
146
+ /** 是否可拖拽列宽 */
147
+ resizable: { type: Boolean, default: !0 },
148
+ /** 该行是否可勾选 */
149
+ selectable: { type: Function, default: void 0 },
150
+ /** 选择是否跨数据刷新保留(列级) */
151
+ reserveSelection: { type: Boolean, default: !1 },
152
+ /** 排序项(筛选选项) */
153
+ filters: { type: Array, default: void 0 },
154
+ /** 自定义筛选方法 */
155
+ filterMethod: { type: Function, default: void 0 },
156
+ /** 筛选是否多选 */
157
+ filterMultiple: { type: Boolean, default: !0 },
158
+ /** 筛选面板位置 */
159
+ filterPlacement: { type: String, default: "" },
160
+ /** 受控筛选值 */
161
+ filteredValue: { type: Array, default: void 0 },
162
+ /** 筛选面板类名 */
163
+ filterClassName: { type: String, default: "" },
164
+ /** 筛选列标识 */
165
+ columnKey: { type: String, default: "" },
166
+ /** 树形节点列(显示展开箭头) */
167
+ treeNode: { type: Boolean, default: !1 },
168
+ /** AI 语义目标码 */
169
+ aiTarget: { type: String, default: void 0 }
170
+ }, or = {
171
+ select: (k, S) => !0,
172
+ "select-all": (k) => !0,
173
+ "selection-change": (k) => !0,
174
+ "cell-mouse-enter": (k, S, F, I) => !0,
175
+ "cell-mouse-leave": (k, S, F, I) => !0,
176
+ "cell-click": (k, S, F, I) => !0,
177
+ "cell-dblclick": (k, S, F, I) => !0,
178
+ "cell-contextmenu": (k, S, F, I) => !0,
179
+ "row-click": (k, S, F) => !0,
180
+ "row-dblclick": (k, S, F) => !0,
181
+ "row-contextmenu": (k, S, F) => !0,
182
+ "header-click": (k, S) => !0,
183
+ "header-contextmenu": (k, S) => !0,
184
+ "sort-change": (k) => !0,
185
+ "filter-change": (k) => !0,
186
+ "current-change": (k, S) => !0,
187
+ "header-dragend": (k, S, F, I) => !0,
188
+ "column-order-change": (k) => Array.isArray(k),
189
+ "expand-change": (k, S) => !0,
190
+ scroll: (k) => !0
191
+ }, Kt = Symbol("gi-table"), Bt = Symbol("gi-table-column-children"), lr = ["data-ai-target"], sr = ["aria-rowcount"], ar = ["width"], ir = ["colspan", "rowspan", "data-column-uid", "draggable", "onDragstart", "onDragover", "onDrop", "onClick", "onContextmenu"], ur = ["checked", ".indeterminate"], cr = ["onClick"], dr = ["onClick"], pr = {
192
+ key: 1,
193
+ viewBox: "0 0 16 16",
194
+ width: "14",
195
+ height: "14",
196
+ "aria-hidden": "true"
197
+ }, fr = ["onMousedown"], hr = ["colspan"], vr = ["data-row-key", "onClick", "onDblclick", "onContextmenu"], mr = ["rowspan", "colspan", "data-column-uid", "onClick", "onDblclick", "onContextmenu", "onMouseenter", "onMouseleave"], yr = ["checked", "disabled", "onChange"], gr = ["onClick"], br = ["onClick"], wr = ["colspan"], xr = ["colspan"], kr = ["colspan"], Cr = ["data-column-uid"], Sr = ["aria-selected", "onClick"], Tr = /* @__PURE__ */ Ht({
198
+ name: "GiTable",
199
+ __name: "table",
200
+ props: nr,
201
+ emits: or,
202
+ setup(k, { expose: S, emit: F }) {
203
+ const I = (e) => e.render(), Oe = (e) => e.render(), G = (e) => e.render(), ve = (e) => e.render(), O = (e) => Zn(e.render()) ? e.render() : String(e.render() ?? ""), s = k, m = F, i = Nt("table"), x = _([]), J = (e) => {
204
+ x.some((t) => t.uid === e.uid) || x.push(e);
205
+ }, ae = (e) => {
206
+ const t = x.findIndex((n) => n.uid === e);
207
+ t > -1 && x.splice(t, 1);
208
+ }, K = (e) => {
209
+ const t = [], n = (l) => {
210
+ l.forEach((r) => {
211
+ r.children && r.children.length ? n(r.children) : t.push(r);
212
+ });
213
+ };
214
+ return n(e), t;
215
+ }, me = w(() => K(x)), Q = M([]), y = w(() => {
216
+ if (!s.columnDrag) return me.value;
217
+ const e = me.value, t = [];
218
+ return Q.value.forEach((n) => {
219
+ const l = e.find((r) => r.uid === n);
220
+ l && t.push(l);
221
+ }), e.forEach((n) => {
222
+ t.includes(n) || t.push(n);
223
+ }), t;
224
+ }), Ze = w(() => s.columnDrag && x.every((t) => !t.children || !t.children.length) ? y.value : x), et = (e) => e.children && e.children.length ? e.children.reduce((t, n) => t + et(n), 0) : 1, tt = (e) => e.children && e.children.length ? 1 + Math.max(...e.children.map(tt)) : 1, Vt = w(() => {
225
+ const e = Math.max(1, ...Ze.value.map(tt)), t = [], n = (l, r) => {
226
+ t[r] = t[r] || [], l.forEach((o) => {
227
+ const a = !!(o.children && o.children.length);
228
+ t[r].push({
229
+ column: o,
230
+ colspan: et(o),
231
+ rowspan: a ? 1 : e - r
232
+ }), a && n(o.children, r + 1);
233
+ });
234
+ };
235
+ return n(Ze.value, 0), t;
236
+ }), ne = (e) => e === void 0 ? void 0 : typeof e == "number" || /^\d+(\.\d+)?$/.test(String(e).trim()) ? `${e}px` : e, Ee = _({}), zt = (e) => {
237
+ const t = Ee[e.uid];
238
+ if (t) return `${t}px`;
239
+ const n = e.props.width;
240
+ return n !== void 0 && n !== "" ? ne(n) : e.props.type === "selection" ? "48px" : e.props.type === "index" ? "60px" : e.props.type === "expand" ? "40px" : ne(e.props.minWidth) ?? void 0;
241
+ }, Pt = (e) => ({
242
+ minWidth: ne(e.props.minWidth)
243
+ }), jt = w(() => ({
244
+ width: ne(s.width)
245
+ })), Xt = w(() => ({
246
+ height: ne(s.height),
247
+ maxHeight: ne(s.maxHeight),
248
+ overflowY: s.height || s.maxHeight ? "auto" : void 0,
249
+ overflowX: "auto"
250
+ })), Gt = w(() => ({
251
+ tableLayout: s.tableLayout === "auto" ? "auto" : "fixed",
252
+ width: s.fit ? "100%" : "auto"
253
+ })), V = M(
254
+ s.defaultSort ? { prop: s.defaultSort.prop, order: s.defaultSort.order } : null
255
+ ), nt = (e) => y.value.find((t) => (t.props.prop || t.props.property) === e), Re = (e) => V.value && (e.props.prop || e.props.property) === V.value.prop ? V.value.order : null, Yt = (e, t) => {
256
+ const n = e.props.prop || e.props.property || "", l = e.props.sortBy;
257
+ if (e.props.sortMethod) return (o, a) => t * e.props.sortMethod(o, a);
258
+ const r = (o, a) => typeof l == "function" ? l(o, a) : Array.isArray(l) ? l.map((f) => o[f]) : typeof l == "string" ? o[l] : o[n];
259
+ return (o, a) => {
260
+ const f = r(o, 0), g = r(a, 0), d = f == null || f === "", R = g == null || g === "";
261
+ return d && R ? 0 : d ? -1 * t : R ? 1 * t : typeof f == "number" && typeof g == "number" ? (f - g) * t : f instanceof Date && g instanceof Date ? (f.getTime() - g.getTime()) * t : String(f).localeCompare(String(g), "zh-CN") * t;
262
+ };
263
+ }, D = _({}), z = (e) => e.props.columnKey || e.props.prop || e.props.property || "", rt = (e) => {
264
+ var t;
265
+ return !!((t = e.props.filters) != null && t.length) || !!e.props.filterMethod;
266
+ }, ot = () => {
267
+ y.value.forEach((e) => {
268
+ if (e.props.filteredValue) {
269
+ const t = z(e);
270
+ t && (D[t] = [...e.props.filteredValue]);
271
+ }
272
+ });
273
+ }, Me = w(
274
+ () => y.value.filter((e) => rt(e) && (D[z(e)] || []).length > 0)
275
+ ), ye = (e) => Me.value.every((t) => {
276
+ const n = D[z(t)] || [], l = t.props.prop || t.props.property || "";
277
+ return t.props.filterMethod ? n.some((r) => t.props.filterMethod(r, e, t.props)) : n.includes(e[l]);
278
+ }), P = _(/* @__PURE__ */ new Set()), lt = _(/* @__PURE__ */ new Set()), A = (e, t = -1) => {
279
+ if (typeof s.rowKey == "function") return String(s.rowKey(e));
280
+ if (s.rowKey) return String(e[s.rowKey]);
281
+ const n = t > -1 ? t : s.data.indexOf(e);
282
+ return String(n);
283
+ }, ge = () => {
284
+ var e;
285
+ return ((e = s.treeProps) == null ? void 0 : e.children) || "children";
286
+ }, $e = () => {
287
+ var e;
288
+ return ((e = s.treeProps) == null ? void 0 : e.hasChildren) || "hasChildren";
289
+ }, Y = (e) => {
290
+ const t = e[ge()];
291
+ return Array.isArray(t) ? t : [];
292
+ }, be = (e) => P.has(e), qt = (e) => be(e.key) || s.preserveExpandedContent && lt.has(e.key), Ut = (e) => {
293
+ if (!s.rowKey && !s.defaultExpandAll) {
294
+ const t = String(e.__giKey ?? (s.data.indexOf(e) > -1 ? s.data.indexOf(e) : ""));
295
+ return P.has(t);
296
+ }
297
+ return P.has(A(e));
298
+ }, st = w(() => {
299
+ const e = V.value, t = e ? nt(e.prop) : void 0;
300
+ return ((l, r) => {
301
+ let o = l;
302
+ return e && e.order && t && t.props.sortable !== "custom" && (o = [...o].sort(Yt(t, e.order === "ascending" ? 1 : -1))), Me.value.length && (o = o.filter((a) => ye(a) ? !0 : Y(a).some((f) => ye(f)))), o.length, o;
303
+ })(s.data);
304
+ }), Fe = w(() => {
305
+ const e = (t) => t.filter((n) => ye(n) || Y(n).some((l) => ye(l))).map((n) => Y(n).length ? { ...n, [ge()]: e(Y(n)) } : n);
306
+ return Me.value.length ? e(st.value) : st.value;
307
+ }), De = _(/* @__PURE__ */ new Set()), j = w(() => {
308
+ const e = [], t = (n, l, r) => {
309
+ n.forEach((o) => {
310
+ const a = A(o, e.length), f = Y(o), g = f.length > 0 || s.lazy && !!o[$e()];
311
+ e.push({
312
+ row: o,
313
+ rowIndex: e.length,
314
+ level: l,
315
+ key: a,
316
+ parentKey: r,
317
+ hasChildren: g,
318
+ loading: De.has(a)
319
+ }), g && P.has(a) && f.length && t(f, l + 1, a);
320
+ });
321
+ };
322
+ return t(Fe.value, 0, null), e;
323
+ }), at = M(0), Ae = M(0), Jt = w(
324
+ () => s.virtual && s.rowHeight > 0 && !s.spanMethod && !oe.value && !bt.value && j.value.length > 20
325
+ ), ie = w(() => {
326
+ const e = j.value;
327
+ if (!Jt.value) return { rows: e, start: 0, topPad: 0, bottomPad: 0 };
328
+ const t = s.rowHeight, n = Ae.value || 400, l = Math.max(0, s.virtualOverscan), r = Math.max(0, Math.floor(at.value / t) - l), o = Math.min(e.length, r + Math.ceil(n / t) + l * 2 + 1);
329
+ return {
330
+ rows: e.slice(r, o),
331
+ start: r,
332
+ topPad: r * t,
333
+ bottomPad: Math.max(0, (e.length - o) * t)
334
+ };
335
+ }), it = w(() => {
336
+ const e = {}, t = /* @__PURE__ */ new Set();
337
+ return s.spanMethod ? (j.value.forEach((n, l) => {
338
+ y.value.forEach((r, o) => {
339
+ if (t.has(`${l}-${o}`)) return;
340
+ const a = s.spanMethod({
341
+ row: n.row,
342
+ rowIndex: l,
343
+ column: r.props,
344
+ columnIndex: o
345
+ });
346
+ if (!a) return;
347
+ const [f, g] = Array.isArray(a) ? a : [a.rowspan, a.colspan];
348
+ if (!(f < 1 && g < 1)) {
349
+ e[`${l}-${o}`] = { rowspan: f, colspan: g };
350
+ for (let d = 0; d < f; d++)
351
+ for (let R = 0; R < g; R++)
352
+ d === 0 && R === 0 || t.add(`${l + d}-${o + R}`);
353
+ }
354
+ });
355
+ }), { map: e, hidden: t }) : { map: e, hidden: t };
356
+ }), ut = (e, t) => it.value.map[`${e}-${t}`], Qt = (e, t) => it.value.hidden.has(`${e}-${t}`), L = M(), ct = M(), Le = _({}), dt = (e) => !!e.props.fixed, pt = (e) => e.props.fixed === "right" ? "right" : "left", W = () => {
357
+ le(() => {
358
+ const e = ct.value;
359
+ if (!e) return;
360
+ const t = (r) => {
361
+ const o = e.querySelector(`th[data-column-uid="${r}"]`) || e.querySelector(`td[data-column-uid="${r}"]`);
362
+ return o ? o.getBoundingClientRect().width : 0;
363
+ };
364
+ let n = 0;
365
+ y.value.forEach((r) => {
366
+ !r.props.fixed || r.props.fixed === "right" || (Le[r.uid] = { left: `${Math.round(n)}px` }, n += t(r.uid));
367
+ });
368
+ let l = 0;
369
+ for (let r = y.value.length - 1; r >= 0; r--) {
370
+ const o = y.value[r];
371
+ o.props.fixed === "right" && (Le[o.uid] = { right: `${Math.round(l)}px` }, l += t(o.uid));
372
+ }
373
+ });
374
+ }, Be = (e) => {
375
+ if (!e.props.fixed) return;
376
+ const t = Le[e.uid];
377
+ return e.props.fixed === "right" ? { right: (t == null ? void 0 : t.right) ?? "0px" } : { left: (t == null ? void 0 : t.left) ?? "0px" };
378
+ }, ue = M("left"), Zt = w(() => i.is(`scrolling-${ue.value}`)), Ne = M(), We = M(), B = M({ hVisible: !1, vVisible: !1, hThumb: 0, hOffset: 0, vThumb: 0, vOffset: 0 }), q = () => {
379
+ var a, f;
380
+ const e = L.value;
381
+ if (!e || s.nativeScrollbar) {
382
+ B.value = { hVisible: !1, vVisible: !1, hThumb: 0, hOffset: 0, vThumb: 0, vOffset: 0 };
383
+ return;
384
+ }
385
+ const t = e.scrollWidth - e.clientWidth, n = e.scrollHeight - e.clientHeight, l = { ...B.value, hVisible: t > 1, vVisible: n > 1 }, r = ((a = Ne.value) == null ? void 0 : a.clientWidth) || e.clientWidth, o = ((f = We.value) == null ? void 0 : f.clientHeight) || e.clientHeight;
386
+ if (l.hVisible) {
387
+ const g = e.clientWidth / e.scrollWidth;
388
+ l.hThumb = Math.max(28, Math.round(r * g)), l.hOffset = t ? e.scrollLeft / t * (r - l.hThumb) : 0;
389
+ } else
390
+ l.hThumb = 0, l.hOffset = 0;
391
+ if (l.vVisible) {
392
+ const g = e.clientHeight / e.scrollHeight;
393
+ l.vThumb = Math.max(28, Math.round(o * g)), l.vOffset = n ? e.scrollTop / n * (o - l.vThumb) : 0;
394
+ } else
395
+ l.vThumb = 0, l.vOffset = 0;
396
+ B.value = l;
397
+ };
398
+ let re = null;
399
+ const ft = (e, t) => {
400
+ const n = L.value;
401
+ if (!n) return;
402
+ const l = e === "h" ? Ne.value : We.value;
403
+ if (!l) return;
404
+ const r = e === "h" ? l.clientWidth : l.clientHeight, o = e === "h" ? B.value.hThumb : B.value.vThumb, a = Math.max(1, r - o), f = e === "h" ? n.scrollWidth - n.clientWidth : n.scrollHeight - n.clientHeight;
405
+ re = {
406
+ axis: e,
407
+ start: e === "h" ? t.clientX : t.clientY,
408
+ startScroll: e === "h" ? n.scrollLeft : n.scrollTop,
409
+ range: a
410
+ }, document.addEventListener("mousemove", He), document.addEventListener("mouseup", _e);
411
+ const g = e === "h" ? B.value.hOffset : B.value.vOffset, d = (e === "h" ? t.clientX : t.clientY) - l.getBoundingClientRect()[e === "h" ? "left" : "top"];
412
+ if (d < g || d > g + o) {
413
+ const R = Math.min(Math.max(0, (d - o / 2) / a * f), f);
414
+ e === "h" ? n.scrollLeft = R : n.scrollTop = R, re.start = e === "h" ? t.clientX : t.clientY, re.startScroll = e === "h" ? n.scrollLeft : n.scrollTop, q();
415
+ }
416
+ t.preventDefault();
417
+ }, He = (e) => {
418
+ const t = L.value;
419
+ if (!re || !t) return;
420
+ const n = re, l = (n.axis === "h" ? e.clientX : e.clientY) - n.start, r = n.axis === "h" ? t.scrollWidth - t.clientWidth : t.scrollHeight - t.clientHeight, o = Math.min(Math.max(0, n.startScroll + l / n.range * r), r);
421
+ n.axis === "h" ? t.scrollLeft = o : t.scrollTop = o, q();
422
+ }, _e = () => {
423
+ re = null, document.removeEventListener("mousemove", He), document.removeEventListener("mouseup", _e);
424
+ }, ht = (e) => {
425
+ const t = e.scrollWidth - e.clientWidth;
426
+ t <= 0 || e.scrollLeft <= 1 ? ue.value = "left" : e.scrollLeft >= t - 1 ? ue.value = "right" : ue.value = "middle";
427
+ };
428
+ let ce = 0;
429
+ const en = (e) => {
430
+ const t = e.target;
431
+ at.value = t.scrollTop, q(), !ce && (ce = requestAnimationFrame(() => {
432
+ ce = 0, ht(t), ke(), Xe(), m("scroll", { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop });
433
+ }));
434
+ }, X = M(null), tn = w(() => s.currentRowKey !== void 0 ? String(s.currentRowKey) : X.value ? A(X.value) : ""), nn = (e) => s.highlightCurrentRow && e === tn.value, Ie = (e) => {
435
+ if (!s.highlightCurrentRow || e === X.value) return;
436
+ const t = X.value;
437
+ X.value = e, m("current-change", e, t);
438
+ }, T = M([]), vt = w(() => {
439
+ const e = /* @__PURE__ */ new Set();
440
+ return T.value.forEach((t) => e.add(A(t))), e;
441
+ }), Ke = (e) => vt.value.has(e), rn = w(() => y.value.find((e) => e.props.type === "selection")), mt = (e, t, n) => !e || !e.props.selectable ? !0 : !!e.props.selectable(t, n), Ve = w(
442
+ () => j.value.filter((e) => mt(rn.value, e.row, e.rowIndex)).map((e) => e.row)
443
+ ), ze = (e) => Ke(A(e)), Pe = (e, t) => {
444
+ const n = A(e);
445
+ t ?? !ze(e) ? ze(e) || (T.value = [...T.value, e]) : T.value = T.value.filter((r) => A(r) !== n), m("select", [...T.value], e), m("selection-change", [...T.value]);
446
+ }, we = w(
447
+ () => Ve.value.length > 0 && vt.value.size > 0 && Ve.value.every((e) => Ke(A(e)))
448
+ ), yt = w(() => T.value.length > 0 && !we.value), xe = (e) => {
449
+ const t = e ?? !we.value;
450
+ T.value = t ? [...Ve.value] : [], m("select-all", [...T.value]), m("selection-change", [...T.value]);
451
+ }, on = (e) => {
452
+ const t = e.target.checked;
453
+ if (yt.value && !s.selectOnIndeterminate) {
454
+ xe(!1);
455
+ return;
456
+ }
457
+ xe(t);
458
+ }, oe = w(() => y.value.find((e) => e.props.type === "expand")), ln = (e, t) => s.rowExpandable ? !!s.rowExpandable(e, t) : !!oe.value, sn = (e) => {
459
+ const t = j.value.filter((n) => Ut(n.row)).map((n) => n.row);
460
+ m("expand-change", e, t);
461
+ }, je = (e, t) => {
462
+ const n = A(e), l = t ?? !P.has(n);
463
+ l ? (P.add(n), lt.add(n)) : P.delete(n), l && s.lazy && !Y(e).length && s.load && (De.add(n), s.load(e, {
464
+ level: 0,
465
+ key: n,
466
+ parentKey: null,
467
+ expanded: !0,
468
+ hasChildren: !0,
469
+ loading: !0,
470
+ indent: 0
471
+ }, (r) => {
472
+ e[ge()] = r, e[$e()] = r.length > 0, De.delete(n), W();
473
+ })), sn(e), W();
474
+ }, an = (e, t, n) => {
475
+ const l = e.props.prop || e.props.property || "", r = l ? t[l] : "";
476
+ return e.props.formatter ? String(e.props.formatter(t, e.props, r, n) ?? "") : r == null ? "" : String(r);
477
+ }, un = (e, t) => {
478
+ const n = e.props.index;
479
+ return typeof n == "function" ? n(t) : typeof n == "number" ? n + t : t + 1;
480
+ }, gt = (e) => {
481
+ var t;
482
+ return e.props.type !== "default" ? !1 : e.props.treeNode ? !0 : ((t = y.value[0]) == null ? void 0 : t.uid) === e.uid && bt.value;
483
+ }, bt = w(() => {
484
+ var n;
485
+ const e = ((n = s.treeProps) == null ? void 0 : n.children) || "children";
486
+ return ((l) => l.some((r) => Array.isArray(r[e]) && r[e].length > 0))(s.data);
487
+ }), cn = (e, t) => {
488
+ if (!(!e.level || !gt(t)))
489
+ return { paddingLeft: `${e.level * s.indent}px` };
490
+ }, dn = (e, t) => {
491
+ const n = s.rowClassName;
492
+ return typeof n == "function" ? n({ row: e, rowIndex: t }) || "" : n || "";
493
+ }, pn = (e, t) => {
494
+ const n = s.rowStyle;
495
+ return typeof n == "function" ? n({ row: e, rowIndex: t }) : n;
496
+ }, fn = (e, t, n, l) => {
497
+ const r = s.cellClassName, o = n.props.className, a = [];
498
+ if (typeof r == "function") {
499
+ const f = r({ row: e, rowIndex: t, column: n.props, columnIndex: l });
500
+ f && a.push(f);
501
+ } else r && a.push(r);
502
+ if (typeof o == "function") {
503
+ const f = o({ row: e, rowIndex: t, column: n.props, columnIndex: l });
504
+ f && a.push(f);
505
+ } else o && a.push(o);
506
+ return a;
507
+ }, hn = (e, t, n, l) => {
508
+ const r = s.cellStyle, o = {
509
+ textAlign: n.props.align || void 0
510
+ };
511
+ return typeof r == "function" ? Object.assign(o, r({ row: e, rowIndex: t, column: n.props, columnIndex: l })) : r && Object.assign(o, r), o;
512
+ }, vn = (e) => {
513
+ const t = s.headerRowClassName;
514
+ return typeof t == "function" ? t({ row: {}, rowIndex: e }) : t || "";
515
+ }, mn = (e) => {
516
+ const t = s.headerRowStyle;
517
+ return typeof t == "function" ? t({ row: {}, rowIndex: e }) : t;
518
+ }, yn = (e, t) => {
519
+ const n = e.column, l = [];
520
+ n.props.labelClassName && (typeof n.props.labelClassName == "function" ? l.push(n.props.labelClassName({ column: n.props, columnIndex: 0 })) : l.push(n.props.labelClassName)), n.props.sortable && l.push(i.is("sortable")), dt(n) && l.push(i.is(`fixed-${pt(n)}`));
521
+ const r = s.headerCellClassName;
522
+ return typeof r == "function" ? l.push(r({ row: {}, rowIndex: t, column: n.props, columnIndex: 0 }) || "") : r && l.push(r), e.colspan > 1 && l.push(i.is("header-group")), l;
523
+ }, gn = (e, t, n) => {
524
+ const l = e.column, r = s.headerCellStyle, o = typeof r == "function" ? r({ row: {}, rowIndex: t, column: l.props, columnIndex: n }) : r;
525
+ return {
526
+ textAlign: l.props.headerAlign || l.props.align || void 0,
527
+ ...Be(l),
528
+ ...o || {}
529
+ };
530
+ }, wt = (e) => e.props.type === "default" && (e.props.showOverflowTooltip ?? s.showOverflowTooltip), H = _({
531
+ visible: !1,
532
+ x: 0,
533
+ y: 0,
534
+ content: "",
535
+ effect: "dark"
536
+ });
537
+ let de;
538
+ const Xe = () => {
539
+ de && clearTimeout(de), H.visible = !1;
540
+ }, bn = (e, t) => {
541
+ if (!e) return;
542
+ const n = typeof s.tooltipOptions == "object" && s.tooltipOptions ? s.tooltipOptions : {};
543
+ H.effect = n.effect || s.tooltipEffect || "dark", H.content = e, H.x = Math.round(t.left + t.width / 2), H.y = Math.round(t.top - 8), H.visible = !0;
544
+ }, wn = (e, t) => {
545
+ m("header-click", e.props, t), e.props.sortable && xt(e);
546
+ }, xt = (e) => {
547
+ var a;
548
+ const t = e.props.prop || e.props.property;
549
+ if (!t) return;
550
+ const n = (a = e.props.sortOrders) != null && a.length ? [...e.props.sortOrders] : ["ascending", "descending", null], l = Re(e), r = n.indexOf(l), o = n[(r + 1) % n.length];
551
+ V.value = { prop: t, order: o }, m("sort-change", { prop: t, order: o, column: e.props });
552
+ }, xn = (e, t) => {
553
+ s.highlightCurrentRow && Ie(e), m("row-click", e, null, t);
554
+ }, kn = (e, t) => m("row-dblclick", e, null, t), Cn = (e, t, n, l) => m("cell-click", e, n.props, l.currentTarget || null, l), Sn = (e, t, n, l) => m("cell-dblclick", e, n.props, l.currentTarget || null, l), Tn = (e, t, n, l) => m("cell-contextmenu", e, n.props, l.currentTarget || null, l), On = (e, t, n, l) => {
555
+ var R;
556
+ const r = l.currentTarget;
557
+ if (m("cell-mouse-enter", e, n.props, r, l), !wt(n)) return;
558
+ const o = r.querySelector(".gi-table__cell-text");
559
+ if (!o || !(o.scrollWidth > o.clientWidth + 1)) return;
560
+ const f = n.props.tooltipFormatter ? n.props.tooltipFormatter({
561
+ row: e,
562
+ rowIndex: t,
563
+ column: n.props,
564
+ columnIndex: 0,
565
+ cellValue: n.props.prop ? e[n.props.prop] : ""
566
+ }) : s.tooltipFormatter ? s.tooltipFormatter({
567
+ row: e,
568
+ rowIndex: t,
569
+ column: n.props,
570
+ columnIndex: 0,
571
+ cellValue: n.props.prop ? e[n.props.prop] : ""
572
+ }) : o.textContent || "", g = r.getBoundingClientRect();
573
+ de && clearTimeout(de);
574
+ const d = typeof s.tooltipOptions == "object" && ((R = s.tooltipOptions) == null ? void 0 : R.showAfter) || 300;
575
+ de = setTimeout(() => bn(f, g), d);
576
+ }, En = (e, t, n, l) => {
577
+ m("cell-mouse-leave", e, n.props, l.currentTarget || null, l), Xe();
578
+ }, v = _({
579
+ open: !1,
580
+ column: null,
581
+ x: 0,
582
+ y: 0,
583
+ transform: "",
584
+ keyword: "",
585
+ draft: [],
586
+ filters: []
587
+ }), Rn = w(() => {
588
+ const e = v.keyword.trim();
589
+ return e ? v.filters.filter((t) => String(t.text).includes(e)) : v.filters;
590
+ }), pe = (e) => v.draft.includes(e), Mn = (e) => {
591
+ const t = v.column;
592
+ t && (t.props.filterMultiple ? v.draft = pe(e) ? v.draft.filter((n) => n !== e) : [...v.draft, e] : v.draft = pe(e) ? [] : [e]);
593
+ }, $n = (e, t) => {
594
+ const n = t.currentTarget, l = (n.closest("th") || n).getBoundingClientRect(), r = z(e);
595
+ v.column = e, v.filters = e.props.filters || [], v.draft = [...D[r] || []], v.keyword = "";
596
+ const o = e.props.filterPlacement || "bottom-start", a = 6, f = o.endsWith("-end"), g = o.startsWith("top"), d = o.startsWith("right"), R = o.startsWith("left");
597
+ d ? (v.x = l.right + a, v.y = l.top, v.transform = "") : R ? (v.x = l.left - a, v.y = l.top, v.transform = "translateX(-100%)") : (v.x = f ? l.right : l.left, v.y = g ? l.top - a : l.bottom + a, v.transform = `${f ? "translateX(-100%)" : ""}${g ? " translateY(-100%)" : ""}`.trim()), v.open = !0;
598
+ }, ke = () => {
599
+ v.open = !1, v.column = null;
600
+ }, Fn = () => {
601
+ const e = v.column;
602
+ if (!e) return;
603
+ const t = z(e);
604
+ v.draft.length ? D[t] = [...v.draft] : delete D[t], m("filter-change", { ...D }), ke();
605
+ }, Dn = () => {
606
+ const e = v.column;
607
+ if (!e) return;
608
+ const t = z(e);
609
+ v.draft = [], delete D[t], m("filter-change", { ...D }), ke();
610
+ }, Ce = M(null), An = (e) => {
611
+ var n;
612
+ return e.props.resizable === !1 ? !1 : !(((n = y.value[y.value.length - 1]) == null ? void 0 : n.uid) === e.uid) || s.allowDragLastColumn;
613
+ }, Ln = (e, t) => {
614
+ const n = t.currentTarget.closest("th"), l = (n == null ? void 0 : n.offsetWidth) || 0;
615
+ Ce.value = { col: e, startX: t.clientX, startWidth: l, event: t }, document.addEventListener("mousemove", Ge), document.addEventListener("mouseup", Ye);
616
+ }, Ge = (e) => {
617
+ const t = Ce.value;
618
+ if (!t) return;
619
+ const n = Math.max(40, t.startWidth + (e.clientX - t.startX));
620
+ Ee[t.col.uid] = n, W();
621
+ }, Ye = (e) => {
622
+ const t = Ce.value;
623
+ if (document.removeEventListener("mousemove", Ge), document.removeEventListener("mouseup", Ye), !t) return;
624
+ const n = Ee[t.col.uid];
625
+ Ce.value = null, n && m("header-dragend", n, t.startWidth, t.col.props, e), W();
626
+ }, Z = M(null), Se = M(null), qe = (e) => !s.columnDrag || e.children && e.children.length || ["selection", "index", "expand"].includes(e.props.type || "") ? !1 : x.every((t) => !t.children || !t.children.length), Bn = (e, t) => {
627
+ qe(e) && (Z.value = e.uid, t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", String(e.uid))));
628
+ }, Nn = (e, t) => {
629
+ !Z.value || Z.value === e.uid || (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "move"), Se.value = e.uid);
630
+ }, Wn = (e, t) => {
631
+ const n = Z.value;
632
+ if (!n || n === e.uid) return;
633
+ t.preventDefault();
634
+ const l = y.value.map((o) => o.uid).filter((o) => o !== n), r = l.indexOf(e.uid);
635
+ l.splice(r < 0 ? l.length : r, 0, n), Q.value = l, Z.value = null, Se.value = null, m("column-order-change", l), le(() => {
636
+ W(), q();
637
+ });
638
+ }, Hn = () => {
639
+ Z.value = null, Se.value = null;
640
+ }, _n = (e, t) => {
641
+ const n = oe.value;
642
+ if (n) {
643
+ if (n.renderExpand)
644
+ return n.renderExpand({ expanded: !0, expandable: !0, row: e.row, $index: t });
645
+ if (n.hasSlot) return n.renderCell({ row: e.row, column: n.props, $index: t });
646
+ }
647
+ }, In = w(() => {
648
+ const e = y.value.map((n) => n.props);
649
+ if (s.summaryMethod) return s.summaryMethod({ columns: e, data: Fe.value });
650
+ const t = [];
651
+ return e.forEach((n, l) => {
652
+ if (l === 0) {
653
+ t.push(s.sumText);
654
+ return;
655
+ }
656
+ const r = n.prop || n.property;
657
+ if (!r || n.type !== "default") {
658
+ t.push("");
659
+ return;
660
+ }
661
+ const o = Fe.value.map((a) => Number(a[r])).filter((a) => !Number.isNaN(a));
662
+ t.push(o.length ? o.reduce((a, f) => a + f, 0) : "");
663
+ }), t;
664
+ }), kt = () => {
665
+ T.value = [], m("selection-change", []);
666
+ }, Ct = (e, t) => Pe(e, t), Te = () => [...T.value], Kn = (e) => Ie(e ?? null), St = (e, t) => {
667
+ const n = nt(e);
668
+ V.value = { prop: e, order: t }, m("sort-change", { prop: e, order: t, column: n == null ? void 0 : n.props });
669
+ }, Tt = () => {
670
+ V.value && (V.value = null, m("sort-change", { prop: "", order: null, column: void 0 }));
671
+ }, Ot = (e) => {
672
+ e != null && e.length ? y.value.forEach((t) => {
673
+ const n = z(t);
674
+ (e.includes(n) || t.props.columnKey && e.includes(t.props.columnKey)) && delete D[n];
675
+ }) : Object.keys(D).forEach((t) => delete D[t]), m("filter-change", { ...D });
676
+ }, Vn = () => {
677
+ W();
678
+ }, Et = (e, t) => {
679
+ const n = L.value;
680
+ n && (typeof e == "number" ? n.scrollTo({ left: e, top: t ?? 0 }) : n.scrollTo(e));
681
+ }, zn = (e) => {
682
+ L.value && (L.value.scrollLeft = e);
683
+ }, Pn = (e) => {
684
+ L.value && (L.value.scrollTop = e);
685
+ }, jn = (e, t) => je(e, t), Rt = () => xe(), Xn = (e, t) => {
686
+ const n = (r) => {
687
+ for (const o of r) {
688
+ if (A(o) === e) return o;
689
+ const a = n(Y(o));
690
+ if (a) return a;
691
+ }
692
+ }, l = n(s.data);
693
+ l && (l[ge()] = t, l[$e()] = !0);
694
+ }, Gn = () => {
695
+ var e;
696
+ if ((e = s.expandRowKeys) != null && e.length && s.expandRowKeys.forEach((t) => P.add(String(t))), s.defaultExpandAll) {
697
+ const t = (n) => {
698
+ n.forEach((l) => {
699
+ const r = Y(l);
700
+ r.length && (P.add(A(l)), t(r));
701
+ });
702
+ };
703
+ t(s.data);
704
+ }
705
+ };
706
+ _t(Kt, {
707
+ registerColumn: J,
708
+ unregisterColumn: ae,
709
+ sortState: () => V.value,
710
+ rowIndex: () => 0,
711
+ selectedRows: () => T.value,
712
+ isSelected: ze,
713
+ toggleRow: Pe,
714
+ toggleAll: xe,
715
+ size: () => s.size,
716
+ stripe: () => s.stripe,
717
+ border: () => s.border,
718
+ currentRow: () => X.value
719
+ }), te(
720
+ () => s.data,
721
+ () => {
722
+ if (!s.reserveSelection)
723
+ T.value = [];
724
+ else {
725
+ const e = new Set(s.data.map((t) => A(t)));
726
+ T.value = T.value.filter((t) => e.has(A(t)));
727
+ }
728
+ X.value && !s.data.includes(X.value) && (X.value = null), W();
729
+ }
730
+ ), te(() => s.currentRowKey, (e) => {
731
+ if (e === void 0) return;
732
+ const t = j.value.find((n) => n.key === String(e));
733
+ t && Ie(t.row);
734
+ }), te(y, () => {
735
+ ot(), W();
736
+ }, { deep: !1 }), te(
737
+ () => me.value.map((e) => e.uid),
738
+ (e) => {
739
+ const t = Q.value.filter((l) => e.includes(l)), n = e.filter((l) => !t.includes(l));
740
+ Q.value = [...t, ...n];
741
+ },
742
+ { immediate: !0 }
743
+ ), te(
744
+ () => s.nativeScrollbar,
745
+ () => le(q),
746
+ { immediate: !0 }
747
+ ), te(() => s.data, () => {
748
+ W(), le(q);
749
+ });
750
+ const Mt = (e) => {
751
+ if (!v.open) return;
752
+ const t = e.target;
753
+ t.closest(".gi-table__filter-panel") || t.closest(".gi-table__filter-icon") || ke();
754
+ }, Yn = w(() => [
755
+ i.b(),
756
+ i.bm(s.size),
757
+ s.stripe ? i.is("stripe") : "",
758
+ s.border ? i.is("border") : "",
759
+ s.scrollbarAlwaysOn ? i.is("scrollbar-always-on") : "",
760
+ s.nativeScrollbar ? "" : i.is("custom-scrollbar"),
761
+ s.columnDrag ? i.is("column-draggable") : "",
762
+ s.flexible ? i.is("flexible") : "",
763
+ Zt.value
764
+ ]);
765
+ let fe;
766
+ Un(() => {
767
+ ot(), Gn(), W(), $t(), document.addEventListener("mousedown", Mt), L.value && ht(L.value), le(q), typeof ResizeObserver < "u" && L.value && (fe = new ResizeObserver(() => {
768
+ $t(), W(), le(q);
769
+ }), fe.observe(L.value));
770
+ });
771
+ const $t = () => {
772
+ const e = L.value;
773
+ if (!e) return;
774
+ const t = e.clientHeight;
775
+ t && Math.abs(t - Ae.value) > 1 && (Ae.value = t);
776
+ };
777
+ return It(() => {
778
+ ce && cancelAnimationFrame(ce), document.removeEventListener("mousedown", Mt), document.removeEventListener("mousemove", Ge), document.removeEventListener("mouseup", Ye), document.removeEventListener("mousemove", He), document.removeEventListener("mouseup", _e), fe == null || fe.disconnect(), Xe();
779
+ }), S({
780
+ clearSelection: kt,
781
+ toggleRowSelection: Ct,
782
+ getSelectionRows: Te,
783
+ toggleAllSelection: Rt,
784
+ setCurrentRow: Kn,
785
+ toggleRowExpansion: jn,
786
+ clearSort: Tt,
787
+ clearFilter: Ot,
788
+ sort: St,
789
+ doLayout: Vn,
790
+ scrollTo: Et,
791
+ setScrollLeft: zn,
792
+ setScrollTop: Pn,
793
+ updateKeyChildren: Xn,
794
+ sortState: V,
795
+ columns: y,
796
+ rootColumns: x
797
+ }), qn({
798
+ code: s.aiTarget,
799
+ getValue: () => ({ data: s.data, selection: Te(), total: s.data.length }),
800
+ getRecords: () => Te().length ? Te() : s.data.slice(0, 50),
801
+ execute: (e, t) => e === "clearSelection" ? (kt(), !0) : e === "selectAll" ? (Rt(), !0) : e === "select" && (t != null && t.row) ? (Ct(t.row, !0), !0) : e === "sort" && (t != null && t.prop) ? (St(String(t.prop), t.order ?? "ascending"), !0) : e === "clearSort" ? (Tt(), !0) : e === "clearFilter" ? (Ot(), !0) : e === "scrollTo" ? (Et(t == null ? void 0 : t.top, t == null ? void 0 : t.left), !0) : { ok: !1, reason: "unsupported" },
802
+ isVisible: () => !0
803
+ }), (e, t) => {
804
+ var n, l;
805
+ return c(), h("div", {
806
+ class: p(Yn.value),
807
+ style: E(jt.value),
808
+ "data-ai-target": e.aiTarget || void 0
809
+ }, [
810
+ b("div", {
811
+ class: p(u(i).be("columns")),
812
+ "aria-hidden": "true"
813
+ }, [
814
+ Ue(e.$slots, "default")
815
+ ], 2),
816
+ b("div", {
817
+ ref_key: "scrollRef",
818
+ ref: L,
819
+ class: p(u(i).be("body-wrap")),
820
+ style: E(Xt.value),
821
+ onScroll: en
822
+ }, [
823
+ b("table", {
824
+ ref_key: "tableRef",
825
+ ref: ct,
826
+ class: p(u(i).be("inner")),
827
+ style: E(Gt.value),
828
+ role: "grid",
829
+ "aria-rowcount": j.value.length
830
+ }, [
831
+ b("colgroup", null, [
832
+ (c(!0), h($, null, ee(y.value, (r) => (c(), h("col", {
833
+ key: `col-${r.uid}`,
834
+ width: zt(r),
835
+ style: E(Pt(r))
836
+ }, null, 12, ar))), 128))
837
+ ]),
838
+ e.showHeader ? (c(), h("thead", {
839
+ key: 0,
840
+ class: p(u(i).be("header"))
841
+ }, [
842
+ (c(!0), h($, null, ee(Vt.value, (r, o) => (c(), h("tr", {
843
+ key: `hrow-${o}`,
844
+ class: p([u(i).be("header-row"), vn(o)]),
845
+ style: E(mn(o))
846
+ }, [
847
+ (c(!0), h($, null, ee(r, (a, f) => {
848
+ var g;
849
+ return c(), h("th", {
850
+ key: `th-${a.column.uid}-${o}-${f}`,
851
+ colspan: a.colspan,
852
+ rowspan: a.rowspan,
853
+ "data-column-uid": a.column.uid,
854
+ class: p([
855
+ u(i).be("header-cell"),
856
+ yn(a, o),
857
+ qe(a.column) ? u(i).is("column-draggable") : "",
858
+ Z.value === a.column.uid ? u(i).is("column-dragging") : "",
859
+ Se.value === a.column.uid ? u(i).is("column-drop-target") : ""
860
+ ]),
861
+ style: E(gn(a, o, f)),
862
+ draggable: qe(a.column) || void 0,
863
+ onDragstart: (d) => Bn(a.column, d),
864
+ onDragover: (d) => Nn(a.column, d),
865
+ onDrop: N((d) => Wn(a.column, d), ["prevent"]),
866
+ onDragend: Hn,
867
+ onClick: (d) => wn(a.column, d),
868
+ onContextmenu: N((d) => m("header-contextmenu", a.column.props, d), ["prevent"])
869
+ }, [
870
+ a.column.props.type === "selection" ? (c(), h("input", {
871
+ key: 0,
872
+ type: "checkbox",
873
+ class: p(u(i).be("selection")),
874
+ checked: we.value,
875
+ ".indeterminate": yt.value && !we.value,
876
+ "aria-label": "全选",
877
+ onClick: t[0] || (t[0] = N(() => {
878
+ }, ["stop"])),
879
+ onChange: t[1] || (t[1] = (d) => on(d))
880
+ }, null, 42, ur)) : a.column.props.type === "expand" ? (c(), h($, { key: 1 }, [], 64)) : (c(), h($, { key: 2 }, [
881
+ b("span", {
882
+ class: p(u(i).be("header-text"))
883
+ }, [
884
+ a.column.hasHeaderSlot ? (c(), U(he(Oe), {
885
+ key: 0,
886
+ render: () => a.column.renderHeader({ column: a.column.props, $index: o })
887
+ }, null, 8, ["render"])) : (c(), h($, { key: 1 }, [
888
+ Je(se(a.column.props.label), 1)
889
+ ], 64))
890
+ ], 2),
891
+ a.column.props.sortable ? (c(), h("span", {
892
+ key: 0,
893
+ class: p(u(i).be("sort")),
894
+ onClick: N((d) => xt(a.column), ["stop"])
895
+ }, [
896
+ b("span", {
897
+ class: p([u(i).be("sort-caret"), "is-up", Re(a.column) === "ascending" ? "is-active" : ""])
898
+ }, null, 2),
899
+ b("span", {
900
+ class: p([u(i).be("sort-caret"), "is-down", Re(a.column) === "descending" ? "is-active" : ""])
901
+ }, null, 2)
902
+ ], 10, cr)) : C("", !0),
903
+ rt(a.column) ? (c(), h("span", {
904
+ key: 1,
905
+ class: p([u(i).be("filter-icon"), z(a.column) && ((g = D[z(a.column)]) != null && g.length) ? "is-active" : ""]),
906
+ onClick: N((d) => $n(a.column, d), ["stop"])
907
+ }, [
908
+ a.column.hasFilterIconSlot ? (c(), U(he(ve), {
909
+ key: 0,
910
+ render: () => {
911
+ var d;
912
+ return a.column.renderFilterIcon({ filterOpened: ((d = v.column) == null ? void 0 : d.uid) === a.column.uid });
913
+ }
914
+ }, null, 8, ["render"])) : (c(), h("svg", pr, [...t[8] || (t[8] = [
915
+ b("path", {
916
+ d: "M2 3h12l-4.8 5.6v4.2l-2.4 1.2V8.6L2 3z",
917
+ fill: "currentColor",
918
+ opacity: "0.9"
919
+ }, null, -1)
920
+ ])]))
921
+ ], 10, dr)) : C("", !0),
922
+ An(a.column) ? (c(), h("span", {
923
+ key: 2,
924
+ class: p(u(i).be("header-drag")),
925
+ onMousedown: N((d) => Ln(a.column, d), ["stop", "prevent"])
926
+ }, null, 42, fr)) : C("", !0)
927
+ ], 64))
928
+ ], 46, ir);
929
+ }), 128))
930
+ ], 6))), 128))
931
+ ], 2)) : C("", !0),
932
+ b("tbody", null, [
933
+ ie.value.topPad ? (c(), h("tr", {
934
+ key: 0,
935
+ class: p(u(i).be("spacer")),
936
+ "aria-hidden": "true",
937
+ style: E({ height: `${ie.value.topPad}px` })
938
+ }, [
939
+ b("td", {
940
+ colspan: y.value.length || 1
941
+ }, null, 8, hr)
942
+ ], 6)) : C("", !0),
943
+ (c(!0), h($, null, ee(ie.value.rows, (r) => (c(), h($, {
944
+ key: `r-${r.key}`
945
+ }, [
946
+ b("tr", {
947
+ "data-row-key": r.key,
948
+ class: p([
949
+ u(i).be("row"),
950
+ r.level ? u(i).is("row-level") : "",
951
+ e.stripe && r.rowIndex % 2 === 1 ? u(i).is("striped-row") : "",
952
+ nn(r.key) ? u(i).is("current-row") : "",
953
+ dn(r.row, r.rowIndex)
954
+ ]),
955
+ style: E(pn(r.row, r.rowIndex)),
956
+ onClick: (o) => xn(r.row, o),
957
+ onDblclick: (o) => kn(r.row, o),
958
+ onContextmenu: (o) => m("row-contextmenu", r.row, null, o)
959
+ }, [
960
+ (c(!0), h($, null, ee(y.value, (o, a) => {
961
+ var f, g;
962
+ return c(), h($, {
963
+ key: `td-${o.uid}`
964
+ }, [
965
+ Qt(r.rowIndex, a) ? C("", !0) : (c(), h("td", {
966
+ key: 0,
967
+ rowspan: ((f = ut(r.rowIndex, a)) == null ? void 0 : f.rowspan) || 1,
968
+ colspan: ((g = ut(r.rowIndex, a)) == null ? void 0 : g.colspan) || 1,
969
+ "data-column-uid": o.uid,
970
+ class: p([
971
+ u(i).be("cell"),
972
+ fn(r.row, r.rowIndex, o, a),
973
+ dt(o) ? u(i).is(`fixed-${pt(o)}`) : "",
974
+ o.props.type === "selection" || o.props.type === "index" || o.props.type === "expand" ? u(i).is("cell-fixed-padding") : ""
975
+ ]),
976
+ style: E([hn(r.row, r.rowIndex, o, a), Be(o)]),
977
+ onClick: N((d) => Cn(r.row, r.rowIndex, o, d), ["stop"]),
978
+ onDblclick: N((d) => Sn(r.row, r.rowIndex, o, d), ["stop"]),
979
+ onContextmenu: (d) => Tn(r.row, r.rowIndex, o, d),
980
+ onMouseenter: (d) => On(r.row, r.rowIndex, o, d),
981
+ onMouseleave: (d) => En(r.row, r.rowIndex, o, d)
982
+ }, [
983
+ o.props.type === "selection" ? (c(), h("input", {
984
+ key: 0,
985
+ type: "checkbox",
986
+ class: p(u(i).be("selection")),
987
+ checked: Ke(r.key),
988
+ disabled: !mt(o, r.row, r.rowIndex),
989
+ "aria-label": "选择该行",
990
+ onClick: t[2] || (t[2] = N(() => {
991
+ }, ["stop"])),
992
+ onChange: (d) => Pe(r.row)
993
+ }, null, 42, yr)) : o.props.type === "index" ? (c(), h($, { key: 1 }, [
994
+ Je(se(un(o, r.rowIndex)), 1)
995
+ ], 64)) : o.props.type === "expand" ? (c(), h("span", {
996
+ key: 2,
997
+ class: p([u(i).be("expand-icon"), be(r.key) ? "is-expanded" : ""]),
998
+ onClick: N((d) => je(r.row), ["stop"])
999
+ }, [...t[9] || (t[9] = [
1000
+ b("svg", {
1001
+ viewBox: "0 0 16 16",
1002
+ width: "14",
1003
+ height: "14",
1004
+ "aria-hidden": "true"
1005
+ }, [
1006
+ b("path", {
1007
+ d: "M6 3.5L10.5 8 6 12.5",
1008
+ stroke: "currentColor",
1009
+ "stroke-width": "1.6",
1010
+ fill: "none",
1011
+ "stroke-linecap": "round"
1012
+ })
1013
+ ], -1)
1014
+ ])], 10, gr)) : (c(), h("span", {
1015
+ key: 3,
1016
+ class: p([u(i).be("cell-text"), wt(o) ? u(i).is("overflow") : ""]),
1017
+ style: E(cn(r, o))
1018
+ }, [
1019
+ gt(o) && r.hasChildren ? (c(), h("span", {
1020
+ key: 0,
1021
+ class: p([u(i).be("tree-expand"), be(r.key) ? "is-expanded" : "", r.loading ? "is-loading" : ""]),
1022
+ onClick: N((d) => je(r.row), ["stop"])
1023
+ }, [...t[10] || (t[10] = [
1024
+ b("svg", {
1025
+ viewBox: "0 0 16 16",
1026
+ width: "14",
1027
+ height: "14",
1028
+ "aria-hidden": "true"
1029
+ }, [
1030
+ b("path", {
1031
+ d: "M6 3.5L10.5 8 6 12.5",
1032
+ stroke: "currentColor",
1033
+ "stroke-width": "1.6",
1034
+ fill: "none",
1035
+ "stroke-linecap": "round"
1036
+ })
1037
+ ], -1)
1038
+ ])], 10, br)) : C("", !0),
1039
+ o.hasSlot ? (c(), U(he(I), {
1040
+ key: 1,
1041
+ render: () => o.renderCell({ row: r.row, column: o.props, $index: r.rowIndex })
1042
+ }, null, 8, ["render"])) : (c(), h($, { key: 2 }, [
1043
+ Je(se(an(o, r.row, r.rowIndex)), 1)
1044
+ ], 64))
1045
+ ], 6))
1046
+ ], 46, mr))
1047
+ ], 64);
1048
+ }), 128))
1049
+ ], 46, vr),
1050
+ oe.value && qt(r) && ln(r.row, r.rowIndex) ? (c(), h("tr", {
1051
+ key: `expanded-${A(r.row, r.rowIndex)}`,
1052
+ class: p([u(i).be("expanded-row"), be(r.key) ? "" : "is-hidden"])
1053
+ }, [
1054
+ b("td", {
1055
+ colspan: y.value.length || 1,
1056
+ class: p(u(i).be("expanded-cell"))
1057
+ }, [
1058
+ oe.value.hasExpandSlot || oe.value.hasSlot ? (c(), U(he(G), {
1059
+ key: 0,
1060
+ render: () => _n(r, r.rowIndex)
1061
+ }, null, 8, ["render"])) : C("", !0)
1062
+ ], 10, wr)
1063
+ ], 2)) : C("", !0)
1064
+ ], 64))), 128)),
1065
+ ie.value.bottomPad ? (c(), h("tr", {
1066
+ key: 1,
1067
+ class: p(u(i).be("spacer")),
1068
+ "aria-hidden": "true",
1069
+ style: E({ height: `${ie.value.bottomPad}px` })
1070
+ }, [
1071
+ b("td", {
1072
+ colspan: y.value.length || 1
1073
+ }, null, 8, xr)
1074
+ ], 6)) : C("", !0),
1075
+ j.value.length ? C("", !0) : (c(), h("tr", {
1076
+ key: 2,
1077
+ class: p(u(i).be("empty-block"))
1078
+ }, [
1079
+ b("td", {
1080
+ colspan: y.value.length || 1,
1081
+ class: p(u(i).be("empty"))
1082
+ }, [
1083
+ Ue(e.$slots, "empty", {}, () => [
1084
+ Jn(u(tr), {
1085
+ description: e.emptyText,
1086
+ "image-size": 60
1087
+ }, null, 8, ["description"])
1088
+ ])
1089
+ ], 10, kr)
1090
+ ], 2))
1091
+ ]),
1092
+ e.showSummary && j.value.length ? (c(), h("tfoot", {
1093
+ key: 1,
1094
+ class: p(u(i).be("footer"))
1095
+ }, [
1096
+ b("tr", {
1097
+ class: p(u(i).be("footer-row"))
1098
+ }, [
1099
+ (c(!0), h($, null, ee(In.value, (r, o) => {
1100
+ var a;
1101
+ return c(), h("td", {
1102
+ key: `sum-${o}`,
1103
+ "data-column-uid": (a = y.value[o]) == null ? void 0 : a.uid,
1104
+ class: p([u(i).be("cell"), u(i).be("footer-cell"), o === 0 ? u(i).is("footer-first") : ""]),
1105
+ style: E(y.value[o] ? Be(y.value[o]) : void 0)
1106
+ }, [
1107
+ (c(), U(he(O), {
1108
+ render: () => r
1109
+ }, null, 8, ["render"]))
1110
+ ], 14, Cr);
1111
+ }), 128))
1112
+ ], 2)
1113
+ ], 2)) : C("", !0)
1114
+ ], 14, sr),
1115
+ e.$slots.append ? (c(), h("div", {
1116
+ key: 0,
1117
+ class: p(u(i).be("append"))
1118
+ }, [
1119
+ Ue(e.$slots, "append")
1120
+ ], 2)) : C("", !0)
1121
+ ], 38),
1122
+ e.nativeScrollbar ? C("", !0) : Qe((c(), h("div", {
1123
+ key: 0,
1124
+ ref_key: "hTrackRef",
1125
+ ref: Ne,
1126
+ class: p([u(i).be("scrollbar"), u(i).be("scrollbar-horizontal")]),
1127
+ onMousedown: t[3] || (t[3] = (r) => ft("h", r))
1128
+ }, [
1129
+ b("div", {
1130
+ class: p(u(i).be("scrollbar-thumb")),
1131
+ style: E({ width: `${B.value.hThumb}px`, transform: `translateX(${B.value.hOffset}px)` })
1132
+ }, null, 6)
1133
+ ], 34)), [
1134
+ [Ft, B.value.hVisible]
1135
+ ]),
1136
+ e.nativeScrollbar ? C("", !0) : Qe((c(), h("div", {
1137
+ key: 1,
1138
+ ref_key: "vTrackRef",
1139
+ ref: We,
1140
+ class: p([u(i).be("scrollbar"), u(i).be("scrollbar-vertical")]),
1141
+ onMousedown: t[4] || (t[4] = (r) => ft("v", r))
1142
+ }, [
1143
+ b("div", {
1144
+ class: p(u(i).be("scrollbar-thumb")),
1145
+ style: E({ height: `${B.value.vThumb}px`, transform: `translateY(${B.value.vOffset}px)` })
1146
+ }, null, 6)
1147
+ ], 34)), [
1148
+ [Ft, B.value.vVisible]
1149
+ ]),
1150
+ (c(), U(Dt, {
1151
+ to: e.appendFilterPanelTo || "body"
1152
+ }, [
1153
+ v.open ? (c(), h("div", {
1154
+ key: 0,
1155
+ class: p([u(i).be("filter-panel"), (n = v.column) == null ? void 0 : n.props.filterClassName]),
1156
+ style: E({ left: `${v.x}px`, top: `${v.y}px`, transform: v.transform }),
1157
+ onMousedown: t[6] || (t[6] = N(() => {
1158
+ }, ["stop"])),
1159
+ onClick: t[7] || (t[7] = N(() => {
1160
+ }, ["stop"]))
1161
+ }, [
1162
+ b("div", {
1163
+ class: p(u(i).be("filter-header"))
1164
+ }, se(((l = v.column) == null ? void 0 : l.props.label) || "筛选"), 3),
1165
+ v.filters.length > 8 ? (c(), h("label", {
1166
+ key: 0,
1167
+ class: p(u(i).be("filter-search"))
1168
+ }, [
1169
+ Qe(b("input", {
1170
+ "onUpdate:modelValue": t[5] || (t[5] = (r) => v.keyword = r),
1171
+ type: "text",
1172
+ placeholder: "搜索筛选项"
1173
+ }, null, 512), [
1174
+ [Qn, v.keyword]
1175
+ ])
1176
+ ], 2)) : C("", !0),
1177
+ b("ul", {
1178
+ class: p(u(i).be("filter-list")),
1179
+ role: "listbox"
1180
+ }, [
1181
+ (c(!0), h($, null, ee(Rn.value, (r) => {
1182
+ var o;
1183
+ return c(), h("li", {
1184
+ key: String(r.value),
1185
+ class: p([u(i).be("filter-item"), pe(r.value) ? "is-checked" : ""]),
1186
+ role: "option",
1187
+ "aria-selected": pe(r.value),
1188
+ onClick: (a) => Mn(r.value)
1189
+ }, [
1190
+ b("span", {
1191
+ class: p([u(i).be("filter-check"), (o = v.column) != null && o.props.filterMultiple ? "" : "is-radio"])
1192
+ }, [
1193
+ pe(r.value) ? (c(), h("span", {
1194
+ key: 0,
1195
+ class: p(u(i).be("filter-check-inner"))
1196
+ }, null, 2)) : C("", !0)
1197
+ ], 2),
1198
+ b("span", {
1199
+ class: p(u(i).be("filter-item-text"))
1200
+ }, se(r.text), 3)
1201
+ ], 10, Sr);
1202
+ }), 128))
1203
+ ], 2),
1204
+ b("div", {
1205
+ class: p(u(i).be("filter-footer"))
1206
+ }, [
1207
+ b("button", {
1208
+ type: "button",
1209
+ class: p(u(i).be("filter-btn")),
1210
+ onClick: Dn
1211
+ }, "重置", 2),
1212
+ b("button", {
1213
+ type: "button",
1214
+ class: p([u(i).be("filter-btn"), "is-primary"]),
1215
+ onClick: Fn
1216
+ }, "确定", 2)
1217
+ ], 2)
1218
+ ], 38)) : C("", !0)
1219
+ ], 8, ["to"])),
1220
+ (c(), U(Dt, { to: "body" }, [
1221
+ H.visible ? (c(), h("div", {
1222
+ key: 0,
1223
+ class: p([u(i).be("tooltip"), `is-${H.effect}`]),
1224
+ style: E({ left: `${H.x}px`, top: `${H.y}px` }),
1225
+ role: "tooltip"
1226
+ }, se(H.content), 7)) : C("", !0)
1227
+ ]))
1228
+ ], 14, lr);
1229
+ };
1230
+ }
1231
+ }), Or = /* @__PURE__ */ Ht({
1232
+ name: "GiTableColumn",
1233
+ __name: "table-column",
1234
+ props: rr,
1235
+ setup(k, { expose: S }) {
1236
+ const F = k, I = er(), Oe = Nt("table"), G = At(Bt, null), ve = At(Kt, {
1237
+ registerColumn: () => {
1238
+ },
1239
+ unregisterColumn: () => {
1240
+ },
1241
+ sortState: () => null,
1242
+ rowIndex: () => 0,
1243
+ selectedRows: () => [],
1244
+ isSelected: () => !1,
1245
+ toggleRow: () => {
1246
+ },
1247
+ toggleAll: () => {
1248
+ },
1249
+ size: () => "default",
1250
+ stripe: () => !1,
1251
+ border: () => !1,
1252
+ currentRow: () => null
1253
+ }), O = I.slots, s = _([]), m = _({
1254
+ uid: I.uid,
1255
+ props: { ...F },
1256
+ hasSlot: !!O.default,
1257
+ hasHeaderSlot: !!O.header,
1258
+ hasExpandSlot: !!O.expand,
1259
+ hasFilterIconSlot: !!O["filter-icon"],
1260
+ renderCell: (x) => O.default ? O.default(x) : void 0,
1261
+ renderHeader: O.header ? (x) => O.header(x) : void 0,
1262
+ renderExpand: O.expand ? (x) => O.expand(x) : void 0,
1263
+ renderFilterIcon: O["filter-icon"] ? (x) => O["filter-icon"](x) : void 0,
1264
+ children: s,
1265
+ parent: G
1266
+ });
1267
+ _t(Bt, m), G ? G.children.push(m) : ve.registerColumn(m), te(
1268
+ () => F,
1269
+ () => Object.assign(m.props, F)
1270
+ ), It(() => {
1271
+ if (G) {
1272
+ const x = G.children.findIndex((J) => J.uid === m.uid);
1273
+ x > -1 && G.children.splice(x, 1);
1274
+ } else
1275
+ ve.unregisterColumn(m.uid);
1276
+ });
1277
+ const i = () => {
1278
+ const x = { class: Oe.be("columns"), "aria-hidden": "true" };
1279
+ try {
1280
+ const J = O.default ? O.default({ row: {}, column: m.props, $index: -1 }) : [], ae = [];
1281
+ return Array.isArray(J) && J.forEach((K) => {
1282
+ var Q;
1283
+ if (!K || typeof K != "object") return;
1284
+ ((Q = K.type) == null ? void 0 : Q.name) === "GiTableColumn" || K.shapeFlag & 2 ? ae.push(K) : K.type === $ && Array.isArray(K.children) && K.children.forEach((y) => {
1285
+ !y || typeof y != "object" || y.patchFlag !== 1024 && typeof y.children != "string" && ae.push(y);
1286
+ });
1287
+ }), Lt("div", x, ae);
1288
+ } catch {
1289
+ return Lt("div", x);
1290
+ }
1291
+ };
1292
+ return S({ columnProps: m.props }), (x, J) => (c(), U(i));
1293
+ }
1294
+ }), Fr = Wt(Tr, "GiTable"), Dr = Wt(Or, "GiTableColumn");
1295
+ export {
1296
+ Fr as GiTable,
1297
+ Dr as GiTableColumn,
1298
+ Fr as default,
1299
+ Bt as tableColumnChildrenKey,
1300
+ rr as tableColumnProps,
1301
+ Kt as tableContextKey,
1302
+ or as tableEmits,
1303
+ nr as tableProps
1304
+ };