import * as i0 from '@angular/core'; import { ViewRef, OnInit } from '@angular/core'; import { Subject, Observable } from 'rxjs'; import { HsEndpoint, HsMapCompositionDescriptor } from 'hslayers-ng/types'; import { HsDialogComponent, HsDialogContainerService } from 'hslayers-ng/common/dialogs'; import { HsCompositionsParserService } from 'hslayers-ng/services/compositions'; import { HsSaveMapManagerService } from 'hslayers-ng/components/save-map'; import { HsShareService } from 'hslayers-ng/components/share'; import * as i11 from 'hslayers-ng/common/layman'; import { HsCommonLaymanService } from 'hslayers-ng/common/layman'; import { EventsKey } from 'ol/events'; import { Feature } from 'ol'; import { Geometry } from 'ol/geom'; import { Vector } from 'ol/layer'; import { Vector as Vector$1 } from 'ol/source'; import { HsCommonEndpointsService } from 'hslayers-ng/services/endpoints'; import { HsEventBusService } from 'hslayers-ng/services/event-bus'; import { HsLayoutService } from 'hslayers-ng/services/layout'; import { HsMapService } from 'hslayers-ng/services/map'; import { HsConfig } from 'hslayers-ng/config'; import * as i8 from 'hslayers-ng/common/panels'; import { HsPanelBaseComponent } from 'hslayers-ng/common/panels'; import * as i6 from '@angular/common'; import * as i7 from '@angular/forms'; import * as i9 from '@ngx-translate/core'; import * as i10 from '@ng-bootstrap/ng-bootstrap'; import * as i12 from 'hslayers-ng/common/pager'; import * as i13 from 'hslayers-ng/components/add-data'; import * as i14 from 'hslayers-ng/common/clipboard-text'; declare class HsCompositionsService { private http; private hsMapService; private hsCompositionsParserService; private hsConfig; private HsShareUrlService; private hsCompositionsMickaService; private hsCompositionsLaymanService; private hsLanguageService; private $log; private hsCommonEndpointsService; private hsCompositionsMapService; private hsEventBusService; private hsToastService; private hsLayerManagerService; private hsProxyService; data: any; compositionToLoad: { url: string; title: string; }; notSavedOrEditedCompositionLoading: Subject<{ url: string; record?: any; }>; compositionNotFoundAtUrl: Subject; shareId: string; constructor(); /** * Load composition list * @param ds - Datasource endpoint * @param params - Provided params for querying list items */ loadCompositions(ds: HsEndpoint, params: any): Observable; /** * Reset composition counters for datasource endpoints */ resetCompositionCounter(): void; /** * Find and return required service reference for each endpoint type * @param endpoint - Datasource endpoint */ managerByType(endpoint: HsEndpoint): any; /** * Delete composition from datasource database * @param composition - Composition selected */ deleteComposition(composition: any): Promise; /** * Share composition to other platforms * @param record - Datasource record selected */ shareComposition(record: HsMapCompositionDescriptor): Promise; /** * Get composition share url */ getShareUrl(): Promise; /** * Get composition information * @param composition - Composition selected */ getCompositionInfo(composition: HsMapCompositionDescriptor): Promise; /** * Get record external link * @param record - Datasource record selected */ getRecordLink(record: HsMapCompositionDescriptor): string; /** * Get 'report-layman' template of composition object (operatesOn property included). * Necessary for CSW serviceType compositions to be parsed */ getLaymanTemplateRecordObject(record: any): Promise; getRecordUrl(record: HsMapCompositionDescriptor): Promise; /** * Load composition from datasource record url * @param record - Datasource record selected */ loadCompositionParser(record: HsMapCompositionDescriptor): Promise; /** * Parse composition by setting all response object layers to base * @param response - Composition data */ parseBaseLayersComposition(response: any): any; /** * Load base layers received as composition */ loadBaseLayersComposition(): void; /** * Load layers received through permalink to map */ parsePermalinkLayers(permalink: string): Promise; /** * Load composition from composition list * @param url - URL * @param overwrite - Overwrite existing map composition with the new one */ loadComposition(url: string, overwrite?: boolean): Promise; /** * Parse and load composition from cookies */ tryParseCompositionFromCookie(): Promise; /** * Parse and load composition from browser URL */ tryParseCompositionFromUrlParam(): Promise; /** * Get composition common id value * @param composition - Composition selected */ commonId(composition: HsMapCompositionDescriptor): string; /** * 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 ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsCompositionsDeleteDialogComponent implements HsDialogComponent { hsDialogContainerService: HsDialogContainerService; hsCompositionsService: HsCompositionsService; viewRef: ViewRef; data: any; close(): void; /** * @param composition - Composition selected for deletion * Delete selected composition from project (including deletion from composition server, useful for user created compositions) */ delete(composition: any): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsCompositionsInfoDialogComponent implements HsDialogComponent { hsDialogContainerService: HsDialogContainerService; hsCompositionsService: HsCompositionsService; viewRef: ViewRef; data: { info: { title: string; abstract: string; metadata?: { [key: string]: any; }; contactAddress?: { [key: string]: any; }; contactPersonPrimary?: { [key: string]: any; }; [key: string]: any; }; }; close(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsCompositionsOverwriteDialogComponent implements HsDialogComponent { hsDialogContainerService: HsDialogContainerService; hsCompositionsService: HsCompositionsService; hsSaveMapManagerService: HsSaveMapManagerService; hsCompositionParserService: HsCompositionsParserService; viewRef: ViewRef; data: any; close(): void; /** * Load new composition without saving old composition */ overwrite(): void; /** * Save currently loaded composition first */ save(): void; /** * Load new composition (with service_parser Load function) and merge it with old composition */ add(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsCompositionsShareDialogComponent implements HsDialogComponent { hsDialogContainerService: HsDialogContainerService; hsShareService: HsShareService; viewRef: ViewRef; data: { url: any; title: any; abstract: any; }; close(): void; shareOnSocial(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsCompositionsLaymanService { private $http; private hsCommonLaymanService; private hsCompositionsParserService; private hsEventBusService; private hsToastService; private hsLanguageService; private hsMapService; /** * Load composition list from the external Layman server * @param endpoint - Layman endpoint selected * @param params - HTTP request query params * @param extentFeatureCreated - Function for creating extent vector feature that will reference all listed composition from the response * @param _bbox - Bounding box */ loadList(endpoint: HsEndpoint, params: any, extentFeatureCreated: any, _bbox: any): Observable; /** * Middleware function before returning compositions list to the rest of the app * @param endpoint - Layman endpoint selected * @param response - HTTP request response */ compositionsReceived(endpoint: HsEndpoint, response: any): void; /** * Delete selected composition from Layman database * @param endpoint - Layman endpoint selected * @param composition - Composition to be deleted */ delete(endpoint: HsEndpoint, composition: HsMapCompositionDescriptor): Promise; /** * Get information about the selected composition * @param composition - Composition selected */ getInfo(composition: HsMapCompositionDescriptor): Promise; /** * Reset Layman composition paging values * @param endpoint - Layman endpoint selected */ resetCompositionCounter(endpoint: HsEndpoint): void; /** * Display warning toast about some error while requesting compositions * @param endpoint - Layman endpoint selected * @param message - Message to be displayed when warning is issued */ displayWarningToast(endpoint: HsEndpoint, message: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsCompositionsMickaService { private $http; private hsMapService; private hsToastService; private hsLanguageService; private hsLog; private hsCompositionsParserService; private hsProxyService; /** * Get Micka compositions query URL * @param endpoint - Micka endpoint selected * @param params - HTTP request query params * @param bbox - Bounding box */ getCompositionsQueryUrl(endpoint: any, params: any, bbox: any): string; /** * Middleware function before returning compositions list to the rest of the app * @param endpoint - Micka endpoint selected * @param response - HTTP request response */ compositionsReceived(endpoint: HsEndpoint, response: any): void; /** * Load composition list from the external Micka server * @param endpoint - Micka endpoint selected * @param params - HTTP request query params * @param extentFeatureCreated - Function for creating extent vector feature that will reference all listed composition from the response * @param bbox - Bounding box */ loadList(endpoint: HsEndpoint, params: any, extentFeatureCreated: any, bbox: any): Observable; /** * Reset Micka composition paging values * @param endpoint - Micka endpoint selected */ resetCompositionCounter(endpoint: any): void; /** * Check if query params are correct and defined * @param endpoint - Micka endpoint selected * @param params - HTTP request query params */ checkForParams(endpoint: HsEndpoint, params: any): any; /** * Get information about the selected composition * @param composition - Composition selected */ getInfo(composition: HsMapCompositionDescriptor): Promise; /** * Get composition URLs * @param compData - Composition data */ getCompositionUrls(compData: any): string | Array; /** * Method is not implemented as it is not desired to delete Micka records from HSLayers application. * The deletion shall be done automatically by Layman or, in rare scenarios, manually via Micka UI. * See https://github.com/hslayers/hslayers-ng/pull/4014 */ delete(e: HsEndpoint, c: HsMapCompositionDescriptor): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsCompositionsListItemComponent { private hsCompositionsService; private hsToastService; private hsDialogContainerService; private hsConfig; private hsLanguageService; private hsCompositionsCatalogueService; hsCommonLaymanService: HsCommonLaymanService; composition: HsMapCompositionDescriptor; selectedCompId: string; /** * Load selected composition * @param composition - Selected composition */ openComposition(composition: HsMapCompositionDescriptor): void; /** * @param record - Composition to show details * Load info about composition through service and display composition info dialog */ detailComposition(record: HsMapCompositionDescriptor): Promise; /** * @param record - Composition to share * Prepare share object on server and display share dialog to share composition */ shareComposition(record: HsMapCompositionDescriptor): Promise; /** * Show permissions dialog window for selected composition. * @param composition - Selected composition */ showPermissions(composition: HsMapCompositionDescriptor): Promise; /** * @param composition - Composition selected for deletion * Display delete dialog of composition */ confirmDelete(composition: HsMapCompositionDescriptor): void; /** * @param composition - Composition selected for deletion */ deleteDialogBootstrap(composition: any): void; /** * @param record - Composition selected for sharing */ shareDialogBootstrap(record: HsMapCompositionDescriptor, url: string): void; /** * Display composition info dialog * @param info - Composition info */ infoDialogBootstrap(info: any): Promise; /** * Get composition common id * @param composition - Composition item */ getCommonId(composition: HsMapCompositionDescriptor): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsCompositionsMapService { private hsMapService; private hsLayoutService; private hsSaveMapService; private hsCommonEndpointsService; extentLayer: Vector>; pointerMoveListener: EventsKey; constructor(); /** * Add debounced pointer move listener */ private addPointerMoveListener; /** * Act on map pointer movement and highlight features under it */ mapPointerMoved(evt: any): void; /** * Highlight composition from map feature referencing it * @param composition - Composition highlighted from map feature reference * @param state - Highlight state */ highlightComposition(composition: HsMapCompositionDescriptor, state: boolean): void; /** * Clear extent layer from all of the features */ clearExtentLayer(): void; /** * Callback function which gets executed when extent feature * is created. It should add the feature to vector layer source * @param extentFeature - OpenLayers Feature */ addExtentFeature(extentFeature: Feature): void; /** * Get feature record and un-highlight the same feature and composition * @param feature - Feature under the pointer * @param selector - Feature selector * @param list - Record list referenced from the feature */ getFeatureRecordAndUnhighlight(feature: any, selector: any, list: any[]): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare const KEYWORDS: any[]; declare const INSPIRETHEMES: any[]; declare const SORTBYVALUES: any[]; declare const TYPES: any[]; declare class HsCompositionsCatalogueService { hsMapService: HsMapService; hsCompositionsService: HsCompositionsService; hsLayoutService: HsLayoutService; hsCommonEndpointsService: HsCommonEndpointsService; hsEventBusService: HsEventBusService; hsDialogContainerService: HsDialogContainerService; hsCommonLaymanService: HsCommonLaymanService; private _zone; compositionEntries: HsMapCompositionDescriptor[]; /** *List of sort by values (currently hard-coded selection),that will be applied in compositions lookup */ sortByValues: any[]; /** * List of composition type values (currently hard-coded selection),that will be applied in compositions lookup */ types: any[]; /** * List of composition theme values (currently hard-coded selection),that will be applied in compositions lookup */ inspireThemes: any[]; data: any; recordsPerPage: number; matchedRecords: number; listStart: number; listNext: number; /** * Store whether filter compositions by current window extent during composition search */ filterByExtent: boolean; filterByOnlyMine: boolean; /** * * Store whether filter compositions by current window extent during composition search */ dataLoading: boolean; loadCompositionsQuery: any; endpoints: HsEndpoint[]; extentChangeSuppressed: boolean; constructor(); /** * Load list of compositions for all endpoints */ loadCompositions(suspendLimitCalculation?: boolean): void; /** * Calculates each endpoint composition request limit, based on the matched compositions ratio * from all endpoint matched compositions */ calculateEndpointLimits(): void; /** * Load list of compositions according to current filter values and pager position * (filter, keywords, current extent, start composition, compositions number per page). Display compositions extent in map */ loadCompositionFromEndpoint(ep: HsEndpoint): Observable; /** * Reset endpoint counters and reload compositions */ loadFilteredCompositions(): void; /** * Creates list of compositions from all endpoints currently available */ createCompositionList(): void; /** * Filters compositions from responseArray with the same id in already loaded compositionEntries array */ filterDuplicates(endpoint: HsEndpoint): HsMapCompositionDescriptor[]; /** * Clears all list counters regarding paging */ clearListCounters(): void; /** * Clears all data saved regarding loaded compositions */ clearLoadedData(): void; /** * Evaluates if array is defined and contains any data * @param arr - Endpoint composition records */ arrayContainsData(arr: any[]): boolean; /** * Load previous list of compositions to display on pager */ getPreviousRecords(): void; /** * Load next list of compositions to display on pager */ getNextRecords(): void; changeRecordsPerPage(): void; /** * Clears all filters set for composition list filtering */ clearFilters(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsCompositionsComponent extends HsPanelBaseComponent implements OnInit { hsConfig: HsConfig; private hsEventBusService; private hsCompositionsService; private hsCompositionsParserService; private hsCompositionsMapService; private hsDialogContainerService; hsCompositionsCatalogueService: HsCompositionsCatalogueService; hsCommonLaymanService: HsCommonLaymanService; private hsCommonEndpointsService; private hsLayerSynchronizerService; keywordsVisible: boolean; themesVisible: boolean; urlToAdd: string; addCompositionUrlVisible: boolean; optionsMenuOpen: i0.WritableSignal; optionsButtonLabel: i0.Signal<"less" | "more">; selectedCompId: string; loadFilteredCompositions: any; name: string; constructor(); ngOnInit(): void; /** * @param composition - Composition to highlight * @param state - Target state of composition ( True - highlighted, False - normal) * Highlight (or dim) composition, toggle visual state of composition extent on map */ highlightComposition(composition: HsMapCompositionDescriptor, state: boolean): void; /** * Load selected composition in map, if current composition was edited display Overwrite dialog */ addCompositionUrl(url: string): void; /** * @param evt - File upload event * Handle composition upload from file list */ handleFileSelect(evt: any): void; /** * Open overwrite dialog * @param title - Dialog title */ loadUnsavedDialogBootstrap(record: any): Promise; /** * Open options menu */ openOptionsMenu(): void; /** * Clear all options menu filters */ clearFilters(): void; /** * Change add composition url button visibility */ changeUrlButtonVisible(): void; /** * Open save map panel */ openSaveMapPanel(): void; /** * Act on composition clicked * @param composition - Composition list item selected */ compositionClicked(composition: HsMapCompositionDescriptor): void; /** * Reload compositions list */ reload(): void; /** * Act on sort value changes for sorting compositions * @param sortBy - Sorting value */ sortByValueChanged(sortBy: any): void; /** * Get save map panel status */ saveMapAvailable(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HsCompositionsModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { HsCompositionsCatalogueService, HsCompositionsComponent, HsCompositionsDeleteDialogComponent, HsCompositionsInfoDialogComponent, HsCompositionsLaymanService, HsCompositionsListItemComponent, HsCompositionsMapService, HsCompositionsMickaService, HsCompositionsModule, HsCompositionsOverwriteDialogComponent, HsCompositionsService, HsCompositionsShareDialogComponent, INSPIRETHEMES, KEYWORDS, SORTBYVALUES, TYPES };