n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 3.09 kB
JavaScript
(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.13.4`}}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]=`2f79979e-4c81-4cb6-a7a6-4c1e87d50196`,e._sentryDebugIdIdentifier=`sentry-dbid-2f79979e-4c81-4cb6-a7a6-4c1e87d50196`)})()}catch{}import{$ as e,A as t,C as n,E as r,Ft as i,N as a,S as o,Sn as s,T as c,W as l,Wt as u,X as d,_n as f,c as p,j as m,w as h,yt as g}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{_t as _,bt as v}from"./_MapCache-CUJwh2qp.js";import{$i as y,Zi as b}from"./src-wni2AGA3.js";import{t as x}from"./_plugin-vue_export-helper-Dm3nT7Ps.js";import{Tr as S,at as C,en as w,s as T,t as E,w as D,z as O}from"./users.store-BHWXXawf.js";import{t as k}from"./communityNodes.store-CwKzTEmt.js";import{t as A}from"./useCanvasOperations-CI7Ylcwf.js";function j(){let e=k(),t=D(),n=C(),r=T(),a=E(),o=i(!1),s=S(),c=A(),u=w(),d=async e=>{let n=await t.getCommunityNodeAttributes(e);if(n)return n.npmVersion};return{installNode:async i=>{if(!a.isAdminOrOwner){let e=Error(`User is not an owner or admin`);return s.showError(e,_.baseText(`settings.communityNodes.messages.install.error`)),{success:!1,error:e}}i.telemetry&&u.track(`user started cnr package install`,{input_string:i.packageName,has_quick_connect:i.telemetry.hasQuickConnect,source:i.telemetry.source});try{o.value=!0,i.type===`verified`?await e.installPackage(i.packageName,!0,await d(i.nodeType)):await e.installPackage(i.packageName),await Promise.all([t.getNodeTypes(),t.fetchCommunityNodePreviews(),n.fetchCredentialTypes(!0)]),await l();let a=i.nodeType;if(a&&r.workflow.nodes?.length){let e=r.workflow.nodes.filter(e=>e.type===O(a));c.initializeUnknownNodes(e)}return s.showMessage({title:_.baseText(`settings.communityNodes.messages.install.success`),type:`success`}),{success:!0}}catch(e){return s.showError(e,_.baseText(`settings.communityNodes.messages.install.error`)),{success:!1,error:e}}finally{o.value=!1}},loading:o}}var M={style:{"padding-bottom":`8px`}},N=x(a({__name:`ContactAdministratorToInstall`,props:{box:{type:Boolean}},setup(i){let a=i,l=p(),_=E(),x=v(),S=o(()=>_.allUsers.filter(e=>e.role?.includes(`owner`)).map(e=>e.email)),C=o(()=>({[l.contactOwnerHint]:!0,[l.border]:a.box}));return d(async()=>{await _.fetchUsers({filter:{isOwner:!0}})}),(i,o)=>(e(),r(`div`,{class:f(C.value)},[a.box?(e(),h(u(y),{key:0,color:`text-light`,icon:`info`,size:`large`})):c(``,!0),m(u(b),{color:`text-base`,size:`medium`},{default:g(()=>[n(`div`,M,s(u(x).baseText(`communityNodeInfo.contact.admin`)),1),S.value.length?(e(),h(u(b),{key:0,bold:``},{default:g(()=>[t(s(S.value.join(`, `)),1)]),_:1})):c(``,!0)]),_:1})],2))}}),[[`__cssModules`,{$style:{contactOwnerHint:`_contactOwnerHint_qnrnx_125`,border:`_border_qnrnx_133`}}]]);export{j as n,N as t};
//# sourceMappingURL=ContactAdministratorToInstall-CmQ5LyOX.js.map