UNPKG

@lxlib/chart

Version:

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

150 lines (144 loc) 5.86 kB
import { __decorate, __metadata, __spread } 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 */ var G2CardComponent = /** @class */ (function () { function G2CardComponent(cdr) { this.cdr = cdr; /** * 是否显示边框 */ this.bordered = false; this.total = ''; this._height = 'auto'; /** * 是否显示Loading */ this.loading = false; } Object.defineProperty(G2CardComponent.prototype, "contentHeight", { set: /** * @param {?} value * @return {?} */ function (value) { this._orgHeight = value; this._height = typeof value === 'number' ? (this._height = value + "px") : value; }, enumerable: true, configurable: true }); /** * @return {?} */ G2CardComponent.prototype.ngOnChanges = /** * @return {?} */ function () { 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 = function () { return [ { 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); return G2CardComponent; }()); 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 {?} */ var COMPONENTS = [G2CardComponent]; var G2CardModule = /** @class */ (function () { function G2CardModule() { } G2CardModule.decorators = [ { type: NgModule, args: [{ imports: [CommonModule, LxlibUtilModule, NzCardModule, NzSpinModule, NzOutletModule], declarations: __spread(COMPONENTS), exports: __spread(COMPONENTS), },] } ]; return G2CardModule; }()); /** * @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