epic-designer-gold 1.0.2 → 1.0.4
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-CPrGnVQ8.js +106 -0
- package/dist/attributeView-DEg9mFCt.cjs +1 -0
- package/dist/axios-BAhOY32t.cjs +6 -0
- package/dist/{js.cookie-oHpRFPCO.js → axios-BFVeUxau.js} +942 -737
- package/dist/col-BNNn9Yx8.cjs +1 -0
- package/dist/{col-Dy6oYMf5.js → col-u5YiB-UK.js} +8 -8
- package/dist/index-B8V7odtp.cjs +1 -0
- package/dist/index-BEXliJtJ.cjs +1 -0
- package/dist/index-BN_dXDiO.cjs +1 -0
- package/dist/index-BPRzjSrH.cjs +10 -0
- package/dist/index-BPmq8lmK.js +72 -0
- package/dist/index-BY9j66Gp.js +4 -0
- package/dist/{index-DNeYX6HK.js → index-BiXYEiWV.js} +1 -1
- package/dist/index-BoVrWUpL.js +271 -0
- package/dist/{index-DLMH0OSJ.js → index-BstMY1Nn.js} +1 -1
- package/dist/index-Bsv8EECz.js +71 -0
- package/dist/index-C2Sx6r6b.cjs +1 -0
- package/dist/index-C5-ZZLug.cjs +1 -0
- package/dist/index-C6C5D9M8.js +602 -0
- package/dist/index-CIwV58Ko.js +1359 -0
- package/dist/index-CgisEnmm.cjs +1 -0
- package/dist/index-CtkdvWFN.cjs +1 -0
- package/dist/{index-DkyxbMHi.js → index-Cwgv4MbW.js} +24 -24
- package/dist/{index-CYDtBJTI.cjs → index-D3Uft3bJ.cjs} +1 -1
- package/dist/{index-BKDRMrcc.js → index-D7z34DMU.js} +28 -47
- package/dist/index-DAhVvQNH.cjs +1 -0
- package/dist/index-DO5DuUPL.js +581 -0
- package/dist/index-DddOVmF6.cjs +1 -0
- package/dist/index-DdsHIglg.js +104 -0
- package/dist/index-Dru9G2MF.js +195 -0
- package/dist/index-KGGnmoAO.cjs +1 -0
- package/dist/{index-XUQ1VGQg.js → index-Sin3ac_7.js} +1 -1
- package/dist/{index-DJxuHxdI.js → index-dUOJH8fj.js} +24 -24
- package/dist/index-dcjty1Ho.cjs +1 -0
- package/dist/{index-Dyo12Kua.cjs → index-g1W7IHK_.cjs} +1 -1
- package/dist/index-ykB9CsYG.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -35
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/lang/en-US.d.ts +246 -0
- package/dist/locale/lang/zh-cn.d.ts +246 -0
- package/dist/modal-BLOgN3us.cjs +1 -0
- package/dist/modal-UFu4bD6x.js +57 -0
- package/dist/{outline-CNayBNNC.js → outline-CG-aHThT.js} +2 -2
- package/dist/outline-Coy4TGIa.cjs +1 -0
- package/dist/row-BWnbt6dh.cjs +1 -0
- package/dist/{row-qOviQw5w.js → row-DAy14ve9.js} +4 -4
- package/dist/sign-BlMhTkWG.cjs +1 -0
- package/dist/sign-C0z0Ygs4.js +219 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-BLVqzqPV.js → styleView-CkbdwQhA.js} +34 -33
- package/dist/styleView-D0W-N4vW.cjs +1 -0
- package/dist/tree.vue_vue_type_script_setup_true_lang-KKt_Qgqv.cjs +1 -0
- package/dist/{tree.vue_vue_type_script_setup_true_lang-BntCm43E.js → tree.vue_vue_type_script_setup_true_lang-RWHCYpkY.js} +1 -1
- package/dist/ui/antd/date-picker/datePicker.d.ts +2 -2
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +553 -542
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +1 -1
- package/dist/uploadFile-Bh5GyGFd.js +77 -0
- package/dist/uploadFile-CmKFRZMw.cjs +1 -0
- package/dist/{uploadImage-742IA7ei.js → uploadImage-CbVsUivh.js} +34 -33
- package/dist/uploadImage-CcMA6CyX.cjs +1 -0
- package/dist/uploadImage-DENhzttU.cjs +1 -0
- package/dist/{uploadImage-CnNnAISs.js → uploadImage-qHq6JX83.js} +17 -20
- package/package.json +1 -1
- package/dist/attributeView-B-IswSw7.js +0 -105
- package/dist/attributeView-CQBVIMGW.cjs +0 -1
- package/dist/col-RWuL5Zuz.cjs +0 -1
- package/dist/index-0GtpyUBx.js +0 -64
- package/dist/index-B4ido7VJ.cjs +0 -1
- package/dist/index-BGvqo4s7.js +0 -104
- package/dist/index-BMtRXkSh.cjs +0 -1
- package/dist/index-BSLudrcT.cjs +0 -1
- package/dist/index-BXO8Zj1H.cjs +0 -1
- package/dist/index-B_9x_cPH.js +0 -1633
- package/dist/index-B_TFfRwe.js +0 -194
- package/dist/index-C3_E7xcD.js +0 -270
- package/dist/index-C3a1hfUC.cjs +0 -10
- package/dist/index-CucdgcqX.cjs +0 -1
- package/dist/index-CvEzOhT_.cjs +0 -1
- package/dist/index-DEPx91yu.cjs +0 -1
- package/dist/index-DKVv0PbJ.js +0 -56
- package/dist/index-DSzJgAzW.cjs +0 -1
- package/dist/index-Dz1OM1dD.cjs +0 -1
- package/dist/index-HNPgHrkl.cjs +0 -1
- package/dist/index-JhxJizMR.js +0 -601
- package/dist/index-aBofZ4Mk.js +0 -4
- package/dist/index-sKJ91s0r.cjs +0 -1
- package/dist/js.cookie-BH1G_HRi.cjs +0 -6
- package/dist/modal-BPJM1Muh.js +0 -59
- package/dist/modal-_fid8E1T.cjs +0 -1
- package/dist/outline-6Qt3qlWm.cjs +0 -1
- package/dist/row-Bm8OjIsU.cjs +0 -1
- package/dist/sign--js815Se.cjs +0 -1
- package/dist/sign-CO47QOTw.js +0 -218
- package/dist/styleView-C1zTBeyd.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs +0 -1
- package/dist/uploadFile-CYDDVa_x.js +0 -76
- package/dist/uploadFile-eWBMdZ9d.cjs +0 -1
- package/dist/uploadImage-BQhv5ymq.cjs +0 -1
- package/dist/uploadImage-BXcN2FA_.cjs +0 -1
package/dist/index-DKVv0PbJ.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, ref as i, watch as n, openBlock as s, createElementBlock as v, createElementVNode as c, createVNode as f, unref as V } from "vue";
|
|
2
|
-
import { p as g } from "./js.cookie-oHpRFPCO.js";
|
|
3
|
-
import { k as y } from "./index-B_9x_cPH.js";
|
|
4
|
-
const w = /* @__PURE__ */ d({
|
|
5
|
-
__name: "index",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: {
|
|
8
|
-
type: Array,
|
|
9
|
-
default: () => []
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
emits: ["update:modelValue"],
|
|
13
|
-
setup(u, { emit: r }) {
|
|
14
|
-
const m = g.getComponent("number"), e = i(0), o = u, p = r;
|
|
15
|
-
return n(
|
|
16
|
-
() => o.modelValue,
|
|
17
|
-
() => {
|
|
18
|
-
e.value = o.modelValue.length;
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
immediate: !0
|
|
22
|
-
}
|
|
23
|
-
), n(
|
|
24
|
-
() => e.value,
|
|
25
|
-
(a) => {
|
|
26
|
-
let l = new Array(a).fill({}).map((t) => ({
|
|
27
|
-
type: "col",
|
|
28
|
-
children: [],
|
|
29
|
-
componentProps: {
|
|
30
|
-
span: 24 / a
|
|
31
|
-
},
|
|
32
|
-
id: y()
|
|
33
|
-
}));
|
|
34
|
-
p("update:modelValue", l);
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
// immediate: true,
|
|
38
|
-
}
|
|
39
|
-
), (a, l) => (s(), v("div", null, [
|
|
40
|
-
c("div", null, [
|
|
41
|
-
f(V(m), {
|
|
42
|
-
value: e.value,
|
|
43
|
-
"onUpdate:value": l[0] || (l[0] = (t) => e.value = t),
|
|
44
|
-
modelValue: e.value,
|
|
45
|
-
"onUpdate:modelValue": l[1] || (l[1] = (t) => e.value = t),
|
|
46
|
-
style: { width: "100%" },
|
|
47
|
-
min: 1,
|
|
48
|
-
max: 24
|
|
49
|
-
}, null, 8, ["value", "modelValue"])
|
|
50
|
-
])
|
|
51
|
-
]));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
export {
|
|
55
|
-
w as default
|
|
56
|
-
};
|
package/dist/index-DSzJgAzW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),d=require("./js.cookie-BH1G_HRi.cjs"),g=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-C3a1hfUC.cjs");require("element-plus");const y=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={key:0,class:"pl-4"},N=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(V,{emit:_}){const f=V,p=d.pluginManager.getComponent("input"),c=e.inject("tree",!1),s=_,u=k.useVModel(f,"modelValue",s);function v(n){const r={label:"",value:""};n.children?n.children.push(r):n.children=[r]}function o(n){u.value=u.value.filter((r,m)=>m!==n)}return(n,r)=>{const m=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(b.draggable),{modelValue:e.unref(u),"onUpdate:modelValue":r[0]||(r[0]=l=>e.isRef(u)?u.value=l:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:l,index:a})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(c)?"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(g._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(p),{modelValue:l.label,"onUpdate:modelValue":t=>l.label=t,value:l.label,"onUpdate:value":t=>l.label=t,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(p),{modelValue:l.value,"onUpdate:modelValue":t=>l.value=t,value:l.value,"onUpdate:value":t=>l.value=t,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(c)?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:t=>v(l)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(g._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:t=>o(a)},null,8,["onClick"])],2),l.children?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(m,{modelValue:l.children,"onUpdate:modelValue":t=>l.children=t},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),E={class:""},B={class:"epic-tabs-box"},U=["title","onClick"],M={key:0},I={class:"py-4 my-2 text-center text-gray-400 bg-white"},S={key:1},q=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(V,{emit:_}){const f=d.pluginManager.getComponent("button"),p=d.pluginManager.getComponent("select"),c=e.ref([]),s=e.reactive({title:"静态"}),u=V,v=_;d.EventBus.on("deleteSourceData",a=>{n.value===a&&(n.value="",o.value=[])}),d.EventBus.on("updateSource",a=>{c.value=d.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id}))}),e.onMounted(()=>{c.value=d.pluginManager.sourceData.map(a=>({...a,label:a.apiName,value:a.id}))});const o=k.useVModel(u,"modelValue",v),n=k.useVModel(u,"dynamicId",v);e.watch(()=>n.value,async()=>{n.value?s.title="动态":s.title="静态"},{immediate:!0});const r=[{title:"静态"},{title:"动态"}];async function m(a){s.title=a.title,a.title==="静态"?(o.value=[],n.value=""):(o.value=[],c.value=d.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id})))}u.modelValue,e.provide("tree",u.tree);function l(){const a=e.reactive({label:"",value:""});o.value.length?o.value=[...o.value,a]:o.value=[a]}return(a,t)=>{var h;return e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("div",null,[e.createElementVNode("div",B,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,(i,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:s.title===i.title}]),key:x,title:i.title,onClick:$=>m(i)},e.toDisplayString(i.title),11,U)),64))]),s.title==="静态"?(e.openBlock(),e.createElementBlock("div",M,[e.withDirectives(e.createElementVNode("div",I,"暂无选项",512),[[e.vShow,!((h=e.unref(o))!=null&&h.length)]]),e.createVNode(N,{modelValue:e.unref(o),"onUpdate:modelValue":t[0]||(t[0]=i=>e.isRef(o)?o.value=i:null)},null,8,["modelValue"]),e.createVNode(e.unref(f),{onClick:l},{default:e.withCtx(()=>t[2]||(t[2]=[e.createTextVNode("添加选项")])),_:1})])):(e.openBlock(),e.createElementBlock("div",S,[t[3]||(t[3]=e.createElementVNode("span",{style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},"数据源",-1)),e.createVNode(e.unref(p),{modelValue:e.unref(n),"onUpdate:modelValue":t[1]||(t[1]=i=>e.isRef(n)?n.value=i:null),placeholder:"请选择数据源",clearable:"",options:c.value},null,8,["modelValue","options"])]))])])}}}),O=y._export_sfc(q,[["__scopeId","data-v-21fb2159"]]);exports.default=O;
|
package/dist/index-Dz1OM1dD.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./index-C3a1hfUC.cjs"),x=require("./js.cookie-BH1G_HRi.cjs"),b=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),S=require("./vuedraggable.umd-BqhSJIAi.cjs"),$=require("./tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs"),w={class:"epic-event-info"},M=["title"],O={class:"epic-event-btn text-lg flex items-center text-$epic-text-secondary"},A={class:"epic-action-editor-main"},U={class:"epic-editor-item rounded"},D={class:"w-36px flex items-center text-lg"},j={class:"flex-1"},L={key:0},K={key:1},R={key:2},T={class:"epic-action-box text-lg text-$epic-text-medium"},q=["onClick"],F=["onClick"],z=e.defineComponent({__name:"EActionEditorItem",props:{itemEvents:{type:Array,default:()=>[]},allEvents:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>[]},events:{type:Object,default:()=>({})}},emits:["add","edit","update:modelValue"],setup(E,{emit:V}){const m=E,h=V,v=e.inject("pageSchema");function y(p){h("add",p)}function f(p){return C.findSchemaById(v.schemas,p).label}function u(p,i){var t;const a=o(i);a[i]=m.events[i].filter((k,N)=>p!==N),(t=a[i])!=null&&t.length||delete a[i],h("update:modelValue",a)}function r(p,i,a){h("edit",p,i,a)}function o(p){const i={};return m.allEvents.forEach(a=>{if(!m.events[a.type].length||a.type===p)return!1;i[a.type]=m.events[a.type]}),i}return(p,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.itemEvents,a=>(e.openBlock(),e.createElementBlock("div",{key:a.type,class:"epic-event-item"},[e.createElementVNode("div",w,[e.createElementVNode("div",{class:"epic-event-label",title:a.describe},e.toDisplayString(a.describe),9,M),e.createElementVNode("div",O,[e.createVNode(e.unref(b._sfc_main),{name:"icon--epic--add-rounded",onClick:t=>y(a.type)},null,8,["onClick"])])]),e.createElementVNode("div",A,[e.createVNode(e.unref(S.draggable),{modelValue:m.events[a.type],"onUpdate:modelValue":t=>m.events[a.type]=t,"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:t,index:k})=>[e.createElementVNode("div",U,[e.createElementVNode("div",D,[e.createVNode(e.unref(b._sfc_main),{class:"mr-2 text-lg cursor-move handle text-$epic-text-medium",name:"icon--epic--drag"})]),e.createElementVNode("div",j,[t.type==="component"?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(f(t.componentId)),1)):t.type==="custom"?(e.openBlock(),e.createElementBlock("div",K," 自定义函数 ")):t.type==="public"?(e.openBlock(),e.createElementBlock("div",R," 公共函数 ")):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.methodName),1)]),e.createElementVNode("div",T,[e.createElementVNode("div",{class:"epic-edit-btn",onClick:N=>r(k,a.type,t)},[e.createVNode(e.unref(b._sfc_main),{name:"icon--epic--page-info-outline-rounded"})],8,q),e.createElementVNode("div",{class:"epic-del-btn",onClick:N=>u(k,a.type)},[e.createVNode(e.unref(b._sfc_main),{name:"icon--epic--delete-outline-rounded"})],8,F)])])]),_:2},1032,["modelValue","onUpdate:modelValue"])])]))),128))}}),J={class:"h-full flex flex-col"},P=e.defineComponent({__name:"EScriptEdit",setup(E){const V=x.pluginManager.getComponent("monacoEditor"),m={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1}},h=e.ref(null),v=e.inject("pageSchema");return(y,f)=>(e.openBlock(),e.createElementBlock("div",J,[f[1]||(f[1]=e.createElementVNode("div",{class:"pb-2"}," 自定义函数编辑 ",-1)),e.createVNode(e.unref(V),{ref_key:"monacoEditorRef",ref:h,autoToggleTheme:"",modelValue:e.unref(v).script,"onUpdate:modelValue":f[0]||(f[0]=u=>e.unref(v).script=u),class:"epic-editor flex-1",config:m,language:"javascript"},null,8,["modelValue"])]))}}),G={class:"epic-attribute-view"},H=["title"],Q={class:"epic-attr-input"},W=e.defineComponent({__name:"EArgsEditor",props:{modelValue:{},actionArgsConfigs:{}},emits:["update:modelValue"],setup(E,{emit:V}){const m=E,h=V,v=e.computed(()=>m.modelValue?JSON.parse(m.modelValue):[]);function y(u){var r;return typeof u.show=="boolean"?u.show:typeof u.show=="function"?(r=u.show)==null?void 0:r.call(u,{values:v.value}):!0}function f(u,r){const o=[...JSON.parse(m.modelValue??"[]")];o[r]=u,h("update:modelValue",JSON.stringify(o))}return(u,r)=>(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.actionArgsConfigs,o=>(e.openBlock(),e.createElementBlock("div",{key:o.field+o.type},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["epic-attr-item",o.layout])},[e.createElementVNode("div",{class:"epic-attr-label",title:o.label},e.toDisplayString(o.label),9,H),e.createElementVNode("div",Q,[e.createVNode(e.unref(C._sfc_main),{componentSchema:{...o,componentProps:{...o.componentProps,input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},"model-value":v.value[o.field],"onUpdate:modelValue":p=>f(p,o.field)},null,8,["componentSchema","model-value","onUpdate:modelValue"])])],2),[[e.vShow,y(o)]])]))),128))]))}}),X={class:"rounded epic-modal-action-main"},Y={class:"epic-modal-left-panel h-full flex flex-col"},Z={class:"flex flex-1 h-0 flex-col"},ee={class:"flex-1 h-0"},te={class:"epic-action-select h-30/100 flex flex-col"},ne={class:"flex-1 overflow-auto pr-8px"},oe=["onClick"],le={class:"text-center pt-42px text-gray-400"},ae={class:"epic-modal-right-panel"},ce={key:1,class:"text-center pt-42px text-gray-400"},se=e.defineComponent({__name:"EActionModal",emits:["add","edit"],setup(E,{expose:V,emit:m}){const h=x.pluginManager.getComponent("modal"),v=e.ref(!0),y=e.inject("pageSchema"),f=e.inject("pageManager",{}),u=e.ref(!1),r=e.ref([]),o=e.ref(null),p=m,i=e.computed(()=>{var l;return t.actionItem.type==="component"?o.value?(l=x.pluginManager.getComponentConfings()[o.value.type].config.action)==null?void 0:l.map(n=>({label:n.describe,value:n.type})):[]:t.actionItem.type==="custom"?Object.entries(f.funcs.value).filter(([n,_])=>typeof _=="function").map(([n])=>({label:n,value:n})):t.actionItem.type==="public"?Object.entries(x.pluginManager.publicMethods).map(([n])=>({label:n,value:n})):[]}),a=e.computed(()=>{if(t.actionItem.type==="component"&&o.value){const l=x.pluginManager.getComponentConfings()[o.value.type].config.action,n=l==null?void 0:l.find(_=>_.type===t.actionItem.methodName);if(n!=null&&n.argsConfigs){const _=n.argsConfigs.findIndex(g=>g.label==="设置数据");_!==-1&&(n.argsConfigs[_]={...o.value,label:"设置数据",field:"0",id:C.getUUID()})}return(n==null?void 0:n.argsConfigs)??[]}return[]}),t=e.reactive({actionItem:{type:"custom",methodName:"test",componentId:null},cacheData:{}});function k(){var l;u.value=!0,v.value=!0,t.actionItem.type="custom",t.actionItem.componentId=null,(l=i.value)!=null&&l.length&&d(i.value[0].value)}function N(l){if(u.value=!0,v.value=!1,o.value=null,l.componentId){const n=C.findSchemaById(y.schemas,l.componentId);o.value=n,r.value=[l.componentId]}e.nextTick(()=>{t.actionItem.componentId=l.componentId,t.actionItem.methodName=l.methodName,t.actionItem.type=l.type,t.actionItem.args=l.args})}function B(){if(!t.actionItem.methodName){alert("请先选择动作方法");return}p(v.value?"add":"edit",C.deepClone(e.toRaw(t.actionItem))),I()}function I(){u.value=!1,r.value=[],t.cacheData={}}function s(l){var n;t.actionItem.componentId=null,t.actionItem.type=l,o.value=null,t.actionItem.methodName=null,r.value=[],(n=i.value)!=null&&n.length&&d(i.value[0].value)}function c(l){var n;t.actionItem.args&&(t.cacheData[t.actionItem.componentId+t.actionItem.methodName]=t.actionItem.args),t.actionItem.componentId=l.id,t.actionItem.type="component",t.actionItem.methodName=null,o.value=l.componentSchema,(n=i.value)!=null&&n.length&&d(i.value[0].value)}function d(l){t.actionItem.methodName=l,t.actionItem.args=t.cacheData[t.actionItem.componentId+t.actionItem.methodName]}return V({handleOpen:k,handleOpenEdit:N}),(l,n)=>(e.openBlock(),e.createBlock(e.unref(h),{modelValue:u.value,"onUpdate:modelValue":n[4]||(n[4]=_=>u.value=_),class:"w-1200px",width:"1200px",onClose:I,onOk:B,title:"动作配置"},{default:e.withCtx(()=>{var _;return[e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="custom"}]),onClick:n[0]||(n[0]=g=>s("custom"))}," 自定义函数 ",2),e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="public"}]),onClick:n[1]||(n[1]=g=>s("public"))}," 公共函数 ",2),n[5]||(n[5]=e.createTextVNode(" 组件 ")),e.createElementVNode("div",ee,[e.createVNode(e.unref($._sfc_main),{selectedKeys:r.value,"onUpdate:selectedKeys":n[2]||(n[2]=g=>r.value=g),options:e.unref(y).schemas,onNodeClick:c},null,8,["selectedKeys","options"])])]),e.createElementVNode("div",te,[n[6]||(n[6]=e.createElementVNode("div",{class:"mb-2"},"动作选择",-1)),e.createElementVNode("div",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,g=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{checked:g.value===t.actionItem.methodName},"epic-action-item"]),onClick:de=>d(g.value),key:g.value},[e.createElementVNode("span",null,e.toDisplayString(g.label),1)],10,oe))),128)),e.withDirectives(e.createElementVNode("div",le," 当前组件暂无动作 ",512),[[e.vShow,!((_=i.value)!=null&&_.length)]])])])]),e.createElementVNode("div",ae,[t.actionItem.type==="custom"?(e.openBlock(),e.createBlock(P,{key:0})):a.value.length===0?(e.openBlock(),e.createElementBlock("div",ce," 暂无配置 ")):(e.openBlock(),e.createBlock(W,{key:2,modelValue:t.actionItem.args,"onUpdate:modelValue":n[3]||(n[3]=g=>t.actionItem.args=g),actionArgsConfigs:a.value},null,8,["modelValue","actionArgsConfigs"]))])])]}),_:1},8,["modelValue"]))}}),ie=e.defineComponent({__name:"index",props:{eventList:{type:Array,default:()=>[]},modelValue:{type:Object}},emits:["update:modelValue"],setup(E,{emit:V}){const m=x.pluginManager.getComponent("Collapse"),h=x.pluginManager.getComponent("CollapseItem"),v=e.ref(null);let y=0;const f=E,u=V,r=e.computed({get(){return f.modelValue},set(s){u("update:modelValue",s)}}),o=e.ref([]),p=e.computed(()=>f.eventList.filter(s=>s.events.length)),i=e.computed(()=>f.eventList.map(s=>s.events).flat()),a=e.ref({});i.value.forEach(s=>{a.value[s.type]=e.computed({get(){var c;return((c=r.value)==null?void 0:c[s.type])??[]},set(c){c&&c.length?r.value[s.type]=c.map(d=>e.toRaw(d)):delete r.value[s.type]}})}),e.watch(()=>p.value,s=>{s.length&&(o.value=s.filter(c=>{for(let d=0;d<c.events.length;d++){const l=c.events[d].type;if(a.value[l].length)return!0}return!1}).map(c=>c.title))},{immediate:!0});let t="";function k(s){var c;(c=v.value)==null||c.handleOpen(),t=s}function N(s,c,d){var l;(l=v.value)==null||l.handleOpenEdit(d),y=s,t=c}function B(s){a.value[t][y]=s,r.value[t]=[...a.value[t]??[]]}function I(s){if(!r.value){r.value={[t]:[...a.value[t]??[],s]};return}r.value[t]=[...a.value[t]??[],s]}return(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(m),{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=d=>o.value=d),activeKey:o.value,"onUpdate:activeKey":c[2]||(c[2]=d=>o.value=d),"expanded-names":o.value,"onUpdate:expandedNames":c[3]||(c[3]=d=>o.value=d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,d=>(e.openBlock(),e.createBlock(e.unref(h),{key:d.title,title:d.title,header:d.title,name:d.title},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=l=>r.value=l),"item-events":d.events,"all-events":i.value,events:a.value,onAdd:k,onEdit:N},null,8,["modelValue","item-events","all-events","events"])]),_:2},1032,["title","header","name"]))),128))]),_:1},8,["modelValue","activeKey","expanded-names"]),e.createVNode(se,{ref_key:"EActionModalRef",ref:v,onAdd:I,onEdit:B},null,512)],64))}});exports.default=ie;
|
package/dist/index-HNPgHrkl.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./js.cookie-BH1G_HRi.cjs"),m=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),f={class:"epic-breadcrumb pl-4 py-2 truncate h-40px flex items-center"},h={key:0,class:"flex items-center"},k={key:0},v=["onClick","onMouseenter"],g=e.defineComponent({__name:"breadcrumb",setup(_){const t=e.inject("designer");function i(r){t.setCheckedNode(r)}return(r,n)=>(e.openBlock(),e.createElementBlock("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).state.matched,(c,l)=>{var a;return e.openBlock(),e.createElementBlock("span",{key:l},[l>e.unref(t).state.matched.length-4?(e.openBlock(),e.createElementBlock("span",h,[e.unref(t).state.matched.length>3&&l===e.unref(t).state.matched.length-3?(e.openBlock(),e.createElementBlock("span",k,"...")):e.createCommentVNode("",!0),l!==0?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:1,class:"m-1",name:"icon--epic--arrow-forward-ios-rounded"})):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"node-item cursor-pointer",onClick:o=>i(c),onMouseenter:e.withModifiers(o=>e.unref(t).setHoverNode(c),["stop"]),onMouseleave:n[0]||(n[0]=e.withModifiers(o=>e.unref(t).setHoverNode(null),["stop"]))},e.toDisplayString(c.label??((a=e.unref(p.pluginManager).getComponentConfingByType(c.type))==null?void 0:a.defaultSchema.label)),41,v)])):e.createCommentVNode("",!0)])}),128))]))}}),B={key:0,class:"epic-right-sidebar-container relative"},C={class:"w-308px"},b={class:"epic-actions-container"},y=["title","onClick"],N={class:"epic-sidebar-content"},E=e.defineComponent({__name:"index",setup(_){var a;const t=e.ref(!1),i=e.computed(()=>p.pluginManager.viewsContainers.rightSidebars.value.filter(o=>o.visible)),r=e.ref(0),n=e.shallowRef(null);n.value=(a=i.value[0])==null?void 0:a.component;function c(){t.value=!t.value}function l(o,s){if(r.value===s)return!1;n.value=o.component,r.value=s}return(o,s)=>n.value?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",{class:"epic-right-sidebar-hide-btn absolute left--18px top-80px cursor-pointer rounded-full flex justify-center items-center w-28px h-28px z-9",onClick:c},[e.createVNode(e.unref(m._sfc_main),{class:e.normalizeClass(["transition-all",{"rotate-180":t.value}]),name:"icon--epic--arrow-forward-ios-rounded"},null,8,["class"])]),s[0]||(s[0]=e.createElementVNode("div",{class:"w-10px"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["epic-right-sidebar w-308px",{hide:t.value}])},[e.createElementVNode("div",C,[e.createVNode(g),e.createElementVNode("ul",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(u,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["epic-action-item",{checked:r.value===d}]),title:u.title,onClick:V=>l(u,d)},e.toDisplayString(u.title),11,y))),128))]),e.createElementVNode("div",N,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value)))])])],2)])):e.createCommentVNode("",!0)}});exports.default=E;
|