@opengeoweb/core 2.4.1 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/index.esm.js +10542 -10062
  2. package/index.umd.js +3122 -2605
  3. package/lib/components/ComponentsLookUp/componentsLookUp.d.ts +7 -20
  4. package/lib/components/ConfigurableConnectedMap/ConfigurableConnectedMap.d.ts +1 -7
  5. package/lib/components/ConfigurableMapWithSlider/ConfigurableMapWithSliderConnect.d.ts +1 -2
  6. package/lib/components/LayerManager/LayerManager.d.ts +2 -1
  7. package/lib/components/LayerManager/LayerManagerConnect.d.ts +1 -0
  8. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListRow.d.ts +18 -0
  9. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListUtils.d.ts +2 -1
  10. package/lib/components/LayerManager/LayerSelect/LayerSelectUtils.d.ts +4 -0
  11. package/lib/components/{MultiMapView/HarmoniePresets/HarmRefTimePreset.spec.d.ts → LayerManager/LayerSelect/LayerSelectUtils.spec.d.ts} +0 -0
  12. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChip.d.ts +2 -2
  13. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.d.ts +2 -2
  14. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.d.ts +2 -2
  15. package/lib/components/MapView/MapViewLayer.d.ts +3 -0
  16. package/lib/components/MapWarning/MapWarningProperties.d.ts +6 -0
  17. package/lib/components/{TimeSlider/TimeSliderButtons/LoopButton/LoopButton.spec.d.ts → MapWarning/MapWarningProperties.spec.d.ts} +0 -0
  18. package/lib/components/MultiMapView/HarmoniePresets/index.d.ts +0 -1
  19. package/lib/components/MultiMapView/{HarmoniePresets/HarmRefTimePreset.d.ts → ModelRunInterval/ModelRunInterval.d.ts} +4 -2
  20. package/lib/components/{TimeSlider/TimeSliderButtons/LoopButton/LoopButtonConnect.spec.d.ts → MultiMapView/ModelRunInterval/ModelRunInterval.spec.d.ts} +0 -0
  21. package/lib/components/MultiMapView/ModelRunInterval/ModelRunInterval.stories.d.ts +4 -0
  22. package/lib/components/MultiMapView/ModelRunInterval/index.d.ts +1 -0
  23. package/lib/components/MultiMapView/MultiMapView.stories.d.ts +2 -3
  24. package/lib/components/ReactMapView/AdagucMapDraw.d.ts +12 -7
  25. package/lib/components/ReactMapView/AdagucMapDraw.stories.d.ts +4 -0
  26. package/lib/components/ReactMapView/AdagucMapDrawContainer.d.ts +2 -1
  27. package/lib/components/ReactMapView/AdagucMapDrawTools.d.ts +9 -0
  28. package/lib/components/{TooltipSelect/TooltipSelect.spec.d.ts → ReactMapView/AdagucMapDrawTools.spec.d.ts} +0 -0
  29. package/lib/components/TimeSlider/TimeSliderButtons/OptionsMenuButton/OptionsMenuButton.d.ts +0 -1
  30. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtons.d.ts +0 -1
  31. package/lib/components/TimeSlider/TimeSliderUtils.d.ts +1 -2
  32. package/lib/components/WMSLoader/WMSServerList/WMSServerList.d.ts +1 -1
  33. package/lib/index.d.ts +4 -3
  34. package/lib/store/layerSelect/sagas.d.ts +3 -1
  35. package/lib/store/mapStore/layers/actions.d.ts +8 -1
  36. package/lib/store/mapStore/layers/constants.d.ts +1 -0
  37. package/lib/store/mapStore/layers/types.d.ts +11 -3
  38. package/lib/store/mapStore/map/actions.d.ts +17 -8
  39. package/lib/store/mapStore/map/constants.d.ts +3 -0
  40. package/lib/store/mapStore/map/sagas.d.ts +4 -2
  41. package/lib/store/mapStore/map/selectors.d.ts +42 -21
  42. package/lib/store/mapStore/map/types.d.ts +57 -2
  43. package/lib/store/mapStore/map/utils.d.ts +2 -1
  44. package/lib/store/mapStore/service/reducer.d.ts +2 -8
  45. package/lib/store/mapStore/service/selectors.d.ts +6 -8
  46. package/lib/store/mapStore/service/types.d.ts +7 -9
  47. package/lib/store/mapStore/utils/helpers.d.ts +2 -0
  48. package/lib/store/ui/types.d.ts +1 -1
  49. package/lib/utils/defaultConfigurations.d.ts +2 -2
  50. package/lib/utils/defaultTestSettings.d.ts +10 -199
  51. package/lib/utils/jsonPresetFilter.d.ts +23 -7
  52. package/lib/utils/localStorage.d.ts +3 -0
  53. package/lib/utils/localStorage.spec.d.ts +1 -0
  54. package/lib/utils/types.d.ts +3 -42
  55. package/package.json +10 -9
  56. package/lib/components/LayerManager/tooltipContainerStyles.d.ts +0 -2
  57. package/lib/components/TimeSlider/TimeSliderButtons/LoopButton/LoopButton.d.ts +0 -8
  58. package/lib/components/TimeSlider/TimeSliderButtons/LoopButton/LoopButtonConnect.d.ts +0 -10
  59. package/lib/components/TooltipSelect/TooltipSelect.d.ts +0 -14
