@vtable-guild/vtable-guild 2.6.3 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/css/presets/antdv.css +2 -0
  2. package/css/presets/element-plus.css +2 -0
  3. package/css/style.css +25 -3
  4. package/css/tailwind3-utilities.css +21 -3
  5. package/css/tailwind3.css +4 -0
  6. package/css/tailwind4.css +4 -0
  7. package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
  8. package/dist/core/src/components/VirtualList/VirtualList.mjs +97 -91
  9. package/dist/css/presets/antdv.css +2 -0
  10. package/dist/css/presets/element-plus.css +2 -0
  11. package/dist/css/style.css +25 -3
  12. package/dist/css/tailwind3-utilities.css +21 -3
  13. package/dist/css/tailwind3.css +4 -0
  14. package/dist/css/tailwind4.css +4 -0
  15. package/dist/index.full.mjs +4051 -3623
  16. package/dist/index.mjs +22 -19
  17. package/dist/table/src/components/ExpandedRowTr.d.ts +90 -0
  18. package/dist/table/src/components/ExpandedRowTr.d.ts.map +1 -0
  19. package/dist/table/src/components/ExpandedRowTr.mjs +61 -0
  20. package/dist/table/src/components/Table.d.ts +23 -3
  21. package/dist/table/src/components/Table.d.ts.map +1 -1
  22. package/dist/table/src/components/Table.mjs +421 -365
  23. package/dist/table/src/components/TableBody.d.ts.map +1 -1
  24. package/dist/table/src/components/TableBody.mjs +67 -58
  25. package/dist/table/src/components/VTable.vue.d.ts +4 -3
  26. package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
  27. package/dist/table/src/components/VTable.vue.mjs +43 -37
  28. package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
  29. package/dist/table/src/components/VirtualTableBody.mjs +151 -140
  30. package/dist/table/src/composables/index.d.ts +3 -0
  31. package/dist/table/src/composables/index.d.ts.map +1 -1
  32. package/dist/table/src/composables/useAutoHeight.d.ts +32 -0
  33. package/dist/table/src/composables/useAutoHeight.d.ts.map +1 -0
  34. package/dist/table/src/composables/useAutoHeight.mjs +66 -0
  35. package/dist/table/src/composables/useAutoHeight.test.d.ts +2 -0
  36. package/dist/table/src/composables/useAutoHeight.test.d.ts.map +1 -0
  37. package/dist/table/src/composables/useColumnDisplay.d.ts +26 -0
  38. package/dist/table/src/composables/useColumnDisplay.d.ts.map +1 -0
  39. package/dist/table/src/composables/useColumnDisplay.mjs +46 -0
  40. package/dist/table/src/composables/useColumnDisplay.test.d.ts +2 -0
  41. package/dist/table/src/composables/useColumnDisplay.test.d.ts.map +1 -0
  42. package/dist/table/src/composables/useColumnMetrics.d.ts.map +1 -1
  43. package/dist/table/src/composables/useColumnMetrics.mjs +49 -49
  44. package/dist/table/src/composables/useColumnMetrics.test.d.ts +2 -0
  45. package/dist/table/src/composables/useColumnMetrics.test.d.ts.map +1 -0
  46. package/dist/table/src/composables/useColumnWindow.mjs +16 -16
  47. package/dist/table/src/composables/useResize.d.ts.map +1 -1
  48. package/dist/table/src/composables/useResize.mjs +37 -31
  49. package/dist/table/src/composables/useRowDragSort.d.ts +79 -0
  50. package/dist/table/src/composables/useRowDragSort.d.ts.map +1 -0
  51. package/dist/table/src/composables/useRowDragSort.mjs +146 -0
  52. package/dist/table/src/composables/useRowDragSort.test.d.ts +2 -0
  53. package/dist/table/src/composables/useRowDragSort.test.d.ts.map +1 -0
  54. package/dist/table/src/composables/useScroll.d.ts +8 -0
  55. package/dist/table/src/composables/useScroll.d.ts.map +1 -1
  56. package/dist/table/src/composables/useScroll.mjs +37 -37
  57. package/dist/table/src/composables/useVirtual.d.ts +35 -0
  58. package/dist/table/src/composables/useVirtual.d.ts.map +1 -1
  59. package/dist/table/src/composables/useVirtual.mjs +44 -16
  60. package/dist/table/src/context.d.ts +14 -0
  61. package/dist/table/src/context.d.ts.map +1 -1
  62. package/dist/table/src/index.d.ts +14 -4
  63. package/dist/table/src/index.d.ts.map +1 -1
  64. package/dist/table/src/types/column.d.ts +6 -0
  65. package/dist/table/src/types/column.d.ts.map +1 -1
  66. package/dist/table/src/types/index.d.ts +1 -1
  67. package/dist/table/src/types/index.d.ts.map +1 -1
  68. package/dist/table/src/types/table.d.ts +32 -9
  69. package/dist/table/src/types/table.d.ts.map +1 -1
  70. package/dist/table/src/utils/rowKey.d.ts +8 -0
  71. package/dist/table/src/utils/rowKey.d.ts.map +1 -0
  72. package/dist/table/src/utils/rowKey.mjs +6 -0
  73. package/dist/theme/src/presets/antdv/table.d.ts +6 -1
  74. package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
  75. package/dist/theme/src/presets/antdv/table.mjs +14 -1
  76. package/dist/theme/src/presets/element-plus/table.d.ts +6 -1
  77. package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
  78. package/dist/theme/src/presets/element-plus/table.mjs +8 -1
  79. package/package.json +1 -1
@@ -1,61 +1,66 @@
1
- import { defineComponent as Nt, inject as Ft, computed as n, provide as he, ref as H, onMounted as zt, onBeforeUnmount as Ot, watch as D, createVNode as a, Fragment as Pt, isVNode as kt } from "vue";
1
+ import { defineComponent as zt, inject as Pt, computed as a, provide as Ee, ref as S, onMounted as Wt, onBeforeUnmount as Mt, watch as b, createVNode as n, Fragment as jt, isVNode as Vt } from "vue";
2
2
  import "../../../core/src/utils/tv.mjs";
