bp-aicc-editor 1.2.507 → 1.2.511
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/ScreenPreview-CV95NWOd.js +373 -0
- package/lib/{atlas-C3az-9Mm.js → atlas-DsmLq2V0.js} +1 -1
- package/lib/{button-base-_jCki568.js → button-base-DHNVBrQ9.js} +1 -1
- package/lib/{cache-Jvpyvvq5.js → cache-lsjsKZHu.js} +1 -1
- package/lib/{container-group-DTRMf-Lh.js → container-group-DqAcKEBy.js} +1 -1
- package/lib/{copy-JUmhZHJW.js → copy-C5Pi6nJh.js} +1 -1
- package/lib/{datav-DYcMOPlj.js → datav-BER95ty-.js} +27 -27
- package/lib/{delete-C0k5m-ed.js → delete-C2EW4JCs.js} +1 -1
- package/lib/{divider-CvWkiVUb.js → divider-BazBGRgV.js} +1 -1
- package/lib/edit-B2pfd2q1.js +24 -0
- package/lib/el-button-DvLKp6Ga.js +815 -0
- package/lib/el-form-item-BDdxk5F5.js +1175 -0
- package/lib/el-link-D2ol9BHQ.js +91 -0
- package/lib/el-loading-Cgwgez55.js +230 -0
- package/lib/el-overlay-BK0_UIU6.js +704 -0
- package/lib/el-tab-pane-DD2eM9rB.js +536 -0
- package/lib/{fullscreen-DOYyz7vQ.js → fullscreen-OChDsSnk.js} +1 -1
- package/lib/{image-BQIpsLBo.js → image-C5ZAY3yt.js} +1 -1
- package/lib/index-3pzVrvby.js +150 -0
- package/lib/{index-D9Iayd4l.js → index-B19lEYui.js} +6 -6
- package/lib/index-B1yAU2Cb.js +390 -0
- package/lib/index-BCFXuK7k.js +68 -0
- package/lib/index-BD4Jwo8Z.js +449 -0
- package/lib/{index-BvcqtFEY.js → index-BMWqf88L.js} +10 -10
- package/lib/{index-CI4vgOJL.js → index-BPcvYtHf.js} +8 -11
- package/lib/index-BWPVi43E.js +21 -0
- package/lib/{index-CSkWvBQG.js → index-BatyRVpL.js} +1 -1
- package/lib/{index-D7jQaJbo.js → index-Belsn8kt.js} +1 -1
- package/lib/{index-C7ZW2TdD.js → index-BfIEunKC.js} +13 -15
- package/lib/{index-DTbzx51-.js → index-BhP9eBCp.js} +2 -2
- package/lib/{index-BdQOzowp.js → index-BkdiXCRY.js} +1 -1
- package/lib/{index-B4Kg0SOl.js → index-Buoc0ISP.js} +60 -65
- package/lib/index-BwCQWH-N.js +439 -0
- package/lib/{index-KO7LIDgy.js → index-C7k49L2T.js} +1 -1
- package/lib/{index-BCisGpRV.js → index-CGFEhUh9.js} +21 -21
- package/lib/{index-BCZuzL9x.js → index-CGrR_i0u.js} +1 -1
- package/lib/index-CIADz1i0.js +8494 -0
- package/lib/{index-BiybAKLy.js → index-CJyYGViv.js} +1 -1
- package/lib/{index-Curd3Q_C.js → index-CVE37oE7.js} +1 -1
- package/lib/{index-BGT3NcHb.js → index-CVsy2qTh.js} +2 -2
- package/lib/{index-CEKpsQ73.js → index-CWbZmzNT.js} +20 -20
- package/lib/{index-r0p4Zsdn.js → index-CXQ258ID.js} +1 -1
- package/lib/{index-C17gkQC5.js → index-CX_Ghcb6.js} +2 -2
- package/lib/index-CZJriuFt.js +27215 -0
- package/lib/{index-UdJ7RS5C.js → index-Ci8AbyIq.js} +1 -1
- package/lib/{index-DzglmFul.js → index-Ck7uFsPE.js} +1 -1
- package/lib/{index-DfKVDhZo.js → index-D4X0_jbv.js} +4 -4
- package/lib/{index-Q9GLzAp6.js → index-DKTrbqcA.js} +2 -2
- package/lib/{index-DiSYhNaR.js → index-Ge_d2xqD.js} +1 -1
- package/lib/{index-D9qrFCLu.js → index-qVyixI57.js} +21 -24
- package/lib/{index-DrO2UeJx.js → index-tbhuYbb0.js} +1 -1
- package/lib/index.es.js +3 -3
- package/lib/index.umd.js +57 -34
- package/lib/{layer-setting-panel-Bjnt_eL7.js → layer-setting-panel-VvDSQ-cn.js} +2 -2
- package/lib/{line-show-C7Nn6vkO.js → line-show-Bp4G-LqO.js} +1 -1
- package/lib/{multi-layout-config-Cq3yMVHR.js → multi-layout-config-drSy7ezf.js} +5 -5
- package/lib/{multiline-text-20qZej5M.js → multiline-text-D89kYrA2.js} +1 -1
- package/lib/{navigation-CYYFLmhU.js → navigation-YAGxZ0OT.js} +1 -1
- package/lib/page-config-Cmsi8Vpr.js +582 -0
- package/lib/page-tabs-wFeNBY4c.js +185 -0
- package/lib/{plus-CLcKk5PN.js → plus-3mdO6yXY.js} +1 -1
- package/lib/{requestOld-UJ_IbJZV.js → requestOld-DRcjsmRQ.js} +1 -1
- package/lib/{schema-EG3DcRzW.js → schema-BavJE-SK.js} +2 -2
- package/lib/{schema-B8SVu2jj.js → schema-BflqDw-a.js} +1 -1
- package/lib/{schema-D6lT1sLt.js → schema-Bo30dbBx.js} +1 -1
- package/lib/{schema-Blmk8VpW.js → schema-BsnIOGBI.js} +1 -1
- package/lib/{schema-C1vqYLAm.js → schema-_APJMUW3.js} +24 -24
- package/lib/{schema-C4qS2kV8.js → schema-qKI1F8Bt.js} +1 -1
- package/lib/{setting-panel-CoVHYjPW.js → setting-panel-BgzN3BUP.js} +91 -93
- package/lib/{show-DWWTez5i.js → show-C4AeWlKj.js} +13 -32
- package/lib/{stepper-bfTmJIGg.js → stepper-D5EFeJWG.js} +1 -1
- package/lib/strings-_mHAdgA4.js +6 -0
- package/lib/style.css +1 -0
- package/lib/{switch-Dxeq_HHd.js → switch-B0dR4LM_.js} +1 -1
- package/lib/unlock-Cq9PLhBA.js +62 -0
- package/lib/{use-env-url-CP2GpMCY.js → use-env-url-BM9dgwx_.js} +1 -1
- package/lib/use-global-config-CflpFoxU.js +115 -0
- package/lib/vnode-B_Dj8zxu.js +14 -0
- package/package.json +3 -2
- package/lib/ScreenPreview-DGe9FXWu.js +0 -126
- package/lib/index-08FGmL4D.js +0 -3744
- package/lib/index-Bg2serjU.js +0 -155
- package/lib/index-CJbqu93z.js +0 -496
- package/lib/index-D-A44QLA.js +0 -228
- package/lib/index-D6ZS8SXJ.js +0 -22369
- package/lib/index-DgTMT-ZH.js +0 -71
- package/lib/index-noVQZPd6.js +0 -133
- package/lib/page-config-Bw-OZliO.js +0 -257
- package/lib/page-tabs-DM9zkW_X.js +0 -190
- package/lib/styles.css +0 -1
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
import { defineComponent as re, createVNode as j, h as Le, renderSlot as L, ref as D, onMounted as ye, watchEffect as Ae, onBeforeUnmount as _e, inject as fe, computed as C, createElementBlock as ee, openBlock as z, normalizeStyle as be, normalizeClass as O, unref as n, createElementVNode as K, createCommentVNode as le, toDisplayString as Oe, withCtx as F, createBlock as se, resolveDynamicComponent as Fe, isRef as $e, watch as U, onScopeDispose as Ne, getCurrentInstance as ze, nextTick as We, useSlots as Ye, provide as Re, Transition as je, mergeProps as ve, withDirectives as Ve, createSlots as He, vShow as Xe } from "vue";
|
|
2
|
+
import { A as V, aW as he, aE as oe, b as ie, n as ue, d as q, i as xe, o as ae, k as Ce, J as Ke, bo as Ue, E as qe, bp as Ge, j as Je, ao as we, bq as Ze, y as Qe, br as eo, aX as oo, aV as to, Q as no, M as me, b1 as lo, G as so, F as ao, K as ro, ak as pe, bs as ge, S as io, T as uo, w as co } from "./index-CZJriuFt.js";
|
|
3
|
+
import { P as te } from "./vnode-B_Dj8zxu.js";
|
|
4
|
+
import { b as fo } from "./use-global-config-CflpFoxU.js";
|
|
5
|
+
import { u as vo } from "./index-BWPVi43E.js";
|
|
6
|
+
const mo = (e, l) => {
|
|
7
|
+
if (!V)
|
|
8
|
+
return !1;
|
|
9
|
+
const o = {
|
|
10
|
+
undefined: "overflow",
|
|
11
|
+
true: "overflow-y",
|
|
12
|
+
false: "overflow-x"
|
|
13
|
+
}[String(l)], d = he(e, o);
|
|
14
|
+
return ["scroll", "auto", "overlay"].some((t) => d.includes(t));
|
|
15
|
+
}, jo = (e, l) => {
|
|
16
|
+
if (!V)
|
|
17
|
+
return;
|
|
18
|
+
let o = e;
|
|
19
|
+
for (; o; ) {
|
|
20
|
+
if ([window, document, document.documentElement].includes(o))
|
|
21
|
+
return window;
|
|
22
|
+
if (mo(o, l))
|
|
23
|
+
return o;
|
|
24
|
+
o = o.parentNode;
|
|
25
|
+
}
|
|
26
|
+
return o;
|
|
27
|
+
};
|
|
28
|
+
let x;
|
|
29
|
+
const po = (e) => {
|
|
30
|
+
var l;
|
|
31
|
+
if (!V)
|
|
32
|
+
return 0;
|
|
33
|
+
if (x !== void 0)
|
|
34
|
+
return x;
|
|
35
|
+
const o = document.createElement("div");
|
|
36
|
+
o.className = `${e}-scrollbar__wrap`, o.style.visibility = "hidden", o.style.width = "100px", o.style.position = "absolute", o.style.top = "-9999px", document.body.appendChild(o);
|
|
37
|
+
const d = o.offsetWidth;
|
|
38
|
+
o.style.overflow = "scroll";
|
|
39
|
+
const t = document.createElement("div");
|
|
40
|
+
t.style.width = "100%", o.appendChild(t);
|
|
41
|
+
const r = t.offsetWidth;
|
|
42
|
+
return (l = o.parentNode) == null || l.removeChild(o), x = d - r, x;
|
|
43
|
+
};
|
|
44
|
+
function Vo(e, l) {
|
|
45
|
+
if (!V)
|
|
46
|
+
return;
|
|
47
|
+
if (!l) {
|
|
48
|
+
e.scrollTop = 0;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const o = [];
|
|
52
|
+
let d = l.offsetParent;
|
|
53
|
+
for (; d !== null && e !== d && e.contains(d); )
|
|
54
|
+
o.push(d), d = d.offsetParent;
|
|
55
|
+
const t = l.offsetTop + o.reduce((u, v) => u + v.offsetTop, 0), r = t + l.offsetHeight, i = e.scrollTop, p = i + e.clientHeight;
|
|
56
|
+
t < i ? e.scrollTop = t : r > p && (e.scrollTop = r - e.clientHeight);
|
|
57
|
+
}
|
|
58
|
+
const Ee = (e) => {
|
|
59
|
+
if (!e)
|
|
60
|
+
return { onClick: oe, onMousedown: oe, onMouseup: oe };
|
|
61
|
+
let l = !1, o = !1;
|
|
62
|
+
return { onClick: (i) => {
|
|
63
|
+
l && o && e(i), l = o = !1;
|
|
64
|
+
}, onMousedown: (i) => {
|
|
65
|
+
l = i.target === i.currentTarget;
|
|
66
|
+
}, onMouseup: (i) => {
|
|
67
|
+
o = i.target === i.currentTarget;
|
|
68
|
+
} };
|
|
69
|
+
}, go = ie({
|
|
70
|
+
mask: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !0
|
|
73
|
+
},
|
|
74
|
+
customMaskEvent: Boolean,
|
|
75
|
+
overlayClass: {
|
|
76
|
+
type: q([
|
|
77
|
+
String,
|
|
78
|
+
Array,
|
|
79
|
+
Object
|
|
80
|
+
])
|
|
81
|
+
},
|
|
82
|
+
zIndex: {
|
|
83
|
+
type: q([String, Number])
|
|
84
|
+
}
|
|
85
|
+
}), yo = {
|
|
86
|
+
click: (e) => e instanceof MouseEvent
|
|
87
|
+
}, bo = "overlay";
|
|
88
|
+
var ho = re({
|
|
89
|
+
name: "ElOverlay",
|
|
90
|
+
props: go,
|
|
91
|
+
emits: yo,
|
|
92
|
+
setup(e, { slots: l, emit: o }) {
|
|
93
|
+
const d = ue(bo), t = (u) => {
|
|
94
|
+
o("click", u);
|
|
95
|
+
}, { onClick: r, onMousedown: i, onMouseup: p } = Ee(
|
|
96
|
+
e.customMaskEvent ? void 0 : t
|
|
97
|
+
);
|
|
98
|
+
return () => e.mask ? j(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
class: [d.b(), e.overlayClass],
|
|
102
|
+
style: {
|
|
103
|
+
zIndex: e.zIndex
|
|
104
|
+
},
|
|
105
|
+
onClick: r,
|
|
106
|
+
onMousedown: i,
|
|
107
|
+
onMouseup: p
|
|
108
|
+
},
|
|
109
|
+
[L(l, "default")],
|
|
110
|
+
te.STYLE | te.CLASS | te.PROPS,
|
|
111
|
+
["onClick", "onMouseup", "onMousedown"]
|
|
112
|
+
) : Le(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
class: e.overlayClass,
|
|
116
|
+
style: {
|
|
117
|
+
zIndex: e.zIndex,
|
|
118
|
+
position: "fixed",
|
|
119
|
+
top: "0px",
|
|
120
|
+
right: "0px",
|
|
121
|
+
bottom: "0px",
|
|
122
|
+
left: "0px"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
[L(l, "default")]
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
const Co = ho, ke = Symbol("dialogInjectionKey"), ne = "dialog-fade", Te = ie({
|
|
130
|
+
center: Boolean,
|
|
131
|
+
alignCenter: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: void 0
|
|
134
|
+
},
|
|
135
|
+
closeIcon: {
|
|
136
|
+
type: xe
|
|
137
|
+
},
|
|
138
|
+
draggable: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: void 0
|
|
141
|
+
},
|
|
142
|
+
overflow: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
default: void 0
|
|
145
|
+
},
|
|
146
|
+
fullscreen: Boolean,
|
|
147
|
+
headerClass: String,
|
|
148
|
+
bodyClass: String,
|
|
149
|
+
footerClass: String,
|
|
150
|
+
showClose: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
default: !0
|
|
153
|
+
},
|
|
154
|
+
title: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: ""
|
|
157
|
+
},
|
|
158
|
+
ariaLevel: {
|
|
159
|
+
type: String,
|
|
160
|
+
default: "2"
|
|
161
|
+
}
|
|
162
|
+
}), wo = {
|
|
163
|
+
close: () => !0
|
|
164
|
+
}, Eo = (e, l, o, d) => {
|
|
165
|
+
const t = {
|
|
166
|
+
offsetX: 0,
|
|
167
|
+
offsetY: 0
|
|
168
|
+
}, r = D(!1), i = (m, g) => {
|
|
169
|
+
if (e.value) {
|
|
170
|
+
const { offsetX: y, offsetY: b } = t, w = e.value.getBoundingClientRect(), P = w.left, c = w.top, E = w.width, I = w.height, A = document.documentElement.clientWidth, N = document.documentElement.clientHeight, W = -P + y, Y = -c + b, $ = A - P - E + y, S = N - c - (I < N ? I : 0) + b;
|
|
171
|
+
d?.value || (m = Math.min(Math.max(m, W), $), g = Math.min(Math.max(g, Y), S)), t.offsetX = m, t.offsetY = g, e.value.style.transform = `translate(${ae(m)}, ${ae(
|
|
172
|
+
g
|
|
173
|
+
)})`;
|
|
174
|
+
}
|
|
175
|
+
}, p = (m) => {
|
|
176
|
+
const g = m.clientX, y = m.clientY, { offsetX: b, offsetY: w } = t, P = (E) => {
|
|
177
|
+
r.value || (r.value = !0);
|
|
178
|
+
const I = b + E.clientX - g, A = w + E.clientY - y;
|
|
179
|
+
i(I, A);
|
|
180
|
+
}, c = () => {
|
|
181
|
+
r.value = !1, document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", c);
|
|
182
|
+
};
|
|
183
|
+
document.addEventListener("mousemove", P), document.addEventListener("mouseup", c);
|
|
184
|
+
}, u = () => {
|
|
185
|
+
l.value && e.value && (l.value.addEventListener("mousedown", p), window.addEventListener("resize", T));
|
|
186
|
+
}, v = () => {
|
|
187
|
+
l.value && e.value && (l.value.removeEventListener("mousedown", p), window.removeEventListener("resize", T));
|
|
188
|
+
}, k = () => {
|
|
189
|
+
t.offsetX = 0, t.offsetY = 0, e.value && (e.value.style.transform = "");
|
|
190
|
+
}, T = () => {
|
|
191
|
+
const { offsetX: m, offsetY: g } = t;
|
|
192
|
+
i(m, g);
|
|
193
|
+
};
|
|
194
|
+
return ye(() => {
|
|
195
|
+
Ae(() => {
|
|
196
|
+
o.value ? u() : v();
|
|
197
|
+
});
|
|
198
|
+
}), _e(() => {
|
|
199
|
+
v();
|
|
200
|
+
}), {
|
|
201
|
+
isDragging: r,
|
|
202
|
+
resetPosition: k,
|
|
203
|
+
updatePosition: T
|
|
204
|
+
};
|
|
205
|
+
}, ko = (...e) => (l) => {
|
|
206
|
+
e.forEach((o) => {
|
|
207
|
+
o.value = l;
|
|
208
|
+
});
|
|
209
|
+
}, To = ["aria-level"], So = ["aria-label"], Po = ["id"], Mo = re({
|
|
210
|
+
name: "ElDialogContent",
|
|
211
|
+
__name: "dialog-content",
|
|
212
|
+
props: Te,
|
|
213
|
+
emits: wo,
|
|
214
|
+
setup(e, { expose: l }) {
|
|
215
|
+
const { t: o } = Ke(), { Close: d } = Ge, t = e, { dialogRef: r, headerRef: i, bodyId: p, ns: u, style: v } = fe(ke), { focusTrapRef: k } = fe(Ue), T = ko(k, r), m = C(() => !!t.draggable), g = C(() => !!t.overflow), { resetPosition: y, updatePosition: b, isDragging: w } = Eo(
|
|
216
|
+
r,
|
|
217
|
+
i,
|
|
218
|
+
m,
|
|
219
|
+
g
|
|
220
|
+
), P = C(() => [
|
|
221
|
+
u.b(),
|
|
222
|
+
u.is("fullscreen", t.fullscreen),
|
|
223
|
+
u.is("draggable", m.value),
|
|
224
|
+
u.is("dragging", w.value),
|
|
225
|
+
u.is("align-center", !!t.alignCenter),
|
|
226
|
+
{ [u.m("center")]: t.center }
|
|
227
|
+
]);
|
|
228
|
+
return l({
|
|
229
|
+
resetPosition: y,
|
|
230
|
+
updatePosition: b
|
|
231
|
+
}), (c, E) => (z(), ee(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
ref: n(T),
|
|
235
|
+
class: O(P.value),
|
|
236
|
+
style: be(n(v)),
|
|
237
|
+
tabindex: "-1"
|
|
238
|
+
},
|
|
239
|
+
[
|
|
240
|
+
K(
|
|
241
|
+
"header",
|
|
242
|
+
{
|
|
243
|
+
ref_key: "headerRef",
|
|
244
|
+
ref: i,
|
|
245
|
+
class: O([n(u).e("header"), c.headerClass, { "show-close": c.showClose }])
|
|
246
|
+
},
|
|
247
|
+
[
|
|
248
|
+
L(c.$slots, "header", {}, () => [
|
|
249
|
+
K("span", {
|
|
250
|
+
role: "heading",
|
|
251
|
+
"aria-level": c.ariaLevel,
|
|
252
|
+
class: O(n(u).e("title"))
|
|
253
|
+
}, Oe(c.title), 11, To)
|
|
254
|
+
]),
|
|
255
|
+
c.showClose ? (z(), ee("button", {
|
|
256
|
+
key: 0,
|
|
257
|
+
"aria-label": n(o)("el.dialog.close"),
|
|
258
|
+
class: O(n(u).e("headerbtn")),
|
|
259
|
+
type: "button",
|
|
260
|
+
onClick: E[0] || (E[0] = (I) => c.$emit("close"))
|
|
261
|
+
}, [
|
|
262
|
+
j(n(qe), {
|
|
263
|
+
class: O(n(u).e("close"))
|
|
264
|
+
}, {
|
|
265
|
+
default: F(() => [
|
|
266
|
+
(z(), se(Fe(c.closeIcon || n(d))))
|
|
267
|
+
]),
|
|
268
|
+
_: 1
|
|
269
|
+
}, 8, ["class"])
|
|
270
|
+
], 10, So)) : le("v-if", !0)
|
|
271
|
+
],
|
|
272
|
+
2
|
|
273
|
+
),
|
|
274
|
+
K("div", {
|
|
275
|
+
id: n(p),
|
|
276
|
+
class: O([n(u).e("body"), c.bodyClass])
|
|
277
|
+
}, [
|
|
278
|
+
L(c.$slots, "default")
|
|
279
|
+
], 10, Po),
|
|
280
|
+
c.$slots.footer ? (z(), ee(
|
|
281
|
+
"footer",
|
|
282
|
+
{
|
|
283
|
+
key: 0,
|
|
284
|
+
class: O([n(u).e("footer"), c.footerClass])
|
|
285
|
+
},
|
|
286
|
+
[
|
|
287
|
+
L(c.$slots, "footer")
|
|
288
|
+
],
|
|
289
|
+
2
|
|
290
|
+
)) : le("v-if", !0)
|
|
291
|
+
],
|
|
292
|
+
6
|
|
293
|
+
));
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
var Io = /* @__PURE__ */ Ce(Mo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);
|
|
297
|
+
const Bo = ie({
|
|
298
|
+
...Te,
|
|
299
|
+
appendToBody: Boolean,
|
|
300
|
+
appendTo: {
|
|
301
|
+
type: Ze.to.type,
|
|
302
|
+
default: "body"
|
|
303
|
+
},
|
|
304
|
+
beforeClose: {
|
|
305
|
+
type: q(Function)
|
|
306
|
+
},
|
|
307
|
+
destroyOnClose: Boolean,
|
|
308
|
+
closeOnClickModal: {
|
|
309
|
+
type: Boolean,
|
|
310
|
+
default: !0
|
|
311
|
+
},
|
|
312
|
+
closeOnPressEscape: {
|
|
313
|
+
type: Boolean,
|
|
314
|
+
default: !0
|
|
315
|
+
},
|
|
316
|
+
lockScroll: {
|
|
317
|
+
type: Boolean,
|
|
318
|
+
default: !0
|
|
319
|
+
},
|
|
320
|
+
modal: {
|
|
321
|
+
type: Boolean,
|
|
322
|
+
default: !0
|
|
323
|
+
},
|
|
324
|
+
modalPenetrable: Boolean,
|
|
325
|
+
openDelay: {
|
|
326
|
+
type: Number,
|
|
327
|
+
default: 0
|
|
328
|
+
},
|
|
329
|
+
closeDelay: {
|
|
330
|
+
type: Number,
|
|
331
|
+
default: 0
|
|
332
|
+
},
|
|
333
|
+
top: {
|
|
334
|
+
type: String
|
|
335
|
+
},
|
|
336
|
+
modelValue: Boolean,
|
|
337
|
+
modalClass: String,
|
|
338
|
+
headerClass: String,
|
|
339
|
+
bodyClass: String,
|
|
340
|
+
footerClass: String,
|
|
341
|
+
width: {
|
|
342
|
+
type: [String, Number]
|
|
343
|
+
},
|
|
344
|
+
zIndex: {
|
|
345
|
+
type: Number
|
|
346
|
+
},
|
|
347
|
+
trapFocus: Boolean,
|
|
348
|
+
headerAriaLevel: {
|
|
349
|
+
type: String,
|
|
350
|
+
default: "2"
|
|
351
|
+
},
|
|
352
|
+
transition: {
|
|
353
|
+
type: q([String, Object]),
|
|
354
|
+
default: void 0
|
|
355
|
+
}
|
|
356
|
+
}), Do = {
|
|
357
|
+
open: () => !0,
|
|
358
|
+
opened: () => !0,
|
|
359
|
+
close: () => !0,
|
|
360
|
+
closed: () => !0,
|
|
361
|
+
[we]: (e) => Je(e),
|
|
362
|
+
openAutoFocus: () => !0,
|
|
363
|
+
closeAutoFocus: () => !0
|
|
364
|
+
}, Lo = (e, l = {}) => {
|
|
365
|
+
$e(e) || Qe(
|
|
366
|
+
"[useLockscreen]",
|
|
367
|
+
"You need to pass a ref param to this function"
|
|
368
|
+
);
|
|
369
|
+
const o = l.ns || ue("popup"), d = C(() => o.bm("parent", "hidden"));
|
|
370
|
+
let t = 0, r = !1, i = "0";
|
|
371
|
+
const p = () => {
|
|
372
|
+
setTimeout(() => {
|
|
373
|
+
typeof document > "u" || r && document && (document.body.style.width = i, to(document.body, d.value));
|
|
374
|
+
}, 200);
|
|
375
|
+
};
|
|
376
|
+
U(e, (u) => {
|
|
377
|
+
if (!u) {
|
|
378
|
+
p();
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
r = !eo(document.body, d.value), r && (i = document.body.style.width, oo(document.body, d.value)), t = po(o.namespace.value);
|
|
382
|
+
const v = document.documentElement.clientHeight < document.body.scrollHeight, k = he(document.body, "overflowY");
|
|
383
|
+
t > 0 && (v || k === "scroll") && r && (document.body.style.width = `calc(100% - ${t}px)`);
|
|
384
|
+
}), Ne(() => p());
|
|
385
|
+
}, Ao = "ElDialog", _o = (e, l) => {
|
|
386
|
+
var o;
|
|
387
|
+
const t = ze().emit, { nextZIndex: r } = no();
|
|
388
|
+
let i = "";
|
|
389
|
+
const p = me(), u = me(), v = D(!1), k = D(!1), T = D(!1), m = D((o = e.zIndex) != null ? o : r()), g = D(!1);
|
|
390
|
+
let y, b;
|
|
391
|
+
const w = fo(), P = C(() => {
|
|
392
|
+
var s, f;
|
|
393
|
+
return (f = (s = w.value) == null ? void 0 : s.namespace) != null ? f : lo;
|
|
394
|
+
}), c = C(() => {
|
|
395
|
+
var s;
|
|
396
|
+
return (s = w.value) == null ? void 0 : s.dialog;
|
|
397
|
+
}), E = C(() => {
|
|
398
|
+
const s = {}, f = `--${P.value}-dialog`;
|
|
399
|
+
if (!e.fullscreen) {
|
|
400
|
+
e.top && (s[`${f}-margin-top`] = e.top);
|
|
401
|
+
const h = ae(e.width);
|
|
402
|
+
h && (s[`${f}-width`] = h);
|
|
403
|
+
}
|
|
404
|
+
return s;
|
|
405
|
+
}), I = C(
|
|
406
|
+
() => {
|
|
407
|
+
var s, f, h;
|
|
408
|
+
return ((h = (f = e.draggable) != null ? f : (s = c.value) == null ? void 0 : s.draggable) != null ? h : !1) && !e.fullscreen;
|
|
409
|
+
}
|
|
410
|
+
), A = C(
|
|
411
|
+
() => {
|
|
412
|
+
var s, f, h;
|
|
413
|
+
return (h = (f = e.alignCenter) != null ? f : (s = c.value) == null ? void 0 : s.alignCenter) != null ? h : !1;
|
|
414
|
+
}
|
|
415
|
+
), N = C(
|
|
416
|
+
() => {
|
|
417
|
+
var s, f, h;
|
|
418
|
+
return (h = (f = e.overflow) != null ? f : (s = c.value) == null ? void 0 : s.overflow) != null ? h : !1;
|
|
419
|
+
}
|
|
420
|
+
), W = C(() => A.value ? { display: "flex" } : {}), Y = C(() => {
|
|
421
|
+
var s, f, h;
|
|
422
|
+
const Z = (h = (f = e.transition) != null ? f : (s = c.value) == null ? void 0 : s.transition) != null ? h : ne, Be = {
|
|
423
|
+
name: Z,
|
|
424
|
+
onAfterEnter: $,
|
|
425
|
+
onBeforeLeave: R,
|
|
426
|
+
onAfterLeave: S
|
|
427
|
+
};
|
|
428
|
+
if (so(Z)) {
|
|
429
|
+
const B = { ...Z }, Q = (X, De) => (ce) => {
|
|
430
|
+
ro(X) ? X.forEach((de) => {
|
|
431
|
+
pe(de) && de(ce);
|
|
432
|
+
}) : pe(X) && X(ce), De();
|
|
433
|
+
};
|
|
434
|
+
return B.onAfterEnter = Q(B.onAfterEnter, $), B.onBeforeLeave = Q(B.onBeforeLeave, R), B.onAfterLeave = Q(B.onAfterLeave, S), B.name || (B.name = ne, ao(
|
|
435
|
+
Ao,
|
|
436
|
+
`transition.name is missing when using object syntax, fallback to '${ne}'`
|
|
437
|
+
)), B;
|
|
438
|
+
}
|
|
439
|
+
return Be;
|
|
440
|
+
});
|
|
441
|
+
function $() {
|
|
442
|
+
t("opened");
|
|
443
|
+
}
|
|
444
|
+
function S() {
|
|
445
|
+
t("closed"), t(we, !1), e.destroyOnClose && (T.value = !1), g.value = !1;
|
|
446
|
+
}
|
|
447
|
+
function R() {
|
|
448
|
+
g.value = !0, t("close");
|
|
449
|
+
}
|
|
450
|
+
function G() {
|
|
451
|
+
b?.(), y?.(), e.openDelay && e.openDelay > 0 ? { stop: y } = ge(() => _(), e.openDelay) : _();
|
|
452
|
+
}
|
|
453
|
+
function a() {
|
|
454
|
+
y?.(), b?.(), e.closeDelay && e.closeDelay > 0 ? { stop: b } = ge(() => J(), e.closeDelay) : J();
|
|
455
|
+
}
|
|
456
|
+
function M() {
|
|
457
|
+
function s(f) {
|
|
458
|
+
f || (k.value = !0, v.value = !1);
|
|
459
|
+
}
|
|
460
|
+
e.beforeClose ? e.beforeClose(s) : a();
|
|
461
|
+
}
|
|
462
|
+
function H() {
|
|
463
|
+
e.closeOnClickModal && M();
|
|
464
|
+
}
|
|
465
|
+
function _() {
|
|
466
|
+
V && (v.value = !0);
|
|
467
|
+
}
|
|
468
|
+
function J() {
|
|
469
|
+
v.value = !1;
|
|
470
|
+
}
|
|
471
|
+
function Se() {
|
|
472
|
+
t("openAutoFocus");
|
|
473
|
+
}
|
|
474
|
+
function Pe() {
|
|
475
|
+
t("closeAutoFocus");
|
|
476
|
+
}
|
|
477
|
+
function Me(s) {
|
|
478
|
+
var f;
|
|
479
|
+
((f = s.detail) == null ? void 0 : f.focusReason) === "pointer" && s.preventDefault();
|
|
480
|
+
}
|
|
481
|
+
e.lockScroll && Lo(v);
|
|
482
|
+
function Ie() {
|
|
483
|
+
e.closeOnPressEscape && M();
|
|
484
|
+
}
|
|
485
|
+
return U(
|
|
486
|
+
() => e.zIndex,
|
|
487
|
+
() => {
|
|
488
|
+
var s;
|
|
489
|
+
m.value = (s = e.zIndex) != null ? s : r();
|
|
490
|
+
}
|
|
491
|
+
), U(
|
|
492
|
+
() => e.modelValue,
|
|
493
|
+
(s) => {
|
|
494
|
+
var f;
|
|
495
|
+
s ? (k.value = !1, G(), T.value = !0, m.value = (f = e.zIndex) != null ? f : r(), We(() => {
|
|
496
|
+
t("open"), l.value && (l.value.parentElement.scrollTop = 0, l.value.parentElement.scrollLeft = 0, l.value.scrollTop = 0);
|
|
497
|
+
})) : v.value && a();
|
|
498
|
+
}
|
|
499
|
+
), U(
|
|
500
|
+
() => e.fullscreen,
|
|
501
|
+
(s) => {
|
|
502
|
+
l.value && (s ? (i = l.value.style.transform, l.value.style.transform = "") : l.value.style.transform = i);
|
|
503
|
+
}
|
|
504
|
+
), ye(() => {
|
|
505
|
+
e.modelValue && (v.value = !0, T.value = !0, G());
|
|
506
|
+
}), {
|
|
507
|
+
afterEnter: $,
|
|
508
|
+
afterLeave: S,
|
|
509
|
+
beforeLeave: R,
|
|
510
|
+
handleClose: M,
|
|
511
|
+
onModalClick: H,
|
|
512
|
+
close: a,
|
|
513
|
+
doClose: J,
|
|
514
|
+
onOpenAutoFocus: Se,
|
|
515
|
+
onCloseAutoFocus: Pe,
|
|
516
|
+
onCloseRequested: Ie,
|
|
517
|
+
onFocusoutPrevented: Me,
|
|
518
|
+
titleId: p,
|
|
519
|
+
bodyId: u,
|
|
520
|
+
closed: k,
|
|
521
|
+
style: E,
|
|
522
|
+
overlayDialogStyle: W,
|
|
523
|
+
rendered: T,
|
|
524
|
+
visible: v,
|
|
525
|
+
zIndex: m,
|
|
526
|
+
transitionConfig: Y,
|
|
527
|
+
_draggable: I,
|
|
528
|
+
_alignCenter: A,
|
|
529
|
+
_overflow: N,
|
|
530
|
+
closing: g
|
|
531
|
+
};
|
|
532
|
+
}, Oo = ["aria-label", "aria-labelledby", "aria-describedby"], Fo = re({
|
|
533
|
+
name: "ElDialog",
|
|
534
|
+
inheritAttrs: !1,
|
|
535
|
+
__name: "dialog",
|
|
536
|
+
props: Bo,
|
|
537
|
+
emits: Do,
|
|
538
|
+
setup(e, { expose: l }) {
|
|
539
|
+
const o = e, d = Ye();
|
|
540
|
+
vo(
|
|
541
|
+
{
|
|
542
|
+
scope: "el-dialog",
|
|
543
|
+
from: "the title slot",
|
|
544
|
+
replacement: "the header slot",
|
|
545
|
+
version: "3.0.0",
|
|
546
|
+
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
547
|
+
},
|
|
548
|
+
C(() => !!d.title)
|
|
549
|
+
);
|
|
550
|
+
const t = ue("dialog"), r = D(), i = D(), p = D(), {
|
|
551
|
+
visible: u,
|
|
552
|
+
titleId: v,
|
|
553
|
+
bodyId: k,
|
|
554
|
+
style: T,
|
|
555
|
+
overlayDialogStyle: m,
|
|
556
|
+
rendered: g,
|
|
557
|
+
transitionConfig: y,
|
|
558
|
+
zIndex: b,
|
|
559
|
+
_draggable: w,
|
|
560
|
+
_alignCenter: P,
|
|
561
|
+
_overflow: c,
|
|
562
|
+
handleClose: E,
|
|
563
|
+
onModalClick: I,
|
|
564
|
+
onOpenAutoFocus: A,
|
|
565
|
+
onCloseAutoFocus: N,
|
|
566
|
+
onCloseRequested: W,
|
|
567
|
+
onFocusoutPrevented: Y,
|
|
568
|
+
closing: $
|
|
569
|
+
} = _o(o, r);
|
|
570
|
+
Re(ke, {
|
|
571
|
+
dialogRef: r,
|
|
572
|
+
headerRef: i,
|
|
573
|
+
bodyId: k,
|
|
574
|
+
ns: t,
|
|
575
|
+
rendered: g,
|
|
576
|
+
style: T
|
|
577
|
+
});
|
|
578
|
+
const S = Ee(I), R = C(
|
|
579
|
+
() => o.modalPenetrable && !o.modal && !o.fullscreen
|
|
580
|
+
);
|
|
581
|
+
return l({
|
|
582
|
+
visible: u,
|
|
583
|
+
dialogContentRef: p,
|
|
584
|
+
resetPosition: () => {
|
|
585
|
+
var a;
|
|
586
|
+
(a = p.value) == null || a.resetPosition();
|
|
587
|
+
},
|
|
588
|
+
handleClose: E
|
|
589
|
+
}), (a, M) => (z(), se(n(io), {
|
|
590
|
+
to: a.appendTo,
|
|
591
|
+
disabled: a.appendTo !== "body" ? !1 : !a.appendToBody
|
|
592
|
+
}, {
|
|
593
|
+
default: F(() => [
|
|
594
|
+
j(
|
|
595
|
+
je,
|
|
596
|
+
ve(n(y), { persisted: "" }),
|
|
597
|
+
{
|
|
598
|
+
default: F(() => {
|
|
599
|
+
var H;
|
|
600
|
+
return [
|
|
601
|
+
Ve(j(n(Co), {
|
|
602
|
+
"custom-mask-event": "",
|
|
603
|
+
mask: a.modal,
|
|
604
|
+
"overlay-class": [
|
|
605
|
+
(H = a.modalClass) != null ? H : "",
|
|
606
|
+
`${n(t).namespace.value}-modal-dialog`,
|
|
607
|
+
n(t).is("penetrable", R.value)
|
|
608
|
+
],
|
|
609
|
+
"z-index": n(b)
|
|
610
|
+
}, {
|
|
611
|
+
default: F(() => [
|
|
612
|
+
K("div", {
|
|
613
|
+
role: "dialog",
|
|
614
|
+
"aria-modal": "true",
|
|
615
|
+
"aria-label": a.title || void 0,
|
|
616
|
+
"aria-labelledby": a.title ? void 0 : n(v),
|
|
617
|
+
"aria-describedby": n(k),
|
|
618
|
+
class: O([
|
|
619
|
+
`${n(t).namespace.value}-overlay-dialog`,
|
|
620
|
+
n(t).is("closing", n($))
|
|
621
|
+
]),
|
|
622
|
+
style: be(n(m)),
|
|
623
|
+
onClick: M[0] || (M[0] = (..._) => n(S).onClick && n(S).onClick(..._)),
|
|
624
|
+
onMousedown: M[1] || (M[1] = (..._) => n(S).onMousedown && n(S).onMousedown(..._)),
|
|
625
|
+
onMouseup: M[2] || (M[2] = (..._) => n(S).onMouseup && n(S).onMouseup(..._))
|
|
626
|
+
}, [
|
|
627
|
+
j(n(uo), {
|
|
628
|
+
loop: "",
|
|
629
|
+
trapped: n(u),
|
|
630
|
+
"focus-start-el": "container",
|
|
631
|
+
onFocusAfterTrapped: n(A),
|
|
632
|
+
onFocusAfterReleased: n(N),
|
|
633
|
+
onFocusoutPrevented: n(Y),
|
|
634
|
+
onReleaseRequested: n(W)
|
|
635
|
+
}, {
|
|
636
|
+
default: F(() => [
|
|
637
|
+
n(g) ? (z(), se(Io, ve({
|
|
638
|
+
key: 0,
|
|
639
|
+
ref_key: "dialogContentRef",
|
|
640
|
+
ref: p
|
|
641
|
+
}, a.$attrs, {
|
|
642
|
+
center: a.center,
|
|
643
|
+
"align-center": n(P),
|
|
644
|
+
"close-icon": a.closeIcon,
|
|
645
|
+
draggable: n(w),
|
|
646
|
+
overflow: n(c),
|
|
647
|
+
fullscreen: a.fullscreen,
|
|
648
|
+
"header-class": a.headerClass,
|
|
649
|
+
"body-class": a.bodyClass,
|
|
650
|
+
"footer-class": a.footerClass,
|
|
651
|
+
"show-close": a.showClose,
|
|
652
|
+
title: a.title,
|
|
653
|
+
"aria-level": a.headerAriaLevel,
|
|
654
|
+
onClose: n(E)
|
|
655
|
+
}), He({
|
|
656
|
+
header: F(() => [
|
|
657
|
+
a.$slots.title ? L(a.$slots, "title", { key: 1 }) : L(a.$slots, "header", {
|
|
658
|
+
key: 0,
|
|
659
|
+
close: n(E),
|
|
660
|
+
titleId: n(v),
|
|
661
|
+
titleClass: n(t).e("title")
|
|
662
|
+
})
|
|
663
|
+
]),
|
|
664
|
+
default: F(() => [
|
|
665
|
+
L(a.$slots, "default")
|
|
666
|
+
]),
|
|
667
|
+
_: 2
|
|
668
|
+
}, [
|
|
669
|
+
a.$slots.footer ? {
|
|
670
|
+
name: "footer",
|
|
671
|
+
fn: F(() => [
|
|
672
|
+
L(a.$slots, "footer")
|
|
673
|
+
]),
|
|
674
|
+
key: "0"
|
|
675
|
+
} : void 0
|
|
676
|
+
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : le("v-if", !0)
|
|
677
|
+
]),
|
|
678
|
+
_: 3
|
|
679
|
+
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
680
|
+
], 46, Oo)
|
|
681
|
+
]),
|
|
682
|
+
_: 3
|
|
683
|
+
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
684
|
+
[Xe, n(u)]
|
|
685
|
+
])
|
|
686
|
+
];
|
|
687
|
+
}),
|
|
688
|
+
_: 3
|
|
689
|
+
},
|
|
690
|
+
16
|
|
691
|
+
)
|
|
692
|
+
]),
|
|
693
|
+
_: 3
|
|
694
|
+
}, 8, ["to", "disabled"]));
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
var $o = /* @__PURE__ */ Ce(Fo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);
|
|
698
|
+
const Ho = co($o);
|
|
699
|
+
export {
|
|
700
|
+
Ho as E,
|
|
701
|
+
jo as g,
|
|
702
|
+
Vo as s,
|
|
703
|
+
Lo as u
|
|
704
|
+
};
|