ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
2 lines • 7.32 kB
JavaScript
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs/operators"),require("@angular/cdk/overlay"),require("@angular/common"),require("@angular/core"),require("ng-zorro-antd/button"),require("ng-zorro-antd/core"),require("ng-zorro-antd/i18n"),require("ng-zorro-antd/icon"),require("ng-zorro-antd/tooltip")):"function"==typeof define&&define.amd?define("ng-zorro-antd/popconfirm",["exports","rxjs/operators","@angular/cdk/overlay","@angular/common","@angular/core","ng-zorro-antd/button","ng-zorro-antd/core","ng-zorro-antd/i18n","ng-zorro-antd/icon","ng-zorro-antd/tooltip"],e):e((n["ng-zorro-antd"]=n["ng-zorro-antd"]||{},n["ng-zorro-antd"].popconfirm={}),n.rxjs.operators,n.ng.cdk.overlay,n.ng.common,n.ng.core,n["ng-zorro-antd"].button,n["ng-zorro-antd"].core,n["ng-zorro-antd"].i18n,n["ng-zorro-antd"].icon,n["ng-zorro-antd"].tooltip)}(this,function(n,r,e,t,c,o,i,a,p,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 z(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 u(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}var y,m=(d(v,y=l.NzToolTipComponent),v.prototype.show=function(){this.nzCondition?this.onConfirm():this.nzVisible=!0},v.prototype.onCancel=function(){this.nzOnCancel.emit(),this.nzVisible=!1},v.prototype.onConfirm=function(){this.nzOnConfirm.emit(),this.nzVisible=!1},v.decorators=[{type:c.Component,args:[{changeDetection:c.ChangeDetectionStrategy.OnPush,encapsulation:c.ViewEncapsulation.None,selector:"nz-popconfirm",exportAs:"nzPopconfirmComponent",preserveWhitespaces:!1,animations:[i.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 "]}]}],v.ctorParameters=function(){return[{type:c.ChangeDetectorRef},{type:i.NzNoAnimationDirective,decorators:[{type:c.Host},{type:c.Optional}]}]},v.propDecorators={nzOkText:[{type:c.Input}],nzOkType:[{type:c.Input}],nzCancelText:[{type:c.Input}],nzCondition:[{type:c.Input}],nzIcon:[{type:c.Input}],nzOnCancel:[{type:c.Output}],nzOnConfirm:[{type:c.Output}]},z([i.InputBoolean(),u("design:type",Object)],v.prototype,"nzCondition",void 0),v);function v(n,e){var t=y.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 c.EventEmitter,t.nzOnConfirm=new c.EventEmitter,t}var f,g=(d(O,f=l.NzTooltipDirective),O.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)},O.decorators=[{type:c.Directive,args:[{selector:"[nz-popconfirm]",exportAs:"nzPopconfirm",host:{"[class.ant-popover-open]":"isTooltipOpen"}}]}],O.ctorParameters=function(){return[{type:c.ElementRef},{type:c.ViewContainerRef},{type:c.ComponentFactoryResolver},{type:c.Renderer2},{type:m,decorators:[{type:c.Optional}]},{type:i.NzNoAnimationDirective,decorators:[{type:c.Host},{type:c.Optional}]}]},O.propDecorators={nzOkText:[{type:c.Input}],nzOkType:[{type:c.Input}],nzCancelText:[{type:c.Input}],nzIcon:[{type:c.Input}],nzCondition:[{type:c.Input}],nzOnCancel:[{type:c.Output}],nzOnConfirm:[{type:c.Output}]},z([i.InputBoolean(),u("design:type",Boolean)],O.prototype,"nzCondition",void 0),O);function O(n,e,t,o,i,r){var a=f.call(this,n,e,t,o,i,r)||this;return a.noAnimation=r,a.factory=a.resolver.resolveComponentFactory(m),a.needProxyProperties=["nzTitle","nzContent","nzOverlayClassName","nzOverlayStyle","nzMouseEnterDelay","nzMouseLeaveDelay","nzVisible","nzTrigger","nzPlacement","nzOkText","nzOkType","nzCancelText","nzCondition","nzIcon"],a.nzOnCancel=new c.EventEmitter,a.nzOnConfirm=new c.EventEmitter,a}var C=(h.decorators=[{type:c.NgModule,args:[{declarations:[m,g],exports:[m,g],imports:[t.CommonModule,o.NzButtonModule,e.OverlayModule,a.NzI18nModule,p.NzIconModule,i.NzAddOnModule,i.NzOverlayModule,i.NzNoAnimationModule,l.NzToolTipModule],entryComponents:[m]}]}],h);function h(){}n.NzPopconfirmComponent=m,n.NzPopconfirmDirective=g,n.NzPopconfirmModule=C,Object.defineProperty(n,"__esModule",{value:!0})});
//# sourceMappingURL=ng-zorro-antd-popconfirm.umd.min.js.map