@vtable-guild/vtable-guild 2.7.1 → 2.8.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 (138) hide show
  1. package/css/presets/antdv.css +36 -0
  2. package/css/presets/element-plus.css +38 -0
  3. package/css/style.css +436 -0
  4. package/css/tailwind3-utilities.css +337 -0
  5. package/css/tailwind3.css +99 -0
  6. package/css/tailwind4.css +99 -0
  7. package/css/transitions.css +25 -0
  8. package/dist/core/src/components/VirtualList/VirtualList.d.ts +3 -0
  9. package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
  10. package/dist/core/src/components/VirtualList/VirtualList.mjs +28 -27
  11. package/dist/core/src/components/VirtualList/VirtualScrollBar.d.ts +1 -1
  12. package/dist/core/src/index.d.ts +1 -1
  13. package/dist/core/src/index.d.ts.map +1 -1
  14. package/dist/core/src/utils/types.d.ts +18 -0
  15. package/dist/core/src/utils/types.d.ts.map +1 -1
  16. package/dist/css/presets/antdv.css +36 -0
  17. package/dist/css/presets/element-plus.css +38 -0
  18. package/dist/css/style.css +436 -0
  19. package/dist/css/tailwind3-utilities.css +337 -0
  20. package/dist/css/tailwind3.css +99 -0
  21. package/dist/css/tailwind4.css +99 -0
  22. package/dist/css/transitions.css +25 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.full.mjs +5229 -3895
  25. package/dist/index.mjs +85 -75
  26. package/dist/table/src/components/ColGroup.d.ts.map +1 -1
  27. package/dist/table/src/components/ColGroup.mjs +10 -10
  28. package/dist/table/src/components/ColumnWidthRow.d.ts +4 -0
  29. package/dist/table/src/components/ColumnWidthRow.d.ts.map +1 -0
  30. package/dist/table/src/components/ColumnWidthRow.mjs +23 -0
  31. package/dist/table/src/components/PaginationSizeSelect.d.ts +57 -0
  32. package/dist/table/src/components/PaginationSizeSelect.d.ts.map +1 -0
  33. package/dist/table/src/components/PaginationSizeSelect.mjs +138 -0
  34. package/dist/table/src/components/SelectionDropdown.d.ts +9 -0
  35. package/dist/table/src/components/SelectionDropdown.d.ts.map +1 -1
  36. package/dist/table/src/components/SelectionDropdown.mjs +32 -26
  37. package/dist/table/src/components/Table.d.ts +13 -2
  38. package/dist/table/src/components/Table.d.ts.map +1 -1
  39. package/dist/table/src/components/Table.mjs +497 -403
  40. package/dist/table/src/components/TableCell.d.ts.map +1 -1
  41. package/dist/table/src/components/TableCell.mjs +80 -74
  42. package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
  43. package/dist/table/src/components/TableHeaderCell.mjs +85 -83
  44. package/dist/table/src/components/TablePagination.d.ts +74 -0
  45. package/dist/table/src/components/TablePagination.d.ts.map +1 -0
  46. package/dist/table/src/components/TablePagination.mjs +350 -0
  47. package/dist/table/src/components/TablePagination.test.d.ts +2 -0
  48. package/dist/table/src/components/TablePagination.test.d.ts.map +1 -0
  49. package/dist/table/src/components/TablePaginationCompatClass.test.d.ts +2 -0
  50. package/dist/table/src/components/TablePaginationCompatClass.test.d.ts.map +1 -0
  51. package/dist/table/src/components/TablePaginationLayout.test.d.ts +2 -0
  52. package/dist/table/src/components/TablePaginationLayout.test.d.ts.map +1 -0
  53. package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
  54. package/dist/table/src/components/VTable.vue.mjs +34 -26
  55. package/dist/table/src/components/VTableMinWidth.test.d.ts +2 -0
  56. package/dist/table/src/components/VTableMinWidth.test.d.ts.map +1 -0
  57. package/dist/table/src/components/VTableSummaryCell.d.ts.map +1 -1
  58. package/dist/table/src/components/VTableSummaryCell.mjs +26 -24
  59. package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
  60. package/dist/table/src/components/VirtualTableBody.mjs +106 -93
  61. package/dist/table/src/composables/useColumnLayout.d.ts +28 -0
  62. package/dist/table/src/composables/useColumnLayout.d.ts.map +1 -0
  63. package/dist/table/src/composables/useColumnLayout.mjs +259 -0
  64. package/dist/table/src/composables/useColumnLayout.test.d.ts +2 -0
  65. package/dist/table/src/composables/useColumnLayout.test.d.ts.map +1 -0
  66. package/dist/table/src/composables/useColumnMetrics.d.ts +5 -3
  67. package/dist/table/src/composables/useColumnMetrics.d.ts.map +1 -1
  68. package/dist/table/src/composables/useColumnMetrics.mjs +64 -55
  69. package/dist/table/src/composables/useExpand.d.ts +2 -0
  70. package/dist/table/src/composables/useExpand.d.ts.map +1 -1
  71. package/dist/table/src/composables/useExpand.mjs +44 -20
  72. package/dist/table/src/composables/usePagination.d.ts +15 -0
  73. package/dist/table/src/composables/usePagination.d.ts.map +1 -0
  74. package/dist/table/src/composables/usePagination.mjs +65 -0
  75. package/dist/table/src/composables/usePagination.test.d.ts +2 -0
  76. package/dist/table/src/composables/usePagination.test.d.ts.map +1 -0
  77. package/dist/table/src/composables/useResize.d.ts +1 -0
  78. package/dist/table/src/composables/useResize.d.ts.map +1 -1
  79. package/dist/table/src/composables/useResize.mjs +67 -39
  80. package/dist/table/src/composables/useScroll.d.ts +3 -0
  81. package/dist/table/src/composables/useScroll.d.ts.map +1 -1
  82. package/dist/table/src/composables/useScroll.mjs +43 -41
  83. package/dist/table/src/composables/useSelection.d.ts +2 -1
  84. package/dist/table/src/composables/useSelection.d.ts.map +1 -1
  85. package/dist/table/src/composables/useSelection.mjs +210 -171
  86. package/dist/table/src/composables/useTreeData.d.ts +4 -0
  87. package/dist/table/src/composables/useTreeData.d.ts.map +1 -1
  88. package/dist/table/src/composables/useTreeData.mjs +48 -43
  89. package/dist/table/src/context.d.ts +6 -1
  90. package/dist/table/src/context.d.ts.map +1 -1
  91. package/dist/table/src/index.d.ts +3 -1
  92. package/dist/table/src/index.d.ts.map +1 -1
  93. package/dist/table/src/types/column.d.ts +8 -2
  94. package/dist/table/src/types/column.d.ts.map +1 -1
  95. package/dist/table/src/types/index.d.ts +1 -0
  96. package/dist/table/src/types/index.d.ts.map +1 -1
  97. package/dist/table/src/types/pagination.d.ts +66 -0
  98. package/dist/table/src/types/pagination.d.ts.map +1 -0
  99. package/dist/table/src/types/pagination.typecheck.d.ts +25 -0
  100. package/dist/table/src/types/pagination.typecheck.d.ts.map +1 -0
  101. package/dist/table/src/types/table.d.ts +8 -1
  102. package/dist/table/src/types/table.d.ts.map +1 -1
  103. package/dist/table/src/utils/columnWidth.d.ts +55 -7
  104. package/dist/table/src/utils/columnWidth.d.ts.map +1 -1
  105. package/dist/table/src/utils/columnWidth.mjs +91 -21
  106. package/dist/table/src/utils/paginationLayout.d.ts +13 -0
  107. package/dist/table/src/utils/paginationLayout.d.ts.map +1 -0
  108. package/dist/table/src/utils/paginationLayout.mjs +55 -0
  109. package/dist/table/src/utils/paginationLayout.test.d.ts +2 -0
  110. package/dist/table/src/utils/paginationLayout.test.d.ts.map +1 -0
  111. package/dist/table/src/utils/popupPosition.d.ts +4 -1
  112. package/dist/table/src/utils/popupPosition.d.ts.map +1 -1
  113. package/dist/table/src/utils/popupPosition.mjs +34 -15
  114. package/dist/theme/src/augment.d.ts +2 -0
  115. package/dist/theme/src/augment.d.ts.map +1 -1
  116. package/dist/theme/src/compat/antdv-pagination.d.ts +4 -0
  117. package/dist/theme/src/compat/antdv-pagination.d.ts.map +1 -0
  118. package/dist/theme/src/compat/antdv-pagination.mjs +29 -0
  119. package/dist/theme/src/index.d.ts +5 -0
  120. package/dist/theme/src/index.d.ts.map +1 -1
  121. package/dist/theme/src/pagination.d.ts +153 -0
  122. package/dist/theme/src/pagination.d.ts.map +1 -0
  123. package/dist/theme/src/pagination.mjs +144 -0
  124. package/dist/theme/src/presets/antdv/table-locale.d.ts +2 -2
  125. package/dist/theme/src/presets/antdv/table-locale.mjs +2 -2
  126. package/dist/theme/src/presets/antdv/table.d.ts +3 -0
  127. package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
  128. package/dist/theme/src/presets/antdv/table.mjs +3 -0
  129. package/dist/theme/src/presets/element-plus/table-locale.d.ts +2 -2
  130. package/dist/theme/src/presets/element-plus/table-locale.mjs +2 -2
  131. package/dist/theme/src/presets/element-plus/table.d.ts +3 -0
  132. package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
  133. package/dist/theme/src/presets/element-plus/table.mjs +3 -0
  134. package/dist/theme/src/presets/index.d.ts.map +1 -1
  135. package/dist/theme/src/presets/index.mjs +60 -57
  136. package/dist/theme/src/presets/types.d.ts +1 -0
  137. package/dist/theme/src/presets/types.d.ts.map +1 -1
  138. package/package.json +1 -1
