@vtable-guild/vtable-guild 2.6.4 → 2.7.1

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 (64) hide show
  1. package/css/presets/antdv.css +2 -0
  2. package/css/presets/element-plus.css +2 -0
  3. package/css/style.css +19 -0
  4. package/css/tailwind3-utilities.css +15 -0
  5. package/css/tailwind3.css +4 -0
  6. package/css/tailwind4.css +4 -0
  7. package/dist/css/presets/antdv.css +2 -0
  8. package/dist/css/presets/element-plus.css +2 -0
  9. package/dist/css/style.css +19 -0
  10. package/dist/css/tailwind3-utilities.css +15 -0
  11. package/dist/css/tailwind3.css +4 -0
  12. package/dist/css/tailwind4.css +4 -0
  13. package/dist/index.full.mjs +3712 -3404
  14. package/dist/index.mjs +22 -19
  15. package/dist/table/src/components/ExpandedRowTr.d.ts +90 -0
  16. package/dist/table/src/components/ExpandedRowTr.d.ts.map +1 -0
  17. package/dist/table/src/components/ExpandedRowTr.mjs +61 -0
  18. package/dist/table/src/components/Table.d.ts +23 -3
  19. package/dist/table/src/components/Table.d.ts.map +1 -1
  20. package/dist/table/src/components/Table.mjs +355 -324
  21. package/dist/table/src/components/TableBody.d.ts.map +1 -1
  22. package/dist/table/src/components/TableBody.mjs +67 -58
  23. package/dist/table/src/components/VTable.vue.d.ts +4 -3
  24. package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
  25. package/dist/table/src/components/VTable.vue.mjs +43 -37
  26. package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
  27. package/dist/table/src/components/VirtualTableBody.mjs +110 -104
  28. package/dist/table/src/composables/index.d.ts +3 -0
  29. package/dist/table/src/composables/index.d.ts.map +1 -1
  30. package/dist/table/src/composables/useColumnDisplay.d.ts +26 -0
  31. package/dist/table/src/composables/useColumnDisplay.d.ts.map +1 -0
  32. package/dist/table/src/composables/useColumnDisplay.mjs +46 -0
  33. package/dist/table/src/composables/useColumnDisplay.test.d.ts +2 -0
  34. package/dist/table/src/composables/useColumnDisplay.test.d.ts.map +1 -0
  35. package/dist/table/src/composables/useRowDragSort.d.ts +79 -0
  36. package/dist/table/src/composables/useRowDragSort.d.ts.map +1 -0
  37. package/dist/table/src/composables/useRowDragSort.mjs +146 -0
  38. package/dist/table/src/composables/useRowDragSort.test.d.ts +2 -0
  39. package/dist/table/src/composables/useRowDragSort.test.d.ts.map +1 -0
  40. package/dist/table/src/context.d.ts +14 -0
  41. package/dist/table/src/context.d.ts.map +1 -1
  42. package/dist/table/src/index.d.ts +14 -4
  43. package/dist/table/src/index.d.ts.map +1 -1
  44. package/dist/table/src/types/column.d.ts +6 -0
  45. package/dist/table/src/types/column.d.ts.map +1 -1
  46. package/dist/table/src/types/index.d.ts +1 -1
  47. package/dist/table/src/types/index.d.ts.map +1 -1
  48. package/dist/table/src/types/table.d.ts +23 -8
  49. package/dist/table/src/types/table.d.ts.map +1 -1
  50. package/dist/table/src/utils/columnWidth.d.ts +12 -0
  51. package/dist/table/src/utils/columnWidth.d.ts.map +1 -0
  52. package/dist/table/src/utils/columnWidth.mjs +26 -0
  53. package/dist/table/src/utils/columnWidth.test.d.ts +2 -0
  54. package/dist/table/src/utils/columnWidth.test.d.ts.map +1 -0
  55. package/dist/table/src/utils/rowKey.d.ts +8 -0
  56. package/dist/table/src/utils/rowKey.d.ts.map +1 -0
  57. package/dist/table/src/utils/rowKey.mjs +6 -0
  58. package/dist/theme/src/presets/antdv/table.d.ts +3 -0
  59. package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
  60. package/dist/theme/src/presets/antdv/table.mjs +4 -0
  61. package/dist/theme/src/presets/element-plus/table.d.ts +3 -0
  62. package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
  63. package/dist/theme/src/presets/element-plus/table.mjs +4 -0
  64. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,K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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,wBA2KE"}
