UNPKG

ng-zorro-antd

Version:

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

216 lines (209 loc) 8.62 kB
import { __extends, __spread } from 'tslib'; import { CommonModule } from '@angular/common'; import { Directive, ComponentFactoryResolver, ViewContainerRef, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, TemplateRef, ContentChildren, NgModule } from '@angular/core'; import { NzOutletModule } from 'ng-zorro-antd/core/outlet'; import { CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal'; /** * @fileoverview added by tsickle * Generated from: comment-cells.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var NzCommentAvatarDirective = /** @class */ (function () { function NzCommentAvatarDirective() { } NzCommentAvatarDirective.decorators = [ { type: Directive, args: [{ selector: 'nz-avatar[nz-comment-avatar]', exportAs: 'nzCommentAvatar' },] } ]; return NzCommentAvatarDirective; }()); var NzCommentContentDirective = /** @class */ (function () { function NzCommentContentDirective() { } NzCommentContentDirective.decorators = [ { type: Directive, args: [{ selector: 'nz-comment-content, [nz-comment-content]', exportAs: 'nzCommentContent', host: { class: 'ant-comment-content-detail' } },] } ]; return NzCommentContentDirective; }()); var NzCommentActionHostDirective = /** @class */ (function (_super) { __extends(NzCommentActionHostDirective, _super); function NzCommentActionHostDirective(componentFactoryResolver, viewContainerRef) { return _super.call(this, componentFactoryResolver, viewContainerRef) || this; } /** * @return {?} */ NzCommentActionHostDirective.prototype.ngOnInit = /** * @return {?} */ function () { _super.prototype.ngOnInit.call(this); }; /** * @return {?} */ NzCommentActionHostDirective.prototype.ngOnDestroy = /** * @return {?} */ function () { _super.prototype.ngOnDestroy.call(this); }; /** * @return {?} */ NzCommentActionHostDirective.prototype.ngAfterViewInit = /** * @return {?} */ function () { this.attach(this.nzCommentActionHost); }; NzCommentActionHostDirective.decorators = [ { type: Directive, args: [{ selector: '[nzCommentActionHost]', exportAs: 'nzCommentActionHost' },] } ]; /** @nocollapse */ NzCommentActionHostDirective.ctorParameters = function () { return [ { type: ComponentFactoryResolver }, { type: ViewContainerRef } ]; }; NzCommentActionHostDirective.propDecorators = { nzCommentActionHost: [{ type: Input }] }; return NzCommentActionHostDirective; }(CdkPortalOutlet)); if (false) { /** @type {?} */ NzCommentActionHostDirective.prototype.nzCommentActionHost; } var NzCommentActionComponent = /** @class */ (function () { function NzCommentActionComponent(viewContainerRef) { this.viewContainerRef = viewContainerRef; this.contentPortal = null; } Object.defineProperty(NzCommentActionComponent.prototype, "content", { get: /** * @return {?} */ function () { return this.contentPortal; }, enumerable: true, configurable: true }); /** * @return {?} */ NzCommentActionComponent.prototype.ngOnInit = /** * @return {?} */ function () { this.contentPortal = new TemplatePortal(this.implicitContent, this.viewContainerRef); }; NzCommentActionComponent.decorators = [ { type: Component, args: [{ selector: 'nz-comment-action', exportAs: 'nzCommentAction', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: '<ng-template><ng-content></ng-content></ng-template>' }] } ]; /** @nocollapse */ NzCommentActionComponent.ctorParameters = function () { return [ { type: ViewContainerRef } ]; }; NzCommentActionComponent.propDecorators = { implicitContent: [{ type: ViewChild, args: [TemplateRef, { static: true },] }] }; return NzCommentActionComponent; }()); if (false) { /** @type {?} */ NzCommentActionComponent.prototype.implicitContent; /** * @type {?} * @private */ NzCommentActionComponent.prototype.contentPortal; /** * @type {?} * @private */ NzCommentActionComponent.prototype.viewContainerRef; } /** * @fileoverview added by tsickle * Generated from: comment.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var NzCommentComponent = /** @class */ (function () { function NzCommentComponent() { } NzCommentComponent.decorators = [ { type: 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: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'ant-comment' } }] } ]; /** @nocollapse */ NzCommentComponent.ctorParameters = function () { return []; }; NzCommentComponent.propDecorators = { nzAuthor: [{ type: Input }], nzDatetime: [{ type: Input }], actions: [{ type: ContentChildren, args: [NzCommentActionComponent,] }] }; return NzCommentComponent; }()); if (false) { /** @type {?} */ NzCommentComponent.prototype.nzAuthor; /** @type {?} */ NzCommentComponent.prototype.nzDatetime; /** @type {?} */ NzCommentComponent.prototype.actions; } /** * @fileoverview added by tsickle * Generated from: comment.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var NZ_COMMENT_CELLS = [NzCommentAvatarDirective, NzCommentContentDirective, NzCommentActionComponent, NzCommentActionHostDirective]; var NzCommentModule = /** @class */ (function () { function NzCommentModule() { } NzCommentModule.decorators = [ { type: NgModule, args: [{ imports: [CommonModule, NzOutletModule], exports: __spread([NzCommentComponent], NZ_COMMENT_CELLS), declarations: __spread([NzCommentComponent], NZ_COMMENT_CELLS) },] } ]; return NzCommentModule; }()); /** * @fileoverview added by tsickle * Generated from: public-api.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: ng-zorro-antd-comment.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ export { NzCommentActionComponent, NzCommentActionHostDirective, NzCommentAvatarDirective, NzCommentComponent, NzCommentContentDirective, NzCommentModule }; //# sourceMappingURL=ng-zorro-antd-comment.js.map