UNPKG

@lxlib/chart

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.

142 lines (136 loc) 5.3 kB
import { __decorate, __metadata } from 'tslib'; import { Component, ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef, Input, NgModule } from '@angular/core'; import { InputBoolean, LxlibUtilModule } from '@lxlib/util'; import { CommonModule } from '@angular/common'; import { NzCardModule } from 'ng-zorro-antd/card'; import { NzOutletModule } from 'ng-zorro-antd/core/outlet'; import { NzSpinModule } from 'ng-zorro-antd/spin'; /** * @fileoverview added by tsickle * Generated from: card.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class G2CardComponent { /** * @param {?} cdr */ constructor(cdr) { this.cdr = cdr; /** * 是否显示边框 */ this.bordered = false; this.total = ''; this._height = 'auto'; /** * 是否显示Loading */ this.loading = false; } /** * @param {?} value * @return {?} */ set contentHeight(value) { this._orgHeight = value; this._height = typeof value === 'number' ? (this._height = `${value}px`) : value; } /** * @return {?} */ ngOnChanges() { this.cdr.detectChanges(); } } G2CardComponent.decorators = [ { type: Component, args: [{ selector: 'g2-card', exportAs: 'g2Card', template: "<nz-card [nzBodyStyle]=\"{padding: '20px 24px 8px 24px'}\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{avatar}}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{title}}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{action}}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{total}}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{'height':_height}\">\n <div [ngClass]=\"{'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{footer}}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n", host: { '[class.g2-card]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None }] } ]; /** @nocollapse */ G2CardComponent.ctorParameters = () => [ { type: ChangeDetectorRef } ]; G2CardComponent.propDecorators = { bordered: [{ type: Input }], avatar: [{ type: Input }], title: [{ type: Input }], action: [{ type: Input }], total: [{ type: Input }], contentHeight: [{ type: Input }], footer: [{ type: Input }], loading: [{ type: Input }] }; __decorate([ InputBoolean(), __metadata("design:type", Object) ], G2CardComponent.prototype, "bordered", void 0); __decorate([ InputBoolean(), __metadata("design:type", Object) ], G2CardComponent.prototype, "loading", void 0); if (false) { /** * 是否显示边框 * @type {?} */ G2CardComponent.prototype.bordered; /** @type {?} */ G2CardComponent.prototype.avatar; /** @type {?} */ G2CardComponent.prototype.title; /** @type {?} */ G2CardComponent.prototype.action; /** @type {?} */ G2CardComponent.prototype.total; /** @type {?} */ G2CardComponent.prototype._height; /** @type {?} */ G2CardComponent.prototype._orgHeight; /** @type {?} */ G2CardComponent.prototype.footer; /** * 是否显示Loading * @type {?} */ G2CardComponent.prototype.loading; /** * @type {?} * @private */ G2CardComponent.prototype.cdr; } /** * @fileoverview added by tsickle * Generated from: card.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ const COMPONENTS = [G2CardComponent]; class G2CardModule { } G2CardModule.decorators = [ { type: NgModule, args: [{ imports: [CommonModule, LxlibUtilModule, NzCardModule, NzSpinModule, NzOutletModule], declarations: [...COMPONENTS], exports: [...COMPONENTS], },] } ]; /** * @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: card.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ export { G2CardComponent, G2CardModule }; //# sourceMappingURL=card.js.map