@@ -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;;;;;;;;;;;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,wBA6bE"}
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,wBAmcE"}
@@ -1,17 +1,17 @@
1
- import { defineComponent as ee, inject as le, ref as B, computed as r, createVNode as c, mergeProps as L } from "vue";
1
+ import { defineComponent as ee, inject as le, ref as q, computed as d, createVNode as c, mergeProps as B } from "vue";
2
2
  import "../../../core/src/utils/tv.mjs";
3
3
  import ne from "../../../core/src/components/Tooltip.mjs";
4
4
  import { TABLE_CONTEXT_KEY as te } from "../context.mjs";
5
5
  import { getByDataIndex as oe, getColumnKey as A } from "../composables/useColumns.mjs";
6
6
  import { useFixedColumnStyle as ae } from "../composables/useFixedColumnStyle.mjs";
7
7
  import { resolveBodyCell as se, getEllipsisConfig as D, omitCellProps as P, isRenderedCell as ce } from "../utils/cell.mjs";
8
- import re from "./SelectionCheckbox.mjs";
9
- import de from "./SelectionRadio.mjs";
8
+ import de from "./SelectionCheckbox.mjs";
9
+ import re from "./SelectionRadio.mjs";
10
10
  import H from "./ExpandIcon.mjs";
11
11
  import { isInHoverRange as ue } from "../composables/useHoverState.mjs";
