UNPKG

ng-zorro-antd

Version:

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

2 lines 4.83 kB
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("ng-zorro-antd/core"),require("@angular/cdk/portal")):"function"==typeof define&&define.amd?define("ng-zorro-antd/comment",["exports","@angular/common","@angular/core","ng-zorro-antd/core","@angular/cdk/portal"],t):t(((n=n||self)["ng-zorro-antd"]=n["ng-zorro-antd"]||{},n["ng-zorro-antd"].comment={}),n.ng.common,n.ng.core,n["ng-zorro-antd"].core,n.ng.cdk.portal)}(this,function(n,t,e,o,r){"use strict";var a=function(n,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(n,t)};function c(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var o,r,a=e.call(n),c=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)c.push(o.value)}catch(n){r={error:n}}finally{try{o&&!o.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}return c}function i(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(c(arguments[t]));return n}var s=function(){function n(){}return n.decorators=[{type:e.Directive,args:[{selector:"nz-avatar[nz-comment-avatar]",exportAs:"nzCommentAvatar"}]}],n}(),m=function(){function n(){}return n.decorators=[{type:e.Directive,args:[{selector:"nz-comment-content, [nz-comment-content]",exportAs:"nzCommentContent",host:{class:"ant-comment-content-detail"}}]}],n}(),l=function(n){function t(t,e){return n.call(this,t,e)||this}return function(n,t){function e(){this.constructor=n}a(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}(t,n),t.prototype.ngOnInit=function(){n.prototype.ngOnInit.call(this)},t.prototype.ngOnDestroy=function(){n.prototype.ngOnDestroy.call(this)},t.prototype.ngAfterViewInit=function(){this.attach(this.nzCommentActionHost)},t.decorators=[{type:e.Directive,args:[{selector:"[nzCommentActionHost]",exportAs:"nzCommentActionHost"}]}],t.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:e.ViewContainerRef}]},t.propDecorators={nzCommentActionHost:[{type:e.Input}]},t}(r.CdkPortalOutlet);var p=function(){function n(n){this.viewContainerRef=n,this.contentPortal=null}return Object.defineProperty(n.prototype,"content",{get:function(){return this.contentPortal},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.contentPortal=new r.TemplatePortal(this.implicitContent,this.viewContainerRef)},n.decorators=[{type:e.Component,args:[{selector:"nz-comment-action",exportAs:"nzCommentAction",encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,template:"<ng-template><ng-content></ng-content></ng-template>"}]}],n.ctorParameters=function(){return[{type:e.ViewContainerRef}]},n.propDecorators={implicitContent:[{type:e.ViewChild,args:[e.TemplateRef,{static:!0}]}]},n}();var u=function(){function n(){}return n.decorators=[{type:e.Component,args:[{selector:"nz-comment",exportAs:"nzComment",template:'<div class="ant-comment-inner">\n <div class="ant-comment-avatar">\n <ng-content select="nz-avatar[nz-comment-avatar]"></ng-content>\n </div>\n <div class="ant-comment-content">\n <div class="ant-comment-content-author">\n <span *ngIf="nzAuthor" class="ant-comment-content-author-name">\n <ng-container *nzStringTemplateOutlet="nzAuthor">{{ nzAuthor }}</ng-container>\n </span>\n <span *ngIf="nzDatetime" class="ant-comment-content-author-time">\n <ng-container *nzStringTemplateOutlet="nzDatetime">{{ nzDatetime }}</ng-container>\n </span>\n </div>\n <ng-content select="nz-comment-content"></ng-content>\n <ul class="ant-comment-actions" *ngIf="actions?.length">\n <li *ngFor="let action of actions">\n <span><ng-template [nzCommentActionHost]="action.content"></ng-template></span>\n </li>\n </ul>\n </div>\n</div>\n<div class="ant-comment-nested">\n <ng-content></ng-content>\n</div>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,host:{class:"ant-comment"},styles:["\n nz-comment {\n display: block;\n }\n\n nz-comment-content {\n display: block;\n }\n "]}]}],n.ctorParameters=function(){return[]},n.propDecorators={nzAuthor:[{type:e.Input}],nzDatetime:[{type:e.Input}],actions:[{type:e.ContentChildren,args:[p]}]},n}();var g=[s,m,p,l],f=function(){function n(){}return n.decorators=[{type:e.NgModule,args:[{imports:[t.CommonModule,o.NzAddOnModule],exports:i([u],g),declarations:i([u],g)}]}],n}();n.NzCommentActionComponent=p,n.NzCommentActionHostDirective=l,n.NzCommentAvatarDirective=s,n.NzCommentComponent=u,n.NzCommentContentDirective=m,n.NzCommentModule=f,Object.defineProperty(n,"__esModule",{value:!0})}); //# sourceMappingURL=ng-zorro-antd-comment.umd.min.js.map