UNPKG

@lxlib/chart

Version:

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

160 lines (154 loc) 5.11 kB
import { __decorate, __metadata } from 'tslib'; import { Component, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, Renderer2, Input, NgModule } from '@angular/core'; import { updateHostClass, InputNumber, LxlibUtilModule } from '@lxlib/util'; import { CommonModule } from '@angular/common'; import { NzOutletModule } from 'ng-zorro-antd/core/outlet'; import { NzIconModule } from 'ng-zorro-antd/icon'; /** * @fileoverview added by tsickle * Generated from: number-info.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class NumberInfoComponent { /** * @param {?} el * @param {?} renderer */ constructor(el, renderer) { this.el = el; this.renderer = renderer; /** * 状态样式 */ this.theme = 'light'; /** * 设置数字和描述直接的间距(像素) */ this.gap = 8; } /** * @return {?} */ setClass() { const { el, renderer, theme } = this; updateHostClass(el.nativeElement, renderer, { 'number-info': true, [`number-info__${theme}`]: true, }, true); } /** * @return {?} */ ngOnChanges() { this.setClass(); } } NumberInfoComponent.decorators = [ { type: Component, args: [{ selector: 'number-info', exportAs: 'numberInfo', template: "<div *ngIf=\"title\" class=\"number-info__title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{title}}</ng-container>\n</div>\n<div *ngIf=\"subTitle\" class=\"number-info__title-sub\">\n <ng-container *nzStringTemplateOutlet=\"subTitle\">{{subTitle}}</ng-container>\n</div>\n<div class=\"number-info__value\" [ngStyle]=\"{'margin-top.px': gap}\">\n <span class=\"number-info__value-text\">\n <ng-container *nzStringTemplateOutlet=\"total\">{{total}}</ng-container>\n <em class=\"number-info__value-suffix\" *ngIf=\"suffix\">{{suffix}}</em>\n </span>\n <span *ngIf=\"status || subTotal\" class=\"number-info__value-text number-info__value-sub\">\n <ng-container *nzStringTemplateOutlet=\"subTotal\">{{subTotal}}</ng-container>\n <i *ngIf=\"status\" nz-icon nzType=\"caret-{{status}}\"></i>\n </span>\n</div>\n", preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None }] } ]; /** @nocollapse */ NumberInfoComponent.ctorParameters = () => [ { type: ElementRef }, { type: Renderer2 } ]; NumberInfoComponent.propDecorators = { title: [{ type: Input }], subTitle: [{ type: Input }], total: [{ type: Input }], subTotal: [{ type: Input }], suffix: [{ type: Input }], status: [{ type: Input }], theme: [{ type: Input }], gap: [{ type: Input }] }; __decorate([ InputNumber(), __metadata("design:type", Object) ], NumberInfoComponent.prototype, "gap", void 0); if (false) { /** * 标题 * @type {?} */ NumberInfoComponent.prototype.title; /** * 子标题 * @type {?} */ NumberInfoComponent.prototype.subTitle; /** * 总量 * @type {?} */ NumberInfoComponent.prototype.total; /** * 总量后缀 * @type {?} */ NumberInfoComponent.prototype.subTotal; /** * 子总量 * @type {?} */ NumberInfoComponent.prototype.suffix; /** * 增加状态 * @type {?} */ NumberInfoComponent.prototype.status; /** * 状态样式 * @type {?} */ NumberInfoComponent.prototype.theme; /** * 设置数字和描述直接的间距(像素) * @type {?} */ NumberInfoComponent.prototype.gap; /** * @type {?} * @private */ NumberInfoComponent.prototype.el; /** * @type {?} * @private */ NumberInfoComponent.prototype.renderer; } /** * @fileoverview added by tsickle * Generated from: number-info.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ const COMPONENTS = [NumberInfoComponent]; class NumberInfoModule { } NumberInfoModule.decorators = [ { type: NgModule, args: [{ imports: [CommonModule, NzIconModule, LxlibUtilModule, 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: number-info.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ export { NumberInfoComponent, NumberInfoModule }; //# sourceMappingURL=number-info.js.map