UNPKG

ngx-obelisco-example

Version:

Componentes funcionales y reutilizables para Angular.

177 lines (166 loc) 16 kB
import * as i0 from '@angular/core'; import { Component, Input, ContentChild, Optional, NgModule } from '@angular/core'; import * as i2 from '@angular/common'; import { CommonModule } from '@angular/common'; import { OCustomContentDirective } from 'ngx-obelisco-example/directives'; import * as i1 from '@angular/platform-browser'; class OMapDescriptionComponent { constructor() { this.customClasses = ''; } } OMapDescriptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); OMapDescriptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMapDescriptionComponent, selector: "o-map-description", inputs: { customClasses: "customClasses" }, ngImport: i0, template: "<p class=\"card-text\" [ngClass]=\"customClasses\"><ng-content></ng-content></p>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapDescriptionComponent, decorators: [{ type: Component, args: [{ selector: 'o-map-description', template: "<p class=\"card-text\" [ngClass]=\"customClasses\"><ng-content></ng-content></p>\r\n" }] }], ctorParameters: function () { return []; }, propDecorators: { customClasses: [{ type: Input }] } }); class OMapIframeComponent { constructor(sanitizer) { this.sanitizer = sanitizer; this.customClasses = ''; } sanitizeUrl(url) { return this.sanitizer.bypassSecurityTrustResourceUrl(url); } } OMapIframeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapIframeComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); OMapIframeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMapIframeComponent, selector: "o-map-iframe", inputs: { iframe: "iframe", customClasses: "customClasses" }, ngImport: i0, template: "<iframe\r\n *ngIf=\"iframe && iframe.src\"\r\n [src]=\"sanitizeUrl(iframe.src)\"\r\n [title]=\"iframe.title || 'Mapa de como llegar'\"\r\n frameborder=\"0\"\r\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\r\n allowfullscreen\r\n loading=\"lazy\"\r\n tabindex=\"-1\"\r\n referrerpolicy=\"no-referrer-when-downgrade\"\r\n style=\"border: 0px\"\r\n [ngClass]=\"customClasses\"\r\n></iframe>\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"] }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapIframeComponent, decorators: [{ type: Component, args: [{ selector: 'o-map-iframe', template: "<iframe\r\n *ngIf=\"iframe && iframe.src\"\r\n [src]=\"sanitizeUrl(iframe.src)\"\r\n [title]=\"iframe.title || 'Mapa de como llegar'\"\r\n frameborder=\"0\"\r\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\r\n allowfullscreen\r\n loading=\"lazy\"\r\n tabindex=\"-1\"\r\n referrerpolicy=\"no-referrer-when-downgrade\"\r\n style=\"border: 0px\"\r\n [ngClass]=\"customClasses\"\r\n></iframe>\r\n" }] }], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; }, propDecorators: { iframe: [{ type: Input }], customClasses: [{ type: Input }] } }); class OMapContentComponent { constructor() { this.customClasses = ''; } } OMapContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); OMapContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMapContentComponent, selector: "o-map-content", inputs: { customClasses: "customClasses" }, ngImport: i0, template: "<div class=\"card-iframe\" [ngClass]=\"customClasses\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapContentComponent, decorators: [{ type: Component, args: [{ selector: 'o-map-content', template: "<div class=\"card-iframe\" [ngClass]=\"customClasses\">\r\n <ng-content></ng-content>\r\n</div>\r\n" }] }], ctorParameters: function () { return []; }, propDecorators: { customClasses: [{ type: Input }] } }); 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: OMapDescriptionComponent, selector: "o-map-description", inputs: ["customClasses"] }, { kind: "component", type: OMapIframeComponent, selector: "o-map-iframe", inputs: ["iframe", "customClasses"] }, { kind: "component", type: 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 }] }] } }); class OMapHeaderComponent { constructor() { } } OMapHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); OMapHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMapHeaderComponent, selector: "o-map-header", ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [""] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapHeaderComponent, decorators: [{ type: Component, args: [{ selector: 'o-map-header', template: "<ng-content></ng-content>\r\n" }] }], ctorParameters: function () { return []; } }); class OMapTitleComponent { constructor(oMap) { this.oMap = oMap; this.customClasses = ''; this.isLateral = true; } ngAfterContentInit() { if (this.oMap) { this.oMap.type == 'lateral' ? (this.isLateral = true) : (this.isLateral = false); } } } OMapTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapTitleComponent, deps: [{ token: OMapComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); OMapTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMapTitleComponent, selector: "o-map-title", inputs: { customClasses: "customClasses" }, ngImport: i0, template: "<ng-template #content><ng-content></ng-content></ng-template>\r\n\r\n<ng-container *ngIf=\"isLateral; else institutionalTitle\">\r\n <h2 class=\"card-title\" [ngClass]=\"customClasses\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </h2>\r\n</ng-container>\r\n<ng-template #institutionalTitle>\r\n <h3 class=\"card-title\" [ngClass]=\"customClasses\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </h3>\r\n</ng-template>\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: OMapTitleComponent, decorators: [{ type: Component, args: [{ selector: 'o-map-title', template: "<ng-template #content><ng-content></ng-content></ng-template>\r\n\r\n<ng-container *ngIf=\"isLateral; else institutionalTitle\">\r\n <h2 class=\"card-title\" [ngClass]=\"customClasses\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </h2>\r\n</ng-container>\r\n<ng-template #institutionalTitle>\r\n <h3 class=\"card-title\" [ngClass]=\"customClasses\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </h3>\r\n</ng-template>\r\n" }] }], ctorParameters: function () { return [{ type: OMapComponent, decorators: [{ type: Optional }] }]; }, propDecorators: { customClasses: [{ type: Input }] } }); class OMapFooterComponent { constructor() { } } OMapFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); OMapFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMapFooterComponent, selector: "o-map-footer", ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [""] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapFooterComponent, decorators: [{ type: Component, args: [{ selector: 'o-map-footer', template: "<ng-content></ng-content>\r\n" }] }], ctorParameters: function () { return []; } }); class OMapModule { } OMapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); OMapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: OMapModule, declarations: [OMapComponent, OMapHeaderComponent, OMapTitleComponent, OMapDescriptionComponent, OMapIframeComponent, OMapFooterComponent, OMapContentComponent], imports: [CommonModule], exports: [OMapComponent, OMapHeaderComponent, OMapTitleComponent, OMapDescriptionComponent, OMapIframeComponent, OMapFooterComponent, OMapContentComponent] }); OMapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapModule, imports: [CommonModule] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMapModule, decorators: [{ type: NgModule, args: [{ declarations: [ OMapComponent, OMapHeaderComponent, OMapTitleComponent, OMapDescriptionComponent, OMapIframeComponent, OMapFooterComponent, OMapContentComponent ], imports: [CommonModule], exports: [ OMapComponent, OMapHeaderComponent, OMapTitleComponent, OMapDescriptionComponent, OMapIframeComponent, OMapFooterComponent, OMapContentComponent ] }] }] }); /** * Generated bundle index. Do not edit. */ export { OMapComponent, OMapContentComponent, OMapDescriptionComponent, OMapFooterComponent, OMapHeaderComponent, OMapIframeComponent, OMapModule, OMapTitleComponent }; //# sourceMappingURL=ngx-obelisco-example-map.mjs.map