@@ -1,27 +1,14 @@
1
1
  import React from 'react';
2
- import { Bbox, Layer } from '../../store/mapStore/types';
3
- import { AnimationPayloadType } from '../ConfigurableConnectedMap';
4
- import { InitialHarmRefTimeProps, InitialHarmTempAndPrecipProps } from '../MultiMapView/HarmoniePresets';
5
- interface TSMapPreset {
6
- layers?: Layer[];
7
- activeLayerId?: string;
8
- baseLayer?: Layer;
9
- proj?: {
10
- bbox: Bbox;
11
- srs: string;
12
- };
13
- shouldAutoUpdate?: boolean;
14
- shouldAnimate?: boolean;
15
- animationPayload?: AnimationPayloadType;
16
- displayMapPin?: boolean;
17
- }
2
+ import { MapPreset, MapPresetInitialProps } from '../../store/mapStore/types';
3
+ import { InitialHarmTempAndPrecipProps } from '../MultiMapView/HarmoniePresets';
4
+ import { ModelRunIntervalProps } from '../MultiMapView/ModelRunInterval';
18
5
  interface InitialMultiMapProps {
19
- mapPreset: TSMapPreset[];
6
+ mapPreset: MapPreset[];
20
7
  syncGroupsIds: string[];
21
8
  shouldShowZoomControls?: boolean;
22
9
  }
23
10
  interface InitialMapProps {
24
- mapPreset: TSMapPreset;
11
+ mapPreset: MapPreset;
25
12
  syncGroupsIds: string[];
26
13
  shouldShowZoomControls?: boolean;
27
14
  }
@@ -31,13 +18,13 @@ interface InitialSliderProps {
31
18
  };
32
19
  syncGroupsIds: string[];
33
20
  }
34
- export declare type InitialProps = InitialMultiMapProps | InitialMapProps | InitialSliderProps | InitialHarmTempAndPrecipProps | InitialHarmRefTimeProps;
21
+ export declare type InitialProps = InitialMapProps | InitialMultiMapProps | InitialSliderProps | InitialHarmTempAndPrecipProps | ModelRunIntervalProps | MapPresetInitialProps;
35
22
  /**
36
23
  * The lookup table is for registering your own components with the screenmanager.
37
24
  * @param payload
38
25
  * @returns
39
26
  */
