ng-zorro-antd-yj
Version:
An enterprise-class UI components based on Ant Design and Angular
111 lines • 7.53 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal';
import { ChangeDetectionStrategy, Component, ComponentFactoryResolver, Directive, Input, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';
export class NzCommentAvatarDirective {
}
NzCommentAvatarDirective.decorators = [
{ type: Directive, args: [{
selector: 'nz-avatar[nz-comment-avatar]'
},] }
];
export class NzCommentContentDirective {
}
NzCommentContentDirective.decorators = [
{ type: Directive, args: [{
selector: 'nz-comment-content, [nz-comment-content]',
host: { class: 'ant-comment-content-detail' }
},] }
];
export class NzCommentActionHostDirective extends CdkPortalOutlet {
/**
* @param {?} componentFactoryResolver
* @param {?} viewContainerRef
*/
constructor(componentFactoryResolver, viewContainerRef) {
super(componentFactoryResolver, viewContainerRef);
}
/**
* @return {?}
*/
ngOnInit() {
super.ngOnInit();
this.attach(this.nzCommentActionHost);
}
/**
* @return {?}
*/
ngOnDestroy() {
super.ngOnDestroy();
}
}
NzCommentActionHostDirective.decorators = [
{ type: Directive, args: [{
selector: '[nzCommentActionHost]'
},] }
];
/** @nocollapse */
NzCommentActionHostDirective.ctorParameters = () => [
{ type: ComponentFactoryResolver },
{ type: ViewContainerRef }
];
NzCommentActionHostDirective.propDecorators = {
nzCommentActionHost: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzCommentActionHostDirective.prototype.nzCommentActionHost;
}
export class NzCommentActionComponent {
/**
* @param {?} viewContainerRef
*/
constructor(viewContainerRef) {
this.viewContainerRef = viewContainerRef;
this.contentPortal = null;
}
/**
* @return {?}
*/
get content() {
return this.contentPortal;
}
/**
* @return {?}
*/
ngOnInit() {
this.contentPortal = new TemplatePortal(this.implicitContent, this.viewContainerRef);
}
}
NzCommentActionComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-comment-action',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-template><ng-content></ng-content></ng-template>'
}] }
];
/** @nocollapse */
NzCommentActionComponent.ctorParameters = () => [
{ type: ViewContainerRef }
];
NzCommentActionComponent.propDecorators = {
implicitContent: [{ type: ViewChild, args: [TemplateRef,] }]
};
if (false) {
/** @type {?} */
NzCommentActionComponent.prototype.implicitContent;
/**
* @type {?}
* @private
*/
NzCommentActionComponent.prototype.contentPortal;
/**
* @type {?}
* @private
*/
NzCommentActionComponent.prototype.viewContainerRef;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnotY29tbWVudC1jZWxscy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLXpvcnJvLWFudGQteWovIiwic291cmNlcyI6WyJjb21tZW50L256LWNvbW1lbnQtY2VsbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxlQUFlLEVBQUUsY0FBYyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdEUsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBQ1Qsd0JBQXdCLEVBQ3hCLFNBQVMsRUFDVCxLQUFLLEVBR0wsV0FBVyxFQUNYLFNBQVMsRUFDVCxnQkFBZ0IsRUFDaEIsaUJBQWlCLEVBQ2xCLE1BQU0sZUFBZSxDQUFDO0FBS3ZCLE1BQU0sT0FBTyx3QkFBd0I7OztZQUhwQyxTQUFTLFNBQUM7Z0JBQ1QsUUFBUSxFQUFFLDhCQUE4QjthQUN6Qzs7QUFPRCxNQUFNLE9BQU8seUJBQXlCOzs7WUFKckMsU0FBUyxTQUFDO2dCQUNULFFBQVEsRUFBRSwwQ0FBMEM7Z0JBQ3BELElBQUksRUFBRSxFQUFFLEtBQUssRUFBRSw0QkFBNEIsRUFBRTthQUM5Qzs7QUFNRCxNQUFNL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