@vtable-guild/vtable-guild 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/css/style.css +9 -0
  2. package/css/tailwind3-utilities.css +9 -0
  3. package/dist/core/src/components/VirtualList/VirtualList.d.ts +21 -0
  4. package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
  5. package/dist/core/src/components/VirtualList/VirtualList.mjs +201 -216
  6. package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts +7 -1
  7. package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts.map +1 -1
  8. package/dist/core/src/components/VirtualList/hooks/useHeights.mjs +29 -27
  9. package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts +3 -1
  10. package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts.map +1 -1
  11. package/dist/core/src/components/VirtualList/hooks/useScrollTo.mjs +57 -50
  12. package/dist/core/src/components/VirtualList/index.d.ts +1 -0
  13. package/dist/core/src/components/VirtualList/index.d.ts.map +1 -1
  14. package/dist/core/src/components/VirtualList/utils/PrefixSums.d.ts +50 -0
  15. package/dist/core/src/components/VirtualList/utils/PrefixSums.d.ts.map +1 -0
  16. package/dist/core/src/components/VirtualList/utils/PrefixSums.mjs +54 -0
  17. package/dist/core/src/components/VirtualList/utils/PrefixSums.test.d.ts +2 -0
  18. package/dist/core/src/components/VirtualList/utils/PrefixSums.test.d.ts.map +1 -0
  19. package/dist/core/src/composables/useTheme.d.ts +1 -1
  20. package/dist/core/src/composables/useTheme.mjs +5 -5
  21. package/dist/core/src/index.d.ts +5 -0
  22. package/dist/core/src/index.d.ts.map +1 -1
  23. package/dist/core/src/plugin/index.d.ts +1 -1
  24. package/dist/core/src/utils/props.d.ts +1 -1
  25. package/dist/core/src/utils/tv.d.ts +2 -2
  26. package/dist/core/src/utils/types.d.ts +2 -2
  27. package/dist/css/style.css +9 -0
  28. package/dist/css/tailwind3-utilities.css +9 -0
  29. package/dist/index.full.mjs +3614 -3292
  30. package/dist/index.mjs +32 -30
  31. package/dist/table/src/components/ColGroup.d.ts.map +1 -1
  32. package/dist/table/src/components/ColGroup.mjs +11 -8
  33. package/dist/table/src/components/Table.d.ts +62 -0
  34. package/dist/table/src/components/Table.d.ts.map +1 -1
  35. package/dist/table/src/components/Table.mjs +353 -298
  36. package/dist/table/src/components/TableBody.d.ts.map +1 -1
  37. package/dist/table/src/components/TableBody.mjs +22 -22
  38. package/dist/table/src/components/TableCell.d.ts +23 -0
  39. package/dist/table/src/components/TableCell.d.ts.map +1 -1
  40. package/dist/table/src/components/TableCell.mjs +50 -39
  41. package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
  42. package/dist/table/src/components/TableHeaderCell.mjs +172 -169
  43. package/dist/table/src/components/VTable.vue.mjs +10 -8
  44. package/dist/table/src/components/VirtualTableBody.d.ts +40 -0
  45. package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
  46. package/dist/table/src/components/VirtualTableBody.mjs +157 -67
  47. package/dist/table/src/composables/index.d.ts +4 -0
  48. package/dist/table/src/composables/index.d.ts.map +1 -1
  49. package/dist/table/src/composables/useColumnMetrics.d.ts +39 -0
  50. package/dist/table/src/composables/useColumnMetrics.d.ts.map +1 -0
  51. package/dist/table/src/composables/useColumnMetrics.mjs +88 -0
  52. package/dist/table/src/composables/useColumnWindow.d.ts +90 -0
  53. package/dist/table/src/composables/useColumnWindow.d.ts.map +1 -0
  54. package/dist/table/src/composables/useColumnWindow.mjs +62 -0
  55. package/dist/table/src/composables/useColumnWindow.test.d.ts +2 -0
  56. package/dist/table/src/composables/useColumnWindow.test.d.ts.map +1 -0
  57. package/dist/table/src/composables/useColumns.d.ts +8 -0
  58. package/dist/table/src/composables/useColumns.d.ts.map +1 -1
  59. package/dist/table/src/composables/useColumns.mjs +46 -43
  60. package/dist/table/src/composables/useSelection.d.ts.map +1 -1
  61. package/dist/table/src/composables/useSelection.mjs +93 -94
  62. package/dist/table/src/composables/useVirtual.d.ts +10 -0
  63. package/dist/table/src/composables/useVirtual.d.ts.map +1 -1
  64. package/dist/table/src/composables/useVirtual.mjs +15 -11
  65. package/dist/table/src/index.d.ts +2 -0
  66. package/dist/table/src/index.d.ts.map +1 -1
  67. package/dist/table/src/types/table.d.ts +25 -0
  68. package/dist/table/src/types/table.d.ts.map +1 -1
  69. package/dist/theme/src/presets/antdv/table.d.ts +3 -0
  70. package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
  71. package/dist/theme/src/presets/antdv/table.mjs +4 -1
  72. package/package.json +10 -3
  73. package/dist/core/src/components/VirtualList/hooks/useDiffItem.d.ts +0 -4
  74. package/dist/core/src/components/VirtualList/hooks/useDiffItem.d.ts.map +0 -1
  75. package/dist/core/src/components/VirtualList/hooks/useDiffItem.mjs +0 -16
  76. package/dist/core/src/components/VirtualList/utils/algorithmUtil.d.ts +0 -7
  77. package/dist/core/src/components/VirtualList/utils/algorithmUtil.d.ts.map +0 -1
  78. package/dist/core/src/components/VirtualList/utils/algorithmUtil.mjs +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AAOtE,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;;;cAkBd,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;;;;cACtC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAO3C,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;;;;;cAR9D,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;;;;cACtC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAO3C,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;;;;+BAAjC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG;;AAX7F,wBAwJE"}
