UNPKG

@igo2/context

Version:
908 lines (862 loc) 39.7 kB
import * as i0 from '@angular/core'; import { OnInit, ModuleWithProviders, OnDestroy } from '@angular/core'; import { UntypedFormGroup, FormGroup, UntypedFormControl } from '@angular/forms'; import { AnyLayerOptions, MapViewOptions, MapExtent, MapScaleLineOptions, MapAttributionOptions, VectorLayer, AnyLayer, IgoMap, Feature, StyleListService, StyleService, ImportExportServiceOptions, LayerOptions, LayerGroupOptions, AnyDataSourceOptions } from '@igo2/geo'; import { BehaviorSubject, Subject, Observable, ReplaySubject, Subscription } from 'rxjs'; import { Tool } from '@igo2/common/tool'; import { Message, MessageService } from '@igo2/core/message'; import { FeatureCollection } from 'geojson'; import * as _igo2_common_icon from '@igo2/common/icon'; import { KeyValue } from '@angular/common'; import { AuthService, AuthOptions } from '@igo2/auth'; import { ActionStore, ActionbarMode } from '@igo2/common/action'; import { ConfigService } from '@igo2/core/config'; import { MatMenuTrigger } from '@angular/material/menu'; import * as _igo2_context from '@igo2/context'; import { MatDialogRef } from '@angular/material/dialog'; import { Title } from '@angular/platform-browser'; import { FlexibleState } from '@igo2/common/flexible'; import { Media } from '@igo2/core/media'; import { Params } from '@angular/router'; import { RouteServiceOptions, RouteService } from '@igo2/core/route'; declare const TypePermission: readonly ["read", "write"]; type TypePermission = (typeof TypePermission)[number]; declare enum Scope { public = 0, protected = 1, private = 2 } interface Context { id?: number; title?: string; uri?: string; scope?: string; permission?: TypePermission; description?: string; icon?: string; iconImage?: string; hidden?: boolean; imported?: boolean; } interface ContextsList { ours: Context[]; shared?: Context[]; public?: Context[]; } type ExtraFeatures = FeatureCollection & { name: string; opacity: number; visible: boolean; }; interface DetailedContext extends Context { layers?: AnyLayerOptions[]; base?: string; map?: ContextMap; tools?: Tool[]; toolbar?: string[]; message?: Message; messages?: Message[]; removeLayersOnContextChange?: boolean; extraFeatures?: ExtraFeatures[]; } interface ContextDetailedChanges extends Pick<DetailedContext, 'id'> { layers: IProcessChanges<AnyLayerOptions>; } interface IProcessChanges<T> { created: T[]; updated: T[]; deleted: number[]; } interface ContextMapView extends MapViewOptions { keepCurrentView?: boolean; homeExtent?: ContextHomeExtent; } interface ContextHomeExtent { extent?: MapExtent; center?: [number, number]; zoom?: number; } interface ContextMap { view: ContextMapView; controls?: { scaleLine?: boolean | MapScaleLineOptions; attribution?: boolean | MapAttributionOptions; }; } interface ContextServiceOptions { url?: string; basePath?: string; contextListFile?: string; defaultContextUri?: string; } interface ContextProfils { name: string; title: string; childs?: ContextProfils[]; } declare class ContextImportExportComponent implements OnInit { private contextImportService; private contextExportService; private messageService; private formBuilder; private config; private contextService; form: UntypedFormGroup; layers: VectorLayer[]; inputProj: string; loading$: BehaviorSubject<boolean>; forceNaming: boolean; layerList: AnyLayer[]; userControlledLayerList: readonly AnyLayer[]; res: DetailedContext; private clientSideFileSizeMax; fileSizeMb: number; activeImportExport: string; readonly map: i0.InputSignal<IgoMap>; constructor(); ngOnInit(): void; importFiles(files: File[]): void; handleExportFormSubmit(contextOptions: any): void; private buildForm; private onFileImportSuccess; private onFileImportError; private onFileExportError; private onFileExportSuccess; selectAll(e: any): void; onImportExportChange(event: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<ContextImportExportComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ContextImportExportComponent, "igo-context-import-export", never, { "map": { "alias": "map"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } /** * @deprecated import the ContextImportExportComponent directly */ declare class IgoContextImportExportModule { static forRoot(): ModuleWithProviders<IgoContextImportExportModule>; static ɵfac: i0.ɵɵFactoryDeclaration<IgoContextImportExportModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextImportExportModule, never, [typeof ContextImportExportComponent], [typeof ContextImportExportComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextImportExportModule>; } declare class ContextService { private http; private authService; private languageService; private config; private messageService; private storageService; private exportService; private shareMapService; private route; context$: BehaviorSubject<DetailedContext>; contexts$: BehaviorSubject<ContextsList>; defaultContextId$: BehaviorSubject<string | number>; editedContext$: BehaviorSubject<DetailedContext>; importedContext: DetailedContext[]; toolsChanged$: Subject<DetailedContext>; private mapViewFromRoute; private options; private baseUrl; private tools; private toolbar; get defaultContextUri(): string; set defaultContextUri(uri: string); private _defaultContextUri; constructor(); get(permissions?: string[], hidden?: boolean): Observable<ContextsList>; getById(id: string): Observable<Context>; getDetails(id: number): Observable<DetailedContext>; getDetailsByUri(uri: string): Observable<DetailedContext>; getDefault(): Observable<DetailedContext>; getProfilByUser(): Observable<ContextProfils[]>; setDefault(id: string | number): Observable<string | number | undefined>; private setDefaultLocalStorage; hideContext(id: number): Observable<Object>; showContext(id: number): Observable<Object>; delete(id: number, imported?: boolean): Observable<void>; create(context: DetailedContext): Observable<Context>; clone(id: number, properties?: {}): Observable<Context>; update(id: number, context: DetailedContext): Observable<ContextDetailedChanges>; addToolAssociation(contextId: string, toolId: string): Observable<void>; deleteToolAssociation(contextId: string, toolId: string): Observable<unknown>; getLocalContexts(): Observable<ContextsList>; getLocalContext(uri: string): Observable<DetailedContext>; loadContexts(permissions?: string[], hidden?: boolean): void; loadDefaultContext(): void; loadContext(uri: string): void; setContext(context: DetailedContext): void; loadEditedContext(uri: string): void; setEditedContext(context: DetailedContext): void; getContextFromMap(igoMap: IgoMap, empty?: boolean): DetailedContext; getContextFromLayers(igoMap: IgoMap, layers: AnyLayer[], name: string, keepCurrentView?: boolean): DetailedContext; private getExtraFeatures; setTools(tools: Tool[]): void; setToolbar(toolbar: string[]): void; private handleContextMessage; private getContextByUri; getContextLayers(map: IgoMap): readonly AnyLayer[]; private getPath; private handleError; private handleContextsChange; private addContextToList; private findContext; static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>; } declare class LayerContextDirective implements OnInit, OnDestroy { private component; private contextService; private layerService; private configService; private styleListService; private styleService; private shareMapService; private context$$; private queryParams; private contextLayers; readonly removeLayersOnContextChange: i0.InputSignal<boolean>; readonly contextLayersLoaded: i0.OutputEmitterRef<boolean>; get map(): IgoMap; ngOnInit(): void; ngOnDestroy(): void; private handleContextChange; private handleAddLayers; private computeLayerVisibilityFromUrl; private handleContextWithSharedUrl; static ɵfac: i0.ɵɵFactoryDeclaration<LayerContextDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<LayerContextDirective, "[igoLayerContext]", never, { "removeLayersOnContextChange": { "alias": "removeLayersOnContextChange"; "required": false; "isSignal": true; }; }, { "contextLayersLoaded": "contextLayersLoaded"; }, never, never, true, never>; } declare class MapContextDirective implements OnInit, OnDestroy { private contextService; private mediaService; private shareMapService; private component; private context$$; get map(): IgoMap; private queryParams; constructor(); ngOnInit(): void; ngOnDestroy(): void; private handleContextChange; static ɵfac: i0.ɵɵFactoryDeclaration<MapContextDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MapContextDirective, "[igoMapContext]", never, {}, {}, never, never, true, never>; } interface ContextUserPermission { name: string; checked: boolean; indeterminate?: boolean; } interface ContextUserOrProfils extends ContextProfils { id: number; type: 'user' | 'profil'; } type IAnyContextPermission = IContextPermissionProfil | IContextPermissionUser; interface IContextPermissionUser extends IBaseContextPermission { userId: number; profilType: 'user'; userSource: string; user: { id: number; externalId: number; }; } interface IContextPermissionProfil extends IBaseContextPermission { profilId: number; profilType: 'profil'; } interface IBaseContextPermission { id: number; title: string; typePermission: TypePermission | null; contextId: number; } declare enum ContextListControlsEnum { always = "always", never = "never", default = "default" } declare class ContextListComponent implements OnInit, OnDestroy { configService: ConfigService<any>; auth: AuthService<any>; private contextService; private shareMapService; private clipboard; private messageService; private mapService; private confirmDialogService; private dialog; private languageService; private storageService; contextConfigs: ContextServiceOptions; private contextsInitial; contexts$: BehaviorSubject<ContextsList>; change$: ReplaySubject<void>; private change$$; private previousMessageId; sortAlphaOnIcon: _igo2_common_icon.IconSvg; sortAlphaOffIcon: _igo2_common_icon.IconSvg; isDesktop: boolean; get contexts(): ContextsList; set contexts(value: ContextsList); private _contexts; readonly selectedContext: i0.ModelSignal<DetailedContext>; readonly map: i0.InputSignal<IgoMap>; get defaultContextId(): string | number; set defaultContextId(value: string | number); private _defaultContextId; collapsed: { contextScope: any; }[]; readonly select: i0.OutputEmitterRef<DetailedContext>; readonly unselect: i0.OutputEmitterRef<DetailedContext>; readonly edit: i0.OutputEmitterRef<DetailedContext>; readonly delete: i0.OutputEmitterRef<DetailedContext>; readonly save: i0.OutputEmitterRef<DetailedContext>; readonly clone: i0.OutputEmitterRef<DetailedContext>; readonly create: i0.OutputEmitterRef<{ title: string; empty: boolean; }>; readonly hide: i0.OutputEmitterRef<DetailedContext>; readonly show: i0.OutputEmitterRef<DetailedContext>; readonly showHiddenContexts: i0.OutputEmitterRef<boolean>; readonly favorite: i0.OutputEmitterRef<DetailedContext>; readonly managePermissions: i0.OutputEmitterRef<DetailedContext>; readonly manageTools: i0.OutputEmitterRef<DetailedContext>; readonly filterPermissionsChanged: i0.OutputEmitterRef<ContextUserPermission[]>; titleMapping: { ours: string; shared: string; public: string; }; users: ContextProfils[]; permissions: ContextUserPermission[]; actionStore: ActionStore; actionbarMode: ActionbarMode; color: string; showHidden: boolean; /** * Context filter term */ set term(value: string); get term(): string; _term: string; get sortedAlpha(): boolean; set sortedAlpha(value: boolean); private _sortedAlpha; showContextFilter: ContextListControlsEnum; thresholdToFilter: number; get isEmpty(): boolean; private contexts$$; private selectedContext$$; private defaultContextId$$; constructor(); ngOnInit(): void; ngOnDestroy(): void; setSelected(context: DetailedContext): void; sortByKeyPriority: (a: KeyValue<string, DetailedContext[]>, b: KeyValue<string, DetailedContext[]>) => number; private next; private filterContextsList; showFilter(): boolean; sortContextsList(contexts: ContextsList): any; normalize(str: string): string; toggleSort(): void; clearFilter(): void; createContext(empty?: boolean): void; getPermission(user?: any): ContextUserPermission; handleToggleCategory(user: any, parent?: any): void; showContext(context: DetailedContext): void; onSelect(context: DetailedContext): void; isContextSelected(context: DetailedContext): boolean; onShareContext(context: DetailedContext): void; onEdit(context: Context): void; onSave(context: Context): void; private handleContextChanges; onFavorite(context: Context): void; onManageTools(context: Context): void; onManagePermissions(context: Context): void; onDelete(context: Context): void; onClone(context: DetailedContext): void; onCreate(opts: { title: string; empty: boolean; }): void; onFilterPermissionsChanged(): void; onShowHiddenContexts(): void; onHideContext(context: DetailedContext): void; static ɵfac: i0.ɵɵFactoryDeclaration<ContextListComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ContextListComponent, "igo-context-list", never, { "isDesktop": { "alias": "isDesktop"; "required": false; }; "contexts": { "alias": "contexts"; "required": false; }; "selectedContext": { "alias": "selectedContext"; "required": false; "isSignal": true; }; "map": { "alias": "map"; "required": false; "isSignal": true; }; "defaultContextId": { "alias": "defaultContextId"; "required": false; }; "term": { "alias": "term"; "required": false; }; }, { "selectedContext": "selectedContextChange"; "select": "select"; "unselect": "unselect"; "edit": "edit"; "delete": "delete"; "save": "save"; "clone": "clone"; "create": "create"; "hide": "hide"; "show": "show"; "showHiddenContexts": "showHiddenContexts"; "favorite": "favorite"; "managePermissions": "managePermissions"; "manageTools": "manageTools"; "filterPermissionsChanged": "filterPermissionsChanged"; }, never, never, true, never>; } declare class ContextItemComponent { auth: AuthService<any>; private storageService; typePermission: readonly ["read", "write"]; color: string; collapsed: boolean; readonly showFavorite: i0.InputSignal<boolean>; readonly context: i0.InputSignal<DetailedContext>; readonly default: i0.InputSignal<boolean>; readonly selected: i0.InputSignal<boolean>; readonly isDesktop: i0.InputSignal<boolean>; readonly edit: i0.OutputEmitterRef<DetailedContext>; readonly delete: i0.OutputEmitterRef<DetailedContext>; readonly save: i0.OutputEmitterRef<DetailedContext>; readonly clone: i0.OutputEmitterRef<DetailedContext>; readonly hide: i0.OutputEmitterRef<DetailedContext>; readonly show: i0.OutputEmitterRef<DetailedContext>; readonly favorite: i0.OutputEmitterRef<DetailedContext>; readonly managePermissions: i0.OutputEmitterRef<DetailedContext>; readonly manageTools: i0.OutputEmitterRef<DetailedContext>; readonly share: i0.OutputEmitterRef<DetailedContext>; get hidden(): boolean; get canShare(): boolean; get isMenuOpen(): boolean; itemActionsMenuTrigger: i0.Signal<MatMenuTrigger>; favoriteClick(context: DetailedContext): void; static ɵfac: i0.ɵɵFactoryDeclaration<ContextItemComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ContextItemComponent, "igo-context-item", never, { "showFavorite": { "alias": "showFavorite"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "default": { "alias": "default"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "isDesktop": { "alias": "isDesktop"; "required": false; "isSignal": true; }; }, { "edit": "edit"; "delete": "delete"; "save": "save"; "clone": "clone"; "hide": "hide"; "show": "show"; "favorite": "favorite"; "managePermissions": "managePermissions"; "manageTools": "manageTools"; "share": "share"; }, never, never, true, never>; } declare class ContextFormComponent { private clipboard; private formBuilder; private messageService; prefix: string; readonly btnSubmitText: i0.InputSignal<string>; readonly context: i0.InputSignal<Context>; readonly disabled: i0.InputSignal<boolean>; readonly submitForm: i0.OutputEmitterRef<unknown>; readonly clone: i0.OutputEmitterRef<unknown>; readonly delete: i0.OutputEmitterRef<unknown>; readonly form: i0.Signal<FormGroup<any>>; handleFormSubmit(value: any): void; copyTextToClipboard(): void; private buildForm; static ɵfac: i0.ɵɵFactoryDeclaration<ContextFormComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ContextFormComponent, "igo-context-form", never, { "btnSubmitText": { "alias": "btnSubmitText"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "submitForm": "submitForm"; "clone": "clone"; "delete": "delete"; }, never, never, true, never>; } declare class ContextEditComponent { private contextService; private messageService; readonly context: i0.Signal<_igo2_context.DetailedContext>; readonly submitSuccessed: i0.OutputEmitterRef<Context>; onEdit(context: Context): void; static ɵfac: i0.ɵɵFactoryDeclaration<ContextEditComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ContextEditComponent, "igo-context-edit", never, {}, { "submitSuccessed": "submitSuccessed"; }, never, never, true, never>; } declare class ContextPermissionsComponent implements OnInit { private formBuilder; private http; authService: AuthService<any>; private config; private contextService; private contextPermissionService; private messageService; private destroyRef; form: UntypedFormGroup; readonly context: i0.ModelSignal<Context>; readonly permissions: i0.ModelSignal<IAnyContextPermission[]>; readonly permissionsRead: i0.Signal<IAnyContextPermission[]>; readonly permissionsWrite: i0.Signal<IAnyContextPermission[]>; profils: i0.WritableSignal<ContextUserOrProfils[]>; canWrite: i0.Signal<boolean>; private baseUrlProfils; formControl: UntypedFormControl; formValueChanges$$: Subscription; ngOnInit(): void; displayFn(profil?: ContextUserOrProfils): string | undefined; handleFormSubmit(value: IAnyContextPermission): void; private buildForm; onProfilSelected(value: ContextUserOrProfils): void; onRemovePermission(permission: IAnyContextPermission): void; onScopeChanged(context: Context): void; private handleEditedContextChange; private getProfils; static ɵfac: i0.ɵɵFactoryDeclaration<ContextPermissionsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ContextPermissionsComponent, "igo-context-permissions", never, { "context": { "alias": "context"; "required": false; "isSignal": true; }; "permissions": { "alias": "permissions"; "required": false; "isSignal": true; }; }, { "context": "contextChange"; "permissions": "permissionsChange"; }, never, never, true, never>; } /** * @deprecated import the components/directives directly or CONTEXT_MANAGER_DIRECTIVES for the set */ declare class IgoContextManagerModule { static forRoot(): ModuleWithProviders<IgoContextManagerModule>; static ɵfac: i0.ɵɵFactoryDeclaration<IgoContextManagerModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextManagerModule, never, [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof LayerContextDirective, typeof MapContextDirective], [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof LayerContextDirective, typeof MapContextDirective]>; static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextManagerModule>; } declare class BookmarkButtonComponent { private dialog; private contextService; private messageService; get map(): IgoMap; set map(value: IgoMap); private _map; get color(): string; set color(value: string); private _color; createContext(): void; static ɵfac: i0.ɵɵFactoryDeclaration<BookmarkButtonComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BookmarkButtonComponent, "igo-bookmark-button", never, { "map": { "alias": "map"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>; } declare class BookmarkDialogComponent { dialogRef: MatDialogRef<BookmarkDialogComponent, any>; title: string; static ɵfac: i0.ɵɵFactoryDeclaration<BookmarkDialogComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BookmarkDialogComponent, "igo-bookmark-dialog", never, {}, {}, never, never, true, never>; } interface Poi { id?: string; title: string; x: number; y: number; zoom: number; } declare class PoiButtonComponent implements OnInit, OnDestroy { private dialog; private authService; private poiService; private messageService; private languageService; private confirmDialogService; selected: Poi; get map(): IgoMap; set map(value: IgoMap); private _map; get color(): string; set color(value: string); private _color; pois: Poi[]; private authenticate$$; ngOnInit(): void; ngOnDestroy(): void; deletePoi(poi: Poi): void; private getPois; createPoi(): void; zoomOnPoi(id: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<PoiButtonComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<PoiButtonComponent, "igo-poi-button", never, { "map": { "alias": "map"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>; } declare class UserButtonComponent { private dialog; private config; auth: AuthService<any>; get map(): IgoMap; set map(value: IgoMap); private _map; get color(): string; set color(value: string); private _color; expand: boolean; visible: boolean; hasApi: boolean; constructor(); accountClick(): void; logout(): void; infoUser(): void; static ɵfac: i0.ɵɵFactoryDeclaration<UserButtonComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<UserButtonComponent, "igo-user-button", never, { "map": { "alias": "map"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>; } /** * @deprecated import the components/directives directly or CONTEXT_MAP_BUTTON_DIRECTIVES for the set */ declare class IgoContextMapButtonModule { static forRoot(): ModuleWithProviders<IgoContextMapButtonModule>; static ɵfac: i0.ɵɵFactoryDeclaration<IgoContextMapButtonModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextMapButtonModule, never, [typeof BookmarkButtonComponent, typeof BookmarkDialogComponent, typeof PoiButtonComponent, typeof UserButtonComponent], [typeof BookmarkButtonComponent, typeof PoiButtonComponent, typeof UserButtonComponent, typeof BookmarkDialogComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextMapButtonModule>; } declare class ShareMapUrlComponent implements OnInit, OnDestroy { private clipboard; private messageService; private shareMapService; private contextService; private cdRef; private mapState$$; readonly map: i0.InputSignal<IgoMap>; url: string; ngOnInit(): void; ngOnDestroy(): void; generateUrl(): void; copyTextToClipboard(textArea: HTMLTextAreaElement): void; static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapUrlComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ShareMapUrlComponent, "igo-share-map-url", never, { "map": { "alias": "map"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class ShareMapComponent { readonly map: i0.InputSignal<IgoMap>; static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ShareMapComponent, "igo-share-map", never, { "map": { "alias": "map"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare const SHARE_MAP_DIRECTIVES: readonly [typeof ShareMapComponent, typeof ShareMapUrlComponent]; /** * @deprecated import the components/directives directly or SHARE_MAP_DIRECTIVES for the set */ declare class IgoShareMapModule { static forRoot(): ModuleWithProviders<IgoShareMapModule>; static ɵfac: i0.ɵɵFactoryDeclaration<IgoShareMapModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<IgoShareMapModule, never, [typeof ShareMapComponent, typeof ShareMapUrlComponent], [typeof ShareMapComponent, typeof ShareMapUrlComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<IgoShareMapModule>; } declare class SidenavComponent { titleService: Title; private format; get map(): IgoMap; set map(value: IgoMap); private _map; get opened(): boolean; set opened(value: boolean); private _opened; get feature(): Feature; set feature(value: Feature); private _feature; get tool(): Tool; set tool(value: Tool); private _tool; get media(): Media; set media(value: Media); private _media; get title(): string; set title(value: string); private _title; topPanelState: FlexibleState; get featureTitle(): string; constructor(); zoomToFeatureExtent(): void; toggleTopPanel(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SidenavComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SidenavComponent, "igo-sidenav", never, { "map": { "alias": "map"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "feature": { "alias": "feature"; "required": false; }; "tool": { "alias": "tool"; "required": false; }; "media": { "alias": "media"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, {}, never, never, true, never>; } /** * @deprecated import the SidenavComponent directly */ declare class IgoSidenavModule { static forRoot(): ModuleWithProviders<IgoSidenavModule>; static ɵfac: i0.ɵɵFactoryDeclaration<IgoSidenavModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<IgoSidenavModule, never, [typeof SidenavComponent], [typeof SidenavComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<IgoSidenavModule>; } /** * @deprecated import the components/directives directly or SHARE_MAP_DIRECTIVES for the set */ declare class IgoContextModule { static forRoot(): ModuleWithProviders<IgoContextModule>; static ɵfac: i0.ɵɵFactoryDeclaration<IgoContextModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextModule, never, never, [typeof IgoContextImportExportModule, typeof IgoContextManagerModule, typeof IgoContextMapButtonModule, typeof IgoShareMapModule, typeof IgoSidenavModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextModule>; } declare class ExportError extends Error { } declare class ExportInvalidFileError extends ExportError { constructor(); } declare class ExportNothingToExportError extends ExportError { constructor(); } declare class ImportError extends Error { } declare class ImportInvalidFileError extends ImportError { constructor(); } declare class ImportUnreadableFileError extends ImportError { constructor(); } declare class ImportNothingToImportError extends ImportError { constructor(); } declare class ImportSizeError extends ImportError { constructor(); } declare class ImportSRSError extends ImportError { constructor(); } declare class ContextExportService { export(res: DetailedContext): Observable<void>; protected exportAsync(res: DetailedContext): Observable<void>; protected nothingToExport(res: DetailedContext): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<ContextExportService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ContextExportService>; } declare class ContextImportService { private config; static allowedMimeTypes: string[]; static allowedExtensions: string; private clientSideFileSizeMax; constructor(); import(file: File): Observable<DetailedContext>; private getFileImporter; private importAsync; private importFile; private parseContextFromFile; static ɵfac: i0.ɵɵFactoryDeclaration<ContextImportService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ContextImportService>; } interface ContextExportOptions { layer: AnyLayer[]; name: string; } declare function handleFileImportSuccess(file: File, context: DetailedContext, messageService: MessageService, contextService: ContextService): void; declare function handleFileImportError(file: File, error: Error, messageService: MessageService, sizeMb?: number): void; declare function handleInvalidFileImportError(file: File, error: Error, messageService: MessageService): void; declare function handleSizeFileImportError(file: File, error: Error, messageService: MessageService, sizeMb: number): void; declare function handleUnreadbleFileImportError(file: File, error: Error, messageService: MessageService): void; declare function handleNothingToImportError(file: File, messageService: MessageService): void; declare function addContextToContextList(context: DetailedContext, contextTitle: string, contextService: ContextService): void; declare function getFileExtension(file: File): string; declare function computeLayerTitleFromFile(file: File): string; declare function addImportedFeaturesToMap(extraFeatures: ExtraFeatures, map: IgoMap): VectorLayer; declare function addImportedFeaturesStyledToMap(extraFeatures: ExtraFeatures, map: IgoMap, styleListService: StyleListService, styleService: StyleService): VectorLayer; declare function handleFileExportError(error: Error, messageService: MessageService): void; declare function handleFileExportSuccess(messageService: MessageService): void; declare function handleNothingToExportError(messageService: MessageService): void; declare const CONTEXT_MANAGER_DIRECTIVES: readonly [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof MapContextDirective, typeof LayerContextDirective]; declare class PoiDialogComponent { dialogRef: MatDialogRef<PoiDialogComponent, any>; title: string; static ɵfac: i0.ɵɵFactoryDeclaration<PoiDialogComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<PoiDialogComponent, "igo-poi-dialog", never, {}, {}, never, never, true, never>; } declare class PoiService { private http; private config; private baseUrl; constructor(); get(): Observable<Poi[]>; delete(id: string): Observable<void>; create(context: Poi): Observable<Poi>; static ɵfac: i0.ɵɵFactoryDeclaration<PoiService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<PoiService>; } declare class UserDialogComponent { dialogRef: MatDialogRef<UserDialogComponent, any>; private auth; private storageService; user: any; exp: any; constructor(); clearPreferences(): void; static ɵfac: i0.ɵɵFactoryDeclaration<UserDialogComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<UserDialogComponent, "igo-user-dialog", never, {}, {}, never, never, true, never>; } declare const CONTEXT_MAP_BUTTON_DIRECTIVES: readonly [typeof BookmarkButtonComponent, typeof BookmarkDialogComponent, typeof PoiButtonComponent, typeof UserButtonComponent]; interface EnvironmentOptions { auth?: AuthOptions; context?: ContextServiceOptions; favoriteContext4NonAuthenticated?: boolean; importExport?: ImportExportServiceOptions; } declare const ServiceType: readonly ["wms", "wmts", "arcgisrest", "imagearcgisrest", "tilearcgisrest"]; type ServiceType = (typeof ServiceType)[number]; declare enum ServiceTypeEnum { wms = 0, wmts = 1, arcgisrest = 2, imagearcgisrest = 3, tilearcgisrest = 4 } declare const LayerParamsKeys: readonly ["id", "index", "names", "type", "version", "queryString", "visible", "opacity", "zIndex", "parentId"]; type LayerParamsKeys = (typeof LayerParamsKeys)[number]; declare const GroupParamsKeys: readonly ["title", "id", "expanded", "visible", "opacity", "zIndex", "parentId"]; type GroupParamsKeys = (typeof GroupParamsKeys)[number]; declare const PositionParamsKeys: readonly ["center", "zoom", "rotation", "projection"]; type PositionParamsKeys = (typeof PositionParamsKeys)[number]; interface ShareMapKeysDefinitions { urlsKey: string; contextKey: string; languageKey: string; pos: DefinitionKeyParams<PositionParamsKeys>; layers: DefinitionKeyParams<LayerParamsKeys>; groups: DefinitionKeyParams<GroupParamsKeys>; } interface DefinitionKeyParams<T extends string> extends BaseKeyParams { params: DefinitionParams<T>; } type DefinitionParams<T extends string = string> = Record<T, BaseKeyParams | undefined>; interface BaseKeyParams { key: string; parse?: (value: string) => unknown; stringify?: (value: unknown) => string; } interface PositionParams { center?: [number, number]; zoom?: number; rotation?: number; projection?: string; } interface LayerProperties { zIndex: number; visibility: boolean; type: ServiceType; opacity: number; parentId: string; } interface UrlParsedParam { position: PositionParams; layersOptions: LayerOptions[]; context: string; } type LayerParams = BaseLayerParams & { index: number; names?: string; type?: string; }; type GroupParams = BaseLayerParams & Pick<LayerGroupOptions, 'title' | 'id'> & { expanded?: boolean; }; type BaseLayerParams = Pick<LayerOptions, 'visible' | 'opacity' | 'zIndex' | 'parentId' | 'id'>; interface ShareMapRouteKeysOptions extends RouteServiceOptions { context: string; urls: string; position: string; layers: string; groups: string; center: string; zoom: string; projection: string; rotation: string; opacity: string; } declare const SHARE_MAP_KEYS_DEFAULT_OPTIONS: ShareMapRouteKeysOptions; declare class ShareMapService { routeService: RouteService; document: Document; get language(): string; set language(value: string); private _language; options: ShareMapRouteKeysOptions; optionsLegacy: RouteServiceOptions; keysDefinitions: ShareMapKeysDefinitions; private encoder; private parser; constructor(); generateUrl(map: IgoMap, context: DetailedContext): string; parsePosition(params: Params): PositionParams | undefined; parseLayers(params: Params): AnyLayerOptions[] | undefined; sanitizeBaseUrl(baseUrl: string): string; getContext(params: Params): string | undefined; getZoom(params: Params): number | undefined; getUrlWithApi(formValues: any): string; hasPositionParams(params: Params): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ShareMapService>; } declare class ShareMapLegacyParser { private options; constructor(options: RouteServiceOptions); parseUrl(params: Params): LayerOptions[] | undefined; parsePosition(params: Params): PositionParams; private readLayersQueryParamsByType; private getQueryKeyByType; private sanitizeUrl; private getQueryParam; private extractLayersByService; private removeParenthesis; private extractLayersOptions; private computeLayerVisibilityFromUrl; } declare function buildDataSourceOptions(type: ServiceType, url: string, layers: string[], version: string): AnyDataSourceOptions; declare function getFlattenOptions(options: AnyLayerOptions[]): AnyLayerOptions[]; /** * Checks if the provided query parameters contain legacy parameter pairs * (e.g., layers and URLs) that indicate older configuration formats. */ declare function hasLegacyParams(params: Params, optionsLegacy: RouteServiceOptions): boolean; declare function hasModernShareParams(params: Params, keysDefinitions: ShareMapKeysDefinitions): boolean; declare function getParamValue(params: Params, key: string): string | undefined; export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent, ContextPermissionsComponent, ContextService, ExportError, ExportInvalidFileError, ExportNothingToExportError, GroupParamsKeys, IgoContextImportExportModule, IgoContextManagerModule, IgoContextMapButtonModule, IgoContextModule, IgoShareMapModule, IgoSidenavModule, ImportError, ImportInvalidFileError, ImportNothingToImportError, ImportSRSError, ImportSizeError, ImportUnreadableFileError, LayerContextDirective, LayerParamsKeys, MapContextDirective, PoiButtonComponent, PoiDialogComponent, PoiService, SHARE_MAP_DIRECTIVES, SHARE_MAP_KEYS_DEFAULT_OPTIONS, Scope, ServiceType, ServiceTypeEnum, ShareMapComponent, ShareMapLegacyParser, ShareMapService, ShareMapUrlComponent, SidenavComponent, TypePermission, UserButtonComponent, UserDialogComponent, addContextToContextList, addImportedFeaturesStyledToMap, addImportedFeaturesToMap, buildDataSourceOptions, computeLayerTitleFromFile, getFileExtension, getFlattenOptions, getParamValue, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleNothingToExportError, handleNothingToImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hasLegacyParams, hasModernShareParams }; export type { BaseKeyParams, Context, ContextDetailedChanges, ContextExportOptions, ContextHomeExtent, ContextMap, ContextMapView, ContextProfils, ContextServiceOptions, ContextsList, DefinitionKeyParams, DefinitionParams, DetailedContext, EnvironmentOptions, ExtraFeatures, GroupParams, IProcessChanges, LayerParams, LayerProperties, Poi, PositionParams, ShareMapKeysDefinitions, ShareMapRouteKeysOptions, UrlParsedParam };