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,536 @@
|
|
|
1
|
+
import { shallowRef as se, defineComponent as K, h as Le, triggerRef as U, onMounted as Ne, isVNode as We, inject as ce, ref as w, computed as S, watch as L, nextTick as X, onBeforeUnmount as Ce, createElementBlock as _e, createCommentVNode as we, openBlock as Te, normalizeStyle as De, normalizeClass as Se, unref as j, onUpdated as Ke, createVNode as y, getCurrentInstance as Ee, provide as He, renderSlot as le, useSlots as Ue, reactive as je, onBeforeUpdate as qe, withDirectives as Xe, vShow as Ye } from "vue";
|
|
2
|
+
import { A as Pe, bd as Ze, b as Z, N as oe, d as Y, k as Re, y as ue, n as G, ai as D, D as re, be as Ge, bf as Je, bg as he, E as q, V as Qe, W as et, c as tt, a1 as ie, h as A, aq as at, a5 as nt, B as st, bh as lt, bi as ot, ao as xe, w as rt, aw as it } from "./index-CZJriuFt.js";
|
|
3
|
+
import { c as z } from "./strings-_mHAdgA4.js";
|
|
4
|
+
import { f as ct } from "./vnode-B_Dj8zxu.js";
|
|
5
|
+
const Be = (e) => Pe ? window.requestAnimationFrame(e) : setTimeout(e, 16), ut = (e) => Pe ? window.cancelAnimationFrame(e) : clearTimeout(e), dt = (e, c, u) => ct(e.subTree).filter(
|
|
6
|
+
(n) => {
|
|
7
|
+
var N;
|
|
8
|
+
return We(n) && ((N = n.type) == null ? void 0 : N.name) === c && !!n.component;
|
|
9
|
+
}
|
|
10
|
+
).map((n) => n.component.uid).map((n) => u[n]).filter((n) => !!n), vt = (e, c) => {
|
|
11
|
+
const u = se({}), f = se([]), t = /* @__PURE__ */ new WeakMap(), n = (d) => {
|
|
12
|
+
u.value[d.uid] = d, U(u), Ne(() => {
|
|
13
|
+
const v = d.getVnode().el, o = v.parentNode;
|
|
14
|
+
if (!t.has(o)) {
|
|
15
|
+
t.set(o, []);
|
|
16
|
+
const a = o.insertBefore.bind(o);
|
|
17
|
+
o.insertBefore = (C, s) => (t.get(o).some((E) => C === E || s === E) && U(u), a(C, s));
|
|
18
|
+
}
|
|
19
|
+
t.get(o).push(v);
|
|
20
|
+
});
|
|
21
|
+
}, N = (d) => {
|
|
22
|
+
delete u.value[d.uid], U(u);
|
|
23
|
+
const v = d.getVnode().el, o = v.parentNode, a = t.get(o), C = a.indexOf(v);
|
|
24
|
+
a.splice(C, 1);
|
|
25
|
+
}, h = () => {
|
|
26
|
+
f.value = dt(
|
|
27
|
+
e,
|
|
28
|
+
c,
|
|
29
|
+
u.value
|
|
30
|
+
);
|
|
31
|
+
}, p = (d) => d.render(), m = K({
|
|
32
|
+
setup(d, { slots: v }) {
|
|
33
|
+
return () => (h(), v.default ? Le(p, {
|
|
34
|
+
render: v.default
|
|
35
|
+
}) : null);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
children: f,
|
|
40
|
+
addChild: n,
|
|
41
|
+
removeChild: N,
|
|
42
|
+
ChildrenSorter: m
|
|
43
|
+
};
|
|
44
|
+
}, bt = "horizontal", ft = "vertical", mt = {
|
|
45
|
+
[bt]: "deltaX",
|
|
46
|
+
[ft]: "deltaY"
|
|
47
|
+
}, ht = ({ atEndEdge: e, atStartEdge: c, layout: u }, f) => {
|
|
48
|
+
let t, n = 0;
|
|
49
|
+
const N = (p) => p < 0 && c.value || p > 0 && e.value;
|
|
50
|
+
return {
|
|
51
|
+
hasReachedEdge: N,
|
|
52
|
+
onWheel: (p) => {
|
|
53
|
+
ut(t);
|
|
54
|
+
const m = p[mt[u.value]];
|
|
55
|
+
N(n) && N(n + m) || (n += m, Ze() || p.preventDefault(), t = Be(() => {
|
|
56
|
+
f(n), n = 0;
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}, J = Symbol("tabsRootContextKey"), pt = Z({
|
|
61
|
+
tabs: {
|
|
62
|
+
type: Y(Array),
|
|
63
|
+
default: () => oe([])
|
|
64
|
+
},
|
|
65
|
+
tabRefs: {
|
|
66
|
+
type: Y(Object),
|
|
67
|
+
default: () => oe({})
|
|
68
|
+
}
|
|
69
|
+
}), pe = "ElTabBar", gt = K({
|
|
70
|
+
name: pe,
|
|
71
|
+
__name: "tab-bar",
|
|
72
|
+
props: pt,
|
|
73
|
+
setup(e, { expose: c }) {
|
|
74
|
+
const u = e, f = ce(J);
|
|
75
|
+
f || ue(pe, "<el-tabs><el-tab-bar /></el-tabs>");
|
|
76
|
+
const t = G("tabs"), n = w(), N = w(), h = S(
|
|
77
|
+
() => {
|
|
78
|
+
var a;
|
|
79
|
+
return D(f.props.defaultValue) || !!((a = N.value) != null && a.transform);
|
|
80
|
+
}
|
|
81
|
+
), p = () => {
|
|
82
|
+
let a = 0, C = 0;
|
|
83
|
+
const s = ["top", "bottom"].includes(f.props.tabPosition) ? "width" : "height", B = s === "width" ? "x" : "y", E = B === "x" ? "left" : "top";
|
|
84
|
+
return u.tabs.every((P) => {
|
|
85
|
+
if (D(P.paneName))
|
|
86
|
+
return !1;
|
|
87
|
+
const l = u.tabRefs[P.paneName];
|
|
88
|
+
if (!l)
|
|
89
|
+
return !1;
|
|
90
|
+
if (!P.active)
|
|
91
|
+
return !0;
|
|
92
|
+
a = l[`offset${z(E)}`], C = l[`client${z(s)}`];
|
|
93
|
+
const _ = window.getComputedStyle(l);
|
|
94
|
+
return s === "width" && (C -= Number.parseFloat(_.paddingLeft) + Number.parseFloat(_.paddingRight), a += Number.parseFloat(_.paddingLeft)), !1;
|
|
95
|
+
}), {
|
|
96
|
+
[s]: `${C}px`,
|
|
97
|
+
transform: `translate${z(B)}(${a}px)`
|
|
98
|
+
};
|
|
99
|
+
}, m = () => N.value = p(), d = [], v = () => {
|
|
100
|
+
d.forEach((a) => a.stop()), d.length = 0, Object.values(u.tabRefs).forEach((a) => {
|
|
101
|
+
d.push(re(a, m));
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
L(
|
|
105
|
+
() => u.tabs,
|
|
106
|
+
async () => {
|
|
107
|
+
await X(), m(), v();
|
|
108
|
+
},
|
|
109
|
+
{ immediate: !0 }
|
|
110
|
+
);
|
|
111
|
+
const o = re(n, () => m());
|
|
112
|
+
return Ce(() => {
|
|
113
|
+
d.forEach((a) => a.stop()), d.length = 0, o.stop();
|
|
114
|
+
}), c({
|
|
115
|
+
ref: n,
|
|
116
|
+
update: m
|
|
117
|
+
}), (a, C) => h.value ? (Te(), _e(
|
|
118
|
+
"div",
|
|
119
|
+
{
|
|
120
|
+
key: 0,
|
|
121
|
+
ref_key: "barRef",
|
|
122
|
+
ref: n,
|
|
123
|
+
class: Se([j(t).e("active-bar"), j(t).is(j(f).props.tabPosition)]),
|
|
124
|
+
style: De(N.value)
|
|
125
|
+
},
|
|
126
|
+
null,
|
|
127
|
+
6
|
|
128
|
+
)) : we("v-if", !0);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
var yt = /* @__PURE__ */ Re(gt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);
|
|
132
|
+
const Nt = Z({
|
|
133
|
+
panes: {
|
|
134
|
+
type: Y(Array),
|
|
135
|
+
default: () => oe([])
|
|
136
|
+
},
|
|
137
|
+
currentName: {
|
|
138
|
+
type: [String, Number],
|
|
139
|
+
default: ""
|
|
140
|
+
},
|
|
141
|
+
editable: Boolean,
|
|
142
|
+
type: {
|
|
143
|
+
type: String,
|
|
144
|
+
values: ["card", "border-card", ""],
|
|
145
|
+
default: ""
|
|
146
|
+
},
|
|
147
|
+
stretch: Boolean,
|
|
148
|
+
tabindex: {
|
|
149
|
+
type: [String, Number],
|
|
150
|
+
default: void 0
|
|
151
|
+
}
|
|
152
|
+
}), Ct = {
|
|
153
|
+
tabClick: (e, c, u) => u instanceof Event,
|
|
154
|
+
tabRemove: (e, c) => c instanceof Event
|
|
155
|
+
}, ge = "ElTabNav", _t = K({
|
|
156
|
+
name: ge,
|
|
157
|
+
props: Nt,
|
|
158
|
+
emits: Ct,
|
|
159
|
+
setup(e, {
|
|
160
|
+
expose: c,
|
|
161
|
+
emit: u
|
|
162
|
+
}) {
|
|
163
|
+
const f = ce(J);
|
|
164
|
+
f || ue(ge, "<el-tabs><tab-nav /></el-tabs>");
|
|
165
|
+
const t = G("tabs"), n = Ge(), N = Je(), h = w(), p = w(), m = w(), d = w({}), v = w(), o = w(!1), a = w(0), C = w(!1), s = w(!0), B = se(), E = S(() => ["top", "bottom"].includes(f.props.tabPosition)), P = S(() => E.value ? "width" : "height"), l = S(() => ({
|
|
166
|
+
transform: `translate${P.value === "width" ? "X" : "Y"}(-${a.value}px)`
|
|
167
|
+
})), {
|
|
168
|
+
width: _,
|
|
169
|
+
height: R
|
|
170
|
+
} = he(h), {
|
|
171
|
+
width: V,
|
|
172
|
+
height: I
|
|
173
|
+
} = he(p, {
|
|
174
|
+
width: 0,
|
|
175
|
+
height: 0
|
|
176
|
+
}, {
|
|
177
|
+
box: "border-box"
|
|
178
|
+
}), W = S(() => E.value ? _.value : R.value), F = S(() => E.value ? V.value : I.value), {
|
|
179
|
+
onWheel: M
|
|
180
|
+
} = ht({
|
|
181
|
+
atStartEdge: S(() => a.value <= 0),
|
|
182
|
+
atEndEdge: S(() => F.value - a.value <= W.value),
|
|
183
|
+
layout: S(() => E.value ? "horizontal" : "vertical")
|
|
184
|
+
}, (r) => {
|
|
185
|
+
a.value = at(a.value + r, 0, F.value - W.value);
|
|
186
|
+
}), Q = () => {
|
|
187
|
+
if (!h.value)
|
|
188
|
+
return;
|
|
189
|
+
const r = h.value[`offset${z(P.value)}`], g = a.value;
|
|
190
|
+
if (!g)
|
|
191
|
+
return;
|
|
192
|
+
const i = g > r ? g - r : 0;
|
|
193
|
+
a.value = i;
|
|
194
|
+
}, $e = () => {
|
|
195
|
+
if (!h.value || !p.value)
|
|
196
|
+
return;
|
|
197
|
+
const r = p.value[`offset${z(P.value)}`], g = h.value[`offset${z(P.value)}`], i = a.value;
|
|
198
|
+
if (r - i <= g)
|
|
199
|
+
return;
|
|
200
|
+
const b = r - i > g * 2 ? i + g : r - g;
|
|
201
|
+
a.value = b;
|
|
202
|
+
}, de = async () => {
|
|
203
|
+
const r = p.value;
|
|
204
|
+
if (!o.value || !m.value || !h.value || !r)
|
|
205
|
+
return;
|
|
206
|
+
await X();
|
|
207
|
+
const g = d.value[e.currentName];
|
|
208
|
+
if (!g)
|
|
209
|
+
return;
|
|
210
|
+
const i = h.value, b = g.getBoundingClientRect(), T = i.getBoundingClientRect(), x = E.value ? r.offsetWidth - T.width : r.offsetHeight - T.height, $ = a.value;
|
|
211
|
+
let k = $;
|
|
212
|
+
E.value ? (b.left < T.left && (k = $ - (T.left - b.left)), b.right > T.right && (k = $ + b.right - T.right)) : (b.top < T.top && (k = $ - (T.top - b.top)), b.bottom > T.bottom && (k = $ + (b.bottom - T.bottom))), k = Math.max(k, 0), a.value = Math.min(k, x);
|
|
213
|
+
}, ve = () => {
|
|
214
|
+
var r;
|
|
215
|
+
if (!p.value || !h.value)
|
|
216
|
+
return;
|
|
217
|
+
e.stretch && ((r = v.value) == null || r.update());
|
|
218
|
+
const g = p.value[`offset${z(P.value)}`], i = h.value[`offset${z(P.value)}`], b = a.value;
|
|
219
|
+
i < g ? (o.value = o.value || {}, o.value.prev = b, o.value.next = b + i < g, g - b < i && (a.value = g - i)) : (o.value = !1, b > 0 && (a.value = 0));
|
|
220
|
+
}, Oe = (r) => {
|
|
221
|
+
const g = ie(r);
|
|
222
|
+
let i = 0;
|
|
223
|
+
switch (g) {
|
|
224
|
+
case A.left:
|
|
225
|
+
case A.up:
|
|
226
|
+
i = -1;
|
|
227
|
+
break;
|
|
228
|
+
case A.right:
|
|
229
|
+
case A.down:
|
|
230
|
+
i = 1;
|
|
231
|
+
break;
|
|
232
|
+
default:
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const b = Array.from(r.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
|
|
236
|
+
let x = b.indexOf(r.target) + i;
|
|
237
|
+
x < 0 ? x = b.length - 1 : x >= b.length && (x = 0), b[x].focus({
|
|
238
|
+
preventScroll: !0
|
|
239
|
+
}), b[x].click(), be();
|
|
240
|
+
}, be = () => {
|
|
241
|
+
s.value && (C.value = !0);
|
|
242
|
+
}, ee = () => C.value = !1, Ae = (r, g) => {
|
|
243
|
+
d.value[g] = r;
|
|
244
|
+
}, ze = async () => {
|
|
245
|
+
await X();
|
|
246
|
+
const r = d.value[e.currentName];
|
|
247
|
+
r?.focus({
|
|
248
|
+
preventScroll: !0
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
return L(n, (r) => {
|
|
252
|
+
r === "hidden" ? s.value = !1 : r === "visible" && setTimeout(() => s.value = !0, 50);
|
|
253
|
+
}), L(N, (r) => {
|
|
254
|
+
r ? setTimeout(() => s.value = !0, 50) : s.value = !1;
|
|
255
|
+
}), re(m, () => {
|
|
256
|
+
Be(ve);
|
|
257
|
+
}), Ne(() => setTimeout(() => de(), 0)), Ke(() => ve()), c({
|
|
258
|
+
scrollToActiveTab: de,
|
|
259
|
+
removeFocus: ee,
|
|
260
|
+
focusActiveTab: ze,
|
|
261
|
+
tabListRef: p,
|
|
262
|
+
tabBarRef: v,
|
|
263
|
+
scheduleRender: () => U(B)
|
|
264
|
+
}), () => {
|
|
265
|
+
const r = o.value ? [y("span", {
|
|
266
|
+
class: [t.e("nav-prev"), t.is("disabled", !o.value.prev)],
|
|
267
|
+
onClick: Q
|
|
268
|
+
}, [y(q, null, {
|
|
269
|
+
default: () => [y(Qe, null, null)]
|
|
270
|
+
})]), y("span", {
|
|
271
|
+
class: [t.e("nav-next"), t.is("disabled", !o.value.next)],
|
|
272
|
+
onClick: $e
|
|
273
|
+
}, [y(q, null, {
|
|
274
|
+
default: () => [y(et, null, null)]
|
|
275
|
+
})])] : null, g = e.panes.map((i, b) => {
|
|
276
|
+
var T, x, $, k, fe;
|
|
277
|
+
const Ve = i.uid, te = i.props.disabled, H = (x = (T = i.props.name) != null ? T : i.index) != null ? x : `${b}`, ae = !te && (i.isClosable || i.props.closable !== !1 && e.editable);
|
|
278
|
+
i.index = `${b}`;
|
|
279
|
+
const Fe = ae ? y(q, {
|
|
280
|
+
class: "is-icon-close",
|
|
281
|
+
onClick: (O) => u("tabRemove", i, O)
|
|
282
|
+
}, {
|
|
283
|
+
default: () => [y(tt, null, null)]
|
|
284
|
+
}) : null, Me = ((k = ($ = i.slots).label) == null ? void 0 : k.call($)) || i.props.label, Ie = !te && i.active ? (fe = e.tabindex) != null ? fe : f.props.tabindex : -1;
|
|
285
|
+
return y("div", {
|
|
286
|
+
ref: (O) => Ae(O, H),
|
|
287
|
+
class: [t.e("item"), t.is(f.props.tabPosition), t.is("active", i.active), t.is("disabled", te), t.is("closable", ae), t.is("focus", C.value)],
|
|
288
|
+
id: `tab-${H}`,
|
|
289
|
+
key: `tab-${Ve}`,
|
|
290
|
+
"aria-controls": `pane-${H}`,
|
|
291
|
+
role: "tab",
|
|
292
|
+
"aria-selected": i.active,
|
|
293
|
+
tabindex: Ie,
|
|
294
|
+
onFocus: () => be(),
|
|
295
|
+
onBlur: () => ee(),
|
|
296
|
+
onClick: (O) => {
|
|
297
|
+
ee(), u("tabClick", i, H, O);
|
|
298
|
+
},
|
|
299
|
+
onKeydown: (O) => {
|
|
300
|
+
const me = ie(O);
|
|
301
|
+
ae && (me === A.delete || me === A.backspace) && u("tabRemove", i, O);
|
|
302
|
+
}
|
|
303
|
+
}, [Me, Fe]);
|
|
304
|
+
});
|
|
305
|
+
return B.value, y("div", {
|
|
306
|
+
ref: m,
|
|
307
|
+
class: [t.e("nav-wrap"), t.is("scrollable", !!o.value), t.is(f.props.tabPosition)]
|
|
308
|
+
}, [r, y("div", {
|
|
309
|
+
class: t.e("nav-scroll"),
|
|
310
|
+
ref: h
|
|
311
|
+
}, [e.panes.length > 0 ? y("div", {
|
|
312
|
+
class: [t.e("nav"), t.is(f.props.tabPosition), t.is("stretch", e.stretch && ["top", "bottom"].includes(f.props.tabPosition))],
|
|
313
|
+
ref: p,
|
|
314
|
+
style: l.value,
|
|
315
|
+
role: "tablist",
|
|
316
|
+
onKeydown: Oe,
|
|
317
|
+
onWheel: M
|
|
318
|
+
}, [e.type ? null : y(yt, {
|
|
319
|
+
ref: v,
|
|
320
|
+
tabs: [...e.panes],
|
|
321
|
+
tabRefs: d.value
|
|
322
|
+
}, null), g]) : null])]);
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
}), wt = Z({
|
|
326
|
+
type: {
|
|
327
|
+
type: String,
|
|
328
|
+
values: ["card", "border-card", ""],
|
|
329
|
+
default: ""
|
|
330
|
+
},
|
|
331
|
+
closable: Boolean,
|
|
332
|
+
addable: Boolean,
|
|
333
|
+
modelValue: {
|
|
334
|
+
type: [String, Number]
|
|
335
|
+
},
|
|
336
|
+
defaultValue: {
|
|
337
|
+
type: [String, Number]
|
|
338
|
+
},
|
|
339
|
+
editable: Boolean,
|
|
340
|
+
tabPosition: {
|
|
341
|
+
type: String,
|
|
342
|
+
values: ["top", "right", "bottom", "left"],
|
|
343
|
+
default: "top"
|
|
344
|
+
},
|
|
345
|
+
beforeLeave: {
|
|
346
|
+
type: Y(Function),
|
|
347
|
+
default: () => !0
|
|
348
|
+
},
|
|
349
|
+
stretch: Boolean,
|
|
350
|
+
tabindex: {
|
|
351
|
+
type: [String, Number],
|
|
352
|
+
default: 0
|
|
353
|
+
}
|
|
354
|
+
}), ne = (e) => nt(e) || st(e), Tt = {
|
|
355
|
+
[xe]: (e) => ne(e),
|
|
356
|
+
tabClick: (e, c) => c instanceof Event,
|
|
357
|
+
tabChange: (e) => ne(e),
|
|
358
|
+
edit: (e, c) => ["remove", "add"].includes(c),
|
|
359
|
+
tabRemove: (e) => ne(e),
|
|
360
|
+
tabAdd: () => !0
|
|
361
|
+
}, St = K({
|
|
362
|
+
name: "ElTabs",
|
|
363
|
+
props: wt,
|
|
364
|
+
emits: Tt,
|
|
365
|
+
setup(e, {
|
|
366
|
+
emit: c,
|
|
367
|
+
slots: u,
|
|
368
|
+
expose: f
|
|
369
|
+
}) {
|
|
370
|
+
var t;
|
|
371
|
+
const n = G("tabs"), N = S(() => ["left", "right"].includes(e.tabPosition)), {
|
|
372
|
+
children: h,
|
|
373
|
+
addChild: p,
|
|
374
|
+
removeChild: m,
|
|
375
|
+
ChildrenSorter: d
|
|
376
|
+
} = vt(Ee(), "ElTabPane"), v = w(), o = w((t = D(e.modelValue) ? e.defaultValue : e.modelValue) != null ? t : "0"), a = async (l, _ = !1) => {
|
|
377
|
+
var R, V, I, W;
|
|
378
|
+
if (!(o.value === l || D(l)))
|
|
379
|
+
try {
|
|
380
|
+
let F;
|
|
381
|
+
if (e.beforeLeave) {
|
|
382
|
+
const M = e.beforeLeave(l, o.value);
|
|
383
|
+
F = M instanceof Promise ? await M : M;
|
|
384
|
+
} else
|
|
385
|
+
F = !0;
|
|
386
|
+
if (F !== !1) {
|
|
387
|
+
const M = (R = h.value.find((Q) => Q.paneName === o.value)) == null ? void 0 : R.isFocusInsidePane();
|
|
388
|
+
o.value = l, _ && (c(xe, l), c("tabChange", l)), (I = (V = v.value) == null ? void 0 : V.removeFocus) == null || I.call(V), M && ((W = v.value) == null || W.focusActiveTab());
|
|
389
|
+
}
|
|
390
|
+
} catch {
|
|
391
|
+
}
|
|
392
|
+
}, C = (l, _, R) => {
|
|
393
|
+
l.props.disabled || (c("tabClick", l, R), a(_, !0));
|
|
394
|
+
}, s = (l, _) => {
|
|
395
|
+
l.props.disabled || D(l.props.name) || (_.stopPropagation(), c("edit", l.props.name, "remove"), c("tabRemove", l.props.name));
|
|
396
|
+
}, B = () => {
|
|
397
|
+
c("edit", void 0, "add"), c("tabAdd");
|
|
398
|
+
}, E = (l) => {
|
|
399
|
+
const _ = ie(l);
|
|
400
|
+
[A.enter, A.numpadEnter].includes(_) && B();
|
|
401
|
+
}, P = (l) => {
|
|
402
|
+
const _ = l.el.firstChild, R = ["bottom", "right"].includes(e.tabPosition) ? l.children[0].el : l.children[1].el;
|
|
403
|
+
_ !== R && _.before(R);
|
|
404
|
+
};
|
|
405
|
+
return L(() => e.modelValue, (l) => a(l)), L(o, async () => {
|
|
406
|
+
var l;
|
|
407
|
+
await X(), (l = v.value) == null || l.scrollToActiveTab();
|
|
408
|
+
}), He(J, {
|
|
409
|
+
props: e,
|
|
410
|
+
currentName: o,
|
|
411
|
+
registerPane: p,
|
|
412
|
+
unregisterPane: m,
|
|
413
|
+
nav$: v
|
|
414
|
+
}), f({
|
|
415
|
+
currentName: o,
|
|
416
|
+
get tabNavRef() {
|
|
417
|
+
return lt(v.value, ["scheduleRender"]);
|
|
418
|
+
}
|
|
419
|
+
}), () => {
|
|
420
|
+
const l = u["add-icon"], _ = e.editable || e.addable ? y("div", {
|
|
421
|
+
class: [n.e("new-tab"), N.value && n.e("new-tab-vertical")],
|
|
422
|
+
tabindex: e.tabindex,
|
|
423
|
+
onClick: B,
|
|
424
|
+
onKeydown: E
|
|
425
|
+
}, [l ? le(u, "add-icon") : y(q, {
|
|
426
|
+
class: n.is("icon-plus")
|
|
427
|
+
}, {
|
|
428
|
+
default: () => [y(ot, null, null)]
|
|
429
|
+
})]) : null, R = () => y(_t, {
|
|
430
|
+
ref: v,
|
|
431
|
+
currentName: o.value,
|
|
432
|
+
editable: e.editable,
|
|
433
|
+
type: e.type,
|
|
434
|
+
panes: h.value,
|
|
435
|
+
stretch: e.stretch,
|
|
436
|
+
onTabClick: C,
|
|
437
|
+
onTabRemove: s
|
|
438
|
+
}, null), V = y("div", {
|
|
439
|
+
class: [n.e("header"), N.value && n.e("header-vertical"), n.is(e.tabPosition)]
|
|
440
|
+
}, [y(d, null, {
|
|
441
|
+
default: R,
|
|
442
|
+
$stable: !0
|
|
443
|
+
}), _]), I = y("div", {
|
|
444
|
+
class: n.e("content")
|
|
445
|
+
}, [le(u, "default")]);
|
|
446
|
+
return y("div", {
|
|
447
|
+
class: [n.b(), n.m(e.tabPosition), {
|
|
448
|
+
[n.m("card")]: e.type === "card",
|
|
449
|
+
[n.m("border-card")]: e.type === "border-card"
|
|
450
|
+
}],
|
|
451
|
+
onVnodeMounted: P,
|
|
452
|
+
onVnodeUpdated: P
|
|
453
|
+
}, [I, V]);
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
}), Et = Z({
|
|
457
|
+
label: {
|
|
458
|
+
type: String,
|
|
459
|
+
default: ""
|
|
460
|
+
},
|
|
461
|
+
name: {
|
|
462
|
+
type: [String, Number]
|
|
463
|
+
},
|
|
464
|
+
closable: {
|
|
465
|
+
type: Boolean,
|
|
466
|
+
default: void 0
|
|
467
|
+
},
|
|
468
|
+
disabled: Boolean,
|
|
469
|
+
lazy: Boolean
|
|
470
|
+
}), Pt = ["id", "aria-hidden", "aria-labelledby"], ye = "ElTabPane", Rt = K({
|
|
471
|
+
name: ye,
|
|
472
|
+
__name: "tab-pane",
|
|
473
|
+
props: Et,
|
|
474
|
+
setup(e) {
|
|
475
|
+
const c = e, u = Ee(), f = Ue(), t = ce(J);
|
|
476
|
+
t || ue(ye, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
|
477
|
+
const n = G("tab-pane"), N = w(), h = w(), p = S(() => {
|
|
478
|
+
var s;
|
|
479
|
+
return (s = c.closable) != null ? s : t.props.closable;
|
|
480
|
+
}), m = S(
|
|
481
|
+
() => {
|
|
482
|
+
var s;
|
|
483
|
+
return t.currentName.value === ((s = c.name) != null ? s : h.value);
|
|
484
|
+
}
|
|
485
|
+
), d = w(m.value), v = S(() => {
|
|
486
|
+
var s;
|
|
487
|
+
return (s = c.name) != null ? s : h.value;
|
|
488
|
+
}), o = S(
|
|
489
|
+
() => !c.lazy || d.value || m.value
|
|
490
|
+
), a = () => {
|
|
491
|
+
var s;
|
|
492
|
+
return (s = N.value) == null ? void 0 : s.contains(document.activeElement);
|
|
493
|
+
};
|
|
494
|
+
L(m, (s) => {
|
|
495
|
+
s && (d.value = !0);
|
|
496
|
+
});
|
|
497
|
+
const C = je({
|
|
498
|
+
uid: u.uid,
|
|
499
|
+
getVnode: () => u.vnode,
|
|
500
|
+
slots: f,
|
|
501
|
+
props: c,
|
|
502
|
+
paneName: v,
|
|
503
|
+
active: m,
|
|
504
|
+
index: h,
|
|
505
|
+
isClosable: p,
|
|
506
|
+
isFocusInsidePane: a
|
|
507
|
+
});
|
|
508
|
+
return t.registerPane(C), Ce(() => {
|
|
509
|
+
t.unregisterPane(C);
|
|
510
|
+
}), qe(() => {
|
|
511
|
+
var s;
|
|
512
|
+
f.label && ((s = t.nav$.value) == null || s.scheduleRender());
|
|
513
|
+
}), (s, B) => o.value ? Xe((Te(), _e("div", {
|
|
514
|
+
key: 0,
|
|
515
|
+
id: `pane-${v.value}`,
|
|
516
|
+
ref_key: "paneRef",
|
|
517
|
+
ref: N,
|
|
518
|
+
class: Se(j(n).b()),
|
|
519
|
+
role: "tabpanel",
|
|
520
|
+
"aria-hidden": !m.value,
|
|
521
|
+
"aria-labelledby": `tab-${v.value}`
|
|
522
|
+
}, [
|
|
523
|
+
le(s.$slots, "default")
|
|
524
|
+
], 10, Pt)), [
|
|
525
|
+
[Ye, m.value]
|
|
526
|
+
]) : we("v-if", !0);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
var ke = /* @__PURE__ */ Re(Rt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);
|
|
530
|
+
const Ot = rt(St, {
|
|
531
|
+
TabPane: ke
|
|
532
|
+
}), At = it(ke);
|
|
533
|
+
export {
|
|
534
|
+
Ot as E,
|
|
535
|
+
At as a
|
|
536
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { c as D, l as c, u as I, a as M, _ as x, E as O } from "./index-CZJriuFt.js";
|
|
2
|
+
import { S as U, u as $, a as N, w as h, z as q, E as A } from "./ScreenPreview-CV95NWOd.js";
|
|
3
|
+
import { E as L } from "./el-button-DvLKp6Ga.js";
|
|
4
|
+
import { ElIcon as z, ElConfigProvider as B } from "element-plus";
|
|
5
|
+
import { defineComponent as G, defineAsyncComponent as S, getCurrentInstance as H, onMounted as V, watch as j, onUnmounted as F, ref as y, resolveComponent as s, createElementBlock as E, openBlock as b, createVNode as t, withCtx as f, createElementVNode as i, withDirectives as J, createCommentVNode as R, vShow as K } from "vue";
|
|
6
|
+
import { u as Q } from "./toolbar-Dhf_BVAU.js";
|
|
7
|
+
const W = G({
|
|
8
|
+
name: "ScreenEditor",
|
|
9
|
+
components: {
|
|
10
|
+
HeaderToolbar: S(() => import("./index-Buoc0ISP.js")),
|
|
11
|
+
EditorContextMenu: S(() => import("./index-BwCQWH-N.js")),
|
|
12
|
+
CanvasMain: c(() => import("./index-BPcvYtHf.js")),
|
|
13
|
+
ComponentsPanel: c(() => import("./index-B19lEYui.js")),
|
|
14
|
+
LayerPanel: c(() => import("./index-BD4Jwo8Z.js")),
|
|
15
|
+
ConfigPanel: c(() => import("./index-BCFXuK7k.js").then((o) => o.i)),
|
|
16
|
+
PageTabs: c(() => import("./page-tabs-wFeNBY4c.js")),
|
|
17
|
+
// FilterManagerDrawer: loadAsyncComponent(() => import('./filter-manager/filter-manager-drawer.vue')),
|
|
18
|
+
ElConfigProvider: B,
|
|
19
|
+
ScreenPreview: U,
|
|
20
|
+
ElIcon: z,
|
|
21
|
+
Close: D
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
screenData: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: !1,
|
|
27
|
+
default: () => ({})
|
|
28
|
+
},
|
|
29
|
+
apiUrl: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: !1,
|
|
32
|
+
default: ""
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ["toolClick", "componentClick"],
|
|
36
|
+
setup(o, { emit: C }) {
|
|
37
|
+
const d = Q(), v = $(), w = N(), n = I(), r = M(), p = H();
|
|
38
|
+
o.apiUrl && (window.__BP_EDITOR_API_URL__ = o.apiUrl), w.enable(), n.setEditMode();
|
|
39
|
+
const m = async (e) => {
|
|
40
|
+
try {
|
|
41
|
+
if (!e || Object.keys(e).length === 0) {
|
|
42
|
+
n.resetScreen(), r.load([]), r.requestCollectComs({});
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const a = JSON.parse(JSON.stringify(e));
|
|
46
|
+
await Promise.all([
|
|
47
|
+
n.loadScreen(a),
|
|
48
|
+
v.loadFilters(),
|
|
49
|
+
r.requestCom(a),
|
|
50
|
+
r.requestCollectComs(a)
|
|
51
|
+
]);
|
|
52
|
+
} catch (a) {
|
|
53
|
+
h("editor", a.message || String(a));
|
|
54
|
+
} finally {
|
|
55
|
+
document.title = `${n.screen.name} | 编辑器`, n.autoCanvasScale(() => d.getPanelOffset);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
V(async () => {
|
|
59
|
+
try {
|
|
60
|
+
p && (p.appContext.components.GInputNumber || console.error("[ScreenEditor] GUI components are not registered! The right-side properties panel will not work. Please ensure you have installed the plugin: app.use(bpAiccEditor) or app.use(GUI)")), await m(o.screenData);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
h("editor", e.message || String(e));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const u = () => {
|
|
66
|
+
n.resetScreen(), r.load([]), d.removeAllLoading(), document.title = "", window.onresize = null;
|
|
67
|
+
};
|
|
68
|
+
j(() => o.screenData, (e) => {
|
|
69
|
+
u(), m(e);
|
|
70
|
+
}), F(() => {
|
|
71
|
+
u();
|
|
72
|
+
});
|
|
73
|
+
const l = y(!1), _ = y({});
|
|
74
|
+
return {
|
|
75
|
+
zhCn: q,
|
|
76
|
+
isPreview: l,
|
|
77
|
+
previewData: _,
|
|
78
|
+
handleToolClick: (e) => {
|
|
79
|
+
e.type === "preview" ? (_.value = e.data, l.value = !0) : C("toolClick", e);
|
|
80
|
+
},
|
|
81
|
+
closePreview: () => {
|
|
82
|
+
l.value = !1, n.setEditMode(!0), n.autoCanvasScale(() => d.getPanelOffset);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}), X = { class: "screen-editor-root" }, Y = { class: "boxs" }, Z = { class: "g-layout is-vertical edit-container" }, ee = { class: "g-header" }, oe = {
|
|
87
|
+
id: "edit-main-wp",
|
|
88
|
+
class: "g-layout edit-main-wp"
|
|
89
|
+
}, te = { class: "left-aside" }, ne = { style: { display: "flex", flex: "1", "flex-direction": "column", overflow: "hidden" } }, se = {
|
|
90
|
+
id: "iking-editor-main",
|
|
91
|
+
class: "g-layout edit-main"
|
|
92
|
+
}, ae = {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "preview-container"
|
|
95
|
+
};
|
|
96
|
+
function re(o, C, d, v, w, n) {
|
|
97
|
+
const r = s("HeaderToolbar"), p = s("ComponentsPanel"), m = s("LayerPanel"), u = s("PageTabs"), l = s("CanvasMain"), _ = s("ConfigPanel"), g = s("EditorContextMenu"), P = s("ScreenPreview"), e = s("Close"), a = O, k = L, T = A;
|
|
98
|
+
return b(), E("div", X, [
|
|
99
|
+
t(T, { locale: o.zhCn }, {
|
|
100
|
+
default: f(() => [
|
|
101
|
+
i("div", Y, [
|
|
102
|
+
J(i("div", Z, [
|
|
103
|
+
i("div", ee, [
|
|
104
|
+
t(r, { onToolClick: o.handleToolClick }, null, 8, ["onToolClick"])
|
|
105
|
+
]),
|
|
106
|
+
i("div", oe, [
|
|
107
|
+
i("div", te, [
|
|
108
|
+
t(p),
|
|
109
|
+
t(m)
|
|
110
|
+
]),
|
|
111
|
+
i("div", ne, [
|
|
112
|
+
t(u),
|
|
113
|
+
i("div", se, [
|
|
114
|
+
t(l)
|
|
115
|
+
])
|
|
116
|
+
]),
|
|
117
|
+
t(_)
|
|
118
|
+
])
|
|
119
|
+
], 512), [
|
|
120
|
+
[K, !o.isPreview]
|
|
121
|
+
]),
|
|
122
|
+
t(g),
|
|
123
|
+
o.isPreview ? (b(), E("div", ae, [
|
|
124
|
+
t(P, { "screen-data": o.previewData }, null, 8, ["screen-data"]),
|
|
125
|
+
t(k, {
|
|
126
|
+
type: "primary",
|
|
127
|
+
class: "preview-close-btn",
|
|
128
|
+
onClick: o.closePreview
|
|
129
|
+
}, {
|
|
130
|
+
default: f(() => [
|
|
131
|
+
t(a, null, {
|
|
132
|
+
default: f(() => [
|
|
133
|
+
t(e)
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
})
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["onClick"])
|
|
140
|
+
])) : R("", !0)
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
}, 8, ["locale"])
|
|
145
|
+
]);
|
|
146
|
+
}
|
|
147
|
+
const ue = /* @__PURE__ */ x(W, [["render", re], ["__scopeId", "data-v-faf32008"]]);
|
|
148
|
+
export {
|
|
149
|
+
ue as default
|
|
150
|
+
};
|