@vtable-guild/vtable-guild 2.9.0-alpha.2 → 2.9.0-alpha.3

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.
@@ -1,86 +1,86 @@
1
- import { defineComponent as ul, ref as S, watch as I, onBeforeUnmount as ye, computed as n, inject as sl, provide as Ge, onMounted as Xe, createVNode as r, Fragment as cl, nextTick as qe, isVNode as fl } from "vue";
2
- import { isManual as he } from "../utils/manual.mjs";
1
+ import { defineComponent as sl, ref as D, watch as L, onBeforeUnmount as he, computed as n, inject as cl, provide as Xe, onMounted as qe, shallowReactive as fl, onBeforeUpdate as ml, createVNode as r, Fragment as pl, nextTick as Je, isVNode as vl } from "vue";
2
+ import { isManual as we } from "../utils/manual.mjs";
3
3
  import "../../../core/src/utils/tv.mjs";
4
- import { prefixThemeConfig as ml, prefixVtgClassNames as J } from "../../../core/src/utils/classPrefix.mjs";
5
- import { devWarn as vl } from "../../../core/src/utils/devWarn.mjs";
6
- import { mergeThemeConfigs as k, useTheme as pl } from "../../../core/src/composables/useTheme.mjs";
7
- import { mergeDeep as Z } from "../../../core/src/utils/mergeDeep.mjs";
8
- import Je from "../../../core/src/components/Scrollbar.mjs";
9
- import { VTABLE_GUILD_INJECTION_KEY as Ze } from "../../../core/src/plugin/index.mjs";
10
- import { paginationZhCN as gl } from "../../../theme/src/pagination.mjs";
11
- import { resolveTooltipThemePreset as yl, resolveScrollbarThemePreset as hl, resolveRadioThemePreset as wl, resolveInputThemePreset as Cl, resolveCheckboxThemePreset as xl, resolveButtonThemePreset as bl, resolveTableThemePreset as Sl, resolveTableLocalePreset as Dl, resolveBuiltInTableLocale as Tl, resolveBuiltInLocale as El } from "../../../theme/src/presets/index.mjs";
12
- import { antdvTableCompatClasses as Rl } from "../../../theme/src/compat/antdv-table.mjs";
13
- import { usePagination as Il } from "../composables/usePagination.mjs";
14
- import Ll from "./TablePagination.mjs";
15
- import { filterVisibleColumns as Hl, applyColumnOrder as Bl } from "../composables/useColumnDisplay.mjs";
16
- import { getEllipsisConfig as Nl } from "../utils/cell.mjs";
17
- import { getRootCompatClass as Fl } from "../utils/compat.mjs";
18
- import { resolveRowKey as Pl } from "../utils/rowKey.mjs";
19
- import { useScroll as Ol } from "../composables/useScroll.mjs";
20
- import { useAutoHeight as _l } from "../composables/useAutoHeight.mjs";
21
- import { useColumnMetrics as kl } from "../composables/useColumnMetrics.mjs";
22
- import { useColumnLayout as Al } from "../composables/useColumnLayout.mjs";
23
- import { resolveFixedColumnRanges as Wl } from "../composables/useColumnWindow.mjs";
24
- import { useExpand as zl } from "../composables/useExpand.mjs";
25
- import { useResize as Kl } from "../composables/useResize.mjs";
26
- import { useVirtual as Ml, INVALID_SCROLL_Y_FALLBACK as jl } from "../composables/useVirtual.mjs";
27
- import { useTreeData as Vl } from "../composables/useTreeData.mjs";
28
- import { useLazyTreeData as Yl } from "../composables/useLazyTreeData.mjs";
29
- import { useHoverState as $l } from "../composables/useHoverState.mjs";
30
- import { useRowDragSort as Ul } from "../composables/useRowDragSort.mjs";
31
- import { TABLE_CONTEXT_KEY as Gl } from "../context.mjs";
32
- import { EXPAND_COLUMN as Xl, SELECTION_COLUMN as ql } from "../constants.mjs";
33
- import { resolveTablePresetConfig as Jl } from "../preset-config.mjs";
34
- import Qe from "./TableHeader.mjs";
35
- import et from "./TableBody.mjs";
36
- import Zl from "./VirtualTableBody.mjs";
37
- import tt from "./TableLoading.mjs";
38
- import Q from "./ColGroup.mjs";
39
- import ee from "./ColumnWidthRow.mjs";
40
- import { antdvTableTheme as Ql } from "../../../theme/src/presets/antdv/table.mjs";
41
- import { useColumns as lt } from "../composables/useColumns.mjs";
42
- import { useSorter as ea } from "../composables/useSorter.mjs";
43
- import { useFilter as ta } from "../composables/useFilter.mjs";
44
- import { useSelection as la } from "../composables/useSelection.mjs";
45
- import { cn as L } from "tailwind-variants";
46
- function at(l) {
47
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !fl(l);
4
+ import { prefixThemeConfig as gl, prefixVtgClassNames as Z } from "../../../core/src/utils/classPrefix.mjs";
5
+ import { devWarn as yl } from "../../../core/src/utils/devWarn.mjs";
6
+ import { mergeThemeConfigs as A, useTheme as hl } from "../../../core/src/composables/useTheme.mjs";
7
+ import { mergeDeep as Q } from "../../../core/src/utils/mergeDeep.mjs";
8
+ import Ze from "../../../core/src/components/Scrollbar.mjs";
9
+ import { VTABLE_GUILD_INJECTION_KEY as Qe } from "../../../core/src/plugin/index.mjs";
10
+ import { paginationZhCN as wl } from "../../../theme/src/pagination.mjs";
11
+ import { resolveTooltipThemePreset as Cl, resolveScrollbarThemePreset as xl, resolveRadioThemePreset as bl, resolveInputThemePreset as Sl, resolveCheckboxThemePreset as Dl, resolveButtonThemePreset as Tl, resolveTableThemePreset as El, resolveTableLocalePreset as Rl, resolveBuiltInTableLocale as Il, resolveBuiltInLocale as Ll } from "../../../theme/src/presets/index.mjs";
12
+ import { antdvTableCompatClasses as Hl } from "../../../theme/src/compat/antdv-table.mjs";
13
+ import { usePagination as Bl } from "../composables/usePagination.mjs";
14
+ import Fl from "./TablePagination.mjs";
15
+ import { filterVisibleColumns as Nl, applyColumnOrder as Pl } from "../composables/useColumnDisplay.mjs";
16
+ import { getEllipsisConfig as Ol } from "../utils/cell.mjs";
17
+ import { getRootCompatClass as _l } from "../utils/compat.mjs";
18
+ import { resolveRowKey as kl } from "../utils/rowKey.mjs";
19
+ import { useScroll as Al } from "../composables/useScroll.mjs";
20
+ import { useAutoHeight as Wl } from "../composables/useAutoHeight.mjs";
21
+ import { useColumnMetrics as zl } from "../composables/useColumnMetrics.mjs";
22
+ import { useColumnLayout as Kl } from "../composables/useColumnLayout.mjs";
23
+ import { resolveFixedColumnRanges as Ml } from "../composables/useColumnWindow.mjs";
24
+ import { useExpand as jl } from "../composables/useExpand.mjs";
25
+ import { useResize as Vl } from "../composables/useResize.mjs";
26
+ import { useVirtual as Yl, INVALID_SCROLL_Y_FALLBACK as $l } from "../composables/useVirtual.mjs";
27
+ import { useTreeData as Ul } from "../composables/useTreeData.mjs";
28
+ import { useLazyTreeData as Gl } from "../composables/useLazyTreeData.mjs";
29
+ import { useHoverState as Xl } from "../composables/useHoverState.mjs";
30
+ import { useRowDragSort as ql } from "../composables/useRowDragSort.mjs";
31
+ import { TABLE_CONTEXT_KEY as Jl } from "../context.mjs";
32
+ import { EXPAND_COLUMN as Zl, SELECTION_COLUMN as Ql } from "../constants.mjs";
33
+ import { resolveTablePresetConfig as ea } from "../preset-config.mjs";
34
+ import et from "./TableHeader.mjs";
35
+ import tt from "./TableBody.mjs";
36
+ import ta from "./VirtualTableBody.mjs";
37
+ import lt from "./TableLoading.mjs";
38
+ import ee from "./ColGroup.mjs";
39
+ import te from "./ColumnWidthRow.mjs";
40
+ import { antdvTableTheme as la } from "../../../theme/src/presets/antdv/table.mjs";
41
+ import { useColumns as at } from "../composables/useColumns.mjs";
42
+ import { useSorter as aa } from "../composables/useSorter.mjs";
43
+ import { useFilter as oa } from "../composables/useFilter.mjs";
44
+ import { useSelection as na } from "../composables/useSelection.mjs";
45
+ import { cn as H } from "tailwind-variants";
46
+ function ot(l) {
47
+ return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !vl(l);
48
48
  }
49
- const aa = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
50
- function ot() {
49
+ const ra = [["xxxl", 2e3], ["xxl", 1600], ["xl", 1200], ["lg", 992], ["md", 768], ["sm", 576], ["xs", 0]];
50
+ function nt() {
51
51
  if (typeof window > "u")
52
52
  return /* @__PURE__ */ new Set(["md", "sm", "xs"]);
53
- const l = window.innerWidth, d = /* @__PURE__ */ new Set();
54
- return aa.forEach(([u, c]) => {
53
+ const l = window.innerWidth, i = /* @__PURE__ */ new Set();
54
+ return ra.forEach(([u, c]) => {
55
55
  if (u === "xs") {
56
- l < 576 && d.add("xs");
56
+ l < 576 && i.add("xs");
57
57
  return;
58
58
  }
59
- l >= c && d.add(u);
60
- }), d;
59
+ l >= c && i.add(u);
60
+ }), i;
61
61
  }
62
- function nt(l, d) {
62
+ function rt(l, i) {
63
63
  return l.reduce((u, c) => {
64
64
  if (typeof c == "symbol")
65
65
  return u.push(c), u;
66
- if (c.responsive?.length && !c.responsive.some((D) => d.has(D)))
66
+ if (c.responsive?.length && !c.responsive.some((T) => i.has(T)))
67
67
  return u;
68
- const x = c.fixed === !0 ? "left" : c.fixed;
68
+ const b = c.fixed === !0 ? "left" : c.fixed;
69
69
  if ("children" in c && Array.isArray(c.children)) {
70
- const D = nt(c.children, d);
71
- return D.length === 0 || u.push({
70
+ const T = rt(c.children, i);
71
+ return T.length === 0 || u.push({
72
72
  ...c,
73
- fixed: x,
74
- children: D
73
+ fixed: b,
74
+ children: T
75
75
  }), u;
76
76
  }
77
- return u.push(x === c.fixed ? c : {
77
+ return u.push(b === c.fixed ? c : {
78
78
  ...c,
79
- fixed: x
79
+ fixed: b
80
80
  }), u;
81
81
  }, []);
82
82
  }
83
- const qa = /* @__PURE__ */ ul({
83
+ const Qa = /* @__PURE__ */ sl({
84
84
  name: "VTable",
85
85
  props: {
86
86
  pagination: {
@@ -299,52 +299,52 @@ const qa = /* @__PURE__ */ ul({
299
299
  }
300
300
  },
301
301
  emits: {
302
- change: (l, d, u) => !0,
303
- resizeColumn: (l, d) => !0,
304
- rowDragEnd: (l, d) => !0
302
+ change: (l, i, u) => !0,
303
+ resizeColumn: (l, i) => !0,
304
+ rowDragEnd: (l, i) => !0
305
305
  },
306
306
  slots: Object,
307
307
  setup(l, {
308
- slots: d,
308
+ slots: i,
309
309
  emit: u,
310
310
  expose: c
311
311
  }) {
312
- const x = S(!1);
313
- let D;
314
- I(() => {
312
+ const b = D(!1);
313
+ let T;
314
+ L(() => {
315
315
  const e = l.loading;
316
316
  return [e === !0 || typeof e == "object" && e !== null && e.spinning !== !1, typeof e == "object" && e !== null ? e.delay : 0];
317
317
  }, ([e, a]) => {
318
- clearTimeout(D), e ? !a || !Number.isFinite(a) || a < 0 ? x.value = !0 : x.value || (D = setTimeout(() => {
319
- x.value = !0;
320
- }, a)) : x.value = !1;
318
+ clearTimeout(T), e ? !a || !Number.isFinite(a) || a < 0 ? b.value = !0 : b.value || (T = setTimeout(() => {
319
+ b.value = !0;
320
+ }, a)) : b.value = !1;
321
321
  }, {
322
322
  immediate: !0
323
- }), ye(() => clearTimeout(D));
324
- const we = n(() => typeof l.loading == "object" ? l.loading?.wrapperClassName : void 0), h = sl(Ze, null), T = n(() => h?.themePreset ?? "antdv"), H = n(() => h?.cssMode ?? "prebuilt"), B = n(() => h?.classPrefix ?? "vtg"), rt = n(() => {
325
- const e = h?.theme ?? {}, a = T.value, o = (i) => ml(i, H.value, B.value);
323
+ }), he(() => clearTimeout(T));
324
+ const Ce = n(() => typeof l.loading == "object" ? l.loading?.wrapperClassName : void 0), h = cl(Qe, null), E = n(() => h?.themePreset ?? "antdv"), B = n(() => h?.cssMode ?? "prebuilt"), F = n(() => h?.classPrefix ?? "vtg"), it = n(() => {
325
+ const e = h?.theme ?? {}, a = E.value, o = (d) => gl(d, B.value, F.value);
326
326
  return {
327
327
  ...e,
328
- button: k(o(bl(a)), e.button),
329
- checkbox: k(o(xl(a)), e.checkbox),
330
- input: k(o(Cl(a)), e.input),
331
- radio: k(o(wl(a)), e.radio),
332
- scrollbar: k(o(hl(a)), e.scrollbar),
333
- tooltip: k(o(yl(a)), e.tooltip)
328
+ button: A(o(Tl(a)), e.button),
329
+ checkbox: A(o(Dl(a)), e.checkbox),
330
+ input: A(o(Sl(a)), e.input),
331
+ radio: A(o(bl(a)), e.radio),
332
+ scrollbar: A(o(xl(a)), e.scrollbar),
333
+ tooltip: A(o(Cl(a)), e.tooltip)
334
334
  };
335
335
  });
336
- Ge(Ze, {
336
+ Xe(Qe, {
337
337
  get themePreset() {
338
- return T.value;
338
+ return E.value;
339
339
  },
340
340
  get cssMode() {
341
- return H.value;
341
+ return B.value;
342
342
  },
343
343
  get classPrefix() {
344
- return B.value;
344
+ return F.value;
345
345
  },
346
346
  get theme() {
347
- return rt.value;
347
+ return it.value;
348
348
  },
349
349
  get locale() {
350
350
  return h?.locale ?? "zh-CN";
@@ -359,140 +359,140 @@ const qa = /* @__PURE__ */ ul({
359
359
  return h?.compatClass;
360
360
  }
361
361
  });
362
- const it = n(() => Sl(T.value) ?? Ql), {
362
+ const dt = n(() => El(E.value) ?? la), {
363
363
  slots: t
364
- } = pl("table", it, l, {
365
- compatClasses: Rl
366
- }), A = h?.compatClass === !0 ? (e) => `ant-table-${e}` : void 0, W = n(() => l.locale ?? h?.locale ?? "zh-CN"), Ce = n(() => ({
364
+ } = hl("table", dt, l, {
365
+ compatClasses: Hl
366
+ }), W = h?.compatClass === !0 ? (e) => `ant-table-${e}` : void 0, z = n(() => l.locale ?? h?.locale ?? "zh-CN"), xe = n(() => ({
367
367
  ...h?.locales ?? {},
368
368
  ...l.locales ?? {}
369
- })), dt = n(() => {
370
- const e = Dl(T.value), a = Tl(T.value, W.value), o = Ce.value[W.value]?.table, i = Z(Z(e, a), o);
371
- return Z(i, Z(h?.localeOverrides?.table ?? {}, l.localeOverrides));
372
- }), te = S(ot());
373
- function le() {
374
- te.value = ot();
369
+ })), ut = n(() => {
370
+ const e = Rl(E.value), a = Il(E.value, z.value), o = xe.value[z.value]?.table, d = Q(Q(e, a), o);
371
+ return Q(d, Q(h?.localeOverrides?.table ?? {}, l.localeOverrides));
372
+ }), le = D(nt());
373
+ function ae() {
374
+ le.value = nt();
375
375
  }
376
- Xe(() => {
377
- le(), window.addEventListener("resize", le);
378
- }), ye(() => {
379
- window.removeEventListener("resize", le);
376
+ qe(() => {
377
+ ae(), window.addEventListener("resize", ae);
378
+ }), he(() => {
379
+ window.removeEventListener("resize", ae);
380
380
  });
381
- const xe = n(() => nt(l.columns, te.value)), F = n(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
382
- leafColumns: M
383
- } = lt(() => xe.value), {
384
- getSortOrder: ae,
385
- toggleSortOrder: ut,
386
- sortData: st,
387
- sorterState: ct,
388
- sorterResult: oe,
389
- sortColumns: ft
390
- } = ea({
391
- columns: () => M.value,
381
+ const be = n(() => rt(l.columns, le.value)), P = n(() => l.sticky === !0 ? {} : typeof l.sticky == "object" ? l.sticky : void 0), {
382
+ leafColumns: j
383
+ } = at(() => be.value), {
384
+ getSortOrder: oe,
385
+ toggleSortOrder: st,
386
+ sortData: ct,
387
+ sorterState: ft,
388
+ sorterResult: ne,
389
+ sortColumns: mt
390
+ } = aa({
391
+ columns: () => j.value,
392
392
  tableSortDirections: () => l.sortDirections,
393
393
  onSorterChange(e) {
394
- const a = ne();
395
- u("change", j(), e, {
394
+ const a = re();
395
+ u("change", V(), e, {
396
396
  action: "sort",
397
397
  currentDataSource: a,
398
- ...re()
399
- }), de();
398
+ ...ie()
399
+ }), ue();
400
400
  }
401
401
  }), {
402
- getFilteredValue: mt,
402
+ getFilteredValue: pt,
403
403
  confirmFilter: vt,
404
- resetFilter: pt,
405
- getAllFilters: j,
406
- filterData: gt
407
- } = ta({
408
- columns: () => M.value,
404
+ resetFilter: gt,
405
+ getAllFilters: V,
406
+ filterData: yt
407
+ } = oa({
408
+ columns: () => j.value,
409
409
  onFilterChange(e) {
410
- const a = ne(), o = f.resetForFilter();
411
- u("change", e, oe.value, {
410
+ const a = re(), o = f.resetForFilter();
411
+ u("change", e, ne.value, {
412
412
  action: "filter",
413
413
  currentDataSource: a,
414
- ...re(o)
415
- }), de();
414
+ ...ie(o)
415
+ }), ue();
416
416
  }
417
- }), C = Yl({
417
+ }), C = Gl({
418
418
  data: () => l.dataSource,
419
419
  loadData: () => l.loadData,
420
420
  isLeaf: () => l.isLeaf,
421
421
  childrenColumnName: () => l.childrenColumnName,
422
- getRowKey: b,
422
+ getRowKey: S,
423
423
  onLoadError: (e, a) => l.onTreeLoadError?.(e, a)
424
424
  });
425
- function ne() {
425
+ function re() {
426
426
  let e = C.data.value;
427
- return he(l.manual, "filter") || (e = gt(e)), he(l.manual, "sort") || (e = st(e)), e;
427
+ return we(l.manual, "filter") || (e = yt(e)), we(l.manual, "sort") || (e = ct(e)), e;
428
428
  }
429
- const z = n(() => ne()), f = Il({
430
- manual: () => he(l.manual, "pagination"),
429
+ const K = n(() => re()), f = Bl({
430
+ manual: () => we(l.manual, "pagination"),
431
431
  pagination: () => l.pagination,
432
- data: () => z.value,
432
+ data: () => K.value,
433
433
  onChange(e) {
434
- u("change", j(), oe.value, {
434
+ u("change", V(), ne.value, {
435
435
  action: "paginate",
436
- currentDataSource: z.value,
436
+ currentDataSource: K.value,
437
437
  pagination: e
438
- }), de();
438
+ }), ue();
439
439
  }
440
440
  });
441
- function re(e) {
441
+ function ie(e) {
442
442
  return f.enabled.value ? {
443
443
  pagination: e ?? f.state.value
444
444
  } : {};
445
445
  }
446
- const yt = n(() => ({
447
- ...gl,
448
- ...El(T.value, W.value)?.pagination,
449
- ...Ce.value[W.value]?.pagination,
446
+ const ht = n(() => ({
447
+ ...wl,
448
+ ...Ll(E.value, z.value)?.pagination,
449
+ ...xe.value[z.value]?.pagination,
450
450
  ...h?.localeOverrides?.pagination,
451
451
  ...f.config.value.locale
452
- })), ie = S(null);
453
- function de() {
454
- (l.scroll?.scrollToFirstRowOnChange ?? f.enabled.value) && qe(() => {
455
- R.value ? ie.value?.scrollToTop() : N.value && (N.value.scrollTop = 0);
452
+ })), de = D(null);
453
+ function ue() {
454
+ (l.scroll?.scrollToFirstRowOnChange ?? f.enabled.value) && Je(() => {
455
+ I.value ? de.value?.scrollToTop() : N.value && (N.value.scrollTop = 0);
456
456
  });
457
457
  }
458
- function V(e) {
458
+ function Y(e) {
459
459
  if (!f.enabled.value || f.state.value.total === 0) return null;
460
460
  const o = (f.config.value.position ?? ["bottomRight"]).find((s) => s !== "none" && s.startsWith(e));
461
461
  if (!o) return null;
462
- const i = o.slice(e.length).toLowerCase();
463
- return r(Ll, {
462
+ const d = o.slice(e.length).toLowerCase();
463
+ return r(Fl, {
464
464
  key: e,
465
465
  config: f.config.value,
466
466
  state: f.state.value,
467
- locale: yt.value,
468
- align: i,
467
+ locale: ht.value,
468
+ align: d,
469
469
  position: o,
470
470
  tableSize: l.size,
471
- narrow: te.value.has("xs"),
471
+ narrow: le.value.has("xs"),
472
472
  getPopupContainer: l.getPopupContainer,
473
473
  onChange: f.change
474
- }, d.paginationItem ? {
475
- paginationItem: d.paginationItem
474
+ }, i.paginationItem ? {
475
+ paginationItem: i.paginationItem
476
476
  } : void 0);
477
477
  }
478
- function b(e, a) {
479
- const o = Pl(e, a, l.rowKey);
478
+ function S(e, a) {
479
+ const o = kl(e, a, l.rowKey);
480
480
  return l.rowKey === void 0 || typeof l.rowKey == "string" && l.rowKey in e, o;
481
481
  }
482
482
  const {
483
- flattenData: ue,
484
- rowMetaMap: be,
485
- isTreeData: se,
486
- toggleTreeExpand: ht,
487
- isTreeExpanded: wt,
488
- indentSize: Ct
489
- } = Vl({
490
- data: () => z.value,
483
+ flattenData: se,
484
+ rowMetaMap: Se,
485
+ isTreeData: ce,
486
+ toggleTreeExpand: wt,
487
+ isTreeExpanded: Ct,
488
+ indentSize: xt
489
+ } = Ul({
490
+ data: () => K.value,
491
491
  pageData: () => f.pageData.value,
492
492
  preserveStateOnDataChange: () => f.enabled.value || !!l.loadData,
493
493
  childrenColumnName: () => l.childrenColumnName,
494
494
  indentSize: () => l.indentSize,
495
- getRowKey: b,
495
+ getRowKey: S,
496
496
  hasChildren: C.hasChildren,
497
497
  defaultExpandedRowKeys: () => l.defaultExpandedRowKeys,
498
498
  expandedRowKeys: () => l.expandedRowKeys,
@@ -500,179 +500,179 @@ const qa = /* @__PURE__ */ ul({
500
500
  onExpand: (e, a) => l.onExpand?.(e, a),
501
501
  onExpandedRowsChange: (e) => l.onExpandedRowsChange?.(e)
502
502
  });
503
- function xt(e, a) {
504
- const o = b(e, a);
503
+ function bt(e, a) {
504
+ const o = S(e, a);
505
505
  if (C.getError(o)) {
506
506
  C.load(e, a);
507
507
  return;
508
508
  }
509
- ht(e, a);
509
+ wt(e, a);
510
510
  }
511
- I(() => l.loadData ? ue.value : void 0, (e) => {
511
+ L(() => l.loadData ? se.value : void 0, (e) => {
512
512
  e?.forEach((a, o) => {
513
- a.expanded && !C.getError(b(a.record, o)) && C.load(a.record, o);
513
+ a.expanded && !C.getError(S(a.record, o)) && C.load(a.record, o);
514
514
  });
515
515
  }, {
516
516
  immediate: !0
517
517
  });
518
518
  const {
519
- hoverRange: bt,
520
- setHoverRange: St,
521
- clearHoverRange: Dt
522
- } = $l(100), Y = Ul({
519
+ hoverRange: St,
520
+ setHoverRange: Dt,
521
+ clearHoverRange: Tt
522
+ } = Xl(100), $ = ql({
523
523
  enabled: () => l.rowDraggable === !0,
524
- getRowKey: b,
524
+ getRowKey: S,
525
525
  dataSource: () => l.dataSource,
526
526
  childrenColumnName: () => l.childrenColumnName,
527
527
  onDrop(e, a) {
528
528
  u("rowDragEnd", e, a);
529
529
  }
530
- }), g = n(() => se.value ? ue.value.map((e) => e.record) : f.pageData.value), {
531
- isSelected: Tt,
532
- isDisabled: Et,
533
- getSelectionState: Rt,
534
- toggleRow: It,
535
- toggleAll: Lt,
536
- allCheckedState: Ht,
537
- invertSelection: Bt,
530
+ }), g = n(() => ce.value ? se.value.map((e) => e.record) : f.pageData.value), {
531
+ isSelected: Et,
532
+ isDisabled: Rt,
533
+ getSelectionState: It,
534
+ toggleRow: Lt,
535
+ toggleAll: Ht,
536
+ allCheckedState: Bt,
537
+ invertSelection: Ft,
538
538
  clearSelection: Nt,
539
- getChangeableRowKeys: Ft
540
- } = la({
539
+ getChangeableRowKeys: Pt
540
+ } = na({
541
541
  rowSelection: () => l.rowSelection,
542
- getRowKey: b,
543
- data: () => z.value,
542
+ getRowKey: S,
543
+ data: () => K.value,
544
544
  visibleData: () => g.value,
545
545
  paginate: () => f.enabled.value,
546
546
  childrenColumnName: () => l.childrenColumnName,
547
547
  onSelectionChange() {
548
- u("change", j(), oe.value, {
548
+ u("change", V(), ne.value, {
549
549
  action: "select",
550
550
  currentDataSource: g.value,
551
- ...re()
551
+ ...ie()
552
552
  });
553
553
  }
554
554
  }), {
555
- isExpanded: Pt,
556
- toggleExpand: Ot
557
- } = zl({
555
+ isExpanded: Ot,
556
+ toggleExpand: _t
557
+ } = jl({
558
558
  expandable: () => l.expandable,
559
- getRowKey: b,
560
- data: () => f.enabled.value ? z.value : g.value,
559
+ getRowKey: S,
560
+ data: () => f.enabled.value ? K.value : g.value,
561
561
  childrenColumnName: () => l.childrenColumnName,
562
562
  initializeNewRows: () => f.enabled.value
563
- }), Se = (e) => {
563
+ }), De = (e) => {
564
564
  const a = l.expandable;
565
565
  return a ? a.rowExpandable ? a.rowExpandable(e) : !!a.expandedRowRender : !1;
566
- }, _t = (e, a) => {
567
- Se(e) && Ot(e, a);
568
- }, De = "__vtg_selection__", Te = "__vtg_expand__", kt = n(() => {
566
+ }, kt = (e, a) => {
567
+ De(e) && _t(e, a);
568
+ }, Te = "__vtg_selection__", Ee = "__vtg_expand__", At = n(() => {
569
569
  const e = l.expandable, a = l.rowSelection, o = e && e.showExpandColumn !== !1 ? {
570
- key: Te,
571
- title: () => d.expandColumnTitle?.() ?? e.columnTitle ?? "",
570
+ key: Ee,
571
+ title: () => i.expandColumnTitle?.() ?? e.columnTitle ?? "",
572
572
  width: e.columnWidth ?? 48,
573
573
  align: "center",
574
574
  fixed: e.fixed === !0 ? "left" : e.fixed
575
- } : null, i = a ? {
576
- key: De,
575
+ } : null, d = a ? {
576
+ key: Te,
577
577
  title: "",
578
578
  width: a.columnWidth ?? 48,
579
579
  align: "center",
580
580
  fixed: a.fixed === !0 ? "left" : a.fixed || void 0
581
- } : null, s = Hl(xe.value), m = [];
582
- let p = !1, y = !1;
581
+ } : null, s = Nl(be.value), m = [];
582
+ let v = !1, y = !1;
583
583
  for (const w of s) {
584
- if (w === Xl) {
585
- o && !p && (m.push(o), p = !0);
584
+ if (w === Zl) {
585
+ o && !v && (m.push(o), v = !0);
586
586
  continue;
587
587
  }
588
- if (w === ql) {
589
- i && !y && (m.push(i), y = !0);
588
+ if (w === Ql) {
589
+ d && !y && (m.push(d), y = !0);
590
590
  continue;
591
591
  }
592
592
  m.push(w);
593
593
  }
594
- if (i && !y && m.unshift(i), o && !p) {
594
+ if (d && !y && m.unshift(d), o && !v) {
595
595
  const w = e?.expandIconColumnIndex;
596
- m.splice(typeof w == "number" && Number.isFinite(w) ? Math.min(m.length, Math.max(0, Math.floor(w)) + (i ? 1 : 0)) : i ? 1 : 0, 0, o);
596
+ m.splice(typeof w == "number" && Number.isFinite(w) ? Math.min(m.length, Math.max(0, Math.floor(w)) + (d ? 1 : 0)) : d ? 1 : 0, 0, o);
597
597
  }
598
- return Bl(m, l.columnOrder, [De, Te]);
598
+ return Pl(m, l.columnOrder, [Te, Ee]);
599
599
  }), {
600
- leafColumns: v,
601
- headerRows: ce
602
- } = lt(() => kt.value), At = n(() => ce.value.length > 1), {
603
- columnWidths: $,
604
- startResize: Wt,
605
- isResizing: zt
606
- } = Kl({
607
- columns: () => v.value,
600
+ leafColumns: p,
601
+ headerRows: fe
602
+ } = at(() => At.value), Wt = n(() => fe.value.length > 1), {
603
+ columnWidths: U,
604
+ startResize: zt,
605
+ isResizing: Kt
606
+ } = Vl({
607
+ columns: () => p.value,
608
608
  onResizeColumn(e, a) {
609
609
  u("resizeColumn", e, a);
610
610
  }
611
611
  }), {
612
- headerWrapRef: U,
612
+ headerWrapRef: G,
613
613
  bodyWrapRef: N,
614
- scrollState: Ee,
615
- handleBodyScroll: Re,
616
- fixedOffsets: Ie,
617
- syncHorizontalScroll: Kt,
618
- updateScrollState: Le
619
- } = Ol({
620
- displayColumns: () => v.value,
621
- columnWidths: $,
622
- layoutWidths: () => E.metrics.value?.widths,
623
- syncElements: () => q.value ? [q.value] : []
624
- }), He = n(() => Fl({
625
- compatClass: A,
626
- fixedOffsets: Ie,
627
- scrollState: Ee,
614
+ scrollState: Re,
615
+ handleBodyScroll: Ie,
616
+ fixedOffsets: Le,
617
+ syncHorizontalScroll: Mt,
618
+ updateScrollState: He
619
+ } = Al({
620
+ displayColumns: () => p.value,
621
+ columnWidths: U,
622
+ layoutWidths: () => R.metrics.value?.widths,
623
+ syncElements: () => J.value ? [J.value] : []
624
+ }), Be = n(() => _l({
625
+ compatClass: W,
626
+ fixedOffsets: Le,
627
+ scrollState: Re,
628
628
  empty: g.value.length === 0,
629
629
  fixedHeader: l.scroll?.y !== void 0,
630
- fixedColumn: Fe.value && Ne.value,
631
- horizontalScroll: Fe.value,
632
- layoutFixed: X.value === "fixed"
633
- })), G = n(() => l.scroll?.y === "auto"), Be = n(() => !!l.scroll?.y || l.showHeader !== !1 && !!l.sticky), Ne = n(() => v.value.some((e) => e.fixed === "left" || e.fixed === "right")), Fe = n(() => l.scroll?.x !== void 0 || E.overflow.value || !!l.expandable?.fixed), Mt = n(() => M.value.some((e) => Nl(e).enabled)), X = n(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || Ne.value || Mt.value ? "fixed" : "auto"), jt = n(() => {
634
- if (F.value)
630
+ fixedColumn: Pe.value && Ne.value,
631
+ horizontalScroll: Pe.value,
632
+ layoutFixed: q.value === "fixed"
633
+ })), X = n(() => l.scroll?.y === "auto"), Fe = n(() => !!l.scroll?.y || l.showHeader !== !1 && !!l.sticky), Ne = n(() => p.value.some((e) => e.fixed === "left" || e.fixed === "right")), Pe = n(() => l.scroll?.x !== void 0 || R.overflow.value || !!l.expandable?.fixed), jt = n(() => j.value.some((e) => Ol(e).enabled)), q = n(() => l.tableLayout ? l.tableLayout : l.scroll?.y || l.scroll?.x || Ne.value || jt.value ? "fixed" : "auto"), Vt = n(() => {
634
+ if (P.value)
635
635
  return {
636
636
  position: "sticky",
637
- top: `${F.value.offsetHeader ?? 0}px`,
637
+ top: `${P.value.offsetHeader ?? 0}px`,
638
638
  zIndex: "4"
639
639
  };
640
- }), Pe = S(null), q = S(null), P = S(null), E = Al({
641
- columns: () => v.value,
642
- columnWidths: $,
643
- layout: () => X.value,
644
- split: () => Be.value,
645
- root: () => P.value,
646
- viewport: () => P.value?.contains(N.value) ? N.value : U.value ?? P.value,
640
+ }), Oe = D(null), J = D(null), O = D(null), R = Kl({
641
+ columns: () => p.value,
642
+ columnWidths: U,
643
+ layout: () => q.value,
644
+ split: () => Fe.value,
645
+ root: () => O.value,
646
+ viewport: () => O.value?.contains(N.value) ? N.value : G.value ?? O.value,
647
647
  scrollX: () => l.scroll?.x,
648
648
  onMeasure: () => {
649
- R.value || Le();
649
+ I.value || He();
650
650
  }
651
651
  }), {
652
- bodyHeight: Oe
653
- } = _l({
654
- enabled: () => G.value,
655
- wrapperEl: () => Pe.value,
656
- headerEl: () => U.value,
657
- summaryEl: () => q.value,
652
+ bodyHeight: _e
653
+ } = Wl({
654
+ enabled: () => X.value,
655
+ wrapperEl: () => Oe.value,
656
+ headerEl: () => G.value,
657
+ summaryEl: () => J.value,
658
658
  hasData: () => g.value.length > 0
659
- }), Vt = n(() => {
659
+ }), Yt = n(() => {
660
660
  const e = l.scroll?.y;
661
661
  if (e !== void 0)
662
- return G.value ? Oe.value : typeof e == "number" ? Number.isFinite(e) && e > 0 ? e : void 0 : e;
662
+ return X.value ? _e.value : typeof e == "number" ? Number.isFinite(e) && e > 0 ? e : void 0 : e;
663
663
  }), {
664
- enabled: R,
665
- itemHeight: Yt,
666
- listHeight: $t,
667
- fixedHeight: Ut,
668
- resolvedScrollY: Gt
669
- } = Ml({
664
+ enabled: I,
665
+ itemHeight: $t,
666
+ listHeight: Ut,
667
+ fixedHeight: Gt,
668
+ resolvedScrollY: Xt
669
+ } = Yl({
670
670
  virtual: () => l.virtual,
671
671
  scrollY: () => l.scroll?.y,
672
672
  size: () => l.size,
673
673
  rowHeight: () => l.rowHeight,
674
- measuredHeight: () => Oe.value
675
- }), _e = n(() => M.value.some((e) => !!e.customCell || !!e.customRender)), fe = n(() => !At.value || l.bordered ? {
674
+ measuredHeight: () => _e.value
675
+ }), ke = n(() => j.value.some((e) => !!e.customCell || !!e.customRender)), me = n(() => !Wt.value || l.bordered ? {
676
676
  table: "",
677
677
  th: "",
678
678
  td: ""
@@ -680,44 +680,44 @@ const qa = /* @__PURE__ */ ul({
680
680
  table: t.groupedHeaderTable(),
681
681
  th: t.groupedHeaderTh(),
682
682
  td: t.groupedHeaderTd()
683
- }), K = n(() => L(t.table(), fe.value.table) ?? ""), ke = n(() => E.enabled.value ? t.widthLayoutCell() : void 0), Ae = n(() => L(t.th(), fe.value.th, ke.value) ?? ""), me = n(() => L(t.td(), fe.value.td, ke.value) ?? "");
684
- I([R, _e], ([e, a]) => {
683
+ }), M = n(() => H(t.table(), me.value.table) ?? ""), Ae = n(() => R.enabled.value ? t.widthLayoutCell() : void 0), We = n(() => H(t.th(), me.value.th, Ae.value) ?? ""), pe = n(() => H(t.td(), me.value.td, Ae.value) ?? "");
684
+ L([I, ke], ([e, a]) => {
685
685
  }, {
686
686
  immediate: !0
687
- }), I([() => l.virtual, Gt], ([e, a]) => {
687
+ }), L([() => l.virtual, Xt], ([e, a]) => {
688
688
  if (!e) return;
689
689
  const o = String(l.scroll?.y);
690
- a.kind === "compat-px" ? vl("vtable-scroll-y-compat-px", `[VTable] virtual 模式下字符串 scroll.y(${o})按 ${a.value}px 解析,这是兼容行为;请改用数字或 'auto'。`) : a.kind === "invalid-string" || a.kind === "invalid-number" && l.scroll?.y && `${jl}`;
690
+ a.kind === "compat-px" ? yl("vtable-scroll-y-compat-px", `[VTable] virtual 模式下字符串 scroll.y(${o})按 ${a.value}px 解析,这是兼容行为;请改用数字或 'auto'。`) : a.kind === "invalid-string" || a.kind === "invalid-number" && l.scroll?.y && `${$l}`;
691
691
  }, {
692
692
  immediate: !0
693
693
  });
694
- const We = S(null), ze = S(null);
695
- I(() => We.value?.wrapRef, (e) => {
694
+ const ze = D(null), Ke = D(null);
695
+ L(() => ze.value?.wrapRef, (e) => {
696
696
  e && (N.value = e);
697
- }), I(() => ze.value?.wrapRef, (e) => {
697
+ }), L(() => Ke.value?.wrapRef, (e) => {
698
698
  e && (N.value = e);
699
699
  });
700
700
  let ve = !1;
701
- Xe(() => {
701
+ qe(() => {
702
702
  ve = !0;
703
- }), ye(() => {
703
+ }), he(() => {
704
704
  ve = !1;
705
705
  });
706
- async function Xt(e) {
706
+ async function qt(e) {
707
707
  if (!e || typeof e != "object") return !1;
708
708
  for (const s of [e.top, e.left, e.offset])
709
709
  if (s !== void 0 && (typeof s != "number" || !Number.isFinite(s)))
710
710
  return !1;
711
- if (e.align !== void 0 && !["top", "bottom", "auto"].includes(e.align) || (await qe(), !ve)) return !1;
711
+ if (e.align !== void 0 && !["top", "bottom", "auto"].includes(e.align) || (await Je(), !ve)) return !1;
712
712
  let a;
713
713
  if (e.key !== void 0) {
714
- if (a = g.value.findIndex((s, m) => b(s, m) === e.key), a < 0) return !1;
714
+ if (a = g.value.findIndex((s, m) => S(s, m) === e.key), a < 0) return !1;
715
715
  } else if (e.index !== void 0) {
716
716
  if (!Number.isSafeInteger(e.index) || e.index < 0 || (a = e.index, a >= g.value.length)) return !1;
717
717
  } else if (e.top === void 0 && e.left === void 0)
718
718
  return !1;
719
- if (R.value)
720
- return await ie.value?.scrollTo({
719
+ if (I.value)
720
+ return await de.value?.scrollTo({
721
721
  index: a,
722
722
  top: a === void 0 ? e.top : void 0,
723
723
  left: e.left,
@@ -725,70 +725,70 @@ const qa = /* @__PURE__ */ ul({
725
725
  offset: e.offset
726
726
  }) ?? !1;
727
727
  const o = N.value;
728
- if (!o || !P.value?.contains(o)) return !1;
729
- let i = e.top;
728
+ if (!o || !O.value?.contains(o)) return !1;
729
+ let d = e.top;
730
730
  if (a !== void 0) {
731
731
  const s = o.querySelector(`[data-vtg-row-index="${a}"]`);
732
732
  if (!s) return !1;
733
- const m = s.getBoundingClientRect(), p = o.getBoundingClientRect(), y = m.top - p.top + o.scrollTop - o.clientTop, w = y + m.height, O = e.offset ?? 0, _ = e.align ?? "top";
734
- _ === "top" || _ === "auto" && y < o.scrollTop + O ? i = y - O : _ === "bottom" || _ === "auto" && w > o.scrollTop + o.clientHeight - O ? i = w - o.clientHeight + O : i = void 0;
733
+ const m = s.getBoundingClientRect(), v = o.getBoundingClientRect(), y = m.top - v.top + o.scrollTop - o.clientTop, w = y + m.height, _ = e.offset ?? 0, k = e.align ?? "top";
734
+ k === "top" || k === "auto" && y < o.scrollTop + _ ? d = y - _ : k === "bottom" || k === "auto" && w > o.scrollTop + o.clientHeight - _ ? d = w - o.clientHeight + _ : d = void 0;
735
735
  }
736
- return i !== void 0 && (o.scrollTop = Math.max(0, Math.min(i, o.scrollHeight - o.clientHeight))), e.left !== void 0 && (o.scrollLeft = Math.max(0, Math.min(e.left, o.scrollWidth - o.clientWidth))), Le(), !0;
736
+ return d !== void 0 && (o.scrollTop = Math.max(0, Math.min(d, o.scrollHeight - o.clientHeight))), e.left !== void 0 && (o.scrollLeft = Math.max(0, Math.min(e.left, o.scrollWidth - o.clientWidth))), He(), !0;
737
737
  }
738
738
  c({
739
- scrollTo: Xt,
739
+ scrollTo: qt,
740
740
  retryTreeLoad: C.retry,
741
741
  getTreeLoadError: C.getError
742
742
  });
743
- const qt = n(() => Wl(v.value)), Ke = n(() => l.virtualColumn ? R.value ? _e.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : qt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), pe = n(() => l.virtualColumn && Ke.value === null);
744
- I(Ke, (e) => {
743
+ const Jt = n(() => Ml(p.value)), Me = n(() => l.virtualColumn ? I.value ? ke.value ? "列上有 customCell / customRender,可能返回 colSpan / rowSpan;单元格合并会让某个 td 缺席,进而破坏列宽不变量(虚拟模式本就不支持合并)" : Jt.value.contiguous ? null : "固定列必须分列两端:左固定连成前缀、右固定连成后缀,中间夹着的固定列会被窗口跳过" : "它只作用于虚拟表体,需要同时开启 virtual 与 scroll.y" : null), ge = n(() => l.virtualColumn && Me.value === null);
744
+ L(Me, (e) => {
745
745
  }, {
746
746
  immediate: !0
747
747
  });
748
748
  const {
749
- metrics: Jt
750
- } = kl({
751
- enabled: () => pe.value && !E.enabled.value,
752
- headerEl: () => U.value,
753
- columns: () => v.value,
754
- columnWidths: $,
749
+ metrics: Zt
750
+ } = zl({
751
+ enabled: () => ge.value && !R.enabled.value,
752
+ headerEl: () => G.value,
753
+ columns: () => p.value,
754
+ columnWidths: U,
755
755
  hasHeader: () => l.showHeader !== !1
756
- }), Me = n(() => E.metrics.value ?? Jt.value);
757
- I([pe, Me], ([e, a]) => {
758
- !e || a || l.showHeader !== !1 || E.enabled.value;
756
+ }), je = n(() => R.metrics.value ?? Zt.value);
757
+ L([ge, je], ([e, a]) => {
758
+ !e || a || l.showHeader !== !1 || R.enabled.value;
759
759
  }, {
760
760
  immediate: !0
761
761
  });
762
- function Zt(e) {
763
- return se.value ? be.value.get(e)?.level ?? 0 : 0;
764
- }
765
- function Qt(e, a) {
766
- return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(e, a, Zt(e)) : l.rowClassName : "";
762
+ function Qt(e) {
763
+ return ce.value ? Se.value.get(e)?.level ?? 0 : 0;
767
764
  }
768
765
  function el(e, a) {
769
- return l.customRow?.(e, a);
766
+ return l.rowClassName ? typeof l.rowClassName == "function" ? l.rowClassName(e, a, Qt(e)) : l.rowClassName : "";
770
767
  }
771
768
  function tl(e, a) {
769
+ return l.customRow?.(e, a);
770
+ }
771
+ function ll(e, a) {
772
772
  return l.customHeaderRow?.(e, a);
773
773
  }
774
- function ll(e) {
774
+ function al(e) {
775
775
  if (typeof e.title != "function")
776
776
  return e.title ?? "";
777
- const a = e, o = ft.value.filter((i) => !!i.column);
777
+ const a = e, o = mt.value.filter((d) => !!d.column);
778
778
  return e.title({
779
- sortOrder: a.sorter ? ae(a) ?? void 0 : void 0,
780
- sortColumn: ct.value.column,
779
+ sortOrder: a.sorter ? oe(a) ?? void 0 : void 0,
780
+ sortColumn: ft.value.column,
781
781
  sortColumns: o.length > 0 ? o : void 0,
782
- filters: j()
782
+ filters: V()
783
783
  });
784
784
  }
785
- function al(e) {
786
- return !!(e.sorter && ae(e));
785
+ function ol(e) {
786
+ return !!(e.sorter && oe(e));
787
787
  }
788
- const je = {
788
+ const Ve = {
789
789
  width: "100%",
790
790
  minWidth: "100%"
791
- }, ol = {
791
+ }, nl = {
792
792
  widthConstraintCell: t.widthConstraintCell,
793
793
  widthConstraintInner: t.widthConstraintInner,
794
794
  widthLayoutCell: t.widthLayoutCell,
@@ -882,253 +882,275 @@ const qa = /* @__PURE__ */ ul({
882
882
  trDragging: t.trDragging,
883
883
  trDropAbove: t.trDropAbove,
884
884
  trDropBelow: t.trDropBelow
885
- }, Ve = n(() => Jl(T.value)), Ye = S(!1);
886
- return Ge(Gl, {
885
+ }, Ye = n(() => ea(E.value)), $e = D(!1), x = fl({
886
+ bodyCell: i.bodyCell,
887
+ headerCell: i.headerCell,
888
+ empty: i.empty,
889
+ customFilterDropdown: i.customFilterDropdown,
890
+ customFilterIcon: i.customFilterIcon
891
+ });
892
+ return ml(() => {
893
+ x.bodyCell = i.bodyCell, x.headerCell = i.headerCell, x.empty = i.empty, x.customFilterDropdown = i.customFilterDropdown, x.customFilterIcon = i.customFilterIcon;
894
+ }), Xe(Jl, {
887
895
  renderers: n(() => l.renderers),
888
896
  isTreeLoading: C.isLoading,
889
897
  getTreeLoadError: C.getError,
890
- columnLayout: E,
891
- bodyCell: d.bodyCell,
892
- headerCell: d.headerCell,
893
- empty: d.empty,
894
- getSortOrder: ae,
895
- toggleSortOrder: ut,
896
- isColumnSorted: al,
897
- getFilteredValue: mt,
898
+ columnLayout: R,
899
+ get bodyCell() {
900
+ return x.bodyCell;
901
+ },
902
+ get headerCell() {
903
+ return x.headerCell;
904
+ },
905
+ get empty() {
906
+ return x.empty;
907
+ },
908
+ getSortOrder: oe,
909
+ toggleSortOrder: st,
910
+ isColumnSorted: ol,
911
+ getFilteredValue: pt,
898
912
  confirmFilter: vt,
899
- resetFilter: pt,
900
- customFilterDropdown: d.customFilterDropdown,
901
- customFilterIcon: d.customFilterIcon,
902
- showSorterTooltip: n(() => l.showSorterTooltip ?? Ve.value.showSorterTooltip),
913
+ resetFilter: gt,
914
+ get customFilterDropdown() {
915
+ return x.customFilterDropdown;
916
+ },
917
+ get customFilterIcon() {
918
+ return x.customFilterIcon;
919
+ },
920
+ showSorterTooltip: n(() => l.showSorterTooltip ?? Ye.value.showSorterTooltip),
903
921
  headerEllipsis: n(() => l.headerEllipsis),
904
- subThemeSlots: ol,
905
- presetConfig: Ve,
906
- themePreset: T,
907
- cssMode: H,
908
- classPrefix: B,
909
- vtgClass: (e) => J(e, H.value, B.value),
910
- compatClass: A,
911
- localeName: W,
912
- locale: dt,
922
+ subThemeSlots: nl,
923
+ presetConfig: Ye,
924
+ themePreset: E,
925
+ cssMode: B,
926
+ classPrefix: F,
927
+ vtgClass: (e) => Z(e, B.value, F.value),
928
+ compatClass: W,
929
+ localeName: z,
930
+ locale: ut,
913
931
  rowSelection: () => l.rowSelection,
914
- isSelected: Tt,
915
- isDisabledRow: Et,
916
- getSelectionState: Rt,
917
- toggleRow: It,
918
- toggleAll: Lt,
919
- allCheckedState: () => Ht.value,
920
- getRowKey: b,
921
- invertSelection: Bt,
932
+ isSelected: Et,
933
+ isDisabledRow: Rt,
934
+ getSelectionState: It,
935
+ toggleRow: Lt,
936
+ toggleAll: Ht,
937
+ allCheckedState: () => Bt.value,
938
+ getRowKey: S,
939
+ invertSelection: Ft,
922
940
  clearSelection: Nt,
923
- getChangeableRowKeys: Ft,
924
- fixedOffsets: Ie,
925
- scrollState: Ee,
926
- leafColumnCount: n(() => v.value.length),
941
+ getChangeableRowKeys: Pt,
942
+ fixedOffsets: Le,
943
+ scrollState: Re,
944
+ leafColumnCount: n(() => p.value.length),
927
945
  bordered: n(() => l.bordered),
928
- tableLayout: X,
946
+ tableLayout: q,
929
947
  sticky: n(() => l.sticky),
930
- getRowProps: el,
931
- getRowClassName: Qt,
932
- getHeaderRowProps: tl,
933
- getColumnTitle: ll,
934
- getPopupContainer: l.getPopupContainer,
935
- transformCellText: l.transformCellText,
948
+ getRowProps: tl,
949
+ getRowClassName: el,
950
+ getHeaderRowProps: ll,
951
+ getColumnTitle: al,
952
+ get getPopupContainer() {
953
+ return l.getPopupContainer;
954
+ },
955
+ get transformCellText() {
956
+ return l.transformCellText;
957
+ },
936
958
  columnEmptyText: n(() => l.columnEmptyText),
937
959
  expandable: () => l.expandable,
938
- isExpanded: Pt,
939
- toggleExpand: _t,
940
- isRowExpandable: Se,
941
- columnWidths: $,
942
- startResize: Wt,
943
- isResizing: () => zt.value,
944
- displayColumns: n(() => v.value),
960
+ isExpanded: Ot,
961
+ toggleExpand: kt,
962
+ isRowExpandable: De,
963
+ columnWidths: U,
964
+ startResize: zt,
965
+ isResizing: () => Kt.value,
966
+ displayColumns: n(() => p.value),
945
967
  registerSummaryFixed: (e) => {
946
- Ye.value = e;
968
+ $e.value = e;
947
969
  },
948
- isTreeData: se,
970
+ isTreeData: ce,
949
971
  treeIndentColumnIndex: n(() => {
950
- const e = v.value.map((o, i) => ({
972
+ const e = p.value.map((o, d) => ({
951
973
  column: o,
952
- index: i
974
+ index: d
953
975
  })).filter(({
954
976
  column: o
955
977
  }) => o.key !== "__vtg_selection__" && o.key !== "__vtg_expand__"), a = l.expandable?.expandIconColumnIndex ?? 0;
956
978
  return e[Math.max(0, Math.min(e.length - 1, Math.floor(Number.isFinite(a) ? a : 0)))]?.index ?? -1;
957
979
  }),
958
- treeFlattenData: ue,
959
- getFlattenRow: (e) => be.value.get(e),
960
- toggleTreeExpand: xt,
961
- isTreeExpanded: wt,
962
- treeIndentSize: Ct,
963
- hoverRange: bt,
964
- setHoverRange: St,
965
- clearHoverRange: Dt,
980
+ treeFlattenData: se,
981
+ getFlattenRow: (e) => Se.value.get(e),
982
+ toggleTreeExpand: bt,
983
+ isTreeExpanded: Ct,
984
+ treeIndentSize: xt,
985
+ hoverRange: St,
986
+ setHoverRange: Dt,
987
+ clearHoverRange: Tt,
966
988
  // 拖拽期间抑制 hover 高亮,避免干扰拖放指示线
967
- hoverable: n(() => l.hoverable !== !1 && Y.draggingKey.value === null),
989
+ hoverable: n(() => l.hoverable !== !1 && $.draggingKey.value === null),
968
990
  rowDrag: {
969
991
  enabled: n(() => l.rowDraggable === !0),
970
- draggingKey: Y.draggingKey,
971
- dropTarget: Y.dropTarget,
972
- getBindings: (e, a, o) => Y.getBindings(e, a, o)
992
+ draggingKey: $.draggingKey,
993
+ dropTarget: $.dropTarget,
994
+ getBindings: (e, a, o) => $.getBindings(e, a, o)
973
995
  }
974
996
  }), () => {
975
997
  let e;
976
- const a = l.title ? l.title(g.value) : d.title ? d.title({
998
+ const a = l.title ? l.title(g.value) : i.title ? i.title({
977
999
  data: g.value
978
- }) : null, o = l.footer ? l.footer(g.value) : d.footer ? d.footer({
1000
+ }) : null, o = l.footer ? l.footer(g.value) : i.footer ? i.footer({
979
1001
  data: g.value
980
- }) : null, i = d.summary ? d.summary() : null, s = Ye.value !== !1, m = l.scroll, p = {
981
- tableLayout: X.value
1002
+ }) : null, d = i.summary ? i.summary() : null, s = $e.value !== !1, m = l.scroll, v = {
1003
+ tableLayout: q.value
982
1004
  };
983
- m?.x ? (p.width = typeof m.x == "number" ? `${m.x}px` : m.x, p.minWidth = "100%") : p.width = "100%", Object.assign(p, E.tableStyle.value);
984
- const y = l.loading, w = x.value, O = typeof y == "object" && y !== null ? y.indicator : void 0, _ = typeof y == "object" && y !== null ? y.tip : void 0, $e = w && (d.loading ? r(tt, {
1005
+ m?.x ? (v.width = typeof m.x == "number" ? `${m.x}px` : m.x, v.minWidth = "100%") : v.width = "100%", Object.assign(v, R.tableStyle.value);
1006
+ const y = l.loading, w = b.value, _ = typeof y == "object" && y !== null ? y.indicator : void 0, k = typeof y == "object" && y !== null ? y.tip : void 0, Ue = w && (i.loading ? r(lt, {
985
1007
  loadingClass: t.loading()
986
- }, at(e = d.loading()) ? e : {
1008
+ }, ot(e = i.loading()) ? e : {
987
1009
  default: () => [e]
988
- }) : r(tt, {
1010
+ }) : r(lt, {
989
1011
  loadingClass: t.loading(),
990
- indicator: O,
991
- tip: _
1012
+ indicator: _,
1013
+ tip: k
992
1014
  }, null));
993
- if (Be.value) {
994
- const nl = l.showHeader !== !1 ? r("div", {
995
- ref: U,
996
- class: L(t.headerWrapper(), F.value && A?.("sticky-holder")),
997
- style: jt.value
1015
+ if (Fe.value) {
1016
+ const rl = l.showHeader !== !1 ? r("div", {
1017
+ ref: G,
1018
+ class: H(t.headerWrapper(), P.value && W?.("sticky-holder")),
1019
+ style: Vt.value
998
1020
  }, [r("div", {
999
- class: J("block w-full min-w-full", H.value, B.value)
1021
+ class: Z("block w-full min-w-full", B.value, F.value)
1000
1022
  }, [r("table", {
1001
1023
  "data-vtg-table": "",
1002
- class: K.value,
1003
- style: p
1004
- }, [r(Q, {
1005
- columns: v.value
1006
- }, null), r(ee, null, null), r(Qe, {
1007
- rows: ce.value,
1024
+ class: M.value,
1025
+ style: v
1026
+ }, [r(ee, {
1027
+ columns: p.value
1028
+ }, null), r(te, null, null), r(et, {
1029
+ rows: fe.value,
1008
1030
  theadClass: t.thead(),
1009
1031
  rowClass: t.tr(),
1010
- thClass: Ae.value,
1032
+ thClass: We.value,
1011
1033
  headerCellInnerClass: t.headerCellInner()
1012
- }, null)])])]) : null, rl = R.value ? r(Zl, {
1013
- ref: ie,
1034
+ }, null)])])]) : null, il = I.value ? r(ta, {
1035
+ ref: de,
1014
1036
  dataSource: g.value,
1015
- columns: v.value,
1037
+ columns: p.value,
1016
1038
  tbodyClass: t.tbody(),
1017
1039
  rowClass: t.tr(),
1018
- tdClass: me.value,
1040
+ tdClass: pe.value,
1019
1041
  emptyClass: t.empty(),
1020
1042
  bodyCellEllipsisClass: t.bodyCellEllipsis(),
1021
- tableClass: K.value,
1022
- tableStyle: p,
1043
+ tableClass: M.value,
1044
+ tableStyle: v,
1023
1045
  rowKey: l.rowKey,
1024
- height: $t.value,
1025
- itemHeight: Yt.value,
1026
- fixedHeight: Ut.value,
1027
- virtualColumn: pe.value,
1028
- columnMetrics: Me.value,
1046
+ height: Ut.value,
1047
+ itemHeight: $t.value,
1048
+ fixedHeight: Gt.value,
1049
+ virtualColumn: ge.value,
1050
+ columnMetrics: je.value,
1029
1051
  showScrollBar: "hover",
1030
- onVirtualScroll: (Ue) => {
1031
- Kt(Ue.x, Ue.maxX);
1052
+ onVirtualScroll: (Ge) => {
1053
+ Mt(Ge.x, Ge.maxX);
1032
1054
  }
1033
- }, null) : null, il = R.value ? null : r(Je, {
1034
- ref: We,
1035
- maxHeight: Vt.value,
1055
+ }, null) : null, dl = I.value ? null : r(Ze, {
1056
+ ref: ze,
1057
+ maxHeight: Yt.value,
1036
1058
  wrapClass: t.bodyWrapper(),
1037
- viewStyle: je,
1038
- onScroll: Re
1059
+ viewStyle: Ve,
1060
+ onScroll: Ie
1039
1061
  }, {
1040
1062
  default: () => [r("table", {
1041
1063
  "data-vtg-table": "",
1042
- class: K.value,
1043
- style: p
1044
- }, [r(Q, {
1045
- columns: v.value
1046
- }, null), r(ee, null, null), r(et, {
1064
+ class: M.value,
1065
+ style: v
1066
+ }, [r(ee, {
1067
+ columns: p.value
1068
+ }, null), r(te, null, null), r(tt, {
1047
1069
  dataSource: g.value,
1048
- columns: v.value,
1070
+ columns: p.value,
1049
1071
  tbodyClass: t.tbody(),
1050
1072
  rowClass: t.tr(),
1051
- tdClass: me.value,
1073
+ tdClass: pe.value,
1052
1074
  emptyClass: t.empty(),
1053
1075
  bodyCellEllipsisClass: t.bodyCellEllipsis(),
1054
1076
  rowKey: l.rowKey
1055
- }, null), i && !s && r("tfoot", {
1077
+ }, null), d && !s && r("tfoot", {
1056
1078
  class: t.summary()
1057
- }, [i])])]
1058
- }), dl = i && (s || R.value) ? r("div", {
1059
- ref: q,
1060
- class: L(t.headerWrapper(), A?.("summary"), F.value && s && A?.("sticky-holder")),
1079
+ }, [d])])]
1080
+ }), ul = d && (s || I.value) ? r("div", {
1081
+ ref: J,
1082
+ class: H(t.headerWrapper(), W?.("summary"), P.value && s && W?.("sticky-holder")),
1061
1083
  style: s ? {
1062
1084
  position: "sticky",
1063
- bottom: `${F.value?.offsetSummary ?? 0}px`,
1085
+ bottom: `${P.value?.offsetSummary ?? 0}px`,
1064
1086
  zIndex: "4",
1065
1087
  overflow: "hidden"
1066
1088
  } : void 0
1067
1089
  }, [r("div", {
1068
- class: J("block w-full min-w-full", H.value, B.value)
1090
+ class: Z("block w-full min-w-full", B.value, F.value)
1069
1091
  }, [r("table", {
1070
1092
  "data-vtg-table": "",
1071
- class: K.value,
1072
- style: p
1073
- }, [r(Q, {
1074
- columns: v.value
1075
- }, null), r(ee, null, null), r("tfoot", {
1093
+ class: M.value,
1094
+ style: v
1095
+ }, [r(ee, {
1096
+ columns: p.value
1097
+ }, null), r(te, null, null), r("tfoot", {
1076
1098
  class: t.summary()
1077
- }, [i])])])]) : null;
1099
+ }, [d])])])]) : null;
1078
1100
  return r("div", {
1079
- ref: P,
1080
- class: L(t.root(), G.value && t.rootAutoHeight(), He.value, we.value)
1081
- }, [V("top"), a && r("div", {
1101
+ ref: O,
1102
+ class: H(t.root(), X.value && t.rootAutoHeight(), Be.value, Ce.value)
1103
+ }, [Y("top"), a && r("div", {
1082
1104
  class: t.title()
1083
1105
  }, [a]), r("div", {
1084
- ref: Pe,
1085
- class: L(t.wrapper(), G.value && t.wrapperAutoHeight(), F.value && J("overflow-clip", H.value, B.value))
1086
- }, [nl, rl, il, dl, $e]), o && r("div", {
1106
+ ref: Oe,
1107
+ class: H(t.wrapper(), X.value && t.wrapperAutoHeight(), P.value && Z("overflow-clip", B.value, F.value))
1108
+ }, [rl, il, dl, ul, Ue]), o && r("div", {
1087
1109
  class: t.footer()
1088
- }, [o]), V("bottom")]);
1110
+ }, [o]), Y("bottom")]);
1089
1111
  }
1090
- const ge = r(cl, null, [r("table", {
1112
+ const ye = r(pl, null, [r("table", {
1091
1113
  "data-vtg-table": "",
1092
- class: K.value,
1093
- style: p
1094
- }, [r(Q, {
1095
- columns: v.value
1096
- }, null), r(ee, null, null), l.showHeader !== !1 && r(Qe, {
1097
- rows: ce.value,
1114
+ class: M.value,
1115
+ style: v
1116
+ }, [r(ee, {
1117
+ columns: p.value
1118
+ }, null), r(te, null, null), l.showHeader !== !1 && r(et, {
1119
+ rows: fe.value,
1098
1120
  theadClass: t.thead(),
1099
1121
  rowClass: t.tr(),
1100
- thClass: Ae.value,
1122
+ thClass: We.value,
1101
1123
  headerCellInnerClass: t.headerCellInner()
1102
- }, null), r(et, {
1124
+ }, null), r(tt, {
1103
1125
  dataSource: g.value,
1104
- columns: v.value,
1126
+ columns: p.value,
1105
1127
  tbodyClass: t.tbody(),
1106
1128
  rowClass: t.tr(),
1107
- tdClass: me.value,
1129
+ tdClass: pe.value,
1108
1130
  emptyClass: t.empty(),
1109
1131
  bodyCellEllipsisClass: t.bodyCellEllipsis(),
1110
1132
  rowKey: l.rowKey
1111
- }, null), i && r("tfoot", {
1133
+ }, null), d && r("tfoot", {
1112
1134
  class: t.summary()
1113
- }, [i])]), $e]);
1135
+ }, [d])]), Ue]);
1114
1136
  return r("div", {
1115
- ref: P,
1116
- class: L(t.root(), He.value, we.value)
1117
- }, [V("top"), a && r("div", {
1137
+ ref: O,
1138
+ class: H(t.root(), Be.value, Ce.value)
1139
+ }, [Y("top"), a && r("div", {
1118
1140
  class: t.title()
1119
- }, [a]), r(Je, {
1120
- ref: ze,
1141
+ }, [a]), r(Ze, {
1142
+ ref: Ke,
1121
1143
  wrapClass: t.wrapper(),
1122
- viewStyle: je,
1123
- onScroll: Re
1124
- }, at(ge) ? ge : {
1125
- default: () => [ge]
1144
+ viewStyle: Ve,
1145
+ onScroll: Ie
1146
+ }, ot(ye) ? ye : {
1147
+ default: () => [ye]
1126
1148
  }), o && r("div", {
1127
1149
  class: t.footer()
1128
- }, [o]), V("bottom")]);
1150
+ }, [o]), Y("bottom")]);
1129
1151
  };
1130
1152
  }
1131
1153
  });
1132
1154
  export {
1133
- qa as default
1155
+ Qa as default
1134
1156
  };