@dazhicheng/ui 1.1.0 → 1.4.1

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 (131) hide show
  1. package/dist/components/tt-form/src/form-render/form.vue.d.ts +1 -1
  2. package/dist/components/tt-form/src/index.vue.d.ts +4 -4
  3. package/dist/components/tt-form-adapter/component/index.d.ts +1 -1
  4. package/dist/components/tt-form-adapter/component/index.d.ts.map +1 -1
  5. package/dist/components/tt-form-adapter/index.d.ts +2 -2
  6. package/dist/components/tt-form-adapter/index.d.ts.map +1 -1
  7. package/dist/components/tt-loading/index.d.ts +17 -0
  8. package/dist/components/tt-loading/index.d.ts.map +1 -0
  9. package/dist/components/tt-loading/src/directive.d.ts +10 -0
  10. package/dist/components/tt-loading/src/directive.d.ts.map +1 -0
  11. package/dist/components/tt-loading/src/loading.vue.d.ts +13 -0
  12. package/dist/components/tt-loading/src/loading.vue.d.ts.map +1 -0
  13. package/dist/components/tt-loading/src/service.d.ts +26 -0
  14. package/dist/components/tt-loading/src/service.d.ts.map +1 -0
  15. package/dist/components/tt-loading/src/type.d.ts +21 -0
  16. package/dist/components/tt-loading/src/type.d.ts.map +1 -0
  17. package/dist/components/tt-part/index.d.ts +3 -3
  18. package/dist/components/tt-part/index.vue.d.ts +1 -1
  19. package/dist/components/tt-table/index.d.ts +128 -0
  20. package/dist/components/tt-table/index.d.ts.map +1 -0
  21. package/dist/components/tt-table/src/Table.vue.d.ts +1746 -0
  22. package/dist/components/tt-table/src/Table.vue.d.ts.map +1 -0
  23. package/dist/components/tt-table/src/TableForm.vue.d.ts +163 -0
  24. package/dist/components/tt-table/src/TableForm.vue.d.ts.map +1 -0
  25. package/dist/components/tt-table/src/componentMap.d.ts +9 -0
  26. package/dist/components/tt-table/src/componentMap.d.ts.map +1 -0
  27. package/dist/components/tt-table/src/components/RowContext.d.ts +25 -0
  28. package/dist/components/tt-table/src/components/RowContext.d.ts.map +1 -0
  29. package/dist/components/tt-table/src/components/TableAction.vue.d.ts +80 -0
  30. package/dist/components/tt-table/src/components/TableAction.vue.d.ts.map +1 -0
  31. package/dist/components/tt-table/src/components/TableButtons.d.ts +31 -0
  32. package/dist/components/tt-table/src/components/TableButtons.d.ts.map +1 -0
  33. package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +1685 -0
  34. package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts.map +1 -0
  35. package/dist/components/tt-table/src/emits.d.ts +2 -0
  36. package/dist/components/tt-table/src/emits.d.ts.map +1 -0
  37. package/dist/components/tt-table/src/enum.d.ts +3 -0
  38. package/dist/components/tt-table/src/enum.d.ts.map +1 -0
  39. package/dist/components/tt-table/src/hooks/useCache.d.ts +21 -0
  40. package/dist/components/tt-table/src/hooks/useCache.d.ts.map +1 -0
  41. package/dist/components/tt-table/src/hooks/useCellArea.d.ts +16 -0
  42. package/dist/components/tt-table/src/hooks/useCellArea.d.ts.map +1 -0
  43. package/dist/components/tt-table/src/hooks/useColumns.d.ts +32 -0
  44. package/dist/components/tt-table/src/hooks/useColumns.d.ts.map +1 -0
  45. package/dist/components/tt-table/src/hooks/useDataSource.d.ts +30 -0
  46. package/dist/components/tt-table/src/hooks/useDataSource.d.ts.map +1 -0
  47. package/dist/components/tt-table/src/hooks/useFullscreen.d.ts +12 -0
  48. package/dist/components/tt-table/src/hooks/useFullscreen.d.ts.map +1 -0
  49. package/dist/components/tt-table/src/hooks/useLeftRightSlot.d.ts +1083 -0
  50. package/dist/components/tt-table/src/hooks/useLeftRightSlot.d.ts.map +1 -0
  51. package/dist/components/tt-table/src/hooks/usePagination.d.ts +103 -0
  52. package/dist/components/tt-table/src/hooks/usePagination.d.ts.map +1 -0
  53. package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +31 -0
  54. package/dist/components/tt-table/src/hooks/useRowSelection.d.ts.map +1 -0
  55. package/dist/components/tt-table/src/hooks/useTable.d.ts +8 -0
  56. package/dist/components/tt-table/src/hooks/useTable.d.ts.map +1 -0
  57. package/dist/components/tt-table/src/hooks/useTableContext.d.ts +44 -0
  58. package/dist/components/tt-table/src/hooks/useTableContext.d.ts.map +1 -0
  59. package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +102 -0
  60. package/dist/components/tt-table/src/hooks/useTableEvent.d.ts.map +1 -0
  61. package/dist/components/tt-table/src/hooks/useTableForm.d.ts +15 -0
  62. package/dist/components/tt-table/src/hooks/useTableForm.d.ts.map +1 -0
  63. package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +12 -0
  64. package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts.map +1 -0
  65. package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +16 -0
  66. package/dist/components/tt-table/src/hooks/useTableHeight.d.ts.map +1 -0
  67. package/dist/components/tt-table/src/hooks/useTableRender.d.ts +82 -0
  68. package/dist/components/tt-table/src/hooks/useTableRender.d.ts.map +1 -0
  69. package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +12 -0
  70. package/dist/components/tt-table/src/hooks/useTableSlot.d.ts.map +1 -0
  71. package/dist/components/tt-table/src/props.d.ts +485 -0
  72. package/dist/components/tt-table/src/props.d.ts.map +1 -0
  73. package/dist/components/tt-table/src/toolProps.d.ts +102 -0
  74. package/dist/components/tt-table/src/toolProps.d.ts.map +1 -0
  75. package/dist/components/tt-table/src/types/table.d.ts +493 -0
  76. package/dist/components/tt-table/src/types/table.d.ts.map +1 -0
  77. package/dist/components/tt-table/src/types/tableAction.d.ts +27 -0
  78. package/dist/components/tt-table/src/types/tableAction.d.ts.map +1 -0
  79. package/dist/components/tt-table/src/types/tableForm.d.ts +66 -0
  80. package/dist/components/tt-table/src/types/tableForm.d.ts.map +1 -0
  81. package/dist/components/tt-table/src/types/tableTools.d.ts +66 -0
  82. package/dist/components/tt-table/src/types/tableTools.d.ts.map +1 -0
  83. package/dist/components/tt-table/src/utils/context.d.ts +19 -0
  84. package/dist/components/tt-table/src/utils/context.d.ts.map +1 -0
  85. package/dist/components/tt-table/src/utils/filters.d.ts +110 -0
  86. package/dist/components/tt-table/src/utils/filters.d.ts.map +1 -0
  87. package/dist/components/tt-table/src/utils/table-api.d.ts +269 -0
  88. package/dist/components/tt-table/src/utils/table-api.d.ts.map +1 -0
  89. package/dist/components/tt-table/src/utils/table-form-api.d.ts +89 -0
  90. package/dist/components/tt-table/src/utils/table-form-api.d.ts.map +1 -0
  91. package/dist/components/tt-table/src/utils/vxeTable.d.ts +29 -0
  92. package/dist/components/tt-table/src/utils/vxeTable.d.ts.map +1 -0
  93. package/dist/components/tt-validate/src/Field.d.ts +1 -1
  94. package/dist/components/tt-validate/src/Form.d.ts +1 -1
  95. package/dist/{css-CoEz66oB.js → css-CKklk3nV.js} +1 -0
  96. package/dist/{event-DSSsWzVU.js → event-BgJv9iWk.js} +1 -1
  97. package/dist/hooks/useSetup.d.ts +6 -0
  98. package/dist/hooks/useSetup.d.ts.map +1 -0
  99. package/dist/hooks/useTemplateSlot.d.ts +10 -0
  100. package/dist/hooks/useTemplateSlot.d.ts.map +1 -0
  101. package/dist/{icon-DbdhHmva.js → icon-C9BsRQqM.js} +2 -2
  102. package/dist/{index-C8UKPPHD.js → index-64J4mWP7.js} +2 -2
  103. package/dist/{index-hlMlaPX2.js → index-B3w7HVvP.js} +6 -6
  104. package/dist/{index-p03nbfgB.js → index-BQgaGlJA.js} +8 -8
  105. package/dist/{index-DHdDQVpg.js → index-Bq5RXWp8.js} +5 -5
  106. package/dist/{index-BXkpTX1Y.js → index-CB2v0taz.js} +1 -1
  107. package/dist/{index-DiNnJQ4b.js → index-C_u1XOy0.js} +7 -7
  108. package/dist/{index-BKMpeJMS.js → index-CdyRKSi4.js} +20 -20
  109. package/dist/index-CjcGE9Xi.js +2700 -0
  110. package/dist/{index-COVG9Wvh.js → index-CzDjdhem.js} +5 -5
  111. package/dist/{index-BhRFBLHz.js → index-D6x6ZHVk.js} +5 -5
  112. package/dist/{index-DfMIblcg.js → index-DHXyFJLO.js} +1 -1
  113. package/dist/{index-DVbQtqoV.js → index-DXGnUvsQ.js} +9 -9
  114. package/dist/{index-BgzdMRW8.js → index-DY3FsmvZ.js} +2 -2
  115. package/dist/{index-DIqpkfiH.js → index-Dp1l-3ez.js} +2 -2
  116. package/dist/{index-my6Z5v2z.js → index-LRY3g1Bz.js} +6 -6
  117. package/dist/{index-qZ-AAxXa.js → index-hI7UMWGr.js} +1 -1
  118. package/dist/index-iFd1yQ1C.js +55785 -0
  119. package/dist/index.d.ts +3 -11
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +25 -17
  122. package/dist/panel-time-pick.vue2-C7R5HGb8.js +2026 -0
  123. package/dist/style.css +1 -1
  124. package/dist/{use-form-common-props-DkpXv1AY.js → use-form-common-props-CDmM4Wn1.js} +1 -1
  125. package/dist/{use-form-item-bliFpQLk.js → use-form-item-Bv38v7TO.js} +2 -2
  126. package/dist/util-CWdgKsYq.js +2259 -0
  127. package/package.json +9 -9
  128. package/dist/index-1F8harWZ.js +0 -1982
  129. package/dist/index-D8_UEqsc.js +0 -2683
  130. package/dist/index-DdEvRX8w.js +0 -47929
  131. package/dist/panel-time-pick.vue2-D4HGRRie.js +0 -1602
