@wx-design/components 0.8.55 → 0.8.57
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.
- package/es/core/Table/components/CellEditors/Select.d.ts +3 -0
- package/es/index.mjs +264 -258
- package/es/style.css +1 -1
- package/lib/core/Table/components/CellEditors/Select.d.ts +3 -0
- package/lib/index.js +2 -2
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/types/table/column.d.ts +3 -1
package/es/index.mjs
CHANGED
|
@@ -345,8 +345,8 @@ function Il() {
|
|
|
345
345
|
var Fl = Il;
|
|
346
346
|
Ce.exports;
|
|
347
347
|
(function(e, t) {
|
|
348
|
-
var r = j, n = Fl, a = t && !t.nodeType && t, o = a && !0 && e && !e.nodeType && e, l = o && o.exports === a, i = l ? r.Buffer : void 0, s = i ? i.isBuffer : void 0,
|
|
349
|
-
e.exports =
|
|
348
|
+
var r = j, n = Fl, a = t && !t.nodeType && t, o = a && !0 && e && !e.nodeType && e, l = o && o.exports === a, i = l ? r.Buffer : void 0, s = i ? i.isBuffer : void 0, u = s || n;
|
|
349
|
+
e.exports = u;
|
|
350
350
|
})(Ce, Ce.exports);
|
|
351
351
|
var lt = Ce.exports, Rl = 9007199254740991, jl = /^(?:0|[1-9]\d*)$/;
|
|
352
352
|
function Bl(e, t) {
|
|
@@ -384,12 +384,12 @@ we.exports;
|
|
|
384
384
|
var ut = we.exports, bs = gs, ps = Fe, jt = ut, Bt = jt && jt.isTypedArray, hs = Bt ? ps(Bt) : bs, Ur = hs, ys = Ml, ms = rt, $s = B, _s = lt, Cs = Ie, ws = Ur, Ts = Object.prototype, Ss = Ts.hasOwnProperty;
|
|
385
385
|
function As(e, t) {
|
|
386
386
|
var r = $s(e), n = !r && ms(e), a = !r && !n && _s(e), o = !r && !n && !a && ws(e), l = r || n || a || o, i = l ? ys(e.length, String) : [], s = i.length;
|
|
387
|
-
for (var
|
|
388
|
-
(t || Ss.call(e,
|
|
389
|
-
(
|
|
390
|
-
a && (
|
|
391
|
-
o && (
|
|
392
|
-
Cs(
|
|
387
|
+
for (var u in e)
|
|
388
|
+
(t || Ss.call(e, u)) && !(l && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
389
|
+
(u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
390
|
+
a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
391
|
+
o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
|
|
392
|
+
Cs(u, s))) && i.push(u);
|
|
393
393
|
return i;
|
|
394
394
|
}
|
|
395
395
|
var Vr = As, Os = Object.prototype;
|
|
@@ -453,11 +453,11 @@ var du = fu, Te = { exports: {} };
|
|
|
453
453
|
Te.exports;
|
|
454
454
|
(function(e, t) {
|
|
455
455
|
var r = j, n = t && !t.nodeType && t, a = n && !0 && e && !e.nodeType && e, o = a && a.exports === n, l = o ? r.Buffer : void 0, i = l ? l.allocUnsafe : void 0;
|
|
456
|
-
function s(
|
|
457
|
-
if (
|
|
458
|
-
return
|
|
459
|
-
var b =
|
|
460
|
-
return
|
|
456
|
+
function s(u, f) {
|
|
457
|
+
if (f)
|
|
458
|
+
return u.slice();
|
|
459
|
+
var b = u.length, c = i ? i(b) : new u.constructor(b);
|
|
460
|
+
return u.copy(c), c;
|
|
461
461
|
}
|
|
462
462
|
e.exports = s;
|
|
463
463
|
})(Te, Te.exports);
|
|
@@ -618,21 +618,21 @@ var Mf = Ef, If = Mf, Ff = Fe, Xt = ut, Jt = Xt && Xt.isSet, Rf = Jt ? Ff(Jt) :
|
|
|
618
618
|
_[Xr] = _[ld] = _[md] = _[$d] = _[sd] = _[ud] = _[_d] = _[Cd] = _[wd] = _[Td] = _[Sd] = _[dd] = _[gd] = _[Zr] = _[vd] = _[bd] = _[pd] = _[hd] = _[Ad] = _[Od] = _[xd] = _[Pd] = !0;
|
|
619
619
|
_[cd] = _[Jr] = _[yd] = !1;
|
|
620
620
|
function ye(e, t, r, n, a, o) {
|
|
621
|
-
var l, i = t & ad, s = t & od,
|
|
621
|
+
var l, i = t & ad, s = t & od, u = t & id;
|
|
622
622
|
if (r && (l = a ? r(e, n, a, o) : r(e)), l !== void 0)
|
|
623
623
|
return l;
|
|
624
624
|
if (!ed(e))
|
|
625
625
|
return e;
|
|
626
|
-
var
|
|
627
|
-
if (
|
|
626
|
+
var f = Jf(e);
|
|
627
|
+
if (f) {
|
|
628
628
|
if (l = Wf(e), !i)
|
|
629
629
|
return Vf(e, l);
|
|
630
630
|
} else {
|
|
631
|
-
var b = qf(e),
|
|
631
|
+
var b = qf(e), c = b == Jr || b == fd;
|
|
632
632
|
if (Zf(e))
|
|
633
633
|
return Uf(e, i);
|
|
634
|
-
if (b == Zr || b == Xr ||
|
|
635
|
-
if (l = s ||
|
|
634
|
+
if (b == Zr || b == Xr || c && !a) {
|
|
635
|
+
if (l = s || c ? {} : Xf(e), !i)
|
|
636
636
|
return s ? Kf(e, kf(l, e)) : Hf(e, Nf(l, e));
|
|
637
637
|
} else {
|
|
638
638
|
if (!_[b])
|
|
@@ -649,9 +649,9 @@ function ye(e, t, r, n, a, o) {
|
|
|
649
649
|
}) : Qf(e) && e.forEach(function(v, y) {
|
|
650
650
|
l.set(y, ye(v, t, r, y, e, o));
|
|
651
651
|
});
|
|
652
|
-
var g =
|
|
653
|
-
return Df(
|
|
654
|
-
|
|
652
|
+
var g = u ? s ? zf : Gf : s ? nd : rd, d = f ? void 0 : g(e);
|
|
653
|
+
return Df(d || e, function(v, y) {
|
|
654
|
+
d && (y = v, v = e[y]), Lf(l, y, ye(v, t, r, y, e, o));
|
|
655
655
|
}), l;
|
|
656
656
|
}
|
|
657
657
|
var Ed = ye, Md = Z, Id = K, Fd = "[object Symbol]";
|
|
@@ -863,18 +863,18 @@ function Kv(e, t, r, n, a, o) {
|
|
|
863
863
|
var l = r & Vv, i = e.length, s = t.length;
|
|
864
864
|
if (i != s && !(l && s > i))
|
|
865
865
|
return !1;
|
|
866
|
-
var
|
|
867
|
-
if (
|
|
868
|
-
return
|
|
869
|
-
var b = -1,
|
|
866
|
+
var u = o.get(e), f = o.get(t);
|
|
867
|
+
if (u && f)
|
|
868
|
+
return u == t && f == e;
|
|
869
|
+
var b = -1, c = !0, p = r & Hv ? new Nv() : void 0;
|
|
870
870
|
for (o.set(e, t), o.set(t, e); ++b < i; ) {
|
|
871
|
-
var g = e[b],
|
|
871
|
+
var g = e[b], d = t[b];
|
|
872
872
|
if (n)
|
|
873
|
-
var v = l ? n(
|
|
873
|
+
var v = l ? n(d, g, b, t, e, o) : n(g, d, b, e, t, o);
|
|
874
874
|
if (v !== void 0) {
|
|
875
875
|
if (v)
|
|
876
876
|
continue;
|
|
877
|
-
|
|
877
|
+
c = !1;
|
|
878
878
|
break;
|
|
879
879
|
}
|
|
880
880
|
if (p) {
|
|
@@ -882,15 +882,15 @@ function Kv(e, t, r, n, a, o) {
|
|
|
882
882
|
if (!Uv(p, $) && (g === y || a(g, y, r, n, o)))
|
|
883
883
|
return p.push($);
|
|
884
884
|
})) {
|
|
885
|
-
|
|
885
|
+
c = !1;
|
|
886
886
|
break;
|
|
887
887
|
}
|
|
888
|
-
} else if (!(g ===
|
|
889
|
-
|
|
888
|
+
} else if (!(g === d || a(g, d, r, n, o))) {
|
|
889
|
+
c = !1;
|
|
890
890
|
break;
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
return o.delete(e), o.delete(t),
|
|
893
|
+
return o.delete(e), o.delete(t), c;
|
|
894
894
|
}
|
|
895
895
|
var an = Kv;
|
|
896
896
|
function Gv(e) {
|
|
@@ -930,12 +930,12 @@ function db(e, t, r, n, a, o, l) {
|
|
|
930
930
|
var s = n & Qv;
|
|
931
931
|
if (i || (i = Zv), e.size != t.size && !s)
|
|
932
932
|
return !1;
|
|
933
|
-
var
|
|
934
|
-
if (
|
|
935
|
-
return
|
|
933
|
+
var u = l.get(e);
|
|
934
|
+
if (u)
|
|
935
|
+
return u == t;
|
|
936
936
|
n |= eb, l.set(e, t);
|
|
937
|
-
var
|
|
938
|
-
return l.delete(e),
|
|
937
|
+
var f = Xv(i(e), i(t), n, a, o, l);
|
|
938
|
+
return l.delete(e), f;
|
|
939
939
|
case ub:
|
|
940
940
|
if (Ne)
|
|
941
941
|
return Ne.call(e) == Ne.call(t);
|
|
@@ -944,56 +944,56 @@ function db(e, t, r, n, a, o, l) {
|
|
|
944
944
|
}
|
|
945
945
|
var gb = db, lr = qr, vb = 1, bb = Object.prototype, pb = bb.hasOwnProperty;
|
|
946
946
|
function hb(e, t, r, n, a, o) {
|
|
947
|
-
var l = r & vb, i = lr(e), s = i.length,
|
|
948
|
-
if (s !=
|
|
947
|
+
var l = r & vb, i = lr(e), s = i.length, u = lr(t), f = u.length;
|
|
948
|
+
if (s != f && !l)
|
|
949
949
|
return !1;
|
|
950
950
|
for (var b = s; b--; ) {
|
|
951
|
-
var
|
|
952
|
-
if (!(l ?
|
|
951
|
+
var c = i[b];
|
|
952
|
+
if (!(l ? c in t : pb.call(t, c)))
|
|
953
953
|
return !1;
|
|
954
954
|
}
|
|
955
955
|
var p = o.get(e), g = o.get(t);
|
|
956
956
|
if (p && g)
|
|
957
957
|
return p == t && g == e;
|
|
958
|
-
var
|
|
958
|
+
var d = !0;
|
|
959
959
|
o.set(e, t), o.set(t, e);
|
|
960
960
|
for (var v = l; ++b < s; ) {
|
|
961
|
-
|
|
962
|
-
var y = e[
|
|
961
|
+
c = i[b];
|
|
962
|
+
var y = e[c], $ = t[c];
|
|
963
963
|
if (n)
|
|
964
|
-
var M = l ? n($, y,
|
|
964
|
+
var M = l ? n($, y, c, t, e, o) : n(y, $, c, e, t, o);
|
|
965
965
|
if (!(M === void 0 ? y === $ || a(y, $, r, n, o) : M)) {
|
|
966
|
-
|
|
966
|
+
d = !1;
|
|
967
967
|
break;
|
|
968
968
|
}
|
|
969
|
-
v || (v =
|
|
969
|
+
v || (v = c == "constructor");
|
|
970
970
|
}
|
|
971
|
-
if (
|
|
971
|
+
if (d && !v) {
|
|
972
972
|
var P = e.constructor, E = t.constructor;
|
|
973
|
-
P != E && "constructor" in e && "constructor" in t && !(typeof P == "function" && P instanceof P && typeof E == "function" && E instanceof E) && (
|
|
973
|
+
P != E && "constructor" in e && "constructor" in t && !(typeof P == "function" && P instanceof P && typeof E == "function" && E instanceof E) && (d = !1);
|
|
974
974
|
}
|
|
975
|
-
return o.delete(e), o.delete(t),
|
|
975
|
+
return o.delete(e), o.delete(t), d;
|
|
976
976
|
}
|
|
977
977
|
var yb = hb, ke = ot, mb = an, $b = gb, _b = yb, sr = Re, ur = B, cr = lt, Cb = Ur, wb = 1, fr = "[object Arguments]", dr = "[object Array]", he = "[object Object]", Tb = Object.prototype, gr = Tb.hasOwnProperty;
|
|
978
978
|
function Sb(e, t, r, n, a, o) {
|
|
979
|
-
var l = ur(e), i = ur(t), s = l ? dr : sr(e),
|
|
980
|
-
s = s == fr ? he : s,
|
|
981
|
-
var
|
|
982
|
-
if (
|
|
979
|
+
var l = ur(e), i = ur(t), s = l ? dr : sr(e), u = i ? dr : sr(t);
|
|
980
|
+
s = s == fr ? he : s, u = u == fr ? he : u;
|
|
981
|
+
var f = s == he, b = u == he, c = s == u;
|
|
982
|
+
if (c && cr(e)) {
|
|
983
983
|
if (!cr(t))
|
|
984
984
|
return !1;
|
|
985
|
-
l = !0,
|
|
985
|
+
l = !0, f = !1;
|
|
986
986
|
}
|
|
987
|
-
if (
|
|
987
|
+
if (c && !f)
|
|
988
988
|
return o || (o = new ke()), l || Cb(e) ? mb(e, t, r, n, a, o) : $b(e, t, s, r, n, a, o);
|
|
989
989
|
if (!(r & wb)) {
|
|
990
|
-
var p =
|
|
990
|
+
var p = f && gr.call(e, "__wrapped__"), g = b && gr.call(t, "__wrapped__");
|
|
991
991
|
if (p || g) {
|
|
992
|
-
var
|
|
993
|
-
return o || (o = new ke()), a(
|
|
992
|
+
var d = p ? e.value() : e, v = g ? t.value() : t;
|
|
993
|
+
return o || (o = new ke()), a(d, v, r, n, o);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
return
|
|
996
|
+
return c ? (o || (o = new ke()), _b(e, t, r, n, a, o)) : !1;
|
|
997
997
|
}
|
|
998
998
|
var Ab = Sb, Ob = Ab, vr = K;
|
|
999
999
|
function on(e, t, r, n, a) {
|
|
@@ -1011,15 +1011,15 @@ function Ib(e, t, r, n) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
for (; ++a < o; ) {
|
|
1013
1013
|
i = r[a];
|
|
1014
|
-
var s = i[0],
|
|
1014
|
+
var s = i[0], u = e[s], f = i[1];
|
|
1015
1015
|
if (l && i[2]) {
|
|
1016
|
-
if (
|
|
1016
|
+
if (u === void 0 && !(s in e))
|
|
1017
1017
|
return !1;
|
|
1018
1018
|
} else {
|
|
1019
1019
|
var b = new xb();
|
|
1020
1020
|
if (n)
|
|
1021
|
-
var
|
|
1022
|
-
if (!(
|
|
1021
|
+
var c = n(u, f, s, e, t, b);
|
|
1022
|
+
if (!(c === void 0 ? Pb(f, u, Eb | Mb, n, b) : c))
|
|
1023
1023
|
return !1;
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
@@ -1126,14 +1126,14 @@ function Kp(e, t, r, n) {
|
|
|
1126
1126
|
return e;
|
|
1127
1127
|
t = Up(t, e);
|
|
1128
1128
|
for (var a = -1, o = t.length, l = o - 1, i = e; i != null && ++a < o; ) {
|
|
1129
|
-
var s = Hp(t[a]),
|
|
1129
|
+
var s = Hp(t[a]), u = r;
|
|
1130
1130
|
if (s === "__proto__" || s === "constructor" || s === "prototype")
|
|
1131
1131
|
return e;
|
|
1132
1132
|
if (a != l) {
|
|
1133
|
-
var
|
|
1134
|
-
|
|
1133
|
+
var f = i[s];
|
|
1134
|
+
u = n ? n(f, s, i) : void 0, u === void 0 && (u = br(f) ? f : Vp(t[a + 1]) ? [] : {});
|
|
1135
1135
|
}
|
|
1136
|
-
kp(i, s,
|
|
1136
|
+
kp(i, s, u), i = i[s];
|
|
1137
1137
|
}
|
|
1138
1138
|
return e;
|
|
1139
1139
|
}
|
|
@@ -1197,36 +1197,36 @@ function xh(e) {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
var cn = xh, Ph = D, Ue = vh, yr = cn, Eh = "Expected a function", Mh = Math.max, Ih = Math.min;
|
|
1199
1199
|
function Fh(e, t, r) {
|
|
1200
|
-
var n, a, o, l, i, s,
|
|
1200
|
+
var n, a, o, l, i, s, u = 0, f = !1, b = !1, c = !0;
|
|
1201
1201
|
if (typeof e != "function")
|
|
1202
1202
|
throw new TypeError(Eh);
|
|
1203
|
-
t = yr(t) || 0, Ph(r) && (
|
|
1203
|
+
t = yr(t) || 0, Ph(r) && (f = !!r.leading, b = "maxWait" in r, o = b ? Mh(yr(r.maxWait) || 0, t) : o, c = "trailing" in r ? !!r.trailing : c);
|
|
1204
1204
|
function p(S) {
|
|
1205
1205
|
var V = n, ie = a;
|
|
1206
|
-
return n = a = void 0,
|
|
1206
|
+
return n = a = void 0, u = S, l = e.apply(ie, V), l;
|
|
1207
1207
|
}
|
|
1208
1208
|
function g(S) {
|
|
1209
|
-
return
|
|
1209
|
+
return u = S, i = setTimeout(y, t), f ? p(S) : l;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
var V = S - s, ie = S -
|
|
1211
|
+
function d(S) {
|
|
1212
|
+
var V = S - s, ie = S - u, $t = t - V;
|
|
1213
1213
|
return b ? Ih($t, o - ie) : $t;
|
|
1214
1214
|
}
|
|
1215
1215
|
function v(S) {
|
|
1216
|
-
var V = S - s, ie = S -
|
|
1216
|
+
var V = S - s, ie = S - u;
|
|
1217
1217
|
return s === void 0 || V >= t || V < 0 || b && ie >= o;
|
|
1218
1218
|
}
|
|
1219
1219
|
function y() {
|
|
1220
1220
|
var S = Ue();
|
|
1221
1221
|
if (v(S))
|
|
1222
1222
|
return $(S);
|
|
1223
|
-
i = setTimeout(y,
|
|
1223
|
+
i = setTimeout(y, d(S));
|
|
1224
1224
|
}
|
|
1225
1225
|
function $(S) {
|
|
1226
|
-
return i = void 0,
|
|
1226
|
+
return i = void 0, c && n ? p(S) : (n = a = void 0, l);
|
|
1227
1227
|
}
|
|
1228
1228
|
function M() {
|
|
1229
|
-
i !== void 0 && clearTimeout(i),
|
|
1229
|
+
i !== void 0 && clearTimeout(i), u = 0, n = s = a = i = void 0;
|
|
1230
1230
|
}
|
|
1231
1231
|
function P() {
|
|
1232
1232
|
return i === void 0 ? l : $(Ue());
|
|
@@ -1426,10 +1426,10 @@ function h1(e, t) {
|
|
|
1426
1426
|
var y1 = h1, $r = ve;
|
|
1427
1427
|
function m1(e, t) {
|
|
1428
1428
|
if (e !== t) {
|
|
1429
|
-
var r = e !== void 0, n = e === null, a = e === e, o = $r(e), l = t !== void 0, i = t === null, s = t === t,
|
|
1430
|
-
if (!i && !
|
|
1429
|
+
var r = e !== void 0, n = e === null, a = e === e, o = $r(e), l = t !== void 0, i = t === null, s = t === t, u = $r(t);
|
|
1430
|
+
if (!i && !u && !o && e > t || o && l && s && !i && !u || n && l && s || !r && s || !a)
|
|
1431
1431
|
return 1;
|
|
1432
|
-
if (!n && !o && !
|
|
1432
|
+
if (!n && !o && !u && e < t || u && r && a && !n && !o || i && r && a || !l && a || !s)
|
|
1433
1433
|
return -1;
|
|
1434
1434
|
}
|
|
1435
1435
|
return 0;
|
|
@@ -1441,8 +1441,8 @@ function C1(e, t, r) {
|
|
|
1441
1441
|
if (s) {
|
|
1442
1442
|
if (n >= i)
|
|
1443
1443
|
return s;
|
|
1444
|
-
var
|
|
1445
|
-
return s * (
|
|
1444
|
+
var u = r[n];
|
|
1445
|
+
return s * (u == "desc" ? -1 : 1);
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
1448
|
return e.index - t.index;
|
|
@@ -1457,8 +1457,8 @@ function I1(e, t, r) {
|
|
|
1457
1457
|
var n = -1;
|
|
1458
1458
|
t = Ve(t, x1(S1));
|
|
1459
1459
|
var a = A1(e, function(o, l, i) {
|
|
1460
|
-
var s = Ve(t, function(
|
|
1461
|
-
return
|
|
1460
|
+
var s = Ve(t, function(u) {
|
|
1461
|
+
return u(o);
|
|
1462
1462
|
});
|
|
1463
1463
|
return { criteria: s, index: ++n, value: o };
|
|
1464
1464
|
});
|
|
@@ -1548,49 +1548,49 @@ const dy = /* @__PURE__ */ k(fy), gy = "sab-table-config-", vn = (e) => `${gy}${
|
|
|
1548
1548
|
],
|
|
1549
1549
|
setup(e, { emit: t }) {
|
|
1550
1550
|
const r = e, n = t, { locale: a } = yt(), o = T(() => {
|
|
1551
|
-
const
|
|
1551
|
+
const c = [], p = [];
|
|
1552
1552
|
return (r.columns || []).forEach((g) => {
|
|
1553
|
-
g.field && !g.noHeaderSet ?
|
|
1553
|
+
g.field && !g.noHeaderSet ? c.push(g) : p.push(g);
|
|
1554
1554
|
}), {
|
|
1555
|
-
sortables:
|
|
1555
|
+
sortables: c,
|
|
1556
1556
|
notSortables: p
|
|
1557
1557
|
};
|
|
1558
|
-
}), l = (
|
|
1558
|
+
}), l = (c) => {
|
|
1559
1559
|
const p = py(
|
|
1560
1560
|
o.value.sortables,
|
|
1561
|
-
|
|
1561
|
+
c
|
|
1562
1562
|
);
|
|
1563
1563
|
n("update:columns", [
|
|
1564
1564
|
...o.value.notSortables,
|
|
1565
1565
|
...p
|
|
1566
|
-
]), n("update:config-columns",
|
|
1566
|
+
]), n("update:config-columns", c);
|
|
1567
1567
|
}, i = T({
|
|
1568
|
-
get: () => o.value.sortables.map((
|
|
1569
|
-
field:
|
|
1570
|
-
title:
|
|
1571
|
-
visible:
|
|
1572
|
-
fixed:
|
|
1568
|
+
get: () => o.value.sortables.map((c, p) => ({
|
|
1569
|
+
field: c.field,
|
|
1570
|
+
title: c.title,
|
|
1571
|
+
visible: c.visible !== !1,
|
|
1572
|
+
fixed: c.fixed
|
|
1573
1573
|
})),
|
|
1574
1574
|
set: l
|
|
1575
1575
|
}), s = Dn(() => {
|
|
1576
|
-
var
|
|
1577
|
-
(
|
|
1578
|
-
}),
|
|
1576
|
+
var c;
|
|
1577
|
+
(c = r.initColumns) != null && c.length && (l(r.initColumns), s == null || s());
|
|
1578
|
+
}), u = T({
|
|
1579
1579
|
get: () => {
|
|
1580
|
-
var
|
|
1581
|
-
return (
|
|
1580
|
+
var c;
|
|
1581
|
+
return (c = i.value) == null ? void 0 : c.every((p) => p.visible);
|
|
1582
1582
|
},
|
|
1583
|
-
set: (
|
|
1583
|
+
set: (c) => {
|
|
1584
1584
|
var p;
|
|
1585
|
-
i.value = (p = i.value) == null ? void 0 : p.map((g) => (g.visible =
|
|
1585
|
+
i.value = (p = i.value) == null ? void 0 : p.map((g) => (g.visible = c, g));
|
|
1586
1586
|
}
|
|
1587
|
-
}),
|
|
1588
|
-
var
|
|
1589
|
-
return !
|
|
1587
|
+
}), f = T(() => {
|
|
1588
|
+
var c;
|
|
1589
|
+
return !u.value && ((c = i.value) == null ? void 0 : c.some((p) => p.visible));
|
|
1590
1590
|
}), b = () => {
|
|
1591
1591
|
l(i.value);
|
|
1592
1592
|
};
|
|
1593
|
-
return (
|
|
1593
|
+
return (c, p) => (F(), Y(A(zn), {
|
|
1594
1594
|
trigger: "click",
|
|
1595
1595
|
"hide-on-click": !1,
|
|
1596
1596
|
"popper-class": "sab-table-set-popper",
|
|
@@ -1605,9 +1605,9 @@ const dy = /* @__PURE__ */ k(fy), gy = "sab-table-config-", vn = (e) => `${gy}${
|
|
|
1605
1605
|
return [
|
|
1606
1606
|
h(A(Ge), {
|
|
1607
1607
|
class: "sab-table-set-dropdown--item-checkbox",
|
|
1608
|
-
indeterminate:
|
|
1609
|
-
modelValue:
|
|
1610
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
1608
|
+
indeterminate: f.value,
|
|
1609
|
+
modelValue: u.value,
|
|
1610
|
+
"onUpdate:modelValue": p[0] || (p[0] = (d) => u.value = d),
|
|
1611
1611
|
label: (g = A(a)) == null ? void 0 : g.sabDesign.table.set.selectAll
|
|
1612
1612
|
}, null, 8, ["indeterminate", "modelValue", "label"])
|
|
1613
1613
|
];
|
|
@@ -1627,7 +1627,7 @@ const dy = /* @__PURE__ */ k(fy), gy = "sab-table-config-", vn = (e) => `${gy}${
|
|
|
1627
1627
|
h(A(Ge), {
|
|
1628
1628
|
class: "sab-table-set-dropdown--item-checkbox",
|
|
1629
1629
|
modelValue: g.visible,
|
|
1630
|
-
"onUpdate:modelValue": (
|
|
1630
|
+
"onUpdate:modelValue": (d) => g.visible = d,
|
|
1631
1631
|
onChange: b,
|
|
1632
1632
|
label: g.title,
|
|
1633
1633
|
title: g.title
|
|
@@ -1717,14 +1717,14 @@ const dy = /* @__PURE__ */ k(fy), gy = "sab-table-config-", vn = (e) => `${gy}${
|
|
|
1717
1717
|
set: (i) => o("update:columns", i)
|
|
1718
1718
|
});
|
|
1719
1719
|
return (i, s) => {
|
|
1720
|
-
var
|
|
1720
|
+
var u;
|
|
1721
1721
|
return F(), Y(hy, {
|
|
1722
1722
|
name: i.name,
|
|
1723
1723
|
columns: l.value,
|
|
1724
|
-
"onUpdate:columns": s[0] || (s[0] = (
|
|
1724
|
+
"onUpdate:columns": s[0] || (s[0] = (f) => l.value = f),
|
|
1725
1725
|
tableRef: i.tableRef,
|
|
1726
|
-
initColumns: (
|
|
1727
|
-
"onUpdate:configColumns": s[1] || (s[1] = (
|
|
1726
|
+
initColumns: (u = a.value) == null ? void 0 : u.columns,
|
|
1727
|
+
"onUpdate:configColumns": s[1] || (s[1] = (f) => n.set({ columns: f }))
|
|
1728
1728
|
}, null, 8, ["name", "columns", "tableRef", "initColumns"]);
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
@@ -2006,6 +2006,7 @@ const U = (e, t) => {
|
|
|
2006
2006
|
dynamicDebounce: Object,
|
|
2007
2007
|
// 是否远程搜索
|
|
2008
2008
|
remote: Boolean,
|
|
2009
|
+
revalidateOnFocus: Boolean,
|
|
2009
2010
|
onChange: Function
|
|
2010
2011
|
},
|
|
2011
2012
|
name: "SabCellEditSelect",
|
|
@@ -2014,73 +2015,78 @@ const U = (e, t) => {
|
|
|
2014
2015
|
attrs: t,
|
|
2015
2016
|
emit: r
|
|
2016
2017
|
}) {
|
|
2017
|
-
var
|
|
2018
|
+
var d;
|
|
2018
2019
|
const {
|
|
2019
2020
|
renderOption: n,
|
|
2020
2021
|
renderOptionLabel: a,
|
|
2021
2022
|
scope: o,
|
|
2022
2023
|
...l
|
|
2023
|
-
} = t, i = I([]), s = T(() => e.options || i.value || []),
|
|
2024
|
-
var
|
|
2025
|
-
if (r("update:modelValue",
|
|
2026
|
-
const
|
|
2027
|
-
var
|
|
2028
|
-
return (
|
|
2024
|
+
} = t, i = I([]), s = T(() => e.options || i.value || []), u = I(""), f = T(() => u.value && !e.remote ? s.value.filter((v) => `${v[e.labelKey]}${v[e.valueKey]}`.toLowerCase().includes(u.value.toLowerCase())) : s.value), b = (v) => {
|
|
2025
|
+
var y, $;
|
|
2026
|
+
if (r("update:modelValue", v), Array.isArray(v)) {
|
|
2027
|
+
const M = v.map((P) => {
|
|
2028
|
+
var E;
|
|
2029
|
+
return (E = s.value.find((S) => S[e.valueKey] === P)) == null ? void 0 : E[e.labelKey];
|
|
2029
2030
|
});
|
|
2030
|
-
r("update:label",
|
|
2031
|
+
r("update:label", M);
|
|
2031
2032
|
} else {
|
|
2032
|
-
const
|
|
2033
|
-
r("update:label",
|
|
2033
|
+
const M = (y = s.value.find((P) => P[e.valueKey] === v)) == null ? void 0 : y[e.labelKey];
|
|
2034
|
+
r("update:label", M);
|
|
2034
2035
|
}
|
|
2035
|
-
(
|
|
2036
|
+
($ = e == null ? void 0 : e.onChange) == null || $.call(e, v, {
|
|
2036
2037
|
options: s.value
|
|
2037
2038
|
});
|
|
2038
|
-
},
|
|
2039
|
-
var
|
|
2039
|
+
}, c = I(!1), p = dn(async (v) => {
|
|
2040
|
+
var y;
|
|
2040
2041
|
try {
|
|
2041
|
-
|
|
2042
|
-
const
|
|
2042
|
+
c.value = !0;
|
|
2043
|
+
const $ = await ((y = e.dynamicOptions) == null ? void 0 : y.call(e, {
|
|
2043
2044
|
...o,
|
|
2044
|
-
keywords:
|
|
2045
|
+
keywords: v
|
|
2045
2046
|
}));
|
|
2046
|
-
i.value =
|
|
2047
|
+
i.value = $;
|
|
2047
2048
|
} finally {
|
|
2048
|
-
|
|
2049
|
+
c.value = !1;
|
|
2049
2050
|
}
|
|
2050
|
-
}, ((
|
|
2051
|
+
}, ((d = e.dynamicDebounce) == null ? void 0 : d.delay) ?? 300, {
|
|
2051
2052
|
leading: !1,
|
|
2052
2053
|
trailing: !0,
|
|
2053
2054
|
...e.dynamicDebounce
|
|
2054
2055
|
});
|
|
2055
|
-
|
|
2056
|
+
Ln(() => {
|
|
2056
2057
|
typeof e.dynamicOptions == "function" && p();
|
|
2057
|
-
})
|
|
2058
|
+
});
|
|
2059
|
+
const g = () => {
|
|
2060
|
+
e.revalidateOnFocus && p();
|
|
2061
|
+
};
|
|
2062
|
+
return () => h(Zn, C({
|
|
2058
2063
|
size: "small",
|
|
2059
2064
|
filterable: !0,
|
|
2060
2065
|
modelValue: e.modelValue,
|
|
2061
|
-
loading:
|
|
2066
|
+
loading: c.value,
|
|
2062
2067
|
teleported: !1,
|
|
2063
|
-
filterMethod: (
|
|
2068
|
+
filterMethod: (v) => u.value = v,
|
|
2064
2069
|
remote: e.remote,
|
|
2065
|
-
remoteMethod: p
|
|
2070
|
+
remoteMethod: p,
|
|
2071
|
+
onFocus: g
|
|
2066
2072
|
}, l, {
|
|
2067
2073
|
onChange: b
|
|
2068
2074
|
}), {
|
|
2069
2075
|
default: () => {
|
|
2070
|
-
var
|
|
2071
|
-
return [(
|
|
2072
|
-
const
|
|
2076
|
+
var v;
|
|
2077
|
+
return [(v = f.value) == null ? void 0 : v.map((y) => {
|
|
2078
|
+
const $ = typeof a == "function" ? a(y) : y[e.labelKey];
|
|
2073
2079
|
return h(Qn, {
|
|
2074
|
-
key:
|
|
2075
|
-
value:
|
|
2076
|
-
label:
|
|
2077
|
-
disabled:
|
|
2080
|
+
key: y[e.valueKey],
|
|
2081
|
+
value: y[e.valueKey],
|
|
2082
|
+
label: $,
|
|
2083
|
+
disabled: y[e.disabledKey]
|
|
2078
2084
|
}, {
|
|
2079
|
-
default: () => [typeof n == "function" ? n(
|
|
2085
|
+
default: () => [typeof n == "function" ? n(y) : h("span", {
|
|
2080
2086
|
style: {
|
|
2081
2087
|
fontWeight: "normal"
|
|
2082
2088
|
}
|
|
2083
|
-
}, [
|
|
2089
|
+
}, [y[e.labelKey]])]
|
|
2084
2090
|
});
|
|
2085
2091
|
})];
|
|
2086
2092
|
}
|
|
@@ -2302,7 +2308,7 @@ const U = (e, t) => {
|
|
|
2302
2308
|
row: i,
|
|
2303
2309
|
...s
|
|
2304
2310
|
}) => {
|
|
2305
|
-
var b,
|
|
2311
|
+
var b, c, p;
|
|
2306
2312
|
if (typeof t.filterMethod == "function")
|
|
2307
2313
|
return t.filterMethod({
|
|
2308
2314
|
option: l,
|
|
@@ -2315,41 +2321,41 @@ const U = (e, t) => {
|
|
|
2315
2321
|
row: i,
|
|
2316
2322
|
...s
|
|
2317
2323
|
});
|
|
2318
|
-
const
|
|
2319
|
-
var g,
|
|
2324
|
+
const u = T(() => {
|
|
2325
|
+
var g, d, v, y;
|
|
2320
2326
|
return (g = t == null ? void 0 : t.headerFilterConfig) != null && g.extendFromColumnEditor ? x(
|
|
2321
2327
|
// @ts-ignore
|
|
2322
|
-
t.editorProps || ((
|
|
2328
|
+
t.editorProps || ((d = t.editRender) == null ? void 0 : d.editorProps) || {},
|
|
2323
2329
|
((v = t.headerFilterConfig) == null ? void 0 : v.editorProps) || {}
|
|
2324
2330
|
) : (y = t == null ? void 0 : t.headerFilterConfig) == null ? void 0 : y.editorProps;
|
|
2325
|
-
}),
|
|
2326
|
-
if (typeof
|
|
2327
|
-
let g = ((p = i[((
|
|
2328
|
-
if (Array.isArray(
|
|
2329
|
-
for (let
|
|
2330
|
-
if (g.includes(
|
|
2331
|
+
}), f = l.data ?? l.value;
|
|
2332
|
+
if (typeof f < "u" && t.field) {
|
|
2333
|
+
let g = ((p = i[((c = u.value) == null ? void 0 : c.effectValueField) || t.field]) == null ? void 0 : p.toString().toLowerCase()) || "";
|
|
2334
|
+
if (Array.isArray(f)) {
|
|
2335
|
+
for (let d of f)
|
|
2336
|
+
if (g.includes(d == null ? void 0 : d.toString().toLowerCase()))
|
|
2331
2337
|
return !0;
|
|
2332
|
-
if (
|
|
2333
|
-
let [
|
|
2334
|
-
return t.sabCellType === m.DatePciker && (
|
|
2338
|
+
if (f.length === 2) {
|
|
2339
|
+
let [d, v] = f;
|
|
2340
|
+
return t.sabCellType === m.DatePciker && (d = new Date(d), v = new Date(v), g = new Date(g)), g >= d && g <= v;
|
|
2335
2341
|
}
|
|
2336
2342
|
}
|
|
2337
|
-
return g.includes(
|
|
2343
|
+
return g.includes(f == null ? void 0 : f.toString().toLowerCase());
|
|
2338
2344
|
}
|
|
2339
2345
|
return !0;
|
|
2340
2346
|
};
|
|
2341
2347
|
return _e(() => r[t.field], (l) => {
|
|
2342
|
-
var s,
|
|
2348
|
+
var s, u, f;
|
|
2343
2349
|
if (!((s = t.headerFilterConfig) != null && s.enable))
|
|
2344
2350
|
return;
|
|
2345
2351
|
const i = n.value;
|
|
2346
2352
|
if (i) {
|
|
2347
2353
|
const b = i.getColumnByField(t.field);
|
|
2348
2354
|
if (b) {
|
|
2349
|
-
const
|
|
2350
|
-
|
|
2351
|
-
const p = (
|
|
2352
|
-
(
|
|
2355
|
+
const c = b.filters[0];
|
|
2356
|
+
c.data = l, l === "" || l === null || typeof l > "u" || Array.isArray(l) && l.length === 0 ? c.checked = !1 : c.checked = !0, i.updateData();
|
|
2357
|
+
const p = (u = n.value) == null ? void 0 : u.getCheckedFilters();
|
|
2358
|
+
(f = e.onFilter) == null || f.call(e, {
|
|
2353
2359
|
$table: n.value,
|
|
2354
2360
|
// @ts-ignore
|
|
2355
2361
|
column: t,
|
|
@@ -2381,18 +2387,18 @@ const U = (e, t) => {
|
|
|
2381
2387
|
title: l,
|
|
2382
2388
|
headerFilterModel: i,
|
|
2383
2389
|
...s
|
|
2384
|
-
} = t,
|
|
2390
|
+
} = t, u = T(() => {
|
|
2385
2391
|
const g = {};
|
|
2386
|
-
return Object.keys(a || {}).forEach((
|
|
2387
|
-
g[
|
|
2392
|
+
return Object.keys(a || {}).forEach((d) => {
|
|
2393
|
+
g[d] = (v) => typeof a[d] == "string" ? r[a[d]](v) : typeof a[d] == "function" ? a[d](v, o) : null;
|
|
2388
2394
|
}), g;
|
|
2389
|
-
}),
|
|
2395
|
+
}), f = T(() => e.xTable), {
|
|
2390
2396
|
filters: b,
|
|
2391
|
-
filterMethod:
|
|
2397
|
+
filterMethod: c
|
|
2392
2398
|
} = Ny({
|
|
2393
2399
|
column: s,
|
|
2394
2400
|
headerFilterModel: i,
|
|
2395
|
-
xTable:
|
|
2401
|
+
xTable: f,
|
|
2396
2402
|
onFilter: (g) => n("filter-change", g)
|
|
2397
2403
|
}), p = T(() => {
|
|
2398
2404
|
var g;
|
|
@@ -2401,15 +2407,15 @@ const U = (e, t) => {
|
|
|
2401
2407
|
});
|
|
2402
2408
|
});
|
|
2403
2409
|
return () => {
|
|
2404
|
-
var g,
|
|
2410
|
+
var g, d;
|
|
2405
2411
|
return h(jn, C({
|
|
2406
2412
|
filters: (g = s.headerFilterConfig) != null && g.enable ? b.value : void 0
|
|
2407
2413
|
}, s, {
|
|
2408
2414
|
headerClassName: p.value,
|
|
2409
|
-
filterMethod:
|
|
2415
|
+
filterMethod: c
|
|
2410
2416
|
}), {
|
|
2411
|
-
...
|
|
2412
|
-
header: (
|
|
2417
|
+
...u.value,
|
|
2418
|
+
header: (d = s.headerFilterConfig) != null && d.enable && s.type != "checkbox" && s.type != "radio" && s.type != "seq" ? (v) => h(Ly, {
|
|
2413
2419
|
column: t,
|
|
2414
2420
|
headerFilterModel: i
|
|
2415
2421
|
}, {
|
|
@@ -2417,7 +2423,7 @@ const U = (e, t) => {
|
|
|
2417
2423
|
var y, $;
|
|
2418
2424
|
return (
|
|
2419
2425
|
// @ts-ignore
|
|
2420
|
-
(($ = (y =
|
|
2426
|
+
(($ = (y = u.value).header) == null ? void 0 : $.call(y, v)) ?? l
|
|
2421
2427
|
);
|
|
2422
2428
|
}
|
|
2423
2429
|
}) : void 0
|
|
@@ -2672,7 +2678,7 @@ const U = (e, t) => {
|
|
|
2672
2678
|
const {
|
|
2673
2679
|
scope: n,
|
|
2674
2680
|
popover: a
|
|
2675
|
-
} = e, o = I(), l = T(() => a.showType === "dialog"), i = I(!1), s = I(),
|
|
2681
|
+
} = e, o = I(), l = T(() => a.showType === "dialog"), i = I(!1), s = I(), u = () => {
|
|
2676
2682
|
const p = I(!1);
|
|
2677
2683
|
return {
|
|
2678
2684
|
showDialog: p,
|
|
@@ -2684,10 +2690,10 @@ const U = (e, t) => {
|
|
|
2684
2690
|
}
|
|
2685
2691
|
};
|
|
2686
2692
|
}, {
|
|
2687
|
-
showDialog:
|
|
2693
|
+
showDialog: f,
|
|
2688
2694
|
onCloseDialog: b,
|
|
2689
|
-
onShowDialog:
|
|
2690
|
-
} =
|
|
2695
|
+
onShowDialog: c
|
|
2696
|
+
} = u();
|
|
2691
2697
|
return r({
|
|
2692
2698
|
popoverRef: T(() => ({
|
|
2693
2699
|
...s.value,
|
|
@@ -2705,7 +2711,7 @@ const U = (e, t) => {
|
|
|
2705
2711
|
textOverflow: "ellipsis"
|
|
2706
2712
|
},
|
|
2707
2713
|
ref: o,
|
|
2708
|
-
onClick:
|
|
2714
|
+
onClick: c
|
|
2709
2715
|
}, [h("span", {
|
|
2710
2716
|
class: "sab-cell-popover-inner-ctx"
|
|
2711
2717
|
}, [(p = t.default) == null ? void 0 : p.call(t)]), !(a != null && a.hideIcon) && h(ze, {
|
|
@@ -2713,7 +2719,7 @@ const U = (e, t) => {
|
|
|
2713
2719
|
class: "sab-cell-popover-inner-btn",
|
|
2714
2720
|
size: "small",
|
|
2715
2721
|
icon: h(Gh, null, null)
|
|
2716
|
-
}, null)]), l.value ?
|
|
2722
|
+
}, null)]), l.value ? f.value && h(ta, C({
|
|
2717
2723
|
ref: s,
|
|
2718
2724
|
modelValue: i.value,
|
|
2719
2725
|
"onUpdate:modelValue": (g) => i.value = g,
|
|
@@ -2783,23 +2789,23 @@ const U = (e, t) => {
|
|
|
2783
2789
|
},
|
|
2784
2790
|
slots: {
|
|
2785
2791
|
default: (e, t) => {
|
|
2786
|
-
var
|
|
2792
|
+
var u;
|
|
2787
2793
|
const r = U(e, t), {
|
|
2788
2794
|
getSabCellType: n,
|
|
2789
2795
|
getEditorProps: a
|
|
2790
|
-
} = r || {}, o = n == null ? void 0 : n(e), l = Tr(o), i = a == null ? void 0 : a(e), s = (
|
|
2796
|
+
} = r || {}, o = n == null ? void 0 : n(e), l = Tr(o), i = a == null ? void 0 : a(e), s = (u = l == null ? void 0 : l.slots) == null ? void 0 : u.default;
|
|
2791
2797
|
return typeof s == "function" ? s(e, i) : e.row[e.column.field];
|
|
2792
2798
|
},
|
|
2793
2799
|
edit: (e, t) => {
|
|
2794
|
-
var
|
|
2800
|
+
var f, b;
|
|
2795
2801
|
const r = U(e, t), {
|
|
2796
2802
|
getSabCellType: n,
|
|
2797
2803
|
getEditorProps: a
|
|
2798
|
-
} = r || {}, o = n == null ? void 0 : n(e), l = Tr(o), i = a == null ? void 0 : a(e), s = (
|
|
2804
|
+
} = r || {}, o = n == null ? void 0 : n(e), l = Tr(o), i = a == null ? void 0 : a(e), s = (f = l == null ? void 0 : l.slots) == null ? void 0 : f.edit;
|
|
2799
2805
|
if (typeof s == "function")
|
|
2800
2806
|
return s(e, i);
|
|
2801
|
-
const
|
|
2802
|
-
return typeof
|
|
2807
|
+
const u = (b = l == null ? void 0 : l.slots) == null ? void 0 : b.default;
|
|
2808
|
+
return typeof u == "function" ? u(e, i) : s;
|
|
2803
2809
|
}
|
|
2804
2810
|
}
|
|
2805
2811
|
}, Gy = 14, zy = 6, qy = 20, He = 26;
|
|
@@ -2896,46 +2902,46 @@ const In = [
|
|
|
2896
2902
|
"scroll",
|
|
2897
2903
|
"custom"
|
|
2898
2904
|
], tm = (e) => {
|
|
2899
|
-
const { checkboxRecords: t, emit: r, xTable: n, tableConfig: a } = e, o = (
|
|
2900
|
-
var
|
|
2901
|
-
const b = (
|
|
2902
|
-
t.value = b || [], r("checkbox-change", { ...
|
|
2903
|
-
}, l = (
|
|
2904
|
-
var
|
|
2905
|
-
const b = (
|
|
2906
|
-
t.value = b || [], r("checkbox-all", { ...
|
|
2907
|
-
}, i = (
|
|
2908
|
-
var
|
|
2909
|
-
const b = (
|
|
2910
|
-
t.value = b || [], r("checkbox-range-end", { ...
|
|
2905
|
+
const { checkboxRecords: t, emit: r, xTable: n, tableConfig: a } = e, o = (f) => {
|
|
2906
|
+
var c;
|
|
2907
|
+
const b = (c = n.value) == null ? void 0 : c.getCheckboxRecords();
|
|
2908
|
+
t.value = b || [], r("checkbox-change", { ...f, records: b });
|
|
2909
|
+
}, l = (f) => {
|
|
2910
|
+
var c;
|
|
2911
|
+
const b = (c = n.value) == null ? void 0 : c.getCheckboxRecords();
|
|
2912
|
+
t.value = b || [], r("checkbox-all", { ...f, records: b });
|
|
2913
|
+
}, i = (f) => {
|
|
2914
|
+
var c;
|
|
2915
|
+
const b = (c = n.value) == null ? void 0 : c.getCheckboxRecords();
|
|
2916
|
+
t.value = b || [], r("checkbox-range-end", { ...f, records: b });
|
|
2911
2917
|
}, s = {
|
|
2912
|
-
"cell-click": async (
|
|
2913
|
-
var g,
|
|
2914
|
-
const { row: b, column:
|
|
2915
|
-
if (se.has(me.Shift) &&
|
|
2916
|
-
o(
|
|
2918
|
+
"cell-click": async (f) => {
|
|
2919
|
+
var g, d, v, y, $, M;
|
|
2920
|
+
const { row: b, column: c } = f, p = (g = n.value) == null ? void 0 : g.isCheckedByCheckboxRow(b);
|
|
2921
|
+
if (se.has(me.Shift) && c.field == "sab-table-seq") {
|
|
2922
|
+
o(f);
|
|
2917
2923
|
return;
|
|
2918
2924
|
}
|
|
2919
|
-
if ((se.has(me.Control) || se.has(me.Meta)) &&
|
|
2920
|
-
p || await ((
|
|
2925
|
+
if ((se.has(me.Control) || se.has(me.Meta)) && c.field == "sab-table-seq") {
|
|
2926
|
+
p || await ((d = n.value) == null ? void 0 : d.setCheckboxRow(b, !1)), i(f);
|
|
2921
2927
|
return;
|
|
2922
2928
|
}
|
|
2923
|
-
|
|
2929
|
+
c.field === "sab-table-seq" && ((v = a.value.seqConfig) != null && v.clearOtherSelectedWhenClick && await ((y = n.value) == null ? void 0 : y.clearCheckboxRow()), await (($ = n.value) == null ? void 0 : $.setCheckboxRow(b, !0)), (M = n.value) == null || M.setCurrentRow(b), o(f)), r("cell-click", f);
|
|
2924
2930
|
},
|
|
2925
|
-
"checkbox-change": async (
|
|
2926
|
-
|
|
2931
|
+
"checkbox-change": async (f) => {
|
|
2932
|
+
f.column.field === "sab-table-seq" || o(f);
|
|
2927
2933
|
},
|
|
2928
|
-
"checkbox-range-end": (
|
|
2929
|
-
i(
|
|
2934
|
+
"checkbox-range-end": (f) => {
|
|
2935
|
+
i(f);
|
|
2930
2936
|
},
|
|
2931
|
-
"checkbox-all": (
|
|
2932
|
-
l(
|
|
2937
|
+
"checkbox-all": (f) => {
|
|
2938
|
+
l(f);
|
|
2933
2939
|
}
|
|
2934
|
-
},
|
|
2935
|
-
return In.map((
|
|
2936
|
-
typeof s[
|
|
2937
|
-
},
|
|
2938
|
-
onEvents:
|
|
2940
|
+
}, u = {};
|
|
2941
|
+
return In.map((f) => (u[f] = (...b) => {
|
|
2942
|
+
typeof s[f] == "function" ? s[f](...b) : r(f, ...b);
|
|
2943
|
+
}, f)), {
|
|
2944
|
+
onEvents: u
|
|
2939
2945
|
};
|
|
2940
2946
|
};
|
|
2941
2947
|
function mt(e, t) {
|
|
@@ -3003,11 +3009,11 @@ const lm = (e) => {
|
|
|
3003
3009
|
);
|
|
3004
3010
|
return ({ columns: n, data: a }) => [
|
|
3005
3011
|
n.map((o, l) => {
|
|
3006
|
-
var i, s,
|
|
3012
|
+
var i, s, u, f, b, c;
|
|
3007
3013
|
return l === 0 && (!o.field || o.type) ? (
|
|
3008
3014
|
// @ts-ignore
|
|
3009
|
-
((
|
|
3010
|
-
) : (
|
|
3015
|
+
((u = (s = (i = t.value) == null ? void 0 : i.sabDesign) == null ? void 0 : s.table) == null ? void 0 : u.total) || ((b = (f = t == null ? void 0 : t.sabDesign) == null ? void 0 : f.table) == null ? void 0 : b.total)
|
|
3016
|
+
) : (c = r[o.field]) != null && c.withSummary ? a.reduce(
|
|
3011
3017
|
(p, g) => im.plus(p, g[o.field] || 0),
|
|
3012
3018
|
0
|
|
3013
3019
|
) : null;
|
|
@@ -3122,7 +3128,7 @@ const lm = (e) => {
|
|
|
3122
3128
|
],
|
|
3123
3129
|
setup(e, { expose: t, emit: r }) {
|
|
3124
3130
|
const n = e, a = I(), { locale: o } = yt(), l = T(() => {
|
|
3125
|
-
const
|
|
3131
|
+
const d = Uy(
|
|
3126
3132
|
{
|
|
3127
3133
|
keyboardConfig: {
|
|
3128
3134
|
editMethod({ row: v, column: y }) {
|
|
@@ -3132,22 +3138,22 @@ const lm = (e) => {
|
|
|
3132
3138
|
},
|
|
3133
3139
|
nr(n, "data")
|
|
3134
3140
|
);
|
|
3135
|
-
return
|
|
3141
|
+
return d.columns = Qy(d.columns || [], d), d;
|
|
3136
3142
|
}), i = T(() => {
|
|
3137
|
-
var
|
|
3143
|
+
var d;
|
|
3138
3144
|
return Va(
|
|
3139
|
-
(
|
|
3145
|
+
(d = l.value.columns) == null ? void 0 : d.map((v) => v.slots ? Object.values(v.slots).filter(
|
|
3140
3146
|
(y) => typeof y == "string"
|
|
3141
3147
|
) : [])
|
|
3142
3148
|
);
|
|
3143
|
-
}), s = r,
|
|
3149
|
+
}), s = r, u = T({
|
|
3144
3150
|
get() {
|
|
3145
3151
|
return n.checkboxRecords || [];
|
|
3146
3152
|
},
|
|
3147
3153
|
set: Nh(
|
|
3148
|
-
function(
|
|
3154
|
+
function(d) {
|
|
3149
3155
|
var v;
|
|
3150
|
-
s("update:checkboxRecords",
|
|
3156
|
+
s("update:checkboxRecords", d), (v = a.value) == null || v.setCheckboxRow(d, !0);
|
|
3151
3157
|
},
|
|
3152
3158
|
300,
|
|
3153
3159
|
{
|
|
@@ -3158,13 +3164,13 @@ const lm = (e) => {
|
|
|
3158
3164
|
});
|
|
3159
3165
|
_e(
|
|
3160
3166
|
() => n.checkboxRecords,
|
|
3161
|
-
(
|
|
3167
|
+
(d) => {
|
|
3162
3168
|
var v;
|
|
3163
|
-
Array.isArray(
|
|
3169
|
+
Array.isArray(d) && ((v = a.value) == null || v.setCheckboxRow(d, !0));
|
|
3164
3170
|
}
|
|
3165
3171
|
);
|
|
3166
|
-
const { onEvents:
|
|
3167
|
-
checkboxRecords:
|
|
3172
|
+
const { onEvents: f } = tm({
|
|
3173
|
+
checkboxRecords: u,
|
|
3168
3174
|
emit: s,
|
|
3169
3175
|
xTable: a,
|
|
3170
3176
|
tableConfig: l
|
|
@@ -3172,36 +3178,36 @@ const lm = (e) => {
|
|
|
3172
3178
|
() => sh(nr(l.value, "columns", "data"), fh)
|
|
3173
3179
|
);
|
|
3174
3180
|
Pr("table-config", b);
|
|
3175
|
-
const
|
|
3181
|
+
const c = I(!0);
|
|
3176
3182
|
_e(
|
|
3177
3183
|
() => {
|
|
3178
|
-
var
|
|
3179
|
-
return (
|
|
3184
|
+
var d;
|
|
3185
|
+
return (d = l.value.columns) == null ? void 0 : d.filter((v) => v.visible != !1).map((v) => v.field).join(",");
|
|
3180
3186
|
},
|
|
3181
3187
|
() => {
|
|
3182
|
-
var
|
|
3183
|
-
(
|
|
3184
|
-
|
|
3185
|
-
})) : (v = a.value) == null || v.reloadColumn(l.value.columns),
|
|
3188
|
+
var d, v;
|
|
3189
|
+
(d = n.headerFilterConfig) != null && d.enable ? (c.value = !1, xr(() => {
|
|
3190
|
+
c.value = !0;
|
|
3191
|
+
})) : (v = a.value) == null || v.reloadColumn(l.value.columns), u.value = [], s("checkbox-all", { checked: !1, records: [] });
|
|
3186
3192
|
}
|
|
3187
3193
|
);
|
|
3188
3194
|
const p = T(() => n.showToolbar || !!n.tableSetConfig), g = I(n.headerFilterModel || {});
|
|
3189
3195
|
return t({
|
|
3190
3196
|
getInstance: () => a.value,
|
|
3191
3197
|
// 重新加载当前行数据,刷新状态
|
|
3192
|
-
reloadRow: (
|
|
3198
|
+
reloadRow: (d) => {
|
|
3193
3199
|
var v;
|
|
3194
|
-
Array.isArray(
|
|
3200
|
+
Array.isArray(d) ? d.forEach(async (y) => {
|
|
3195
3201
|
var $;
|
|
3196
3202
|
return await (($ = a.value) == null ? void 0 : $.reloadRow(y));
|
|
3197
|
-
}) : (v = a.value) == null || v.reloadRow(
|
|
3203
|
+
}) : (v = a.value) == null || v.reloadRow(d);
|
|
3198
3204
|
},
|
|
3199
3205
|
// 获取表头筛选数据
|
|
3200
3206
|
getCheckedFilters() {
|
|
3201
|
-
var
|
|
3202
|
-
return (
|
|
3207
|
+
var d;
|
|
3208
|
+
return (d = a.value) == null ? void 0 : d.getCheckedFilters();
|
|
3203
3209
|
}
|
|
3204
|
-
}), (
|
|
3210
|
+
}), (d, v) => {
|
|
3205
3211
|
var y, $, M;
|
|
3206
3212
|
return F(), q("div", {
|
|
3207
3213
|
class: kn(["sab-table-wrap", n.wrapClassName])
|
|
@@ -3211,25 +3217,25 @@ const lm = (e) => {
|
|
|
3211
3217
|
"table-ref": a.value,
|
|
3212
3218
|
columns: n.columns,
|
|
3213
3219
|
name: n.name,
|
|
3214
|
-
tableSetConfig:
|
|
3220
|
+
tableSetConfig: d.tableSetConfig,
|
|
3215
3221
|
"onUpdate:columns": v[0] || (v[0] = (P) => s("update:columns", P))
|
|
3216
3222
|
}, {
|
|
3217
3223
|
"toolbar-right": R(() => [
|
|
3218
|
-
z(
|
|
3224
|
+
z(d.$slots, "toolbar-right")
|
|
3219
3225
|
]),
|
|
3220
3226
|
default: R(() => [
|
|
3221
|
-
z(
|
|
3227
|
+
z(d.$slots, "toolbar")
|
|
3222
3228
|
]),
|
|
3223
3229
|
_: 3
|
|
3224
3230
|
}, 8, ["table-ref", "columns", "name", "tableSetConfig"])) : Ke("", !0),
|
|
3225
3231
|
L("div", sm, [
|
|
3226
|
-
|
|
3232
|
+
c.value ? (F(), Y(A(Bn), C({
|
|
3227
3233
|
key: 0,
|
|
3228
3234
|
ref_key: "xTable",
|
|
3229
3235
|
ref: a,
|
|
3230
3236
|
data: n.data,
|
|
3231
3237
|
footerMethod: A(lm)(l.value.columns || [])
|
|
3232
|
-
}, b.value, Un(A(
|
|
3238
|
+
}, b.value, Un(A(f)), {
|
|
3233
3239
|
"empty-text": (y = A(o)) == null ? void 0 : y.sabDesign.table.emptyText,
|
|
3234
3240
|
"loading-config": {
|
|
3235
3241
|
text: ($ = A(o)) == null ? void 0 : $.sabDesign.table.loadingText
|
|
@@ -3241,7 +3247,7 @@ const lm = (e) => {
|
|
|
3241
3247
|
// 无需背景高亮
|
|
3242
3248
|
"sab-table-row-no-bg-highlight": l.value.rowBackgroundHighlight === !1,
|
|
3243
3249
|
// 有头部筛选条
|
|
3244
|
-
"sab-table-header-filters": ((M =
|
|
3250
|
+
"sab-table-header-filters": ((M = d.headerFilterConfig) == null ? void 0 : M.enable) != !1
|
|
3245
3251
|
}
|
|
3246
3252
|
]
|
|
3247
3253
|
}), {
|
|
@@ -3253,12 +3259,12 @@ const lm = (e) => {
|
|
|
3253
3259
|
visible: P.visible != !1,
|
|
3254
3260
|
headerFilterModel: g.value,
|
|
3255
3261
|
"onUpdate:headerFilterModel": v[1] || (v[1] = (E) => g.value = E),
|
|
3256
|
-
onFilterChange: A(
|
|
3262
|
+
onFilterChange: A(f)["filter-change"]
|
|
3257
3263
|
}), Hn({ _: 2 }, [
|
|
3258
3264
|
_t(i.value, (E) => ({
|
|
3259
3265
|
name: E,
|
|
3260
3266
|
fn: R((S) => [
|
|
3261
|
-
z(
|
|
3267
|
+
z(d.$slots, E, Kn(Gn(S)))
|
|
3262
3268
|
])
|
|
3263
3269
|
}))
|
|
3264
3270
|
]), 1040, ["xTable", "visible", "headerFilterModel", "onFilterChange"]))), 128))
|
|
@@ -3266,7 +3272,7 @@ const lm = (e) => {
|
|
|
3266
3272
|
_: 3
|
|
3267
3273
|
}, 16, ["data", "footerMethod", "empty-text", "loading-config", "class"])) : Ke("", !0)
|
|
3268
3274
|
]),
|
|
3269
|
-
z(
|
|
3275
|
+
z(d.$slots, "table-footer")
|
|
3270
3276
|
], 2);
|
|
3271
3277
|
};
|
|
3272
3278
|
}
|