@vue-flow/controls
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("@vue-flow/core");const p={name:"ControlButton",compatConfig:{MODE:3}},B=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},V={class:"vue-flow__controls-button"};function C(o,t,n,r,s,i){return e.openBlock(),e.createElementBlock("button",V,[e.renderSlot(o.$slots,"default")])}const l=B(p,[["render",C]]),$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},g=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),z=[g];function y(o,t){return e.openBlock(),e.createElementBlock("svg",$,z)}const H={render:y},S={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},E=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),I=[E];function N(o,t){return e.openBlock(),e.createElementBlock("svg",S,I)}const M={render:N},b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},x=e.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),D=[x];function O(o,t){return e.openBlock(),e.createElementBlock("svg",b,D)}const R={render:O},F={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),P=[A];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",F,P)}const q={render:Z},j={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},L=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),T=[L];function U(o,t){return e.openBlock(),e.createElementBlock("svg",j,T)}const G={render:U},J={name:"Controls",compatConfig:{MODE:3}},K=e.defineComponent({...J,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const n=u.useVueFlow(),r=e.toRef(n,"nodesDraggable"),s=e.toRef(n,"nodesConnectable"),i=e.toRef(n,"elementsSelectable"),d=e.toRef(n,"setInteractive"),m=e.toRef(n,"zoomIn"),v=e.toRef(n,"zoomOut"),h=e.toRef(n,"fitView"),a=e.computed(()=>r.value&&s.value&&i.value),f=()=>{m.value(),t("zoomIn")},_=()=>{v.value(),t("zoomOut")},w=()=>{h.value(o.fitViewParams),t("fitView")},k=()=>{d.value(!a.value),t("interactionChange",!a.value)};return(c,Q)=>(e.openBlock(),e.createBlock(e.unref(u.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(c.$slots,"control-zoom-in",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomin",onClick:f},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(H))))])]),_:3})]),e.renderSlot(c.$slots,"control-zoom-out",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomout",onClick:_},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(M))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(c.$slots,"control-fit-view",{key:1},()=>[e.createVNode(l,{class:"vue-flow__controls-fitview",onClick:w},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(c.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:k},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(c.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(c.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=l;exports.Controls=K; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("@vue-flow/core");const k={name:"ControlButton",compatConfig:{MODE:3}},p=(o,t)=>{const c=o.__vccOpts||o;for(const[l,s]of t)c[l]=s;return c},B={class:"vue-flow__controls-button"};function V(o,t,c,l,s,u){return e.openBlock(),e.createElementBlock("button",B,[e.renderSlot(o.$slots,"default")])}const r=p(k,[["render",V]]),C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},$=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),g=[$];function z(o,t){return e.openBlock(),e.createElementBlock("svg",C,g)}const y={render:z},H={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},S=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),E=[S];function N(o,t){return e.openBlock(),e.createElementBlock("svg",H,E)}const I={render:N},M={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},x=e.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),D=[x];function O(o,t){return e.openBlock(),e.createElementBlock("svg",M,D)}const b={render:O},P={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},F=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),A=[F];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",P,A)}const q={render:Z},L={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},j=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),T=[j];function U(o,t){return e.openBlock(),e.createElementBlock("svg",L,T)}const G={render:U},J={name:"Controls",compatConfig:{MODE:3}},K=e.defineComponent({...J,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:i.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const{nodesDraggable:c,nodesConnectable:l,elementsSelectable:s,setInteractive:u,zoomIn:d,zoomOut:m,fitView:h}=i.useVueFlow(),a=e.computed(()=>c.value&&l.value&&s.value);function v(){d(),t("zoomIn")}function w(){m(),t("zoomOut")}function _(){h(o.fitViewParams),t("fitView")}function f(){u(!a.value),t("interactionChange",!a.value)}return(n,Q)=>(e.openBlock(),e.createBlock(e.unref(i.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"control-zoom-in",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomin",onClick:v},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y))))])]),_:3})]),e.renderSlot(n.$slots,"control-zoom-out",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomout",onClick:w},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(I))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[e.createVNode(r,{class:"vue-flow__controls-fitview",onClick:_},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(n.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(r,{key:0,class:"vue-flow__controls-interactive",onClick:f},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(n.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(n.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=r;exports.Controls=K; |
@@ -1,1 +0,1 @@ | ||
var VueFlowControls=function(r,o,d){"use strict";const G="",_={name:"ControlButton",compatConfig:{MODE:3}},h=(t,e)=>{const n=t.__vccOpts||t;for(const[s,a]of e)n[s]=a;return n},f={class:"vue-flow__controls-button"};function w(t,e,n,s,a,m){return o.openBlock(),o.createElementBlock("button",f,[o.renderSlot(t.$slots,"default")])}const l=h(_,[["render",w]]),k={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},V=[o.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function p(t,e){return o.openBlock(),o.createElementBlock("svg",k,V)}const B={render:p},$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C=[o.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1)];function g(t,e){return o.openBlock(),o.createElementBlock("svg",$,C)}const z={render:g},y={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},H=[o.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function S(t,e){return o.openBlock(),o.createElementBlock("svg",y,H)}const E={render:S},I={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},N=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function u(t,e){return o.openBlock(),o.createElementBlock("svg",I,N)}const M={render:u},b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},D=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function O(t,e){return o.openBlock(),o.createElementBlock("svg",b,D)}const x={render:O},F={name:"Controls",compatConfig:{MODE:3}},R=o.defineComponent({...F,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const n=d.useVueFlow(),s=o.toRef(n,"nodesDraggable"),a=o.toRef(n,"nodesConnectable"),m=o.toRef(n,"elementsSelectable"),A=o.toRef(n,"setInteractive"),P=o.toRef(n,"zoomIn"),Z=o.toRef(n,"zoomOut"),j=o.toRef(n,"fitView"),i=o.computed(()=>s.value&&a.value&&m.value),L=()=>{P.value(),e("zoomIn")},T=()=>{Z.value(),e("zoomOut")},U=()=>{j.value(t.fitViewParams),e("fitView")},q=()=>{A.value(!i.value),e("interactionChange",!i.value)};return(c,Y)=>(o.openBlock(),o.createBlock(o.unref(d.Panel),{class:"vue-flow__controls",position:t.position},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"top"),t.showZoom?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(c.$slots,"control-zoom-in",{},()=>[o.createVNode(l,{class:"vue-flow__controls-zoomin",onClick:L},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-zoom-in",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(B))))])]),_:3})]),o.renderSlot(c.$slots,"control-zoom-out",{},()=>[o.createVNode(l,{class:"vue-flow__controls-zoomout",onClick:T},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-zoom-out",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z))))])]),_:3})])],64)):o.createCommentVNode("",!0),t.showFitView?o.renderSlot(c.$slots,"control-fit-view",{key:1},()=>[o.createVNode(l,{class:"vue-flow__controls-fitview",onClick:U},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"icon-fit-view",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(E))))])]),_:3})]):o.createCommentVNode("",!0),t.showInteractive?o.renderSlot(c.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(o.openBlock(),o.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:q},{default:o.withCtx(()=>[o.unref(i)?o.renderSlot(c.$slots,"icon-unlock",{key:0},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(x))))]):o.createCommentVNode("",!0),o.unref(i)?o.createCommentVNode("",!0):o.renderSlot(c.$slots,"icon-lock",{key:1},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(M))))])]),_:3})):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0),o.renderSlot(c.$slots,"default")]),_:3},8,["position"]))}});return r.ControlButton=l,r.Controls=R,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r}({},Vue,VueFlowCore); | ||
var VueFlowControls=function(r,o,d){"use strict";const G="",h={name:"ControlButton",compatConfig:{MODE:3}},_=(t,e)=>{const l=t.__vccOpts||t;for(const[s,a]of e)l[s]=a;return l},w={class:"vue-flow__controls-button"};function f(t,e,l,s,a,m){return o.openBlock(),o.createElementBlock("button",w,[o.renderSlot(t.$slots,"default")])}const c=_(h,[["render",f]]),k={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},B=[o.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function V(t,e){return o.openBlock(),o.createElementBlock("svg",k,B)}const p={render:V},$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C=[o.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1)];function g(t,e){return o.openBlock(),o.createElementBlock("svg",$,C)}const z={render:g},u={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},y=[o.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function H(t,e){return o.openBlock(),o.createElementBlock("svg",u,y)}const S={render:H},E={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},N=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function I(t,e){return o.openBlock(),o.createElementBlock("svg",E,N)}const M={render:I},x={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},D=[o.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function F(t,e){return o.openBlock(),o.createElementBlock("svg",x,D)}const O={render:F},b={name:"Controls",compatConfig:{MODE:3}},P=o.defineComponent({...b,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:d.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const{nodesDraggable:l,nodesConnectable:s,elementsSelectable:a,setInteractive:m,zoomIn:A,zoomOut:Z,fitView:L}=d.useVueFlow(),i=o.computed(()=>l.value&&s.value&&a.value);function j(){A(),e("zoomIn")}function T(){Z(),e("zoomOut")}function U(){L(t.fitViewParams),e("fitView")}function q(){m(!i.value),e("interactionChange",!i.value)}return(n,X)=>(o.openBlock(),o.createBlock(o.unref(d.Panel),{class:"vue-flow__controls",position:t.position},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"top"),t.showZoom?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(n.$slots,"control-zoom-in",{},()=>[o.createVNode(c,{class:"vue-flow__controls-zoomin",onClick:j},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(p))))])]),_:3})]),o.renderSlot(n.$slots,"control-zoom-out",{},()=>[o.createVNode(c,{class:"vue-flow__controls-zoomout",onClick:T},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z))))])]),_:3})])],64)):o.createCommentVNode("",!0),t.showFitView?o.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[o.createVNode(c,{class:"vue-flow__controls-fitview",onClick:U},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"icon-fit-view",{},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(S))))])]),_:3})]):o.createCommentVNode("",!0),t.showInteractive?o.renderSlot(n.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(o.openBlock(),o.createBlock(c,{key:0,class:"vue-flow__controls-interactive",onClick:q},{default:o.withCtx(()=>[o.unref(i)?o.renderSlot(n.$slots,"icon-unlock",{key:0},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(O))))]):o.createCommentVNode("",!0),o.unref(i)?o.createCommentVNode("",!0):o.renderSlot(n.$slots,"icon-lock",{key:1},()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(M))))])]),_:3})):o.createCommentVNode("",!0)]):o.createCommentVNode("",!0),o.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});return r.ControlButton=c,r.Controls=P,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r}({},Vue,VueFlowCore); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("@vue-flow/core");const p={name:"ControlButton",compatConfig:{MODE:3}},B=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},V={class:"vue-flow__controls-button"};function C(o,t,n,r,s,i){return e.openBlock(),e.createElementBlock("button",V,[e.renderSlot(o.$slots,"default")])}const l=B(p,[["render",C]]),$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},g=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),z=[g];function y(o,t){return e.openBlock(),e.createElementBlock("svg",$,z)}const H={render:y},S={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},E=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),I=[E];function N(o,t){return e.openBlock(),e.createElementBlock("svg",S,I)}const M={render:N},b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},x=e.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),D=[x];function O(o,t){return e.openBlock(),e.createElementBlock("svg",b,D)}const R={render:O},F={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),P=[A];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",F,P)}const q={render:Z},j={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},L=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),T=[L];function U(o,t){return e.openBlock(),e.createElementBlock("svg",j,T)}const G={render:U},J={name:"Controls",compatConfig:{MODE:3}},K=e.defineComponent({...J,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:"bottom-left"}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const n=u.useVueFlow(),r=e.toRef(n,"nodesDraggable"),s=e.toRef(n,"nodesConnectable"),i=e.toRef(n,"elementsSelectable"),d=e.toRef(n,"setInteractive"),m=e.toRef(n,"zoomIn"),v=e.toRef(n,"zoomOut"),h=e.toRef(n,"fitView"),a=e.computed(()=>r.value&&s.value&&i.value),f=()=>{m.value(),t("zoomIn")},_=()=>{v.value(),t("zoomOut")},w=()=>{h.value(o.fitViewParams),t("fitView")},k=()=>{d.value(!a.value),t("interactionChange",!a.value)};return(c,Q)=>(e.openBlock(),e.createBlock(e.unref(u.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(c.$slots,"control-zoom-in",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomin",onClick:f},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(H))))])]),_:3})]),e.renderSlot(c.$slots,"control-zoom-out",{},()=>[e.createVNode(l,{class:"vue-flow__controls-zoomout",onClick:_},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(M))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(c.$slots,"control-fit-view",{key:1},()=>[e.createVNode(l,{class:"vue-flow__controls-fitview",onClick:w},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(c.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(l,{key:0,class:"vue-flow__controls-interactive",onClick:k},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(c.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(c.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=l;exports.Controls=K; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("@vue-flow/core");const k={name:"ControlButton",compatConfig:{MODE:3}},p=(o,t)=>{const c=o.__vccOpts||o;for(const[l,s]of t)c[l]=s;return c},B={class:"vue-flow__controls-button"};function V(o,t,c,l,s,u){return e.openBlock(),e.createElementBlock("button",B,[e.renderSlot(o.$slots,"default")])}const r=p(k,[["render",V]]),C={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},$=e.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),g=[$];function z(o,t){return e.openBlock(),e.createElementBlock("svg",C,g)}const y={render:z},H={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},S=e.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),E=[S];function N(o,t){return e.openBlock(),e.createElementBlock("svg",H,E)}const I={render:N},M={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},x=e.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),D=[x];function O(o,t){return e.openBlock(),e.createElementBlock("svg",M,D)}const b={render:O},P={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},F=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),A=[F];function Z(o,t){return e.openBlock(),e.createElementBlock("svg",P,A)}const q={render:Z},L={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},j=e.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),T=[j];function U(o,t){return e.openBlock(),e.createElementBlock("svg",L,T)}const G={render:U},J={name:"Controls",compatConfig:{MODE:3}},K=e.defineComponent({...J,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:i.PanelPosition.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(o,{emit:t}){const{nodesDraggable:c,nodesConnectable:l,elementsSelectable:s,setInteractive:u,zoomIn:d,zoomOut:m,fitView:h}=i.useVueFlow(),a=e.computed(()=>c.value&&l.value&&s.value);function v(){d(),t("zoomIn")}function w(){m(),t("zoomOut")}function _(){h(o.fitViewParams),t("fitView")}function f(){u(!a.value),t("interactionChange",!a.value)}return(n,Q)=>(e.openBlock(),e.createBlock(e.unref(i.Panel),{class:"vue-flow__controls",position:o.position},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top"),o.showZoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"control-zoom-in",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomin",onClick:v},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-in",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y))))])]),_:3})]),e.renderSlot(n.$slots,"control-zoom-out",{},()=>[e.createVNode(r,{class:"vue-flow__controls-zoomout",onClick:w},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-zoom-out",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(I))))])]),_:3})])],64)):e.createCommentVNode("",!0),o.showFitView?e.renderSlot(n.$slots,"control-fit-view",{key:1},()=>[e.createVNode(r,{class:"vue-flow__controls-fitview",onClick:_},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-fit-view",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(b))))])]),_:3})]):e.createCommentVNode("",!0),o.showInteractive?e.renderSlot(n.$slots,"control-interactive",{key:2},()=>[o.showInteractive?(e.openBlock(),e.createBlock(r,{key:0,class:"vue-flow__controls-interactive",onClick:f},{default:e.withCtx(()=>[e.unref(a)?e.renderSlot(n.$slots,"icon-unlock",{key:0},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G))))]):e.createCommentVNode("",!0),e.unref(a)?e.createCommentVNode("",!0):e.renderSlot(n.$slots,"icon-lock",{key:1},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(q))))])]),_:3})):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")]),_:3},8,["position"]))}});exports.ControlButton=r;exports.Controls=K; |
{ | ||
"name": "@vue-flow/controls", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"private": false, | ||
@@ -15,2 +15,18 @@ "license": "MIT", | ||
}, | ||
"keywords": [ | ||
"vue", | ||
"flow", | ||
"diagram", | ||
"editor", | ||
"graph", | ||
"node", | ||
"link", | ||
"port", | ||
"slot", | ||
"vue3", | ||
"composition-api", | ||
"vue-flow", | ||
"vueflow", | ||
"typescript" | ||
], | ||
"main": "./dist/vue-flow-controls.js", | ||
@@ -21,6 +37,17 @@ "module": "./dist/vue-flow-controls.mjs", | ||
"jsdelivr": "./dist/vue-flow-controls.iife.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/vue-flow-controls.mjs", | ||
"require": "./dist/vue-flow-controls.js" | ||
}, | ||
"./dist/style.css": "./dist/style.css" | ||
}, | ||
"files": [ | ||
"dist" | ||
"dist", | ||
"*.d.ts" | ||
], | ||
"sideEffects": false, | ||
"sideEffects": [ | ||
"*.css" | ||
], | ||
"peerDependencies": { | ||
@@ -33,7 +60,7 @@ "@vue-flow/core": "^1.12.2" | ||
"vue": "^3.2.25", | ||
"vue-tsc": "^1.1.5", | ||
"vue-tsc": "^1.2.0", | ||
"@tooling/eslint-config": "0.0.0", | ||
"@tooling/tsconfig": "0.0.0", | ||
"@tooling/vite-config": "0.0.0", | ||
"@vue-flow/core": "1.15.2" | ||
"@vue-flow/core": "1.19.0", | ||
"@tooling/vite-config": "0.0.0" | ||
}, | ||
@@ -45,5 +72,6 @@ "publishConfig": { | ||
"scripts": { | ||
"dev": "vite build --watch", | ||
"build": "vite build", | ||
"types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", | ||
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", | ||
"lint": "eslint --ext .js,.ts,.vue ./", | ||
"lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", | ||
@@ -50,0 +78,0 @@ "test": "exit 0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28476
319