st-comp 0.0.75 → 0.0.76

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 (77) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +25 -223
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +15 -13
  6. package/es/Kline.cjs +1 -1
  7. package/es/Kline.js +105 -102
  8. package/es/KlineNew.cjs +1 -1
  9. package/es/KlineNew.js +45 -42
  10. package/es/MonacoEditor.cjs +1 -1
  11. package/es/MonacoEditor.js +1 -1
  12. package/es/Pagination.cjs +1 -1
  13. package/es/Pagination.js +121 -117
  14. package/es/Table.cjs +3 -3
  15. package/es/Table.js +275 -271
  16. package/es/VarietySearch.cjs +2 -2
  17. package/es/VarietySearch.js +476 -477
  18. package/es/VirtualTable.cjs +13 -1
  19. package/es/VirtualTable.js +2724 -1
  20. package/es/{base-dbd10dcf.cjs → base-4865d432.cjs} +3 -3
  21. package/es/{base-00f6b0ab.js → base-6faccb01.js} +66 -65
  22. package/es/castArray-3341cbb4.cjs +1 -0
  23. package/es/castArray-bdee0d50.js +10 -0
  24. package/es/config-provider-465c8253.cjs +1 -0
  25. package/es/config-provider-be0e9c36.js +46 -0
  26. package/es/{el-button-12e38f0b.js → el-button-1b9c4fd6.js} +31 -31
  27. package/es/el-button-aad5268b.cjs +1 -0
  28. package/es/el-empty-348c46f7.js +204 -0
  29. package/es/el-empty-608948d9.cjs +1 -0
  30. package/es/el-icon-158ddc19.cjs +1 -0
  31. package/es/{el-icon-bacbcecf.js → el-icon-d385d377.js} +58 -57
  32. package/es/{el-overlay-ea0f5492.js → el-overlay-400ac6ce.js} +58 -57
  33. package/es/el-overlay-4713107e.cjs +5 -0
  34. package/es/el-scrollbar-83abe3de.js +248 -0
  35. package/es/el-scrollbar-bc381e35.cjs +1 -0
  36. package/es/el-select-7116533b.cjs +9 -0
  37. package/es/{el-select-f84b87d9.js → el-select-895360ba.js} +282 -280
  38. package/es/el-tag-2c7e5d4a.cjs +1 -0
  39. package/es/el-tag-30cecca3.js +2417 -0
  40. package/es/focus-trap-5ac78614.js +259 -0
  41. package/es/focus-trap-a169f160.cjs +1 -0
  42. package/es/{index-2cc1c02e.cjs → index-a091492d.cjs} +1 -1
  43. package/es/{index-16dfa199.js → index-caa490bf.js} +17 -14
  44. package/es/{python-336a8c96.js → python-0b8dfd75.js} +1 -1
  45. package/es/{python-044eec0c.cjs → python-bd86111b.cjs} +1 -1
  46. package/es/raf-5e5c53db.cjs +1 -0
  47. package/es/raf-92c5ed6d.js +6 -0
  48. package/es/{scroll-c6489061.js → scroll-264c50f3.js} +5 -5
  49. package/es/{scroll-891e3e9f.cjs → scroll-bb8039ba.cjs} +1 -1
  50. package/es/style.css +1 -1
  51. package/es/typescript-7ae59c4c.js +4 -0
  52. package/es/typescript-b63f8e83.cjs +1 -0
  53. package/es/use-form-item-0e9cae13.js +668 -0
  54. package/es/use-form-item-6cef6b15.cjs +3 -0
  55. package/es/use-global-config-17f3d7c7.cjs +1 -0
  56. package/es/use-global-config-8c9c775f.js +110 -0
  57. package/es/{vnode-b44a499a.cjs → vnode-abafec9e.cjs} +1 -1
  58. package/es/{vnode-229e6729.js → vnode-b78096e3.js} +4 -4
  59. package/es/{zh-cn-e0c3b8df.js → zh-cn-8aaa7dd2.js} +2 -2
  60. package/es/{zh-cn-5c01bb26.cjs → zh-cn-e4d38144.cjs} +1 -1
  61. package/lib/bundle.js +1 -1
  62. package/lib/bundle.umd.cjs +1 -1
  63. package/lib/{index-d7f5d65b.js → index-bdeb684f.js} +17 -14
  64. package/lib/{python-31d7356c.js → python-c9833067.js} +1 -1
  65. package/package.json +1 -1
  66. package/packages/MonacoEditor/index.vue +5 -0
  67. package/src/pages/MonacoEditor/index.vue +5 -0
  68. package/es/config-provider-33068fb6.cjs +0 -1
  69. package/es/config-provider-c98bd563.js +0 -148
  70. package/es/el-button-fc645d0f.cjs +0 -1
  71. package/es/el-icon-99876220.cjs +0 -1
  72. package/es/el-overlay-dcbc4437.cjs +0 -5
  73. package/es/el-scrollbar-6800cb98.js +0 -2653
  74. package/es/el-scrollbar-9da140ab.cjs +0 -1
  75. package/es/el-select-d22b5aa3.cjs +0 -9
  76. package/es/focus-trap-9f4b1039.js +0 -880
  77. package/es/focus-trap-fae33d9d.cjs +0 -3
