st-comp 0.0.115 → 0.0.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/auto-imports.d.ts +1 -0
  2. package/components.d.ts +1 -0
  3. package/es/ChartLayout.cjs +1 -1
  4. package/es/ChartLayout.js +2 -2
  5. package/es/Dialog.cjs +1 -1
  6. package/es/Dialog.js +11 -11
  7. package/es/FactorWarning.cjs +1 -1
  8. package/es/FactorWarning.js +1070 -272
  9. package/es/Kline.cjs +1 -1
  10. package/es/Kline.js +13 -13
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +12 -12
  13. package/es/Pagination.cjs +1 -1
  14. package/es/Pagination.js +30 -30
  15. package/es/Pie.cjs +1 -1
  16. package/es/Pie.js +1 -1
  17. package/es/Table.cjs +1 -1
  18. package/es/Table.js +31 -31
  19. package/es/User.cjs +1 -1
  20. package/es/User.js +84 -84
  21. package/es/VarietySearch.cjs +1 -1
  22. package/es/VarietySearch.js +1116 -936
  23. package/es/VirtualTable.cjs +1 -1
  24. package/es/VirtualTable.js +56 -56
  25. package/es/base-ec05f348.cjs +9 -0
  26. package/es/{base-a3fcf99a.js → base-f7877059.js} +345 -328
  27. package/es/{castArray-0e8e51f9.js → castArray-18f43497.js} +1 -1
  28. package/es/{castArray-e6cd255c.cjs → castArray-a45823fe.cjs} +1 -1
  29. package/es/{config-provider-e4ebacca.js → config-provider-6479d795.js} +6 -6
  30. package/es/{config-provider-957c280a.cjs → config-provider-7cdfca4d.cjs} +1 -1
  31. package/es/{debounce-7f3a3471.js → debounce-2336e546.js} +14 -14
  32. package/es/{debounce-3ad03224.cjs → debounce-b2ff12bd.cjs} +1 -1
  33. package/es/{dropdown-c505d260.js → dropdown-46daf582.js} +4 -4
  34. package/es/{dropdown-e73864c0.cjs → dropdown-9a974876.cjs} +1 -1
  35. package/es/{el-button-e389429d.cjs → el-button-196807af.cjs} +1 -1
  36. package/es/{el-button-fe99fee6.js → el-button-802f579a.js} +6 -6
  37. package/es/{el-empty-848e4e08.cjs → el-empty-19ea04f4.cjs} +1 -1
  38. package/es/{el-empty-a338aa98.js → el-empty-3c5ec277.js} +5 -5
  39. package/es/el-form-item-84099d46.js +1599 -0
  40. package/es/el-form-item-c39f717e.cjs +12 -0
  41. package/es/{el-input-65ed0dba.cjs → el-input-6c6f5bda.cjs} +1 -1
  42. package/es/{el-input-35c8ebc3.js → el-input-fac5b401.js} +39 -39
  43. package/es/{el-overlay-851ea246.js → el-overlay-69e9ae49.js} +105 -101
  44. package/es/el-overlay-891dcc40.cjs +1 -0
  45. package/es/{el-popover-246eb710.js → el-popover-694ded47.js} +22 -22
  46. package/es/{el-popover-b0deb095.cjs → el-popover-8735b1fa.cjs} +1 -1
  47. package/es/{el-popper-e052fb84.js → el-popper-6126b1f6.js} +91 -91
  48. package/es/{el-popper-4da22fdc.cjs → el-popper-f62316cd.cjs} +1 -1
  49. package/es/el-scrollbar-d1c3e7f7.cjs +1 -0
  50. package/es/el-scrollbar-e0493906.js +201 -0
  51. package/es/el-select-513126a5.js +1128 -0
  52. package/es/el-select-928f8c19.cjs +1 -0
  53. package/es/{el-table-column-661deade.js → el-table-column-3c920bdd.js} +69 -69
  54. package/es/{el-table-column-d636a7d6.cjs → el-table-column-dd8b62aa.cjs} +1 -1
  55. package/es/{el-tag-a45bdd1e.cjs → el-tag-3b03d13e.cjs} +1 -1
  56. package/es/{el-tag-7601f7e6.js → el-tag-5becabc9.js} +74 -74
  57. package/es/index-048dca7e.js +303 -0
  58. package/es/{index-28cd5fde.js → index-35117549.js} +25 -25
  59. package/es/{index-fc652f21.js → index-57f8f7b9.js} +15 -1
  60. package/es/index-7e40be25.js +167 -0
  61. package/es/index-80a2b137.cjs +1 -0
  62. package/es/{index-35665af5.cjs → index-8a0b1c53.cjs} +1 -1
  63. package/es/{index-25aca205.cjs → index-dc273ea2.cjs} +1 -1
  64. package/es/index-e1e83173.cjs +1 -0
  65. package/es/{raf-a97e05a3.js → raf-07da7cdf.js} +1 -1
  66. package/es/{raf-da075499.cjs → raf-8fc301fd.cjs} +1 -1
  67. package/es/{refs-f0ee592c.js → refs-1b1fe6ca.js} +1 -1
  68. package/es/{refs-34a69f8c.cjs → refs-d00b710b.cjs} +1 -1
  69. package/es/{scroll-1e0c8fab.js → scroll-3b521d81.js} +1 -1
  70. package/es/{scroll-c7ef9180.cjs → scroll-41224831.cjs} +1 -1
  71. package/es/style.css +1 -1
  72. package/es/{use-form-common-props-96d2ea48.cjs → use-form-common-props-1b84d8f4.cjs} +1 -1
  73. package/es/{use-form-common-props-d0739feb.js → use-form-common-props-f3a520d0.js} +53 -53
  74. package/es/{vnode-8f40662d.js → vnode-25d7c2f5.js} +1 -1
  75. package/es/{vnode-562e063c.cjs → vnode-7fbc61e1.cjs} +1 -1
  76. package/es/{zh-cn-0ab4aa73.js → zh-cn-74781bbd.js} +2 -2
  77. package/es/{zh-cn-bf58db71.cjs → zh-cn-ab9a583d.cjs} +1 -1
  78. package/lib/bundle.js +1 -1
  79. package/lib/bundle.umd.cjs +192 -192
  80. package/lib/{index-a981dd97.js → index-c6ba3bcd.js} +30058 -29227
  81. package/lib/{python-72fd599d.js → python-49e22e65.js} +1 -1
  82. package/lib/style.css +1 -1
  83. package/package.json +1 -1
  84. package/packages/FactorWarning/index.vue +296 -97
  85. package/packages/FactorWarning/tools.js +10 -0
  86. package/src/pages/FactorWarning/index.vue +69 -25
  87. package/es/base-adc4e34e.cjs +0 -9
  88. package/es/el-overlay-84e3cb6c.cjs +0 -1
  89. package/es/el-radio-button-12b07ac2.js +0 -1782
  90. package/es/el-radio-button-5259a46b.cjs +0 -12
  91. package/es/el-scrollbar-8cb3663b.cjs +0 -1
  92. package/es/el-scrollbar-c23060d5.js +0 -193
  93. package/es/el-select-4987a187.cjs +0 -1
  94. package/es/el-select-d1a33fbe.js +0 -1233
  95. package/es/index-4090cb2c.cjs +0 -1
  96. package/es/index-af687c16.js +0 -302
  97. package/es/index-b4bbc58d.js +0 -59
  98. package/es/index-f14354e6.cjs +0 -1
