st-comp 0.0.147 → 0.0.148
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 +3 -3
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +22 -20
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +631 -566
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +83 -77
- package/es/KlineNew.cjs +2 -2
- package/es/KlineNew.js +14 -10
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +95 -89
- package/es/Table.cjs +1 -1
- package/es/Table.js +62 -58
- package/es/User.cjs +1 -1
- package/es/User.js +151 -146
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +1 -2384
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +2800 -1
- package/es/_initCloneObject-476b02ce.cjs +1 -0
- package/es/{_initCloneObject-a8dcd058.js → _initCloneObject-ec5c9523.js} +5 -5
- package/es/{base-00ce90ec.cjs → base-6ccc8fc2.cjs} +3 -3
- package/es/{base-674a354a.js → base-950bac7e.js} +59 -58
- package/es/castArray-374558a5.cjs +1 -0
- package/es/castArray-c770910d.js +10 -0
- package/es/config-provider-c87e277f.cjs +1 -0
- package/es/config-provider-feed0e8a.js +47 -0
- package/es/debounce-a6b4f91b.cjs +1 -0
- package/es/debounce-c64fb3b5.js +83 -0
- package/es/dropdown-6bdb3cf4.cjs +1 -0
- package/es/{dropdown-ce30ada6.js → dropdown-c9272ca3.js} +31 -30
- package/es/el-button-b8f71c7d.cjs +1 -0
- package/es/{el-button-7b9f5933.js → el-button-d7b6eebd.js} +12 -12
- package/es/{el-empty-87154b6d.cjs → el-empty-12eece57.cjs} +1 -1
- package/es/{el-empty-39b3aed7.js → el-empty-89a523ed.js} +5 -5
- package/es/{el-form-item-fc6f80ab.js → el-form-item-55d36086.js} +72 -71
- package/es/el-form-item-ebbf096d.cjs +12 -0
- package/es/el-input-2c7e70a3.cjs +1 -0
- package/es/{el-input-d249ac86.js → el-input-cb528574.js} +65 -63
- package/es/el-input-number-8e168e83.cjs +1 -0
- package/es/{el-input-number-2066fbb7.js → el-input-number-ce30bfa8.js} +22 -21
- package/es/el-message-612c2346.cjs +1 -0
- package/es/{el-message-9859835d.js → el-message-d51d032b.js} +80 -78
- package/es/{el-overlay-f0757cc4.js → el-overlay-07414277.js} +70 -69
- package/es/el-overlay-fb255b83.cjs +1 -0
- package/es/el-popper-8360bd91.cjs +1 -0
- package/es/el-popper-f4b01f85.js +2262 -0
- package/es/el-scrollbar-271142ad.cjs +1 -0
- package/es/el-scrollbar-e8e93751.js +201 -0
- package/es/el-select-2e71d4af.cjs +1 -0
- package/es/{el-select-bcbb7e55.js → el-select-e71af2e6.js} +333 -329
- package/es/el-table-column-9fe79f05.cjs +14 -0
- package/es/el-table-column-dc562f14.js +3933 -0
- package/es/el-tag-930e7b32.cjs +1 -0
- package/es/el-tag-d65768f4.js +279 -0
- package/es/index-0ed86daf.cjs +3 -0
- package/es/index-121e2861.js +306 -0
- package/es/index-18416440.cjs +1 -0
- package/es/index-674d2fd7.cjs +1 -0
- package/es/index-709675d5.js +59 -0
- package/es/{index-45de4a12.js → index-92ba4292.js} +13 -13
- package/es/index-aece600c.js +81 -0
- package/es/index-da646183.cjs +1 -0
- package/es/raf-2d77cbbe.cjs +1 -0
- package/es/raf-f55e0daa.js +6 -0
- package/es/{scroll-cca17da0.cjs → scroll-c8ac196e.cjs} +1 -1
- package/es/{scroll-cb696ed2.js → scroll-ca84f80a.js} +1 -1
- package/es/style.css +1 -1
- package/es/typescript-7ae59c4c.js +4 -0
- package/es/typescript-b63f8e83.cjs +1 -0
- package/es/use-form-common-props-4d37077d.js +586 -0
- package/es/use-form-common-props-c1960844.cjs +2 -0
- package/es/{zh-cn-ef7d7220.js → zh-cn-23c8e0d1.js} +2 -2
- package/es/{zh-cn-37af467d.cjs → zh-cn-414d7f0c.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-24f8572c.js → index-ffeb163e.js} +2 -2
- package/lib/{python-2143eee4.js → python-0ec8f68c.js} +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/utils.js +1 -1
- package/es/_initCloneObject-7493ecd5.cjs +0 -1
- package/es/config-provider-419ffbf2.js +0 -120
- package/es/config-provider-68414290.cjs +0 -3
- package/es/dropdown-127a8c0d.cjs +0 -1
- package/es/el-button-c00975e1.cjs +0 -1
- package/es/el-checkbox-group-0554b352.js +0 -67
- package/es/el-checkbox-group-7a313d34.cjs +0 -1
- package/es/el-form-item-7867f64d.cjs +0 -12
- package/es/el-input-2ff1628c.cjs +0 -1
- package/es/el-input-number-d6801a5c.cjs +0 -1
- package/es/el-message-ffcf690c.cjs +0 -1
- package/es/el-overlay-91784be2.cjs +0 -1
- package/es/el-popover-4db657e2.cjs +0 -1
- package/es/el-popover-b7b43c1f.js +0 -138
- package/es/el-scrollbar-35bac6b3.js +0 -2452
- package/es/el-scrollbar-ec09bbd3.cjs +0 -1
- package/es/el-select-0785c35a.cjs +0 -1
- package/es/el-table-column-2478adf8.cjs +0 -14
- package/es/el-table-column-c1e1a206.js +0 -3798
- package/es/el-tag-13ee17b3.cjs +0 -1
- package/es/el-tag-73372c6c.js +0 -359
- package/es/index-07b61d12.cjs +0 -1
- package/es/index-65b719a4.cjs +0 -1
- package/es/index-8b5fbc11.js +0 -66
- package/es/index-8c85d7c5.js +0 -858
- package/es/index-a49f4743.cjs +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("./el-popper-8360bd91.cjs"),g=require("./base-6ccc8fc2.cjs");var F="__lodash_hash_undefined__";function U(n){return this.__data__.set(n,F),this}function N(n){return this.__data__.has(n)}function R(n){var e=-1,r=n==null?0:n.length;for(this.__data__=new g.MapCache;++e<r;)this.add(n[e])}R.prototype.add=R.prototype.push=U;R.prototype.has=N;function K(n,e){for(var r=-1,t=n==null?0:n.length;++r<t;)if(e(n[r],r,n))return!0;return!1}function q(n,e){return n.has(e)}var m=1,J=2;function $(n,e,r,t,f,i){var a=r&m,s=n.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var d=i.get(n),o=i.get(e);if(d&&o)return d==e&&o==n;var A=-1,u=!0,_=r&J?new R:void 0;for(i.set(n,e),i.set(e,n);++A<s;){var c=n[A],v=e[A];if(t)var y=a?t(v,c,A,e,n,i):t(c,v,A,n,e,i);if(y!==void 0){if(y)continue;u=!1;break}if(_){if(!K(e,function(E,T){if(!q(_,T)&&(c===E||f(c,E,r,t,i)))return _.push(T)})){u=!1;break}}else if(!(c===v||f(c,v,r,t,i))){u=!1;break}}return i.delete(n),i.delete(e),u}function Q(n){var e=-1,r=Array(n.size);return n.forEach(function(t,f){r[++e]=[f,t]}),r}function X(n){var e=-1,r=Array(n.size);return n.forEach(function(t){r[++e]=t}),r}var Y=1,Z=2,b="[object Boolean]",W="[object Date]",z="[object Error]",V="[object Map]",j="[object Number]",k="[object RegExp]",nn="[object Set]",en="[object String]",rn="[object Symbol]",tn="[object ArrayBuffer]",fn="[object DataView]",D=g.Symbol?g.Symbol.prototype:void 0,C=D?D.valueOf:void 0;function sn(n,e,r,t,f,i,a){switch(r){case fn:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case tn:return!(n.byteLength!=e.byteLength||!i(new p.Uint8Array(n),new p.Uint8Array(e)));case b:case W:case j:return g.eq(+n,+e);case z:return n.name==e.name&&n.message==e.message;case k:case en:return n==e+"";case V:var s=Q;case nn:var l=t&Y;if(s||(s=X),n.size!=e.size&&!l)return!1;var d=a.get(n);if(d)return d==e;t|=Z,a.set(n,e);var o=$(s(n),s(e),t,f,i,a);return a.delete(n),o;case rn:if(C)return C.call(n)==C.call(e)}return!1}var an=1,un=Object.prototype,ln=un.hasOwnProperty;function dn(n,e,r,t,f,i){var a=r&an,s=p.getAllKeys(n),l=s.length,d=p.getAllKeys(e),o=d.length;if(l!=o&&!a)return!1;for(var A=l;A--;){var u=s[A];if(!(a?u in e:ln.call(e,u)))return!1}var _=i.get(n),c=i.get(e);if(_&&c)return _==e&&c==n;var v=!0;i.set(n,e),i.set(e,n);for(var y=a;++A<l;){u=s[A];var E=n[u],T=e[u];if(t)var M=a?t(T,E,u,e,n,i):t(E,T,u,n,e,i);if(!(M===void 0?E===T||f(E,T,r,t,i):M)){v=!1;break}y||(y=u=="constructor")}if(v&&!y){var P=n.constructor,L=e.constructor;P!=L&&"constructor"in n&&"constructor"in e&&!(typeof P=="function"&&P instanceof P&&typeof L=="function"&&L instanceof L)&&(v=!1)}return i.delete(n),i.delete(e),v}var gn=1,I="[object Arguments]",x="[object Array]",w="[object Object]",An=Object.prototype,h=An.hasOwnProperty;function pn(n,e,r,t,f,i){var a=g.isArray(n),s=g.isArray(e),l=a?x:p.getTag(n),d=s?x:p.getTag(e);l=l==I?w:l,d=d==I?w:d;var o=l==w,A=d==w,u=l==d;if(u&&p.isBuffer(n)){if(!p.isBuffer(e))return!1;a=!0,o=!1}if(u&&!o)return i||(i=new p.Stack),a||p.isTypedArray(n)?$(n,e,r,t,f,i):sn(n,e,l,r,t,f,i);if(!(r&gn)){var _=o&&h.call(n,"__wrapped__"),c=A&&h.call(e,"__wrapped__");if(_||c){var v=_?n.value():n,y=c?e.value():e;return i||(i=new p.Stack),f(v,y,r,t,i)}}return u?(i||(i=new p.Stack),dn(n,e,r,t,f,i)):!1}function S(n,e,r,t,f){return n===e?!0:n==null||e==null||!g.isObjectLike(n)&&!g.isObjectLike(e)?n!==n&&e!==e:pn(n,e,r,t,S,f)}var on=1,cn=2;function _n(n,e,r,t){var f=r.length,i=f,a=!t;if(n==null)return!i;for(n=Object(n);f--;){var s=r[f];if(a&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<i;){s=r[f];var l=s[0],d=n[l],o=s[1];if(a&&s[2]){if(d===void 0&&!(l in n))return!1}else{var A=new p.Stack;if(t)var u=t(d,o,l,n,e,A);if(!(u===void 0?S(o,d,on|cn,t,A):u))return!1}}return!0}function H(n){return n===n&&!g.isObject(n)}function vn(n){for(var e=p.keys(n),r=e.length;r--;){var t=e[r],f=n[t];e[r]=[t,f,H(f)]}return e}function B(n,e){return function(r){return r==null?!1:r[n]===e&&(e!==void 0||n in Object(r))}}function yn(n){var e=vn(n);return e.length==1&&e[0][2]?B(e[0][0],e[0][1]):function(r){return r===n||_n(r,n,e)}}var On=1,En=2;function Tn(n,e){return g.isKey(n)&&H(e)?B(g.toKey(n),e):function(r){var t=g.get(r,n);return t===void 0&&t===e?p.hasIn(r,n):S(e,t,On|En)}}function Pn(n){return function(e){return e==null?void 0:e[n]}}function Ln(n){return function(e){return g.baseGet(e,n)}}function wn(n){return g.isKey(n)?Pn(g.toKey(n)):Ln(n)}function Rn(n){return typeof n=="function"?n:n==null?p.identity:typeof n=="object"?g.isArray(n)?Tn(n[0],n[1]):yn(n):wn(n)}function Sn(n,e){return S(n,e)}const O=new Map;if(g.isClient){let n;document.addEventListener("mousedown",e=>n=e),document.addEventListener("mouseup",e=>{if(n){for(const r of O.values())for(const{documentHandler:t}of r)t(e,n);n=void 0}})}function G(n,e){let r=[];return g.isArray$1(e.arg)?r=e.arg:g.isElement(e.arg)&&r.push(e.arg),function(t,f){const i=e.instance.popperRef,a=t.target,s=f==null?void 0:f.target,l=!e||!e.instance,d=!a||!s,o=n.contains(a)||n.contains(s),A=n===a,u=r.length&&r.some(c=>c==null?void 0:c.contains(a))||r.length&&r.includes(s),_=i&&(i.contains(a)||i.contains(s));l||d||o||A||u||_||e.value(t,f)}}const Cn={beforeMount(n,e){O.has(n)||O.set(n,[]),O.get(n).push({documentHandler:G(n,e),bindingFn:e.value})},updated(n,e){O.has(n)||O.set(n,[]);const r=O.get(n),t=r.findIndex(i=>i.bindingFn===e.oldValue),f={documentHandler:G(n,e),bindingFn:e.value};t>=0?r.splice(t,1,f):r.push(f)},unmounted(n){O.delete(n)}};exports.ClickOutside=Cn;exports.baseIteratee=Rn;exports.isEqual=Sn;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { U as D, h as I, j as x, k as h, S as L, l as Q, m as Y, n as Z, p as W } from "./el-popper-f4b01f85.js";
|
|
2
|
+
import { a0 as b, a1 as $, V as z, a as M, a2 as G, A as V, a3 as N, X as K, C as j, a4 as k, i as nn, S as en, c as rn } from "./base-950bac7e.js";
|
|
3
|
+
var tn = "__lodash_hash_undefined__";
|
|
4
|
+
function fn(n) {
|
|
5
|
+
return this.__data__.set(n, tn), this;
|
|
6
|
+
}
|
|
7
|
+
function an(n) {
|
|
8
|
+
return this.__data__.has(n);
|
|
9
|
+
}
|
|
10
|
+
function w(n) {
|
|
11
|
+
var e = -1, r = n == null ? 0 : n.length;
|
|
12
|
+
for (this.__data__ = new b(); ++e < r; )
|
|
13
|
+
this.add(n[e]);
|
|
14
|
+
}
|
|
15
|
+
w.prototype.add = w.prototype.push = fn;
|
|
16
|
+
w.prototype.has = an;
|
|
17
|
+
function sn(n, e) {
|
|
18
|
+
for (var r = -1, t = n == null ? 0 : n.length; ++r < t; )
|
|
19
|
+
if (e(n[r], r, n))
|
|
20
|
+
return !0;
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
function un(n, e) {
|
|
24
|
+
return n.has(e);
|
|
25
|
+
}
|
|
26
|
+
var ln = 1, dn = 2;
|
|
27
|
+
function q(n, e, r, t, f, i) {
|
|
28
|
+
var s = r & ln, a = n.length, l = e.length;
|
|
29
|
+
if (a != l && !(s && l > a))
|
|
30
|
+
return !1;
|
|
31
|
+
var d = i.get(n), p = i.get(e);
|
|
32
|
+
if (d && p)
|
|
33
|
+
return d == e && p == n;
|
|
34
|
+
var g = -1, u = !0, o = r & dn ? new w() : void 0;
|
|
35
|
+
for (i.set(n, e), i.set(e, n); ++g < a; ) {
|
|
36
|
+
var A = n[g], _ = e[g];
|
|
37
|
+
if (t)
|
|
38
|
+
var v = s ? t(_, A, g, e, n, i) : t(A, _, g, n, e, i);
|
|
39
|
+
if (v !== void 0) {
|
|
40
|
+
if (v)
|
|
41
|
+
continue;
|
|
42
|
+
u = !1;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
if (o) {
|
|
46
|
+
if (!sn(e, function(E, O) {
|
|
47
|
+
if (!un(o, O) && (A === E || f(A, E, r, t, i)))
|
|
48
|
+
return o.push(O);
|
|
49
|
+
})) {
|
|
50
|
+
u = !1;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
} else if (!(A === _ || f(A, _, r, t, i))) {
|
|
54
|
+
u = !1;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return i.delete(n), i.delete(e), u;
|
|
59
|
+
}
|
|
60
|
+
function gn(n) {
|
|
61
|
+
var e = -1, r = Array(n.size);
|
|
62
|
+
return n.forEach(function(t, f) {
|
|
63
|
+
r[++e] = [f, t];
|
|
64
|
+
}), r;
|
|
65
|
+
}
|
|
66
|
+
function pn(n) {
|
|
67
|
+
var e = -1, r = Array(n.size);
|
|
68
|
+
return n.forEach(function(t) {
|
|
69
|
+
r[++e] = t;
|
|
70
|
+
}), r;
|
|
71
|
+
}
|
|
72
|
+
var An = 1, on = 2, _n = "[object Boolean]", vn = "[object Date]", cn = "[object Error]", En = "[object Map]", On = "[object Number]", Tn = "[object RegExp]", Pn = "[object Set]", yn = "[object String]", Ln = "[object Symbol]", wn = "[object ArrayBuffer]", Rn = "[object DataView]", H = $ ? $.prototype : void 0, C = H ? H.valueOf : void 0;
|
|
73
|
+
function Cn(n, e, r, t, f, i, s) {
|
|
74
|
+
switch (r) {
|
|
75
|
+
case Rn:
|
|
76
|
+
if (n.byteLength != e.byteLength || n.byteOffset != e.byteOffset)
|
|
77
|
+
return !1;
|
|
78
|
+
n = n.buffer, e = e.buffer;
|
|
79
|
+
case wn:
|
|
80
|
+
return !(n.byteLength != e.byteLength || !i(new D(n), new D(e)));
|
|
81
|
+
case _n:
|
|
82
|
+
case vn:
|
|
83
|
+
case On:
|
|
84
|
+
return z(+n, +e);
|
|
85
|
+
case cn:
|
|
86
|
+
return n.name == e.name && n.message == e.message;
|
|
87
|
+
case Tn:
|
|
88
|
+
case yn:
|
|
89
|
+
return n == e + "";
|
|
90
|
+
case En:
|
|
91
|
+
var a = gn;
|
|
92
|
+
case Pn:
|
|
93
|
+
var l = t & An;
|
|
94
|
+
if (a || (a = pn), n.size != e.size && !l)
|
|
95
|
+
return !1;
|
|
96
|
+
var d = s.get(n);
|
|
97
|
+
if (d)
|
|
98
|
+
return d == e;
|
|
99
|
+
t |= on, s.set(n, e);
|
|
100
|
+
var p = q(a(n), a(e), t, f, i, s);
|
|
101
|
+
return s.delete(n), p;
|
|
102
|
+
case Ln:
|
|
103
|
+
if (C)
|
|
104
|
+
return C.call(n) == C.call(e);
|
|
105
|
+
}
|
|
106
|
+
return !1;
|
|
107
|
+
}
|
|
108
|
+
var Mn = 1, Sn = Object.prototype, Dn = Sn.hasOwnProperty;
|
|
109
|
+
function In(n, e, r, t, f, i) {
|
|
110
|
+
var s = r & Mn, a = I(n), l = a.length, d = I(e), p = d.length;
|
|
111
|
+
if (l != p && !s)
|
|
112
|
+
return !1;
|
|
113
|
+
for (var g = l; g--; ) {
|
|
114
|
+
var u = a[g];
|
|
115
|
+
if (!(s ? u in e : Dn.call(e, u)))
|
|
116
|
+
return !1;
|
|
117
|
+
}
|
|
118
|
+
var o = i.get(n), A = i.get(e);
|
|
119
|
+
if (o && A)
|
|
120
|
+
return o == e && A == n;
|
|
121
|
+
var _ = !0;
|
|
122
|
+
i.set(n, e), i.set(e, n);
|
|
123
|
+
for (var v = s; ++g < l; ) {
|
|
124
|
+
u = a[g];
|
|
125
|
+
var E = n[u], O = e[u];
|
|
126
|
+
if (t)
|
|
127
|
+
var S = s ? t(O, E, u, e, n, i) : t(E, O, u, n, e, i);
|
|
128
|
+
if (!(S === void 0 ? E === O || f(E, O, r, t, i) : S)) {
|
|
129
|
+
_ = !1;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
v || (v = u == "constructor");
|
|
133
|
+
}
|
|
134
|
+
if (_ && !v) {
|
|
135
|
+
var T = n.constructor, P = e.constructor;
|
|
136
|
+
T != P && "constructor" in n && "constructor" in e && !(typeof T == "function" && T instanceof T && typeof P == "function" && P instanceof P) && (_ = !1);
|
|
137
|
+
}
|
|
138
|
+
return i.delete(n), i.delete(e), _;
|
|
139
|
+
}
|
|
140
|
+
var xn = 1, F = "[object Arguments]", B = "[object Array]", y = "[object Object]", hn = Object.prototype, U = hn.hasOwnProperty;
|
|
141
|
+
function $n(n, e, r, t, f, i) {
|
|
142
|
+
var s = M(n), a = M(e), l = s ? B : x(n), d = a ? B : x(e);
|
|
143
|
+
l = l == F ? y : l, d = d == F ? y : d;
|
|
144
|
+
var p = l == y, g = d == y, u = l == d;
|
|
145
|
+
if (u && h(n)) {
|
|
146
|
+
if (!h(e))
|
|
147
|
+
return !1;
|
|
148
|
+
s = !0, p = !1;
|
|
149
|
+
}
|
|
150
|
+
if (u && !p)
|
|
151
|
+
return i || (i = new L()), s || Q(n) ? q(n, e, r, t, f, i) : Cn(n, e, l, r, t, f, i);
|
|
152
|
+
if (!(r & xn)) {
|
|
153
|
+
var o = p && U.call(n, "__wrapped__"), A = g && U.call(e, "__wrapped__");
|
|
154
|
+
if (o || A) {
|
|
155
|
+
var _ = o ? n.value() : n, v = A ? e.value() : e;
|
|
156
|
+
return i || (i = new L()), f(_, v, r, t, i);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return u ? (i || (i = new L()), In(n, e, r, t, f, i)) : !1;
|
|
160
|
+
}
|
|
161
|
+
function R(n, e, r, t, f) {
|
|
162
|
+
return n === e ? !0 : n == null || e == null || !G(n) && !G(e) ? n !== n && e !== e : $n(n, e, r, t, R, f);
|
|
163
|
+
}
|
|
164
|
+
var Gn = 1, Hn = 2;
|
|
165
|
+
function Fn(n, e, r, t) {
|
|
166
|
+
var f = r.length, i = f, s = !t;
|
|
167
|
+
if (n == null)
|
|
168
|
+
return !i;
|
|
169
|
+
for (n = Object(n); f--; ) {
|
|
170
|
+
var a = r[f];
|
|
171
|
+
if (s && a[2] ? a[1] !== n[a[0]] : !(a[0] in n))
|
|
172
|
+
return !1;
|
|
173
|
+
}
|
|
174
|
+
for (; ++f < i; ) {
|
|
175
|
+
a = r[f];
|
|
176
|
+
var l = a[0], d = n[l], p = a[1];
|
|
177
|
+
if (s && a[2]) {
|
|
178
|
+
if (d === void 0 && !(l in n))
|
|
179
|
+
return !1;
|
|
180
|
+
} else {
|
|
181
|
+
var g = new L();
|
|
182
|
+
if (t)
|
|
183
|
+
var u = t(d, p, l, n, e, g);
|
|
184
|
+
if (!(u === void 0 ? R(p, d, Gn | Hn, t, g) : u))
|
|
185
|
+
return !1;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return !0;
|
|
189
|
+
}
|
|
190
|
+
function X(n) {
|
|
191
|
+
return n === n && !V(n);
|
|
192
|
+
}
|
|
193
|
+
function Bn(n) {
|
|
194
|
+
for (var e = Y(n), r = e.length; r--; ) {
|
|
195
|
+
var t = e[r], f = n[t];
|
|
196
|
+
e[r] = [t, f, X(f)];
|
|
197
|
+
}
|
|
198
|
+
return e;
|
|
199
|
+
}
|
|
200
|
+
function J(n, e) {
|
|
201
|
+
return function(r) {
|
|
202
|
+
return r == null ? !1 : r[n] === e && (e !== void 0 || n in Object(r));
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function Un(n) {
|
|
206
|
+
var e = Bn(n);
|
|
207
|
+
return e.length == 1 && e[0][2] ? J(e[0][0], e[0][1]) : function(r) {
|
|
208
|
+
return r === n || Fn(r, n, e);
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
var mn = 1, Nn = 2;
|
|
212
|
+
function Kn(n, e) {
|
|
213
|
+
return N(n) && X(e) ? J(K(n), e) : function(r) {
|
|
214
|
+
var t = j(r, n);
|
|
215
|
+
return t === void 0 && t === e ? Z(r, n) : R(e, t, mn | Nn);
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function qn(n) {
|
|
219
|
+
return function(e) {
|
|
220
|
+
return e == null ? void 0 : e[n];
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
function Xn(n) {
|
|
224
|
+
return function(e) {
|
|
225
|
+
return k(e, n);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function Jn(n) {
|
|
229
|
+
return N(n) ? qn(K(n)) : Xn(n);
|
|
230
|
+
}
|
|
231
|
+
function Zn(n) {
|
|
232
|
+
return typeof n == "function" ? n : n == null ? W : typeof n == "object" ? M(n) ? Kn(n[0], n[1]) : Un(n) : Jn(n);
|
|
233
|
+
}
|
|
234
|
+
function Wn(n, e) {
|
|
235
|
+
return R(n, e);
|
|
236
|
+
}
|
|
237
|
+
const c = /* @__PURE__ */ new Map();
|
|
238
|
+
if (nn) {
|
|
239
|
+
let n;
|
|
240
|
+
document.addEventListener("mousedown", (e) => n = e), document.addEventListener("mouseup", (e) => {
|
|
241
|
+
if (n) {
|
|
242
|
+
for (const r of c.values())
|
|
243
|
+
for (const { documentHandler: t } of r)
|
|
244
|
+
t(e, n);
|
|
245
|
+
n = void 0;
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
function m(n, e) {
|
|
250
|
+
let r = [];
|
|
251
|
+
return en(e.arg) ? r = e.arg : rn(e.arg) && r.push(e.arg), function(t, f) {
|
|
252
|
+
const i = e.instance.popperRef, s = t.target, a = f == null ? void 0 : f.target, l = !e || !e.instance, d = !s || !a, p = n.contains(s) || n.contains(a), g = n === s, u = r.length && r.some((A) => A == null ? void 0 : A.contains(s)) || r.length && r.includes(a), o = i && (i.contains(s) || i.contains(a));
|
|
253
|
+
l || d || p || g || u || o || e.value(t, f);
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
const bn = {
|
|
257
|
+
beforeMount(n, e) {
|
|
258
|
+
c.has(n) || c.set(n, []), c.get(n).push({
|
|
259
|
+
documentHandler: m(n, e),
|
|
260
|
+
bindingFn: e.value
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
updated(n, e) {
|
|
264
|
+
c.has(n) || c.set(n, []);
|
|
265
|
+
const r = c.get(n), t = r.findIndex((i) => i.bindingFn === e.oldValue), f = {
|
|
266
|
+
documentHandler: m(n, e),
|
|
267
|
+
bindingFn: e.value
|
|
268
|
+
};
|
|
269
|
+
t >= 0 ? r.splice(t, 1, f) : r.push(f);
|
|
270
|
+
},
|
|
271
|
+
unmounted(n) {
|
|
272
|
+
c.delete(n);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
export {
|
|
276
|
+
bn as C,
|
|
277
|
+
Zn as b,
|
|
278
|
+
Wn as i
|
|
279
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const n=require("vue"),s=require("./base-6ccc8fc2.cjs"),c=require("./use-form-common-props-c1960844.cjs"),m=Symbol();function C(o,u,t){return o==null?o:c.baseSet(o,u,t)}const f=o=>Object.keys(o),b=(o,u,t)=>({get value(){return s.get(o,u,t)},set value(l){C(o,u,l)}}),d=n.ref();function v(o,u=void 0){const t=n.getCurrentInstance()?n.inject(m,d):d;return o?n.computed(()=>{var l,r;return(r=(l=t.value)==null?void 0:l[o])!=null?r:u}):t}function y(o,u){const t=v(),l=s.useNamespace(o,n.computed(()=>{var e;return((e=t.value)==null?void 0:e.namespace)||s.defaultNamespace})),r=s.useLocale(n.computed(()=>{var e;return(e=t.value)==null?void 0:e.locale})),i=c.useZIndex(n.computed(()=>{var e;return((e=t.value)==null?void 0:e.zIndex)||c.defaultInitialZIndex})),a=n.computed(()=>{var e;return n.unref(u)||((e=t.value)==null?void 0:e.size)||""});return g(n.computed(()=>n.unref(t)||{})),{ns:l,locale:r,zIndex:i,size:a}}const g=(o,u,t=!1)=>{var l;const r=!!n.getCurrentInstance(),i=r?v():void 0,a=(l=u==null?void 0:u.provide)!=null?l:r?n.provide:void 0;if(!a){s.debugWarn("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const e=n.computed(()=>{const p=n.unref(o);return i!=null&&i.value?I(i.value,p):p});return a(m,e),a(s.localeContextKey,n.computed(()=>e.value.locale)),a(s.namespaceContextKey,n.computed(()=>e.value.namespace)),a(c.zIndexContextKey,n.computed(()=>e.value.zIndex)),a(c.SIZE_INJECTION_KEY,{size:n.computed(()=>e.value.size||"")}),a(c.emptyValuesContextKey,n.computed(()=>({emptyValues:e.value.emptyValues,valueOnClear:e.value.valueOnClear}))),(t||!d.value)&&(d.value=e.value),e},I=(o,u)=>{const t=[...new Set([...f(o),...f(u)])],l={};for(const r of t)l[r]=u[r]!==void 0?u[r]:o[r];return l},x=({from:o,replacement:u,scope:t,version:l,ref:r,type:i="API"},a)=>{n.watch(()=>n.unref(a),e=>{e&&s.debugWarn(t,`[${i}] ${o} is about to be deprecated in version ${l}, please use ${u} instead.
|
|
2
|
+
For more detail, please visit: ${r}
|
|
3
|
+
`)},{immediate:!0})};exports.getProp=b;exports.provideGlobalConfig=g;exports.useDeprecated=x;exports.useGlobalComponentSettings=y;exports.useGlobalConfig=v;
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { ref as y, onMounted as I, onBeforeUnmount as R, defineComponent as ee, provide as ae, watch as A, unref as b, nextTick as M, renderSlot as O, openBlock as ce, createBlock as ue, Teleport as ie } from "vue";
|
|
2
|
+
import { c as q, i as j, m as de, _ as te, v as fe, b as le, d as pe, w as Ee } from "./base-950bac7e.js";
|
|
3
|
+
function De(e) {
|
|
4
|
+
return e === void 0;
|
|
5
|
+
}
|
|
6
|
+
const xe = "update:modelValue", Ke = "change", Ve = "input", ve = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', Te = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, Be = (e) => Array.from(e.querySelectorAll(ve)).filter((t) => ne(t) && Te(t)), ne = (e) => {
|
|
7
|
+
if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
|
|
8
|
+
return !0;
|
|
9
|
+
if (e.tabIndex < 0 || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true")
|
|
10
|
+
return !1;
|
|
11
|
+
switch (e.nodeName) {
|
|
12
|
+
case "A":
|
|
13
|
+
return !!e.href && e.rel !== "ignore";
|
|
14
|
+
case "INPUT":
|
|
15
|
+
return !(e.type === "hidden" || e.type === "file");
|
|
16
|
+
case "BUTTON":
|
|
17
|
+
case "SELECT":
|
|
18
|
+
case "TEXTAREA":
|
|
19
|
+
return !0;
|
|
20
|
+
default:
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
}, $e = function(e, t, ...o) {
|
|
24
|
+
let s;
|
|
25
|
+
t.includes("mouse") || t.includes("click") ? s = "MouseEvents" : t.includes("key") ? s = "KeyboardEvent" : s = "HTMLEvents";
|
|
26
|
+
const a = document.createEvent(s);
|
|
27
|
+
return a.initEvent(t, ...o), e.dispatchEvent(a), e;
|
|
28
|
+
}, N = "focus-trap.focus-after-trapped", C = "focus-trap.focus-after-released", be = "focus-trap.focusout-prevented", W = {
|
|
29
|
+
cancelable: !0,
|
|
30
|
+
bubbles: !1
|
|
31
|
+
}, me = {
|
|
32
|
+
cancelable: !0,
|
|
33
|
+
bubbles: !1
|
|
34
|
+
}, G = "focusAfterTrapped", J = "focusAfterReleased", Fe = Symbol("elFocusTrap"), U = y(), h = y(0), k = y(0);
|
|
35
|
+
let m = 0;
|
|
36
|
+
const se = (e) => {
|
|
37
|
+
const t = [], o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
38
|
+
acceptNode: (s) => {
|
|
39
|
+
const a = s.tagName === "INPUT" && s.type === "hidden";
|
|
40
|
+
return s.disabled || s.hidden || a ? NodeFilter.FILTER_SKIP : s.tabIndex >= 0 || s === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
for (; o.nextNode(); )
|
|
44
|
+
t.push(o.currentNode);
|
|
45
|
+
return t;
|
|
46
|
+
}, X = (e, t) => {
|
|
47
|
+
for (const o of e)
|
|
48
|
+
if (!_e(o, t))
|
|
49
|
+
return o;
|
|
50
|
+
}, _e = (e, t) => {
|
|
51
|
+
if (process.env.NODE_ENV === "test")
|
|
52
|
+
return !1;
|
|
53
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
54
|
+
return !0;
|
|
55
|
+
for (; e; ) {
|
|
56
|
+
if (t && e === t)
|
|
57
|
+
return !1;
|
|
58
|
+
if (getComputedStyle(e).display === "none")
|
|
59
|
+
return !0;
|
|
60
|
+
e = e.parentElement;
|
|
61
|
+
}
|
|
62
|
+
return !1;
|
|
63
|
+
}, ye = (e) => {
|
|
64
|
+
const t = se(e), o = X(t, e), s = X(t.reverse(), e);
|
|
65
|
+
return [o, s];
|
|
66
|
+
}, he = (e) => e instanceof HTMLInputElement && "select" in e, l = (e, t) => {
|
|
67
|
+
if (e && e.focus) {
|
|
68
|
+
const o = document.activeElement;
|
|
69
|
+
let s = !1;
|
|
70
|
+
q(e) && !ne(e) && !e.getAttribute("tabindex") && (e.setAttribute("tabindex", "-1"), s = !0), e.focus({ preventScroll: !0 }), k.value = window.performance.now(), e !== o && he(e) && t && e.select(), q(e) && s && e.removeAttribute("tabindex");
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
function Y(e, t) {
|
|
74
|
+
const o = [...e], s = e.indexOf(t);
|
|
75
|
+
return s !== -1 && o.splice(s, 1), o;
|
|
76
|
+
}
|
|
77
|
+
const Pe = () => {
|
|
78
|
+
let e = [];
|
|
79
|
+
return {
|
|
80
|
+
push: (s) => {
|
|
81
|
+
const a = e[0];
|
|
82
|
+
a && s !== a && a.pause(), e = Y(e, s), e.unshift(s);
|
|
83
|
+
},
|
|
84
|
+
remove: (s) => {
|
|
85
|
+
var a, d;
|
|
86
|
+
e = Y(e, s), (d = (a = e[0]) == null ? void 0 : a.resume) == null || d.call(a);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}, ge = (e, t = !1) => {
|
|
90
|
+
const o = document.activeElement;
|
|
91
|
+
for (const s of e)
|
|
92
|
+
if (l(s, t), document.activeElement !== o)
|
|
93
|
+
return;
|
|
94
|
+
}, z = Pe(), we = () => h.value > k.value, F = () => {
|
|
95
|
+
U.value = "pointer", h.value = window.performance.now();
|
|
96
|
+
}, Q = () => {
|
|
97
|
+
U.value = "keyboard", h.value = window.performance.now();
|
|
98
|
+
}, Le = () => (I(() => {
|
|
99
|
+
m === 0 && (document.addEventListener("mousedown", F), document.addEventListener("touchstart", F), document.addEventListener("keydown", Q)), m++;
|
|
100
|
+
}), R(() => {
|
|
101
|
+
m--, m <= 0 && (document.removeEventListener("mousedown", F), document.removeEventListener("touchstart", F), document.removeEventListener("keydown", Q));
|
|
102
|
+
}), {
|
|
103
|
+
focusReason: U,
|
|
104
|
+
lastUserFocusTimestamp: h,
|
|
105
|
+
lastAutomatedFocusTimestamp: k
|
|
106
|
+
}), _ = (e) => new CustomEvent(be, {
|
|
107
|
+
...me,
|
|
108
|
+
detail: e
|
|
109
|
+
}), oe = {
|
|
110
|
+
tab: "Tab",
|
|
111
|
+
enter: "Enter",
|
|
112
|
+
space: "Space",
|
|
113
|
+
left: "ArrowLeft",
|
|
114
|
+
up: "ArrowUp",
|
|
115
|
+
right: "ArrowRight",
|
|
116
|
+
down: "ArrowDown",
|
|
117
|
+
esc: "Escape",
|
|
118
|
+
delete: "Delete",
|
|
119
|
+
backspace: "Backspace",
|
|
120
|
+
numpadEnter: "NumpadEnter",
|
|
121
|
+
pageUp: "PageUp",
|
|
122
|
+
pageDown: "PageDown",
|
|
123
|
+
home: "Home",
|
|
124
|
+
end: "End"
|
|
125
|
+
};
|
|
126
|
+
let E = [];
|
|
127
|
+
const Z = (e) => {
|
|
128
|
+
e.code === oe.esc && E.forEach((t) => t(e));
|
|
129
|
+
}, Se = (e) => {
|
|
130
|
+
I(() => {
|
|
131
|
+
E.length === 0 && document.addEventListener("keydown", Z), j && E.push(e);
|
|
132
|
+
}), R(() => {
|
|
133
|
+
E = E.filter((t) => t !== e), E.length === 0 && j && document.removeEventListener("keydown", Z);
|
|
134
|
+
});
|
|
135
|
+
}, Ae = ee({
|
|
136
|
+
name: "ElFocusTrap",
|
|
137
|
+
inheritAttrs: !1,
|
|
138
|
+
props: {
|
|
139
|
+
loop: Boolean,
|
|
140
|
+
trapped: Boolean,
|
|
141
|
+
focusTrapEl: Object,
|
|
142
|
+
focusStartEl: {
|
|
143
|
+
type: [Object, String],
|
|
144
|
+
default: "first"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
emits: [
|
|
148
|
+
G,
|
|
149
|
+
J,
|
|
150
|
+
"focusin",
|
|
151
|
+
"focusout",
|
|
152
|
+
"focusout-prevented",
|
|
153
|
+
"release-requested"
|
|
154
|
+
],
|
|
155
|
+
setup(e, { emit: t }) {
|
|
156
|
+
const o = y();
|
|
157
|
+
let s, a;
|
|
158
|
+
const { focusReason: d } = Le();
|
|
159
|
+
Se((n) => {
|
|
160
|
+
e.trapped && !p.paused && t("release-requested", n);
|
|
161
|
+
});
|
|
162
|
+
const p = {
|
|
163
|
+
paused: !1,
|
|
164
|
+
pause() {
|
|
165
|
+
this.paused = !0;
|
|
166
|
+
},
|
|
167
|
+
resume() {
|
|
168
|
+
this.paused = !1;
|
|
169
|
+
}
|
|
170
|
+
}, v = (n) => {
|
|
171
|
+
if (!e.loop && !e.trapped || p.paused)
|
|
172
|
+
return;
|
|
173
|
+
const { code: r, altKey: c, ctrlKey: u, metaKey: i, currentTarget: B, shiftKey: $ } = n, { loop: H } = e, re = r === oe.tab && !c && !u && !i, T = document.activeElement;
|
|
174
|
+
if (re && T) {
|
|
175
|
+
const w = B, [L, S] = ye(w);
|
|
176
|
+
if (L && S) {
|
|
177
|
+
if (!$ && T === S) {
|
|
178
|
+
const f = _({
|
|
179
|
+
focusReason: d.value
|
|
180
|
+
});
|
|
181
|
+
t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(L, !0));
|
|
182
|
+
} else if ($ && [L, w].includes(T)) {
|
|
183
|
+
const f = _({
|
|
184
|
+
focusReason: d.value
|
|
185
|
+
});
|
|
186
|
+
t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(S, !0));
|
|
187
|
+
}
|
|
188
|
+
} else if (T === w) {
|
|
189
|
+
const f = _({
|
|
190
|
+
focusReason: d.value
|
|
191
|
+
});
|
|
192
|
+
t("focusout-prevented", f), f.defaultPrevented || n.preventDefault();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
ae(Fe, {
|
|
197
|
+
focusTrapRef: o,
|
|
198
|
+
onKeydown: v
|
|
199
|
+
}), A(() => e.focusTrapEl, (n) => {
|
|
200
|
+
n && (o.value = n);
|
|
201
|
+
}, { immediate: !0 }), A([o], ([n], [r]) => {
|
|
202
|
+
n && (n.addEventListener("keydown", v), n.addEventListener("focusin", P), n.addEventListener("focusout", g)), r && (r.removeEventListener("keydown", v), r.removeEventListener("focusin", P), r.removeEventListener("focusout", g));
|
|
203
|
+
});
|
|
204
|
+
const D = (n) => {
|
|
205
|
+
t(G, n);
|
|
206
|
+
}, x = (n) => t(J, n), P = (n) => {
|
|
207
|
+
const r = b(o);
|
|
208
|
+
if (!r)
|
|
209
|
+
return;
|
|
210
|
+
const c = n.target, u = n.relatedTarget, i = c && r.contains(c);
|
|
211
|
+
e.trapped || u && r.contains(u) || (s = u), i && t("focusin", n), !p.paused && e.trapped && (i ? a = c : l(a, !0));
|
|
212
|
+
}, g = (n) => {
|
|
213
|
+
const r = b(o);
|
|
214
|
+
if (!(p.paused || !r))
|
|
215
|
+
if (e.trapped) {
|
|
216
|
+
const c = n.relatedTarget;
|
|
217
|
+
!de(c) && !r.contains(c) && setTimeout(() => {
|
|
218
|
+
if (!p.paused && e.trapped) {
|
|
219
|
+
const u = _({
|
|
220
|
+
focusReason: d.value
|
|
221
|
+
});
|
|
222
|
+
t("focusout-prevented", u), u.defaultPrevented || l(a, !0);
|
|
223
|
+
}
|
|
224
|
+
}, 0);
|
|
225
|
+
} else {
|
|
226
|
+
const c = n.target;
|
|
227
|
+
c && r.contains(c) || t("focusout", n);
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
async function K() {
|
|
231
|
+
await M();
|
|
232
|
+
const n = b(o);
|
|
233
|
+
if (n) {
|
|
234
|
+
z.push(p);
|
|
235
|
+
const r = n.contains(document.activeElement) ? s : document.activeElement;
|
|
236
|
+
if (s = r, !n.contains(r)) {
|
|
237
|
+
const u = new Event(N, W);
|
|
238
|
+
n.addEventListener(N, D), n.dispatchEvent(u), u.defaultPrevented || M(() => {
|
|
239
|
+
let i = e.focusStartEl;
|
|
240
|
+
fe(i) || (l(i), document.activeElement !== i && (i = "first")), i === "first" && ge(se(n), !0), (document.activeElement === r || i === "container") && l(n);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function V() {
|
|
246
|
+
const n = b(o);
|
|
247
|
+
if (n) {
|
|
248
|
+
n.removeEventListener(N, D);
|
|
249
|
+
const r = new CustomEvent(C, {
|
|
250
|
+
...W,
|
|
251
|
+
detail: {
|
|
252
|
+
focusReason: d.value
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
n.addEventListener(C, x), n.dispatchEvent(r), !r.defaultPrevented && (d.value == "keyboard" || !we() || n.contains(document.activeElement)) && l(s ?? document.body), n.removeEventListener(C, x), z.remove(p);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return I(() => {
|
|
259
|
+
e.trapped && K(), A(() => e.trapped, (n) => {
|
|
260
|
+
n ? K() : V();
|
|
261
|
+
});
|
|
262
|
+
}), R(() => {
|
|
263
|
+
e.trapped && V(), o.value && (o.value.removeEventListener("keydown", v), o.value.removeEventListener("focusin", P), o.value.removeEventListener("focusout", g), o.value = void 0);
|
|
264
|
+
}), {
|
|
265
|
+
onKeydown: v
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
function Ne(e, t, o, s, a, d) {
|
|
270
|
+
return O(e.$slots, "default", { handleKeydown: e.onKeydown });
|
|
271
|
+
}
|
|
272
|
+
var He = /* @__PURE__ */ te(Ae, [["render", Ne], ["__file", "focus-trap.vue"]]);
|
|
273
|
+
const Ce = le({
|
|
274
|
+
to: {
|
|
275
|
+
type: pe([String, Object]),
|
|
276
|
+
required: !0
|
|
277
|
+
},
|
|
278
|
+
disabled: Boolean
|
|
279
|
+
}), Oe = /* @__PURE__ */ ee({
|
|
280
|
+
__name: "teleport",
|
|
281
|
+
props: Ce,
|
|
282
|
+
setup(e) {
|
|
283
|
+
return (t, o) => t.disabled ? O(t.$slots, "default", { key: 0 }) : (ce(), ue(ie, {
|
|
284
|
+
key: 1,
|
|
285
|
+
to: t.to
|
|
286
|
+
}, [
|
|
287
|
+
O(t.$slots, "default")
|
|
288
|
+
], 8, ["to"]));
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
var Ie = /* @__PURE__ */ te(Oe, [["__file", "teleport.vue"]]);
|
|
292
|
+
const Me = Ee(Ie);
|
|
293
|
+
export {
|
|
294
|
+
Ke as C,
|
|
295
|
+
oe as E,
|
|
296
|
+
Fe as F,
|
|
297
|
+
Ve as I,
|
|
298
|
+
xe as U,
|
|
299
|
+
Me as a,
|
|
300
|
+
He as b,
|
|
301
|
+
ne as c,
|
|
302
|
+
l as d,
|
|
303
|
+
De as i,
|
|
304
|
+
Be as o,
|
|
305
|
+
$e as t
|
|
306
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("vue"),f=require("./base-6ccc8fc2.cjs");function Q(e){return e===void 0}const Z="update:modelValue",ee="change",te="input",ne='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',oe=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,se=e=>Array.from(e.querySelectorAll(ne)).filter(t=>C(t)&&oe(t)),C=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}},re=function(e,t,...s){let o;t.includes("mouse")||t.includes("click")?o="MouseEvents":t.includes("key")?o="KeyboardEvent":o="HTMLEvents";const c=document.createEvent(o);return c.initEvent(t,...s),e.dispatchEvent(c),e},w="focus-trap.focus-after-trapped",L="focus-trap.focus-after-released",ue="focus-trap.focusout-prevented",H={cancelable:!0,bubbles:!1},ce={cancelable:!0,bubbles:!1},M="focusAfterTrapped",$="focusAfterReleased",Y=Symbol("elFocusTrap"),O=r.ref(),P=r.ref(0),U=r.ref(0);let _=0;const X=e=>{const t=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const c=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||c?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t},q=(e,t)=>{for(const s of e)if(!ae(s,t))return s},ae=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;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},ie=e=>{const t=X(e),s=q(t,e),o=q(t.reverse(),e);return[s,o]},de=e=>e instanceof HTMLInputElement&&"select"in e,E=(e,t)=>{if(e&&e.focus){const s=document.activeElement;let o=!1;f.isElement(e)&&!C(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),o=!0),e.focus({preventScroll:!0}),U.value=window.performance.now(),e!==s&&de(e)&&t&&e.select(),f.isElement(e)&&o&&e.removeAttribute("tabindex")}};function j(e,t){const s=[...e],o=e.indexOf(t);return o!==-1&&s.splice(o,1),s}const fe=()=>{let e=[];return{push:o=>{const c=e[0];c&&o!==c&&c.pause(),e=j(e,o),e.unshift(o)},remove:o=>{var c,l;e=j(e,o),(l=(c=e[0])==null?void 0:c.resume)==null||l.call(c)}}},le=(e,t=!1)=>{const s=document.activeElement;for(const o of e)if(E(o,t),document.activeElement!==s)return},G=fe(),Ee=()=>P.value>U.value,F=()=>{O.value="pointer",P.value=window.performance.now()},J=()=>{O.value="keyboard",P.value=window.performance.now()},pe=()=>(r.onMounted(()=>{_===0&&(document.addEventListener("mousedown",F),document.addEventListener("touchstart",F),document.addEventListener("keydown",J)),_++}),r.onBeforeUnmount(()=>{_--,_<=0&&(document.removeEventListener("mousedown",F),document.removeEventListener("touchstart",F),document.removeEventListener("keydown",J))}),{focusReason:O,lastUserFocusTimestamp:P,lastAutomatedFocusTimestamp:U}),y=e=>new CustomEvent(ue,{...ce,detail:e}),I={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 T=[];const W=e=>{e.code===I.esc&&T.forEach(t=>t(e))},ve=e=>{r.onMounted(()=>{T.length===0&&document.addEventListener("keydown",W),f.isClient&&T.push(e)}),r.onBeforeUnmount(()=>{T=T.filter(t=>t!==e),T.length===0&&f.isClient&&document.removeEventListener("keydown",W)})},Te=r.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[M,$,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const s=r.ref();let o,c;const{focusReason:l}=pe();ve(n=>{e.trapped&&!v.paused&&t("release-requested",n)});const v={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},b=n=>{if(!e.loop&&!e.trapped||v.paused)return;const{code:u,altKey:a,ctrlKey:i,metaKey:d,currentTarget:x,shiftKey:K}=n,{loop:B}=e,z=u===I.tab&&!a&&!i&&!d,m=document.activeElement;if(z&&m){const S=x,[g,A]=ie(S);if(g&&A){if(!K&&m===A){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||(n.preventDefault(),B&&E(g,!0))}else if(K&&[g,S].includes(m)){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||(n.preventDefault(),B&&E(A,!0))}}else if(m===S){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||n.preventDefault()}}};r.provide(Y,{focusTrapRef:s,onKeydown:b}),r.watch(()=>e.focusTrapEl,n=>{n&&(s.value=n)},{immediate:!0}),r.watch([s],([n],[u])=>{n&&(n.addEventListener("keydown",b),n.addEventListener("focusin",h),n.addEventListener("focusout",N)),u&&(u.removeEventListener("keydown",b),u.removeEventListener("focusin",h),u.removeEventListener("focusout",N))});const R=n=>{t(M,n)},k=n=>t($,n),h=n=>{const u=r.unref(s);if(!u)return;const a=n.target,i=n.relatedTarget,d=a&&u.contains(a);e.trapped||i&&u.contains(i)||(o=i),d&&t("focusin",n),!v.paused&&e.trapped&&(d?c=a:E(c,!0))},N=n=>{const u=r.unref(s);if(!(v.paused||!u))if(e.trapped){const a=n.relatedTarget;!f.isNil(a)&&!u.contains(a)&&setTimeout(()=>{if(!v.paused&&e.trapped){const i=y({focusReason:l.value});t("focusout-prevented",i),i.defaultPrevented||E(c,!0)}},0)}else{const a=n.target;a&&u.contains(a)||t("focusout",n)}};async function D(){await r.nextTick();const n=r.unref(s);if(n){G.push(v);const u=n.contains(document.activeElement)?o:document.activeElement;if(o=u,!n.contains(u)){const i=new Event(w,H);n.addEventListener(w,R),n.dispatchEvent(i),i.defaultPrevented||r.nextTick(()=>{let d=e.focusStartEl;f.isString$1(d)||(E(d),document.activeElement!==d&&(d="first")),d==="first"&&le(X(n),!0),(document.activeElement===u||d==="container")&&E(n)})}}}function V(){const n=r.unref(s);if(n){n.removeEventListener(w,R);const u=new CustomEvent(L,{...H,detail:{focusReason:l.value}});n.addEventListener(L,k),n.dispatchEvent(u),!u.defaultPrevented&&(l.value=="keyboard"||!Ee()||n.contains(document.activeElement))&&E(o??document.body),n.removeEventListener(L,k),G.remove(v)}}return r.onMounted(()=>{e.trapped&&D(),r.watch(()=>e.trapped,n=>{n?D():V()})}),r.onBeforeUnmount(()=>{e.trapped&&V(),s.value&&(s.value.removeEventListener("keydown",b),s.value.removeEventListener("focusin",h),s.value.removeEventListener("focusout",N),s.value=void 0)}),{onKeydown:b}}});function be(e,t,s,o,c,l){return r.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var me=f._export_sfc(Te,[["render",be],["__file","focus-trap.vue"]]);const _e=f.buildProps({to:{type:f.definePropType([String,Object]),required:!0},disabled:Boolean}),Fe=r.defineComponent({__name:"teleport",props:_e,setup(e){return(t,s)=>t.disabled?r.renderSlot(t.$slots,"default",{key:0}):(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:t.to},[r.renderSlot(t.$slots,"default")],8,["to"]))}});var ye=f._export_sfc(Fe,[["__file","teleport.vue"]]);const Pe=f.withInstall(ye);exports.CHANGE_EVENT=ee;exports.EVENT_CODE=I;exports.ElFocusTrap=me;exports.ElTeleport=Pe;exports.FOCUS_TRAP_INJECTION_KEY=Y;exports.INPUT_EVENT=te;exports.UPDATE_MODEL_EVENT=Z;exports.isFocusable=C;exports.isUndefined=Q;exports.obtainAllFocusableElements=se;exports.triggerEvent=re;exports.tryFocus=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),l=require("./use-form-common-props-c1960844.cjs"),c=require("./base-6ccc8fc2.cjs"),p=c.buildProps({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:l.componentSizes},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),b={close:s=>s instanceof MouseEvent,click:s=>s instanceof MouseEvent},y=e.defineComponent({name:"ElTag"}),h=e.defineComponent({...y,props:p,emits:b,setup(s,{emit:i}){const f=s,k=l.useFormSize(),n=c.useNamespace("tag"),u=e.computed(()=>{const{type:o,hit:t,effect:a,closable:r,round:g}=f;return[n.b(),n.is("closable",r),n.m(o||"primary"),n.m(k.value),n.m(a),n.is("hit",t),n.is("round",g)]}),m=o=>{i("close",o)},d=o=>{i("click",o)},C=o=>{var t,a,r;(r=(a=(t=o==null?void 0:o.component)==null?void 0:t.subTree)==null?void 0:a.component)!=null&&r.bum&&(o.component.subTree.component.bum=null)};return(o,t)=>o.disableTransitions?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:o.color}),onClick:d},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),o.closable?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).e("close")),onClick:e.withModifiers(m,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(l.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(e.Transition,{key:1,name:`${e.unref(n).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:C},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:o.color}),onClick:d},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),o.closable?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).e("close")),onClick:e.withModifiers(m,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(l.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var v=c._export_sfc(h,[["__file","tag.vue"]]);const z=c.withInstall(v);exports.ElTag=z;exports.tagProps=p;
|