-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-UTXYIJBX.js
More file actions
1 lines (1 loc) · 5.77 KB
/
Copy pathchunk-UTXYIJBX.js
File metadata and controls
1 lines (1 loc) · 5.77 KB
1
import{a as ee,c as te}from"./chunk-Y54HNU3H.js";import{b as K}from"./chunk-FFGJMO62.js";import{b as J}from"./chunk-XRBZUWDJ.js";import{a as L,b as U,c as X,d as Y,j as y,l as Z}from"./chunk-LJRBPGSW.js";import{o as H}from"./chunk-JYBRZQRP.js";import{Da as l,Ea as a,Fa as b,Ga as D,H as V,Ha as N,I as E,Ja as B,K as k,Ka as c,La as p,Ma as P,Na as z,O as C,P as h,Qa as Q,Ra as $,Sa as W,T as v,U as T,Ua as f,Va as u,ca as r,da as g,fb as q,g as I,h as S,ia as M,l as j,la as x,ma as R,ra as d,sb as A,va as m,xa as F,zb as G}from"./chunk-UJIEDWPF.js";var re=["tpl"],ae=["*"];function se(t,i){if(t&1&&(D(0),f(1),N()),t&2){let e=p(3);r(),u(e.nelTitle)}}function ce(t,i){if(t&1&&(l(0,"span",9),d(1,se,2,1,"ng-container",10),a()),t&2){let e=p(2);r(),m("stringTemplate",e.nelTitle)}}function me(t,i){if(t&1&&(D(0),f(1),N()),t&2){let e=p(3);r(),u(e.nelFooter)}}function pe(t,i){if(t&1&&(l(0,"div",11),d(1,me,2,1,"ng-container",10),a()),t&2){let e=p(2);r(),m("stringTemplate",e.nelFooter)}}function fe(t,i){if(t&1){let e=B();l(0,"div",1),c("click",function(){C(e);let o=p();return h(o.handleClose())}),l(1,"div",2),c("click",function(o){C(e);let s=p();return h(s.clickDialog(o))}),l(2,"div",3),d(3,ce,2,1,"span",4),l(4,"button",5),c("click",function(){C(e);let o=p();return h(o.handleClose())}),b(5,"i",6),a()(),l(6,"div",7),z(7),a(),d(8,pe,2,1,"div",8),a()()}if(t&2){let e=p();r(),F("el-dialog--center",e.nelCenter),m("@modalMotion",void 0),r(2),m("ngIf",e.nelTitle),r(5),m("ngIf",e.nelFooter)}}var O=class t{set nelVisible(i){i?this.dialogTpl&&this.openWithTemplate(this.dialogTpl):this.overlayRef?.dispose()}constructor(i,e){this.overlay=i,this.viewContainerRef=e,this.nelVisibleChange=new T,this.nelOnClose=new T,this.nelCenter=!1}openWithTemplate(i){this.overlayRef=this.overlay.create(),this.overlayRef.attach(new Y(i,this.viewContainerRef))}handleClose(){if(this.nelBeforeClose){let i=this.nelBeforeClose();i instanceof I?i.subscribe(e=>{e&&this.close()},e=>{console.log(e)}):i!==!1&&this.close()}else this.close()}close(){this.overlayRef?.dispose(),this.nelVisibleChange.emit(!1),this.nelOnClose.emit()}clickDialog(i){i.stopPropagation()}static{this.\u0275fac=function(e){return new(e||t)(g(y),g(M))}}static{this.\u0275cmp=x({type:t,selectors:[["nel-dialog"]],viewQuery:function(e,n){if(e&1&&Q(re,5),e&2){let o;$(o=W())&&(n.dialogTpl=o.first)}},inputs:{nelVisible:"nelVisible",nelTitle:"nelTitle",nelContent:"nelContent",nelFooter:"nelFooter",nelBeforeClose:"nelBeforeClose",nelCenter:"nelCenter"},outputs:{nelVisibleChange:"nelVisibleChange",nelOnClose:"nelOnClose"},standalone:!1,ngContentSelectors:ae,decls:2,vars:0,consts:[["tpl",""],[1,"el-overlay",3,"click"],["role","dialog",1,"el-dialog",2,"margin-top","15vh","width","30%",3,"click"],[1,"el-dialog__header"],["class","el-dialog__title",4,"ngIf"],["type","button",1,"el-dialog__headerbtn",3,"click"],[1,"el-dialog__close","el-icon-close"],[1,"el-dialog__body"],["class","el-dialog__footer",4,"ngIf"],[1,"el-dialog__title"],[4,"stringTemplate"],[1,"el-dialog__footer"]],template:function(e,n){e&1&&(P(),d(0,fe,9,5,"ng-template",null,0,q))},dependencies:[A,L],encapsulation:2,data:{animation:[H]}})}};j([K()],O.prototype,"nelCenter",void 0);var _=class{constructor(i,e,n,o,s){this.overlay=i,this.nelTitle=e,this.nelContent=n,this.nelOnCancel=o,this.nelOnOk=s,this.afterClosed$=new S,i.backdropClick().subscribe(()=>this._close("backdropClick",null))}close(i){this._close("close",i)}_close(i,e){this.overlay.dispose(),this.afterClosed$.next({type:i,data:e}),this.afterClosed$.complete()}};var ie=(()=>{class t{constructor(e){this.ref=e}ngOnInit(){this.nelTitle=this.ref.nelTitle,this.nelContent=this.ref.nelContent,this.nelOnCancel=this.ref.nelOnCancel,this.nelOnOk=this.ref.nelOnOk}cancel(){this.ref.close(null),this.nelOnCancel&&this.nelOnCancel()}confirm(){this.ref.close(null),this.nelOnOk&&this.nelOnOk()}clickDialog(e){e.stopPropagation()}static{this.\u0275fac=function(n){return new(n||t)(g(_))}}static{this.\u0275cmp=x({type:t,selectors:[["nel-dialog-confirm"]],standalone:!1,decls:18,vars:5,consts:[[1,"el-overlay","is-message-box",3,"click"],[1,"el-message-box",3,"click"],[1,"el-message-box__header"],[1,"el-message-box__title"],["type","button","aria-label","Close",1,"el-message-box__headerbtn",3,"click"],[1,"el-message-box__close","el-icon-close"],[1,"el-message-box__content"],[1,"el-message-box__container"],[1,"el-message-box__message"],[1,"el-message-box__btns"],["nel-button","",3,"click","nelSize"],["nel-button","",3,"click","nelSize","nelType"]],template:function(n,o){n&1&&(l(0,"div",0),c("click",function(){return o.cancel()}),l(1,"div",1),c("click",function(oe){return o.clickDialog(oe)}),l(2,"div",2)(3,"div",3)(4,"span"),f(5),a()(),l(6,"button",4),c("click",function(){return o.cancel()}),b(7,"i",5),a()(),l(8,"div",6)(9,"div",7)(10,"div",8)(11,"p"),f(12),a()()()(),l(13,"div",9)(14,"button",10),c("click",function(){return o.cancel()}),f(15," \u53D6\u6D88 "),a(),l(16,"button",11),c("click",function(){return o.confirm()}),f(17," \u786E\u5B9A "),a()()()()),n&2&&(r(5),u(o.nelTitle),r(7),u(o.nelContent),r(2),m("nelSize","small"),r(2),m("nelSize","small")("nelType","primary"))},dependencies:[ee],encapsulation:2})}}return t})();var ne=(()=>{class t{constructor(e,n){this.overlay=e,this.injector=n}confirm(e){let n=this.overlay.create(),o=new _(n,e.nelTitle,e.nelContent,e.nelOnCancel,e.nelOnOk),s=this.createInjector(o,this.injector);return n.attach(new X(ie,null,s)),o}createInjector(e,n){return v.create({parent:n,providers:[{provide:_,useValue:e}]})}static{this.\u0275fac=function(n){return new(n||t)(k(y),k(v))}}static{this.\u0275prov=V({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var He=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=R({type:t})}static{this.\u0275inj=E({providers:[ne],imports:[G,Z,U,J,te]})}}return t})();export{O as a,ne as b,He as c};