ngx-obelisco-example
Version:
Componentes funcionales y reutilizables para Angular.
38 lines • 9.01 kB
JavaScript
import { Component, ContentChild, Input } from '@angular/core';
import { OCustomContentDirective } from 'ngx-obelisco-example/directives';
import * as i0 from "@angular/core";
import * as i1 from "@angular/platform-browser";
import * as i2 from "@angular/common";
import * as i3 from "./o-map-description/o-map-description.component";
import * as i4 from "./o-map-iframe/o-map-iframe.component";
import * as i5 from "./o-map-content/o-map-content.component";
export class OMapComponent {
constructor(sanitizer) {
this.sanitizer = sanitizer;
this.type = 'lateral';
this.customClasses = '';
}
sanitizeUrl(url) {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}
OMapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
OMapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMapComponent, selector: "o-map", inputs: { type: "type", title: "title", description: "description", iframe: "iframe", customClasses: "customClasses" }, queries: [{ propertyName: "oCustomContent", first: true, predicate: OCustomContentDirective, descendants: true, static: true }], ngImport: i0, template: "<div class=\"card card-map\" [ngClass]=\"customClasses\">\r\n <div class=\"card-body\">\r\n <ng-container *ngIf=\"!oCustomContent\">\r\n <ng-container *ngIf=\"title\">\r\n <ng-container *ngIf=\"type == 'lateral'; else institutionalTitle\">\r\n <h2 class=\"card-title\">{{ title }}</h2>\r\n </ng-container>\r\n <ng-template #institutionalTitle>\r\n <h3 class=\"card-title\">{{ title }}</h3>\r\n </ng-template>\r\n </ng-container>\r\n <ng-content select=\"o-map-header\"></ng-content>\r\n\r\n <o-map-description *ngIf=\"description\">{{ description }}</o-map-description>\r\n\r\n <ng-content select=\"o-map-content\"></ng-content>\r\n\r\n <o-map-content *ngIf=\"iframe\">\r\n <o-map-iframe [iframe]=\"iframe\"></o-map-iframe>\r\n </o-map-content>\r\n\r\n <ng-content select=\"o-map-footer\"></ng-content>\r\n\r\n <ng-content></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"oCustomContent\" [ngTemplateOutlet]=\"oCustomContent.template\"> </ng-container>\r\n </div>\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"] }, { kind: "component", type: i3.OMapDescriptionComponent, selector: "o-map-description", inputs: ["customClasses"] }, { kind: "component", type: i4.OMapIframeComponent, selector: "o-map-iframe", inputs: ["iframe", "customClasses"] }, { kind: "component", type: i5.OMapContentComponent, selector: "o-map-content", inputs: ["customClasses"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapComponent, decorators: [{
type: Component,
args: [{ selector: 'o-map', template: "<div class=\"card card-map\" [ngClass]=\"customClasses\">\r\n <div class=\"card-body\">\r\n <ng-container *ngIf=\"!oCustomContent\">\r\n <ng-container *ngIf=\"title\">\r\n <ng-container *ngIf=\"type == 'lateral'; else institutionalTitle\">\r\n <h2 class=\"card-title\">{{ title }}</h2>\r\n </ng-container>\r\n <ng-template #institutionalTitle>\r\n <h3 class=\"card-title\">{{ title }}</h3>\r\n </ng-template>\r\n </ng-container>\r\n <ng-content select=\"o-map-header\"></ng-content>\r\n\r\n <o-map-description *ngIf=\"description\">{{ description }}</o-map-description>\r\n\r\n <ng-content select=\"o-map-content\"></ng-content>\r\n\r\n <o-map-content *ngIf=\"iframe\">\r\n <o-map-iframe [iframe]=\"iframe\"></o-map-iframe>\r\n </o-map-content>\r\n\r\n <ng-content select=\"o-map-footer\"></ng-content>\r\n\r\n <ng-content></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"oCustomContent\" [ngTemplateOutlet]=\"oCustomContent.template\"> </ng-container>\r\n </div>\r\n</div>\r\n" }]
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; }, propDecorators: { type: [{
type: Input
}], title: [{
type: Input
}], description: [{
type: Input
}], iframe: [{
type: Input
}], customClasses: [{
type: Input
}], oCustomContent: [{
type: ContentChild,
args: [OCustomContentDirective, { static: true }]
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiby1tYXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW9iZWxpc2NvL21hcC9vLW1hcC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtb2JlbGlzY28vbWFwL28tbWFwLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUd2RSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQzs7Ozs7OztBQU8xRSxNQUFNLE9BQU8sYUFBYTtJQUN4QixZQUFvQixTQUF1QjtRQUF2QixjQUFTLEdBQVQsU0FBUyxDQUFjO1FBRTNCLFNBQUksR0FBZ0MsU0FBUyxDQUFDO1FBSTlDLGtCQUFhLEdBQVcsRUFBRSxDQUFDO0lBTkcsQ0FBQztJQVUvQyxXQUFXLENBQUMsR0FBVztRQUNyQixPQUFPLElBQUksQ0FBQyxTQUFTLENBQUMsOEJBQThCLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDNUQsQ0FBQzs7MEdBYlUsYUFBYTs4RkFBYixhQUFhLGlOQVNWLHVCQUF1Qiw4RENuQnZDLDJrQ0E0QkE7MkZEbEJhLGFBQ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