st-comp 0.0.147 → 0.0.148

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