epic-designer-gold 0.0.21 → 0.0.23

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 (45) hide show
  1. package/dist/{attributeView-CP3hg3UK.cjs → attributeView-8NOrqlS1.cjs} +1 -1
  2. package/dist/{attributeView-Bs2qSxx7.js → attributeView-BHuhrlM5.js} +8 -8
  3. package/dist/core/components/designer/src/designer.vue.d.ts +0 -1
  4. package/dist/{index-CTNgPpDR.js → index-8kRf0Tni.js} +1 -1
  5. package/dist/index-9bx0Eg0-.cjs +1 -0
  6. package/dist/index-BHkCN6Gc.cjs +1 -0
  7. package/dist/{index-DFBtzyag.js → index-BcAPkz_3.js} +1 -1
  8. package/dist/{index-CzAJ8qnW.js → index-BcRau_iO.js} +74 -74
  9. package/dist/{index-CsimLiTB.cjs → index-BfV0-xlv.cjs} +1 -1
  10. package/dist/index-BfWxzrQ0.js +675 -0
  11. package/dist/{index-Ds85DNV7.cjs → index-BqP4q7kG.cjs} +1 -1
  12. package/dist/index-CI-wApqh.cjs +10 -0
  13. package/dist/{index-wltb2XZn.js → index-CNRYixnW.js} +493 -511
  14. package/dist/{index-CzU0fSLN.cjs → index-CtqoFTv7.cjs} +1 -1
  15. package/dist/{index-IoerwjxE.cjs → index-DAQnePGW.cjs} +1 -1
  16. package/dist/{index-C0kcltz_.js → index-DLXCQOpE.js} +1 -1
  17. package/dist/index-DMO6svHk.js +4 -0
  18. package/dist/{index-BOOu9IOW.cjs → index-DPQrSg6e.cjs} +1 -1
  19. package/dist/index-DzGESDFj.cjs +1 -0
  20. package/dist/{index-npC6NXqj.js → index-R1sGzPDh.js} +1 -1
  21. package/dist/index-zFyk0fsI.js +665 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/{styleView-PLyaM974.cjs → styleView-DevMh4gy.cjs} +1 -1
  26. package/dist/{styleView-CQ9CoWd1.js → styleView-Dq9MseMf.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/core/components/designer/src/modules/attributeView/eventView.vue.d.ts +0 -2
  29. package/dist/core/components/designer/src/modules/outline/outline.vue.d.ts +0 -2
  30. package/dist/core/components/designer/src/modules/sourceCode/index.vue.d.ts +0 -2
  31. package/dist/eventView-DqwO0f-q.cjs +0 -1
  32. package/dist/eventView-rsxe7yze.js +0 -64
  33. package/dist/index-93_j-O1m.cjs +0 -1
  34. package/dist/index-BQ_fSZ8_.cjs +0 -1
  35. package/dist/index-BbHxNc1N.cjs +0 -10
  36. package/dist/index-C6fguDNu.cjs +0 -1
  37. package/dist/index-CIgVQyhq.js +0 -432
  38. package/dist/index-CWzPGA7K.js +0 -41
  39. package/dist/index-DxLHfmGz.js +0 -4
  40. package/dist/index-DxUk7mzH.cjs +0 -1
  41. package/dist/index-Rtzc87-b.js +0 -682
  42. package/dist/outline-CJSEUbgc.cjs +0 -1
  43. package/dist/outline-yy4pIEi3.js +0 -54
  44. package/dist/tree.vue_vue_type_script_setup_true_lang-RWTXU6lO.cjs +0 -1
  45. package/dist/tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js +0 -242
@@ -1,54 +0,0 @@
1
- import { defineComponent as g, inject as l, computed as k, openBlock as p, createElementBlock as v, createVNode as N, unref as e, withCtx as x, createElementVNode as i, normalizeClass as C, withModifiers as m, createBlock as M, createCommentVNode as S, createTextVNode as b, toDisplayString as u } from "vue";
2
- import { _ as w } from "./tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js";
3
- import { p as B } from "./axios-ITY6Uw7A.js";
4
- import { _ as V } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
5
- const $ = { class: "epic-outline" }, E = ["onMouseenter"], H = { class: "max-w-full truncate" }, P = { class: "epic-node-type-text flex-1 w-0 truncate" }, q = /* @__PURE__ */ g({
6
- __name: "outline",
7
- setup(T) {
8
- const o = l("designer"), _ = l("pageSchema"), f = k(() => {
9
- var s;
10
- const n = (s = o.state.checkedNode) == null ? void 0 : s.id;
11
- return n ? [n] : [];
12
- });
13
- function h(n) {
14
- o.setCheckedNode(n.componentSchema);
15
- }
16
- return (n, s) => {
17
- var d;
18
- return p(), v("div", $, [
19
- N(e(w), {
20
- options: e(_).schemas,
21
- draggable: "",
22
- "selected-keys": f.value,
23
- "hover-key": (d = e(o).state.hoverNode) == null ? void 0 : d.id,
24
- onNodeClick: h
25
- }, {
26
- "tree-node": x(({ schema: t }) => {
27
- var c, a, r;
28
- return [
29
- i("div", {
30
- class: C(["epic-text-padding flex", { hidden: (c = t.componentProps) == null ? void 0 : c.hidden }]),
31
- onMouseenter: m((y) => e(o).setHoverNode(t), ["stop"]),
32
- onMouseleave: s[0] || (s[0] = m((y) => e(o).setHoverNode(null), ["stop"]))
33
- }, [
34
- i("span", H, [
35
- (a = t.componentProps) != null && a.hidden ? (p(), M(e(V), {
36
- key: 0,
37
- name: "icon--epic--visibility-off-outline-rounded",
38
- class: "translate-y-2px"
39
- })) : S("", !0),
40
- b(" " + u(t.label ?? ((r = e(B).getComponentConfingByType(t.type)) == null ? void 0 : r.defaultSchema.label)), 1)
41
- ]),
42
- i("span", P, u(t.id), 1)
43
- ], 42, E)
44
- ];
45
- }),
46
- _: 1
47
- }, 8, ["options", "selected-keys", "hover-key"])
48
- ]);
49
- };
50
- }
51
- });
52
- export {
53
- q as default
54
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),C=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./axios-CYGTE3lR.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;
@@ -1,242 +0,0 @@
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
- };