@vtable-guild/vtable-guild 2.8.0 → 2.8.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 (40) hide show
  1. package/dist/core/src/components/VirtualList/VirtualList.d.ts +3 -3
  2. package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
  3. package/dist/core/src/components/VirtualList/VirtualList.mjs +183 -177
  4. package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts +2 -2
  5. package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts.map +1 -1
  6. package/dist/core/src/components/VirtualList/hooks/useChildren.mjs +12 -12
  7. package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts +1 -1
  8. package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts.map +1 -1
  9. package/dist/core/src/components/VirtualList/hooks/useGetSize.mjs +1 -1
  10. package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts +2 -2
  11. package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts.map +1 -1
  12. package/dist/core/src/components/VirtualList/hooks/useHeights.mjs +36 -36
  13. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.d.ts.map +1 -1
  14. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.mjs +11 -11
  15. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.test.d.ts +2 -0
  16. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.test.d.ts.map +1 -0
  17. package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts +1 -1
  18. package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts.map +1 -1
  19. package/dist/core/src/components/VirtualList/hooks/useScrollTo.mjs +30 -30
  20. package/dist/index.d.ts +0 -28
  21. package/dist/index.full.mjs +2441 -2428
  22. package/dist/table/src/components/Table.d.ts.map +1 -1
  23. package/dist/table/src/components/Table.mjs +112 -113
  24. package/dist/table/src/components/VTableSummary.d.ts +15 -75
  25. package/dist/table/src/components/VTableSummary.d.ts.map +1 -1
  26. package/dist/table/src/components/VTableSummary.mjs +7 -7
  27. package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
  28. package/dist/table/src/components/VirtualTableBody.mjs +2 -3
  29. package/dist/table/src/composables/useExpand.d.ts.map +1 -1
  30. package/dist/table/src/composables/useExpand.mjs +28 -30
  31. package/dist/table/src/composables/useSelection.d.ts.map +1 -1
  32. package/dist/table/src/composables/useSelection.mjs +136 -126
  33. package/dist/table/src/index.d.ts +8 -87
  34. package/dist/table/src/index.d.ts.map +1 -1
  35. package/dist/table/src/index.mjs +12 -12
  36. package/dist/vtable-guild/src/augment.d.ts +15 -0
  37. package/dist/vtable-guild/src/augment.d.ts.map +1 -0
  38. package/dist/vtable-guild/src/index.d.ts +1 -0
  39. package/dist/vtable-guild/src/index.d.ts.map +1 -1
  40. package/package.json +4 -3
