epic-designer-gold 0.0.12 → 0.0.14

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 (82) hide show
  1. package/dist/{attributeView-jwbZhq65.js → attributeView-BN2nA4jI.js} +2 -2
  2. package/dist/attributeView-lpFl3t4a.cjs +1 -0
  3. package/dist/axios-CYGTE3lR.cjs +6 -0
  4. package/dist/axios-ITY6Uw7A.js +2085 -0
  5. package/dist/core/components/builder/src/builder.vue.d.ts +2 -0
  6. package/dist/core/components/node/src/node.vue.d.ts +2 -0
  7. package/dist/core/components/tree/src/tree.vue.d.ts +1 -1
  8. package/dist/{eventView-CEeT_JLL.js → eventView-BKpQ9YIh.js} +2 -2
  9. package/dist/eventView-DgqXxWY1.cjs +1 -0
  10. package/dist/index-1afOcXnV.cjs +1 -0
  11. package/dist/{index-M-hTLR0c.js → index-ASoFJnMl.js} +1 -1
  12. package/dist/index-B03W7FZR.cjs +1 -0
  13. package/dist/index-BHmIF8aI.cjs +10 -0
  14. package/dist/index-BJlPL6eL.cjs +1 -0
  15. package/dist/index-BXNPTGKl.cjs +1 -0
  16. package/dist/{index-D4e8XNyx.js → index-BlJ0TQyn.js} +1 -1
  17. package/dist/index-By5rfqCj.cjs +1 -0
  18. package/dist/{index-E2PvWPhl.js → index-BzsFImwK.js} +2 -2
  19. package/dist/{index-Ba0ZjQgI.js → index-C-XUgjda.js} +1 -1
  20. package/dist/{index-HM72iSCq.js → index-C4sdhgF2.js} +1 -1
  21. package/dist/index-C6ceZM1C.cjs +1 -0
  22. package/dist/{index-Dm_60RQ9.js → index-CCTMCqiz.js} +3 -4
  23. package/dist/index-CGHtM1lr.cjs +1 -0
  24. package/dist/{index-yVm3iKnk.js → index-CL_7RzF7.js} +87 -88
  25. package/dist/index-CNzcV-bQ.cjs +1 -0
  26. package/dist/{index-B7sMvYm_.cjs → index-CdgT4gQu.cjs} +1 -1
  27. package/dist/index-CkRhCvJK.cjs +1 -0
  28. package/dist/index-D8YBJFH6.cjs +1 -0
  29. package/dist/{index-DC4NLl3o.js → index-DPfAejnH.js} +2 -2
  30. package/dist/{index-BcZSHbp2.js → index-DZYSBPVO.js} +2 -2
  31. package/dist/index-DpzLP1Zp.cjs +1 -0
  32. package/dist/{index-Dtax565w.js → index-Mf82MCCF.js} +2 -2
  33. package/dist/index-Ol-YPkY9.js +1550 -0
  34. package/dist/index-YHlIFgpT.cjs +1 -0
  35. package/dist/{index-DHwtlP2J.js → index-Yx99TN9O.js} +2 -2
  36. package/dist/{index-DZRPexQZ.js → index-kWCcT4er.js} +3 -3
  37. package/dist/{index-D3KAAzmX.cjs → index-lH0_mCG-.cjs} +1 -1
  38. package/dist/{index-uaq_HmHi.js → index-ooVzYa5L.js} +1 -1
  39. package/dist/index-qJNRPNIj.js +4 -0
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.js +2 -2
  42. package/dist/outline-CJSEUbgc.cjs +1 -0
  43. package/dist/{outline-utbOTCBV.js → outline-yy4pIEi3.js} +2 -2
  44. package/dist/select-B479QwwL.cjs +1 -0
  45. package/dist/select-CtUVWh2M.js +29 -0
  46. package/dist/{sign-CdhDIjlg.js → sign-BDZCr3wJ.js} +11 -12
  47. package/dist/sign-Gwu2PIRy.cjs +1 -0
  48. package/dist/style.css +1 -1
  49. package/dist/{styleView-B1kY8Fux.js → styleView-CXp05_Ar.js} +2 -2
  50. package/dist/styleView-auUK19Dr.cjs +1 -0
  51. package/dist/tree.vue_vue_type_script_setup_true_lang-RWTXU6lO.cjs +1 -0
  52. package/dist/{tree.vue_vue_type_script_setup_true_lang-Bnl1CGxG.js → tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js} +1 -1
  53. package/dist/ui/elementPlus/index.cjs +1 -1
  54. package/dist/ui/elementPlus/index.js +2 -2
  55. package/package.json +1 -1
  56. package/dist/attributeView-DEyQL7em.cjs +0 -1
  57. package/dist/axios-CXDYiOMX.js +0 -1704
  58. package/dist/axios-tuVKNgv9.cjs +0 -6
  59. package/dist/eventView-CfMax_U7.cjs +0 -1
  60. package/dist/index-B2N4pP55.cjs +0 -1
  61. package/dist/index-B3dTIoEC.cjs +0 -1
  62. package/dist/index-B6yexTNr.js +0 -1509
  63. package/dist/index-Bs6GdgDl.cjs +0 -1
  64. package/dist/index-CTd2_vna.cjs +0 -1
  65. package/dist/index-Cevjl8jo.cjs +0 -1
  66. package/dist/index-CrrXaIZY.js +0 -4
  67. package/dist/index-CuxnFxdY.cjs +0 -1
  68. package/dist/index-D-2x46HI.cjs +0 -1
  69. package/dist/index-DBQ-tc2k.cjs +0 -1
  70. package/dist/index-DWjMyXtP.cjs +0 -1
  71. package/dist/index-DgRGSX7j.cjs +0 -10
  72. package/dist/index-Xb_SJdEs.cjs +0 -1
  73. package/dist/index-br62scsB.cjs +0 -1
  74. package/dist/index-gFqI49-0.cjs +0 -1
  75. package/dist/outline-UAdT8ap6.cjs +0 -1
  76. package/dist/pluginManager-D8PM7ICc.js +0 -383
  77. package/dist/pluginManager-itCTrGag.cjs +0 -1
  78. package/dist/select-B8HCbraJ.js +0 -29
  79. package/dist/select-D6bRz5G2.cjs +0 -1
  80. package/dist/sign-Dx0d5kWo.cjs +0 -1
  81. package/dist/styleView-CHar-6GB.cjs +0 -1
  82. package/dist/tree.vue_vue_type_script_setup_true_lang-BVopU0uv.cjs +0 -1
