st-comp 0.0.148 → 0.0.150

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 (150) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +5 -4
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +28 -24
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +577 -631
  8. package/es/Kline.cjs +1 -0
  9. package/es/Kline.js +1903 -0
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +677 -1428
  12. package/es/KlineNew.cjs +1 -3
  13. package/es/KlineNew.js +316 -2740
  14. package/es/Pagination.cjs +1 -1
  15. package/es/Pagination.js +60 -58
  16. package/es/PasswordPrompt.cjs +1 -0
  17. package/es/PasswordPrompt.js +13 -0
  18. package/es/Table.cjs +1 -1
  19. package/es/Table.js +102 -98
  20. package/es/User.cjs +1 -1
  21. package/es/User.js +397 -373
  22. package/es/VarietySearch.cjs +1 -1
  23. package/es/VarietySearch.js +2395 -1
  24. package/es/VirtualTable.cjs +5 -5
  25. package/es/VirtualTable.js +154 -151
  26. package/es/_initCloneObject-47814efa.cjs +1 -0
  27. package/es/{_initCloneObject-ec5c9523.js → _initCloneObject-e3d8a9ab.js} +13 -13
  28. package/es/base-0ca7c43a.cjs +5 -0
  29. package/es/base-19787dfb.js +303 -0
  30. package/es/{castArray-c770910d.js → castArray-8405000b.js} +1 -1
  31. package/es/castArray-a78ae889.cjs +1 -0
  32. package/es/{config-provider-feed0e8a.js → config-provider-0f6672af.js} +3 -3
  33. package/es/{config-provider-c87e277f.cjs → config-provider-cfbb9cd8.cjs} +1 -1
  34. package/es/{debounce-c64fb3b5.js → debounce-6cb0781f.js} +29 -29
  35. package/es/debounce-cf26af24.cjs +1 -0
  36. package/es/{dropdown-c9272ca3.js → dropdown-17b3ef6a.js} +4 -4
  37. package/es/{dropdown-6bdb3cf4.cjs → dropdown-790d31ea.cjs} +1 -1
  38. package/es/el-button-0bf1d532.js +236 -0
  39. package/es/el-button-62966947.cjs +1 -0
  40. package/es/el-checkbox-group-45247bbf.cjs +1 -0
  41. package/es/el-checkbox-group-d53bc316.js +67 -0
  42. package/es/el-empty-2ece1134.cjs +1 -0
  43. package/es/{el-empty-89a523ed.js → el-empty-bd5343a7.js} +10 -9
  44. package/es/{el-form-item-55d36086.js → el-form-item-05c0e335.js} +82 -81
  45. package/es/el-form-item-47e255d4.cjs +12 -0
  46. package/es/{el-input-cb528574.js → el-input-1e309239.js} +46 -45
  47. package/es/el-input-6a3805c5.cjs +1 -0
  48. package/es/{el-input-number-ce30bfa8.js → el-input-number-60ebc58f.js} +50 -48
  49. package/es/el-input-number-96ff2e47.cjs +1 -0
  50. package/es/el-menu-item-4c9eb7ad.cjs +1 -0
  51. package/es/el-menu-item-6c6236a1.js +772 -0
  52. package/es/{el-message-d51d032b.js → el-message-7d927756.js} +56 -55
  53. package/es/el-message-d5ed7a4f.cjs +1 -0
  54. package/es/el-overlay-26bf0945.js +521 -0
  55. package/es/el-overlay-41994f67.cjs +1 -0
  56. package/es/el-popover-17e2e66c.js +140 -0
  57. package/es/el-popover-7bd8a7c3.cjs +1 -0
  58. package/es/el-popper-7adbf1c6.cjs +1 -0
  59. package/es/{el-popper-f4b01f85.js → el-popper-b6527ae2.js} +217 -216
  60. package/es/{el-scrollbar-e8e93751.js → el-scrollbar-29bcab5f.js} +22 -22
  61. package/es/el-scrollbar-ac525239.cjs +1 -0
  62. package/es/el-select-31f8ac8a.cjs +1 -0
  63. package/es/{el-select-e71af2e6.js → el-select-7395562b.js} +42 -40
  64. package/es/el-table-column-47d80736.js +3804 -0
  65. package/es/el-table-column-bdc46568.cjs +14 -0
  66. package/es/{el-tag-d65768f4.js → el-tag-7414e0c7.js} +59 -58
  67. package/es/el-tag-9732314f.cjs +1 -0
  68. package/es/{index-da646183.cjs → index-1d85ba4b.cjs} +1 -1
  69. package/es/{index-92ba4292.js → index-273822d1.js} +26 -25
  70. package/es/index-2f958e56.cjs +3 -0
  71. package/es/index-375e8de4.cjs +5 -0
  72. package/es/{index-121e2861.js → index-621b092b.js} +3 -3
  73. package/es/index-657047bb.js +513 -0
  74. package/es/{index-18416440.cjs → index-65b4113e.cjs} +1 -1
  75. package/es/index-70372cdb.js +519 -0
  76. package/es/{use-form-common-props-4d37077d.js → index-72151b24.js} +151 -312
  77. package/es/index-9e6e8d03.cjs +1 -0
  78. package/es/index-ab96bbf4.js +156 -0
  79. package/es/index-afc88a4b.cjs +1 -0
  80. package/es/index-c066fe0d.js +82 -0
  81. package/es/index-ce3223db.cjs +1 -0
  82. package/es/{index-709675d5.js → index-dc22ffe4.js} +18 -18
  83. package/es/index-eea0bcb3.cjs +1 -0
  84. package/es/index.esm-8d9a2abe.js +2432 -0
  85. package/es/index.esm-94a95a2a.cjs +3 -0
  86. package/es/{raf-f55e0daa.js → raf-a532c514.js} +1 -1
  87. package/es/{raf-2d77cbbe.cjs → raf-f46caea0.cjs} +1 -1
  88. package/es/{scroll-c8ac196e.cjs → scroll-339681d4.cjs} +1 -1
  89. package/es/{scroll-ca84f80a.js → scroll-d787d648.js} +1 -1
  90. package/es/style.css +1 -1
  91. package/es/use-form-common-props-5ff2f51b.js +171 -0
  92. package/es/use-form-common-props-74a96df2.cjs +2 -0
  93. package/es/vnode-6a0c7411.js +14 -0
  94. package/es/vnode-b15eb11b.cjs +1 -0
  95. package/es/{zh-cn-414d7f0c.cjs → zh-cn-36f34912.cjs} +1 -1
  96. package/es/{zh-cn-23c8e0d1.js → zh-cn-f37255ae.js} +2 -2
  97. package/lib/bundle.js +1 -1
  98. package/lib/bundle.umd.cjs +206 -206
  99. package/lib/{index-ffeb163e.js → index-d0cb2fa2.js} +33754 -31705
  100. package/lib/{python-0ec8f68c.js → python-050ba5a4.js} +1 -1
  101. package/lib/style.css +1 -1
  102. package/package.json +1 -1
  103. package/packages/Kline/components/Contextmenu/index.vue +110 -0
  104. package/packages/Kline/components/Tips/index.vue +40 -0
  105. package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
  106. package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
  107. package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
  108. package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
  109. package/packages/Kline/componentsNew/Tips/index.vue +33 -0
  110. package/packages/Kline/formatKlineData.ts +109 -0
  111. package/packages/Kline/images/buy.svg +1 -0
  112. package/packages/Kline/images/pen.png +0 -0
  113. package/packages/Kline/images/sell.svg +1 -0
  114. package/packages/Kline/images/t.svg +1 -0
  115. package/packages/Kline/index.ts +16 -0
  116. package/packages/Kline/index.vue +891 -0
  117. package/packages/Kline/option.ts +539 -0
  118. package/packages/Kline/type.d.ts +219 -0
  119. package/packages/Kline/utils.ts +682 -0
  120. package/packages/PasswordPrompt/index.ts +8 -0
  121. package/packages/PasswordPrompt/index.vue +266 -0
  122. package/packages/User/index.vue +97 -58
  123. package/packages/index.ts +4 -0
  124. package/src/pages/Kline/index.vue +12 -0
  125. package/src/pages/PasswordPrompt/index.vue +12 -0
  126. package/src/router/routes.ts +10 -0
  127. package/es/_initCloneObject-476b02ce.cjs +0 -1
  128. package/es/base-6ccc8fc2.cjs +0 -9
  129. package/es/base-950bac7e.js +0 -816
  130. package/es/castArray-374558a5.cjs +0 -1
  131. package/es/debounce-a6b4f91b.cjs +0 -1
  132. package/es/el-button-b8f71c7d.cjs +0 -1
  133. package/es/el-button-d7b6eebd.js +0 -745
  134. package/es/el-empty-12eece57.cjs +0 -1
  135. package/es/el-form-item-ebbf096d.cjs +0 -12
  136. package/es/el-input-2c7e70a3.cjs +0 -1
  137. package/es/el-input-number-8e168e83.cjs +0 -1
  138. package/es/el-message-612c2346.cjs +0 -1
  139. package/es/el-overlay-07414277.js +0 -526
  140. package/es/el-overlay-fb255b83.cjs +0 -1
  141. package/es/el-popper-8360bd91.cjs +0 -1
  142. package/es/el-scrollbar-271142ad.cjs +0 -1
  143. package/es/el-select-2e71d4af.cjs +0 -1
  144. package/es/el-table-column-9fe79f05.cjs +0 -14
  145. package/es/el-table-column-dc562f14.js +0 -3933
  146. package/es/el-tag-930e7b32.cjs +0 -1
  147. package/es/index-0ed86daf.cjs +0 -3
  148. package/es/index-674d2fd7.cjs +0 -1
  149. package/es/index-aece600c.js +0 -81
  150. package/es/use-form-common-props-c1960844.cjs +0 -2
