import Map from 'ol/Map'; import Layer from '../../models/layers/layer'; import Feature from 'ol/Feature'; import Basemap from '../../models/basemap'; import Theme from '../../models/theme'; import BaseLayer from '../../models/layers/baselayer'; import LayerWms from '../../models/layers/layerwms'; import MapPosition from './mapposition'; type GraphicalInterface = { helpVisible: boolean; redliningPanelVisible: boolean; printPanelVisible: boolean; selectionGridVisible: boolean; aboutVisible: boolean; darkMapMode: boolean; darkFrontendMode: boolean; }; export type SelectionParam = { layers: LayerWms[]; selectionBox: number[]; srid: string; }; type Selection = { selectionParameters: SelectionParam[]; selectedFeatures: Feature[]; focusedFeature: Feature | null; }; type LayersConfig = { layersList: BaseLayer[]; swipedLayers: { left: Layer[]; right: Layer[]; }; }; type RedliningConfig = { activeTool: boolean | null; features: object[]; }; type TreeviewConfig = { advanced: boolean; }; type PrintConfig = { format: [number, number] | null; scale: number | null; }; type ServerOgc = { url: string; wfsSupport: boolean; urlWfs: string; }; type GlobeConfig = { display: 'none' | 'full' | 'side'; }; declare class State { /** * This class is a used as the state of the application, which will be accessed behind a javascript proxy. * This means that each modification made to its properties must come from outside, * because they have to be made through the proxy, so that the modification can be listen. * Therefore, this class must not contain any method which is updating a value directly * For example, any method doing is forbidden here, because the modification be known from the proxy */ themes: Record; basemaps: Record; ogcServers: Record; activeBasemap: Basemap | null; projection: string | null; mouseCoordinates: number[]; interface: GraphicalInterface; language: string | null; loading: boolean; position: MapPosition; selectedTheme: Theme | null; layers: LayersConfig; redlining: RedliningConfig; treeview: TreeviewConfig; print: PrintConfig; globe: GlobeConfig; olMap: Map | null; selection: Selection; theme: Theme | null; extendedState: {}; } export default State;