12
12
  import { TABLE_ALIGN_CLASSES as ie } from "../../../theme/src/presets/antdv/table.mjs";
13
13
  import { cn as m } from "tailwind-variants";
14
- const _e = /* @__PURE__ */ ee({
14
+ const Ee = /* @__PURE__ */ ee({
15
15
  name: "TableCell",
16
16
  props: {
17
17
  record: {
@@ -55,131 +55,135 @@ const _e = /* @__PURE__ */ ee({
55
55
  }
56
56
  },
57
57
  setup(e) {
58
- const l = le(te, {}), O = B(null), T = B(!1), o = r(() => e.resolvedCell ?? se({
58
+ const l = le(te, {}), L = q(null), T = q(!1), t = d(() => e.resolvedCell ?? se({
59
59
  text: oe(e.record, e.column.dataIndex),
60
60
  record: e.record,
61
61
  rowIndex: e.rowIndex,
62
62
  column: e.column,
63
63
  bodyCell: l.bodyCell,
64
64
  transformCellText: l.transformCellText
65
- })), j = r(() => {
65
+ })), j = d(() => {
66
66
  if (!e.column.fixed) return null;
67
67
  const n = A(e.column) ?? e.colIndex;
68
68
  return l.fixedOffsets?.value?.get(n) ?? null;
69
69
  }), {
70
70
  fixedStyle: W,
71
- fixedClass: p
71
+ fixedClass: _
72
72
  } = ae({
73
73
  fixedInfo: () => j.value
74
- }), $ = r(() => D(e.column).enabled ? l.compatClass?.("cell-ellipsis") ?? "" : ""), i = r(() => l.getSelectionState?.(e.record, e.rowIndex) ?? {
74
+ }), $ = d(() => D(e.column).enabled ? l.compatClass?.("cell-ellipsis") ?? "" : ""), i = d(() => l.getSelectionState?.(e.record, e.rowIndex) ?? {
75
75
  checked: !1,
76
76
  indeterminate: !1,
77
77
  disabled: !1
78
- }), f = r(() => i.value.checked), h = r(() => ue(e.rowIndex, o.value.rowSpan ?? 1, l.hoverRange?.value ?? null)), _ = r(() => h.value && l.hoverable?.value ? l.compatClass?.("cell-row-hover") ?? "" : "");
79
- function w() {
78
+ }), f = d(() => i.value.checked), S = d(() => ue(e.rowIndex, t.value.rowSpan ?? 1, l.hoverRange?.value ?? null)), E = d(() => S.value && l.hoverable?.value ? l.compatClass?.("cell-row-hover") ?? "" : "");
79
+ function h() {
80
80
  if (!l.hoverable?.value) return;
81
- const n = Math.max(1, o.value.rowSpan ?? 1);
81
+ const n = Math.max(1, t.value.rowSpan ?? 1);
82
82
  l.setHoverRange?.(e.rowIndex, e.rowIndex + n - 1);
83
83
  }
84
- function S() {
84
+ function w() {
85
85
  l.hoverable?.value && l.clearHoverRange?.();
86
86
  }
87
87
  function K(n) {
88
- return (t) => {
89
- w(), typeof n == "function" && n(t);
88
+ return (o) => {
89
+ h(), typeof n == "function" && n(o);
90
90
  };
91
91
  }
92
92
  function z(n) {
93
- return (t) => {
94
- S(), typeof n == "function" && n(t);
93
+ return (o) => {
94
+ w(), typeof n == "function" && n(o);
95
95
  };
96
96
  }
97
- const E = r(() => ({
98
- ...P(o.value.renderCellProps),
99
- ...P(o.value.customCellProps)
100
- })), F = r(() => {
101
- const n = e.column.align ? l.vtgClass?.(ie[e.column.align]) ?? "" : "", t = l.subThemeSlots, a = h.value && l.hoverable?.value, C = 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 R = d(() => ({
98
+ ...P(t.value.renderCellProps),
99
+ ...P(t.value.customCellProps)
100
+ })), F = d(() => {
101
+ const n = e.column.align ? l.vtgClass?.(ie[e.column.align]) ?? "" : "", o = l.subThemeSlots, a = S.value && l.hoverable?.value, C = l.isColumnSorted?.(e.column) && o ? o.tdSorted() : "", k = f.value && o ? m(o.tdSelected(), a ? o.tdRowSelectedHover() : "") : "", p = a && o && !f.value ? o.tdRowHover() : "";
102
102
  return m(
103
103
  e.tdClass,
104
104
  n,
105
105
  e.column.className,
106
- o.value.customCellProps?.class,
107
- o.value.customCellProps?.className,
108
- o.value.renderCellProps?.class,
109
- o.value.renderCellProps?.className,
106
+ t.value.customCellProps?.class,
107
+ t.value.customCellProps?.className,
108
+ t.value.renderCellProps?.class,
109
+ t.value.renderCellProps?.className,
110
110
  C,
111
- R,
112
111
  k,
113
- p.value,
112
+ p,
114
113
  _.value,
114
+ E.value,
115
115
  // antdv 把 ellipsis 类放在 td 上,我们的 slot 落在内层 span,故在此补
116
116
  $.value
117
117
  );
118
- }), b = r(() => {
119
- const n = {}, t = l.columnWidths?.[String(A(e.column) ?? e.colIndex)], a = e.widthOverride ?? t ?? e.column.width;
118
+ }), g = d(() => {
119
+ const n = {}, o = l.columnWidths?.[String(A(e.column) ?? e.colIndex)], a = e.widthOverride ?? o ?? e.column.width;
120
120
  return a && (n.width = typeof a == "number" ? `${a}px` : a), {
121
121
  ...n,
122
122
  ...W.value ?? {},
123
- ...o.value.customCellProps?.style ?? {},
124
- ...o.value.renderCellProps?.style ?? {}
123
+ ...t.value.customCellProps?.style ?? {},
124
+ ...t.value.renderCellProps?.style ?? {},
125
+ ...l.columnLayout?.columnStyle(e.colIndex, t.value.colSpan || 1)
125
126
  };
126
- }), G = r(() => l.isTreeData?.value ? l.getFlattenRow?.(e.record) ?? null : null), V = r(() => l.isTreeData?.value && e.column.key !== "__vtg_selection__" && e.column.key !== "__vtg_expand__" && e.colIndex <= 2 ? (() => {
127
- const n = l.rowSelection?.(), t = l.expandable?.();
127
+ }), G = d(() => l.isTreeData?.value ? l.getFlattenRow?.(e.record) ?? null : null), V = d(() => l.isTreeData?.value && e.column.key !== "__vtg_selection__" && e.column.key !== "__vtg_expand__" && e.colIndex <= 2 ? (() => {
128
+ const n = l.rowSelection?.(), o = l.expandable?.();
128
129
  let a = 0;
129
- return n && (a += 1), t && t.showExpandColumn !== !1 && (a += 1), e.colIndex === a;
130
+ return n && (a += 1), o && o.showExpandColumn !== !1 && (a += 1), e.colIndex === a;
130
131
  })() : !1);
131
132
  function X(n) {
132
133
  return {
133
- ...b.value,
134
- ...n ?? {}
134
+ ...g.value,
135
+ ...n ?? {},
136
+ ...l.columnLayout?.columnStyle(e.colIndex, t.value.colSpan || 1)
135
137
  };
136
138
  }
137
139
  function Y() {
138
- const n = O.value, t = o.value.tooltipText;
139
- T.value = !!(n && t && (n.scrollWidth > n.clientWidth || n.scrollHeight > n.clientHeight));
140
+ const n = L.value, o = t.value.tooltipText;
141
+ T.value = !!(n && o && (n.scrollWidth > n.clientWidth || n.scrollHeight > n.clientHeight));
140
142
  }
141
143
  function J() {
142
144
  T.value = !1;
143
145
  }
144
146
  return () => {
145
- if (o.value.colSpan === 0 || o.value.rowSpan === 0)
147
+ if (t.value.colSpan === 0 || t.value.rowSpan === 0)
146
148
  return null;
147
- const n = o.value.colSpan !== 1 ? o.value.colSpan : void 0, t = o.value.rowSpan !== 1 ? o.value.rowSpan : void 0;
149
+ const n = t.value.colSpan !== 1 ? t.value.colSpan : void 0, o = t.value.rowSpan !== 1 ? t.value.rowSpan : void 0;
148
150
  if (e.column.key === "__vtg_selection__") {
149
- const v = l.rowSelection?.(), x = v?.type === "radio" ? c(de, {
151
+ const v = l.rowSelection?.(), x = v?.type === "radio" ? c(re, {
150
152
  checked: i.value.checked,
151
153
  disabled: i.value.disabled,
152
- onChange: (d) => l.toggleRow?.(e.record, e.rowIndex, d)
153
- }, null) : c(re, {
154
+ onChange: (r) => l.toggleRow?.(e.record, e.rowIndex, r)
155
+ }, null) : c(de, {
154
156
  checked: i.value.checked,
155
157
  indeterminate: i.value.indeterminate,
156
158
  disabled: i.value.disabled,
157
- onChange: (d, I) => l.toggleRow?.(e.record, e.rowIndex, I)
159
+ onChange: (r, I) => l.toggleRow?.(e.record, e.rowIndex, I)
158
160
  }, null);
159
161
  let u = x, s;
160
162
  if (v?.renderCell) {
161
- const d = v.renderCell(i.value.checked, e.record, e.rowIndex, x);
162
- ce(d) ? (u = d.children, s = d.props) : u = d;
163
+ const r = v.renderCell(i.value.checked, e.record, e.rowIndex, x);
164
+ ce(r) ? (u = r.children, s = r.props) : u = r;
163
165
  }
164
- const g = !!v?.renderCell, y = h.value && l.hoverable?.value, N = 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(), y ? l.subThemeSlots.tdRowSelectedHover() : "") : y && l.subThemeSlots ? l.subThemeSlots.tdRowHover() : "", p.value, _.value, l.compatClass?.("selection-column"));
165
- return c("td", L(P(s), {
166
+ const b = !!v?.renderCell, y = S.value && l.hoverable?.value, N = 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(), y ? l.subThemeSlots.tdRowSelectedHover() : "") : y && l.subThemeSlots ? l.subThemeSlots.tdRowHover() : "", _.value, E.value, l.compatClass?.("selection-column"));
167
+ return c("td", B(P(s), {
166
168
  class: N,
167
169
  style: X(s?.style),
170
+ "data-vtg-col": e.colIndex,
168
171
  colspan: n,
169
- rowspan: t,
170
- onMouseenter: w,
171
- onMouseleave: S
172
+ rowspan: o,
173
+ onMouseenter: h,
174
+ onMouseleave: w
172
175
  }), [u]);
173
176
  }
174
177
  if (e.column.key === "__vtg_expand__") {
175
- const v = l.expandable?.(), M = l.getRowKey?.(e.record, e.rowIndex), x = M !== void 0 && (l.isExpanded?.(M) ?? !1), u = l.isRowExpandable?.(e.record) ?? !1, s = l.subThemeSlots, g = h.value && l.hoverable?.value, y = l.isColumnSorted?.(e.column) && s ? s.tdSorted() : "", N = f.value && s ? m(s.tdSelected(), g ? s.tdRowSelectedHover() : "") : "", d = g && s && !f.value ? s.tdRowHover() : "", I = m(e.tdClass, l.vtgClass?.("text-center"), e.column.className, y, N, d, p.value, _.value, l.compatClass?.("row-expand-icon-cell"));
178
+ const v = l.expandable?.(), M = l.getRowKey?.(e.record, e.rowIndex), x = M !== void 0 && (l.isExpanded?.(M) ?? !1), u = l.isRowExpandable?.(e.record) ?? !1, s = l.subThemeSlots, b = S.value && l.hoverable?.value, y = l.isColumnSorted?.(e.column) && s ? s.tdSorted() : "", N = f.value && s ? m(s.tdSelected(), b ? s.tdRowSelectedHover() : "") : "", r = b && s && !f.value ? s.tdRowHover() : "", I = m(e.tdClass, l.vtgClass?.("text-center"), e.column.className, y, N, r, _.value, E.value, l.compatClass?.("row-expand-icon-cell"));
176
179
  return v?.expandIcon ? c("td", {
177
180
  class: I,
178
- style: b.value,
181
+ style: g.value,
182
+ "data-vtg-col": e.colIndex,
179
183
  colspan: n,
180
- rowspan: t,
181
- onMouseenter: w,
182
- onMouseleave: S
184
+ rowspan: o,
185
+ onMouseenter: h,
186
+ onMouseleave: w
183
187
  }, [v.expandIcon({
184
188
  expanded: x,
185
189
  record: e.record,
@@ -189,11 +193,12 @@ const _e = /* @__PURE__ */ ee({
189
193
  }
190
194
  })]) : c("td", {
191
195
  class: I,
192
- style: b.value,
196
+ style: g.value,
197
+ "data-vtg-col": e.colIndex,
193
198
  colspan: n,
194
- rowspan: t,
195
- onMouseenter: w,
196
- onMouseleave: S
199
+ rowspan: o,
200
+ onMouseenter: h,
201
+ onMouseleave: w
197
202
  }, [c(H, {
198
203
  expanded: x,
199
204
  expandable: u,
@@ -203,13 +208,13 @@ const _e = /* @__PURE__ */ ee({
203
208
  }
204
209
  }, null)]);
205
210
  }
206
- const a = G.value, C = V.value && a, R = C ? c("span", {
211
+ const a = G.value, C = V.value && a, k = C ? c("span", {
207
212
  class: l.compatClass ? `${l.compatClass("row-indent")} indent-level-${a.level}` : void 0,
208
213
  style: {
209
214
  display: "inline-block",
210
215
  width: `${a.level * (l.treeIndentSize?.value ?? 15)}px`
211
216
  }
212
- }, null) : null, k = C && a.hasChildren ? c(H, {
217
+ }, null) : null, p = C && a.hasChildren ? c(H, {
213
218
  expanded: a.expanded,
214
219
  expandable: !0,
215
220
  variant: "tree",
@@ -218,32 +223,33 @@ const _e = /* @__PURE__ */ ee({
218
223
  expanded: !1,
219
224
  expandable: !1,
220
225
  variant: "tree"
221
- }, null) : null, q = D(e.column), Q = C ? l.compatClass?.("cell-with-append") ?? "" : "", U = q.enabled ? q.showTitle ? c(ne, {
226
+ }, null) : null, O = D(e.column), Q = C ? l.compatClass?.("cell-with-append") ?? "" : "", U = O.enabled ? O.showTitle ? c(ne, {
222
227
  block: !0,
223
- title: o.value.tooltipText,
228
+ title: t.value.tooltipText,
224
229
  placement: "top",
225
230
  open: T.value
226
231
  }, {
227
232
  default: () => [c("div", {
228
- ref: O,
233
+ ref: L,
229
234
  class: e.bodyCellEllipsisClass,
230
235
  onMouseenter: Y,
231
236
  onMouseleave: J
232
- }, [o.value.content])]
237
+ }, [t.value.content])]
233
238
  }) : c("div", {
234
239
  class: e.bodyCellEllipsisClass
235
- }, [o.value.content]) : o.value.content;
236
- return c("td", L(E.value, {
240
+ }, [t.value.content]) : t.value.content;
241
+ return c("td", B(R.value, {
237
242
  class: m(F.value, Q),
238
- style: b.value,
243
+ style: g.value,
244
+ "data-vtg-col": e.colIndex,
239
245
  colspan: n,
240
- rowspan: t,
241
- onMouseenter: K(E.value.onMouseenter),
242
- onMouseleave: z(E.value.onMouseleave)
243
- }), [R, k, U]);
246
+ rowspan: o,
247
+ onMouseenter: K(R.value.onMouseenter),
248
+ onMouseleave: z(R.value.onMouseleave)
249
+ }), [k, p, U]);
244
250
  };
245
251
  }
246
252
  });
247
253
  export {
248
- _e as default
254
+ Ee as default
249
255
  };
@@ -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,wBA0vBE"}
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,wBAiwBE"}