goview_vue/dist/static/js/index-04f5d9ae.js
2023-06-06 13:24:29 +08:00

2 lines
7.5 KiB
JavaScript

import{aa as t,Y as n,j as A,ab as E,ac as U,ad as V,d as B,r as h,c as N,n as k,b as c,w as m,u as a,F as G,o as j,ae as u,h as K}from"./index-4ec2ce15.js";import{l as _}from"./index-64867e41.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang-4f4dbba3.js";import{u as I,a as $}from"./chartEditStore-bfc6c223.js";import{l as z}from"./plugin-ae137233.js";import{i as b}from"./icon-42fa39e7.js";const{CopyIcon:F,CutIcon:W,ClipboardOutlineIcon:X,TrashIcon:q,ChevronDownIcon:J,ChevronUpIcon:Q,LockOpenOutlineIcon:Z,LockClosedOutlineIcon:ee,EyeOutlineIcon:te,EyeOffOutlineIcon:oe}=b.ionicons5,{UpToTopIcon:ne,DownToBottomIcon:ae,PaintBrushIcon:le,Carbon3DSoftwareIcon:re,Carbon3DCursorIcon:ie}=b.carbon,e=I(),O=(o=3)=>({type:"divider",key:`d${o}`}),f=[{label:"锁定",key:t.LOCK,icon:n(ee),fnHandle:e.setLock},{label:"解锁",key:t.UNLOCK,icon:n(Z),fnHandle:e.setUnLock},{label:"隐藏",key:t.HIDE,icon:n(oe),fnHandle:e.setHide},{label:"显示",key:t.SHOW,icon:n(te),fnHandle:e.setShow},{type:"divider",key:"d0"},{label:"复制",key:t.COPY,icon:n(F),fnHandle:e.setCopy},{label:"剪切",key:t.CUT,icon:n(W),fnHandle:e.setCut},{label:"粘贴",key:t.PARSE,icon:n(X),fnHandle:e.setParse},{type:"divider",key:"d1"},{label:"置顶",key:t.TOP,icon:n(ne),fnHandle:e.setTop},{label:"置底",key:t.BOTTOM,icon:n(ae),fnHandle:e.setBottom},{label:"上移",key:t.UP,icon:n(Q),fnHandle:e.setUp},{label:"下移",key:t.DOWN,icon:n(J),fnHandle:e.setDown},{type:"divider",key:"d2"},{label:"清空剪贴板",key:t.CLEAR,icon:n(le),fnHandle:e.setRecordChart},{label:"删除",key:t.DELETE,icon:n(q),fnHandle:e.removeComponentList}],y=[{label:"创建分组",key:t.GROUP,icon:n(re),fnHandle:e.setGroup},{label:"解除分组",key:t.UN_GROUP,icon:n(ie),fnHandle:e.setUnGroup}],se=[t.PARSE,t.CLEAR],S=(o,l)=>{if(!l)return o;const r=[];return l.forEach(d=>{r.push(...o.filter(i=>i.key===d))}),r},ce=(o,l)=>l?o.filter(r=>l.findIndex(d=>d!==r.key)!==-1):o,s=A([]),de=(o,l,r,d,i)=>{o.stopPropagation(),o.preventDefault();let p=o.target;for(;p instanceof SVGElement;)p=p.parentNode;e.setTargetSelectChart(l&&l.id),e.setRightMenuShow(!1),e.getTargetChart.selectId.length>1?s.value=y:s.value=f,l||(s.value=S(E(s.value),se)),d&&(s.value=ce([...y,O(),...f],d)),i&&(s.value=S([...y,O(),...f],i)),r&&(s.value=r(U(E(s.value)),[...y,...f],l)),V().then(()=>{e.setMousePosition(o.clientX,o.clientY),e.setRightMenuShow(!0)})},ue=()=>(s.value=f,{menuOptions:s,defaultOptions:f,defaultMultiSelectOptions:y,handleContextMenu:de,onClickOutSide:()=>{e.setRightMenuShow(!1)},handleMenuSelect:r=>{e.setRightMenuShow(!1);const d=s.value.filter(i=>i.key===r);s.value.forEach(i=>{if(i.key===r){if(i.fnHandle){i.fnHandle();return}d||z()}})},mousePosition:e.getMousePosition}),_e={class:"go-chart"},fe={style:{overflow:"hidden",display:"flex"}},pe=B({__name:"index",setup(o){const l=$(),r=I();l.canvasInit(r.getEditCanvas);const d=_(()=>u(()=>import("./index-dc5d264a.js"),["./index-dc5d264a.js","./index-4ec2ce15.js","../css/index-9c2eb289.css","./plugin-ae137233.js","./icon-42fa39e7.js","./useKeyboard.hook-f82db81a.js","./chartEditStore-bfc6c223.js","./useSync.hook-dcdbd18a.js","./chartLayoutStore-810503fe.js","./index-96c3a075.js","./SettingItem-35031211.js","../css/SettingItemBox-462ae6ed.css","./SettingItemBox-f60eaa4e.js","./CollapseItem.vue_vue_type_script_setup_true_lang-77b092a0.js","./index.esm.min-2eecdcbd.js","./fileTypeEnum-21359a08.js","../css/index-51120298.css","./project.api-0931840b.js","../css/index-647e4d8d.css"],import.meta.url)),i=_(()=>u(()=>import("./index-00531dca.js"),["./index-00531dca.js","./index-4ec2ce15.js","../css/index-9c2eb289.css","./index-64867e41.js","./icon-42fa39e7.js","../css/index-d825de9b.css","./chartEditStore-bfc6c223.js","./plugin-ae137233.js","./useSyncUpdate.hook-4756cfae.js","./useSync.hook-dcdbd18a.js","./chartLayoutStore-810503fe.js","./index-96c3a075.js","./SettingItem-35031211.js","../css/SettingItemBox-462ae6ed.css","./SettingItemBox-f60eaa4e.js","./CollapseItem.vue_vue_type_script_setup_true_lang-77b092a0.js","./index.esm.min-2eecdcbd.js","./fileTypeEnum-21359a08.js","../css/index-51120298.css","./project.api-0931840b.js","../css/index-cf1ec5d0.css"],import.meta.url)),p=_(()=>u(()=>import("./index-46cc8211.js"),["./index-46cc8211.js","./index-4ec2ce15.js","../css/index-9c2eb289.css","./icon-42fa39e7.js","./chartEditStore-bfc6c223.js","./plugin-ae137233.js","./project.api-0931840b.js","./useSync.hook-dcdbd18a.js","./chartLayoutStore-810503fe.js","./index-96c3a075.js","./SettingItem-35031211.js","../css/SettingItemBox-462ae6ed.css","./SettingItemBox-f60eaa4e.js","./CollapseItem.vue_vue_type_script_setup_true_lang-77b092a0.js","./index.esm.min-2eecdcbd.js","./fileTypeEnum-21359a08.js","../css/index-51120298.css","../css/index-4b4fa8e2.css"],import.meta.url)),H=_(()=>u(()=>import("./index-e251d0d0.js"),["./index-e251d0d0.js","./index-4ec2ce15.js","../css/index-9c2eb289.css","./index-f119bf30.js","./icon-42fa39e7.js","../css/index-366d23c6.css","./chartLayoutStore-810503fe.js","./chartEditStore-bfc6c223.js","./plugin-ae137233.js","./index-96c3a075.js","./SettingItem-35031211.js","../css/SettingItemBox-462ae6ed.css","./SettingItemBox-f60eaa4e.js","./CollapseItem.vue_vue_type_script_setup_true_lang-77b092a0.js","./index.esm.min-2eecdcbd.js","./fileTypeEnum-21359a08.js","../css/index-51120298.css","./index-64867e41.js","../css/index-d825de9b.css","./index.vue_vue_type_script_setup_true_lang-4f4dbba3.js","../css/index-dc86d379.css","../css/index-58f902b6.css"],import.meta.url)),g=_(()=>u(()=>import("./index-d489f98f.js").then(C=>C.i),["./index-d489f98f.js","./index-4ec2ce15.js","../css/index-9c2eb289.css","./index-f119bf30.js","./icon-42fa39e7.js","../css/index-366d23c6.css","./index-64867e41.js","../css/index-d825de9b.css","./index-96c3a075.js","./SettingItem-35031211.js","../css/SettingItemBox-462ae6ed.css","./SettingItemBox-f60eaa4e.js","./CollapseItem.vue_vue_type_script_setup_true_lang-77b092a0.js","./chartEditStore-bfc6c223.js","./plugin-ae137233.js","./index.esm.min-2eecdcbd.js","./fileTypeEnum-21359a08.js","../css/index-51120298.css","./chartLayoutStore-810503fe.js","../css/index-524fca58.css"],import.meta.url)),P=_(()=>u(()=>import("./index-0e410ade.js"),["./index-0e410ade.js","./index-4ec2ce15.js","../css/index-9c2eb289.css","./index-64867e41.js","./icon-42fa39e7.js","../css/index-d825de9b.css","./index-f119bf30.js","../css/index-366d23c6.css","./chartLayoutStore-810503fe.js","./chartEditStore-bfc6c223.js","./plugin-ae137233.js","../css/index-73412914.css"],import.meta.url)),T=_(()=>u(()=>import("./index-4186c295.js"),["./index-4186c295.js","./chartLayoutStore-810503fe.js","./index-4ec2ce15.js","../css/index-9c2eb289.css","./chartEditStore-bfc6c223.js","./plugin-ae137233.js","./icon-42fa39e7.js"],import.meta.url)),{menuOptions:R,onClickOutSide:w,mousePosition:v,handleMenuSelect:x}=ue();return(C,ye)=>{const D=h("n-layout-content"),L=h("n-layout"),M=h("n-dropdown");return j(),N(G,null,[k("div",_e,[c(L,null,{default:m(()=>[c(a(Y),null,{left:m(()=>[c(a(d))]),center:m(()=>[c(a(p))]),"ri-left":m(()=>[c(a(i))]),_:1}),c(D,{"content-style":"overflow:hidden; display: flex"},{default:m(()=>[k("div",fe,[c(a(g)),c(a(H))]),c(a(P))]),_:1})]),_:1})]),c(M,{placement:"bottom-start",trigger:"manual",size:"small",x:a(v).x,y:a(v).y,options:a(R),show:a(r).getRightMenuShow,"on-clickoutside":a(w),onSelect:a(x)},null,8,["x","y","options","show","on-clickoutside","onSelect"]),c(a(T))],64)}}});const me=K(pe,[["__scopeId","data-v-28f723f0"]]),Se=Object.freeze(Object.defineProperty({__proto__:null,default:me},Symbol.toStringTag,{value:"Module"}));export{O as d,Se as i,ue as u};