n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 7.69 kB
JavaScript
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.16.1"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./core-legacy-VD8c7QJ-.js","./src-legacy-B67uuxhB.js","./get-legacy-CLCnFf3e.js","./_plugin-vue_export-helper-legacy-DFdC_I5Z.js","./users.store-legacy-azRUgFdP.js","./constants-legacy-2_ytuuS3.js","./assistant.store-legacy-DDWm4tY4.js","./chatPanel.store-legacy-BsMvrm8R.js","./setupPanel.store-legacy-CxgQYJWF.js","./KeyboardShortcutTooltip-legacy-Dj9i12D0.js","./useNodeCreatorShortcutCoachmark-legacy-4mFrLqnb.js","./useActions-legacy-KKrCVUrG.js"],(function(e,t){var a,o,n,s,c,r,i,l,d,u,f,b,p,g,h,m,y,_,v,k,w,C,x,N,T,A,j,E,S,P,B,z,D,V,I,O,K,$,W,F,H,U,M,R,L,J,Y;return{setters:[function(e){a=e.$,o=e.A,n=e.C,s=e.E,c=e.M,r=e.N,i=e.S,l=e.Sn,d=e.T,u=e.W,f=e.Wt,b=e._,p=e._n,g=e.it,h=e.j,m=e.v,y=e.w,_=e.yt},function(e){v=e.at},function(e){k=e.Di,w=e.F,C=e.Mi,x=e.Zi,N=e._i},function(e){T=e.d},function(e){A=e.t},function(e){j=e.Ht,E=e.Ot,S=e.fr,P=e.in,B=e.r},function(e){z=e.ar,D=e.mt},function(e){V=e.t},function(e){I=e.t},function(e){O=e.t},function(e){K=e.t},function(e){$=e.n},function(e){W=e.t}],execute:function(){(F=document.createElement("style")).textContent=".node-creator-shortcut-coachmark{width:250px;padding:var(--spacing--xs);background:var(--color--background--shade-2);color:var(--color--foreground--tint-2)}.node-creator-shortcut-coachmark svg{fill:var(--color--background--shade-2);stroke:var(--color--background--shade-2)}.node-creator-shortcut-coachmark__header{padding-bottom:var(--spacing--4xs);justify-content:space-between;align-items:center;display:flex}.node-creator-shortcut-coachmark__title{font-size:var(--font-size--sm);font-weight:var(--font-weight--bold);line-height:1.45}.node-creator-shortcut-coachmark__body{font-size:var(--font-size--sm);line-height:var(--line-height--xl);margin:0}.node-creator-shortcut-coachmark__footer{padding-top:var(--spacing--2xs)}.node-creator-shortcut-coachmark__button{background-color:var(--color--primary)}.node-creator-shortcut-coachmark__button:hover{background-color:var(--color--primary--shade-1)}._nodeButtonsWrapper_mt5fk_125{gap:var(--spacing--2xs);padding:var(--spacing--sm);flex-direction:column;display:flex;position:absolute;top:0;right:0;pointer-events:all!important}._icon_mt5fk_136{justify-content:center;align-items:center;display:inline-flex}._icon_mt5fk_136 svg{display:block}\n/*$vite$:1*/",document.head.appendChild(F);try{Z="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(q=(new Z.Error).stack)&&(Z._sentryDebugIds=Z._sentryDebugIds||{},Z._sentryDebugIds[q]="8da2322b-abeb-4295-af46-b27855a455f4",Z._sentryDebugIdIdentifier="sentry-dbid-8da2322b-abeb-4295-af46-b27855a455f4")}catch(Z){}var Z,q;H={class:"node-creator-shortcut-coachmark__header"},U={class:"node-creator-shortcut-coachmark__title"},M={class:"node-creator-shortcut-coachmark__body"},R={class:"node-creator-shortcut-coachmark__footer"},L=r({__name:"NodeCreatorShortcutCoachmark",props:{visible:{type:Boolean}},emits:["dismiss"],setup(e,{emit:t}){const o=t,s=v();return(t,c)=>(a(),y(f(w),{open:e.visible,"show-arrow":!0,"enable-scrolling":!1,"suppress-auto-focus":!0,side:"left",align:"center","side-offset":8,"z-index":2200,"content-class":"node-creator-shortcut-coachmark"},{trigger:_((()=>[g(t.$slots,"default")])),content:_((()=>[n("div",H,[n("span",U,l(f(s).baseText("nodeCreator.shortcutCoachmark.title")),1)]),n("p",M,l(f(s).baseText("nodeCreator.shortcutCoachmark.body")),1),n("div",R,[h(f(x),{size:"small",label:f(s).baseText("nodeCreator.shortcutCoachmark.gotIt"),class:"node-creator-shortcut-coachmark__button",onClick:c[0]||(c[0]=e=>o("dismiss"))},null,8,["label"])])])),_:3},8,["open"]))}}),J=L,Y=r({__name:"NodeCreation",props:{nodeViewScale:{},createNodeActive:{type:Boolean,default:!1},focusPanelActive:{type:Boolean}},emits:["addNodes","toggleNodeCreator","close"],setup(e,{emit:r}){const g=c((async()=>await T((()=>t.import("./NodeCreator-legacy-mnzAm7zQ.js")),void 0))),w=e,A=r,F=B(),H=j(),U=O(),M=v(),R=S(),L=V(),Y=E(),Z=I(),{getAddedNodesAndConnections:q}=W(),{shouldShowCoachmark:G,onDismissCoachmark:Q}=$(),X=i((()=>U.isFeatureEnabled?M.baseText("nodeView.openSidePanel"):M.baseText("nodeView.openFocusPanel")));function ee(){A("toggleNodeCreator",{source:D.ADD_NODE_BUTTON,createNodeActive:!0})}function te(){document.activeElement&&document.activeElement.blur();const e=[...F.nodeViewOffsetPosition],t=P(w.nodeViewScale,e);t[0]-=120,t[1]-=80,A("addNodes",q([{type:z,position:t}]))}function ae(e=!1){w.createNodeActive&&A("toggleNodeCreator",{createNodeActive:!1,hasAddedNodes:e}),A("close")}function oe(e){A("addNodes",q(e)),ae(!0)}function ne(){H.toggleFocusPanel(),R.track(H.focusPanelActive?"User opened focus panel":"User closed focus panel",{source:"canvasButton",parameters:H.focusedNodeParametersInTelemetryFormat})}async function se(){Y.isAIBuilderEnabled?await Z.toggle({mode:"builder"}):await Z.toggle({mode:"assistant"}),Z.isOpen&&L.trackUserOpenedAssistant({source:"canvas",task:"placeholder",has_existing_session:!L.isSessionEnded})}function ce(e){e.stopPropagation(),u((()=>{const e=new KeyboardEvent("keydown",{key:"k",code:"KeyK",metaKey:!0,bubbles:!0,cancelable:!0});document.dispatchEvent(e)}))}return(t,c)=>(a(),s(b,null,[e.createNodeActive?d("",!0):(a(),s("div",{key:0,class:p(t.$style.nodeButtonsWrapper)},[h(J,{visible:f(G),onDismiss:f(Q)},{default:_((()=>[h(K,{label:f(M).baseText("nodeView.openNodesPanel"),shortcut:{keys:["N"]},placement:"left"},{default:_((()=>[h(f(C),{variant:"subtle",size:"large",icon:"plus","aria-label":f(M).baseText("nodeView.openNodesPanel"),"data-test-id":"node-creator-plus-button",onClick:ee},null,8,["aria-label"])])),_:1},8,["label"])])),_:1},8,["visible","onDismiss"]),h(K,{label:f(M).baseText("nodeView.openCommandBar"),shortcut:{keys:["k"],metaKey:!0},placement:"left"},{default:_((()=>[h(f(C),{variant:"subtle",size:"large",icon:"search","aria-label":f(M).baseText("nodeView.openCommandBar"),"data-test-id":"command-bar-button",onClick:ce},null,8,["aria-label"])])),_:1},8,["label"]),h(K,{label:f(M).baseText("nodeView.addStickyHint"),shortcut:{keys:["s"],shiftKey:!0},placement:"left"},{default:_((()=>[h(f(C),{variant:"subtle",size:"large",icon:"sticky-note","aria-label":f(M).baseText("nodeView.addStickyHint"),"data-test-id":"add-sticky-button",onClick:te},null,8,["aria-label"])])),_:1},8,["label"]),h(K,{label:X.value,shortcut:{keys:["f"],shiftKey:!0},placement:"left"},{default:_((()=>[h(f(C),{variant:"subtle",size:"large",icon:"panel-right","aria-label":X.value,active:e.focusPanelActive,"data-test-id":"toggle-focus-panel-button",onClick:ne},null,8,["aria-label","active"])])),_:1},8,["label"]),f(Z).canShowAiButtonOnCanvas?(a(),y(f(k),{key:0,placement:"left"},{content:_((()=>[o(l(f(M).baseText("aiAssistant.tooltip")),1)])),default:_((()=>[h(f(x),{variant:"subtle",iconOnly:"",size:"large","aria-label":f(M).baseText("aiAssistant.tooltip"),class:p(t.$style.icon),"data-test-id":"ask-assistant-canvas-action-button",onClick:se},{default:_((()=>[n("div",null,[h(f(N),{size:"large"})])])),_:1},8,["aria-label","class"])])),_:1})):d("",!0)],2)),(a(),y(m,null,{default:_((()=>[h(f(g),{active:e.createNodeActive,onNodeTypeSelected:oe,onCloseNodeCreator:ae},null,8,["active"])])),_:1}))],64))}}),e("default",A(Y,[["__cssModules",{$style:{nodeButtonsWrapper:"_nodeButtonsWrapper_mt5fk_125",icon:"_icon_mt5fk_136"}}]]))}}}));
//# sourceMappingURL=NodeCreation-legacy-CtRrOLek.js.map