st-comp 0.0.69 → 0.0.71
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/lib/ChartLayout.cjs.js +1 -0
- package/lib/ChartLayout.es.js +71 -0
- package/lib/Dialog.cjs.js +1 -0
- package/lib/Dialog.es.js +89 -0
- package/lib/HeatMap.cjs.js +1 -0
- package/lib/HeatMap.es.js +117 -0
- package/lib/Kline.cjs.js +1 -0
- package/lib/Kline.es.js +2631 -0
- package/lib/KlineNew.cjs.js +1 -0
- package/lib/KlineNew.es.js +614 -0
- package/lib/LinearLegend.cjs.js +1 -0
- package/lib/LinearLegend.es.js +62 -0
- package/lib/Map.cjs.js +1 -0
- package/lib/{bundle.js → Map.es.js} +43 -41504
- package/lib/Pagination.cjs.js +1 -0
- package/lib/Pagination.es.js +624 -0
- package/lib/Pie.cjs.js +2 -0
- package/lib/Pie.es.js +159 -0
- package/lib/Table.cjs.js +20 -0
- package/lib/Table.es.js +4006 -0
- package/lib/TreeMap.cjs.js +2 -0
- package/lib/TreeMap.es.js +162 -0
- package/lib/VarietySearch.cjs.js +12 -0
- package/lib/VarietySearch.es.js +3335 -0
- package/lib/VirtualTable.cjs.js +13 -0
- package/lib/VirtualTable.es.js +2679 -0
- package/lib/_commonjsHelpers-10dfc225.js +8 -0
- package/lib/_commonjsHelpers-87b0abe8.cjs +1 -0
- package/lib/_plugin-vue_export-helper-dad06003.js +9 -0
- package/lib/_plugin-vue_export-helper-f246444f.cjs +1 -0
- package/lib/base-4865d432.cjs +9 -0
- package/lib/base-a240bf62.js +762 -0
- package/lib/bundle.cjs.js +1 -0
- package/lib/bundle.es.js +46 -0
- package/lib/bundle.umd-4967d574.js +16091 -0
- package/lib/bundle.umd-c5698c50.cjs +71 -0
- package/lib/castArray-3341cbb4.cjs +1 -0
- package/lib/castArray-a723a736.js +10 -0
- package/lib/config-provider-3db4dac6.js +148 -0
- package/lib/config-provider-cf4edc1e.cjs +1 -0
- package/lib/el-button-c24606d0.cjs +1 -0
- package/lib/el-button-fa6a5742.js +231 -0
- package/lib/el-empty-282e5e93.js +204 -0
- package/lib/el-empty-608948d9.cjs +1 -0
- package/lib/el-icon-7718f55e.cjs +1 -0
- package/lib/el-icon-d9ef9ccc.js +592 -0
- package/lib/el-overlay-7fceb816.cjs +5 -0
- package/lib/el-overlay-9b7bdd18.js +678 -0
- package/lib/el-scrollbar-7dc53299.js +248 -0
- package/lib/el-scrollbar-bc381e35.cjs +1 -0
- package/lib/el-select-85ed2643.js +1894 -0
- package/lib/el-select-a50741c1.cjs +9 -0
- package/lib/el-tag-308f715a.js +2416 -0
- package/lib/el-tag-87fd3960.cjs +1 -0
- package/lib/el-tooltip-0ea8fbf8.cjs +1 -0
- package/lib/el-tooltip-4ed993c7.js +1 -0
- package/lib/focus-trap-2a734f35.cjs +3 -0
- package/lib/focus-trap-6922b96b.js +376 -0
- package/lib/index-1508a06b.js +556 -0
- package/lib/index-48a9f60d.cjs +1 -0
- package/lib/index-657047bb.js +513 -0
- package/lib/index-eea0bcb3.cjs +1 -0
- package/lib/index.esm-8d9a2abe.js +2432 -0
- package/lib/index.esm-94a95a2a.cjs +3 -0
- package/lib/raf-5e5c53db.cjs +1 -0
- package/lib/raf-fc8a56cf.js +6 -0
- package/lib/scroll-bb8039ba.cjs +1 -0
- package/lib/scroll-cfdae01b.js +35 -0
- package/lib/style.css +1 -1
- package/lib/typescript-7ae59c4c.js +4 -0
- package/lib/typescript-b63f8e83.cjs +1 -0
- package/lib/vnode-a9714179.js +14 -0
- package/lib/vnode-abafec9e.cjs +1 -0
- package/lib/zh-cn-92978806.js +134 -0
- package/lib/zh-cn-d4df7172.cjs +1 -0
- package/package.json +3 -3
- package/packages/ChartLayout/index.ts +5 -5
- package/packages/Dialog/index.ts +5 -5
- package/packages/HeatMap/index.ts +5 -5
- package/packages/Kline/componentsNew/KlineUtils/index.vue +2 -3
- package/packages/LinearLegend/index.ts +5 -5
- package/packages/Map/index.ts +5 -5
- package/packages/Pagination/index.ts +5 -5
- package/packages/Pie/index.ts +5 -5
- package/packages/Table/index.ts +5 -5
- package/packages/TreeMap/index.ts +5 -5
- package/packages/VarietySearch/index.ts +5 -5
- package/packages/VirtualTable/index.ts +5 -5
- package/vitePlugins/createExportFile.ts +5 -5
- package/lib/bundle.umd.cjs +0 -139
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
import { onMounted as ue, watchEffect as Le, onBeforeUnmount as Se, isRef as De, watch as q, onScopeDispose as Te, defineComponent as Y, createVNode as V, renderSlot as C, h as Ie, inject as se, computed as I, openBlock as A, createElementBlock as x, unref as n, normalizeClass as E, normalizeStyle as de, createElementVNode as H, toDisplayString as Me, withCtx as D, createBlock as K, resolveDynamicComponent as Ne, createCommentVNode as G, getCurrentInstance as Be, ref as T, nextTick as Oe, useSlots as Fe, provide as Ae, Teleport as Pe, Transition as $e, withDirectives as Re, mergeProps as Ve, createSlots as ze, vShow as Ye } from "vue";
|
|
2
|
+
import { H as fe, v as Z, L as He, N as U, M as Ue, O as ve, t as We, u as te, C as me, h as ne, F as xe, a as Xe, r as je, b as oe, d as J, g as qe, _ as pe, x as Ke, I as le, P as Ge, c as ae, w as Ze } from "./base-a240bf62.js";
|
|
3
|
+
import { P as X } from "./vnode-a9714179.js";
|
|
4
|
+
import { E as Je } from "./index-1508a06b.js";
|
|
5
|
+
import { i as Qe, F as et, n as tt, U as he, d as ot, u as ie, o as st } from "./focus-trap-6922b96b.js";
|
|
6
|
+
import { c as nt } from "./config-provider-3db4dac6.js";
|
|
7
|
+
import { g as lt } from "./scroll-cfdae01b.js";
|
|
8
|
+
const at = (...e) => (t) => {
|
|
9
|
+
e.forEach((s) => {
|
|
10
|
+
fe(s) ? s(t) : s.value = t;
|
|
11
|
+
});
|
|
12
|
+
}, it = (e, t, s) => {
|
|
13
|
+
let l = {
|
|
14
|
+
offsetX: 0,
|
|
15
|
+
offsetY: 0
|
|
16
|
+
};
|
|
17
|
+
const o = (c) => {
|
|
18
|
+
const d = c.clientX, m = c.clientY, { offsetX: f, offsetY: g } = l, v = e.value.getBoundingClientRect(), u = v.left, _ = v.top, N = v.width, P = v.height, $ = document.documentElement.clientWidth, B = document.documentElement.clientHeight, R = -u + f, O = -_ + g, k = $ - u - N + f, w = B - _ - P + g, F = (b) => {
|
|
19
|
+
const r = Math.min(Math.max(f + b.clientX - d, R), k), y = Math.min(Math.max(g + b.clientY - m, O), w);
|
|
20
|
+
l = {
|
|
21
|
+
offsetX: r,
|
|
22
|
+
offsetY: y
|
|
23
|
+
}, e.value.style.transform = `translate(${Z(r)}, ${Z(y)})`;
|
|
24
|
+
}, p = () => {
|
|
25
|
+
document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", p);
|
|
26
|
+
};
|
|
27
|
+
document.addEventListener("mousemove", F), document.addEventListener("mouseup", p);
|
|
28
|
+
}, a = () => {
|
|
29
|
+
t.value && e.value && t.value.addEventListener("mousedown", o);
|
|
30
|
+
}, i = () => {
|
|
31
|
+
t.value && e.value && t.value.removeEventListener("mousedown", o);
|
|
32
|
+
};
|
|
33
|
+
ue(() => {
|
|
34
|
+
Le(() => {
|
|
35
|
+
s.value ? a() : i();
|
|
36
|
+
});
|
|
37
|
+
}), Se(() => {
|
|
38
|
+
i();
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @vue/reactivity v3.4.19
|
|
43
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
44
|
+
* @license MIT
|
|
45
|
+
**/
|
|
46
|
+
function ge(e, ...t) {
|
|
47
|
+
console.warn(`[Vue warn] ${e}`, ...t);
|
|
48
|
+
}
|
|
49
|
+
let rt;
|
|
50
|
+
function ct(e, t = rt) {
|
|
51
|
+
t && t.active && t.effects.push(e);
|
|
52
|
+
}
|
|
53
|
+
let z;
|
|
54
|
+
class ut {
|
|
55
|
+
constructor(t, s, l, o) {
|
|
56
|
+
this.fn = t, this.trigger = s, this.scheduler = l, this.active = !0, this.deps = [], this._dirtyLevel = 4, this._trackId = 0, this._runnings = 0, this._shouldSchedule = !1, this._depsLength = 0, ct(this, o);
|
|
57
|
+
}
|
|
58
|
+
get dirty() {
|
|
59
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
60
|
+
this._dirtyLevel = 1, ft();
|
|
61
|
+
for (let t = 0; t < this._depsLength; t++) {
|
|
62
|
+
const s = this.deps[t];
|
|
63
|
+
if (s.computed && (dt(s.computed), this._dirtyLevel >= 4))
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
this._dirtyLevel === 1 && (this._dirtyLevel = 0), vt();
|
|
67
|
+
}
|
|
68
|
+
return this._dirtyLevel >= 4;
|
|
69
|
+
}
|
|
70
|
+
set dirty(t) {
|
|
71
|
+
this._dirtyLevel = t ? 4 : 0;
|
|
72
|
+
}
|
|
73
|
+
run() {
|
|
74
|
+
if (this._dirtyLevel = 0, !this.active)
|
|
75
|
+
return this.fn();
|
|
76
|
+
let t = M, s = z;
|
|
77
|
+
try {
|
|
78
|
+
return M = !0, z = this, this._runnings++, re(this), this.fn();
|
|
79
|
+
} finally {
|
|
80
|
+
ce(this), this._runnings--, z = s, M = t;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
stop() {
|
|
84
|
+
var t;
|
|
85
|
+
this.active && (re(this), ce(this), (t = this.onStop) == null || t.call(this), this.active = !1);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function dt(e) {
|
|
89
|
+
return e.value;
|
|
90
|
+
}
|
|
91
|
+
function re(e) {
|
|
92
|
+
e._trackId++, e._depsLength = 0;
|
|
93
|
+
}
|
|
94
|
+
function ce(e) {
|
|
95
|
+
if (e.deps.length > e._depsLength) {
|
|
96
|
+
for (let t = e._depsLength; t < e.deps.length; t++)
|
|
97
|
+
ye(e.deps[t], e);
|
|
98
|
+
e.deps.length = e._depsLength;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function ye(e, t) {
|
|
102
|
+
const s = e.get(t);
|
|
103
|
+
s !== void 0 && t._trackId !== s && (e.delete(t), e.size === 0 && e.cleanup());
|
|
104
|
+
}
|
|
105
|
+
let M = !0, Q = 0;
|
|
106
|
+
const _e = [];
|
|
107
|
+
function ft() {
|
|
108
|
+
_e.push(M), M = !1;
|
|
109
|
+
}
|
|
110
|
+
function vt() {
|
|
111
|
+
const e = _e.pop();
|
|
112
|
+
M = e === void 0 ? !0 : e;
|
|
113
|
+
}
|
|
114
|
+
function mt() {
|
|
115
|
+
Q++;
|
|
116
|
+
}
|
|
117
|
+
function pt() {
|
|
118
|
+
for (Q--; !Q && ee.length; )
|
|
119
|
+
ee.shift()();
|
|
120
|
+
}
|
|
121
|
+
function ht(e, t, s) {
|
|
122
|
+
var l;
|
|
123
|
+
if (t.get(e) !== e._trackId) {
|
|
124
|
+
t.set(e, e._trackId);
|
|
125
|
+
const o = e.deps[e._depsLength];
|
|
126
|
+
o !== t ? (o && ye(o, e), e.deps[e._depsLength++] = t) : e._depsLength++, process.env.NODE_ENV !== "production" && ((l = e.onTrack) == null || l.call(e, ve({ effect: e }, s)));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const ee = [];
|
|
130
|
+
function gt(e, t, s) {
|
|
131
|
+
var l;
|
|
132
|
+
mt();
|
|
133
|
+
for (const o of e.keys()) {
|
|
134
|
+
let a;
|
|
135
|
+
o._dirtyLevel < t && (a ?? (a = e.get(o) === o._trackId)) && (o._shouldSchedule || (o._shouldSchedule = o._dirtyLevel === 0), o._dirtyLevel = t), o._shouldSchedule && (a ?? (a = e.get(o) === o._trackId)) && (process.env.NODE_ENV !== "production" && ((l = o.onTrigger) == null || l.call(o, ve({ effect: o }, s))), o.trigger(), (!o._runnings || o.allowRecurse) && o._dirtyLevel !== 2 && (o._shouldSchedule = !1, o.scheduler && ee.push(o.scheduler)));
|
|
136
|
+
}
|
|
137
|
+
pt();
|
|
138
|
+
}
|
|
139
|
+
const yt = (e, t) => {
|
|
140
|
+
const s = /* @__PURE__ */ new Map();
|
|
141
|
+
return s.cleanup = e, s.computed = t, s;
|
|
142
|
+
};
|
|
143
|
+
Symbol(process.env.NODE_ENV !== "production" ? "iterate" : "");
|
|
144
|
+
Symbol(process.env.NODE_ENV !== "production" ? "Map key iterate" : "");
|
|
145
|
+
new Set(
|
|
146
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(He)
|
|
147
|
+
);
|
|
148
|
+
function W(e) {
|
|
149
|
+
const t = e && e.__v_raw;
|
|
150
|
+
return t ? W(t) : e;
|
|
151
|
+
}
|
|
152
|
+
const _t = "Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";
|
|
153
|
+
class Ce {
|
|
154
|
+
constructor(t, s, l, o) {
|
|
155
|
+
this._setter = s, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this.effect = new ut(
|
|
156
|
+
() => t(this._value),
|
|
157
|
+
() => j(
|
|
158
|
+
this,
|
|
159
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
160
|
+
)
|
|
161
|
+
), this.effect.computed = this, this.effect.active = this._cacheable = !o, this.__v_isReadonly = l;
|
|
162
|
+
}
|
|
163
|
+
get value() {
|
|
164
|
+
const t = W(this);
|
|
165
|
+
return (!t._cacheable || t.effect.dirty) && Ue(t._value, t._value = t.effect.run()) && j(t, 4), bt(t), t.effect._dirtyLevel >= 2 && (process.env.NODE_ENV !== "production" && ge(_t), j(t, 2)), t._value;
|
|
166
|
+
}
|
|
167
|
+
set value(t) {
|
|
168
|
+
this._setter(t);
|
|
169
|
+
}
|
|
170
|
+
// #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
|
|
171
|
+
get _dirty() {
|
|
172
|
+
return this.effect.dirty;
|
|
173
|
+
}
|
|
174
|
+
set _dirty(t) {
|
|
175
|
+
this.effect.dirty = t;
|
|
176
|
+
}
|
|
177
|
+
// #endregion
|
|
178
|
+
}
|
|
179
|
+
function Ct(e, t, s = !1) {
|
|
180
|
+
let l, o;
|
|
181
|
+
const a = fe(e);
|
|
182
|
+
a ? (l = e, o = process.env.NODE_ENV !== "production" ? () => {
|
|
183
|
+
ge("Write operation failed: computed value is readonly");
|
|
184
|
+
} : U) : (l = e.get, o = e.set);
|
|
185
|
+
const i = new Ce(l, o, a || !o, s);
|
|
186
|
+
return process.env.NODE_ENV !== "production" && t && !s && (i.effect.onTrack = t.onTrack, i.effect.onTrigger = t.onTrigger), i;
|
|
187
|
+
}
|
|
188
|
+
function bt(e) {
|
|
189
|
+
var t;
|
|
190
|
+
M && z && (e = W(e), ht(
|
|
191
|
+
z,
|
|
192
|
+
(t = e.dep) != null ? t : e.dep = yt(
|
|
193
|
+
() => e.dep = void 0,
|
|
194
|
+
e instanceof Ce ? e : void 0
|
|
195
|
+
),
|
|
196
|
+
process.env.NODE_ENV !== "production" ? {
|
|
197
|
+
target: e,
|
|
198
|
+
type: "get",
|
|
199
|
+
key: "value"
|
|
200
|
+
} : void 0
|
|
201
|
+
));
|
|
202
|
+
}
|
|
203
|
+
function j(e, t = 4, s) {
|
|
204
|
+
e = W(e);
|
|
205
|
+
const l = e.dep;
|
|
206
|
+
l && gt(
|
|
207
|
+
l,
|
|
208
|
+
t,
|
|
209
|
+
process.env.NODE_ENV !== "production" ? {
|
|
210
|
+
target: e,
|
|
211
|
+
type: "set",
|
|
212
|
+
key: "value",
|
|
213
|
+
newValue: s
|
|
214
|
+
} : void 0
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
const Et = (e, t = {}) => {
|
|
218
|
+
De(e) || We("[useLockscreen]", "You need to pass a ref param to this function");
|
|
219
|
+
const s = t.ns || te("popup"), l = Ct(() => s.bm("parent", "hidden"));
|
|
220
|
+
if (!me || ne(document.body, l.value))
|
|
221
|
+
return;
|
|
222
|
+
let o = 0, a = !1, i = "0";
|
|
223
|
+
const c = () => {
|
|
224
|
+
setTimeout(() => {
|
|
225
|
+
je(document == null ? void 0 : document.body, l.value), a && document && (document.body.style.width = i);
|
|
226
|
+
}, 200);
|
|
227
|
+
};
|
|
228
|
+
q(e, (d) => {
|
|
229
|
+
if (!d) {
|
|
230
|
+
c();
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
a = !ne(document.body, l.value), a && (i = document.body.style.width), o = lt(s.namespace.value);
|
|
234
|
+
const m = document.documentElement.clientHeight < document.body.scrollHeight, f = xe(document.body, "overflowY");
|
|
235
|
+
o > 0 && (m || f === "scroll") && a && (document.body.style.width = `calc(100% - ${o}px)`), Xe(document.body, l.value);
|
|
236
|
+
}), Te(() => c());
|
|
237
|
+
}, be = (e) => {
|
|
238
|
+
if (!e)
|
|
239
|
+
return { onClick: U, onMousedown: U, onMouseup: U };
|
|
240
|
+
let t = !1, s = !1;
|
|
241
|
+
return { onClick: (i) => {
|
|
242
|
+
t && s && e(i), t = s = !1;
|
|
243
|
+
}, onMousedown: (i) => {
|
|
244
|
+
t = i.target === i.currentTarget;
|
|
245
|
+
}, onMouseup: (i) => {
|
|
246
|
+
s = i.target === i.currentTarget;
|
|
247
|
+
} };
|
|
248
|
+
}, kt = oe({
|
|
249
|
+
mask: {
|
|
250
|
+
type: Boolean,
|
|
251
|
+
default: !0
|
|
252
|
+
},
|
|
253
|
+
customMaskEvent: {
|
|
254
|
+
type: Boolean,
|
|
255
|
+
default: !1
|
|
256
|
+
},
|
|
257
|
+
overlayClass: {
|
|
258
|
+
type: J([
|
|
259
|
+
String,
|
|
260
|
+
Array,
|
|
261
|
+
Object
|
|
262
|
+
])
|
|
263
|
+
},
|
|
264
|
+
zIndex: {
|
|
265
|
+
type: J([String, Number])
|
|
266
|
+
}
|
|
267
|
+
}), wt = {
|
|
268
|
+
click: (e) => e instanceof MouseEvent
|
|
269
|
+
}, Lt = "overlay";
|
|
270
|
+
var St = Y({
|
|
271
|
+
name: "ElOverlay",
|
|
272
|
+
props: kt,
|
|
273
|
+
emits: wt,
|
|
274
|
+
setup(e, { slots: t, emit: s }) {
|
|
275
|
+
const l = te(Lt), o = (d) => {
|
|
276
|
+
s("click", d);
|
|
277
|
+
}, { onClick: a, onMousedown: i, onMouseup: c } = be(e.customMaskEvent ? void 0 : o);
|
|
278
|
+
return () => e.mask ? V("div", {
|
|
279
|
+
class: [l.b(), e.overlayClass],
|
|
280
|
+
style: {
|
|
281
|
+
zIndex: e.zIndex
|
|
282
|
+
},
|
|
283
|
+
onClick: a,
|
|
284
|
+
onMousedown: i,
|
|
285
|
+
onMouseup: c
|
|
286
|
+
}, [C(t, "default")], X.STYLE | X.CLASS | X.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Ie("div", {
|
|
287
|
+
class: e.overlayClass,
|
|
288
|
+
style: {
|
|
289
|
+
zIndex: e.zIndex,
|
|
290
|
+
position: "fixed",
|
|
291
|
+
top: "0px",
|
|
292
|
+
right: "0px",
|
|
293
|
+
bottom: "0px",
|
|
294
|
+
left: "0px"
|
|
295
|
+
}
|
|
296
|
+
}, [C(t, "default")]);
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
const Dt = St, Ee = Symbol("dialogInjectionKey"), ke = oe({
|
|
300
|
+
center: Boolean,
|
|
301
|
+
alignCenter: Boolean,
|
|
302
|
+
closeIcon: {
|
|
303
|
+
type: Qe
|
|
304
|
+
},
|
|
305
|
+
customClass: {
|
|
306
|
+
type: String,
|
|
307
|
+
default: ""
|
|
308
|
+
},
|
|
309
|
+
draggable: Boolean,
|
|
310
|
+
fullscreen: Boolean,
|
|
311
|
+
showClose: {
|
|
312
|
+
type: Boolean,
|
|
313
|
+
default: !0
|
|
314
|
+
},
|
|
315
|
+
title: {
|
|
316
|
+
type: String,
|
|
317
|
+
default: ""
|
|
318
|
+
},
|
|
319
|
+
ariaLevel: {
|
|
320
|
+
type: String,
|
|
321
|
+
default: "2"
|
|
322
|
+
}
|
|
323
|
+
}), Tt = {
|
|
324
|
+
close: () => !0
|
|
325
|
+
}, It = ["aria-level"], Mt = ["aria-label"], Nt = ["id"], Bt = Y({ name: "ElDialogContent" }), Ot = /* @__PURE__ */ Y({
|
|
326
|
+
...Bt,
|
|
327
|
+
props: ke,
|
|
328
|
+
emits: Tt,
|
|
329
|
+
setup(e) {
|
|
330
|
+
const t = e, { t: s } = qe(), { Close: l } = tt, { dialogRef: o, headerRef: a, bodyId: i, ns: c, style: d } = se(Ee), { focusTrapRef: m } = se(et), f = I(() => [
|
|
331
|
+
c.b(),
|
|
332
|
+
c.is("fullscreen", t.fullscreen),
|
|
333
|
+
c.is("draggable", t.draggable),
|
|
334
|
+
c.is("align-center", t.alignCenter),
|
|
335
|
+
{ [c.m("center")]: t.center },
|
|
336
|
+
t.customClass
|
|
337
|
+
]), g = at(m, o), v = I(() => t.draggable);
|
|
338
|
+
return it(o, a, v), (u, _) => (A(), x("div", {
|
|
339
|
+
ref: n(g),
|
|
340
|
+
class: E(n(f)),
|
|
341
|
+
style: de(n(d)),
|
|
342
|
+
tabindex: "-1"
|
|
343
|
+
}, [
|
|
344
|
+
H("header", {
|
|
345
|
+
ref_key: "headerRef",
|
|
346
|
+
ref: a,
|
|
347
|
+
class: E(n(c).e("header"))
|
|
348
|
+
}, [
|
|
349
|
+
C(u.$slots, "header", {}, () => [
|
|
350
|
+
H("span", {
|
|
351
|
+
role: "heading",
|
|
352
|
+
"aria-level": u.ariaLevel,
|
|
353
|
+
class: E(n(c).e("title"))
|
|
354
|
+
}, Me(u.title), 11, It)
|
|
355
|
+
]),
|
|
356
|
+
u.showClose ? (A(), x("button", {
|
|
357
|
+
key: 0,
|
|
358
|
+
"aria-label": n(s)("el.dialog.close"),
|
|
359
|
+
class: E(n(c).e("headerbtn")),
|
|
360
|
+
type: "button",
|
|
361
|
+
onClick: _[0] || (_[0] = (N) => u.$emit("close"))
|
|
362
|
+
}, [
|
|
363
|
+
V(n(Je), {
|
|
364
|
+
class: E(n(c).e("close"))
|
|
365
|
+
}, {
|
|
366
|
+
default: D(() => [
|
|
367
|
+
(A(), K(Ne(u.closeIcon || n(l))))
|
|
368
|
+
]),
|
|
369
|
+
_: 1
|
|
370
|
+
}, 8, ["class"])
|
|
371
|
+
], 10, Mt)) : G("v-if", !0)
|
|
372
|
+
], 2),
|
|
373
|
+
H("div", {
|
|
374
|
+
id: n(i),
|
|
375
|
+
class: E(n(c).e("body"))
|
|
376
|
+
}, [
|
|
377
|
+
C(u.$slots, "default")
|
|
378
|
+
], 10, Nt),
|
|
379
|
+
u.$slots.footer ? (A(), x("footer", {
|
|
380
|
+
key: 0,
|
|
381
|
+
class: E(n(c).e("footer"))
|
|
382
|
+
}, [
|
|
383
|
+
C(u.$slots, "footer")
|
|
384
|
+
], 2)) : G("v-if", !0)
|
|
385
|
+
], 6));
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
var Ft = /* @__PURE__ */ pe(Ot, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);
|
|
389
|
+
const At = oe({
|
|
390
|
+
...ke,
|
|
391
|
+
appendToBody: Boolean,
|
|
392
|
+
beforeClose: {
|
|
393
|
+
type: J(Function)
|
|
394
|
+
},
|
|
395
|
+
destroyOnClose: Boolean,
|
|
396
|
+
closeOnClickModal: {
|
|
397
|
+
type: Boolean,
|
|
398
|
+
default: !0
|
|
399
|
+
},
|
|
400
|
+
closeOnPressEscape: {
|
|
401
|
+
type: Boolean,
|
|
402
|
+
default: !0
|
|
403
|
+
},
|
|
404
|
+
lockScroll: {
|
|
405
|
+
type: Boolean,
|
|
406
|
+
default: !0
|
|
407
|
+
},
|
|
408
|
+
modal: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: !0
|
|
411
|
+
},
|
|
412
|
+
openDelay: {
|
|
413
|
+
type: Number,
|
|
414
|
+
default: 0
|
|
415
|
+
},
|
|
416
|
+
closeDelay: {
|
|
417
|
+
type: Number,
|
|
418
|
+
default: 0
|
|
419
|
+
},
|
|
420
|
+
top: {
|
|
421
|
+
type: String
|
|
422
|
+
},
|
|
423
|
+
modelValue: Boolean,
|
|
424
|
+
modalClass: String,
|
|
425
|
+
width: {
|
|
426
|
+
type: [String, Number]
|
|
427
|
+
},
|
|
428
|
+
zIndex: {
|
|
429
|
+
type: Number
|
|
430
|
+
},
|
|
431
|
+
trapFocus: {
|
|
432
|
+
type: Boolean,
|
|
433
|
+
default: !1
|
|
434
|
+
},
|
|
435
|
+
headerAriaLevel: {
|
|
436
|
+
type: String,
|
|
437
|
+
default: "2"
|
|
438
|
+
}
|
|
439
|
+
}), Pt = {
|
|
440
|
+
open: () => !0,
|
|
441
|
+
opened: () => !0,
|
|
442
|
+
close: () => !0,
|
|
443
|
+
closed: () => !0,
|
|
444
|
+
[he]: (e) => Ke(e),
|
|
445
|
+
openAutoFocus: () => !0,
|
|
446
|
+
closeAutoFocus: () => !0
|
|
447
|
+
}, $t = (e, t) => {
|
|
448
|
+
const l = Be().emit, { nextZIndex: o } = ot();
|
|
449
|
+
let a = "";
|
|
450
|
+
const i = le(), c = le(), d = T(!1), m = T(!1), f = T(!1), g = T(e.zIndex || o());
|
|
451
|
+
let v, u;
|
|
452
|
+
const _ = nt("namespace", Ge), N = I(() => {
|
|
453
|
+
const h = {}, S = `--${_.value}-dialog`;
|
|
454
|
+
return e.fullscreen || (e.top && (h[`${S}-margin-top`] = e.top), e.width && (h[`${S}-width`] = Z(e.width))), h;
|
|
455
|
+
}), P = I(() => e.alignCenter ? { display: "flex" } : {});
|
|
456
|
+
function $() {
|
|
457
|
+
l("opened");
|
|
458
|
+
}
|
|
459
|
+
function B() {
|
|
460
|
+
l("closed"), l(he, !1), e.destroyOnClose && (f.value = !1);
|
|
461
|
+
}
|
|
462
|
+
function R() {
|
|
463
|
+
l("close");
|
|
464
|
+
}
|
|
465
|
+
function O() {
|
|
466
|
+
u == null || u(), v == null || v(), e.openDelay && e.openDelay > 0 ? { stop: v } = ae(() => p(), e.openDelay) : p();
|
|
467
|
+
}
|
|
468
|
+
function k() {
|
|
469
|
+
v == null || v(), u == null || u(), e.closeDelay && e.closeDelay > 0 ? { stop: u } = ae(() => b(), e.closeDelay) : b();
|
|
470
|
+
}
|
|
471
|
+
function w() {
|
|
472
|
+
function h(S) {
|
|
473
|
+
S || (m.value = !0, d.value = !1);
|
|
474
|
+
}
|
|
475
|
+
e.beforeClose ? e.beforeClose(h) : k();
|
|
476
|
+
}
|
|
477
|
+
function F() {
|
|
478
|
+
e.closeOnClickModal && w();
|
|
479
|
+
}
|
|
480
|
+
function p() {
|
|
481
|
+
me && (d.value = !0);
|
|
482
|
+
}
|
|
483
|
+
function b() {
|
|
484
|
+
d.value = !1;
|
|
485
|
+
}
|
|
486
|
+
function r() {
|
|
487
|
+
l("openAutoFocus");
|
|
488
|
+
}
|
|
489
|
+
function y() {
|
|
490
|
+
l("closeAutoFocus");
|
|
491
|
+
}
|
|
492
|
+
function L(h) {
|
|
493
|
+
var S;
|
|
494
|
+
((S = h.detail) == null ? void 0 : S.focusReason) === "pointer" && h.preventDefault();
|
|
495
|
+
}
|
|
496
|
+
e.lockScroll && Et(d);
|
|
497
|
+
function we() {
|
|
498
|
+
e.closeOnPressEscape && w();
|
|
499
|
+
}
|
|
500
|
+
return q(() => e.modelValue, (h) => {
|
|
501
|
+
h ? (m.value = !1, O(), f.value = !0, g.value = e.zIndex ? g.value++ : o(), Oe(() => {
|
|
502
|
+
l("open"), t.value && (t.value.scrollTop = 0);
|
|
503
|
+
})) : d.value && k();
|
|
504
|
+
}), q(() => e.fullscreen, (h) => {
|
|
505
|
+
t.value && (h ? (a = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = a);
|
|
506
|
+
}), ue(() => {
|
|
507
|
+
e.modelValue && (d.value = !0, f.value = !0, O());
|
|
508
|
+
}), {
|
|
509
|
+
afterEnter: $,
|
|
510
|
+
afterLeave: B,
|
|
511
|
+
beforeLeave: R,
|
|
512
|
+
handleClose: w,
|
|
513
|
+
onModalClick: F,
|
|
514
|
+
close: k,
|
|
515
|
+
doClose: b,
|
|
516
|
+
onOpenAutoFocus: r,
|
|
517
|
+
onCloseAutoFocus: y,
|
|
518
|
+
onCloseRequested: we,
|
|
519
|
+
onFocusoutPrevented: L,
|
|
520
|
+
titleId: i,
|
|
521
|
+
bodyId: c,
|
|
522
|
+
closed: m,
|
|
523
|
+
style: N,
|
|
524
|
+
overlayDialogStyle: P,
|
|
525
|
+
rendered: f,
|
|
526
|
+
visible: d,
|
|
527
|
+
zIndex: g
|
|
528
|
+
};
|
|
529
|
+
}, Rt = ["aria-label", "aria-labelledby", "aria-describedby"], Vt = Y({
|
|
530
|
+
name: "ElDialog",
|
|
531
|
+
inheritAttrs: !1
|
|
532
|
+
}), zt = /* @__PURE__ */ Y({
|
|
533
|
+
...Vt,
|
|
534
|
+
props: At,
|
|
535
|
+
emits: Pt,
|
|
536
|
+
setup(e, { expose: t }) {
|
|
537
|
+
const s = e, l = Fe();
|
|
538
|
+
ie({
|
|
539
|
+
scope: "el-dialog",
|
|
540
|
+
from: "the title slot",
|
|
541
|
+
replacement: "the header slot",
|
|
542
|
+
version: "3.0.0",
|
|
543
|
+
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
544
|
+
}, I(() => !!l.title)), ie({
|
|
545
|
+
scope: "el-dialog",
|
|
546
|
+
from: "custom-class",
|
|
547
|
+
replacement: "class",
|
|
548
|
+
version: "2.3.0",
|
|
549
|
+
ref: "https://element-plus.org/en-US/component/dialog.html#attributes",
|
|
550
|
+
type: "Attribute"
|
|
551
|
+
}, I(() => !!s.customClass));
|
|
552
|
+
const o = te("dialog"), a = T(), i = T(), c = T(), {
|
|
553
|
+
visible: d,
|
|
554
|
+
titleId: m,
|
|
555
|
+
bodyId: f,
|
|
556
|
+
style: g,
|
|
557
|
+
overlayDialogStyle: v,
|
|
558
|
+
rendered: u,
|
|
559
|
+
zIndex: _,
|
|
560
|
+
afterEnter: N,
|
|
561
|
+
afterLeave: P,
|
|
562
|
+
beforeLeave: $,
|
|
563
|
+
handleClose: B,
|
|
564
|
+
onModalClick: R,
|
|
565
|
+
onOpenAutoFocus: O,
|
|
566
|
+
onCloseAutoFocus: k,
|
|
567
|
+
onCloseRequested: w,
|
|
568
|
+
onFocusoutPrevented: F
|
|
569
|
+
} = $t(s, a);
|
|
570
|
+
Ae(Ee, {
|
|
571
|
+
dialogRef: a,
|
|
572
|
+
headerRef: i,
|
|
573
|
+
bodyId: f,
|
|
574
|
+
ns: o,
|
|
575
|
+
rendered: u,
|
|
576
|
+
style: g
|
|
577
|
+
});
|
|
578
|
+
const p = be(R), b = I(() => s.draggable && !s.fullscreen);
|
|
579
|
+
return t({
|
|
580
|
+
visible: d,
|
|
581
|
+
dialogContentRef: c
|
|
582
|
+
}), (r, y) => (A(), K(Pe, {
|
|
583
|
+
to: "body",
|
|
584
|
+
disabled: !r.appendToBody
|
|
585
|
+
}, [
|
|
586
|
+
V($e, {
|
|
587
|
+
name: "dialog-fade",
|
|
588
|
+
onAfterEnter: n(N),
|
|
589
|
+
onAfterLeave: n(P),
|
|
590
|
+
onBeforeLeave: n($),
|
|
591
|
+
persisted: ""
|
|
592
|
+
}, {
|
|
593
|
+
default: D(() => [
|
|
594
|
+
Re(V(n(Dt), {
|
|
595
|
+
"custom-mask-event": "",
|
|
596
|
+
mask: r.modal,
|
|
597
|
+
"overlay-class": r.modalClass,
|
|
598
|
+
"z-index": n(_)
|
|
599
|
+
}, {
|
|
600
|
+
default: D(() => [
|
|
601
|
+
H("div", {
|
|
602
|
+
role: "dialog",
|
|
603
|
+
"aria-modal": "true",
|
|
604
|
+
"aria-label": r.title || void 0,
|
|
605
|
+
"aria-labelledby": r.title ? void 0 : n(m),
|
|
606
|
+
"aria-describedby": n(f),
|
|
607
|
+
class: E(`${n(o).namespace.value}-overlay-dialog`),
|
|
608
|
+
style: de(n(v)),
|
|
609
|
+
onClick: y[0] || (y[0] = (...L) => n(p).onClick && n(p).onClick(...L)),
|
|
610
|
+
onMousedown: y[1] || (y[1] = (...L) => n(p).onMousedown && n(p).onMousedown(...L)),
|
|
611
|
+
onMouseup: y[2] || (y[2] = (...L) => n(p).onMouseup && n(p).onMouseup(...L))
|
|
612
|
+
}, [
|
|
613
|
+
V(n(st), {
|
|
614
|
+
loop: "",
|
|
615
|
+
trapped: n(d),
|
|
616
|
+
"focus-start-el": "container",
|
|
617
|
+
onFocusAfterTrapped: n(O),
|
|
618
|
+
onFocusAfterReleased: n(k),
|
|
619
|
+
onFocusoutPrevented: n(F),
|
|
620
|
+
onReleaseRequested: n(w)
|
|
621
|
+
}, {
|
|
622
|
+
default: D(() => [
|
|
623
|
+
n(u) ? (A(), K(Ft, Ve({
|
|
624
|
+
key: 0,
|
|
625
|
+
ref_key: "dialogContentRef",
|
|
626
|
+
ref: c
|
|
627
|
+
}, r.$attrs, {
|
|
628
|
+
"custom-class": r.customClass,
|
|
629
|
+
center: r.center,
|
|
630
|
+
"align-center": r.alignCenter,
|
|
631
|
+
"close-icon": r.closeIcon,
|
|
632
|
+
draggable: n(b),
|
|
633
|
+
fullscreen: r.fullscreen,
|
|
634
|
+
"show-close": r.showClose,
|
|
635
|
+
title: r.title,
|
|
636
|
+
"aria-level": r.headerAriaLevel,
|
|
637
|
+
onClose: n(B)
|
|
638
|
+
}), ze({
|
|
639
|
+
header: D(() => [
|
|
640
|
+
r.$slots.title ? C(r.$slots, "title", { key: 1 }) : C(r.$slots, "header", {
|
|
641
|
+
key: 0,
|
|
642
|
+
close: n(B),
|
|
643
|
+
titleId: n(m),
|
|
644
|
+
titleClass: n(o).e("title")
|
|
645
|
+
})
|
|
646
|
+
]),
|
|
647
|
+
default: D(() => [
|
|
648
|
+
C(r.$slots, "default")
|
|
649
|
+
]),
|
|
650
|
+
_: 2
|
|
651
|
+
}, [
|
|
652
|
+
r.$slots.footer ? {
|
|
653
|
+
name: "footer",
|
|
654
|
+
fn: D(() => [
|
|
655
|
+
C(r.$slots, "footer")
|
|
656
|
+
])
|
|
657
|
+
} : void 0
|
|
658
|
+
]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : G("v-if", !0)
|
|
659
|
+
]),
|
|
660
|
+
_: 3
|
|
661
|
+
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
662
|
+
], 46, Rt)
|
|
663
|
+
]),
|
|
664
|
+
_: 3
|
|
665
|
+
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
666
|
+
[Ye, n(d)]
|
|
667
|
+
])
|
|
668
|
+
]),
|
|
669
|
+
_: 3
|
|
670
|
+
}, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
671
|
+
], 8, ["disabled"]));
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
var Yt = /* @__PURE__ */ pe(zt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);
|
|
675
|
+
const Kt = Ze(Yt);
|
|
676
|
+
export {
|
|
677
|
+
Kt as E
|
|
678
|
+
};
|