react-big-screen 0.0.19 → 0.0.21

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.
Files changed (53) hide show
  1. package/es/{IInputNumber-8TbQFEeQ.mjs → IInputNumber-PnHJNf9H.mjs} +3 -3
  2. package/es/{Line-h-rhOKev.mjs → Line-CLgwvraj.mjs} +37 -37
  3. package/es/{attributes-CxnJg-FT.mjs → attributes-BWtBVgsg.mjs} +9 -8
  4. package/es/{attributes-BIXlzE3A.mjs → attributes-BuMChZnt.mjs} +6 -5
  5. package/es/{attributes-BDv3jJ5O.mjs → attributes-C0SMjnHG.mjs} +13 -12
  6. package/es/{attributes-CauLjFb0.mjs → attributes-C5pimFaJ.mjs} +6 -5
  7. package/es/{attributes-DYnxULqW.mjs → attributes-COwKDUMI.mjs} +6 -5
  8. package/es/{attributes-CqNLwRW3.mjs → attributes-C_fbpAUx.mjs} +9 -8
  9. package/es/{attributes-CuUxWoIW.mjs → attributes-DdjjVR4N.mjs} +6 -5
  10. package/es/{attributes-B8s8kYoD.mjs → attributes-Dv8IMI4h.mjs} +6 -5
  11. package/es/{attributes-5RpQLPsm.mjs → attributes-DztmBsKn.mjs} +8 -7
  12. package/es/{attributes-NVduSBUS.mjs → attributes-E8oqU4q7.mjs} +7 -6
  13. package/es/{attributes-CgnjWsLu.mjs → attributes-YL1J6lLR.mjs} +6 -5
  14. package/es/{attributes-DBip_IK_.mjs → attributes-w4UsefFp.mjs} +51 -50
  15. package/es/{index-GdH3Zwz0.mjs → index-B4KSL-Bu.mjs} +8 -7
  16. package/es/{index-BAzeX1Ol.mjs → index-B8JqjjA1.mjs} +29 -28
  17. package/es/{index-8Jjn38kS.mjs → index-B9Nb8R2I.mjs} +19 -18
  18. package/es/{index-BFdLFt4J.mjs → index-BRgbtPVH.mjs} +7 -6
  19. package/es/{index-DCIgeYYw.mjs → index-BUth1V1H.mjs} +7 -6
  20. package/es/{index-56XQx0At.mjs → index-BYJ5e2rN.mjs} +7 -6
  21. package/es/{index-SkjPQ6Pt.mjs → index-BYe40Zu2.mjs} +10 -9
  22. package/es/{index-D07zNDg9.mjs → index-Bvab-NQ4.mjs} +14 -13
  23. package/es/{index-BVjByyUe.mjs → index-BzpuXSbE.mjs} +7 -6
  24. package/es/{index-Cm-Rzkqs.mjs → index-C6HV7IaP.mjs} +42 -41
  25. package/es/{index-CjeVSp69.mjs → index-CBxj6uKJ.mjs} +8 -7
  26. package/es/index-CRDggJyg.mjs +4441 -0
  27. package/es/{index-i0K7Ynj-.mjs → index-CUkul7R0.mjs} +7 -6
  28. package/es/{index-Bi3lZwlI.mjs → index-CpYmNO_5.mjs} +55 -54
  29. package/es/{index-BInCuYp5.mjs → index-CyS-CdYv.mjs} +17 -16
  30. package/es/{index-Daza1EsK.mjs → index-D--V8m-b.mjs} +3 -3
  31. package/es/index-D1ux0Voe.mjs +29 -0
  32. package/es/{index-nSniwbAA.mjs → index-DQU0jlV0.mjs} +8 -7
  33. package/es/{index-Dvs_cgct.mjs → index-D_0vVSWq.mjs} +11 -10
  34. package/es/{index-Dkl0nzkU.mjs → index-Dh00vKAk.mjs} +11 -10
  35. package/es/{index-DzRsgn_u.mjs → index-DyB0TE1y.mjs} +38 -37
  36. package/es/{index-CBAcYtqX.mjs → index-KruFCy9N.mjs} +8 -7
  37. package/es/{index-Bdqrb_sj.mjs → index-Ljz96Vra.mjs} +8 -7
  38. package/es/{index-kvRZQZJ-.mjs → index-guYPVm3G.mjs} +1 -1
  39. package/es/{index-CgI9EXqn.mjs → index-hPKl41YD.mjs} +14 -13
  40. package/es/{index-CFdcAnNu.mjs → index-n9OtRMYa.mjs} +12 -11
  41. package/es/{index-umVDADGS.mjs → index-qoPI1H9i.mjs} +23 -22
  42. package/es/{index-C49BBpRX.mjs → index-ryl5yfWq.mjs} +8 -7
  43. package/es/index.mjs +8 -7
  44. package/es/{selectPage-ChSsIBe9.mjs → selectPage-D267xnl4.mjs} +2 -2
  45. package/es/{useCurrentPageId-BlVc4whf.mjs → useCurrentPageId-DM05DNLI.mjs} +6 -5
  46. package/es/useEffectOnce-l5sUTCBG.mjs +7 -0
  47. package/es/useListenRef-B01dENv0.mjs +8 -0
  48. package/es/{useResizeDom-BUgMcz6M.mjs → useResizeDom-B6mM4jrh.mjs} +2 -2
  49. package/package.json +1 -1
  50. package/es/index-BhafNo6T.mjs +0 -16092
  51. package/es/index-dxiyF_62.mjs +0 -29
  52. package/es/useEffectOnce-Ct0JMBZd.mjs +0 -7
  53. package/es/useListenRef-Dqm6KZRj.mjs +0 -8
