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