@opengeoweb/core 1.3.0 → 2.1.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.
- package/README.md +11 -12
- package/core.esm.js +5615 -4960
- package/core.umd.js +4180 -3554
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/DeleteLayer/DeleteLayerConnect.d.ts +1 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRowConnect.d.ts +1 -0
- package/lib/components/LayerManager/LayerManager.stories.d.ts +3 -0
- package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopup.d.ts +11 -0
- package/lib/components/{MultiDimensionSelect/MultiDimensionSelectConnect.spec.d.ts → LayerManager/LayerSelect/ServicePopup/ServicePopup.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopup.stories.d.ts +13 -0
- package/lib/components/Legend/LegendConnect.d.ts +1 -2
- package/lib/components/Mapcontrols/MapControlButton.d.ts +11 -0
- package/lib/components/{MultiDimensionSelect/MultiDimensionSelectDialog.spec.d.ts → Mapcontrols/MapControlButton.spec.d.ts} +0 -0
- package/lib/components/Mapcontrols/MapControls.d.ts +7 -0
- package/lib/components/{MultiDimensionSelect/VerticalDimensionSelect.spec.d.ts → Mapcontrols/MapControls.spec.d.ts} +0 -0
- package/lib/components/Mapcontrols/ZoomControls.d.ts +0 -8
- package/lib/components/Mapcontrols/index.d.ts +2 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectButton.d.ts +8 -0
- package/lib/components/{TimeSlider/TimeSliderButtons/ToggleIconButton.spec.d.ts → MultiMapDimensionSelect/DimensionSelectButton.spec.d.ts} +0 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectButtonConnect.d.ts +7 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectButtonConnect.spec.d.ts +1 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectDialogConnect.d.ts +12 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectDialogConnect.spec.d.ts +1 -0
- package/lib/components/{MultiDimensionSelect/VerticalDimensionSelect.d.ts → MultiMapDimensionSelect/DimensionSelectSlider.d.ts} +5 -4
- package/lib/components/MultiMapDimensionSelect/DimensionSelectSlider.spec.d.ts +1 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectSliderConnect.d.ts +11 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectSliderConnect.spec.d.ts +1 -0
- package/lib/components/{MultiDimensionSelect → MultiMapDimensionSelect}/EnsembleDimensionExample.stories.d.ts +0 -0
- package/lib/components/{MultiDimensionSelect → MultiMapDimensionSelect}/MultiDimensionSelect.stories.d.ts +1 -0
- package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectConfig.d.ts +11 -0
- package/lib/components/{MultiDimensionSelect → MultiMapDimensionSelect}/MultiDimensionSelectConnect.stories.d.ts +0 -1
- package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectMapButtonsConnect.d.ts +6 -0
- package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectMapButtonsConnect.spec.d.ts +1 -0
- package/lib/components/MultiMapDimensionSelect/MultiMapMultiDimensionSelect.stories.d.ts +2 -0
- package/lib/components/MultiMapDimensionSelect/MultiMapMultiDimensionSelectConnect.d.ts +9 -0
- package/lib/components/MultiMapDimensionSelect/MultiMapMultiDimensionSelectConnect.spec.d.ts +1 -0
- package/lib/components/MultiMapDimensionSelect/MultiMapSingleDimensionSelectConnect.d.ts +8 -0
- package/lib/components/MultiMapDimensionSelect/MultiMapSingleDimensionSelectConnect.spec.d.ts +1 -0
- package/lib/components/MultiMapDimensionSelect/index.d.ts +2 -0
- package/lib/components/MultiMapView/HarmoniePresets/HarmRefTimePreset.d.ts +2 -5
- package/lib/components/MultiMapView/HarmoniePresets/HarmonieTempAndPrecipPreset.d.ts +1 -4
- package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +1 -1
- package/lib/components/ReactMapView/ReactMapView.d.ts +0 -1
- package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +3 -2
- package/lib/components/ReactMapView/types.d.ts +1 -2
- package/lib/components/SyncGroups/ConfigurableConnectedMap.d.ts +2 -0
- package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtonComponents.stories.d.ts +0 -1
- package/lib/components/{TimeSlider/TimeSliderButtons → ToggleIconButton}/ToggleIconButton.d.ts +1 -0
- package/lib/components/ToggleIconButton/ToggleIconButton.spec.d.ts +1 -0
- package/lib/components/{TimeSlider/TimeSliderButtons → ToggleIconButton}/ToggleIconButton.stories.d.ts +4 -0
- package/lib/components/ToggleIconButton/index.d.ts +1 -0
- package/lib/index.d.ts +7 -4
- package/lib/store/generic/sagas.d.ts +8 -2
- package/lib/store/generic/synchronizationGroups/index.d.ts +2 -1
- package/lib/store/generic/synchronizationGroups/sagas.d.ts +0 -1
- package/lib/store/generic/synchronizationGroups/utils.d.ts +79 -2
- package/lib/store/generic/types.d.ts +3 -3
- package/lib/store/mapStore/layers/actions.d.ts +0 -3
- package/lib/store/mapStore/layers/selectors.d.ts +21 -1
- package/lib/store/mapStore/layers/types.d.ts +7 -0
- package/lib/store/mapStore/layers/utils.d.ts +4 -2
- package/lib/store/mapStore/layers/utils.spec.d.ts +1 -0
- package/lib/store/mapStore/map/selectors.d.ts +34 -0
- package/lib/store/mapStore/map/types.d.ts +2 -0
- package/lib/store/mapStore/service/actions.d.ts +1 -10
- package/lib/store/mapStore/service/constants.d.ts +0 -1
- package/lib/store/mapStore/service/reducer.d.ts +4 -2
- package/lib/store/mapStore/service/selectors.d.ts +9 -39
- package/lib/store/mapStore/service/types.d.ts +4 -15
- package/lib/store/mapStore/types.d.ts +1 -1
- package/lib/store/ui/actions.d.ts +5 -5
- package/lib/store/ui/sagas.d.ts +5 -0
- package/lib/store/ui/sagas.test.d.ts +1 -0
- package/lib/store/ui/selectors.d.ts +5 -5
- package/lib/store/ui/types.d.ts +1 -1
- package/lib/utils/defaultTestSettings.d.ts +0 -44
- package/lib/utils/dimensionUtils.d.ts +5 -1
- package/lib/utils/getCapabilities.d.ts +2 -0
- package/lib/utils/testUtils.d.ts +1 -0
- package/package.json +6 -6
- package/lib/components/MultiDimensionSelect/MultiDimensionSelectConfig.d.ts +0 -3
- package/lib/components/MultiDimensionSelect/MultiDimensionSelectConnect.d.ts +0 -15
- package/lib/components/MultiDimensionSelect/MultiDimensionSelectDialog.d.ts +0 -15
- package/lib/components/MultiDimensionSelect/MultiDimensionSelectDialogConnect.d.ts +0 -8
- package/lib/components/MultiDimensionSelect/index.d.ts +0 -2
- package/lib/components/MultiDimensionSelect/types.d.ts +0 -18
- package/lib/components/SyncGroups/SyncGroupDialog.d.ts +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Dimension } from '@opengeoweb/webmap';
|
|
1
2
|
import { AppStore } from '../../../types/types';
|
|
2
3
|
import { LayerState, Layer, LayerStatus } from './types';
|
|
3
4
|
/**
|
|
@@ -63,9 +64,18 @@ export declare const getOverLayers: import("reselect").OutputSelector<AppStore,
|
|
|
63
64
|
* Example: layerDimensions = getLayerDimensions(store, 'layerId_1')
|
|
64
65
|
* @param {object} store store: object - object from which the layers state will be extracted
|
|
65
66
|
* @param {string} layerId layerId: string - Id of the layer
|
|
66
|
-
* @returns {array} returnType:
|
|
67
|
+
* @returns {array} returnType: Dimension[] - array containing layer dimensions
|
|
67
68
|
*/
|
|
68
69
|
export declare const getLayerDimensions: import("reselect").OutputParametricSelector<AppStore, string, import("../types").Dimension[], (res: Layer) => import("../types").Dimension[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Gets dimensions of the passed layer, excluding the time dimension
|
|
72
|
+
*
|
|
73
|
+
* Example: layerNonTimeDimensions = getLayerNonTimeDimensions(store, 'layerId_1')
|
|
74
|
+
* @param {object} store store: object - object from which the layers state will be extracted
|
|
75
|
+
* @param {string} layerId layerId: string - Id of the layer
|
|
76
|
+
* @returns {array} returnType: Dimension[] - array containing layer dimensions, excluding the time dimension
|
|
77
|
+
*/
|
|
78
|
+
export declare const getLayerNonTimeDimensions: import("reselect").OutputParametricSelector<AppStore, string, import("../types").Dimension[], (res: import("../types").Dimension[]) => import("../types").Dimension[]>;
|
|
69
79
|
/**
|
|
70
80
|
* Gets time dimension of the passed layer
|
|
71
81
|
*
|
|
@@ -75,6 +85,16 @@ export declare const getLayerDimensions: import("reselect").OutputParametricSele
|
|
|
75
85
|
* @returns {array} returnType: object - object of layer time dimension
|
|
76
86
|
*/
|
|
77
87
|
export declare const getLayerTimeDimension: import("reselect").OutputParametricSelector<AppStore, string, any[] | import("../types").Dimension, (res: import("../types").Dimension[]) => any[] | import("../types").Dimension>;
|
|
88
|
+
/**
|
|
89
|
+
* Gets specified dimension of the passed layer
|
|
90
|
+
*
|
|
91
|
+
* Example: dimension = getLayerDimension(store, 'layerId_1', 'elevation')
|
|
92
|
+
* @param {object} store store: object - object from which the layers state will be extracted
|
|
93
|
+
* @param {string} layerId layerId: string - Id of the layer
|
|
94
|
+
* @param {string} dimensionName dimensionName: string - name of dimension you want to retrieve the dimension data for
|
|
95
|
+
* @returns {object} returnType: object - object of layer dimension
|
|
96
|
+
*/
|
|
97
|
+
export declare const getLayerDimension: import("reselect").OutputParametricSelector<AppStore, string, Dimension, (res1: import("../types").Dimension[], res2: string) => Dimension>;
|
|
78
98
|
/**
|
|
79
99
|
* Gets opacity of the passed layer
|
|
80
100
|
*
|
|
@@ -57,6 +57,7 @@ export interface LayerPayload {
|
|
|
57
57
|
export interface SetLayersPayload {
|
|
58
58
|
mapId: string;
|
|
59
59
|
layers: Layer[];
|
|
60
|
+
origin?: string;
|
|
60
61
|
}
|
|
61
62
|
export interface SetLayers extends Action {
|
|
62
63
|
type: typeof WEBMAP_SET_LAYERS;
|
|
@@ -65,6 +66,7 @@ export interface SetLayers extends Action {
|
|
|
65
66
|
export interface SetBaseLayersPayload {
|
|
66
67
|
mapId: string;
|
|
67
68
|
layers: Layer[];
|
|
69
|
+
origin?: string;
|
|
68
70
|
}
|
|
69
71
|
export interface SetBaseLayers extends Action {
|
|
70
72
|
type: typeof WEBMAP_SET_BASELAYERS;
|
|
@@ -117,6 +119,7 @@ export interface SetLayerStyle extends Action {
|
|
|
117
119
|
}
|
|
118
120
|
export interface DeleteLayerPayload extends LayerPayload {
|
|
119
121
|
mapId: string;
|
|
122
|
+
layerIndex: number;
|
|
120
123
|
}
|
|
121
124
|
export interface DeleteLayer extends Action {
|
|
122
125
|
type: typeof WEBMAP_LAYER_DELETE;
|
|
@@ -130,6 +133,7 @@ export interface AddLayerPayload {
|
|
|
130
133
|
mapId: string;
|
|
131
134
|
layerId: string;
|
|
132
135
|
layer: Layer;
|
|
136
|
+
origin: string;
|
|
133
137
|
}
|
|
134
138
|
export interface AddLayer extends Action {
|
|
135
139
|
type: typeof WEBMAP_ADD_LAYER;
|
|
@@ -143,6 +147,7 @@ export interface AddBaseLayerPayload {
|
|
|
143
147
|
mapId: string;
|
|
144
148
|
layerId: string;
|
|
145
149
|
layer: Layer;
|
|
150
|
+
origin?: string;
|
|
146
151
|
}
|
|
147
152
|
export interface AddAvailableBaseLayer extends Action {
|
|
148
153
|
type: typeof WEBMAP_ADD_AVAILABLE_BASELAYER;
|
|
@@ -150,6 +155,7 @@ export interface AddAvailableBaseLayer extends Action {
|
|
|
150
155
|
}
|
|
151
156
|
export interface AddAvailableBaseLayerPayload {
|
|
152
157
|
layer: Layer;
|
|
158
|
+
origin?: string;
|
|
153
159
|
}
|
|
154
160
|
export interface AddAvailableBaseLayers extends Action {
|
|
155
161
|
type: typeof WEBMAP_ADD_AVAILABLE_BASELAYERS;
|
|
@@ -157,6 +163,7 @@ export interface AddAvailableBaseLayers extends Action {
|
|
|
157
163
|
}
|
|
158
164
|
export interface AddAvailableBaseLayersPayload {
|
|
159
165
|
layers: Layer[];
|
|
166
|
+
origin?: string;
|
|
160
167
|
}
|
|
161
168
|
export interface ErrorLayerPayload extends LayerPayload {
|
|
162
169
|
error: Error;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { WritableDraft } from 'immer/dist/types/types-external';
|
|
2
2
|
import { Dimension } from '../types';
|
|
3
|
-
import { LayerState } from './types';
|
|
3
|
+
import { LayerState, WMJSDimension } from './types';
|
|
4
|
+
export declare const isActionLayerSynced: (state: LayerState, layerIdFromAction: string, dimension: Dimension) => boolean;
|
|
5
|
+
export declare const produceDimensionActionForMapLayer: (layerDim: Dimension, wmjsDimension: WMJSDimension, newDimension: Dimension) => Dimension;
|
|
4
6
|
/**
|
|
5
|
-
* For the given dimension, it creates a new draft state for all other (linked) layers inside the map.
|
|
7
|
+
* For the given dimension, it creates a new draft state for all other (linked or synced) layers inside the map.
|
|
6
8
|
* @param draft
|
|
7
9
|
* @param dimension
|
|
8
10
|
* @param mapId
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,6 +11,14 @@ import { Layer } from '../types';
|
|
|
11
11
|
* @returns {object} object containing map state (isAnimating, bbox, baseLayers, layers etc.)
|
|
12
12
|
*/
|
|
13
13
|
export declare const getMapById: (store: AppStore, mapId: string) => WebMap;
|
|
14
|
+
/**
|
|
15
|
+
* Gets all mapIds
|
|
16
|
+
*
|
|
17
|
+
* Example: getAllMapIds(store)
|
|
18
|
+
* @param {object} store store object from which the map state wll be extracted
|
|
19
|
+
* @returns {array} array containing all map ids
|
|
20
|
+
*/
|
|
21
|
+
export declare const getAllMapIds: (store: AppStore) => string[];
|
|
14
22
|
/**
|
|
15
23
|
* Gets the map state of the first map in the store
|
|
16
24
|
*
|
|
@@ -19,6 +27,14 @@ export declare const getMapById: (store: AppStore, mapId: string) => WebMap;
|
|
|
19
27
|
* @returns {object} object containing map state (isAnimating, bbox, baseLayers, layers etc.)
|
|
20
28
|
*/
|
|
21
29
|
export declare const getFirstMap: (store: AppStore) => WebMap;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the id of first map in store
|
|
32
|
+
*
|
|
33
|
+
* Example: getFirstMapId(store)
|
|
34
|
+
* @param {object} store store object from which the map state wll be extracted
|
|
35
|
+
* @returns {object} map id
|
|
36
|
+
*/
|
|
37
|
+
export declare const getFirstMapId: import("reselect").OutputSelector<AppStore, string, (res: WebMap) => string>;
|
|
22
38
|
/**
|
|
23
39
|
* Determines if map is present
|
|
24
40
|
*
|
|
@@ -90,6 +106,16 @@ export declare const getMapOverLayers: import("reselect").OutputParametricSelect
|
|
|
90
106
|
* @returns {array} returnType: array - array containing map dimensions
|
|
91
107
|
*/
|
|
92
108
|
export declare const getMapDimensions: import("reselect").OutputParametricSelector<AppStore, string, import("./types").Dimension[], (res: WebMap) => import("./types").Dimension[]>;
|
|
109
|
+
/**
|
|
110
|
+
* Gets the map dimension requested
|
|
111
|
+
*
|
|
112
|
+
* Example: mapDimensions = getMapDimension(store, 'mapid_1', 'elevation')
|
|
113
|
+
* @param {object} store store: object - store object
|
|
114
|
+
* @param {string} mapId mapId: string - Id of the map
|
|
115
|
+
* @param {string} dimensionName dimensionName: string - name of the dimension
|
|
116
|
+
* @returns {object} returnType: object - object containing the map dimension details
|
|
117
|
+
*/
|
|
118
|
+
export declare const getMapDimension: import("reselect").OutputParametricSelector<AppStore, string, import("./types").Dimension, (res1: WebMap, res2: string) => import("./types").Dimension>;
|
|
93
119
|
/**
|
|
94
120
|
* Gets map srs
|
|
95
121
|
*
|
|
@@ -282,3 +308,11 @@ export declare const getLayerIndexByLayerId: import("reselect").OutputParametric
|
|
|
282
308
|
* @returns {object} returnType: layer, or null if not found
|
|
283
309
|
*/
|
|
284
310
|
export declare const getLayerByLayerIndex: import("reselect").OutputParametricSelector<AppStore, string, Layer, (res1: Layer[], res2: number) => Layer>;
|
|
311
|
+
/**
|
|
312
|
+
* Returns name of all unique dimensions present in all maps
|
|
313
|
+
*
|
|
314
|
+
* Example getAllUniqueDimensions(store);
|
|
315
|
+
* @param {object} store store: object - store object
|
|
316
|
+
* @returns {array} returnType: array of dimension names
|
|
317
|
+
*/
|
|
318
|
+
export declare const getAllUniqueDimensions: import("reselect").OutputSelector<AppStore, string[], (res1: string[], res2: AppStore) => string[]>;
|
|
@@ -10,6 +10,7 @@ export interface Dimension {
|
|
|
10
10
|
minValue?: string;
|
|
11
11
|
timeInterval?: DateInterval;
|
|
12
12
|
synced?: boolean;
|
|
13
|
+
validSyncSelection?: boolean;
|
|
13
14
|
values?: string;
|
|
14
15
|
}
|
|
15
16
|
export interface WebMap {
|
|
@@ -73,6 +74,7 @@ export interface MoveLayerPayload {
|
|
|
73
74
|
mapId: string;
|
|
74
75
|
oldIndex: number;
|
|
75
76
|
newIndex: number;
|
|
77
|
+
origin: string;
|
|
76
78
|
}
|
|
77
79
|
export interface MoveLayer extends Action {
|
|
78
80
|
type: typeof WEBMAP_LAYER_MOVE;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import { ServiceActions,
|
|
2
|
-
/**
|
|
3
|
-
* Action setLayerDimensionsForService is used automatically after calling the setLayers action.
|
|
4
|
-
* It is populating the intial list of dimensions for the layer.
|
|
5
|
-
* Contents is based on WMS GetCapabilities
|
|
6
|
-
*
|
|
7
|
-
* Example: setLayerDimensionsForService({origin: 'someOrigin', service: someService, name: 'layerName', dimensions: dimensionObjecttArray})
|
|
8
|
-
* @param {object} payload consisting of service: string, name: string (layerName) and dimensions: Dimension[]
|
|
9
|
-
*/
|
|
10
|
-
export declare const setLayerDimensionsForService: (payload: SetLayerDimensionsForServicePayload) => ServiceActions;
|
|
1
|
+
import { ServiceActions, SetLayersForServicePayload, SetLayerStylesForServicePayload } from './types';
|
|
11
2
|
/**
|
|
12
3
|
* Action serviceSetLayers is used automatically after calling the setLayers action. Contents is based on WMS GetCapabilities
|
|
13
4
|
*
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ServiceActions } from '../types';
|
|
2
2
|
import { ServiceState } from './types';
|
|
3
3
|
export declare const initialState: {
|
|
4
|
-
|
|
4
|
+
byId: {};
|
|
5
|
+
allIds: any[];
|
|
5
6
|
};
|
|
6
7
|
export declare const WEBMAPJS_REDUCERNAME = "react-webmapjs";
|
|
7
8
|
export declare const reducer: (state: {
|
|
8
|
-
|
|
9
|
+
byId: {};
|
|
10
|
+
allIds: any[];
|
|
9
11
|
}, action: ServiceActions) => ServiceState;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { AppStore } from '../../../types/types';
|
|
2
2
|
import { ServiceState, ServiceLayer } from './types';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves all serviceIds
|
|
5
|
+
*
|
|
6
|
+
* Example: serviceIds = getServiceIds(store)
|
|
7
|
+
* @param {object} store store: object - object from which the service state will be extracted
|
|
8
|
+
* @returns {array} returnType: array - an array of all serviceIds
|
|
9
|
+
*/
|
|
10
|
+
export declare const getServiceIds: import("reselect").OutputSelector<AppStore, string[], (res: ServiceState) => string[]>;
|
|
4
11
|
/**
|
|
5
12
|
* Gets map services
|
|
6
13
|
*
|
|
@@ -8,7 +15,7 @@ import { Dimension, Layer } from '../types';
|
|
|
8
15
|
* @param {object} store store: object - Store object
|
|
9
16
|
* @returns {object} returnType: ServiceState
|
|
10
17
|
*/
|
|
11
|
-
export declare const getServices: import("reselect").OutputSelector<AppStore,
|
|
18
|
+
export declare const getServices: import("reselect").OutputSelector<AppStore, import("./types").Services, (res: ServiceState) => import("./types").Services>;
|
|
12
19
|
/**
|
|
13
20
|
* Gets map layers from servicename
|
|
14
21
|
*
|
|
@@ -17,40 +24,3 @@ export declare const getServices: import("reselect").OutputSelector<AppStore, an
|
|
|
17
24
|
* @returns {array} returnType: ServiceLayer[]
|
|
18
25
|
*/
|
|
19
26
|
export declare const getServiceLayersByName: (store: AppStore, serviceName: string) => ServiceLayer[];
|
|
20
|
-
/**
|
|
21
|
-
* Gets all dimensions of a layer from a service
|
|
22
|
-
*
|
|
23
|
-
* Example: dimensions = getServiceLayerDimensions(store, 'layer-id')
|
|
24
|
-
* @param {object} store store: object - Store object
|
|
25
|
-
* @param {string} layerId layerId: string - Id of the layer
|
|
26
|
-
* @returns {array} returnType: Dimension[]
|
|
27
|
-
*/
|
|
28
|
-
export declare const getServiceLayerDimensions: (store: AppStore, layerId: string) => Dimension[];
|
|
29
|
-
/**
|
|
30
|
-
* Gets all non time dimensions of a layer from a service
|
|
31
|
-
*
|
|
32
|
-
* Example: nonTimeDimensions = getServiceLayerNonTimeDimensions(store, 'layer-id')
|
|
33
|
-
* @param {object} store store: object - Store object
|
|
34
|
-
* @param {string} layerId layerId: string - Id of the layer
|
|
35
|
-
* @returns {array} returnType: Dimension[]
|
|
36
|
-
*/
|
|
37
|
-
export declare const getServiceLayerNonTimeDimensions: import("reselect").OutputParametricSelector<AppStore, string, Dimension[], (res: Dimension[]) => Dimension[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Gets layers from store by dimension name
|
|
40
|
-
*
|
|
41
|
-
* Example: layer = getServiceLayersByDimension(store, 'dimName')
|
|
42
|
-
* @param {object} store object from which the layer state will be extracted
|
|
43
|
-
* @param {string} dimName dimension Name that the returned layers should contain
|
|
44
|
-
* @returns {array} returnType:Layer[] array containing layers with desired dimension name
|
|
45
|
-
*/
|
|
46
|
-
export declare const getServiceLayersByDimension: (store: AppStore, dimName: string) => Layer[];
|
|
47
|
-
/**
|
|
48
|
-
* Gets layers from store by dimension name for a certain map
|
|
49
|
-
*
|
|
50
|
-
* Example: layer = getMapServiceLayersByDimension(store, 'dimName')
|
|
51
|
-
* @param {object} store object from which the layer state will be extracted
|
|
52
|
-
* @param {string} mapId ]Id of the map
|
|
53
|
-
* @param {string} dimName dimension Name that the returned layers should contain
|
|
54
|
-
* @returns {array} returnType:Layer[] array containing layers containting requested dimension for specified map
|
|
55
|
-
*/
|
|
56
|
-
export declare const getMapServiceLayersByDimension: (store: AppStore, mapId: string, dimName: string) => Layer[];
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Style } from '@opengeoweb/webmap';
|
|
2
2
|
import { Action } from 'redux';
|
|
3
|
-
import {
|
|
4
|
-
import { MAP_SERVICES_SET_LAYERS, MAP_SERVICES_LAYER_SET_STYLES, MAP_SERVICES_LAYER_SET_DIMENSIONS } from './constants';
|
|
3
|
+
import { MAP_SERVICES_SET_LAYERS, MAP_SERVICES_LAYER_SET_STYLES } from './constants';
|
|
5
4
|
export interface ServicesLayerStyles {
|
|
6
5
|
styles: Record<string, unknown>[];
|
|
7
|
-
dimensions?: Dimension[];
|
|
8
6
|
}
|
|
9
7
|
export interface Services {
|
|
10
8
|
[key: string]: Service;
|
|
@@ -23,17 +21,8 @@ export interface ServiceLayer {
|
|
|
23
21
|
path: string;
|
|
24
22
|
}
|
|
25
23
|
export interface ServiceState {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export interface SetLayerDimensionsForServicePayload {
|
|
29
|
-
origin?: string;
|
|
30
|
-
service: string;
|
|
31
|
-
name: string;
|
|
32
|
-
dimensions: Dimension[];
|
|
33
|
-
}
|
|
34
|
-
interface SetLayerDimensionsForService extends Action {
|
|
35
|
-
type: typeof MAP_SERVICES_LAYER_SET_DIMENSIONS;
|
|
36
|
-
payload: SetLayerDimensionsForServicePayload;
|
|
24
|
+
byId: Services;
|
|
25
|
+
allIds: string[];
|
|
37
26
|
}
|
|
38
27
|
export interface SetLayersForServicePayload {
|
|
39
28
|
service: string;
|
|
@@ -53,5 +42,5 @@ interface SetLayerStylesForService extends Action {
|
|
|
53
42
|
type: typeof MAP_SERVICES_LAYER_SET_STYLES;
|
|
54
43
|
payload: SetLayerStylesForServicePayload;
|
|
55
44
|
}
|
|
56
|
-
export declare type ServiceActions =
|
|
45
|
+
export declare type ServiceActions = SetLayersForService | SetLayerStylesForService;
|
|
57
46
|
export {};
|
|
@@ -3,34 +3,34 @@ import { SetActiveMapIdForDialogPayload, UIActions, UIOrderDialogPayload, UIRegi
|
|
|
3
3
|
* Registers the dialog in the store and creates the dialog state
|
|
4
4
|
*
|
|
5
5
|
* Example: registerDialog({'dialogId1', type: 'legend}) you can optionally specify the activeMapId and whether the dialog is open
|
|
6
|
-
* @param {string} payload {type: 'legend' | 'layerManager' | '
|
|
6
|
+
* @param {string} payload {type: 'legend' | 'layerManager' | 'dimensionSelect-elevation', activeMapId?: string, setOpen?: boolean}
|
|
7
7
|
*/
|
|
8
8
|
export declare const registerDialog: (payload: UIRegisterDialogPayload) => UIActions;
|
|
9
9
|
/**
|
|
10
10
|
* Deletes the dialog from the store (from both allIds and byId)
|
|
11
11
|
*
|
|
12
12
|
* Example: unregisterDialog({type: 'legend'})
|
|
13
|
-
* @param {string} payload {type: 'legend' | 'layerManager' | '
|
|
13
|
+
* @param {string} payload {type: 'legend' | 'layerManager' | 'dimensionSelect-elevation'}
|
|
14
14
|
*/
|
|
15
15
|
export declare const unregisterDialog: (payload: UIUnRegisterDialogPayload) => UIActions;
|
|
16
16
|
/**
|
|
17
17
|
* Sets the active map id for a dialogtype
|
|
18
18
|
*
|
|
19
19
|
* Example: setActiveMapIdForDialog({ activeMapId: 'mapId1', type: 'legend'})
|
|
20
|
-
* @param {object} payload object with activeMapId: string, type: 'legend' | 'layerManager' | '
|
|
20
|
+
* @param {object} payload object with activeMapId: string, type: 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
21
21
|
*/
|
|
22
22
|
export declare const setActiveMapIdForDialog: (payload: SetActiveMapIdForDialogPayload) => UIActions;
|
|
23
23
|
/**
|
|
24
24
|
* Toggles the open state to the boolean you pass in
|
|
25
25
|
*
|
|
26
26
|
* Example: setToggleOpenDialog({ type: 'legend', setOpen: true})
|
|
27
|
-
* @param {object} payload object with type: 'legend' | 'layerManager' | '
|
|
27
|
+
* @param {object} payload object with type: 'legend' | 'layerManager' | 'dimensionSelect-elevation', setOpen: boolean (new state of dialog)
|
|
28
28
|
*/
|
|
29
29
|
export declare const setToggleOpenDialog: (payload: UIToggleDialogPayload) => UIActions;
|
|
30
30
|
/**
|
|
31
31
|
* Orders UI element to top
|
|
32
32
|
*
|
|
33
33
|
* Example: orderDialog({ type: 'legend'})
|
|
34
|
-
* @param {object} payload object with type: 'legend' | 'layerManager' | '
|
|
34
|
+
* @param {object} payload object with type: 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
35
35
|
*/
|
|
36
36
|
export declare const orderDialog: (payload: UIOrderDialogPayload) => UIActions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,7 +5,7 @@ import { DialogType, UIType } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* Example: getDialogDetailsByType(store, 'legend')
|
|
7
7
|
* @param {object} store store object from which the ui state wll be extracted
|
|
8
|
-
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | '
|
|
8
|
+
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
9
9
|
* @returns {array} [string, boolean] first element gives the active map id, second element whether the dialog is open
|
|
10
10
|
*/
|
|
11
11
|
export declare const getDialogDetailsByType: (store: AppStore, dialogType: string) => UIType;
|
|
@@ -13,7 +13,7 @@ export declare const getDialogDetailsByType: (store: AppStore, dialogType: strin
|
|
|
13
13
|
* For a given ui component: gets wether the dialog is open or closed
|
|
14
14
|
*
|
|
15
15
|
* @param {object} store store object from which the ui state wll be extracted
|
|
16
|
-
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | '
|
|
16
|
+
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
17
17
|
* @returns {array} [string, boolean] first element gives the active map id, second element whether the dialog is open
|
|
18
18
|
*/
|
|
19
19
|
export declare const getisDialogOpen: import("reselect").OutputParametricSelector<AppStore, string, boolean, (res: UIType) => boolean>;
|
|
@@ -21,7 +21,7 @@ export declare const getisDialogOpen: import("reselect").OutputParametricSelecto
|
|
|
21
21
|
*For a given ui component: gets the active map Id
|
|
22
22
|
*
|
|
23
23
|
* @param {object} store store object from which the ui state wll be extracted
|
|
24
|
-
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | '
|
|
24
|
+
* @param {string} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation'
|
|
25
25
|
* @returns {array} [string, boolean] first element gives the active map id, second element whether the dialog is open
|
|
26
26
|
*/
|
|
27
27
|
export declare const getDialogMapId: import("reselect").OutputParametricSelector<AppStore, string, string, (res: UIType) => string>;
|
|
@@ -29,7 +29,7 @@ export declare const getDialogMapId: import("reselect").OutputParametricSelector
|
|
|
29
29
|
*For a given ui component: gets the order of visible dialog
|
|
30
30
|
*
|
|
31
31
|
* @param {object} store store object from which the ui state wll be extracted
|
|
32
|
-
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | '
|
|
32
|
+
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation' | dimensionSelect-ensemble_member
|
|
33
33
|
* @returns {number} the higher the order number the higher the zIndex
|
|
34
34
|
*/
|
|
35
35
|
export declare const getDialogOrder: import("reselect").OutputParametricSelector<AppStore, DialogType, number, (res: number) => number>;
|
|
@@ -37,7 +37,7 @@ export declare const getDialogOrder: import("reselect").OutputParametricSelector
|
|
|
37
37
|
*For a given ui component: returns if ordered on top
|
|
38
38
|
*
|
|
39
39
|
* @param {object} store store object from which the ui state wll be extracted
|
|
40
|
-
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | '
|
|
40
|
+
* @param {DialogType} dialogType type of the dialog 'legend' | 'layerManager' | 'dimensionSelect-elevation' | dimensionSelect-ensemble_member
|
|
41
41
|
* @returns {boolean}
|
|
42
42
|
*/
|
|
43
43
|
export declare const getDialogIsOrderedOnTop: import("reselect").OutputParametricSelector<AppStore, DialogType, boolean, (res: boolean) => boolean>;
|
package/lib/store/ui/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Action } from 'redux';
|
|
2
2
|
import { UI_SET_ACTIVE_MAPID_FOR_DIALOG, UI_REGISTER_DIALOG, UI_TOGGLE_DIALOG, UI_UNREGISTER_DIALOG, UI_ORDER_DIALOG } from './constants';
|
|
3
|
-
export declare type DialogType = 'legend' | 'layerManager' | 'layerSelect' | '
|
|
3
|
+
export declare type DialogType = 'legend' | 'layerManager' | 'layerSelect' | 'dimensionSelect-elevation' | 'dimensionSelect-ensemble_member';
|
|
4
4
|
export declare type Source = 'app' | 'module';
|
|
5
5
|
export interface UIType {
|
|
6
6
|
type: DialogType;
|
|
@@ -107,11 +107,6 @@ export declare const defaultReduxServices: {
|
|
|
107
107
|
legendURL: string;
|
|
108
108
|
abstracttext: string;
|
|
109
109
|
}[];
|
|
110
|
-
dimensions: {
|
|
111
|
-
name: string;
|
|
112
|
-
units: string;
|
|
113
|
-
currentValue: string;
|
|
114
|
-
}[];
|
|
115
110
|
};
|
|
116
111
|
MULTI_DIMENSION_LAYER: {
|
|
117
112
|
styles: {
|
|
@@ -147,17 +142,6 @@ export declare const defaultReduxServices: {
|
|
|
147
142
|
legendURL: string;
|
|
148
143
|
abstracttext: string;
|
|
149
144
|
}[];
|
|
150
|
-
dimensions: ({
|
|
151
|
-
name: string;
|
|
152
|
-
units: string;
|
|
153
|
-
currentValue: string;
|
|
154
|
-
values?: undefined;
|
|
155
|
-
} | {
|
|
156
|
-
name: string;
|
|
157
|
-
units: string;
|
|
158
|
-
currentValue: string;
|
|
159
|
-
values: string;
|
|
160
|
-
})[];
|
|
161
145
|
};
|
|
162
146
|
LAYER_WITHOUT_TIME: {
|
|
163
147
|
styles: {
|
|
@@ -193,12 +177,6 @@ export declare const defaultReduxServices: {
|
|
|
193
177
|
legendURL: string;
|
|
194
178
|
abstracttext: string;
|
|
195
179
|
}[];
|
|
196
|
-
dimensions: {
|
|
197
|
-
name: string;
|
|
198
|
-
units: string;
|
|
199
|
-
currentValue: string;
|
|
200
|
-
values: string;
|
|
201
|
-
}[];
|
|
202
180
|
};
|
|
203
181
|
};
|
|
204
182
|
};
|
|
@@ -333,17 +311,6 @@ export declare const WmMultiDimensionServices: {
|
|
|
333
311
|
legendURL: string;
|
|
334
312
|
abstracttext: string;
|
|
335
313
|
}[];
|
|
336
|
-
dimensions: ({
|
|
337
|
-
name: string;
|
|
338
|
-
units: string;
|
|
339
|
-
currentValue: string;
|
|
340
|
-
values: string;
|
|
341
|
-
} | {
|
|
342
|
-
name: string;
|
|
343
|
-
units: string;
|
|
344
|
-
currentValue: string;
|
|
345
|
-
values?: undefined;
|
|
346
|
-
})[];
|
|
347
314
|
};
|
|
348
315
|
};
|
|
349
316
|
};
|
|
@@ -357,20 +324,9 @@ export declare const WmMultiDimensionServices: {
|
|
|
357
324
|
layer: {
|
|
358
325
|
RADNL_OPER_R___25PCPRR_L3_KNMI: {
|
|
359
326
|
styles: any[];
|
|
360
|
-
dimensions: {
|
|
361
|
-
name: string;
|
|
362
|
-
units: string;
|
|
363
|
-
currentValue: string;
|
|
364
|
-
}[];
|
|
365
327
|
};
|
|
366
328
|
LAYER_WITHOUT_TIME: {
|
|
367
329
|
styles: any[];
|
|
368
|
-
dimensions: {
|
|
369
|
-
name: string;
|
|
370
|
-
units: string;
|
|
371
|
-
currentValue: string;
|
|
372
|
-
values: string;
|
|
373
|
-
}[];
|
|
374
330
|
};
|
|
375
331
|
};
|
|
376
332
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { WMJSDimension } from '@opengeoweb/webmap';
|
|
3
|
+
export interface Mark {
|
|
4
|
+
value: number | string;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
}
|
|
3
7
|
export declare const marksByDimension: (dim: WMJSDimension) => Mark[];
|
|
4
8
|
/**
|
|
5
9
|
* Re-formats moment's isoString to the string that is expected by WMJSDimension (for time).
|
package/lib/utils/testUtils.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WebMapState, LayerState, Dimension, Layer, WebMapStateModuleState } from '../store/mapStore/types';
|
|
2
2
|
export declare const createWebmapState: (...mapIds: string[]) => WebMapState;
|
|
3
3
|
export declare const createLayersState: (layerId: string, props?: {}) => LayerState;
|
|
4
|
+
export declare const createMultipleLayersState: (layers: Layer[], mapId: string) => LayerState;
|
|
4
5
|
export declare const createMapDimensionsState: (dimensions?: Dimension[], ...mapIds: string[]) => WebMapState;
|
|
5
6
|
export declare const mockStateMapWithLayer: (layer: Layer, mapId: string) => WebMapStateModuleState;
|
|
6
7
|
export declare const mockStateMapWithMultipleLayers: (layers: Layer[], mapId: string) => WebMapStateModuleState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "GeoWeb Core library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
"@material-ui/icons": "^4.9.1",
|
|
18
18
|
"react-intl": "^5.17.5",
|
|
19
19
|
"react-redux": "7.2.2",
|
|
20
|
-
"@opengeoweb/webmap": "1.
|
|
20
|
+
"@opengeoweb/webmap": "2.1.0",
|
|
21
21
|
"moment": "^2.29.0",
|
|
22
22
|
"throttle-debounce": "^3.0.1",
|
|
23
23
|
"proj4": "^2.6.2",
|
|
24
24
|
"react-sortablejs": "^6.0.0",
|
|
25
|
-
"@opengeoweb/shared": "1.
|
|
25
|
+
"@opengeoweb/shared": "2.1.0",
|
|
26
26
|
"@material-ui/lab": "^4.0.0-alpha.56",
|
|
27
|
-
"@opengeoweb/theme": "1.
|
|
27
|
+
"@opengeoweb/theme": "2.1.0",
|
|
28
28
|
"react-draggable": "^4.4.3",
|
|
29
29
|
"re-resizable": "^6.9.0",
|
|
30
30
|
"lodash": "^4.17.20",
|
|
31
|
-
"@opengeoweb/form-fields": "1.
|
|
31
|
+
"@opengeoweb/form-fields": "2.1.0",
|
|
32
32
|
"react-hook-form": "^6.12.1",
|
|
33
33
|
"@material-ui/pickers": "^3.2.10",
|
|
34
34
|
"@date-io/moment": "^1.3.13",
|
|
35
35
|
"moment-timezone": "^0.5.31",
|
|
36
36
|
"axios": "^0.21.4",
|
|
37
|
-
"immer": "^9.0.6",
|
|
38
37
|
"redux-dynamic-modules": "^5.2.0",
|
|
39
38
|
"redux": "^4.0.4",
|
|
40
39
|
"lodash.clonedeep": "^4.5.0",
|
|
40
|
+
"immer": "^9.0.6",
|
|
41
41
|
"reselect": "^4.0.0",
|
|
42
42
|
"redux-dynamic-modules-saga": "^5.2.0",
|
|
43
43
|
"redux-saga": "^1.1.3"
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DimensionConfig } from './types';
|
|
2
|
-
export declare const dimensionConfig: DimensionConfig[];
|
|
3
|
-
export declare const dimensionIcons: Map<string, import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface MultiDimensionSelectConnectProps {
|
|
3
|
-
mapId: string;
|
|
4
|
-
showDialogs?: boolean;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Component used to control values for all dimension other than time and ref.time
|
|
8
|
-
*
|
|
9
|
-
* Expects the following props:
|
|
10
|
-
* @param {string} mapId mapId: string - Id of the map
|
|
11
|
-
* @example
|
|
12
|
-
* ``` <MultiDimensionSelectConnect mapId="mapid_1" /> ```
|
|
13
|
-
*/
|
|
14
|
-
declare const MultiDimensionSelectConnect: React.FC<MultiDimensionSelectConnectProps>;
|
|
15
|
-
export default MultiDimensionSelectConnect;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DimensionSliderData } from './types';
|
|
3
|
-
export interface MultiDimensionSelectDialogProps {
|
|
4
|
-
sliderDataArray: DimensionSliderData[];
|
|
5
|
-
isDialogOpen?: boolean;
|
|
6
|
-
dimension: string;
|
|
7
|
-
handleSyncChanged: (layerId: string, dimensionName: string) => void;
|
|
8
|
-
handleDimensionValueChanged: (layerId: string, dimensionName: string, dimensionValue: string, changeSynched: boolean) => void;
|
|
9
|
-
onMouseDown?: () => void;
|
|
10
|
-
onToggleDialog?: (isDialogOpen: boolean) => void;
|
|
11
|
-
index?: number;
|
|
12
|
-
order?: number;
|
|
13
|
-
}
|
|
14
|
-
declare const MultiDimensionSelectDialog: React.FC<MultiDimensionSelectDialogProps>;
|
|
15
|
-
export default MultiDimensionSelectDialog;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { MultiDimensionSelectDialogProps } from './MultiDimensionSelectDialog';
|
|
3
|
-
interface MultiDimensionSelectDialogConnectProps extends MultiDimensionSelectDialogProps {
|
|
4
|
-
mapId: string;
|
|
5
|
-
isDialogOpen?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const MultiDimensionSelectDialogConnect: React.FC<MultiDimensionSelectDialogConnectProps>;
|
|
8
|
-
export default MultiDimensionSelectDialogConnect;
|