epic-designer-gold 1.0.5 → 1.0.6
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-B2dWB_U2.cjs → attributeView-CEFjPemt.cjs} +1 -1
- package/dist/{attributeView-Cu_tjo9A.js → attributeView-C_rnFDGo.js} +3 -3
- package/dist/{axios-B8aFvCWj.cjs → axios-B5oA4AjJ.cjs} +1 -1
- package/dist/{axios-Bb3STC1u.js → axios-awtfJhsA.js} +1 -1
- package/dist/index-AH-Lj15r.js +107 -0
- package/dist/{index-VblxMq6V.js → index-B0rUZfG_.js} +2 -2
- package/dist/{index-CMbBKMQU.js → index-BEMPXyNN.js} +2 -2
- package/dist/{index-BhcwWM1G.cjs → index-BOUKAGKU.cjs} +1 -1
- package/dist/index-B_BKVTct.cjs +1 -0
- package/dist/{index-Bn8pwpgq.cjs → index-Ba8KVYrQ.cjs} +1 -1
- package/dist/{index-D0kQz_zt.js → index-BfdYrl-Q.js} +1 -1
- package/dist/{index-21c4Pe3i.cjs → index-BnLI5N3M.cjs} +1 -1
- package/dist/index-BpROfyMH.cjs +1 -0
- package/dist/index-BxCrqMkz.cjs +1 -0
- package/dist/{index-DeZ09CHf.cjs → index-CBBK4Aze.cjs} +1 -1
- package/dist/index-CDTcUcwY.cjs +1 -0
- package/dist/{index-CgwN4ucQ.js → index-CFZioB1O.js} +2 -2
- package/dist/{index-BLJT8e0Q.js → index-Ce470l1n.js} +4 -4
- package/dist/{index-CHCOxt3B.js → index-CeVV_SOj.js} +3 -3
- package/dist/{index-DxNdcsD-.js → index-CoCyrWM2.js} +124 -120
- package/dist/{index-CYAKMqdR.cjs → index-Cq5wbnmA.cjs} +1 -1
- package/dist/index-D8olMR4m.cjs +10 -0
- package/dist/index-DENcRmIy.js +47 -0
- package/dist/{index-CqeRfqUw.cjs → index-DK4PrvRF.cjs} +1 -1
- package/dist/{index-Dg7MK40D.js → index-DWxy0GSJ.js} +6 -2
- package/dist/{index-DeFAvWuV.cjs → index-DaJuXp0q.cjs} +1 -1
- package/dist/index-DfRZtELz.js +4 -0
- package/dist/{index-Bybwt7-u.js → index-DpF9E6J8.js} +1 -1
- package/dist/{index-DUMEtCCN.cjs → index-J9twEwWw.cjs} +1 -1
- package/dist/{index-CjIIhZdV.js → index-P13z5c0g.js} +3 -3
- package/dist/{index-CEDIwmNK.js → index-cElDeAm2.js} +2 -2
- package/dist/{index-BULuVnVl.js → index-oMkqg9Zb.js} +194 -186
- package/dist/{index-BV9SE7wG.cjs → index-tR-Y01R8.cjs} +1 -1
- package/dist/{index-Bxi3JLms.cjs → index-vzxiD3pz.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/locale/lang/en-US.d.ts +2 -0
- package/dist/locale/lang/zh-cn.d.ts +2 -0
- package/dist/{outline-DxCKINRN.js → outline-DQ8wgGyH.js} +2 -2
- package/dist/{outline-CK-jNomF.cjs → outline-JJ0IbSzs.cjs} +1 -1
- package/dist/sign-BBoshwS_.cjs +1 -0
- package/dist/{sign-B-FCN_7O.js → sign-Dfqcv4Fg.js} +52 -48
- package/dist/style.css +1 -1
- package/dist/{styleView-CRUqDcCl.cjs → styleView-CZEOSq2l.cjs} +1 -1
- package/dist/{styleView-ClMjCfMk.js → styleView-CajgzMOm.js} +3 -3
- package/dist/tree.vue_vue_type_script_setup_true_lang-B-8wkdQS.js +243 -0
- package/dist/tree.vue_vue_type_script_setup_true_lang-BS6Anq-8.cjs +1 -0
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +4 -4
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +1 -1
- package/dist/{uploadFile-oB2-NP-v.cjs → uploadFile-BHn9oVA8.cjs} +1 -1
- package/dist/{uploadFile-Bc5Rxk0b.js → uploadFile-D_0_6ghp.js} +1 -1
- package/dist/{uploadImage-CGXm3zNQ.js → uploadImage-4U4YGGfK.js} +1 -1
- package/dist/{uploadImage-CF7fobUP.cjs → uploadImage-B3tV49Mm.cjs} +1 -1
- package/dist/{uploadImage-4tgp3t7X.cjs → uploadImage-C-OyUMFn.cjs} +1 -1
- package/dist/{uploadImage-COCC3pxH.js → uploadImage-Z6Y6KN1R.js} +1 -1
- package/package.json +1 -1
- package/dist/index-B553TaXm.js +0 -44
- package/dist/index-CEvDmc0a.js +0 -104
- package/dist/index-CI3dhGXT.cjs +0 -1
- package/dist/index-Cq6eLpKZ.cjs +0 -1
- package/dist/index-CrV5FaWU.cjs +0 -10
- package/dist/index-DR80h8IU.js +0 -4
- package/dist/index-DddTXMY9.cjs +0 -1
- package/dist/index-DzxQG0o7.cjs +0 -1
- package/dist/sign-Dho4kHTC.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js +0 -242
- package/dist/tree.vue_vue_type_script_setup_true_lang-DDDqMedP.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./index-D8olMR4m.cjs"),l=require("./axios-B5oA4AjJ.cjs"),g=require("./index-BpROfyMH.cjs"),b=["title"],B=e.defineComponent({__name:"attributeView",setup(P){const{t:r}=g.useLocale(),d=e.inject("designer"),u=e.inject("pageSchema"),f=e.inject("revoke"),h=l.pluginManager.getComponentConfings(),c=e.computed(()=>d.state.checkedNode);function y(n){var a;return typeof n.show=="boolean"?n.show:typeof n.show=="function"?(a=n.show)==null?void 0:a.call(n,{values:c.value}):!0}const i=e.ref([]);e.watchEffect(()=>{var o,t,s;const n=(o=d.state.checkedNode)==null?void 0:o.type;if(!d.state.checkedNode||!n)return[];const a=((t=h[n])==null?void 0:t.config.attribute)??[];i.value=[{label:r("componentId"),type:"input",field:"id",componentProps:{disabled:!0}},...a],d.state.checkedNode.id===((s=u.schemas[0])==null?void 0:s.id)&&i.value.push({label:r("canvasWidth"),type:"EInputSize",field:"canvas.width",editData:u},{label:r("canvasHeight"),type:"EInputSize",field:"canvas.height",editData:u})});function m(n,a,o,t=c.value){typeof o.onChange=="function"&&o.onChange({value:n,values:t,componentAttributes:i}),o.changeSync?l.setValueByPath(t,a,n):e.nextTick(()=>{l.setValueByPath(t,a,n)}),f.push(u.schemas,r("editComponentProperties"))}function v(n,a,o=c.value){e.nextTick(()=>{l.setValueByPath(o,"componentProps.dynamicId",n)})}return(n,a)=>{var o;return e.openBlock(),e.createElementBlock("div",{class:"epic-attribute-view",key:(o=c.value)==null?void 0:o.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,t=>{var s;return e.openBlock(),e.createElementBlock("div",{key:t.field},[y(t)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["epic-attr-item",t.layout])},[t.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"epic-attr-label",title:t.label},e.toDisplayString(t.label),9,b)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["epic-attr-input",{"block!":t.layout==="vertical"}])},[e.createVNode(e.unref(k._sfc_main),{componentSchema:{...t,componentProps:{...t.componentProps,...t.field==="componentProps.defaultValue"?(s=c.value)==null?void 0:s.componentProps:{},input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},dynamicId:e.unref(l.getValueByPath)(t.editData??c.value,"componentProps.dynamicId"),"model-value":e.unref(l.getValueByPath)(t.editData??c.value,t.field),"onUpdate:modelValue":p=>m(p,t.field,t,t.editData),"onUpdate:dynamicId":p=>v(p)},null,8,["componentSchema","dynamicId","model-value","onUpdate:modelValue","onUpdate:dynamicId"])],2)],2)):e.createCommentVNode("",!0)])}),128))])}}});exports.default=B;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as S, inject as f, computed as V, ref as C, watchEffect as N, openBlock as s, createElementBlock as l, Fragment as E, renderList as U, normalizeClass as v, toDisplayString as B, createCommentVNode as y, createElementVNode as D, createVNode as x, unref as h, nextTick as g } from "vue";
|
|
2
|
-
import { _ as z } from "./index-
|
|
3
|
-
import { p as j, j as b, s as m } from "./axios-
|
|
4
|
-
import { u as F } from "./index-
|
|
2
|
+
import { _ as z } from "./index-oMkqg9Zb.js";
|
|
3
|
+
import { p as j, j as b, s as m } from "./axios-awtfJhsA.js";
|
|
4
|
+
import { u as F } from "./index-DWxy0GSJ.js";
|
|
5
5
|
const L = ["title"], $ = /* @__PURE__ */ S({
|
|
6
6
|
__name: "attributeView",
|
|
7
7
|
setup(T) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var dt=Object.defineProperty;var pt=(t,e,n)=>e in t?dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>pt(t,typeof e!="symbol"?e+"":e,n);const q=require("vue"),ht=require("./index-Cq6eLpKZ.cjs"),J=(t,e)=>q.defineAsyncComponent({loader:t,loadingComponent:e,delay:80});function Z(t=10){const e="abcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++){const s=Math.floor(Math.random()*e.length);n+=e[s]}return n}function mt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const{t:Re}=ht.useLocale();function K(t,e=new WeakMap){if(typeof t!="object"||t===null)return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const r=t.map(s=>K(s,e));return e.set(t,r),r}const n={};return e.set(t,n),Object.keys(t).forEach(r=>{n[r]=K(t[r],e)}),n}function yt(t){const[e]=Ie([K(t)],n=>{var s,o;const r={...n,id:`${n.type}_${Z(8)}`};return(r.field||r.input)&&!((o=(s=He.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&o.fixedField)&&(r.field=r.id),r});return e}function me(t,e,n=!0){for(const[r,s]of Object.entries(e)){let o=t==null?void 0:t[r];o&&s&&typeof o=="object"&&typeof s=="object"?(Array.isArray(o)&&!Array.isArray(s)?o=t[r]={}:!Array.isArray(o)&&Array.isArray(s)&&(o=t[r]=[]),me(o,s,n)):t[r]=s}n&&Object.keys(t).reverse().forEach(r=>{e.hasOwnProperty(r)||(Array.isArray(t)?t.splice(Number(r),1):delete t[r])})}function gt(t,e,n=[],r=new WeakMap){const s=o=>{if(Array.isArray(o))return o.map(s);if(typeof o=="object"&&o!==null){if(r.has(o))return"[Circular]";r.set(o,!0);const i=Object.keys(o).sort(),c={};return i.forEach(f=>{n.includes(f)||(c[f]=s(o[f]))}),r.delete(o),c}else return o};return JSON.stringify(s(t))===JSON.stringify(s(e))}function wt(t,e){const n=[];let r=!1;function s(o){if(n.push(o),o.id===e&&(r=!0),!r&&o.children!=null&&o.children.length>0)for(let i=0;i<o.children.length&&(s(o.children[i]),!r);i++);if(!r&&o.slots)for(let i in o.slots)for(let c=0;c<o.slots[i].length&&(s(o.slots[i][c]),!r);c++);r||n.pop()}return t.forEach(s),r||console.error(`没有查询到id为${e}的节点`),n}function bt(t,e,n){const r=e.split(".");let s=t;for(let o=0;o<r.length;o++){if(s==null)return n;s=s[r[o]]}return s===void 0?n:s}function St(t,e,n){const r=e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let s=t;for(let o=0;o<r.length-1;o++){const i=r[o];s[i]==null&&(s[i]=isNaN(Number(r[o+1]))?{}:[]),s=s[i]}return s[r[r.length-1]]=n,t}function Et(t,e="default"){return Ue(t,e).map(r=>r.field)}function Ue(t,e="default"){const n=H(t,s=>{var o;return s.type==="form"&&(((o=s.componentProps)==null?void 0:o.name)??s.name===e)},!0);return H((n==null?void 0:n.children)??[],s=>!!s.input,!1,s=>s.type!=="subform")}function H(t,e,n=!1,r){const s=[],o=[...t];for(;o.length;){const i=o.pop();if(i!=null&&i.children&&(!r||r(i))&&o.push(...i.children),i!=null&&i.slots&&(!r||r(i)))for(let c in i.slots)o.push(...i.slots[c]);if(e(i)&&(s.push(i),n))return i}return n?!1:s}function Ie(t,e,n){const r=[...t];for(;r.length;){const s=r.pop();if(s!=null&&s.children&&(!n||n(s))&&r.push(...s.children),s!=null&&s.slots&&(!n||n(s)))for(let o in s.slots)r.push(...s.slots[o]);me(s,e(s))}return t}function Rt(t,e){const n=H(t,r=>r.id===e,!0);if(!n)throw new Error(`没有查询到id为${e}的节点`);return n}function Ct(t,e){const n=[{type:"",children:t}];let r=0,s=null;if(H(n,o=>{if(s=o.children??null,!s){if(o!=null&&o.slots)for(let i in o.slots){s=o.slots[i];for(let c=0;c<s.length;c++)if(s[c].id===e)return r=c,!0}return!1}for(let i=0;i<s.length;i++)if(s[i].id===e)return r=i,!0;return!1},!0),!s)throw new Error(`没有查询到id为${e}的节点`);return{list:s,schema:s[r],index:r}}function At(t){const e={schemas:[{type:"page",id:"root",label:Re("page"),children:[{label:Re("form"),type:"form",icon:"epic-icon-daibanshixiang",labelWidth:t.config.labelWidth||100,name:"default",componentProps:{layout:t.config.layout||"horizontal",labelWidth:t.config.labelWidth||100,labelLayout:t.config.labelLayout==="flex"?"fixed":"flex",labelCol:t.config.labelCol||{span:5},wrapperCol:t.config.wrapperCol||{span:19},hideRequiredMark:t.config.hideRequiredMark||!1,colon:t.config.colon||!0,labelAlign:t.config.labelAlign||"right",size:t.config.size||"middle"},children:[],id:"form_"+Z()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return e.schemas[0].children[0].children=k(t.list),e}function k(t,e){return t.map(n=>{var f,l,u;let r=n.type??"";const s=n.options??{},o=(d,g)=>{r===d&&(r=g,s.defaultValue&&(s.defaultValue=JSON.parse(s.defaultValue)))};if(o("uploadImg","upload-image"),o("uploadFile","upload-file"),r==="date"&&s.range&&(s.type="daterange",delete s.range),(r==="date"||r==="time")&&(s.valueFormat=s.format),r==="textarea"){const{minRows:d,maxRows:g}=s;s.autoSize={minRows:d,maxRows:g},delete s.minRows,delete s.maxRows}r==="number"&&!s.precision&&delete s.precision,s.width&&(s.style={width:s.width},delete s.width),r==="grid"&&(r="row"),e&&e.type==="grid"&&(r="col",s.span=n.span,n.key=Z());const i={label:n.label,type:r,icon:n.icon||"",field:n.model,componentProps:s,id:n.key};return(s.noFormItem||!s.showLabel)&&(i.noFormItem=!0,delete s.noFormItem,delete s.showLabel),s.clearable&&(s.allowClear=!0,delete s.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(r)&&(i.input=!0,((l=(f=n.rules)==null?void 0:f[0])==null?void 0:l.required)===!1&&n.rules.shift(),((u=n.rules)==null?void 0:u.length)>0&&(i.rules=n.rules)),n.list&&(i.children=k(n.list,n)),n.columns&&(i.children=k(n.columns,n)),n.trs&&(i.children=k(n.trs,n)),n.tds&&(i.children=k(n.tds,n)),i})}function Ot(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(s){s(n)}),(r=t.get("*"))&&r.slice().map(function(s){s(e,n)})}}}const Me=Ot();class qe{constructor(){T(this,"initialized",q.ref(!1));T(this,"sourceData",[]);T(this,"components",{});T(this,"componentConfigs",{});T(this,"baseComponentTypes",[]);T(this,"componentSchemaGroups",q.ref([]));T(this,"hiddenComponents",[]);T(this,"formSchemas",[{label:"表单",type:"form",componentProps:{layout:"horizontal",name:"default",labelWidth:100,labelLayout:"fixed",labelCol:{span:5},wrapperCol:{span:19},colon:!0,labelAlign:"right",labelPlacement:"left"},children:[],id:"root"}]);T(this,"componentGroupNameMap",{});T(this,"sortedGroups",["表单","布局"]);T(this,"viewsContainers",{activitybars:q.shallowRef([]),rightSidebars:q.shallowRef([])});T(this,"publicMethods",{})}component(e,n){typeof n=="function"&&(n=J(n)),this.components[e]=n}registerComponent(e){this.component(e.defaultSchema.type,e.component),e.defaultSchema.input&&(e.config.action||(e.config.action=[]),e.config.action.unshift({type:"setValue",describe:"设置值",argsConfigs:[{...e.defaultSchema,label:"设置数据",field:"0"}]},{type:"getValue",describe:"获取值"})),this.componentConfigs[e.defaultSchema.type]=e,this.computedComponentSchemaGroups()}removeComponent(e){delete this.componentConfigs[e],delete this.components[e]}setSourceData(e){this.sourceData=e,Me.emit("updateSource",new Date)}getSourceData(){return Object.prototype.toString.call(this.sourceData)==="[object Array]"?this.sourceData:[]}setBaseComponentTypes(e){this.baseComponentTypes=e}addBaseComponentTypes(e){this.baseComponentTypes.push(e)}removeBaseComponents(){this.baseComponentTypes.forEach(e=>{this.removeComponent(e)}),this.setBaseComponentTypes([]),this.computedComponentSchemaGroups()}getComponents(){return this.components}getComponent(e){return this.components[e]}registerActivitybar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.activitybars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.activitybars.value[n]=e:this.viewsContainers.activitybars.value.push(e)}getActivitybars(){return this.viewsContainers.activitybars.value}hideActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!1)}showActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!0)}registerRightSidebar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.rightSidebars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.rightSidebars.value[n]=e:this.viewsContainers.rightSidebars.value.push(e)}getRightSidebars(){return this.viewsContainers.rightSidebars.value}hideRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!1)}showRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!0)}getComponentConfings(){return this.componentConfigs}getComponentConfingByType(e){return this.componentConfigs[e]}computedComponentSchemaGroups(){const e=[];Object.values(this.componentConfigs).forEach(n=>{if(!this.hiddenComponents.includes(n.defaultSchema.type)&&n.groupName){const r=this.componentGroupNameMap[n.groupName]??n.groupName;let s=e.findIndex(i=>i.title===r);s===-1&&(e.push({title:r,list:[]}),s=e.length-1);let o=e[s].list.findIndex(i=>i.type===n.defaultSchema.type);o!==-1?e[s].list[o]=n.defaultSchema:e[s].list.push(n.defaultSchema)}}),e.sort((n,r)=>{const s=this.sortedGroups.indexOf(n.title),o=this.sortedGroups.indexOf(r.title);return s===-1?1:o===-1?-1:s-o}),e.forEach(n=>{n.list.sort((r,s)=>{var c,f;const o=((c=this.componentConfigs[r.type])==null?void 0:c.sort)??1e3,i=((f=this.componentConfigs[s.type])==null?void 0:f.sort)??1e3;return o-i})}),this.componentSchemaGroups.value=e}getComponentSchemaGroups(){return this.componentSchemaGroups}setComponentGroupNameMap(e,n){this.componentGroupNameMap[e]=n}clearComponentGroupNameMap(){this.componentGroupNameMap={}}setSortedGroups(e){this.sortedGroups=e,this.computedComponentSchemaGroups()}clearSortedGroups(){this.sortedGroups=[],this.computedComponentSchemaGroups()}hideComponent(e){this.hiddenComponents.push(e),this.computedComponentSchemaGroups()}showComponent(e){this.hiddenComponents=this.hiddenComponents.filter(n=>n!==e),this.computedComponentSchemaGroups()}setHideComponents(e){this.hiddenComponents=e,this.computedComponentSchemaGroups()}setInitialized(e){this.initialized.value=e}addPublicMethod(e){const n=e.methodName??e.name,r=e.method??e.handler;this.publicMethods[n]={...e,name:n,handler:r}}removePublicMethod(e){delete this.publicMethods[e]}}const He=new qe;function ze(t,e){return function(){return t.apply(e,arguments)}}const{toString:Tt}=Object.prototype,{getPrototypeOf:ye}=Object,Y=(t=>e=>{const n=Tt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=t=>(t=t.toLowerCase(),e=>Y(e)===t),ee=t=>e=>typeof e===t,{isArray:U}=Array,z=ee("undefined");function xt(t){return t!==null&&!z(t)&&t.constructor!==null&&!z(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const je=P("ArrayBuffer");function Pt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&je(t.buffer),e}const Nt=ee("string"),x=ee("function"),Ge=ee("number"),te=t=>t!==null&&typeof t=="object",Bt=t=>t===!0||t===!1,W=t=>{if(Y(t)!=="object")return!1;const e=ye(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ft=P("Date"),Lt=P("File"),_t=P("Blob"),Dt=P("FileList"),vt=t=>te(t)&&x(t.pipe),kt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||x(t.append)&&((e=Y(t))==="formdata"||e==="object"&&x(t.toString)&&t.toString()==="[object FormData]"))},Ut=P("URLSearchParams"),[It,Mt,qt,Ht]=["ReadableStream","Request","Response","Headers"].map(P),zt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function j(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),U(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let c;for(r=0;r<i;r++)c=o[r],e.call(null,t[c],c,t)}}function Ve(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const _=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Je=t=>!z(t)&&t!==_;function ce(){const{caseless:t}=Je(this)&&this||{},e={},n=(r,s)=>{const o=t&&Ve(e,s)||s;W(e[o])&&W(r)?e[o]=ce(e[o],r):W(r)?e[o]=ce({},r):U(r)?e[o]=r.slice():e[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&j(arguments[r],n);return e}const jt=(t,e,n,{allOwnKeys:r}={})=>(j(e,(s,o)=>{n&&x(s)?t[o]=ze(s,n):t[o]=s},{allOwnKeys:r}),t),Gt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vt=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Jt=(t,e,n,r)=>{let s,o,i;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=n!==!1&&ye(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},$t=t=>{if(!t)return null;if(U(t))return t;let e=t.length;if(!Ge(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Kt=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ye(Uint8Array)),Xt=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Qt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Zt=P("HTMLFormElement"),Yt=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ce=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),en=P("RegExp"),We=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};j(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},tn=t=>{We(t,(e,n)=>{if(x(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(x(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nn=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return U(t)?r(t):r(String(t).split(e)),n},rn=()=>{},sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,se="abcdefghijklmnopqrstuvwxyz",Ae="0123456789",$e={DIGIT:Ae,ALPHA:se,ALPHA_DIGIT:se+se.toUpperCase()+Ae},on=(t=16,e=$e.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function an(t){return!!(t&&x(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const cn=t=>{const e=new Array(10),n=(r,s)=>{if(te(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const o=U(r)?[]:{};return j(r,(i,c)=>{const f=n(i,s+1);!z(f)&&(o[c]=f)}),e[s]=void 0,o}}return r};return n(t,0)},ln=P("AsyncFunction"),un=t=>t&&(te(t)||x(t))&&x(t.then)&&x(t.catch),Ke=((t,e)=>t?setImmediate:e?((n,r)=>(_.addEventListener("message",({source:s,data:o})=>{s===_&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),_.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(_.postMessage)),fn=typeof queueMicrotask<"u"?queueMicrotask.bind(_):typeof process<"u"&&process.nextTick||Ke,a={isArray:U,isArrayBuffer:je,isBuffer:xt,isFormData:kt,isArrayBufferView:Pt,isString:Nt,isNumber:Ge,isBoolean:Bt,isObject:te,isPlainObject:W,isReadableStream:It,isRequest:Mt,isResponse:qt,isHeaders:Ht,isUndefined:z,isDate:Ft,isFile:Lt,isBlob:_t,isRegExp:en,isFunction:x,isStream:vt,isURLSearchParams:Ut,isTypedArray:Kt,isFileList:Dt,forEach:j,merge:ce,extend:jt,trim:zt,stripBOM:Gt,inherits:Vt,toFlatObject:Jt,kindOf:Y,kindOfTest:P,endsWith:Wt,toArray:$t,forEachEntry:Xt,matchAll:Qt,isHTMLForm:Zt,hasOwnProperty:Ce,hasOwnProp:Ce,reduceDescriptors:We,freezeMethods:tn,toObjectSet:nn,toCamelCase:Yt,noop:rn,toFiniteNumber:sn,findKey:Ve,global:_,isContextDefined:Je,ALPHABET:$e,generateString:on,isSpecCompliantForm:an,toJSONObject:cn,isAsyncFn:ln,isThenable:un,setImmediate:Ke,asap:fn};function m(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Xe=m.prototype,Qe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Qe[t]={value:t}});Object.defineProperties(m,Qe);Object.defineProperty(Xe,"isAxiosError",{value:!0});m.from=(t,e,n,r,s,o)=>{const i=Object.create(Xe);return a.toFlatObject(t,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,t.message,e,n,r,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const dn=null;function le(t){return a.isPlainObject(t)||a.isArray(t)}function Ze(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function Oe(t,e,n){return t?t.concat(e).map(function(s,o){return s=Ze(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function pn(t){return a.isArray(t)&&!t.some(le)}const hn=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!a.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&pn(p)||(a.isFileList(p)||a.endsWith(y,"[]"))&&(w=a.toArray(p)))return y=Ze(y),w.forEach(function(R,N){!(a.isUndefined(R)||R===null)&&e.append(i===!0?Oe([y],N,o):i===null?y:y+"[]",l(R))}),!1}return le(p)?!0:(e.append(Oe(h,y,o),l(p)),!1)}const d=[],g=Object.assign(hn,{defaultVisitor:u,convertValue:l,isVisitable:le});function S(p,y){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),a.forEach(p,function(w,E){(!(a.isUndefined(w)||w===null)&&s.call(e,w,a.isString(E)?E.trim():E,y,g))===!0&&S(w,y?y.concat(E):[E])}),d.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return S(t),e}function Te(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ge(t,e){this._pairs=[],t&&ne(t,this,e)}const Ye=ge.prototype;Ye.append=function(e,n){this._pairs.push([e,n])};Ye.toString=function(e){const n=e?function(r){return e.call(this,r,Te)}:Te;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function et(t,e,n){if(!e)return t;const r=n&&n.encode||mn,s=n&&n.serialize;let o;if(s?o=s(e,n):o=a.isURLSearchParams(e)?e.toString():new ge(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class xe{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn=typeof URLSearchParams<"u"?URLSearchParams:ge,gn=typeof FormData<"u"?FormData:null,wn=typeof Blob<"u"?Blob:null,bn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:gn,Blob:wn},protocols:["http","https","file","blob","url","data"]},we=typeof window<"u"&&typeof document<"u",ue=typeof navigator=="object"&&navigator||void 0,Sn=we&&(!ue||["ReactNative","NativeScript","NS"].indexOf(ue.product)<0),En=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rn=we&&window.location.href||"http://localhost",Cn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:we,hasStandardBrowserEnv:Sn,hasStandardBrowserWebWorkerEnv:En,navigator:ue,origin:Rn},Symbol.toStringTag,{value:"Module"})),A={...Cn,...bn};function An(t,e){return ne(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return A.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function On(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Tn(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function nt(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Tn(s[i])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,s)=>{e(On(r),s,n,0)}),n}return null}function xn(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const G={transitional:tt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(e);if(o&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(nt(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return An(e,this.formSerializer).toString();if((c=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ne(c?{"files[]":e}:e,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),xn(e)):e}],transformResponse:[function(e){const n=this.transitional||G.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{G.headers[t]={}});const Pn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nn=t=>{const e={};let n,r,s;return t&&t.split(`
|
|
1
|
+
"use strict";var dt=Object.defineProperty;var pt=(t,e,n)=>e in t?dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>pt(t,typeof e!="symbol"?e+"":e,n);const q=require("vue"),ht=require("./index-BpROfyMH.cjs"),J=(t,e)=>q.defineAsyncComponent({loader:t,loadingComponent:e,delay:80});function Z(t=10){const e="abcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++){const s=Math.floor(Math.random()*e.length);n+=e[s]}return n}function mt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const{t:Re}=ht.useLocale();function K(t,e=new WeakMap){if(typeof t!="object"||t===null)return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const r=t.map(s=>K(s,e));return e.set(t,r),r}const n={};return e.set(t,n),Object.keys(t).forEach(r=>{n[r]=K(t[r],e)}),n}function yt(t){const[e]=Ie([K(t)],n=>{var s,o;const r={...n,id:`${n.type}_${Z(8)}`};return(r.field||r.input)&&!((o=(s=He.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&o.fixedField)&&(r.field=r.id),r});return e}function me(t,e,n=!0){for(const[r,s]of Object.entries(e)){let o=t==null?void 0:t[r];o&&s&&typeof o=="object"&&typeof s=="object"?(Array.isArray(o)&&!Array.isArray(s)?o=t[r]={}:!Array.isArray(o)&&Array.isArray(s)&&(o=t[r]=[]),me(o,s,n)):t[r]=s}n&&Object.keys(t).reverse().forEach(r=>{e.hasOwnProperty(r)||(Array.isArray(t)?t.splice(Number(r),1):delete t[r])})}function gt(t,e,n=[],r=new WeakMap){const s=o=>{if(Array.isArray(o))return o.map(s);if(typeof o=="object"&&o!==null){if(r.has(o))return"[Circular]";r.set(o,!0);const i=Object.keys(o).sort(),c={};return i.forEach(f=>{n.includes(f)||(c[f]=s(o[f]))}),r.delete(o),c}else return o};return JSON.stringify(s(t))===JSON.stringify(s(e))}function wt(t,e){const n=[];let r=!1;function s(o){if(n.push(o),o.id===e&&(r=!0),!r&&o.children!=null&&o.children.length>0)for(let i=0;i<o.children.length&&(s(o.children[i]),!r);i++);if(!r&&o.slots)for(let i in o.slots)for(let c=0;c<o.slots[i].length&&(s(o.slots[i][c]),!r);c++);r||n.pop()}return t.forEach(s),r||console.error(`没有查询到id为${e}的节点`),n}function bt(t,e,n){const r=e.split(".");let s=t;for(let o=0;o<r.length;o++){if(s==null)return n;s=s[r[o]]}return s===void 0?n:s}function St(t,e,n){const r=e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let s=t;for(let o=0;o<r.length-1;o++){const i=r[o];s[i]==null&&(s[i]=isNaN(Number(r[o+1]))?{}:[]),s=s[i]}return s[r[r.length-1]]=n,t}function Et(t,e="default"){return Ue(t,e).map(r=>r.field)}function Ue(t,e="default"){const n=H(t,s=>{var o;return s.type==="form"&&(((o=s.componentProps)==null?void 0:o.name)??s.name===e)},!0);return H((n==null?void 0:n.children)??[],s=>!!s.input,!1,s=>s.type!=="subform")}function H(t,e,n=!1,r){const s=[],o=[...t];for(;o.length;){const i=o.pop();if(i!=null&&i.children&&(!r||r(i))&&o.push(...i.children),i!=null&&i.slots&&(!r||r(i)))for(let c in i.slots)o.push(...i.slots[c]);if(e(i)&&(s.push(i),n))return i}return n?!1:s}function Ie(t,e,n){const r=[...t];for(;r.length;){const s=r.pop();if(s!=null&&s.children&&(!n||n(s))&&r.push(...s.children),s!=null&&s.slots&&(!n||n(s)))for(let o in s.slots)r.push(...s.slots[o]);me(s,e(s))}return t}function Rt(t,e){const n=H(t,r=>r.id===e,!0);if(!n)throw new Error(`没有查询到id为${e}的节点`);return n}function Ct(t,e){const n=[{type:"",children:t}];let r=0,s=null;if(H(n,o=>{if(s=o.children??null,!s){if(o!=null&&o.slots)for(let i in o.slots){s=o.slots[i];for(let c=0;c<s.length;c++)if(s[c].id===e)return r=c,!0}return!1}for(let i=0;i<s.length;i++)if(s[i].id===e)return r=i,!0;return!1},!0),!s)throw new Error(`没有查询到id为${e}的节点`);return{list:s,schema:s[r],index:r}}function At(t){const e={schemas:[{type:"page",id:"root",label:Re("page"),children:[{label:Re("form"),type:"form",icon:"epic-icon-daibanshixiang",labelWidth:t.config.labelWidth||100,name:"default",componentProps:{layout:t.config.layout||"horizontal",labelWidth:t.config.labelWidth||100,labelLayout:t.config.labelLayout==="flex"?"fixed":"flex",labelCol:t.config.labelCol||{span:5},wrapperCol:t.config.wrapperCol||{span:19},hideRequiredMark:t.config.hideRequiredMark||!1,colon:t.config.colon||!0,labelAlign:t.config.labelAlign||"right",size:t.config.size||"middle"},children:[],id:"form_"+Z()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return e.schemas[0].children[0].children=k(t.list),e}function k(t,e){return t.map(n=>{var f,l,u;let r=n.type??"";const s=n.options??{},o=(d,g)=>{r===d&&(r=g,s.defaultValue&&(s.defaultValue=JSON.parse(s.defaultValue)))};if(o("uploadImg","upload-image"),o("uploadFile","upload-file"),r==="date"&&s.range&&(s.type="daterange",delete s.range),(r==="date"||r==="time")&&(s.valueFormat=s.format),r==="textarea"){const{minRows:d,maxRows:g}=s;s.autoSize={minRows:d,maxRows:g},delete s.minRows,delete s.maxRows}r==="number"&&!s.precision&&delete s.precision,s.width&&(s.style={width:s.width},delete s.width),r==="grid"&&(r="row"),e&&e.type==="grid"&&(r="col",s.span=n.span,n.key=Z());const i={label:n.label,type:r,icon:n.icon||"",field:n.model,componentProps:s,id:n.key};return(s.noFormItem||!s.showLabel)&&(i.noFormItem=!0,delete s.noFormItem,delete s.showLabel),s.clearable&&(s.allowClear=!0,delete s.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(r)&&(i.input=!0,((l=(f=n.rules)==null?void 0:f[0])==null?void 0:l.required)===!1&&n.rules.shift(),((u=n.rules)==null?void 0:u.length)>0&&(i.rules=n.rules)),n.list&&(i.children=k(n.list,n)),n.columns&&(i.children=k(n.columns,n)),n.trs&&(i.children=k(n.trs,n)),n.tds&&(i.children=k(n.tds,n)),i})}function Ot(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(s){s(n)}),(r=t.get("*"))&&r.slice().map(function(s){s(e,n)})}}}const Me=Ot();class qe{constructor(){T(this,"initialized",q.ref(!1));T(this,"sourceData",[]);T(this,"components",{});T(this,"componentConfigs",{});T(this,"baseComponentTypes",[]);T(this,"componentSchemaGroups",q.ref([]));T(this,"hiddenComponents",[]);T(this,"formSchemas",[{label:"表单",type:"form",componentProps:{layout:"horizontal",name:"default",labelWidth:100,labelLayout:"fixed",labelCol:{span:5},wrapperCol:{span:19},colon:!0,labelAlign:"right",labelPlacement:"left"},children:[],id:"root"}]);T(this,"componentGroupNameMap",{});T(this,"sortedGroups",["表单","布局"]);T(this,"viewsContainers",{activitybars:q.shallowRef([]),rightSidebars:q.shallowRef([])});T(this,"publicMethods",{})}component(e,n){typeof n=="function"&&(n=J(n)),this.components[e]=n}registerComponent(e){this.component(e.defaultSchema.type,e.component),e.defaultSchema.input&&(e.config.action||(e.config.action=[]),e.config.action.unshift({type:"setValue",describe:"设置值",argsConfigs:[{...e.defaultSchema,label:"设置数据",field:"0"}]},{type:"getValue",describe:"获取值"})),this.componentConfigs[e.defaultSchema.type]=e,this.computedComponentSchemaGroups()}removeComponent(e){delete this.componentConfigs[e],delete this.components[e]}setSourceData(e){this.sourceData=e,Me.emit("updateSource",new Date)}getSourceData(){return Object.prototype.toString.call(this.sourceData)==="[object Array]"?this.sourceData:[]}setBaseComponentTypes(e){this.baseComponentTypes=e}addBaseComponentTypes(e){this.baseComponentTypes.push(e)}removeBaseComponents(){this.baseComponentTypes.forEach(e=>{this.removeComponent(e)}),this.setBaseComponentTypes([]),this.computedComponentSchemaGroups()}getComponents(){return this.components}getComponent(e){return this.components[e]}registerActivitybar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.activitybars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.activitybars.value[n]=e:this.viewsContainers.activitybars.value.push(e)}getActivitybars(){return this.viewsContainers.activitybars.value}hideActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!1)}showActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!0)}registerRightSidebar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.rightSidebars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.rightSidebars.value[n]=e:this.viewsContainers.rightSidebars.value.push(e)}getRightSidebars(){return this.viewsContainers.rightSidebars.value}hideRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!1)}showRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!0)}getComponentConfings(){return this.componentConfigs}getComponentConfingByType(e){return this.componentConfigs[e]}computedComponentSchemaGroups(){const e=[];Object.values(this.componentConfigs).forEach(n=>{if(!this.hiddenComponents.includes(n.defaultSchema.type)&&n.groupName){const r=this.componentGroupNameMap[n.groupName]??n.groupName;let s=e.findIndex(i=>i.title===r);s===-1&&(e.push({title:r,list:[]}),s=e.length-1);let o=e[s].list.findIndex(i=>i.type===n.defaultSchema.type);o!==-1?e[s].list[o]=n.defaultSchema:e[s].list.push(n.defaultSchema)}}),e.sort((n,r)=>{const s=this.sortedGroups.indexOf(n.title),o=this.sortedGroups.indexOf(r.title);return s===-1?1:o===-1?-1:s-o}),e.forEach(n=>{n.list.sort((r,s)=>{var c,f;const o=((c=this.componentConfigs[r.type])==null?void 0:c.sort)??1e3,i=((f=this.componentConfigs[s.type])==null?void 0:f.sort)??1e3;return o-i})}),this.componentSchemaGroups.value=e}getComponentSchemaGroups(){return this.componentSchemaGroups}setComponentGroupNameMap(e,n){this.componentGroupNameMap[e]=n}clearComponentGroupNameMap(){this.componentGroupNameMap={}}setSortedGroups(e){this.sortedGroups=e,this.computedComponentSchemaGroups()}clearSortedGroups(){this.sortedGroups=[],this.computedComponentSchemaGroups()}hideComponent(e){this.hiddenComponents.push(e),this.computedComponentSchemaGroups()}showComponent(e){this.hiddenComponents=this.hiddenComponents.filter(n=>n!==e),this.computedComponentSchemaGroups()}setHideComponents(e){this.hiddenComponents=e,this.computedComponentSchemaGroups()}setInitialized(e){this.initialized.value=e}addPublicMethod(e){const n=e.methodName??e.name,r=e.method??e.handler;this.publicMethods[n]={...e,name:n,handler:r}}removePublicMethod(e){delete this.publicMethods[e]}}const He=new qe;function ze(t,e){return function(){return t.apply(e,arguments)}}const{toString:Tt}=Object.prototype,{getPrototypeOf:ye}=Object,Y=(t=>e=>{const n=Tt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=t=>(t=t.toLowerCase(),e=>Y(e)===t),ee=t=>e=>typeof e===t,{isArray:U}=Array,z=ee("undefined");function xt(t){return t!==null&&!z(t)&&t.constructor!==null&&!z(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const je=P("ArrayBuffer");function Pt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&je(t.buffer),e}const Nt=ee("string"),x=ee("function"),Ge=ee("number"),te=t=>t!==null&&typeof t=="object",Bt=t=>t===!0||t===!1,W=t=>{if(Y(t)!=="object")return!1;const e=ye(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ft=P("Date"),Lt=P("File"),_t=P("Blob"),Dt=P("FileList"),vt=t=>te(t)&&x(t.pipe),kt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||x(t.append)&&((e=Y(t))==="formdata"||e==="object"&&x(t.toString)&&t.toString()==="[object FormData]"))},Ut=P("URLSearchParams"),[It,Mt,qt,Ht]=["ReadableStream","Request","Response","Headers"].map(P),zt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function j(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),U(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let c;for(r=0;r<i;r++)c=o[r],e.call(null,t[c],c,t)}}function Ve(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const _=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Je=t=>!z(t)&&t!==_;function ce(){const{caseless:t}=Je(this)&&this||{},e={},n=(r,s)=>{const o=t&&Ve(e,s)||s;W(e[o])&&W(r)?e[o]=ce(e[o],r):W(r)?e[o]=ce({},r):U(r)?e[o]=r.slice():e[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&j(arguments[r],n);return e}const jt=(t,e,n,{allOwnKeys:r}={})=>(j(e,(s,o)=>{n&&x(s)?t[o]=ze(s,n):t[o]=s},{allOwnKeys:r}),t),Gt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vt=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Jt=(t,e,n,r)=>{let s,o,i;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=n!==!1&&ye(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},$t=t=>{if(!t)return null;if(U(t))return t;let e=t.length;if(!Ge(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Kt=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ye(Uint8Array)),Xt=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Qt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Zt=P("HTMLFormElement"),Yt=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ce=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),en=P("RegExp"),We=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};j(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},tn=t=>{We(t,(e,n)=>{if(x(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(x(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nn=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return U(t)?r(t):r(String(t).split(e)),n},rn=()=>{},sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,se="abcdefghijklmnopqrstuvwxyz",Ae="0123456789",$e={DIGIT:Ae,ALPHA:se,ALPHA_DIGIT:se+se.toUpperCase()+Ae},on=(t=16,e=$e.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function an(t){return!!(t&&x(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const cn=t=>{const e=new Array(10),n=(r,s)=>{if(te(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const o=U(r)?[]:{};return j(r,(i,c)=>{const f=n(i,s+1);!z(f)&&(o[c]=f)}),e[s]=void 0,o}}return r};return n(t,0)},ln=P("AsyncFunction"),un=t=>t&&(te(t)||x(t))&&x(t.then)&&x(t.catch),Ke=((t,e)=>t?setImmediate:e?((n,r)=>(_.addEventListener("message",({source:s,data:o})=>{s===_&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),_.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(_.postMessage)),fn=typeof queueMicrotask<"u"?queueMicrotask.bind(_):typeof process<"u"&&process.nextTick||Ke,a={isArray:U,isArrayBuffer:je,isBuffer:xt,isFormData:kt,isArrayBufferView:Pt,isString:Nt,isNumber:Ge,isBoolean:Bt,isObject:te,isPlainObject:W,isReadableStream:It,isRequest:Mt,isResponse:qt,isHeaders:Ht,isUndefined:z,isDate:Ft,isFile:Lt,isBlob:_t,isRegExp:en,isFunction:x,isStream:vt,isURLSearchParams:Ut,isTypedArray:Kt,isFileList:Dt,forEach:j,merge:ce,extend:jt,trim:zt,stripBOM:Gt,inherits:Vt,toFlatObject:Jt,kindOf:Y,kindOfTest:P,endsWith:Wt,toArray:$t,forEachEntry:Xt,matchAll:Qt,isHTMLForm:Zt,hasOwnProperty:Ce,hasOwnProp:Ce,reduceDescriptors:We,freezeMethods:tn,toObjectSet:nn,toCamelCase:Yt,noop:rn,toFiniteNumber:sn,findKey:Ve,global:_,isContextDefined:Je,ALPHABET:$e,generateString:on,isSpecCompliantForm:an,toJSONObject:cn,isAsyncFn:ln,isThenable:un,setImmediate:Ke,asap:fn};function m(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Xe=m.prototype,Qe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Qe[t]={value:t}});Object.defineProperties(m,Qe);Object.defineProperty(Xe,"isAxiosError",{value:!0});m.from=(t,e,n,r,s,o)=>{const i=Object.create(Xe);return a.toFlatObject(t,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,t.message,e,n,r,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const dn=null;function le(t){return a.isPlainObject(t)||a.isArray(t)}function Ze(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function Oe(t,e,n){return t?t.concat(e).map(function(s,o){return s=Ze(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function pn(t){return a.isArray(t)&&!t.some(le)}const hn=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!a.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&pn(p)||(a.isFileList(p)||a.endsWith(y,"[]"))&&(w=a.toArray(p)))return y=Ze(y),w.forEach(function(R,N){!(a.isUndefined(R)||R===null)&&e.append(i===!0?Oe([y],N,o):i===null?y:y+"[]",l(R))}),!1}return le(p)?!0:(e.append(Oe(h,y,o),l(p)),!1)}const d=[],g=Object.assign(hn,{defaultVisitor:u,convertValue:l,isVisitable:le});function S(p,y){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),a.forEach(p,function(w,E){(!(a.isUndefined(w)||w===null)&&s.call(e,w,a.isString(E)?E.trim():E,y,g))===!0&&S(w,y?y.concat(E):[E])}),d.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return S(t),e}function Te(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ge(t,e){this._pairs=[],t&&ne(t,this,e)}const Ye=ge.prototype;Ye.append=function(e,n){this._pairs.push([e,n])};Ye.toString=function(e){const n=e?function(r){return e.call(this,r,Te)}:Te;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function et(t,e,n){if(!e)return t;const r=n&&n.encode||mn,s=n&&n.serialize;let o;if(s?o=s(e,n):o=a.isURLSearchParams(e)?e.toString():new ge(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class xe{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn=typeof URLSearchParams<"u"?URLSearchParams:ge,gn=typeof FormData<"u"?FormData:null,wn=typeof Blob<"u"?Blob:null,bn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:gn,Blob:wn},protocols:["http","https","file","blob","url","data"]},we=typeof window<"u"&&typeof document<"u",ue=typeof navigator=="object"&&navigator||void 0,Sn=we&&(!ue||["ReactNative","NativeScript","NS"].indexOf(ue.product)<0),En=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rn=we&&window.location.href||"http://localhost",Cn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:we,hasStandardBrowserEnv:Sn,hasStandardBrowserWebWorkerEnv:En,navigator:ue,origin:Rn},Symbol.toStringTag,{value:"Module"})),A={...Cn,...bn};function An(t,e){return ne(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return A.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function On(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Tn(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function nt(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Tn(s[i])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,s)=>{e(On(r),s,n,0)}),n}return null}function xn(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const G={transitional:tt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(e);if(o&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(nt(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return An(e,this.formSerializer).toString();if((c=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ne(c?{"files[]":e}:e,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),xn(e)):e}],transformResponse:[function(e){const n=this.transitional||G.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{G.headers[t]={}});const Pn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nn=t=>{const e={};let n,r,s;return t&&t.split(`
|
|
2
2
|
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&Pn[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Pe=Symbol("internals");function M(t){return t&&String(t).trim().toLowerCase()}function $(t){return t===!1||t==null?t:a.isArray(t)?t.map($):String(t)}function Bn(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Fn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function oe(t,e,n,r,s){if(a.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function Ln(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function _n(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,o,i){return this[r].call(this,e,s,o,i)},configurable:!0})})}class O{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(c,f,l){const u=M(f);if(!u)throw new Error("header name must be a non-empty string");const d=a.findKey(s,u);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||f]=$(c))}const i=(c,f)=>a.forEach(c,(l,u)=>o(l,u,f));if(a.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(a.isString(e)&&(e=e.trim())&&!Fn(e))i(Nn(e),n);else if(a.isHeaders(e))for(const[c,f]of e.entries())o(f,c,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=M(e),e){const r=a.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return Bn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=M(e),e){const r=a.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||oe(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(i){if(i=M(i),i){const c=a.findKey(r,i);c&&(!n||oe(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(e)?e.forEach(o):o(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!e||oe(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=$(s),delete n[o];return}const c=e?Ln(o):String(o).trim();c!==o&&delete n[o],n[c]=$(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
3
3
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Pe]=this[Pe]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=M(i);r[c]||(_n(s,i),r[c]=!0)}return a.isArray(e)?e.forEach(o):o(e),this}}O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(O.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});a.freezeMethods(O);function ie(t,e){const n=this||G,r=e||n,s=O.from(r.headers);let o=r.data;return a.forEach(t,function(c){o=c.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function rt(t){return!!(t&&t.__CANCEL__)}function I(t,e,n){m.call(this,t??"canceled",m.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(I,m,{__CANCEL__:!0});function st(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Dn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function vn(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),u=r[o];i||(i=l),n[s]=f,r[s]=l;let d=o,g=0;for(;d!==s;)g+=n[d++],d=d%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-i<e)return;const S=u&&l-u;return S?Math.round(g*1e3/S):void 0}}function kn(t,e){let n=0,r=1e3/e,s,o;const i=(l,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const X=(t,e,n=3)=>{let r=0;const s=vn(50,250);return kn(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=i-r,l=s(f),u=i<=c;r=i;const d={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&u?(c-i)/l:void 0,event:o,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(d)},n)},Ne=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Be=t=>(...e)=>a.asap(()=>t(...e)),Un=A.hasStandardBrowserEnv?function(){const e=A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),In=A.hasStandardBrowserEnv?{write(t,e,n,r,s,o){const i=[t+"="+encodeURIComponent(e)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Mn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function qn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ot(t,e){return t&&!Mn(e)?qn(t,e):e}const Fe=t=>t instanceof O?{...t}:t;function v(t,e){e=e||{};const n={};function r(l,u,d){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:d},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,d){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,d)}else return r(l,u,d)}function o(l,u){if(!a.isUndefined(u))return r(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,d){if(d in e)return r(l,u);if(d in t)return r(void 0,l)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,u)=>s(Fe(l),Fe(u),!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=f[u]||s,g=d(t[u],e[u],u);a.isUndefined(g)&&d!==c||(n[u]=g)}),n}const it=t=>{const e=v({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=e;e.headers=i=O.from(i),e.url=et(ot(e.baseURL,e.url),t.params,t.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(a.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[l,...u]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(e)),r||r!==!1&&Un(e.url))){const l=s&&o&&In.read(o);l&&i.set(s,l)}return e},Hn=typeof XMLHttpRequest<"u",zn=Hn&&function(t){return new Promise(function(n,r){const s=it(t);let o=s.data;const i=O.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,u,d,g,S,p;function y(){S&&S(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function w(){if(!h)return;const R=O.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),C={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:R,config:t,request:h};st(function(L){n(L),y()},function(L){r(L),y()},C),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new m("Request aborted",m.ECONNABORTED,t,h)),h=null)},h.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||tt;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),r(new m(N,C.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&a.forEach(i.toJSON(),function(N,C){h.setRequestHeader(C,N)}),a.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),l&&([g,p]=X(l,!0),h.addEventListener("progress",g)),f&&h.upload&&([d,S]=X(f),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(u=R=>{h&&(r(!R||R.type?new I(null,t,h):R),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const E=Dn(s.url);if(E&&A.protocols.indexOf(E)===-1){r(new m("Unsupported protocol "+E+":",m.ERR_BAD_REQUEST,t));return}h.send(o||null)})},jn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof m?u:new I(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new m(`timeout ${e} of ms exceeded`,m.ETIMEDOUT))},e);const c=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},Gn=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},Vn=async function*(t,e){for await(const n of Jn(t))yield*Gn(n,e)},Jn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Le=(t,e,n,r)=>{const s=Vn(t,e);let o=0,i,c=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){c(),f.close();return}let d=u.byteLength;if(n){let g=o+=d;n(g)}f.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",at=re&&typeof ReadableStream=="function",Wn=re&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ct=(t,...e)=>{try{return!!t(...e)}catch{return!1}},$n=at&&ct(()=>{let t=!1;const e=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),_e=64*1024,fe=at&&ct(()=>a.isReadableStream(new Response("").body)),Q={stream:fe&&(t=>t.body)};re&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Q[e]&&(Q[e]=a.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new m(`Response type '${e}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const Kn=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(A.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await Wn(t)).byteLength},Xn=async(t,e)=>{const n=a.toFiniteNumber(t.getContentLength());return n??Kn(e)},Qn=re&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:g}=it(t);l=l?(l+"").toLowerCase():"text";let S=jn([s,o&&o.toAbortSignal()],i),p;const y=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let h;try{if(f&&$n&&n!=="get"&&n!=="head"&&(h=await Xn(u,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),B;if(a.isFormData(r)&&(B=C.headers.get("content-type"))&&u.setContentType(B),C.body){const[L,V]=Ne(h,X(Be(f)));r=Le(C.body,_e,L,V)}}a.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;p=new Request(e,{...g,signal:S,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let E=await fetch(p);const R=fe&&(l==="stream"||l==="response");if(fe&&(c||R&&y)){const C={};["status","statusText","headers"].forEach(Ee=>{C[Ee]=E[Ee]});const B=a.toFiniteNumber(E.headers.get("content-length")),[L,V]=c&&Ne(B,X(Be(c),!0))||[];E=new Response(Le(E.body,_e,L,()=>{V&&V(),y&&y()}),C)}l=l||"text";let N=await Q[a.findKey(Q,l)||"text"](E,t);return!R&&y&&y(),await new Promise((C,B)=>{st(C,B,{data:N,headers:O.from(E.headers),status:E.status,statusText:E.statusText,config:t,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,t,p),{cause:w.cause||w}):m.from(w,w&&w.code,t,p)}}),de={http:dn,xhr:zn,fetch:Qn};a.forEach(de,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const De=t=>`- ${t}`,Zn=t=>a.isFunction(t)||t===null||t===!1,lt={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let o=0;o<e;o++){n=t[o];let i;if(r=n,!Zn(n)&&(r=de[(i=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=e?o.length>1?`since :
|
|
4
4
|
`+o.map(De).join(`
|
|
@@ -2,7 +2,7 @@ var ct = Object.defineProperty;
|
|
|
2
2
|
var lt = (t, e, n) => e in t ? ct(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var T = (t, e, n) => lt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { defineAsyncComponent as ut, ref as Se, shallowRef as Ee } from "vue";
|
|
5
|
-
import { u as ft } from "./index-
|
|
5
|
+
import { u as ft } from "./index-DWxy0GSJ.js";
|
|
6
6
|
const ee = (t, e) => ut({
|
|
7
7
|
loader: t,
|
|
8
8
|
loadingComponent: e,
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as F, inject as r, ref as V, computed as h, openBlock as v, createElementBlock as f, createElementVNode as n, createVNode as p, unref as l, withCtx as N, Fragment as M, renderList as j, normalizeClass as L, toDisplayString as g, mergeProps as q, withDirectives as A, vShow as G } from "vue";
|
|
2
|
+
import { d as H } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
3
|
+
import { p as d, i as B, q as J } from "./axios-awtfJhsA.js";
|
|
4
|
+
import { _ as I } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
+
import { u as K, a as O } from "./index-DWxy0GSJ.js";
|
|
6
|
+
const Q = { class: "epic-component-view flex flex-col" }, R = { class: "epic-search-box px-10px py-6px" }, W = { class: "flex flex-1 overflow-auto" }, X = { class: "epic-tabs-box" }, Y = ["title", "onClick"], Z = { class: "h-full flex-1 overflow-auto py-2 box-border" }, ee = ["onClick"], te = ["title"], ie = /* @__PURE__ */ F({
|
|
7
|
+
__name: "index",
|
|
8
|
+
setup(oe) {
|
|
9
|
+
const { t: c } = K(), $ = d.getComponent("input"), x = r("pageSchema"), C = r("designer"), z = r("revoke"), P = r("designerProps"), _ = d.getComponentSchemaGroups(), s = V(""), k = {
|
|
10
|
+
title: c("all"),
|
|
11
|
+
list: []
|
|
12
|
+
}, T = h(() => (O.get("saas-locale") || "zh-CN") === "zh-CN"), i = V(k), U = h(() => [k, ..._.value]), u = h(() => {
|
|
13
|
+
let o = i.value.list;
|
|
14
|
+
if (i.value.title === c("all")) {
|
|
15
|
+
const t = _.value.map((e) => e.list);
|
|
16
|
+
o = [].concat(...t);
|
|
17
|
+
}
|
|
18
|
+
return o.filter(
|
|
19
|
+
(t) => {
|
|
20
|
+
var e;
|
|
21
|
+
return ((e = t.label) == null ? void 0 : e.includes(s.value)) && (!P.value.formMode || t.type !== "form");
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
function D(o) {
|
|
26
|
+
i.value = o;
|
|
27
|
+
}
|
|
28
|
+
function E(o) {
|
|
29
|
+
var S, b, w;
|
|
30
|
+
const t = J(x.schemas, ((S = C.state.checkedNode) == null ? void 0 : S.id) ?? "root");
|
|
31
|
+
if (!t)
|
|
32
|
+
return !1;
|
|
33
|
+
let { list: e, schema: a, index: m } = t;
|
|
34
|
+
a.children && !((w = (b = d.getComponentConfingByType(a.type)) == null ? void 0 : b.editConstraints) != null && w.childImmovable) && (e = a.children, m = a.children.length - 1);
|
|
35
|
+
const y = B(o);
|
|
36
|
+
e.splice(m + 1, 0, y), C.setCheckedNode(y), z.push(x.schemas, "插入组件");
|
|
37
|
+
}
|
|
38
|
+
return (o, t) => (v(), f("div", Q, [
|
|
39
|
+
n("div", R, [
|
|
40
|
+
p(l($), {
|
|
41
|
+
placeholder: l(c)("searchComponent"),
|
|
42
|
+
modelValue: s.value,
|
|
43
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => s.value = e),
|
|
44
|
+
clearable: "",
|
|
45
|
+
allowClear: "",
|
|
46
|
+
value: s.value,
|
|
47
|
+
"onUpdate:value": t[1] || (t[1] = (e) => s.value = e)
|
|
48
|
+
}, {
|
|
49
|
+
prefix: N(() => [
|
|
50
|
+
p(l(I), {
|
|
51
|
+
class: "text-$epic-text-helper",
|
|
52
|
+
name: "icon--epic--search-rounded"
|
|
53
|
+
})
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["placeholder", "modelValue", "value"])
|
|
57
|
+
]),
|
|
58
|
+
n("div", W, [
|
|
59
|
+
n("div", X, [
|
|
60
|
+
(v(!0), f(M, null, j(U.value, (e, a) => (v(), f("div", {
|
|
61
|
+
class: L(["epic-tab cursor-pointer truncate", { checked: i.value.title === e.title }]),
|
|
62
|
+
key: a,
|
|
63
|
+
title: e.title,
|
|
64
|
+
onClick: (m) => D(e)
|
|
65
|
+
}, g(e.title), 11, Y))), 128))
|
|
66
|
+
]),
|
|
67
|
+
n("div", Z, [
|
|
68
|
+
p(l(H), q({
|
|
69
|
+
modelValue: u.value,
|
|
70
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => u.value = e)
|
|
71
|
+
}, {
|
|
72
|
+
group: { name: "edit-draggable", pull: "clone", put: !1 },
|
|
73
|
+
sort: !1,
|
|
74
|
+
animation: 180,
|
|
75
|
+
ghostClass: "moving"
|
|
76
|
+
}, {
|
|
77
|
+
clone: l(B),
|
|
78
|
+
"item-key": "id",
|
|
79
|
+
class: "grid grid-cols-[auto_auto] px-10px gap-2"
|
|
80
|
+
}), {
|
|
81
|
+
item: N(({ element: e }) => [
|
|
82
|
+
n("div", {
|
|
83
|
+
class: "epic-componet-item flex items-center truncate",
|
|
84
|
+
onClick: (a) => E(e)
|
|
85
|
+
}, [
|
|
86
|
+
p(l(I), {
|
|
87
|
+
name: l(d).getComponentConfingByType(e.type).icon ?? ""
|
|
88
|
+
}, null, 8, ["name"]),
|
|
89
|
+
n("div", {
|
|
90
|
+
title: e.label,
|
|
91
|
+
class: L([[T.value ? "text-14px" : "text-12px"], "epic-componet-label flex-1 w-0 truncate"])
|
|
92
|
+
}, g(e.label), 11, te)
|
|
93
|
+
], 8, ee)
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
}, 16, ["modelValue", "clone"]),
|
|
97
|
+
A(n("div", { class: "text-center pt-42px text-gray-400" }, g(l(c)("noComponentFound")), 513), [
|
|
98
|
+
[G, !u.value.length]
|
|
99
|
+
])
|
|
100
|
+
])
|
|
101
|
+
])
|
|
102
|
+
]));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
ie as default
|
|
107
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as Y, inject as M, ref as C, computed as A, watch as te, openBlock as N, createElementBlock as D, Fragment as G, withDirectives as fe, createElementVNode as R, normalizeClass as oe, toDisplayString as Ne, unref as u, createVNode as z, createCommentVNode as Q, vShow as ve, createBlock as le, mergeProps as $e, withCtx as se, useAttrs as Te, provide as Re, onUnmounted as Be, resolveComponent as Oe, createSlots as Me, renderList as pe, shallowRef as Le, watchEffect as De, nextTick as ye, normalizeStyle as re, renderSlot as He, onMounted as Ve } from "vue";
|
|
2
|
-
import { p as J, q as ie, i as ue, d as he, r as Ee } from "./axios-
|
|
3
|
-
import { u as me, a as ze, b as ce, _ as Pe, c as We, d as Ae, e as Ie, w as je, f as Fe } from "./index-
|
|
2
|
+
import { p as J, q as ie, i as ue, d as he, r as Ee } from "./axios-awtfJhsA.js";
|
|
3
|
+
import { u as me, a as ze, b as ce, _ as Pe, c as We, d as Ae, e as Ie, w as je, f as Fe } from "./index-oMkqg9Zb.js";
|
|
4
4
|
import { _ as ee } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
5
|
import { d as Ue } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
6
6
|
const Je = { class: "epic-widget-action-item whitespace-nowrap" }, Ze = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as g, computed as k, openBlock as a, createElementBlock as l, Fragment as y, renderList as C, createVNode as r, unref as s, createElementVNode as c, createCommentVNode as U, toDisplayString as P } from "vue";
|
|
2
|
-
import { p as b, g as E } from "./axios-
|
|
2
|
+
import { p as b, g as E } from "./axios-awtfJhsA.js";
|
|
3
3
|
import { _ as N } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
4
|
-
import { u as x } from "./index-
|
|
4
|
+
import { u as x } from "./index-DWxy0GSJ.js";
|
|
5
5
|
const D = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "epic-del-btn"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./axios-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./axios-B5oA4AjJ.cjs"),h=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-D8olMR4m.cjs");require("element-plus");const C=require("./index-BpROfyMH.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E={key:0,class:"pl-4"},B=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:f}){const o=_,m=c.pluginManager.getComponent("input"),v=e.inject("tree",!1),d=f,r=k.useVModel(o,"modelValue",d);function s(l){const n={label:"",value:""};l.children?l.children.push(n):l.children=[n]}function V(l){r.value=r.value.filter((n,p)=>p!==l)}return(l,n)=>{const p=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(b.draggable),{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=a=>e.isRef(r)?r.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:g})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(v)?"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(h._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(m),{modelValue:a.label,"onUpdate:modelValue":t=>a.label=t,value:a.label,"onUpdate:value":t=>a.label=t,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(m),{modelValue:a.value,"onUpdate:modelValue":t=>a.value=t,value:a.value,"onUpdate:value":t=>a.value=t,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(v)?(e.openBlock(),e.createBlock(e.unref(h._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:t=>s(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(h._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:t=>V(g)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(p,{modelValue:a.children,"onUpdate:modelValue":t=>a.children=t},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),S={class:""},U={class:"epic-tabs-box"},M=["title","onClick"],D={key:0},I={key:1},O={style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},q=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(_,{emit:f}){const{t:o}=C.useLocale(),m=c.pluginManager.getComponent("button"),v=c.pluginManager.getComponent("select"),d=e.ref([]),r=e.reactive({title:o("static")}),s=_,V=f;c.EventBus.on("deleteSourceData",t=>{n.value===t&&(n.value="",l.value=[])}),c.EventBus.on("updateSource",t=>{d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id}))}),e.onMounted(()=>{d.value=c.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id}))});const l=k.useVModel(s,"modelValue",V),n=k.useVModel(s,"dynamicId",V);e.watch(()=>n.value,async()=>{n.value?r.title=o("dynamic"):r.title=o("static")},{immediate:!0});const p=[{title:o("static")},{title:o("dynamic")}];async function a(t){r.title=t.title,t.title===o("static")?(l.value=[],n.value=""):(l.value=[],d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id})))}s.modelValue,e.provide("tree",s.tree);function g(){const t=e.reactive({label:"",value:""});l.value.length?l.value=[...l.value,t]:l.value=[t]}return(t,u)=>{var y;return e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",null,[e.createElementVNode("div",U,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(p,(i,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:r.title===i.title}]),key:x,title:i.title,onClick:w=>a(i)},e.toDisplayString(i.title),11,M)),64))]),r.title===e.unref(o)("static")?(e.openBlock(),e.createElementBlock("div",D,[e.withDirectives(e.createElementVNode("div",{class:"py-4 my-2 text-center text-gray-400 bg-white"},e.toDisplayString(e.unref(o)("noOptions")),513),[[e.vShow,!((y=e.unref(l))!=null&&y.length)]]),e.createVNode(B,{modelValue:e.unref(l),"onUpdate:modelValue":u[0]||(u[0]=i=>e.isRef(l)?l.value=i:null)},null,8,["modelValue"]),e.createVNode(e.unref(m),{onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("addOption")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("span",O,e.toDisplayString(e.unref(o)("dataSources")),1),e.createVNode(e.unref(v),{modelValue:e.unref(n),"onUpdate:modelValue":u[1]||(u[1]=i=>e.isRef(n)?n.value=i:null),placeholder:e.unref(o)("pleaseSelectDataSource"),clearable:"",options:d.value},null,8,["modelValue","placeholder","options"])]))])])}}}),$=N._export_sfc(q,[["__scopeId","data-v-0d8ca874"]]);exports.default=$;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./axios-B5oA4AjJ.cjs"),v=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),d=require("./index-BpROfyMH.cjs"),p={class:"flex relative"},_={class:"epic-action-bar"},m={class:"epic-actions-container"},f=["title","onClick"],h={class:"epic-sidebar-container"},k=e.defineComponent({name:"EActivityBar",__name:"index",setup(C){const s=e.computed(()=>(d.api.get("saas-locale")||"zh-CN")==="zh-CN"),i=e.computed(()=>u.pluginManager.viewsContainers.activitybars.value.filter(n=>n.visible)),t=e.ref(0),a=e.shallowRef(null);a.value=i.value[0].component;function r(n,c){if(t.value===c)return t.value=null,!1;a.value=n.component,t.value=c}return(n,c)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",_,[e.createElementVNode("ul",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,o)=>(e.openBlock(),e.createElementBlock("li",{key:o,class:e.normalizeClass(["epic-action-item",{checked:t.value===o}]),title:l.title,onClick:g=>r(l,o)},[e.createVNode(e.unref(v._sfc_main),{class:"relative",name:l.icon},null,8,["name"]),e.createElementVNode("div",{class:e.normalizeClass([s.value?"text-14px":"text-12px"])},e.toDisplayString(l.title),3)],10,f))),128))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-left-sidebar",{hide:t.value===null}])},[e.createElementVNode("div",h,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value)))])],2)]))}});exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./axios-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./axios-B5oA4AjJ.cjs"),k=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),V=require("./index-BpROfyMH.cjs"),f={key:0,class:"epic-del-btn"},g=["onClick"],h=e.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(r,{emit:u}){const{t:s}=V.useLocale(),d=c.pluginManager.getComponent("number"),p=r,i=u,o=e.computed({get(){return p.modelValue},set(t){i("update:modelValue",t)}});function m(){const t={type:"col",children:[],componentProps:{span:12},id:c.getUUID()};o.value.push(t)}function _(t){o.value=o.value.filter((v,n)=>t!==n)}return(t,v)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"EColEditor-item"},[e.createVNode(e.unref(d),{value:n.componentProps.span,"onUpdate:value":l=>n.componentProps.span=l,modelValue:n.componentProps.span,"onUpdate:modelValue":l=>n.componentProps.span=l,style:{width:"100%"},min:1,max:24},null,8,["value","onUpdate:value","modelValue","onUpdate:modelValue"]),o.value.length>1?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",{onClick:l=>_(a)},[e.createVNode(e.unref(k._sfc_main),{name:"icon--epic--trash"})],8,g)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{class:"add-btn",onClick:m},e.toDisplayString(e.unref(s)("add")),1)]))}});exports.default=h;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, inject as B, openBlock as t, createElementBlock as s, Fragment as C, renderList as y, unref as n, createCommentVNode as h, createBlock as w, createElementVNode as r, withModifiers as f, toDisplayString as x, ref as g, computed as S, shallowRef as H, createVNode as k, normalizeClass as v, resolveDynamicComponent as R } from "vue";
|
|
2
|
-
import { p as $ } from "./axios-
|
|
2
|
+
import { p as $ } from "./axios-awtfJhsA.js";
|
|
3
3
|
import { _ as M } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
4
4
|
const V = { class: "epic-breadcrumb pl-4 py-2 truncate h-40px flex items-center" }, j = {
|
|
5
5
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("./axios-B8aFvCWj.cjs"),O=require("./index-CrV5FaWU.cjs"),U=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),oe=require("./vuedraggable.umd-BqhSJIAi.cjs"),le={class:"epic-widget-action-item whitespace-nowrap"},ae={key:0,class:"flex items-center"},re=e.defineComponent({__name:"previewWidgets",setup(F,{expose:R}){const p=e.inject("pageManager",{}),g=e.inject("pageSchema"),l=e.inject("designer"),b=e.inject("designerProps"),c=e.inject("revoke"),h=e.ref(null),B=e.ref(null),C=e.ref(null),$=e.ref(!1),a=e.ref(!1),r=e.ref(!0),i=e.ref("top"),{canvasScale:s,disabledZoom:N}=O.useStore();let o=null;const j=e.computed(()=>{const t=l.state.checkedNode;return!(!(t!=null&&t.id)||b.value.lockDefaultSchemaEdit&&p.defaultComponentIds.value.includes(t==null?void 0:t.id)||t.type==="table-col")}),z=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table-col"}),V=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table"}),m=e.computed(()=>{var v,_,x,u,M,L;const t=p.componentInstances.value,d=(v=l.state.checkedNode)==null?void 0:v.id;if((x=(_=l.state.checkedNode)==null?void 0:_.componentProps)!=null&&x.hidden)return null;const f=w.pluginManager.getComponentConfingByType((u=l.state.checkedNode)==null?void 0:u.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((M=l.state.checkedNode)==null?void 0:M.noFormItem)!==!0)return(L=t[d+"formItem"])==null?void 0:L.$el;const n=t[d];return!(n!=null&&n.$el)||(n==null?void 0:n.$el.nodeName)==="#text"||!(n!=null&&n.$el.getBoundingClientRect)?null:n==null?void 0:n.$el}),y=e.computed(()=>{var v,_,x,u;const t=p.componentInstances.value,d=(v=l.state.hoverNode)==null?void 0:v.id,f=w.pluginManager.getComponentConfingByType((_=l.state.hoverNode)==null?void 0:_.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((x=l.state.hoverNode)==null?void 0:x.noFormItem)!==!0)return(u=t[d+"formItem"])==null?void 0:u.$el;const n=t[d];return(n==null?void 0:n.$el.nodeName)==="#text"?null:n==null?void 0:n.$el}),{mutationObserver:k,observerConfig:D}=Q(J),{startTimedQuery:W,stopTimedQuery:E}=O.useTimedQuery(J);e.watch(()=>m.value,t=>{if(t){$.value=!0,k.observe(t,D);const d=t.parentNode;d&&(d.ondragstart=()=>{r.value=!1,W()},d.ondragend=()=>{r.value=!0,E()}),J()}else $.value=!1});const{mutationObserver:S,observerConfig:T}=Q(Z);e.watch(()=>y.value,t=>{t&&(S.observe(t,T),Z())});let H=0;e.watch(()=>{var t;return(t=l.state.hoverNode)==null?void 0:t.id},t=>{if(t){a.value=!0,clearTimeout(H);return}H=setTimeout(()=>{a.value=!1},300)});let A=0,I=0;function J(){const t=m.value;if(!t||!o)return;const{top:d,left:f}=o==null?void 0:o.getBoundingClientRect(),{top:n,left:v,width:_,height:x}=t.getBoundingClientRect(),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u,P=x/u;h.value&&(h.value.style.width=`${_/u}px`,h.value.style.height=`${P}px`,h.value.style.top=`${M/u}px`,h.value.style.left=`${L/u}px`,X(M,L)),C.value&&(M<45&&P<100?(C.value.style.top="",C.value.style.bottom="-30px",C.value.style["border-radius"]="0px 0px 4px 4px",i.value="bottom"):M<45?(C.value.style.top="0px",C.value.style["border-radius"]="0px 0px 4px 0",i.value="center"):(C.value.style.top="-30px",C.value.style["border-radius"]="4px 4px 0px 0px",i.value="top"))}function X(t,d){const f=m.value;if(!o||!f)return;const n=o.getBoundingClientRect(),{width:v}=f.getBoundingClientRect(),_=N.value?1:s.value,x=t/_-n.top;let u=d/_-n.left+v/_;u<n.width&&(u=0);const M=o.scrollTop-n.height/3+60,L=o.scrollTop+n.height/3*2,P=o.scrollLeft-n.width+200,q=o.scrollLeft+n.width-200;Math.abs(x-A)<10&&Math.abs(u-I)<10||(A=x,I=u,!(x>M&&x<L&&u>P&&u<q)&&(o.scrollTop=x,o.scrollLeft=u))}function Z(){var P,q;const t=y.value;if(!t)return;const{top:d,left:f}=(o==null?void 0:o.getBoundingClientRect())??{top:0,left:0},{top:n,left:v,width:_,height:x}=((P=t.getBoundingClientRect)==null?void 0:P.call(t))??((q=t.nextElementSibling)==null?void 0:q.getBoundingClientRect()),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u;B.value&&(B.value.style.width=`${_/u}px`,B.value.style.height=`${x/u}px`,B.value.style.top=`${M/u}px`,B.value.style.left=`${L/u}px`)}function Q(t){const d=window.MutationObserver,f={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new d(t),observerConfig:f}}function Y(){var n,v;const t=w.findSchemaInfoById(g.schemas,((n=l.state.checkedNode)==null?void 0:n.id)??"root");if(!t||!t.list||!t.list.length||!t.list[0].children||!t.list[0].children.length)return!1;let d=JSON.parse(JSON.stringify((v=t.list[0])==null?void 0:v.children[0]));d.children.forEach((_,x)=>{d.children[x].children=[]});const f=w.generateNewSchema(d);t.list[0].children.push(f),l.setCheckedNode(f),c.push(g.schemas,"表格增加一行")}function G(){var f,n,v,_;const t=w.findSchemaInfoById(g.schemas,((f=l.state.checkedNode)==null?void 0:f.id)??"root");if(!((n=t==null?void 0:t.list)!=null&&n.length)||!((_=(v=t.list[0])==null?void 0:v.children)!=null&&_.length))return!1;t.list[0].children.forEach(x=>{const u=x.children.length+1,M=Math.floor(24/u);x.children.forEach(L=>{L.componentProps.span=M}),x.children.push(w.generateNewSchema({type:"table-col",children:[],componentProps:{span:M}}))}),c.push(g.schemas,"表格增加一列")}function ee(){var _;const t=w.findSchemaInfoById(g.schemas,((_=l.state.checkedNode)==null?void 0:_.id)??"root");if(!t)return!1;const{list:d,schema:f,index:n}=t,v=w.generateNewSchema(f);d.splice(n+1,0,v),l.setCheckedNode(v),c.push(g.schemas,"复制组件")}function te(){var v;const t=w.findSchemaInfoById(g.schemas,((v=l.state.checkedNode)==null?void 0:v.id)??"root");if(!t)return!1;let{list:d,schema:f,index:n}=t;d.splice(n,1),n===d.length&&n--,l.setCheckedNode(d[n]),c.push(g.schemas,"删除组件")}function ne(t){o=t,o==null||o.addEventListener("scroll",()=>{J()}),O.useResizeObserver(m,J),O.useResizeObserver(y,Z)}return R({handleInit:ne}),(t,d)=>{var f,n,v,_,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:h,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",i.value+" "+(r.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:C},[e.createElementVNode("div",le,e.toDisplayString((n=e.unref(w.pluginManager).getComponentConfingByType(((f=e.unref(l).state.checkedNode)==null?void 0:f.type)??""))==null?void 0:n.defaultSchema.label),1),j.value||V.value||z.value?(e.openBlock(),e.createElementBlock("div",ae,[j.value?(e.openBlock(),e.createElementBlock("div",{key:0,title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:ee},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:1,title:"插入新行",class:"epic-widget-action-item pointer-events-auto",onClick:Y},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:2,title:"插入新列",class:"epic-widget-action-item pointer-events-auto",onClick:G,style:{transform:"rotate(270deg)"}},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("div",{key:3,title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:te},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--delete-outline-rounded"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,$.value&&((v=e.unref(l).state.checkedNode)==null?void 0:v.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:B,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,a.value&&((_=e.unref(l).state.checkedNode)==null?void 0:_.id)!==((x=e.unref(l).state.hoverNode)==null?void 0:x.id)]])],64)}}}),se=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(F,{emit:R}){const p=e.inject("designer"),g=e.inject("pageSchema"),l=e.inject("revoke"),b=F,c=R,h=e.computed({get(){return b.schemas},set(r){c("update:schemas",r)}});function B(r){p.setCheckedNode(h.value[r]),p.setDisableHover(!0)}function C(){p.setDisableHover(),l.push(g.schemas,"拖拽组件")}function $(){l.push(g.schemas,"插入组件")}function a(r){var i,s,N;return r.id===((i=g.schemas[0])==null?void 0:i.id)||(N=(s=w.pluginManager.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&N.immovable?"unmover-item":"draggable-item"}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(oe.draggable),e.mergeProps({modelValue:h.value,"onUpdate:modelValue":i[0]||(i[0]=s=>h.value=s),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:i[1]||(i[1]=s=>B(s.oldIndex)),onEnd:i[2]||(i[2]=s=>C()),onAdd:i[3]||(i[3]=s=>{B(s.newIndex),$()})}),{item:e.withCtx(({element:s,index:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",a(s)]),key:N},[e.createVNode(K,{schema:s},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),K=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(F){const R=e.useAttrs(),p=e.inject("designer"),g=e.inject("pageManager",{}),l=e.inject("pageSchema",{}),b=e.ref(null);e.provide("nodeAttrs",R);const c=F,h=e.computed(()=>{var N,o,j,z,V;const a=g.componentInstances.value,r=(N=c.schema)==null?void 0:N.id,i=w.pluginManager.getComponentConfingByType((o=c.schema)==null?void 0:o.type)??null;if(!r||!(a!=null&&a[r]))return null;if(i!=null&&i.defaultSchema.input&&((j=c.schema)==null?void 0:j.noFormItem)!==!0)return(z=a[r+"formItem"])==null?void 0:z.$el;const s=a[r];return((V=s==null?void 0:s.$el)==null?void 0:V.nodeName)==="#text"?null:s==null?void 0:s.$el});e.watch(()=>h.value,a=>{a==null||a.addEventListener("click",B,!1),a==null||a.addEventListener("mouseover",C,!1),a==null||a.addEventListener("mouseout",$,!1)}),e.onUnmounted(()=>{var a,r,i;(a=h.value)==null||a.removeEventListener("click",B,!1),(r=h.value)==null||r.removeEventListener("mouseover",C,!1),(i=h.value)==null||i.removeEventListener("mouseout",$,!1)});function B(a){a.stopPropagation(),p.setCheckedNode(c.schema)}function C(a){var r;c.schema.id!==((r=l.schemas[0])==null?void 0:r.id)&&(a.stopPropagation(),p.setHoverNode(c.schema))}function $(a){a.stopPropagation(),p.setHoverNode(null)}return(a,r)=>{var s,N;const i=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(O._sfc_main),{ref_key:"nodeRef",ref:b,componentSchema:c.schema},e.createSlots({_:2},[(N=(s=e.unref(w.pluginManager).getComponentConfingByType(c.schema.type))==null?void 0:s.editConstraints)!=null&&N.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.schema.children,o=>(e.openBlock(),e.createBlock(i,{key:o.id,schema:o},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[c.schema.children?(e.openBlock(),e.createBlock(se,{key:0,schemas:c.schema.children,"onUpdate:schemas":r[0]||(r[0]=o=>c.schema.children=o)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),ce={class:"min-w-750px rounded h-full"},ie=e.defineComponent({__name:"previewJson",setup(F,{expose:R}){const p=w.pluginManager.getComponent("modal"),g=w.pluginManager.getComponent("monacoEditor"),l={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},b=e.ref(null),c=e.ref(!1),h=e.inject("pageSchema");function B(){c.value=!1}function C(){c.value=!0,b.value?b.value.setValue(JSON.stringify(h,null,2)):setTimeout(()=>{C()},300)}function $(a="epic-data.json"){const r=JSON.stringify(h,null,2);var i=`data:text/json;charset=utf-8,${encodeURIComponent(r)}`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",a),s.click()}return R({handleOpen:C}),(a,r)=>(e.openBlock(),e.createBlock(e.unref(p),{modelValue:c.value,"onUpdate:modelValue":r[0]||(r[0]=i=>c.value=i),title:"查看数据",class:"w-900px",width:"900px",onClose:B,onOk:$,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.createVNode(e.unref(g),{ref_key:"monacoEditorRef",ref:b,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:l,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),de={class:"epic-edit-toolbar flex items-center justify-between px-2"},ue={class:"flex-1 h-full flex items-center"},fe={key:0,class:"epic-divider"},pe=["title","onClick"],he={class:"flex-1 h-full flex items-center justify-end"},me={key:0,class:"flex items-center ml-12px"},ve={class:"pr-8px w-82px cursor-pointer"},ge={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},ye=["title","onClick"],ke=e.defineComponent({__name:"toolbar",setup(F){const R=w.pluginManager.getComponent("select"),{canvasScale:p,disabledZoom:g}=O.useStore(),l=e.ref("pc"),b=e.inject("pageSchema"),c=e.inject("designer"),h=e.inject("revoke"),B=e.ref(null),C=[{icon:"icon--epic--computer-outline-rounded",title:"pc",key:"pc"},{icon:"icon--epic--tablet-android-outline-rounded",title:"平板",key:"pad"},{icon:"icon--epic--phone-iphone-outline-sharp",title:"手机",key:"mobile"}],$=e.computed(()=>[{icon:"icon--epic--trash",title:"清空",on:o},{icon:"icon--epic--undo",title:"撤销",on:s,disabled:!h.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:N,disabled:!h.undoList.value.length}]),a=e.ref(null),r=e.computed({get(){return`${(p.value*100).toFixed(0)}%`},set(m){const y=parseFloat(m);p.value=y/100}}),i=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function s(){const m=h.undo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function N(){const m=h.redo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function o(){c.reset()}function j(m){var D;const y=(D=m.target.files)==null?void 0:D[0];if(!y)return;m.target.value=null;const k=new FileReader;k.readAsText(y),k.onload=W=>{var E;z((E=W.target)==null?void 0:E.result)}}function z(m){try{let y=JSON.parse(m??"");y.schemas||(y=w.convertKFormData(y)),w.deepCompareAndModify(b,y)}catch(y){console.error(y)}}function V(m){c.handleToggleDeviceMode(m),l.value=m;const y={pc:{},pad:{width:"780px",mode:m},mobile:{width:"390px",height:"844px",mode:m}};b.canvas=y[m],console.log("%c [ pageSchema ]-248","font-size:13px; background:pink; color:#bf2c9f;",b)}return(m,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",de,[e.createElementVNode("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(k,D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D},[k.divider?(e.openBlock(),e.createElementBlock("div",fe)):e.createCommentVNode("",!0),e.createElementVNode("div",{title:k.title,class:e.normalizeClass(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer",{disabled:k.disabled}]),onClick:k.on},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,pe)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:a,accept:".json,.txt",onChange:j},null,544),[[e.vShow,!1]]),e.createElementVNode("div",he,[e.unref(g)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ve,[e.createVNode(e.unref(R),{value:r.value,"onUpdate:value":y[0]||(y[0]=k=>r.value=k),modelValue:r.value,"onUpdate:modelValue":y[1]||(y[1]=k=>r.value=k),options:i,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",ge,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(C,k=>e.createElementVNode("div",{key:k.key,title:k.title,class:e.normalizeClass(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm",{checked:k.key===l.value}]),onClick:D=>V(k.key)},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,ye)),64))])])]),e.createVNode(ie,{ref_key:"previewJson",ref:B},null,512)],64))}}),xe={class:"h-full flex flex-col relative"},be=["draggable"],_e=e.defineComponent({__name:"editScreenContainer",setup(F){const R=e.inject("pageSchema"),p=e.ref(null),g=e.ref(null),l=e.ref(null),{pressSpace:b,disabledZoom:c}=O.useStore(),{handleElementDragStart:h,handleElementDrag:B,handleElementDragEnd:C}=O.useElementDrag(p),{width:$,height:a}=O.useElementSize(p),{canvasScale:r,handleZoom:i}=O.useElementZoom(g);let s=0,N=0;const o=e.ref({}),j=e.ref({}),z=e.ref({}),V=e.shallowRef({width:0,height:0});e.watchEffect(y),e.watch(z,()=>{e.nextTick(m)});function m(){l.value&&(V.value={width:l.value.clientWidth,height:l.value.clientHeight})}function y(){var E,S;z.value={width:((E=R.canvas)==null?void 0:E.width)??"0",height:((S=R.canvas)==null?void 0:S.height)??"0"}}O.watchOnce($,k),e.watch(V,k);function k(){let E=V.value.width||s,S=V.value.height||N;o.value={width:$.value+E+"px",height:a.value+S+"px"},j.value={width:E+"px",height:S+"px"},D()}function D(){e.nextTick(()=>{var A;let E=V.value.width||s;const T=(V.value.height||N)/2,H=E/2;(A=p.value)==null||A.scrollTo(H,T)})}O.useResizeObserver(p,W),O.useResizeObserver(g,W);function W(){var S;if(!p.value)return;const E=p.value.getBoundingClientRect();if(s=E.width-60,N=E.height-80,!c.value)if(V.value.width===0)r.value=1;else{const T=(s-20)/V.value.width,H=N/(V.value.height||((S=g.value)==null?void 0:S.clientHeight)||1),A=Math.abs(T-1)<Math.abs(H-1);let I=1;A?I=T:I=H,(T<1||H<1)&&(I=Math.min(T,H)),I<1.4&&I>.5&&(r.value=I)}O.debounce(k,50)()}return(E,S)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(ke),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:p,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(b)}]),draggable:e.unref(b),onWheel:S[0]||(S[0]=(...T)=>e.unref(i)&&e.unref(i)(...T)),onDragstart:S[1]||(S[1]=(...T)=>e.unref(h)&&e.unref(h)(...T)),onDragend:S[2]||(S[2]=(...T)=>e.unref(C)&&e.unref(C)(...T)),onDrag:S[3]||(S[3]=(...T)=>e.unref(B)&&e.unref(B)(...T))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:g,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(b)}),style:e.normalizeStyle(j.value)},[e.renderSlot(E.$slots,"default")],6)],512)],4)],42,be),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:l,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(z.value)},null,4)]))}}),Ce={class:"epic-edit-canvas"},Ne=e.defineComponent({__name:"index",setup(F){const R=e.ref(null),p=e.ref(null),g=e.inject("pageSchema"),l=e.computed(()=>g.schemas[0]),b=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var c;(c=p.value)==null||c.handleInit(R.value)}),(c,h)=>(e.openBlock(),e.createElementBlock("section",Ce,[e.createVNode(_e,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:R,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(b.value)},[e.createVNode(K,{schema:l.value},null,8,["schema"]),e.createVNode(re,{ref_key:"ePreviewWidgetsRef",ref:p},null,512)],4)]),_:1})]))}});exports.default=Ne;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("./axios-B5oA4AjJ.cjs"),O=require("./index-D8olMR4m.cjs"),U=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),oe=require("./vuedraggable.umd-BqhSJIAi.cjs"),le={class:"epic-widget-action-item whitespace-nowrap"},ae={key:0,class:"flex items-center"},re=e.defineComponent({__name:"previewWidgets",setup(F,{expose:R}){const p=e.inject("pageManager",{}),g=e.inject("pageSchema"),l=e.inject("designer"),b=e.inject("designerProps"),c=e.inject("revoke"),h=e.ref(null),B=e.ref(null),C=e.ref(null),$=e.ref(!1),a=e.ref(!1),r=e.ref(!0),i=e.ref("top"),{canvasScale:s,disabledZoom:N}=O.useStore();let o=null;const j=e.computed(()=>{const t=l.state.checkedNode;return!(!(t!=null&&t.id)||b.value.lockDefaultSchemaEdit&&p.defaultComponentIds.value.includes(t==null?void 0:t.id)||t.type==="table-col")}),z=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table-col"}),V=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table"}),m=e.computed(()=>{var v,_,x,u,M,L;const t=p.componentInstances.value,d=(v=l.state.checkedNode)==null?void 0:v.id;if((x=(_=l.state.checkedNode)==null?void 0:_.componentProps)!=null&&x.hidden)return null;const f=w.pluginManager.getComponentConfingByType((u=l.state.checkedNode)==null?void 0:u.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((M=l.state.checkedNode)==null?void 0:M.noFormItem)!==!0)return(L=t[d+"formItem"])==null?void 0:L.$el;const n=t[d];return!(n!=null&&n.$el)||(n==null?void 0:n.$el.nodeName)==="#text"||!(n!=null&&n.$el.getBoundingClientRect)?null:n==null?void 0:n.$el}),y=e.computed(()=>{var v,_,x,u;const t=p.componentInstances.value,d=(v=l.state.hoverNode)==null?void 0:v.id,f=w.pluginManager.getComponentConfingByType((_=l.state.hoverNode)==null?void 0:_.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((x=l.state.hoverNode)==null?void 0:x.noFormItem)!==!0)return(u=t[d+"formItem"])==null?void 0:u.$el;const n=t[d];return(n==null?void 0:n.$el.nodeName)==="#text"?null:n==null?void 0:n.$el}),{mutationObserver:k,observerConfig:D}=Q(J),{startTimedQuery:W,stopTimedQuery:E}=O.useTimedQuery(J);e.watch(()=>m.value,t=>{if(t){$.value=!0,k.observe(t,D);const d=t.parentNode;d&&(d.ondragstart=()=>{r.value=!1,W()},d.ondragend=()=>{r.value=!0,E()}),J()}else $.value=!1});const{mutationObserver:S,observerConfig:T}=Q(Z);e.watch(()=>y.value,t=>{t&&(S.observe(t,T),Z())});let H=0;e.watch(()=>{var t;return(t=l.state.hoverNode)==null?void 0:t.id},t=>{if(t){a.value=!0,clearTimeout(H);return}H=setTimeout(()=>{a.value=!1},300)});let A=0,I=0;function J(){const t=m.value;if(!t||!o)return;const{top:d,left:f}=o==null?void 0:o.getBoundingClientRect(),{top:n,left:v,width:_,height:x}=t.getBoundingClientRect(),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u,P=x/u;h.value&&(h.value.style.width=`${_/u}px`,h.value.style.height=`${P}px`,h.value.style.top=`${M/u}px`,h.value.style.left=`${L/u}px`,X(M,L)),C.value&&(M<45&&P<100?(C.value.style.top="",C.value.style.bottom="-30px",C.value.style["border-radius"]="0px 0px 4px 4px",i.value="bottom"):M<45?(C.value.style.top="0px",C.value.style["border-radius"]="0px 0px 4px 0",i.value="center"):(C.value.style.top="-30px",C.value.style["border-radius"]="4px 4px 0px 0px",i.value="top"))}function X(t,d){const f=m.value;if(!o||!f)return;const n=o.getBoundingClientRect(),{width:v}=f.getBoundingClientRect(),_=N.value?1:s.value,x=t/_-n.top;let u=d/_-n.left+v/_;u<n.width&&(u=0);const M=o.scrollTop-n.height/3+60,L=o.scrollTop+n.height/3*2,P=o.scrollLeft-n.width+200,q=o.scrollLeft+n.width-200;Math.abs(x-A)<10&&Math.abs(u-I)<10||(A=x,I=u,!(x>M&&x<L&&u>P&&u<q)&&(o.scrollTop=x,o.scrollLeft=u))}function Z(){var P,q;const t=y.value;if(!t)return;const{top:d,left:f}=(o==null?void 0:o.getBoundingClientRect())??{top:0,left:0},{top:n,left:v,width:_,height:x}=((P=t.getBoundingClientRect)==null?void 0:P.call(t))??((q=t.nextElementSibling)==null?void 0:q.getBoundingClientRect()),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u;B.value&&(B.value.style.width=`${_/u}px`,B.value.style.height=`${x/u}px`,B.value.style.top=`${M/u}px`,B.value.style.left=`${L/u}px`)}function Q(t){const d=window.MutationObserver,f={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new d(t),observerConfig:f}}function Y(){var n,v;const t=w.findSchemaInfoById(g.schemas,((n=l.state.checkedNode)==null?void 0:n.id)??"root");if(!t||!t.list||!t.list.length||!t.list[0].children||!t.list[0].children.length)return!1;let d=JSON.parse(JSON.stringify((v=t.list[0])==null?void 0:v.children[0]));d.children.forEach((_,x)=>{d.children[x].children=[]});const f=w.generateNewSchema(d);t.list[0].children.push(f),l.setCheckedNode(f),c.push(g.schemas,"表格增加一行")}function G(){var f,n,v,_;const t=w.findSchemaInfoById(g.schemas,((f=l.state.checkedNode)==null?void 0:f.id)??"root");if(!((n=t==null?void 0:t.list)!=null&&n.length)||!((_=(v=t.list[0])==null?void 0:v.children)!=null&&_.length))return!1;t.list[0].children.forEach(x=>{const u=x.children.length+1,M=Math.floor(24/u);x.children.forEach(L=>{L.componentProps.span=M}),x.children.push(w.generateNewSchema({type:"table-col",children:[],componentProps:{span:M}}))}),c.push(g.schemas,"表格增加一列")}function ee(){var _;const t=w.findSchemaInfoById(g.schemas,((_=l.state.checkedNode)==null?void 0:_.id)??"root");if(!t)return!1;const{list:d,schema:f,index:n}=t,v=w.generateNewSchema(f);d.splice(n+1,0,v),l.setCheckedNode(v),c.push(g.schemas,"复制组件")}function te(){var v;const t=w.findSchemaInfoById(g.schemas,((v=l.state.checkedNode)==null?void 0:v.id)??"root");if(!t)return!1;let{list:d,schema:f,index:n}=t;d.splice(n,1),n===d.length&&n--,l.setCheckedNode(d[n]),c.push(g.schemas,"删除组件")}function ne(t){o=t,o==null||o.addEventListener("scroll",()=>{J()}),O.useResizeObserver(m,J),O.useResizeObserver(y,Z)}return R({handleInit:ne}),(t,d)=>{var f,n,v,_,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:h,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",i.value+" "+(r.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:C},[e.createElementVNode("div",le,e.toDisplayString((n=e.unref(w.pluginManager).getComponentConfingByType(((f=e.unref(l).state.checkedNode)==null?void 0:f.type)??""))==null?void 0:n.defaultSchema.label),1),j.value||V.value||z.value?(e.openBlock(),e.createElementBlock("div",ae,[j.value?(e.openBlock(),e.createElementBlock("div",{key:0,title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:ee},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:1,title:"插入新行",class:"epic-widget-action-item pointer-events-auto",onClick:Y},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:2,title:"插入新列",class:"epic-widget-action-item pointer-events-auto",onClick:G,style:{transform:"rotate(270deg)"}},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("div",{key:3,title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:te},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--delete-outline-rounded"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,$.value&&((v=e.unref(l).state.checkedNode)==null?void 0:v.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:B,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,a.value&&((_=e.unref(l).state.checkedNode)==null?void 0:_.id)!==((x=e.unref(l).state.hoverNode)==null?void 0:x.id)]])],64)}}}),se=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(F,{emit:R}){const p=e.inject("designer"),g=e.inject("pageSchema"),l=e.inject("revoke"),b=F,c=R,h=e.computed({get(){return b.schemas},set(r){c("update:schemas",r)}});function B(r){p.setCheckedNode(h.value[r]),p.setDisableHover(!0)}function C(){p.setDisableHover(),l.push(g.schemas,"拖拽组件")}function $(){l.push(g.schemas,"插入组件")}function a(r){var i,s,N;return r.id===((i=g.schemas[0])==null?void 0:i.id)||(N=(s=w.pluginManager.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&N.immovable?"unmover-item":"draggable-item"}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(oe.draggable),e.mergeProps({modelValue:h.value,"onUpdate:modelValue":i[0]||(i[0]=s=>h.value=s),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:i[1]||(i[1]=s=>B(s.oldIndex)),onEnd:i[2]||(i[2]=s=>C()),onAdd:i[3]||(i[3]=s=>{B(s.newIndex),$()})}),{item:e.withCtx(({element:s,index:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",a(s)]),key:N},[e.createVNode(K,{schema:s},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),K=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(F){const R=e.useAttrs(),p=e.inject("designer"),g=e.inject("pageManager",{}),l=e.inject("pageSchema",{}),b=e.ref(null);e.provide("nodeAttrs",R);const c=F,h=e.computed(()=>{var N,o,j,z,V;const a=g.componentInstances.value,r=(N=c.schema)==null?void 0:N.id,i=w.pluginManager.getComponentConfingByType((o=c.schema)==null?void 0:o.type)??null;if(!r||!(a!=null&&a[r]))return null;if(i!=null&&i.defaultSchema.input&&((j=c.schema)==null?void 0:j.noFormItem)!==!0)return(z=a[r+"formItem"])==null?void 0:z.$el;const s=a[r];return((V=s==null?void 0:s.$el)==null?void 0:V.nodeName)==="#text"?null:s==null?void 0:s.$el});e.watch(()=>h.value,a=>{a==null||a.addEventListener("click",B,!1),a==null||a.addEventListener("mouseover",C,!1),a==null||a.addEventListener("mouseout",$,!1)}),e.onUnmounted(()=>{var a,r,i;(a=h.value)==null||a.removeEventListener("click",B,!1),(r=h.value)==null||r.removeEventListener("mouseover",C,!1),(i=h.value)==null||i.removeEventListener("mouseout",$,!1)});function B(a){a.stopPropagation(),p.setCheckedNode(c.schema)}function C(a){var r;c.schema.id!==((r=l.schemas[0])==null?void 0:r.id)&&(a.stopPropagation(),p.setHoverNode(c.schema))}function $(a){a.stopPropagation(),p.setHoverNode(null)}return(a,r)=>{var s,N;const i=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(O._sfc_main),{ref_key:"nodeRef",ref:b,componentSchema:c.schema},e.createSlots({_:2},[(N=(s=e.unref(w.pluginManager).getComponentConfingByType(c.schema.type))==null?void 0:s.editConstraints)!=null&&N.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.schema.children,o=>(e.openBlock(),e.createBlock(i,{key:o.id,schema:o},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[c.schema.children?(e.openBlock(),e.createBlock(se,{key:0,schemas:c.schema.children,"onUpdate:schemas":r[0]||(r[0]=o=>c.schema.children=o)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),ce={class:"min-w-750px rounded h-full"},ie=e.defineComponent({__name:"previewJson",setup(F,{expose:R}){const p=w.pluginManager.getComponent("modal"),g=w.pluginManager.getComponent("monacoEditor"),l={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},b=e.ref(null),c=e.ref(!1),h=e.inject("pageSchema");function B(){c.value=!1}function C(){c.value=!0,b.value?b.value.setValue(JSON.stringify(h,null,2)):setTimeout(()=>{C()},300)}function $(a="epic-data.json"){const r=JSON.stringify(h,null,2);var i=`data:text/json;charset=utf-8,${encodeURIComponent(r)}`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",a),s.click()}return R({handleOpen:C}),(a,r)=>(e.openBlock(),e.createBlock(e.unref(p),{modelValue:c.value,"onUpdate:modelValue":r[0]||(r[0]=i=>c.value=i),title:"查看数据",class:"w-900px",width:"900px",onClose:B,onOk:$,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.createVNode(e.unref(g),{ref_key:"monacoEditorRef",ref:b,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:l,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),de={class:"epic-edit-toolbar flex items-center justify-between px-2"},ue={class:"flex-1 h-full flex items-center"},fe={key:0,class:"epic-divider"},pe=["title","onClick"],he={class:"flex-1 h-full flex items-center justify-end"},me={key:0,class:"flex items-center ml-12px"},ve={class:"pr-8px w-82px cursor-pointer"},ge={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},ye=["title","onClick"],ke=e.defineComponent({__name:"toolbar",setup(F){const R=w.pluginManager.getComponent("select"),{canvasScale:p,disabledZoom:g}=O.useStore(),l=e.ref("pc"),b=e.inject("pageSchema"),c=e.inject("designer"),h=e.inject("revoke"),B=e.ref(null),C=[{icon:"icon--epic--computer-outline-rounded",title:"pc",key:"pc"},{icon:"icon--epic--tablet-android-outline-rounded",title:"平板",key:"pad"},{icon:"icon--epic--phone-iphone-outline-sharp",title:"手机",key:"mobile"}],$=e.computed(()=>[{icon:"icon--epic--trash",title:"清空",on:o},{icon:"icon--epic--undo",title:"撤销",on:s,disabled:!h.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:N,disabled:!h.undoList.value.length}]),a=e.ref(null),r=e.computed({get(){return`${(p.value*100).toFixed(0)}%`},set(m){const y=parseFloat(m);p.value=y/100}}),i=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function s(){const m=h.undo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function N(){const m=h.redo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function o(){c.reset()}function j(m){var D;const y=(D=m.target.files)==null?void 0:D[0];if(!y)return;m.target.value=null;const k=new FileReader;k.readAsText(y),k.onload=W=>{var E;z((E=W.target)==null?void 0:E.result)}}function z(m){try{let y=JSON.parse(m??"");y.schemas||(y=w.convertKFormData(y)),w.deepCompareAndModify(b,y)}catch(y){console.error(y)}}function V(m){c.handleToggleDeviceMode(m),l.value=m;const y={pc:{},pad:{width:"780px",mode:m},mobile:{width:"390px",height:"844px",mode:m}};b.canvas=y[m],console.log("%c [ pageSchema ]-248","font-size:13px; background:pink; color:#bf2c9f;",b)}return(m,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",de,[e.createElementVNode("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(k,D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D},[k.divider?(e.openBlock(),e.createElementBlock("div",fe)):e.createCommentVNode("",!0),e.createElementVNode("div",{title:k.title,class:e.normalizeClass(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer",{disabled:k.disabled}]),onClick:k.on},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,pe)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:a,accept:".json,.txt",onChange:j},null,544),[[e.vShow,!1]]),e.createElementVNode("div",he,[e.unref(g)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ve,[e.createVNode(e.unref(R),{value:r.value,"onUpdate:value":y[0]||(y[0]=k=>r.value=k),modelValue:r.value,"onUpdate:modelValue":y[1]||(y[1]=k=>r.value=k),options:i,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",ge,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(C,k=>e.createElementVNode("div",{key:k.key,title:k.title,class:e.normalizeClass(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm",{checked:k.key===l.value}]),onClick:D=>V(k.key)},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,ye)),64))])])]),e.createVNode(ie,{ref_key:"previewJson",ref:B},null,512)],64))}}),xe={class:"h-full flex flex-col relative"},be=["draggable"],_e=e.defineComponent({__name:"editScreenContainer",setup(F){const R=e.inject("pageSchema"),p=e.ref(null),g=e.ref(null),l=e.ref(null),{pressSpace:b,disabledZoom:c}=O.useStore(),{handleElementDragStart:h,handleElementDrag:B,handleElementDragEnd:C}=O.useElementDrag(p),{width:$,height:a}=O.useElementSize(p),{canvasScale:r,handleZoom:i}=O.useElementZoom(g);let s=0,N=0;const o=e.ref({}),j=e.ref({}),z=e.ref({}),V=e.shallowRef({width:0,height:0});e.watchEffect(y),e.watch(z,()=>{e.nextTick(m)});function m(){l.value&&(V.value={width:l.value.clientWidth,height:l.value.clientHeight})}function y(){var E,S;z.value={width:((E=R.canvas)==null?void 0:E.width)??"0",height:((S=R.canvas)==null?void 0:S.height)??"0"}}O.watchOnce($,k),e.watch(V,k);function k(){let E=V.value.width||s,S=V.value.height||N;o.value={width:$.value+E+"px",height:a.value+S+"px"},j.value={width:E+"px",height:S+"px"},D()}function D(){e.nextTick(()=>{var A;let E=V.value.width||s;const T=(V.value.height||N)/2,H=E/2;(A=p.value)==null||A.scrollTo(H,T)})}O.useResizeObserver(p,W),O.useResizeObserver(g,W);function W(){var S;if(!p.value)return;const E=p.value.getBoundingClientRect();if(s=E.width-60,N=E.height-80,!c.value)if(V.value.width===0)r.value=1;else{const T=(s-20)/V.value.width,H=N/(V.value.height||((S=g.value)==null?void 0:S.clientHeight)||1),A=Math.abs(T-1)<Math.abs(H-1);let I=1;A?I=T:I=H,(T<1||H<1)&&(I=Math.min(T,H)),I<1.4&&I>.5&&(r.value=I)}O.debounce(k,50)()}return(E,S)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(ke),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:p,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(b)}]),draggable:e.unref(b),onWheel:S[0]||(S[0]=(...T)=>e.unref(i)&&e.unref(i)(...T)),onDragstart:S[1]||(S[1]=(...T)=>e.unref(h)&&e.unref(h)(...T)),onDragend:S[2]||(S[2]=(...T)=>e.unref(C)&&e.unref(C)(...T)),onDrag:S[3]||(S[3]=(...T)=>e.unref(B)&&e.unref(B)(...T))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:g,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(b)}),style:e.normalizeStyle(j.value)},[e.renderSlot(E.$slots,"default")],6)],512)],4)],42,be),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:l,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(z.value)},null,4)]))}}),Ce={class:"epic-edit-canvas"},Ne=e.defineComponent({__name:"index",setup(F){const R=e.ref(null),p=e.ref(null),g=e.inject("pageSchema"),l=e.computed(()=>g.schemas[0]),b=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var c;(c=p.value)==null||c.handleInit(R.value)}),(c,h)=>(e.openBlock(),e.createElementBlock("section",Ce,[e.createVNode(_e,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:R,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(b.value)},[e.createVNode(K,{schema:l.value},null,8,["schema"]),e.createVNode(re,{ref_key:"ePreviewWidgetsRef",ref:p},null,512)],4)]),_:1})]))}});exports.default=Ne;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("vue"),C={component:"Component",outline:"Outline",style:"Style",attribute:"Attribute",searchComponent:"Search Component",noComponentFound:"No Component Found",all:"All",form:"Form",labelPosition:"Label Position",left:"Left",right:"Right",top:"Top",labelWidth:"Label Width",labelSuffix:"Label Suffix",pleaseEnter:"Please Enter",formSize:"Form Size",pleaseSelect:"Please Select",large:"Large",medium:"Medium",small:"Small",asteriskPosition:"Asterisk Position",inlineValidationMessage:"Inline Validation Message",validationFeedbackIcon:"Validation Feedback Icon",scrollToValidationError:"Scroll to Validation Error",inlineMode:"Inline Mode",getFormData:"Get Form Data",setFormData:"Set Form Data",validateForm:"Validate Form",layout:"Layout",fieldName:"Field Name",title:"Title",defaultValue:"Default Value",placeholder:"Placeholder",size:"Size",maxInputLength:"Max Input Length",countWords:"Count Words",inputType:"Input Type",showToggleIcon:"Show Toggle Icon",clearable:"Clearable",formValidation:"Form Validation",validationRuleRequiresForm:"Validation Rule Requires Form",onInput:"On Input",onChange:"On Change",onFocus:"On Focus",onBlur:"On Blur",onClear:"On Clear",focusInput:"Focus Input",blurInput:"Blur Input",clearInput:"Clear Input",selectInputText:"Select Input Text",input:"Input",cardLayout:"Card Layout",shadowTiming:"Shadow Timing",textarea:"Textarea",minRows:"Min Rows",maxRows:"Max Rows",inputValue:"Input Value",valueChange:"Value Change",focus:"Focus",blur:"Blur",signaturePad:"Signature Pad",lineWidth:"Line Width",rewriteWillClearCanvas:"Rewrite will clear the canvas. Are you sure you want to rewrite?",clearSuccess:"Clear Success",uploadSuccess:"Upload Success",uploadFailed:"Upload Failed",confirmAbandonSignature:"Are you sure you want to abandon this signature?",warning:"Warning",cancel:"Cancel",rewrite:"Rewrite",confirm:"Confirm",numberInput:"Number Input",maxValue:"Max Value",minValue:"Min Value",step:"Step",controlButtonPosition:"Control Button Position",precision:"Precision",inputControlIsMultipleOfStep:"Input Control Is Multiple of Step",onValueChange:"On Value Change",gridLayout:"Grid Layout",verticalAlignment:"Vertical Alignment",horizontalArrangement:"Horizontal Arrangement",gridSpacing:"Grid Spacing",gridWidth:"Grid Width (24 per row)",radio:"Radio",option1:"Option 1",option2:"Option 2",buttonMode:"Button Mode",optionTextColor:"Option Text Color",effectiveInButtonMode:"Effective in Button Mode",optionButtonColor:"Option Button Color",optionManagement:"Option Management",s:"DataSource",dataSourceConfig:"DataSource Configuration",checkbox:"Checkbox",maxSelected:"Max Selected",minSelected:"Min Selected",select:"Select",multiple:"Multiple",hideMultiple:"Hide Multiple",hideHint:"Hide Hint",retainSearchKeyword:"Retain Search Keyword",tagType:"Tag Type",multipleLimit:"Multiple Limit",hintTheme:"Hint Theme",filterable:"Filterable",allowCreate:"Allow Create",dropdownPosition:"Dropdown Position",dropdownWidthSameAsInput:"Dropdown Width Same as Input",noDataText:"No Data Text",configureOptions:"Configure Options",cascader:"Cascader",separator:"Separator",subMenuExpandMode:"Sub Menu Expand Mode",searchable:"Searchable",collapseTags:"Collapse Tags",showCollapsedTags:"Show Collapsed Tags",hidePath:"Hide Path",parentSelectable:"Parent Selectable",parentChildNotLinked:"Parent and Child Nodes Not Linked",onlyGetSelectedNodes:"Only Get Selected Nodes",onSelectedNodeChange:"On Selected Node Change",onBlurs:"On Blur",onFocu:"On Focus",getCurrentSelectedNodes:"Get Current Selected Nodes",togglePopperVisibility:"Toggle Popper Visibility",datePicker:"Date Picker",dateType:"Date Type",date:"Date",week:"Week",month:"Month",year:"Year",time:"Time",timeRange:"Time Range",dateRange:"Date Range",monthRange:"Month Range",multipleDates:"Multiple Dates",startPlaceholder:"Start Placeholder",endPlaceholder:"End Placeholder",editable:"Editable",displayFormat:"Display Format",dataFormat:"Data Format",fileUpload:"File Upload",requestUrl:"Request URL",uploadFileField:"Upload File Field",multiples:"Multiple",showFileList:"Show File List",dragUpload:"Drag Upload",maxUploadCount:"Max Upload Count",imageUpload:"Image Upload",switch:"Switch",onValue:"ON Value",offValue:"OFF Value",onDescription:"ON Description",offDescription:"OFF Description",width:"Width",textInside:"Text Inside",onChangeSwitch:"On Change",slider:"Slider",showStops:"Show Stops",tooltip:"Tooltip",range:"Range",vertical:"Vertical",height:"Height",showInput:"Show Input",controlButtons:"Control Buttons",tooltipPosition:"Tooltip Position",realTimeTrigger:"Real-time Trigger",onChangeEnd:"On Change End",colorPicker:"Color Picker",format:"Format",alpha:"Alpha",staticText:"Static Text",leftAlign:"Left Align",centerAlign:"Center Align",rightAlign:"Right Align",fontSize:"Font Size",button:"Button",type:"Type",actionType:"Action Type",customColor:"Custom Color",plainButton:"Plain Button",roundButton:"Round Button",circleButton:"Circle Button",textButton:"Text Button",loadingState:"Loading State",onClick:"On Click",onDoubleClick:"On Double Click",componentId:"Component ID",canvasWidth:"Canvas Width",canvasHeight:"Canvas Height",editComponentProperties:"Edit Component Properties",page:"Page",pageName:"Page Name",padding:"Padding",margin:"Margin",backgroundColor:"Background Color",fontColor:"Font Color",addOption:"Add Option",dataSources:"Data Source",pleaseSelectDataSource:"Please Select Data Source",pleaseCheckDataSourceConfig:"Please Check Data Source Configuration",dynamic:"Dynamic",static:"Static",noOptions:"No Options",configuration:"Configuration",addDataSource:"Add Data Source",apiName:"API Name",pleaseEnterApiName:"Please Enter API Name",pleaseEnterRequestUrl:"Please Enter Request URL",requestMethod:"Request Method",labelKey:"Label Key",pleaseEnterLabelKey:"Please Enter Label Key",valueKey:"Value Key",pleaseEnterValueKey:"Please Enter Value Key",dataPath:"Data Path",nestedPath:"Use '.' for Nested Path",requestParams:"Request Parameters",add:"Add",paramName:"Parameter Name",paramValue:"Parameter Value",requestHeaders:"Request Headers",requestBody:"Request Body",requestTest:"Request Test",save:"Save",configError:"Configuration Error",requestFailed:"Request Failed",fillRequiredFields:"Please Fill Required Fields",completeFormFirst:"Please Complete the Form First",addRule:"Add Rule",required:"Required",validationTrigger:"Validation Trigger",validationMessage:"Validation Message",customRule:"Custom Rule",validationFunction:"Validation Function",regexValidation:"Regex Validation",fieldLength:"Field Length",minLength:"Min Length",maxLength:"Max Length",saveForm:"Save Form",clickToUpload:"Click to Upload",row:"Row",column:"Column",searchNode:"Search Node",noDataFound:"No Data Found"},f={component:"组件",outline:"大纲",style:"样式",attribute:"属性",searchComponent:"搜索组件",noComponentFound:"没有查询到的组件",all:"全部",form:"表单",labelPosition:"标签位置",left:"左边",right:"右边",top:"顶部",labelWidth:"标签宽度",labelSuffix:"标签后缀",pleaseEnter:"请输入",formSize:"表单尺寸",pleaseSelect:"请选择",large:"大号",medium:"中等",small:"小型",asteriskPosition:"星号位置",inlineValidationMessage:"行内展示校验信息",validationFeedbackIcon:"校验反馈图标",scrollToValidationError:"滚动校验错误处",inlineMode:"行内模式",getFormData:"获取表单数据",setFormData:"设置表单数据",validateForm:"校验表单",layout:"布局",fieldName:"字段名",title:"标题",defaultValue:"默认值",placeholder:"占位内容",size:"尺寸",maxInputLength:"最大输入长度",countWords:"统计字数",inputType:"输入类型",showToggleIcon:"显示切换图标",clearable:"可清空",formValidation:"表单校验",validationRuleRequiresForm:"校验规则需要配合表单使用",onInput:"输入值时",onChange:"值修改时",onFocus:"获取焦点时",onBlur:"失去焦点时",onClear:"点击清空按钮时",focusInput:"使 input 获取焦点",blurInput:"使 input 失去焦点",clearInput:"清除 input 值",selectInputText:"选中 input 中的文字",input:"输入框",cardLayout:"卡片布局",shadowTiming:"阴影时机",textarea:"文本域",minRows:"最小行数",maxRows:"最大行数",inputValue:"输入值",valueChange:"值修改",focus:"获取焦点",blur:"失去焦点",signaturePad:"签名板",lineWidth:"线条宽度",rewriteWillClearCanvas:"重写将清空画布,请确定是否重写?",clearSuccess:"清空成功",uploadSuccess:"上传成功",uploadFailed:"上传失败",confirmAbandonSignature:"是否放弃本次签字?",warning:"警告",cancel:"取消",rewrite:"重写",confirm:"确定",numberInput:"数字输入框",maxValue:"最大值",minValue:"最小值",step:"步长",controlButtonPosition:"控制按钮位置",precision:"精度",inputControlIsMultipleOfStep:"输入控制为步长的倍数",onValueChange:"值变化时",gridLayout:"栅格布局",verticalAlignment:"垂直对齐方式",horizontalArrangement:"水平排列方式",gridSpacing:"栅格间距",gridWidth:"栅格宽度(一行为24)",radio:"单选框",option1:"选项1",option2:"选项2",buttonMode:"按钮模式",optionTextColor:"选项文本颜色",effectiveInButtonMode:"按钮模式下生效",optionButtonColor:"选项按钮颜色",optionManagement:"选项管理",dataSource:"数据源",dataSourceConfig:"数据源配置",checkbox:"复选框",maxSelected:"最大选中数",minSelected:"最小选中数",select:"选择框",multiple:"可多选",hideMultiple:"多选隐藏",hideHint:"隐藏提示",retainSearchKeyword:"保留搜索关键字",tagType:"标签类型",multipleLimit:"多选限制",hintTheme:"提示主题",filterable:"可筛选",allowCreate:"允许创建条目",dropdownPosition:"下拉框位置",dropdownWidthSameAsInput:"下拉框宽度与输入框相同",noDataText:"无数据时文本",configureOptions:"配置选项",cascader:"级联选择器",separator:"分割符",subMenuExpandMode:"次级菜单展开方式",searchable:"可搜索",collapseTags:"折叠Tag",showCollapsedTags:"显示被折叠标签",hidePath:"不显示路径",parentSelectable:"父级可选",parentChildNotLinked:"父子节点不互相关联",onlyGetSelectedNodes:"只获取选中节点",onSelectedNodeChange:"选中节点变化时",onBlurs:"当失去焦点时触发",onFocu:"当获得焦点时触发",getCurrentSelectedNodes:"获取当前选中节点",togglePopperVisibility:"切换 popper 可见状态",datePicker:"日期选择器",dateType:"日期类型",date:"日期",week:"周",month:"月份",year:"年份",time:"时间",timeRange:"时间范围",dateRange:"日期范围",monthRange:"月份范围",multipleDates:"多个日期",startPlaceholder:"开始占位符",endPlaceholder:"结束占位符",editable:"可输入",displayFormat:"显示格式",dataFormat:"数据格式",fileUpload:"上传文件",requestUrl:"请求地址",uploadFileField:"上传文件字段",multiples:"多选",showFileList:"展示文件列表",dragUpload:"拖拽上传",maxUploadCount:"允许上传最大数量",imageUpload:"上传图片",switch:"开关",onValue:"ON状态值",offValue:"OFF状态值",onDescription:"ON状态描述",offDescription:"OFF状态描述",width:"宽度",textInside:"文本点内显示",onChangeSwitch:"状态发生变化时",slider:"滑块",showStops:"显示间断点",tooltip:"提示信息",range:"开启选择范围",vertical:"垂直模式",height:"高度",showInput:"显示数字框",controlButtons:"控制按钮",tooltipPosition:"提示框位置",realTimeTrigger:"拖拽实时触发",onChangeEnd:"拖拽结束改变值时",colorPicker:"颜色选择器",format:"格式",alpha:"透明度选择",staticText:"静态文字",leftAlign:"居左",centerAlign:"居中",rightAlign:"居右",fontSize:"字体大小",button:"按钮",type:"类型",actionType:"操作类型",customColor:"自定义颜色",plainButton:"朴素按钮",roundButton:"圆角按钮",circleButton:"圆形按钮",textButton:"文字按钮",loadingState:"加载状态",onClick:"点击按钮时",onDoubleClick:"双击按钮时",componentId:"组件ID",canvasWidth:"画布宽度",canvasHeight:"画布高度",page:"页面",editComponentProperties:"编辑组件属性",pageName:"页面名称",padding:"内边距",margin:"外边距",backgroundColor:"背景色",fontColor:"字体颜色",addOption:"添加选项",dataSources:"数据源",pleaseSelectDataSource:"请选择数据源",pleaseCheckDataSourceConfig:"请检查数据位置是否配置准确",dynamic:"动态",static:"静态",noOptions:"暂无选项",configuration:"配置",addDataSource:"新增数据源",apiName:"接口名称",pleaseEnterApiName:"请输入接口名称",pleaseEnterRequestUrl:"请输入完整的请求地址",requestMethod:"请求方法",labelKey:"标签键名",pleaseEnterLabelKey:"请输入标签键名",valueKey:"值键名",pleaseEnterValueKey:"请输入值键名",dataPath:"数据位置",nestedPath:"多层嵌套使用.分隔",requestParams:"请求参数",add:"添加",paramName:"参数名",paramValue:"参数值",requestHeaders:"请求头",requestBody:"请求体",requestTest:"请求测试",save:"保存",configError:"配置错误",requestFailed:"请求失败",fillRequiredFields:"请填写必填项",completeFormFirst:"请先完善表单",addRule:"添加规则",required:"必填项",validationTrigger:"校验时机",validationMessage:"校验信息",customRule:"自定义规则",validationFunction:"校验函数",regexValidation:"正则校验",fieldLength:"字段长度",minLength:"最小长度",maxLength:"最大长度",saveForm:"保存表单",clickToUpload:"点击上传",row:"行",column:"列",searchNode:"搜索节点",noDataFound:"没有查询到的数据"};/*! js-cookie v3.0.5 | MIT */function s(e){for(var a=1;a<arguments.length;a++){var n=arguments[a];for(var r in n)e[r]=n[r]}return e}var S={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function g(e,a){function n(o,d,t){if(!(typeof document>"u")){t=s({},a,t),typeof t.expires=="number"&&(t.expires=new Date(Date.now()+t.expires*864e5)),t.expires&&(t.expires=t.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var l in t)t[l]&&(i+="; "+l,t[l]!==!0&&(i+="="+t[l].split(";")[0]));return document.cookie=o+"="+e.write(d,o)+i}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var d=document.cookie?document.cookie.split("; "):[],t={},i=0;i<d.length;i++){var l=d[i].split("="),h=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(t[c]=e.read(h,c),o===c)break}catch{}}return o?t[o]:t}}return Object.create({set:n,get:r,remove:function(o,d){n(o,"",s({},d,{expires:-1}))},withAttributes:function(o){return g(this.converter,s({},this.attributes,o))},withConverter:function(o){return g(s({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(e)}})}var u=g(S,{path:"/"});const m={"en-US":C,"zh-CN":f},F=u.get("saas-locale")||"zh-CN",y=()=>{const e=p.ref(F),a=()=>{document.visibilityState==="visible"&&e.value!==u.get("saas-locale")&&Object.keys(m).includes(u.get("saas-locale"))&&(e.value=u.get("saas-locale"))},n=r=>m[e.value][r];return p.onMounted(()=>{document.addEventListener("visibilitychange",a)}),p.onUnmounted(()=>{document.removeEventListener("visibilitychange",a)}),a(),{locale:e,t:n}};exports.api=u;exports.useLocale=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./vuedraggable.umd-BqhSJIAi.cjs"),a=require("./axios-B5oA4AjJ.cjs"),x=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),C=require("./index-BpROfyMH.cjs"),B={class:"epic-component-view flex flex-col"},L={class:"epic-search-box px-10px py-6px"},M={class:"flex flex-1 overflow-auto"},j={class:"epic-tabs-box"},q=["title","onClick"],I={class:"h-full flex-1 overflow-auto py-2 box-border"},z=["onClick"],D=["title"],P=e.defineComponent({__name:"index",setup(T){const{t:s}=C.useLocale(),k=a.pluginManager.getComponent("input"),d=e.inject("pageSchema"),p=e.inject("designer"),y=e.inject("revoke"),S=e.inject("designerProps"),m=a.pluginManager.getComponentSchemaGroups(),c=e.ref(""),g={title:s("all"),list:[]},b=e.computed(()=>(C.api.get("saas-locale")||"zh-CN")==="zh-CN"),i=e.ref(g),N=e.computed(()=>[g,...m.value]),r=e.computed(()=>{let o=i.value.list;if(i.value.title===s("all")){const n=m.value.map(t=>t.list);o=[].concat(...n)}return o.filter(n=>{var t;return((t=n.label)==null?void 0:t.includes(c.value))&&(!S.value.formMode||n.type!=="form")})});function V(o){i.value=o}function w(o){var v,f,_;const n=a.findSchemaInfoById(d.schemas,((v=p.state.checkedNode)==null?void 0:v.id)??"root");if(!n)return!1;let{list:t,schema:l,index:u}=n;l.children&&!((_=(f=a.pluginManager.getComponentConfingByType(l.type))==null?void 0:f.editConstraints)!=null&&_.childImmovable)&&(t=l.children,u=l.children.length-1);const h=a.generateNewSchema(o);t.splice(u+1,0,h),p.setCheckedNode(h),y.push(d.schemas,"插入组件")}return(o,n)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",L,[e.createVNode(e.unref(k),{placeholder:e.unref(s)("searchComponent"),modelValue:c.value,"onUpdate:modelValue":n[0]||(n[0]=t=>c.value=t),clearable:"",allowClear:"",value:c.value,"onUpdate:value":n[1]||(n[1]=t=>c.value=t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(x._sfc_main),{class:"text-$epic-text-helper",name:"icon--epic--search-rounded"})]),_:1},8,["placeholder","modelValue","value"])]),e.createElementVNode("div",M,[e.createElementVNode("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:i.value.title===t.title}]),key:l,title:t.title,onClick:u=>V(t)},e.toDisplayString(t.title),11,q))),128))]),e.createElementVNode("div",I,[e.createVNode(e.unref(E.draggable),e.mergeProps({modelValue:r.value,"onUpdate:modelValue":n[2]||(n[2]=t=>r.value=t)},{group:{name:"edit-draggable",pull:"clone",put:!1},sort:!1,animation:180,ghostClass:"moving"},{clone:e.unref(a.generateNewSchema),"item-key":"id",class:"grid grid-cols-[auto_auto] px-10px gap-2"}),{item:e.withCtx(({element:t})=>[e.createElementVNode("div",{class:"epic-componet-item flex items-center truncate",onClick:l=>w(t)},[e.createVNode(e.unref(x._sfc_main),{name:e.unref(a.pluginManager).getComponentConfingByType(t.type).icon??""},null,8,["name"]),e.createElementVNode("div",{title:t.label,class:e.normalizeClass([[b.value?"text-14px":"text-12px"],"epic-componet-label flex-1 w-0 truncate"])},e.toDisplayString(t.label),11,D)],8,z)]),_:1},16,["modelValue","clone"]),e.withDirectives(e.createElementVNode("div",{class:"text-center pt-42px text-gray-400"},e.toDisplayString(e.unref(s)("noComponentFound")),513),[[e.vShow,!r.value.length]])])])]))}});exports.default=P;
|