react-big-screen 0.0.24 → 0.0.26
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/es/{attributes-DRoIzLZg.mjs → attributes-BEr36PPS.mjs} +1 -1
- package/es/{attributes-CH9MBgiG.mjs → attributes-BorgmEuq.mjs} +1 -1
- package/es/{attributes-CfPeTY5D.mjs → attributes-BqpzJUpw.mjs} +2 -2
- package/es/{attributes-RjWkk9Ep.mjs → attributes-C1A9908m.mjs} +1 -1
- package/es/{attributes-2p9Zk1-n.mjs → attributes-CF-lP4Tl.mjs} +1 -1
- package/es/{attributes-DEejGpyc.mjs → attributes-CLFZcWAB.mjs} +1 -1
- package/es/{attributes-CdSoE5xJ.mjs → attributes-DUaK076s.mjs} +1 -1
- package/es/{attributes-8wJNGwLE.mjs → attributes-DZOgwszX.mjs} +1 -1
- package/es/{attributes-BNGJPVyh.mjs → attributes-Dfr3b13g.mjs} +1 -1
- package/es/{attributes-CUgbOLAh.mjs → attributes-SrukxCct.mjs} +1 -1
- package/es/{attributes-CJsbMpOn.mjs → attributes-pYXM3BGl.mjs} +1 -1
- package/es/{attributes-DRRt0HtT.mjs → attributes-zB7QAb6A.mjs} +1 -1
- package/es/{index-D9YQ4kEQ.mjs → index-B6qPIrOx.mjs} +2 -2
- package/es/{index-CR_TAWUR.mjs → index-BKv9EAtX.mjs} +2 -2
- package/es/{index-DGJ8dCRu.mjs → index-BTEqUeDS.mjs} +2 -2
- package/es/{index-C9Wc2Kzs.mjs → index-BmzrDQHQ.mjs} +3 -3
- package/es/{index-CS4fwJHw.mjs → index-BocA4dcF.mjs} +2 -2
- package/es/{index-BOqgdslU.mjs → index-Bs2yu7J6.mjs} +2 -2
- package/es/{index-Bh0co1x-.mjs → index-BvJ4xx2h.mjs} +1 -1
- package/es/{index-4S2OXFT4.mjs → index-C2aQoFOi.mjs} +2 -2
- package/es/{index-BeTrQloT.mjs → index-CIs39Kyq.mjs} +3 -3
- package/es/{index-DUvmwvc8.mjs → index-CX8Y7AOe.mjs} +2 -2
- package/es/{index-Dbkk-b9S.mjs → index-Cr2RXjtr.mjs} +92 -89
- package/es/{index-COuWSAwb.mjs → index-CraAaVS_.mjs} +2 -2
- package/es/{index-DiAdz_6L.mjs → index-CtKpbpyM.mjs} +3 -3
- package/es/{index-Df0DLqCw.mjs → index-D8v1cc5M.mjs} +2 -2
- package/es/{index-BjMdtwev.mjs → index-DHdde3-c.mjs} +2 -2
- package/es/{index-CnzZjrjU.mjs → index-DM0HOT8p.mjs} +2 -2
- package/es/{index-CQp7fz9I.mjs → index-DeSSSWVT.mjs} +2 -2
- package/es/{index-DHZzVkTM.mjs → index-Dk3V3zbH.mjs} +2 -2
- package/es/{index-DHoxa3x_.mjs → index-DmEGqsGs.mjs} +3 -3
- package/es/{index-CV1vqX8-.mjs → index-Dp3cAb00.mjs} +2 -2
- package/es/{index-Bn3nDy5T.mjs → index-Qui7yLq3.mjs} +2 -2
- package/es/{index-ByVgagvo.mjs → index-YvM6Nke0.mjs} +1185 -1174
- package/es/{index-BaLteAvQ.mjs → index-_zn5qv_O.mjs} +2 -2
- package/es/{index-Bely-J50.mjs → index-hkMT846_.mjs} +2 -2
- package/es/{index-D66jJN7b.mjs → index-ycFZ60KR.mjs} +1 -1
- package/es/{index-B0NWyl8u.mjs → index-zozSTDVn.mjs} +2 -2
- package/es/index.mjs +1 -1
- package/es/{selectPage-BQ7Fdnqf.mjs → selectPage-1ojYk6EF.mjs} +1 -1
- package/es/{useCurrentPageId-6JCOgaZV.mjs → useCurrentPageId-DG0SfHzH.mjs} +1 -1
- package/package.json +1 -1
- package/types/src/export/index.d.ts +2 -2
- package/types/src/pages/components/Header/index.d.ts +9 -0
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ee = (e, t, n) =>
|
|
1
|
+
var vn = Object.defineProperty;
|
|
2
|
+
var bn = (e, t, n) => t in e ? vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ee = (e, t, n) => bn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as l, jsxs as g, Fragment as W } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
6
|
-
import { DownOutlined as
|
|
7
|
-
import { message as
|
|
5
|
+
import zt, { useRef as j, useEffect as E, useMemo as L, useState as N, forwardRef as Cn, useImperativeHandle as xn, Suspense as $t, createContext as In, useContext as kn } from "react";
|
|
6
|
+
import { DownOutlined as Sn, ReloadOutlined as Z, CloseOutlined as Nn, ArrowUpOutlined as et, ArrowRightOutlined as wn, ArrowDownOutlined as tt, ArrowLeftOutlined as En, QuestionCircleOutlined as An, UploadOutlined as Ln, VerticalAlignBottomOutlined as Rt, ClearOutlined as Ft, TranslationOutlined as Dn, SaveOutlined as Q, GithubFilled as On, LockOutlined as Ht, EyeOutlined as Pn, EyeInvisibleOutlined as Bn, RightOutlined as Mn, VerticalAlignTopOutlined as jn, UnlockOutlined as Tn, BlockOutlined as zn, DisconnectOutlined as $n, CopyOutlined as Rn, DeleteOutlined as de, StarOutlined as dt, BorderOuterOutlined as Fn, BorderBottomOutlined as Hn, DownloadOutlined as Kn, LoadingOutlined as Kt, EditOutlined as Ut, BarsOutlined as Un, FileOutlined as qn, AppstoreOutlined as Jn, FileTextOutlined as Wn, ApartmentOutlined as Vn, BankOutlined as Gn, HistoryOutlined as Xn, PlusOutlined as rt, RedoOutlined as Yn, SettingOutlined as Zn } from "@ant-design/icons";
|
|
7
|
+
import { message as A, Tooltip as z, InputNumber as le, Popover as st, Slider as Qn, Space as D, Dropdown as be, Button as K, Input as pn, Collapse as Ct, Form as M, Modal as re, Descriptions as je, Tree as ei, Row as nt, Col as H, Checkbox as we, Switch as qt, Tabs as ti, Empty as xt } from "antd";
|
|
8
8
|
import $ from "classnames";
|
|
9
|
-
import { R as k, u as
|
|
9
|
+
import { R as k, u as w, E as ni, a as ii, b as li, c as ut, s as ci, L as ai, d as oi, e as Jt, f as ht, g as it, l as Te, h as It, i as di, j as kt, I as ze, k as ri, m as si } from "./index-Cr2RXjtr.mjs";
|
|
10
10
|
import "localforage";
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { createRoot as
|
|
11
|
+
import { createPortal as ui } from "react-dom";
|
|
12
|
+
import { createRoot as Wt } from "react-dom/client";
|
|
13
13
|
import "driver.js";
|
|
14
14
|
import "driver.js/dist/driver.css";
|
|
15
|
-
import { cloneDeep as
|
|
16
|
-
import { u as Ee, i as Ae, a as gt, b as
|
|
17
|
-
import { useUpdateEffect as _t, useUnmount as
|
|
15
|
+
import { cloneDeep as Vt, debounce as hi, groupBy as gi, throttle as Gt } from "lodash-es";
|
|
16
|
+
import { u as Ee, i as Ae, a as gt, b as Xt, c as Yt, g as ae, d as _i, e as mi, f as fi, h as yi, j as Zt, s as St, P as vi, k as bi, l as Ci } from "./index-DM0HOT8p.mjs";
|
|
17
|
+
import { useUpdateEffect as _t, useUnmount as Qt, useRequest as pt } from "ahooks";
|
|
18
18
|
import "react-color";
|
|
19
|
-
import { I as p, L as Le, a as T, C as
|
|
20
|
-
import { I as mt, a as
|
|
19
|
+
import { I as p, L as Le, a as T, C as xi, b as $e } from "./Line-CgKiUu04.mjs";
|
|
20
|
+
import { I as mt, a as Ii } from "./IInputNumber-CEotcbKL.mjs";
|
|
21
21
|
import { useTranslation as se } from "react-i18next";
|
|
22
22
|
import lt from "hotkeys-js";
|
|
23
|
-
import
|
|
24
|
-
import { I as U, i as
|
|
25
|
-
import * as
|
|
23
|
+
import ki from "dayjs";
|
|
24
|
+
import { I as U, i as Si, a as Ni } from "./index-yEFPa0R2.mjs";
|
|
25
|
+
import * as wi from "monaco-editor/esm/vs/editor/editor.api";
|
|
26
26
|
import "monaco-editor/esm/vs/language/json/monaco.contribution";
|
|
27
27
|
import "monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution";
|
|
28
28
|
import "monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution";
|
|
29
29
|
import "monaco-editor/esm/vs/language/typescript/monaco.contribution";
|
|
30
30
|
import ft from "jszip";
|
|
31
|
-
import { saveAs as
|
|
32
|
-
import { u as
|
|
33
|
-
import { u as
|
|
34
|
-
import { u as
|
|
35
|
-
import { u as
|
|
36
|
-
import { I as Ce } from "./index-
|
|
37
|
-
async function
|
|
31
|
+
import { saveAs as en } from "file-saver";
|
|
32
|
+
import { u as tn } from "./useEffectOnce-l5sUTCBG.mjs";
|
|
33
|
+
import { u as Ei, s as Re } from "./selectPage-1ojYk6EF.mjs";
|
|
34
|
+
import { u as Ai } from "./useCurrentPageId-DG0SfHzH.mjs";
|
|
35
|
+
import { u as nn } from "./useListenRef-B01dENv0.mjs";
|
|
36
|
+
import { I as Ce } from "./index-BvJ4xx2h.mjs";
|
|
37
|
+
async function ln(e) {
|
|
38
38
|
return new Promise((t) => {
|
|
39
39
|
let n = document.createElement("input");
|
|
40
40
|
n.type = "file", e != null && e.accept && (n.accept = e.accept), n.onchange = (i) => {
|
|
41
|
-
var
|
|
42
|
-
const c = (d = (
|
|
41
|
+
var o, d;
|
|
42
|
+
const c = (d = (o = i.target) == null ? void 0 : o.files) == null ? void 0 : d[0];
|
|
43
43
|
if (!c)
|
|
44
44
|
return console.warn("file must be selected."), t(void 0);
|
|
45
45
|
t(c);
|
|
46
46
|
}, n.click();
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
async function
|
|
50
|
-
return
|
|
49
|
+
async function Li(e) {
|
|
50
|
+
return ln(e).then((t) => cn(t));
|
|
51
51
|
}
|
|
52
|
-
async function
|
|
52
|
+
async function cn(e) {
|
|
53
53
|
return new Promise((t) => {
|
|
54
54
|
if (!e) return "";
|
|
55
55
|
const n = new FileReader();
|
|
@@ -60,36 +60,36 @@ async function ln(e) {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
function ct(e, t, n) {
|
|
63
|
-
var c,
|
|
63
|
+
var c, o;
|
|
64
64
|
let i = (c = e == null ? void 0 : e.dataset) == null ? void 0 : c[t];
|
|
65
65
|
if (!n)
|
|
66
66
|
return i;
|
|
67
67
|
for (; i == null && e; )
|
|
68
|
-
e = e.parentElement, i = (
|
|
68
|
+
e = e.parentElement, i = (o = e == null ? void 0 : e.dataset) == null ? void 0 : o[t];
|
|
69
69
|
return i;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Di(e) {
|
|
72
72
|
var i;
|
|
73
73
|
const t = k.getActiveEngine();
|
|
74
74
|
if (!t) return [];
|
|
75
75
|
const n = (i = t.component.getPackage(e)) == null ? void 0 : i.components;
|
|
76
76
|
return t.componentNode.getAll().filter((c) => {
|
|
77
|
-
var
|
|
78
|
-
return (
|
|
77
|
+
var o;
|
|
78
|
+
return (o = n == null ? void 0 : n.find) == null ? void 0 : o.call(n, (d) => d.cId === c.cId);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const n =
|
|
83
|
-
return c.current = t,
|
|
81
|
+
function Oi(e, t) {
|
|
82
|
+
const n = j(), i = j(null), c = j(), { engine: o } = w();
|
|
83
|
+
return c.current = t, E(() => () => {
|
|
84
84
|
var d;
|
|
85
85
|
(d = n.current) == null || d.call(n);
|
|
86
|
-
}, []),
|
|
86
|
+
}, []), L(() => {
|
|
87
87
|
let d = document.createElement("div");
|
|
88
88
|
document.body.appendChild(d);
|
|
89
|
-
let
|
|
90
|
-
return
|
|
91
|
-
/* @__PURE__ */ l(
|
|
92
|
-
|
|
89
|
+
let a = Wt(d);
|
|
90
|
+
return a.render(
|
|
91
|
+
/* @__PURE__ */ l(ni.Provider, { value: { engine: o }, children: /* @__PURE__ */ l(
|
|
92
|
+
ii,
|
|
93
93
|
{
|
|
94
94
|
ref: i,
|
|
95
95
|
component: e,
|
|
@@ -104,7 +104,7 @@ function Di(e, t) {
|
|
|
104
104
|
}
|
|
105
105
|
) })
|
|
106
106
|
), n.current = () => {
|
|
107
|
-
d && (
|
|
107
|
+
d && (a.unmount(), d.remove(), d = void 0);
|
|
108
108
|
}, {
|
|
109
109
|
open(s) {
|
|
110
110
|
var r, h;
|
|
@@ -119,35 +119,35 @@ function Di(e, t) {
|
|
|
119
119
|
}
|
|
120
120
|
function ue(e) {
|
|
121
121
|
return function(t) {
|
|
122
|
-
return
|
|
122
|
+
return Oi(e, t);
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
const e =
|
|
127
|
-
return
|
|
125
|
+
function Pi() {
|
|
126
|
+
const e = li((t) => t.componentMap);
|
|
127
|
+
return L(() => e ? Object.values(e) : [], [e]);
|
|
128
128
|
}
|
|
129
129
|
function yt() {
|
|
130
|
-
const { engine: e } =
|
|
131
|
-
return
|
|
130
|
+
const { engine: e } = w(), [t, n] = N(() => e.instance.getAllSelected());
|
|
131
|
+
return E(() => e.instance.onSelectedChange((i) => {
|
|
132
132
|
const c = Object.values(i);
|
|
133
|
-
n((
|
|
133
|
+
n((o) => !c.length && !o.length ? o : c);
|
|
134
134
|
}), []), t;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const { engine: e } =
|
|
138
|
-
return
|
|
136
|
+
function Bi() {
|
|
137
|
+
const { engine: e } = w(), [t, n] = N([]);
|
|
138
|
+
return tn(() => (n(e.favorites.getAll()), e.favorites.onChange((i) => {
|
|
139
139
|
n([...i]);
|
|
140
140
|
}))), t;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const { engine: e } =
|
|
144
|
-
return
|
|
142
|
+
function an() {
|
|
143
|
+
const { engine: e } = w(), [t, n] = N(() => e.history.getHistoryData());
|
|
144
|
+
return E(() => {
|
|
145
145
|
e.history.onChange((i) => {
|
|
146
146
|
n(i);
|
|
147
147
|
});
|
|
148
148
|
}, []), t;
|
|
149
149
|
}
|
|
150
|
-
const
|
|
150
|
+
const Mi = `/**
|
|
151
151
|
* 转换request扩展参数函数 (必须包含主函数main)
|
|
152
152
|
*
|
|
153
153
|
* @params {value} 默认携带参数或json对象
|
|
@@ -158,7 +158,7 @@ const Bi = `/**
|
|
|
158
158
|
*/
|
|
159
159
|
function main(value, {origin, target, option}) {
|
|
160
160
|
return value
|
|
161
|
-
}`,
|
|
161
|
+
}`, ji = `/**
|
|
162
162
|
* 修改目标componentNode (必须包含主函数main)
|
|
163
163
|
*
|
|
164
164
|
* @params {target} 目标componentNode
|
|
@@ -174,24 +174,24 @@ function main(target, origin, payload) {
|
|
|
174
174
|
dragDirection: "d_dir"
|
|
175
175
|
// 拖拽大小方向
|
|
176
176
|
};
|
|
177
|
-
function
|
|
177
|
+
function Ti(e) {
|
|
178
178
|
const t = [];
|
|
179
179
|
return Object.entries(e).forEach(([n, i]) => {
|
|
180
180
|
lt(n, i), t.push(() => lt.unbind(n, i));
|
|
181
181
|
}), () => t.forEach((n) => n());
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
183
|
+
function zi(e) {
|
|
184
|
+
E(() => Ti(e), []);
|
|
185
185
|
}
|
|
186
186
|
function at() {
|
|
187
187
|
const e = k.getActiveEngine();
|
|
188
188
|
e && (e.componentNode.delete(Oe()), O("删除选中组件"));
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function on() {
|
|
191
191
|
const e = k.getActiveEngine();
|
|
192
192
|
e && (e.instance.selectAll(), O("全选组件"));
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function $i() {
|
|
195
195
|
const e = k.getActiveEngine();
|
|
196
196
|
e && (e.instance.getAllSelected().forEach((t) => {
|
|
197
197
|
const n = e.componentNode.get(t.id);
|
|
@@ -200,7 +200,7 @@ function zi() {
|
|
|
200
200
|
});
|
|
201
201
|
}), O("组件左移"));
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function Ri() {
|
|
204
204
|
const e = k.getActiveEngine();
|
|
205
205
|
e && (e.instance.getAllSelected().forEach((t) => {
|
|
206
206
|
const n = e.componentNode.get(t.id);
|
|
@@ -209,7 +209,7 @@ function $i() {
|
|
|
209
209
|
});
|
|
210
210
|
}), O("组件右移动"));
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Fi() {
|
|
213
213
|
const e = k.getActiveEngine();
|
|
214
214
|
e && (e.instance.getAllSelected().forEach((t) => {
|
|
215
215
|
const n = e.componentNode.get(t.id);
|
|
@@ -218,7 +218,7 @@ function Ri() {
|
|
|
218
218
|
});
|
|
219
219
|
}), O("组件上移"));
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Hi() {
|
|
222
222
|
const e = k.getActiveEngine();
|
|
223
223
|
e && (e.instance.getAllSelected().forEach((t) => {
|
|
224
224
|
const n = e.componentNode.get(t.id);
|
|
@@ -227,19 +227,19 @@ function Fi() {
|
|
|
227
227
|
});
|
|
228
228
|
}), O("组件下移"));
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function dn() {
|
|
231
231
|
const e = k.getActiveEngine();
|
|
232
232
|
if (!e) return;
|
|
233
|
-
const t = Oe(), n = new Set(e.instance.getAllSelected().map((
|
|
234
|
-
onClone(
|
|
235
|
-
n.has(
|
|
233
|
+
const t = Oe(), n = new Set(e.instance.getAllSelected().map((o) => o.id)), i = [], c = e.componentNode.cloneComponentNodes(t, {
|
|
234
|
+
onClone(o, d) {
|
|
235
|
+
n.has(o.id) && (n.delete(o.id), i.push(d.id)), d.x += 10, d.y += 10;
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
e.componentNode.add(c), setTimeout(() => {
|
|
239
239
|
e.instance.select(i, !0), O("复制组件");
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Ki() {
|
|
243
243
|
var t, n;
|
|
244
244
|
const e = k.getActiveEngine();
|
|
245
245
|
(n = (t = e == null ? void 0 : e.componentNode) == null ? void 0 : t.clear) == null || n.call(t);
|
|
@@ -248,13 +248,13 @@ function vt(e) {
|
|
|
248
248
|
const t = k.getActiveEngine();
|
|
249
249
|
t && (t.getJSON().then((n) => {
|
|
250
250
|
localStorage.setItem("json", JSON.stringify(n));
|
|
251
|
-
}),
|
|
251
|
+
}), A.success("保存成功"));
|
|
252
252
|
}
|
|
253
253
|
function De() {
|
|
254
254
|
const e = k.getActiveEngine();
|
|
255
255
|
e && e.instance.getAllSelected().length && (e.instance.unselectAll(), O("取消全选组件"));
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Ui() {
|
|
258
258
|
const e = k.getActiveEngine();
|
|
259
259
|
if (!e) return;
|
|
260
260
|
e.instance.getAllSelected().forEach((n) => {
|
|
@@ -263,7 +263,7 @@ function Ki() {
|
|
|
263
263
|
});
|
|
264
264
|
}), e.instance.unselectAll();
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function qi() {
|
|
267
267
|
const e = k.getActiveEngine();
|
|
268
268
|
if (!e) return;
|
|
269
269
|
e.instance.getAllSelected().forEach((n) => {
|
|
@@ -272,7 +272,7 @@ function Ui() {
|
|
|
272
272
|
});
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function Ji() {
|
|
276
276
|
const e = k.getActiveEngine();
|
|
277
277
|
if (!e) return;
|
|
278
278
|
const t = e.instance.getAllSelected();
|
|
@@ -284,18 +284,18 @@ function qi() {
|
|
|
284
284
|
});
|
|
285
285
|
e.componentNode.createGroup(n);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Wi() {
|
|
288
288
|
const e = k.getActiveEngine();
|
|
289
289
|
if (!e) return;
|
|
290
290
|
const t = e.instance.getAllSelected(), n = Array.from(
|
|
291
291
|
t.reduce((i, c) => {
|
|
292
|
-
const
|
|
293
|
-
return
|
|
292
|
+
const o = c.getComponentNode();
|
|
293
|
+
return o.groupId && i.add(o.groupId), i;
|
|
294
294
|
}, /* @__PURE__ */ new Set())
|
|
295
295
|
);
|
|
296
296
|
e.componentNode.unlinkGroup(n), e.instance.unselectAll();
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Vi() {
|
|
299
299
|
const e = k.getActiveEngine();
|
|
300
300
|
if (!e) return;
|
|
301
301
|
const t = e.componentNode.getMaxLevel();
|
|
@@ -305,7 +305,7 @@ function Wi() {
|
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Gi() {
|
|
309
309
|
const e = k.getActiveEngine();
|
|
310
310
|
if (!e) return;
|
|
311
311
|
const t = e.componentNode.getMinLevel();
|
|
@@ -315,7 +315,7 @@ function Vi() {
|
|
|
315
315
|
});
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Xi() {
|
|
319
319
|
const e = k.getActiveEngine();
|
|
320
320
|
if (!e) return;
|
|
321
321
|
const t = e.componentNode.getMaxLevel();
|
|
@@ -326,7 +326,7 @@ function Gi() {
|
|
|
326
326
|
});
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Yi() {
|
|
330
330
|
const e = k.getActiveEngine();
|
|
331
331
|
if (!e) return;
|
|
332
332
|
const t = e.componentNode.getMinLevel();
|
|
@@ -337,12 +337,12 @@ function Xi() {
|
|
|
337
337
|
});
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function Zi() {
|
|
341
341
|
const e = k.getActiveEngine();
|
|
342
342
|
if (!e) return;
|
|
343
343
|
const t = Oe();
|
|
344
344
|
if (!t.length) {
|
|
345
|
-
|
|
345
|
+
A.warn("收藏组件不能为空");
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
348
|
const n = ut(), i = e.favorites.getAll().length;
|
|
@@ -350,25 +350,25 @@ function Yi() {
|
|
|
350
350
|
id: n,
|
|
351
351
|
name: `收藏${i + 1}`,
|
|
352
352
|
children: t,
|
|
353
|
-
gmtCreate:
|
|
353
|
+
gmtCreate: ki().format("YYYY-MM-DD HH:mm:ss")
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
function Oe() {
|
|
357
357
|
const e = k.getActiveEngine();
|
|
358
358
|
if (!e) return [];
|
|
359
359
|
const t = e.instance.getAllSelected();
|
|
360
|
-
return
|
|
360
|
+
return Qi(t.map((n) => n.id));
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Qi(e) {
|
|
363
363
|
const t = k.getActiveEngine();
|
|
364
364
|
if (!t) return [];
|
|
365
365
|
const n = Array.isArray(e) ? e : [e];
|
|
366
366
|
return Object.values(
|
|
367
367
|
n.reduce((i, c) => {
|
|
368
368
|
var d;
|
|
369
|
-
const
|
|
370
|
-
return
|
|
371
|
-
i[
|
|
369
|
+
const o = t.componentNode.get(c);
|
|
370
|
+
return o && (i[o.id] = o, (d = o == null ? void 0 : o.panels) != null && d.length && t.componentNode.getPanelComponentNodes(o, !0).forEach((a) => {
|
|
371
|
+
i[a.id] = a;
|
|
372
372
|
})), i;
|
|
373
373
|
}, {})
|
|
374
374
|
);
|
|
@@ -377,7 +377,7 @@ function O(e) {
|
|
|
377
377
|
setTimeout(async () => {
|
|
378
378
|
const t = k.getActiveEngine();
|
|
379
379
|
if (t) {
|
|
380
|
-
const n = await t.getJSON(), i =
|
|
380
|
+
const n = await t.getJSON(), i = Vt(n);
|
|
381
381
|
t.history.add(i, e);
|
|
382
382
|
}
|
|
383
383
|
});
|
|
@@ -394,7 +394,7 @@ function ot() {
|
|
|
394
394
|
const { data: t } = e.history.goForward() || {};
|
|
395
395
|
t && (t.config.currentMenu = e.config.getConfig().currentMenu, e.loadJSON(t));
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function pi(e) {
|
|
398
398
|
const t = k.getActiveEngine();
|
|
399
399
|
if (!t) return;
|
|
400
400
|
const { data: n } = t.history.go(e) || {};
|
|
@@ -403,8 +403,8 @@ function Qi(e) {
|
|
|
403
403
|
function Pe(e) {
|
|
404
404
|
return lt[e];
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
406
|
+
function el() {
|
|
407
|
+
zi({
|
|
408
408
|
backspace: () => {
|
|
409
409
|
at();
|
|
410
410
|
},
|
|
@@ -412,21 +412,21 @@ function pi() {
|
|
|
412
412
|
at();
|
|
413
413
|
},
|
|
414
414
|
"Shift + A": () => {
|
|
415
|
-
|
|
415
|
+
on();
|
|
416
416
|
},
|
|
417
417
|
left: (e) => {
|
|
418
|
-
e.preventDefault(),
|
|
418
|
+
e.preventDefault(), $i();
|
|
419
419
|
},
|
|
420
420
|
right: (e) => {
|
|
421
|
-
e.preventDefault(),
|
|
421
|
+
e.preventDefault(), Ri();
|
|
422
422
|
},
|
|
423
423
|
up: (e) => {
|
|
424
|
-
e.preventDefault(),
|
|
424
|
+
e.preventDefault(), Fi();
|
|
425
425
|
},
|
|
426
426
|
down: (e) => {
|
|
427
|
-
e.preventDefault(),
|
|
427
|
+
e.preventDefault(), Hi();
|
|
428
428
|
},
|
|
429
|
-
"Shift + C": () =>
|
|
429
|
+
"Shift + C": () => dn(),
|
|
430
430
|
"Shift + S": () => vt(),
|
|
431
431
|
"Shift + R": () => De(),
|
|
432
432
|
"Shift + Z": () => bt(),
|
|
@@ -434,23 +434,23 @@ function pi() {
|
|
|
434
434
|
"Shift + Ctrl + Z": () => ot()
|
|
435
435
|
});
|
|
436
436
|
}
|
|
437
|
-
const
|
|
438
|
-
page:
|
|
439
|
-
page_header:
|
|
440
|
-
page_body:
|
|
441
|
-
page_body_left:
|
|
442
|
-
page_body_main:
|
|
443
|
-
page_body_right:
|
|
444
|
-
},
|
|
445
|
-
header:
|
|
446
|
-
header_flex:
|
|
447
|
-
header_flex_btnContainer:
|
|
448
|
-
},
|
|
449
|
-
tooltipButton:
|
|
450
|
-
tooltipButton_hover:
|
|
451
|
-
tooltipButton_disabled:
|
|
437
|
+
const tl = "_page_1ijjl_59", nl = "_page_header_1ijjl_69", il = "_page_body_1ijjl_74", ll = "_page_body_left_1ijjl_79", cl = "_page_body_main_1ijjl_86", al = "_page_body_right_1ijjl_91", te = {
|
|
438
|
+
page: tl,
|
|
439
|
+
page_header: nl,
|
|
440
|
+
page_body: il,
|
|
441
|
+
page_body_left: ll,
|
|
442
|
+
page_body_main: cl,
|
|
443
|
+
page_body_right: al
|
|
444
|
+
}, ol = "_header_2phks_59", dl = "_header_flex_2phks_67", rl = "_header_flex_btnContainer_2phks_68", Ie = {
|
|
445
|
+
header: ol,
|
|
446
|
+
header_flex: dl,
|
|
447
|
+
header_flex_btnContainer: rl
|
|
448
|
+
}, sl = "_tooltipButton_tq7lx_59", ul = "_tooltipButton_hover_tq7lx_70", hl = "_tooltipButton_disabled_tq7lx_73", Fe = {
|
|
449
|
+
tooltipButton: sl,
|
|
450
|
+
tooltipButton_hover: ul,
|
|
451
|
+
tooltipButton_disabled: hl
|
|
452
452
|
};
|
|
453
|
-
function
|
|
453
|
+
function rn(e) {
|
|
454
454
|
return /* @__PURE__ */ l(z, { title: e == null ? void 0 : e.title, children: /* @__PURE__ */ l(
|
|
455
455
|
"div",
|
|
456
456
|
{
|
|
@@ -472,7 +472,7 @@ window._iconfont_svg_string_4790291 = '<svg><symbol id="icon-undo" viewBox="0 0
|
|
|
472
472
|
"data-injectcss"
|
|
473
473
|
), n = n.getAttribute("data-disable-injectsvg");
|
|
474
474
|
if (!n) {
|
|
475
|
-
var i, c,
|
|
475
|
+
var i, c, o, d, a, s = function(u, _) {
|
|
476
476
|
_.parentNode.insertBefore(u, _);
|
|
477
477
|
};
|
|
478
478
|
if (t && !e.__iconfont__svg__cssinject__) {
|
|
@@ -490,12 +490,12 @@ window._iconfont_svg_string_4790291 = '<svg><symbol id="icon-undo" viewBox="0 0
|
|
|
490
490
|
_.innerHTML = e._iconfont_svg_string_4790291, (_ = _.getElementsByTagName("svg")[0]) && (_.setAttribute("aria-hidden", "true"), _.style.position = "absolute", _.style.width = 0, _.style.height = 0, _.style.overflow = "hidden", _ = _, (u = document.body).firstChild ? s(_, u.firstChild) : u.appendChild(_));
|
|
491
491
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(i, 0) : (c = function() {
|
|
492
492
|
document.removeEventListener("DOMContentLoaded", c, !1), i();
|
|
493
|
-
}, document.addEventListener("DOMContentLoaded", c, !1)) : document.attachEvent && (
|
|
493
|
+
}, document.addEventListener("DOMContentLoaded", c, !1)) : document.attachEvent && (o = i, d = e.document, a = !1, h(), d.onreadystatechange = function() {
|
|
494
494
|
d.readyState == "complete" && (d.onreadystatechange = null, r());
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
497
|
function r() {
|
|
498
|
-
|
|
498
|
+
a || (a = !0, o());
|
|
499
499
|
}
|
|
500
500
|
function h() {
|
|
501
501
|
try {
|
|
@@ -509,11 +509,11 @@ window._iconfont_svg_string_4790291 = '<svg><symbol id="icon-undo" viewBox="0 0
|
|
|
509
509
|
function Nt(e) {
|
|
510
510
|
return /* @__PURE__ */ l("svg", { className: "icon", "aria-hidden": "true", children: /* @__PURE__ */ l("use", { xlinkHref: `#${e == null ? void 0 : e.type}` }) });
|
|
511
511
|
}
|
|
512
|
-
const
|
|
513
|
-
sizeBar:
|
|
514
|
-
},
|
|
515
|
-
inputNumberWithSuffix:
|
|
516
|
-
inputNumberWithSuffix_suffix:
|
|
512
|
+
const gl = "_sizeBar_1yvet_59", _l = {
|
|
513
|
+
sizeBar: gl
|
|
514
|
+
}, ml = "_inputNumberWithSuffix_1pwr4_59", fl = "_inputNumberWithSuffix_suffix_1pwr4_63", wt = {
|
|
515
|
+
inputNumberWithSuffix: ml,
|
|
516
|
+
inputNumberWithSuffix_suffix: fl
|
|
517
517
|
};
|
|
518
518
|
function Et(e) {
|
|
519
519
|
const { suffix: t, containerStyle: n, containerClassName: i, ...c } = e;
|
|
@@ -529,34 +529,34 @@ function Et(e) {
|
|
|
529
529
|
}
|
|
530
530
|
);
|
|
531
531
|
}
|
|
532
|
-
const
|
|
532
|
+
const yl = {
|
|
533
533
|
50: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "50%" }),
|
|
534
534
|
100: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "100%" }),
|
|
535
535
|
150: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "150%" }),
|
|
536
536
|
200: " "
|
|
537
537
|
};
|
|
538
|
-
function
|
|
539
|
-
const { value: t = 1, isCustom: n } = e, i = Ee(), c =
|
|
538
|
+
function vl(e) {
|
|
539
|
+
const { value: t = 1, isCustom: n } = e, i = Ee(), c = L(() => i.scaleMinZoom * 100, [i]), o = L(() => i.scaleMaxZoom * 100, [i]), d = L(() => i.scaleDefault * 100, [i]), a = L(() => Math.round(t * 100), [t]);
|
|
540
540
|
function s(r) {
|
|
541
541
|
var u;
|
|
542
542
|
const h = Math.round(Number(r)) / 100;
|
|
543
|
-
h !==
|
|
543
|
+
h !== a && ((u = e == null ? void 0 : e.onChange) == null || u.call(e, h));
|
|
544
544
|
}
|
|
545
545
|
return /* @__PURE__ */ l(
|
|
546
546
|
st,
|
|
547
547
|
{
|
|
548
548
|
content: /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 16 }, children: [
|
|
549
549
|
/* @__PURE__ */ l(
|
|
550
|
-
|
|
550
|
+
Qn,
|
|
551
551
|
{
|
|
552
552
|
style: { width: 250 },
|
|
553
553
|
min: c,
|
|
554
|
-
max: Math.max(
|
|
554
|
+
max: Math.max(o, a),
|
|
555
555
|
tooltip: {
|
|
556
556
|
formatter: (r) => `${r}%`
|
|
557
557
|
},
|
|
558
|
-
marks:
|
|
559
|
-
value:
|
|
558
|
+
marks: yl,
|
|
559
|
+
value: a,
|
|
560
560
|
onChange: s
|
|
561
561
|
}
|
|
562
562
|
),
|
|
@@ -566,7 +566,7 @@ function yl(e) {
|
|
|
566
566
|
{
|
|
567
567
|
min: c,
|
|
568
568
|
max: 1e3,
|
|
569
|
-
value:
|
|
569
|
+
value: a,
|
|
570
570
|
placeholder: "缩放值",
|
|
571
571
|
style: { fontSize: 12, width: 80 },
|
|
572
572
|
onChange: (r) => {
|
|
@@ -574,7 +574,7 @@ function yl(e) {
|
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
),
|
|
577
|
-
/* @__PURE__ */ l(
|
|
577
|
+
/* @__PURE__ */ l(rn, { noHoverClass: !0, title: "重置", children: /* @__PURE__ */ l(
|
|
578
578
|
Z,
|
|
579
579
|
{
|
|
580
580
|
className: "theme-color icon_clickable",
|
|
@@ -586,15 +586,15 @@ function yl(e) {
|
|
|
586
586
|
] })
|
|
587
587
|
] }),
|
|
588
588
|
children: /* @__PURE__ */ g("span", { style: { cursor: "pointer" }, children: [
|
|
589
|
-
/* @__PURE__ */ l("span", { style: { marginRight: 4 }, children: `${
|
|
590
|
-
/* @__PURE__ */ l(
|
|
589
|
+
/* @__PURE__ */ l("span", { style: { marginRight: 4 }, children: `${a}%` }),
|
|
590
|
+
/* @__PURE__ */ l(Sn, {})
|
|
591
591
|
] })
|
|
592
592
|
}
|
|
593
593
|
);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
const e = Ee(), { engine: t } =
|
|
597
|
-
return /* @__PURE__ */ g("div", { className:
|
|
595
|
+
function bl() {
|
|
596
|
+
const e = Ee(), { engine: t } = w();
|
|
597
|
+
return /* @__PURE__ */ g("div", { className: _l.sizeBar, id: "rbs-sizebar", children: [
|
|
598
598
|
/* @__PURE__ */ l(
|
|
599
599
|
Et,
|
|
600
600
|
{
|
|
@@ -607,7 +607,7 @@ function vl() {
|
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
),
|
|
610
|
-
/* @__PURE__ */ l(
|
|
610
|
+
/* @__PURE__ */ l(Nn, { style: { fontSize: 10 } }),
|
|
611
611
|
/* @__PURE__ */ l(
|
|
612
612
|
Et,
|
|
613
613
|
{
|
|
@@ -621,7 +621,7 @@ function vl() {
|
|
|
621
621
|
}
|
|
622
622
|
),
|
|
623
623
|
/* @__PURE__ */ l(
|
|
624
|
-
|
|
624
|
+
vl,
|
|
625
625
|
{
|
|
626
626
|
value: e.scale,
|
|
627
627
|
onChange: (n) => {
|
|
@@ -633,7 +633,7 @@ function vl() {
|
|
|
633
633
|
)
|
|
634
634
|
] });
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function B({ children: e }) {
|
|
637
637
|
return /* @__PURE__ */ l(
|
|
638
638
|
"div",
|
|
639
639
|
{
|
|
@@ -652,7 +652,7 @@ function P({ children: e }) {
|
|
|
652
652
|
}
|
|
653
653
|
);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Cl() {
|
|
656
656
|
const [e] = se();
|
|
657
657
|
return /* @__PURE__ */ g(
|
|
658
658
|
D,
|
|
@@ -666,36 +666,36 @@ function bl() {
|
|
|
666
666
|
e("head.shortCutKeys.all"),
|
|
667
667
|
":"
|
|
668
668
|
] }),
|
|
669
|
-
/* @__PURE__ */ l(
|
|
669
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
670
670
|
/* @__PURE__ */ l("span", { children: "+" }),
|
|
671
|
-
/* @__PURE__ */ l(
|
|
671
|
+
/* @__PURE__ */ l(B, { children: "A" })
|
|
672
672
|
] }),
|
|
673
673
|
/* @__PURE__ */ g(D, { children: [
|
|
674
674
|
/* @__PURE__ */ g("span", { children: [
|
|
675
675
|
e("head.shortCutKeys.invert"),
|
|
676
676
|
":"
|
|
677
677
|
] }),
|
|
678
|
-
/* @__PURE__ */ l(
|
|
678
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
679
679
|
/* @__PURE__ */ l("span", { children: "+" }),
|
|
680
|
-
/* @__PURE__ */ l(
|
|
680
|
+
/* @__PURE__ */ l(B, { children: "R" })
|
|
681
681
|
] }),
|
|
682
682
|
/* @__PURE__ */ g(D, { children: [
|
|
683
683
|
/* @__PURE__ */ g("span", { children: [
|
|
684
684
|
e("head.shortCutKeys.copy"),
|
|
685
685
|
":"
|
|
686
686
|
] }),
|
|
687
|
-
/* @__PURE__ */ l(
|
|
687
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
688
688
|
/* @__PURE__ */ l("span", { children: "+" }),
|
|
689
|
-
/* @__PURE__ */ l(
|
|
689
|
+
/* @__PURE__ */ l(B, { children: "C" })
|
|
690
690
|
] }),
|
|
691
691
|
/* @__PURE__ */ g(D, { children: [
|
|
692
692
|
/* @__PURE__ */ g("span", { children: [
|
|
693
693
|
e("head.shortCutKeys.save"),
|
|
694
694
|
":"
|
|
695
695
|
] }),
|
|
696
|
-
/* @__PURE__ */ l(
|
|
696
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
697
697
|
/* @__PURE__ */ l("span", { children: "+" }),
|
|
698
|
-
/* @__PURE__ */ l(
|
|
698
|
+
/* @__PURE__ */ l(B, { children: "S" })
|
|
699
699
|
] }),
|
|
700
700
|
/* @__PURE__ */ g(D, { children: [
|
|
701
701
|
/* @__PURE__ */ g("span", { children: [
|
|
@@ -703,7 +703,7 @@ function bl() {
|
|
|
703
703
|
":"
|
|
704
704
|
] }),
|
|
705
705
|
/* @__PURE__ */ l("span", { children: e("head.shortCutKeys.multipleExt.ext1") }),
|
|
706
|
-
/* @__PURE__ */ l(
|
|
706
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
707
707
|
/* @__PURE__ */ l("span", { children: e("head.shortCutKeys.multipleExt.ext2") })
|
|
708
708
|
] }),
|
|
709
709
|
/* @__PURE__ */ g(D, { children: [
|
|
@@ -711,23 +711,23 @@ function bl() {
|
|
|
711
711
|
e("head.shortCutKeys.delete"),
|
|
712
712
|
":"
|
|
713
713
|
] }),
|
|
714
|
-
/* @__PURE__ */ l(
|
|
714
|
+
/* @__PURE__ */ l(B, { children: "BackSpace" }),
|
|
715
715
|
/* @__PURE__ */ g("span", { children: [
|
|
716
716
|
" ",
|
|
717
717
|
e("head.shortCutKeys.deleteExt.ext1"),
|
|
718
718
|
" "
|
|
719
719
|
] }),
|
|
720
|
-
/* @__PURE__ */ l(
|
|
720
|
+
/* @__PURE__ */ l(B, { children: "Delete" })
|
|
721
721
|
] }),
|
|
722
722
|
/* @__PURE__ */ g(D, { children: [
|
|
723
723
|
/* @__PURE__ */ g("span", { children: [
|
|
724
724
|
e("head.shortCutKeys.move"),
|
|
725
725
|
":"
|
|
726
726
|
] }),
|
|
727
|
-
/* @__PURE__ */ l(
|
|
728
|
-
/* @__PURE__ */ l(
|
|
729
|
-
/* @__PURE__ */ l(
|
|
730
|
-
/* @__PURE__ */ l(
|
|
727
|
+
/* @__PURE__ */ l(B, { children: /* @__PURE__ */ l(et, {}) }),
|
|
728
|
+
/* @__PURE__ */ l(B, { children: /* @__PURE__ */ l(wn, {}) }),
|
|
729
|
+
/* @__PURE__ */ l(B, { children: /* @__PURE__ */ l(tt, {}) }),
|
|
730
|
+
/* @__PURE__ */ l(B, { children: /* @__PURE__ */ l(En, {}) })
|
|
731
731
|
] }),
|
|
732
732
|
/* @__PURE__ */ g(D, { children: [
|
|
733
733
|
/* @__PURE__ */ g("span", { children: [
|
|
@@ -735,7 +735,7 @@ function bl() {
|
|
|
735
735
|
":"
|
|
736
736
|
] }),
|
|
737
737
|
/* @__PURE__ */ l("span", { children: e("head.shortCutKeys.forceExt.ext1") }),
|
|
738
|
-
/* @__PURE__ */ l(
|
|
738
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
739
739
|
/* @__PURE__ */ l("span", { children: e("head.shortCutKeys.forceExt.ext2") })
|
|
740
740
|
] }),
|
|
741
741
|
/* @__PURE__ */ g(D, { children: [
|
|
@@ -743,27 +743,27 @@ function bl() {
|
|
|
743
743
|
e("head.shortCutKeys.undo"),
|
|
744
744
|
":"
|
|
745
745
|
] }),
|
|
746
|
-
/* @__PURE__ */ l(
|
|
746
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
747
747
|
/* @__PURE__ */ l("span", { children: "+" }),
|
|
748
|
-
/* @__PURE__ */ l(
|
|
748
|
+
/* @__PURE__ */ l(B, { children: "Z" })
|
|
749
749
|
] }),
|
|
750
750
|
/* @__PURE__ */ g(D, { children: [
|
|
751
751
|
/* @__PURE__ */ g("span", { children: [
|
|
752
752
|
e("head.shortCutKeys.cancelUndo"),
|
|
753
753
|
":"
|
|
754
754
|
] }),
|
|
755
|
-
/* @__PURE__ */ l(
|
|
755
|
+
/* @__PURE__ */ l(B, { children: "Shift" }),
|
|
756
756
|
/* @__PURE__ */ l("span", { children: "+" }),
|
|
757
|
-
/* @__PURE__ */ l(
|
|
757
|
+
/* @__PURE__ */ l(B, { children: "Ctrl / Command" }),
|
|
758
758
|
/* @__PURE__ */ l("span", { children: "+" }),
|
|
759
|
-
/* @__PURE__ */ l(
|
|
759
|
+
/* @__PURE__ */ l(B, { children: "Z" })
|
|
760
760
|
] }),
|
|
761
761
|
/* @__PURE__ */ g(D, { children: [
|
|
762
762
|
/* @__PURE__ */ g("span", { children: [
|
|
763
763
|
e("head.shortCutKeys.zoom"),
|
|
764
764
|
":"
|
|
765
765
|
] }),
|
|
766
|
-
/* @__PURE__ */ l(
|
|
766
|
+
/* @__PURE__ */ l(B, { children: /* @__PURE__ */ g(D, { children: [
|
|
767
767
|
/* @__PURE__ */ l("span", { children: e("head.shortCutKeys.zoomExt.ext1") }),
|
|
768
768
|
/* @__PURE__ */ l(et, {}),
|
|
769
769
|
/* @__PURE__ */ l("span", { children: "/" }),
|
|
@@ -775,7 +775,7 @@ function bl() {
|
|
|
775
775
|
e("head.shortCutKeys.zoomReset"),
|
|
776
776
|
":"
|
|
777
777
|
] }),
|
|
778
|
-
/* @__PURE__ */ l(
|
|
778
|
+
/* @__PURE__ */ l(B, { children: e("head.shortCutKeys.zoomResetExt.ext1") })
|
|
779
779
|
] }),
|
|
780
780
|
/* @__PURE__ */ g(D, { children: [
|
|
781
781
|
/* @__PURE__ */ g("span", { children: [
|
|
@@ -783,26 +783,26 @@ function bl() {
|
|
|
783
783
|
":"
|
|
784
784
|
] }),
|
|
785
785
|
/* @__PURE__ */ l("span", { children: e("head.shortCutKeys.dragCanvasExt.ext1") }),
|
|
786
|
-
/* @__PURE__ */ l(
|
|
786
|
+
/* @__PURE__ */ l(B, { children: "Space" }),
|
|
787
787
|
/* @__PURE__ */ l("span", { children: e("head.shortCutKeys.dragCanvas") })
|
|
788
788
|
] })
|
|
789
789
|
]
|
|
790
790
|
}
|
|
791
791
|
);
|
|
792
792
|
}
|
|
793
|
-
const
|
|
794
|
-
function
|
|
793
|
+
const xl = ["rbs-screen.top"];
|
|
794
|
+
function Il(e = window.location.host) {
|
|
795
795
|
const t = e == null ? void 0 : e.toLowerCase();
|
|
796
|
-
return
|
|
796
|
+
return xl.some((n) => {
|
|
797
797
|
var i, c;
|
|
798
798
|
return (c = t == null ? void 0 : t.includes) == null ? void 0 : c.call(t, (i = n == null ? void 0 : n.toLowerCase) == null ? void 0 : i.call(n));
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
|
-
const
|
|
801
|
+
const kl = (e, t, n) => {
|
|
802
802
|
const i = e[t];
|
|
803
|
-
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((c,
|
|
803
|
+
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((c, o) => {
|
|
804
804
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
805
|
-
|
|
805
|
+
o.bind(
|
|
806
806
|
null,
|
|
807
807
|
new Error(
|
|
808
808
|
"Unknown variable dynamic import: " + t + (t.split("/").length !== n ? ". Note that variables only represent file names one level deep." : "")
|
|
@@ -811,12 +811,12 @@ const Il = (e, t, n) => {
|
|
|
811
811
|
);
|
|
812
812
|
});
|
|
813
813
|
};
|
|
814
|
-
async function
|
|
814
|
+
async function Sl(e) {
|
|
815
815
|
var i;
|
|
816
|
-
const t = await
|
|
816
|
+
const t = await kl(/* @__PURE__ */ Object.assign({ "../../../../../../public/example/classic.json": () => import("./index-Cr2RXjtr.mjs").then((c) => c.r), "../../../../../../public/example/multiple-components-interactive.json": () => import("./index-Cr2RXjtr.mjs").then((c) => c.t) }), `../../../../../../public/example/${e}.json`, 9), n = k.getActiveEngine();
|
|
817
817
|
(i = n == null ? void 0 : n.loadJSON) == null || i.call(n, t);
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function Nl() {
|
|
820
820
|
return /* @__PURE__ */ l(
|
|
821
821
|
be,
|
|
822
822
|
{
|
|
@@ -829,14 +829,14 @@ function Sl() {
|
|
|
829
829
|
}
|
|
830
830
|
],
|
|
831
831
|
onClick({ key: e }) {
|
|
832
|
-
|
|
832
|
+
Sl(e);
|
|
833
833
|
}
|
|
834
834
|
},
|
|
835
835
|
children: /* @__PURE__ */ l(K, { size: "small", style: { fontSize: 12 }, id: "rbs-choose-example-button", children: "切换示例" })
|
|
836
836
|
}
|
|
837
837
|
);
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function wl() {
|
|
840
840
|
return /* @__PURE__ */ l(
|
|
841
841
|
K,
|
|
842
842
|
{
|
|
@@ -844,50 +844,54 @@ function Nl() {
|
|
|
844
844
|
style: { fontSize: 12 },
|
|
845
845
|
id: "rbs-starter-help",
|
|
846
846
|
onClick: () => {
|
|
847
|
-
|
|
847
|
+
ci(!0);
|
|
848
848
|
},
|
|
849
849
|
children: "新手教程"
|
|
850
850
|
}
|
|
851
851
|
);
|
|
852
852
|
}
|
|
853
|
-
const
|
|
854
|
-
function
|
|
855
|
-
const { pageLogo: t, pageToolBar: n } = e, {
|
|
853
|
+
const El = "rbs-tool-bar", At = "rbs-preview", Al = Il();
|
|
854
|
+
function Ll(e) {
|
|
855
|
+
const { pageLogo: t, pageToolBar: n } = e, { showLanguage: i = !0, showPreview: c = !0, showSave: o = !0 } = (e == null ? void 0 : e.toolBarOptions) || {}, { engine: d, rbsEngine: a } = w(), [s, r] = se(), h = an(), u = r.language === ai.zh, _ = L(() => [
|
|
856
856
|
{
|
|
857
857
|
key: "shortCutKeys",
|
|
858
|
-
description: /* @__PURE__ */ l(
|
|
859
|
-
icon: /* @__PURE__ */ l(
|
|
858
|
+
description: /* @__PURE__ */ l(Cl, {}),
|
|
859
|
+
icon: /* @__PURE__ */ l(An, {})
|
|
860
860
|
},
|
|
861
861
|
{
|
|
862
862
|
key: "undo",
|
|
863
|
-
description:
|
|
864
|
-
disabled: !
|
|
863
|
+
description: s("head.undo"),
|
|
864
|
+
disabled: !h.isCanGoBack,
|
|
865
865
|
icon: /* @__PURE__ */ l(Nt, { type: "icon-undo" })
|
|
866
866
|
},
|
|
867
867
|
{
|
|
868
868
|
key: "cancelUndo",
|
|
869
|
-
description:
|
|
870
|
-
disabled: !
|
|
869
|
+
description: s("head.cancelUndo"),
|
|
870
|
+
disabled: !h.isCanGoForward,
|
|
871
871
|
icon: /* @__PURE__ */ l(Nt, { type: "icon-cancel-undo" })
|
|
872
872
|
},
|
|
873
|
-
{ key: "export", description:
|
|
874
|
-
{ key: "import", description:
|
|
875
|
-
{ key: "clear", description:
|
|
876
|
-
{
|
|
873
|
+
{ key: "export", description: s("head.export"), icon: /* @__PURE__ */ l(Ln, {}) },
|
|
874
|
+
{ key: "import", description: s("head.import"), icon: /* @__PURE__ */ l(Rt, {}) },
|
|
875
|
+
{ key: "clear", description: s("head.clear"), icon: /* @__PURE__ */ l(Ft, {}) },
|
|
876
|
+
i && {
|
|
877
877
|
key: "language",
|
|
878
|
-
description:
|
|
879
|
-
icon: /* @__PURE__ */ l(
|
|
878
|
+
description: s("head.language", { text: `${u ? "切换英语" : "change chinese"}` }),
|
|
879
|
+
icon: /* @__PURE__ */ l(Dn, {})
|
|
880
880
|
},
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
881
|
+
o && {
|
|
882
|
+
key: "save",
|
|
883
|
+
description: s("head.save"),
|
|
884
|
+
icon: /* @__PURE__ */ l(Q, {})
|
|
885
|
+
}
|
|
886
|
+
].filter(Boolean), [r.language, h.isCanGoForward, h.isCanGoBack, i, o]);
|
|
887
|
+
function m() {
|
|
884
888
|
window.open("https://github.com/tangjiahui-cn/react-big-screen.git");
|
|
885
889
|
}
|
|
886
|
-
async function
|
|
887
|
-
|
|
890
|
+
async function v() {
|
|
891
|
+
a == null || a.emit("startPreview", d);
|
|
888
892
|
}
|
|
889
|
-
function
|
|
890
|
-
switch (
|
|
893
|
+
function C(f) {
|
|
894
|
+
switch (f.key) {
|
|
891
895
|
case "undo":
|
|
892
896
|
bt();
|
|
893
897
|
break;
|
|
@@ -895,92 +899,92 @@ function El(e) {
|
|
|
895
899
|
ot();
|
|
896
900
|
break;
|
|
897
901
|
case "export":
|
|
898
|
-
|
|
899
|
-
const
|
|
900
|
-
|
|
902
|
+
d.getJSON().then((S) => {
|
|
903
|
+
const P = JSON.stringify(S);
|
|
904
|
+
Jt(P, "大屏看板.json");
|
|
901
905
|
});
|
|
902
906
|
break;
|
|
903
907
|
case "import":
|
|
904
|
-
|
|
905
|
-
if (!
|
|
906
|
-
return
|
|
908
|
+
Li().then((S) => {
|
|
909
|
+
if (!S)
|
|
910
|
+
return A.warn("文件内容不能为空");
|
|
907
911
|
try {
|
|
908
|
-
const
|
|
909
|
-
|
|
912
|
+
const P = JSON.parse(S);
|
|
913
|
+
d.loadJSON(P);
|
|
910
914
|
} catch {
|
|
911
|
-
|
|
915
|
+
A.error("请上传json格式文件");
|
|
912
916
|
}
|
|
913
917
|
});
|
|
914
918
|
break;
|
|
915
919
|
case "preview":
|
|
916
|
-
|
|
920
|
+
v();
|
|
917
921
|
break;
|
|
918
922
|
case "save":
|
|
919
923
|
vt();
|
|
920
924
|
break;
|
|
921
925
|
case "clear":
|
|
922
|
-
|
|
926
|
+
d.clear();
|
|
923
927
|
break;
|
|
924
928
|
case "settings":
|
|
925
929
|
break;
|
|
926
930
|
case "language":
|
|
927
|
-
const
|
|
928
|
-
|
|
931
|
+
const x = u ? "en" : "zh";
|
|
932
|
+
oi(x), d.config.setConfig({ language: x });
|
|
929
933
|
break;
|
|
930
934
|
}
|
|
931
935
|
}
|
|
932
|
-
const
|
|
936
|
+
const b = /* @__PURE__ */ g("div", { className: Ie.header_flex, children: [
|
|
933
937
|
/* @__PURE__ */ l("b", { children: "BigScreen" }),
|
|
934
|
-
!
|
|
935
|
-
] }),
|
|
936
|
-
|
|
937
|
-
|
|
938
|
+
!Al && /* @__PURE__ */ l(On, { style: { cursor: "pointer", fontSize: 16 }, onClick: m })
|
|
939
|
+
] }), I = /* @__PURE__ */ g(W, { children: [
|
|
940
|
+
_.map((f) => /* @__PURE__ */ l(
|
|
941
|
+
rn,
|
|
938
942
|
{
|
|
939
|
-
disabled:
|
|
940
|
-
title:
|
|
941
|
-
onClick: () =>
|
|
942
|
-
children:
|
|
943
|
+
disabled: f == null ? void 0 : f.disabled,
|
|
944
|
+
title: f.description,
|
|
945
|
+
onClick: () => C(f),
|
|
946
|
+
children: f == null ? void 0 : f.icon
|
|
943
947
|
},
|
|
944
|
-
|
|
948
|
+
f.key
|
|
945
949
|
)),
|
|
946
|
-
/* @__PURE__ */ l(
|
|
950
|
+
c && /* @__PURE__ */ l(
|
|
947
951
|
K,
|
|
948
952
|
{
|
|
949
953
|
type: "primary",
|
|
950
954
|
size: "small",
|
|
951
955
|
style: { fontSize: 12 },
|
|
952
|
-
id:
|
|
953
|
-
onClick:
|
|
956
|
+
id: At,
|
|
957
|
+
onClick: v,
|
|
954
958
|
children: "开始预览"
|
|
955
959
|
}
|
|
956
960
|
)
|
|
957
|
-
] }),
|
|
961
|
+
] }), y = n ? typeof n == "function" ? /* @__PURE__ */ l(n, { origin: I, previewDriverId: At }) : n : I;
|
|
958
962
|
return /* @__PURE__ */ g("div", { className: Ie.header, children: [
|
|
959
|
-
t ? typeof t == "function" ? /* @__PURE__ */ l(t, {}) : t :
|
|
960
|
-
/* @__PURE__ */ l(
|
|
963
|
+
t ? typeof t == "function" ? /* @__PURE__ */ l(t, {}) : t : b,
|
|
964
|
+
/* @__PURE__ */ l(bl, {}),
|
|
961
965
|
/* @__PURE__ */ g("div", { className: Ie.header_flex, children: [
|
|
962
|
-
/* @__PURE__ */ l(Sl, {}),
|
|
963
966
|
/* @__PURE__ */ l(Nl, {}),
|
|
964
|
-
/* @__PURE__ */ l(
|
|
967
|
+
/* @__PURE__ */ l(wl, {}),
|
|
968
|
+
/* @__PURE__ */ l("div", { className: Ie.header_flex_btnContainer, id: El, children: y })
|
|
965
969
|
] })
|
|
966
970
|
] });
|
|
967
971
|
}
|
|
968
|
-
const
|
|
969
|
-
menu:
|
|
970
|
-
menu_bar:
|
|
971
|
-
menu_main:
|
|
972
|
-
},
|
|
973
|
-
library:
|
|
974
|
-
library_header:
|
|
975
|
-
library_main:
|
|
976
|
-
},
|
|
977
|
-
componentsBlock:
|
|
978
|
-
},
|
|
979
|
-
componentItem:
|
|
980
|
-
componentItem_body:
|
|
981
|
-
componentItem_footer:
|
|
972
|
+
const Dl = "_menu_1ueks_59", Ol = "_menu_bar_1ueks_68", Pl = "_menu_main_1ueks_72", He = {
|
|
973
|
+
menu: Dl,
|
|
974
|
+
menu_bar: Ol,
|
|
975
|
+
menu_main: Pl
|
|
976
|
+
}, Bl = "_library_11n9v_59", Ml = "_library_header_11n9v_72", jl = "_library_main_11n9v_83", Ke = {
|
|
977
|
+
library: Bl,
|
|
978
|
+
library_header: Ml,
|
|
979
|
+
library_main: jl
|
|
980
|
+
}, Tl = "_componentsBlock_mx05c_59", zl = {
|
|
981
|
+
componentsBlock: Tl
|
|
982
|
+
}, $l = "_componentItem_1a82r_59", Rl = "_componentItem_body_1a82r_71", Fl = "_componentItem_footer_1a82r_80", Ue = {
|
|
983
|
+
componentItem: $l,
|
|
984
|
+
componentItem_body: Rl,
|
|
985
|
+
componentItem_footer: Fl
|
|
982
986
|
};
|
|
983
|
-
class
|
|
987
|
+
class Hl {
|
|
984
988
|
constructor() {
|
|
985
989
|
// style tag.
|
|
986
990
|
ee(this, "style");
|
|
@@ -997,29 +1001,29 @@ class Rl {
|
|
|
997
1001
|
!this.style || --this.count > 0 || (this.count = 0, this.style.remove(), this.style = void 0);
|
|
998
1002
|
}
|
|
999
1003
|
}
|
|
1000
|
-
const
|
|
1001
|
-
function
|
|
1004
|
+
const Lt = new Hl();
|
|
1005
|
+
function Kl(e, t) {
|
|
1002
1006
|
let n = !1;
|
|
1003
1007
|
e.addEventListener("mousedown", c);
|
|
1004
|
-
function i(
|
|
1008
|
+
function i(a) {
|
|
1005
1009
|
var s;
|
|
1006
|
-
n || (n = !0, (s = t == null ? void 0 : t.onStart) == null || s.call(t,
|
|
1010
|
+
n || (n = !0, (s = t == null ? void 0 : t.onStart) == null || s.call(t, a, { isDragging: n }));
|
|
1007
1011
|
}
|
|
1008
1012
|
function c() {
|
|
1009
|
-
e.addEventListener("mousemove", i), window.addEventListener("mouseup",
|
|
1013
|
+
e.addEventListener("mousemove", i), window.addEventListener("mouseup", o);
|
|
1010
1014
|
}
|
|
1011
|
-
function a
|
|
1015
|
+
function o(a) {
|
|
1012
1016
|
var s;
|
|
1013
|
-
(s = t == null ? void 0 : t.onEnd) == null || s.call(t,
|
|
1017
|
+
(s = t == null ? void 0 : t.onEnd) == null || s.call(t, a, { isDragging: n }), d();
|
|
1014
1018
|
}
|
|
1015
1019
|
function d() {
|
|
1016
|
-
n = !1, e.removeEventListener("mousemove", i), window.removeEventListener("mouseup",
|
|
1020
|
+
n = !1, e.removeEventListener("mousemove", i), window.removeEventListener("mouseup", o);
|
|
1017
1021
|
}
|
|
1018
1022
|
return () => {
|
|
1019
1023
|
d(), e.removeEventListener("mousedown", c);
|
|
1020
1024
|
};
|
|
1021
1025
|
}
|
|
1022
|
-
class
|
|
1026
|
+
class Ul {
|
|
1023
1027
|
constructor() {
|
|
1024
1028
|
ee(this, "isDragging", !1);
|
|
1025
1029
|
ee(this, "dragOptions", {
|
|
@@ -1068,29 +1072,29 @@ class Hl {
|
|
|
1068
1072
|
return this.dragOptions;
|
|
1069
1073
|
}
|
|
1070
1074
|
}
|
|
1071
|
-
const ce = new
|
|
1072
|
-
function
|
|
1073
|
-
const n =
|
|
1074
|
-
n.current = t,
|
|
1075
|
+
const ce = new Ul();
|
|
1076
|
+
function sn(e, t) {
|
|
1077
|
+
const n = j(t);
|
|
1078
|
+
n.current = t, E(() => {
|
|
1075
1079
|
const i = e.current;
|
|
1076
1080
|
if (!i) {
|
|
1077
1081
|
console.warn("dom must be set.");
|
|
1078
1082
|
return;
|
|
1079
1083
|
}
|
|
1080
|
-
const c =
|
|
1084
|
+
const c = Kl(i, {
|
|
1081
1085
|
onStart() {
|
|
1082
|
-
|
|
1086
|
+
Lt.mount(), document.documentElement.classList.add("is-dragging"), ce.setDragOptions(n.current), ce.setIsDragging(!0);
|
|
1083
1087
|
},
|
|
1084
1088
|
onEnd() {
|
|
1085
|
-
|
|
1089
|
+
Lt.unmount(), document.documentElement.classList.remove("is-dragging"), ce.setDragOptions(n.current), ce.setIsDragging(!1);
|
|
1086
1090
|
}
|
|
1087
1091
|
});
|
|
1088
1092
|
return () => c();
|
|
1089
1093
|
}, []);
|
|
1090
1094
|
}
|
|
1091
|
-
function
|
|
1092
|
-
const n =
|
|
1093
|
-
n.current = t,
|
|
1095
|
+
function un(e, t) {
|
|
1096
|
+
const n = j(t);
|
|
1097
|
+
n.current = t, E(() => {
|
|
1094
1098
|
const { accept: i } = t;
|
|
1095
1099
|
if (i && !Array.isArray(i))
|
|
1096
1100
|
throw new Error("accept must be a string array.");
|
|
@@ -1099,21 +1103,21 @@ function sn(e, t) {
|
|
|
1099
1103
|
console.warn("dom must be set.");
|
|
1100
1104
|
return;
|
|
1101
1105
|
}
|
|
1102
|
-
const
|
|
1106
|
+
const o = (d) => {
|
|
1103
1107
|
var s, r, h;
|
|
1104
1108
|
if (!ce.getIsDragging())
|
|
1105
1109
|
return;
|
|
1106
|
-
const
|
|
1107
|
-
i && !((s = i == null ? void 0 : i.includes) != null && s.call(i,
|
|
1110
|
+
const a = ce.getDragOptions();
|
|
1111
|
+
i && !((s = i == null ? void 0 : i.includes) != null && s.call(i, a.type || "")) || (h = (r = n.current) == null ? void 0 : r.onDrop) == null || h.call(r, d, a);
|
|
1108
1112
|
};
|
|
1109
|
-
return c.addEventListener("mouseup",
|
|
1110
|
-
c.removeEventListener("mouseup",
|
|
1113
|
+
return c.addEventListener("mouseup", o), () => {
|
|
1114
|
+
c.removeEventListener("mouseup", o);
|
|
1111
1115
|
};
|
|
1112
1116
|
}, []);
|
|
1113
1117
|
}
|
|
1114
1118
|
function xe(e) {
|
|
1115
|
-
const { src: t } = e, [n, i] =
|
|
1116
|
-
return
|
|
1119
|
+
const { src: t } = e, [n, i] = N("");
|
|
1120
|
+
return E(() => {
|
|
1117
1121
|
switch (typeof t) {
|
|
1118
1122
|
case "string":
|
|
1119
1123
|
i(t);
|
|
@@ -1126,9 +1130,9 @@ function xe(e) {
|
|
|
1126
1130
|
}
|
|
1127
1131
|
}, [t]), t ? /* @__PURE__ */ l("img", { style: e == null ? void 0 : e.style, src: n, draggable: !1 }) : /* @__PURE__ */ l("span", { style: { color: "#b8b8b8" }, children: "None" });
|
|
1128
1132
|
}
|
|
1129
|
-
function
|
|
1130
|
-
const { component: t } = e, n =
|
|
1131
|
-
return
|
|
1133
|
+
function ql(e) {
|
|
1134
|
+
const { component: t } = e, n = j(null);
|
|
1135
|
+
return sn(n, {
|
|
1132
1136
|
type: "create-component",
|
|
1133
1137
|
data: {
|
|
1134
1138
|
component: t
|
|
@@ -1146,18 +1150,18 @@ function Kl(e) {
|
|
|
1146
1150
|
}
|
|
1147
1151
|
);
|
|
1148
1152
|
}
|
|
1149
|
-
function
|
|
1150
|
-
var
|
|
1151
|
-
const { components: t, column: n = 3 } = e, { width: i, lines: c } =
|
|
1153
|
+
function Jl(e) {
|
|
1154
|
+
var o;
|
|
1155
|
+
const { components: t, column: n = 3 } = e, { width: i, lines: c } = L(() => ({
|
|
1152
1156
|
width: `${100 / n}%`,
|
|
1153
1157
|
lines: Math.ceil(t.length / n)
|
|
1154
1158
|
}), [t, n]);
|
|
1155
|
-
return /* @__PURE__ */ g("div", { className:
|
|
1159
|
+
return /* @__PURE__ */ g("div", { className: zl.componentsBlock, children: [
|
|
1156
1160
|
!(t != null && t.length) && /* @__PURE__ */ l(U, { description: "暂无组件" }),
|
|
1157
|
-
(
|
|
1158
|
-
const s =
|
|
1161
|
+
(o = t == null ? void 0 : t.map) == null ? void 0 : o.call(t, (d, a) => {
|
|
1162
|
+
const s = a % n === n - 1, r = c === 1 || a > (c - 1) * n - 1;
|
|
1159
1163
|
return /* @__PURE__ */ l(
|
|
1160
|
-
|
|
1164
|
+
ql,
|
|
1161
1165
|
{
|
|
1162
1166
|
component: d,
|
|
1163
1167
|
style: {
|
|
@@ -1171,43 +1175,43 @@ function Ul(e) {
|
|
|
1171
1175
|
})
|
|
1172
1176
|
] });
|
|
1173
1177
|
}
|
|
1174
|
-
function
|
|
1178
|
+
function Dt(e, t = "") {
|
|
1175
1179
|
if (!t) return e;
|
|
1176
1180
|
const n = t.toLowerCase();
|
|
1177
1181
|
return e.filter((i) => i.cName.toLowerCase().includes(n) || i.cId.toLowerCase().includes(n));
|
|
1178
1182
|
}
|
|
1179
|
-
function
|
|
1180
|
-
const [e, t] = se(), [n, i] =
|
|
1183
|
+
function Wl() {
|
|
1184
|
+
const [e, t] = se(), [n, i] = N([]), c = Pi(), [o, d] = N(""), [a, s] = N([]), r = L(() => ({
|
|
1181
1185
|
base: e("menu.library.base"),
|
|
1182
1186
|
charts: e("menu.library.charts"),
|
|
1183
1187
|
layout: e("menu.library.layout"),
|
|
1184
1188
|
nav: e("menu.library.nav"),
|
|
1185
1189
|
unknown: e("menu.library.unknown")
|
|
1186
|
-
}), [t.language]), h =
|
|
1187
|
-
const v =
|
|
1190
|
+
}), [t.language]), h = L(() => hi((_, m = "") => {
|
|
1191
|
+
const v = Dt(_, m);
|
|
1188
1192
|
s(v);
|
|
1189
1193
|
}, 500), []);
|
|
1190
|
-
|
|
1191
|
-
s(
|
|
1194
|
+
E(() => {
|
|
1195
|
+
s(Dt(c, o));
|
|
1192
1196
|
}, [c]), _t(() => {
|
|
1193
|
-
h(c,
|
|
1194
|
-
}, [
|
|
1195
|
-
const u =
|
|
1197
|
+
h(c, o);
|
|
1198
|
+
}, [o]);
|
|
1199
|
+
const u = L(() => {
|
|
1196
1200
|
const _ = [], m = Object.entries(
|
|
1197
|
-
|
|
1201
|
+
gi(a, (v) => v.category || "unknown")
|
|
1198
1202
|
).map(([v, C]) => (_.push(v), {
|
|
1199
1203
|
key: v,
|
|
1200
1204
|
components: C,
|
|
1201
1205
|
label: r[v] || v
|
|
1202
1206
|
}));
|
|
1203
1207
|
return i(_), m;
|
|
1204
|
-
}, [
|
|
1208
|
+
}, [a, r]);
|
|
1205
1209
|
return /* @__PURE__ */ g("div", { className: Ke.library, children: [
|
|
1206
1210
|
/* @__PURE__ */ l("div", { className: Ke.library_header, children: /* @__PURE__ */ l(
|
|
1207
|
-
|
|
1211
|
+
pn.Search,
|
|
1208
1212
|
{
|
|
1209
1213
|
allowClear: !0,
|
|
1210
|
-
value:
|
|
1214
|
+
value: o,
|
|
1211
1215
|
placeholder: "搜索组件",
|
|
1212
1216
|
onChange: (_) => {
|
|
1213
1217
|
d(_.target.value);
|
|
@@ -1221,25 +1225,25 @@ function ql() {
|
|
|
1221
1225
|
activeKey: n,
|
|
1222
1226
|
style: { padding: 0 },
|
|
1223
1227
|
onChange: (_) => i(_ || []),
|
|
1224
|
-
children: u.map((_) => /* @__PURE__ */ l(Ct.Panel, { header: _.label, style: { padding: 0 }, children: /* @__PURE__ */ l(
|
|
1228
|
+
children: u.map((_) => /* @__PURE__ */ l(Ct.Panel, { header: _.label, style: { padding: 0 }, children: /* @__PURE__ */ l(Jl, { components: _.components }) }, _.key))
|
|
1225
1229
|
}
|
|
1226
1230
|
) : /* @__PURE__ */ l(U, { style: { height: "100%", background: "white" } }) })
|
|
1227
1231
|
] });
|
|
1228
1232
|
}
|
|
1229
|
-
const
|
|
1230
|
-
componentNodes:
|
|
1231
|
-
componentNodes_head:
|
|
1232
|
-
componentNodes_block:
|
|
1233
|
-
},
|
|
1234
|
-
componentNodeItem:
|
|
1235
|
-
componentNodeItem_selected:
|
|
1236
|
-
componentNodeItem_icon:
|
|
1237
|
-
componentNodeItem_name:
|
|
1238
|
-
componentNodeItem_tail:
|
|
1239
|
-
componentNodeItem_tail_operatable:
|
|
1233
|
+
const Vl = "_componentNodes_x43ss_59", Gl = "_componentNodes_head_x43ss_63", Xl = "_componentNodes_block_x43ss_67", qe = {
|
|
1234
|
+
componentNodes: Vl,
|
|
1235
|
+
componentNodes_head: Gl,
|
|
1236
|
+
componentNodes_block: Xl
|
|
1237
|
+
}, Yl = "_componentNodeItem_r9mbq_59", Zl = "_componentNodeItem_selected_r9mbq_65", Ql = "_componentNodeItem_icon_r9mbq_71", pl = "_componentNodeItem_name_r9mbq_81", ec = "_componentNodeItem_tail_r9mbq_84", tc = "_componentNodeItem_tail_operatable_r9mbq_95", ne = {
|
|
1238
|
+
componentNodeItem: Yl,
|
|
1239
|
+
componentNodeItem_selected: Zl,
|
|
1240
|
+
componentNodeItem_icon: Ql,
|
|
1241
|
+
componentNodeItem_name: pl,
|
|
1242
|
+
componentNodeItem_tail: ec,
|
|
1243
|
+
componentNodeItem_tail_operatable: tc
|
|
1240
1244
|
};
|
|
1241
|
-
function
|
|
1242
|
-
const { engine: t } =
|
|
1245
|
+
function nc(e) {
|
|
1246
|
+
const { engine: t } = w(), n = j(null), [i, c] = N(e == null ? void 0 : e.componentNode), o = (i == null ? void 0 : i.show) ?? !0, { component: d, instance: a } = L(() => ({
|
|
1243
1247
|
component: t.component.get(i == null ? void 0 : i.cId),
|
|
1244
1248
|
instance: t.instance.get(i == null ? void 0 : i.id)
|
|
1245
1249
|
}), [i]);
|
|
@@ -1259,7 +1263,7 @@ function ec(e) {
|
|
|
1259
1263
|
show: h
|
|
1260
1264
|
});
|
|
1261
1265
|
}
|
|
1262
|
-
return
|
|
1266
|
+
return E(() => t.componentNode.onChange(i.id, ({ payload: h }) => {
|
|
1263
1267
|
c({ ...h });
|
|
1264
1268
|
}), []), /* @__PURE__ */ g(
|
|
1265
1269
|
"div",
|
|
@@ -1275,25 +1279,25 @@ function ec(e) {
|
|
|
1275
1279
|
},
|
|
1276
1280
|
onMouseEnter: () => {
|
|
1277
1281
|
var h;
|
|
1278
|
-
(h =
|
|
1282
|
+
(h = a == null ? void 0 : a.handleHover) == null || h.call(a);
|
|
1279
1283
|
},
|
|
1280
1284
|
onMouseLeave: () => {
|
|
1281
1285
|
var h;
|
|
1282
|
-
(h =
|
|
1286
|
+
(h = a == null ? void 0 : a.handleUnHover) == null || h.call(a);
|
|
1283
1287
|
},
|
|
1284
1288
|
children: [
|
|
1285
1289
|
/* @__PURE__ */ l("div", { className: ne.componentNodeItem_icon, children: /* @__PURE__ */ l(xe, { src: d == null ? void 0 : d.icon, style: { height: "75%", maxWidth: "100%" } }) }),
|
|
1286
1290
|
/* @__PURE__ */ l("div", { className: ne.componentNodeItem_name, children: i == null ? void 0 : i.name }),
|
|
1287
1291
|
/* @__PURE__ */ g("div", { className: ne.componentNodeItem_tail, children: [
|
|
1288
|
-
/* @__PURE__ */ l("div", { children: i != null && i.lock ? /* @__PURE__ */ l(
|
|
1292
|
+
/* @__PURE__ */ l("div", { children: i != null && i.lock ? /* @__PURE__ */ l(Ht, {}) : "" }),
|
|
1289
1293
|
/* @__PURE__ */ l(
|
|
1290
1294
|
"div",
|
|
1291
1295
|
{
|
|
1292
1296
|
className: ne.componentNodeItem_tail_operatable,
|
|
1293
1297
|
onMouseDown: (h) => {
|
|
1294
|
-
h.stopPropagation(), r(!
|
|
1298
|
+
h.stopPropagation(), r(!o);
|
|
1295
1299
|
},
|
|
1296
|
-
children:
|
|
1300
|
+
children: o ? /* @__PURE__ */ l(Pn, {}) : /* @__PURE__ */ l(Bn, {})
|
|
1297
1301
|
}
|
|
1298
1302
|
)
|
|
1299
1303
|
] })
|
|
@@ -1301,47 +1305,47 @@ function ec(e) {
|
|
|
1301
1305
|
}
|
|
1302
1306
|
);
|
|
1303
1307
|
}
|
|
1304
|
-
const
|
|
1305
|
-
renderContextMenu:
|
|
1306
|
-
},
|
|
1307
|
-
renderList:
|
|
1308
|
-
renderList_disabled:
|
|
1309
|
-
renderList_item:
|
|
1310
|
-
renderList_item_title:
|
|
1311
|
-
renderList_item_unselectable:
|
|
1312
|
-
},
|
|
1313
|
-
hoverItem_overlay:
|
|
1314
|
-
},
|
|
1308
|
+
const ic = "_renderContextMenu_vitq8_59", lc = {
|
|
1309
|
+
renderContextMenu: ic
|
|
1310
|
+
}, cc = "_renderList_p7203_59", ac = "_renderList_disabled_p7203_63", oc = "_renderList_item_p7203_70", dc = "_renderList_item_title_p7203_87", rc = "_renderList_item_unselectable_p7203_94", ge = {
|
|
1311
|
+
renderList: cc,
|
|
1312
|
+
renderList_disabled: ac,
|
|
1313
|
+
renderList_item: oc,
|
|
1314
|
+
renderList_item_title: dc,
|
|
1315
|
+
renderList_item_unselectable: rc
|
|
1316
|
+
}, sc = "_hoverItem_overlay_twv7t_59", uc = {
|
|
1317
|
+
hoverItem_overlay: sc
|
|
1318
|
+
}, hc = {
|
|
1315
1319
|
top: 0,
|
|
1316
1320
|
left: 0
|
|
1317
1321
|
};
|
|
1318
|
-
function
|
|
1319
|
-
const { engine: t } =
|
|
1322
|
+
function gc(e) {
|
|
1323
|
+
const { engine: t } = w(), { children: n, items: i, onSelect: c, ...o } = e, [d, a] = N(!1), [s, r] = N(hc);
|
|
1320
1324
|
function h(_) {
|
|
1321
1325
|
var v, C, b;
|
|
1322
1326
|
if ((v = e == null ? void 0 : e.onMouseEnter) == null || v.call(e, _), !(i != null && i.length))
|
|
1323
1327
|
return;
|
|
1324
1328
|
const m = (b = (C = _.target) == null ? void 0 : C.getBoundingClientRect) == null ? void 0 : b.call(C);
|
|
1325
|
-
m && (r({ top: m.top, left: m.left + m.width }),
|
|
1329
|
+
m && (r({ top: m.top, left: m.left + m.width }), a(!0));
|
|
1326
1330
|
}
|
|
1327
1331
|
function u(_) {
|
|
1328
1332
|
var m;
|
|
1329
|
-
(m = e == null ? void 0 : e.onMouseLeave) == null || m.call(e, _),
|
|
1333
|
+
(m = e == null ? void 0 : e.onMouseLeave) == null || m.call(e, _), a(!1);
|
|
1330
1334
|
}
|
|
1331
|
-
return /* @__PURE__ */ g("div", { ...
|
|
1335
|
+
return /* @__PURE__ */ g("div", { ...o, onMouseEnter: h, onMouseLeave: u, children: [
|
|
1332
1336
|
n,
|
|
1333
|
-
d &&
|
|
1337
|
+
d && ui(
|
|
1334
1338
|
/* @__PURE__ */ l(
|
|
1335
1339
|
"div",
|
|
1336
1340
|
{
|
|
1337
|
-
className:
|
|
1341
|
+
className: uc.hoverItem_overlay,
|
|
1338
1342
|
style: {
|
|
1339
1343
|
top: s.top,
|
|
1340
1344
|
left: s.left,
|
|
1341
1345
|
zIndex: t.componentNode.getMaxLevel()
|
|
1342
1346
|
},
|
|
1343
1347
|
children: /* @__PURE__ */ l(
|
|
1344
|
-
|
|
1348
|
+
hn,
|
|
1345
1349
|
{
|
|
1346
1350
|
items: i,
|
|
1347
1351
|
onSelect: (_, m) => {
|
|
@@ -1355,13 +1359,13 @@ function uc(e) {
|
|
|
1355
1359
|
)
|
|
1356
1360
|
] });
|
|
1357
1361
|
}
|
|
1358
|
-
function
|
|
1362
|
+
function hn(e) {
|
|
1359
1363
|
var t, n;
|
|
1360
1364
|
return /* @__PURE__ */ l("div", { className: ge.renderList, children: (n = (t = e == null ? void 0 : e.items) == null ? void 0 : t.map) == null ? void 0 : n.call(t, (i) => {
|
|
1361
|
-
var
|
|
1365
|
+
var o;
|
|
1362
1366
|
const c = !(i != null && i.disabled) && ((i == null ? void 0 : i.selectable) ?? (i == null ? void 0 : i.selectable) === void 0);
|
|
1363
1367
|
return /* @__PURE__ */ g(
|
|
1364
|
-
|
|
1368
|
+
gc,
|
|
1365
1369
|
{
|
|
1366
1370
|
items: i == null ? void 0 : i.children,
|
|
1367
1371
|
style: i == null ? void 0 : i.style,
|
|
@@ -1370,32 +1374,32 @@ function un(e) {
|
|
|
1370
1374
|
(i == null ? void 0 : i.disabled) && ge.renderList_disabled,
|
|
1371
1375
|
!c && ge.renderList_item_unselectable
|
|
1372
1376
|
),
|
|
1373
|
-
onSelect: (d,
|
|
1377
|
+
onSelect: (d, a) => {
|
|
1374
1378
|
var s, r;
|
|
1375
|
-
(s = e == null ? void 0 : e.onSelect) == null || s.call(e, d,
|
|
1379
|
+
(s = e == null ? void 0 : e.onSelect) == null || s.call(e, d, a), d.key === i.key && ((r = i == null ? void 0 : i.onSelect) == null || r.call(i, a));
|
|
1376
1380
|
},
|
|
1377
1381
|
onClick: (d) => {
|
|
1378
|
-
var
|
|
1379
|
-
d.stopPropagation(), c && ((
|
|
1382
|
+
var a, s;
|
|
1383
|
+
d.stopPropagation(), c && ((a = e == null ? void 0 : e.onSelect) == null || a.call(e, i, d), (s = i == null ? void 0 : i.onSelect) == null || s.call(i, d));
|
|
1380
1384
|
},
|
|
1381
1385
|
children: [
|
|
1382
1386
|
/* @__PURE__ */ g("div", { className: ge.renderList_item_title, style: i == null ? void 0 : i.titleStyle, children: [
|
|
1383
1387
|
i == null ? void 0 : i.icon,
|
|
1384
1388
|
i == null ? void 0 : i.title
|
|
1385
1389
|
] }),
|
|
1386
|
-
!!((
|
|
1390
|
+
!!((o = i == null ? void 0 : i.children) != null && o.length) && /* @__PURE__ */ l(Mn, { style: { fontSize: "0.75em" } })
|
|
1387
1391
|
]
|
|
1388
1392
|
},
|
|
1389
1393
|
i == null ? void 0 : i.key
|
|
1390
1394
|
);
|
|
1391
1395
|
}) });
|
|
1392
1396
|
}
|
|
1393
|
-
function
|
|
1394
|
-
const t =
|
|
1395
|
-
return
|
|
1397
|
+
function _c(e) {
|
|
1398
|
+
const t = j(null);
|
|
1399
|
+
return E(() => {
|
|
1396
1400
|
function n(i) {
|
|
1397
|
-
var c,
|
|
1398
|
-
(
|
|
1401
|
+
var c, o, d;
|
|
1402
|
+
(o = (c = t.current) == null ? void 0 : c.contains) != null && o.call(c, i.target) || (d = e == null ? void 0 : e.onClickOuter) == null || d.call(e);
|
|
1399
1403
|
}
|
|
1400
1404
|
return window.addEventListener("click", n), () => {
|
|
1401
1405
|
window.removeEventListener("click", n);
|
|
@@ -1405,12 +1409,12 @@ function hc(e) {
|
|
|
1405
1409
|
{
|
|
1406
1410
|
ref: t,
|
|
1407
1411
|
tabIndex: 0,
|
|
1408
|
-
className:
|
|
1412
|
+
className: lc.renderContextMenu,
|
|
1409
1413
|
onContextMenu: (n) => {
|
|
1410
1414
|
n.preventDefault();
|
|
1411
1415
|
},
|
|
1412
1416
|
children: /* @__PURE__ */ l(
|
|
1413
|
-
|
|
1417
|
+
hn,
|
|
1414
1418
|
{
|
|
1415
1419
|
items: e == null ? void 0 : e.items,
|
|
1416
1420
|
onSelect: (n) => {
|
|
@@ -1422,91 +1426,91 @@ function hc(e) {
|
|
|
1422
1426
|
}
|
|
1423
1427
|
);
|
|
1424
1428
|
}
|
|
1425
|
-
function
|
|
1429
|
+
function gn(e, t, n, i) {
|
|
1426
1430
|
var s;
|
|
1427
1431
|
if (!n || (i != null && i.onBeforeOpen && (n = ((s = i == null ? void 0 : i.onBeforeOpen) == null ? void 0 : s.call(i, n)) || n), n = n == null ? void 0 : n.filter(Boolean), !(n != null && n.length)))
|
|
1428
1432
|
return;
|
|
1429
1433
|
const c = document.createElement("div");
|
|
1430
1434
|
c.style.position = "fixed", c.style.left = `${e}px`, c.style.top = `${t}px`, typeof (i == null ? void 0 : i.zIndex) == "number" && (c.style.zIndex = `${i == null ? void 0 : i.zIndex}`), document.body.appendChild(c);
|
|
1431
|
-
const
|
|
1435
|
+
const o = Wt(c);
|
|
1432
1436
|
let d = !1;
|
|
1433
|
-
const
|
|
1437
|
+
const a = () => {
|
|
1434
1438
|
var r, h;
|
|
1435
|
-
d || ((r =
|
|
1439
|
+
d || ((r = o == null ? void 0 : o.unmount) == null || r.call(o), (h = c == null ? void 0 : c.remove) == null || h.call(c), d = !0);
|
|
1436
1440
|
};
|
|
1437
|
-
return
|
|
1441
|
+
return o.render(
|
|
1438
1442
|
/* @__PURE__ */ l(
|
|
1439
|
-
|
|
1443
|
+
_c,
|
|
1440
1444
|
{
|
|
1441
1445
|
items: n,
|
|
1442
1446
|
onClickOuter: () => {
|
|
1443
|
-
|
|
1447
|
+
a();
|
|
1444
1448
|
},
|
|
1445
1449
|
onSelect: (r) => {
|
|
1446
1450
|
var h;
|
|
1447
|
-
(h = i == null ? void 0 : i.onSelect) == null || h.call(i, r == null ? void 0 : r.key, r),
|
|
1451
|
+
(h = i == null ? void 0 : i.onSelect) == null || h.call(i, r == null ? void 0 : r.key, r), a();
|
|
1448
1452
|
}
|
|
1449
1453
|
}
|
|
1450
1454
|
)
|
|
1451
|
-
),
|
|
1455
|
+
), a;
|
|
1452
1456
|
}
|
|
1453
|
-
const
|
|
1457
|
+
const mc = [
|
|
1454
1458
|
{
|
|
1455
1459
|
key: "top",
|
|
1456
|
-
icon: /* @__PURE__ */ l(
|
|
1460
|
+
icon: /* @__PURE__ */ l(jn, {}),
|
|
1457
1461
|
title: "置顶",
|
|
1458
1462
|
style: { borderTop: "1px solid #e8e8e8" },
|
|
1459
|
-
onSelect: () =>
|
|
1463
|
+
onSelect: () => Vi()
|
|
1460
1464
|
},
|
|
1461
1465
|
{
|
|
1462
1466
|
key: "bottom",
|
|
1463
|
-
icon: /* @__PURE__ */ l(
|
|
1467
|
+
icon: /* @__PURE__ */ l(Rt, {}),
|
|
1464
1468
|
title: "置底",
|
|
1465
|
-
onSelect: () =>
|
|
1469
|
+
onSelect: () => Gi()
|
|
1466
1470
|
},
|
|
1467
1471
|
{
|
|
1468
1472
|
key: "levelUp",
|
|
1469
1473
|
icon: /* @__PURE__ */ l(et, {}),
|
|
1470
1474
|
title: "上移一层",
|
|
1471
|
-
onSelect: () =>
|
|
1475
|
+
onSelect: () => Xi()
|
|
1472
1476
|
},
|
|
1473
1477
|
{
|
|
1474
1478
|
key: "levelDown",
|
|
1475
1479
|
icon: /* @__PURE__ */ l(tt, {}),
|
|
1476
1480
|
title: "下移一层",
|
|
1477
1481
|
style: { borderBottom: "1px solid #e8e8e8" },
|
|
1478
|
-
onSelect: () =>
|
|
1482
|
+
onSelect: () => Yi()
|
|
1479
1483
|
},
|
|
1480
1484
|
{
|
|
1481
1485
|
key: "lock",
|
|
1482
|
-
icon: /* @__PURE__ */ l(
|
|
1486
|
+
icon: /* @__PURE__ */ l(Ht, {}),
|
|
1483
1487
|
title: "锁定",
|
|
1484
|
-
onSelect: () =>
|
|
1488
|
+
onSelect: () => Ui()
|
|
1485
1489
|
},
|
|
1486
1490
|
{
|
|
1487
1491
|
key: "unlock",
|
|
1488
|
-
icon: /* @__PURE__ */ l(
|
|
1492
|
+
icon: /* @__PURE__ */ l(Tn, {}),
|
|
1489
1493
|
title: "解锁",
|
|
1490
|
-
onSelect: () =>
|
|
1494
|
+
onSelect: () => qi()
|
|
1491
1495
|
},
|
|
1492
1496
|
{
|
|
1493
1497
|
key: "group",
|
|
1494
|
-
icon: /* @__PURE__ */ l(
|
|
1498
|
+
icon: /* @__PURE__ */ l(zn, {}),
|
|
1495
1499
|
title: "成组",
|
|
1496
|
-
onSelect: () =>
|
|
1500
|
+
onSelect: () => Ji()
|
|
1497
1501
|
},
|
|
1498
1502
|
{
|
|
1499
1503
|
key: "ungroup",
|
|
1500
|
-
icon: /* @__PURE__ */ l(
|
|
1504
|
+
icon: /* @__PURE__ */ l($n, {}),
|
|
1501
1505
|
title: "取消成组",
|
|
1502
|
-
onSelect: () =>
|
|
1506
|
+
onSelect: () => Wi()
|
|
1503
1507
|
},
|
|
1504
1508
|
{
|
|
1505
1509
|
key: "copy",
|
|
1506
|
-
icon: /* @__PURE__ */ l(
|
|
1510
|
+
icon: /* @__PURE__ */ l(Rn, {}),
|
|
1507
1511
|
title: "复制",
|
|
1508
1512
|
style: { borderTop: "1px solid #e8e8e8" },
|
|
1509
|
-
onSelect: () =>
|
|
1513
|
+
onSelect: () => dn()
|
|
1510
1514
|
},
|
|
1511
1515
|
{
|
|
1512
1516
|
key: "delete",
|
|
@@ -1519,41 +1523,41 @@ const gc = [
|
|
|
1519
1523
|
key: "collect",
|
|
1520
1524
|
icon: /* @__PURE__ */ l(dt, {}),
|
|
1521
1525
|
title: "收藏",
|
|
1522
|
-
onSelect: () =>
|
|
1526
|
+
onSelect: () => Zi()
|
|
1523
1527
|
}
|
|
1524
1528
|
];
|
|
1525
|
-
function
|
|
1529
|
+
function fc(e, t) {
|
|
1526
1530
|
var n;
|
|
1527
|
-
return
|
|
1531
|
+
return gn(e.clientX, e.clientY, mc, {
|
|
1528
1532
|
zIndex: (n = t == null ? void 0 : t.componentNode) == null ? void 0 : n.getMaxLevel(),
|
|
1529
1533
|
onBeforeOpen(i) {
|
|
1530
|
-
let c = 0,
|
|
1531
|
-
const d = t.instance.getAllSelected(),
|
|
1534
|
+
let c = 0, o = !1;
|
|
1535
|
+
const d = t.instance.getAllSelected(), a = d.map((s) => {
|
|
1532
1536
|
const r = s.getComponentNode();
|
|
1533
|
-
return r != null && r.lock && c++, r.groupId && (
|
|
1537
|
+
return r != null && r.lock && c++, r.groupId && (o = !0), r;
|
|
1534
1538
|
});
|
|
1535
|
-
return
|
|
1539
|
+
return a.length ? i.filter((s) => s.key === "group" ? d.length > 1 : s.key === "ungroup" ? o : s.key === "lock" ? c !== a.length : s.key === "unlock" ? !!c : !0) : i;
|
|
1536
1540
|
}
|
|
1537
1541
|
});
|
|
1538
1542
|
}
|
|
1539
|
-
const
|
|
1543
|
+
const yc = [
|
|
1540
1544
|
{
|
|
1541
1545
|
key: "selectAll",
|
|
1542
1546
|
title: "全选",
|
|
1543
|
-
icon: /* @__PURE__ */ l(
|
|
1544
|
-
onSelect: () =>
|
|
1547
|
+
icon: /* @__PURE__ */ l(Fn, {}),
|
|
1548
|
+
onSelect: () => on()
|
|
1545
1549
|
},
|
|
1546
1550
|
{
|
|
1547
1551
|
key: "unselectAll",
|
|
1548
1552
|
title: "反选",
|
|
1549
|
-
icon: /* @__PURE__ */ l(
|
|
1553
|
+
icon: /* @__PURE__ */ l(Hn, {}),
|
|
1550
1554
|
onSelect: () => De()
|
|
1551
1555
|
},
|
|
1552
1556
|
{
|
|
1553
1557
|
key: "clear",
|
|
1554
1558
|
title: "清空",
|
|
1555
|
-
icon: /* @__PURE__ */ l(
|
|
1556
|
-
onSelect: () =>
|
|
1559
|
+
icon: /* @__PURE__ */ l(Ft, {}),
|
|
1560
|
+
onSelect: () => Ki()
|
|
1557
1561
|
},
|
|
1558
1562
|
{
|
|
1559
1563
|
key: "saveLocal",
|
|
@@ -1562,43 +1566,43 @@ const mc = [
|
|
|
1562
1566
|
onSelect: () => vt()
|
|
1563
1567
|
}
|
|
1564
1568
|
];
|
|
1565
|
-
function
|
|
1569
|
+
function vc(e, t) {
|
|
1566
1570
|
var n;
|
|
1567
|
-
return
|
|
1571
|
+
return gn(e.clientX, e.clientY, yc, {
|
|
1568
1572
|
zIndex: (n = t == null ? void 0 : t.componentNode) == null ? void 0 : n.getMaxLevel()
|
|
1569
1573
|
});
|
|
1570
1574
|
}
|
|
1571
1575
|
let ve = [];
|
|
1572
|
-
function
|
|
1576
|
+
function Ot() {
|
|
1573
1577
|
ve.length && (ve.forEach((e) => e == null ? void 0 : e()), ve = []);
|
|
1574
1578
|
}
|
|
1575
|
-
function
|
|
1576
|
-
const { engine: t } =
|
|
1579
|
+
function _n(e) {
|
|
1580
|
+
const { engine: t } = w();
|
|
1577
1581
|
gt(e, {
|
|
1578
1582
|
contextmenu(n) {
|
|
1579
1583
|
var d;
|
|
1580
|
-
|
|
1581
|
-
const i = ct(n.target, oe.componentNodeId, !0), c = t.instance.get(i),
|
|
1582
|
-
if (c &&
|
|
1583
|
-
ve.push(
|
|
1584
|
+
Ot(), n.preventDefault();
|
|
1585
|
+
const i = ct(n.target, oe.componentNodeId, !0), c = t.instance.get(i), o = (d = c == null ? void 0 : c.getComponentNode) == null ? void 0 : d.call(c);
|
|
1586
|
+
if (c && o) {
|
|
1587
|
+
ve.push(fc(n, t));
|
|
1584
1588
|
return;
|
|
1585
1589
|
}
|
|
1586
|
-
ve.push(
|
|
1590
|
+
ve.push(vc(n, t));
|
|
1587
1591
|
}
|
|
1588
|
-
}),
|
|
1589
|
-
|
|
1592
|
+
}), Qt(() => {
|
|
1593
|
+
Ot();
|
|
1590
1594
|
});
|
|
1591
1595
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const { engine: e } =
|
|
1594
|
-
|
|
1596
|
+
function bc() {
|
|
1597
|
+
const { engine: e } = w(), t = Xt(), n = yt(), i = j(null), c = L(() => t.length ? /* @__PURE__ */ l("div", { className: qe.componentNodes_block, children: t.map((o) => /* @__PURE__ */ l(
|
|
1598
|
+
nc,
|
|
1595
1599
|
{
|
|
1596
|
-
componentNode:
|
|
1597
|
-
isSelected: e.instance.isSelected(
|
|
1600
|
+
componentNode: o,
|
|
1601
|
+
isSelected: e.instance.isSelected(o.id)
|
|
1598
1602
|
},
|
|
1599
|
-
|
|
1603
|
+
o.id
|
|
1600
1604
|
)) }) : /* @__PURE__ */ l(W, {}), [t, n]);
|
|
1601
|
-
return
|
|
1605
|
+
return _n(i), /* @__PURE__ */ g(
|
|
1602
1606
|
"div",
|
|
1603
1607
|
{
|
|
1604
1608
|
ref: i,
|
|
@@ -1615,12 +1619,12 @@ function yc() {
|
|
|
1615
1619
|
}
|
|
1616
1620
|
);
|
|
1617
1621
|
}
|
|
1618
|
-
const
|
|
1619
|
-
menubar:
|
|
1620
|
-
menubar_item:
|
|
1621
|
-
menubar_item_selected:
|
|
1622
|
+
const Cc = "_menubar_1ah1r_59", xc = "_menubar_item_1ah1r_67", Ic = "_menubar_item_selected_1ah1r_81", Je = {
|
|
1623
|
+
menubar: Cc,
|
|
1624
|
+
menubar_item: xc,
|
|
1625
|
+
menubar_item_selected: Ic
|
|
1622
1626
|
};
|
|
1623
|
-
function
|
|
1627
|
+
function kc(e) {
|
|
1624
1628
|
var t, n;
|
|
1625
1629
|
return /* @__PURE__ */ l("div", { className: Je.menubar, children: (n = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map) == null ? void 0 : n.call(t, (i) => {
|
|
1626
1630
|
const c = i.key === e.value;
|
|
@@ -1633,31 +1637,31 @@ function xc(e) {
|
|
|
1633
1637
|
c && Je.menubar_item_selected
|
|
1634
1638
|
),
|
|
1635
1639
|
onClick: () => {
|
|
1636
|
-
var
|
|
1637
|
-
(
|
|
1640
|
+
var o;
|
|
1641
|
+
(o = e == null ? void 0 : e.onChange) == null || o.call(e, i == null ? void 0 : i.key);
|
|
1638
1642
|
},
|
|
1639
1643
|
children: i == null ? void 0 : i.icon
|
|
1640
1644
|
}
|
|
1641
1645
|
) }, i == null ? void 0 : i.key);
|
|
1642
1646
|
}) });
|
|
1643
1647
|
}
|
|
1644
|
-
const
|
|
1645
|
-
propertyItem:
|
|
1646
|
-
propertyItem_icon:
|
|
1647
|
-
propertyItem_icon_disabled:
|
|
1648
|
-
propertyItemPopover:
|
|
1649
|
-
propertyItemPopover_description:
|
|
1650
|
-
propertyItemPopover_statistic:
|
|
1651
|
-
propertyItemPopover_body:
|
|
1652
|
-
propertyItemPopover_body_item:
|
|
1653
|
-
propertyItemPopover_body_item_icon:
|
|
1654
|
-
propertyItemPopover_title:
|
|
1648
|
+
const Sc = "_propertyItem_1r9fx_59", Nc = "_propertyItem_icon_1r9fx_68", wc = "_propertyItem_icon_disabled_1r9fx_75", Ec = "_propertyItemPopover_1r9fx_79", Ac = "_propertyItemPopover_description_1r9fx_84", Lc = "_propertyItemPopover_statistic_1r9fx_89", Dc = "_propertyItemPopover_body_1r9fx_92", Oc = "_propertyItemPopover_body_item_1r9fx_95", Pc = "_propertyItemPopover_body_item_icon_1r9fx_105", Bc = "_propertyItemPopover_title_1r9fx_108", J = {
|
|
1649
|
+
propertyItem: Sc,
|
|
1650
|
+
propertyItem_icon: Nc,
|
|
1651
|
+
propertyItem_icon_disabled: wc,
|
|
1652
|
+
propertyItemPopover: Ec,
|
|
1653
|
+
propertyItemPopover_description: Ac,
|
|
1654
|
+
propertyItemPopover_statistic: Lc,
|
|
1655
|
+
propertyItemPopover_body: Dc,
|
|
1656
|
+
propertyItemPopover_body_item: Oc,
|
|
1657
|
+
propertyItemPopover_body_item_icon: Pc,
|
|
1658
|
+
propertyItemPopover_title: Bc
|
|
1655
1659
|
};
|
|
1656
|
-
function
|
|
1660
|
+
function Mc(e) {
|
|
1657
1661
|
var s, r, h;
|
|
1658
|
-
const { data: t } = e, n = ht(), { engine: i } =
|
|
1662
|
+
const { data: t } = e, n = ht(), { engine: i } = w(), c = (t == null ? void 0 : t.origin) !== "system", o = (t == null ? void 0 : t.origin) !== "system";
|
|
1659
1663
|
function d() {
|
|
1660
|
-
const u =
|
|
1664
|
+
const u = Di(t == null ? void 0 : t.id), _ = () => {
|
|
1661
1665
|
var m;
|
|
1662
1666
|
return (m = e == null ? void 0 : e.onDelete) == null ? void 0 : m.call(e, t, u);
|
|
1663
1667
|
};
|
|
@@ -1680,14 +1684,14 @@ function Pc(e) {
|
|
|
1680
1684
|
}
|
|
1681
1685
|
});
|
|
1682
1686
|
}
|
|
1683
|
-
async function
|
|
1687
|
+
async function a() {
|
|
1684
1688
|
const u = await i.component.getPackageSourceCode(t == null ? void 0 : t.id);
|
|
1685
1689
|
if (!u) {
|
|
1686
|
-
|
|
1690
|
+
A.warn("源码不存在");
|
|
1687
1691
|
return;
|
|
1688
1692
|
}
|
|
1689
1693
|
const _ = `${t == null ? void 0 : t.name}.js`;
|
|
1690
|
-
|
|
1694
|
+
Jt(u, _);
|
|
1691
1695
|
}
|
|
1692
1696
|
return /* @__PURE__ */ l(
|
|
1693
1697
|
st,
|
|
@@ -1739,20 +1743,20 @@ function Pc(e) {
|
|
|
1739
1743
|
title: "删除",
|
|
1740
1744
|
className: $(
|
|
1741
1745
|
J.propertyItem_icon,
|
|
1742
|
-
!
|
|
1746
|
+
!o && J.propertyItem_icon_disabled
|
|
1743
1747
|
),
|
|
1744
|
-
onClick:
|
|
1748
|
+
onClick: o ? d : void 0
|
|
1745
1749
|
}
|
|
1746
1750
|
),
|
|
1747
1751
|
/* @__PURE__ */ l(
|
|
1748
|
-
|
|
1752
|
+
Kn,
|
|
1749
1753
|
{
|
|
1750
1754
|
title: "下载到本地",
|
|
1751
1755
|
className: $(
|
|
1752
1756
|
J.propertyItem_icon,
|
|
1753
1757
|
!c && J.propertyItem_icon_disabled
|
|
1754
1758
|
),
|
|
1755
|
-
onClick:
|
|
1759
|
+
onClick: o ? a : void 0
|
|
1756
1760
|
}
|
|
1757
1761
|
)
|
|
1758
1762
|
] })
|
|
@@ -1760,10 +1764,10 @@ function Pc(e) {
|
|
|
1760
1764
|
}
|
|
1761
1765
|
);
|
|
1762
1766
|
}
|
|
1763
|
-
const
|
|
1764
|
-
jsonEditor:
|
|
1765
|
-
jsonEditor_render:
|
|
1766
|
-
jsonEditor_loading:
|
|
1767
|
+
const jc = "_jsonEditor_13vbq_59", Tc = "_jsonEditor_render_13vbq_68", zc = "_jsonEditor_loading_13vbq_72", We = {
|
|
1768
|
+
jsonEditor: jc,
|
|
1769
|
+
jsonEditor_render: Tc,
|
|
1770
|
+
jsonEditor_loading: zc
|
|
1767
1771
|
};
|
|
1768
1772
|
self.MonacoEnvironment = {
|
|
1769
1773
|
getWorker: function(e, t) {
|
|
@@ -1783,10 +1787,10 @@ self.MonacoEnvironment = {
|
|
|
1783
1787
|
}
|
|
1784
1788
|
};
|
|
1785
1789
|
function X(e) {
|
|
1786
|
-
const t =
|
|
1787
|
-
return
|
|
1788
|
-
var c,
|
|
1789
|
-
const i =
|
|
1790
|
+
const t = j(null), n = j();
|
|
1791
|
+
return E(() => {
|
|
1792
|
+
var c, o;
|
|
1793
|
+
const i = wi.editor.create(t.current, {
|
|
1790
1794
|
theme: "vs-light",
|
|
1791
1795
|
value: e == null ? void 0 : e.value,
|
|
1792
1796
|
language: (e == null ? void 0 : e.language) || "text",
|
|
@@ -1804,31 +1808,31 @@ function X(e) {
|
|
|
1804
1808
|
},
|
|
1805
1809
|
readOnlyMessage: {
|
|
1806
1810
|
value: "禁止编辑",
|
|
1807
|
-
...(
|
|
1811
|
+
...(o = e == null ? void 0 : e.options) == null ? void 0 : o.readOnlyMessage
|
|
1808
1812
|
}
|
|
1809
1813
|
});
|
|
1810
1814
|
return i.onDidChangeModelContent(() => {
|
|
1811
|
-
var
|
|
1815
|
+
var a;
|
|
1812
1816
|
const d = i.getValue();
|
|
1813
|
-
(
|
|
1817
|
+
(a = e == null ? void 0 : e.onChange) == null || a.call(e, d);
|
|
1814
1818
|
}), n.current = i, () => {
|
|
1815
1819
|
i.dispose();
|
|
1816
1820
|
};
|
|
1817
1821
|
}, [e == null ? void 0 : e.language]), _t(() => {
|
|
1818
|
-
var c,
|
|
1822
|
+
var c, o, d, a;
|
|
1819
1823
|
if (!(n != null && n.current)) {
|
|
1820
1824
|
console.error("monaco-editor init failed.");
|
|
1821
1825
|
return;
|
|
1822
1826
|
}
|
|
1823
1827
|
const i = `${(e == null ? void 0 : e.value) || ""}`;
|
|
1824
|
-
i !== ((
|
|
1828
|
+
i !== ((o = (c = n == null ? void 0 : n.current) == null ? void 0 : c.getValue) == null ? void 0 : o.call(c)) && ((a = (d = n.current) == null ? void 0 : d.setValue) == null || a.call(d, i));
|
|
1825
1829
|
}, [e == null ? void 0 : e.value]), /* @__PURE__ */ g("div", { className: We.jsonEditor, style: e == null ? void 0 : e.style, children: [
|
|
1826
1830
|
/* @__PURE__ */ l("div", { ref: t, className: We.jsonEditor_render }),
|
|
1827
|
-
(e == null ? void 0 : e.loading) && /* @__PURE__ */ l("div", { className: We.jsonEditor_loading, children: /* @__PURE__ */ l(
|
|
1831
|
+
(e == null ? void 0 : e.loading) && /* @__PURE__ */ l("div", { className: We.jsonEditor_loading, children: /* @__PURE__ */ l(Kt, { style: { fontSize: 20 } }) })
|
|
1828
1832
|
] });
|
|
1829
1833
|
}
|
|
1830
|
-
const
|
|
1831
|
-
const { params: t } = e, [n] =
|
|
1834
|
+
const $c = ue((e) => {
|
|
1835
|
+
const { params: t } = e, [n] = M.useForm(), [i, c] = N(!1), o = j("");
|
|
1832
1836
|
function d() {
|
|
1833
1837
|
n.validateFields(["url"]).then((s) => {
|
|
1834
1838
|
var r;
|
|
@@ -1836,21 +1840,21 @@ const Tc = ue((e) => {
|
|
|
1836
1840
|
var u, _;
|
|
1837
1841
|
return (_ = (u = s == null ? void 0 : s.url) == null ? void 0 : u.startsWith) == null ? void 0 : _.call(u, h);
|
|
1838
1842
|
})) {
|
|
1839
|
-
|
|
1843
|
+
A.error("地址格式不正确");
|
|
1840
1844
|
return;
|
|
1841
1845
|
}
|
|
1842
1846
|
c(!0), (r = it(s == null ? void 0 : s.url)) == null || r.then((h) => {
|
|
1843
|
-
c(!1),
|
|
1847
|
+
c(!1), o.current = s == null ? void 0 : s.url, n.setFieldsValue({
|
|
1844
1848
|
content: h
|
|
1845
1849
|
});
|
|
1846
1850
|
});
|
|
1847
1851
|
});
|
|
1848
1852
|
}
|
|
1849
|
-
async function
|
|
1853
|
+
async function a() {
|
|
1850
1854
|
var r, h;
|
|
1851
1855
|
const s = n.getFieldValue("content");
|
|
1852
|
-
s ||
|
|
1853
|
-
url:
|
|
1856
|
+
s || A.warn("文本内容不能为空"), !(t != null && t.beforeOk && !await Promise.resolve((r = t == null ? void 0 : t.beforeOk) == null ? void 0 : r.call(t, s))) && ((h = e == null ? void 0 : e.onOk) == null || h.call(e, {
|
|
1857
|
+
url: o.current,
|
|
1854
1858
|
content: s
|
|
1855
1859
|
}));
|
|
1856
1860
|
}
|
|
@@ -1865,25 +1869,25 @@ const Tc = ue((e) => {
|
|
|
1865
1869
|
afterClose: e == null ? void 0 : e.afterClose,
|
|
1866
1870
|
onCancel: e == null ? void 0 : e.onCancel,
|
|
1867
1871
|
bodyStyle: { paddingBottom: 0 },
|
|
1868
|
-
onOk:
|
|
1869
|
-
children: /* @__PURE__ */ g(
|
|
1870
|
-
/* @__PURE__ */ l(
|
|
1871
|
-
/* @__PURE__ */ l(
|
|
1872
|
+
onOk: a,
|
|
1873
|
+
children: /* @__PURE__ */ g(M, { form: n, labelCol: { span: 2 }, children: [
|
|
1874
|
+
/* @__PURE__ */ l(M.Item, { label: "地址", name: "url", rules: [{ required: !0, message: "请输入地址" }], children: /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
1875
|
+
/* @__PURE__ */ l(M.Item, { noStyle: !0, name: "url", style: { flex: 1 }, children: /* @__PURE__ */ l(p, { size: "middle" }) }),
|
|
1872
1876
|
/* @__PURE__ */ l(K, { type: "primary", onClick: d, loading: i, children: "读取" })
|
|
1873
1877
|
] }) }),
|
|
1874
|
-
/* @__PURE__ */ l(
|
|
1878
|
+
/* @__PURE__ */ l(M.Item, { label: "文本", name: "content", children: /* @__PURE__ */ l(X, { readOnly: !0, language: "javascript", style: { height: 400 } }) })
|
|
1875
1879
|
] })
|
|
1876
1880
|
}
|
|
1877
1881
|
);
|
|
1878
|
-
}),
|
|
1882
|
+
}), Rc = [
|
|
1879
1883
|
{ key: "local", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "本地上传" }) },
|
|
1880
1884
|
{ key: "remote", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "远程导入" }) }
|
|
1881
1885
|
];
|
|
1882
|
-
function
|
|
1883
|
-
const t =
|
|
1886
|
+
function Fc(e) {
|
|
1887
|
+
const t = j(), n = j(""), i = $c({
|
|
1884
1888
|
onOk({ url: s }) {
|
|
1885
1889
|
if (!t.current) {
|
|
1886
|
-
|
|
1890
|
+
A.warn("package新增失败");
|
|
1887
1891
|
return;
|
|
1888
1892
|
}
|
|
1889
1893
|
t.current.origin = "remote", t.current.originData = s, c(t.current, n.current);
|
|
@@ -1891,12 +1895,12 @@ function $c(e) {
|
|
|
1891
1895
|
});
|
|
1892
1896
|
function c(s, r) {
|
|
1893
1897
|
var h;
|
|
1894
|
-
if (!s) return
|
|
1898
|
+
if (!s) return A.warn("不包含组件包");
|
|
1895
1899
|
(h = e == null ? void 0 : e.onAdd) == null || h.call(e, s, r || "");
|
|
1896
1900
|
}
|
|
1897
|
-
function
|
|
1901
|
+
function o(s, r) {
|
|
1898
1902
|
var h;
|
|
1899
|
-
if (!(s != null && s.length)) return
|
|
1903
|
+
if (!(s != null && s.length)) return A.warn("不包含组件包");
|
|
1900
1904
|
(h = e == null ? void 0 : e.onAddSome) == null || h.call(e, s, r);
|
|
1901
1905
|
}
|
|
1902
1906
|
async function d(s) {
|
|
@@ -1905,40 +1909,40 @@ function $c(e) {
|
|
|
1905
1909
|
for (const b in _) {
|
|
1906
1910
|
if (!((C = b == null ? void 0 : b.endsWith) != null && C.call(b, ".js")))
|
|
1907
1911
|
continue;
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1912
|
+
const y = await _[b].async("text"), f = await Te(y);
|
|
1913
|
+
f && (f.origin = "local", m.push(f), v.push(y));
|
|
1910
1914
|
}
|
|
1911
1915
|
return {
|
|
1912
1916
|
pkgs: m,
|
|
1913
1917
|
codes: v
|
|
1914
1918
|
};
|
|
1915
1919
|
}
|
|
1916
|
-
async function
|
|
1920
|
+
async function a(s) {
|
|
1917
1921
|
let r = "";
|
|
1918
1922
|
switch (s) {
|
|
1919
1923
|
case "local":
|
|
1920
|
-
const h = await
|
|
1924
|
+
const h = await ln({ accept: "text/javascript,application/zip" });
|
|
1921
1925
|
if (!h)
|
|
1922
1926
|
return;
|
|
1923
1927
|
if (["application/x-zip-compressed", "application/zip"].includes(h == null ? void 0 : h.type)) {
|
|
1924
1928
|
const { pkgs: u, codes: _ } = await d(h);
|
|
1925
|
-
|
|
1929
|
+
o(u, _);
|
|
1926
1930
|
return;
|
|
1927
1931
|
}
|
|
1928
1932
|
if ((h == null ? void 0 : h.type) === "text/javascript") {
|
|
1929
|
-
r = await
|
|
1933
|
+
r = await cn(h);
|
|
1930
1934
|
const u = await Te(r);
|
|
1931
1935
|
if (!u)
|
|
1932
|
-
return
|
|
1936
|
+
return A.warn("文本内容必须为UMD或者AMD格式");
|
|
1933
1937
|
u.origin = "local", c(u, r);
|
|
1934
1938
|
return;
|
|
1935
1939
|
}
|
|
1936
|
-
|
|
1940
|
+
A.warn("只能上传 .js 和 .zip 文件");
|
|
1937
1941
|
break;
|
|
1938
1942
|
case "remote":
|
|
1939
1943
|
i.open({
|
|
1940
1944
|
async beforeOk(u) {
|
|
1941
|
-
return n.current = u, t.current = await Te(u), t.current ||
|
|
1945
|
+
return n.current = u, t.current = await Te(u), t.current || A.warn("文本内容必须为UMD或者AMD格式"), !!t.current;
|
|
1942
1946
|
}
|
|
1943
1947
|
});
|
|
1944
1948
|
break;
|
|
@@ -1949,35 +1953,35 @@ function $c(e) {
|
|
|
1949
1953
|
{
|
|
1950
1954
|
trigger: ["click"],
|
|
1951
1955
|
menu: {
|
|
1952
|
-
items:
|
|
1956
|
+
items: Rc,
|
|
1953
1957
|
onClick({ key: s }) {
|
|
1954
|
-
|
|
1958
|
+
a(s);
|
|
1955
1959
|
}
|
|
1956
1960
|
},
|
|
1957
1961
|
children: /* @__PURE__ */ l(K, { size: "small", style: { fontSize: 12 }, type: "primary", children: e == null ? void 0 : e.children })
|
|
1958
1962
|
}
|
|
1959
1963
|
) });
|
|
1960
1964
|
}
|
|
1961
|
-
const
|
|
1965
|
+
const Pt = "./demo.umd.js", Bt = "./demo.amd.js", Hc = [
|
|
1962
1966
|
{ key: "umd-demo", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载示例组件包(UMD)" }) },
|
|
1963
1967
|
{ key: "amd-demo", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载示例组件包(AMD)" }) },
|
|
1964
1968
|
{ key: "zip-demo", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载示例组件包集合(.zip)" }) },
|
|
1965
1969
|
{ key: "all", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载全部资产" }) }
|
|
1966
1970
|
];
|
|
1967
|
-
function
|
|
1971
|
+
function Kc(e) {
|
|
1968
1972
|
async function t(n) {
|
|
1969
1973
|
var i;
|
|
1970
1974
|
switch (n) {
|
|
1971
1975
|
case "umd-demo":
|
|
1972
|
-
It(
|
|
1976
|
+
It(Pt, "测试包2.js");
|
|
1973
1977
|
break;
|
|
1974
1978
|
case "amd-demo":
|
|
1975
|
-
It(
|
|
1979
|
+
It(Bt, "测试包1.js");
|
|
1976
1980
|
break;
|
|
1977
1981
|
case "zip-demo":
|
|
1978
|
-
const c = await it(
|
|
1979
|
-
d.file("测试包1.js",
|
|
1980
|
-
|
|
1982
|
+
const c = await it(Pt), o = await it(Bt), d = new ft();
|
|
1983
|
+
d.file("测试包1.js", o), d.file("测试包2.js", c), d.generateAsync({ type: "blob" }).then(function(a) {
|
|
1984
|
+
en(a, "组件包集合.zip");
|
|
1981
1985
|
});
|
|
1982
1986
|
break;
|
|
1983
1987
|
case "all":
|
|
@@ -1990,7 +1994,7 @@ function Fc(e) {
|
|
|
1990
1994
|
{
|
|
1991
1995
|
trigger: ["click"],
|
|
1992
1996
|
menu: {
|
|
1993
|
-
items:
|
|
1997
|
+
items: Hc,
|
|
1994
1998
|
onClick({ key: n }) {
|
|
1995
1999
|
t(n);
|
|
1996
2000
|
}
|
|
@@ -1999,16 +2003,16 @@ function Fc(e) {
|
|
|
1999
2003
|
}
|
|
2000
2004
|
) });
|
|
2001
2005
|
}
|
|
2002
|
-
const
|
|
2003
|
-
property:
|
|
2004
|
-
property_header:
|
|
2006
|
+
const Uc = "_property_zt9oy_59", qc = "_property_header_zt9oy_68", Mt = {
|
|
2007
|
+
property: Uc,
|
|
2008
|
+
property_header: qc
|
|
2005
2009
|
};
|
|
2006
|
-
function
|
|
2007
|
-
var
|
|
2008
|
-
const e =
|
|
2010
|
+
function Jc() {
|
|
2011
|
+
var a;
|
|
2012
|
+
const e = Yt(), { engine: t } = w(), { loading: n, run: i } = pt(
|
|
2009
2013
|
async () => new Promise((s) => {
|
|
2010
2014
|
setTimeout(() => {
|
|
2011
|
-
|
|
2015
|
+
A.success("刷新成功"), s();
|
|
2012
2016
|
}, 500);
|
|
2013
2017
|
}),
|
|
2014
2018
|
{
|
|
@@ -2021,7 +2025,7 @@ function Uc() {
|
|
|
2021
2025
|
t.component.savePackageSourceCode(h[m], _);
|
|
2022
2026
|
});
|
|
2023
2027
|
}
|
|
2024
|
-
function
|
|
2028
|
+
function o(s, r) {
|
|
2025
2029
|
t.component.unregisterPackage(s), t.componentNode.delete(r);
|
|
2026
2030
|
}
|
|
2027
2031
|
async function d() {
|
|
@@ -2034,16 +2038,16 @@ function Uc() {
|
|
|
2034
2038
|
const v = e[m];
|
|
2035
2039
|
h.file(`${v.name}.js`, _), u++;
|
|
2036
2040
|
}), !u) {
|
|
2037
|
-
|
|
2041
|
+
A.warn("暂无组件包");
|
|
2038
2042
|
return;
|
|
2039
2043
|
}
|
|
2040
2044
|
h.generateAsync({ type: "blob" }).then(function(_) {
|
|
2041
|
-
|
|
2045
|
+
en(_, "组件包集合.zip");
|
|
2042
2046
|
});
|
|
2043
2047
|
});
|
|
2044
2048
|
}
|
|
2045
|
-
return /* @__PURE__ */ g("div", { className:
|
|
2046
|
-
/* @__PURE__ */ g("div", { className:
|
|
2049
|
+
return /* @__PURE__ */ g("div", { className: Mt.property, children: [
|
|
2050
|
+
/* @__PURE__ */ g("div", { className: Mt.property_header, children: [
|
|
2047
2051
|
/* @__PURE__ */ g(D, { children: [
|
|
2048
2052
|
/* @__PURE__ */ l("b", { children: "资产列表" }),
|
|
2049
2053
|
/* @__PURE__ */ l(
|
|
@@ -2052,13 +2056,13 @@ function Uc() {
|
|
|
2052
2056
|
title: "刷新资产",
|
|
2053
2057
|
className: "icon_clickable",
|
|
2054
2058
|
onClick: () => !n && i(),
|
|
2055
|
-
children: n ? /* @__PURE__ */ l(
|
|
2059
|
+
children: n ? /* @__PURE__ */ l(Kt, {}) : /* @__PURE__ */ l(Z, {})
|
|
2056
2060
|
}
|
|
2057
2061
|
)
|
|
2058
2062
|
] }),
|
|
2059
2063
|
/* @__PURE__ */ g(D, { children: [
|
|
2060
2064
|
/* @__PURE__ */ l(
|
|
2061
|
-
|
|
2065
|
+
Kc,
|
|
2062
2066
|
{
|
|
2063
2067
|
onDownloadAll: () => {
|
|
2064
2068
|
d();
|
|
@@ -2067,7 +2071,7 @@ function Uc() {
|
|
|
2067
2071
|
}
|
|
2068
2072
|
),
|
|
2069
2073
|
/* @__PURE__ */ l(
|
|
2070
|
-
|
|
2074
|
+
Fc,
|
|
2071
2075
|
{
|
|
2072
2076
|
onAdd: (s, r) => {
|
|
2073
2077
|
c(s, r);
|
|
@@ -2081,29 +2085,29 @@ function Uc() {
|
|
|
2081
2085
|
] })
|
|
2082
2086
|
] }),
|
|
2083
2087
|
!e.length && /* @__PURE__ */ l(U, {}),
|
|
2084
|
-
(
|
|
2085
|
-
|
|
2088
|
+
(a = e == null ? void 0 : e.map) == null ? void 0 : a.call(e, (s) => /* @__PURE__ */ l(
|
|
2089
|
+
Mc,
|
|
2086
2090
|
{
|
|
2087
2091
|
data: s,
|
|
2088
2092
|
onDelete: (r, h) => {
|
|
2089
|
-
|
|
2093
|
+
o(r, h);
|
|
2090
2094
|
}
|
|
2091
2095
|
},
|
|
2092
2096
|
s.id
|
|
2093
2097
|
))
|
|
2094
2098
|
] });
|
|
2095
2099
|
}
|
|
2096
|
-
const
|
|
2097
|
-
favorites:
|
|
2098
|
-
},
|
|
2099
|
-
favoriteItem:
|
|
2100
|
-
favoriteItem_head:
|
|
2101
|
-
favoriteItem_name:
|
|
2102
|
-
favoriteItem_footer:
|
|
2100
|
+
const Wc = "_favorites_1mbr5_59", Vc = {
|
|
2101
|
+
favorites: Wc
|
|
2102
|
+
}, Gc = "_favoriteItem_1ipdv_59", Xc = "_favoriteItem_head_1ipdv_74", Yc = "_favoriteItem_name_1ipdv_83", Zc = "_favoriteItem_footer_1ipdv_93", ke = {
|
|
2103
|
+
favoriteItem: Gc,
|
|
2104
|
+
favoriteItem_head: Xc,
|
|
2105
|
+
favoriteItem_name: Yc,
|
|
2106
|
+
favoriteItem_footer: Zc
|
|
2103
2107
|
};
|
|
2104
|
-
function
|
|
2105
|
-
const { favorite: t } = e, n =
|
|
2106
|
-
return
|
|
2108
|
+
function Qc(e) {
|
|
2109
|
+
const { favorite: t } = e, n = j(null), i = j(null);
|
|
2110
|
+
return sn(n, {
|
|
2107
2111
|
type: "create-favorite",
|
|
2108
2112
|
data: {
|
|
2109
2113
|
favorite: t
|
|
@@ -2116,7 +2120,7 @@ function Yc(e) {
|
|
|
2116
2120
|
/* @__PURE__ */ l("div", { className: ke.favoriteItem_head, children: /* @__PURE__ */ l(dt, {}) }),
|
|
2117
2121
|
/* @__PURE__ */ l("div", { className: ke.favoriteItem_name, title: t.id, children: t.name }),
|
|
2118
2122
|
/* @__PURE__ */ g("div", { className: ke.favoriteItem_footer, ref: i, children: [
|
|
2119
|
-
/* @__PURE__ */ l(z, { title: "编辑", children: /* @__PURE__ */ l(
|
|
2123
|
+
/* @__PURE__ */ l(z, { title: "编辑", children: /* @__PURE__ */ l(Ut, { onClick: () => {
|
|
2120
2124
|
var c;
|
|
2121
2125
|
return (c = e == null ? void 0 : e.onEdit) == null ? void 0 : c.call(e);
|
|
2122
2126
|
} }) }),
|
|
@@ -2124,26 +2128,26 @@ function Yc(e) {
|
|
|
2124
2128
|
var c;
|
|
2125
2129
|
return (c = e == null ? void 0 : e.onDelete) == null ? void 0 : c.call(e);
|
|
2126
2130
|
} }) }),
|
|
2127
|
-
/* @__PURE__ */ l(z, { title: "详情", children: /* @__PURE__ */ l(
|
|
2131
|
+
/* @__PURE__ */ l(z, { title: "详情", children: /* @__PURE__ */ l(Un, { onClick: () => {
|
|
2128
2132
|
var c;
|
|
2129
2133
|
return (c = e == null ? void 0 : e.onDetail) == null ? void 0 : c.call(e);
|
|
2130
2134
|
} }) })
|
|
2131
2135
|
] })
|
|
2132
2136
|
] }, t.id);
|
|
2133
2137
|
}
|
|
2134
|
-
const
|
|
2138
|
+
const pc = ue((e) => {
|
|
2135
2139
|
var c;
|
|
2136
|
-
const [t] =
|
|
2140
|
+
const [t] = M.useForm(), n = (c = e == null ? void 0 : e.params) == null ? void 0 : c.favorite;
|
|
2137
2141
|
function i() {
|
|
2138
|
-
t.validateFields().then((
|
|
2142
|
+
t.validateFields().then((o) => {
|
|
2139
2143
|
var d;
|
|
2140
2144
|
(d = e == null ? void 0 : e.onOk) == null || d.call(e, {
|
|
2141
2145
|
...n,
|
|
2142
|
-
name:
|
|
2146
|
+
name: o == null ? void 0 : o.name
|
|
2143
2147
|
});
|
|
2144
2148
|
});
|
|
2145
2149
|
}
|
|
2146
|
-
return
|
|
2150
|
+
return E(() => {
|
|
2147
2151
|
e != null && e.visible && t.setFieldsValue({
|
|
2148
2152
|
name: n == null ? void 0 : n.name
|
|
2149
2153
|
});
|
|
@@ -2157,19 +2161,19 @@ const Zc = ue((e) => {
|
|
|
2157
2161
|
afterClose: e == null ? void 0 : e.afterClose,
|
|
2158
2162
|
bodyStyle: { paddingBottom: 6 },
|
|
2159
2163
|
footer: null,
|
|
2160
|
-
children: /* @__PURE__ */ l(
|
|
2161
|
-
/* @__PURE__ */ l(
|
|
2164
|
+
children: /* @__PURE__ */ l(M, { form: t, children: /* @__PURE__ */ l(M.Item, { label: "名称", name: "name", rules: [{ required: !0, message: "请填写名称" }], children: /* @__PURE__ */ g("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2165
|
+
/* @__PURE__ */ l(M.Item, { noStyle: !0, name: "name", children: /* @__PURE__ */ l(p, { size: "middle", style: { flex: 1 } }) }),
|
|
2162
2166
|
/* @__PURE__ */ l(K, { type: "primary", onClick: i, children: "保存" })
|
|
2163
2167
|
] }) }) })
|
|
2164
2168
|
}
|
|
2165
2169
|
);
|
|
2166
|
-
}),
|
|
2167
|
-
favoriteDetailDialog_title:
|
|
2168
|
-
favoriteDetailDialog_componentNodes:
|
|
2169
|
-
favoriteDetailDialog_item:
|
|
2170
|
-
},
|
|
2171
|
-
var i, c,
|
|
2172
|
-
const { engine: t } =
|
|
2170
|
+
}), ea = "_favoriteDetailDialog_title_17m9n_67", ta = "_favoriteDetailDialog_componentNodes_17m9n_73", na = "_favoriteDetailDialog_item_17m9n_78", Ve = {
|
|
2171
|
+
favoriteDetailDialog_title: ea,
|
|
2172
|
+
favoriteDetailDialog_componentNodes: ta,
|
|
2173
|
+
favoriteDetailDialog_item: na
|
|
2174
|
+
}, ia = ue((e) => {
|
|
2175
|
+
var i, c, o, d;
|
|
2176
|
+
const { engine: t } = w(), n = (i = e == null ? void 0 : e.params) == null ? void 0 : i.favorite;
|
|
2173
2177
|
return /* @__PURE__ */ g(
|
|
2174
2178
|
re,
|
|
2175
2179
|
{
|
|
@@ -2197,8 +2201,8 @@ const Zc = ue((e) => {
|
|
|
2197
2201
|
),
|
|
2198
2202
|
/* @__PURE__ */ g("div", { className: Ve.favoriteDetailDialog_componentNodes, children: [
|
|
2199
2203
|
!((c = n == null ? void 0 : n.children) != null && c.length) && /* @__PURE__ */ l(U, {}),
|
|
2200
|
-
(d = (
|
|
2201
|
-
const s = t.component.get(
|
|
2204
|
+
(d = (o = n == null ? void 0 : n.children) == null ? void 0 : o.map) == null ? void 0 : d.call(o, (a) => {
|
|
2205
|
+
const s = t.component.get(a.cId);
|
|
2202
2206
|
return /* @__PURE__ */ g("div", { className: Ve.favoriteDetailDialog_item, children: [
|
|
2203
2207
|
/* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
|
|
2204
2208
|
xe,
|
|
@@ -2207,63 +2211,63 @@ const Zc = ue((e) => {
|
|
|
2207
2211
|
style: { maxWidth: "80%", maxHeight: "80%" }
|
|
2208
2212
|
}
|
|
2209
2213
|
) }),
|
|
2210
|
-
/* @__PURE__ */ l("span", { title:
|
|
2211
|
-
] },
|
|
2214
|
+
/* @__PURE__ */ l("span", { title: a.name, children: a.name })
|
|
2215
|
+
] }, a.id);
|
|
2212
2216
|
})
|
|
2213
2217
|
] })
|
|
2214
2218
|
]
|
|
2215
2219
|
}
|
|
2216
2220
|
);
|
|
2217
2221
|
});
|
|
2218
|
-
function
|
|
2219
|
-
const { engine: e } =
|
|
2220
|
-
onOk(
|
|
2221
|
-
e.favorites.update(
|
|
2222
|
+
function la() {
|
|
2223
|
+
const { engine: e } = w(), t = Bi(), n = ia(), i = pc({
|
|
2224
|
+
onOk(o) {
|
|
2225
|
+
e.favorites.update(o.id, o);
|
|
2222
2226
|
}
|
|
2223
2227
|
});
|
|
2224
|
-
function c(
|
|
2225
|
-
e.favorites.delete(
|
|
2228
|
+
function c(o) {
|
|
2229
|
+
e.favorites.delete(o);
|
|
2226
2230
|
}
|
|
2227
|
-
return /* @__PURE__ */ g("div", { className:
|
|
2231
|
+
return /* @__PURE__ */ g("div", { className: Vc.favorites, children: [
|
|
2228
2232
|
!(t != null && t.length) && /* @__PURE__ */ l(U, {}),
|
|
2229
|
-
t.map((
|
|
2230
|
-
|
|
2233
|
+
t.map((o) => /* @__PURE__ */ l(
|
|
2234
|
+
Qc,
|
|
2231
2235
|
{
|
|
2232
|
-
favorite:
|
|
2233
|
-
onDelete: () => c(
|
|
2236
|
+
favorite: o,
|
|
2237
|
+
onDelete: () => c(o),
|
|
2234
2238
|
onEdit: () => {
|
|
2235
2239
|
i.open({
|
|
2236
|
-
favorite:
|
|
2240
|
+
favorite: o
|
|
2237
2241
|
});
|
|
2238
2242
|
},
|
|
2239
2243
|
onDetail: () => {
|
|
2240
2244
|
n.open({
|
|
2241
|
-
favorite:
|
|
2245
|
+
favorite: o
|
|
2242
2246
|
});
|
|
2243
2247
|
}
|
|
2244
2248
|
},
|
|
2245
|
-
|
|
2249
|
+
o.id
|
|
2246
2250
|
))
|
|
2247
2251
|
] });
|
|
2248
2252
|
}
|
|
2249
|
-
const
|
|
2250
|
-
pages:
|
|
2251
|
-
pages_head:
|
|
2252
|
-
pages_body:
|
|
2253
|
-
},
|
|
2254
|
-
const { params: t } = e, [n] =
|
|
2255
|
-
function i(
|
|
2253
|
+
const ca = "_pages_1ty8r_59", aa = "_pages_head_1ty8r_67", oa = "_pages_body_1ty8r_76", Ge = {
|
|
2254
|
+
pages: ca,
|
|
2255
|
+
pages_head: aa,
|
|
2256
|
+
pages_body: oa
|
|
2257
|
+
}, da = ue((e) => {
|
|
2258
|
+
const { params: t } = e, [n] = M.useForm();
|
|
2259
|
+
function i(o) {
|
|
2256
2260
|
return {
|
|
2257
|
-
name:
|
|
2261
|
+
name: o,
|
|
2258
2262
|
id: ut(),
|
|
2259
2263
|
parentId: t == null ? void 0 : t.parentId
|
|
2260
2264
|
};
|
|
2261
2265
|
}
|
|
2262
2266
|
function c() {
|
|
2263
|
-
n.validateFields().then((
|
|
2267
|
+
n.validateFields().then((o) => {
|
|
2264
2268
|
var d;
|
|
2265
2269
|
(d = e == null ? void 0 : e.onOk) == null || d.call(e, {
|
|
2266
|
-
page: i(
|
|
2270
|
+
page: i(o.name),
|
|
2267
2271
|
parentId: t == null ? void 0 : t.parentId
|
|
2268
2272
|
});
|
|
2269
2273
|
});
|
|
@@ -2281,19 +2285,19 @@ const ia = "_pages_1ty8r_59", la = "_pages_head_1ty8r_67", ca = "_pages_body_1ty
|
|
|
2281
2285
|
bodyStyle: {
|
|
2282
2286
|
padding: "12px 24px 12px 12px"
|
|
2283
2287
|
},
|
|
2284
|
-
children: /* @__PURE__ */ g(
|
|
2285
|
-
(t == null ? void 0 : t.parentName) && /* @__PURE__ */ l(
|
|
2286
|
-
/* @__PURE__ */ l(
|
|
2288
|
+
children: /* @__PURE__ */ g(M, { form: n, labelCol: { span: 4 }, children: [
|
|
2289
|
+
(t == null ? void 0 : t.parentName) && /* @__PURE__ */ l(M.Item, { label: "父页面", children: t == null ? void 0 : t.parentName }),
|
|
2290
|
+
/* @__PURE__ */ l(M.Item, { label: "名称", name: "name", rules: [{ required: !0, message: "请输入名称" }], children: /* @__PURE__ */ l(p, {}) })
|
|
2287
2291
|
] })
|
|
2288
2292
|
}
|
|
2289
2293
|
);
|
|
2290
2294
|
});
|
|
2291
|
-
function
|
|
2292
|
-
const { engine: e } =
|
|
2295
|
+
function ra() {
|
|
2296
|
+
const { engine: e } = w(), [t, n] = N([]), [i, c] = N([]), [o, d, a] = di([]), s = Ei(), r = Ai(), h = da({
|
|
2293
2297
|
onOk({ page: b, parentId: I }) {
|
|
2294
2298
|
if (e.page.insert(b, I), Re(b.id), I) {
|
|
2295
|
-
const
|
|
2296
|
-
u(
|
|
2299
|
+
const y = Array.from(new Set(t).add(I));
|
|
2300
|
+
u(y);
|
|
2297
2301
|
}
|
|
2298
2302
|
}
|
|
2299
2303
|
});
|
|
@@ -2302,7 +2306,7 @@ function oa() {
|
|
|
2302
2306
|
}
|
|
2303
2307
|
function _(b) {
|
|
2304
2308
|
var I;
|
|
2305
|
-
return ((I = b == null ? void 0 : b.reduce) == null ? void 0 : I.call(b, (
|
|
2309
|
+
return ((I = b == null ? void 0 : b.reduce) == null ? void 0 : I.call(b, (y, f) => y.concat([f.key, ..._(f == null ? void 0 : f.children)]), [])) || [];
|
|
2306
2310
|
}
|
|
2307
2311
|
function m(b) {
|
|
2308
2312
|
h.open({
|
|
@@ -2311,49 +2315,49 @@ function oa() {
|
|
|
2311
2315
|
});
|
|
2312
2316
|
}
|
|
2313
2317
|
function v(b, I = {}) {
|
|
2314
|
-
var
|
|
2315
|
-
const
|
|
2316
|
-
if (((
|
|
2317
|
-
|
|
2318
|
+
var f, x, S, P, R, q, V;
|
|
2319
|
+
const y = [b.id, ..._(I[b.id].children)];
|
|
2320
|
+
if (((f = a.current) == null ? void 0 : f.length) === 1 && (y != null && y.includes((S = (x = a.current) == null ? void 0 : x[0]) == null ? void 0 : S.key))) {
|
|
2321
|
+
A.warn("至少保留一个顶层页");
|
|
2318
2322
|
return;
|
|
2319
2323
|
}
|
|
2320
|
-
if (
|
|
2321
|
-
let Me = (R = (
|
|
2322
|
-
|
|
2324
|
+
if (y.includes(e.config.getCurrentPage())) {
|
|
2325
|
+
let Me = (R = (P = a.current) == null ? void 0 : P[0]) == null ? void 0 : R.key;
|
|
2326
|
+
y.includes(Me) && (Me = (V = (q = a.current) == null ? void 0 : q[1]) == null ? void 0 : V.key), Re(Me);
|
|
2323
2327
|
}
|
|
2324
|
-
e.page.delete(
|
|
2328
|
+
e.page.delete(y);
|
|
2325
2329
|
}
|
|
2326
2330
|
function C(b, I = {}) {
|
|
2327
|
-
const
|
|
2328
|
-
return b.forEach((
|
|
2329
|
-
var
|
|
2330
|
-
const x = I[
|
|
2331
|
-
key: (x == null ? void 0 : x.key) ||
|
|
2331
|
+
const y = [];
|
|
2332
|
+
return b.forEach((f) => {
|
|
2333
|
+
var P, R, q;
|
|
2334
|
+
const x = I[f.id], S = I[f.id] = {
|
|
2335
|
+
key: (x == null ? void 0 : x.key) || f.id,
|
|
2332
2336
|
title: (x == null ? void 0 : x.title) || /* @__PURE__ */ g("span", { children: [
|
|
2333
|
-
/* @__PURE__ */ l("span", { children:
|
|
2337
|
+
/* @__PURE__ */ l("span", { children: f.name }),
|
|
2334
2338
|
/* @__PURE__ */ g("span", { style: { fontSize: 12 }, onClick: (V) => V.stopPropagation(), children: [
|
|
2335
|
-
/* @__PURE__ */ l("a", { style: { marginLeft: 16 }, onClick: () => m(
|
|
2336
|
-
/* @__PURE__ */ l("a", { style: { marginLeft: 8 }, onClick: () => v(
|
|
2339
|
+
/* @__PURE__ */ l("a", { style: { marginLeft: 16 }, onClick: () => m(f), children: "新增" }),
|
|
2340
|
+
/* @__PURE__ */ l("a", { style: { marginLeft: 8 }, onClick: () => v(f, I), children: "删除" })
|
|
2337
2341
|
] })
|
|
2338
2342
|
] }),
|
|
2339
2343
|
children: (x == null ? void 0 : x.children) || []
|
|
2340
2344
|
};
|
|
2341
|
-
if (
|
|
2342
|
-
(q = (R = I[
|
|
2345
|
+
if (f != null && f.parentId) {
|
|
2346
|
+
(q = (R = I[P = f == null ? void 0 : f.parentId] || (I[P] = {
|
|
2343
2347
|
key: "",
|
|
2344
2348
|
title: "",
|
|
2345
2349
|
children: []
|
|
2346
|
-
})) == null ? void 0 : R.children) == null || q.push(
|
|
2350
|
+
})) == null ? void 0 : R.children) == null || q.push(S);
|
|
2347
2351
|
return;
|
|
2348
2352
|
}
|
|
2349
|
-
|
|
2350
|
-
}),
|
|
2353
|
+
y.push(S);
|
|
2354
|
+
}), y;
|
|
2351
2355
|
}
|
|
2352
|
-
return
|
|
2356
|
+
return E(() => {
|
|
2353
2357
|
n(e.config.getConfig().expandedPageIds || []);
|
|
2354
|
-
}, []),
|
|
2358
|
+
}, []), E(() => {
|
|
2355
2359
|
d(C(s));
|
|
2356
|
-
}, [s]),
|
|
2360
|
+
}, [s]), E(() => {
|
|
2357
2361
|
c([r]);
|
|
2358
2362
|
}, [r]), /* @__PURE__ */ g("div", { className: Ge.pages, children: [
|
|
2359
2363
|
/* @__PURE__ */ g("div", { className: Ge.pages_head, children: [
|
|
@@ -2372,13 +2376,13 @@ function oa() {
|
|
|
2372
2376
|
) })
|
|
2373
2377
|
] }),
|
|
2374
2378
|
/* @__PURE__ */ l("div", { className: Ge.pages_body, children: /* @__PURE__ */ l(
|
|
2375
|
-
|
|
2379
|
+
ei,
|
|
2376
2380
|
{
|
|
2377
2381
|
showIcon: !0,
|
|
2378
2382
|
multiple: !1,
|
|
2379
2383
|
defaultExpandAll: !0,
|
|
2380
|
-
icon: /* @__PURE__ */ l(
|
|
2381
|
-
treeData:
|
|
2384
|
+
icon: /* @__PURE__ */ l(qn, {}),
|
|
2385
|
+
treeData: o,
|
|
2382
2386
|
selectedKeys: i,
|
|
2383
2387
|
expandedKeys: t,
|
|
2384
2388
|
onExpand: u,
|
|
@@ -2389,18 +2393,18 @@ function oa() {
|
|
|
2389
2393
|
) })
|
|
2390
2394
|
] });
|
|
2391
2395
|
}
|
|
2392
|
-
const
|
|
2393
|
-
history:
|
|
2394
|
-
history_head:
|
|
2395
|
-
history_body:
|
|
2396
|
-
history_item:
|
|
2397
|
-
history_item_gray:
|
|
2396
|
+
const sa = "_history_zo6ip_59", ua = "_history_head_zo6ip_71", ha = "_history_body_zo6ip_75", ga = "_history_item_zo6ip_80", _a = "_history_item_gray_zo6ip_88", _e = {
|
|
2397
|
+
history: sa,
|
|
2398
|
+
history_head: ua,
|
|
2399
|
+
history_body: ha,
|
|
2400
|
+
history_item: ga,
|
|
2401
|
+
history_item_gray: _a
|
|
2398
2402
|
};
|
|
2399
|
-
function
|
|
2400
|
-
var c,
|
|
2401
|
-
const { engine: e } =
|
|
2403
|
+
function ma() {
|
|
2404
|
+
var c, o, d, a;
|
|
2405
|
+
const { engine: e } = w(), t = an(), n = (c = t.current) == null ? void 0 : c.stepId;
|
|
2402
2406
|
function i(s) {
|
|
2403
|
-
e.history.isPass(s) && n === s ? bt() :
|
|
2407
|
+
e.history.isPass(s) && n === s ? bt() : pi(s);
|
|
2404
2408
|
}
|
|
2405
2409
|
return /* @__PURE__ */ g("div", { className: _e.history, children: [
|
|
2406
2410
|
/* @__PURE__ */ l("div", { className: _e.history_head, children: /* @__PURE__ */ g("b", { children: [
|
|
@@ -2408,7 +2412,7 @@ function ga() {
|
|
|
2408
2412
|
t == null ? void 0 : t.maxSize
|
|
2409
2413
|
] }) }),
|
|
2410
2414
|
/* @__PURE__ */ g("div", { className: _e.history_body, children: [
|
|
2411
|
-
(d = (
|
|
2415
|
+
(d = (o = t == null ? void 0 : t.list) == null ? void 0 : o.map) == null ? void 0 : d.call(o, (s) => /* @__PURE__ */ l(
|
|
2412
2416
|
"div",
|
|
2413
2417
|
{
|
|
2414
2418
|
className: $(_e.history_item, !s.isPass && _e.history_item_gray),
|
|
@@ -2419,102 +2423,102 @@ function ga() {
|
|
|
2419
2423
|
},
|
|
2420
2424
|
s.stepId
|
|
2421
2425
|
)),
|
|
2422
|
-
!((
|
|
2426
|
+
!((a = t == null ? void 0 : t.list) != null && a.length) && /* @__PURE__ */ l(U, {})
|
|
2423
2427
|
] })
|
|
2424
2428
|
] });
|
|
2425
2429
|
}
|
|
2426
|
-
function
|
|
2427
|
-
const { engine: e } =
|
|
2430
|
+
function fa() {
|
|
2431
|
+
const { engine: e } = w(), [t, n] = se(), i = L(() => [
|
|
2428
2432
|
{
|
|
2429
2433
|
key: "library",
|
|
2430
2434
|
domId: "rbs-library",
|
|
2431
|
-
icon: /* @__PURE__ */ l(
|
|
2435
|
+
icon: /* @__PURE__ */ l(Jn, {}),
|
|
2432
2436
|
title: t("menu.bar.library"),
|
|
2433
|
-
children: /* @__PURE__ */ l(
|
|
2437
|
+
children: /* @__PURE__ */ l(Wl, {})
|
|
2434
2438
|
},
|
|
2435
2439
|
{
|
|
2436
2440
|
key: "pages",
|
|
2437
2441
|
domId: "rbs-pages",
|
|
2438
|
-
icon: /* @__PURE__ */ l(
|
|
2442
|
+
icon: /* @__PURE__ */ l(Wn, {}),
|
|
2439
2443
|
title: t("menu.bar.pages"),
|
|
2440
|
-
children: /* @__PURE__ */ l(
|
|
2444
|
+
children: /* @__PURE__ */ l(ra, {})
|
|
2441
2445
|
},
|
|
2442
2446
|
{
|
|
2443
2447
|
key: "componentNodes",
|
|
2444
2448
|
domId: "rbs-componentNodes",
|
|
2445
|
-
icon: /* @__PURE__ */ l(
|
|
2449
|
+
icon: /* @__PURE__ */ l(Vn, {}),
|
|
2446
2450
|
title: t("menu.bar.componentNodes"),
|
|
2447
|
-
children: /* @__PURE__ */ l(
|
|
2451
|
+
children: /* @__PURE__ */ l(bc, {})
|
|
2448
2452
|
},
|
|
2449
2453
|
{
|
|
2450
2454
|
key: "property",
|
|
2451
2455
|
domId: "rbs-property",
|
|
2452
|
-
icon: /* @__PURE__ */ l(
|
|
2456
|
+
icon: /* @__PURE__ */ l(Gn, {}),
|
|
2453
2457
|
title: t("menu.bar.property"),
|
|
2454
|
-
children: /* @__PURE__ */ l(
|
|
2458
|
+
children: /* @__PURE__ */ l(Jc, {})
|
|
2455
2459
|
},
|
|
2456
2460
|
{
|
|
2457
2461
|
key: "favorites",
|
|
2458
2462
|
domId: "rbs-favorites",
|
|
2459
2463
|
icon: /* @__PURE__ */ l(dt, {}),
|
|
2460
2464
|
title: t("menu.bar.favorites"),
|
|
2461
|
-
children: /* @__PURE__ */ l(
|
|
2465
|
+
children: /* @__PURE__ */ l(la, {})
|
|
2462
2466
|
},
|
|
2463
2467
|
{
|
|
2464
2468
|
key: "history",
|
|
2465
2469
|
domId: "rbs-history",
|
|
2466
|
-
icon: /* @__PURE__ */ l(
|
|
2470
|
+
icon: /* @__PURE__ */ l(Xn, {}),
|
|
2467
2471
|
title: t("menu.bar.history"),
|
|
2468
|
-
children: /* @__PURE__ */ l(
|
|
2472
|
+
children: /* @__PURE__ */ l(ma, {})
|
|
2469
2473
|
}
|
|
2470
|
-
], [n.language]), c = Ee((r) => r.currentMenu), [
|
|
2474
|
+
], [n.language]), c = Ee((r) => r.currentMenu), [o, d] = N(""), a = L(() => {
|
|
2471
2475
|
var r;
|
|
2472
|
-
return (r = i.find((h) => h.key ===
|
|
2473
|
-
}, [
|
|
2476
|
+
return (r = i.find((h) => h.key === o)) == null ? void 0 : r.children;
|
|
2477
|
+
}, [o]);
|
|
2474
2478
|
function s(r) {
|
|
2475
2479
|
d(r), e.config.setConfigSilently({
|
|
2476
2480
|
currentMenu: r
|
|
2477
2481
|
});
|
|
2478
2482
|
}
|
|
2479
|
-
return
|
|
2483
|
+
return E(() => {
|
|
2480
2484
|
const { currentMenu: r } = e.config.getConfig(), h = i.find((u) => u.key === r);
|
|
2481
2485
|
d((h == null ? void 0 : h.key) || i[0].key);
|
|
2482
2486
|
}, [c]), /* @__PURE__ */ g("div", { className: He.menu, children: [
|
|
2483
|
-
/* @__PURE__ */ l("div", { className: He.menu_bar, children: /* @__PURE__ */ l(
|
|
2484
|
-
/* @__PURE__ */ l("div", { className: He.menu_main, children:
|
|
2487
|
+
/* @__PURE__ */ l("div", { className: He.menu_bar, children: /* @__PURE__ */ l(kc, { value: o, list: i, onChange: s }) }),
|
|
2488
|
+
/* @__PURE__ */ l("div", { className: He.menu_main, children: a })
|
|
2485
2489
|
] });
|
|
2486
2490
|
}
|
|
2487
|
-
const
|
|
2488
|
-
editor:
|
|
2489
|
-
editor_render:
|
|
2490
|
-
},
|
|
2491
|
-
flexCenter:
|
|
2491
|
+
const ya = "_editor_82kko_59", va = "_editor_render_82kko_65", jt = {
|
|
2492
|
+
editor: ya,
|
|
2493
|
+
editor_render: va
|
|
2494
|
+
}, ba = "_flexCenter_1kt3d_29", Ca = "_icon_clickable_1kt3d_49", xa = "_icon_selected_1kt3d_56", Ia = "_moveItem_box_1kt3d_59", ka = "_moveItem_box_lock_1kt3d_69", Sa = "_moveItem_box_selected_1kt3d_72", Na = "_moveItem_box_hover_1kt3d_79", wa = "_dragPointCommon_1kt3d_83", Ea = "_p_top_1kt3d_92", Aa = "_p_left_1kt3d_95", La = "_p_right_1kt3d_98", Da = "_p_bottom_1kt3d_101", Oa = "_p_horizontal_mid_1kt3d_104", Pa = "_p_vertical_mid_1kt3d_107", Ba = "_dragPoint_top_1kt3d_110", Ma = "_dragPoint_top_left_1kt3d_123", ja = "_dragPoint_top_right_1kt3d_136", Ta = "_dragPoint_bottom_1kt3d_149", za = "_dragPoint_bottom_left_1kt3d_162", $a = "_dragPoint_bottom_right_1kt3d_175", Ra = "_dragPoint_left_1kt3d_188", Fa = "_dragPoint_right_1kt3d_201", ie = {
|
|
2495
|
+
flexCenter: ba,
|
|
2492
2496
|
"theme-text": "_theme-text_1kt3d_34",
|
|
2493
2497
|
"theme-color": "_theme-color_1kt3d_38",
|
|
2494
2498
|
"text-ellipsis": "_text-ellipsis_1kt3d_41",
|
|
2495
2499
|
"border-right": "_border-right_1kt3d_46",
|
|
2496
|
-
icon_clickable:
|
|
2497
|
-
icon_selected:
|
|
2498
|
-
moveItem_box:
|
|
2499
|
-
moveItem_box_lock:
|
|
2500
|
-
moveItem_box_selected:
|
|
2501
|
-
moveItem_box_hover:
|
|
2502
|
-
dragPointCommon:
|
|
2503
|
-
p_top:
|
|
2504
|
-
p_left:
|
|
2505
|
-
p_right:
|
|
2506
|
-
p_bottom:
|
|
2507
|
-
p_horizontal_mid:
|
|
2508
|
-
p_vertical_mid:
|
|
2509
|
-
dragPoint_top:
|
|
2510
|
-
dragPoint_top_left:
|
|
2511
|
-
dragPoint_top_right:
|
|
2512
|
-
dragPoint_bottom:
|
|
2513
|
-
dragPoint_bottom_left:
|
|
2514
|
-
dragPoint_bottom_right:
|
|
2515
|
-
dragPoint_left:
|
|
2516
|
-
dragPoint_right:
|
|
2517
|
-
},
|
|
2500
|
+
icon_clickable: Ca,
|
|
2501
|
+
icon_selected: xa,
|
|
2502
|
+
moveItem_box: Ia,
|
|
2503
|
+
moveItem_box_lock: ka,
|
|
2504
|
+
moveItem_box_selected: Sa,
|
|
2505
|
+
moveItem_box_hover: Na,
|
|
2506
|
+
dragPointCommon: wa,
|
|
2507
|
+
p_top: Ea,
|
|
2508
|
+
p_left: Aa,
|
|
2509
|
+
p_right: La,
|
|
2510
|
+
p_bottom: Da,
|
|
2511
|
+
p_horizontal_mid: Oa,
|
|
2512
|
+
p_vertical_mid: Pa,
|
|
2513
|
+
dragPoint_top: Ba,
|
|
2514
|
+
dragPoint_top_left: Ma,
|
|
2515
|
+
dragPoint_top_right: ja,
|
|
2516
|
+
dragPoint_bottom: Ta,
|
|
2517
|
+
dragPoint_bottom_left: za,
|
|
2518
|
+
dragPoint_bottom_right: $a,
|
|
2519
|
+
dragPoint_left: Ra,
|
|
2520
|
+
dragPoint_right: Fa
|
|
2521
|
+
}, Ha = [
|
|
2518
2522
|
"top",
|
|
2519
2523
|
"top_left",
|
|
2520
2524
|
"top_right",
|
|
@@ -2523,7 +2527,7 @@ const ma = "_editor_82kko_59", fa = "_editor_render_82kko_65", Mt = {
|
|
|
2523
2527
|
"bottom_right",
|
|
2524
2528
|
"left",
|
|
2525
2529
|
"right"
|
|
2526
|
-
],
|
|
2530
|
+
], Ka = {
|
|
2527
2531
|
top: "n-resize",
|
|
2528
2532
|
top_left: "nw-resize",
|
|
2529
2533
|
top_right: "ne-resize",
|
|
@@ -2533,7 +2537,7 @@ const ma = "_editor_82kko_59", fa = "_editor_render_82kko_65", Mt = {
|
|
|
2533
2537
|
left: "w-resize",
|
|
2534
2538
|
right: "e-resize"
|
|
2535
2539
|
};
|
|
2536
|
-
function
|
|
2540
|
+
function Ua(e, t, n) {
|
|
2537
2541
|
const i = {
|
|
2538
2542
|
dx: 0,
|
|
2539
2543
|
dy: 0,
|
|
@@ -2543,13 +2547,13 @@ function Ha(e, t, n) {
|
|
|
2543
2547
|
function c() {
|
|
2544
2548
|
i.dh = -n, i.dy = n;
|
|
2545
2549
|
}
|
|
2546
|
-
function
|
|
2550
|
+
function o() {
|
|
2547
2551
|
i.dw = -t, i.dx = t;
|
|
2548
2552
|
}
|
|
2549
2553
|
function d() {
|
|
2550
2554
|
i.dh = n;
|
|
2551
2555
|
}
|
|
2552
|
-
function
|
|
2556
|
+
function a() {
|
|
2553
2557
|
i.dw = t;
|
|
2554
2558
|
}
|
|
2555
2559
|
switch (e) {
|
|
@@ -2557,30 +2561,30 @@ function Ha(e, t, n) {
|
|
|
2557
2561
|
c();
|
|
2558
2562
|
break;
|
|
2559
2563
|
case "top_left":
|
|
2560
|
-
c(),
|
|
2564
|
+
c(), o();
|
|
2561
2565
|
break;
|
|
2562
2566
|
case "top_right":
|
|
2563
|
-
c(),
|
|
2567
|
+
c(), a();
|
|
2564
2568
|
break;
|
|
2565
2569
|
case "bottom":
|
|
2566
2570
|
d();
|
|
2567
2571
|
break;
|
|
2568
2572
|
case "bottom_left":
|
|
2569
|
-
d(),
|
|
2573
|
+
d(), o();
|
|
2570
2574
|
break;
|
|
2571
2575
|
case "bottom_right":
|
|
2572
|
-
d(),
|
|
2576
|
+
d(), a();
|
|
2573
2577
|
break;
|
|
2574
2578
|
case "left":
|
|
2575
|
-
|
|
2579
|
+
o();
|
|
2576
2580
|
break;
|
|
2577
2581
|
case "right":
|
|
2578
|
-
|
|
2582
|
+
a();
|
|
2579
2583
|
break;
|
|
2580
2584
|
}
|
|
2581
2585
|
return i;
|
|
2582
2586
|
}
|
|
2583
|
-
function
|
|
2587
|
+
function qa(e, t, n) {
|
|
2584
2588
|
let i = {
|
|
2585
2589
|
x: 0,
|
|
2586
2590
|
y: 0,
|
|
@@ -2596,13 +2600,13 @@ function Ka(e, t, n) {
|
|
|
2596
2600
|
y: e.y,
|
|
2597
2601
|
width: e.width,
|
|
2598
2602
|
height: e.height
|
|
2599
|
-
}, t.style.zIndex = `${c.componentNode.getMaxLevel()}`, ae.set(
|
|
2603
|
+
}, t.style.zIndex = `${c.componentNode.getMaxLevel()}`, ae.set(Ka[n]);
|
|
2600
2604
|
},
|
|
2601
|
-
onMove(
|
|
2602
|
-
const
|
|
2605
|
+
onMove(o, d) {
|
|
2606
|
+
const a = Ua(n, o, d), s = i.width + a.dw, r = i.height + a.dh;
|
|
2603
2607
|
s < 0 || r < 0 || c.componentNode.update(e.id, {
|
|
2604
|
-
x: Math.round(i.x +
|
|
2605
|
-
y: Math.round(i.y +
|
|
2608
|
+
x: Math.round(i.x + a.dx),
|
|
2609
|
+
y: Math.round(i.y + a.dy),
|
|
2606
2610
|
height: Math.round(Math.max(r, 0)),
|
|
2607
2611
|
width: Math.round(Math.max(s, 0))
|
|
2608
2612
|
});
|
|
@@ -2612,28 +2616,28 @@ function Ka(e, t, n) {
|
|
|
2612
2616
|
}
|
|
2613
2617
|
};
|
|
2614
2618
|
}
|
|
2615
|
-
const
|
|
2616
|
-
const { componentNode: n } = e, i =
|
|
2617
|
-
return
|
|
2619
|
+
const Ja = Cn((e, t) => {
|
|
2620
|
+
const { componentNode: n } = e, i = j(null), [c, o] = N(!1), d = Ee((a) => a.scale);
|
|
2621
|
+
return xn(t, () => ({
|
|
2618
2622
|
// 经过实例
|
|
2619
2623
|
handleHover() {
|
|
2620
|
-
var
|
|
2621
|
-
(r = (s = (
|
|
2624
|
+
var a, s, r;
|
|
2625
|
+
(r = (s = (a = i.current) == null ? void 0 : a.classList) == null ? void 0 : s.add) == null || r.call(s, ie.moveItem_box_hover);
|
|
2622
2626
|
},
|
|
2623
2627
|
// 离开实例
|
|
2624
2628
|
handleUnHover() {
|
|
2625
|
-
var
|
|
2626
|
-
(r = (s = (
|
|
2629
|
+
var a, s, r;
|
|
2630
|
+
(r = (s = (a = i.current) == null ? void 0 : a.classList) == null ? void 0 : s.remove) == null || r.call(s, ie.moveItem_box_hover);
|
|
2627
2631
|
},
|
|
2628
2632
|
// 选中实例样式
|
|
2629
2633
|
handleSelected() {
|
|
2630
|
-
|
|
2634
|
+
o(!0);
|
|
2631
2635
|
},
|
|
2632
2636
|
// 取消选中实例样式
|
|
2633
2637
|
handleUnSelected() {
|
|
2634
|
-
|
|
2638
|
+
o(!1);
|
|
2635
2639
|
}
|
|
2636
|
-
})),
|
|
2640
|
+
})), L(() => /* @__PURE__ */ l(
|
|
2637
2641
|
"div",
|
|
2638
2642
|
{
|
|
2639
2643
|
[`data-${oe.componentNodeId}`]: n.id,
|
|
@@ -2643,34 +2647,34 @@ const Ua = bn((e, t) => {
|
|
|
2643
2647
|
c && ie.moveItem_box_selected,
|
|
2644
2648
|
n.lock && ie.moveItem_box_lock
|
|
2645
2649
|
),
|
|
2646
|
-
children: c && !n.lock &&
|
|
2650
|
+
children: c && !n.lock && Ha.map((a) => /* @__PURE__ */ l(
|
|
2647
2651
|
"div",
|
|
2648
2652
|
{
|
|
2649
2653
|
style: { transform: d < 1 ? `scale(${1 / d})` : void 0 },
|
|
2650
|
-
className: ie[`dragPoint_${
|
|
2651
|
-
[`data-${oe.dragDirection}`]:
|
|
2654
|
+
className: ie[`dragPoint_${a}`],
|
|
2655
|
+
[`data-${oe.dragDirection}`]: a
|
|
2652
2656
|
},
|
|
2653
|
-
|
|
2657
|
+
a
|
|
2654
2658
|
))
|
|
2655
2659
|
}
|
|
2656
2660
|
), [n.lock, c, d]);
|
|
2657
2661
|
});
|
|
2658
|
-
function
|
|
2662
|
+
function Wa(e) {
|
|
2659
2663
|
var d;
|
|
2660
|
-
const { engine: t } =
|
|
2664
|
+
const { engine: t } = w(), [n, i] = N(
|
|
2661
2665
|
e == null ? void 0 : e.componentNode
|
|
2662
|
-
), c = n ? (n == null ? void 0 : n.show) ?? !0 : !1,
|
|
2666
|
+
), c = n ? (n == null ? void 0 : n.show) ?? !0 : !1, o = L(
|
|
2663
2667
|
() => t.component.get(e == null ? void 0 : e.componentNode.cId),
|
|
2664
2668
|
[(d = e == null ? void 0 : e.componentNode) == null ? void 0 : d.cId, e == null ? void 0 : e.packages]
|
|
2665
2669
|
);
|
|
2666
|
-
return
|
|
2667
|
-
i({ ...
|
|
2670
|
+
return tn(() => t.componentNode.onChange(e == null ? void 0 : e.componentNode.id, ({ payload: a }) => {
|
|
2671
|
+
i({ ...a });
|
|
2668
2672
|
})), _t(() => {
|
|
2669
2673
|
i(e == null ? void 0 : e.componentNode);
|
|
2670
|
-
}, [e == null ? void 0 : e.componentNode]),
|
|
2674
|
+
}, [e == null ? void 0 : e.componentNode]), o && c ? /* @__PURE__ */ l(Va, { componentNode: n, component: o }) : /* @__PURE__ */ l(W, {});
|
|
2671
2675
|
}
|
|
2672
|
-
function
|
|
2673
|
-
const { component: t, componentNode: n } = e, i =
|
|
2676
|
+
function Va(e) {
|
|
2677
|
+
const { component: t, componentNode: n } = e, i = nn(n), c = j(null), { dataSource: o, requestInstance: d } = _i(n), a = mi(n.id), s = fi(n.id), r = j(null), h = yi({
|
|
2674
2678
|
id: n.id,
|
|
2675
2679
|
// 经过实例
|
|
2676
2680
|
handleHover() {
|
|
@@ -2731,34 +2735,34 @@ function Ja(e) {
|
|
|
2731
2735
|
h.handleUnHover();
|
|
2732
2736
|
},
|
|
2733
2737
|
children: [
|
|
2734
|
-
/* @__PURE__ */ l(
|
|
2738
|
+
/* @__PURE__ */ l($t, { children: /* @__PURE__ */ l(
|
|
2735
2739
|
t.component,
|
|
2736
2740
|
{
|
|
2737
2741
|
useExpose: s,
|
|
2738
|
-
handleTrigger:
|
|
2739
|
-
dataSource:
|
|
2742
|
+
handleTrigger: a,
|
|
2743
|
+
dataSource: o,
|
|
2740
2744
|
options: n.options,
|
|
2741
2745
|
width: n.width,
|
|
2742
2746
|
height: n.height,
|
|
2743
2747
|
componentNode: n
|
|
2744
2748
|
}
|
|
2745
2749
|
) }),
|
|
2746
|
-
/* @__PURE__ */ l(
|
|
2750
|
+
/* @__PURE__ */ l(Ja, { ref: r, componentNode: n })
|
|
2747
2751
|
]
|
|
2748
2752
|
}
|
|
2749
2753
|
);
|
|
2750
2754
|
}
|
|
2751
|
-
function
|
|
2755
|
+
function Ga(e) {
|
|
2752
2756
|
const t = k.getActiveEngine();
|
|
2753
2757
|
t && Ae(e) && t.instance.getAllSelected().length && (t.instance.unselectAll(), O("取消选中组件"));
|
|
2754
2758
|
}
|
|
2755
|
-
function
|
|
2759
|
+
function Xa(e, t) {
|
|
2756
2760
|
const n = Ae(t), i = Pe("shift"), c = k.getActiveEngine();
|
|
2757
2761
|
if (!c || e.lock && n && !i)
|
|
2758
2762
|
return;
|
|
2759
2763
|
t.stopPropagation();
|
|
2760
|
-
const
|
|
2761
|
-
if (n ||
|
|
2764
|
+
const o = Zt(t);
|
|
2765
|
+
if (n || o) {
|
|
2762
2766
|
if (c.instance.isSelected(e.id)) {
|
|
2763
2767
|
i && c.instance.unselect(e.id);
|
|
2764
2768
|
return;
|
|
@@ -2767,7 +2771,7 @@ function Va(e, t) {
|
|
|
2767
2771
|
c.instance.select(d, !i), O("选中组件");
|
|
2768
2772
|
}
|
|
2769
2773
|
}
|
|
2770
|
-
function
|
|
2774
|
+
function Ya(e) {
|
|
2771
2775
|
var s;
|
|
2772
2776
|
const t = e.getComponentNode();
|
|
2773
2777
|
if (!t || t != null && t.lock)
|
|
@@ -2776,15 +2780,15 @@ function Ga(e) {
|
|
|
2776
2780
|
if (!n)
|
|
2777
2781
|
throw new Error("dom must be set.");
|
|
2778
2782
|
let i = [], c = !1;
|
|
2779
|
-
const
|
|
2780
|
-
let d = !1,
|
|
2783
|
+
const o = n.style.pointerEvents;
|
|
2784
|
+
let d = !1, a;
|
|
2781
2785
|
return {
|
|
2782
2786
|
onStart() {
|
|
2783
2787
|
return ae.set("move"), setTimeout(() => {
|
|
2784
|
-
let { list: r, showCount: h } =
|
|
2785
|
-
i = r, c = h < 300,
|
|
2788
|
+
let { list: r, showCount: h } = pa();
|
|
2789
|
+
i = r, c = h < 300, a = Gt(
|
|
2786
2790
|
(u, _) => {
|
|
2787
|
-
|
|
2791
|
+
Za(i, c, u, _);
|
|
2788
2792
|
},
|
|
2789
2793
|
h < 100 ? 0 : 20,
|
|
2790
2794
|
{
|
|
@@ -2794,50 +2798,50 @@ function Ga(e) {
|
|
|
2794
2798
|
}), !1;
|
|
2795
2799
|
},
|
|
2796
2800
|
onMove(r, h) {
|
|
2797
|
-
d || (n.style.pointerEvents = "none", d = !0),
|
|
2801
|
+
d || (n.style.pointerEvents = "none", d = !0), a == null || a(r, h);
|
|
2798
2802
|
},
|
|
2799
2803
|
onEnd(r, h) {
|
|
2800
|
-
ae.revoke(), d && (n.style.pointerEvents =
|
|
2804
|
+
ae.revoke(), d && (n.style.pointerEvents = o, Qa(i, c, r, h), i != null && i.length && O("移动组件"), d = !1, a = void 0);
|
|
2801
2805
|
}
|
|
2802
2806
|
};
|
|
2803
2807
|
}
|
|
2804
|
-
function
|
|
2808
|
+
function Za(e, t, n, i) {
|
|
2805
2809
|
e.forEach((c) => {
|
|
2806
2810
|
if (!c.show) return;
|
|
2807
|
-
const
|
|
2811
|
+
const o = c.containerDom;
|
|
2808
2812
|
if (t)
|
|
2809
|
-
|
|
2813
|
+
o.style.transform = `translate3d(${n}px,${i}px, 0)`;
|
|
2810
2814
|
else {
|
|
2811
2815
|
const d = c.componentNode;
|
|
2812
|
-
|
|
2816
|
+
o.style.left = `${d.x + n}px`, o.style.top = `${d.y + i}px`;
|
|
2813
2817
|
}
|
|
2814
2818
|
});
|
|
2815
2819
|
}
|
|
2816
|
-
function
|
|
2820
|
+
function Qa(e, t, n, i) {
|
|
2817
2821
|
const c = k.getActiveEngine();
|
|
2818
|
-
c && e.forEach((
|
|
2819
|
-
|
|
2820
|
-
const d =
|
|
2822
|
+
c && e.forEach((o) => {
|
|
2823
|
+
o != null && o.show && t && o.containerDom.style.removeProperty("transform");
|
|
2824
|
+
const d = o == null ? void 0 : o.componentNode;
|
|
2821
2825
|
d && c.componentNode.update(d.id, {
|
|
2822
2826
|
x: Math.round(n + ((d == null ? void 0 : d.x) || 0)),
|
|
2823
2827
|
y: Math.round(i + ((d == null ? void 0 : d.y) || 0))
|
|
2824
2828
|
});
|
|
2825
2829
|
});
|
|
2826
2830
|
}
|
|
2827
|
-
function
|
|
2831
|
+
function pa() {
|
|
2828
2832
|
const e = k.getActiveEngine();
|
|
2829
2833
|
return e ? Oe().reduce(
|
|
2830
2834
|
(n, i) => {
|
|
2831
|
-
var d,
|
|
2835
|
+
var d, a, s, r;
|
|
2832
2836
|
const c = i.show ?? !0;
|
|
2833
2837
|
c && n.showCount++;
|
|
2834
|
-
const
|
|
2838
|
+
const o = {
|
|
2835
2839
|
id: i.id,
|
|
2836
2840
|
componentNode: i,
|
|
2837
2841
|
show: c,
|
|
2838
|
-
containerDom: (r = (s = (
|
|
2842
|
+
containerDom: (r = (s = (a = (d = e.instance) == null ? void 0 : d.get) == null ? void 0 : a.call(d, i.id)) == null ? void 0 : s.getContainerDom) == null ? void 0 : r.call(s)
|
|
2839
2843
|
};
|
|
2840
|
-
return n.list.push(
|
|
2844
|
+
return n.list.push(o), n;
|
|
2841
2845
|
},
|
|
2842
2846
|
{
|
|
2843
2847
|
showCount: 0,
|
|
@@ -2848,35 +2852,35 @@ function Za() {
|
|
|
2848
2852
|
list: []
|
|
2849
2853
|
};
|
|
2850
2854
|
}
|
|
2851
|
-
const
|
|
2852
|
-
rangeBox:
|
|
2853
|
-
},
|
|
2855
|
+
const eo = "_rangeBox_12c3t_59", to = {
|
|
2856
|
+
rangeBox: eo
|
|
2857
|
+
}, Tt = Gt((e, t) => {
|
|
2854
2858
|
const n = k.getActiveEngine();
|
|
2855
2859
|
if (!n) return;
|
|
2856
|
-
const i = n.componentNode.getAll().reduce((c,
|
|
2860
|
+
const i = n.componentNode.getAll().reduce((c, o) => {
|
|
2857
2861
|
const d = {
|
|
2858
|
-
x1:
|
|
2859
|
-
y1:
|
|
2860
|
-
x2:
|
|
2861
|
-
y2:
|
|
2862
|
-
},
|
|
2862
|
+
x1: o.x,
|
|
2863
|
+
y1: o.y,
|
|
2864
|
+
x2: o.x + o.width,
|
|
2865
|
+
y2: o.y + o.height
|
|
2866
|
+
}, a = {
|
|
2863
2867
|
x1: e.x,
|
|
2864
2868
|
y1: e.y,
|
|
2865
2869
|
x2: e.x + e.width,
|
|
2866
2870
|
y2: e.y + e.height
|
|
2867
2871
|
};
|
|
2868
|
-
return
|
|
2872
|
+
return Si(d, a) && (!o.lock || o.lock && Pe("shift")) && c.push(o.id), c;
|
|
2869
2873
|
}, []);
|
|
2870
2874
|
n.instance.select(i, !0), t == null || t(i);
|
|
2871
2875
|
}, 100);
|
|
2872
2876
|
let F;
|
|
2873
|
-
function
|
|
2877
|
+
function no(e) {
|
|
2874
2878
|
let t = { x: 0, y: 0 }, n = 1;
|
|
2875
|
-
function i(
|
|
2876
|
-
const
|
|
2879
|
+
function i(o = 0, d = 0) {
|
|
2880
|
+
const a = o * n, s = d * n, r = t.x + a, h = t.y + s, u = {
|
|
2877
2881
|
x: t.x,
|
|
2878
2882
|
y: t.y,
|
|
2879
|
-
width: Math.abs(
|
|
2883
|
+
width: Math.abs(o),
|
|
2880
2884
|
height: Math.abs(d)
|
|
2881
2885
|
};
|
|
2882
2886
|
return r < u.x && (u.x = r), h < u.y && (u.y = h), u.x /= n, u.y /= n, u;
|
|
@@ -2885,117 +2889,117 @@ function eo(e) {
|
|
|
2885
2889
|
F && (F == null || F.remove(), F = void 0);
|
|
2886
2890
|
}
|
|
2887
2891
|
return {
|
|
2888
|
-
onStart(
|
|
2892
|
+
onStart(o, d, a) {
|
|
2889
2893
|
const s = k.getActiveEngine();
|
|
2890
2894
|
if (!s)
|
|
2891
2895
|
return;
|
|
2892
2896
|
c();
|
|
2893
|
-
const { x: r = 0, y: h = 0 } =
|
|
2897
|
+
const { x: r = 0, y: h = 0 } = a || {};
|
|
2894
2898
|
n = s.config.getConfig().scale;
|
|
2895
2899
|
const u = e.getBoundingClientRect();
|
|
2896
|
-
t.x = r - u.x, t.y = h - u.y, F = document.createElement("div"), F.classList.add(
|
|
2900
|
+
t.x = r - u.x, t.y = h - u.y, F = document.createElement("div"), F.classList.add(to.rangeBox), F.style.zIndex = `${s.componentNode.getMaxLevel()}`, e.appendChild(F), ae.set("default");
|
|
2897
2901
|
},
|
|
2898
|
-
onMove(
|
|
2902
|
+
onMove(o, d) {
|
|
2899
2903
|
if (!F) return;
|
|
2900
|
-
const
|
|
2901
|
-
F.style.top = `${
|
|
2904
|
+
const a = i(o, d);
|
|
2905
|
+
F.style.top = `${a.y}px`, F.style.left = `${a.x}px`, F.style.width = `${a.width}px`, F.style.height = `${a.height}px`, F.style.borderWidth = "1px", Tt(a);
|
|
2902
2906
|
},
|
|
2903
|
-
onEnd(
|
|
2907
|
+
onEnd(o, d) {
|
|
2904
2908
|
c(), ae.revoke();
|
|
2905
|
-
const
|
|
2906
|
-
(
|
|
2909
|
+
const a = i(o, d);
|
|
2910
|
+
(a.width || a.height) && Tt(a, (s) => {
|
|
2907
2911
|
s.length && O("范围选中组件");
|
|
2908
2912
|
});
|
|
2909
2913
|
}
|
|
2910
2914
|
};
|
|
2911
2915
|
}
|
|
2912
|
-
function
|
|
2916
|
+
function io(e, t) {
|
|
2913
2917
|
return {
|
|
2914
2918
|
onEnd(n, i, c) {
|
|
2915
2919
|
setTimeout(() => {
|
|
2916
2920
|
var u;
|
|
2917
|
-
const
|
|
2918
|
-
if (!
|
|
2921
|
+
const o = k.getActiveEngine();
|
|
2922
|
+
if (!o)
|
|
2919
2923
|
return;
|
|
2920
|
-
const d =
|
|
2921
|
-
if (!
|
|
2924
|
+
const d = o.config.getConfig().scale, a = e.getComponentNode(), s = e.getContainerDom();
|
|
2925
|
+
if (!a || a != null && a.lock || !s)
|
|
2922
2926
|
return;
|
|
2923
|
-
const r = ((u = s == null ? void 0 : s.getBoundingClientRect) == null ? void 0 : u.call(s)) || { x: 0, y: 0 }, h =
|
|
2924
|
-
x: (c.x - r.x) / d +
|
|
2927
|
+
const r = ((u = s == null ? void 0 : s.getBoundingClientRect) == null ? void 0 : u.call(s)) || { x: 0, y: 0 }, h = co(a, {
|
|
2928
|
+
x: (c.x - r.x) / d + a.x,
|
|
2925
2929
|
// 鼠标在编辑器上的虚拟坐标
|
|
2926
|
-
y: (c.y - r.y) / d +
|
|
2930
|
+
y: (c.y - r.y) / d + a.y
|
|
2927
2931
|
});
|
|
2928
2932
|
t == null || t(h);
|
|
2929
2933
|
});
|
|
2930
2934
|
}
|
|
2931
2935
|
};
|
|
2932
2936
|
}
|
|
2933
|
-
function
|
|
2937
|
+
function lo(e, t) {
|
|
2934
2938
|
const n = k.getActiveEngine();
|
|
2935
2939
|
if (!n)
|
|
2936
2940
|
return;
|
|
2937
|
-
const i = n.componentNode.getAll().reduce((d,
|
|
2941
|
+
const i = n.componentNode.getAll().reduce((d, a) => {
|
|
2938
2942
|
var s;
|
|
2939
|
-
return (
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
}, {}), c = Object.values(i),
|
|
2943
|
-
return
|
|
2943
|
+
return (a.show ?? !0) && a.category === "layout" && // layout类组件
|
|
2944
|
+
a.id !== e.id && // 不能拖拽到自身(如果自身拖拽组件是layout类型时)
|
|
2945
|
+
Ni(t, n.componentNode.getCoordinate(a)) && (d[s = `${a.level}`] || (d[s] = [])).push(a), d;
|
|
2946
|
+
}, {}), c = Object.values(i), o = c[c.length - 1];
|
|
2947
|
+
return o == null ? void 0 : o[(o == null ? void 0 : o.length) - 1];
|
|
2944
2948
|
}
|
|
2945
|
-
function
|
|
2949
|
+
function co(e, t) {
|
|
2946
2950
|
const n = k.getActiveEngine();
|
|
2947
2951
|
if (!n)
|
|
2948
2952
|
return;
|
|
2949
|
-
const i =
|
|
2953
|
+
const i = lo(e, {
|
|
2950
2954
|
x: t.x,
|
|
2951
2955
|
y: t.y
|
|
2952
2956
|
});
|
|
2953
2957
|
if (i) {
|
|
2954
|
-
const
|
|
2955
|
-
if (!
|
|
2958
|
+
const o = i == null ? void 0 : i.currentPanelId;
|
|
2959
|
+
if (!o || n.componentNode.isInPanel(o, e))
|
|
2956
2960
|
return;
|
|
2957
|
-
const d = n.componentNode.getPanelName(
|
|
2961
|
+
const d = n.componentNode.getPanelName(o) || "目标";
|
|
2958
2962
|
return kt({
|
|
2959
2963
|
title: "移入提醒",
|
|
2960
2964
|
content: `确定放入面板“${d}”?`,
|
|
2961
|
-
onOk(
|
|
2965
|
+
onOk(a) {
|
|
2962
2966
|
n.instance.getAllSelected().forEach((s) => {
|
|
2963
2967
|
const r = n.componentNode.get(s.id);
|
|
2964
|
-
n.componentNode.insertPanel(
|
|
2965
|
-
}), n.instance.select(i.id, !0), O(`移入面板 “${d}”`),
|
|
2968
|
+
n.componentNode.insertPanel(o, r);
|
|
2969
|
+
}), n.instance.select(i.id, !0), O(`移入面板 “${d}”`), a();
|
|
2966
2970
|
}
|
|
2967
2971
|
});
|
|
2968
2972
|
}
|
|
2969
2973
|
const c = e.panelId;
|
|
2970
2974
|
if (c) {
|
|
2971
|
-
const
|
|
2975
|
+
const o = n.componentNode.getPanelName(c) || "目标";
|
|
2972
2976
|
return kt({
|
|
2973
2977
|
title: "移出提醒",
|
|
2974
|
-
content: `是否移出面板“${
|
|
2978
|
+
content: `是否移出面板“${o}”?`,
|
|
2975
2979
|
onOk(d) {
|
|
2976
|
-
n.instance.getAllSelected().forEach((
|
|
2977
|
-
const s = n.componentNode.get(
|
|
2978
|
-
n.componentNode.removeFromPanel(s), O(`移出面板 “${
|
|
2980
|
+
n.instance.getAllSelected().forEach((a) => {
|
|
2981
|
+
const s = n.componentNode.get(a.id);
|
|
2982
|
+
n.componentNode.removeFromPanel(s), O(`移出面板 “${o}”`);
|
|
2979
2983
|
}), d();
|
|
2980
2984
|
}
|
|
2981
2985
|
});
|
|
2982
2986
|
}
|
|
2983
2987
|
}
|
|
2984
|
-
function
|
|
2985
|
-
const t =
|
|
2988
|
+
function ao(e) {
|
|
2989
|
+
const t = j([]), { engine: n } = w();
|
|
2986
2990
|
function i() {
|
|
2987
|
-
var c,
|
|
2988
|
-
t != null && t.current.length && ((
|
|
2991
|
+
var c, o;
|
|
2992
|
+
t != null && t.current.length && ((o = (c = t == null ? void 0 : t.current) == null ? void 0 : c.forEach) == null || o.call(c, (d) => d == null ? void 0 : d()), t.current = []);
|
|
2989
2993
|
}
|
|
2990
2994
|
gt(e, {
|
|
2991
2995
|
mousedown(c) {
|
|
2992
2996
|
var m;
|
|
2993
|
-
const
|
|
2994
|
-
if (!
|
|
2997
|
+
const o = e.current;
|
|
2998
|
+
if (!o) throw new Error("dom must be exist.");
|
|
2995
2999
|
i();
|
|
2996
|
-
const d = Ae(c),
|
|
3000
|
+
const d = Ae(c), a = Zt(c), s = Pe("shift"), r = ct(c.target, oe.componentNodeId, !0), h = n.instance.get(r), u = (m = h == null ? void 0 : h.getComponentNode) == null ? void 0 : m.call(h), _ = a ? !0 : u != null && u.lock ? d && s : d;
|
|
2997
3001
|
if (h && u && _) {
|
|
2998
|
-
if (
|
|
3002
|
+
if (Xa(u, c), !(u != null && u.lock) && d) {
|
|
2999
3003
|
const v = ct(
|
|
3000
3004
|
c.target,
|
|
3001
3005
|
oe.dragDirection
|
|
@@ -3008,11 +3012,11 @@ function lo(e) {
|
|
|
3008
3012
|
scale: n.config.getConfig().scale,
|
|
3009
3013
|
hookQueue: [
|
|
3010
3014
|
// 监听拖拽大小
|
|
3011
|
-
v &&
|
|
3015
|
+
v && qa(u, c.target, v),
|
|
3012
3016
|
// 监听拖拽移动
|
|
3013
|
-
!v &&
|
|
3017
|
+
!v && Ya(h),
|
|
3014
3018
|
// 监听是否放置到 layout 组件
|
|
3015
|
-
|
|
3019
|
+
io(h, (C) => {
|
|
3016
3020
|
t.current.push(C);
|
|
3017
3021
|
})
|
|
3018
3022
|
]
|
|
@@ -3021,7 +3025,7 @@ function lo(e) {
|
|
|
3021
3025
|
}
|
|
3022
3026
|
return;
|
|
3023
3027
|
}
|
|
3024
|
-
|
|
3028
|
+
Ga(c), t.current.push(
|
|
3025
3029
|
St({
|
|
3026
3030
|
startX: c.x,
|
|
3027
3031
|
startY: c.y,
|
|
@@ -3029,30 +3033,30 @@ function lo(e) {
|
|
|
3029
3033
|
scale: n.config.getConfig().scale,
|
|
3030
3034
|
hookQueue: [
|
|
3031
3035
|
// 监听创建范围多选框(左键按住范围框选)
|
|
3032
|
-
d &&
|
|
3036
|
+
d && no(o)
|
|
3033
3037
|
]
|
|
3034
3038
|
})
|
|
3035
3039
|
);
|
|
3036
3040
|
}
|
|
3037
|
-
}),
|
|
3041
|
+
}), Qt(() => {
|
|
3038
3042
|
i();
|
|
3039
3043
|
});
|
|
3040
3044
|
}
|
|
3041
|
-
function
|
|
3042
|
-
const { engine: t } =
|
|
3043
|
-
|
|
3045
|
+
function oo(e) {
|
|
3046
|
+
const { engine: t } = w();
|
|
3047
|
+
un(e, {
|
|
3044
3048
|
accept: ["create-component"],
|
|
3045
3049
|
onDrop: (n, i) => {
|
|
3046
3050
|
const c = e.current;
|
|
3047
3051
|
if (!c)
|
|
3048
3052
|
throw new Error("dom must be exist.");
|
|
3049
|
-
const { data:
|
|
3050
|
-
if (!(
|
|
3053
|
+
const { data: o } = i;
|
|
3054
|
+
if (!(o == null ? void 0 : o.component))
|
|
3051
3055
|
return;
|
|
3052
|
-
const
|
|
3053
|
-
x: Math.round((n.x -
|
|
3056
|
+
const a = c.getBoundingClientRect(), s = t.config.getConfig().scale, r = t.componentNode.createFromComponent(o.component, {
|
|
3057
|
+
x: Math.round((n.x - a.x) / s),
|
|
3054
3058
|
// 真实坐标转为编辑器坐标 (scale 越小,编辑器面积越小,真实像素变化映射到虚拟像素越大)
|
|
3055
|
-
y: Math.round((n.y -
|
|
3059
|
+
y: Math.round((n.y - a.y) / s),
|
|
3056
3060
|
pageId: t.config.getCurrentPage()
|
|
3057
3061
|
});
|
|
3058
3062
|
t.componentNode.add(r), setTimeout(async () => {
|
|
@@ -3061,26 +3065,26 @@ function co(e) {
|
|
|
3061
3065
|
}
|
|
3062
3066
|
});
|
|
3063
3067
|
}
|
|
3064
|
-
function
|
|
3065
|
-
const { engine: t } =
|
|
3066
|
-
|
|
3068
|
+
function ro(e) {
|
|
3069
|
+
const { engine: t } = w();
|
|
3070
|
+
un(e, {
|
|
3067
3071
|
accept: ["create-favorite"],
|
|
3068
3072
|
onDrop: (n, i) => {
|
|
3069
3073
|
var b, I;
|
|
3070
3074
|
const c = e.current;
|
|
3071
3075
|
if (!c)
|
|
3072
3076
|
throw new Error("dom must be exist.");
|
|
3073
|
-
const
|
|
3074
|
-
(I = d.children) != null && I.length ||
|
|
3075
|
-
const
|
|
3076
|
-
(
|
|
3077
|
+
const o = c.getBoundingClientRect(), d = (b = i.data) == null ? void 0 : b.favorite;
|
|
3078
|
+
(I = d.children) != null && I.length || A.warn("收藏元素为空");
|
|
3079
|
+
const a = Math.round(n.x - o.x), s = Math.round(n.y - o.y), r = d.children[0], { x: h, y: u } = d.children.reduce(
|
|
3080
|
+
(y, f) => (y.x = Math.min(y.x, f.x), y.y = Math.min(y.y, f.y), y),
|
|
3077
3081
|
{
|
|
3078
3082
|
x: r.x,
|
|
3079
3083
|
y: r.y
|
|
3080
3084
|
}
|
|
3081
3085
|
), _ = t.config.getCurrentPage(), m = [], v = t.config.getConfig().scale, C = t.componentNode.cloneComponentNodes(d.children, {
|
|
3082
|
-
onClone(
|
|
3083
|
-
|
|
3086
|
+
onClone(y, f) {
|
|
3087
|
+
f.x = Math.round((a + (f.x - h)) / v), f.y = Math.round((s + (f.y - u)) / v), f.pageId = _, m.push(f.id);
|
|
3084
3088
|
}
|
|
3085
3089
|
});
|
|
3086
3090
|
t.componentNode.add(C), setTimeout(() => {
|
|
@@ -3089,11 +3093,11 @@ function ao(e) {
|
|
|
3089
3093
|
}
|
|
3090
3094
|
});
|
|
3091
3095
|
}
|
|
3092
|
-
const
|
|
3093
|
-
const { engine: e } =
|
|
3096
|
+
const so = () => {
|
|
3097
|
+
const { engine: e } = w(), t = j(null), n = j(null), i = Yt(), c = Xt(), o = L(() => {
|
|
3094
3098
|
if (i.length)
|
|
3095
3099
|
return c == null ? void 0 : c.map((d) => /* @__PURE__ */ l(
|
|
3096
|
-
|
|
3100
|
+
Wa,
|
|
3097
3101
|
{
|
|
3098
3102
|
componentNode: d,
|
|
3099
3103
|
packages: i
|
|
@@ -3101,43 +3105,43 @@ const oo = () => {
|
|
|
3101
3105
|
d.id
|
|
3102
3106
|
));
|
|
3103
3107
|
}, [c, i]);
|
|
3104
|
-
return
|
|
3108
|
+
return ao(n), _n(t), oo(n), ro(n), E(() => e.componentNode.onDelete((d) => {
|
|
3105
3109
|
e.page.removeGlobalComponentNode(d);
|
|
3106
3110
|
}), []), /* @__PURE__ */ l(
|
|
3107
3111
|
"div",
|
|
3108
3112
|
{
|
|
3109
3113
|
ref: t,
|
|
3110
|
-
className:
|
|
3114
|
+
className: jt.editor,
|
|
3111
3115
|
onMouseDown: () => De(),
|
|
3112
|
-
children: /* @__PURE__ */ l(
|
|
3116
|
+
children: /* @__PURE__ */ l(vi, { ref: n, className: jt.editor_render, children: o })
|
|
3113
3117
|
}
|
|
3114
3118
|
);
|
|
3115
|
-
},
|
|
3116
|
-
attributes:
|
|
3117
|
-
},
|
|
3118
|
-
singleInstanceAttributesBase_description:
|
|
3119
|
-
singleInstanceAttributesBase_body:
|
|
3120
|
-
singleInstanceAttributesBase_label:
|
|
3121
|
-
singleInstanceAttributesBase:
|
|
3122
|
-
},
|
|
3123
|
-
opacity0:
|
|
3124
|
-
editText:
|
|
3125
|
-
editText_text:
|
|
3119
|
+
}, uo = "_attributes_esabd_59", ho = {
|
|
3120
|
+
attributes: uo
|
|
3121
|
+
}, go = "_singleInstanceAttributesBase_description_x66dv_59", _o = "_singleInstanceAttributesBase_body_x66dv_64", mo = "_singleInstanceAttributesBase_label_x66dv_67", fo = "_singleInstanceAttributesBase_x66dv_59", Y = {
|
|
3122
|
+
singleInstanceAttributesBase_description: go,
|
|
3123
|
+
singleInstanceAttributesBase_body: _o,
|
|
3124
|
+
singleInstanceAttributesBase_label: mo,
|
|
3125
|
+
singleInstanceAttributesBase: fo
|
|
3126
|
+
}, yo = "_opacity0_1lvzj_59", vo = "_editText_1lvzj_62", bo = "_editText_text_1lvzj_69", Xe = {
|
|
3127
|
+
opacity0: yo,
|
|
3128
|
+
editText: vo,
|
|
3129
|
+
editText_text: bo
|
|
3126
3130
|
};
|
|
3127
|
-
function
|
|
3128
|
-
const [t, n] =
|
|
3129
|
-
function
|
|
3131
|
+
function Co(e) {
|
|
3132
|
+
const [t, n] = N(!1), [i, c] = N("");
|
|
3133
|
+
function o() {
|
|
3130
3134
|
c((e == null ? void 0 : e.value) || ""), n(!0);
|
|
3131
3135
|
}
|
|
3132
3136
|
function d() {
|
|
3133
|
-
var
|
|
3137
|
+
var a;
|
|
3134
3138
|
if (!i) {
|
|
3135
|
-
|
|
3139
|
+
A.warn(e == null ? void 0 : e.emptyMessage);
|
|
3136
3140
|
return;
|
|
3137
3141
|
}
|
|
3138
|
-
n(!1), (
|
|
3142
|
+
n(!1), (a = e == null ? void 0 : e.onChange) == null || a.call(e, i);
|
|
3139
3143
|
}
|
|
3140
|
-
return
|
|
3144
|
+
return E(() => {
|
|
3141
3145
|
n(!1);
|
|
3142
3146
|
}, [e == null ? void 0 : e.value]), /* @__PURE__ */ g("div", { className: Xe.editText, children: [
|
|
3143
3147
|
t ? /* @__PURE__ */ l(
|
|
@@ -3145,44 +3149,44 @@ function vo(e) {
|
|
|
3145
3149
|
{
|
|
3146
3150
|
value: i,
|
|
3147
3151
|
style: { width: "100%" },
|
|
3148
|
-
onChange: (
|
|
3152
|
+
onChange: (a) => c(a),
|
|
3149
3153
|
onPressEnter: () => {
|
|
3150
3154
|
t && d();
|
|
3151
3155
|
}
|
|
3152
3156
|
}
|
|
3153
3157
|
) : /* @__PURE__ */ l("b", { className: Xe.editText_text, title: `${(e == null ? void 0 : e.value) || ""}`, children: e == null ? void 0 : e.value }),
|
|
3154
3158
|
t ? /* @__PURE__ */ l(Q, { className: "icon_clickable", onClick: d }) : /* @__PURE__ */ l(
|
|
3155
|
-
|
|
3159
|
+
Ut,
|
|
3156
3160
|
{
|
|
3157
3161
|
className: $(Xe.opacity0, "icon_clickable"),
|
|
3158
|
-
onClick:
|
|
3162
|
+
onClick: o
|
|
3159
3163
|
}
|
|
3160
3164
|
)
|
|
3161
3165
|
] });
|
|
3162
3166
|
}
|
|
3163
|
-
function
|
|
3164
|
-
const { engine: e } =
|
|
3165
|
-
function
|
|
3167
|
+
function xo() {
|
|
3168
|
+
const { engine: e } = w(), { componentNode: t } = he(), [n] = M.useForm(), i = L(() => e.component.get(t == null ? void 0 : t.cId), [t == null ? void 0 : t.cId]), c = i == null ? void 0 : i.attributesComponent;
|
|
3169
|
+
function o(d) {
|
|
3166
3170
|
d || e.page.removeGlobalComponentNode(t == null ? void 0 : t.id);
|
|
3167
3171
|
}
|
|
3168
|
-
return
|
|
3172
|
+
return E(() => {
|
|
3169
3173
|
t && n.setFieldsValue({
|
|
3170
3174
|
...t,
|
|
3171
3175
|
isAllPage: !!(t != null && t.isAllPage)
|
|
3172
3176
|
});
|
|
3173
3177
|
}, [t]), /* @__PURE__ */ g(
|
|
3174
|
-
|
|
3178
|
+
M,
|
|
3175
3179
|
{
|
|
3176
3180
|
form: n,
|
|
3177
3181
|
className: Y.singleInstanceAttributesBase,
|
|
3178
3182
|
onValuesChange: (d) => {
|
|
3179
|
-
let
|
|
3180
|
-
d.hasOwnProperty("isAllPage") && (
|
|
3183
|
+
let a = "修改组件";
|
|
3184
|
+
d.hasOwnProperty("isAllPage") && (o(d.isAllPage), a = d.isAllPage ? "设置组件全页面" : "取消组件全页面"), e.componentNode.update(t == null ? void 0 : t.id, d), O(a);
|
|
3181
3185
|
},
|
|
3182
3186
|
children: [
|
|
3183
3187
|
/* @__PURE__ */ l("div", { className: Y.singleInstanceAttributesBase_description, children: /* @__PURE__ */ g(nt, { children: [
|
|
3184
3188
|
/* @__PURE__ */ l(H, { span: 24, style: { marginBottom: 6 }, children: /* @__PURE__ */ l(
|
|
3185
|
-
|
|
3189
|
+
Co,
|
|
3186
3190
|
{
|
|
3187
3191
|
emptyMessage: "请填写名称",
|
|
3188
3192
|
value: t == null ? void 0 : t.name,
|
|
@@ -3210,20 +3214,20 @@ function bo() {
|
|
|
3210
3214
|
/* @__PURE__ */ g("div", { children: [
|
|
3211
3215
|
/* @__PURE__ */ g(nt, { gutter: [8, 8], style: { fontSize: 12 }, children: [
|
|
3212
3216
|
/* @__PURE__ */ l(H, { span: 3, className: Y.singleInstanceAttributesBase_label, children: "X轴" }),
|
|
3213
|
-
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(
|
|
3217
|
+
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "x", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
|
|
3214
3218
|
/* @__PURE__ */ l(H, { span: 3, className: Y.singleInstanceAttributesBase_label, children: "Y轴" }),
|
|
3215
|
-
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(
|
|
3219
|
+
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "y", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
|
|
3216
3220
|
/* @__PURE__ */ l(H, { span: 3, className: Y.singleInstanceAttributesBase_label, children: "宽度" }),
|
|
3217
|
-
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(
|
|
3221
|
+
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "width", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
|
|
3218
3222
|
/* @__PURE__ */ l(H, { span: 3, className: Y.singleInstanceAttributesBase_label, children: "高度" }),
|
|
3219
|
-
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(
|
|
3223
|
+
/* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "height", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) })
|
|
3220
3224
|
] }),
|
|
3221
3225
|
/* @__PURE__ */ g(Le, { labelSpan: 4, children: [
|
|
3222
|
-
/* @__PURE__ */ l(T, { label: "层级", style: { marginTop: 8 }, labelSpan: 3, children: /* @__PURE__ */ l(
|
|
3223
|
-
/* @__PURE__ */ l(T, { label: "全页面", style: { marginTop: 8 }, labelTip: "每个页面都会显示", children: /* @__PURE__ */ l(
|
|
3226
|
+
/* @__PURE__ */ l(T, { label: "层级", style: { marginTop: 8 }, labelSpan: 3, children: /* @__PURE__ */ l(M.Item, { name: "level", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
|
|
3227
|
+
/* @__PURE__ */ l(T, { label: "全页面", style: { marginTop: 8 }, labelTip: "每个页面都会显示", children: /* @__PURE__ */ l(M.Item, { noStyle: !0, name: "isAllPage", valuePropName: "checked", children: /* @__PURE__ */ l(we, {}) }) })
|
|
3224
3228
|
] })
|
|
3225
3229
|
] }),
|
|
3226
|
-
t && c && /* @__PURE__ */ l("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ l(
|
|
3230
|
+
t && c && /* @__PURE__ */ l("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ l($t, { children: /* @__PURE__ */ l(
|
|
3227
3231
|
c,
|
|
3228
3232
|
{
|
|
3229
3233
|
componentNode: t,
|
|
@@ -3231,9 +3235,9 @@ function bo() {
|
|
|
3231
3235
|
e.componentNode.update(t == null ? void 0 : t.id, d), O("修改组件属性");
|
|
3232
3236
|
},
|
|
3233
3237
|
options: t == null ? void 0 : t.options,
|
|
3234
|
-
onChange: (d,
|
|
3238
|
+
onChange: (d, a) => {
|
|
3235
3239
|
e.componentNode.update(t == null ? void 0 : t.id, {
|
|
3236
|
-
options:
|
|
3240
|
+
options: a ? d : {
|
|
3237
3241
|
...t == null ? void 0 : t.options,
|
|
3238
3242
|
...d
|
|
3239
3243
|
}
|
|
@@ -3246,20 +3250,20 @@ function bo() {
|
|
|
3246
3250
|
}
|
|
3247
3251
|
);
|
|
3248
3252
|
}
|
|
3249
|
-
const
|
|
3250
|
-
dataSource:
|
|
3251
|
-
},
|
|
3252
|
-
requestDataSource:
|
|
3253
|
+
const Io = "_dataSource_1t8uf_59", ko = {
|
|
3254
|
+
dataSource: Io
|
|
3255
|
+
}, So = "_requestDataSource_147st_59", No = {
|
|
3256
|
+
requestDataSource: So
|
|
3253
3257
|
};
|
|
3254
|
-
function
|
|
3255
|
-
const t = k.getActiveEngine(), { componentNode: n } = he(), i =
|
|
3258
|
+
function wo(e) {
|
|
3259
|
+
const t = k.getActiveEngine(), { componentNode: n } = he(), i = L(() => {
|
|
3256
3260
|
var r, h;
|
|
3257
3261
|
return (h = (r = t == null ? void 0 : t.instance) == null ? void 0 : r.get) == null ? void 0 : h.call(r, n == null ? void 0 : n.id);
|
|
3258
3262
|
}, [n == null ? void 0 : n.id]), c = n == null ? void 0 : n.request, {
|
|
3259
|
-
data:
|
|
3263
|
+
data: o,
|
|
3260
3264
|
loading: d,
|
|
3261
|
-
refresh:
|
|
3262
|
-
} =
|
|
3265
|
+
refresh: a
|
|
3266
|
+
} = pt(
|
|
3263
3267
|
async () => {
|
|
3264
3268
|
var r, h;
|
|
3265
3269
|
return (h = (r = i == null ? void 0 : i.request) == null ? void 0 : r.call(i, void 0, !0)) == null ? void 0 : h.then((u) => typeof u == "object" && u ? JSON.stringify(u, null, " ") : `${u ?? null}`);
|
|
@@ -3277,7 +3281,7 @@ function So(e) {
|
|
|
3277
3281
|
}
|
|
3278
3282
|
}));
|
|
3279
3283
|
}
|
|
3280
|
-
return /* @__PURE__ */ g("div", { style: e == null ? void 0 : e.style, className:
|
|
3284
|
+
return /* @__PURE__ */ g("div", { style: e == null ? void 0 : e.style, className: No.requestDataSource, children: [
|
|
3281
3285
|
/* @__PURE__ */ l(T, { label: "请求类型", children: /* @__PURE__ */ l(
|
|
3282
3286
|
Ce,
|
|
3283
3287
|
{
|
|
@@ -3345,7 +3349,7 @@ function So(e) {
|
|
|
3345
3349
|
{
|
|
3346
3350
|
className: "icon_clickable",
|
|
3347
3351
|
onClick: () => {
|
|
3348
|
-
|
|
3352
|
+
a();
|
|
3349
3353
|
}
|
|
3350
3354
|
}
|
|
3351
3355
|
) })
|
|
@@ -3356,35 +3360,35 @@ function So(e) {
|
|
|
3356
3360
|
readOnly: !0,
|
|
3357
3361
|
minimap: !1,
|
|
3358
3362
|
language: "json",
|
|
3359
|
-
value: d ? "" :
|
|
3363
|
+
value: d ? "" : o,
|
|
3360
3364
|
style: { flex: 1, minHeight: 200, maxHeight: 400 }
|
|
3361
3365
|
}
|
|
3362
3366
|
)
|
|
3363
3367
|
] });
|
|
3364
3368
|
}
|
|
3365
|
-
const
|
|
3366
|
-
staticDataSource:
|
|
3369
|
+
const Eo = "_staticDataSource_1p3pl_59", Ao = {
|
|
3370
|
+
staticDataSource: Eo
|
|
3367
3371
|
};
|
|
3368
|
-
function
|
|
3369
|
-
const { engine: t } =
|
|
3370
|
-
function
|
|
3372
|
+
function Lo(e) {
|
|
3373
|
+
const { engine: t } = w(), { componentNode: n } = he(), [i, c] = N("");
|
|
3374
|
+
function o() {
|
|
3371
3375
|
if (!i)
|
|
3372
|
-
return
|
|
3376
|
+
return A.warn("json格式不正确");
|
|
3373
3377
|
try {
|
|
3374
3378
|
const d = JSON.parse(i);
|
|
3375
3379
|
t.componentNode.update(n == null ? void 0 : n.id, {
|
|
3376
3380
|
staticDataSource: d
|
|
3377
|
-
}),
|
|
3381
|
+
}), A.success("修改成功"), O("修改静态数据");
|
|
3378
3382
|
} catch {
|
|
3379
|
-
|
|
3383
|
+
A.warn("json格式不正确");
|
|
3380
3384
|
}
|
|
3381
3385
|
}
|
|
3382
|
-
return
|
|
3386
|
+
return E(() => {
|
|
3383
3387
|
c(
|
|
3384
3388
|
n != null && n.staticDataSource ? JSON.stringify((n == null ? void 0 : n.staticDataSource) || {}, null, " ") : ""
|
|
3385
3389
|
);
|
|
3386
|
-
}, [n]), /* @__PURE__ */ g("div", { className:
|
|
3387
|
-
/* @__PURE__ */ l(T, { label: "配置数据", children: /* @__PURE__ */ l(z, { title: "保存", children: /* @__PURE__ */ l(Q, { className: "icon_clickable", onClick:
|
|
3390
|
+
}, [n]), /* @__PURE__ */ g("div", { className: Ao.staticDataSource, style: e == null ? void 0 : e.style, children: [
|
|
3391
|
+
/* @__PURE__ */ l(T, { label: "配置数据", children: /* @__PURE__ */ l(z, { title: "保存", children: /* @__PURE__ */ l(Q, { className: "icon_clickable", onClick: o }) }) }),
|
|
3388
3392
|
/* @__PURE__ */ l(
|
|
3389
3393
|
X,
|
|
3390
3394
|
{
|
|
@@ -3400,20 +3404,20 @@ function Eo(e) {
|
|
|
3400
3404
|
)
|
|
3401
3405
|
] });
|
|
3402
3406
|
}
|
|
3403
|
-
const
|
|
3407
|
+
const Do = [
|
|
3404
3408
|
{ label: "静态数据", value: "static" },
|
|
3405
3409
|
{ label: "请求接口", value: "request" }
|
|
3406
3410
|
];
|
|
3407
|
-
function
|
|
3408
|
-
const { engine: e } =
|
|
3409
|
-
return /* @__PURE__ */ l(Le, { labelSpan: 5, children: /* @__PURE__ */ g("div", { className:
|
|
3411
|
+
function Oo() {
|
|
3412
|
+
const { engine: e } = w(), { componentNode: t } = he(), n = (t == null ? void 0 : t.dataSourceType) ?? "static";
|
|
3413
|
+
return /* @__PURE__ */ l(Le, { labelSpan: 5, children: /* @__PURE__ */ g("div", { className: ko.dataSource, children: [
|
|
3410
3414
|
/* @__PURE__ */ l(T, { label: "数据源", children: /* @__PURE__ */ l(
|
|
3411
3415
|
Ce,
|
|
3412
3416
|
{
|
|
3413
3417
|
value: n,
|
|
3414
3418
|
allowClear: !1,
|
|
3415
3419
|
style: { width: "100%" },
|
|
3416
|
-
requestFn: async () =>
|
|
3420
|
+
requestFn: async () => Do,
|
|
3417
3421
|
onChange: (i) => {
|
|
3418
3422
|
e.componentNode.update(t == null ? void 0 : t.id, {
|
|
3419
3423
|
dataSourceType: i
|
|
@@ -3421,22 +3425,22 @@ function Lo() {
|
|
|
3421
3425
|
}
|
|
3422
3426
|
}
|
|
3423
3427
|
) }),
|
|
3424
|
-
n === "static" && /* @__PURE__ */ l(
|
|
3425
|
-
n === "request" && /* @__PURE__ */ l(
|
|
3428
|
+
n === "static" && /* @__PURE__ */ l(Lo, { style: { flex: 1, overflow: "hidden" } }),
|
|
3429
|
+
n === "request" && /* @__PURE__ */ l(wo, { style: { flex: 1, overflow: "hidden" } })
|
|
3426
3430
|
] }) });
|
|
3427
3431
|
}
|
|
3428
|
-
const
|
|
3429
|
-
interactive:
|
|
3432
|
+
const Po = "_interactive_1j74j_59", Bo = {
|
|
3433
|
+
interactive: Po
|
|
3430
3434
|
};
|
|
3431
|
-
function
|
|
3432
|
-
const { componentNode: t } = e, { engine: n } =
|
|
3435
|
+
function Mo(e) {
|
|
3436
|
+
const { componentNode: t } = e, { engine: n } = w(), [i, c] = N([]), o = L(
|
|
3433
3437
|
() => n.component.get(t == null ? void 0 : t.cId),
|
|
3434
3438
|
[t == null ? void 0 : t.cId]
|
|
3435
3439
|
);
|
|
3436
|
-
return
|
|
3437
|
-
var d,
|
|
3440
|
+
return E(() => {
|
|
3441
|
+
var d, a;
|
|
3438
3442
|
c(
|
|
3439
|
-
((
|
|
3443
|
+
((a = (d = o == null ? void 0 : o.triggers) == null ? void 0 : d.map) == null ? void 0 : a.call(d, (s) => {
|
|
3440
3444
|
var r;
|
|
3441
3445
|
return {
|
|
3442
3446
|
disabled: !!((r = t == null ? void 0 : t.events) != null && r.find((h) => h.triggerId === s.value)),
|
|
@@ -3446,40 +3450,40 @@ function Po(e) {
|
|
|
3446
3450
|
};
|
|
3447
3451
|
})) || []
|
|
3448
3452
|
);
|
|
3449
|
-
}, [
|
|
3453
|
+
}, [o, t]), /* @__PURE__ */ l(
|
|
3450
3454
|
be,
|
|
3451
3455
|
{
|
|
3452
3456
|
trigger: ["click"],
|
|
3453
3457
|
menu: {
|
|
3454
3458
|
items: i,
|
|
3455
3459
|
onClick: ({ key: d }) => {
|
|
3456
|
-
var
|
|
3457
|
-
(
|
|
3460
|
+
var a;
|
|
3461
|
+
(a = e == null ? void 0 : e.onSelect) == null || a.call(e, d);
|
|
3458
3462
|
}
|
|
3459
3463
|
},
|
|
3460
3464
|
children: /* @__PURE__ */ l(K, { type: "dashed", block: !0, icon: /* @__PURE__ */ l(rt, {}), children: "组件绑定事件" })
|
|
3461
3465
|
}
|
|
3462
3466
|
);
|
|
3463
3467
|
}
|
|
3464
|
-
const
|
|
3465
|
-
eventList:
|
|
3466
|
-
eventList_head:
|
|
3467
|
-
eventList_body:
|
|
3468
|
-
eventList_item:
|
|
3469
|
-
eventList_item_body:
|
|
3470
|
-
eventList_item_opt:
|
|
3471
|
-
eventList_item_opt_clickable:
|
|
3472
|
-
},
|
|
3473
|
-
editEventDialog:
|
|
3474
|
-
editEventDialog_menu:
|
|
3475
|
-
editEventDialog_body:
|
|
3476
|
-
},
|
|
3477
|
-
eventOptions_main:
|
|
3468
|
+
const jo = "_eventList_19gi2_59", To = "_eventList_head_19gi2_62", zo = "_eventList_body_19gi2_68", $o = "_eventList_item_19gi2_74", Ro = "_eventList_item_body_19gi2_84", Fo = "_eventList_item_opt_19gi2_90", Ho = "_eventList_item_opt_clickable_19gi2_95", G = {
|
|
3469
|
+
eventList: jo,
|
|
3470
|
+
eventList_head: To,
|
|
3471
|
+
eventList_body: zo,
|
|
3472
|
+
eventList_item: $o,
|
|
3473
|
+
eventList_item_body: Ro,
|
|
3474
|
+
eventList_item_opt: Fo,
|
|
3475
|
+
eventList_item_opt_clickable: Ho
|
|
3476
|
+
}, Ko = "_editEventDialog_11y5n_59", Uo = "_editEventDialog_menu_11y5n_63", qo = "_editEventDialog_body_11y5n_78", Ye = {
|
|
3477
|
+
editEventDialog: Ko,
|
|
3478
|
+
editEventDialog_menu: Uo,
|
|
3479
|
+
editEventDialog_body: qo
|
|
3480
|
+
}, Jo = "_eventOptions_main_16n1f_59", Be = {
|
|
3481
|
+
eventOptions_main: Jo
|
|
3478
3482
|
};
|
|
3479
|
-
function
|
|
3483
|
+
function Wo(e) {
|
|
3480
3484
|
var t;
|
|
3481
3485
|
return /* @__PURE__ */ l("div", { className: Be.eventOptions_main, children: /* @__PURE__ */ l(T, { label: "组件显示", labelSpan: 3, children: /* @__PURE__ */ l(
|
|
3482
|
-
|
|
3486
|
+
qt,
|
|
3483
3487
|
{
|
|
3484
3488
|
size: "small",
|
|
3485
3489
|
checked: (t = e == null ? void 0 : e.value) == null ? void 0 : t.visible,
|
|
@@ -3493,9 +3497,9 @@ function qo(e) {
|
|
|
3493
3497
|
}
|
|
3494
3498
|
) }) });
|
|
3495
3499
|
}
|
|
3496
|
-
const
|
|
3497
|
-
const [t, n] =
|
|
3498
|
-
return
|
|
3500
|
+
const Vo = ue((e) => {
|
|
3501
|
+
const [t, n] = zt.useState();
|
|
3502
|
+
return E(() => {
|
|
3499
3503
|
var i;
|
|
3500
3504
|
e != null && e.visible && n((i = e == null ? void 0 : e.params) == null ? void 0 : i.text);
|
|
3501
3505
|
}, [e == null ? void 0 : e.visible]), /* @__PURE__ */ g(
|
|
@@ -3539,7 +3543,7 @@ const Jo = ue((e) => {
|
|
|
3539
3543
|
{
|
|
3540
3544
|
language: "javascript",
|
|
3541
3545
|
style: { height: 450 },
|
|
3542
|
-
value: t ??
|
|
3546
|
+
value: t ?? Mi,
|
|
3543
3547
|
onChange: n
|
|
3544
3548
|
}
|
|
3545
3549
|
)
|
|
@@ -3547,13 +3551,13 @@ const Jo = ue((e) => {
|
|
|
3547
3551
|
}
|
|
3548
3552
|
);
|
|
3549
3553
|
});
|
|
3550
|
-
function
|
|
3551
|
-
const t =
|
|
3554
|
+
function mn(e) {
|
|
3555
|
+
const t = Vo({
|
|
3552
3556
|
onOk(i) {
|
|
3553
3557
|
var c;
|
|
3554
3558
|
(c = e == null ? void 0 : e.onChange) == null || c.call(e, i);
|
|
3555
3559
|
}
|
|
3556
|
-
}), n =
|
|
3560
|
+
}), n = L(() => e != null && e.tooltip ? /* @__PURE__ */ l(z, { title: e == null ? void 0 : e.tooltip, children: /* @__PURE__ */ l("span", { children: "{}" }) }) : /* @__PURE__ */ l("span", { children: "{}" }), [e == null ? void 0 : e.tooltip]);
|
|
3557
3561
|
return /* @__PURE__ */ l(W, { children: /* @__PURE__ */ l(
|
|
3558
3562
|
"span",
|
|
3559
3563
|
{
|
|
@@ -3568,33 +3572,33 @@ function _n(e) {
|
|
|
3568
3572
|
}
|
|
3569
3573
|
) });
|
|
3570
3574
|
}
|
|
3571
|
-
const
|
|
3575
|
+
const Go = /* @__PURE__ */ g("div", { children: [
|
|
3572
3576
|
/* @__PURE__ */ l("div", { children: "格式参考:" }),
|
|
3573
3577
|
/* @__PURE__ */ l("div", { style: { whiteSpace: "pre-wrap", padding: "12px 0" }, children: JSON.stringify({ name: "tjh", age: 25 }, null, " ") })
|
|
3574
3578
|
] });
|
|
3575
|
-
function
|
|
3576
|
-
var
|
|
3577
|
-
const t = ((
|
|
3579
|
+
function Xo(e) {
|
|
3580
|
+
var a, s, r;
|
|
3581
|
+
const t = ((a = e == null ? void 0 : e.value) == null ? void 0 : a.type) || "default", [n, i] = N(), [c, o] = N("");
|
|
3578
3582
|
function d() {
|
|
3579
3583
|
var h;
|
|
3580
3584
|
try {
|
|
3581
3585
|
const u = JSON.parse(c);
|
|
3582
3586
|
if (typeof u != "object" || u === null) {
|
|
3583
|
-
|
|
3587
|
+
A.warn("只能保存对象格式数据");
|
|
3584
3588
|
return;
|
|
3585
3589
|
}
|
|
3586
3590
|
(h = e == null ? void 0 : e.onChange) == null || h.call(e, {
|
|
3587
3591
|
...e == null ? void 0 : e.value,
|
|
3588
3592
|
params: u
|
|
3589
|
-
}),
|
|
3593
|
+
}), A.success("更新成功");
|
|
3590
3594
|
} catch {
|
|
3591
|
-
|
|
3595
|
+
A.warn("JSON格式不正确");
|
|
3592
3596
|
}
|
|
3593
3597
|
}
|
|
3594
|
-
return
|
|
3598
|
+
return E(() => {
|
|
3595
3599
|
var h;
|
|
3596
|
-
|
|
3597
|
-
}, [(s = e == null ? void 0 : e.value) == null ? void 0 : s.params]),
|
|
3600
|
+
o(JSON.stringify(((h = e == null ? void 0 : e.value) == null ? void 0 : h.params) || {}, null, " "));
|
|
3601
|
+
}, [(s = e == null ? void 0 : e.value) == null ? void 0 : s.params]), E(() => {
|
|
3598
3602
|
var h;
|
|
3599
3603
|
i((h = e == null ? void 0 : e.value) == null ? void 0 : h.parserFunc);
|
|
3600
3604
|
}, [(r = e == null ? void 0 : e.value) == null ? void 0 : r.parserFunc]), /* @__PURE__ */ g("div", { className: Be.eventOptions_main, children: [
|
|
@@ -3622,7 +3626,7 @@ function Vo(e) {
|
|
|
3622
3626
|
}
|
|
3623
3627
|
),
|
|
3624
3628
|
/* @__PURE__ */ l(
|
|
3625
|
-
|
|
3629
|
+
mn,
|
|
3626
3630
|
{
|
|
3627
3631
|
tooltip: "解析函数",
|
|
3628
3632
|
value: n,
|
|
@@ -3638,7 +3642,7 @@ function Vo(e) {
|
|
|
3638
3642
|
] })
|
|
3639
3643
|
] }),
|
|
3640
3644
|
t === "json" && /* @__PURE__ */ g(D, { style: { width: "100%" }, direction: "vertical", size: 2, children: [
|
|
3641
|
-
/* @__PURE__ */ l(T, { label: "json对象", labelSpan: 3, labelTip:
|
|
3645
|
+
/* @__PURE__ */ l(T, { label: "json对象", labelSpan: 3, labelTip: Go, children: /* @__PURE__ */ l(z, { title: "更新", children: /* @__PURE__ */ l(Q, { onClick: d, className: "icon_clickable" }) }) }),
|
|
3642
3646
|
/* @__PURE__ */ l(
|
|
3643
3647
|
X,
|
|
3644
3648
|
{
|
|
@@ -3646,30 +3650,30 @@ function Vo(e) {
|
|
|
3646
3650
|
language: "json",
|
|
3647
3651
|
style: { height: 380 },
|
|
3648
3652
|
onChange: (h) => {
|
|
3649
|
-
|
|
3653
|
+
o(h);
|
|
3650
3654
|
}
|
|
3651
3655
|
}
|
|
3652
3656
|
)
|
|
3653
3657
|
] })
|
|
3654
3658
|
] });
|
|
3655
3659
|
}
|
|
3656
|
-
function
|
|
3657
|
-
var
|
|
3658
|
-
const [t, n] =
|
|
3660
|
+
function Yo(e) {
|
|
3661
|
+
var o;
|
|
3662
|
+
const [t, n] = N();
|
|
3659
3663
|
function i(d) {
|
|
3660
|
-
var
|
|
3661
|
-
(
|
|
3664
|
+
var a;
|
|
3665
|
+
(a = e == null ? void 0 : e.onChange) == null || a.call(e, {
|
|
3662
3666
|
...e == null ? void 0 : e.value,
|
|
3663
3667
|
function: d
|
|
3664
3668
|
});
|
|
3665
3669
|
}
|
|
3666
3670
|
function c() {
|
|
3667
|
-
i(void 0), n(void 0),
|
|
3671
|
+
i(void 0), n(void 0), A.success("重置成功");
|
|
3668
3672
|
}
|
|
3669
|
-
return
|
|
3673
|
+
return E(() => {
|
|
3670
3674
|
var d;
|
|
3671
3675
|
n((d = e == null ? void 0 : e.value) == null ? void 0 : d.function);
|
|
3672
|
-
}, [(
|
|
3676
|
+
}, [(o = e == null ? void 0 : e.value) == null ? void 0 : o.function]), /* @__PURE__ */ l("div", { className: Be.eventOptions_main, children: /* @__PURE__ */ g(D, { style: { width: "100%" }, direction: "vertical", size: 4, children: [
|
|
3673
3677
|
/* @__PURE__ */ l(T, { label: "函数内容", labelSpan: 3, children: /* @__PURE__ */ l(
|
|
3674
3678
|
"div",
|
|
3675
3679
|
{
|
|
@@ -3679,13 +3683,13 @@ function Go(e) {
|
|
|
3679
3683
|
alignItems: "center",
|
|
3680
3684
|
justifyContent: "space-between"
|
|
3681
3685
|
},
|
|
3682
|
-
children: /* @__PURE__ */ l(z, { title: "重置", children: /* @__PURE__ */ l(
|
|
3686
|
+
children: /* @__PURE__ */ l(z, { title: "重置", children: /* @__PURE__ */ l(Yn, { onClick: c, className: "icon_clickable" }) })
|
|
3683
3687
|
}
|
|
3684
3688
|
) }),
|
|
3685
3689
|
/* @__PURE__ */ l(
|
|
3686
3690
|
X,
|
|
3687
3691
|
{
|
|
3688
|
-
value: t ??
|
|
3692
|
+
value: t ?? ji,
|
|
3689
3693
|
language: "javascript",
|
|
3690
3694
|
style: { height: 440 },
|
|
3691
3695
|
onChange: (d) => {
|
|
@@ -3695,35 +3699,35 @@ function Go(e) {
|
|
|
3695
3699
|
)
|
|
3696
3700
|
] }) });
|
|
3697
3701
|
}
|
|
3698
|
-
const
|
|
3702
|
+
const Zo = {
|
|
3699
3703
|
default: void 0,
|
|
3700
3704
|
number: 0,
|
|
3701
3705
|
text: "",
|
|
3702
3706
|
json: {}
|
|
3703
3707
|
};
|
|
3704
|
-
function
|
|
3705
|
-
var r, h, u, _, m, v, C, b, I,
|
|
3706
|
-
const { onChange: t } = e, n = ((r = e == null ? void 0 : e.value) == null ? void 0 : r.type) || "default", i = ((h = e == null ? void 0 : e.value) == null ? void 0 : h.type) === "json", [c,
|
|
3708
|
+
function Qo(e) {
|
|
3709
|
+
var r, h, u, _, m, v, C, b, I, y, f;
|
|
3710
|
+
const { onChange: t } = e, n = ((r = e == null ? void 0 : e.value) == null ? void 0 : r.type) || "default", i = ((h = e == null ? void 0 : e.value) == null ? void 0 : h.type) === "json", [c, o] = N(), [d, a] = N();
|
|
3707
3711
|
function s() {
|
|
3708
3712
|
var x;
|
|
3709
3713
|
if (!d)
|
|
3710
|
-
return
|
|
3714
|
+
return A.warn("json不能为空");
|
|
3711
3715
|
try {
|
|
3712
|
-
const
|
|
3713
|
-
typeof
|
|
3716
|
+
const S = JSON.parse(d || "");
|
|
3717
|
+
typeof S == "object" && S && ((x = e == null ? void 0 : e.onChange) == null || x.call(e, {
|
|
3714
3718
|
...e == null ? void 0 : e.value,
|
|
3715
|
-
value:
|
|
3716
|
-
}),
|
|
3719
|
+
value: S
|
|
3720
|
+
}), A.success("设置成功"));
|
|
3717
3721
|
} catch {
|
|
3718
|
-
|
|
3722
|
+
A.warn("json格式不正确");
|
|
3719
3723
|
}
|
|
3720
3724
|
}
|
|
3721
|
-
return
|
|
3725
|
+
return E(() => {
|
|
3722
3726
|
var x;
|
|
3723
|
-
|
|
3724
|
-
}, [(u = e == null ? void 0 : e.value) == null ? void 0 : u.parserFunc]),
|
|
3725
|
-
var x,
|
|
3726
|
-
((x = e == null ? void 0 : e.value) == null ? void 0 : x.type) === "json" &&
|
|
3727
|
+
o((x = e == null ? void 0 : e.value) == null ? void 0 : x.parserFunc);
|
|
3728
|
+
}, [(u = e == null ? void 0 : e.value) == null ? void 0 : u.parserFunc]), E(() => {
|
|
3729
|
+
var x, S;
|
|
3730
|
+
((x = e == null ? void 0 : e.value) == null ? void 0 : x.type) === "json" && a(JSON.stringify(((S = e == null ? void 0 : e.value) == null ? void 0 : S.value) || {}, null, " "));
|
|
3727
3731
|
}, [(_ = e == null ? void 0 : e.value) == null ? void 0 : _.type, (m = e == null ? void 0 : e.value) == null ? void 0 : m.value]), /* @__PURE__ */ g("div", { className: Be.eventOptions_main, children: [
|
|
3728
3732
|
/* @__PURE__ */ g(D, { direction: "vertical", size: 4, style: { width: "100%" }, children: [
|
|
3729
3733
|
/* @__PURE__ */ l(T, { label: "参数类型", labelSpan: 3, labelTip: "json数据格式为数组或对象" }),
|
|
@@ -3742,19 +3746,19 @@ function Yo(e) {
|
|
|
3742
3746
|
],
|
|
3743
3747
|
onChange: (x) => t({
|
|
3744
3748
|
...e == null ? void 0 : e.value,
|
|
3745
|
-
value:
|
|
3749
|
+
value: Zo[x],
|
|
3746
3750
|
type: x
|
|
3747
3751
|
})
|
|
3748
3752
|
}
|
|
3749
3753
|
),
|
|
3750
3754
|
/* @__PURE__ */ l(
|
|
3751
|
-
|
|
3755
|
+
mn,
|
|
3752
3756
|
{
|
|
3753
3757
|
tooltip: "解析函数",
|
|
3754
3758
|
value: c,
|
|
3755
3759
|
onChange: (x) => {
|
|
3756
|
-
var
|
|
3757
|
-
|
|
3760
|
+
var S;
|
|
3761
|
+
o(x), (S = e == null ? void 0 : e.onChange) == null || S.call(e, {
|
|
3758
3762
|
...e == null ? void 0 : e.value,
|
|
3759
3763
|
parserFunc: x
|
|
3760
3764
|
});
|
|
@@ -3780,11 +3784,11 @@ function Yo(e) {
|
|
|
3780
3784
|
}
|
|
3781
3785
|
}
|
|
3782
3786
|
),
|
|
3783
|
-
((
|
|
3784
|
-
|
|
3787
|
+
((y = e == null ? void 0 : e.value) == null ? void 0 : y.type) === "text" && /* @__PURE__ */ l(
|
|
3788
|
+
Ii,
|
|
3785
3789
|
{
|
|
3786
3790
|
style: { width: Ne * 2 },
|
|
3787
|
-
value: (
|
|
3791
|
+
value: (f = e == null ? void 0 : e.value) == null ? void 0 : f.value,
|
|
3788
3792
|
autoSize: { minRows: 3, maxRows: 3 },
|
|
3789
3793
|
onChange: (x) => {
|
|
3790
3794
|
t({
|
|
@@ -3801,7 +3805,7 @@ function Yo(e) {
|
|
|
3801
3805
|
style: { height: 375 },
|
|
3802
3806
|
value: d,
|
|
3803
3807
|
onChange: (x) => {
|
|
3804
|
-
|
|
3808
|
+
a(x);
|
|
3805
3809
|
}
|
|
3806
3810
|
}
|
|
3807
3811
|
)
|
|
@@ -3810,8 +3814,8 @@ function Yo(e) {
|
|
|
3810
3814
|
] });
|
|
3811
3815
|
}
|
|
3812
3816
|
const Ne = 200;
|
|
3813
|
-
function
|
|
3814
|
-
var i, c,
|
|
3817
|
+
function po(e) {
|
|
3818
|
+
var i, c, o, d, a;
|
|
3815
3819
|
const t = (i = e == null ? void 0 : e.value) == null ? void 0 : i.option;
|
|
3816
3820
|
function n(s) {
|
|
3817
3821
|
var r;
|
|
@@ -3820,22 +3824,22 @@ function Zo(e) {
|
|
|
3820
3824
|
option: s
|
|
3821
3825
|
}));
|
|
3822
3826
|
}
|
|
3823
|
-
return (c = e == null ? void 0 : e.value) != null && c.exposeId ? ((
|
|
3827
|
+
return (c = e == null ? void 0 : e.value) != null && c.exposeId ? ((o = e == null ? void 0 : e.value) == null ? void 0 : o.exposeId) === ze.visible ? /* @__PURE__ */ l(Wo, { value: t, onChange: n }) : ((d = e == null ? void 0 : e.value) == null ? void 0 : d.exposeId) === ze.request ? /* @__PURE__ */ l(Xo, { value: t, onChange: n }) : ((a = e == null ? void 0 : e.value) == null ? void 0 : a.exposeId) === ze.custom ? /* @__PURE__ */ l(Yo, { value: t, onChange: n }) : /* @__PURE__ */ l(Qo, { value: t, onChange: n }) : /* @__PURE__ */ l(U, { description: "请选中目标操作" });
|
|
3824
3828
|
}
|
|
3825
|
-
const
|
|
3826
|
-
targetList:
|
|
3827
|
-
targetList_body:
|
|
3828
|
-
targetList_item:
|
|
3829
|
-
targetList_item_clickable:
|
|
3830
|
-
targetList_item_selected:
|
|
3831
|
-
},
|
|
3832
|
-
addComponentNodeButton:
|
|
3833
|
-
addComponentNodeButton_body:
|
|
3834
|
-
addComponentNodeButton_item:
|
|
3835
|
-
addComponentNodeButton_item_text:
|
|
3836
|
-
dropdown_overlay:
|
|
3829
|
+
const ed = "_targetList_17cmb_59", td = "_targetList_body_17cmb_66", nd = "_targetList_item_17cmb_74", id = "_targetList_item_clickable_17cmb_82", ld = "_targetList_item_selected_17cmb_89", me = {
|
|
3830
|
+
targetList: ed,
|
|
3831
|
+
targetList_body: td,
|
|
3832
|
+
targetList_item: nd,
|
|
3833
|
+
targetList_item_clickable: id,
|
|
3834
|
+
targetList_item_selected: ld
|
|
3835
|
+
}, cd = "_addComponentNodeButton_xm0lb_59", ad = "_addComponentNodeButton_body_xm0lb_68", od = "_addComponentNodeButton_item_xm0lb_73", dd = "_addComponentNodeButton_item_text_xm0lb_84", rd = "_dropdown_overlay_xm0lb_93", fe = {
|
|
3836
|
+
addComponentNodeButton: cd,
|
|
3837
|
+
addComponentNodeButton_body: ad,
|
|
3838
|
+
addComponentNodeButton_item: od,
|
|
3839
|
+
addComponentNodeButton_item_text: dd,
|
|
3840
|
+
dropdown_overlay: rd
|
|
3837
3841
|
};
|
|
3838
|
-
function
|
|
3842
|
+
function sd(e) {
|
|
3839
3843
|
const { componentNode: t } = e;
|
|
3840
3844
|
return /* @__PURE__ */ g(D, { direction: "vertical", style: { fontSize: 12 }, className: "theme-color", size: 6, children: [
|
|
3841
3845
|
/* @__PURE__ */ g("div", { children: [
|
|
@@ -3856,31 +3860,31 @@ function dd(e) {
|
|
|
3856
3860
|
/* @__PURE__ */ g("div", { children: [
|
|
3857
3861
|
/* @__PURE__ */ l("b", { children: "show" }),
|
|
3858
3862
|
":",
|
|
3859
|
-
/* @__PURE__ */ l(
|
|
3863
|
+
/* @__PURE__ */ l(qt, { disabled: !0, size: "small", checked: (t == null ? void 0 : t.show) ?? !0 })
|
|
3860
3864
|
] })
|
|
3861
3865
|
] });
|
|
3862
3866
|
}
|
|
3863
|
-
function
|
|
3867
|
+
function ud(e) {
|
|
3864
3868
|
var _;
|
|
3865
|
-
const { engine: t } =
|
|
3866
|
-
|
|
3869
|
+
const { engine: t } = w(), [n, i] = N(!1), [c, o] = N([]), [d, a] = N(""), s = j();
|
|
3870
|
+
E(() => {
|
|
3867
3871
|
if (n) {
|
|
3868
3872
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
3869
3873
|
let m = t.componentNode.getAll();
|
|
3870
|
-
e != null && e.beforeVisible && (m = e == null ? void 0 : e.beforeVisible(m)),
|
|
3874
|
+
e != null && e.beforeVisible && (m = e == null ? void 0 : e.beforeVisible(m)), o(m), a("");
|
|
3871
3875
|
}
|
|
3872
3876
|
}, [n]);
|
|
3873
|
-
const r =
|
|
3877
|
+
const r = L(() => {
|
|
3874
3878
|
var v;
|
|
3875
3879
|
const m = (v = d == null ? void 0 : d.toLowerCase) == null ? void 0 : v.call(d);
|
|
3876
3880
|
return c.filter((C) => {
|
|
3877
|
-
var b, I,
|
|
3878
|
-
return (
|
|
3881
|
+
var b, I, y, f;
|
|
3882
|
+
return (f = (y = (I = (b = C == null ? void 0 : C.name) == null ? void 0 : b.toLowerCase) == null ? void 0 : I.call(b)) == null ? void 0 : y.includes) == null ? void 0 : f.call(y, m);
|
|
3879
3883
|
});
|
|
3880
3884
|
}, [d, c]);
|
|
3881
3885
|
function h() {
|
|
3882
3886
|
i(!1), s.current = setTimeout(() => {
|
|
3883
|
-
|
|
3887
|
+
o([]), s.current = null;
|
|
3884
3888
|
}, 300);
|
|
3885
3889
|
}
|
|
3886
3890
|
function u(m) {
|
|
@@ -3896,7 +3900,7 @@ function rd(e) {
|
|
|
3896
3900
|
{
|
|
3897
3901
|
key: "body",
|
|
3898
3902
|
label: /* @__PURE__ */ g("div", { className: fe.addComponentNodeButton, children: [
|
|
3899
|
-
/* @__PURE__ */ l(p, { placeholder: "搜索页面组件", value: d, onChange:
|
|
3903
|
+
/* @__PURE__ */ l(p, { placeholder: "搜索页面组件", value: d, onChange: a }),
|
|
3900
3904
|
/* @__PURE__ */ g("div", { className: fe.addComponentNodeButton_body, children: [
|
|
3901
3905
|
!(r != null && r.length) && /* @__PURE__ */ l(U, {}),
|
|
3902
3906
|
(_ = r == null ? void 0 : r.map) == null ? void 0 : _.call(r, (m) => {
|
|
@@ -3904,7 +3908,7 @@ function rd(e) {
|
|
|
3904
3908
|
return /* @__PURE__ */ l(
|
|
3905
3909
|
st,
|
|
3906
3910
|
{
|
|
3907
|
-
content: /* @__PURE__ */ l(
|
|
3911
|
+
content: /* @__PURE__ */ l(sd, { componentNode: m }),
|
|
3908
3912
|
placement: "right",
|
|
3909
3913
|
children: /* @__PURE__ */ g(
|
|
3910
3914
|
"div",
|
|
@@ -3951,11 +3955,11 @@ function rd(e) {
|
|
|
3951
3955
|
}
|
|
3952
3956
|
);
|
|
3953
3957
|
}
|
|
3954
|
-
function
|
|
3958
|
+
function hd(e) {
|
|
3955
3959
|
var d;
|
|
3956
|
-
const t = ht(), { engine: n } =
|
|
3957
|
-
var
|
|
3958
|
-
return (s = (
|
|
3960
|
+
const t = ht(), { engine: n } = w(), i = L(() => {
|
|
3961
|
+
var a, s;
|
|
3962
|
+
return (s = (a = e == null ? void 0 : e.targets) == null ? void 0 : a.map) == null ? void 0 : s.call(a, (r) => {
|
|
3959
3963
|
var h;
|
|
3960
3964
|
return {
|
|
3961
3965
|
value: r.id,
|
|
@@ -3963,24 +3967,24 @@ function sd(e) {
|
|
|
3963
3967
|
};
|
|
3964
3968
|
});
|
|
3965
3969
|
}, [e == null ? void 0 : e.targets]);
|
|
3966
|
-
function c(
|
|
3970
|
+
function c(a) {
|
|
3967
3971
|
var r;
|
|
3968
3972
|
const s = [
|
|
3969
3973
|
...(e == null ? void 0 : e.targets) || [],
|
|
3970
3974
|
{
|
|
3971
|
-
id:
|
|
3975
|
+
id: a.id,
|
|
3972
3976
|
opts: []
|
|
3973
3977
|
}
|
|
3974
3978
|
];
|
|
3975
3979
|
(r = e == null ? void 0 : e.onChangeTargets) == null || r.call(e, s, "add");
|
|
3976
3980
|
}
|
|
3977
|
-
function a
|
|
3981
|
+
function o(a) {
|
|
3978
3982
|
var _, m, v;
|
|
3979
3983
|
let s;
|
|
3980
|
-
const r = ((m = (_ = e == null ? void 0 : e.targets) == null ? void 0 : _.filter) == null ? void 0 : m.call(_, (C) => C.id ===
|
|
3984
|
+
const r = ((m = (_ = e == null ? void 0 : e.targets) == null ? void 0 : _.filter) == null ? void 0 : m.call(_, (C) => C.id === a ? (s = C, !1) : !0)) || [], h = ((v = s == null ? void 0 : s.opts) == null ? void 0 : v.length) || 0;
|
|
3981
3985
|
function u() {
|
|
3982
3986
|
var C, b, I;
|
|
3983
|
-
(C = e == null ? void 0 : e.onChangeTargets) == null || C.call(e, r, "delete"),
|
|
3987
|
+
(C = e == null ? void 0 : e.onChangeTargets) == null || C.call(e, r, "delete"), a === (e == null ? void 0 : e.value) && ((I = e == null ? void 0 : e.onChange) == null || I.call(e, (b = r == null ? void 0 : r[0]) == null ? void 0 : b.id));
|
|
3984
3988
|
}
|
|
3985
3989
|
if (h) {
|
|
3986
3990
|
t({
|
|
@@ -3996,19 +4000,19 @@ function sd(e) {
|
|
|
3996
4000
|
}
|
|
3997
4001
|
return /* @__PURE__ */ g("div", { className: $(me.targetList, e == null ? void 0 : e.className), style: e == null ? void 0 : e.style, children: [
|
|
3998
4002
|
/* @__PURE__ */ l(
|
|
3999
|
-
|
|
4003
|
+
ud,
|
|
4000
4004
|
{
|
|
4001
4005
|
style: { margin: -1 },
|
|
4002
|
-
beforeVisible: (
|
|
4006
|
+
beforeVisible: (a) => a.filter((s) => {
|
|
4003
4007
|
var r, h;
|
|
4004
4008
|
return !((h = (r = e == null ? void 0 : e.targets) == null ? void 0 : r.find) != null && h.call(r, (u) => u.id === (s == null ? void 0 : s.id)));
|
|
4005
4009
|
}),
|
|
4006
|
-
onSelect: (
|
|
4010
|
+
onSelect: (a) => c(a),
|
|
4007
4011
|
children: "新增目标组件"
|
|
4008
4012
|
}
|
|
4009
4013
|
),
|
|
4010
|
-
/* @__PURE__ */ l("div", { className: me.targetList_body, children: (d = i == null ? void 0 : i.map) == null ? void 0 : d.call(i, (
|
|
4011
|
-
const s = (
|
|
4014
|
+
/* @__PURE__ */ l("div", { className: me.targetList_body, children: (d = i == null ? void 0 : i.map) == null ? void 0 : d.call(i, (a) => {
|
|
4015
|
+
const s = (a == null ? void 0 : a.value) === (e == null ? void 0 : e.value);
|
|
4012
4016
|
return /* @__PURE__ */ g(
|
|
4013
4017
|
"div",
|
|
4014
4018
|
{
|
|
@@ -4018,53 +4022,53 @@ function sd(e) {
|
|
|
4018
4022
|
),
|
|
4019
4023
|
onClick: () => {
|
|
4020
4024
|
var r;
|
|
4021
|
-
return (r = e == null ? void 0 : e.onChange) == null ? void 0 : r.call(e,
|
|
4025
|
+
return (r = e == null ? void 0 : e.onChange) == null ? void 0 : r.call(e, a == null ? void 0 : a.value);
|
|
4022
4026
|
},
|
|
4023
4027
|
children: [
|
|
4024
|
-
|
|
4028
|
+
a == null ? void 0 : a.label,
|
|
4025
4029
|
/* @__PURE__ */ l(
|
|
4026
4030
|
de,
|
|
4027
4031
|
{
|
|
4028
4032
|
className: me.targetList_item_clickable,
|
|
4029
4033
|
onClick: (r) => {
|
|
4030
|
-
a
|
|
4034
|
+
o(a == null ? void 0 : a.value), r.stopPropagation();
|
|
4031
4035
|
}
|
|
4032
4036
|
}
|
|
4033
4037
|
)
|
|
4034
4038
|
]
|
|
4035
4039
|
},
|
|
4036
|
-
|
|
4040
|
+
a == null ? void 0 : a.value
|
|
4037
4041
|
);
|
|
4038
4042
|
}) }),
|
|
4039
4043
|
!(i != null && i.length) && /* @__PURE__ */ l(U, {})
|
|
4040
4044
|
] });
|
|
4041
4045
|
}
|
|
4042
|
-
const
|
|
4043
|
-
targetList:
|
|
4044
|
-
targetList_body:
|
|
4045
|
-
targetList_item:
|
|
4046
|
-
targetList_item_clickable:
|
|
4047
|
-
targetList_item_selected:
|
|
4048
|
-
},
|
|
4049
|
-
addExposesButton:
|
|
4050
|
-
addExposesButton_body:
|
|
4051
|
-
addExposesButton_item:
|
|
4052
|
-
addExposesButton_item_text:
|
|
4046
|
+
const gd = "_targetList_17cmb_59", _d = "_targetList_body_17cmb_66", md = "_targetList_item_17cmb_74", fd = "_targetList_item_clickable_17cmb_82", yd = "_targetList_item_selected_17cmb_89", ye = {
|
|
4047
|
+
targetList: gd,
|
|
4048
|
+
targetList_body: _d,
|
|
4049
|
+
targetList_item: md,
|
|
4050
|
+
targetList_item_clickable: fd,
|
|
4051
|
+
targetList_item_selected: yd
|
|
4052
|
+
}, vd = "_addExposesButton_1t3fz_59", bd = "_addExposesButton_body_1t3fz_68", Cd = "_addExposesButton_item_1t3fz_73", xd = "_addExposesButton_item_text_1t3fz_84", Se = {
|
|
4053
|
+
addExposesButton: vd,
|
|
4054
|
+
addExposesButton_body: bd,
|
|
4055
|
+
addExposesButton_item: Cd,
|
|
4056
|
+
addExposesButton_item_text: xd
|
|
4053
4057
|
};
|
|
4054
|
-
function
|
|
4058
|
+
function Id(e) {
|
|
4055
4059
|
var u;
|
|
4056
|
-
const { engine: t } =
|
|
4060
|
+
const { engine: t } = w(), [n, i] = N(!1), [c, o] = N([]), [d, a] = N(""), s = j(), r = L(() => {
|
|
4057
4061
|
var m;
|
|
4058
4062
|
const _ = (m = d == null ? void 0 : d.toLowerCase) == null ? void 0 : m.call(d);
|
|
4059
4063
|
return c.filter((v) => {
|
|
4060
|
-
var C, b, I,
|
|
4061
|
-
return (
|
|
4064
|
+
var C, b, I, y;
|
|
4065
|
+
return (y = (I = (b = (C = v == null ? void 0 : v.label) == null ? void 0 : C.toLowerCase) == null ? void 0 : b.call(C)) == null ? void 0 : I.includes) == null ? void 0 : y.call(I, _);
|
|
4062
4066
|
});
|
|
4063
4067
|
}, [d, c]);
|
|
4064
4068
|
function h() {
|
|
4065
4069
|
i(!1);
|
|
4066
4070
|
}
|
|
4067
|
-
return
|
|
4071
|
+
return E(() => {
|
|
4068
4072
|
var _;
|
|
4069
4073
|
if (n) {
|
|
4070
4074
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
@@ -4073,18 +4077,18 @@ function Cd(e) {
|
|
|
4073
4077
|
const v = t.component.get(e == null ? void 0 : e.cId);
|
|
4074
4078
|
m = (_ = (v == null ? void 0 : v.exposes) || []) == null ? void 0 : _.reduce(
|
|
4075
4079
|
(C, b) => (C.push({ label: b.label, value: b.value }), C),
|
|
4076
|
-
[...
|
|
4080
|
+
[...ri]
|
|
4077
4081
|
);
|
|
4078
4082
|
}
|
|
4079
|
-
e != null && e.beforeVisible && (m = e == null ? void 0 : e.beforeVisible(m)),
|
|
4083
|
+
e != null && e.beforeVisible && (m = e == null ? void 0 : e.beforeVisible(m)), o(m), a("");
|
|
4080
4084
|
}
|
|
4081
4085
|
}, [n]), /* @__PURE__ */ l(
|
|
4082
|
-
|
|
4086
|
+
xi,
|
|
4083
4087
|
{
|
|
4084
4088
|
visible: n,
|
|
4085
4089
|
onClose: h,
|
|
4086
4090
|
overlayChildren: /* @__PURE__ */ g("div", { className: Se.addExposesButton, children: [
|
|
4087
|
-
/* @__PURE__ */ l(p, { placeholder: "搜索组件操作", value: d, onChange:
|
|
4091
|
+
/* @__PURE__ */ l(p, { placeholder: "搜索组件操作", value: d, onChange: a }),
|
|
4088
4092
|
/* @__PURE__ */ g("div", { className: Se.addExposesButton_body, children: [
|
|
4089
4093
|
!(r != null && r.length) && /* @__PURE__ */ l(U, {}),
|
|
4090
4094
|
(u = r == null ? void 0 : r.map) == null ? void 0 : u.call(r, (_) => /* @__PURE__ */ l(
|
|
@@ -4115,53 +4119,53 @@ function Cd(e) {
|
|
|
4115
4119
|
}
|
|
4116
4120
|
);
|
|
4117
4121
|
}
|
|
4118
|
-
function
|
|
4122
|
+
function kd(e) {
|
|
4119
4123
|
var d;
|
|
4120
|
-
const { engine: t } =
|
|
4124
|
+
const { engine: t } = w(), n = L(() => {
|
|
4121
4125
|
var s, r;
|
|
4122
|
-
const
|
|
4126
|
+
const a = t.component.get(e == null ? void 0 : e.cId);
|
|
4123
4127
|
return {
|
|
4124
|
-
...
|
|
4125
|
-
...(r = (s =
|
|
4128
|
+
...si,
|
|
4129
|
+
...(r = (s = a == null ? void 0 : a.exposes) == null ? void 0 : s.reduce) == null ? void 0 : r.call(s, (h, u) => (h[u.value] = u.label, h), {})
|
|
4126
4130
|
};
|
|
4127
|
-
}, [e == null ? void 0 : e.cId]), i =
|
|
4128
|
-
var
|
|
4129
|
-
return (s = (
|
|
4131
|
+
}, [e == null ? void 0 : e.cId]), i = L(() => {
|
|
4132
|
+
var a, s;
|
|
4133
|
+
return (s = (a = e == null ? void 0 : e.opts) == null ? void 0 : a.map) == null ? void 0 : s.call(a, (r) => ({
|
|
4130
4134
|
value: r.operateId,
|
|
4131
4135
|
label: n[r.exposeId] || "-"
|
|
4132
4136
|
}));
|
|
4133
4137
|
}, [e == null ? void 0 : e.opts, n]);
|
|
4134
|
-
function c(
|
|
4138
|
+
function c(a) {
|
|
4135
4139
|
var r;
|
|
4136
4140
|
const s = [
|
|
4137
4141
|
...(e == null ? void 0 : e.opts) || [],
|
|
4138
4142
|
{
|
|
4139
4143
|
operateId: ut(),
|
|
4140
|
-
exposeId:
|
|
4144
|
+
exposeId: a.value,
|
|
4141
4145
|
option: {}
|
|
4142
4146
|
}
|
|
4143
4147
|
];
|
|
4144
4148
|
(r = e == null ? void 0 : e.onChangeOpts) == null || r.call(e, s);
|
|
4145
4149
|
}
|
|
4146
|
-
function a
|
|
4150
|
+
function o(a) {
|
|
4147
4151
|
var r, h, u, _, m;
|
|
4148
|
-
const s = ((h = (r = e == null ? void 0 : e.opts) == null ? void 0 : r.filter) == null ? void 0 : h.call(r, (v) => v.operateId !==
|
|
4149
|
-
(u = e == null ? void 0 : e.onChangeOpts) == null || u.call(e, s),
|
|
4152
|
+
const s = ((h = (r = e == null ? void 0 : e.opts) == null ? void 0 : r.filter) == null ? void 0 : h.call(r, (v) => v.operateId !== a)) || [];
|
|
4153
|
+
(u = e == null ? void 0 : e.onChangeOpts) == null || u.call(e, s), a === (e == null ? void 0 : e.value) && ((m = e == null ? void 0 : e.onChange) == null || m.call(e, (_ = s == null ? void 0 : s[0]) == null ? void 0 : _.operateId));
|
|
4150
4154
|
}
|
|
4151
4155
|
return /* @__PURE__ */ g("div", { className: $(ye.targetList, e == null ? void 0 : e.className), style: e == null ? void 0 : e.style, children: [
|
|
4152
4156
|
/* @__PURE__ */ l(
|
|
4153
|
-
|
|
4157
|
+
Id,
|
|
4154
4158
|
{
|
|
4155
4159
|
style: { margin: -1 },
|
|
4156
4160
|
cId: e == null ? void 0 : e.cId,
|
|
4157
|
-
onSelect: (
|
|
4161
|
+
onSelect: (a) => c(a),
|
|
4158
4162
|
children: "新增操作"
|
|
4159
4163
|
}
|
|
4160
4164
|
),
|
|
4161
4165
|
/* @__PURE__ */ g("div", { className: ye.targetList_body, children: [
|
|
4162
4166
|
!(i != null && i.length) && /* @__PURE__ */ l(U, {}),
|
|
4163
|
-
(d = i == null ? void 0 : i.map) == null ? void 0 : d.call(i, (
|
|
4164
|
-
const s = (
|
|
4167
|
+
(d = i == null ? void 0 : i.map) == null ? void 0 : d.call(i, (a) => {
|
|
4168
|
+
const s = (a == null ? void 0 : a.value) === (e == null ? void 0 : e.value);
|
|
4165
4169
|
return /* @__PURE__ */ g(
|
|
4166
4170
|
"div",
|
|
4167
4171
|
{
|
|
@@ -4171,76 +4175,76 @@ function xd(e) {
|
|
|
4171
4175
|
),
|
|
4172
4176
|
onClick: () => {
|
|
4173
4177
|
var r;
|
|
4174
|
-
return (r = e == null ? void 0 : e.onChange) == null ? void 0 : r.call(e,
|
|
4178
|
+
return (r = e == null ? void 0 : e.onChange) == null ? void 0 : r.call(e, a == null ? void 0 : a.value);
|
|
4175
4179
|
},
|
|
4176
4180
|
children: [
|
|
4177
|
-
|
|
4181
|
+
a == null ? void 0 : a.label,
|
|
4178
4182
|
/* @__PURE__ */ l(
|
|
4179
4183
|
de,
|
|
4180
4184
|
{
|
|
4181
4185
|
className: ye.targetList_item_clickable,
|
|
4182
4186
|
onClick: (r) => {
|
|
4183
|
-
a
|
|
4187
|
+
o(a == null ? void 0 : a.value), r.stopPropagation();
|
|
4184
4188
|
}
|
|
4185
4189
|
}
|
|
4186
4190
|
)
|
|
4187
4191
|
]
|
|
4188
4192
|
},
|
|
4189
|
-
|
|
4193
|
+
a == null ? void 0 : a.value
|
|
4190
4194
|
);
|
|
4191
4195
|
})
|
|
4192
4196
|
] })
|
|
4193
4197
|
] });
|
|
4194
4198
|
}
|
|
4195
|
-
const
|
|
4196
|
-
const { engine: t } =
|
|
4197
|
-
var
|
|
4198
|
-
return (
|
|
4199
|
-
}, [
|
|
4200
|
-
function _(
|
|
4201
|
-
var x,
|
|
4202
|
-
const
|
|
4203
|
-
s(
|
|
4199
|
+
const Sd = ue((e) => {
|
|
4200
|
+
const { engine: t } = w(), { componentNode: n, triggerId: i, triggerName: c } = (e == null ? void 0 : e.params) || {}, [o, d] = N(), [a, s] = N(), [r, h] = N(), u = L(() => {
|
|
4201
|
+
var y;
|
|
4202
|
+
return (y = t.componentNode.get(a == null ? void 0 : a.id)) == null ? void 0 : y.cId;
|
|
4203
|
+
}, [a]);
|
|
4204
|
+
function _(y) {
|
|
4205
|
+
var x, S, P;
|
|
4206
|
+
const f = (S = (x = o == null ? void 0 : o.targets) == null ? void 0 : x.find) == null ? void 0 : S.call(x, (R) => R.id === y);
|
|
4207
|
+
s(f), h((P = f == null ? void 0 : f.opts) == null ? void 0 : P[0]);
|
|
4204
4208
|
}
|
|
4205
|
-
function m(
|
|
4206
|
-
var
|
|
4209
|
+
function m(y) {
|
|
4210
|
+
var f, x;
|
|
4207
4211
|
h(
|
|
4208
|
-
(x = (
|
|
4212
|
+
(x = (f = a == null ? void 0 : a.opts) == null ? void 0 : f.find) == null ? void 0 : x.call(f, (S) => (S == null ? void 0 : S.operateId) === y)
|
|
4209
4213
|
);
|
|
4210
4214
|
}
|
|
4211
|
-
function v(
|
|
4215
|
+
function v(y, f) {
|
|
4212
4216
|
d({
|
|
4213
|
-
...
|
|
4214
|
-
targets:
|
|
4215
|
-
}),
|
|
4217
|
+
...o,
|
|
4218
|
+
targets: y
|
|
4219
|
+
}), f && y.length === 1 && s(y[y.length - 1]);
|
|
4216
4220
|
}
|
|
4217
|
-
function C(
|
|
4218
|
-
var
|
|
4219
|
-
(x = (
|
|
4221
|
+
function C(y) {
|
|
4222
|
+
var f, x;
|
|
4223
|
+
(x = (f = o == null ? void 0 : o.targets) == null ? void 0 : f.find) == null || x.call(f, (S) => S.id !== (a == null ? void 0 : a.id) ? !1 : (S.opts = y, !0)), d({ ...o }), y.length === 1 && h(y == null ? void 0 : y[0]);
|
|
4220
4224
|
}
|
|
4221
|
-
function b(
|
|
4222
|
-
var
|
|
4223
|
-
(x = (
|
|
4224
|
-
var
|
|
4225
|
-
return
|
|
4226
|
-
}), d({ ...
|
|
4225
|
+
function b(y) {
|
|
4226
|
+
var f, x;
|
|
4227
|
+
(x = (f = o == null ? void 0 : o.targets) == null ? void 0 : f.find) == null || x.call(f, (S) => {
|
|
4228
|
+
var P, R;
|
|
4229
|
+
return S.id !== (a == null ? void 0 : a.id) ? !1 : ((R = (P = S.opts) == null ? void 0 : P.find) == null || R.call(P, (q) => (q == null ? void 0 : q.operateId) !== (y == null ? void 0 : y.operateId) ? !1 : (Object.assign(q, y), !0)), !0);
|
|
4230
|
+
}), d({ ...o });
|
|
4227
4231
|
}
|
|
4228
4232
|
function I() {
|
|
4229
|
-
var
|
|
4230
|
-
(
|
|
4233
|
+
var y;
|
|
4234
|
+
(y = e == null ? void 0 : e.onOk) == null || y.call(e, o);
|
|
4231
4235
|
}
|
|
4232
|
-
return
|
|
4233
|
-
var
|
|
4236
|
+
return E(() => {
|
|
4237
|
+
var y, f, x, S;
|
|
4234
4238
|
if (e != null && e.visible) {
|
|
4235
4239
|
if (!i) {
|
|
4236
|
-
|
|
4240
|
+
A.error("triggerId不存在");
|
|
4237
4241
|
return;
|
|
4238
4242
|
}
|
|
4239
|
-
let
|
|
4240
|
-
|
|
4241
|
-
const R = (x =
|
|
4243
|
+
let P = (f = (y = n == null ? void 0 : n.events) == null ? void 0 : y.find) == null ? void 0 : f.call(y, (V) => (V == null ? void 0 : V.triggerId) === i);
|
|
4244
|
+
P = Vt(P || {}), d(P);
|
|
4245
|
+
const R = (x = P == null ? void 0 : P.targets) == null ? void 0 : x[0];
|
|
4242
4246
|
s(R);
|
|
4243
|
-
const q = (
|
|
4247
|
+
const q = (S = R == null ? void 0 : R.opts) == null ? void 0 : S[0];
|
|
4244
4248
|
h(q);
|
|
4245
4249
|
} else
|
|
4246
4250
|
d(void 0), s(void 0), h(void 0);
|
|
@@ -4261,40 +4265,40 @@ const Id = ue((e) => {
|
|
|
4261
4265
|
children: [
|
|
4262
4266
|
/* @__PURE__ */ g("div", { className: Ye.editEventDialog_menu, children: [
|
|
4263
4267
|
/* @__PURE__ */ l(
|
|
4264
|
-
|
|
4268
|
+
hd,
|
|
4265
4269
|
{
|
|
4266
4270
|
className: "border-right",
|
|
4267
|
-
value:
|
|
4268
|
-
onChange: (
|
|
4269
|
-
_(
|
|
4271
|
+
value: a == null ? void 0 : a.id,
|
|
4272
|
+
onChange: (y) => {
|
|
4273
|
+
_(y);
|
|
4270
4274
|
},
|
|
4271
|
-
targets:
|
|
4272
|
-
onChangeTargets: (
|
|
4273
|
-
v(
|
|
4275
|
+
targets: o == null ? void 0 : o.targets,
|
|
4276
|
+
onChangeTargets: (y, f) => {
|
|
4277
|
+
v(y, f === "add");
|
|
4274
4278
|
}
|
|
4275
4279
|
}
|
|
4276
4280
|
),
|
|
4277
4281
|
/* @__PURE__ */ l(
|
|
4278
|
-
|
|
4282
|
+
kd,
|
|
4279
4283
|
{
|
|
4280
4284
|
value: r == null ? void 0 : r.operateId,
|
|
4281
|
-
onChange: (
|
|
4282
|
-
m(
|
|
4285
|
+
onChange: (y) => {
|
|
4286
|
+
m(y);
|
|
4283
4287
|
},
|
|
4284
4288
|
cId: u,
|
|
4285
|
-
opts:
|
|
4286
|
-
onChangeOpts: (
|
|
4287
|
-
C(
|
|
4289
|
+
opts: a == null ? void 0 : a.opts,
|
|
4290
|
+
onChangeOpts: (y) => {
|
|
4291
|
+
C(y);
|
|
4288
4292
|
}
|
|
4289
4293
|
}
|
|
4290
4294
|
)
|
|
4291
4295
|
] }),
|
|
4292
4296
|
/* @__PURE__ */ l("div", { className: Ye.editEventDialog_body, children: /* @__PURE__ */ l(
|
|
4293
|
-
|
|
4297
|
+
po,
|
|
4294
4298
|
{
|
|
4295
4299
|
value: r,
|
|
4296
|
-
onChange: (
|
|
4297
|
-
b(
|
|
4300
|
+
onChange: (y) => {
|
|
4301
|
+
b(y);
|
|
4298
4302
|
}
|
|
4299
4303
|
}
|
|
4300
4304
|
) })
|
|
@@ -4302,9 +4306,9 @@ const Id = ue((e) => {
|
|
|
4302
4306
|
}
|
|
4303
4307
|
);
|
|
4304
4308
|
});
|
|
4305
|
-
function
|
|
4309
|
+
function Nd(e) {
|
|
4306
4310
|
var h;
|
|
4307
|
-
const { engine: t } =
|
|
4311
|
+
const { engine: t } = w(), { componentNode: n } = e, i = L(() => t.component.get(n == null ? void 0 : n.cId), [n]), c = ht(), o = Sd({
|
|
4308
4312
|
onOk(u) {
|
|
4309
4313
|
t.componentNode.update(n == null ? void 0 : n.id, (_) => {
|
|
4310
4314
|
var m, v;
|
|
@@ -4313,7 +4317,7 @@ function kd(e) {
|
|
|
4313
4317
|
};
|
|
4314
4318
|
});
|
|
4315
4319
|
}
|
|
4316
|
-
}), d =
|
|
4320
|
+
}), d = L(() => {
|
|
4317
4321
|
var u;
|
|
4318
4322
|
return ((u = n == null ? void 0 : n.events) == null ? void 0 : u.map((_) => {
|
|
4319
4323
|
var v, C;
|
|
@@ -4324,12 +4328,12 @@ function kd(e) {
|
|
|
4324
4328
|
};
|
|
4325
4329
|
})) || [];
|
|
4326
4330
|
}, [n, i]);
|
|
4327
|
-
function
|
|
4331
|
+
function a(u) {
|
|
4328
4332
|
if (!(u != null && u.value)) {
|
|
4329
|
-
|
|
4333
|
+
A.warn("triggerId不存在");
|
|
4330
4334
|
return;
|
|
4331
4335
|
}
|
|
4332
|
-
|
|
4336
|
+
o.open({
|
|
4333
4337
|
componentNode: n,
|
|
4334
4338
|
triggerId: u == null ? void 0 : u.value,
|
|
4335
4339
|
triggerName: u == null ? void 0 : u.label
|
|
@@ -4348,7 +4352,7 @@ function kd(e) {
|
|
|
4348
4352
|
function r(u) {
|
|
4349
4353
|
var m, v, C, b;
|
|
4350
4354
|
if (!u) {
|
|
4351
|
-
|
|
4355
|
+
A.warn("triggerId不存在");
|
|
4352
4356
|
return;
|
|
4353
4357
|
}
|
|
4354
4358
|
const _ = (v = (m = n == null ? void 0 : n.events) == null ? void 0 : m.find) == null ? void 0 : v.call(m, (I) => (I == null ? void 0 : I.triggerId) === u);
|
|
@@ -4368,10 +4372,10 @@ function kd(e) {
|
|
|
4368
4372
|
/* @__PURE__ */ l("div", { className: G.eventList_item_body, children: u.label }),
|
|
4369
4373
|
/* @__PURE__ */ g("div", { className: G.eventList_item_opt, children: [
|
|
4370
4374
|
/* @__PURE__ */ l(
|
|
4371
|
-
|
|
4375
|
+
Zn,
|
|
4372
4376
|
{
|
|
4373
4377
|
className: G.eventList_item_opt_clickable,
|
|
4374
|
-
onClick: () =>
|
|
4378
|
+
onClick: () => a(u)
|
|
4375
4379
|
}
|
|
4376
4380
|
),
|
|
4377
4381
|
/* @__PURE__ */ l(
|
|
@@ -4386,11 +4390,11 @@ function kd(e) {
|
|
|
4386
4390
|
] })
|
|
4387
4391
|
] });
|
|
4388
4392
|
}
|
|
4389
|
-
function
|
|
4390
|
-
const { engine: e } =
|
|
4391
|
-
return /* @__PURE__ */ l(Le, { labelSpan: 5, children: /* @__PURE__ */ g("div", { className:
|
|
4393
|
+
function wd() {
|
|
4394
|
+
const { engine: e } = w(), { componentNode: t } = he();
|
|
4395
|
+
return /* @__PURE__ */ l(Le, { labelSpan: 5, children: /* @__PURE__ */ g("div", { className: Bo.interactive, children: [
|
|
4392
4396
|
/* @__PURE__ */ l(
|
|
4393
|
-
|
|
4397
|
+
Mo,
|
|
4394
4398
|
{
|
|
4395
4399
|
componentNode: t,
|
|
4396
4400
|
onSelect: (n) => {
|
|
@@ -4406,37 +4410,37 @@ function Sd() {
|
|
|
4406
4410
|
}
|
|
4407
4411
|
}
|
|
4408
4412
|
),
|
|
4409
|
-
/* @__PURE__ */ l(
|
|
4413
|
+
/* @__PURE__ */ l(Nd, { componentNode: t })
|
|
4410
4414
|
] }) });
|
|
4411
4415
|
}
|
|
4412
|
-
const
|
|
4413
|
-
json:
|
|
4414
|
-
json_head:
|
|
4415
|
-
json_body:
|
|
4416
|
+
const Ed = "_json_1lpul_59", Ad = "_json_head_1lpul_69", Ld = "_json_body_1lpul_76", Ze = {
|
|
4417
|
+
json: Ed,
|
|
4418
|
+
json_head: Ad,
|
|
4419
|
+
json_body: Ld
|
|
4416
4420
|
};
|
|
4417
|
-
function
|
|
4418
|
-
const { engine: e } =
|
|
4421
|
+
function Dd() {
|
|
4422
|
+
const { engine: e } = w(), { componentNode: t } = he(), [n] = M.useForm();
|
|
4419
4423
|
function i() {
|
|
4420
4424
|
n.setFieldsValue({
|
|
4421
4425
|
code: t ? JSON.stringify(t || {}, null, " ") : ""
|
|
4422
4426
|
});
|
|
4423
4427
|
}
|
|
4424
4428
|
function c() {
|
|
4425
|
-
const
|
|
4429
|
+
const o = n.getFieldValue("code") || "";
|
|
4426
4430
|
try {
|
|
4427
|
-
const d = JSON.parse(
|
|
4428
|
-
if (!
|
|
4431
|
+
const d = JSON.parse(o);
|
|
4432
|
+
if (!bi(d)) {
|
|
4429
4433
|
console.error("must be an object.");
|
|
4430
4434
|
return;
|
|
4431
4435
|
}
|
|
4432
|
-
e.componentNode.update(t == null ? void 0 : t.id, d, { cover: !0 }),
|
|
4436
|
+
e.componentNode.update(t == null ? void 0 : t.id, d, { cover: !0 }), A.success("修改成功");
|
|
4433
4437
|
} catch (d) {
|
|
4434
|
-
console.error(d),
|
|
4438
|
+
console.error(d), A.error("json格式不正确");
|
|
4435
4439
|
}
|
|
4436
4440
|
}
|
|
4437
|
-
return
|
|
4441
|
+
return E(() => {
|
|
4438
4442
|
i();
|
|
4439
|
-
}, [t]), /* @__PURE__ */ g(
|
|
4443
|
+
}, [t]), /* @__PURE__ */ g(M, { className: Ze.json, form: n, children: [
|
|
4440
4444
|
/* @__PURE__ */ g("div", { className: Ze.json_head, children: [
|
|
4441
4445
|
/* @__PURE__ */ g("span", { children: [
|
|
4442
4446
|
/* @__PURE__ */ l("b", { style: { marginRight: 8 }, children: "ComponentNode数据" }),
|
|
@@ -4444,7 +4448,7 @@ function Ad() {
|
|
|
4444
4448
|
] }),
|
|
4445
4449
|
/* @__PURE__ */ l(z, { title: "保存", placement: "top", children: /* @__PURE__ */ l(Q, { className: "icon_clickable", onClick: c }) })
|
|
4446
4450
|
] }),
|
|
4447
|
-
/* @__PURE__ */ l("div", { className: Ze.json_body, children: /* @__PURE__ */ l(
|
|
4451
|
+
/* @__PURE__ */ l("div", { className: Ze.json_body, children: /* @__PURE__ */ l(M.Item, { noStyle: !0, name: "code", children: /* @__PURE__ */ l(
|
|
4448
4452
|
X,
|
|
4449
4453
|
{
|
|
4450
4454
|
language: "json",
|
|
@@ -4461,52 +4465,52 @@ function Ad() {
|
|
|
4461
4465
|
) }) })
|
|
4462
4466
|
] });
|
|
4463
4467
|
}
|
|
4464
|
-
const
|
|
4465
|
-
singleAttributes:
|
|
4466
|
-
},
|
|
4467
|
-
function
|
|
4468
|
-
const [t, n] = se(), { engine: i } =
|
|
4469
|
-
return
|
|
4468
|
+
const Od = "_singleAttributes_109pm_59", Pd = {
|
|
4469
|
+
singleAttributes: Od
|
|
4470
|
+
}, fn = In({}), he = () => kn(fn);
|
|
4471
|
+
function yn(e) {
|
|
4472
|
+
const [t, n] = se(), { engine: i } = w(), { instance: c } = e, [o, d] = N(), a = nn(c);
|
|
4473
|
+
return E(() => {
|
|
4470
4474
|
const s = i.componentNode.get(c.id);
|
|
4471
4475
|
return s && d(s), i.componentNode.onChange(c.id, ({ payload: r }) => {
|
|
4472
4476
|
d({ ...r });
|
|
4473
4477
|
});
|
|
4474
|
-
}, [c.id]),
|
|
4478
|
+
}, [c.id]), E(() => i.onJsonChange(() => {
|
|
4475
4479
|
var s;
|
|
4476
|
-
d(i.componentNode.get((s =
|
|
4477
|
-
}), []),
|
|
4478
|
-
|
|
4480
|
+
d(i.componentNode.get((s = a == null ? void 0 : a.current) == null ? void 0 : s.id));
|
|
4481
|
+
}), []), L(() => o ? /* @__PURE__ */ l(fn.Provider, { value: { instance: c, componentNode: o }, children: /* @__PURE__ */ l(
|
|
4482
|
+
ti,
|
|
4479
4483
|
{
|
|
4480
|
-
className:
|
|
4484
|
+
className: Pd.singleAttributes,
|
|
4481
4485
|
defaultActiveKey: "1",
|
|
4482
4486
|
size: "small",
|
|
4483
4487
|
items: [
|
|
4484
|
-
{ key: "1", label: t("attributes.attr.title"), children: /* @__PURE__ */ l(
|
|
4488
|
+
{ key: "1", label: t("attributes.attr.title"), children: /* @__PURE__ */ l(xo, {}) },
|
|
4485
4489
|
{
|
|
4486
4490
|
key: "2",
|
|
4487
4491
|
label: t("attributes.dataSource.title"),
|
|
4488
|
-
children: /* @__PURE__ */ l(
|
|
4492
|
+
children: /* @__PURE__ */ l(Oo, {})
|
|
4489
4493
|
},
|
|
4490
4494
|
{
|
|
4491
4495
|
key: "3",
|
|
4492
4496
|
label: t("attributes.interactive.title"),
|
|
4493
|
-
children: /* @__PURE__ */ l(
|
|
4497
|
+
children: /* @__PURE__ */ l(wd, {})
|
|
4494
4498
|
},
|
|
4495
4499
|
{
|
|
4496
4500
|
key: "4",
|
|
4497
4501
|
label: "json",
|
|
4498
|
-
children: /* @__PURE__ */ l(
|
|
4502
|
+
children: /* @__PURE__ */ l(Dd, {})
|
|
4499
4503
|
}
|
|
4500
4504
|
]
|
|
4501
4505
|
}
|
|
4502
|
-
) }) : /* @__PURE__ */ l(xt, { image: xt.PRESENTED_IMAGE_SIMPLE, description: "暂无数据" }), [c,
|
|
4506
|
+
) }) : /* @__PURE__ */ l(xt, { image: xt.PRESENTED_IMAGE_SIMPLE, description: "暂无数据" }), [c, o, n.language]);
|
|
4503
4507
|
}
|
|
4504
|
-
const
|
|
4505
|
-
multipleInstanceAttributes:
|
|
4506
|
-
multipleInstanceAttributes_header:
|
|
4507
|
-
multipleInstanceAttributes_body:
|
|
4508
|
+
const Bd = "_multipleInstanceAttributes_1ehj2_59", Md = "_multipleInstanceAttributes_header_1ehj2_66", jd = "_multipleInstanceAttributes_body_1ehj2_70", Qe = {
|
|
4509
|
+
multipleInstanceAttributes: Bd,
|
|
4510
|
+
multipleInstanceAttributes_header: Md,
|
|
4511
|
+
multipleInstanceAttributes_body: jd
|
|
4508
4512
|
};
|
|
4509
|
-
function
|
|
4513
|
+
function Td(e) {
|
|
4510
4514
|
const t = yt();
|
|
4511
4515
|
return /* @__PURE__ */ l(
|
|
4512
4516
|
Ce,
|
|
@@ -4523,33 +4527,33 @@ function Md(e) {
|
|
|
4523
4527
|
}
|
|
4524
4528
|
);
|
|
4525
4529
|
}
|
|
4526
|
-
function
|
|
4527
|
-
const { instances: t } = e, [n, i] =
|
|
4528
|
-
return
|
|
4530
|
+
function zd(e) {
|
|
4531
|
+
const { instances: t } = e, [n, i] = N();
|
|
4532
|
+
return E(() => {
|
|
4529
4533
|
i(t[0]);
|
|
4530
4534
|
}, [t]), /* @__PURE__ */ g("div", { className: Qe.multipleInstanceAttributes, children: [
|
|
4531
4535
|
/* @__PURE__ */ l("div", { className: Qe.multipleInstanceAttributes_header, children: /* @__PURE__ */ l(
|
|
4532
|
-
|
|
4536
|
+
Td,
|
|
4533
4537
|
{
|
|
4534
4538
|
allowClear: !1,
|
|
4535
4539
|
style: { width: "100%" },
|
|
4536
4540
|
value: n == null ? void 0 : n.id,
|
|
4537
4541
|
onChange: (c) => {
|
|
4538
|
-
i(t.find((
|
|
4542
|
+
i(t.find((o) => o.id === c));
|
|
4539
4543
|
}
|
|
4540
4544
|
}
|
|
4541
4545
|
) }),
|
|
4542
|
-
/* @__PURE__ */ l("div", { className: Qe.multipleInstanceAttributes_body, children: n && /* @__PURE__ */ l(
|
|
4546
|
+
/* @__PURE__ */ l("div", { className: Qe.multipleInstanceAttributes_body, children: n && /* @__PURE__ */ l(yn, { instance: n }) })
|
|
4543
4547
|
] });
|
|
4544
4548
|
}
|
|
4545
|
-
const
|
|
4546
|
-
pageAttributes:
|
|
4547
|
-
pageAttributes_description:
|
|
4548
|
-
pageAttributes_body:
|
|
4549
|
+
const $d = "_pageAttributes_u2l2i_59", Rd = "_pageAttributes_description_u2l2i_65", Fd = "_pageAttributes_body_u2l2i_70", pe = {
|
|
4550
|
+
pageAttributes: $d,
|
|
4551
|
+
pageAttributes_description: Rd,
|
|
4552
|
+
pageAttributes_body: Fd
|
|
4549
4553
|
};
|
|
4550
|
-
function
|
|
4551
|
-
const { engine: e } =
|
|
4552
|
-
function
|
|
4554
|
+
function Hd() {
|
|
4555
|
+
const { engine: e } = w(), [t] = se(), n = Ci(), { id: i, options: c } = n || {};
|
|
4556
|
+
function o(d) {
|
|
4553
4557
|
e.page.update(i, {
|
|
4554
4558
|
options: {
|
|
4555
4559
|
...c,
|
|
@@ -4583,7 +4587,7 @@ function Rd() {
|
|
|
4583
4587
|
style: { flex: 1 },
|
|
4584
4588
|
value: c == null ? void 0 : c.background,
|
|
4585
4589
|
onChange: (d) => {
|
|
4586
|
-
|
|
4590
|
+
o({ background: d });
|
|
4587
4591
|
}
|
|
4588
4592
|
}
|
|
4589
4593
|
),
|
|
@@ -4592,7 +4596,7 @@ function Rd() {
|
|
|
4592
4596
|
{
|
|
4593
4597
|
className: "icon_clickable",
|
|
4594
4598
|
onClick: () => {
|
|
4595
|
-
|
|
4599
|
+
o({ background: "white" });
|
|
4596
4600
|
}
|
|
4597
4601
|
}
|
|
4598
4602
|
) })
|
|
@@ -4612,7 +4616,7 @@ function Rd() {
|
|
|
4612
4616
|
style: { flex: 1 },
|
|
4613
4617
|
value: c == null ? void 0 : c.whiteBoardColor,
|
|
4614
4618
|
onChange: (d) => {
|
|
4615
|
-
|
|
4619
|
+
o({ whiteBoardColor: d });
|
|
4616
4620
|
}
|
|
4617
4621
|
}
|
|
4618
4622
|
),
|
|
@@ -4621,7 +4625,7 @@ function Rd() {
|
|
|
4621
4625
|
{
|
|
4622
4626
|
className: "icon_clickable",
|
|
4623
4627
|
onClick: () => {
|
|
4624
|
-
|
|
4628
|
+
o({ whiteBoardColor: "white" });
|
|
4625
4629
|
}
|
|
4626
4630
|
}
|
|
4627
4631
|
) })
|
|
@@ -4640,7 +4644,7 @@ function Rd() {
|
|
|
4640
4644
|
{
|
|
4641
4645
|
checked: c == null ? void 0 : c.bordered,
|
|
4642
4646
|
onChange: (d) => {
|
|
4643
|
-
|
|
4647
|
+
o({
|
|
4644
4648
|
bordered: d.target.checked
|
|
4645
4649
|
});
|
|
4646
4650
|
}
|
|
@@ -4653,7 +4657,7 @@ function Rd() {
|
|
|
4653
4657
|
style: { flex: 1 },
|
|
4654
4658
|
value: c == null ? void 0 : c.borderColor,
|
|
4655
4659
|
onChange: (d) => {
|
|
4656
|
-
|
|
4660
|
+
o({ borderColor: d });
|
|
4657
4661
|
}
|
|
4658
4662
|
}
|
|
4659
4663
|
),
|
|
@@ -4662,7 +4666,7 @@ function Rd() {
|
|
|
4662
4666
|
{
|
|
4663
4667
|
className: "icon_clickable",
|
|
4664
4668
|
onClick: () => {
|
|
4665
|
-
|
|
4669
|
+
o({ borderColor: "white" });
|
|
4666
4670
|
}
|
|
4667
4671
|
}
|
|
4668
4672
|
) })
|
|
@@ -4673,36 +4677,43 @@ function Rd() {
|
|
|
4673
4677
|
] }) })
|
|
4674
4678
|
] });
|
|
4675
4679
|
}
|
|
4676
|
-
function
|
|
4677
|
-
const e = yt(), t =
|
|
4678
|
-
return /* @__PURE__ */ l("div", { className:
|
|
4680
|
+
function Kd() {
|
|
4681
|
+
const e = yt(), t = L(() => !!e.length, [e]), n = L(() => e.length === 1, [e]);
|
|
4682
|
+
return /* @__PURE__ */ l("div", { className: ho.attributes, children: t ? (
|
|
4679
4683
|
// 选中组件实例配置
|
|
4680
4684
|
/* @__PURE__ */ g(W, { children: [
|
|
4681
|
-
n && /* @__PURE__ */ l(
|
|
4682
|
-
!n && /* @__PURE__ */ l(
|
|
4685
|
+
n && /* @__PURE__ */ l(yn, { instance: e[0] }),
|
|
4686
|
+
!n && /* @__PURE__ */ l(zd, { instances: e })
|
|
4683
4687
|
] })
|
|
4684
4688
|
) : (
|
|
4685
4689
|
// 默认页面配置
|
|
4686
|
-
/* @__PURE__ */ l(
|
|
4690
|
+
/* @__PURE__ */ l(Hd, {})
|
|
4687
4691
|
) });
|
|
4688
4692
|
}
|
|
4689
|
-
function
|
|
4693
|
+
function Ir(e) {
|
|
4690
4694
|
const { engine: t, json: n, pageFooter: i } = e;
|
|
4691
|
-
return
|
|
4695
|
+
return el(), zt.useEffect(() => {
|
|
4692
4696
|
t.loadJSON(n).then(() => {
|
|
4693
4697
|
var c;
|
|
4694
4698
|
(c = e == null ? void 0 : e.onJSONLoad) == null || c.call(e);
|
|
4695
4699
|
});
|
|
4696
4700
|
}, []), /* @__PURE__ */ g("div", { className: te.page, children: [
|
|
4697
|
-
/* @__PURE__ */ l("div", { className: te.page_header, children: /* @__PURE__ */ l(
|
|
4701
|
+
/* @__PURE__ */ l("div", { className: te.page_header, children: /* @__PURE__ */ l(
|
|
4702
|
+
Ll,
|
|
4703
|
+
{
|
|
4704
|
+
pageLogo: e == null ? void 0 : e.pageLogo,
|
|
4705
|
+
pageToolBar: e == null ? void 0 : e.pageToolBar,
|
|
4706
|
+
toolBarOptions: e == null ? void 0 : e.toolBarOptions
|
|
4707
|
+
}
|
|
4708
|
+
) }),
|
|
4698
4709
|
/* @__PURE__ */ g("div", { className: te.page_body, children: [
|
|
4699
|
-
/* @__PURE__ */ l("div", { className: te.page_body_left, id: "rbs-menu", children: /* @__PURE__ */ l(
|
|
4700
|
-
/* @__PURE__ */ l("div", { className: te.page_body_main, id: "rbs-editor", children: /* @__PURE__ */ l(
|
|
4701
|
-
/* @__PURE__ */ l("div", { className: te.page_body_right, id: "rbs-attributes", children: /* @__PURE__ */ l(
|
|
4710
|
+
/* @__PURE__ */ l("div", { className: te.page_body_left, id: "rbs-menu", children: /* @__PURE__ */ l(fa, {}) }),
|
|
4711
|
+
/* @__PURE__ */ l("div", { className: te.page_body_main, id: "rbs-editor", children: /* @__PURE__ */ l(so, {}) }),
|
|
4712
|
+
/* @__PURE__ */ l("div", { className: te.page_body_right, id: "rbs-attributes", children: /* @__PURE__ */ l(Kd, {}) })
|
|
4702
4713
|
] }),
|
|
4703
4714
|
typeof i == "function" ? /* @__PURE__ */ l(i, {}) : i
|
|
4704
4715
|
] });
|
|
4705
4716
|
}
|
|
4706
4717
|
export {
|
|
4707
|
-
|
|
4718
|
+
Ir as default
|
|
4708
4719
|
};
|