st-comp 0.0.248 → 0.0.249
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/components.d.ts +1 -0
- package/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +82 -80
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +36 -35
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +20 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +83 -82
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +19 -18
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +22 -21
- package/es/LinearLegend.cjs +1 -1
- package/es/LinearLegend.js +63 -1
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +28 -26
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +121 -120
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +31 -30
- package/es/User.cjs +1 -1
- package/es/User.js +157 -155
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +29 -27
- package/es/VarietyAiHelper.cjs +4 -0
- package/es/VarietyAiHelper.js +270 -0
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +13 -12
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +70 -68
- package/es/{VarietySelect-2fd501da.cjs → VarietySelect-5c845562.cjs} +1 -1
- package/es/{VarietySelect-b9fe3000.js → VarietySelect-9f267958.js} +4 -4
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +24 -22
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +70 -70
- package/es/{_initCloneObject-3823a101.cjs → _initCloneObject-2b82e9f7.cjs} +1 -1
- package/es/{_initCloneObject-382335b2.js → _initCloneObject-69c8ae23.js} +7 -7
- package/es/aiTools.js +36 -0
- package/es/{base-ff0e366f.js → base-29f73b05.js} +40 -40
- package/es/{castArray-15070be9.js → castArray-609a313e.js} +1 -1
- package/es/{config-provider-2182708a.cjs → config-provider-2ae47cc8.cjs} +1 -1
- package/es/{config-provider-2e85eee8.js → config-provider-7860903c.js} +6 -6
- package/es/{debounce-e9e47f9a.js → debounce-a09ce9a3.js} +1 -1
- package/es/{dropdown-2b35a683.js → dropdown-497442b7.js} +30 -29
- package/es/dropdown-eba9eaf5.cjs +1 -0
- package/es/{el-autocomplete-18be2c5a.js → el-autocomplete-27c60cc8.js} +24 -23
- package/es/el-autocomplete-b59eb529.cjs +1 -0
- package/es/{el-button-68baab7b.cjs → el-button-974ff9e9.cjs} +1 -1
- package/es/{el-button-f08c0639.js → el-button-e2c63c08.js} +39 -39
- package/es/el-checkbox-08185353.cjs +1 -0
- package/es/{el-checkbox-058dba2d.js → el-checkbox-71ebd862.js} +31 -31
- package/es/el-dialog-1b185570.cjs +1 -0
- package/es/{el-dialog-d328e0d8.js → el-dialog-eedcfd3e.js} +15 -15
- package/es/{el-divider-4fe55ebe.js → el-divider-523e5874.js} +1 -1
- package/es/{el-empty-ceecb81c.js → el-empty-f5a1607a.js} +5 -5
- package/es/{el-form-item-cb328886.js → el-form-item-bdcfd297.js} +36 -36
- package/es/{el-form-item-4076e55f.cjs → el-form-item-c997b4fa.cjs} +1 -1
- package/es/{el-input-0f6ead19.js → el-input-d47281da.js} +91 -91
- package/es/el-input-fa18ef84.cjs +1 -0
- package/es/el-input-number-3d94fa58.cjs +1 -0
- package/es/{el-input-number-66e68609.js → el-input-number-c8018cb1.js} +28 -28
- package/es/{el-loading-412370c7.js → el-loading-0cd81d05.js} +5 -5
- package/es/{el-loading-05826e64.cjs → el-loading-969a79ca.cjs} +1 -1
- package/es/el-menu-item-26071fd6.cjs +1 -0
- package/es/{el-menu-item-0ee8ad18.js → el-menu-item-dac65bb3.js} +31 -30
- package/es/el-message-0ea8fbf8.cjs +1 -0
- package/es/el-message-4ed993c7.js +1 -0
- package/es/el-message-box-31e0aa98.cjs +1 -0
- package/es/{el-message-box-6db52b29.js → el-message-box-fea4fca8.js} +11 -11
- package/es/{el-overlay-981f8d49.js → el-overlay-1ee0338d.js} +63 -63
- package/es/el-overlay-ea65cb05.cjs +1 -0
- package/es/{el-popconfirm-005013fa.js → el-popconfirm-089b8bec.js} +17 -16
- package/es/el-popconfirm-9e232436.cjs +1 -0
- package/es/el-popper-2d3914e4.cjs +1 -0
- package/es/el-popper-c9b3d3cf.js +1662 -0
- package/es/el-segmented-140ac042.cjs +1 -0
- package/es/{el-segmented-050d0090.js → el-segmented-9d3a9e11.js} +8 -8
- package/es/el-select-a11f33e8.cjs +1 -0
- package/es/{el-select-23a1f302.js → el-select-e51e11c1.js} +92 -91
- package/es/{el-table-column-d0c374cf.js → el-table-column-05d292a8.js} +25 -24
- package/es/el-table-column-98570a4d.cjs +14 -0
- package/es/{el-tag-f13f463b.js → el-tag-17cd04a1.js} +14 -14
- package/es/el-tag-6d8e653e.cjs +1 -0
- package/es/{el-text-27cef2be.js → el-text-2710fff3.js} +2 -2
- package/es/{el-text-1470de46.cjs → el-text-a18106cb.cjs} +1 -1
- package/es/{index-09bd2621.js → index-0ee486ad.js} +43 -43
- package/es/index-0f79095c.js +440 -0
- package/es/{index-e0901394.js → index-1d9b50de.js} +34 -34
- package/es/index-28e03bad.cjs +1 -0
- package/es/{index-269b22da.cjs → index-299ee017.cjs} +1 -1
- package/es/{index-cebc7160.cjs → index-33f80550.cjs} +1 -1
- package/es/{index-4f48940d.cjs → index-37b8d3c6.cjs} +1 -1
- package/es/{index-2375023e.cjs → index-5befc414.cjs} +4 -4
- package/es/{index-696b6a94.cjs → index-6b99def3.cjs} +1 -1
- package/es/index-6ca95c8a.cjs +1 -0
- package/es/index-7dce9f59.cjs +1 -0
- package/es/{index-269b8a8c.js → index-8391a3df.js} +37 -37
- package/es/{index-c266c23a.js → index-8f9d0d17.js} +16 -15
- package/es/{index-15b9603e.js → index-95e5d454.js} +3 -3
- package/es/{index-b937ea22.js → index-b0117ba2.js} +2 -2
- package/es/{index-80a7ad32.js → index-bcd895a0.js} +17 -17
- package/es/{index-ec7ad93f.js → index-c2b9bbfd.js} +95 -65
- package/es/{index-4a3f30c5.js → index-c71e37dc.js} +11 -11
- package/es/{index-93a8960e.js → index-de24705f.js} +1 -1
- package/es/index-e8eeea22.cjs +1 -0
- package/es/{index-ee977f79.cjs → index-eb99b188.cjs} +1 -1
- package/es/{el-message-e6c755df.js → index-f30561d3.js} +33 -33
- package/es/{python-c67c8901.cjs → python-27ece6fa.cjs} +2 -2
- package/es/{python-823b276b.js → python-656db04f.js} +30 -28
- package/es/raf-744cf95a.js +6 -0
- package/es/{scroll-41b4f625.js → scroll-6799bafc.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-631cacae.js → use-form-common-props-cb0ca65c.js} +72 -72
- package/es/{use-form-common-props-344056f9.cjs → use-form-common-props-d3ed62c6.cjs} +1 -1
- package/es/{use-global-config-cf78ebac.cjs → use-global-config-c80f33a4.cjs} +1 -1
- package/es/{use-global-config-5d001623.js → use-global-config-cdaeca54.js} +14 -14
- package/es/{validator-3cad04b2.cjs → validator-07160325.cjs} +1 -1
- package/es/{validator-4160d9e7.js → validator-4ab9774f.js} +1 -1
- package/es/{vnode-06571d5b.js → vnode-a83e6de8.js} +1 -1
- package/es/{zh-cn-aabfaa94.cjs → zh-cn-6a0f844c.cjs} +1 -1
- package/es/{zh-cn-5df98ac2.js → zh-cn-8a6390a4.js} +2 -2
- package/lib/aiTools.js +36 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +157 -154
- package/lib/{index-f00d1e1f.js → index-6ac0579e.js} +16077 -15806
- package/lib/{python-0f34e2e6.js → python-0432340a.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAiHelper/index.ts +8 -0
- package/packages/VarietyAiHelper/index.vue +430 -0
- package/packages/index.ts +2 -0
- package/public/aiTools.js +36 -0
- package/src/App.vue +24 -14
- package/src/pages/VarietyAiHelper/index.vue +20 -0
- package/src/pages/VarietySearch/index.vue +75 -51
- package/src/router/routes.ts +5 -0
- package/es/dropdown-89b74bc9.cjs +0 -1
- package/es/el-autocomplete-b9a3054a.cjs +0 -1
- package/es/el-checkbox-b982e2ef.cjs +0 -1
- package/es/el-dialog-ad7309e9.cjs +0 -1
- package/es/el-input-172c49f8.cjs +0 -1
- package/es/el-input-number-c2e71528.cjs +0 -1
- package/es/el-menu-item-7f986598.cjs +0 -1
- package/es/el-message-a86c0efa.cjs +0 -1
- package/es/el-message-box-40ff2af5.cjs +0 -1
- package/es/el-overlay-d7a6e4a9.cjs +0 -1
- package/es/el-popconfirm-737a015b.cjs +0 -1
- package/es/el-popper-7ba87e05.cjs +0 -1
- package/es/el-popper-fdc7c793.js +0 -2094
- package/es/el-segmented-3fd66a0e.cjs +0 -1
- package/es/el-select-12f6deb7.cjs +0 -1
- package/es/el-table-column-516a0ed9.cjs +0 -14
- package/es/el-tag-789f05d3.cjs +0 -1
- package/es/index-8de94a49.cjs +0 -1
- package/es/index-c04f444f.cjs +0 -1
- package/es/raf-8e05a7f4.js +0 -6
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { b as re, s as M, g as Ee, _ as oe, c as me, e as Te, w as be } from "./base-29f73b05.js";
|
|
2
|
+
import { S as q, c as ae, k as ue, t as he, h as ge } from "./index-8391a3df.js";
|
|
3
|
+
import { y as W, p as ie, q as ye, z as Fe, n as Se, A as Pe } from "./use-form-common-props-cb0ca65c.js";
|
|
4
|
+
import { ref as y, onMounted as k, onBeforeUnmount as I, defineComponent as ce, provide as we, watch as A, unref as T, nextTick as z, renderSlot as N, openBlock as _e, createBlock as Le, Teleport as Ae } from "vue";
|
|
5
|
+
function Ce(e) {
|
|
6
|
+
return e;
|
|
7
|
+
}
|
|
8
|
+
function Oe(e, t, n) {
|
|
9
|
+
switch (n.length) {
|
|
10
|
+
case 0:
|
|
11
|
+
return e.call(t);
|
|
12
|
+
case 1:
|
|
13
|
+
return e.call(t, n[0]);
|
|
14
|
+
case 2:
|
|
15
|
+
return e.call(t, n[0], n[1]);
|
|
16
|
+
case 3:
|
|
17
|
+
return e.call(t, n[0], n[1], n[2]);
|
|
18
|
+
}
|
|
19
|
+
return e.apply(t, n);
|
|
20
|
+
}
|
|
21
|
+
var Ne = 800, ke = 16, Ie = Date.now;
|
|
22
|
+
function Re(e) {
|
|
23
|
+
var t = 0, n = 0;
|
|
24
|
+
return function() {
|
|
25
|
+
var s = Ie(), r = ke - (s - n);
|
|
26
|
+
if (n = s, r > 0) {
|
|
27
|
+
if (++t >= Ne)
|
|
28
|
+
return arguments[0];
|
|
29
|
+
} else
|
|
30
|
+
t = 0;
|
|
31
|
+
return e.apply(void 0, arguments);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function Ue(e) {
|
|
35
|
+
return function() {
|
|
36
|
+
return e;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
var xe = W ? function(e, t) {
|
|
40
|
+
return W(e, "toString", {
|
|
41
|
+
configurable: !0,
|
|
42
|
+
enumerable: !1,
|
|
43
|
+
value: Ue(t),
|
|
44
|
+
writable: !0
|
|
45
|
+
});
|
|
46
|
+
} : Ce;
|
|
47
|
+
const De = xe;
|
|
48
|
+
var $e = Re(De);
|
|
49
|
+
const Ke = $e;
|
|
50
|
+
var G = Math.max;
|
|
51
|
+
function He(e, t, n) {
|
|
52
|
+
return t = G(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
53
|
+
for (var s = arguments, r = -1, a = G(s.length - t, 0), i = Array(a); ++r < a; )
|
|
54
|
+
i[r] = s[t + r];
|
|
55
|
+
r = -1;
|
|
56
|
+
for (var c = Array(t + 1); ++r < t; )
|
|
57
|
+
c[r] = s[r];
|
|
58
|
+
return c[t] = n(i), Oe(e, this, c);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
var J = q ? q.isConcatSpreadable : void 0;
|
|
62
|
+
function Be(e) {
|
|
63
|
+
return ae(e) || ie(e) || !!(J && e && e[J]);
|
|
64
|
+
}
|
|
65
|
+
function le(e, t, n, s, r) {
|
|
66
|
+
var a = -1, i = e.length;
|
|
67
|
+
for (n || (n = Be), r || (r = []); ++a < i; ) {
|
|
68
|
+
var c = e[a];
|
|
69
|
+
t > 0 && n(c) ? t > 1 ? le(c, t - 1, n, s, r) : ye(r, c) : s || (r[r.length] = c);
|
|
70
|
+
}
|
|
71
|
+
return r;
|
|
72
|
+
}
|
|
73
|
+
function Ve(e) {
|
|
74
|
+
var t = e == null ? 0 : e.length;
|
|
75
|
+
return t ? le(e, 1) : [];
|
|
76
|
+
}
|
|
77
|
+
function Me(e) {
|
|
78
|
+
return Ke(He(e, void 0, Ve), e + "");
|
|
79
|
+
}
|
|
80
|
+
function qe(e, t) {
|
|
81
|
+
return e != null && t in Object(e);
|
|
82
|
+
}
|
|
83
|
+
function We(e, t, n) {
|
|
84
|
+
t = ue(t, e);
|
|
85
|
+
for (var s = -1, r = t.length, a = !1; ++s < r; ) {
|
|
86
|
+
var i = he(t[s]);
|
|
87
|
+
if (!(a = e != null && n(e, i)))
|
|
88
|
+
break;
|
|
89
|
+
e = e[i];
|
|
90
|
+
}
|
|
91
|
+
return a || ++s != r ? a : (r = e == null ? 0 : e.length, !!r && Fe(r) && Se(i, r) && (ae(e) || ie(e)));
|
|
92
|
+
}
|
|
93
|
+
function ze(e, t) {
|
|
94
|
+
return e != null && We(e, t, qe);
|
|
95
|
+
}
|
|
96
|
+
function Ge(e, t, n) {
|
|
97
|
+
for (var s = -1, r = t.length, a = {}; ++s < r; ) {
|
|
98
|
+
var i = t[s], c = ge(e, i);
|
|
99
|
+
n(c, i) && Pe(a, ue(i, e), c);
|
|
100
|
+
}
|
|
101
|
+
return a;
|
|
102
|
+
}
|
|
103
|
+
function Je(e, t) {
|
|
104
|
+
return Ge(e, t, function(n, s) {
|
|
105
|
+
return ze(e, s);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
var Xe = Me(function(e, t) {
|
|
109
|
+
return e == null ? {} : Je(e, t);
|
|
110
|
+
});
|
|
111
|
+
const Ye = Xe, St = "update:modelValue", Pt = "change", wt = "input";
|
|
112
|
+
class Qe extends Error {
|
|
113
|
+
constructor(t) {
|
|
114
|
+
super(t), this.name = "ElementPlusError";
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function _t(e, t) {
|
|
118
|
+
throw new Qe(`[${e}] ${t}`);
|
|
119
|
+
}
|
|
120
|
+
function Lt(e, t) {
|
|
121
|
+
}
|
|
122
|
+
const Ze = re({
|
|
123
|
+
ariaLabel: String,
|
|
124
|
+
ariaOrientation: {
|
|
125
|
+
type: String,
|
|
126
|
+
values: ["horizontal", "vertical", "undefined"]
|
|
127
|
+
},
|
|
128
|
+
ariaControls: String
|
|
129
|
+
}), At = (e) => Ye(Ze, e), je = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', X = (e) => typeof Element > "u" ? !1 : e instanceof Element, et = (e) => getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, Ct = (e) => Array.from(e.querySelectorAll(je)).filter((t) => de(t) && et(t)), de = (e) => {
|
|
130
|
+
if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
|
|
131
|
+
return !0;
|
|
132
|
+
if (e.tabIndex < 0 || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true")
|
|
133
|
+
return !1;
|
|
134
|
+
switch (e.nodeName) {
|
|
135
|
+
case "A":
|
|
136
|
+
return !!e.href && e.rel !== "ignore";
|
|
137
|
+
case "INPUT":
|
|
138
|
+
return !(e.type === "hidden" || e.type === "file");
|
|
139
|
+
case "BUTTON":
|
|
140
|
+
case "SELECT":
|
|
141
|
+
case "TEXTAREA":
|
|
142
|
+
return !0;
|
|
143
|
+
default:
|
|
144
|
+
return !1;
|
|
145
|
+
}
|
|
146
|
+
}, Ot = function(e, t, ...n) {
|
|
147
|
+
let s;
|
|
148
|
+
t.includes("mouse") || t.includes("click") ? s = "MouseEvents" : t.includes("key") ? s = "KeyboardEvent" : s = "HTMLEvents";
|
|
149
|
+
const r = document.createEvent(s);
|
|
150
|
+
return r.initEvent(t, ...n), e.dispatchEvent(r), e;
|
|
151
|
+
}, tt = (e, t) => {
|
|
152
|
+
if (!e || !e.focus)
|
|
153
|
+
return;
|
|
154
|
+
let n = !1;
|
|
155
|
+
X(e) && !de(e) && !e.getAttribute("tabindex") && (e.setAttribute("tabindex", "-1"), n = !0), e.focus(t), X(e) && n && e.removeAttribute("tabindex");
|
|
156
|
+
}, C = "focus-trap.focus-after-trapped", O = "focus-trap.focus-after-released", nt = "focus-trap.focusout-prevented", Y = {
|
|
157
|
+
cancelable: !0,
|
|
158
|
+
bubbles: !1
|
|
159
|
+
}, st = {
|
|
160
|
+
cancelable: !0,
|
|
161
|
+
bubbles: !1
|
|
162
|
+
}, Q = "focusAfterTrapped", Z = "focusAfterReleased", rt = Symbol("elFocusTrap"), R = y(), F = y(0), U = y(0);
|
|
163
|
+
let b = 0;
|
|
164
|
+
const fe = (e) => {
|
|
165
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
166
|
+
acceptNode: (s) => {
|
|
167
|
+
const r = s.tagName === "INPUT" && s.type === "hidden";
|
|
168
|
+
return s.disabled || s.hidden || r ? NodeFilter.FILTER_SKIP : s.tabIndex >= 0 || s === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
for (; n.nextNode(); )
|
|
172
|
+
t.push(n.currentNode);
|
|
173
|
+
return t;
|
|
174
|
+
}, j = (e, t) => {
|
|
175
|
+
for (const n of e)
|
|
176
|
+
if (!ot(n, t))
|
|
177
|
+
return n;
|
|
178
|
+
}, ot = (e, t) => {
|
|
179
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
180
|
+
return !0;
|
|
181
|
+
for (; e; ) {
|
|
182
|
+
if (t && e === t)
|
|
183
|
+
return !1;
|
|
184
|
+
if (getComputedStyle(e).display === "none")
|
|
185
|
+
return !0;
|
|
186
|
+
e = e.parentElement;
|
|
187
|
+
}
|
|
188
|
+
return !1;
|
|
189
|
+
}, at = (e) => {
|
|
190
|
+
const t = fe(e), n = j(t, e), s = j(t.reverse(), e);
|
|
191
|
+
return [n, s];
|
|
192
|
+
}, ut = (e) => e instanceof HTMLInputElement && "select" in e, v = (e, t) => {
|
|
193
|
+
if (e) {
|
|
194
|
+
const n = document.activeElement;
|
|
195
|
+
tt(e, { preventScroll: !0 }), U.value = window.performance.now(), e !== n && ut(e) && t && e.select();
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
function ee(e, t) {
|
|
199
|
+
const n = [...e], s = e.indexOf(t);
|
|
200
|
+
return s !== -1 && n.splice(s, 1), n;
|
|
201
|
+
}
|
|
202
|
+
const it = () => {
|
|
203
|
+
let e = [];
|
|
204
|
+
return {
|
|
205
|
+
push: (s) => {
|
|
206
|
+
const r = e[0];
|
|
207
|
+
r && s !== r && r.pause(), e = ee(e, s), e.unshift(s);
|
|
208
|
+
},
|
|
209
|
+
remove: (s) => {
|
|
210
|
+
var r, a;
|
|
211
|
+
e = ee(e, s), (a = (r = e[0]) == null ? void 0 : r.resume) == null || a.call(r);
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}, ct = (e, t = !1) => {
|
|
215
|
+
const n = document.activeElement;
|
|
216
|
+
for (const s of e)
|
|
217
|
+
if (v(s, t), document.activeElement !== n)
|
|
218
|
+
return;
|
|
219
|
+
}, te = it(), lt = () => F.value > U.value, h = () => {
|
|
220
|
+
R.value = "pointer", F.value = window.performance.now();
|
|
221
|
+
}, ne = () => {
|
|
222
|
+
R.value = "keyboard", F.value = window.performance.now();
|
|
223
|
+
}, dt = () => (k(() => {
|
|
224
|
+
b === 0 && (document.addEventListener("mousedown", h), document.addEventListener("touchstart", h), document.addEventListener("keydown", ne)), b++;
|
|
225
|
+
}), I(() => {
|
|
226
|
+
b--, b <= 0 && (document.removeEventListener("mousedown", h), document.removeEventListener("touchstart", h), document.removeEventListener("keydown", ne));
|
|
227
|
+
}), {
|
|
228
|
+
focusReason: R,
|
|
229
|
+
lastUserFocusTimestamp: F,
|
|
230
|
+
lastAutomatedFocusTimestamp: U
|
|
231
|
+
}), g = (e) => new CustomEvent(nt, {
|
|
232
|
+
...st,
|
|
233
|
+
detail: e
|
|
234
|
+
}), pe = {
|
|
235
|
+
tab: "Tab",
|
|
236
|
+
enter: "Enter",
|
|
237
|
+
space: "Space",
|
|
238
|
+
left: "ArrowLeft",
|
|
239
|
+
up: "ArrowUp",
|
|
240
|
+
right: "ArrowRight",
|
|
241
|
+
down: "ArrowDown",
|
|
242
|
+
esc: "Escape",
|
|
243
|
+
delete: "Delete",
|
|
244
|
+
backspace: "Backspace",
|
|
245
|
+
numpadEnter: "NumpadEnter",
|
|
246
|
+
pageUp: "PageUp",
|
|
247
|
+
pageDown: "PageDown",
|
|
248
|
+
home: "Home",
|
|
249
|
+
end: "End"
|
|
250
|
+
};
|
|
251
|
+
let E = [];
|
|
252
|
+
const se = (e) => {
|
|
253
|
+
e.code === pe.esc && E.forEach((t) => t(e));
|
|
254
|
+
}, ft = (e) => {
|
|
255
|
+
k(() => {
|
|
256
|
+
E.length === 0 && document.addEventListener("keydown", se), M && E.push(e);
|
|
257
|
+
}), I(() => {
|
|
258
|
+
E = E.filter((t) => t !== e), E.length === 0 && M && document.removeEventListener("keydown", se);
|
|
259
|
+
});
|
|
260
|
+
}, pt = ce({
|
|
261
|
+
name: "ElFocusTrap",
|
|
262
|
+
inheritAttrs: !1,
|
|
263
|
+
props: {
|
|
264
|
+
loop: Boolean,
|
|
265
|
+
trapped: Boolean,
|
|
266
|
+
focusTrapEl: Object,
|
|
267
|
+
focusStartEl: {
|
|
268
|
+
type: [Object, String],
|
|
269
|
+
default: "first"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
emits: [
|
|
273
|
+
Q,
|
|
274
|
+
Z,
|
|
275
|
+
"focusin",
|
|
276
|
+
"focusout",
|
|
277
|
+
"focusout-prevented",
|
|
278
|
+
"release-requested"
|
|
279
|
+
],
|
|
280
|
+
setup(e, { emit: t }) {
|
|
281
|
+
const n = y();
|
|
282
|
+
let s, r;
|
|
283
|
+
const { focusReason: a } = dt();
|
|
284
|
+
ft((o) => {
|
|
285
|
+
e.trapped && !i.paused && t("release-requested", o);
|
|
286
|
+
});
|
|
287
|
+
const i = {
|
|
288
|
+
paused: !1,
|
|
289
|
+
pause() {
|
|
290
|
+
this.paused = !0;
|
|
291
|
+
},
|
|
292
|
+
resume() {
|
|
293
|
+
this.paused = !1;
|
|
294
|
+
}
|
|
295
|
+
}, c = (o) => {
|
|
296
|
+
if (!e.loop && !e.trapped || i.paused)
|
|
297
|
+
return;
|
|
298
|
+
const { code: u, altKey: l, ctrlKey: d, metaKey: f, currentTarget: H, shiftKey: B } = o, { loop: V } = e, ve = u === pe.tab && !l && !d && !f, m = document.activeElement;
|
|
299
|
+
if (ve && m) {
|
|
300
|
+
const w = H, [_, L] = at(w);
|
|
301
|
+
if (_ && L) {
|
|
302
|
+
if (!B && m === L) {
|
|
303
|
+
const p = g({
|
|
304
|
+
focusReason: a.value
|
|
305
|
+
});
|
|
306
|
+
t("focusout-prevented", p), p.defaultPrevented || (o.preventDefault(), V && v(_, !0));
|
|
307
|
+
} else if (B && [_, w].includes(m)) {
|
|
308
|
+
const p = g({
|
|
309
|
+
focusReason: a.value
|
|
310
|
+
});
|
|
311
|
+
t("focusout-prevented", p), p.defaultPrevented || (o.preventDefault(), V && v(L, !0));
|
|
312
|
+
}
|
|
313
|
+
} else if (m === w) {
|
|
314
|
+
const p = g({
|
|
315
|
+
focusReason: a.value
|
|
316
|
+
});
|
|
317
|
+
t("focusout-prevented", p), p.defaultPrevented || o.preventDefault();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
we(rt, {
|
|
322
|
+
focusTrapRef: n,
|
|
323
|
+
onKeydown: c
|
|
324
|
+
}), A(() => e.focusTrapEl, (o) => {
|
|
325
|
+
o && (n.value = o);
|
|
326
|
+
}, { immediate: !0 }), A([n], ([o], [u]) => {
|
|
327
|
+
o && (o.addEventListener("keydown", c), o.addEventListener("focusin", S), o.addEventListener("focusout", P)), u && (u.removeEventListener("keydown", c), u.removeEventListener("focusin", S), u.removeEventListener("focusout", P));
|
|
328
|
+
});
|
|
329
|
+
const x = (o) => {
|
|
330
|
+
t(Q, o);
|
|
331
|
+
}, D = (o) => t(Z, o), S = (o) => {
|
|
332
|
+
const u = T(n);
|
|
333
|
+
if (!u)
|
|
334
|
+
return;
|
|
335
|
+
const l = o.target, d = o.relatedTarget, f = l && u.contains(l);
|
|
336
|
+
e.trapped || d && u.contains(d) || (s = d), f && t("focusin", o), !i.paused && e.trapped && (f ? r = l : v(r, !0));
|
|
337
|
+
}, P = (o) => {
|
|
338
|
+
const u = T(n);
|
|
339
|
+
if (!(i.paused || !u))
|
|
340
|
+
if (e.trapped) {
|
|
341
|
+
const l = o.relatedTarget;
|
|
342
|
+
!Ee(l) && !u.contains(l) && setTimeout(() => {
|
|
343
|
+
if (!i.paused && e.trapped) {
|
|
344
|
+
const d = g({
|
|
345
|
+
focusReason: a.value
|
|
346
|
+
});
|
|
347
|
+
t("focusout-prevented", d), d.defaultPrevented || v(r, !0);
|
|
348
|
+
}
|
|
349
|
+
}, 0);
|
|
350
|
+
} else {
|
|
351
|
+
const l = o.target;
|
|
352
|
+
l && u.contains(l) || t("focusout", o);
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
async function $() {
|
|
356
|
+
await z();
|
|
357
|
+
const o = T(n);
|
|
358
|
+
if (o) {
|
|
359
|
+
te.push(i);
|
|
360
|
+
const u = o.contains(document.activeElement) ? s : document.activeElement;
|
|
361
|
+
if (s = u, !o.contains(u)) {
|
|
362
|
+
const d = new Event(C, Y);
|
|
363
|
+
o.addEventListener(C, x), o.dispatchEvent(d), d.defaultPrevented || z(() => {
|
|
364
|
+
let f = e.focusStartEl;
|
|
365
|
+
me(f) || (v(f), document.activeElement !== f && (f = "first")), f === "first" && ct(fe(o), !0), (document.activeElement === u || f === "container") && v(o);
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function K() {
|
|
371
|
+
const o = T(n);
|
|
372
|
+
if (o) {
|
|
373
|
+
o.removeEventListener(C, x);
|
|
374
|
+
const u = new CustomEvent(O, {
|
|
375
|
+
...Y,
|
|
376
|
+
detail: {
|
|
377
|
+
focusReason: a.value
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
o.addEventListener(O, D), o.dispatchEvent(u), !u.defaultPrevented && (a.value == "keyboard" || !lt() || o.contains(document.activeElement)) && v(s ?? document.body), o.removeEventListener(O, D), te.remove(i), s = null, r = null;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return k(() => {
|
|
384
|
+
e.trapped && $(), A(() => e.trapped, (o) => {
|
|
385
|
+
o ? $() : K();
|
|
386
|
+
});
|
|
387
|
+
}), I(() => {
|
|
388
|
+
e.trapped && K(), n.value && (n.value.removeEventListener("keydown", c), n.value.removeEventListener("focusin", S), n.value.removeEventListener("focusout", P), n.value = void 0);
|
|
389
|
+
}), {
|
|
390
|
+
onKeydown: c
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
function vt(e, t, n, s, r, a) {
|
|
395
|
+
return N(e.$slots, "default", { handleKeydown: e.onKeydown });
|
|
396
|
+
}
|
|
397
|
+
var Nt = /* @__PURE__ */ oe(pt, [["render", vt], ["__file", "focus-trap.vue"]]);
|
|
398
|
+
const Et = re({
|
|
399
|
+
to: {
|
|
400
|
+
type: Te([String, Object]),
|
|
401
|
+
required: !0
|
|
402
|
+
},
|
|
403
|
+
disabled: Boolean
|
|
404
|
+
}), mt = /* @__PURE__ */ ce({
|
|
405
|
+
__name: "teleport",
|
|
406
|
+
props: Et,
|
|
407
|
+
setup(e) {
|
|
408
|
+
return (t, n) => t.disabled ? N(t.$slots, "default", { key: 0 }) : (_e(), Le(Ae, {
|
|
409
|
+
key: 1,
|
|
410
|
+
to: t.to
|
|
411
|
+
}, [
|
|
412
|
+
N(t.$slots, "default")
|
|
413
|
+
], 8, ["to"]));
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
var Tt = /* @__PURE__ */ oe(mt, [["__file", "teleport.vue"]]);
|
|
417
|
+
const kt = be(Tt);
|
|
418
|
+
export {
|
|
419
|
+
Pt as C,
|
|
420
|
+
pe as E,
|
|
421
|
+
rt as F,
|
|
422
|
+
wt as I,
|
|
423
|
+
St as U,
|
|
424
|
+
_t as a,
|
|
425
|
+
kt as b,
|
|
426
|
+
Nt as c,
|
|
427
|
+
Lt as d,
|
|
428
|
+
He as e,
|
|
429
|
+
tt as f,
|
|
430
|
+
le as g,
|
|
431
|
+
ze as h,
|
|
432
|
+
Ce as i,
|
|
433
|
+
Et as j,
|
|
434
|
+
de as k,
|
|
435
|
+
Ct as o,
|
|
436
|
+
Ye as p,
|
|
437
|
+
Ke as s,
|
|
438
|
+
Ot as t,
|
|
439
|
+
At as u
|
|
440
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as x, inject as Z, ref as f, computed as R, onBeforeUnmount as oe, toRef as q, openBlock as k, createBlock as D, Transition as ae, unref as w, withCtx as ee, withDirectives as re, createElementVNode as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as x, inject as Z, ref as f, computed as R, onBeforeUnmount as oe, toRef as q, openBlock as k, createBlock as D, Transition as ae, unref as w, withCtx as ee, withDirectives as re, createElementVNode as $, normalizeClass as P, withModifiers as se, normalizeStyle as j, vShow as ne, createElementBlock as te, Fragment as ie, createVNode as G, watch as X, nextTick as Y, provide as ce, reactive as ue, onActivated as ve, onMounted as fe, onUpdated as me, resolveDynamicComponent as de, renderSlot as pe, createCommentVNode as he } from "vue";
|
|
2
|
+
import { c as I, u as F } from "./use-form-common-props-cb0ca65c.js";
|
|
3
3
|
import { B as be, r as ge, G as C } from "./el-scrollbar-323542e7.js";
|
|
4
|
-
import { b as K, _ as U, u as le,
|
|
5
|
-
import {
|
|
4
|
+
import { b as K, _ as U, u as le, s as ye, e as Se, p as N, n as J, f as we, w as ze } from "./base-29f73b05.js";
|
|
5
|
+
import { a as _e, u as Ee } from "./index-0f79095c.js";
|
|
6
6
|
const V = Symbol("scrollbarContextKey"), Te = K({
|
|
7
7
|
vertical: Boolean,
|
|
8
8
|
size: String,
|
|
@@ -16,15 +16,15 @@ const V = Symbol("scrollbarContextKey"), Te = K({
|
|
|
16
16
|
__name: "thumb",
|
|
17
17
|
props: Te,
|
|
18
18
|
setup(z) {
|
|
19
|
-
const
|
|
19
|
+
const d = z, r = Z(V), l = le("scrollbar");
|
|
20
20
|
r || _e(He, "can not inject scrollbar context");
|
|
21
|
-
const c = f(),
|
|
21
|
+
const c = f(), m = f(), g = f({}), p = f(!1);
|
|
22
22
|
let s = !1, n = !1, v = 0, y = 0, o = ye ? document.onselectstart : null;
|
|
23
|
-
const e = R(() => be[
|
|
24
|
-
size:
|
|
25
|
-
move:
|
|
23
|
+
const e = R(() => be[d.vertical ? "vertical" : "horizontal"]), h = R(() => ge({
|
|
24
|
+
size: d.size,
|
|
25
|
+
move: d.move,
|
|
26
26
|
bar: e.value
|
|
27
|
-
})), b = R(() => c.value[e.value.offset] ** 2 / r.wrapElement[e.value.scrollSize] /
|
|
27
|
+
})), b = R(() => c.value[e.value.offset] ** 2 / r.wrapElement[e.value.scrollSize] / d.ratio / m.value[e.value.offset]), T = (i) => {
|
|
28
28
|
var S;
|
|
29
29
|
if (i.stopPropagation(), i.ctrlKey || [1, 2].includes(i.button))
|
|
30
30
|
return;
|
|
@@ -32,24 +32,24 @@ const V = Symbol("scrollbarContextKey"), Te = K({
|
|
|
32
32
|
const u = i.currentTarget;
|
|
33
33
|
u && (g.value[e.value.axis] = u[e.value.offset] - (i[e.value.client] - u.getBoundingClientRect()[e.value.direction]));
|
|
34
34
|
}, _ = (i) => {
|
|
35
|
-
if (!
|
|
35
|
+
if (!m.value || !c.value || !r.wrapElement)
|
|
36
36
|
return;
|
|
37
|
-
const S = Math.abs(i.target.getBoundingClientRect()[e.value.direction] - i[e.value.client]), u =
|
|
37
|
+
const S = Math.abs(i.target.getBoundingClientRect()[e.value.direction] - i[e.value.client]), u = m.value[e.value.offset] / 2, t = (S - u) * 100 * b.value / c.value[e.value.offset];
|
|
38
38
|
r.wrapElement[e.value.scroll] = t * r.wrapElement[e.value.scrollSize] / 100;
|
|
39
39
|
}, E = (i) => {
|
|
40
40
|
i.stopImmediatePropagation(), s = !0, v = r.wrapElement.scrollHeight, y = r.wrapElement.scrollWidth, document.addEventListener("mousemove", B), document.addEventListener("mouseup", L), o = document.onselectstart, document.onselectstart = () => !1;
|
|
41
41
|
}, B = (i) => {
|
|
42
|
-
if (!c.value || !
|
|
42
|
+
if (!c.value || !m.value || s === !1)
|
|
43
43
|
return;
|
|
44
44
|
const S = g.value[e.value.axis];
|
|
45
45
|
if (!S)
|
|
46
46
|
return;
|
|
47
|
-
const u = (c.value.getBoundingClientRect()[e.value.direction] - i[e.value.client]) * -1, t =
|
|
47
|
+
const u = (c.value.getBoundingClientRect()[e.value.direction] - i[e.value.client]) * -1, t = m.value[e.value.offset] - S, a = (u - t) * 100 * b.value / c.value[e.value.offset];
|
|
48
48
|
e.value.scroll === "scrollLeft" ? r.wrapElement[e.value.scroll] = a * y / 100 : r.wrapElement[e.value.scroll] = a * v / 100;
|
|
49
49
|
}, L = () => {
|
|
50
50
|
s = !1, g.value[e.value.axis] = 0, document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", L), A(), n && (p.value = !1);
|
|
51
51
|
}, W = () => {
|
|
52
|
-
n = !1, p.value = !!
|
|
52
|
+
n = !1, p.value = !!d.size;
|
|
53
53
|
}, O = () => {
|
|
54
54
|
n = !0, p.value = s;
|
|
55
55
|
};
|
|
@@ -64,7 +64,7 @@ const V = Symbol("scrollbarContextKey"), Te = K({
|
|
|
64
64
|
persisted: ""
|
|
65
65
|
}, {
|
|
66
66
|
default: ee(() => [
|
|
67
|
-
re(
|
|
67
|
+
re($("div", {
|
|
68
68
|
ref_key: "instance",
|
|
69
69
|
ref: c,
|
|
70
70
|
class: P([w(l).e("bar"), w(l).is(w(e).key)]),
|
|
@@ -72,11 +72,11 @@ const V = Symbol("scrollbarContextKey"), Te = K({
|
|
|
72
72
|
onClick: se(() => {
|
|
73
73
|
}, ["stop"])
|
|
74
74
|
}, [
|
|
75
|
-
|
|
75
|
+
$("div", {
|
|
76
76
|
ref_key: "thumb",
|
|
77
|
-
ref:
|
|
77
|
+
ref: m,
|
|
78
78
|
class: P(w(l).e("thumb")),
|
|
79
|
-
style:
|
|
79
|
+
style: j(w(h)),
|
|
80
80
|
onMousedown: T
|
|
81
81
|
}, null, 38)
|
|
82
82
|
], 42, ["onClick"]), [
|
|
@@ -100,13 +100,13 @@ const Re = K({
|
|
|
100
100
|
}), Le = /* @__PURE__ */ x({
|
|
101
101
|
__name: "bar",
|
|
102
102
|
props: Re,
|
|
103
|
-
setup(z, { expose:
|
|
104
|
-
const r = z, l = Z(V), c = f(0),
|
|
105
|
-
return
|
|
103
|
+
setup(z, { expose: d }) {
|
|
104
|
+
const r = z, l = Z(V), c = f(0), m = f(0), g = f(""), p = f(""), s = f(1), n = f(1);
|
|
105
|
+
return d({
|
|
106
106
|
handleScroll: (o) => {
|
|
107
107
|
if (o) {
|
|
108
108
|
const e = o.offsetHeight - C, h = o.offsetWidth - C;
|
|
109
|
-
|
|
109
|
+
m.value = o.scrollTop * 100 / e * s.value, c.value = o.scrollLeft * 100 / h * n.value;
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
update: () => {
|
|
@@ -124,7 +124,7 @@ const Re = K({
|
|
|
124
124
|
always: o.always
|
|
125
125
|
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
126
126
|
G(Q, {
|
|
127
|
-
move:
|
|
127
|
+
move: m.value,
|
|
128
128
|
ratio: s.value,
|
|
129
129
|
size: p.value,
|
|
130
130
|
vertical: "",
|
|
@@ -185,17 +185,17 @@ const ke = K({
|
|
|
185
185
|
"end-reached": (z) => ["left", "right", "top", "bottom"].includes(z),
|
|
186
186
|
scroll: ({
|
|
187
187
|
scrollTop: z,
|
|
188
|
-
scrollLeft:
|
|
189
|
-
}) => [z,
|
|
188
|
+
scrollLeft: d
|
|
189
|
+
}) => [z, d].every(N)
|
|
190
190
|
}, Be = "ElScrollbar", Oe = x({
|
|
191
191
|
name: Be
|
|
192
192
|
}), Ae = /* @__PURE__ */ x({
|
|
193
193
|
...Oe,
|
|
194
194
|
props: ke,
|
|
195
195
|
emits: Pe,
|
|
196
|
-
setup(z, { expose:
|
|
196
|
+
setup(z, { expose: d, emit: r }) {
|
|
197
197
|
const l = z, c = le("scrollbar");
|
|
198
|
-
let
|
|
198
|
+
let m, g, p, s = 0, n = 0, v = "";
|
|
199
199
|
const y = {
|
|
200
200
|
bottom: !1,
|
|
201
201
|
top: !1,
|
|
@@ -257,7 +257,7 @@ const ke = K({
|
|
|
257
257
|
(t = b.value) == null || t.update(), y[v] = !1;
|
|
258
258
|
};
|
|
259
259
|
return X(() => l.noresize, (t) => {
|
|
260
|
-
t ? (
|
|
260
|
+
t ? (m == null || m(), g == null || g(), p == null || p()) : ({ stop: m } = F(h, u), { stop: g } = F(e, u), p = I("resize", u));
|
|
261
261
|
}, { immediate: !0 }), X(() => [l.maxHeight, l.height], () => {
|
|
262
262
|
l.native || Y(() => {
|
|
263
263
|
var t;
|
|
@@ -272,7 +272,7 @@ const ke = K({
|
|
|
272
272
|
l.native || Y(() => {
|
|
273
273
|
u();
|
|
274
274
|
});
|
|
275
|
-
}),
|
|
275
|
+
}), me(() => u()), d({
|
|
276
276
|
wrapRef: e,
|
|
277
277
|
update: u,
|
|
278
278
|
scrollTo: A,
|
|
@@ -284,20 +284,20 @@ const ke = K({
|
|
|
284
284
|
ref: o,
|
|
285
285
|
class: P(w(c).b())
|
|
286
286
|
}, [
|
|
287
|
-
|
|
287
|
+
$("div", {
|
|
288
288
|
ref_key: "wrapRef",
|
|
289
289
|
ref: e,
|
|
290
290
|
class: P(w(_)),
|
|
291
|
-
style:
|
|
291
|
+
style: j(w(T)),
|
|
292
292
|
tabindex: t.tabindex,
|
|
293
293
|
onScroll: O
|
|
294
294
|
}, [
|
|
295
|
-
(k(), D(
|
|
295
|
+
(k(), D(de(t.tag), {
|
|
296
296
|
id: t.id,
|
|
297
297
|
ref_key: "resizeRef",
|
|
298
298
|
ref: h,
|
|
299
299
|
class: P(w(E)),
|
|
300
|
-
style:
|
|
300
|
+
style: j(t.viewStyle),
|
|
301
301
|
role: t.role,
|
|
302
302
|
"aria-label": t.ariaLabel,
|
|
303
303
|
"aria-orientation": t.ariaOrientation
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("./base-ef747d02.cjs"),T=require("./index-9780a537.cjs"),b=require("./use-form-common-props-d3ed62c6.cjs"),u=require("vue");function te(e){return e}function de(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var fe=800,Ee=16,pe=Date.now;function ve(e){var t=0,n=0;return function(){var r=pe(),o=Ee-(r-n);if(n=r,o>0){if(++t>=fe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function me(e){return function(){return e}}var Te=b.defineProperty?function(e,t){return b.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:me(t),writable:!0})}:te;const be=Te;var he=ve(be);const ne=he;var q=Math.max;function re(e,t,n){return t=q(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=q(r.length-t,0),c=Array(a);++o<a;)c[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(c),de(e,this,l)}}var W=T.Symbol?T.Symbol.isConcatSpreadable:void 0;function ge(e){return T.isArray(e)||b.isArguments(e)||!!(W&&e&&e[W])}function I(e,t,n,r,o){var a=-1,c=e.length;for(n||(n=ge),o||(o=[]);++a<c;){var l=e[a];t>0&&n(l)?t>1?I(l,t-1,n,r,o):b.arrayPush(o,l):r||(o[o.length]=l)}return o}function ye(e){var t=e==null?0:e.length;return t?I(e,1):[]}function Pe(e){return ne(re(e,void 0,ye),e+"")}function Fe(e,t){return e!=null&&t in Object(e)}function _e(e,t,n){t=T.castPath(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var c=T.toKey(t[r]);if(!(a=e!=null&&n(e,c)))break;e=e[c]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&b.isLength(o)&&b.isIndex(c,o)&&(T.isArray(e)||b.isArguments(e)))}function oe(e,t){return e!=null&&_e(e,t,Fe)}function Se(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var c=t[r],l=T.baseGet(e,c);n(l,c)&&b.baseSet(a,T.castPath(c,e),l)}return a}function we(e,t){return Se(e,t,function(n,r){return oe(e,r)})}var Ae=Pe(function(e,t){return e==null?{}:we(e,t)});const se=Ae,Ce="update:modelValue",Le="change",Ne="input";class Oe extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Ie(e,t){throw new Oe(`[${e}] ${t}`)}function ke(e,t){}const Re=p.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Ue=e=>se(Re,e),xe='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',G=e=>typeof Element>"u"?!1:e instanceof Element,De=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,$e=e=>Array.from(e.querySelectorAll(xe)).filter(t=>k(t)&&De(t)),k=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Ke=function(e,t,...n){let r;t.includes("mouse")||t.includes("click")?r="MouseEvents":t.includes("key")?r="KeyboardEvent":r="HTMLEvents";const o=document.createEvent(r);return o.initEvent(t,...n),e.dispatchEvent(o),e},ue=(e,t)=>{if(!e||!e.focus)return;let n=!1;G(e)&&!k(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),n=!0),e.focus(t),G(e)&&n&&e.removeAttribute("tabindex")},N="focus-trap.focus-after-trapped",O="focus-trap.focus-after-released",Ve="focus-trap.focusout-prevented",J={cancelable:!0,bubbles:!1},Be={cancelable:!0,bubbles:!1},Y="focusAfterTrapped",z="focusAfterReleased",ae=Symbol("elFocusTrap"),R=u.ref(),_=u.ref(0),U=u.ref(0);let y=0;const ie=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},X=(e,t)=>{for(const n of e)if(!He(n,t))return n},He=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Me=e=>{const t=ie(e),n=X(t,e),r=X(t.reverse(),e);return[n,r]},qe=e=>e instanceof HTMLInputElement&&"select"in e,m=(e,t)=>{if(e){const n=document.activeElement;ue(e,{preventScroll:!0}),U.value=window.performance.now(),e!==n&&qe(e)&&t&&e.select()}};function Q(e,t){const n=[...e],r=e.indexOf(t);return r!==-1&&n.splice(r,1),n}const We=()=>{let e=[];return{push:r=>{const o=e[0];o&&r!==o&&o.pause(),e=Q(e,r),e.unshift(r)},remove:r=>{var o,a;e=Q(e,r),(a=(o=e[0])==null?void 0:o.resume)==null||a.call(o)}}},Ge=(e,t=!1)=>{const n=document.activeElement;for(const r of e)if(m(r,t),document.activeElement!==n)return},Z=We(),Je=()=>_.value>U.value,P=()=>{R.value="pointer",_.value=window.performance.now()},j=()=>{R.value="keyboard",_.value=window.performance.now()},Ye=()=>(u.onMounted(()=>{y===0&&(document.addEventListener("mousedown",P),document.addEventListener("touchstart",P),document.addEventListener("keydown",j)),y++}),u.onBeforeUnmount(()=>{y--,y<=0&&(document.removeEventListener("mousedown",P),document.removeEventListener("touchstart",P),document.removeEventListener("keydown",j))}),{focusReason:R,lastUserFocusTimestamp:_,lastAutomatedFocusTimestamp:U}),F=e=>new CustomEvent(Ve,{...Be,detail:e}),x={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let h=[];const ee=e=>{e.code===x.esc&&h.forEach(t=>t(e))},ze=e=>{u.onMounted(()=>{h.length===0&&document.addEventListener("keydown",ee),p.isClient&&h.push(e)}),u.onBeforeUnmount(()=>{h=h.filter(t=>t!==e),h.length===0&&p.isClient&&document.removeEventListener("keydown",ee)})},Xe=u.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Y,z,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=u.ref();let r,o;const{focusReason:a}=Ye();ze(s=>{e.trapped&&!c.paused&&t("release-requested",s)});const c={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=s=>{if(!e.loop&&!e.trapped||c.paused)return;const{code:i,altKey:d,ctrlKey:f,metaKey:E,currentTarget:B,shiftKey:H}=s,{loop:M}=e,le=i===x.tab&&!d&&!f&&!E,g=document.activeElement;if(le&&g){const A=B,[C,L]=Me(A);if(C&&L){if(!H&&g===L){const v=F({focusReason:a.value});t("focusout-prevented",v),v.defaultPrevented||(s.preventDefault(),M&&m(C,!0))}else if(H&&[C,A].includes(g)){const v=F({focusReason:a.value});t("focusout-prevented",v),v.defaultPrevented||(s.preventDefault(),M&&m(L,!0))}}else if(g===A){const v=F({focusReason:a.value});t("focusout-prevented",v),v.defaultPrevented||s.preventDefault()}}};u.provide(ae,{focusTrapRef:n,onKeydown:l}),u.watch(()=>e.focusTrapEl,s=>{s&&(n.value=s)},{immediate:!0}),u.watch([n],([s],[i])=>{s&&(s.addEventListener("keydown",l),s.addEventListener("focusin",S),s.addEventListener("focusout",w)),i&&(i.removeEventListener("keydown",l),i.removeEventListener("focusin",S),i.removeEventListener("focusout",w))});const D=s=>{t(Y,s)},$=s=>t(z,s),S=s=>{const i=u.unref(n);if(!i)return;const d=s.target,f=s.relatedTarget,E=d&&i.contains(d);e.trapped||f&&i.contains(f)||(r=f),E&&t("focusin",s),!c.paused&&e.trapped&&(E?o=d:m(o,!0))},w=s=>{const i=u.unref(n);if(!(c.paused||!i))if(e.trapped){const d=s.relatedTarget;!p.isNil(d)&&!i.contains(d)&&setTimeout(()=>{if(!c.paused&&e.trapped){const f=F({focusReason:a.value});t("focusout-prevented",f),f.defaultPrevented||m(o,!0)}},0)}else{const d=s.target;d&&i.contains(d)||t("focusout",s)}};async function K(){await u.nextTick();const s=u.unref(n);if(s){Z.push(c);const i=s.contains(document.activeElement)?r:document.activeElement;if(r=i,!s.contains(i)){const f=new Event(N,J);s.addEventListener(N,D),s.dispatchEvent(f),f.defaultPrevented||u.nextTick(()=>{let E=e.focusStartEl;p.isString(E)||(m(E),document.activeElement!==E&&(E="first")),E==="first"&&Ge(ie(s),!0),(document.activeElement===i||E==="container")&&m(s)})}}}function V(){const s=u.unref(n);if(s){s.removeEventListener(N,D);const i=new CustomEvent(O,{...J,detail:{focusReason:a.value}});s.addEventListener(O,$),s.dispatchEvent(i),!i.defaultPrevented&&(a.value=="keyboard"||!Je()||s.contains(document.activeElement))&&m(r??document.body),s.removeEventListener(O,$),Z.remove(c),r=null,o=null}}return u.onMounted(()=>{e.trapped&&K(),u.watch(()=>e.trapped,s=>{s?K():V()})}),u.onBeforeUnmount(()=>{e.trapped&&V(),n.value&&(n.value.removeEventListener("keydown",l),n.value.removeEventListener("focusin",S),n.value.removeEventListener("focusout",w),n.value=void 0)}),{onKeydown:l}}});function Qe(e,t,n,r,o,a){return u.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ze=p._export_sfc(Xe,[["render",Qe],["__file","focus-trap.vue"]]);const ce=p.buildProps({to:{type:p.definePropType([String,Object]),required:!0},disabled:Boolean}),je=u.defineComponent({__name:"teleport",props:ce,setup(e){return(t,n)=>t.disabled?u.renderSlot(t.$slots,"default",{key:0}):(u.openBlock(),u.createBlock(u.Teleport,{key:1,to:t.to},[u.renderSlot(t.$slots,"default")],8,["to"]))}});var et=p._export_sfc(je,[["__file","teleport.vue"]]);const tt=p.withInstall(et);exports.CHANGE_EVENT=Le;exports.EVENT_CODE=x;exports.ElFocusTrap=Ze;exports.ElTeleport=tt;exports.FOCUS_TRAP_INJECTION_KEY=ae;exports.INPUT_EVENT=Ne;exports.UPDATE_MODEL_EVENT=Ce;exports.baseFlatten=I;exports.debugWarn=ke;exports.focusElement=ue;exports.hasIn=oe;exports.identity=te;exports.isFocusable=k;exports.obtainAllFocusableElements=$e;exports.overRest=re;exports.pick=se;exports.setToString=ne;exports.teleportProps=ce;exports.throwError=Ie;exports.triggerEvent=Ke;exports.useAriaProps=Ue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),o=require("./el-popper-
|
|
1
|
+
"use strict";const t=require("vue"),o=require("./el-popper-2d3914e4.cjs"),d=require("./dropdown-eba9eaf5.cjs"),i=require("./base-ef747d02.cjs"),C=i.buildProps({trigger:o.useTooltipTriggerProps.trigger,triggerKeys:o.useTooltipTriggerProps.triggerKeys,placement:d.dropdownProps.placement,disabled:o.useTooltipTriggerProps.disabled,visible:o.useTooltipContentProps.visible,transition:o.useTooltipContentProps.transition,popperOptions:d.dropdownProps.popperOptions,tabindex:d.dropdownProps.tabindex,content:o.useTooltipContentProps.content,popperStyle:o.useTooltipContentProps.popperStyle,popperClass:o.useTooltipContentProps.popperClass,enterable:{...o.useTooltipContentProps.enterable,default:!0},effect:{...o.useTooltipContentProps.effect,default:"light"},teleported:o.useTooltipContentProps.teleported,appendTo:o.useTooltipContentProps.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),T={"update:visible":r=>i.isBoolean(r),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},E="onUpdate:visible",S=t.defineComponent({name:"ElPopover"}),k=t.defineComponent({...S,props:C,emits:T,setup(r,{expose:n,emit:s}){const p=r,f=t.computed(()=>p[E]),l=i.useNamespace("popover"),a=t.ref(),c=t.computed(()=>{var e;return(e=t.unref(a))==null?void 0:e.popperRef}),v=t.computed(()=>[{width:i.addUnit(p.width)},p.popperStyle]),b=t.computed(()=>[l.b(),p.popperClass,{[l.m("plain")]:!!p.content}]),g=t.computed(()=>p.transition===`${l.namespace.value}-fade-in-linear`),m=()=>{var e;(e=a.value)==null||e.hide()},h=()=>{s("before-enter")},w=()=>{s("before-leave")},P=()=>{s("after-enter")},y=()=>{s("update:visible",!1),s("after-leave")};return n({popperRef:c,hide:m}),(e,D)=>(t.openBlock(),t.createBlock(t.unref(o.ElTooltip),t.mergeProps({ref_key:"tooltipRef",ref:a},e.$attrs,{trigger:e.trigger,"trigger-keys":e.triggerKeys,placement:e.placement,disabled:e.disabled,visible:e.visible,transition:e.transition,"popper-options":e.popperOptions,tabindex:e.tabindex,content:e.content,offset:e.offset,"show-after":e.showAfter,"hide-after":e.hideAfter,"auto-close":e.autoClose,"show-arrow":e.showArrow,"aria-label":e.title,effect:e.effect,enterable:e.enterable,"popper-class":t.unref(b),"popper-style":t.unref(v),teleported:e.teleported,"append-to":e.appendTo,persistent:e.persistent,"gpu-acceleration":t.unref(g),"onUpdate:visible":t.unref(f),onBeforeShow:h,onBeforeHide:w,onShow:P,onHide:y}),{content:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(l).e("title")),role:"title"},t.toDisplayString(e.title),3)):t.createCommentVNode("v-if",!0),t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.content),1)])]),default:t.withCtx(()=>[e.$slots.reference?t.renderSlot(e.$slots,"reference",{key:0}):t.createCommentVNode("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}});var B=i._export_sfc(k,[["__file","popover.vue"]]);const u=(r,n)=>{const s=n.arg||n.value,p=s==null?void 0:s.popperRef;p&&(p.triggerRef=r)};var N={mounted(r,n){u(r,n)},updated(r,n){u(r,n)}};const A="popover",R=i.withInstallDirective(N,A),U=i.withInstall(B,{directive:R});exports.ElPopover=U;
|