UNPKG

@progress/kendo-angular-map

Version:
90 lines (89 loc) 3.66 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ContentChild, Directive, Input, SecurityContext } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { CollectionItemComponent } from '../common/collection-item.component'; import { CollectionService } from '../common/collection.service'; import { ConfigurationService } from '../common/configuration.service'; import { LayerTooltipComponent } from './layer/tooltip.component'; import * as i0 from "@angular/core"; import * as i1 from "../common/configuration.service"; import * as i2 from "../common/collection.service"; import * as i3 from "@angular/platform-browser"; /** * @hidden */ export class LayerComponent extends CollectionItemComponent { type; configurationService; collectionService; sanitizer; /** * @hidden */ attribution; /** * @hidden */ extent; /** * @hidden */ maxZoom; /** * @hidden */ minZoom; /** * @hidden */ opacity; /** * @hidden */ zIndex; layerTooltip; constructor(type, configurationService, collectionService, sanitizer) { super(configurationService, collectionService); this.type = type; this.configurationService = configurationService; this.collectionService = collectionService; this.sanitizer = sanitizer; } ngOnChanges(changes) { const store = this.configurationService.store; store.type = this.type; const attrChange = changes['attribution']; if (attrChange && this.sanitizer) { attrChange.currentValue = this.sanitizer.sanitize(SecurityContext.HTML, attrChange.currentValue); } super.ngOnChanges(changes); } get layerTooltipTemplateRef() { if (this.layerTooltip) { return this.layerTooltip.layerTooltipTemplateRef; } } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayerComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LayerComponent, inputs: { attribution: "attribution", extent: "extent", maxZoom: "maxZoom", minZoom: "minZoom", opacity: "opacity", zIndex: "zIndex" }, queries: [{ propertyName: "layerTooltip", first: true, predicate: LayerTooltipComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayerComponent, decorators: [{ type: Directive }], ctorParameters: function () { return [{ type: undefined }, { type: i1.ConfigurationService }, { type: i2.CollectionService }, { type: i3.DomSanitizer }]; }, propDecorators: { attribution: [{ type: Input }], extent: [{ type: Input }], maxZoom: [{ type: Input }], minZoom: [{ type: Input }], opacity: [{ type: Input }], zIndex: [{ type: Input }], layerTooltip: [{ type: ContentChild, args: [LayerTooltipComponent, { static: false }] }] } });