hys-ui 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +68 -73
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +146 -2
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +227 -60
- package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
- package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +1092 -154
- package/dist/components/HysModal/HysModal.vue.js +3 -3
- package/dist/components/HysModal/HysModal2.vue.js +81 -80
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
- package/dist/components/HysSearch/HysSearch.vue.js +5 -82
- package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +472 -443
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
- package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +1418 -1150
- package/dist/components/HysTour/HysTour.vue.js +291 -67
- package/dist/components/HysTour/HysTour3.vue.js +5 -0
- package/dist/composables/buttonGroup.js +12 -0
- package/dist/composables/floatingPosition.js +18 -0
- package/dist/composables/mentionDocument.js +79 -0
- package/dist/composables/mentionEditor.js +58 -0
- package/dist/composables/selectOptions.js +44 -38
- package/dist/composables/splitPaneSizes.js +58 -0
- package/dist/composables/table.js +128 -105
- package/dist/composables/useDialog.js +50 -50
- package/dist/composables/useFloating.js +107 -103
- package/dist/composables/useMentionCaret.js +81 -0
- package/dist/composables/useMentionList.js +81 -0
- package/dist/composables/useMentionModel.js +90 -0
- package/dist/composables/useMentionOptions.js +421 -0
- package/dist/composables/useSplitPaneDrag.js +52 -0
- package/dist/composables/useSplitPaneStorage.js +38 -0
- package/dist/composables/useTable.js +344 -312
- package/dist/composables/useTableSticky.js +79 -0
- package/dist/composables/useTourLayout.js +129 -0
- package/dist/config.js +11 -11
- package/dist/index.js +175 -156
- package/dist/internal/MultiSplitPane.vue.js +305 -0
- package/dist/internal/MultiSplitPane2.vue.js +4 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +61 -7
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +1 -1
- package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
- package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +2 -2
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +2 -2
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +2 -2
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -40
- package/dist/types/components/HysModal/HysModal.vue.d.ts +1 -1
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
- package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +45 -7
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +6 -1
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
- package/dist/types/components/HysTable/HysTable.vue.d.ts +1740 -3
- package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -9
- package/dist/types/composables/buttonGroup.d.ts +9 -0
- package/dist/types/composables/floatingPosition.d.ts +14 -0
- package/dist/types/composables/mention.d.ts +284 -0
- package/dist/types/composables/mentionDocument.d.ts +15 -0
- package/dist/types/composables/mentionEditor.d.ts +7 -0
- package/dist/types/composables/modal.d.ts +2 -0
- package/dist/types/composables/selectOptions.d.ts +5 -0
- package/dist/types/composables/splitPaneSizes.d.ts +11 -0
- package/dist/types/composables/table.d.ts +116 -6
- package/dist/types/composables/tour.d.ts +68 -0
- package/dist/types/composables/useFloating.d.ts +1 -1
- package/dist/types/composables/useMentionCaret.d.ts +6 -0
- package/dist/types/composables/useMentionList.d.ts +23 -0
- package/dist/types/composables/useMentionModel.d.ts +14 -0
- package/dist/types/composables/useMentionOptions.d.ts +26 -0
- package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
- package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
- package/dist/types/composables/useTable.d.ts +7 -3
- package/dist/types/composables/useTableSticky.d.ts +22 -0
- package/dist/types/composables/useTourLayout.d.ts +33 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/index.d.ts +36 -1
- package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
- package/package.json +3 -2
- package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
- package/dist/components/HysTour/HysTour2.vue.js +0 -4
|
@@ -1,53 +1,58 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ChevronUp as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useHysRootAttrs as
|
|
10
|
-
import { useFloating as
|
|
11
|
-
import { useTable as
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
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
|
-
},
|
|
18
|
+
}, Ra = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "hys-ui-table-selection-actions"
|
|
20
|
-
},
|
|
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
|
-
},
|
|
24
|
-
key:
|
|
24
|
+
}, Ba = {
|
|
25
|
+
key: 2,
|
|
25
26
|
class: "hys-ui-table-heading"
|
|
26
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
36
|
+
}, Ia = ["disabled", "aria-expanded", "aria-label", "onClick"], Ua = {
|
|
36
37
|
key: 1,
|
|
37
38
|
class: "hys-ui-table-tree-spacer"
|
|
38
|
-
},
|
|
39
|
+
}, Ja = ["tabindex", "title", "aria-describedby", "onPointerenter", "onFocus"], Xa = {
|
|
39
40
|
key: 0,
|
|
40
41
|
class: "hys-ui-table-detail"
|
|
41
|
-
},
|
|
42
|
+
}, Qa = ["colspan"], Ya = {
|
|
42
43
|
key: 0,
|
|
43
44
|
class: "hys-ui-table-message"
|
|
44
|
-
},
|
|
45
|
+
}, Ga = ["colspan"], Za = {
|
|
45
46
|
key: 2,
|
|
46
47
|
class: "hys-ui-table-append"
|
|
47
|
-
},
|
|
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
|
-
},
|
|
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(
|
|
146
|
-
const r =
|
|
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
|
-
})),
|
|
172
|
-
function
|
|
173
|
-
const
|
|
174
|
-
for (;
|
|
175
|
-
const
|
|
176
|
-
if (!
|
|
177
|
-
if (
|
|
178
|
-
|
|
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
|
|
184
|
-
let
|
|
185
|
-
const
|
|
186
|
-
for (;
|
|
187
|
-
const
|
|
188
|
-
d.has(
|
|
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 (;
|
|
191
|
-
return
|
|
212
|
+
for (; n.has(t); ) t += "_";
|
|
213
|
+
return t;
|
|
192
214
|
}
|
|
193
|
-
const
|
|
194
|
-
var
|
|
215
|
+
const bl = g(() => {
|
|
216
|
+
var t;
|
|
195
217
|
const e = [];
|
|
196
|
-
return r.selectable && !
|
|
197
|
-
key:
|
|
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: ((
|
|
205
|
-
}), (r.expandable ||
|
|
206
|
-
key:
|
|
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 && !
|
|
214
|
-
key:
|
|
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
|
-
(
|
|
243
|
+
(n) => r.showExpandColumn || n.type !== "expand"
|
|
222
244
|
);
|
|
223
|
-
}),
|
|
224
|
-
() =>
|
|
225
|
-
|
|
226
|
-
|
|
245
|
+
}), p = g(
|
|
246
|
+
() => ga(
|
|
247
|
+
bl.value,
|
|
248
|
+
ka(Lt.value),
|
|
227
249
|
r.showExpandColumn
|
|
228
250
|
)
|
|
229
|
-
),
|
|
251
|
+
), i = ha(
|
|
230
252
|
r,
|
|
231
|
-
() =>
|
|
232
|
-
() => !!
|
|
233
|
-
(e, ...
|
|
253
|
+
() => p.value.leaves,
|
|
254
|
+
() => !!lt.expand,
|
|
255
|
+
(e, ...t) => P(e, ...t)
|
|
234
256
|
), {
|
|
235
|
-
busy:
|
|
236
|
-
display:
|
|
237
|
-
selectedKeys:
|
|
238
|
-
selectedSet:
|
|
239
|
-
expandedKeys:
|
|
240
|
-
expandedSet:
|
|
241
|
-
halfSet:
|
|
242
|
-
allSelected:
|
|
243
|
-
someSelected:
|
|
244
|
-
sorts:
|
|
245
|
-
filters:
|
|
246
|
-
page:
|
|
247
|
-
pageSize:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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 =
|
|
279
|
+
return (e = p.value.leaves.find((t) => !t.type || t.type === "default")) == null ? void 0 : e.key;
|
|
257
280
|
}
|
|
258
|
-
),
|
|
259
|
-
() =>
|
|
260
|
-
),
|
|
261
|
-
if (!r.pagination ||
|
|
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(
|
|
273
|
-
].filter((
|
|
274
|
-
}),
|
|
275
|
-
page:
|
|
276
|
-
pageSize:
|
|
277
|
-
total:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
-
([
|
|
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(
|
|
330
|
+
].includes(t)
|
|
303
331
|
)
|
|
304
|
-
) :
|
|
332
|
+
) : yt;
|
|
305
333
|
}
|
|
306
|
-
function
|
|
307
|
-
var
|
|
334
|
+
function Cl(e) {
|
|
335
|
+
var n, u, d;
|
|
308
336
|
if (!r.customHeaderCell && !e.column.customHeaderCell)
|
|
309
|
-
return
|
|
310
|
-
const
|
|
311
|
-
return
|
|
312
|
-
|
|
313
|
-
|
|
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
|
|
317
|
-
var
|
|
318
|
-
return !r.customCell && !e.column.customCell ?
|
|
319
|
-
|
|
320
|
-
|
|
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
|
|
324
|
-
function
|
|
325
|
-
const
|
|
326
|
-
|
|
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
|
|
329
|
-
() => r.stickyHeader ?? (r.height !== void 0 || r.maxHeight !== void 0)
|
|
330
|
-
),
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
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(
|
|
371
|
+
Math.min(e.maxWidth ?? 2e3, Number.isFinite(t) ? t : 160)
|
|
337
372
|
);
|
|
338
373
|
}
|
|
339
|
-
function
|
|
340
|
-
var
|
|
341
|
-
return
|
|
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
|
|
344
|
-
() =>
|
|
345
|
-
),
|
|
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
|
|
348
|
-
for (const
|
|
349
|
-
|
|
350
|
-
for (const
|
|
351
|
-
|
|
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
|
|
389
|
+
function pt(e, t = !1) {
|
|
355
390
|
return e.fixed === "left" || e.fixed === "right" ? {
|
|
356
391
|
position: "sticky",
|
|
357
|
-
...
|
|
358
|
-
zIndex:
|
|
392
|
+
...Al.value[e.key],
|
|
393
|
+
zIndex: t ? 6 : 2
|
|
359
394
|
} : {};
|
|
360
395
|
}
|
|
361
|
-
function
|
|
362
|
-
const
|
|
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(
|
|
365
|
-
...
|
|
366
|
-
textAlign:
|
|
367
|
-
"--hys-ui-table-justify": (
|
|
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
|
|
371
|
-
|
|
372
|
-
|
|
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(
|
|
375
|
-
for (const
|
|
376
|
-
for (const
|
|
377
|
-
|
|
378
|
-
|
|
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
|
|
383
|
-
return !!
|
|
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
|
|
423
|
+
function J(e, t, n, u) {
|
|
386
424
|
return {
|
|
387
425
|
row: e,
|
|
388
|
-
column:
|
|
389
|
-
value:
|
|
390
|
-
rowIndex:
|
|
391
|
-
columnIndex:
|
|
426
|
+
column: t,
|
|
427
|
+
value: De(e, t.dataIndex ?? t.key),
|
|
428
|
+
rowIndex: n,
|
|
429
|
+
columnIndex: u
|
|
392
430
|
};
|
|
393
431
|
}
|
|
394
|
-
function
|
|
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
|
-
...
|
|
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
|
|
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
|
|
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
|
|
419
|
-
|
|
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
|
|
422
|
-
|
|
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
|
-
) &&
|
|
463
|
+
) && i.toggleRowExpansion(e.key));
|
|
425
464
|
}
|
|
426
|
-
const
|
|
427
|
-
var
|
|
428
|
-
const e = /* @__PURE__ */ new Map(),
|
|
429
|
-
for (let d = 0; d <
|
|
430
|
-
for (let
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
433
|
-
e.set(
|
|
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
|
|
437
|
-
let
|
|
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(
|
|
440
|
-
),
|
|
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(
|
|
481
|
+
Math.min(n.length - f, Math.floor((v == null ? void 0 : v.colspan) ?? 1))
|
|
443
482
|
);
|
|
444
|
-
Number.isFinite(
|
|
445
|
-
for (let
|
|
446
|
-
if (
|
|
447
|
-
|
|
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
|
|
451
|
-
if (
|
|
452
|
-
|
|
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(
|
|
456
|
-
for (let
|
|
457
|
-
for (let
|
|
458
|
-
(
|
|
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
|
-
}),
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
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
|
-
})
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
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
|
|
474
|
-
|
|
475
|
-
|
|
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
|
|
478
|
-
|
|
479
|
-
|
|
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,
|
|
483
|
-
var
|
|
484
|
-
return
|
|
485
|
-
e ? ((
|
|
486
|
-
|
|
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
|
-
}),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
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 (
|
|
496
|
-
|
|
560
|
+
if (h.value || !i.live.value || !t) {
|
|
561
|
+
W.close(xt, !0), xt = !1;
|
|
497
562
|
return;
|
|
498
563
|
}
|
|
499
|
-
const
|
|
500
|
-
((d =
|
|
501
|
-
).find((
|
|
502
|
-
if (!
|
|
503
|
-
|
|
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
|
|
507
|
-
|
|
508
|
-
var
|
|
509
|
-
|
|
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
|
-
|
|
577
|
+
G(
|
|
513
578
|
[
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
() =>
|
|
518
|
-
() => r.showHeader
|
|
579
|
+
ve,
|
|
580
|
+
h,
|
|
581
|
+
i.live,
|
|
582
|
+
() => p.value.leaves,
|
|
583
|
+
() => r.showHeader,
|
|
584
|
+
Le
|
|
519
585
|
],
|
|
520
|
-
|
|
586
|
+
Xe,
|
|
521
587
|
{ immediate: !0, flush: "post" }
|
|
522
|
-
),
|
|
588
|
+
), G(
|
|
523
589
|
() => {
|
|
524
590
|
var e;
|
|
525
|
-
return
|
|
591
|
+
return X.value ? ((e = k.value) == null ? void 0 : e.key) ?? null : null;
|
|
526
592
|
},
|
|
527
|
-
(e) =>
|
|
593
|
+
(e) => P("filterOpenChange", e)
|
|
528
594
|
);
|
|
529
|
-
async function
|
|
530
|
-
var
|
|
531
|
-
if (!
|
|
532
|
-
if (
|
|
533
|
-
|
|
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
|
-
|
|
602
|
+
Ae.value = t.currentTarget, await Je(e.key);
|
|
537
603
|
}
|
|
538
604
|
}
|
|
539
|
-
function
|
|
540
|
-
|
|
605
|
+
function Rt(e) {
|
|
606
|
+
ie.value = [...e];
|
|
541
607
|
}
|
|
542
|
-
function
|
|
543
|
-
|
|
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
|
|
546
|
-
var
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
...((
|
|
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
|
|
552
|
-
(
|
|
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
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
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
|
|
562
|
-
|
|
632
|
+
function Ll(e) {
|
|
633
|
+
return e.showSorterTooltip ?? r.showSorterTooltip;
|
|
563
634
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
const t =
|
|
567
|
-
|
|
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
|
-
|
|
570
|
-
|
|
571
|
-
const e =
|
|
572
|
-
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
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
|
|
583
|
-
const
|
|
584
|
-
((
|
|
585
|
-
).find((
|
|
586
|
-
(
|
|
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((
|
|
590
|
-
|
|
706
|
+
).find((b) => b.dataset.columnKey === d.key);
|
|
707
|
+
F && (e[d.key] = F.getBoundingClientRect().width);
|
|
591
708
|
}
|
|
592
|
-
JSON.stringify(e) !== JSON.stringify(
|
|
709
|
+
JSON.stringify(e) !== JSON.stringify(Y.value) && (Y.value = e);
|
|
593
710
|
}
|
|
594
|
-
function
|
|
595
|
-
cancelAnimationFrame(
|
|
711
|
+
function Se() {
|
|
712
|
+
cancelAnimationFrame(At), At = requestAnimationFrame(ol);
|
|
596
713
|
}
|
|
597
|
-
async function
|
|
598
|
-
await
|
|
714
|
+
async function Il() {
|
|
715
|
+
await Ke(), ol();
|
|
599
716
|
}
|
|
600
|
-
function
|
|
601
|
-
var e,
|
|
602
|
-
cancelAnimationFrame(
|
|
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
|
|
605
|
-
|
|
721
|
+
function Ze() {
|
|
722
|
+
te();
|
|
606
723
|
}
|
|
607
|
-
function
|
|
608
|
-
e.key === "Escape" &&
|
|
724
|
+
function nl(e) {
|
|
725
|
+
e.key === "Escape" && T && (e.preventDefault(), e.stopImmediatePropagation(), te());
|
|
609
726
|
}
|
|
610
|
-
function
|
|
611
|
-
if (!
|
|
612
|
-
const e = getComputedStyle(
|
|
613
|
-
|
|
614
|
-
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
|
-
|
|
733
|
+
T.column.minWidth ?? 60,
|
|
617
734
|
Math.min(
|
|
618
|
-
|
|
619
|
-
|
|
735
|
+
T.column.maxWidth ?? 2e3,
|
|
736
|
+
T.width + (Mt - T.start) * e
|
|
620
737
|
)
|
|
621
738
|
)
|
|
622
739
|
};
|
|
623
740
|
}
|
|
624
|
-
function
|
|
625
|
-
!
|
|
741
|
+
function sl(e) {
|
|
742
|
+
!T || e.pointerId !== T.pointerId || (Mt = e.clientX, cancelAnimationFrame(Pt), Pt = requestAnimationFrame(il));
|
|
626
743
|
}
|
|
627
|
-
function
|
|
628
|
-
if (
|
|
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,
|
|
747
|
+
Math.max(e.minWidth ?? 60, Math.min(e.maxWidth ?? 2e3, t))
|
|
631
748
|
);
|
|
632
|
-
if (d ===
|
|
633
|
-
const
|
|
634
|
-
...
|
|
635
|
-
...
|
|
636
|
-
...
|
|
749
|
+
if (d === n) return;
|
|
750
|
+
const f = {
|
|
751
|
+
...ft.value,
|
|
752
|
+
...Y.value,
|
|
753
|
+
...u,
|
|
637
754
|
[e.key]: d
|
|
638
755
|
};
|
|
639
|
-
|
|
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
|
|
642
|
-
var
|
|
643
|
-
if (!
|
|
644
|
-
|
|
645
|
-
const { column:
|
|
646
|
-
|
|
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
|
|
649
|
-
var
|
|
650
|
-
if (
|
|
651
|
-
|
|
652
|
-
const
|
|
653
|
-
|
|
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:
|
|
656
|
-
width:
|
|
657
|
-
pointerId:
|
|
658
|
-
}, (d = (
|
|
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
|
|
661
|
-
|
|
777
|
+
function Jl() {
|
|
778
|
+
h.value || (te(), at.value = {}, je.value = !1, P("update:columnWidths", {}), Se());
|
|
662
779
|
}
|
|
663
|
-
function
|
|
664
|
-
const
|
|
665
|
-
|
|
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
|
|
668
|
-
|
|
784
|
+
function Xl(e) {
|
|
785
|
+
q.value && (Tl(), O.close(), P(
|
|
669
786
|
"scroll",
|
|
670
787
|
{
|
|
671
|
-
scrollLeft:
|
|
672
|
-
scrollTop:
|
|
788
|
+
scrollLeft: q.value.scrollLeft,
|
|
789
|
+
scrollTop: q.value.scrollTop
|
|
673
790
|
},
|
|
674
791
|
e
|
|
675
792
|
));
|
|
676
793
|
}
|
|
677
|
-
function
|
|
678
|
-
|
|
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
|
|
681
|
-
|
|
797
|
+
function cl() {
|
|
798
|
+
se == null || se.disconnect(), cancelAnimationFrame(At), te(), clearTimeout(Ge), W.close(), O.close();
|
|
682
799
|
}
|
|
683
|
-
|
|
684
|
-
e && (
|
|
685
|
-
}),
|
|
800
|
+
G(h, (e) => {
|
|
801
|
+
e && (te(), W.close(), O.close());
|
|
802
|
+
}), G(
|
|
686
803
|
() => r.columnWidths,
|
|
687
804
|
() => {
|
|
688
|
-
|
|
805
|
+
T && te(), Se();
|
|
689
806
|
},
|
|
690
807
|
{ deep: !0 }
|
|
691
|
-
),
|
|
692
|
-
() =>
|
|
808
|
+
), G(
|
|
809
|
+
() => p.value.leaves.map((e) => e.key).join("\0"),
|
|
693
810
|
() => {
|
|
694
|
-
|
|
695
|
-
var
|
|
696
|
-
return e.key === ((
|
|
697
|
-
}) &&
|
|
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
|
-
),
|
|
816
|
+
), G(
|
|
703
817
|
() => r.columns,
|
|
704
818
|
() => {
|
|
705
|
-
|
|
819
|
+
te(), O.close();
|
|
706
820
|
},
|
|
707
821
|
{ deep: !0 }
|
|
708
|
-
),
|
|
709
|
-
|
|
710
|
-
}),
|
|
711
|
-
|
|
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 &&
|
|
831
|
+
r.scrollToFirstRowOnChange && q.value && (q.value.scrollTop = 0);
|
|
714
832
|
},
|
|
715
833
|
{ flush: "post" }
|
|
716
834
|
);
|
|
717
|
-
function
|
|
718
|
-
const
|
|
719
|
-
!
|
|
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
|
|
722
|
-
var
|
|
723
|
-
await
|
|
724
|
-
const
|
|
725
|
-
if (!
|
|
726
|
-
const d =
|
|
727
|
-
((
|
|
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 || !
|
|
730
|
-
const
|
|
731
|
-
let
|
|
732
|
-
if (
|
|
733
|
-
else if (
|
|
734
|
-
else if (!
|
|
735
|
-
if (
|
|
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
|
-
|
|
855
|
+
b.top >= F.top + u.clientTop + o && (M -= $ - b.height);
|
|
738
856
|
}
|
|
739
|
-
return
|
|
857
|
+
return _e({ top: Math.max(0, M), behavior: t.behavior }), !0;
|
|
740
858
|
}
|
|
741
|
-
const
|
|
742
|
-
return
|
|
743
|
-
element:
|
|
744
|
-
viewport:
|
|
745
|
-
selectedKeys:
|
|
746
|
-
currentRow:
|
|
747
|
-
expandedKeys:
|
|
748
|
-
query:
|
|
749
|
-
columns:
|
|
750
|
-
clearSelection:
|
|
751
|
-
getSelectionRows:
|
|
752
|
-
getHalfSelectionRows:
|
|
753
|
-
toggleRowSelection:
|
|
754
|
-
toggleAllSelection:
|
|
755
|
-
invertSelection:
|
|
756
|
-
setCurrentRow:
|
|
757
|
-
toggleRowExpansion:
|
|
758
|
-
loadRow:
|
|
759
|
-
updateKeyChildren:
|
|
760
|
-
clearSort: () =>
|
|
761
|
-
setSort:
|
|
762
|
-
clearFilter:
|
|
763
|
-
setFilter:
|
|
764
|
-
showFilter: (e) =>
|
|
765
|
-
hideFilter: () =>
|
|
766
|
-
setPage:
|
|
767
|
-
resizeColumn:
|
|
768
|
-
resetColumnWidths:
|
|
769
|
-
doLayout:
|
|
770
|
-
scrollTo:
|
|
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) &&
|
|
890
|
+
Number.isFinite(e) && _e({ top: Math.max(0, e) });
|
|
773
891
|
},
|
|
774
892
|
setScrollLeft: (e) => {
|
|
775
|
-
Number.isFinite(e) &&
|
|
893
|
+
Number.isFinite(e) && _e({ left: Math.max(0, e) });
|
|
776
894
|
},
|
|
777
|
-
scrollToRow:
|
|
778
|
-
}), (e,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
"hys-ui-table-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
onClick:
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
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
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
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
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
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
|
-
]
|
|
993
|
-
])
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
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
|
-
(
|
|
1009
|
-
|
|
1010
|
-
"aria-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
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
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
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,
|
|
1279
|
-
row:
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
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
|
-
_:
|
|
1466
|
-
}),
|
|
1467
|
-
|
|
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
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
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
|
-
|
|
1782
|
+
Co as default
|
|
1515
1783
|
};
|