40
- export declare type SupportedComponentTypes = 'ConfigurableMap' | 'ConfigurableMapWithSlider' | 'HarmRefTimePreset' | 'HarmonieTempAndPrecipPreset' | 'ConfigurableMultiMapWithSlider' | 'TimeSlider';
27
+ export declare type SupportedComponentTypes = 'Map' | 'ConfigurableMap' | 'ConfigurableMapWithSlider' | 'ModelRunInterval' | 'HarmonieTempAndPrecipPreset' | 'ConfigurableMultiMapWithSlider' | 'TimeSlider';
41
28
  export interface ComponentsLookUpPayload {
42
29
  componentType: SupportedComponentTypes;
43
30
  id: string;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { Bbox, Layer } from '../../store/mapStore/types';
3
- import { SpeedFactorType } from '../TimeSlider/TimeSliderUtils';
2
+ import { AnimationPayloadType, Bbox, Layer } from '../../store/mapStore/types';
4
3
  export declare const defaultBbox: {
5
4
  srs: string;
6
5
  bbox: {
@@ -10,11 +9,6 @@ export declare const defaultBbox: {
10
9
  top: number;
11
10
  };
12
11
  };
13
- export interface AnimationPayloadType {
14
- duration?: number;
15
- interval?: number;
16
- speed?: SpeedFactorType;
17
- }
18
12
  export interface ConfigurableConnectedMapProps {
19
13
  title?: string;
20
14
  id?: string;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { Bbox, Layer } from '../../store/mapStore/types';
3
- import { AnimationPayloadType } from '../ConfigurableConnectedMap';
2
+ import { AnimationPayloadType, Bbox, Layer } from '../../store/mapStore/types';
4
3
  export interface ConfigurableMapWithSliderConnectProps {
5
4
  id?: string;
6
5
  activeLayerId?: string;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Layer } from '../../store/mapStore/types';
3
- import { Service } from '../WMSLoader/services';
4
3
  import { Source } from '../../store/ui/types';
4
+ import { Service } from '../WMSLoader/services';
5
5
  interface LayerManagerProps {
6
6
  mapId: string;
7
7
  preloadedAvailableBaseLayers?: Layer[];
@@ -16,6 +16,7 @@ interface LayerManagerProps {
16
16
  source?: Source;
17
17
  layerSelect?: boolean;
18
18
  showAddLayersTooltip?: boolean;
19
+ leftComponent?: React.ReactNode;
19
20
  }
20
21
  declare const LayerManager: React.FC<LayerManagerProps>;
21
22
  export default LayerManager;
@@ -8,6 +8,7 @@ interface LayerManagerConnectProps {
8
8
  bounds?: string;
9
9
  showTitle?: boolean;
10
10
  layerSelect?: boolean;
11
+ leftComponent?: React.ReactNode;
11
12
  }
12
13
  /**
13
14
  * Layer Managerconnected to the store displaying the layers forthe active map Id
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { ReduxLayer, ServiceLayer } from '../../../../store/mapStore/types';
3
+ interface LayerListRowProps {
4
+ layer: ServiceLayer;
5
+ layerIndex: number;
6
+ serviceId: string;
7
+ addLayer: ({ serviceURL, layerName }: {
8
+ serviceURL: any;
9
+ layerName: any;
10
+ }) => void;
11
+ deleteLayer: ({ layerId, layerIndex }: {
12
+ layerId: any;
13
+ layerIndex: any;
14
+ }) => void;
15
+ mapLayers: ReduxLayer[];
16
+ }
17
+ declare const LayerListRow: React.FC<LayerListRowProps>;
18
+ export default LayerListRow;
@@ -1,2 +1,3 @@
1
- import { ServiceLayer, Services } from '../../../../store/mapStore/service/types';
1
+ import { ReduxService, ServiceLayer, Services } from '../../../../store/mapStore/service/types';
2
+ export declare const getMapStoreServiceFromLayerSelectServiceId: (services: Services, serviceId: string) => ReduxService;
2
3
  export declare const filterLayersFromService: (serviceId: string, services: Services, keywordIds: string[], allKeywordsActive: boolean, searchString: string) => ServiceLayer[];
@@ -0,0 +1,4 @@
1
+ import { UserAddedServices } from '../../../utils/types';
2
+ import { Service } from '../../WMSLoader/services';
3
+ export declare const mergePresetsAndUserAddedServices: (presets: Service[], userAddedServices: UserAddedServices) => Service[];
4
+ export declare const isService: (param: unknown) => param is Service;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { Service } from '../../../../store/mapStore/types';
2
+ import { ReduxService } from '../../../../store/mapStore/types';
3
3
  interface ServiceChipProps {
4
4
  all?: boolean;
5
- service?: Service;
5
+ service?: ReduxService;
6
6
  isEnabled?: boolean;
7
7
  toggleChip?: (service: string) => void;
8
8
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { Service } from '../../../../store/mapStore/types';
2
+ import { ReduxService } from '../../../../store/mapStore/types';
3
3
  interface ServiceChipConnectProps {
4
4
  all?: boolean;
5
- service?: Service;
5
+ service?: ReduxService;
6
6
  isEnabled?: boolean;
7
7
  }
8
8
  declare const ServiceChipConnect: React.FC<ServiceChipConnectProps>;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { Service } from '../../../../store/mapStore/types';
2
+ import { Services } from '../../../../store/mapStore/types';
3
3
  import { ActiveServiceObject } from '../../../../store/layerSelect/types';
4
4
  interface ServiceListProps {
5
5
  layerSelectWidth?: number;
6
- services: Service[];
6
+ services: Services;
7
7
  activeServices: ActiveServiceObject;
8
8
  }
9
9
  declare const ServiceList: React.FC<ServiceListProps>;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { FeatureEvent } from '../ReactMapView/AdagucMapDraw';
2
3
  interface MapViewLayerProps {
3
4
  id: string;
4
5
  onLayerReady?: (layer: any, webmap?: any) => void;
@@ -9,6 +10,8 @@ interface MapViewLayerProps {
9
10
  updateGeojson?: (geoJson: any) => void;
10
11
  exitDrawModeCallback?: () => void;
11
12
  featureNrToEdit?: number;
13
+ onClickFeature?: (event: FeatureEvent) => void;
14
+ onHoverFeature?: (event: FeatureEvent) => void;
12
15
  }
13
16
  declare const MapViewLayer: React.FC<MapViewLayerProps>;
14
17
  export default MapViewLayer;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface WarningListProps {
3
+ selectedFeatureProperties: any;
4
+ }
5
+ export declare const MapWarningProperties: React.FC<WarningListProps>;
6
+ export {};
@@ -1,2 +1 @@
1
- export * from './HarmRefTimePreset';
2
1
  export * from './HarmonieTempAndPrecipPreset';
@@ -2,8 +2,10 @@ import * as React from 'react';
2
2
  import { Layer } from '../../../store/mapStore/types';
3
3
  import { MultiMapPreset } from '../MultiMapViewConnect';
4
4
  export declare const makeMapPreset: (timeIncrement: number, uniqueId: string, referenceTime: string, layers: Layer[], syncGroupsIds: string[], displayLayerManagerButtonInMap: boolean, displayDimensionSelectButtonInMap: boolean) => MultiMapPreset;
5
- export interface InitialHarmRefTimeProps {
5
+ export interface ModelRunIntervalProps {
6
6
  layers?: Layer[];
7
7
  syncGroupsIds: string[];
8
+ interval?: number;
9
+ startTimeIncrement?: number;
8
10
  }
9
- export declare const HarmRefTimePreset: React.FC<InitialHarmRefTimeProps>;
11
+ export declare const ModelRunInterval: React.FC<ModelRunIntervalProps>;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export declare const ModelRunIntervalDefault: () => React.ReactElement;
3
+ export declare const ModelRunIntervalHourly: () => React.ReactElement;
4
+ export declare const ModelRunIntervalCustomStart: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export * from './ModelRunInterval';
@@ -1,9 +1,8 @@
1
1
  import { MultiMapViewStory2x2 } from './MultiMapView2x2.stories';
2
2
  import { MultiMapViewStory4x3 } from './MultiMapView4x3.stories';
3
3
  import { MultiMapViewStory10x10 } from './MultiMapView10x10.stories';
4
- export { MultiMapViewStory2x2 };
5
- export { MultiMapViewStory4x3 };
6
- export { MultiMapViewStory10x10 };
4
+ import { ModelRunIntervalCustomStart, ModelRunIntervalDefault, ModelRunIntervalHourly } from './ModelRunInterval/ModelRunInterval.stories';
5
+ export { MultiMapViewStory2x2, MultiMapViewStory4x3, MultiMapViewStory10x10, ModelRunIntervalDefault, ModelRunIntervalHourly, ModelRunIntervalCustomStart, };
7
6
  declare const _default: {
8
7
  title: string;
9
8
  };
@@ -7,8 +7,8 @@ export declare const featureMultiPoint: GeoJSON.Feature<GeoJSON.MultiPoint>;
7
7
  export declare const featurePolygon: GeoJSON.Feature<GeoJSON.Polygon>;
8
8
  export declare const featureBox: GeoJSON.Feature<GeoJSON.Polygon>;
9
9
  export declare const lineString: GeoJSON.FeatureCollection;
10
- declare type GeoJsonFeatureType = GeoJSON.Polygon | GeoJSON.MultiPoint | GeoJSON.Point | GeoJSON.LineString;
11
- declare type GeoJsonFeature = GeoJSON.Feature<GeoJsonFeatureType>;
10
+ export declare type GeoJsonFeatureType = GeoJSON.Polygon | GeoJSON.MultiPoint | GeoJSON.Point | GeoJSON.LineString | GeoJSON.MultiPolygon;
11
+ export declare type GeoJsonFeature = GeoJSON.Feature<GeoJsonFeatureType>;
12
12
  declare type GeoFeatureStyle = {
13
13
  stroke?: string;
14
14
  fill?: string;
@@ -16,7 +16,7 @@ declare type GeoFeatureStyle = {
16
16
  'stroke-opacity'?: number;
17
17
  'fill-opacity'?: number;
18
18
  };
19
- declare type Coordinate = {
19
+ export declare type Coordinate = {
20
20
  x: number;
21
21
  y: number;
22
22
  };
@@ -32,12 +32,14 @@ declare type AdagucInputEvent = {
32
32
  mouseY: number;
33
33
  rightButton: boolean;
34
34
  };
35
- export declare type FeatureEvent = {
36
- polygonIndex: number;
35
+ export interface FeatureEvent {
36
+ coordinateIndexInFeature: number;
37
37
  featureIndex: number;
38
38
  mouseX: number;
39
39
  mouseY: number;
40
- };
40
+ isInEditMode: boolean;
41
+ feature: GeoJsonFeature;
42
+ }
41
43
  export interface AdagucMapDrawProps {
42
44
  webmapjs: WMJSMap;
43
45
  geojson: GeoJSON.FeatureCollection;
@@ -47,7 +49,8 @@ export interface AdagucMapDrawProps {
47
49
  isInEditMode: boolean;
48
50
  isInDeleteMode: boolean;
49
51
  featureNrToEdit: number;
50
- hoverFeatureCallback: (event: FeatureEvent) => void;
52
+ onHoverFeature?: (event: FeatureEvent) => void;
53
+ onClickFeature?: (event: FeatureEvent) => void;
51
54
  updateGeojson: (geoJson: GeometryObject, text: string) => void;
52
55
  }
53
56
  export declare enum EDITMODE {
@@ -100,10 +103,12 @@ export default class AdagucMapDraw extends React.PureComponent<AdagucMapDrawProp
100
103
  mouseX?: number;
101
104
  mouseY?: number;
102
105
  };
106
+ mouseStoppedTimer: number;
103
107
  snappedPolygonIndex: SNAPPEDFEATURE | number;
104
108
  mouseX: number;
105
109
  mouseY: number;
106
110
  mouseOverPolygonFeatureIndex: number;
111
+ mouseOverPolygonIndex: number;
107
112
  drawMode: string;
108
113
  disabled: boolean;
109
114
  static defaultProps: {
@@ -27,3 +27,7 @@ export declare const Map6: {
27
27
  (): React.ReactElement;
28
28
  storyName: string;
29
29
  };
30
+ export declare const Map7: {
31
+ (): React.ReactElement;
32
+ storyName: string;
33
+ };
@@ -10,7 +10,8 @@ export declare type FeatureLayer = {
10
10
  isInDeleteMode?: boolean;
11
11
  geojson?: GeoJSON.FeatureCollection;
12
12
  drawMode?: string;
13
- hoverFeatureCallback?: (feature: FeatureEvent) => void;
13
+ onHoverFeature?: (feature: FeatureEvent) => void;
14
+ onClickFeature?: (feature: FeatureEvent) => void;
14
15
  updateGeojson?: (feature: GeometryObject) => void;
15
16
  exitDrawModeCallback?: () => void;
16
17
  featureNrToEdit?: string;
@@ -0,0 +1,9 @@
1
+ import { Position } from 'geojson';
2
+ import type { Coordinate, GeoJsonFeature } from './AdagucMapDraw';
3
+ export declare type CheckHoverFeaturesResult = {
4
+ coordinateIndexInFeature: number;
5
+ featureIndex: number;
6
+ feature: GeoJsonFeature;
7
+ } | null;
8
+ export declare const distance: (a: Coordinate, b: Coordinate) => number;
9
+ export declare const checkHoverFeatures: (geojson: GeoJSON.FeatureCollection, mouseX: number, mouseY: number, convertGeoCoordsToScreenCoords: (featureCoords: Position[]) => Coordinate[]) => CheckHoverFeaturesResult;
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  interface OptionsMenuButtonProps {
3
3
  autoUpdateBtn?: React.ReactChild;
4
- loopBtn?: React.ReactChild;
5
4
  speedBtn?: React.ReactChild;
6
5
  timeStepBtn?: React.ReactChild;
7
6
  }
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  interface TimeSliderButtonsProps {
3
3
  autoUpdateBtn?: React.ReactChild;
4
- loopBtn?: React.ReactChild;
5
4
  optionsMenuBtn?: React.ReactChild;
6
5
  playBtn?: React.ReactChild;
7
6
  speedBtn?: React.ReactChild;
@@ -1,12 +1,11 @@
1
1
  import moment from 'moment';
2
2
  import React from 'react';
3
3
  import { DateInterval } from '@opengeoweb/webmap';
4
- import { Dimension, Layer, Scale } from '../../store/mapStore/types';
4
+ import { Dimension, Layer, Scale, SpeedFactorType } from '../../store/mapStore/types';
5
5
  import CanvasComponent from '../CanvasComponent/CanvasComponent';
6
6
  export declare const defaultAnimationDelayAtStart = 250;
7
7
  export declare const defaultDelay = 1000;
8
8
  export declare const speedFactors: SpeedFactorType[];
9
- export declare type SpeedFactorType = 0.1 | 0.2 | 0.5 | 1 | 2 | 4 | 8 | 16;
10
9
  export interface TimeBounds {
11
10
  selectedTime: number;
12
11
  startTime: number;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { Service } from '../services';
3
3
  interface WMSServerListProps {
4
4
  availableServices: Service[];
5
- handleChangeService: (index: number) => void;
5
+ handleChangeService: (service: Service) => void;
6
6
  service: Service;
7
7
  }
8
8
  declare const WMSServerList: React.FC<WMSServerListProps>;
package/lib/index.d.ts CHANGED
@@ -8,8 +8,8 @@ import * as uiSelectors from './store/ui/selectors';
8
8
  import * as uiTypes from './store/ui/types';
9
9
  import * as syncGroupActions from './store/generic/actions';
10
10
  import * as layerReducer from './store/mapStore/layers/reducer';
11
+ import * as layerActions from './store/mapStore/layers/actions';
11
12
  import synchronizationGroupConfig from './store/generic/config';
12
- import TooltipSelect from './components/TooltipSelect/TooltipSelect';
13
13
  import * as SyncGroups from './store/generic/synchronizationGroups';
14
14
  import coreModuleConfig from './store/coreModuleConfig';
15
15
  import { LayerManagerConnect, LayerManagerMapButtonConnect } from './components/LayerManager';
@@ -22,13 +22,12 @@ export { LegendConnect, Legend, LegendMapButtonConnect, } from './components/Leg
22
22
  export { ZoomControls, ZoomControlConnect } from './components/MapControls';
23
23
  export { TimeSliderConnect } from './components/TimeSlider';
24
24
  export { MapControls } from './components/MapControls';
25
- export { mapActions, mapSelectors, mapTypes, mapConstants, mapUtils, layerReducer, uiActions, uiSelectors, uiTypes, syncGroupActions, };
25
+ export { mapActions, mapSelectors, mapTypes, mapConstants, mapUtils, layerReducer, layerActions, uiActions, uiSelectors, uiTypes, syncGroupActions, };
26
26
  export { synchronizationGroupConfig as synchronizationGroupModuleConfig };
27
27
  export * from './components/ComponentsLookUp';
28
28
  export * from './components/ConfigurableMapWithSlider';
29
29
  export { ConfigurableConnectedMap } from './components/ConfigurableConnectedMap';
30
30
  export * from './store/mapStore/utils/helpers';
31
- export { TooltipSelect };
32
31
  export { SyncGroupViewerConnect } from './components/SyncGroups/SyncGroupViewerConnect';
33
32
  export { SyncGroups };
34
33
  export { store } from './store';
@@ -45,3 +44,5 @@ export * as defaultConfigurations from './utils/defaultConfigurations';
45
44
  export * from './components/Providers/Providers';
46
45
  export { default as uiModuleConfig } from './store/ui/config';
47
46
  export { default as mapModuleConfig } from './store/mapStore/config';
47
+ export { default as synchronizationGroupsConfig } from './store/generic/config';
48
+ export * from './components/MapWarning/MapWarningProperties';
@@ -1,6 +1,8 @@
1
1
  import { SagaIterator } from 'redux-saga';
2
- import { ServiceActions } from '../mapStore/types';
2
+ import { ServiceActions, SetLayersForService, MapStoreRemoveService } from '../mapStore/types';
3
3
  export declare function newServiceAddedSaga(capturedAction: ServiceActions): SagaIterator;
4
4
  export declare function layerSelectServiceRemovedSaga(capturedAction: ServiceActions): SagaIterator;
5
+ export declare function addServiceToLocalStorageSaga({ payload, }: SetLayersForService): void;
6
+ export declare function removeServiceFromLocalStorageSaga({ payload, }: MapStoreRemoveService): void;
5
7
  export declare function rootSaga(): SagaIterator;
6
8
  export default rootSaga;
@@ -1,4 +1,4 @@
1
- import { SetLayerOpacityPayload, SetLayerEnabledPayload, SetLayerDimensionPayload, SetLayerNamePayload, SetLayerStylePayload, LayerActions, AddLayerPayload, DeleteLayerPayload, SetLayersPayload, SetBaseLayersPayload, AddBaseLayerPayload, ErrorLayerPayload, AddAvailableBaseLayerPayload, AddAvailableBaseLayersPayload, SetLayerDimensionsPayload, UpdateLayerInfoPayload } from './types';
1
+ import { SetLayerOpacityPayload, SetLayerEnabledPayload, SetLayerDimensionPayload, SetLayerNamePayload, SetLayerStylePayload, LayerActions, AddLayerPayload, DeleteLayerPayload, SetLayersPayload, SetBaseLayersPayload, AddBaseLayerPayload, ErrorLayerPayload, AddAvailableBaseLayerPayload, AddAvailableBaseLayersPayload, SetLayerDimensionsPayload, UpdateLayerInfoPayload, SetLayerGeojsonPayload } from './types';
2
2
  /**
3
3
  * Set the layers for a map. Erases all previous layers.
4
4
  * The following action types are triggered after the getCapabilities are parsed:
@@ -86,6 +86,13 @@ export declare const layerChangeName: (payload: SetLayerNamePayload) => LayerAct
86
86
  * @param {object} payload Object with a layerId: string, style: string, origin?: string, service?: string;
87
87
  */
88
88
  export declare const layerChangeStyle: (payload: SetLayerStylePayload) => LayerActions;
89
+ /**
90
+ * Changes the geojson of a layer
91
+ *
92
+ * Example: layerChangeGeojson({ layerId: 'layerId1', geojson: geojson })
93
+ * @param {object} payload Object with a layerId: string, geojson: FeatureCollection;
94
+ */
95
+ export declare const layerChangeGeojson: (payload: SetLayerGeojsonPayload) => LayerActions;
89
96
  /**
90
97
  * Deletes a layer
91
98
  *
@@ -2,6 +2,7 @@ export declare const WEBMAP_LAYER_CHANGE_OPACITY = "WEBMAP_LAYER_CHANGE_OPACITY"
2
2
  export declare const WEBMAP_LAYER_CHANGE_NAME = "WEBMAP_LAYER_CHANGE_NAME";
3
3
  export declare const WEBMAP_LAYER_CHANGE_STYLE = "WEBMAP_LAYER_CHANGE_STYLE";
4
4
  export declare const WEBMAP_LAYER_CHANGE_DIMENSION = "WEBMAP_LAYER_CHANGE_DIMENSION";
5
+ export declare const WEBMAP_LAYER_CHANGE_GEOJSON = "WEBMAP_LAYER_CHANGE_GEOJSON";
5
6
  export declare const WEBMAP_LAYER_SET_DIMENSIONS = "WEBMAP_LAYER_SET_DIMENSIONS";
6
7
  export declare const WEBMAP_LAYER_CHANGE_ENABLED = "WEBMAP_LAYER_CHANGE_ENABLED";
7
8
  export declare const WEBMAP_LAYER_DELETE = "WEBMAP_LAYER_DELETE";
@@ -1,7 +1,8 @@
1
1
  import { Action } from 'redux';
2
2
  import { Style } from '@opengeoweb/webmap';
3
+ import { FeatureCollection } from 'geojson';
3
4
  import { Dimension, UpdateAllMapDimensionsPayload } from '../map/types';
4
- import { WEBMAP_LAYER_CHANGE_OPACITY, WEBMAP_LAYER_CHANGE_NAME, WEBMAP_LAYER_CHANGE_STYLE, WEBMAP_LAYER_CHANGE_DIMENSION, WEBMAP_LAYER_CHANGE_ENABLED, WEBMAP_LAYER_DELETE, WEBMAP_ADD_LAYER, WEBMAP_SET_LAYERS, WEBMAP_SET_BASELAYERS, WEBMAP_ADD_BASELAYER, WEBMAP_BASELAYER_DELETE, WEBMAP_LAYER_ERROR, WEBMAP_ADD_AVAILABLE_BASELAYER, WEBMAP_ADD_AVAILABLE_BASELAYERS, WEBMAP_LAYER_SET_DIMENSIONS, WEBMAP_UPDATE_LAYER_INFO } from './constants';
5
+ import { WEBMAP_LAYER_CHANGE_OPACITY, WEBMAP_LAYER_CHANGE_NAME, WEBMAP_LAYER_CHANGE_STYLE, WEBMAP_LAYER_CHANGE_DIMENSION, WEBMAP_LAYER_CHANGE_ENABLED, WEBMAP_LAYER_DELETE, WEBMAP_ADD_LAYER, WEBMAP_SET_LAYERS, WEBMAP_SET_BASELAYERS, WEBMAP_ADD_BASELAYER, WEBMAP_BASELAYER_DELETE, WEBMAP_LAYER_ERROR, WEBMAP_ADD_AVAILABLE_BASELAYER, WEBMAP_ADD_AVAILABLE_BASELAYERS, WEBMAP_LAYER_SET_DIMENSIONS, WEBMAP_UPDATE_LAYER_INFO, WEBMAP_LAYER_CHANGE_GEOJSON } from './constants';
5
6
  import type { SetLayersForServicePayload } from '../types';
6
7
  export interface WMJSDimension {
7
8
  getFirstValue(): string;
@@ -45,13 +46,13 @@ export interface ReduxLayer {
45
46
  layerType?: LayerType;
46
47
  status?: LayerStatus;
47
48
  format?: string;
49
+ geojson?: FeatureCollection;
48
50
  }
49
51
  /**
50
52
  * Layer is used to define a layer with all its possible properties.
51
53
  */
52
54
  export interface Layer extends ReduxLayer {
53
55
  styles?: Style[];
54
- geojson?: GeoJSON.FeatureCollection;
55
56
  headers?: Headers[];
56
57
  }
57
58
  export interface AvailableBaseLayersType {
@@ -130,6 +131,13 @@ export interface SetLayerStyle extends Action {
130
131
  type: typeof WEBMAP_LAYER_CHANGE_STYLE;
131
132
  payload: SetLayerStylePayload;
132
133
  }
134
+ export interface SetLayerGeojson extends Action {
135
+ type: typeof WEBMAP_LAYER_CHANGE_GEOJSON;
136
+ payload: SetLayerGeojsonPayload;
137
+ }
138
+ export interface SetLayerGeojsonPayload extends LayerPayload {
139
+ geojson: FeatureCollection;
140
+ }
133
141
  export interface DeleteLayerPayload extends LayerPayload {
134
142
  mapId: string;
135
143
  layerIndex: number;
@@ -196,4 +204,4 @@ export interface UpdateLayerInfo extends Action {
196
204
  type: typeof WEBMAP_UPDATE_LAYER_INFO;
197
205
  payload: UpdateLayerInfoPayload;
198
206
  }
199
- export declare type LayerActions = SetLayerDimensions | SetLayerOpacity | SetLayerEnabled | SetLayerDimension | SetLayerStyle | SetLayerName | DeleteLayer | DeleteBaseLayer | AddLayer | SetLayers | SetBaseLayers | AddBaseLayer | ErrorLayer | AddAvailableBaseLayer | AddAvailableBaseLayers | UpdateLayerInfo;
207
+ export declare type LayerActions = SetLayerDimensions | SetLayerOpacity | SetLayerEnabled | SetLayerDimension | SetLayerStyle | SetLayerName | SetLayerGeojson | DeleteLayer | DeleteBaseLayer | AddLayer | SetLayers | SetBaseLayers | AddBaseLayer | ErrorLayer | AddAvailableBaseLayer | AddAvailableBaseLayers | UpdateLayerInfo;
@@ -1,4 +1,5 @@
1
- import { MapActions, SetBboxPayload, MoveLayerPayload, SetMapDimensionPayload, UpdateAllMapDimensionsPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetActiveLayerIdPayload, MoveLayer, SetActiveLayerId, ToggleAutoUpdatePayload, ToggleAutoUpdate, ToggleLoopPayload, ToggleLoop, SetTimeSliderScalePayload, SetTimeStepPayload, SetAnimationDelayPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, ToggleTimestepAutoPayload, ToggleTimestepAuto, ToggleTimeSliderHoverPayload, ToggleTimeSliderHover, SetTimeSliderCenterTimePayload, SetTimeSliderSecondsPerPxPayload, SetTimeSliderDataScaleToSecondsPerPxPayload, MapPinLocationPayload, DisableMapPinPayload } from './types';
1
+ import { SetMapPresetPayload } from '../types';
2
+ import { MapActions, SetBboxPayload, MoveLayerPayload, SetMapDimensionPayload, UpdateAllMapDimensionsPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetActiveLayerIdPayload, MoveLayer, SetActiveLayerId, ToggleAutoUpdatePayload, ToggleAutoUpdate, SetTimeSliderScalePayload, SetTimeStepPayload, SetAnimationDelayPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, ToggleTimestepAutoPayload, ToggleTimestepAuto, ToggleTimeSliderHoverPayload, ToggleTimeSliderHover, SetTimeSliderCenterTimePayload, SetTimeSliderSecondsPerPxPayload, SetTimeSliderDataScaleToSecondsPerPxPayload, MapPinLocationPayload, DisableMapPinPayload, SetSelectedFeaturePayload, SetActiveMapPresetPayload } from './types';
2
3
  /**
3
4
  * Registers the map in the store and creates the map state
4
5
  *
@@ -70,13 +71,6 @@ export declare const setActiveLayerId: (payload: SetActiveLayerIdPayload) => Set
70
71
  * @param {object} payload object with mapId: string, shouldAutoUpdate: boolean
71
72
  */
72
73
  export declare const toggleAutoUpdate: (payload: ToggleAutoUpdatePayload) => ToggleAutoUpdate;
73
- /**
74
- * Toggles loop state for map
75
- *
76
- * Example: toggleLoop({ mapId: 'mapId1', shouldLoop: true })
77
- * @param {object} payload object with mapId: string, shouldLoop: boolean
78
- */
79
- export declare const toggleLoop: (payload: ToggleLoopPayload) => ToggleLoop;
80
74
  /**
81
75
  *Sets the scale of a time slider with id for a map
82
76
  *
@@ -161,3 +155,18 @@ export declare const setMapPinLocation: (payload: MapPinLocationPayload) => MapA
161
155
  * @param {object} payload object with mapId: string, diableMapPin: boolean
162
156
  */
163
157
  export declare const setDisableMapPin: (payload: DisableMapPinPayload) => MapActions;
158
+ /**
159
+ * Sets the selected geojson feature index, for example the selected polygon index in the FeatureCollection
160
+ *
161
+ * Example: setSelectedFeature({ mapId: 'mapId1', selectedFeatureIndex: 1 })
162
+ * @param {object} payload object with mapId: string, selectedFeatureIndex: number
163
+ */
164
+ export declare const setSelectedFeature: (payload: SetSelectedFeaturePayload) => MapActions;
165
+ export declare const setMapPreset: (payload: SetMapPresetPayload) => MapActions;
166
+ /**
167
+ * Sets the active mappreset id
168
+ *
169
+ * Example: setActiveMapPresetId({ mapId: 'mapId1', presetId: 'preset1 })
170
+ * @param {object} payload object with mapId: string, presetId: string
171
+ */
172
+ export declare const setActiveMapPresetId: (payload: SetActiveMapPresetPayload) => MapActions;
@@ -21,3 +21,6 @@ export declare const WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX = "WEBMAP_SET_TIME_SL
21
21
  export declare const WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX = "WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX";
22
22
  export declare const WEBMAP_SET_PIN = "WEBMAP_SET_PIN";
23
23
  export declare const WEBMAP_DISABLE_PIN = "WEBMAP_DISABLE_PIN";
24
+ export declare const WEBMAP_SET_SELECTED_FEATURE_INDEX = "WEBMAP_SET_SELECTED_FEATURE_INDEX";
25
+ export declare const WEBMAP_SET_MAPPRESET = "WEBMAP_SET_MAPPRESET";
26
+ export declare const WEBMAP_SET_ACTIVE_MAPPRESET_ID = "WEBMAP_SET_ACTIVE_MAPPRESET_ID";
@@ -1,7 +1,7 @@
1
1
  import { SagaIterator } from 'redux-saga';
2
2
  import { Moment } from 'moment';
3
- import { SetMapAnimationStop, SetMapAnimationStart, ToggleAutoUpdate } from './types';
4
- import { DeleteLayer, UpdateLayerInfo } from '../layers/types';
3
+ import { SetMapAnimationStop, SetMapAnimationStart, ToggleAutoUpdate, SetMapPreset } from './types';
4
+ import { DeleteLayer, Layer, UpdateLayerInfo } from '../layers/types';
5
5
  export declare const generateTimeList: (start: Moment, end: Moment, interval: number) => {
6
6
  name: string;
7
7
  value: string;
@@ -13,5 +13,7 @@ export declare function deleteLayerSaga({ payload }: DeleteLayer): SagaIterator;
13
13
  export declare function updateAnimation(mapId: string, maxValue: string): SagaIterator;
14
14
  export declare function setLayerDimensionsSaga({ payload, }: UpdateLayerInfo): SagaIterator;
15
15
  export declare function toggleAutoUpdateSaga({ payload, }: ToggleAutoUpdate): SagaIterator;
16
+ export declare function handleBaseLayersSaga(mapId: string, baseLayers: Layer[]): SagaIterator;
17
+ export declare function setMapPresetSaga({ payload }: SetMapPreset): SagaIterator;
16
18
  export declare function rootSaga(): SagaIterator;
17
19
  export default rootSaga;