epic-designer-gold 1.0.33 → 1.0.35

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 (57) hide show
  1. package/dist/{index-3k1IXN1T.js → _plugin-vue_export-helper-8DRKdUfJ.js} +30 -24
  2. package/dist/{index-DlWUR7vt.cjs → _plugin-vue_export-helper-NUO0U1Az.cjs} +3 -3
  3. package/dist/{attributeView-BAtvUAhV.js → attributeView-BsBiqVGu.js} +1 -1
  4. package/dist/{attributeView-BF8AFFq3.cjs → attributeView-CDOlTCej.cjs} +1 -1
  5. package/dist/form-BaNhucdK.js +231 -0
  6. package/dist/form-DvdMrtVG.cjs +1 -0
  7. package/dist/index-4NyY4OrM.cjs +10 -0
  8. package/dist/{index-Xnqspbxj.js → index-57Jo44dB.js} +2 -2
  9. package/dist/{index-Cecp9t8s.js → index-6ehvFk8m.js} +1 -1
  10. package/dist/{index-9Mn4Y5ul.js → index-7Z6k5ElN.js} +1 -1
  11. package/dist/{index-CQSYlqUB.js → index-B2L9CYN8.js} +1 -1
  12. package/dist/{index-sFE9uQIP.js → index-BCfsLh0H.js} +111 -112
  13. package/dist/{index-DExGgrX9.cjs → index-BK6ipjbo.cjs} +1 -1
  14. package/dist/index-BNgMDVXO.js +4 -0
  15. package/dist/{index-CrVn9CfT.js → index-BQGUEUhF.js} +1 -1
  16. package/dist/index-BU-UAvHC.cjs +1 -0
  17. package/dist/{index-CLeSXOVj.js → index-BelKUDOu.js} +1 -1
  18. package/dist/{index-Di9sEDRc.cjs → index-Bv6UOkMb.cjs} +1 -1
  19. package/dist/{index-ClgIpXW0.cjs → index-C0sL_Cow.cjs} +1 -1
  20. package/dist/{index-Bxdmlmwu.cjs → index-CBKTyKT5.cjs} +1 -1
  21. package/dist/{index-BozsQqds.cjs → index-CGSKdgpe.cjs} +1 -1
  22. package/dist/{index-DYU07eGb.cjs → index-CP9mOhqZ.cjs} +1 -1
  23. package/dist/{index-K9w-efBB.cjs → index-Ce2UbX3P.cjs} +1 -1
  24. package/dist/{index-natF7VzY.js → index-Ch0kn_uQ.js} +1 -1
  25. package/dist/{index-CFChTrwc.cjs → index-CqmYHiDr.cjs} +1 -1
  26. package/dist/{index-C5yUsiJH.js → index-D8diDndG.js} +2 -2
  27. package/dist/{index-C4CkFEzv.cjs → index-DV6zVc1G.cjs} +1 -1
  28. package/dist/{index-CFHEVgng.cjs → index-Dh-5bgQx.cjs} +1 -1
  29. package/dist/{index-BMXnkqXx.js → index-Dz39c928.js} +1 -1
  30. package/dist/{index-lf6yCev-.cjs → index-EU7IKyES.cjs} +1 -1
  31. package/dist/{index-BwHmwZ5G.cjs → index-PjUZVUx6.cjs} +1 -1
  32. package/dist/{index-D2n96wxz.js → index-lkwgM-Nx.js} +1 -1
  33. package/dist/{index-CT056ccv.js → index-nvc1uY17.js} +1 -1
  34. package/dist/{index-DI-E5Cpq.js → index-u1-3v7J4.js} +2 -2
  35. package/dist/{index-CHYKgo9A.cjs → index-wjKD4mBu.cjs} +1 -1
  36. package/dist/{index-UpNznhhe.js → index-zxpOBir-.js} +2 -2
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/{selectPage-oM1OpHbJ.js → selectPage-Cu2yuxd6.js} +6 -7
  40. package/dist/selectPage-DZQ1Sbs4.cjs +1 -0
  41. package/dist/sign-B1wFFef_.cjs +1 -0
  42. package/dist/{sign-Cz5OCE1C.js → sign-mjic2rIw.js} +22 -23
  43. package/dist/style.css +1 -1
  44. package/dist/{styleView-oSuNX97o.js → styleView-DXePdHW5.js} +1 -1
  45. package/dist/{styleView-DAskd_e3.cjs → styleView-sZrNBCuS.cjs} +1 -1
  46. package/dist/ui/elementPlus/index.cjs +1 -1
  47. package/dist/ui/elementPlus/index.js +3 -3
  48. package/package.json +1 -1
  49. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  50. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  51. package/dist/form-CUbklubB.cjs +0 -1
  52. package/dist/form-DGbjgAvD.js +0 -208
  53. package/dist/index-B_ZNp-FD.cjs +0 -10
  54. package/dist/index-Dp0hJSh5.js +0 -4
  55. package/dist/index-eAXbC_rr.cjs +0 -1
  56. package/dist/selectPage-H4G0pWhK.cjs +0 -1
  57. package/dist/sign-Cusu4oCD.cjs +0 -1