@@ -1 +1,2724 @@
1
-
1
+ import { b as le, d as O, u as He, _ as Gn, w as pt, a8 as kn, a4 as Ae, k as Y, C as Vn, i as Lt, z as $n, t as nt, H as Be, E as Kn, e as Ct, A as je, v as Qe, B as Bn } from "./base-6faccb01.js";
2
+ import { E as on } from "./el-empty-348c46f7.js";
3
+ import { B as jn, d as Un, u as qn } from "./el-scrollbar-83abe3de.js";
4
+ import { E as Yn } from "./el-button-1b9c4fd6.js";
5
+ import { defineComponent as re, computed as x, openBlock as Pe, createElementBlock as ut, normalizeClass as Wt, unref as r, normalizeStyle as Zn, renderSlot as Xn, createCommentVNode as ht, getCurrentInstance as Ht, ref as G, reactive as Jn, watch as Fe, onBeforeUnmount as ln, h as ve, withModifiers as Qn, onMounted as rt, nextTick as We, resolveDynamicComponent as Ft, shallowRef as Te, isVNode as Ie, toRef as Gt, createVNode as C, mergeProps as B, inject as rn, provide as eo, mergeModels as kt, useModel as to, onUnmounted as no, createBlock as ct, withCtx as ze, createTextVNode as Vt } from "vue";
6
+ import { m as an } from "./typescript-7ae59c4c.js";
7
+ import { c as sn, r as cn } from "./raf-92c5ed6d.js";
8
+ import { g as oo } from "./scroll-264c50f3.js";
9
+ import { c as lo } from "./castArray-bdee0d50.js";
10
+ import { E as dn, H as ro, I as ao, b as so } from "./use-form-item-0e9cae13.js";
11
+ import { _ as io } from "./_plugin-vue_export-helper-dad06003.js";
12
+ import "./use-global-config-8c9c775f.js";
13
+ import "./index-657047bb.js";
14
+ const co = le({
15
+ direction: {
16
+ type: String,
17
+ values: ["horizontal", "vertical"],
18
+ default: "horizontal"
19
+ },
20
+ contentPosition: {
21
+ type: String,
22
+ values: ["left", "center", "right"],
23
+ default: "center"
24
+ },
25
+ borderStyle: {
26
+ type: O(String),
27
+ default: "solid"
28
+ }
29
+ }), uo = re({
30
+ name: "ElDivider"
31
+ }), ho = /* @__PURE__ */ re({
32
+ ...uo,
33
+ props: co,
34
+ setup(e) {
35
+ const t = e, n = He("divider"), o = x(() => n.cssVar({
36
+ "border-style": t.borderStyle
37
+ }));
38
+ return (a, s) => (Pe(), ut("div", {
39
+ class: Wt([r(n).b(), r(n).m(a.direction)]),
40
+ style: Zn(r(o)),
41
+ role: "separator"
42
+ }, [
43
+ a.$slots.default && a.direction !== "vertical" ? (Pe(), ut("div", {
44
+ key: 0,
45
+ class: Wt([r(n).e("text"), r(n).is(a.contentPosition)])
46
+ }, [
47
+ Xn(a.$slots, "default")
48
+ ], 2)) : ht("v-if", !0)
49
+ ], 6));
50
+ }
51
+ });
52
+ var fo = /* @__PURE__ */ Gn(ho, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]);
53
+ const mo = pt(fo);
54
+ var $t = Number.isNaN || function(t) {
55
+ return typeof t == "number" && t !== t;
56
+ };
57
+ function vo(e, t) {
58
+ return !!(e === t || $t(e) && $t(t));
59
+ }
60
+ function go(e, t) {
61
+ if (e.length !== t.length)
62
+ return !1;
63
+ for (var n = 0; n < e.length; n++)
64
+ if (!vo(e[n], t[n]))
65
+ return !1;
66
+ return !0;
67
+ }
68
+ function yo(e, t) {
69
+ t === void 0 && (t = go);
70
+ var n = null;
71
+ function o() {
72
+ for (var a = [], s = 0; s < arguments.length; s++)
73
+ a[s] = arguments[s];
74
+ if (n && n.lastThis === this && t(a, n.lastArgs))
75
+ return n.lastResult;
76
+ var i = e.apply(this, a);
77
+ return n = {
78
+ lastResult: i,
79
+ lastArgs: a,
80
+ lastThis: this
81
+ }, i;
82
+ }
83
+ return o.clear = function() {
84
+ n = null;
85
+ }, o;
86
+ }
87
+ const wo = () => {
88
+ const t = Ht().proxy.$props;
89
+ return x(() => {
90
+ const n = (o, a, s) => ({});
91
+ return t.perfMode ? kn(n) : yo(n);
92
+ });
93
+ }, Kt = 50, Bt = "itemRendered", jt = "scroll", Ke = "forward", ft = "backward", _e = "auto", un = "smart", mt = "start", Le = "center", vt = "end", gt = "horizontal", hn = "vertical", fn = "rtl", yt = "negative", mn = "positive-ascending", vn = "positive-descending", bo = {
94
+ [gt]: "left",
95
+ [hn]: "top"
96
+ }, So = 20, wt = Ae({
97
+ type: O([Number, Function]),
98
+ required: !0
99
+ }), bt = Ae({
100
+ type: Number
101
+ }), St = Ae({
102
+ type: Number,
103
+ default: 2
104
+ }), Ro = Ae({
105
+ type: String,
106
+ values: ["ltr", "rtl"],
107
+ default: "ltr"
108
+ }), Rt = Ae({
109
+ type: Number,
110
+ default: 0
111
+ }), ot = Ae({
112
+ type: Number,
113
+ required: !0
114
+ }), gn = Ae({
115
+ type: String,
116
+ values: ["horizontal", "vertical"],
117
+ default: hn
118
+ }), yn = le({
119
+ className: {
120
+ type: String,
121
+ default: ""
122
+ },
123
+ containerElement: {
124
+ type: O([String, Object]),
125
+ default: "div"
126
+ },
127
+ data: {
128
+ type: O(Array),
129
+ default: () => an([])
130
+ },
131
+ direction: Ro,
132
+ height: {
133
+ type: [String, Number],
134
+ required: !0
135
+ },
136
+ innerElement: {
137
+ type: [String, Object],
138
+ default: "div"
139
+ },
140
+ style: {
141
+ type: O([Object, String, Array])
142
+ },
143
+ useIsScrolling: {
144
+ type: Boolean,
145
+ default: !1
146
+ },
147
+ width: {
148
+ type: [Number, String],
149
+ required: !1
150
+ },
151
+ perfMode: {
152
+ type: Boolean,
153
+ default: !0
154
+ },
155
+ scrollbarAlwaysOn: {
156
+ type: Boolean,
157
+ default: !1
158
+ }
159
+ }), xo = le({
160
+ cache: St,
161
+ estimatedItemSize: bt,
162
+ layout: gn,
163
+ initScrollOffset: Rt,
164
+ total: ot,
165
+ itemSize: wt,
166
+ ...yn
167
+ }), xt = {
168
+ type: Number,
169
+ default: 6
170
+ }, wn = { type: Number, default: 0 }, bn = { type: Number, default: 2 }, Ce = le({
171
+ columnCache: St,
172
+ columnWidth: wt,
173
+ estimatedColumnWidth: bt,
174
+ estimatedRowHeight: bt,
175
+ initScrollLeft: Rt,
176
+ initScrollTop: Rt,
177
+ itemKey: {
178
+ type: O(Function),
179
+ default: ({
180
+ columnIndex: e,
181
+ rowIndex: t
182
+ }) => `${t}:${e}`
183
+ },
184
+ rowCache: St,
185
+ rowHeight: wt,
186
+ totalColumn: ot,
187
+ totalRow: ot,
188
+ hScrollbarSize: xt,
189
+ vScrollbarSize: xt,
190
+ scrollbarStartGap: wn,
191
+ scrollbarEndGap: bn,
192
+ role: String,
193
+ ...yn
194
+ }), Sn = le({
195
+ alwaysOn: Boolean,
196
+ class: String,
197
+ layout: gn,
198
+ total: ot,
199
+ ratio: {
200
+ type: Number,
201
+ required: !0
202
+ },
203
+ clientSize: {
204
+ type: Number,
205
+ required: !0
206
+ },
207
+ scrollFrom: {
208
+ type: Number,
209
+ required: !0
210
+ },
211
+ scrollbarSize: xt,
212
+ startGap: wn,
213
+ endGap: bn,
214
+ visible: Boolean
215
+ }), Je = (e, t) => e < t ? Ke : ft, Ut = (e) => e === fn;
216
+ let De = null;
217
+ function qt(e = !1) {
218
+ if (De === null || e) {
219
+ const t = document.createElement("div"), n = t.style;
220
+ n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
221
+ const o = document.createElement("div"), a = o.style;
222
+ return a.width = "100px", a.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ? De = vn : (t.scrollLeft = 1, t.scrollLeft === 0 ? De = yt : De = mn), document.body.removeChild(t), De;
223
+ }
224
+ return De;
225
+ }
226
+ function To({ move: e, size: t, bar: n }, o) {
227
+ const a = {}, s = `translate${n.axis}(${e}px)`;
228
+ return a[n.size] = t, a.transform = s, a.msTransform = s, a.webkitTransform = s, o === "horizontal" ? a.height = "100%" : a.width = "100%", a;
229
+ }
230
+ const Yt = re({
231
+ name: "ElVirtualScrollBar",
232
+ props: Sn,
233
+ emits: ["scroll", "start-move", "stop-move"],
234
+ setup(e, { emit: t }) {
235
+ const n = x(() => e.startGap + e.endGap), o = He("virtual-scrollbar"), a = He("scrollbar"), s = G(), i = G();
236
+ let c = null, h = null;
237
+ const u = Jn({
238
+ isDragging: !1,
239
+ traveled: 0
240
+ }), d = x(() => jn[e.layout]), m = x(() => e.clientSize - r(n)), w = x(() => ({
241
+ position: "absolute",
242
+ width: `${gt === e.layout ? m.value : e.scrollbarSize}px`,
243
+ height: `${gt === e.layout ? e.scrollbarSize : m.value}px`,
244
+ [bo[e.layout]]: "2px",
245
+ right: "2px",
246
+ bottom: "2px",
247
+ borderRadius: "4px"
248
+ })), g = x(() => {
249
+ const R = e.ratio, D = e.clientSize;
250
+ if (R >= 100)
251
+ return Number.POSITIVE_INFINITY;
252
+ if (R >= 50)
253
+ return R * D / 100;
254
+ const T = D / 3;
255
+ return Math.floor(Math.min(Math.max(R * D, So), T));
256
+ }), y = x(() => {
257
+ if (!Number.isFinite(g.value))
258
+ return {
259
+ display: "none"
260
+ };
261
+ const R = `${g.value}px`;
262
+ return To({
263
+ bar: d.value,
264
+ size: R,
265
+ move: u.traveled
266
+ }, e.layout);
267
+ }), l = x(() => Math.floor(e.clientSize - g.value - r(n))), f = () => {
268
+ window.addEventListener("mousemove", E), window.addEventListener("mouseup", b);
269
+ const R = r(i);
270
+ R && (h = document.onselectstart, document.onselectstart = () => !1, R.addEventListener("touchmove", E), R.addEventListener("touchend", b));
271
+ }, v = () => {
272
+ window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", b), document.onselectstart = h, h = null;
273
+ const R = r(i);
274
+ R && (R.removeEventListener("touchmove", E), R.removeEventListener("touchend", b));
275
+ }, S = (R) => {
276
+ R.stopImmediatePropagation(), !(R.ctrlKey || [1, 2].includes(R.button)) && (u.isDragging = !0, u[d.value.axis] = R.currentTarget[d.value.offset] - (R[d.value.client] - R.currentTarget.getBoundingClientRect()[d.value.direction]), t("start-move"), f());
277
+ }, b = () => {
278
+ u.isDragging = !1, u[d.value.axis] = 0, t("stop-move"), v();
279
+ }, E = (R) => {
280
+ const { isDragging: D } = u;
281
+ if (!D || !i.value || !s.value)
282
+ return;
283
+ const T = u[d.value.axis];
284
+ if (!T)
285
+ return;
286
+ sn(c);
287
+ const I = (s.value.getBoundingClientRect()[d.value.direction] - R[d.value.client]) * -1, _ = i.value[d.value.offset] - T, L = I - _;
288
+ c = cn(() => {
289
+ u.traveled = Math.max(e.startGap, Math.min(L, l.value)), t("scroll", L, l.value);
290
+ });
291
+ }, A = (R) => {
292
+ const D = Math.abs(R.target.getBoundingClientRect()[d.value.direction] - R[d.value.client]), T = i.value[d.value.offset] / 2, I = D - T;
293
+ u.traveled = Math.max(0, Math.min(I, l.value)), t("scroll", I, l.value);
294
+ };
295
+ return Fe(() => e.scrollFrom, (R) => {
296
+ u.isDragging || (u.traveled = Math.ceil(R * l.value));
297
+ }), ln(() => {
298
+ v();
299
+ }), () => ve("div", {
300
+ role: "presentation",
301
+ ref: s,
302
+ class: [
303
+ o.b(),
304
+ e.class,
305
+ (e.alwaysOn || u.isDragging) && "always-on"
306
+ ],
307
+ style: w.value,
308
+ onMousedown: Qn(A, ["stop", "prevent"]),
309
+ onTouchstartPrevent: S
310
+ }, ve("div", {
311
+ ref: i,
312
+ class: a.e("thumb"),
313
+ style: y.value,
314
+ onMousedown: S
315
+ }, []));
316
+ }
317
+ }), Eo = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: n, atYStartEdge: o }, a) => {
318
+ let s = null, i = 0, c = 0;
319
+ const h = (d, m) => {
320
+ const w = d <= 0 && t.value || d >= 0 && e.value, g = m <= 0 && o.value || m >= 0 && n.value;
321
+ return w && g;
322
+ };
323
+ return {
324
+ hasReachedEdge: h,
325
+ onWheel: (d) => {
326
+ sn(s);
327
+ let m = d.deltaX, w = d.deltaY;
328
+ Math.abs(m) > Math.abs(w) ? w = 0 : m = 0, d.shiftKey && w !== 0 && (m = w, w = 0), !(h(i, c) && h(i + m, c + w)) && (i += m, c += w, d.preventDefault(), s = cn(() => {
329
+ a(i, c), i = 0, c = 0;
330
+ }));
331
+ }
332
+ };
333
+ }, Rn = ({
334
+ name: e,
335
+ clearCache: t,
336
+ getColumnPosition: n,
337
+ getColumnStartIndexForOffset: o,
338
+ getColumnStopIndexForStartIndex: a,
339
+ getEstimatedTotalHeight: s,
340
+ getEstimatedTotalWidth: i,
341
+ getColumnOffset: c,
342
+ getRowOffset: h,
343
+ getRowPosition: u,
344
+ getRowStartIndexForOffset: d,
345
+ getRowStopIndexForStartIndex: m,
346
+ initCache: w,
347
+ injectToInstance: g,
348
+ validateProps: y
349
+ }) => re({
350
+ name: e ?? "ElVirtualList",
351
+ props: Ce,
352
+ emits: [Bt, jt],
353
+ setup(l, { emit: f, expose: v, slots: S }) {
354
+ const b = He("vl");
355
+ y(l);
356
+ const E = Ht(), A = G(w(l, E));
357
+ g == null || g(E, A);
358
+ const R = G(), D = G(), T = G(), I = G(null), _ = G({
359
+ isScrolling: !1,
360
+ scrollLeft: Y(l.initScrollLeft) ? l.initScrollLeft : 0,
361
+ scrollTop: Y(l.initScrollTop) ? l.initScrollTop : 0,
362
+ updateRequested: !1,
363
+ xAxisScrollDir: Ke,
364
+ yAxisScrollDir: Ke
365
+ }), L = wo(), $ = x(() => Number.parseInt(`${l.height}`, 10)), K = x(() => Number.parseInt(`${l.width}`, 10)), V = x(() => {
366
+ const { totalColumn: p, totalRow: H, columnCache: M } = l, { isScrolling: P, xAxisScrollDir: N, scrollLeft: z } = r(_);
367
+ if (p === 0 || H === 0)
368
+ return [0, 0, 0, 0];
369
+ const W = o(l, z, r(A)), F = a(l, W, z, r(A)), k = !P || N === ft ? Math.max(1, M) : 1, X = !P || N === Ke ? Math.max(1, M) : 1;
370
+ return [
371
+ Math.max(0, W - k),
372
+ Math.max(0, Math.min(p - 1, F + X)),
373
+ W,
374
+ F
375
+ ];
376
+ }), j = x(() => {
377
+ const { totalColumn: p, totalRow: H, rowCache: M } = l, { isScrolling: P, yAxisScrollDir: N, scrollTop: z } = r(_);
378
+ if (p === 0 || H === 0)
379
+ return [0, 0, 0, 0];
380
+ const W = d(l, z, r(A)), F = m(l, W, z, r(A)), k = !P || N === ft ? Math.max(1, M) : 1, X = !P || N === Ke ? Math.max(1, M) : 1;
381
+ return [
382
+ Math.max(0, W - k),
383
+ Math.max(0, Math.min(H - 1, F + X)),
384
+ W,
385
+ F
386
+ ];
387
+ }), Z = x(() => s(l, r(A))), U = x(() => i(l, r(A))), de = x(() => {
388
+ var p;
389
+ return [
390
+ {
391
+ position: "relative",
392
+ overflow: "hidden",
393
+ WebkitOverflowScrolling: "touch",
394
+ willChange: "transform"
395
+ },
396
+ {
397
+ direction: l.direction,
398
+ height: Y(l.height) ? `${l.height}px` : l.height,
399
+ width: Y(l.width) ? `${l.width}px` : l.width
400
+ },
401
+ (p = l.style) != null ? p : {}
402
+ ];
403
+ }), ye = x(() => {
404
+ const p = `${r(U)}px`;
405
+ return {
406
+ height: `${r(Z)}px`,
407
+ pointerEvents: r(_).isScrolling ? "none" : void 0,
408
+ width: p
409
+ };
410
+ }), ne = () => {
411
+ const { totalColumn: p, totalRow: H } = l;
412
+ if (p > 0 && H > 0) {
413
+ const [
414
+ F,
415
+ k,
416
+ X,
417
+ te
418
+ ] = r(V), [ee, q, Xe, at] = r(j);
419
+ f(Bt, {
420
+ columnCacheStart: F,
421
+ columnCacheEnd: k,
422
+ rowCacheStart: ee,
423
+ rowCacheEnd: q,
424
+ columnVisibleStart: X,
425
+ columnVisibleEnd: te,
426
+ rowVisibleStart: Xe,
427
+ rowVisibleEnd: at
428
+ });
429
+ }
430
+ const {
431
+ scrollLeft: M,
432
+ scrollTop: P,
433
+ updateRequested: N,
434
+ xAxisScrollDir: z,
435
+ yAxisScrollDir: W
436
+ } = r(_);
437
+ f(jt, {
438
+ xAxisScrollDir: z,
439
+ scrollLeft: M,
440
+ yAxisScrollDir: W,
441
+ scrollTop: P,
442
+ updateRequested: N
443
+ });
444
+ }, we = (p) => {
445
+ const {
446
+ clientHeight: H,
447
+ clientWidth: M,
448
+ scrollHeight: P,
449
+ scrollLeft: N,
450
+ scrollTop: z,
451
+ scrollWidth: W
452
+ } = p.currentTarget, F = r(_);
453
+ if (F.scrollTop === z && F.scrollLeft === N)
454
+ return;
455
+ let k = N;
456
+ if (Ut(l.direction))
457
+ switch (qt()) {
458
+ case yt:
459
+ k = -N;
460
+ break;
461
+ case vn:
462
+ k = W - M - N;
463
+ break;
464
+ }
465
+ _.value = {
466
+ ...F,
467
+ isScrolling: !0,
468
+ scrollLeft: k,
469
+ scrollTop: Math.max(0, Math.min(z, P - H)),
470
+ updateRequested: !0,
471
+ xAxisScrollDir: Je(F.scrollLeft, k),
472
+ yAxisScrollDir: Je(F.scrollTop, z)
473
+ }, We(() => Se()), Oe(), ne();
474
+ }, be = (p, H) => {
475
+ const M = r($), P = (Z.value - M) / H * p;
476
+ J({
477
+ scrollTop: Math.min(Z.value - M, P)
478
+ });
479
+ }, ue = (p, H) => {
480
+ const M = r(K), P = (U.value - M) / H * p;
481
+ J({
482
+ scrollLeft: Math.min(U.value - M, P)
483
+ });
484
+ }, { onWheel: ae } = Eo({
485
+ atXStartEdge: x(() => _.value.scrollLeft <= 0),
486
+ atXEndEdge: x(() => _.value.scrollLeft >= U.value - r(K)),
487
+ atYStartEdge: x(() => _.value.scrollTop <= 0),
488
+ atYEndEdge: x(() => _.value.scrollTop >= Z.value - r($))
489
+ }, (p, H) => {
490
+ var M, P, N, z;
491
+ (P = (M = D.value) == null ? void 0 : M.onMouseUp) == null || P.call(M), (z = (N = T.value) == null ? void 0 : N.onMouseUp) == null || z.call(N);
492
+ const W = r(K), F = r($);
493
+ J({
494
+ scrollLeft: Math.min(_.value.scrollLeft + p, U.value - W),
495
+ scrollTop: Math.min(_.value.scrollTop + H, Z.value - F)
496
+ });
497
+ }), J = ({
498
+ scrollLeft: p = _.value.scrollLeft,
499
+ scrollTop: H = _.value.scrollTop
500
+ }) => {
501
+ p = Math.max(p, 0), H = Math.max(H, 0);
502
+ const M = r(_);
503
+ H === M.scrollTop && p === M.scrollLeft || (_.value = {
504
+ ...M,
505
+ xAxisScrollDir: Je(M.scrollLeft, p),
506
+ yAxisScrollDir: Je(M.scrollTop, H),
507
+ scrollLeft: p,
508
+ scrollTop: H,
509
+ updateRequested: !0
510
+ }, We(() => Se()), Oe(), ne());
511
+ }, Ge = (p = 0, H = 0, M = _e) => {
512
+ const P = r(_);
513
+ H = Math.max(0, Math.min(H, l.totalColumn - 1)), p = Math.max(0, Math.min(p, l.totalRow - 1));
514
+ const N = oo(b.namespace.value), z = r(A), W = s(l, z), F = i(l, z);
515
+ J({
516
+ scrollLeft: c(l, H, M, P.scrollLeft, z, F > l.width ? N : 0),
517
+ scrollTop: h(l, p, M, P.scrollTop, z, W > l.height ? N : 0)
518
+ });
519
+ }, he = (p, H) => {
520
+ const { columnWidth: M, direction: P, rowHeight: N } = l, z = L.value(t && M, t && N, t && P), W = `${p},${H}`;
521
+ if ($n(z, W))
522
+ return z[W];
523
+ {
524
+ const [, F] = n(l, H, r(A)), k = r(A), X = Ut(P), [te, ee] = u(l, p, k), [q] = n(l, H, k);
525
+ return z[W] = {
526
+ position: "absolute",
527
+ left: X ? void 0 : `${F}px`,
528
+ right: X ? `${F}px` : void 0,
529
+ top: `${ee}px`,
530
+ height: `${te}px`,
531
+ width: `${q}px`
532
+ }, z[W];
533
+ }
534
+ }, Se = () => {
535
+ _.value.isScrolling = !1, We(() => {
536
+ L.value(-1, null, null);
537
+ });
538
+ };
539
+ rt(() => {
540
+ if (!Vn)
541
+ return;
542
+ const { initScrollLeft: p, initScrollTop: H } = l, M = r(R);
543
+ M && (Y(p) && (M.scrollLeft = p), Y(H) && (M.scrollTop = H)), ne();
544
+ });
545
+ const Oe = () => {
546
+ const { direction: p } = l, { scrollLeft: H, scrollTop: M, updateRequested: P } = r(_), N = r(R);
547
+ if (P && N) {
548
+ if (p === fn)
549
+ switch (qt()) {
550
+ case yt: {
551
+ N.scrollLeft = -H;
552
+ break;
553
+ }
554
+ case mn: {
555
+ N.scrollLeft = H;
556
+ break;
557
+ }
558
+ default: {
559
+ const { clientWidth: z, scrollWidth: W } = N;
560
+ N.scrollLeft = W - z - H;
561
+ break;
562
+ }
563
+ }
564
+ else
565
+ N.scrollLeft = Math.max(0, H);
566
+ N.scrollTop = Math.max(0, M);
567
+ }
568
+ }, { resetAfterColumnIndex: Re, resetAfterRowIndex: ke, resetAfter: Ve } = E.proxy;
569
+ v({
570
+ windowRef: R,
571
+ innerRef: I,
572
+ getItemStyleCache: L,
573
+ scrollTo: J,
574
+ scrollToItem: Ge,
575
+ states: _,
576
+ resetAfterColumnIndex: Re,
577
+ resetAfterRowIndex: ke,
578
+ resetAfter: Ve
579
+ });
580
+ const Q = () => {
581
+ const {
582
+ scrollbarAlwaysOn: p,
583
+ scrollbarStartGap: H,
584
+ scrollbarEndGap: M,
585
+ totalColumn: P,
586
+ totalRow: N
587
+ } = l, z = r(K), W = r($), F = r(U), k = r(Z), { scrollLeft: X, scrollTop: te } = r(_), ee = ve(Yt, {
588
+ ref: D,
589
+ alwaysOn: p,
590
+ startGap: H,
591
+ endGap: M,
592
+ class: b.e("horizontal"),
593
+ clientSize: z,
594
+ layout: "horizontal",
595
+ onScroll: ue,
596
+ ratio: z * 100 / F,
597
+ scrollFrom: X / (F - z),
598
+ total: N,
599
+ visible: !0
600
+ }), q = ve(Yt, {
601
+ ref: T,
602
+ alwaysOn: p,
603
+ startGap: H,
604
+ endGap: M,
605
+ class: b.e("vertical"),
606
+ clientSize: W,
607
+ layout: "vertical",
608
+ onScroll: be,
609
+ ratio: W * 100 / k,
610
+ scrollFrom: te / (k - W),
611
+ total: P,
612
+ visible: !0
613
+ });
614
+ return {
615
+ horizontalScrollbar: ee,
616
+ verticalScrollbar: q
617
+ };
618
+ }, se = () => {
619
+ var p;
620
+ const [H, M] = r(V), [P, N] = r(j), { data: z, totalColumn: W, totalRow: F, useIsScrolling: k, itemKey: X } = l, te = [];
621
+ if (F > 0 && W > 0)
622
+ for (let ee = P; ee <= N; ee++)
623
+ for (let q = H; q <= M; q++)
624
+ te.push((p = S.default) == null ? void 0 : p.call(S, {
625
+ columnIndex: q,
626
+ data: z,
627
+ key: X({ columnIndex: q, data: z, rowIndex: ee }),
628
+ isScrolling: k ? r(_).isScrolling : void 0,
629
+ style: he(ee, q),
630
+ rowIndex: ee
631
+ }));
632
+ return te;
633
+ }, fe = () => {
634
+ const p = Ft(l.innerElement), H = se();
635
+ return [
636
+ ve(p, {
637
+ style: r(ye),
638
+ ref: I
639
+ }, Lt(p) ? H : {
640
+ default: () => H
641
+ })
642
+ ];
643
+ };
644
+ return () => {
645
+ const p = Ft(l.containerElement), { horizontalScrollbar: H, verticalScrollbar: M } = Q(), P = fe();
646
+ return ve("div", {
647
+ key: 0,
648
+ class: b.e("wrapper"),
649
+ role: l.role
650
+ }, [
651
+ ve(p, {
652
+ class: l.className,
653
+ style: r(de),
654
+ onScroll: we,
655
+ onWheel: ae,
656
+ ref: R
657
+ }, Lt(p) ? P : { default: () => P }),
658
+ H,
659
+ M
660
+ ]);
661
+ };
662
+ }
663
+ }), Zt = "ElFixedSizeGrid", _o = Rn({
664
+ name: "ElFixedSizeGrid",
665
+ getColumnPosition: ({ columnWidth: e }, t) => [
666
+ e,
667
+ t * e
668
+ ],
669
+ getRowPosition: ({ rowHeight: e }, t) => [
670
+ e,
671
+ t * e
672
+ ],
673
+ getEstimatedTotalHeight: ({ totalRow: e, rowHeight: t }) => t * e,
674
+ getEstimatedTotalWidth: ({ totalColumn: e, columnWidth: t }) => t * e,
675
+ getColumnOffset: ({ totalColumn: e, columnWidth: t, width: n }, o, a, s, i, c) => {
676
+ n = Number(n);
677
+ const h = Math.max(0, e * t - n), u = Math.min(h, o * t), d = Math.max(0, o * t - n + c + t);
678
+ switch (a === "smart" && (s >= d - n && s <= u + n ? a = _e : a = Le), a) {
679
+ case mt:
680
+ return u;
681
+ case vt:
682
+ return d;
683
+ case Le: {
684
+ const m = Math.round(d + (u - d) / 2);
685
+ return m < Math.ceil(n / 2) ? 0 : m > h + Math.floor(n / 2) ? h : m;
686
+ }
687
+ case _e:
688
+ default:
689
+ return s >= d && s <= u ? s : d > u || s < d ? d : u;
690
+ }
691
+ },
692
+ getRowOffset: ({ rowHeight: e, height: t, totalRow: n }, o, a, s, i, c) => {
693
+ t = Number(t);
694
+ const h = Math.max(0, n * e - t), u = Math.min(h, o * e), d = Math.max(0, o * e - t + c + e);
695
+ switch (a === un && (s >= d - t && s <= u + t ? a = _e : a = Le), a) {
696
+ case mt:
697
+ return u;
698
+ case vt:
699
+ return d;
700
+ case Le: {
701
+ const m = Math.round(d + (u - d) / 2);
702
+ return m < Math.ceil(t / 2) ? 0 : m > h + Math.floor(t / 2) ? h : m;
703
+ }
704
+ case _e:
705
+ default:
706
+ return s >= d && s <= u ? s : d > u || s < d ? d : u;
707
+ }
708
+ },
709
+ getColumnStartIndexForOffset: ({ columnWidth: e, totalColumn: t }, n) => Math.max(0, Math.min(t - 1, Math.floor(n / e))),
710
+ getColumnStopIndexForStartIndex: ({ columnWidth: e, totalColumn: t, width: n }, o, a) => {
711
+ const s = o * e, i = Math.ceil((n + a - s) / e);
712
+ return Math.max(0, Math.min(t - 1, o + i - 1));
713
+ },
714
+ getRowStartIndexForOffset: ({ rowHeight: e, totalRow: t }, n) => Math.max(0, Math.min(t - 1, Math.floor(n / e))),
715
+ getRowStopIndexForStartIndex: ({ rowHeight: e, totalRow: t, height: n }, o, a) => {
716
+ const s = o * e, i = Math.ceil((n + a - s) / e);
717
+ return Math.max(0, Math.min(t - 1, o + i - 1));
718
+ },
719
+ initCache: () => {
720
+ },
721
+ clearCache: !0,
722
+ validateProps: ({ columnWidth: e, rowHeight: t }) => {
723
+ process.env.NODE_ENV !== "production" && (Y(e) || nt(Zt, `
724
+ "columnWidth" must be passed as number,
725
+ instead ${typeof e} was given.
726
+ `), Y(t) || nt(Zt, `
727
+ "columnWidth" must be passed as number,
728
+ instead ${typeof t} was given.
729
+ `));
730
+ }
731
+ }), { max: lt, min: xn, floor: Tn } = Math, Xt = "ElDynamicSizeGrid", po = {
732
+ column: "columnWidth",
733
+ row: "rowHeight"
734
+ }, Tt = {
735
+ column: "lastVisitedColumnIndex",
736
+ row: "lastVisitedRowIndex"
737
+ }, ce = (e, t, n, o) => {
738
+ const [a, s, i] = [
739
+ n[o],
740
+ e[po[o]],
741
+ n[Tt[o]]
742
+ ];
743
+ if (t > i) {
744
+ let c = 0;
745
+ if (i >= 0) {
746
+ const h = a[i];
747
+ c = h.offset + h.size;
748
+ }
749
+ for (let h = i + 1; h <= t; h++) {
750
+ const u = s(h);
751
+ a[h] = {
752
+ offset: c,
753
+ size: u
754
+ }, c += u;
755
+ }
756
+ n[Tt[o]] = t;
757
+ }
758
+ return a[t];
759
+ }, En = (e, t, n, o, a, s) => {
760
+ for (; n <= o; ) {
761
+ const i = n + Tn((o - n) / 2), c = ce(e, i, t, s).offset;
762
+ if (c === a)
763
+ return i;
764
+ c < a ? n = i + 1 : o = i - 1;
765
+ }
766
+ return lt(0, n - 1);
767
+ }, Co = (e, t, n, o, a) => {
768
+ const s = a === "column" ? e.totalColumn : e.totalRow;
769
+ let i = 1;
770
+ for (; n < s && ce(e, n, t, a).offset < o; )
771
+ n += i, i *= 2;
772
+ return En(e, t, Tn(n / 2), xn(n, s - 1), o, a);
773
+ }, Jt = (e, t, n, o) => {
774
+ const [a, s] = [
775
+ t[o],
776
+ t[Tt[o]]
777
+ ];
778
+ return (s > 0 ? a[s].offset : 0) >= n ? En(e, t, 0, s, n, o) : Co(e, t, lt(0, s), n, o);
779
+ }, _n = ({ totalRow: e }, { estimatedRowHeight: t, lastVisitedRowIndex: n, row: o }) => {
780
+ let a = 0;
781
+ if (n >= e && (n = e - 1), n >= 0) {
782
+ const c = o[n];
783
+ a = c.offset + c.size;
784
+ }
785
+ const i = (e - n - 1) * t;
786
+ return a + i;
787
+ }, pn = ({ totalColumn: e }, { column: t, estimatedColumnWidth: n, lastVisitedColumnIndex: o }) => {
788
+ let a = 0;
789
+ if (o > e && (o = e - 1), o >= 0) {
790
+ const c = t[o];
791
+ a = c.offset + c.size;
792
+ }
793
+ const i = (e - o - 1) * n;
794
+ return a + i;
795
+ }, Ho = {
796
+ column: pn,
797
+ row: _n
798
+ }, Qt = (e, t, n, o, a, s, i) => {
799
+ const [c, h] = [
800
+ s === "row" ? e.height : e.width,
801
+ Ho[s]
802
+ ], u = ce(e, t, a, s), d = h(e, a), m = lt(0, xn(d - c, u.offset)), w = lt(0, u.offset - c + i + u.size);
803
+ switch (n === un && (o >= w - c && o <= m + c ? n = _e : n = Le), n) {
804
+ case mt:
805
+ return m;
806
+ case vt:
807
+ return w;
808
+ case Le:
809
+ return Math.round(w + (m - w) / 2);
810
+ case _e:
811
+ default:
812
+ return o >= w && o <= m ? o : w > m || o < w ? w : m;
813
+ }
814
+ }, Mo = Rn({
815
+ name: "ElDynamicSizeGrid",
816
+ getColumnPosition: (e, t, n) => {
817
+ const o = ce(e, t, n, "column");
818
+ return [o.size, o.offset];
819
+ },
820
+ getRowPosition: (e, t, n) => {
821
+ const o = ce(e, t, n, "row");
822
+ return [o.size, o.offset];
823
+ },
824
+ getColumnOffset: (e, t, n, o, a, s) => Qt(e, t, n, o, a, "column", s),
825
+ getRowOffset: (e, t, n, o, a, s) => Qt(e, t, n, o, a, "row", s),
826
+ getColumnStartIndexForOffset: (e, t, n) => Jt(e, n, t, "column"),
827
+ getColumnStopIndexForStartIndex: (e, t, n, o) => {
828
+ const a = ce(e, t, o, "column"), s = n + e.width;
829
+ let i = a.offset + a.size, c = t;
830
+ for (; c < e.totalColumn - 1 && i < s; )
831
+ c++, i += ce(e, t, o, "column").size;
832
+ return c;
833
+ },
834
+ getEstimatedTotalHeight: _n,
835
+ getEstimatedTotalWidth: pn,
836
+ getRowStartIndexForOffset: (e, t, n) => Jt(e, n, t, "row"),
837
+ getRowStopIndexForStartIndex: (e, t, n, o) => {
838
+ const { totalRow: a, height: s } = e, i = ce(e, t, o, "row"), c = n + s;
839
+ let h = i.size + i.offset, u = t;
840
+ for (; u < a - 1 && h < c; )
841
+ u++, h += ce(e, u, o, "row").size;
842
+ return u;
843
+ },
844
+ injectToInstance: (e, t) => {
845
+ const n = ({ columnIndex: s, rowIndex: i }, c) => {
846
+ var h, u;
847
+ c = Kn(c) ? !0 : c, Y(s) && (t.value.lastVisitedColumnIndex = Math.min(t.value.lastVisitedColumnIndex, s - 1)), Y(i) && (t.value.lastVisitedRowIndex = Math.min(t.value.lastVisitedRowIndex, i - 1)), (h = e.exposed) == null || h.getItemStyleCache.value(-1, null, null), c && ((u = e.proxy) == null || u.$forceUpdate());
848
+ }, o = (s, i) => {
849
+ n({
850
+ columnIndex: s
851
+ }, i);
852
+ }, a = (s, i) => {
853
+ n({
854
+ rowIndex: s
855
+ }, i);
856
+ };
857
+ Object.assign(e.proxy, {
858
+ resetAfterColumnIndex: o,
859
+ resetAfterRowIndex: a,
860
+ resetAfter: n
861
+ });
862
+ },
863
+ initCache: ({
864
+ estimatedColumnWidth: e = Kt,
865
+ estimatedRowHeight: t = Kt
866
+ }) => ({
867
+ column: {},
868
+ estimatedColumnWidth: e,
869
+ estimatedRowHeight: t,
870
+ lastVisitedColumnIndex: -1,
871
+ lastVisitedRowIndex: -1,
872
+ row: {}
873
+ }),
874
+ clearCache: !1,
875
+ validateProps: ({ columnWidth: e, rowHeight: t }) => {
876
+ process.env.NODE_ENV !== "production" && (Be(e) || nt(Xt, `
877
+ "columnWidth" must be passed as function,
878
+ instead ${typeof e} was given.
879
+ `), Be(t) || nt(Xt, `
880
+ "rowHeight" must be passed as function,
881
+ instead ${typeof t} was given.
882
+ `));
883
+ }
884
+ });
885
+ var Ue = /* @__PURE__ */ ((e) => (e.ASC = "asc", e.DESC = "desc", e))(Ue || {}), qe = /* @__PURE__ */ ((e) => (e.CENTER = "center", e.RIGHT = "right", e))(qe || {}), Cn = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e))(Cn || {});
886
+ const Et = {
887
+ asc: "desc",
888
+ desc: "asc"
889
+ /* ASC */
890
+ }, Ye = Symbol("placeholder"), Ao = (e, t, n) => {
891
+ var o;
892
+ const a = {
893
+ flexGrow: 0,
894
+ flexShrink: 0,
895
+ ...n ? {} : {
896
+ flexGrow: e.flexGrow || 0,
897
+ flexShrink: e.flexShrink || 1
898
+ }
899
+ };
900
+ n || (a.flexShrink = 1);
901
+ const s = {
902
+ ...(o = e.style) != null ? o : {},
903
+ ...a,
904
+ flexBasis: "auto",
905
+ width: e.width
906
+ };
907
+ return t || (e.maxWidth && (s.maxWidth = e.maxWidth), e.minWidth && (s.minWidth = e.minWidth)), s;
908
+ };
909
+ function Io(e, t, n) {
910
+ const o = x(() => r(t).filter((l) => !l.hidden)), a = x(() => r(o).filter((l) => l.fixed === "left" || l.fixed === !0)), s = x(() => r(o).filter((l) => l.fixed === "right")), i = x(() => r(o).filter((l) => !l.fixed)), c = x(() => {
911
+ const l = [];
912
+ return r(a).forEach((f) => {
913
+ l.push({
914
+ ...f,
915
+ placeholderSign: Ye
916
+ });
917
+ }), r(i).forEach((f) => {
918
+ l.push(f);
919
+ }), r(s).forEach((f) => {
920
+ l.push({
921
+ ...f,
922
+ placeholderSign: Ye
923
+ });
924
+ }), l;
925
+ }), h = x(() => r(a).length || r(s).length), u = x(() => r(t).reduce((f, v) => (f[v.key] = Ao(v, r(n), e.fixed), f), {})), d = x(() => r(o).reduce((l, f) => l + f.width, 0)), m = (l) => r(t).find((f) => f.key === l), w = (l) => r(u)[l], g = (l, f) => {
926
+ l.width = f;
927
+ };
928
+ function y(l) {
929
+ var f;
930
+ const { key: v } = l.currentTarget.dataset;
931
+ if (!v)
932
+ return;
933
+ const { sortState: S, sortBy: b } = e;
934
+ let E = Ue.ASC;
935
+ Ct(S) ? E = Et[S[v]] : E = Et[b.order], (f = e.onColumnSort) == null || f.call(e, { column: m(v), key: v, order: E });
936
+ }
937
+ return {
938
+ columns: t,
939
+ columnsStyles: u,
940
+ columnsTotalWidth: d,
941
+ fixedColumnsOnLeft: a,
942
+ fixedColumnsOnRight: s,
943
+ hasFixedColumns: h,
944
+ mainColumns: c,
945
+ normalColumns: i,
946
+ visibleColumns: o,
947
+ getColumn: m,
948
+ getColumnStyle: w,
949
+ updateColumnWidth: g,
950
+ onColumnSorted: y
951
+ };
952
+ }
953
+ const Oo = (e, {
954
+ mainTableRef: t,
955
+ leftTableRef: n,
956
+ rightTableRef: o,
957
+ onMaybeEndReached: a
958
+ }) => {
959
+ const s = G({ scrollLeft: 0, scrollTop: 0 });
960
+ function i(g) {
961
+ var y, l, f;
962
+ const { scrollTop: v } = g;
963
+ (y = t.value) == null || y.scrollTo(g), (l = n.value) == null || l.scrollToTop(v), (f = o.value) == null || f.scrollToTop(v);
964
+ }
965
+ function c(g) {
966
+ s.value = g, i(g);
967
+ }
968
+ function h(g) {
969
+ s.value.scrollTop = g, i(r(s));
970
+ }
971
+ function u(g) {
972
+ var y, l;
973
+ s.value.scrollLeft = g, (l = (y = t.value) == null ? void 0 : y.scrollTo) == null || l.call(y, r(s));
974
+ }
975
+ function d(g) {
976
+ var y;
977
+ c(g), (y = e.onScroll) == null || y.call(e, g);
978
+ }
979
+ function m({ scrollTop: g }) {
980
+ const { scrollTop: y } = r(s);
981
+ g !== y && h(g);
982
+ }
983
+ function w(g, y = "auto") {
984
+ var l;
985
+ (l = t.value) == null || l.scrollToRow(g, y);
986
+ }
987
+ return Fe(() => r(s).scrollTop, (g, y) => {
988
+ g > y && a();
989
+ }), {
990
+ scrollPos: s,
991
+ scrollTo: c,
992
+ scrollToLeft: u,
993
+ scrollToTop: h,
994
+ scrollToRow: w,
995
+ onScroll: d,
996
+ onVerticalScroll: m
997
+ };
998
+ }, No = (e, { mainTableRef: t, leftTableRef: n, rightTableRef: o }) => {
999
+ const a = Ht(), { emit: s } = a, i = Te(!1), c = Te(null), h = G(e.defaultExpandedRowKeys || []), u = G(-1), d = Te(null), m = G({}), w = G({}), g = Te({}), y = Te({}), l = Te({}), f = x(() => Y(e.estimatedRowHeight));
1000
+ function v(T) {
1001
+ var I;
1002
+ (I = e.onRowsRendered) == null || I.call(e, T), T.rowCacheEnd > r(u) && (u.value = T.rowCacheEnd);
1003
+ }
1004
+ function S({ hovered: T, rowKey: I }) {
1005
+ c.value = T ? I : null;
1006
+ }
1007
+ function b({
1008
+ expanded: T,
1009
+ rowData: I,
1010
+ rowIndex: _,
1011
+ rowKey: L
1012
+ }) {
1013
+ var $, K;
1014
+ const V = [...r(h)], j = V.indexOf(L);
1015
+ T ? j === -1 && V.push(L) : j > -1 && V.splice(j, 1), h.value = V, s("update:expandedRowKeys", V), ($ = e.onRowExpand) == null || $.call(e, {
1016
+ expanded: T,
1017
+ rowData: I,
1018
+ rowIndex: _,
1019
+ rowKey: L
1020
+ }), (K = e.onExpandedRowsChange) == null || K.call(e, V);
1021
+ }
1022
+ const E = Un(() => {
1023
+ var T, I, _, L;
1024
+ i.value = !0, m.value = { ...r(m), ...r(w) }, A(r(d), !1), w.value = {}, d.value = null, (T = t.value) == null || T.forceUpdate(), (I = n.value) == null || I.forceUpdate(), (_ = o.value) == null || _.forceUpdate(), (L = a.proxy) == null || L.$forceUpdate(), i.value = !1;
1025
+ }, 0);
1026
+ function A(T, I = !1) {
1027
+ r(f) && [t, n, o].forEach((_) => {
1028
+ const L = r(_);
1029
+ L && L.resetAfterRowIndex(T, I);
1030
+ });
1031
+ }
1032
+ function R(T, I, _) {
1033
+ const L = r(d);
1034
+ (L === null || L > _) && (d.value = _), w.value[T] = I;
1035
+ }
1036
+ function D({ rowKey: T, height: I, rowIndex: _ }, L) {
1037
+ L ? L === Cn.RIGHT ? l.value[T] = I : g.value[T] = I : y.value[T] = I;
1038
+ const $ = Math.max(...[g, l, y].map((K) => K.value[T] || 0));
1039
+ r(m)[T] !== $ && (R(T, $, _), E());
1040
+ }
1041
+ return {
1042
+ hoveringRowKey: c,
1043
+ expandedRowKeys: h,
1044
+ lastRenderedRowIndex: u,
1045
+ isDynamic: f,
1046
+ isResetting: i,
1047
+ rowHeights: m,
1048
+ resetAfterIndex: A,
1049
+ onRowExpanded: b,
1050
+ onRowHovered: S,
1051
+ onRowsRendered: v,
1052
+ onRowHeightChange: D
1053
+ };
1054
+ }, zo = (e, { expandedRowKeys: t, lastRenderedRowIndex: n, resetAfterIndex: o }) => {
1055
+ const a = G({}), s = x(() => {
1056
+ const c = {}, { data: h, rowKey: u } = e, d = r(t);
1057
+ if (!d || !d.length)
1058
+ return h;
1059
+ const m = [], w = /* @__PURE__ */ new Set();
1060
+ d.forEach((y) => w.add(y));
1061
+ let g = h.slice();
1062
+ for (g.forEach((y) => c[y[u]] = 0); g.length > 0; ) {
1063
+ const y = g.shift();
1064
+ m.push(y), w.has(y[u]) && Array.isArray(y.children) && y.children.length > 0 && (g = [...y.children, ...g], y.children.forEach((l) => c[l[u]] = c[y[u]] + 1));
1065
+ }
1066
+ return a.value = c, m;
1067
+ }), i = x(() => {
1068
+ const { data: c, expandColumnKey: h } = e;
1069
+ return h ? r(s) : c;
1070
+ });
1071
+ return Fe(i, (c, h) => {
1072
+ c !== h && (n.value = -1, o(0, !0));
1073
+ }), {
1074
+ data: i,
1075
+ depthMap: a
1076
+ };
1077
+ }, Do = (e, t) => e + t, et = (e) => je(e) ? e.reduce(Do, 0) : e, Me = (e, t, n = {}) => Be(e) ? e(t) : e ?? n, ge = (e) => (["width", "maxWidth", "minWidth", "height"].forEach((t) => {
1078
+ e[t] = Qe(e[t]);
1079
+ }), e), Hn = (e) => Ie(e) ? (t) => ve(e, t) : e, Po = (e, {
1080
+ columnsTotalWidth: t,
1081
+ data: n,
1082
+ fixedColumnsOnLeft: o,
1083
+ fixedColumnsOnRight: a
1084
+ }) => {
1085
+ const s = x(() => {
1086
+ const { fixed: b, width: E, vScrollbarSize: A } = e, R = E - A;
1087
+ return b ? Math.max(Math.round(r(t)), R) : R;
1088
+ }), i = x(() => r(s) + (e.fixed ? e.vScrollbarSize : 0)), c = x(() => {
1089
+ const { height: b = 0, maxHeight: E = 0, footerHeight: A, hScrollbarSize: R } = e;
1090
+ if (E > 0) {
1091
+ const D = r(y), T = r(h), _ = r(g) + D + T + R;
1092
+ return Math.min(_, E - A);
1093
+ }
1094
+ return b - A;
1095
+ }), h = x(() => {
1096
+ const { rowHeight: b, estimatedRowHeight: E } = e, A = r(n);
1097
+ return Y(E) ? A.length * E : A.length * b;
1098
+ }), u = x(() => {
1099
+ const { maxHeight: b } = e, E = r(c);
1100
+ if (Y(b) && b > 0)
1101
+ return E;
1102
+ const A = r(h) + r(g) + r(y);
1103
+ return Math.min(E, A);
1104
+ }), d = (b) => b.width, m = x(() => et(r(o).map(d))), w = x(() => et(r(a).map(d))), g = x(() => et(e.headerHeight)), y = x(() => {
1105
+ var b;
1106
+ return (((b = e.fixedData) == null ? void 0 : b.length) || 0) * e.rowHeight;
1107
+ }), l = x(() => r(c) - r(g) - r(y)), f = x(() => {
1108
+ const { style: b = {}, height: E, width: A } = e;
1109
+ return ge({
1110
+ ...b,
1111
+ height: E,
1112
+ width: A
1113
+ });
1114
+ }), v = x(() => ge({ height: e.footerHeight })), S = x(() => ({
1115
+ top: Qe(r(g)),
1116
+ bottom: Qe(e.footerHeight),
1117
+ width: Qe(e.width)
1118
+ }));
1119
+ return {
1120
+ bodyWidth: s,
1121
+ fixedTableHeight: u,
1122
+ mainTableHeight: c,
1123
+ leftTableWidth: m,
1124
+ rightTableWidth: w,
1125
+ headerWidth: i,
1126
+ rowsHeight: h,
1127
+ windowHeight: l,
1128
+ footerHeight: v,
1129
+ emptyStyle: S,
1130
+ rootStyle: f,
1131
+ headerHeight: g
1132
+ };
1133
+ }, Lo = (e) => {
1134
+ const t = G(), n = G(0), o = G(0);
1135
+ let a;
1136
+ return rt(() => {
1137
+ a = qn(t, ([s]) => {
1138
+ const { width: i, height: c } = s.contentRect, { paddingLeft: h, paddingRight: u, paddingTop: d, paddingBottom: m } = getComputedStyle(s.target), w = Number.parseInt(h) || 0, g = Number.parseInt(u) || 0, y = Number.parseInt(d) || 0, l = Number.parseInt(m) || 0;
1139
+ n.value = i - w - g, o.value = c - y - l;
1140
+ }).stop;
1141
+ }), ln(() => {
1142
+ a == null || a();
1143
+ }), Fe([n, o], ([s, i]) => {
1144
+ var c;
1145
+ (c = e.onResize) == null || c.call(e, {
1146
+ width: s,
1147
+ height: i
1148
+ });
1149
+ }), {
1150
+ sizer: t,
1151
+ width: n,
1152
+ height: o
1153
+ };
1154
+ };
1155
+ function Wo(e) {
1156
+ const t = G(), n = G(), o = G(), {
1157
+ columns: a,
1158
+ columnsStyles: s,
1159
+ columnsTotalWidth: i,
1160
+ fixedColumnsOnLeft: c,
1161
+ fixedColumnsOnRight: h,
1162
+ hasFixedColumns: u,
1163
+ mainColumns: d,
1164
+ onColumnSorted: m
1165
+ } = Io(e, Gt(e, "columns"), Gt(e, "fixed")), {
1166
+ scrollTo: w,
1167
+ scrollToLeft: g,
1168
+ scrollToTop: y,
1169
+ scrollToRow: l,
1170
+ onScroll: f,
1171
+ onVerticalScroll: v,
1172
+ scrollPos: S
1173
+ } = Oo(e, {
1174
+ mainTableRef: t,
1175
+ leftTableRef: n,
1176
+ rightTableRef: o,
1177
+ onMaybeEndReached: Ve
1178
+ }), {
1179
+ expandedRowKeys: b,
1180
+ hoveringRowKey: E,
1181
+ lastRenderedRowIndex: A,
1182
+ isDynamic: R,
1183
+ isResetting: D,
1184
+ rowHeights: T,
1185
+ resetAfterIndex: I,
1186
+ onRowExpanded: _,
1187
+ onRowHeightChange: L,
1188
+ onRowHovered: $,
1189
+ onRowsRendered: K
1190
+ } = No(e, {
1191
+ mainTableRef: t,
1192
+ leftTableRef: n,
1193
+ rightTableRef: o
1194
+ }), { data: V, depthMap: j } = zo(e, {
1195
+ expandedRowKeys: b,
1196
+ lastRenderedRowIndex: A,
1197
+ resetAfterIndex: I
1198
+ }), {
1199
+ bodyWidth: Z,
1200
+ fixedTableHeight: U,
1201
+ mainTableHeight: de,
1202
+ leftTableWidth: ye,
1203
+ rightTableWidth: ne,
1204
+ headerWidth: we,
1205
+ rowsHeight: be,
1206
+ windowHeight: ue,
1207
+ footerHeight: ae,
1208
+ emptyStyle: J,
1209
+ rootStyle: Ge,
1210
+ headerHeight: he
1211
+ } = Po(e, {
1212
+ columnsTotalWidth: i,
1213
+ data: V,
1214
+ fixedColumnsOnLeft: c,
1215
+ fixedColumnsOnRight: h
1216
+ }), Se = Te(!1), Oe = G(), Re = x(() => {
1217
+ const Q = r(V).length === 0;
1218
+ return je(e.fixedData) ? e.fixedData.length === 0 && Q : Q;
1219
+ });
1220
+ function ke(Q) {
1221
+ const { estimatedRowHeight: se, rowHeight: fe, rowKey: me } = e;
1222
+ return se ? r(T)[r(V)[Q][me]] || se : fe;
1223
+ }
1224
+ function Ve() {
1225
+ const { onEndReached: Q } = e;
1226
+ if (!Q)
1227
+ return;
1228
+ const { scrollTop: se } = r(S), fe = r(be), me = r(ue), p = fe - (se + me) + e.hScrollbarSize;
1229
+ r(A) >= 0 && fe === se + r(de) - r(he) && Q(p);
1230
+ }
1231
+ return Fe(() => e.expandedRowKeys, (Q) => b.value = Q, {
1232
+ deep: !0
1233
+ }), {
1234
+ columns: a,
1235
+ containerRef: Oe,
1236
+ mainTableRef: t,
1237
+ leftTableRef: n,
1238
+ rightTableRef: o,
1239
+ isDynamic: R,
1240
+ isResetting: D,
1241
+ isScrolling: Se,
1242
+ hoveringRowKey: E,
1243
+ hasFixedColumns: u,
1244
+ columnsStyles: s,
1245
+ columnsTotalWidth: i,
1246
+ data: V,
1247
+ expandedRowKeys: b,
1248
+ depthMap: j,
1249
+ fixedColumnsOnLeft: c,
1250
+ fixedColumnsOnRight: h,
1251
+ mainColumns: d,
1252
+ bodyWidth: Z,
1253
+ emptyStyle: J,
1254
+ rootStyle: Ge,
1255
+ headerWidth: we,
1256
+ footerHeight: ae,
1257
+ mainTableHeight: de,
1258
+ fixedTableHeight: U,
1259
+ leftTableWidth: ye,
1260
+ rightTableWidth: ne,
1261
+ showEmpty: Re,
1262
+ getRowHeight: ke,
1263
+ onColumnSorted: m,
1264
+ onRowHovered: $,
1265
+ onRowExpanded: _,
1266
+ onRowsRendered: K,
1267
+ onRowHeightChange: L,
1268
+ scrollTo: w,
1269
+ scrollToLeft: g,
1270
+ scrollToTop: y,
1271
+ scrollToRow: l,
1272
+ onScroll: f,
1273
+ onVerticalScroll: v
1274
+ };
1275
+ }
1276
+ const Mt = Symbol("tableV2"), Mn = String, Ze = {
1277
+ type: O(Array),
1278
+ required: !0
1279
+ }, At = {
1280
+ type: O(Array)
1281
+ }, An = {
1282
+ ...At,
1283
+ required: !0
1284
+ }, Fo = String, en = {
1285
+ type: O(Array),
1286
+ default: () => an([])
1287
+ }, Ee = {
1288
+ type: Number,
1289
+ required: !0
1290
+ }, In = {
1291
+ type: O([String, Number, Symbol]),
1292
+ default: "id"
1293
+ }, tn = {
1294
+ type: O(Object)
1295
+ }, pe = le({
1296
+ class: String,
1297
+ columns: Ze,
1298
+ columnsStyles: {
1299
+ type: O(Object),
1300
+ required: !0
1301
+ },
1302
+ depth: Number,
1303
+ expandColumnKey: Fo,
1304
+ estimatedRowHeight: {
1305
+ ...Ce.estimatedRowHeight,
1306
+ default: void 0
1307
+ },
1308
+ isScrolling: Boolean,
1309
+ onRowExpand: {
1310
+ type: O(Function)
1311
+ },
1312
+ onRowHover: {
1313
+ type: O(Function)
1314
+ },
1315
+ onRowHeightChange: {
1316
+ type: O(Function)
1317
+ },
1318
+ rowData: {
1319
+ type: O(Object),
1320
+ required: !0
1321
+ },
1322
+ rowEventHandlers: {
1323
+ type: O(Object)
1324
+ },
1325
+ rowIndex: {
1326
+ type: Number,
1327
+ required: !0
1328
+ },
1329
+ rowKey: In,
1330
+ style: {
1331
+ type: O(Object)
1332
+ }
1333
+ }), dt = {
1334
+ type: Number,
1335
+ required: !0
1336
+ }, It = le({
1337
+ class: String,
1338
+ columns: Ze,
1339
+ fixedHeaderData: {
1340
+ type: O(Array)
1341
+ },
1342
+ headerData: {
1343
+ type: O(Array),
1344
+ required: !0
1345
+ },
1346
+ headerHeight: {
1347
+ type: O([Number, Array]),
1348
+ default: 50
1349
+ },
1350
+ rowWidth: dt,
1351
+ rowHeight: {
1352
+ type: Number,
1353
+ default: 50
1354
+ },
1355
+ height: dt,
1356
+ width: dt
1357
+ }), tt = le({
1358
+ columns: Ze,
1359
+ data: An,
1360
+ fixedData: At,
1361
+ estimatedRowHeight: pe.estimatedRowHeight,
1362
+ width: Ee,
1363
+ height: Ee,
1364
+ headerWidth: Ee,
1365
+ headerHeight: It.headerHeight,
1366
+ bodyWidth: Ee,
1367
+ rowHeight: Ee,
1368
+ cache: xo.cache,
1369
+ useIsScrolling: Boolean,
1370
+ scrollbarAlwaysOn: Ce.scrollbarAlwaysOn,
1371
+ scrollbarStartGap: Ce.scrollbarStartGap,
1372
+ scrollbarEndGap: Ce.scrollbarEndGap,
1373
+ class: Mn,
1374
+ style: tn,
1375
+ containerStyle: tn,
1376
+ getRowHeight: {
1377
+ type: O(Function),
1378
+ required: !0
1379
+ },
1380
+ rowKey: pe.rowKey,
1381
+ onRowsRendered: {
1382
+ type: O(Function)
1383
+ },
1384
+ onScroll: {
1385
+ type: O(Function)
1386
+ }
1387
+ }), Go = le({
1388
+ cache: tt.cache,
1389
+ estimatedRowHeight: pe.estimatedRowHeight,
1390
+ rowKey: In,
1391
+ headerClass: {
1392
+ type: O([
1393
+ String,
1394
+ Function
1395
+ ])
1396
+ },
1397
+ headerProps: {
1398
+ type: O([
1399
+ Object,
1400
+ Function
1401
+ ])
1402
+ },
1403
+ headerCellProps: {
1404
+ type: O([
1405
+ Object,
1406
+ Function
1407
+ ])
1408
+ },
1409
+ headerHeight: It.headerHeight,
1410
+ footerHeight: {
1411
+ type: Number,
1412
+ default: 0
1413
+ },
1414
+ rowClass: {
1415
+ type: O([String, Function])
1416
+ },
1417
+ rowProps: {
1418
+ type: O([Object, Function])
1419
+ },
1420
+ rowHeight: {
1421
+ type: Number,
1422
+ default: 50
1423
+ },
1424
+ cellProps: {
1425
+ type: O([
1426
+ Object,
1427
+ Function
1428
+ ])
1429
+ },
1430
+ columns: Ze,
1431
+ data: An,
1432
+ dataGetter: {
1433
+ type: O(Function)
1434
+ },
1435
+ fixedData: At,
1436
+ expandColumnKey: pe.expandColumnKey,
1437
+ expandedRowKeys: en,
1438
+ defaultExpandedRowKeys: en,
1439
+ class: Mn,
1440
+ fixed: Boolean,
1441
+ style: {
1442
+ type: O(Object)
1443
+ },
1444
+ width: Ee,
1445
+ height: Ee,
1446
+ maxHeight: Number,
1447
+ useIsScrolling: Boolean,
1448
+ indentSize: {
1449
+ type: Number,
1450
+ default: 12
1451
+ },
1452
+ iconSize: {
1453
+ type: Number,
1454
+ default: 12
1455
+ },
1456
+ hScrollbarSize: Ce.hScrollbarSize,
1457
+ vScrollbarSize: Ce.vScrollbarSize,
1458
+ scrollbarAlwaysOn: Sn.alwaysOn,
1459
+ sortBy: {
1460
+ type: O(Object),
1461
+ default: () => ({})
1462
+ },
1463
+ sortState: {
1464
+ type: O(Object),
1465
+ default: void 0
1466
+ },
1467
+ onColumnSort: {
1468
+ type: O(Function)
1469
+ },
1470
+ onExpandedRowsChange: {
1471
+ type: O(Function)
1472
+ },
1473
+ onEndReached: {
1474
+ type: O(Function)
1475
+ },
1476
+ onRowExpand: pe.onRowExpand,
1477
+ onScroll: tt.onScroll,
1478
+ onRowsRendered: tt.onRowsRendered,
1479
+ rowEventHandlers: pe.rowEventHandlers
1480
+ }), Ot = (e, {
1481
+ slots: t
1482
+ }) => {
1483
+ var n;
1484
+ const {
1485
+ cellData: o,
1486
+ style: a
1487
+ } = e, s = ((n = o == null ? void 0 : o.toString) == null ? void 0 : n.call(o)) || "";
1488
+ return C("div", {
1489
+ class: e.class,
1490
+ title: s,
1491
+ style: a
1492
+ }, [t.default ? t.default(e) : s]);
1493
+ };
1494
+ Ot.displayName = "ElTableV2Cell";
1495
+ Ot.inheritAttrs = !1;
1496
+ const Nt = (e, {
1497
+ slots: t
1498
+ }) => {
1499
+ var n, o;
1500
+ return t.default ? t.default(e) : C("div", {
1501
+ class: e.class,
1502
+ title: (n = e.column) == null ? void 0 : n.title
1503
+ }, [(o = e.column) == null ? void 0 : o.title]);
1504
+ };
1505
+ Nt.displayName = "ElTableV2HeaderCell";
1506
+ Nt.inheritAttrs = !1;
1507
+ const ko = le({
1508
+ class: String,
1509
+ columns: Ze,
1510
+ columnsStyles: {
1511
+ type: O(Object),
1512
+ required: !0
1513
+ },
1514
+ headerIndex: Number,
1515
+ style: { type: O(Object) }
1516
+ }), Vo = re({
1517
+ name: "ElTableV2HeaderRow",
1518
+ props: ko,
1519
+ setup(e, {
1520
+ slots: t
1521
+ }) {
1522
+ return () => {
1523
+ const {
1524
+ columns: n,
1525
+ columnsStyles: o,
1526
+ headerIndex: a,
1527
+ style: s
1528
+ } = e;
1529
+ let i = n.map((c, h) => t.cell({
1530
+ columns: n,
1531
+ column: c,
1532
+ columnIndex: h,
1533
+ headerIndex: a,
1534
+ style: o[c.key]
1535
+ }));
1536
+ return t.header && (i = t.header({
1537
+ cells: i.map((c) => je(c) && c.length === 1 ? c[0] : c),
1538
+ columns: n,
1539
+ headerIndex: a
1540
+ })), C("div", {
1541
+ class: e.class,
1542
+ style: s,
1543
+ role: "row"
1544
+ }, [i]);
1545
+ };
1546
+ }
1547
+ }), $o = "ElTableV2Header", Ko = re({
1548
+ name: $o,
1549
+ props: It,
1550
+ setup(e, {
1551
+ slots: t,
1552
+ expose: n
1553
+ }) {
1554
+ const o = He("table-v2"), a = G(), s = x(() => ge({
1555
+ width: e.width,
1556
+ height: e.height
1557
+ })), i = x(() => ge({
1558
+ width: e.rowWidth,
1559
+ height: e.height
1560
+ })), c = x(() => lo(r(e.headerHeight))), h = (m) => {
1561
+ const w = r(a);
1562
+ We(() => {
1563
+ w != null && w.scroll && w.scroll({
1564
+ left: m
1565
+ });
1566
+ });
1567
+ }, u = () => {
1568
+ const m = o.e("fixed-header-row"), {
1569
+ columns: w,
1570
+ fixedHeaderData: g,
1571
+ rowHeight: y
1572
+ } = e;
1573
+ return g == null ? void 0 : g.map((l, f) => {
1574
+ var v;
1575
+ const S = ge({
1576
+ height: y,
1577
+ width: "100%"
1578
+ });
1579
+ return (v = t.fixed) == null ? void 0 : v.call(t, {
1580
+ class: m,
1581
+ columns: w,
1582
+ rowData: l,
1583
+ rowIndex: -(f + 1),
1584
+ style: S
1585
+ });
1586
+ });
1587
+ }, d = () => {
1588
+ const m = o.e("dynamic-header-row"), {
1589
+ columns: w
1590
+ } = e;
1591
+ return r(c).map((g, y) => {
1592
+ var l;
1593
+ const f = ge({
1594
+ width: "100%",
1595
+ height: g
1596
+ });
1597
+ return (l = t.dynamic) == null ? void 0 : l.call(t, {
1598
+ class: m,
1599
+ columns: w,
1600
+ headerIndex: y,
1601
+ style: f
1602
+ });
1603
+ });
1604
+ };
1605
+ return n({
1606
+ scrollToLeft: h
1607
+ }), () => {
1608
+ if (!(e.height <= 0))
1609
+ return C("div", {
1610
+ ref: a,
1611
+ class: e.class,
1612
+ style: r(s),
1613
+ role: "rowgroup"
1614
+ }, [C("div", {
1615
+ style: r(i),
1616
+ class: o.e("header")
1617
+ }, [d(), u()])]);
1618
+ };
1619
+ }
1620
+ }), Bo = (e) => {
1621
+ const {
1622
+ isScrolling: t
1623
+ } = rn(Mt), n = G(!1), o = G(), a = x(() => Y(e.estimatedRowHeight) && e.rowIndex >= 0), s = (h = !1) => {
1624
+ const u = r(o);
1625
+ if (!u)
1626
+ return;
1627
+ const {
1628
+ columns: d,
1629
+ onRowHeightChange: m,
1630
+ rowKey: w,
1631
+ rowIndex: g,
1632
+ style: y
1633
+ } = e, {
1634
+ height: l
1635
+ } = u.getBoundingClientRect();
1636
+ n.value = !0, We(() => {
1637
+ if (h || l !== Number.parseInt(y.height)) {
1638
+ const f = d[0], v = (f == null ? void 0 : f.placeholderSign) === Ye;
1639
+ m == null || m({
1640
+ rowKey: w,
1641
+ height: l,
1642
+ rowIndex: g
1643
+ }, f && !v && f.fixed);
1644
+ }
1645
+ });
1646
+ }, i = x(() => {
1647
+ const {
1648
+ rowData: h,
1649
+ rowIndex: u,
1650
+ rowKey: d,
1651
+ onRowHover: m
1652
+ } = e, w = e.rowEventHandlers || {}, g = {};
1653
+ return Object.entries(w).forEach(([y, l]) => {
1654
+ Be(l) && (g[y] = (f) => {
1655
+ l({
1656
+ event: f,
1657
+ rowData: h,
1658
+ rowIndex: u,
1659
+ rowKey: d
1660
+ });
1661
+ });
1662
+ }), m && [{
1663
+ name: "onMouseleave",
1664
+ hovered: !1
1665
+ }, {
1666
+ name: "onMouseenter",
1667
+ hovered: !0
1668
+ }].forEach(({
1669
+ name: y,
1670
+ hovered: l
1671
+ }) => {
1672
+ const f = g[y];
1673
+ g[y] = (v) => {
1674
+ m({
1675
+ event: v,
1676
+ hovered: l,
1677
+ rowData: h,
1678
+ rowIndex: u,
1679
+ rowKey: d
1680
+ }), f == null || f(v);
1681
+ };
1682
+ }), g;
1683
+ }), c = (h) => {
1684
+ const {
1685
+ onRowExpand: u,
1686
+ rowData: d,
1687
+ rowIndex: m,
1688
+ rowKey: w
1689
+ } = e;
1690
+ u == null || u({
1691
+ expanded: h,
1692
+ rowData: d,
1693
+ rowIndex: m,
1694
+ rowKey: w
1695
+ });
1696
+ };
1697
+ return rt(() => {
1698
+ r(a) && s(!0);
1699
+ }), {
1700
+ isScrolling: t,
1701
+ measurable: a,
1702
+ measured: n,
1703
+ rowRef: o,
1704
+ eventHandlers: i,
1705
+ onExpand: c
1706
+ };
1707
+ }, jo = "ElTableV2TableRow", Uo = re({
1708
+ name: jo,
1709
+ props: pe,
1710
+ setup(e, {
1711
+ expose: t,
1712
+ slots: n,
1713
+ attrs: o
1714
+ }) {
1715
+ const {
1716
+ eventHandlers: a,
1717
+ isScrolling: s,
1718
+ measurable: i,
1719
+ measured: c,
1720
+ rowRef: h,
1721
+ onExpand: u
1722
+ } = Bo(e);
1723
+ return t({
1724
+ onExpand: u
1725
+ }), () => {
1726
+ const {
1727
+ columns: d,
1728
+ columnsStyles: m,
1729
+ expandColumnKey: w,
1730
+ depth: g,
1731
+ rowData: y,
1732
+ rowIndex: l,
1733
+ style: f
1734
+ } = e;
1735
+ let v = d.map((S, b) => {
1736
+ const E = je(y.children) && y.children.length > 0 && S.key === w;
1737
+ return n.cell({
1738
+ column: S,
1739
+ columns: d,
1740
+ columnIndex: b,
1741
+ depth: g,
1742
+ style: m[S.key],
1743
+ rowData: y,
1744
+ rowIndex: l,
1745
+ isScrolling: r(s),
1746
+ expandIconProps: E ? {
1747
+ rowData: y,
1748
+ rowIndex: l,
1749
+ onExpand: u
1750
+ } : void 0
1751
+ });
1752
+ });
1753
+ if (n.row && (v = n.row({
1754
+ cells: v.map((S) => je(S) && S.length === 1 ? S[0] : S),
1755
+ style: f,
1756
+ columns: d,
1757
+ depth: g,
1758
+ rowData: y,
1759
+ rowIndex: l,
1760
+ isScrolling: r(s)
1761
+ })), r(i)) {
1762
+ const {
1763
+ height: S,
1764
+ ...b
1765
+ } = f || {}, E = r(c);
1766
+ return C("div", B({
1767
+ ref: h,
1768
+ class: e.class,
1769
+ style: E ? f : b,
1770
+ role: "row"
1771
+ }, o, r(a)), [v]);
1772
+ }
1773
+ return C("div", B(o, {
1774
+ ref: h,
1775
+ class: e.class,
1776
+ style: f,
1777
+ role: "row"
1778
+ }, r(a)), [v]);
1779
+ };
1780
+ }
1781
+ }), qo = (e) => {
1782
+ const {
1783
+ sortOrder: t
1784
+ } = e;
1785
+ return C(dn, {
1786
+ size: 14,
1787
+ class: e.class
1788
+ }, {
1789
+ default: () => [t === Ue.ASC ? C(ro, null, null) : C(ao, null, null)]
1790
+ });
1791
+ }, Yo = (e) => {
1792
+ const {
1793
+ expanded: t,
1794
+ expandable: n,
1795
+ onExpand: o,
1796
+ style: a,
1797
+ size: s
1798
+ } = e, i = {
1799
+ onClick: n ? () => o(!t) : void 0,
1800
+ class: e.class
1801
+ };
1802
+ return C(dn, B(i, {
1803
+ size: s,
1804
+ style: a
1805
+ }), {
1806
+ default: () => [C(so, null, null)]
1807
+ });
1808
+ }, Zo = "ElTableV2Grid", Xo = (e) => {
1809
+ const t = G(), n = G(), o = x(() => {
1810
+ const {
1811
+ data: l,
1812
+ rowHeight: f,
1813
+ estimatedRowHeight: v
1814
+ } = e;
1815
+ if (!v)
1816
+ return l.length * f;
1817
+ }), a = x(() => {
1818
+ const {
1819
+ fixedData: l,
1820
+ rowHeight: f
1821
+ } = e;
1822
+ return ((l == null ? void 0 : l.length) || 0) * f;
1823
+ }), s = x(() => et(e.headerHeight)), i = x(() => {
1824
+ const {
1825
+ height: l
1826
+ } = e;
1827
+ return Math.max(0, l - r(s) - r(a));
1828
+ }), c = x(() => r(s) + r(a) > 0), h = ({
1829
+ data: l,
1830
+ rowIndex: f
1831
+ }) => l[f][e.rowKey];
1832
+ function u({
1833
+ rowCacheStart: l,
1834
+ rowCacheEnd: f,
1835
+ rowVisibleStart: v,
1836
+ rowVisibleEnd: S
1837
+ }) {
1838
+ var b;
1839
+ (b = e.onRowsRendered) == null || b.call(e, {
1840
+ rowCacheStart: l,
1841
+ rowCacheEnd: f,
1842
+ rowVisibleStart: v,
1843
+ rowVisibleEnd: S
1844
+ });
1845
+ }
1846
+ function d(l, f) {
1847
+ var v;
1848
+ (v = n.value) == null || v.resetAfterRowIndex(l, f);
1849
+ }
1850
+ function m(l, f) {
1851
+ const v = r(t), S = r(n);
1852
+ !v || !S || (Ct(l) ? (v.scrollToLeft(l.scrollLeft), S.scrollTo(l)) : (v.scrollToLeft(l), S.scrollTo({
1853
+ scrollLeft: l,
1854
+ scrollTop: f
1855
+ })));
1856
+ }
1857
+ function w(l) {
1858
+ var f;
1859
+ (f = r(n)) == null || f.scrollTo({
1860
+ scrollTop: l
1861
+ });
1862
+ }
1863
+ function g(l, f) {
1864
+ var v;
1865
+ (v = r(n)) == null || v.scrollToItem(l, 1, f);
1866
+ }
1867
+ function y() {
1868
+ var l, f;
1869
+ (l = r(n)) == null || l.$forceUpdate(), (f = r(t)) == null || f.$forceUpdate();
1870
+ }
1871
+ return {
1872
+ bodyRef: n,
1873
+ forceUpdate: y,
1874
+ fixedRowHeight: a,
1875
+ gridHeight: i,
1876
+ hasHeader: c,
1877
+ headerHeight: s,
1878
+ headerRef: t,
1879
+ totalHeight: o,
1880
+ itemKey: h,
1881
+ onItemRendered: u,
1882
+ resetAfterRowIndex: d,
1883
+ scrollTo: m,
1884
+ scrollToTop: w,
1885
+ scrollToRow: g
1886
+ };
1887
+ }, zt = re({
1888
+ name: Zo,
1889
+ props: tt,
1890
+ setup(e, {
1891
+ slots: t,
1892
+ expose: n
1893
+ }) {
1894
+ const {
1895
+ ns: o
1896
+ } = rn(Mt), {
1897
+ bodyRef: a,
1898
+ fixedRowHeight: s,
1899
+ gridHeight: i,
1900
+ hasHeader: c,
1901
+ headerRef: h,
1902
+ headerHeight: u,
1903
+ totalHeight: d,
1904
+ forceUpdate: m,
1905
+ itemKey: w,
1906
+ onItemRendered: g,
1907
+ resetAfterRowIndex: y,
1908
+ scrollTo: l,
1909
+ scrollToTop: f,
1910
+ scrollToRow: v
1911
+ } = Xo(e);
1912
+ n({
1913
+ forceUpdate: m,
1914
+ totalHeight: d,
1915
+ scrollTo: l,
1916
+ scrollToTop: f,
1917
+ scrollToRow: v,
1918
+ resetAfterRowIndex: y
1919
+ });
1920
+ const S = () => e.bodyWidth;
1921
+ return () => {
1922
+ const {
1923
+ cache: b,
1924
+ columns: E,
1925
+ data: A,
1926
+ fixedData: R,
1927
+ useIsScrolling: D,
1928
+ scrollbarAlwaysOn: T,
1929
+ scrollbarEndGap: I,
1930
+ scrollbarStartGap: _,
1931
+ style: L,
1932
+ rowHeight: $,
1933
+ bodyWidth: K,
1934
+ estimatedRowHeight: V,
1935
+ headerWidth: j,
1936
+ height: Z,
1937
+ width: U,
1938
+ getRowHeight: de,
1939
+ onScroll: ye
1940
+ } = e, ne = Y(V), we = ne ? Mo : _o, be = r(u);
1941
+ return C("div", {
1942
+ role: "table",
1943
+ class: [o.e("table"), e.class],
1944
+ style: L
1945
+ }, [C(we, {
1946
+ ref: a,
1947
+ data: A,
1948
+ useIsScrolling: D,
1949
+ itemKey: w,
1950
+ columnCache: 0,
1951
+ columnWidth: ne ? S : K,
1952
+ totalColumn: 1,
1953
+ totalRow: A.length,
1954
+ rowCache: b,
1955
+ rowHeight: ne ? de : $,
1956
+ width: U,
1957
+ height: r(i),
1958
+ class: o.e("body"),
1959
+ role: "rowgroup",
1960
+ scrollbarStartGap: _,
1961
+ scrollbarEndGap: I,
1962
+ scrollbarAlwaysOn: T,
1963
+ onScroll: ye,
1964
+ onItemRendered: g,
1965
+ perfMode: !1
1966
+ }, {
1967
+ default: (ue) => {
1968
+ var ae;
1969
+ const J = A[ue.rowIndex];
1970
+ return (ae = t.row) == null ? void 0 : ae.call(t, {
1971
+ ...ue,
1972
+ columns: E,
1973
+ rowData: J
1974
+ });
1975
+ }
1976
+ }), r(c) && C(Ko, {
1977
+ ref: h,
1978
+ class: o.e("header-wrapper"),
1979
+ columns: E,
1980
+ headerData: A,
1981
+ headerHeight: e.headerHeight,
1982
+ fixedHeaderData: R,
1983
+ rowWidth: j,
1984
+ rowHeight: $,
1985
+ width: U,
1986
+ height: Math.min(be + r(s), Z)
1987
+ }, {
1988
+ dynamic: t.header,
1989
+ fixed: t.row
1990
+ })]);
1991
+ };
1992
+ }
1993
+ });
1994
+ function Jo(e) {
1995
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
1996
+ }
1997
+ const Qo = (e, {
1998
+ slots: t
1999
+ }) => {
2000
+ const {
2001
+ mainTableRef: n,
2002
+ ...o
2003
+ } = e;
2004
+ return C(zt, B({
2005
+ ref: n
2006
+ }, o), Jo(t) ? t : {
2007
+ default: () => [t]
2008
+ });
2009
+ };
2010
+ function el(e) {
2011
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
2012
+ }
2013
+ const tl = (e, {
2014
+ slots: t
2015
+ }) => {
2016
+ if (!e.columns.length)
2017
+ return;
2018
+ const {
2019
+ leftTableRef: n,
2020
+ ...o
2021
+ } = e;
2022
+ return C(zt, B({
2023
+ ref: n
2024
+ }, o), el(t) ? t : {
2025
+ default: () => [t]
2026
+ });
2027
+ };
2028
+ function nl(e) {
2029
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
2030
+ }
2031
+ const ol = (e, {
2032
+ slots: t
2033
+ }) => {
2034
+ if (!e.columns.length)
2035
+ return;
2036
+ const {
2037
+ rightTableRef: n,
2038
+ ...o
2039
+ } = e;
2040
+ return C(zt, B({
2041
+ ref: n
2042
+ }, o), nl(t) ? t : {
2043
+ default: () => [t]
2044
+ });
2045
+ };
2046
+ function ll(e) {
2047
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
2048
+ }
2049
+ const rl = (e, {
2050
+ slots: t
2051
+ }) => {
2052
+ const {
2053
+ columns: n,
2054
+ columnsStyles: o,
2055
+ depthMap: a,
2056
+ expandColumnKey: s,
2057
+ expandedRowKeys: i,
2058
+ estimatedRowHeight: c,
2059
+ hasFixedColumns: h,
2060
+ hoveringRowKey: u,
2061
+ rowData: d,
2062
+ rowIndex: m,
2063
+ style: w,
2064
+ isScrolling: g,
2065
+ rowProps: y,
2066
+ rowClass: l,
2067
+ rowKey: f,
2068
+ rowEventHandlers: v,
2069
+ ns: S,
2070
+ onRowHovered: b,
2071
+ onRowExpanded: E
2072
+ } = e, A = Me(l, {
2073
+ columns: n,
2074
+ rowData: d,
2075
+ rowIndex: m
2076
+ }, ""), R = Me(y, {
2077
+ columns: n,
2078
+ rowData: d,
2079
+ rowIndex: m
2080
+ }), D = d[f], T = a[D] || 0, I = !!s, _ = m < 0, L = [S.e("row"), A, {
2081
+ [S.e(`row-depth-${T}`)]: I && m >= 0,
2082
+ [S.is("expanded")]: I && i.includes(D),
2083
+ [S.is("hovered")]: !g && D === u,
2084
+ [S.is("fixed")]: !T && _,
2085
+ [S.is("customized")]: !!t.row
2086
+ }], $ = h ? b : void 0, K = {
2087
+ ...R,
2088
+ columns: n,
2089
+ columnsStyles: o,
2090
+ class: L,
2091
+ depth: T,
2092
+ expandColumnKey: s,
2093
+ estimatedRowHeight: _ ? void 0 : c,
2094
+ isScrolling: g,
2095
+ rowIndex: m,
2096
+ rowData: d,
2097
+ rowKey: D,
2098
+ rowEventHandlers: v,
2099
+ style: w
2100
+ };
2101
+ return C(Uo, B(K, {
2102
+ onRowHover: $,
2103
+ onRowExpand: E
2104
+ }), ll(t) ? t : {
2105
+ default: () => [t]
2106
+ });
2107
+ }, _t = ({
2108
+ columns: e,
2109
+ column: t,
2110
+ columnIndex: n,
2111
+ depth: o,
2112
+ expandIconProps: a,
2113
+ isScrolling: s,
2114
+ rowData: i,
2115
+ rowIndex: c,
2116
+ style: h,
2117
+ expandedRowKeys: u,
2118
+ ns: d,
2119
+ cellProps: m,
2120
+ expandColumnKey: w,
2121
+ indentSize: g,
2122
+ iconSize: y,
2123
+ rowKey: l
2124
+ }, {
2125
+ slots: f
2126
+ }) => {
2127
+ const v = ge(h);
2128
+ if (t.placeholderSign === Ye)
2129
+ return C("div", {
2130
+ class: d.em("row-cell", "placeholder"),
2131
+ style: v
2132
+ }, null);
2133
+ const {
2134
+ cellRenderer: S,
2135
+ dataKey: b,
2136
+ dataGetter: E
2137
+ } = t, R = Hn(S) || f.default || ((Z) => C(Ot, Z, null)), D = Be(E) ? E({
2138
+ columns: e,
2139
+ column: t,
2140
+ columnIndex: n,
2141
+ rowData: i,
2142
+ rowIndex: c
2143
+ }) : Bn(i, b ?? ""), T = Me(m, {
2144
+ cellData: D,
2145
+ columns: e,
2146
+ column: t,
2147
+ columnIndex: n,
2148
+ rowIndex: c,
2149
+ rowData: i
2150
+ }), I = {
2151
+ class: d.e("cell-text"),
2152
+ columns: e,
2153
+ column: t,
2154
+ columnIndex: n,
2155
+ cellData: D,
2156
+ isScrolling: s,
2157
+ rowData: i,
2158
+ rowIndex: c
2159
+ }, _ = R(I), L = [d.e("row-cell"), t.class, t.align === qe.CENTER && d.is("align-center"), t.align === qe.RIGHT && d.is("align-right")], $ = c >= 0 && w && t.key === w, K = c >= 0 && u.includes(i[l]);
2160
+ let V;
2161
+ const j = `margin-inline-start: ${o * g}px;`;
2162
+ return $ && (Ct(a) ? V = C(Yo, B(a, {
2163
+ class: [d.e("expand-icon"), d.is("expanded", K)],
2164
+ size: y,
2165
+ expanded: K,
2166
+ style: j,
2167
+ expandable: !0
2168
+ }), null) : V = C("div", {
2169
+ style: [j, `width: ${y}px; height: ${y}px;`].join(" ")
2170
+ }, null)), C("div", B({
2171
+ class: L,
2172
+ style: v
2173
+ }, T, {
2174
+ role: "cell"
2175
+ }), [V, _]);
2176
+ };
2177
+ _t.inheritAttrs = !1;
2178
+ function al(e) {
2179
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
2180
+ }
2181
+ const sl = ({
2182
+ columns: e,
2183
+ columnsStyles: t,
2184
+ headerIndex: n,
2185
+ style: o,
2186
+ headerClass: a,
2187
+ headerProps: s,
2188
+ ns: i
2189
+ }, {
2190
+ slots: c
2191
+ }) => {
2192
+ const h = {
2193
+ columns: e,
2194
+ headerIndex: n
2195
+ }, u = [i.e("header-row"), Me(a, h, ""), {
2196
+ [i.is("customized")]: !!c.header
2197
+ }], d = {
2198
+ ...Me(s, h),
2199
+ columnsStyles: t,
2200
+ class: u,
2201
+ columns: e,
2202
+ headerIndex: n,
2203
+ style: o
2204
+ };
2205
+ return C(Vo, d, al(c) ? c : {
2206
+ default: () => [c]
2207
+ });
2208
+ }, nn = (e, {
2209
+ slots: t
2210
+ }) => {
2211
+ const {
2212
+ column: n,
2213
+ ns: o,
2214
+ style: a,
2215
+ onColumnSorted: s
2216
+ } = e, i = ge(a);
2217
+ if (n.placeholderSign === Ye)
2218
+ return C("div", {
2219
+ class: o.em("header-row-cell", "placeholder"),
2220
+ style: i
2221
+ }, null);
2222
+ const {
2223
+ headerCellRenderer: c,
2224
+ headerClass: h,
2225
+ sortable: u
2226
+ } = n, d = {
2227
+ ...e,
2228
+ class: o.e("header-cell-text")
2229
+ }, w = (Hn(c) || t.default || ((E) => C(Nt, E, null)))(d), {
2230
+ sortBy: g,
2231
+ sortState: y,
2232
+ headerCellProps: l
2233
+ } = e;
2234
+ let f, v;
2235
+ if (y) {
2236
+ const E = y[n.key];
2237
+ f = !!Et[E], v = f ? E : Ue.ASC;
2238
+ } else
2239
+ f = n.key === g.key, v = f ? g.order : Ue.ASC;
2240
+ const S = [o.e("header-cell"), Me(h, e, ""), n.align === qe.CENTER && o.is("align-center"), n.align === qe.RIGHT && o.is("align-right"), u && o.is("sortable")], b = {
2241
+ ...Me(l, e),
2242
+ onClick: n.sortable ? s : void 0,
2243
+ class: S,
2244
+ style: i,
2245
+ "data-key": n.key
2246
+ };
2247
+ return C("div", B(b, {
2248
+ role: "columnheader"
2249
+ }), [w, u && C(qo, {
2250
+ class: [o.e("sort-icon"), f && o.is("sorting")],
2251
+ sortOrder: v
2252
+ }, null)]);
2253
+ }, On = (e, {
2254
+ slots: t
2255
+ }) => {
2256
+ var n;
2257
+ return C("div", {
2258
+ class: e.class,
2259
+ style: e.style
2260
+ }, [(n = t.default) == null ? void 0 : n.call(t)]);
2261
+ };
2262
+ On.displayName = "ElTableV2Footer";
2263
+ const Nn = (e, {
2264
+ slots: t
2265
+ }) => C("div", {
2266
+ class: e.class,
2267
+ style: e.style
2268
+ }, [t.default ? t.default() : C(on, null, null)]);
2269
+ Nn.displayName = "ElTableV2Empty";
2270
+ const zn = (e, {
2271
+ slots: t
2272
+ }) => {
2273
+ var n;
2274
+ return C("div", {
2275
+ class: e.class,
2276
+ style: e.style
2277
+ }, [(n = t.default) == null ? void 0 : n.call(t)]);
2278
+ };
2279
+ zn.displayName = "ElTableV2Overlay";
2280
+ function $e(e) {
2281
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
2282
+ }
2283
+ const il = "ElTableV2", cl = re({
2284
+ name: il,
2285
+ props: Go,
2286
+ setup(e, {
2287
+ slots: t,
2288
+ expose: n
2289
+ }) {
2290
+ const o = He("table-v2"), {
2291
+ columnsStyles: a,
2292
+ fixedColumnsOnLeft: s,
2293
+ fixedColumnsOnRight: i,
2294
+ mainColumns: c,
2295
+ mainTableHeight: h,
2296
+ fixedTableHeight: u,
2297
+ leftTableWidth: d,
2298
+ rightTableWidth: m,
2299
+ data: w,
2300
+ depthMap: g,
2301
+ expandedRowKeys: y,
2302
+ hasFixedColumns: l,
2303
+ hoveringRowKey: f,
2304
+ mainTableRef: v,
2305
+ leftTableRef: S,
2306
+ rightTableRef: b,
2307
+ isDynamic: E,
2308
+ isResetting: A,
2309
+ isScrolling: R,
2310
+ bodyWidth: D,
2311
+ emptyStyle: T,
2312
+ rootStyle: I,
2313
+ headerWidth: _,
2314
+ footerHeight: L,
2315
+ showEmpty: $,
2316
+ scrollTo: K,
2317
+ scrollToLeft: V,
2318
+ scrollToTop: j,
2319
+ scrollToRow: Z,
2320
+ getRowHeight: U,
2321
+ onColumnSorted: de,
2322
+ onRowHeightChange: ye,
2323
+ onRowHovered: ne,
2324
+ onRowExpanded: we,
2325
+ onRowsRendered: be,
2326
+ onScroll: ue,
2327
+ onVerticalScroll: ae
2328
+ } = Wo(e);
2329
+ return n({
2330
+ scrollTo: K,
2331
+ scrollToLeft: V,
2332
+ scrollToTop: j,
2333
+ scrollToRow: Z
2334
+ }), eo(Mt, {
2335
+ ns: o,
2336
+ isResetting: A,
2337
+ hoveringRowKey: f,
2338
+ isScrolling: R
2339
+ }), () => {
2340
+ const {
2341
+ cache: J,
2342
+ cellProps: Ge,
2343
+ estimatedRowHeight: he,
2344
+ expandColumnKey: Se,
2345
+ fixedData: Oe,
2346
+ headerHeight: Re,
2347
+ headerClass: ke,
2348
+ headerProps: Ve,
2349
+ headerCellProps: Q,
2350
+ sortBy: se,
2351
+ sortState: fe,
2352
+ rowHeight: me,
2353
+ rowClass: p,
2354
+ rowEventHandlers: H,
2355
+ rowKey: M,
2356
+ rowProps: P,
2357
+ scrollbarAlwaysOn: N,
2358
+ indentSize: z,
2359
+ iconSize: W,
2360
+ useIsScrolling: F,
2361
+ vScrollbarSize: k,
2362
+ width: X
2363
+ } = e, te = r(w), ee = {
2364
+ cache: J,
2365
+ class: o.e("main"),
2366
+ columns: r(c),
2367
+ data: te,
2368
+ fixedData: Oe,
2369
+ estimatedRowHeight: he,
2370
+ bodyWidth: r(D) + k,
2371
+ headerHeight: Re,
2372
+ headerWidth: r(_),
2373
+ height: r(h),
2374
+ mainTableRef: v,
2375
+ rowKey: M,
2376
+ rowHeight: me,
2377
+ scrollbarAlwaysOn: N,
2378
+ scrollbarStartGap: 2,
2379
+ scrollbarEndGap: k,
2380
+ useIsScrolling: F,
2381
+ width: X,
2382
+ getRowHeight: U,
2383
+ onRowsRendered: be,
2384
+ onScroll: ue
2385
+ }, q = r(d), Xe = r(u), at = {
2386
+ cache: J,
2387
+ class: o.e("left"),
2388
+ columns: r(s),
2389
+ data: te,
2390
+ estimatedRowHeight: he,
2391
+ leftTableRef: S,
2392
+ rowHeight: me,
2393
+ bodyWidth: q,
2394
+ headerWidth: q,
2395
+ headerHeight: Re,
2396
+ height: Xe,
2397
+ rowKey: M,
2398
+ scrollbarAlwaysOn: N,
2399
+ scrollbarStartGap: 2,
2400
+ scrollbarEndGap: k,
2401
+ useIsScrolling: F,
2402
+ width: q,
2403
+ getRowHeight: U,
2404
+ onScroll: ae
2405
+ }, st = r(m) + k, Dn = {
2406
+ cache: J,
2407
+ class: o.e("right"),
2408
+ columns: r(i),
2409
+ data: te,
2410
+ estimatedRowHeight: he,
2411
+ rightTableRef: b,
2412
+ rowHeight: me,
2413
+ bodyWidth: st,
2414
+ headerWidth: st,
2415
+ headerHeight: Re,
2416
+ height: Xe,
2417
+ rowKey: M,
2418
+ scrollbarAlwaysOn: N,
2419
+ scrollbarStartGap: 2,
2420
+ scrollbarEndGap: k,
2421
+ width: st,
2422
+ style: `--${r(o.namespace)}-table-scrollbar-size: ${k}px`,
2423
+ useIsScrolling: F,
2424
+ getRowHeight: U,
2425
+ onScroll: ae
2426
+ }, Ne = r(a), Pn = {
2427
+ ns: o,
2428
+ depthMap: r(g),
2429
+ columnsStyles: Ne,
2430
+ expandColumnKey: Se,
2431
+ expandedRowKeys: r(y),
2432
+ estimatedRowHeight: he,
2433
+ hasFixedColumns: r(l),
2434
+ hoveringRowKey: r(f),
2435
+ rowProps: P,
2436
+ rowClass: p,
2437
+ rowKey: M,
2438
+ rowEventHandlers: H,
2439
+ onRowHovered: ne,
2440
+ onRowExpanded: we,
2441
+ onRowHeightChange: ye
2442
+ }, Dt = {
2443
+ cellProps: Ge,
2444
+ expandColumnKey: Se,
2445
+ indentSize: z,
2446
+ iconSize: W,
2447
+ rowKey: M,
2448
+ expandedRowKeys: r(y),
2449
+ ns: o
2450
+ }, Ln = {
2451
+ ns: o,
2452
+ headerClass: ke,
2453
+ headerProps: Ve,
2454
+ columnsStyles: Ne
2455
+ }, Pt = {
2456
+ ns: o,
2457
+ sortBy: se,
2458
+ sortState: fe,
2459
+ headerCellProps: Q,
2460
+ onColumnSorted: de
2461
+ }, ie = {
2462
+ row: (it) => C(rl, B(it, Pn), {
2463
+ row: t.row,
2464
+ cell: (oe) => {
2465
+ let xe;
2466
+ return t.cell ? C(_t, B(oe, Dt, {
2467
+ style: Ne[oe.column.key]
2468
+ }), $e(xe = t.cell(oe)) ? xe : {
2469
+ default: () => [xe]
2470
+ }) : C(_t, B(oe, Dt, {
2471
+ style: Ne[oe.column.key]
2472
+ }), null);
2473
+ }
2474
+ }),
2475
+ header: (it) => C(sl, B(it, Ln), {
2476
+ header: t.header,
2477
+ cell: (oe) => {
2478
+ let xe;
2479
+ return t["header-cell"] ? C(nn, B(oe, Pt, {
2480
+ style: Ne[oe.column.key]
2481
+ }), $e(xe = t["header-cell"](oe)) ? xe : {
2482
+ default: () => [xe]
2483
+ }) : C(nn, B(oe, Pt, {
2484
+ style: Ne[oe.column.key]
2485
+ }), null);
2486
+ }
2487
+ })
2488
+ }, Wn = [e.class, o.b(), o.e("root"), {
2489
+ [o.is("dynamic")]: r(E)
2490
+ }], Fn = {
2491
+ class: o.e("footer"),
2492
+ style: r(L)
2493
+ };
2494
+ return C("div", {
2495
+ class: Wn,
2496
+ style: r(I)
2497
+ }, [C(Qo, ee, $e(ie) ? ie : {
2498
+ default: () => [ie]
2499
+ }), C(tl, at, $e(ie) ? ie : {
2500
+ default: () => [ie]
2501
+ }), C(ol, Dn, $e(ie) ? ie : {
2502
+ default: () => [ie]
2503
+ }), t.footer && C(On, Fn, {
2504
+ default: t.footer
2505
+ }), r($) && C(Nn, {
2506
+ class: o.e("empty"),
2507
+ style: r(T)
2508
+ }, {
2509
+ default: t.empty
2510
+ }), t.overlay && C(zn, {
2511
+ class: o.e("overlay")
2512
+ }, {
2513
+ default: t.overlay
2514
+ })]);
2515
+ };
2516
+ }
2517
+ }), dl = le({
2518
+ disableWidth: Boolean,
2519
+ disableHeight: Boolean,
2520
+ onResize: {
2521
+ type: O(Function)
2522
+ }
2523
+ }), ul = re({
2524
+ name: "ElAutoResizer",
2525
+ props: dl,
2526
+ setup(e, {
2527
+ slots: t
2528
+ }) {
2529
+ const n = He("auto-resizer"), {
2530
+ height: o,
2531
+ width: a,
2532
+ sizer: s
2533
+ } = Lo(e), i = {
2534
+ width: "100%",
2535
+ height: "100%"
2536
+ };
2537
+ return () => {
2538
+ var c;
2539
+ return C("div", {
2540
+ ref: s,
2541
+ class: n.b(),
2542
+ style: i
2543
+ }, [(c = t.default) == null ? void 0 : c.call(t, {
2544
+ height: o.value,
2545
+ width: a.value
2546
+ })]);
2547
+ };
2548
+ }
2549
+ }), hl = pt(cl), fl = pt(ul);
2550
+ const ml = {
2551
+ key: 0,
2552
+ class: "footer-box"
2553
+ }, vl = {
2554
+ __name: "index",
2555
+ props: /* @__PURE__ */ kt({
2556
+ tableData: {
2557
+ type: Array,
2558
+ default: []
2559
+ },
2560
+ tableColumn: {
2561
+ type: Array,
2562
+ default: []
2563
+ },
2564
+ tableLoading: {
2565
+ type: [String, null],
2566
+ default: null
2567
+ },
2568
+ // more(加载更多), all(已无更多数据)
2569
+ config: {
2570
+ type: Object
2571
+ }
2572
+ }, {
2573
+ tableActiveData: {
2574
+ default: () => []
2575
+ },
2576
+ tableActiveDataModifiers: {}
2577
+ }),
2578
+ emits: /* @__PURE__ */ kt(["touchBottom"], ["update:tableActiveData"]),
2579
+ setup(e, {
2580
+ emit: t
2581
+ }) {
2582
+ const n = t, o = e, a = x(() => ({
2583
+ // 表格头高度 支持: Number/Array<Number>
2584
+ headerHeight: 50,
2585
+ // 行高度
2586
+ rowHeight: 50,
2587
+ // 选中行相关功能参数
2588
+ tableActiveNum: 9,
2589
+ // 选中行数
2590
+ tableActiveKey: "id",
2591
+ // 选中行唯一Key
2592
+ pageUpDownEnabled: !0,
2593
+ // 是否开启键盘pageUp, pageDown切换选中功能
2594
+ ...o.config
2595
+ })), s = G(null), i = G(0);
2596
+ let c = 0, h = !1, u = null;
2597
+ const d = to(e, "tableActiveData"), m = x(() => d.value.map((v) => v[a.value.tableActiveKey])), w = ({
2598
+ rowData: v,
2599
+ rowIndex: S
2600
+ }) => {
2601
+ const {
2602
+ tableActiveNum: b,
2603
+ tableActiveKey: E
2604
+ } = a.value;
2605
+ if (m.value.includes(v[E]))
2606
+ return;
2607
+ const A = Math.floor(S / b) * b, R = A + b;
2608
+ d.value = o.tableData.slice(A, R);
2609
+ }, g = ({
2610
+ code: v
2611
+ }) => {
2612
+ const {
2613
+ tableData: S
2614
+ } = o, {
2615
+ tableActiveNum: b,
2616
+ tableActiveKey: E,
2617
+ pageUpDownEnabled: A
2618
+ } = a.value;
2619
+ if (!S.length || !A)
2620
+ return;
2621
+ const R = S.findIndex((_) => _[E] === m.value.at(0)), D = S.findIndex((_) => _[E] === m.value.at(-1));
2622
+ let T = null, I = null;
2623
+ switch (v) {
2624
+ case "PageUp":
2625
+ if (R === 0)
2626
+ return;
2627
+ T = R - b > 0 ? R - b : 0, I = T + b - 1, d.value = S.slice(T, I + 1), l(T, "PageUp");
2628
+ break;
2629
+ case "PageDown":
2630
+ if (D === S.length - 1)
2631
+ return;
2632
+ T = R + b, I = T + b - 1, d.value = S.slice(T, I + 1), l(I, "PageDown");
2633
+ break;
2634
+ }
2635
+ }, y = (v) => {
2636
+ h || (c === v.scrollLeft && v.yAxisScrollDir === "backward" && (i.value = 0), c = v.scrollLeft);
2637
+ }, l = (v, S) => {
2638
+ v !== null && (clearTimeout(u), h = !0, S === "PageUp" ? i.value = 0 : v >= o.tableData.length - 1 && (i.value = 30, n("touchBottom")), We(() => {
2639
+ s.value.scrollToRow(v), s.value.scrollToLeft(c), u = setTimeout(() => {
2640
+ h = !1;
2641
+ }, 500);
2642
+ }));
2643
+ }, f = ({
2644
+ rowData: v
2645
+ }) => {
2646
+ if (!d.value.length)
2647
+ return;
2648
+ let S = "";
2649
+ const {
2650
+ tableActiveKey: b
2651
+ } = a.value;
2652
+ return v[b] === m.value[0] && (S += " virtual-table-active-start"), m.value.includes(v[b]) && (S += " virtual-table-active-row"), v[b] === m.value[m.value.length - 1] && (S += " virtual-table-active-end"), S;
2653
+ };
2654
+ return rt(() => {
2655
+ window.addEventListener("keydown", g);
2656
+ }), Fe(() => o.tableLoading, (v) => {
2657
+ v || (i.value = 0);
2658
+ }), no(() => {
2659
+ window.removeEventListener("keydown", g);
2660
+ }), (v, S) => {
2661
+ const b = on, E = Yn, A = mo, R = hl, D = fl;
2662
+ return Pe(), ct(D, null, {
2663
+ default: ze(({
2664
+ height: T,
2665
+ width: I
2666
+ }) => [C(R, {
2667
+ ref_key: "tableRef",
2668
+ ref: s,
2669
+ id: "virtualTable",
2670
+ fixed: "",
2671
+ data: e.tableData,
2672
+ columns: e.tableColumn,
2673
+ width: I,
2674
+ height: T,
2675
+ "header-height": a.value.headerHeight,
2676
+ "row-height": a.value.rowHeight,
2677
+ "row-class": f,
2678
+ "row-event-handlers": {
2679
+ onClick: w
2680
+ },
2681
+ "footer-height": i.value,
2682
+ "scrollbar-always-on": "",
2683
+ onScroll: y,
2684
+ onEndReached: S[0] || (S[0] = (_) => l(e.tableData.length - 1, "PageDown"))
2685
+ }, {
2686
+ empty: ze(() => [C(b, {
2687
+ description: "暂无数据",
2688
+ style: {
2689
+ height: "100%"
2690
+ }
2691
+ })]),
2692
+ footer: ze(() => [i.value ? (Pe(), ut("div", ml, [e.tableLoading === "more" ? (Pe(), ct(A, {
2693
+ key: 0
2694
+ }, {
2695
+ default: ze(() => [C(E, {
2696
+ type: "primary",
2697
+ text: "",
2698
+ loading: ""
2699
+ }, {
2700
+ default: ze(() => [Vt("正在加载更多数据")]),
2701
+ _: 1
2702
+ })]),
2703
+ _: 1
2704
+ })) : e.tableLoading === "all" ? (Pe(), ct(A, {
2705
+ key: 1
2706
+ }, {
2707
+ default: ze(() => [Vt(" 已无更多数据 ")]),
2708
+ _: 1
2709
+ })) : ht("", !0)])) : ht("", !0)]),
2710
+ _: 2
2711
+ }, 1032, ["data", "columns", "width", "height", "header-height", "row-height", "row-event-handlers", "footer-height"])]),
2712
+ _: 1
2713
+ });
2714
+ };
2715
+ }
2716
+ };
2717
+ const gl = /* @__PURE__ */ io(vl, [["__scopeId", "data-v-7e702a8a"]]), Il = {
2718
+ install(e) {
2719
+ e.component("st-virtualTable", gl);
2720
+ }
2721
+ };
2722
+ export {
2723
+ Il as default
2724
+ };