UNPKG

ng-zorro-antd-yj

Version:

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

69 lines 5.68 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import { ChangeDetectionStrategy, Component, ElementRef, Input, Renderer2, TemplateRef, ViewEncapsulation } from '@angular/core'; var NzListItemMetaComponent = /** @class */ (function () { function NzListItemMetaComponent(elementRef, renderer) { this.elementRef = elementRef; this.renderer = renderer; this.avatarStr = ''; this.renderer.addClass(elementRef.nativeElement, 'ant-list-item-meta'); } Object.defineProperty(NzListItemMetaComponent.prototype, "nzAvatar", { set: /** * @param {?} value * @return {?} */ function (value) { if (value instanceof TemplateRef) { this.avatarStr = ''; this.avatarTpl = value; } else { this.avatarStr = value; } }, enumerable: true, configurable: true }); NzListItemMetaComponent.decorators = [ { type: Component, args: [{ selector: 'nz-list-item-meta', template: "<div *ngIf=\"avatarStr || avatarTpl\" class=\"ant-list-item-meta-avatar\">\n <ng-container *ngIf=\"avatarStr; else avatarTpl\">\n <nz-avatar [nzSrc]=\"avatarStr\"></nz-avatar>\n </ng-container>\n</div>\n<div *ngIf=\"nzTitle || nzDescription\" class=\"ant-list-item-meta-content\">\n <h4 *ngIf=\"nzTitle\" class=\"ant-list-item-meta-title\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </h4>\n <div *ngIf=\"nzDescription\" class=\"ant-list-item-meta-description\">\n <ng-container *nzStringTemplateOutlet=\"nzDescription\">{{ nzDescription }}</ng-container>\n </div>\n</div>", preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None }] } ]; /** @nocollapse */ NzListItemMetaComponent.ctorParameters = function () { return [ { type: ElementRef }, { type: Renderer2 } ]; }; NzListItemMetaComponent.propDecorators = { nzAvatar: [{ type: Input }], nzTitle: [{ type: Input }], nzDescription: [{ type: Input }] }; return NzListItemMetaComponent; }()); export { NzListItemMetaComponent }; if (false) { /** @type {?} */ NzListItemMetaComponent.prototype.avatarStr; /** @type {?} */ NzListItemMetaComponent.prototype.avatarTpl; /** @type {?} */ NzListItemMetaComponent.prototype.nzTitle; /** @type {?} */ NzListItemMetaComponent.prototype.nzDescription; /** @type {?} */ NzListItemMetaComponent.prototype.elementRef; /** * @type {?} * @private */ NzListItemMetaComponent.prototype.renderer; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnotbGlzdC1pdGVtLW1ldGEuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmctem9ycm8tYW50ZC15ai8iLCJzb3VyY2VzIjpbImxpc3QvbnotbGlzdC1pdGVtLW1ldGEuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsS0FBSyxFQUNMLFNBQVMsRUFDVCxXQUFXLEVBQ1gsaUJBQWlCLEVBQ2xCLE1BQU0sZUFBZSxDQUFDO0FBRXZCO0lBeUJFLGlDQUFtQixVQUFzQixFQUFVLFFBQW1CO1FBQW5ELGVBQVUsR0FBVixVQUFVLENBQVk7UUFBVSxhQUFRLEdBQVIsUUFBUSxDQUFXO1FBakJ0RSxjQUFTLEdBQUcsRUFBRSxDQUFDO1FBa0JiLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLFVBQVUsQ0FBQyxhQUFhLEVBQUUsb0JBQW9CLENBQUMsQ0FBQztJQUN6RSxDQUFDO0lBaEJELHNCQUNJLDZDQUFROzs7OztRQURaLFVBQ2EsS0FBaUM7WUFDNUMsSUFBSSxLQUFLLFlBQVksV0FBVyxFQUFFO2dCQUNoQyxJQUFJLENBQUMsU0FBUyxHQUFHLEVBQUUsQ0FBQztnQkFDcEIsSUFBSSxDQUFDLFNBQVMsR0FBRyxLQUFLLENBQUM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