st-comp 0.0.186 → 0.0.188
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 +14 -13
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +104 -91
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +31 -28
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +17 -14
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +26 -23
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +22 -19
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +16 -13
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +19 -16
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +88 -85
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +34 -32
- package/es/TreeMap.cjs +1 -2
- package/es/TreeMap.js +1 -163
- package/es/User.cjs +1 -1
- package/es/User.js +53 -50
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +166 -479
- package/es/VarietyAutoComplete.cjs +1 -0
- package/es/VarietyAutoComplete.js +84 -0
- package/es/VarietySearch.cjs +6 -6
- package/es/VarietySearch.js +50 -47
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +33 -31
- package/es/{_initCloneObject-00cee14a.js → _initCloneObject-25087817.js} +24 -23
- package/es/_initCloneObject-95a1fe6e.cjs +1 -0
- package/es/{base-62a70f61.js → base-f5b11441.js} +40 -40
- package/es/config-provider-79c2df1b.cjs +1 -0
- package/es/{config-provider-89aba243.js → config-provider-95d27ce2.js} +9 -8
- package/es/{debounce-5f2ec4be.js → debounce-06f59c68.js} +10 -10
- package/es/{debounce-0b77a317.cjs → debounce-62f5b6e8.cjs} +1 -1
- package/es/{dropdown-0fd8bdbd.js → dropdown-7a853d45.js} +9 -9
- package/es/{dropdown-babf55db.cjs → dropdown-c2ef9062.cjs} +1 -1
- package/es/el-autocomplete-b7bcfb25.cjs +1 -0
- package/es/el-autocomplete-e74d589c.js +328 -0
- package/es/{el-button-338a49b7.cjs → el-button-5973d99c.cjs} +1 -1
- package/es/{el-button-f44cb2cf.js → el-button-5a260464.js} +33 -33
- package/es/{el-dialog-c2451c86.js → el-dialog-8d8f6443.js} +17 -17
- package/es/{el-dialog-45250561.cjs → el-dialog-a24f4f8f.cjs} +1 -1
- package/es/{el-divider-2f300113.js → el-divider-4e1c0fb8.js} +1 -1
- package/es/el-empty-1697ded8.cjs +1 -0
- package/es/{el-empty-87a86f30.js → el-empty-deee6b39.js} +10 -9
- package/es/{el-form-item-64c14a64.js → el-form-item-3167d76a.js} +74 -73
- package/es/el-form-item-8dc6aec8.cjs +12 -0
- package/es/{el-input-ef6edbf3.js → el-input-03aad76d.js} +33 -33
- package/es/{el-input-c663697a.cjs → el-input-06243b61.cjs} +1 -1
- package/es/{el-input-number-cda5c4e1.js → el-input-number-12c09ac3.js} +70 -70
- package/es/{el-input-number-5fda0890.cjs → el-input-number-854b2066.cjs} +1 -1
- package/es/{el-loading-1be77e7c.js → el-loading-86fdef94.js} +5 -5
- package/es/{el-loading-8c3379d5.cjs → el-loading-a536daf8.cjs} +1 -1
- package/es/{el-menu-item-84a4b594.js → el-menu-item-1172154b.js} +22 -22
- package/es/{el-menu-item-cf9e0e36.cjs → el-menu-item-6522d54c.cjs} +1 -1
- package/es/{el-message-c500161d.cjs → el-message-0aeea1a3.cjs} +1 -1
- package/es/{el-message-ba131b90.js → el-message-35d4e3ac.js} +23 -23
- package/es/{el-message-box-743c461a.cjs → el-message-box-2e7304ce.cjs} +1 -1
- package/es/{el-message-box-38779ab9.js → el-message-box-f43b6e7a.js} +20 -20
- package/es/{el-overlay-a6f43919.js → el-overlay-04659660.js} +41 -41
- package/es/{el-overlay-39e2e96f.cjs → el-overlay-ef92f51f.cjs} +1 -1
- package/es/{el-popconfirm-16597a41.js → el-popconfirm-29d538b6.js} +20 -20
- package/es/{el-popconfirm-08b4221f.cjs → el-popconfirm-58a1b946.cjs} +1 -1
- package/es/{el-popper-dca2de0d.cjs → el-popper-c9e0136d.cjs} +1 -1
- package/es/{el-popper-05a8f271.js → el-popper-ee1f8186.js} +79 -79
- package/es/el-scrollbar-05815cf5.cjs +1 -0
- package/es/el-scrollbar-09769d9e.js +395 -0
- package/es/{el-segmented-d68dfe31.js → el-segmented-916b982a.js} +8 -8
- package/es/{el-segmented-c2952e4c.cjs → el-segmented-d454a924.cjs} +1 -1
- package/es/el-select-6d813c15.cjs +1 -0
- package/es/{el-select-7846f331.js → el-select-8cb88e3c.js} +364 -361
- package/es/{el-table-column-cd63e722.js → el-table-column-0c899664.js} +147 -145
- package/es/el-table-column-762a20e0.cjs +14 -0
- package/es/{el-tag-914c96a9.js → el-tag-554c333b.js} +27 -26
- package/es/el-tag-fe492a6d.cjs +1 -0
- package/es/index-34048a1d.js +314 -0
- package/es/{index-b132c1b1.js → index-384ed4b0.js} +3 -3
- package/es/index-5b62ea0e.js +375 -0
- package/es/{index-1c409d46.cjs → index-62573d45.cjs} +1 -1
- package/es/{index-14c322b1.js → index-69a9bd75.js} +2 -2
- package/es/{index-2bf6214c.cjs → index-77f4746b.cjs} +1 -1
- package/es/index-7e4e0bd3.cjs +1 -0
- package/es/index-9780a537.cjs +1 -0
- package/es/{index-e6deec5d.cjs → index-a9d4ef0f.cjs} +1 -1
- package/es/{index-35129268.js → index-b07f58c9.js} +76 -61
- package/es/index-b7fd560c.js +60 -0
- package/es/index-bb833443.cjs +1 -0
- package/es/index-ca7dbd47.cjs +1 -0
- package/es/index-cfeda35a.js +204 -0
- package/es/{index-20749652.js → index-df06f32a.js} +15 -15
- package/es/index-eab8a286.cjs +1 -0
- package/es/raf-fa761d02.js +6 -0
- package/es/{scroll-7d352c1f.js → scroll-9e2dd92b.js} +5 -5
- package/es/style.css +1 -1
- package/es/use-global-config-1923bb6f.js +72 -0
- package/es/use-global-config-c2c5ca8f.cjs +1 -0
- package/es/{validator-f66b0f34.cjs → validator-866ea0bb.cjs} +1 -1
- package/es/{validator-90d3e848.js → validator-fd32f925.js} +1 -1
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/vnode-f9752526.js +14 -0
- package/es/{zh-cn-de7ae601.cjs → zh-cn-0fa1aa6d.cjs} +1 -1
- package/es/{zh-cn-530f1ed1.js → zh-cn-d667062d.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +139 -139
- package/lib/{index-26fab3e5.js → index-02706357.js} +14643 -14551
- package/lib/{python-c34eeb40.js → python-42146c31.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/CustomFunction/index.vue +11 -2
- package/packages/VarietyAutoComplete/index.ts +8 -0
- package/packages/VarietyAutoComplete/index.vue +89 -0
- package/packages/index.ts +2 -0
- package/src/pages/VarietyAutoComplete/index.vue +19 -0
- package/src/router/routes.ts +5 -0
- package/es/_initCloneObject-4dd3c9a4.cjs +0 -1
- package/es/config-provider-d82ea78c.cjs +0 -1
- package/es/el-empty-bb2b0235.cjs +0 -1
- package/es/el-form-item-b5f6081b.cjs +0 -12
- package/es/el-scrollbar-31d72626.js +0 -763
- package/es/el-scrollbar-802d874d.cjs +0 -1
- package/es/el-select-8337856d.cjs +0 -1
- package/es/el-table-column-34f080b5.cjs +0 -14
- package/es/el-tag-a2e99294.cjs +0 -1
- package/es/index-34592e82.js +0 -513
- package/es/index-3a74eae4.cjs +0 -1
- package/es/index-8feed26f.cjs +0 -1
- package/es/raf-41aed4d4.js +0 -6
- package/es/use-global-config-53be2b7d.js +0 -71
- package/es/use-global-config-f3664595.cjs +0 -1
- package/es/vnode-6d51e502.cjs +0 -1
- package/es/vnode-8ddc4f78.js +0 -70
package/es/VirtualTable.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as Qt } from "./el-empty-
|
|
3
|
-
import {
|
|
4
|
-
import { E as
|
|
5
|
-
import { E as
|
|
6
|
-
import { getCurrentInstance as nt, computed as E, defineComponent as xe, ref as F, reactive as
|
|
7
|
-
import { d as
|
|
1
|
+
import { O as Oe, d as I, b as ae, u as Ie, h as xt, f as Q, i as We, j as Qe, c as Tt, a as Dl, e as Nt, z as Pl, q as $l, w as Jt } from "./base-f5b11441.js";
|
|
2
|
+
import { E as Qt } from "./el-empty-deee6b39.js";
|
|
3
|
+
import { D as Fl, b as Wl, h as Gl } from "./el-scrollbar-09769d9e.js";
|
|
4
|
+
import { E as kl } from "./el-divider-4e1c0fb8.js";
|
|
5
|
+
import { E as Vl } from "./el-button-5a260464.js";
|
|
6
|
+
import { getCurrentInstance as nt, computed as E, defineComponent as xe, ref as F, reactive as Kl, unref as n, watch as Re, onBeforeUnmount as el, h as ue, withModifiers as jl, shallowRef as $e, nextTick as Se, isVNode as Ne, toRef as Lt, inject as Et, onUpdated as Bl, createVNode as C, onMounted as rt, resolveDynamicComponent as zt, Fragment as ql, provide as tl, onActivated as Ul, mergeProps as Y, renderSlot as Ye, mergeModels as Dt, useModel as Yl, onUnmounted as Zl, openBlock as Xe, createBlock as it, withCtx as De, createElementBlock as Xl, createTextVNode as Pt, createCommentVNode as $t } from "vue";
|
|
7
|
+
import { d as Jl } from "./debounce-06f59c68.js";
|
|
8
8
|
import { m as ll } from "./typescript-7ae59c4c.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { f as Ql } from "./index-5b62ea0e.js";
|
|
10
|
+
import { c as ol, r as nl } from "./raf-fa761d02.js";
|
|
11
|
+
import { o as eo } from "./index-34048a1d.js";
|
|
12
|
+
import { g as to } from "./scroll-9e2dd92b.js";
|
|
13
|
+
import { E as rl, n as lo, A as oo, B as no } from "./index-b07f58c9.js";
|
|
14
|
+
import { g as ro } from "./index-cfeda35a.js";
|
|
13
15
|
import { _ as ao } from "./_plugin-vue_export-helper-dad06003.js";
|
|
14
16
|
import "./index-2e331d74.js";
|
|
15
|
-
import "./use-global-config-
|
|
17
|
+
import "./use-global-config-1923bb6f.js";
|
|
16
18
|
import "./index-657047bb.js";
|
|
17
19
|
var Ft = Number.isNaN || function(t) {
|
|
18
20
|
return typeof t == "number" && t !== t;
|
|
@@ -191,7 +193,7 @@ const jt = xe({
|
|
|
191
193
|
setup(e, { emit: t }) {
|
|
192
194
|
const l = E(() => e.startGap + e.endGap), o = Ie("virtual-scrollbar"), a = Ie("scrollbar"), r = F(), s = F();
|
|
193
195
|
let c = null, m = null;
|
|
194
|
-
const f =
|
|
196
|
+
const f = Kl({
|
|
195
197
|
isDragging: !1,
|
|
196
198
|
traveled: 0
|
|
197
199
|
}), u = E(() => Fl[e.layout]), v = E(() => e.clientSize - n(l)), b = E(() => ({
|
|
@@ -262,7 +264,7 @@ const jt = xe({
|
|
|
262
264
|
(e.alwaysOn || f.isDragging) && "always-on"
|
|
263
265
|
],
|
|
264
266
|
style: b.value,
|
|
265
|
-
onMousedown:
|
|
267
|
+
onMousedown: jl(M, ["stop", "prevent"]),
|
|
266
268
|
onTouchstartPrevent: g
|
|
267
269
|
}, ue("div", {
|
|
268
270
|
ref: s,
|
|
@@ -426,7 +428,7 @@ const bo = (e, {
|
|
|
426
428
|
rowKey: N
|
|
427
429
|
}), (B = e.onExpandedRowsChange) == null || B.call(e, V), a.vnode.el.querySelector(`.${r.is("hovered")}[rowkey="${String(N)}"]`) && Se(() => H({ hovered: !0, rowKey: N }));
|
|
428
430
|
}
|
|
429
|
-
const R =
|
|
431
|
+
const R = Jl(() => {
|
|
430
432
|
var x, A, W, N;
|
|
431
433
|
f.value = !0, y.value = { ...n(y), ...n(w) }, $(n(b), !1), w.value = {}, b.value = null, (x = t.value) == null || x.forceUpdate(), (A = l.value) == null || A.forceUpdate(), (W = o.value) == null || W.forceUpdate(), (N = c.proxy) == null || N.$forceUpdate(), f.value = !1;
|
|
432
434
|
}, 0);
|
|
@@ -872,7 +874,7 @@ const _t = Symbol("tableV2"), wl = "tableV2GridScrollLeft", bl = String, Ze = {
|
|
|
872
874
|
})), c = E(() => be({
|
|
873
875
|
width: e.rowWidth,
|
|
874
876
|
height: e.height
|
|
875
|
-
})), m = E(() =>
|
|
877
|
+
})), m = E(() => Ql(n(e.headerHeight))), f = (b) => {
|
|
876
878
|
const y = n(r);
|
|
877
879
|
Se(() => {
|
|
878
880
|
y != null && y.scroll && y.scroll({
|
|
@@ -917,7 +919,7 @@ const _t = Symbol("tableV2"), wl = "tableV2GridScrollLeft", bl = String, Ze = {
|
|
|
917
919
|
});
|
|
918
920
|
});
|
|
919
921
|
};
|
|
920
|
-
return
|
|
922
|
+
return Bl(() => {
|
|
921
923
|
a != null && a.value && f(a.value);
|
|
922
924
|
}), l({
|
|
923
925
|
scrollToLeft: f
|
|
@@ -1117,7 +1119,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1117
1119
|
scrollTop: Math.min(x.value.scrollTop + _, V.value - k)
|
|
1118
1120
|
});
|
|
1119
1121
|
});
|
|
1120
|
-
|
|
1122
|
+
Wl(R, "wheel", ve, {
|
|
1121
1123
|
passive: !1
|
|
1122
1124
|
});
|
|
1123
1125
|
const Z = ({
|
|
@@ -1137,7 +1139,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1137
1139
|
}, ge = (T = 0, _ = 0, p = He) => {
|
|
1138
1140
|
const D = n(x);
|
|
1139
1141
|
_ = Math.max(0, Math.min(_, h.totalColumn - 1)), T = Math.max(0, Math.min(T, h.totalRow - 1));
|
|
1140
|
-
const L =
|
|
1142
|
+
const L = to(S.namespace.value), O = n(M), P = r(h, O), k = s(h, O);
|
|
1141
1143
|
Z({
|
|
1142
1144
|
scrollLeft: c(h, _, p, D.scrollLeft, O, k > h.width ? L : 0),
|
|
1143
1145
|
scrollTop: m(h, T, p, D.scrollTop, O, P > h.height ? L : 0)
|
|
@@ -1248,7 +1250,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1248
1250
|
for (let J = D; J <= L; J++)
|
|
1249
1251
|
for (let ee = _; ee <= p; ee++) {
|
|
1250
1252
|
const Ee = X({ columnIndex: ee, data: O, rowIndex: J });
|
|
1251
|
-
te.push(ue(
|
|
1253
|
+
te.push(ue(ql, { key: Ee }, (T = g.default) == null ? void 0 : T.call(g, {
|
|
1252
1254
|
columnIndex: ee,
|
|
1253
1255
|
data: O,
|
|
1254
1256
|
isScrolling: K ? n(x).isScrolling : void 0,
|
|
@@ -1604,7 +1606,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1604
1606
|
scrollToRow: i,
|
|
1605
1607
|
scrollLeft: g
|
|
1606
1608
|
} = Po(e);
|
|
1607
|
-
tl(wl, g),
|
|
1609
|
+
tl(wl, g), Ul(async () => {
|
|
1608
1610
|
var H;
|
|
1609
1611
|
await Se();
|
|
1610
1612
|
const M = (H = a.value) == null ? void 0 : H.states.scrollTop;
|
|
@@ -2021,7 +2023,7 @@ const ln = (e) => {
|
|
|
2021
2023
|
size: r,
|
|
2022
2024
|
style: a
|
|
2023
2025
|
}), {
|
|
2024
|
-
default: () => [C(
|
|
2026
|
+
default: () => [C(lo, null, null)]
|
|
2025
2027
|
});
|
|
2026
2028
|
};
|
|
2027
2029
|
var on = ln;
|
|
@@ -2061,7 +2063,7 @@ const pl = ({
|
|
|
2061
2063
|
columnIndex: l,
|
|
2062
2064
|
rowData: s,
|
|
2063
2065
|
rowIndex: c
|
|
2064
|
-
}) :
|
|
2066
|
+
}) : ro(s, S ?? ""), R = Ae(v, {
|
|
2065
2067
|
cellData: M,
|
|
2066
2068
|
columns: e,
|
|
2067
2069
|
column: t,
|
|
@@ -2191,7 +2193,7 @@ const hn = (e) => {
|
|
|
2191
2193
|
size: 14,
|
|
2192
2194
|
class: e.class
|
|
2193
2195
|
}, {
|
|
2194
|
-
default: () => [t === Be.ASC ? C(
|
|
2196
|
+
default: () => [t === Be.ASC ? C(oo, null, null) : C(no, null, null)]
|
|
2195
2197
|
});
|
|
2196
2198
|
};
|
|
2197
2199
|
var fn = hn;
|
|
@@ -2522,7 +2524,7 @@ const Rn = ae({
|
|
|
2522
2524
|
const t = F(), l = F(0), o = F(0);
|
|
2523
2525
|
let a;
|
|
2524
2526
|
return rt(() => {
|
|
2525
|
-
a =
|
|
2527
|
+
a = Gl(t, ([r]) => {
|
|
2526
2528
|
const { width: s, height: c } = r.contentRect, { paddingLeft: m, paddingRight: f, paddingTop: u, paddingBottom: v } = getComputedStyle(r.target), b = Number.parseInt(m) || 0, y = Number.parseInt(f) || 0, w = Number.parseInt(u) || 0, h = Number.parseInt(v) || 0;
|
|
2527
2529
|
l.value = s - b - y, o.value = c - w - h;
|
|
2528
2530
|
}).stop;
|
|
@@ -2615,7 +2617,7 @@ const Hn = {
|
|
|
2615
2617
|
...o.config
|
|
2616
2618
|
})), r = F(null), s = F(0);
|
|
2617
2619
|
let c = 0, m = !1, f = null;
|
|
2618
|
-
const u =
|
|
2620
|
+
const u = Yl(e, "tableActiveData"), v = E(() => u.value.map((i) => i[a.value.tableActiveKey])), b = ({
|
|
2619
2621
|
rowData: i,
|
|
2620
2622
|
rowIndex: g
|
|
2621
2623
|
}) => {
|
|
@@ -2676,10 +2678,10 @@ const Hn = {
|
|
|
2676
2678
|
window.addEventListener("keydown", y);
|
|
2677
2679
|
}), Re(() => o.tableLoading, (i) => {
|
|
2678
2680
|
i || (s.value = 0);
|
|
2679
|
-
}),
|
|
2681
|
+
}), Zl(() => {
|
|
2680
2682
|
window.removeEventListener("keydown", y);
|
|
2681
2683
|
}), (i, g) => {
|
|
2682
|
-
const S = Qt, H =
|
|
2684
|
+
const S = Qt, H = Vl, M = kl, R = _n, $ = Cn;
|
|
2683
2685
|
return Xe(), it($, null, {
|
|
2684
2686
|
default: De(({
|
|
2685
2687
|
height: z,
|
|
@@ -2710,7 +2712,7 @@ const Hn = {
|
|
|
2710
2712
|
height: "100%"
|
|
2711
2713
|
}
|
|
2712
2714
|
})]),
|
|
2713
|
-
footer: De(() => [s.value ? (Xe(),
|
|
2715
|
+
footer: De(() => [s.value ? (Xe(), Xl("div", Hn, [e.tableLoading === "more" ? (Xe(), it(M, {
|
|
2714
2716
|
key: 0
|
|
2715
2717
|
}, {
|
|
2716
2718
|
default: De(() => [C(H, {
|
|
@@ -2735,11 +2737,11 @@ const Hn = {
|
|
|
2735
2737
|
};
|
|
2736
2738
|
}
|
|
2737
2739
|
};
|
|
2738
|
-
const Mn = /* @__PURE__ */ ao(pn, [["__scopeId", "data-v-7e702a8a"]]),
|
|
2740
|
+
const Mn = /* @__PURE__ */ ao(pn, [["__scopeId", "data-v-7e702a8a"]]), Un = {
|
|
2739
2741
|
install(e) {
|
|
2740
2742
|
e.component("st-virtualTable", Mn);
|
|
2741
2743
|
}
|
|
2742
2744
|
};
|
|
2743
2745
|
export {
|
|
2744
|
-
|
|
2746
|
+
Un as default
|
|
2745
2747
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
|
|
1
|
+
import { n as O, p as y } from "./el-scrollbar-09769d9e.js";
|
|
2
|
+
import { i as p, a as m, b as x, o as w, U as i } from "./index-5b62ea0e.js";
|
|
3
|
+
import { a as v, r as P } from "./index-34048a1d.js";
|
|
4
|
+
var u = Object.create, b = function() {
|
|
4
5
|
function e() {
|
|
5
6
|
}
|
|
6
7
|
return function(n) {
|
|
7
8
|
if (!v(n))
|
|
8
9
|
return {};
|
|
9
|
-
if (
|
|
10
|
-
return
|
|
10
|
+
if (u)
|
|
11
|
+
return u(n);
|
|
11
12
|
e.prototype = n;
|
|
12
13
|
var r = new e();
|
|
13
14
|
return e.prototype = void 0, r;
|
|
14
15
|
};
|
|
15
16
|
}();
|
|
16
17
|
const A = b;
|
|
17
|
-
function
|
|
18
|
+
function q(e, n) {
|
|
18
19
|
var r = -1, t = e.length;
|
|
19
20
|
for (n || (n = Array(t)); ++r < t; )
|
|
20
21
|
n[r] = e[r];
|
|
21
22
|
return n;
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function D(e, n, r, t) {
|
|
24
25
|
var g = !r;
|
|
25
26
|
r || (r = {});
|
|
26
27
|
for (var a = -1, h = n.length; ++a < h; ) {
|
|
@@ -36,22 +37,22 @@ function C(e) {
|
|
|
36
37
|
n.push(r);
|
|
37
38
|
return n;
|
|
38
39
|
}
|
|
39
|
-
var
|
|
40
|
-
function
|
|
40
|
+
var U = Object.prototype, I = U.hasOwnProperty;
|
|
41
|
+
function K(e) {
|
|
41
42
|
if (!v(e))
|
|
42
43
|
return C(e);
|
|
43
44
|
var n = p(e), r = [];
|
|
44
45
|
for (var t in e)
|
|
45
|
-
t == "constructor" && (n || !
|
|
46
|
+
t == "constructor" && (n || !I.call(e, t)) || r.push(t);
|
|
46
47
|
return r;
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
49
|
+
function F(e) {
|
|
50
|
+
return m(e) ? x(e, !0) : K(e);
|
|
50
51
|
}
|
|
51
52
|
var L = w(Object.getPrototypeOf, Object);
|
|
52
53
|
const T = L;
|
|
53
54
|
var d = typeof exports == "object" && exports && !exports.nodeType && exports, f = d && typeof module == "object" && module && !module.nodeType && module, B = f && f.exports === d, l = B ? P.Buffer : void 0, c = l ? l.allocUnsafe : void 0;
|
|
54
|
-
function
|
|
55
|
+
function G(e, n) {
|
|
55
56
|
if (n)
|
|
56
57
|
return e.slice();
|
|
57
58
|
var r = e.length, t = c ? c(r) : new e.constructor(r);
|
|
@@ -59,22 +60,22 @@ function q(e, n) {
|
|
|
59
60
|
}
|
|
60
61
|
function E(e) {
|
|
61
62
|
var n = new e.constructor(e.byteLength);
|
|
62
|
-
return new
|
|
63
|
+
return new i(n).set(new i(e)), n;
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function H(e, n) {
|
|
65
66
|
var r = n ? E(e.buffer) : e.buffer;
|
|
66
67
|
return new e.constructor(r, e.byteOffset, e.length);
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function J(e) {
|
|
69
70
|
return typeof e.constructor == "function" && !p(e) ? A(T(e)) : {};
|
|
70
71
|
}
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
E as a,
|
|
74
|
+
H as b,
|
|
75
|
+
D as c,
|
|
76
|
+
q as d,
|
|
77
|
+
G as e,
|
|
77
78
|
T as g,
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
J as i,
|
|
80
|
+
F as k
|
|
80
81
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=require("./el-scrollbar-05815cf5.cjs"),o=require("./index-ca7dbd47.cjs"),f=require("./index-9780a537.cjs");var a=Object.create,P=function(){function e(){}return function(n){if(!f.isObject(n))return{};if(a)return a(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();const w=P;function A(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}function b(e,n,r,t){var O=!r;r||(r={});for(var s=-1,h=n.length;++s<h;){var i=n[s],u=t?t(r[i],e[i],i,r,e):void 0;u===void 0&&(u=e[i]),O?c.baseAssignValue(r,i,u):c.assignValue(r,i,u)}return r}function x(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var C=Object.prototype,B=C.hasOwnProperty;function I(e){if(!f.isObject(e))return x(e);var n=o.isPrototype(e),r=[];for(var t in e)t=="constructor"&&(n||!B.call(e,t))||r.push(t);return r}function T(e){return o.isArrayLike(e)?o.arrayLikeKeys(e,!0):I(e)}var U=o.overArg(Object.getPrototypeOf,Object);const y=U;var d=typeof exports=="object"&&exports&&!exports.nodeType&&exports,l=d&&typeof module=="object"&&module&&!module.nodeType&&module,q=l&&l.exports===d,v=q?f.root.Buffer:void 0,p=v?v.allocUnsafe:void 0;function K(e,n){if(n)return e.slice();var r=e.length,t=p?p(r):new e.constructor(r);return e.copy(t),t}function g(e){var n=new e.constructor(e.byteLength);return new o.Uint8Array(n).set(new o.Uint8Array(e)),n}function L(e,n){var r=n?g(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function $(e){return typeof e.constructor=="function"&&!o.isPrototype(e)?w(y(e)):{}}exports.cloneArrayBuffer=g;exports.cloneBuffer=K;exports.cloneTypedArray=L;exports.copyArray=A;exports.copyObject=b;exports.getPrototype=y;exports.initCloneObject=$;exports.keysIn=T;
|
|
@@ -239,50 +239,50 @@ const Qt = (t, e) => {
|
|
|
239
239
|
n.directive(e, t);
|
|
240
240
|
}, t), Yt = (t) => (t.install = X, t);
|
|
241
241
|
export {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
242
|
+
Ct as A,
|
|
243
|
+
Zt as B,
|
|
244
|
+
At as C,
|
|
245
|
+
Nt as D,
|
|
246
|
+
Tt as E,
|
|
247
|
+
xt as F,
|
|
248
|
+
V as G,
|
|
249
|
+
O as H,
|
|
250
|
+
ht as I,
|
|
251
|
+
Ft as J,
|
|
252
|
+
Bt as K,
|
|
253
|
+
zt as L,
|
|
254
|
+
It as M,
|
|
255
255
|
X as N,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
Ot as O,
|
|
257
|
+
jt as P,
|
|
258
|
+
Rt as Q,
|
|
259
|
+
Z as R,
|
|
260
|
+
Dt as S,
|
|
261
261
|
Ut as _,
|
|
262
|
-
|
|
262
|
+
P as a,
|
|
263
263
|
Mt as b,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
264
|
+
w as c,
|
|
265
|
+
Lt as d,
|
|
266
|
+
A as e,
|
|
267
|
+
at as f,
|
|
268
|
+
Vt as g,
|
|
269
|
+
_ as h,
|
|
270
|
+
bt as i,
|
|
271
|
+
Ht as j,
|
|
272
|
+
Gt as k,
|
|
273
|
+
Jt as l,
|
|
274
|
+
Et as m,
|
|
275
|
+
Xt as n,
|
|
276
|
+
Q as o,
|
|
277
|
+
g as p,
|
|
278
|
+
St as q,
|
|
279
279
|
Wt as r,
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
ot as s,
|
|
281
|
+
rt as t,
|
|
282
282
|
$t as u,
|
|
283
|
-
|
|
283
|
+
qt as v,
|
|
284
284
|
Qt as w,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
Kt as x,
|
|
286
|
+
Yt as y,
|
|
287
|
+
b as z
|
|
288
288
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),s=require("./use-global-config-c2c5ca8f.cjs"),u=require("./index-ca7dbd47.cjs"),e=require("./base-ef747d02.cjs"),d=require("./el-scrollbar-05815cf5.cjs"),c=e.buildProps({a11y:{type:Boolean,default:!0},locale:{type:e.definePropType(Object)},size:d.useSizeProp,button:{type:e.definePropType(Object)},card:{type:e.definePropType(Object)},dialog:{type:e.definePropType(Object)},link:{type:e.definePropType(Object)},experimentalFeatures:{type:e.definePropType(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:e.definePropType(Object)},zIndex:Number,namespace:{type:String,default:"el"},...u.useEmptyValuesProps}),a={placement:"top"},f=t.defineComponent({name:"ElConfigProvider",props:c,setup(n,{slots:l}){const o=s.provideGlobalConfig(n);return t.watch(()=>n.message,r=>{var i,p;Object.assign(a,(p=(i=o==null?void 0:o.value)==null?void 0:i.message)!=null?p:{},r??{})},{immediate:!0,deep:!0}),()=>t.renderSlot(l,"default",{config:o==null?void 0:o.value})}});exports.ConfigProvider=f;exports.messageConfig=a;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineComponent as p, watch as s, renderSlot as l } from "vue";
|
|
2
|
-
import { p as u } from "./use-global-config-
|
|
3
|
-
import {
|
|
4
|
-
import { b as
|
|
5
|
-
|
|
2
|
+
import { p as u } from "./use-global-config-1923bb6f.js";
|
|
3
|
+
import { u as m } from "./index-5b62ea0e.js";
|
|
4
|
+
import { b as d, d as e } from "./base-f5b11441.js";
|
|
5
|
+
import { u as c } from "./el-scrollbar-09769d9e.js";
|
|
6
|
+
const f = d({
|
|
6
7
|
a11y: {
|
|
7
8
|
type: Boolean,
|
|
8
9
|
default: !0
|
|
@@ -10,7 +11,7 @@ const f = c({
|
|
|
10
11
|
locale: {
|
|
11
12
|
type: e(Object)
|
|
12
13
|
},
|
|
13
|
-
size:
|
|
14
|
+
size: c,
|
|
14
15
|
button: {
|
|
15
16
|
type: e(Object)
|
|
16
17
|
},
|
|
@@ -38,10 +39,10 @@ const f = c({
|
|
|
38
39
|
type: String,
|
|
39
40
|
default: "el"
|
|
40
41
|
},
|
|
41
|
-
...
|
|
42
|
+
...m
|
|
42
43
|
}), b = {
|
|
43
44
|
placement: "top"
|
|
44
|
-
},
|
|
45
|
+
}, P = p({
|
|
45
46
|
name: "ElConfigProvider",
|
|
46
47
|
props: f,
|
|
47
48
|
setup(o, { slots: i }) {
|
|
@@ -53,6 +54,6 @@ const f = c({
|
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
P as C,
|
|
57
58
|
b as m
|
|
58
59
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as L, a as v, r as M } from "./index-34048a1d.js";
|
|
2
2
|
var N = /\s/;
|
|
3
3
|
function $(n) {
|
|
4
4
|
for (var r = n.length; r-- && N.test(n.charAt(r)); )
|
|
@@ -31,23 +31,23 @@ var H = function() {
|
|
|
31
31
|
const h = H;
|
|
32
32
|
var P = "Expected a function", U = Math.max, X = Math.min;
|
|
33
33
|
function z(n, r, t) {
|
|
34
|
-
var u,
|
|
34
|
+
var u, c, l, s, i, f, o = 0, p = !1, d = !1, T = !0;
|
|
35
35
|
if (typeof n != "function")
|
|
36
36
|
throw new TypeError(P);
|
|
37
37
|
r = S(r) || 0, v(t) && (p = !!t.leading, d = "maxWait" in t, l = d ? U(S(t.maxWait) || 0, r) : l, T = "trailing" in t ? !!t.trailing : T);
|
|
38
38
|
function x(e) {
|
|
39
|
-
var a = u, m =
|
|
40
|
-
return u =
|
|
39
|
+
var a = u, m = c;
|
|
40
|
+
return u = c = void 0, o = e, s = n.apply(m, a), s;
|
|
41
41
|
}
|
|
42
42
|
function W(e) {
|
|
43
|
-
return
|
|
43
|
+
return o = e, i = setTimeout(g, r), p ? x(e) : s;
|
|
44
44
|
}
|
|
45
45
|
function O(e) {
|
|
46
|
-
var a = e - f, m = e -
|
|
46
|
+
var a = e - f, m = e - o, E = r - a;
|
|
47
47
|
return d ? X(E, l - m) : E;
|
|
48
48
|
}
|
|
49
49
|
function y(e) {
|
|
50
|
-
var a = e - f, m = e -
|
|
50
|
+
var a = e - f, m = e - o;
|
|
51
51
|
return f === void 0 || a >= r || a < 0 || d && m >= l;
|
|
52
52
|
}
|
|
53
53
|
function g() {
|
|
@@ -57,17 +57,17 @@ function z(n, r, t) {
|
|
|
57
57
|
i = setTimeout(g, O(e));
|
|
58
58
|
}
|
|
59
59
|
function b(e) {
|
|
60
|
-
return i = void 0, T && u ? x(e) : (u =
|
|
60
|
+
return i = void 0, T && u ? x(e) : (u = c = void 0, s);
|
|
61
61
|
}
|
|
62
62
|
function A() {
|
|
63
|
-
i !== void 0 && clearTimeout(i),
|
|
63
|
+
i !== void 0 && clearTimeout(i), o = 0, u = f = c = i = void 0;
|
|
64
64
|
}
|
|
65
65
|
function C() {
|
|
66
66
|
return i === void 0 ? s : b(h());
|
|
67
67
|
}
|
|
68
68
|
function I() {
|
|
69
69
|
var e = h(), a = y(e);
|
|
70
|
-
if (u = arguments,
|
|
70
|
+
if (u = arguments, c = this, f = e, a) {
|
|
71
71
|
if (i === void 0)
|
|
72
72
|
return W(f);
|
|
73
73
|
if (d)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./index-
|
|
1
|
+
"use strict";const l=require("./index-9780a537.cjs");var C=/\s/;function L(e){for(var i=e.length;i--&&C.test(e.charAt(i)););return i}var M=/^\s+/;function $(e){return e&&e.slice(0,L(e)+1).replace(M,"")}var k=0/0,j=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,R=/^0o[0-7]+$/i,F=parseInt;function v(e){if(typeof e=="number")return e;if(l.isSymbol(e))return k;if(l.isObject(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=l.isObject(i)?i+"":i}if(typeof e!="string")return e===0?e:+e;e=$(e);var t=B.test(e);return t||R.test(e)?F(e.slice(2),t?2:8):j.test(e)?k:+e}var _=function(){return l.root.Date.now()};const h=_;var q="Expected a function",D=Math.max,H=Math.min;function P(e,i,t){var u,s,g,c,r,f,o=0,y=!1,d=!1,x=!0;if(typeof e!="function")throw new TypeError(q);i=v(i)||0,l.isObject(t)&&(y=!!t.leading,d="maxWait"in t,g=d?D(v(t.maxWait)||0,i):g,x="trailing"in t?!!t.trailing:x);function b(n){var a=u,m=s;return u=s=void 0,o=n,c=e.apply(m,a),c}function S(n){return o=n,r=setTimeout(T,i),y?b(n):c}function W(n){var a=n-f,m=n-o,O=i-a;return d?H(O,g-m):O}function E(n){var a=n-f,m=n-o;return f===void 0||a>=i||a<0||d&&m>=g}function T(){var n=h();if(E(n))return p(n);r=setTimeout(T,W(n))}function p(n){return r=void 0,x&&u?b(n):(u=s=void 0,c)}function N(){r!==void 0&&clearTimeout(r),o=0,u=f=s=r=void 0}function A(){return r===void 0?c:p(h())}function I(){var n=h(),a=E(n);if(u=arguments,s=this,f=n,a){if(r===void 0)return S(f);if(d)return clearTimeout(r),r=setTimeout(T,i),b(f)}return r===void 0&&(r=setTimeout(T,i)),c}return I.cancel=N,I.flush=A,I}exports.debounce=P;exports.toNumber=v;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as g, b as E,
|
|
3
|
-
import { i as L } from "./el-scrollbar-
|
|
4
|
-
import { defineComponent as y, renderSlot as T, ref as I, provide as C, inject as $, onMounted as
|
|
1
|
+
import { c as f, e, a as _, r as b } from "./el-popper-ee1f8186.js";
|
|
2
|
+
import { _ as g, b as E, d as o } from "./base-f5b11441.js";
|
|
3
|
+
import { i as L } from "./el-scrollbar-09769d9e.js";
|
|
4
|
+
import { defineComponent as y, renderSlot as T, ref as I, provide as C, inject as $, onMounted as v, unref as m, onBeforeUnmount as h } from "vue";
|
|
5
5
|
const w = y({
|
|
6
6
|
inheritAttrs: !1
|
|
7
7
|
});
|
|
@@ -42,13 +42,13 @@ const x = "data-el-collection-item", Y = (n) => {
|
|
|
42
42
|
const p = I(), s = $(l, void 0);
|
|
43
43
|
C(a, {
|
|
44
44
|
collectionItemRef: p
|
|
45
|
-
}),
|
|
45
|
+
}), v(() => {
|
|
46
46
|
const t = m(p);
|
|
47
47
|
t && s.itemMap.set(t, {
|
|
48
48
|
ref: t,
|
|
49
49
|
...c
|
|
50
50
|
});
|
|
51
|
-
}),
|
|
51
|
+
}), h(() => {
|
|
52
52
|
const t = m(p);
|
|
53
53
|
s.itemMap.delete(t);
|
|
54
54
|
});
|
|
@@ -153,11 +153,11 @@ const x = "data-el-collection-item", Y = (n) => {
|
|
|
153
153
|
}
|
|
154
154
|
}), z = E({
|
|
155
155
|
onKeydown: { type: o(Function) }
|
|
156
|
-
}),
|
|
156
|
+
}), R = [
|
|
157
157
|
e.down,
|
|
158
158
|
e.pageDown,
|
|
159
159
|
e.home
|
|
160
|
-
],
|
|
160
|
+
], j = [e.up, e.pageUp, e.end], G = [...R, ...j], {
|
|
161
161
|
ElCollection: H,
|
|
162
162
|
ElCollectionItem: W,
|
|
163
163
|
COLLECTION_INJECTION_KEY: Q,
|
|
@@ -167,7 +167,7 @@ export {
|
|
|
167
167
|
X as C,
|
|
168
168
|
H as E,
|
|
169
169
|
G as F,
|
|
170
|
-
|
|
170
|
+
j as L,
|
|
171
171
|
q as a,
|
|
172
172
|
x as b,
|
|
173
173
|
Y as c,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./el-popper-
|
|
1
|
+
"use strict";const e=require("./el-popper-c9e0136d.cjs"),o=require("./base-ef747d02.cjs"),O=require("./el-scrollbar-05815cf5.cjs"),t=require("vue"),N=t.defineComponent({inheritAttrs:!1});function y(r,l,c,i,d,E){return t.renderSlot(r.$slots,"default")}var g=o._export_sfc(N,[["render",y],["__file","collection.vue"]]);const S=t.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function P(r,l,c,i,d,E){return t.renderSlot(r.$slots,"default")}var L=o._export_sfc(S,[["render",P],["__file","collection-item.vue"]]);const f="data-el-collection-item",T=r=>{const l=`El${r}Collection`,c=`${l}Item`,i=Symbol(l),d=Symbol(c),E={...g,name:l,setup(){const a=t.ref(),u=new Map,p=()=>{const s=t.unref(a);if(!s)return[];const n=Array.from(s.querySelectorAll(`[${f}]`));return[...u.values()].sort((I,m)=>n.indexOf(I.ref)-n.indexOf(m.ref))};t.provide(i,{itemMap:u,getItems:p,collectionRef:a})}},C={...L,name:c,setup(a,{attrs:u}){const p=t.ref(),s=t.inject(i,void 0);t.provide(d,{collectionItemRef:p}),t.onMounted(()=>{const n=t.unref(p);n&&s.itemMap.set(n,{ref:n,...u})}),t.onBeforeUnmount(()=>{const n=t.unref(p);s.itemMap.delete(n)})}};return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:d,ElCollection:E,ElCollectionItem:C}},b=o.buildProps({trigger:e.useTooltipTriggerProps.trigger,triggerKeys:{type:o.definePropType(Array),default:()=>[e.EVENT_CODE.enter,e.EVENT_CODE.numpadEnter,e.EVENT_CODE.space,e.EVENT_CODE.down]},virtualTriggering:e.useTooltipTriggerProps.virtualTriggering,virtualRef:e.useTooltipTriggerProps.virtualRef,effect:{...e.useTooltipContentProps.effect,default:"light"},type:{type:o.definePropType(String)},placement:{type:o.definePropType(String),default:"bottom"},popperOptions:{type:o.definePropType(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:o.definePropType([Number,String]),default:0},maxHeight:{type:o.definePropType([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,values:e.roleTypes,default:"menu"},buttonProps:{type:o.definePropType(Object)},teleported:e.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0}}),v=o.buildProps({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:O.iconPropType}}),w=o.buildProps({onKeydown:{type:o.definePropType(Function)}}),M=[e.EVENT_CODE.down,e.EVENT_CODE.pageDown,e.EVENT_CODE.home],_=[e.EVENT_CODE.up,e.EVENT_CODE.pageUp,e.EVENT_CODE.end],$=[...M,..._],{ElCollection:h,ElCollectionItem:K,COLLECTION_INJECTION_KEY:A,COLLECTION_ITEM_INJECTION_KEY:D}=T("Dropdown");exports.COLLECTION_INJECTION_KEY=A;exports.COLLECTION_ITEM_INJECTION_KEY=D;exports.COLLECTION_ITEM_SIGN=f;exports.ElCollection=h;exports.ElCollectionItem=K;exports.FIRST_LAST_KEYS=$;exports.LAST_KEYS=_;exports.createCollectionWithScope=T;exports.dropdownItemProps=v;exports.dropdownMenuProps=w;exports.dropdownProps=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),M=require("./el-scrollbar-05815cf5.cjs"),q=require("./index-eab8a286.cjs"),S=require("./el-input-06243b61.cjs"),a=require("./el-popper-c9e0136d.cjs"),n=require("./base-ef747d02.cjs"),se=require("./index-9780a537.cjs"),re=require("./debounce-62f5b6e8.cjs"),ae=n.buildProps({...S.inputProps,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:n.definePropType(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:n.definePropType([Function,Array]),default:n.NOOP},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:a.useTooltipContentProps.teleported,appendTo:a.useTooltipContentProps.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),ue={[a.UPDATE_MODEL_EVENT]:s=>n.isString(s)||n.isNumber(s),[a.INPUT_EVENT]:s=>n.isString(s)||n.isNumber(s),[a.CHANGE_EVENT]:s=>n.isString(s)||n.isNumber(s),focus:s=>s instanceof FocusEvent,blur:s=>s instanceof FocusEvent,clear:()=>!0,select:s=>n.isObject(s)},U="ElAutocomplete",ie=e.defineComponent({name:U,inheritAttrs:!1}),ce=e.defineComponent({...ie,props:ae,emits:ue,setup(s,{expose:z,emit:d}){const u=s,L=e.computed(()=>a.pick(u,Object.keys(S.inputProps))),R=e.useAttrs(),T=M.useFormDisabled(),i=n.useNamespace("autocomplete"),f=e.ref(),$=e.ref(),y=e.ref(),A=e.ref();let V=!1,C=!1;const p=e.ref([]),r=e.ref(-1),P=e.ref(""),v=e.ref(!1),E=e.ref(!1),h=e.ref(!1),m=se.useId(),W=e.computed(()=>R.style),g=e.computed(()=>(p.value.length>0||h.value)&&v.value),I=e.computed(()=>!u.hideLoading&&h.value),H=e.computed(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),G=()=>{g.value&&(P.value=`${f.value.$el.offsetWidth}px`)},j=()=>{r.value=-1},_=async t=>{if(E.value)return;const o=l=>{h.value=!1,!E.value&&(n.isArray(l)?(p.value=l,r.value=u.highlightFirstItem?0:-1):a.throwError(U,"autocomplete suggestions must be an array"))};if(h.value=!0,n.isArray(u.fetchSuggestions))o(u.fetchSuggestions);else{const l=await u.fetchSuggestions(t,o);n.isArray(l)&&o(l)}},B=re.debounce(_,u.debounce),x=t=>{const o=!!t;if(d(a.INPUT_EVENT,t),d(a.UPDATE_MODEL_EVENT,t),E.value=!1,v.value||(v.value=o),!u.triggerOnFocus&&!t){E.value=!0,p.value=[];return}B(t)},J=t=>{var o;T.value||(((o=t.target)==null?void 0:o.tagName)!=="INPUT"||H.value.includes(document.activeElement))&&(v.value=!0)},Q=t=>{d(a.CHANGE_EVENT,t)},X=t=>{var o;if(C)C=!1;else{v.value=!0,d("focus",t);const l=(o=u.modelValue)!=null?o:"";u.triggerOnFocus&&!V&&B(String(l))}},Y=t=>{setTimeout(()=>{var o;if((o=y.value)!=null&&o.isFocusInsideContent()){C=!0;return}v.value&&b(),d("blur",t)})},Z=()=>{v.value=!1,d(a.UPDATE_MODEL_EVENT,""),d("clear")},D=async()=>{var t;(t=f.value)!=null&&t.isComposing||(g.value&&r.value>=0&&r.value<p.value.length?w(p.value[r.value]):u.selectWhenUnmatched&&(d("select",{value:u.modelValue}),p.value=[],r.value=-1))},ee=t=>{g.value&&(t.preventDefault(),t.stopPropagation(),b())},b=()=>{v.value=!1},te=()=>{var t;(t=f.value)==null||t.focus()},oe=()=>{var t;(t=f.value)==null||t.blur()},w=async t=>{d(a.INPUT_EVENT,t[u.valueKey]),d(a.UPDATE_MODEL_EVENT,t[u.valueKey]),d("select",t),p.value=[],r.value=-1},k=t=>{var o,l;if(!g.value||h.value)return;if(t<0){r.value=-1;return}t>=p.value.length&&(t=p.value.length-1);const c=$.value.querySelector(`.${i.be("suggestion","wrap")}`),ne=c.querySelectorAll(`.${i.be("suggestion","list")} li`)[t],O=c.scrollTop,{offsetTop:K,scrollHeight:N}=ne;K+N>O+c.clientHeight&&(c.scrollTop+=N),K<O&&(c.scrollTop-=N),r.value=t,(l=(o=f.value)==null?void 0:o.ref)==null||l.setAttribute("aria-activedescendant",`${m.value}-item-${r.value}`)},F=M.onClickOutside(A,()=>{var t;(t=y.value)!=null&&t.isFocusInsideContent()||g.value&&b()});return e.onBeforeUnmount(()=>{F==null||F()}),e.onMounted(()=>{var t;const o=(t=f.value)==null?void 0:t.ref;o&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:"id"},{key:"aria-activedescendant",value:`${m.value}-item-${r.value}`}].forEach(({key:l,value:c})=>o.setAttribute(l,c)),V=o.hasAttribute("readonly"))}),z({highlightedIndex:r,activated:v,loading:h,inputRef:f,popperRef:y,suggestions:p,handleSelect:w,handleKeyEnter:D,focus:te,blur:oe,close:b,highlight:k,getData:_}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(a.ElTooltip),{ref_key:"popperRef",ref:y,visible:e.unref(g),placement:t.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[e.unref(i).e("popper"),t.popperClass],teleported:t.teleported,"append-to":t.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${e.unref(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:G,onHide:j},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"regionRef",ref:$,class:e.normalizeClass([e.unref(i).b("suggestion"),e.unref(i).is("loading",e.unref(I))]),style:e.normalizeStyle({[t.fitInputWidth?"width":"minWidth"]:P.value,outline:"none"}),role:"region"},[t.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).be("suggestion","header")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"header")],10,["onClick"])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(a.ElScrollbar),{id:e.unref(m),tag:"ul","wrap-class":e.unref(i).be("suggestion","wrap"),"view-class":e.unref(i).be("suggestion","list"),role:"listbox"},{default:e.withCtx(()=>[e.unref(I)?(e.openBlock(),e.createElementBlock("li",{key:0},[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(q.ElIcon),{class:e.normalizeClass(e.unref(i).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(q.loading_default))]),_:1},8,["class"])])])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,(l,c)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(m)}-item-${c}`,key:c,class:e.normalizeClass({highlighted:r.value===c}),role:"option","aria-selected":r.value===c,onClick:le=>w(l)},[e.renderSlot(t.$slots,"default",{item:l},()=>[e.createTextVNode(e.toDisplayString(l[t.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(i).be("suggestion","footer")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"footer")],10,["onClick"])):e.createCommentVNode("v-if",!0)],6)]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"listboxRef",ref:A,class:e.normalizeClass([e.unref(i).b(),t.$attrs.class]),style:e.normalizeStyle(e.unref(W)),role:"combobox","aria-haspopup":"listbox","aria-expanded":e.unref(g),"aria-owns":e.unref(m)},[e.createVNode(e.unref(S.ElInput),e.mergeProps({ref_key:"inputRef",ref:f},e.mergeProps(e.unref(L),t.$attrs),{"model-value":t.modelValue,disabled:e.unref(T),onInput:x,onChange:Q,onFocus:X,onBlur:Y,onClear:Z,onKeydown:[e.withKeys(e.withModifiers(l=>k(r.value-1),["prevent"]),["up"]),e.withKeys(e.withModifiers(l=>k(r.value+1),["prevent"]),["down"]),e.withKeys(D,["enter"]),e.withKeys(b,["tab"]),e.withKeys(ee,["esc"])],onMousedown:J}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")])}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")])}:void 0,t.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")])}:void 0,t.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var de=n._export_sfc(ce,[["__file","autocomplete.vue"]]);const pe=n.withInstall(de);exports.ElAutocomplete=pe;
|