UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 5.6 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(["./chunk-legacy-Dz3fjYb5.js","./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./src-legacy-B67uuxhB.js","./_plugin-vue_export-helper-legacy-DFdC_I5Z.js","./users.store-legacy-azRUgFdP.js","./dialog-legacy-Ctrbi48Z.js","./constants-legacy-2_ytuuS3.js"],(function(e,t){var l,o,n,a,i,s,d,c,r,f,u,h,g,p,y,m,_,w,x,v,b,k,B,$,T,E,C,j,I,S,D,M;return{setters:[function(e){e.o},function(e){l=e.$,o=e.A,n=e.C,a=e.E,i=e.N,s=e.O,d=e.S,c=e.Sn,r=e.T,f=e.U,u=e.Wt,h=e.X,g=e._n,p=e.h,y=e.it,m=e.j,_=e.m,w=e.q,x=e.vn,v=e.w,b=e.yn,k=e.yt},function(e){B=e.Ji,$=e.k},function(e){T=e.t},function(e){E=e.Fn,C=e.r},function(e){j=e.t},function(e){I=e.w}],execute:function(){(S=document.createElement("style")).textContent=".dialog-wrapper.el-dialog{max-width:var(--dialog--max-width,80%);min-width:var(--dialog--min-width,420px);height:var(--dialog--height);min-height:var(--dialog--min-height);max-height:var(--dialog--max-height);flex-direction:column;display:flex}.dialog-wrapper .el-dialog__body{flex-direction:column;flex-grow:1;display:flex;overflow:hidden}.dialog-wrapper .modal-content{padding-inline:var(--spacing--4xs);margin-inline:calc(var(--spacing--4xs) * -1);flex-grow:1;overflow-x:hidden;overflow-y:auto}.dialog-wrapper.scrollable .modal-content{overflow-y:auto}._center_rhxla_125>div{justify-content:center}._loader_rhxla_129{color:var(--color--primary--tint-1);justify-content:center;align-items:center;height:80%;font-size:30px;display:flex}._centerTitle_rhxla_138{text-align:center}._subtitle_rhxla_142{margin-top:var(--spacing--2xs)}._footer_rhxla_146{margin-top:var(--spacing--lg)}\n/*$vite$:1*/",document.head.appendChild(S);try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(O=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[O]="71834a7f-f162-4692-ab5c-c62439b3ff99",t._sentryDebugIdIdentifier="sentry-dbid-71834a7f-f162-4692-ab5c-c62439b3ff99")}catch(t){}var t,O;D={key:0},M=i({__name:"Modal",props:{name:{},title:{default:""},subtitle:{default:""},eventBus:{},showClose:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},classic:{type:Boolean,default:!1},beforeClose:{},customClass:{default:""},center:{type:Boolean,default:!0},width:{default:"50%"},minWidth:{},maxWidth:{},height:{},minHeight:{},maxHeight:{},scrollable:{type:Boolean,default:!1},centerTitle:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0}},emits:["enter"],setup(e,{emit:t}){const i=e,T=t,{APP_Z_INDEXES:S}=E(),M=d((()=>{const e={};return i.height&&(e["--dialog--height"]=i.height),i.minHeight&&(e["--dialog--min-height"]=i.minHeight),i.maxHeight&&(e["--dialog--max-height"]=i.maxHeight),i.maxWidth&&(e["--dialog--max-width"]=i.maxWidth),i.minWidth&&(e["--dialog--min-width"]=i.minWidth),e})),O=`#${I}`;h((()=>{window.addEventListener("keydown",A),i.eventBus?.on("close",L);const e=document.activeElement;e&&W.modalsById[i.name]?.open&&e.blur()})),w((()=>{i.eventBus?.off("close",L),window.removeEventListener("keydown",A)}));const W=C();function H(){W.isModalActiveById[i.name]&&T("enter")}function z(){i.eventBus?.emit("opened")}function A(e){13===e?.keyCode&&H()}async function L(e){i.beforeClose&&!1===await i.beforeClose()||(W.closeModal(i.name),i.eventBus?.emit("closed",e))}async function P(){await L()}function N(){let e=i.customClass||"";return i.classic&&(e=`${e} classic`),e}return(t,i)=>(l(),v(u(j),{"model-value":u(W).modalsById[e.name]?.open,"before-close":P,class:g({"dialog-wrapper":!0,scrollable:e.scrollable,[N()]:!0}),center:e.center,width:e.width,"show-close":e.showClose,"close-on-click-modal":e.closeOnClickModal,"close-on-press-escape":e.closeOnPressEscape,style:b(M.value),"append-to":e.appendToBody?void 0:O,"lock-scroll":e.lockScroll,"append-to-body":e.appendToBody,"data-test-id":`${e.name}-modal`,"modal-class":e.center?t.$style.center:"","z-index":u(S).MODALS,onOpened:z},s({default:k((()=>[n("div",{class:"modal-content",onKeydown:[i[0]||(i[0]=p((()=>{}),["stop"])),_(H,["enter"]),_(P,["esc"])]},[e.loading?(l(),a("div",{key:1,class:g(t.$style.loader)},[m(u($))],2)):y(t.$slots,"content",{key:0})],32),!e.loading&&t.$slots.footer?(l(),a("div",{key:0,class:g(t.$style.footer)},[y(t.$slots,"footer",{close:L})],2)):r("",!0)])),_:2},[t.$slots.header?{name:"header",fn:k((()=>[e.loading?r("",!0):y(t.$slots,"header",x(f({key:0},{closeDialog:L})))])),key:"0"}:e.title?{name:"title",fn:k((()=>[n("div",{class:g(e.centerTitle?t.$style.centerTitle:"")},[e.title?(l(),a("div",D,[m(u(B),{tag:"h1",size:"xlarge"},{default:k((()=>[o(c(e.title),1)])),_:1})])):r("",!0),e.subtitle?(l(),a("div",{key:1,class:g(t.$style.subtitle)},[m(u(B),{tag:"h3",size:"small",color:"text-light"},{default:k((()=>[o(c(e.subtitle),1)])),_:1})],2)):r("",!0)],2)])),key:"1"}:void 0]),1032,["model-value","class","center","width","show-close","close-on-click-modal","close-on-press-escape","style","append-to","lock-scroll","append-to-body","data-test-id","modal-class","z-index"]))}}),e("t",T(M,[["__cssModules",{$style:{center:"_center_rhxla_125",loader:"_loader_rhxla_129",centerTitle:"_centerTitle_rhxla_138",subtitle:"_subtitle_rhxla_142",footer:"_footer_rhxla_146"}}]]))}}})); //# sourceMappingURL=Modal-legacy-myZZZK6d.js.map