@@ -0,0 +1,10 @@
1
+ "use strict";const e=require("vue"),E=require("./pluginManager-C8aQylGX.cjs"),K=require("./index-BoL2PSBk.cjs"),De=require("element-plus"),G=require("./_plugin-vue_export-helper-NUO0U1Az.cjs");function xe(t,o){let r=null;return(...s)=>{r&&clearTimeout(r),r=setTimeout(()=>{t(...s)},o)}}function ie(){const t=e.ref({}),o=e.ref({}),r=e.ref(!1),s=e.ref([]),f=e.reactive({});function a(m){return t.value[m]}function g(m,A){t.value[m]=A}function c(m){delete t.value[m]}function S(m,A=!1){const V=Object.entries(E.pluginManager.publicMethods).reduce((B,[w,L])=>(B[w]=L.handler,B),{});try{new Function(`const epic = this;${m}`).bind({...V,getComponent:a,find:a,defineExpose:O,publicMethods:V,pluginManager:E.pluginManager})()}catch(B){A&&console.error("[epic:自定义函数]异常:",B)}}function O(m){m!=null&&(o.value=m)}function _(m,...A){if(!m||m.length===0){console.warn("未提供任何动作");return}m.forEach(V=>{const B=V.args?JSON.parse(V.args):A;switch(V.type){case"public":h(V,B);break;case"custom":I(V,B);break;case"component":n(V,B);break;default:console.warn(`未知的动作类型: ${V.type}`);break}})}function h(m,A){var V;try{(V=E.pluginManager.publicMethods[m.methodName])==null||V.handler(...A)}catch(B){console.error(`[Epic:公共函数(${m.methodName})]执行异常:`,B)}}function I(m,A){var V,B;try{(B=(V=o.value)[m.methodName])==null||B.call(V,...A)}catch(w){console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`,w)}}function n(m,A){const V=m.componentId!=null&&a(m.componentId);if(!V){console.warn(`[Epic:组件${m.componentId}]未找到`);return}try{V[m.methodName](...A)}catch(B){console.error(`[Epic:组件${m.componentId}函数(${m.methodName})]执行异常:`,B)}}function D(m=!0){r.value=m}function y(m){const A=E.findSchemas(m,()=>!0);s.value=A.map(V=>V.id)}function x(m,A="default"){if(f[A]){const V=f[A];E.deepCompareAndModify(m,V)}f[A]=m}function F(m,A="default"){if(f[A]){E.deepCompareAndModify(f[A],m,!1);return}f[A]=m}return{componentInstances:t,funcs:o,isDesignMode:r,defaultComponentIds:s,forms:f,addFormData:x,setFormData:F,getComponentInstance:a,find:a,addComponentInstance:g,removeComponentInstance:c,setMethods:S,doActions:_,setDesignMode:D,setDefaultComponentIds:y}}function de(){const t=e.ref([]),o=e.ref([]),r=e.ref(null);let s=0;function f(S,O="插入组件"){const _=Date.now();s+150>_||(s=_,r.value!=null&&(t.value.push(r.value),o.value.splice(0,o.value.length)),r.value={type:O,componentSchema:JSON.stringify(S)},t.value.length>60&&t.value.unshift())}function a(){if(t.value.length===0)return!1;const S=t.value.pop();return r.value!=null&&o.value.push(r.value),r.value=S,JSON.parse(S.componentSchema)}function g(){if(o.value.length===0)return!1;const S=o.value.pop();return r.value!=null&&t.value.push(r.value),r.value=S,JSON.parse(S.componentSchema)}function c(){t.value=[],o.value=[],r.value=null}return{recordList:t,undoList:o,currentRecord:r,push:f,undo:a,redo:g,reset:c}}const Ae=e.defineComponent({__name:"dynamicFormItem",props:{hasFormItem:{type:Boolean},formItemProps:{}},emits:["updateFormItemRef"],setup(t,{emit:o}){const r=E.pluginManager.getComponent("form-item"),s=t,f=o,a=e.ref(),g=()=>{f("updateFormItemRef",a.value)};return(c,S)=>s.hasFormItem?(e.openBlock(),e.createBlock(e.unref(r),e.mergeProps({key:0,ref_key:"formItemRef",ref:a,onVnodeMounted:g},s.formItemProps),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},16,["onVnodeMounted"])):e.renderSlot(c.$slots,"default",{key:1})}}),Ce={key:0,class:"epic-loading-box"},Oe={class:"epic-loading-content"},_e={class:"epic-loading-text"},Ne=e.defineComponent({name:"ENode",__name:"node",props:{componentSchema:{},modelValue:{},ruleField:{},resetFormData:{type:Boolean},name:{},dynamicId:{},sourceDateUrl:{},id:{}},emits:["update:modelValue","change","update:dynamicId"],setup(t,{emit:o}){const r=e.ref(!1),s=e.ref("加载中"),{proxy:f}=e.getCurrentInstance(),a=t,g=e.ref(null);let c=e.inject("formData",e.reactive({}));const S=e.inject("slots",{}),O=e.inject("pageManager",{}),_=e.inject("disabled",{value:!1}),h=e.inject("ruleFieldPrefix",null),I=e.inject("resetFormData",!1);let n=e.reactive(E.deepClone(a.componentSchema));m();async function D(l){try{r.value=!0,s.value="正在识别中...请稍等";const b={url:l.callBackUrl,headers:{Authorization:"Bearer "+K.api.get("Admin-Token"),lang:K.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}},T=(l.callBackMethod||"").toLowerCase(),C={[l.callBackField]:l.url.join(",")};T==="get"?(b.method="get",b.params=C):(b.method=T||"post",b.data=C);let R=await G.axios(b),p={};l.callBackDataPath?p=l.callBackDataPath.split(".").reduce((W,H)=>W[H],R.data):p=R.data,l.validate&&(l.validateParams.forEach(q=>{c[q.value]=c.orcWarningInfo__copy_data[q.value]}),c[l.field+"-orcWarningInfo"]="",l.validateParams.forEach(q=>{c[q.value]&&p[q.value]!==c[q.value]&&p[q.value]&&(a.componentSchema.componentProps.validateStatus=!0,c[l.field+"-orcWarningInfo"]?c[l.field+"-orcWarningInfo"]=c[l.field+"-orcWarningInfo"]+","+q.label+"已从"+c[q.value]+"改为"+p[q.value]:c[l.field+"-orcWarningInfo"]=q.label+"已从"+c[q.value]+"改为"+p[q.value])})),Object.assign(c,p)}catch(b){De.ElMessage.error("OCR 识别回调处理失败:"+b.message)}finally{r.value=!1,s.value="加载中"}}async function y({value:l,field:b,fillDataSource:T,fillDataParams:C}){try{r.value=!0;const p=(await G.axios({url:a.sourceDateUrl,method:"get",params:{id:T??""},headers:{Authorization:"Bearer "+K.api.get("Admin-Token"),lang:K.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}})).data.data;let q=await G.axios({url:p.url,method:p.method,data:p.body?JSON.parse(p.body):{},params:p.params?{...JSON.parse(p.params),[b]:l}:{[b]:l},headers:{...JSON.parse(p.headers),Authorization:"Bearer "+K.api.get("Admin-Token"),lang:K.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});if(p&&(p!=null&&p.dataPath)){let X=p.dataPath.split(".").reduce((ee,Ee)=>ee[Ee],q.data);C.split(",").forEach(ee=>{c[ee]=X[ee]})}else{let W=q.data;C.split(",").forEach(H=>{c[H]=W[H]})}c.orcWarningInfo__copy_data=JSON.parse(JSON.stringify(c))}catch(R){console.log(R)}finally{r.value=!1,s.value="加载中"}}async function x(l){if(["cascader","checkbox","select","radio","ocr-select-page"].includes(l.type)&&l.componentProps.dynamicId&&a.sourceDateUrl){const C=(await G.axios({url:a.sourceDateUrl,method:"get",params:{id:l.componentProps.dynamicId??""},headers:{Authorization:"Bearer "+K.api.get("Admin-Token"),lang:K.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}})).data.data;let R=await G.axios({url:C.url,method:C.method,data:C.body?JSON.parse(C.body):{},params:C.params?JSON.parse(C.params):{},headers:{...JSON.parse(C.headers),Authorization:"Bearer "+K.api.get("Admin-Token"),lang:K.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});if(C&&(C!=null&&C.dataPath)){const q=C.dataPath.split(".").reduce((W,H)=>W[H],R.data);l.componentProps.options=F(q,C.dataKey,C.dataValue)}else l.componentProps.options=F(R.data,C.dataKey,C.dataValue);return l}return l}function F(l,b,T){return l&&Object.prototype.toString.call(l)==="[object Array]"?l.map(C=>C.children&&C.children.length?{label:C[b],value:C[T]+"",children:F(C.children,b,T)}:{label:C[b],value:C[T]+""}):[]}e.watch(()=>a.componentSchema,l=>{E.deepEqual(n,l,["children"])||(E.deepCompareAndModify(n,E.deepClone(l)),m())},{deep:!0});function m(){O.isDesignMode.value&&typeof n.field=="string"&&(n.field+="-design-mode")}(a.resetFormData||I)&&(c={});const A=o,V=e.ref(),B=e.ref(),w=l=>{B.value=l},L=e.useAttrs();Object.keys(L).length&&e.provide("nodeAttrs",L);const z=e.shallowRef(null),N=e.computed(()=>{var l,b;return(l=n.componentProps)!=null&&l.hidden?!1:typeof n.show=="boolean"?n.show:((b=n.show)==null?void 0:b.call(n,{values:c}))??!0}),i=e.computed(()=>{var C;const l=N.value&&((C=n.rules)==null?void 0:C.map(R=>({...R,validator:R.validator&&O.funcs.value[R.validator]})));let b=n.field;a.ruleField?b=a.ruleField:h&&n.field&&(b=E.deepClone(h),b.push(n.field));const T={...n,rules:l,rule:l,field:b};return T.children&&delete T.children,T}),k=e.computed(()=>{var T,C,R;const l=((T=u.value)==null?void 0:T.bindModel)??"modelValue",b={};return n.on&&Object.keys(n.on).forEach(p=>{b[`on${E.capitalizeFirstLetter(p)}`]=(...q)=>O.doActions(n.on[p],...q)}),n.type==="selectpage"&&(n.componentProps.defaultData={value:c[n.field],label:c[c[n.field]]}),{...a,...n.componentProps,sourceDateUrl:a.sourceDateUrl,disabled:a.componentSchema.type==="input"&&a.componentSchema.componentProps&&((C=a.componentSchema.componentProps)!=null&&C.isLink)?!1:(_==null?void 0:_.value)||((R=n.componentProps)==null?void 0:R.disabled),bindModel:l,...b}}),u=e.computed(()=>E.pluginManager.getComponentConfingByType(n.type)??null);e.watchEffect(()=>{g.value=a.modelValue??c[n.field??""]}),e.watch(()=>g.value,()=>{g.value!==(a.modelValue??c[n.field??""])&&v(g.value)}),e.watch(()=>V.value,()=>{d()},{immediate:!0});function d(){var b;const l=V.value||f;n!=null&&n.id&&l&&((n.input||n.type==="table"&&n.field||n.type==="card"&&n.field&&n.multiple)&&(l.setValue=v,l.getValue=()=>c[n.field]||a.modelValue),l.setAttr=(T,C)=>(n.componentProps||(n.componentProps={}),n.componentProps[T]=C),l.getAttr=T=>n.componentProps[T],O.addComponentInstance(n==null?void 0:n.id,l),(b=u.value)!=null&&b.defaultSchema.input&&n.noFormItem!==!0&&B.value&&O.addComponentInstance((n==null?void 0:n.id)+"formItem",B.value))}function M(){var l;n.id&&(O.removeComponentInstance(n==null?void 0:n.id),(l=u.value)!=null&&l.defaultSchema.input&&n.noFormItem!==!0&&O.removeComponentInstance((n==null?void 0:n.id)+"formItem"))}async function $(){var b,T,C;if(n=await x(n),typeof((b=n.componentProps)==null?void 0:b.defaultValue)<"u"){const R=O.isDesignMode.value?(T=n.componentProps)==null?void 0:T.defaultValue:c[n.field]??((C=n.componentProps)==null?void 0:C.defaultValue);v(E.deepClone(R))}if(n.type==="slot"){const R=n.slotName;if(!R)return;z.value=e.defineComponent({setup(){return()=>e.renderSlot(S,R,{componentSchema:n,model:c})}});return}const l=E.pluginManager.getComponent(n.type);if(!l){console.error(`组件${n.type}未注册`);return}if(typeof l=="function"){const R=await l();z.value=R.default??R}else l&&(z.value=l)}function P(l){Object.prototype.toString.call(l)==="[object Array]"?l.forEach(b=>{c[b.value]=b.label}):c[l.value]=l.label,a!=null&&a.id?E.EventBus.emit("updateformData"+(a==null?void 0:a.id),c):E.EventBus.emit("updateformData",c)}function v(l){A("update:modelValue",l),A("change",l),n.field&&(c[n.field]=l),a!=null&&a.id?E.EventBus.emit("updateformData"+(a==null?void 0:a.id),c):E.EventBus.emit("updateformData",c)}function J(l){A("update:dynamicId",l)}let U=null;return e.watch(()=>n,async l=>{const b=JSON.stringify({...l,children:void 0,componentProps:{...l.componentProps,options:null}});if(b===U)return!1;U=b,$()},{immediate:!0,deep:!0}),e.onUnmounted(M),(l,b)=>{var C;const T=e.resolveComponent("ENode");return e.openBlock(),e.createElementBlock(e.Fragment,null,[r.value?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",Oe,[b[1]||(b[1]=e.createStaticVNode('<div class="epic-loading-wave" data-v-936adbeb><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div><div class="wave" data-v-936adbeb></div></div>',1)),e.createElementVNode("span",_e,e.toDisplayString(s.value),1)])])):e.createCommentVNode("",!0),z.value&&N.value?(e.openBlock(),e.createBlock(Ae,{key:1,hasFormItem:e.unref(n).noFormItem!==!0&&((C=u.value)==null?void 0:C.defaultSchema.input),formItemProps:i.value,onUpdateFormItemRef:w},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(z.value),e.mergeProps({ref_key:"componentInstance",ref:V,onVnodeMounted:d,model:e.unref(c),sourceDateUrl:a.sourceDateUrl},{...k.value},{[k.value.bindModel]:g.value,["onUpdate:"+k.value.bindModel]:b[0]||(b[0]=R=>g.value=R),[`onUpdate:${k.value.bindModel}`||""]:v,"onUpdate:modelValueLabel":P,"onUpdate:dynamicId":J,"onUpdate:ocrData":D,"onUpdate:selectFillData":y}),{node:e.withCtx(R=>[e.createVNode(T,e.mergeProps({id:a.id},R,{sourceDateUrl:a.sourceDateUrl}),null,16,["id","sourceDateUrl"])]),"edit-node":e.withCtx(()=>[e.renderSlot(l.$slots,"edit-node",{},void 0,!0)]),_:3},16,["model","sourceDateUrl"]))]),_:3},8,["hasFormItem","formItemProps"])):e.createCommentVNode("",!0)],64)}}}),fe=G._export_sfc(Ne,[["__scopeId","data-v-936adbeb"]]);function Pe(){const t=e.ref(!1),o=ie(),r=e.ref({});function s(){return new Promise(n=>{if(t.value)n();else{const D=e.watch(t,()=>{D(),n()})}})}async function f(n="default"){var y;await s();const D=(y=r.value)==null?void 0:y[n];if(!D)throw new Error(`表单 [name=${n}] 不存在`);return D}async function a(n,D){const y=await f(n);return E.deepClone(await D(y))}async function g(n="default"){return await a(n,D=>D.getData())}function c(n,D="default",y=void 0){var x,F;if(y&&Object.keys(y).length){let m=function(w){let L=[];return w.forEach(z=>{z.children&&(L=[...L,...m(z.children)]),L.push(z)}),L},V=function(w){var z;let L=m((z=y==null?void 0:y.schemas[0])==null?void 0:z.children);return Object.keys(w).forEach(N=>{var u,d,M,$,P,v,J;const i=L.find(U=>U.field===N),k=["datetimerange","daterange","monthrange","dates"];if((i&&(i==null?void 0:i.type)==="checkbox"||(i==null?void 0:i.type)==="select"&&((u=i==null?void 0:i.componentProps)!=null&&u.multiple)||(i==null?void 0:i.type)==="cascader"&&!((M=(d=i==null?void 0:i.componentProps)==null?void 0:d.props)!=null&&M.multiple)||(i==null?void 0:i.type)==="date"&&k.includes(($=i==null?void 0:i.componentProps)==null?void 0:$.type))&&typeof w[N]=="string")w[N]=(P=w[N])==null?void 0:P.split(",");else if((i==null?void 0:i.type)==="cascader"&&((J=(v=i==null?void 0:i.componentProps)==null?void 0:v.props)!=null&&J.multiple)&&typeof w[N]=="string")w[N].indexOf(";")===-1&&w[N].indexOf(";")===-1?w[N][w[N]]:w[N].indexOf(";")>-1?w[N]=w[N].split(";").map(U=>U.split(",")):w[N].indexOf(";")===-1?w[N]=w[N].split(","):w[N].indexOf(";")>-1?w[N]=w[N].split(";").map(U=>U.split(",")):w[N].indexOf(";")===-1&&(w[N]=w[N].split(","));else if(((i==null?void 0:i.type)==="upload-image"||(i==null?void 0:i.type)==="upload-file")&&typeof w[N]=="string"){let U=[];Object.entries(w).forEach(([l,b])=>{w[N]===b&&l!==i.field&&l.indexOf("@")>-1&&l.indexOf(N)>-1&&(U=l.split("@")[1].split(","))}),w[N]=w[N].split(",").map((l,b)=>({url:l,name:U[b]||l}))}else(i==null?void 0:i.type)==="number"||(i==null?void 0:i.type)==="slider"?w[N]=Number(w[N]):(i==null?void 0:i.type)==="switch"&&(w[N]=typeof w[N]=="boolean"?w[N]:w[N].indexOf("true")>-1)}),w}(n);o.setFormData(V,D);const B=(x=r.value)==null?void 0:x[D];B==null||B.clearValidate()}else{o.setFormData(n,D);const m=(F=r.value)==null?void 0:F[D];m==null||m.clearValidate()}}async function S(n="default"){return await a(n,async D=>(await D.validate(),await D.getData()))}async function O(n){await s();const D={};for(const y in r.value){const x=r.value[y];x&&(D[y]=E.deepClone(await n(x)))}return D}async function _(){return await O(n=>n.getData())}function h(n){for(const D in n)c(n[D],D)}async function I(){return await O(async n=>(await n.validate(),await n.getData()))}return{ready:t,pageManager:o,forms:r,getData:g,setData:c,validate:S,getForms:_,setForms:h,validateAll:I,getFormInstance:f}}const Ie={key:0,class:"epic-loading-box"},Ve={class:"epic-builder-main"},Be={class:"epic-loading-box"},pe=e.defineComponent({__name:"builder",props:{pageSchema:{},formData:{},disabled:{type:Boolean},sourceDateUrl:{},id:{}},emits:["change","ready"],setup(t,{expose:o,emit:r}){const s=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DV6zVc1G.cjs"))),f=r,a=e.ref([]),g=e.ref({}),{ready:c,pageManager:S,forms:O,getData:_,setData:h,validate:I,getForms:n,setForms:D,validateAll:y,getFormInstance:x}=Pe(),F=t,m=e.reactive({schemas:[]});e.watch(()=>F.pageSchema,u=>{E.deepCompareAndModify(m,u)},{immediate:!0,deep:!0}),e.watch(()=>F.formData,u=>{if(u){let d=z(u);g.value=d,h(d)}},{immediate:!0,deep:!0});function A(u){let d=[];return u.forEach(M=>{M.children&&(d=[...d,...A(M.children)]),d.push(M)}),d}function V(u,d){function M(P){return JSON.parse(JSON.stringify(P))}function $(P,v){if(P.type==="card"&&P.multiple&&P.field&&Array.isArray(v[P.field]))return v[P.field].map(U=>{var b;const l=M({...P,multiple:!0});return l.children=(b=l.children)==null?void 0:b.map(T=>$(T,U)).flat(),l});const J=M(P);return Array.isArray(J.children)&&(J.children=J.children.map(U=>$(U,v)).flat()),J}return u.map(P=>$(P,d)).flat()}function B(u,d="",M={root:0}){const $=d||"root";return d||(M.root=0),M[$]===void 0&&(M[$]=0),u.map(P=>{P.field&&(P.oldField=JSON.parse(JSON.stringify(P.field)));const v={...P};if(P.type==="card"){const J=P.field||"";P.multiple?(v.field=d?`${d}.${J}[${M[$]}]`:`${J}[${M[$]}]`,M[$]++):P.field&&d&&(v.field=`${d}.${J}`);const U=v.field||d;M[U]=0}else P.field&&d&&(v.field=`${d}.${P.field}`);return P.children&&(v.children=B(P.children,v.field||d,M)),v})}function w(u,d,M="",$={}){const P=M||"root";return $[P]===void 0&&($[P]=0),u.forEach(v=>{const J=v.field||"";let U=M?`${M}.${J}`:`${J}`;v.type==="card"&&v.multiple?(typeof d[U][`${$[P]}`]=="object"?Object.keys(d[U][`${$[P]}`]).forEach(l=>{d[`${U}[${$[P]}].${l}`]=d[U][`${$[P]}`][l]}):d[`${U}[${$[P]}]`]=d[U][`${$[P]}`],v.children&&(v.children=w(v.children,d,`${U}[${$[P]}]`||M,$)),$[P]++):v.children&&(v.children=w(v.children,d,M,$))}),$[P]=0,d}function L(u,d,M){let $=w(E.deepClone(u),E.deepClone(d));return{obj:B(u),dataObj:$}}function z(u){let d=A(F.pageSchema.schemas[0].children);a.value=d.filter(v=>v.type==="card"&&v.multiple);const M=V(F.pageSchema.schemas[0].children,u);let{obj:$,dataObj:P}=L(M,u,a.value);return u=P,F.pageSchema.schemas[0].children=$,Object.keys(u).forEach(v=>{var J,U,l,b,T,C,R;if(v.indexOf("@")<0){const p=d.find(W=>W.field===v),q=["datetimerange","daterange","monthrange","dates"];if((p&&(p==null?void 0:p.type)==="checkbox"||(p==null?void 0:p.type)==="select"&&((J=p==null?void 0:p.componentProps)!=null&&J.multiple)||(p==null?void 0:p.type)==="cascader"&&!((l=(U=p==null?void 0:p.componentProps)==null?void 0:U.props)!=null&&l.multiple)||(p==null?void 0:p.type)==="date"&&q.includes((b=p==null?void 0:p.componentProps)==null?void 0:b.type))&&typeof u[v]=="string")u[v]=(T=u[v])==null?void 0:T.split(",");else if((p==null?void 0:p.type)==="cascader"&&((R=(C=p==null?void 0:p.componentProps)==null?void 0:C.props)!=null&&R.multiple)&&typeof u[v]=="string")u[v].indexOf(";")>-1?u[v]=u[v].split(";").map(W=>W.split(",")):u[v]=u[v].split(","),u[v].indexOf(";")>-1?u[v]=u[v].split(";").map(W=>W.split(",")):u[v]=u[v].split(",");else if(((p==null?void 0:p.type)==="upload-image"||(p==null?void 0:p.type)==="upload-file")&&typeof u[v]=="string"){let W=[];Object.entries(u).forEach(([H,X])=>{u[v]===X&&H!==p.field&&H.indexOf("@")>-1&&H.indexOf(v)>-1&&(W=H.split("@")[1].split(","))}),u[v]=u[v].split(",").map((H,X)=>({url:H,name:W[X]||H}))}else(p==null?void 0:p.type)==="number"||(p==null?void 0:p.type)==="slider"?u[v]=Number(u[v]):(p==null?void 0:p.type)==="switch"&&(u[v]=typeof u[v]=="boolean"?u[v]:u[v].indexOf("true")>-1)}}),u}e.watch(()=>m.script,u=>{u&&S.setMethods(u,!0)},{immediate:!0}),e.provide("slots",e.useSlots()),e.provide("pageManager",S),e.provide("forms",O),e.provide("pageSchema",m),e.provide("disabled",e.computed(()=>F.disabled));const N=e.getCurrentInstance(),i=N==null?void 0:N.proxy;function k(){e.nextTick(()=>{c.value=!0,f("ready",S),i&&S.addComponentInstance("builder",i)})}return E.EventBus.on("updateformData"+(F.id?F.id:""),u=>{f("change",u)}),o({ready:c,pageManager:S,getData:_,setData:h,validate:I,getForms:n,setForms:D,validateAll:y,getFormInstance:x}),(u,d)=>e.unref(E.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:k},{default:e.withCtx(()=>[e.createElementVNode("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.schemas,(M,$)=>(e.openBlock(),e.createBlock(e.unref(fe),{id:F.id,key:$,sourceDateUrl:F.sourceDateUrl,componentSchema:M},null,8,["id","sourceDateUrl","componentSchema"]))),128))])]),fallback:e.withCtx(()=>[e.createElementVNode("div",Be,[e.createVNode(e.unref(s))])]),_:1})):(e.openBlock(),e.createElementBlock("div",Ie))}});function ce(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function Me(t){let o=0,r,s;const f=()=>{o-=1,s&&o<=0&&(s.stop(),r=void 0,s=void 0)};return(...a)=>(o+=1,s||(s=e.effectScope(!0),r=s.run(()=>t(...a))),ce(f),r)}function Q(t){return typeof t=="function"?t():e.unref(t)}const $e=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fe=t=>typeof t<"u",Te=Object.prototype.toString,Re=t=>Te.call(t)==="[object Object]",Ue=()=>{};function ke(t,o){function r(...s){return new Promise((f,a)=>{Promise.resolve(t(()=>o.apply(this,s),{fn:o,thisArg:this,args:s})).then(f).catch(a)})}return r}const me=t=>t();function qe(t=me){const o=e.ref(!0);function r(){o.value=!1}function s(){o.value=!0}const f=(...a)=>{o.value&&t(...a)};return{isActive:e.readonly(o),pause:r,resume:s,eventFilter:f}}function ze(t){return e.getCurrentInstance()}function Je(t,o,r={}){const{eventFilter:s=me,...f}=r;return e.watch(t,ke(s,o),f)}function Le(t,o,r={}){const{eventFilter:s,...f}=r,{eventFilter:a,pause:g,resume:c,isActive:S}=qe(s);return{stop:Je(t,o,{...f,eventFilter:a}),pause:g,resume:c,isActive:S}}function he(t,o=!0,r){ze()?e.onMounted(t,r):o?t():e.nextTick(t)}function We(t=!1,o={}){const{truthyValue:r=!0,falsyValue:s=!1}=o,f=e.isRef(t),a=e.ref(t);function g(c){if(arguments.length)return a.value=c,a.value;{const S=Q(r);return a.value=a.value===S?Q(s):S,a.value}}return f?g:[a,g]}function He(t,o,r){const s=e.watch(t,(...f)=>(e.nextTick(()=>s()),o(...f)),r);return s}const Y=$e?window:void 0;function Z(t){var o;const r=Q(t);return(o=r==null?void 0:r.$el)!=null?o:r}function se(...t){let o,r,s,f;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,s,f]=t,o=Y):[o,r,s,f]=t,!o)return Ue;Array.isArray(r)||(r=[r]),Array.isArray(s)||(s=[s]);const a=[],g=()=>{a.forEach(_=>_()),a.length=0},c=(_,h,I,n)=>(_.addEventListener(h,I,n),()=>_.removeEventListener(h,I,n)),S=e.watch(()=>[Z(o),Q(f)],([_,h])=>{if(g(),!_)return;const I=Re(h)?{...h}:h;a.push(...r.flatMap(n=>s.map(D=>c(_,n,D,I))))},{immediate:!0,flush:"post"}),O=()=>{S(),g()};return ce(O),O}function Ke(t){return typeof t=="function"?t:typeof t=="string"?o=>o.key===t:Array.isArray(t)?o=>t.includes(o.key):()=>!0}function ve(...t){let o,r,s={};t.length===3?(o=t[0],r=t[1],s=t[2]):t.length===2?typeof t[1]=="object"?(o=!0,r=t[0],s=t[1]):(o=t[0],r=t[1]):(o=!0,r=t[0]);const{target:f=Y,eventName:a="keydown",passive:g=!1,dedupe:c=!1}=s,S=Ke(o);return se(f,a,_=>{_.repeat&&Q(c)||S(_)&&r(_)},g)}function re(t,o,r={}){return ve(t,o,{...r,eventName:"keydown"})}function ae(t,o,r={}){return ve(t,o,{...r,eventName:"keyup"})}function Ze(){const t=e.ref(!1),o=e.getCurrentInstance();return o&&e.onMounted(()=>{t.value=!0},o),t}function Qe(t){const o=Ze();return e.computed(()=>(o.value,!!t()))}function Ge(t){return JSON.parse(JSON.stringify(t))}const te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ne="__vueuse_ssr_handlers__",Ye=Xe();function Xe(){return ne in te||(te[ne]=te[ne]||{}),te[ne]}function je(t,o){return Ye[t]||o}function et(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const tt={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},ue="vueuse-storage";function nt(t,o,r,s={}){var f;const{flush:a="pre",deep:g=!0,listenToStorageChanges:c=!0,writeDefaults:S=!0,mergeDefaults:O=!1,shallow:_,window:h=Y,eventFilter:I,onError:n=i=>{console.error(i)},initOnMounted:D}=s,y=(_?e.shallowRef:e.ref)(typeof o=="function"?o():o);if(!r)try{r=je("getDefaultStorage",()=>{var i;return(i=Y)==null?void 0:i.localStorage})()}catch(i){n(i)}if(!r)return y;const x=Q(o),F=et(x),m=(f=s.serializer)!=null?f:tt[F],{pause:A,resume:V}=Le(y,()=>w(y.value),{flush:a,deep:g,eventFilter:I});h&&c&&he(()=>{r instanceof Storage?se(h,"storage",z):se(h,ue,N),D&&z()}),D||z();function B(i,k){if(h){const u={key:t,oldValue:i,newValue:k,storageArea:r};h.dispatchEvent(r instanceof Storage?new StorageEvent("storage",u):new CustomEvent(ue,{detail:u}))}}function w(i){try{const k=r.getItem(t);if(i==null)B(k,null),r.removeItem(t);else{const u=m.write(i);k!==u&&(r.setItem(t,u),B(k,u))}}catch(k){n(k)}}function L(i){const k=i?i.newValue:r.getItem(t);if(k==null)return S&&x!=null&&r.setItem(t,m.write(x)),x;if(!i&&O){const u=m.read(k);return typeof O=="function"?O(u,x):F==="object"&&!Array.isArray(u)?{...x,...u}:u}else return typeof k!="string"?k:m.read(k)}function z(i){if(!(i&&i.storageArea!==r)){if(i&&i.key==null){y.value=x;return}if(!(i&&i.key!==t)){A();try{(i==null?void 0:i.newValue)!==m.write(y.value)&&(y.value=L(i))}catch(k){n(k)}finally{i?e.nextTick(V):V()}}}}function N(i){z(i.detail)}return y}function ge(t,o,r={}){const{window:s=Y,...f}=r;let a;const g=Qe(()=>s&&"ResizeObserver"in s),c=()=>{a&&(a.disconnect(),a=void 0)},S=e.computed(()=>{const h=Q(t);return Array.isArray(h)?h.map(I=>Z(I)):[Z(h)]}),O=e.watch(S,h=>{if(c(),g.value&&s){a=new ResizeObserver(o);for(const I of h)I&&a.observe(I,f)}},{immediate:!0,flush:"post"}),_=()=>{c(),O()};return ce(_),{isSupported:g,stop:_}}function ot(t,o={width:0,height:0},r={}){const{window:s=Y,box:f="content-box"}=r,a=e.computed(()=>{var h,I;return(I=(h=Z(t))==null?void 0:h.namespaceURI)==null?void 0:I.includes("svg")}),g=e.ref(o.width),c=e.ref(o.height),{stop:S}=ge(t,([h])=>{const I=f==="border-box"?h.borderBoxSize:f==="content-box"?h.contentBoxSize:h.devicePixelContentBoxSize;if(s&&a.value){const n=Z(t);if(n){const D=n.getBoundingClientRect();g.value=D.width,c.value=D.height}}else if(I){const n=Array.isArray(I)?I:[I];g.value=n.reduce((D,{inlineSize:y})=>D+y,0),c.value=n.reduce((D,{blockSize:y})=>D+y,0)}else g.value=h.contentRect.width,c.value=h.contentRect.height},r);he(()=>{const h=Z(t);h&&(g.value="offsetWidth"in h?h.offsetWidth:o.width,c.value="offsetHeight"in h?h.offsetHeight:o.height)});const O=e.watch(()=>Z(t),h=>{g.value=h?o.width:0,c.value=h?o.height:0});function _(){S(),O()}return{width:g,height:c,stop:_}}function rt(t,o,r,s={}){var f,a,g;const{clone:c=!1,passive:S=!1,eventName:O,deep:_=!1,defaultValue:h,shouldEmit:I}=s,n=e.getCurrentInstance(),D=r||(n==null?void 0:n.emit)||((f=n==null?void 0:n.$emit)==null?void 0:f.bind(n))||((g=(a=n==null?void 0:n.proxy)==null?void 0:a.$emit)==null?void 0:g.bind(n==null?void 0:n.proxy));let y=O;o||(o="modelValue"),y=y||`update:${o.toString()}`;const x=A=>c?typeof c=="function"?c(A):Ge(A):A,F=()=>Fe(t[o])?x(t[o]):h,m=A=>{I?I(A)&&D(y,A):D(y,A)};if(S){const A=F(),V=e.ref(A);let B=!1;return e.watch(()=>t[o],w=>{B||(B=!0,V.value=x(w),e.nextTick(()=>B=!1))}),e.watch(V,w=>{!B&&(w!==t[o]||_)&&m(w)},{deep:_}),V}else return e.computed({get(){return F()},set(A){m(A)}})}function at(){const{isDark:t}=j(),o=We(t);return{isDark:t,toggleDark:o}}function ye(){const t=e.ref(!1);return e.onMounted(()=>{we(t),lt(t)}),e.watch(()=>t.value,()=>{t.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),{isDark:t}}function we(t){var o=document.documentElement;o&&(o.classList.contains("dark")?t.value=!0:t.value=!1)}function lt(t){var o=document.querySelector("html"),r=new MutationObserver(function(s){for(var f of s)if(f.type==="attributes"&&f.attributeName==="class"){const a=f.target;new Array(...a.classList).includes("dark")?t.value=!0:t.value=!1}});r.observe(o,{attributes:!0,attributeFilter:["class"]}),e.onUnmounted(()=>{r.disconnect()})}function Se(){const t=e.ref(1),o=e.ref(!1),{isDark:r}=ye(),{pressSpace:s,pressShift:f,pressCtrl:a}=be();return{canvasScale:t,pressSpace:s,pressShift:f,pressCtrl:a,disabledZoom:o,isDark:r}}const j=Me(Se);function be(){const t=e.ref(!1),o=e.ref(!1),r=e.ref(!1);return re(" ",()=>{t.value=!0}),ae(" ",()=>{t.value=!1}),re("Shift",s=>{s.preventDefault(),o.value=!0}),ae("Shift",()=>{o.value=!1}),re("Control",s=>{s.preventDefault(),r.value=!0}),ae("Control",()=>{r.value=!1}),{pressSpace:t,pressShift:o,pressCtrl:r}}function st(t){const{pressSpace:o}=j(),r=new Image(1,1);r.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";let s=0,f=0;function a(S){var O;o.value&&(s=S.x,f=S.y,(O=S.dataTransfer)==null||O.setDragImage(document.createElement("div"),0,0))}function g(S){if(S.preventDefault(),!S.x||!S.y||!o.value)return;const O=S.x-s,_=S.y-f;s=S.x,f=S.y,t.value&&(t.value.scrollTop-=_,t.value.scrollLeft-=O)}function c(){o.value=!1}return{handleElementDragStart:a,handleElementDrag:g,handleElementDragEnd:c}}function it(t){const{pressCtrl:o,canvasScale:r,disabledZoom:s}=j();function f(a){if(!o.value||s.value)return;a.preventDefault();let g=0;a.deltaY<0?g=r.value+.05:g=r.value-.05,!(g>150||g<.5)&&(r.value=g)}return e.watch(()=>r.value,a=>{t.value&&!s.value&&(t.value.style.transform=`scale(${a})`)}),{handleZoom:f,canvasScale:r}}function ct(t,o=16.66){let r;function s(){f(),r=window.setInterval(t,o)}function f(){window.clearInterval(r)}return{startTimedQuery:s,stopTimedQuery:f}}const ut={class:"min-w-750px rounded"},dt={class:"h-full rounded"},ft=e.defineComponent({__name:"index",setup(t,{expose:o}){const r=E.pluginManager.getComponent("monacoEditor"),s=E.pluginManager.getComponent("modal"),f=e.ref(null),a=e.ref(!1),g=e.ref(!1),c=e.ref({}),S=e.inject("pageSchema"),O=e.ref(null),_=e.ref("");function h(){g.value=!1}function I(){a.value=!1}function n(){a.value=!0,_.value=E.getUUID()}async function D(){try{let y=await O.value.validateAll();if(!Object.keys(y).length){alert("请添加表单组件后再尝试!");return}Object.keys(y).length===1&&(y=y.default),c.value=JSON.stringify(y,null,2),e.nextTick(()=>{var x;(x=f.value)==null||x.setValue(c.value)}),g.value=!0}catch(y){console.error(y)}}return o({handleOpen:n}),(y,x)=>(e.openBlock(),e.createBlock(e.unref(s),{modelValue:a.value,"onUpdate:modelValue":x[1]||(x[1]=F=>a.value=F),title:"预览",class:"w-900px",width:"900px",onClose:I,onOk:D,okText:"表单数据"},{default:e.withCtx(()=>[e.createElementVNode("div",ut,[(e.openBlock(),e.createBlock(e.unref(pe),{key:_.value,ref_key:"kb",ref:O,"page-schema":e.unref(S)},null,8,["page-schema"])),e.createVNode(e.unref(s),{modelValue:g.value,"onUpdate:modelValue":x[0]||(x[0]=F=>g.value=F),title:"表单数据",class:"w-860px",width:"860px",onClose:h,onOk:h},{default:e.withCtx(()=>[e.createElementVNode("div",dt,[e.createVNode(e.unref(r),{ref_key:"monacoEditorRef",ref:f,autoToggleTheme:"",readOnly:"",class:"h-full editor","model-value":c.value},null,8,["model-value"])])]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"]))}}),pt={key:0,class:"epic-loading-box"},mt={class:"epic-designer-main"},ht={class:"epic-header-container"},vt={class:"epic-loading-box"},gt=e.defineComponent({__name:"designer",props:{disabledZoom:{type:Boolean,default:!1},hiddenHeader:{type:Boolean,default:!1},lockDefaultSchemaEdit:{type:Boolean,default:!1},formMode:{type:Boolean,default:!1},title:{default:"EpicDesigner默认项目"},defaultSchema:{},sourceCodeReadOnly:{type:Boolean},source:{default:[]},updateSourceId:{}},emits:["ready","save","reset","toggleDeviceMode","saveSourceData","deleteSourceData","updateSourceData"],setup(t,{expose:o,emit:r}){const{t:s}=K.useLocale(),f=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-aIGMRk0a.cjs"))),a=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BRAbfTxT.cjs"))),g=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-PjUZVUx6.cjs"))),c=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-uyQPLEww.cjs"))),S=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DV6zVc1G.cjs"))),O=ie(),_=de(),h=t;let I={schemas:[{type:"form",id:"root",label:s("page"),children:[],componentProps:{name:s("form"),style:{padding:"16px"}}}],script:`const { defineExpose, find } = epic;
2
+
3
+ function test (){
4
+ console.log('test')
5
+ }
6
+
7
+ // 通过defineExpose暴露的函数或者属性
8
+ defineExpose({
9
+ test
10
+ })`};e.watchEffect(()=>{if(h.defaultSchema){I=h.defaultSchema;return}h.source&&E.pluginManager.setSourceData(h.source),h.formMode&&(I.schemas=E.pluginManager.formSchemas)}),O.setDesignMode(),O.setDefaultComponentIds(I.schemas);const n=r,D=e.ref(null),y=e.reactive({checkedNode:null,hoverNode:null,disableHover:!1,matched:[]}),x=e.reactive({schemas:[],script:I.script}),{disabledZoom:F}=j();e.watchEffect(()=>{F.value=h.disabledZoom}),e.watchEffect(()=>{const d=x.script;d&&d!==""&&O.setMethods(d)}),e.provide("pageSchema",x),e.provide("revoke",_),e.provide("pageManager",O),e.provide("designerProps",e.computed(()=>h)),e.provide("designer",{setCheckedNode:A,setHoverNode:V,setDisableHover:w,handleToggleDeviceMode:k,reset:N,state:y}),E.EventBus.on("saveSourceData",d=>{n("saveSourceData",d)}),E.EventBus.on("deleteSourceData",d=>{n("deleteSourceData",d)}),E.EventBus.on("updateSourceData",d=>{n("updateSourceData",d)});function m(){x.schemas=E.deepClone(I.schemas),A(x.schemas[0]),_.push(x.schemas,"初始化撤销功能")}async function A(d=x.schemas[0]){y.checkedNode=d,y.matched=E.getMatchedById(x.schemas,d.id)}async function V(d=null){var M;if(!d||y.disableHover)return y.hoverNode=null,!1;if((d==null?void 0:d.id)===((M=y.hoverNode)==null?void 0:M.id))return!1;y.hoverNode=d}function B(){e.nextTick(()=>{n("ready",{pageManager:O})})}async function w(d=!1){y.disableHover=d}function L(d){E.deepCompareAndModify(x,E.deepClone(d))}function z(){return e.toRaw(x)}function N(){E.deepEqual(x.schemas,I.schemas)&&x.script===I.script||(E.deepCompareAndModify(x.schemas,I.schemas),x.script=I.script,A(x.schemas[0]),_.push(x.schemas,"重置操作"),n("reset",x))}function i(){n("save",e.toRaw(x))}function k(d){n("toggleDeviceMode",d)}function u(){D.value.handleOpen()}return m(),o({revoke:_,setData:L,getData:z,reset:N,preview:u}),(d,M)=>e.unref(E.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:B},{default:e.withCtx(()=>[e.createElementVNode("div",mt,[e.createElementVNode("div",ht,[e.renderSlot(d.$slots,"header",{},()=>[h.hiddenHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(f),{key:0,onPreview:u,onSave:i},{header:e.withCtx(()=>[e.renderSlot(d.$slots,"header-prefix")]),prefix:e.withCtx(()=>[e.renderSlot(d.$slots,"header-prefix")]),title:e.withCtx(()=>[e.renderSlot(d.$slots,"header-title")]),"right-prefix":e.withCtx(()=>[e.renderSlot(d.$slots,"header-right-prefix")]),"right-action":e.withCtx(()=>[e.renderSlot(d.$slots,"header-right-action")]),"right-suffix":e.withCtx(()=>[e.renderSlot(d.$slots,"header-right-suffix")]),_:3}))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-split-view-container",{"hidden-header":t.hiddenHeader}])},[e.createVNode(e.unref(a)),e.createVNode(e.unref(g)),e.createVNode(e.unref(c))],2),e.createVNode(ft,{ref_key:"previewRef",ref:D},null,512)])]),fallback:e.withCtx(()=>[e.createElementVNode("div",vt,[e.createVNode(e.unref(S))])]),_:3})):(e.openBlock(),e.createElementBlock("div",pt))}}),yt={component:async()=>await Promise.resolve().then(()=>require("./index-Bv6UOkMb.cjs")),defaultSchema:{label:"代码编辑器",type:"monacoEditor",field:"monacoEditor",icon:"epic-icon-write",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"monacoEditor",field:"componentProps.defaultValue"}]},bindModel:"model-value"},{t:le}=K.useLocale(),wt={component:async()=>await Promise.resolve().then(()=>require("./index-Ch9jeYmj.cjs")),defaultSchema:{label:le("page"),type:"page",componentProps:{},children:[]},config:{attribute:[{label:le("pageName"),type:"input",componentProps:{placeholder:le("pleaseEnter")},field:"componentProps.name"}]}},{t:oe}=K.useLocale();function St(t){t.component("EInputSize",async()=>await Promise.resolve().then(()=>require("./index-waYHs7SN.cjs"))),t.component("EColEditor",async()=>await Promise.resolve().then(()=>require("./index-DER3z6SG.cjs"))),t.component("EActionEditor",async()=>await Promise.resolve().then(()=>require("./index-wjKD4mBu.cjs"))),t.component("ERuleEditor",async()=>await Promise.resolve().then(()=>require("./index-Dh-5bgQx.cjs"))),t.component("EOptionsEditor",async()=>await Promise.resolve().then(()=>require("./index-BK6ipjbo.cjs"))),t.component("ENode",async()=>await Promise.resolve().then(()=>require("./index-CP9mOhqZ.cjs"))),t.component("EDataSource",async()=>await Promise.resolve().then(()=>require("./index-BU-UAvHC.cjs"))),t.component("EColumnEditor",async()=>await Promise.resolve().then(()=>require("./index-CBKTyKT5.cjs"))),t.component("PaddingMarginControl",async()=>await Promise.resolve().then(()=>require("./index-CGSKdgpe.cjs"))),t.component("ESourceDataSelect",async()=>await Promise.resolve().then(()=>require("./index-CqmYHiDr.cjs"))),t.component("EValidateParam",async()=>await Promise.resolve().then(()=>require("./index-Ce2UbX3P.cjs"))),t.component("EDescribe",async()=>await Promise.resolve().then(()=>require("./index-EU7IKyES.cjs"))),t.registerActivitybar({id:"component_view",title:oe("component"),icon:"icon--epic--extension-outline",component:async()=>await Promise.resolve().then(()=>require("./index-C0sL_Cow.cjs"))}),t.registerActivitybar({id:"outline_view",title:oe("outline"),icon:"icon--epic--account-tree-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./outline-BkNtj_2a.cjs"))}),t.registerRightSidebar({id:"attribute_view",title:oe("attribute"),component:async()=>await Promise.resolve().then(()=>require("./attributeView-CDOlTCej.cjs"))}),t.registerRightSidebar({id:"style_view",title:oe("style"),component:async()=>await Promise.resolve().then(()=>require("./styleView-sZrNBCuS.cjs"))}),t.registerRightSidebar({id:"event_view",title:"事件",component:async()=>await Promise.resolve().then(()=>require("./eventView-BExxE07B.cjs"))}),[yt,wt].forEach(r=>{t.registerComponent(r)})}St(E.pluginManager);exports.ENode=fe;exports._sfc_main=pe;exports._sfc_main$1=gt;exports.debounce=xe;exports.getDarkState=we;exports.initStore=Se;exports.useDark=ye;exports.useElementDrag=st;exports.useElementSize=ot;exports.useElementZoom=it;exports.useKeyPress=be;exports.usePageManager=ie;exports.useResizeObserver=ge;exports.useRevoke=de;exports.useStorage=nt;exports.useStore=j;exports.useTheme=at;exports.useTimedQuery=ct;exports.useVModel=rt;exports.watchOnce=He;
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as b, createElementBlock as d, openBlock as r, createElementVNode as g, createVNode as n, Fragment as U, renderList as h, unref as t, withCtx as C, createTextVNode as k, reactive as B } from "vue";
2
- import { g as N } from "./index-sFE9uQIP.js";
2
+ import { g as N } from "./index-BCfsLh0H.js";
3
3
  import { p as c } from "./pluginManager-B0y107-1.js";
4
4
  import { _ as $ } from "./icon.vue_vue_type_script_setup_true_lang-DW206h_7.js";
5
- import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import { _ as E } from "./_plugin-vue_export-helper-8DRKdUfJ.js";
6
6
  const I = { class: "validate-param" }, M = { class: "option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2 grid-cols-[auto_auto_16px]" }, w = /* @__PURE__ */ b({
7
7
  __name: "index",
8
8
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as L, computed as C, inject as j, createElementBlock as i, openBlock as n, createElementVNode as p, Fragment as g, renderList as k, createCommentVNode as M, unref as c, toDisplayString as q, createVNode as y, ref as T, watchEffect as D, createBlock as F, withCtx as N, createTextVNode as O } from "vue";
2
2
  import { p as I, a as B } from "./pluginManager-B0y107-1.js";
3
- import { E as U, g as A } from "./index-sFE9uQIP.js";
3
+ import { E as U, g as A } from "./index-BCfsLh0H.js";
4
4
  import { _ as z } from "./icon.vue_vue_type_script_setup_true_lang-DW206h_7.js";
5
5
  import { u as E } from "./index-B1s67XDZ.js";
6
6
  const $ = [
@@ -2,7 +2,7 @@ import { defineComponent as oe, ref as O, reactive as re, onMounted as de, creat
2
2
  import { p as f, E as q } from "./pluginManager-B0y107-1.js";
3
3
  import { ElMessage as L } from "element-plus";
4
4
  import { _ } from "./icon.vue_vue_type_script_setup_true_lang-DW206h_7.js";
5
- import { a as ne } from "./index-3k1IXN1T.js";
5
+ import { a as ne } from "./_plugin-vue_export-helper-8DRKdUfJ.js";
6
6
  import { u as ie, a as R } from "./index-B1s67XDZ.js";
7
7
  const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { class: "drawer-content" }, ve = { class: "drawer-content-left" }, fe = ["onClick"], he = { class: "source-item-title" }, ye = ["onClick"], be = { class: "drawer-content-right" }, ge = { class: "content" }, Ve = {
8
8
  key: 0,
@@ -2,7 +2,7 @@ import { defineComponent as W, onMounted as z, ref as b, createElementBlock as S
2
2
  import { p as E } from "./pluginManager-B0y107-1.js";
3
3
  import { u as q } from "./index-B1s67XDZ.js";
4
4
  import { ElMessage as A } from "element-plus";
5
- import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import { _ as D } from "./_plugin-vue_export-helper-8DRKdUfJ.js";
6
6
  const F = { class: "box-model-container" }, G = { class: "visual-box" }, H = { class: "margin-area" }, J = { class: "margin-btns" }, K = { class: "margin-input top" }, O = { class: "margin-input right" }, Q = { class: "margin-input bottom" }, T = { class: "margin-input left" }, X = { class: "border-area" }, Y = { class: "padding-area" }, Z = { class: "padding-btns" }, y = { class: "padding-input top" }, ll = { class: "padding-input right" }, tl = { class: "padding-input bottom" }, el = { class: "padding-input left" }, nl = /* @__PURE__ */ W({
7
7
  __name: "index",
8
8
  props: {