zentaopms/www/static/js/index-6e87b835.js
2023-05-16 10:47:08 +08:00

2 lines
6.2 KiB
JavaScript

import{aq as t,a8 as o,j as D,ar as h,as as x,at as M,b as B,d as L,r as E,o as U,c as F,p as V,f as c,w as y,u as r,F as N,M as d}from"./index-5427279b.js";import{l as _}from"./index-961888e8.js";import{_ as G}from"./index-147c69c9.js";import{u as O,a as j}from"./chartEditStore-53dc1709.js";import{l as K}from"./plugin-49832ae5.js";import{i as S}from"./icon-d6196121.js";const{CopyIcon:$,CutIcon:z,ClipboardOutlineIcon:W,TrashIcon:Y,ChevronDownIcon:q,ChevronUpIcon:X,LockOpenOutlineIcon:J,LockClosedOutlineIcon:Q,EyeOutlineIcon:Z,EyeOffOutlineIcon:ee}=S.ionicons5,{UpToTopIcon:te,DownToBottomIcon:ne,PaintBrushIcon:oe,Carbon3DSoftwareIcon:ae,Carbon3DCursorIcon:le}=S.carbon,e=O(),v=(n=3)=>({type:"divider",key:`d${n}`}),f=[{label:"\u9501\u5B9A",key:t.LOCK,icon:o(Q),fnHandle:e.setLock},{label:"\u89E3\u9501",key:t.UNLOCK,icon:o(J),fnHandle:e.setUnLock},{label:"\u9690\u85CF",key:t.HIDE,icon:o(ee),fnHandle:e.setHide},{label:"\u663E\u793A",key:t.SHOW,icon:o(Z),fnHandle:e.setShow},{type:"divider",key:"d0"},{label:"\u590D\u5236",key:t.COPY,icon:o($),fnHandle:e.setCopy},{label:"\u526A\u5207",key:t.CUT,icon:o(z),fnHandle:e.setCut},{label:"\u7C98\u8D34",key:t.PARSE,icon:o(W),fnHandle:e.setParse},{type:"divider",key:"d1"},{label:"\u7F6E\u9876",key:t.TOP,icon:o(te),fnHandle:e.setTop},{label:"\u7F6E\u5E95",key:t.BOTTOM,icon:o(ne),fnHandle:e.setBottom},{label:"\u4E0A\u79FB",key:t.UP,icon:o(X),fnHandle:e.setUp},{label:"\u4E0B\u79FB",key:t.DOWN,icon:o(q),fnHandle:e.setDown},{type:"divider",key:"d2"},{label:"\u6E05\u7A7A\u526A\u8D34\u677F",key:t.CLEAR,icon:o(oe),fnHandle:e.setRecordChart},{label:"\u5220\u9664",key:t.DELETE,icon:o(Y),fnHandle:e.removeComponentList}],m=[{label:"\u521B\u5EFA\u5206\u7EC4",key:t.GROUP,icon:o(ae),fnHandle:e.setGroup},{label:"\u89E3\u9664\u5206\u7EC4",key:t.UN_GROUP,icon:o(le),fnHandle:e.setUnGroup}],re=[t.PARSE,t.CLEAR],k=(n,a)=>{if(!a)return n;const l=[];return a.forEach(s=>{l.push(...n.filter(u=>u.key===s))}),l},ue=(n,a)=>a?n.filter(l=>a.findIndex(s=>s!==l.key)!==-1):n,i=D([]),ie=(n,a,l,s,u)=>{n.stopPropagation(),n.preventDefault();let p=n.target;for(;p instanceof SVGElement;)p=p.parentNode;e.setTargetSelectChart(a&&a.id),e.setRightMenuShow(!1),e.getTargetChart.selectId.length>1?i.value=m:i.value=f,a||(i.value=k(h(i.value),re)),s&&(i.value=ue([...m,v(),...f],s)),u&&(i.value=k([...m,v(),...f],u)),l&&(i.value=l(x(h(i.value)),[...m,...f],a)),M().then(()=>{e.setMousePosition(n.clientX,n.clientY),e.setRightMenuShow(!0)})},se=()=>(i.value=f,{menuOptions:i,defaultOptions:f,defaultMultiSelectOptions:m,handleContextMenu:ie,onClickOutSide:()=>{e.setRightMenuShow(!1)},handleMenuSelect:l=>{e.setRightMenuShow(!1);const s=i.value.filter(u=>u.key===l);i.value.forEach(u=>{if(u.key===l){if(u.fnHandle){u.fnHandle();return}s||K()}})},mousePosition:e.getMousePosition});const ce={class:"go-chart"},de=L({__name:"index",setup(n){const a=j(),l=O();a.canvasInit(l.getEditCanvas);const s=_(()=>d(()=>import("./index-38f95fcb.js"),["static/js/index-38f95fcb.js","static/css/index-eb4fb963.css","static/js/index-5427279b.js","static/css/index-c34cea1e.css","static/js/plugin-49832ae5.js","static/js/icon-d6196121.js","static/js/useKeyboard.hook-ecc815a5.js","static/js/chartEditStore-53dc1709.js","static/js/chartLayoutStore-9baa7ec7.js"])),u=_(()=>d(()=>import("./index-07a2afa2.js"),["static/js/index-07a2afa2.js","static/css/index-057f319e.css","static/js/index-5427279b.js","static/css/index-c34cea1e.css","static/js/plugin-49832ae5.js","static/js/icon-d6196121.js","static/js/chartEditStore-53dc1709.js"])),p=_(()=>d(()=>import("./index-732f80a0.js"),["static/js/index-732f80a0.js","static/css/index-d9c53f20.css","static/js/index-5427279b.js","static/css/index-c34cea1e.css","static/js/icon-d6196121.js"])),I=_(()=>d(()=>import("./index-9ab1f4e6.js"),["static/js/index-9ab1f4e6.js","static/css/index-bd396345.css","static/js/index-5427279b.js","static/css/index-c34cea1e.css","static/js/index-4153922e.js","static/css/index-7c15b129.css","static/js/icon-d6196121.js","static/js/chartLayoutStore-9baa7ec7.js","static/js/chartEditStore-53dc1709.js","static/js/plugin-49832ae5.js","static/js/index-961888e8.js","static/css/index-8f2c5737.css","static/js/theme-color-0deb5eeb.js","static/js/index-147c69c9.js","static/css/index-c9612015.css"])),b=_(()=>d(()=>import("./index-a96ec20c.js"),["static/js/index-a96ec20c.js","static/css/index-fd2dc194.css","static/css/SettingItemBox.vue_vue_type_style_index_0_scoped_true_lang-180d0bf1.css","static/js/index-5427279b.js","static/css/index-c34cea1e.css","static/js/index-4153922e.js","static/css/index-7c15b129.css","static/js/icon-d6196121.js","static/js/index-961888e8.js","static/css/index-8f2c5737.css","static/js/theme-color-0deb5eeb.js","static/js/plugin-49832ae5.js","static/js/chartLayoutStore-9baa7ec7.js","static/js/chartEditStore-53dc1709.js","static/js/index-cd09e6dc.js","static/css/index-3e66113d.css","static/js/_arrayMap-23a2d4b9.js","static/js/tables_list-a7382472.js","static/js/http-6ded690c.js","static/js/SettingItemBox-35417b6f.js","static/js/CollapseItem-fd18501b.js"])),H=_(()=>d(()=>import("./index-54f03ada.js"),["static/js/index-54f03ada.js","static/css/index-3c003ac8.css","static/js/index-5427279b.js","static/css/index-c34cea1e.css","static/js/index-961888e8.js","static/css/index-8f2c5737.css","static/js/icon-d6196121.js","static/js/theme-color-0deb5eeb.js","static/js/index-4153922e.js","static/css/index-7c15b129.css","static/js/chartLayoutStore-9baa7ec7.js","static/js/chartEditStore-53dc1709.js","static/js/plugin-49832ae5.js"])),{menuOptions:g,onClickOutSide:P,mousePosition:C,handleMenuSelect:T}=se();return(fe,pe)=>{const R=E("n-layout-content"),w=E("n-layout"),A=E("n-dropdown");return U(),F(N,null,[V("div",ce,[c(w,null,{default:y(()=>[c(r(G),null,{left:y(()=>[c(r(s))]),center:y(()=>[c(r(p))]),"ri-left":y(()=>[c(r(u))]),_:1}),c(R,{"content-style":"overflow:hidden; display: flex"},{default:y(()=>[c(r(b)),c(r(I)),c(r(H))]),_:1})]),_:1})]),c(A,{placement:"bottom-start",trigger:"manual",size:"small",x:r(C).x,y:r(C).y,options:r(g),show:r(l).getRightMenuShow,"on-clickoutside":r(P),onSelect:r(T)},null,8,["x","y","options","show","on-clickoutside","onSelect"])],64)}}});var _e=B(de,[["__scopeId","data-v-d9bdd29c"]]),ke=Object.freeze(Object.defineProperty({__proto__:null,default:_e},Symbol.toStringTag,{value:"Module"}));export{v as d,ke as i,se as u};