ngx-obelisco-example
Version:
Componentes funcionales y reutilizables para Angular.
58 lines (53 loc) • 4.44 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 OListStepComponent {
constructor() {
this.steps = [];
this.isStepLight = false;
this.isStepNumber = false;
this.customClasses = '';
}
isTextArray(i) {
return Array.isArray(this.steps[i].description);
}
textArray(i) {
const description = this.steps[i].description;
return Array.isArray(description) ? description : [description];
}
}
OListStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OListStepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
OListStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OListStepComponent, selector: "o-list-step", inputs: { steps: "steps", isStepLight: "isStepLight", isStepNumber: "isStepNumber", size: "size", customClasses: "customClasses" }, ngImport: i0, template: "<ul\r\n class=\"list-steps\"\r\n [class.list-steps-light]=\"isStepLight\"\r\n [class.list-steps-numbers]=\"isStepNumber\"\r\n [class.list-steps-lg]=\"size === 'lg'\"\r\n [class.list-steps-sm]=\"size === 'sm'\"\r\n [ngClass]=\"customClasses\"\r\n>\r\n <li class=\"list-steps-item\" *ngFor=\"let step of steps; let i = index\">\r\n <h3 *ngIf=\"step.title\">{{ step.title }}</h3>\r\n <p class=\"status-text\" *ngIf=\"!isTextArray; else isAarray\" [innerHTML]=\"step.description\"></p>\r\n <ng-template #isAarray>\r\n <p class=\"status-text\" *ngFor=\"let item of textArray(i)\" [innerHTML]=\"item\"></p>\r\n </ng-template>\r\n </li>\r\n</ul>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OListStepComponent, decorators: [{
type: Component,
args: [{ selector: 'o-list-step', template: "<ul\r\n class=\"list-steps\"\r\n [class.list-steps-light]=\"isStepLight\"\r\n [class.list-steps-numbers]=\"isStepNumber\"\r\n [class.list-steps-lg]=\"size === 'lg'\"\r\n [class.list-steps-sm]=\"size === 'sm'\"\r\n [ngClass]=\"customClasses\"\r\n>\r\n <li class=\"list-steps-item\" *ngFor=\"let step of steps; let i = index\">\r\n <h3 *ngIf=\"step.title\">{{ step.title }}</h3>\r\n <p class=\"status-text\" *ngIf=\"!isTextArray; else isAarray\" [innerHTML]=\"step.description\"></p>\r\n <ng-template #isAarray>\r\n <p class=\"status-text\" *ngFor=\"let item of textArray(i)\" [innerHTML]=\"item\"></p>\r\n </ng-template>\r\n </li>\r\n</ul>\r\n" }]
}], propDecorators: { steps: [{
type: Input
}], isStepLight: [{
type: Input
}], isStepNumber: [{
type: Input
}], size: [{
type: Input
}], customClasses: [{
type: Input
}] } });
class OListModule {
}
OListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
OListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: OListModule, declarations: [OListStepComponent], imports: [CommonModule], exports: [OListStepComponent] });
OListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OListModule, imports: [CommonModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OListModule, decorators: [{
type: NgModule,
args: [{
declarations: [OListStepComponent],
imports: [CommonModule],
exports: [OListStepComponent]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { OListModule, OListStepComponent };
//# sourceMappingURL=ngx-obelisco-example-list.mjs.map