ng-devui
Version:
DevUI components based on Angular
51 lines (46 loc) • 4.64 kB
JavaScript
import * as i0 from '@angular/core';
import { Component, Input, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
class StatusComponent {
constructor() {
this.classMap = {};
}
get type() {
return this._type;
}
set type(value) {
this._type = value;
this.setClassMap();
}
setClassMap() {
this.classMap = 'devui-status-bg-' + this.type;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StatusComponent, selector: "d-status", inputs: { type: "type" }, ngImport: i0, template: "<span class=\"devui-status\" [ngClass]=\"classMap\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{display:block}.devui-status{line-height:20px;height:20px;display:flex;align-items:center}.devui-status:before{display:inline-block;content:\"\";width:10px;height:10px;margin-right:5px;border-radius:100%}.devui-status.devui-status-bg-success:before{background:var(--devui-success, #058358)}.devui-status.devui-status-bg-error:before{background:var(--devui-danger, #e02128)}.devui-status.devui-status-bg-warning:before{background:var(--devui-warning, #fcc800)}.devui-status.devui-status-bg-waiting:before{background:var(--devui-waiting, #9dbdfc)}.devui-status.devui-status-bg-running:before{background:var(--devui-info, #0a59f7)}.devui-status.devui-status-bg-invalid:before{background:var(--devui-dividing-line, #f0f0f0)}.devui-status.devui-status-bg-initial:before{background:var(--devui-initial, #cedefd)}.devui-status.devui-status-bg-skipped:before{background:var(--devui-feedback-overlay-text, #f0f0f0)}.devui-status.devui-status-bg-canceled:before{background:var(--devui-icon-fill-weak, #808080)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StatusComponent, decorators: [{
type: Component,
args: [{ selector: 'd-status', preserveWhitespaces: false, template: "<span class=\"devui-status\" [ngClass]=\"classMap\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{display:block}.devui-status{line-height:20px;height:20px;display:flex;align-items:center}.devui-status:before{display:inline-block;content:\"\";width:10px;height:10px;margin-right:5px;border-radius:100%}.devui-status.devui-status-bg-success:before{background:var(--devui-success, #058358)}.devui-status.devui-status-bg-error:before{background:var(--devui-danger, #e02128)}.devui-status.devui-status-bg-warning:before{background:var(--devui-warning, #fcc800)}.devui-status.devui-status-bg-waiting:before{background:var(--devui-waiting, #9dbdfc)}.devui-status.devui-status-bg-running:before{background:var(--devui-info, #0a59f7)}.devui-status.devui-status-bg-invalid:before{background:var(--devui-dividing-line, #f0f0f0)}.devui-status.devui-status-bg-initial:before{background:var(--devui-initial, #cedefd)}.devui-status.devui-status-bg-skipped:before{background:var(--devui-feedback-overlay-text, #f0f0f0)}.devui-status.devui-status-bg-canceled:before{background:var(--devui-icon-fill-weak, #808080)}\n"] }]
}], propDecorators: { type: [{
type: Input
}] } });
class StatusModule {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StatusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: StatusModule, declarations: [StatusComponent], imports: [CommonModule], exports: [StatusComponent] }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StatusModule, imports: [CommonModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StatusModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule],
exports: [StatusComponent],
declarations: [StatusComponent],
providers: []
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { StatusComponent, StatusModule };
//# sourceMappingURL=ng-devui-status.mjs.map