import * as hslayers_ng_types from 'hslayers-ng/types'; import { StatusData, AccessRightsModel, HsGetMapsComposition, UserData, HsEndpoint, LaymanCompositionDescriptor, MapComposition } from 'hslayers-ng/types'; import * as _angular_core from '@angular/core'; import { WritableSignal, Signal, EventEmitter, OnInit, OnDestroy } from '@angular/core'; import { Subject, Observable } from 'rxjs'; import { FormGroup, FormControl, ControlContainer } from '@angular/forms'; import { Layer } from 'ol/layer'; import { Source } from 'ol/source'; import * as i3 from 'hslayers-ng/common/panels'; import { HsPanelBaseComponent } from 'hslayers-ng/common/panels'; import * as i2 from '@angular/common'; import * as i4 from '@ngx-translate/core'; import * as i5 from 'hslayers-ng/common/layman'; declare class HsSaveMapManagerParams { statusData: StatusData; _access_rights: AccessRightsModel; compoData: FormGroup<{ title: FormControl; name: FormControl; abstract: FormControl; workspace: FormControl; keywords: FormControl; id: FormControl; thumbnail: FormControl; access_rights: FormControl; }>; /** * In case user tires to use existing composition name by accident, * we store the composition data here so it can be used to determine proper UI state */ existingComposition: WritableSignal; userData: UserData; panelOpened: Subject; saveMapResulted: Subject; preSaveCheckCompleted: Subject; currentUser: Signal; missingAbstract: boolean; constructor(); } declare class HsSaveMapManagerService extends HsSaveMapManagerParams { private hsMapService; private hsSaveMapService; private http; private hsShareService; private hsLaymanService; private hsLayoutService; private hsEventBusService; private hsLogService; private hsCompositionsParserService; private hsCommonLaymanService; private hsToastService; private mapResets; private _currentComposition; currentComposition: Signal; currentCompositionEditable: WritableSignal; parseAccessRights(metadata: LaymanCompositionDescriptor): string; /** * Transform access rights array received from Layman to simplified version used in HSL * Map access string (read or write) to EVERYONE, private or keep original. */ private privateOrPublic; /** * Update composition data object name */ updateCompoDataName(name: string): void; /** * Save composition to external service database * @param saveAsNew - Save as new composition * @param endpoint - Endpoint's description * @returns Promise result of POST */ save(saveAsNew: boolean, endpoint: HsEndpoint): Promise<{ status: boolean; response?: any; error?: any; reason?: string; }>; /** * Generate composition JSON for downloading * @param compoData - Additional data for composition * @returns composition JSON */ generateCompositionJson(): MapComposition; /** * Initialization of Save map wizard from outside of component * @param composition - Composition selected from the compositions list */ openPanel(composition: any): void; /** * Process user's info into controller model, so they can be used in Save composition forms * @param response - HTTP response containing user data */ setUserDetails(response: any): void; /** * Reset locally stored composition's input data to default values */ resetCompoData(): void; /** * Initiate composition's saving procedure * @param saveAsNew - If true save a new composition, otherwise overwrite to current one */ initiateSave(saveAsNew: boolean): Promise; /** * Process response data after saving the composition and display results using toasts * @param response - HTTP response after saving the composition * @returns The StatusData object reflecting the outcome */ processSaveCallback(response: any): Promise; /** * Check if the current user has write access to the composition */ canEditExistingComposition(compositionName: string): Promise; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare class HsSaveMapFormComponent { hsSaveMapManagerService: HsSaveMapManagerService; private hsLayoutService; download: EventEmitter; private hsCommonLaymanService; private hsCompositionsParserService; local: _angular_core.InputSignal; /** * Check if current user can overwrite the composition data */ canOverwrite: _angular_core.WritableSignal; overwriteNecessary: _angular_core.WritableSignal; isEditable: _angular_core.WritableSignal; currentComposition: _angular_core.Signal; compoWorkspace: _angular_core.Signal; showNameInput: _angular_core.WritableSignal; compoName: _angular_core.Signal; isMyComposition: _angular_core.Signal; compositionWithThisNameExists: _angular_core.Signal; availableActions: _angular_core.Signal; canRename: _angular_core.Signal; contextTooltipText: _angular_core.Signal<{ text: string; iconClass: string; }>; downloadableData: string; extraFormOpened: string; isVisible: Observable; constructor(); /** * Set extra form that will get opened * @param form - Form name that needs to be opened */ setExtraFormTo(form: string): void; /** * Manually set access rights on form as component itself is not compatible with reactive forms */ setAccessRights(data: AccessRightsModel): void; /** * Triggered when composition's abstract input field receives user's input */ abstractChanged(): void; /** * Visual clue for user to rename the composition */ rename(): void; /** * Initiate composition's saving procedure * @param newSave - If true save a new composition, otherwise overwrite to current one */ initiateSave(newSave: boolean): Promise; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type saveMapLayer = { checked: boolean; layer: Layer; title: string; base: boolean; }; declare class AdvancedOptionsComponent implements OnInit, OnDestroy { parentContainer: ControlContainer; private hsMapService; private hsSaveMapService; thumbnail: HTMLImageElement; layers: saveMapLayer[]; btnSelectDeselectClicked: boolean; postCompose: (...args: any[]) => void; get parentFormGroup(): FormGroup; visible: boolean; ngOnInit(): void; ngOnDestroy(): void; /** * Set composition's data bounding box to the current OL map view extent */ setCurrentBoundingBox(): void; onChecklistChange(checked: boolean, layer: saveMapLayer): void; /** * Flatten saveMapLayer type object list into simply OL layer array of selected layers */ private flattenValues; /** * Get layers which might be saved into composition */ fillCompositionLayers(): void; /** * Select or deselect all available composition's layers */ toggleLayers(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class HsSaveMapComponent extends HsPanelBaseComponent implements OnInit { private hsConfig; private hsSaveMapManagerService; private hsCommonLaymanService; private hsCommonEndpointsService; private hsSaveMapService; name: string; isAuthenticated: _angular_core.Signal; localDownload: boolean; ngOnInit(): void; /** * Save map composition as json file */ saveCompoJson(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class HsSaveMapModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { AdvancedOptionsComponent, HsSaveMapComponent, HsSaveMapFormComponent, HsSaveMapManagerParams, HsSaveMapManagerService, HsSaveMapModule }; export type { saveMapLayer };