bp-aicc-editor 1.2.521 → 1.2.523
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 → ScreenPreview-yUHo60be.js} +51 -105
- package/lib/atlas-BMjKIOwk.js +3891 -0
- package/lib/{button-base-DHNVBrQ9.js → button-base-CXl1z-_m.js} +1 -1
- package/lib/{cache-lsjsKZHu.js → cache-DbHSDjJy.js} +1 -1
- package/lib/config-provider-Bui8m4GV.js +62 -0
- package/lib/{container-group-DqAcKEBy.js → container-group-D6Extorz.js} +1 -1
- package/lib/{copy-C5Pi6nJh.js → copy-CsCmPy4J.js} +1 -1
- package/lib/{datav-BER95ty-.js → datav-BTD-HJhV.js} +27 -27
- package/lib/{delete-C2EW4JCs.js → delete-COj0ilHh.js} +1 -1
- package/lib/{divider-BazBGRgV.js → divider-B3K_URZc.js} +1 -1
- package/lib/dropdown-CWvnuJsO.js +105 -0
- package/lib/{edit-B2pfd2q1.js → edit-vdJaEine.js} +1 -1
- package/lib/{el-form-item-BDdxk5F5.js → el-form-item-BbaNohQv.js} +51 -51
- package/lib/{el-link-D2ol9BHQ.js → el-link-Dq721Q7-.js} +12 -12
- package/lib/{el-loading-Cgwgez55.js → el-loading-DOxnN3bm.js} +17 -17
- package/lib/{fullscreen-OChDsSnk.js → fullscreen-DXSogbcG.js} +1 -1
- package/lib/{image-C5ZAY3yt.js → image-Cu7JTK9-.js} +1 -1
- package/lib/{index-Ci8AbyIq.js → index-68soBnbK.js} +8 -8
- package/lib/{index-BatyRVpL.js → index-B-d8WIg1.js} +7 -7
- package/lib/{index-BfIEunKC.js → index-B4zV3cxV.js} +18 -17
- package/lib/{index-CZJriuFt.js → index-B8QqTLfg.js} +4974 -4898
- package/lib/index-BBMItxtW.js +619 -0
- package/lib/{index-CGrR_i0u.js → index-BMm0MRz5.js} +14 -15
- package/lib/index-BMn8EzMD.js +1027 -0
- package/lib/index-BNTW8F-9.js +322 -0
- package/lib/index-BTI518b1.js +69 -0
- package/lib/{index-BWPVi43E.js → index-BZxUAT4z.js} +4 -4
- package/lib/{index-Ck7uFsPE.js → index-BdYTc41r.js} +24 -24
- package/lib/index-BfI55Ioc.js +404 -0
- package/lib/{index-BhP9eBCp.js → index-BmAcetSf.js} +19 -20
- package/lib/index-C35Yp3i8.js +545 -0
- package/lib/{index-B19lEYui.js → index-C6GUNRx9.js} +2 -2
- package/lib/index-CC28_8Jl.js +567 -0
- package/lib/index-CDhmvVt8.js +338 -0
- package/lib/index-CDx0y0fp.js +144 -0
- package/lib/{el-button-DvLKp6Ga.js → index-CJjljoJG.js} +106 -106
- package/lib/index-CNCgXPiO.js +235 -0
- package/lib/{index-CWbZmzNT.js → index-CPa_MnOD.js} +30 -29
- package/lib/index-CW6ljdNf.js +1582 -0
- package/lib/index-C_WopEui.js +513 -0
- package/lib/{index-CX_Ghcb6.js → index-CejowjGd.js} +56 -53
- package/lib/{index-BwCQWH-N.js → index-CfZXOvi-.js} +42 -40
- package/lib/{index-CVsy2qTh.js → index-CgzRTmPh.js} +16 -15
- package/lib/index-CmzuNM9v.js +32 -0
- package/lib/index-CrxcAFt8.js +5343 -0
- package/lib/{index-C7k49L2T.js → index-CuHA7QXu.js} +10 -10
- package/lib/{index-qVyixI57.js → index-CyBGAB7D.js} +21 -20
- package/lib/index-D6J7coU0.js +129 -0
- package/lib/index-DDHxrdAo.js +1773 -0
- package/lib/index-DDL-yqq0.js +1401 -0
- package/lib/{index-BPcvYtHf.js → index-DOxy-bey.js} +6 -6
- package/lib/{index-CVE37oE7.js → index-DOyr0BHr.js} +7 -7
- package/lib/index-DPOanmXI.js +887 -0
- package/lib/{index-3pzVrvby.js → index-DR_husZg.js} +46 -46
- package/lib/{el-tab-pane-DD2eM9rB.js → index-DUzOCQrW.js} +125 -124
- package/lib/{index-CGFEhUh9.js → index-DVYI-g8Q.js} +53 -52
- package/lib/index-DVyjilLy.js +51 -0
- package/lib/{index-CJyYGViv.js → index-DWAJ9GyC.js} +9 -9
- package/lib/index-Dj2qCwPD.js +178 -0
- package/lib/{index-D4X0_jbv.js → index-Dx2Gld1J.js} +32 -32
- package/lib/{index-C2XeCqtq.js → index-E9T-y2Yz.js} +3 -3
- package/lib/{index-Buoc0ISP.js → index-FlmXAW0Z.js} +60 -58
- package/lib/index-NqqOvc6V.js +169 -0
- package/lib/{index-BkdiXCRY.js → index-ObKRNOmJ.js} +6 -7
- package/lib/index-bOWjoplU.js +448 -0
- package/lib/{index-CXQ258ID.js → index-buU8mDzi.js} +15 -16
- package/lib/{index-tbhuYbb0.js → index-mGKAWDJZ.js} +11 -12
- package/lib/index.es.js +4 -4
- package/lib/index.umd.js +46 -40
- package/lib/{layer-setting-panel-VvDSQ-cn.js → layer-setting-panel-BGPj32nP.js} +2 -2
- package/lib/{line-show-Bp4G-LqO.js → line-show-DUn1bu_P.js} +1 -1
- package/lib/{multi-layout-config-drSy7ezf.js → multi-layout-config-BTWxJeuc.js} +7 -8
- package/lib/{multiline-text-D89kYrA2.js → multiline-text-CPJdCWJ7.js} +1 -1
- package/lib/{navigation-YAGxZ0OT.js → navigation-ZLJaBOUj.js} +1 -1
- package/lib/page-config-CHP07Ndf.js +253 -0
- package/lib/{page-tabs-wFeNBY4c.js → page-tabs-CKLhgrip.js} +45 -41
- package/lib/{plus-3mdO6yXY.js → plus-xgpQU22I.js} +1 -1
- package/lib/raf-CJog_tcv.js +6 -0
- package/lib/refs-DZMysoBI.js +8 -0
- package/lib/{requestOld-DRcjsmRQ.js → requestOld-CaGzCXrV.js} +97 -96
- package/lib/{schema-BsnIOGBI.js → schema-BaFWGeFt.js} +1 -1
- package/lib/{schema-_APJMUW3.js → schema-CUR-UK2S.js} +44 -41
- package/lib/{schema-BavJE-SK.js → schema-WUk7XVq7.js} +58 -54
- package/lib/{schema-qKI1F8Bt.js → schema-geZfujv8.js} +1 -1
- package/lib/{schema-BflqDw-a.js → schema-iosjRxCC.js} +1 -1
- package/lib/{schema-Bo30dbBx.js → schema-tuPllxn6.js} +1 -1
- package/lib/scroll-CWfl60Tu.js +58 -0
- package/lib/{setting-panel-BgzN3BUP.js → setting-panel-0qLcwYyT.js} +154 -151
- package/lib/{show-C4AeWlKj.js → show-BCwE3hGY.js} +1 -1
- package/lib/{stepper-D5EFeJWG.js → stepper-Bud1Jppr.js} +1 -1
- package/lib/strings-BvUQWzDM.js +6 -0
- package/lib/style.css +1 -1
- package/lib/{switch-B0dR4LM_.js → switch-VlaUmSpJ.js} +1 -1
- package/lib/{unlock-Cq9PLhBA.js → unlock-B2FVPQlm.js} +1 -1
- package/lib/{use-env-url-BM9dgwx_.js → use-env-url-D1p8ib2L.js} +1 -1
- package/lib/use-global-config-D_yoqf3Q.js +90 -0
- package/lib/validator-BOXH2OMA.js +5 -0
- package/lib/{vnode-B_Dj8zxu.js → vnode-Bxs1g06p.js} +1 -1
- package/package.json +1 -1
- package/lib/atlas-DsmLq2V0.js +0 -38
- package/lib/el-overlay-BK0_UIU6.js +0 -704
- package/lib/index-B1yAU2Cb.js +0 -390
- package/lib/index-BCFXuK7k.js +0 -68
- package/lib/index-BD4Jwo8Z.js +0 -449
- package/lib/index-BMWqf88L.js +0 -356
- package/lib/index-Belsn8kt.js +0 -107
- package/lib/index-CIADz1i0.js +0 -8494
- package/lib/index-DKTrbqcA.js +0 -56
- package/lib/index-Ge_d2xqD.js +0 -127
- package/lib/page-config-Cmsi8Vpr.js +0 -582
- package/lib/strings-_mHAdgA4.js +0 -6
- package/lib/use-global-config-CflpFoxU.js +0 -115
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
import { nextTick as R, defineComponent as Be, resolveComponent as A, createBlock as p, openBlock as f, Transition as we, withCtx as y, withDirectives as F, createVNode as k, createElementVNode as v, normalizeClass as i, withModifiers as D, normalizeStyle as x, createElementBlock as H, createCommentVNode as w, resolveDynamicComponent as L, toDisplayString as O, withKeys as P, renderSlot as Me, vShow as U, createTextVNode as _, computed as E, ref as M, reactive as ke, markRaw as K, watch as ee, onMounted as Ie, onBeforeUnmount as Te, toRefs as Se, isVNode as ie, render as ue } from "vue";
|
|
2
|
+
import { E as Ae } from "./index-CJjljoJG.js";
|
|
3
|
+
import { bN as ne, M as Le, N as Oe, g as Re, bL as Ve, E as $e, d as ze, D as De, aS as oe, bK as se, r as te, az as j, V as G, Q as Pe, bi as ae, j as de, T as le, a5 as Ne, aU as Fe } from "./index-B8QqTLfg.js";
|
|
4
|
+
import { E as He, a as Ue, u as Ke, b as je } from "./index-CDx0y0fp.js";
|
|
5
|
+
import { i as qe } from "./validator-BOXH2OMA.js";
|
|
6
|
+
import { u as Ge } from "./use-global-config-D_yoqf3Q.js";
|
|
7
|
+
const q = "_trap-focus-children", h = [], re = (e) => {
|
|
8
|
+
var n;
|
|
9
|
+
if (h.length === 0)
|
|
10
|
+
return;
|
|
11
|
+
const r = Le(e), s = h[h.length - 1][q];
|
|
12
|
+
if (s.length > 0 && r === Oe.tab) {
|
|
13
|
+
if (s.length === 1) {
|
|
14
|
+
e.preventDefault(), document.activeElement !== s[0] && s[0].focus();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const l = e.shiftKey, t = e.target === s[0], d = e.target === s[s.length - 1];
|
|
18
|
+
if (t && l && (e.preventDefault(), s[s.length - 1].focus()), d && !l && (e.preventDefault(), s[0].focus()), process.env.NODE_ENV === "test") {
|
|
19
|
+
const c = s.indexOf(e.target);
|
|
20
|
+
c !== -1 && ((n = s[l ? c - 1 : c + 1]) == null || n.focus());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, We = {
|
|
24
|
+
beforeMount(e) {
|
|
25
|
+
e[q] = ne(e), h.push(e), h.length <= 1 && document.addEventListener("keydown", re);
|
|
26
|
+
},
|
|
27
|
+
updated(e) {
|
|
28
|
+
R(() => {
|
|
29
|
+
e[q] = ne(e);
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
unmounted() {
|
|
33
|
+
h.shift(), h.length === 0 && document.removeEventListener("keydown", re);
|
|
34
|
+
}
|
|
35
|
+
}, Xe = Be({
|
|
36
|
+
name: "ElMessageBox",
|
|
37
|
+
directives: {
|
|
38
|
+
TrapFocus: We
|
|
39
|
+
},
|
|
40
|
+
components: {
|
|
41
|
+
ElButton: Ae,
|
|
42
|
+
ElFocusTrap: De,
|
|
43
|
+
ElInput: ze,
|
|
44
|
+
ElOverlay: He,
|
|
45
|
+
ElIcon: $e,
|
|
46
|
+
...Ve
|
|
47
|
+
},
|
|
48
|
+
inheritAttrs: !1,
|
|
49
|
+
props: {
|
|
50
|
+
buttonSize: {
|
|
51
|
+
type: String,
|
|
52
|
+
validator: qe
|
|
53
|
+
},
|
|
54
|
+
modal: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !0
|
|
57
|
+
},
|
|
58
|
+
lockScroll: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !0
|
|
61
|
+
},
|
|
62
|
+
showClose: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !0
|
|
65
|
+
},
|
|
66
|
+
closeOnClickModal: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !0
|
|
69
|
+
},
|
|
70
|
+
closeOnPressEscape: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !0
|
|
73
|
+
},
|
|
74
|
+
closeOnHashChange: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: !0
|
|
77
|
+
},
|
|
78
|
+
center: Boolean,
|
|
79
|
+
draggable: Boolean,
|
|
80
|
+
overflow: Boolean,
|
|
81
|
+
roundButton: Boolean,
|
|
82
|
+
container: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: "body"
|
|
85
|
+
},
|
|
86
|
+
boxType: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: ""
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
emits: ["vanish", "action"],
|
|
92
|
+
setup(e, { emit: n }) {
|
|
93
|
+
const {
|
|
94
|
+
locale: r,
|
|
95
|
+
zIndex: s,
|
|
96
|
+
ns: l,
|
|
97
|
+
size: t
|
|
98
|
+
} = Ge(
|
|
99
|
+
"message-box",
|
|
100
|
+
E(() => e.buttonSize)
|
|
101
|
+
), { t: d } = r, { nextZIndex: c } = s, b = M(!1), o = ke({
|
|
102
|
+
autofocus: !0,
|
|
103
|
+
beforeClose: null,
|
|
104
|
+
callback: null,
|
|
105
|
+
cancelButtonText: "",
|
|
106
|
+
cancelButtonClass: "",
|
|
107
|
+
confirmButtonText: "",
|
|
108
|
+
confirmButtonClass: "",
|
|
109
|
+
customClass: "",
|
|
110
|
+
customStyle: {},
|
|
111
|
+
dangerouslyUseHTMLString: !1,
|
|
112
|
+
distinguishCancelAndClose: !1,
|
|
113
|
+
icon: "",
|
|
114
|
+
closeIcon: "",
|
|
115
|
+
inputPattern: null,
|
|
116
|
+
inputPlaceholder: "",
|
|
117
|
+
inputType: "text",
|
|
118
|
+
inputValue: "",
|
|
119
|
+
inputValidator: void 0,
|
|
120
|
+
inputErrorMessage: "",
|
|
121
|
+
message: "",
|
|
122
|
+
modalFade: !0,
|
|
123
|
+
modalClass: "",
|
|
124
|
+
showCancelButton: !1,
|
|
125
|
+
showConfirmButton: !0,
|
|
126
|
+
type: "",
|
|
127
|
+
title: void 0,
|
|
128
|
+
showInput: !1,
|
|
129
|
+
action: "",
|
|
130
|
+
confirmButtonLoading: !1,
|
|
131
|
+
cancelButtonLoading: !1,
|
|
132
|
+
confirmButtonLoadingIcon: K(oe),
|
|
133
|
+
cancelButtonLoadingIcon: K(oe),
|
|
134
|
+
confirmButtonDisabled: !1,
|
|
135
|
+
editorErrorMessage: "",
|
|
136
|
+
validateError: !1,
|
|
137
|
+
zIndex: c()
|
|
138
|
+
}), N = E(() => {
|
|
139
|
+
const a = o.type;
|
|
140
|
+
return { [l.bm("icon", a)]: a && se[a] };
|
|
141
|
+
}), u = te(), ce = te(), fe = E(() => {
|
|
142
|
+
const a = o.type;
|
|
143
|
+
return o.icon || a && se[a] || "";
|
|
144
|
+
}), me = E(() => !!o.message), B = M(), W = M(), T = M(), $ = M(), X = M(), ge = E(() => o.confirmButtonClass);
|
|
145
|
+
ee(
|
|
146
|
+
() => o.inputValue,
|
|
147
|
+
async (a) => {
|
|
148
|
+
await R(), e.boxType === "prompt" && a && Z();
|
|
149
|
+
},
|
|
150
|
+
{ immediate: !0 }
|
|
151
|
+
), ee(
|
|
152
|
+
() => b.value,
|
|
153
|
+
(a) => {
|
|
154
|
+
var m, g;
|
|
155
|
+
a && (e.boxType !== "prompt" && (o.autofocus ? T.value = (g = (m = X.value) == null ? void 0 : m.$el) != null ? g : B.value : T.value = B.value), o.zIndex = c()), e.boxType === "prompt" && (a ? R().then(() => {
|
|
156
|
+
var Y;
|
|
157
|
+
$.value && $.value.$el && (o.autofocus ? T.value = (Y = Ee()) != null ? Y : B.value : T.value = B.value);
|
|
158
|
+
}) : (o.editorErrorMessage = "", o.validateError = !1));
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
const pe = E(() => e.draggable), ve = E(() => e.overflow), { isDragging: be } = Ue(B, W, pe, ve);
|
|
162
|
+
Ie(async () => {
|
|
163
|
+
await R(), e.closeOnHashChange && window.addEventListener("hashchange", S);
|
|
164
|
+
}), Te(() => {
|
|
165
|
+
e.closeOnHashChange && window.removeEventListener("hashchange", S);
|
|
166
|
+
});
|
|
167
|
+
function S() {
|
|
168
|
+
b.value && (b.value = !1, R(() => {
|
|
169
|
+
o.action && n("action", o.action);
|
|
170
|
+
}));
|
|
171
|
+
}
|
|
172
|
+
const Q = () => {
|
|
173
|
+
e.closeOnClickModal && z(o.distinguishCancelAndClose ? "close" : "cancel");
|
|
174
|
+
}, ye = je(Q), Ce = (a) => {
|
|
175
|
+
if (o.inputType !== "textarea")
|
|
176
|
+
return a.preventDefault(), z("confirm");
|
|
177
|
+
}, z = (a) => {
|
|
178
|
+
var m;
|
|
179
|
+
e.boxType === "prompt" && a === "confirm" && !Z() || (o.action = a, o.beforeClose ? (m = o.beforeClose) == null || m.call(o, a, o, S) : S());
|
|
180
|
+
}, Z = () => {
|
|
181
|
+
if (e.boxType === "prompt") {
|
|
182
|
+
const a = o.inputPattern;
|
|
183
|
+
if (a && !a.test(o.inputValue || ""))
|
|
184
|
+
return o.editorErrorMessage = o.inputErrorMessage || d("el.messagebox.error"), o.validateError = !0, !1;
|
|
185
|
+
const m = o.inputValidator;
|
|
186
|
+
if (j(m)) {
|
|
187
|
+
const g = m(o.inputValue);
|
|
188
|
+
if (g === !1)
|
|
189
|
+
return o.editorErrorMessage = o.inputErrorMessage || d("el.messagebox.error"), o.validateError = !0, !1;
|
|
190
|
+
if (G(g))
|
|
191
|
+
return o.editorErrorMessage = g, o.validateError = !0, !1;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return o.editorErrorMessage = "", o.validateError = !1, !0;
|
|
195
|
+
}, Ee = () => {
|
|
196
|
+
var a, m;
|
|
197
|
+
const g = (a = $.value) == null ? void 0 : a.$refs;
|
|
198
|
+
return (m = g?.input) != null ? m : g?.textarea;
|
|
199
|
+
}, J = () => {
|
|
200
|
+
z("close");
|
|
201
|
+
}, he = () => {
|
|
202
|
+
e.closeOnPressEscape && J();
|
|
203
|
+
};
|
|
204
|
+
return e.lockScroll && Ke(b, { ns: l }), {
|
|
205
|
+
...Se(o),
|
|
206
|
+
ns: l,
|
|
207
|
+
overlayEvent: ye,
|
|
208
|
+
visible: b,
|
|
209
|
+
hasMessage: me,
|
|
210
|
+
typeClass: N,
|
|
211
|
+
contentId: u,
|
|
212
|
+
inputId: ce,
|
|
213
|
+
btnSize: t,
|
|
214
|
+
iconComponent: fe,
|
|
215
|
+
confirmButtonClasses: ge,
|
|
216
|
+
rootRef: B,
|
|
217
|
+
focusStartRef: T,
|
|
218
|
+
headerRef: W,
|
|
219
|
+
inputRef: $,
|
|
220
|
+
isDragging: be,
|
|
221
|
+
confirmRef: X,
|
|
222
|
+
doClose: S,
|
|
223
|
+
handleClose: J,
|
|
224
|
+
onCloseRequested: he,
|
|
225
|
+
handleWrapperClick: Q,
|
|
226
|
+
handleInputEnter: Ce,
|
|
227
|
+
handleAction: z,
|
|
228
|
+
t: d
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
}), Qe = ["aria-label", "aria-describedby"], Ze = ["aria-label"], Je = ["id"];
|
|
232
|
+
function Ye(e, n, r, s, l, t) {
|
|
233
|
+
const d = A("el-icon"), c = A("el-input"), b = A("el-button"), o = A("el-focus-trap"), N = A("el-overlay");
|
|
234
|
+
return f(), p(we, {
|
|
235
|
+
name: "fade-in-linear",
|
|
236
|
+
onAfterLeave: n[11] || (n[11] = (u) => e.$emit("vanish")),
|
|
237
|
+
persisted: ""
|
|
238
|
+
}, {
|
|
239
|
+
default: y(() => [
|
|
240
|
+
F(k(N, {
|
|
241
|
+
"z-index": e.zIndex,
|
|
242
|
+
"overlay-class": [e.ns.is("message-box"), e.modalClass],
|
|
243
|
+
mask: e.modal
|
|
244
|
+
}, {
|
|
245
|
+
default: y(() => [
|
|
246
|
+
v("div", {
|
|
247
|
+
role: "dialog",
|
|
248
|
+
"aria-label": e.title,
|
|
249
|
+
"aria-modal": "true",
|
|
250
|
+
"aria-describedby": e.showInput ? void 0 : e.contentId,
|
|
251
|
+
class: i(`${e.ns.namespace.value}-overlay-message-box`),
|
|
252
|
+
onClick: n[8] || (n[8] = (...u) => e.overlayEvent.onClick && e.overlayEvent.onClick(...u)),
|
|
253
|
+
onMousedown: n[9] || (n[9] = (...u) => e.overlayEvent.onMousedown && e.overlayEvent.onMousedown(...u)),
|
|
254
|
+
onMouseup: n[10] || (n[10] = (...u) => e.overlayEvent.onMouseup && e.overlayEvent.onMouseup(...u))
|
|
255
|
+
}, [
|
|
256
|
+
k(o, {
|
|
257
|
+
loop: "",
|
|
258
|
+
trapped: e.visible,
|
|
259
|
+
"focus-trap-el": e.rootRef,
|
|
260
|
+
"focus-start-el": e.focusStartRef,
|
|
261
|
+
onReleaseRequested: e.onCloseRequested
|
|
262
|
+
}, {
|
|
263
|
+
default: y(() => [
|
|
264
|
+
v(
|
|
265
|
+
"div",
|
|
266
|
+
{
|
|
267
|
+
ref: "rootRef",
|
|
268
|
+
class: i([
|
|
269
|
+
e.ns.b(),
|
|
270
|
+
e.customClass,
|
|
271
|
+
e.ns.is("draggable", e.draggable),
|
|
272
|
+
e.ns.is("dragging", e.isDragging),
|
|
273
|
+
{ [e.ns.m("center")]: e.center }
|
|
274
|
+
]),
|
|
275
|
+
style: x(e.customStyle),
|
|
276
|
+
tabindex: "-1",
|
|
277
|
+
onClick: n[7] || (n[7] = D(() => {
|
|
278
|
+
}, ["stop"]))
|
|
279
|
+
},
|
|
280
|
+
[
|
|
281
|
+
e.title !== null && e.title !== void 0 ? (f(), H(
|
|
282
|
+
"div",
|
|
283
|
+
{
|
|
284
|
+
key: 0,
|
|
285
|
+
ref: "headerRef",
|
|
286
|
+
class: i([e.ns.e("header"), { "show-close": e.showClose }])
|
|
287
|
+
},
|
|
288
|
+
[
|
|
289
|
+
v(
|
|
290
|
+
"div",
|
|
291
|
+
{
|
|
292
|
+
class: i(e.ns.e("title"))
|
|
293
|
+
},
|
|
294
|
+
[
|
|
295
|
+
e.iconComponent && e.center ? (f(), p(d, {
|
|
296
|
+
key: 0,
|
|
297
|
+
class: i([e.ns.e("status"), e.typeClass])
|
|
298
|
+
}, {
|
|
299
|
+
default: y(() => [
|
|
300
|
+
(f(), p(L(e.iconComponent)))
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 8, ["class"])) : w("v-if", !0),
|
|
304
|
+
v(
|
|
305
|
+
"span",
|
|
306
|
+
null,
|
|
307
|
+
O(e.title),
|
|
308
|
+
1
|
|
309
|
+
)
|
|
310
|
+
],
|
|
311
|
+
2
|
|
312
|
+
),
|
|
313
|
+
e.showClose ? (f(), H("button", {
|
|
314
|
+
key: 0,
|
|
315
|
+
type: "button",
|
|
316
|
+
class: i(e.ns.e("headerbtn")),
|
|
317
|
+
"aria-label": e.t("el.messagebox.close"),
|
|
318
|
+
onClick: n[0] || (n[0] = (u) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel")),
|
|
319
|
+
onKeydown: n[1] || (n[1] = P(D((u) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
|
|
320
|
+
}, [
|
|
321
|
+
k(d, {
|
|
322
|
+
class: i(e.ns.e("close"))
|
|
323
|
+
}, {
|
|
324
|
+
default: y(() => [
|
|
325
|
+
(f(), p(L(e.closeIcon || "close")))
|
|
326
|
+
]),
|
|
327
|
+
_: 1
|
|
328
|
+
}, 8, ["class"])
|
|
329
|
+
], 42, Ze)) : w("v-if", !0)
|
|
330
|
+
],
|
|
331
|
+
2
|
|
332
|
+
)) : w("v-if", !0),
|
|
333
|
+
v("div", {
|
|
334
|
+
id: e.contentId,
|
|
335
|
+
class: i(e.ns.e("content"))
|
|
336
|
+
}, [
|
|
337
|
+
v(
|
|
338
|
+
"div",
|
|
339
|
+
{
|
|
340
|
+
class: i(e.ns.e("container"))
|
|
341
|
+
},
|
|
342
|
+
[
|
|
343
|
+
e.iconComponent && !e.center && e.hasMessage ? (f(), p(d, {
|
|
344
|
+
key: 0,
|
|
345
|
+
class: i([e.ns.e("status"), e.typeClass])
|
|
346
|
+
}, {
|
|
347
|
+
default: y(() => [
|
|
348
|
+
(f(), p(L(e.iconComponent)))
|
|
349
|
+
]),
|
|
350
|
+
_: 1
|
|
351
|
+
}, 8, ["class"])) : w("v-if", !0),
|
|
352
|
+
e.hasMessage ? (f(), H(
|
|
353
|
+
"div",
|
|
354
|
+
{
|
|
355
|
+
key: 1,
|
|
356
|
+
class: i(e.ns.e("message"))
|
|
357
|
+
},
|
|
358
|
+
[
|
|
359
|
+
Me(e.$slots, "default", {}, () => [
|
|
360
|
+
e.dangerouslyUseHTMLString ? (f(), p(L(e.showInput ? "label" : "p"), {
|
|
361
|
+
key: 1,
|
|
362
|
+
for: e.showInput ? e.inputId : void 0,
|
|
363
|
+
innerHTML: e.message
|
|
364
|
+
}, null, 8, ["for", "innerHTML"])) : (f(), p(L(e.showInput ? "label" : "p"), {
|
|
365
|
+
key: 0,
|
|
366
|
+
for: e.showInput ? e.inputId : void 0,
|
|
367
|
+
textContent: O(e.message)
|
|
368
|
+
}, null, 8, ["for", "textContent"]))
|
|
369
|
+
])
|
|
370
|
+
],
|
|
371
|
+
2
|
|
372
|
+
)) : w("v-if", !0)
|
|
373
|
+
],
|
|
374
|
+
2
|
|
375
|
+
),
|
|
376
|
+
F(v(
|
|
377
|
+
"div",
|
|
378
|
+
{
|
|
379
|
+
class: i(e.ns.e("input"))
|
|
380
|
+
},
|
|
381
|
+
[
|
|
382
|
+
k(c, {
|
|
383
|
+
id: e.inputId,
|
|
384
|
+
ref: "inputRef",
|
|
385
|
+
modelValue: e.inputValue,
|
|
386
|
+
"onUpdate:modelValue": n[2] || (n[2] = (u) => e.inputValue = u),
|
|
387
|
+
type: e.inputType,
|
|
388
|
+
placeholder: e.inputPlaceholder,
|
|
389
|
+
"aria-invalid": e.validateError,
|
|
390
|
+
class: i({ invalid: e.validateError }),
|
|
391
|
+
onKeydown: P(e.handleInputEnter, ["enter"])
|
|
392
|
+
}, null, 8, ["id", "modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
|
|
393
|
+
v(
|
|
394
|
+
"div",
|
|
395
|
+
{
|
|
396
|
+
class: i(e.ns.e("errormsg")),
|
|
397
|
+
style: x({
|
|
398
|
+
visibility: e.editorErrorMessage ? "visible" : "hidden"
|
|
399
|
+
})
|
|
400
|
+
},
|
|
401
|
+
O(e.editorErrorMessage),
|
|
402
|
+
7
|
|
403
|
+
)
|
|
404
|
+
],
|
|
405
|
+
2
|
|
406
|
+
), [
|
|
407
|
+
[U, e.showInput]
|
|
408
|
+
])
|
|
409
|
+
], 10, Je),
|
|
410
|
+
v(
|
|
411
|
+
"div",
|
|
412
|
+
{
|
|
413
|
+
class: i(e.ns.e("btns"))
|
|
414
|
+
},
|
|
415
|
+
[
|
|
416
|
+
e.showCancelButton ? (f(), p(b, {
|
|
417
|
+
key: 0,
|
|
418
|
+
loading: e.cancelButtonLoading,
|
|
419
|
+
"loading-icon": e.cancelButtonLoadingIcon,
|
|
420
|
+
class: i([e.cancelButtonClass]),
|
|
421
|
+
round: e.roundButton,
|
|
422
|
+
size: e.btnSize,
|
|
423
|
+
onClick: n[3] || (n[3] = (u) => e.handleAction("cancel")),
|
|
424
|
+
onKeydown: n[4] || (n[4] = P(D((u) => e.handleAction("cancel"), ["prevent"]), ["enter"]))
|
|
425
|
+
}, {
|
|
426
|
+
default: y(() => [
|
|
427
|
+
_(
|
|
428
|
+
O(e.cancelButtonText || e.t("el.messagebox.cancel")),
|
|
429
|
+
1
|
|
430
|
+
)
|
|
431
|
+
]),
|
|
432
|
+
_: 1
|
|
433
|
+
}, 8, ["loading", "loading-icon", "class", "round", "size"])) : w("v-if", !0),
|
|
434
|
+
F(k(b, {
|
|
435
|
+
ref: "confirmRef",
|
|
436
|
+
type: "primary",
|
|
437
|
+
loading: e.confirmButtonLoading,
|
|
438
|
+
"loading-icon": e.confirmButtonLoadingIcon,
|
|
439
|
+
class: i([e.confirmButtonClasses]),
|
|
440
|
+
round: e.roundButton,
|
|
441
|
+
disabled: e.confirmButtonDisabled,
|
|
442
|
+
size: e.btnSize,
|
|
443
|
+
onClick: n[5] || (n[5] = (u) => e.handleAction("confirm")),
|
|
444
|
+
onKeydown: n[6] || (n[6] = P(D((u) => e.handleAction("confirm"), ["prevent"]), ["enter"]))
|
|
445
|
+
}, {
|
|
446
|
+
default: y(() => [
|
|
447
|
+
_(
|
|
448
|
+
O(e.confirmButtonText || e.t("el.messagebox.confirm")),
|
|
449
|
+
1
|
|
450
|
+
)
|
|
451
|
+
]),
|
|
452
|
+
_: 1
|
|
453
|
+
}, 8, ["loading", "loading-icon", "class", "round", "disabled", "size"]), [
|
|
454
|
+
[U, e.showConfirmButton]
|
|
455
|
+
])
|
|
456
|
+
],
|
|
457
|
+
2
|
|
458
|
+
)
|
|
459
|
+
],
|
|
460
|
+
6
|
|
461
|
+
)
|
|
462
|
+
]),
|
|
463
|
+
_: 3
|
|
464
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
465
|
+
], 42, Qe)
|
|
466
|
+
]),
|
|
467
|
+
_: 3
|
|
468
|
+
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
469
|
+
[U, e.visible]
|
|
470
|
+
])
|
|
471
|
+
]),
|
|
472
|
+
_: 3
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
var xe = /* @__PURE__ */ Re(Xe, [["render", Ye], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);
|
|
476
|
+
const V = /* @__PURE__ */ new Map(), _e = (e) => {
|
|
477
|
+
let n = document.body;
|
|
478
|
+
return e.appendTo && (G(e.appendTo) && (n = document.querySelector(e.appendTo)), le(e.appendTo) && (n = e.appendTo), le(n) || (Ne(
|
|
479
|
+
"ElMessageBox",
|
|
480
|
+
"the appendTo option is not an HTMLElement. Falling back to document.body."
|
|
481
|
+
), n = document.body)), n;
|
|
482
|
+
}, en = (e, n, r = null) => {
|
|
483
|
+
const s = k(
|
|
484
|
+
xe,
|
|
485
|
+
e,
|
|
486
|
+
j(e.message) || ie(e.message) ? {
|
|
487
|
+
default: j(e.message) ? e.message : () => e.message
|
|
488
|
+
} : null
|
|
489
|
+
);
|
|
490
|
+
return s.appContext = r, ue(s, n), _e(e).appendChild(n.firstElementChild), s.component;
|
|
491
|
+
}, nn = () => document.createElement("div"), on = (e, n) => {
|
|
492
|
+
const r = nn();
|
|
493
|
+
e.onVanish = () => {
|
|
494
|
+
ue(null, r), V.delete(l);
|
|
495
|
+
}, e.onAction = (t) => {
|
|
496
|
+
const d = V.get(l);
|
|
497
|
+
let c;
|
|
498
|
+
e.showInput ? c = { value: l.inputValue, action: t } : c = t, e.callback ? e.callback(c, s.proxy) : t === "cancel" || t === "close" ? e.distinguishCancelAndClose && t !== "cancel" ? d.reject("close") : d.reject("cancel") : d.resolve(c);
|
|
499
|
+
};
|
|
500
|
+
const s = en(e, r, n), l = s.proxy;
|
|
501
|
+
for (const t in e)
|
|
502
|
+
ae(e, t) && !ae(l.$props, t) && (t === "closeIcon" && de(e[t]) ? l[t] = K(e[t]) : l[t] = e[t]);
|
|
503
|
+
return l.visible = !0, l;
|
|
504
|
+
};
|
|
505
|
+
function I(e, n = null) {
|
|
506
|
+
if (!Pe)
|
|
507
|
+
return Promise.reject();
|
|
508
|
+
let r;
|
|
509
|
+
return G(e) || ie(e) ? e = {
|
|
510
|
+
message: e
|
|
511
|
+
} : r = e.callback, new Promise((s, l) => {
|
|
512
|
+
const t = on(
|
|
513
|
+
e,
|
|
514
|
+
n ?? I._context
|
|
515
|
+
);
|
|
516
|
+
V.set(t, {
|
|
517
|
+
options: e,
|
|
518
|
+
callback: r,
|
|
519
|
+
resolve: s,
|
|
520
|
+
reject: l
|
|
521
|
+
});
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
const sn = ["alert", "confirm", "prompt"], tn = {
|
|
525
|
+
alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
|
|
526
|
+
confirm: { showCancelButton: !0 },
|
|
527
|
+
prompt: { showCancelButton: !0, showInput: !0 }
|
|
528
|
+
};
|
|
529
|
+
sn.forEach((e) => {
|
|
530
|
+
I[e] = an(
|
|
531
|
+
e
|
|
532
|
+
);
|
|
533
|
+
});
|
|
534
|
+
function an(e) {
|
|
535
|
+
return (n, r, s, l) => {
|
|
536
|
+
let t = "";
|
|
537
|
+
return de(r) ? (s = r, t = "") : Fe(r) ? t = "" : t = r, I(
|
|
538
|
+
Object.assign(
|
|
539
|
+
{
|
|
540
|
+
title: t,
|
|
541
|
+
message: n,
|
|
542
|
+
type: "",
|
|
543
|
+
...tn[e]
|
|
544
|
+
},
|
|
545
|
+
s,
|
|
546
|
+
{
|
|
547
|
+
boxType: e
|
|
548
|
+
}
|
|
549
|
+
),
|
|
550
|
+
l
|
|
551
|
+
);
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
I.close = () => {
|
|
555
|
+
V.forEach((e, n) => {
|
|
556
|
+
n.doClose();
|
|
557
|
+
}), V.clear();
|
|
558
|
+
};
|
|
559
|
+
I._context = null;
|
|
560
|
+
const C = I;
|
|
561
|
+
C.install = (e) => {
|
|
562
|
+
C._context = e._context, e.config.globalProperties.$msgbox = C, e.config.globalProperties.$messageBox = C, e.config.globalProperties.$alert = C.alert, e.config.globalProperties.$confirm = C.confirm, e.config.globalProperties.$prompt = C.prompt;
|
|
563
|
+
};
|
|
564
|
+
const mn = C;
|
|
565
|
+
export {
|
|
566
|
+
mn as E
|
|
567
|
+
};
|