epic-designer-gold 0.0.26 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attributeView-kN43pWbg.js → attributeView-53W6OYFq.js} +1 -1
- package/dist/{attributeView-DCzZRUVR.cjs → attributeView-Br4R-qs2.cjs} +1 -1
- package/dist/core/components/builder/src/builder.vue.d.ts +2 -0
- package/dist/core/components/designer/src/modules/outline/outline.vue.d.ts +2 -0
- package/dist/index-3RNTR6WH.cjs +10 -0
- package/dist/{index-DxN8RjEN.js → index-5vW2b_OC.js} +1 -1
- package/dist/{index-BEe15yy8.js → index-B60Tmc0O.js} +1 -1
- package/dist/index-BUbBjk-A.js +4 -0
- package/dist/{index-CbGpPxHm.cjs → index-BXR6vTnH.cjs} +1 -1
- package/dist/{index-CIA7md14.cjs → index-BuMTLuUU.cjs} +1 -1
- package/dist/{index-CPUaKvrZ.cjs → index-BzetW3fw.cjs} +1 -1
- package/dist/index-C0_2_WpB.js +432 -0
- package/dist/{index-CaTuGyqu.js → index-CCe1TX6z.js} +1 -1
- package/dist/{index-Dk4znWYz.js → index-CXCTsEX3.js} +1 -1
- package/dist/{index-Dzlg11UJ.cjs → index-CoWccwst.cjs} +1 -1
- package/dist/{index-Bjx88DqX.js → index-CpCohObI.js} +1 -1
- package/dist/{index-XFxcgCZv.cjs → index-CrsnSHt0.cjs} +1 -1
- package/dist/index-Dk3I3tbP.cjs +1 -0
- package/dist/{index-Cj4ZeanZ.js → index-Do_cYUvQ.js} +68 -64
- package/dist/{index-DLBhfrNB.js → index-EQJa9EU2.js} +458 -444
- package/dist/index-hIAPokYs.cjs +1 -0
- package/dist/{index-DY-o9yrn.cjs → index-thxQ_B2C.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/outline-CJSEUbgc.cjs +1 -0
- package/dist/outline-yy4pIEi3.js +54 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-CzuVNY_C.cjs → styleView-CElFrsoj.cjs} +1 -1
- package/dist/{styleView-CW51rl71.js → styleView-DOTi7atY.js} +1 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-RWTXU6lO.cjs +1 -0
- package/dist/tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js +242 -0
- package/package.json +1 -1
- package/dist/index-AtPqwiGo.js +0 -665
- package/dist/index-CEYb2hAA.cjs +0 -10
- package/dist/index-CV6j5M_g.cjs +0 -1
- package/dist/index-CbNFt3RR.js +0 -4
- package/dist/index-jHZMacL0.cjs +0 -1
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import { defineComponent as U, inject as L, openBlock as p, createElementBlock as g, Fragment as A, renderList as T, createElementVNode as i, toDisplayString as O, createVNode as C, unref as _, withCtx as R, createCommentVNode as G, createTextVNode as J, ref as E, computed as S, withDirectives as F, normalizeClass as j, vShow as P, reactive as H, createBlock as K, nextTick as Q, toRaw as z, watch as W } from "vue";
|
|
2
|
+
import { l as q, _ as X, k as Y, m as Z } from "./index-EQJa9EU2.js";
|
|
3
|
+
import { p as w } from "./axios-ITY6Uw7A.js";
|
|
4
|
+
import { _ as D } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
+
import { d as ee } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
6
|
+
import { _ as te } from "./tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js";
|
|
7
|
+
const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-event-btn text-lg flex items-center text-$epic-text-secondary" }, ae = { class: "epic-action-editor-main" }, se = { class: "epic-editor-item rounded" }, ie = { class: "w-36px flex items-center text-lg" }, ce = { class: "flex-1" }, de = { key: 0 }, ue = { key: 1 }, re = { key: 2 }, pe = { class: "epic-action-box text-lg text-$epic-text-medium" }, me = ["onClick"], ve = ["onClick"], fe = /* @__PURE__ */ U({
|
|
8
|
+
__name: "EActionEditorItem",
|
|
9
|
+
props: {
|
|
10
|
+
itemEvents: {
|
|
11
|
+
type: Array,
|
|
12
|
+
default: () => []
|
|
13
|
+
},
|
|
14
|
+
allEvents: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => []
|
|
21
|
+
},
|
|
22
|
+
events: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => ({})
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
emits: ["add", "edit", "update:modelValue"],
|
|
28
|
+
setup(b, { emit: k }) {
|
|
29
|
+
const m = b, x = k, f = L("pageSchema");
|
|
30
|
+
function V(v) {
|
|
31
|
+
x("add", v);
|
|
32
|
+
}
|
|
33
|
+
function h(v) {
|
|
34
|
+
return q(f.schemas, v).label;
|
|
35
|
+
}
|
|
36
|
+
function r(v, c) {
|
|
37
|
+
var e;
|
|
38
|
+
const l = n(c);
|
|
39
|
+
l[c] = m.events[c].filter(($, N) => v !== N), (e = l[c]) != null && e.length || delete l[c], x("update:modelValue", l);
|
|
40
|
+
}
|
|
41
|
+
function u(v, c, l) {
|
|
42
|
+
x("edit", v, c, l);
|
|
43
|
+
}
|
|
44
|
+
function n(v) {
|
|
45
|
+
const c = {};
|
|
46
|
+
return m.allEvents.forEach((l) => {
|
|
47
|
+
if (!m.events[l.type].length || l.type === v)
|
|
48
|
+
return !1;
|
|
49
|
+
c[l.type] = m.events[l.type];
|
|
50
|
+
}), c;
|
|
51
|
+
}
|
|
52
|
+
return (v, c) => (p(!0), g(A, null, T(b.itemEvents, (l) => (p(), g("div", {
|
|
53
|
+
key: l.type,
|
|
54
|
+
class: "epic-event-item"
|
|
55
|
+
}, [
|
|
56
|
+
i("div", ne, [
|
|
57
|
+
i("div", {
|
|
58
|
+
class: "epic-event-label",
|
|
59
|
+
title: l.describe
|
|
60
|
+
}, O(l.describe), 9, oe),
|
|
61
|
+
i("div", le, [
|
|
62
|
+
C(_(D), {
|
|
63
|
+
name: "icon--epic--add-rounded",
|
|
64
|
+
onClick: (e) => V(l.type)
|
|
65
|
+
}, null, 8, ["onClick"])
|
|
66
|
+
])
|
|
67
|
+
]),
|
|
68
|
+
i("div", ae, [
|
|
69
|
+
C(_(ee), {
|
|
70
|
+
modelValue: m.events[l.type],
|
|
71
|
+
"onUpdate:modelValue": (e) => m.events[l.type] = e,
|
|
72
|
+
"item-key": "id",
|
|
73
|
+
"component-data": {
|
|
74
|
+
type: "transition-group"
|
|
75
|
+
},
|
|
76
|
+
group: "option-list",
|
|
77
|
+
handle: ".handle",
|
|
78
|
+
animation: 200
|
|
79
|
+
}, {
|
|
80
|
+
item: R(({ element: e, index: $ }) => [
|
|
81
|
+
i("div", se, [
|
|
82
|
+
i("div", ie, [
|
|
83
|
+
C(_(D), {
|
|
84
|
+
class: "mr-2 text-lg cursor-move handle text-$epic-text-medium",
|
|
85
|
+
name: "icon--epic--drag"
|
|
86
|
+
})
|
|
87
|
+
]),
|
|
88
|
+
i("div", ce, [
|
|
89
|
+
e.type === "component" ? (p(), g("div", de, O(h(e.componentId)), 1)) : e.type === "custom" ? (p(), g("div", ue, " 自定义函数 ")) : e.type === "public" ? (p(), g("div", re, " 公共函数 ")) : G("", !0),
|
|
90
|
+
J(" " + O(e.methodName), 1)
|
|
91
|
+
]),
|
|
92
|
+
i("div", pe, [
|
|
93
|
+
i("div", {
|
|
94
|
+
class: "epic-edit-btn",
|
|
95
|
+
onClick: (N) => u($, l.type, e)
|
|
96
|
+
}, [
|
|
97
|
+
C(_(D), { name: "icon--epic--page-info-outline-rounded" })
|
|
98
|
+
], 8, me),
|
|
99
|
+
i("div", {
|
|
100
|
+
class: "epic-del-btn",
|
|
101
|
+
onClick: (N) => r($, l.type)
|
|
102
|
+
}, [
|
|
103
|
+
C(_(D), { name: "icon--epic--delete-outline-rounded" })
|
|
104
|
+
], 8, ve)
|
|
105
|
+
])
|
|
106
|
+
])
|
|
107
|
+
]),
|
|
108
|
+
_: 2
|
|
109
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
110
|
+
])
|
|
111
|
+
]))), 128));
|
|
112
|
+
}
|
|
113
|
+
}), he = { class: "h-full flex flex-col" }, ge = /* @__PURE__ */ U({
|
|
114
|
+
__name: "EScriptEdit",
|
|
115
|
+
setup(b) {
|
|
116
|
+
const k = w.getComponent("monacoEditor"), m = {
|
|
117
|
+
theme: "vs-light",
|
|
118
|
+
selectOnLineNumbers: !0,
|
|
119
|
+
minimap: {
|
|
120
|
+
enabled: !1
|
|
121
|
+
}
|
|
122
|
+
}, x = E(null), f = L("pageSchema");
|
|
123
|
+
return (V, h) => (p(), g("div", he, [
|
|
124
|
+
h[1] || (h[1] = i("div", { class: "pb-2" }, " 自定义函数编辑 ", -1)),
|
|
125
|
+
C(_(k), {
|
|
126
|
+
ref_key: "monacoEditorRef",
|
|
127
|
+
ref: x,
|
|
128
|
+
autoToggleTheme: "",
|
|
129
|
+
modelValue: _(f).script,
|
|
130
|
+
"onUpdate:modelValue": h[0] || (h[0] = (r) => _(f).script = r),
|
|
131
|
+
class: "epic-editor flex-1",
|
|
132
|
+
config: m,
|
|
133
|
+
language: "javascript"
|
|
134
|
+
}, null, 8, ["modelValue"])
|
|
135
|
+
]));
|
|
136
|
+
}
|
|
137
|
+
}), _e = { class: "epic-attribute-view" }, ye = ["title"], xe = { class: "epic-attr-input" }, Ie = /* @__PURE__ */ U({
|
|
138
|
+
__name: "EArgsEditor",
|
|
139
|
+
props: {
|
|
140
|
+
modelValue: {},
|
|
141
|
+
actionArgsConfigs: {}
|
|
142
|
+
},
|
|
143
|
+
emits: ["update:modelValue"],
|
|
144
|
+
setup(b, { emit: k }) {
|
|
145
|
+
const m = b, x = k, f = S(() => m.modelValue ? JSON.parse(m.modelValue) : []);
|
|
146
|
+
function V(r) {
|
|
147
|
+
var u;
|
|
148
|
+
return typeof r.show == "boolean" ? r.show : typeof r.show == "function" ? (u = r.show) == null ? void 0 : u.call(r, { values: f.value }) : !0;
|
|
149
|
+
}
|
|
150
|
+
function h(r, u) {
|
|
151
|
+
const n = [
|
|
152
|
+
...JSON.parse(m.modelValue ?? "[]")
|
|
153
|
+
];
|
|
154
|
+
n[u] = r, x("update:modelValue", JSON.stringify(n));
|
|
155
|
+
}
|
|
156
|
+
return (r, u) => (p(), g("div", _e, [
|
|
157
|
+
(p(!0), g(A, null, T(m.actionArgsConfigs, (n) => (p(), g("div", {
|
|
158
|
+
key: n.field + n.type
|
|
159
|
+
}, [
|
|
160
|
+
F(i("div", {
|
|
161
|
+
class: j(["epic-attr-item", n.layout])
|
|
162
|
+
}, [
|
|
163
|
+
i("div", {
|
|
164
|
+
class: "epic-attr-label",
|
|
165
|
+
title: n.label
|
|
166
|
+
}, O(n.label), 9, ye),
|
|
167
|
+
i("div", xe, [
|
|
168
|
+
C(_(X), {
|
|
169
|
+
componentSchema: { ...n, componentProps: { ...n.componentProps, input: !1, field: void 0, hidden: !1 }, show: !0, noFormItem: !0 },
|
|
170
|
+
"model-value": f.value[n.field],
|
|
171
|
+
"onUpdate:modelValue": (v) => h(v, n.field)
|
|
172
|
+
}, null, 8, ["componentSchema", "model-value", "onUpdate:modelValue"])
|
|
173
|
+
])
|
|
174
|
+
], 2), [
|
|
175
|
+
[P, V(n)]
|
|
176
|
+
])
|
|
177
|
+
]))), 128))
|
|
178
|
+
]));
|
|
179
|
+
}
|
|
180
|
+
}), Ce = { class: "rounded epic-modal-action-main" }, Ve = { class: "epic-modal-left-panel h-full flex flex-col" }, ke = { class: "flex flex-1 h-0 flex-col" }, be = { class: "flex-1 h-0" }, Ee = { class: "epic-action-select h-30/100 flex flex-col" }, $e = { class: "flex-1 overflow-auto pr-8px" }, Ne = ["onClick"], Se = { class: "text-center pt-42px text-gray-400" }, we = { class: "epic-modal-right-panel" }, Oe = {
|
|
181
|
+
key: 1,
|
|
182
|
+
class: "text-center pt-42px text-gray-400"
|
|
183
|
+
}, Ae = /* @__PURE__ */ U({
|
|
184
|
+
__name: "EActionModal",
|
|
185
|
+
emits: ["add", "edit"],
|
|
186
|
+
setup(b, { expose: k, emit: m }) {
|
|
187
|
+
const x = w.getComponent("modal"), f = E(!0), V = L("pageSchema"), h = L("pageManager", {}), r = E(!1), u = E([]), n = E(null), v = m, c = S(() => {
|
|
188
|
+
var o;
|
|
189
|
+
return e.actionItem.type === "component" ? n.value ? (o = w.getComponentConfings()[n.value.type].config.action) == null ? void 0 : o.map((t) => ({
|
|
190
|
+
label: t.describe,
|
|
191
|
+
value: t.type
|
|
192
|
+
})) : [] : e.actionItem.type === "custom" ? Object.entries(h.funcs.value).filter(([t, I]) => typeof I == "function").map(([t]) => ({ label: t, value: t })) : e.actionItem.type === "public" ? Object.entries(w.publicMethods).map(([t]) => ({
|
|
193
|
+
label: t,
|
|
194
|
+
value: t
|
|
195
|
+
})) : [];
|
|
196
|
+
}), l = S(() => {
|
|
197
|
+
if (e.actionItem.type === "component" && n.value) {
|
|
198
|
+
const o = w.getComponentConfings()[n.value.type].config.action, t = o == null ? void 0 : o.find(
|
|
199
|
+
(I) => I.type === e.actionItem.methodName
|
|
200
|
+
);
|
|
201
|
+
if (t != null && t.argsConfigs) {
|
|
202
|
+
const I = t.argsConfigs.findIndex(
|
|
203
|
+
(y) => y.label === "设置数据"
|
|
204
|
+
);
|
|
205
|
+
I !== -1 && (t.argsConfigs[I] = {
|
|
206
|
+
...n.value,
|
|
207
|
+
label: "设置数据",
|
|
208
|
+
field: "0",
|
|
209
|
+
id: Y()
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return (t == null ? void 0 : t.argsConfigs) ?? [];
|
|
213
|
+
}
|
|
214
|
+
return [];
|
|
215
|
+
}), e = H({
|
|
216
|
+
actionItem: {
|
|
217
|
+
type: "custom",
|
|
218
|
+
methodName: "test",
|
|
219
|
+
componentId: null
|
|
220
|
+
},
|
|
221
|
+
cacheData: {}
|
|
222
|
+
});
|
|
223
|
+
function $() {
|
|
224
|
+
var o;
|
|
225
|
+
r.value = !0, f.value = !0, e.actionItem.type = "custom", e.actionItem.componentId = null, (o = c.value) != null && o.length && d(c.value[0].value);
|
|
226
|
+
}
|
|
227
|
+
function N(o) {
|
|
228
|
+
if (r.value = !0, f.value = !1, n.value = null, o.componentId) {
|
|
229
|
+
const t = q(V.schemas, o.componentId);
|
|
230
|
+
n.value = t, u.value = [o.componentId];
|
|
231
|
+
}
|
|
232
|
+
Q(() => {
|
|
233
|
+
e.actionItem.componentId = o.componentId, e.actionItem.methodName = o.methodName, e.actionItem.type = o.type, e.actionItem.args = o.args;
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function B() {
|
|
237
|
+
if (!e.actionItem.methodName) {
|
|
238
|
+
alert("请先选择动作方法");
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
v(f.value ? "add" : "edit", Z(z(e.actionItem))), M();
|
|
242
|
+
}
|
|
243
|
+
function M() {
|
|
244
|
+
r.value = !1, u.value = [], e.cacheData = {};
|
|
245
|
+
}
|
|
246
|
+
function s(o) {
|
|
247
|
+
var t;
|
|
248
|
+
e.actionItem.componentId = null, e.actionItem.type = o, n.value = null, e.actionItem.methodName = null, u.value = [], (t = c.value) != null && t.length && d(c.value[0].value);
|
|
249
|
+
}
|
|
250
|
+
function a(o) {
|
|
251
|
+
var t;
|
|
252
|
+
e.actionItem.args && (e.cacheData[e.actionItem.componentId + e.actionItem.methodName] = e.actionItem.args), e.actionItem.componentId = o.id, e.actionItem.type = "component", e.actionItem.methodName = null, n.value = o.componentSchema, (t = c.value) != null && t.length && d(c.value[0].value);
|
|
253
|
+
}
|
|
254
|
+
function d(o) {
|
|
255
|
+
e.actionItem.methodName = o, e.actionItem.args = e.cacheData[e.actionItem.componentId + e.actionItem.methodName];
|
|
256
|
+
}
|
|
257
|
+
return k({
|
|
258
|
+
handleOpen: $,
|
|
259
|
+
handleOpenEdit: N
|
|
260
|
+
}), (o, t) => (p(), K(_(x), {
|
|
261
|
+
modelValue: r.value,
|
|
262
|
+
"onUpdate:modelValue": t[4] || (t[4] = (I) => r.value = I),
|
|
263
|
+
class: "w-1200px",
|
|
264
|
+
width: "1200px",
|
|
265
|
+
onClose: M,
|
|
266
|
+
onOk: B,
|
|
267
|
+
title: "动作配置"
|
|
268
|
+
}, {
|
|
269
|
+
default: R(() => {
|
|
270
|
+
var I;
|
|
271
|
+
return [
|
|
272
|
+
i("div", Ce, [
|
|
273
|
+
i("div", Ve, [
|
|
274
|
+
i("div", ke, [
|
|
275
|
+
i("div", {
|
|
276
|
+
class: j(["fun-btn", { checked: e.actionItem.type === "custom" }]),
|
|
277
|
+
onClick: t[0] || (t[0] = (y) => s("custom"))
|
|
278
|
+
}, " 自定义函数 ", 2),
|
|
279
|
+
i("div", {
|
|
280
|
+
class: j(["fun-btn", { checked: e.actionItem.type === "public" }]),
|
|
281
|
+
onClick: t[1] || (t[1] = (y) => s("public"))
|
|
282
|
+
}, " 公共函数 ", 2),
|
|
283
|
+
t[5] || (t[5] = J(" 组件 ")),
|
|
284
|
+
i("div", be, [
|
|
285
|
+
C(_(te), {
|
|
286
|
+
selectedKeys: u.value,
|
|
287
|
+
"onUpdate:selectedKeys": t[2] || (t[2] = (y) => u.value = y),
|
|
288
|
+
options: _(V).schemas,
|
|
289
|
+
onNodeClick: a
|
|
290
|
+
}, null, 8, ["selectedKeys", "options"])
|
|
291
|
+
])
|
|
292
|
+
]),
|
|
293
|
+
i("div", Ee, [
|
|
294
|
+
t[6] || (t[6] = i("div", { class: "mb-2" }, "动作选择", -1)),
|
|
295
|
+
i("div", $e, [
|
|
296
|
+
(p(!0), g(A, null, T(c.value, (y) => (p(), g("div", {
|
|
297
|
+
class: j([{ checked: y.value === e.actionItem.methodName }, "epic-action-item"]),
|
|
298
|
+
onClick: (Ue) => d(y.value),
|
|
299
|
+
key: y.value
|
|
300
|
+
}, [
|
|
301
|
+
i("span", null, O(y.label), 1)
|
|
302
|
+
], 10, Ne))), 128)),
|
|
303
|
+
F(i("div", Se, " 当前组件暂无动作 ", 512), [
|
|
304
|
+
[P, !((I = c.value) != null && I.length)]
|
|
305
|
+
])
|
|
306
|
+
])
|
|
307
|
+
])
|
|
308
|
+
]),
|
|
309
|
+
i("div", we, [
|
|
310
|
+
e.actionItem.type === "custom" ? (p(), K(ge, { key: 0 })) : l.value.length === 0 ? (p(), g("div", Oe, " 暂无配置 ")) : (p(), K(Ie, {
|
|
311
|
+
key: 2,
|
|
312
|
+
modelValue: e.actionItem.args,
|
|
313
|
+
"onUpdate:modelValue": t[3] || (t[3] = (y) => e.actionItem.args = y),
|
|
314
|
+
actionArgsConfigs: l.value
|
|
315
|
+
}, null, 8, ["modelValue", "actionArgsConfigs"]))
|
|
316
|
+
])
|
|
317
|
+
])
|
|
318
|
+
];
|
|
319
|
+
}),
|
|
320
|
+
_: 1
|
|
321
|
+
}, 8, ["modelValue"]));
|
|
322
|
+
}
|
|
323
|
+
}), Te = /* @__PURE__ */ U({
|
|
324
|
+
__name: "index",
|
|
325
|
+
props: {
|
|
326
|
+
eventList: {
|
|
327
|
+
type: Array,
|
|
328
|
+
default: () => []
|
|
329
|
+
},
|
|
330
|
+
modelValue: {
|
|
331
|
+
type: Object
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
emits: ["update:modelValue"],
|
|
335
|
+
setup(b, { emit: k }) {
|
|
336
|
+
const m = w.getComponent("Collapse"), x = w.getComponent("CollapseItem"), f = E(null);
|
|
337
|
+
let V = 0;
|
|
338
|
+
const h = b, r = k, u = S({
|
|
339
|
+
get() {
|
|
340
|
+
return h.modelValue;
|
|
341
|
+
},
|
|
342
|
+
set(s) {
|
|
343
|
+
r("update:modelValue", s);
|
|
344
|
+
}
|
|
345
|
+
}), n = E([]), v = S(() => h.eventList.filter((s) => s.events.length)), c = S(() => h.eventList.map((s) => s.events).flat()), l = E({});
|
|
346
|
+
c.value.forEach((s) => {
|
|
347
|
+
l.value[s.type] = S({
|
|
348
|
+
get() {
|
|
349
|
+
var a;
|
|
350
|
+
return ((a = u.value) == null ? void 0 : a[s.type]) ?? [];
|
|
351
|
+
},
|
|
352
|
+
set(a) {
|
|
353
|
+
a && a.length ? u.value[s.type] = a.map((d) => z(d)) : delete u.value[s.type];
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}), W(() => v.value, (s) => {
|
|
357
|
+
s.length && (n.value = s.filter((a) => {
|
|
358
|
+
for (let d = 0; d < a.events.length; d++) {
|
|
359
|
+
const o = a.events[d].type;
|
|
360
|
+
if (l.value[o].length)
|
|
361
|
+
return !0;
|
|
362
|
+
}
|
|
363
|
+
return !1;
|
|
364
|
+
}).map((a) => a.title));
|
|
365
|
+
}, {
|
|
366
|
+
// 配置选项
|
|
367
|
+
immediate: !0
|
|
368
|
+
// 立即执行一次回调函数
|
|
369
|
+
});
|
|
370
|
+
let e = "";
|
|
371
|
+
function $(s) {
|
|
372
|
+
var a;
|
|
373
|
+
(a = f.value) == null || a.handleOpen(), e = s;
|
|
374
|
+
}
|
|
375
|
+
function N(s, a, d) {
|
|
376
|
+
var o;
|
|
377
|
+
(o = f.value) == null || o.handleOpenEdit(d), V = s, e = a;
|
|
378
|
+
}
|
|
379
|
+
function B(s) {
|
|
380
|
+
l.value[e][V] = s, u.value[e] = [...l.value[e] ?? []];
|
|
381
|
+
}
|
|
382
|
+
function M(s) {
|
|
383
|
+
if (!u.value) {
|
|
384
|
+
u.value = { [e]: [...l.value[e] ?? [], s] };
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
u.value[e] = [...l.value[e] ?? [], s];
|
|
388
|
+
}
|
|
389
|
+
return (s, a) => (p(), g(A, null, [
|
|
390
|
+
C(_(m), {
|
|
391
|
+
modelValue: n.value,
|
|
392
|
+
"onUpdate:modelValue": a[1] || (a[1] = (d) => n.value = d),
|
|
393
|
+
activeKey: n.value,
|
|
394
|
+
"onUpdate:activeKey": a[2] || (a[2] = (d) => n.value = d),
|
|
395
|
+
"expanded-names": n.value,
|
|
396
|
+
"onUpdate:expandedNames": a[3] || (a[3] = (d) => n.value = d)
|
|
397
|
+
}, {
|
|
398
|
+
default: R(() => [
|
|
399
|
+
(p(!0), g(A, null, T(v.value, (d) => (p(), K(_(x), {
|
|
400
|
+
key: d.title,
|
|
401
|
+
title: d.title,
|
|
402
|
+
header: d.title,
|
|
403
|
+
name: d.title
|
|
404
|
+
}, {
|
|
405
|
+
default: R(() => [
|
|
406
|
+
C(fe, {
|
|
407
|
+
modelValue: u.value,
|
|
408
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => u.value = o),
|
|
409
|
+
"item-events": d.events,
|
|
410
|
+
"all-events": c.value,
|
|
411
|
+
events: l.value,
|
|
412
|
+
onAdd: $,
|
|
413
|
+
onEdit: N
|
|
414
|
+
}, null, 8, ["modelValue", "item-events", "all-events", "events"])
|
|
415
|
+
]),
|
|
416
|
+
_: 2
|
|
417
|
+
}, 1032, ["title", "header", "name"]))), 128))
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
}, 8, ["modelValue", "activeKey", "expanded-names"]),
|
|
421
|
+
C(Ae, {
|
|
422
|
+
ref_key: "EActionModalRef",
|
|
423
|
+
ref: f,
|
|
424
|
+
onAdd: M,
|
|
425
|
+
onEdit: B
|
|
426
|
+
}, null, 512)
|
|
427
|
+
], 64));
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
export {
|
|
431
|
+
Te as default
|
|
432
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as X, inject as L, ref as C, computed as U, watch as G, openBlock as M, createElementBlock as W, Fragment as q, withDirectives as ue, createElementVNode as w, normalizeClass as ee, toDisplayString as be, unref as f, createVNode as z, createCommentVNode as le, vShow as de, createBlock as te, mergeProps as Se, withCtx as oe, useAttrs as we, provide as Ce, onUnmounted as ke, resolveComponent as Ne, createSlots as $e, renderList as ve, shallowRef as Re, watchEffect as Te, nextTick as pe, normalizeStyle as se, renderSlot as Be, onMounted as Oe } from "vue";
|
|
2
2
|
import { p as J } from "./axios-ITY6Uw7A.js";
|
|
3
|
-
import { u as fe, a as Me, f as me, g as Le, b as ae, _ as De, d as ce, c as He, e as Ve, h as We, i as ze, w as Ae, j as Ee } from "./index-
|
|
3
|
+
import { u as fe, a as Me, f as me, g as Le, b as ae, _ as De, d as ce, c as He, e as Ve, h as We, i as ze, w as Ae, j as Ee } from "./index-EQJa9EU2.js";
|
|
4
4
|
import { _ as ie } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
5
|
import { d as Ie } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
6
6
|
const Pe = { class: "epic-widget-action-item whitespace-nowrap" }, je = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as B, computed as P, inject as O, openBlock as r, createElementBlock as u, Fragment as c, renderList as k, createElementVNode as d, toDisplayString as U, createVNode as g, unref as y, createCommentVNode as $, ref as C, watchEffect as T, createBlock as I, withCtx as M, createTextVNode as N } from "vue";
|
|
2
2
|
import { p as R } from "./axios-ITY6Uw7A.js";
|
|
3
|
-
import { _ as j, n as F, m as q } from "./index-
|
|
3
|
+
import { _ as j, n as F, m as q } from "./index-EQJa9EU2.js";
|
|
4
4
|
import { _ as A } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
5
|
const D = [
|
|
6
6
|
{ label: "string", value: "string" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),_=require("./axios-CYGTE3lR.cjs"),v=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),_=require("./axios-CYGTE3lR.cjs"),v=require("./index-3RNTR6WH.cjs"),k=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),V={key:0,class:"epic-del-btn"},f=["onClick"],h=e.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(c,{emit:r}){const u=_.pluginManager.getComponent("number"),s=c,d=r,o=e.computed({get(){return s.modelValue},set(n){d("update:modelValue",n)}});function p(){const n={type:"col",children:[],componentProps:{span:12},id:v.getUUID()};o.value.push(n)}function i(n){o.value=o.value.filter((m,t)=>n!==t)}return(n,m)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"EColEditor-item"},[e.createVNode(e.unref(u),{value:t.componentProps.span,"onUpdate:value":l=>t.componentProps.span=l,modelValue:t.componentProps.span,"onUpdate:modelValue":l=>t.componentProps.span=l,style:{width:"100%"},min:1,max:24},null,8,["value","onUpdate:value","modelValue","onUpdate:modelValue"]),o.value.length>1?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("span",{onClick:l=>i(a)},[e.createVNode(e.unref(k._sfc_main),{name:"icon-shanchu1"})],8,f)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{class:"add-btn",onClick:p}," 添加 ")]))}});exports.default=h;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as D, inject as i, ref as S, computed as b, openBlock as m, createElementBlock as h, createElementVNode as n, createVNode as r, unref as a, withCtx as w, Fragment as E, renderList as M, normalizeClass as j, toDisplayString as V, mergeProps as z, withDirectives as A, vShow as F } from "vue";
|
|
2
2
|
import { d as G } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
3
3
|
import { p as d } from "./axios-ITY6Uw7A.js";
|
|
4
|
-
import { g as B, f as q } from "./index-
|
|
4
|
+
import { g as B, f as q } from "./index-EQJa9EU2.js";
|
|
5
5
|
import { _ as I } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
6
6
|
const H = { class: "epic-component-view flex flex-col" }, J = { class: "epic-search-box px-10px py-6px" }, K = { class: "flex flex-1 overflow-auto" }, O = { class: "epic-tabs-box" }, Q = ["title", "onClick"], R = { class: "h-full flex-1 overflow-auto py-2 box-border" }, W = ["onClick"], X = { class: "epic-componet-label flex-1 w-0 truncate" }, Y = { class: "text-center pt-42px text-gray-400" }, ae = /* @__PURE__ */ D({
|
|
7
7
|
__name: "index",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),p=require("monaco-editor"),b=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),p=require("monaco-editor"),b=require("./index-3RNTR6WH.cjs"),h=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function v(l){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const r in l)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(l,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>l[r]})}}return o.default=l,Object.freeze(o)}const i=v(p),_=a.defineComponent({__name:"index",props:{language:{default:"json"},readOnly:{type:Boolean,default:!1},valueFormat:{default:"string"},modelValue:{},config:{default:()=>({selectOnLineNumbers:!0,minimap:{enabled:!1}})},lineNumbers:{default:"on"},autoToggleTheme:{type:Boolean},theme:{default:"vs-light"}},emits:["update:modelValue"],setup(l,{expose:o,emit:r}){const t=l,s=r,c=a.ref(null);let e=null;const{isDark:f}=b.useTheme();function d(){f.value?i.editor.setTheme("vs-dark"):i.editor.setTheme("vs-light")}function m(u){e==null||e.setValue(u||"")}function g(u){const n=e==null?void 0:e.getPosition();n&&(e==null||e.executeEdits("",[{range:new i.Range(n.lineNumber,n.column,n.lineNumber,n.column),text:u}]),e==null||e.setPosition({...n,column:n.column+u.length}),e==null||e.focus())}return a.onMounted(()=>{e=i.editor.create(c.value,{value:u(),...t.config,language:t.language,readOnly:t.readOnly,lineNumbers:t.lineNumbers,theme:t.theme,scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:10,horizontalScrollbarSize:10},automaticLayout:!0}),t.autoToggleTheme&&a.watch(()=>f.value,()=>{a.nextTick(()=>d())},{immediate:!0});function u(){return t.valueFormat==="json"&&t.modelValue?JSON.stringify(t.modelValue,null,2):t.modelValue??""}e.onDidChangeModelContent(()=>{const n=e==null?void 0:e.getValue();if(t.valueFormat==="json"&&n){s("update:modelValue",JSON.parse(n));return}s("update:modelValue",n??"")})}),o({setValue:m,insertText:g}),(u,n)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"editContainer",ref:c,class:"epic-code-editor"},null,512))}}),y=h._export_sfc(_,[["__scopeId","data-v-3e2e893c"]]);exports.default=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./vuedraggable.umd-BqhSJIAi.cjs"),p=require("./axios-CYGTE3lR.cjs"),y=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),b=require("./index-3RNTR6WH.cjs"),B=require("element-plus"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U={key:0,class:"pl-4"},M=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(h,{emit:g}){const k=h,f=p.pluginManager.getComponent("input"),s=e.inject("tree",!1),m=g,c=b.useVModel(k,"modelValue",m);function _(o){const d={label:"",value:""};o.children?o.children.push(d):o.children=[d]}function r(o){c.value=c.value.filter((d,v)=>v!==o)}return(o,d)=>{const v=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(E.draggable),{modelValue:e.unref(c),"onUpdate:modelValue":d[0]||(d[0]=a=>e.isRef(c)?c.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:V})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(s)?"grid-cols-[16px_auto_auto_16px_16px]":"grid-cols-[16px_auto_auto_16px]","option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])},[e.createVNode(e.unref(y._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(f),{modelValue:a.label,"onUpdate:modelValue":u=>a.label=u,value:a.label,"onUpdate:value":u=>a.label=u,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(f),{modelValue:a.value,"onUpdate:modelValue":u=>a.value=u,value:a.value,"onUpdate:value":u=>a.value=u,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(s)?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:u=>_(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:u=>r(V)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(v,{modelValue:a.children,"onUpdate:modelValue":u=>a.children=u},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),O={class:""},I={class:"epic-tabs-box"},q=["title","onClick"],w={key:0},$={class:"py-4 my-2 text-center text-gray-400 bg-white"},D={key:1},j=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(h,{emit:g}){const k=p.pluginManager.getComponent("button"),f=p.pluginManager.getComponent("select"),s=e.ref([]),m=e.reactive({title:"静态"}),c=h,_=g;p.EventBus.on("updateSource",t=>{s.value=p.pluginManager.sourceData.map(l=>({...l,label:l.apiName,value:l.id})),V(o.value)}),e.onMounted(()=>{s.value=p.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id})),V(o.value)});const r=b.useVModel(c,"modelValue",_),o=b.useVModel(c,"dynamicId",_);function d(t,l,i){return t&&Object.prototype.toString.call(t)==="[object Array]"?t.map(n=>n.children&&n.children.length?{label:n[l],value:n[i]+"",children:d(n.children,l,i)}:{label:n[l],value:n[i]+""}):(B.ElMessage.info("请检查数据位置是否配置准确"),[])}e.watch(()=>o.value,async()=>{o.value?m.title="动态":m.title="静态"},{immediate:!0});const v=[{title:"静态"},{title:"动态"}];async function a(t){m.title=t.title,t.title==="静态"?(r.value=[],o.value=""):(r.value=[],s.value=p.pluginManager.sourceData.map(l=>({...l,label:l.apiName,value:l.id})))}async function V(t){const l=s.value.find(i=>i.id===t);if(l&&l.url){let i=await p.axios({method:(l==null?void 0:l.method)||"get",url:l.url,params:l!=null&&l.params?JSON.parse(l==null?void 0:l.params):{},data:l!=null&&l.data?JSON.parse(l==null?void 0:l.data):{},headers:l!=null&&l.header?JSON.parse(l==null?void 0:l.header):{}});if(l&&(l!=null&&l.dataPath)){const x=l.dataPath.split(".").reduce((N,C)=>N[C],i.data);r.value=d(x,l.dataKey,l.dataValue)}else r.value=d(i.data,l.dataKey,l.dataValue)}}c.modelValue,e.provide("tree",c.tree);function u(){const t=e.reactive({label:"",value:""});r.value.length?r.value=[...r.value,t]:r.value=[t]}return(t,l)=>{var i;return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,(n,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:m.title===n.title}]),key:x,title:n.title,onClick:N=>a(n)},e.toDisplayString(n.title),11,q)),64))]),m.title==="静态"?(e.openBlock(),e.createElementBlock("div",w,[e.withDirectives(e.createElementVNode("div",$,"暂无选项",512),[[e.vShow,!((i=e.unref(r))!=null&&i.length)]]),e.createVNode(M,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=n=>e.isRef(r)?r.value=n:null)},null,8,["modelValue"]),e.createVNode(e.unref(k),{onClick:u},{default:e.withCtx(()=>l[2]||(l[2]=[e.createTextVNode("添加选项")])),_:1})])):(e.openBlock(),e.createElementBlock("div",D,[l[3]||(l[3]=e.createElementVNode("span",{style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},"数据源",-1)),e.createVNode(e.unref(f),{modelValue:e.unref(o),"onUpdate:modelValue":l[1]||(l[1]=n=>e.isRef(o)?o.value=n:null),placeholder:"请选择数据源",clearable:"",options:s.value,onChange:V},null,8,["modelValue","options"])]))])])}}}),A=S._export_sfc(j,[["__scopeId","data-v-706ed161"]]);exports.default=A;
|