@@ -1,17 +1,20 @@
1
- import { defineComponent as S, inject as b, computed as h, createVNode as i } from "vue";
1
+ import { defineComponent as E, inject as h, computed as v, createVNode as c } from "vue";
2
2
  import "../../../core/src/utils/tv.mjs";
3
- import E from "./TableRow.mjs";
4
- import T from "./TableCell.mjs";
5
- import v from "./TableEmpty.mjs";
6
- import { TABLE_CONTEXT_KEY as k } from "../context.mjs";
3
+ import T from "./TableRow.mjs";
4
+ import N from "./TableCell.mjs";
5
+ import k from "./TableEmpty.mjs";
6
+ import B from "./ExpandedRowTr.mjs";
7
+ import { TABLE_CONTEXT_KEY as q } from "../context.mjs";
8
+ import { resolveRowDragClass as D } from "../composables/useRowDragSort.mjs";
7
9
  import { resolveBodyCell as K } from "../utils/cell.mjs";
8
- import { getRowCompatClass as N, getExpandedRowCompatClass as q } from "../utils/compat.mjs";
9
- import { getByDataIndex as B } from "../composables/useColumns.mjs";
10
- import { cn as p } from "tailwind-variants";
11
- function R(e) {
10
+ import { resolveRowKey as $ } from "../utils/rowKey.mjs";
11
+ import { getRowCompatClass as P } from "../utils/compat.mjs";
12
+ import { getByDataIndex as A } from "../composables/useColumns.mjs";
13
+ import { cn as F } from "tailwind-variants";
14
+ function g(e) {
12
15
  return Number.isFinite(e) ? e <= 0 ? 0 : Math.floor(e) : 1;
13
16
  }
14
- const L = /* @__PURE__ */ S({
17
+ const U = /* @__PURE__ */ E({
15
18
  name: "TableBody",
16
19
  props: {
17
20
  dataSource: {
@@ -48,74 +51,80 @@ const L = /* @__PURE__ */ S({
48
51
  }
49
52
  },
50
53
  setup(e) {
51
- const a = b(k, {});
52
- function g(t, l) {
53
- return typeof e.rowKey == "function" ? e.rowKey(t) : typeof e.rowKey == "string" && e.rowKey in t ? t[e.rowKey] : l;
54
+ const a = h(q, {});
55
+ function R(t, o) {
56
+ return $(t, o, e.rowKey);
54
57
  }
55
- const x = h(() => {
58
+ const S = v(() => {
56
59
  const t = /* @__PURE__ */ new Set();
57
- return e.dataSource.map((l, s) => {
58
- const o = [];
59
- return e.columns.forEach((C, r) => {
60
- const c = `${s}:${r}`;
61
- if (t.has(c)) return;
60
+ return e.dataSource.map((o, n) => {
61
+ const l = [];
62
+ return e.columns.forEach((C, s) => {
63
+ const w = `${n}:${s}`;
64
+ if (t.has(w)) return;
62
65
  const y = K({
63
- text: B(l, C.dataIndex),
64
- record: l,
65
- rowIndex: s,
66
+ text: A(o, C.dataIndex),
67
+ record: o,
68
+ rowIndex: n,
66
69
  column: C,
67
70
  bodyCell: a.bodyCell,
68
71
  transformCellText: a.transformCellText
69
- }), d = R(y.colSpan), u = R(y.rowSpan);
70
- if (d === 0 || u === 0) return;
71
- const f = Math.min(e.dataSource.length, s + u), w = Math.min(e.columns.length, r + d);
72
- for (let m = s; m < f; m += 1)
73
- for (let n = r; n < w; n += 1)
74
- m === s && n === r || t.add(`${m}:${n}`);
75
- o.push({
72
+ }), r = g(y.colSpan), d = g(y.rowSpan);
73
+ if (r === 0 || d === 0) return;
74
+ const f = Math.min(e.dataSource.length, n + d), p = Math.min(e.columns.length, s + r);
75
+ for (let i = n; i < f; i += 1)
76
+ for (let u = s; u < p; u += 1)
77
+ i === n && u === s || t.add(`${i}:${u}`);
78
+ l.push({
76
79
  column: C,
77
- colIndex: r,
80
+ colIndex: s,
78
81
  resolvedCell: {
79
82
  ...y,
80
- colSpan: d,
81
- rowSpan: u
83
+ colSpan: r,
84
+ rowSpan: d
82
85
  }
83
86
  });
84
- }), o;
87
+ }), l;
85
88
  });
86
89
  });
87
- return () => i("tbody", {
90
+ return () => c("tbody", {
88
91
  class: e.tbodyClass
89
- }, [e.dataSource.length > 0 ? e.dataSource.map((t, l) => {
90
- const s = g(t, l), o = a.expandable?.(), C = a.isExpanded?.(s) ?? !1, r = o?.expandRowByClick ?? !1, c = a.isRowExpandable?.(t) ?? !1, d = (a.isTreeData?.value ? a.getFlattenRow?.(t) : void 0)?.level ?? 0, u = a.getRowClassName?.(t, l), f = a.getRowProps?.(t, l), w = typeof o?.expandedRowClassName == "function" ? o.expandedRowClassName(t, l, d) : o?.expandedRowClassName, m = r ? () => {
91
- c && a.toggleExpand?.(t, l);
92
+ }, [e.dataSource.length > 0 ? e.dataSource.map((t, o) => {
93
+ const n = R(t, o), l = a.expandable?.(), C = a.isExpanded?.(n) ?? !1, s = l?.expandRowByClick ?? !1, w = a.isRowExpandable?.(t) ?? !1, r = (a.isTreeData?.value ? a.getFlattenRow?.(t) : void 0)?.level ?? 0, d = a.getRowClassName?.(t, o), f = a.getRowProps?.(t, o), p = a.rowDrag?.enabled.value ? a.rowDrag.getBindings(t, o, f) : void 0, i = {
94
+ ...f,
95
+ ...p
96
+ }, u = D(a.rowDrag, n, a.subThemeSlots), b = typeof l?.expandedRowClassName == "function" ? l.expandedRowClassName(t, o, r) : l?.expandedRowClassName, x = s ? () => {
97
+ w && a.toggleExpand?.(t, o);
92
98
  } : void 0;
93
- return [i(E, {
94
- key: s,
95
- rowClass: p(e.rowClass, u, N(a, t, l, d)) ?? "",
96
- rowProps: f,
97
- onClick: m
99
+ return [c(T, {
100
+ key: n,
101
+ rowClass: F(e.rowClass, d, u, P(a, t, o, r)) ?? "",
102
+ rowProps: i,
103
+ onClick: x
98
104
  }, {
99
- default: () => [x.value[l]?.map((n) => i(T, {
100
- key: n.column.key ?? String(n.column.dataIndex ?? n.colIndex),
105
+ default: () => [S.value[o]?.map((m) => c(N, {
106
+ key: m.column.key ?? String(m.column.dataIndex ?? m.colIndex),
101
107
  record: t,
102
- rowIndex: l,
103
- column: n.column,
104
- colIndex: n.colIndex,
105
- resolvedCell: n.resolvedCell,
108
+ rowIndex: o,
109
+ column: m.column,
110
+ colIndex: m.colIndex,
111
+ resolvedCell: m.resolvedCell,
106
112
  tdClass: e.tdClass,
107
113
  bodyCellEllipsisClass: e.bodyCellEllipsisClass
108
114
  }, null))]
109
- }), C && o?.expandedRowRender && i("tr", {
110
- key: `${s}-expanded`,
111
- class: p(e.rowClass, u, a.subThemeSlots?.expandedRow(), q(a, d), w)
112
- }, [i("td", {
115
+ }), C && l?.expandedRowRender ? c(B, {
116
+ key: `${n}-expanded`,
117
+ record: t,
118
+ rowIndex: o,
113
119
  colspan: e.columns.length,
114
- class: p(e.tdClass, a.subThemeSlots?.expandedRowCell())
115
- }, [a.compatClass && (a.fixedOffsets?.value?.size ?? 0) > 0 ? i("div", {
116
- class: a.compatClass("expanded-row-fixed")
117
- }, [o.expandedRowRender(t, l, 0, !0)]) : o.expandedRowRender(t, l, 0, !0)])])];
118
- }) : i(v, {
120
+ rowIndent: r,
121
+ rowClass: e.rowClass,
122
+ rowClassName: d,
123
+ expandedRowClassName: b,
124
+ tdClass: e.tdClass,
125
+ expandedRowRender: l.expandedRowRender
126
+ }, null) : null];
127
+ }) : c(k, {
119
128
  colSpan: e.columns.length || 1,
120
129
  emptyClass: e.emptyClass,
121
130
  tdClass: e.tdClass
@@ -123,5 +132,5 @@ const L = /* @__PURE__ */ S({
123
132
  }
124
133
  });
125
134
  export {
126
- L as default
135
+ U as default
127
136
  };
@@ -1,13 +1,14 @@
1
- import { ColumnType, TableChangeExtra, TableFiltersInfo, TableProps, TableSlotsDecl, VTableSorterResult } from '../types';
1
+ import { ColumnType, TableChangeExtra, TableFiltersInfo, TableProps, TableSlotsDecl, RowDragSortInfo, VTableSorterResult } from '../types';
2
2
  declare const _default: <TRecord extends object = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly onChange?: ((filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>) => any) | undefined;
5
5
  readonly onResizeColumn?: ((column: ColumnType<TRecord>, width: number) => any) | undefined;
6
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onChange" | "onResizeColumn"> & TableProps<TRecord> & Partial<{}>> & import('vue').PublicProps;
6
+ readonly onRowDragEnd?: ((newData: TRecord[], info: RowDragSortInfo) => any) | undefined;
7
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onChange" | "onResizeColumn" | "onRowDragEnd"> & TableProps<TRecord> & Partial<{}>> & import('vue').PublicProps;
7
8
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
8
9
  attrs: any;
9
10
  slots: Readonly<TableSlotsDecl<TRecord>> & TableSlotsDecl<TRecord>;
10
- emit: ((evt: "change", filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>) => void) & ((evt: "resizeColumn", column: ColumnType<TRecord>, width: number) => void);
11
+ emit: ((evt: "change", filters: TableFiltersInfo, sorter: VTableSorterResult<TRecord>, extra: TableChangeExtra<TRecord>) => void) & ((evt: "resizeColumn", column: ColumnType<TRecord>, width: number) => void) & ((evt: "rowDragEnd", newData: TRecord[], info: RowDragSortInfo) => void);
11
12
  }>) => import('vue').VNode & {
12
13
  __ctx?: Awaited<typeof __VLS_setup>;
13
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VTable.vue.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VTable.vue"],"names":[],"mappings":"AAyIA,OAAO,KAAK,EACV,UAAU,EAEV,gBAAgB,EAGhB,gBAAgB,EAEhB,UAAU,EACV,cAAc,EACd,kBAAkB,EACnB,MAAM,UAAU,CAAA;yBAGA,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAqPO,mBAAmB,CAAC;;;uLAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;EAIP,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAhQzE,wBAgQ4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"VTable.vue.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VTable.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EACV,UAAU,EAEV,gBAAgB,EAGhB,gBAAgB,EAEhB,UAAU,EACV,cAAc,EACd,eAAe,EACf,kBAAkB,EACnB,MAAM,UAAU,CAAA;yBAGA,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA+PO,mBAAmB,CAAC;;;;wMAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;EAIP,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA1QzE,wBA0Q4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,17 +1,19 @@
1
- import { defineComponent as g, getCurrentInstance as w, createBlock as F, openBlock as $, unref as v, mergeProps as B, createSlots as b, withCtx as n, renderSlot as t, normalizeProps as s, guardReactiveProps as r } from "vue";
1
+ import { defineComponent as h, getCurrentInstance as F, createBlock as $, openBlock as v, unref as B, mergeProps as b, createSlots as R, withCtx as t, renderSlot as l, normalizeProps as r, guardReactiveProps as s } from "vue";
2
2
  import k from "./Table.mjs";
3
- const D = /* @__PURE__ */ g({
3
+ const z = /* @__PURE__ */ h({
4
4
  name: "VTable",
5
5
  __name: "VTable",
6
6
  props: {
7
7
  dataSource: {},
8
8
  columns: {},
9
+ columnOrder: {},
9
10
  rowKey: { type: [String, Function] },
10
11
  loading: { type: [Boolean, Object] },
11
12
  size: {},
12
13
  bordered: { type: Boolean },
13
14
  striped: { type: Boolean },
14
15
  hoverable: { type: Boolean },
16
+ rowDraggable: { type: Boolean },
15
17
  ui: {},
16
18
  class: {},
17
19
  tableLayout: {},
@@ -44,31 +46,31 @@ const D = /* @__PURE__ */ g({
44
46
  onExpand: { type: Function },
45
47
  onExpandedRowsChange: { type: Function }
46
48
  },
47
- emits: ["change", "resizeColumn"],
49
+ emits: ["change", "resizeColumn", "rowDragEnd"],
48
50
  setup(S, { emit: u }) {
49
- const a = u, p = w();
50
- function d() {
51
+ const a = u, d = F();
52
+ function p() {
51
53
  const e = {};
52
- for (const [l, o] of Object.entries(p?.vnode.props ?? {}))
53
- l !== "onChange" && l !== "onResizeColumn" && (e[l] = o);
54
+ for (const [n, o] of Object.entries(d?.vnode.props ?? {}))
55
+ n !== "onChange" && n !== "onResizeColumn" && n !== "onRowDragEnd" && (e[n] = o);
54
56
  return e;
55
57
  }
56
- function R(e) {
58
+ function D(e) {
57
59
  return e;
58
60
  }
59
- function m(e, l, o) {
61
+ function m(e, n, o) {
60
62
  a(
61
63
  "change",
62
64
  e,
63
- l,
65
+ n,
64
66
  o
65
67
  );
66
68
  }
67
- function y(e, l) {
68
- a("resizeColumn", e, l);
69
+ function c(e, n) {
70
+ a("resizeColumn", e, n);
69
71
  }
70
- function c(e) {
71
- return e;
72
+ function y(e, n) {
73
+ a("rowDragEnd", e, n);
72
74
  }
73
75
  function f(e) {
74
76
  return e;
@@ -76,76 +78,80 @@ const D = /* @__PURE__ */ g({
76
78
  function C(e) {
77
79
  return e;
78
80
  }
79
- function h(e) {
81
+ function g(e) {
82
+ return e;
83
+ }
84
+ function w(e) {
80
85
  return e;
81
86
  }
82
87
  function i(e) {
83
88
  return e;
84
89
  }
85
- return (e, l) => ($(), F(v(k), B(d(), {
90
+ return (e, n) => (v(), $(B(k), b(p(), {
86
91
  onChange: m,
87
- onResizeColumn: y
88
- }), b({ _: 2 }, [
92
+ onResizeColumn: c,
93
+ onRowDragEnd: y
94
+ }), R({ _: 2 }, [
89
95
  e.$slots.bodyCell ? {
90
96
  name: "bodyCell",
91
- fn: n((o) => [
92
- t(e.$slots, "bodyCell", s(r(c(o))))
97
+ fn: t((o) => [
98
+ l(e.$slots, "bodyCell", r(s(f(o))))
93
99
  ]),
94
100
  key: "0"
95
101
  } : void 0,
96
102
  e.$slots.headerCell ? {
97
103
  name: "headerCell",
98
- fn: n((o) => [
99
- t(e.$slots, "headerCell", s(r(f(o))))
104
+ fn: t((o) => [
105
+ l(e.$slots, "headerCell", r(s(C(o))))
100
106
  ]),
101
107
  key: "1"
102
108
  } : void 0,
103
109
  e.$slots.empty ? {
104
110
  name: "empty",
105
- fn: n(() => [
106
- t(e.$slots, "empty")
111
+ fn: t(() => [
112
+ l(e.$slots, "empty")
107
113
  ]),
108
114
  key: "2"
109
115
  } : void 0,
110
116
  e.$slots.loading ? {
111
117
  name: "loading",
112
- fn: n(() => [
113
- t(e.$slots, "loading")
118
+ fn: t(() => [
119
+ l(e.$slots, "loading")
114
120
  ]),
115
121
  key: "3"
116
122
  } : void 0,
117
123
  e.$slots.customFilterDropdown ? {
118
124
  name: "customFilterDropdown",
119
- fn: n((o) => [
120
- t(e.$slots, "customFilterDropdown", s(r(C(o))))
125
+ fn: t((o) => [
126
+ l(e.$slots, "customFilterDropdown", r(s(g(o))))
121
127
  ]),
122
128
  key: "4"
123
129
  } : void 0,
124
130
  e.$slots.customFilterIcon ? {
125
131
  name: "customFilterIcon",
126
- fn: n((o) => [
127
- t(e.$slots, "customFilterIcon", s(r(h(o))))
132
+ fn: t((o) => [
133
+ l(e.$slots, "customFilterIcon", r(s(w(o))))
128
134
  ]),
129
135
  key: "5"
130
136
  } : void 0,
131
137
  e.$slots.title ? {
132
138
  name: "title",
133
- fn: n((o) => [
134
- t(e.$slots, "title", s(r(i(o))))
139
+ fn: t((o) => [
140
+ l(e.$slots, "title", r(s(i(o))))
135
141
  ]),
136
142
  key: "6"
137
143
  } : void 0,
138
144
  e.$slots.footer ? {
139
145
  name: "footer",
140
- fn: n((o) => [
141
- t(e.$slots, "footer", s(r(i(o))))
146
+ fn: t((o) => [
147
+ l(e.$slots, "footer", r(s(i(o))))
142
148
  ]),
143
149
  key: "7"
144
150
  } : void 0,
145
151
  e.$slots.summary ? {
146
152
  name: "summary",
147
- fn: n(() => [
148
- t(e.$slots, "summary")
153
+ fn: t(() => [
154
+ l(e.$slots, "summary")
149
155
  ]),
150
156
  key: "8"
151
157
  } : void 0
@@ -153,5 +159,5 @@ const D = /* @__PURE__ */ g({
153
159
  }
154
160
  });
155
161
  export {
156
- D as default
162
+ z as default
157
163
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualTableBody.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VirtualTableBody.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,KAAK,CAAA;AAElD,OAAO,KAAK,EAAW,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAMpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAG/C,KAAK,sBAAsB,GAAG,iBAAiB,GAAG;IAChD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;;;cAQgC,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,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;;cAEhC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;;;;;;;;;;;IAK3F,wCAAwC;;;;;IAExC;;;OAGG;;;;;IAEH,qCAAqC;;cACJ,QAAQ,CAAC,aAAa,GA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