UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 2.81 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]=`c3e6503b-19d5-49b1-8b21-449d2c5dfeba`,e._sentryDebugIdIdentifier=`sentry-dbid-c3e6503b-19d5-49b1-8b21-449d2c5dfeba`)})()}catch{}import{$ as e,A as t,C as n,Ft as r,N as i,Sn as a,Wt as o,X as s,_n as c,j as l,w as u,yt as d}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as f}from"./core-Bz5WjPxS.js";import{Ji as p,Xi as m,Zi as h,et as g,xt as _}from"./src-XqE2yCpG.js";import{t as v}from"./_plugin-vue_export-helper-CIL7EULb.js";import{Kr as y}from"./constants-DuQbSl-q.js";import{t as b}from"./Modal-gWM7cVuX.js";import{t as x}from"./CredentialIcon-BVAlIa2j.js";import{h as S,i as C}from"./constants-BVzsnVB6.js";var w=v(i({__name:`ModelByIdSelectorModal`,props:{modalName:{},data:{}},setup(i){let v=i,w=r(_()),T=r(v.data.initialValue),E=r(null),D=f();s(()=>{setTimeout(()=>{E.value?.inputRef?.select(),E.value?.inputRef?.focus()})});function O(){T.value&&(v.data.onSelect(v.data.provider,T.value),w.value.emit(`close`))}function k(){w.value.emit(`close`)}return(r,s)=>(e(),u(b,{name:o(C),"event-bus":w.value,width:`50%`,center:!0,"max-width":`460px`,"min-height":`250px`},{header:d(()=>[n(`div`,{class:c(r.$style.header)},[l(x,{"credential-type-name":o(y)[i.data.provider],size:24,class:c(r.$style.icon)},null,8,[`credential-type-name`,`class`]),l(o(p),{size:`medium`,tag:`h2`,class:c(r.$style.title)},{default:d(()=>[t(a(o(D).baseText(`chatHub.models.byIdSelector.title`,{interpolate:{provider:o(S)[i.data.provider]}})),1)]),_:1},8,[`class`])],2)]),content:d(()=>[n(`div`,{class:c(r.$style.content)},[l(o(m),{size:`small`,color:`text-base`},{default:d(()=>[t(a(o(D).baseText(`chatHub.models.byIdSelector.choose`)),1)]),_:1}),l(o(g),{ref_key:`inputRef`,ref:E,modelValue:T.value,"onUpdate:modelValue":s[0]||=e=>T.value=e,name:`model`,label:``,"max-length":`64`,"focus-initially":``,onEnter:O},null,8,[`modelValue`])],2)]),footer:d(()=>[n(`div`,{class:c(r.$style.footer)},[l(o(h),{variant:`subtle`,onClick:k},{default:d(()=>[t(a(o(D).baseText(`chatHub.models.byIdSelector.cancel`)),1)]),_:1}),l(o(h),{variant:`solid`,disabled:!T.value,onClick:O},{default:d(()=>[t(a(o(D).baseText(`chatHub.models.byIdSelector.confirm`)),1)]),_:1},8,[`disabled`])],2)]),_:1},8,[`name`,`event-bus`]))}}),[[`__cssModules`,{$style:{content:`_content_uxwis_125`,footer:`_footer_uxwis_132`,header:`_header_uxwis_139`,icon:`_icon_uxwis_145`}}]]);export{w as default}; //# sourceMappingURL=ModelByIdSelectorModal-DsDuVjLz.js.map