ngx-obelisco-example
Version:
Componentes funcionales y reutilizables para Angular.
36 lines • 7.63 kB
JavaScript
import { Component, ContentChild, ElementRef, Input } from '@angular/core';
import { OCustomContentDirective } from 'ngx-obelisco-example/directives';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "./o-block-title/o-block-title.component";
import * as i3 from "./o-block-text/o-block-text.component";
export class OBlockComponent {
constructor() {
this.isBgLight = false;
this.isPositionRelative = false;
this.customClasses = '';
}
}
OBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
OBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OBlockComponent, selector: "o-block", inputs: { title: "title", description: "description", isBgLight: "isBgLight", isPositionRelative: "isPositionRelative", customClasses: "customClasses" }, queries: [{ propertyName: "oCustomContent", first: true, predicate: OCustomContentDirective, descendants: true, static: true }, { propertyName: "children", first: true, predicate: ["children"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\r\n class=\"card card-block\"\r\n [ngStyle]=\"isPositionRelative ? null : { top: '48px' }\"\r\n [class.bg-light]=\"isBgLight\"\r\n [class.position-sticky]=\"!isPositionRelative\"\r\n [class]=\"customClasses\"\r\n>\r\n <div class=\"card-body\" *ngIf=\"!oCustomContent\">\r\n <o-block-title *ngIf=\"title\">{{ title }}</o-block-title>\r\n <o-block-text *ngIf=\"description\">{{ description }}</o-block-text>\r\n\r\n <ng-content select=\"o-block-header\"></ng-content>\r\n <ng-content select=\"o-block-text\"></ng-content>\r\n\r\n <ng-container *ngIf=\"children\"><ng-content></ng-content></ng-container>\r\n\r\n <ng-content select=\"o-block-footer\"></ng-content>\r\n </div>\r\n <ng-container *ngIf=\"oCustomContent\" [ngTemplateOutlet]=\"oCustomContent.template\"></ng-container>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.OBlockTitleComponent, selector: "o-block-title", inputs: ["customClasses"] }, { kind: "component", type: i3.OBlockTextComponent, selector: "o-block-text", inputs: ["customClasses"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OBlockComponent, decorators: [{
type: Component,
args: [{ selector: 'o-block', template: "<div\r\n class=\"card card-block\"\r\n [ngStyle]=\"isPositionRelative ? null : { top: '48px' }\"\r\n [class.bg-light]=\"isBgLight\"\r\n [class.position-sticky]=\"!isPositionRelative\"\r\n [class]=\"customClasses\"\r\n>\r\n <div class=\"card-body\" *ngIf=\"!oCustomContent\">\r\n <o-block-title *ngIf=\"title\">{{ title }}</o-block-title>\r\n <o-block-text *ngIf=\"description\">{{ description }}</o-block-text>\r\n\r\n <ng-content select=\"o-block-header\"></ng-content>\r\n <ng-content select=\"o-block-text\"></ng-content>\r\n\r\n <ng-container *ngIf=\"children\"><ng-content></ng-content></ng-container>\r\n\r\n <ng-content select=\"o-block-footer\"></ng-content>\r\n </div>\r\n <ng-container *ngIf=\"oCustomContent\" [ngTemplateOutlet]=\"oCustomContent.template\"></ng-container>\r\n</div>\r\n" }]
}], propDecorators: { title: [{
type: Input
}], description: [{
type: Input
}], isBgLight: [{
type: Input
}], isPositionRelative: [{
type: Input
}], customClasses: [{
type: Input
}], oCustomContent: [{
type: ContentChild,
args: [OCustomContentDirective, { static: true }]
}], children: [{
type: ContentChild,
args: ['children', { read: ElementRef }]
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiby1ibG9jay5jb21wb25lbnQuanMiLCJzb3VyY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