@@ -1,229 +1,239 @@
1
- import { ref as _, watch as P, computed as k } from "vue";
1
+ import { ref as _, watch as P, computed as m } from "vue";
2
2
  function ne(w) {
3
- const { data: c, childrenColumnName: d, getRowKey: R } = w, b = [];
4
- let N = 0;
5
- function I(y, C, h) {
6
- y.forEach((f) => {
7
- const p = N, z = R(f, p), a = f[d], S = {
8
- key: z,
9
- record: f,
10
- index: p,
11
- level: C,
12
- parentKey: h?.key,
3
+ const { data: o, childrenColumnName: d, getRowKey: R } = w, b = [];
4
+ let A = 0;
5
+ function E(y, N, S) {
6
+ y.forEach((u) => {
7
+ const k = A, f = R(u, k), h = u[d], I = {
8
+ key: f,
9
+ record: u,
10
+ index: k,
11
+ level: N,
12
+ parentKey: S?.key,
13
13
  childrenKeys: []
14
14
  };
15
- b.push(S), h?.childrenKeys.push(z), N += 1, Array.isArray(a) && a.length > 0 && I(a, C + 1, S);
15
+ b.push(I), S?.childrenKeys.push(f), A += 1, Array.isArray(h) && h.length > 0 && E(h, N + 1, I);
16
16
  });
17
17
  }
18
- return I(c, 0), b;
18
+ return E(o, 0), b;
19
19
  }
20
20
  const se = Object.freeze([]);
21
21
  function le(w) {
22
- return w.data.map((c, d) => ({
23
- key: w.getRowKey(c, d),
24
- record: c,
22
+ return w.data.map((o, d) => ({
23
+ key: w.getRowKey(o, d),
24
+ record: o,
25
25
  index: d,
26
26
  level: 0,
27
27
  childrenKeys: se
28
28
  }));
29
29
  }
30
- function oe(w) {
31
- const { rowSelection: c, getRowKey: d, data: R, visibleData: b, childrenColumnName: N, onSelectionChange: I } = w, y = _(/* @__PURE__ */ new Set()), C = _(!1), h = _(null), f = /* @__PURE__ */ new Map();
30
+ function ce(w) {
31
+ const { rowSelection: o, getRowKey: d, data: R, visibleData: b, childrenColumnName: A, onSelectionChange: E } = w, y = _(/* @__PURE__ */ new Set()), N = _(!1), S = _(null), u = /* @__PURE__ */ new Map();
32
32
  P(
33
- () => c()?.defaultSelectedRowKeys,
33
+ () => o()?.defaultSelectedRowKeys,
34
34
  (e) => {
35
- C.value || !e?.length || (y.value = new Set(e), C.value = !0);
35
+ N.value || !e?.length || (y.value = new Set(e), N.value = !0);
36
36
  },
37
37
  { immediate: !0 }
38
38
  );
39
- function p() {
40
- return c()?.selectedRowKeys !== void 0;
39
+ function k() {
40
+ return o()?.selectedRowKeys !== void 0;
41
41
  }
42
- const z = k(() => c()?.checkStrictly === !1), a = k(() => c() ? z.value || w.paginate?.() && R().some((e) => Array.isArray(e[N?.() ?? "children"])) ? ne({
43
- data: R(),
44
- childrenColumnName: N?.() ?? "children",
45
- getRowKey: d
46
- }) : le({
47
- data: R(),
48
- getRowKey: d
49
- }) : []), S = k(() => {
42
+ const f = m(() => {
43
+ if (!o()) return [];
44
+ const e = A?.() ?? "children";
45
+ return R().some((n) => {
46
+ const s = n[e];
47
+ return Array.isArray(s) && s.length > 0;
48
+ }) ? ne({
49
+ data: R(),
50
+ childrenColumnName: e,
51
+ getRowKey: d
52
+ }) : le({
53
+ data: R(),
54
+ getRowKey: d
55
+ });
56
+ }), h = m(() => {
50
57
  const e = /* @__PURE__ */ new Map();
51
- return a.value.forEach((t) => e.set(t.key, t)), e;
58
+ return f.value.forEach((t) => e.set(t.key, t)), e;
52
59
  });
53
60
  P(
54
61
  [
55
- a,
56
- () => c()?.preserveSelectedRowKeys,
57
- () => c()?.selectedRowKeys
62
+ f,
63
+ () => o()?.preserveSelectedRowKeys,
64
+ () => o()?.selectedRowKeys
58
65
  ],
59
66
  () => {
60
- if (!c()?.preserveSelectedRowKeys) {
61
- f.clear();
67
+ if (!o()?.preserveSelectedRowKeys) {
68
+ u.clear();
62
69
  return;
63
70
  }
64
- const e = new Set(c()?.selectedRowKeys ?? y.value);
65
- for (const t of f.keys()) e.has(t) || f.delete(t);
66
- for (const t of a.value)
67
- e.has(t.key) && f.set(t.key, t.record);
71
+ const e = new Set(o()?.selectedRowKeys ?? y.value);
72
+ for (const t of u.keys()) e.has(t) || u.delete(t);
73
+ for (const t of f.value)
74
+ e.has(t.key) && u.set(t.key, t.record);
68
75
  },
69
76
  { immediate: !0, flush: "sync" }
70
77
  ), P(
71
78
  () => b(),
72
79
  () => {
73
- h.value = null;
80
+ S.value = null;
74
81
  }
75
82
  );
76
- const L = k(
77
- () => a.value.filter((e) => e.parentKey === void 0).map((e) => e.key)
83
+ const I = m(
84
+ () => f.value.filter((e) => e.parentKey === void 0).map((e) => e.key)
78
85
  );
79
86
  function v(e) {
80
- return c()?.getCheckboxProps?.(e)?.disabled ?? !1;
87
+ return o()?.getCheckboxProps?.(e)?.disabled ?? !1;
81
88
  }
82
89
  function j(e) {
83
- return S.value.get(e)?.childrenKeys ?? [];
90
+ return h.value.get(e)?.childrenKeys ?? [];
84
91
  }
85
- const O = k(() => {
86
- const e = S.value, t = /* @__PURE__ */ new Map(), n = a.value;
92
+ const L = m(() => {
93
+ const e = h.value, t = /* @__PURE__ */ new Map(), n = f.value;
87
94
  for (let s = n.length - 1; s >= 0; s -= 1) {
88
- const l = n[s], o = [];
95
+ const l = n[s], c = [];
89
96
  for (const r of l.childrenKeys) {
90
- const i = e.get(r);
91
- if (!i || v(i.record)) continue;
92
- o.push(r);
93
- const u = t.get(r);
94
- u && o.push(...u);
97
+ const a = e.get(r);
98
+ if (!a || v(a.record)) continue;
99
+ c.push(r);
100
+ const i = t.get(r);
101
+ i && c.push(...i);
95
102
  }
96
- t.set(l.key, o);
103
+ t.set(l.key, c);
97
104
  }
98
105
  return t;
99
106
  });
100
107
  function V(e) {
101
- if (c()?.checkStrictly !== !1)
108
+ if (o()?.checkStrictly !== !1)
102
109
  return new Set(e);
103
110
  const t = new Set(e), n = (s) => {
104
111
  const l = j(s);
105
112
  l.forEach(n);
106
- const o = S.value.get(s);
107
- if (!o || v(o.record)) return;
108
- const r = l.map((u) => S.value.get(u)).filter((u) => !!u && !v(u.record));
113
+ const c = h.value.get(s);
114
+ if (!c || v(c.record)) return;
115
+ const r = l.map((i) => h.value.get(i)).filter((i) => !!i && !v(i.record));
109
116
  if (r.length === 0) return;
110
- r.every((u) => t.has(u.key)) ? t.add(s) : t.delete(s);
117
+ r.every((i) => t.has(i.key)) ? t.add(s) : t.delete(s);
111
118
  };
112
- return L.value.forEach(n), t;
119
+ return I.value.forEach(n), t;
113
120
  }
114
- const g = k(() => {
115
- const e = c(), t = e?.selectedRowKeys !== void 0 ? new Set(e.selectedRowKeys) : y.value;
121
+ const g = m(() => {
122
+ const e = o(), t = e?.selectedRowKeys !== void 0 ? new Set(e.selectedRowKeys) : y.value;
116
123
  return V(t);
117
124
  });
118
125
  P(
119
- [a, () => c()?.preserveSelectedRowKeys],
126
+ [f, () => o()?.preserveSelectedRowKeys],
120
127
  () => {
121
- if (p() || c()?.preserveSelectedRowKeys || y.value.size === 0) return;
122
- const e = new Set(a.value.map((n) => n.key)), t = new Set(
128
+ if (k() || o()?.preserveSelectedRowKeys || y.value.size === 0) return;
129
+ const e = new Set(f.value.map((n) => n.key)), t = new Set(
123
130
  Array.from(y.value).filter((n) => e.has(n))
124
131
  );
125
132
  t.size !== y.value.size && (y.value = t);
126
133
  },
127
134
  { immediate: !0 }
128
135
  );
129
- function M(e) {
136
+ function z(e) {
130
137
  return g.value.has(e);
131
138
  }
132
- function m(e) {
133
- const t = a.value.filter((n) => e.has(n.key)).map((n) => n.record);
134
- if (c()?.preserveSelectedRowKeys)
139
+ function p(e) {
140
+ const t = f.value.filter((n) => e.has(n.key)).map((n) => n.record);
141
+ if (o()?.preserveSelectedRowKeys)
135
142
  for (const n of e)
136
- !S.value.has(n) && f.has(n) && t.push(f.get(n));
143
+ !h.value.has(n) && u.has(n) && t.push(u.get(n));
137
144
  return t;
138
145
  }
139
- function q() {
140
- return b().map((e, t) => S.value.get(d(e, t)) ?? null).filter((e) => e !== null);
146
+ function O() {
147
+ return b().map((e, t) => h.value.get(d(e, t)) ?? null).filter((e) => e !== null);
141
148
  }
142
- function E() {
143
- return q().filter((e) => !v(e.record));
149
+ function M() {
150
+ return O().filter((e) => !v(e.record));
151
+ }
152
+ function q() {
153
+ return f.value.filter((e) => !v(e.record));
144
154
  }
145
- function B() {
146
- return a.value.filter((e) => !v(e.record));
155
+ function B(e = !1) {
156
+ return w.paginate?.() && !e ? M() : q();
147
157
  }
148
158
  function F(e, t) {
149
- const n = d(e, t), s = M(n), l = v(e);
150
- if (c()?.checkStrictly !== !1)
159
+ const n = d(e, t), s = z(n), l = v(e);
160
+ if (o()?.checkStrictly !== !1)
151
161
  return {
152
162
  checked: s,
153
163
  indeterminate: !1,
154
164
  disabled: l
155
165
  };
156
- const o = O.value.get(n) ?? [];
157
- if (o.length === 0)
166
+ const c = L.value.get(n) ?? [];
167
+ if (c.length === 0)
158
168
  return {
159
169
  checked: s,
160
170
  indeterminate: !1,
161
171
  disabled: l
162
172
  };
163
- const r = o.filter((i) => g.value.has(i)).length;
173
+ const r = c.filter((a) => g.value.has(a)).length;
164
174
  return {
165
175
  checked: s,
166
- indeterminate: r > 0 && r < o.length,
176
+ indeterminate: r > 0 && r < c.length,
167
177
  disabled: l
168
178
  };
169
179
  }
170
180
  function K(e, t) {
171
181
  const n = V(e);
172
- if (c()?.preserveSelectedRowKeys) {
173
- if (!p())
174
- for (const s of f.keys())
175
- n.has(s) || f.delete(s);
176
- for (const s of a.value)
177
- n.has(s.key) && f.set(s.key, s.record);
182
+ if (o()?.preserveSelectedRowKeys) {
183
+ if (!k())
184
+ for (const s of u.keys())
185
+ n.has(s) || u.delete(s);
186
+ for (const s of f.value)
187
+ n.has(s.key) && u.set(s.key, s.record);
178
188
  }
179
- p() || (y.value = n);
189
+ k() || (y.value = n);
180
190
  {
181
- const s = Array.from(n), l = m(n);
182
- c()?.onChange?.(s, l), I?.();
191
+ const s = Array.from(n), l = p(n);
192
+ o()?.onChange?.(s, l), E?.();
183
193
  }
184
194
  }
185
195
  function Y(e, t, n, s) {
186
- const l = S.value.get(e);
196
+ const l = h.value.get(e);
187
197
  if (!l || v(l.record)) return;
188
- const o = t.has(e);
189
- n ? t.add(e) : t.delete(e), o !== n && s.push(l.record), j(e).forEach(
198
+ const c = t.has(e);
199
+ n ? t.add(e) : t.delete(e), c !== n && s.push(l.record), j(e).forEach(
190
200
  (r) => Y(r, t, n, s)
191
201
  );
192
202
  }
193
203
  function G(e, t, n) {
194
- const s = c();
204
+ const s = o();
195
205
  if (!s) return;
196
- const l = d(e, t), o = !M(l);
197
- if (s.type !== "radio" && n?.shiftKey && h.value !== null && c()?.checkStrictly !== !1) {
198
- const i = E(), u = i.findIndex((x) => x.key === l), D = i.findIndex(
199
- (x) => x.key === h.value
206
+ const l = d(e, t), c = !z(l);
207
+ if (s.type !== "radio" && n?.shiftKey && S.value !== null && o()?.checkStrictly !== !1) {
208
+ const a = M(), i = a.findIndex((C) => C.key === l), D = a.findIndex(
209
+ (C) => C.key === S.value
200
210
  );
201
- if (u !== -1 && D !== -1) {
202
- const [x, ee] = u > D ? [D, u] : [u, D], A = new Set(g.value), H = [];
203
- i.slice(x, ee + 1).forEach((T) => {
204
- const te = A.has(T.key);
205
- o ? A.add(T.key) : A.delete(T.key), te !== o && H.push(T.record);
206
- }), K(A), s.onSelectMultiple?.(o, m(A), H), h.value = l;
211
+ if (i !== -1 && D !== -1) {
212
+ const [C, ee] = i > D ? [D, i] : [i, D], x = new Set(g.value), H = [];
213
+ a.slice(C, ee + 1).forEach((T) => {
214
+ const te = x.has(T.key);
215
+ c ? x.add(T.key) : x.delete(T.key), te !== c && H.push(T.record);
216
+ }), K(x), s.onSelectMultiple?.(c, p(x), H), S.value = l;
207
217
  return;
208
218
  }
209
219
  }
210
220
  if (s.type === "radio") {
211
- const i = o ? /* @__PURE__ */ new Set([l]) : /* @__PURE__ */ new Set();
212
- K(i), s.onSelect?.(e, o, m(i)), h.value = l;
221
+ const a = c ? /* @__PURE__ */ new Set([l]) : /* @__PURE__ */ new Set();
222
+ K(a), s.onSelect?.(e, c, p(a)), S.value = l;
213
223
  return;
214
224
  }
215
225
  const r = new Set(g.value);
216
- o ? r.add(l) : r.delete(l), K(r), s.onSelect?.(e, o, m(r)), h.value = l;
226
+ c ? r.add(l) : r.delete(l), K(r), s.onSelect?.(e, c, p(r)), S.value = l;
217
227
  }
218
228
  function J(e, t) {
219
- const n = c();
229
+ const n = o();
220
230
  if (!n) return;
221
- const s = d(e, t), l = !M(s), o = new Set(g.value);
222
- Y(s, o, l, []), K(o), n.onSelect?.(e, l, m(o)), h.value = s;
231
+ const s = d(e, t), l = !z(s), c = new Set(g.value);
232
+ Y(s, c, l, []), K(c), n.onSelect?.(e, l, p(c)), S.value = s;
223
233
  }
224
234
  function Q(e, t, n) {
225
235
  if (v(e)) return;
226
- const s = c();
236
+ const s = o();
227
237
  if (s) {
228
238
  if (s.checkStrictly === !1 && s.type !== "radio") {
229
239
  J(e, t);
@@ -233,42 +243,42 @@ function oe(w) {
233
243
  }
234
244
  }
235
245
  function U(e, t = !1) {
236
- const n = c();
246
+ const n = o();
237
247
  if (!n) return;
238
- const s = w.paginate?.() && !t ? E() : B(), l = new Set(g.value), o = [];
248
+ const s = B(t), l = new Set(g.value), c = [];
239
249
  s.forEach((r) => {
240
250
  if (n.checkStrictly === !1) {
241
- Y(r.key, l, e, o);
251
+ Y(r.key, l, e, c);
242
252
  return;
243
253
  }
244
- const i = l.has(r.key);
245
- e ? l.add(r.key) : l.delete(r.key), i !== e && o.push(r.record);
246
- }), K(l), n.onSelectAll?.(e, m(l), o);
254
+ const a = l.has(r.key);
255
+ e ? l.add(r.key) : l.delete(r.key), a !== e && c.push(r.record);
256
+ }), K(l), n.onSelectAll?.(e, p(l), c);
247
257
  }
248
- const W = k(() => {
249
- const e = E();
258
+ const W = m(() => {
259
+ const e = B();
250
260
  if (e.length === 0) return "none";
251
261
  const t = e.filter((n) => g.value.has(n.key)).length;
252
262
  return t === 0 ? "none" : t === e.length ? "all" : "partial";
253
263
  });
254
264
  function X() {
255
- const e = c();
265
+ const e = o();
256
266
  if (!e) return;
257
- const t = E(), n = new Set(g.value);
267
+ const t = M(), n = new Set(g.value);
258
268
  t.forEach((s) => {
259
269
  n.has(s.key) ? n.delete(s.key) : n.add(s.key);
260
270
  }), K(n), e.onSelectInvert?.(Array.from(V(n)));
261
271
  }
262
272
  function Z() {
263
- const e = c();
273
+ const e = o();
264
274
  e && (K(/* @__PURE__ */ new Set()), e.onSelectNone?.());
265
275
  }
266
276
  function $() {
267
- return E().map((e) => e.key);
277
+ return M().map((e) => e.key);
268
278
  }
269
279
  return {
270
280
  selectedKeySet: g,
271
- isSelected: M,
281
+ isSelected: z,
272
282
  isDisabled: v,
273
283
  getSelectionState: F,
274
284
  toggleRow: Q,
@@ -280,5 +290,5 @@ function oe(w) {
280
290
  };
281
291
  }
282
292
  export {
283
- oe as useSelection
293
+ ce as useSelection
284
294
  };
@@ -1,5 +1,6 @@
1
1
  import { default as _VTable } from './components/VTable.vue';
2
2
  import { SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE, EXPAND_COLUMN, SELECTION_COLUMN } from './constants';
3
+ import { default as _VTableSummary } from './components/VTableSummary';
3
4
  declare const VTable: (<TRecord extends object = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
5
  slots: Readonly<import('../../vtable-guild/src/index.ts').TableSlotsDecl<TRecord>> & import('../../vtable-guild/src/index.ts').TableSlotsDecl<TRecord>;
5
6
  attrs: any;
@@ -28,20 +29,20 @@ declare const VTable: (<TRecord extends object = Record<string, unknown>>(__VLS_
28
29
  slots: Record<import('../../theme/src/index.ts').TableSlots, string>;
29
30
  }> | undefined;
30
31
  class?: string | undefined;
31
- tableLayout?: import('./types').TableLayout | undefined;
32
+ tableLayout?: import('../../vtable-guild/src/index.ts').TableLayout | undefined;
32
33
  showHeader?: boolean | undefined;
33
34
  headerEllipsis?: boolean | undefined;
34
- rowClassName?: string | import('./types').RowClassName<TRecord> | undefined;
35
- customRow?: import('./types').GetComponentProps<TRecord> | undefined;
35
+ rowClassName?: string | import('../../vtable-guild/src/index.ts').RowClassName<TRecord> | undefined;
36
+ customRow?: import('../../vtable-guild/src/index.ts').GetComponentProps<TRecord> | undefined;
36
37
  customHeaderRow?: ((columns: (import('../../vtable-guild/src/index.ts').ColumnType<TRecord> | import('../../vtable-guild/src/index.ts').ColumnGroupType<TRecord>)[], index?: number) => import('../../vtable-guild/src/index.ts').CellAdditionalProps) | undefined;
37
38
  showSorterTooltip?: boolean | undefined;
38
39
  sortDirections?: import('../../vtable-guild/src/index.ts').SortOrder[] | undefined;
39
40
  locale?: import('../../core/src/index.ts').LocaleName | undefined;
40
41
  locales?: import('../../core/src/index.ts').LocaleRegistry | undefined;
41
42
  localeOverrides?: import('../../core/src/index.ts').DeepPartial<import('../../core/src/index.ts').VTableGuildTableLocale> | undefined;
42
- sticky?: (boolean | import('./types').TableSticky) | undefined;
43
+ sticky?: (boolean | import('../../vtable-guild/src/index.ts').TableSticky) | undefined;
43
44
  getPopupContainer?: ((triggerNode: HTMLElement) => HTMLElement) | undefined;
44
- transformCellText?: import('./types').TransformCellText<TRecord> | undefined;
45
+ transformCellText?: import('../../vtable-guild/src/index.ts').TransformCellText<TRecord> | undefined;
45
46
  rowSelection?: import('../../vtable-guild/src/index.ts').RowSelection<TRecord> | undefined;
46
47
  expandable?: import('../../vtable-guild/src/index.ts').Expandable<TRecord> | undefined;
47
48
  title?: ((data: TRecord[]) => import('vue').VNodeChild) | undefined;
@@ -75,87 +76,7 @@ declare const VTable: (<TRecord extends object = Record<string, unknown>>(__VLS_
75
76
  readonly EXPAND_COLUMN: typeof EXPAND_COLUMN;
76
77
  readonly SELECTION_COLUMN: typeof SELECTION_COLUMN;
77
78
  };
78
- declare const VTableSummary: {
79
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
80
- fixed: {
81
- type: import('vue').PropType<import('../../vtable-guild/src/index.ts').SummaryFixed>;
82
- default: undefined;
83
- };
84
- }>> & Readonly<{}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
85
- [key: string]: any;
86
- }>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
87
- fixed: import('../../vtable-guild/src/index.ts').SummaryFixed;
88
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
89
- P: {};
90
- B: {};
91
- D: {};
92
- C: {};
93
- M: {};
94
- Defaults: {};
95
- }, Readonly<import('vue').ExtractPropTypes<{
96
- fixed: {
97
- type: import('vue').PropType<import('../../vtable-guild/src/index.ts').SummaryFixed>;
98
- default: undefined;
99
- };
100
- }>> & Readonly<{}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
101
- [key: string]: any;
102
- }>[] | undefined, {}, {}, {}, {
103
- fixed: import('../../vtable-guild/src/index.ts').SummaryFixed;
104
- }>;
105
- __isFragment?: never;
106
- __isTeleport?: never;
107
- __isSuspense?: never;
108
- } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
109
- fixed: {
110
- type: import('vue').PropType<import('../../vtable-guild/src/index.ts').SummaryFixed>;
111
- default: undefined;
112
- };
113
- }>> & Readonly<{}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
114
- [key: string]: any;
115
- }>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
116
- fixed: import('../../vtable-guild/src/index.ts').SummaryFixed;
117
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
118
- Row: import('vue').DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
119
- Cell: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
120
- index: {
121
- type: NumberConstructor;
122
- required: true;
123
- };
124
- colSpan: {
125
- type: NumberConstructor;
126
- default: number;
127
- };
128
- rowSpan: {
129
- type: NumberConstructor;
130
- default: undefined;
131
- };
132
- align: {
133
- type: import('vue').PropType<import('../../vtable-guild/src/index.ts').AlignType>;
134
- default: undefined;
135
- };
136
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
137
- index: {
138
- type: NumberConstructor;
139
- required: true;
140
- };
141
- colSpan: {
142
- type: NumberConstructor;
143
- default: number;
144
- };
145
- rowSpan: {
146
- type: NumberConstructor;
147
- default: undefined;
148
- };
149
- align: {
150
- type: import('vue').PropType<import('../../vtable-guild/src/index.ts').AlignType>;
151
- default: undefined;
152
- };
153
- }>> & Readonly<{}>, {
154
- align: import('../../vtable-guild/src/index.ts').AlignType;
155
- colSpan: number;
156
- rowSpan: number;
157
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
158
- };
79
+ declare const VTableSummary: typeof _VTableSummary;
159
80
  declare const VTableSummaryRow: import('vue').DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
160
81
  declare const VTableSummaryCell: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
161
82
  index: {
@@ -197,7 +118,7 @@ declare const VTableSummaryCell: import('vue').DefineComponent<import('vue').Ext
197
118
  rowSpan: number;
198
119
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
199
120
  export { VTable, VTableSummary, VTableSummaryRow, VTableSummaryCell, SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE, EXPAND_COLUMN, SELECTION_COLUMN, };
200
- export type { Key, AlignType, Breakpoint, DataIndex, CellAdditionalProps, CustomRenderContext, RenderedCell, ColumnType, ColumnType as TableColumnType, ColumnGroupType, ColumnGroupType as TableColumnGroupType, ColumnsType, ColumnsType as TableColumnsType, SortOrder, SorterFn, ColumnSorter, ColumnFilterItem, TableProps, TablePaginationConfig, TablePaginationState, TablePaginationPosition, TablePaginationBuiltinLayoutItem, TablePaginationLayoutItem, TablePaginationLayout, TablePaginationSlotProps, PaginationItemType, TableBodyCellSlotProps, TableHeaderCellSlotProps, TableDataSlotProps, TableSlotsDecl, CustomFilterDropdownSlotProps, TableFiltersInfo, TableChangeExtra, RowDragSortInfo, VTableSorterResult, VTableEventProps, VTablePublicProps, RowSelection, RowSelectionType, SelectionItem, SelectionSentinel, ColumnSentinel, ExpandColumnSentinel, SelectionColumnSentinel, Expandable, } from './types';
121
+ export type { Key, AlignType, Breakpoint, DataIndex, CellAdditionalProps, CustomRenderContext, RenderedCell, GetComponentProps, ColumnTitleProps, ColumnTitle, ColumnType, ColumnType as TableColumnType, ColumnGroupType, ColumnGroupType as TableColumnGroupType, ColumnsType, ColumnsType as TableColumnsType, SortOrder, SorterFn, ColumnSorterObject, ColumnSorter, ColumnFilterItem, TableLayout, TableSticky, RowClassName, TransformCellText, TableProps, TablePaginationConfig, TablePaginationState, TablePaginationPosition, TablePaginationBuiltinLayoutItem, TablePaginationLayoutItem, TablePaginationLayout, TablePaginationSlotProps, PaginationItemType, TableBodyCellSlotProps, TableHeaderCellSlotProps, TableDataSlotProps, TableSlotsDecl, CustomFilterDropdownSlotProps, TableFiltersInfo, SorterResultLike, TableChangeExtra, RowDragSortInfo, VTableSorterResult, VTableEventProps, VTablePublicProps, RowSelection, RowSelectionType, SelectionItem, SelectionSentinel, ColumnSentinel, ExpandColumnSentinel, SelectionColumnSentinel, Expandable, } from './types';
201
122
  /**
202
123
  * 直接从真实导出(泛型 SFC)派生组件类型,而不是在 types/ 里手写一份
203
124
  * declare class——手写副本会随 props/emit 演进静默漂移。
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../table/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAA;AAC7C,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EACjB,MAAM,aAAa,CAAA;AAKpB,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;oBAyF0qG,CAAC;qBAAoB,CAAC;eAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAA0gE,CAAC;aAAoB,CAAC;oCAA2C,CAAC;;;;;;;;;;;;;;;;;;SAA0nO,CAAC;;;;;;;CAnF15Y,CAAA;AACX,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAA;AACpC,QAAA,MAAM,gBAAgB,wTAAoB,CAAA;AAC1C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAAqB,CAAA;AAE5C,OAAO,EACL,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,CAAA;AAED,YAAY,EACV,GAAG,EACH,SAAS,EACT,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,UAAU,IAAI,eAAe,EAC7B,eAAe,EACf,eAAe,IAAI,oBAAoB,EACvC,WAAW,EACX,WAAW,IAAI,gBAAgB,EAC/B,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,gCAAgC,EAChC,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,GACX,MAAM,SAAS,CAAA;AAEhB;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,OAAO,CAAA;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5D,YAAY,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../table/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAA;AAC7C,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EACjB,MAAM,aAAa,CAAA;AACpB,OAAO,cAAc,MAAM,4BAA4B,CAAA;AAIvD,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;oBAkG8+F,CAAC;qBAAoB,CAAC;eAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAA0gE,CAAC;aAAoB,CAAC;oCAA2C,CAAC;;;;;;;;;;;;;;;;;;SAA0nO,CAAC;;;;;;;CA5F9tY,CAAA;AACX,QAAA,MAAM,aAAa,EAAE,OAAO,cAA+B,CAAA;AAC3D,QAAA,MAAM,gBAAgB,wTAAoB,CAAA;AAC1C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAAqB,CAAA;AAE5C,OAAO,EACL,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,CAAA;AAED,YAAY,EACV,GAAG,EACH,SAAS,EACT,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,UAAU,IAAI,eAAe,EAC7B,eAAe,EACf,eAAe,IAAI,oBAAoB,EACvC,WAAW,EACX,WAAW,IAAI,gBAAgB,EAC/B,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,gCAAgC,EAChC,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,GACX,MAAM,SAAS,CAAA;AAEhB;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,OAAO,CAAA;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5D,YAAY,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA"}
@@ -1,23 +1,23 @@
1
1
  import m from "./components/VTable.vue.mjs";
2
- import { SELECTION_COLUMN as o, EXPAND_COLUMN as r, SELECTION_NONE as a, SELECTION_INVERT as T, SELECTION_ALL as e } from "./constants.mjs";
3
- import l from "./components/VTableSummary.mjs";
4
- import t from "./components/VTableSummaryRow.mjs";
5
- import E from "./components/VTableSummaryCell.mjs";
6
- const L = Object.assign(m, {
2
+ import { SELECTION_COLUMN as o, EXPAND_COLUMN as r, SELECTION_NONE as a, SELECTION_INVERT as t, SELECTION_ALL as e } from "./constants.mjs";
3
+ import E from "./components/VTableSummary.mjs";
4
+ import S from "./components/VTableSummaryRow.mjs";
5
+ import T from "./components/VTableSummaryCell.mjs";
6
+ const n = Object.assign(m, {
7
7
  SELECTION_ALL: e,
8
- SELECTION_INVERT: T,
8
+ SELECTION_INVERT: t,
9
9
  SELECTION_NONE: a,
10
10
  EXPAND_COLUMN: r,
11
11
  SELECTION_COLUMN: o
12
- }), O = l, V = t, i = E;
12
+ }), s = E, C = S, L = T;
13
13
  export {
14
14
  r as EXPAND_COLUMN,
15
15
  e as SELECTION_ALL,
16
16
  o as SELECTION_COLUMN,
17
- T as SELECTION_INVERT,
17
+ t as SELECTION_INVERT,
18
18
  a as SELECTION_NONE,
19
- L as VTable,
20
- O as VTableSummary,
21
- i as VTableSummaryCell,
22
- V as VTableSummaryRow
19
+ n as VTable,
20
+ s as VTableSummary,
21
+ L as VTableSummaryCell,
22
+ C as VTableSummaryRow
23
23
  };
@@ -0,0 +1,15 @@
1
+ import { ThemeOverrideConfig } from '../../core/src/index.ts';
2
+ import { TableThemeConfig, ButtonThemeConfig, CheckboxThemeConfig, RadioThemeConfig, InputThemeConfig, TooltipThemeConfig, ScrollbarThemeConfig, PaginationThemeConfig } from '../../theme/src/index.ts';
3
+ declare module '../../core/src/index' {
4
+ interface VTableGuildThemeOverridesMap {
5
+ table: ThemeOverrideConfig<TableThemeConfig>;
6
+ button: ThemeOverrideConfig<ButtonThemeConfig>;
7
+ checkbox: ThemeOverrideConfig<CheckboxThemeConfig>;
8
+ radio: ThemeOverrideConfig<RadioThemeConfig>;
9
+ input: ThemeOverrideConfig<InputThemeConfig>;
10
+ tooltip: ThemeOverrideConfig<TooltipThemeConfig>;
11
+ scrollbar: ThemeOverrideConfig<ScrollbarThemeConfig>;
12
+ pagination: ThemeOverrideConfig<PaginationThemeConfig>;
13
+ }
14
+ }
15
+ //# sourceMappingURL=augment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"augment.d.ts","sourceRoot":"","sources":["../../../src/augment.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,4BAA4B;QACpC,KAAK,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;QAC5C,MAAM,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,CAAA;QAC9C,QAAQ,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;QAClD,KAAK,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;QAC5C,KAAK,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;QAC5C,OAAO,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;QAChD,SAAS,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;QACpD,UAAU,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;KACvD;CACF"}
@@ -1,4 +1,5 @@
1
1
  export * from '../../core/src/index.ts';
2
2
  export * from '../../theme/src/index.ts';
3
3
  export * from '../../table/src/index.ts';
4
+ export * from './augment';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AAGnC,cAAc,WAAW,CAAA"}