bkui-vue 0.0.2-beta.84 → 0.0.2-beta.85
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/dist/index.cjs.js +5 -5
- package/dist/index.esm.js +311 -299
- package/dist/index.umd.js +5 -5
- package/lib/table/index.js +10 -2
- package/lib/tree/index.d.ts +9 -15
- package/lib/tree/index.js +3 -2
- package/lib/tree/props.d.ts +2 -4
- package/lib/tree/tree.d.ts +5 -9
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -1437,7 +1437,7 @@ function T4(e) {
|
|
1437
1437
|
C[M] = Z, z[M] = Z - _;
|
1438
1438
|
}
|
1439
1439
|
if (l) {
|
1440
|
-
var
|
1440
|
+
var se, fe = M === "x" ? kt : xt, ie = M === "x" ? _t : Ht, oe = C[I], Ne = I === "y" ? "height" : "width", ne = oe + w[fe], re = oe - w[ie], ge = [kt, xt].indexOf(b) !== -1, be = (se = A == null ? void 0 : A[I]) != null ? se : 0, Te = ge ? ne : oe - x[Ne] - T[Ne] - be + N.altAxis, Ae = ge ? oe + x[Ne] + T[Ne] - be - N.altAxis : re, We = m && ge ? Ug(Te, oe, Ae) : Ai(m ? Te : ne, oe, m ? Ae : re);
|
1441
1441
|
C[I] = We, z[I] = We - oe;
|
1442
1442
|
}
|
1443
1443
|
t.modifiersData[a] = z;
|
@@ -6277,8 +6277,8 @@ const g8 = (e, t, n) => {
|
|
6277
6277
|
customThemes: q
|
6278
6278
|
};
|
6279
6279
|
}), g = () => e.autoVisibility, m = () => e.autoPlacement, v = () => {
|
6280
|
-
var H, Z,
|
6281
|
-
const B = p(), $ = L((H = a.value) == null ? void 0 : H.$el), q = e.arrow ? L((Z = i.value) == null ? void 0 : Z.$el) : null, S = L((
|
6280
|
+
var H, Z, se;
|
6281
|
+
const B = p(), $ = L((H = a.value) == null ? void 0 : H.$el), q = e.arrow ? L((Z = i.value) == null ? void 0 : Z.$el) : null, S = L((se = s.value) == null ? void 0 : se.$el), {
|
6282
6282
|
isElement: E,
|
6283
6283
|
content: F
|
6284
6284
|
} = Hh(e.content);
|
@@ -6298,10 +6298,10 @@ const g8 = (e, t, n) => {
|
|
6298
6298
|
let q;
|
6299
6299
|
if ($.name === "offset") {
|
6300
6300
|
if (typeof ((S = $.options) == null ? void 0 : S.offset) == "number" && (q = (E = $.options) == null ? void 0 : E.offset), Array.isArray((F = $.options) == null ? void 0 : F.offset)) {
|
6301
|
-
const [Z,
|
6301
|
+
const [Z, se] = (H = $.options) == null ? void 0 : H.offset;
|
6302
6302
|
q = {
|
6303
6303
|
mainAxis: Z,
|
6304
|
-
crossAxis:
|
6304
|
+
crossAxis: se
|
6305
6305
|
};
|
6306
6306
|
}
|
6307
6307
|
Object.assign(B, {
|
@@ -6412,18 +6412,18 @@ const g8 = (e, t, n) => {
|
|
6412
6412
|
return;
|
6413
6413
|
const Z = b(F, $);
|
6414
6414
|
g8(H, E, Z).then(({
|
6415
|
-
x:
|
6416
|
-
y:
|
6417
|
-
placement:
|
6415
|
+
x: se,
|
6416
|
+
y: fe,
|
6417
|
+
placement: ie,
|
6418
6418
|
middlewareData: oe
|
6419
6419
|
}) => {
|
6420
6420
|
const Ne = E.className;
|
6421
6421
|
E.className = `${Ne.replace(I, "")} ${I}`.replace(/\s+/gm, " ").replace(/^\s+|\s+$/g, ""), Object.keys(M).forEach((ge) => {
|
6422
6422
|
E.setAttribute(ge, M[ge]);
|
6423
6423
|
});
|
6424
|
-
const ne =
|
6424
|
+
const ne = ie.split("-")[0];
|
6425
6425
|
let re = ne;
|
6426
|
-
["left", "right", "top", "bottom"].includes(ne) || (re = "top"), T(E,
|
6426
|
+
["left", "right", "top", "bottom"].includes(ne) || (re = "top"), T(E, se, fe, oe), P(F, re, oe), typeof q == "function" && q();
|
6427
6427
|
});
|
6428
6428
|
};
|
6429
6429
|
let z, R, j = !1;
|
@@ -7469,10 +7469,10 @@ const F8 = {
|
|
7469
7469
|
"is-simplicity": e.behavior === "simplicity",
|
7470
7470
|
[`${t.attrs.class}`]: !!t.attrs.class
|
7471
7471
|
}, c.value)), p = W(!1), w = W({}), b = () => {
|
7472
|
-
var
|
7472
|
+
var ie, oe;
|
7473
7473
|
if (l.value)
|
7474
7474
|
if (e.autosize) {
|
7475
|
-
const Ne = (
|
7475
|
+
const Ne = (ie = e.autosize) == null ? void 0 : ie.minRows, ne = (oe = e.autosize) == null ? void 0 : oe.maxRows, re = jd(g.value, Ne, ne);
|
7476
7476
|
w.value = {
|
7477
7477
|
overflowY: "hidden",
|
7478
7478
|
...re
|
@@ -7483,13 +7483,13 @@ const F8 = {
|
|
7483
7483
|
w.value = {
|
7484
7484
|
minHeight: jd(g.value).minHeight
|
7485
7485
|
};
|
7486
|
-
}, y = ((
|
7486
|
+
}, y = ((ie) => {
|
7487
7487
|
let oe = !1;
|
7488
7488
|
return () => {
|
7489
7489
|
var ne;
|
7490
7490
|
if (oe || !e.autosize)
|
7491
7491
|
return;
|
7492
|
-
((ne = g.value) == null ? void 0 : ne.offsetParent) === null || (
|
7492
|
+
((ne = g.value) == null ? void 0 : ne.offsetParent) === null || (ie(), oe = !0);
|
7493
7493
|
};
|
7494
7494
|
})(b), M = H("suffix-icon"), I = {
|
7495
7495
|
search: () => u(Ta, null, null),
|
@@ -7498,11 +7498,11 @@ const F8 = {
|
|
7498
7498
|
class: M
|
7499
7499
|
}, null)
|
7500
7500
|
}, C = k(() => {
|
7501
|
-
const
|
7501
|
+
const ie = I[e.type];
|
7502
7502
|
return P.value ? u(Yr, {
|
7503
7503
|
class: M,
|
7504
7504
|
onClick: Z
|
7505
|
-
}, null) :
|
7505
|
+
}, null) : ie ? u(ie, {
|
7506
7506
|
class: M
|
7507
7507
|
}, null) : null;
|
7508
7508
|
}), x = k(() => e.type === "number"), T = k(() => Math.floor(e.maxlength ?? e.maxcharacter ?? 0)), P = W(!1), N = k(() => Ie({
|
@@ -7511,15 +7511,15 @@ const F8 = {
|
|
7511
7511
|
}, M)), A = k(() => Ie({
|
7512
7512
|
[H("max-length")]: !0,
|
7513
7513
|
"is-over-limit": T.value - R.value < 0
|
7514
|
-
})), z = (
|
7514
|
+
})), z = (ie) => typeof e.maxcharacter == "number" ? ie.split("").reduce((oe, Ne, ne) => (oe.len += Ne.charCodeAt(0) > 255 ? 2 : 1, oe.len > e.maxcharacter && oe.pos === -1 && (oe.pos = ne), oe), {
|
7515
7515
|
len: 0,
|
7516
7516
|
pos: -1
|
7517
7517
|
}) : {
|
7518
|
-
len:
|
7518
|
+
len: ie.length,
|
7519
7519
|
pos: -1
|
7520
7520
|
}, R = k(() => {
|
7521
|
-
const
|
7522
|
-
return z(
|
7521
|
+
const ie = e.modelValue ?? "";
|
7522
|
+
return z(ie).len;
|
7523
7523
|
}), j = k(() => Ie({
|
7524
7524
|
"is-disabled": e.disabled || e.modelValue >= e.max
|
7525
7525
|
})), O = k(() => Ie({
|
@@ -7534,10 +7534,10 @@ const F8 = {
|
|
7534
7534
|
});
|
7535
7535
|
ue(() => e.type, async () => {
|
7536
7536
|
await ke(), b();
|
7537
|
-
}), ue(() => e.modelValue, (
|
7537
|
+
}), ue(() => e.modelValue, (ie) => {
|
7538
7538
|
var oe;
|
7539
7539
|
e.withValidate && ((oe = a == null ? void 0 : a.validate) == null || oe.call(a, "change")), m.value = {
|
7540
|
-
value:
|
7540
|
+
value: ie
|
7541
7541
|
}, ke(() => b());
|
7542
7542
|
}), Oe(() => {
|
7543
7543
|
p.value = K(), te.observe(g.value), ke(() => b());
|
@@ -7550,27 +7550,27 @@ const F8 = {
|
|
7550
7550
|
clear: ae
|
7551
7551
|
});
|
7552
7552
|
function K() {
|
7553
|
-
var
|
7554
|
-
return ((
|
7553
|
+
var ie, oe;
|
7554
|
+
return ((ie = g.value) == null ? void 0 : ie.scrollWidth) > ((oe = g.value) == null ? void 0 : oe.clientWidth) + 2;
|
7555
7555
|
}
|
7556
7556
|
function ae() {
|
7557
7557
|
if (e.disabled)
|
7558
7558
|
return;
|
7559
|
-
const
|
7560
|
-
t.emit(je.UPDATE,
|
7559
|
+
const ie = x.value ? e.min : "";
|
7560
|
+
t.emit(je.UPDATE, ie, null), t.emit(je.CHANGE, ie, null), t.emit(je.CLEAR);
|
7561
7561
|
}
|
7562
|
-
function G(
|
7563
|
-
s.value = !0, t.emit(je.FOCUS,
|
7562
|
+
function G(ie) {
|
7563
|
+
s.value = !0, t.emit(je.FOCUS, ie);
|
7564
7564
|
}
|
7565
|
-
function ee(
|
7565
|
+
function ee(ie) {
|
7566
7566
|
var oe;
|
7567
|
-
s.value = !1, p.value = K(), t.emit(je.BLUR,
|
7567
|
+
s.value = !1, p.value = K(), t.emit(je.BLUR, ie), e.withValidate && ((oe = a == null ? void 0 : a.validate) == null || oe.call(a, "blur"));
|
7568
7568
|
}
|
7569
|
-
function V(
|
7569
|
+
function V(ie) {
|
7570
7570
|
return (oe) => {
|
7571
7571
|
if (e.stopPropagation && oe.stopPropagation(), _.value && !e.overMaxLengthLimit) {
|
7572
7572
|
const Ne = z(oe.target.value);
|
7573
|
-
if (Ne.len >= T.value && (
|
7573
|
+
if (Ne.len >= T.value && (ie === je.KEYDOWN || ie === je.INPUT) && !r.value) {
|
7574
7574
|
const ne = Ne.pos > 0 ? oe.target.value.slice(0, Ne.pos) : oe.target.value;
|
7575
7575
|
m.value = {
|
7576
7576
|
value: ne
|
@@ -7578,15 +7578,15 @@ const F8 = {
|
|
7578
7578
|
return;
|
7579
7579
|
}
|
7580
7580
|
}
|
7581
|
-
if (
|
7582
|
-
if (
|
7581
|
+
if (ie === je.KEYDOWN && (oe.code === "Enter" || oe.key === "Enter" || oe.keyCode === 13) && t.emit(je.ENTER, oe.target.value, oe), !(r.value && [je.INPUT, je.CHANGE, je.KEYDOWN].some((Ne) => ie === Ne))) {
|
7582
|
+
if (ie === je.INPUT)
|
7583
7583
|
t.emit(je.UPDATE, oe.target.value, oe);
|
7584
|
-
else if (
|
7584
|
+
else if (ie === je.CHANGE && x.value && oe.target.value !== "") {
|
7585
7585
|
const Ne = S(oe.target.value, 0);
|
7586
|
-
t.emit(je.UPDATE, Ne, oe), t.emit(
|
7586
|
+
t.emit(je.UPDATE, Ne, oe), t.emit(ie, Ne, oe);
|
7587
7587
|
return;
|
7588
7588
|
}
|
7589
|
-
t.emit(
|
7589
|
+
t.emit(ie, oe.target.value, oe);
|
7590
7590
|
}
|
7591
7591
|
};
|
7592
7592
|
}
|
@@ -7594,38 +7594,38 @@ const F8 = {
|
|
7594
7594
|
function $() {
|
7595
7595
|
r.value = !0;
|
7596
7596
|
}
|
7597
|
-
function q(
|
7598
|
-
r.value = !1, B(
|
7597
|
+
function q(ie) {
|
7598
|
+
r.value = !1, B(ie);
|
7599
7599
|
}
|
7600
|
-
function S(
|
7601
|
-
const ne = Number(oe), re = Number.isInteger(e.precision) ? e.precision : 0, ge = Number(
|
7600
|
+
function S(ie, oe, Ne = !0) {
|
7601
|
+
const ne = Number(oe), re = Number.isInteger(e.precision) ? e.precision : 0, ge = Number(ie), be = Number.isInteger(ne) ? ne : 1;
|
7602
7602
|
let Te = ge + (Ne ? be : -1 * be);
|
7603
7603
|
return Number.isInteger(e.max) && (Te = Math.min(Te, e.max)), Number.isInteger(e.min) && (Te = Math.max(Te, e.min)), +Te.toFixed(re);
|
7604
7604
|
}
|
7605
|
-
function E(
|
7605
|
+
function E(ie) {
|
7606
7606
|
if (e.disabled)
|
7607
7607
|
return;
|
7608
7608
|
const oe = S(e.modelValue, e.step);
|
7609
|
-
t.emit(je.UPDATE, oe,
|
7609
|
+
t.emit(je.UPDATE, oe, ie), t.emit(je.CHANGE, oe, ie);
|
7610
7610
|
}
|
7611
|
-
function F(
|
7611
|
+
function F(ie) {
|
7612
7612
|
if (e.disabled)
|
7613
7613
|
return;
|
7614
7614
|
const oe = S(e.modelValue, e.step, !1);
|
7615
|
-
t.emit(je.UPDATE, oe,
|
7615
|
+
t.emit(je.UPDATE, oe, ie), t.emit(je.CHANGE, oe, ie);
|
7616
7616
|
}
|
7617
|
-
function H(
|
7618
|
-
return `${c.value}--${
|
7617
|
+
function H(ie) {
|
7618
|
+
return `${c.value}--${ie}`;
|
7619
7619
|
}
|
7620
7620
|
function Z() {
|
7621
7621
|
P.value = !P.value;
|
7622
7622
|
}
|
7623
|
-
const
|
7623
|
+
const se = k(() => ({
|
7624
7624
|
maxlength: !e.overMaxLengthLimit && e.maxlength,
|
7625
7625
|
placeholder: e.placeholder || i.value.placeholder,
|
7626
7626
|
readonly: e.readonly,
|
7627
7627
|
disabled: e.disabled
|
7628
|
-
})),
|
7628
|
+
})), fe = {
|
7629
7629
|
onInput: B,
|
7630
7630
|
onFocus: G,
|
7631
7631
|
onBlur: ee,
|
@@ -7638,18 +7638,18 @@ const F8 = {
|
|
7638
7638
|
onCompositionend: q
|
7639
7639
|
};
|
7640
7640
|
return () => {
|
7641
|
-
var
|
7641
|
+
var ie, oe, Ne, ne;
|
7642
7642
|
return we(u("div", {
|
7643
7643
|
class: v.value,
|
7644
7644
|
style: d
|
7645
|
-
}, [((oe = (
|
7645
|
+
}, [((oe = (ie = t.slots) == null ? void 0 : ie.prefix) == null ? void 0 : oe.call(ie)) ?? (e.prefix && u("div", {
|
7646
7646
|
class: H("prefix-area")
|
7647
7647
|
}, [u("span", {
|
7648
7648
|
class: H("prefix-area--text")
|
7649
7649
|
}, [e.prefix])])), l.value ? u("textarea", ce({
|
7650
7650
|
ref: g,
|
7651
7651
|
spellcheck: !1
|
7652
|
-
}, f,
|
7652
|
+
}, f, fe, se.value, {
|
7653
7653
|
rows: e.rows,
|
7654
7654
|
style: w.value
|
7655
7655
|
}, m.value), null) : u("input", ce({
|
@@ -7661,7 +7661,7 @@ const F8 = {
|
|
7661
7661
|
step: e.step,
|
7662
7662
|
max: e.max,
|
7663
7663
|
min: e.min
|
7664
|
-
},
|
7664
|
+
}, fe, se.value, m.value), null), !l.value && e.clearable && !!e.modelValue && u("span", {
|
7665
7665
|
class: N.value,
|
7666
7666
|
onClick: ae
|
7667
7667
|
}, [u(Ot, null, null)]), C.value, _.value && (e.showWordLimit || l.value) && u("p", {
|
@@ -10487,10 +10487,10 @@ const nI = /* @__PURE__ */ le({
|
|
10487
10487
|
const Z = k(() => re.value ? M.value : M.value.filter((me) => {
|
10488
10488
|
var pe;
|
10489
10489
|
return ge.value(yn.value, me) && ((pe = ka(String(me[I.value]))) == null ? void 0 : pe.includes(ka(yn.value)));
|
10490
|
-
})),
|
10490
|
+
})), se = k(() => s.value || o.value), fe = k(() => S.value.map((me) => {
|
10491
10491
|
var pe, De;
|
10492
10492
|
return ((De = (pe = B.value) == null ? void 0 : pe.get(me.value)) == null ? void 0 : De.optionName) || H.value[me.value] || me.label;
|
10493
|
-
})),
|
10493
|
+
})), ie = k(() => {
|
10494
10494
|
const me = $.value.reduce((pe, De) => (De.disabled || pe.push(De.optionID), pe), []);
|
10495
10495
|
return me.length <= S.value.length && me.every((pe) => S.value.some((De) => De.value === pe));
|
10496
10496
|
}), oe = k(() => !!q.value.size), Ne = k(() => !$.value.length), ne = k(() => $.value.length && $.value.every((me) => !me.visible)), re = k(() => r.value && typeof c.value == "function"), ge = k(() => typeof j.value == "function" ? j.value : () => j.value), be = k(() => !(Nl.value || Ne.value || ne.value) || v.value), Te = k(() => l.value && L.value && (!yn.value || !r.value)), Ae = k(() => y.value - 12 - (Te.value ? 32 : 0)), We = k(() => Nl.value ? _.value : ne.value || M.value.length && !Z.value.length ? Y.value : Ne.value ? O.value : ""), ut = k(() => T.value ? x.value && !ea.value : x.value), Ve = k(() => oc({
|
@@ -10551,7 +10551,7 @@ const nI = /* @__PURE__ */ le({
|
|
10551
10551
|
} = Z7(re.value ? c.value : V3, bu), bn = (me) => {
|
10552
10552
|
me !== i.value && (t("update:modelValue", me, i.value), t("change", me, i.value));
|
10553
10553
|
}, G3 = () => {
|
10554
|
-
|
10554
|
+
se.value || (mu(), F3());
|
10555
10555
|
}, Z3 = (me) => {
|
10556
10556
|
r.value && (yn.value = me);
|
10557
10557
|
}, Y3 = (me) => {
|
@@ -10571,7 +10571,7 @@ const nI = /* @__PURE__ */ le({
|
|
10571
10571
|
label: pe
|
10572
10572
|
}], bn(pe), vi()), yn.value = "");
|
10573
10573
|
}, gs = (me) => {
|
10574
|
-
if (!(
|
10574
|
+
if (!(se.value || !me)) {
|
10575
10575
|
if (l.value) {
|
10576
10576
|
const pe = S.value.findIndex((De) => De.value === me.optionID);
|
10577
10577
|
pe > -1 ? (S.value.splice(pe, 1), bn(S.value.map((De) => De.value)), t("deselect", me.optionID)) : (S.value.push({
|
@@ -10596,7 +10596,7 @@ const nI = /* @__PURE__ */ le({
|
|
10596
10596
|
F.value = "";
|
10597
10597
|
}, X3 = () => {
|
10598
10598
|
var me;
|
10599
|
-
|
10599
|
+
ie.value ? S.value = [] : ($.value.forEach((pe) => {
|
10600
10600
|
pe.disabled || pe.optionID in E.value || S.value.push({
|
10601
10601
|
value: pe.optionID,
|
10602
10602
|
label: pe.optionName || pe.optionID
|
@@ -10615,7 +10615,7 @@ const nI = /* @__PURE__ */ le({
|
|
10615
10615
|
} = me.target;
|
10616
10616
|
pe + De === Bt && t("scroll-end");
|
10617
10617
|
}, e6 = (me) => {
|
10618
|
-
if (
|
10618
|
+
if (se.value)
|
10619
10619
|
return;
|
10620
10620
|
const pe = S.value.findIndex((De) => De.value === me);
|
10621
10621
|
pe > -1 && (S.value.splice(pe, 1), bn(S.value.map((De) => De.value)), t("tag-remove", me));
|
@@ -10703,8 +10703,8 @@ const nI = /* @__PURE__ */ le({
|
|
10703
10703
|
selected: S,
|
10704
10704
|
isInput: B3,
|
10705
10705
|
options: $,
|
10706
|
-
isDisabled:
|
10707
|
-
selectedLabel:
|
10706
|
+
isDisabled: se,
|
10707
|
+
selectedLabel: fe,
|
10708
10708
|
isPopoverShow: ea,
|
10709
10709
|
isHover: Pe,
|
10710
10710
|
popperWidth: pu,
|
@@ -12481,9 +12481,9 @@ const ot = (e, t, n) => {
|
|
12481
12481
|
a.columns.length = 0, a.columns.push(...E);
|
12482
12482
|
let F = 0;
|
12483
12483
|
const H = Y(["colspan"]);
|
12484
|
-
(E || []).forEach((Z,
|
12485
|
-
const { skipCol:
|
12486
|
-
if (F =
|
12484
|
+
(E || []).forEach((Z, se) => {
|
12485
|
+
const { skipCol: fe, skipColumnNum: ie, skipColLen: oe } = H ? v(Z, se, F) : { skipCol: !1, skipColumnNum: 0, skipColLen: 0 };
|
12486
|
+
if (F = ie, !a.columnSchema.has(Z)) {
|
12487
12487
|
const { type: Ne, fn: ne, scope: re, active: ge } = fN(Z, e);
|
12488
12488
|
a.columnSchema.set(Z, {
|
12489
12489
|
[Le.CALC_WIDTH]: void 0,
|
@@ -12499,21 +12499,21 @@ const ot = (e, t, n) => {
|
|
12499
12499
|
[Le.COL_SORT_SCOPE]: re,
|
12500
12500
|
[Le.COL_SORT_ACTIVE]: ge,
|
12501
12501
|
[Le.COL_IS_DRAG]: !1,
|
12502
|
-
[Le.COL_SPAN]: { skipCol:
|
12502
|
+
[Le.COL_SPAN]: { skipCol: fe, skipColumnNum: ie, skipColLen: oe },
|
12503
12503
|
[Le.COL_UID]: Sn.v4()
|
12504
12504
|
});
|
12505
12505
|
}
|
12506
12506
|
Object.assign(a.columnSchema.get(Z), {
|
12507
|
-
[Le.COL_SPAN]: { skipCol:
|
12507
|
+
[Le.COL_SPAN]: { skipCol: fe, skipColumnNum: ie, skipColLen: oe }
|
12508
12508
|
});
|
12509
12509
|
});
|
12510
12510
|
}, v = (E, F, H) => {
|
12511
12511
|
let Z = H;
|
12512
|
-
const
|
12512
|
+
const se = or(E, F, null, null, "colspan"), fe = {
|
12513
12513
|
skipCol: !1,
|
12514
12514
|
skipColLen: 0
|
12515
12515
|
};
|
12516
|
-
return Z > 0 && (
|
12516
|
+
return Z > 0 && (fe.skipColLen = Z, fe.skipCol = !0, Z = Z - 1), se > 1 && (fe.skipColLen = se, Z = se - 1), { ...fe, skipColumnNum: Z };
|
12517
12517
|
}, p = (E) => j(E, Le.COL_FILTER_FN), w = () => {
|
12518
12518
|
const E = a.columns.filter((F) => !N(F) && typeof p(F) == "function").map((F) => p(F));
|
12519
12519
|
l(E);
|
@@ -12530,9 +12530,9 @@ const ot = (e, t, n) => {
|
|
12530
12530
|
}), E && r();
|
12531
12531
|
}, y = (E, F) => {
|
12532
12532
|
const H = Array.isArray(E) ? E : [E], Z = Array.isArray(F) ? F : [F];
|
12533
|
-
a.columns.forEach((
|
12534
|
-
H.forEach((
|
12535
|
-
z(
|
12533
|
+
a.columns.forEach((se) => {
|
12534
|
+
H.forEach((fe, ie) => {
|
12535
|
+
z(se, fe, Z[ie]);
|
12536
12536
|
});
|
12537
12537
|
});
|
12538
12538
|
}, M = (E, F) => {
|
@@ -12556,27 +12556,30 @@ const ot = (e, t, n) => {
|
|
12556
12556
|
Z && Object.prototype.hasOwnProperty.call(Z, F) && (Z[F] = H);
|
12557
12557
|
}, R = (E, F) => {
|
12558
12558
|
const H = F || E.checked || [], Z = E.fields || [];
|
12559
|
-
a.columns.forEach((
|
12560
|
-
z(
|
12559
|
+
a.columns.forEach((se) => {
|
12560
|
+
z(se, Le.IS_HIDDEN, lf(Z, se, H));
|
12561
12561
|
});
|
12562
12562
|
}, j = (E, F) => {
|
12563
12563
|
var H;
|
12564
12564
|
return (H = a.columnSchema.get(E)) == null ? void 0 : H[F];
|
12565
12565
|
}, O = (E) => e.isRowSelectEnable ? typeof e.isSelectedFn == "function" ? e.isSelectedFn({ row: E }) : Array.isArray(e.checked) ? e.checked.some((F) => typeof F == "string" ? rN(E, F) === F : F === E) : !1 : !1, Y = (E = ["rowspan", "colspan"]) => a.columns.some((F) => E.some((H) => typeof F[H] == "function" || /^\d$/.test(`${F[H]}`))), _ = (E) => {
|
12566
|
-
a.data.length = 0, a.data.push(...E)
|
12567
|
-
|
12568
|
-
|
12566
|
+
a.data.length = 0, a.data.push(...E);
|
12567
|
+
let F = !1, H = !1;
|
12568
|
+
(E || []).forEach((Z, se) => {
|
12569
|
+
let fe = dN(Z, Sn.v4(), e);
|
12570
|
+
const ie = O(Z);
|
12571
|
+
ie ? F = !0 : H = !0, a.dataSchema.has(Z) || a.dataSchema.set(Z, {
|
12569
12572
|
[ze.ROW_EXPAND]: !1,
|
12570
|
-
[ze.ROW_SELECTION]:
|
12571
|
-
[ze.ROW_UID]:
|
12572
|
-
[ze.ROW_INDEX]:
|
12573
|
+
[ze.ROW_SELECTION]: ie,
|
12574
|
+
[ze.ROW_UID]: fe,
|
12575
|
+
[ze.ROW_INDEX]: se + 1,
|
12573
12576
|
[ze.ROW_SELECTION_INDETERMINATE]: !1
|
12574
12577
|
});
|
12575
|
-
const
|
12576
|
-
|
12578
|
+
const oe = a.dataSchema.get(Z);
|
12579
|
+
fe = oe[ze.ROW_UID], oe[ze.ROW_INDEX] = se + 1;
|
12577
12580
|
}), a.dataSchema.set(xi, {
|
12578
|
-
[ze.ROW_SELECTION]:
|
12579
|
-
[ze.ROW_SELECTION_INDETERMINATE]:
|
12581
|
+
[ze.ROW_SELECTION]: F,
|
12582
|
+
[ze.ROW_SELECTION_INDETERMINATE]: F && H
|
12580
12583
|
}), a.dataSchema.set(N9, {
|
12581
12584
|
[ze.ROW_SPAN]: Y(["rowspan"])
|
12582
12585
|
});
|
@@ -12627,17 +12630,17 @@ const ot = (e, t, n) => {
|
|
12627
12630
|
getColumnOrderWidth: P,
|
12628
12631
|
getRowSelection: () => a.data.filter((E) => U(E, ze.ROW_SELECTION)),
|
12629
12632
|
resolveColumnWidth: (E, F = la, H = 0) => {
|
12630
|
-
const { width: Z } = E.getBoundingClientRect() || {},
|
12631
|
-
let
|
12632
|
-
const
|
12633
|
+
const { width: Z } = E.getBoundingClientRect() || {}, se = Z - H;
|
12634
|
+
let fe = se;
|
12635
|
+
const ie = [], oe = (ne, re) => {
|
12633
12636
|
const ge = j(ne, Le.COL_MIN_WIDTH);
|
12634
12637
|
if (ge === void 0)
|
12635
12638
|
return re < la ? la : re;
|
12636
12639
|
let be = re;
|
12637
|
-
return /^\d+\.?\d*$/.test(`${ge}`) && (be = Number(ge)), /^\d+\.?\d*%$/.test(`${ge}`) && (be = Number(ge) *
|
12640
|
+
return /^\d+\.?\d*$/.test(`${ge}`) && (be = Number(ge)), /^\d+\.?\d*%$/.test(`${ge}`) && (be = Number(ge) * se / 100), /^\d+\.?\d*px$/i.test(`${ge}`) && (be = Number(`${ge}`.replace(/px/i, ""))), be;
|
12638
12641
|
}, Ne = (ne, re, ge = !0) => {
|
12639
12642
|
const be = oe(ne, re), Te = re < be ? be : re;
|
12640
|
-
Object.assign(ne, { calcWidth: Te }), ge && (
|
12643
|
+
Object.assign(ne, { calcWidth: Te }), ge && (fe = fe - Te, fe < 0 && (fe = 0));
|
12641
12644
|
};
|
12642
12645
|
if (a.columns.forEach((ne, re) => {
|
12643
12646
|
if (!N(ne)) {
|
@@ -12649,21 +12652,21 @@ const ot = (e, t, n) => {
|
|
12649
12652
|
}
|
12650
12653
|
if (/^\d+\.?\d*%$/.test(be)) {
|
12651
12654
|
let Ae = F;
|
12652
|
-
if (
|
12655
|
+
if (fe > 0) {
|
12653
12656
|
const We = Number(be.replace("%", ""));
|
12654
|
-
Ae =
|
12657
|
+
Ae = fe * We / 100;
|
12655
12658
|
}
|
12656
12659
|
Ne(ne, Ae), Te = !1;
|
12657
12660
|
}
|
12658
|
-
Te &&
|
12661
|
+
Te && ie.push(re);
|
12659
12662
|
}
|
12660
|
-
}),
|
12663
|
+
}), ie.length > 0) {
|
12661
12664
|
let ne = F;
|
12662
|
-
|
12663
|
-
ne =
|
12665
|
+
fe > 0 ? ie.forEach((re, ge) => {
|
12666
|
+
ne = fe / (ie.length - ge), Ne(a.columns[re], ne, !1);
|
12664
12667
|
const be = j(a.columns[re], Le.CALC_WIDTH);
|
12665
|
-
|
12666
|
-
}) :
|
12668
|
+
fe = fe - be;
|
12669
|
+
}) : ie.forEach((re) => {
|
12667
12670
|
const ge = oe(a.columns[re], la);
|
12668
12671
|
z(a.columns[re], Le.CALC_WIDTH, ge);
|
12669
12672
|
});
|
@@ -13862,17 +13865,17 @@ const TN = (e, t, n, a, i) => {
|
|
13862
13865
|
return ee(xi, null, !0);
|
13863
13866
|
const Z = [];
|
13864
13867
|
F.sort && Z.push(M(F, H)), F.filter && Z.push(I(F, H));
|
13865
|
-
const
|
13868
|
+
const se = B(F, H);
|
13866
13869
|
Z.unshift(u("span", {
|
13867
13870
|
class: "head-text"
|
13868
|
-
}, [
|
13869
|
-
const
|
13871
|
+
}, [se]));
|
13872
|
+
const fe = typeof se == "string" ? se : void 0, ie = {
|
13870
13873
|
"has-sort": !!F.sort,
|
13871
13874
|
"has-filter": !!F.filter
|
13872
13875
|
};
|
13873
13876
|
return u(of, {
|
13874
|
-
class:
|
13875
|
-
title:
|
13877
|
+
class: ie,
|
13878
|
+
title: fe,
|
13876
13879
|
observerResize: e.observerResize,
|
13877
13880
|
resizerWay: e.resizerWay,
|
13878
13881
|
isHead: !0,
|
@@ -13884,11 +13887,11 @@ const TN = (e, t, n, a, i) => {
|
|
13884
13887
|
});
|
13885
13888
|
}, q = (F) => {
|
13886
13889
|
const H = n.getColumnAttribute(F, Le.LISTENERS);
|
13887
|
-
return H ? Array.from(H == null ? void 0 : H.keys()).reduce((Z,
|
13888
|
-
const
|
13890
|
+
return H ? Array.from(H == null ? void 0 : H.keys()).reduce((Z, se) => {
|
13891
|
+
const fe = se.split("_").slice(-1)[0];
|
13889
13892
|
return Object.assign(Z, {
|
13890
|
-
[
|
13891
|
-
H.get(
|
13893
|
+
[fe]: (ie) => {
|
13894
|
+
H.get(se).forEach((oe) => Reflect.apply(oe, globalThis, [ie, F]));
|
13892
13895
|
}
|
13893
13896
|
});
|
13894
13897
|
}, {}) : {};
|
@@ -13910,9 +13913,9 @@ const TN = (e, t, n, a, i) => {
|
|
13910
13913
|
style: X
|
13911
13914
|
}, [u(Rl, null, {
|
13912
13915
|
default: () => [u("tr", null, [f.value.map((F, H) => {
|
13913
|
-
var
|
13916
|
+
var se;
|
13914
13917
|
const Z = Object.assign({}, S(F, a.value.hasScrollY), {
|
13915
|
-
"--background-color": bI[((
|
13918
|
+
"--background-color": bI[((se = e.thead) == null ? void 0 : se.color) ?? Kc.DEF1]
|
13916
13919
|
});
|
13917
13920
|
return u("th", ce({
|
13918
13921
|
colspan: 1,
|
@@ -13972,22 +13975,22 @@ const TN = (e, t, n, a, i) => {
|
|
13972
13975
|
onDblclick: (Z) => Y(Z, D, Q, B),
|
13973
13976
|
onMouseenter: (Z) => _(Z, D, Q, B),
|
13974
13977
|
onMouseleave: (Z) => te(Z, D, Q, B)
|
13975
|
-
}, [f.value.map((Z,
|
13976
|
-
const
|
13977
|
-
colspan:
|
13978
|
+
}, [f.value.map((Z, se) => {
|
13979
|
+
const fe = [N(Z), ...Di(e.cellStyle, [Z, se, D, Q])], {
|
13980
|
+
colspan: ie,
|
13978
13981
|
rowspan: oe
|
13979
|
-
} = cN(Z,
|
13982
|
+
} = cN(Z, se, D, Q), {
|
13980
13983
|
skipCol: Ne
|
13981
13984
|
} = n.getColumnAttribute(Z, Le.COL_SPAN), {
|
13982
13985
|
skipRow: ne
|
13983
|
-
} = q && !S ? T(D,
|
13986
|
+
} = q && !S ? T(D, se, X, Z, $) : {
|
13984
13987
|
skipRow: !1
|
13985
13988
|
}, re = {
|
13986
13989
|
"expand-cell": Z.type === "expand"
|
13987
13990
|
};
|
13988
13991
|
if (!ne && !Ne) {
|
13989
13992
|
let ge;
|
13990
|
-
const be = [R(Z,
|
13993
|
+
const be = [R(Z, se), x(Z, D), Z.align || e.align, ...Di(e.cellClass, [Z, se, D, Q]), {
|
13991
13994
|
"expand-row": n.getRowAttribute(D, ze.ROW_EXPAND),
|
13992
13995
|
"is-last": Q + oe >= E
|
13993
13996
|
}], Te = (Ae, We) => {
|
@@ -13999,14 +14002,14 @@ const TN = (e, t, n, a, i) => {
|
|
13999
14002
|
getValue: () => U(D, Z, Q, B, S)
|
14000
14003
|
},
|
14001
14004
|
rowIndex: Q,
|
14002
|
-
columnIndex:
|
14005
|
+
columnIndex: se
|
14003
14006
|
};
|
14004
14007
|
t.emit(We, ut);
|
14005
14008
|
};
|
14006
14009
|
return u("td", {
|
14007
14010
|
class: be,
|
14008
|
-
style:
|
14009
|
-
colspan:
|
14011
|
+
style: fe,
|
14012
|
+
colspan: ie,
|
14010
14013
|
rowspan: oe,
|
14011
14014
|
onClick: (Ae) => Te(Ae, it.CELL_CLICK),
|
14012
14015
|
onDblclick: (Ae) => Te(Ae, it.CELL_DBL_CLICK)
|
@@ -14138,15 +14141,15 @@ const TN = (e, t, n, a, i) => {
|
|
14138
14141
|
return String(Z);
|
14139
14142
|
if (!Z && typeof Z != "number") {
|
14140
14143
|
const {
|
14141
|
-
emptyCellText:
|
14144
|
+
emptyCellText: se
|
14142
14145
|
} = e;
|
14143
|
-
if (
|
14144
|
-
return typeof
|
14146
|
+
if (se)
|
14147
|
+
return typeof se == "function" ? se(D, Q, X, B) : se;
|
14145
14148
|
}
|
14146
14149
|
return typeof Z == "object" ? JSON.stringify(Ea(Z)) : Z;
|
14147
14150
|
}, S = {
|
14148
|
-
expand: (F, H, Z,
|
14149
|
-
selection: (F, H, Z,
|
14151
|
+
expand: (F, H, Z, se) => $ ? "" : V(F, H, Z, se),
|
14152
|
+
selection: (F, H, Z, se) => ee(F, Z)
|
14150
14153
|
};
|
14151
14154
|
return ((E = S[Q.type]) == null ? void 0 : E.call(S, D, Q, X, B)) ?? q();
|
14152
14155
|
}, J = () => u("colgroup", null, [(f.value || []).map((D, Q) => {
|
@@ -14237,15 +14240,15 @@ const TN = (e, t, n, a, i) => {
|
|
14237
14240
|
const E = d.formatData.layout.bottom ?? 0, F = S[1], {
|
14238
14241
|
translateX: H,
|
14239
14242
|
translateY: Z,
|
14240
|
-
pos:
|
14243
|
+
pos: se = {}
|
14241
14244
|
} = F;
|
14242
|
-
d.formatData.layout.translateY = Z, d.formatData.layout.translateX = H, Object.assign(d.formatData.layout,
|
14245
|
+
d.formatData.layout.translateY = Z, d.formatData.layout.translateX = H, Object.assign(d.formatData.layout, se || {});
|
14243
14246
|
const {
|
14244
|
-
bottom:
|
14245
|
-
} =
|
14246
|
-
|
14247
|
+
bottom: fe
|
14248
|
+
} = se;
|
14249
|
+
fe <= 2 && E > fe && si(60, () => {
|
14247
14250
|
t.emit(it.SCROLL_BOTTOM, {
|
14248
|
-
...
|
14251
|
+
...se,
|
14249
14252
|
translateX: H,
|
14250
14253
|
translateY: Z
|
14251
14254
|
});
|
@@ -14651,7 +14654,7 @@ const df = (e) => {
|
|
14651
14654
|
} = ne.target;
|
14652
14655
|
(re.indexOf(`${r("tag-input-trigger")}`) > -1 || re.indexOf("tag-list") > -1) && v.value.appendChild(p.value);
|
14653
14656
|
}
|
14654
|
-
clearTimeout(b.value), y.value && P.value.length && (T.tagListCache = [...P.value], T.selectedTagListCache = [...T.selectedTagList], f.value = T.selectedTagListCache[0][e.saveKey],
|
14657
|
+
clearTimeout(b.value), y.value && P.value.length && (T.tagListCache = [...P.value], T.selectedTagListCache = [...T.selectedTagList], f.value = T.selectedTagListCache[0][e.saveKey], ie(T.selectedTagList[0], 0), J()), i.isEdit = !0, setTimeout(() => {
|
14655
14658
|
var re;
|
14656
14659
|
(re = g.value) == null || re.focus(), e.trigger === "focus" && T.localList.length !== 0 && (te(), s.isShow ? R() : s.isShow = !0);
|
14657
14660
|
}, 200);
|
@@ -14740,7 +14743,7 @@ const df = (e) => {
|
|
14740
14743
|
const ne = f.value;
|
14741
14744
|
if (ee(), i.isEdit = !1, y.value) {
|
14742
14745
|
const [ge] = T.tagListCache;
|
14743
|
-
ne && ne === ge && T.selectedTagListCache.length ?
|
14746
|
+
ne && ne === ge && T.selectedTagListCache.length ? fe(T.selectedTagListCache[0], "select") : $("remove");
|
14744
14747
|
} else if (e.allowAutoMatch && ne) {
|
14745
14748
|
const ge = c.curPageList.find((be) => Array.isArray(e.searchKey) ? e.searchKey.map((Ae) => be[Ae]).includes(ne) : be[e.searchKey] === ne);
|
14746
14749
|
ge ? X(ge, "select") : e.allowCreate && X(ne, "custom");
|
@@ -14748,9 +14751,9 @@ const df = (e) => {
|
|
14748
14751
|
s.isShow = !1, t("blur", ne, P.value), (re = n == null ? void 0 : n.validate) == null || re.call(n, "blur");
|
14749
14752
|
}, 200);
|
14750
14753
|
}, X = (ne, re, ge) => {
|
14751
|
-
ge == null || ge.stopPropagation(), !(!ne || ne.disabled) && (y.value && G(),
|
14754
|
+
ge == null || ge.stopPropagation(), !(!ne || ne.disabled) && (y.value && G(), fe(ne, re), $("select"), ee(), s.isShow = !1);
|
14752
14755
|
}, B = (ne, re, ge) => {
|
14753
|
-
ge == null || ge.stopPropagation(),
|
14756
|
+
ge == null || ge.stopPropagation(), ie(ne, re), ee(), $("remove", ne), g.value.style.width = `${xa}px`;
|
14754
14757
|
}, $ = (ne, re) => {
|
14755
14758
|
t(ne, re), t("update:modelValue", P.value), t("change", P.value);
|
14756
14759
|
}, q = (ne) => {
|
@@ -14861,9 +14864,9 @@ const df = (e) => {
|
|
14861
14864
|
}) : T.localList.filter((Pe) => Ve.includes(Pe[ge]));
|
14862
14865
|
Ve.length && (T.selectedTagList.splice(qn, 0, ...bt), U(p.value, rt[qn]), g.value.style.width = `${xa}px`, T.localList = T.localList.filter((Pe) => !Ve.includes(Pe[ge])), $("select"), Y());
|
14863
14866
|
}
|
14864
|
-
},
|
14867
|
+
}, se = (ne) => {
|
14865
14868
|
e.disabled || (U(p.value, ne.currentTarget, !0), g.value.style.width = `${xa}px`, s.isShow && R());
|
14866
|
-
},
|
14869
|
+
}, fe = (ne, re) => {
|
14867
14870
|
if (T.selectedTagList.length >= e.maxData && e.maxData !== -1)
|
14868
14871
|
return;
|
14869
14872
|
const {
|
@@ -14906,7 +14909,7 @@ const df = (e) => {
|
|
14906
14909
|
T.localList = T.localList.filter((bt) => !at[bt[be]]);
|
14907
14910
|
}
|
14908
14911
|
});
|
14909
|
-
},
|
14912
|
+
}, ie = (ne, re) => {
|
14910
14913
|
T.selectedTagList.splice(re, 1);
|
14911
14914
|
const ge = A.value[ne[e.saveKey]];
|
14912
14915
|
(e.allowCreate && ge || !e.allowCreate) && !y.value && T.localList.push(ne);
|
@@ -14940,7 +14943,7 @@ const df = (e) => {
|
|
14940
14943
|
handleTagSelected: X,
|
14941
14944
|
handleTagRemove: B,
|
14942
14945
|
handleClear: q,
|
14943
|
-
tagFocus:
|
14946
|
+
tagFocus: se,
|
14944
14947
|
handleKeydown: F,
|
14945
14948
|
handlePaste: Z,
|
14946
14949
|
resolveClassName: r
|
@@ -16506,8 +16509,8 @@ const KN = {
|
|
16506
16509
|
offsetTop: F
|
16507
16510
|
} = $.trigger, H = $.trigger.closest(".message-tree"), Z = H ? H.scrollTop : 0;
|
16508
16511
|
q.classList.remove("success", "error", "is-hidden"), q.classList.add(B, "is-show");
|
16509
|
-
const
|
16510
|
-
q.style.setProperty("transform", `translate(${
|
16512
|
+
const se = S + E / 2 - 41, fe = F - Z - 40;
|
16513
|
+
q.style.setProperty("transform", `translate(${se}px, ${fe}px`), P && clearTimeout(P), P = setTimeout(() => {
|
16511
16514
|
q.classList.remove("is-show"), q.classList.add("is-hidden");
|
16512
16515
|
}, 2e3);
|
16513
16516
|
}
|
@@ -20819,15 +20822,15 @@ const KS = (e, ...t) => {
|
|
20819
20822
|
const Z = new Date(l[`${S}PanelDate`]);
|
20820
20823
|
if (Z[`set${E}`](Z[`get${E}`]() + F), l[`${S}PanelDate`] = Z, !!H)
|
20821
20824
|
if (e.splitPanels) {
|
20822
|
-
const
|
20823
|
-
S === "left" && l.leftPanelDate >= l.rightPanelDate && v(
|
20825
|
+
const se = S === "left" ? "right" : "left";
|
20826
|
+
S === "left" && l.leftPanelDate >= l.rightPanelDate && v(se, E, 1), S === "right" && l.rightPanelDate <= l.leftPanelDate && v(se, E, -1);
|
20824
20827
|
} else {
|
20825
|
-
const
|
20828
|
+
const se = S === "left" ? "right" : "left", fe = l[`${se}PanelDate`], ie = new Date(fe);
|
20826
20829
|
if (E === "Month") {
|
20827
|
-
const oe = new Date(
|
20828
|
-
|
20830
|
+
const oe = new Date(ie.getFullYear(), ie.getMonth() + F + 1, 0).getDate();
|
20831
|
+
ie.setDate(Math.min(oe, ie.getDate()));
|
20829
20832
|
}
|
20830
|
-
|
20833
|
+
ie[`set${E}`](ie[`get${E}`]() + F), l[`${se}PanelDate`] = ie;
|
20831
20834
|
}
|
20832
20835
|
}, p = (S) => {
|
20833
20836
|
const E = l.currentView === "year" ? -10 : -1;
|
@@ -20846,16 +20849,16 @@ const KS = (e, ...t) => {
|
|
20846
20849
|
}, I = (S) => {
|
20847
20850
|
const E = "zh-CN", F = "[yyyy]-[mm]", H = l[`${S}PanelDate`], {
|
20848
20851
|
labels: Z,
|
20849
|
-
separator:
|
20850
|
-
} = m3(E, F, H),
|
20851
|
-
const oe =
|
20852
|
+
separator: se
|
20853
|
+
} = m3(E, F, H), fe = (ie) => {
|
20854
|
+
const oe = ie === "month" ? M : y;
|
20852
20855
|
return () => oe(S);
|
20853
20856
|
};
|
20854
20857
|
return {
|
20855
|
-
separator:
|
20856
|
-
labels: Z.map((
|
20857
|
-
const oe =
|
20858
|
-
return oe.handler =
|
20858
|
+
separator: se,
|
20859
|
+
labels: Z.map((ie) => {
|
20860
|
+
const oe = ie;
|
20861
|
+
return oe.handler = fe(ie.type), oe;
|
20859
20862
|
})
|
20860
20863
|
};
|
20861
20864
|
}, C = (S, E) => {
|
@@ -21275,8 +21278,8 @@ const KS = (e, ...t) => {
|
|
21275
21278
|
});
|
21276
21279
|
}, G = (S) => {
|
21277
21280
|
var oe;
|
21278
|
-
const E = e.type.includes("range") || e.multiple, F = w.value, H = S.target.value, Z = Bn(H, e.type, e.multiple, e.format),
|
21279
|
-
H !== F && !
|
21281
|
+
const E = e.type.includes("range") || e.multiple, F = w.value, H = S.target.value, Z = Bn(H, e.type, e.multiple, e.format), se = E ? Z : Z[0], fe = (oe = e.disabledDate) == null ? void 0 : oe.call(e, se), ie = Z.reduce((Ne, ne) => Ne && ne instanceof Date, !0);
|
21282
|
+
H !== F && !fe && ie ? (ae(e.type), d.internalValue = Z) : d.forceInputRerender = d.forceInputRerender + 1;
|
21280
21283
|
}, ee = (S) => {
|
21281
21284
|
e.readonly || (d.isFocused = !0, !(S && S.type === "focus") && (e.disabled || (d.visible = !0)));
|
21282
21285
|
}, V = () => {
|
@@ -21319,20 +21322,20 @@ const KS = (e, ...t) => {
|
|
21319
21322
|
}, X = (S, E = !1, F, H) => {
|
21320
21323
|
let Z = S;
|
21321
21324
|
if (e.multiple) {
|
21322
|
-
const
|
21325
|
+
const fe = Z.getTime(), ie = d.internalValue.findIndex((ne) => ne && ne.getTime() === fe), Ne = [...d.internalValue, Z].filter(Boolean).map((ne) => ne.getTime()).filter((ne, re, ge) => ge.indexOf(ne) === re && re !== ie);
|
21323
21326
|
d.internalValue = Ne.map((ne) => new Date(ne));
|
21324
21327
|
} else
|
21325
21328
|
Z = Bn(S, e.type, e.multiple, e.format), d.internalValue = Array.isArray(Z) ? Z : [Z];
|
21326
21329
|
if (d.internalValue[0]) {
|
21327
|
-
const [
|
21328
|
-
d.focusedDate =
|
21330
|
+
const [fe] = d.internalValue;
|
21331
|
+
d.focusedDate = fe;
|
21329
21332
|
}
|
21330
21333
|
d.focusedTime = {
|
21331
21334
|
...d.focusedTime,
|
21332
21335
|
time: d.internalValue.map(hr)
|
21333
21336
|
}, L.value || (f(e.type), d.visible = E), F === "upToNow" && e.type === "daterange" && Q(), d.shortcut = H, ae(F);
|
21334
|
-
const
|
21335
|
-
n("shortcut-change", d.shortcut,
|
21337
|
+
const se = e.shortcuts.findIndex((fe) => fe === d.shortcut);
|
21338
|
+
n("shortcut-change", d.shortcut, se);
|
21336
21339
|
}, B = W(null), $ = () => {
|
21337
21340
|
var S, E;
|
21338
21341
|
(E = (S = O.value).handleToggleTime) == null || E.call(S);
|
@@ -21655,9 +21658,9 @@ const KS = (e, ...t) => {
|
|
21655
21658
|
n("update:modelValue", f.value), n("change", g.value, $), e.type.indexOf("time") < 0 && ((q = N == null ? void 0 : N.value) == null || q.blur());
|
21656
21659
|
});
|
21657
21660
|
}, ae = ($) => {
|
21658
|
-
var
|
21659
|
-
const q = e.type.includes("range") || e.multiple, S = p.value, E = $.target.value, F = Bn(E, e.type, e.multiple, e.format), H = q ? F : F[0], Z = (
|
21660
|
-
E !== S && !Z &&
|
21661
|
+
var fe;
|
21662
|
+
const q = e.type.includes("range") || e.multiple, S = p.value, E = $.target.value, F = Bn(E, e.type, e.multiple, e.format), H = q ? F : F[0], Z = (fe = e.disabledDate) == null ? void 0 : fe.call(e, H), se = F.reduce((ie, oe) => ie && oe instanceof Date, !0);
|
21663
|
+
E !== S && !Z && se ? (K(e.type), o.internalValue = F) : o.forceInputRerender = o.forceInputRerender + 1;
|
21661
21664
|
}, G = ($) => {
|
21662
21665
|
e.readonly || (o.isFocused = !0, !($ && $.type === "focus") && (e.disabled || (o.visible = !0)));
|
21663
21666
|
}, ee = () => {
|
@@ -21702,8 +21705,8 @@ const KS = (e, ...t) => {
|
|
21702
21705
|
}, X = ($, q = !1, S, E) => {
|
21703
21706
|
let F = $;
|
21704
21707
|
if (e.multiple) {
|
21705
|
-
const Z = F.getTime(),
|
21706
|
-
o.internalValue =
|
21708
|
+
const Z = F.getTime(), se = o.internalValue.findIndex((oe) => oe && oe.getTime() === Z), ie = [...o.internalValue, F].filter(Boolean).map((oe) => oe.getTime()).filter((oe, Ne, ne) => ne.indexOf(oe) === Ne && Ne !== se);
|
21709
|
+
o.internalValue = ie.map((oe) => new Date(oe));
|
21707
21710
|
} else
|
21708
21711
|
F = Bn($, e.type, e.multiple, e.format), o.internalValue = Array.isArray(F) ? F : [F];
|
21709
21712
|
if (o.internalValue[0]) {
|
@@ -22167,7 +22170,7 @@ const _n = (...e) => !0, Ck = {
|
|
22167
22170
|
nodeDragLeave: _n,
|
22168
22171
|
nodeDrop: _n
|
22169
22172
|
};
|
22170
|
-
var
|
22173
|
+
var he = /* @__PURE__ */ ((e) => (e.DEPTH = "__depth", e.INDEX = "__index", e.UUID = "__uuid", e.PARENT = "__parent", e.HAS_CHILD = "__has_child", e.PATH = "__path", e.IS_ROOT = "__is_root", e.ORDER = "__order", e.IS_OPEN = "__is_open", e.IS_CHECKED = "__is_checked", e.IS_SELECTED = "__is_selected", e.IS_ASYNC_INIT = "__is_async_init", e.IS_MATCH = "__is_match", e.IS_NULL = "__IS_NULL", e.IS_CACHED = "__is_cached", e.IS_ASYNC = "__is_async", e.IS_LOADING = "__is_loading", e.TREE_NODE_ATTR = "__attr__", e.IS_INDETERMINATE = "__is_indeterminate", e))(he || {});
|
22171
22174
|
const Wn = {
|
22172
22175
|
__is_open: "isOpen",
|
22173
22176
|
__is_selected: "selected",
|
@@ -22331,7 +22334,7 @@ const Mk = {
|
|
22331
22334
|
* 节点前面的展开收起Icon会根据判定值做改变
|
22332
22335
|
* 如果需要自已控制,请设置为false
|
22333
22336
|
*/
|
22334
|
-
autoCheckChildren: h.bool.def(!0),
|
22337
|
+
autoCheckChildren: h.oneOfType([h.bool, h.func]).def(!0),
|
22335
22338
|
/**
|
22336
22339
|
* 如果设置了某一个叶子节点状态为展开,是否自动展开所有父级节点
|
22337
22340
|
* 默认为true,如果设置为false,则每层状态需要自己控制
|
@@ -22387,38 +22390,38 @@ const Mk = {
|
|
22387
22390
|
return;
|
22388
22391
|
}
|
22389
22392
|
i(s(_), te, K, _);
|
22390
|
-
}, l = (_) => a(_,
|
22393
|
+
}, l = (_) => a(_, he.PATH), c = (_) => a(_, he.UUID), o = (_) => a(_, he.IS_OPEN), d = (_) => a(_, he.HAS_CHILD), f = (_) => a(_, he.IS_MATCH), g = (_) => a(_, he.IS_CHECKED), m = (_) => a(a(_, he.PARENT), he.UUID), v = (_) => a(_, he.IS_LOADING), p = (_) => a(_, he.PARENT), w = (_) => a(_, he.IS_MATCH), b = (_, te) => {
|
22391
22394
|
const K = e.data.find((ae) => c(ae) === _);
|
22392
22395
|
return a(K, te);
|
22393
|
-
}, L = (_) => typeof _ == "string" ? b(_,
|
22396
|
+
}, L = (_) => typeof _ == "string" ? b(_, he.IS_ROOT) : a(_, he.IS_ROOT), y = (_) => {
|
22394
22397
|
const te = e.data.find((K) => c(K) === _);
|
22395
22398
|
return m(te);
|
22396
22399
|
}, M = (_) => {
|
22397
22400
|
const te = e.data.find((K) => c(K) === _);
|
22398
22401
|
return l(te);
|
22399
22402
|
}, I = (_, te) => {
|
22400
|
-
i(_,
|
22401
|
-
}, C = (_) => typeof _ == "object" ? o(_) : typeof _ == "string" ? b(_,
|
22403
|
+
i(_, he.IS_LOADING, te);
|
22404
|
+
}, C = (_) => typeof _ == "object" ? o(_) : typeof _ == "string" ? b(_, he.IS_OPEN) : !1, x = (_, te) => a(a(_, he.PARENT), te), T = (_) => C(a(_, he.PARENT)), P = (_) => L(_) || C(_) || T(_), N = (_, te) => {
|
22402
22405
|
const ae = _.split("-").reduce((G, ee) => {
|
22403
22406
|
const V = Number(ee);
|
22404
22407
|
return Array.isArray(G) ? G[V] : G[t.children][V];
|
22405
22408
|
}, t.data);
|
22406
22409
|
return te && Object.assign(ae, {
|
22407
|
-
[
|
22410
|
+
[he.UUID]: te
|
22408
22411
|
}), ae;
|
22409
22412
|
}, A = (_) => _[t.children] ?? [], z = (_) => e.data.find((te) => c(te) === _), R = (_) => L(_) ? {
|
22410
22413
|
[t.children]: t.data
|
22411
22414
|
} : p(_), j = (_) => ({
|
22412
|
-
[Wn[
|
22413
|
-
[Wn[
|
22414
|
-
[Wn[
|
22415
|
-
[Wn[
|
22416
|
-
[Wn[
|
22417
|
-
[Wn[
|
22418
|
-
fullPath: a(_,
|
22415
|
+
[Wn[he.IS_LOADING]]: a(_, he.IS_LOADING),
|
22416
|
+
[Wn[he.HAS_CHILD]]: d(_),
|
22417
|
+
[Wn[he.IS_MATCH]]: f(_),
|
22418
|
+
[Wn[he.IS_CHECKED]]: g(_),
|
22419
|
+
[Wn[he.IS_OPEN]]: o(_),
|
22420
|
+
[Wn[he.IS_ROOT]]: L(_),
|
22421
|
+
fullPath: a(_, he.PATH),
|
22419
22422
|
uuid: c(_),
|
22420
|
-
parent: a(_,
|
22421
|
-
parentId: c(a(_,
|
22423
|
+
parent: a(_, he.PARENT),
|
22424
|
+
parentId: c(a(_, he.PARENT))
|
22422
22425
|
});
|
22423
22426
|
return {
|
22424
22427
|
getSchemaVal: n,
|
@@ -22448,7 +22451,7 @@ const Mk = {
|
|
22448
22451
|
resolveScopedSlotParam: j,
|
22449
22452
|
setTreeNodeLoading: I,
|
22450
22453
|
extendNodeAttr: (_) => Object.assign({}, _, {
|
22451
|
-
[
|
22454
|
+
[he.TREE_NODE_ATTR]: j(_)
|
22452
22455
|
}),
|
22453
22456
|
getChildNodes: A,
|
22454
22457
|
extendNodeScopedData: (_) => ({
|
@@ -22479,7 +22482,7 @@ const Mk = {
|
|
22479
22482
|
"--offset-left": `${t.offsetLeft}px`
|
22480
22483
|
}), Lk = (e, t, n, a = !0) => {
|
22481
22484
|
var r;
|
22482
|
-
const { schema: i } = n, s = (r = i.get(e)) == null ? void 0 : r[
|
22485
|
+
const { schema: i } = n, s = (r = i.get(e)) == null ? void 0 : r[he.DEPTH];
|
22483
22486
|
return a ? {
|
22484
22487
|
"--depth": s,
|
22485
22488
|
...typeof t.levelLine == "function" ? {
|
@@ -22523,7 +22526,7 @@ const Mk = {
|
|
22523
22526
|
setTreeNodeLoading: r
|
22524
22527
|
} = Ml(t, e), l = (d, f) => {
|
22525
22528
|
if (typeof d == "object" && d !== null) {
|
22526
|
-
n(f,
|
22529
|
+
n(f, he.IS_OPEN, !0);
|
22527
22530
|
const g = Array.isArray(d) ? d : [d];
|
22528
22531
|
return Sk(a(f), e.data, e.children, e.children, g), Promise.resolve(d);
|
22529
22532
|
}
|
@@ -22533,20 +22536,20 @@ const Mk = {
|
|
22533
22536
|
callback: f = null,
|
22534
22537
|
cache: g = !0
|
22535
22538
|
} = e.async || {};
|
22536
|
-
if (typeof f == "function" && i(d,
|
22537
|
-
if (n(d,
|
22538
|
-
n(d,
|
22539
|
+
if (typeof f == "function" && i(d, he.IS_ASYNC)) {
|
22540
|
+
if (n(d, he.IS_ASYNC_INIT, !0), !i(d, he.IS_CACHED)) {
|
22541
|
+
n(d, he.IS_CACHED, g);
|
22539
22542
|
const m = s(d), v = f(d, (p) => l(p, d), m);
|
22540
22543
|
if (typeof v == "object" && v !== null)
|
22541
22544
|
return r(d, !0), v instanceof Promise ? Promise.resolve(v.then((p) => l(p, d)).catch((p) => console.error("load remote data error:", p)).finally(() => {
|
22542
|
-
r(d, !1), n(d,
|
22545
|
+
r(d, !1), n(d, he.IS_CACHED, !0);
|
22543
22546
|
})) : (l(v, d), r(d, !1), Promise.resolve(!0));
|
22544
22547
|
}
|
22545
22548
|
return Promise.resolve(!0);
|
22546
22549
|
}
|
22547
22550
|
return Promise.resolve(!0);
|
22548
22551
|
}, o = () => {
|
22549
|
-
const d = t.data.filter((f) => i(f,
|
22552
|
+
const d = t.data.filter((f) => i(f, he.IS_ASYNC) && f[Wn[he.IS_OPEN]] && !i(f, he.IS_ASYNC_INIT));
|
22550
22553
|
d.length && Promise.all(d.map((f) => c(f))).then(() => {
|
22551
22554
|
o();
|
22552
22555
|
}).catch((f) => {
|
@@ -22596,28 +22599,37 @@ const Mk = {
|
|
22596
22599
|
return H;
|
22597
22600
|
const {
|
22598
22601
|
node: Z,
|
22599
|
-
className:
|
22600
|
-
text:
|
22601
|
-
style:
|
22602
|
+
className: se,
|
22603
|
+
text: fe,
|
22604
|
+
style: ie
|
22602
22605
|
} = H;
|
22603
22606
|
return Ke(Z, {
|
22604
|
-
class:
|
22605
|
-
style:
|
22606
|
-
},
|
22607
|
+
class: se,
|
22608
|
+
style: ie
|
22609
|
+
}, fe);
|
22607
22610
|
}
|
22608
22611
|
return null;
|
22609
22612
|
}, R = (H) => {
|
22610
|
-
var Z,
|
22611
|
-
return ((
|
22613
|
+
var Z, se;
|
22614
|
+
return ((se = (Z = t.slots).nodeLoading) == null ? void 0 : se.call(Z, E(H))) ?? b(H) ? u(ui, null, null) : "";
|
22612
22615
|
}, j = (H) => {
|
22613
22616
|
if (t.slots.nodeAction)
|
22614
22617
|
return t.slots.nodeAction(E(H));
|
22615
22618
|
let Z = null;
|
22616
|
-
|
22617
|
-
|
22618
|
-
|
22619
|
-
|
22620
|
-
|
22619
|
+
if (b(H))
|
22620
|
+
return R(H);
|
22621
|
+
if (typeof e.prefixIcon == "function" && (Z = e.prefixIcon(E(H), "node_action"), Z !== "default"))
|
22622
|
+
return z(Z);
|
22623
|
+
if (Z === "default" || typeof e.prefixIcon == "boolean" && e.prefixIcon) {
|
22624
|
+
const se = typeof e.autoCheckChildren == "function" ? e.autoCheckChildren(H) : e.autoCheckChildren;
|
22625
|
+
if (v(H) || H.async || !se)
|
22626
|
+
return p(H) ? u(ss, {
|
22627
|
+
class: x("node-prefix")
|
22628
|
+
}, null) : u(cs, {
|
22629
|
+
class: x("node-prefix")
|
22630
|
+
}, null);
|
22631
|
+
}
|
22632
|
+
return null;
|
22621
22633
|
}, O = (H) => {
|
22622
22634
|
if (!e.showNodeTypeIcon)
|
22623
22635
|
return null;
|
@@ -22628,118 +22640,118 @@ const Mk = {
|
|
22628
22640
|
class: [x("tree-icon"), x("node-prefix")]
|
22629
22641
|
}, null) : null;
|
22630
22642
|
}, Y = (H, Z) => {
|
22631
|
-
const
|
22632
|
-
if (
|
22633
|
-
const
|
22634
|
-
r(
|
22635
|
-
}
|
22636
|
-
}, _ = (H, Z,
|
22637
|
-
g(H).forEach((
|
22638
|
-
Array.isArray(Z) ? Z.forEach((
|
22639
|
-
r(
|
22640
|
-
}) : r(
|
22643
|
+
const se = y(H);
|
22644
|
+
if (se) {
|
22645
|
+
const fe = Z || (g(se) || []).some((ie) => L(ie));
|
22646
|
+
r(se, he.IS_CHECKED, fe), r(se, he.IS_INDETERMINATE, (g(se) || []).some((ie) => !L(ie))), m(se) || Y(se, Z);
|
22647
|
+
}
|
22648
|
+
}, _ = (H, Z, se) => {
|
22649
|
+
g(H).forEach((fe) => {
|
22650
|
+
Array.isArray(Z) ? Z.forEach((ie, oe) => {
|
22651
|
+
r(fe, ie, se[oe]);
|
22652
|
+
}) : r(fe, Z, se), _(fe, Z, se);
|
22641
22653
|
});
|
22642
22654
|
}, te = (H, Z) => {
|
22643
|
-
r(H,
|
22644
|
-
}, K = (H) => L(H) && d(H,
|
22655
|
+
r(H, he.IS_CHECKED, !!Z), _(H, [he.IS_CHECKED, he.IS_INDETERMINATE], [!!Z, !1]), Y(H, Z), t.emit(Ln.NODE_CHECKED, n.data.filter((se) => L(se)), n.data.filter((se) => K(se)));
|
22656
|
+
}, K = (H) => L(H) && d(H, he.IS_INDETERMINATE), ae = (H) => e.showCheckbox ? u(Kt, {
|
22645
22657
|
size: "small",
|
22646
22658
|
modelValue: L(H),
|
22647
22659
|
indeterminate: K(H),
|
22648
22660
|
onChange: (Z) => te(H, !!Z)
|
22649
|
-
}, null) : null, G = (H, Z = null,
|
22650
|
-
const
|
22651
|
-
if (
|
22661
|
+
}, null) : null, G = (H, Z = null, se = null, fe = !0) => {
|
22662
|
+
const ie = Z === null ? !p(H) : !!Z;
|
22663
|
+
if (ie || _(H, he.IS_OPEN, ie), r(H, he.IS_OPEN, ie), fe) {
|
22652
22664
|
const oe = p(H) ? Ln.NODE_EXPAND : Ln.NODE_COLLAPSE;
|
22653
|
-
t.emit(oe, H, M(H), o(H),
|
22665
|
+
t.emit(oe, H, M(H), o(H), se);
|
22654
22666
|
}
|
22655
|
-
}, ee = (H, Z,
|
22667
|
+
}, ee = (H, Z, se) => {
|
22656
22668
|
if (Array.isArray(H)) {
|
22657
|
-
H.forEach((
|
22669
|
+
H.forEach((fe) => r(ji(fe), Z, se));
|
22658
22670
|
return;
|
22659
22671
|
}
|
22660
|
-
r(ji(H), Z,
|
22661
|
-
}, V = (H, Z = !0,
|
22662
|
-
U(H,
|
22663
|
-
}, U = (H, Z,
|
22664
|
-
const
|
22665
|
-
if (
|
22672
|
+
r(ji(H), Z, se);
|
22673
|
+
}, V = (H, Z = !0, se = !1) => {
|
22674
|
+
U(H, he.IS_OPEN, Z, se && Z);
|
22675
|
+
}, U = (H, Z, se, fe = !1) => {
|
22676
|
+
const ie = ji(H);
|
22677
|
+
if (ie[he.IS_NULL])
|
22666
22678
|
return;
|
22667
|
-
const oe = Array.isArray(Z) ? Z : [Z], Ne = Array.isArray(
|
22668
|
-
if (
|
22669
|
-
if (oe.forEach((ne, re) => ee(
|
22670
|
-
const ne = y(
|
22679
|
+
const oe = Array.isArray(Z) ? Z : [Z], Ne = Array.isArray(se) ? se : [se];
|
22680
|
+
if (fe) {
|
22681
|
+
if (oe.forEach((ne, re) => ee(ie, ne, Ne[re])), !m(ie)) {
|
22682
|
+
const ne = y(ie);
|
22671
22683
|
oe.forEach((re, ge) => {
|
22672
|
-
d(ne, re) !==
|
22684
|
+
d(ne, re) !== se && U(ne, re, Ne[ge], fe);
|
22673
22685
|
});
|
22674
22686
|
}
|
22675
22687
|
} else
|
22676
|
-
oe.forEach((ne, re) => ee(
|
22688
|
+
oe.forEach((ne, re) => ee(ie, ne, Ne[re]));
|
22677
22689
|
}, J = (H, Z) => {
|
22678
22690
|
if (p(H)) {
|
22679
22691
|
G(H, !1, Z);
|
22680
22692
|
return;
|
22681
22693
|
}
|
22682
22694
|
P(H).finally(() => {
|
22683
|
-
d(H,
|
22695
|
+
d(H, he.IS_LOADING) ? T("setNodeOpenedAfterLoading", {
|
22684
22696
|
type: "once",
|
22685
22697
|
fn: () => G(H, !0, Z)
|
22686
22698
|
}) : G(H, !0, Z);
|
22687
22699
|
});
|
22688
22700
|
}, D = (H, Z) => {
|
22689
22701
|
H.stopImmediatePropagation(), H.stopPropagation(), H.preventDefault(), J(Z, H);
|
22690
|
-
}, Q = (H, Z = !0,
|
22691
|
-
const
|
22692
|
-
if (!
|
22702
|
+
}, Q = (H, Z = !0, se = !0) => {
|
22703
|
+
const fe = Array.isArray(H) ? H : [H];
|
22704
|
+
if (!fe.length)
|
22693
22705
|
return;
|
22694
|
-
let
|
22695
|
-
if ((typeof
|
22696
|
-
[
|
22697
|
-
}), !
|
22698
|
-
if (!e.selectable || typeof e.selectable == "function" && !e.selectable(H) || e.disabledFolderSelectable &&
|
22706
|
+
let ie = ji(fe[0]);
|
22707
|
+
if ((typeof ie == "string" || typeof ie == "number" || typeof ie == "symbol") && (ie = n.data.find((oe) => f(oe) === ie) ?? {
|
22708
|
+
[he.IS_NULL]: !0
|
22709
|
+
}), !ie[he.IS_NULL]) {
|
22710
|
+
if (!e.selectable || typeof e.selectable == "function" && !e.selectable(H) || e.disabledFolderSelectable && ie.is_folder === !0) {
|
22699
22711
|
console.warn("props.selectable is false or undefined, please set selectable with true");
|
22700
22712
|
return;
|
22701
22713
|
}
|
22702
|
-
s != null && l(s,
|
22714
|
+
s != null && l(s, he.IS_SELECTED, !Z), e.selected && e.selected !== s && l(e.selected, he.IS_SELECTED, !Z), r(ie, he.IS_SELECTED, Z), s = f(ie), se && fe.length === 1 && V(ie, !0, !0), d(ie, he.IS_ASYNC) && P(ie).then(() => {
|
22703
22715
|
ke(() => {
|
22704
|
-
|
22716
|
+
fe.shift(), Q(fe, Z, se);
|
22705
22717
|
});
|
22706
22718
|
});
|
22707
22719
|
}
|
22708
22720
|
}, X = (H) => typeof e.nodeContentAction == "function" ? Reflect.apply(e.nodeContentAction, globalThis, [{
|
22709
22721
|
node: H
|
22710
22722
|
}]) : typeof e.nodeContentAction == "string" ? [e.nodeContentAction] : Array.isArray(e.nodeContentAction) ? e.nodeContentAction : ["selected", "expand", "click"], B = (H, Z) => {
|
22711
|
-
const
|
22712
|
-
if (
|
22713
|
-
const
|
22714
|
-
t.emit(
|
22723
|
+
const se = X(H);
|
22724
|
+
if (se.includes("selected") && Q(H, !0, !1), se.includes("expand") && (w(H) || J(H, Z)), se.includes("collapse") && w(H) && J(H, Z), se.includes("click")) {
|
22725
|
+
const fe = Ln.NODE_CLICK;
|
22726
|
+
t.emit(fe, H, M(H), o(H), Z);
|
22715
22727
|
}
|
22716
22728
|
}, $ = (H, Z) => {
|
22717
22729
|
if (m(Z))
|
22718
22730
|
return !1;
|
22719
|
-
const
|
22720
|
-
if (
|
22731
|
+
const se = c(Z), fe = `${se}`.split("-").slice(0, H + 1);
|
22732
|
+
if (fe.join("-") === se)
|
22721
22733
|
return !0;
|
22722
|
-
const oe =
|
22723
|
-
|
22724
|
-
const ne =
|
22734
|
+
const oe = fe.pop(), Ne = parseInt(oe, 10);
|
22735
|
+
fe.push(`${Ne + 1}`);
|
22736
|
+
const ne = fe.join("-");
|
22725
22737
|
return n.data.some((re) => c(re) === ne);
|
22726
22738
|
}, q = (H) => {
|
22727
22739
|
if (!e.levelLine)
|
22728
22740
|
return null;
|
22729
|
-
const Z = (
|
22730
|
-
"--depth":
|
22731
|
-
}),
|
22732
|
-
return new Array(
|
22741
|
+
const Z = (fe) => ({
|
22742
|
+
"--depth": fe
|
22743
|
+
}), se = d(H, he.DEPTH) + 1;
|
22744
|
+
return new Array(se).fill("").map((fe, ie) => ie).filter((fe) => $(fe, H)).filter((fe) => fe > 0).map((fe) => u("span", {
|
22733
22745
|
class: "node-virtual-line",
|
22734
|
-
style: Z(
|
22746
|
+
style: Z(se - fe)
|
22735
22747
|
}, null));
|
22736
22748
|
}, S = (H) => {
|
22737
|
-
var Z,
|
22738
|
-
return t.slots.node ? (
|
22749
|
+
var Z, se, fe, ie;
|
22750
|
+
return t.slots.node ? (se = (Z = t.slots).node) == null ? void 0 : se.call(Z, E(H)) : t.slots.default ? (ie = (fe = t.slots).default) == null ? void 0 : ie.call(fe, C(H)) : [w3(H, e)];
|
22739
22751
|
}, E = (H) => e.keepSlotData ? C(H) : I(H);
|
22740
22752
|
return {
|
22741
22753
|
renderTreeNode: (H, Z = !0) => {
|
22742
|
-
var
|
22754
|
+
var se, fe;
|
22743
22755
|
return u("div", {
|
22744
22756
|
"data-tree-node": f(H),
|
22745
22757
|
key: f(H),
|
@@ -22747,15 +22759,15 @@ const Mk = {
|
|
22747
22759
|
}, [u("div", {
|
22748
22760
|
class: Nk(H, n.schema, e, Z),
|
22749
22761
|
style: Lk(H, e, n, Z),
|
22750
|
-
onClick: (
|
22762
|
+
onClick: (ie) => B(H, ie)
|
22751
22763
|
}, [u("div", {
|
22752
22764
|
class: [x("node-action")],
|
22753
|
-
onClick: (
|
22765
|
+
onClick: (ie) => D(ie, H)
|
22754
22766
|
}, [j(H)]), u("div", {
|
22755
22767
|
class: x("node-content")
|
22756
22768
|
}, [[ae(H), O(H)], u("span", {
|
22757
22769
|
class: x("node-text")
|
22758
|
-
}, [S(H)]), (
|
22770
|
+
}, [S(H)]), (fe = (se = t.slots).nodeAppend) == null ? void 0 : fe.call(se, E(H))]), Z && q(H)])]);
|
22759
22771
|
},
|
22760
22772
|
handleTreeNodeClick: J,
|
22761
22773
|
deepAutoOpen: N,
|
@@ -22825,7 +22837,7 @@ const Mk = {
|
|
22825
22837
|
}, x = (N, A) => {
|
22826
22838
|
if (!C(N, A))
|
22827
22839
|
return;
|
22828
|
-
const z = JSON.parse(JSON.stringify(i(N))), R = JSON.parse(JSON.stringify(i(A))), j = s(N), O = s(A), Y = c(N,
|
22840
|
+
const z = JSON.parse(JSON.stringify(i(N))), R = JSON.parse(JSON.stringify(i(A))), j = s(N), O = s(A), Y = c(N, he.INDEX), _ = c(A, he.INDEX);
|
22829
22841
|
j == null || j[e.children].splice(Y, 1, R), O == null || O[e.children].splice(_, 1, z);
|
22830
22842
|
}, T = (N, A) => {
|
22831
22843
|
const z = i(N), R = i(A);
|
@@ -22836,7 +22848,7 @@ const Mk = {
|
|
22836
22848
|
const O = r(N);
|
22837
22849
|
if (O != null) {
|
22838
22850
|
j = i(O);
|
22839
|
-
const Y = c(N,
|
22851
|
+
const Y = c(N, he.INDEX);
|
22840
22852
|
j == null || j[e.children].splice(Y, 1);
|
22841
22853
|
}
|
22842
22854
|
}
|
@@ -22904,21 +22916,21 @@ const Mk = {
|
|
22904
22916
|
const ee = x.get(te);
|
22905
22917
|
Object.prototype.hasOwnProperty.call(ee, K) && typeof G == "function" && Reflect.apply(G, self, [ee, K, ae, te]) && (Object.assign(ee, {
|
22906
22918
|
[K]: ae
|
22907
|
-
}), T(ee[
|
22919
|
+
}), T(ee[he.PARENT], K, ae, G));
|
22908
22920
|
}
|
22909
22921
|
}
|
22910
22922
|
function P(te) {
|
22911
22923
|
let K = null;
|
22912
|
-
return typeof e.nodeKey == "string" && (K = te[e.nodeKey] || Sn.v4()), K || te[
|
22924
|
+
return typeof e.nodeKey == "string" && (K = te[e.nodeKey] || Sn.v4()), K || te[he.UUID] || Sn.v4();
|
22913
22925
|
}
|
22914
22926
|
const N = {
|
22915
|
-
[
|
22916
|
-
[
|
22917
|
-
[
|
22918
|
-
[
|
22919
|
-
[
|
22920
|
-
[
|
22921
|
-
[
|
22927
|
+
[he.IS_OPEN]: () => !!e.expandAll,
|
22928
|
+
[he.IS_CHECKED]: () => !1,
|
22929
|
+
[he.IS_MATCH]: () => !1,
|
22930
|
+
[he.IS_SELECTED]: (te, K) => Rs(te, e.selected, K),
|
22931
|
+
[he.IS_CACHED]: () => !1,
|
22932
|
+
[he.IS_ASYNC]: () => null,
|
22933
|
+
[he.IS_LOADING]: () => !1
|
22922
22934
|
};
|
22923
22935
|
function A(te, K, ae, G = void 0) {
|
22924
22936
|
let ee = G;
|
@@ -22934,26 +22946,26 @@ const Mk = {
|
|
22934
22946
|
if (!e.selectable)
|
22935
22947
|
return !1;
|
22936
22948
|
const ae = Rs(K, e.selected, te);
|
22937
|
-
return A(te, K,
|
22949
|
+
return A(te, K, he.IS_SELECTED, ae);
|
22938
22950
|
}
|
22939
22951
|
function R(te, K, ae) {
|
22940
22952
|
var V;
|
22941
|
-
const G = A(te, K,
|
22953
|
+
const G = A(te, K, he.IS_OPEN), ee = x.has(ae) ? (V = x.get(ae)) == null ? void 0 : V[he.IS_OPEN] : !0;
|
22942
22954
|
return G && ee;
|
22943
22955
|
}
|
22944
22956
|
function j(te, K) {
|
22945
22957
|
if (!e.showCheckbox)
|
22946
22958
|
return !1;
|
22947
22959
|
const ae = Rs(te, e.checked, K);
|
22948
|
-
return A(K, te,
|
22960
|
+
return A(K, te, he.IS_CHECKED, ae);
|
22949
22961
|
}
|
22950
22962
|
function O(te) {
|
22951
|
-
return !((te == null ? void 0 : te[
|
22963
|
+
return !((te == null ? void 0 : te[he.IS_OPEN]) ?? !1);
|
22952
22964
|
}
|
22953
22965
|
function Y(te, K, ae, G) {
|
22954
|
-
return te[
|
22966
|
+
return te[he.IS_INDETERMINATE] = (G[e.children] || []).some((ee) => {
|
22955
22967
|
var V;
|
22956
|
-
return !(((V = x.get(ee)) == null ? void 0 : V[
|
22968
|
+
return !(((V = x.get(ee)) == null ? void 0 : V[he.IS_CHECKED]) ?? !1);
|
22957
22969
|
}), !0;
|
22958
22970
|
}
|
22959
22971
|
function _(te, K = 0, ae = null, G = null) {
|
@@ -22964,32 +22976,32 @@ const Mk = {
|
|
22964
22976
|
_(U, K, ae, G);
|
22965
22977
|
else if (typeof U == "object" && U !== null) {
|
22966
22978
|
const J = G !== null ? `${G}-${V}` : `${V}`, D = `${P(U)}`, Q = !!(U[y] || []).length;
|
22967
|
-
let X = A(D, U,
|
22968
|
-
e.autoOpenParentNode ? X && T(ae,
|
22979
|
+
let X = A(D, U, he.IS_OPEN);
|
22980
|
+
e.autoOpenParentNode ? X && T(ae, he.IS_OPEN, !0, O) : X = R(D, U, ae);
|
22969
22981
|
const B = j(U, D);
|
22970
22982
|
B && M.push(U), x.set(U, {
|
22971
|
-
[
|
22972
|
-
[
|
22973
|
-
[
|
22974
|
-
[
|
22975
|
-
[
|
22976
|
-
[
|
22977
|
-
[
|
22978
|
-
[
|
22979
|
-
[
|
22980
|
-
[
|
22981
|
-
[
|
22982
|
-
[
|
22983
|
-
[
|
22984
|
-
[
|
22985
|
-
[
|
22986
|
-
[
|
22983
|
+
[he.DEPTH]: K,
|
22984
|
+
[he.INDEX]: V,
|
22985
|
+
[he.UUID]: D,
|
22986
|
+
[he.PARENT]: ae,
|
22987
|
+
[he.HAS_CHILD]: Q,
|
22988
|
+
[he.PATH]: J,
|
22989
|
+
[he.IS_ROOT]: ae === null,
|
22990
|
+
[he.ORDER]: C,
|
22991
|
+
[he.IS_SELECTED]: z(D, U),
|
22992
|
+
[he.IS_MATCH]: A(D, U, he.IS_MATCH),
|
22993
|
+
[he.IS_OPEN]: X,
|
22994
|
+
[he.IS_CHECKED]: B,
|
22995
|
+
[he.IS_CACHED]: A(D, U, he.IS_CACHED),
|
22996
|
+
[he.IS_ASYNC]: A(D, U, he.IS_ASYNC),
|
22997
|
+
[he.IS_LOADING]: A(D, U, he.IS_LOADING),
|
22998
|
+
[he.IS_INDETERMINATE]: !1
|
22987
22999
|
}), C += 1, I.push(U), Object.prototype.hasOwnProperty.call(U, y) && _(U[y] || [], K + 1, U, J);
|
22988
23000
|
}
|
22989
23001
|
}
|
22990
23002
|
}
|
22991
23003
|
return _(w ?? L), e.showCheckbox && (M == null || M.forEach((te) => {
|
22992
|
-
T(te,
|
23004
|
+
T(te, he.IS_CHECKED, !0, Y);
|
22993
23005
|
})), [I, x];
|
22994
23006
|
}, n = t(), a = /* @__PURE__ */ new Map(), i = [], s = [], r = xe({
|
22995
23007
|
data: n[0],
|
@@ -23084,7 +23096,7 @@ const Mk = {
|
|
23084
23096
|
}), R = si(120, () => {
|
23085
23097
|
L.length = 0, n.data.forEach((ae) => {
|
23086
23098
|
const G = g(w3(ae, e), ae);
|
23087
|
-
G && L.push(f(ae)), z(ae, [
|
23099
|
+
G && L.push(f(ae)), z(ae, [he.IS_MATCH], [G], w.value && G);
|
23088
23100
|
});
|
23089
23101
|
});
|
23090
23102
|
p || ue([v], () => {
|
@@ -23094,7 +23106,7 @@ const Mk = {
|
|
23094
23106
|
immediate: !0
|
23095
23107
|
});
|
23096
23108
|
const j = W(), O = (ae, G = !0) => {
|
23097
|
-
P(ji(ae),
|
23109
|
+
P(ji(ae), he.IS_CHECKED, G);
|
23098
23110
|
};
|
23099
23111
|
a((ae) => {
|
23100
23112
|
N(ae, !0, e.autoOpenParentNode);
|
@@ -23135,7 +23147,7 @@ const Mk = {
|
|
23135
23147
|
lineHeight: e.lineHeight,
|
23136
23148
|
height: e.height,
|
23137
23149
|
enabled: e.virtualRender,
|
23138
|
-
rowKey:
|
23150
|
+
rowKey: he.UUID,
|
23139
23151
|
keepAlive: !0,
|
23140
23152
|
contentClassName: K("container"),
|
23141
23153
|
throttleDelay: 0,
|