UNPKG

ng-zorro-antd

Version:

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

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