bp-aicc-editor 1.2.521 → 1.2.523
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/lib/{ScreenPreview-CV95NWOd.js → ScreenPreview-yUHo60be.js} +51 -105
- package/lib/atlas-BMjKIOwk.js +3891 -0
- package/lib/{button-base-DHNVBrQ9.js → button-base-CXl1z-_m.js} +1 -1
- package/lib/{cache-lsjsKZHu.js → cache-DbHSDjJy.js} +1 -1
- package/lib/config-provider-Bui8m4GV.js +62 -0
- package/lib/{container-group-DqAcKEBy.js → container-group-D6Extorz.js} +1 -1
- package/lib/{copy-C5Pi6nJh.js → copy-CsCmPy4J.js} +1 -1
- package/lib/{datav-BER95ty-.js → datav-BTD-HJhV.js} +27 -27
- package/lib/{delete-C2EW4JCs.js → delete-COj0ilHh.js} +1 -1
- package/lib/{divider-BazBGRgV.js → divider-B3K_URZc.js} +1 -1
- package/lib/dropdown-CWvnuJsO.js +105 -0
- package/lib/{edit-B2pfd2q1.js → edit-vdJaEine.js} +1 -1
- package/lib/{el-form-item-BDdxk5F5.js → el-form-item-BbaNohQv.js} +51 -51
- package/lib/{el-link-D2ol9BHQ.js → el-link-Dq721Q7-.js} +12 -12
- package/lib/{el-loading-Cgwgez55.js → el-loading-DOxnN3bm.js} +17 -17
- package/lib/{fullscreen-OChDsSnk.js → fullscreen-DXSogbcG.js} +1 -1
- package/lib/{image-C5ZAY3yt.js → image-Cu7JTK9-.js} +1 -1
- package/lib/{index-Ci8AbyIq.js → index-68soBnbK.js} +8 -8
- package/lib/{index-BatyRVpL.js → index-B-d8WIg1.js} +7 -7
- package/lib/{index-BfIEunKC.js → index-B4zV3cxV.js} +18 -17
- package/lib/{index-CZJriuFt.js → index-B8QqTLfg.js} +4974 -4898
- package/lib/index-BBMItxtW.js +619 -0
- package/lib/{index-CGrR_i0u.js → index-BMm0MRz5.js} +14 -15
- package/lib/index-BMn8EzMD.js +1027 -0
- package/lib/index-BNTW8F-9.js +322 -0
- package/lib/index-BTI518b1.js +69 -0
- package/lib/{index-BWPVi43E.js → index-BZxUAT4z.js} +4 -4
- package/lib/{index-Ck7uFsPE.js → index-BdYTc41r.js} +24 -24
- package/lib/index-BfI55Ioc.js +404 -0
- package/lib/{index-BhP9eBCp.js → index-BmAcetSf.js} +19 -20
- package/lib/index-C35Yp3i8.js +545 -0
- package/lib/{index-B19lEYui.js → index-C6GUNRx9.js} +2 -2
- package/lib/index-CC28_8Jl.js +567 -0
- package/lib/index-CDhmvVt8.js +338 -0
- package/lib/index-CDx0y0fp.js +144 -0
- package/lib/{el-button-DvLKp6Ga.js → index-CJjljoJG.js} +106 -106
- package/lib/index-CNCgXPiO.js +235 -0
- package/lib/{index-CWbZmzNT.js → index-CPa_MnOD.js} +30 -29
- package/lib/index-CW6ljdNf.js +1582 -0
- package/lib/index-C_WopEui.js +513 -0
- package/lib/{index-CX_Ghcb6.js → index-CejowjGd.js} +56 -53
- package/lib/{index-BwCQWH-N.js → index-CfZXOvi-.js} +42 -40
- package/lib/{index-CVsy2qTh.js → index-CgzRTmPh.js} +16 -15
- package/lib/index-CmzuNM9v.js +32 -0
- package/lib/index-CrxcAFt8.js +5343 -0
- package/lib/{index-C7k49L2T.js → index-CuHA7QXu.js} +10 -10
- package/lib/{index-qVyixI57.js → index-CyBGAB7D.js} +21 -20
- package/lib/index-D6J7coU0.js +129 -0
- package/lib/index-DDHxrdAo.js +1773 -0
- package/lib/index-DDL-yqq0.js +1401 -0
- package/lib/{index-BPcvYtHf.js → index-DOxy-bey.js} +6 -6
- package/lib/{index-CVE37oE7.js → index-DOyr0BHr.js} +7 -7
- package/lib/index-DPOanmXI.js +887 -0
- package/lib/{index-3pzVrvby.js → index-DR_husZg.js} +46 -46
- package/lib/{el-tab-pane-DD2eM9rB.js → index-DUzOCQrW.js} +125 -124
- package/lib/{index-CGFEhUh9.js → index-DVYI-g8Q.js} +53 -52
- package/lib/index-DVyjilLy.js +51 -0
- package/lib/{index-CJyYGViv.js → index-DWAJ9GyC.js} +9 -9
- package/lib/index-Dj2qCwPD.js +178 -0
- package/lib/{index-D4X0_jbv.js → index-Dx2Gld1J.js} +32 -32
- package/lib/{index-C2XeCqtq.js → index-E9T-y2Yz.js} +3 -3
- package/lib/{index-Buoc0ISP.js → index-FlmXAW0Z.js} +60 -58
- package/lib/index-NqqOvc6V.js +169 -0
- package/lib/{index-BkdiXCRY.js → index-ObKRNOmJ.js} +6 -7
- package/lib/index-bOWjoplU.js +448 -0
- package/lib/{index-CXQ258ID.js → index-buU8mDzi.js} +15 -16
- package/lib/{index-tbhuYbb0.js → index-mGKAWDJZ.js} +11 -12
- package/lib/index.es.js +4 -4
- package/lib/index.umd.js +46 -40
- package/lib/{layer-setting-panel-VvDSQ-cn.js → layer-setting-panel-BGPj32nP.js} +2 -2
- package/lib/{line-show-Bp4G-LqO.js → line-show-DUn1bu_P.js} +1 -1
- package/lib/{multi-layout-config-drSy7ezf.js → multi-layout-config-BTWxJeuc.js} +7 -8
- package/lib/{multiline-text-D89kYrA2.js → multiline-text-CPJdCWJ7.js} +1 -1
- package/lib/{navigation-YAGxZ0OT.js → navigation-ZLJaBOUj.js} +1 -1
- package/lib/page-config-CHP07Ndf.js +253 -0
- package/lib/{page-tabs-wFeNBY4c.js → page-tabs-CKLhgrip.js} +45 -41
- package/lib/{plus-3mdO6yXY.js → plus-xgpQU22I.js} +1 -1
- package/lib/raf-CJog_tcv.js +6 -0
- package/lib/refs-DZMysoBI.js +8 -0
- package/lib/{requestOld-DRcjsmRQ.js → requestOld-CaGzCXrV.js} +97 -96
- package/lib/{schema-BsnIOGBI.js → schema-BaFWGeFt.js} +1 -1
- package/lib/{schema-_APJMUW3.js → schema-CUR-UK2S.js} +44 -41
- package/lib/{schema-BavJE-SK.js → schema-WUk7XVq7.js} +58 -54
- package/lib/{schema-qKI1F8Bt.js → schema-geZfujv8.js} +1 -1
- package/lib/{schema-BflqDw-a.js → schema-iosjRxCC.js} +1 -1
- package/lib/{schema-Bo30dbBx.js → schema-tuPllxn6.js} +1 -1
- package/lib/scroll-CWfl60Tu.js +58 -0
- package/lib/{setting-panel-BgzN3BUP.js → setting-panel-0qLcwYyT.js} +154 -151
- package/lib/{show-C4AeWlKj.js → show-BCwE3hGY.js} +1 -1
- package/lib/{stepper-D5EFeJWG.js → stepper-Bud1Jppr.js} +1 -1
- package/lib/strings-BvUQWzDM.js +6 -0
- package/lib/style.css +1 -1
- package/lib/{switch-B0dR4LM_.js → switch-VlaUmSpJ.js} +1 -1
- package/lib/{unlock-Cq9PLhBA.js → unlock-B2FVPQlm.js} +1 -1
- package/lib/{use-env-url-BM9dgwx_.js → use-env-url-D1p8ib2L.js} +1 -1
- package/lib/use-global-config-D_yoqf3Q.js +90 -0
- package/lib/validator-BOXH2OMA.js +5 -0
- package/lib/{vnode-B_Dj8zxu.js → vnode-Bxs1g06p.js} +1 -1
- package/package.json +1 -1
- package/lib/atlas-DsmLq2V0.js +0 -38
- package/lib/el-overlay-BK0_UIU6.js +0 -704
- package/lib/index-B1yAU2Cb.js +0 -390
- package/lib/index-BCFXuK7k.js +0 -68
- package/lib/index-BD4Jwo8Z.js +0 -449
- package/lib/index-BMWqf88L.js +0 -356
- package/lib/index-Belsn8kt.js +0 -107
- package/lib/index-CIADz1i0.js +0 -8494
- package/lib/index-DKTrbqcA.js +0 -56
- package/lib/index-Ge_d2xqD.js +0 -127
- package/lib/page-config-Cmsi8Vpr.js +0 -582
- package/lib/strings-_mHAdgA4.js +0 -6
- package/lib/use-global-config-CflpFoxU.js +0 -115
|
@@ -0,0 +1,1582 @@
|
|
|
1
|
+
import { shallowRef as pt, ref as T, computed as c, watch as K, inject as Te, getCurrentInstance as ke, toRaw as ft, defineComponent as me, withDirectives as pe, createElementBlock as V, openBlock as v, withModifiers as ae, normalizeClass as m, renderSlot as L, createElementVNode as R, toDisplayString as Q, vShow as Ke, unref as Pe, toRefs as Ue, reactive as fe, onBeforeUnmount as Sl, nextTick as G, normalizeStyle as Ve, createCommentVNode as W, onMounted as je, watchEffect as vt, provide as Ol, isVNode as bt, resolveComponent as Z, resolveDirective as mt, mergeProps as ze, toHandlerKey as gt, createVNode as ee, withCtx as B, createBlock as F, Fragment as de, renderList as Ee, createTextVNode as pl, vModelText as ht, resolveDynamicComponent as Fe } from "vue";
|
|
2
|
+
import { b6 as le, $ as te, aL as U, e as wl, al as yt, ai as J, j as q, g as De, h as ve, r as Cl, t as St, b2 as Ot, bl as wt, b3 as Ct, aC as Et, b4 as It, a5 as fl, R as Y, bm as Vt, at as Tt, aT as kt, aU as Ie, bn as vl, Q as Dt, i as Rt, az as ce, aF as $t, b5 as Mt, M as bl, N as H, aA as Lt, ah as ne, bo as Nt, bp as Bt, a0 as El, V as Wt, bq as Pt, f as A, b0 as ml, b1 as zt, ar as Ft, Y as gl, ax as Ht, a6 as At, br as Kt, E as Ut, k as jt, w as Gt, an as Il } from "./index-B8QqTLfg.js";
|
|
3
|
+
import { s as Qt, E as qt } from "./index-BfI55Ioc.js";
|
|
4
|
+
import { t as hl, C as Yt, E as Zt } from "./index-Dj2qCwPD.js";
|
|
5
|
+
import { e as Jt } from "./strings-BvUQWzDM.js";
|
|
6
|
+
import { a as Xt, u as xt } from "./index-CmzuNM9v.js";
|
|
7
|
+
import { s as _t } from "./scroll-CWfl60Tu.js";
|
|
8
|
+
import { f as en } from "./vnode-Bxs1g06p.js";
|
|
9
|
+
const Vl = 11, ln = 2;
|
|
10
|
+
function tn() {
|
|
11
|
+
const e = pt(), n = T(0), r = c(() => ({
|
|
12
|
+
minWidth: `${Math.max(n.value, Vl)}px`
|
|
13
|
+
}));
|
|
14
|
+
return le(e, () => {
|
|
15
|
+
var p, g;
|
|
16
|
+
n.value = (g = (p = e.value) == null ? void 0 : p.getBoundingClientRect().width) != null ? g : 0;
|
|
17
|
+
}), {
|
|
18
|
+
calculatorRef: e,
|
|
19
|
+
calculatorWidth: n,
|
|
20
|
+
inputStyle: r
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const He = {
|
|
24
|
+
label: "label",
|
|
25
|
+
value: "value",
|
|
26
|
+
disabled: "disabled",
|
|
27
|
+
options: "options"
|
|
28
|
+
};
|
|
29
|
+
function nn(e) {
|
|
30
|
+
const n = T({ ...He, ...e.props });
|
|
31
|
+
let r = { ...e.props };
|
|
32
|
+
return K(
|
|
33
|
+
() => e.props,
|
|
34
|
+
(i) => {
|
|
35
|
+
te(i, r) || (n.value = { ...He, ...i }, r = { ...i });
|
|
36
|
+
},
|
|
37
|
+
{ deep: !0 }
|
|
38
|
+
), {
|
|
39
|
+
aliasProps: n,
|
|
40
|
+
getLabel: (i) => U(i, n.value.label),
|
|
41
|
+
getValue: (i) => U(i, n.value.value),
|
|
42
|
+
getDisabled: (i) => U(i, n.value.disabled),
|
|
43
|
+
getOptions: (i) => U(i, n.value.options)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const Tl = Symbol("ElSelectGroup"), Re = Symbol("ElSelect"), Ae = "ElOption", an = wl({
|
|
47
|
+
value: {
|
|
48
|
+
type: [String, Number, Boolean, Object],
|
|
49
|
+
required: !0
|
|
50
|
+
},
|
|
51
|
+
label: {
|
|
52
|
+
type: [String, Number]
|
|
53
|
+
},
|
|
54
|
+
created: Boolean,
|
|
55
|
+
disabled: Boolean
|
|
56
|
+
});
|
|
57
|
+
function on(e, n) {
|
|
58
|
+
const r = Te(Re);
|
|
59
|
+
r || yt(Ae, "usage: <el-select><el-option /></el-select/>");
|
|
60
|
+
const h = Te(Tl, { disabled: !1 }), p = c(() => S(J(r.props.modelValue), e.value)), g = c(() => {
|
|
61
|
+
var d;
|
|
62
|
+
if (r.props.multiple) {
|
|
63
|
+
const w = J((d = r.props.modelValue) != null ? d : []);
|
|
64
|
+
return !p.value && w.length >= r.props.multipleLimit && r.props.multipleLimit > 0;
|
|
65
|
+
} else
|
|
66
|
+
return !1;
|
|
67
|
+
}), t = c(() => {
|
|
68
|
+
var d;
|
|
69
|
+
return (d = e.label) != null ? d : q(e.value) ? "" : e.value;
|
|
70
|
+
}), i = c(() => e.value || e.label || ""), f = c(() => e.disabled || n.groupDisabled || g.value), y = ke(), S = (d = [], w) => {
|
|
71
|
+
if (q(e.value)) {
|
|
72
|
+
const b = r.props.valueKey;
|
|
73
|
+
return d && d.some((u) => ft(U(u, b)) === U(w, b));
|
|
74
|
+
} else
|
|
75
|
+
return d && d.includes(w);
|
|
76
|
+
}, E = () => {
|
|
77
|
+
f.value || (r.states.hoveringIndex = r.optionsArray.indexOf(y.proxy));
|
|
78
|
+
}, I = (d) => {
|
|
79
|
+
const w = new RegExp(Jt(d), "i");
|
|
80
|
+
n.visible = w.test(String(t.value)) || e.created;
|
|
81
|
+
};
|
|
82
|
+
return K(
|
|
83
|
+
() => t.value,
|
|
84
|
+
() => {
|
|
85
|
+
!e.created && !r.props.remote && r.setSelected();
|
|
86
|
+
}
|
|
87
|
+
), K(
|
|
88
|
+
() => e.value,
|
|
89
|
+
(d, w) => {
|
|
90
|
+
const { remote: b, valueKey: u } = r.props;
|
|
91
|
+
if ((b ? d !== w : !te(d, w)) && (r.onOptionDestroy(w, y.proxy), r.onOptionCreate(y.proxy)), !e.created && !b) {
|
|
92
|
+
if (u && q(d) && q(w) && d[u] === w[u])
|
|
93
|
+
return;
|
|
94
|
+
r.setSelected();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
), K(
|
|
98
|
+
() => h.disabled,
|
|
99
|
+
() => {
|
|
100
|
+
n.groupDisabled = h.disabled;
|
|
101
|
+
},
|
|
102
|
+
{ immediate: !0 }
|
|
103
|
+
), {
|
|
104
|
+
select: r,
|
|
105
|
+
currentLabel: t,
|
|
106
|
+
currentValue: i,
|
|
107
|
+
itemSelected: p,
|
|
108
|
+
isDisabled: f,
|
|
109
|
+
hoverItem: E,
|
|
110
|
+
updateOption: I
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const sn = me({
|
|
114
|
+
name: Ae,
|
|
115
|
+
componentName: Ae,
|
|
116
|
+
props: an,
|
|
117
|
+
setup(e) {
|
|
118
|
+
const n = ve("select"), r = Cl(), h = c(() => [
|
|
119
|
+
n.be("dropdown", "item"),
|
|
120
|
+
n.is("disabled", Pe(i)),
|
|
121
|
+
n.is("selected", Pe(t)),
|
|
122
|
+
n.is("hovering", Pe(I))
|
|
123
|
+
]), p = fe({
|
|
124
|
+
index: -1,
|
|
125
|
+
groupDisabled: !1,
|
|
126
|
+
visible: !0,
|
|
127
|
+
hover: !1
|
|
128
|
+
}), {
|
|
129
|
+
currentLabel: g,
|
|
130
|
+
itemSelected: t,
|
|
131
|
+
isDisabled: i,
|
|
132
|
+
select: f,
|
|
133
|
+
hoverItem: y,
|
|
134
|
+
updateOption: S
|
|
135
|
+
} = on(e, p), { visible: E, hover: I } = Ue(p), d = ke().proxy;
|
|
136
|
+
f.onOptionCreate(d), Sl(() => {
|
|
137
|
+
const b = d.value;
|
|
138
|
+
G(() => {
|
|
139
|
+
const { selected: u } = f.states, $ = u.some((o) => o.value === d.value);
|
|
140
|
+
f.states.cachedOptions.get(b) === d && !$ && f.states.cachedOptions.delete(b);
|
|
141
|
+
}), f.onOptionDestroy(b, d);
|
|
142
|
+
});
|
|
143
|
+
function w() {
|
|
144
|
+
i.value || f.handleOptionSelect(d);
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
ns: n,
|
|
148
|
+
id: r,
|
|
149
|
+
containerKls: h,
|
|
150
|
+
currentLabel: g,
|
|
151
|
+
itemSelected: t,
|
|
152
|
+
isDisabled: i,
|
|
153
|
+
select: f,
|
|
154
|
+
visible: E,
|
|
155
|
+
hover: I,
|
|
156
|
+
states: p,
|
|
157
|
+
hoverItem: y,
|
|
158
|
+
updateOption: S,
|
|
159
|
+
selectOptionClick: w
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}), rn = ["id", "aria-disabled", "aria-selected"];
|
|
163
|
+
function un(e, n, r, h, p, g) {
|
|
164
|
+
return pe((v(), V("li", {
|
|
165
|
+
id: e.id,
|
|
166
|
+
class: m(e.containerKls),
|
|
167
|
+
role: "option",
|
|
168
|
+
"aria-disabled": e.isDisabled || void 0,
|
|
169
|
+
"aria-selected": e.itemSelected,
|
|
170
|
+
onMousemove: n[0] || (n[0] = (...t) => e.hoverItem && e.hoverItem(...t)),
|
|
171
|
+
onClick: n[1] || (n[1] = ae((...t) => e.selectOptionClick && e.selectOptionClick(...t), ["stop"])),
|
|
172
|
+
onMousedown: n[2] || (n[2] = ae(() => {
|
|
173
|
+
}, ["prevent"]))
|
|
174
|
+
}, [
|
|
175
|
+
L(e.$slots, "default", {}, () => [
|
|
176
|
+
R(
|
|
177
|
+
"span",
|
|
178
|
+
null,
|
|
179
|
+
Q(e.currentLabel),
|
|
180
|
+
1
|
|
181
|
+
)
|
|
182
|
+
])
|
|
183
|
+
], 42, rn)), [
|
|
184
|
+
[Ke, e.visible]
|
|
185
|
+
]);
|
|
186
|
+
}
|
|
187
|
+
var Ge = /* @__PURE__ */ De(sn, [["render", un], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);
|
|
188
|
+
const dn = me({
|
|
189
|
+
name: "ElSelectDropdown",
|
|
190
|
+
componentName: "ElSelectDropdown",
|
|
191
|
+
setup() {
|
|
192
|
+
const e = Te(Re), n = ve("select"), r = c(() => e.props.popperClass), h = c(() => e.props.multiple), p = c(() => e.props.fitInputWidth), g = T("");
|
|
193
|
+
function t() {
|
|
194
|
+
var i;
|
|
195
|
+
const f = (i = e.selectRef) == null ? void 0 : i.offsetWidth;
|
|
196
|
+
f ? g.value = `${f - ln}px` : g.value = "";
|
|
197
|
+
}
|
|
198
|
+
return je(() => {
|
|
199
|
+
t(), le(e.selectRef, t);
|
|
200
|
+
}), {
|
|
201
|
+
ns: n,
|
|
202
|
+
minWidth: g,
|
|
203
|
+
popperClass: r,
|
|
204
|
+
isMultiple: h,
|
|
205
|
+
isFitInputWidth: p
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
function cn(e, n, r, h, p, g) {
|
|
210
|
+
return v(), V(
|
|
211
|
+
"div",
|
|
212
|
+
{
|
|
213
|
+
class: m([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
|
|
214
|
+
style: Ve({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
|
|
215
|
+
},
|
|
216
|
+
[
|
|
217
|
+
e.$slots.header ? (v(), V(
|
|
218
|
+
"div",
|
|
219
|
+
{
|
|
220
|
+
key: 0,
|
|
221
|
+
class: m(e.ns.be("dropdown", "header"))
|
|
222
|
+
},
|
|
223
|
+
[
|
|
224
|
+
L(e.$slots, "header")
|
|
225
|
+
],
|
|
226
|
+
2
|
|
227
|
+
)) : W("v-if", !0),
|
|
228
|
+
L(e.$slots, "default"),
|
|
229
|
+
e.$slots.footer ? (v(), V(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
key: 1,
|
|
233
|
+
class: m(e.ns.be("dropdown", "footer"))
|
|
234
|
+
},
|
|
235
|
+
[
|
|
236
|
+
L(e.$slots, "footer")
|
|
237
|
+
],
|
|
238
|
+
2
|
|
239
|
+
)) : W("v-if", !0)
|
|
240
|
+
],
|
|
241
|
+
6
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
var pn = /* @__PURE__ */ De(dn, [["render", cn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);
|
|
245
|
+
const fn = (e, n) => {
|
|
246
|
+
const { t: r } = St(), h = Cl(), p = ve("select"), g = ve("input"), t = fe({
|
|
247
|
+
inputValue: "",
|
|
248
|
+
options: /* @__PURE__ */ new Map(),
|
|
249
|
+
cachedOptions: /* @__PURE__ */ new Map(),
|
|
250
|
+
optionValues: [],
|
|
251
|
+
selected: [],
|
|
252
|
+
selectionWidth: 0,
|
|
253
|
+
collapseItemWidth: 0,
|
|
254
|
+
selectedLabel: "",
|
|
255
|
+
hoveringIndex: -1,
|
|
256
|
+
previousQuery: null,
|
|
257
|
+
inputHovering: !1,
|
|
258
|
+
menuVisibleOnFocus: !1,
|
|
259
|
+
isBeforeHide: !1
|
|
260
|
+
}), i = T(), f = T(), y = T(), S = T(), E = T(), I = T(), d = T(), w = T(), b = T(), u = T(), $ = T(), o = T(!1), M = T(), k = T(!1), { form: oe, formItem: z } = Ot(), { inputId: j } = wt(e, {
|
|
261
|
+
formItemContext: z
|
|
262
|
+
}), { valueOnClear: qe, isEmptyValue: X } = Xt(e), {
|
|
263
|
+
isComposing: $e,
|
|
264
|
+
handleCompositionStart: kl,
|
|
265
|
+
handleCompositionUpdate: Dl,
|
|
266
|
+
handleCompositionEnd: Rl
|
|
267
|
+
} = Ct({
|
|
268
|
+
afterComposition: (l) => tl(l)
|
|
269
|
+
}), se = Et(), { wrapperRef: Ye, isFocused: Me, handleBlur: $l } = It(E, {
|
|
270
|
+
disabled: se,
|
|
271
|
+
afterFocus() {
|
|
272
|
+
e.automaticDropdown && !o.value && (o.value = !0, t.menuVisibleOnFocus = !0);
|
|
273
|
+
},
|
|
274
|
+
beforeBlur(l) {
|
|
275
|
+
var a, s;
|
|
276
|
+
return ((a = y.value) == null ? void 0 : a.isFocusInsideContent(l)) || ((s = S.value) == null ? void 0 : s.isFocusInsideContent(l));
|
|
277
|
+
},
|
|
278
|
+
afterBlur() {
|
|
279
|
+
var l;
|
|
280
|
+
o.value = !1, t.menuVisibleOnFocus = !1, e.validateEvent && ((l = z?.validate) == null || l.call(z, "blur").catch((a) => fl(a)));
|
|
281
|
+
}
|
|
282
|
+
}), Le = c(() => Y(e.modelValue) ? e.modelValue.length > 0 : !X(e.modelValue)), Ml = c(() => {
|
|
283
|
+
var l;
|
|
284
|
+
return (l = oe?.statusIcon) != null ? l : !1;
|
|
285
|
+
}), Ll = c(() => e.clearable && !se.value && Le.value && (Me.value || t.inputHovering)), Ze = c(
|
|
286
|
+
() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon
|
|
287
|
+
), Nl = c(
|
|
288
|
+
() => p.is("reverse", !!(Ze.value && o.value))
|
|
289
|
+
), Ne = c(() => z?.validateState || ""), Bl = c(
|
|
290
|
+
() => Ne.value && Vt[Ne.value]
|
|
291
|
+
), Wl = c(() => e.remote ? e.debounce : 0), Pl = c(
|
|
292
|
+
() => e.remote && !t.inputValue && t.options.size === 0
|
|
293
|
+
), zl = c(() => e.loading ? e.loadingText || r("el.select.loading") : e.filterable && t.inputValue && t.options.size > 0 && ie.value === 0 ? e.noMatchText || r("el.select.noMatch") : t.options.size === 0 ? e.noDataText || r("el.select.noData") : null), ie = c(
|
|
294
|
+
() => D.value.filter((l) => l.visible).length
|
|
295
|
+
), D = c(() => {
|
|
296
|
+
const l = Array.from(t.options.values()), a = [];
|
|
297
|
+
return t.optionValues.forEach((s) => {
|
|
298
|
+
const O = l.findIndex((C) => C.value === s);
|
|
299
|
+
O > -1 && a.push(l[O]);
|
|
300
|
+
}), a.length >= l.length ? a : l;
|
|
301
|
+
}), Fl = c(
|
|
302
|
+
() => Array.from(t.cachedOptions.values())
|
|
303
|
+
), Hl = c(() => {
|
|
304
|
+
const l = D.value.filter((a) => !a.created).some((a) => a.currentLabel === t.inputValue);
|
|
305
|
+
return e.filterable && e.allowCreate && t.inputValue !== "" && !l;
|
|
306
|
+
}), Je = () => {
|
|
307
|
+
e.filterable && ce(e.filterMethod) || e.filterable && e.remote && ce(e.remoteMethod) || D.value.forEach((l) => {
|
|
308
|
+
var a;
|
|
309
|
+
(a = l.updateOption) == null || a.call(l, t.inputValue);
|
|
310
|
+
});
|
|
311
|
+
}, Xe = Tt(), Al = c(
|
|
312
|
+
() => ["small"].includes(Xe.value) ? "small" : "default"
|
|
313
|
+
), xe = c({
|
|
314
|
+
get() {
|
|
315
|
+
return o.value && (e.loading || !Pl.value) && (!k.value || !kt(t.previousQuery));
|
|
316
|
+
},
|
|
317
|
+
set(l) {
|
|
318
|
+
o.value = l;
|
|
319
|
+
}
|
|
320
|
+
}), Kl = c(() => {
|
|
321
|
+
if (e.multiple && !Ie(e.modelValue))
|
|
322
|
+
return J(e.modelValue).length === 0 && !t.inputValue;
|
|
323
|
+
const l = Y(e.modelValue) ? e.modelValue[0] : e.modelValue;
|
|
324
|
+
return e.filterable || Ie(l) ? !t.inputValue : !0;
|
|
325
|
+
}), Ul = c(() => {
|
|
326
|
+
var l;
|
|
327
|
+
const a = (l = e.placeholder) != null ? l : r("el.select.placeholder");
|
|
328
|
+
return e.multiple || !Le.value ? a : t.selectedLabel;
|
|
329
|
+
}), jl = c(() => vl ? null : "mouseenter");
|
|
330
|
+
K(
|
|
331
|
+
() => e.modelValue,
|
|
332
|
+
(l, a) => {
|
|
333
|
+
e.multiple && e.filterable && !e.reserveKeyword && (t.inputValue = "", ge("")), he(), !te(l, a) && e.validateEvent && z?.validate("change").catch((s) => fl(s));
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
flush: "post",
|
|
337
|
+
deep: !0
|
|
338
|
+
}
|
|
339
|
+
), K(
|
|
340
|
+
() => o.value,
|
|
341
|
+
(l) => {
|
|
342
|
+
l ? ge(t.inputValue) : (t.inputValue = "", t.previousQuery = null, t.isBeforeHide = !0);
|
|
343
|
+
}
|
|
344
|
+
), K(
|
|
345
|
+
() => t.options.entries(),
|
|
346
|
+
() => {
|
|
347
|
+
Dt && (he(), e.defaultFirstOption && (e.filterable || e.remote) && ie.value && _e());
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
flush: "post"
|
|
351
|
+
}
|
|
352
|
+
), K([() => t.hoveringIndex, D], ([l]) => {
|
|
353
|
+
Rt(l) && l > -1 ? M.value = D.value[l] || {} : M.value = {}, D.value.forEach((a) => {
|
|
354
|
+
a.hover = M.value === a;
|
|
355
|
+
});
|
|
356
|
+
}), vt(() => {
|
|
357
|
+
t.isBeforeHide || Je();
|
|
358
|
+
});
|
|
359
|
+
const ge = (l) => {
|
|
360
|
+
t.previousQuery === l || $e.value || (t.previousQuery = l, e.filterable && ce(e.filterMethod) ? e.filterMethod(l) : e.filterable && e.remote && ce(e.remoteMethod) && e.remoteMethod(l), e.defaultFirstOption && (e.filterable || e.remote) && ie.value ? G(_e) : G(Gl));
|
|
361
|
+
}, _e = () => {
|
|
362
|
+
const l = D.value.filter(
|
|
363
|
+
(C) => C.visible && !C.disabled && !C.states.groupDisabled
|
|
364
|
+
), a = l.find((C) => C.created), s = l[0], O = D.value.map((C) => C.value);
|
|
365
|
+
t.hoveringIndex = il(
|
|
366
|
+
O,
|
|
367
|
+
a || s
|
|
368
|
+
);
|
|
369
|
+
}, he = () => {
|
|
370
|
+
if (e.multiple)
|
|
371
|
+
t.selectedLabel = "";
|
|
372
|
+
else {
|
|
373
|
+
const a = Y(e.modelValue) ? e.modelValue[0] : e.modelValue, s = Be(a);
|
|
374
|
+
t.selectedLabel = s.currentLabel, t.selected = [s];
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
const l = [];
|
|
378
|
+
Ie(e.modelValue) || J(e.modelValue).forEach((a) => {
|
|
379
|
+
l.push(Be(a));
|
|
380
|
+
}), t.selected = l;
|
|
381
|
+
}, Be = (l) => {
|
|
382
|
+
let a;
|
|
383
|
+
const s = $t(l);
|
|
384
|
+
for (let N = t.cachedOptions.size - 1; N >= 0; N--) {
|
|
385
|
+
const P = Fl.value[N];
|
|
386
|
+
if (s ? U(P.value, e.valueKey) === U(l, e.valueKey) : P.value === l) {
|
|
387
|
+
a = {
|
|
388
|
+
index: D.value.filter((_) => !_.created).indexOf(P),
|
|
389
|
+
value: l,
|
|
390
|
+
currentLabel: P.currentLabel,
|
|
391
|
+
get isDisabled() {
|
|
392
|
+
return P.isDisabled;
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
if (a)
|
|
399
|
+
return a;
|
|
400
|
+
const O = s ? l.label : l ?? "";
|
|
401
|
+
return {
|
|
402
|
+
index: -1,
|
|
403
|
+
value: l,
|
|
404
|
+
currentLabel: O
|
|
405
|
+
};
|
|
406
|
+
}, Gl = () => {
|
|
407
|
+
const l = t.selected.length;
|
|
408
|
+
if (l > 0) {
|
|
409
|
+
const a = t.selected[l - 1];
|
|
410
|
+
t.hoveringIndex = D.value.findIndex(
|
|
411
|
+
(s) => Se(a) === Se(s)
|
|
412
|
+
);
|
|
413
|
+
} else
|
|
414
|
+
t.hoveringIndex = -1;
|
|
415
|
+
}, Ql = () => {
|
|
416
|
+
t.selectionWidth = Number.parseFloat(
|
|
417
|
+
window.getComputedStyle(f.value).width
|
|
418
|
+
);
|
|
419
|
+
}, ql = () => {
|
|
420
|
+
t.collapseItemWidth = u.value.getBoundingClientRect().width;
|
|
421
|
+
}, We = () => {
|
|
422
|
+
var l, a;
|
|
423
|
+
(a = (l = y.value) == null ? void 0 : l.updatePopper) == null || a.call(l);
|
|
424
|
+
}, el = () => {
|
|
425
|
+
var l, a;
|
|
426
|
+
(a = (l = S.value) == null ? void 0 : l.updatePopper) == null || a.call(l);
|
|
427
|
+
}, ll = () => {
|
|
428
|
+
t.inputValue.length > 0 && !o.value && (o.value = !0), ge(t.inputValue);
|
|
429
|
+
}, tl = (l) => {
|
|
430
|
+
if (t.inputValue = l.target.value, e.remote)
|
|
431
|
+
k.value = !0, nl();
|
|
432
|
+
else
|
|
433
|
+
return ll();
|
|
434
|
+
}, nl = Mt(() => {
|
|
435
|
+
ll(), k.value = !1;
|
|
436
|
+
}, Wl), re = (l) => {
|
|
437
|
+
te(e.modelValue, l) || n(El, l);
|
|
438
|
+
}, Yl = (l) => Nt(l, (a) => {
|
|
439
|
+
const s = t.cachedOptions.get(a);
|
|
440
|
+
return !s?.disabled && !s?.states.groupDisabled;
|
|
441
|
+
}), al = (l) => {
|
|
442
|
+
const a = bl(l);
|
|
443
|
+
if (e.multiple && a !== H.delete && l.target.value.length <= 0) {
|
|
444
|
+
const s = J(e.modelValue).slice(), O = Yl(s);
|
|
445
|
+
if (O < 0)
|
|
446
|
+
return;
|
|
447
|
+
const C = s[O];
|
|
448
|
+
s.splice(O, 1), n(ne, s), re(s), n("remove-tag", C);
|
|
449
|
+
}
|
|
450
|
+
}, Zl = (l, a) => {
|
|
451
|
+
const s = t.selected.indexOf(a);
|
|
452
|
+
if (s > -1 && !se.value) {
|
|
453
|
+
const O = J(e.modelValue).slice();
|
|
454
|
+
O.splice(s, 1), n(ne, O), re(O), n("remove-tag", a.value);
|
|
455
|
+
}
|
|
456
|
+
l.stopPropagation(), ye();
|
|
457
|
+
}, ol = (l) => {
|
|
458
|
+
l.stopPropagation();
|
|
459
|
+
const a = e.multiple ? [] : qe.value;
|
|
460
|
+
if (e.multiple)
|
|
461
|
+
for (const s of t.selected)
|
|
462
|
+
s.isDisabled && a.push(s.value);
|
|
463
|
+
n(ne, a), re(a), t.hoveringIndex = -1, o.value = !1, n("clear"), ye();
|
|
464
|
+
}, sl = (l) => {
|
|
465
|
+
var a;
|
|
466
|
+
if (e.multiple) {
|
|
467
|
+
const s = J((a = e.modelValue) != null ? a : []).slice(), O = il(s, l);
|
|
468
|
+
O > -1 ? s.splice(O, 1) : (e.multipleLimit <= 0 || s.length < e.multipleLimit) && s.push(l.value), n(ne, s), re(s), l.created && ge(""), e.filterable && !e.reserveKeyword && (t.inputValue = "");
|
|
469
|
+
} else
|
|
470
|
+
!te(e.modelValue, l.value) && n(ne, l.value), re(l.value), o.value = !1;
|
|
471
|
+
ye(), !o.value && G(() => {
|
|
472
|
+
ue(l);
|
|
473
|
+
});
|
|
474
|
+
}, il = (l, a) => Ie(a) ? -1 : q(a.value) ? l.findIndex((s) => te(U(s, e.valueKey), Se(a))) : l.indexOf(a.value), ue = (l) => {
|
|
475
|
+
var a, s, O, C, N;
|
|
476
|
+
const P = Y(l) ? l[l.length - 1] : l;
|
|
477
|
+
let x = null;
|
|
478
|
+
if (!Lt(P?.value)) {
|
|
479
|
+
const _ = D.value.filter(
|
|
480
|
+
(ct) => ct.value === P.value
|
|
481
|
+
);
|
|
482
|
+
_.length > 0 && (x = _[0].$el);
|
|
483
|
+
}
|
|
484
|
+
if (y.value && x) {
|
|
485
|
+
const _ = (C = (O = (s = (a = y.value) == null ? void 0 : a.popperRef) == null ? void 0 : s.contentRef) == null ? void 0 : O.querySelector) == null ? void 0 : C.call(
|
|
486
|
+
O,
|
|
487
|
+
`.${p.be("dropdown", "wrap")}`
|
|
488
|
+
);
|
|
489
|
+
_ && _t(_, x);
|
|
490
|
+
}
|
|
491
|
+
(N = $.value) == null || N.handleScroll();
|
|
492
|
+
}, Jl = (l) => {
|
|
493
|
+
t.options.set(l.value, l), t.cachedOptions.set(l.value, l);
|
|
494
|
+
}, Xl = (l, a) => {
|
|
495
|
+
t.options.get(l) === a && t.options.delete(l);
|
|
496
|
+
}, xl = c(() => {
|
|
497
|
+
var l, a;
|
|
498
|
+
return (a = (l = y.value) == null ? void 0 : l.popperRef) == null ? void 0 : a.contentRef;
|
|
499
|
+
}), _l = () => {
|
|
500
|
+
t.isBeforeHide = !1, G(() => {
|
|
501
|
+
var l;
|
|
502
|
+
(l = $.value) == null || l.update(), ue(t.selected);
|
|
503
|
+
});
|
|
504
|
+
}, ye = () => {
|
|
505
|
+
var l;
|
|
506
|
+
(l = E.value) == null || l.focus();
|
|
507
|
+
}, et = () => {
|
|
508
|
+
var l;
|
|
509
|
+
if (o.value) {
|
|
510
|
+
o.value = !1, G(() => {
|
|
511
|
+
var a;
|
|
512
|
+
return (a = E.value) == null ? void 0 : a.blur();
|
|
513
|
+
});
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
(l = E.value) == null || l.blur();
|
|
517
|
+
}, lt = (l) => {
|
|
518
|
+
ol(l);
|
|
519
|
+
}, tt = (l) => {
|
|
520
|
+
if (o.value = !1, Me.value) {
|
|
521
|
+
const a = new FocusEvent("blur", l);
|
|
522
|
+
G(() => $l(a));
|
|
523
|
+
}
|
|
524
|
+
}, rl = () => {
|
|
525
|
+
t.inputValue.length > 0 ? t.inputValue = "" : o.value = !1;
|
|
526
|
+
}, ul = (l) => {
|
|
527
|
+
var a;
|
|
528
|
+
se.value || e.filterable && o.value && l && !((a = d.value) != null && a.contains(l.target)) || (vl && (t.inputHovering = !0), t.menuVisibleOnFocus ? t.menuVisibleOnFocus = !1 : o.value = !o.value);
|
|
529
|
+
}, dl = () => {
|
|
530
|
+
if (!o.value)
|
|
531
|
+
ul();
|
|
532
|
+
else {
|
|
533
|
+
const l = D.value[t.hoveringIndex];
|
|
534
|
+
l && !l.isDisabled && sl(l);
|
|
535
|
+
}
|
|
536
|
+
}, Se = (l) => q(l.value) ? U(l.value, e.valueKey) : l.value, nt = c(
|
|
537
|
+
() => D.value.filter((l) => l.visible).every((l) => l.isDisabled)
|
|
538
|
+
), at = c(() => e.multiple ? e.collapseTags ? t.selected.slice(0, e.maxCollapseTags) : t.selected : []), ot = c(() => e.multiple ? e.collapseTags ? t.selected.slice(e.maxCollapseTags) : [] : []), Oe = (l) => {
|
|
539
|
+
if (!o.value) {
|
|
540
|
+
o.value = !0;
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
if (!(t.options.size === 0 || ie.value === 0 || $e.value) && !nt.value) {
|
|
544
|
+
l === "next" ? (t.hoveringIndex++, t.hoveringIndex === t.options.size && (t.hoveringIndex = 0)) : l === "prev" && (t.hoveringIndex--, t.hoveringIndex < 0 && (t.hoveringIndex = t.options.size - 1));
|
|
545
|
+
const a = D.value[t.hoveringIndex];
|
|
546
|
+
(a.isDisabled || !a.visible) && Oe(l), G(() => ue(M.value));
|
|
547
|
+
}
|
|
548
|
+
}, cl = (l, a, s, O) => {
|
|
549
|
+
for (let C = a; C >= 0 && C < O; C += s) {
|
|
550
|
+
const N = l[C];
|
|
551
|
+
if (!N?.isDisabled && N?.visible)
|
|
552
|
+
return C;
|
|
553
|
+
}
|
|
554
|
+
return null;
|
|
555
|
+
}, we = (l, a) => {
|
|
556
|
+
var s;
|
|
557
|
+
const O = t.options.size;
|
|
558
|
+
if (O === 0)
|
|
559
|
+
return;
|
|
560
|
+
const C = Bt(l, 0, O - 1), N = D.value, P = a === "up" ? -1 : 1, x = (s = cl(N, C, P, O)) != null ? s : cl(N, C - P, -P, O);
|
|
561
|
+
x != null && (t.hoveringIndex = x, G(() => ue(M.value)));
|
|
562
|
+
}, st = (l) => {
|
|
563
|
+
const a = bl(l);
|
|
564
|
+
let s = !0;
|
|
565
|
+
switch (a) {
|
|
566
|
+
case H.up:
|
|
567
|
+
Oe("prev");
|
|
568
|
+
break;
|
|
569
|
+
case H.down:
|
|
570
|
+
Oe("next");
|
|
571
|
+
break;
|
|
572
|
+
case H.enter:
|
|
573
|
+
case H.numpadEnter:
|
|
574
|
+
$e.value || dl();
|
|
575
|
+
break;
|
|
576
|
+
case H.esc:
|
|
577
|
+
rl();
|
|
578
|
+
break;
|
|
579
|
+
case H.backspace:
|
|
580
|
+
s = !1, al(l);
|
|
581
|
+
return;
|
|
582
|
+
case H.home:
|
|
583
|
+
if (!o.value)
|
|
584
|
+
return;
|
|
585
|
+
we(0, "down");
|
|
586
|
+
break;
|
|
587
|
+
case H.end:
|
|
588
|
+
if (!o.value)
|
|
589
|
+
return;
|
|
590
|
+
we(t.options.size - 1, "up");
|
|
591
|
+
break;
|
|
592
|
+
case H.pageUp:
|
|
593
|
+
if (!o.value)
|
|
594
|
+
return;
|
|
595
|
+
we(t.hoveringIndex - 10, "up");
|
|
596
|
+
break;
|
|
597
|
+
case H.pageDown:
|
|
598
|
+
if (!o.value)
|
|
599
|
+
return;
|
|
600
|
+
we(t.hoveringIndex + 10, "down");
|
|
601
|
+
break;
|
|
602
|
+
default:
|
|
603
|
+
s = !1;
|
|
604
|
+
break;
|
|
605
|
+
}
|
|
606
|
+
s && (l.preventDefault(), l.stopPropagation());
|
|
607
|
+
}, it = () => {
|
|
608
|
+
if (!f.value)
|
|
609
|
+
return 0;
|
|
610
|
+
const l = window.getComputedStyle(f.value);
|
|
611
|
+
return Number.parseFloat(l.gap || "6px");
|
|
612
|
+
}, rt = c(() => {
|
|
613
|
+
const l = it(), a = e.filterable ? l + Vl : 0;
|
|
614
|
+
return { maxWidth: `${u.value && e.maxCollapseTags === 1 ? t.selectionWidth - t.collapseItemWidth - l - a : t.selectionWidth - a}px` };
|
|
615
|
+
}), ut = c(() => ({ maxWidth: `${t.selectionWidth}px` })), dt = (l) => {
|
|
616
|
+
n("popup-scroll", l);
|
|
617
|
+
};
|
|
618
|
+
le(f, Ql), le(Ye, We), le(b, el), le(u, ql);
|
|
619
|
+
let Ce;
|
|
620
|
+
return K(
|
|
621
|
+
() => xe.value,
|
|
622
|
+
(l) => {
|
|
623
|
+
l ? Ce = le(w, We).stop : (Ce?.(), Ce = void 0), n("visible-change", l);
|
|
624
|
+
}
|
|
625
|
+
), je(() => {
|
|
626
|
+
he();
|
|
627
|
+
}), {
|
|
628
|
+
inputId: j,
|
|
629
|
+
contentId: h,
|
|
630
|
+
nsSelect: p,
|
|
631
|
+
nsInput: g,
|
|
632
|
+
states: t,
|
|
633
|
+
isFocused: Me,
|
|
634
|
+
expanded: o,
|
|
635
|
+
optionsArray: D,
|
|
636
|
+
hoverOption: M,
|
|
637
|
+
selectSize: Xe,
|
|
638
|
+
filteredOptionsCount: ie,
|
|
639
|
+
updateTooltip: We,
|
|
640
|
+
updateTagTooltip: el,
|
|
641
|
+
debouncedOnInputChange: nl,
|
|
642
|
+
onInput: tl,
|
|
643
|
+
deletePrevTag: al,
|
|
644
|
+
deleteTag: Zl,
|
|
645
|
+
deleteSelected: ol,
|
|
646
|
+
handleOptionSelect: sl,
|
|
647
|
+
scrollToOption: ue,
|
|
648
|
+
hasModelValue: Le,
|
|
649
|
+
shouldShowPlaceholder: Kl,
|
|
650
|
+
currentPlaceholder: Ul,
|
|
651
|
+
mouseEnterEventName: jl,
|
|
652
|
+
needStatusIcon: Ml,
|
|
653
|
+
showClearBtn: Ll,
|
|
654
|
+
iconComponent: Ze,
|
|
655
|
+
iconReverse: Nl,
|
|
656
|
+
validateState: Ne,
|
|
657
|
+
validateIcon: Bl,
|
|
658
|
+
showNewOption: Hl,
|
|
659
|
+
updateOptions: Je,
|
|
660
|
+
collapseTagSize: Al,
|
|
661
|
+
setSelected: he,
|
|
662
|
+
selectDisabled: se,
|
|
663
|
+
emptyText: zl,
|
|
664
|
+
handleCompositionStart: kl,
|
|
665
|
+
handleCompositionUpdate: Dl,
|
|
666
|
+
handleCompositionEnd: Rl,
|
|
667
|
+
handleKeydown: st,
|
|
668
|
+
onOptionCreate: Jl,
|
|
669
|
+
onOptionDestroy: Xl,
|
|
670
|
+
handleMenuEnter: _l,
|
|
671
|
+
focus: ye,
|
|
672
|
+
blur: et,
|
|
673
|
+
handleClearClick: lt,
|
|
674
|
+
handleClickOutside: tt,
|
|
675
|
+
handleEsc: rl,
|
|
676
|
+
toggleMenu: ul,
|
|
677
|
+
selectOption: dl,
|
|
678
|
+
getValueKey: Se,
|
|
679
|
+
navigateOptions: Oe,
|
|
680
|
+
dropdownMenuVisible: xe,
|
|
681
|
+
showTagList: at,
|
|
682
|
+
collapseTagList: ot,
|
|
683
|
+
popupScroll: dt,
|
|
684
|
+
getOption: Be,
|
|
685
|
+
tagStyle: rt,
|
|
686
|
+
collapseTagStyle: ut,
|
|
687
|
+
popperRef: xl,
|
|
688
|
+
inputRef: E,
|
|
689
|
+
tooltipRef: y,
|
|
690
|
+
tagTooltipRef: S,
|
|
691
|
+
prefixRef: I,
|
|
692
|
+
suffixRef: d,
|
|
693
|
+
selectRef: i,
|
|
694
|
+
wrapperRef: Ye,
|
|
695
|
+
selectionRef: f,
|
|
696
|
+
scrollbarRef: $,
|
|
697
|
+
menuRef: w,
|
|
698
|
+
tagMenuRef: b,
|
|
699
|
+
collapseItemRef: u
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
var vn = me({
|
|
703
|
+
name: "ElOptions",
|
|
704
|
+
setup(e, { slots: n }) {
|
|
705
|
+
const r = Te(Re);
|
|
706
|
+
let h = [];
|
|
707
|
+
return () => {
|
|
708
|
+
var p, g;
|
|
709
|
+
const t = (p = n.default) == null ? void 0 : p.call(n), i = [];
|
|
710
|
+
function f(y) {
|
|
711
|
+
Y(y) && y.forEach((S) => {
|
|
712
|
+
var E, I, d, w;
|
|
713
|
+
const b = (E = S?.type || {}) == null ? void 0 : E.name;
|
|
714
|
+
b === "ElOptionGroup" ? f(
|
|
715
|
+
!Wt(S.children) && !Y(S.children) && ce((I = S.children) == null ? void 0 : I.default) ? (d = S.children) == null ? void 0 : d.default() : S.children
|
|
716
|
+
) : b === "ElOption" ? i.push((w = S.props) == null ? void 0 : w.value) : Y(S.children) && f(S.children);
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
return t.length && f((g = t[0]) == null ? void 0 : g.children), te(i, h) || (h = i, r && (r.states.optionValues = i)), t;
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
const bn = wl({
|
|
724
|
+
name: String,
|
|
725
|
+
id: String,
|
|
726
|
+
modelValue: {
|
|
727
|
+
type: A([
|
|
728
|
+
Array,
|
|
729
|
+
String,
|
|
730
|
+
Number,
|
|
731
|
+
Boolean,
|
|
732
|
+
Object
|
|
733
|
+
]),
|
|
734
|
+
default: void 0
|
|
735
|
+
},
|
|
736
|
+
autocomplete: {
|
|
737
|
+
type: String,
|
|
738
|
+
default: "off"
|
|
739
|
+
},
|
|
740
|
+
automaticDropdown: Boolean,
|
|
741
|
+
size: At,
|
|
742
|
+
effect: {
|
|
743
|
+
type: A(String),
|
|
744
|
+
default: "light"
|
|
745
|
+
},
|
|
746
|
+
disabled: {
|
|
747
|
+
type: Boolean,
|
|
748
|
+
default: void 0
|
|
749
|
+
},
|
|
750
|
+
clearable: Boolean,
|
|
751
|
+
filterable: Boolean,
|
|
752
|
+
allowCreate: Boolean,
|
|
753
|
+
loading: Boolean,
|
|
754
|
+
popperClass: {
|
|
755
|
+
type: String,
|
|
756
|
+
default: ""
|
|
757
|
+
},
|
|
758
|
+
popperStyle: {
|
|
759
|
+
type: A([String, Object])
|
|
760
|
+
},
|
|
761
|
+
popperOptions: {
|
|
762
|
+
type: A(Object),
|
|
763
|
+
default: () => ({})
|
|
764
|
+
},
|
|
765
|
+
remote: Boolean,
|
|
766
|
+
debounce: {
|
|
767
|
+
type: Number,
|
|
768
|
+
default: 300
|
|
769
|
+
},
|
|
770
|
+
loadingText: String,
|
|
771
|
+
noMatchText: String,
|
|
772
|
+
noDataText: String,
|
|
773
|
+
remoteMethod: {
|
|
774
|
+
type: A(Function)
|
|
775
|
+
},
|
|
776
|
+
filterMethod: {
|
|
777
|
+
type: A(Function)
|
|
778
|
+
},
|
|
779
|
+
multiple: Boolean,
|
|
780
|
+
multipleLimit: {
|
|
781
|
+
type: Number,
|
|
782
|
+
default: 0
|
|
783
|
+
},
|
|
784
|
+
placeholder: {
|
|
785
|
+
type: String
|
|
786
|
+
},
|
|
787
|
+
defaultFirstOption: Boolean,
|
|
788
|
+
reserveKeyword: {
|
|
789
|
+
type: Boolean,
|
|
790
|
+
default: !0
|
|
791
|
+
},
|
|
792
|
+
valueKey: {
|
|
793
|
+
type: String,
|
|
794
|
+
default: "value"
|
|
795
|
+
},
|
|
796
|
+
collapseTags: Boolean,
|
|
797
|
+
collapseTagsTooltip: Boolean,
|
|
798
|
+
maxCollapseTags: {
|
|
799
|
+
type: Number,
|
|
800
|
+
default: 1
|
|
801
|
+
},
|
|
802
|
+
teleported: ml.teleported,
|
|
803
|
+
persistent: {
|
|
804
|
+
type: Boolean,
|
|
805
|
+
default: !0
|
|
806
|
+
},
|
|
807
|
+
clearIcon: {
|
|
808
|
+
type: gl,
|
|
809
|
+
default: Ht
|
|
810
|
+
},
|
|
811
|
+
fitInputWidth: Boolean,
|
|
812
|
+
suffixIcon: {
|
|
813
|
+
type: gl,
|
|
814
|
+
default: Ft
|
|
815
|
+
},
|
|
816
|
+
tagType: { ...hl.type, default: "info" },
|
|
817
|
+
tagEffect: { ...hl.effect, default: "light" },
|
|
818
|
+
validateEvent: {
|
|
819
|
+
type: Boolean,
|
|
820
|
+
default: !0
|
|
821
|
+
},
|
|
822
|
+
remoteShowSuffix: Boolean,
|
|
823
|
+
showArrow: {
|
|
824
|
+
type: Boolean,
|
|
825
|
+
default: !0
|
|
826
|
+
},
|
|
827
|
+
offset: {
|
|
828
|
+
type: Number,
|
|
829
|
+
default: 12
|
|
830
|
+
},
|
|
831
|
+
placement: {
|
|
832
|
+
type: A(String),
|
|
833
|
+
values: zt,
|
|
834
|
+
default: "bottom-start"
|
|
835
|
+
},
|
|
836
|
+
fallbackPlacements: {
|
|
837
|
+
type: A(Array),
|
|
838
|
+
default: ["bottom-start", "top-start", "right", "left"]
|
|
839
|
+
},
|
|
840
|
+
tabindex: {
|
|
841
|
+
type: [String, Number],
|
|
842
|
+
default: 0
|
|
843
|
+
},
|
|
844
|
+
appendTo: ml.appendTo,
|
|
845
|
+
options: {
|
|
846
|
+
type: A(Array)
|
|
847
|
+
},
|
|
848
|
+
props: {
|
|
849
|
+
type: A(Object),
|
|
850
|
+
default: () => He
|
|
851
|
+
},
|
|
852
|
+
...xt,
|
|
853
|
+
...Pt(["ariaLabel"])
|
|
854
|
+
});
|
|
855
|
+
Qt.scroll;
|
|
856
|
+
const mn = me({
|
|
857
|
+
name: "ElOptionGroup",
|
|
858
|
+
componentName: "ElOptionGroup",
|
|
859
|
+
props: {
|
|
860
|
+
label: String,
|
|
861
|
+
disabled: Boolean
|
|
862
|
+
},
|
|
863
|
+
setup(e) {
|
|
864
|
+
const n = ve("select"), r = T(), h = ke(), p = T([]);
|
|
865
|
+
Ol(
|
|
866
|
+
Tl,
|
|
867
|
+
fe({
|
|
868
|
+
...Ue(e)
|
|
869
|
+
})
|
|
870
|
+
);
|
|
871
|
+
const g = c(
|
|
872
|
+
() => p.value.some((y) => y.visible === !0)
|
|
873
|
+
), t = (y) => {
|
|
874
|
+
var S;
|
|
875
|
+
return y.type.name === "ElOption" && !!((S = y.component) != null && S.proxy);
|
|
876
|
+
}, i = (y) => {
|
|
877
|
+
const S = J(y), E = [];
|
|
878
|
+
return S.forEach((I) => {
|
|
879
|
+
var d;
|
|
880
|
+
bt(I) && (t(I) ? E.push(I.component.proxy) : Y(I.children) && I.children.length ? E.push(...i(I.children)) : (d = I.component) != null && d.subTree && E.push(...i(I.component.subTree)));
|
|
881
|
+
}), E;
|
|
882
|
+
}, f = () => {
|
|
883
|
+
p.value = i(h.subTree);
|
|
884
|
+
};
|
|
885
|
+
return je(() => {
|
|
886
|
+
f();
|
|
887
|
+
}), Kt(r, f, {
|
|
888
|
+
attributes: !0,
|
|
889
|
+
subtree: !0,
|
|
890
|
+
childList: !0
|
|
891
|
+
}), {
|
|
892
|
+
groupRef: r,
|
|
893
|
+
visible: g,
|
|
894
|
+
ns: n
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
});
|
|
898
|
+
function gn(e, n, r, h, p, g) {
|
|
899
|
+
return pe((v(), V(
|
|
900
|
+
"ul",
|
|
901
|
+
{
|
|
902
|
+
ref: "groupRef",
|
|
903
|
+
class: m(e.ns.be("group", "wrap"))
|
|
904
|
+
},
|
|
905
|
+
[
|
|
906
|
+
R(
|
|
907
|
+
"li",
|
|
908
|
+
{
|
|
909
|
+
class: m(e.ns.be("group", "title"))
|
|
910
|
+
},
|
|
911
|
+
Q(e.label),
|
|
912
|
+
3
|
|
913
|
+
),
|
|
914
|
+
R("li", null, [
|
|
915
|
+
R(
|
|
916
|
+
"ul",
|
|
917
|
+
{
|
|
918
|
+
class: m(e.ns.b("group"))
|
|
919
|
+
},
|
|
920
|
+
[
|
|
921
|
+
L(e.$slots, "default")
|
|
922
|
+
],
|
|
923
|
+
2
|
|
924
|
+
)
|
|
925
|
+
])
|
|
926
|
+
],
|
|
927
|
+
2
|
|
928
|
+
)), [
|
|
929
|
+
[Ke, e.visible]
|
|
930
|
+
]);
|
|
931
|
+
}
|
|
932
|
+
var Qe = /* @__PURE__ */ De(mn, [["render", gn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);
|
|
933
|
+
const yl = "ElSelect", be = /* @__PURE__ */ new WeakMap(), hn = (e) => (...n) => {
|
|
934
|
+
var r, h;
|
|
935
|
+
const p = n[0];
|
|
936
|
+
if (!p || p.includes(
|
|
937
|
+
'Slot "default" invoked outside of the render function'
|
|
938
|
+
) && ((r = n[2]) != null && r.includes("ElTreeSelect")))
|
|
939
|
+
return;
|
|
940
|
+
const g = (h = be.get(e)) == null ? void 0 : h.originalWarnHandler;
|
|
941
|
+
if (g) {
|
|
942
|
+
g(...n);
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
console.warn(...n);
|
|
946
|
+
}, yn = (e) => {
|
|
947
|
+
let n = be.get(e);
|
|
948
|
+
return n || (n = {
|
|
949
|
+
originalWarnHandler: e.config.warnHandler,
|
|
950
|
+
handler: hn(e),
|
|
951
|
+
count: 0
|
|
952
|
+
}, be.set(e, n)), n;
|
|
953
|
+
}, Sn = me({
|
|
954
|
+
name: yl,
|
|
955
|
+
componentName: yl,
|
|
956
|
+
components: {
|
|
957
|
+
ElSelectMenu: pn,
|
|
958
|
+
ElOption: Ge,
|
|
959
|
+
ElOptions: vn,
|
|
960
|
+
ElOptionGroup: Qe,
|
|
961
|
+
ElTag: Zt,
|
|
962
|
+
ElScrollbar: qt,
|
|
963
|
+
ElTooltip: jt,
|
|
964
|
+
ElIcon: Ut
|
|
965
|
+
},
|
|
966
|
+
directives: { ClickOutside: Yt },
|
|
967
|
+
props: bn,
|
|
968
|
+
emits: [
|
|
969
|
+
ne,
|
|
970
|
+
El,
|
|
971
|
+
"remove-tag",
|
|
972
|
+
"clear",
|
|
973
|
+
"visible-change",
|
|
974
|
+
"focus",
|
|
975
|
+
"blur",
|
|
976
|
+
"popup-scroll"
|
|
977
|
+
],
|
|
978
|
+
setup(e, { emit: n, slots: r }) {
|
|
979
|
+
const h = ke(), p = yn(h.appContext);
|
|
980
|
+
p.count += 1, h.appContext.config.warnHandler = p.handler;
|
|
981
|
+
const g = c(() => {
|
|
982
|
+
const { modelValue: o, multiple: M } = e, k = M ? [] : void 0;
|
|
983
|
+
return Y(o) ? M ? o : k : M ? k : o;
|
|
984
|
+
}), t = fe({
|
|
985
|
+
...Ue(e),
|
|
986
|
+
modelValue: g
|
|
987
|
+
}), i = fn(t, n), { calculatorRef: f, inputStyle: y } = tn(), { getLabel: S, getValue: E, getOptions: I, getDisabled: d } = nn(e), w = (o) => ({
|
|
988
|
+
label: S(o),
|
|
989
|
+
value: E(o),
|
|
990
|
+
disabled: d(o)
|
|
991
|
+
}), b = (o) => o.reduce((M, k) => (M.push(k), k.children && k.children.length > 0 && M.push(...b(k.children)), M), []), u = (o) => {
|
|
992
|
+
en(o || []).forEach((k) => {
|
|
993
|
+
var oe;
|
|
994
|
+
if (q(k) && (k.type.name === "ElOption" || k.type.name === "ElTree")) {
|
|
995
|
+
const z = k.type.name;
|
|
996
|
+
if (z === "ElTree") {
|
|
997
|
+
const j = ((oe = k.props) == null ? void 0 : oe.data) || [];
|
|
998
|
+
b(j).forEach((X) => {
|
|
999
|
+
X.currentLabel = X.label || (q(X.value) ? "" : X.value), i.onOptionCreate(X);
|
|
1000
|
+
});
|
|
1001
|
+
} else if (z === "ElOption") {
|
|
1002
|
+
const j = { ...k.props };
|
|
1003
|
+
j.currentLabel = j.label || (q(j.value) ? "" : j.value), i.onOptionCreate(j);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
};
|
|
1008
|
+
K(
|
|
1009
|
+
() => {
|
|
1010
|
+
var o;
|
|
1011
|
+
return [(o = r.default) == null ? void 0 : o.call(r), g.value];
|
|
1012
|
+
},
|
|
1013
|
+
() => {
|
|
1014
|
+
var o;
|
|
1015
|
+
e.persistent || i.expanded.value || (i.states.options.clear(), u((o = r.default) == null ? void 0 : o.call(r)));
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
immediate: !0
|
|
1019
|
+
}
|
|
1020
|
+
), Ol(
|
|
1021
|
+
Re,
|
|
1022
|
+
fe({
|
|
1023
|
+
props: t,
|
|
1024
|
+
states: i.states,
|
|
1025
|
+
selectRef: i.selectRef,
|
|
1026
|
+
optionsArray: i.optionsArray,
|
|
1027
|
+
setSelected: i.setSelected,
|
|
1028
|
+
handleOptionSelect: i.handleOptionSelect,
|
|
1029
|
+
onOptionCreate: i.onOptionCreate,
|
|
1030
|
+
onOptionDestroy: i.onOptionDestroy
|
|
1031
|
+
})
|
|
1032
|
+
);
|
|
1033
|
+
const $ = c(() => e.multiple ? i.states.selected.map((o) => o.currentLabel) : i.states.selectedLabel);
|
|
1034
|
+
return Sl(() => {
|
|
1035
|
+
const o = be.get(h.appContext);
|
|
1036
|
+
o && (o.count -= 1, o.count <= 0 && (h.appContext.config.warnHandler = o.originalWarnHandler, be.delete(h.appContext)));
|
|
1037
|
+
}), {
|
|
1038
|
+
...i,
|
|
1039
|
+
modelValue: g,
|
|
1040
|
+
selectedLabel: $,
|
|
1041
|
+
calculatorRef: f,
|
|
1042
|
+
inputStyle: y,
|
|
1043
|
+
getLabel: S,
|
|
1044
|
+
getValue: E,
|
|
1045
|
+
getOptions: I,
|
|
1046
|
+
getDisabled: d,
|
|
1047
|
+
getOptionProps: w
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
}), On = ["id", "name", "disabled", "autocomplete", "tabindex", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label"], wn = ["textContent"], Cn = { key: 1 };
|
|
1051
|
+
function En(e, n, r, h, p, g) {
|
|
1052
|
+
const t = Z("el-tag"), i = Z("el-tooltip"), f = Z("el-icon"), y = Z("el-option"), S = Z("el-option-group"), E = Z("el-options"), I = Z("el-scrollbar"), d = Z("el-select-menu"), w = mt("click-outside");
|
|
1053
|
+
return pe((v(), V(
|
|
1054
|
+
"div",
|
|
1055
|
+
ze({
|
|
1056
|
+
ref: "selectRef",
|
|
1057
|
+
class: [e.nsSelect.b(), e.nsSelect.m(e.selectSize)]
|
|
1058
|
+
}, {
|
|
1059
|
+
[gt(e.mouseEnterEventName)]: n[11] || (n[11] = (b) => e.states.inputHovering = !0)
|
|
1060
|
+
}, {
|
|
1061
|
+
onMouseleave: n[12] || (n[12] = (b) => e.states.inputHovering = !1)
|
|
1062
|
+
}),
|
|
1063
|
+
[
|
|
1064
|
+
ee(i, {
|
|
1065
|
+
ref: "tooltipRef",
|
|
1066
|
+
visible: e.dropdownMenuVisible,
|
|
1067
|
+
placement: e.placement,
|
|
1068
|
+
teleported: e.teleported,
|
|
1069
|
+
"popper-class": [e.nsSelect.e("popper"), e.popperClass],
|
|
1070
|
+
"popper-style": e.popperStyle,
|
|
1071
|
+
"popper-options": e.popperOptions,
|
|
1072
|
+
"fallback-placements": e.fallbackPlacements,
|
|
1073
|
+
effect: e.effect,
|
|
1074
|
+
pure: "",
|
|
1075
|
+
trigger: "click",
|
|
1076
|
+
transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
|
|
1077
|
+
"stop-popper-mouse-event": !1,
|
|
1078
|
+
"gpu-acceleration": !1,
|
|
1079
|
+
persistent: e.persistent,
|
|
1080
|
+
"append-to": e.appendTo,
|
|
1081
|
+
"show-arrow": e.showArrow,
|
|
1082
|
+
offset: e.offset,
|
|
1083
|
+
onBeforeShow: e.handleMenuEnter,
|
|
1084
|
+
onHide: n[10] || (n[10] = (b) => e.states.isBeforeHide = !1)
|
|
1085
|
+
}, {
|
|
1086
|
+
default: B(() => {
|
|
1087
|
+
var b;
|
|
1088
|
+
return [
|
|
1089
|
+
R(
|
|
1090
|
+
"div",
|
|
1091
|
+
{
|
|
1092
|
+
ref: "wrapperRef",
|
|
1093
|
+
class: m([
|
|
1094
|
+
e.nsSelect.e("wrapper"),
|
|
1095
|
+
e.nsSelect.is("focused", e.isFocused),
|
|
1096
|
+
e.nsSelect.is("hovering", e.states.inputHovering),
|
|
1097
|
+
e.nsSelect.is("filterable", e.filterable),
|
|
1098
|
+
e.nsSelect.is("disabled", e.selectDisabled)
|
|
1099
|
+
]),
|
|
1100
|
+
onClick: n[7] || (n[7] = ae((...u) => e.toggleMenu && e.toggleMenu(...u), ["prevent"]))
|
|
1101
|
+
},
|
|
1102
|
+
[
|
|
1103
|
+
e.$slots.prefix ? (v(), V(
|
|
1104
|
+
"div",
|
|
1105
|
+
{
|
|
1106
|
+
key: 0,
|
|
1107
|
+
ref: "prefixRef",
|
|
1108
|
+
class: m(e.nsSelect.e("prefix"))
|
|
1109
|
+
},
|
|
1110
|
+
[
|
|
1111
|
+
L(e.$slots, "prefix")
|
|
1112
|
+
],
|
|
1113
|
+
2
|
|
1114
|
+
)) : W("v-if", !0),
|
|
1115
|
+
R(
|
|
1116
|
+
"div",
|
|
1117
|
+
{
|
|
1118
|
+
ref: "selectionRef",
|
|
1119
|
+
class: m([
|
|
1120
|
+
e.nsSelect.e("selection"),
|
|
1121
|
+
e.nsSelect.is(
|
|
1122
|
+
"near",
|
|
1123
|
+
e.multiple && !e.$slots.prefix && !!e.states.selected.length
|
|
1124
|
+
)
|
|
1125
|
+
])
|
|
1126
|
+
},
|
|
1127
|
+
[
|
|
1128
|
+
e.multiple ? L(e.$slots, "tag", {
|
|
1129
|
+
key: 0,
|
|
1130
|
+
data: e.states.selected,
|
|
1131
|
+
deleteTag: e.deleteTag,
|
|
1132
|
+
selectDisabled: e.selectDisabled
|
|
1133
|
+
}, () => [
|
|
1134
|
+
(v(!0), V(
|
|
1135
|
+
de,
|
|
1136
|
+
null,
|
|
1137
|
+
Ee(e.showTagList, (u) => (v(), V(
|
|
1138
|
+
"div",
|
|
1139
|
+
{
|
|
1140
|
+
key: e.getValueKey(u),
|
|
1141
|
+
class: m(e.nsSelect.e("selected-item"))
|
|
1142
|
+
},
|
|
1143
|
+
[
|
|
1144
|
+
ee(t, {
|
|
1145
|
+
closable: !e.selectDisabled && !u.isDisabled,
|
|
1146
|
+
size: e.collapseTagSize,
|
|
1147
|
+
type: e.tagType,
|
|
1148
|
+
effect: e.tagEffect,
|
|
1149
|
+
"disable-transitions": "",
|
|
1150
|
+
style: Ve(e.tagStyle),
|
|
1151
|
+
onClose: ($) => e.deleteTag($, u)
|
|
1152
|
+
}, {
|
|
1153
|
+
default: B(() => [
|
|
1154
|
+
R(
|
|
1155
|
+
"span",
|
|
1156
|
+
{
|
|
1157
|
+
class: m(e.nsSelect.e("tags-text"))
|
|
1158
|
+
},
|
|
1159
|
+
[
|
|
1160
|
+
L(e.$slots, "label", {
|
|
1161
|
+
index: u.index,
|
|
1162
|
+
label: u.currentLabel,
|
|
1163
|
+
value: u.value
|
|
1164
|
+
}, () => [
|
|
1165
|
+
pl(
|
|
1166
|
+
Q(u.currentLabel),
|
|
1167
|
+
1
|
|
1168
|
+
)
|
|
1169
|
+
])
|
|
1170
|
+
],
|
|
1171
|
+
2
|
|
1172
|
+
)
|
|
1173
|
+
]),
|
|
1174
|
+
_: 2
|
|
1175
|
+
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
|
|
1176
|
+
],
|
|
1177
|
+
2
|
|
1178
|
+
))),
|
|
1179
|
+
128
|
|
1180
|
+
)),
|
|
1181
|
+
e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (v(), F(i, {
|
|
1182
|
+
key: 0,
|
|
1183
|
+
ref: "tagTooltipRef",
|
|
1184
|
+
disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
|
|
1185
|
+
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
1186
|
+
effect: e.effect,
|
|
1187
|
+
placement: "bottom",
|
|
1188
|
+
"popper-class": e.popperClass,
|
|
1189
|
+
"popper-style": e.popperStyle,
|
|
1190
|
+
teleported: e.teleported
|
|
1191
|
+
}, {
|
|
1192
|
+
default: B(() => [
|
|
1193
|
+
R(
|
|
1194
|
+
"div",
|
|
1195
|
+
{
|
|
1196
|
+
ref: "collapseItemRef",
|
|
1197
|
+
class: m(e.nsSelect.e("selected-item"))
|
|
1198
|
+
},
|
|
1199
|
+
[
|
|
1200
|
+
ee(t, {
|
|
1201
|
+
closable: !1,
|
|
1202
|
+
size: e.collapseTagSize,
|
|
1203
|
+
type: e.tagType,
|
|
1204
|
+
effect: e.tagEffect,
|
|
1205
|
+
"disable-transitions": "",
|
|
1206
|
+
style: Ve(e.collapseTagStyle)
|
|
1207
|
+
}, {
|
|
1208
|
+
default: B(() => [
|
|
1209
|
+
R(
|
|
1210
|
+
"span",
|
|
1211
|
+
{
|
|
1212
|
+
class: m(e.nsSelect.e("tags-text"))
|
|
1213
|
+
},
|
|
1214
|
+
" + " + Q(e.states.selected.length - e.maxCollapseTags),
|
|
1215
|
+
3
|
|
1216
|
+
)
|
|
1217
|
+
]),
|
|
1218
|
+
_: 1
|
|
1219
|
+
}, 8, ["size", "type", "effect", "style"])
|
|
1220
|
+
],
|
|
1221
|
+
2
|
|
1222
|
+
)
|
|
1223
|
+
]),
|
|
1224
|
+
content: B(() => [
|
|
1225
|
+
R(
|
|
1226
|
+
"div",
|
|
1227
|
+
{
|
|
1228
|
+
ref: "tagMenuRef",
|
|
1229
|
+
class: m(e.nsSelect.e("selection"))
|
|
1230
|
+
},
|
|
1231
|
+
[
|
|
1232
|
+
(v(!0), V(
|
|
1233
|
+
de,
|
|
1234
|
+
null,
|
|
1235
|
+
Ee(e.collapseTagList, (u) => (v(), V(
|
|
1236
|
+
"div",
|
|
1237
|
+
{
|
|
1238
|
+
key: e.getValueKey(u),
|
|
1239
|
+
class: m(e.nsSelect.e("selected-item"))
|
|
1240
|
+
},
|
|
1241
|
+
[
|
|
1242
|
+
ee(t, {
|
|
1243
|
+
class: "in-tooltip",
|
|
1244
|
+
closable: !e.selectDisabled && !u.isDisabled,
|
|
1245
|
+
size: e.collapseTagSize,
|
|
1246
|
+
type: e.tagType,
|
|
1247
|
+
effect: e.tagEffect,
|
|
1248
|
+
"disable-transitions": "",
|
|
1249
|
+
onClose: ($) => e.deleteTag($, u)
|
|
1250
|
+
}, {
|
|
1251
|
+
default: B(() => [
|
|
1252
|
+
R(
|
|
1253
|
+
"span",
|
|
1254
|
+
{
|
|
1255
|
+
class: m(e.nsSelect.e("tags-text"))
|
|
1256
|
+
},
|
|
1257
|
+
[
|
|
1258
|
+
L(e.$slots, "label", {
|
|
1259
|
+
index: u.index,
|
|
1260
|
+
label: u.currentLabel,
|
|
1261
|
+
value: u.value
|
|
1262
|
+
}, () => [
|
|
1263
|
+
pl(
|
|
1264
|
+
Q(u.currentLabel),
|
|
1265
|
+
1
|
|
1266
|
+
)
|
|
1267
|
+
])
|
|
1268
|
+
],
|
|
1269
|
+
2
|
|
1270
|
+
)
|
|
1271
|
+
]),
|
|
1272
|
+
_: 2
|
|
1273
|
+
}, 1032, ["closable", "size", "type", "effect", "onClose"])
|
|
1274
|
+
],
|
|
1275
|
+
2
|
|
1276
|
+
))),
|
|
1277
|
+
128
|
|
1278
|
+
))
|
|
1279
|
+
],
|
|
1280
|
+
2
|
|
1281
|
+
)
|
|
1282
|
+
]),
|
|
1283
|
+
_: 3
|
|
1284
|
+
}, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported"])) : W("v-if", !0)
|
|
1285
|
+
]) : W("v-if", !0),
|
|
1286
|
+
R(
|
|
1287
|
+
"div",
|
|
1288
|
+
{
|
|
1289
|
+
class: m([
|
|
1290
|
+
e.nsSelect.e("selected-item"),
|
|
1291
|
+
e.nsSelect.e("input-wrapper"),
|
|
1292
|
+
e.nsSelect.is("hidden", !e.filterable || e.selectDisabled)
|
|
1293
|
+
])
|
|
1294
|
+
},
|
|
1295
|
+
[
|
|
1296
|
+
pe(R("input", {
|
|
1297
|
+
id: e.inputId,
|
|
1298
|
+
ref: "inputRef",
|
|
1299
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => e.states.inputValue = u),
|
|
1300
|
+
type: "text",
|
|
1301
|
+
name: e.name,
|
|
1302
|
+
class: m([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
|
|
1303
|
+
disabled: e.selectDisabled,
|
|
1304
|
+
autocomplete: e.autocomplete,
|
|
1305
|
+
style: Ve(e.inputStyle),
|
|
1306
|
+
tabindex: e.tabindex,
|
|
1307
|
+
role: "combobox",
|
|
1308
|
+
readonly: !e.filterable,
|
|
1309
|
+
spellcheck: "false",
|
|
1310
|
+
"aria-activedescendant": ((b = e.hoverOption) == null ? void 0 : b.id) || "",
|
|
1311
|
+
"aria-controls": e.contentId,
|
|
1312
|
+
"aria-expanded": e.dropdownMenuVisible,
|
|
1313
|
+
"aria-label": e.ariaLabel,
|
|
1314
|
+
"aria-autocomplete": "none",
|
|
1315
|
+
"aria-haspopup": "listbox",
|
|
1316
|
+
onKeydown: n[1] || (n[1] = (...u) => e.handleKeydown && e.handleKeydown(...u)),
|
|
1317
|
+
onCompositionstart: n[2] || (n[2] = (...u) => e.handleCompositionStart && e.handleCompositionStart(...u)),
|
|
1318
|
+
onCompositionupdate: n[3] || (n[3] = (...u) => e.handleCompositionUpdate && e.handleCompositionUpdate(...u)),
|
|
1319
|
+
onCompositionend: n[4] || (n[4] = (...u) => e.handleCompositionEnd && e.handleCompositionEnd(...u)),
|
|
1320
|
+
onInput: n[5] || (n[5] = (...u) => e.onInput && e.onInput(...u)),
|
|
1321
|
+
onClick: n[6] || (n[6] = ae((...u) => e.toggleMenu && e.toggleMenu(...u), ["stop"]))
|
|
1322
|
+
}, null, 46, On), [
|
|
1323
|
+
[ht, e.states.inputValue]
|
|
1324
|
+
]),
|
|
1325
|
+
e.filterable ? (v(), V("span", {
|
|
1326
|
+
key: 0,
|
|
1327
|
+
ref: "calculatorRef",
|
|
1328
|
+
"aria-hidden": "true",
|
|
1329
|
+
class: m(e.nsSelect.e("input-calculator")),
|
|
1330
|
+
textContent: Q(e.states.inputValue)
|
|
1331
|
+
}, null, 10, wn)) : W("v-if", !0)
|
|
1332
|
+
],
|
|
1333
|
+
2
|
|
1334
|
+
),
|
|
1335
|
+
e.shouldShowPlaceholder ? (v(), V(
|
|
1336
|
+
"div",
|
|
1337
|
+
{
|
|
1338
|
+
key: 1,
|
|
1339
|
+
class: m([
|
|
1340
|
+
e.nsSelect.e("selected-item"),
|
|
1341
|
+
e.nsSelect.e("placeholder"),
|
|
1342
|
+
e.nsSelect.is(
|
|
1343
|
+
"transparent",
|
|
1344
|
+
!e.hasModelValue || e.expanded && !e.states.inputValue
|
|
1345
|
+
)
|
|
1346
|
+
])
|
|
1347
|
+
},
|
|
1348
|
+
[
|
|
1349
|
+
e.hasModelValue ? L(e.$slots, "label", {
|
|
1350
|
+
key: 0,
|
|
1351
|
+
index: e.getOption(e.modelValue).index,
|
|
1352
|
+
label: e.currentPlaceholder,
|
|
1353
|
+
value: e.modelValue
|
|
1354
|
+
}, () => [
|
|
1355
|
+
R(
|
|
1356
|
+
"span",
|
|
1357
|
+
null,
|
|
1358
|
+
Q(e.currentPlaceholder),
|
|
1359
|
+
1
|
|
1360
|
+
)
|
|
1361
|
+
]) : (v(), V(
|
|
1362
|
+
"span",
|
|
1363
|
+
Cn,
|
|
1364
|
+
Q(e.currentPlaceholder),
|
|
1365
|
+
1
|
|
1366
|
+
))
|
|
1367
|
+
],
|
|
1368
|
+
2
|
|
1369
|
+
)) : W("v-if", !0)
|
|
1370
|
+
],
|
|
1371
|
+
2
|
|
1372
|
+
),
|
|
1373
|
+
R(
|
|
1374
|
+
"div",
|
|
1375
|
+
{
|
|
1376
|
+
ref: "suffixRef",
|
|
1377
|
+
class: m(e.nsSelect.e("suffix"))
|
|
1378
|
+
},
|
|
1379
|
+
[
|
|
1380
|
+
e.iconComponent && !e.showClearBtn ? (v(), F(f, {
|
|
1381
|
+
key: 0,
|
|
1382
|
+
class: m([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
|
|
1383
|
+
}, {
|
|
1384
|
+
default: B(() => [
|
|
1385
|
+
(v(), F(Fe(e.iconComponent)))
|
|
1386
|
+
]),
|
|
1387
|
+
_: 1
|
|
1388
|
+
}, 8, ["class"])) : W("v-if", !0),
|
|
1389
|
+
e.showClearBtn && e.clearIcon ? (v(), F(f, {
|
|
1390
|
+
key: 1,
|
|
1391
|
+
class: m([
|
|
1392
|
+
e.nsSelect.e("caret"),
|
|
1393
|
+
e.nsSelect.e("icon"),
|
|
1394
|
+
e.nsSelect.e("clear")
|
|
1395
|
+
]),
|
|
1396
|
+
onClick: e.handleClearClick
|
|
1397
|
+
}, {
|
|
1398
|
+
default: B(() => [
|
|
1399
|
+
(v(), F(Fe(e.clearIcon)))
|
|
1400
|
+
]),
|
|
1401
|
+
_: 1
|
|
1402
|
+
}, 8, ["class", "onClick"])) : W("v-if", !0),
|
|
1403
|
+
e.validateState && e.validateIcon && e.needStatusIcon ? (v(), F(f, {
|
|
1404
|
+
key: 2,
|
|
1405
|
+
class: m([
|
|
1406
|
+
e.nsInput.e("icon"),
|
|
1407
|
+
e.nsInput.e("validateIcon"),
|
|
1408
|
+
e.nsInput.is("loading", e.validateState === "validating")
|
|
1409
|
+
])
|
|
1410
|
+
}, {
|
|
1411
|
+
default: B(() => [
|
|
1412
|
+
(v(), F(Fe(e.validateIcon)))
|
|
1413
|
+
]),
|
|
1414
|
+
_: 1
|
|
1415
|
+
}, 8, ["class"])) : W("v-if", !0)
|
|
1416
|
+
],
|
|
1417
|
+
2
|
|
1418
|
+
)
|
|
1419
|
+
],
|
|
1420
|
+
2
|
|
1421
|
+
)
|
|
1422
|
+
];
|
|
1423
|
+
}),
|
|
1424
|
+
content: B(() => [
|
|
1425
|
+
ee(
|
|
1426
|
+
d,
|
|
1427
|
+
{ ref: "menuRef" },
|
|
1428
|
+
{
|
|
1429
|
+
default: B(() => [
|
|
1430
|
+
e.$slots.header ? (v(), V(
|
|
1431
|
+
"div",
|
|
1432
|
+
{
|
|
1433
|
+
key: 0,
|
|
1434
|
+
class: m(e.nsSelect.be("dropdown", "header")),
|
|
1435
|
+
onClick: n[8] || (n[8] = ae(() => {
|
|
1436
|
+
}, ["stop"]))
|
|
1437
|
+
},
|
|
1438
|
+
[
|
|
1439
|
+
L(e.$slots, "header")
|
|
1440
|
+
],
|
|
1441
|
+
2
|
|
1442
|
+
)) : W("v-if", !0),
|
|
1443
|
+
pe(ee(I, {
|
|
1444
|
+
id: e.contentId,
|
|
1445
|
+
ref: "scrollbarRef",
|
|
1446
|
+
tag: "ul",
|
|
1447
|
+
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
|
|
1448
|
+
"view-class": e.nsSelect.be("dropdown", "list"),
|
|
1449
|
+
class: m([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
|
|
1450
|
+
role: "listbox",
|
|
1451
|
+
"aria-label": e.ariaLabel,
|
|
1452
|
+
"aria-orientation": "vertical",
|
|
1453
|
+
onScroll: e.popupScroll
|
|
1454
|
+
}, {
|
|
1455
|
+
default: B(() => [
|
|
1456
|
+
e.showNewOption ? (v(), F(y, {
|
|
1457
|
+
key: 0,
|
|
1458
|
+
value: e.states.inputValue,
|
|
1459
|
+
created: !0
|
|
1460
|
+
}, null, 8, ["value"])) : W("v-if", !0),
|
|
1461
|
+
ee(E, null, {
|
|
1462
|
+
default: B(() => [
|
|
1463
|
+
L(e.$slots, "default", {}, () => [
|
|
1464
|
+
(v(!0), V(
|
|
1465
|
+
de,
|
|
1466
|
+
null,
|
|
1467
|
+
Ee(e.options, (b, u) => {
|
|
1468
|
+
var $;
|
|
1469
|
+
return v(), V(
|
|
1470
|
+
de,
|
|
1471
|
+
{ key: u },
|
|
1472
|
+
[
|
|
1473
|
+
($ = e.getOptions(b)) != null && $.length ? (v(), F(S, {
|
|
1474
|
+
key: 0,
|
|
1475
|
+
label: e.getLabel(b),
|
|
1476
|
+
disabled: e.getDisabled(b)
|
|
1477
|
+
}, {
|
|
1478
|
+
default: B(() => [
|
|
1479
|
+
(v(!0), V(
|
|
1480
|
+
de,
|
|
1481
|
+
null,
|
|
1482
|
+
Ee(e.getOptions(b), (o) => (v(), F(
|
|
1483
|
+
y,
|
|
1484
|
+
ze({
|
|
1485
|
+
key: e.getValue(o)
|
|
1486
|
+
}, { ref_for: !0 }, e.getOptionProps(o)),
|
|
1487
|
+
null,
|
|
1488
|
+
16
|
|
1489
|
+
))),
|
|
1490
|
+
128
|
|
1491
|
+
))
|
|
1492
|
+
]),
|
|
1493
|
+
_: 2
|
|
1494
|
+
}, 1032, ["label", "disabled"])) : (v(), F(
|
|
1495
|
+
y,
|
|
1496
|
+
ze({
|
|
1497
|
+
key: 1,
|
|
1498
|
+
ref_for: !0
|
|
1499
|
+
}, e.getOptionProps(b)),
|
|
1500
|
+
null,
|
|
1501
|
+
16
|
|
1502
|
+
))
|
|
1503
|
+
],
|
|
1504
|
+
64
|
|
1505
|
+
);
|
|
1506
|
+
}),
|
|
1507
|
+
128
|
|
1508
|
+
))
|
|
1509
|
+
])
|
|
1510
|
+
]),
|
|
1511
|
+
_: 3
|
|
1512
|
+
})
|
|
1513
|
+
]),
|
|
1514
|
+
_: 3
|
|
1515
|
+
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label", "onScroll"]), [
|
|
1516
|
+
[Ke, e.states.options.size > 0 && !e.loading]
|
|
1517
|
+
]),
|
|
1518
|
+
e.$slots.loading && e.loading ? (v(), V(
|
|
1519
|
+
"div",
|
|
1520
|
+
{
|
|
1521
|
+
key: 1,
|
|
1522
|
+
class: m(e.nsSelect.be("dropdown", "loading"))
|
|
1523
|
+
},
|
|
1524
|
+
[
|
|
1525
|
+
L(e.$slots, "loading")
|
|
1526
|
+
],
|
|
1527
|
+
2
|
|
1528
|
+
)) : e.loading || e.filteredOptionsCount === 0 ? (v(), V(
|
|
1529
|
+
"div",
|
|
1530
|
+
{
|
|
1531
|
+
key: 2,
|
|
1532
|
+
class: m(e.nsSelect.be("dropdown", "empty"))
|
|
1533
|
+
},
|
|
1534
|
+
[
|
|
1535
|
+
L(e.$slots, "empty", {}, () => [
|
|
1536
|
+
R(
|
|
1537
|
+
"span",
|
|
1538
|
+
null,
|
|
1539
|
+
Q(e.emptyText),
|
|
1540
|
+
1
|
|
1541
|
+
)
|
|
1542
|
+
])
|
|
1543
|
+
],
|
|
1544
|
+
2
|
|
1545
|
+
)) : W("v-if", !0),
|
|
1546
|
+
e.$slots.footer ? (v(), V(
|
|
1547
|
+
"div",
|
|
1548
|
+
{
|
|
1549
|
+
key: 3,
|
|
1550
|
+
class: m(e.nsSelect.be("dropdown", "footer")),
|
|
1551
|
+
onClick: n[9] || (n[9] = ae(() => {
|
|
1552
|
+
}, ["stop"]))
|
|
1553
|
+
},
|
|
1554
|
+
[
|
|
1555
|
+
L(e.$slots, "footer")
|
|
1556
|
+
],
|
|
1557
|
+
2
|
|
1558
|
+
)) : W("v-if", !0)
|
|
1559
|
+
]),
|
|
1560
|
+
_: 3
|
|
1561
|
+
},
|
|
1562
|
+
512
|
|
1563
|
+
)
|
|
1564
|
+
]),
|
|
1565
|
+
_: 3
|
|
1566
|
+
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow"])
|
|
1567
|
+
],
|
|
1568
|
+
16
|
|
1569
|
+
)), [
|
|
1570
|
+
[w, e.handleClickOutside, e.popperRef]
|
|
1571
|
+
]);
|
|
1572
|
+
}
|
|
1573
|
+
var In = /* @__PURE__ */ De(Sn, [["render", En], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);
|
|
1574
|
+
const Nn = Gt(In, {
|
|
1575
|
+
Option: Ge,
|
|
1576
|
+
OptionGroup: Qe
|
|
1577
|
+
}), Bn = Il(Ge);
|
|
1578
|
+
Il(Qe);
|
|
1579
|
+
export {
|
|
1580
|
+
Nn as E,
|
|
1581
|
+
Bn as a
|
|
1582
|
+
};
|