epic-designer-gold 0.0.26 → 0.0.27
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-DCzZRUVR.cjs → attributeView-DT3Pgu2H.cjs} +1 -1
- package/dist/{attributeView-kN43pWbg.js → attributeView-VgLT3_0E.js} +1 -1
- package/dist/core/components/designer/src/modules/outline/outline.vue.d.ts +2 -0
- package/dist/{index-DLBhfrNB.js → index-8jV4lvPb.js} +53 -48
- package/dist/index-B0S7YNtd.js +432 -0
- package/dist/{index-DY-o9yrn.cjs → index-B9zp9FUu.cjs} +1 -1
- package/dist/{index-jHZMacL0.cjs → index-BAbG8xrg.cjs} +1 -1
- package/dist/{index-BEe15yy8.js → index-BWCIdFn_.js} +1 -1
- package/dist/index-BcTELKKi.cjs +1 -0
- package/dist/{index-CbGpPxHm.cjs → index-BfoDWeC1.cjs} +1 -1
- package/dist/{index-DxN8RjEN.js → index-C2Nctb3q.js} +1 -1
- package/dist/{index-CaTuGyqu.js → index-CJaP0qUg.js} +1 -1
- package/dist/{index-Bjx88DqX.js → index-CQ_Xpn1C.js} +1 -1
- package/dist/{index-Dk4znWYz.js → index-Cn2i-Eyz.js} +1 -1
- package/dist/{index-CPUaKvrZ.cjs → index-D-mV-SAk.cjs} +1 -1
- package/dist/{index-Dzlg11UJ.cjs → index-DKe3uW6g.cjs} +1 -1
- package/dist/{index-XFxcgCZv.cjs → index-DkVKzqSQ.cjs} +1 -1
- package/dist/{index-Cj4ZeanZ.js → index-DqWY4lfL.js} +1 -1
- package/dist/{index-CEYb2hAA.cjs → index-R7VF52gK.cjs} +2 -2
- package/dist/{index-CIA7md14.cjs → index-Rhk7Lv_h.cjs} +1 -1
- package/dist/index-fwa-_XEi.js +4 -0
- 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-B66KWbOm.cjs} +1 -1
- package/dist/{styleView-CW51rl71.js → styleView-Cjdr_xer.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-CV6j5M_g.cjs +0 -1
- package/dist/index-CbNFt3RR.js +0 -4
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { defineComponent as w, inject as p, computed as B, h as T, openBlock as u, createElementBlock as K, normalizeClass as N, unref as i, createElementVNode as S, createVNode as k, createCommentVNode as I, createBlock as V, mergeProps as j, withCtx as D, Fragment as z, renderList as H, useSlots as M, provide as b, ref as P, withDirectives as q, vShow as F } from "vue";
|
|
2
|
+
import { _ as $ } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
3
|
+
import { p as E } from "./axios-ITY6Uw7A.js";
|
|
4
|
+
import { d as G } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
5
|
+
const U = /* @__PURE__ */ w({
|
|
6
|
+
name: "ETreeNodeItem",
|
|
7
|
+
__name: "treeNodeItem",
|
|
8
|
+
props: {
|
|
9
|
+
schema: {}
|
|
10
|
+
},
|
|
11
|
+
setup(_) {
|
|
12
|
+
const s = _, m = p("slots", {}), g = p("pageSchema", {}), l = p("expandedKeys"), x = p("treeProps"), f = p("selectedKeys"), d = p("handleSelect"), v = B(() => l.value.includes(s.schema.id ?? "")), y = w({
|
|
13
|
+
setup() {
|
|
14
|
+
return () => {
|
|
15
|
+
var t;
|
|
16
|
+
return T(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
class: {
|
|
20
|
+
text: !0,
|
|
21
|
+
hover: x.hoverKey === s.schema.id,
|
|
22
|
+
checked: f.value.includes(s.schema.id)
|
|
23
|
+
},
|
|
24
|
+
onClick: () => d(s.schema.id, s.schema)
|
|
25
|
+
},
|
|
26
|
+
((t = m["tree-node"]) == null ? void 0 : t.call(m, s)) ?? T(
|
|
27
|
+
"span",
|
|
28
|
+
{ class: "epic-text-padding flex" },
|
|
29
|
+
{
|
|
30
|
+
default: () => {
|
|
31
|
+
var e;
|
|
32
|
+
return [
|
|
33
|
+
T(
|
|
34
|
+
"span",
|
|
35
|
+
{ class: "max-w-full truncate" },
|
|
36
|
+
s.schema.label ?? ((e = E.getComponentConfingByType(s.schema.type)) == null ? void 0 : e.defaultSchema.label)
|
|
37
|
+
),
|
|
38
|
+
T(
|
|
39
|
+
"span",
|
|
40
|
+
{ class: "epic-node-type-text flex-1 w-0 truncate" },
|
|
41
|
+
s.schema.id
|
|
42
|
+
)
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
function c() {
|
|
52
|
+
const t = s.schema.id;
|
|
53
|
+
if (!t)
|
|
54
|
+
return !1;
|
|
55
|
+
l.value.includes(t) ? l.value = l.value.filter((e) => e !== t) : l.value.push(t);
|
|
56
|
+
}
|
|
57
|
+
function o() {
|
|
58
|
+
var e;
|
|
59
|
+
const t = s.schema.id;
|
|
60
|
+
if (!t || !((e = s.schema.children) != null && e.length))
|
|
61
|
+
return !1;
|
|
62
|
+
l.value.push(t);
|
|
63
|
+
}
|
|
64
|
+
return o(), (t, e) => {
|
|
65
|
+
var n, r, h, a, C;
|
|
66
|
+
return u(), K("li", {
|
|
67
|
+
class: N(["epic-tree-node", {
|
|
68
|
+
expanded: (n = s.schema.children) == null ? void 0 : n.length,
|
|
69
|
+
"level-1": s.schema.id === ((r = i(g).schemas[0]) == null ? void 0 : r.id)
|
|
70
|
+
}])
|
|
71
|
+
}, [
|
|
72
|
+
S("a", null, [
|
|
73
|
+
(h = s.schema.children) != null && h.length && s.schema.id !== ((a = i(g).schemas[0]) == null ? void 0 : a.id) ? (u(), K("span", {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: N(["icon-expanded", { expanded: v.value }]),
|
|
76
|
+
onClick: c
|
|
77
|
+
}, [
|
|
78
|
+
k(i($), { name: "icon--epic--caret-right-outlined" })
|
|
79
|
+
], 2)) : I("", !0),
|
|
80
|
+
k(i(y))
|
|
81
|
+
]),
|
|
82
|
+
(C = s.schema.children) != null && C.length ? (u(), V(A, {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: N(["epic-tree-sublist", { expanded: v.value }]),
|
|
85
|
+
schemas: s.schema.children,
|
|
86
|
+
"onUpdate:schemas": e[0] || (e[0] = (L) => s.schema.children = L),
|
|
87
|
+
parentSchema: s.schema
|
|
88
|
+
}, null, 8, ["class", "schemas", "parentSchema"])) : I("", !0)
|
|
89
|
+
], 2);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}), J = { key: 1 }, A = /* @__PURE__ */ w({
|
|
93
|
+
name: "ETreeNodes",
|
|
94
|
+
__name: "treeNodes",
|
|
95
|
+
props: {
|
|
96
|
+
schemas: {},
|
|
97
|
+
parentSchema: {}
|
|
98
|
+
},
|
|
99
|
+
emits: ["update:schemas"],
|
|
100
|
+
setup(_, { emit: s }) {
|
|
101
|
+
const m = p("designer"), g = p("pageSchema"), l = p("treeProps"), x = _, f = s, d = B({
|
|
102
|
+
get() {
|
|
103
|
+
return x.schemas;
|
|
104
|
+
},
|
|
105
|
+
set(c) {
|
|
106
|
+
f("update:schemas", c);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
function v(c) {
|
|
110
|
+
m.setDisableHover(!0), m.setCheckedNode(d.value[c]);
|
|
111
|
+
}
|
|
112
|
+
function y(c) {
|
|
113
|
+
var o, t, e;
|
|
114
|
+
return c.id === ((o = g.schemas[0]) == null ? void 0 : o.id) || (e = (t = E.getComponentConfingByType(c.type)) == null ? void 0 : t.editConstraints) != null && e.immovable ? "unmover-item" : "draggable-item";
|
|
115
|
+
}
|
|
116
|
+
return (c, o) => {
|
|
117
|
+
var t, e, n, r, h;
|
|
118
|
+
return (n = (e = i(E).getComponentConfingByType(((t = x.parentSchema) == null ? void 0 : t.type) || "")) == null ? void 0 : e.editConstraints) != null && n.childImmovable ? (u(), K("ul", J, [
|
|
119
|
+
(u(!0), K(z, null, H(d.value, (a) => (u(), V(U, {
|
|
120
|
+
key: a.id,
|
|
121
|
+
schema: a
|
|
122
|
+
}, null, 8, ["schema"]))), 128))
|
|
123
|
+
])) : (u(), V(i(G), j({
|
|
124
|
+
key: 0,
|
|
125
|
+
modelValue: d.value,
|
|
126
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => d.value = a),
|
|
127
|
+
"item-key": "id",
|
|
128
|
+
"component-data": {},
|
|
129
|
+
class: "epic-draggable-range"
|
|
130
|
+
}, {
|
|
131
|
+
animation: 200,
|
|
132
|
+
tag: "ul",
|
|
133
|
+
group: "tree-draggable",
|
|
134
|
+
ghostClass: "moveing",
|
|
135
|
+
draggable: ".draggable-item",
|
|
136
|
+
disabled: !i(l).draggable || ((r = d.value[0]) == null ? void 0 : r.id) === ((h = i(g).schemas[0]) == null ? void 0 : h.id)
|
|
137
|
+
}, {
|
|
138
|
+
onStart: o[1] || (o[1] = (a) => v(a.oldIndex))
|
|
139
|
+
}), {
|
|
140
|
+
item: D(({ element: a, index: C }) => [
|
|
141
|
+
(u(), V(U, {
|
|
142
|
+
class: N(y(a)),
|
|
143
|
+
key: a.id,
|
|
144
|
+
schema: a
|
|
145
|
+
}, null, 8, ["class", "schema"]))
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
}, 16, ["modelValue"]));
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}), O = { class: "epic-tree h-full flex flex-col" }, Q = { class: "epic-search-box px-10px py-6px" }, R = { class: "epic-tree-main flex-1 overflow-auto h-0" }, W = { class: "text-center pt-42px text-gray-400" }, te = /* @__PURE__ */ w({
|
|
152
|
+
name: "ETree",
|
|
153
|
+
__name: "tree",
|
|
154
|
+
props: {
|
|
155
|
+
options: {
|
|
156
|
+
type: Array,
|
|
157
|
+
default: () => []
|
|
158
|
+
},
|
|
159
|
+
hoverKey: {
|
|
160
|
+
type: String,
|
|
161
|
+
default: ""
|
|
162
|
+
},
|
|
163
|
+
selectedKeys: {
|
|
164
|
+
type: Array,
|
|
165
|
+
default: () => []
|
|
166
|
+
},
|
|
167
|
+
draggable: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: !1
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
emits: ["update:selectedKeys", "nodeClick"],
|
|
173
|
+
setup(_, { emit: s }) {
|
|
174
|
+
const m = M();
|
|
175
|
+
b("slots", m);
|
|
176
|
+
const g = E.getComponent("input"), l = P(""), x = P([]), f = _, d = s, v = B({
|
|
177
|
+
get() {
|
|
178
|
+
return f.selectedKeys;
|
|
179
|
+
},
|
|
180
|
+
set(t) {
|
|
181
|
+
d("update:selectedKeys", t);
|
|
182
|
+
}
|
|
183
|
+
}), y = B({
|
|
184
|
+
get() {
|
|
185
|
+
return c(f.options, l.value);
|
|
186
|
+
},
|
|
187
|
+
set(t) {
|
|
188
|
+
console.log(t);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
function c(t, e) {
|
|
192
|
+
const n = [];
|
|
193
|
+
return t.forEach((r) => {
|
|
194
|
+
var h;
|
|
195
|
+
if ((h = r.label) != null && h.includes(e))
|
|
196
|
+
n.push(r);
|
|
197
|
+
else if (r.children) {
|
|
198
|
+
const a = c(r.children, e);
|
|
199
|
+
if (a.length > 0) {
|
|
200
|
+
const C = { ...r };
|
|
201
|
+
C.children = a, n.push(C);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}), n;
|
|
205
|
+
}
|
|
206
|
+
function o(t, e) {
|
|
207
|
+
v.value = [t], d("nodeClick", { id: t, componentSchema: e });
|
|
208
|
+
}
|
|
209
|
+
return b("expandedKeys", x), b("selectedKeys", v), b("treeProps", f), b("handleSelect", o), (t, e) => (u(), K("div", O, [
|
|
210
|
+
S("div", Q, [
|
|
211
|
+
k(i(g), {
|
|
212
|
+
placeholder: "搜索节点",
|
|
213
|
+
clearable: "",
|
|
214
|
+
allowClear: "",
|
|
215
|
+
modelValue: l.value,
|
|
216
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => l.value = n),
|
|
217
|
+
value: l.value,
|
|
218
|
+
"onUpdate:value": e[1] || (e[1] = (n) => l.value = n)
|
|
219
|
+
}, {
|
|
220
|
+
prefix: D(() => [
|
|
221
|
+
k(i($), { name: "icon--epic--search-rounded" })
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["modelValue", "value"])
|
|
225
|
+
]),
|
|
226
|
+
S("div", R, [
|
|
227
|
+
S("ul", null, [
|
|
228
|
+
k(A, {
|
|
229
|
+
schemas: y.value,
|
|
230
|
+
"onUpdate:schemas": e[2] || (e[2] = (n) => y.value = n)
|
|
231
|
+
}, null, 8, ["schemas"])
|
|
232
|
+
]),
|
|
233
|
+
q(S("div", W, "没有查询到的数据", 512), [
|
|
234
|
+
[F, !y.value.length]
|
|
235
|
+
])
|
|
236
|
+
])
|
|
237
|
+
]));
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
export {
|
|
241
|
+
te as _
|
|
242
|
+
};
|