hys-ui 0.2.0 → 0.4.0

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 (261) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +68 -59
  3. package/dist/components/HysAlert/HysAlert.vue.js +5 -54
  4. package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
  5. package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
  6. package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +146 -2
  7. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
  8. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
  9. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
  10. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
  11. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
  12. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
  13. package/dist/components/HysButton/HysButton.vue.js +2 -2
  14. package/dist/components/HysButton/HysButton2.vue.js +227 -60
  15. package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
  16. package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
  17. package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
  18. package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
  19. package/dist/components/HysCascader/HysCascader.vue.js +2 -2
  20. package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
  21. package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
  22. package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
  23. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  24. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
  25. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
  26. package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
  27. package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
  28. package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
  29. package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
  30. package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
  31. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  32. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
  33. package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
  34. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  35. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
  36. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
  37. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  38. package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
  39. package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
  40. package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
  41. package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
  42. package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
  43. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  44. package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
  45. package/dist/components/HysMention/HysMention.vue.js +1 -1
  46. package/dist/components/HysMention/HysMention2.vue.js +1092 -142
  47. package/dist/components/HysModal/HysModal.vue.js +2 -2
  48. package/dist/components/HysModal/HysModal2.vue.js +491 -85
  49. package/dist/components/HysPagination/HysPagination.vue.js +2 -2
  50. package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
  51. package/dist/components/HysPopover/HysPopover.vue.js +5 -91
  52. package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
  53. package/dist/components/HysProgress/HysProgress.vue.js +2 -2
  54. package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
  55. package/dist/components/HysSearch/HysSearch.vue.js +5 -82
  56. package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
  57. package/dist/components/HysSelect/HysSelect.vue.js +2 -2
  58. package/dist/components/HysSelect/HysSelect2.vue.js +755 -590
  59. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  60. package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
  61. package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
  62. package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
  63. package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
  64. package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
  65. package/dist/components/HysTable/HysTable.vue.js +2 -2
  66. package/dist/components/HysTable/HysTable2.vue.js +1416 -1127
  67. package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
  68. package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
  69. package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
  70. package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
  71. package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
  72. package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
  73. package/dist/components/HysTour/HysTour.vue.js +291 -63
  74. package/dist/components/HysTour/HysTour3.vue.js +5 -0
  75. package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
  76. package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
  77. package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
  78. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
  79. package/dist/components/HysTree/HysTree.vue.js +2 -2
  80. package/dist/components/HysTree/HysTree2.vue.js +195 -184
  81. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
  82. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
  83. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  84. package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
  85. package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
  86. package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
  87. package/dist/composables/buttonGroup.js +12 -0
  88. package/dist/composables/color.js +97 -0
  89. package/dist/composables/dataGrid.js +68 -0
  90. package/dist/composables/drawer.js +17 -0
  91. package/dist/composables/feedback.js +14 -0
  92. package/dist/composables/floatingPosition.js +18 -0
  93. package/dist/composables/mentionDocument.js +79 -0
  94. package/dist/composables/mentionEditor.js +58 -0
  95. package/dist/composables/menu.js +96 -0
  96. package/dist/composables/modal.js +14 -0
  97. package/dist/composables/overlayManager.js +48 -18
  98. package/dist/composables/progress.js +94 -0
  99. package/dist/composables/selectOptions.js +44 -38
  100. package/dist/composables/splitPaneSizes.js +58 -0
  101. package/dist/composables/table.js +128 -105
  102. package/dist/composables/tagInput.js +16 -0
  103. package/dist/composables/timeline.js +19 -0
  104. package/dist/composables/transfer.js +19 -17
  105. package/dist/composables/upload.js +55 -0
  106. package/dist/composables/uploadRequest.js +58 -0
  107. package/dist/composables/useAlert.js +124 -0
  108. package/dist/composables/useColorPicker.js +402 -0
  109. package/dist/composables/useContextMenu.js +514 -0
  110. package/dist/composables/useDataGridRemote.js +67 -0
  111. package/dist/composables/useDialog.js +86 -43
  112. package/dist/composables/useDrawerPush.js +33 -0
  113. package/dist/composables/useDrawerResize.js +221 -0
  114. package/dist/composables/useFloating.js +118 -80
  115. package/dist/composables/useHysModal.js +185 -0
  116. package/dist/composables/useMentionCaret.js +81 -0
  117. package/dist/composables/useMentionList.js +81 -0
  118. package/dist/composables/useMentionModel.js +90 -0
  119. package/dist/composables/useMentionOptions.js +421 -0
  120. package/dist/composables/useModal.js +295 -0
  121. package/dist/composables/useModalInteraction.js +394 -0
  122. package/dist/composables/usePopupSurface.js +458 -0
  123. package/dist/composables/useSplitPaneDrag.js +52 -0
  124. package/dist/composables/useSplitPaneStorage.js +38 -0
  125. package/dist/composables/useTable.js +344 -312
  126. package/dist/composables/useTableSticky.js +79 -0
  127. package/dist/composables/useTagInput.js +313 -0
  128. package/dist/composables/useTourLayout.js +129 -0
  129. package/dist/composables/useTransferMotion.js +185 -0
  130. package/dist/composables/useUpload.js +472 -0
  131. package/dist/composables/useUploadModel.js +65 -0
  132. package/dist/composables/useUploadRequests.js +266 -0
  133. package/dist/composables/useVirtualTableLayout.js +277 -0
  134. package/dist/composables/virtualTable.js +43 -0
  135. package/dist/config.js +11 -11
  136. package/dist/index.js +175 -153
  137. package/dist/internal/MultiSplitPane.vue.js +305 -0
  138. package/dist/internal/MultiSplitPane2.vue.js +4 -0
  139. package/dist/internal/PopupReference.js +39 -0
  140. package/dist/internal/PopupSurfacePanel.vue.js +7 -0
  141. package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
  142. package/dist/motion/PopupMotion.js +105 -0
  143. package/dist/motion/popup.js +10 -0
  144. package/dist/style.css +1 -1
  145. package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
  146. package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +61 -7
  147. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
  148. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
  149. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
  150. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
  151. package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
  152. package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
  153. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
  154. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
  155. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
  156. package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
  157. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
  158. package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
  159. package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
  160. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
  161. package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
  162. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
  163. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +3 -3
  164. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
  165. package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
  166. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
  167. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
  168. package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -39
  169. package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
  170. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
  171. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
  172. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
  173. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
  174. package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
  175. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
  176. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +45 -7
  177. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +19 -5
  178. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
  179. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
  180. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
  181. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
  182. package/dist/types/components/HysTable/HysTable.vue.d.ts +1742 -5
  183. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
  184. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
  185. package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
  186. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
  187. package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -8
  188. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
  189. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
  190. package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
  191. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
  192. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
  193. package/dist/types/composables/autocomplete.d.ts +3 -0
  194. package/dist/types/composables/avatar.d.ts +3 -0
  195. package/dist/types/composables/buttonGroup.d.ts +9 -0
  196. package/dist/types/composables/cascader.d.ts +3 -0
  197. package/dist/types/composables/color.d.ts +97 -0
  198. package/dist/types/composables/dataGrid.d.ts +100 -0
  199. package/dist/types/composables/datePicker.d.ts +3 -0
  200. package/dist/types/composables/drawer.d.ts +102 -0
  201. package/dist/types/composables/feedback.d.ts +98 -0
  202. package/dist/types/composables/floatingPosition.d.ts +14 -0
  203. package/dist/types/composables/formContext.d.ts +2 -0
  204. package/dist/types/composables/mention.d.ts +284 -0
  205. package/dist/types/composables/mentionDocument.d.ts +15 -0
  206. package/dist/types/composables/mentionEditor.d.ts +7 -0
  207. package/dist/types/composables/menu.d.ts +183 -0
  208. package/dist/types/composables/modal.d.ts +185 -0
  209. package/dist/types/composables/overlayManager.d.ts +7 -3
  210. package/dist/types/composables/popupSurface.d.ts +83 -0
  211. package/dist/types/composables/progress.d.ts +92 -0
  212. package/dist/types/composables/selectOptions.d.ts +7 -0
  213. package/dist/types/composables/splitPaneSizes.d.ts +11 -0
  214. package/dist/types/composables/table.d.ts +119 -6
  215. package/dist/types/composables/tagInput.d.ts +96 -0
  216. package/dist/types/composables/timeline.d.ts +82 -0
  217. package/dist/types/composables/tour.d.ts +68 -0
  218. package/dist/types/composables/transfer.d.ts +7 -0
  219. package/dist/types/composables/tree.d.ts +3 -0
  220. package/dist/types/composables/treeSelect.d.ts +3 -0
  221. package/dist/types/composables/upload.d.ts +202 -0
  222. package/dist/types/composables/uploadRequest.d.ts +3 -0
  223. package/dist/types/composables/useAlert.d.ts +21 -0
  224. package/dist/types/composables/useCascader.d.ts +1 -1
  225. package/dist/types/composables/useColorPicker.d.ts +101 -0
  226. package/dist/types/composables/useContextMenu.d.ts +81 -0
  227. package/dist/types/composables/useDataGridRemote.d.ts +15 -0
  228. package/dist/types/composables/useDialog.d.ts +16 -3
  229. package/dist/types/composables/useDrawerPush.d.ts +6 -0
  230. package/dist/types/composables/useDrawerResize.d.ts +27 -0
  231. package/dist/types/composables/useFloating.d.ts +22 -3
  232. package/dist/types/composables/useHysModal.d.ts +44 -0
  233. package/dist/types/composables/useMentionCaret.d.ts +6 -0
  234. package/dist/types/composables/useMentionList.d.ts +23 -0
  235. package/dist/types/composables/useMentionModel.d.ts +14 -0
  236. package/dist/types/composables/useMentionOptions.d.ts +26 -0
  237. package/dist/types/composables/useModal.d.ts +62 -0
  238. package/dist/types/composables/useModalInteraction.d.ts +27 -0
  239. package/dist/types/composables/usePopupSurface.d.ts +3341 -0
  240. package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
  241. package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
  242. package/dist/types/composables/useTable.d.ts +7 -3
  243. package/dist/types/composables/useTableSticky.d.ts +22 -0
  244. package/dist/types/composables/useTagInput.d.ts +66 -0
  245. package/dist/types/composables/useTourLayout.d.ts +33 -0
  246. package/dist/types/composables/useTransferMotion.d.ts +36 -0
  247. package/dist/types/composables/useUpload.d.ts +94 -0
  248. package/dist/types/composables/useUploadModel.d.ts +14 -0
  249. package/dist/types/composables/useUploadRequests.d.ts +38 -0
  250. package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
  251. package/dist/types/composables/virtualTable.d.ts +126 -0
  252. package/dist/types/config.d.ts +1 -0
  253. package/dist/types/index.d.ts +53 -3
  254. package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
  255. package/dist/types/internal/PopupReference.d.ts +18 -0
  256. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
  257. package/dist/types/motion/PopupMotion.d.ts +59 -0
  258. package/dist/types/motion/popup.d.ts +12 -0
  259. package/package.json +3 -2
  260. package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
  261. package/dist/components/HysTour/HysTour2.vue.js +0 -4
@@ -1,60 +1,70 @@
1
- import { defineComponent as dl, useSlots as yl, ref as M, useId as fl, shallowRef as tt, computed as F, watch as ee, onMounted as vl, onActivated as ml, onUpdated as hl, onDeactivated as pl, onBeforeUnmount as kl, openBlock as u, createElementBlock as c, mergeProps as W, unref as o, renderSlot as S, createCommentVNode as g, createElementVNode as T, toDisplayString as O, createBlock as A, withCtx as te, createTextVNode as D, createVNode as q, Fragment as E, renderList as X, normalizeStyle as he, withModifiers as V, resolveDynamicComponent as Me, normalizeClass as Ae, withKeys as lt, isRef as wl, withDirectives as bl, vShow as gl, Teleport as Pt, normalizeProps as Cl, guardReactiveProps as Sl, nextTick as pe } from "vue";
2
- import { ChevronUp as xl, ChevronDown as at, ListFilter as Rl, LoaderCircle as ot, ChevronRight as Ot, RotateCw as Tl } from "lucide-vue-next";
3
- import Et from "../HysCheckbox/HysCheckbox.vue.js";
4
- import zl from "../HysRadio/HysRadio.vue.js";
5
- import ce from "../HysButton/HysButton.vue.js";
6
- import Fl from "../HysInput/HysInput.vue.js";
7
- import Kt from "../HysPagination/HysPagination.vue.js";
8
- import Ml from "./HysTableFilterOptions.vue.js";
9
- import { useHysRootAttrs as Al } from "../../config.js";
10
- import { useFloating as $t } from "../../composables/useFloating.js";
11
- import { useTable as Bl } from "../../composables/useTable.js";
12
- import { tableColumns as Pl, tableBreakpoint as Ol, tableToken as El, tableSummary as Kl, tableValue as Be } from "../../composables/table.js";
13
- const $l = ["aria-busy"], Hl = {
1
+ import { defineComponent as Gl, useSlots as Zl, ref as E, useId as _l, computed as g, shallowRef as et, watch as G, onMounted as ea, onActivated as ta, onUpdated as la, onDeactivated as aa, onBeforeUnmount as oa, openBlock as c, createElementBlock as y, mergeProps as V, unref as l, renderSlot as S, createCommentVNode as x, createElementVNode as H, toDisplayString as K, Fragment as A, renderList as le, createBlock as w, withCtx as B, createTextVNode as I, createVNode as N, normalizeStyle as Re, normalizeClass as Te, resolveDynamicComponent as ae, withModifiers as Z, withKeys as $t, isRef as na, withDirectives as ia, vShow as sa, Teleport as Et, normalizeProps as ra, guardReactiveProps as ua, nextTick as Ke } from "vue";
2
+ import { ChevronUp as ca, ChevronDown as Ht, ListFilter as da, LoaderCircle as tt, ChevronRight as dl, RotateCw as va } from "lucide-vue-next";
3
+ import vl from "../HysCheckbox/HysCheckbox.vue.js";
4
+ import ya from "../HysRadio/HysRadio.vue.js";
5
+ import ye from "../HysButton/HysButton.vue.js";
6
+ import fa from "../HysInput/HysInput.vue.js";
7
+ import yl from "../HysPagination/HysPagination.vue.js";
8
+ import ma from "./HysTableFilterOptions.vue.js";
9
+ import { useHysRootAttrs as pa } from "../../config.js";
10
+ import { useFloating as fl } from "../../composables/useFloating.js";
11
+ import { useTable as ha } from "../../composables/useTable.js";
12
+ import { useTableSticky as ba } from "../../composables/useTableSticky.js";
13
+ import { tableColumns as ga, tableBreakpoint as ka, tableToken as wa, tableSummary as Ca, tableValue as De } from "../../composables/table.js";
14
+ import ml from "../../motion/PopupMotion.js";
15
+ const Sa = ["aria-busy"], xa = {
14
16
  key: 0,
15
17
  class: "hys-ui-table-title"
16
- }, Ll = {
18
+ }, Ra = {
17
19
  key: 1,
18
20
  class: "hys-ui-table-selection-actions"
19
- }, Nl = { "aria-live": "polite" }, Wl = ["data-position"], Dl = ["tabindex", "aria-label"], ql = { key: 0 }, Vl = { key: 1 }, jl = ["data-column-key", "data-leaf", "colspan", "rowspan", "scope", "aria-sort", "onClick", "onContextmenu"], Il = {
21
+ }, Ta = { "aria-live": "polite" }, Fa = ["data-position"], za = { class: "hys-ui-table-viewport" }, Aa = ["tabindex", "aria-label"], Pa = { key: 0 }, Ma = {
20
22
  key: 1,
21
23
  class: "hys-ui-table-sr-only"
22
- }, Ul = {
23
- key: 1,
24
+ }, Ba = {
25
+ key: 2,
24
26
  class: "hys-ui-table-heading"
25
- }, Jl = { class: "hys-ui-table-label" }, Xl = ["disabled", "onClick"], Ql = { key: 1 }, Yl = {
27
+ }, Oa = { class: "hys-ui-table-label" }, $a = ["disabled", "aria-describedby", "onPointerenter", "onFocus", "onClick"], Ea = { key: 1 }, Ha = {
26
28
  key: 2,
27
29
  class: "hys-ui-table-sort-controls"
28
- }, Gl = ["disabled", "aria-label", "aria-pressed", "onClick"], Zl = ["disabled", "aria-label", "aria-expanded", "aria-controls", "onClick"], _l = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax", "onPointerdown", "onKeydown"], ea = {
30
+ }, Ka = ["disabled", "aria-label", "aria-pressed", "onClick"], Da = ["disabled", "aria-label", "aria-expanded", "aria-controls", "onClick"], Wa = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax", "onPointerdown", "onKeydown"], La = {
29
31
  key: 0,
30
32
  class: "hys-ui-table-message"
