ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
16 lines (14 loc) • 9.73 kB
JavaScript
!function(n,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/cdk/bidi"),require("@angular/core"),require("ng-zorro-antd/core/animation"),require("ng-zorro-antd/core/no-animation"),require("ng-zorro-antd/core/util"),require("ng-zorro-antd/tooltip"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/overlay"),require("@angular/common"),require("ng-zorro-antd/button"),require("ng-zorro-antd/core/outlet"),require("ng-zorro-antd/core/overlay"),require("ng-zorro-antd/i18n"),require("ng-zorro-antd/icon")):"function"==typeof define&&define.amd?define("ng-zorro-antd/popconfirm",["exports","@angular/cdk/bidi","@angular/core","ng-zorro-antd/core/animation","ng-zorro-antd/core/no-animation","ng-zorro-antd/core/util","ng-zorro-antd/tooltip","rxjs","rxjs/operators","@angular/cdk/overlay","@angular/common","ng-zorro-antd/button","ng-zorro-antd/core/outlet","ng-zorro-antd/core/overlay","ng-zorro-antd/i18n","ng-zorro-antd/icon"],o):o(((n="undefined"!=typeof globalThis?globalThis:n||self)["ng-zorro-antd"]=n["ng-zorro-antd"]||{},n["ng-zorro-antd"].popconfirm={}),n.ng.cdk.bidi,n.ng.core,n["ng-zorro-antd"].core.animation,n["ng-zorro-antd"].core["no-animation"],n["ng-zorro-antd"].core.util,n["ng-zorro-antd"].tooltip,n.rxjs,n.rxjs.operators,n.ng.cdk.overlay,n.ng.common,n["ng-zorro-antd"].button,n["ng-zorro-antd"].core.outlet,n["ng-zorro-antd"].core.overlay,n["ng-zorro-antd"].i18n,n["ng-zorro-antd"].icon)}(this,(function(n,o,e,t,r,i,a,c,p,l,s,u,z,d,y,g){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var f=function(n,o){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])})(n,o)};function m(n,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=n}f(n,o),n.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}function v(n,o,e,t){var r,i=arguments.length,a=i<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,e,t);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(a=(i<3?r(a):i>3?r(o,e,a):r(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a}function O(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)}Object.create;Object.create;var C=function(n){function o(o,t,r,i,a){var c=n.call(this,o,t,r,i,a)||this;return c.trigger="click",c.placement="top",c.nzCondition=!1,c.nzPopconfirmShowArrow=!0,c.visibleChange=new e.EventEmitter,c.nzOnCancel=new e.EventEmitter,c.nzOnConfirm=new e.EventEmitter,c.componentFactory=c.resolver.resolveComponentFactory(h),c}return m(o,n),o.prototype.getProxyPropertyMap=function(){var o=this;return Object.assign({nzOkText:["nzOkText",function(){return o.nzOkText}],nzOkType:["nzOkType",function(){return o.nzOkType}],nzCancelText:["nzCancelText",function(){return o.nzCancelText}],nzCondition:["nzCondition",function(){return o.nzCondition}],nzIcon:["nzIcon",function(){return o.nzIcon}],nzPopconfirmShowArrow:["nzPopconfirmShowArrow",function(){return o.nzPopconfirmShowArrow}]},n.prototype.getProxyPropertyMap.call(this))},o.prototype.createComponent=function(){var o=this;n.prototype.createComponent.call(this),this.component.nzOnCancel.pipe(p.takeUntil(this.destroy$)).subscribe((function(){o.nzOnCancel.emit()})),this.component.nzOnConfirm.pipe(p.takeUntil(this.destroy$)).subscribe((function(){o.nzOnConfirm.emit()}))},o}(a.NzTooltipBaseDirective);C.decorators=[{type:e.Directive,args:[{selector:"[nz-popconfirm]",exportAs:"nzPopconfirm",host:{"[class.ant-popover-open]":"visible"}}]}],C.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ViewContainerRef},{type:e.ComponentFactoryResolver},{type:e.Renderer2},{type:r.NzNoAnimationDirective,decorators:[{type:e.Host},{type:e.Optional}]}]},C.propDecorators={title:[{type:e.Input,args:["nzPopconfirmTitle"]}],directiveTitle:[{type:e.Input,args:["nz-popconfirm"]}],trigger:[{type:e.Input,args:["nzPopconfirmTrigger"]}],placement:[{type:e.Input,args:["nzPopconfirmPlacement"]}],origin:[{type:e.Input,args:["nzPopconfirmOrigin"]}],mouseEnterDelay:[{type:e.Input,args:["nzPopconfirmMouseEnterDelay"]}],mouseLeaveDelay:[{type:e.Input,args:["nzPopconfirmMouseLeaveDelay"]}],overlayClassName:[{type:e.Input,args:["nzPopconfirmOverlayClassName"]}],overlayStyle:[{type:e.Input,args:["nzPopconfirmOverlayStyle"]}],visible:[{type:e.Input,args:["nzPopconfirmVisible"]}],nzOkText:[{type:e.Input}],nzOkType:[{type:e.Input}],nzCancelText:[{type:e.Input}],nzIcon:[{type:e.Input}],nzCondition:[{type:e.Input}],nzPopconfirmShowArrow:[{type:e.Input}],visibleChange:[{type:e.Output,args:["nzPopconfirmVisibleChange"]}],nzOnCancel:[{type:e.Output}],nzOnConfirm:[{type:e.Output}]},v([i.InputBoolean(),O("design:type",Boolean)],C.prototype,"nzCondition",void 0),v([i.InputBoolean(),O("design:type",Boolean)],C.prototype,"nzPopconfirmShowArrow",void 0);var h=function(n){function o(o,e,t){var r=n.call(this,o,e,t)||this;return r.noAnimation=t,r.nzCondition=!1,r.nzPopconfirmShowArrow=!0,r.nzOkType="primary",r.nzOnCancel=new c.Subject,r.nzOnConfirm=new c.Subject,r._trigger="click",r._prefix="ant-popover",r}return m(o,n),o.prototype.ngOnDestroy=function(){n.prototype.ngOnDestroy.call(this),this.nzOnCancel.complete(),this.nzOnConfirm.complete()},o.prototype.show=function(){this.nzCondition?this.onConfirm():n.prototype.show.call(this)},o.prototype.onCancel=function(){this.nzOnCancel.next(),n.prototype.hide.call(this)},o.prototype.onConfirm=function(){this.nzOnConfirm.next(),n.prototype.hide.call(this)},o}(a.NzToolTipComponent);h.decorators=[{type:e.Component,args:[{changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,selector:"nz-popconfirm",exportAs:"nzPopconfirmComponent",preserveWhitespaces:!1,animations:[t.zoomBigMotion],template:'\n <ng-template\n #overlay="cdkConnectedOverlay"\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]="origin"\n (overlayOutsideClick)="onClickOutside($event)"\n (detach)="hide()"\n (positionChange)="onPositionChange($event)"\n [cdkConnectedOverlayPositions]="_positions"\n [cdkConnectedOverlayOpen]="_visible"\n [cdkConnectedOverlayPush]="true"\n >\n <div\n class="ant-popover"\n [ngClass]="_classMap"\n [class.ant-popover-rtl]="dir === \'rtl\'"\n [ngStyle]="nzOverlayStyle"\n [@.disabled]="noAnimation?.nzNoAnimation"\n [nzNoAnimation]="noAnimation?.nzNoAnimation"\n [@zoomBigMotion]="\'active\'"\n >\n <div class="ant-popover-content">\n <div class="ant-popover-arrow" *ngIf="nzPopconfirmShowArrow"></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; let icon">\n <i nz-icon [nzType]="icon || \'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>\n '}]}],h.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:o.Directionality,decorators:[{type:e.Optional}]},{type:r.NzNoAnimationDirective,decorators:[{type:e.Host},{type:e.Optional}]}]};var b=function(){};b.decorators=[{type:e.NgModule,args:[{declarations:[h,C],exports:[h,C],entryComponents:[h],imports:[o.BidiModule,s.CommonModule,u.NzButtonModule,l.OverlayModule,y.NzI18nModule,g.NzIconModule,z.NzOutletModule,d.NzOverlayModule,r.NzNoAnimationModule,a.NzToolTipModule]}]}],n.NzPopconfirmComponent=h,n.NzPopconfirmDirective=C,n.NzPopconfirmModule=b,Object.defineProperty(n,"__esModule",{value:!0})}));
//# sourceMappingURL=ng-zorro-antd-popconfirm.umd.min.js.map