@@ -1,3933 +0,0 @@
1
- import { inject as re, computed as O, getCurrentInstance as oe, watch as pe, nextTick as Me, ref as k, toRaw as Yt, defineComponent as ae, useSlots as hl, openBlock as K, createBlock as Le, resolveDynamicComponent as Mt, unref as R, normalizeClass as H, withCtx as he, createElementVNode as te, withDirectives as Te, createElementBlock as X, isRef as je, withModifiers as st, vModelCheckbox as rt, renderSlot as xe, Fragment as it, createTextVNode as Be, toDisplayString as ke, createCommentVNode as Ce, normalizeStyle as We, provide as pl, toRefs as vl, mergeProps as bn, createVNode as be, render as qt, isVNode as yn, resolveComponent as we, resolveDirective as ml, renderList as Xt, onBeforeMount as gl, onMounted as Xe, onUpdated as Cn, onUnmounted as Wt, reactive as wn, h as A, watchEffect as Ie, onBeforeUnmount as bl, vShow as Qt, Comment as Sn } from "vue";
2
- import { b as Jt, E as Zt } from "./el-button-d7b6eebd.js";
3
- import { Q as xn, t as En, u as $t, f as kn, e as Bt, b as bt, o as yl, i as Ln, R as Rn, E as ft, g as Nn, h as Fn, K as Cl, y as Tn } from "./use-form-common-props-4d37077d.js";
4
- import { y as On, z as Mn, p as Wn, c as ht, m as $n, k as Bn, l as Hn, A as el, S as Pn, B as An, b as wl, C as Vn, a as tl, E as Ht, f as Sl } from "./el-popper-f4b01f85.js";
5
- import { A as Pt, V as xl, a2 as El, a7 as Kn, a as yt, a8 as zn, a9 as In, v as ve, l as Oe, J as Ne, p as Ee, q as At, S as ee, aa as He, H as Ue, u as ie, _ as Pe, b as kl, d as Dn, w as Vt, R as Kt, o as zt, y as _n, Z as Ge, e as Se, s as jn, C as ll, i as Ye, P as ut, c as Un, T as ze, M as qe } from "./base-950bac7e.js";
6
- import { a as vt, g as Ll } from "./index-aece600c.js";
7
- import { g as Gn, c as Yn, k as Rl, d as qn, e as Xn, b as Qn, i as Jn } from "./_initCloneObject-ec5c9523.js";
8
- import { b as Zn, i as eo, C as to } from "./el-tag-d65768f4.js";
9
- import { d as ct } from "./debounce-c64fb3b5.js";
10
- import { U as pt } from "./index-121e2861.js";
11
- import { r as lo } from "./raf-f55e0daa.js";
12
- import { u as nl, a as ol } from "./el-scrollbar-e8e93751.js";
13
- function no(e, t) {
14
- return On(Mn(e, t, Wn), e + "");
15
- }
16
- function oo(e, t, n) {
17
- if (!Pt(n))
18
- return !1;
19
- var l = typeof t;
20
- return (l == "number" ? ht(n) && xn(t, n.length) : l == "string" && t in n) ? xl(n[t], e) : !1;
21
- }
22
- function ao(e) {
23
- return no(function(t, n) {
24
- var l = -1, a = n.length, r = a > 1 ? n[a - 1] : void 0, i = a > 2 ? n[2] : void 0;
25
- for (r = e.length > 3 && typeof r == "function" ? (a--, r) : void 0, i && oo(n[0], n[1], i) && (r = a < 3 ? void 0 : r, a = 1), t = Object(t); ++l < a; ) {
26
- var o = n[l];
27
- o && e(t, o, l, r);
28
- }
29
- return t;
30
- });
31
- }
32
- var so = "[object Object]", ro = Function.prototype, io = Object.prototype, Nl = ro.toString, uo = io.hasOwnProperty, co = Nl.call(Object);
33
- function fo(e) {
34
- if (!El(e) || Kn(e) != so)
35
- return !1;
36
- var t = Gn(e);
37
- if (t === null)
38
- return !0;
39
- var n = uo.call(t, "constructor") && t.constructor;
40
- return typeof n == "function" && n instanceof n && Nl.call(n) == co;
41
- }
42
- function ho(e) {
43
- return function(t, n, l) {
44
- for (var a = -1, r = Object(t), i = l(t), o = i.length; o--; ) {
45
- var s = i[e ? o : ++a];
46
- if (n(r[s], s, r) === !1)
47
- break;
48
- }
49
- return t;
50
- };
51
- }
52
- var po = ho();
53
- const Fl = po;
54
- function vo(e, t) {
55
- return e && Fl(e, t, $n);
56
- }
57
- function mo(e, t) {
58
- return function(n, l) {
59
- if (n == null)
60
- return n;
61
- if (!ht(n))
62
- return e(n, l);
63
- for (var a = n.length, r = t ? a : -1, i = Object(n); (t ? r-- : ++r < a) && l(i[r], r, i) !== !1; )
64
- ;
65
- return n;
66
- };
67
- }
68
- var go = mo(vo);
69
- const bo = go;
70
- function Ct(e, t, n) {
71
- (n !== void 0 && !xl(e[t], n) || n === void 0 && !(t in e)) && En(e, t, n);
72
- }
73
- function yo(e) {
74
- return El(e) && ht(e);
75
- }
76
- function wt(e, t) {
77
- if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
78
- return e[t];
79
- }
80
- function Co(e) {
81
- return Yn(e, Rl(e));
82
- }
83
- function wo(e, t, n, l, a, r, i) {
84
- var o = wt(e, n), s = wt(t, n), u = i.get(s);
85
- if (u) {
86
- Ct(e, n, u);
87
- return;
88
- }
89
- var c = r ? r(o, s, n + "", e, t, i) : void 0, f = c === void 0;
90
- if (f) {
91
- var p = yt(s), g = !p && Bn(s), h = !p && !g && Hn(s);
92
- c = s, p || g || h ? yt(o) ? c = o : yo(o) ? c = qn(o) : g ? (f = !1, c = Xn(s, !0)) : h ? (f = !1, c = Qn(s, !0)) : c = [] : fo(s) || el(s) ? (c = o, el(o) ? c = Co(o) : (!Pt(o) || zn(o)) && (c = Jn(s))) : f = !1;
93
- }
94
- f && (i.set(s, c), a(c, s, l, r, i), i.delete(s)), Ct(e, n, c);
95
- }
96
- function Tl(e, t, n, l, a) {
97
- e !== t && Fl(t, function(r, i) {
98
- if (a || (a = new Pn()), Pt(r))
99
- wo(e, t, i, n, Tl, l, a);
100
- else {
101
- var o = l ? l(wt(e, i), r, i + "", e, t, a) : void 0;
102
- o === void 0 && (o = r), Ct(e, i, o);
103
- }
104
- }, Rl);
105
- }
106
- function So(e, t) {
107
- var n = -1, l = ht(e) ? Array(e.length) : [];
108
- return bo(e, function(a, r, i) {
109
- l[++n] = t(a, r, i);
110
- }), l;
111
- }
112
- function xo(e, t) {
113
- var n = yt(e) ? In : So;
114
- return n(e, Zn(t));
115
- }
116
- function Eo(e, t) {
117
- return An(xo(e, t), 1);
118
- }
119
- function Qe(e) {
120
- return e === null;
121
- }
122
- var ko = ao(function(e, t, n) {
123
- Tl(e, t, n);
124
- });
125
- const Ol = ko, Ml = {
126
- modelValue: {
127
- type: [Number, String, Boolean],
128
- default: void 0
129
- },
130
- label: {
131
- type: [String, Boolean, Number, Object],
132
- default: void 0
133
- },
134
- value: {
135
- type: [String, Boolean, Number, Object],
136
- default: void 0
137
- },
138
- indeterminate: Boolean,
139
- disabled: Boolean,
140
- checked: Boolean,
141
- name: {
142
- type: String,
143
- default: void 0
144
- },
145
- trueValue: {
146
- type: [String, Number],
147
- default: void 0
148
- },
149
- falseValue: {
150
- type: [String, Number],
151
- default: void 0
152
- },
153
- trueLabel: {
154
- type: [String, Number],
155
- default: void 0
156
- },
157
- falseLabel: {
158
- type: [String, Number],
159
- default: void 0
160
- },
161
- id: {
162
- type: String,
163
- default: void 0
164
- },
165
- border: Boolean,
166
- size: $t,
167
- tabindex: [String, Number],
168
- validateEvent: {
169
- type: Boolean,
170
- default: !0
171
- },
172
- ...wl(["ariaControls"])
173
- }, Wl = {
174
- [pt]: (e) => ve(e) || Oe(e) || Ne(e),
175
- change: (e) => ve(e) || Oe(e) || Ne(e)
176
- }, Ke = Symbol("checkboxGroupContextKey"), Lo = ({
177
- model: e,
178
- isChecked: t
179
- }) => {
180
- const n = re(Ke, void 0), l = O(() => {
181
- var r, i;
182
- const o = (r = n == null ? void 0 : n.max) == null ? void 0 : r.value, s = (i = n == null ? void 0 : n.min) == null ? void 0 : i.value;
183
- return !Ee(o) && e.value.length >= o && !t.value || !Ee(s) && e.value.length <= s && t.value;
184
- });
185
- return {
186
- isDisabled: kn(O(() => (n == null ? void 0 : n.disabled.value) || l.value)),
187
- isLimitDisabled: l
188
- };
189
- }, Ro = (e, {
190
- model: t,
191
- isLimitExceeded: n,
192
- hasOwnLabel: l,
193
- isDisabled: a,
194
- isLabeledByFormItem: r
195
- }) => {
196
- const i = re(Ke, void 0), { formItem: o } = Bt(), { emit: s } = oe();
197
- function u(h) {
198
- var y, b, C, L;
199
- return [!0, e.trueValue, e.trueLabel].includes(h) ? (b = (y = e.trueValue) != null ? y : e.trueLabel) != null ? b : !0 : (L = (C = e.falseValue) != null ? C : e.falseLabel) != null ? L : !1;
200
- }
201
- function c(h, y) {
202
- s("change", u(h), y);
203
- }
204
- function f(h) {
205
- if (n.value)
206
- return;
207
- const y = h.target;
208
- s("change", u(y.checked), h);
209
- }
210
- async function p(h) {
211
- n.value || !l.value && !a.value && r.value && (h.composedPath().some((C) => C.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Me(), c(t.value, h)));
212
- }
213
- const g = O(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent);
214
- return pe(() => e.modelValue, () => {
215
- g.value && (o == null || o.validate("change").catch((h) => At(h)));
216
- }), {
217
- handleChange: f,
218
- onClickRoot: p
219
- };
220
- }, No = (e) => {
221
- const t = k(!1), { emit: n } = oe(), l = re(Ke, void 0), a = O(() => Ee(l) === !1), r = k(!1), i = O({
222
- get() {
223
- var o, s;
224
- return a.value ? (o = l == null ? void 0 : l.modelValue) == null ? void 0 : o.value : (s = e.modelValue) != null ? s : t.value;
225
- },
226
- set(o) {
227
- var s, u;
228
- a.value && ee(o) ? (r.value = ((s = l == null ? void 0 : l.max) == null ? void 0 : s.value) !== void 0 && o.length > (l == null ? void 0 : l.max.value) && o.length > i.value.length, r.value === !1 && ((u = l == null ? void 0 : l.changeEvent) == null || u.call(l, o))) : (n(pt, o), t.value = o);
229
- }
230
- });
231
- return {
232
- model: i,
233
- isGroup: a,
234
- isLimitExceeded: r
235
- };
236
- }, Fo = (e, t, { model: n }) => {
237
- const l = re(Ke, void 0), a = k(!1), r = O(() => He(e.value) ? e.label : e.value), i = O(() => {
238
- const c = n.value;
239
- return Ne(c) ? c : ee(c) ? Ue(r.value) ? c.map(Yt).some((f) => eo(f, r.value)) : c.map(Yt).includes(r.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c;
240
- }), o = bt(O(() => {
241
- var c;
242
- return (c = l == null ? void 0 : l.size) == null ? void 0 : c.value;
243
- }), {
244
- prop: !0
245
- }), s = bt(O(() => {
246
- var c;
247
- return (c = l == null ? void 0 : l.size) == null ? void 0 : c.value;
248
- })), u = O(() => !!t.default || !He(r.value));
249
- return {
250
- checkboxButtonSize: o,
251
- isChecked: i,
252
- isFocused: a,
253
- checkboxSize: s,
254
- hasOwnLabel: u,
255
- actualValue: r
256
- };
257
- }, $l = (e, t) => {
258
- const { formItem: n } = Bt(), { model: l, isGroup: a, isLimitExceeded: r } = No(e), {
259
- isFocused: i,
260
- isChecked: o,
261
- checkboxButtonSize: s,
262
- checkboxSize: u,
263
- hasOwnLabel: c,
264
- actualValue: f
265
- } = Fo(e, t, { model: l }), { isDisabled: p } = Lo({ model: l, isChecked: o }), { inputId: g, isLabeledByFormItem: h } = yl(e, {
266
- formItemContext: n,
267
- disableIdGeneration: c,
268
- disableIdManagement: a
269
- }), { handleChange: y, onClickRoot: b } = Ro(e, {
270
- model: l,
271
- isLimitExceeded: r,
272
- hasOwnLabel: c,
273
- isDisabled: p,
274
- isLabeledByFormItem: h
275
- });
276
- return (() => {
277
- function L() {
278
- var x, d;
279
- ee(l.value) && !l.value.includes(f.value) ? l.value.push(f.value) : l.value = (d = (x = e.trueValue) != null ? x : e.trueLabel) != null ? d : !0;
280
- }
281
- e.checked && L();
282
- })(), vt({
283
- from: "label act as value",
284
- replacement: "value",
285
- version: "3.0.0",
286
- scope: "el-checkbox",
287
- ref: "https://element-plus.org/en-US/component/checkbox.html"
288
- }, O(() => a.value && He(e.value))), vt({
289
- from: "true-label",
290
- replacement: "true-value",
291
- version: "3.0.0",
292
- scope: "el-checkbox",
293
- ref: "https://element-plus.org/en-US/component/checkbox.html"
294
- }, O(() => !!e.trueLabel)), vt({
295
- from: "false-label",
296
- replacement: "false-value",
297
- version: "3.0.0",
298
- scope: "el-checkbox",
299
- ref: "https://element-plus.org/en-US/component/checkbox.html"
300
- }, O(() => !!e.falseLabel)), {
301
- inputId: g,
302
- isLabeledByFormItem: h,
303
- isChecked: o,
304
- isDisabled: p,
305
- isFocused: i,
306
- checkboxButtonSize: s,
307
- checkboxSize: u,
308
- hasOwnLabel: c,
309
- model: l,
310
- actualValue: f,
311
- handleChange: y,
312
- onClickRoot: b
313
- };
314
- }, To = ae({
315
- name: "ElCheckbox"
316
- }), Oo = /* @__PURE__ */ ae({
317
- ...To,
318
- props: Ml,
319
- emits: Wl,
320
- setup(e) {
321
- const t = e, n = hl(), {
322
- inputId: l,
323
- isLabeledByFormItem: a,
324
- isChecked: r,
325
- isDisabled: i,
326
- isFocused: o,
327
- checkboxSize: s,
328
- hasOwnLabel: u,
329
- model: c,
330
- actualValue: f,
331
- handleChange: p,
332
- onClickRoot: g
333
- } = $l(t, n), h = ie("checkbox"), y = O(() => [
334
- h.b(),
335
- h.m(s.value),
336
- h.is("disabled", i.value),
337
- h.is("bordered", t.border),
338
- h.is("checked", r.value)
339
- ]), b = O(() => [
340
- h.e("input"),
341
- h.is("disabled", i.value),
342
- h.is("checked", r.value),
343
- h.is("indeterminate", t.indeterminate),
344
- h.is("focus", o.value)
345
- ]);
346
- return (C, L) => (K(), Le(Mt(!R(u) && R(a) ? "span" : "label"), {
347
- class: H(R(y)),
348
- "aria-controls": C.indeterminate ? C.ariaControls : null,
349
- onClick: R(g)
350
- }, {
351
- default: he(() => {
352
- var x, d, v, w;
353
- return [
354
- te("span", {
355
- class: H(R(b))
356
- }, [
357
- C.trueValue || C.falseValue || C.trueLabel || C.falseLabel ? Te((K(), X("input", {
358
- key: 0,
359
- id: R(l),
360
- "onUpdate:modelValue": (m) => je(c) ? c.value = m : null,
361
- class: H(R(h).e("original")),
362
- type: "checkbox",
363
- indeterminate: C.indeterminate,
364
- name: C.name,
365
- tabindex: C.tabindex,
366
- disabled: R(i),
367
- "true-value": (d = (x = C.trueValue) != null ? x : C.trueLabel) != null ? d : !0,
368
- "false-value": (w = (v = C.falseValue) != null ? v : C.falseLabel) != null ? w : !1,
369
- onChange: R(p),
370
- onFocus: (m) => o.value = !0,
371
- onBlur: (m) => o.value = !1,
372
- onClick: st(() => {
373
- }, ["stop"])
374
- }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
375
- [rt, R(c)]
376
- ]) : Te((K(), X("input", {
377
- key: 1,
378
- id: R(l),
379
- "onUpdate:modelValue": (m) => je(c) ? c.value = m : null,
380
- class: H(R(h).e("original")),
381
- type: "checkbox",
382
- indeterminate: C.indeterminate,
383
- disabled: R(i),
384
- value: R(f),
385
- name: C.name,
386
- tabindex: C.tabindex,
387
- onChange: R(p),
388
- onFocus: (m) => o.value = !0,
389
- onBlur: (m) => o.value = !1,
390
- onClick: st(() => {
391
- }, ["stop"])
392
- }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
393
- [rt, R(c)]
394
- ]),
395
- te("span", {
396
- class: H(R(h).e("inner"))
397
- }, null, 2)
398
- ], 2),
399
- R(u) ? (K(), X("span", {
400
- key: 0,
401
- class: H(R(h).e("label"))
402
- }, [
403
- xe(C.$slots, "default"),
404
- C.$slots.default ? Ce("v-if", !0) : (K(), X(it, { key: 0 }, [
405
- Be(ke(C.label), 1)
406
- ], 64))
407
- ], 2)) : Ce("v-if", !0)
408
- ];
409
- }),
410
- _: 3
411
- }, 8, ["class", "aria-controls", "onClick"]));
412
- }
413
- });
414
- var Mo = /* @__PURE__ */ Pe(Oo, [["__file", "checkbox.vue"]]);
415
- const Wo = ae({
416
- name: "ElCheckboxButton"
417
- }), $o = /* @__PURE__ */ ae({
418
- ...Wo,
419
- props: Ml,
420
- emits: Wl,
421
- setup(e) {
422
- const t = e, n = hl(), {
423
- isFocused: l,
424
- isChecked: a,
425
- isDisabled: r,
426
- checkboxButtonSize: i,
427
- model: o,
428
- actualValue: s,
429
- handleChange: u
430
- } = $l(t, n), c = re(Ke, void 0), f = ie("checkbox"), p = O(() => {
431
- var h, y, b, C;
432
- const L = (y = (h = c == null ? void 0 : c.fill) == null ? void 0 : h.value) != null ? y : "";
433
- return {
434
- backgroundColor: L,
435
- borderColor: L,
436
- color: (C = (b = c == null ? void 0 : c.textColor) == null ? void 0 : b.value) != null ? C : "",
437
- boxShadow: L ? `-1px 0 0 0 ${L}` : void 0
438
- };
439
- }), g = O(() => [
440
- f.b("button"),
441
- f.bm("button", i.value),
442
- f.is("disabled", r.value),
443
- f.is("checked", a.value),
444
- f.is("focus", l.value)
445
- ]);
446
- return (h, y) => {
447
- var b, C, L, x;
448
- return K(), X("label", {
449
- class: H(R(g))
450
- }, [
451
- h.trueValue || h.falseValue || h.trueLabel || h.falseLabel ? Te((K(), X("input", {
452
- key: 0,
453
- "onUpdate:modelValue": (d) => je(o) ? o.value = d : null,
454
- class: H(R(f).be("button", "original")),
455
- type: "checkbox",
456
- name: h.name,
457
- tabindex: h.tabindex,
458
- disabled: R(r),
459
- "true-value": (C = (b = h.trueValue) != null ? b : h.trueLabel) != null ? C : !0,
460
- "false-value": (x = (L = h.falseValue) != null ? L : h.falseLabel) != null ? x : !1,
461
- onChange: R(u),
462
- onFocus: (d) => l.value = !0,
463
- onBlur: (d) => l.value = !1,
464
- onClick: st(() => {
465
- }, ["stop"])
466
- }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
467
- [rt, R(o)]
468
- ]) : Te((K(), X("input", {
469
- key: 1,
470
- "onUpdate:modelValue": (d) => je(o) ? o.value = d : null,
471
- class: H(R(f).be("button", "original")),
472
- type: "checkbox",
473
- name: h.name,
474
- tabindex: h.tabindex,
475
- disabled: R(r),
476
- value: R(s),
477
- onChange: R(u),
478
- onFocus: (d) => l.value = !0,
479
- onBlur: (d) => l.value = !1,
480
- onClick: st(() => {
481
- }, ["stop"])
482
- }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
483
- [rt, R(o)]
484
- ]),
485
- h.$slots.default || h.label ? (K(), X("span", {
486
- key: 2,
487
- class: H(R(f).be("button", "inner")),
488
- style: We(R(a) ? R(p) : void 0)
489
- }, [
490
- xe(h.$slots, "default", {}, () => [
491
- Be(ke(h.label), 1)
492
- ])
493
- ], 6)) : Ce("v-if", !0)
494
- ], 2);
495
- };
496
- }
497
- });
498
- var Bl = /* @__PURE__ */ Pe($o, [["__file", "checkbox-button.vue"]]);
499
- const Bo = kl({
500
- modelValue: {
501
- type: Dn(Array),
502
- default: () => []
503
- },
504
- disabled: Boolean,
505
- min: Number,
506
- max: Number,
507
- size: $t,
508
- fill: String,
509
- textColor: String,
510
- tag: {
511
- type: String,
512
- default: "div"
513
- },
514
- validateEvent: {
515
- type: Boolean,
516
- default: !0
517
- },
518
- ...wl(["ariaLabel"])
519
- }), Ho = {
520
- [pt]: (e) => ee(e),
521
- change: (e) => ee(e)
522
- }, Po = ae({
523
- name: "ElCheckboxGroup"
524
- }), Ao = /* @__PURE__ */ ae({
525
- ...Po,
526
- props: Bo,
527
- emits: Ho,
528
- setup(e, { emit: t }) {
529
- const n = e, l = ie("checkbox"), { formItem: a } = Bt(), { inputId: r, isLabeledByFormItem: i } = yl(n, {
530
- formItemContext: a
531
- }), o = async (u) => {
532
- t(pt, u), await Me(), t("change", u);
533
- }, s = O({
534
- get() {
535
- return n.modelValue;
536
- },
537
- set(u) {
538
- o(u);
539
- }
540
- });
541
- return pl(Ke, {
542
- ...Vn(vl(n), [
543
- "size",
544
- "min",
545
- "max",
546
- "disabled",
547
- "validateEvent",
548
- "fill",
549
- "textColor"
550
- ]),
551
- modelValue: s,
552
- changeEvent: o
553
- }), pe(() => n.modelValue, () => {
554
- n.validateEvent && (a == null || a.validate("change").catch((u) => At(u)));
555
- }), (u, c) => {
556
- var f;
557
- return K(), Le(Mt(u.tag), {
558
- id: R(r),
559
- class: H(R(l).b("group")),
560
- role: "group",
561
- "aria-label": R(i) ? void 0 : u.ariaLabel || "checkbox-group",
562
- "aria-labelledby": R(i) ? (f = R(a)) == null ? void 0 : f.labelId : void 0
563
- }, {
564
- default: he(() => [
565
- xe(u.$slots, "default")
566
- ]),
567
- _: 3
568
- }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
569
- };
570
- }
571
- });
572
- var Hl = /* @__PURE__ */ Pe(Ao, [["__file", "checkbox-group.vue"]]);
573
- const Ae = Vt(Mo, {
574
- CheckboxButton: Bl,
575
- CheckboxGroup: Hl
576
- });
577
- Kt(Bl);
578
- const fs = Kt(Hl), Vo = kl({
579
- title: String,
580
- confirmButtonText: String,
581
- cancelButtonText: String,
582
- confirmButtonType: {
583
- type: String,
584
- values: Jt,
585
- default: "primary"
586
- },
587
- cancelButtonType: {
588
- type: String,
589
- values: Jt,
590
- default: "text"
591
- },
592
- icon: {
593
- type: Ln,
594
- default: () => Rn
595
- },
596
- iconColor: {
597
- type: String,
598
- default: "#f90"
599
- },
600
- hideIcon: {
601
- type: Boolean,
602
- default: !1
603
- },
604
- hideAfter: {
605
- type: Number,
606
- default: 200
607
- },
608
- teleported: tl.teleported,
609
- persistent: tl.persistent,
610
- width: {
611
- type: [String, Number],
612
- default: 150
613
- }
614
- }), Ko = {
615
- confirm: (e) => e instanceof MouseEvent,
616
- cancel: (e) => e instanceof MouseEvent
617
- }, zo = ae({
618
- name: "ElPopconfirm"
619
- }), Io = /* @__PURE__ */ ae({
620
- ...zo,
621
- props: Vo,
622
- emits: Ko,
623
- setup(e, { emit: t }) {
624
- const n = e, { t: l } = zt(), a = ie("popconfirm"), r = k(), i = () => {
625
- var p, g;
626
- (g = (p = r.value) == null ? void 0 : p.onClose) == null || g.call(p);
627
- }, o = O(() => ({
628
- width: _n(n.width)
629
- })), s = (p) => {
630
- t("confirm", p), i();
631
- }, u = (p) => {
632
- t("cancel", p), i();
633
- }, c = O(() => n.confirmButtonText || l("el.popconfirm.confirmButtonText")), f = O(() => n.cancelButtonText || l("el.popconfirm.cancelButtonText"));
634
- return (p, g) => (K(), Le(R(Ht), bn({
635
- ref_key: "tooltipRef",
636
- ref: r,
637
- trigger: "click",
638
- effect: "light"
639
- }, p.$attrs, {
640
- "popper-class": `${R(a).namespace.value}-popover`,
641
- "popper-style": R(o),
642
- teleported: p.teleported,
643
- "fallback-placements": ["bottom", "top", "right", "left"],
644
- "hide-after": p.hideAfter,
645
- persistent: p.persistent
646
- }), {
647
- content: he(() => [
648
- te("div", {
649
- class: H(R(a).b())
650
- }, [
651
- te("div", {
652
- class: H(R(a).e("main"))
653
- }, [
654
- !p.hideIcon && p.icon ? (K(), Le(R(ft), {
655
- key: 0,
656
- class: H(R(a).e("icon")),
657
- style: We({ color: p.iconColor })
658
- }, {
659
- default: he(() => [
660
- (K(), Le(Mt(p.icon)))
661
- ]),
662
- _: 1
663
- }, 8, ["class", "style"])) : Ce("v-if", !0),
664
- Be(" " + ke(p.title), 1)
665
- ], 2),
666
- te("div", {
667
- class: H(R(a).e("action"))
668
- }, [
669
- xe(p.$slots, "actions", {
670
- confirm: s,
671
- cancel: u
672
- }, () => [
673
- be(R(Zt), {
674
- size: "small",
675
- type: p.cancelButtonType === "text" ? "" : p.cancelButtonType,
676
- text: p.cancelButtonType === "text",
677
- onClick: u
678
- }, {
679
- default: he(() => [
680
- Be(ke(R(f)), 1)
681
- ]),
682
- _: 1
683
- }, 8, ["type", "text"]),
684
- be(R(Zt), {
685
- size: "small",
686
- type: p.confirmButtonType === "text" ? "" : p.confirmButtonType,
687
- text: p.confirmButtonType === "text",
688
- onClick: s
689
- }, {
690
- default: he(() => [
691
- Be(ke(R(c)), 1)
692
- ]),
693
- _: 1
694
- }, 8, ["type", "text"])
695
- ])
696
- ], 2)
697
- ], 2)
698
- ]),
699
- default: he(() => [
700
- p.$slots.reference ? xe(p.$slots, "reference", { key: 0 }) : Ce("v-if", !0)
701
- ]),
702
- _: 3
703
- }, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
704
- }
705
- });
706
- var Do = /* @__PURE__ */ Pe(Io, [["__file", "popconfirm.vue"]]);
707
- const hs = Vt(Do), mt = function(e) {
708
- var t;
709
- return (t = e.target) == null ? void 0 : t.closest("td");
710
- }, _o = function(e, t, n, l, a) {
711
- if (!t && !l && (!a || ee(a) && !a.length))
712
- return e;
713
- ve(n) ? n = n === "descending" ? -1 : 1 : n = n && n < 0 ? -1 : 1;
714
- const r = l ? null : function(o, s) {
715
- return a ? (ee(a) || (a = [a]), a.map((u) => ve(u) ? ll(o, u) : u(o, s, e))) : (t !== "$key" && Ue(o) && "$value" in o && (o = o.$value), [Ue(o) ? ll(o, t) : o]);
716
- }, i = function(o, s) {
717
- if (l)
718
- return l(o.value, s.value);
719
- for (let u = 0, c = o.key.length; u < c; u++) {
720
- if (o.key[u] < s.key[u])
721
- return -1;
722
- if (o.key[u] > s.key[u])
723
- return 1;
724
- }
725
- return 0;
726
- };
727
- return e.map((o, s) => ({
728
- value: o,
729
- index: s,
730
- key: r ? r(o, s) : null
731
- })).sort((o, s) => {
732
- let u = i(o, s);
733
- return u || (u = o.index - s.index), u * +n;
734
- }).map((o) => o.value);
735
- }, Pl = function(e, t) {
736
- let n = null;
737
- return e.columns.forEach((l) => {
738
- l.id === t && (n = l);
739
- }), n;
740
- }, jo = function(e, t) {
741
- let n = null;
742
- for (let l = 0; l < e.columns.length; l++) {
743
- const a = e.columns[l];
744
- if (a.columnKey === t) {
745
- n = a;
746
- break;
747
- }
748
- }
749
- return n || jn("ElTable", `No column matching with column-key: ${t}`), n;
750
- }, al = function(e, t, n) {
751
- const l = (t.className || "").match(new RegExp(`${n}-table_[^\\s]+`, "gm"));
752
- return l ? Pl(e, l[0]) : null;
753
- }, ne = (e, t) => {
754
- if (!e)
755
- throw new Error("Row is required when get row identity");
756
- if (ve(t)) {
757
- if (!t.includes("."))
758
- return `${e[t]}`;
759
- const n = t.split(".");
760
- let l = e;
761
- for (const a of n)
762
- l = l[a];
763
- return `${l}`;
764
- } else if (Se(t))
765
- return t.call(null, e);
766
- }, De = function(e, t) {
767
- const n = {};
768
- return (e || []).forEach((l, a) => {
769
- n[ne(l, t)] = { row: l, index: a };
770
- }), n;
771
- };
772
- function Uo(e, t) {
773
- const n = {};
774
- let l;
775
- for (l in e)
776
- n[l] = e[l];
777
- for (l in t)
778
- if (Ge(t, l)) {
779
- const a = t[l];
780
- Ee(a) || (n[l] = a);
781
- }
782
- return n;
783
- }
784
- function It(e) {
785
- return e === "" || Ee(e) || (e = Number.parseInt(e, 10), Number.isNaN(e) && (e = "")), e;
786
- }
787
- function Al(e) {
788
- return e === "" || Ee(e) || (e = It(e), Number.isNaN(e) && (e = 80)), e;
789
- }
790
- function Go(e) {
791
- return Oe(e) ? e : ve(e) ? /^\d+(?:px)?$/.test(e) ? Number.parseInt(e, 10) : e : null;
792
- }
793
- function Yo(...e) {
794
- return e.length === 0 ? (t) => t : e.length === 1 ? e[0] : e.reduce((t, n) => (...l) => t(n(...l)));
795
- }
796
- function dt(e, t, n, l, a, r) {
797
- let i = r ?? 0, o = !1;
798
- const s = e.indexOf(t), u = s !== -1, c = a == null ? void 0 : a.call(null, t, i), f = (g) => {
799
- g === "add" ? e.push(t) : e.splice(s, 1), o = !0;
800
- }, p = (g) => {
801
- let h = 0;
802
- const y = (l == null ? void 0 : l.children) && g[l.children];
803
- return y && ee(y) && (h += y.length, y.forEach((b) => {
804
- h += p(b);
805
- })), h;
806
- };
807
- return (!a || c) && (Ne(n) ? n && !u ? f("add") : !n && u && f("remove") : f(u ? "remove" : "add")), !(l != null && l.checkStrictly) && (l != null && l.children) && ee(t[l.children]) && t[l.children].forEach((g) => {
808
- const h = dt(e, g, n ?? !u, l, a, i + 1);
809
- i += p(g) + 1, h && (o = h);
810
- }), o;
811
- }
812
- function qo(e, t, n = "children", l = "hasChildren") {
813
- const a = (i) => !(ee(i) && i.length);
814
- function r(i, o, s) {
815
- t(i, o, s), o.forEach((u) => {
816
- if (u[l]) {
817
- t(u, null, s + 1);
818
- return;
819
- }
820
- const c = u[n];
821
- a(c) || r(u, c, s + 1);
822
- });
823
- }
824
- e.forEach((i) => {
825
- if (i[l]) {
826
- t(i, null, 0);
827
- return;
828
- }
829
- const o = i[n];
830
- a(o) || r(i, o, 0);
831
- });
832
- }
833
- const Xo = (e, t, n, l) => {
834
- const a = {
835
- strategy: "fixed",
836
- ...e.popperOptions
837
- }, r = Se(l.tooltipFormatter) ? l.tooltipFormatter({
838
- row: n,
839
- column: l,
840
- cellValue: Ll(n, l.property).value
841
- }) : void 0;
842
- return yn(r) ? {
843
- slotContent: r,
844
- content: null,
845
- ...e,
846
- popperOptions: a
847
- } : {
848
- slotContent: null,
849
- content: r ?? t,
850
- ...e,
851
- popperOptions: a
852
- };
853
- };
854
- let fe = null;
855
- function Qo(e, t, n, l, a, r) {
856
- const i = Xo(e, t, n, l), o = {
857
- ...i,
858
- slotContent: void 0
859
- };
860
- if ((fe == null ? void 0 : fe.trigger) === a) {
861
- const g = fe.vm.component;
862
- Ol(g.props, o), i.slotContent && (g.slots.content = () => [i.slotContent]);
863
- return;
864
- }
865
- fe == null || fe();
866
- const s = r == null ? void 0 : r.refs.tableWrapper, u = s == null ? void 0 : s.dataset.prefix, c = be(Ht, {
867
- virtualTriggering: !0,
868
- virtualRef: a,
869
- appendTo: s,
870
- placement: "top",
871
- transition: "none",
872
- offset: 0,
873
- hideAfter: 0,
874
- ...o
875
- }, i.slotContent ? {
876
- content: () => i.slotContent
877
- } : void 0);
878
- c.appContext = { ...r.appContext, ...r };
879
- const f = document.createElement("div");
880
- qt(c, f), c.component.exposed.onOpen();
881
- const p = s == null ? void 0 : s.querySelector(`.${u}-scrollbar__wrap`);
882
- fe = () => {
883
- qt(null, f), p == null || p.removeEventListener("scroll", fe), fe = null;
884
- }, fe.trigger = a, fe.vm = c, p == null || p.addEventListener("scroll", fe);
885
- }
886
- function Vl(e) {
887
- return e.children ? Eo(e.children, Vl) : [e];
888
- }
889
- function sl(e, t) {
890
- return e + t.colSpan;
891
- }
892
- const Kl = (e, t, n, l) => {
893
- let a = 0, r = e;
894
- const i = n.states.columns.value;
895
- if (l) {
896
- const s = Vl(l[e]);
897
- a = i.slice(0, i.indexOf(s[0])).reduce(sl, 0), r = a + s.reduce(sl, 0) - 1;
898
- } else
899
- a = e;
900
- let o;
901
- switch (t) {
902
- case "left":
903
- r < n.states.fixedLeafColumnsLength.value && (o = "left");
904
- break;
905
- case "right":
906
- a >= i.length - n.states.rightFixedLeafColumnsLength.value && (o = "right");
907
- break;
908
- default:
909
- r < n.states.fixedLeafColumnsLength.value ? o = "left" : a >= i.length - n.states.rightFixedLeafColumnsLength.value && (o = "right");
910
- }
911
- return o ? {
912
- direction: o,
913
- start: a,
914
- after: r
915
- } : {};
916
- }, Dt = (e, t, n, l, a, r = 0) => {
917
- const i = [], { direction: o, start: s, after: u } = Kl(t, n, l, a);
918
- if (o) {
919
- const c = o === "left";
920
- i.push(`${e}-fixed-column--${o}`), c && u + r === l.states.fixedLeafColumnsLength.value - 1 ? i.push("is-last-column") : !c && s - r === l.states.columns.value.length - l.states.rightFixedLeafColumnsLength.value && i.push("is-first-column");
921
- }
922
- return i;
923
- };
924
- function rl(e, t) {
925
- return e + (Qe(t.realWidth) || Number.isNaN(t.realWidth) ? Number(t.width) : t.realWidth);
926
- }
927
- const _t = (e, t, n, l) => {
928
- const {
929
- direction: a,
930
- start: r = 0,
931
- after: i = 0
932
- } = Kl(e, t, n, l);
933
- if (!a)
934
- return;
935
- const o = {}, s = a === "left", u = n.states.columns.value;
936
- return s ? o.left = u.slice(0, r).reduce(rl, 0) : o.right = u.slice(i + 1).reverse().reduce(rl, 0), o;
937
- }, Ve = (e, t) => {
938
- e && (Number.isNaN(e[t]) || (e[t] = `${e[t]}px`));
939
- };
940
- function Jo(e) {
941
- const t = oe(), n = k(!1), l = k([]);
942
- return {
943
- updateExpandRows: () => {
944
- const s = e.data.value || [], u = e.rowKey.value;
945
- if (n.value)
946
- l.value = s.slice();
947
- else if (u) {
948
- const c = De(l.value, u);
949
- l.value = s.reduce((f, p) => {
950
- const g = ne(p, u);
951
- return c[g] && f.push(p), f;
952
- }, []);
953
- } else
954
- l.value = [];
955
- },
956
- toggleRowExpansion: (s, u) => {
957
- dt(l.value, s, u) && t.emit("expand-change", s, l.value.slice());
958
- },
959
- setExpandRowKeys: (s) => {
960
- t.store.assertRowKey();
961
- const u = e.data.value || [], c = e.rowKey.value, f = De(u, c);
962
- l.value = s.reduce((p, g) => {
963
- const h = f[g];
964
- return h && p.push(h.row), p;
965
- }, []);
966
- },
967
- isRowExpanded: (s) => {
968
- const u = e.rowKey.value;
969
- return u ? !!De(l.value, u)[ne(s, u)] : l.value.includes(s);
970
- },
971
- states: {
972
- expandRows: l,
973
- defaultExpandAll: n
974
- }
975
- };
976
- }
977
- function Zo(e) {
978
- const t = oe(), n = k(null), l = k(null), a = (u) => {
979
- t.store.assertRowKey(), n.value = u, i(u);
980
- }, r = () => {
981
- n.value = null;
982
- }, i = (u) => {
983
- const { data: c, rowKey: f } = e;
984
- let p = null;
985
- f.value && (p = (R(c) || []).find((g) => ne(g, f.value) === u)), l.value = p, t.emit("current-change", l.value, null);
986
- };
987
- return {
988
- setCurrentRowKey: a,
989
- restoreCurrentRowKey: r,
990
- setCurrentRowByKey: i,
991
- updateCurrentRow: (u) => {
992
- const c = l.value;
993
- if (u && u !== c) {
994
- l.value = u, t.emit("current-change", l.value, c);
995
- return;
996
- }
997
- !u && c && (l.value = null, t.emit("current-change", null, c));
998
- },
999
- updateCurrentRowData: () => {
1000
- const u = e.rowKey.value, c = e.data.value || [], f = l.value;
1001
- if (!c.includes(f) && f) {
1002
- if (u) {
1003
- const p = ne(f, u);
1004
- i(p);
1005
- } else
1006
- l.value = null;
1007
- Qe(l.value) && t.emit("current-change", null, f);
1008
- } else
1009
- n.value && (i(n.value), r());
1010
- },
1011
- states: {
1012
- _currentRowKey: n,
1013
- currentRow: l
1014
- }
1015
- };
1016
- }
1017
- function ea(e) {
1018
- const t = k([]), n = k({}), l = k(16), a = k(!1), r = k({}), i = k("hasChildren"), o = k("children"), s = k(!1), u = oe(), c = O(() => {
1019
- if (!e.rowKey.value)
1020
- return {};
1021
- const d = e.data.value || [];
1022
- return p(d);
1023
- }), f = O(() => {
1024
- const d = e.rowKey.value, v = Object.keys(r.value), w = {};
1025
- return v.length && v.forEach((m) => {
1026
- if (r.value[m].length) {
1027
- const E = { children: [] };
1028
- r.value[m].forEach((N) => {
1029
- const W = ne(N, d);
1030
- E.children.push(W), N[i.value] && !w[W] && (w[W] = { children: [] });
1031
- }), w[m] = E;
1032
- }
1033
- }), w;
1034
- }), p = (d) => {
1035
- const v = e.rowKey.value, w = {};
1036
- return qo(d, (m, E, N) => {
1037
- const W = ne(m, v);
1038
- ee(E) ? w[W] = {
1039
- children: E.map((z) => ne(z, v)),
1040
- level: N
1041
- } : a.value && (w[W] = {
1042
- children: [],
1043
- lazy: !0,
1044
- level: N
1045
- });
1046
- }, o.value, i.value), w;
1047
- }, g = (d = !1, v = ((w) => (w = u.store) == null ? void 0 : w.states.defaultExpandAll.value)()) => {
1048
- var w;
1049
- const m = c.value, E = f.value, N = Object.keys(m), W = {};
1050
- if (N.length) {
1051
- const z = R(n), B = [], D = (V, _) => {
1052
- if (d)
1053
- return t.value ? v || t.value.includes(_) : !!(v || V != null && V.expanded);
1054
- {
1055
- const G = v || t.value && t.value.includes(_);
1056
- return !!(V != null && V.expanded || G);
1057
- }
1058
- };
1059
- N.forEach((V) => {
1060
- const _ = z[V], G = { ...m[V] };
1061
- if (G.expanded = D(_, V), G.lazy) {
1062
- const { loaded: T = !1, loading: S = !1 } = _ || {};
1063
- G.loaded = !!T, G.loading = !!S, B.push(V);
1064
- }
1065
- W[V] = G;
1066
- });
1067
- const U = Object.keys(E);
1068
- a.value && U.length && B.length && U.forEach((V) => {
1069
- const _ = z[V], G = E[V].children;
1070
- if (B.includes(V)) {
1071
- if (W[V].children.length !== 0)
1072
- throw new Error("[ElTable]children must be an empty array.");
1073
- W[V].children = G;
1074
- } else {
1075
- const { loaded: T = !1, loading: S = !1 } = _ || {};
1076
- W[V] = {
1077
- lazy: !0,
1078
- loaded: !!T,
1079
- loading: !!S,
1080
- expanded: D(_, V),
1081
- children: G,
1082
- level: ""
1083
- };
1084
- }
1085
- });
1086
- }
1087
- n.value = W, (w = u.store) == null || w.updateTableScrollY();
1088
- };
1089
- pe(() => t.value, () => {
1090
- g(!0);
1091
- }), pe(() => c.value, () => {
1092
- g();
1093
- }), pe(() => f.value, () => {
1094
- g();
1095
- });
1096
- const h = (d) => {
1097
- t.value = d, g();
1098
- }, y = (d) => a.value && d && "loaded" in d && !d.loaded, b = (d, v) => {
1099
- u.store.assertRowKey();
1100
- const w = e.rowKey.value, m = ne(d, w), E = m && n.value[m];
1101
- if (m && E && "expanded" in E) {
1102
- const N = E.expanded;
1103
- v = Ee(v) ? !E.expanded : v, n.value[m].expanded = v, N !== v && u.emit("expand-change", d, v), y(E) && L(d, m, E), u.store.updateTableScrollY();
1104
- }
1105
- }, C = (d) => {
1106
- u.store.assertRowKey();
1107
- const v = e.rowKey.value, w = ne(d, v), m = n.value[w];
1108
- y(m) ? L(d, w, m) : b(d, void 0);
1109
- }, L = (d, v, w) => {
1110
- const { load: m } = u.props;
1111
- m && !n.value[v].loaded && (n.value[v].loading = !0, m(d, w, (E) => {
1112
- if (!ee(E))
1113
- throw new TypeError("[ElTable] data must be an array");
1114
- n.value[v].loading = !1, n.value[v].loaded = !0, n.value[v].expanded = !0, E.length && (r.value[v] = E), u.emit("expand-change", d, !0);
1115
- }));
1116
- };
1117
- return {
1118
- loadData: L,
1119
- loadOrToggle: C,
1120
- toggleTreeExpansion: b,
1121
- updateTreeExpandKeys: h,
1122
- updateTreeData: g,
1123
- updateKeyChildren: (d, v) => {
1124
- const { lazy: w, rowKey: m } = u.props;
1125
- if (w) {
1126
- if (!m)
1127
- throw new Error("[Table] rowKey is required in updateKeyChild");
1128
- r.value[d] && (r.value[d] = v);
1129
- }
1130
- },
1131
- normalize: p,
1132
- states: {
1133
- expandRowKeys: t,
1134
- treeData: n,
1135
- indent: l,
1136
- lazy: a,
1137
- lazyTreeNodeMap: r,
1138
- lazyColumnIdentifier: i,
1139
- childrenColumnName: o,
1140
- checkStrictly: s
1141
- }
1142
- };
1143
- }
1144
- const ta = (e, t) => {
1145
- const n = t.sortingColumn;
1146
- return !n || ve(n.sortable) ? e : _o(e, t.sortProp, t.sortOrder, n.sortMethod, n.sortBy);
1147
- }, lt = (e) => {
1148
- const t = [];
1149
- return e.forEach((n) => {
1150
- n.children && n.children.length > 0 ? t.push.apply(t, lt(n.children)) : t.push(n);
1151
- }), t;
1152
- };
1153
- function la() {
1154
- var e;
1155
- const t = oe(), { size: n } = vl((e = t.proxy) == null ? void 0 : e.$props), l = k(null), a = k([]), r = k([]), i = k(!1), o = k([]), s = k([]), u = k([]), c = k([]), f = k([]), p = k([]), g = k([]), h = k([]), y = [], b = k(0), C = k(0), L = k(0), x = k(!1), d = k([]), v = k(!1), w = k(!1), m = k(null), E = k({}), N = k(null), W = k(null), z = k(null), B = k(null), D = k(null), U = O(() => l.value ? De(d.value, l.value) : void 0);
1156
- pe(a, () => {
1157
- var F;
1158
- t.state && (T(!1), t.props.tableLayout === "auto" && ((F = t.refs.tableHeaderRef) == null || F.updateFixedColumnStyle()));
1159
- }, {
1160
- deep: !0
1161
- });
1162
- const V = () => {
1163
- if (!l.value)
1164
- throw new Error("[ElTable] prop row-key is required");
1165
- }, _ = (F) => {
1166
- var $;
1167
- ($ = F.children) == null || $.forEach((P) => {
1168
- P.fixed = F.fixed, _(P);
1169
- });
1170
- }, G = () => {
1171
- var F, $;
1172
- o.value.forEach((j) => {
1173
- _(j);
1174
- }), c.value = o.value.filter((j) => j.type !== "selection" && [!0, "left"].includes(j.fixed));
1175
- let P;
1176
- if ((($ = (F = o.value) == null ? void 0 : F[0]) == null ? void 0 : $.type) === "selection") {
1177
- const j = o.value[0];
1178
- P = [!0, "left"].includes(j.fixed) || c.value.length && j.fixed !== "right", P && c.value.unshift(j);
1179
- }
1180
- f.value = o.value.filter((j) => j.fixed === "right");
1181
- const I = o.value.filter((j) => (P ? j.type !== "selection" : !0) && !j.fixed);
1182
- s.value = [].concat(c.value).concat(I).concat(f.value);
1183
- const Y = lt(I), Z = lt(c.value), ce = lt(f.value);
1184
- b.value = Y.length, C.value = Z.length, L.value = ce.length, u.value = [].concat(Z).concat(Y).concat(ce), i.value = c.value.length > 0 || f.value.length > 0;
1185
- }, T = (F, $ = !1) => {
1186
- F && G(), $ ? t.state.doLayout() : t.state.debouncedUpdateLayout();
1187
- }, S = (F) => U.value ? !!U.value[ne(F, l.value)] : d.value.includes(F), M = () => {
1188
- x.value = !1;
1189
- const F = d.value;
1190
- d.value = [], F.length && t.emit("selection-change", []);
1191
- }, q = () => {
1192
- let F;
1193
- if (l.value) {
1194
- F = [];
1195
- const $ = De(a.value, l.value);
1196
- for (const P in U.value)
1197
- Ge(U.value, P) && !$[P] && F.push(U.value[P].row);
1198
- } else
1199
- F = d.value.filter(($) => !a.value.includes($));
1200
- if (F.length) {
1201
- const $ = d.value.filter((P) => !F.includes(P));
1202
- d.value = $, t.emit("selection-change", $.slice());
1203
- }
1204
- }, Q = () => (d.value || []).slice(), J = (F, $, P = !0, I = !1) => {
1205
- var Y, Z, ce, j;
1206
- const Fe = {
1207
- children: (Z = (Y = t == null ? void 0 : t.store) == null ? void 0 : Y.states) == null ? void 0 : Z.childrenColumnName.value,
1208
- checkStrictly: (j = (ce = t == null ? void 0 : t.store) == null ? void 0 : ce.states) == null ? void 0 : j.checkStrictly.value
1209
- };
1210
- if (dt(d.value, F, $, Fe, I ? void 0 : m.value, a.value.indexOf(F))) {
1211
- const et = (d.value || []).slice();
1212
- P && t.emit("select", et, F), t.emit("selection-change", et);
1213
- }
1214
- }, se = () => {
1215
- var F, $;
1216
- const P = w.value ? !x.value : !(x.value || d.value.length);
1217
- x.value = P;
1218
- let I = !1, Y = 0;
1219
- const Z = ($ = (F = t == null ? void 0 : t.store) == null ? void 0 : F.states) == null ? void 0 : $.rowKey.value, { childrenColumnName: ce } = t.store.states, j = {
1220
- children: ce.value,
1221
- checkStrictly: !1
1222
- };
1223
- a.value.forEach((Fe, Ze) => {
1224
- const et = Ze + Y;
1225
- dt(d.value, Fe, P, j, m.value, et) && (I = !0), Y += le(ne(Fe, Z));
1226
- }), I && t.emit("selection-change", d.value ? d.value.slice() : []), t.emit("select-all", (d.value || []).slice());
1227
- }, ue = () => {
1228
- a.value.forEach((F) => {
1229
- const $ = ne(F, l.value), P = U.value[$];
1230
- P && (d.value[P.index] = F);
1231
- });
1232
- }, ye = () => {
1233
- var F;
1234
- if (((F = a.value) == null ? void 0 : F.length) === 0) {
1235
- x.value = !1;
1236
- return;
1237
- }
1238
- const { childrenColumnName: $ } = t.store.states;
1239
- let P = 0, I = 0;
1240
- const Y = (ce) => {
1241
- var j;
1242
- for (const Fe of ce) {
1243
- const Ze = m.value && m.value.call(null, Fe, P);
1244
- if (S(Fe))
1245
- I++;
1246
- else if (!m.value || Ze)
1247
- return !1;
1248
- if (P++, (j = Fe[$.value]) != null && j.length && !Y(Fe[$.value]))
1249
- return !1;
1250
- }
1251
- return !0;
1252
- }, Z = Y(a.value || []);
1253
- x.value = I === 0 ? !1 : Z;
1254
- }, le = (F) => {
1255
- var $;
1256
- if (!t || !t.store)
1257
- return 0;
1258
- const { treeData: P } = t.store.states;
1259
- let I = 0;
1260
- const Y = ($ = P.value[F]) == null ? void 0 : $.children;
1261
- return Y && (I += Y.length, Y.forEach((Z) => {
1262
- I += le(Z);
1263
- })), I;
1264
- }, me = (F, $) => {
1265
- ee(F) || (F = [F]);
1266
- const P = {};
1267
- return F.forEach((I) => {
1268
- E.value[I.id] = $, P[I.columnKey || I.id] = $;
1269
- }), P;
1270
- }, ge = (F, $, P) => {
1271
- W.value && W.value !== F && (W.value.order = null), W.value = F, z.value = $, B.value = P;
1272
- }, Je = () => {
1273
- let F = R(r);
1274
- Object.keys(E.value).forEach(($) => {
1275
- const P = E.value[$];
1276
- if (!P || P.length === 0)
1277
- return;
1278
- const I = Pl({
1279
- columns: u.value
1280
- }, $);
1281
- I && I.filterMethod && (F = F.filter((Y) => P.some((Z) => I.filterMethod.call(null, Z, Y, I))));
1282
- }), N.value = F;
1283
- }, Ut = () => {
1284
- a.value = ta(N.value, {
1285
- sortingColumn: W.value,
1286
- sortProp: z.value,
1287
- sortOrder: B.value
1288
- });
1289
- }, en = (F = void 0) => {
1290
- F && F.filter || Je(), Ut();
1291
- }, tn = (F) => {
1292
- const { tableHeaderRef: $ } = t.refs;
1293
- if (!$)
1294
- return;
1295
- const P = Object.assign({}, $.filterPanels), I = Object.keys(P);
1296
- if (I.length)
1297
- if (ve(F) && (F = [F]), ee(F)) {
1298
- const Y = F.map((Z) => jo({
1299
- columns: u.value
1300
- }, Z));
1301
- I.forEach((Z) => {
1302
- const ce = Y.find((j) => j.id === Z);
1303
- ce && (ce.filteredValue = []);
1304
- }), t.store.commit("filterChange", {
1305
- column: Y,
1306
- values: [],
1307
- silent: !0,
1308
- multi: !0
1309
- });
1310
- } else
1311
- I.forEach((Y) => {
1312
- const Z = u.value.find((ce) => ce.id === Y);
1313
- Z && (Z.filteredValue = []);
1314
- }), E.value = {}, t.store.commit("filterChange", {
1315
- column: {},
1316
- values: [],
1317
- silent: !0
1318
- });
1319
- }, ln = () => {
1320
- W.value && (ge(null, null, null), t.store.commit("changeSortCondition", {
1321
- silent: !0
1322
- }));
1323
- }, {
1324
- setExpandRowKeys: nn,
1325
- toggleRowExpansion: Gt,
1326
- updateExpandRows: on,
1327
- states: an,
1328
- isRowExpanded: sn
1329
- } = Jo({
1330
- data: a,
1331
- rowKey: l
1332
- }), {
1333
- updateTreeExpandKeys: rn,
1334
- toggleTreeExpansion: un,
1335
- updateTreeData: cn,
1336
- updateKeyChildren: dn,
1337
- loadOrToggle: fn,
1338
- states: hn
1339
- } = ea({
1340
- data: a,
1341
- rowKey: l
1342
- }), {
1343
- updateCurrentRowData: pn,
1344
- updateCurrentRow: vn,
1345
- setCurrentRowKey: mn,
1346
- states: gn
1347
- } = Zo({
1348
- data: a,
1349
- rowKey: l
1350
- });
1351
- return {
1352
- assertRowKey: V,
1353
- updateColumns: G,
1354
- scheduleLayout: T,
1355
- isSelected: S,
1356
- clearSelection: M,
1357
- cleanSelection: q,
1358
- getSelectionRows: Q,
1359
- toggleRowSelection: J,
1360
- _toggleAllSelection: se,
1361
- toggleAllSelection: null,
1362
- updateSelectionByRowKey: ue,
1363
- updateAllSelected: ye,
1364
- updateFilters: me,
1365
- updateCurrentRow: vn,
1366
- updateSort: ge,
1367
- execFilter: Je,
1368
- execSort: Ut,
1369
- execQuery: en,
1370
- clearFilter: tn,
1371
- clearSort: ln,
1372
- toggleRowExpansion: Gt,
1373
- setExpandRowKeysAdapter: (F) => {
1374
- nn(F), rn(F);
1375
- },
1376
- setCurrentRowKey: mn,
1377
- toggleRowExpansionAdapter: (F, $) => {
1378
- u.value.some(({ type: I }) => I === "expand") ? Gt(F, $) : un(F, $);
1379
- },
1380
- isRowExpanded: sn,
1381
- updateExpandRows: on,
1382
- updateCurrentRowData: pn,
1383
- loadOrToggle: fn,
1384
- updateTreeData: cn,
1385
- updateKeyChildren: dn,
1386
- states: {
1387
- tableSize: n,
1388
- rowKey: l,
1389
- data: a,
1390
- _data: r,
1391
- isComplex: i,
1392
- _columns: o,
1393
- originColumns: s,
1394
- columns: u,
1395
- fixedColumns: c,
1396
- rightFixedColumns: f,
1397
- leafColumns: p,
1398
- fixedLeafColumns: g,
1399
- rightFixedLeafColumns: h,
1400
- updateOrderFns: y,
1401
- leafColumnsLength: b,
1402
- fixedLeafColumnsLength: C,
1403
- rightFixedLeafColumnsLength: L,
1404
- isAllSelected: x,
1405
- selection: d,
1406
- reserveSelection: v,
1407
- selectOnIndeterminate: w,
1408
- selectable: m,
1409
- filters: E,
1410
- filteredData: N,
1411
- sortingColumn: W,
1412
- sortProp: z,
1413
- sortOrder: B,
1414
- hoverRow: D,
1415
- ...an,
1416
- ...hn,
1417
- ...gn
1418
- }
1419
- };
1420
- }
1421
- function St(e, t) {
1422
- return e.map((n) => {
1423
- var l;
1424
- return n.id === t.id ? t : ((l = n.children) != null && l.length && (n.children = St(n.children, t)), n);
1425
- });
1426
- }
1427
- function xt(e) {
1428
- e.forEach((t) => {
1429
- var n, l;
1430
- t.no = (n = t.getColumnIndex) == null ? void 0 : n.call(t), (l = t.children) != null && l.length && xt(t.children);
1431
- }), e.sort((t, n) => t.no - n.no);
1432
- }
1433
- function na() {
1434
- const e = oe(), t = la();
1435
- return {
1436
- ns: ie("table"),
1437
- ...t,
1438
- mutations: {
1439
- setData(i, o) {
1440
- const s = R(i._data) !== o;
1441
- i.data.value = o, i._data.value = o, e.store.execQuery(), e.store.updateCurrentRowData(), e.store.updateExpandRows(), e.store.updateTreeData(e.store.states.defaultExpandAll.value), R(i.reserveSelection) ? (e.store.assertRowKey(), e.store.updateSelectionByRowKey()) : s ? e.store.clearSelection() : e.store.cleanSelection(), e.store.updateAllSelected(), e.$ready && e.store.scheduleLayout();
1442
- },
1443
- insertColumn(i, o, s, u) {
1444
- const c = R(i._columns);
1445
- let f = [];
1446
- s ? (s && !s.children && (s.children = []), s.children.push(o), f = St(c, s)) : (c.push(o), f = c), xt(f), i._columns.value = f, i.updateOrderFns.push(u), o.type === "selection" && (i.selectable.value = o.selectable, i.reserveSelection.value = o.reserveSelection), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout());
1447
- },
1448
- updateColumnOrder(i, o) {
1449
- var s;
1450
- ((s = o.getColumnIndex) == null ? void 0 : s.call(o)) !== o.no && (xt(i._columns.value), e.$ready && e.store.updateColumns());
1451
- },
1452
- removeColumn(i, o, s, u) {
1453
- const c = R(i._columns) || [];
1454
- if (s)
1455
- s.children.splice(s.children.findIndex((p) => p.id === o.id), 1), Me(() => {
1456
- var p;
1457
- ((p = s.children) == null ? void 0 : p.length) === 0 && delete s.children;
1458
- }), i._columns.value = St(c, s);
1459
- else {
1460
- const p = c.indexOf(o);
1461
- p > -1 && (c.splice(p, 1), i._columns.value = c);
1462
- }
1463
- const f = i.updateOrderFns.indexOf(u);
1464
- f > -1 && i.updateOrderFns.splice(f, 1), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout());
1465
- },
1466
- sort(i, o) {
1467
- const { prop: s, order: u, init: c } = o;
1468
- if (s) {
1469
- const f = R(i.columns).find((p) => p.property === s);
1470
- f && (f.order = u, e.store.updateSort(f, s, u), e.store.commit("changeSortCondition", { init: c }));
1471
- }
1472
- },
1473
- changeSortCondition(i, o) {
1474
- const { sortingColumn: s, sortProp: u, sortOrder: c } = i, f = R(s), p = R(u), g = R(c);
1475
- Qe(g) && (i.sortingColumn.value = null, i.sortProp.value = null);
1476
- const h = { filter: !0 };
1477
- e.store.execQuery(h), (!o || !(o.silent || o.init)) && e.emit("sort-change", {
1478
- column: f,
1479
- prop: p,
1480
- order: g
1481
- }), e.store.updateTableScrollY();
1482
- },
1483
- filterChange(i, o) {
1484
- const { column: s, values: u, silent: c } = o, f = e.store.updateFilters(s, u);
1485
- e.store.execQuery(), c || e.emit("filter-change", f), e.store.updateTableScrollY();
1486
- },
1487
- toggleAllSelection() {
1488
- e.store.toggleAllSelection();
1489
- },
1490
- rowSelectedChanged(i, o) {
1491
- e.store.toggleRowSelection(o), e.store.updateAllSelected();
1492
- },
1493
- setHoverRow(i, o) {
1494
- i.hoverRow.value = o;
1495
- },
1496
- setCurrentRow(i, o) {
1497
- e.store.updateCurrentRow(o);
1498
- }
1499
- },
1500
- commit: function(i, ...o) {
1501
- const s = e.store.mutations;
1502
- if (s[i])
1503
- s[i].apply(e, [e.store.states].concat(o));
1504
- else
1505
- throw new Error(`Action not found: ${i}`);
1506
- },
1507
- updateTableScrollY: function() {
1508
- Me(() => e.layout.updateScrollY.apply(e.layout));
1509
- }
1510
- };
1511
- }
1512
- const _e = {
1513
- rowKey: "rowKey",
1514
- defaultExpandAll: "defaultExpandAll",
1515
- selectOnIndeterminate: "selectOnIndeterminate",
1516
- indent: "indent",
1517
- lazy: "lazy",
1518
- data: "data",
1519
- "treeProps.hasChildren": {
1520
- key: "lazyColumnIdentifier",
1521
- default: "hasChildren"
1522
- },
1523
- "treeProps.children": {
1524
- key: "childrenColumnName",
1525
- default: "children"
1526
- },
1527
- "treeProps.checkStrictly": {
1528
- key: "checkStrictly",
1529
- default: !1
1530
- }
1531
- };
1532
- function oa(e, t) {
1533
- if (!e)
1534
- throw new Error("Table is required.");
1535
- const n = na();
1536
- return n.toggleAllSelection = ct(n._toggleAllSelection, 10), Object.keys(_e).forEach((l) => {
1537
- zl(Il(t, l), l, n);
1538
- }), aa(n, t), n;
1539
- }
1540
- function aa(e, t) {
1541
- Object.keys(_e).forEach((n) => {
1542
- pe(() => Il(t, n), (l) => {
1543
- zl(l, n, e);
1544
- });
1545
- });
1546
- }
1547
- function zl(e, t, n) {
1548
- let l = e, a = _e[t];
1549
- Ue(_e[t]) && (a = a.key, l = l || _e[t].default), n.states[a].value = l;
1550
- }
1551
- function Il(e, t) {
1552
- if (t.includes(".")) {
1553
- const n = t.split(".");
1554
- let l = e;
1555
- return n.forEach((a) => {
1556
- l = l[a];
1557
- }), l;
1558
- } else
1559
- return e[t];
1560
- }
1561
- class sa {
1562
- constructor(t) {
1563
- this.observers = [], this.table = null, this.store = null, this.columns = [], this.fit = !0, this.showHeader = !0, this.height = k(null), this.scrollX = k(!1), this.scrollY = k(!1), this.bodyWidth = k(null), this.fixedWidth = k(null), this.rightFixedWidth = k(null), this.gutterWidth = 0;
1564
- for (const n in t)
1565
- Ge(t, n) && (je(this[n]) ? this[n].value = t[n] : this[n] = t[n]);
1566
- if (!this.table)
1567
- throw new Error("Table is required for Table Layout");
1568
- if (!this.store)
1569
- throw new Error("Store is required for Table Layout");
1570
- }
1571
- updateScrollY() {
1572
- const t = this.height.value;
1573
- if (Qe(t))
1574
- return !1;
1575
- const n = this.table.refs.scrollBarRef;
1576
- if (this.table.vnode.el && (n != null && n.wrapRef)) {
1577
- let l = !0;
1578
- const a = this.scrollY.value;
1579
- return l = n.wrapRef.scrollHeight > n.wrapRef.clientHeight, this.scrollY.value = l, a !== l;
1580
- }
1581
- return !1;
1582
- }
1583
- setHeight(t, n = "height") {
1584
- if (!Ye)
1585
- return;
1586
- const l = this.table.vnode.el;
1587
- if (t = Go(t), this.height.value = Number(t), !l && (t || t === 0))
1588
- return Me(() => this.setHeight(t, n));
1589
- Oe(t) ? (l.style[n] = `${t}px`, this.updateElsHeight()) : ve(t) && (l.style[n] = t, this.updateElsHeight());
1590
- }
1591
- setMaxHeight(t) {
1592
- this.setHeight(t, "max-height");
1593
- }
1594
- getFlattenColumns() {
1595
- const t = [];
1596
- return this.table.store.states.columns.value.forEach((l) => {
1597
- l.isColumnGroup ? t.push.apply(t, l.columns) : t.push(l);
1598
- }), t;
1599
- }
1600
- updateElsHeight() {
1601
- this.updateScrollY(), this.notifyObservers("scrollable");
1602
- }
1603
- headerDisplayNone(t) {
1604
- if (!t)
1605
- return !0;
1606
- let n = t;
1607
- for (; n.tagName !== "DIV"; ) {
1608
- if (getComputedStyle(n).display === "none")
1609
- return !0;
1610
- n = n.parentElement;
1611
- }
1612
- return !1;
1613
- }
1614
- updateColumnsWidth() {
1615
- if (!Ye)
1616
- return;
1617
- const t = this.fit, n = this.table.vnode.el.clientWidth;
1618
- let l = 0;
1619
- const a = this.getFlattenColumns(), r = a.filter((s) => !Oe(s.width));
1620
- if (a.forEach((s) => {
1621
- Oe(s.width) && s.realWidth && (s.realWidth = null);
1622
- }), r.length > 0 && t) {
1623
- if (a.forEach((s) => {
1624
- l += Number(s.width || s.minWidth || 80);
1625
- }), l <= n) {
1626
- this.scrollX.value = !1;
1627
- const s = n - l;
1628
- if (r.length === 1)
1629
- r[0].realWidth = Number(r[0].minWidth || 80) + s;
1630
- else {
1631
- const u = r.reduce((p, g) => p + Number(g.minWidth || 80), 0), c = s / u;
1632
- let f = 0;
1633
- r.forEach((p, g) => {
1634
- if (g === 0)
1635
- return;
1636
- const h = Math.floor(Number(p.minWidth || 80) * c);
1637
- f += h, p.realWidth = Number(p.minWidth || 80) + h;
1638
- }), r[0].realWidth = Number(r[0].minWidth || 80) + s - f;
1639
- }
1640
- } else
1641
- this.scrollX.value = !0, r.forEach((s) => {
1642
- s.realWidth = Number(s.minWidth);
1643
- });
1644
- this.bodyWidth.value = Math.max(l, n), this.table.state.resizeState.value.width = this.bodyWidth.value;
1645
- } else
1646
- a.forEach((s) => {
1647
- !s.width && !s.minWidth ? s.realWidth = 80 : s.realWidth = Number(s.width || s.minWidth), l += s.realWidth;
1648
- }), this.scrollX.value = l > n, this.bodyWidth.value = l;
1649
- const i = this.store.states.fixedColumns.value;
1650
- if (i.length > 0) {
1651
- let s = 0;
1652
- i.forEach((u) => {
1653
- s += Number(u.realWidth || u.width);
1654
- }), this.fixedWidth.value = s;
1655
- }
1656
- const o = this.store.states.rightFixedColumns.value;
1657
- if (o.length > 0) {
1658
- let s = 0;
1659
- o.forEach((u) => {
1660
- s += Number(u.realWidth || u.width);
1661
- }), this.rightFixedWidth.value = s;
1662
- }
1663
- this.notifyObservers("columns");
1664
- }
1665
- addObserver(t) {
1666
- this.observers.push(t);
1667
- }
1668
- removeObserver(t) {
1669
- const n = this.observers.indexOf(t);
1670
- n !== -1 && this.observers.splice(n, 1);
1671
- }
1672
- notifyObservers(t) {
1673
- this.observers.forEach((l) => {
1674
- var a, r;
1675
- switch (t) {
1676
- case "columns":
1677
- (a = l.state) == null || a.onColumnsChange(this);
1678
- break;
1679
- case "scrollable":
1680
- (r = l.state) == null || r.onScrollableChange(this);
1681
- break;
1682
- default:
1683
- throw new Error(`Table Layout don't have event ${t}.`);
1684
- }
1685
- });
1686
- }
1687
- }
1688
- const { CheckboxGroup: ra } = Ae, ia = ae({
1689
- name: "ElTableFilterPanel",
1690
- components: {
1691
- ElCheckbox: Ae,
1692
- ElCheckboxGroup: ra,
1693
- ElScrollbar: Sl,
1694
- ElTooltip: Ht,
1695
- ElIcon: ft,
1696
- ArrowDown: Nn,
1697
- ArrowUp: Fn
1698
- },
1699
- directives: { ClickOutside: to },
1700
- props: {
1701
- placement: {
1702
- type: String,
1703
- default: "bottom-start"
1704
- },
1705
- store: {
1706
- type: Object
1707
- },
1708
- column: {
1709
- type: Object
1710
- },
1711
- upDataColumn: {
1712
- type: Function
1713
- },
1714
- appendTo: {
1715
- type: String
1716
- }
1717
- },
1718
- setup(e) {
1719
- const t = oe(), { t: n } = zt(), l = ie("table-filter"), a = t == null ? void 0 : t.parent;
1720
- a.filterPanels.value[e.column.id] || (a.filterPanels.value[e.column.id] = t);
1721
- const r = k(!1), i = k(null), o = O(() => e.column && e.column.filters), s = O(() => e.column.filterClassName ? `${l.b()} ${e.column.filterClassName}` : l.b()), u = O({
1722
- get: () => {
1723
- var v;
1724
- return (((v = e.column) == null ? void 0 : v.filteredValue) || [])[0];
1725
- },
1726
- set: (v) => {
1727
- c.value && (He(v) ? c.value.splice(0, 1) : c.value.splice(0, 1, v));
1728
- }
1729
- }), c = O({
1730
- get() {
1731
- return e.column ? e.column.filteredValue || [] : [];
1732
- },
1733
- set(v) {
1734
- e.column && e.upDataColumn("filteredValue", v);
1735
- }
1736
- }), f = O(() => e.column ? e.column.filterMultiple : !0), p = (v) => v.value === u.value, g = () => {
1737
- r.value = !1;
1738
- }, h = (v) => {
1739
- v.stopPropagation(), r.value = !r.value;
1740
- }, y = () => {
1741
- r.value = !1;
1742
- }, b = () => {
1743
- x(c.value), g();
1744
- }, C = () => {
1745
- c.value = [], x(c.value), g();
1746
- }, L = (v) => {
1747
- u.value = v, He(v) ? x([]) : x(c.value), g();
1748
- }, x = (v) => {
1749
- e.store.commit("filterChange", {
1750
- column: e.column,
1751
- values: v
1752
- }), e.store.updateAllSelected();
1753
- };
1754
- pe(r, (v) => {
1755
- e.column && e.upDataColumn("filterOpened", v);
1756
- }, {
1757
- immediate: !0
1758
- });
1759
- const d = O(() => {
1760
- var v, w;
1761
- return (w = (v = i.value) == null ? void 0 : v.popperRef) == null ? void 0 : w.contentRef;
1762
- });
1763
- return {
1764
- tooltipVisible: r,
1765
- multiple: f,
1766
- filterClassName: s,
1767
- filteredValue: c,
1768
- filterValue: u,
1769
- filters: o,
1770
- handleConfirm: b,
1771
- handleReset: C,
1772
- handleSelect: L,
1773
- isPropAbsent: He,
1774
- isActive: p,
1775
- t: n,
1776
- ns: l,
1777
- showFilterPanel: h,
1778
- hideFilterPanel: y,
1779
- popperPaneRef: d,
1780
- tooltip: i
1781
- };
1782
- }
1783
- });
1784
- function ua(e, t, n, l, a, r) {
1785
- const i = we("el-checkbox"), o = we("el-checkbox-group"), s = we("el-scrollbar"), u = we("arrow-up"), c = we("arrow-down"), f = we("el-icon"), p = we("el-tooltip"), g = ml("click-outside");
1786
- return K(), Le(p, {
1787
- ref: "tooltip",
1788
- visible: e.tooltipVisible,
1789
- offset: 0,
1790
- placement: e.placement,
1791
- "show-arrow": !1,
1792
- "stop-popper-mouse-event": !1,
1793
- teleported: "",
1794
- effect: "light",
1795
- pure: "",
1796
- "popper-class": e.filterClassName,
1797
- persistent: "",
1798
- "append-to": e.appendTo
1799
- }, {
1800
- content: he(() => [
1801
- e.multiple ? (K(), X("div", { key: 0 }, [
1802
- te("div", {
1803
- class: H(e.ns.e("content"))
1804
- }, [
1805
- be(s, {
1806
- "wrap-class": e.ns.e("wrap")
1807
- }, {
1808
- default: he(() => [
1809
- be(o, {
1810
- modelValue: e.filteredValue,
1811
- "onUpdate:modelValue": (h) => e.filteredValue = h,
1812
- class: H(e.ns.e("checkbox-group"))
1813
- }, {
1814
- default: he(() => [
1815
- (K(!0), X(it, null, Xt(e.filters, (h) => (K(), Le(i, {
1816
- key: h.value,
1817
- value: h.value
1818
- }, {
1819
- default: he(() => [
1820
- Be(ke(h.text), 1)
1821
- ]),
1822
- _: 2
1823
- }, 1032, ["value"]))), 128))
1824
- ]),
1825
- _: 1
1826
- }, 8, ["modelValue", "onUpdate:modelValue", "class"])
1827
- ]),
1828
- _: 1
1829
- }, 8, ["wrap-class"])
1830
- ], 2),
1831
- te("div", {
1832
- class: H(e.ns.e("bottom"))
1833
- }, [
1834
- te("button", {
1835
- class: H({ [e.ns.is("disabled")]: e.filteredValue.length === 0 }),
1836
- disabled: e.filteredValue.length === 0,
1837
- type: "button",
1838
- onClick: e.handleConfirm
1839
- }, ke(e.t("el.table.confirmFilter")), 11, ["disabled", "onClick"]),
1840
- te("button", {
1841
- type: "button",
1842
- onClick: e.handleReset
1843
- }, ke(e.t("el.table.resetFilter")), 9, ["onClick"])
1844
- ], 2)
1845
- ])) : (K(), X("ul", {
1846
- key: 1,
1847
- class: H(e.ns.e("list"))
1848
- }, [
1849
- te("li", {
1850
- class: H([
1851
- e.ns.e("list-item"),
1852
- {
1853
- [e.ns.is("active")]: e.isPropAbsent(e.filterValue)
1854
- }
1855
- ]),
1856
- onClick: (h) => e.handleSelect(null)
1857
- }, ke(e.t("el.table.clearFilter")), 11, ["onClick"]),
1858
- (K(!0), X(it, null, Xt(e.filters, (h) => (K(), X("li", {
1859
- key: h.value,
1860
- class: H([e.ns.e("list-item"), e.ns.is("active", e.isActive(h))]),
1861
- label: h.value,
1862
- onClick: (y) => e.handleSelect(h.value)
1863
- }, ke(h.text), 11, ["label", "onClick"]))), 128))
1864
- ], 2))
1865
- ]),
1866
- default: he(() => [
1867
- Te((K(), X("span", {
1868
- class: H([
1869
- `${e.ns.namespace.value}-table__column-filter-trigger`,
1870
- `${e.ns.namespace.value}-none-outline`
1871
- ]),
1872
- onClick: e.showFilterPanel
1873
- }, [
1874
- be(f, null, {
1875
- default: he(() => [
1876
- xe(e.$slots, "filter-icon", {}, () => [
1877
- e.column.filterOpened ? (K(), Le(u, { key: 0 })) : (K(), Le(c, { key: 1 }))
1878
- ])
1879
- ]),
1880
- _: 3
1881
- })
1882
- ], 10, ["onClick"])), [
1883
- [g, e.hideFilterPanel, e.popperPaneRef]
1884
- ])
1885
- ]),
1886
- _: 3
1887
- }, 8, ["visible", "placement", "popper-class", "append-to"]);
1888
- }
1889
- var ca = /* @__PURE__ */ Pe(ia, [["render", ua], ["__file", "filter-panel.vue"]]);
1890
- function jt(e) {
1891
- const t = oe();
1892
- gl(() => {
1893
- n.value.addObserver(t);
1894
- }), Xe(() => {
1895
- l(n.value), a(n.value);
1896
- }), Cn(() => {
1897
- l(n.value), a(n.value);
1898
- }), Wt(() => {
1899
- n.value.removeObserver(t);
1900
- });
1901
- const n = O(() => {
1902
- const r = e.layout;
1903
- if (!r)
1904
- throw new Error("Can not find table layout.");
1905
- return r;
1906
- }), l = (r) => {
1907
- var i;
1908
- const o = ((i = e.vnode.el) == null ? void 0 : i.querySelectorAll("colgroup > col")) || [];
1909
- if (!o.length)
1910
- return;
1911
- const s = r.getFlattenColumns(), u = {};
1912
- s.forEach((c) => {
1913
- u[c.id] = c;
1914
- });
1915
- for (let c = 0, f = o.length; c < f; c++) {
1916
- const p = o[c], g = p.getAttribute("name"), h = u[g];
1917
- h && p.setAttribute("width", h.realWidth || h.width);
1918
- }
1919
- }, a = (r) => {
1920
- var i, o;
1921
- const s = ((i = e.vnode.el) == null ? void 0 : i.querySelectorAll("colgroup > col[name=gutter]")) || [];
1922
- for (let c = 0, f = s.length; c < f; c++)
1923
- s[c].setAttribute("width", r.scrollY.value ? r.gutterWidth : "0");
1924
- const u = ((o = e.vnode.el) == null ? void 0 : o.querySelectorAll("th.gutter")) || [];
1925
- for (let c = 0, f = u.length; c < f; c++) {
1926
- const p = u[c];
1927
- p.style.width = r.scrollY.value ? `${r.gutterWidth}px` : "0", p.style.display = r.scrollY.value ? "" : "none";
1928
- }
1929
- };
1930
- return {
1931
- tableLayout: n.value,
1932
- onColumnsChange: l,
1933
- onScrollableChange: a
1934
- };
1935
- }
1936
- const Re = Symbol("ElTable");
1937
- function da(e, t) {
1938
- const n = oe(), l = re(Re), a = (y) => {
1939
- y.stopPropagation();
1940
- }, r = (y, b) => {
1941
- !b.filters && b.sortable ? h(y, b, !1) : b.filterable && !b.sortable && a(y), l == null || l.emit("header-click", b, y);
1942
- }, i = (y, b) => {
1943
- l == null || l.emit("header-contextmenu", b, y);
1944
- }, o = k(null), s = k(!1), u = k({}), c = (y, b) => {
1945
- if (Ye && !(b.children && b.children.length > 0) && o.value && e.border) {
1946
- s.value = !0;
1947
- const C = l;
1948
- t("set-drag-visible", !0);
1949
- const x = (C == null ? void 0 : C.vnode.el).getBoundingClientRect().left, d = n.vnode.el.querySelector(`th.${b.id}`), v = d.getBoundingClientRect(), w = v.left - x + 30;
1950
- ut(d, "noclick"), u.value = {
1951
- startMouseLeft: y.clientX,
1952
- startLeft: v.right - x,
1953
- startColumnLeft: v.left - x,
1954
- tableLeft: x
1955
- };
1956
- const m = C == null ? void 0 : C.refs.resizeProxy;
1957
- m.style.left = `${u.value.startLeft}px`, document.onselectstart = function() {
1958
- return !1;
1959
- }, document.ondragstart = function() {
1960
- return !1;
1961
- };
1962
- const E = (W) => {
1963
- const z = W.clientX - u.value.startMouseLeft, B = u.value.startLeft + z;
1964
- m.style.left = `${Math.max(w, B)}px`;
1965
- }, N = () => {
1966
- if (s.value) {
1967
- const { startColumnLeft: W, startLeft: z } = u.value, D = Number.parseInt(m.style.left, 10) - W;
1968
- b.width = b.realWidth = D, C == null || C.emit("header-dragend", b.width, z - W, b, y), requestAnimationFrame(() => {
1969
- e.store.scheduleLayout(!1, !0);
1970
- }), document.body.style.cursor = "", s.value = !1, o.value = null, u.value = {}, t("set-drag-visible", !1);
1971
- }
1972
- document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", N), document.onselectstart = null, document.ondragstart = null, setTimeout(() => {
1973
- qe(d, "noclick");
1974
- }, 0);
1975
- };
1976
- document.addEventListener("mousemove", E), document.addEventListener("mouseup", N);
1977
- }
1978
- }, f = (y, b) => {
1979
- var C;
1980
- if (b.children && b.children.length > 0)
1981
- return;
1982
- const L = y.target;
1983
- if (!Un(L))
1984
- return;
1985
- const x = L == null ? void 0 : L.closest("th");
1986
- if (!(!b || !b.resizable || !x) && !s.value && e.border) {
1987
- const d = x.getBoundingClientRect(), v = document.body.style, w = ((C = x.parentNode) == null ? void 0 : C.lastElementChild) === x, m = e.allowDragLastColumn || !w;
1988
- d.width > 12 && d.right - y.pageX < 8 && m ? (v.cursor = "col-resize", ze(x, "is-sortable") && (x.style.cursor = "col-resize"), o.value = b) : s.value || (v.cursor = "", ze(x, "is-sortable") && (x.style.cursor = "pointer"), o.value = null);
1989
- }
1990
- }, p = () => {
1991
- Ye && (document.body.style.cursor = "");
1992
- }, g = ({ order: y, sortOrders: b }) => {
1993
- if (y === "")
1994
- return b[0];
1995
- const C = b.indexOf(y || null);
1996
- return b[C > b.length - 2 ? 0 : C + 1];
1997
- }, h = (y, b, C) => {
1998
- var L;
1999
- y.stopPropagation();
2000
- const x = b.order === C ? null : C || g(b), d = (L = y.target) == null ? void 0 : L.closest("th");
2001
- if (d && ze(d, "noclick")) {
2002
- qe(d, "noclick");
2003
- return;
2004
- }
2005
- if (!b.sortable)
2006
- return;
2007
- const v = y.currentTarget;
2008
- if (["ascending", "descending"].some((W) => ze(v, W) && !b.sortOrders.includes(W)))
2009
- return;
2010
- const w = e.store.states;
2011
- let m = w.sortProp.value, E;
2012
- const N = w.sortingColumn.value;
2013
- (N !== b || N === b && Qe(N.order)) && (N && (N.order = null), w.sortingColumn.value = b, m = b.property), x ? E = b.order = x : E = b.order = null, w.sortProp.value = m, w.sortOrder.value = E, l == null || l.store.commit("changeSortCondition");
2014
- };
2015
- return {
2016
- handleHeaderClick: r,
2017
- handleHeaderContextMenu: i,
2018
- handleMouseDown: c,
2019
- handleMouseMove: f,
2020
- handleMouseOut: p,
2021
- handleSortClick: h,
2022
- handleFilterClick: a
2023
- };
2024
- }
2025
- function fa(e) {
2026
- const t = re(Re), n = ie("table");
2027
- return {
2028
- getHeaderRowStyle: (o) => {
2029
- const s = t == null ? void 0 : t.props.headerRowStyle;
2030
- return Se(s) ? s.call(null, { rowIndex: o }) : s;
2031
- },
2032
- getHeaderRowClass: (o) => {
2033
- const s = [], u = t == null ? void 0 : t.props.headerRowClassName;
2034
- return ve(u) ? s.push(u) : Se(u) && s.push(u.call(null, { rowIndex: o })), s.join(" ");
2035
- },
2036
- getHeaderCellStyle: (o, s, u, c) => {
2037
- var f;
2038
- let p = (f = t == null ? void 0 : t.props.headerCellStyle) != null ? f : {};
2039
- Se(p) && (p = p.call(null, {
2040
- rowIndex: o,
2041
- columnIndex: s,
2042
- row: u,
2043
- column: c
2044
- }));
2045
- const g = _t(s, c.fixed, e.store, u);
2046
- return Ve(g, "left"), Ve(g, "right"), Object.assign({}, p, g);
2047
- },
2048
- getHeaderCellClass: (o, s, u, c) => {
2049
- const f = Dt(n.b(), s, c.fixed, e.store, u), p = [
2050
- c.id,
2051
- c.order,
2052
- c.headerAlign,
2053
- c.className,
2054
- c.labelClassName,
2055
- ...f
2056
- ];
2057
- c.children || p.push("is-leaf"), c.sortable && p.push("is-sortable");
2058
- const g = t == null ? void 0 : t.props.headerCellClassName;
2059
- return ve(g) ? p.push(g) : Se(g) && p.push(g.call(null, {
2060
- rowIndex: o,
2061
- columnIndex: s,
2062
- row: u,
2063
- column: c
2064
- })), p.push(n.e("cell")), p.filter((h) => !!h).join(" ");
2065
- }
2066
- };
2067
- }
2068
- const Dl = (e) => {
2069
- const t = [];
2070
- return e.forEach((n) => {
2071
- n.children ? (t.push(n), t.push.apply(t, Dl(n.children))) : t.push(n);
2072
- }), t;
2073
- }, _l = (e) => {
2074
- let t = 1;
2075
- const n = (r, i) => {
2076
- if (i && (r.level = i.level + 1, t < r.level && (t = r.level)), r.children) {
2077
- let o = 0;
2078
- r.children.forEach((s) => {
2079
- n(s, r), o += s.colSpan;
2080
- }), r.colSpan = o;
2081
- } else
2082
- r.colSpan = 1;
2083
- };
2084
- e.forEach((r) => {
2085
- r.level = 1, n(r, void 0);
2086
- });
2087
- const l = [];
2088
- for (let r = 0; r < t; r++)
2089
- l.push([]);
2090
- return Dl(e).forEach((r) => {
2091
- r.children ? (r.rowSpan = 1, r.children.forEach((i) => i.isSubColumn = !0)) : r.rowSpan = t - r.level + 1, l[r.level - 1].push(r);
2092
- }), l;
2093
- };
2094
- function ha(e) {
2095
- const t = re(Re), n = O(() => _l(e.store.states.originColumns.value));
2096
- return {
2097
- isGroup: O(() => {
2098
- const r = n.value.length > 1;
2099
- return r && t && (t.state.isGroup.value = !0), r;
2100
- }),
2101
- toggleAllSelection: (r) => {
2102
- r.stopPropagation(), t == null || t.store.commit("toggleAllSelection");
2103
- },
2104
- columnRows: n
2105
- };
2106
- }
2107
- var pa = ae({
2108
- name: "ElTableHeader",
2109
- components: {
2110
- ElCheckbox: Ae
2111
- },
2112
- props: {
2113
- fixed: {
2114
- type: String,
2115
- default: ""
2116
- },
2117
- store: {
2118
- required: !0,
2119
- type: Object
2120
- },
2121
- border: Boolean,
2122
- defaultSort: {
2123
- type: Object,
2124
- default: () => ({
2125
- prop: "",
2126
- order: ""
2127
- })
2128
- },
2129
- appendFilterPanelTo: {
2130
- type: String
2131
- },
2132
- allowDragLastColumn: {
2133
- type: Boolean
2134
- }
2135
- },
2136
- setup(e, { emit: t }) {
2137
- const n = oe(), l = re(Re), a = ie("table"), r = k({}), { onColumnsChange: i, onScrollableChange: o } = jt(l), s = (l == null ? void 0 : l.props.tableLayout) === "auto", u = wn(/* @__PURE__ */ new Map()), c = k(), f = () => {
2138
- setTimeout(() => {
2139
- u.size > 0 && (u.forEach((W, z) => {
2140
- const B = c.value.querySelector(`.${z.replace(/\s/g, ".")}`);
2141
- if (B) {
2142
- const D = B.getBoundingClientRect().width;
2143
- W.width = D;
2144
- }
2145
- }), u.clear());
2146
- });
2147
- };
2148
- pe(u, f), Xe(async () => {
2149
- await Me(), await Me();
2150
- const { prop: W, order: z } = e.defaultSort;
2151
- l == null || l.store.commit("sort", { prop: W, order: z, init: !0 }), f();
2152
- });
2153
- const {
2154
- handleHeaderClick: p,
2155
- handleHeaderContextMenu: g,
2156
- handleMouseDown: h,
2157
- handleMouseMove: y,
2158
- handleMouseOut: b,
2159
- handleSortClick: C,
2160
- handleFilterClick: L
2161
- } = da(e, t), {
2162
- getHeaderRowStyle: x,
2163
- getHeaderRowClass: d,
2164
- getHeaderCellStyle: v,
2165
- getHeaderCellClass: w
2166
- } = fa(e), { isGroup: m, toggleAllSelection: E, columnRows: N } = ha(e);
2167
- return n.state = {
2168
- onColumnsChange: i,
2169
- onScrollableChange: o
2170
- }, n.filterPanels = r, {
2171
- ns: a,
2172
- filterPanels: r,
2173
- onColumnsChange: i,
2174
- onScrollableChange: o,
2175
- columnRows: N,
2176
- getHeaderRowClass: d,
2177
- getHeaderRowStyle: x,
2178
- getHeaderCellClass: w,
2179
- getHeaderCellStyle: v,
2180
- handleHeaderClick: p,
2181
- handleHeaderContextMenu: g,
2182
- handleMouseDown: h,
2183
- handleMouseMove: y,
2184
- handleMouseOut: b,
2185
- handleSortClick: C,
2186
- handleFilterClick: L,
2187
- isGroup: m,
2188
- toggleAllSelection: E,
2189
- saveIndexSelection: u,
2190
- isTableLayoutAuto: s,
2191
- theadRef: c,
2192
- updateFixedColumnStyle: f
2193
- };
2194
- },
2195
- render() {
2196
- const {
2197
- ns: e,
2198
- isGroup: t,
2199
- columnRows: n,
2200
- getHeaderCellStyle: l,
2201
- getHeaderCellClass: a,
2202
- getHeaderRowClass: r,
2203
- getHeaderRowStyle: i,
2204
- handleHeaderClick: o,
2205
- handleHeaderContextMenu: s,
2206
- handleMouseDown: u,
2207
- handleMouseMove: c,
2208
- handleSortClick: f,
2209
- handleMouseOut: p,
2210
- store: g,
2211
- $parent: h,
2212
- saveIndexSelection: y,
2213
- isTableLayoutAuto: b
2214
- } = this;
2215
- let C = 1;
2216
- return A("thead", {
2217
- ref: "theadRef",
2218
- class: { [e.is("group")]: t }
2219
- }, n.map((L, x) => A("tr", {
2220
- class: r(x),
2221
- key: x,
2222
- style: i(x)
2223
- }, L.map((d, v) => {
2224
- d.rowSpan > C && (C = d.rowSpan);
2225
- const w = a(x, v, L, d);
2226
- return b && d.fixed && y.set(w, d), A("th", {
2227
- class: w,
2228
- colspan: d.colSpan,
2229
- key: `${d.id}-thead`,
2230
- rowspan: d.rowSpan,
2231
- style: l(x, v, L, d),
2232
- onClick: (m) => {
2233
- m.currentTarget.classList.contains("noclick") || o(m, d);
2234
- },
2235
- onContextmenu: (m) => s(m, d),
2236
- onMousedown: (m) => u(m, d),
2237
- onMousemove: (m) => c(m, d),
2238
- onMouseout: p
2239
- }, [
2240
- A("div", {
2241
- class: [
2242
- "cell",
2243
- d.filteredValue && d.filteredValue.length > 0 ? "highlight" : ""
2244
- ]
2245
- }, [
2246
- d.renderHeader ? d.renderHeader({
2247
- column: d,
2248
- $index: v,
2249
- store: g,
2250
- _self: h
2251
- }) : d.label,
2252
- d.sortable && A("span", {
2253
- onClick: (m) => f(m, d),
2254
- class: "caret-wrapper"
2255
- }, [
2256
- A("i", {
2257
- onClick: (m) => f(m, d, "ascending"),
2258
- class: "sort-caret ascending"
2259
- }),
2260
- A("i", {
2261
- onClick: (m) => f(m, d, "descending"),
2262
- class: "sort-caret descending"
2263
- })
2264
- ]),
2265
- d.filterable && A(ca, {
2266
- store: g,
2267
- placement: d.filterPlacement || "bottom-start",
2268
- appendTo: h.appendFilterPanelTo,
2269
- column: d,
2270
- upDataColumn: (m, E) => {
2271
- d[m] = E;
2272
- }
2273
- }, {
2274
- "filter-icon": () => d.renderFilterIcon ? d.renderFilterIcon({
2275
- filterOpened: d.filterOpened
2276
- }) : null
2277
- })
2278
- ])
2279
- ]);
2280
- }))));
2281
- }
2282
- });
2283
- function gt(e, t, n = 0.03) {
2284
- return e - t > n;
2285
- }
2286
- function va(e) {
2287
- const t = re(Re), n = k(""), l = k(A("div")), a = (h, y, b) => {
2288
- var C;
2289
- const L = t, x = mt(h);
2290
- let d;
2291
- const v = (C = L == null ? void 0 : L.vnode.el) == null ? void 0 : C.dataset.prefix;
2292
- x && (d = al({
2293
- columns: e.store.states.columns.value
2294
- }, x, v), d && (L == null || L.emit(`cell-${b}`, y, d, x, h))), L == null || L.emit(`row-${b}`, y, d, h);
2295
- }, r = (h, y) => {
2296
- a(h, y, "dblclick");
2297
- }, i = (h, y) => {
2298
- e.store.commit("setCurrentRow", y), a(h, y, "click");
2299
- }, o = (h, y) => {
2300
- a(h, y, "contextmenu");
2301
- }, s = ct((h) => {
2302
- e.store.commit("setHoverRow", h);
2303
- }, 30), u = ct(() => {
2304
- e.store.commit("setHoverRow", null);
2305
- }, 30), c = (h) => {
2306
- const y = window.getComputedStyle(h, null), b = Number.parseInt(y.paddingLeft, 10) || 0, C = Number.parseInt(y.paddingRight, 10) || 0, L = Number.parseInt(y.paddingTop, 10) || 0, x = Number.parseInt(y.paddingBottom, 10) || 0;
2307
- return {
2308
- left: b,
2309
- right: C,
2310
- top: L,
2311
- bottom: x
2312
- };
2313
- }, f = (h, y, b) => {
2314
- let C = y.target.parentNode;
2315
- for (; h > 1 && (C = C == null ? void 0 : C.nextSibling, !(!C || C.nodeName !== "TR")); )
2316
- b(C, "hover-row hover-fixed-row"), h--;
2317
- };
2318
- return {
2319
- handleDoubleClick: r,
2320
- handleClick: i,
2321
- handleContextMenu: o,
2322
- handleMouseEnter: s,
2323
- handleMouseLeave: u,
2324
- handleCellMouseEnter: (h, y, b) => {
2325
- var C, L, x;
2326
- const d = t, v = mt(h), w = (C = d == null ? void 0 : d.vnode.el) == null ? void 0 : C.dataset.prefix;
2327
- let m;
2328
- if (v) {
2329
- m = al({
2330
- columns: e.store.states.columns.value
2331
- }, v, w), v.rowSpan > 1 && f(v.rowSpan, h, ut);
2332
- const M = d.hoverState = { cell: v, column: m, row: y };
2333
- d == null || d.emit("cell-mouse-enter", M.row, M.column, M.cell, h);
2334
- }
2335
- if (!b)
2336
- return;
2337
- const E = h.target.querySelector(".cell");
2338
- if (!(ze(E, `${w}-tooltip`) && E.childNodes.length))
2339
- return;
2340
- const N = document.createRange();
2341
- N.setStart(E, 0), N.setEnd(E, E.childNodes.length);
2342
- const { width: W, height: z } = N.getBoundingClientRect(), { width: B, height: D } = E.getBoundingClientRect(), { top: U, left: V, right: _, bottom: G } = c(E), T = V + _, S = U + G;
2343
- gt(W + T, B) || gt(z + S, D) || gt(E.scrollWidth, B) ? Qo(b, v.innerText || v.textContent, y, m, v, d) : ((L = fe) == null ? void 0 : L.trigger) === v && ((x = fe) == null || x());
2344
- },
2345
- handleCellMouseLeave: (h) => {
2346
- const y = mt(h);
2347
- if (!y)
2348
- return;
2349
- y.rowSpan > 1 && f(y.rowSpan, h, qe);
2350
- const b = t == null ? void 0 : t.hoverState;
2351
- t == null || t.emit("cell-mouse-leave", b == null ? void 0 : b.row, b == null ? void 0 : b.column, b == null ? void 0 : b.cell, h);
2352
- },
2353
- tooltipContent: n,
2354
- tooltipTrigger: l
2355
- };
2356
- }
2357
- function ma(e) {
2358
- const t = re(Re), n = ie("table");
2359
- return {
2360
- getRowStyle: (u, c) => {
2361
- const f = t == null ? void 0 : t.props.rowStyle;
2362
- return Se(f) ? f.call(null, {
2363
- row: u,
2364
- rowIndex: c
2365
- }) : f || null;
2366
- },
2367
- getRowClass: (u, c) => {
2368
- const f = [n.e("row")];
2369
- t != null && t.props.highlightCurrentRow && u === e.store.states.currentRow.value && f.push("current-row"), e.stripe && c % 2 === 1 && f.push(n.em("row", "striped"));
2370
- const p = t == null ? void 0 : t.props.rowClassName;
2371
- return ve(p) ? f.push(p) : Se(p) && f.push(p.call(null, {
2372
- row: u,
2373
- rowIndex: c
2374
- })), f;
2375
- },
2376
- getCellStyle: (u, c, f, p) => {
2377
- const g = t == null ? void 0 : t.props.cellStyle;
2378
- let h = g ?? {};
2379
- Se(g) && (h = g.call(null, {
2380
- rowIndex: u,
2381
- columnIndex: c,
2382
- row: f,
2383
- column: p
2384
- }));
2385
- const y = _t(c, e == null ? void 0 : e.fixed, e.store);
2386
- return Ve(y, "left"), Ve(y, "right"), Object.assign({}, h, y);
2387
- },
2388
- getCellClass: (u, c, f, p, g) => {
2389
- const h = Dt(n.b(), c, e == null ? void 0 : e.fixed, e.store, void 0, g), y = [p.id, p.align, p.className, ...h], b = t == null ? void 0 : t.props.cellClassName;
2390
- return ve(b) ? y.push(b) : Se(b) && y.push(b.call(null, {
2391
- rowIndex: u,
2392
- columnIndex: c,
2393
- row: f,
2394
- column: p
2395
- })), y.push(n.e("cell")), y.filter((C) => !!C).join(" ");
2396
- },
2397
- getSpan: (u, c, f, p) => {
2398
- let g = 1, h = 1;
2399
- const y = t == null ? void 0 : t.props.spanMethod;
2400
- if (Se(y)) {
2401
- const b = y({
2402
- row: u,
2403
- column: c,
2404
- rowIndex: f,
2405
- columnIndex: p
2406
- });
2407
- ee(b) ? (g = b[0], h = b[1]) : Ue(b) && (g = b.rowspan, h = b.colspan);
2408
- }
2409
- return { rowspan: g, colspan: h };
2410
- },
2411
- getColspanRealWidth: (u, c, f) => {
2412
- if (c < 1)
2413
- return u[f].realWidth;
2414
- const p = u.map(({ realWidth: g, width: h }) => g || h).slice(f, f + c);
2415
- return Number(p.reduce((g, h) => Number(g) + Number(h), -1));
2416
- }
2417
- };
2418
- }
2419
- const ga = ae({
2420
- name: "TableTdWrapper"
2421
- }), ba = /* @__PURE__ */ ae({
2422
- ...ga,
2423
- props: {
2424
- colspan: {
2425
- type: Number,
2426
- default: 1
2427
- },
2428
- rowspan: {
2429
- type: Number,
2430
- default: 1
2431
- }
2432
- },
2433
- setup(e) {
2434
- return (t, n) => (K(), X("td", {
2435
- colspan: e.colspan,
2436
- rowspan: e.rowspan
2437
- }, [
2438
- xe(t.$slots, "default")
2439
- ], 8, ["colspan", "rowspan"]));
2440
- }
2441
- });
2442
- var ya = /* @__PURE__ */ Pe(ba, [["__file", "td-wrapper.vue"]]);
2443
- function Ca(e) {
2444
- const t = re(Re), n = ie("table"), {
2445
- handleDoubleClick: l,
2446
- handleClick: a,
2447
- handleContextMenu: r,
2448
- handleMouseEnter: i,
2449
- handleMouseLeave: o,
2450
- handleCellMouseEnter: s,
2451
- handleCellMouseLeave: u,
2452
- tooltipContent: c,
2453
- tooltipTrigger: f
2454
- } = va(e), {
2455
- getRowStyle: p,
2456
- getRowClass: g,
2457
- getCellStyle: h,
2458
- getCellClass: y,
2459
- getSpan: b,
2460
- getColspanRealWidth: C
2461
- } = ma(e), L = O(() => e.store.states.columns.value.findIndex(({ type: m }) => m === "default")), x = (m, E) => {
2462
- const N = t.props.rowKey;
2463
- return N ? ne(m, N) : E;
2464
- }, d = (m, E, N, W = !1) => {
2465
- const { tooltipEffect: z, tooltipOptions: B, store: D } = e, { indent: U, columns: V } = D.states, _ = g(m, E);
2466
- let G = !0;
2467
- return N && (_.push(n.em("row", `level-${N.level}`)), G = N.display), A("tr", {
2468
- style: [G ? null : {
2469
- display: "none"
2470
- }, p(m, E)],
2471
- class: _,
2472
- key: x(m, E),
2473
- onDblclick: (S) => l(S, m),
2474
- onClick: (S) => a(S, m),
2475
- onContextmenu: (S) => r(S, m),
2476
- onMouseenter: () => i(E),
2477
- onMouseleave: o
2478
- }, V.value.map((S, M) => {
2479
- const { rowspan: q, colspan: Q } = b(m, S, E, M);
2480
- if (!q || !Q)
2481
- return null;
2482
- const J = Object.assign({}, S);
2483
- J.realWidth = C(V.value, Q, M);
2484
- const se = {
2485
- store: e.store,
2486
- _self: e.context || t,
2487
- column: J,
2488
- row: m,
2489
- $index: E,
2490
- cellIndex: M,
2491
- expanded: W
2492
- };
2493
- M === L.value && N && (se.treeNode = {
2494
- indent: N.level * U.value,
2495
- level: N.level
2496
- }, Ne(N.expanded) && (se.treeNode.expanded = N.expanded, "loading" in N && (se.treeNode.loading = N.loading), "noLazyChildren" in N && (se.treeNode.noLazyChildren = N.noLazyChildren)));
2497
- const ue = `${x(m, E)},${M}`, ye = J.columnKey || J.rawColumnKey || "", le = S.showOverflowTooltip && Ol({
2498
- effect: z
2499
- }, B, S.showOverflowTooltip);
2500
- return A(ya, {
2501
- style: h(E, M, m, S),
2502
- class: y(E, M, m, S, Q - 1),
2503
- key: `${ye}${ue}`,
2504
- rowspan: q,
2505
- colspan: Q,
2506
- onMouseenter: (me) => s(me, m, le),
2507
- onMouseleave: u
2508
- }, {
2509
- default: () => v(M, S, se)
2510
- });
2511
- }));
2512
- }, v = (m, E, N) => E.renderCell(N);
2513
- return {
2514
- wrappedRowRender: (m, E) => {
2515
- const N = e.store, { isRowExpanded: W, assertRowKey: z } = N, { treeData: B, lazyTreeNodeMap: D, childrenColumnName: U, rowKey: V } = N.states, _ = N.states.columns.value;
2516
- if (_.some(({ type: T }) => T === "expand")) {
2517
- const T = W(m), S = d(m, E, void 0, T), M = t.renderExpanded;
2518
- return T ? M ? [
2519
- [
2520
- S,
2521
- A("tr", {
2522
- key: `expanded-row__${S.key}`
2523
- }, [
2524
- A("td", {
2525
- colspan: _.length,
2526
- class: `${n.e("cell")} ${n.e("expanded-cell")}`
2527
- }, [M({ row: m, $index: E, store: N, expanded: T })])
2528
- ])
2529
- ]
2530
- ] : (console.error("[Element Error]renderExpanded is required."), S) : [[S]];
2531
- } else if (Object.keys(B.value).length) {
2532
- z();
2533
- const T = ne(m, V.value);
2534
- let S = B.value[T], M = null;
2535
- S && (M = {
2536
- expanded: S.expanded,
2537
- level: S.level,
2538
- display: !0
2539
- }, Ne(S.lazy) && (Ne(S.loaded) && S.loaded && (M.noLazyChildren = !(S.children && S.children.length)), M.loading = S.loading));
2540
- const q = [d(m, E, M)];
2541
- if (S) {
2542
- let Q = 0;
2543
- const J = (ue, ye) => {
2544
- ue && ue.length && ye && ue.forEach((le) => {
2545
- const me = {
2546
- display: ye.display && ye.expanded,
2547
- level: ye.level + 1,
2548
- expanded: !1,
2549
- noLazyChildren: !1,
2550
- loading: !1
2551
- }, ge = ne(le, V.value);
2552
- if (He(ge))
2553
- throw new Error("For nested data item, row-key is required.");
2554
- if (S = { ...B.value[ge] }, S && (me.expanded = S.expanded, S.level = S.level || me.level, S.display = !!(S.expanded && me.display), Ne(S.lazy) && (Ne(S.loaded) && S.loaded && (me.noLazyChildren = !(S.children && S.children.length)), me.loading = S.loading)), Q++, q.push(d(le, E + Q, me)), S) {
2555
- const Je = D.value[ge] || le[U.value];
2556
- J(Je, S);
2557
- }
2558
- });
2559
- };
2560
- S.display = !0;
2561
- const se = D.value[T] || m[U.value];
2562
- J(se, S);
2563
- }
2564
- return q;
2565
- } else
2566
- return d(m, E, void 0);
2567
- },
2568
- tooltipContent: c,
2569
- tooltipTrigger: f
2570
- };
2571
- }
2572
- const wa = {
2573
- store: {
2574
- required: !0,
2575
- type: Object
2576
- },
2577
- stripe: Boolean,
2578
- tooltipEffect: String,
2579
- tooltipOptions: {
2580
- type: Object
2581
- },
2582
- context: {
2583
- default: () => ({}),
2584
- type: Object
2585
- },
2586
- rowClassName: [String, Function],
2587
- rowStyle: [Object, Function],
2588
- fixed: {
2589
- type: String,
2590
- default: ""
2591
- },
2592
- highlight: Boolean
2593
- };
2594
- var Sa = ae({
2595
- name: "ElTableBody",
2596
- props: wa,
2597
- setup(e) {
2598
- const t = oe(), n = re(Re), l = ie("table"), { wrappedRowRender: a, tooltipContent: r, tooltipTrigger: i } = Ca(e), { onColumnsChange: o, onScrollableChange: s } = jt(n), u = [];
2599
- return pe(e.store.states.hoverRow, (c, f) => {
2600
- var p;
2601
- const g = t == null ? void 0 : t.vnode.el, h = Array.from((g == null ? void 0 : g.children) || []).filter((C) => C == null ? void 0 : C.classList.contains(`${l.e("row")}`));
2602
- let y = c;
2603
- const b = (p = h[y]) == null ? void 0 : p.childNodes;
2604
- if (b != null && b.length) {
2605
- let C = 0;
2606
- Array.from(b).reduce((x, d, v) => {
2607
- var w, m;
2608
- return ((w = b[v]) == null ? void 0 : w.colSpan) > 1 && (C = (m = b[v]) == null ? void 0 : m.colSpan), d.nodeName !== "TD" && C === 0 && x.push(v), C > 0 && C--, x;
2609
- }, []).forEach((x) => {
2610
- var d;
2611
- for (y = c; y > 0; ) {
2612
- const v = (d = h[y - 1]) == null ? void 0 : d.childNodes;
2613
- if (v[x] && v[x].nodeName === "TD" && v[x].rowSpan > 1) {
2614
- ut(v[x], "hover-cell"), u.push(v[x]);
2615
- break;
2616
- }
2617
- y--;
2618
- }
2619
- });
2620
- } else
2621
- u.forEach((C) => qe(C, "hover-cell")), u.length = 0;
2622
- !e.store.states.isComplex.value || !Ye || lo(() => {
2623
- const C = h[f], L = h[c];
2624
- C && !C.classList.contains("hover-fixed-row") && qe(C, "hover-row"), L && ut(L, "hover-row");
2625
- });
2626
- }), Wt(() => {
2627
- var c;
2628
- (c = fe) == null || c();
2629
- }), {
2630
- ns: l,
2631
- onColumnsChange: o,
2632
- onScrollableChange: s,
2633
- wrappedRowRender: a,
2634
- tooltipContent: r,
2635
- tooltipTrigger: i
2636
- };
2637
- },
2638
- render() {
2639
- const { wrappedRowRender: e, store: t } = this, n = t.states.data.value || [];
2640
- return A("tbody", { tabIndex: -1 }, [
2641
- n.reduce((l, a) => l.concat(e(a, l.length)), [])
2642
- ]);
2643
- }
2644
- });
2645
- function xa() {
2646
- const e = re(Re), t = e == null ? void 0 : e.store, n = O(() => t.states.fixedLeafColumnsLength.value), l = O(() => t.states.rightFixedColumns.value.length), a = O(() => t.states.columns.value.length), r = O(() => t.states.fixedColumns.value.length), i = O(() => t.states.rightFixedColumns.value.length);
2647
- return {
2648
- leftFixedLeafCount: n,
2649
- rightFixedLeafCount: l,
2650
- columnsCount: a,
2651
- leftFixedCount: r,
2652
- rightFixedCount: i,
2653
- columns: t.states.columns
2654
- };
2655
- }
2656
- function Ea(e) {
2657
- const { columns: t } = xa(), n = ie("table");
2658
- return {
2659
- getCellClasses: (r, i) => {
2660
- const o = r[i], s = [
2661
- n.e("cell"),
2662
- o.id,
2663
- o.align,
2664
- o.labelClassName,
2665
- ...Dt(n.b(), i, o.fixed, e.store)
2666
- ];
2667
- return o.className && s.push(o.className), o.children || s.push(n.is("leaf")), s;
2668
- },
2669
- getCellStyles: (r, i) => {
2670
- const o = _t(i, r.fixed, e.store);
2671
- return Ve(o, "left"), Ve(o, "right"), o;
2672
- },
2673
- columns: t
2674
- };
2675
- }
2676
- var ka = ae({
2677
- name: "ElTableFooter",
2678
- props: {
2679
- fixed: {
2680
- type: String,
2681
- default: ""
2682
- },
2683
- store: {
2684
- required: !0,
2685
- type: Object
2686
- },
2687
- summaryMethod: Function,
2688
- sumText: String,
2689
- border: Boolean,
2690
- defaultSort: {
2691
- type: Object,
2692
- default: () => ({
2693
- prop: "",
2694
- order: ""
2695
- })
2696
- }
2697
- },
2698
- setup(e) {
2699
- const t = re(Re), n = ie("table"), { getCellClasses: l, getCellStyles: a, columns: r } = Ea(e), { onScrollableChange: i, onColumnsChange: o } = jt(t);
2700
- return {
2701
- ns: n,
2702
- onScrollableChange: i,
2703
- onColumnsChange: o,
2704
- getCellClasses: l,
2705
- getCellStyles: a,
2706
- columns: r
2707
- };
2708
- },
2709
- render() {
2710
- const { columns: e, getCellStyles: t, getCellClasses: n, summaryMethod: l, sumText: a } = this, r = this.store.states.data.value;
2711
- let i = [];
2712
- return l ? i = l({
2713
- columns: e,
2714
- data: r
2715
- }) : e.forEach((o, s) => {
2716
- if (s === 0) {
2717
- i[s] = a;
2718
- return;
2719
- }
2720
- const u = r.map((g) => Number(g[o.property])), c = [];
2721
- let f = !0;
2722
- u.forEach((g) => {
2723
- if (!Number.isNaN(+g)) {
2724
- f = !1;
2725
- const h = `${g}`.split(".")[1];
2726
- c.push(h ? h.length : 0);
2727
- }
2728
- });
2729
- const p = Math.max.apply(null, c);
2730
- f ? i[s] = "" : i[s] = u.reduce((g, h) => {
2731
- const y = Number(h);
2732
- return Number.isNaN(+y) ? g : Number.parseFloat((g + h).toFixed(Math.min(p, 20)));
2733
- }, 0);
2734
- }), A(A("tfoot", [
2735
- A("tr", {}, [
2736
- ...e.map((o, s) => A("td", {
2737
- key: s,
2738
- colspan: o.colSpan,
2739
- rowspan: o.rowSpan,
2740
- class: n(e, s),
2741
- style: t(o, s)
2742
- }, [
2743
- A("div", {
2744
- class: ["cell", o.labelClassName]
2745
- }, [i[s]])
2746
- ]))
2747
- ])
2748
- ]));
2749
- }
2750
- });
2751
- function La(e) {
2752
- return {
2753
- setCurrentRow: (f) => {
2754
- e.commit("setCurrentRow", f);
2755
- },
2756
- getSelectionRows: () => e.getSelectionRows(),
2757
- toggleRowSelection: (f, p, g = !0) => {
2758
- e.toggleRowSelection(f, p, !1, g), e.updateAllSelected();
2759
- },
2760
- clearSelection: () => {
2761
- e.clearSelection();
2762
- },
2763
- clearFilter: (f) => {
2764
- e.clearFilter(f);
2765
- },
2766
- toggleAllSelection: () => {
2767
- e.commit("toggleAllSelection");
2768
- },
2769
- toggleRowExpansion: (f, p) => {
2770
- e.toggleRowExpansionAdapter(f, p);
2771
- },
2772
- clearSort: () => {
2773
- e.clearSort();
2774
- },
2775
- sort: (f, p) => {
2776
- e.commit("sort", { prop: f, order: p });
2777
- },
2778
- updateKeyChildren: (f, p) => {
2779
- e.updateKeyChildren(f, p);
2780
- }
2781
- };
2782
- }
2783
- function Ra(e, t, n, l) {
2784
- const a = k(!1), r = k(null), i = k(!1), o = (T) => {
2785
- i.value = T;
2786
- }, s = k({
2787
- width: null,
2788
- height: null,
2789
- headerHeight: null
2790
- }), u = k(!1), c = {
2791
- display: "inline-block",
2792
- verticalAlign: "middle"
2793
- }, f = k(), p = k(0), g = k(0), h = k(0), y = k(0), b = k(0);
2794
- Ie(() => {
2795
- t.setHeight(e.height);
2796
- }), Ie(() => {
2797
- t.setMaxHeight(e.maxHeight);
2798
- }), pe(() => [e.currentRowKey, n.states.rowKey], ([T, S]) => {
2799
- !R(S) || !R(T) || n.setCurrentRowKey(`${T}`);
2800
- }, {
2801
- immediate: !0
2802
- }), pe(() => e.data, (T) => {
2803
- l.store.commit("setData", T);
2804
- }, {
2805
- immediate: !0,
2806
- deep: !0
2807
- }), Ie(() => {
2808
- e.expandRowKeys && n.setExpandRowKeysAdapter(e.expandRowKeys);
2809
- });
2810
- const C = () => {
2811
- l.store.commit("setHoverRow", null), l.hoverState && (l.hoverState = null);
2812
- }, L = (T, S) => {
2813
- const { pixelX: M, pixelY: q } = S;
2814
- Math.abs(M) >= Math.abs(q) && (l.refs.bodyWrapper.scrollLeft += S.pixelX / 5);
2815
- }, x = O(() => e.height || e.maxHeight || n.states.fixedColumns.value.length > 0 || n.states.rightFixedColumns.value.length > 0), d = O(() => ({
2816
- width: t.bodyWidth.value ? `${t.bodyWidth.value}px` : ""
2817
- })), v = () => {
2818
- x.value && t.updateElsHeight(), t.updateColumnsWidth(), requestAnimationFrame(N);
2819
- };
2820
- Xe(async () => {
2821
- await Me(), n.updateColumns(), W(), requestAnimationFrame(v);
2822
- const T = l.vnode.el, S = l.refs.headerWrapper;
2823
- e.flexible && T && T.parentElement && (T.parentElement.style.minWidth = "0"), s.value = {
2824
- width: f.value = T.offsetWidth,
2825
- height: T.offsetHeight,
2826
- headerHeight: e.showHeader && S ? S.offsetHeight : null
2827
- }, n.states.columns.value.forEach((M) => {
2828
- M.filteredValue && M.filteredValue.length && l.store.commit("filterChange", {
2829
- column: M,
2830
- values: M.filteredValue,
2831
- silent: !0
2832
- });
2833
- }), l.$ready = !0;
2834
- });
2835
- const w = (T, S) => {
2836
- if (!T)
2837
- return;
2838
- const M = Array.from(T.classList).filter((q) => !q.startsWith("is-scrolling-"));
2839
- M.push(t.scrollX.value ? S : "is-scrolling-none"), T.className = M.join(" ");
2840
- }, m = (T) => {
2841
- const { tableWrapper: S } = l.refs;
2842
- w(S, T);
2843
- }, E = (T) => {
2844
- const { tableWrapper: S } = l.refs;
2845
- return !!(S && S.classList.contains(T));
2846
- }, N = function() {
2847
- if (!l.refs.scrollBarRef)
2848
- return;
2849
- if (!t.scrollX.value) {
2850
- const ue = "is-scrolling-none";
2851
- E(ue) || m(ue);
2852
- return;
2853
- }
2854
- const T = l.refs.scrollBarRef.wrapRef;
2855
- if (!T)
2856
- return;
2857
- const { scrollLeft: S, offsetWidth: M, scrollWidth: q } = T, { headerWrapper: Q, footerWrapper: J } = l.refs;
2858
- Q && (Q.scrollLeft = S), J && (J.scrollLeft = S);
2859
- const se = q - M - 1;
2860
- S >= se ? m("is-scrolling-right") : m(S === 0 ? "is-scrolling-left" : "is-scrolling-middle");
2861
- }, W = () => {
2862
- l.refs.scrollBarRef && (l.refs.scrollBarRef.wrapRef && nl(l.refs.scrollBarRef.wrapRef, "scroll", N, {
2863
- passive: !0
2864
- }), e.fit ? ol(l.vnode.el, z) : nl(window, "resize", z), ol(l.refs.bodyWrapper, () => {
2865
- var T, S;
2866
- z(), (S = (T = l.refs) == null ? void 0 : T.scrollBarRef) == null || S.update();
2867
- }));
2868
- }, z = () => {
2869
- var T, S, M, q;
2870
- const Q = l.vnode.el;
2871
- if (!l.$ready || !Q)
2872
- return;
2873
- let J = !1;
2874
- const {
2875
- width: se,
2876
- height: ue,
2877
- headerHeight: ye
2878
- } = s.value, le = f.value = Q.offsetWidth;
2879
- se !== le && (J = !0);
2880
- const me = Q.offsetHeight;
2881
- (e.height || x.value) && ue !== me && (J = !0);
2882
- const ge = e.tableLayout === "fixed" ? l.refs.headerWrapper : (T = l.refs.tableHeaderRef) == null ? void 0 : T.$el;
2883
- e.showHeader && (ge == null ? void 0 : ge.offsetHeight) !== ye && (J = !0), p.value = ((S = l.refs.tableWrapper) == null ? void 0 : S.scrollHeight) || 0, h.value = (ge == null ? void 0 : ge.scrollHeight) || 0, y.value = ((M = l.refs.footerWrapper) == null ? void 0 : M.offsetHeight) || 0, b.value = ((q = l.refs.appendWrapper) == null ? void 0 : q.offsetHeight) || 0, g.value = p.value - h.value - y.value - b.value, J && (s.value = {
2884
- width: le,
2885
- height: me,
2886
- headerHeight: e.showHeader && (ge == null ? void 0 : ge.offsetHeight) || 0
2887
- }, v());
2888
- }, B = bt(), D = O(() => {
2889
- const { bodyWidth: T, scrollY: S, gutterWidth: M } = t;
2890
- return T.value ? `${T.value - (S.value ? M : 0)}px` : "";
2891
- }), U = O(() => e.maxHeight ? "fixed" : e.tableLayout), V = O(() => {
2892
- if (e.data && e.data.length)
2893
- return null;
2894
- let T = "100%";
2895
- e.height && g.value && (T = `${g.value}px`);
2896
- const S = f.value;
2897
- return {
2898
- width: S ? `${S}px` : "",
2899
- height: T
2900
- };
2901
- }), _ = O(() => e.height ? {
2902
- height: "100%"
2903
- } : e.maxHeight ? Number.isNaN(Number(e.maxHeight)) ? {
2904
- maxHeight: `calc(${e.maxHeight} - ${h.value + y.value}px)`
2905
- } : {
2906
- maxHeight: `${e.maxHeight - h.value - y.value}px`
2907
- } : {});
2908
- return {
2909
- isHidden: a,
2910
- renderExpanded: r,
2911
- setDragVisible: o,
2912
- isGroup: u,
2913
- handleMouseLeave: C,
2914
- handleHeaderFooterMousewheel: L,
2915
- tableSize: B,
2916
- emptyBlockStyle: V,
2917
- handleFixedMousewheel: (T, S) => {
2918
- const M = l.refs.bodyWrapper;
2919
- if (Math.abs(S.spinY) > 0) {
2920
- const q = M.scrollTop;
2921
- S.pixelY < 0 && q !== 0 && T.preventDefault(), S.pixelY > 0 && M.scrollHeight - M.clientHeight > q && T.preventDefault(), M.scrollTop += Math.ceil(S.pixelY / 5);
2922
- } else
2923
- M.scrollLeft += Math.ceil(S.pixelX / 5);
2924
- },
2925
- resizeProxyVisible: i,
2926
- bodyWidth: D,
2927
- resizeState: s,
2928
- doLayout: v,
2929
- tableBodyStyles: d,
2930
- tableLayout: U,
2931
- scrollbarViewStyle: c,
2932
- scrollbarStyle: _
2933
- };
2934
- }
2935
- function Na(e) {
2936
- const t = k(), n = () => {
2937
- const a = e.vnode.el.querySelector(".hidden-columns"), r = { childList: !0, subtree: !0 }, i = e.store.states.updateOrderFns;
2938
- t.value = new MutationObserver(() => {
2939
- i.forEach((o) => o());
2940
- }), t.value.observe(a, r);
2941
- };
2942
- Xe(() => {
2943
- n();
2944
- }), Wt(() => {
2945
- var l;
2946
- (l = t.value) == null || l.disconnect();
2947
- });
2948
- }
2949
- var Fa = {
2950
- data: {
2951
- type: Array,
2952
- default: () => []
2953
- },
2954
- size: $t,
2955
- width: [String, Number],
2956
- height: [String, Number],
2957
- maxHeight: [String, Number],
2958
- fit: {
2959
- type: Boolean,
2960
- default: !0
2961
- },
2962
- stripe: Boolean,
2963
- border: Boolean,
2964
- rowKey: [String, Function],
2965
- showHeader: {
2966
- type: Boolean,
2967
- default: !0
2968
- },
2969
- showSummary: Boolean,
2970
- sumText: String,
2971
- summaryMethod: Function,
2972
- rowClassName: [String, Function],
2973
- rowStyle: [Object, Function],
2974
- cellClassName: [String, Function],
2975
- cellStyle: [Object, Function],
2976
- headerRowClassName: [String, Function],
2977
- headerRowStyle: [Object, Function],
2978
- headerCellClassName: [String, Function],
2979
- headerCellStyle: [Object, Function],
2980
- highlightCurrentRow: Boolean,
2981
- currentRowKey: [String, Number],
2982
- emptyText: String,
2983
- expandRowKeys: Array,
2984
- defaultExpandAll: Boolean,
2985
- defaultSort: Object,
2986
- tooltipEffect: String,
2987
- tooltipOptions: Object,
2988
- spanMethod: Function,
2989
- selectOnIndeterminate: {
2990
- type: Boolean,
2991
- default: !0
2992
- },
2993
- indent: {
2994
- type: Number,
2995
- default: 16
2996
- },
2997
- treeProps: {
2998
- type: Object,
2999
- default: () => ({
3000
- hasChildren: "hasChildren",
3001
- children: "children",
3002
- checkStrictly: !1
3003
- })
3004
- },
3005
- lazy: Boolean,
3006
- load: Function,
3007
- style: {
3008
- type: Object,
3009
- default: () => ({})
3010
- },
3011
- className: {
3012
- type: String,
3013
- default: ""
3014
- },
3015
- tableLayout: {
3016
- type: String,
3017
- default: "fixed"
3018
- },
3019
- scrollbarAlwaysOn: Boolean,
3020
- flexible: Boolean,
3021
- showOverflowTooltip: [Boolean, Object],
3022
- tooltipFormatter: Function,
3023
- appendFilterPanelTo: String,
3024
- scrollbarTabindex: {
3025
- type: [Number, String],
3026
- default: void 0
3027
- },
3028
- allowDragLastColumn: {
3029
- type: Boolean,
3030
- default: !0
3031
- }
3032
- };
3033
- function jl(e) {
3034
- const t = e.tableLayout === "auto";
3035
- let n = e.columns || [];
3036
- t && n.every(({ width: a }) => Ee(a)) && (n = []);
3037
- const l = (a) => {
3038
- const r = {
3039
- key: `${e.tableLayout}_${a.id}`,
3040
- style: {},
3041
- name: void 0
3042
- };
3043
- return t ? r.style = {
3044
- width: `${a.width}px`
3045
- } : r.name = a.id, r;
3046
- };
3047
- return A("colgroup", {}, n.map((a) => A("col", l(a))));
3048
- }
3049
- jl.props = ["columns", "tableLayout"];
3050
- const Ta = () => {
3051
- const e = k(), t = (r, i) => {
3052
- const o = e.value;
3053
- o && o.scrollTo(r, i);
3054
- }, n = (r, i) => {
3055
- const o = e.value;
3056
- o && Oe(i) && ["Top", "Left"].includes(r) && o[`setScroll${r}`](i);
3057
- };
3058
- return {
3059
- scrollBarRef: e,
3060
- scrollTo: t,
3061
- setScrollTop: (r) => n("Top", r),
3062
- setScrollLeft: (r) => n("Left", r)
3063
- };
3064
- };
3065
- var il = !1, $e, Et, kt, nt, ot, Ul, at, Lt, Rt, Nt, Gl, Ft, Tt, Yl, ql;
3066
- function de() {
3067
- if (!il) {
3068
- il = !0;
3069
- var e = navigator.userAgent, t = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), n = /(Mac OS X)|(Windows)|(Linux)/.exec(e);
3070
- if (Ft = /\b(iPhone|iP[ao]d)/.exec(e), Tt = /\b(iP[ao]d)/.exec(e), Nt = /Android/i.exec(e), Yl = /FBAN\/\w+;/i.exec(e), ql = /Mobile/i.exec(e), Gl = !!/Win64/.exec(e), t) {
3071
- $e = t[1] ? parseFloat(t[1]) : t[5] ? parseFloat(t[5]) : NaN, $e && document && document.documentMode && ($e = document.documentMode);
3072
- var l = /(?:Trident\/(\d+.\d+))/.exec(e);
3073
- Ul = l ? parseFloat(l[1]) + 4 : $e, Et = t[2] ? parseFloat(t[2]) : NaN, kt = t[3] ? parseFloat(t[3]) : NaN, nt = t[4] ? parseFloat(t[4]) : NaN, nt ? (t = /(?:Chrome\/(\d+\.\d+))/.exec(e), ot = t && t[1] ? parseFloat(t[1]) : NaN) : ot = NaN;
3074
- } else
3075
- $e = Et = kt = ot = nt = NaN;
3076
- if (n) {
3077
- if (n[1]) {
3078
- var a = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
3079
- at = a ? parseFloat(a[1].replace("_", ".")) : !0;
3080
- } else
3081
- at = !1;
3082
- Lt = !!n[2], Rt = !!n[3];
3083
- } else
3084
- at = Lt = Rt = !1;
3085
- }
3086
- }
3087
- var Ot = { ie: function() {
3088
- return de() || $e;
3089
- }, ieCompatibilityMode: function() {
3090
- return de() || Ul > $e;
3091
- }, ie64: function() {
3092
- return Ot.ie() && Gl;
3093
- }, firefox: function() {
3094
- return de() || Et;
3095
- }, opera: function() {
3096
- return de() || kt;
3097
- }, webkit: function() {
3098
- return de() || nt;
3099
- }, safari: function() {
3100
- return Ot.webkit();
3101
- }, chrome: function() {
3102
- return de() || ot;
3103
- }, windows: function() {
3104
- return de() || Lt;
3105
- }, osx: function() {
3106
- return de() || at;
3107
- }, linux: function() {
3108
- return de() || Rt;
3109
- }, iphone: function() {
3110
- return de() || Ft;
3111
- }, mobile: function() {
3112
- return de() || Ft || Tt || Nt || ql;
3113
- }, nativeApp: function() {
3114
- return de() || Yl;
3115
- }, android: function() {
3116
- return de() || Nt;
3117
- }, ipad: function() {
3118
- return de() || Tt;
3119
- } }, Oa = Ot, tt = !!(typeof window < "u" && window.document && window.document.createElement), Ma = { canUseDOM: tt, canUseWorkers: typeof Worker < "u", canUseEventListeners: tt && !!(window.addEventListener || window.attachEvent), canUseViewport: tt && !!window.screen, isInWorker: !tt }, Xl = Ma, Ql;
3120
- Xl.canUseDOM && (Ql = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0);
3121
- function Wa(e, t) {
3122
- if (!Xl.canUseDOM || t && !("addEventListener" in document))
3123
- return !1;
3124
- var n = "on" + e, l = n in document;
3125
- if (!l) {
3126
- var a = document.createElement("div");
3127
- a.setAttribute(n, "return;"), l = typeof a[n] == "function";
3128
- }
3129
- return !l && Ql && e === "wheel" && (l = document.implementation.hasFeature("Events.wheel", "3.0")), l;
3130
- }
3131
- var $a = Wa, ul = 10, cl = 40, dl = 800;
3132
- function Jl(e) {
3133
- var t = 0, n = 0, l = 0, a = 0;
3134
- return "detail" in e && (n = e.detail), "wheelDelta" in e && (n = -e.wheelDelta / 120), "wheelDeltaY" in e && (n = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = n, n = 0), l = t * ul, a = n * ul, "deltaY" in e && (a = e.deltaY), "deltaX" in e && (l = e.deltaX), (l || a) && e.deltaMode && (e.deltaMode == 1 ? (l *= cl, a *= cl) : (l *= dl, a *= dl)), l && !t && (t = l < 1 ? -1 : 1), a && !n && (n = a < 1 ? -1 : 1), { spinX: t, spinY: n, pixelX: l, pixelY: a };
3135
- }
3136
- Jl.getEventType = function() {
3137
- return Oa.firefox() ? "DOMMouseScroll" : $a("wheel") ? "wheel" : "mousewheel";
3138
- };
3139
- var Ba = Jl;
3140
- /**
3141
- * Checks if an event is supported in the current execution environment.
3142
- *
3143
- * NOTE: This will not work correctly for non-generic events such as `change`,
3144
- * `reset`, `load`, `error`, and `select`.
3145
- *
3146
- * Borrows from Modernizr.
3147
- *
3148
- * @param {string} eventNameSuffix Event name, e.g. "click".
3149
- * @param {?boolean} capture Check if the capture phase is supported.
3150
- * @return {boolean} True if the event is supported.
3151
- * @internal
3152
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
3153
- */
3154
- const Ha = function(e, t) {
3155
- if (e && e.addEventListener) {
3156
- const n = function(l) {
3157
- const a = Ba(l);
3158
- t && Reflect.apply(t, this, [l, a]);
3159
- };
3160
- e.addEventListener("wheel", n, { passive: !0 });
3161
- }
3162
- }, Pa = {
3163
- beforeMount(e, t) {
3164
- Ha(e, t.value);
3165
- }
3166
- };
3167
- let Aa = 1;
3168
- const Va = ae({
3169
- name: "ElTable",
3170
- directives: {
3171
- Mousewheel: Pa
3172
- },
3173
- components: {
3174
- TableHeader: pa,
3175
- TableBody: Sa,
3176
- TableFooter: ka,
3177
- ElScrollbar: Sl,
3178
- hColgroup: jl
3179
- },
3180
- props: Fa,
3181
- emits: [
3182
- "select",
3183
- "select-all",
3184
- "selection-change",
3185
- "cell-mouse-enter",
3186
- "cell-mouse-leave",
3187
- "cell-contextmenu",
3188
- "cell-click",
3189
- "cell-dblclick",
3190
- "row-click",
3191
- "row-contextmenu",
3192
- "row-dblclick",
3193
- "header-click",
3194
- "header-contextmenu",
3195
- "sort-change",
3196
- "filter-change",
3197
- "current-change",
3198
- "header-dragend",
3199
- "expand-change",
3200
- "scroll"
3201
- ],
3202
- setup(e) {
3203
- const { t } = zt(), n = ie("table"), l = oe();
3204
- pl(Re, l);
3205
- const a = oa(l, e);
3206
- l.store = a;
3207
- const r = new sa({
3208
- store: l.store,
3209
- table: l,
3210
- fit: e.fit,
3211
- showHeader: e.showHeader
3212
- });
3213
- l.layout = r;
3214
- const i = O(() => (a.states.data.value || []).length === 0), {
3215
- setCurrentRow: o,
3216
- getSelectionRows: s,
3217
- toggleRowSelection: u,
3218
- clearSelection: c,
3219
- clearFilter: f,
3220
- toggleAllSelection: p,
3221
- toggleRowExpansion: g,
3222
- clearSort: h,
3223
- sort: y,
3224
- updateKeyChildren: b
3225
- } = La(a), {
3226
- isHidden: C,
3227
- renderExpanded: L,
3228
- setDragVisible: x,
3229
- isGroup: d,
3230
- handleMouseLeave: v,
3231
- handleHeaderFooterMousewheel: w,
3232
- tableSize: m,
3233
- emptyBlockStyle: E,
3234
- handleFixedMousewheel: N,
3235
- resizeProxyVisible: W,
3236
- bodyWidth: z,
3237
- resizeState: B,
3238
- doLayout: D,
3239
- tableBodyStyles: U,
3240
- tableLayout: V,
3241
- scrollbarViewStyle: _,
3242
- scrollbarStyle: G
3243
- } = Ra(e, r, a, l), { scrollBarRef: T, scrollTo: S, setScrollLeft: M, setScrollTop: q } = Ta(), Q = ct(D, 50), J = `${n.namespace.value}-table_${Aa++}`;
3244
- l.tableId = J, l.state = {
3245
- isGroup: d,
3246
- resizeState: B,
3247
- doLayout: D,
3248
- debouncedUpdateLayout: Q
3249
- };
3250
- const se = O(() => {
3251
- var le;
3252
- return (le = e.sumText) != null ? le : t("el.table.sumText");
3253
- }), ue = O(() => {
3254
- var le;
3255
- return (le = e.emptyText) != null ? le : t("el.table.emptyText");
3256
- }), ye = O(() => _l(a.states.originColumns.value)[0]);
3257
- return Na(l), bl(() => {
3258
- Q.cancel();
3259
- }), {
3260
- ns: n,
3261
- layout: r,
3262
- store: a,
3263
- columns: ye,
3264
- handleHeaderFooterMousewheel: w,
3265
- handleMouseLeave: v,
3266
- tableId: J,
3267
- tableSize: m,
3268
- isHidden: C,
3269
- isEmpty: i,
3270
- renderExpanded: L,
3271
- resizeProxyVisible: W,
3272
- resizeState: B,
3273
- isGroup: d,
3274
- bodyWidth: z,
3275
- tableBodyStyles: U,
3276
- emptyBlockStyle: E,
3277
- debouncedUpdateLayout: Q,
3278
- handleFixedMousewheel: N,
3279
- setCurrentRow: o,
3280
- getSelectionRows: s,
3281
- toggleRowSelection: u,
3282
- clearSelection: c,
3283
- clearFilter: f,
3284
- toggleAllSelection: p,
3285
- toggleRowExpansion: g,
3286
- clearSort: h,
3287
- doLayout: D,
3288
- sort: y,
3289
- updateKeyChildren: b,
3290
- t,
3291
- setDragVisible: x,
3292
- context: l,
3293
- computedSumText: se,
3294
- computedEmptyText: ue,
3295
- tableLayout: V,
3296
- scrollbarViewStyle: _,
3297
- scrollbarStyle: G,
3298
- scrollBarRef: T,
3299
- scrollTo: S,
3300
- setScrollLeft: M,
3301
- setScrollTop: q,
3302
- allowDragLastColumn: e.allowDragLastColumn
3303
- };
3304
- }
3305
- });
3306
- function Ka(e, t, n, l, a, r) {
3307
- const i = we("hColgroup"), o = we("table-header"), s = we("table-body"), u = we("table-footer"), c = we("el-scrollbar"), f = ml("mousewheel");
3308
- return K(), X("div", {
3309
- ref: "tableWrapper",
3310
- class: H([
3311
- {
3312
- [e.ns.m("fit")]: e.fit,
3313
- [e.ns.m("striped")]: e.stripe,
3314
- [e.ns.m("border")]: e.border || e.isGroup,
3315
- [e.ns.m("hidden")]: e.isHidden,
3316
- [e.ns.m("group")]: e.isGroup,
3317
- [e.ns.m("fluid-height")]: e.maxHeight,
3318
- [e.ns.m("scrollable-x")]: e.layout.scrollX.value,
3319
- [e.ns.m("scrollable-y")]: e.layout.scrollY.value,
3320
- [e.ns.m("enable-row-hover")]: !e.store.states.isComplex.value,
3321
- [e.ns.m("enable-row-transition")]: (e.store.states.data.value || []).length !== 0 && (e.store.states.data.value || []).length < 100,
3322
- "has-footer": e.showSummary
3323
- },
3324
- e.ns.m(e.tableSize),
3325
- e.className,
3326
- e.ns.b(),
3327
- e.ns.m(`layout-${e.tableLayout}`)
3328
- ]),
3329
- style: We(e.style),
3330
- "data-prefix": e.ns.namespace.value,
3331
- onMouseleave: e.handleMouseLeave
3332
- }, [
3333
- te("div", {
3334
- class: H(e.ns.e("inner-wrapper"))
3335
- }, [
3336
- te("div", {
3337
- ref: "hiddenColumns",
3338
- class: "hidden-columns"
3339
- }, [
3340
- xe(e.$slots, "default")
3341
- ], 512),
3342
- e.showHeader && e.tableLayout === "fixed" ? Te((K(), X("div", {
3343
- key: 0,
3344
- ref: "headerWrapper",
3345
- class: H(e.ns.e("header-wrapper"))
3346
- }, [
3347
- te("table", {
3348
- ref: "tableHeader",
3349
- class: H(e.ns.e("header")),
3350
- style: We(e.tableBodyStyles),
3351
- border: "0",
3352
- cellpadding: "0",
3353
- cellspacing: "0"
3354
- }, [
3355
- be(i, {
3356
- columns: e.store.states.columns.value,
3357
- "table-layout": e.tableLayout
3358
- }, null, 8, ["columns", "table-layout"]),
3359
- be(o, {
3360
- ref: "tableHeaderRef",
3361
- border: e.border,
3362
- "default-sort": e.defaultSort,
3363
- store: e.store,
3364
- "append-filter-panel-to": e.appendFilterPanelTo,
3365
- "allow-drag-last-column": e.allowDragLastColumn,
3366
- onSetDragVisible: e.setDragVisible
3367
- }, null, 8, ["border", "default-sort", "store", "append-filter-panel-to", "allow-drag-last-column", "onSetDragVisible"])
3368
- ], 6)
3369
- ], 2)), [
3370
- [f, e.handleHeaderFooterMousewheel]
3371
- ]) : Ce("v-if", !0),
3372
- te("div", {
3373
- ref: "bodyWrapper",
3374
- class: H(e.ns.e("body-wrapper"))
3375
- }, [
3376
- be(c, {
3377
- ref: "scrollBarRef",
3378
- "view-style": e.scrollbarViewStyle,
3379
- "wrap-style": e.scrollbarStyle,
3380
- always: e.scrollbarAlwaysOn,
3381
- tabindex: e.scrollbarTabindex,
3382
- onScroll: (p) => e.$emit("scroll", p)
3383
- }, {
3384
- default: he(() => [
3385
- te("table", {
3386
- ref: "tableBody",
3387
- class: H(e.ns.e("body")),
3388
- cellspacing: "0",
3389
- cellpadding: "0",
3390
- border: "0",
3391
- style: We({
3392
- width: e.bodyWidth,
3393
- tableLayout: e.tableLayout
3394
- })
3395
- }, [
3396
- be(i, {
3397
- columns: e.store.states.columns.value,
3398
- "table-layout": e.tableLayout
3399
- }, null, 8, ["columns", "table-layout"]),
3400
- e.showHeader && e.tableLayout === "auto" ? (K(), Le(o, {
3401
- key: 0,
3402
- ref: "tableHeaderRef",
3403
- class: H(e.ns.e("body-header")),
3404
- border: e.border,
3405
- "default-sort": e.defaultSort,
3406
- store: e.store,
3407
- "append-filter-panel-to": e.appendFilterPanelTo,
3408
- onSetDragVisible: e.setDragVisible
3409
- }, null, 8, ["class", "border", "default-sort", "store", "append-filter-panel-to", "onSetDragVisible"])) : Ce("v-if", !0),
3410
- be(s, {
3411
- context: e.context,
3412
- highlight: e.highlightCurrentRow,
3413
- "row-class-name": e.rowClassName,
3414
- "tooltip-effect": e.tooltipEffect,
3415
- "tooltip-options": e.tooltipOptions,
3416
- "row-style": e.rowStyle,
3417
- store: e.store,
3418
- stripe: e.stripe
3419
- }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "tooltip-options", "row-style", "store", "stripe"]),
3420
- e.showSummary && e.tableLayout === "auto" ? (K(), Le(u, {
3421
- key: 1,
3422
- class: H(e.ns.e("body-footer")),
3423
- border: e.border,
3424
- "default-sort": e.defaultSort,
3425
- store: e.store,
3426
- "sum-text": e.computedSumText,
3427
- "summary-method": e.summaryMethod
3428
- }, null, 8, ["class", "border", "default-sort", "store", "sum-text", "summary-method"])) : Ce("v-if", !0)
3429
- ], 6),
3430
- e.isEmpty ? (K(), X("div", {
3431
- key: 0,
3432
- ref: "emptyBlock",
3433
- style: We(e.emptyBlockStyle),
3434
- class: H(e.ns.e("empty-block"))
3435
- }, [
3436
- te("span", {
3437
- class: H(e.ns.e("empty-text"))
3438
- }, [
3439
- xe(e.$slots, "empty", {}, () => [
3440
- Be(ke(e.computedEmptyText), 1)
3441
- ])
3442
- ], 2)
3443
- ], 6)) : Ce("v-if", !0),
3444
- e.$slots.append ? (K(), X("div", {
3445
- key: 1,
3446
- ref: "appendWrapper",
3447
- class: H(e.ns.e("append-wrapper"))
3448
- }, [
3449
- xe(e.$slots, "append")
3450
- ], 2)) : Ce("v-if", !0)
3451
- ]),
3452
- _: 3
3453
- }, 8, ["view-style", "wrap-style", "always", "tabindex", "onScroll"])
3454
- ], 2),
3455
- e.showSummary && e.tableLayout === "fixed" ? Te((K(), X("div", {
3456
- key: 1,
3457
- ref: "footerWrapper",
3458
- class: H(e.ns.e("footer-wrapper"))
3459
- }, [
3460
- te("table", {
3461
- class: H(e.ns.e("footer")),
3462
- cellspacing: "0",
3463
- cellpadding: "0",
3464
- border: "0",
3465
- style: We(e.tableBodyStyles)
3466
- }, [
3467
- be(i, {
3468
- columns: e.store.states.columns.value,
3469
- "table-layout": e.tableLayout
3470
- }, null, 8, ["columns", "table-layout"]),
3471
- be(u, {
3472
- border: e.border,
3473
- "default-sort": e.defaultSort,
3474
- store: e.store,
3475
- "sum-text": e.computedSumText,
3476
- "summary-method": e.summaryMethod
3477
- }, null, 8, ["border", "default-sort", "store", "sum-text", "summary-method"])
3478
- ], 6)
3479
- ], 2)), [
3480
- [Qt, !e.isEmpty],
3481
- [f, e.handleHeaderFooterMousewheel]
3482
- ]) : Ce("v-if", !0),
3483
- e.border || e.isGroup ? (K(), X("div", {
3484
- key: 2,
3485
- class: H(e.ns.e("border-left-patch"))
3486
- }, null, 2)) : Ce("v-if", !0)
3487
- ], 2),
3488
- Te(te("div", {
3489
- ref: "resizeProxy",
3490
- class: H(e.ns.e("column-resize-proxy"))
3491
- }, null, 2), [
3492
- [Qt, e.resizeProxyVisible]
3493
- ])
3494
- ], 46, ["data-prefix", "onMouseleave"]);
3495
- }
3496
- var za = /* @__PURE__ */ Pe(Va, [["render", Ka], ["__file", "table.vue"]]);
3497
- const Ia = {
3498
- selection: "table-column--selection",
3499
- expand: "table__expand-column"
3500
- }, Da = {
3501
- default: {
3502
- order: ""
3503
- },
3504
- selection: {
3505
- width: 48,
3506
- minWidth: 48,
3507
- realWidth: 48,
3508
- order: ""
3509
- },
3510
- expand: {
3511
- width: 48,
3512
- minWidth: 48,
3513
- realWidth: 48,
3514
- order: ""
3515
- },
3516
- index: {
3517
- width: 48,
3518
- minWidth: 48,
3519
- realWidth: 48,
3520
- order: ""
3521
- }
3522
- }, _a = (e) => Ia[e] || "", ja = {
3523
- selection: {
3524
- renderHeader({ store: e, column: t }) {
3525
- function n() {
3526
- return e.states.data.value && e.states.data.value.length === 0;
3527
- }
3528
- return A(Ae, {
3529
- disabled: n(),
3530
- size: e.states.tableSize.value,
3531
- indeterminate: e.states.selection.value.length > 0 && !e.states.isAllSelected.value,
3532
- "onUpdate:modelValue": e.toggleAllSelection,
3533
- modelValue: e.states.isAllSelected.value,
3534
- ariaLabel: t.label
3535
- });
3536
- },
3537
- renderCell({
3538
- row: e,
3539
- column: t,
3540
- store: n,
3541
- $index: l
3542
- }) {
3543
- return A(Ae, {
3544
- disabled: t.selectable ? !t.selectable.call(null, e, l) : !1,
3545
- size: n.states.tableSize.value,
3546
- onChange: () => {
3547
- n.commit("rowSelectedChanged", e);
3548
- },
3549
- onClick: (a) => a.stopPropagation(),
3550
- modelValue: n.isSelected(e),
3551
- ariaLabel: t.label
3552
- });
3553
- },
3554
- sortable: !1,
3555
- resizable: !1
3556
- },
3557
- index: {
3558
- renderHeader({ column: e }) {
3559
- return e.label || "#";
3560
- },
3561
- renderCell({
3562
- column: e,
3563
- $index: t
3564
- }) {
3565
- let n = t + 1;
3566
- const l = e.index;
3567
- return Oe(l) ? n = t + l : Se(l) && (n = l(t)), A("div", {}, [n]);
3568
- },
3569
- sortable: !1
3570
- },
3571
- expand: {
3572
- renderHeader({ column: e }) {
3573
- return e.label || "";
3574
- },
3575
- renderCell({
3576
- row: e,
3577
- store: t,
3578
- expanded: n
3579
- }) {
3580
- const { ns: l } = t, a = [l.e("expand-icon")];
3581
- return n && a.push(l.em("expand-icon", "expanded")), A("div", {
3582
- class: a,
3583
- onClick: function(i) {
3584
- i.stopPropagation(), t.toggleRowExpansion(e);
3585
- }
3586
- }, {
3587
- default: () => [
3588
- A(ft, null, {
3589
- default: () => [A(Cl)]
3590
- })
3591
- ]
3592
- });
3593
- },
3594
- sortable: !1,
3595
- resizable: !1
3596
- }
3597
- };
3598
- function Ua({
3599
- row: e,
3600
- column: t,
3601
- $index: n
3602
- }) {
3603
- var l;
3604
- const a = t.property, r = a && Ll(e, a).value;
3605
- return t && t.formatter ? t.formatter(e, t, r, n) : ((l = r == null ? void 0 : r.toString) == null ? void 0 : l.call(r)) || "";
3606
- }
3607
- function Ga({
3608
- row: e,
3609
- treeNode: t,
3610
- store: n
3611
- }, l = !1) {
3612
- const { ns: a } = n;
3613
- if (!t)
3614
- return l ? [
3615
- A("span", {
3616
- class: a.e("placeholder")
3617
- })
3618
- ] : null;
3619
- const r = [], i = function(o) {
3620
- o.stopPropagation(), !t.loading && n.loadOrToggle(e);
3621
- };
3622
- if (t.indent && r.push(A("span", {
3623
- class: a.e("indent"),
3624
- style: { "padding-left": `${t.indent}px` }
3625
- })), Ne(t.expanded) && !t.noLazyChildren) {
3626
- const o = [
3627
- a.e("expand-icon"),
3628
- t.expanded ? a.em("expand-icon", "expanded") : ""
3629
- ];
3630
- let s = Cl;
3631
- t.loading && (s = Tn), r.push(A("div", {
3632
- class: o,
3633
- onClick: i
3634
- }, {
3635
- default: () => [
3636
- A(ft, { class: { [a.is("loading")]: t.loading } }, {
3637
- default: () => [A(s)]
3638
- })
3639
- ]
3640
- }));
3641
- } else
3642
- r.push(A("span", {
3643
- class: a.e("placeholder")
3644
- }));
3645
- return r;
3646
- }
3647
- function fl(e, t) {
3648
- return e.reduce((n, l) => (n[l] = l, n), t);
3649
- }
3650
- function Ya(e, t) {
3651
- const n = oe();
3652
- return {
3653
- registerComplexWatchers: () => {
3654
- const r = ["fixed"], i = {
3655
- realWidth: "width",
3656
- realMinWidth: "minWidth"
3657
- }, o = fl(r, i);
3658
- Object.keys(o).forEach((s) => {
3659
- const u = i[s];
3660
- Ge(t, u) && pe(() => t[u], (c) => {
3661
- let f = c;
3662
- u === "width" && s === "realWidth" && (f = It(c)), u === "minWidth" && s === "realMinWidth" && (f = Al(c)), n.columnConfig.value[u] = f, n.columnConfig.value[s] = f;
3663
- const p = u === "fixed";
3664
- e.value.store.scheduleLayout(p);
3665
- });
3666
- });
3667
- },
3668
- registerNormalWatchers: () => {
3669
- const r = [
3670
- "label",
3671
- "filters",
3672
- "filterMultiple",
3673
- "filteredValue",
3674
- "sortable",
3675
- "index",
3676
- "formatter",
3677
- "className",
3678
- "labelClassName",
3679
- "filterClassName",
3680
- "showOverflowTooltip",
3681
- "tooltipFormatter"
3682
- ], i = {
3683
- property: "prop",
3684
- align: "realAlign",
3685
- headerAlign: "realHeaderAlign"
3686
- }, o = fl(r, i);
3687
- Object.keys(o).forEach((s) => {
3688
- const u = i[s];
3689
- Ge(t, u) && pe(() => t[u], (c) => {
3690
- n.columnConfig.value[s] = c;
3691
- });
3692
- });
3693
- }
3694
- };
3695
- }
3696
- function qa(e, t, n) {
3697
- const l = oe(), a = k(""), r = k(!1), i = k(), o = k(), s = ie("table");
3698
- Ie(() => {
3699
- i.value = e.align ? `is-${e.align}` : null, i.value;
3700
- }), Ie(() => {
3701
- o.value = e.headerAlign ? `is-${e.headerAlign}` : i.value, o.value;
3702
- });
3703
- const u = O(() => {
3704
- let d = l.vnode.vParent || l.parent;
3705
- for (; d && !d.tableId && !d.columnId; )
3706
- d = d.vnode.vParent || d.parent;
3707
- return d;
3708
- }), c = O(() => {
3709
- const { store: d } = l.parent;
3710
- if (!d)
3711
- return !1;
3712
- const { treeData: v } = d.states, w = v.value;
3713
- return w && Object.keys(w).length > 0;
3714
- }), f = k(It(e.width)), p = k(Al(e.minWidth)), g = (d) => (f.value && (d.width = f.value), p.value && (d.minWidth = p.value), !f.value && p.value && (d.width = void 0), d.minWidth || (d.minWidth = 80), d.realWidth = Number(Ee(d.width) ? d.minWidth : d.width), d), h = (d) => {
3715
- const v = d.type, w = ja[v] || {};
3716
- Object.keys(w).forEach((E) => {
3717
- const N = w[E];
3718
- E !== "className" && !Ee(N) && (d[E] = N);
3719
- });
3720
- const m = _a(v);
3721
- if (m) {
3722
- const E = `${R(s.namespace)}-${m}`;
3723
- d.className = d.className ? `${d.className} ${E}` : E;
3724
- }
3725
- return d;
3726
- }, y = (d) => {
3727
- ee(d) ? d.forEach((w) => v(w)) : v(d);
3728
- function v(w) {
3729
- var m;
3730
- ((m = w == null ? void 0 : w.type) == null ? void 0 : m.name) === "ElTableColumn" && (w.vParent = l);
3731
- }
3732
- };
3733
- return {
3734
- columnId: a,
3735
- realAlign: i,
3736
- isSubColumn: r,
3737
- realHeaderAlign: o,
3738
- columnOrTableParent: u,
3739
- setColumnWidth: g,
3740
- setColumnForcedProps: h,
3741
- setColumnRenders: (d) => {
3742
- e.renderHeader ? At("TableColumn", "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.") : d.type !== "selection" && (d.renderHeader = (w) => (l.columnConfig.value.label, xe(t, "header", w, () => [d.label]))), t["filter-icon"] && (d.renderFilterIcon = (w) => xe(t, "filter-icon", w));
3743
- let v = d.renderCell;
3744
- return d.type === "expand" ? (d.renderCell = (w) => A("div", {
3745
- class: "cell"
3746
- }, [v(w)]), n.value.renderExpanded = (w) => t.default ? t.default(w) : t.default) : (v = v || Ua, d.renderCell = (w) => {
3747
- let m = null;
3748
- if (t.default) {
3749
- const D = t.default(w);
3750
- m = D.some((U) => U.type !== Sn) ? D : v(w);
3751
- } else
3752
- m = v(w);
3753
- const { columns: E } = n.value.store.states, N = E.value.findIndex((D) => D.type === "default"), W = c.value && w.cellIndex === N, z = Ga(w, W), B = {
3754
- class: "cell",
3755
- style: {}
3756
- };
3757
- return d.showOverflowTooltip && (B.class = `${B.class} ${R(s.namespace)}-tooltip`, B.style = {
3758
- width: `${(w.column.realWidth || Number(w.column.width)) - 1}px`
3759
- }), y(m), A("div", B, [z, m]);
3760
- }), d;
3761
- },
3762
- getPropsData: (...d) => d.reduce((v, w) => (ee(w) && w.forEach((m) => {
3763
- v[m] = e[m];
3764
- }), v), {}),
3765
- getColumnElIndex: (d, v) => Array.prototype.indexOf.call(d, v),
3766
- updateColumnOrder: () => {
3767
- n.value.store.commit("updateColumnOrder", l.columnConfig.value);
3768
- }
3769
- };
3770
- }
3771
- var Xa = {
3772
- type: {
3773
- type: String,
3774
- default: "default"
3775
- },
3776
- label: String,
3777
- className: String,
3778
- labelClassName: String,
3779
- property: String,
3780
- prop: String,
3781
- width: {
3782
- type: [String, Number],
3783
- default: ""
3784
- },
3785
- minWidth: {
3786
- type: [String, Number],
3787
- default: ""
3788
- },
3789
- renderHeader: Function,
3790
- sortable: {
3791
- type: [Boolean, String],
3792
- default: !1
3793
- },
3794
- sortMethod: Function,
3795
- sortBy: [String, Function, Array],
3796
- resizable: {
3797
- type: Boolean,
3798
- default: !0
3799
- },
3800
- columnKey: String,
3801
- align: String,
3802
- headerAlign: String,
3803
- showOverflowTooltip: {
3804
- type: [Boolean, Object],
3805
- default: void 0
3806
- },
3807
- tooltipFormatter: Function,
3808
- fixed: [Boolean, String],
3809
- formatter: Function,
3810
- selectable: Function,
3811
- reserveSelection: Boolean,
3812
- filterMethod: Function,
3813
- filteredValue: Array,
3814
- filters: Array,
3815
- filterPlacement: String,
3816
- filterMultiple: {
3817
- type: Boolean,
3818
- default: !0
3819
- },
3820
- filterClassName: String,
3821
- index: [Number, Function],
3822
- sortOrders: {
3823
- type: Array,
3824
- default: () => ["ascending", "descending", null],
3825
- validator: (e) => e.every((t) => ["ascending", "descending", null].includes(t))
3826
- }
3827
- };
3828
- let Qa = 1;
3829
- var Zl = ae({
3830
- name: "ElTableColumn",
3831
- components: {
3832
- ElCheckbox: Ae
3833
- },
3834
- props: Xa,
3835
- setup(e, { slots: t }) {
3836
- const n = oe(), l = k({}), a = O(() => {
3837
- let x = n.parent;
3838
- for (; x && !x.tableId; )
3839
- x = x.parent;
3840
- return x;
3841
- }), { registerNormalWatchers: r, registerComplexWatchers: i } = Ya(a, e), {
3842
- columnId: o,
3843
- isSubColumn: s,
3844
- realHeaderAlign: u,
3845
- columnOrTableParent: c,
3846
- setColumnWidth: f,
3847
- setColumnForcedProps: p,
3848
- setColumnRenders: g,
3849
- getPropsData: h,
3850
- getColumnElIndex: y,
3851
- realAlign: b,
3852
- updateColumnOrder: C
3853
- } = qa(e, t, a), L = c.value;
3854
- o.value = `${L.tableId || L.columnId}_column_${Qa++}`, gl(() => {
3855
- s.value = a.value !== L;
3856
- const x = e.type || "default", d = e.sortable === "" ? !0 : e.sortable, v = Ee(e.showOverflowTooltip) ? L.props.showOverflowTooltip : e.showOverflowTooltip, w = Ee(e.tooltipFormatter) ? L.props.tooltipFormatter : e.tooltipFormatter, m = {
3857
- ...Da[x],
3858
- id: o.value,
3859
- type: x,
3860
- property: e.prop || e.property,
3861
- align: b,
3862
- headerAlign: u,
3863
- showOverflowTooltip: v,
3864
- tooltipFormatter: w,
3865
- filterable: e.filters || e.filterMethod,
3866
- filteredValue: [],
3867
- filterPlacement: "",
3868
- filterClassName: "",
3869
- isColumnGroup: !1,
3870
- isSubColumn: !1,
3871
- filterOpened: !1,
3872
- sortable: d,
3873
- index: e.index,
3874
- rawColumnKey: n.vnode.key
3875
- };
3876
- let B = h([
3877
- "columnKey",
3878
- "label",
3879
- "className",
3880
- "labelClassName",
3881
- "type",
3882
- "renderHeader",
3883
- "formatter",
3884
- "fixed",
3885
- "resizable"
3886
- ], ["sortMethod", "sortBy", "sortOrders"], ["selectable", "reserveSelection"], [
3887
- "filterMethod",
3888
- "filters",
3889
- "filterMultiple",
3890
- "filterOpened",
3891
- "filteredValue",
3892
- "filterPlacement",
3893
- "filterClassName"
3894
- ]);
3895
- B = Uo(m, B), B = Yo(g, f, p)(B), l.value = B, r(), i();
3896
- }), Xe(() => {
3897
- var x;
3898
- const d = c.value, v = s.value ? d.vnode.el.children : (x = d.refs.hiddenColumns) == null ? void 0 : x.children, w = () => y(v || [], n.vnode.el);
3899
- l.value.getColumnIndex = w, w() > -1 && a.value.store.commit("insertColumn", l.value, s.value ? d.columnConfig.value : null, C);
3900
- }), bl(() => {
3901
- const x = l.value.getColumnIndex;
3902
- (x ? x() : -1) > -1 && a.value.store.commit("removeColumn", l.value, s.value ? L.columnConfig.value : null, C);
3903
- }), n.columnId = o.value, n.columnConfig = l;
3904
- },
3905
- render() {
3906
- var e, t, n;
3907
- try {
3908
- const l = (t = (e = this.$slots).default) == null ? void 0 : t.call(e, {
3909
- row: {},
3910
- column: {},
3911
- $index: -1
3912
- }), a = [];
3913
- if (ee(l))
3914
- for (const i of l)
3915
- ((n = i.type) == null ? void 0 : n.name) === "ElTableColumn" || i.shapeFlag & 2 ? a.push(i) : i.type === it && ee(i.children) && i.children.forEach((o) => {
3916
- (o == null ? void 0 : o.patchFlag) !== 1024 && !ve(o == null ? void 0 : o.children) && a.push(o);
3917
- });
3918
- return A("div", a);
3919
- } catch {
3920
- return A("div", []);
3921
- }
3922
- }
3923
- });
3924
- const ps = Vt(za, {
3925
- TableColumn: Zl
3926
- }), vs = Kt(Zl);
3927
- export {
3928
- hs as E,
3929
- vs as a,
3930
- ps as b,
3931
- Ae as c,
3932
- fs as d
3933
- };