3
- import { prefixThemeConfig as At, prefixVtgClassNames as L } from "../../../core/src/utils/classPrefix.mjs";
4
- import { mergeThemeConfigs as S, useTheme as Kt } from "../../../core/src/composables/useTheme.mjs";
5
- import { mergeDeep as B } from "../../../core/src/utils/mergeDeep.mjs";
6
- import Ce from "../../../core/src/components/Scrollbar.mjs";
7
- import { VTABLE_GUILD_INJECTION_KEY as xe } from "../../../core/src/plugin/index.mjs";
8
- import { resolveTooltipThemePreset as Wt, resolveScrollbarThemePreset as _t, resolveRadioThemePreset as Mt, resolveInputThemePreset as jt, resolveCheckboxThemePreset as Vt, resolveButtonThemePreset as Ut, resolveTableThemePreset as Gt, resolveTableLocalePreset as Yt, resolveBuiltInTableLocale as Xt } from "../../../theme/src/presets/index.mjs";
9
- import { antdvTableCompatClasses as $t } from "../../../theme/src/compat/antdv-table.mjs";
10
- import { getEllipsisConfig as Jt } from "../utils/cell.mjs";
11
- import { getRootCompatClass as qt } from "../utils/compat.mjs";
12
- import { useScroll as Qt } from "../composables/useScroll.mjs";
13
- import { useColumnMetrics as Zt } from "../composables/useColumnMetrics.mjs";
14
- import { resolveFixedColumnRanges as el } from "../composables/useColumnWindow.mjs";
15
- import { useExpand as tl } from "../composables/useExpand.mjs";
16
- import { useResize as ll } from "../composables/useResize.mjs";
17
- import { useVirtual as ol } from "../composables/useVirtual.mjs";
18
- import { useTreeData as nl } from "../composables/useTreeData.mjs";
19
- import { useHoverState as al } from "../composables/useHoverState.mjs";
20
- import { TABLE_CONTEXT_KEY as rl } from "../context.mjs";
21
- import { EXPAND_COLUMN as dl, SELECTION_COLUMN as il } from "../constants.mjs";
22
- import { resolveTablePresetConfig as sl } from "../preset-config.mjs";
23
- import ge from "./TableHeader.mjs";
24
- import Se from "./TableBody.mjs";
25
- import ul from "./VirtualTableBody.mjs";
26
- import be from "./TableLoading.mjs";
27
- import N from "./ColGroup.mjs";
28
- import { antdvTableTheme as cl } from "../../../theme/src/presets/antdv/table.mjs";
29
- import { useColumns as Re } from "../composables/useColumns.mjs";
30
- import { useSorter as fl } from "../composables/useSorter.mjs";
31
- import { useFilter as ml } from "../composables/useFilter.mjs";
32
- import { useSelection as pl } from "../composables/useSelection.mjs";
33
- import { cn as C } from "tailwind-variants";
34
- function De(l) {
35
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !kt(l);
3
+ import { prefixThemeConfig as Yt, prefixVtgClassNames as A } from "../../../core/src/utils/classPrefix.mjs";
4
+ import { devWarn as $t } from "../../../core/src/utils/devWarn.mjs";
5
+ import { mergeThemeConfigs as D, useTheme as Ut } from "../../../core/src/composables/useTheme.mjs";
6
+ import { mergeDeep as F } from "../../../core/src/utils/mergeDeep.mjs";
7
+ import Ie from "../../../core/src/components/Scrollbar.mjs";
8
+ import { VTABLE_GUILD_INJECTION_KEY as Te } from "../../../core/src/plugin/index.mjs";
9
+ import { resolveTooltipThemePreset as Gt, resolveScrollbarThemePreset as Xt, resolveRadioThemePreset as Jt, resolveInputThemePreset as qt, resolveCheckboxThemePreset as Qt, resolveButtonThemePreset as Zt, resolveTableThemePreset as el, resolveTableLocalePreset as tl, resolveBuiltInTableLocale as ll } from "../../../theme/src/presets/index.mjs";
10
+ import { antdvTableCompatClasses as ol } from "../../../theme/src/compat/antdv-table.mjs";
11
+ import { filterVisibleColumns as al, applyColumnOrder as nl } from "../composables/useColumnDisplay.mjs";
12
+ import { getEllipsisConfig as rl } from "../utils/cell.mjs";
13
+ import { getRootCompatClass as dl } from "../utils/compat.mjs";
14
+ import { resolveRowKey as il } from "../utils/rowKey.mjs";
15
+ import { useScroll as sl } from "../composables/useScroll.mjs";
16
+ import { useAutoHeight as ul } from "../composables/useAutoHeight.mjs";
17
+ import { useColumnMetrics as cl } from "../composables/useColumnMetrics.mjs";
18
+ import { resolveFixedColumnRanges as fl } from "../composables/useColumnWindow.mjs";
19
+ import { useExpand as ml } from "../composables/useExpand.mjs";
20
+ import { useResize as pl } from "../composables/useResize.mjs";
21
+ import { useVirtual as vl, INVALID_SCROLL_Y_FALLBACK as wl } from "../composables/useVirtual.mjs";
22
+ import { useTreeData as yl } from "../composables/useTreeData.mjs";
23
+ import { useHoverState as hl } from "../composables/useHoverState.mjs";
24
+ import { useRowDragSort as gl } from "../composables/useRowDragSort.mjs";
25
+ import { TABLE_CONTEXT_KEY as Cl } from "../context.mjs";
26
+ import { EXPAND_COLUMN as xl, SELECTION_COLUMN as Sl } from "../constants.mjs";
27
+ import { resolveTablePresetConfig as bl } from "../preset-config.mjs";
28
+ import He from "./TableHeader.mjs";
29
+ import Be from "./TableBody.mjs";
30
+ import Dl from "./VirtualTableBody.mjs";
31
+ import Le from "./TableLoading.mjs";
32
+ import O from "./ColGroup.mjs";
33
+ import { antdvTableTheme as Rl } from "../../../theme/src/presets/antdv/table.mjs";
34
+ import { useColumns as Ne } from "../composables/useColumns.mjs";
35
+ import { useSorter as El } from "../composables/useSorter.mjs";
36
+ import { useFilter as Il } from "../composables/useFilter.mjs";
37
+ import { useSelection as Tl } from "../composables/useSelection.mjs";
38
+ import { cn as h } from "tailwind-variants";
39
+ function Ae(l) {
40
+ return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !Vt(l);
36
41
  }
37
- const vl = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
38
- function Ee() {
42
+ const Hl = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
43
+ function Fe() {
39
44
  if (typeof window > "u")
40
45
  return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
41
- const l = window.innerWidth, d = /* @__PURE__ */ new Set();
42
- return vl.forEach(([s, r]) => {
46
+ const l = window.innerWidth, i = /* @__PURE__ */ new Set();
47
+ return Hl.forEach(([s, r]) => {
43
48
  if (s === "xs") {
44
- l < 576 && d.add("xs");
49
+ l < 576 && i.add("xs");
45
50
  return;
46
51
  }
47
- l >= r && d.add(s);
48
- }), d;
52
+ l >= r && i.add(s);
53
+ }), i;
49
54
  }
50
- function Ie(l, d) {
55
+ function Oe(l, i) {
51
56
  return l.reduce((s, r) => {
52
57
  if (typeof r == "symbol")
53
58
  return s.push(r), s;
54
- if (r.responsive?.length && !r.responsive.some((m) => d.has(m)))
59
+ if (r.responsive?.length && !r.responsive.some((m) => i.has(m)))
55
60
  return s;
56
61
  const w = r.fixed === !0 ? "left" : r.fixed;
57
62
  if ("children" in r && Array.isArray(r.children)) {
58
- const m = Ie(r.children, d);
63
+ const m = Oe(r.children, i);
59
64
  return m.length === 0 || s.push({
60
65
  ...r,
61
66
  fixed: w,
@@ -68,7 +73,7 @@ function Ie(l, d) {
68
73
  }), s;
69
74
  }, []);
70
75
  }
71
- const Jl = /* @__PURE__ */ Nt({
76
+ const wo = /* @__PURE__ */ zt({
72
77
  name: "VTable",
73
78
  props: {
74
79
  dataSource: {
@@ -79,6 +84,10 @@ const Jl = /* @__PURE__ */ Nt({
79
84
  type: Array,
80
85
  default: () => []
81
86
  },
87
+ columnOrder: {
88
+ type: Array,
89
+ default: void 0
90
+ },
82
91
  rowKey: {
83
92
  type: [String, Function],
84
93
  default: "key"
@@ -103,6 +112,10 @@ const Jl = /* @__PURE__ */ Nt({
103
112
  type: Boolean,
104
113
  default: !0
105
114
  },
115
+ rowDraggable: {
116
+ type: Boolean,
117
+ default: !1
118
+ },
106
119
  tableLayout: {
107
120
  type: String,
108
121
  default: void 0
@@ -251,27 +264,28 @@ const Jl = /* @__PURE__ */ Nt({
251
264
  }
252
265
  },
253
266
  emits: {
254
- change: (l, d, s) => !0,
255
- resizeColumn: (l, d) => !0
267
+ change: (l, i, s) => !0,
268
+ resizeColumn: (l, i) => !0,
269
+ rowDragEnd: (l, i) => !0
256
270
  },
257
271
  slots: Object,
258
272
  setup(l, {
259
- slots: d,
273
+ slots: i,
260
274
  emit: s
261
275
  }) {
262
- const r = Ft(xe, null), w = n(() => r?.themePreset ?? "antdv"), m = n(() => r?.cssMode ?? "prebuilt"), x = n(() => r?.classPrefix ?? "vtg"), Te = n(() => {
263
- const t = r?.theme ?? {}, o = w.value, i = (u) => At(u, m.value, x.value);
276
+ const r = Pt(Te, null), w = a(() => r?.themePreset ?? "antdv"), m = a(() => r?.cssMode ?? "prebuilt"), g = a(() => r?.classPrefix ?? "vtg"), Ke = a(() => {
277
+ const t = r?.theme ?? {}, o = w.value, d = (u) => Yt(u, m.value, g.value);
264
278
  return {
265
279
  ...t,
266
- button: S(i(Ut(o)), t.button),
267
- checkbox: S(i(Vt(o)), t.checkbox),
268
- input: S(i(jt(o)), t.input),
269
- radio: S(i(Mt(o)), t.radio),
270
- scrollbar: S(i(_t(o)), t.scrollbar),
271
- tooltip: S(i(Wt(o)), t.tooltip)
280
+ button: D(d(Zt(o)), t.button),
281
+ checkbox: D(d(Qt(o)), t.checkbox),
282
+ input: D(d(qt(o)), t.input),
283
+ radio: D(d(Jt(o)), t.radio),
284
+ scrollbar: D(d(Xt(o)), t.scrollbar),
285
+ tooltip: D(d(Gt(o)), t.tooltip)
272
286
  };
273
287
  });
274
- he(xe, {
288
+ Ee(Te, {
275
289
  get themePreset() {
276
290
  return w.value;
277
291
  },
@@ -279,10 +293,10 @@ const Jl = /* @__PURE__ */ Nt({
279
293
  return m.value;
280
294
  },
281
295
  get classPrefix() {
282
- return x.value;
296
+ return g.value;
283
297
  },
284
298
  get theme() {
285
- return Te.value;
299
+ return Ke.value;
286
300
  },
287
301
  get locale() {
288
302
  return r?.locale ?? "zh-CN";
@@ -294,189 +308,221 @@ const Jl = /* @__PURE__ */ Nt({
294
308
  return r?.localeOverrides ?? {};
295
309
  }
296
310
  });
297
- const He = n(() => Gt(w.value) ?? cl), {
311
+ const ke = a(() => el(w.value) ?? Rl), {
298
312
  slots: e
299
- } = Kt("table", He, l, {
300
- compatClasses: $t
301
- }), b = r?.compatClass === !0 ? (t) => `ant-table-${t}` : void 0, F = n(() => l.locale ?? r?.locale ?? "zh-CN"), Le = n(() => ({
313
+ } = Ut("table", ke, l, {
314
+ compatClasses: ol
315
+ }), R = r?.compatClass === !0 ? (t) => `ant-table-${t}` : void 0, K = a(() => l.locale ?? r?.locale ?? "zh-CN"), _e = a(() => ({
302
316
  ...r?.locales ?? {},
303
317
  ...l.locales ?? {}
304
- })), Be = n(() => {
305
- const t = Yt(w.value), o = Xt(w.value, F.value), i = Le.value[F.value]?.table, u = B(B(t, o), i);
306
- return B(u, B(r?.localeOverrides?.table ?? {}, l.localeOverrides));
307
- }), G = H(Ee());
308
- function z() {
309
- G.value = Ee();
318
+ })), ze = a(() => {
319
+ const t = tl(w.value), o = ll(w.value, K.value), d = _e.value[K.value]?.table, u = F(F(t, o), d);
320
+ return F(u, F(r?.localeOverrides?.table ?? {}, l.localeOverrides));
321
+ }), q = S(Fe());
322
+ function k() {
323
+ q.value = Fe();
310
324
  }
311
- zt(() => {
312
- z(), window.addEventListener("resize", z);
313
- }), Ot(() => {
314
- window.removeEventListener("resize", z);
325
+ Wt(() => {
326
+ k(), window.addEventListener("resize", k);
327
+ }), Mt(() => {
328
+ window.removeEventListener("resize", k);
315
329
  });
316
- const Y = n(() => Ie(l.columns, G.value)), g = n(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
317
- leafColumns: E
318
- } = Re(() => Y.value), {
319
- getSortOrder: O,
320
- toggleSortOrder: Ne,
321
- sortData: Fe,
322
- sorterState: ze,
323
- sorterResult: X,
324
- sortColumns: Oe
325
- } = fl({
326
- columns: () => E.value,
330
+ const Q = a(() => Oe(l.columns, q.value)), C = a(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
331
+ leafColumns: L
332
+ } = Ne(() => Q.value), {
333
+ getSortOrder: _,
334
+ toggleSortOrder: Pe,
335
+ sortData: We,
336
+ sorterState: Me,
337
+ sorterResult: Z,
338
+ sortColumns: je
339
+ } = El({
340
+ columns: () => L.value,
327
341
  tableSortDirections: () => l.sortDirections,
328
342
  onSorterChange(t) {
329
- const o = k();
330
- s("change", P(), t, {
343
+ const o = P();
344
+ s("change", z(), t, {
331
345
  action: "sort",
332
346
  currentDataSource: o
333
347
  });
334
348
  }
335
349
  }), {
336
- getFilteredValue: Pe,
337
- confirmFilter: ke,
338
- resetFilter: Ae,
339
- getAllFilters: P,
340
- filterData: Ke
341
- } = ml({
342
- columns: () => E.value,
350
+ getFilteredValue: Ve,
351
+ confirmFilter: Ye,
352
+ resetFilter: $e,
353
+ getAllFilters: z,
354
+ filterData: Ue
355
+ } = Il({
356
+ columns: () => L.value,
343
357
  onFilterChange(t) {
344
- const o = k();
345
- s("change", t, X.value, {
358
+ const o = P();
359
+ s("change", t, Z.value, {
346
360
  action: "filter",
347
361
  currentDataSource: o
348
362
  });
349
363
  }
350
364
  });
351
- function k() {
365
+ function P() {
352
366
  let t = l.dataSource;
353
- return t = Ke(t), t = Fe(t), t;
367
+ return t = Ue(t), t = We(t), t;
354
368
  }
355
- const A = n(() => k());
356
- function I(t, o) {
357
- return typeof l.rowKey == "function" ? l.rowKey(t) : typeof l.rowKey == "string" && l.rowKey in t ? t[l.rowKey] : o;
369
+ const W = a(() => P());
370
+ function E(t, o) {
371
+ const d = il(t, o, l.rowKey);
372
+ return l.rowKey === void 0 || typeof l.rowKey == "string" && l.rowKey in t, d;
358
373
  }
359
374
  const {
360
- flattenData: $,
361
- rowMetaMap: J,
362
- isTreeData: K,
363
- toggleTreeExpand: We,
364
- isTreeExpanded: _e,
365
- indentSize: Me
366
- } = nl({
367
- data: () => A.value,
375
+ flattenData: ee,
376
+ rowMetaMap: te,
377
+ isTreeData: M,
378
+ toggleTreeExpand: Ge,
379
+ isTreeExpanded: Xe,
380
+ indentSize: Je
381
+ } = yl({
382
+ data: () => W.value,
368
383
  childrenColumnName: () => l.childrenColumnName,
369
384
  indentSize: () => l.indentSize,
370
- getRowKey: I,
385
+ getRowKey: E,
371
386
  defaultExpandedRowKeys: () => l.defaultExpandedRowKeys,
372
387
  expandedRowKeys: () => l.expandedRowKeys,
373
388
  defaultExpandAllRows: () => l.defaultExpandAllRows,
374
389
  onExpand: l.onExpand,
375
390
  onExpandedRowsChange: l.onExpandedRowsChange
376
391
  }), {
377
- hoverRange: je,
378
- setHoverRange: Ve,
379
- clearHoverRange: Ue
380
- } = al(100), y = n(() => K.value ? $.value.map((t) => t.record) : A.value), {
381
- isSelected: Ge,
382
- isDisabled: Ye,
383
- getSelectionState: Xe,
384
- toggleRow: $e,
385
- toggleAll: Je,
386
- allCheckedState: qe,
387
- invertSelection: Qe,
388
- clearSelection: Ze,
389
- getChangeableRowKeys: et
390
- } = pl({
392
+ hoverRange: qe,
393
+ setHoverRange: Qe,
394
+ clearHoverRange: Ze
395
+ } = hl(100), N = gl({
396
+ enabled: () => l.rowDraggable === !0,
397
+ getRowKey: E,
398
+ dataSource: () => l.dataSource,
399
+ childrenColumnName: () => l.childrenColumnName,
400
+ onDrop(t, o) {
401
+ s("rowDragEnd", t, o);
402
+ }
403
+ }), p = a(() => M.value ? ee.value.map((t) => t.record) : W.value), {
404
+ isSelected: et,
405
+ isDisabled: tt,
406
+ getSelectionState: lt,
407
+ toggleRow: ot,
408
+ toggleAll: at,
409
+ allCheckedState: nt,
410
+ invertSelection: rt,
411
+ clearSelection: dt,
412
+ getChangeableRowKeys: it
413
+ } = Tl({
391
414
  rowSelection: () => l.rowSelection,
392
- getRowKey: I,
393
- data: () => A.value,
394
- visibleData: () => y.value,
415
+ getRowKey: E,
416
+ data: () => W.value,
417
+ visibleData: () => p.value,
395
418
  childrenColumnName: () => l.childrenColumnName,
396
419
  onSelectionChange() {
397
- s("change", P(), X.value, {
420
+ s("change", z(), Z.value, {
398
421
  action: "select",
399
- currentDataSource: y.value
422
+ currentDataSource: p.value
400
423
  });
401
424
  }
402
425
  }), {
403
- isExpanded: tt,
404
- toggleExpand: lt
405
- } = tl({
426
+ isExpanded: st,
427
+ toggleExpand: ut
428
+ } = ml({
406
429
  expandable: () => l.expandable,
407
- getRowKey: I,
408
- data: () => y.value
409
- }), q = (t) => {
430
+ getRowKey: E,
431
+ data: () => p.value
432
+ }), le = (t) => {
410
433
  const o = l.expandable;
411
434
  return o ? o.rowExpandable ? o.rowExpandable(t) : !!o.expandedRowRender : !1;
412
- }, ot = (t, o) => {
413
- q(t) && lt(t, o);
414
- }, nt = "__vtg_selection__", at = "__vtg_expand__", rt = n(() => {
415
- const t = l.expandable, o = l.rowSelection, i = t && t.showExpandColumn !== !1 ? {
416
- key: at,
435
+ }, ct = (t, o) => {
436
+ le(t) && ut(t, o);
437
+ }, oe = "__vtg_selection__", ae = "__vtg_expand__", ft = a(() => {
438
+ const t = l.expandable, o = l.rowSelection, d = t && t.showExpandColumn !== !1 ? {
439
+ key: ae,
417
440
  title: "",
418
441
  width: t.columnWidth ?? 48,
419
442
  align: "center",
420
443
  fixed: t.fixed === !0 ? "left" : t.fixed
421
444
  } : null, u = o ? {
422
- key: nt,
445
+ key: oe,
423
446
  title: "",
424
447
  width: o.columnWidth ?? 48,
425
448
  align: "center",
426
449
  fixed: o.fixed === !0 ? "left" : o.fixed || void 0
427
- } : null, h = [];
428
- let p = !1, v = !1;
429
- for (const c of Y.value) {
430
- if (c === dl) {
431
- i && !p && (h.push(i), p = !0);
450
+ } : null, x = al(Q.value), y = [];
451
+ let v = !1, c = !1;
452
+ for (const B of x) {
453
+ if (B === xl) {
454
+ d && !v && (y.push(d), v = !0);
432
455
  continue;
433
456
  }
434
- if (c === il) {
435
- u && !v && (h.push(u), v = !0);
457
+ if (B === Sl) {
458
+ u && !c && (y.push(u), c = !0);
436
459
  continue;
437
460
  }
438
- h.push(c);
461
+ y.push(B);
439
462
  }
440
- return i && !p && h.unshift(i), u && !v && h.unshift(u), h;
463
+ return d && !v && y.unshift(d), u && !c && y.unshift(u), nl(y, l.columnOrder, [oe, ae]);
441
464
  }), {
442
465
  leafColumns: f,
443
- headerRows: W
444
- } = Re(() => rt.value), dt = n(() => W.value.length > 1), {
445
- headerWrapRef: Q,
446
- bodyWrapRef: Z,
447
- scrollState: ee,
448
- handleBodyScroll: te,
449
- fixedOffsets: le,
450
- syncHorizontalScroll: it
451
- } = Qt({
452
- displayColumns: () => f.value
453
- }), oe = n(() => qt({
454
- compatClass: b,
455
- fixedOffsets: le,
456
- scrollState: ee,
457
- empty: y.value.length === 0,
466
+ headerRows: j
467
+ } = Ne(() => ft.value), mt = a(() => j.value.length > 1), {
468
+ columnWidths: V,
469
+ startResize: pt,
470
+ isResizing: vt
471
+ } = pl({
472
+ onResizeColumn(t, o) {
473
+ s("resizeColumn", t, o);
474
+ }
475
+ }), {
476
+ headerWrapRef: Y,
477
+ bodyWrapRef: ne,
478
+ scrollState: re,
479
+ handleBodyScroll: de,
480
+ fixedOffsets: ie,
481
+ syncHorizontalScroll: wt
482
+ } = sl({
483
+ displayColumns: () => f.value,
484
+ columnWidths: V
485
+ }), se = a(() => dl({
486
+ compatClass: R,
487
+ fixedOffsets: ie,
488
+ scrollState: re,
489
+ empty: p.value.length === 0,
458
490
  fixedHeader: l.scroll?.y !== void 0,
459
- fixedColumn: ae.value && ne.value,
460
- horizontalScroll: ae.value,
461
- layoutFixed: _.value === "fixed"
462
- })), st = n(() => l.showHeader !== !1 && (!!l.scroll?.y || !!l.sticky)), ne = n(() => f.value.some((t) => t.fixed === "left" || t.fixed === "right")), ae = n(() => l.scroll?.x !== void 0 || !!l.expandable?.fixed), ut = n(() => E.value.some((t) => Jt(t).enabled)), _ = n(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || ne.value || ut.value ? "fixed" : "auto"), ct = n(() => {
463
- if (g.value)
491
+ fixedColumn: ce.value && ue.value,
492
+ horizontalScroll: ce.value,
493
+ layoutFixed: $.value === "fixed"
494
+ })), I = a(() => l.scroll?.y === "auto"), yt = a(() => I.value || l.showHeader !== !1 && (!!l.scroll?.y || !!l.sticky)), ue = a(() => f.value.some((t) => t.fixed === "left" || t.fixed === "right")), ce = a(() => l.scroll?.x !== void 0 || !!l.expandable?.fixed), ht = a(() => L.value.some((t) => rl(t).enabled)), $ = a(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || ue.value || ht.value ? "fixed" : "auto"), gt = a(() => {
495
+ if (C.value)
464
496
  return {
465
497
  position: "sticky",
466
- top: `${g.value.offsetHeader ?? 0}px`,
498
+ top: `${C.value.offsetHeader ?? 0}px`,
467
499
  zIndex: "4"
468
500
  };
501
+ }), fe = S(null), me = S(null), {
502
+ bodyHeight: pe
503
+ } = ul({
504
+ enabled: () => I.value,
505
+ wrapperEl: () => fe.value,
506
+ headerEl: () => Y.value,
507
+ summaryEl: () => me.value,
508
+ hasData: () => p.value.length > 0
509
+ }), Ct = a(() => {
510
+ const t = l.scroll?.y;
511
+ if (t !== void 0)
512
+ return I.value ? pe.value : typeof t == "number" ? Number.isFinite(t) && t > 0 ? t : void 0 : t;
469
513
  }), {
470
514
  enabled: T,
471
- itemHeight: ft,
472
- listHeight: mt,
473
- fixedHeight: pt
474
- } = ol({
515
+ itemHeight: xt,
516
+ listHeight: St,
517
+ fixedHeight: bt,
518
+ resolvedScrollY: Dt
519
+ } = vl({
475
520
  virtual: () => l.virtual,
476
521
  scrollY: () => l.scroll?.y,
477
522
  size: () => l.size,
478
- rowHeight: () => l.rowHeight
479
- }), re = n(() => E.value.some((t) => !!t.customCell || !!t.customRender)), M = n(() => !dt.value || l.bordered ? {
523
+ rowHeight: () => l.rowHeight,
524
+ measuredHeight: () => pe.value
525
+ }), ve = a(() => L.value.some((t) => !!t.customCell || !!t.customRender)), U = a(() => !mt.value || l.bordered ? {
480
526
  table: "",
481
527
  th: "",
482
528
  td: ""
@@ -484,74 +530,72 @@ const Jl = /* @__PURE__ */ Nt({
484
530
  table: e.groupedHeaderTable(),
485
531
  th: e.groupedHeaderTh(),
486
532
  td: e.groupedHeaderTd()
487
- }), R = n(() => C(e.table(), M.value.table) ?? ""), de = n(() => C(e.th(), M.value.th) ?? ""), j = n(() => C(e.td(), M.value.td) ?? "");
488
- D([T, re], ([t, o]) => {
533
+ }), H = a(() => h(e.table(), U.value.table) ?? ""), we = a(() => h(e.th(), U.value.th) ?? ""), G = a(() => h(e.td(), U.value.td) ?? "");
534
+ b([T, ve], ([t, o]) => {
535
+ }, {
536
+ immediate: !0
537
+ }), b([() => l.virtual, Dt], ([t, o]) => {
538
+ if (!t) return;
539
+ const d = String(l.scroll?.y);
540
+ o.kind === "compat-px" ? $t("vtable-scroll-y-compat-px", `[VTable] virtual 模式下字符串 scroll.y(${d})按 ${o.value}px 解析,这是兼容行为;请改用数字或 'auto'。`) : o.kind === "invalid-string" || o.kind === "invalid-number" && l.scroll?.y && `${wl}`;
489
541
  }, {
490
542
  immediate: !0
491
543
  });
492
- const ie = H(null), se = H(null);
493
- D(() => ie.value?.wrapRef, (t) => {
494
- t && (Z.value = t);
495
- }), D(() => se.value?.wrapRef, (t) => {
496
- t && (Z.value = t);
544
+ const ye = S(null), he = S(null);
545
+ b(() => ye.value?.wrapRef, (t) => {
546
+ t && (ne.value = t);
547
+ }), b(() => he.value?.wrapRef, (t) => {
548
+ t && (ne.value = t);
497
549
  });
498
- const {
499
- columnWidths: ue,
500
- startResize: vt,
501
- isResizing: wt
502
- } = ll({
503
- onResizeColumn(t, o) {
504
- s("resizeColumn", t, o);
505
- }
506
- }), yt = n(() => el(f.value)), ce = n(() => l.virtualColumn ? T.value ? re.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : yt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), V = n(() => l.virtualColumn && ce.value === null);
507
- D(ce, (t) => {
550
+ const Rt = a(() => fl(f.value)), ge = a(() => l.virtualColumn ? T.value ? ve.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : Rt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), X = a(() => l.virtualColumn && ge.value === null);
551
+ b(ge, (t) => {
508
552
  }, {
509
553
  immediate: !0
510
554
  });
511
555
  const {
512
- metrics: fe
513
- } = Zt({
514
- enabled: () => V.value,
515
- headerEl: () => Q.value,
556
+ metrics: Ce
557
+ } = cl({
558
+ enabled: () => X.value,
559
+ headerEl: () => Y.value,
516
560
  columns: () => f.value,
517
- columnWidths: ue,
561
+ columnWidths: V,
518
562
  hasHeader: () => l.showHeader !== !1
519
563
  });
520
- D([V, fe], ([t, o]) => {
564
+ b([X, Ce], ([t, o]) => {
521
565
  !t || o || l.showHeader;
522
566
  }, {
523
567
  immediate: !0
524
568
  });
525
- function ht(t) {
526
- return K.value ? J.value.get(t)?.level ?? 0 : 0;
569
+ function Et(t) {
570
+ return M.value ? te.value.get(t)?.level ?? 0 : 0;
527
571
  }
528
- function Ct(t, o) {
529
- return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(t, o, ht(t)) : l.rowClassName : "";
572
+ function It(t, o) {
573
+ return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(t, o, Et(t)) : l.rowClassName : "";
530
574
  }
531
- function xt(t, o) {
575
+ function Tt(t, o) {
532
576
  return l.customRow?.(t, o);
533
577
  }
534
- function gt(t, o) {
578
+ function Ht(t, o) {
535
579
  return l.customHeaderRow?.(t, o);
536
580
  }
537
- function St(t) {
581
+ function Bt(t) {
538
582
  if (typeof t.title != "function")
539
583
  return t.title ?? "";
540
- const o = t, i = Oe.value.filter((u) => !!u.column);
584
+ const o = t, d = je.value.filter((u) => !!u.column);
541
585
  return t.title({
542
- sortOrder: o.sorter ? O(o) ?? void 0 : void 0,
543
- sortColumn: ze.value.column,
544
- sortColumns: i.length > 0 ? i : void 0,
545
- filters: P()
586
+ sortOrder: o.sorter ? _(o) ?? void 0 : void 0,
587
+ sortColumn: Me.value.column,
588
+ sortColumns: d.length > 0 ? d : void 0,
589
+ filters: z()
546
590
  });
547
591
  }
548
- function bt(t) {
549
- return !!(t.sorter && O(t));
592
+ function Lt(t) {
593
+ return !!(t.sorter && _(t));
550
594
  }
551
- const me = {
595
+ const xe = {
552
596
  width: "100%",
553
597
  minWidth: "100%"
554
- }, Rt = {
598
+ }, Nt = {
555
599
  thSortable: e.thSortable,
556
600
  thSorted: e.thSorted,
557
601
  tdSorted: e.tdSorted,
@@ -627,224 +671,236 @@ const Jl = /* @__PURE__ */ Nt({
627
671
  expandedRowCell: e.expandedRowCell,
628
672
  resizeHandle: e.resizeHandle,
629
673
  tdRowHover: e.tdRowHover,
630
- tdRowSelectedHover: e.tdRowSelectedHover
631
- }, pe = n(() => sl(w.value)), ve = H(!1);
632
- return he(rl, {
633
- bodyCell: d.bodyCell,
634
- headerCell: d.headerCell,
635
- empty: d.empty,
636
- getSortOrder: O,
637
- toggleSortOrder: Ne,
638
- isColumnSorted: bt,
639
- getFilteredValue: Pe,
640
- confirmFilter: ke,
641
- resetFilter: Ae,
642
- customFilterDropdown: d.customFilterDropdown,
643
- customFilterIcon: d.customFilterIcon,
644
- showSorterTooltip: n(() => l.showSorterTooltip ?? pe.value.showSorterTooltip),
645
- headerEllipsis: n(() => l.headerEllipsis),
646
- subThemeSlots: Rt,
647
- presetConfig: pe,
674
+ tdRowSelectedHover: e.tdRowSelectedHover,
675
+ trDragging: e.trDragging,
676
+ trDropAbove: e.trDropAbove,
677
+ trDropBelow: e.trDropBelow
678
+ }, Se = a(() => bl(w.value)), be = S(!1);
679
+ return Ee(Cl, {
680
+ bodyCell: i.bodyCell,
681
+ headerCell: i.headerCell,
682
+ empty: i.empty,
683
+ getSortOrder: _,
684
+ toggleSortOrder: Pe,
685
+ isColumnSorted: Lt,
686
+ getFilteredValue: Ve,
687
+ confirmFilter: Ye,
688
+ resetFilter: $e,
689
+ customFilterDropdown: i.customFilterDropdown,
690
+ customFilterIcon: i.customFilterIcon,
691
+ showSorterTooltip: a(() => l.showSorterTooltip ?? Se.value.showSorterTooltip),
692
+ headerEllipsis: a(() => l.headerEllipsis),
693
+ subThemeSlots: Nt,
694
+ presetConfig: Se,
648
695
  themePreset: w,
649
696
  cssMode: m,
650
- classPrefix: x,
651
- vtgClass: (t) => L(t, m.value, x.value),
652
- compatClass: b,
653
- localeName: F,
654
- locale: Be,
697
+ classPrefix: g,
698
+ vtgClass: (t) => A(t, m.value, g.value),
699
+ compatClass: R,
700
+ localeName: K,
701
+ locale: ze,
655
702
  rowSelection: () => l.rowSelection,
656
- isSelected: Ge,
657
- isDisabledRow: Ye,
658
- getSelectionState: Xe,
659
- toggleRow: $e,
660
- toggleAll: Je,
661
- allCheckedState: () => qe.value,
662
- getRowKey: I,
663
- invertSelection: Qe,
664
- clearSelection: Ze,
665
- getChangeableRowKeys: et,
666
- fixedOffsets: le,
667
- scrollState: ee,
668
- leafColumnCount: n(() => f.value.length),
669
- bordered: n(() => l.bordered),
670
- tableLayout: _,
671
- sticky: n(() => l.sticky),
672
- getRowProps: xt,
673
- getRowClassName: Ct,
674
- getHeaderRowProps: gt,
675
- getColumnTitle: St,
703
+ isSelected: et,
704
+ isDisabledRow: tt,
705
+ getSelectionState: lt,
706
+ toggleRow: ot,
707
+ toggleAll: at,
708
+ allCheckedState: () => nt.value,
709
+ getRowKey: E,
710
+ invertSelection: rt,
711
+ clearSelection: dt,
712
+ getChangeableRowKeys: it,
713
+ fixedOffsets: ie,
714
+ scrollState: re,
715
+ leafColumnCount: a(() => f.value.length),
716
+ bordered: a(() => l.bordered),
717
+ tableLayout: $,
718
+ sticky: a(() => l.sticky),
719
+ getRowProps: Tt,
720
+ getRowClassName: It,
721
+ getHeaderRowProps: Ht,
722
+ getColumnTitle: Bt,
676
723
  getPopupContainer: l.getPopupContainer,
677
724
  transformCellText: l.transformCellText,
678
725
  expandable: () => l.expandable,
679
- isExpanded: tt,
680
- toggleExpand: ot,
681
- isRowExpandable: q,
682
- columnWidths: ue,
683
- startResize: vt,
684
- isResizing: () => wt.value,
685
- displayColumns: n(() => f.value),
726
+ isExpanded: st,
727
+ toggleExpand: ct,
728
+ isRowExpandable: le,
729
+ columnWidths: V,
730
+ startResize: pt,
731
+ isResizing: () => vt.value,
732
+ displayColumns: a(() => f.value),
686
733
  registerSummaryFixed: (t) => {
687
- ve.value = t;
734
+ be.value = t;
688
735
  },
689
- isTreeData: K,
690
- treeFlattenData: $,
691
- getFlattenRow: (t) => J.value.get(t),
692
- toggleTreeExpand: We,
693
- isTreeExpanded: _e,
694
- treeIndentSize: Me,
695
- hoverRange: je,
696
- setHoverRange: Ve,
697
- clearHoverRange: Ue,
698
- hoverable: n(() => l.hoverable !== !1)
736
+ isTreeData: M,
737
+ treeFlattenData: ee,
738
+ getFlattenRow: (t) => te.value.get(t),
739
+ toggleTreeExpand: Ge,
740
+ isTreeExpanded: Xe,
741
+ treeIndentSize: Je,
742
+ hoverRange: qe,
743
+ setHoverRange: Qe,
744
+ clearHoverRange: Ze,
745
+ // 拖拽期间抑制 hover 高亮,避免干扰拖放指示线
746
+ hoverable: a(() => l.hoverable !== !1 && N.draggingKey.value === null),
747
+ rowDrag: {
748
+ enabled: a(() => l.rowDraggable === !0),
749
+ draggingKey: N.draggingKey,
750
+ dropTarget: N.dropTarget,
751
+ getBindings: (t, o, d) => N.getBindings(t, o, d)
752
+ }
699
753
  }), () => {
700
754
  let t;
701
- const o = l.title ? l.title(y.value) : d.title ? d.title({
702
- data: y.value
703
- }) : null, i = l.footer ? l.footer(y.value) : d.footer ? d.footer({
704
- data: y.value
705
- }) : null, u = d.summary ? d.summary() : null, h = ve.value !== !1, p = l.scroll, v = {
706
- tableLayout: _.value
755
+ const o = l.title ? l.title(p.value) : i.title ? i.title({
756
+ data: p.value
757
+ }) : null, d = l.footer ? l.footer(p.value) : i.footer ? i.footer({
758
+ data: p.value
759
+ }) : null, u = i.summary ? i.summary() : null, x = be.value !== !1, y = l.scroll, v = {
760
+ tableLayout: $.value
707
761
  };
708
- p?.x ? (v.width = typeof p.x == "number" ? `${p.x}px` : p.x, v.minWidth = "100%") : v.width = "100%";
709
- const c = l.loading, Dt = c === !0 || typeof c == "object" && c !== null && c.spinning !== !1, Et = typeof c == "object" && c !== null ? c.indicator : void 0, It = typeof c == "object" && c !== null ? c.tip : void 0, we = Dt && (d.loading ? a(be, {
762
+ y?.x ? (v.width = typeof y.x == "number" ? `${y.x}px` : y.x, v.minWidth = "100%") : v.width = "100%";
763
+ const c = l.loading, B = c === !0 || typeof c == "object" && c !== null && c.spinning !== !1, At = typeof c == "object" && c !== null ? c.indicator : void 0, Ft = typeof c == "object" && c !== null ? c.tip : void 0, De = B && (i.loading ? n(Le, {
710
764
  loadingClass: e.loading()
711
- }, De(t = d.loading()) ? t : {
765
+ }, Ae(t = i.loading()) ? t : {
712
766
  default: () => [t]
713
- }) : a(be, {
767
+ }) : n(Le, {
714
768
  loadingClass: e.loading(),
715
- indicator: Et,
716
- tip: It
769
+ indicator: At,
770
+ tip: Ft
717
771
  }, null));
718
- if (st.value) {
719
- const Tt = l.showHeader !== !1 ? a("div", {
720
- ref: Q,
721
- class: C(e.headerWrapper(), g.value && b?.("sticky-holder")),
722
- style: ct.value
723
- }, [a("div", {
724
- class: L("block w-full min-w-full", m.value, x.value)
725
- }, [a("table", {
726
- class: R.value,
772
+ if (yt.value) {
773
+ const Ot = l.showHeader !== !1 ? n("div", {
774
+ ref: Y,
775
+ class: h(e.headerWrapper(), C.value && R?.("sticky-holder")),
776
+ style: gt.value
777
+ }, [n("div", {
778
+ class: A("block w-full min-w-full", m.value, g.value)
779
+ }, [n("table", {
780
+ class: H.value,
727
781
  style: v
728
- }, [a(N, {
782
+ }, [n(O, {
729
783
  columns: f.value
730
- }, null), a(ge, {
731
- rows: W.value,
784
+ }, null), n(He, {
785
+ rows: j.value,
732
786
  theadClass: e.thead(),
733
787
  rowClass: e.tr(),
734
- thClass: de.value,
788
+ thClass: we.value,
735
789
  headerCellInnerClass: e.headerCellInner()
736
- }, null)])])]) : null, Ht = T.value ? a(ul, {
737
- dataSource: y.value,
790
+ }, null)])])]) : null, Kt = T.value ? n(Dl, {
791
+ dataSource: p.value,
738
792
  columns: f.value,
739
793
  tbodyClass: e.tbody(),
740
794
  rowClass: e.tr(),
741
- tdClass: j.value,
795
+ tdClass: G.value,
742
796
  emptyClass: e.empty(),
743
797
  bodyCellEllipsisClass: e.bodyCellEllipsis(),
744
- tableClass: R.value,
798
+ tableClass: H.value,
745
799
  tableStyle: v,
746
800
  rowKey: l.rowKey,
747
- height: mt.value,
748
- itemHeight: ft.value,
749
- fixedHeight: pt.value,
750
- virtualColumn: V.value,
751
- columnMetrics: fe.value,
801
+ height: St.value,
802
+ itemHeight: xt.value,
803
+ fixedHeight: bt.value,
804
+ virtualColumn: X.value,
805
+ columnMetrics: Ce.value,
752
806
  showScrollBar: "hover",
753
- onVirtualScroll: (ye) => {
754
- it(ye.x, ye.maxX);
807
+ onVirtualScroll: (Re) => {
808
+ wt(Re.x, Re.maxX);
755
809
  }
756
- }, null) : null, Lt = T.value ? null : a(Ce, {
757
- ref: ie,
758
- maxHeight: p?.y !== void 0 ? typeof p.y == "number" ? p.y : String(p.y) : void 0,
810
+ }, null) : null, kt = T.value ? null : n(Ie, {
811
+ ref: ye,
812
+ maxHeight: Ct.value,
759
813
  wrapClass: e.bodyWrapper(),
760
- viewStyle: me,
761
- onScroll: te
814
+ viewStyle: xe,
815
+ onScroll: de
762
816
  }, {
763
- default: () => [a("table", {
764
- class: R.value,
817
+ default: () => [n("table", {
818
+ class: H.value,
765
819
  style: v
766
- }, [a(N, {
820
+ }, [n(O, {
767
821
  columns: f.value
768
- }, null), a(Se, {
769
- dataSource: y.value,
822
+ }, null), n(Be, {
823
+ dataSource: p.value,
770
824
  columns: f.value,
771
825
  tbodyClass: e.tbody(),
772
826
  rowClass: e.tr(),
773
- tdClass: j.value,
827
+ tdClass: G.value,
774
828
  emptyClass: e.empty(),
775
829
  bodyCellEllipsisClass: e.bodyCellEllipsis(),
776
830
  rowKey: l.rowKey
777
- }, null), u && !h && a("tfoot", {
831
+ }, null), u && !x && n("tfoot", {
778
832
  class: e.summary()
779
833
  }, [u])])]
780
- }), Bt = u && h ? a("div", {
781
- class: C(e.headerWrapper(), b?.("summary"), g.value && b?.("sticky-holder")),
782
- style: {
834
+ }), _t = u && (x || T.value) ? n("div", {
835
+ ref: me,
836
+ class: h(e.headerWrapper(), R?.("summary"), C.value && x && R?.("sticky-holder")),
837
+ style: x ? {
783
838
  position: "sticky",
784
- bottom: `${g.value?.offsetSummary ?? 0}px`,
839
+ bottom: `${C.value?.offsetSummary ?? 0}px`,
785
840
  zIndex: "4",
786
841
  overflow: "hidden"
787
- }
788
- }, [a("div", {
789
- class: L("block w-full min-w-full", m.value, x.value)
790
- }, [a("table", {
791
- class: R.value,
842
+ } : void 0
843
+ }, [n("div", {
844
+ class: A("block w-full min-w-full", m.value, g.value)
845
+ }, [n("table", {
846
+ class: H.value,
792
847
  style: v
793
- }, [a(N, {
848
+ }, [n(O, {
794
849
  columns: f.value
795
- }, null), a("tfoot", {
850
+ }, null), n("tfoot", {
796
851
  class: e.summary()
797
852
  }, [u])])])]) : null;
798
- return a("div", {
799
- class: C(e.root(), oe.value)
800
- }, [o && a("div", {
853
+ return n("div", {
854
+ class: h(e.root(), I.value && e.rootAutoHeight(), se.value)
855
+ }, [o && n("div", {
801
856
  class: e.title()
802
- }, [o]), a("div", {
803
- class: C(e.wrapper(), g.value && L("overflow-clip", m.value, x.value))
804
- }, [Tt, Ht, Lt, Bt, we]), i && a("div", {
857
+ }, [o]), n("div", {
858
+ ref: fe,
859
+ class: h(e.wrapper(), I.value && e.wrapperAutoHeight(), C.value && A("overflow-clip", m.value, g.value))
860
+ }, [Ot, Kt, kt, _t, De]), d && n("div", {
805
861
  class: e.footer()
806
- }, [i])]);
862
+ }, [d])]);
807
863
  }
808
- const U = a(Pt, null, [a("table", {
809
- class: R.value,
864
+ const J = n(jt, null, [n("table", {
865
+ class: H.value,
810
866
  style: v
811
- }, [a(N, {
867
+ }, [n(O, {
812
868
  columns: f.value
813
- }, null), l.showHeader !== !1 && a(ge, {
814
- rows: W.value,
869
+ }, null), l.showHeader !== !1 && n(He, {
870
+ rows: j.value,
815
871
  theadClass: e.thead(),
816
872
  rowClass: e.tr(),
817
- thClass: de.value,
873
+ thClass: we.value,
818
874
  headerCellInnerClass: e.headerCellInner()
819
- }, null), a(Se, {
820
- dataSource: y.value,
875
+ }, null), n(Be, {
876
+ dataSource: p.value,
821
877
  columns: f.value,
822
878
  tbodyClass: e.tbody(),
823
879
  rowClass: e.tr(),
824
- tdClass: j.value,
880
+ tdClass: G.value,
825
881
  emptyClass: e.empty(),
826
882
  bodyCellEllipsisClass: e.bodyCellEllipsis(),
827
883
  rowKey: l.rowKey
828
- }, null), u && a("tfoot", {
884
+ }, null), u && n("tfoot", {
829
885
  class: e.summary()
830
- }, [u])]), we]);
831
- return a("div", {
832
- class: C(e.root(), oe.value)
833
- }, [o && a("div", {
886
+ }, [u])]), De]);
887
+ return n("div", {
888
+ class: h(e.root(), se.value)
889
+ }, [o && n("div", {
834
890
  class: e.title()
835
- }, [o]), a(Ce, {
836
- ref: se,
891
+ }, [o]), n(Ie, {
892
+ ref: he,
837
893
  wrapClass: e.wrapper(),
838
- viewStyle: me,
839
- onScroll: te
840
- }, De(U) ? U : {
841
- default: () => [U]
842
- }), i && a("div", {
894
+ viewStyle: xe,
895
+ onScroll: de
896
+ }, Ae(J) ? J : {
897
+ default: () => [J]
898
+ }), d && n("div", {
843
899
  class: e.footer()
844
- }, [i])]);
900
+ }, [d])]);
845
901
  };
846
902
  }
847
903
  });
848
904
  export {
849
- Jl as default
905
+ wo as default
850
906
  };