31
- }, ta = ["colspan"], la = { role: "status" }, aa = ["data-row-key", "aria-selected", "onClick", "onDblclick", "onContextmenu"], oa = ["disabled", "aria-expanded", "aria-label", "onClick"], na = {
33
+ }, Na = ["colspan"], qa = { role: "status" }, ja = ["disabled", "aria-expanded", "aria-label", "onClick"], Va = {
32
34
  key: 3,
33
35
  class: "hys-ui-table-cell-content"
34
- }, ia = ["disabled", "aria-expanded", "aria-label", "onClick"], sa = {
36
+ }, Ia = ["disabled", "aria-expanded", "aria-label", "onClick"], Ua = {
35
37
  key: 1,
36
38
  class: "hys-ui-table-tree-spacer"
37
- }, ra = ["tabindex", "aria-describedby", "onPointerenter", "onFocus"], ua = {
39
+ }, Ja = ["tabindex", "title", "aria-describedby", "onPointerenter", "onFocus"], Xa = {
38
40
  key: 0,
39
41
  class: "hys-ui-table-detail"
40
- }, ca = ["colspan"], da = {
42
+ }, Qa = ["colspan"], Ya = {
41
43
  key: 0,
42
44
  class: "hys-ui-table-message"
43
- }, ya = ["colspan"], fa = {
45
+ }, Ga = ["colspan"], Za = {
44
46
  key: 2,
45
47
  class: "hys-ui-table-append"
46
- }, va = ["colspan"], ma = { key: 2 }, ha = ["data-column-key"], pa = {
48
+ }, _a = ["colspan"], eo = {
49
+ key: 0,
50
+ class: "hys-ui-table-loading-overlay",
51
+ role: "status"
52
+ }, to = ["aria-label"], lo = {
47
53
  key: 2,
48
54
  class: "hys-ui-table-footer"
49
- }, ka = ["data-position"], wa = ["id", "aria-label"], ba = { class: "hys-ui-table-filter-actions" }, ga = ["id"], Ea = /* @__PURE__ */ dl({
55
+ }, ao = ["data-position"], oo = ["id", "aria-label"], no = { class: "hys-ui-table-filter-actions" }, io = ["id", "data-effect"], Co = /* @__PURE__ */ Gl({
50
56
  __name: "HysTable",
51
57
  props: {
58
+ popupTransition: {},
59
+ popupTransitionDuration: {},
52
60
  locale: {},
53
61
  columns: {},
54
62
  rows: {},
63
+ components: {},
55
64
  rowKey: { type: [String, Function], default: "id" },
56
65
  emptyText: { default: void 0 },
57
66
  loading: { type: Boolean },
67
+ loadingMode: { default: "replace" },
58
68
  disabled: { type: Boolean },
59
69
  striped: { type: Boolean },
60
70
  bordered: { type: Boolean },
@@ -64,9 +74,12 @@ const $l = ["aria-busy"], Hl = {
64
74
  height: {},
65
75
  maxHeight: {},
66
76
  stickyHeader: { type: Boolean, default: void 0 },
77
+ sticky: { type: [Boolean, Object] },
67
78
  showHeader: { type: Boolean, default: !0 },
68
79
  fit: { type: Boolean, default: !0 },
80
+ scrollWidth: {},
69
81
  scrollbarAlwaysOn: { type: Boolean },
82
+ nativeScrollbar: { type: Boolean, default: void 0 },
70
83
  scrollbarTabindex: { default: 0 },
71
84
  headerRowClassName: {},
72
85
  headerRowStyle: {},
@@ -87,7 +100,7 @@ const $l = ["aria-busy"], Hl = {
87
100
  reserveSelection: { type: Boolean },
88
101
  checkStrictly: { type: Boolean, default: !0 },
89
102
  selectOnIndeterminate: { type: Boolean, default: !0 },
90
- selectionActions: { type: Boolean },
103
+ selectionActions: { type: [Boolean, Array] },
91
104
  rangeSelection: { type: Boolean },
92
105
  hideSelectAll: { type: Boolean },
93
106
  selectionColumn: {},
@@ -102,11 +115,13 @@ const $l = ["aria-busy"], Hl = {
102
115
  defaultSort: {},
103
116
  multiSort: { type: Boolean },
104
117
  sortOrders: {},
118
+ showSorterTooltip: { type: [Boolean, Object] },
105
119
  filters: {},
106
120
  defaultFilters: {},
107
121
  filterColumnKey: {},
108
122
  filterPlacement: {},
109
123
  appendFilterTo: { type: [String, Boolean] },
124
+ getPopupContainer: {},
110
125
  pagination: { type: [Boolean, Object], default: !1 },
111
126
  page: {},
112
127
  pageSize: {},
@@ -129,18 +144,26 @@ const $l = ["aria-busy"], Hl = {
129
144
  indent: { default: 18 },
130
145
  loadChildren: {},
131
146
  showSummary: { type: Boolean },
147
+ summaryScope: { default: "filtered" },
148
+ stickySummary: { type: Boolean },
132
149
  sumText: { default: "合计" },
133
150
  summaryMethod: {},
134
151
  spanMethod: {},
135
- showOverflowTooltip: { type: Boolean },
152
+ showOverflowTooltip: { type: [Boolean, Object] },
136
153
  tooltipFormatter: {},
154
+ transformCellText: {},
137
155
  resizable: { type: Boolean },
138
156
  columnWidths: {},
139
157
  allowDragLastColumn: { type: Boolean, default: !0 }
140
158
  },
141
- emits: ["rowClick", "rowDblclick", "rowContextmenu", "cellClick", "cellDblclick", "cellContextmenu", "cellMouseEnter", "cellMouseLeave", "headerClick", "headerContextmenu", "update:sort", "update:sorts", "sortChange", "update:filters", "filterChange", "update:selectedRowKeys", "selectionChange", "select", "selectAll", "selectInvert", "selectRange", "update:currentRowKey", "currentChange", "update:expandedRowKeys", "expandChange", "load", "loadError", "childrenChange", "update:filterColumnKey", "filterOpenChange", "update:page", "pageChange", "update:pageSize", "pageSizeChange", "queryChange", "change", "update:columnWidths", "columnResize", "scroll"],
142
- setup(i, { expose: Ht, emit: Lt }) {
143
- const r = i, x = Lt, Pe = Al(), Oe = yl(), le = M(), K = M(), Q = M(), de = fl(), nt = M(1024), L = tt({}), Ee = M({}), oe = M(), p = F(() => ({
159
+ emits: ["rowClick", "rowDblclick", "rowContextmenu", "cellClick", "cellDblclick", "cellContextmenu", "cellMouseEnter", "cellMouseLeave", "headerClick", "headerContextmenu", "update:sort", "update:sorts", "sortChange", "update:filters", "filterChange", "update:selectedRowKeys", "selectionChange", "select", "selectAll", "selectInvert", "selectNone", "selectRange", "update:currentRowKey", "currentChange", "update:expandedRowKeys", "expandChange", "load", "loadError", "childrenChange", "update:filterColumnKey", "filterOpenChange", "update:page", "pageChange", "update:pageSize", "pageSizeChange", "queryChange", "change", "update:columnWidths", "columnResize", "scroll"],
160
+ setup(s, { expose: pl, emit: hl }) {
161
+ const r = s, P = hl, We = pa(), lt = Zl(), ce = E(), q = E(), Kt = E(), Dt = E(), fe = _l();
162
+ function Wt(e) {
163
+ const t = e && "$el" in e ? e.$el : e;
164
+ return (t == null ? void 0 : t.nodeType) === 1 ? t : void 0;
165
+ }
166
+ const me = g(() => Wt(Kt.value)), Le = g(() => Wt(Dt.value)), Lt = E(1024), Y = et({}), at = E({}), pe = E(), m = g(() => ({
144
167
  emptyText: "暂无数据",
145
168
  loadingText: "加载中…",
146
169
  selectAll: "选择当前页全部行",
@@ -159,103 +182,106 @@ const $l = ["aria-busy"], Hl = {
159
182
  resizeColumn: "调整{label}列宽",
160
183
  sortAsc: "{label}升序",
161
184
  sortDesc: "{label}降序",
185
+ sortClear: "取消{label}排序",
186
+ stickyScrollLabel: "表格横向滚动条",
162
187
  filterSearch: "搜索筛选项",
163
188
  noFilterMatch: "暂无匹配的筛选项",
164
189
  invertSelection: "反选当前页",
165
190
  clearSelection: "清空选择",
166
191
  selected: "已选 {count} 项",
167
192
  ...r.locale
168
- })), ye = (e, l) => e.replace("{index}", String(l)).replace("{label}", String(l)), ke = ({ value: e }) => e;
169
- function Ke(e) {
170
- const l = [...r.columns], t = /* @__PURE__ */ new Set();
171
- for (; l.length; ) {
172
- const n = l.pop();
173
- if (!t.has(n)) {
174
- if (t.add(n), n.type === e) return !0;
175
- n.children && l.push(...n.children);
193
+ })), he = (e, t) => e.replace("{index}", String(t)).replace("{label}", String(t)), oe = ({ value: e }) => e;
194
+ function ot(e) {
195
+ const t = [...r.columns], n = /* @__PURE__ */ new Set();
196
+ for (; t.length; ) {
197
+ const u = t.pop();
198
+ if (!n.has(u)) {
199
+ if (n.add(u), u.type === e) return !0;
200
+ u.children && t.push(...u.children);
176
201
  }
177
202
  }
178
203
  return !1;
179
204
  }
180
- function $e(e) {
181
- let l = "@hys-" + e;
182
- const t = /* @__PURE__ */ new Set(), n = [...r.columns], d = /* @__PURE__ */ new Set();
183
- for (; n.length; ) {
184
- const a = n.pop();
185
- d.has(a) || (d.add(a), t.add(a.key), a.children && n.push(...a.children));
205
+ function nt(e) {
206
+ let t = "@hys-" + e;
207
+ const n = /* @__PURE__ */ new Set(), u = [...r.columns], d = /* @__PURE__ */ new Set();
208
+ for (; u.length; ) {
209
+ const f = u.pop();
210
+ d.has(f) || (d.add(f), n.add(f.key), f.children && u.push(...f.children));
186
211
  }
187
- for (; t.has(l); ) l += "_";
188
- return l;
212
+ for (; n.has(t); ) t += "_";
213
+ return t;
189
214
  }
190
- const Nt = F(() => {
191
- var l;
215
+ const bl = g(() => {
216
+ var t;
192
217
  const e = [];
193
- return r.selectable && !Ke("selection") && e.push({
194
- key: $e("selection"),
218
+ return r.selectable && !ot("selection") && e.push({
219
+ key: nt("selection"),
195
220
  type: "selection",
196
221
  align: "center",
197
222
  width: 48,
198
223
  fixed: "left",
199
224
  resizable: !1,
200
225
  ...r.selectionColumn,
201
- label: ((l = r.selectionColumn) == null ? void 0 : l.label) ?? "选择"
202
- }), (r.expandable || Oe.expand) && !r.treeMode && r.showExpandColumn && !Ke("expand") && e.push({
203
- key: $e("expand"),
226
+ label: ((t = r.selectionColumn) == null ? void 0 : t.label) ?? "选择"
227
+ }), (r.expandable || lt.expand) && !r.treeMode && r.showExpandColumn && !ot("expand") && e.push({
228
+ key: nt("expand"),
204
229
  label: r.expandColumnTitle ?? "展开",
205
230
  type: "expand",
206
231
  align: "center",
207
232
  width: 48,
208
233
  fixed: r.expandFixed ?? "left",
209
234
  resizable: !1
210
- }), r.showIndex && !Ke("index") && e.push({
211
- key: $e("index"),
235
+ }), r.showIndex && !ot("index") && e.push({
236
+ key: nt("index"),
212
237
  label: "序号",
213
238
  type: "index",
214
239
  align: "center",
215
240
  width: 64,
216
241
  resizable: !1
217
242
  }), [...e, ...r.columns].filter(
218
- (t) => r.showExpandColumn || t.type !== "expand"
243
+ (n) => r.showExpandColumn || n.type !== "expand"
219
244
  );
220
- }), m = F(
221
- () => Pl(
222
- Nt.value,
223
- Ol(nt.value),
245
+ }), p = g(
246
+ () => ga(
247
+ bl.value,
248
+ ka(Lt.value),
224
249
  r.showExpandColumn
225
250
  )
226
- ), s = Bl(
251
+ ), i = ha(
227
252
  r,
228
- () => m.value.leaves,
229
- () => !!Oe.expand,
230
- (e, ...l) => x(e, ...l)
253
+ () => p.value.leaves,
254
+ () => !!lt.expand,
255
+ (e, ...t) => P(e, ...t)
231
256
  ), {
232
- busy: k,
233
- display: Y,
234
- selectedKeys: fe,
235
- selectedSet: He,
236
- expandedKeys: Le,
237
- expandedSet: $,
238
- halfSet: it,
239
- allSelected: st,
240
- someSelected: Ne,
241
- sorts: G,
242
- filters: we,
243
- page: We,
244
- pageSize: be,
245
- total: rt,
246
- currentKey: ut,
247
- pending: ne,
248
- loadErrors: Wt,
249
- query: De
250
- } = s, ge = F(
257
+ busy: h,
258
+ display: _,
259
+ selectedKeys: be,
260
+ selectedSet: it,
261
+ expandedKeys: st,
262
+ expandedSet: U,
263
+ halfSet: Nt,
264
+ allSelected: qt,
265
+ someSelected: rt,
266
+ sorts: ee,
267
+ filters: ut,
268
+ page: ct,
269
+ pageSize: dt,
270
+ pageCount: jt,
271
+ paginationTotal: gl,
272
+ currentKey: Vt,
273
+ pending: ge,
274
+ loadErrors: kl,
275
+ query: vt
276
+ } = i, Ne = g(
251
277
  () => {
252
278
  var e;
253
- return (e = m.value.leaves.find((l) => !l.type || l.type === "default")) == null ? void 0 : e.key;
279
+ return (e = p.value.leaves.find((t) => !t.type || t.type === "default")) == null ? void 0 : e.key;
254
280
  }
255
- ), Dt = F(
256
- () => m.value.leaves.some((e) => e.type === "expand")
257
- ), ct = F(() => {
258
- if (!r.pagination || s.pagination.value.hideOnSinglePage && rt.value <= be.value)
281
+ ), wl = g(
282
+ () => p.value.leaves.some((e) => e.type === "expand")
283
+ ), It = g(() => {
284
+ if (!r.pagination || i.pagination.value.hideOnSinglePage && jt.value <= 1)
259
285
  return [];
260
286
  const e = [
261
287
  "top-left",
@@ -266,24 +292,29 @@ const $l = ["aria-busy"], Hl = {
266
292
  "bottom-right"
267
293
  ];
268
294
  return [
269
- ...new Set(s.pagination.value.position ?? ["bottom-right"])
270
- ].filter((l) => e.includes(l));
271
- }), dt = F(() => ({
272
- page: We.value,
273
- pageSize: be.value,
274
- total: rt.value,
275
- showSizeChanger: s.pagination.value.showSizeChanger ?? !0,
276
- showQuickJumper: s.pagination.value.showQuickJumper ?? !1,
277
- showTotal: s.pagination.value.showTotal ?? !0,
278
- compact: s.pagination.value.compact,
279
- labels: p.value.paginationLabels,
280
- pageSizeOptions: s.pagination.value.pageSizeOptions,
281
- disabled: k.value
282
- })), qe = Object.freeze({});
283
- function ie(e) {
295
+ ...new Set(i.pagination.value.position ?? ["bottom-right"])
296
+ ].filter((t) => e.includes(t));
297
+ }), qe = g(() => ({
298
+ page: ct.value,
299
+ pageSize: dt.value,
300
+ total: gl.value,
301
+ pageCount: jt.value,
302
+ showSizeChanger: i.pagination.value.showSizeChanger ?? !0,
303
+ showQuickJumper: i.pagination.value.showQuickJumper ?? !1,
304
+ showTotal: i.pagination.value.showTotal ?? !0,
305
+ compact: i.pagination.value.compact,
306
+ layout: i.pagination.value.layout,
307
+ size: i.pagination.value.size,
308
+ responsive: i.pagination.value.responsive,
309
+ siblingCount: i.pagination.value.siblingCount,
310
+ labels: m.value.paginationLabels,
311
+ pageSizeOptions: i.pagination.value.pageSizeOptions,
312
+ disabled: h.value
313
+ })), yt = Object.freeze({});
314
+ function ke(e) {
284
315
  return e ? Object.fromEntries(
285
316
  Object.entries(e).filter(
286
- ([l]) => ![
317
+ ([t]) => ![
287
318
  "key",
288
319
  "ref",
289
320
  "innerHTML",
@@ -296,114 +327,124 @@ const $l = ["aria-busy"], Hl = {
296
327
  "data-row-key",
297
328
  "aria-selected",
298
329
  "aria-sort"
299
- ].includes(l)
330
+ ].includes(t)
300
331
  )
301
- ) : qe;
332
+ ) : yt;
302
333
  }
303
- function qt(e) {
304
- var t, n, d;
334
+ function Cl(e) {
335
+ var n, u, d;
305
336
  if (!r.customHeaderCell && !e.column.customHeaderCell)
306
- return qe;
307
- const l = m.value.leaves.indexOf(e.leaves[0]);
308
- return W(
309
- ie((t = r.customHeaderCell) == null ? void 0 : t.call(r, e.column, l)),
310
- ie((d = (n = e.column).customHeaderCell) == null ? void 0 : d.call(n, e.column, l))
337
+ return yt;
338
+ const t = p.value.leaves.indexOf(e.leaves[0]);
339
+ return V(
340
+ ke((n = r.customHeaderCell) == null ? void 0 : n.call(r, e.column, t)),
341
+ ke((d = (u = e.column).customHeaderCell) == null ? void 0 : d.call(u, e.column, t))
311
342
  );
312
343
  }
313
- function Vt(e) {
314
- var l, t, n;
315
- return !r.customCell && !e.column.customCell ? qe : W(
316
- ie((l = r.customCell) == null ? void 0 : l.call(r, e)),
317
- ie((n = (t = e.column).customCell) == null ? void 0 : n.call(t, e))
344
+ function Sl(e) {
345
+ var t, n, u;
346
+ return !r.customCell && !e.column.customCell ? yt : V(
347
+ ke((t = r.customCell) == null ? void 0 : t.call(r, e)),
348
+ ke((u = (n = e.column).customCell) == null ? void 0 : u.call(n, e))
318
349
  );
319
350
  }
320
- let ve = !1;
321
- function jt(e, l) {
322
- const t = ve;
323
- ve = !1, s.toggleRowSelection(e.key, l, t);
351
+ let Fe = !1;
352
+ function xl(e, t) {
353
+ const n = Fe;
354
+ Fe = !1, i.toggleRowSelection(e.key, t, n);
324
355
  }
325
- const yt = F(
326
- () => r.stickyHeader ?? (r.height !== void 0 || r.maxHeight !== void 0)
327
- ), Ve = F(() => r.columnWidths ?? Ee.value);
328
- function U(e) {
329
- var t, n;
330
- const l = ((t = oe.value) == null ? void 0 : t.key) === e.key ? oe.value.width : ((n = ae.value) == null ? void 0 : n[e.key]) ?? Ve.value[e.key] ?? (typeof e.width == "number" ? e.width : 160);
356
+ const Ut = g(
357
+ () => r.stickyHeader ?? (!!r.sticky || r.height !== void 0 || r.maxHeight !== void 0)
358
+ ), {
359
+ headerTop: Jt,
360
+ bar: we,
361
+ scrollbar: Rl,
362
+ syncScrollbar: Tl,
363
+ scrollViewport: Xt,
364
+ scrollbarHeight: Fl
365
+ } = ba(q, Le, () => r.sticky), ft = g(() => r.columnWidths ?? at.value);
366
+ function ne(e) {
367
+ var n, u;
368
+ const t = ((n = pe.value) == null ? void 0 : n.key) === e.key ? pe.value.width : ((u = de.value) == null ? void 0 : u[e.key]) ?? ft.value[e.key] ?? (typeof e.width == "number" ? e.width : 160);
331
369
  return Math.max(
332
370
  e.minWidth ?? (e.type && e.type !== "default" ? 36 : 60),
333
- Math.min(e.maxWidth ?? 2e3, Number.isFinite(l) ? l : 160)
371
+ Math.min(e.maxWidth ?? 2e3, Number.isFinite(t) ? t : 160)
334
372
  );
335
373
  }
336
- function It(e) {
337
- var l;
338
- return ae.value !== void 0 || ((l = oe.value) == null ? void 0 : l.key) === e.key || Ve.value[e.key] !== void 0 || typeof e.width != "string" ? U(e) + "px" : e.width;
374
+ function zl(e) {
375
+ var t;
376
+ return de.value !== void 0 || ((t = pe.value) == null ? void 0 : t.key) === e.key || ft.value[e.key] !== void 0 || typeof e.width != "string" ? ne(e) + "px" : e.width;
339
377
  }
340
- const ae = M(), Ce = M(!1), ft = F(
341
- () => m.value.leaves.reduce((e, l) => e + U(l), 0)
342
- ), Ut = F(() => {
378
+ const de = E(), je = E(!1), mt = g(
379
+ () => p.value.leaves.reduce((e, t) => e + ne(t), 0)
380
+ ), Al = g(() => {
343
381
  const e = {};
344
- let l = 0, t = 0;
345
- for (const n of m.value.leaves)
346
- n.fixed === "left" && (e[n.key] = { left: l + "px" }, l += L.value[n.key] ?? U(n));
347
- for (const n of [...m.value.leaves].reverse())
348
- n.fixed === "right" && (e[n.key] = { right: t + "px" }, t += L.value[n.key] ?? U(n));
382
+ let t = 0, n = 0;
383
+ for (const u of p.value.leaves)
384
+ u.fixed === "left" && (e[u.key] = { left: t + "px" }, t += Y.value[u.key] ?? ne(u));
385
+ for (const u of [...p.value.leaves].reverse())
386
+ u.fixed === "right" && (e[u.key] = { right: n + "px" }, n += Y.value[u.key] ?? ne(u));
349
387
  return e;
350
388
  });
351
- function je(e, l = !1) {
389
+ function pt(e, t = !1) {
352
390
  return e.fixed === "left" || e.fixed === "right" ? {
353
391
  position: "sticky",
354
- ...Ut.value[e.key],
355
- zIndex: l ? 6 : 2
392
+ ...Al.value[e.key],
393
+ zIndex: t ? 6 : 2
356
394
  } : {};
357
395
  }
358
- function Jt(e) {
359
- const l = e.column, t = e.fixed === "right" ? e.leaves.at(-1) : e.leaves[0];
396
+ function Pl(e) {
397
+ const t = e.column, n = e.fixed === "right" ? e.leaves.at(-1) : e.leaves[0];
360
398
  return {
361
- ...typeof r.headerCellStyle == "function" ? r.headerCellStyle(l, m.value.leaves.indexOf(t)) : r.headerCellStyle,
362
- ...je(t, !0),
363
- textAlign: l.headerAlign ?? l.align,
364
- "--hys-ui-table-justify": (l.headerAlign ?? l.align) === "right" ? "flex-end" : (l.headerAlign ?? l.align) === "center" ? "center" : "flex-start"
399
+ ...typeof r.headerCellStyle == "function" ? r.headerCellStyle(t, p.value.leaves.indexOf(n)) : r.headerCellStyle,
400
+ ...pt(n, !0),
401
+ textAlign: t.headerAlign ?? t.align,
402
+ "--hys-ui-table-justify": (t.headerAlign ?? t.align) === "right" ? "flex-end" : (t.headerAlign ?? t.align) === "center" ? "center" : "flex-start"
365
403
  };
366
404
  }
367
- const vt = (e) => typeof e == "number" ? Number.isFinite(e) && e >= 0 ? e + "px" : void 0 : e, Ie = M(/* @__PURE__ */ new Set());
368
- ee(
369
- Le,
405
+ const ze = (e) => typeof e == "number" ? Number.isFinite(e) && e >= 0 ? e + "px" : void 0 : e, Ml = g(() => {
406
+ const e = ze(r.scrollWidth), t = mt.value + "px";
407
+ return e && e !== "max-content" ? `max(${t}, ${e})` : t;
408
+ }), Bl = g(() => je.value || de.value || Object.keys(r.columnWidths ?? {}).length ? mt.value + "px" : r.scrollWidth === "max-content" ? "max-content" : r.fit ? "100%" : mt.value + "px"), ht = E(/* @__PURE__ */ new Set());
409
+ G(
410
+ st,
370
411
  () => {
371
- const e = new Set(Ie.value);
372
- for (const l of Le.value) e.add(El(l));
373
- for (const l of e)
374
- s.graph.value.map.has(l) || e.delete(l);
375
- Ie.value = e;
412
+ const e = new Set(ht.value);
413
+ for (const t of st.value) e.add(wa(t));
414
+ for (const t of e)
415
+ i.graph.value.map.has(t) || e.delete(t);
416
+ ht.value = e;
376
417
  },
377
418
  { immediate: !0 }
378
419
  );
379
- function mt(e) {
380
- return !!Oe.expand && s.canExpand(e) && ($.value.has(e.token) || r.preserveExpandedContent && Ie.value.has(e.token));
420
+ function Qt(e) {
421
+ return !!lt.expand && i.canExpand(e) && (U.value.has(e.token) || r.preserveExpandedContent && ht.value.has(e.token));
381
422
  }
382
- function H(e, l, t, n) {
423
+ function J(e, t, n, u) {
383
424
  return {
384
425
  row: e,
385
- column: l,
386
- value: Be(e, l.dataIndex ?? l.key),
387
- rowIndex: t,
388
- columnIndex: n
426
+ column: t,
427
+ value: De(e, t.dataIndex ?? t.key),
428
+ rowIndex: n,
429
+ columnIndex: u
389
430
  };
390
431
  }
391
- function Xt(e) {
432
+ function Ol(e) {
392
433
  return {
393
434
  ...typeof r.cellStyle == "function" ? r.cellStyle(e) : r.cellStyle,
394
435
  ...typeof e.column.cellStyle == "function" ? e.column.cellStyle(e) : e.column.cellStyle,
395
- ...je(e.column),
436
+ ...pt(e.column),
396
437
  textAlign: e.column.align,
397
438
  "--hys-ui-table-justify": e.column.align === "right" ? "flex-end" : e.column.align === "center" ? "center" : "flex-start"
398
439
  };
399
440
  }
400
- function Qt(e) {
441
+ function $l(e) {
401
442
  return [
402
443
  e.column.className,
403
444
  typeof r.cellClassName == "function" ? r.cellClassName(e) : r.cellClassName
404
445
  ];
405
446
  }
406
- function Ue(e) {
447
+ function Ve(e) {
407
448
  if (e == null) return "";
408
449
  if (typeof e != "object") return String(e);
409
450
  try {
@@ -412,1083 +453,1331 @@ const $l = ["aria-busy"], Hl = {
412
453
  return String(e);
413
454
  }
414
455
  }
415
- function Yt(e) {
416
- return e.column.formatter ? e.column.formatter(e.row, e.column, e.value, e.rowIndex) : Ue(e.value);
456
+ function El(e) {
457
+ const t = e.column.formatter ? e.column.formatter(e.row, e.column, e.value, e.rowIndex) : Ve(e.value);
458
+ return r.transformCellText ? r.transformCellText({ ...e, text: t }) : t;
417
459
  }
418
- function Gt(e, l, t) {
419
- k.value || (x("rowClick", e.row, l, t), r.highlightCurrentRow && s.setCurrentRow(e.key), r.expandOnClickRow && !t.target.closest(
460
+ function Hl(e, t, n) {
461
+ h.value || (P("rowClick", e.row, t, n), r.highlightCurrentRow && i.setCurrentRow(e.key), r.expandOnClickRow && !n.target.closest(
420
462
  "button,input,a,textarea,select,[contenteditable]"
421
- ) && s.toggleRowExpansion(e.key));
463
+ ) && i.toggleRowExpansion(e.key));
422
464
  }
423
- const Zt = F(() => {
424
- var n;
425
- const e = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), t = m.value.leaves;
426
- for (let d = 0; d < Y.value.length; d++)
427
- for (let a = 0; a < t.length; a++) {
428
- const f = d + ":" + a, y = t[a];
429
- if (l.has(f)) {
430
- e.set(f, { rowspan: 0, colspan: 0 });
465
+ const Kl = g(() => {
466
+ var u;
467
+ const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = p.value.leaves;
468
+ for (let d = 0; d < _.value.length; d++)
469
+ for (let f = 0; f < n.length; f++) {
470
+ const F = d + ":" + f, b = n[f];
471
+ if (t.has(F)) {
472
+ e.set(F, { rowspan: 0, colspan: 0 });
431
473
  continue;
432
474
  }
433
- const w = y.type && y.type !== "default" || (n = r.spanMethod) == null ? void 0 : n.call(r, H(Y.value[d].row, y, d, a)), P = Array.isArray(w) ? { rowspan: w[0], colspan: w[1] } : w;
434
- let z = Math.max(
475
+ const o = b.type && b.type !== "default" || (u = r.spanMethod) == null ? void 0 : u.call(r, J(_.value[d].row, b, d, f)), v = Array.isArray(o) ? { rowspan: o[0], colspan: o[1] } : o;
476
+ let $ = Math.max(
435
477
  0,
436
- Math.min(Y.value.length - d, Math.floor((P == null ? void 0 : P.rowspan) ?? 1))
437
- ), R = Math.max(
478
+ Math.min(_.value.length - d, Math.floor((v == null ? void 0 : v.rowspan) ?? 1))
479
+ ), M = Math.max(
438
480
  0,
439
- Math.min(t.length - a, Math.floor((P == null ? void 0 : P.colspan) ?? 1))
481
+ Math.min(n.length - f, Math.floor((v == null ? void 0 : v.colspan) ?? 1))
440
482
  );
441
- Number.isFinite(z) || (z = 1), Number.isFinite(R) || (R = 1);
442
- for (let h = 0; h < z - 1; h++)
443
- if (mt(Y.value[d + h]) && $.value.has(Y.value[d + h].token)) {
444
- z = h + 1;
483
+ Number.isFinite($) || ($ = 1), Number.isFinite(M) || (M = 1);
484
+ for (let C = 0; C < $ - 1; C++)
485
+ if (Qt(_.value[d + C]) && U.value.has(_.value[d + C].token)) {
486
+ $ = C + 1;
445
487
  break;
446
488
  }
447
- for (let h = 1; h < R; h++)
448
- if (t[a + h].fixed !== y.fixed || t[a + h].type && t[a + h].type !== "default") {
449
- R = h;
489
+ for (let C = 1; C < M; C++)
490
+ if (n[f + C].fixed !== b.fixed || n[f + C].type && n[f + C].type !== "default") {
491
+ M = C;
450
492
  break;
451
493
  }
452
- e.set(f, { rowspan: z, colspan: R });
453
- for (let h = 0; h < z; h++)
454
- for (let v = 0; v < R; v++)
455
- (h || v) && l.add(d + h + ":" + (a + v));
494
+ e.set(F, { rowspan: $, colspan: M });
495
+ for (let C = 0; C < $; C++)
496
+ for (let a = 0; a < M; a++)
497
+ (C || a) && t.add(d + C + ":" + (f + a));
456
498
  }
457
499
  return e;
458
- }), Se = (e, l) => Zt.value.get(e + ":" + l) ?? { rowspan: 1, colspan: 1 }, ht = F(() => {
459
- var t;
460
- const e = s.filteredRows.value, l = (t = r.summaryMethod) == null ? void 0 : t.call(r, { columns: m.value.leaves, rows: e });
461
- return m.value.leaves.map(
462
- (n, d) => l ? Array.isArray(l) ? l[d] : l[n.key] : n.summary ? Kl(e, n) : n.key === ge.value ? r.sumText : ""
500
+ }), Ie = (e, t) => Kl.value.get(e + ":" + t) ?? { rowspan: 1, colspan: 1 }, bt = g(() => _.value.map((e) => e.row)), gt = g(
501
+ () => r.summaryScope === "page" ? bt.value : i.filteredRows.value
502
+ ), kt = g(() => {
503
+ var n;
504
+ const e = gt.value, t = (n = r.summaryMethod) == null ? void 0 : n.call(r, { columns: p.value.leaves, rows: e });
505
+ return p.value.leaves.map(
506
+ (u, d) => t ? Array.isArray(t) ? t[d] : t[u.key] : u.summary ? Ca(e, u) : u.key === Ne.value ? r.sumText : ""
463
507
  );
464
- }), Je = M(), Xe = M(), b = tt(), Z = M([]), pt = M(null), se = F(
465
- () => r.filterColumnKey === void 0 ? pt.value : r.filterColumnKey
466
- );
467
- let Qe = !1;
468
- async function xe(e, l = !1) {
508
+ });
509
+ function Yt(e) {
510
+ return {
511
+ "data-column-key": e.key,
512
+ style: { ...pt(e), textAlign: e.align }
513
+ };
514
+ }
515
+ const Ae = E(), wt = E(), k = et(), ie = E([]), Ct = E(null), ve = g(() => {
516
+ if (r.filterColumnKey !== void 0) return r.filterColumnKey;
517
+ const e = p.value.leaves, t = e.find((n) => Ue(n) && n.filterDropdownOpen === !0);
518
+ return t ? t.key : e.some((n) => n.key === Ct.value && n.filterDropdownOpen === !1) ? null : Ct.value;
519
+ });
520
+ function Ue(e) {
521
+ return !!(e.filterable || e.filters || e.renderFilterDropdown || e.filterMethod || e.filteredValue);
522
+ }
523
+ function St(e) {
469
524
  var t;
470
- return e !== null && (k.value || !s.live.value || !m.value.leaves.some(
471
- (n) => n.key === e && (n.filterable || n.filters)
472
- )) ? !1 : (Qe = l, pt.value = e, x("update:filterColumnKey", e), se.value === e && Re(), await pe(), se.value === e && Re(), await pe(), s.live.value && se.value === e && (e === null ? !j.value : j.value && ((t = b.value) == null ? void 0 : t.key) === e));
525
+ return e.filtered ?? !!((t = ut.value[e.key]) != null && t.length);
526
+ }
527
+ let xt = !1;
528
+ async function Je(e, t = !1) {
529
+ var f, F, b, o;
530
+ const n = p.value.leaves, u = n.find((v) => v.key === e && Ue(v));
531
+ if (e !== null && (h.value || !i.live.value || !u))
532
+ return !1;
533
+ const d = ve.value;
534
+ return xt = t, Ct.value = e, e !== d && ((F = (f = n.find((v) => v.key === d)) == null ? void 0 : f.onFilterDropdownOpenChange) == null || F.call(f, !1), (b = u == null ? void 0 : u.onFilterDropdownOpenChange) == null || b.call(u, !0)), P("update:filterColumnKey", e), ve.value === e && Xe(), await Ke(), ve.value === e && Xe(), await Ke(), i.live.value && ve.value === e && (e === null ? !X.value : X.value && ((o = k.value) == null ? void 0 : o.key) === e);
473
535
  }
474
- const B = $t(Je, Xe, {
475
- get placement() {
476
- return r.filterPlacement ?? "bottom-end";
536
+ const W = fl(Ae, wt, {
537
+ placement: () => {
538
+ var e;
539
+ return ((e = k.value) == null ? void 0 : e.filterPlacement) ?? r.filterPlacement ?? "bottom-end";
477
540
  },
478
541
  width: () => 260,
479
- requestOpen(e, l) {
480
- var t;
481
- return xe(
482
- e ? ((t = b.value) == null ? void 0 : t.key) ?? null : null,
483
- l
542
+ requestOpen(e, t) {
543
+ var n;
544
+ return Je(
545
+ e ? ((n = k.value) == null ? void 0 : n.key) ?? null : null,
546
+ t
484
547
  ), !1;
485
548
  }
486
- }), j = B.open, _t = B.style;
487
- function Re() {
488
- var d, a, f;
489
- const e = se.value, l = m.value.leaves.find(
490
- (y) => y.key === e && (y.filterable || y.filters)
549
+ }), X = W.open, Dl = W.style, Gt = g(
550
+ () => {
551
+ var e;
552
+ return r.appendFilterTo ?? (Ae.value && ((e = r.getPopupContainer) == null ? void 0 : e.call(r, Ae.value))) ?? "body";
553
+ }
554
+ );
555
+ function Xe() {
556
+ var d, f, F;
557
+ const e = ve.value, t = p.value.leaves.find(
558
+ (b) => b.key === e && Ue(b)
491
559
  );
492
- if (k.value || !s.live.value || !l) {
493
- B.close(Qe, !0), Qe = !1;
560
+ if (h.value || !i.live.value || !t) {
561
+ W.close(xt, !0), xt = !1;
494
562
  return;
495
563
  }
496
- const t = (a = Array.from(
497
- ((d = Q.value) == null ? void 0 : d.querySelectorAll("th[data-leaf]")) ?? []
498
- ).find((y) => y.dataset.columnKey === e)) == null ? void 0 : a.querySelector(".hys-ui-table-filter");
499
- if (!t) {
500
- B.close(!1, !0);
564
+ const n = (f = Array.from(
565
+ ((d = Le.value) == null ? void 0 : d.querySelectorAll("th[data-column-key]")) ?? []
566
+ ).find((b) => b.dataset.columnKey === e)) == null ? void 0 : f.querySelector(".hys-ui-table-filter");
567
+ if (!n) {
568
+ W.close(!1, !0);
501
569
  return;
502
570
  }
503
- const n = ((f = b.value) == null ? void 0 : f.key) !== e || !j.value;
504
- Je.value = t, b.value = l, n && (Z.value = [...we.value[l.key] ?? []]), B.show(!0), pe(() => {
505
- var y, w;
506
- n && j.value && se.value === e && ((w = (y = Xe.value) == null ? void 0 : y.querySelector('input,button,[tabindex="0"]')) == null || w.focus());
571
+ const u = ((F = k.value) == null ? void 0 : F.key) !== e || !X.value;
572
+ Ae.value = n, k.value = t, u && (ie.value = [...ut.value[t.key] ?? []]), W.show(!0), Ke(() => {
573
+ var b, o;
574
+ u && X.value && ve.value === e && ((o = (b = wt.value) == null ? void 0 : b.querySelector('input,button,[tabindex="0"]')) == null || o.focus());
507
575
  });
508
576
  }
509
- ee(
577
+ G(
510
578
  [
511
- se,
512
- k,
513
- s.live,
514
- () => m.value.leaves,
515
- () => r.showHeader
579
+ ve,
580
+ h,
581
+ i.live,
582
+ () => p.value.leaves,
583
+ () => r.showHeader,
584
+ Le
516
585
  ],
517
- Re,
586
+ Xe,
518
587
  { immediate: !0, flush: "post" }
519
- ), ee(
588
+ ), G(
520
589
  () => {
521
590
  var e;
522
- return j.value ? ((e = b.value) == null ? void 0 : e.key) ?? null : null;
591
+ return X.value ? ((e = k.value) == null ? void 0 : e.key) ?? null : null;
523
592
  },
524
- (e) => x("filterOpenChange", e)
593
+ (e) => P("filterOpenChange", e)
525
594
  );
526
- async function el(e, l) {
527
- var t;
528
- if (!k.value) {
529
- if (j.value && ((t = b.value) == null ? void 0 : t.key) === e.key) {
530
- B.close();
595
+ async function Wl(e, t) {
596
+ var n;
597
+ if (!h.value) {
598
+ if (X.value && ((n = k.value) == null ? void 0 : n.key) === e.key) {
599
+ W.close();
531
600
  return;
532
601
  }
533
- Je.value = l.currentTarget, await xe(e.key);
602
+ Ae.value = t.currentTarget, await Je(e.key);
534
603
  }
535
604
  }
536
- function kt(e) {
537
- Z.value = [...e];
605
+ function Rt(e) {
606
+ ie.value = [...e];
538
607
  }
539
- function Te(e) {
540
- b.value && s.setFilter(b.value.key, Z.value), (e == null ? void 0 : e.closeDropdown) !== !1 && B.close(!0);
608
+ function Pe(e) {
609
+ k.value && i.setFilter(k.value.key, ie.value), (e == null ? void 0 : e.closeDropdown) !== !1 && W.close(!0);
541
610
  }
542
- function wt(e) {
543
- var n;
544
- const l = b.value;
545
- Z.value = l != null && l.filterResetToDefault ? [
546
- ...((n = r.defaultFilters) == null ? void 0 : n[l.key]) ?? l.defaultFilterValue ?? []
611
+ function Tt(e) {
612
+ var u;
613
+ const t = k.value;
614
+ ie.value = t != null && t.filterResetToDefault ? [
615
+ ...((u = r.defaultFilters) == null ? void 0 : u[t.key]) ?? t.defaultFilterValue ?? []
547
616
  ] : [];
548
- const t = e;
549
- (t == null ? void 0 : t.confirm) !== !1 ? Te(e) : (t == null ? void 0 : t.closeDropdown) === !0 && B.close(!0);
617
+ const n = e;
618
+ (n == null ? void 0 : n.confirm) !== !1 ? Pe(e) : (n == null ? void 0 : n.closeDropdown) === !0 && W.close(!0);
619
+ }
620
+ const Zt = g(() => k.value && {
621
+ column: k.value,
622
+ open: X.value,
623
+ values: ie.value,
624
+ setValues: Rt,
625
+ confirm: Pe,
626
+ clear: Tt,
627
+ close: () => W.close(!0)
628
+ }), Ce = E(), _t = E(), Q = et(), re = et();
629
+ function Qe(e) {
630
+ return e.showOverflowTooltip ?? r.showOverflowTooltip;
631
+ }
632
+ function Ll(e) {
633
+ return e.showSorterTooltip ?? r.showSorterTooltip;
634
+ }
635
+ const ue = g(() => {
636
+ var n;
637
+ const e = re.value ? r.showSorterTooltip : r.showOverflowTooltip, t = re.value ? re.value.showSorterTooltip : (n = Q.value) == null ? void 0 : n.column.showOverflowTooltip;
638
+ return {
639
+ ...typeof e == "object" ? e : void 0,
640
+ ...typeof t == "object" ? t : void 0
641
+ };
642
+ }), el = g(
643
+ () => {
644
+ var e;
645
+ return (Ce.value && ((e = r.getPopupContainer) == null ? void 0 : e.call(r, Ce.value))) ?? "body";
646
+ }
647
+ ), O = fl(Ce, _t, {
648
+ placement: () => ue.value.placement ?? "top-start",
649
+ get gap() {
650
+ return ue.value.offset;
651
+ }
652
+ }), Ye = O.open, Nl = O.style;
653
+ let Ge;
654
+ function Ft() {
655
+ clearTimeout(Ge);
550
656
  }
551
- const bt = M(), gt = M(), _ = tt(), N = $t(bt, gt, {
552
- placement: "top-start"
553
- }), Ct = N.open, tl = N.style;
554
- let me;
555
- function ll() {
556
- clearTimeout(me);
657
+ function Me() {
658
+ if (clearTimeout(Ge), !Ye.value) return;
659
+ const e = ue.value.hideDelay ?? 80;
660
+ Ge = setTimeout(() => O.close(), Number.isFinite(e) ? Math.max(0, e) : 80);
557
661
  }
558
- function Ye() {
559
- clearTimeout(me), me = setTimeout(() => N.close(), 80);
662
+ function tl(e, t) {
663
+ const n = t.currentTarget;
664
+ h.value || O.restoringFocus.value || !Qe(e.column) || n.scrollWidth <= n.clientWidth + 1 && n.scrollHeight <= n.clientHeight + 1 || (Ft(), Ce.value = n, re.value = void 0, Q.value = e, O.show());
560
665
  }
561
- function St(e, l) {
562
- clearTimeout(me);
563
- const t = l.currentTarget;
564
- k.value || N.restoringFocus.value || !(e.column.showOverflowTooltip ?? r.showOverflowTooltip) || t.scrollWidth <= t.clientWidth + 1 && t.scrollHeight <= t.clientHeight + 1 || (bt.value = t, _.value = e, N.show());
666
+ function ll(e, t) {
667
+ h.value || !Ll(e) || O.restoringFocus.value || (Ft(), Ce.value = t.currentTarget, Q.value = void 0, re.value = e, O.show());
565
668
  }
566
- const al = F(() => {
567
- var l;
568
- const e = _.value;
569
- return e ? ((l = e.column.tooltipFormatter ?? r.tooltipFormatter) == null ? void 0 : l(e)) ?? Ue(e.value) : "";
570
- });
571
- let J, Ge = 0, C, Ze = 0, _e = 0;
572
- function xt() {
573
- var t, n;
574
- if (!s.live.value || !le.value) return;
575
- nt.value = le.value.clientWidth;
576
- const e = {}, l = (t = Q.value) == null ? void 0 : t.querySelector(
669
+ const al = g(() => {
670
+ var n, u, d;
671
+ const e = re.value;
672
+ if (e) {
673
+ const f = i.nextSortOrder(e), F = f === "asc" ? m.value.sortAsc : f === "desc" ? m.value.sortDesc : m.value.sortClear;
674
+ return he(F, e.label);
675
+ }
676
+ const t = Q.value;
677
+ return t ? ((n = t.column.tooltipFormatter ?? r.tooltipFormatter) == null ? void 0 : n(t)) ?? (((d = (u = Ce.value) == null ? void 0 : u.textContent) == null ? void 0 : d.trim()) || Ve(t.value)) : "";
678
+ }), zt = g(
679
+ () => Array.isArray(r.selectionActions) ? r.selectionActions : void 0
680
+ ), ql = g(() => i.selectionPage.value.map(({ row: e }) => e)), jl = g(() => i.selectionPage.value.map(({ key: e }) => e));
681
+ function Vl(e) {
682
+ if (h.value || !i.live.value || e.disabled) return;
683
+ const t = i.selectionPage.value;
684
+ return e.select({
685
+ rows: t.map(({ row: n }) => n),
686
+ keys: t.map(({ key: n }) => n),
687
+ selectedKeys: [...be.value],
688
+ setSelected: (n) => i.selectPage(n, t)
689
+ });
690
+ }
691
+ let se, At = 0, T, Pt = 0, Mt = 0;
692
+ function ol() {
693
+ var n, u;
694
+ if (!i.live.value || !ce.value) return;
695
+ Lt.value = ce.value.clientWidth;
696
+ const e = {}, t = (n = me.value) == null ? void 0 : n.querySelector(
577
697
  "tbody tr:not(.hys-ui-table-message):not(.hys-ui-table-detail)"
578
698
  );
579
- for (const d of m.value.leaves) {
580
- const a = Array.from(
581
- ((n = Q.value) == null ? void 0 : n.querySelectorAll("th[data-leaf]")) ?? []
582
- ).find((y) => y.dataset.columnKey === d.key), f = a ?? Array.from(
583
- (l == null ? void 0 : l.querySelectorAll(
699
+ for (const d of p.value.leaves) {
700
+ const f = Array.from(
701
+ ((u = me.value) == null ? void 0 : u.querySelectorAll("th[data-leaf]")) ?? []
702
+ ).find((b) => b.dataset.columnKey === d.key), F = f ?? Array.from(
703
+ (t == null ? void 0 : t.querySelectorAll(
584
704
  "td[data-column-key],th[data-column-key]"
585
705
  )) ?? []
586
- ).find((y) => y.dataset.columnKey === d.key);
587
- f && (e[d.key] = f.getBoundingClientRect().width);
706
+ ).find((b) => b.dataset.columnKey === d.key);
707
+ F && (e[d.key] = F.getBoundingClientRect().width);
588
708
  }
589
- JSON.stringify(e) !== JSON.stringify(L.value) && (L.value = e);
709
+ JSON.stringify(e) !== JSON.stringify(Y.value) && (Y.value = e);
590
710
  }
591
- function re() {
592
- cancelAnimationFrame(Ge), Ge = requestAnimationFrame(xt);
711
+ function Se() {
712
+ cancelAnimationFrame(At), At = requestAnimationFrame(ol);
593
713
  }
594
- async function ol() {
595
- await pe(), xt();
714
+ async function Il() {
715
+ await Ke(), ol();
596
716
  }
597
- function I() {
598
- var e, l;
599
- cancelAnimationFrame(Ze), C && ((l = (e = K.value) == null ? void 0 : e.hasPointerCapture) != null && l.call(e, C.pointerId)) && K.value.releasePointerCapture(C.pointerId), C = void 0, oe.value = void 0, ae.value = void 0, document.removeEventListener("pointermove", zt, !0), document.removeEventListener("pointerup", Mt, !0), document.removeEventListener("pointercancel", ze, !0), document.removeEventListener("keydown", Rt, !0), window.removeEventListener("blur", ze);
717
+ function te() {
718
+ var e, t;
719
+ cancelAnimationFrame(Pt), T && ((t = (e = q.value) == null ? void 0 : e.hasPointerCapture) != null && t.call(e, T.pointerId)) && q.value.releasePointerCapture(T.pointerId), T = void 0, pe.value = void 0, de.value = void 0, document.removeEventListener("pointermove", sl, !0), document.removeEventListener("pointerup", ul, !0), document.removeEventListener("pointercancel", Ze, !0), document.removeEventListener("keydown", nl, !0), window.removeEventListener("blur", Ze);
600
720
  }
601
- function ze() {
602
- I();
721
+ function Ze() {
722
+ te();
603
723
  }
604
- function Rt(e) {
605
- e.key === "Escape" && C && (e.preventDefault(), e.stopImmediatePropagation(), I());
724
+ function nl(e) {
725
+ e.key === "Escape" && T && (e.preventDefault(), e.stopImmediatePropagation(), te());
606
726
  }
607
- function Tt() {
608
- if (!C) return;
609
- const e = getComputedStyle(le.value).direction === "rtl" ? -1 : 1;
610
- oe.value = {
611
- key: C.column.key,
727
+ function il() {
728
+ if (!T) return;
729
+ const e = getComputedStyle(ce.value).direction === "rtl" ? -1 : 1;
730
+ pe.value = {
731
+ key: T.column.key,
612
732
  width: Math.max(
613
- C.column.minWidth ?? 60,
733
+ T.column.minWidth ?? 60,
614
734
  Math.min(
615
- C.column.maxWidth ?? 2e3,
616
- C.width + (_e - C.start) * e
735
+ T.column.maxWidth ?? 2e3,
736
+ T.width + (Mt - T.start) * e
617
737
  )
618
738
  )
619
739
  };
620
740
  }
621
- function zt(e) {
622
- !C || e.pointerId !== C.pointerId || (_e = e.clientX, cancelAnimationFrame(Ze), Ze = requestAnimationFrame(Tt));
741
+ function sl(e) {
742
+ !T || e.pointerId !== T.pointerId || (Mt = e.clientX, cancelAnimationFrame(Pt), Pt = requestAnimationFrame(il));
623
743
  }
624
- function Ft(e, l, t, n) {
625
- if (k.value || !s.live.value) return;
744
+ function rl(e, t, n, u) {
745
+ if (h.value || !i.live.value) return;
626
746
  const d = Math.round(
627
- Math.max(e.minWidth ?? 60, Math.min(e.maxWidth ?? 2e3, l))
747
+ Math.max(e.minWidth ?? 60, Math.min(e.maxWidth ?? 2e3, t))
628
748
  );
629
- if (d === t) return;
630
- const a = {
631
- ...Ve.value,
632
- ...L.value,
633
- ...n,
749
+ if (d === n) return;
750
+ const f = {
751
+ ...ft.value,
752
+ ...Y.value,
753
+ ...u,
634
754
  [e.key]: d
635
755
  };
636
- Ee.value = a, x("update:columnWidths", a), r.columnWidths === void 0 && (Ce.value = !0), x("columnResize", e, d, t), re();
756
+ at.value = f, P("update:columnWidths", f), r.columnWidths === void 0 && (je.value = !0), P("columnResize", e, d, n), Se();
637
757
  }
638
- function Mt(e) {
639
- var a;
640
- if (!C || e.pointerId !== C.pointerId) return;
641
- _e = e.clientX, Tt();
642
- const { column: l, width: t } = C, n = ((a = oe.value) == null ? void 0 : a.width) ?? t, d = ae.value;
643
- I(), Ft(l, n, t, d);
758
+ function ul(e) {
759
+ var f;
760
+ if (!T || e.pointerId !== T.pointerId) return;
761
+ Mt = e.clientX, il();
762
+ const { column: t, width: n } = T, u = ((f = pe.value) == null ? void 0 : f.width) ?? n, d = de.value;
763
+ te(), rl(t, u, n, d);
644
764
  }
645
- function nl(e, l) {
646
- var n, d;
647
- if (k.value || l.button !== 0 || !s.live.value) return;
648
- B.close(), N.close(), I();
649
- const t = L.value[e.key] ?? U(e);
650
- ae.value = { ...L.value }, C = {
765
+ function Ul(e, t) {
766
+ var u, d;
767
+ if (h.value || t.button !== 0 || !i.live.value) return;
768
+ W.close(), O.close(), te();
769
+ const n = Y.value[e.key] ?? ne(e);
770
+ de.value = { ...Y.value }, T = {
651
771
  column: e,
652
- start: l.clientX,
653
- width: t,
654
- pointerId: l.pointerId
655
- }, (d = (n = K.value) == null ? void 0 : n.setPointerCapture) == null || d.call(n, l.pointerId), document.addEventListener("pointermove", zt, !0), document.addEventListener("pointerup", Mt, !0), document.addEventListener("pointercancel", ze, !0), document.addEventListener("keydown", Rt, !0), window.addEventListener("blur", ze);
772
+ start: t.clientX,
773
+ width: n,
774
+ pointerId: t.pointerId
775
+ }, (d = (u = q.value) == null ? void 0 : u.setPointerCapture) == null || d.call(u, t.pointerId), document.addEventListener("pointermove", sl, !0), document.addEventListener("pointerup", ul, !0), document.addEventListener("pointercancel", Ze, !0), document.addEventListener("keydown", nl, !0), window.addEventListener("blur", Ze);
656
776
  }
657
- function il() {
658
- k.value || (I(), Ee.value = {}, Ce.value = !1, x("update:columnWidths", {}), re());
777
+ function Jl() {
778
+ h.value || (te(), at.value = {}, je.value = !1, P("update:columnWidths", {}), Se());
659
779
  }
660
- function et(e, l) {
661
- const t = m.value.leaves.find((n) => n.key === e);
662
- t && Number.isFinite(l) && Ft(t, l, L.value[e] ?? U(t));
780
+ function Bt(e, t) {
781
+ const n = p.value.leaves.find((u) => u.key === e);
782
+ n && Number.isFinite(t) && rl(n, t, Y.value[e] ?? ne(n));
663
783
  }
664
- function sl(e) {
665
- K.value && (N.close(), x(
784
+ function Xl(e) {
785
+ q.value && (Tl(), O.close(), P(
666
786
  "scroll",
667
787
  {
668
- scrollLeft: K.value.scrollLeft,
669
- scrollTop: K.value.scrollTop
788
+ scrollLeft: q.value.scrollLeft,
789
+ scrollTop: q.value.scrollTop
670
790
  },
671
791
  e
672
792
  ));
673
793
  }
674
- function At() {
675
- J == null || J.disconnect(), typeof ResizeObserver < "u" && (J = new ResizeObserver(re), le.value && J.observe(le.value), Q.value && J.observe(Q.value)), re();
794
+ function Ot() {
795
+ se == null || se.disconnect(), typeof ResizeObserver < "u" && (se = new ResizeObserver(Se), ce.value && se.observe(ce.value), me.value && se.observe(me.value)), Se();
676
796
  }
677
- function Bt() {
678
- J == null || J.disconnect(), cancelAnimationFrame(Ge), I(), clearTimeout(me), B.close(), N.close();
797
+ function cl() {
798
+ se == null || se.disconnect(), cancelAnimationFrame(At), te(), clearTimeout(Ge), W.close(), O.close();
679
799
  }
680
- ee(k, (e) => {
681
- e && (I(), B.close(), N.close());
682
- }), ee(
800
+ G(h, (e) => {
801
+ e && (te(), W.close(), O.close());
802
+ }), G(
683
803
  () => r.columnWidths,
684
804
  () => {
685
- C && I(), re();
805
+ T && te(), Se();
686
806
  },
687
807
  { deep: !0 }
688
- ), ee(
689
- () => m.value.leaves.map((e) => e.key).join("\0"),
808
+ ), G(
809
+ () => p.value.leaves.map((e) => e.key).join("\0"),
690
810
  () => {
691
- b.value && !m.value.leaves.some((e) => {
692
- var l;
693
- return e.key === ((l = b.value) == null ? void 0 : l.key);
694
- }) && B.close(), _.value && !m.value.leaves.some((e) => {
695
- var l;
696
- return e.key === ((l = _.value) == null ? void 0 : l.column.key);
697
- }) && N.close(), C && !m.value.leaves.some((e) => e.key === (C == null ? void 0 : C.column.key)) && I();
811
+ Q.value && !p.value.leaves.some((e) => {
812
+ var t;
813
+ return e.key === ((t = Q.value) == null ? void 0 : t.column.key);
814
+ }) && O.close(), T && !p.value.leaves.some((e) => e.key === (T == null ? void 0 : T.column.key)) && te();
698
815
  }
699
- ), ee(
816
+ ), G(
700
817
  () => r.columns,
701
818
  () => {
702
- I(), B.close(), N.close();
819
+ te(), O.close();
703
820
  },
704
821
  { deep: !0 }
705
- ), vl(() => {
706
- At(), Re();
707
- }), ml(At), hl(re), pl(Bt), kl(Bt), ee(
708
- [G, we, We, be],
822
+ ), G(_, () => {
823
+ Q.value && O.close();
824
+ }), G([() => r.showOverflowTooltip, () => r.showSorterTooltip], () => O.close(), { deep: !0 }), ea(() => {
825
+ Ot(), Xe();
826
+ }), ta(Ot), G(me, () => {
827
+ i.live.value && Ot();
828
+ }, { flush: "post" }), la(Se), aa(cl), oa(cl), G(
829
+ [ee, ut, ct, dt],
709
830
  () => {
710
- r.scrollToFirstRowOnChange && K.value && (K.value.scrollTop = 0);
831
+ r.scrollToFirstRowOnChange && q.value && (q.value.scrollTop = 0);
711
832
  },
712
833
  { flush: "post" }
713
834
  );
714
- function Fe(e) {
715
- const l = K.value;
716
- !s.live.value || !l || (typeof l.scrollTo == "function" ? l.scrollTo(e) : (e.top !== void 0 && (l.scrollTop = e.top), e.left !== void 0 && (l.scrollLeft = e.left)));
835
+ function _e(e) {
836
+ const t = q.value;
837
+ !i.live.value || !t || (typeof t.scrollTo == "function" ? t.scrollTo(e) : (e.top !== void 0 && (t.scrollTop = e.top), e.left !== void 0 && (t.scrollLeft = e.left)));
717
838
  }
718
- async function rl(e, l = {}) {
719
- var h, v, ue;
720
- await pe();
721
- const t = s.find(e), n = K.value;
722
- if (!s.live.value || !n || !t || r.loading) return !1;
723
- const d = Y.value.findIndex((cl) => cl.token === t.token), a = Array.from(
724
- ((h = Q.value) == null ? void 0 : h.querySelectorAll("tbody tr[data-row-key]")) ?? []
839
+ async function Ql(e, t = {}) {
840
+ var C, a;
841
+ await Ke();
842
+ const n = i.find(e), u = q.value;
843
+ if (!i.live.value || !u || !n || r.loading) return !1;
844
+ const d = _.value.findIndex((z) => z.token === n.token), f = Array.from(
845
+ ((C = me.value) == null ? void 0 : C.querySelectorAll("tbody tr[data-row-key]")) ?? []
725
846
  )[d];
726
- if (d < 0 || !a) return !1;
727
- const f = n.getBoundingClientRect(), y = a.getBoundingClientRect(), w = yt.value ? ((ue = (v = Q.value) == null ? void 0 : v.querySelector("thead")) == null ? void 0 : ue.getBoundingClientRect().height) ?? 0 : 0, P = y.top - f.top - n.clientTop + n.scrollTop, z = Math.max(0, n.clientHeight - w);
728
- let R = P - w;
729
- if (l.block === "center") R -= (z - y.height) / 2;
730
- else if (l.block === "end") R -= z - y.height;
731
- else if (!l.block || l.block === "nearest") {
732
- if (y.top >= f.top + n.clientTop + w && y.bottom <= f.top + n.clientTop + n.clientHeight)
847
+ if (d < 0 || !f) return !1;
848
+ const F = u.getBoundingClientRect(), b = f.getBoundingClientRect(), o = Ut.value ? (((a = Le.value) == null ? void 0 : a.getBoundingClientRect().height) ?? 0) + Jt.value : 0, v = b.top - F.top - u.clientTop + u.scrollTop, $ = Math.max(0, u.clientHeight - o);
849
+ let M = v - o;
850
+ if (t.block === "center") M -= ($ - b.height) / 2;
851
+ else if (t.block === "end") M -= $ - b.height;
852
+ else if (!t.block || t.block === "nearest") {
853
+ if (b.top >= F.top + u.clientTop + o && b.bottom <= F.top + u.clientTop + u.clientHeight)
733
854
  return !0;
734
- y.top >= f.top + n.clientTop + w && (R -= z - y.height);
855
+ b.top >= F.top + u.clientTop + o && (M -= $ - b.height);
735
856
  }
736
- return Fe({ top: Math.max(0, R), behavior: l.behavior }), !0;
857
+ return _e({ top: Math.max(0, M), behavior: t.behavior }), !0;
737
858
  }
738
- const ul = F(() => m.value.leaves);
739
- return Ht({
740
- element: le,
741
- viewport: K,
742
- selectedKeys: fe,
743
- currentRow: s.currentRow,
744
- expandedKeys: Le,
745
- query: De,
746
- columns: ul,
747
- clearSelection: s.clearSelection,
748
- getSelectionRows: s.getSelectionRows,
749
- getHalfSelectionRows: s.getHalfSelectionRows,
750
- toggleRowSelection: s.toggleRowSelection,
751
- toggleAllSelection: s.toggleAllSelection,
752
- invertSelection: s.invertSelection,
753
- setCurrentRow: s.setCurrentRow,
754
- toggleRowExpansion: s.toggleRowExpansion,
755
- loadRow: s.loadRow,
756
- updateKeyChildren: s.updateKeyChildren,
757
- clearSort: () => s.setSort(null),
758
- setSort: s.setSort,
759
- clearFilter: s.clearFilter,
760
- setFilter: s.setFilter,
761
- showFilter: (e) => xe(e),
762
- hideFilter: () => xe(null, !0),
763
- setPage: s.requestPage,
764
- resizeColumn: et,
765
- resetColumnWidths: il,
766
- doLayout: ol,
767
- scrollTo: Fe,
859
+ const Yl = g(() => p.value.leaves);
860
+ return pl({
861
+ element: ce,
862
+ viewport: q,
863
+ selectedKeys: be,
864
+ currentRow: i.currentRow,
865
+ expandedKeys: st,
866
+ query: vt,
867
+ columns: Yl,
868
+ clearSelection: i.clearSelection,
869
+ getSelectionRows: i.getSelectionRows,
870
+ getHalfSelectionRows: i.getHalfSelectionRows,
871
+ toggleRowSelection: i.toggleRowSelection,
872
+ toggleAllSelection: i.toggleAllSelection,
873
+ invertSelection: i.invertSelection,
874
+ setCurrentRow: i.setCurrentRow,
875
+ toggleRowExpansion: i.toggleRowExpansion,
876
+ loadRow: i.loadRow,
877
+ updateKeyChildren: i.updateKeyChildren,
878
+ clearSort: () => i.setSort(null),
879
+ setSort: i.setSort,
880
+ clearFilter: i.clearFilter,
881
+ setFilter: i.setFilter,
882
+ showFilter: (e) => Je(e),
883
+ hideFilter: () => Je(null, !0),
884
+ setPage: i.requestPage,
885
+ resizeColumn: Bt,
886
+ resetColumnWidths: Jl,
887
+ doLayout: Il,
888
+ scrollTo: _e,
768
889
  setScrollTop: (e) => {
769
- Number.isFinite(e) && Fe({ top: Math.max(0, e) });
890
+ Number.isFinite(e) && _e({ top: Math.max(0, e) });
770
891
  },
771
892
  setScrollLeft: (e) => {
772
- Number.isFinite(e) && Fe({ left: Math.max(0, e) });
893
+ Number.isFinite(e) && _e({ left: Math.max(0, e) });
773
894
  },
774
- scrollToRow: rl
775
- }), (e, l) => (u(), c("div", W({
776
- ref_key: "element",
777
- ref: le
778
- }, o(Pe), {
779
- class: ["hys-ui-table", [
780
- "hys-ui-table-" + i.size,
781
- {
782
- "hys-ui-table-striped": i.striped,
783
- "hys-ui-table-bordered": i.bordered,
784
- "hys-ui-table-sticky": yt.value
785
- }
786
- ]],
787
- "aria-busy": i.loading || void 0
788
- }), [
789
- e.$slots.title ? (u(), c("div", Hl, [
790
- S(e.$slots, "title", {
791
- rows: o(s).filteredRows.value,
792
- query: o(De)
793
- }, void 0, !0)
794
- ])) : g("", !0),
795
- i.selectionActions || e.$slots.selection ? (u(), c("div", Ll, [
796
- S(e.$slots, "selection", {
797
- rows: o(s).getSelectionRows(),
798
- keys: o(fe),
799
- selectAll: () => o(s).toggleAllSelection(!0),
800
- invert: o(s).invertSelection,
801
- clear: o(s).clearSelection
802
- }, () => [
803
- T("span", Nl, O(p.value.selected.replace("{count}", String(o(fe).length))), 1),
804
- i.selectionType !== "radio" ? (u(), A(ce, {
805
- key: 0,
806
- size: "sm",
807
- variant: "secondary",
808
- disabled: o(k),
809
- onClick: l[0] || (l[0] = (t) => o(s).toggleAllSelection(!0))
810
- }, {
811
- default: te(() => [
812
- D(O(p.value.selectAll), 1)
813
- ]),
814
- _: 1
815
- }, 8, ["disabled"])) : g("", !0),
816
- i.selectionType !== "radio" ? (u(), A(ce, {
817
- key: 1,
818
- size: "sm",
819
- variant: "secondary",
820
- disabled: o(k),
821
- onClick: o(s).invertSelection
822
- }, {
823
- default: te(() => [
824
- D(O(p.value.invertSelection), 1)
825
- ]),
826
- _: 1
827
- }, 8, ["disabled", "onClick"])) : g("", !0),
828
- q(ce, {
829
- size: "sm",
830
- variant: "ghost",
831
- disabled: o(k) || !o(fe).length,
832
- onClick: o(s).clearSelection
833
- }, {
834
- default: te(() => [
835
- D(O(p.value.clearSelection), 1)
836
- ]),
837
- _: 1
838
- }, 8, ["disabled", "onClick"])
839
- ], !0)
840
- ])) : g("", !0),
841
- (u(!0), c(E, null, X(ct.value.filter(
842
- (t) => t.startsWith("top-")
843
- ), (t) => (u(), c("div", {
844
- key: t,
845
- class: "hys-ui-table-pagination",
846
- "data-position": t
847
- }, [
848
- q(Kt, W({ ref_for: !0 }, dt.value, {
849
- onChange: l[1] || (l[1] = (n) => o(s).requestPage(n)),
850
- onPageSizeChange: o(s).changeSize
851
- }), null, 16, ["onPageSizeChange"])
852
- ], 8, Wl))), 128)),
853
- T("div", {
854
- ref_key: "viewport",
855
- ref: K,
856
- class: "hys-ui-table-scroll",
857
- style: he({
858
- height: vt(i.height),
859
- maxHeight: vt(i.maxHeight),
860
- overflowY: i.scrollbarAlwaysOn ? "scroll" : void 0
861
- }),
862
- tabindex: i.scrollbarTabindex,
863
- "aria-label": i.caption || p.value.scrollLabel,
864
- onScroll: sl
865
- }, [
866
- T("table", {
867
- ref_key: "table",
868
- ref: Q,
869
- class: "hys-ui-data-table",
870
- style: he({
871
- minWidth: ft.value + "px",
872
- tableLayout: Ce.value || ae.value ? "fixed" : i.tableLayout,
873
- width: i.fit && !Ce.value && !ae.value && !Object.keys(i.columnWidths ?? {}).length ? "100%" : ft.value + "px"
874
- })
875
- }, [
876
- i.caption ? (u(), c("caption", ql, O(i.caption), 1)) : g("", !0),
877
- T("colgroup", null, [
878
- (u(!0), c(E, null, X(m.value.leaves, (t) => (u(), c("col", {
879
- key: t.key,
880
- style: he({ width: It(t) })
881
- }, null, 4))), 128))
882
- ]),
883
- i.showHeader ? (u(), c("thead", Vl, [
884
- (u(!0), c(E, null, X(m.value.headers, (t, n) => {
885
- var d;
886
- return u(), c("tr", W(
887
- {
888
- key: n,
889
- class: typeof i.headerRowClassName == "function" ? i.headerRowClassName(
890
- t.map((a) => a.column),
891
- n
892
- ) : i.headerRowClassName,
893
- style: typeof i.headerRowStyle == "function" ? i.headerRowStyle(
894
- t.map((a) => a.column),
895
- n
896
- ) : i.headerRowStyle
897
- },
898
- { ref_for: !0 },
899
- ie(
900
- (d = i.customHeaderRow) == null ? void 0 : d.call(
901
- i,
902
- t.map((a) => a.column),
903
- n
904
- )
905
- )
906
- ), [
907
- (u(!0), c(E, null, X(t, (a) => {
908
- var f, y, w, P, z, R, h;
909
- return u(), c("th", W({
910
- key: a.key
911
- }, { ref_for: !0 }, qt(a), {
912
- "data-column-key": a.column.key,
913
- "data-leaf": a.column.children ? void 0 : "",
914
- colspan: a.colspan,
915
- rowspan: a.rowspan,
916
- scope: a.column.children ? "colgroup" : "col",
917
- class: [
918
- a.column.headerClassName,
919
- typeof i.headerCellClassName == "function" ? i.headerCellClassName(
920
- a.column,
921
- m.value.leaves.indexOf(a.leaves[0])
922
- ) : i.headerCellClassName
923
- ],
924
- style: Jt(a),
925
- "aria-sort": a.column.sortable ? ((f = o(G).find((v) => v.key === a.column.key)) == null ? void 0 : f.direction) === "asc" ? "ascending" : ((y = o(G).find((v) => v.key === a.column.key)) == null ? void 0 : y.direction) === "desc" ? "descending" : "none" : void 0,
926
- onClick: (v) => x("headerClick", a.column, v),
927
- onContextmenu: (v) => x("headerContextmenu", a.column, v)
928
- }), [
929
- a.column.type === "selection" ? S(e.$slots, "selection-header", {
930
- column: a.column,
931
- checked: o(st),
932
- indeterminate: o(Ne),
933
- disabled: o(k) || !o(s).graph.value.all.some(o(s).eligible),
934
- toggle: o(s).toggleAllSelection
935
- }, () => [
936
- a.column.type === "selection" && i.selectionType !== "radio" && !i.hideSelectAll ? (u(), A(Et, {
937
- key: 0,
938
- "model-value": o(st),
939
- indeterminate: o(Ne),
940
- disabled: o(k) || !o(s).graph.value.all.some(o(s).eligible),
941
- "aria-label": p.value.selectAll,
942
- onClick: l[2] || (l[2] = V(() => {
943
- }, ["stop"])),
944
- "onUpdate:modelValue": l[3] || (l[3] = (v) => o(s).toggleAllSelection(
945
- o(Ne) && !i.selectOnIndeterminate ? !1 : v === !0
946
- ))
947
- }, {
948
- default: te(() => {
949
- var v;
950
- return [
951
- (v = i.selectionColumn) != null && v.label ? (u(), c(E, { key: 0 }, [
952
- D(O(i.selectionColumn.label), 1)
953
- ], 64)) : g("", !0)
954
- ];
955
- }),
956
- _: 1
957
- }, 8, ["model-value", "indeterminate", "disabled", "aria-label"])) : a.column.type === "selection" ? (u(), c("span", Il, "选择")) : g("", !0)
958
- ], !0, 0) : (u(), c("div", Ul, [
959
- T("div", Jl, [
960
- a.column.sortable ? (u(), c("button", {
961
- key: 0,
962
- type: "button",
963
- class: "hys-ui-table-sort",
964
- disabled: o(k),
965
- onClick: (v) => o(s).toggleSort(a.column)
966
- }, [
967
- S(e.$slots, "header-" + a.column.key, {
968
- column: a.column,
969
- sorts: o(G)
970
- }, () => [
971
- S(e.$slots, "header-cell", {
972
- column: a.column,
973
- sorts: o(G)
974
- }, () => [
975
- D(O(a.column.label), 1)
976
- ], !0)
977
- ], !0)
978
- ], 8, Xl)) : (u(), c("span", Ql, [
979
- S(e.$slots, "header-" + a.column.key, {
980
- column: a.column,
981
- sorts: o(G)
982
- }, () => [
983
- S(e.$slots, "header-cell", {
984
- column: a.column,
985
- sorts: o(G)
986
- }, () => [
987
- D(O(a.column.label), 1)
988
- ], !0)
989
- ], !0)
990
- ])),
991
- a.column.sortable ? (u(), c("span", Yl, [
992
- (u(), c(E, null, X(["asc", "desc"], (v) => T("button", {
993
- key: v,
994
- type: "button",
995
- disabled: o(k),
996
- "aria-label": ye(
997
- v === "asc" ? p.value.sortAsc : p.value.sortDesc,
998
- a.column.label
999
- ),
1000
- "aria-pressed": o(G).some(
1001
- (ue) => ue.key === a.column.key && ue.direction === v
1002
- ),
1003
- onClick: (ue) => o(s).toggleSort(a.column, v)
1004
- }, [
1005
- (u(), A(Me(v === "asc" ? o(xl) : o(at)), {
1006
- size: 12,
1007
- "aria-hidden": "true"
1008
- }))
1009
- ], 8, Gl)), 64))
1010
- ])) : g("", !0)
1011
- ]),
1012
- a.column.filterable || a.column.filters ? (u(), c("button", {
1013
- key: 0,
1014
- type: "button",
1015
- class: Ae(["hys-ui-table-filter", {
1016
- "hys-ui-table-filter-active": !!((w = o(we)[a.column.key]) != null && w.length)
1017
- }]),
1018
- disabled: o(k),
1019
- "aria-label": p.value.filter + a.column.label,
1020
- "aria-expanded": o(j) && ((P = b.value) == null ? void 0 : P.key) === a.column.key,
1021
- "aria-controls": o(de) + "-filter",
1022
- onClick: V((v) => el(a.column, v), ["stop"])
1023
- }, [
1024
- S(e.$slots, "filter-icon", {
1025
- column: a.column,
1026
- filtered: !!((z = o(we)[a.column.key]) != null && z.length),
1027
- open: o(j) && ((R = b.value) == null ? void 0 : R.key) === a.column.key
1028
- }, () => [
1029
- q(o(Rl), {
1030
- size: 14,
1031
- "aria-hidden": "true"
1032
- })
1033
- ], !0)
1034
- ], 10, Zl)) : g("", !0),
1035
- !a.column.children && (a.column.resizable ?? i.resizable) && (i.allowDragLastColumn || a.column.key !== ((h = m.value.leaves.at(-1)) == null ? void 0 : h.key)) && (!a.column.type || a.column.type === "default") ? (u(), c("span", {
1036
- key: 1,
1037
- class: "hys-ui-table-resize",
1038
- role: "separator",
1039
- "aria-orientation": "vertical",
1040
- "aria-label": ye(p.value.resizeColumn, a.column.label),
1041
- tabindex: "0",
1042
- "aria-valuenow": Math.round(
1043
- L.value[a.column.key] ?? U(a.column)
1044
- ),
1045
- "aria-valuemin": a.column.minWidth ?? 60,
1046
- "aria-valuemax": a.column.maxWidth ?? 2e3,
1047
- onPointerdown: V((v) => nl(a.column, v), ["prevent", "stop"]),
1048
- onKeydown: [
1049
- lt(V((v) => et(
1050
- a.column.key,
1051
- (L.value[a.column.key] ?? U(a.column)) - 10
1052
- ), ["prevent"]), ["left"]),
1053
- lt(V((v) => et(
1054
- a.column.key,
1055
- (L.value[a.column.key] ?? U(a.column)) + 10
1056
- ), ["prevent"]), ["right"])
1057
- ]
1058
- }, null, 40, _l)) : g("", !0)
1059
- ]))
1060
- ], 16, jl);
1061
- }), 128))
1062
- ], 16);
1063
- }), 128))
1064
- ])) : g("", !0),
1065
- T("tbody", null, [
1066
- i.loading ? (u(), c("tr", ea, [
1067
- T("td", {
1068
- colspan: Math.max(1, m.value.leaves.length)
1069
- }, [
1070
- T("div", la, [
1071
- S(e.$slots, "loading", {}, () => [
1072
- q(o(ot), {
1073
- class: "hys-ui-table-spinner",
1074
- size: 18
1075
- }),
1076
- D(O(p.value.loadingText), 1)
1077
- ], !0)
1078
- ])
1079
- ], 8, ta)
1080
- ])) : (u(), c(E, { key: 1 }, [
1081
- (u(!0), c(E, null, X(o(Y), (t, n) => {
1082
- var d;
1083
- return u(), c(E, {
1084
- key: t.token
1085
- }, [
1086
- T("tr", W({ ref_for: !0 }, ie((d = i.customRow) == null ? void 0 : d.call(i, t.row, n)), {
1087
- "data-row-key": String(t.key),
1088
- "aria-selected": i.highlightCurrentRow ? o(ut) === t.key : void 0,
1089
- class: [
1090
- typeof i.rowClassName == "function" ? i.rowClassName(t.row, n) : i.rowClassName,
1091
- {
1092
- "hys-ui-table-row-current": i.highlightCurrentRow && o(ut) === t.key,
1093
- "hys-ui-table-row-selected": o(He).has(t.token)
1094
- }
1095
- ],
1096
- style: typeof i.rowStyle == "function" ? i.rowStyle(t.row, n) : i.rowStyle,
1097
- onClick: (a) => Gt(t, n, a),
1098
- onDblclick: (a) => !o(k) && x("rowDblclick", t.row, n, a),
1099
- onContextmenu: (a) => x("rowContextmenu", t.row, n, a)
1100
- }), [
1101
- (u(!0), c(E, null, X(m.value.leaves, (a, f) => (u(), c(E, {
1102
- key: a.key
1103
- }, [
1104
- Se(n, f).rowspan && Se(n, f).colspan ? (u(), A(Me(a.rowScope ? "th" : "td"), W(
1105
- {
1106
- key: 0,
1107
- ref_for: !0
1108
- },
1109
- Vt(
1110
- H(t.row, a, n, f)
1111
- ),
1112
- {
1113
- scope: a.rowScope,
1114
- "data-column-key": a.key,
1115
- rowspan: Se(n, f).rowspan,
1116
- colspan: Se(n, f).colspan,
1117
- style: Xt(H(t.row, a, n, f)),
1118
- class: Qt(H(t.row, a, n, f)),
1119
- onClick: (y) => !o(k) && x(
1120
- "cellClick",
1121
- H(t.row, a, n, f),
1122
- y
1123
- ),
1124
- onDblclick: (y) => !o(k) && x(
1125
- "cellDblclick",
1126
- H(t.row, a, n, f),
1127
- y
1128
- ),
1129
- onContextmenu: (y) => x(
1130
- "cellContextmenu",
1131
- H(t.row, a, n, f),
1132
- y
1133
- ),
1134
- onMouseenter: (y) => x(
1135
- "cellMouseEnter",
1136
- H(t.row, a, n, f),
1137
- y
1138
- ),
1139
- onMouseleave: (y) => x(
1140
- "cellMouseLeave",
1141
- H(t.row, a, n, f),
1142
- y
1143
- )
1144
- }
1145
- ), {
1146
- default: te(() => {
1147
- var y;
1148
- return [
1149
- a.type === "selection" ? S(e.$slots, "selection-cell", {
1150
- row: t.row,
1151
- index: n,
1152
- column: a,
1153
- checked: o(He).has(t.token),
1154
- indeterminate: o(it).has(t.token),
1155
- disabled: o(k) || !o(s).eligible(t),
1156
- toggle: (w) => o(s).toggleRowSelection(t.key, w)
1157
- }, () => {
1158
- var w, P, z, R;
1159
- return [
1160
- i.selectionType === "radio" ? (u(), A(zl, {
1161
- key: 0,
1162
- name: o(de) + "-selection",
1163
- "model-value": o(fe)[0] ?? null,
1164
- value: t.key,
1165
- disabled: o(k) || !o(s).eligible(t),
1166
- "aria-label": ((w = i.getSelectionProps) == null ? void 0 : w.call(i, t.row, t.index).label) ?? ye(p.value.selectRow, n + 1),
1167
- title: (P = i.getSelectionProps) == null ? void 0 : P.call(i, t.row, t.index).title,
1168
- onClick: l[4] || (l[4] = V(() => {
1169
- }, ["stop"])),
1170
- "onUpdate:modelValue": (h) => o(s).toggleRowSelection(t.key, !0)
1171
- }, null, 8, ["name", "model-value", "value", "disabled", "aria-label", "title", "onUpdate:modelValue"])) : (u(), A(Et, {
1172
- key: 1,
1173
- "model-value": o(He).has(t.token),
1174
- indeterminate: o(it).has(t.token),
1175
- disabled: o(k) || !o(s).eligible(t),
1176
- "aria-label": ((z = i.getSelectionProps) == null ? void 0 : z.call(i, t.row, t.index).label) ?? ye(p.value.selectRow, n + 1),
1177
- title: (R = i.getSelectionProps) == null ? void 0 : R.call(i, t.row, t.index).title,
1178
- onClick: l[5] || (l[5] = V((h) => wl(ve) ? ve.value = h.shiftKey : ve = h.shiftKey, ["stop"])),
1179
- "onUpdate:modelValue": (h) => jt(t, h === !0)
1180
- }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "title", "onUpdate:modelValue"]))
1181
- ];
1182
- }, !0, 0) : a.type === "index" ? (u(), A(ke, {
1183
- key: 1,
1184
- value: typeof a.index == "function" ? a.index(n, t.row) : i.indexMethod ? i.indexMethod(n, t.row) : (typeof a.index == "number" ? a.index : 1) + n + (i.pagination && !i.serverMode ? (o(We) - 1) * o(be) : 0)
1185
- }, null, 8, ["value"])) : a.type === "expand" && o(s).canExpand(t) ? (u(), c("button", {
1186
- key: 2,
1187
- type: "button",
1188
- class: "hys-ui-table-expand",
1189
- disabled: o(k),
1190
- "aria-expanded": o($).has(t.token),
1191
- "aria-label": ye(
1192
- o($).has(t.token) ? p.value.collapseRow : p.value.expandRow,
1193
- n + 1
1194
- ),
1195
- onClick: V((w) => o(s).toggleRowExpansion(t.key), ["stop"])
1196
- }, [
1197
- S(e.$slots, "expand-icon", {
1198
- row: t.row,
1199
- index: n,
1200
- expanded: o($).has(t.token),
1201
- loading: o(ne).has(t.token),
1202
- depth: t.depth
1203
- }, () => [
1204
- (u(), A(Me(
1205
- o(ne).has(t.token) ? o(ot) : o($).has(t.token) ? o(at) : o(Ot)
1206
- ), {
1207
- class: Ae({
1208
- "hys-ui-table-spinner": o(ne).has(t.token)
1209
- }),
1210
- size: 16,
1211
- "aria-hidden": "true"
1212
- }, null, 8, ["class"]))
1213
- ], !0)
1214
- ], 8, oa)) : a.type !== "expand" ? (u(), c("div", na, [
1215
- i.treeMode && a.key === ge.value ? (u(), c("span", {
1216
- key: 0,
1217
- class: "hys-ui-table-tree-indent",
1218
- style: he({
1219
- width: Math.min(t.depth, 100) * Math.max(0, i.indent) + "px"
1220
- })
1221
- }, null, 4)) : g("", !0),
1222
- i.treeMode && a.key === ge.value && !Dt.value && i.showExpandColumn ? (u(), c(E, { key: 1 }, [
1223
- o(s).canExpand(t) ? (u(), c("button", {
1224
- key: 0,
1225
- type: "button",
1226
- class: "hys-ui-table-expand",
1227
- disabled: o(k),
1228
- "aria-expanded": o($).has(t.token),
1229
- "aria-label": (o($).has(t.token) ? p.value.collapse : p.value.expand) + Ue(
1230
- o(Be)(
1231
- t.row,
1232
- a.dataIndex ?? a.key
1233
- )
1234
- ),
1235
- onClick: V((w) => o(s).toggleRowExpansion(t.key), ["stop"])
1236
- }, [
1237
- S(e.$slots, "expand-icon", {
1238
- row: t.row,
1239
- index: n,
1240
- expanded: o($).has(t.token),
1241
- loading: o(ne).has(t.token),
1242
- depth: t.depth
1243
- }, () => [
1244
- (u(), A(Me(
1245
- o(ne).has(t.token) ? o(ot) : o($).has(t.token) ? o(at) : o(Ot)
1246
- ), {
1247
- class: Ae({
1248
- "hys-ui-table-spinner": o(ne).has(
1249
- t.token
1250
- )
1251
- }),
1252
- size: 16,
1253
- "aria-hidden": "true"
1254
- }, null, 8, ["class"]))
1255
- ], !0)
1256
- ], 8, ia)) : (u(), c("span", sa))
1257
- ], 64)) : g("", !0),
1258
- T("span", {
1259
- class: Ae(["hys-ui-table-cell-text", {
1260
- "hys-ui-table-ellipsis": a.ellipsis || a.showOverflowTooltip || i.showOverflowTooltip
1261
- }]),
1262
- tabindex: a.showOverflowTooltip ?? i.showOverflowTooltip ? 0 : void 0,
1263
- "aria-describedby": o(Ct) && ((y = _.value) == null ? void 0 : y.row) === t.row && _.value.column.key === a.key ? o(de) + "-tooltip" : void 0,
1264
- onPointerenter: (w) => St(
1265
- H(t.row, a, n, f),
1266
- w
1267
- ),
1268
- onPointerleave: Ye,
1269
- onFocus: (w) => St(
1270
- H(t.row, a, n, f),
1271
- w
1272
- ),
1273
- onBlur: Ye
1274
- }, [
1275
- S(e.$slots, a.key, {
1276
- row: t.row,
1277
- value: o(Be)(
1278
- t.row,
1279
- a.dataIndex ?? a.key
1280
- ),
1281
- index: n,
1282
- column: a
1283
- }, () => [
1284
- S(e.$slots, "body-cell", {
1285
- row: t.row,
1286
- column: a,
1287
- value: o(Be)(
1288
- t.row,
1289
- a.dataIndex ?? a.key
1290
- ),
1291
- index: n
1292
- }, () => [
1293
- q(ke, {
1294
- value: Yt(
1295
- H(
1296
- t.row,
1297
- a,
1298
- n,
1299
- f
1300
- )
1301
- )
1302
- }, null, 8, ["value"])
1303
- ], !0)
1304
- ], !0)
1305
- ], 42, ra),
1306
- a.key === ge.value && o(Wt).has(t.token) ? (u(), A(ce, {
1307
- key: 2,
1308
- size: "sm",
1309
- variant: "ghost",
1310
- "aria-label": p.value.retryLabel,
1311
- onClick: V((w) => o(s).loadRow(t.key, !0), ["stop"])
1312
- }, {
1313
- default: te(() => [
1314
- q(o(Tl), { size: 13 }),
1315
- D(O(p.value.retry), 1)
1316
- ]),
1317
- _: 1
1318
- }, 8, ["aria-label", "onClick"])) : g("", !0)
1319
- ])) : g("", !0)
1320
- ];
1321
- }),
1322
- _: 2
1323
- }, 1040, ["scope", "data-column-key", "rowspan", "colspan", "style", "class", "onClick", "onDblclick", "onContextmenu", "onMouseenter", "onMouseleave"])) : g("", !0)
1324
- ], 64))), 128))
1325
- ], 16, aa),
1326
- mt(t) ? bl((u(), c("tr", ua, [
1327
- T("td", {
1328
- colspan: Math.max(1, m.value.leaves.length)
1329
- }, [
1330
- S(e.$slots, "expand", {
1331
- row: t.row,
1332
- index: n,
1333
- expanded: o($).has(t.token)
1334
- }, void 0, !0)
1335
- ], 8, ca)
1336
- ], 512)), [
1337
- [gl, o($).has(t.token)]
1338
- ]) : g("", !0)
1339
- ], 64);
1340
- }), 128)),
1341
- o(Y).length ? g("", !0) : (u(), c("tr", da, [
1342
- T("td", {
1343
- colspan: Math.max(1, m.value.leaves.length)
1344
- }, [
1345
- S(e.$slots, "empty", {}, () => [
1346
- D(O(i.emptyText ?? p.value.emptyText), 1)
1347
- ], !0)
1348
- ], 8, ya)
1349
- ]))
1350
- ], 64)),
1351
- e.$slots.append ? (u(), c("tr", fa, [
1352
- T("td", {
1353
- colspan: Math.max(1, m.value.leaves.length)
1354
- }, [
1355
- S(e.$slots, "append", {
1356
- rows: o(s).filteredRows.value
1357
- }, void 0, !0)
1358
- ], 8, va)
1359
- ])) : g("", !0)
1360
- ]),
1361
- i.showSummary && !i.loading ? (u(), c("tfoot", ma, [
1362
- T("tr", null, [
1363
- (u(!0), c(E, null, X(m.value.leaves, (t, n) => (u(), c("td", {
1364
- key: t.key,
1365
- "data-column-key": t.key,
1366
- style: he({ ...je(t), textAlign: t.align })
1367
- }, [
1368
- S(e.$slots, "summary-cell", {
1369
- column: t,
1370
- index: n,
1371
- value: ht.value[n],
1372
- rows: o(s).filteredRows.value
1373
- }, () => [
1374
- q(ke, {
1375
- value: ht.value[n]
1376
- }, null, 8, ["value"])
1377
- ], !0)
1378
- ], 12, ha))), 128))
1379
- ])
1380
- ])) : g("", !0)
1381
- ], 4)
1382
- ], 44, Dl),
1383
- e.$slots.footer ? (u(), c("div", pa, [
1384
- S(e.$slots, "footer", {
1385
- rows: o(s).filteredRows.value,
1386
- query: o(De)
1387
- }, void 0, !0)
1388
- ])) : g("", !0),
1389
- (u(!0), c(E, null, X(ct.value.filter(
1390
- (t) => t.startsWith("bottom-")
1391
- ), (t) => (u(), c("div", {
1392
- key: t,
1393
- class: "hys-ui-table-pagination",
1394
- "data-position": t
1395
- }, [
1396
- q(Kt, W({ ref_for: !0 }, dt.value, {
1397
- onChange: l[6] || (l[6] = (n) => o(s).requestPage(n)),
1398
- onPageSizeChange: o(s).changeSize
1399
- }), null, 16, ["onPageSizeChange"])
1400
- ], 8, ka))), 128)),
1401
- (u(), A(Pt, {
1402
- to: i.appendFilterTo || "body",
1403
- disabled: i.appendFilterTo === !1
1404
- }, [
1405
- o(j) && b.value ? (u(), c("div", W({
1406
- key: 0,
1407
- id: o(de) + "-filter",
1408
- ref_key: "filterPanel",
1409
- ref: Xe
1410
- }, o(Pe), {
1411
- class: "hys-ui-table-filter-panel hys-ui-floating-surface",
1412
- style: o(_t),
1413
- role: "dialog",
1414
- "aria-label": p.value.filter + b.value.label
1415
- }), [
1416
- S(e.$slots, "filter-dropdown", {
1417
- column: b.value,
1418
- open: o(j),
1419
- values: Z.value,
1420
- setValues: kt,
1421
- confirm: Te,
1422
- clear: wt,
1423
- close: () => o(B).close(!0)
895
+ scrollToRow: Ql
896
+ }), (e, t) => {
897
+ var n, u;
898
+ return c(), y("div", V({
899
+ ref_key: "element",
900
+ ref: ce
901
+ }, l(We), {
902
+ class: ["hys-ui-table", [
903
+ "hys-ui-table-" + s.size,
904
+ {
905
+ "hys-ui-table-striped": s.striped,
906
+ "hys-ui-table-bordered": s.bordered,
907
+ "hys-ui-table-sticky": Ut.value
908
+ }
909
+ ]],
910
+ "aria-busy": s.loading || void 0
911
+ }), [
912
+ e.$slots.title ? (c(), y("div", xa, [
913
+ S(e.$slots, "title", {
914
+ rows: l(i).filteredRows.value,
915
+ pageRows: bt.value,
916
+ query: l(vt)
917
+ }, void 0, !0)
918
+ ])) : x("", !0),
919
+ s.selectionActions === !0 || (n = zt.value) != null && n.length || e.$slots.selection ? (c(), y("div", Ra, [
920
+ S(e.$slots, "selection", {
921
+ rows: l(i).getSelectionRows(),
922
+ keys: l(be),
923
+ selectAll: () => l(i).toggleAllSelection(!0),
924
+ invert: l(i).invertSelection,
925
+ clear: l(i).clearSelection,
926
+ pageRows: ql.value,
927
+ pageKeys: jl.value,
928
+ setSelected: (d) => l(i).selectPage(d)
1424
929
  }, () => [
1425
- T("strong", null, O(b.value.label), 1),
1426
- b.value.filters ? (u(), A(Ml, {
1427
- key: b.value.key,
1428
- values: Z.value,
1429
- "onUpdate:values": l[7] || (l[7] = (t) => Z.value = t),
1430
- options: b.value.filters,
1431
- mode: b.value.filterMode,
1432
- search: b.value.filterSearch,
1433
- multiple: b.value.filterMultiple !== !1,
1434
- disabled: o(k),
1435
- "search-label": p.value.filterSearch,
1436
- "empty-text": p.value.noFilterMatch
1437
- }, null, 8, ["values", "options", "mode", "search", "multiple", "disabled", "search-label", "empty-text"])) : (u(), A(Fl, {
1438
- key: 1,
1439
- "model-value": String(Z.value[0] ?? ""),
1440
- "aria-label": p.value.filter + b.value.label,
1441
- placeholder: p.value.filterPlaceholder,
1442
- clearable: "",
930
+ H("span", Ta, K(m.value.selected.replace("{count}", String(l(be).length))), 1),
931
+ zt.value ? (c(!0), y(A, { key: 0 }, le(zt.value, (d) => (c(), w(ye, {
932
+ key: d.key,
1443
933
  size: "sm",
1444
- "onUpdate:modelValue": l[8] || (l[8] = (t) => kt(t ? [t] : [])),
1445
- onKeydown: lt(V(Te, ["prevent"]), ["enter"])
1446
- }, null, 8, ["model-value", "aria-label", "placeholder", "onKeydown"])),
1447
- T("div", ba, [
1448
- q(ce, {
934
+ variant: "secondary",
935
+ disabled: l(h) || d.disabled || s.selectionType === "radio",
936
+ onClick: (f) => Vl(d)
937
+ }, {
938
+ default: B(() => [
939
+ I(K(d.label), 1)
940
+ ]),
941
+ _: 2
942
+ }, 1032, ["disabled", "onClick"]))), 128)) : (c(), y(A, { key: 1 }, [
943
+ s.selectionType !== "radio" ? (c(), w(ye, {
944
+ key: 0,
1449
945
  size: "sm",
1450
946
  variant: "secondary",
1451
- onClick: l[9] || (l[9] = (t) => wt())
947
+ disabled: l(h) || !l(i).selectionPage.value.length,
948
+ onClick: t[0] || (t[0] = (d) => l(i).toggleAllSelection(!0))
1452
949
  }, {
1453
- default: te(() => [
1454
- D(O(p.value.reset), 1)
950
+ default: B(() => [
951
+ I(K(m.value.selectAll), 1)
1455
952
  ]),
1456
953
  _: 1
1457
- }),
1458
- q(ce, {
954
+ }, 8, ["disabled"])) : x("", !0),
955
+ s.selectionType !== "radio" ? (c(), w(ye, {
956
+ key: 1,
1459
957
  size: "sm",
1460
- onClick: l[10] || (l[10] = (t) => Te())
958
+ variant: "secondary",
959
+ disabled: l(h) || !l(i).selectionPage.value.length,
960
+ onClick: l(i).invertSelection
1461
961
  }, {
1462
- default: te(() => [
1463
- D(O(p.value.apply), 1)
962
+ default: B(() => [
963
+ I(K(m.value.invertSelection), 1)
1464
964
  ]),
1465
965
  _: 1
1466
- })
1467
- ])
966
+ }, 8, ["disabled", "onClick"])) : x("", !0),
967
+ N(ye, {
968
+ size: "sm",
969
+ variant: "ghost",
970
+ disabled: l(h) || !l(be).length,
971
+ onClick: l(i).clearSelection
972
+ }, {
973
+ default: B(() => [
974
+ I(K(m.value.clearSelection), 1)
975
+ ]),
976
+ _: 1
977
+ }, 8, ["disabled", "onClick"])
978
+ ], 64))
1468
979
  ], !0)
1469
- ], 16, wa)) : g("", !0)
1470
- ], 8, ["to", "disabled"])),
1471
- (u(), A(Pt, { to: "body" }, [
1472
- o(Ct) && _.value ? (u(), c("div", W({
1473
- key: 0,
1474
- id: o(de) + "-tooltip",
1475
- ref_key: "tipPanel",
1476
- ref: gt
1477
- }, o(Pe), {
1478
- class: "hys-ui-table-tooltip hys-ui-floating-tooltip",
1479
- role: "tooltip",
1480
- style: o(tl),
1481
- onPointerenter: ll,
1482
- onPointerleave: Ye
1483
- }), [
1484
- S(e.$slots, "tooltip", Cl(Sl(_.value)), () => [
1485
- q(ke, { value: al.value }, null, 8, ["value"])
980
+ ])) : x("", !0),
981
+ (c(!0), y(A, null, le(It.value.filter(
982
+ (d) => d.startsWith("top-")
983
+ ), (d) => (c(), y("div", {
984
+ key: d,
985
+ class: "hys-ui-table-pagination",
986
+ "data-position": d
987
+ }, [
988
+ S(e.$slots, "pagination", {
989
+ position: d,
990
+ props: qe.value,
991
+ setPage: l(i).requestPage,
992
+ setPageSize: l(i).changeSize
993
+ }, () => [
994
+ N(yl, V({ ref_for: !0 }, qe.value, {
995
+ onChange: t[1] || (t[1] = (f) => l(i).requestPage(f)),
996
+ onPageSizeChange: l(i).changeSize
997
+ }), null, 16, ["onPageSizeChange"])
1486
998
  ], !0)
1487
- ], 16, ga)) : g("", !0)
1488
- ]))
1489
- ], 16, $l));
999
+ ], 8, Fa))), 128)),
1000
+ H("div", za, [
1001
+ H("div", {
1002
+ ref_key: "viewport",
1003
+ ref: q,
1004
+ class: Te(["hys-ui-table-scroll", { "hys-ui-table-themed-scrollbar": s.nativeScrollbar === !1 }]),
1005
+ style: Re({
1006
+ height: ze(s.height),
1007
+ maxHeight: ze(s.maxHeight),
1008
+ overflowY: s.scrollbarAlwaysOn ? "scroll" : void 0
1009
+ }),
1010
+ tabindex: s.scrollbarTabindex,
1011
+ "aria-label": s.caption || m.value.scrollLabel,
1012
+ onScroll: Xl
1013
+ }, [
1014
+ (c(), w(ae(((u = s.components) == null ? void 0 : u.table) ?? "table"), {
1015
+ ref_key: "tableRoot",
1016
+ ref: Kt,
1017
+ class: "hys-ui-data-table",
1018
+ style: Re({
1019
+ minWidth: Ml.value,
1020
+ tableLayout: je.value || de.value ? "fixed" : s.tableLayout,
1021
+ width: Bl.value
1022
+ })
1023
+ }, {
1024
+ default: B(() => {
1025
+ var d, f, F, b;
1026
+ return [
1027
+ s.caption ? (c(), y("caption", Pa, K(s.caption), 1)) : x("", !0),
1028
+ H("colgroup", null, [
1029
+ (c(!0), y(A, null, le(p.value.leaves, (o) => (c(), y("col", {
1030
+ key: o.key,
1031
+ style: Re({ width: zl(o) })
1032
+ }, null, 4))), 128))
1033
+ ]),
1034
+ s.showHeader ? (c(), w(ae(((f = (d = s.components) == null ? void 0 : d.header) == null ? void 0 : f.wrapper) ?? "thead"), {
1035
+ key: 1,
1036
+ ref_key: "tableHeadRoot",
1037
+ ref: Dt,
1038
+ style: Re({ top: l(Jt) + "px" })
1039
+ }, {
1040
+ default: B(() => [
1041
+ (c(!0), y(A, null, le(p.value.headers, (o, v) => {
1042
+ var $, M, C;
1043
+ return c(), w(ae(((M = ($ = s.components) == null ? void 0 : $.header) == null ? void 0 : M.row) ?? "tr"), V(
1044
+ {
1045
+ key: v,
1046
+ class: typeof s.headerRowClassName == "function" ? s.headerRowClassName(
1047
+ o.map((a) => a.column),
1048
+ v
1049
+ ) : s.headerRowClassName,
1050
+ style: typeof s.headerRowStyle == "function" ? s.headerRowStyle(
1051
+ o.map((a) => a.column),
1052
+ v
1053
+ ) : s.headerRowStyle
1054
+ },
1055
+ { ref_for: !0 },
1056
+ ke(
1057
+ (C = s.customHeaderRow) == null ? void 0 : C.call(
1058
+ s,
1059
+ o.map((a) => a.column),
1060
+ v
1061
+ )
1062
+ )
1063
+ ), {
1064
+ default: B(() => [
1065
+ (c(!0), y(A, null, le(o, (a) => {
1066
+ var z, Be, Oe, $e;
1067
+ return c(), w(ae(((Be = (z = s.components) == null ? void 0 : z.header) == null ? void 0 : Be.cell) ?? "th"), V({
1068
+ key: a.key
1069
+ }, { ref_for: !0 }, Cl(a), {
1070
+ "data-column-key": a.column.key,
1071
+ "data-leaf": !a.column.children && a.colspan === 1 ? "" : void 0,
1072
+ colspan: a.colspan,
1073
+ rowspan: a.rowspan,
1074
+ scope: a.column.children || a.colspan > 1 ? "colgroup" : "col",
1075
+ "aria-hidden": a.blank || void 0,
1076
+ class: [
1077
+ a.column.headerClassName,
1078
+ typeof s.headerCellClassName == "function" ? s.headerCellClassName(
1079
+ a.column,
1080
+ p.value.leaves.indexOf(a.leaves[0])
1081
+ ) : s.headerCellClassName
1082
+ ],
1083
+ style: Pl(a),
1084
+ "aria-sort": !a.blank && a.column.sortable ? ((Oe = l(ee).find((j) => j.key === a.column.key)) == null ? void 0 : Oe.direction) === "asc" ? "ascending" : (($e = l(ee).find((j) => j.key === a.column.key)) == null ? void 0 : $e.direction) === "desc" ? "descending" : "none" : void 0,
1085
+ onClick: (j) => !a.blank && P("headerClick", a.column, j),
1086
+ onContextmenu: (j) => !a.blank && P("headerContextmenu", a.column, j)
1087
+ }), {
1088
+ default: B(() => {
1089
+ var j, D, L, Ee;
1090
+ return [
1091
+ a.blank ? (c(), y(A, { key: 0 }, [], 64)) : a.column.type === "selection" ? S(e.$slots, "selection-header", {
1092
+ column: a.column,
1093
+ checked: l(qt),
1094
+ indeterminate: l(rt),
1095
+ disabled: l(h) || !l(i).selectionPage.value.length,
1096
+ toggle: l(i).toggleAllSelection
1097
+ }, () => [
1098
+ a.column.type === "selection" && s.selectionType !== "radio" && !s.hideSelectAll ? (c(), w(vl, {
1099
+ key: 0,
1100
+ "model-value": l(qt),
1101
+ indeterminate: l(rt),
1102
+ disabled: l(h) || !l(i).selectionPage.value.length,
1103
+ "aria-label": m.value.selectAll,
1104
+ onClick: t[2] || (t[2] = Z(() => {
1105
+ }, ["stop"])),
1106
+ "onUpdate:modelValue": t[3] || (t[3] = (R) => l(i).toggleAllSelection(
1107
+ l(rt) && !s.selectOnIndeterminate ? !1 : R === !0
1108
+ ))
1109
+ }, {
1110
+ default: B(() => {
1111
+ var R;
1112
+ return [
1113
+ (R = s.selectionColumn) != null && R.label ? (c(), y(A, { key: 0 }, [
1114
+ I(K(s.selectionColumn.label), 1)
1115
+ ], 64)) : x("", !0)
1116
+ ];
1117
+ }),
1118
+ _: 1
1119
+ }, 8, ["model-value", "indeterminate", "disabled", "aria-label"])) : a.column.type === "selection" ? (c(), y("span", Ma, "选择")) : x("", !0)
1120
+ ], !0, 1) : (c(), y("div", Ba, [
1121
+ H("div", Oa, [
1122
+ a.column.sortable ? (c(), y("button", {
1123
+ key: 0,
1124
+ type: "button",
1125
+ class: "hys-ui-table-sort",
1126
+ disabled: l(h),
1127
+ "aria-describedby": l(Ye) && re.value === a.column ? l(fe) + "-tooltip" : void 0,
1128
+ onPointerenter: (R) => ll(a.column, R),
1129
+ onPointerleave: Me,
1130
+ onFocus: (R) => ll(a.column, R),
1131
+ onBlur: Me,
1132
+ onClick: (R) => l(i).toggleSort(a.column)
1133
+ }, [
1134
+ S(e.$slots, "header-" + a.column.key, {
1135
+ column: a.column,
1136
+ sorts: l(ee)
1137
+ }, () => [
1138
+ S(e.$slots, "header-cell", {
1139
+ column: a.column,
1140
+ sorts: l(ee)
1141
+ }, () => [
1142
+ a.column.renderHeader ? (c(), w(oe, {
1143
+ key: 0,
1144
+ value: a.column.renderHeader(a.column, l(ee))
1145
+ }, null, 8, ["value"])) : (c(), y(A, { key: 1 }, [
1146
+ I(K(a.column.label), 1)
1147
+ ], 64))
1148
+ ], !0)
1149
+ ], !0)
1150
+ ], 40, $a)) : (c(), y("span", Ea, [
1151
+ S(e.$slots, "header-" + a.column.key, {
1152
+ column: a.column,
1153
+ sorts: l(ee)
1154
+ }, () => [
1155
+ S(e.$slots, "header-cell", {
1156
+ column: a.column,
1157
+ sorts: l(ee)
1158
+ }, () => [
1159
+ a.column.renderHeader ? (c(), w(oe, {
1160
+ key: 0,
1161
+ value: a.column.renderHeader(a.column, l(ee))
1162
+ }, null, 8, ["value"])) : (c(), y(A, { key: 1 }, [
1163
+ I(K(a.column.label), 1)
1164
+ ], 64))
1165
+ ], !0)
1166
+ ], !0)
1167
+ ])),
1168
+ a.column.sortable ? (c(), y("span", Ha, [
1169
+ (c(), y(A, null, le(["asc", "desc"], (R) => H("button", {
1170
+ key: R,
1171
+ type: "button",
1172
+ disabled: l(h),
1173
+ "aria-label": he(
1174
+ R === "asc" ? m.value.sortAsc : m.value.sortDesc,
1175
+ a.column.label
1176
+ ),
1177
+ "aria-pressed": l(ee).some(
1178
+ (xe) => xe.key === a.column.key && xe.direction === R
1179
+ ),
1180
+ onClick: (xe) => l(i).toggleSort(a.column, R)
1181
+ }, [
1182
+ (c(), w(ae(R === "asc" ? l(ca) : l(Ht)), {
1183
+ size: 12,
1184
+ "aria-hidden": "true"
1185
+ }))
1186
+ ], 8, Ka)), 64))
1187
+ ])) : x("", !0)
1188
+ ]),
1189
+ !a.column.children && Ue(a.column) ? (c(), y("button", {
1190
+ key: 0,
1191
+ type: "button",
1192
+ class: Te(["hys-ui-table-filter", {
1193
+ "hys-ui-table-filter-active": St(a.column)
1194
+ }]),
1195
+ disabled: l(h),
1196
+ "aria-label": m.value.filter + a.column.label,
1197
+ "aria-expanded": l(X) && ((j = k.value) == null ? void 0 : j.key) === a.column.key,
1198
+ "aria-controls": l(fe) + "-filter",
1199
+ onClick: Z((R) => Wl(a.column, R), ["stop"])
1200
+ }, [
1201
+ a.column.renderFilterIcon ? (c(), w(oe, {
1202
+ key: 0,
1203
+ value: a.column.renderFilterIcon({
1204
+ column: a.column,
1205
+ filtered: St(a.column),
1206
+ open: l(X) && ((D = k.value) == null ? void 0 : D.key) === a.column.key
1207
+ })
1208
+ }, null, 8, ["value"])) : S(e.$slots, "filter-icon", {
1209
+ column: a.column,
1210
+ filtered: St(a.column),
1211
+ open: l(X) && ((L = k.value) == null ? void 0 : L.key) === a.column.key
1212
+ }, () => [
1213
+ N(l(da), {
1214
+ size: 14,
1215
+ "aria-hidden": "true"
1216
+ })
1217
+ ], !0, 1)
1218
+ ], 10, Da)) : x("", !0),
1219
+ !a.column.children && a.colspan === 1 && (a.column.resizable ?? s.resizable) && (s.allowDragLastColumn || a.column.key !== ((Ee = p.value.leaves.at(-1)) == null ? void 0 : Ee.key)) && (!a.column.type || a.column.type === "default") ? (c(), y("span", {
1220
+ key: 1,
1221
+ class: "hys-ui-table-resize",
1222
+ role: "separator",
1223
+ "aria-orientation": "vertical",
1224
+ "aria-label": he(m.value.resizeColumn, a.column.label),
1225
+ tabindex: "0",
1226
+ "aria-valuenow": Math.round(
1227
+ Y.value[a.column.key] ?? ne(a.column)
1228
+ ),
1229
+ "aria-valuemin": a.column.minWidth ?? 60,
1230
+ "aria-valuemax": a.column.maxWidth ?? 2e3,
1231
+ onPointerdown: Z((R) => Ul(a.column, R), ["prevent", "stop"]),
1232
+ onKeydown: [
1233
+ $t(Z((R) => Bt(
1234
+ a.column.key,
1235
+ (Y.value[a.column.key] ?? ne(a.column)) - 10
1236
+ ), ["prevent"]), ["left"]),
1237
+ $t(Z((R) => Bt(
1238
+ a.column.key,
1239
+ (Y.value[a.column.key] ?? ne(a.column)) + 10
1240
+ ), ["prevent"]), ["right"])
1241
+ ]
1242
+ }, null, 40, Wa)) : x("", !0)
1243
+ ]))
1244
+ ];
1245
+ }),
1246
+ _: 2
1247
+ }, 1040, ["data-column-key", "data-leaf", "colspan", "rowspan", "scope", "aria-hidden", "class", "style", "aria-sort", "onClick", "onContextmenu"]);
1248
+ }), 128))
1249
+ ]),
1250
+ _: 2
1251
+ }, 1040, ["class", "style"]);
1252
+ }), 128))
1253
+ ]),
1254
+ _: 3
1255
+ }, 8, ["style"])) : x("", !0),
1256
+ (c(), w(ae(((b = (F = s.components) == null ? void 0 : F.body) == null ? void 0 : b.wrapper) ?? "tbody"), null, {
1257
+ default: B(() => [
1258
+ s.loading && s.loadingMode === "replace" ? (c(), y("tr", La, [
1259
+ H("td", {
1260
+ colspan: Math.max(1, p.value.leaves.length)
1261
+ }, [
1262
+ H("div", qa, [
1263
+ S(e.$slots, "loading", {}, () => [
1264
+ N(l(tt), {
1265
+ class: "hys-ui-table-spinner",
1266
+ size: 18
1267
+ }),
1268
+ I(K(m.value.loadingText), 1)
1269
+ ], !0)
1270
+ ])
1271
+ ], 8, Na)
1272
+ ])) : (c(), y(A, { key: 1 }, [
1273
+ (c(!0), y(A, null, le(l(_), (o, v) => {
1274
+ var $, M, C;
1275
+ return c(), y(A, {
1276
+ key: o.token
1277
+ }, [
1278
+ (c(), w(ae(((M = ($ = s.components) == null ? void 0 : $.body) == null ? void 0 : M.row) ?? "tr"), V({ ref_for: !0 }, ke((C = s.customRow) == null ? void 0 : C.call(s, o.row, v)), {
1279
+ "data-row-key": String(o.key),
1280
+ "aria-selected": s.highlightCurrentRow ? l(Vt) === o.key : void 0,
1281
+ class: [
1282
+ typeof s.rowClassName == "function" ? s.rowClassName(o.row, v) : s.rowClassName,
1283
+ {
1284
+ "hys-ui-table-row-current": s.highlightCurrentRow && l(Vt) === o.key,
1285
+ "hys-ui-table-row-selected": l(it).has(o.token)
1286
+ }
1287
+ ],
1288
+ style: typeof s.rowStyle == "function" ? s.rowStyle(o.row, v) : s.rowStyle,
1289
+ onClick: (a) => Hl(o, v, a),
1290
+ onDblclick: (a) => !l(h) && P("rowDblclick", o.row, v, a),
1291
+ onContextmenu: (a) => P("rowContextmenu", o.row, v, a)
1292
+ }), {
1293
+ default: B(() => [
1294
+ (c(!0), y(A, null, le(p.value.leaves, (a, z) => {
1295
+ var Be, Oe, $e, j;
1296
+ return c(), y(A, {
1297
+ key: a.key
1298
+ }, [
1299
+ Ie(v, z).rowspan && Ie(v, z).colspan ? (c(), w(ae(a.rowScope ? ((Oe = (Be = s.components) == null ? void 0 : Be.body) == null ? void 0 : Oe.rowHeaderCell) ?? "th" : ((j = ($e = s.components) == null ? void 0 : $e.body) == null ? void 0 : j.cell) ?? "td"), V(
1300
+ {
1301
+ key: 0,
1302
+ ref_for: !0
1303
+ },
1304
+ Sl(
1305
+ J(o.row, a, v, z)
1306
+ ),
1307
+ {
1308
+ scope: a.rowScope,
1309
+ "data-column-key": a.key,
1310
+ rowspan: Ie(v, z).rowspan,
1311
+ colspan: Ie(v, z).colspan,
1312
+ style: Ol(J(o.row, a, v, z)),
1313
+ class: $l(J(o.row, a, v, z)),
1314
+ onClick: (D) => !l(h) && P(
1315
+ "cellClick",
1316
+ J(o.row, a, v, z),
1317
+ D
1318
+ ),
1319
+ onDblclick: (D) => !l(h) && P(
1320
+ "cellDblclick",
1321
+ J(o.row, a, v, z),
1322
+ D
1323
+ ),
1324
+ onContextmenu: (D) => P(
1325
+ "cellContextmenu",
1326
+ J(o.row, a, v, z),
1327
+ D
1328
+ ),
1329
+ onMouseenter: (D) => P(
1330
+ "cellMouseEnter",
1331
+ J(o.row, a, v, z),
1332
+ D
1333
+ ),
1334
+ onMouseleave: (D) => P(
1335
+ "cellMouseLeave",
1336
+ J(o.row, a, v, z),
1337
+ D
1338
+ )
1339
+ }
1340
+ ), {
1341
+ default: B(() => {
1342
+ var D;
1343
+ return [
1344
+ a.type === "selection" ? S(e.$slots, "selection-cell", {
1345
+ row: o.row,
1346
+ index: v,
1347
+ column: a,
1348
+ checked: l(it).has(o.token),
1349
+ indeterminate: l(Nt).has(o.token),
1350
+ disabled: l(h) || !l(i).eligible(o),
1351
+ toggle: (L) => l(i).toggleRowSelection(o.key, L)
1352
+ }, () => {
1353
+ var L, Ee, R, xe;
1354
+ return [
1355
+ s.selectionType === "radio" ? (c(), w(ya, {
1356
+ key: 0,
1357
+ name: l(fe) + "-selection",
1358
+ "model-value": l(be)[0] ?? null,
1359
+ value: o.key,
1360
+ disabled: l(h) || !l(i).eligible(o),
1361
+ "aria-label": ((L = s.getSelectionProps) == null ? void 0 : L.call(s, o.row, o.index).label) ?? he(m.value.selectRow, v + 1),
1362
+ title: (Ee = s.getSelectionProps) == null ? void 0 : Ee.call(s, o.row, o.index).title,
1363
+ onClick: t[4] || (t[4] = Z(() => {
1364
+ }, ["stop"])),
1365
+ "onUpdate:modelValue": (He) => l(i).toggleRowSelection(o.key, !0)
1366
+ }, null, 8, ["name", "model-value", "value", "disabled", "aria-label", "title", "onUpdate:modelValue"])) : (c(), w(vl, {
1367
+ key: 1,
1368
+ "model-value": l(it).has(o.token),
1369
+ indeterminate: l(Nt).has(o.token),
1370
+ disabled: l(h) || !l(i).eligible(o),
1371
+ "aria-label": ((R = s.getSelectionProps) == null ? void 0 : R.call(s, o.row, o.index).label) ?? he(m.value.selectRow, v + 1),
1372
+ title: (xe = s.getSelectionProps) == null ? void 0 : xe.call(s, o.row, o.index).title,
1373
+ onClick: t[5] || (t[5] = Z((He) => na(Fe) ? Fe.value = He.shiftKey : Fe = He.shiftKey, ["stop"])),
1374
+ "onUpdate:modelValue": (He) => xl(o, He === !0)
1375
+ }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "title", "onUpdate:modelValue"]))
1376
+ ];
1377
+ }, !0, 0) : a.type === "index" ? (c(), w(oe, {
1378
+ key: 1,
1379
+ value: typeof a.index == "function" ? a.index(v, o.row) : s.indexMethod ? s.indexMethod(v, o.row) : (typeof a.index == "number" ? a.index : 1) + v + (s.pagination && !s.serverMode ? (l(ct) - 1) * l(dt) : 0)
1380
+ }, null, 8, ["value"])) : a.type === "expand" && l(i).canExpand(o) ? (c(), y("button", {
1381
+ key: 2,
1382
+ type: "button",
1383
+ class: "hys-ui-table-expand",
1384
+ disabled: l(h),
1385
+ "aria-expanded": l(U).has(o.token),
1386
+ "aria-label": he(
1387
+ l(U).has(o.token) ? m.value.collapseRow : m.value.expandRow,
1388
+ v + 1
1389
+ ),
1390
+ onClick: Z((L) => l(i).toggleRowExpansion(o.key), ["stop"])
1391
+ }, [
1392
+ S(e.$slots, "expand-icon", {
1393
+ row: o.row,
1394
+ index: v,
1395
+ expanded: l(U).has(o.token),
1396
+ loading: l(ge).has(o.token),
1397
+ depth: o.depth
1398
+ }, () => [
1399
+ (c(), w(ae(
1400
+ l(ge).has(o.token) ? l(tt) : l(U).has(o.token) ? l(Ht) : l(dl)
1401
+ ), {
1402
+ class: Te({
1403
+ "hys-ui-table-spinner": l(ge).has(o.token)
1404
+ }),
1405
+ size: 16,
1406
+ "aria-hidden": "true"
1407
+ }, null, 8, ["class"]))
1408
+ ], !0)
1409
+ ], 8, ja)) : a.type !== "expand" ? (c(), y("div", Va, [
1410
+ s.treeMode && a.key === Ne.value ? (c(), y("span", {
1411
+ key: 0,
1412
+ class: "hys-ui-table-tree-indent",
1413
+ style: Re({
1414
+ width: Math.min(o.depth, 100) * Math.max(0, s.indent) + "px"
1415
+ })
1416
+ }, null, 4)) : x("", !0),
1417
+ s.treeMode && a.key === Ne.value && !wl.value && s.showExpandColumn ? (c(), y(A, { key: 1 }, [
1418
+ l(i).canExpand(o) ? (c(), y("button", {
1419
+ key: 0,
1420
+ type: "button",
1421
+ class: "hys-ui-table-expand",
1422
+ disabled: l(h),
1423
+ "aria-expanded": l(U).has(o.token),
1424
+ "aria-label": (l(U).has(o.token) ? m.value.collapse : m.value.expand) + Ve(
1425
+ l(De)(
1426
+ o.row,
1427
+ a.dataIndex ?? a.key
1428
+ )
1429
+ ),
1430
+ onClick: Z((L) => l(i).toggleRowExpansion(o.key), ["stop"])
1431
+ }, [
1432
+ S(e.$slots, "expand-icon", {
1433
+ row: o.row,
1434
+ index: v,
1435
+ expanded: l(U).has(o.token),
1436
+ loading: l(ge).has(o.token),
1437
+ depth: o.depth
1438
+ }, () => [
1439
+ (c(), w(ae(
1440
+ l(ge).has(o.token) ? l(tt) : l(U).has(o.token) ? l(Ht) : l(dl)
1441
+ ), {
1442
+ class: Te({
1443
+ "hys-ui-table-spinner": l(ge).has(
1444
+ o.token
1445
+ )
1446
+ }),
1447
+ size: 16,
1448
+ "aria-hidden": "true"
1449
+ }, null, 8, ["class"]))
1450
+ ], !0)
1451
+ ], 8, Ia)) : (c(), y("span", Ua))
1452
+ ], 64)) : x("", !0),
1453
+ H("span", {
1454
+ class: Te(["hys-ui-table-cell-text", {
1455
+ "hys-ui-table-ellipsis": a.ellipsis || Qe(a)
1456
+ }]),
1457
+ tabindex: Qe(a) ? 0 : void 0,
1458
+ title: typeof a.ellipsis == "object" && a.ellipsis.showTitle !== !1 && !Qe(a) ? Ve(l(De)(o.row, a.dataIndex ?? a.key)) : void 0,
1459
+ "aria-describedby": l(Ye) && ((D = Q.value) == null ? void 0 : D.row) === o.row && Q.value.column.key === a.key ? l(fe) + "-tooltip" : void 0,
1460
+ onPointerenter: (L) => tl(
1461
+ J(o.row, a, v, z),
1462
+ L
1463
+ ),
1464
+ onPointerleave: Me,
1465
+ onFocus: (L) => tl(
1466
+ J(o.row, a, v, z),
1467
+ L
1468
+ ),
1469
+ onBlur: Me
1470
+ }, [
1471
+ S(e.$slots, a.key, {
1472
+ row: o.row,
1473
+ value: l(De)(
1474
+ o.row,
1475
+ a.dataIndex ?? a.key
1476
+ ),
1477
+ index: v,
1478
+ column: a
1479
+ }, () => [
1480
+ S(e.$slots, "body-cell", {
1481
+ row: o.row,
1482
+ column: a,
1483
+ value: l(De)(
1484
+ o.row,
1485
+ a.dataIndex ?? a.key
1486
+ ),
1487
+ index: v
1488
+ }, () => [
1489
+ N(oe, {
1490
+ value: El(
1491
+ J(
1492
+ o.row,
1493
+ a,
1494
+ v,
1495
+ z
1496
+ )
1497
+ )
1498
+ }, null, 8, ["value"])
1499
+ ], !0)
1500
+ ], !0)
1501
+ ], 42, Ja),
1502
+ a.key === Ne.value && l(kl).has(o.token) ? (c(), w(ye, {
1503
+ key: 2,
1504
+ size: "sm",
1505
+ variant: "ghost",
1506
+ "aria-label": m.value.retryLabel,
1507
+ onClick: Z((L) => l(i).loadRow(o.key, !0), ["stop"])
1508
+ }, {
1509
+ default: B(() => [
1510
+ N(l(va), { size: 13 }),
1511
+ I(K(m.value.retry), 1)
1512
+ ]),
1513
+ _: 1
1514
+ }, 8, ["aria-label", "onClick"])) : x("", !0)
1515
+ ])) : x("", !0)
1516
+ ];
1517
+ }),
1518
+ _: 2
1519
+ }, 1040, ["scope", "data-column-key", "rowspan", "colspan", "style", "class", "onClick", "onDblclick", "onContextmenu", "onMouseenter", "onMouseleave"])) : x("", !0)
1520
+ ], 64);
1521
+ }), 128))
1522
+ ]),
1523
+ _: 2
1524
+ }, 1040, ["data-row-key", "aria-selected", "class", "style", "onClick", "onDblclick", "onContextmenu"])),
1525
+ Qt(o) ? ia((c(), y("tr", Xa, [
1526
+ H("td", {
1527
+ colspan: Math.max(1, p.value.leaves.length)
1528
+ }, [
1529
+ S(e.$slots, "expand", {
1530
+ row: o.row,
1531
+ index: v,
1532
+ expanded: l(U).has(o.token)
1533
+ }, void 0, !0)
1534
+ ], 8, Qa)
1535
+ ], 512)), [
1536
+ [sa, l(U).has(o.token)]
1537
+ ]) : x("", !0)
1538
+ ], 64);
1539
+ }), 128)),
1540
+ l(_).length ? x("", !0) : (c(), y("tr", Ya, [
1541
+ H("td", {
1542
+ colspan: Math.max(1, p.value.leaves.length)
1543
+ }, [
1544
+ S(e.$slots, "empty", {}, () => [
1545
+ I(K(s.emptyText ?? m.value.emptyText), 1)
1546
+ ], !0)
1547
+ ], 8, Ga)
1548
+ ]))
1549
+ ], 64)),
1550
+ e.$slots.append ? (c(), y("tr", Za, [
1551
+ H("td", {
1552
+ colspan: Math.max(1, p.value.leaves.length)
1553
+ }, [
1554
+ S(e.$slots, "append", {
1555
+ rows: l(i).filteredRows.value
1556
+ }, void 0, !0)
1557
+ ], 8, _a)
1558
+ ])) : x("", !0)
1559
+ ]),
1560
+ _: 3
1561
+ })),
1562
+ (s.showSummary || e.$slots.summary) && (!s.loading || s.loadingMode === "overlay") ? (c(), y("tfoot", {
1563
+ key: 2,
1564
+ class: Te(["hys-ui-table-summary", { "hys-ui-table-summary-sticky": s.stickySummary }])
1565
+ }, [
1566
+ S(e.$slots, "summary", {
1567
+ columns: p.value.leaves,
1568
+ rows: gt.value,
1569
+ values: kt.value,
1570
+ cellAttrs: Yt
1571
+ }, () => [
1572
+ H("tr", null, [
1573
+ (c(!0), y(A, null, le(p.value.leaves, (o, v) => (c(), y("td", V({
1574
+ key: o.key
1575
+ }, { ref_for: !0 }, Yt(o)), [
1576
+ S(e.$slots, "summary-cell", {
1577
+ column: o,
1578
+ index: v,
1579
+ value: kt.value[v],
1580
+ rows: gt.value
1581
+ }, () => [
1582
+ N(oe, {
1583
+ value: kt.value[v]
1584
+ }, null, 8, ["value"])
1585
+ ], !0)
1586
+ ], 16))), 128))
1587
+ ])
1588
+ ], !0)
1589
+ ], 2)) : x("", !0)
1590
+ ];
1591
+ }),
1592
+ _: 3
1593
+ }, 8, ["style"]))
1594
+ ], 46, Aa),
1595
+ s.loading && s.loadingMode === "overlay" ? (c(), y("div", eo, [
1596
+ S(e.$slots, "loading", {}, () => [
1597
+ N(l(tt), {
1598
+ class: "hys-ui-table-spinner",
1599
+ size: 18
1600
+ }),
1601
+ I(" " + K(m.value.loadingText), 1)
1602
+ ], !0)
1603
+ ])) : x("", !0)
1604
+ ]),
1605
+ (c(), w(Et, { to: "body" }, [
1606
+ l(we) ? (c(), y("div", V({
1607
+ key: 0,
1608
+ ref_key: "stickyBarElement",
1609
+ ref: Rl
1610
+ }, l(We), {
1611
+ class: ["hys-ui-table-sticky-scrollbar", { "hys-ui-table-themed-scrollbar": s.nativeScrollbar === !1 }],
1612
+ style: {
1613
+ top: l(we).top + "px",
1614
+ left: l(we).left + "px",
1615
+ width: l(we).width + "px",
1616
+ height: l(Fl) + "px",
1617
+ direction: l(we).direction
1618
+ },
1619
+ role: "region",
1620
+ "aria-label": m.value.stickyScrollLabel,
1621
+ tabindex: "0",
1622
+ onScroll: t[6] || (t[6] = //@ts-ignore
1623
+ (...d) => l(Xt) && l(Xt)(...d))
1624
+ }), [
1625
+ H("div", {
1626
+ "aria-hidden": "true",
1627
+ style: Re({ width: l(we).contentWidth + "px", height: "1px" })
1628
+ }, null, 4)
1629
+ ], 16, to)) : x("", !0)
1630
+ ])),
1631
+ e.$slots.footer ? (c(), y("div", lo, [
1632
+ S(e.$slots, "footer", {
1633
+ rows: l(i).filteredRows.value,
1634
+ pageRows: bt.value,
1635
+ query: l(vt)
1636
+ }, void 0, !0)
1637
+ ])) : x("", !0),
1638
+ (c(!0), y(A, null, le(It.value.filter(
1639
+ (d) => d.startsWith("bottom-")
1640
+ ), (d) => (c(), y("div", {
1641
+ key: d,
1642
+ class: "hys-ui-table-pagination",
1643
+ "data-position": d
1644
+ }, [
1645
+ S(e.$slots, "pagination", {
1646
+ position: d,
1647
+ props: qe.value,
1648
+ setPage: l(i).requestPage,
1649
+ setPageSize: l(i).changeSize
1650
+ }, () => [
1651
+ N(yl, V({ ref_for: !0 }, qe.value, {
1652
+ onChange: t[7] || (t[7] = (f) => l(i).requestPage(f)),
1653
+ onPageSizeChange: l(i).changeSize
1654
+ }), null, 16, ["onPageSizeChange"])
1655
+ ], !0)
1656
+ ], 8, ao))), 128)),
1657
+ (c(), w(Et, {
1658
+ to: Gt.value || "body",
1659
+ disabled: Gt.value === !1
1660
+ }, [
1661
+ N(l(ml), {
1662
+ "popup-transition": r.popupTransition,
1663
+ "popup-transition-duration": r.popupTransitionDuration,
1664
+ placement: l(W).placement.value
1665
+ }, {
1666
+ default: B(() => [
1667
+ l(X) && k.value ? (c(), y("div", V({
1668
+ key: 0,
1669
+ id: l(fe) + "-filter",
1670
+ ref_key: "filterPanel",
1671
+ ref: wt
1672
+ }, l(We), {
1673
+ class: "hys-ui-table-filter-panel hys-ui-floating-surface",
1674
+ style: l(Dl),
1675
+ role: "dialog",
1676
+ "aria-label": m.value.filter + k.value.label
1677
+ }), [
1678
+ k.value.renderFilterDropdown && Zt.value ? (c(), w(oe, {
1679
+ key: 0,
1680
+ value: k.value.renderFilterDropdown(Zt.value)
1681
+ }, null, 8, ["value"])) : S(e.$slots, "filter-dropdown", {
1682
+ column: k.value,
1683
+ open: l(X),
1684
+ values: ie.value,
1685
+ setValues: Rt,
1686
+ confirm: Pe,
1687
+ clear: Tt,
1688
+ close: () => l(W).close(!0)
1689
+ }, () => [
1690
+ H("strong", null, K(k.value.label), 1),
1691
+ k.value.filters ? (c(), w(ma, {
1692
+ key: k.value.key,
1693
+ values: ie.value,
1694
+ "onUpdate:values": t[8] || (t[8] = (d) => ie.value = d),
1695
+ options: k.value.filters,
1696
+ mode: k.value.filterMode,
1697
+ search: k.value.filterSearch,
1698
+ multiple: k.value.filterMultiple !== !1,
1699
+ disabled: l(h),
1700
+ "search-label": m.value.filterSearch,
1701
+ "empty-text": m.value.noFilterMatch
1702
+ }, null, 8, ["values", "options", "mode", "search", "multiple", "disabled", "search-label", "empty-text"])) : (c(), w(fa, {
1703
+ key: 1,
1704
+ "model-value": String(ie.value[0] ?? ""),
1705
+ "aria-label": m.value.filter + k.value.label,
1706
+ placeholder: m.value.filterPlaceholder,
1707
+ clearable: "",
1708
+ size: "sm",
1709
+ "onUpdate:modelValue": t[9] || (t[9] = (d) => Rt(d ? [d] : [])),
1710
+ onKeydown: $t(Z(Pe, ["prevent"]), ["enter"])
1711
+ }, null, 8, ["model-value", "aria-label", "placeholder", "onKeydown"])),
1712
+ H("div", no, [
1713
+ N(ye, {
1714
+ size: "sm",
1715
+ variant: "secondary",
1716
+ onClick: t[10] || (t[10] = (d) => Tt())
1717
+ }, {
1718
+ default: B(() => [
1719
+ I(K(m.value.reset), 1)
1720
+ ]),
1721
+ _: 1
1722
+ }),
1723
+ N(ye, {
1724
+ size: "sm",
1725
+ onClick: t[11] || (t[11] = (d) => Pe())
1726
+ }, {
1727
+ default: B(() => [
1728
+ I(K(m.value.apply), 1)
1729
+ ]),
1730
+ _: 1
1731
+ })
1732
+ ])
1733
+ ], !0, 1)
1734
+ ], 16, oo)) : x("", !0)
1735
+ ]),
1736
+ _: 3
1737
+ }, 8, ["popup-transition", "popup-transition-duration", "placement"])
1738
+ ], 8, ["to", "disabled"])),
1739
+ (c(), w(Et, {
1740
+ to: el.value || "body",
1741
+ disabled: el.value === !1
1742
+ }, [
1743
+ N(l(ml), {
1744
+ "popup-transition": r.popupTransition,
1745
+ "popup-transition-duration": r.popupTransitionDuration,
1746
+ placement: l(O).placement.value
1747
+ }, {
1748
+ default: B(() => [
1749
+ l(Ye) && (Q.value || re.value) ? (c(), y("div", V({
1750
+ key: 0,
1751
+ id: l(fe) + "-tooltip",
1752
+ ref_key: "tipPanel",
1753
+ ref: _t
1754
+ }, l(We), {
1755
+ class: "hys-ui-table-tooltip hys-ui-floating-tooltip",
1756
+ "data-effect": ue.value.effect,
1757
+ role: "tooltip",
1758
+ style: [
1759
+ l(Nl),
1760
+ ue.value.enterable === !1 ? { pointerEvents: "none" } : void 0,
1761
+ ue.value.maxWidth !== void 0 && ze(ue.value.maxWidth) ? { maxWidth: `min(${ze(ue.value.maxWidth)}, calc(100vw - 20px))` } : void 0
1762
+ ],
1763
+ onPointerenter: Ft,
1764
+ onPointerleave: Me
1765
+ }), [
1766
+ Q.value ? S(e.$slots, "tooltip", ra(ua(Q.value)), () => [
1767
+ N(oe, { value: al.value }, null, 8, ["value"])
1768
+ ], !0, 0) : (c(), w(oe, {
1769
+ key: 1,
1770
+ value: al.value
1771
+ }, null, 8, ["value"]))
1772
+ ], 16, io)) : x("", !0)
1773
+ ]),
1774
+ _: 3
1775
+ }, 8, ["popup-transition", "popup-transition-duration", "placement"])
1776
+ ], 8, ["to", "disabled"]))
1777
+ ], 16, Sa);
1778
+ };
1490
1779
  }
1491
1780
  });
1492
1781
  export {
1493
- Ea as default
1782
+ Co as default
1494
1783
  };