UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 1.94 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]=`b75d796a-979e-4318-b363-358040f3acf5`,e._sentryDebugIdIdentifier=`sentry-dbid-b75d796a-979e-4318-b363-358040f3acf5`)})()}catch{}import{$ as e,N as t,S as n,Wt as r,_n as i,w as a}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{z as o}from"./src-XqE2yCpG.js";import{t as s}from"./_plugin-vue_export-helper-CIL7EULb.js";import{Ki as c,it as l,r as u,w as d}from"./users.store-xP93bV7X.js";import{t as f}from"./useRootStore-XEREVjMN.js";var p=s(t({__name:`CredentialIcon`,props:{credentialTypeName:{},size:{},theme:{}},setup(t){let s=t,p=l(),m=f(),h=u(),g=d(),_=n(()=>w(s.credentialTypeName)),v=n(()=>s.theme??h.appliedTheme),y=n(()=>{let e=c(_.value?.icon,v.value);return e?.startsWith(`node:`)?g.getNodeType(e.replace(`node:`,``))?.iconUrl:null}),b=n(()=>{let e=c(y.value??_.value?.iconUrl,v.value);if(e)return m.baseUrl+e}),x=n(()=>b.value?`file`:S.value?`icon`:`unknown`),S=n(()=>{let e=c(_.value?.icon,h.appliedTheme);if(e?.startsWith(`fa:`))return e.replace(`fa:`,``)}),C=n(()=>{let{iconColor:e}=_.value??{};if(e)return`var(--node--icon--color--${e})`});function w(e){if(!e)return null;let t=p.getCredentialTypeByName(e);if(!t)return null;if(t.icon??t.iconUrl)return t;if(t.extends){let e=null;return t.extends.forEach(t=>{e=w(t)}),e}return null}return(n,s)=>(e(),a(r(o),{class:i(n.$style.icon),type:x.value,size:t.size??26,src:b.value,name:S.value,color:C.value},null,8,[`class`,`type`,`size`,`src`,`name`,`color`]))}}),[[`__cssModules`,{$style:{icon:`_icon_6l2me_125`}}]]);export{p as t}; //# sourceMappingURL=CredentialIcon-BVAlIa2j.js.map