@yqg/permission 1.0.4-beta.0 → 1.0.5-beta.0
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/.arcconfig +8 -0
- package/.husky/commit-msg +20 -0
- package/.husky/pre-commit +4 -0
- package/README.md +126 -3
- package/arcanist/.phutil_module_cache +1 -0
- package/arcanist/__phutil_library_init__.php +3 -0
- package/arcanist/__phutil_library_map__.php +18 -0
- package/arcanist/lint/engine/YqgWebDiffLintEngine.php +68 -0
- package/commitlint.config.js +32 -0
- package/dist/{apply-modal-C7hVR1xJ.js → apply-modal-CzowWeBJ.js} +1231 -1216
- package/dist/card.png +0 -0
- package/dist/{checkbox-item-Bf_S20_z.js → checkbox-item-zQ0rw1If.js} +405 -418
- package/dist/dialog.png +0 -0
- package/dist/image.png +0 -0
- package/dist/{index-B0kTXjfX.js → index-DA6ClyIX.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +45 -45
- package/dist/{yqg-permission-CbkviMn9.js → yqg-permission-BrJJoGxC.js} +444 -427
- package/eslint.config.js +26 -0
- package/package.json +10 -4
- package/public/card.png +0 -0
- package/public/dialog.png +0 -0
- package/public/image.png +0 -0
- package/src/App.vue +1 -1
- package/src/axios/axios.ts +1 -1
- package/src/components/apply-modal.vue +17 -4
- package/src/components/approval-steps.vue +10 -8
- package/src/components/checkbox-item.vue +5 -18
- package/src/components/success-modal.vue +16 -7
- package/src/components/yqg-permission.vue +27 -15
- package/src/i18n/zh-CH.ts +4 -1
- package/src/main.ts +1 -1
- package/src/typings/index.d.ts +1 -0
- package/src/yqg-permission/index.ts +2 -2
- package/tsconfig.app.json +10 -1
- package/tsconfig.json +2 -2
- package/dist/vite.svg +0 -1
- package/public/vite.svg +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as ue, c as R, f as ve, k as y, i as jn, v as Qt, e as We, p as qe, b as Jt, s as G, w as ie, h as Me, o as
|
|
2
|
-
import { _ as S, Q as Jn, P as A, G as Y, F as se,
|
|
3
|
-
import { p as bt, S as Oo, T as Bt, C as $o, Q as To } from "./apply-modal-
|
|
1
|
+
import { d as ue, c as R, f as ve, k as y, i as jn, v as Qt, e as We, p as qe, b as Jt, s as G, w as ie, h as Me, o as xe, P as Se, F as Be, j as je, W as Un, r as Ae, I as Yn, G as pt, y as _e, a as Gn, z as Ie, K as Le, R as Xn, N as be, O as Te, L as Ge, u as fe, Q as ge, M as Xe, _ as kn, m as qn, A as Qn } from "./index-DA6ClyIX.js";
|
|
2
|
+
import { _ as S, Q as Jn, P as A, G as Y, F as se, bb as Zn, aE as eo, aw as Zt, bc as vt, aP as K, E as gt, R as ze, an as en, bd as Ce, be as we, aD as Qe, bf as to, bg as ye, bh as Vt, bi as Lt, bj as Ht, I as no, a6 as oo, a7 as lo, bk as io, au as ao, C as tn, K as ce, Y as ht, bl as dt, L as Oe, bm as nn, J as ro, bn as so, ai as uo, a2 as co, aG as fo, bo as mo, N as po, aH as vo, am as go, aV as ho, bp as bo, aL as yo, bq as So, O as _t, ae as He, ad as wo, ag as Io, b4 as Ee, br as Co, b6 as it, b7 as xo } from "./yqg-permission-BrJJoGxC.js";
|
|
3
|
+
import { p as bt, S as Oo, T as Bt, C as $o, Q as To } from "./apply-modal-CzowWeBJ.js";
|
|
4
4
|
function zt(e, n) {
|
|
5
5
|
const {
|
|
6
6
|
key: o
|
|
@@ -32,26 +32,26 @@ function Eo(e) {
|
|
|
32
32
|
value: i,
|
|
33
33
|
options: u
|
|
34
34
|
} = on(n, !1);
|
|
35
|
-
function a(f,
|
|
36
|
-
f.forEach((
|
|
37
|
-
const m =
|
|
38
|
-
if (
|
|
39
|
-
const p =
|
|
35
|
+
function a(f, s) {
|
|
36
|
+
f.forEach((r) => {
|
|
37
|
+
const m = r[l];
|
|
38
|
+
if (s || !(u in r)) {
|
|
39
|
+
const p = r[i];
|
|
40
40
|
t.push({
|
|
41
|
-
key: zt(
|
|
42
|
-
groupOption:
|
|
43
|
-
data:
|
|
41
|
+
key: zt(r, t.length),
|
|
42
|
+
groupOption: s,
|
|
43
|
+
data: r,
|
|
44
44
|
label: m,
|
|
45
45
|
value: p
|
|
46
46
|
});
|
|
47
47
|
} else {
|
|
48
48
|
let p = m;
|
|
49
|
-
p === void 0 && o && (p =
|
|
50
|
-
key: zt(
|
|
49
|
+
p === void 0 && o && (p = r.label), t.push({
|
|
50
|
+
key: zt(r, t.length),
|
|
51
51
|
group: !0,
|
|
52
|
-
data:
|
|
52
|
+
data: r,
|
|
53
53
|
label: p
|
|
54
|
-
}), a(
|
|
54
|
+
}), a(r[u], !0);
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -73,8 +73,8 @@ function Mo(e, n) {
|
|
|
73
73
|
let [a, ...f] = u;
|
|
74
74
|
if (!a)
|
|
75
75
|
return [i];
|
|
76
|
-
const
|
|
77
|
-
return o = o ||
|
|
76
|
+
const s = i.split(a);
|
|
77
|
+
return o = o || s.length > 1, s.reduce((r, m) => [...r, ...t(m, f)], []).filter((r) => r);
|
|
78
78
|
}
|
|
79
79
|
const l = t(e, n);
|
|
80
80
|
return o ? l : null;
|
|
@@ -175,12 +175,12 @@ const Ro = (e) => {
|
|
|
175
175
|
}), () => {
|
|
176
176
|
const a = S(S({}, e), t), {
|
|
177
177
|
empty: f = !1
|
|
178
|
-
} = a,
|
|
179
|
-
visible:
|
|
178
|
+
} = a, s = Po(a, ["empty"]), {
|
|
179
|
+
visible: r,
|
|
180
180
|
dropdownAlign: m,
|
|
181
181
|
prefixCls: p,
|
|
182
182
|
popupElement: w,
|
|
183
|
-
dropdownClassName:
|
|
183
|
+
dropdownClassName: h,
|
|
184
184
|
dropdownStyle: x,
|
|
185
185
|
direction: O = "ltr",
|
|
186
186
|
placement: I,
|
|
@@ -195,7 +195,7 @@ const Ro = (e) => {
|
|
|
195
195
|
onPopupMouseEnter: j,
|
|
196
196
|
onPopupFocusin: z,
|
|
197
197
|
onPopupFocusout: Q
|
|
198
|
-
} =
|
|
198
|
+
} = s, X = `${p}-dropdown`;
|
|
199
199
|
let U = w;
|
|
200
200
|
C && (U = C({
|
|
201
201
|
menuNode: w,
|
|
@@ -212,9 +212,9 @@ const Ro = (e) => {
|
|
|
212
212
|
prefixCls: X,
|
|
213
213
|
popupTransitionName: M,
|
|
214
214
|
popupAlign: m,
|
|
215
|
-
popupVisible:
|
|
215
|
+
popupVisible: r,
|
|
216
216
|
getPopupContainer: $,
|
|
217
|
-
popupClassName: se(
|
|
217
|
+
popupClassName: se(h, {
|
|
218
218
|
[`${X}-empty`]: f
|
|
219
219
|
}),
|
|
220
220
|
popupStyle: L,
|
|
@@ -243,11 +243,11 @@ const Ro = (e) => {
|
|
|
243
243
|
onMousedown: a,
|
|
244
244
|
onClick: f
|
|
245
245
|
} = e;
|
|
246
|
-
let
|
|
247
|
-
return typeof i == "function" ?
|
|
246
|
+
let s;
|
|
247
|
+
return typeof i == "function" ? s = i(u) : s = jn(i) ? Qt(i) : i, y("span", {
|
|
248
248
|
class: l,
|
|
249
|
-
onMousedown: (
|
|
250
|
-
|
|
249
|
+
onMousedown: (r) => {
|
|
250
|
+
r.preventDefault(), a && a(r);
|
|
251
251
|
},
|
|
252
252
|
style: {
|
|
253
253
|
userSelect: "none",
|
|
@@ -256,8 +256,8 @@ const Ro = (e) => {
|
|
|
256
256
|
unselectable: "on",
|
|
257
257
|
onClick: f,
|
|
258
258
|
"aria-hidden": !0
|
|
259
|
-
}, [
|
|
260
|
-
class: l.split(/\s+/).map((
|
|
259
|
+
}, [s !== void 0 ? s : y("span", {
|
|
260
|
+
class: l.split(/\s+/).map((r) => `${r}-icon`)
|
|
261
261
|
}, [(t = o.default) === null || t === void 0 ? void 0 : t.call(o)])]);
|
|
262
262
|
};
|
|
263
263
|
Pe.inheritAttrs = !1;
|
|
@@ -338,12 +338,12 @@ const Fo = {
|
|
|
338
338
|
inputElement: u,
|
|
339
339
|
disabled: a,
|
|
340
340
|
tabindex: f,
|
|
341
|
-
autofocus:
|
|
342
|
-
autocomplete:
|
|
341
|
+
autofocus: s,
|
|
342
|
+
autocomplete: r,
|
|
343
343
|
editable: m,
|
|
344
344
|
activeDescendantId: p,
|
|
345
345
|
value: w,
|
|
346
|
-
onKeydown:
|
|
346
|
+
onKeydown: h,
|
|
347
347
|
onMousedown: x,
|
|
348
348
|
onChange: O,
|
|
349
349
|
onPaste: I,
|
|
@@ -374,8 +374,8 @@ const Fo = {
|
|
|
374
374
|
disabled: a,
|
|
375
375
|
tabindex: f,
|
|
376
376
|
lazy: !1,
|
|
377
|
-
autocomplete:
|
|
378
|
-
autofocus:
|
|
377
|
+
autocomplete: r || "off",
|
|
378
|
+
autofocus: s,
|
|
379
379
|
class: se(`${l}-selection-search-input`, (t = V == null ? void 0 : V.props) === null || t === void 0 ? void 0 : t.class),
|
|
380
380
|
role: "combobox",
|
|
381
381
|
"aria-expanded": T,
|
|
@@ -392,7 +392,7 @@ const Fo = {
|
|
|
392
392
|
opacity: m ? null : 0
|
|
393
393
|
}),
|
|
394
394
|
onKeydown: (g) => {
|
|
395
|
-
|
|
395
|
+
h(g), z && z(g);
|
|
396
396
|
},
|
|
397
397
|
onMousedown: (g) => {
|
|
398
398
|
x(g), M && M(g);
|
|
@@ -487,18 +487,18 @@ const Fe = void 0, ke = ue({
|
|
|
487
487
|
var a;
|
|
488
488
|
const {
|
|
489
489
|
prefixCls: f,
|
|
490
|
-
invalidate:
|
|
491
|
-
item:
|
|
490
|
+
invalidate: s,
|
|
491
|
+
item: r,
|
|
492
492
|
renderItem: m,
|
|
493
493
|
responsive: p,
|
|
494
494
|
registerSize: w,
|
|
495
|
-
itemKey:
|
|
495
|
+
itemKey: h,
|
|
496
496
|
display: x,
|
|
497
497
|
order: O,
|
|
498
498
|
component: I = "div"
|
|
499
|
-
} = e, P = Ao(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), D = (a = o.default) === null || a === void 0 ? void 0 : a.call(o), C = m &&
|
|
499
|
+
} = e, P = Ao(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), D = (a = o.default) === null || a === void 0 ? void 0 : a.call(o), C = m && r !== Fe ? m(r) : D;
|
|
500
500
|
let v;
|
|
501
|
-
|
|
501
|
+
s || (v = {
|
|
502
502
|
opacity: l.value ? 0 : 1,
|
|
503
503
|
height: l.value ? 0 : Fe,
|
|
504
504
|
overflowY: l.value ? "hidden" : Fe,
|
|
@@ -517,7 +517,7 @@ const Fe = void 0, ke = ue({
|
|
|
517
517
|
}
|
|
518
518
|
}, {
|
|
519
519
|
default: () => y(I, Y(Y(Y({
|
|
520
|
-
class: se(!
|
|
520
|
+
class: se(!s && f),
|
|
521
521
|
style: v
|
|
522
522
|
}, T), P), {}, {
|
|
523
523
|
ref: i
|
|
@@ -582,14 +582,14 @@ const Vo = ue({
|
|
|
582
582
|
const u = l.value, {
|
|
583
583
|
className: a
|
|
584
584
|
} = u, f = at(u, ["className"]), {
|
|
585
|
-
class:
|
|
586
|
-
} = t,
|
|
585
|
+
class: s
|
|
586
|
+
} = t, r = at(t, ["class"]);
|
|
587
587
|
return y(mt, {
|
|
588
588
|
value: null
|
|
589
589
|
}, {
|
|
590
590
|
default: () => [y(ke, Y(Y(Y({
|
|
591
|
-
class: se(a,
|
|
592
|
-
}, f),
|
|
591
|
+
class: se(a, s)
|
|
592
|
+
}, f), r), e), o)]
|
|
593
593
|
});
|
|
594
594
|
};
|
|
595
595
|
}
|
|
@@ -642,10 +642,10 @@ const _o = () => ({
|
|
|
642
642
|
emit: t,
|
|
643
643
|
slots: l
|
|
644
644
|
} = n;
|
|
645
|
-
const i = R(() => e.ssr === "full"), u = G(null), a = R(() => u.value || 0), f = G(/* @__PURE__ */ new Map()),
|
|
645
|
+
const i = R(() => e.ssr === "full"), u = G(null), a = R(() => u.value || 0), f = G(/* @__PURE__ */ new Map()), s = G(0), r = G(0), m = G(0), p = G(null), w = G(null), h = R(() => w.value === null && i.value ? Number.MAX_SAFE_INTEGER : w.value || 0), x = G(!1), O = R(() => `${e.prefixCls}-item`), I = R(() => Math.max(s.value, r.value)), P = R(() => !!(e.data.length && e.maxCount === rn)), D = R(() => e.maxCount === sn), C = R(() => P.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), v = R(() => {
|
|
646
646
|
let M = e.data;
|
|
647
647
|
return P.value ? u.value === null && i.value ? M = e.data : M = e.data.slice(0, Math.min(e.data.length, a.value / e.itemWidth)) : typeof e.maxCount == "number" && (M = e.data.slice(0, e.maxCount)), M;
|
|
648
|
-
}), T = R(() => P.value ? e.data.slice(
|
|
648
|
+
}), T = R(() => P.value ? e.data.slice(h.value + 1) : e.data.slice(v.value.length)), $ = (M, L) => {
|
|
649
649
|
var k;
|
|
650
650
|
return typeof e.itemKey == "function" ? e.itemKey(M) : (k = e.itemKey && (M == null ? void 0 : M[e.itemKey])) !== null && k !== void 0 ? k : L;
|
|
651
651
|
}, N = R(() => e.renderItem || ((M) => M)), V = (M, L) => {
|
|
@@ -656,11 +656,11 @@ const _o = () => ({
|
|
|
656
656
|
const k = new Map(f.value);
|
|
657
657
|
L === null ? k.delete(M) : k.set(M, L), f.value = k;
|
|
658
658
|
}, Q = (M, L) => {
|
|
659
|
-
|
|
659
|
+
s.value = r.value, r.value = L;
|
|
660
660
|
}, X = (M, L) => {
|
|
661
661
|
m.value = L;
|
|
662
662
|
}, U = (M) => f.value.get($(v.value[M], M));
|
|
663
|
-
return ie([a, f,
|
|
663
|
+
return ie([a, f, r, m, () => e.itemKey, v], () => {
|
|
664
664
|
if (a.value && I.value && v.value) {
|
|
665
665
|
let M = m.value;
|
|
666
666
|
const L = v.value.length, k = L - 1;
|
|
@@ -680,7 +680,7 @@ const _o = () => ({
|
|
|
680
680
|
V(k), p.value = null;
|
|
681
681
|
break;
|
|
682
682
|
} else if (M + I.value > a.value) {
|
|
683
|
-
V(ee - 1), p.value = M - g - m.value +
|
|
683
|
+
V(ee - 1), p.value = M - g - m.value + r.value;
|
|
684
684
|
break;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
@@ -700,14 +700,14 @@ const _o = () => ({
|
|
|
700
700
|
} = e, {
|
|
701
701
|
class: ae,
|
|
702
702
|
style: ne
|
|
703
|
-
} = o,
|
|
704
|
-
let
|
|
705
|
-
p.value !== null && P.value && (
|
|
703
|
+
} = o, me = Lo(o, ["class", "style"]);
|
|
704
|
+
let pe = {};
|
|
705
|
+
p.value !== null && P.value && (pe = {
|
|
706
706
|
position: "absolute",
|
|
707
707
|
left: `${p.value}px`,
|
|
708
708
|
top: 0
|
|
709
709
|
});
|
|
710
|
-
const
|
|
710
|
+
const b = {
|
|
711
711
|
prefixCls: O.value,
|
|
712
712
|
responsive: P.value,
|
|
713
713
|
component: L,
|
|
@@ -716,44 +716,44 @@ const _o = () => ({
|
|
|
716
716
|
const J = $(B, q);
|
|
717
717
|
return y(mt, {
|
|
718
718
|
key: J,
|
|
719
|
-
value: S(S({},
|
|
719
|
+
value: S(S({}, b), {
|
|
720
720
|
order: q,
|
|
721
721
|
item: B,
|
|
722
722
|
itemKey: J,
|
|
723
723
|
registerSize: z,
|
|
724
|
-
display: q <=
|
|
724
|
+
display: q <= h.value
|
|
725
725
|
})
|
|
726
726
|
}, {
|
|
727
727
|
default: () => [k(B, q)]
|
|
728
728
|
});
|
|
729
729
|
} : (B, q) => {
|
|
730
730
|
const J = $(B, q);
|
|
731
|
-
return y(ke, Y(Y({},
|
|
731
|
+
return y(ke, Y(Y({}, b), {}, {
|
|
732
732
|
order: q,
|
|
733
733
|
key: J,
|
|
734
734
|
item: B,
|
|
735
735
|
renderItem: N.value,
|
|
736
736
|
itemKey: J,
|
|
737
737
|
registerSize: z,
|
|
738
|
-
display: q <=
|
|
738
|
+
display: q <= h.value
|
|
739
739
|
}), null);
|
|
740
740
|
};
|
|
741
741
|
let d = () => null;
|
|
742
742
|
const F = {
|
|
743
|
-
order: M ?
|
|
743
|
+
order: M ? h.value : Number.MAX_SAFE_INTEGER,
|
|
744
744
|
className: `${O.value} ${O.value}-rest`,
|
|
745
745
|
registerSize: Q,
|
|
746
746
|
display: M
|
|
747
747
|
};
|
|
748
748
|
if (ee)
|
|
749
749
|
ee && (d = () => y(mt, {
|
|
750
|
-
value: S(S({},
|
|
750
|
+
value: S(S({}, b), F)
|
|
751
751
|
}, {
|
|
752
752
|
default: () => [ee(T.value)]
|
|
753
753
|
}));
|
|
754
754
|
else {
|
|
755
755
|
const B = g || Ho;
|
|
756
|
-
d = () => y(ke, Y(Y({},
|
|
756
|
+
d = () => y(ke, Y(Y({}, b), F), {
|
|
757
757
|
default: () => typeof B == "function" ? B(T.value) : B
|
|
758
758
|
});
|
|
759
759
|
}
|
|
@@ -765,13 +765,13 @@ const _o = () => ({
|
|
|
765
765
|
style: ne,
|
|
766
766
|
onMousedown: oe,
|
|
767
767
|
role: e.role
|
|
768
|
-
},
|
|
769
|
-
default: () => [v.value.map(c), C.value ? d() : null, W && y(ke, Y(Y({},
|
|
770
|
-
order:
|
|
768
|
+
}, me), {
|
|
769
|
+
default: () => [v.value.map(c), C.value ? d() : null, W && y(ke, Y(Y({}, b), {}, {
|
|
770
|
+
order: h.value,
|
|
771
771
|
class: `${O.value}-suffix`,
|
|
772
772
|
registerSize: X,
|
|
773
773
|
display: !0,
|
|
774
|
-
style:
|
|
774
|
+
style: pe
|
|
775
775
|
}), {
|
|
776
776
|
default: () => W
|
|
777
777
|
}), (B = l.default) === null || B === void 0 ? void 0 : B.call(l)]
|
|
@@ -847,7 +847,7 @@ const zo = {
|
|
|
847
847
|
const n = G(), o = G(0), t = G(!1), l = yt(), i = R(() => `${e.prefixCls}-selection`), u = R(() => e.open || e.mode === "tags" ? e.searchValue : ""), a = R(() => e.mode === "tags" || e.showSearch && (e.open || t.value)), f = ve("");
|
|
848
848
|
Me(() => {
|
|
849
849
|
f.value = u.value;
|
|
850
|
-
}),
|
|
850
|
+
}), xe(() => {
|
|
851
851
|
ie(f, () => {
|
|
852
852
|
o.value = n.value.scrollWidth;
|
|
853
853
|
}, {
|
|
@@ -855,12 +855,12 @@ const zo = {
|
|
|
855
855
|
immediate: !0
|
|
856
856
|
});
|
|
857
857
|
});
|
|
858
|
-
function
|
|
858
|
+
function s(h, x, O, I, P) {
|
|
859
859
|
return y("span", {
|
|
860
860
|
class: se(`${i.value}-item`, {
|
|
861
861
|
[`${i.value}-item-disabled`]: O
|
|
862
862
|
}),
|
|
863
|
-
title: typeof
|
|
863
|
+
title: typeof h == "string" || typeof h == "number" ? h.toString() : void 0
|
|
864
864
|
}, [y("span", {
|
|
865
865
|
class: `${i.value}-item-content`
|
|
866
866
|
}, [x]), I && y(Pe, {
|
|
@@ -869,34 +869,34 @@ const zo = {
|
|
|
869
869
|
onClick: P,
|
|
870
870
|
customizeIcon: e.removeIcon
|
|
871
871
|
}, {
|
|
872
|
-
default: () => [
|
|
872
|
+
default: () => [Se("×")]
|
|
873
873
|
})]);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function r(h, x, O, I, P, D) {
|
|
876
876
|
var C;
|
|
877
877
|
const v = ($) => {
|
|
878
878
|
Kt($), e.onToggleOpen(!open);
|
|
879
879
|
};
|
|
880
880
|
let T = D;
|
|
881
|
-
return l.keyEntities && (T = ((C = l.keyEntities[
|
|
882
|
-
key:
|
|
881
|
+
return l.keyEntities && (T = ((C = l.keyEntities[h]) === null || C === void 0 ? void 0 : C.node) || {}), y("span", {
|
|
882
|
+
key: h,
|
|
883
883
|
onMousedown: v
|
|
884
884
|
}, [e.tagRender({
|
|
885
885
|
label: x,
|
|
886
|
-
value:
|
|
886
|
+
value: h,
|
|
887
887
|
disabled: O,
|
|
888
888
|
closable: I,
|
|
889
889
|
onClose: P,
|
|
890
890
|
option: T
|
|
891
891
|
})]);
|
|
892
892
|
}
|
|
893
|
-
function m(
|
|
893
|
+
function m(h) {
|
|
894
894
|
const {
|
|
895
895
|
disabled: x,
|
|
896
896
|
label: O,
|
|
897
897
|
value: I,
|
|
898
898
|
option: P
|
|
899
|
-
} =
|
|
899
|
+
} = h, D = !e.disabled && !x;
|
|
900
900
|
let C = O;
|
|
901
901
|
if (typeof e.maxTagTextLength == "number" && (typeof O == "string" || typeof O == "number")) {
|
|
902
902
|
const T = String(C);
|
|
@@ -904,23 +904,23 @@ const zo = {
|
|
|
904
904
|
}
|
|
905
905
|
const v = (T) => {
|
|
906
906
|
var $;
|
|
907
|
-
T && T.stopPropagation(), ($ = e.onRemove) === null || $ === void 0 || $.call(e,
|
|
907
|
+
T && T.stopPropagation(), ($ = e.onRemove) === null || $ === void 0 || $.call(e, h);
|
|
908
908
|
};
|
|
909
|
-
return typeof e.tagRender == "function" ?
|
|
909
|
+
return typeof e.tagRender == "function" ? r(I, C, x, D, v, P) : s(O, C, x, D, v);
|
|
910
910
|
}
|
|
911
|
-
function p(
|
|
911
|
+
function p(h) {
|
|
912
912
|
const {
|
|
913
913
|
maxTagPlaceholder: x = (I) => `+ ${I.length} ...`
|
|
914
|
-
} = e, O = typeof x == "function" ? x(
|
|
915
|
-
return
|
|
914
|
+
} = e, O = typeof x == "function" ? x(h) : x;
|
|
915
|
+
return s(O, O, !1);
|
|
916
916
|
}
|
|
917
|
-
const w = (
|
|
918
|
-
const x =
|
|
919
|
-
f.value =
|
|
917
|
+
const w = (h) => {
|
|
918
|
+
const x = h.target.composing;
|
|
919
|
+
f.value = h.target.value, x || e.onInputChange(h);
|
|
920
920
|
};
|
|
921
921
|
return () => {
|
|
922
922
|
const {
|
|
923
|
-
id:
|
|
923
|
+
id: h,
|
|
924
924
|
prefixCls: x,
|
|
925
925
|
values: O,
|
|
926
926
|
open: I,
|
|
@@ -947,7 +947,7 @@ const zo = {
|
|
|
947
947
|
inputRef: P,
|
|
948
948
|
open: I,
|
|
949
949
|
prefixCls: x,
|
|
950
|
-
id:
|
|
950
|
+
id: h,
|
|
951
951
|
inputElement: null,
|
|
952
952
|
disabled: C,
|
|
953
953
|
autofocus: v,
|
|
@@ -969,7 +969,7 @@ const zo = {
|
|
|
969
969
|
ref: n,
|
|
970
970
|
class: `${i.value}-search-mirror`,
|
|
971
971
|
"aria-hidden": !0
|
|
972
|
-
}, [f.value,
|
|
972
|
+
}, [f.value, Se(" ")])]), L = y(Je, {
|
|
973
973
|
prefixCls: `${i.value}-overflow`,
|
|
974
974
|
data: O,
|
|
975
975
|
renderItem: m,
|
|
@@ -1032,8 +1032,8 @@ const zo = {
|
|
|
1032
1032
|
name: "SingleSelector",
|
|
1033
1033
|
setup(e) {
|
|
1034
1034
|
const n = G(!1), o = R(() => e.mode === "combobox"), t = R(() => o.value || e.showSearch), l = R(() => {
|
|
1035
|
-
let
|
|
1036
|
-
return o.value && e.activeValue && !n.value && (
|
|
1035
|
+
let r = e.searchValue || "";
|
|
1036
|
+
return o.value && e.activeValue && !n.value && (r = e.activeValue), r;
|
|
1037
1037
|
}), i = yt();
|
|
1038
1038
|
ie([o, () => e.activeValue], () => {
|
|
1039
1039
|
o.value && (n.value = !1);
|
|
@@ -1041,25 +1041,25 @@ const zo = {
|
|
|
1041
1041
|
immediate: !0
|
|
1042
1042
|
});
|
|
1043
1043
|
const u = R(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!l.value || e.compositionStatus), a = R(() => {
|
|
1044
|
-
const
|
|
1045
|
-
return
|
|
1044
|
+
const r = e.values[0];
|
|
1045
|
+
return r && (typeof r.label == "string" || typeof r.label == "number") ? r.label.toString() : void 0;
|
|
1046
1046
|
}), f = () => {
|
|
1047
1047
|
if (e.values[0])
|
|
1048
1048
|
return null;
|
|
1049
|
-
const
|
|
1049
|
+
const r = u.value ? {
|
|
1050
1050
|
visibility: "hidden"
|
|
1051
1051
|
} : void 0;
|
|
1052
1052
|
return y("span", {
|
|
1053
1053
|
class: `${e.prefixCls}-selection-placeholder`,
|
|
1054
|
-
style:
|
|
1054
|
+
style: r
|
|
1055
1055
|
}, [e.placeholder]);
|
|
1056
|
-
},
|
|
1057
|
-
|
|
1056
|
+
}, s = (r) => {
|
|
1057
|
+
r.target.composing || (n.value = !0, e.onInputChange(r));
|
|
1058
1058
|
};
|
|
1059
1059
|
return () => {
|
|
1060
|
-
var
|
|
1060
|
+
var r, m, p, w;
|
|
1061
1061
|
const {
|
|
1062
|
-
inputElement:
|
|
1062
|
+
inputElement: h,
|
|
1063
1063
|
prefixCls: x,
|
|
1064
1064
|
id: O,
|
|
1065
1065
|
values: I,
|
|
@@ -1079,7 +1079,7 @@ const zo = {
|
|
|
1079
1079
|
} = e, M = I[0];
|
|
1080
1080
|
let L = null;
|
|
1081
1081
|
if (M && i.customSlots) {
|
|
1082
|
-
const k = (
|
|
1082
|
+
const k = (r = M.key) !== null && r !== void 0 ? r : M.value, ee = ((m = i.keyEntities[k]) === null || m === void 0 ? void 0 : m.node) || {};
|
|
1083
1083
|
L = i.customSlots[(p = ee.slots) === null || p === void 0 ? void 0 : p.title] || i.customSlots.title || M.label, typeof L == "function" && (L = L(ee));
|
|
1084
1084
|
} else
|
|
1085
1085
|
L = V && M ? V(M.option) : M == null ? void 0 : M.label;
|
|
@@ -1090,7 +1090,7 @@ const zo = {
|
|
|
1090
1090
|
prefixCls: x,
|
|
1091
1091
|
id: O,
|
|
1092
1092
|
open: $,
|
|
1093
|
-
inputElement:
|
|
1093
|
+
inputElement: h,
|
|
1094
1094
|
disabled: D,
|
|
1095
1095
|
autofocus: C,
|
|
1096
1096
|
autocomplete: v,
|
|
@@ -1099,7 +1099,7 @@ const zo = {
|
|
|
1099
1099
|
value: l.value,
|
|
1100
1100
|
onKeydown: j,
|
|
1101
1101
|
onMousedown: z,
|
|
1102
|
-
onChange:
|
|
1102
|
+
onChange: s,
|
|
1103
1103
|
onPaste: Q,
|
|
1104
1104
|
onCompositionstart: X,
|
|
1105
1105
|
onCompositionend: U,
|
|
@@ -1242,29 +1242,29 @@ const Uo = ue({
|
|
|
1242
1242
|
}, f = () => {
|
|
1243
1243
|
u(!0);
|
|
1244
1244
|
};
|
|
1245
|
-
let
|
|
1246
|
-
const
|
|
1245
|
+
let s = null;
|
|
1246
|
+
const r = (I) => {
|
|
1247
1247
|
e.onSearch(I, !0, l.value) !== !1 && e.onToggleOpen(!0);
|
|
1248
1248
|
}, m = () => {
|
|
1249
1249
|
l.value = !0;
|
|
1250
1250
|
}, p = (I) => {
|
|
1251
|
-
l.value = !1, e.mode !== "combobox" &&
|
|
1251
|
+
l.value = !1, e.mode !== "combobox" && r(I.target.value);
|
|
1252
1252
|
}, w = (I) => {
|
|
1253
1253
|
let {
|
|
1254
1254
|
target: {
|
|
1255
1255
|
value: P
|
|
1256
1256
|
}
|
|
1257
1257
|
} = I;
|
|
1258
|
-
if (e.tokenWithEnter &&
|
|
1259
|
-
const D =
|
|
1260
|
-
P = P.replace(D,
|
|
1258
|
+
if (e.tokenWithEnter && s && /[\r\n]/.test(s)) {
|
|
1259
|
+
const D = s.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
|
|
1260
|
+
P = P.replace(D, s);
|
|
1261
1261
|
}
|
|
1262
|
-
|
|
1263
|
-
},
|
|
1262
|
+
s = null, r(P);
|
|
1263
|
+
}, h = (I) => {
|
|
1264
1264
|
const {
|
|
1265
1265
|
clipboardData: P
|
|
1266
1266
|
} = I;
|
|
1267
|
-
|
|
1267
|
+
s = P.getData("text");
|
|
1268
1268
|
}, x = (I) => {
|
|
1269
1269
|
let {
|
|
1270
1270
|
target: P
|
|
@@ -1293,7 +1293,7 @@ const Uo = ue({
|
|
|
1293
1293
|
onInputKeyDown: a,
|
|
1294
1294
|
onInputMouseDown: f,
|
|
1295
1295
|
onInputChange: w,
|
|
1296
|
-
onInputPaste:
|
|
1296
|
+
onInputPaste: h,
|
|
1297
1297
|
compositionStatus: l.value,
|
|
1298
1298
|
onInputCompositionStart: m,
|
|
1299
1299
|
onInputCompositionEnd: p
|
|
@@ -1312,10 +1312,10 @@ function Yo(e, n, o) {
|
|
|
1312
1312
|
var i, u, a;
|
|
1313
1313
|
let f = l.target;
|
|
1314
1314
|
f.shadowRoot && l.composed && (f = l.composedPath()[0] || f);
|
|
1315
|
-
const
|
|
1316
|
-
n.value &&
|
|
1315
|
+
const s = [(i = e[0]) === null || i === void 0 ? void 0 : i.value, (a = (u = e[1]) === null || u === void 0 ? void 0 : u.value) === null || a === void 0 ? void 0 : a.getPopupElement()];
|
|
1316
|
+
n.value && s.every((r) => r && !r.contains(f) && r !== f) && o(!1);
|
|
1317
1317
|
}
|
|
1318
|
-
|
|
1318
|
+
xe(() => {
|
|
1319
1319
|
window.addEventListener("mousedown", t);
|
|
1320
1320
|
}), je(() => {
|
|
1321
1321
|
window.removeEventListener("mousedown", t);
|
|
@@ -1328,7 +1328,7 @@ function Go() {
|
|
|
1328
1328
|
const t = () => {
|
|
1329
1329
|
clearTimeout(o);
|
|
1330
1330
|
};
|
|
1331
|
-
return
|
|
1331
|
+
return xe(() => {
|
|
1332
1332
|
t();
|
|
1333
1333
|
}), [n, (i, u) => {
|
|
1334
1334
|
t(), o = setTimeout(() => {
|
|
@@ -1544,10 +1544,10 @@ const tl = ue({
|
|
|
1544
1544
|
slots: l
|
|
1545
1545
|
} = n;
|
|
1546
1546
|
const i = R(() => wt(e.mode)), u = R(() => e.showSearch !== void 0 ? e.showSearch : i.value || e.mode === "combobox"), a = G(!1);
|
|
1547
|
-
|
|
1547
|
+
xe(() => {
|
|
1548
1548
|
a.value = qo();
|
|
1549
1549
|
});
|
|
1550
|
-
const f = yt(),
|
|
1550
|
+
const f = yt(), s = G(null), r = Ke(), m = G(null), p = G(null), w = G(null), h = ve(!1), [x, O, I] = Go();
|
|
1551
1551
|
t({
|
|
1552
1552
|
focus: () => {
|
|
1553
1553
|
var c;
|
|
@@ -1603,7 +1603,7 @@ const tl = ue({
|
|
|
1603
1603
|
immediate: !0,
|
|
1604
1604
|
flush: "post"
|
|
1605
1605
|
}), ie(() => e.disabled, () => {
|
|
1606
|
-
T.value && e.disabled && N(!1), e.disabled && !
|
|
1606
|
+
T.value && e.disabled && N(!1), e.disabled && !h.value && O(!1);
|
|
1607
1607
|
}, {
|
|
1608
1608
|
immediate: !0
|
|
1609
1609
|
});
|
|
@@ -1643,8 +1643,8 @@ const tl = ue({
|
|
|
1643
1643
|
}, H = G(!1), W = function() {
|
|
1644
1644
|
O(!0), e.disabled || (e.onFocus && !H.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && z(!0)), H.value = !0;
|
|
1645
1645
|
}, _ = ve(!1), te = function() {
|
|
1646
|
-
if (_.value || (
|
|
1647
|
-
H.value = !1,
|
|
1646
|
+
if (_.value || (h.value = !0, O(!1, () => {
|
|
1647
|
+
H.value = !1, h.value = !1, z(!1);
|
|
1648
1648
|
}), e.disabled))
|
|
1649
1649
|
return;
|
|
1650
1650
|
const c = C.value;
|
|
@@ -1663,12 +1663,12 @@ const tl = ue({
|
|
|
1663
1663
|
blur: te
|
|
1664
1664
|
});
|
|
1665
1665
|
const ne = [];
|
|
1666
|
-
|
|
1666
|
+
xe(() => {
|
|
1667
1667
|
ne.forEach((c) => clearTimeout(c)), ne.splice(0, ne.length);
|
|
1668
1668
|
}), je(() => {
|
|
1669
1669
|
ne.forEach((c) => clearTimeout(c)), ne.splice(0, ne.length);
|
|
1670
1670
|
});
|
|
1671
|
-
const
|
|
1671
|
+
const me = function(c) {
|
|
1672
1672
|
var d, F;
|
|
1673
1673
|
const {
|
|
1674
1674
|
target: E
|
|
@@ -1684,20 +1684,20 @@ const tl = ue({
|
|
|
1684
1684
|
for (var q = arguments.length, J = new Array(q > 1 ? q - 1 : 0), le = 1; le < q; le++)
|
|
1685
1685
|
J[le - 1] = arguments[le];
|
|
1686
1686
|
(F = e.onMousedown) === null || F === void 0 || F.call(e, c, ...J);
|
|
1687
|
-
},
|
|
1687
|
+
}, pe = G(null), b = () => {
|
|
1688
1688
|
};
|
|
1689
|
-
return
|
|
1689
|
+
return xe(() => {
|
|
1690
1690
|
ie(j, () => {
|
|
1691
1691
|
var c;
|
|
1692
1692
|
if (j.value) {
|
|
1693
|
-
const d = Math.ceil((c =
|
|
1694
|
-
|
|
1693
|
+
const d = Math.ceil((c = s.value) === null || c === void 0 ? void 0 : c.offsetWidth);
|
|
1694
|
+
pe.value !== d && !Number.isNaN(d) && (pe.value = d);
|
|
1695
1695
|
}
|
|
1696
1696
|
}, {
|
|
1697
1697
|
immediate: !0,
|
|
1698
1698
|
flush: "post"
|
|
1699
1699
|
});
|
|
1700
|
-
}), Yo([
|
|
1700
|
+
}), Yo([s, m], j, z), Xo(dn(S(S({}, Yn(e)), {
|
|
1701
1701
|
open: $,
|
|
1702
1702
|
triggerOpen: j,
|
|
1703
1703
|
showSearch: u,
|
|
@@ -1758,12 +1758,12 @@ const tl = ue({
|
|
|
1758
1758
|
OptionList: Hn
|
|
1759
1759
|
} = c, _n = Qo(c, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), Mt = q === "combobox" && Tt && Tt() || null, Ve = typeof Et == "function" && Et(), ot = S({}, _n);
|
|
1760
1760
|
let Pt;
|
|
1761
|
-
Ve && (Pt = (
|
|
1762
|
-
z(
|
|
1763
|
-
}), Jo.forEach((
|
|
1764
|
-
delete ot[
|
|
1765
|
-
}), nt == null || nt.forEach((
|
|
1766
|
-
delete ot[
|
|
1761
|
+
Ve && (Pt = ($e) => {
|
|
1762
|
+
z($e);
|
|
1763
|
+
}), Jo.forEach(($e) => {
|
|
1764
|
+
delete ot[$e];
|
|
1765
|
+
}), nt == null || nt.forEach(($e) => {
|
|
1766
|
+
delete ot[$e];
|
|
1767
1767
|
});
|
|
1768
1768
|
const Rt = Ue !== void 0 ? Ue : De || !i.value && q !== "combobox";
|
|
1769
1769
|
let Dt;
|
|
@@ -1792,7 +1792,7 @@ const tl = ue({
|
|
|
1792
1792
|
onMousedown: Bn,
|
|
1793
1793
|
customizeIcon: de
|
|
1794
1794
|
}, {
|
|
1795
|
-
default: () => [
|
|
1795
|
+
default: () => [Se("×")]
|
|
1796
1796
|
}));
|
|
1797
1797
|
const zn = y(Hn, {
|
|
1798
1798
|
ref: w
|
|
@@ -1815,7 +1815,7 @@ const tl = ue({
|
|
|
1815
1815
|
prefixCls: d,
|
|
1816
1816
|
visible: j.value,
|
|
1817
1817
|
popupElement: zn,
|
|
1818
|
-
containerWidth:
|
|
1818
|
+
containerWidth: pe.value,
|
|
1819
1819
|
animation: xn,
|
|
1820
1820
|
transitionName: On,
|
|
1821
1821
|
dropdownStyle: $n,
|
|
@@ -1827,16 +1827,16 @@ const tl = ue({
|
|
|
1827
1827
|
placement: Cn,
|
|
1828
1828
|
getPopupContainer: In,
|
|
1829
1829
|
empty: An,
|
|
1830
|
-
getTriggerDOMNode: () =>
|
|
1830
|
+
getTriggerDOMNode: () => r.current,
|
|
1831
1831
|
onPopupVisibleChange: Pt,
|
|
1832
|
-
onPopupMouseEnter:
|
|
1832
|
+
onPopupMouseEnter: b,
|
|
1833
1833
|
onPopupFocusin: oe,
|
|
1834
1834
|
onPopupFocusout: ae
|
|
1835
1835
|
}, {
|
|
1836
1836
|
default: () => Ve ? ze(Ve) && Zt(Ve, {
|
|
1837
|
-
ref:
|
|
1837
|
+
ref: r
|
|
1838
1838
|
}, !1, !0) : y(Uo, Y(Y({}, e), {}, {
|
|
1839
|
-
domRef:
|
|
1839
|
+
domRef: r,
|
|
1840
1840
|
prefixCls: d,
|
|
1841
1841
|
inputElement: Mt,
|
|
1842
1842
|
ref: p,
|
|
@@ -1860,8 +1860,8 @@ const tl = ue({
|
|
|
1860
1860
|
let lt;
|
|
1861
1861
|
return Ve ? lt = Nt : lt = y("div", Y(Y({}, ot), {}, {
|
|
1862
1862
|
class: Kn,
|
|
1863
|
-
ref:
|
|
1864
|
-
onMousedown:
|
|
1863
|
+
ref: s,
|
|
1864
|
+
onMousedown: me,
|
|
1865
1865
|
onKeydown: k,
|
|
1866
1866
|
onKeyup: ee
|
|
1867
1867
|
}), [x.value && !$.value && y("span", {
|
|
@@ -1873,11 +1873,11 @@ const tl = ue({
|
|
|
1873
1873
|
opacity: 0
|
|
1874
1874
|
},
|
|
1875
1875
|
"aria-live": "polite"
|
|
1876
|
-
}, [`${Ye.map((
|
|
1876
|
+
}, [`${Ye.map(($e) => {
|
|
1877
1877
|
let {
|
|
1878
1878
|
label: At,
|
|
1879
1879
|
value: Wn
|
|
1880
|
-
} =
|
|
1880
|
+
} = $e;
|
|
1881
1881
|
return ["number", "string"].includes(typeof At) ? At : Wn;
|
|
1882
1882
|
}).join(", ")}`]), Nt, Dt, Ft]), lt;
|
|
1883
1883
|
};
|
|
@@ -1892,7 +1892,7 @@ const tl = ue({
|
|
|
1892
1892
|
slots: u
|
|
1893
1893
|
} = n;
|
|
1894
1894
|
var a;
|
|
1895
|
-
let f = {},
|
|
1895
|
+
let f = {}, s = {
|
|
1896
1896
|
display: "flex",
|
|
1897
1897
|
flexDirection: "column"
|
|
1898
1898
|
};
|
|
@@ -1900,7 +1900,7 @@ const tl = ue({
|
|
|
1900
1900
|
height: `${o}px`,
|
|
1901
1901
|
position: "relative",
|
|
1902
1902
|
overflow: "hidden"
|
|
1903
|
-
},
|
|
1903
|
+
}, s = S(S({}, s), {
|
|
1904
1904
|
transform: `translateY(${t}px)`,
|
|
1905
1905
|
position: "absolute",
|
|
1906
1906
|
left: 0,
|
|
@@ -1909,15 +1909,15 @@ const tl = ue({
|
|
|
1909
1909
|
})), y("div", {
|
|
1910
1910
|
style: f
|
|
1911
1911
|
}, [y(vt, {
|
|
1912
|
-
onResize: (
|
|
1912
|
+
onResize: (r) => {
|
|
1913
1913
|
let {
|
|
1914
1914
|
offsetHeight: m
|
|
1915
|
-
} =
|
|
1915
|
+
} = r;
|
|
1916
1916
|
m && i && i();
|
|
1917
1917
|
}
|
|
1918
1918
|
}, {
|
|
1919
1919
|
default: () => [y("div", {
|
|
1920
|
-
style:
|
|
1920
|
+
style: s,
|
|
1921
1921
|
class: se({
|
|
1922
1922
|
[`${l}-holder-inner`]: l
|
|
1923
1923
|
})
|
|
@@ -2003,9 +2003,9 @@ const ol = ue({
|
|
|
2003
2003
|
},
|
|
2004
2004
|
mounted() {
|
|
2005
2005
|
var e, n;
|
|
2006
|
-
(e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart,
|
|
2006
|
+
(e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart, Ce ? {
|
|
2007
2007
|
passive: !1
|
|
2008
|
-
} : !1), (n = this.thumbRef.current) === null || n === void 0 || n.addEventListener("touchstart", this.onMouseDown,
|
|
2008
|
+
} : !1), (n = this.thumbRef.current) === null || n === void 0 || n.addEventListener("touchstart", this.onMouseDown, Ce ? {
|
|
2009
2009
|
passive: !1
|
|
2010
2010
|
} : !1);
|
|
2011
2011
|
},
|
|
@@ -2026,18 +2026,18 @@ const ol = ue({
|
|
|
2026
2026
|
},
|
|
2027
2027
|
// ======================= Clean =======================
|
|
2028
2028
|
patchEvents() {
|
|
2029
|
-
window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove,
|
|
2029
|
+
window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, Ce ? {
|
|
2030
2030
|
passive: !1
|
|
2031
2031
|
} : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
|
|
2032
2032
|
},
|
|
2033
2033
|
removeEvents() {
|
|
2034
|
-
window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart,
|
|
2034
|
+
window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, Ce ? {
|
|
2035
2035
|
passive: !1
|
|
2036
|
-
} : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown,
|
|
2036
|
+
} : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, Ce ? {
|
|
2037
2037
|
passive: !1
|
|
2038
|
-
} : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove,
|
|
2038
|
+
} : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, Ce ? {
|
|
2039
2039
|
passive: !1
|
|
2040
|
-
} : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)),
|
|
2040
|
+
} : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), we.cancel(this.moveRaf);
|
|
2041
2041
|
},
|
|
2042
2042
|
// ======================= Thumb =======================
|
|
2043
2043
|
onMouseDown(e) {
|
|
@@ -2058,10 +2058,10 @@ const ol = ue({
|
|
|
2058
2058
|
} = this.state, {
|
|
2059
2059
|
onScroll: l
|
|
2060
2060
|
} = this.$props;
|
|
2061
|
-
if (
|
|
2062
|
-
const i = Wt(e) - o, u = t + i, a = this.getEnableScrollRange(), f = this.getEnableHeightRange(),
|
|
2063
|
-
this.moveRaf =
|
|
2064
|
-
l(
|
|
2061
|
+
if (we.cancel(this.moveRaf), n) {
|
|
2062
|
+
const i = Wt(e) - o, u = t + i, a = this.getEnableScrollRange(), f = this.getEnableHeightRange(), s = f ? u / f : 0, r = Math.ceil(s * a);
|
|
2063
|
+
this.moveRaf = we(() => {
|
|
2064
|
+
l(r);
|
|
2065
2065
|
});
|
|
2066
2066
|
}
|
|
2067
2067
|
},
|
|
@@ -2157,10 +2157,10 @@ function ll(e, n, o, t) {
|
|
|
2157
2157
|
});
|
|
2158
2158
|
let a;
|
|
2159
2159
|
function f() {
|
|
2160
|
-
|
|
2160
|
+
we.cancel(a);
|
|
2161
2161
|
}
|
|
2162
|
-
function
|
|
2163
|
-
f(), a =
|
|
2162
|
+
function s() {
|
|
2163
|
+
f(), a = we(() => {
|
|
2164
2164
|
l.forEach((m, p) => {
|
|
2165
2165
|
if (m && m.offsetParent) {
|
|
2166
2166
|
const {
|
|
@@ -2171,45 +2171,45 @@ function ll(e, n, o, t) {
|
|
|
2171
2171
|
});
|
|
2172
2172
|
});
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2174
|
+
function r(m, p) {
|
|
2175
2175
|
const w = n(m);
|
|
2176
|
-
l.get(w), p ? (l.set(w, p.$el || p),
|
|
2176
|
+
l.get(w), p ? (l.set(w, p.$el || p), s()) : l.delete(w);
|
|
2177
2177
|
}
|
|
2178
2178
|
return Jt(() => {
|
|
2179
2179
|
f();
|
|
2180
|
-
}), [
|
|
2180
|
+
}), [r, s, i, u];
|
|
2181
2181
|
}
|
|
2182
2182
|
function il(e, n, o, t, l, i, u, a) {
|
|
2183
2183
|
let f;
|
|
2184
|
-
return (
|
|
2185
|
-
if (
|
|
2184
|
+
return (s) => {
|
|
2185
|
+
if (s == null) {
|
|
2186
2186
|
a();
|
|
2187
2187
|
return;
|
|
2188
2188
|
}
|
|
2189
|
-
|
|
2190
|
-
const
|
|
2191
|
-
if (typeof
|
|
2192
|
-
u(
|
|
2193
|
-
else if (
|
|
2189
|
+
we.cancel(f);
|
|
2190
|
+
const r = n.value, m = t.itemHeight;
|
|
2191
|
+
if (typeof s == "number")
|
|
2192
|
+
u(s);
|
|
2193
|
+
else if (s && typeof s == "object") {
|
|
2194
2194
|
let p;
|
|
2195
2195
|
const {
|
|
2196
2196
|
align: w
|
|
2197
|
-
} =
|
|
2198
|
-
"index" in
|
|
2197
|
+
} = s;
|
|
2198
|
+
"index" in s ? {
|
|
2199
2199
|
index: p
|
|
2200
|
-
} =
|
|
2200
|
+
} = s : p = r.findIndex((O) => l(O) === s.key);
|
|
2201
2201
|
const {
|
|
2202
|
-
offset:
|
|
2203
|
-
} =
|
|
2202
|
+
offset: h = 0
|
|
2203
|
+
} = s, x = (O, I) => {
|
|
2204
2204
|
if (O < 0 || !e.value) return;
|
|
2205
2205
|
const P = e.value.clientHeight;
|
|
2206
2206
|
let D = !1, C = I;
|
|
2207
2207
|
if (P) {
|
|
2208
2208
|
const v = I || w;
|
|
2209
2209
|
let T = 0, $ = 0, N = 0;
|
|
2210
|
-
const V = Math.min(
|
|
2210
|
+
const V = Math.min(r.length, p);
|
|
2211
2211
|
for (let Q = 0; Q <= V; Q += 1) {
|
|
2212
|
-
const X = l(
|
|
2212
|
+
const X = l(r[Q]);
|
|
2213
2213
|
$ = T;
|
|
2214
2214
|
const U = o.get(X);
|
|
2215
2215
|
N = $ + (U === void 0 ? m : U), T = N, Q === p && U === void 0 && (D = !0);
|
|
@@ -2218,10 +2218,10 @@ function il(e, n, o, t, l, i, u, a) {
|
|
|
2218
2218
|
let z = null;
|
|
2219
2219
|
switch (v) {
|
|
2220
2220
|
case "top":
|
|
2221
|
-
z = $ -
|
|
2221
|
+
z = $ - h;
|
|
2222
2222
|
break;
|
|
2223
2223
|
case "bottom":
|
|
2224
|
-
z = N - P +
|
|
2224
|
+
z = N - P + h;
|
|
2225
2225
|
break;
|
|
2226
2226
|
default: {
|
|
2227
2227
|
const Q = j + P;
|
|
@@ -2230,7 +2230,7 @@ function il(e, n, o, t, l, i, u, a) {
|
|
|
2230
2230
|
}
|
|
2231
2231
|
z !== null && z !== j && u(z);
|
|
2232
2232
|
}
|
|
2233
|
-
f =
|
|
2233
|
+
f = we(() => {
|
|
2234
2234
|
D && i(), x(O - 1, C);
|
|
2235
2235
|
}, 2);
|
|
2236
2236
|
};
|
|
@@ -2258,47 +2258,47 @@ const al = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent),
|
|
|
2258
2258
|
function rl(e, n, o, t) {
|
|
2259
2259
|
let l = 0, i = null, u = null, a = !1;
|
|
2260
2260
|
const f = pn(n, o);
|
|
2261
|
-
function
|
|
2261
|
+
function s(m) {
|
|
2262
2262
|
if (!e.value) return;
|
|
2263
|
-
|
|
2263
|
+
we.cancel(i);
|
|
2264
2264
|
const {
|
|
2265
2265
|
deltaY: p
|
|
2266
2266
|
} = m;
|
|
2267
|
-
l += p, u = p, !f(p) && (al || m.preventDefault(), i =
|
|
2267
|
+
l += p, u = p, !f(p) && (al || m.preventDefault(), i = we(() => {
|
|
2268
2268
|
t(l * (a ? 10 : 1)), l = 0;
|
|
2269
2269
|
}));
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function r(m) {
|
|
2272
2272
|
e.value && (a = m.detail === u);
|
|
2273
2273
|
}
|
|
2274
|
-
return [
|
|
2274
|
+
return [s, r];
|
|
2275
2275
|
}
|
|
2276
2276
|
const sl = 14 / 15;
|
|
2277
2277
|
function ul(e, n, o) {
|
|
2278
2278
|
let t = !1, l = 0, i = null, u = null;
|
|
2279
2279
|
const a = () => {
|
|
2280
|
-
i && (i.removeEventListener("touchmove", f), i.removeEventListener("touchend",
|
|
2280
|
+
i && (i.removeEventListener("touchmove", f), i.removeEventListener("touchend", s));
|
|
2281
2281
|
}, f = (p) => {
|
|
2282
2282
|
if (t) {
|
|
2283
2283
|
const w = Math.ceil(p.touches[0].pageY);
|
|
2284
|
-
let
|
|
2285
|
-
l = w, o(
|
|
2286
|
-
|
|
2284
|
+
let h = l - w;
|
|
2285
|
+
l = w, o(h) && p.preventDefault(), clearInterval(u), u = setInterval(() => {
|
|
2286
|
+
h *= sl, (!o(h, !0) || Math.abs(h) <= 0.1) && clearInterval(u);
|
|
2287
2287
|
}, 16);
|
|
2288
2288
|
}
|
|
2289
|
-
},
|
|
2289
|
+
}, s = () => {
|
|
2290
2290
|
t = !1, a();
|
|
2291
|
-
},
|
|
2291
|
+
}, r = (p) => {
|
|
2292
2292
|
a(), p.touches.length === 1 && !t && (t = !0, l = Math.ceil(p.touches[0].pageY), i = p.target, i.addEventListener("touchmove", f, {
|
|
2293
2293
|
passive: !1
|
|
2294
|
-
}), i.addEventListener("touchend",
|
|
2294
|
+
}), i.addEventListener("touchend", s));
|
|
2295
2295
|
}, m = () => {
|
|
2296
2296
|
};
|
|
2297
|
-
|
|
2297
|
+
xe(() => {
|
|
2298
2298
|
document.addEventListener("touchmove", m, {
|
|
2299
2299
|
passive: !1
|
|
2300
2300
|
}), ie(e, (p) => {
|
|
2301
|
-
n.value.removeEventListener("touchstart",
|
|
2301
|
+
n.value.removeEventListener("touchstart", r), a(), clearInterval(u), p && n.value.addEventListener("touchstart", r, {
|
|
2302
2302
|
passive: !1
|
|
2303
2303
|
});
|
|
2304
2304
|
}, {
|
|
@@ -2324,14 +2324,14 @@ function ml(e, n, o, t, l, i) {
|
|
|
2324
2324
|
getKey: u
|
|
2325
2325
|
} = i;
|
|
2326
2326
|
return e.slice(n, o + 1).map((a, f) => {
|
|
2327
|
-
const
|
|
2327
|
+
const s = n + f, r = l(a, s, {
|
|
2328
2328
|
// style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
|
|
2329
2329
|
}), m = u(a);
|
|
2330
2330
|
return y(mn, {
|
|
2331
2331
|
key: m,
|
|
2332
2332
|
setRef: (p) => t(a, p)
|
|
2333
2333
|
}, {
|
|
2334
|
-
default: () => [
|
|
2334
|
+
default: () => [r]
|
|
2335
2335
|
});
|
|
2336
2336
|
});
|
|
2337
2337
|
}
|
|
@@ -2403,14 +2403,14 @@ const pl = ue({
|
|
|
2403
2403
|
}, {
|
|
2404
2404
|
immediate: !0
|
|
2405
2405
|
});
|
|
2406
|
-
const
|
|
2406
|
+
const s = G(), r = G(), m = G(), p = (g) => f.value(g), w = {
|
|
2407
2407
|
getKey: p
|
|
2408
2408
|
};
|
|
2409
|
-
function
|
|
2409
|
+
function h(g) {
|
|
2410
2410
|
let H;
|
|
2411
2411
|
typeof g == "function" ? H = g(i.scrollTop) : H = g;
|
|
2412
2412
|
const W = T(H);
|
|
2413
|
-
|
|
2413
|
+
s.value && (s.value.scrollTop = W), i.scrollTop = W;
|
|
2414
2414
|
}
|
|
2415
2415
|
const [x, O, I, P] = ll(a, p), D = Ae({
|
|
2416
2416
|
scrollHeight: void 0,
|
|
@@ -2418,15 +2418,15 @@ const pl = ue({
|
|
|
2418
2418
|
end: 0,
|
|
2419
2419
|
offset: void 0
|
|
2420
2420
|
}), C = G(0);
|
|
2421
|
-
|
|
2421
|
+
xe(() => {
|
|
2422
2422
|
_e(() => {
|
|
2423
2423
|
var g;
|
|
2424
|
-
C.value = ((g =
|
|
2424
|
+
C.value = ((g = r.value) === null || g === void 0 ? void 0 : g.offsetHeight) || 0;
|
|
2425
2425
|
});
|
|
2426
2426
|
}), Gn(() => {
|
|
2427
2427
|
_e(() => {
|
|
2428
2428
|
var g;
|
|
2429
|
-
C.value = ((g =
|
|
2429
|
+
C.value = ((g = r.value) === null || g === void 0 ? void 0 : g.offsetHeight) || 0;
|
|
2430
2430
|
});
|
|
2431
2431
|
}), ie([t, a], () => {
|
|
2432
2432
|
t.value || S(D, {
|
|
@@ -2443,7 +2443,7 @@ const pl = ue({
|
|
|
2443
2443
|
start: 0,
|
|
2444
2444
|
end: a.value.length - 1,
|
|
2445
2445
|
offset: void 0
|
|
2446
|
-
}),
|
|
2446
|
+
}), s.value && (i.scrollTop = s.value.scrollTop);
|
|
2447
2447
|
}, {
|
|
2448
2448
|
immediate: !0
|
|
2449
2449
|
}), ie([l, t, () => i.scrollTop, a, P, () => e.height, C], () => {
|
|
@@ -2452,16 +2452,16 @@ const pl = ue({
|
|
|
2452
2452
|
let g = 0, H, W, _;
|
|
2453
2453
|
const te = a.value.length, oe = a.value, ae = i.scrollTop, {
|
|
2454
2454
|
itemHeight: ne,
|
|
2455
|
-
height:
|
|
2456
|
-
} = e,
|
|
2457
|
-
for (let
|
|
2458
|
-
const c = oe[
|
|
2455
|
+
height: me
|
|
2456
|
+
} = e, pe = ae + me;
|
|
2457
|
+
for (let b = 0; b < te; b += 1) {
|
|
2458
|
+
const c = oe[b], d = p(c);
|
|
2459
2459
|
let F = I.get(d);
|
|
2460
2460
|
F === void 0 && (F = ne);
|
|
2461
2461
|
const E = g + F;
|
|
2462
|
-
H === void 0 && E >= ae && (H =
|
|
2462
|
+
H === void 0 && E >= ae && (H = b, W = g), _ === void 0 && E > pe && (_ = b), g = E;
|
|
2463
2463
|
}
|
|
2464
|
-
H === void 0 && (H = 0, W = 0, _ = Math.ceil(
|
|
2464
|
+
H === void 0 && (H = 0, W = 0, _ = Math.ceil(me / ne)), _ === void 0 && (_ = te - 1), _ = Math.min(_ + 1, te), S(D, {
|
|
2465
2465
|
scrollHeight: g,
|
|
2466
2466
|
start: H,
|
|
2467
2467
|
end: _,
|
|
@@ -2477,19 +2477,19 @@ const pl = ue({
|
|
|
2477
2477
|
}
|
|
2478
2478
|
const $ = R(() => i.scrollTop <= 0), N = R(() => i.scrollTop >= v.value), V = pn($, N);
|
|
2479
2479
|
function j(g) {
|
|
2480
|
-
|
|
2480
|
+
h(g);
|
|
2481
2481
|
}
|
|
2482
2482
|
function z(g) {
|
|
2483
2483
|
var H;
|
|
2484
2484
|
const {
|
|
2485
2485
|
scrollTop: W
|
|
2486
2486
|
} = g.currentTarget;
|
|
2487
|
-
W !== i.scrollTop &&
|
|
2487
|
+
W !== i.scrollTop && h(W), (H = e.onScroll) === null || H === void 0 || H.call(e, g);
|
|
2488
2488
|
}
|
|
2489
2489
|
const [Q, X] = rl(t, $, N, (g) => {
|
|
2490
|
-
|
|
2490
|
+
h((H) => H + g);
|
|
2491
2491
|
});
|
|
2492
|
-
ul(t,
|
|
2492
|
+
ul(t, s, (g, H) => V(g, H) ? !1 : (Q({
|
|
2493
2493
|
preventDefault() {
|
|
2494
2494
|
},
|
|
2495
2495
|
deltaY: g
|
|
@@ -2498,20 +2498,20 @@ const pl = ue({
|
|
|
2498
2498
|
t.value && g.preventDefault();
|
|
2499
2499
|
}
|
|
2500
2500
|
const M = () => {
|
|
2501
|
-
|
|
2501
|
+
s.value && (s.value.removeEventListener("wheel", Q, Ce ? {
|
|
2502
2502
|
passive: !1
|
|
2503
|
-
} : !1),
|
|
2503
|
+
} : !1), s.value.removeEventListener("DOMMouseScroll", X), s.value.removeEventListener("MozMousePixelScroll", U));
|
|
2504
2504
|
};
|
|
2505
2505
|
Me(() => {
|
|
2506
2506
|
_e(() => {
|
|
2507
|
-
|
|
2507
|
+
s.value && (M(), s.value.addEventListener("wheel", Q, Ce ? {
|
|
2508
2508
|
passive: !1
|
|
2509
|
-
} : !1),
|
|
2509
|
+
} : !1), s.value.addEventListener("DOMMouseScroll", X), s.value.addEventListener("MozMousePixelScroll", U));
|
|
2510
2510
|
});
|
|
2511
2511
|
}), je(() => {
|
|
2512
2512
|
M();
|
|
2513
2513
|
});
|
|
2514
|
-
const L = il(
|
|
2514
|
+
const L = il(s, a, I, e, p, O, h, () => {
|
|
2515
2515
|
var g;
|
|
2516
2516
|
(g = m.value) === null || g === void 0 || g.delayHidden();
|
|
2517
2517
|
});
|
|
@@ -2537,14 +2537,14 @@ const pl = ue({
|
|
|
2537
2537
|
componentStyle: k,
|
|
2538
2538
|
onFallbackScroll: z,
|
|
2539
2539
|
onScrollBar: j,
|
|
2540
|
-
componentRef:
|
|
2540
|
+
componentRef: s,
|
|
2541
2541
|
useVirtual: t,
|
|
2542
2542
|
calRes: D,
|
|
2543
2543
|
collectHeight: O,
|
|
2544
2544
|
setInstance: x,
|
|
2545
2545
|
sharedConfig: w,
|
|
2546
2546
|
scrollBarRef: m,
|
|
2547
|
-
fillerInnerRef:
|
|
2547
|
+
fillerInnerRef: r,
|
|
2548
2548
|
delayHideScrollBar: () => {
|
|
2549
2549
|
var g;
|
|
2550
2550
|
(g = m.value) === null || g === void 0 || g.delayHidden();
|
|
@@ -2562,11 +2562,11 @@ const pl = ue({
|
|
|
2562
2562
|
itemKey: u,
|
|
2563
2563
|
virtual: a,
|
|
2564
2564
|
component: f = "div",
|
|
2565
|
-
onScroll:
|
|
2566
|
-
children:
|
|
2565
|
+
onScroll: s,
|
|
2566
|
+
children: r = this.$slots.default,
|
|
2567
2567
|
style: m,
|
|
2568
2568
|
class: p
|
|
2569
|
-
} = e, w = cl(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]),
|
|
2569
|
+
} = e, w = cl(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), h = se(n, p), {
|
|
2570
2570
|
scrollTop: x
|
|
2571
2571
|
} = this.state, {
|
|
2572
2572
|
scrollHeight: O,
|
|
@@ -2588,7 +2588,7 @@ const pl = ue({
|
|
|
2588
2588
|
style: S(S({}, m), {
|
|
2589
2589
|
position: "relative"
|
|
2590
2590
|
}),
|
|
2591
|
-
class:
|
|
2591
|
+
class: h
|
|
2592
2592
|
}, w), [y(f, {
|
|
2593
2593
|
class: `${n}-holder`,
|
|
2594
2594
|
style: C,
|
|
@@ -2603,7 +2603,7 @@ const pl = ue({
|
|
|
2603
2603
|
onInnerResize: N,
|
|
2604
2604
|
ref: "fillerInnerRef"
|
|
2605
2605
|
}, {
|
|
2606
|
-
default: () => ml(z, P, D, j,
|
|
2606
|
+
default: () => ml(z, P, D, j, r, V)
|
|
2607
2607
|
})]
|
|
2608
2608
|
}), $ && y(ol, {
|
|
2609
2609
|
ref: "scrollBarRef",
|
|
@@ -2659,9 +2659,9 @@ const Sl = ue({
|
|
|
2659
2659
|
expose: o,
|
|
2660
2660
|
slots: t
|
|
2661
2661
|
} = n;
|
|
2662
|
-
const l = ko(), i = bl(), u = R(() => `${l.prefixCls}-item`), a = vl(() => i.flattenOptions, [() => l.open, () => i.flattenOptions], (v) => v[0]), f = Ke(),
|
|
2662
|
+
const l = ko(), i = bl(), u = R(() => `${l.prefixCls}-item`), a = vl(() => i.flattenOptions, [() => l.open, () => i.flattenOptions], (v) => v[0]), f = Ke(), s = (v) => {
|
|
2663
2663
|
v.preventDefault();
|
|
2664
|
-
},
|
|
2664
|
+
}, r = (v) => {
|
|
2665
2665
|
f.current && f.current.scrollTo(typeof v == "number" ? {
|
|
2666
2666
|
index: v
|
|
2667
2667
|
} : v);
|
|
@@ -2696,7 +2696,7 @@ const Sl = ue({
|
|
|
2696
2696
|
}, {
|
|
2697
2697
|
immediate: !0
|
|
2698
2698
|
});
|
|
2699
|
-
const
|
|
2699
|
+
const h = (v) => i.rawValues.has(v) && l.mode !== "combobox";
|
|
2700
2700
|
ie([() => l.open, () => l.searchValue], () => {
|
|
2701
2701
|
if (!l.multiple && l.open && i.rawValues.size === 1) {
|
|
2702
2702
|
const v = Array.from(i.rawValues)[0], T = pt(a.value).findIndex(($) => {
|
|
@@ -2706,7 +2706,7 @@ const Sl = ue({
|
|
|
2706
2706
|
return N[i.fieldNames.value] === v;
|
|
2707
2707
|
});
|
|
2708
2708
|
T !== -1 && (w(T), _e(() => {
|
|
2709
|
-
|
|
2709
|
+
r(T);
|
|
2710
2710
|
}));
|
|
2711
2711
|
}
|
|
2712
2712
|
l.open && _e(() => {
|
|
@@ -2736,7 +2736,7 @@ const Sl = ue({
|
|
|
2736
2736
|
key: v,
|
|
2737
2737
|
role: V ? "presentation" : "option",
|
|
2738
2738
|
id: `${l.id}_list_${v}`,
|
|
2739
|
-
"aria-selected":
|
|
2739
|
+
"aria-selected": h(N)
|
|
2740
2740
|
}), [N]) : null;
|
|
2741
2741
|
}
|
|
2742
2742
|
return o({
|
|
@@ -2753,7 +2753,7 @@ const Sl = ue({
|
|
|
2753
2753
|
let N = 0;
|
|
2754
2754
|
if (T === K.UP ? N = -1 : T === K.DOWN ? N = 1 : gl() && $ && (T === K.N ? N = 1 : T === K.P && (N = -1)), N !== 0) {
|
|
2755
2755
|
const V = m(p.activeIndex + N, N);
|
|
2756
|
-
|
|
2756
|
+
r(V), w(V, !0);
|
|
2757
2757
|
}
|
|
2758
2758
|
break;
|
|
2759
2759
|
}
|
|
@@ -2769,7 +2769,7 @@ const Sl = ue({
|
|
|
2769
2769
|
onKeyup: () => {
|
|
2770
2770
|
},
|
|
2771
2771
|
scrollTo: (v) => {
|
|
2772
|
-
|
|
2772
|
+
r(v);
|
|
2773
2773
|
}
|
|
2774
2774
|
}), () => {
|
|
2775
2775
|
const {
|
|
@@ -2789,7 +2789,7 @@ const Sl = ue({
|
|
|
2789
2789
|
role: "listbox",
|
|
2790
2790
|
id: `${v}_list`,
|
|
2791
2791
|
class: `${u.value}-empty`,
|
|
2792
|
-
onMousedown:
|
|
2792
|
+
onMousedown: s
|
|
2793
2793
|
}, [T]) : y(Be, null, [y("div", {
|
|
2794
2794
|
role: "listbox",
|
|
2795
2795
|
id: `${v}_list`,
|
|
@@ -2805,7 +2805,7 @@ const Sl = ue({
|
|
|
2805
2805
|
height: z,
|
|
2806
2806
|
itemHeight: Q,
|
|
2807
2807
|
fullHeight: !1,
|
|
2808
|
-
onMousedown:
|
|
2808
|
+
onMousedown: s,
|
|
2809
2809
|
onScroll: $,
|
|
2810
2810
|
virtual: j
|
|
2811
2811
|
}, {
|
|
@@ -2829,11 +2829,11 @@ const Sl = ue({
|
|
|
2829
2829
|
const {
|
|
2830
2830
|
disabled: ae,
|
|
2831
2831
|
title: ne,
|
|
2832
|
-
children:
|
|
2833
|
-
style:
|
|
2834
|
-
class:
|
|
2832
|
+
children: me,
|
|
2833
|
+
style: pe,
|
|
2834
|
+
class: b,
|
|
2835
2835
|
className: c
|
|
2836
|
-
} = W, d = yl(W, ["disabled", "title", "children", "style", "class", "className"]), F = Qe(d, M), E =
|
|
2836
|
+
} = W, d = yl(W, ["disabled", "title", "children", "style", "class", "className"]), F = Qe(d, M), E = h(_), B = `${u.value}-option`, q = se(u.value, B, b, c, {
|
|
2837
2837
|
[`${B}-grouped`]: H,
|
|
2838
2838
|
[`${B}-active`]: U === k && !ae,
|
|
2839
2839
|
[`${B}-disabled`]: ae,
|
|
@@ -2850,7 +2850,7 @@ const Sl = ue({
|
|
|
2850
2850
|
onClick: (de) => {
|
|
2851
2851
|
ae || x(_), d.onClick && d.onClick(de);
|
|
2852
2852
|
},
|
|
2853
|
-
style:
|
|
2853
|
+
style: pe
|
|
2854
2854
|
}), [y("div", {
|
|
2855
2855
|
class: `${B}-content`
|
|
2856
2856
|
}, [X ? X(W) : Z]), ze(N) || E, le && y(Pe, {
|
|
@@ -2901,16 +2901,16 @@ function It(e) {
|
|
|
2901
2901
|
},
|
|
2902
2902
|
key: a,
|
|
2903
2903
|
children: f,
|
|
2904
|
-
props:
|
|
2904
|
+
props: s
|
|
2905
2905
|
} = t;
|
|
2906
2906
|
if (n || !u)
|
|
2907
2907
|
return Il(t);
|
|
2908
|
-
const
|
|
2908
|
+
const r = f && f.default ? f.default() : void 0, m = (s == null ? void 0 : s.label) || ((i = f.label) === null || i === void 0 ? void 0 : i.call(f)) || a;
|
|
2909
2909
|
return S(S({
|
|
2910
2910
|
key: `__RC_SELECT_GRP__${a === null ? l : String(a)}__`
|
|
2911
|
-
},
|
|
2911
|
+
}, s), {
|
|
2912
2912
|
label: m,
|
|
2913
|
-
options: It(
|
|
2913
|
+
options: It(r || [])
|
|
2914
2914
|
});
|
|
2915
2915
|
}).filter((t) => t);
|
|
2916
2916
|
}
|
|
@@ -2922,15 +2922,15 @@ function Cl(e, n, o) {
|
|
|
2922
2922
|
immediate: !0,
|
|
2923
2923
|
deep: !0
|
|
2924
2924
|
}), Me(() => {
|
|
2925
|
-
const a = u.value, f = /* @__PURE__ */ new Map(),
|
|
2925
|
+
const a = u.value, f = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), r = o.value;
|
|
2926
2926
|
function m(p) {
|
|
2927
2927
|
let w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2928
|
-
for (let
|
|
2929
|
-
const x = p[
|
|
2930
|
-
!x[
|
|
2928
|
+
for (let h = 0; h < p.length; h += 1) {
|
|
2929
|
+
const x = p[h];
|
|
2930
|
+
!x[r.options] || w ? (f.set(x[r.value], x), s.set(x[r.label], x)) : m(x[r.options], !0);
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
|
-
m(a), t.value = a, l.value = f, i.value =
|
|
2933
|
+
m(a), t.value = a, l.value = f, i.value = s;
|
|
2934
2934
|
}), {
|
|
2935
2935
|
options: t,
|
|
2936
2936
|
valueOptions: l,
|
|
@@ -2963,15 +2963,15 @@ function El(e) {
|
|
|
2963
2963
|
placeholder: u,
|
|
2964
2964
|
getInputElement: a,
|
|
2965
2965
|
showSearch: f,
|
|
2966
|
-
onSearch:
|
|
2967
|
-
defaultOpen:
|
|
2966
|
+
onSearch: s,
|
|
2967
|
+
defaultOpen: r,
|
|
2968
2968
|
autofocus: m,
|
|
2969
2969
|
labelInValue: p,
|
|
2970
2970
|
value: w,
|
|
2971
|
-
inputValue:
|
|
2971
|
+
inputValue: h,
|
|
2972
2972
|
optionLabelProp: x
|
|
2973
2973
|
} = e, O = wt(n), I = f !== void 0 ? f : O || n === "combobox", P = o || It(t);
|
|
2974
|
-
if (ye(n !== "tags" || P.every((D) => !D.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), ye(n !== "combobox" || !x, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), ye(n === "combobox" || !l, "`backfill` only works with `combobox` mode."), ye(n === "combobox" || !a, "`getInputElement` only work with `combobox` mode."), Vt(n !== "combobox" || !a || !i || !u, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),
|
|
2974
|
+
if (ye(n !== "tags" || P.every((D) => !D.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), ye(n !== "combobox" || !x, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), ye(n === "combobox" || !l, "`backfill` only works with `combobox` mode."), ye(n === "combobox" || !a, "`getInputElement` only work with `combobox` mode."), Vt(n !== "combobox" || !a || !i || !u, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), s && !I && n !== "combobox" && n !== "tags" && ye(!1, "`onSearch` should work with `showSearch` instead of use alone."), Vt(!r || m, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), w != null) {
|
|
2975
2975
|
const D = Ct(w);
|
|
2976
2976
|
ye(!p || D.every((C) => typeof C == "object" && ("key" in C || "value" in C)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), ye(!O || Array.isArray(w), "`value` should be array when `mode` is `multiple` or `tags`");
|
|
2977
2977
|
}
|
|
@@ -2985,7 +2985,7 @@ function El(e) {
|
|
|
2985
2985
|
type: T
|
|
2986
2986
|
} = C;
|
|
2987
2987
|
return T.isSelectOption ? !1 : T.isSelectOptGroup ? !(((v = C.children) === null || v === void 0 ? void 0 : v.default()) || []).every((V) => !ze(V) || !C.type || V.type.isSelectOption ? !0 : (D = V.type, !1)) : (D = T, !0);
|
|
2988
|
-
}), D && ye(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${D.displayName || D.name || D}\`.`), ye(
|
|
2988
|
+
}), D && ye(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${D.displayName || D.name || D}\`.`), ye(h === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
|
|
2989
2989
|
}
|
|
2990
2990
|
}
|
|
2991
2991
|
function rt(e, n) {
|
|
@@ -2997,22 +2997,22 @@ const Ml = (e, n, o, t, l) => R(() => {
|
|
|
2997
2997
|
return e.value;
|
|
2998
2998
|
const {
|
|
2999
2999
|
options: f,
|
|
3000
|
-
label:
|
|
3001
|
-
value:
|
|
3002
|
-
} = n.value, m = [], p = typeof a == "function", w = i.toUpperCase(),
|
|
3000
|
+
label: s,
|
|
3001
|
+
value: r
|
|
3002
|
+
} = n.value, m = [], p = typeof a == "function", w = i.toUpperCase(), h = p ? a : (O, I) => u ? rt(I[u], w) : I[f] ? rt(I[s !== "children" ? s : "label"], w) : rt(I[r], w), x = p ? (O) => ft(O) : (O) => O;
|
|
3003
3003
|
return e.value.forEach((O) => {
|
|
3004
3004
|
if (O[f]) {
|
|
3005
|
-
if (
|
|
3005
|
+
if (h(i, x(O)))
|
|
3006
3006
|
m.push(O);
|
|
3007
3007
|
else {
|
|
3008
|
-
const P = O[f].filter((D) =>
|
|
3008
|
+
const P = O[f].filter((D) => h(i, x(D)));
|
|
3009
3009
|
P.length && m.push(S(S({}, O), {
|
|
3010
3010
|
[f]: P
|
|
3011
3011
|
}));
|
|
3012
3012
|
}
|
|
3013
3013
|
return;
|
|
3014
3014
|
}
|
|
3015
|
-
|
|
3015
|
+
h(i, x(O)) && m.push(O);
|
|
3016
3016
|
}), m;
|
|
3017
3017
|
}), Pl = (e, n) => {
|
|
3018
3018
|
const o = G({
|
|
@@ -3023,15 +3023,15 @@ const Ml = (e, n, o, t, l) => R(() => {
|
|
|
3023
3023
|
const {
|
|
3024
3024
|
values: i,
|
|
3025
3025
|
options: u
|
|
3026
|
-
} = o.value, a = e.value.map((
|
|
3026
|
+
} = o.value, a = e.value.map((r) => {
|
|
3027
3027
|
var m;
|
|
3028
|
-
return
|
|
3029
|
-
label: (m = i.get(
|
|
3030
|
-
}) :
|
|
3031
|
-
}), f = /* @__PURE__ */ new Map(),
|
|
3032
|
-
return a.forEach((
|
|
3033
|
-
f.set(
|
|
3034
|
-
}), o.value.values = f, o.value.options =
|
|
3028
|
+
return r.label === void 0 ? S(S({}, r), {
|
|
3029
|
+
label: (m = i.get(r.value)) === null || m === void 0 ? void 0 : m.label
|
|
3030
|
+
}) : r;
|
|
3031
|
+
}), f = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
3032
|
+
return a.forEach((r) => {
|
|
3033
|
+
f.set(r.value, r), s.set(r.value, n.value.get(r.value) || u.get(r.value));
|
|
3034
|
+
}), o.value.values = f, o.value.options = s, a;
|
|
3035
3035
|
}), (i) => n.value.get(i) || o.value.options.get(i)];
|
|
3036
3036
|
}, Rl = ["inputValue"];
|
|
3037
3037
|
function gn() {
|
|
@@ -3115,19 +3115,19 @@ const Fl = ue({
|
|
|
3115
3115
|
attrs: t,
|
|
3116
3116
|
slots: l
|
|
3117
3117
|
} = n;
|
|
3118
|
-
const i = $l(
|
|
3118
|
+
const i = $l(Ie(e, "id")), u = R(() => wt(e.mode)), a = R(() => !!(!e.options && e.children)), f = R(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), s = R(() => on(e.fieldNames, a.value)), [r, m] = Lt("", {
|
|
3119
3119
|
value: R(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
|
|
3120
|
-
postState: (
|
|
3121
|
-
}), p = Cl(
|
|
3120
|
+
postState: (b) => b || ""
|
|
3121
|
+
}), p = Cl(Ie(e, "options"), Ie(e, "children"), s), {
|
|
3122
3122
|
valueOptions: w,
|
|
3123
|
-
labelOptions:
|
|
3123
|
+
labelOptions: h,
|
|
3124
3124
|
options: x
|
|
3125
|
-
} = p, O = (
|
|
3125
|
+
} = p, O = (b) => Ct(b).map((d) => {
|
|
3126
3126
|
var F, E;
|
|
3127
3127
|
let B, q, J, le;
|
|
3128
3128
|
Dl(d) ? B = d : (J = d.key, q = d.label, B = (F = d.value) !== null && F !== void 0 ? F : J);
|
|
3129
3129
|
const Z = w.value.get(B);
|
|
3130
|
-
return Z && (q === void 0 && (q = Z == null ? void 0 : Z[e.optionLabelProp ||
|
|
3130
|
+
return Z && (q === void 0 && (q = Z == null ? void 0 : Z[e.optionLabelProp || s.value.label]), J === void 0 && (J = (E = Z == null ? void 0 : Z.key) !== null && E !== void 0 ? E : B), le = Z == null ? void 0 : Z.disabled), {
|
|
3131
3131
|
label: q,
|
|
3132
3132
|
value: B,
|
|
3133
3133
|
key: J,
|
|
@@ -3135,38 +3135,38 @@ const Fl = ue({
|
|
|
3135
3135
|
option: Z
|
|
3136
3136
|
};
|
|
3137
3137
|
}), [I, P] = Lt(e.defaultValue, {
|
|
3138
|
-
value:
|
|
3138
|
+
value: Ie(e, "value")
|
|
3139
3139
|
}), D = R(() => {
|
|
3140
|
-
var
|
|
3140
|
+
var b;
|
|
3141
3141
|
const c = O(I.value);
|
|
3142
|
-
return e.mode === "combobox" && !(!((
|
|
3142
|
+
return e.mode === "combobox" && !(!((b = c[0]) === null || b === void 0) && b.value) ? [] : c;
|
|
3143
3143
|
}), [C, v] = Pl(D, w), T = R(() => {
|
|
3144
3144
|
if (!e.mode && C.value.length === 1) {
|
|
3145
|
-
const
|
|
3146
|
-
if (
|
|
3145
|
+
const b = C.value[0];
|
|
3146
|
+
if (b.value === null && (b.label === null || b.label === void 0))
|
|
3147
3147
|
return [];
|
|
3148
3148
|
}
|
|
3149
|
-
return C.value.map((
|
|
3149
|
+
return C.value.map((b) => {
|
|
3150
3150
|
var c;
|
|
3151
|
-
return S(S({},
|
|
3152
|
-
label: (c = typeof
|
|
3151
|
+
return S(S({}, b), {
|
|
3152
|
+
label: (c = typeof b.label == "function" ? b.label() : b.label) !== null && c !== void 0 ? c : b.value
|
|
3153
3153
|
});
|
|
3154
3154
|
});
|
|
3155
|
-
}), $ = R(() => new Set(C.value.map((
|
|
3155
|
+
}), $ = R(() => new Set(C.value.map((b) => b.value)));
|
|
3156
3156
|
Me(() => {
|
|
3157
|
-
var
|
|
3157
|
+
var b;
|
|
3158
3158
|
if (e.mode === "combobox") {
|
|
3159
|
-
const c = (
|
|
3159
|
+
const c = (b = C.value[0]) === null || b === void 0 ? void 0 : b.value;
|
|
3160
3160
|
c != null && m(String(c));
|
|
3161
3161
|
}
|
|
3162
3162
|
}, {
|
|
3163
3163
|
flush: "post"
|
|
3164
3164
|
});
|
|
3165
|
-
const N = (
|
|
3166
|
-
const d = c ??
|
|
3165
|
+
const N = (b, c) => {
|
|
3166
|
+
const d = c ?? b;
|
|
3167
3167
|
return {
|
|
3168
|
-
[
|
|
3169
|
-
[
|
|
3168
|
+
[s.value.value]: b,
|
|
3169
|
+
[s.value.label]: d
|
|
3170
3170
|
};
|
|
3171
3171
|
}, V = G();
|
|
3172
3172
|
Me(() => {
|
|
@@ -3174,17 +3174,17 @@ const Fl = ue({
|
|
|
3174
3174
|
V.value = x.value;
|
|
3175
3175
|
return;
|
|
3176
3176
|
}
|
|
3177
|
-
const
|
|
3177
|
+
const b = x.value.slice(), c = (d) => w.value.has(d);
|
|
3178
3178
|
[...C.value].sort((d, F) => d.value < F.value ? -1 : 1).forEach((d) => {
|
|
3179
3179
|
const F = d.value;
|
|
3180
|
-
c(F) ||
|
|
3181
|
-
}), V.value =
|
|
3180
|
+
c(F) || b.push(N(F, d.label));
|
|
3181
|
+
}), V.value = b;
|
|
3182
3182
|
});
|
|
3183
|
-
const j = Ml(V,
|
|
3184
|
-
fieldNames:
|
|
3183
|
+
const j = Ml(V, s, r, f, Ie(e, "optionFilterProp")), z = R(() => e.mode !== "tags" || !r.value || j.value.some((b) => b[e.optionFilterProp || "value"] === r.value) ? j.value : [N(r.value), ...j.value]), Q = R(() => e.filterSort ? [...z.value].sort((b, c) => e.filterSort(b, c)) : z.value), X = R(() => Eo(Q.value, {
|
|
3184
|
+
fieldNames: s.value,
|
|
3185
3185
|
childrenAsData: a.value
|
|
3186
|
-
})), U = (
|
|
3187
|
-
const c = O(
|
|
3186
|
+
})), U = (b) => {
|
|
3187
|
+
const c = O(b);
|
|
3188
3188
|
if (P(c), e.onChange && // Trigger event only when value changed
|
|
3189
3189
|
(c.length !== C.value.length || c.some((d, F) => {
|
|
3190
3190
|
var E;
|
|
@@ -3201,21 +3201,21 @@ const Fl = ue({
|
|
|
3201
3201
|
u.value ? F : F[0]
|
|
3202
3202
|
);
|
|
3203
3203
|
}
|
|
3204
|
-
}, [M, L] = Ht(null), [k, ee] = Ht(0), g = R(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), H = function(
|
|
3204
|
+
}, [M, L] = Ht(null), [k, ee] = Ht(0), g = R(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), H = function(b, c) {
|
|
3205
3205
|
let {
|
|
3206
3206
|
source: d = "keyboard"
|
|
3207
3207
|
} = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3208
|
-
ee(c), e.backfill && e.mode === "combobox" &&
|
|
3209
|
-
}, W = (
|
|
3208
|
+
ee(c), e.backfill && e.mode === "combobox" && b !== null && d === "keyboard" && L(String(b));
|
|
3209
|
+
}, W = (b, c) => {
|
|
3210
3210
|
const d = () => {
|
|
3211
3211
|
var F;
|
|
3212
|
-
const E = v(
|
|
3212
|
+
const E = v(b), B = E == null ? void 0 : E[s.value.label];
|
|
3213
3213
|
return [e.labelInValue ? {
|
|
3214
3214
|
label: typeof B == "function" ? B() : B,
|
|
3215
3215
|
originLabel: B,
|
|
3216
|
-
value:
|
|
3217
|
-
key: (F = E == null ? void 0 : E.key) !== null && F !== void 0 ? F :
|
|
3218
|
-
} :
|
|
3216
|
+
value: b,
|
|
3217
|
+
key: (F = E == null ? void 0 : E.key) !== null && F !== void 0 ? F : b
|
|
3218
|
+
} : b, ft(E)];
|
|
3219
3219
|
};
|
|
3220
3220
|
if (c && e.onSelect) {
|
|
3221
3221
|
const [F, E] = d();
|
|
@@ -3224,29 +3224,29 @@ const Fl = ue({
|
|
|
3224
3224
|
const [F, E] = d();
|
|
3225
3225
|
e.onDeselect(F, E);
|
|
3226
3226
|
}
|
|
3227
|
-
}, _ = (
|
|
3227
|
+
}, _ = (b, c) => {
|
|
3228
3228
|
let d;
|
|
3229
3229
|
const F = u.value ? c.selected : !0;
|
|
3230
|
-
F ? d = u.value ? [...C.value,
|
|
3231
|
-
}, te = (
|
|
3232
|
-
U(
|
|
3230
|
+
F ? d = u.value ? [...C.value, b] : [b] : d = C.value.filter((E) => E.value !== b), U(d), W(b, F), e.mode === "combobox" ? L("") : (!u.value || e.autoClearSearchValue) && (m(""), L(""));
|
|
3231
|
+
}, te = (b, c) => {
|
|
3232
|
+
U(b), (c.type === "remove" || c.type === "clear") && c.values.forEach((d) => {
|
|
3233
3233
|
W(d.value, !1);
|
|
3234
3234
|
});
|
|
3235
|
-
}, oe = (
|
|
3235
|
+
}, oe = (b, c) => {
|
|
3236
3236
|
var d;
|
|
3237
|
-
if (m(
|
|
3238
|
-
const F = (
|
|
3237
|
+
if (m(b), L(null), c.source === "submit") {
|
|
3238
|
+
const F = (b || "").trim();
|
|
3239
3239
|
if (F) {
|
|
3240
3240
|
const E = Array.from(/* @__PURE__ */ new Set([...$.value, F]));
|
|
3241
3241
|
U(E), W(F, !0), m("");
|
|
3242
3242
|
}
|
|
3243
3243
|
return;
|
|
3244
3244
|
}
|
|
3245
|
-
c.source !== "blur" && (e.mode === "combobox" && U(
|
|
3246
|
-
}, ae = (
|
|
3247
|
-
let c =
|
|
3248
|
-
e.mode !== "tags" && (c =
|
|
3249
|
-
const E =
|
|
3245
|
+
c.source !== "blur" && (e.mode === "combobox" && U(b), (d = e.onSearch) === null || d === void 0 || d.call(e, b));
|
|
3246
|
+
}, ae = (b) => {
|
|
3247
|
+
let c = b;
|
|
3248
|
+
e.mode !== "tags" && (c = b.map((F) => {
|
|
3249
|
+
const E = h.value.get(F);
|
|
3250
3250
|
return E == null ? void 0 : E.value;
|
|
3251
3251
|
}).filter((F) => F !== void 0));
|
|
3252
3252
|
const d = Array.from(/* @__PURE__ */ new Set([...$.value, ...c]));
|
|
@@ -3259,34 +3259,34 @@ const Fl = ue({
|
|
|
3259
3259
|
onActiveValue: H,
|
|
3260
3260
|
defaultActiveFirstOption: g,
|
|
3261
3261
|
onSelect: _,
|
|
3262
|
-
menuItemSelectedIcon:
|
|
3262
|
+
menuItemSelectedIcon: Ie(e, "menuItemSelectedIcon"),
|
|
3263
3263
|
rawValues: $,
|
|
3264
|
-
fieldNames:
|
|
3264
|
+
fieldNames: s,
|
|
3265
3265
|
virtual: ne,
|
|
3266
|
-
listHeight:
|
|
3267
|
-
listItemHeight:
|
|
3266
|
+
listHeight: Ie(e, "listHeight"),
|
|
3267
|
+
listItemHeight: Ie(e, "listItemHeight"),
|
|
3268
3268
|
childrenAsData: a
|
|
3269
3269
|
}))), process.env.NODE_ENV !== "production" && Me(() => {
|
|
3270
3270
|
El(e);
|
|
3271
3271
|
}, {
|
|
3272
3272
|
flush: "post"
|
|
3273
3273
|
});
|
|
3274
|
-
const
|
|
3274
|
+
const me = ve();
|
|
3275
3275
|
o({
|
|
3276
3276
|
focus() {
|
|
3277
|
-
var
|
|
3278
|
-
(
|
|
3277
|
+
var b;
|
|
3278
|
+
(b = me.value) === null || b === void 0 || b.focus();
|
|
3279
3279
|
},
|
|
3280
3280
|
blur() {
|
|
3281
|
-
var
|
|
3282
|
-
(
|
|
3281
|
+
var b;
|
|
3282
|
+
(b = me.value) === null || b === void 0 || b.blur();
|
|
3283
3283
|
},
|
|
3284
|
-
scrollTo(
|
|
3284
|
+
scrollTo(b) {
|
|
3285
3285
|
var c;
|
|
3286
|
-
(c =
|
|
3286
|
+
(c = me.value) === null || c === void 0 || c.scrollTo(b);
|
|
3287
3287
|
}
|
|
3288
3288
|
});
|
|
3289
|
-
const
|
|
3289
|
+
const pe = R(() => Qe(e, [
|
|
3290
3290
|
"id",
|
|
3291
3291
|
"mode",
|
|
3292
3292
|
"prefixCls",
|
|
@@ -3319,15 +3319,15 @@ const Fl = ue({
|
|
|
3319
3319
|
"labelInValue",
|
|
3320
3320
|
"onChange"
|
|
3321
3321
|
]));
|
|
3322
|
-
return () => y(tl, Y(Y(Y({},
|
|
3322
|
+
return () => y(tl, Y(Y(Y({}, pe.value), t), {}, {
|
|
3323
3323
|
id: i,
|
|
3324
3324
|
prefixCls: e.prefixCls,
|
|
3325
|
-
ref:
|
|
3325
|
+
ref: me,
|
|
3326
3326
|
omitDomProps: Rl,
|
|
3327
3327
|
mode: e.mode,
|
|
3328
3328
|
displayValues: T.value,
|
|
3329
3329
|
onDisplayValuesChange: te,
|
|
3330
|
-
searchValue:
|
|
3330
|
+
searchValue: r.value,
|
|
3331
3331
|
onSearch: oe,
|
|
3332
3332
|
onSearchSplit: ae,
|
|
3333
3333
|
dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
|
|
@@ -3375,17 +3375,17 @@ function Vl(e) {
|
|
|
3375
3375
|
hasFeedback: i,
|
|
3376
3376
|
feedbackIcon: u,
|
|
3377
3377
|
showArrow: a
|
|
3378
|
-
} = e, f = e.suffixIcon || n.suffixIcon && n.suffixIcon(),
|
|
3379
|
-
let
|
|
3378
|
+
} = e, f = e.suffixIcon || n.suffixIcon && n.suffixIcon(), s = e.clearIcon || n.clearIcon && n.clearIcon(), r = e.menuItemSelectedIcon || n.menuItemSelectedIcon && n.menuItemSelectedIcon(), m = e.removeIcon || n.removeIcon && n.removeIcon(), p = s ?? y(oo, null, null), w = (I) => y(Be, null, [a !== !1 && I, i && u]);
|
|
3379
|
+
let h = null;
|
|
3380
3380
|
if (f !== void 0)
|
|
3381
|
-
|
|
3381
|
+
h = w(f);
|
|
3382
3382
|
else if (o)
|
|
3383
|
-
|
|
3383
|
+
h = w(y(lo, {
|
|
3384
3384
|
spin: !0
|
|
3385
3385
|
}, null));
|
|
3386
3386
|
else {
|
|
3387
3387
|
const I = `${l}-suffix`;
|
|
3388
|
-
|
|
3388
|
+
h = (P) => {
|
|
3389
3389
|
let {
|
|
3390
3390
|
open: D,
|
|
3391
3391
|
showSearch: C
|
|
@@ -3398,11 +3398,11 @@ function Vl(e) {
|
|
|
3398
3398
|
};
|
|
3399
3399
|
}
|
|
3400
3400
|
let x = null;
|
|
3401
|
-
|
|
3401
|
+
r !== void 0 ? x = r : t ? x = y(io, null, null) : x = null;
|
|
3402
3402
|
let O = null;
|
|
3403
3403
|
return m !== void 0 ? O = m : O = y(ao, null, null), {
|
|
3404
3404
|
clearIcon: p,
|
|
3405
|
-
suffixIcon:
|
|
3405
|
+
suffixIcon: h,
|
|
3406
3406
|
itemIcon: x,
|
|
3407
3407
|
removeIcon: O
|
|
3408
3408
|
};
|
|
@@ -3937,7 +3937,7 @@ function st(e, n) {
|
|
|
3937
3937
|
function Jl(e) {
|
|
3938
3938
|
const {
|
|
3939
3939
|
componentCls: n
|
|
3940
|
-
} = e, o =
|
|
3940
|
+
} = e, o = Oe(e, {
|
|
3941
3941
|
controlHeight: e.controlHeightSM,
|
|
3942
3942
|
controlHeightSM: e.controlHeightXS,
|
|
3943
3943
|
borderRadius: e.borderRadiusSM,
|
|
@@ -3963,7 +3963,7 @@ function Jl(e) {
|
|
|
3963
3963
|
},
|
|
3964
3964
|
// ======================== Large ========================
|
|
3965
3965
|
// Shared
|
|
3966
|
-
st(
|
|
3966
|
+
st(Oe(e, {
|
|
3967
3967
|
fontSize: e.fontSizeLG,
|
|
3968
3968
|
controlHeight: e.controlHeightLG,
|
|
3969
3969
|
controlHeightSM: e.controlHeight,
|
|
@@ -4086,7 +4086,7 @@ function Zl(e) {
|
|
|
4086
4086
|
ut(e),
|
|
4087
4087
|
// ======================== Small ========================
|
|
4088
4088
|
// Shared
|
|
4089
|
-
ut(
|
|
4089
|
+
ut(Oe(e, {
|
|
4090
4090
|
controlHeight: e.controlHeightSM,
|
|
4091
4091
|
borderRadius: e.borderRadiusSM
|
|
4092
4092
|
}), "sm"),
|
|
@@ -4116,7 +4116,7 @@ function Zl(e) {
|
|
|
4116
4116
|
},
|
|
4117
4117
|
// ======================== Large ========================
|
|
4118
4118
|
// Shared
|
|
4119
|
-
ut(
|
|
4119
|
+
ut(Oe(e, {
|
|
4120
4120
|
controlHeight: e.controlHeightLG,
|
|
4121
4121
|
fontSize: e.fontSizeLG,
|
|
4122
4122
|
borderRadius: e.borderRadiusLG
|
|
@@ -4342,15 +4342,15 @@ const ei = (e) => {
|
|
|
4342
4342
|
// =====================================================
|
|
4343
4343
|
// == Status ==
|
|
4344
4344
|
// =====================================================
|
|
4345
|
-
ct(n,
|
|
4345
|
+
ct(n, Oe(e, {
|
|
4346
4346
|
borderHoverColor: e.colorPrimaryHover,
|
|
4347
4347
|
outlineColor: e.controlOutline
|
|
4348
4348
|
})),
|
|
4349
|
-
ct(`${n}-status-error`,
|
|
4349
|
+
ct(`${n}-status-error`, Oe(e, {
|
|
4350
4350
|
borderHoverColor: e.colorErrorHover,
|
|
4351
4351
|
outlineColor: e.colorErrorOutline
|
|
4352
4352
|
}), !0),
|
|
4353
|
-
ct(`${n}-status-warning`,
|
|
4353
|
+
ct(`${n}-status-warning`, Oe(e, {
|
|
4354
4354
|
borderHoverColor: e.colorWarningHover,
|
|
4355
4355
|
outlineColor: e.colorWarningOutline
|
|
4356
4356
|
}), !0),
|
|
@@ -4366,7 +4366,7 @@ const ei = (e) => {
|
|
|
4366
4366
|
let {
|
|
4367
4367
|
rootPrefixCls: o
|
|
4368
4368
|
} = n;
|
|
4369
|
-
const t =
|
|
4369
|
+
const t = Oe(e, {
|
|
4370
4370
|
rootPrefixCls: o,
|
|
4371
4371
|
inputPaddingHorizontalBase: e.paddingSM - 1
|
|
4372
4372
|
});
|
|
@@ -4411,7 +4411,7 @@ const ei = (e) => {
|
|
|
4411
4411
|
slots: l,
|
|
4412
4412
|
expose: i
|
|
4413
4413
|
} = n;
|
|
4414
|
-
const u = ve(), a = uo(), f = co.useInject(),
|
|
4414
|
+
const u = ve(), a = uo(), f = co.useInject(), s = R(() => fo(f.status, e.status)), r = () => {
|
|
4415
4415
|
var _;
|
|
4416
4416
|
(_ = u.value) === null || _ === void 0 || _.focus();
|
|
4417
4417
|
}, m = () => {
|
|
@@ -4429,7 +4429,7 @@ const ei = (e) => {
|
|
|
4429
4429
|
});
|
|
4430
4430
|
process.env.NODE_ENV !== "production" && mo(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
|
|
4431
4431
|
const {
|
|
4432
|
-
prefixCls:
|
|
4432
|
+
prefixCls: h,
|
|
4433
4433
|
direction: x,
|
|
4434
4434
|
configProvider: O,
|
|
4435
4435
|
renderEmpty: I,
|
|
@@ -4441,16 +4441,16 @@ const ei = (e) => {
|
|
|
4441
4441
|
} = po("select", e), {
|
|
4442
4442
|
compactSize: $,
|
|
4443
4443
|
compactItemClassnames: N
|
|
4444
|
-
} = vo(
|
|
4444
|
+
} = vo(h, x), V = R(() => $.value || P.value), j = go(), z = R(() => {
|
|
4445
4445
|
var _;
|
|
4446
4446
|
return (_ = v.value) !== null && _ !== void 0 ? _ : j.value;
|
|
4447
|
-
}), [Q, X] = li(
|
|
4448
|
-
[`${
|
|
4449
|
-
[`${
|
|
4450
|
-
[`${
|
|
4451
|
-
[`${
|
|
4452
|
-
[`${
|
|
4453
|
-
}, yo(
|
|
4447
|
+
}), [Q, X] = li(h), U = R(() => D()), M = R(() => e.placement !== void 0 ? e.placement : x.value === "rtl" ? "bottomRight" : "bottomLeft"), L = R(() => ho(U.value, bo(M.value), e.transitionName)), k = R(() => se({
|
|
4448
|
+
[`${h.value}-lg`]: V.value === "large",
|
|
4449
|
+
[`${h.value}-sm`]: V.value === "small",
|
|
4450
|
+
[`${h.value}-rtl`]: x.value === "rtl",
|
|
4451
|
+
[`${h.value}-borderless`]: !e.bordered,
|
|
4452
|
+
[`${h.value}-in-form-item`]: f.isFormItemInput
|
|
4453
|
+
}, yo(h.value, s.value, f.hasFeedback), N.value, X.value)), ee = function() {
|
|
4454
4454
|
for (var _ = arguments.length, te = new Array(_), oe = 0; oe < _; oe++)
|
|
4455
4455
|
te[oe] = arguments[oe];
|
|
4456
4456
|
t("update:value", te[0]), t("change", ...te), a.onFieldChange();
|
|
@@ -4459,7 +4459,7 @@ const ei = (e) => {
|
|
|
4459
4459
|
};
|
|
4460
4460
|
i({
|
|
4461
4461
|
blur: m,
|
|
4462
|
-
focus:
|
|
4462
|
+
focus: r,
|
|
4463
4463
|
scrollTo: p
|
|
4464
4464
|
});
|
|
4465
4465
|
const H = R(() => w.value === "multiple" || w.value === "tags"), W = R(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(H.value || w.value === "combobox"));
|
|
@@ -4467,9 +4467,9 @@ const ei = (e) => {
|
|
|
4467
4467
|
var _, te, oe, ae;
|
|
4468
4468
|
const {
|
|
4469
4469
|
notFoundContent: ne,
|
|
4470
|
-
listHeight:
|
|
4471
|
-
listItemHeight:
|
|
4472
|
-
popupClassName:
|
|
4470
|
+
listHeight: me = 256,
|
|
4471
|
+
listItemHeight: pe = 24,
|
|
4472
|
+
popupClassName: b,
|
|
4473
4473
|
dropdownClassName: c,
|
|
4474
4474
|
virtual: d,
|
|
4475
4475
|
dropdownMatchSelectWidth: F,
|
|
@@ -4491,12 +4491,12 @@ const ei = (e) => {
|
|
|
4491
4491
|
clearIcon: et
|
|
4492
4492
|
} = Vl(S(S({}, e), {
|
|
4493
4493
|
multiple: H.value,
|
|
4494
|
-
prefixCls:
|
|
4494
|
+
prefixCls: h.value,
|
|
4495
4495
|
hasFeedback: J,
|
|
4496
4496
|
feedbackIcon: le,
|
|
4497
4497
|
showArrow: W.value
|
|
4498
|
-
}), l), Re = Qe(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), De = se(
|
|
4499
|
-
[`${
|
|
4498
|
+
}), l), Re = Qe(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), De = se(b || c, {
|
|
4499
|
+
[`${h.value}-dropdown-${x.value}`]: x.value === "rtl"
|
|
4500
4500
|
}, X.value);
|
|
4501
4501
|
return Q(y(Fl, Y(Y(Y({
|
|
4502
4502
|
ref: u,
|
|
@@ -4505,10 +4505,10 @@ const ei = (e) => {
|
|
|
4505
4505
|
}, Re), o), {}, {
|
|
4506
4506
|
showSearch: (te = e.showSearch) !== null && te !== void 0 ? te : (oe = T == null ? void 0 : T.value) === null || oe === void 0 ? void 0 : oe.showSearch,
|
|
4507
4507
|
placeholder: B,
|
|
4508
|
-
listHeight:
|
|
4509
|
-
listItemHeight:
|
|
4508
|
+
listHeight: me,
|
|
4509
|
+
listItemHeight: pe,
|
|
4510
4510
|
mode: w.value,
|
|
4511
|
-
prefixCls:
|
|
4511
|
+
prefixCls: h.value,
|
|
4512
4512
|
direction: x.value,
|
|
4513
4513
|
inputIcon: re,
|
|
4514
4514
|
menuItemSelectedIcon: de,
|
|
@@ -4562,79 +4562,66 @@ const ai = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAA
|
|
|
4562
4562
|
const n = {
|
|
4563
4563
|
L1: {
|
|
4564
4564
|
color: "green",
|
|
4565
|
-
text:
|
|
4565
|
+
text: Ee("levels.L1")
|
|
4566
4566
|
},
|
|
4567
4567
|
L2: {
|
|
4568
4568
|
color: "orange",
|
|
4569
|
-
text:
|
|
4569
|
+
text: Ee("levels.L2")
|
|
4570
4570
|
},
|
|
4571
4571
|
L3: {
|
|
4572
4572
|
color: "red",
|
|
4573
|
-
text:
|
|
4574
|
-
}
|
|
4575
|
-
}, o = {
|
|
4576
|
-
PENDING: {
|
|
4577
|
-
color: "orange",
|
|
4578
|
-
text: Se("status.PENDING")
|
|
4579
|
-
},
|
|
4580
|
-
OWNER: {
|
|
4581
|
-
color: "green",
|
|
4582
|
-
text: Se("status.OWNER")
|
|
4583
|
-
},
|
|
4584
|
-
NO: {
|
|
4585
|
-
color: "red",
|
|
4586
|
-
text: Se("status.NO")
|
|
4573
|
+
text: Ee("levels.L3")
|
|
4587
4574
|
}
|
|
4588
4575
|
};
|
|
4589
|
-
let
|
|
4590
|
-
const
|
|
4591
|
-
const
|
|
4576
|
+
let o = e;
|
|
4577
|
+
const t = Co("availiables"), l = Ee("status"), i = ["NO", "PENDING"].includes(o.item.businessApplyType), u = ve(""), a = (r) => {
|
|
4578
|
+
const m = {
|
|
4592
4579
|
L1: "SIXTY_DAYS",
|
|
4593
4580
|
L2: "THIRTY_DAYS",
|
|
4594
4581
|
L3: "SEVEN_DAYS"
|
|
4595
|
-
}, { relatedDepartmentIds:
|
|
4596
|
-
return
|
|
4597
|
-
}, a = (r) => {
|
|
4598
|
-
t.item.validTime = r, t.onChangeTime();
|
|
4582
|
+
}, { relatedDepartmentIds: p = [], curDepartmentId: w = 0, securityLevel: h } = r;
|
|
4583
|
+
return p.includes(w) ? r.validTime = "NINETY_DAYS" : r.validTime = m[h], r.validTime;
|
|
4599
4584
|
}, f = (r) => {
|
|
4600
|
-
|
|
4585
|
+
o.item.validTime = r, o.onChangeTime();
|
|
4586
|
+
}, s = (r) => {
|
|
4587
|
+
r.target.checked && (u.value = a(o.item));
|
|
4601
4588
|
};
|
|
4602
|
-
return (r,
|
|
4603
|
-
y(
|
|
4589
|
+
return (r, m) => (Le(), Xn("div", ri, [
|
|
4590
|
+
y(fe($o), {
|
|
4604
4591
|
value: e.item.roleId,
|
|
4605
|
-
disabled:
|
|
4606
|
-
onChange:
|
|
4592
|
+
disabled: fe(i),
|
|
4593
|
+
onChange: s
|
|
4607
4594
|
}, {
|
|
4608
4595
|
default: be(() => [
|
|
4609
|
-
|
|
4610
|
-
e.item.securityLevel ? (Le(), Ge(
|
|
4596
|
+
Te("div", si, [
|
|
4597
|
+
e.item.securityLevel ? (Le(), Ge(fe(Bt), {
|
|
4611
4598
|
key: 0,
|
|
4612
4599
|
bordered: !1,
|
|
4613
4600
|
color: n[e.item.securityLevel].color,
|
|
4614
4601
|
class: "crane-tag-position"
|
|
4615
4602
|
}, {
|
|
4616
4603
|
default: be(() => [
|
|
4617
|
-
|
|
4604
|
+
Se(ge(n[e.item.securityLevel].text), 1)
|
|
4618
4605
|
]),
|
|
4619
4606
|
_: 1
|
|
4620
4607
|
}, 8, ["color"])) : Xe("", !0),
|
|
4621
|
-
|
|
4622
|
-
y(
|
|
4608
|
+
Te("span", null, ge(fe(Ee)(`operationType.${e.item.operationType}`)) + "| ", 1),
|
|
4609
|
+
y(fe(it), null, {
|
|
4623
4610
|
content: be(() => [
|
|
4624
|
-
|
|
4611
|
+
Se(ge(e.item.name), 1)
|
|
4625
4612
|
]),
|
|
4626
4613
|
default: be(() => [
|
|
4627
|
-
|
|
4614
|
+
Te("span", ui, ge(e.item.name), 1)
|
|
4628
4615
|
]),
|
|
4629
4616
|
_: 1
|
|
4630
4617
|
}),
|
|
4631
|
-
e.item.businessApplyType ? (Le(), Ge(
|
|
4618
|
+
e.item.businessApplyType ? (Le(), Ge(fe(Bt), {
|
|
4632
4619
|
key: 1,
|
|
4633
4620
|
bordered: !1,
|
|
4634
4621
|
class: kn(["crane-tag-position crane-margin-left-4 crane-margin-right-0", e.item.businessApplyType !== pi ? "crane-disabled-color" : ""])
|
|
4635
4622
|
}, {
|
|
4636
4623
|
default: be(() => [
|
|
4637
|
-
|
|
4624
|
+
Se(ge(fe(l)[e.item.businessApplyType]), 1)
|
|
4638
4625
|
]),
|
|
4639
4626
|
_: 1
|
|
4640
4627
|
}, 8, ["class"])) : Xe("", !0)
|
|
@@ -4642,39 +4629,39 @@ const ai = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAA
|
|
|
4642
4629
|
]),
|
|
4643
4630
|
_: 1
|
|
4644
4631
|
}, 8, ["value", "disabled"]),
|
|
4645
|
-
e.item.desc ? (Le(), Ge(
|
|
4632
|
+
e.item.desc ? (Le(), Ge(fe(it), { key: 0 }, {
|
|
4646
4633
|
content: be(() => [
|
|
4647
|
-
|
|
4634
|
+
Se(ge(e.item.desc), 1)
|
|
4648
4635
|
]),
|
|
4649
4636
|
default: be(() => [
|
|
4650
|
-
y(
|
|
4637
|
+
y(fe(To), { class: "crane-week-color" })
|
|
4651
4638
|
]),
|
|
4652
4639
|
_: 1
|
|
4653
4640
|
})) : Xe("", !0),
|
|
4654
|
-
e.item.relatedDepartments ? (Le(), Ge(
|
|
4641
|
+
e.item.relatedDepartments ? (Le(), Ge(fe(it), { key: 1 }, {
|
|
4655
4642
|
content: be(() => [
|
|
4656
|
-
|
|
4643
|
+
Se(ge(fe(Ee)("adaptDepartment")) + ":" + ge(e.item.relatedDepartments.map((p) => p.name).join("、")), 1)
|
|
4657
4644
|
]),
|
|
4658
4645
|
default: be(() => [
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
src:
|
|
4646
|
+
Te("span", ci, [
|
|
4647
|
+
Te("img", {
|
|
4648
|
+
src: fe(ai),
|
|
4662
4649
|
height: "14",
|
|
4663
4650
|
width: "14"
|
|
4664
4651
|
}, null, 8, di),
|
|
4665
|
-
|
|
4652
|
+
Te("span", fi, ge(e.item.relatedDepartments.length), 1)
|
|
4666
4653
|
])
|
|
4667
4654
|
]),
|
|
4668
4655
|
_: 1
|
|
4669
4656
|
})) : Xe("", !0),
|
|
4670
|
-
qn(
|
|
4671
|
-
|
|
4672
|
-
y(
|
|
4673
|
-
value:
|
|
4674
|
-
"onUpdate:value":
|
|
4657
|
+
qn(Te("span", mi, [
|
|
4658
|
+
Se(ge(fe(Ee)("availableTime")) + ": ", 1),
|
|
4659
|
+
y(fe(he), {
|
|
4660
|
+
value: u.value,
|
|
4661
|
+
"onUpdate:value": m[0] || (m[0] = (p) => u.value = p),
|
|
4675
4662
|
style: { width: "100px" },
|
|
4676
|
-
options:
|
|
4677
|
-
onChange:
|
|
4663
|
+
options: fe(t),
|
|
4664
|
+
onChange: f,
|
|
4678
4665
|
size: "small"
|
|
4679
4666
|
}, null, 8, ["value", "options"])
|
|
4680
4667
|
], 512), [
|
|
@@ -4682,7 +4669,7 @@ const ai = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAA
|
|
|
4682
4669
|
])
|
|
4683
4670
|
]));
|
|
4684
4671
|
}
|
|
4685
|
-
}), Ei = /* @__PURE__ */ xo(vi, [["__scopeId", "data-v-
|
|
4672
|
+
}), Ei = /* @__PURE__ */ xo(vi, [["__scopeId", "data-v-f3aebbd7"]]);
|
|
4686
4673
|
export {
|
|
4687
4674
|
Ei as default
|
|
4688
4675
|
};
|