UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 23.7 kB
!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(["./chunk-legacy-Dz3fjYb5.js","./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./core-legacy-VD8c7QJ-.js","./src-legacy-B67uuxhB.js","./_plugin-vue_export-helper-legacy-DFdC_I5Z.js","./users.store-legacy-azRUgFdP.js","./ParameterInputList-legacy-BQq1pmzT.js","./dialog-legacy-Ctrbi48Z.js","./constants-legacy-2_ytuuS3.js","./useRootStore-legacy-CC08el-l.js","./usePinnedData-legacy-BfjAvFWp.js","./Draggable-legacy-8O9k0YUg.js","./useTelemetryContext-legacy-DXxvic2t.js","./useInjectWorkflowId-legacy-piYT0WDS.js","./NodeSettings-legacy-1yPg_OdG.js","./TriggerPanel-legacy-BziS9hvu.js"],(function(e,a){var t,n,i,l,o,u,r,d,s,v,p,c,g,_,f,h,m,y,b,w,x,k,P,j,D,N,R,I,C,T,$,O,W,B,M,L,S,A,E,z,V,F,U,q,H,X,G,Q,Y,J,K,Z,ee,ae,te,ne,ie,le,oe,ue,re,de,se,ve,pe,ce,ge,_e,fe,he,me,ye;return{setters:[function(e){e.o},function(e){t=e.$,n=e.A,i=e.C,l=e.E,o=e.Ft,u=e.N,r=e.O,d=e.S,s=e.Sn,v=e.T,p=e.W,c=e.Wt,g=e.X,_=e._n,f=e.ft,h=e.gt,m=e.it,y=e.j,b=e.q,w=e.w,x=e.yn,k=e.yt},function(e){P=e.Y,j=e.at},function(e){D=e.A,N=e.Di,R=e.Pt,I=e.Qi,C=e.Xi,T=e.xt},function(e){$=e.t},function(e){O=e.At,W=e.Fn,B=e.Ft,M=e.In,L=e.Ln,S=e.aa,A=e.fr,E=e.gr,z=e.jt,V=e.lr,F=e.r,U=e.s,q=e.vr,H=e.w},function(e){X=e.o},function(e){G=e.t},function(e){Q=e.Qt,Y=e.Ra,e.ar,J=e.eo,K=e.i,Z=e.ra,ee=e.rc,ae=e.w,e.ys},function(e){te=e.D},function(e){ne=e.t},function(e){ie=e.t},function(e){le=e.t},function(e){oe=e.t},function(e){ue=e.t},function(e){re=e.n,de=e.r,se=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]="809ff243-c042-459c-93ad-b65f6505c358",a._sentryDebugIdIdentifier="sentry-dbid-809ff243-c042-459c-93ad-b65f6505c358")}catch(a){}var a,be;pe=u({__name:"PanelDragButton",props:{canMoveRight:{type:Boolean},canMoveLeft:{type:Boolean}},emits:["drag","dragstart","dragend"],setup(e,{emit:a}){const n=a,o=e=>{n("drag",e)},u=()=>{n("dragend")},r=()=>{n("dragstart")};return(a,n)=>(t(),w(ie,{type:"panel-resize",class:_(a.$style.dragContainer),onDrag:o,onDragstart:r,onDragend:u},{default:k((({isDragging:o})=>[i("div",{class:_({[a.$style.dragButton]:!0}),"data-test-id":"panel-drag-button"},[e.canMoveLeft?(t(),l("span",{key:0,class:_({[a.$style.leftArrow]:!0,[a.$style.visible]:o})},[y(c(I),{icon:"arrow-left"})],2)):v("",!0),e.canMoveRight?(t(),l("span",{key:1,class:_({[a.$style.rightArrow]:!0,[a.$style.visible]:o})},[y(c(I),{icon:"arrow-right"})],2)):v("",!0),i("div",{class:_(a.$style.grid)},[...n[0]||(n[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"]))}}),ce=$(pe,[["__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"}}]]),ge=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 n={regular:390,dragless:390,unknown:390,inputless:390,wide:780},u=P((function({direction:e,x:a,width:t}){const n=ie(a),i=ie(t);"left"===e&&n<=z.value||"right"===e&&1-n<=V.value||t<=_e||(ae(i),te("left"===e?n:W.value.relativeLeft))}),100),r=E(),s=F(),j=e,N=o(!1),R=o(!1),I=o(s.appGridDimensions.width),C=a,T=f();g((()=>{1===W.value.relativeLeft&&1===W.value.relativeRight&&(ae(),te(Z(W.value.relativeWidth)),function(){const e=q(`${ee}_${$.value}`).value;if(e){const a=parseFloat(e);ae(a),te(Z(a))}}()),C("init",{position:W.value.relativeLeft}),setTimeout((()=>{R.value=!0}),0),O.on("setPositionByName",ne)})),b((()=>{O.off("setPositionByName",ne)})),h((()=>s.appGridDimensions),(async e=>{const a=document.getElementById("ndv");if(a){await p();const{width:e}=a.getBoundingClientRect();I.value=e}else I.value=e.width;const t=ie(_e);W.value.relativeWidth<t&&ae(t);const n=z.value>W.value.relativeLeft,i=V.value>W.value.relativeRight;e.width>518&&n&&i&&(ae(t),te(Z(W.value.relativeWidth))),te(W.value.relativeLeft)}));const $=d((()=>S.value?j.isDraggable?null===j.nodeType?"unknown":j.nodeType.parameterPane??"regular":"dragless":"inputless")),W=d((()=>r.mainPanelDimensions[$.value])),B=d((()=>{const e=void 0!==T.input,a=W.value.relativeLeft+W.value.relativeWidth;return{inputPanelRelativeRight:e?1-a+W.value.relativeWidth:1-ie(ge),outputPanelRelativeLeft:a}})),M=d((()=>{const e=1-ie(334),a=B.value.outputPanelRelativeLeft-e;return a>0?a:0})),L=d((()=>{const e=["right"];return j.isDraggable&&e.push("left"),e})),S=d((()=>void 0!==T.input)),A=d((()=>ie(80))),z=d((()=>I.value<518?ie(1):S.value?ie(44)+A.value:ie(ge))),V=d((()=>I.value<518?ie(1):ie(44)+A.value)),U=d((()=>W.value.relativeLeft>z.value)),H=d((()=>W.value.relativeRight>V.value)),X=d((()=>({left:`${le(W.value.relativeLeft)}px`,right:`${le(W.value.relativeRight)}px`}))),G=d((()=>({right:`${le(B.value.inputPanelRelativeRight)}px`}))),Q=d((()=>({left:`${le(B.value.outputPanelRelativeLeft)}px`,transform:`translateX(-${le(M.value)}px)`}))),Y=d((()=>"wide"===j.nodeType?.parameterPane)),J=d((()=>{const e=Y.value?2:1;return I.value>1700?420*e:350*e})),K=e=>C("switchSelectedNode",e);function Z(e){return"dragless"===$.value?ie(25+J.value):S.value?.5-e/2:z.value}function ae(e){const a=e||ie(n[$.value]);r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeWidth:a}})}function te(e){const a=e||1-B.value.inputPanelRelativeRight,t=1-a-W.value.relativeWidth,n=V.value>t,i=z.value>a,l="inputless"===$.value;i?r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeLeft:z.value,relativeRight:1-W.value.relativeWidth-z.value}}):n?r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeLeft:1-W.value.relativeWidth-V.value,relativeRight:V.value}}):r.setMainPanelDimensions({panelType:$.value,dimensions:{relativeLeft:l?z.value:a,relativeRight:t}})}function ne(e){te({minLeft:z.value,maxRight:V.value,initial:Z(W.value.relativeWidth)}[e])}function ie(e){return e/I.value}function le(e){return e*I.value}function oe(){re()}function ue(e){R.value&&u(e)}function re(){q(`${ee}_${$.value}`).value=W.value.relativeWidth.toString()}function se(){N.value=!0,C("dragstart",{position:W.value.relativeLeft})}function ve(e){te(ie(e[0])-W.value.relativeWidth/2)}function pe(){setTimeout((()=>{N.value=!1,C("dragend",{windowWidth:I.value,position:W.value.relativeLeft})}),0),re()}return(a,n)=>(t(),l("div",null,[c(r).activeNode?(t(),w(de,{key:0,"root-node":c(r).activeNode,onSwitchSelectedNode:K},null,8,["root-node"])):v("",!0),e.hideInputAndOutput?v("",!0):(t(),l("div",{key:1,class:_(a.$style.inputPanel),style:x(G.value)},[m(a.$slots,"input")],6)),e.hideInputAndOutput?v("",!0):(t(),l("div",{key:2,class:_(a.$style.outputPanel),style:x(Q.value)},[m(a.$slots,"output")],6)),i("div",{class:_(a.$style.mainPanel),style:x(X.value)},[y(c(D),{"is-resizing-enabled":"unknown"!==$.value,width:le(W.value.relativeWidth),"min-width":_e,"grid-size":20,"supported-directions":L.value,outset:"",onResize:ue,onResizeend:oe},{default:k((()=>[i("div",{class:_(a.$style.dragButtonContainer)},[!e.hideInputAndOutput&&e.isDraggable?(t(),w(ce,{key:0,class:_({[a.$style.draggable]:!0,[a.$style.visible]:N.value}),"can-move-left":U.value,"can-move-right":H.value,onDragstart:se,onDrag:ve,onDragend:pe},null,8,["class","can-move-left","can-move-right"])):v("",!0)],2),i("div",{class:_({[a.$style.mainPanelInner]:!0,[a.$style.dragging]:N.value})},[m(a.$slots,"main")],2)])),_:3},8,["is-resizing-enabled","width","supported-directions"])],6)]))}}),he=$(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"}}]]),me={key:0,ref:"container",class:"data-display","data-test-id":"ndv-modal",tabindex:"0"},ye=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,p=e,f=E(),m=M(),x=V(),{activeNode:P}=te(f),D=ne(P),$=H(),F=U(),q=S(),ee=R(),ie=oe(),de=A(),ve=le({view_shown:"ndv"}),pe=j(),ce=L(),{APP_Z_INDEXES:ge}=W(),_e=T(),fe=o(-1),ye=d((()=>f.output.run??-1)),be=o(),we=o(!0),xe=o(!1),ke=o(!1),Pe=o(0),je=o(!1),De=o(0),Ne=o(0),Re=o(!1),Ie=o(!1),Ce=o(!0),Te=d((()=>f.pushRef)),$e=d((()=>P.value?$.getNodeType(P.value.type,P.value.typeVersion):null)),Oe=d((()=>xe.value&&!!$e.value&&!$e.value.group.includes("trigger")&&F.isWorkflowRunning&&F.executionWaitingForWebhook)),We=d((()=>{if(null===Ue.value)return null;const e=Ue.value.data;return e?.resultData?e.resultData.runData:null})),Be=d((()=>P.value?p.workflowObject.getParentNodesByDepth(P.value.name,1):[])),Me=d((()=>{for(const e of Be.value){if(q?.value?.pinData?.[e.name])return e;if(We.value?.[e.name])return e}return Be.value[0]})),Le=d((()=>(P.value&&$e.value?Z(p.workflowObject,P.value,$e.value):[]).filter((e=>"string"==typeof e?e!==J.Main:e.type!==J.Main)).length>0&&P.value?p.workflowObject.getChildNodes(P.value.name,"ALL_NON_MAIN")?.[0]:be.value??Me.value?.name)),Se=d((()=>Le.value?q?.value?.getNodeByName(Le.value)??null:null)),Ae=d((()=>f.ndvInputDataWithPinnedData.length)),Ee=d((()=>!!$e.value&&$e.value.group.includes("trigger"))),ze=d((()=>{const e=!!$e.value?.triggerPanel;if("boolean"==typeof $e.value?.triggerPanel)return e;const a=!!$e.value?.webhooks?.length,t=$e.value?.polling;return!p.readOnly&&Ee.value&&(a||t||e)})),Ve=d((()=>!!$e.value&&Q.includes($e.value.name))),Fe=d((()=>!!f.activeNode&&"n8n-nodes-base.stickyNote"===f.activeNode.type)),Ue=d((()=>F.getWorkflowExecution)),qe=d((()=>{if(null===P.value)return 0;const e=We.value;return e?.[P.value.name]&&e[P.value.name].length?e[P.value.name].length-1:0})),He=d((()=>-1===ye.value?qe.value:Math.min(ye.value,qe.value))),Xe=d((()=>{if(null===Se.value||null===P.value)return 0;const e=p.workflowObject.getNode(P.value.name);if(!e||!$e.value)return 0;const a=Z(p.workflowObject,e,$e.value);let t=Se.value;const n=We.value;return a.some((e=>e!==J.Main))&&(t=P.value),t&&n?.hasOwnProperty(t.name)&&n[t.name].length?n[t.name].length-1:0})),Ge=d((()=>Be.value.find((({name:e})=>e===Le.value))?.indicies)),Qe=d((()=>{if(we.value&&qe.value===Xe.value)return He.value;const e=Le.value;return-1===fe.value&&e?Ge.value?.map((a=>x.getLastRunIndexWithData(e,a))).find((e=>-1!==e))??Xe.value:Math.min(fe.value,Xe.value)})),Ye=d((()=>qe.value>0&&qe.value===Xe.value)),Je=d((()=>we.value&&Ye.value)),Ke=d((()=>$e.value?`${K}${$e.value.name}`:"")),Ze=d((()=>f.outputPanelEditMode)),ea=d((()=>F.executionWaitingForWebhook)),aa=d((()=>F.isWorkflowRunning||ea.value)),ta=d((()=>x.getForeignCredentialsIfSharingEnabled(P.value?.credentials))),na=d((()=>ta.value.length>0)),ia=d((()=>f.inputPanelDisplayMode)),la=d((()=>f.outputPanelDisplayMode)),oa=({isTooltipVisible:e})=>{je.value=e},ua=e=>{"s"===e.key&&ee.isCtrlKeyPressed(e)&&e.preventDefault()},ra=e=>{if(null===e||!Le.value||!Ce.value)return void f.setHoveringItem(null);const a={nodeName:Le.value,runIndex:Qe.value,outputIndex:e.outputIndex,itemIndex:e.itemIndex};f.setHoveringItem(a)},da=e=>{De.value=e.avgRowHeight},sa=()=>{f.unsetActiveNodeName(),z.emit("publishWorkflow")},va=e=>{if(null===e||!P.value||!Ce.value)return void f.setHoveringItem(null);const a={nodeName:P.value?.name,runIndex:He.value,outputIndex:e.outputIndex,itemIndex:e.itemIndex};f.setHoveringItem(a)},pa=()=>{window.open(Ke.value,"_blank"),P.value&&de.track("User clicked ndv link",{node_type:P.value.type,workflow_id:ie.value,push_ref:Te.value,pane:J.Main,type:"i-wish-this-node-would"})},ca=e=>{ke.value=!1,de.track("User moved parameters pane",{window_width:e.windowWidth,start_position:Pe.value,end_position:e.position,node_type:$e.value?$e.value.name:"",push_ref:Te.value,workflow_id:ie.value}),Pe.value=e.position},ga=e=>{ke.value=!0,Pe.value=e.position},_a=e=>{Pe.value=e.position},fa=()=>{we.value=!0,ba("output")},ha=e=>{fe.value=ye.value,we.value=!1,ba(e)},ma=()=>{setTimeout((()=>{P.value&&F.isWorkflowRunning&&(xe.value=!0)}),1e3)},ya=()=>{_e.emit("openSettings")},ba=e=>{de.track("User changed ndv run linking",{node_type:$e.value?$e.value.name:"",push_ref:Te.value,linked:Je.value,pane:e})},wa=()=>{f.setOutputRunIndex(fe.value),we.value=!0,ba("input")},xa=e=>{u("valueChanged",e)},ka=e=>{u("switchSelectedNode",e)},Pa=(e,a,t=0)=>{u("openConnectionNodeCreator",e,a,t)},ja=async()=>{if(!ke.value){if(Ze.value.enabled&&P.value){if("confirm"===await ce.confirm("",pe.baseText("ndv.pinData.beforeClosing.title"),{confirmButtonText:pe.baseText("ndv.pinData.beforeClosing.confirm"),cancelButtonText:pe.baseText("ndv.pinData.beforeClosing.cancel")})){const{value:a}=Ze.value;try{D.setData(Y(a),"on-ndv-close-modal")}catch(e){console.error(e)}}f.setOutputPanelEditModeEnabled(!1)}await m.run("dataDisplay.nodeEditingFinished"),de.track("User closed node modal",{node_type:$e.value?$e.value?.name:"",push_ref:Te.value,workflow_id:ie.value}),xe.value=!1,f.unsetActiveNodeName(),f.resetNDVPushRef()}},Da=(e,a)=>{de.track("User changed ndv run dropdown",{push_ref:Te.value,run_index:e,node_type:$e.value?$e.value?.name:"",pane:a})},Na=e=>{f.setOutputRunIndex(e),Da(e,"output")},Ra=e=>{fe.value=e,Je.value&&f.setOutputRunIndex(e),Da(e,"input")},Ia=e=>{Ne.value=e.avgRowHeight},Ca=(e,a)=>{fe.value=-1,we.value=!0,be.value=e,de.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=()=>{Re.value=!0,Ie.value=!1},Oa=()=>{Re.value=!1,Ie.value=!0},Wa=e=>{Ce.value=!e},Ba=()=>{document.removeEventListener("keydown",ua,!0)},Ma=e=>{be.value=e},La=(e,a)=>{f.setPanelDisplayMode({pane:e,mode:a})};return h(P,((e,a)=>{if(e&&!a?document.addEventListener("keydown",ua,!0):e||Ba(),e&&e.name!==a?.name&&!Fe.value){if(fe.value=-1,f.setOutputRunIndex(-1),we.value=!0,be.value=void 0,xe.value=!1,Ne.value=0,De.value=0,setTimeout((()=>f.setNDVPushRef()),0),!$e.value)return;m.run("dataDisplay.nodeTypeChanged",{nodeSubtitle:x.getNodeSubtitle(e,$e.value,p.workflowObject)}),setTimeout((()=>{if(P.value){const e=q?.value?.outgoingConnectionsByNodeName(P.value?.name);de.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:!na.value,parameters_pane_position:Pe.value,input_first_connector_runs:Xe.value,output_first_connector_runs:qe.value,selected_view_inputs:Ee.value?"trigger":ia.value,selected_view_outputs:la.value,input_connectors:Be.value.length,output_connectors:e?.main?.length,input_displayed_run_index:Qe.value,output_displayed_run_index:He.value,data_pinning_tooltip_presented:je.value,input_displayed_row_height_avg:De.value,output_displayed_row_height_avg:Ne.value,source:ve.ndv_source?.value??"other"})}}),2e3)}window.top&&!Fe.value&&window.top.postMessage(JSON.stringify({command:e?"openNDV":"closeNDV"}),"*")}),{immediate:!0}),h(qe,(()=>{f.setOutputRunIndex(-1)})),h(Xe,(()=>{fe.value=-1})),h(Le,(e=>{setTimeout((()=>{f.setInputNodeName(e)}),0)})),h(Qe,(e=>{setTimeout((()=>{f.setInputRunIndex(e)}),0)})),g((()=>{B.on("data-pinning-discovery",oa),O.on("updateInputNodeName",Ma)})),b((()=>{B.off("data-pinning-discovery",oa),O.off("updateInputNodeName",Ma),Ba()})),(a,o)=>(t(),w(c(G),{id:"ndv","model-value":(!!c(P)||e.renaming)&&!Fe.value,"before-close":ja,"show-close":!1,class:"data-display-wrapper ndv-wrapper","overlay-class":"data-display-overlay",width:"auto","append-to":`#${c(ae)}`,"data-test-id":"ndv","z-index":c(ge).NDV},{default:k((()=>[y(c(N),{placement:"bottom-start",visible:Oe.value,disabled:!Oe.value},{content:k((()=>[i("div",{class:_(a.$style.triggerWarning)},s(c(pe).baseText("ndv.backToCanvas.waitingForTriggerWarning")),3)])),default:k((()=>[i("div",{class:_(a.$style.backToCanvas),"data-test-id":"back-to-canvas",onClick:ja},[y(c(I),{icon:"arrow-left",color:"text-xlight",size:"medium"}),y(c(C),{color:"text-xlight",size:"medium",bold:!0},{default:k((()=>[n(s(c(pe).baseText("ndv.backToCanvas")),1)])),_:1})],2)])),_:1},8,["visible","disabled"]),c(P)?(t(),l("div",me,[i("div",{class:_(a.$style.modalBackground),onClick:ja},null,2),(t(),w(he,{key:c(P).name,"is-trigger-node":Ee.value,"hide-input-and-output":null===$e.value,position:Ee.value&&!ze.value?0:void 0,"is-draggable":!Ee.value,"has-double-width":"wide"===$e.value?.parameterPane,"node-type":$e.value,onSwitchSelectedNode:ka,onOpenConnectionNodeCreator:Pa,onClose:ja,onInit:_a,onDragstart:ga,onDragend:ca},r({output:k((()=>[y(re,{"data-test-id":"output-panel","workflow-object":e.workflowObject,"can-link-runs":Ye.value,"run-index":He.value,"linked-runs":Je.value,"push-ref":Te.value,"is-read-only":e.readOnly||na.value,"block-u-i":aa.value&&Ee.value&&!Ve.value,"is-production-execution-preview":e.isProductionExecutionPreview,"is-pane-active":Ie.value,"display-mode":la.value,onActivatePane:Oa,onLinkRun:fa,onUnlinkRun:o[2]||(o[2]=()=>ha("output")),onRunChange:Na,onOpenSettings:ya,onTableMounted:Ia,onItemHover:va,onSearch:Wa,onDisplayModeChange:o[3]||(o[3]=e=>La("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:k((()=>[y(ue,{"event-bus":c(_e),dragging:ke.value,"push-ref":Te.value,"foreign-credentials":ta.value,"read-only":e.readOnly,"block-u-i":aa.value&&ze.value,executable:!e.readOnly,"input-size":Ae.value,onValueChanged:xa,onExecute:ma,onStopExecution:Ta,onActivate:sa,onSwitchSelectedNode:ka,onOpenConnectionNodeCreator:Pa},null,8,["event-bus","dragging","push-ref","foreign-credentials","read-only","block-u-i","executable","input-size"]),Ke.value?(t(),l("a",{key:0,class:_(a.$style.featureRequest),target:"_blank",onClick:pa},[y(c(I),{icon:"lightbulb"}),n(" "+s(c(pe).baseText("ndv.featureRequest")),1)],2)):v("",!0)])),_:2},[ze.value||!Ee.value?{name:"input",fn:k((()=>[ze.value?(t(),w(se,{key:0,"node-name":c(P).name,"push-ref":Te.value,onExecute:ma,onActivate:sa},null,8,["node-name","push-ref"])):Ee.value?v("",!0):(t(),w(X,{key:1,"workflow-object":e.workflowObject,"can-link-runs":Ye.value,"run-index":Qe.value,"linked-runs":Je.value,"active-node-name":c(P).name,"current-node-name":Le.value,"push-ref":Te.value,"read-only":e.readOnly||na.value,"is-production-execution-preview":e.isProductionExecutionPreview,"search-shortcut":Re.value?"/":void 0,"display-mode":ia.value,"is-mapping-onboarded":c(f).isMappingOnboarded,"focused-mappable-input":c(f).focusedMappableInput,onActivatePane:$a,onLinkRun:wa,onUnlinkRun:o[0]||(o[0]=()=>ha("input")),onRunChange:Ra,onOpenSettings:ya,onChangeInputNode:Ca,onExecute:ma,onTableMounted:da,onItemHover:ra,onSearch:Wa,onDisplayModeChange:o[1]||(o[1]=e=>La("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",$(ye,[["__cssModules",{$style:{modalBackground:"_modalBackground_10ueg_125",triggerWarning:"_triggerWarning_10ueg_130",backToCanvas:"_backToCanvas_10ueg_134",featureRequest:"_featureRequest_10ueg_155"}}]]))}}})); //# sourceMappingURL=NodeDetailsView-legacy-DfZ4qXKu.js.map