ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
2 lines • 7.36 kB
JavaScript
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("ng-zorro-antd/core"),require("ng-zorro-antd/tooltip"),require("rxjs/operators"),require("@angular/cdk/overlay"),require("@angular/common"),require("ng-zorro-antd/button"),require("ng-zorro-antd/i18n"),require("ng-zorro-antd/icon")):"function"==typeof define&&define.amd?define("ng-zorro-antd/popconfirm",["exports","@angular/core","ng-zorro-antd/core","ng-zorro-antd/tooltip","rxjs/operators","@angular/cdk/overlay","@angular/common","ng-zorro-antd/button","ng-zorro-antd/i18n","ng-zorro-antd/icon"],e):e((n["ng-zorro-antd"]=n["ng-zorro-antd"]||{},n["ng-zorro-antd"].popconfirm={}),n.ng.core,n["ng-zorro-antd"].core,n["ng-zorro-antd"].tooltip,n.rxjs.operators,n.ng.cdk.overlay,n.ng.common,n["ng-zorro-antd"].button,n["ng-zorro-antd"].i18n,n["ng-zorro-antd"].icon)}(this,function(n,p,e,t,r,o,i,a,c,l){"use strict";var s=function(n,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t])})(n,e)};function d(n,e){function t(){this.constructor=n}s(n,e),n.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}function u(n,e,t,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;0<=c;c--)(i=n[c])&&(a=(r<3?i(a):3<r?i(e,t,a):i(e,t))||a);return 3<r&&a&&Object.defineProperty(e,t,a),a}function z(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}var y=function(o){function n(n,e){var t=o.call(this,n,e)||this;return t.noAnimation=e,t._prefix="ant-popover-placement",t._trigger="click",t._hasBackdrop=!0,t.nzOkType="primary",t.nzCondition=!1,t.nzOnCancel=new p.EventEmitter,t.nzOnConfirm=new p.EventEmitter,t}return d(n,o),n.prototype.show=function(){this.nzCondition?this.onConfirm():this.nzVisible=!0},n.prototype.onCancel=function(){this.nzOnCancel.emit(),this.nzVisible=!1},n.prototype.onConfirm=function(){this.nzOnConfirm.emit(),this.nzVisible=!1},n.decorators=[{type:p.Component,args:[{changeDetection:p.ChangeDetectionStrategy.OnPush,encapsulation:p.ViewEncapsulation.None,selector:"nz-popconfirm",exportAs:"nzPopconfirmComponent",preserveWhitespaces:!1,animations:[e.zoomBigMotion],template:'<ng-content></ng-content>\n<ng-template\n #overlay="cdkConnectedOverlay"\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]="overlayOrigin"\n [cdkConnectedOverlayHasBackdrop]="_hasBackdrop"\n (backdropClick)="hide()"\n (detach)="hide()"\n (positionChange)="onPositionChange($event)"\n [cdkConnectedOverlayPositions]="_positions"\n [cdkConnectedOverlayOpen]="visible$ | async">\n <div class="ant-popover"\n [ngClass]="_classMap"\n [ngStyle]="nzOverlayStyle"\n [nzNoAnimation]="noAnimation?.nzNoAnimation"\n [@zoomBigMotion]="\'active\'"\n (@zoomBigMotion.done)="_afterVisibilityAnimation($event)">\n <div class="ant-popover-content">\n <div class="ant-popover-arrow"></div>\n <div class="ant-popover-inner">\n <div>\n <div class="ant-popover-inner-content">\n <div class="ant-popover-message">\n <ng-container *nzStringTemplateOutlet="nzTitle">\n <ng-container *nzStringTemplateOutlet="nzIcon">\n <i nz-icon [nzType]="nzIcon || \'exclamation-circle\'" nzTheme="fill"></i>\n </ng-container>\n <div class="ant-popover-message-title">{{ nzTitle }}</div>\n </ng-container>\n </div>\n <div class="ant-popover-buttons">\n <button nz-button [nzSize]="\'small\'" (click)="onCancel()">\n <ng-container *ngIf="nzCancelText">{{ nzCancelText }}</ng-container>\n <ng-container *ngIf="!nzCancelText">{{ \'Modal.cancelText\' | nzI18n }}</ng-container>\n </button>\n <button nz-button [nzSize]="\'small\'" [nzType]="nzOkType" (click)="onConfirm()">\n <ng-container *ngIf="nzOkText">{{ nzOkText }}</ng-container>\n <ng-container *ngIf="!nzOkText">{{ \'Modal.okText\' | nzI18n }}</ng-container>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</ng-template>',styles:["\n .ant-popover {\n position: relative;\n }\n "]}]}],n.ctorParameters=function(){return[{type:p.ChangeDetectorRef},{type:e.NzNoAnimationDirective,decorators:[{type:p.Host},{type:p.Optional}]}]},n.propDecorators={nzOkText:[{type:p.Input}],nzOkType:[{type:p.Input}],nzCancelText:[{type:p.Input}],nzCondition:[{type:p.Input}],nzIcon:[{type:p.Input}],nzOnCancel:[{type:p.Output}],nzOnConfirm:[{type:p.Output}]},u([e.InputBoolean(),z("design:type",Object)],n.prototype,"nzCondition",void 0),n}(t.NzToolTipComponent),m=function(c){function n(n,e,t,o,i,r){var a=c.call(this,n,e,t,o,i,r)||this;return a.noAnimation=r,a.factory=a.resolver.resolveComponentFactory(y),a.needProxyProperties=["nzTitle","nzContent","nzOverlayClassName","nzOverlayStyle","nzMouseEnterDelay","nzMouseLeaveDelay","nzVisible","nzTrigger","nzPlacement","nzOkText","nzOkType","nzCancelText","nzCondition","nzIcon"],a.nzOnCancel=new p.EventEmitter,a.nzOnConfirm=new p.EventEmitter,a}return d(n,c),n.prototype.ngOnInit=function(){var e=this;if(!this.tooltip){var n=this.hostView.createComponent(this.factory);this.tooltip=n.instance,this.tooltip.noAnimation=this.noAnimation,this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),n.location.nativeElement),this.isDynamicTooltip=!0,this.needProxyProperties.forEach(function(n){return e.updateCompValue(n,e[n])});var t=this.tooltip.nzVisibleChange.pipe(r.distinctUntilChanged()).subscribe(function(n){e.visible=n,e.nzVisibleChange.emit(n)}),o=this.tooltip.nzOnCancel.subscribe(function(){e.nzOnCancel.emit()}),i=this.tooltip.nzOnConfirm.subscribe(function(){e.nzOnConfirm.emit()});this.subs_.add(t),this.subs_.add(o),this.subs_.add(i)}this.tooltip.setOverlayOrigin(this)},n.decorators=[{type:p.Directive,args:[{selector:"[nz-popconfirm]",exportAs:"nzPopconfirm",host:{"[class.ant-popover-open]":"isTooltipOpen"}}]}],n.ctorParameters=function(){return[{type:p.ElementRef},{type:p.ViewContainerRef},{type:p.ComponentFactoryResolver},{type:p.Renderer2},{type:y,decorators:[{type:p.Optional}]},{type:e.NzNoAnimationDirective,decorators:[{type:p.Host},{type:p.Optional}]}]},n.propDecorators={nzOkText:[{type:p.Input}],nzOkType:[{type:p.Input}],nzCancelText:[{type:p.Input}],nzIcon:[{type:p.Input}],nzCondition:[{type:p.Input}],nzOnCancel:[{type:p.Output}],nzOnConfirm:[{type:p.Output}]},u([e.InputBoolean(),z("design:type",Boolean)],n.prototype,"nzCondition",void 0),n}(t.NzTooltipDirective),f=function(){function n(){}return n.decorators=[{type:p.NgModule,args:[{declarations:[y,m],exports:[y,m],imports:[i.CommonModule,a.NzButtonModule,o.OverlayModule,c.NzI18nModule,l.NzIconModule,e.NzAddOnModule,e.NzOverlayModule,e.NzNoAnimationModule,t.NzToolTipModule],entryComponents:[y]}]}],n}();n.NzPopconfirmComponent=y,n.NzPopconfirmDirective=m,n.NzPopconfirmModule=f,Object.defineProperty(n,"__esModule",{value:!0})});
//# sourceMappingURL=ng-zorro-antd-popconfirm.umd.min.js.map