1
+ {"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AAOtE,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;;;cAkBd,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;;;;cACtC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAO3C,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;;;;;cAR9D,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;;;;cACtC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAO3C,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;;;;+BAAjC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG;;AAX7F,wBA2JE"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, inject as x, computed as h, createVNode as u } from "vue";
1
+ import { defineComponent as b, inject as x, computed as h, createVNode as u } from "vue";
2
2
  import "../../../core/src/utils/tv.mjs";
3
3
  import E from "./TableRow.mjs";
4
4
  import T from "./TableCell.mjs";
@@ -6,11 +6,11 @@ import v from "./TableEmpty.mjs";
6
6
  import { TABLE_CONTEXT_KEY as k } from "../context.mjs";
7
7
  import { resolveBodyCell as K } from "../utils/cell.mjs";
8
8
  import { getByDataIndex as N } from "../composables/useColumns.mjs";
9
- import { cn as p } from "tailwind-variants";
10
- function R(e) {
9
+ import { cn as R } from "tailwind-variants";
10
+ function p(e) {
11
11
  return Number.isFinite(e) ? e <= 0 ? 0 : Math.floor(e) : 1;
12
12
  }
13
- const j = /* @__PURE__ */ g({
13
+ const j = /* @__PURE__ */ b({
14
14
  name: "TableBody",
15
15
  props: {
16
16
  dataSource: {
@@ -47,11 +47,11 @@ const j = /* @__PURE__ */ g({
47
47
  }
48
48
  },
49
49
  setup(e) {
50
- const l = x(k, {});
51
- function S(t, n) {
50
+ const a = x(k, {});
51
+ function g(t, n) {
52
52
  return typeof e.rowKey == "function" ? e.rowKey(t) : typeof e.rowKey == "string" && e.rowKey in t ? t[e.rowKey] : n;
53
53
  }
54
- const b = h(() => {
54
+ const S = h(() => {
55
55
  const t = /* @__PURE__ */ new Set();
56
56
  return e.dataSource.map((n, o) => {
57
57
  const s = [];
@@ -63,14 +63,14 @@ const j = /* @__PURE__ */ g({
63
63
  record: n,
64
64
  rowIndex: o,
65
65
  column: m,
66
- bodyCell: l.bodyCell,
67
- transformCellText: l.transformCellText
68
- }), C = R(y.colSpan), d = R(y.rowSpan);
66
+ bodyCell: a.bodyCell,
67
+ transformCellText: a.transformCellText
68
+ }), C = p(y.colSpan), d = p(y.rowSpan);
69
69
  if (C === 0 || d === 0) return;
70
70
  const f = Math.min(e.dataSource.length, o + d), w = Math.min(e.columns.length, r + C);
71
71
  for (let i = o; i < f; i += 1)
72
- for (let a = r; a < w; a += 1)
73
- i === o && a === r || t.add(`${i}:${a}`);
72
+ for (let l = r; l < w; l += 1)
73
+ i === o && l === r || t.add(`${i}:${l}`);
74
74
  s.push({
75
75
  column: m,
76
76
  colIndex: r,
@@ -86,31 +86,31 @@ const j = /* @__PURE__ */ g({
86
86
  return () => u("tbody", {
87
87
  class: e.tbodyClass
88
88
  }, [e.dataSource.length > 0 ? e.dataSource.map((t, n) => {
89
- const o = S(t, n), s = l.expandable?.(), m = l.isExpanded?.(o) ?? !1, r = s?.expandRowByClick ?? !1, c = l.isRowExpandable?.(t) ?? !1, C = l.treeFlattenData?.value?.find((a) => a.record === t)?.level ?? 0, d = l.getRowClassName?.(t, n), f = l.getRowProps?.(t, n), w = typeof s?.expandedRowClassName == "function" ? s.expandedRowClassName(t, n, C) : s?.expandedRowClassName, i = r ? () => {
90
- c && l.toggleExpand?.(t, n);
89
+ const o = g(t, n), s = a.expandable?.(), m = a.isExpanded?.(o) ?? !1, r = s?.expandRowByClick ?? !1, c = a.isRowExpandable?.(t) ?? !1, C = (a.isTreeData?.value ? a.getFlattenRow?.(t) : void 0)?.level ?? 0, d = a.getRowClassName?.(t, n), f = a.getRowProps?.(t, n), w = typeof s?.expandedRowClassName == "function" ? s.expandedRowClassName(t, n, C) : s?.expandedRowClassName, i = r ? () => {
90
+ c && a.toggleExpand?.(t, n);
91
91
  } : void 0;
92
92
  return [u(E, {
93
93
  key: o,
94
- rowClass: p(e.rowClass, d) ?? "",
94
+ rowClass: R(e.rowClass, d) ?? "",
95
95
  rowProps: f,
96
96
  onClick: i
97
97
  }, {
98
- default: () => [b.value[n]?.map((a) => u(T, {
99
- key: a.column.key ?? String(a.column.dataIndex ?? a.colIndex),
98
+ default: () => [S.value[n]?.map((l) => u(T, {
99
+ key: l.column.key ?? String(l.column.dataIndex ?? l.colIndex),
100
100
  record: t,
101
101
  rowIndex: n,
102
- column: a.column,
103
- colIndex: a.colIndex,
104
- resolvedCell: a.resolvedCell,
102
+ column: l.column,
103
+ colIndex: l.colIndex,
104
+ resolvedCell: l.resolvedCell,
105
105
  tdClass: e.tdClass,
106
106
  bodyCellEllipsisClass: e.bodyCellEllipsisClass
107
107
  }, null))]
108
108
  }), m && s?.expandedRowRender && u("tr", {
109
109
  key: `${o}-expanded`,
110
- class: p(e.rowClass, d, l.subThemeSlots?.expandedRow(), w)
110
+ class: R(e.rowClass, d, a.subThemeSlots?.expandedRow(), w)
111
111
  }, [u("td", {
112
112
  colspan: e.columns.length,
113
- class: p(e.tdClass, l.subThemeSlots?.expandedRowCell())
113
+ class: R(e.tdClass, a.subThemeSlots?.expandedRowCell())
114
114
  }, [s.expandedRowRender(t, n, 0, !0)])])];
115
115
  }) : u(v, {
116
116
  colSpan: e.columns.length || 1,
@@ -30,6 +30,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
30
30
  type: StringConstructor;
31
31
  required: true;
32
32
  };
33
+ /**
34
+ * 实测列宽(px),仅横向虚拟化时传入。
35
+ *
36
+ * 必要而非优化:窗口化之后表体的这一行不再包含全部列,若某列没有声明宽度,
37
+ * 浏览器会按窗口后的结构重新分配余量,与始终渲染全部列的表头对不上。
38
+ * 把从表头量到的宽度显式写回来,表体布局才被钉死。
39
+ */
40
+ widthOverride: {
41
+ type: NumberConstructor;
42
+ default: undefined;
43
+ };
33
44
  }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
34
45
  record: {
35
46
  type: PropType<Record<string, unknown>>;
@@ -59,8 +70,20 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
59
70
  type: StringConstructor;
60
71
  required: true;
61
72
  };
73
+ /**
74
+ * 实测列宽(px),仅横向虚拟化时传入。
75
+ *
76
+ * 必要而非优化:窗口化之后表体的这一行不再包含全部列,若某列没有声明宽度,
77
+ * 浏览器会按窗口后的结构重新分配余量,与始终渲染全部列的表头对不上。
78
+ * 把从表头量到的宽度显式写回来,表体布局才被钉死。
79
+ */
80
+ widthOverride: {
81
+ type: NumberConstructor;
82
+ default: undefined;
83
+ };
62
84
  }>> & Readonly<{}>, {
63
85
  resolvedCell: ResolvedBodyCell;
86
+ widthOverride: number;
64
87
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
65
88
  export default _default;
66
89
  //# sourceMappingURL=TableCell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,QAAQ,EAAmB,MAAM,KAAK,CAAA;AAG5F,OAAO,KAAK,EAAuB,UAAU,EAAE,MAAM,UAAU,CAAA;AAK/D,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;;;cAQQ,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;;;;cAEjC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;cAGrD,QAAQ,CAAC,gBAAgB,CAAC;;;;;;;;;;;;;cALlB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;;;;cAEjC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;cAGrD,QAAQ,CAAC,gBAAgB,CAAC;;;;;;;;;;;;;;AARhD,wBAsZE"}
1
+ {"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,QAAQ,EAAmB,MAAM,KAAK,CAAA;AAG5F,OAAO,KAAK,EAAuB,UAAU,EAAE,MAAM,UAAU,CAAA;AAK/D,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;;;cAQQ,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;;;;cAEjC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;cAGrD,QAAQ,CAAC,gBAAgB,CAAC;;;;;;;;;;;IAK5C;;;;;;OAMG;;;;;;;cAhBuB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;;;;cAEjC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;cAGrD,QAAQ,CAAC,gBAAgB,CAAC;;;;;;;;;;;IAK5C;;;;;;OAMG;;;;;;;;;AAnBP,wBAgaE"}
@@ -1,15 +1,15 @@
1
- import { defineComponent as J, inject as Q, ref as B, computed as c, createVNode as r, mergeProps as L } from "vue";
1
+ import { defineComponent as J, inject as Q, ref as q, computed as d, createVNode as r, mergeProps as B } from "vue";
2
2
  import "../../../core/src/utils/tv.mjs";
3
3
  import U from "../../../core/src/components/Tooltip.mjs";
4
4
  import { TABLE_CONTEXT_KEY as Z } from "../context.mjs";
5
- import { getByDataIndex as ee, getColumnKey as O } from "../composables/useColumns.mjs";
5
+ import { getByDataIndex as ee, getColumnKey as L } from "../composables/useColumns.mjs";
6
6
  import { useFixedColumnStyle as le } from "../composables/useFixedColumnStyle.mjs";
7
- import { resolveBodyCell as ne, omitCellProps as P, isRenderedCell as te, getEllipsisConfig as oe } from "../utils/cell.mjs";
7
+ import { resolveBodyCell as ne, omitCellProps as N, isRenderedCell as te, getEllipsisConfig as oe } from "../utils/cell.mjs";
8
8
  import ae from "./SelectionCheckbox.mjs";
9
9
  import se from "./SelectionRadio.mjs";
10
- import N from "./ExpandIcon.mjs";
10
+ import P from "./ExpandIcon.mjs";
11
11
  import { isInHoverRange as re } from "../composables/useHoverState.mjs";
12
- import { TABLE_ALIGN_CLASSES as ce } from "../../../theme/src/presets/antdv/table.mjs";
12
+ import { TABLE_ALIGN_CLASSES as de } from "../../../theme/src/presets/antdv/table.mjs";
13
13
  import { cn as m } from "tailwind-variants";
14
14
  const Ie = /* @__PURE__ */ J({
15
15
  name: "TableCell",
@@ -41,30 +41,41 @@ const Ie = /* @__PURE__ */ J({
41
41
  bodyCellEllipsisClass: {
42
42
  type: String,
43
43
  required: !0
44
+ },
45
+ /**
46
+ * 实测列宽(px),仅横向虚拟化时传入。
47
+ *
48
+ * 必要而非优化:窗口化之后表体的这一行不再包含全部列,若某列没有声明宽度,
49
+ * 浏览器会按窗口后的结构重新分配余量,与始终渲染全部列的表头对不上。
50
+ * 把从表头量到的宽度显式写回来,表体布局才被钉死。
51
+ */
52
+ widthOverride: {
53
+ type: Number,
54
+ default: void 0
44
55
  }
45
56
  },
46
57
  setup(e) {
47
- const l = Q(Z, {}), H = B(null), I = B(!1), o = c(() => e.resolvedCell ?? ne({
58
+ const l = Q(Z, {}), H = q(null), I = q(!1), o = d(() => e.resolvedCell ?? ne({
48
59
  text: ee(e.record, e.column.dataIndex),
49
60
  record: e.record,
50
61
  rowIndex: e.rowIndex,
51
62
  column: e.column,
52
63
  bodyCell: l.bodyCell,
53
64
  transformCellText: l.transformCellText
54
- })), D = c(() => {
65
+ })), D = d(() => {
55
66
  if (!e.column.fixed) return null;
56
- const n = O(e.column) ?? e.colIndex;
67
+ const n = L(e.column) ?? e.colIndex;
57
68
  return l.fixedOffsets?.value?.get(n) ?? null;
58
69
  }), {
59
- fixedStyle: W,
70
+ fixedStyle: j,
60
71
  fixedClass: T
61
72
  } = le({
62
73
  fixedInfo: () => D.value
63
- }), i = c(() => l.getSelectionState?.(e.record, e.rowIndex) ?? {
74
+ }), i = d(() => l.getSelectionState?.(e.record, e.rowIndex) ?? {
64
75
  checked: !1,
65
76
  indeterminate: !1,
66
77
  disabled: !1
67
- }), f = c(() => i.value.checked), _ = c(() => re(e.rowIndex, o.value.rowSpan ?? 1, l.hoverRange?.value ?? null));
78
+ }), f = d(() => i.value.checked), _ = d(() => re(e.rowIndex, o.value.rowSpan ?? 1, l.hoverRange?.value ?? null));
68
79
  function S() {
69
80
  if (!l.hoverable?.value) return;
70
81
  const n = Math.max(1, o.value.rowSpan ?? 1);
@@ -73,31 +84,31 @@ const Ie = /* @__PURE__ */ J({
73
84
  function h() {
74
85
  l.hoverable?.value && l.clearHoverRange?.();
75
86
  }
76
- function j(n) {
87
+ function A(n) {
77
88
  return (t) => {
78
89
  S(), typeof n == "function" && n(t);
79
90
  };
80
91
  }
81
- function A(n) {
92
+ function W(n) {
82
93
  return (t) => {
83
94
  h(), typeof n == "function" && n(t);
84
95
  };
85
96
  }
86
- const E = c(() => ({
87
- ...P(o.value.renderCellProps),
88
- ...P(o.value.customCellProps)
89
- })), z = c(() => {
90
- const n = e.column.align ? ce[e.column.align] : "", t = l.subThemeSlots, a = _.value && l.hoverable?.value, x = l.isColumnSorted?.(e.column) && t ? t.tdSorted() : "", R = f.value && t ? m(t.tdSelected(), a ? t.tdRowSelectedHover() : "") : "", k = a && t && !f.value ? t.tdRowHover() : "";
97
+ const E = d(() => ({
98
+ ...N(o.value.renderCellProps),
99
+ ...N(o.value.customCellProps)
100
+ })), K = d(() => {
101
+ const n = e.column.align ? de[e.column.align] : "", t = l.subThemeSlots, a = _.value && l.hoverable?.value, x = l.isColumnSorted?.(e.column) && t ? t.tdSorted() : "", R = f.value && t ? m(t.tdSelected(), a ? t.tdRowSelectedHover() : "") : "", k = a && t && !f.value ? t.tdRowHover() : "";
91
102
  return m(e.tdClass, n, e.column.className, o.value.customCellProps?.class, o.value.customCellProps?.className, o.value.renderCellProps?.class, o.value.renderCellProps?.className, x, R, k, T.value);
92
- }), w = c(() => {
93
- const n = {}, a = l.columnWidths?.[String(O(e.column) ?? e.colIndex)] ?? e.column.width;
103
+ }), w = d(() => {
104
+ const n = {}, t = l.columnWidths?.[String(L(e.column) ?? e.colIndex)], a = e.widthOverride ?? t ?? e.column.width;
94
105
  return a && (n.width = typeof a == "number" ? `${a}px` : a), {
95
106
  ...n,
96
- ...W.value ?? {},
107
+ ...j.value ?? {},
97
108
  ...o.value.customCellProps?.style ?? {},
98
109
  ...o.value.renderCellProps?.style ?? {}
99
110
  };
100
- }), K = c(() => l.isTreeData?.value ? l.getFlattenRow?.(e.record) ?? null : null), F = c(() => l.isTreeData?.value && e.column.key !== "__vtg_selection__" && e.column.key !== "__vtg_expand__" && e.colIndex <= 2 ? (() => {
111
+ }), z = d(() => l.isTreeData?.value ? l.getFlattenRow?.(e.record) ?? null : null), F = d(() => l.isTreeData?.value && e.column.key !== "__vtg_selection__" && e.column.key !== "__vtg_expand__" && e.colIndex <= 2 ? (() => {
101
112
  const n = l.rowSelection?.(), t = l.expandable?.();
102
113
  let a = 0;
103
114
  return n && (a += 1), t && t.showExpandColumn !== !1 && (a += 1), e.colIndex === a;
@@ -123,20 +134,20 @@ const Ie = /* @__PURE__ */ J({
123
134
  const v = l.rowSelection?.(), C = v?.type === "radio" ? r(se, {
124
135
  checked: i.value.checked,
125
136
  disabled: i.value.disabled,
126
- onChange: (d) => l.toggleRow?.(e.record, e.rowIndex, d)
137
+ onChange: (c) => l.toggleRow?.(e.record, e.rowIndex, c)
127
138
  }, null) : r(ae, {
128
139
  checked: i.value.checked,
129
140
  indeterminate: i.value.indeterminate,
130
141
  disabled: i.value.disabled,
131
- onChange: (d, y) => l.toggleRow?.(e.record, e.rowIndex, y)
142
+ onChange: (c, y) => l.toggleRow?.(e.record, e.rowIndex, y)
132
143
  }, null);
133
144
  let u = C, s;
134
145
  if (v?.renderCell) {
135
- const d = v.renderCell(i.value.checked, e.record, e.rowIndex, C);
136
- te(d) ? (u = d.children, s = d.props) : u = d;
146
+ const c = v.renderCell(i.value.checked, e.record, e.rowIndex, C);
147
+ te(c) ? (u = c.children, s = c.props) : u = c;
137
148
  }
138
- const g = !!v?.renderCell, b = _.value && l.hoverable?.value, M = m(e.tdClass, l.vtgClass?.(g ? "text-center" : "text-center leading-[0]"), e.column.className, s?.class, s?.className, f.value && l.subThemeSlots ? m(l.subThemeSlots.tdSelected(), b ? l.subThemeSlots.tdRowSelectedHover() : "") : b && l.subThemeSlots ? l.subThemeSlots.tdRowHover() : "", T.value);
139
- return r("td", L(P(s), {
149
+ const b = !!v?.renderCell, g = _.value && l.hoverable?.value, M = m(e.tdClass, l.vtgClass?.(b ? "text-center" : "text-center leading-[0]"), e.column.className, s?.class, s?.className, f.value && l.subThemeSlots ? m(l.subThemeSlots.tdSelected(), g ? l.subThemeSlots.tdRowSelectedHover() : "") : g && l.subThemeSlots ? l.subThemeSlots.tdRowHover() : "", T.value);
150
+ return r("td", B(N(s), {
140
151
  class: M,
141
152
  style: $(s?.style),
142
153
  colspan: n,
@@ -146,7 +157,7 @@ const Ie = /* @__PURE__ */ J({
146
157
  }), [u]);
147
158
  }
148
159
  if (e.column.key === "__vtg_expand__") {
149
- const v = l.expandable?.(), p = l.getRowKey?.(e.record, e.rowIndex), C = p !== void 0 && (l.isExpanded?.(p) ?? !1), u = l.isRowExpandable?.(e.record) ?? !1, s = l.subThemeSlots, g = _.value && l.hoverable?.value, b = l.isColumnSorted?.(e.column) && s ? s.tdSorted() : "", M = f.value && s ? m(s.tdSelected(), g ? s.tdRowSelectedHover() : "") : "", d = g && s && !f.value ? s.tdRowHover() : "", y = m(e.tdClass, l.vtgClass?.("text-center"), e.column.className, b, M, d, T.value);
160
+ const v = l.expandable?.(), p = l.getRowKey?.(e.record, e.rowIndex), C = p !== void 0 && (l.isExpanded?.(p) ?? !1), u = l.isRowExpandable?.(e.record) ?? !1, s = l.subThemeSlots, b = _.value && l.hoverable?.value, g = l.isColumnSorted?.(e.column) && s ? s.tdSorted() : "", M = f.value && s ? m(s.tdSelected(), b ? s.tdRowSelectedHover() : "") : "", c = b && s && !f.value ? s.tdRowHover() : "", y = m(e.tdClass, l.vtgClass?.("text-center"), e.column.className, g, M, c, T.value);
150
161
  return v?.expandIcon ? r("td", {
151
162
  class: y,
152
163
  style: w.value,
@@ -158,7 +169,7 @@ const Ie = /* @__PURE__ */ J({
158
169
  expanded: C,
159
170
  record: e.record,
160
171
  expandable: u,
161
- onExpand: (de, Y) => {
172
+ onExpand: (ce, Y) => {
162
173
  Y.stopPropagation(), u && l.toggleExpand?.(e.record, e.rowIndex);
163
174
  }
164
175
  })]) : r("td", {
@@ -168,7 +179,7 @@ const Ie = /* @__PURE__ */ J({
168
179
  rowspan: t,
169
180
  onMouseenter: S,
170
181
  onMouseleave: h
171
- }, [r(N, {
182
+ }, [r(P, {
172
183
  expanded: C,
173
184
  expandable: u,
174
185
  variant: "row",
@@ -177,21 +188,21 @@ const Ie = /* @__PURE__ */ J({
177
188
  }
178
189
  }, null)]);
179
190
  }
180
- const a = K.value, x = F.value && a, R = x ? r("span", {
191
+ const a = z.value, x = F.value && a, R = x ? r("span", {
181
192
  style: {
182
193
  display: "inline-block",
183
194
  width: `${a.level * (l.treeIndentSize?.value ?? 15)}px`
184
195
  }
185
- }, null) : null, k = x && a.hasChildren ? r(N, {
196
+ }, null) : null, k = x && a.hasChildren ? r(P, {
186
197
  expanded: a.expanded,
187
198
  expandable: !0,
188
199
  variant: "tree",
189
200
  onClick: () => l.toggleTreeExpand?.(e.record, e.rowIndex)
190
- }, null) : x ? r(N, {
201
+ }, null) : x ? r(P, {
191
202
  expanded: !1,
192
203
  expandable: !1,
193
204
  variant: "tree"
194
- }, null) : null, q = oe(e.column), X = q.enabled ? q.showTitle ? r(U, {
205
+ }, null) : null, O = oe(e.column), X = O.enabled ? O.showTitle ? r(U, {
195
206
  block: !0,
196
207
  title: o.value.tooltipText,
197
208
  placement: "top",
@@ -206,13 +217,13 @@ const Ie = /* @__PURE__ */ J({
206
217
  }) : r("div", {
207
218
  class: e.bodyCellEllipsisClass
208
219
  }, [o.value.content]) : o.value.content;
209
- return r("td", L(E.value, {
210
- class: z.value,
220
+ return r("td", B(E.value, {
221
+ class: K.value,
211
222
  style: w.value,
212
223
  colspan: n,
213
224
  rowspan: t,
214
- onMouseenter: j(E.value.onMouseenter),
215
- onMouseleave: A(E.value.onMouseleave)
225
+ onMouseenter: A(E.value.onMouseenter),
226
+ onMouseleave: W(E.value.onMouseleave)
216
227
  }), [R, k, X]);
217
228
  };
218
229
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeaderCell.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,QAAQ,EACd,MAAM,KAAK,CAAA;AAOZ,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;;;cAuBzC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;cAAjD,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;AAJvE,wBA2tBE"}
1
+ {"version":3,"file":"TableHeaderCell.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,QAAQ,EACd,MAAM,KAAK,CAAA;AAOZ,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;;;cAuBzC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;cAAjD,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;AAJvE,wBA0uBE"}