n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 26.1 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.13.4"}}catch(e){}}(),System.register(["./chunk-legacy-TXBRODOR.js","./vue.runtime.esm-bundler-legacy-IafOlCW8.js","./_MapCache-legacy-DwgdC8YO.js","./src-legacy-Dwzr7bD0.js","./_plugin-vue_export-helper-legacy-DEZAmQqp.js","./sanitize-html-legacy-ChR3ikxn.js","./date-picker-legacy-uAA3gY1d.js","./users.store-legacy-OKuN0qAC.js","./ParameterInputList-legacy-D5sySi2K.js","./dialog-legacy-2rrTvc09.js","./constants-legacy-DNCca_FT.js","./merge-legacy-uu1aGqHK.js","./_baseOrderBy-legacy-PsQY_Pvh.js","./dateformat-legacy-BxdD_OP7.js","./useDebounce-legacy-CT3oYGrC.js","./dataTable.store-legacy-CvwqAgvm.js","./useClipboard-legacy-D5bRgqfO.js","./executions.store-legacy-z6ytCHo9.js","./CopyInput-legacy-4SJ519ok.js","./assistant.store-legacy-kpq6KUPM.js","./chatPanel.store-legacy-BXT37O-E.js","./RunData-legacy-5Sfz7IzF.js","./NDVEmptyState-legacy-CfqV96iU.js","./externalSecrets.ee.store-legacy-C6uyA9v4.js","./uniqBy-legacy-DmwIYJPs.js","./communityNodes.store-legacy-FzflxT4z.js","./usePinnedData-legacy-CxgKkO-J.js","./nodeIcon-legacy-CU0X8703.js","./canvas.utils-legacy-BYFKir1g.js","./canvas.eventBus-legacy-DA8zEJ09.js","./useCanvasOperations-legacy-DHjpE9Af.js","./setupPanel.store-legacy-D5xiJOzj.js","./nodeTransforms-legacy-CEnqyD1g.js","./templateTransforms-legacy-bPWknje4.js","./ContactAdministratorToInstall-legacy-D-4RoJ1v.js","./useQuickConnect-legacy-Joyt3P8m.js","./semver-legacy-CCqi4WLs.js","./CredentialIcon-legacy-W6FyX5zO.js","./useDynamicCredentials-legacy-DYuGI0-p.js","./RunDataHtml-legacy-DYuZnk8K.js","./Draggable-legacy-1VY-jpKk.js","./NodeIcon-legacy-B4uktMo3.js","./VirtualSchema-legacy-j9JfcIEe.js","./useCalloutHelpers-legacy-vHYCBchw.js","./useTelemetryContext-legacy-DP-NcoCt.js","./useRunWorkflow-legacy-D--lDsti.js","./pushConnection.store-legacy-CdZe0qqo.js","./useInjectWorkflowId-legacy-Bqd7CF__.js","./vue-json-pretty-legacy-C9tMykq1.js","./collaboration.store-legacy-Cbihou7P.js","./dateFormatter-legacy-CmupnmDm.js","./useExecutionHelpers-legacy-L8nz8vaT.js","./useFreeAiCredits-legacy-CEp4XoS_.js","./NodeSettings-legacy-BiSl-jI5.js","./CommunityNodeUpdateInfo-legacy-CKc-nhzm.js","./vue-legacy-BRu5yuNI.js","./useActions-legacy-BnKsuRcU.js","./chatHubPanel.store-legacy-CNIu4UHq.js","./useLogsTreeExpand-legacy-BQTBnZH1.js","./AnimatedSpinner-legacy-DJhh4l70.js","./useExecutionData-legacy-D2I2XvJd.js","./RunDataParsedAiContent-legacy-Cd_5EeVf.js","./TriggerPanel-legacy-BlGLyzLN.js"],(function(e,a){var n,t,i,l,o,u,r,s,d,v,c,g,p,_,f,y,h,m,b,w,j,x,k,P,D,C,N,I,R,T,$,B,O,W,E,M,S,A,L,z,H,V,q,F,U,X,G,J,Z,K,Q,Y,ee,ae,ne,te,ie,le,oe,ue,re,se,de,ve,ce,ge,pe,_e,fe,ye,he,me;return{setters:[function(e){e.o},function(e){n=e.$,t=e.A,i=e.C,l=e.E,o=e.Ft,u=e.N,r=e.O,s=e.S,d=e.Sn,v=e.T,c=e.W,g=e.Wt,p=e.X,_=e._n,f=e.ft,y=e.gt,h=e.it,m=e.j,b=e.q,w=e.w,j=e.yn,x=e.yt},function(e){k=e.bt,P=e.ct},function(e){D=e.$i,C=e.At,N=e.Ht,I=e.Mi,R=e.Zi,T=e.z},function(e){$=e.t},function(e){},function(e){},function(e){B=e.$t,O=e.Dr,W=e.Er,E=e.dn,M=e.en,S=e.hn,A=e.ia,L=e.jr,z=e.qr,H=e.r,V=e.rn,q=e.s,F=e.un,U=e.w},function(e){X=e.o},function(e){G=e.t},function(e){J=e.$a,Z=e.D,e.G,e.Ps,e.gr,K=e.ho,Q=e.ln,Y=e.s,ee=e.va,ae=e.vc},function(e){},function(e){ne=e.N},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){te=e.t},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){ie=e.t},function(e){},function(e){},function(e){},function(e){le=e.t},function(e){},function(e){},function(e){oe=e.t},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){ue=e.t},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){re=e.n,se=e.r,de=e.t}],execute:function(){(ve=document.createElement("style")).textContent="._dragContainer_47t4e_125{pointer-events:all}._dragButton_47t4e_129{background-color:var(--ndv--header--color);border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);cursor:grab;z-index:3;justify-content:center;align-items:center;width:64px;height:21px;display:flex;position:relative;overflow:visible}._dragButton_47t4e_129:hover ._leftArrow_47t4e_143,._dragButton_47t4e_129:hover ._rightArrow_47t4e_144{visibility:visible}._visible_47t4e_148{visibility:visible!important}._arrow_47t4e_152{color:var(--color--background--light-3);font-size:var(--font-size--3xs);visibility:hidden;position:absolute;top:0}._leftArrow_47t4e_143{left:-16px}._rightArrow_47t4e_144{right:-16px}._grid_47t4e_170>div{display:flex}._grid_47t4e_170>div:first-child>div{margin-bottom:2px}._grid_47t4e_170>div>div{background-color:var(--color--foreground--shade-2);border-radius:50%;width:2px;height:2px;margin-right:4px}._grid_47t4e_170>div>div:last-child{margin-right:0}._dataPanel_6rjea_125{height:calc(100% - 2*var(--spacing--lg));top:var(--spacing--lg);z-index:0;min-width:280px;position:absolute}._inputPanel_6rjea_134{left:var(--spacing--lg)}._inputPanel_6rjea_134>*{border-radius:var(--radius--lg)0 0 var(--radius--lg)}._outputPanel_6rjea_142{right:var(--spacing--lg)}._outputPanel_6rjea_142>*{border-radius:0 var(--radius--lg)var(--radius--lg)0}._mainPanel_6rjea_150{height:100%;position:absolute}._mainPanel_6rjea_150:hover ._draggable_6rjea_154{visibility:visible}._mainPanelInner_6rjea_158{border:var(--border);border-radius:var(--radius--lg);height:100%;overflow:hidden;box-shadow:0 4px 16px rgba(50,61,85,.1)}._mainPanelInner_6rjea_158._dragging_6rjea_165{border-color:var(--color--primary);box-shadow:0 6px 16px rgba(255,74,51,.15)}._draggable_6rjea_154{visibility:hidden}._double-width_6rjea_174{left:90%}._dragButtonContainer_6rjea_178{pointer-events:none;justify-content:center;width:100%;height:12px;display:flex;position:absolute;top:-12px}._dragButtonContainer_6rjea_178 ._draggable_6rjea_154{pointer-events:all}._dragButtonContainer_6rjea_178:hover ._draggable_6rjea_154,._visible_6rjea_194{visibility:visible}.ndv-wrapper{margin-top:0;overflow:visible}.data-display-wrapper{background:0 0;border:none;width:100%;height:100%;margin-top:var(--spacing--xl)!important;margin-bottom:var(--spacing--xl)!important}.data-display-wrapper .el-dialog__header{padding:0!important}.data-display-wrapper .el-dialog__body{border-radius:8px;height:100%;min-height:400px;overflow:visible;padding:0!important}.data-display{width:100%;height:100%;display:flex}._modalBackground_10ueg_125{width:100%;height:100%}._triggerWarning_10ueg_130{max-width:180px}._backToCanvas_10ueg_134{top:var(--spacing--xs);left:var(--spacing--lg);align-items:center;gap:var(--spacing--3xs);display:flex;position:fixed}._backToCanvas_10ueg_134 span{color:var(--ndv--back--color--text)}._backToCanvas_10ueg_134:hover{cursor:pointer}@media (min-width:1920px){._backToCanvas_10ueg_134{top:var(--spacing--xs);left:var(--spacing--md)}}._featureRequest_10ueg_155{bottom:var(--spacing--4xs);left:calc(100% + var(--spacing--sm));color:var(--feature-request--color--text);font-size:var(--font-size--2xs);white-space:nowrap;position:absolute}._featureRequest_10ueg_155 *{margin-right:var(--spacing--3xs)}\n/*$vite$:1*/",document.head.appendChild(ve);try{a="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(be=(new a.Error).stack)&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[be]="e56106e3-e3ab-4b4e-8254-03329901e18f",a._sentryDebugIdIdentifier="sentry-dbid-e56106e3-e3ab-4b4e-8254-03329901e18f")}catch(a){}var a,be;ce=u({__name:"PanelDragButton",props:{canMoveRight:{type:Boolean},canMoveLeft:{type:Boolean}},emits:["drag","dragstart","dragend"],setup(e,{emit:a}){const t=a,o=e=>{t("drag",e)},u=()=>{t("dragend")},r=()=>{t("dragstart")};return(a,t)=>(n(),w(ie,{type:"panel-resize",class:_(a.$style.dragContainer),onDrag:o,onDragstart:r,onDragend:u},{default:x((({isDragging:o})=>[i("div",{class:_({[a.$style.dragButton]:!0}),"data-test-id":"panel-drag-button"},[e.canMoveLeft?(n(),l("span",{key:0,class:_({[a.$style.leftArrow]:!0,[a.$style.visible]:o})},[m(g(D),{icon:"arrow-left"})],2)):v("",!0),e.canMoveRight?(n(),l("span",{key:1,class:_({[a.$style.rightArrow]:!0,[a.$style.visible]:o})},[m(g(D),{icon:"arrow-right"})],2)):v("",!0),i("div",{class:_(a.$style.grid)},[...t[0]||(t[0]=[i("div",null,[i("div"),i("div"),i("div"),i("div"),i("div")],-1),i("div",null,[i("div"),i("div"),i("div"),i("div"),i("div")],-1)])],2)],2)])),_:1},8,["class"]))}}),ge=$(ce,[["__cssModules",{$style:{dragContainer:"_dragContainer_47t4e_125",dragButton:"_dragButton_47t4e_129",leftArrow:"_leftArrow_47t4e_143 _arrow_47t4e_152",rightArrow:"_rightArrow_47t4e_144 _arrow_47t4e_152",visible:"_visible_47t4e_148",arrow:"_arrow_47t4e_152",grid:"_grid_47t4e_170"}}]]),pe=24,_e=310,fe=u({__name:"NDVDraggablePanels",props:{isDraggable:{type:Boolean},hideInputAndOutput:{type:Boolean},nodeType:{}},emits:["init","dragstart","dragend","switchSelectedNode","close"],setup(e,{emit:a}){const t={regular:390,dragless:390,unknown:390,inputless:390,wide:780},u=P((function({direction:e,x:a,width:n}){const t=ie(a),i=ie(n);"left"===e&&t<=A.value||"right"===e&&1-t<=L.value||n<=_e||(ee(i),ne("left"===e?t:B.value.relativeLeft))}),100),r=V(),d=H(),k=e,D=o(!1),C=o(!1),N=o(d.appGridDimensions.width),I=a,R=f();p((()=>{1===B.value.relativeLeft&&1===B.value.relativeRight&&(ee(),ne(Y(B.value.relativeWidth)),function(){const e=z(`${ae}_${$.value}`).value;if(e){const a=parseFloat(e);ee(a),ne(Y(a))}}()),I("init",{position:B.value.relativeLeft}),setTimeout((()=>{C.value=!0}),0),F.on("setPositionByName",te)})),b((()=>{F.off("setPositionByName",te)})),y((()=>d.appGridDimensions),(async e=>{const a=document.getElementById("ndv");if(a){await c();const{width:e}=a.getBoundingClientRect();N.value=e}else N.value=e.width;const n=ie(_e);B.value.relativeWidth<n&&ee(n);const t=A.value>B.value.relativeLeft,i=L.value>B.value.relativeRight;e.width>518&&t&&i&&(ee(n),ne(Y(B.value.relativeWidth))),ne(B.value.relativeLeft)}));const $=s((()=>M.value?k.isDraggable?null===k.nodeType?"unknown":k.nodeType.parameterPane??"regular":"dragless":"inputless")),B=s((()=>r.mainPanelDimensions[$.value])),O=s((()=>{const e=void 0!==R.input,a=B.value.relativeLeft+B.value.relativeWidth;return{inputPanelRelativeRight:e?1-a+B.value.relativeWidth:1-ie(pe),outputPanelRelativeLeft:a}})),W=s((()=>{const e=1-ie(334),a=O.value.outputPanelRelativeLeft-e;return a>0?a:0})),E=s((()=>{const e=["right"];return k.isDraggable&&e.push("left"),e})),M=s((()=>void 0!==R.input)),S=s((()=>ie(80))),A=s((()=>N.value<518?ie(1):M.value?ie(44)+S.value:ie(pe))),L=s((()=>N.value<518?ie(1):ie(44)+S.value)),q=s((()=>B.value.relativeLeft>A.value)),U=s((()=>B.value.relativeRight>L.value)),X=s((()=>({left:`${le(B.value.relativeLeft)}px`,right:`${le(B.value.relativeRight)}px`}))),G=s((()=>({right:`${le(O.value.inputPanelRelativeRight)}px`}))),J=s((()=>({left:`${le(O.value.outputPanelRelativeLeft)}px`,transform:`translateX(-${le(W.value)}px)`}))),Z=s((()=>"wide"===k.nodeType?.parameterPane)),K=s((()=>{const e=Z.value?2:1;return N.value>1700?420*e:350*e})),Q=e=>I("switchSelectedNode",e);function Y(e){return"dragless"===$.value?ie(25+K.value):M.value?.5-e/2:A.value}function ee(e){const a=e||ie(t[$.value]);r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeWidth:a}})}function ne(e){const a=e||1-O.value.inputPanelRelativeRight,n=1-a-B.value.relativeWidth,t=L.value>n,i=A.value>a,l="inputless"===$.value;i?r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeLeft:A.value,relativeRight:1-B.value.relativeWidth-A.value}}):t?r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeLeft:1-B.value.relativeWidth-L.value,relativeRight:L.value}}):r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeLeft:l?A.value:a,relativeRight:n}})}function te(e){ne({minLeft:A.value,maxRight:L.value,initial:Y(B.value.relativeWidth)}[e])}function ie(e){return e/N.value}function le(e){return e*N.value}function oe(){re()}function ue(e){C.value&&u(e)}function re(){z(`${ae}_${$.value}`).value=B.value.relativeWidth.toString()}function de(){D.value=!0,I("dragstart",{position:B.value.relativeLeft})}function ve(e){ne(ie(e[0])-B.value.relativeWidth/2)}function ce(){setTimeout((()=>{D.value=!1,I("dragend",{windowWidth:N.value,position:B.value.relativeLeft})}),0),re()}return(a,t)=>(n(),l("div",null,[g(r).activeNode?(n(),w(se,{key:0,"root-node":g(r).activeNode,onSwitchSelectedNode:Q},null,8,["root-node"])):v("",!0),e.hideInputAndOutput?v("",!0):(n(),l("div",{key:1,class:_(a.$style.inputPanel),style:j(G.value)},[h(a.$slots,"input")],6)),e.hideInputAndOutput?v("",!0):(n(),l("div",{key:2,class:_(a.$style.outputPanel),style:j(J.value)},[h(a.$slots,"output")],6)),i("div",{class:_(a.$style.mainPanel),style:j(X.value)},[m(g(T),{"is-resizing-enabled":"unknown"!==$.value,width:le(B.value.relativeWidth),"min-width":_e,"grid-size":20,"supported-directions":E.value,outset:"",onResize:ue,onResizeend:oe},{default:x((()=>[i("div",{class:_(a.$style.dragButtonContainer)},[!e.hideInputAndOutput&&e.isDraggable?(n(),w(ge,{key:0,class:_({[a.$style.draggable]:!0,[a.$style.visible]:D.value}),"can-move-left":q.value,"can-move-right":U.value,onDragstart:de,onDrag:ve,onDragend:ce},null,8,["class","can-move-left","can-move-right"])):v("",!0)],2),i("div",{class:_({[a.$style.mainPanelInner]:!0,[a.$style.dragging]:D.value})},[h(a.$slots,"main")],2)])),_:3},8,["is-resizing-enabled","width","supported-directions"])],6)]))}}),ye=$(fe,[["__cssModules",{$style:{dataPanel:"_dataPanel_6rjea_125",inputPanel:"_inputPanel_6rjea_134 _dataPanel_6rjea_125",outputPanel:"_outputPanel_6rjea_142 _dataPanel_6rjea_125",mainPanel:"_mainPanel_6rjea_150",draggable:"_draggable_6rjea_154",mainPanelInner:"_mainPanelInner_6rjea_158",dragging:"_dragging_6rjea_165","double-width":"_double-width_6rjea_174",dragButtonContainer:"_dragButtonContainer_6rjea_178",visible:"_visible_6rjea_194"}}]]),he={key:0,ref:"container",class:"data-display","data-test-id":"ndv-modal",tabindex:"0"},me=u({__name:"NodeDetailsView",props:{workflowObject:{},readOnly:{type:Boolean,default:!1},renaming:{type:Boolean},isProductionExecutionPreview:{type:Boolean,default:!1}},emits:["valueChanged","switchSelectedNode","openConnectionNodeCreator","stopExecution"],setup(e,{emit:a}){const u=a,c=e,f=V(),h=O(),j=B(),{activeNode:P}=ne(f),T=te(P),$=U(),z=q(),H=A(),ae=N(),ie=oe(),se=M(),ve=le({view_shown:"ndv"}),ce=k(),ge=L(),{APP_Z_INDEXES:pe}=W(),_e=C(),fe=o(-1),me=s((()=>f.output.run??-1)),be=o(),we=o(!0),je=o(!1),xe=o(!1),ke=o(0),Pe=o(!1),De=o(0),Ce=o(0),Ne=o(!1),Ie=o(!1),Re=o(!0),Te=s((()=>f.pushRef)),$e=s((()=>P.value?$.getNodeType(P.value.type,P.value.typeVersion):null)),Be=s((()=>je.value&&!!$e.value&&!$e.value.group.includes("trigger")&&z.isWorkflowRunning&&z.executionWaitingForWebhook)),Oe=s((()=>{if(null===qe.value)return null;const e=qe.value.data;return e?.resultData?e.resultData.runData:null})),We=s((()=>P.value?c.workflowObject.getParentNodesByDepth(P.value.name,1):[])),Ee=s((()=>{for(const e of We.value){if(H?.value?.pinData?.[e.name])return e;if(Oe.value?.[e.name])return e}return We.value[0]})),Me=s((()=>(P.value&&$e.value?ee(c.workflowObject,P.value,$e.value):[]).filter((e=>"string"==typeof e?e!==K.Main:e.type!==K.Main)).length>0&&P.value?c.workflowObject.getChildNodes(P.value.name,"ALL_NON_MAIN")?.[0]:be.value??Ee.value?.name)),Se=s((()=>Me.value?z.getNodeByName(Me.value):null)),Ae=s((()=>f.ndvInputDataWithPinnedData.length)),Le=s((()=>!!$e.value&&$e.value.group.includes("trigger"))),ze=s((()=>{const e=!!$e.value?.triggerPanel;if("boolean"==typeof $e.value?.triggerPanel)return e;const a=!!$e.value?.webhooks?.length,n=$e.value?.polling;return!c.readOnly&&Le.value&&(a||n||e)})),He=s((()=>!!$e.value&&Q.includes($e.value.name))),Ve=s((()=>!!f.activeNode&&"n8n-nodes-base.stickyNote"===f.activeNode.type)),qe=s((()=>z.getWorkflowExecution)),Fe=s((()=>{if(null===P.value)return 0;const e=Oe.value;return e?.[P.value.name]&&e[P.value.name].length?e[P.value.name].length-1:0})),Ue=s((()=>-1===me.value?Fe.value:Math.min(me.value,Fe.value))),Xe=s((()=>{if(null===Se.value||null===P.value)return 0;const e=c.workflowObject.getNode(P.value.name);if(!e||!$e.value)return 0;const a=ee(c.workflowObject,e,$e.value);let n=Se.value;const t=Oe.value;return a.some((e=>e!==K.Main))&&(n=P.value),n&&t?.hasOwnProperty(n.name)&&t[n.name].length?t[n.name].length-1:0})),Ge=s((()=>We.value.find((({name:e})=>e===Me.value))?.indicies)),Je=s((()=>{if(we.value&&Fe.value===Xe.value)return Ue.value;const e=Me.value;return-1===fe.value&&e?Ge.value?.map((a=>j.getLastRunIndexWithData(e,a))).find((e=>-1!==e))??Xe.value:Math.min(fe.value,Xe.value)})),Ze=s((()=>Fe.value>0&&Fe.value===Xe.value)),Ke=s((()=>we.value&&Ze.value)),Qe=s((()=>$e.value?`${Y}${$e.value.name}`:"")),Ye=s((()=>f.outputPanelEditMode)),ea=s((()=>z.executionWaitingForWebhook)),aa=s((()=>z.isWorkflowRunning||ea.value)),na=s((()=>j.getForeignCredentialsIfSharingEnabled(P.value?.credentials))),ta=s((()=>na.value.length>0)),ia=s((()=>f.inputPanelDisplayMode)),la=s((()=>f.outputPanelDisplayMode)),oa=({isTooltipVisible:e})=>{Pe.value=e},ua=e=>{"s"===e.key&&ae.isCtrlKeyPressed(e)&&e.preventDefault()},ra=e=>{if(null===e||!Me.value||!Re.value)return void f.setHoveringItem(null);const a={nodeName:Me.value,runIndex:Je.value,outputIndex:e.outputIndex,itemIndex:e.itemIndex};f.setHoveringItem(a)},sa=e=>{De.value=e.avgRowHeight},da=()=>{f.unsetActiveNodeName(),E.emit("publishWorkflow")},va=e=>{if(null===e||!P.value||!Re.value)return void f.setHoveringItem(null);const a={nodeName:P.value?.name,runIndex:Ue.value,outputIndex:e.outputIndex,itemIndex:e.itemIndex};f.setHoveringItem(a)},ca=()=>{window.open(Qe.value,"_blank"),P.value&&se.track("User clicked ndv link",{node_type:P.value.type,workflow_id:ie.value,push_ref:Te.value,pane:K.Main,type:"i-wish-this-node-would"})},ga=e=>{xe.value=!1,se.track("User moved parameters pane",{window_width:e.windowWidth,start_position:ke.value,end_position:e.position,node_type:$e.value?$e.value.name:"",push_ref:Te.value,workflow_id:ie.value}),ke.value=e.position},pa=e=>{xe.value=!0,ke.value=e.position},_a=e=>{ke.value=e.position},fa=()=>{we.value=!0,ba("output")},ya=e=>{fe.value=me.value,we.value=!1,ba(e)},ha=()=>{setTimeout((()=>{P.value&&z.isWorkflowRunning&&(je.value=!0)}),1e3)},ma=()=>{_e.emit("openSettings")},ba=e=>{se.track("User changed ndv run linking",{node_type:$e.value?$e.value.name:"",push_ref:Te.value,linked:Ke.value,pane:e})},wa=()=>{f.setOutputRunIndex(fe.value),we.value=!0,ba("input")},ja=e=>{u("valueChanged",e)},xa=e=>{u("switchSelectedNode",e)},ka=(e,a,n=0)=>{u("openConnectionNodeCreator",e,a,n)},Pa=async()=>{if(!xe.value){if(Ye.value.enabled&&P.value){if("confirm"===await ge.confirm("",ce.baseText("ndv.pinData.beforeClosing.title"),{confirmButtonText:ce.baseText("ndv.pinData.beforeClosing.confirm"),cancelButtonText:ce.baseText("ndv.pinData.beforeClosing.cancel")})){const{value:a}=Ye.value;try{T.setData(J(a),"on-ndv-close-modal")}catch(e){console.error(e)}}f.setOutputPanelEditModeEnabled(!1)}await h.run("dataDisplay.nodeEditingFinished"),se.track("User closed node modal",{node_type:$e.value?$e.value?.name:"",push_ref:Te.value,workflow_id:ie.value}),je.value=!1,f.unsetActiveNodeName(),f.resetNDVPushRef()}},Da=(e,a)=>{se.track("User changed ndv run dropdown",{push_ref:Te.value,run_index:e,node_type:$e.value?$e.value?.name:"",pane:a})},Ca=e=>{f.setOutputRunIndex(e),Da(e,"output")},Na=e=>{fe.value=e,Ke.value&&f.setOutputRunIndex(e),Da(e,"input")},Ia=e=>{Ce.value=e.avgRowHeight},Ra=(e,a)=>{fe.value=-1,we.value=!0,be.value=e,se.track("User changed ndv input dropdown",{node_type:P.value?P.value.type:"",push_ref:Te.value,workflow_id:ie.value,selection_value:a,input_node_type:Se.value?Se.value.type:""})},Ta=()=>{u("stopExecution")},$a=()=>{Ne.value=!0,Ie.value=!1},Ba=()=>{Ne.value=!1,Ie.value=!0},Oa=e=>{Re.value=!e},Wa=()=>{document.removeEventListener("keydown",ua,!0)},Ea=e=>{be.value=e},Ma=(e,a)=>{f.setPanelDisplayMode({pane:e,mode:a})};return y(P,((e,a)=>{if(e&&!a?document.addEventListener("keydown",ua,!0):e||Wa(),e&&e.name!==a?.name&&!Ve.value){if(fe.value=-1,f.setOutputRunIndex(-1),we.value=!0,be.value=void 0,je.value=!1,Ce.value=0,De.value=0,setTimeout((()=>f.setNDVPushRef()),0),!$e.value)return;h.run("dataDisplay.nodeTypeChanged",{nodeSubtitle:j.getNodeSubtitle(e,$e.value,c.workflowObject)}),setTimeout((()=>{if(P.value){const e=z.outgoingConnectionsByNodeName(P.value?.name);se.track("User opened node modal",{node_id:P.value?.id,node_type:$e.value?$e.value?.name:"",workflow_id:ie.value,push_ref:Te.value,is_editable:!ta.value,parameters_pane_position:ke.value,input_first_connector_runs:Xe.value,output_first_connector_runs:Fe.value,selected_view_inputs:Le.value?"trigger":ia.value,selected_view_outputs:la.value,input_connectors:We.value.length,output_connectors:e?.main?.length,input_displayed_run_index:Je.value,output_displayed_run_index:Ue.value,data_pinning_tooltip_presented:Pe.value,input_displayed_row_height_avg:De.value,output_displayed_row_height_avg:Ce.value,source:ve.ndv_source?.value??"other"})}}),2e3)}window.top&&!Ve.value&&window.top.postMessage(JSON.stringify({command:e?"openNDV":"closeNDV"}),"*")}),{immediate:!0}),y(Fe,(()=>{f.setOutputRunIndex(-1)})),y(Xe,(()=>{fe.value=-1})),y(Me,(e=>{setTimeout((()=>{f.setInputNodeName(e)}),0)})),y(Je,(e=>{setTimeout((()=>{f.setInputRunIndex(e)}),0)})),p((()=>{S.on("data-pinning-discovery",oa),F.on("updateInputNodeName",Ea)})),b((()=>{S.off("data-pinning-discovery",oa),F.off("updateInputNodeName",Ea),Wa()})),(a,o)=>(n(),w(g(G),{id:"ndv","model-value":(!!g(P)||e.renaming)&&!Ve.value,"before-close":Pa,"show-close":!1,class:"data-display-wrapper ndv-wrapper","overlay-class":"data-display-overlay",width:"auto","append-to":`#${g(Z)}`,"data-test-id":"ndv","z-index":g(pe).NDV},{default:x((()=>[m(g(I),{placement:"bottom-start",visible:Be.value,disabled:!Be.value},{content:x((()=>[i("div",{class:_(a.$style.triggerWarning)},d(g(ce).baseText("ndv.backToCanvas.waitingForTriggerWarning")),3)])),default:x((()=>[i("div",{class:_(a.$style.backToCanvas),"data-test-id":"back-to-canvas",onClick:Pa},[m(g(D),{icon:"arrow-left",color:"text-xlight",size:"medium"}),m(g(R),{color:"text-xlight",size:"medium",bold:!0},{default:x((()=>[t(d(g(ce).baseText("ndv.backToCanvas")),1)])),_:1})],2)])),_:1},8,["visible","disabled"]),g(P)?(n(),l("div",he,[i("div",{class:_(a.$style.modalBackground),onClick:Pa},null,2),(n(),w(ye,{key:g(P).name,"is-trigger-node":Le.value,"hide-input-and-output":null===$e.value,position:Le.value&&!ze.value?0:void 0,"is-draggable":!Le.value,"has-double-width":"wide"===$e.value?.parameterPane,"node-type":$e.value,onSwitchSelectedNode:xa,onOpenConnectionNodeCreator:ka,onClose:Pa,onInit:_a,onDragstart:pa,onDragend:ga},r({output:x((()=>[m(re,{"data-test-id":"output-panel","workflow-object":e.workflowObject,"can-link-runs":Ze.value,"run-index":Ue.value,"linked-runs":Ke.value,"push-ref":Te.value,"is-read-only":e.readOnly||ta.value,"block-u-i":aa.value&&Le.value&&!He.value,"is-production-execution-preview":e.isProductionExecutionPreview,"is-pane-active":Ie.value,"display-mode":la.value,onActivatePane:Ba,onLinkRun:fa,onUnlinkRun:o[2]||(o[2]=()=>ya("output")),onRunChange:Ca,onOpenSettings:ma,onTableMounted:Ia,onItemHover:va,onSearch:Oa,onDisplayModeChange:o[3]||(o[3]=e=>Ma("output",e))},null,8,["workflow-object","can-link-runs","run-index","linked-runs","push-ref","is-read-only","block-u-i","is-production-execution-preview","is-pane-active","display-mode"])])),main:x((()=>[m(ue,{"event-bus":g(_e),dragging:xe.value,"push-ref":Te.value,"foreign-credentials":na.value,"read-only":e.readOnly,"block-u-i":aa.value&&ze.value,executable:!e.readOnly,"input-size":Ae.value,onValueChanged:ja,onExecute:ha,onStopExecution:Ta,onActivate:da,onSwitchSelectedNode:xa,onOpenConnectionNodeCreator:ka},null,8,["event-bus","dragging","push-ref","foreign-credentials","read-only","block-u-i","executable","input-size"]),Qe.value?(n(),l("a",{key:0,class:_(a.$style.featureRequest),target:"_blank",onClick:ca},[m(g(D),{icon:"lightbulb"}),t(" "+d(g(ce).baseText("ndv.featureRequest")),1)],2)):v("",!0)])),_:2},[ze.value||!Le.value?{name:"input",fn:x((()=>[ze.value?(n(),w(de,{key:0,"node-name":g(P).name,"push-ref":Te.value,onExecute:ha,onActivate:da},null,8,["node-name","push-ref"])):Le.value?v("",!0):(n(),w(X,{key:1,"workflow-object":e.workflowObject,"can-link-runs":Ze.value,"run-index":Je.value,"linked-runs":Ke.value,"active-node-name":g(P).name,"current-node-name":Me.value,"push-ref":Te.value,"read-only":e.readOnly||ta.value,"is-production-execution-preview":e.isProductionExecutionPreview,"search-shortcut":Ne.value?"/":void 0,"display-mode":ia.value,"is-mapping-onboarded":g(f).isMappingOnboarded,"focused-mappable-input":g(f).focusedMappableInput,onActivatePane:$a,onLinkRun:wa,onUnlinkRun:o[0]||(o[0]=()=>ya("input")),onRunChange:Na,onOpenSettings:ma,onChangeInputNode:Ra,onExecute:ha,onTableMounted:sa,onItemHover:ra,onSearch:Oa,onDisplayModeChange:o[1]||(o[1]=e=>Ma("input",e))},null,8,["workflow-object","can-link-runs","run-index","linked-runs","active-node-name","current-node-name","push-ref","read-only","is-production-execution-preview","search-shortcut","display-mode","is-mapping-onboarded","focused-mappable-input"]))])),key:"0"}:void 0]),1032,["is-trigger-node","hide-input-and-output","position","is-draggable","has-double-width","node-type"]))],512)):v("",!0)])),_:1},8,["model-value","append-to","z-index"]))}}),e("default",$(me,[["__cssModules",{$style:{modalBackground:"_modalBackground_10ueg_125",triggerWarning:"_triggerWarning_10ueg_130",backToCanvas:"_backToCanvas_10ueg_134",featureRequest:"_featureRequest_10ueg_155"}}]]))}}}));
//# sourceMappingURL=NodeDetailsView-legacy-Dn5xynz1.js.map