UNPKG

ngx-obelisco-example

Version:

Componentes funcionales y reutilizables para Angular.

30 lines 6.85 kB
import { Component, ContentChild, Input, Optional } from '@angular/core'; import { OCollapseInputComponent } from '../o-collapse-input/o-collapse-input.component'; import * as i0 from "@angular/core"; import * as i1 from "../o-collapse.component"; import * as i2 from "@angular/common"; export class OCollapseContentComponent { constructor(oCollapse) { this.oCollapse = oCollapse; } ngAfterContentInit() { if (this.oCollapse) { this.identifierContent = this.oCollapse.identifier; this.dataParentContent = this.oCollapse.dataParent; } } } OCollapseContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OCollapseContentComponent, deps: [{ token: i1.OCollapseComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); OCollapseContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OCollapseContentComponent, selector: "o-collapse-content", inputs: { customClasses: "customClasses" }, queries: [{ propertyName: "inputComponent", first: true, predicate: OCollapseInputComponent, descendants: true, static: true }], ngImport: i0, template: "<ng-template #content><ng-content></ng-content></ng-template>\r\n\r\n<div [id]=\"identifierContent\" class=\"collapse\" [attr.data-parent]=\"dataParentContent ? '#' + dataParentContent : null\">\r\n <div class=\"card-body\" [ngClass]=\"customClasses\" *ngIf=\"!inputComponent; else inputContent\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n <ng-template #inputContent>\r\n <form class=\"card-body\" [ngClass]=\"customClasses\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </form>\r\n </ng-template>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OCollapseContentComponent, decorators: [{ type: Component, args: [{ selector: 'o-collapse-content', template: "<ng-template #content><ng-content></ng-content></ng-template>\r\n\r\n<div [id]=\"identifierContent\" class=\"collapse\" [attr.data-parent]=\"dataParentContent ? '#' + dataParentContent : null\">\r\n <div class=\"card-body\" [ngClass]=\"customClasses\" *ngIf=\"!inputComponent; else inputContent\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n <ng-template #inputContent>\r\n <form class=\"card-body\" [ngClass]=\"customClasses\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </form>\r\n </ng-template>\r\n</div>\r\n" }] }], ctorParameters: function () { return [{ type: i1.OCollapseComponent, decorators: [{ type: Optional }] }]; }, propDecorators: { customClasses: [{ type: Input }], inputComponent: [{ type: ContentChild, args: [OCollapseInputComponent, { static: true }] }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiby1jb2xsYXBzZS1jb250ZW50LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1vYmVsaXNjby9jb2xsYXBzZS9vLWNvbGxhcHNlLWNvbnRlbnQvby1jb2xsYXBzZS1jb250ZW50LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1vYmVsaXNjby9jb2xsYXBzZS9vLWNvbGxhcHNlLWNvbnRlbnQvby1jb2xsYXBzZS1jb250ZW50LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBb0IsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNGL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