UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 4.42 kB
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.16.1`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`7576d5f0-b325-41eb-babb-f2427c4d6a57`,e._sentryDebugIdIdentifier=`sentry-dbid-7576d5f0-b325-41eb-babb-f2427c4d6a57`)})()}catch{}import{$ as e,A as t,C as n,E as r,N as i,S as a,Sn as o,T as s,Wt as c,_n as l,j as u,w as d,yt as f}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as p}from"./core-Bz5WjPxS.js";import{Xi as m,tt as h}from"./src-XqE2yCpG.js";import{t as g}from"./_plugin-vue_export-helper-CIL7EULb.js";import{Qo as _}from"./constants-DuQbSl-q.js";import{t as v}from"./router-kvSL2kqM.js";var y=i({__name:`WorkflowLocation`,props:{workflowId:{},workflowName:{default:void 0},homeProject:{default:void 0},parentFolder:{default:void 0},asLinks:{type:Boolean,default:!1}},setup(i){let g=i,y=p(),b=a(()=>g.homeProject?.type===`personal`?y.baseText(`projects.menu.personal`):g.homeProject?.name??``),x=a(()=>g.homeProject?v.resolve({name:_.PROJECTS_WORKFLOWS,params:{projectId:g.homeProject.id}}).fullPath:``),S=a(()=>!g.homeProject||!g.parentFolder?``:`/projects/${g.homeProject.id}/folders/${g.parentFolder.id}/workflows`),C=a(()=>g.workflowId?v.resolve({name:_.WORKFLOW,params:{name:g.workflowId}}).fullPath:``),w=a(()=>!!g.parentFolder?.parentFolderId);return(a,p)=>(e(),r(`div`,{class:l(a.$style[`location-container`])},[i.homeProject?(e(),r(`span`,{key:0,class:l(a.$style.truncate)},[i.asLinks?(e(),d(c(h),{key:0,"data-test-id":`workflow-location-project-link`,to:x.value,theme:`text`,class:l([a.$style[`location-link`],a.$style.truncate]),"new-window":!0},{default:f(()=>[u(c(m),{class:l(a.$style.truncate),"data-test-id":`workflow-location-project-name`},{default:f(()=>[t(o(b.value),1)]),_:1},8,[`class`])]),_:1},8,[`to`,`class`])):(e(),d(c(m),{key:1,class:l(a.$style.truncate),"data-test-id":`workflow-location-project-name`},{default:f(()=>[t(o(b.value),1)]),_:1},8,[`class`]))],2)):s(``,!0),i.parentFolder||i.workflowName?(e(),r(`span`,{key:1,class:l(a.$style.separator),"data-test-id":`workflow-location-separator`},` / `,2)):s(``,!0),w.value?(e(),r(`span`,{key:2,class:l(a.$style.grandparent),"data-test-id":`workflow-location-grandparent`},[n(`span`,{class:l(a.$style.ellipsis)},`...`,2),n(`span`,{class:l(a.$style.separator),"data-test-id":`workflow-location-ellipsis-separator`},`/`,2)],2)):s(``,!0),i.parentFolder?(e(),r(`span`,{key:3,class:l(a.$style[`parent-folder`])},[i.asLinks&&i.homeProject?(e(),d(c(h),{key:0,"data-test-id":`workflow-location-folder-link`,to:S.value,theme:`text`,class:l([a.$style[`location-link`],a.$style.truncate]),"new-window":!0},{default:f(()=>[u(c(m),{class:l(a.$style.truncate),"data-test-id":`workflow-location-folder-name`},{default:f(()=>[t(o(i.parentFolder.name),1)]),_:1},8,[`class`])]),_:1},8,[`to`,`class`])):(e(),d(c(m),{key:1,class:l(a.$style.truncate),"data-test-id":`workflow-location-folder-name`},{default:f(()=>[t(o(i.parentFolder.name),1)]),_:1},8,[`class`]))],2)):s(``,!0),i.parentFolder&&i.workflowName?(e(),r(`span`,{key:4,class:l(a.$style.separator)},`/`,2)):s(``,!0),i.workflowName?(e(),r(`span`,{key:5,class:l([a.$style[`workflow-name`],a.$style.truncate])},[i.asLinks&&i.workflowId?(e(),d(c(h),{key:0,"data-test-id":`workflow-location-workflow-link`,to:C.value,theme:`text`,class:l([a.$style[`location-link`],a.$style.truncate]),"new-window":!0},{default:f(()=>[u(c(m),{class:l(a.$style.truncate),"data-test-id":`workflow-location-workflow-name`},{default:f(()=>[t(o(i.workflowName),1)]),_:1},8,[`class`])]),_:1},8,[`to`,`class`])):(e(),d(c(m),{key:1,class:l(a.$style.truncate),"data-test-id":`workflow-location-workflow-name`},{default:f(()=>[t(o(i.workflowName),1)]),_:1},8,[`class`]))],2)):s(``,!0)],2))}}),b=`_ellipsis_1mlnw_134`,x=`_separator_1mlnw_139`,S=`_grandparent_1mlnw_144`,C=`_truncate_1mlnw_158`,w=g(y,[[`__cssModules`,{$style:{"location-container":`_location-container_1mlnw_125`,ellipsis:b,separator:x,grandparent:S,"parent-folder":`_parent-folder_1mlnw_150`,truncate:C,"location-link":`_location-link_1mlnw_166`,"workflow-name":`_workflow-name_1mlnw_170`}}]]);export{w as t}; //# sourceMappingURL=WorkflowLocation-BhLr779x.js.map