st-comp 0.0.279 → 0.0.281
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +13 -14
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +377 -376
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +294 -294
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +260 -260
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +579 -553
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +17 -17
- package/es/KlinePlus.cjs +2 -2
- package/es/KlinePlus.js +23 -24
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +30 -29
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +517 -425
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +43 -43
- package/es/User.cjs +1 -1
- package/es/User.js +898 -866
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +110 -109
- package/es/VarietyAiHelper.cjs +7 -7
- package/es/VarietyAiHelper.js +615 -464
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +11 -11
- package/es/VarietySearch.cjs +18 -18
- package/es/VarietySearch.js +3079 -2913
- package/es/{VarietySelect-41daac7b.js → VarietySelect-3fc0f0ce.js} +5 -5
- package/es/{VarietySelect-d58eee29.cjs → VarietySelect-d2d25a3d.cjs} +1 -1
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +51 -51
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +1927 -2259
- package/es/_baseClone-f8e5d3ba.cjs +1 -0
- package/es/_baseClone-fb6a3947.js +210 -0
- package/es/base-d987e5c9.cjs +5 -0
- package/es/base-dd156b8e.js +790 -0
- package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
- package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
- package/es/clamp-17c4d8aa.cjs +1 -0
- package/es/clamp-c7512966.js +10 -0
- package/es/config-provider-06d8207f.js +86 -0
- package/es/config-provider-bb61bd3e.cjs +1 -0
- package/es/debounce-0a98a9c6.js +57 -0
- package/es/debounce-37b17615.cjs +1 -0
- package/es/dropdown-8fa21bfd.cjs +1 -0
- package/es/dropdown-bcf8d198.js +178 -0
- package/es/el-autocomplete-13b9e372.cjs +1 -0
- package/es/el-autocomplete-419bfbcf.js +434 -0
- package/es/el-button-ee9fe159.js +343 -0
- package/es/el-button-fac5e058.cjs +1 -0
- package/es/el-checkbox-6cf1a71c.cjs +1 -0
- package/es/el-checkbox-b5ac7f04.js +566 -0
- package/es/el-dialog-060b3735.js +252 -0
- package/es/el-dialog-54aebacd.cjs +1 -0
- package/es/el-divider-3f0320be.cjs +1 -0
- package/es/el-divider-c5d72961.js +51 -0
- package/es/el-empty-552baf04.js +159 -0
- package/es/el-empty-58bc2a10.cjs +1 -0
- package/es/el-form-item-2be6b683.js +1265 -0
- package/es/el-form-item-758dfefa.cjs +12 -0
- package/es/el-input-7fe53030.cjs +1 -0
- package/es/el-input-d23f5442.js +761 -0
- package/es/el-input-number-484fb184.js +390 -0
- package/es/el-input-number-f0f4eedb.cjs +1 -0
- package/es/el-loading-9d3e405c.js +190 -0
- package/es/el-loading-fafaaa7b.cjs +1 -0
- package/es/el-menu-item-0ac22681.js +824 -0
- package/es/el-menu-item-c91ae430.cjs +1 -0
- package/es/el-message-box-568a0aa6.js +481 -0
- package/es/el-message-box-ceacb54e.cjs +1 -0
- package/es/el-overlay-9f36e73c.cjs +1 -0
- package/es/el-overlay-cb5c85aa.js +444 -0
- package/es/el-popconfirm-4a8cd35c.cjs +1 -0
- package/es/el-popconfirm-6f8e65c8.js +190 -0
- package/es/el-popper-0454c8e8.js +2235 -0
- package/es/el-popper-acd0ff35.cjs +1 -0
- package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
- package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
- package/es/el-segmented-64dc7258.js +168 -0
- package/es/el-segmented-eb3c8e65.cjs +1 -0
- package/es/el-select-a573c78b.js +1535 -0
- package/es/el-select-c317294a.cjs +1 -0
- package/es/el-table-column-1c443963.js +3651 -0
- package/es/el-table-column-f555115d.cjs +14 -0
- package/es/el-tag-2d8a3fe7.js +77 -0
- package/es/el-tag-dca1292c.cjs +1 -0
- package/es/el-text-649c986a.cjs +1 -0
- package/es/el-text-761e6717.js +84 -0
- package/es/index-11181b5f.cjs +1 -0
- package/es/index-21a3dc89.cjs +1 -0
- package/es/index-33e039e3.cjs +1 -0
- package/es/index-3806160e.js +710 -0
- package/es/{index-a9246d17.cjs → index-4614e8e9.cjs} +109 -109
- package/es/{index-44a382a5.js → index-53beef02.js} +12 -12
- package/es/index-5cada1ed.cjs +1 -0
- package/es/index-6a36e1fc.cjs +1 -0
- package/es/{index-eb96e074.js → index-6a52dc7c.js} +235 -236
- package/es/index-71ba4c28.cjs +1 -0
- package/es/index-78dab605.js +141 -0
- package/es/index-798fec2d.cjs +1 -0
- package/es/index-9573f74b.js +372 -0
- package/es/index-a181f161.js +429 -0
- package/es/{index-a33b2fb8.js → index-ab0ad219.js} +5090 -5090
- package/es/index-beb5cb7d.cjs +1 -0
- package/es/index-c09fc6f5.js +131 -0
- package/es/index-ceae4c47.cjs +1 -0
- package/es/index-d372e68f.cjs +5 -0
- package/es/index-d9379af4.js +413 -0
- package/es/index-dddacf80.js +47 -0
- package/es/index-de9ad85c.js +12 -0
- package/es/index-e2e58ea9.js +468 -0
- package/es/index-f5474dcc.cjs +3 -0
- package/es/{python-a3db9620.cjs → python-60e79979.cjs} +1 -1
- package/es/{python-8a1664e6.js → python-673bf8b8.js} +32 -31
- package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
- package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
- package/es/scroll-07bade1e.cjs +1 -0
- package/es/scroll-70271cb1.js +35 -0
- package/es/style.css +1 -1
- package/es/toNumber-b47ceb68.cjs +1 -0
- package/es/toNumber-f077c66a.js +31 -0
- package/es/use-form-item-76516e50.cjs +2 -0
- package/es/use-form-item-784142b4.js +422 -0
- package/es/use-global-config-7ff9a1c2.cjs +1 -0
- package/es/use-global-config-9a4ccf33.js +71 -0
- package/es/validator-1926345b.cjs +1 -0
- package/es/{validator-c60a8956.js → validator-a66ec4f8.js} +1 -1
- package/es/vnode-6f7b84f0.cjs +1 -0
- package/es/vnode-8ee9bf4e.js +12 -0
- package/es/{zh-cn-b59a0910.js → zh-cn-51c2e528.js} +36 -33
- package/es/zh-cn-ad12d9f5.cjs +1 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +265 -246
- package/lib/{index-62fa175a.js → index-7282d3be.js} +52335 -50156
- package/lib/{python-4a48fa39.js → python-418be57d.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/_initCloneObject-5e73c9c8.js +0 -81
- package/es/_initCloneObject-a5832933.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/config-provider-06ea6b42.cjs +0 -1
- package/es/config-provider-88b637a8.js +0 -59
- package/es/dayjs.min-2c20abe6.cjs +0 -1
- package/es/dayjs.min-8313b006.js +0 -299
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/debounce-8d53f4dd.js +0 -83
- package/es/dropdown-4ce4c3e2.cjs +0 -1
- package/es/dropdown-72fbc15d.js +0 -178
- package/es/el-autocomplete-6cafcdf1.js +0 -329
- package/es/el-autocomplete-e0857c5b.cjs +0 -1
- package/es/el-button-613e0bb2.cjs +0 -1
- package/es/el-button-94d3de38.js +0 -272
- package/es/el-checkbox-6d4cb393.js +0 -459
- package/es/el-checkbox-e90762df.cjs +0 -1
- package/es/el-dialog-02942e22.cjs +0 -1
- package/es/el-dialog-5e30161f.js +0 -276
- package/es/el-divider-4713d74c.cjs +0 -1
- package/es/el-divider-4e059794.js +0 -45
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-empty-33cb66f1.js +0 -183
- package/es/el-form-item-44f060d8.cjs +0 -12
- package/es/el-form-item-9e8969ea.js +0 -1269
- package/es/el-input-342b2def.js +0 -531
- package/es/el-input-9a9a7f7f.cjs +0 -1
- package/es/el-input-number-65c847d6.cjs +0 -1
- package/es/el-input-number-c22b803a.js +0 -311
- package/es/el-loading-8179b497.cjs +0 -1
- package/es/el-loading-bcc51e3d.js +0 -203
- package/es/el-menu-item-339baf6d.js +0 -768
- package/es/el-menu-item-83186444.cjs +0 -1
- package/es/el-message-box-035b699c.js +0 -489
- package/es/el-message-box-c62d3217.cjs +0 -1
- package/es/el-overlay-3e17604b.js +0 -324
- package/es/el-overlay-8f1da9e8.cjs +0 -1
- package/es/el-popconfirm-4e32ec1b.cjs +0 -1
- package/es/el-popconfirm-f8a86e2c.js +0 -162
- package/es/el-popper-a4f3ae4d.cjs +0 -1
- package/es/el-popper-fbd0dcea.js +0 -2094
- package/es/el-segmented-56bd58a8.js +0 -142
- package/es/el-segmented-833ac177.cjs +0 -1
- package/es/el-select-44fa547d.js +0 -1256
- package/es/el-select-70806166.cjs +0 -1
- package/es/el-table-column-3e2cdfca.cjs +0 -14
- package/es/el-table-column-b74a857d.js +0 -3432
- package/es/el-tag-66c83156.js +0 -117
- package/es/el-tag-9c2f329f.cjs +0 -1
- package/es/el-text-034bd3f4.js +0 -67
- package/es/el-text-6b2374bb.cjs +0 -1
- package/es/index-00f6ca75.cjs +0 -1
- package/es/index-185792a7.cjs +0 -1
- package/es/index-1e2a38ab.js +0 -113
- package/es/index-2e331d74.js +0 -10
- package/es/index-3153c1db.cjs +0 -1
- package/es/index-5216d5f5.js +0 -406
- package/es/index-5c0dd943.cjs +0 -1
- package/es/index-657047bb.js +0 -513
- package/es/index-870b6c9d.cjs +0 -1
- package/es/index-8c2d7e05.js +0 -368
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9d16cea8.cjs +0 -1
- package/es/index-ac8dc53d.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c5f2d372.js +0 -326
- package/es/index-c6584658.js +0 -163
- package/es/index-d77a7336.js +0 -204
- package/es/index-eea0bcb3.cjs +0 -1
- package/es/index-f034b910.js +0 -60
- package/es/index-f1c702f6.cjs +0 -1
- package/es/index-f58b2920.cjs +0 -1
- package/es/scroll-679bd6bf.js +0 -35
- package/es/scroll-b108dabd.cjs +0 -1
- package/es/use-form-common-props-ac666630.cjs +0 -1
- package/es/use-form-common-props-ed72e914.js +0 -364
- package/es/use-global-config-23472471.cjs +0 -1
- package/es/use-global-config-ee406d58.js +0 -72
- package/es/validator-366dbf39.cjs +0 -1
- package/es/vnode-5ddb7ed1.js +0 -14
- package/es/vnode-b906ae6d.cjs +0 -1
- package/es/zh-cn-c21d12d8.cjs +0 -1
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { b as Ne, c as _, N as Ie, a as R, s as U, k as Te, m as F, u as Ae, V as De, t as Fe, w as Oe } from "./base-dd156b8e.js";
|
|
2
|
+
import { b as N, U as P, I as W, C as re, l as Pe, E as Ve, g as Be, a as d } from "./el-popper-0454c8e8.js";
|
|
3
|
+
import { a as Me } from "./index-a181f161.js";
|
|
4
|
+
import { E as Ke, l as Re } from "./index-6a52dc7c.js";
|
|
5
|
+
import { g as Ue, w as We } from "./use-form-item-784142b4.js";
|
|
6
|
+
import { i as Le, E as ee } from "./el-input-d23f5442.js";
|
|
7
|
+
import { E as qe } from "./index-d9379af4.js";
|
|
8
|
+
import { defineComponent as He, computed as k, useAttrs as ze, ref as f, onBeforeUnmount as je, onMounted as xe, openBlock as w, createBlock as Ge, unref as s, withCtx as g, createElementVNode as te, normalizeClass as $, normalizeStyle as oe, createElementBlock as I, withModifiers as ae, renderSlot as m, createCommentVNode as se, createVNode as O, Fragment as Je, renderList as Qe, createTextVNode as Xe, toDisplayString as Ye, mergeProps as le, createSlots as Ze } from "vue";
|
|
9
|
+
const _e = Ne({
|
|
10
|
+
...Le,
|
|
11
|
+
/**
|
|
12
|
+
* @description key name of the input suggestion object for display
|
|
13
|
+
*/
|
|
14
|
+
valueKey: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "value"
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* @description binding value
|
|
20
|
+
*/
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: [String, Number],
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* @description debounce delay when typing, in milliseconds
|
|
27
|
+
*/
|
|
28
|
+
debounce: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 300
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* @description placement of the popup menu
|
|
34
|
+
*/
|
|
35
|
+
placement: {
|
|
36
|
+
type: _(String),
|
|
37
|
+
values: [
|
|
38
|
+
"top",
|
|
39
|
+
"top-start",
|
|
40
|
+
"top-end",
|
|
41
|
+
"bottom",
|
|
42
|
+
"bottom-start",
|
|
43
|
+
"bottom-end"
|
|
44
|
+
],
|
|
45
|
+
default: "bottom-start"
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* @description a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete
|
|
49
|
+
*/
|
|
50
|
+
fetchSuggestions: {
|
|
51
|
+
type: _([Function, Array]),
|
|
52
|
+
default: Ie
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* @description custom class name for autocomplete's dropdown
|
|
56
|
+
*/
|
|
57
|
+
popperClass: N.popperClass,
|
|
58
|
+
/**
|
|
59
|
+
* @description custom style for autocomplete's dropdown
|
|
60
|
+
*/
|
|
61
|
+
popperStyle: N.popperStyle,
|
|
62
|
+
/**
|
|
63
|
+
* @description [popper.js](https://popper.js.org/docs/v2/) parameters
|
|
64
|
+
*/
|
|
65
|
+
popperOptions: N.popperOptions,
|
|
66
|
+
/**
|
|
67
|
+
* @description determines whether the arrow is displayed
|
|
68
|
+
*/
|
|
69
|
+
showArrow: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !0
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* @description whether show suggestions when input focus
|
|
75
|
+
*/
|
|
76
|
+
triggerOnFocus: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !0
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* @description whether to emit a `select` event on enter when there is no autocomplete match
|
|
82
|
+
*/
|
|
83
|
+
selectWhenUnmatched: Boolean,
|
|
84
|
+
/**
|
|
85
|
+
* @description whether to hide the loading icon in remote search
|
|
86
|
+
*/
|
|
87
|
+
hideLoading: Boolean,
|
|
88
|
+
/**
|
|
89
|
+
* @description whether select dropdown is teleported to the body
|
|
90
|
+
*/
|
|
91
|
+
teleported: N.teleported,
|
|
92
|
+
/**
|
|
93
|
+
* @description which select dropdown appends to
|
|
94
|
+
*/
|
|
95
|
+
appendTo: N.appendTo,
|
|
96
|
+
/**
|
|
97
|
+
* @description whether to highlight first item in remote search suggestions by default
|
|
98
|
+
*/
|
|
99
|
+
highlightFirstItem: Boolean,
|
|
100
|
+
/**
|
|
101
|
+
* @description whether the width of the dropdown is the same as the input
|
|
102
|
+
*/
|
|
103
|
+
fitInputWidth: Boolean,
|
|
104
|
+
/**
|
|
105
|
+
* @description whether keyboard navigation loops from end to start
|
|
106
|
+
*/
|
|
107
|
+
loopNavigation: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: !0
|
|
110
|
+
}
|
|
111
|
+
}), et = {
|
|
112
|
+
[P]: (o) => R(o) || U(o),
|
|
113
|
+
[W]: (o) => R(o) || U(o),
|
|
114
|
+
[re]: (o) => R(o) || U(o),
|
|
115
|
+
focus: (o) => o instanceof FocusEvent,
|
|
116
|
+
blur: (o) => o instanceof FocusEvent,
|
|
117
|
+
clear: () => !0,
|
|
118
|
+
select: (o) => Te(o)
|
|
119
|
+
}, tt = ["aria-expanded", "aria-owns"], ot = { key: 0 }, at = [
|
|
120
|
+
"id",
|
|
121
|
+
"aria-selected",
|
|
122
|
+
"onClick"
|
|
123
|
+
], ne = "ElAutocomplete";
|
|
124
|
+
var st = /* @__PURE__ */ He({
|
|
125
|
+
name: ne,
|
|
126
|
+
inheritAttrs: !1,
|
|
127
|
+
__name: "autocomplete",
|
|
128
|
+
props: _e,
|
|
129
|
+
emits: et,
|
|
130
|
+
setup(o, { expose: ue, emit: ie }) {
|
|
131
|
+
const l = o, i = ie, pe = k(() => {
|
|
132
|
+
const e = ee.props ?? [];
|
|
133
|
+
return Pe(l, F(e) ? e : Object.keys(e));
|
|
134
|
+
}), ce = ze(), L = Ue(), u = Ae("autocomplete"), c = f(), q = f(), T = f(), H = f();
|
|
135
|
+
let z = !1, S = !1;
|
|
136
|
+
const r = f([]), a = f(-1), j = f(""), p = f(!1), A = f(!1), y = f(!1), E = Me(), de = k(() => ce.style), h = k(() => (r.value.length > 0 || y.value) && p.value), x = k(() => !l.hideLoading && y.value), fe = k(() => c.value ? Array.from(c.value.$el.querySelectorAll("input")) : []), ve = () => {
|
|
137
|
+
h.value && (j.value = `${c.value.$el.offsetWidth}px`);
|
|
138
|
+
}, ge = () => {
|
|
139
|
+
a.value = -1;
|
|
140
|
+
}, G = async (e) => {
|
|
141
|
+
if (A.value)
|
|
142
|
+
return;
|
|
143
|
+
const t = (n) => {
|
|
144
|
+
y.value = !1, !A.value && (F(n) ? (r.value = n, a.value = l.highlightFirstItem ? 0 : -1) : Fe(ne, "autocomplete suggestions must be an array"));
|
|
145
|
+
};
|
|
146
|
+
if (y.value = !0, F(l.fetchSuggestions))
|
|
147
|
+
t(l.fetchSuggestions);
|
|
148
|
+
else {
|
|
149
|
+
const n = await l.fetchSuggestions(e, t);
|
|
150
|
+
F(n) && t(n);
|
|
151
|
+
}
|
|
152
|
+
}, V = De(G, k(() => l.debounce)), me = (e) => {
|
|
153
|
+
const t = !!e;
|
|
154
|
+
if (i(W, e), i(P, e), A.value = !1, p.value || (p.value = t), !l.triggerOnFocus && !e) {
|
|
155
|
+
A.value = !0, r.value = [];
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
V(e);
|
|
159
|
+
}, he = (e) => {
|
|
160
|
+
var t;
|
|
161
|
+
L.value || (((t = e.target) == null ? void 0 : t.tagName) !== "INPUT" || fe.value.includes(document.activeElement)) && (p.value = !0);
|
|
162
|
+
}, be = (e) => {
|
|
163
|
+
i(re, e);
|
|
164
|
+
}, ye = (e) => {
|
|
165
|
+
if (S)
|
|
166
|
+
S = !1;
|
|
167
|
+
else {
|
|
168
|
+
p.value = !0, i("focus", e);
|
|
169
|
+
const t = l.modelValue ?? "";
|
|
170
|
+
l.triggerOnFocus && !z && (r.value = [], a.value = -1, V(String(t)));
|
|
171
|
+
}
|
|
172
|
+
}, J = (e) => {
|
|
173
|
+
setTimeout(() => {
|
|
174
|
+
var t;
|
|
175
|
+
if ((t = T.value) != null && t.isFocusInsideContent()) {
|
|
176
|
+
S = !0;
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
p.value && C(), i("blur", e);
|
|
180
|
+
});
|
|
181
|
+
}, Ee = () => {
|
|
182
|
+
p.value = !1, i(P, ""), i("clear");
|
|
183
|
+
}, Q = async () => {
|
|
184
|
+
var e;
|
|
185
|
+
(e = c.value) != null && e.isComposing || (h.value && a.value >= 0 && a.value < r.value.length ? B(r.value[a.value]) : (l.selectWhenUnmatched && (i("select", { value: l.modelValue }), r.value = [], a.value = -1), p.value = !0, V(String(l.modelValue))));
|
|
186
|
+
}, ke = (e) => {
|
|
187
|
+
h.value && (e.preventDefault(), e.stopPropagation(), C());
|
|
188
|
+
}, C = () => {
|
|
189
|
+
p.value = !1;
|
|
190
|
+
}, we = () => {
|
|
191
|
+
var e;
|
|
192
|
+
(e = c.value) == null || e.focus();
|
|
193
|
+
}, $e = () => {
|
|
194
|
+
var e;
|
|
195
|
+
(e = c.value) == null || e.blur();
|
|
196
|
+
}, B = async (e) => {
|
|
197
|
+
i(W, e[l.valueKey]), i(P, e[l.valueKey]), i("select", e), r.value = [], a.value = -1;
|
|
198
|
+
}, b = (e) => {
|
|
199
|
+
var Y, Z;
|
|
200
|
+
if (!h.value || y.value)
|
|
201
|
+
return;
|
|
202
|
+
if (e < 0) {
|
|
203
|
+
if (!l.loopNavigation) {
|
|
204
|
+
a.value = -1;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
e = r.value.length - 1;
|
|
208
|
+
}
|
|
209
|
+
e >= r.value.length && (e = l.loopNavigation ? 0 : r.value.length - 1);
|
|
210
|
+
const [t, n] = Se(), v = n[e], K = t.scrollTop, { offsetTop: D, scrollHeight: X } = v;
|
|
211
|
+
D + X > K + t.clientHeight && (t.scrollTop = D + X - t.clientHeight), D < K && (t.scrollTop = D), a.value = e, (Z = (Y = c.value) == null ? void 0 : Y.ref) == null || Z.setAttribute("aria-activedescendant", `${E.value}-item-${a.value}`);
|
|
212
|
+
}, Se = () => {
|
|
213
|
+
const e = q.value.querySelector(`.${u.be("suggestion", "wrap")}`);
|
|
214
|
+
return [e, e.querySelectorAll(`.${u.be("suggestion", "list")} li`)];
|
|
215
|
+
}, M = We(H, (e) => {
|
|
216
|
+
var n;
|
|
217
|
+
if ((n = T.value) != null && n.isFocusInsideContent())
|
|
218
|
+
return;
|
|
219
|
+
const t = S;
|
|
220
|
+
S = !1, h.value && (t ? J(new FocusEvent("blur", e)) : C());
|
|
221
|
+
}), Ce = (e) => {
|
|
222
|
+
switch (Be(e)) {
|
|
223
|
+
case d.up:
|
|
224
|
+
e.preventDefault(), b(a.value - 1);
|
|
225
|
+
break;
|
|
226
|
+
case d.down:
|
|
227
|
+
e.preventDefault(), b(a.value + 1);
|
|
228
|
+
break;
|
|
229
|
+
case d.enter:
|
|
230
|
+
case d.numpadEnter:
|
|
231
|
+
e.preventDefault(), Q();
|
|
232
|
+
break;
|
|
233
|
+
case d.tab:
|
|
234
|
+
C();
|
|
235
|
+
break;
|
|
236
|
+
case d.esc:
|
|
237
|
+
ke(e);
|
|
238
|
+
break;
|
|
239
|
+
case d.home:
|
|
240
|
+
e.preventDefault(), b(0);
|
|
241
|
+
break;
|
|
242
|
+
case d.end:
|
|
243
|
+
e.preventDefault(), b(r.value.length - 1);
|
|
244
|
+
break;
|
|
245
|
+
case d.pageUp:
|
|
246
|
+
e.preventDefault(), b(Math.max(0, a.value - 10));
|
|
247
|
+
break;
|
|
248
|
+
case d.pageDown:
|
|
249
|
+
e.preventDefault(), b(Math.min(r.value.length - 1, a.value + 10));
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
return je(() => {
|
|
254
|
+
M == null || M();
|
|
255
|
+
}), xe(() => {
|
|
256
|
+
var t;
|
|
257
|
+
const e = (t = c.value) == null ? void 0 : t.ref;
|
|
258
|
+
e && ([
|
|
259
|
+
{
|
|
260
|
+
key: "role",
|
|
261
|
+
value: "textbox"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
key: "aria-autocomplete",
|
|
265
|
+
value: "list"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
key: "aria-controls",
|
|
269
|
+
value: E.value
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
key: "aria-activedescendant",
|
|
273
|
+
value: `${E.value}-item-${a.value}`
|
|
274
|
+
}
|
|
275
|
+
].forEach(({ key: n, value: v }) => e.setAttribute(n, v)), z = e.hasAttribute("readonly"));
|
|
276
|
+
}), ue({
|
|
277
|
+
/** @description the index of the currently highlighted item */
|
|
278
|
+
highlightedIndex: a,
|
|
279
|
+
/** @description autocomplete whether activated */
|
|
280
|
+
activated: p,
|
|
281
|
+
/** @description remote search loading status */
|
|
282
|
+
loading: y,
|
|
283
|
+
/** @description el-input component instance */
|
|
284
|
+
inputRef: c,
|
|
285
|
+
/** @description el-tooltip component instance */
|
|
286
|
+
popperRef: T,
|
|
287
|
+
/** @description fetch suggestions result */
|
|
288
|
+
suggestions: r,
|
|
289
|
+
/** @description triggers when a suggestion is clicked */
|
|
290
|
+
handleSelect: B,
|
|
291
|
+
/** @description handle keyboard enter event */
|
|
292
|
+
handleKeyEnter: Q,
|
|
293
|
+
/** @description focus the input element */
|
|
294
|
+
focus: we,
|
|
295
|
+
/** @description blur the input element */
|
|
296
|
+
blur: $e,
|
|
297
|
+
/** @description close suggestion */
|
|
298
|
+
close: C,
|
|
299
|
+
/** @description highlight an item in a suggestion */
|
|
300
|
+
highlight: b,
|
|
301
|
+
/** @description loading suggestion list */
|
|
302
|
+
getData: G
|
|
303
|
+
}), (e, t) => (w(), Ge(s(Ve), {
|
|
304
|
+
ref_key: "popperRef",
|
|
305
|
+
ref: T,
|
|
306
|
+
visible: h.value,
|
|
307
|
+
placement: o.placement,
|
|
308
|
+
"fallback-placements": ["bottom-start", "top-start"],
|
|
309
|
+
"popper-class": [s(u).e("popper"), o.popperClass],
|
|
310
|
+
"popper-style": o.popperStyle,
|
|
311
|
+
"popper-options": o.popperOptions,
|
|
312
|
+
"show-arrow": o.showArrow,
|
|
313
|
+
teleported: o.teleported,
|
|
314
|
+
"append-to": o.appendTo,
|
|
315
|
+
"gpu-acceleration": !1,
|
|
316
|
+
pure: "",
|
|
317
|
+
"manual-mode": "",
|
|
318
|
+
effect: "light",
|
|
319
|
+
trigger: "click",
|
|
320
|
+
transition: `${s(u).namespace.value}-zoom-in-top`,
|
|
321
|
+
persistent: "",
|
|
322
|
+
role: "listbox",
|
|
323
|
+
onBeforeShow: ve,
|
|
324
|
+
onHide: ge
|
|
325
|
+
}, {
|
|
326
|
+
content: g(() => [te("div", {
|
|
327
|
+
ref_key: "regionRef",
|
|
328
|
+
ref: q,
|
|
329
|
+
class: $([s(u).b("suggestion"), s(u).is("loading", x.value)]),
|
|
330
|
+
style: oe({
|
|
331
|
+
[o.fitInputWidth ? "width" : "minWidth"]: j.value,
|
|
332
|
+
outline: "none"
|
|
333
|
+
}),
|
|
334
|
+
role: "region"
|
|
335
|
+
}, [
|
|
336
|
+
e.$slots.header ? (w(), I("div", {
|
|
337
|
+
key: 0,
|
|
338
|
+
class: $(s(u).be("suggestion", "header")),
|
|
339
|
+
onClick: t[0] || (t[0] = ae(() => {
|
|
340
|
+
}, ["stop"]))
|
|
341
|
+
}, [m(e.$slots, "header")], 2)) : se("v-if", !0),
|
|
342
|
+
O(s(qe), {
|
|
343
|
+
id: s(E),
|
|
344
|
+
tag: "ul",
|
|
345
|
+
"wrap-class": s(u).be("suggestion", "wrap"),
|
|
346
|
+
"view-class": s(u).be("suggestion", "list"),
|
|
347
|
+
role: "listbox"
|
|
348
|
+
}, {
|
|
349
|
+
default: g(() => [x.value ? (w(), I("li", ot, [m(e.$slots, "loading", {}, () => [O(s(Ke), { class: $(s(u).is("loading")) }, {
|
|
350
|
+
default: g(() => [O(s(Re))]),
|
|
351
|
+
_: 1
|
|
352
|
+
}, 8, ["class"])])])) : (w(!0), I(Je, { key: 1 }, Qe(r.value, (n, v) => (w(), I("li", {
|
|
353
|
+
id: `${s(E)}-item-${v}`,
|
|
354
|
+
key: v,
|
|
355
|
+
class: $({ highlighted: a.value === v }),
|
|
356
|
+
role: "option",
|
|
357
|
+
"aria-selected": a.value === v,
|
|
358
|
+
onClick: (K) => B(n)
|
|
359
|
+
}, [m(e.$slots, "default", { item: n }, () => [Xe(Ye(n[o.valueKey]), 1)])], 10, at))), 128))]),
|
|
360
|
+
_: 3
|
|
361
|
+
}, 8, [
|
|
362
|
+
"id",
|
|
363
|
+
"wrap-class",
|
|
364
|
+
"view-class"
|
|
365
|
+
]),
|
|
366
|
+
e.$slots.footer ? (w(), I("div", {
|
|
367
|
+
key: 1,
|
|
368
|
+
class: $(s(u).be("suggestion", "footer")),
|
|
369
|
+
onClick: t[1] || (t[1] = ae(() => {
|
|
370
|
+
}, ["stop"]))
|
|
371
|
+
}, [m(e.$slots, "footer")], 2)) : se("v-if", !0)
|
|
372
|
+
], 6)]),
|
|
373
|
+
default: g(() => [te("div", {
|
|
374
|
+
ref_key: "listboxRef",
|
|
375
|
+
ref: H,
|
|
376
|
+
class: $([s(u).b(), e.$attrs.class]),
|
|
377
|
+
style: oe(de.value),
|
|
378
|
+
role: "combobox",
|
|
379
|
+
"aria-haspopup": "listbox",
|
|
380
|
+
"aria-expanded": h.value,
|
|
381
|
+
"aria-owns": s(E)
|
|
382
|
+
}, [O(s(ee), le({
|
|
383
|
+
ref_key: "inputRef",
|
|
384
|
+
ref: c
|
|
385
|
+
}, le(pe.value, e.$attrs), {
|
|
386
|
+
"model-value": o.modelValue,
|
|
387
|
+
disabled: s(L),
|
|
388
|
+
onInput: me,
|
|
389
|
+
onChange: be,
|
|
390
|
+
onFocus: ye,
|
|
391
|
+
onBlur: J,
|
|
392
|
+
onClear: Ee,
|
|
393
|
+
onKeydown: Ce,
|
|
394
|
+
onMousedown: he
|
|
395
|
+
}), Ze({ _: 2 }, [
|
|
396
|
+
e.$slots.prepend ? {
|
|
397
|
+
name: "prepend",
|
|
398
|
+
fn: g(() => [m(e.$slots, "prepend")]),
|
|
399
|
+
key: "0"
|
|
400
|
+
} : void 0,
|
|
401
|
+
e.$slots.append ? {
|
|
402
|
+
name: "append",
|
|
403
|
+
fn: g(() => [m(e.$slots, "append")]),
|
|
404
|
+
key: "1"
|
|
405
|
+
} : void 0,
|
|
406
|
+
e.$slots.prefix ? {
|
|
407
|
+
name: "prefix",
|
|
408
|
+
fn: g(() => [m(e.$slots, "prefix")]),
|
|
409
|
+
key: "2"
|
|
410
|
+
} : void 0,
|
|
411
|
+
e.$slots.suffix ? {
|
|
412
|
+
name: "suffix",
|
|
413
|
+
fn: g(() => [m(e.$slots, "suffix")]),
|
|
414
|
+
key: "3"
|
|
415
|
+
} : void 0
|
|
416
|
+
]), 1040, ["model-value", "disabled"])], 14, tt)]),
|
|
417
|
+
_: 3
|
|
418
|
+
}, 8, [
|
|
419
|
+
"visible",
|
|
420
|
+
"placement",
|
|
421
|
+
"popper-class",
|
|
422
|
+
"popper-style",
|
|
423
|
+
"popper-options",
|
|
424
|
+
"show-arrow",
|
|
425
|
+
"teleported",
|
|
426
|
+
"append-to",
|
|
427
|
+
"transition"
|
|
428
|
+
]));
|
|
429
|
+
}
|
|
430
|
+
}), lt = st;
|
|
431
|
+
const vt = Oe(lt);
|
|
432
|
+
export {
|
|
433
|
+
vt as E
|
|
434
|
+
};
|