@@ -1,383 +0,0 @@
1
- var l = Object.defineProperty;
2
- var d = (i, e, t) => e in i ? l(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var o = (i, e, t) => d(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineAsyncComponent as f, ref as c, shallowRef as m } from "vue";
5
- const p = (i, e) => f({
6
- loader: i,
7
- loadingComponent: e,
8
- delay: 80
9
- });
10
- function v(i) {
11
- return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
12
- var s = i.get(e);
13
- s ? s.push(t) : i.set(e, [t]);
14
- }, off: function(e, t) {
15
- var s = i.get(e);
16
- s && (t ? s.splice(s.indexOf(t) >>> 0, 1) : i.set(e, []));
17
- }, emit: function(e, t) {
18
- var s = i.get(e);
19
- s && s.slice().map(function(n) {
20
- n(t);
21
- }), (s = i.get("*")) && s.slice().map(function(n) {
22
- n(e, t);
23
- });
24
- } };
25
- }
26
- const C = v();
27
- class g {
28
- constructor() {
29
- // 已初始化基础UI
30
- o(this, "initialized", c(!1));
31
- // 数据源存储
32
- o(this, "sourceData", []);
33
- // 组件对象字典,key 为组件type,value 为组件
34
- o(this, "components", {});
35
- // 组件配置记录字典,key 为组件type,value 为组件配置
36
- o(this, "componentConfigs", {});
37
- // 基础组件type,切换ui时,可先移除该数组记录的type
38
- o(this, "baseComponentTypes", []);
39
- // 组件模式分组,使用 Vue Composition API 的 ref 进行响应式处理
40
- o(this, "componentSchemaGroups", c([]));
41
- // 隐藏的组件列表,存储需要隐藏的组件名称
42
- o(this, "hiddenComponents", []);
43
- // 表单模式默认schema数据
44
- o(this, "formSchemas", [
45
- {
46
- label: "表单",
47
- type: "form",
48
- componentProps: {
49
- layout: "horizontal",
50
- name: "default",
51
- labelWidth: 100,
52
- labelLayout: "fixed",
53
- labelCol: {
54
- span: 5
55
- },
56
- wrapperCol: {
57
- span: 19
58
- },
59
- colon: !0,
60
- labelAlign: "right",
61
- labelPlacement: "left"
62
- },
63
- children: [],
64
- id: "root"
65
- }
66
- ]);
67
- // 组件分组名称映射,key 为组件原名称,value 为组件分组映射名称
68
- o(this, "componentGroupNameMap", {});
69
- // 组件分组排序列表(设置之后,按该数组下标排序)
70
- o(this, "sortedGroups", ["表单", "布局"]);
71
- // 视图容器模型,包含活动栏和右侧边栏的配置
72
- o(this, "viewsContainers", {
73
- activitybars: m([]),
74
- // 活动栏配置列表
75
- rightSidebars: m([])
76
- // 右侧边栏配置列表
77
- });
78
- // 公共方法模型,存储插件的公共方法
79
- o(this, "publicMethods", {
80
- // 示例数据
81
- // publicTest: {
82
- // describe: "测试函数",
83
- // name: "test",
84
- // handler: (e) => {
85
- // console.log(e)
86
- // // alert("测试函数弹出");
87
- // },
88
- // },
89
- });
90
- }
91
- /**
92
- * 添加组件到插件管理器中
93
- * @param componentType 组件类型
94
- * @param component 组件
95
- */
96
- component(e, t) {
97
- typeof t == "function" && (t = p(t)), this.components[e] = t;
98
- }
99
- /**
100
- * 注册组件到插件管理器中
101
- * @param componentConfig 组件配置
102
- */
103
- registerComponent(e) {
104
- this.component(e.defaultSchema.type, e.component), e.defaultSchema.input && (e.config.action || (e.config.action = []), e.config.action.unshift(
105
- {
106
- type: "setValue",
107
- describe: "设置值",
108
- // 参数配置
109
- argsConfigs: [
110
- {
111
- ...e.defaultSchema,
112
- label: "设置数据",
113
- field: "0"
114
- }
115
- ]
116
- },
117
- {
118
- type: "getValue",
119
- describe: "获取值"
120
- }
121
- )), this.componentConfigs[e.defaultSchema.type] = e, this.computedComponentSchemaGroups();
122
- }
123
- /**
124
- * 从已记录的基础组件类型中移除特定类型的组件
125
- * @param componentType 要移除的组件类型
126
- */
127
- removeComponent(e) {
128
- delete this.componentConfigs[e], delete this.components[e];
129
- }
130
- /**
131
- * 设置数据源
132
- * @param
133
- */
134
- setSourceData(e) {
135
- this.sourceData = e, C.emit("updateSource", /* @__PURE__ */ new Date());
136
- }
137
- /**
138
- * 获取数据源
139
- * @returns
140
- */
141
- getSourceData() {
142
- return Object.prototype.toString.call(this.sourceData) === "[object Array]" ? this.sourceData : [];
143
- }
144
- /**
145
- * 记录基础组件类型
146
- * @returns baseComponentTypes string[]
147
- */
148
- setBaseComponentTypes(e) {
149
- this.baseComponentTypes = e;
150
- }
151
- /**
152
- * 添加基础组件类型
153
- * @returns baseComponentType string
154
- */
155
- addBaseComponentTypes(e) {
156
- this.baseComponentTypes.push(e);
157
- }
158
- /**
159
- * 移除已记录的基础组件类型
160
- */
161
- removeBaseComponents() {
162
- this.baseComponentTypes.forEach((e) => {
163
- this.removeComponent(e);
164
- }), this.setBaseComponentTypes([]), this.computedComponentSchemaGroups();
165
- }
166
- /**
167
- * 获取所有插件管理中的所有组件
168
- * @returns components
169
- */
170
- getComponents() {
171
- return this.components;
172
- }
173
- /**
174
- * 通过type 查询相应的组件
175
- * @returns components
176
- */
177
- getComponent(e) {
178
- return this.components[e];
179
- }
180
- /**
181
- * 注册或更新活动栏(Activitybar)模型。
182
- * 如果模型中的组件是一个函数,则异步加载该组件。
183
- * @param activitybar 要注册或更新的活动栏模型
184
- */
185
- registerActivitybar(e) {
186
- typeof e.component == "function" && (e.component = p(e.component)), typeof e.visible > "u" && (e.visible = !0);
187
- const t = this.viewsContainers.activitybars.value.findIndex((s) => s.id === e.id);
188
- t !== -1 ? this.viewsContainers.activitybars.value[t] = e : this.viewsContainers.activitybars.value.push(e);
189
- }
190
- /**
191
- * 获取所有activitybars
192
- * @returns activitybars
193
- */
194
- getActivitybars() {
195
- return this.viewsContainers.activitybars.value;
196
- }
197
- /**
198
- * 隐藏活动栏
199
- * @param value 属性
200
- * @param attr 查询字段 默认值 title
201
- */
202
- hideActivitybar(e, t = "title") {
203
- const s = this.viewsContainers.activitybars.value.findIndex((n) => n[t] === e);
204
- s !== -1 && (this.viewsContainers.activitybars.value[s].visible = !1);
205
- }
206
- /**
207
- * 显示活动栏
208
- * @param value 属性
209
- * @param attr 查询字段 默认值 title
210
- */
211
- showActivitybar(e, t = "title") {
212
- const s = this.viewsContainers.activitybars.value.findIndex((n) => n[t] === e);
213
- s !== -1 && (this.viewsContainers.activitybars.value[s].visible = !0);
214
- }
215
- /**
216
- * 注册右侧栏
217
- */
218
- registerRightSidebar(e) {
219
- typeof e.component == "function" && (e.component = p(e.component)), typeof e.visible > "u" && (e.visible = !0);
220
- const t = this.viewsContainers.rightSidebars.value.findIndex((s) => s.id === e.id);
221
- t !== -1 ? this.viewsContainers.rightSidebars.value[t] = e : this.viewsContainers.rightSidebars.value.push(e);
222
- }
223
- /**
224
- * 获取所有rightSidebars
225
- * @returns rightSidebars
226
- */
227
- getRightSidebars() {
228
- return this.viewsContainers.rightSidebars.value;
229
- }
230
- /**
231
- * 隐藏右侧边栏
232
- * @param value 属性
233
- * @param attr 查询字段 默认值 title
234
- */
235
- hideRightSidebar(e, t = "title") {
236
- const s = this.viewsContainers.rightSidebars.value.findIndex((n) => n[t] === e);
237
- s !== -1 && (this.viewsContainers.rightSidebars.value[s].visible = !1);
238
- }
239
- /**
240
- * 显示右侧边栏
241
- * @param value 属性
242
- * @param attr 查询字段 默认值 title
243
- */
244
- showRightSidebar(e, t = "title") {
245
- const s = this.viewsContainers.rightSidebars.value.findIndex((n) => n[t] === e);
246
- s !== -1 && (this.viewsContainers.rightSidebars.value[s].visible = !0);
247
- }
248
- /**
249
- * 获取所有插件管理中的所有组件配置
250
- * @returns componentAttrs
251
- */
252
- getComponentConfings() {
253
- return this.componentConfigs;
254
- }
255
- /**
256
- * 通过type获取ComponentConfing
257
- * @returns
258
- */
259
- getComponentConfingByType(e) {
260
- return this.componentConfigs[e];
261
- }
262
- /**
263
- * 计算componentSchemaGroups
264
- */
265
- computedComponentSchemaGroups() {
266
- const e = [];
267
- Object.values(this.componentConfigs).forEach((t) => {
268
- if (!this.hiddenComponents.includes(t.defaultSchema.type) && t.groupName) {
269
- const s = this.componentGroupNameMap[t.groupName] ?? t.groupName;
270
- let n = e.findIndex((r) => r.title === s);
271
- n === -1 && (e.push({
272
- title: s,
273
- list: []
274
- }), n = e.length - 1);
275
- let a = e[n].list.findIndex(
276
- (r) => r.type === t.defaultSchema.type
277
- );
278
- a !== -1 ? e[n].list[a] = t.defaultSchema : e[n].list.push(t.defaultSchema);
279
- }
280
- }), e.sort((t, s) => {
281
- const n = this.sortedGroups.indexOf(t.title), a = this.sortedGroups.indexOf(s.title);
282
- return n === -1 ? 1 : a === -1 ? -1 : n - a;
283
- }), e.forEach((t) => {
284
- t.list.sort((s, n) => {
285
- var u, h;
286
- const a = ((u = this.componentConfigs[s.type]) == null ? void 0 : u.sort) ?? 1e3, r = ((h = this.componentConfigs[n.type]) == null ? void 0 : h.sort) ?? 1e3;
287
- return a - r;
288
- });
289
- }), this.componentSchemaGroups.value = e;
290
- }
291
- /**
292
- * 按照分组获取componentSchemaGroups 暂时没啥用
293
- * @returns componentSchemaGroups
294
- */
295
- getComponentSchemaGroups() {
296
- return this.componentSchemaGroups;
297
- }
298
- /**
299
- * 设置组件分组名称到映射名称的关系
300
- * @param groupName 组件分组名称
301
- * @param mapName 映射的名称
302
- */
303
- setComponentGroupNameMap(e, t) {
304
- this.componentGroupNameMap[e] = t;
305
- }
306
- /**
307
- * 清空组件分组名称到映射名称的关系
308
- */
309
- clearComponentGroupNameMap() {
310
- this.componentGroupNameMap = {};
311
- }
312
- /**
313
- * 设置组件分组的排序
314
- * @param sortedGroups 包含组名和排序字段的对象数组
315
- */
316
- setSortedGroups(e) {
317
- this.sortedGroups = e, this.computedComponentSchemaGroups();
318
- }
319
- /**
320
- * 清空组件分组的排序
321
- */
322
- clearSortedGroups() {
323
- this.sortedGroups = [], this.computedComponentSchemaGroups();
324
- }
325
- /**
326
- * 添加需要隐藏的组件类型
327
- * @param {*} type
328
- * @returns
329
- */
330
- hideComponent(e) {
331
- this.hiddenComponents.push(e), this.computedComponentSchemaGroups();
332
- }
333
- /**
334
- * 移除需要隐藏的组件类型
335
- * @param {*} type
336
- * @returns
337
- */
338
- showComponent(e) {
339
- this.hiddenComponents = this.hiddenComponents.filter((t) => t !== e), this.computedComponentSchemaGroups();
340
- }
341
- /**
342
- * 设置需要隐藏的组件类型数组
343
- * @param {*} type[]
344
- * @returns
345
- */
346
- setHideComponents(e) {
347
- this.hiddenComponents = e, this.computedComponentSchemaGroups();
348
- }
349
- /**
350
- * 设置initialized的状态。
351
- *
352
- * @param value 要设置的布尔值。
353
- */
354
- setInitialized(e) {
355
- this.initialized.value = e;
356
- }
357
- /**
358
- * 添加公共方法
359
- * @param publicMethod
360
- */
361
- addPublicMethod(e) {
362
- const t = e.methodName ?? e.name, s = e.method ?? e.handler;
363
- this.publicMethods[t] = {
364
- ...e,
365
- name: t,
366
- handler: s
367
- };
368
- }
369
- /**
370
- * 移除公共方法
371
- * @param methodName
372
- */
373
- removePublicMethod(e) {
374
- delete this.publicMethods[e];
375
- }
376
- }
377
- const S = new g();
378
- export {
379
- C as E,
380
- g as P,
381
- p as l,
382
- S as p
383
- };
@@ -1 +0,0 @@
1
- "use strict";var d=Object.defineProperty;var f=(i,e,t)=>e in i?d(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var o=(i,e,t)=>f(i,typeof e!="symbol"?e+"":e,t);const p=require("vue"),u=(i,e)=>p.defineAsyncComponent({loader:i,loadingComponent:e,delay:80});function v(i){return{all:i=i||new Map,on:function(e,t){var s=i.get(e);s?s.push(t):i.set(e,[t])},off:function(e,t){var s=i.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var s=i.get(e);s&&s.slice().map(function(n){n(t)}),(s=i.get("*"))&&s.slice().map(function(n){n(e,t)})}}}const l=v();class m{constructor(){o(this,"initialized",p.ref(!1));o(this,"sourceData",[]);o(this,"components",{});o(this,"componentConfigs",{});o(this,"baseComponentTypes",[]);o(this,"componentSchemaGroups",p.ref([]));o(this,"hiddenComponents",[]);o(this,"formSchemas",[{label:"表单",type:"form",componentProps:{layout:"horizontal",name:"default",labelWidth:100,labelLayout:"fixed",labelCol:{span:5},wrapperCol:{span:19},colon:!0,labelAlign:"right",labelPlacement:"left"},children:[],id:"root"}]);o(this,"componentGroupNameMap",{});o(this,"sortedGroups",["表单","布局"]);o(this,"viewsContainers",{activitybars:p.shallowRef([]),rightSidebars:p.shallowRef([])});o(this,"publicMethods",{})}component(e,t){typeof t=="function"&&(t=u(t)),this.components[e]=t}registerComponent(e){this.component(e.defaultSchema.type,e.component),e.defaultSchema.input&&(e.config.action||(e.config.action=[]),e.config.action.unshift({type:"setValue",describe:"设置值",argsConfigs:[{...e.defaultSchema,label:"设置数据",field:"0"}]},{type:"getValue",describe:"获取值"})),this.componentConfigs[e.defaultSchema.type]=e,this.computedComponentSchemaGroups()}removeComponent(e){delete this.componentConfigs[e],delete this.components[e]}setSourceData(e){this.sourceData=e,l.emit("updateSource",new Date)}getSourceData(){return Object.prototype.toString.call(this.sourceData)==="[object Array]"?this.sourceData:[]}setBaseComponentTypes(e){this.baseComponentTypes=e}addBaseComponentTypes(e){this.baseComponentTypes.push(e)}removeBaseComponents(){this.baseComponentTypes.forEach(e=>{this.removeComponent(e)}),this.setBaseComponentTypes([]),this.computedComponentSchemaGroups()}getComponents(){return this.components}getComponent(e){return this.components[e]}registerActivitybar(e){typeof e.component=="function"&&(e.component=u(e.component)),typeof e.visible>"u"&&(e.visible=!0);const t=this.viewsContainers.activitybars.value.findIndex(s=>s.id===e.id);t!==-1?this.viewsContainers.activitybars.value[t]=e:this.viewsContainers.activitybars.value.push(e)}getActivitybars(){return this.viewsContainers.activitybars.value}hideActivitybar(e,t="title"){const s=this.viewsContainers.activitybars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.activitybars.value[s].visible=!1)}showActivitybar(e,t="title"){const s=this.viewsContainers.activitybars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.activitybars.value[s].visible=!0)}registerRightSidebar(e){typeof e.component=="function"&&(e.component=u(e.component)),typeof e.visible>"u"&&(e.visible=!0);const t=this.viewsContainers.rightSidebars.value.findIndex(s=>s.id===e.id);t!==-1?this.viewsContainers.rightSidebars.value[t]=e:this.viewsContainers.rightSidebars.value.push(e)}getRightSidebars(){return this.viewsContainers.rightSidebars.value}hideRightSidebar(e,t="title"){const s=this.viewsContainers.rightSidebars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.rightSidebars.value[s].visible=!1)}showRightSidebar(e,t="title"){const s=this.viewsContainers.rightSidebars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.rightSidebars.value[s].visible=!0)}getComponentConfings(){return this.componentConfigs}getComponentConfingByType(e){return this.componentConfigs[e]}computedComponentSchemaGroups(){const e=[];Object.values(this.componentConfigs).forEach(t=>{if(!this.hiddenComponents.includes(t.defaultSchema.type)&&t.groupName){const s=this.componentGroupNameMap[t.groupName]??t.groupName;let n=e.findIndex(r=>r.title===s);n===-1&&(e.push({title:s,list:[]}),n=e.length-1);let a=e[n].list.findIndex(r=>r.type===t.defaultSchema.type);a!==-1?e[n].list[a]=t.defaultSchema:e[n].list.push(t.defaultSchema)}}),e.sort((t,s)=>{const n=this.sortedGroups.indexOf(t.title),a=this.sortedGroups.indexOf(s.title);return n===-1?1:a===-1?-1:n-a}),e.forEach(t=>{t.list.sort((s,n)=>{var h,c;const a=((h=this.componentConfigs[s.type])==null?void 0:h.sort)??1e3,r=((c=this.componentConfigs[n.type])==null?void 0:c.sort)??1e3;return a-r})}),this.componentSchemaGroups.value=e}getComponentSchemaGroups(){return this.componentSchemaGroups}setComponentGroupNameMap(e,t){this.componentGroupNameMap[e]=t}clearComponentGroupNameMap(){this.componentGroupNameMap={}}setSortedGroups(e){this.sortedGroups=e,this.computedComponentSchemaGroups()}clearSortedGroups(){this.sortedGroups=[],this.computedComponentSchemaGroups()}hideComponent(e){this.hiddenComponents.push(e),this.computedComponentSchemaGroups()}showComponent(e){this.hiddenComponents=this.hiddenComponents.filter(t=>t!==e),this.computedComponentSchemaGroups()}setHideComponents(e){this.hiddenComponents=e,this.computedComponentSchemaGroups()}setInitialized(e){this.initialized.value=e}addPublicMethod(e){const t=e.methodName??e.name,s=e.method??e.handler;this.publicMethods[t]={...e,name:t,handler:s}}removePublicMethod(e){delete this.publicMethods[e]}}const C=new m;exports.EventBus=l;exports.PluginManager=m;exports.loadAsyncComponent=u;exports.pluginManager=C;
@@ -1,29 +0,0 @@
1
- import { defineComponent as m, h as o } from "vue";
2
- /* empty css */
3
- import { ElSelect as d, ElOption as p } from "element-plus";
4
- const s = m({
5
- emits: ["update:modelValue"],
6
- setup(i, { emit: u, attrs: l }) {
7
- function n(e = null) {
8
- u("update:modelValue", e);
9
- }
10
- return () => {
11
- const e = {
12
- ...l,
13
- key: String(l.multiple),
14
- "onUpdate:modelValue": n
15
- };
16
- return o(d, e, {
17
- default: () => {
18
- var t;
19
- return [
20
- (t = e == null ? void 0 : e.options) == null ? void 0 : t.map((a) => o(p, { label: a.label, value: a.value }))
21
- ];
22
- }
23
- });
24
- };
25
- }
26
- });
27
- export {
28
- s as default
29
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");;/* empty css */const a=require("element-plus"),r=l.defineComponent({emits:["update:modelValue"],setup(i,{emit:o,attrs:t}){function d(e=null){o("update:modelValue",e)}return()=>{const e={...t,key:String(t.multiple),"onUpdate:modelValue":d};return l.h(a.ElSelect,e,{default:()=>{var u;return[(u=e==null?void 0:e.options)==null?void 0:u.map(n=>l.h(a.ElOption,{label:n.label,value:n.value}))]}})}}});exports.default=r;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),W=require("./pluginManager-itCTrGag.cjs"),B=require("./axios-tuVKNgv9.cjs"),E=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j={class:"btn"},q={class:"btns"},z={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})}},emits:["update:modelValue"],setup(y,{expose:x,emit:b}){const f=W.pluginManager.getComponent("button"),w=b,a=y;t.watch(()=>a.componentSchema,()=>{t.nextTick(()=>{p()})},{deep:!0,immediate:!0});const P=new ResizeObserver(o=>{for(const e of o)e.target&&e.target.clientWidth&&e.target.clientHeight&&p()}),l=t.ref(null),u=t.ref(null),n=t.ref(),S=t.ref("");function p(){var o,e;u.value&&((o=u.value)!=null&&o.clientHeight)&&((e=u.value)!=null&&e.clientWidth)&&(l.value.height=u.value.clientHeight,l.value.width=u.value.clientWidth,n.value=l.value.getContext("2d"),n.value.lineWidth=a.componentSchema.componentProps.lineWidth||4,a.componentSchema&&a.componentSchema.componentProps&&a.componentSchema.componentProps.style&&a.componentSchema.componentProps.style.color&&(n.value.strokeStyle=a.componentSchema.componentProps.style.color),S.value=l.value.getBoundingClientRect())}const r=t.ref(""),i=t.ref(""),_=t.ref(""),T=t.ref(""),s=t.ref([]),v=t.ref(!1);function k(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};r.value=e.x,i.value=e.y,n.value.beginPath(),n.value.moveTo(e.x,e.y),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),s.value.push(e),v.value=!0}function V(o){if(o=o||event,o.preventDefault(),v.value){let e={x:o.offsetX,y:o.offsetY};_.value=e.x,T.value=e.y,n.value.beginPath(),n.value.moveTo(r.value,i.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),r.value=e.x,i.value=e.y,s.value.push(e)}}function C(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};n.value.beginPath(),n.value.moveTo(r.value,i.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),s.value.push(e),s.value.push({x:-1,y:-1}),v.value=!1}function d(){n.value.clearRect(0,0,l.value.width,l.value.height),s.value=[]}async function m(){let o=await N(l.value.toDataURL("image/png"));w("update:modelValue",o)}async function N(o){let e=atob(o.split(",")[1]),h=new ArrayBuffer(e.length),D=new Uint8Array(h);for(let c=0;c<e.length;c++)D[c]=e.charCodeAt(c);let M=new Blob([h],{type:"image/png"}),g=new FormData;return g.append("file",M,Date.now()+"png"),(await B.axios({method:"post",url:"https://ess-ds.com/prod-api/center-file/file/upload",data:g,headers:{"Content-Type":"multipart/form-data"}})).data.data.url}return t.onMounted(()=>{p(),P.observe(u.value)}),t.onUnmounted(()=>{}),x({surewrite:m}),(o,e)=>(t.openBlock(),t.createElementBlock("div",{class:"sign",style:t.normalizeStyle({height:a.componentSchema.componentProps.style.height,width:a.componentSchema.componentProps.style.width||"100%"})},[t.createElementVNode("div",{class:"canvas",ref_key:"canvasWrap",ref:u},[t.createElementVNode("canvas",{ref_key:"canvas",ref:l,onMousedown:k,onMousemove:V,onMouseup:C},null,544)],512),t.createElementVNode("div",j,[e[2]||(e[2]=t.createElementVNode("div",{class:"remark"},null,-1)),t.createElementVNode("div",q,[t.createVNode(t.unref(f),{type:"info",size:"mini",onClick:d,onTouch:d},{default:t.withCtx(()=>e[0]||(e[0]=[t.createTextVNode("重写")])),_:1}),t.createVNode(t.unref(f),{type:"primary",size:"mini",onClick:m,onTouch:m},{default:t.withCtx(()=>e[1]||(e[1]=[t.createTextVNode("确定")])),_:1})])])],4))}},X=E._export_sfc(z,[["__scopeId","data-v-e972b6e0"]]);exports.default=X;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DgRGSX7j.cjs");require("./pluginManager-itCTrGag.cjs");const h=["title"],m={class:"epic-attr-input"},k=e.defineComponent({__name:"styleView",setup(v){const p=e.inject("designer"),u=e.inject("pageSchema"),d=e.inject("revoke"),r=[{label:"宽度",type:"EInputSize",field:"componentProps.style.width"},{label:"高度",type:"EInputSize",field:"componentProps.style.height"},{label:"内边距",type:"EInputSize",field:"componentProps.style.padding"},{label:"外边距",type:"EInputSize",field:"componentProps.style.margin"},{label:"背景色",type:"color-picker",field:"componentProps.style.backgroundColor",componentProps:{type:"color",style:{}}},{label:"字体颜色",type:"color-picker",field:"componentProps.style.color",componentProps:{type:"color",style:{}}}],c=e.computed(()=>p.state.checkedNode);function i(t){var n;return typeof t.show=="boolean"?t.show:((n=t.show)==null?void 0:n.call(t,{values:c.value}))??!0}function y(t,n,l,o=c.value){typeof l.onChange=="function"&&l.onChange({value:t,values:o,componentStyles:r}),l.changeSync?a.setValueByPath(o,n,t):e.nextTick(()=>{a.setValueByPath(o,n,t)}),d.push(u.schemas,"编辑组件属性")}return(t,n)=>{var l;return e.openBlock(),e.createElementBlock("div",{class:"epic-style-view",key:(l=c.value)==null?void 0:l.id},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,o=>{var s;return e.createElementVNode("div",{key:o.field},[i(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["epic-attr-item",o.layout])},[o.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"epic-attr-label",title:o.label},e.toDisplayString(o.label),9,h)):e.createCommentVNode("",!0),e.createElementVNode("div",m,[e.createVNode(e.unref(a._sfc_main),{componentSchema:{...o,componentProps:{...o.componentProps,...o.field==="componentProps.defaultValue"?(s=c.value)==null?void 0:s.componentProps:{},input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},"model-value":e.unref(a.getValueByPath)(o.editData??c.value,o.field),"onUpdate:modelValue":f=>y(f,o.field,o,o.editData)},null,8,["componentSchema","model-value","onUpdate:modelValue"])])],2)):e.createCommentVNode("",!0)])}),64))])}}});exports.default=k;
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),C=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./pluginManager-itCTrGag.cjs"),S=require("./vuedraggable.umd-BqhSJIAi.cjs"),_=e.defineComponent({name:"ETreeNodeItem",__name:"treeNodeItem",props:{schema:{}},setup(x){const a=x,u=e.inject("slots",{}),m=e.inject("pageSchema",{}),c=e.inject("expandedKeys"),v=e.inject("treeProps"),h=e.inject("selectedKeys"),i=e.inject("handleSelect"),g=e.computed(()=>c.value.includes(a.schema.id??"")),f=e.defineComponent({setup(){return()=>{var n;return e.h("span",{class:{text:!0,hover:v.hoverKey===a.schema.id,checked:h.value.includes(a.schema.id)},onClick:()=>i(a.schema.id,a.schema)},((n=u["tree-node"])==null?void 0:n.call(u,a))??e.h("span",{class:"epic-text-padding flex"},{default:()=>{var t;return[e.h("span",{class:"max-w-full truncate"},a.schema.label??((t=k.pluginManager.getComponentConfingByType(a.schema.type))==null?void 0:t.defaultSchema.label)),e.h("span",{class:"epic-node-type-text flex-1 w-0 truncate"},a.schema.id)]}}))}}});function o(){const n=a.schema.id;if(!n)return!1;c.value.includes(n)?c.value=c.value.filter(t=>t!==n):c.value.push(n)}function r(){var t;const n=a.schema.id;if(!n||!((t=a.schema.children)!=null&&t.length))return!1;c.value.push(n)}return r(),(n,t)=>{var l,d,p,s,y;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["epic-tree-node",{expanded:(l=a.schema.children)==null?void 0:l.length,"level-1":a.schema.id===((d=e.unref(m).schemas[0])==null?void 0:d.id)}])},[e.createElementVNode("a",null,[(p=a.schema.children)!=null&&p.length&&a.schema.id!==((s=e.unref(m).schemas[0])==null?void 0:s.id)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["icon-expanded",{expanded:g.value}]),onClick:o},[e.createVNode(e.unref(C._sfc_main),{name:"icon--epic--caret-right-outlined"})],2)):e.createCommentVNode("",!0),e.createVNode(e.unref(f))]),(y=a.schema.children)!=null&&y.length?(e.openBlock(),e.createBlock(B,{key:0,class:e.normalizeClass(["epic-tree-sublist",{expanded:g.value}]),schemas:a.schema.children,"onUpdate:schemas":t[0]||(t[0]=b=>a.schema.children=b),parentSchema:a.schema},null,8,["class","schemas","parentSchema"])):e.createCommentVNode("",!0)],2)}}}),N={key:1},B=e.defineComponent({name:"ETreeNodes",__name:"treeNodes",props:{schemas:{},parentSchema:{}},emits:["update:schemas"],setup(x,{emit:a}){const u=e.inject("designer"),m=e.inject("pageSchema"),c=e.inject("treeProps"),v=x,h=a,i=e.computed({get(){return v.schemas},set(o){h("update:schemas",o)}});function g(o){u.setDisableHover(!0),u.setCheckedNode(i.value[o])}function f(o){var r,n,t;return o.id===((r=m.schemas[0])==null?void 0:r.id)||(t=(n=k.pluginManager.getComponentConfingByType(o.type))==null?void 0:n.editConstraints)!=null&&t.immovable?"unmover-item":"draggable-item"}return(o,r)=>{var n,t,l,d,p;return(l=(t=e.unref(k.pluginManager).getComponentConfingByType(((n=v.parentSchema)==null?void 0:n.type)||""))==null?void 0:t.editConstraints)!=null&&l.childImmovable?(e.openBlock(),e.createElementBlock("ul",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,s=>(e.openBlock(),e.createBlock(_,{key:s.id,schema:s},null,8,["schema"]))),128))])):(e.openBlock(),e.createBlock(e.unref(S.draggable),e.mergeProps({key:0,modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=s=>i.value=s),"item-key":"id","component-data":{},class:"epic-draggable-range"},{animation:200,tag:"ul",group:"tree-draggable",ghostClass:"moveing",draggable:".draggable-item",disabled:!e.unref(c).draggable||((d=i.value[0])==null?void 0:d.id)===((p=e.unref(m).schemas[0])==null?void 0:p.id)},{onStart:r[1]||(r[1]=s=>g(s.oldIndex))}),{item:e.withCtx(({element:s,index:y})=>[(e.openBlock(),e.createBlock(_,{class:e.normalizeClass(f(s)),key:s.id,schema:s},null,8,["class","schema"]))]),_:1},16,["modelValue"]))}}}),V={class:"epic-tree h-full flex flex-col"},E={class:"epic-search-box px-10px py-6px"},K={class:"epic-tree-main flex-1 overflow-auto h-0"},T={class:"text-center pt-42px text-gray-400"},j=e.defineComponent({name:"ETree",__name:"tree",props:{options:{type:Array,default:()=>[]},hoverKey:{type:String,default:""},selectedKeys:{type:Array,default:()=>[]},draggable:{type:Boolean,default:!1}},emits:["update:selectedKeys","nodeClick"],setup(x,{emit:a}){const u=e.useSlots();e.provide("slots",u);const m=k.pluginManager.getComponent("input"),c=e.ref(""),v=e.ref([]),h=x,i=a,g=e.computed({get(){return h.selectedKeys},set(n){i("update:selectedKeys",n)}}),f=e.computed({get(){return o(h.options,c.value)},set(n){console.log(n)}});function o(n,t){const l=[];return n.forEach(d=>{var p;if((p=d.label)!=null&&p.includes(t))l.push(d);else if(d.children){const s=o(d.children,t);if(s.length>0){const y={...d};y.children=s,l.push(y)}}}),l}function r(n,t){g.value=[n],i("nodeClick",{id:n,componentSchema:t})}return e.provide("expandedKeys",v),e.provide("selectedKeys",g),e.provide("treeProps",h),e.provide("handleSelect",r),(n,t)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",E,[e.createVNode(e.unref(m),{placeholder:"搜索节点",clearable:"",allowClear:"",modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=l=>c.value=l),value:c.value,"onUpdate:value":t[1]||(t[1]=l=>c.value=l)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(C._sfc_main),{name:"icon--epic--search-rounded"})]),_:1},8,["modelValue","value"])]),e.createElementVNode("div",K,[e.createElementVNode("ul",null,[e.createVNode(B,{schemas:f.value,"onUpdate:schemas":t[2]||(t[2]=l=>f.value=l)},null,8,["schemas"])]),e.withDirectives(e.createElementVNode("div",T,"没有查询到的数据",512),[[e.vShow,!f.value.length]])])]))}});exports._sfc_main=j;