import * as i0 from '@angular/core'; import { OnDestroy, AfterViewInit, OnInit, ViewRef, NgZone } from '@angular/core'; import { ReplaySubject, BehaviorSubject } from 'rxjs'; import { HsDialogComponent, HsDialogItem } from 'hslayers-ng/common/dialogs'; import { Map, Feature } from 'ol'; import { Geometry } from 'ol/geom'; import { Vector, Layer } from 'ol/layer'; import { Vector as Vector$1, Source } from 'ol/source'; import * as i8 from 'hslayers-ng/common/panels'; import { HsPanelItem, HsPanelComponent } from 'hslayers-ng/common/panels'; import { HsPanelContainerService } from 'hslayers-ng/services/panels'; import { WidgetItem, HsLayerDescriptor } from 'hslayers-ng/types'; import { getFeatures } from 'hslayers-ng/common/extensions'; import { HsMapService } from 'hslayers-ng/services/map'; import { SafeHtml } from '@angular/platform-browser'; import * as i7 from '@angular/common'; import * as i9 from '@angular/forms'; import * as i10 from '@ngx-translate/core'; import * as i11 from 'hslayers-ng/common/download'; declare class HsQueryPopupData { map: Map; hoverPopup: any; featuresUnderMouse: Feature[]; featureLayersUnderMouse: HsFeatureLayer[]; } type HsFeatureLayer = { title: string; features: Feature[]; layer: Vector>; panelObserver: ReplaySubject; }; interface HsQueryPopupServiceModel extends HsQueryPopupData { registerPopup(nativeElement: any): any; fillFeatures(features: Feature[]): any; showPopup(e: any): void; closePopup(): void; serializeFeatureAttributes(feature: Feature): any[]; } declare class HsQueryPopupWidgetContainerService extends HsPanelContainerService { private hsConfig; queryPopupWidgets: WidgetItem[]; cleanup(): void; /** * Initialize query popup widgets * @param widgetNames - Array of widget names * @param panelObserver - (Optional) */ initWidgets(widgetNames: string[], panelObserver?: ReplaySubject): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsQueryPopupComponent implements OnDestroy, HsDialogComponent, AfterViewInit, OnInit { private hsEventBusService; private hsMapService; private elementRef; hsQueryPopupWidgetContainerService: HsQueryPopupWidgetContainerService; private hsConfig; getFeatures: typeof getFeatures; attributesForHover: any[]; dialogItem?: HsDialogItem; viewRef: ViewRef; data: { service: HsQueryPopupServiceModel; }; isVisible$: BehaviorSubject; ngAfterViewInit(): void; ngOnInit(): void; ngOnDestroy(): void; /** * Return popup visibility state */ popupVisible(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsQueryPopupBaseService extends HsQueryPopupData { hsMapService: HsMapService; zone: NgZone; hsQueryPopupWidgetContainerService: HsQueryPopupWidgetContainerService; /** * Fill features for the popup * @param features - Features found on the map under the mouse */ fillFeatures(features: Feature[]): void; /** * Close the popup */ closePopup(): void; /** * Get feature attributes in an array, where each attribute is represented as \{key, value, displayFunction\}. * @param feature - Feature selected * @returns Serialized attributes */ serializeFeatureAttributes(feature: Feature): any[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsQueryPopupService extends HsQueryPopupBaseService implements HsQueryPopupServiceModel { hsMapService: HsMapService; private hsConfig; zone: NgZone; private hsQueryBaseService; hsQueryPopupWidgetContainerService: HsQueryPopupWidgetContainerService; private hsQueryVectorService; constructor(); /** * Register and set hover popup overlay * @param nativeElement - Popup HTML content */ registerPopup(nativeElement: HTMLElement): void; /** * Prepare popup before the display * Get features dependent on mouse position. * For cesium the features will be filled differently. * @param e - Mouse event over the OL map */ preparePopup(e: { map: Map; pixel: number[]; dragging?: any; originalEvent?: any; }): void; /** * Set popups position according to pixel where mouse is * @param e - Event, which triggered this function */ showPopup(e: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsQueryPopupWidgetBaseComponent implements HsPanelComponent { name: string; viewRef: ViewRef; data: any; isVisible$: BehaviorSubject; constructor(); /** * Check if widget is visible * @returns True if the widget is visible, false otherwise */ isVisible(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsFeatureInfoComponent extends HsQueryPopupWidgetBaseComponent implements OnInit { private hsLanguageService; private hsQueryVectorService; private hsDialogContainerService; layerDescriptor: any; attributesForHover: any[]; name: string; data: { layerDescriptor: HsLayerDescriptor; attributesForHover: any[]; service: HsQueryPopupServiceModel; }; ngOnInit(): void; /** * Serialize feature name. Searches for 'title', 'name' and 'label' properties. If the feature is a cluster, a description of the cluster is returned instead. * @param feature - Feature selected * @returns Serialized feature name */ serializeFeatureName(feature: Feature): string; /** * Remove feature * @param feature - Feature selected */ removeFeature(feature: Feature): Promise; /** * Check if feature is a cluster * @param feature - Feature selected * @returns True if the feature is a cluster, false otherwise */ isClustered(feature: Feature): boolean; /** * Check if feature has sub-features * @param feature - Feature selected * @returns True if this cluster has more than 1 sub-feature, false otherwise */ hasMultipleSubFeatures(feature: Feature): boolean; /** * Check if feature is removable * @param feature - Feature selected * @returns True if the feature is removable, false otherwise */ isFeatureRemovable(feature: Feature): boolean; /** * Translate string value to the selected UI language * @param module - Locales json key * @param text - Locales json key value * @returns Translated text */ translateString(module: string, text: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsClearLayerComponent extends HsQueryPopupWidgetBaseComponent implements OnInit { private hsDialogContainerService; private hsLanguageService; data: { layerDescriptor: any; service: HsQueryPopupServiceModel; }; name: string; layerDescriptor: any; ngOnInit(): void; /** * Clear all layer source * @param layer - Layer selected */ clearLayer(layer: any): Promise; /** * Check if layer is editable * @param layer - Layer selected * @returns True if the layer is editable, false otherwise */ isLayerEditable(layer: Layer): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsDynamicTextComponent extends HsQueryPopupWidgetBaseComponent implements OnInit { private sanitizer; layerDescriptor: any; name: string; data: { layerDescriptor: HsLayerDescriptor; }; ngOnInit(): void; /** * Generate dynamic text content using display function * @param feature - Feature selected * @returns Safe HTML */ generateContent(feature: Feature): SafeHtml; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsLayerNameComponent extends HsQueryPopupWidgetBaseComponent implements OnInit { layerDescriptor: any; name: string; data: { layerDescriptor: HsLayerDescriptor; }; constructor(); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsQueryPopupModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { HsClearLayerComponent, HsDynamicTextComponent, HsFeatureInfoComponent, HsLayerNameComponent, HsQueryPopupBaseService, HsQueryPopupComponent, HsQueryPopupData, HsQueryPopupModule, HsQueryPopupService, HsQueryPopupWidgetBaseComponent, HsQueryPopupWidgetContainerService }; export type { HsFeatureLayer, HsQueryPopupServiceModel };