UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 4.32 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(["./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./core-legacy-VD8c7QJ-.js","./src-legacy-B67uuxhB.js","./_plugin-vue_export-helper-legacy-DFdC_I5Z.js","./constants-legacy-2_ytuuS3.js","./useDebounce-legacy-CRJGWVMg.js"],(function(e,t){var o,a,n,r,c,l,u,i,s,d,p,f,h,b,m,v,_,y,g,S,x,T;return{setters:[function(e){o=e.$,a=e.E,n=e.Ft,r=e.N,c=e.R,l=e.S,u=e.Wt,i=e._n,s=e.gt,d=e.j,p=e.yn,f=e.yt},function(e){h=e.at,b=e.m},function(e){m=e.Pt,v=e.Qi,_=e.ji},function(e){y=e.t},function(e){g=e.xc},function(e){S=e.t}],execute:function(){(x=document.createElement("style")).textContent="._ioSearch_1bmr7_125{--input--border-color:transparent;--input--border-color--hover:transparent;--input--border-color--focus:transparent;--input--color--background:transparent;transition:max-width .3s cubic-bezier(.19,1,.22,1)}._ioSearch_1bmr7_125 ._ioSearchIcon_1bmr7_132{color:var(--color--foreground--shade-2);cursor:pointer;vertical-align:middle}._ioSearch_1bmr7_125 input{opacity:0;cursor:pointer}._ioSearchOpened_1bmr7_142{--input--border-color:var(--border-color);--input--border-color--focus:var(--color--secondary);--input--color--background:var(--color--foreground--tint-2)}._ioSearchOpened_1bmr7_142 ._ioSearchIcon_1bmr7_132{cursor:default}._ioSearchOpened_1bmr7_142 input{opacity:1;cursor:text}\n/*$vite$:1*/",document.head.appendChild(x);try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(w=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[w]="e2b6dbe4-0745-4845-ab66-5c4fe6b901c7",t._sentryDebugIdIdentifier="sentry-dbid-e2b6dbe4-0745-4845-ab66-5c4fe6b901c7")}catch(t){}var t,w;T={"data-test-id":"ndv-search-container"},e("default",y(r({__name:"RunDataSearch",props:{modelValue:{},paneType:{default:"output"},displayMode:{default:"schema"},shortcut:{default:void 0}},emits:["update:modelValue","focus"],setup(e,{emit:t}){const r=t,y=e,x=h(),{debounce:w}=S(),{isCtrlKeyPressed:E,controlKeyText:I}=m(),k=c(g,void 0),j=l((()=>k?.value?.document??window.document)),M=n(null),V=n(null),$=n(y.modelValue??""),D=n(!!$.value),H=l((()=>"ctrl+f"===y.shortcut?x.baseText("ndv.search.placeholder.shortcutHint",{interpolate:{shortcut:`${I.value}+F`}}):"output"===y.paneType?x.baseText("ndv.search.placeholder.output"):"schema"===y.displayMode?x.baseText("ndv.search.placeholder.input.schema"):x.baseText("ndv.search.placeholder.input"))),L=l((()=>D.value?{maxWidth:"204px",minWidth:"120px"}:{maxWidth:"30px"})),O=w((async e=>r("update:modelValue",e)),{debounceTime:300,trailing:!0}),R=e=>{$.value=e,O(e)},W=()=>{D.value=!0,V.value?.select(),r("focus")},z=()=>{y.modelValue||(D.value=!1)};return b(j,"keydown",(e=>{const t=function(e){if(D.value&&"Escape"===e.key)return"cancel";switch(y.shortcut){case"/":return"/"!==e.key||(t=e.target)instanceof HTMLElement&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||"true"===t.getAttribute("contentEditable"))?void 0:"open";case"ctrl+f":return"f"===e.key&&E(e)?"open":void 0;case void 0:return}var t}(e);if(t)switch(e.preventDefault(),e.stopImmediatePropagation(),t){case"open":M.value=document.activeElement,V.value?.focus(),V.value?.select();break;case"cancel":V.value?.blur(),D.value=!1,r("update:modelValue",""),M.value instanceof HTMLElement&&M.value.focus()}}),{capture:!0}),s((()=>y.modelValue),(e=>{const t=$.value&&!e;$.value=e,t&&(D.value=!1)})),(e,t)=>(o(),a("div",T,[d(u(_),{ref_key:"inputRef",ref:V,"data-test-id":"ndv-search",class:i({[e.$style.ioSearch]:!0,[e.$style.ioSearchOpened]:D.value}),style:p(L.value),"model-value":$.value,placeholder:H.value,size:"small","onUpdate:modelValue":R,onFocus:W,onBlur:z},{prefix:f((()=>[d(u(v),{class:i(e.$style.ioSearchIcon),icon:"search",size:"large"},null,8,["class"])])),_:1},8,["class","style","model-value","placeholder"])]))}}),[["__cssModules",{$style:{ioSearch:"_ioSearch_1bmr7_125",ioSearchIcon:"_ioSearchIcon_1bmr7_132",ioSearchOpened:"_ioSearchOpened_1bmr7_142"}}]]))}}})); //# sourceMappingURL=RunDataSearch-legacy-CaBkwfFX.js.map