@@ -0,0 +1,4441 @@
1
+ var Ye = Object.defineProperty;
2
+ var Qe = (r, e, t) => e in r ? Ye(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var d = (r, e, t) => Qe(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { jsx as u, jsxs as C, Fragment as et } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
5
+ import { create as tt } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/zustand@5.0.8_@types+react@18.3.26_react@18.3.1/node_modules/zustand/esm/index.mjs";
6
+ import re from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/localforage@1.10.0/node_modules/localforage/dist/localforage.js";
7
+ import c, { createContext as at, useRef as R, useCallback as nt, useMemo as G, isValidElement as it, useEffect as J, useContext as rt, useState as x, forwardRef as ot, useImperativeHandle as st } from "react";
8
+ import lt from "react-dom";
9
+ import ct, { createRoot as ue } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js";
10
+ import * as dt from "antd";
11
+ import { Form as F, Tooltip as D, Button as he, Input as ge, Space as fe, message as me, Modal as ut, Table as ht } from "antd";
12
+ import { driver as gt } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.js.mjs";
13
+ import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.css";
14
+ import k from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
15
+ import { SaveOutlined as ft, EditOutlined as mt, DeleteOutlined as yt, QuestionCircleOutlined as pt, PlusOutlined as vt } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/@ant-design+icons@5.6.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@ant-design/icons/es/index.js";
16
+ import ye from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/i18next@24.2.3_typescript@5.9.3/node_modules/i18next/dist/esm/i18next.js";
17
+ import { initReactI18next as _t } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react-i18next@15.7.4_i18next@24.2.3_typescript@5.9.3__react-dom@18.3.1_react@18.3.1__react@18.3.1_typescript@5.9.3/node_modules/react-i18next/dist/es/index.js";
18
+ import bt from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/i18next-browser-languagedetector@8.2.0/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
19
+ import xt from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/umi-request@1.4.0/node_modules/umi-request/dist/index.esm.js";
20
+ import { useUpdateEffect as It, useUnmount as wt, useRequest as St } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/ahooks@3.9.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/ahooks/es/index.js";
21
+ import { omit as Ct, cloneDeep as pe } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/lodash.js";
22
+ const B = {
23
+ scale: 1,
24
+ scaleDefault: 1,
25
+ scaleStep: 0.02,
26
+ scaleMinZoom: 0.1,
27
+ scaleMaxZoom: 2,
28
+ width: 1920,
29
+ height: 1080
30
+ }, ve = tt(() => ({
31
+ componentNodes: [],
32
+ componentMap: {},
33
+ config: B
34
+ }));
35
+ function w(r) {
36
+ ve.setState(r);
37
+ }
38
+ function z() {
39
+ return ve.getState();
40
+ }
41
+ const V = "未命名文件.txt";
42
+ async function _e(r) {
43
+ return new Promise((e) => {
44
+ fetch(r).then(async (t) => {
45
+ var n, i;
46
+ return ((i = (n = `${t == null ? void 0 : t.status}`) == null ? void 0 : n.startsWith) == null ? void 0 : i.call(n, "2")) ? t.text() : "";
47
+ }).then(e).catch((t) => {
48
+ console.error(t), e("");
49
+ });
50
+ });
51
+ }
52
+ function xn(r = "", e = V) {
53
+ _e(r).then((t) => {
54
+ kt(t, e);
55
+ });
56
+ }
57
+ function kt(r = "", e = V) {
58
+ const t = new Blob([r], {
59
+ type: "text/plain;charset=utf-8"
60
+ });
61
+ Tt(t, e);
62
+ }
63
+ function Tt(r = new Blob([""]), e = V) {
64
+ const t = document.createElement("a"), a = URL.createObjectURL(r);
65
+ t.style.display = "none", t.download = e, t.href = a, t.click(), setTimeout(() => {
66
+ URL.revokeObjectURL(a);
67
+ });
68
+ }
69
+ const Pt = {
70
+ antd: dt,
71
+ react: c,
72
+ "react-dom": lt,
73
+ "react-dom/client": ct
74
+ };
75
+ function be(r) {
76
+ return Pt[r] || window[r];
77
+ }
78
+ async function oe(r) {
79
+ if (r)
80
+ return await zt(r) || await At(r);
81
+ }
82
+ async function zt(r) {
83
+ return new Promise((e) => {
84
+ try {
85
+ if (!r) return;
86
+ const t = { exports: {} }, a = (i) => be(i), n = new Function("module", "exports", "require", r);
87
+ try {
88
+ n(t, t.exports, a);
89
+ const i = Object.keys(t.exports);
90
+ return e(i.length ? t.exports : void 0);
91
+ } catch (i) {
92
+ return console.warn(i), e(void 0);
93
+ }
94
+ } catch (t) {
95
+ console.warn(t), e(void 0);
96
+ }
97
+ });
98
+ }
99
+ async function At(r) {
100
+ return new Promise((e) => {
101
+ try {
102
+ if (!r) return;
103
+ let t;
104
+ const a = function() {
105
+ var l;
106
+ let i, o;
107
+ arguments.length === 1 ? (i = [], o = arguments[0]) : arguments.length === 2 ? [i, o] = arguments : arguments.length === 3 && (i = arguments[1], o = arguments[2]);
108
+ const s = ((l = i == null ? void 0 : i.map) == null ? void 0 : l.call(i, (g) => be(g))) || [];
109
+ t = o == null ? void 0 : o(...s);
110
+ }, n = new Function("define", r);
111
+ try {
112
+ return n(a), e(t ?? void 0);
113
+ } catch (i) {
114
+ return console.warn(i), e(void 0);
115
+ }
116
+ } catch (t) {
117
+ return console.warn(t), e(void 0);
118
+ }
119
+ });
120
+ }
121
+ const xe = "__drivered__";
122
+ function Nt() {
123
+ return window.localStorage.getItem(xe) === "1";
124
+ }
125
+ function Et() {
126
+ window.localStorage.setItem(xe, "1");
127
+ }
128
+ function In(r) {
129
+ if (Nt() && !r)
130
+ return;
131
+ gt({
132
+ showProgress: !0,
133
+ nextBtnText: "下一步",
134
+ prevBtnText: "上一步",
135
+ doneBtnText: "完成",
136
+ steps: [
137
+ {
138
+ element: "#rbs-sizebar",
139
+ popover: {
140
+ title: "尺寸工具栏",
141
+ description: "调整大屏页面的大小、缩放比例。"
142
+ }
143
+ },
144
+ {
145
+ element: "#rbs-choose-example-button",
146
+ popover: {
147
+ title: "切换示例",
148
+ description: "选中下拉切换到其他大屏看板示例。"
149
+ }
150
+ },
151
+ {
152
+ element: "#rbs-starter-help",
153
+ popover: {
154
+ title: "新手教程",
155
+ description: "点击以重新开始此引导教程。"
156
+ }
157
+ },
158
+ {
159
+ element: "#rbs-tool-bar",
160
+ popover: {
161
+ title: "工具栏",
162
+ description: "查看快捷键帮助、导出/导入json、保存、清空等操作。(鼠标移入看查看功能简介)"
163
+ }
164
+ },
165
+ {
166
+ element: "#rbs-preview",
167
+ popover: {
168
+ title: "开始预览",
169
+ description: "打开新页面预览当前设计大屏。"
170
+ }
171
+ },
172
+ {
173
+ element: "#rbs-menu",
174
+ popover: {
175
+ title: "菜单区域",
176
+ description: "可以选择组件模板、查看页面组件列表和历史记录等。"
177
+ }
178
+ },
179
+ {
180
+ element: "#rbs-library",
181
+ popover: {
182
+ title: "组件库",
183
+ description: "选中模板拖拽到编辑器创建新组件。"
184
+ }
185
+ },
186
+ {
187
+ element: "#rbs-pages",
188
+ popover: {
189
+ title: "页面管理",
190
+ description: "新增、删除大屏页面。"
191
+ }
192
+ },
193
+ {
194
+ element: "#rbs-componentNodes",
195
+ popover: {
196
+ title: "当前页组件",
197
+ description: "查看当前编辑大屏页面所有的组件,并支持修改。"
198
+ }
199
+ },
200
+ {
201
+ element: "#rbs-property",
202
+ popover: {
203
+ title: "个人资产",
204
+ description: "管理个人远程组件包资产,支持在线导入、本地导入组件包、导出组件包。"
205
+ }
206
+ },
207
+ {
208
+ element: "#rbs-favorites",
209
+ popover: {
210
+ title: "收藏夹",
211
+ description: "管理所有收藏的组件组合,拖拽到编辑器中即可进行创建。"
212
+ }
213
+ },
214
+ {
215
+ element: "#rbs-history",
216
+ popover: {
217
+ title: "历史记录",
218
+ description: "存储你的操作历史记录,最多20个存储容量。"
219
+ }
220
+ },
221
+ {
222
+ element: "#rbs-editor",
223
+ popover: {
224
+ title: "编辑器区域",
225
+ description: "主要拖拽交互区域,通过鼠标拖拽、框选页面组件。"
226
+ }
227
+ },
228
+ {
229
+ element: "#rbs-attributes",
230
+ popover: {
231
+ title: "属性配置区域",
232
+ description: "查看和配置组件属性,实现想要的效果。"
233
+ }
234
+ }
235
+ ],
236
+ onDestroyed() {
237
+ Et();
238
+ }
239
+ }).drive();
240
+ }
241
+ class Mt {
242
+ constructor() {
243
+ // 存储package映射(id => package)
244
+ d(this, "pkgMap", /* @__PURE__ */ new Map());
245
+ // 存储package变化回调函数
246
+ d(this, "pkgCallbacks", []);
247
+ // localforage实例
248
+ d(this, "localforageIns", re.createInstance({
249
+ name: "ReactBigScreen_code",
250
+ driver: re.INDEXEDDB,
251
+ description: "存储源代码缓存",
252
+ version: 1
253
+ }));
254
+ }
255
+ // 获取已注册组件列表
256
+ getAll() {
257
+ return Object.values(z().componentMap);
258
+ }
259
+ get(e) {
260
+ if (e)
261
+ return Array.isArray(e) ? e.map((t) => this.get(t)) : z().componentMap[e];
262
+ }
263
+ // 注册组件
264
+ register(e) {
265
+ const a = (Array.isArray(e) ? e : [e]).reduce((n, i) => Object.assign(n, {
266
+ [i.cId]: i
267
+ }), {});
268
+ w((n) => ({
269
+ componentMap: {
270
+ ...n.componentMap,
271
+ ...a
272
+ }
273
+ }));
274
+ }
275
+ // 卸载一个组件
276
+ unRegister(e) {
277
+ const t = Array.isArray(e) ? e : [e];
278
+ w((a) => (t.forEach((n) => {
279
+ const i = typeof n == "string" ? n : n == null ? void 0 : n.cId;
280
+ delete a.componentMap[i];
281
+ }), {
282
+ componentMap: {
283
+ ...a.componentMap
284
+ }
285
+ }));
286
+ }
287
+ // 卸载全部组件
288
+ unRegisterAll() {
289
+ w({
290
+ componentMap: {}
291
+ });
292
+ }
293
+ /*************************** 远程组件包相关 **************************/
294
+ // 清空packages
295
+ clearPackages() {
296
+ this.pkgMap = /* @__PURE__ */ new Map(), this.unRegisterAll();
297
+ }
298
+ // 初始化packages
299
+ initPackages(e) {
300
+ this.clearPackages(), e && (e = Array.isArray(e) ? e : [e], e.forEach((t) => {
301
+ t && (this.pkgMap.set(t.id, t), this.register(t.components));
302
+ }));
303
+ }
304
+ // 触发package事件通知
305
+ notifyPackageChange() {
306
+ const e = this.getAllPackage();
307
+ this.pkgCallbacks.forEach((t) => t(e));
308
+ }
309
+ // 获取一个包
310
+ getPackage(e) {
311
+ return typeof e == "string" ? this.pkgMap.get(e) : e;
312
+ }
313
+ // 获取包的模块代码
314
+ async getPackageSourceCode(e) {
315
+ const t = typeof e == "string" ? e : e.id;
316
+ return await this.localforageIns.getItem(t) ?? void 0;
317
+ }
318
+ // 存储包的模块代码
319
+ async savePackageSourceCode(e, t) {
320
+ const a = typeof e == "string" ? e : e.id;
321
+ return this.localforageIns.setItem(a, t);
322
+ }
323
+ /**
324
+ * 获取所有包
325
+ * @param omitSystem 是否排除系统包
326
+ */
327
+ getAllPackage(e) {
328
+ const t = Array.from(this.pkgMap.values());
329
+ return e ? t.filter((a) => a.origin !== "system") : t;
330
+ }
331
+ // 监听package更新
332
+ onPackageChange(e) {
333
+ return this.pkgCallbacks.push(e), () => {
334
+ this.pkgCallbacks = this.pkgCallbacks.filter((t) => t !== e);
335
+ };
336
+ }
337
+ // 加载一个包
338
+ registerPackage(e) {
339
+ if (!e) return;
340
+ (Array.isArray(e) ? e : [e]).forEach((a) => {
341
+ a && (this.pkgMap.set(a.id, a), this.register(a.components));
342
+ }), this.notifyPackageChange();
343
+ }
344
+ // 删除一个包
345
+ unregisterPackage(e) {
346
+ (Array.isArray(e) ? e : [e]).forEach((a) => {
347
+ this.pkgMap.delete(a.id), this.unRegister(a.components);
348
+ }), this.notifyPackageChange();
349
+ }
350
+ // 更新一个包
351
+ updatePackage(e, t, a) {
352
+ if (!t) return;
353
+ const n = this.getPackage(e);
354
+ n && (Object.assign(n, t), a || this.notifyPackageChange());
355
+ }
356
+ // 获取全部本地 package 存储对象
357
+ async getAllLocalPackages() {
358
+ const e = this.getAllPackage().reduce((t, a) => (["local", "remote"].includes(a.origin) && t.push(this.getLocalPackage(a)), t), []);
359
+ return Promise.all(e).then((t) => t.filter(Boolean));
360
+ }
361
+ // 获取本地 package 存储对象
362
+ async getLocalPackage(e) {
363
+ const t = this.getPackage(e);
364
+ if (!t) return;
365
+ let a;
366
+ return t.origin === "local" ? a = await this.getPackageSourceCode(t) : t.origin === "remote" && (a = t.originData), {
367
+ id: t.id,
368
+ origin: t.origin,
369
+ originData: a
370
+ };
371
+ }
372
+ // 载入本地 package 存储对象
373
+ async loadLocalPackages(e) {
374
+ if (!e) return;
375
+ const t = Array.isArray(e) ? e : [e];
376
+ if (!t.length) return;
377
+ const a = [], n = [];
378
+ t.forEach((i) => {
379
+ if (i.origin === "local") {
380
+ i.originData && a.push(i);
381
+ return;
382
+ }
383
+ if (i.origin === "remote") {
384
+ i.originData && n.push(i);
385
+ return;
386
+ }
387
+ }), Promise.all(
388
+ a.map((i) => oe(i.originData))
389
+ ).then((i) => {
390
+ i.forEach((o, s) => {
391
+ const l = t[s];
392
+ o && (o.origin = l.origin, o.originData = "", this.savePackageSourceCode(o.id, l.originData));
393
+ }), this.registerPackage(i);
394
+ }), n.forEach((i) => {
395
+ _e(i.originData).then((o) => {
396
+ oe(o).then((s) => {
397
+ s && (s.origin = i.origin, s.originData = i.originData, this.savePackageSourceCode(s.id, o)), this.registerPackage(s);
398
+ });
399
+ });
400
+ });
401
+ }
402
+ }
403
+ class se {
404
+ constructor() {
405
+ d(this, "_size", 0);
406
+ d(this, "_data", {});
407
+ d(this, "_events", []);
408
+ }
409
+ // 覆盖设置
410
+ set(e) {
411
+ let t = 0;
412
+ const a = {};
413
+ e.forEach((n) => {
414
+ n && (a[n.id] = n, t++);
415
+ }), this._data = a, this._size = t, this.notify();
416
+ }
417
+ // 新增实例
418
+ add(e) {
419
+ if (e) {
420
+ if (Array.isArray(e)) {
421
+ e.forEach((t) => this.add(t));
422
+ return;
423
+ }
424
+ this._data[e.id] = e, this._size++, this.notify();
425
+ }
426
+ }
427
+ get(e) {
428
+ if (e)
429
+ return Array.isArray(e) ? e.map((t) => this.get(t)) : this._data[`${e}`];
430
+ }
431
+ // 取出全部实例
432
+ getAll() {
433
+ return Object.values(this._data);
434
+ }
435
+ // 删除实例
436
+ delete(e) {
437
+ let t = !1;
438
+ (Array.isArray(e) ? e : [e]).forEach((n) => {
439
+ n && this._data[n] && (t = !0, delete this._data[n], this._size--);
440
+ }), t && this.notify();
441
+ }
442
+ // 删除全部实例
443
+ deleteAll() {
444
+ this._size && (this._size = 0, this._data = {}, this.notify());
445
+ }
446
+ // 获取大小
447
+ getSize() {
448
+ return this._size;
449
+ }
450
+ // 监听数据变更
451
+ onChange(e) {
452
+ return this._events.push(e), () => {
453
+ this._events = this._events.filter((t) => t !== e);
454
+ };
455
+ }
456
+ // 触发数据变更
457
+ notify() {
458
+ this._events.forEach((e) => {
459
+ e(this._data);
460
+ });
461
+ }
462
+ }
463
+ class Lt extends se {
464
+ constructor() {
465
+ super(...arguments);
466
+ // 存储选中的实例列表
467
+ d(this, "selectedInstances", new se());
468
+ }
469
+ // 获取实例
470
+ getInstances(t) {
471
+ return t ? typeof t == "string" ? t ? [this.get(t)] : [] : Array.isArray(t) ? t != null && t.length ? typeof (t == null ? void 0 : t[0]) == "string" ? this.get(t) : t : [] : [t] : [];
472
+ }
473
+ // 监听选中实例变更事件
474
+ onSelectedChange(t) {
475
+ return this.selectedInstances.onChange(t);
476
+ }
477
+ // 获取全部选中实例
478
+ getAllSelected() {
479
+ return this.selectedInstances.getAll();
480
+ }
481
+ /**
482
+ * 选中实例
483
+ * @param id 待选中实例的key/keys/instance/instances
484
+ * @param cover 是否覆盖(默认false。true则重置整个选中实例,false则新增选中)
485
+ */
486
+ select(t, a) {
487
+ const n = this.getInstances(t);
488
+ a && this.selectedInstances.getAll().forEach((i) => {
489
+ var o;
490
+ (o = i == null ? void 0 : i.handleUnSelected) == null || o.call(i);
491
+ }), n.forEach((i) => {
492
+ var o;
493
+ (o = i == null ? void 0 : i.handleSelected) == null || o.call(i);
494
+ }), a ? this.selectedInstances.set(n) : this.selectedInstances.add(n);
495
+ }
496
+ // 取消选中实例
497
+ unselect(t) {
498
+ const a = this.getInstances(t), n = [];
499
+ a.forEach((i) => {
500
+ var o;
501
+ (o = i == null ? void 0 : i.handleUnSelected) == null || o.call(i), n.push(i == null ? void 0 : i.id);
502
+ }), this.selectedInstances.delete(n);
503
+ }
504
+ // 选中全部
505
+ selectAll() {
506
+ this.isSelectAll() || this.select(this.getAll());
507
+ }
508
+ // 取消选中全部
509
+ unselectAll() {
510
+ this.selectedInstances.getSize() && (this.selectedInstances.getAll().forEach((t) => {
511
+ var a;
512
+ (a = t == null ? void 0 : t.handleUnSelected) == null || a.call(t);
513
+ }), this.selectedInstances.deleteAll());
514
+ }
515
+ // 是否已选中全部
516
+ isSelectAll() {
517
+ const t = this.getSize(), a = this.selectedInstances.getSize();
518
+ return t ? t === a : !1;
519
+ }
520
+ // 查询id是否被选中
521
+ isSelected(t) {
522
+ return !!this.selectedInstances.get(t);
523
+ }
524
+ // 删除实例
525
+ delete(t) {
526
+ super.delete(t), this.selectedInstances.delete(t);
527
+ }
528
+ }
529
+ function I(r = 10) {
530
+ const e = Math.random().toString(16).slice(2);
531
+ return r <= e.length ? e.slice(0, r) : e + I(r - e.length);
532
+ }
533
+ const Ot = "_configRender_wy2nc_59", Dt = "_configRender_item_wy2nc_65", Rt = "_configRender_item_help_wy2nc_70", Ft = "_configRender_item_label_wy2nc_74", Ht = "_configRender_item_value_wy2nc_78", P = {
534
+ configRender: Ot,
535
+ configRender_item: Dt,
536
+ configRender_item_help: Rt,
537
+ configRender_item_label: Ft,
538
+ configRender_item_value: Ht
539
+ }, Ie = at(void 0);
540
+ function le() {
541
+ return rt(Ie);
542
+ }
543
+ import("./index-B9Nb8R2I.mjs").then((r) => {
544
+ var e;
545
+ (e = r.default) == null || e.call(r);
546
+ });
547
+ let we = /* @__PURE__ */ new Map();
548
+ function Se(r) {
549
+ const { items: e } = r, [t] = F.useForm(), a = R();
550
+ a.current = r;
551
+ const n = nt(() => {
552
+ const o = {}, s = t.getFieldsValue();
553
+ for (const l in s)
554
+ o[l] = void 0;
555
+ return o;
556
+ }, []), i = G(() => {
557
+ var o;
558
+ return /* @__PURE__ */ u(
559
+ F,
560
+ {
561
+ form: t,
562
+ className: P.configRender,
563
+ onValuesChange: (s) => {
564
+ var l, g;
565
+ (g = (l = a.current) == null ? void 0 : l.onChange) == null || g.call(l, {
566
+ ...t.getFieldsValue(),
567
+ ...s
568
+ });
569
+ },
570
+ children: (o = e == null ? void 0 : e.map) == null ? void 0 : o.call(e, (s) => {
571
+ if (it(s))
572
+ return s;
573
+ if (typeof s == "function")
574
+ return /* @__PURE__ */ u(s, { useExtra: le }, s);
575
+ const l = typeof s.component == "string" ? we.get(s.component) : s.component;
576
+ return /* @__PURE__ */ C("div", { className: P.configRender_item, children: [
577
+ /* @__PURE__ */ C(
578
+ "div",
579
+ {
580
+ className: k(
581
+ P.configRender_item_label,
582
+ (s == null ? void 0 : s.labelTip) && P.configRender_item_help
583
+ ),
584
+ style: r == null ? void 0 : r.labelStyle,
585
+ children: [
586
+ s != null && s.labelTip ? /* @__PURE__ */ u(D, { title: s.labelTip, children: s.label }) : s.label,
587
+ /* @__PURE__ */ u("span", { children: ":" })
588
+ ]
589
+ }
590
+ ),
591
+ /* @__PURE__ */ u("div", { className: P.configRender_item_value, children: l ? /* @__PURE__ */ u(
592
+ F.Item,
593
+ {
594
+ noStyle: !0,
595
+ name: (s == null ? void 0 : s.name) || s.key,
596
+ children: /* @__PURE__ */ u(l, { options: s == null ? void 0 : s.options, useExtra: le })
597
+ },
598
+ s == null ? void 0 : s.key
599
+ ) : void 0 })
600
+ ] }, s == null ? void 0 : s.key);
601
+ })
602
+ }
603
+ );
604
+ }, [e]);
605
+ return J(() => {
606
+ t.setFieldsValue({
607
+ ...n(),
608
+ ...r == null ? void 0 : r.value
609
+ });
610
+ }, [r == null ? void 0 : r.value]), /* @__PURE__ */ u(Ie.Provider, { value: r == null ? void 0 : r.extra, children: i });
611
+ }
612
+ Se.register = (r, e) => {
613
+ we.set(r, e);
614
+ };
615
+ function T(r, e) {
616
+ return function(t) {
617
+ const a = e ? {
618
+ ...t,
619
+ options: Object.assign({}, e, t == null ? void 0 : t.options)
620
+ } : t;
621
+ return r(a);
622
+ };
623
+ }
624
+ function A(r, e) {
625
+ return function(t) {
626
+ const a = e ? Object.assign({}, e, t.options) : t.options, n = e ? {
627
+ ...t,
628
+ options: {
629
+ ...t.options,
630
+ ...a
631
+ }
632
+ } : t;
633
+ return /* @__PURE__ */ u(
634
+ Se,
635
+ {
636
+ items: r,
637
+ value: a,
638
+ extra: n,
639
+ onChange: (i) => {
640
+ t.onChange(i);
641
+ }
642
+ }
643
+ );
644
+ };
645
+ }
646
+ const $t = {
647
+ cId: "",
648
+ cName: "",
649
+ x: 0,
650
+ y: 0,
651
+ width: 100,
652
+ height: 100,
653
+ category: "unknown"
654
+ };
655
+ class Bt {
656
+ constructor() {
657
+ d(this, "maxLevel", 1);
658
+ // 最大层级
659
+ d(this, "eventMap", {});
660
+ // 数据节点变更回调事件 (id => callback)
661
+ d(this, "groupMap", {});
662
+ // 成组映射(groupId => 对应元素)
663
+ d(this, "panelMap", {});
664
+ // 面板映射(panelId => {children: [id, id, ...]})
665
+ // 删除回调
666
+ d(this, "deleteListeners", []);
667
+ }
668
+ // 监听删除
669
+ onDelete(e) {
670
+ return this.deleteListeners.push(e), () => {
671
+ this.deleteListeners = this.deleteListeners.filter((t) => t !== e);
672
+ };
673
+ }
674
+ // 触发删除
675
+ notifyDelete(e = []) {
676
+ this.deleteListeners.forEach((t) => t(e));
677
+ }
678
+ // 触发onChange事件
679
+ notifyChange(e) {
680
+ var t, a;
681
+ (a = (t = this.eventMap[e.id]) == null ? void 0 : t.forEach) == null || a.call(t, (n) => {
682
+ n == null || n({
683
+ payload: e
684
+ });
685
+ });
686
+ }
687
+ // 注册节点事件变更回调
688
+ onChange(e, t) {
689
+ var a;
690
+ return e ? (((a = this.eventMap)[e] || (a[e] = [])).push(t), () => {
691
+ this.eventMap[e] = this.eventMap[e].filter((n) => n !== t);
692
+ }) : (console.warn("id must be defined"), () => {
693
+ });
694
+ }
695
+ // 清空组件数据
696
+ clear() {
697
+ this.maxLevel = this.getMinLevel(), w({
698
+ componentNodes: []
699
+ });
700
+ }
701
+ // 获取最大层级
702
+ getMaxLevel() {
703
+ return this.maxLevel;
704
+ }
705
+ // 获取最小层级
706
+ getMinLevel() {
707
+ return 1;
708
+ }
709
+ /**
710
+ * 管道化处理componentNodes
711
+ * @param componentNodes 要通过的componentNodes
712
+ */
713
+ pipeComponentNodes(e) {
714
+ return e.forEach((t) => {
715
+ var a, n;
716
+ t.groupId && this.insertGroup(t.groupId, t.id), t.show ?? (t.show = !0), t.panelId && ((a = this.panelMap)[n = t.panelId] || (a[n] = {
717
+ parentId: "",
718
+ children: /* @__PURE__ */ new Set()
719
+ })).children.add(t.id), t.panels && t.panels.forEach((i) => {
720
+ var s, l;
721
+ const o = (s = this.panelMap)[l = `${i.value}`] || (s[l] = {
722
+ parentId: t.id,
723
+ children: /* @__PURE__ */ new Set()
724
+ });
725
+ o.parentId = t.id;
726
+ }), this.maxLevel = Math.max(this.maxLevel, (t == null ? void 0 : t.level) || 1);
727
+ }), e;
728
+ }
729
+ // 设置展示componentNodes
730
+ set(e = []) {
731
+ this.maxLevel = 1, this.groupMap = {}, this.panelMap = {}, w({
732
+ componentNodes: this.pipeComponentNodes(e)
733
+ });
734
+ }
735
+ // 刷新
736
+ refresh() {
737
+ w((e) => ({
738
+ componentNodes: [...e.componentNodes]
739
+ }));
740
+ }
741
+ // 新增 componentNode
742
+ add(e) {
743
+ const t = Array.isArray(e) ? e : [e];
744
+ w((a) => ({
745
+ componentNodes: [...a.componentNodes, ...this.pipeComponentNodes(t)]
746
+ }));
747
+ }
748
+ // 获取已使用组件列表统计
749
+ getComponentUsed() {
750
+ return this.getAll().reduce((e, t) => {
751
+ var n;
752
+ const a = e[n = t.cId] || (e[n] = { count: 0 });
753
+ return a.count++, e;
754
+ }, {});
755
+ }
756
+ // 获取全部componentNodes
757
+ getAll() {
758
+ return z().componentNodes;
759
+ }
760
+ // 获取一个componentNode
761
+ get(e) {
762
+ if (e)
763
+ return typeof e != "string" ? e : this.getAll().find((t) => t.id === e);
764
+ }
765
+ // 获取一些componentNode
766
+ getSome(e) {
767
+ return (Array.isArray(e) ? e : [e]).reduce((a, n) => {
768
+ const i = typeof n == "string" ? this.get(n) : n;
769
+ return i && a.push(i), a;
770
+ }, []);
771
+ }
772
+ /**
773
+ * 更新componentNode(默认触发局部更新)
774
+ *
775
+ * @param id 待更新实例id
776
+ * @param extComponentNode 合并更新项
777
+ * @param options 额外配置项
778
+ */
779
+ update(e, t, a) {
780
+ if (!e || !t) return;
781
+ const n = this.get(e);
782
+ if (!n) return;
783
+ const i = {
784
+ ...typeof t == "function" ? t(n) : t
785
+ };
786
+ if (a != null && a.cover)
787
+ for (const o in n)
788
+ o !== "id" && delete n[o];
789
+ Object.assign(n, i), a != null && a.silent || this.notifyChange(n);
790
+ }
791
+ // 删除 componentNode
792
+ delete(e) {
793
+ const t = Array.isArray(e) ? e : [e], a = /* @__PURE__ */ new Set();
794
+ t.forEach((i) => {
795
+ var s;
796
+ const o = this.get(i);
797
+ o && (a.add(o.id), (s = o == null ? void 0 : o.panels) != null && s.length && this.getLayoutChildrenIds(o.id).forEach((l) => {
798
+ a.add(l);
799
+ }));
800
+ });
801
+ const n = z().componentNodes.filter((i) => !a.has(i.id));
802
+ this.set(n), this.notifyDelete(Array.from(a));
803
+ }
804
+ // 计算一个componentNode的矩形坐标
805
+ getCoordinate(e) {
806
+ const t = typeof e == "string" ? this.get(e) : e, a = {
807
+ x1: 0,
808
+ y1: 0,
809
+ x2: 0,
810
+ y2: 0
811
+ };
812
+ return t && (a.x1 = t.x, a.y1 = t.y, a.x2 = t.x + t.width, a.y2 = t.y + t.height), a;
813
+ }
814
+ // 从实例数据创建新的数据实例
815
+ createFromComponentNode(e, t) {
816
+ const a = {
817
+ ...e,
818
+ ...t
819
+ };
820
+ return t != null && t.id || (a.id = I()), a != null && a.level || (a.level = ++this.maxLevel), a.category || (a.category = "unknown"), a.dataSourceType || (a.dataSourceType = "static"), this.maxLevel = Math.max(this.maxLevel, a.level), a;
821
+ }
822
+ // 从组件模板创建数据实例
823
+ createFromComponent(e, t) {
824
+ var n, i;
825
+ const a = {
826
+ ...$t,
827
+ // 基础默认组件数据
828
+ ...Ct(e, [
829
+ "icon",
830
+ "component",
831
+ "attributesComponent",
832
+ "exposes",
833
+ "triggers",
834
+ "description"
835
+ ]),
836
+ // 自定义组件默认数据
837
+ ...t
838
+ // 扩展组件数据
839
+ };
840
+ return a != null && a.name || (a.name = e.cName), a != null && a.id || (a.id = I()), a != null && a.level || (a.level = ++this.maxLevel), a.x || (a.x = 0), a.y || (a.y = 0), a.category || (a.category = "unknown"), e.panels && (a.panels = e.panels.map((o) => ({
841
+ label: o.label,
842
+ value: I()
843
+ })), a.currentPanelId = (i = (n = a.panels) == null ? void 0 : n[0]) == null ? void 0 : i.value), a.dataSourceType || (a.dataSourceType = "static"), a.show ?? (a.show = !0), this.maxLevel = Math.max(this.maxLevel, a.level), a;
844
+ }
845
+ /************************* 成组 (group) *************************/
846
+ // 创建一个组
847
+ createGroup(e, t = I()) {
848
+ const a = /* @__PURE__ */ new Set();
849
+ e.forEach((n) => {
850
+ a.add(n.id), this.update(n.id, {
851
+ groupId: t
852
+ });
853
+ }), this.groupMap[t] = {
854
+ children: a
855
+ };
856
+ }
857
+ // 解散一个/多个组
858
+ unlinkGroup(e) {
859
+ (Array.isArray(e) ? e : [e]).forEach((a) => {
860
+ this.groupMap[a].children.forEach((i) => {
861
+ this.update(i, {
862
+ groupId: void 0
863
+ });
864
+ }), delete this.groupMap[a];
865
+ });
866
+ }
867
+ // 从一个组中删除一个实例id
868
+ unlinkFromGroup(e, t) {
869
+ const a = this.groupMap[e];
870
+ e && (a.children.delete(t), a.children.size || delete this.groupMap[e]);
871
+ }
872
+ // 插入一个实例id到group中
873
+ insertGroup(e, t) {
874
+ var a;
875
+ ((a = this.groupMap)[e] || (a[e] = { children: /* @__PURE__ */ new Set() })).children.add(t);
876
+ }
877
+ // 获取一个组
878
+ getGroup(e) {
879
+ return e ? this.groupMap[e] : void 0;
880
+ }
881
+ // 获取一个组包含的实例id列表
882
+ getGroupComponentNodeIds(e) {
883
+ var t;
884
+ return Array.from(((t = this.getGroup(e)) == null ? void 0 : t.children) || []);
885
+ }
886
+ /************************* 布局 (layout) *************************/
887
+ // 获取layout类组件包含的所有组件Ids
888
+ getLayoutChildrenIds(e) {
889
+ var a;
890
+ const t = (a = this.get(e)) == null ? void 0 : a.panels;
891
+ return t != null && t.length ? t.reduce((n, i) => {
892
+ var o;
893
+ return n.concat(Array.from(((o = this.panelMap[i.value]) == null ? void 0 : o.children) || []));
894
+ }, []) : [];
895
+ }
896
+ // 获取layout类组件包含的所有可展示组件Ids
897
+ getLayoutVisibleChildrenIds(e) {
898
+ var a, n;
899
+ const t = (a = this.get(e)) == null ? void 0 : a.currentPanelId;
900
+ return t ? Array.from(((n = this.panelMap[t]) == null ? void 0 : n.children) || []) : [];
901
+ }
902
+ // 判断当前组件是否在面板内
903
+ isInPanel(e, t) {
904
+ var n, i, o;
905
+ const a = typeof t == "string" ? this.get(t) : t;
906
+ return !e || !a ? !1 : (o = (i = (n = this.panelMap[e]) == null ? void 0 : n.children) == null ? void 0 : i.has) == null ? void 0 : o.call(i, a.id);
907
+ }
908
+ // 将组件移入面板内
909
+ insertPanel(e, t) {
910
+ var i, o;
911
+ const a = typeof t == "string" ? this.get(t) : t;
912
+ if (!e || !a)
913
+ return;
914
+ this.removeFromPanel(a, !1);
915
+ const n = this.panelMap[e];
916
+ (o = (i = n == null ? void 0 : n.children) == null ? void 0 : i.add) == null || o.call(i, a.id), this.update(a.id, {
917
+ panelId: e
918
+ });
919
+ }
920
+ // 将组件移出面板
921
+ removeFromPanel(e, t = !0) {
922
+ var o, s;
923
+ const a = typeof e == "string" ? this.get(e) : e, n = a == null ? void 0 : a.panelId;
924
+ if (!n || !a)
925
+ return;
926
+ const i = this.panelMap[n];
927
+ (s = (o = i == null ? void 0 : i.children) == null ? void 0 : o.delete) == null || s.call(o, a.id), t && this.update(a.id, {
928
+ panelId: void 0
929
+ });
930
+ }
931
+ // 获取面板名称
932
+ getPanelName(e) {
933
+ var a, n, i, o;
934
+ if (!e) return "";
935
+ const t = (n = this.get((a = this.panelMap[e]) == null ? void 0 : a.parentId)) == null ? void 0 : n.panels;
936
+ return ((o = (i = t == null ? void 0 : t.find) == null ? void 0 : i.call(t, (s) => s.value === e)) == null ? void 0 : o.label) || "";
937
+ }
938
+ // 获取面板包含的子组件id(第一层)
939
+ getPanelChildrenIds(e) {
940
+ var t;
941
+ return e ? Array.from(((t = this.panelMap[e]) == null ? void 0 : t.children) || []) : [];
942
+ }
943
+ // 获取面板包含的子组件
944
+ getPanelComponentNodes(e, t) {
945
+ var n, i;
946
+ const a = this.get(e);
947
+ return a ? ((i = (n = a == null ? void 0 : a.panels) == null ? void 0 : n.reduce) == null ? void 0 : i.call(n, (o, s) => {
948
+ const l = this.getPanelChildrenIds(s.value);
949
+ return o.concat(
950
+ l.reduce((g, h) => {
951
+ var m;
952
+ const v = this.get(h);
953
+ return v && (g.push(v), t && ((m = v.panels) != null && m.length) && g.push(...this.getPanelComponentNodes(v, t))), g;
954
+ }, [])
955
+ );
956
+ }, [])) || [] : [];
957
+ }
958
+ // 显示面板下全部组件
959
+ showPanel(e) {
960
+ var t, a, n;
961
+ e && ((n = (a = (t = this.panelMap[e]) == null ? void 0 : t.children) == null ? void 0 : a.forEach) == null || n.call(a, (i) => {
962
+ this.update(i, {
963
+ show: !0
964
+ });
965
+ }));
966
+ }
967
+ // 隐藏面板下全部组件
968
+ hidePanel(e) {
969
+ var t, a, n;
970
+ e && ((n = (a = (t = this.panelMap[e]) == null ? void 0 : t.children) == null ? void 0 : a.forEach) == null || n.call(a, (i) => {
971
+ this.update(i, {
972
+ show: !1
973
+ });
974
+ }));
975
+ }
976
+ // 克隆 componentNodes(会重置父子关系)
977
+ cloneComponentNodes(e, t) {
978
+ const a = /* @__PURE__ */ new Map(), n = e.reduce((i, o) => {
979
+ var s;
980
+ if (o) {
981
+ const l = this.createFromComponentNode(o, {
982
+ id: I()
983
+ });
984
+ delete l.groupId, o != null && o.panels && (l.panels = o.panels.map((g) => {
985
+ const h = I();
986
+ return g.value === l.currentPanelId && (l.currentPanelId = h), a.set(g.value, h), {
987
+ ...g,
988
+ value: h
989
+ };
990
+ })), i.push(l), (s = t == null ? void 0 : t.onClone) == null || s.call(t, o, l);
991
+ }
992
+ return i;
993
+ }, []);
994
+ return n.forEach((i) => {
995
+ if (i != null && i.panelId) {
996
+ const o = a.get(i.panelId);
997
+ o && (i.panelId = o);
998
+ }
999
+ }), n;
1000
+ }
1001
+ }
1002
+ const S = {
1003
+ id: "default",
1004
+ name: "大屏页面",
1005
+ parentId: void 0
1006
+ };
1007
+ class Ut {
1008
+ constructor() {
1009
+ // pages
1010
+ d(this, "pages", []);
1011
+ // 存储pages;
1012
+ // page映射componentNodes
1013
+ d(this, "pageMap", {});
1014
+ d(this, "listeners", []);
1015
+ d(this, "globalComponentNodes", {});
1016
+ }
1017
+ // 所有全局组件(即全页面展示的组件)
1018
+ // 触发pages变更
1019
+ notifyChange() {
1020
+ const e = this.getAll();
1021
+ this.listeners.forEach((t) => {
1022
+ t(e);
1023
+ });
1024
+ }
1025
+ // 将组件从globalComponents中移除
1026
+ removeGlobalComponentNode(e) {
1027
+ (Array.isArray(e) ? e : [e]).forEach((a) => {
1028
+ const n = typeof a == "string" ? a : a == null ? void 0 : a.id;
1029
+ n && delete this.globalComponentNodes[n];
1030
+ });
1031
+ }
1032
+ // 更新 page
1033
+ update(e, t) {
1034
+ !e || !t || this.pages.some((a) => {
1035
+ const n = a.id === e;
1036
+ return n && (Object.assign(a, t), this.notifyChange()), n;
1037
+ });
1038
+ }
1039
+ // 监听pages变更
1040
+ onChange(e) {
1041
+ return this.listeners.push(e), () => {
1042
+ this.listeners = this.listeners.filter((t) => t !== e);
1043
+ };
1044
+ }
1045
+ // 初始化pages
1046
+ init(e = [], t = []) {
1047
+ this.globalComponentNodes = {}, this.pageMap = { [S.id]: { children: [] } }, this.pages = t != null && t.length ? t : [pe(S)], this.pages.forEach((a) => {
1048
+ var n, i;
1049
+ (n = this.pageMap)[i = a.id] || (n[i] = { children: [] });
1050
+ }), e.forEach((a) => {
1051
+ var i;
1052
+ const n = (a == null ? void 0 : a.pageId) || S.id;
1053
+ if (a != null && a.isAllPage) {
1054
+ this.globalComponentNodes[a.id] = a;
1055
+ return;
1056
+ }
1057
+ ((i = this.pageMap)[n] || (i[n] = { children: [] })).children.push(a);
1058
+ }), this.notifyChange();
1059
+ }
1060
+ // 获取全部全局组件
1061
+ getGlobalComponentNodes() {
1062
+ return Object.values(this.globalComponentNodes);
1063
+ }
1064
+ // 获取指定页面 pageId 的 componentNodes
1065
+ getComponentNodes(e, t) {
1066
+ var n;
1067
+ e = typeof e == "string" ? e : e == null ? void 0 : e.id;
1068
+ const a = (e ? (n = this.pageMap[e]) == null ? void 0 : n.children : []) || [];
1069
+ return t ? a : [...this.getGlobalComponentNodes(), ...a];
1070
+ }
1071
+ // 设置页面的 componentNodes
1072
+ setComponentNodes(e, t) {
1073
+ var a, n;
1074
+ e = typeof e == "string" ? e : e == null ? void 0 : e.id, e && t && ((n = (a = this.pageMap) == null ? void 0 : a[e]) != null && n.children) && (this.pageMap[e].children = t.filter((i) => (i.isAllPage && (this.globalComponentNodes[i.id] = i), !i.isAllPage)));
1075
+ }
1076
+ // 获取某个page
1077
+ get(e) {
1078
+ if (e)
1079
+ return this.pages.find((t) => t.id === e);
1080
+ }
1081
+ // 获取所有pages
1082
+ getAll() {
1083
+ return this.pages;
1084
+ }
1085
+ // 插入一个新页面
1086
+ insert(e, t) {
1087
+ if (this.pageMap[e.id] = { children: [] }, !t) {
1088
+ this.pages.push(e), this.notifyChange();
1089
+ return;
1090
+ }
1091
+ t = typeof t == "string" ? t : t.id;
1092
+ const a = this.pages.findIndex((n) => n.id === t);
1093
+ a >= 0 && (this.pages.splice(a + 1, 0, e), this.notifyChange());
1094
+ }
1095
+ // 获取所有 componentNodes
1096
+ getAllComponentNodes() {
1097
+ return this.pages.reduce((e, t) => e.concat(this.getComponentNodes(t, !0)), this.getGlobalComponentNodes());
1098
+ }
1099
+ // 删除页面
1100
+ delete(e) {
1101
+ if (!e) return;
1102
+ const t = Array.isArray(e) ? e : [e];
1103
+ this.pages = this.pages.filter((a) => {
1104
+ const n = t.includes(a.id);
1105
+ return n && delete this.pageMap[a.id], !n;
1106
+ }), this.notifyChange();
1107
+ }
1108
+ }
1109
+ class Gt {
1110
+ // 获取配置(保存全局)
1111
+ getConfig() {
1112
+ return z().config;
1113
+ }
1114
+ // 静默设置配置 (不触发全局更新)
1115
+ setConfigSilently(e) {
1116
+ this.setConfig(e, { silent: !0 });
1117
+ }
1118
+ // 设置配置(保存全局)
1119
+ setConfig(e, t) {
1120
+ w((a) => t != null && t.silent ? (Object.assign(a.config, {
1121
+ ...typeof e == "function" ? e(this.getConfig()) : e
1122
+ }), a) : {
1123
+ config: t != null && t.cover ? { ...e } : {
1124
+ ...a.config,
1125
+ ...typeof e == "function" ? e(this.getConfig()) : e
1126
+ }
1127
+ });
1128
+ }
1129
+ // 获取当前页
1130
+ getCurrentPage() {
1131
+ return this.getConfig().currentPageId || S.id;
1132
+ }
1133
+ }
1134
+ class Jt {
1135
+ constructor() {
1136
+ d(this, "favorites", []);
1137
+ d(this, "listeners", []);
1138
+ }
1139
+ // 触发listeners
1140
+ notifyChange() {
1141
+ const e = this.getAll();
1142
+ this.listeners.forEach((t) => {
1143
+ t(e);
1144
+ });
1145
+ }
1146
+ // 监听收藏夹变更
1147
+ onChange(e) {
1148
+ return this.listeners.push(e), () => {
1149
+ this.listeners = this.listeners.filter((t) => t !== e);
1150
+ };
1151
+ }
1152
+ // 添加到收藏夹
1153
+ add(e) {
1154
+ const t = Array.isArray(e) ? e : [e];
1155
+ this.favorites.push(...t), this.notifyChange();
1156
+ }
1157
+ // 设置收藏夹
1158
+ set(e) {
1159
+ this.favorites = Array.isArray(e) ? e : [e], this.notifyChange();
1160
+ }
1161
+ // 更新收藏组件
1162
+ update(e, t) {
1163
+ const a = this.get(e);
1164
+ a && (Object.assign(
1165
+ a,
1166
+ typeof t == "function" ? t(a) : t
1167
+ ), this.notifyChange());
1168
+ }
1169
+ // 删除收藏组件
1170
+ delete(e) {
1171
+ const t = (Array.isArray(e) ? e : [e]).reduce((a, n) => {
1172
+ const i = typeof n == "string" ? n : n == null ? void 0 : n.id;
1173
+ return i && a.push(i), a;
1174
+ }, []);
1175
+ this.favorites = this.favorites.filter((a) => !t.includes(a.id)), this.notifyChange();
1176
+ }
1177
+ // 获取一个收藏组件
1178
+ get(e) {
1179
+ return this.favorites.find((t) => t.id === e);
1180
+ }
1181
+ // 获取全部收藏组件
1182
+ getAll() {
1183
+ return this.favorites;
1184
+ }
1185
+ }
1186
+ const j = {
1187
+ color: "black",
1188
+ value: "一段文字",
1189
+ fontSize: 14,
1190
+ lineHeight: 32
1191
+ }, Vt = A(
1192
+ [
1193
+ { key: "value", label: "内容", component: "textarea" },
1194
+ { key: "fontSize", label: "字号", component: "inputNumber", options: { min: 8 } },
1195
+ {
1196
+ key: "lineHeight",
1197
+ label: "行高",
1198
+ labelTip: "单位px",
1199
+ component: "inputNumber",
1200
+ options: { min: 8 }
1201
+ },
1202
+ { key: "fontWeight", label: "字重", component: "fontWeightSelect" },
1203
+ {
1204
+ key: "color",
1205
+ label: "颜色",
1206
+ component: "colorPicker",
1207
+ options: {
1208
+ reset: !0
1209
+ }
1210
+ },
1211
+ { key: "background", label: "背景", component: "colorPicker" },
1212
+ {
1213
+ key: "fontStyle",
1214
+ label: "斜体",
1215
+ component: "checkboxValue",
1216
+ options: {
1217
+ value: "italic"
1218
+ }
1219
+ },
1220
+ { key: "textAlign", label: "水平对齐", component: "textAlignSelect" }
1221
+ ],
1222
+ j
1223
+ ), jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1224
+ __proto__: null,
1225
+ DEFAULT_OPTIONS: j,
1226
+ default: Vt
1227
+ }, Symbol.toStringTag, { value: "Module" })), Ce = [{ label: "点击事件", value: "onClick" }], ke = [{ label: "更新文本", value: "setText" }], qt = T((r) => {
1228
+ const { options: e, width: t, height: a, useExpose: n, handleTrigger: i } = r, [o, s] = x();
1229
+ return n({
1230
+ setText(l) {
1231
+ s(l);
1232
+ }
1233
+ }), /* @__PURE__ */ u(
1234
+ "div",
1235
+ {
1236
+ style: {
1237
+ width: t,
1238
+ height: a,
1239
+ background: e == null ? void 0 : e.background,
1240
+ wordBreak: "break-all",
1241
+ textAlign: e == null ? void 0 : e.textAlign,
1242
+ color: e == null ? void 0 : e.color,
1243
+ fontWeight: e == null ? void 0 : e.fontWeight,
1244
+ fontStyle: e == null ? void 0 : e.fontStyle,
1245
+ fontSize: e == null ? void 0 : e.fontSize,
1246
+ lineHeight: e != null && e.lineHeight ? `${e == null ? void 0 : e.lineHeight}px` : void 0
1247
+ },
1248
+ onClick: (l) => i("onClick", l),
1249
+ dangerouslySetInnerHTML: {
1250
+ __html: o ?? ((e == null ? void 0 : e.value) || "")
1251
+ }
1252
+ }
1253
+ );
1254
+ }, j), Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1255
+ __proto__: null,
1256
+ default: qt,
1257
+ textExposes: ke,
1258
+ textTriggers: Ce
1259
+ }, Symbol.toStringTag, { value: "Module" })), q = {
1260
+ value: "按钮",
1261
+ borderRadius: 2
1262
+ }, Xt = A(
1263
+ [
1264
+ {
1265
+ key: "value",
1266
+ label: "内容",
1267
+ component: "input"
1268
+ },
1269
+ {
1270
+ key: "type",
1271
+ label: "类型",
1272
+ component: "antdButtonTypeSelect"
1273
+ },
1274
+ {
1275
+ key: "borderRadius",
1276
+ label: "边框圆角",
1277
+ component: "inputNumber"
1278
+ }
1279
+ ],
1280
+ q
1281
+ ), Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1282
+ __proto__: null,
1283
+ DEFAULT_OPTIONS: q,
1284
+ default: Xt
1285
+ }, Symbol.toStringTag, { value: "Module" })), Te = [{ label: "点击事件", value: "onClick" }], Kt = T((r) => {
1286
+ const { options: e, width: t, height: a, handleTrigger: n } = r;
1287
+ return /* @__PURE__ */ u(
1288
+ he,
1289
+ {
1290
+ type: e == null ? void 0 : e.type,
1291
+ style: { width: t, height: a, borderRadius: e.borderRadius },
1292
+ onClick: (i) => n("onClick", i),
1293
+ children: /* @__PURE__ */ u(
1294
+ "span",
1295
+ {
1296
+ dangerouslySetInnerHTML: {
1297
+ __html: e.value || ""
1298
+ }
1299
+ }
1300
+ )
1301
+ }
1302
+ );
1303
+ }, q), Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1304
+ __proto__: null,
1305
+ buttonTriggers: Te,
1306
+ default: Kt
1307
+ }, Symbol.toStringTag, { value: "Module" })), W = {
1308
+ placeholder: "请输入",
1309
+ allowClear: !0
1310
+ }, Qt = A(
1311
+ [
1312
+ { key: "value", label: "内容", component: "input" },
1313
+ { key: "placeholder", label: "占位符", component: "input" },
1314
+ { key: "maxLength", label: "最大长度", component: "inputNumber" },
1315
+ { key: "allowClear", label: "可清空", component: "checkbox" }
1316
+ ],
1317
+ W
1318
+ ), ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1319
+ __proto__: null,
1320
+ DEFAULT_OPTIONS: W,
1321
+ default: Qt
1322
+ }, Symbol.toStringTag, { value: "Module" })), Pe = [{ label: "输入文本", value: "input" }], ze = [{ label: "修改值", value: "changeValue" }], ta = T((r) => {
1323
+ const { width: e, height: t, options: a, handleTrigger: n, useExpose: i } = r, [o, s] = x(a == null ? void 0 : a.value);
1324
+ return It(() => {
1325
+ s(a == null ? void 0 : a.value);
1326
+ }, [a == null ? void 0 : a.value]), i({
1327
+ changeValue: (l) => {
1328
+ s(l);
1329
+ }
1330
+ }), /* @__PURE__ */ u(
1331
+ ge,
1332
+ {
1333
+ width: e,
1334
+ height: t,
1335
+ value: o,
1336
+ maxLength: a == null ? void 0 : a.maxLength,
1337
+ allowClear: a == null ? void 0 : a.allowClear,
1338
+ placeholder: a == null ? void 0 : a.placeholder,
1339
+ onChange: (l) => {
1340
+ const g = l.target.value;
1341
+ n("input", g), s(g);
1342
+ }
1343
+ }
1344
+ );
1345
+ }, W), aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1346
+ __proto__: null,
1347
+ default: ta,
1348
+ inputExposes: ze,
1349
+ inputTriggers: Pe
1350
+ }, Symbol.toStringTag, { value: "Module" })), na = "_title_dcdbr_59", ia = {
1351
+ title: na
1352
+ }, X = {
1353
+ value: "标题",
1354
+ color: "black",
1355
+ fontSize: 18
1356
+ }, ra = A(
1357
+ [
1358
+ { key: "value", label: "标题", component: "input" },
1359
+ { key: "fontSize", label: "字号", component: "inputNumber" },
1360
+ { key: "fontWeight", label: "字重", component: "fontWeightSelect" },
1361
+ { key: "letterSpacing", label: "字距", component: "inputNumber" },
1362
+ { key: "color", label: "颜色", component: "colorPicker" },
1363
+ { key: "background", label: "背景", component: "colorPicker" },
1364
+ {
1365
+ key: "fontStyle",
1366
+ label: "斜体",
1367
+ component: "checkboxValue",
1368
+ options: {
1369
+ value: "italic"
1370
+ }
1371
+ },
1372
+ { key: "textAlign", label: "水平对齐", component: "textAlignSelect" }
1373
+ ],
1374
+ X
1375
+ ), oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1376
+ __proto__: null,
1377
+ DEFAULT_OPTIONS: X,
1378
+ default: ra
1379
+ }, Symbol.toStringTag, { value: "Module" })), Ae = [{ label: "点击事件", value: "onClick" }], Ne = [{ label: "更新文本", value: "setText" }], sa = T((r) => {
1380
+ const { options: e, width: t, height: a, useExpose: n, handleTrigger: i } = r, [o, s] = x();
1381
+ return n({
1382
+ setText(l) {
1383
+ s(l);
1384
+ }
1385
+ }), /* @__PURE__ */ u(
1386
+ "div",
1387
+ {
1388
+ style: {
1389
+ width: t,
1390
+ height: a,
1391
+ lineHeight: `${a}px`,
1392
+ background: e == null ? void 0 : e.background,
1393
+ wordBreak: "break-all",
1394
+ textAlign: e == null ? void 0 : e.textAlign,
1395
+ color: e == null ? void 0 : e.color,
1396
+ fontWeight: e == null ? void 0 : e.fontWeight,
1397
+ fontStyle: e == null ? void 0 : e.fontStyle,
1398
+ fontSize: e == null ? void 0 : e.fontSize,
1399
+ letterSpacing: e == null ? void 0 : e.letterSpacing
1400
+ },
1401
+ onClick: (l) => i("onClick", l),
1402
+ className: ia.title,
1403
+ dangerouslySetInnerHTML: {
1404
+ __html: o ?? ((e == null ? void 0 : e.value) || "")
1405
+ }
1406
+ }
1407
+ );
1408
+ }, X), la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1409
+ __proto__: null,
1410
+ default: sa,
1411
+ titleExposes: Ne,
1412
+ titleTriggers: Ae
1413
+ }, Symbol.toStringTag, { value: "Module" })), ca = [
1414
+ {
1415
+ cId: "text",
1416
+ cName: "文本",
1417
+ icon: () => import("./text-Cn6EC5YR.mjs"),
1418
+ category: "base",
1419
+ x: 0,
1420
+ y: 0,
1421
+ width: 120,
1422
+ height: 32,
1423
+ component: c.lazy(() => Promise.resolve().then(() => Wt)),
1424
+ attributesComponent: c.lazy(() => Promise.resolve().then(() => jt)),
1425
+ triggers: Ce,
1426
+ exposes: ke
1427
+ },
1428
+ {
1429
+ cId: "input",
1430
+ cName: "输入框",
1431
+ icon: () => import("./input-BnNvyMJg.mjs"),
1432
+ category: "base",
1433
+ x: 0,
1434
+ y: 0,
1435
+ width: 250,
1436
+ height: 32,
1437
+ triggers: Pe,
1438
+ exposes: ze,
1439
+ component: c.lazy(() => Promise.resolve().then(() => aa)),
1440
+ attributesComponent: c.lazy(() => Promise.resolve().then(() => ea))
1441
+ },
1442
+ {
1443
+ cId: "title",
1444
+ cName: "标题",
1445
+ icon: () => import("./title-Bb_PVLwM.mjs"),
1446
+ category: "base",
1447
+ x: 0,
1448
+ y: 0,
1449
+ width: 120,
1450
+ height: 48,
1451
+ triggers: Ae,
1452
+ exposes: Ne,
1453
+ component: c.lazy(() => Promise.resolve().then(() => la)),
1454
+ attributesComponent: c.lazy(() => Promise.resolve().then(() => oa))
1455
+ },
1456
+ {
1457
+ cId: "button",
1458
+ cName: "按钮",
1459
+ icon: () => import("./button-DSF24312.mjs"),
1460
+ category: "base",
1461
+ x: 0,
1462
+ y: 0,
1463
+ width: 64,
1464
+ height: 32,
1465
+ triggers: Te,
1466
+ component: c.lazy(() => Promise.resolve().then(() => Yt)),
1467
+ attributesComponent: c.lazy(() => Promise.resolve().then(() => Zt))
1468
+ },
1469
+ {
1470
+ cId: "background",
1471
+ cName: "背景",
1472
+ icon: () => import("./background-C6jjuAGp.mjs"),
1473
+ category: "base",
1474
+ x: 0,
1475
+ y: 0,
1476
+ width: 500,
1477
+ height: 300,
1478
+ component: c.lazy(() => import("./index-KruFCy9N.mjs")),
1479
+ attributesComponent: c.lazy(() => import("./attributes-C_fbpAUx.mjs"))
1480
+ },
1481
+ {
1482
+ cId: "image",
1483
+ cName: "图片",
1484
+ icon: () => import("./image-C9zpKfcR.mjs"),
1485
+ category: "base",
1486
+ x: 0,
1487
+ y: 0,
1488
+ width: 270,
1489
+ height: 150,
1490
+ component: c.lazy(() => import("./index-DQU0jlV0.mjs")),
1491
+ attributesComponent: c.lazy(() => import("./attributes-COwKDUMI.mjs"))
1492
+ },
1493
+ {
1494
+ cId: "dateDisplay",
1495
+ cName: "日期展示",
1496
+ icon: () => import("./dateDisplay-DOZ8l8c3.mjs"),
1497
+ category: "base",
1498
+ x: 0,
1499
+ y: 0,
1500
+ width: 250,
1501
+ height: 26,
1502
+ component: c.lazy(() => import("./index-hPKl41YD.mjs")),
1503
+ attributesComponent: c.lazy(() => import("./attributes-BuMChZnt.mjs"))
1504
+ },
1505
+ {
1506
+ cId: "doubleText",
1507
+ cName: "双行文本",
1508
+ category: "base",
1509
+ icon: () => import("./doubleText-B-gI7gxd.mjs"),
1510
+ x: 0,
1511
+ y: 0,
1512
+ width: 120,
1513
+ height: 64,
1514
+ component: c.lazy(() => import("./index-Dh00vKAk.mjs")),
1515
+ attributesComponent: c.lazy(() => import("./attributes-DdjjVR4N.mjs"))
1516
+ }
1517
+ ], da = "_carousel_1b8a0_59", ua = "_carousel_bordered_1b8a0_62", ce = {
1518
+ carousel: da,
1519
+ carousel_bordered: ua
1520
+ }, ha = "_editList_sc7sk_59", ga = {
1521
+ editList: ha
1522
+ }, fa = "_editItem_1azvi_59", ma = "_editItem_left_1azvi_66", ya = "_editItem_body_1azvi_73", pa = "_editItem_body_text_1azvi_77", va = "_editItem_body_text_hover_1azvi_83", _a = "_editItem_right_1azvi_86", ba = "_editRadio_1azvi_89", xa = "_editRadio_hover_1azvi_99", Ia = "_editRadio_selected_1azvi_102", b = {
1523
+ editItem: fa,
1524
+ editItem_left: ma,
1525
+ editItem_body: ya,
1526
+ editItem_body_text: pa,
1527
+ editItem_body_text_hover: va,
1528
+ editItem_right: _a,
1529
+ editRadio: ba,
1530
+ editRadio_hover: xa,
1531
+ editRadio_selected: Ia
1532
+ };
1533
+ function wa(r) {
1534
+ const { value: e } = r, [t, a] = x(!1), [n, i] = x((e == null ? void 0 : e.label) || ""), [o, s] = x(!1);
1535
+ function l() {
1536
+ i((e == null ? void 0 : e.label) || ""), a(!0);
1537
+ }
1538
+ function g() {
1539
+ var h;
1540
+ if (!n) {
1541
+ me.warn("必须填写名称");
1542
+ return;
1543
+ }
1544
+ a(!1), (h = r == null ? void 0 : r.onUpdate) == null || h.call(r, {
1545
+ ...e,
1546
+ label: n
1547
+ });
1548
+ }
1549
+ return /* @__PURE__ */ C("div", { className: b.editItem, children: [
1550
+ /* @__PURE__ */ u(
1551
+ "div",
1552
+ {
1553
+ className: b.editItem_left,
1554
+ onMouseEnter: () => s(!0),
1555
+ onMouseLeave: () => s(!1),
1556
+ onClick: () => {
1557
+ var h;
1558
+ return (h = r == null ? void 0 : r.onSelect) == null ? void 0 : h.call(r);
1559
+ },
1560
+ children: /* @__PURE__ */ u(
1561
+ "div",
1562
+ {
1563
+ className: k(
1564
+ b.editRadio,
1565
+ (r == null ? void 0 : r.isSelected) && b.editRadio_selected,
1566
+ o && b.editRadio_hover
1567
+ )
1568
+ }
1569
+ )
1570
+ }
1571
+ ),
1572
+ /* @__PURE__ */ u("div", { className: b.editItem_body, children: t ? /* @__PURE__ */ u(
1573
+ ge,
1574
+ {
1575
+ value: n,
1576
+ size: "small",
1577
+ maxLength: 100,
1578
+ placeholder: "请输入",
1579
+ onChange: (h) => {
1580
+ i(h.target.value);
1581
+ }
1582
+ }
1583
+ ) : /* @__PURE__ */ u(
1584
+ "div",
1585
+ {
1586
+ title: (e == null ? void 0 : e.label) || "",
1587
+ className: k(
1588
+ b.editItem_body_text,
1589
+ o && b.editItem_body_text_hover
1590
+ ),
1591
+ onClick: () => {
1592
+ var h;
1593
+ return (h = r == null ? void 0 : r.onSelect) == null ? void 0 : h.call(r);
1594
+ },
1595
+ onMouseEnter: () => s(!0),
1596
+ onMouseLeave: () => s(!1),
1597
+ children: e == null ? void 0 : e.label
1598
+ }
1599
+ ) }),
1600
+ /* @__PURE__ */ u("div", { className: b.editItem_right, children: /* @__PURE__ */ C(fe, { children: [
1601
+ t ? /* @__PURE__ */ u(D, { title: "保存", children: /* @__PURE__ */ u(ft, { className: b.editList_opt, onClick: g }) }) : /* @__PURE__ */ u(D, { title: "编辑", children: /* @__PURE__ */ u(mt, { className: b.editList_opt, onClick: l }) }),
1602
+ /* @__PURE__ */ u(D, { title: "删除", children: /* @__PURE__ */ u(yt, { className: b.editList_opt, onClick: () => {
1603
+ var h;
1604
+ return (h = r == null ? void 0 : r.onDelete) == null ? void 0 : h.call(r);
1605
+ } }) })
1606
+ ] }) })
1607
+ ] });
1608
+ }
1609
+ function Sa(r) {
1610
+ const [e, t] = x(!0);
1611
+ function a() {
1612
+ t(!1), setTimeout(() => {
1613
+ var n;
1614
+ (n = r == null ? void 0 : r.onCancel) == null || n.call(r);
1615
+ }, 300);
1616
+ }
1617
+ return /* @__PURE__ */ u(
1618
+ ut,
1619
+ {
1620
+ centered: !0,
1621
+ open: e,
1622
+ title: /* @__PURE__ */ C(fe, { children: [
1623
+ /* @__PURE__ */ u(pt, { style: { color: "#f66e0b" } }),
1624
+ r == null ? void 0 : r.title
1625
+ ] }),
1626
+ onCancel: a,
1627
+ onOk: () => {
1628
+ var n;
1629
+ (n = r == null ? void 0 : r.onOk) == null || n.call(r, a);
1630
+ },
1631
+ okText: r == null ? void 0 : r.okText,
1632
+ cancelText: r == null ? void 0 : r.cancelText,
1633
+ children: r == null ? void 0 : r.content
1634
+ }
1635
+ );
1636
+ }
1637
+ function Ca(r) {
1638
+ const {
1639
+ title: e = "提醒",
1640
+ content: t = " 确定执行操作?",
1641
+ okText: a = "确定",
1642
+ cancelText: n = "取消"
1643
+ } = r;
1644
+ let i = document.createElement("div"), o = ue(i);
1645
+ document.body.append(i), o.render(
1646
+ /* @__PURE__ */ u(
1647
+ Sa,
1648
+ {
1649
+ title: e,
1650
+ content: t,
1651
+ okText: a,
1652
+ cancelText: n,
1653
+ onOk: r == null ? void 0 : r.onOk,
1654
+ onCancel: () => {
1655
+ var l;
1656
+ s(), (l = r == null ? void 0 : r.onCancel) == null || l.call(r);
1657
+ }
1658
+ }
1659
+ )
1660
+ );
1661
+ function s() {
1662
+ i && (o.unmount(), i.remove(), i = null);
1663
+ }
1664
+ return s;
1665
+ }
1666
+ function ka() {
1667
+ const r = R();
1668
+ return J(() => () => {
1669
+ var e;
1670
+ (e = r.current) == null || e.forEach((t) => t == null ? void 0 : t()), r.current = void 0;
1671
+ }, []), G(() => function(e) {
1672
+ var a;
1673
+ const t = Ca({
1674
+ ...e,
1675
+ onOk(n) {
1676
+ var i, o, s;
1677
+ (i = e == null ? void 0 : e.onOk) == null || i.call(e, n), r.current = (s = (o = r.current) == null ? void 0 : o.filter) == null ? void 0 : s.call(o, (l) => l !== t);
1678
+ },
1679
+ onCancel() {
1680
+ var n, i, o;
1681
+ (n = e == null ? void 0 : e.onCancel) == null || n.call(e), r.current = (o = (i = r.current) == null ? void 0 : i.filter) == null ? void 0 : o.call(i, (s) => s !== t);
1682
+ }
1683
+ });
1684
+ (a = r.current || (r.current = [])) == null || a.push(t);
1685
+ }, []);
1686
+ }
1687
+ const U = c.createContext({
1688
+ engine: void 0,
1689
+ rbsEngine: void 0
1690
+ });
1691
+ function Ee() {
1692
+ return c.useContext(U);
1693
+ }
1694
+ function Ta(r) {
1695
+ var v;
1696
+ const { engine: e } = Ee(), { value: t, onSelect: a, list: n = [], onChange: i } = r, o = ka();
1697
+ function s(m) {
1698
+ var p, f;
1699
+ const y = ((p = n == null ? void 0 : n.filter) == null ? void 0 : p.call(n, (_) => _.value !== m)) || [];
1700
+ t === m && (a == null || a((f = y == null ? void 0 : y[0]) == null ? void 0 : f.value)), i == null || i(y);
1701
+ }
1702
+ function l(m) {
1703
+ if (n.length <= 1) {
1704
+ me.warn("至少保留一个面板");
1705
+ return;
1706
+ }
1707
+ const y = e.componentNode.getPanelChildrenIds(m);
1708
+ y != null && y.length ? o({
1709
+ title: "提醒",
1710
+ content: `该面板下包含${y == null ? void 0 : y.length}个组件,确定删除?`,
1711
+ onOk(p) {
1712
+ s(m), e.componentNode.delete(y), p();
1713
+ }
1714
+ }) : s(m);
1715
+ }
1716
+ function g() {
1717
+ const m = [
1718
+ ...n,
1719
+ {
1720
+ label: `面板${n.length}`,
1721
+ value: I()
1722
+ }
1723
+ ];
1724
+ i == null || i(m);
1725
+ }
1726
+ function h(m, y) {
1727
+ Object.assign(m, y), i == null || i([...n]);
1728
+ }
1729
+ return /* @__PURE__ */ C("div", { className: k(ga.editList, r == null ? void 0 : r.className), style: r == null ? void 0 : r.style, children: [
1730
+ (v = n == null ? void 0 : n.map) == null ? void 0 : v.call(n, (m) => /* @__PURE__ */ u(
1731
+ wa,
1732
+ {
1733
+ value: m,
1734
+ isSelected: m.value === t,
1735
+ onSelect: () => {
1736
+ a == null || a(m.value);
1737
+ },
1738
+ onDelete: () => {
1739
+ l(m.value);
1740
+ },
1741
+ onUpdate: (y) => {
1742
+ h(m, y);
1743
+ }
1744
+ },
1745
+ m == null ? void 0 : m.value
1746
+ )),
1747
+ /* @__PURE__ */ u(
1748
+ he,
1749
+ {
1750
+ size: "small",
1751
+ type: "dashed",
1752
+ block: !0,
1753
+ icon: /* @__PURE__ */ u(vt, {}),
1754
+ style: { marginTop: 4 },
1755
+ onClick: () => g(),
1756
+ children: "新增"
1757
+ }
1758
+ )
1759
+ ] });
1760
+ }
1761
+ const Z = {
1762
+ bordered: !0,
1763
+ borderColor: "#ccc"
1764
+ // 边框颜色
1765
+ }, Pa = A(
1766
+ [
1767
+ { key: "bordered", label: "边框", component: "checkbox" },
1768
+ { key: "borderColor", label: "边框颜色", component: "colorPicker" },
1769
+ {
1770
+ key: "_",
1771
+ label: "面板",
1772
+ component: ({ useExtra: r }) => {
1773
+ const { componentNode: e, onChangeComponentNode: t } = r();
1774
+ return /* @__PURE__ */ u(
1775
+ Ta,
1776
+ {
1777
+ value: e.currentPanelId,
1778
+ onSelect: (a) => {
1779
+ t({
1780
+ currentPanelId: a
1781
+ });
1782
+ },
1783
+ list: e.panels,
1784
+ onChange: (a) => {
1785
+ t({
1786
+ panels: [...a]
1787
+ });
1788
+ }
1789
+ }
1790
+ );
1791
+ }
1792
+ }
1793
+ ],
1794
+ Z
1795
+ ), za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1796
+ __proto__: null,
1797
+ DEFAULT_OPTIONS: Z,
1798
+ default: Pa
1799
+ }, Symbol.toStringTag, { value: "Module" })), Aa = "_toggleBar_2ldfa_59", Na = "_toggleBar_rect_2ldfa_67", Ea = "_toggleBar_rect_selected_2ldfa_78", H = {
1800
+ toggleBar: Aa,
1801
+ toggleBar_rect: Na,
1802
+ toggleBar_rect_selected: Ea
1803
+ };
1804
+ function Ma(r) {
1805
+ const { count: e = 1, value: t = 0 } = r, a = G(() => Array(e).fill(null).map((n, i) => {
1806
+ const o = t === i;
1807
+ return /* @__PURE__ */ u(
1808
+ "div",
1809
+ {
1810
+ className: k(
1811
+ H.toggleBar_rect,
1812
+ o && H.toggleBar_rect_selected
1813
+ ),
1814
+ onClick: () => {
1815
+ var s;
1816
+ (s = r == null ? void 0 : r.onChange) == null || s.call(r, i);
1817
+ }
1818
+ },
1819
+ `${i}-${e}`
1820
+ );
1821
+ }), [e, t]);
1822
+ return /* @__PURE__ */ u("div", { className: H.toggleBar, children: a });
1823
+ }
1824
+ const Me = [
1825
+ { label: "面板切换", value: "onChange" },
1826
+ { label: "面板点击", value: "onClick" }
1827
+ ], Le = [{ label: "切换面板", value: "changePanel" }], La = T((r) => {
1828
+ var m;
1829
+ const { engine: e } = Ee(), { options: t, width: a, height: n, componentNode: i, handleTrigger: o, useExpose: s } = r, l = R(), [g, h] = x(0);
1830
+ function v(y) {
1831
+ var f, _;
1832
+ const p = (_ = (f = i.panels) == null ? void 0 : f[y]) == null ? void 0 : _.value;
1833
+ l.current !== void 0 && p === l.current || (o("onChange", y), h(y), p && setTimeout(() => {
1834
+ e.componentNode.hidePanel(l.current), l.current = p, e.componentNode.showPanel(p);
1835
+ }));
1836
+ }
1837
+ return J(() => {
1838
+ var p, f;
1839
+ const y = (f = (p = i.panels) == null ? void 0 : p.findIndex) == null ? void 0 : f.call(p, (_) => (_ == null ? void 0 : _.value) === (i == null ? void 0 : i.currentPanelId));
1840
+ y !== void 0 && v(y);
1841
+ }, [i.currentPanelId, i.panels]), wt(() => {
1842
+ e.componentNode.hidePanel(l.current);
1843
+ }), s({
1844
+ changePanel(y) {
1845
+ v(y);
1846
+ }
1847
+ }), /* @__PURE__ */ u(
1848
+ "div",
1849
+ {
1850
+ style: { width: a, height: n, borderColor: t == null ? void 0 : t.borderColor },
1851
+ className: k(ce.carousel, (t == null ? void 0 : t.bordered) && ce.carousel_bordered),
1852
+ onClick: () => o("onClick"),
1853
+ children: /* @__PURE__ */ u(
1854
+ Ma,
1855
+ {
1856
+ value: g,
1857
+ count: (m = i.panels) == null ? void 0 : m.length,
1858
+ onChange: (y) => v(y)
1859
+ }
1860
+ )
1861
+ }
1862
+ );
1863
+ }, Z), Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1864
+ __proto__: null,
1865
+ default: La,
1866
+ exposes: Le,
1867
+ triggers: Me
1868
+ }, Symbol.toStringTag, { value: "Module" })), Da = [
1869
+ {
1870
+ cId: "carousel",
1871
+ cName: "走马灯",
1872
+ icon: () => import("./carousel-BAaOAU7Z.mjs"),
1873
+ category: "layout",
1874
+ x: 0,
1875
+ y: 0,
1876
+ width: 500,
1877
+ height: 250,
1878
+ component: c.lazy(() => Promise.resolve().then(() => Oa)),
1879
+ attributesComponent: c.lazy(() => Promise.resolve().then(() => za)),
1880
+ panels: [
1881
+ {
1882
+ label: "面板一",
1883
+ value: ""
1884
+ },
1885
+ {
1886
+ label: "面板二",
1887
+ value: ""
1888
+ }
1889
+ ],
1890
+ triggers: Me,
1891
+ exposes: Le
1892
+ },
1893
+ {
1894
+ cId: "specialCard",
1895
+ cName: "特殊卡片",
1896
+ category: "layout",
1897
+ x: 0,
1898
+ y: 0,
1899
+ width: 400,
1900
+ height: 300,
1901
+ component: c.lazy(() => import("./index-BYJ5e2rN.mjs")),
1902
+ attributesComponent: c.lazy(() => import("./attributes-C5pimFaJ.mjs")),
1903
+ icon: () => import("./specialCard-jikYSVVg.mjs"),
1904
+ panels: [{ label: "特殊卡片", value: "" }]
1905
+ }
1906
+ ], Ra = [
1907
+ {
1908
+ cId: "pie",
1909
+ cName: "饼形图",
1910
+ icon: () => import("./pie-CkCoP4pD.mjs"),
1911
+ category: "charts",
1912
+ x: 0,
1913
+ y: 0,
1914
+ width: 250,
1915
+ height: 250,
1916
+ component: c.lazy(() => import("./index-CUkul7R0.mjs"))
1917
+ },
1918
+ {
1919
+ cId: "line",
1920
+ cName: "折线图",
1921
+ icon: () => import("./line-5qH7n1hB.mjs"),
1922
+ category: "charts",
1923
+ x: 0,
1924
+ y: 0,
1925
+ width: 250,
1926
+ height: 250,
1927
+ component: c.lazy(() => import("./index-qoPI1H9i.mjs")),
1928
+ attributesComponent: c.lazy(() => import("./attributes-w4UsefFp.mjs")),
1929
+ dataSourceType: "static",
1930
+ staticDataSource: [
1931
+ { name: "选项一", value1: 100, value2: 200, value3: 300 },
1932
+ { name: "选项二", value1: 50, value2: 150, value3: 250 },
1933
+ { name: "选项三", value1: 80, value2: 180, value3: 280 }
1934
+ ]
1935
+ },
1936
+ {
1937
+ cId: "bar",
1938
+ cName: "柱形图",
1939
+ icon: () => import("./bar-CYwWrGQo.mjs"),
1940
+ category: "charts",
1941
+ x: 0,
1942
+ y: 0,
1943
+ width: 250,
1944
+ height: 250,
1945
+ component: c.lazy(() => import("./index-BUth1V1H.mjs"))
1946
+ },
1947
+ {
1948
+ cId: "radar",
1949
+ cName: "雷达图",
1950
+ icon: () => import("./radar-DmhYvzXw.mjs"),
1951
+ category: "charts",
1952
+ x: 0,
1953
+ y: 0,
1954
+ width: 350,
1955
+ height: 300,
1956
+ options: {},
1957
+ component: c.lazy(() => import("./index-BzpuXSbE.mjs"))
1958
+ },
1959
+ {
1960
+ cId: "gauge",
1961
+ cName: "仪表盘",
1962
+ icon: () => import("./gauge-5zG2YNJg.mjs"),
1963
+ category: "charts",
1964
+ x: 0,
1965
+ y: 0,
1966
+ width: 350,
1967
+ height: 300,
1968
+ options: {},
1969
+ component: c.lazy(() => import("./index-BRgbtPVH.mjs"))
1970
+ },
1971
+ {
1972
+ cId: "horizontalBar",
1973
+ cName: "横向柱形图",
1974
+ icon: () => import("./horizontalBar-D25X8HSd.mjs"),
1975
+ category: "charts",
1976
+ x: 0,
1977
+ y: 0,
1978
+ width: 350,
1979
+ height: 300,
1980
+ options: {},
1981
+ component: c.lazy(() => import("./index-ryl5yfWq.mjs"))
1982
+ },
1983
+ {
1984
+ cId: "barLine",
1985
+ cName: "柱形折线图",
1986
+ category: "charts",
1987
+ icon: () => import("./barLine-PdxYMjap.mjs"),
1988
+ x: 0,
1989
+ y: 0,
1990
+ width: 350,
1991
+ height: 300,
1992
+ options: {},
1993
+ component: c.lazy(() => import("./index-B4KSL-Bu.mjs"))
1994
+ },
1995
+ {
1996
+ cId: "ring",
1997
+ cName: "圆环图",
1998
+ category: "charts",
1999
+ icon: () => import("./ring-BcgSqTwf.mjs"),
2000
+ x: 0,
2001
+ y: 0,
2002
+ width: 350,
2003
+ height: 300,
2004
+ options: {},
2005
+ component: c.lazy(() => import("./index-Bvab-NQ4.mjs")),
2006
+ attributesComponent: c.lazy(() => import("./attributes-YL1J6lLR.mjs"))
2007
+ }
2008
+ ], Fa = [
2009
+ {
2010
+ cId: "page-nav",
2011
+ cName: "页面导航栏",
2012
+ description: "管理所有子页面切换的导航栏。",
2013
+ icon: () => import("./page-nav-CgQW4-Fl.mjs"),
2014
+ category: "nav",
2015
+ x: 0,
2016
+ y: 0,
2017
+ width: 300,
2018
+ height: 32,
2019
+ isAllPage: !0,
2020
+ component: c.lazy(() => import("./index-Ljz96Vra.mjs"))
2021
+ }
2022
+ ];
2023
+ async function Ha(r, e = 300) {
2024
+ return new Promise((t) => {
2025
+ setTimeout(() => {
2026
+ t(r);
2027
+ }, e);
2028
+ });
2029
+ }
2030
+ const de = {
2031
+ name: "",
2032
+ age: "",
2033
+ sex: "",
2034
+ address: ""
2035
+ }, $a = [
2036
+ { name: "唐某人", age: "25", sex: "男", address: "浙江省杭州市" },
2037
+ { name: "赵某人", age: "12", sex: "男", address: "浙江省杭州市" },
2038
+ { name: "狐某人", age: "300", sex: "女", address: "浙江省杭州市" },
2039
+ { name: "牛某人", age: "190", sex: "男", address: "浙江省杭州市" },
2040
+ { name: "白某人", age: "10000", sex: "女", address: "浙江省杭州市" },
2041
+ { name: "韩某人", age: "342", sex: "男", address: "浙江省杭州市" },
2042
+ { name: "王某人", age: "33", sex: "男", address: "浙江省杭州市" },
2043
+ { name: "汪某人", age: "4442", sex: "女", address: "浙江省杭州市" },
2044
+ { name: "库某人", age: "992", sex: "男", address: "浙江省杭州市" },
2045
+ { name: "雷某人", age: "32332", sex: "男", address: "浙江省杭州市" },
2046
+ { name: "魔某人", age: "12", sex: "女", address: "浙江省杭州市" }
2047
+ ];
2048
+ function Ba(r, e) {
2049
+ var o, s, l, g, h, v, m, y;
2050
+ const t = (s = (o = e == null ? void 0 : e.name) == null ? void 0 : o.toLowerCase) == null ? void 0 : s.call(o), a = (g = (l = e == null ? void 0 : e.age) == null ? void 0 : l.toLowerCase) == null ? void 0 : g.call(l), n = (v = (h = e == null ? void 0 : e.sex) == null ? void 0 : h.toLowerCase) == null ? void 0 : v.call(h), i = (y = (m = e == null ? void 0 : e.address) == null ? void 0 : m.toLowerCase) == null ? void 0 : y.call(m);
2051
+ return r.filter((p) => {
2052
+ var N, K, Y, E, Q, ee, M, te, ae, L, ne, ie;
2053
+ let f = "", _ = !0;
2054
+ return _ && t && (f = (K = (N = p == null ? void 0 : p.name) == null ? void 0 : N.toLowerCase) == null ? void 0 : K.call(N)) && (_ = (Y = f == null ? void 0 : f.includes) == null ? void 0 : Y.call(f, t)), _ && a && (f = (Q = (E = p == null ? void 0 : p.age) == null ? void 0 : E.toLowerCase) == null ? void 0 : Q.call(E)) && (_ = (ee = f == null ? void 0 : f.includes) == null ? void 0 : ee.call(f, a)), _ && n && (f = (te = (M = p == null ? void 0 : p.sex) == null ? void 0 : M.toLowerCase) == null ? void 0 : te.call(M)) && (_ = (ae = f == null ? void 0 : f.includes) == null ? void 0 : ae.call(f, n)), _ && i && (f = (ne = (L = p == null ? void 0 : p.address) == null ? void 0 : L.toLowerCase) == null ? void 0 : ne.call(L)) && (_ = (ie = f == null ? void 0 : f.includes) == null ? void 0 : ie.call(f, i)), _;
2055
+ });
2056
+ }
2057
+ function Ua(r) {
2058
+ const [e, t] = x(r), a = R(e);
2059
+ return a.current = e, [e, t, a];
2060
+ }
2061
+ const wn = ot(
2062
+ (r, e) => {
2063
+ const t = r == null ? void 0 : r.component, [a, n] = x(), [i, o] = x(!1), [s, l] = x(!0);
2064
+ return st(e, () => ({
2065
+ open(g) {
2066
+ n(g), o(!0), l(!1);
2067
+ },
2068
+ close(g = !0) {
2069
+ o(!1), l(g);
2070
+ }
2071
+ })), !t || s ? /* @__PURE__ */ u(et, {}) : /* @__PURE__ */ u(
2072
+ t,
2073
+ {
2074
+ params: a,
2075
+ visible: i,
2076
+ onCancel: (...g) => {
2077
+ var h;
2078
+ o(!1), (h = r == null ? void 0 : r.onCancel) == null || h.call(r, ...g);
2079
+ },
2080
+ onOk: (...g) => {
2081
+ var h;
2082
+ o(!1), (h = r == null ? void 0 : r.onOk) == null || h.call(r, ...g);
2083
+ },
2084
+ afterClose: () => {
2085
+ l(!0);
2086
+ }
2087
+ }
2088
+ );
2089
+ }
2090
+ ), Oe = [
2091
+ { label: "刷新", value: "refresh" },
2092
+ { label: "修改筛选项", value: "changeFilter" },
2093
+ { label: "设置筛选项", value: "setFilter" },
2094
+ { label: "清空筛选项", value: "clearFilter" }
2095
+ ], Ga = T((r) => {
2096
+ const { width: e, height: t, useExpose: a } = r, [n, i, o] = Ua(de), {
2097
+ data: s = [],
2098
+ loading: l,
2099
+ refresh: g
2100
+ } = St(
2101
+ async () => {
2102
+ const v = await Ha($a);
2103
+ return Ba(v, n);
2104
+ },
2105
+ {
2106
+ refreshDeps: [n]
2107
+ }
2108
+ ), h = [
2109
+ { dataIndex: "name", title: "姓名" },
2110
+ { dataIndex: "age", title: "年龄" },
2111
+ { dataIndex: "sex", title: "性别" },
2112
+ { dataIndex: "address", title: "籍贯" }
2113
+ ];
2114
+ return a({
2115
+ refresh: () => {
2116
+ g();
2117
+ },
2118
+ changeFilter: (v) => {
2119
+ i({
2120
+ ...o.current,
2121
+ ...v
2122
+ });
2123
+ },
2124
+ setFilter: (v) => {
2125
+ i(v);
2126
+ },
2127
+ clearFilter: () => {
2128
+ i({ ...de });
2129
+ }
2130
+ }), /* @__PURE__ */ u(
2131
+ ht,
2132
+ {
2133
+ style: { width: e, height: t, overflow: "hidden auto" },
2134
+ columns: h,
2135
+ loading: l,
2136
+ dataSource: s,
2137
+ pagination: !1
2138
+ }
2139
+ );
2140
+ }), Ja = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2141
+ __proto__: null,
2142
+ default: Ga,
2143
+ peopleExposes: Oe
2144
+ }, Symbol.toStringTag, { value: "Module" })), Va = [
2145
+ {
2146
+ cId: "peopleTable",
2147
+ cName: "人员表格",
2148
+ description: "演示使用的表格,可以筛选人员列表",
2149
+ icon: () => import("./peopleTable-yWF2Rkyo.mjs"),
2150
+ category: "other",
2151
+ x: 0,
2152
+ y: 0,
2153
+ width: 600,
2154
+ height: 300,
2155
+ exposes: Oe,
2156
+ component: c.lazy(() => Promise.resolve().then(() => Ja))
2157
+ },
2158
+ {
2159
+ cId: "chinaMap",
2160
+ cName: "中国地图",
2161
+ description: "使用echarts实现的中国地图。",
2162
+ icon: () => import("./chinaMap-DqxLnLmi.mjs"),
2163
+ category: "other",
2164
+ x: 0,
2165
+ y: 0,
2166
+ width: 500,
2167
+ height: 500,
2168
+ component: c.lazy(() => import("./index-n9OtRMYa.mjs")),
2169
+ attributesComponent: c.lazy(() => import("./attributes-C0SMjnHG.mjs"))
2170
+ },
2171
+ {
2172
+ cId: "scrollList",
2173
+ cName: "滚动列表",
2174
+ description: "支持自动滚动的列表组件。",
2175
+ icon: () => import("./scrollList-DPCIAc32.mjs"),
2176
+ category: "other",
2177
+ x: 0,
2178
+ y: 0,
2179
+ width: 300,
2180
+ height: 500,
2181
+ dataSourceType: "static",
2182
+ staticDataSource: [
2183
+ { key: "1", title: "测试演示项目", status: "1" },
2184
+ { key: "2", title: "私有化项目", status: "2" },
2185
+ { key: "3", title: "公有云项目", status: "2" },
2186
+ { key: "4", title: "培训项目一", status: "1" },
2187
+ { key: "5", title: "培训项目二", status: "2" },
2188
+ { key: "6", title: "tjh项目", status: "1" }
2189
+ ],
2190
+ component: c.lazy(() => import("./index-CBxj6uKJ.mjs")),
2191
+ attributesComponent: c.lazy(() => import("./attributes-DztmBsKn.mjs"))
2192
+ },
2193
+ {
2194
+ cId: "defaultImage",
2195
+ cName: "预置图片",
2196
+ description: "预置的一组图片。",
2197
+ icon: () => import("./defaultImage-D8SVO55a.mjs"),
2198
+ category: "other",
2199
+ x: 0,
2200
+ y: 0,
2201
+ width: 150,
2202
+ height: 150,
2203
+ component: c.lazy(() => import("./index-D_0vVSWq.mjs")),
2204
+ attributesComponent: c.lazy(() => import("./attributes-E8oqU4q7.mjs"))
2205
+ },
2206
+ {
2207
+ cId: "ProgressList",
2208
+ cName: "进度条列表",
2209
+ description: "支持自动滚动的进度条列表。",
2210
+ icon: () => import("./ProgressList-B37WCaue.mjs"),
2211
+ category: "other",
2212
+ x: 0,
2213
+ y: 0,
2214
+ width: 300,
2215
+ height: 500,
2216
+ dataSourceType: "static",
2217
+ staticDataSource: [
2218
+ { key: "1", title: "测试演示项目", count: 999 },
2219
+ { key: "2", title: "私有化项目", count: 800 },
2220
+ { key: "3", title: "公有云项目", count: 600 },
2221
+ { key: "4", title: "培训项目一", count: 400 },
2222
+ { key: "5", title: "培训项目二", count: 200 },
2223
+ { key: "6", title: "tjh项目", count: 0 }
2224
+ ],
2225
+ component: c.lazy(() => import("./index-CyS-CdYv.mjs")),
2226
+ attributesComponent: c.lazy(() => import("./attributes-Dv8IMI4h.mjs"))
2227
+ },
2228
+ {
2229
+ cId: "specialTitle",
2230
+ cName: "特殊标题",
2231
+ category: "other",
2232
+ description: "带有特殊样式的标题",
2233
+ icon: () => import("./specialTitle-DHomK2iu.mjs"),
2234
+ x: 0,
2235
+ y: 0,
2236
+ width: 500,
2237
+ height: 32,
2238
+ component: c.lazy(() => import("./index-BYe40Zu2.mjs")),
2239
+ attributesComponent: c.lazy(() => import("./attributes-BWtBVgsg.mjs"))
2240
+ }
2241
+ ], ja = {
2242
+ id: "system",
2243
+ name: "默认组件包",
2244
+ origin: "system",
2245
+ version: "0.0.20",
2246
+ description: "由官方发布的组件库,随编辑器主版本迭代而更新。",
2247
+ components: [
2248
+ ...ca,
2249
+ // 基础组件
2250
+ ...Da,
2251
+ // 布局组件
2252
+ ...Ra,
2253
+ // 图表组件
2254
+ ...Fa,
2255
+ // 导航组件
2256
+ ...Va
2257
+ // 其他组件
2258
+ ]
2259
+ };
2260
+ class qa {
2261
+ constructor() {
2262
+ d(this, "map", /* @__PURE__ */ new Map());
2263
+ }
2264
+ // 监听事件
2265
+ on(e, t, a) {
2266
+ if (!e) throw new Error("key is not exist.");
2267
+ if (!t) throw new Error("key is not exist.");
2268
+ const n = this.map.get(e), i = {
2269
+ once: a,
2270
+ callback: t
2271
+ };
2272
+ n ? n.push(i) : this.map.set(e, [i]);
2273
+ }
2274
+ // 监听事件(执行一次后销毁)
2275
+ once(e, t) {
2276
+ if (!e) throw new Error("key is not exist.");
2277
+ if (!t) throw new Error("key is not exist.");
2278
+ this.on(e, t, !0);
2279
+ }
2280
+ // 发布变更
2281
+ notify(e, t) {
2282
+ if (!e) throw new Error("key is not exist.");
2283
+ const a = this.map.get(e);
2284
+ if (a) {
2285
+ const n = a.filter((i) => {
2286
+ var o;
2287
+ return (o = i == null ? void 0 : i.callback) == null || o.call(i, t), !(i != null && i.once);
2288
+ });
2289
+ if (!(n != null && n.length)) {
2290
+ this.map.delete(e);
2291
+ return;
2292
+ }
2293
+ (n == null ? void 0 : n.length) !== (a == null ? void 0 : a.length) && this.map.set(e, n);
2294
+ }
2295
+ }
2296
+ // 删除一个事件
2297
+ remove(e, t) {
2298
+ if (!e) throw new Error("key is not exist.");
2299
+ if (!t) throw new Error("key is not exist.");
2300
+ const a = this.map.get(e);
2301
+ if (a && t) {
2302
+ const n = a.filter((i) => i.callback !== t);
2303
+ n.length !== a.length && this.map.set(e, n);
2304
+ }
2305
+ }
2306
+ // 删除一个key对应的所有事件
2307
+ removeKey(e) {
2308
+ if (!e) throw new Error("key is not exist.");
2309
+ this.map.delete(e);
2310
+ }
2311
+ // 清空
2312
+ clear() {
2313
+ this.map.clear();
2314
+ }
2315
+ }
2316
+ const Wa = {
2317
+ reset: "重置",
2318
+ menu: {
2319
+ bar: {
2320
+ library: "组件库",
2321
+ pages: "页面管理",
2322
+ componentNodes: "当前页组件",
2323
+ property: "个人资产",
2324
+ favorites: "收藏夹",
2325
+ history: "历史记录"
2326
+ },
2327
+ library: {
2328
+ base: "基础组件",
2329
+ charts: "图表组件",
2330
+ layout: "布局组件",
2331
+ nav: "导航组件",
2332
+ unknown: "未分类组件"
2333
+ }
2334
+ },
2335
+ head: {
2336
+ shortCutKeys: {
2337
+ title: "快捷键",
2338
+ all: "全选",
2339
+ invert: "反选",
2340
+ copy: "复制",
2341
+ save: "保存",
2342
+ multiple: "多选",
2343
+ multipleExt: {
2344
+ ext1: "按住",
2345
+ ext2: "选中"
2346
+ },
2347
+ delete: "删除",
2348
+ deleteExt: {
2349
+ ext1: "或"
2350
+ },
2351
+ move: "移动",
2352
+ force: "强制",
2353
+ forceExt: {
2354
+ ext1: "按住",
2355
+ ext2: "选中锁定组件"
2356
+ },
2357
+ undo: "撤销",
2358
+ cancelUndo: "取消撤销",
2359
+ zoom: "缩放",
2360
+ zoomExt: {
2361
+ ext1: "鼠标滚轮"
2362
+ },
2363
+ zoomReset: "缩放重置",
2364
+ zoomResetExt: {
2365
+ ext1: "鼠标中键"
2366
+ },
2367
+ dragCanvas: "拖拽画布",
2368
+ dragCanvasExt: {
2369
+ ext1: "按住"
2370
+ }
2371
+ },
2372
+ undo: "撤销",
2373
+ cancelUndo: "取消撤销",
2374
+ export: "导出",
2375
+ import: "导入",
2376
+ save: "保存到本地",
2377
+ clear: "清空",
2378
+ language: "{{text}}",
2379
+ settings: "设置",
2380
+ preview: "预览"
2381
+ },
2382
+ attributes: {
2383
+ empty: "请选择一个组件",
2384
+ attr: {
2385
+ title: "属性"
2386
+ },
2387
+ dataSource: {
2388
+ title: "数据"
2389
+ },
2390
+ interactive: {
2391
+ title: "交互"
2392
+ }
2393
+ }
2394
+ }, Xa = {
2395
+ reset: "reset",
2396
+ menu: {
2397
+ bar: {
2398
+ library: "library",
2399
+ pages: "pages",
2400
+ componentNodes: "componentNodes",
2401
+ property: "property",
2402
+ favorites: "favorites",
2403
+ history: "history"
2404
+ },
2405
+ library: {
2406
+ base: "base",
2407
+ charts: "charts",
2408
+ layout: "layout",
2409
+ nav: "nav",
2410
+ unknown: "unknown"
2411
+ }
2412
+ },
2413
+ head: {
2414
+ shortCutKeys: {
2415
+ title: "shortcut keys",
2416
+ all: "all",
2417
+ invert: "invert",
2418
+ copy: "copy",
2419
+ save: "save",
2420
+ multiple: "multiple",
2421
+ multipleExt: {
2422
+ ext1: "press",
2423
+ ext2: "selected"
2424
+ },
2425
+ delete: "delete",
2426
+ deleteExt: {
2427
+ ext1: "or"
2428
+ },
2429
+ move: "move",
2430
+ force: "force",
2431
+ forceExt: {
2432
+ ext1: "press",
2433
+ ext2: "select lock component"
2434
+ },
2435
+ undo: "undo",
2436
+ cancelUndo: "cancelUndo",
2437
+ zoom: "zoom",
2438
+ zoomExt: {
2439
+ ext1: "Mouse Wheel"
2440
+ },
2441
+ zoomReset: "zoom reset",
2442
+ zoomResetExt: {
2443
+ ext1: "Mouse Mid"
2444
+ },
2445
+ dragCanvas: "drag canvas",
2446
+ dragCanvasExt: {
2447
+ ext1: "press"
2448
+ }
2449
+ },
2450
+ undo: "undo",
2451
+ cancelUndo: "cancel undo",
2452
+ export: "export",
2453
+ import: "import",
2454
+ save: "save local file",
2455
+ clear: "clear",
2456
+ language: "{{text}}",
2457
+ settings: "settings",
2458
+ preview: "preview"
2459
+ },
2460
+ attributes: {
2461
+ empty: "please select a componentNode",
2462
+ attr: {
2463
+ title: "attributes"
2464
+ },
2465
+ dataSource: {
2466
+ title: "dataSource"
2467
+ },
2468
+ interactive: {
2469
+ title: "interactive"
2470
+ }
2471
+ }
2472
+ }, Sn = {
2473
+ zh: "zh"
2474
+ };
2475
+ function Za(r) {
2476
+ ye.changeLanguage(r);
2477
+ }
2478
+ ye.use(bt).use(_t).init({
2479
+ lng: "zh",
2480
+ fallbackLng: "en",
2481
+ resources: {
2482
+ en: {
2483
+ translation: Xa
2484
+ },
2485
+ zh: {
2486
+ translation: Wa
2487
+ }
2488
+ }
2489
+ });
2490
+ class Ka {
2491
+ constructor() {
2492
+ d(this, "initData");
2493
+ // 初始化data(不在list中)
2494
+ d(this, "maxSize", 20);
2495
+ // 最大容量
2496
+ d(this, "list", []);
2497
+ // 历史记录列表(存储顺序:[new, ..., old])
2498
+ d(this, "currentIndex", -1);
2499
+ // 当前历史索引
2500
+ d(this, "listeners", []);
2501
+ }
2502
+ // 监听器
2503
+ // 获取历史数据
2504
+ getHistoryData() {
2505
+ return {
2506
+ maxSize: this.maxSize,
2507
+ list: this.getAll(),
2508
+ currentIndex: this.currentIndex,
2509
+ current: this.getCurrent(),
2510
+ isCanGoForward: !!(this.list.length && this.currentIndex),
2511
+ // 前进,是否可以前往更新记录
2512
+ isCanGoBack: !!(this.list.length && this.currentIndex <= this.list.length - 1)
2513
+ // 后退,是否可以前往更久记录
2514
+ };
2515
+ }
2516
+ // 触发事件
2517
+ notifyListChange() {
2518
+ const e = this.getHistoryData();
2519
+ this.listeners.forEach((t) => {
2520
+ t(e);
2521
+ });
2522
+ }
2523
+ // 检查容量
2524
+ checkCapacity() {
2525
+ let e = !1;
2526
+ return this.currentIndex >= this.maxSize && (this.currentIndex = 0, this.list = this.list.filter((t) => t.isPass), e = !0), this.list.length <= this.maxSize ? e : (this.list = this.list.slice(0, this.maxSize), !0);
2527
+ }
2528
+ // 更新列表的isPass属性
2529
+ updateIsPass(e) {
2530
+ this.list.forEach((t, a) => {
2531
+ t.isPass = a >= e;
2532
+ });
2533
+ }
2534
+ // 获取initData
2535
+ getInitDataRecordItem() {
2536
+ return {
2537
+ stepId: "init",
2538
+ data: pe(this.initData),
2539
+ isPass: !0
2540
+ };
2541
+ }
2542
+ // 初始化
2543
+ setInitData(e) {
2544
+ this.initData = e;
2545
+ }
2546
+ // 获取历史记录列表
2547
+ getAll() {
2548
+ return this.list;
2549
+ }
2550
+ getCurrent() {
2551
+ return this.list[this.currentIndex];
2552
+ }
2553
+ // 新增一条记录
2554
+ add(e, t) {
2555
+ const a = {
2556
+ data: e,
2557
+ isPass: !0,
2558
+ stepId: I(),
2559
+ description: t
2560
+ };
2561
+ return this.list = [a, ...this.list.filter((n) => n.isPass)], this.currentIndex = 0, this.checkCapacity(), this.notifyListChange(), a;
2562
+ }
2563
+ // 判断stepId是否已经passed
2564
+ isPass(e) {
2565
+ var t, a, n;
2566
+ return e ? !!((n = (a = (t = this.list).find) == null ? void 0 : a.call(t, (i) => i.stepId === e)) != null && n.isPass) : !1;
2567
+ }
2568
+ // 前往指定记录
2569
+ go(e) {
2570
+ let t = this.list.findIndex((a) => a.stepId === e);
2571
+ if (t < 0) {
2572
+ console.warn(`[history] stepId not found: ${e}.`);
2573
+ return;
2574
+ }
2575
+ return this.updateIsPass(this.currentIndex = t), this.notifyListChange(), this.getCurrent();
2576
+ }
2577
+ // 前往上一条记录
2578
+ goBack() {
2579
+ if (!(this.currentIndex >= this.list.length))
2580
+ return this.updateIsPass(++this.currentIndex), this.notifyListChange(), this.getCurrent() || this.getInitDataRecordItem();
2581
+ }
2582
+ // 前往下一条记录
2583
+ goForward() {
2584
+ if (!(this.currentIndex <= 0))
2585
+ return this.updateIsPass(--this.currentIndex), this.notifyListChange(), this.getCurrent();
2586
+ }
2587
+ // 设置最大容量
2588
+ setMaxSize(e = 0) {
2589
+ e = Math.max(0, e);
2590
+ const t = e < this.maxSize;
2591
+ this.maxSize = e, t && this.checkCapacity() && this.notifyListChange();
2592
+ }
2593
+ // 监听历史记录变化
2594
+ onChange(e) {
2595
+ return this.listeners.push(e), () => {
2596
+ this.listeners = this.listeners.filter((t) => t !== e);
2597
+ };
2598
+ }
2599
+ }
2600
+ xt.interceptors.request.use((r, e) => ((e == null ? void 0 : e.useCache) === void 0 && (e.useCache = !0, e.ttl === void 0 && (e.ttl = 2e3)), {
2601
+ url: r,
2602
+ options: e
2603
+ }));
2604
+ const $ = {
2605
+ visible: "$_visible",
2606
+ request: "$_request",
2607
+ custom: "$_custom"
2608
+ }, Ya = [
2609
+ { label: "显隐", value: $.visible },
2610
+ { label: "请求", value: $.request },
2611
+ { label: "自定义函数", value: $.custom }
2612
+ ], Cn = Ya.reduce((r, e) => (r[e.value] = e.label, r), {});
2613
+ class Qa {
2614
+ constructor(e) {
2615
+ // 载入的json对象
2616
+ d(this, "json");
2617
+ // json值监听
2618
+ d(this, "listeners", []);
2619
+ // setTimeout的id
2620
+ d(this, "timerId");
2621
+ // 组件模板
2622
+ d(this, "component", new Mt());
2623
+ // 组件数据实例
2624
+ d(this, "componentNode", new Bt());
2625
+ // 组件行为实例
2626
+ d(this, "instance", new Lt());
2627
+ // 全局配置
2628
+ d(this, "config", new Gt());
2629
+ // 事件
2630
+ d(this, "events", new qa());
2631
+ // 收藏夹
2632
+ d(this, "favorites", new Jt());
2633
+ // 子页面管理
2634
+ d(this, "page", new Ut());
2635
+ // 历史记录管理
2636
+ d(this, "history", new Ka());
2637
+ d(this, "_options", {});
2638
+ var t;
2639
+ this._options = this.formatOptions(e), (t = this._options) != null && t.defaultComponents && this.registerDefaultPackage();
2640
+ }
2641
+ formatOptions(e = {}) {
2642
+ return e.defaultComponents ?? (e.defaultComponents = !0), e || {};
2643
+ }
2644
+ // 注册默认package
2645
+ async registerDefaultPackage() {
2646
+ this.component.initPackages(ja);
2647
+ }
2648
+ // 加载json对象
2649
+ async loadJSON(e) {
2650
+ return new Promise((t, a) => {
2651
+ var n, i, o;
2652
+ try {
2653
+ this.json = e, Za(((n = e == null ? void 0 : e.config) == null ? void 0 : n.language) || "zh"), this.config.setConfig({
2654
+ ...B,
2655
+ ...e == null ? void 0 : e.config,
2656
+ currentPageId: ((i = e == null ? void 0 : e.config) == null ? void 0 : i.currentPageId) || S.id
2657
+ }), this.component.loadLocalPackages(e == null ? void 0 : e.localPackages), this.favorites.set((e == null ? void 0 : e.favorites) || []), this.page.init(e == null ? void 0 : e.componentNodes, e == null ? void 0 : e.pages), this.componentNode.set(
2658
+ this.page.getComponentNodes(((o = e == null ? void 0 : e.config) == null ? void 0 : o.currentPageId) || S.id)
2659
+ ), e != null && e.selectedIds && (this.timerId && clearTimeout(this.timerId), this.timerId = setTimeout(() => {
2660
+ this.timerId = void 0, this.instance.select(e.selectedIds, !0);
2661
+ }, 100)), this.notifyJsonChange(), t();
2662
+ } catch (s) {
2663
+ a(s);
2664
+ }
2665
+ });
2666
+ }
2667
+ // 加载json对象
2668
+ async loadJSONString(e) {
2669
+ return new Promise((t, a) => {
2670
+ try {
2671
+ const n = JSON.parse(e || "{}");
2672
+ this.loadJSON(n), t();
2673
+ } catch (n) {
2674
+ a(n);
2675
+ }
2676
+ });
2677
+ }
2678
+ // 获取json对象
2679
+ async getJSON() {
2680
+ return this.page.setComponentNodes(this.config.getCurrentPage(), this.componentNode.getAll()), {
2681
+ used: this.componentNode.getComponentUsed(),
2682
+ componentNodes: this.page.getAllComponentNodes(),
2683
+ config: this.config.getConfig(),
2684
+ selectedIds: this.instance.getAllSelected().map((e) => e.id),
2685
+ localPackages: await this.component.getAllLocalPackages(),
2686
+ favorites: this.favorites.getAll(),
2687
+ pages: this.page.getAll()
2688
+ };
2689
+ }
2690
+ // 清空内容
2691
+ clear() {
2692
+ var e;
2693
+ this.loadJSON({
2694
+ config: {
2695
+ ...B,
2696
+ ...(e = this.json) == null ? void 0 : e.config
2697
+ }
2698
+ });
2699
+ }
2700
+ // json读取触发事件
2701
+ notifyJsonChange() {
2702
+ const e = this.json;
2703
+ e && this.listeners.forEach((t) => {
2704
+ t(e);
2705
+ });
2706
+ }
2707
+ // 监听json读取
2708
+ onJsonChange(e) {
2709
+ return this.listeners.push(e), () => {
2710
+ this.listeners = this.listeners.filter((t) => t !== e);
2711
+ };
2712
+ }
2713
+ // 销毁
2714
+ destroy() {
2715
+ this.component.unRegisterAll();
2716
+ }
2717
+ }
2718
+ const De = {
2719
+ chinaMap: {
2720
+ count: 1
2721
+ },
2722
+ title: {
2723
+ count: 2
2724
+ },
2725
+ scrollList: {
2726
+ count: 1
2727
+ },
2728
+ dateDisplay: {
2729
+ count: 1
2730
+ },
2731
+ defaultImage: {
2732
+ count: 14
2733
+ },
2734
+ doubleText: {
2735
+ count: 13
2736
+ },
2737
+ ProgressList: {
2738
+ count: 1
2739
+ },
2740
+ horizontalBar: {
2741
+ count: 1
2742
+ },
2743
+ specialTitle: {
2744
+ count: 5
2745
+ },
2746
+ barLine: {
2747
+ count: 1
2748
+ },
2749
+ ring: {
2750
+ count: 1
2751
+ }
2752
+ }, Re = [
2753
+ {
2754
+ cId: "chinaMap",
2755
+ cName: "中国地图",
2756
+ x: 511,
2757
+ y: 135,
2758
+ width: 777,
2759
+ height: 551,
2760
+ category: "other",
2761
+ pageId: "default",
2762
+ name: "中国地图",
2763
+ id: "10556c5e54",
2764
+ level: 2,
2765
+ dataSourceType: "static",
2766
+ show: !0,
2767
+ options: {
2768
+ mapBgColor: "rgba(26, 15, 61, 0)",
2769
+ areaColor: "#183558",
2770
+ borderWidth: 2,
2771
+ centerX: 0,
2772
+ centerY: 0,
2773
+ scale: 0
2774
+ },
2775
+ lock: !1
2776
+ },
2777
+ {
2778
+ cId: "title",
2779
+ cName: "标题",
2780
+ x: 727,
2781
+ y: 1,
2782
+ width: 479,
2783
+ height: 73,
2784
+ category: "base",
2785
+ pageId: "default",
2786
+ name: "标题",
2787
+ id: "d5a10d515f",
2788
+ level: 4,
2789
+ dataSourceType: "static",
2790
+ show: !0,
2791
+ options: {
2792
+ value: "演示大屏数据平台",
2793
+ fontSize: 32,
2794
+ color: "#2edcf7",
2795
+ textAlign: "center",
2796
+ letterSpacing: 4
2797
+ },
2798
+ lock: !1
2799
+ },
2800
+ {
2801
+ cId: "scrollList",
2802
+ cName: "滚动列表",
2803
+ x: 1355,
2804
+ y: 131,
2805
+ width: 548,
2806
+ height: 228,
2807
+ category: "other",
2808
+ dataSourceType: "static",
2809
+ staticDataSource: [
2810
+ {
2811
+ key: "1",
2812
+ title: "测试演示项目",
2813
+ status: "1"
2814
+ },
2815
+ {
2816
+ key: "2",
2817
+ title: "私有化项目",
2818
+ status: "2"
2819
+ },
2820
+ {
2821
+ key: "3",
2822
+ title: "公有云项目",
2823
+ status: "2"
2824
+ },
2825
+ {
2826
+ key: "4",
2827
+ title: "培训项目一",
2828
+ status: "1"
2829
+ },
2830
+ {
2831
+ key: "5",
2832
+ title: "培训项目二",
2833
+ status: "2"
2834
+ },
2835
+ {
2836
+ key: "6",
2837
+ title: "tjh项目",
2838
+ status: "1"
2839
+ }
2840
+ ],
2841
+ pageId: "default",
2842
+ name: "滚动列表",
2843
+ id: "dab95e19bb",
2844
+ level: 5,
2845
+ show: !0,
2846
+ lock: !1
2847
+ },
2848
+ {
2849
+ cId: "dateDisplay",
2850
+ cName: "日期展示",
2851
+ x: 1616,
2852
+ y: 33,
2853
+ width: 233,
2854
+ height: 26,
2855
+ category: "base",
2856
+ pageId: "default",
2857
+ name: "日期展示",
2858
+ id: "316e5699eb",
2859
+ level: 6,
2860
+ dataSourceType: "static",
2861
+ show: !0,
2862
+ options: {
2863
+ color: "#f8e71c",
2864
+ fontSize: 20,
2865
+ textAlign: "right",
2866
+ lineHeight: 22
2867
+ }
2868
+ },
2869
+ {
2870
+ cId: "defaultImage",
2871
+ cName: "预置图片",
2872
+ x: 1861,
2873
+ y: 28,
2874
+ width: 32,
2875
+ height: 32,
2876
+ category: "other",
2877
+ pageId: "default",
2878
+ name: "预置图片",
2879
+ id: "b71facf82c",
2880
+ level: 7,
2881
+ dataSourceType: "static",
2882
+ show: !0
2883
+ },
2884
+ {
2885
+ cId: "defaultImage",
2886
+ cName: "预置图片",
2887
+ x: 0,
2888
+ y: 0,
2889
+ width: 1920,
2890
+ height: 1080,
2891
+ category: "other",
2892
+ pageId: "default",
2893
+ name: "预置图片",
2894
+ id: "45c02ac0e7",
2895
+ level: 0,
2896
+ dataSourceType: "static",
2897
+ show: !0,
2898
+ options: {
2899
+ id: "bg-theme-1.jpeg"
2900
+ },
2901
+ lock: !0
2902
+ },
2903
+ {
2904
+ cId: "defaultImage",
2905
+ cName: "预置图片",
2906
+ x: 39,
2907
+ y: 180,
2908
+ width: 99,
2909
+ height: 81,
2910
+ category: "other",
2911
+ pageId: "default",
2912
+ name: "预置图片",
2913
+ id: "b0f295bc2f",
2914
+ level: 8,
2915
+ dataSourceType: "static",
2916
+ show: !0,
2917
+ options: {
2918
+ id: "com-bg-1.png"
2919
+ },
2920
+ lock: !0
2921
+ },
2922
+ {
2923
+ cId: "defaultImage",
2924
+ cName: "预置图片",
2925
+ x: 190,
2926
+ y: 180,
2927
+ width: 99,
2928
+ height: 81,
2929
+ category: "other",
2930
+ pageId: "default",
2931
+ name: "预置图片",
2932
+ id: "7acfa7b7b2",
2933
+ level: 8,
2934
+ dataSourceType: "static",
2935
+ show: !0,
2936
+ options: {
2937
+ id: "com-bg-1.png"
2938
+ },
2939
+ lock: !0
2940
+ },
2941
+ {
2942
+ cId: "defaultImage",
2943
+ cName: "预置图片",
2944
+ x: 340,
2945
+ y: 180,
2946
+ width: 99,
2947
+ height: 81,
2948
+ category: "other",
2949
+ pageId: "default",
2950
+ name: "预置图片",
2951
+ id: "5e231647c6",
2952
+ level: 8,
2953
+ dataSourceType: "static",
2954
+ show: !0,
2955
+ options: {
2956
+ id: "com-bg-1.png"
2957
+ },
2958
+ lock: !0
2959
+ },
2960
+ {
2961
+ cId: "defaultImage",
2962
+ cName: "预置图片",
2963
+ x: 40,
2964
+ y: 315,
2965
+ width: 99,
2966
+ height: 81,
2967
+ category: "other",
2968
+ pageId: "default",
2969
+ name: "预置图片",
2970
+ id: "046823450a",
2971
+ level: 8,
2972
+ dataSourceType: "static",
2973
+ show: !0,
2974
+ options: {
2975
+ id: "com-bg-1.png"
2976
+ },
2977
+ lock: !0
2978
+ },
2979
+ {
2980
+ cId: "defaultImage",
2981
+ cName: "预置图片",
2982
+ x: 191,
2983
+ y: 315,
2984
+ width: 99,
2985
+ height: 81,
2986
+ category: "other",
2987
+ pageId: "default",
2988
+ name: "预置图片",
2989
+ id: "5a27427412",
2990
+ level: 8,
2991
+ dataSourceType: "static",
2992
+ show: !0,
2993
+ options: {
2994
+ id: "com-bg-1.png"
2995
+ },
2996
+ lock: !0
2997
+ },
2998
+ {
2999
+ cId: "defaultImage",
3000
+ cName: "预置图片",
3001
+ x: 341,
3002
+ y: 315,
3003
+ width: 99,
3004
+ height: 81,
3005
+ category: "other",
3006
+ pageId: "default",
3007
+ name: "预置图片",
3008
+ id: "a46053f45e",
3009
+ level: 8,
3010
+ dataSourceType: "static",
3011
+ show: !0,
3012
+ options: {
3013
+ id: "com-bg-1.png"
3014
+ },
3015
+ lock: !0
3016
+ },
3017
+ {
3018
+ cId: "doubleText",
3019
+ cName: "双行文本",
3020
+ x: 60,
3021
+ y: 176,
3022
+ width: 60,
3023
+ height: 62,
3024
+ category: "base",
3025
+ pageId: "default",
3026
+ name: "双行文本",
3027
+ id: "35723ec32d",
3028
+ level: 9,
3029
+ dataSourceType: "static",
3030
+ show: !0,
3031
+ options: {
3032
+ text_1: "95536",
3033
+ text_2: "总数",
3034
+ value_1: "920",
3035
+ fontSize_1: 18,
3036
+ lineHeight_1: 16,
3037
+ color_1: "#1fe9e9",
3038
+ value_2: "项目总数",
3039
+ fontSize_2: 12,
3040
+ lineHeight_2: 32,
3041
+ color_2: "#1fe9e9",
3042
+ textAlign_1: "center",
3043
+ textAlign_2: "center"
3044
+ },
3045
+ lock: !0
3046
+ },
3047
+ {
3048
+ cId: "doubleText",
3049
+ cName: "双行文本",
3050
+ x: 210,
3051
+ y: 176,
3052
+ width: 60,
3053
+ height: 62,
3054
+ category: "base",
3055
+ pageId: "default",
3056
+ name: "双行文本",
3057
+ id: "6a3d3c9b67",
3058
+ level: 9,
3059
+ dataSourceType: "static",
3060
+ show: !0,
3061
+ options: {
3062
+ text_1: "95536",
3063
+ text_2: "总数",
3064
+ value_1: "900",
3065
+ fontSize_1: 18,
3066
+ lineHeight_1: 16,
3067
+ color_1: "#22f02e",
3068
+ value_2: "已签",
3069
+ fontSize_2: 12,
3070
+ lineHeight_2: 32,
3071
+ color_2: "#22f02e",
3072
+ textAlign_1: "center",
3073
+ textAlign_2: "center"
3074
+ },
3075
+ lock: !0
3076
+ },
3077
+ {
3078
+ cId: "doubleText",
3079
+ cName: "双行文本",
3080
+ x: 359,
3081
+ y: 175,
3082
+ width: 60,
3083
+ height: 62,
3084
+ category: "base",
3085
+ pageId: "default",
3086
+ name: "双行文本",
3087
+ id: "e91e3d7859",
3088
+ level: 9,
3089
+ dataSourceType: "static",
3090
+ show: !0,
3091
+ options: {
3092
+ text_1: "95536",
3093
+ text_2: "总数",
3094
+ value_1: "20",
3095
+ fontSize_1: 18,
3096
+ lineHeight_1: 16,
3097
+ color_1: "#e8233b",
3098
+ value_2: "未签",
3099
+ fontSize_2: 12,
3100
+ lineHeight_2: 32,
3101
+ color_2: "#e8233b",
3102
+ textAlign_1: "center",
3103
+ textAlign_2: "center",
3104
+ background_1: "rgba(208, 2, 27, 0)"
3105
+ },
3106
+ lock: !0
3107
+ },
3108
+ {
3109
+ cId: "doubleText",
3110
+ cName: "双行文本",
3111
+ x: 60,
3112
+ y: 309,
3113
+ width: 60,
3114
+ height: 62,
3115
+ category: "base",
3116
+ pageId: "default",
3117
+ name: "双行文本",
3118
+ id: "4db2b7e1d3",
3119
+ level: 9,
3120
+ dataSourceType: "static",
3121
+ show: !0,
3122
+ options: {
3123
+ text_1: "95536",
3124
+ text_2: "总数",
3125
+ value_1: "864",
3126
+ fontSize_1: 18,
3127
+ lineHeight_1: 16,
3128
+ color_1: "#1fe9e9",
3129
+ value_2: "人员总数",
3130
+ fontSize_2: 12,
3131
+ lineHeight_2: 32,
3132
+ color_2: "#1fe9e9",
3133
+ textAlign_1: "center",
3134
+ textAlign_2: "center"
3135
+ },
3136
+ lock: !0
3137
+ },
3138
+ {
3139
+ cId: "doubleText",
3140
+ cName: "双行文本",
3141
+ x: 210,
3142
+ y: 308,
3143
+ width: 60,
3144
+ height: 62,
3145
+ category: "base",
3146
+ pageId: "default",
3147
+ name: "双行文本",
3148
+ id: "24a91c556c",
3149
+ level: 9,
3150
+ dataSourceType: "static",
3151
+ show: !0,
3152
+ options: {
3153
+ text_1: "95536",
3154
+ text_2: "总数",
3155
+ value_1: "738",
3156
+ fontSize_1: 18,
3157
+ lineHeight_1: 16,
3158
+ color_1: "#22f02e",
3159
+ value_2: "在场",
3160
+ fontSize_2: 12,
3161
+ lineHeight_2: 32,
3162
+ color_2: "#22f02e",
3163
+ textAlign_1: "center",
3164
+ textAlign_2: "center"
3165
+ },
3166
+ lock: !0
3167
+ },
3168
+ {
3169
+ cId: "doubleText",
3170
+ cName: "双行文本",
3171
+ x: 358,
3172
+ y: 306,
3173
+ width: 60,
3174
+ height: 62,
3175
+ category: "base",
3176
+ pageId: "default",
3177
+ name: "双行文本",
3178
+ id: "2f41295366",
3179
+ level: 9,
3180
+ dataSourceType: "static",
3181
+ show: !0,
3182
+ options: {
3183
+ text_1: "95536",
3184
+ text_2: "总数",
3185
+ value_1: "126",
3186
+ fontSize_1: 18,
3187
+ lineHeight_1: 16,
3188
+ color_1: "#e8233b",
3189
+ value_2: "离场",
3190
+ fontSize_2: 12,
3191
+ lineHeight_2: 32,
3192
+ color_2: "#e8233b",
3193
+ textAlign_1: "center",
3194
+ textAlign_2: "center"
3195
+ },
3196
+ lock: !0
3197
+ },
3198
+ {
3199
+ cId: "doubleText",
3200
+ cName: "双行文本",
3201
+ x: 44,
3202
+ y: 78,
3203
+ width: 391,
3204
+ height: 64,
3205
+ category: "base",
3206
+ pageId: "default",
3207
+ name: "双行文本",
3208
+ id: "c7aa4e9367",
3209
+ level: 10,
3210
+ dataSourceType: "static",
3211
+ show: !0,
3212
+ options: {
3213
+ value_1: "总收入",
3214
+ fontSize_1: 14,
3215
+ lineHeight_1: 32,
3216
+ color_1: "#1fe9e9",
3217
+ textAlign_1: "center",
3218
+ value_2: "102328726.23",
3219
+ fontSize_2: 32,
3220
+ lineHeight_2: 36,
3221
+ color_2: "#1fe9e9",
3222
+ textAlign_2: "center"
3223
+ }
3224
+ },
3225
+ {
3226
+ cId: "ProgressList",
3227
+ cName: "进度条列表",
3228
+ x: 37,
3229
+ y: 777,
3230
+ width: 498,
3231
+ height: 257,
3232
+ category: "other",
3233
+ dataSourceType: "static",
3234
+ staticDataSource: [
3235
+ {
3236
+ key: "1",
3237
+ title: "测试演示项目",
3238
+ count: 999
3239
+ },
3240
+ {
3241
+ key: "2",
3242
+ title: "私有化项目",
3243
+ count: 800
3244
+ },
3245
+ {
3246
+ key: "3",
3247
+ title: "公有云项目",
3248
+ count: 600
3249
+ },
3250
+ {
3251
+ key: "4",
3252
+ title: "培训项目一",
3253
+ count: 400
3254
+ },
3255
+ {
3256
+ key: "5",
3257
+ title: "培训项目二",
3258
+ count: 200
3259
+ },
3260
+ {
3261
+ key: "6",
3262
+ title: "tjh项目",
3263
+ count: 0
3264
+ }
3265
+ ],
3266
+ pageId: "default",
3267
+ name: "进度条列表",
3268
+ id: "5f25dc8bfb",
3269
+ level: 11,
3270
+ show: !0,
3271
+ lock: !1,
3272
+ options: {
3273
+ progressColor: "#2949ca",
3274
+ progressBgColor: "#143053",
3275
+ titleColor: "#fff",
3276
+ titleFontSize: 14,
3277
+ countColor: "#fff",
3278
+ countFontSize: 14,
3279
+ iconColor: "#2edcf7",
3280
+ pxPerSecond: 12,
3281
+ autoScroll: !0
3282
+ }
3283
+ },
3284
+ {
3285
+ cId: "horizontalBar",
3286
+ cName: "横向柱形图",
3287
+ x: 1352,
3288
+ y: 423,
3289
+ width: 548,
3290
+ height: 284,
3291
+ category: "charts",
3292
+ options: {},
3293
+ pageId: "default",
3294
+ name: "横向柱形图",
3295
+ id: "de732a6508",
3296
+ level: 12,
3297
+ dataSourceType: "static",
3298
+ show: !0
3299
+ },
3300
+ {
3301
+ cId: "specialTitle",
3302
+ cName: "特殊标题",
3303
+ x: 1358,
3304
+ y: 382,
3305
+ width: 542,
3306
+ height: 32,
3307
+ category: "other",
3308
+ pageId: "default",
3309
+ name: "特殊标题",
3310
+ id: "d4657e395c",
3311
+ level: 13,
3312
+ dataSourceType: "static",
3313
+ show: !0,
3314
+ options: {
3315
+ value: "在场人员",
3316
+ fontSize: 20,
3317
+ lineHeight: 32,
3318
+ color: "#2EDCF7"
3319
+ }
3320
+ },
3321
+ {
3322
+ cId: "specialTitle",
3323
+ cName: "特殊标题",
3324
+ x: 1352,
3325
+ y: 86,
3326
+ width: 537,
3327
+ height: 32,
3328
+ category: "other",
3329
+ pageId: "default",
3330
+ name: "特殊标题",
3331
+ id: "b36c870f8a",
3332
+ level: 13,
3333
+ dataSourceType: "static",
3334
+ show: !0,
3335
+ options: {
3336
+ value: "项目签项情况",
3337
+ fontSize: 20,
3338
+ lineHeight: 32,
3339
+ color: "#2EDCF7"
3340
+ }
3341
+ },
3342
+ {
3343
+ cId: "specialTitle",
3344
+ cName: "特殊标题",
3345
+ x: 9,
3346
+ y: 720,
3347
+ width: 542,
3348
+ height: 32,
3349
+ category: "other",
3350
+ pageId: "default",
3351
+ name: "特殊标题",
3352
+ id: "f079026413",
3353
+ level: 13,
3354
+ dataSourceType: "static",
3355
+ show: !0,
3356
+ options: {
3357
+ value: "项目培训人数",
3358
+ fontSize: 20,
3359
+ lineHeight: 32,
3360
+ color: "#2EDCF7"
3361
+ },
3362
+ lock: !1
3363
+ },
3364
+ {
3365
+ cId: "doubleText",
3366
+ cName: "双行文本",
3367
+ x: 1368,
3368
+ y: 785,
3369
+ width: 158,
3370
+ height: 62,
3371
+ category: "base",
3372
+ pageId: "default",
3373
+ name: "双行文本",
3374
+ id: "f2eaebcf39",
3375
+ level: 9,
3376
+ dataSourceType: "static",
3377
+ show: !0,
3378
+ options: {
3379
+ text_1: "95536",
3380
+ text_2: "总数",
3381
+ value_1: "1,212,399,231",
3382
+ fontSize_1: 18,
3383
+ lineHeight_1: 16,
3384
+ color_1: "#1fe9e9",
3385
+ value_2: "总收入",
3386
+ fontSize_2: 12,
3387
+ lineHeight_2: 32,
3388
+ color_2: "#1fe9e9",
3389
+ textAlign_1: "center",
3390
+ textAlign_2: "center"
3391
+ },
3392
+ lock: !1
3393
+ },
3394
+ {
3395
+ cId: "doubleText",
3396
+ cName: "双行文本",
3397
+ x: 1546,
3398
+ y: 784,
3399
+ width: 163,
3400
+ height: 62,
3401
+ category: "base",
3402
+ pageId: "default",
3403
+ name: "双行文本",
3404
+ id: "76fb63fe68",
3405
+ level: 9,
3406
+ dataSourceType: "static",
3407
+ show: !0,
3408
+ options: {
3409
+ text_1: "95536",
3410
+ text_2: "总数",
3411
+ value_1: "813,572,109",
3412
+ fontSize_1: 18,
3413
+ lineHeight_1: 16,
3414
+ color_1: "#22f02e",
3415
+ value_2: "总盈利",
3416
+ fontSize_2: 12,
3417
+ lineHeight_2: 32,
3418
+ color_2: "#22f02e",
3419
+ textAlign_1: "center",
3420
+ textAlign_2: "center"
3421
+ },
3422
+ lock: !1
3423
+ },
3424
+ {
3425
+ cId: "doubleText",
3426
+ cName: "双行文本",
3427
+ x: 1734,
3428
+ y: 781,
3429
+ width: 146,
3430
+ height: 62,
3431
+ category: "base",
3432
+ pageId: "default",
3433
+ name: "双行文本",
3434
+ id: "e04b7ac8b5",
3435
+ level: 9,
3436
+ dataSourceType: "static",
3437
+ show: !0,
3438
+ options: {
3439
+ text_1: "95536",
3440
+ text_2: "总数",
3441
+ value_1: "398,827,122",
3442
+ fontSize_1: 18,
3443
+ lineHeight_1: 16,
3444
+ color_1: "#e8233b",
3445
+ value_2: "总支出",
3446
+ fontSize_2: 12,
3447
+ lineHeight_2: 32,
3448
+ color_2: "#e8233b",
3449
+ textAlign_1: "center",
3450
+ textAlign_2: "center",
3451
+ background_1: "rgba(208, 2, 27, 0)"
3452
+ },
3453
+ lock: !1
3454
+ },
3455
+ {
3456
+ cId: "defaultImage",
3457
+ cName: "预置图片",
3458
+ x: 1760,
3459
+ y: 784,
3460
+ width: 99,
3461
+ height: 81,
3462
+ category: "other",
3463
+ pageId: "default",
3464
+ name: "预置图片",
3465
+ id: "e0852cec6a",
3466
+ level: 8,
3467
+ dataSourceType: "static",
3468
+ show: !0,
3469
+ options: {
3470
+ id: "com-bg-2.png"
3471
+ },
3472
+ lock: !1
3473
+ },
3474
+ {
3475
+ cId: "defaultImage",
3476
+ cName: "预置图片",
3477
+ x: 1580,
3478
+ y: 785,
3479
+ width: 99,
3480
+ height: 81,
3481
+ category: "other",
3482
+ pageId: "default",
3483
+ name: "预置图片",
3484
+ id: "a246e34511",
3485
+ level: 8,
3486
+ dataSourceType: "static",
3487
+ show: !0,
3488
+ options: {
3489
+ id: "com-bg-2.png"
3490
+ },
3491
+ lock: !1
3492
+ },
3493
+ {
3494
+ cId: "defaultImage",
3495
+ cName: "预置图片",
3496
+ x: 1398,
3497
+ y: 789,
3498
+ width: 99,
3499
+ height: 81,
3500
+ category: "other",
3501
+ pageId: "default",
3502
+ name: "预置图片",
3503
+ id: "c713c10ba0",
3504
+ level: 8,
3505
+ dataSourceType: "static",
3506
+ show: !0,
3507
+ options: {
3508
+ id: "com-bg-2.png"
3509
+ },
3510
+ lock: !1
3511
+ },
3512
+ {
3513
+ cId: "doubleText",
3514
+ cName: "双行文本",
3515
+ x: 1370,
3516
+ y: 914,
3517
+ width: 155,
3518
+ height: 62,
3519
+ category: "base",
3520
+ pageId: "default",
3521
+ name: "双行文本",
3522
+ id: "ca18c75e9b",
3523
+ level: 9,
3524
+ dataSourceType: "static",
3525
+ show: !0,
3526
+ options: {
3527
+ text_1: "95536",
3528
+ text_2: "总数",
3529
+ value_1: "12,864,732",
3530
+ fontSize_1: 18,
3531
+ lineHeight_1: 16,
3532
+ color_1: "#1fe9e9",
3533
+ value_2: "季度收入",
3534
+ fontSize_2: 12,
3535
+ lineHeight_2: 32,
3536
+ color_2: "#1fe9e9",
3537
+ textAlign_1: "center",
3538
+ textAlign_2: "center"
3539
+ },
3540
+ lock: !1
3541
+ },
3542
+ {
3543
+ cId: "defaultImage",
3544
+ cName: "预置图片",
3545
+ x: 1399,
3546
+ y: 920,
3547
+ width: 99,
3548
+ height: 81,
3549
+ category: "other",
3550
+ pageId: "default",
3551
+ name: "预置图片",
3552
+ id: "7e27d8e659",
3553
+ level: 8,
3554
+ dataSourceType: "static",
3555
+ show: !0,
3556
+ options: {
3557
+ id: "com-bg-2.png"
3558
+ },
3559
+ lock: !1
3560
+ },
3561
+ {
3562
+ cId: "doubleText",
3563
+ cName: "双行文本",
3564
+ x: 1541,
3565
+ y: 912,
3566
+ width: 169,
3567
+ height: 62,
3568
+ category: "base",
3569
+ pageId: "default",
3570
+ name: "双行文本",
3571
+ id: "3c89df116d",
3572
+ level: 9,
3573
+ dataSourceType: "static",
3574
+ show: !0,
3575
+ options: {
3576
+ text_1: "95536",
3577
+ text_2: "总数",
3578
+ value_1: "3,864,998",
3579
+ fontSize_1: 18,
3580
+ lineHeight_1: 16,
3581
+ color_1: "#22f02e",
3582
+ value_2: "季度盈利",
3583
+ fontSize_2: 12,
3584
+ lineHeight_2: 32,
3585
+ color_2: "#22f02e",
3586
+ textAlign_1: "center",
3587
+ textAlign_2: "center"
3588
+ },
3589
+ lock: !1
3590
+ },
3591
+ {
3592
+ cId: "defaultImage",
3593
+ cName: "预置图片",
3594
+ x: 1579,
3595
+ y: 920,
3596
+ width: 99,
3597
+ height: 81,
3598
+ category: "other",
3599
+ pageId: "default",
3600
+ name: "预置图片",
3601
+ id: "527eb421a1",
3602
+ level: 8,
3603
+ dataSourceType: "static",
3604
+ show: !0,
3605
+ options: {
3606
+ id: "com-bg-2.png"
3607
+ },
3608
+ lock: !1
3609
+ },
3610
+ {
3611
+ cId: "doubleText",
3612
+ cName: "双行文本",
3613
+ x: 1724,
3614
+ y: 908,
3615
+ width: 170,
3616
+ height: 62,
3617
+ category: "base",
3618
+ pageId: "default",
3619
+ name: "双行文本",
3620
+ id: "ef3195038d",
3621
+ level: 9,
3622
+ dataSourceType: "static",
3623
+ show: !0,
3624
+ options: {
3625
+ text_1: "95536",
3626
+ text_2: "总数",
3627
+ value_1: "8,999,734",
3628
+ fontSize_1: 18,
3629
+ lineHeight_1: 16,
3630
+ color_1: "#e8233b",
3631
+ value_2: "季度支出",
3632
+ fontSize_2: 12,
3633
+ lineHeight_2: 32,
3634
+ color_2: "#e8233b",
3635
+ textAlign_1: "center",
3636
+ textAlign_2: "center"
3637
+ },
3638
+ lock: !1
3639
+ },
3640
+ {
3641
+ cId: "defaultImage",
3642
+ cName: "预置图片",
3643
+ x: 1760,
3644
+ y: 916,
3645
+ width: 99,
3646
+ height: 81,
3647
+ category: "other",
3648
+ pageId: "default",
3649
+ name: "预置图片",
3650
+ id: "10d3f95b39",
3651
+ level: 8,
3652
+ dataSourceType: "static",
3653
+ show: !0,
3654
+ options: {
3655
+ id: "com-bg-2.png"
3656
+ },
3657
+ lock: !1
3658
+ },
3659
+ {
3660
+ cId: "specialTitle",
3661
+ cName: "特殊标题",
3662
+ x: 1359,
3663
+ y: 720,
3664
+ width: 542,
3665
+ height: 32,
3666
+ category: "other",
3667
+ pageId: "default",
3668
+ name: "特殊标题",
3669
+ id: "c8e95ef3eb",
3670
+ level: 13,
3671
+ dataSourceType: "static",
3672
+ show: !0,
3673
+ options: {
3674
+ value: "项目盈亏",
3675
+ fontSize: 20,
3676
+ lineHeight: 32,
3677
+ color: "#2EDCF7"
3678
+ }
3679
+ },
3680
+ {
3681
+ cId: "specialTitle",
3682
+ cName: "特殊标题",
3683
+ x: 640,
3684
+ y: 720,
3685
+ width: 655,
3686
+ height: 32,
3687
+ category: "other",
3688
+ pageId: "default",
3689
+ name: "特殊标题",
3690
+ id: "04547c0913",
3691
+ level: 13,
3692
+ dataSourceType: "static",
3693
+ show: !0,
3694
+ options: {
3695
+ value: "近7日成交额",
3696
+ fontSize: 20,
3697
+ lineHeight: 32,
3698
+ color: "#2EDCF7"
3699
+ }
3700
+ },
3701
+ {
3702
+ cId: "barLine",
3703
+ cName: "柱形折线图",
3704
+ x: 623,
3705
+ y: 757,
3706
+ width: 701,
3707
+ height: 248,
3708
+ category: "charts",
3709
+ options: {},
3710
+ pageId: "default",
3711
+ name: "柱形折线图",
3712
+ id: "c24912f00b",
3713
+ level: 14,
3714
+ dataSourceType: "static",
3715
+ show: !0
3716
+ },
3717
+ {
3718
+ cId: "title",
3719
+ cName: "标题",
3720
+ x: 33,
3721
+ y: 20,
3722
+ width: 269,
3723
+ height: 48,
3724
+ category: "base",
3725
+ pageId: "default",
3726
+ name: "标题",
3727
+ id: "52e012517c",
3728
+ level: 15,
3729
+ dataSourceType: "static",
3730
+ show: !0,
3731
+ options: {
3732
+ value: "TJH演示企业",
3733
+ fontSize: 22,
3734
+ color: "#2edcf7",
3735
+ textAlign: "left"
3736
+ }
3737
+ },
3738
+ {
3739
+ cId: "ring",
3740
+ cName: "圆环图",
3741
+ x: 27,
3742
+ y: 435,
3743
+ width: 441,
3744
+ height: 255,
3745
+ category: "charts",
3746
+ options: {
3747
+ titleColor: "#ffffff",
3748
+ subtextColor: "#bababa"
3749
+ },
3750
+ pageId: "default",
3751
+ name: "圆环图",
3752
+ id: "bccaf0721e",
3753
+ level: 16,
3754
+ dataSourceType: "static",
3755
+ show: !0
3756
+ }
3757
+ ], Fe = {
3758
+ scale: 0.39999999999999986,
3759
+ scaleDefault: 1,
3760
+ scaleStep: 0.02,
3761
+ scaleMinZoom: 0.1,
3762
+ scaleMaxZoom: 2,
3763
+ width: 1920,
3764
+ height: 1080,
3765
+ currentPageId: "default",
3766
+ editorOffsetX: 0,
3767
+ editorOffsetY: 0,
3768
+ currentMenu: "library",
3769
+ currentPage: "default",
3770
+ language: "zh"
3771
+ }, He = [], $e = [], Be = [], Ue = [
3772
+ {
3773
+ id: "default",
3774
+ name: "大屏页面",
3775
+ options: {
3776
+ background: "#14224b",
3777
+ whiteBoardColor: "#0d2a42"
3778
+ }
3779
+ }
3780
+ ], Ge = {
3781
+ used: De,
3782
+ componentNodes: Re,
3783
+ config: Fe,
3784
+ selectedIds: He,
3785
+ localPackages: $e,
3786
+ favorites: Be,
3787
+ pages: Ue
3788
+ }, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3789
+ __proto__: null,
3790
+ componentNodes: Re,
3791
+ config: Fe,
3792
+ default: Ge,
3793
+ favorites: Be,
3794
+ localPackages: $e,
3795
+ pages: Ue,
3796
+ selectedIds: He,
3797
+ used: De
3798
+ }, Symbol.toStringTag, { value: "Module" })), Je = {
3799
+ peopleTable: {
3800
+ count: 1
3801
+ },
3802
+ text: {
3803
+ count: 3
3804
+ },
3805
+ input: {
3806
+ count: 3
3807
+ },
3808
+ button: {
3809
+ count: 2
3810
+ }
3811
+ }, Ve = [
3812
+ {
3813
+ cId: "peopleTable",
3814
+ cName: "人员表格",
3815
+ x: 36,
3816
+ y: 78,
3817
+ width: 1215,
3818
+ height: 617,
3819
+ category: "other",
3820
+ isAllPage: !0,
3821
+ pageId: "58de04a398",
3822
+ name: "人员表格",
3823
+ id: "bbf50939c1",
3824
+ level: 5,
3825
+ dataSourceType: "static",
3826
+ show: !0
3827
+ },
3828
+ {
3829
+ cId: "text",
3830
+ cName: "文本",
3831
+ x: -10,
3832
+ y: 21,
3833
+ width: 120,
3834
+ height: 32,
3835
+ category: "base",
3836
+ pageId: "58de04a398",
3837
+ name: "文本",
3838
+ id: "ee9db7f84d",
3839
+ level: 2,
3840
+ dataSourceType: "static",
3841
+ show: !0,
3842
+ options: {
3843
+ value: "名称:",
3844
+ fontSize: 14,
3845
+ lineHeight: 32,
3846
+ color: "black",
3847
+ textAlign: "right"
3848
+ }
3849
+ },
3850
+ {
3851
+ cId: "input",
3852
+ cName: "输入框",
3853
+ x: 113,
3854
+ y: 21,
3855
+ width: 250,
3856
+ height: 32,
3857
+ category: "base",
3858
+ pageId: "58de04a398",
3859
+ name: "输入框",
3860
+ id: "615ec59655",
3861
+ level: 3,
3862
+ dataSourceType: "static",
3863
+ show: !0,
3864
+ events: [
3865
+ {
3866
+ triggerId: "input",
3867
+ targets: [
3868
+ {
3869
+ id: "bbf50939c1",
3870
+ opts: [
3871
+ {
3872
+ operateId: "6a255cf30f",
3873
+ exposeId: "changeFilter",
3874
+ option: {
3875
+ parserFunc: `/**
3876
+ * 转换request扩展参数函数 (必须包含主函数main)
3877
+ *
3878
+ * @params {value} 默认携带参数或json对象
3879
+ * @params {origin} 源componentNode
3880
+ * @params {target} 目标componentNode
3881
+ * @params {option} 事件的最小配置 event.target.opt.option
3882
+ * @return {value} 返回修改后的额外查询参数
3883
+ */
3884
+ function main(value, {origin, target, option}) {
3885
+ return {
3886
+ name: value
3887
+ }
3888
+ }`
3889
+ }
3890
+ }
3891
+ ]
3892
+ }
3893
+ ]
3894
+ }
3895
+ ]
3896
+ },
3897
+ {
3898
+ cId: "text",
3899
+ cName: "文本",
3900
+ x: 344,
3901
+ y: 21,
3902
+ width: 120,
3903
+ height: 32,
3904
+ category: "base",
3905
+ pageId: "58de04a398",
3906
+ name: "文本",
3907
+ id: "2452bc1a6d",
3908
+ level: 2,
3909
+ dataSourceType: "static",
3910
+ show: !0,
3911
+ options: {
3912
+ value: "年龄:",
3913
+ fontSize: 14,
3914
+ lineHeight: 32,
3915
+ color: "black",
3916
+ textAlign: "right"
3917
+ }
3918
+ },
3919
+ {
3920
+ cId: "text",
3921
+ cName: "文本",
3922
+ x: 685,
3923
+ y: 22,
3924
+ width: 120,
3925
+ height: 32,
3926
+ category: "base",
3927
+ pageId: "58de04a398",
3928
+ name: "文本",
3929
+ id: "5a5065846e",
3930
+ level: 2,
3931
+ dataSourceType: "static",
3932
+ show: !0,
3933
+ options: {
3934
+ value: "性别:",
3935
+ fontSize: 14,
3936
+ lineHeight: 32,
3937
+ color: "black",
3938
+ textAlign: "right"
3939
+ }
3940
+ },
3941
+ {
3942
+ cId: "button",
3943
+ cName: "按钮",
3944
+ x: 1110,
3945
+ y: 21,
3946
+ width: 64,
3947
+ height: 32,
3948
+ category: "base",
3949
+ pageId: "58de04a398",
3950
+ name: "按钮",
3951
+ id: "f7a6242bd8",
3952
+ level: 4,
3953
+ dataSourceType: "static",
3954
+ show: !0,
3955
+ options: {
3956
+ value: "重置",
3957
+ borderRadius: 2
3958
+ },
3959
+ events: [
3960
+ {
3961
+ triggerId: "onClick",
3962
+ targets: [
3963
+ {
3964
+ id: "bbf50939c1",
3965
+ opts: [
3966
+ {
3967
+ operateId: "10a58acd6b",
3968
+ exposeId: "clearFilter",
3969
+ option: {}
3970
+ }
3971
+ ]
3972
+ },
3973
+ {
3974
+ id: "615ec59655",
3975
+ opts: [
3976
+ {
3977
+ operateId: "c5d340d171",
3978
+ exposeId: "changeValue",
3979
+ option: {
3980
+ value: "",
3981
+ type: "text"
3982
+ }
3983
+ }
3984
+ ]
3985
+ },
3986
+ {
3987
+ id: "a9c0dc09a2",
3988
+ opts: [
3989
+ {
3990
+ operateId: "3680eeb6fe",
3991
+ exposeId: "changeValue",
3992
+ option: {
3993
+ value: "",
3994
+ type: "text"
3995
+ }
3996
+ }
3997
+ ]
3998
+ },
3999
+ {
4000
+ id: "7fb1e2ee25",
4001
+ opts: [
4002
+ {
4003
+ operateId: "83f080e146",
4004
+ exposeId: "changeValue",
4005
+ option: {
4006
+ value: "",
4007
+ type: "text"
4008
+ }
4009
+ }
4010
+ ]
4011
+ }
4012
+ ]
4013
+ }
4014
+ ]
4015
+ },
4016
+ {
4017
+ cId: "button",
4018
+ cName: "按钮",
4019
+ x: 1185,
4020
+ y: 22,
4021
+ width: 64,
4022
+ height: 32,
4023
+ category: "base",
4024
+ pageId: "58de04a398",
4025
+ name: "按钮",
4026
+ id: "1f965fc068",
4027
+ level: 4,
4028
+ dataSourceType: "static",
4029
+ show: !0,
4030
+ options: {
4031
+ value: "查询",
4032
+ type: "primary",
4033
+ borderRadius: 2
4034
+ },
4035
+ events: [
4036
+ {
4037
+ triggerId: "onClick",
4038
+ targets: [
4039
+ {
4040
+ id: "bbf50939c1",
4041
+ opts: [
4042
+ {
4043
+ operateId: "500cfc5bf7",
4044
+ exposeId: "refresh",
4045
+ option: {}
4046
+ }
4047
+ ]
4048
+ }
4049
+ ]
4050
+ }
4051
+ ]
4052
+ },
4053
+ {
4054
+ cId: "input",
4055
+ cName: "输入框",
4056
+ x: 463,
4057
+ y: 21,
4058
+ width: 250,
4059
+ height: 32,
4060
+ category: "base",
4061
+ pageId: "58de04a398",
4062
+ name: "输入框",
4063
+ id: "a9c0dc09a2",
4064
+ level: 3,
4065
+ dataSourceType: "static",
4066
+ show: !0,
4067
+ events: [
4068
+ {
4069
+ triggerId: "input",
4070
+ targets: [
4071
+ {
4072
+ id: "bbf50939c1",
4073
+ opts: [
4074
+ {
4075
+ operateId: "898b7b0079",
4076
+ exposeId: "changeFilter",
4077
+ option: {
4078
+ parserFunc: `/**
4079
+ * 转换request扩展参数函数 (必须包含主函数main)
4080
+ *
4081
+ * @params {value} 默认携带参数或json对象
4082
+ * @params {origin} 源componentNode
4083
+ * @params {target} 目标componentNode
4084
+ * @params {option} 事件的最小配置 event.target.opt.option
4085
+ * @return {value} 返回修改后的额外查询参数
4086
+ */
4087
+ function main(value, {origin, target, option}) {
4088
+ return {
4089
+ age: value
4090
+ }
4091
+ }`
4092
+ }
4093
+ }
4094
+ ]
4095
+ }
4096
+ ]
4097
+ }
4098
+ ]
4099
+ },
4100
+ {
4101
+ cId: "input",
4102
+ cName: "输入框",
4103
+ x: 802,
4104
+ y: 20,
4105
+ width: 250,
4106
+ height: 32,
4107
+ category: "base",
4108
+ pageId: "58de04a398",
4109
+ name: "输入框",
4110
+ id: "7fb1e2ee25",
4111
+ level: 3,
4112
+ dataSourceType: "static",
4113
+ show: !0,
4114
+ events: [
4115
+ {
4116
+ triggerId: "input",
4117
+ targets: [
4118
+ {
4119
+ id: "bbf50939c1",
4120
+ opts: [
4121
+ {
4122
+ operateId: "b495f323b8",
4123
+ exposeId: "changeFilter",
4124
+ option: {
4125
+ parserFunc: `/**
4126
+ * 转换request扩展参数函数 (必须包含主函数main)
4127
+ *
4128
+ * @params {value} 默认携带参数或json对象
4129
+ * @params {origin} 源componentNode
4130
+ * @params {target} 目标componentNode
4131
+ * @params {option} 事件的最小配置 event.target.opt.option
4132
+ * @return {value} 返回修改后的额外查询参数
4133
+ */
4134
+ function main(value, {origin, target, option}) {
4135
+ return {
4136
+ sex: value
4137
+ }
4138
+ }`
4139
+ }
4140
+ }
4141
+ ]
4142
+ }
4143
+ ]
4144
+ }
4145
+ ]
4146
+ }
4147
+ ], je = {
4148
+ scale: 0.6709999999999992,
4149
+ scaleDefault: 1,
4150
+ scaleStep: 0.02,
4151
+ scaleMinZoom: 0.1,
4152
+ scaleMaxZoom: 2,
4153
+ width: 1280,
4154
+ height: 720,
4155
+ currentPageId: "58de04a398",
4156
+ editorOffsetX: 44,
4157
+ editorOffsetY: 18,
4158
+ currentMenu: "library",
4159
+ currentPage: "default",
4160
+ language: "zh"
4161
+ }, qe = [], We = [], Xe = [
4162
+ {
4163
+ id: "b74a34caf4",
4164
+ name: "收藏1",
4165
+ children: [
4166
+ {
4167
+ cId: "line",
4168
+ cName: "折线图",
4169
+ x: 8,
4170
+ y: 10,
4171
+ width: 500,
4172
+ height: 374,
4173
+ category: "charts",
4174
+ options: {
4175
+ seriesList: [
4176
+ {
4177
+ key: "1",
4178
+ name: "数据1",
4179
+ value: "value1",
4180
+ color: "#f8e71c"
4181
+ },
4182
+ {
4183
+ key: "2",
4184
+ name: "数据2",
4185
+ value: "value2",
4186
+ color: "#7ed321"
4187
+ },
4188
+ {
4189
+ key: "3",
4190
+ name: "数据3",
4191
+ value: "value3",
4192
+ color: "#1071e0"
4193
+ }
4194
+ ],
4195
+ nameCode: "xxx"
4196
+ },
4197
+ dataSourceType: "static",
4198
+ staticDataSource: [
4199
+ {
4200
+ name: "选项一",
4201
+ xxx: "分类1",
4202
+ value1: 100,
4203
+ value2: 200,
4204
+ value3: 300
4205
+ },
4206
+ {
4207
+ name: "选项二",
4208
+ xxx: "分类2",
4209
+ value1: 50,
4210
+ value2: 150,
4211
+ value3: 250
4212
+ },
4213
+ {
4214
+ name: "选项三",
4215
+ xxx: "分类3",
4216
+ value1: 80,
4217
+ value2: 180,
4218
+ value3: 280
4219
+ }
4220
+ ],
4221
+ pageId: "58de04a398",
4222
+ name: "折线图",
4223
+ id: "7227bde647",
4224
+ level: 2,
4225
+ show: !0
4226
+ }
4227
+ ],
4228
+ gmtCreate: "2025-03-25 10:54:46"
4229
+ }
4230
+ ], Ze = [
4231
+ {
4232
+ name: "多组件联动",
4233
+ id: "58de04a398"
4234
+ }
4235
+ ], Ke = {
4236
+ used: Je,
4237
+ componentNodes: Ve,
4238
+ config: je,
4239
+ selectedIds: qe,
4240
+ localPackages: We,
4241
+ favorites: Xe,
4242
+ pages: Ze
4243
+ }, Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4244
+ __proto__: null,
4245
+ componentNodes: Ve,
4246
+ config: je,
4247
+ default: Ke,
4248
+ favorites: Xe,
4249
+ localPackages: We,
4250
+ pages: Ze,
4251
+ selectedIds: qe,
4252
+ used: Je
4253
+ }, Symbol.toStringTag, { value: "Module" })), Pn = {
4254
+ classic: Ge,
4255
+ multiple_components_interactive: Ke
4256
+ }, O = "_$_rbs_current_engine_$_", en = c.lazy(() => import("./index-CpYmNO_5.mjs")), tn = c.lazy(() => import("./index-DyB0TE1y.mjs"));
4257
+ class zn {
4258
+ constructor(e) {
4259
+ /** react createApp */
4260
+ d(this, "app", null);
4261
+ /** 挂载元素 */
4262
+ d(this, "el", null);
4263
+ /** 实际渲染引擎 */
4264
+ d(this, "engine");
4265
+ /** 操作模式(编辑/预览) */
4266
+ d(this, "mode", "edit");
4267
+ /** 事件钩子 */
4268
+ d(this, "hooks", null);
4269
+ /** 保存当前操作的json */
4270
+ d(this, "lastJson");
4271
+ /** options */
4272
+ d(this, "options");
4273
+ const {
4274
+ activeGlobal: t = !0,
4275
+ onStartPreview: a,
4276
+ dom: n,
4277
+ pageFooter: i,
4278
+ pageLogo: o,
4279
+ ...s
4280
+ } = e || {};
4281
+ this.options = {
4282
+ activeGlobal: t,
4283
+ onStartPreview: a,
4284
+ dom: n,
4285
+ pageFooter: i,
4286
+ pageLogo: o
4287
+ }, this.engine = new Qa(s), n && this.mount(n), t && this.activeGlobal(), a && this.on("startPreview", a);
4288
+ }
4289
+ /**
4290
+ * 挂载dom(会触发编辑器渲染)
4291
+ * @param el 待挂载到的dom
4292
+ */
4293
+ async mount(e) {
4294
+ if (this.el) {
4295
+ console.error("RBS el has been mounted.");
4296
+ return;
4297
+ }
4298
+ return this.el = e, this.importJSON(this.lastJson);
4299
+ }
4300
+ /**
4301
+ * 取消挂载dom
4302
+ * @description 与destroy的区别是会保留json的状态,重新挂载dom即可重新渲染。
4303
+ */
4304
+ async unmount() {
4305
+ this.app && (this.lastJson = await this.engine.getJSON(), this.app.unmount(), this.app = null, this.el = null);
4306
+ }
4307
+ /**
4308
+ * 监听事件
4309
+ * @param type 事件类型
4310
+ * @param callback 事件回调函数
4311
+ */
4312
+ on(e, t) {
4313
+ this.hooks || (this.hooks = /* @__PURE__ */ new Map());
4314
+ const a = this.hooks.get(e) || [];
4315
+ a.push(t), this.hooks.set(e, a);
4316
+ }
4317
+ /**
4318
+ * 触发事件
4319
+ * @param type 事件类型
4320
+ * @param payload 传参
4321
+ */
4322
+ emit(e, t) {
4323
+ var a, n, i, o;
4324
+ (o = (i = (n = (a = this.hooks) == null ? void 0 : a.get) == null ? void 0 : n.call(a, e)) == null ? void 0 : i.forEach) == null || o.call(i, (s) => {
4325
+ s == null || s(t);
4326
+ });
4327
+ }
4328
+ /**
4329
+ * 启用预览模式(需在importJSON之前使用)
4330
+ */
4331
+ enablePreview() {
4332
+ this.mode = "preview";
4333
+ }
4334
+ /**
4335
+ * 启用编辑模式(需在mount之前使用)
4336
+ */
4337
+ enableEdit() {
4338
+ this.mode = "edit";
4339
+ }
4340
+ /**
4341
+ * 销毁
4342
+ */
4343
+ async destroy() {
4344
+ this.unActiveGlobal(), await this.unmount(), this.engine.destroy(), this.hooks = null, this.lastJson = void 0;
4345
+ }
4346
+ /**
4347
+ * 导入JSONString(会触发渲染)
4348
+ * @param text json的文本格式
4349
+ */
4350
+ async importJSONString(e) {
4351
+ if (e)
4352
+ try {
4353
+ const t = JSON.parse(e || "{}");
4354
+ return this.importJSON(t);
4355
+ } catch (t) {
4356
+ throw t;
4357
+ }
4358
+ }
4359
+ /**
4360
+ * 导入json(会触发渲染)
4361
+ * @param json json格式数据
4362
+ */
4363
+ async importJSON(e) {
4364
+ return new Promise((t, a) => {
4365
+ var n, i;
4366
+ try {
4367
+ if (!this.el)
4368
+ throw new Error("el not found.");
4369
+ this.app ? this.engine.loadJSON(e).then(() => t()) : (this.app = ue(this.el), this.mode === "edit" ? this.app.render(
4370
+ /* @__PURE__ */ u(U.Provider, { value: { engine: this.engine, rbsEngine: this }, children: /* @__PURE__ */ u(
4371
+ en,
4372
+ {
4373
+ json: e,
4374
+ engine: this.engine,
4375
+ onJSONLoad: t,
4376
+ pageFooter: (n = this.options) == null ? void 0 : n.pageFooter,
4377
+ pageLogo: (i = this.options) == null ? void 0 : i.pageLogo
4378
+ }
4379
+ ) })
4380
+ ) : this.mode === "preview" && this.app.render(
4381
+ /* @__PURE__ */ u(U.Provider, { value: { engine: this.engine, rbsEngine: this }, children: /* @__PURE__ */ u(tn, { json: e, engine: this.engine, onJSONLoad: t }) })
4382
+ ));
4383
+ } catch (o) {
4384
+ a(o);
4385
+ }
4386
+ });
4387
+ }
4388
+ /**
4389
+ * 导出json文件
4390
+ */
4391
+ async exportJSON() {
4392
+ return this.engine.getJSON();
4393
+ }
4394
+ /**
4395
+ * 激活全局对象
4396
+ */
4397
+ activeGlobal() {
4398
+ window[O] = this.engine;
4399
+ }
4400
+ /**
4401
+ * 取消激活全局对象(慎用!单实例情况下会导致报错)
4402
+ */
4403
+ unActiveGlobal() {
4404
+ window[O] === this.engine && delete window[O];
4405
+ }
4406
+ /**************************** static *************************/
4407
+ // 获取档当前激活的 engine
4408
+ static getActiveEngine() {
4409
+ const e = window[O];
4410
+ return e || console.warn("RBS engine is not activated."), e;
4411
+ }
4412
+ }
4413
+ export {
4414
+ Se as C,
4415
+ S as D,
4416
+ U as E,
4417
+ $ as I,
4418
+ Sn as L,
4419
+ zn as R,
4420
+ wn as a,
4421
+ ve as b,
4422
+ I as c,
4423
+ Za as d,
4424
+ kt as e,
4425
+ ka as f,
4426
+ _e as g,
4427
+ xn as h,
4428
+ Ua as i,
4429
+ Ca as j,
4430
+ Ya as k,
4431
+ oe as l,
4432
+ Cn as m,
4433
+ T as n,
4434
+ A as o,
4435
+ ja as p,
4436
+ Pn as q,
4437
+ kn as r,
4438
+ In as s,
4439
+ Tn as t,
4440
+ Ee as u
4441
+ };