st-comp 0.0.200 → 0.0.202
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 -0
- package/es/ChartLayout.js +4 -4
- package/es/ConfigProvider.cjs +1 -1
- package/es/ConfigProvider.js +1 -1
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +44 -40
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +84 -78
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +21 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +345 -331
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +20 -18
- package/es/KlinePlus.cjs +4 -4
- package/es/KlinePlus.js +610 -588
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +2 -2
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +74 -72
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +9 -157
- package/es/Pie.cjs +1 -1
- package/es/Pie.js +1 -1
- package/es/Table.cjs +1 -1
- package/es/Table.js +56 -52
- package/es/User.cjs +1 -1
- package/es/User.js +1313 -1
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +28 -26
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +19 -18
- package/es/VarietySearch.cjs +8 -8
- package/es/VarietySearch.js +704 -697
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +12 -12
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +80 -79
- package/es/{el-popover-5421d52a.cjs → _initCloneObject-52b6a510.cjs} +1 -1
- package/es/{el-popover-7a1c6412.js → _initCloneObject-eaef9418.js} +9 -9
- package/es/{base-8348063b.js → base-a5af3db3.js} +38 -38
- package/es/{castArray-3f45c3ec.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-eb0460f1.cjs → config-provider-a584d81e.cjs} +1 -1
- package/es/{config-provider-1a687690.js → config-provider-b16efd62.js} +6 -6
- package/es/debounce-62f5b6e8.cjs +1 -0
- package/es/debounce-8d53f4dd.js +83 -0
- package/es/dropdown-071c5d7e.cjs +1 -0
- package/es/dropdown-a59bba73.js +178 -0
- package/es/el-autocomplete-a07e9439.cjs +1 -0
- package/es/{el-autocomplete-d4cd96cd.js → el-autocomplete-ba808eb6.js} +16 -16
- package/es/{el-button-2e680390.js → el-button-c95adb85.js} +33 -33
- package/es/{el-button-4ccd7122.cjs → el-button-eec58cff.cjs} +1 -1
- package/es/el-checkbox-7421ccd3.js +459 -0
- package/es/el-checkbox-c25236a6.cjs +1 -0
- package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
- package/es/el-checkbox-group-4ed993c7.js +1 -0
- package/es/{el-dialog-bafc4b2b.js → el-dialog-41ab8417.js} +7 -6
- package/es/{el-dialog-6413b4af.cjs → el-dialog-ae86edb8.cjs} +1 -1
- package/es/{el-divider-93b0ee21.js → el-divider-4e059794.js} +1 -1
- package/es/{el-empty-56783dca.js → el-empty-33cb66f1.js} +3 -3
- package/es/el-form-item-c3fe189b.cjs +12 -0
- package/es/el-form-item-c53c374d.js +1269 -0
- package/es/{el-input-735575f4.js → el-input-2f75c4ba.js} +34 -34
- package/es/{el-input-6c5ac889.cjs → el-input-7fd293af.cjs} +1 -1
- package/es/{el-input-number-d5770776.cjs → el-input-number-22e21d16.cjs} +1 -1
- package/es/{el-input-number-6634a6ea.js → el-input-number-5193fe6d.js} +35 -35
- package/es/{el-loading-98dcebee.cjs → el-loading-cfd86c15.cjs} +1 -1
- package/es/{el-loading-049dacc5.js → el-loading-f6022062.js} +5 -5
- package/es/{el-menu-item-828bc6fa.cjs → el-menu-item-17dc717e.cjs} +1 -1
- package/es/{el-menu-item-8a210e21.js → el-menu-item-7e881203.js} +22 -22
- package/es/{el-message-a1ac37d4.cjs → el-message-5e6a6be9.cjs} +1 -1
- package/es/el-message-box-a93d2f6a.js +489 -0
- package/es/el-message-box-c10adb52.cjs +1 -0
- package/es/{el-message-def216ae.js → el-message-e544a8f5.js} +24 -24
- package/es/{el-overlay-4ea38eab.js → el-overlay-09ad71cd.js} +51 -51
- package/es/{el-overlay-69dfacb6.cjs → el-overlay-9e34965f.cjs} +1 -1
- package/es/{el-popconfirm-bdeceeb7.cjs → el-popconfirm-70a976bf.cjs} +1 -1
- package/es/{el-popconfirm-aace1104.js → el-popconfirm-81dcd202.js} +20 -20
- package/es/el-popover-0ea8fbf8.cjs +1 -0
- package/es/el-popover-4ed993c7.js +1 -0
- package/es/{el-popper-986a8371.js → el-popper-b4f97157.js} +115 -112
- package/es/{el-popper-b962125f.cjs → el-popper-b6c99b28.cjs} +1 -1
- package/es/el-scrollbar-323542e7.js +34 -0
- package/es/el-scrollbar-bc3f790d.cjs +1 -0
- package/es/{el-segmented-f892ec18.js → el-segmented-b868d074.js} +8 -8
- package/es/{el-segmented-6b057ed5.cjs → el-segmented-f8fce9ac.cjs} +1 -1
- package/es/{el-select-2189a8ac.js → el-select-95627997.js} +42 -41
- package/es/el-select-d8d91db1.cjs +1 -0
- package/es/el-table-column-376cd907.js +3432 -0
- package/es/el-table-column-c974cb96.cjs +14 -0
- package/es/{el-tag-75a7573a.js → el-tag-66cab138.js} +16 -16
- package/es/{el-tag-a15520b3.cjs → el-tag-a33c4b22.cjs} +1 -1
- package/es/{el-checkbox-group-e26a4533.js → el-text-ac60d0f2.js} +16 -16
- package/es/{el-checkbox-group-dfdad075.cjs → el-text-c20a9f48.cjs} +1 -1
- package/es/{index-1fb95601.cjs → index-098c2447.cjs} +1 -1
- package/es/{index-16802b35.cjs → index-11547a0c.cjs} +1 -1
- package/es/index-1f7d4f70.js +157 -0
- package/es/{index-680be212.cjs → index-298075cf.cjs} +1 -1
- package/es/index-57672682.js +113 -0
- package/es/{index-9cfb6ccf.js → index-7ed0999e.js} +2 -0
- package/es/{index-f3a86049.js → index-844bdd85.js} +29 -29
- package/es/index-88546436.js +163 -0
- package/es/{index-cc200b99.cjs → index-8901a38c.cjs} +1 -1
- package/es/{index-e00ee015.js → index-960806da.js} +36 -36
- package/es/index-9b9ef5dd.cjs +1 -0
- package/es/{index-847d58bc.js → index-a871c3eb.js} +92 -62
- package/es/{index-780e7fd2.js → index-bc8e277e.js} +2 -2
- package/es/{index-5e0314ac.cjs → index-c108567d.cjs} +1 -1
- package/es/{index-78381381.cjs → index-d725fef6.cjs} +2 -2
- package/es/{index-14c88a1a.js → index-d77a7336.js} +1 -1
- package/es/{index-f45c2897.js → index-d91dc23f.js} +20 -20
- package/es/{index-c94b9543.js → index-e5566b94.js} +43 -43
- package/es/index-f3562b52.cjs +1 -0
- package/es/index-f967d6c1.cjs +1 -0
- package/es/{python-2e916d28.cjs → python-c27ba105.cjs} +1 -1
- package/es/{python-7cf0b6ba.js → python-ecde9ff2.js} +2 -2
- package/es/{raf-8e5f0699.js → raf-80ef0c0a.js} +1 -1
- package/es/{scroll-c43468ab.js → scroll-679bd6bf.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-e6cba60f.js → use-form-common-props-815d48a6.js} +69 -69
- package/es/{use-form-common-props-d8866dc6.cjs → use-form-common-props-fd9b61a0.cjs} +1 -1
- package/es/{use-global-config-72d50e62.cjs → use-global-config-30d7d8ce.cjs} +1 -1
- package/es/{use-global-config-76ff2e3e.js → use-global-config-b5e9d3d5.js} +14 -14
- package/es/{validator-e759d43d.cjs → validator-1b8a6128.cjs} +1 -1
- package/es/{validator-220652c5.js → validator-764a9db0.js} +1 -1
- package/es/vnode-5ddb7ed1.js +14 -0
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/{zh-cn-33e7aee6.cjs → zh-cn-90317f62.cjs} +1 -1
- package/es/{zh-cn-c7fa42ea.js → zh-cn-e963c628.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +156 -156
- package/lib/{index-410c490f.js → index-a45d1494.js} +11238 -11207
- package/lib/{python-589861d2.js → python-82d17c8d.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineConfig/config.js +2 -0
- package/packages/KlineConfig/index.vue +9 -0
- package/packages/KlinePlus/index.vue +18 -8
- package/packages/KlinePlus/utils.js +41 -5
- package/src/pages/KlinePlus/index.vue +6 -5
- package/es/el-autocomplete-86c0d989.cjs +0 -1
- package/es/el-form-item-41becb31.js +0 -1749
- package/es/el-form-item-95476197.cjs +0 -12
- package/es/el-scrollbar-139aa96d.cjs +0 -1
- package/es/el-scrollbar-cdadd788.js +0 -115
- package/es/el-select-e1046cc6.cjs +0 -1
- package/es/el-table-column-91d69c86.js +0 -3882
- package/es/el-table-column-f1c4af89.cjs +0 -14
- package/es/index-56ea97a9.js +0 -122
- package/es/index-8583c047.cjs +0 -1
- package/es/index-ce63356a.cjs +0 -1
- package/es/index-db1e1861.js +0 -318
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import { nextTick as V, defineComponent as Be, computed as b, ref as w, reactive as we, markRaw as N, watch as _, onMounted as Me, onBeforeUnmount as ke, toRefs as Ie, resolveComponent as A, openBlock as u, createBlock as g, Transition as Te, withCtx as C, withDirectives as K, createVNode as k, createElementVNode as v, normalizeClass as r, normalizeStyle as x, withModifiers as D, createElementBlock as U, resolveDynamicComponent as L, createCommentVNode as M, toDisplayString as R, withKeys as P, renderSlot as Se, vShow as H, createTextVNode as ee, isVNode as ie, render as ue } from "vue";
|
|
2
|
+
import { E as Ae } from "./el-button-c95adb85.js";
|
|
3
|
+
import { E as Le } from "./el-input-2f75c4ba.js";
|
|
4
|
+
import { E as Re, b as Ve, c as $e } from "./el-overlay-09ad71cd.js";
|
|
5
|
+
import { E as Oe, l as ne } from "./index-a871c3eb.js";
|
|
6
|
+
import { o as oe, a as ze, e as De } from "./el-popper-b4f97157.js";
|
|
7
|
+
import { x as j, c as G, _ as Pe, s as Fe, y as se, f as ce, i as Ke, z as te } from "./base-a5af3db3.js";
|
|
8
|
+
import { T as Ue, m as ae } from "./use-form-common-props-815d48a6.js";
|
|
9
|
+
import { i as He } from "./validator-764a9db0.js";
|
|
10
|
+
import { u as Ne } from "./use-global-config-b5e9d3d5.js";
|
|
11
|
+
import { u as le } from "./index-960806da.js";
|
|
12
|
+
import { u as je } from "./el-dialog-41ab8417.js";
|
|
13
|
+
const q = "_trap-focus-children", E = [], re = (e) => {
|
|
14
|
+
if (E.length === 0)
|
|
15
|
+
return;
|
|
16
|
+
const o = E[E.length - 1][q];
|
|
17
|
+
if (o.length > 0 && e.code === ze.tab) {
|
|
18
|
+
if (o.length === 1) {
|
|
19
|
+
e.preventDefault(), document.activeElement !== o[0] && o[0].focus();
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const a = e.shiftKey, i = e.target === o[0], l = e.target === o[o.length - 1];
|
|
23
|
+
i && a && (e.preventDefault(), o[o.length - 1].focus()), l && !a && (e.preventDefault(), o[0].focus());
|
|
24
|
+
}
|
|
25
|
+
}, qe = {
|
|
26
|
+
beforeMount(e) {
|
|
27
|
+
e[q] = oe(e), E.push(e), E.length <= 1 && document.addEventListener("keydown", re);
|
|
28
|
+
},
|
|
29
|
+
updated(e) {
|
|
30
|
+
V(() => {
|
|
31
|
+
e[q] = oe(e);
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
unmounted() {
|
|
35
|
+
E.shift(), E.length === 0 && document.removeEventListener("keydown", re);
|
|
36
|
+
}
|
|
37
|
+
}, Ge = Be({
|
|
38
|
+
name: "ElMessageBox",
|
|
39
|
+
directives: {
|
|
40
|
+
TrapFocus: qe
|
|
41
|
+
},
|
|
42
|
+
components: {
|
|
43
|
+
ElButton: Ae,
|
|
44
|
+
ElFocusTrap: De,
|
|
45
|
+
ElInput: Le,
|
|
46
|
+
ElOverlay: Re,
|
|
47
|
+
ElIcon: Oe,
|
|
48
|
+
...Ue
|
|
49
|
+
},
|
|
50
|
+
inheritAttrs: !1,
|
|
51
|
+
props: {
|
|
52
|
+
buttonSize: {
|
|
53
|
+
type: String,
|
|
54
|
+
validator: He
|
|
55
|
+
},
|
|
56
|
+
modal: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !0
|
|
59
|
+
},
|
|
60
|
+
lockScroll: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !0
|
|
63
|
+
},
|
|
64
|
+
showClose: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !0
|
|
67
|
+
},
|
|
68
|
+
closeOnClickModal: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !0
|
|
71
|
+
},
|
|
72
|
+
closeOnPressEscape: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !0
|
|
75
|
+
},
|
|
76
|
+
closeOnHashChange: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !0
|
|
79
|
+
},
|
|
80
|
+
center: Boolean,
|
|
81
|
+
draggable: Boolean,
|
|
82
|
+
overflow: Boolean,
|
|
83
|
+
roundButton: Boolean,
|
|
84
|
+
container: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "body"
|
|
87
|
+
},
|
|
88
|
+
boxType: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: ""
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
emits: ["vanish", "action"],
|
|
94
|
+
setup(e, { emit: o }) {
|
|
95
|
+
const {
|
|
96
|
+
locale: a,
|
|
97
|
+
zIndex: i,
|
|
98
|
+
ns: l,
|
|
99
|
+
size: s
|
|
100
|
+
} = Ne("message-box", b(() => e.buttonSize)), { t: c } = a, { nextZIndex: p } = i, h = w(!1), n = we({
|
|
101
|
+
autofocus: !0,
|
|
102
|
+
beforeClose: null,
|
|
103
|
+
callback: null,
|
|
104
|
+
cancelButtonText: "",
|
|
105
|
+
cancelButtonClass: "",
|
|
106
|
+
confirmButtonText: "",
|
|
107
|
+
confirmButtonClass: "",
|
|
108
|
+
customClass: "",
|
|
109
|
+
customStyle: {},
|
|
110
|
+
dangerouslyUseHTMLString: !1,
|
|
111
|
+
distinguishCancelAndClose: !1,
|
|
112
|
+
icon: "",
|
|
113
|
+
closeIcon: "",
|
|
114
|
+
inputPattern: null,
|
|
115
|
+
inputPlaceholder: "",
|
|
116
|
+
inputType: "text",
|
|
117
|
+
inputValue: "",
|
|
118
|
+
inputValidator: void 0,
|
|
119
|
+
inputErrorMessage: "",
|
|
120
|
+
message: "",
|
|
121
|
+
modalFade: !0,
|
|
122
|
+
modalClass: "",
|
|
123
|
+
showCancelButton: !1,
|
|
124
|
+
showConfirmButton: !0,
|
|
125
|
+
type: "",
|
|
126
|
+
title: void 0,
|
|
127
|
+
showInput: !1,
|
|
128
|
+
action: "",
|
|
129
|
+
confirmButtonLoading: !1,
|
|
130
|
+
cancelButtonLoading: !1,
|
|
131
|
+
confirmButtonLoadingIcon: N(ne),
|
|
132
|
+
cancelButtonLoadingIcon: N(ne),
|
|
133
|
+
confirmButtonDisabled: !1,
|
|
134
|
+
editorErrorMessage: "",
|
|
135
|
+
validateError: !1,
|
|
136
|
+
zIndex: p()
|
|
137
|
+
}), F = b(() => {
|
|
138
|
+
const t = n.type;
|
|
139
|
+
return { [l.bm("icon", t)]: t && ae[t] };
|
|
140
|
+
}), m = le(), de = le(), fe = b(() => {
|
|
141
|
+
const t = n.type;
|
|
142
|
+
return n.icon || t && ae[t] || "";
|
|
143
|
+
}), me = b(() => !!n.message), B = w(), X = w(), T = w(), O = w(), W = w(), pe = b(() => n.confirmButtonClass);
|
|
144
|
+
_(() => n.inputValue, async (t) => {
|
|
145
|
+
await V(), e.boxType === "prompt" && t && J();
|
|
146
|
+
}, { immediate: !0 }), _(() => h.value, (t) => {
|
|
147
|
+
var d, f;
|
|
148
|
+
t && (e.boxType !== "prompt" && (n.autofocus ? T.value = (f = (d = W.value) == null ? void 0 : d.$el) != null ? f : B.value : T.value = B.value), n.zIndex = p()), e.boxType === "prompt" && (t ? V().then(() => {
|
|
149
|
+
var Y;
|
|
150
|
+
O.value && O.value.$el && (n.autofocus ? T.value = (Y = be()) != null ? Y : B.value : T.value = B.value);
|
|
151
|
+
}) : (n.editorErrorMessage = "", n.validateError = !1));
|
|
152
|
+
});
|
|
153
|
+
const ge = b(() => e.draggable), ve = b(() => e.overflow), { isDragging: he } = je(B, X, ge, ve);
|
|
154
|
+
Me(async () => {
|
|
155
|
+
await V(), e.closeOnHashChange && window.addEventListener("hashchange", S);
|
|
156
|
+
}), ke(() => {
|
|
157
|
+
e.closeOnHashChange && window.removeEventListener("hashchange", S);
|
|
158
|
+
});
|
|
159
|
+
function S() {
|
|
160
|
+
h.value && (h.value = !1, V(() => {
|
|
161
|
+
n.action && o("action", n.action);
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
const Z = () => {
|
|
165
|
+
e.closeOnClickModal && z(n.distinguishCancelAndClose ? "close" : "cancel");
|
|
166
|
+
}, Ce = $e(Z), ye = (t) => {
|
|
167
|
+
if (n.inputType !== "textarea")
|
|
168
|
+
return t.preventDefault(), z("confirm");
|
|
169
|
+
}, z = (t) => {
|
|
170
|
+
var d;
|
|
171
|
+
e.boxType === "prompt" && t === "confirm" && !J() || (n.action = t, n.beforeClose ? (d = n.beforeClose) == null || d.call(n, t, n, S) : S());
|
|
172
|
+
}, J = () => {
|
|
173
|
+
if (e.boxType === "prompt") {
|
|
174
|
+
const t = n.inputPattern;
|
|
175
|
+
if (t && !t.test(n.inputValue || ""))
|
|
176
|
+
return n.editorErrorMessage = n.inputErrorMessage || c("el.messagebox.error"), n.validateError = !0, !1;
|
|
177
|
+
const d = n.inputValidator;
|
|
178
|
+
if (j(d)) {
|
|
179
|
+
const f = d(n.inputValue);
|
|
180
|
+
if (f === !1)
|
|
181
|
+
return n.editorErrorMessage = n.inputErrorMessage || c("el.messagebox.error"), n.validateError = !0, !1;
|
|
182
|
+
if (G(f))
|
|
183
|
+
return n.editorErrorMessage = f, n.validateError = !0, !1;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return n.editorErrorMessage = "", n.validateError = !1, !0;
|
|
187
|
+
}, be = () => {
|
|
188
|
+
var t, d;
|
|
189
|
+
const f = (t = O.value) == null ? void 0 : t.$refs;
|
|
190
|
+
return (d = f == null ? void 0 : f.input) != null ? d : f == null ? void 0 : f.textarea;
|
|
191
|
+
}, Q = () => {
|
|
192
|
+
z("close");
|
|
193
|
+
}, Ee = () => {
|
|
194
|
+
e.closeOnPressEscape && Q();
|
|
195
|
+
};
|
|
196
|
+
return e.lockScroll && Ve(h), {
|
|
197
|
+
...Ie(n),
|
|
198
|
+
ns: l,
|
|
199
|
+
overlayEvent: Ce,
|
|
200
|
+
visible: h,
|
|
201
|
+
hasMessage: me,
|
|
202
|
+
typeClass: F,
|
|
203
|
+
contentId: m,
|
|
204
|
+
inputId: de,
|
|
205
|
+
btnSize: s,
|
|
206
|
+
iconComponent: fe,
|
|
207
|
+
confirmButtonClasses: pe,
|
|
208
|
+
rootRef: B,
|
|
209
|
+
focusStartRef: T,
|
|
210
|
+
headerRef: X,
|
|
211
|
+
inputRef: O,
|
|
212
|
+
isDragging: he,
|
|
213
|
+
confirmRef: W,
|
|
214
|
+
doClose: S,
|
|
215
|
+
handleClose: Q,
|
|
216
|
+
onCloseRequested: Ee,
|
|
217
|
+
handleWrapperClick: Z,
|
|
218
|
+
handleInputEnter: ye,
|
|
219
|
+
handleAction: z,
|
|
220
|
+
t: c
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
function Xe(e, o, a, i, l, s) {
|
|
225
|
+
const c = A("el-icon"), p = A("el-input"), h = A("el-button"), n = A("el-focus-trap"), F = A("el-overlay");
|
|
226
|
+
return u(), g(Te, {
|
|
227
|
+
name: "fade-in-linear",
|
|
228
|
+
onAfterLeave: (m) => e.$emit("vanish"),
|
|
229
|
+
persisted: ""
|
|
230
|
+
}, {
|
|
231
|
+
default: C(() => [
|
|
232
|
+
K(k(F, {
|
|
233
|
+
"z-index": e.zIndex,
|
|
234
|
+
"overlay-class": [e.ns.is("message-box"), e.modalClass],
|
|
235
|
+
mask: e.modal
|
|
236
|
+
}, {
|
|
237
|
+
default: C(() => [
|
|
238
|
+
v("div", {
|
|
239
|
+
role: "dialog",
|
|
240
|
+
"aria-label": e.title,
|
|
241
|
+
"aria-modal": "true",
|
|
242
|
+
"aria-describedby": e.showInput ? void 0 : e.contentId,
|
|
243
|
+
class: r(`${e.ns.namespace.value}-overlay-message-box`),
|
|
244
|
+
onClick: e.overlayEvent.onClick,
|
|
245
|
+
onMousedown: e.overlayEvent.onMousedown,
|
|
246
|
+
onMouseup: e.overlayEvent.onMouseup
|
|
247
|
+
}, [
|
|
248
|
+
k(n, {
|
|
249
|
+
loop: "",
|
|
250
|
+
trapped: e.visible,
|
|
251
|
+
"focus-trap-el": e.rootRef,
|
|
252
|
+
"focus-start-el": e.focusStartRef,
|
|
253
|
+
onReleaseRequested: e.onCloseRequested
|
|
254
|
+
}, {
|
|
255
|
+
default: C(() => [
|
|
256
|
+
v("div", {
|
|
257
|
+
ref: "rootRef",
|
|
258
|
+
class: r([
|
|
259
|
+
e.ns.b(),
|
|
260
|
+
e.customClass,
|
|
261
|
+
e.ns.is("draggable", e.draggable),
|
|
262
|
+
e.ns.is("dragging", e.isDragging),
|
|
263
|
+
{ [e.ns.m("center")]: e.center }
|
|
264
|
+
]),
|
|
265
|
+
style: x(e.customStyle),
|
|
266
|
+
tabindex: "-1",
|
|
267
|
+
onClick: D(() => {
|
|
268
|
+
}, ["stop"])
|
|
269
|
+
}, [
|
|
270
|
+
e.title !== null && e.title !== void 0 ? (u(), U("div", {
|
|
271
|
+
key: 0,
|
|
272
|
+
ref: "headerRef",
|
|
273
|
+
class: r([e.ns.e("header"), { "show-close": e.showClose }])
|
|
274
|
+
}, [
|
|
275
|
+
v("div", {
|
|
276
|
+
class: r(e.ns.e("title"))
|
|
277
|
+
}, [
|
|
278
|
+
e.iconComponent && e.center ? (u(), g(c, {
|
|
279
|
+
key: 0,
|
|
280
|
+
class: r([e.ns.e("status"), e.typeClass])
|
|
281
|
+
}, {
|
|
282
|
+
default: C(() => [
|
|
283
|
+
(u(), g(L(e.iconComponent)))
|
|
284
|
+
]),
|
|
285
|
+
_: 1
|
|
286
|
+
}, 8, ["class"])) : M("v-if", !0),
|
|
287
|
+
v("span", null, R(e.title), 1)
|
|
288
|
+
], 2),
|
|
289
|
+
e.showClose ? (u(), U("button", {
|
|
290
|
+
key: 0,
|
|
291
|
+
type: "button",
|
|
292
|
+
class: r(e.ns.e("headerbtn")),
|
|
293
|
+
"aria-label": e.t("el.messagebox.close"),
|
|
294
|
+
onClick: (m) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"),
|
|
295
|
+
onKeydown: P(D((m) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])
|
|
296
|
+
}, [
|
|
297
|
+
k(c, {
|
|
298
|
+
class: r(e.ns.e("close"))
|
|
299
|
+
}, {
|
|
300
|
+
default: C(() => [
|
|
301
|
+
(u(), g(L(e.closeIcon || "close")))
|
|
302
|
+
]),
|
|
303
|
+
_: 1
|
|
304
|
+
}, 8, ["class"])
|
|
305
|
+
], 42, ["aria-label", "onClick", "onKeydown"])) : M("v-if", !0)
|
|
306
|
+
], 2)) : M("v-if", !0),
|
|
307
|
+
v("div", {
|
|
308
|
+
id: e.contentId,
|
|
309
|
+
class: r(e.ns.e("content"))
|
|
310
|
+
}, [
|
|
311
|
+
v("div", {
|
|
312
|
+
class: r(e.ns.e("container"))
|
|
313
|
+
}, [
|
|
314
|
+
e.iconComponent && !e.center && e.hasMessage ? (u(), g(c, {
|
|
315
|
+
key: 0,
|
|
316
|
+
class: r([e.ns.e("status"), e.typeClass])
|
|
317
|
+
}, {
|
|
318
|
+
default: C(() => [
|
|
319
|
+
(u(), g(L(e.iconComponent)))
|
|
320
|
+
]),
|
|
321
|
+
_: 1
|
|
322
|
+
}, 8, ["class"])) : M("v-if", !0),
|
|
323
|
+
e.hasMessage ? (u(), U("div", {
|
|
324
|
+
key: 1,
|
|
325
|
+
class: r(e.ns.e("message"))
|
|
326
|
+
}, [
|
|
327
|
+
Se(e.$slots, "default", {}, () => [
|
|
328
|
+
e.dangerouslyUseHTMLString ? (u(), g(L(e.showInput ? "label" : "p"), {
|
|
329
|
+
key: 1,
|
|
330
|
+
for: e.showInput ? e.inputId : void 0,
|
|
331
|
+
innerHTML: e.message
|
|
332
|
+
}, null, 8, ["for", "innerHTML"])) : (u(), g(L(e.showInput ? "label" : "p"), {
|
|
333
|
+
key: 0,
|
|
334
|
+
for: e.showInput ? e.inputId : void 0,
|
|
335
|
+
textContent: R(e.message)
|
|
336
|
+
}, null, 8, ["for", "textContent"]))
|
|
337
|
+
])
|
|
338
|
+
], 2)) : M("v-if", !0)
|
|
339
|
+
], 2),
|
|
340
|
+
K(v("div", {
|
|
341
|
+
class: r(e.ns.e("input"))
|
|
342
|
+
}, [
|
|
343
|
+
k(p, {
|
|
344
|
+
id: e.inputId,
|
|
345
|
+
ref: "inputRef",
|
|
346
|
+
modelValue: e.inputValue,
|
|
347
|
+
"onUpdate:modelValue": (m) => e.inputValue = m,
|
|
348
|
+
type: e.inputType,
|
|
349
|
+
placeholder: e.inputPlaceholder,
|
|
350
|
+
"aria-invalid": e.validateError,
|
|
351
|
+
class: r({ invalid: e.validateError }),
|
|
352
|
+
onKeydown: P(e.handleInputEnter, ["enter"])
|
|
353
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
|
|
354
|
+
v("div", {
|
|
355
|
+
class: r(e.ns.e("errormsg")),
|
|
356
|
+
style: x({
|
|
357
|
+
visibility: e.editorErrorMessage ? "visible" : "hidden"
|
|
358
|
+
})
|
|
359
|
+
}, R(e.editorErrorMessage), 7)
|
|
360
|
+
], 2), [
|
|
361
|
+
[H, e.showInput]
|
|
362
|
+
])
|
|
363
|
+
], 10, ["id"]),
|
|
364
|
+
v("div", {
|
|
365
|
+
class: r(e.ns.e("btns"))
|
|
366
|
+
}, [
|
|
367
|
+
e.showCancelButton ? (u(), g(h, {
|
|
368
|
+
key: 0,
|
|
369
|
+
loading: e.cancelButtonLoading,
|
|
370
|
+
"loading-icon": e.cancelButtonLoadingIcon,
|
|
371
|
+
class: r([e.cancelButtonClass]),
|
|
372
|
+
round: e.roundButton,
|
|
373
|
+
size: e.btnSize,
|
|
374
|
+
onClick: (m) => e.handleAction("cancel"),
|
|
375
|
+
onKeydown: P(D((m) => e.handleAction("cancel"), ["prevent"]), ["enter"])
|
|
376
|
+
}, {
|
|
377
|
+
default: C(() => [
|
|
378
|
+
ee(R(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)
|
|
379
|
+
]),
|
|
380
|
+
_: 1
|
|
381
|
+
}, 8, ["loading", "loading-icon", "class", "round", "size", "onClick", "onKeydown"])) : M("v-if", !0),
|
|
382
|
+
K(k(h, {
|
|
383
|
+
ref: "confirmRef",
|
|
384
|
+
type: "primary",
|
|
385
|
+
loading: e.confirmButtonLoading,
|
|
386
|
+
"loading-icon": e.confirmButtonLoadingIcon,
|
|
387
|
+
class: r([e.confirmButtonClasses]),
|
|
388
|
+
round: e.roundButton,
|
|
389
|
+
disabled: e.confirmButtonDisabled,
|
|
390
|
+
size: e.btnSize,
|
|
391
|
+
onClick: (m) => e.handleAction("confirm"),
|
|
392
|
+
onKeydown: P(D((m) => e.handleAction("confirm"), ["prevent"]), ["enter"])
|
|
393
|
+
}, {
|
|
394
|
+
default: C(() => [
|
|
395
|
+
ee(R(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
}, 8, ["loading", "loading-icon", "class", "round", "disabled", "size", "onClick", "onKeydown"]), [
|
|
399
|
+
[H, e.showConfirmButton]
|
|
400
|
+
])
|
|
401
|
+
], 2)
|
|
402
|
+
], 14, ["onClick"])
|
|
403
|
+
]),
|
|
404
|
+
_: 3
|
|
405
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
406
|
+
], 42, ["aria-label", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
|
|
407
|
+
]),
|
|
408
|
+
_: 3
|
|
409
|
+
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
410
|
+
[H, e.visible]
|
|
411
|
+
])
|
|
412
|
+
]),
|
|
413
|
+
_: 3
|
|
414
|
+
}, 8, ["onAfterLeave"]);
|
|
415
|
+
}
|
|
416
|
+
var We = /* @__PURE__ */ Pe(Ge, [["render", Xe], ["__file", "index.vue"]]);
|
|
417
|
+
const $ = /* @__PURE__ */ new Map(), Ze = (e) => {
|
|
418
|
+
let o = document.body;
|
|
419
|
+
return e.appendTo && (G(e.appendTo) && (o = document.querySelector(e.appendTo)), te(e.appendTo) && (o = e.appendTo), te(o) || (o = document.body)), o;
|
|
420
|
+
}, Je = (e, o, a = null) => {
|
|
421
|
+
const i = k(We, e, j(e.message) || ie(e.message) ? {
|
|
422
|
+
default: j(e.message) ? e.message : () => e.message
|
|
423
|
+
} : null);
|
|
424
|
+
return i.appContext = a, ue(i, o), Ze(e).appendChild(o.firstElementChild), i.component;
|
|
425
|
+
}, Qe = () => document.createElement("div"), Ye = (e, o) => {
|
|
426
|
+
const a = Qe();
|
|
427
|
+
e.onVanish = () => {
|
|
428
|
+
ue(null, a), $.delete(l);
|
|
429
|
+
}, e.onAction = (s) => {
|
|
430
|
+
const c = $.get(l);
|
|
431
|
+
let p;
|
|
432
|
+
e.showInput ? p = { value: l.inputValue, action: s } : p = s, e.callback ? e.callback(p, i.proxy) : s === "cancel" || s === "close" ? e.distinguishCancelAndClose && s !== "cancel" ? c.reject("close") : c.reject("cancel") : c.resolve(p);
|
|
433
|
+
};
|
|
434
|
+
const i = Je(e, a, o), l = i.proxy;
|
|
435
|
+
for (const s in e)
|
|
436
|
+
se(e, s) && !se(l.$props, s) && (s === "closeIcon" && ce(e[s]) ? l[s] = N(e[s]) : l[s] = e[s]);
|
|
437
|
+
return l.visible = !0, l;
|
|
438
|
+
};
|
|
439
|
+
function I(e, o = null) {
|
|
440
|
+
if (!Fe)
|
|
441
|
+
return Promise.reject();
|
|
442
|
+
let a;
|
|
443
|
+
return G(e) || ie(e) ? e = {
|
|
444
|
+
message: e
|
|
445
|
+
} : a = e.callback, new Promise((i, l) => {
|
|
446
|
+
const s = Ye(e, o ?? I._context);
|
|
447
|
+
$.set(s, {
|
|
448
|
+
options: e,
|
|
449
|
+
callback: a,
|
|
450
|
+
resolve: i,
|
|
451
|
+
reject: l
|
|
452
|
+
});
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
const _e = ["alert", "confirm", "prompt"], xe = {
|
|
456
|
+
alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
|
|
457
|
+
confirm: { showCancelButton: !0 },
|
|
458
|
+
prompt: { showCancelButton: !0, showInput: !0 }
|
|
459
|
+
};
|
|
460
|
+
_e.forEach((e) => {
|
|
461
|
+
I[e] = en(e);
|
|
462
|
+
});
|
|
463
|
+
function en(e) {
|
|
464
|
+
return (o, a, i, l) => {
|
|
465
|
+
let s = "";
|
|
466
|
+
return ce(a) ? (i = a, s = "") : Ke(a) ? s = "" : s = a, I(Object.assign({
|
|
467
|
+
title: s,
|
|
468
|
+
message: o,
|
|
469
|
+
type: "",
|
|
470
|
+
...xe[e]
|
|
471
|
+
}, i, {
|
|
472
|
+
boxType: e
|
|
473
|
+
}), l);
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
I.close = () => {
|
|
477
|
+
$.forEach((e, o) => {
|
|
478
|
+
o.doClose();
|
|
479
|
+
}), $.clear();
|
|
480
|
+
};
|
|
481
|
+
I._context = null;
|
|
482
|
+
const y = I;
|
|
483
|
+
y.install = (e) => {
|
|
484
|
+
y._context = e._context, e.config.globalProperties.$msgbox = y, e.config.globalProperties.$messageBox = y, e.config.globalProperties.$alert = y.alert, e.config.globalProperties.$confirm = y.confirm, e.config.globalProperties.$prompt = y.prompt;
|
|
485
|
+
};
|
|
486
|
+
const pn = y;
|
|
487
|
+
export {
|
|
488
|
+
pn as E
|
|
489
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("vue"),Q=require("./el-button-eec58cff.cjs"),Y=require("./el-input-7fd293af.cjs"),V=require("./el-overlay-9e34965f.cjs"),I=require("./index-098c2447.cjs"),M=require("./el-popper-b6c99b28.cjs"),c=require("./base-ef747d02.cjs"),T=require("./use-form-common-props-fd9b61a0.cjs"),x=require("./validator-1b8a6128.cjs"),_=require("./use-global-config-30d7d8ce.cjs"),$=require("./index-9780a537.cjs"),ee=require("./el-dialog-ae86edb8.cjs"),z="_trap-focus-children",C=[],P=e=>{if(C.length===0)return;const t=C[C.length-1][z];if(t.length>0&&e.code===M.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const a=e.shiftKey,i=e.target===t[0],r=e.target===t[t.length-1];i&&a&&(e.preventDefault(),t[t.length-1].focus()),r&&!a&&(e.preventDefault(),t[0].focus())}},ne={beforeMount(e){e[z]=M.obtainAllFocusableElements(e),C.push(e),C.length<=1&&document.addEventListener("keydown",P)},updated(e){n.nextTick(()=>{e[z]=M.obtainAllFocusableElements(e)})},unmounted(){C.shift(),C.length===0&&document.removeEventListener("keydown",P)}},oe=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ne},components:{ElButton:Q.ElButton,ElFocusTrap:M.ElFocusTrap,ElInput:Y.ElInput,ElOverlay:V.ElOverlay,ElIcon:I.ElIcon,...T.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:x.isValidComponentSize},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:a,zIndex:i,ns:r,size:l}=_.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:u}=a,{nextZIndex:p}=i,g=n.ref(!1),o=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:n.markRaw(I.loading_default),cancelButtonLoadingIcon:n.markRaw(I.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:p()}),S=n.computed(()=>{const s=o.type;return{[r.bm("icon",s)]:s&&T.TypeComponentsMap[s]}}),m=$.useId(),q=$.useId(),F=n.computed(()=>{const s=o.type;return o.icon||s&&T.TypeComponentsMap[s]||""}),K=n.computed(()=>!!o.message),h=n.ref(),N=n.ref(),b=n.ref(),w=n.ref(),A=n.ref(),U=n.computed(()=>o.confirmButtonClass);n.watch(()=>o.inputValue,async s=>{await n.nextTick(),e.boxType==="prompt"&&s&&O()},{immediate:!0}),n.watch(()=>g.value,s=>{var d,f;s&&(e.boxType!=="prompt"&&(o.autofocus?b.value=(f=(d=A.value)==null?void 0:d.$el)!=null?f:h.value:b.value=h.value),o.zIndex=p()),e.boxType==="prompt"&&(s?n.nextTick().then(()=>{var L;w.value&&w.value.$el&&(o.autofocus?b.value=(L=Z())!=null?L:h.value:b.value=h.value)}):(o.editorErrorMessage="",o.validateError=!1))});const H=n.computed(()=>e.draggable),j=n.computed(()=>e.overflow),{isDragging:G}=ee.useDraggable(h,N,H,j);n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",B)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",B)});function B(){g.value&&(g.value=!1,n.nextTick(()=>{o.action&&t("action",o.action)}))}const D=()=>{e.closeOnClickModal&&k(o.distinguishCancelAndClose?"close":"cancel")},X=V.useSameTarget(D),W=s=>{if(o.inputType!=="textarea")return s.preventDefault(),k("confirm")},k=s=>{var d;e.boxType==="prompt"&&s==="confirm"&&!O()||(o.action=s,o.beforeClose?(d=o.beforeClose)==null||d.call(o,s,o,B):B())},O=()=>{if(e.boxType==="prompt"){const s=o.inputPattern;if(s&&!s.test(o.inputValue||""))return o.editorErrorMessage=o.inputErrorMessage||u("el.messagebox.error"),o.validateError=!0,!1;const d=o.inputValidator;if(c.isFunction(d)){const f=d(o.inputValue);if(f===!1)return o.editorErrorMessage=o.inputErrorMessage||u("el.messagebox.error"),o.validateError=!0,!1;if(c.isString(f))return o.editorErrorMessage=f,o.validateError=!0,!1}}return o.editorErrorMessage="",o.validateError=!1,!0},Z=()=>{var s,d;const f=(s=w.value)==null?void 0:s.$refs;return(d=f==null?void 0:f.input)!=null?d:f==null?void 0:f.textarea},R=()=>{k("close")},J=()=>{e.closeOnPressEscape&&R()};return e.lockScroll&&V.useLockscreen(g),{...n.toRefs(o),ns:r,overlayEvent:X,visible:g,hasMessage:K,typeClass:S,contentId:m,inputId:q,btnSize:l,iconComponent:F,confirmButtonClasses:U,rootRef:h,focusStartRef:b,headerRef:N,inputRef:w,isDragging:G,confirmRef:A,doClose:B,handleClose:R,onCloseRequested:J,handleWrapperClick:D,handleInputEnter:W,handleAction:k,t:u}}});function te(e,t,a,i,r,l){const u=n.resolveComponent("el-icon"),p=n.resolveComponent("el-input"),g=n.resolveComponent("el-button"),o=n.resolveComponent("el-focus-trap"),S=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:m=>e.$emit("vanish"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(S,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:n.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[n.createVNode(o,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"rootRef",class:n.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:n.normalizeStyle(e.customStyle),tabindex:"-1",onClick:n.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"headerRef",class:n.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(n.openBlock(),n.createBlock(u,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.createElementVNode("span",null,n.toDisplayString(e.title),1)],2),e.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:n.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[n.createVNode(u,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):n.createCommentVNode("v-if",!0)],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{id:e.contentId,class:n.normalizeClass(e.ns.e("content"))},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(n.openBlock(),n.createBlock(u,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.hasMessage?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("message"))},[n.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:n.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):n.createCommentVNode("v-if",!0)],2),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("input"))},[n.createVNode(p,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":m=>e.inputValue=m,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:n.normalizeClass({invalid:e.validateError}),onKeydown:n.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("errormsg")),style:n.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},n.toDisplayString(e.editorErrorMessage),7)],2),[[n.vShow,e.showInput]])],10,["id"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(g,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:m=>e.handleAction("cancel"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(g,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:m=>e.handleAction("confirm"),onKeydown:n.withKeys(n.withModifiers(m=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[n.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var le=c._export_sfc(oe,[["render",te],["__file","index.vue"]]);const E=new Map,se=e=>{let t=document.body;return e.appendTo&&(c.isString(e.appendTo)&&(t=document.querySelector(e.appendTo)),c.isElement(e.appendTo)&&(t=e.appendTo),c.isElement(t)||(t=document.body)),t},ae=(e,t,a=null)=>{const i=n.createVNode(le,e,c.isFunction(e.message)||n.isVNode(e.message)?{default:c.isFunction(e.message)?e.message:()=>e.message}:null);return i.appContext=a,n.render(i,t),se(e).appendChild(t.firstElementChild),i.component},re=()=>document.createElement("div"),ie=(e,t)=>{const a=re();e.onVanish=()=>{n.render(null,a),E.delete(r)},e.onAction=l=>{const u=E.get(r);let p;e.showInput?p={value:r.inputValue,action:l}:p=l,e.callback?e.callback(p,i.proxy):l==="cancel"||l==="close"?e.distinguishCancelAndClose&&l!=="cancel"?u.reject("close"):u.reject("cancel"):u.resolve(p)};const i=ae(e,a,t),r=i.proxy;for(const l in e)c.hasOwn(e,l)&&!c.hasOwn(r.$props,l)&&(l==="closeIcon"&&c.isObject(e[l])?r[l]=n.markRaw(e[l]):r[l]=e[l]);return r.visible=!0,r};function y(e,t=null){if(!c.isClient)return Promise.reject();let a;return c.isString(e)||n.isVNode(e)?e={message:e}:a=e.callback,new Promise((i,r)=>{const l=ie(e,t??y._context);E.set(l,{options:e,callback:a,resolve:i,reject:r})})}const ce=["alert","confirm","prompt"],ue={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};ce.forEach(e=>{y[e]=de(e)});function de(e){return(t,a,i,r)=>{let l="";return c.isObject(a)?(i=a,l=""):c.isUndefined(a)?l="":l=a,y(Object.assign({title:l,message:t,type:"",...ue[e]},i,{boxType:e}),r)}}y.close=()=>{E.forEach((e,t)=>{t.doClose()}),E.clear()};y._context=null;const v=y;v.install=e=>{v._context=e._context,e.config.globalProperties.$msgbox=v,e.config.globalProperties.$messageBox=v,e.config.globalProperties.$alert=v.alert,e.config.globalProperties.$confirm=v.confirm,e.config.globalProperties.$prompt=v.prompt};const fe=v;exports.ElMessageBox=fe;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as I, computed as d, openBlock as g, createElementBlock as
|
|
2
|
-
import { i as Ee,
|
|
3
|
-
import { b as se,
|
|
4
|
-
import { E as q } from "./index-
|
|
5
|
-
import { m as
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import { m as u } from "./config-provider-
|
|
1
|
+
import { defineComponent as I, computed as d, openBlock as g, createElementBlock as A, normalizeClass as v, unref as o, renderSlot as P, createVNode as F, Transition as J, withCtx as $, withDirectives as K, createElementVNode as x, normalizeStyle as Q, createTextVNode as ve, toDisplayString as X, vShow as Y, shallowReactive as ee, ref as N, onMounted as ye, watch as he, createBlock as S, createCommentVNode as M, resolveDynamicComponent as Ce, Fragment as be, withModifiers as Te, nextTick as Se, isVNode as te, render as j } from "vue";
|
|
2
|
+
import { i as Ee, m as G, c as we, u as Be, T as Ne } from "./use-form-common-props-815d48a6.js";
|
|
3
|
+
import { b as se, e as k, u as Me, p as E, n as W, _ as ne, w as $e, s as oe, d as ke, c as z, x as D, o as O, y as Ie, z as _e, F as Le } from "./base-a5af3db3.js";
|
|
4
|
+
import { E as q } from "./index-a871c3eb.js";
|
|
5
|
+
import { m as Oe } from "./typescript-7ae59c4c.js";
|
|
6
|
+
import { u as Ae } from "./use-global-config-b5e9d3d5.js";
|
|
7
|
+
import { a as Pe, d as xe } from "./el-popper-b4f97157.js";
|
|
8
|
+
import { m as u } from "./config-provider-b16efd62.js";
|
|
9
9
|
const De = se({
|
|
10
10
|
value: {
|
|
11
11
|
type: [String, Number],
|
|
@@ -37,10 +37,10 @@ const De = se({
|
|
|
37
37
|
badgeClass: {
|
|
38
38
|
type: String
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
40
|
+
}), Fe = I({
|
|
41
41
|
name: "ElBadge"
|
|
42
|
-
}),
|
|
43
|
-
...
|
|
42
|
+
}), ze = /* @__PURE__ */ I({
|
|
43
|
+
...Fe,
|
|
44
44
|
props: De,
|
|
45
45
|
setup(t, { expose: a }) {
|
|
46
46
|
const e = t, s = Me("badge"), i = d(() => e.isDot ? "" : E(e.value) && E(e.max) ? e.max < e.value ? `${e.max}+` : `${e.value}` : `${e.value}`), r = d(() => {
|
|
@@ -56,11 +56,11 @@ const De = se({
|
|
|
56
56
|
});
|
|
57
57
|
return a({
|
|
58
58
|
content: i
|
|
59
|
-
}), (n, p) => (g(),
|
|
59
|
+
}), (n, p) => (g(), A("div", {
|
|
60
60
|
class: v(o(s).b())
|
|
61
61
|
}, [
|
|
62
62
|
P(n.$slots, "default"),
|
|
63
|
-
|
|
63
|
+
F(J, {
|
|
64
64
|
name: `${o(s).namespace.value}-zoom-in-center`,
|
|
65
65
|
persisted: ""
|
|
66
66
|
}, {
|
|
@@ -88,7 +88,7 @@ const De = se({
|
|
|
88
88
|
], 2));
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
var He = /* @__PURE__ */ ne(
|
|
91
|
+
var He = /* @__PURE__ */ ne(ze, [["__file", "badge.vue"]]);
|
|
92
92
|
const Re = $e(He), ae = [
|
|
93
93
|
"primary",
|
|
94
94
|
"success",
|
|
@@ -102,7 +102,7 @@ const Re = $e(He), ae = [
|
|
|
102
102
|
"bottom",
|
|
103
103
|
"bottom-left",
|
|
104
104
|
"bottom-right"
|
|
105
|
-
], C = "top", c =
|
|
105
|
+
], C = "top", c = Oe({
|
|
106
106
|
customClass: "",
|
|
107
107
|
dangerouslyUseHTMLString: !1,
|
|
108
108
|
duration: 3e3,
|
|
@@ -202,7 +202,7 @@ const Re = $e(He), ae = [
|
|
|
202
202
|
props: Ue,
|
|
203
203
|
emits: Ve,
|
|
204
204
|
setup(t, { expose: a, emit: e }) {
|
|
205
|
-
const s = t, { Close: i } = Ne, r = N(!1), { ns: n, zIndex: p } =
|
|
205
|
+
const s = t, { Close: i } = Ne, r = N(!1), { ns: n, zIndex: p } = Ae("message"), { currentZIndex: y, nextZIndex: b } = p, m = N(), w = N(!1), H = N(0);
|
|
206
206
|
let _;
|
|
207
207
|
const ie = d(() => s.type ? s.type === "error" ? "danger" : s.type : "info"), ce = d(() => {
|
|
208
208
|
const l = s.type;
|
|
@@ -280,13 +280,13 @@ const Re = $e(He), ae = [
|
|
|
280
280
|
_: 1
|
|
281
281
|
}, 8, ["class"])) : M("v-if", !0),
|
|
282
282
|
P(l.$slots, "default", {}, () => [
|
|
283
|
-
l.dangerouslyUseHTMLString ? (g(),
|
|
283
|
+
l.dangerouslyUseHTMLString ? (g(), A(be, { key: 1 }, [
|
|
284
284
|
M(" Caution here, message could've been compromised, never use user's input as message "),
|
|
285
285
|
x("p", {
|
|
286
286
|
class: v(o(n).e("content")),
|
|
287
287
|
innerHTML: l.message
|
|
288
288
|
}, null, 10, ["innerHTML"])
|
|
289
|
-
], 2112)) : (g(),
|
|
289
|
+
], 2112)) : (g(), A("p", {
|
|
290
290
|
key: 0,
|
|
291
291
|
class: v(o(n).e("content"))
|
|
292
292
|
}, X(l.message), 3))
|
|
@@ -297,7 +297,7 @@ const Re = $e(He), ae = [
|
|
|
297
297
|
onClick: Te(B, ["stop"])
|
|
298
298
|
}, {
|
|
299
299
|
default: $(() => [
|
|
300
|
-
|
|
300
|
+
F(o(i))
|
|
301
301
|
]),
|
|
302
302
|
_: 1
|
|
303
303
|
}, 8, ["class", "onClick"])) : M("v-if", !0)
|
|
@@ -314,18 +314,18 @@ let Qe = 1;
|
|
|
314
314
|
const Xe = (t) => {
|
|
315
315
|
if (!t.appendTo)
|
|
316
316
|
t.appendTo = document.body;
|
|
317
|
-
else if (
|
|
317
|
+
else if (z(t.appendTo)) {
|
|
318
318
|
let e = document.querySelector(t.appendTo);
|
|
319
319
|
_e(e) || (e = document.body), t.appendTo = e;
|
|
320
320
|
}
|
|
321
321
|
}, Ye = (t) => {
|
|
322
|
-
!t.placement &&
|
|
322
|
+
!t.placement && z(u.placement) && u.placement && (t.placement = u.placement), t.placement || (t.placement = C), le.includes(t.placement) || (xe("ElMessage", `Invalid placement: ${t.placement}. Falling back to '${C}'.`), t.placement = C);
|
|
323
323
|
}, re = (t) => {
|
|
324
|
-
const a = !t ||
|
|
324
|
+
const a = !t || z(t) || te(t) || D(t) ? { message: t } : t, e = {
|
|
325
325
|
...c,
|
|
326
326
|
...a
|
|
327
327
|
};
|
|
328
|
-
return Xe(e), Ye(e),
|
|
328
|
+
return Xe(e), Ye(e), O(u.grouping) && !e.grouping && (e.grouping = u.grouping), E(u.duration) && e.duration === 3e3 && (e.duration = u.duration), E(u.offset) && e.offset === 16 && (e.offset = u.offset), O(u.showClose) && !e.showClose && (e.showClose = u.showClose), O(u.plain) && !e.plain && (e.plain = u.plain), e;
|
|
329
329
|
}, et = (t) => {
|
|
330
330
|
const a = t.props.placement || C, e = f[a], s = e.indexOf(t);
|
|
331
331
|
if (s === -1)
|
|
@@ -343,7 +343,7 @@ const Xe = (t) => {
|
|
|
343
343
|
onDestroy: () => {
|
|
344
344
|
j(null, r);
|
|
345
345
|
}
|
|
346
|
-
}, p =
|
|
346
|
+
}, p = F(Ke, n, D(n.message) || te(n.message) ? {
|
|
347
347
|
default: D(n.message) ? n.message : () => n.message
|
|
348
348
|
} : null);
|
|
349
349
|
p.appContext = e || h._context, j(p, r), t.appendChild(r.firstElementChild);
|