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.13.4"}}catch(e){}}(),System.register(["./chunk-legacy-TXBRODOR.js","./vue.runtime.esm-bundler-legacy-IafOlCW8.js","./src-legacy-Dwzr7bD0.js","./_plugin-vue_export-helper-legacy-DEZAmQqp.js","./users.store-legacy-OKuN0qAC.js","./dialog-legacy-2rrTvc09.js","./constants-legacy-DNCca_FT.js"],(function(e,t){var l,o,n,a,i,s,d,c,r,u,f,h,g,y,p,m,_,w,x,v,b,k,B,$,E,T,C,j,I,S,D,H;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,u=e.U,f=e.Wt,h=e.X,g=e._n,y=e.h,p=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.R,$=e.Yi},function(e){E=e.t},function(e){T=e.Er,C=e.r},function(e){j=e.t},function(e){I=e.D}],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:{},(M=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[M]="c9e2bd95-3164-4ce8-ad48-03d947e12385",t._sentryDebugIdIdentifier="sentry-dbid-c9e2bd95-3164-4ce8-ad48-03d947e12385")}catch(t){}var t,M;D={key:0},H=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,E=t,{APP_Z_INDEXES:S}=T(),H=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})),M=`#${I}`;h((()=>{window.addEventListener("keydown",A),i.eventBus?.on("close",L);const e=document.activeElement;e&&O.modalsById[i.name]?.open&&e.blur()})),w((()=>{i.eventBus?.off("close",L),window.removeEventListener("keydown",A)}));const O=C();function W(){O.isModalActiveById[i.name]&&E("enter")}function z(){i.eventBus?.emit("opened")}function A(e){13===e?.keyCode&&W()}async function L(e){i.beforeClose&&!1===await i.beforeClose()||(O.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(f(j),{"model-value":f(O).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(H.value),"append-to":e.appendToBody?void 0:M,"lock-scroll":e.lockScroll,"append-to-body":e.appendToBody,"data-test-id":`${e.name}-modal`,"modal-class":e.center?t.$style.center:"","z-index":f(S).MODALS,onOpened:z},s({default:k((()=>[n("div",{class:"modal-content",onKeydown:[i[0]||(i[0]=y((()=>{}),["stop"])),_(W,["enter"]),_(P,["esc"])]},[e.loading?(l(),a("div",{key:1,class:g(t.$style.loader)},[m(f(B))],2)):p(t.$slots,"content",{key:0})],32),!e.loading&&t.$slots.footer?(l(),a("div",{key:0,class:g(t.$style.footer)},[p(t.$slots,"footer",{close:L})],2)):r("",!0)])),_:2},[t.$slots.header?{name:"header",fn:k((()=>[e.loading?r("",!0):p(t.$slots,"header",x(u({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(f($),{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(f($),{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",E(H,[["__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-D-vb8tRz.js.map