@@ -1,1982 +0,0 @@
1
- import { shallowRef as Ot, ref as D, computed as p, isVNode as ke, defineComponent as re, createElementBlock as V, createBlock as H, openBlock as b, normalizeStyle as se, normalizeClass as m, createElementVNode as $, createCommentVNode as P, unref as F, renderSlot as M, withModifiers as ne, createVNode as j, withCtx as R, Transition as Ct, watch as U, inject as De, getCurrentInstance as Re, toRaw as wt, toRefs as Qe, reactive as ge, onBeforeUnmount as Il, nextTick as q, withDirectives as $e, toDisplayString as Z, vShow as qe, onMounted as Ze, useSlots as Et, watchEffect as Tt, provide as Vl, resolveComponent as X, resolveDirective as It, mergeProps as He, toHandlerKey as Vt, Fragment as ve, renderList as Ie, createTextVNode as hl, resolveDynamicComponent as Ke } from "vue";
2
- import { _ as Me, b as kt, s as Dt, u as $t, a as yl, E as Rt, c as Mt, d as Lt } from "./index-D8_UEqsc.js";
3
- import { b as Je, k as Bt, h as kl, w as Dl, t as Nt, j as Pt, d as Sl, p as Wt, g as Ve, e as Ft, a as G, u as zt, o as $l } from "./use-form-common-props-DkpXv1AY.js";
4
- import { E as Ae } from "./index-C8UKPPHD.js";
5
- import { a as K, d as ie, A as Ol, o as J, G as Ht, i as be, F as Kt, U as le, C as Xe, g as At, e as jt, c as Gt } from "./index-DdEvRX8w.js";
6
- import { u as Rl } from "./index-BQfVaV7A.js";
7
- import { isEqual as oe, get as Q, castArray as Y, isNil as Ut, findLastIndex as Qt, clamp as qt } from "lodash-es";
8
- import { b as Ml, u as Zt, a as Jt } from "./use-form-item-bliFpQLk.js";
9
- import { useResizeObserver as te, isClient as Ll, isIOS as Cl, useDebounceFn as Xt, useMutationObserver as Yt } from "@vueuse/core";
10
- import { b as xt, u as _t } from "./index-BgzdMRW8.js";
11
- import { V as en, i as wl } from "./icon-DbdhHmva.js";
12
- import { g as El, E as A } from "./event-DSSsWzVU.js";
13
- import { u as ln } from "./index-BXkpTX1Y.js";
14
- import { C as tn } from "./index-DIqpkfiH.js";
15
- const Bl = 11, nn = 2;
16
- function on() {
17
- const e = Ot(), n = D(0), a = p(() => ({
18
- minWidth: `${Math.max(n.value, Bl)}px`
19
- }));
20
- return te(e, () => {
21
- var c, f;
22
- n.value = (f = (c = e.value) == null ? void 0 : c.getBoundingClientRect().width) != null ? f : 0;
23
- }), {
24
- calculatorRef: e,
25
- calculatorWidth: n,
26
- inputStyle: a
27
- };
28
- }
29
- function an(e, n) {
30
- if (!Ll) return;
31
- if (!n) {
32
- e.scrollTop = 0;
33
- return;
34
- }
35
- const a = [];
36
- let i = n.offsetParent;
37
- for (; i !== null && e !== i && e.contains(i); )
38
- a.push(i), i = i.offsetParent;
39
- const c = n.offsetTop + a.reduce((g, O) => g + O.offsetTop, 0), f = c + n.offsetHeight, r = e.scrollTop, t = r + e.clientHeight;
40
- c < r ? e.scrollTop = c : f > t && (e.scrollTop = f - e.clientHeight);
41
- }
42
- const me = (e) => {
43
- const n = K(e) ? e : [e], a = [];
44
- return n.forEach((i) => {
45
- var c;
46
- K(i) ? a.push(...me(i)) : ke(i) && ((c = i.component) != null && c.subTree) ? a.push(i, ...me(i.component.subTree)) : ke(i) && K(i.children) ? a.push(...me(i.children)) : ke(i) && i.shapeFlag === 2 ? a.push(...me(i.type())) : a.push(i);
47
- }), a;
48
- }, je = Je({
49
- /**
50
- * @description type of Tag
51
- */
52
- type: {
53
- type: String,
54
- values: ["primary", "success", "info", "warning", "danger"],
55
- default: "primary"
56
- },
57
- /**
58
- * @description whether Tag can be removed
59
- */
60
- closable: Boolean,
61
- /**
62
- * @description whether to disable animations
63
- */
64
- disableTransitions: Boolean,
65
- /**
66
- * @description whether Tag has a highlighted border
67
- */
68
- hit: Boolean,
69
- /**
70
- * @description background color of the Tag
71
- */
72
- color: String,
73
- /**
74
- * @description size of Tag
75
- */
76
- size: {
77
- type: String,
78
- values: Bt
79
- },
80
- /**
81
- * @description theme of Tag
82
- */
83
- effect: {
84
- type: String,
85
- values: ["dark", "light", "plain"],
86
- default: "light"
87
- },
88
- /**
89
- * @description whether Tag is rounded
90
- */
91
- round: Boolean
92
- }), sn = {
93
- close: (e) => e instanceof MouseEvent,
94
- click: (e) => e instanceof MouseEvent
95
- }, rn = ["aria-label"], un = ["aria-label"];
96
- var dn = /* @__PURE__ */ re({
97
- name: "ElTag",
98
- __name: "tag",
99
- props: je,
100
- emits: sn,
101
- setup(e, { emit: n }) {
102
- const a = e, i = n, c = kl(), { t: f } = Rl(), r = ie("tag"), t = p(() => {
103
- const { type: y, hit: C, effect: d, closable: E, round: w } = a;
104
- return [
105
- r.b(),
106
- r.is("closable", E),
107
- r.m(y || "primary"),
108
- r.m(c.value),
109
- r.m(d),
110
- r.is("hit", C),
111
- r.is("round", w)
112
- ];
113
- }), g = (y) => {
114
- i("close", y);
115
- }, O = (y) => {
116
- i("click", y);
117
- }, h = (y) => {
118
- var C, d, E;
119
- (E = (d = (C = y == null ? void 0 : y.component) == null ? void 0 : C.subTree) == null ? void 0 : d.component) != null && E.bum && (y.component.subTree.component.bum = null);
120
- };
121
- return (y, C) => e.disableTransitions ? (b(), V(
122
- "span",
123
- {
124
- key: 0,
125
- class: m(t.value),
126
- style: se({ backgroundColor: e.color }),
127
- onClick: O
128
- },
129
- [
130
- $(
131
- "span",
132
- {
133
- class: m(F(r).e("content"))
134
- },
135
- [
136
- M(y.$slots, "default")
137
- ],
138
- 2
139
- /* CLASS */
140
- ),
141
- e.closable ? (b(), V("button", {
142
- key: 0,
143
- "aria-label": F(f)("el.tag.close"),
144
- class: m(F(r).e("close")),
145
- type: "button",
146
- onClick: ne(g, ["stop"])
147
- }, [
148
- j(F(Ae), null, {
149
- default: R(() => [
150
- j(F(Ol))
151
- ]),
152
- _: 1
153
- /* STABLE */
154
- })
155
- ], 10, rn)) : P("v-if", !0)
156
- ],
157
- 6
158
- /* CLASS, STYLE */
159
- )) : (b(), H(Ct, {
160
- key: 1,
161
- name: `${F(r).namespace.value}-zoom-in-center`,
162
- appear: "",
163
- onVnodeMounted: h
164
- }, {
165
- default: R(() => [
166
- $(
167
- "span",
168
- {
169
- class: m(t.value),
170
- style: se({ backgroundColor: e.color }),
171
- onClick: O
172
- },
173
- [
174
- $(
175
- "span",
176
- {
177
- class: m(F(r).e("content"))
178
- },
179
- [
180
- M(y.$slots, "default")
181
- ],
182
- 2
183
- /* CLASS */
184
- ),
185
- e.closable ? (b(), V("button", {
186
- key: 0,
187
- "aria-label": F(f)("el.tag.close"),
188
- class: m(F(r).e("close")),
189
- type: "button",
190
- onClick: ne(g, ["stop"])
191
- }, [
192
- j(F(Ae), null, {
193
- default: R(() => [
194
- j(F(Ol))
195
- ]),
196
- _: 1
197
- /* STABLE */
198
- })
199
- ], 10, un)) : P("v-if", !0)
200
- ],
201
- 6
202
- /* CLASS, STYLE */
203
- )
204
- ]),
205
- _: 3
206
- /* FORWARDED */
207
- }, 8, ["name"]));
208
- }
209
- });
210
- const cn = Dl(dn), Ge = {
211
- label: "label",
212
- value: "value",
213
- disabled: "disabled",
214
- options: "options"
215
- };
216
- function pn(e) {
217
- const n = D({ ...Ge, ...e.props });
218
- let a = { ...e.props };
219
- return U(
220
- () => e.props,
221
- (t) => {
222
- oe(t, a) || (n.value = { ...Ge, ...t }, a = { ...t });
223
- },
224
- { deep: !0 }
225
- ), {
226
- aliasProps: n,
227
- getLabel: (t) => Q(t, n.value.label),
228
- getValue: (t) => Q(t, n.value.value),
229
- getDisabled: (t) => Q(t, n.value.disabled),
230
- getOptions: (t) => Q(t, n.value.options)
231
- };
232
- }
233
- const Nl = /* @__PURE__ */ Symbol("ElSelectGroup"), Le = /* @__PURE__ */ Symbol("ElSelect"), Ue = "ElOption", fn = Je({
234
- /**
235
- * @description value of option
236
- */
237
- value: {
238
- type: [String, Number, Boolean, Object],
239
- required: !0
240
- },
241
- /**
242
- * @description label of option, same as `value` if omitted
243
- */
244
- label: {
245
- type: [String, Number]
246
- },
247
- created: Boolean,
248
- /**
249
- * @description whether option is disabled
250
- */
251
- disabled: Boolean
252
- });
253
- function vn(e, n) {
254
- const a = De(Le);
255
- a || Nt(Ue, "usage: <el-select><el-option /></el-select/>");
256
- const i = De(Nl, { disabled: !1 }), c = p(() => h(Y(a.props.modelValue), e.value)), f = p(() => {
257
- var d;
258
- if (a.props.multiple) {
259
- const E = Y((d = a.props.modelValue) != null ? d : []);
260
- return !c.value && E.length >= a.props.multipleLimit && a.props.multipleLimit > 0;
261
- } else
262
- return !1;
263
- }), r = p(() => {
264
- var d;
265
- return (d = e.label) != null ? d : J(e.value) ? "" : e.value;
266
- }), t = p(() => e.value || e.label || ""), g = p(() => e.disabled || n.groupDisabled || f.value), O = Re(), h = (d = [], E) => {
267
- if (J(e.value)) {
268
- const w = a.props.valueKey;
269
- return d && d.some((u) => wt(Q(u, w)) === Q(E, w));
270
- } else
271
- return d && d.includes(E);
272
- }, y = () => {
273
- g.value || (a.states.hoveringIndex = a.optionsArray.indexOf(O.proxy));
274
- }, C = (d) => {
275
- const E = new RegExp(Ht(d), "i");
276
- n.visible = E.test(String(r.value)) || e.created;
277
- };
278
- return U(
279
- () => r.value,
280
- () => {
281
- !e.created && !a.props.remote && a.setSelected();
282
- }
283
- ), U(
284
- () => e.value,
285
- (d, E) => {
286
- const { remote: w, valueKey: u } = a.props;
287
- if ((w ? d !== E : !oe(d, E)) && (a.onOptionDestroy(E, O.proxy), a.onOptionCreate(O.proxy)), !e.created && !w) {
288
- if (u && J(d) && J(E) && d[u] === E[u])
289
- return;
290
- a.setSelected();
291
- }
292
- }
293
- ), U(
294
- () => i.disabled,
295
- () => {
296
- n.groupDisabled = i.disabled;
297
- },
298
- { immediate: !0 }
299
- ), {
300
- select: a,
301
- currentLabel: r,
302
- currentValue: t,
303
- itemSelected: c,
304
- isDisabled: g,
305
- hoverItem: y,
306
- updateOption: C
307
- };
308
- }
309
- var bn = re({
310
- name: Ue,
311
- componentName: Ue,
312
- props: fn,
313
- setup(e) {
314
- const n = ie("select"), a = Ml(), i = p(() => [
315
- n.be("dropdown", "item"),
316
- n.is("disabled", F(t)),
317
- n.is("selected", F(r)),
318
- n.is("hovering", F(C))
319
- ]), c = ge({
320
- index: -1,
321
- groupDisabled: !1,
322
- visible: !0,
323
- hover: !1
324
- }), {
325
- currentLabel: f,
326
- itemSelected: r,
327
- isDisabled: t,
328
- select: g,
329
- hoverItem: O,
330
- updateOption: h
331
- } = vn(e, c), { visible: y, hover: C } = Qe(c), d = Re().proxy;
332
- g.onOptionCreate(d), Il(() => {
333
- const w = d.value;
334
- q(() => {
335
- const { selected: u } = g.states, L = u.some((S) => S.value === d.value);
336
- g.states.cachedOptions.get(w) === d && !L && g.states.cachedOptions.delete(w);
337
- }), g.onOptionDestroy(w, d);
338
- });
339
- function E() {
340
- t.value || g.handleOptionSelect(d);
341
- }
342
- return {
343
- ns: n,
344
- id: a,
345
- containerKls: i,
346
- currentLabel: f,
347
- itemSelected: r,
348
- isDisabled: t,
349
- select: g,
350
- visible: y,
351
- hover: C,
352
- states: c,
353
- hoverItem: O,
354
- updateOption: h,
355
- selectOptionClick: E
356
- };
357
- }
358
- });
359
- const mn = ["id", "aria-disabled", "aria-selected"];
360
- function gn(e, n, a, i, c, f) {
361
- return $e((b(), V("li", {
362
- id: e.id,
363
- class: m(e.containerKls),
364
- role: "option",
365
- "aria-disabled": e.isDisabled || void 0,
366
- "aria-selected": e.itemSelected,
367
- onMousemove: n[0] || (n[0] = (...r) => e.hoverItem && e.hoverItem(...r)),
368
- onClick: n[1] || (n[1] = ne((...r) => e.selectOptionClick && e.selectOptionClick(...r), ["stop"]))
369
- }, [
370
- M(e.$slots, "default", {}, () => [
371
- $(
372
- "span",
373
- null,
374
- Z(e.currentLabel),
375
- 1
376
- /* TEXT */
377
- )
378
- ])
379
- ], 42, mn)), [
380
- [qe, e.visible]
381
- ]);
382
- }
383
- var Ye = /* @__PURE__ */ Me(bn, [["render", gn]]), hn = re({
384
- name: "ElSelectDropdown",
385
- componentName: "ElSelectDropdown",
386
- setup() {
387
- const e = De(Le), n = ie("select"), a = p(() => e.props.popperClass), i = p(() => e.props.multiple), c = p(() => e.props.fitInputWidth), f = D("");
388
- function r() {
389
- var t;
390
- const g = (t = e.selectRef) == null ? void 0 : t.offsetWidth;
391
- g ? f.value = `${g - nn}px` : f.value = "";
392
- }
393
- return Ze(() => {
394
- r(), te(e.selectRef, r);
395
- }), {
396
- ns: n,
397
- minWidth: f,
398
- popperClass: a,
399
- isMultiple: i,
400
- isFitInputWidth: c
401
- };
402
- }
403
- });
404
- function yn(e, n, a, i, c, f) {
405
- return b(), V(
406
- "div",
407
- {
408
- class: m([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
409
- style: se({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
410
- },
411
- [
412
- e.$slots.header ? (b(), V(
413
- "div",
414
- {
415
- key: 0,
416
- class: m(e.ns.be("dropdown", "header"))
417
- },
418
- [
419
- M(e.$slots, "header")
420
- ],
421
- 2
422
- /* CLASS */
423
- )) : P("v-if", !0),
424
- M(e.$slots, "default"),
425
- e.$slots.footer ? (b(), V(
426
- "div",
427
- {
428
- key: 1,
429
- class: m(e.ns.be("dropdown", "footer"))
430
- },
431
- [
432
- M(e.$slots, "footer")
433
- ],
434
- 2
435
- /* CLASS */
436
- )) : P("v-if", !0)
437
- ],
438
- 6
439
- /* CLASS, STYLE */
440
- );
441
- }
442
- var Sn = /* @__PURE__ */ Me(hn, [["render", yn]]);
443
- const On = (e, n) => {
444
- const { t: a } = Rl(), i = Et(), c = Ml(), f = ie("select"), r = ie("input"), t = ge({
445
- inputValue: "",
446
- options: /* @__PURE__ */ new Map(),
447
- cachedOptions: /* @__PURE__ */ new Map(),
448
- optionValues: [],
449
- // sorted value of options
450
- selected: [],
451
- selectionWidth: 0,
452
- collapseItemWidth: 0,
453
- selectedLabel: "",
454
- hoveringIndex: -1,
455
- previousQuery: null,
456
- inputHovering: !1,
457
- menuVisibleOnFocus: !1,
458
- isBeforeHide: !1
459
- }), g = D(), O = D(), h = D(), y = D(), C = D(), d = D(), E = D(), w = D(), u = D(), L = D(), S = D(), v = D(!1), k = D(), ae = D(!1), { form: ue, formItem: B } = Zt(), { inputId: _e } = Jt(e, {
460
- formItemContext: B
461
- }), { valueOnClear: x, isEmptyValue: Pl } = kt(e), {
462
- isComposing: Be,
463
- handleCompositionStart: Wl,
464
- handleCompositionUpdate: Fl,
465
- handleCompositionEnd: zl
466
- } = xt({
467
- afterComposition: (l) => rl(l)
468
- }), de = Pt(), { wrapperRef: el, isFocused: Ne, handleBlur: Hl } = _t(C, {
469
- disabled: de,
470
- afterFocus() {
471
- e.automaticDropdown && !v.value && (v.value = !0, t.menuVisibleOnFocus = !0);
472
- },
473
- beforeBlur(l) {
474
- var o, s;
475
- return ((o = h.value) == null ? void 0 : o.isFocusInsideContent(l)) || ((s = y.value) == null ? void 0 : s.isFocusInsideContent(l));
476
- },
477
- afterBlur() {
478
- var l;
479
- v.value = !1, t.menuVisibleOnFocus = !1, e.validateEvent && ((l = B == null ? void 0 : B.validate) == null || l.call(B, "blur").catch((o) => Sl(o)));
480
- }
481
- }), Pe = p(() => K(e.modelValue) ? e.modelValue.length > 0 : !Pl(e.modelValue)), Kl = p(() => {
482
- var l;
483
- return (l = ue == null ? void 0 : ue.statusIcon) != null ? l : !1;
484
- }), Al = p(() => e.clearable && !de.value && Pe.value && (Ne.value || t.inputHovering)), ll = p(
485
- () => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon
486
- ), jl = p(
487
- () => f.is("reverse", !!(ll.value && v.value))
488
- ), We = p(() => (B == null ? void 0 : B.validateState) || ""), Gl = p(
489
- () => We.value && en[We.value]
490
- ), Ul = p(() => e.remote ? e.debounce : 0), Ql = p(
491
- () => e.remote && !t.inputValue && t.options.size === 0
492
- ), ql = p(() => e.loading ? e.loadingText || a("el.select.loading") : e.filterable && t.inputValue && t.options.size > 0 && ce.value === 0 ? e.noMatchText || a("el.select.noMatch") : t.options.size === 0 ? e.noDataText || a("el.select.noData") : null), ce = p(
493
- () => N.value.filter((l) => l.visible).length
494
- ), N = p(() => {
495
- const l = Array.from(t.options.values()), o = [];
496
- return t.optionValues.forEach((s) => {
497
- const T = l.findIndex((I) => I.value === s);
498
- T > -1 && o.push(l[T]);
499
- }), o.length >= l.length ? o : l;
500
- }), Zl = p(
501
- () => Array.from(t.cachedOptions.values())
502
- ), Jl = p(() => {
503
- const l = N.value.filter((o) => !o.created).some((o) => o.currentLabel === t.inputValue);
504
- return e.filterable && e.allowCreate && t.inputValue !== "" && !l;
505
- }), tl = () => {
506
- e.filterable && be(e.filterMethod) || e.filterable && e.remote && be(e.remoteMethod) || N.value.forEach((l) => {
507
- var o;
508
- (o = l.updateOption) == null || o.call(l, t.inputValue);
509
- });
510
- }, nl = kl(), Xl = p(
511
- () => ["small"].includes(nl.value) ? "small" : "default"
512
- ), ol = p({
513
- get() {
514
- return v.value && (e.loading || !Ql.value || e.remote && !!i.empty) && (!ae.value || !Wt(t.previousQuery));
515
- },
516
- set(l) {
517
- v.value = l;
518
- }
519
- }), Yl = p(() => {
520
- if (e.multiple && !Ve(e.modelValue))
521
- return Y(e.modelValue).length === 0 && !t.inputValue;
522
- const l = K(e.modelValue) ? e.modelValue[0] : e.modelValue;
523
- return e.filterable || Ve(l) ? !t.inputValue : !0;
524
- }), xl = p(() => {
525
- var l;
526
- const o = (l = e.placeholder) != null ? l : a("el.select.placeholder");
527
- return e.multiple || !Pe.value ? o : t.selectedLabel;
528
- }), _l = p(() => Cl ? null : "mouseenter");
529
- U(
530
- () => e.modelValue,
531
- (l, o) => {
532
- e.multiple && e.filterable && !e.reserveKeyword && (t.inputValue = "", ye("")), Se(), !oe(l, o) && e.validateEvent && (B == null || B.validate("change").catch((s) => Sl(s)));
533
- },
534
- {
535
- flush: "post",
536
- deep: !0
537
- }
538
- ), U(
539
- () => v.value,
540
- (l) => {
541
- l ? ye(t.inputValue) : (t.inputValue = "", t.previousQuery = null, t.isBeforeHide = !0, t.menuVisibleOnFocus = !1);
542
- }
543
- ), U(
544
- // fix `Array.prototype.push/splice/..` cannot trigger non-deep watcher
545
- // https://github.com/vuejs/vue-next/issues/2116
546
- () => t.options.entries(),
547
- () => {
548
- Ll && (Se(), e.defaultFirstOption && (e.filterable || e.remote) && ce.value && al());
549
- },
550
- {
551
- flush: "post"
552
- }
553
- ), U([() => t.hoveringIndex, N], ([l]) => {
554
- Ft(l) && l > -1 ? k.value = N.value[l] || {} : k.value = {}, N.value.forEach((o) => {
555
- o.hover = k.value === o;
556
- });
557
- }), Tt(() => {
558
- t.isBeforeHide || tl();
559
- });
560
- const ye = (l) => {
561
- t.previousQuery === l || Be.value || (t.previousQuery = l, e.filterable && be(e.filterMethod) ? e.filterMethod(l) : e.filterable && e.remote && be(e.remoteMethod) && e.remoteMethod(l), e.defaultFirstOption && (e.filterable || e.remote) && ce.value ? q(al) : q(et));
562
- }, al = () => {
563
- const l = N.value.filter(
564
- (I) => I.visible && !I.disabled && !I.states.groupDisabled
565
- ), o = l.find((I) => I.created), s = l[0], T = N.value.map((I) => I.value);
566
- t.hoveringIndex = fl(
567
- T,
568
- o || s
569
- );
570
- }, Se = () => {
571
- if (e.multiple)
572
- t.selectedLabel = "";
573
- else {
574
- const o = K(e.modelValue) ? e.modelValue[0] : e.modelValue, s = Fe(o);
575
- t.selectedLabel = s.currentLabel, t.selected = [s];
576
- return;
577
- }
578
- const l = [];
579
- Ve(e.modelValue) || Y(e.modelValue).forEach((o) => {
580
- l.push(Fe(o));
581
- }), t.selected = l;
582
- }, Fe = (l) => {
583
- let o;
584
- const s = Kt(l);
585
- for (let W = t.cachedOptions.size - 1; W >= 0; W--) {
586
- const z = Zl.value[W];
587
- if (s ? Q(z.value, e.valueKey) === Q(l, e.valueKey) : z.value === l) {
588
- o = {
589
- index: N.value.filter((ee) => !ee.created).indexOf(z),
590
- value: l,
591
- currentLabel: z.currentLabel,
592
- get isDisabled() {
593
- return z.isDisabled;
594
- }
595
- };
596
- break;
597
- }
598
- }
599
- if (o) return o;
600
- const T = s ? l.label : l ?? "";
601
- return {
602
- index: -1,
603
- value: l,
604
- currentLabel: T
605
- };
606
- }, et = () => {
607
- const l = t.selected.length;
608
- if (l > 0) {
609
- const o = t.selected[l - 1];
610
- t.hoveringIndex = N.value.findIndex(
611
- (s) => Ce(o) === Ce(s)
612
- );
613
- } else
614
- t.hoveringIndex = -1;
615
- }, lt = () => {
616
- t.selectionWidth = Number.parseFloat(
617
- window.getComputedStyle(O.value).width
618
- );
619
- }, tt = () => {
620
- t.collapseItemWidth = L.value.getBoundingClientRect().width;
621
- }, ze = () => {
622
- var l, o;
623
- (o = (l = h.value) == null ? void 0 : l.updatePopper) == null || o.call(l);
624
- }, sl = () => {
625
- var l, o;
626
- (o = (l = y.value) == null ? void 0 : l.updatePopper) == null || o.call(l);
627
- }, il = () => {
628
- t.inputValue.length > 0 && !v.value && (v.value = !0), ye(t.inputValue);
629
- }, rl = (l) => {
630
- if (t.inputValue = l.target.value, e.remote)
631
- ae.value = !0, ul();
632
- else
633
- return il();
634
- }, ul = Xt(() => {
635
- il(), ae.value = !1;
636
- }, Ul), pe = (l) => {
637
- oe(e.modelValue, l) || n(Xe, l);
638
- }, nt = (l) => Qt(l, (o) => {
639
- const s = t.cachedOptions.get(o);
640
- return !(s != null && s.disabled) && !(s != null && s.states.groupDisabled);
641
- }), dl = (l) => {
642
- const o = El(l);
643
- if (e.multiple && o !== A.delete && l.target.value.length <= 0) {
644
- const s = Y(e.modelValue).slice(), T = nt(s);
645
- if (T < 0) return;
646
- const I = s[T];
647
- s.splice(T, 1), n(le, s), pe(s), n("remove-tag", I);
648
- }
649
- }, ot = (l, o) => {
650
- const s = t.selected.indexOf(o);
651
- if (s > -1 && !de.value) {
652
- const T = Y(e.modelValue).slice();
653
- T.splice(s, 1), n(le, T), pe(T), n("remove-tag", o.value);
654
- }
655
- l.stopPropagation(), Oe();
656
- }, cl = (l) => {
657
- l.stopPropagation();
658
- const o = e.multiple ? [] : x.value;
659
- if (e.multiple)
660
- for (const s of t.selected)
661
- s.isDisabled && o.push(s.value);
662
- n(le, o), pe(o), t.hoveringIndex = -1, v.value = !1, n("clear"), Oe();
663
- }, pl = (l) => {
664
- var o;
665
- if (e.multiple) {
666
- const s = Y((o = e.modelValue) != null ? o : []).slice(), T = fl(s, l);
667
- T > -1 ? s.splice(T, 1) : (e.multipleLimit <= 0 || s.length < e.multipleLimit) && s.push(l.value), n(le, s), pe(s), l.created && ye(""), e.filterable && !e.reserveKeyword && (t.inputValue = "");
668
- } else
669
- !oe(e.modelValue, l.value) && n(le, l.value), pe(l.value), v.value = !1;
670
- Oe(), !v.value && q(() => {
671
- fe(l);
672
- });
673
- }, fl = (l, o) => Ve(o) ? -1 : J(o.value) ? l.findIndex((s) => oe(Q(s, e.valueKey), Ce(o))) : l.indexOf(o.value), fe = (l) => {
674
- var o, s, T, I, W;
675
- const z = K(l) ? l[l.length - 1] : l;
676
- let _ = null;
677
- if (!Ut(z == null ? void 0 : z.value)) {
678
- const ee = N.value.filter(
679
- (St) => St.value === z.value
680
- );
681
- ee.length > 0 && (_ = ee[0].$el);
682
- }
683
- if (h.value && _) {
684
- const ee = (I = (T = (s = (o = h.value) == null ? void 0 : o.popperRef) == null ? void 0 : s.contentRef) == null ? void 0 : T.querySelector) == null ? void 0 : I.call(
685
- T,
686
- `.${f.be("dropdown", "wrap")}`
687
- );
688
- ee && an(ee, _);
689
- }
690
- (W = S.value) == null || W.handleScroll();
691
- }, at = (l) => {
692
- t.options.set(l.value, l), t.cachedOptions.set(l.value, l);
693
- }, st = (l, o) => {
694
- t.options.get(l) === o && t.options.delete(l);
695
- }, it = p(() => {
696
- var l, o;
697
- return (o = (l = h.value) == null ? void 0 : l.popperRef) == null ? void 0 : o.contentRef;
698
- }), rt = () => {
699
- t.isBeforeHide = !1, q(() => {
700
- var l;
701
- (l = S.value) == null || l.update(), fe(t.selected);
702
- });
703
- }, Oe = () => {
704
- var l;
705
- (l = C.value) == null || l.focus();
706
- }, ut = () => {
707
- var l;
708
- if (v.value) {
709
- v.value = !1, q(() => {
710
- var o;
711
- return (o = C.value) == null ? void 0 : o.blur();
712
- });
713
- return;
714
- }
715
- (l = C.value) == null || l.blur();
716
- }, dt = (l) => {
717
- cl(l);
718
- }, ct = (l) => {
719
- if (v.value = !1, Ne.value) {
720
- const o = new FocusEvent("blur", l);
721
- q(() => Hl(o));
722
- }
723
- }, vl = () => {
724
- t.inputValue.length > 0 ? t.inputValue = "" : v.value = !1;
725
- }, bl = (l) => {
726
- var o;
727
- de.value || e.filterable && v.value && l && !((o = E.value) != null && o.contains(l.target)) || (Cl && (t.inputHovering = !0), t.menuVisibleOnFocus ? t.menuVisibleOnFocus = !1 : v.value = !v.value);
728
- }, ml = () => {
729
- if (!v.value)
730
- bl();
731
- else {
732
- const l = N.value[t.hoveringIndex];
733
- l && !l.isDisabled && pl(l);
734
- }
735
- }, Ce = (l) => J(l.value) ? Q(l.value, e.valueKey) : l.value, pt = p(
736
- () => N.value.filter((l) => l.visible).every((l) => l.isDisabled)
737
- ), ft = p(() => e.multiple ? e.collapseTags ? t.selected.slice(0, e.maxCollapseTags) : t.selected : []), vt = p(() => e.multiple ? e.collapseTags ? t.selected.slice(e.maxCollapseTags) : [] : []), we = (l) => {
738
- if (!v.value) {
739
- v.value = !0;
740
- return;
741
- }
742
- if (!(t.options.size === 0 || ce.value === 0 || Be.value) && !pt.value) {
743
- 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));
744
- const o = N.value[t.hoveringIndex];
745
- (o.isDisabled || !o.visible) && we(l), q(() => fe(k.value));
746
- }
747
- }, gl = (l, o, s, T) => {
748
- for (let I = o; I >= 0 && I < T; I += s) {
749
- const W = l[I];
750
- if (!(W != null && W.isDisabled) && (W != null && W.visible))
751
- return I;
752
- }
753
- return null;
754
- }, Ee = (l, o) => {
755
- var s;
756
- const T = t.options.size;
757
- if (T === 0) return;
758
- const I = qt(l, 0, T - 1), W = N.value, z = o === "up" ? -1 : 1, _ = (s = gl(W, I, z, T)) != null ? s : gl(W, I - z, -z, T);
759
- _ != null && (t.hoveringIndex = _, q(() => fe(k.value)));
760
- }, bt = (l) => {
761
- const o = El(l);
762
- let s = !0;
763
- switch (o) {
764
- case A.up:
765
- we("prev");
766
- break;
767
- case A.down:
768
- we("next");
769
- break;
770
- case A.enter:
771
- case A.numpadEnter:
772
- Be.value || ml();
773
- break;
774
- case A.esc:
775
- vl();
776
- break;
777
- case A.backspace:
778
- s = !1, dl(l);
779
- return;
780
- case A.home:
781
- if (!v.value) return;
782
- Ee(0, "down");
783
- break;
784
- case A.end:
785
- if (!v.value) return;
786
- Ee(t.options.size - 1, "up");
787
- break;
788
- case A.pageUp:
789
- if (!v.value) return;
790
- Ee(t.hoveringIndex - 10, "up");
791
- break;
792
- case A.pageDown:
793
- if (!v.value) return;
794
- Ee(t.hoveringIndex + 10, "down");
795
- break;
796
- default:
797
- s = !1;
798
- break;
799
- }
800
- s && (l.preventDefault(), l.stopPropagation());
801
- }, mt = () => {
802
- if (!O.value) return 0;
803
- const l = window.getComputedStyle(O.value);
804
- return Number.parseFloat(l.gap || "6px");
805
- }, gt = p(() => {
806
- const l = mt(), o = e.filterable ? l + Bl : 0;
807
- return { maxWidth: `${L.value && e.maxCollapseTags === 1 ? t.selectionWidth - t.collapseItemWidth - l - o : t.selectionWidth - o}px` };
808
- }), ht = p(() => ({ maxWidth: `${t.selectionWidth}px` })), yt = (l) => {
809
- n("popup-scroll", l);
810
- };
811
- te(O, lt), te(el, ze), te(u, sl), te(L, tt);
812
- let Te;
813
- return U(
814
- () => ol.value,
815
- (l) => {
816
- l ? Te = te(w, ze).stop : (Te == null || Te(), Te = void 0), n("visible-change", l);
817
- }
818
- ), Ze(() => {
819
- Se();
820
- }), {
821
- inputId: _e,
822
- contentId: c,
823
- nsSelect: f,
824
- nsInput: r,
825
- states: t,
826
- isFocused: Ne,
827
- expanded: v,
828
- optionsArray: N,
829
- hoverOption: k,
830
- selectSize: nl,
831
- filteredOptionsCount: ce,
832
- updateTooltip: ze,
833
- updateTagTooltip: sl,
834
- debouncedOnInputChange: ul,
835
- onInput: rl,
836
- deletePrevTag: dl,
837
- deleteTag: ot,
838
- deleteSelected: cl,
839
- handleOptionSelect: pl,
840
- scrollToOption: fe,
841
- hasModelValue: Pe,
842
- shouldShowPlaceholder: Yl,
843
- currentPlaceholder: xl,
844
- mouseEnterEventName: _l,
845
- needStatusIcon: Kl,
846
- showClearBtn: Al,
847
- iconComponent: ll,
848
- iconReverse: jl,
849
- validateState: We,
850
- validateIcon: Gl,
851
- showNewOption: Jl,
852
- updateOptions: tl,
853
- collapseTagSize: Xl,
854
- setSelected: Se,
855
- selectDisabled: de,
856
- emptyText: ql,
857
- handleCompositionStart: Wl,
858
- handleCompositionUpdate: Fl,
859
- handleCompositionEnd: zl,
860
- handleKeydown: bt,
861
- onOptionCreate: at,
862
- onOptionDestroy: st,
863
- handleMenuEnter: rt,
864
- focus: Oe,
865
- blur: ut,
866
- handleClearClick: dt,
867
- handleClickOutside: ct,
868
- handleEsc: vl,
869
- toggleMenu: bl,
870
- selectOption: ml,
871
- getValueKey: Ce,
872
- navigateOptions: we,
873
- dropdownMenuVisible: ol,
874
- showTagList: ft,
875
- collapseTagList: vt,
876
- popupScroll: yt,
877
- getOption: Fe,
878
- // computed style
879
- tagStyle: gt,
880
- collapseTagStyle: ht,
881
- // DOM ref
882
- popperRef: it,
883
- inputRef: C,
884
- tooltipRef: h,
885
- tagTooltipRef: y,
886
- prefixRef: d,
887
- suffixRef: E,
888
- selectRef: g,
889
- wrapperRef: el,
890
- selectionRef: O,
891
- scrollbarRef: S,
892
- menuRef: w,
893
- tagMenuRef: u,
894
- collapseItemRef: L
895
- };
896
- };
897
- var Cn = re({
898
- name: "ElOptions",
899
- setup(e, { slots: n }) {
900
- const a = De(Le);
901
- let i = [];
902
- return () => {
903
- var c, f;
904
- const r = (c = n.default) == null ? void 0 : c.call(n), t = [];
905
- function g(O) {
906
- K(O) && O.forEach((h) => {
907
- var y, C, d, E;
908
- const w = (y = (h == null ? void 0 : h.type) || {}) == null ? void 0 : y.name;
909
- w === "ElOptionGroup" ? g(
910
- !At(h.children) && !K(h.children) && be((C = h.children) == null ? void 0 : C.default) ? (d = h.children) == null ? void 0 : d.default() : h.children
911
- ) : w === "ElOption" ? t.push((E = h.props) == null ? void 0 : E.value) : K(h.children) && g(h.children);
912
- });
913
- }
914
- return r.length && g((f = r[0]) == null ? void 0 : f.children), oe(t, i) || (i = t, a && (a.states.optionValues = t)), r;
915
- };
916
- }
917
- });
918
- const wn = Je({
919
- /**
920
- * @description the name attribute of select input
921
- */
922
- name: String,
923
- /**
924
- * @description native input id
925
- */
926
- id: String,
927
- /**
928
- * @description binding value
929
- */
930
- modelValue: {
931
- type: G([
932
- Array,
933
- String,
934
- Number,
935
- Boolean,
936
- Object
937
- ]),
938
- default: void 0
939
- },
940
- /**
941
- * @description the autocomplete attribute of select input
942
- */
943
- autocomplete: {
944
- type: String,
945
- default: "off"
946
- },
947
- /**
948
- * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused
949
- */
950
- automaticDropdown: Boolean,
951
- /**
952
- * @description size of Input
953
- */
954
- size: zt,
955
- /**
956
- * @description tooltip theme, built-in theme: `dark` / `light`
957
- */
958
- effect: {
959
- type: G(String),
960
- default: "light"
961
- },
962
- /**
963
- * @description whether Select is disabled
964
- */
965
- disabled: {
966
- type: Boolean,
967
- default: void 0
968
- },
969
- /**
970
- * @description whether select can be cleared
971
- */
972
- clearable: Boolean,
973
- /**
974
- * @description whether Select is filterable
975
- */
976
- filterable: Boolean,
977
- /**
978
- * @description whether creating new items is allowed. To use this, `filterable` must be true
979
- */
980
- allowCreate: Boolean,
981
- /**
982
- * @description whether Select is loading data from server
983
- */
984
- loading: Boolean,
985
- /**
986
- * @description custom class name for Select's dropdown
987
- */
988
- popperClass: {
989
- type: String,
990
- default: ""
991
- },
992
- /**
993
- * @description custom style for Select's dropdown
994
- */
995
- popperStyle: {
996
- type: G([String, Object])
997
- },
998
- /**
999
- * @description [popper.js](https://popper.js.org/docs/v2/) parameters
1000
- */
1001
- popperOptions: {
1002
- type: G(Object),
1003
- default: () => ({})
1004
- },
1005
- /**
1006
- * @description whether options are loaded from server
1007
- */
1008
- remote: Boolean,
1009
- /**
1010
- * @description debounce delay during remote search, in milliseconds
1011
- */
1012
- debounce: {
1013
- type: Number,
1014
- default: 300
1015
- },
1016
- /**
1017
- * @description displayed text while loading data from server, default is 'Loading'
1018
- */
1019
- loadingText: String,
1020
- /**
1021
- * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'
1022
- */
1023
- noMatchText: String,
1024
- /**
1025
- * @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'
1026
- */
1027
- noDataText: String,
1028
- /**
1029
- * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true
1030
- */
1031
- remoteMethod: {
1032
- type: G(Function)
1033
- },
1034
- /**
1035
- * @description custom filter method, the first parameter is the current input value. To use this, `filterable` must be true
1036
- */
1037
- filterMethod: {
1038
- type: G(Function)
1039
- },
1040
- /**
1041
- * @description whether multiple-select is activated
1042
- */
1043
- multiple: Boolean,
1044
- /**
1045
- * @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0
1046
- */
1047
- multipleLimit: {
1048
- type: Number,
1049
- default: 0
1050
- },
1051
- /**
1052
- * @description placeholder, default is 'Select'
1053
- */
1054
- placeholder: {
1055
- type: String
1056
- },
1057
- /**
1058
- * @description select first matching option on enter key. Use with `filterable` or `remote`
1059
- */
1060
- defaultFirstOption: Boolean,
1061
- /**
1062
- * @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option
1063
- */
1064
- reserveKeyword: {
1065
- type: Boolean,
1066
- default: !0
1067
- },
1068
- /**
1069
- * @description unique identity key name for value, required when value is an object
1070
- */
1071
- valueKey: {
1072
- type: String,
1073
- default: "value"
1074
- },
1075
- /**
1076
- * @description whether to collapse tags to a text when multiple selecting
1077
- */
1078
- collapseTags: Boolean,
1079
- /**
1080
- * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true
1081
- */
1082
- collapseTagsTooltip: Boolean,
1083
- /**
1084
- * @description the max tags number to be shown. To use this, `collapse-tags` must be true
1085
- */
1086
- maxCollapseTags: {
1087
- type: Number,
1088
- default: 1
1089
- },
1090
- /**
1091
- * @description whether select dropdown is teleported, if `true` it will be teleported to where `append-to` sets
1092
- */
1093
- teleported: yl.teleported,
1094
- /**
1095
- * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed
1096
- */
1097
- persistent: {
1098
- type: Boolean,
1099
- default: !0
1100
- },
1101
- /**
1102
- * @description custom clear icon component
1103
- */
1104
- clearIcon: {
1105
- type: wl,
1106
- default: Gt
1107
- },
1108
- /**
1109
- * @description whether the width of the dropdown is the same as the input
1110
- */
1111
- fitInputWidth: Boolean,
1112
- /**
1113
- * @description custom suffix icon component
1114
- */
1115
- suffixIcon: {
1116
- type: wl,
1117
- default: jt
1118
- },
1119
- /**
1120
- * @description tag type
1121
- */
1122
- tagType: { ...je.type, default: "info" },
1123
- /**
1124
- * @description tag effect
1125
- */
1126
- tagEffect: { ...je.effect, default: "light" },
1127
- /**
1128
- * @description whether to trigger form validation
1129
- */
1130
- validateEvent: {
1131
- type: Boolean,
1132
- default: !0
1133
- },
1134
- /**
1135
- * @description in remote search method show suffix icon
1136
- */
1137
- remoteShowSuffix: Boolean,
1138
- /**
1139
- * @description determines whether the arrow is displayed
1140
- */
1141
- showArrow: {
1142
- type: Boolean,
1143
- default: !0
1144
- },
1145
- /**
1146
- * @description offset of the dropdown
1147
- */
1148
- offset: {
1149
- type: Number,
1150
- default: 12
1151
- },
1152
- /**
1153
- * @description position of dropdown
1154
- */
1155
- placement: {
1156
- type: G(String),
1157
- values: Rt,
1158
- default: "bottom-start"
1159
- },
1160
- /**
1161
- * @description list of possible positions for dropdown
1162
- */
1163
- fallbackPlacements: {
1164
- type: G(Array),
1165
- default: ["bottom-start", "top-start", "right", "left"]
1166
- },
1167
- /**
1168
- * @description tabindex for input
1169
- */
1170
- tabindex: {
1171
- type: [String, Number],
1172
- default: 0
1173
- },
1174
- /**
1175
- * @description which element the selection dropdown appends to
1176
- */
1177
- appendTo: yl.appendTo,
1178
- options: {
1179
- type: G(Array)
1180
- },
1181
- props: {
1182
- type: G(Object),
1183
- default: () => Ge
1184
- },
1185
- ...$t,
1186
- ...ln(["ariaLabel"])
1187
- }), Zn = {
1188
- [le]: (e) => !0,
1189
- [Xe]: (e) => !0,
1190
- "popup-scroll": Dt.scroll,
1191
- "remove-tag": (e) => !0,
1192
- "visible-change": (e) => !0,
1193
- focus: (e) => e instanceof FocusEvent,
1194
- blur: (e) => e instanceof FocusEvent,
1195
- clear: () => !0
1196
- };
1197
- var En = re({
1198
- name: "ElOptionGroup",
1199
- componentName: "ElOptionGroup",
1200
- props: {
1201
- /**
1202
- * @description name of the group
1203
- */
1204
- label: String,
1205
- /**
1206
- * @description whether to disable all options in this group
1207
- */
1208
- disabled: Boolean
1209
- },
1210
- setup(e) {
1211
- const n = ie("select"), a = D(), i = Re(), c = D([]);
1212
- Vl(
1213
- Nl,
1214
- ge({
1215
- ...Qe(e)
1216
- })
1217
- );
1218
- const f = p(
1219
- () => c.value.some((O) => O.visible === !0)
1220
- ), r = (O) => {
1221
- var h;
1222
- return O.type.name === "ElOption" && !!((h = O.component) != null && h.proxy);
1223
- }, t = (O) => {
1224
- const h = Y(O), y = [];
1225
- return h.forEach((C) => {
1226
- var d;
1227
- ke(C) && (r(C) ? y.push(C.component.proxy) : K(C.children) && C.children.length ? y.push(...t(C.children)) : (d = C.component) != null && d.subTree && y.push(...t(C.component.subTree)));
1228
- }), y;
1229
- }, g = () => {
1230
- c.value = t(i.subTree);
1231
- };
1232
- return Ze(() => {
1233
- g();
1234
- }), Yt(a, g, {
1235
- attributes: !0,
1236
- subtree: !0,
1237
- childList: !0
1238
- }), {
1239
- groupRef: a,
1240
- visible: f,
1241
- ns: n
1242
- };
1243
- }
1244
- });
1245
- function Tn(e, n, a, i, c, f) {
1246
- return $e((b(), V(
1247
- "ul",
1248
- {
1249
- ref: "groupRef",
1250
- class: m(e.ns.be("group", "wrap"))
1251
- },
1252
- [
1253
- $(
1254
- "li",
1255
- {
1256
- class: m(e.ns.be("group", "title"))
1257
- },
1258
- Z(e.label),
1259
- 3
1260
- /* TEXT, CLASS */
1261
- ),
1262
- $("li", null, [
1263
- $(
1264
- "ul",
1265
- {
1266
- class: m(e.ns.b("group"))
1267
- },
1268
- [
1269
- M(e.$slots, "default")
1270
- ],
1271
- 2
1272
- /* CLASS */
1273
- )
1274
- ])
1275
- ],
1276
- 2
1277
- /* CLASS */
1278
- )), [
1279
- [qe, e.visible]
1280
- ]);
1281
- }
1282
- var xe = /* @__PURE__ */ Me(En, [["render", Tn]]);
1283
- const Tl = "ElSelect", he = /* @__PURE__ */ new WeakMap(), In = (e) => (...n) => {
1284
- var a, i;
1285
- const c = n[0];
1286
- if (!c || c.includes(
1287
- 'Slot "default" invoked outside of the render function'
1288
- ) && ((a = n[2]) != null && a.includes("ElTreeSelect")))
1289
- return;
1290
- const f = (i = he.get(e)) == null ? void 0 : i.originalWarnHandler;
1291
- if (f) {
1292
- f(...n);
1293
- return;
1294
- }
1295
- console.warn(...n);
1296
- }, Vn = (e) => {
1297
- let n = he.get(e);
1298
- return n || (n = {
1299
- originalWarnHandler: e.config.warnHandler,
1300
- handler: In(e),
1301
- count: 0
1302
- }, he.set(e, n)), n;
1303
- };
1304
- var kn = re({
1305
- name: Tl,
1306
- componentName: Tl,
1307
- components: {
1308
- ElSelectMenu: Sn,
1309
- ElOption: Ye,
1310
- ElOptions: Cn,
1311
- ElOptionGroup: xe,
1312
- ElTag: cn,
1313
- ElScrollbar: Lt,
1314
- ElTooltip: Mt,
1315
- ElIcon: Ae
1316
- },
1317
- directives: { ClickOutside: tn },
1318
- props: wn,
1319
- emits: [
1320
- le,
1321
- Xe,
1322
- "remove-tag",
1323
- "clear",
1324
- "visible-change",
1325
- "focus",
1326
- "blur",
1327
- "popup-scroll"
1328
- ],
1329
- setup(e, { emit: n, slots: a }) {
1330
- const i = Re(), c = Vn(i.appContext);
1331
- c.count += 1, i.appContext.config.warnHandler = c.handler;
1332
- const f = p(() => {
1333
- const { modelValue: S, multiple: v } = e, k = v ? [] : void 0;
1334
- return K(S) ? v ? S : k : v ? k : S;
1335
- }), r = ge({
1336
- ...Qe(e),
1337
- modelValue: f
1338
- }), t = On(r, n), { calculatorRef: g, inputStyle: O } = on(), { getLabel: h, getValue: y, getOptions: C, getDisabled: d } = pn(e), E = (S) => ({
1339
- label: h(S),
1340
- value: y(S),
1341
- disabled: d(S)
1342
- }), w = (S) => S.reduce((v, k) => (v.push(k), k.children && k.children.length > 0 && v.push(...w(k.children)), v), []), u = (S) => {
1343
- me(S || []).forEach((k) => {
1344
- var ae;
1345
- if (J(k) && // @ts-expect-error
1346
- (k.type.name === "ElOption" || k.type.name === "ElTree")) {
1347
- const ue = k.type.name;
1348
- if (ue === "ElTree") {
1349
- const B = ((ae = k.props) == null ? void 0 : ae.data) || [];
1350
- w(B).forEach((x) => {
1351
- x.currentLabel = x.label || (J(x.value) ? "" : x.value), t.onOptionCreate(x);
1352
- });
1353
- } else if (ue === "ElOption") {
1354
- const B = { ...k.props };
1355
- B.currentLabel = B.label || (J(B.value) ? "" : B.value), t.onOptionCreate(B);
1356
- }
1357
- }
1358
- });
1359
- };
1360
- U(
1361
- () => {
1362
- var S;
1363
- return [(S = a.default) == null ? void 0 : S.call(a), f.value];
1364
- },
1365
- () => {
1366
- var S;
1367
- e.persistent || t.expanded.value || (t.states.options.clear(), u((S = a.default) == null ? void 0 : S.call(a)));
1368
- },
1369
- {
1370
- immediate: !0
1371
- }
1372
- ), Vl(
1373
- Le,
1374
- ge({
1375
- props: r,
1376
- states: t.states,
1377
- selectRef: t.selectRef,
1378
- optionsArray: t.optionsArray,
1379
- setSelected: t.setSelected,
1380
- handleOptionSelect: t.handleOptionSelect,
1381
- onOptionCreate: t.onOptionCreate,
1382
- onOptionDestroy: t.onOptionDestroy
1383
- })
1384
- );
1385
- const L = p(() => e.multiple ? t.states.selected.map((S) => S.currentLabel) : t.states.selectedLabel);
1386
- return Il(() => {
1387
- const S = he.get(i.appContext);
1388
- S && (S.count -= 1, S.count <= 0 && (i.appContext.config.warnHandler = S.originalWarnHandler, he.delete(i.appContext)));
1389
- }), {
1390
- ...t,
1391
- modelValue: f,
1392
- selectedLabel: L,
1393
- calculatorRef: g,
1394
- inputStyle: O,
1395
- getLabel: h,
1396
- getValue: y,
1397
- getOptions: C,
1398
- getDisabled: d,
1399
- getOptionProps: E
1400
- };
1401
- }
1402
- });
1403
- const Dn = ["id", "value", "name", "disabled", "autocomplete", "tabindex", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label"], $n = ["textContent"], Rn = { key: 1 };
1404
- function Mn(e, n, a, i, c, f) {
1405
- const r = X("el-tag"), t = X("el-tooltip"), g = X("el-icon"), O = X("el-option"), h = X("el-option-group"), y = X("el-options"), C = X("el-scrollbar"), d = X("el-select-menu"), E = It("click-outside");
1406
- return $e((b(), V(
1407
- "div",
1408
- He({
1409
- ref: "selectRef",
1410
- class: [e.nsSelect.b(), e.nsSelect.m(e.selectSize)]
1411
- }, {
1412
- [Vt(e.mouseEnterEventName)]: n[10] || (n[10] = (w) => e.states.inputHovering = !0)
1413
- }, {
1414
- onMouseleave: n[11] || (n[11] = (w) => e.states.inputHovering = !1)
1415
- }),
1416
- [
1417
- j(t, {
1418
- ref: "tooltipRef",
1419
- visible: e.dropdownMenuVisible,
1420
- placement: e.placement,
1421
- teleported: e.teleported,
1422
- "popper-class": [e.nsSelect.e("popper"), e.popperClass],
1423
- "popper-style": e.popperStyle,
1424
- "popper-options": e.popperOptions,
1425
- "fallback-placements": e.fallbackPlacements,
1426
- effect: e.effect,
1427
- pure: "",
1428
- trigger: "click",
1429
- transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
1430
- "stop-popper-mouse-event": !1,
1431
- "gpu-acceleration": !1,
1432
- persistent: e.persistent,
1433
- "append-to": e.appendTo,
1434
- "show-arrow": e.showArrow,
1435
- offset: e.offset,
1436
- onBeforeShow: e.handleMenuEnter,
1437
- onHide: n[9] || (n[9] = (w) => e.states.isBeforeHide = !1)
1438
- }, {
1439
- default: R(() => {
1440
- var w;
1441
- return [
1442
- $(
1443
- "div",
1444
- {
1445
- ref: "wrapperRef",
1446
- class: m([
1447
- e.nsSelect.e("wrapper"),
1448
- e.nsSelect.is("focused", e.isFocused),
1449
- e.nsSelect.is("hovering", e.states.inputHovering),
1450
- e.nsSelect.is("filterable", e.filterable),
1451
- e.nsSelect.is("disabled", e.selectDisabled)
1452
- ]),
1453
- onClick: n[6] || (n[6] = ne((...u) => e.toggleMenu && e.toggleMenu(...u), ["prevent"]))
1454
- },
1455
- [
1456
- e.$slots.prefix ? (b(), V(
1457
- "div",
1458
- {
1459
- key: 0,
1460
- ref: "prefixRef",
1461
- class: m(e.nsSelect.e("prefix"))
1462
- },
1463
- [
1464
- M(e.$slots, "prefix")
1465
- ],
1466
- 2
1467
- /* CLASS */
1468
- )) : P("v-if", !0),
1469
- $(
1470
- "div",
1471
- {
1472
- ref: "selectionRef",
1473
- class: m([
1474
- e.nsSelect.e("selection"),
1475
- e.nsSelect.is(
1476
- "near",
1477
- e.multiple && !e.$slots.prefix && !!e.states.selected.length
1478
- )
1479
- ])
1480
- },
1481
- [
1482
- e.multiple ? M(e.$slots, "tag", {
1483
- key: 0,
1484
- data: e.states.selected,
1485
- deleteTag: e.deleteTag,
1486
- selectDisabled: e.selectDisabled
1487
- }, () => [
1488
- (b(!0), V(
1489
- ve,
1490
- null,
1491
- Ie(e.showTagList, (u) => (b(), V(
1492
- "div",
1493
- {
1494
- key: e.getValueKey(u),
1495
- class: m(e.nsSelect.e("selected-item"))
1496
- },
1497
- [
1498
- j(r, {
1499
- closable: !e.selectDisabled && !u.isDisabled,
1500
- size: e.collapseTagSize,
1501
- type: e.tagType,
1502
- effect: e.tagEffect,
1503
- "disable-transitions": "",
1504
- style: se(e.tagStyle),
1505
- onClose: (L) => e.deleteTag(L, u)
1506
- }, {
1507
- default: R(() => [
1508
- $(
1509
- "span",
1510
- {
1511
- class: m(e.nsSelect.e("tags-text"))
1512
- },
1513
- [
1514
- M(e.$slots, "label", {
1515
- index: u.index,
1516
- label: u.currentLabel,
1517
- value: u.value
1518
- }, () => [
1519
- hl(
1520
- Z(u.currentLabel),
1521
- 1
1522
- /* TEXT */
1523
- )
1524
- ])
1525
- ],
1526
- 2
1527
- /* CLASS */
1528
- )
1529
- ]),
1530
- _: 2
1531
- /* DYNAMIC */
1532
- }, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
1533
- ],
1534
- 2
1535
- /* CLASS */
1536
- ))),
1537
- 128
1538
- /* KEYED_FRAGMENT */
1539
- )),
1540
- e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (b(), H(t, {
1541
- key: 0,
1542
- ref: "tagTooltipRef",
1543
- disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
1544
- "fallback-placements": ["bottom", "top", "right", "left"],
1545
- effect: e.effect,
1546
- placement: "bottom",
1547
- "popper-class": e.popperClass,
1548
- "popper-style": e.popperStyle,
1549
- teleported: e.teleported,
1550
- "popper-options": e.popperOptions
1551
- }, {
1552
- default: R(() => [
1553
- $(
1554
- "div",
1555
- {
1556
- ref: "collapseItemRef",
1557
- class: m(e.nsSelect.e("selected-item"))
1558
- },
1559
- [
1560
- j(r, {
1561
- closable: !1,
1562
- size: e.collapseTagSize,
1563
- type: e.tagType,
1564
- effect: e.tagEffect,
1565
- "disable-transitions": "",
1566
- style: se(e.collapseTagStyle)
1567
- }, {
1568
- default: R(() => [
1569
- $(
1570
- "span",
1571
- {
1572
- class: m(e.nsSelect.e("tags-text"))
1573
- },
1574
- " + " + Z(e.states.selected.length - e.maxCollapseTags),
1575
- 3
1576
- /* TEXT, CLASS */
1577
- )
1578
- ]),
1579
- _: 1
1580
- /* STABLE */
1581
- }, 8, ["size", "type", "effect", "style"])
1582
- ],
1583
- 2
1584
- /* CLASS */
1585
- )
1586
- ]),
1587
- content: R(() => [
1588
- $(
1589
- "div",
1590
- {
1591
- ref: "tagMenuRef",
1592
- class: m(e.nsSelect.e("selection"))
1593
- },
1594
- [
1595
- (b(!0), V(
1596
- ve,
1597
- null,
1598
- Ie(e.collapseTagList, (u) => (b(), V(
1599
- "div",
1600
- {
1601
- key: e.getValueKey(u),
1602
- class: m(e.nsSelect.e("selected-item"))
1603
- },
1604
- [
1605
- j(r, {
1606
- class: "in-tooltip",
1607
- closable: !e.selectDisabled && !u.isDisabled,
1608
- size: e.collapseTagSize,
1609
- type: e.tagType,
1610
- effect: e.tagEffect,
1611
- "disable-transitions": "",
1612
- onClose: (L) => e.deleteTag(L, u)
1613
- }, {
1614
- default: R(() => [
1615
- $(
1616
- "span",
1617
- {
1618
- class: m(e.nsSelect.e("tags-text"))
1619
- },
1620
- [
1621
- M(e.$slots, "label", {
1622
- index: u.index,
1623
- label: u.currentLabel,
1624
- value: u.value
1625
- }, () => [
1626
- hl(
1627
- Z(u.currentLabel),
1628
- 1
1629
- /* TEXT */
1630
- )
1631
- ])
1632
- ],
1633
- 2
1634
- /* CLASS */
1635
- )
1636
- ]),
1637
- _: 2
1638
- /* DYNAMIC */
1639
- }, 1032, ["closable", "size", "type", "effect", "onClose"])
1640
- ],
1641
- 2
1642
- /* CLASS */
1643
- ))),
1644
- 128
1645
- /* KEYED_FRAGMENT */
1646
- ))
1647
- ],
1648
- 2
1649
- /* CLASS */
1650
- )
1651
- ]),
1652
- _: 3
1653
- /* FORWARDED */
1654
- }, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported", "popper-options"])) : P("v-if", !0)
1655
- ]) : P("v-if", !0),
1656
- $(
1657
- "div",
1658
- {
1659
- class: m([
1660
- e.nsSelect.e("selected-item"),
1661
- e.nsSelect.e("input-wrapper"),
1662
- e.nsSelect.is("hidden", !e.filterable || e.selectDisabled)
1663
- ])
1664
- },
1665
- [
1666
- $("input", {
1667
- id: e.inputId,
1668
- ref: "inputRef",
1669
- value: e.states.inputValue,
1670
- type: "text",
1671
- name: e.name,
1672
- class: m([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
1673
- disabled: e.selectDisabled,
1674
- autocomplete: e.autocomplete,
1675
- style: se(e.inputStyle),
1676
- tabindex: e.tabindex,
1677
- role: "combobox",
1678
- readonly: !e.filterable,
1679
- spellcheck: "false",
1680
- "aria-activedescendant": ((w = e.hoverOption) == null ? void 0 : w.id) || "",
1681
- "aria-controls": e.contentId,
1682
- "aria-expanded": e.dropdownMenuVisible,
1683
- "aria-label": e.ariaLabel,
1684
- "aria-autocomplete": "none",
1685
- "aria-haspopup": "listbox",
1686
- onKeydown: n[0] || (n[0] = (...u) => e.handleKeydown && e.handleKeydown(...u)),
1687
- onCompositionstart: n[1] || (n[1] = (...u) => e.handleCompositionStart && e.handleCompositionStart(...u)),
1688
- onCompositionupdate: n[2] || (n[2] = (...u) => e.handleCompositionUpdate && e.handleCompositionUpdate(...u)),
1689
- onCompositionend: n[3] || (n[3] = (...u) => e.handleCompositionEnd && e.handleCompositionEnd(...u)),
1690
- onInput: n[4] || (n[4] = (...u) => e.onInput && e.onInput(...u)),
1691
- onClick: n[5] || (n[5] = ne((...u) => e.toggleMenu && e.toggleMenu(...u), ["stop"]))
1692
- }, null, 46, Dn),
1693
- e.filterable ? (b(), V("span", {
1694
- key: 0,
1695
- ref: "calculatorRef",
1696
- "aria-hidden": "true",
1697
- class: m(e.nsSelect.e("input-calculator")),
1698
- textContent: Z(e.states.inputValue)
1699
- }, null, 10, $n)) : P("v-if", !0)
1700
- ],
1701
- 2
1702
- /* CLASS */
1703
- ),
1704
- e.shouldShowPlaceholder ? (b(), V(
1705
- "div",
1706
- {
1707
- key: 1,
1708
- class: m([
1709
- e.nsSelect.e("selected-item"),
1710
- e.nsSelect.e("placeholder"),
1711
- e.nsSelect.is(
1712
- "transparent",
1713
- !e.hasModelValue || e.expanded && !e.states.inputValue
1714
- )
1715
- ])
1716
- },
1717
- [
1718
- e.hasModelValue ? M(e.$slots, "label", {
1719
- key: 0,
1720
- index: e.getOption(e.modelValue).index,
1721
- label: e.currentPlaceholder,
1722
- value: e.modelValue
1723
- }, () => [
1724
- $(
1725
- "span",
1726
- null,
1727
- Z(e.currentPlaceholder),
1728
- 1
1729
- /* TEXT */
1730
- )
1731
- ]) : (b(), V(
1732
- "span",
1733
- Rn,
1734
- Z(e.currentPlaceholder),
1735
- 1
1736
- /* TEXT */
1737
- ))
1738
- ],
1739
- 2
1740
- /* CLASS */
1741
- )) : P("v-if", !0)
1742
- ],
1743
- 2
1744
- /* CLASS */
1745
- ),
1746
- $(
1747
- "div",
1748
- {
1749
- ref: "suffixRef",
1750
- class: m(e.nsSelect.e("suffix"))
1751
- },
1752
- [
1753
- e.iconComponent && !e.showClearBtn ? (b(), H(g, {
1754
- key: 0,
1755
- class: m([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
1756
- }, {
1757
- default: R(() => [
1758
- (b(), H(Ke(e.iconComponent)))
1759
- ]),
1760
- _: 1
1761
- /* STABLE */
1762
- }, 8, ["class"])) : P("v-if", !0),
1763
- e.showClearBtn && e.clearIcon ? (b(), H(g, {
1764
- key: 1,
1765
- class: m([
1766
- e.nsSelect.e("caret"),
1767
- e.nsSelect.e("icon"),
1768
- e.nsSelect.e("clear")
1769
- ]),
1770
- onClick: e.handleClearClick
1771
- }, {
1772
- default: R(() => [
1773
- (b(), H(Ke(e.clearIcon)))
1774
- ]),
1775
- _: 1
1776
- /* STABLE */
1777
- }, 8, ["class", "onClick"])) : P("v-if", !0),
1778
- e.validateState && e.validateIcon && e.needStatusIcon ? (b(), H(g, {
1779
- key: 2,
1780
- class: m([
1781
- e.nsInput.e("icon"),
1782
- e.nsInput.e("validateIcon"),
1783
- e.nsInput.is("loading", e.validateState === "validating")
1784
- ])
1785
- }, {
1786
- default: R(() => [
1787
- (b(), H(Ke(e.validateIcon)))
1788
- ]),
1789
- _: 1
1790
- /* STABLE */
1791
- }, 8, ["class"])) : P("v-if", !0)
1792
- ],
1793
- 2
1794
- /* CLASS */
1795
- )
1796
- ],
1797
- 2
1798
- /* CLASS */
1799
- )
1800
- ];
1801
- }),
1802
- content: R(() => [
1803
- j(
1804
- d,
1805
- { ref: "menuRef" },
1806
- {
1807
- default: R(() => [
1808
- e.$slots.header ? (b(), V(
1809
- "div",
1810
- {
1811
- key: 0,
1812
- class: m(e.nsSelect.be("dropdown", "header")),
1813
- onClick: n[7] || (n[7] = ne(() => {
1814
- }, ["stop"]))
1815
- },
1816
- [
1817
- M(e.$slots, "header")
1818
- ],
1819
- 2
1820
- /* CLASS */
1821
- )) : P("v-if", !0),
1822
- $e(j(C, {
1823
- id: e.contentId,
1824
- ref: "scrollbarRef",
1825
- tag: "ul",
1826
- "wrap-class": e.nsSelect.be("dropdown", "wrap"),
1827
- "view-class": e.nsSelect.be("dropdown", "list"),
1828
- class: m([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
1829
- role: "listbox",
1830
- "aria-label": e.ariaLabel,
1831
- "aria-orientation": "vertical",
1832
- onScroll: e.popupScroll
1833
- }, {
1834
- default: R(() => [
1835
- e.showNewOption ? (b(), H(O, {
1836
- key: 0,
1837
- value: e.states.inputValue,
1838
- created: !0
1839
- }, null, 8, ["value"])) : P("v-if", !0),
1840
- j(y, null, {
1841
- default: R(() => [
1842
- M(e.$slots, "default", {}, () => [
1843
- (b(!0), V(
1844
- ve,
1845
- null,
1846
- Ie(e.options, (w, u) => {
1847
- var L;
1848
- return b(), V(
1849
- ve,
1850
- { key: u },
1851
- [
1852
- (L = e.getOptions(w)) != null && L.length ? (b(), H(h, {
1853
- key: 0,
1854
- label: e.getLabel(w),
1855
- disabled: e.getDisabled(w)
1856
- }, {
1857
- default: R(() => [
1858
- (b(!0), V(
1859
- ve,
1860
- null,
1861
- Ie(e.getOptions(w), (S) => (b(), H(
1862
- O,
1863
- He({
1864
- key: e.getValue(S)
1865
- }, { ref_for: !0 }, e.getOptionProps(S)),
1866
- null,
1867
- 16
1868
- /* FULL_PROPS */
1869
- ))),
1870
- 128
1871
- /* KEYED_FRAGMENT */
1872
- ))
1873
- ]),
1874
- _: 2
1875
- /* DYNAMIC */
1876
- }, 1032, ["label", "disabled"])) : (b(), H(
1877
- O,
1878
- He({
1879
- key: 1,
1880
- ref_for: !0
1881
- }, e.getOptionProps(w)),
1882
- null,
1883
- 16
1884
- /* FULL_PROPS */
1885
- ))
1886
- ],
1887
- 64
1888
- /* STABLE_FRAGMENT */
1889
- );
1890
- }),
1891
- 128
1892
- /* KEYED_FRAGMENT */
1893
- ))
1894
- ])
1895
- ]),
1896
- _: 3
1897
- /* FORWARDED */
1898
- })
1899
- ]),
1900
- _: 3
1901
- /* FORWARDED */
1902
- }, 8, ["id", "wrap-class", "view-class", "class", "aria-label", "onScroll"]), [
1903
- [qe, e.states.options.size > 0 && !e.loading]
1904
- ]),
1905
- e.$slots.loading && e.loading ? (b(), V(
1906
- "div",
1907
- {
1908
- key: 1,
1909
- class: m(e.nsSelect.be("dropdown", "loading"))
1910
- },
1911
- [
1912
- M(e.$slots, "loading")
1913
- ],
1914
- 2
1915
- /* CLASS */
1916
- )) : e.loading || e.filteredOptionsCount === 0 ? (b(), V(
1917
- "div",
1918
- {
1919
- key: 2,
1920
- class: m(e.nsSelect.be("dropdown", "empty"))
1921
- },
1922
- [
1923
- M(e.$slots, "empty", {}, () => [
1924
- $(
1925
- "span",
1926
- null,
1927
- Z(e.emptyText),
1928
- 1
1929
- /* TEXT */
1930
- )
1931
- ])
1932
- ],
1933
- 2
1934
- /* CLASS */
1935
- )) : P("v-if", !0),
1936
- e.$slots.footer ? (b(), V(
1937
- "div",
1938
- {
1939
- key: 3,
1940
- class: m(e.nsSelect.be("dropdown", "footer")),
1941
- onClick: n[8] || (n[8] = ne(() => {
1942
- }, ["stop"]))
1943
- },
1944
- [
1945
- M(e.$slots, "footer")
1946
- ],
1947
- 2
1948
- /* CLASS */
1949
- )) : P("v-if", !0)
1950
- ]),
1951
- _: 3
1952
- /* FORWARDED */
1953
- },
1954
- 512
1955
- /* NEED_PATCH */
1956
- )
1957
- ]),
1958
- _: 3
1959
- /* FORWARDED */
1960
- }, 8, ["visible", "placement", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow"])
1961
- ],
1962
- 16
1963
- /* FULL_PROPS */
1964
- )), [
1965
- [E, e.handleClickOutside, e.popperRef]
1966
- ]);
1967
- }
1968
- var Ln = /* @__PURE__ */ Me(kn, [["render", Mn]]);
1969
- const Jn = Dl(Ln, {
1970
- Option: Ye,
1971
- OptionGroup: xe
1972
- }), Xn = $l(Ye), Yn = $l(xe);
1973
- export {
1974
- Xn as ElOption,
1975
- Yn as ElOptionGroup,
1976
- Jn as ElSelect,
1977
- Jn as default,
1978
- Zn as selectEmits,
1979
- Nl as selectGroupKey,
1980
- Le as selectKey,
1981
- wn as selectProps
1982
- };