UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

16 lines (14 loc) 8.43 kB
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,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/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"],e):e(((n=n||self)["ng-zorro-antd"]=n["ng-zorro-antd"]||{},n["ng-zorro-antd"].popconfirm={}),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,e,o,t,r,i,a,c,p,l,s,d,z,u,g){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var y=function(n,e){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o])})(n,e)};function m(n,e){function o(){this.constructor=n}y(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function f(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}var v=function(n){function o(o,t,r,i,a){var c=n.call(this,o,t,r,i,a)||this;return c.nzTrigger="click",c.nzOnCancel=new e.EventEmitter,c.nzOnConfirm=new e.EventEmitter,c.componentFactory=c.resolver.resolveComponentFactory(O),c.needProxyProperties=["nzOverlayClassName","nzOverlayStyle","nzMouseEnterDelay","nzMouseLeaveDelay","nzVisible","nzOkText","nzOkType","nzCancelText","nzCondition","nzIcon"],c}return m(o,n),o.prototype.createComponent=function(){var e=this;n.prototype.createComponent.call(this),this.component.nzOnCancel.pipe(c.takeUntil(this.destroy$)).subscribe((function(){e.nzOnCancel.emit()})),this.component.nzOnConfirm.pipe(c.takeUntil(this.destroy$)).subscribe((function(){e.nzOnConfirm.emit()}))},o.decorators=[{type:e.Directive,args:[{selector:"[nz-popconfirm]",exportAs:"nzPopconfirm",host:{"[class.ant-popover-open]":"visible"}}]}],o.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ViewContainerRef},{type:e.ComponentFactoryResolver},{type:e.Renderer2},{type:t.NzNoAnimationDirective,decorators:[{type:e.Host},{type:e.Optional}]}]},o.propDecorators={specificTitle:[{type:e.Input,args:["nzPopconfirmTitle"]}],directiveNameTitle:[{type:e.Input,args:["nz-popconfirm"]}],specificTrigger:[{type:e.Input,args:["nzPopconfirmTrigger"]}],specificPlacement:[{type:e.Input,args:["nzPopconfirmPlacement"]}],specificOrigin:[{type:e.Input,args:["nzPopconfirmOrigin"]}],nzOkText:[{type:e.Input}],nzOkType:[{type:e.Input}],nzCancelText:[{type:e.Input}],nzIcon:[{type:e.Input}],nzCondition:[{type:e.Input}],nzTrigger:[{type:e.Input}],nzOnCancel:[{type:e.Output}],nzOnConfirm:[{type:e.Output}]},function(n,e,o,t){var r,i=arguments.length,a=i<3?e:null===t?t=Object.getOwnPropertyDescriptor(e,o):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,e,o,t);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(a=(i<3?r(a):i>3?r(e,o,a):r(e,o))||a);i>3&&a&&Object.defineProperty(e,o,a)}([r.InputBoolean(),f("design:type",Boolean)],o.prototype,"nzCondition",void 0),o}(i.NzTooltipBaseDirective);var O=function(n){function r(e,o){var t=n.call(this,e,o)||this;return t.noAnimation=o,t.nzCondition=!1,t.nzOkType="primary",t.nzOnCancel=new a.Subject,t.nzOnConfirm=new a.Subject,t._trigger="click",t._prefix="ant-popover-placement",t._hasBackdrop=!0,t}return m(r,n),r.prototype.ngOnDestroy=function(){n.prototype.ngOnDestroy.call(this),this.nzOnCancel.complete(),this.nzOnConfirm.complete()},r.prototype.show=function(){this.nzCondition?this.onConfirm():n.prototype.show.call(this)},r.prototype.onCancel=function(){this.nzOnCancel.next(),n.prototype.hide.call(this)},r.prototype.onConfirm=function(){this.nzOnConfirm.next(),n.prototype.hide.call(this)},r.decorators=[{type:e.Component,args:[{changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,selector:"nz-popconfirm",exportAs:"nzPopconfirmComponent",preserveWhitespaces:!1,animations:[o.zoomBigMotion],template:'\n <ng-template\n #overlay="cdkConnectedOverlay"\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]="origin"\n [cdkConnectedOverlayHasBackdrop]="_hasBackdrop"\n (backdropClick)="hide()"\n (detach)="hide()"\n (positionChange)="onPositionChange($event)"\n [cdkConnectedOverlayPositions]="_positions"\n [cdkConnectedOverlayOpen]="_visible"\n >\n <div\n class="ant-popover"\n [ngClass]="_classMap"\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"></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>\n '}]}],r.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:t.NzNoAnimationDirective,decorators:[{type:e.Host},{type:e.Optional}]}]},r}(i.NzToolTipComponent);var C=function(){function n(){}return n.decorators=[{type:e.NgModule,args:[{declarations:[O,v],exports:[O,v],entryComponents:[O],imports:[l.CommonModule,s.NzButtonModule,p.OverlayModule,u.NzI18nModule,g.NzIconModule,d.NzOutletModule,z.NzOverlayModule,t.NzNoAnimationModule,i.NzToolTipModule]}]}],n}();n.NzPopconfirmComponent=O,n.NzPopconfirmDirective=v,n.NzPopconfirmModule=C,Object.defineProperty(n,"__esModule",{value:!0})})); //# sourceMappingURL=ng-zorro-antd-popconfirm.umd.min.js.map