@@ -1,1233 +0,0 @@
1
- import { defineComponent as j, computed as u, openBlock as h, createElementBlock as I, normalizeClass as c, unref as R, normalizeStyle as Y, createElementVNode as V, renderSlot as T, createBlock as N, withModifiers as L, withCtx as $, createVNode as z, createCommentVNode as M, Transition as nt, shallowRef as ot, ref as E, inject as Ce, getCurrentInstance as ke, toRaw as st, watch as U, reactive as ie, toRefs as $e, onBeforeUnmount as at, nextTick as P, withDirectives as ae, toDisplayString as W, vShow as Me, onMounted as Re, watchEffect as it, provide as ol, resolveComponent as H, resolveDirective as rt, toHandlerKey as ut, Fragment as Ye, renderList as Ze, createTextVNode as _e, withKeys as oe, vModelText as ct, resolveDynamicComponent as Ve } from "vue";
2
- import { a as dt, f as pt, e as ft, b as vt, E as mt } from "./el-popper-e052fb84.js";
3
- import { c as bt, j as sl, E as Ee, H as xe, v as ht, w as gt, I as yt, V as St, h as Ct, i as el, G as Ot, a as wt, J as It } from "./use-form-common-props-d0739feb.js";
4
- import { b as al, u as Z, _ as re, w as il, e as J, J as X, x as rl, k as Vt, g as A, y as ge, K as ll, l as Et, q as Tt, m as kt, z as se, L as $t, i as Mt, d as ye, j as ul } from "./base-a3fcf99a.js";
5
- import { c as K } from "./castArray-0e8e51f9.js";
6
- import { u as G, b as Rt } from "./el-scrollbar-c23060d5.js";
7
- import { a as Dt, u as Bt } from "./index-b4bbc58d.js";
8
- import { E as Lt } from "./index-af687c16.js";
9
- import { U as Q, C as cl } from "./event-09e37cc8.js";
10
- import { s as Nt } from "./scroll-1e0c8fab.js";
11
- import { f as zt, i as Se, C as Wt } from "./el-tag-7601f7e6.js";
12
- import { t as Ft, d as Pt } from "./debounce-7f3a3471.js";
13
- var tl = 1 / 0, Kt = 17976931348623157e292;
14
- function At(e) {
15
- if (!e)
16
- return e === 0 ? e : 0;
17
- if (e = Ft(e), e === tl || e === -tl) {
18
- var s = e < 0 ? -1 : 1;
19
- return s * Kt;
20
- }
21
- return e === e ? e : 0;
22
- }
23
- function Ht(e) {
24
- var s = At(e), a = s % 1;
25
- return s === s ? a ? s - a : s : 0;
26
- }
27
- function Gt(e, s, a, f) {
28
- for (var o = e.length, b = a + (f ? 1 : -1); f ? b-- : ++b < o; )
29
- if (s(e[b], b, e))
30
- return b;
31
- return -1;
32
- }
33
- var Ut = Math.max, jt = Math.min;
34
- function qt(e, s, a) {
35
- var f = e == null ? 0 : e.length;
36
- if (!f)
37
- return -1;
38
- var o = f - 1;
39
- return a !== void 0 && (o = Ht(a), o = a < 0 ? Ut(f + o, 0) : jt(o, f - 1)), Gt(e, zt(s), o, !0);
40
- }
41
- const Qt = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), Te = al({
42
- type: {
43
- type: String,
44
- values: ["primary", "success", "info", "warning", "danger"],
45
- default: "primary"
46
- },
47
- closable: Boolean,
48
- disableTransitions: Boolean,
49
- hit: Boolean,
50
- color: String,
51
- size: {
52
- type: String,
53
- values: bt
54
- },
55
- effect: {
56
- type: String,
57
- values: ["dark", "light", "plain"],
58
- default: "light"
59
- },
60
- round: Boolean
61
- }), Jt = {
62
- close: (e) => e instanceof MouseEvent,
63
- click: (e) => e instanceof MouseEvent
64
- }, Xt = j({
65
- name: "ElTag"
66
- }), Yt = /* @__PURE__ */ j({
67
- ...Xt,
68
- props: Te,
69
- emits: Jt,
70
- setup(e, { emit: s }) {
71
- const a = e, f = sl(), o = Z("tag"), b = u(() => {
72
- const { type: i, hit: p, effect: S, closable: C, round: v } = a;
73
- return [
74
- o.b(),
75
- o.is("closable", C),
76
- o.m(i || "primary"),
77
- o.m(f.value),
78
- o.m(S),
79
- o.is("hit", p),
80
- o.is("round", v)
81
- ];
82
- }), t = (i) => {
83
- s("close", i);
84
- }, y = (i) => {
85
- s("click", i);
86
- }, d = (i) => {
87
- var p, S, C;
88
- (C = (S = (p = i == null ? void 0 : i.component) == null ? void 0 : p.subTree) == null ? void 0 : S.component) != null && C.bum && (i.component.subTree.component.bum = null);
89
- };
90
- return (i, p) => i.disableTransitions ? (h(), I("span", {
91
- key: 0,
92
- class: c(R(b)),
93
- style: Y({ backgroundColor: i.color }),
94
- onClick: y
95
- }, [
96
- V("span", {
97
- class: c(R(o).e("content"))
98
- }, [
99
- T(i.$slots, "default")
100
- ], 2),
101
- i.closable ? (h(), N(R(Ee), {
102
- key: 0,
103
- class: c(R(o).e("close")),
104
- onClick: L(t, ["stop"])
105
- }, {
106
- default: $(() => [
107
- z(R(xe))
108
- ]),
109
- _: 1
110
- }, 8, ["class", "onClick"])) : M("v-if", !0)
111
- ], 6)) : (h(), N(nt, {
112
- key: 1,
113
- name: `${R(o).namespace.value}-zoom-in-center`,
114
- appear: "",
115
- onVnodeMounted: d
116
- }, {
117
- default: $(() => [
118
- V("span", {
119
- class: c(R(b)),
120
- style: Y({ backgroundColor: i.color }),
121
- onClick: y
122
- }, [
123
- V("span", {
124
- class: c(R(o).e("content"))
125
- }, [
126
- T(i.$slots, "default")
127
- ], 2),
128
- i.closable ? (h(), N(R(Ee), {
129
- key: 0,
130
- class: c(R(o).e("close")),
131
- onClick: L(t, ["stop"])
132
- }, {
133
- default: $(() => [
134
- z(R(xe))
135
- ]),
136
- _: 1
137
- }, 8, ["class", "onClick"])) : M("v-if", !0)
138
- ], 6)
139
- ]),
140
- _: 3
141
- }, 8, ["name"]));
142
- }
143
- });
144
- var Zt = /* @__PURE__ */ re(Yt, [["__file", "tag.vue"]]);
145
- const _t = il(Zt);
146
- function xt() {
147
- const e = ot(), s = E(0), a = 11, f = u(() => ({
148
- minWidth: `${Math.max(s.value, a)}px`
149
- }));
150
- return G(e, () => {
151
- var b, t;
152
- s.value = (t = (b = e.value) == null ? void 0 : b.getBoundingClientRect().width) != null ? t : 0;
153
- }), {
154
- calculatorRef: e,
155
- calculatorWidth: s,
156
- inputStyle: f
157
- };
158
- }
159
- const dl = Symbol("ElSelectGroup"), Oe = Symbol("ElSelect");
160
- function en(e, s) {
161
- const a = Ce(Oe), f = Ce(dl, { disabled: !1 }), o = u(() => p(K(a.props.modelValue), e.value)), b = u(() => {
162
- var v;
163
- if (a.props.multiple) {
164
- const g = K((v = a.props.modelValue) != null ? v : []);
165
- return !o.value && g.length >= a.props.multipleLimit && a.props.multipleLimit > 0;
166
- } else
167
- return !1;
168
- }), t = u(() => e.label || (J(e.value) ? "" : e.value)), y = u(() => e.value || e.label || ""), d = u(() => e.disabled || s.groupDisabled || b.value), i = ke(), p = (v = [], g) => {
169
- if (J(e.value)) {
170
- const m = a.props.valueKey;
171
- return v && v.some((k) => st(X(k, m)) === X(g, m));
172
- } else
173
- return v && v.includes(g);
174
- }, S = () => {
175
- !e.disabled && !f.disabled && (a.states.hoveringIndex = a.optionsArray.indexOf(i.proxy));
176
- }, C = (v) => {
177
- const g = new RegExp(Qt(v), "i");
178
- s.visible = g.test(t.value) || e.created;
179
- };
180
- return U(() => t.value, () => {
181
- !e.created && !a.props.remote && a.setSelected();
182
- }), U(() => e.value, (v, g) => {
183
- const { remote: m, valueKey: k } = a.props;
184
- if (v !== g && (a.onOptionDestroy(g, i.proxy), a.onOptionCreate(i.proxy)), !e.created && !m) {
185
- if (k && J(v) && J(g) && v[k] === g[k])
186
- return;
187
- a.setSelected();
188
- }
189
- }), U(() => f.disabled, () => {
190
- s.groupDisabled = f.disabled;
191
- }, { immediate: !0 }), {
192
- select: a,
193
- currentLabel: t,
194
- currentValue: y,
195
- itemSelected: o,
196
- isDisabled: d,
197
- hoverItem: S,
198
- updateOption: C
199
- };
200
- }
201
- const ln = j({
202
- name: "ElOption",
203
- componentName: "ElOption",
204
- props: {
205
- value: {
206
- required: !0,
207
- type: [String, Number, Boolean, Object]
208
- },
209
- label: [String, Number],
210
- created: Boolean,
211
- disabled: Boolean
212
- },
213
- setup(e) {
214
- const s = Z("select"), a = rl(), f = u(() => [
215
- s.be("dropdown", "item"),
216
- s.is("disabled", R(y)),
217
- s.is("selected", R(t)),
218
- s.is("hovering", R(C))
219
- ]), o = ie({
220
- index: -1,
221
- groupDisabled: !1,
222
- visible: !0,
223
- hover: !1
224
- }), {
225
- currentLabel: b,
226
- itemSelected: t,
227
- isDisabled: y,
228
- select: d,
229
- hoverItem: i,
230
- updateOption: p
231
- } = en(e, o), { visible: S, hover: C } = $e(o), v = ke().proxy;
232
- d.onOptionCreate(v), at(() => {
233
- const m = v.value, { selected: k } = d.states, ue = k.some((ce) => ce.value === v.value);
234
- P(() => {
235
- d.states.cachedOptions.get(m) === v && !ue && d.states.cachedOptions.delete(m);
236
- }), d.onOptionDestroy(m, v);
237
- });
238
- function g() {
239
- y.value || d.handleOptionSelect(v);
240
- }
241
- return {
242
- ns: s,
243
- id: a,
244
- containerKls: f,
245
- currentLabel: b,
246
- itemSelected: t,
247
- isDisabled: y,
248
- select: d,
249
- hoverItem: i,
250
- updateOption: p,
251
- visible: S,
252
- hover: C,
253
- selectOptionClick: g,
254
- states: o
255
- };
256
- }
257
- });
258
- function tn(e, s, a, f, o, b) {
259
- return ae((h(), I("li", {
260
- id: e.id,
261
- class: c(e.containerKls),
262
- role: "option",
263
- "aria-disabled": e.isDisabled || void 0,
264
- "aria-selected": e.itemSelected,
265
- onMousemove: e.hoverItem,
266
- onClick: L(e.selectOptionClick, ["stop"])
267
- }, [
268
- T(e.$slots, "default", {}, () => [
269
- V("span", null, W(e.currentLabel), 1)
270
- ])
271
- ], 42, ["id", "aria-disabled", "aria-selected", "onMousemove", "onClick"])), [
272
- [Me, e.visible]
273
- ]);
274
- }
275
- var De = /* @__PURE__ */ re(ln, [["render", tn], ["__file", "option.vue"]]);
276
- const nn = j({
277
- name: "ElSelectDropdown",
278
- componentName: "ElSelectDropdown",
279
- setup() {
280
- const e = Ce(Oe), s = Z("select"), a = u(() => e.props.popperClass), f = u(() => e.props.multiple), o = u(() => e.props.fitInputWidth), b = E("");
281
- function t() {
282
- var y;
283
- b.value = `${(y = e.selectRef) == null ? void 0 : y.offsetWidth}px`;
284
- }
285
- return Re(() => {
286
- t(), G(e.selectRef, t);
287
- }), {
288
- ns: s,
289
- minWidth: b,
290
- popperClass: a,
291
- isMultiple: f,
292
- isFitInputWidth: o
293
- };
294
- }
295
- });
296
- function on(e, s, a, f, o, b) {
297
- return h(), I("div", {
298
- class: c([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
299
- style: Y({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
300
- }, [
301
- e.$slots.header ? (h(), I("div", {
302
- key: 0,
303
- class: c(e.ns.be("dropdown", "header"))
304
- }, [
305
- T(e.$slots, "header")
306
- ], 2)) : M("v-if", !0),
307
- T(e.$slots, "default"),
308
- e.$slots.footer ? (h(), I("div", {
309
- key: 1,
310
- class: c(e.ns.be("dropdown", "footer"))
311
- }, [
312
- T(e.$slots, "footer")
313
- ], 2)) : M("v-if", !0)
314
- ], 6);
315
- }
316
- var sn = /* @__PURE__ */ re(nn, [["render", on], ["__file", "select-dropdown.vue"]]);
317
- const an = (e, s) => {
318
- const { t: a } = Vt(), f = rl(), o = Z("select"), b = Z("input"), t = ie({
319
- inputValue: "",
320
- options: /* @__PURE__ */ new Map(),
321
- cachedOptions: /* @__PURE__ */ new Map(),
322
- optionValues: [],
323
- selected: [],
324
- selectionWidth: 0,
325
- collapseItemWidth: 0,
326
- selectedLabel: "",
327
- hoveringIndex: -1,
328
- previousQuery: null,
329
- inputHovering: !1,
330
- menuVisibleOnFocus: !1,
331
- isBeforeHide: !1
332
- }), y = E(null), d = E(null), i = E(null), p = E(null), S = E(null), C = E(null), v = E(null), g = E(null), m = E(null), k = E(null), ue = E(null), {
333
- isComposing: ce,
334
- handleCompositionStart: fl,
335
- handleCompositionUpdate: vl,
336
- handleCompositionEnd: ml
337
- } = Dt({
338
- afterComposition: (l) => Ge(l)
339
- }), { wrapperRef: Be, isFocused: Le, handleBlur: bl } = Bt(S, {
340
- beforeFocus() {
341
- return ee.value;
342
- },
343
- afterFocus() {
344
- e.automaticDropdown && !O.value && (O.value = !0, t.menuVisibleOnFocus = !0);
345
- },
346
- beforeBlur(l) {
347
- var n, r;
348
- return ((n = i.value) == null ? void 0 : n.isFocusInsideContent(l)) || ((r = p.value) == null ? void 0 : r.isFocusInsideContent(l));
349
- },
350
- afterBlur() {
351
- O.value = !1, t.menuVisibleOnFocus = !1;
352
- }
353
- }), O = E(!1), _ = E(), { form: de, formItem: x } = ht(), { inputId: hl } = gt(e, {
354
- formItemContext: x
355
- }), { valueOnClear: gl, isEmptyValue: yl } = yt(e), ee = u(() => e.disabled || (de == null ? void 0 : de.disabled)), we = u(() => A(e.modelValue) ? e.modelValue.length > 0 : !yl(e.modelValue)), Sl = u(() => {
356
- var l;
357
- return (l = de == null ? void 0 : de.statusIcon) != null ? l : !1;
358
- }), Cl = u(() => e.clearable && !ee.value && t.inputHovering && we.value), Ne = u(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Ol = u(() => o.is("reverse", Ne.value && O.value)), ze = u(() => (x == null ? void 0 : x.validateState) || ""), wl = u(() => St[ze.value]), Il = u(() => e.remote ? 300 : 0), Vl = u(() => e.remote && !t.inputValue && t.options.size === 0), El = u(() => e.loading ? e.loadingText || a("el.select.loading") : e.filterable && t.inputValue && t.options.size > 0 && le.value === 0 ? e.noMatchText || a("el.select.noMatch") : t.options.size === 0 ? e.noDataText || a("el.select.noData") : null), le = u(() => D.value.filter((l) => l.visible).length), D = u(() => {
359
- const l = Array.from(t.options.values()), n = [];
360
- return t.optionValues.forEach((r) => {
361
- const w = l.findIndex((B) => B.value === r);
362
- w > -1 && n.push(l[w]);
363
- }), n.length >= l.length ? n : l;
364
- }), Tl = u(() => Array.from(t.cachedOptions.values())), kl = u(() => {
365
- const l = D.value.filter((n) => !n.created).some((n) => n.currentLabel === t.inputValue);
366
- return e.filterable && e.allowCreate && t.inputValue !== "" && !l;
367
- }), We = () => {
368
- e.filterable && se(e.filterMethod) || e.filterable && e.remote && se(e.remoteMethod) || D.value.forEach((l) => {
369
- var n;
370
- (n = l.updateOption) == null || n.call(l, t.inputValue);
371
- });
372
- }, Fe = sl(), $l = u(() => ["small"].includes(Fe.value) ? "small" : "default"), Ml = u({
373
- get() {
374
- return O.value && !Vl.value;
375
- },
376
- set(l) {
377
- O.value = l;
378
- }
379
- }), Rl = u(() => {
380
- if (e.multiple && !ge(e.modelValue))
381
- return K(e.modelValue).length === 0 && !t.inputValue;
382
- const l = A(e.modelValue) ? e.modelValue[0] : e.modelValue;
383
- return e.filterable || ge(l) ? !t.inputValue : !0;
384
- }), Dl = u(() => {
385
- var l;
386
- const n = (l = e.placeholder) != null ? l : a("el.select.placeholder");
387
- return e.multiple || !we.value ? n : t.selectedLabel;
388
- }), Bl = u(() => ll ? null : "mouseenter");
389
- U(() => e.modelValue, (l, n) => {
390
- e.multiple && e.filterable && !e.reserveKeyword && (t.inputValue = "", pe("")), fe(), !Se(l, n) && e.validateEvent && (x == null || x.validate("change").catch((r) => Et(r)));
391
- }, {
392
- flush: "post",
393
- deep: !0
394
- }), U(() => O.value, (l) => {
395
- l ? pe(t.inputValue) : (t.inputValue = "", t.previousQuery = null, t.isBeforeHide = !0), s("visible-change", l);
396
- }), U(() => t.options.entries(), () => {
397
- Tt && (fe(), e.defaultFirstOption && (e.filterable || e.remote) && le.value && Pe());
398
- }, {
399
- flush: "post"
400
- }), U(() => t.hoveringIndex, (l) => {
401
- kt(l) && l > -1 ? _.value = D.value[l] || {} : _.value = {}, D.value.forEach((n) => {
402
- n.hover = _.value === n;
403
- });
404
- }), it(() => {
405
- t.isBeforeHide || We();
406
- });
407
- const pe = (l) => {
408
- t.previousQuery === l || ce.value || (t.previousQuery = l, e.filterable && se(e.filterMethod) ? e.filterMethod(l) : e.filterable && e.remote && se(e.remoteMethod) && e.remoteMethod(l), e.defaultFirstOption && (e.filterable || e.remote) && le.value ? P(Pe) : P(Ll));
409
- }, Pe = () => {
410
- const l = D.value.filter((B) => B.visible && !B.disabled && !B.states.groupDisabled), n = l.find((B) => B.created), r = l[0], w = D.value.map((B) => B.value);
411
- t.hoveringIndex = Qe(w, n || r);
412
- }, fe = () => {
413
- if (e.multiple)
414
- t.selectedLabel = "";
415
- else {
416
- const n = A(e.modelValue) ? e.modelValue[0] : e.modelValue, r = Ke(n);
417
- t.selectedLabel = r.currentLabel, t.selected = [r];
418
- return;
419
- }
420
- const l = [];
421
- ge(e.modelValue) || K(e.modelValue).forEach((n) => {
422
- l.push(Ke(n));
423
- }), t.selected = l;
424
- }, Ke = (l) => {
425
- let n;
426
- const r = $t(l);
427
- for (let q = t.cachedOptions.size - 1; q >= 0; q--) {
428
- const F = Tl.value[q];
429
- if (r ? X(F.value, e.valueKey) === X(l, e.valueKey) : F.value === l) {
430
- n = {
431
- value: l,
432
- currentLabel: F.currentLabel,
433
- get isDisabled() {
434
- return F.isDisabled;
435
- }
436
- };
437
- break;
438
- }
439
- }
440
- if (n)
441
- return n;
442
- const w = r ? l.label : l ?? "";
443
- return {
444
- value: l,
445
- currentLabel: w
446
- };
447
- }, Ll = () => {
448
- t.hoveringIndex = D.value.findIndex((l) => t.selected.some((n) => be(n) === be(l)));
449
- }, Nl = () => {
450
- t.selectionWidth = d.value.getBoundingClientRect().width;
451
- }, zl = () => {
452
- t.collapseItemWidth = k.value.getBoundingClientRect().width;
453
- }, Ie = () => {
454
- var l, n;
455
- (n = (l = i.value) == null ? void 0 : l.updatePopper) == null || n.call(l);
456
- }, Ae = () => {
457
- var l, n;
458
- (n = (l = p.value) == null ? void 0 : l.updatePopper) == null || n.call(l);
459
- }, He = () => {
460
- t.inputValue.length > 0 && !O.value && (O.value = !0), pe(t.inputValue);
461
- }, Ge = (l) => {
462
- if (t.inputValue = l.target.value, e.remote)
463
- Ue();
464
- else
465
- return He();
466
- }, Ue = Pt(() => {
467
- He();
468
- }, Il.value), te = (l) => {
469
- Se(e.modelValue, l) || s(cl, l);
470
- }, Wl = (l) => qt(l, (n) => {
471
- const r = t.cachedOptions.get(n);
472
- return r && !r.disabled && !r.states.groupDisabled;
473
- }), Fl = (l) => {
474
- if (e.multiple && l.code !== Lt.delete && l.target.value.length <= 0) {
475
- const n = K(e.modelValue).slice(), r = Wl(n);
476
- if (r < 0)
477
- return;
478
- const w = n[r];
479
- n.splice(r, 1), s(Q, n), te(n), s("remove-tag", w);
480
- }
481
- }, Pl = (l, n) => {
482
- const r = t.selected.indexOf(n);
483
- if (r > -1 && !ee.value) {
484
- const w = K(e.modelValue).slice();
485
- w.splice(r, 1), s(Q, w), te(w), s("remove-tag", n.value);
486
- }
487
- l.stopPropagation(), me();
488
- }, je = (l) => {
489
- l.stopPropagation();
490
- const n = e.multiple ? [] : gl.value;
491
- if (e.multiple)
492
- for (const r of t.selected)
493
- r.isDisabled && n.push(r.value);
494
- s(Q, n), te(n), t.hoveringIndex = -1, O.value = !1, s("clear"), me();
495
- }, qe = (l) => {
496
- var n;
497
- if (e.multiple) {
498
- const r = K((n = e.modelValue) != null ? n : []).slice(), w = Qe(r, l);
499
- w > -1 ? r.splice(w, 1) : (e.multipleLimit <= 0 || r.length < e.multipleLimit) && r.push(l.value), s(Q, r), te(r), l.created && pe(""), e.filterable && !e.reserveKeyword && (t.inputValue = "");
500
- } else
501
- s(Q, l.value), te(l.value), O.value = !1;
502
- me(), !O.value && P(() => {
503
- ve(l);
504
- });
505
- }, Qe = (l = [], n) => ge(n) ? -1 : J(n.value) ? l.findIndex((r) => Se(X(r, e.valueKey), be(n))) : l.indexOf(n.value), ve = (l) => {
506
- var n, r, w, B, q;
507
- const F = A(l) ? l[0] : l;
508
- let he = null;
509
- if (F != null && F.value) {
510
- const ne = D.value.filter((tt) => tt.value === F.value);
511
- ne.length > 0 && (he = ne[0].$el);
512
- }
513
- if (i.value && he) {
514
- const ne = (B = (w = (r = (n = i.value) == null ? void 0 : n.popperRef) == null ? void 0 : r.contentRef) == null ? void 0 : w.querySelector) == null ? void 0 : B.call(w, `.${o.be("dropdown", "wrap")}`);
515
- ne && Nt(ne, he);
516
- }
517
- (q = ue.value) == null || q.handleScroll();
518
- }, Kl = (l) => {
519
- t.options.set(l.value, l), t.cachedOptions.set(l.value, l);
520
- }, Al = (l, n) => {
521
- t.options.get(l) === n && t.options.delete(l);
522
- }, Hl = u(() => {
523
- var l, n;
524
- return (n = (l = i.value) == null ? void 0 : l.popperRef) == null ? void 0 : n.contentRef;
525
- }), Gl = () => {
526
- t.isBeforeHide = !1, P(() => ve(t.selected));
527
- }, me = () => {
528
- var l;
529
- (l = S.value) == null || l.focus();
530
- }, Ul = () => {
531
- var l;
532
- if (O.value) {
533
- O.value = !1, P(() => {
534
- var n;
535
- return (n = S.value) == null ? void 0 : n.blur();
536
- });
537
- return;
538
- }
539
- (l = S.value) == null || l.blur();
540
- }, jl = (l) => {
541
- je(l);
542
- }, ql = (l) => {
543
- if (O.value = !1, Le.value) {
544
- const n = new FocusEvent("focus", l);
545
- P(() => bl(n));
546
- }
547
- }, Ql = () => {
548
- t.inputValue.length > 0 ? t.inputValue = "" : O.value = !1;
549
- }, Je = () => {
550
- ee.value || (ll && (t.inputHovering = !0), t.menuVisibleOnFocus ? t.menuVisibleOnFocus = !1 : O.value = !O.value);
551
- }, Jl = () => {
552
- if (!O.value)
553
- Je();
554
- else {
555
- const l = D.value[t.hoveringIndex];
556
- l && !l.isDisabled && qe(l);
557
- }
558
- }, be = (l) => J(l.value) ? X(l.value, e.valueKey) : l.value, Xl = u(() => D.value.filter((l) => l.visible).every((l) => l.isDisabled)), Yl = u(() => e.multiple ? e.collapseTags ? t.selected.slice(0, e.maxCollapseTags) : t.selected : []), Zl = u(() => e.multiple ? e.collapseTags ? t.selected.slice(e.maxCollapseTags) : [] : []), Xe = (l) => {
559
- if (!O.value) {
560
- O.value = !0;
561
- return;
562
- }
563
- if (!(t.options.size === 0 || le.value === 0 || ce.value) && !Xl.value) {
564
- 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));
565
- const n = D.value[t.hoveringIndex];
566
- (n.isDisabled || !n.visible) && Xe(l), P(() => ve(_.value));
567
- }
568
- }, _l = () => {
569
- if (!d.value)
570
- return 0;
571
- const l = window.getComputedStyle(d.value);
572
- return Number.parseFloat(l.gap || "6px");
573
- }, xl = u(() => {
574
- const l = _l();
575
- return { maxWidth: `${k.value && e.maxCollapseTags === 1 ? t.selectionWidth - t.collapseItemWidth - l : t.selectionWidth}px` };
576
- }), et = u(() => ({ maxWidth: `${t.selectionWidth}px` })), lt = (l) => {
577
- s("popup-scroll", l);
578
- };
579
- return G(d, Nl), G(g, Ie), G(Be, Ie), G(m, Ae), G(k, zl), Re(() => {
580
- fe();
581
- }), {
582
- inputId: hl,
583
- contentId: f,
584
- nsSelect: o,
585
- nsInput: b,
586
- states: t,
587
- isFocused: Le,
588
- expanded: O,
589
- optionsArray: D,
590
- hoverOption: _,
591
- selectSize: Fe,
592
- filteredOptionsCount: le,
593
- updateTooltip: Ie,
594
- updateTagTooltip: Ae,
595
- debouncedOnInputChange: Ue,
596
- onInput: Ge,
597
- deletePrevTag: Fl,
598
- deleteTag: Pl,
599
- deleteSelected: je,
600
- handleOptionSelect: qe,
601
- scrollToOption: ve,
602
- hasModelValue: we,
603
- shouldShowPlaceholder: Rl,
604
- currentPlaceholder: Dl,
605
- mouseEnterEventName: Bl,
606
- needStatusIcon: Sl,
607
- showClose: Cl,
608
- iconComponent: Ne,
609
- iconReverse: Ol,
610
- validateState: ze,
611
- validateIcon: wl,
612
- showNewOption: kl,
613
- updateOptions: We,
614
- collapseTagSize: $l,
615
- setSelected: fe,
616
- selectDisabled: ee,
617
- emptyText: El,
618
- handleCompositionStart: fl,
619
- handleCompositionUpdate: vl,
620
- handleCompositionEnd: ml,
621
- onOptionCreate: Kl,
622
- onOptionDestroy: Al,
623
- handleMenuEnter: Gl,
624
- focus: me,
625
- blur: Ul,
626
- handleClearClick: jl,
627
- handleClickOutside: ql,
628
- handleEsc: Ql,
629
- toggleMenu: Je,
630
- selectOption: Jl,
631
- getValueKey: be,
632
- navigateOptions: Xe,
633
- dropdownMenuVisible: Ml,
634
- showTagList: Yl,
635
- collapseTagList: Zl,
636
- popupScroll: lt,
637
- tagStyle: xl,
638
- collapseTagStyle: et,
639
- popperRef: Hl,
640
- inputRef: S,
641
- tooltipRef: i,
642
- tagTooltipRef: p,
643
- prefixRef: C,
644
- suffixRef: v,
645
- selectRef: y,
646
- wrapperRef: Be,
647
- selectionRef: d,
648
- scrollbarRef: ue,
649
- menuRef: g,
650
- tagMenuRef: m,
651
- collapseItemRef: k
652
- };
653
- };
654
- var rn = j({
655
- name: "ElOptions",
656
- setup(e, { slots: s }) {
657
- const a = Ce(Oe);
658
- let f = [];
659
- return () => {
660
- var o, b;
661
- const t = (o = s.default) == null ? void 0 : o.call(s), y = [];
662
- function d(i) {
663
- A(i) && i.forEach((p) => {
664
- var S, C, v, g;
665
- const m = (S = (p == null ? void 0 : p.type) || {}) == null ? void 0 : S.name;
666
- m === "ElOptionGroup" ? d(!Mt(p.children) && !A(p.children) && se((C = p.children) == null ? void 0 : C.default) ? (v = p.children) == null ? void 0 : v.default() : p.children) : m === "ElOption" ? y.push((g = p.props) == null ? void 0 : g.value) : A(p.children) && d(p.children);
667
- });
668
- }
669
- return t.length && d((b = t[0]) == null ? void 0 : b.children), Se(y, f) || (f = y, a && (a.states.optionValues = y)), t;
670
- };
671
- }
672
- });
673
- const un = al({
674
- name: String,
675
- id: String,
676
- modelValue: {
677
- type: [Array, String, Number, Boolean, Object],
678
- default: void 0
679
- },
680
- autocomplete: {
681
- type: String,
682
- default: "off"
683
- },
684
- automaticDropdown: Boolean,
685
- size: Ct,
686
- effect: {
687
- type: ye(String),
688
- default: "light"
689
- },
690
- disabled: Boolean,
691
- clearable: Boolean,
692
- filterable: Boolean,
693
- allowCreate: Boolean,
694
- loading: Boolean,
695
- popperClass: {
696
- type: String,
697
- default: ""
698
- },
699
- popperOptions: {
700
- type: ye(Object),
701
- default: () => ({})
702
- },
703
- remote: Boolean,
704
- loadingText: String,
705
- noMatchText: String,
706
- noDataText: String,
707
- remoteMethod: Function,
708
- filterMethod: Function,
709
- multiple: Boolean,
710
- multipleLimit: {
711
- type: Number,
712
- default: 0
713
- },
714
- placeholder: {
715
- type: String
716
- },
717
- defaultFirstOption: Boolean,
718
- reserveKeyword: {
719
- type: Boolean,
720
- default: !0
721
- },
722
- valueKey: {
723
- type: String,
724
- default: "value"
725
- },
726
- collapseTags: Boolean,
727
- collapseTagsTooltip: Boolean,
728
- maxCollapseTags: {
729
- type: Number,
730
- default: 1
731
- },
732
- teleported: dt.teleported,
733
- persistent: {
734
- type: Boolean,
735
- default: !0
736
- },
737
- clearIcon: {
738
- type: el,
739
- default: Ot
740
- },
741
- fitInputWidth: Boolean,
742
- suffixIcon: {
743
- type: el,
744
- default: wt
745
- },
746
- tagType: { ...Te.type, default: "info" },
747
- tagEffect: { ...Te.effect, default: "light" },
748
- validateEvent: {
749
- type: Boolean,
750
- default: !0
751
- },
752
- remoteShowSuffix: Boolean,
753
- showArrow: {
754
- type: Boolean,
755
- default: !0
756
- },
757
- offset: {
758
- type: Number,
759
- default: 12
760
- },
761
- placement: {
762
- type: ye(String),
763
- values: pt,
764
- default: "bottom-start"
765
- },
766
- fallbackPlacements: {
767
- type: ye(Array),
768
- default: ["bottom-start", "top-start", "right", "left"]
769
- },
770
- tabindex: {
771
- type: [String, Number],
772
- default: 0
773
- },
774
- appendTo: String,
775
- ...It,
776
- ...ft(["ariaLabel"])
777
- }), nl = "ElSelect", cn = j({
778
- name: nl,
779
- componentName: nl,
780
- components: {
781
- ElSelectMenu: sn,
782
- ElOption: De,
783
- ElOptions: rn,
784
- ElTag: _t,
785
- ElScrollbar: vt,
786
- ElTooltip: mt,
787
- ElIcon: Ee
788
- },
789
- directives: { ClickOutside: Wt },
790
- props: un,
791
- emits: [
792
- Q,
793
- cl,
794
- "remove-tag",
795
- "clear",
796
- "visible-change",
797
- "focus",
798
- "blur",
799
- "popup-scroll"
800
- ],
801
- setup(e, { emit: s }) {
802
- const a = u(() => {
803
- const { modelValue: d, multiple: i } = e, p = i ? [] : void 0;
804
- return A(d) ? i ? d : p : i ? p : d;
805
- }), f = ie({
806
- ...$e(e),
807
- modelValue: a
808
- }), o = an(f, s), { calculatorRef: b, inputStyle: t } = xt();
809
- ol(Oe, ie({
810
- props: f,
811
- states: o.states,
812
- optionsArray: o.optionsArray,
813
- handleOptionSelect: o.handleOptionSelect,
814
- onOptionCreate: o.onOptionCreate,
815
- onOptionDestroy: o.onOptionDestroy,
816
- selectRef: o.selectRef,
817
- setSelected: o.setSelected
818
- }));
819
- const y = u(() => e.multiple ? o.states.selected.map((d) => d.currentLabel) : o.states.selectedLabel);
820
- return {
821
- ...o,
822
- modelValue: a,
823
- selectedLabel: y,
824
- calculatorRef: b,
825
- inputStyle: t
826
- };
827
- }
828
- });
829
- function dn(e, s, a, f, o, b) {
830
- const t = H("el-tag"), y = H("el-tooltip"), d = H("el-icon"), i = H("el-option"), p = H("el-options"), S = H("el-scrollbar"), C = H("el-select-menu"), v = rt("click-outside");
831
- return ae((h(), I("div", {
832
- ref: "selectRef",
833
- class: c([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
834
- [ut(e.mouseEnterEventName)]: (g) => e.states.inputHovering = !0,
835
- onMouseleave: (g) => e.states.inputHovering = !1
836
- }, [
837
- z(y, {
838
- ref: "tooltipRef",
839
- visible: e.dropdownMenuVisible,
840
- placement: e.placement,
841
- teleported: e.teleported,
842
- "popper-class": [e.nsSelect.e("popper"), e.popperClass],
843
- "popper-options": e.popperOptions,
844
- "fallback-placements": e.fallbackPlacements,
845
- effect: e.effect,
846
- pure: "",
847
- trigger: "click",
848
- transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
849
- "stop-popper-mouse-event": !1,
850
- "gpu-acceleration": !1,
851
- persistent: e.persistent,
852
- "append-to": e.appendTo,
853
- "show-arrow": e.showArrow,
854
- offset: e.offset,
855
- onBeforeShow: e.handleMenuEnter,
856
- onHide: (g) => e.states.isBeforeHide = !1
857
- }, {
858
- default: $(() => {
859
- var g;
860
- return [
861
- V("div", {
862
- ref: "wrapperRef",
863
- class: c([
864
- e.nsSelect.e("wrapper"),
865
- e.nsSelect.is("focused", e.isFocused),
866
- e.nsSelect.is("hovering", e.states.inputHovering),
867
- e.nsSelect.is("filterable", e.filterable),
868
- e.nsSelect.is("disabled", e.selectDisabled)
869
- ]),
870
- onClick: L(e.toggleMenu, ["prevent"])
871
- }, [
872
- e.$slots.prefix ? (h(), I("div", {
873
- key: 0,
874
- ref: "prefixRef",
875
- class: c(e.nsSelect.e("prefix"))
876
- }, [
877
- T(e.$slots, "prefix")
878
- ], 2)) : M("v-if", !0),
879
- V("div", {
880
- ref: "selectionRef",
881
- class: c([
882
- e.nsSelect.e("selection"),
883
- e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
884
- ])
885
- }, [
886
- e.multiple ? T(e.$slots, "tag", { key: 0 }, () => [
887
- (h(!0), I(Ye, null, Ze(e.showTagList, (m) => (h(), I("div", {
888
- key: e.getValueKey(m),
889
- class: c(e.nsSelect.e("selected-item"))
890
- }, [
891
- z(t, {
892
- closable: !e.selectDisabled && !m.isDisabled,
893
- size: e.collapseTagSize,
894
- type: e.tagType,
895
- effect: e.tagEffect,
896
- "disable-transitions": "",
897
- style: Y(e.tagStyle),
898
- onClose: (k) => e.deleteTag(k, m)
899
- }, {
900
- default: $(() => [
901
- V("span", {
902
- class: c(e.nsSelect.e("tags-text"))
903
- }, [
904
- T(e.$slots, "label", {
905
- label: m.currentLabel,
906
- value: m.value
907
- }, () => [
908
- _e(W(m.currentLabel), 1)
909
- ])
910
- ], 2)
911
- ]),
912
- _: 2
913
- }, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
914
- ], 2))), 128)),
915
- e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (h(), N(y, {
916
- key: 0,
917
- ref: "tagTooltipRef",
918
- disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
919
- "fallback-placements": ["bottom", "top", "right", "left"],
920
- effect: e.effect,
921
- placement: "bottom",
922
- teleported: e.teleported
923
- }, {
924
- default: $(() => [
925
- V("div", {
926
- ref: "collapseItemRef",
927
- class: c(e.nsSelect.e("selected-item"))
928
- }, [
929
- z(t, {
930
- closable: !1,
931
- size: e.collapseTagSize,
932
- type: e.tagType,
933
- effect: e.tagEffect,
934
- "disable-transitions": "",
935
- style: Y(e.collapseTagStyle)
936
- }, {
937
- default: $(() => [
938
- V("span", {
939
- class: c(e.nsSelect.e("tags-text"))
940
- }, " + " + W(e.states.selected.length - e.maxCollapseTags), 3)
941
- ]),
942
- _: 1
943
- }, 8, ["size", "type", "effect", "style"])
944
- ], 2)
945
- ]),
946
- content: $(() => [
947
- V("div", {
948
- ref: "tagMenuRef",
949
- class: c(e.nsSelect.e("selection"))
950
- }, [
951
- (h(!0), I(Ye, null, Ze(e.collapseTagList, (m) => (h(), I("div", {
952
- key: e.getValueKey(m),
953
- class: c(e.nsSelect.e("selected-item"))
954
- }, [
955
- z(t, {
956
- class: "in-tooltip",
957
- closable: !e.selectDisabled && !m.isDisabled,
958
- size: e.collapseTagSize,
959
- type: e.tagType,
960
- effect: e.tagEffect,
961
- "disable-transitions": "",
962
- onClose: (k) => e.deleteTag(k, m)
963
- }, {
964
- default: $(() => [
965
- V("span", {
966
- class: c(e.nsSelect.e("tags-text"))
967
- }, [
968
- T(e.$slots, "label", {
969
- label: m.currentLabel,
970
- value: m.value
971
- }, () => [
972
- _e(W(m.currentLabel), 1)
973
- ])
974
- ], 2)
975
- ]),
976
- _: 2
977
- }, 1032, ["closable", "size", "type", "effect", "onClose"])
978
- ], 2))), 128))
979
- ], 2)
980
- ]),
981
- _: 3
982
- }, 8, ["disabled", "effect", "teleported"])) : M("v-if", !0)
983
- ]) : M("v-if", !0),
984
- V("div", {
985
- class: c([
986
- e.nsSelect.e("selected-item"),
987
- e.nsSelect.e("input-wrapper"),
988
- e.nsSelect.is("hidden", !e.filterable)
989
- ])
990
- }, [
991
- ae(V("input", {
992
- id: e.inputId,
993
- ref: "inputRef",
994
- "onUpdate:modelValue": (m) => e.states.inputValue = m,
995
- type: "text",
996
- name: e.name,
997
- class: c([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
998
- disabled: e.selectDisabled,
999
- autocomplete: e.autocomplete,
1000
- style: Y(e.inputStyle),
1001
- tabindex: e.tabindex,
1002
- role: "combobox",
1003
- readonly: !e.filterable,
1004
- spellcheck: "false",
1005
- "aria-activedescendant": ((g = e.hoverOption) == null ? void 0 : g.id) || "",
1006
- "aria-controls": e.contentId,
1007
- "aria-expanded": e.dropdownMenuVisible,
1008
- "aria-label": e.ariaLabel,
1009
- "aria-autocomplete": "none",
1010
- "aria-haspopup": "listbox",
1011
- onKeydown: [
1012
- oe(L((m) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
1013
- oe(L((m) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
1014
- oe(L(e.handleEsc, ["stop", "prevent"]), ["esc"]),
1015
- oe(L(e.selectOption, ["stop", "prevent"]), ["enter"]),
1016
- oe(L(e.deletePrevTag, ["stop"]), ["delete"])
1017
- ],
1018
- onCompositionstart: e.handleCompositionStart,
1019
- onCompositionupdate: e.handleCompositionUpdate,
1020
- onCompositionend: e.handleCompositionEnd,
1021
- onInput: e.onInput,
1022
- onClick: L(e.toggleMenu, ["stop"])
1023
- }, null, 46, ["id", "onUpdate:modelValue", "name", "disabled", "autocomplete", "tabindex", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onClick"]), [
1024
- [ct, e.states.inputValue]
1025
- ]),
1026
- e.filterable ? (h(), I("span", {
1027
- key: 0,
1028
- ref: "calculatorRef",
1029
- "aria-hidden": "true",
1030
- class: c(e.nsSelect.e("input-calculator")),
1031
- textContent: W(e.states.inputValue)
1032
- }, null, 10, ["textContent"])) : M("v-if", !0)
1033
- ], 2),
1034
- e.shouldShowPlaceholder ? (h(), I("div", {
1035
- key: 1,
1036
- class: c([
1037
- e.nsSelect.e("selected-item"),
1038
- e.nsSelect.e("placeholder"),
1039
- e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
1040
- ])
1041
- }, [
1042
- e.hasModelValue ? T(e.$slots, "label", {
1043
- key: 0,
1044
- label: e.currentPlaceholder,
1045
- value: e.modelValue
1046
- }, () => [
1047
- V("span", null, W(e.currentPlaceholder), 1)
1048
- ]) : (h(), I("span", { key: 1 }, W(e.currentPlaceholder), 1))
1049
- ], 2)) : M("v-if", !0)
1050
- ], 2),
1051
- V("div", {
1052
- ref: "suffixRef",
1053
- class: c(e.nsSelect.e("suffix"))
1054
- }, [
1055
- e.iconComponent && !e.showClose ? (h(), N(d, {
1056
- key: 0,
1057
- class: c([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
1058
- }, {
1059
- default: $(() => [
1060
- (h(), N(Ve(e.iconComponent)))
1061
- ]),
1062
- _: 1
1063
- }, 8, ["class"])) : M("v-if", !0),
1064
- e.showClose && e.clearIcon ? (h(), N(d, {
1065
- key: 1,
1066
- class: c([
1067
- e.nsSelect.e("caret"),
1068
- e.nsSelect.e("icon"),
1069
- e.nsSelect.e("clear")
1070
- ]),
1071
- onClick: e.handleClearClick
1072
- }, {
1073
- default: $(() => [
1074
- (h(), N(Ve(e.clearIcon)))
1075
- ]),
1076
- _: 1
1077
- }, 8, ["class", "onClick"])) : M("v-if", !0),
1078
- e.validateState && e.validateIcon && e.needStatusIcon ? (h(), N(d, {
1079
- key: 2,
1080
- class: c([
1081
- e.nsInput.e("icon"),
1082
- e.nsInput.e("validateIcon"),
1083
- e.nsInput.is("loading", e.validateState === "validating")
1084
- ])
1085
- }, {
1086
- default: $(() => [
1087
- (h(), N(Ve(e.validateIcon)))
1088
- ]),
1089
- _: 1
1090
- }, 8, ["class"])) : M("v-if", !0)
1091
- ], 2)
1092
- ], 10, ["onClick"])
1093
- ];
1094
- }),
1095
- content: $(() => [
1096
- z(C, { ref: "menuRef" }, {
1097
- default: $(() => [
1098
- e.$slots.header ? (h(), I("div", {
1099
- key: 0,
1100
- class: c(e.nsSelect.be("dropdown", "header")),
1101
- onClick: L(() => {
1102
- }, ["stop"])
1103
- }, [
1104
- T(e.$slots, "header")
1105
- ], 10, ["onClick"])) : M("v-if", !0),
1106
- ae(z(S, {
1107
- id: e.contentId,
1108
- ref: "scrollbarRef",
1109
- tag: "ul",
1110
- "wrap-class": e.nsSelect.be("dropdown", "wrap"),
1111
- "view-class": e.nsSelect.be("dropdown", "list"),
1112
- class: c([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
1113
- role: "listbox",
1114
- "aria-label": e.ariaLabel,
1115
- "aria-orientation": "vertical",
1116
- onScroll: e.popupScroll
1117
- }, {
1118
- default: $(() => [
1119
- e.showNewOption ? (h(), N(i, {
1120
- key: 0,
1121
- value: e.states.inputValue,
1122
- created: !0
1123
- }, null, 8, ["value"])) : M("v-if", !0),
1124
- z(p, null, {
1125
- default: $(() => [
1126
- T(e.$slots, "default")
1127
- ]),
1128
- _: 3
1129
- })
1130
- ]),
1131
- _: 3
1132
- }, 8, ["id", "wrap-class", "view-class", "class", "aria-label", "onScroll"]), [
1133
- [Me, e.states.options.size > 0 && !e.loading]
1134
- ]),
1135
- e.$slots.loading && e.loading ? (h(), I("div", {
1136
- key: 1,
1137
- class: c(e.nsSelect.be("dropdown", "loading"))
1138
- }, [
1139
- T(e.$slots, "loading")
1140
- ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (h(), I("div", {
1141
- key: 2,
1142
- class: c(e.nsSelect.be("dropdown", "empty"))
1143
- }, [
1144
- T(e.$slots, "empty", {}, () => [
1145
- V("span", null, W(e.emptyText), 1)
1146
- ])
1147
- ], 2)) : M("v-if", !0),
1148
- e.$slots.footer ? (h(), I("div", {
1149
- key: 3,
1150
- class: c(e.nsSelect.be("dropdown", "footer")),
1151
- onClick: L(() => {
1152
- }, ["stop"])
1153
- }, [
1154
- T(e.$slots, "footer")
1155
- ], 10, ["onClick"])) : M("v-if", !0)
1156
- ]),
1157
- _: 3
1158
- }, 512)
1159
- ]),
1160
- _: 3
1161
- }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow", "onHide"])
1162
- ], 16, ["onMouseleave"])), [
1163
- [v, e.handleClickOutside, e.popperRef]
1164
- ]);
1165
- }
1166
- var pn = /* @__PURE__ */ re(cn, [["render", dn], ["__file", "select.vue"]]);
1167
- const fn = j({
1168
- name: "ElOptionGroup",
1169
- componentName: "ElOptionGroup",
1170
- props: {
1171
- label: String,
1172
- disabled: Boolean
1173
- },
1174
- setup(e) {
1175
- const s = Z("select"), a = E(null), f = ke(), o = E([]);
1176
- ol(dl, ie({
1177
- ...$e(e)
1178
- }));
1179
- const b = u(() => o.value.some((i) => i.visible === !0)), t = (i) => {
1180
- var p, S;
1181
- return ((p = i.type) == null ? void 0 : p.name) === "ElOption" && !!((S = i.component) != null && S.proxy);
1182
- }, y = (i) => {
1183
- const p = K(i), S = [];
1184
- return p.forEach((C) => {
1185
- var v, g;
1186
- t(C) ? S.push(C.component.proxy) : (v = C.children) != null && v.length ? S.push(...y(C.children)) : (g = C.component) != null && g.subTree && S.push(...y(C.component.subTree));
1187
- }), S;
1188
- }, d = () => {
1189
- o.value = y(f.subTree);
1190
- };
1191
- return Re(() => {
1192
- d();
1193
- }), Rt(a, d, {
1194
- attributes: !0,
1195
- subtree: !0,
1196
- childList: !0
1197
- }), {
1198
- groupRef: a,
1199
- visible: b,
1200
- ns: s
1201
- };
1202
- }
1203
- });
1204
- function vn(e, s, a, f, o, b) {
1205
- return ae((h(), I("ul", {
1206
- ref: "groupRef",
1207
- class: c(e.ns.be("group", "wrap"))
1208
- }, [
1209
- V("li", {
1210
- class: c(e.ns.be("group", "title"))
1211
- }, W(e.label), 3),
1212
- V("li", null, [
1213
- V("ul", {
1214
- class: c(e.ns.b("group"))
1215
- }, [
1216
- T(e.$slots, "default")
1217
- ], 2)
1218
- ])
1219
- ], 2)), [
1220
- [Me, e.visible]
1221
- ]);
1222
- }
1223
- var pl = /* @__PURE__ */ re(fn, [["render", vn], ["__file", "option-group.vue"]]);
1224
- const Tn = il(pn, {
1225
- Option: De,
1226
- OptionGroup: pl
1227
- }), kn = ul(De);
1228
- ul(pl);
1229
- export {
1230
- kn as E,
1231
- Tn as a,
1232
- _t as b
1233
- };