@opengeoweb/store 15.1.0 → 15.3.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/index.esm.js +380 -109
- package/package.json +6 -6
- package/src/store/generic/selectors.d.ts +22 -0
- package/src/store/generic/syncGroups/hooks.d.ts +8 -0
- package/src/store/generic/syncGroups/hooks.spec.d.ts +1 -0
- package/src/store/generic/syncGroups/index.d.ts +1 -0
- package/src/store/map/index.d.ts +1 -1
- package/src/store/map/layer/selectors.d.ts +33 -0
- package/src/store/map/layer/types.d.ts +2 -0
- package/src/store/map/map/reducer.d.ts +9 -3
- package/src/store/map/map/selectors.d.ts +157 -13
- package/src/store/map/map/types.d.ts +45 -2
package/index.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createSlice, createSelector, createAction, createListenerMiddleware, isAnyOf, createEntityAdapter, combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
2
|
-
import { isEqual, merge, isEmpty, compact } from 'lodash';
|
|
2
|
+
import { isEqual, mergeWith, merge, isEmpty, compact } from 'lodash';
|
|
3
3
|
import { webmapUtils, parseISO8601IntervalToDateInterval, LayerType, handleDateUtilsISOString, webmapTestSettings, WMLayer, getWMLayerById, WMInvalidDateValues, isProjectionSupported, queryWMSLayers } from '@opengeoweb/webmap';
|
|
4
|
-
import { dateUtils, PROJECTION, defaultDelay } from '@opengeoweb/shared';
|
|
4
|
+
import { dateUtils, PROJECTION, defaultDelay, useDebounce } from '@opengeoweb/shared';
|
|
5
5
|
import { secondsPerPxFromCanvasWidth, defaultTimeSpan, defaultSecondsPerPx, defaultAnimationDelayAtStart, defaultTimeStep, roundWithTimeStep, getSpeedDelay } from '@opengeoweb/time-slider';
|
|
6
6
|
import { produce } from 'immer';
|
|
7
7
|
import { getLastEmptyFeatureIndex, getGeoJson, moveFeature, createInterSections, defaultLayers, emptyGeoJSON, defaultIntersectionStyleProperties, addSelectionTypeToGeoJSON, getFeatureCollection } from '@opengeoweb/webmap-react';
|
|
8
8
|
export { defaultLayers } from '@opengeoweb/webmap-react';
|
|
9
|
+
import React, { useEffect, useCallback } from 'react';
|
|
10
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
9
11
|
import { center } from '@turf/turf';
|
|
10
|
-
import { useEffect, useCallback } from 'react';
|
|
11
|
-
import { useSelector, useDispatch } from 'react-redux';
|
|
12
12
|
import { metronome } from '@opengeoweb/metronome';
|
|
13
13
|
import { View, Observable } from 'ol';
|
|
14
14
|
import { boundingExtent, getCenter } from 'ol/extent';
|
|
@@ -1610,7 +1610,7 @@ var produceDraftStateForAllLayersForDimensionWithinMap = function produceDraftSt
|
|
|
1610
1610
|
var actionLayerSynced = isActionLayerSynced(draft, layerIdFromAction, dimension);
|
|
1611
1611
|
draft.allIds.forEach(function (layerId) {
|
|
1612
1612
|
var layer = draft.byId[layerId];
|
|
1613
|
-
if (!layer || layer.mapId !== mapId) {
|
|
1613
|
+
if (!layer || (layer === null || layer === void 0 ? void 0 : layer.mapId) !== mapId) {
|
|
1614
1614
|
return;
|
|
1615
1615
|
}
|
|
1616
1616
|
var wmjsDimension = webmapUtils.getWMJSDimensionForLayerAndDimension(layerId, dimension.name);
|
|
@@ -1823,6 +1823,9 @@ var slice$6 = createSlice({
|
|
|
1823
1823
|
if (draft.byId[layerId]) {
|
|
1824
1824
|
draft.byId[layerId].style = style;
|
|
1825
1825
|
}
|
|
1826
|
+
if (draft.activeLayerInfo) {
|
|
1827
|
+
draft.activeLayerInfo.style = style;
|
|
1828
|
+
}
|
|
1826
1829
|
},
|
|
1827
1830
|
layerChangeAcceptanceTime: function layerChangeAcceptanceTime(draft, action) {
|
|
1828
1831
|
var _action$payload7 = action.payload,
|
|
@@ -2012,7 +2015,8 @@ var slice$6 = createSlice({
|
|
|
2012
2015
|
mapId = _action$payload13.mapId;
|
|
2013
2016
|
// remove current baselayers for passed map
|
|
2014
2017
|
draft.availableBaseLayers.allIds = draft.availableBaseLayers.allIds.filter(function (layerId) {
|
|
2015
|
-
|
|
2018
|
+
var _draft$availableBaseL;
|
|
2019
|
+
if (((_draft$availableBaseL = draft.availableBaseLayers.byId[layerId]) === null || _draft$availableBaseL === void 0 ? void 0 : _draft$availableBaseL.mapId) === mapId) {
|
|
2016
2020
|
delete draft.availableBaseLayers.byId[layerId];
|
|
2017
2021
|
return false;
|
|
2018
2022
|
}
|
|
@@ -2192,7 +2196,15 @@ var slice$6 = createSlice({
|
|
|
2192
2196
|
currentLayer.selectedFeatureIndex = newFeatureIndex;
|
|
2193
2197
|
}
|
|
2194
2198
|
}
|
|
2195
|
-
|
|
2199
|
+
var updatedGeoJSONWithIds = shouldAllowMultipleShapes ? _objectSpread2(_objectSpread2({}, updatedGeoJSON), {}, {
|
|
2200
|
+
features: updatedGeoJSON.features.map(function (feature, index) {
|
|
2201
|
+
return _objectSpread2(_objectSpread2({}, feature), {}, {
|
|
2202
|
+
// Save the index as id so we can use it to select features
|
|
2203
|
+
id: index
|
|
2204
|
+
});
|
|
2205
|
+
})
|
|
2206
|
+
}) : updatedGeoJSON;
|
|
2207
|
+
currentLayer.geojson = updatedGeoJSONWithIds;
|
|
2196
2208
|
if (geoJSONIntersectionBoundsLayerId && geoJSONIntersectionLayerId) {
|
|
2197
2209
|
var _currentLayer$geojson;
|
|
2198
2210
|
var intersectionLayer = draft.byId[geoJSONIntersectionLayerId];
|
|
@@ -2202,7 +2214,7 @@ var slice$6 = createSlice({
|
|
|
2202
2214
|
}
|
|
2203
2215
|
var bounds = intersectionBoundsLayer.geojson;
|
|
2204
2216
|
var geoJSONProperties = intersectionLayer.defaultGeoJSONProperties || ((_currentLayer$geojson = currentLayer.geojson) === null || _currentLayer$geojson === void 0 || (_currentLayer$geojson = _currentLayer$geojson.features[0]) === null || _currentLayer$geojson === void 0 ? void 0 : _currentLayer$geojson.properties);
|
|
2205
|
-
intersectionLayer.geojson = createInterSections(
|
|
2217
|
+
intersectionLayer.geojson = createInterSections(updatedGeoJSONWithIds, bounds, geoJSONProperties);
|
|
2206
2218
|
}
|
|
2207
2219
|
},
|
|
2208
2220
|
updateFeatureProperties: function updateFeatureProperties(draft, action) {
|
|
@@ -2279,10 +2291,12 @@ var slice$6 = createSlice({
|
|
|
2279
2291
|
showLayerInfo: function showLayerInfo(draft, action) {
|
|
2280
2292
|
var _action$payload21 = action.payload,
|
|
2281
2293
|
serviceUrl = _action$payload21.serviceUrl,
|
|
2282
|
-
layerName = _action$payload21.layerName
|
|
2294
|
+
layerName = _action$payload21.layerName,
|
|
2295
|
+
style = _action$payload21.style;
|
|
2283
2296
|
draft.activeLayerInfo = {
|
|
2284
2297
|
serviceUrl: serviceUrl,
|
|
2285
|
-
layerName: layerName
|
|
2298
|
+
layerName: layerName,
|
|
2299
|
+
style: style
|
|
2286
2300
|
};
|
|
2287
2301
|
},
|
|
2288
2302
|
hideLayerInfo: function hideLayerInfo(draft) {
|
|
@@ -2340,7 +2354,7 @@ var slice$6 = createSlice({
|
|
|
2340
2354
|
var layers = draft.allIds.map(function (id) {
|
|
2341
2355
|
return draft.byId[id];
|
|
2342
2356
|
}).filter(function (layer) {
|
|
2343
|
-
return layer
|
|
2357
|
+
return (layer === null || layer === void 0 ? void 0 : layer.mapId) === mapId;
|
|
2344
2358
|
});
|
|
2345
2359
|
layers.forEach(function (layer) {
|
|
2346
2360
|
delete draft.byId[layer.id];
|
|
@@ -2710,35 +2724,68 @@ var slice$5 = createSlice({
|
|
|
2710
2724
|
}
|
|
2711
2725
|
draft.byId[mapId].dockedLayerManagerSize = dockedLayerManagerSize;
|
|
2712
2726
|
},
|
|
2727
|
+
setDockedLayerManagerPosition: function setDockedLayerManagerPosition(draft, action) {
|
|
2728
|
+
var _action$payload25 = action.payload,
|
|
2729
|
+
mapId = _action$payload25.mapId,
|
|
2730
|
+
dockedLayerManagerPosition = _action$payload25.dockedLayerManagerPosition;
|
|
2731
|
+
if (!draft.byId[mapId]) {
|
|
2732
|
+
return;
|
|
2733
|
+
}
|
|
2734
|
+
draft.byId[mapId].dockedLayerManagerPosition = dockedLayerManagerPosition;
|
|
2735
|
+
},
|
|
2736
|
+
setDockedLayerManagerDimensions: function setDockedLayerManagerDimensions(draft, action) {
|
|
2737
|
+
var _action$payload26 = action.payload,
|
|
2738
|
+
mapId = _action$payload26.mapId,
|
|
2739
|
+
dockedLayerManagerDimensions = _action$payload26.dockedLayerManagerDimensions;
|
|
2740
|
+
if (!draft.byId[mapId]) {
|
|
2741
|
+
return;
|
|
2742
|
+
}
|
|
2743
|
+
draft.byId[mapId].dockedLayerManagerDimensions = dockedLayerManagerDimensions;
|
|
2744
|
+
},
|
|
2713
2745
|
setMapPresetError: function setMapPresetError(_draft, _action) {},
|
|
2714
2746
|
setDefaultMapSettings: function setDefaultMapSettings(draft, action) {
|
|
2715
2747
|
draft.defaultMapSettings = action.payload.preset;
|
|
2716
2748
|
},
|
|
2717
2749
|
changeOverlayer: function changeOverlayer(draft, action) {
|
|
2718
|
-
var _action$
|
|
2719
|
-
mapId = _action$
|
|
2720
|
-
selectedOverlayer = _action$
|
|
2750
|
+
var _action$payload27 = action.payload,
|
|
2751
|
+
mapId = _action$payload27.mapId,
|
|
2752
|
+
selectedOverlayer = _action$payload27.selectedOverlayer;
|
|
2721
2753
|
if (!draft.byId[mapId]) {
|
|
2722
2754
|
return;
|
|
2723
2755
|
}
|
|
2724
2756
|
draft.byId[mapId].overLayers = [selectedOverlayer];
|
|
2725
2757
|
},
|
|
2726
2758
|
toggleClock: function toggleClock(draft, action) {
|
|
2727
|
-
var _action$
|
|
2728
|
-
mapId = _action$
|
|
2729
|
-
isClockVisible = _action$
|
|
2759
|
+
var _action$payload28 = action.payload,
|
|
2760
|
+
mapId = _action$payload28.mapId,
|
|
2761
|
+
isClockVisible = _action$payload28.isClockVisible;
|
|
2730
2762
|
if (!draft.byId[mapId]) {
|
|
2731
2763
|
return;
|
|
2732
2764
|
}
|
|
2733
2765
|
draft.byId[mapId].isClockVisible = isClockVisible;
|
|
2766
|
+
},
|
|
2767
|
+
setClockPositionSize: function setClockPositionSize(draft, action) {
|
|
2768
|
+
var _action$payload29 = action.payload,
|
|
2769
|
+
mapId = _action$payload29.mapId,
|
|
2770
|
+
position = _action$payload29.position,
|
|
2771
|
+
size = _action$payload29.size;
|
|
2772
|
+
if (!draft.byId[mapId]) {
|
|
2773
|
+
return;
|
|
2774
|
+
}
|
|
2775
|
+
if (position) {
|
|
2776
|
+
draft.byId[mapId].clockPosition = position;
|
|
2777
|
+
}
|
|
2778
|
+
if (size) {
|
|
2779
|
+
draft.byId[mapId].clockSize = size;
|
|
2780
|
+
}
|
|
2734
2781
|
}
|
|
2735
2782
|
},
|
|
2736
2783
|
extraReducers: function extraReducers(builder) {
|
|
2737
2784
|
builder.addCase(layerActions.addLayer, function (draft, action) {
|
|
2738
|
-
var _action$
|
|
2739
|
-
layerId = _action$
|
|
2740
|
-
mapId = _action$
|
|
2741
|
-
layer = _action$
|
|
2785
|
+
var _action$payload30 = action.payload,
|
|
2786
|
+
layerId = _action$payload30.layerId,
|
|
2787
|
+
mapId = _action$payload30.mapId,
|
|
2788
|
+
layer = _action$payload30.layer;
|
|
2742
2789
|
if (!draft.byId[mapId]) {
|
|
2743
2790
|
return;
|
|
2744
2791
|
}
|
|
@@ -2750,17 +2797,17 @@ var slice$5 = createSlice({
|
|
|
2750
2797
|
draft.byId[mapId].autoUpdateLayerId = layerId;
|
|
2751
2798
|
draft.byId[mapId].autoTimeStepLayerId = layerId;
|
|
2752
2799
|
}
|
|
2753
|
-
var isFeatureLayer = layer
|
|
2800
|
+
var isFeatureLayer = (layer === null || layer === void 0 ? void 0 : layer.layerType) === LayerType.featureLayer;
|
|
2754
2801
|
if (isFeatureLayer) {
|
|
2755
2802
|
draft.byId[mapId].featureLayers.unshift(layerId);
|
|
2756
2803
|
} else {
|
|
2757
2804
|
draft.byId[mapId].mapLayers.unshift(layerId);
|
|
2758
2805
|
}
|
|
2759
2806
|
}).addCase(layerActions.duplicateMapLayer, function (draft, action) {
|
|
2760
|
-
var _action$
|
|
2761
|
-
newLayerId = _action$
|
|
2762
|
-
oldLayerId = _action$
|
|
2763
|
-
mapId = _action$
|
|
2807
|
+
var _action$payload31 = action.payload,
|
|
2808
|
+
newLayerId = _action$payload31.newLayerId,
|
|
2809
|
+
oldLayerId = _action$payload31.oldLayerId,
|
|
2810
|
+
mapId = _action$payload31.mapId;
|
|
2764
2811
|
if (!draft.byId[mapId]) {
|
|
2765
2812
|
return;
|
|
2766
2813
|
}
|
|
@@ -2777,10 +2824,10 @@ var slice$5 = createSlice({
|
|
|
2777
2824
|
draft.byId[mapId].featureLayers.unshift(newLayerId);
|
|
2778
2825
|
}
|
|
2779
2826
|
}).addCase(layerActions.addBaseLayer, function (draft, action) {
|
|
2780
|
-
var _action$
|
|
2781
|
-
layer = _action$
|
|
2782
|
-
layerId = _action$
|
|
2783
|
-
mapId = _action$
|
|
2827
|
+
var _action$payload32 = action.payload,
|
|
2828
|
+
layer = _action$payload32.layer,
|
|
2829
|
+
layerId = _action$payload32.layerId,
|
|
2830
|
+
mapId = _action$payload32.mapId;
|
|
2784
2831
|
if (!draft.byId[mapId]) {
|
|
2785
2832
|
return;
|
|
2786
2833
|
}
|
|
@@ -2810,9 +2857,9 @@ var slice$5 = createSlice({
|
|
|
2810
2857
|
draft.byId[mapId].autoTimeStepLayerId = activeLayerId;
|
|
2811
2858
|
}
|
|
2812
2859
|
}).addCase(layerActions.setBaseLayers, function (draft, action) {
|
|
2813
|
-
var _action$
|
|
2814
|
-
layers = _action$
|
|
2815
|
-
mapId = _action$
|
|
2860
|
+
var _action$payload33 = action.payload,
|
|
2861
|
+
layers = _action$payload33.layers,
|
|
2862
|
+
mapId = _action$payload33.mapId;
|
|
2816
2863
|
// Split into base and overlayers
|
|
2817
2864
|
var baseLayers = [];
|
|
2818
2865
|
var overLayers = [];
|
|
@@ -2842,9 +2889,9 @@ var slice$5 = createSlice({
|
|
|
2842
2889
|
}
|
|
2843
2890
|
}
|
|
2844
2891
|
}).addCase(layerActions.layerDelete, function (draft, action) {
|
|
2845
|
-
var _action$
|
|
2846
|
-
mapId = _action$
|
|
2847
|
-
layerId = _action$
|
|
2892
|
+
var _action$payload34 = action.payload,
|
|
2893
|
+
mapId = _action$payload34.mapId,
|
|
2894
|
+
layerId = _action$payload34.layerId;
|
|
2848
2895
|
var map = draft.byId[mapId];
|
|
2849
2896
|
if (!map) {
|
|
2850
2897
|
return;
|
|
@@ -2870,9 +2917,9 @@ var slice$5 = createSlice({
|
|
|
2870
2917
|
return id !== layerId;
|
|
2871
2918
|
});
|
|
2872
2919
|
}).addCase(layerActions.baseLayerDelete, function (draft, action) {
|
|
2873
|
-
var _action$
|
|
2874
|
-
mapId = _action$
|
|
2875
|
-
layerId = _action$
|
|
2920
|
+
var _action$payload35 = action.payload,
|
|
2921
|
+
mapId = _action$payload35.mapId,
|
|
2922
|
+
layerId = _action$payload35.layerId;
|
|
2876
2923
|
if (!draft.byId[mapId]) {
|
|
2877
2924
|
return;
|
|
2878
2925
|
}
|
|
@@ -2883,14 +2930,14 @@ var slice$5 = createSlice({
|
|
|
2883
2930
|
return id !== layerId;
|
|
2884
2931
|
});
|
|
2885
2932
|
}).addCase(layerActions.layerChangeDimension, function (draft, action) {
|
|
2886
|
-
var _action$
|
|
2887
|
-
layerId = _action$
|
|
2888
|
-
dimension = _action$
|
|
2933
|
+
var _action$payload36 = action.payload,
|
|
2934
|
+
layerId = _action$payload36.layerId,
|
|
2935
|
+
dimension = _action$payload36.dimension;
|
|
2889
2936
|
produceDraftStateSetMapDimensionFromLayerChangeDimension(draft, layerId, dimension);
|
|
2890
2937
|
}).addCase(setTimeSync, function (draft, action) {
|
|
2891
|
-
var _action$
|
|
2892
|
-
targetsFromAction = _action$
|
|
2893
|
-
source = _action$
|
|
2938
|
+
var _action$payload37 = action.payload,
|
|
2939
|
+
targetsFromAction = _action$payload37.targets,
|
|
2940
|
+
source = _action$payload37.source;
|
|
2894
2941
|
/* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
|
|
2895
2942
|
var targets = [];
|
|
2896
2943
|
if (source) {
|
|
@@ -2943,9 +2990,9 @@ var slice$5 = createSlice({
|
|
|
2943
2990
|
}
|
|
2944
2991
|
});
|
|
2945
2992
|
}).addCase(setBboxSync, function (draft, action) {
|
|
2946
|
-
var _action$
|
|
2947
|
-
targetsFromAction = _action$
|
|
2948
|
-
source = _action$
|
|
2993
|
+
var _action$payload38 = action.payload,
|
|
2994
|
+
targetsFromAction = _action$payload38.targets,
|
|
2995
|
+
source = _action$payload38.source;
|
|
2949
2996
|
/* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
|
|
2950
2997
|
var targets = [];
|
|
2951
2998
|
if (source) {
|
|
@@ -2977,9 +3024,9 @@ var slice$5 = createSlice({
|
|
|
2977
3024
|
* These targets can be used as payloads in new Layer actions.
|
|
2978
3025
|
* These actions are here handled via the layer reducer, as it is the same logic
|
|
2979
3026
|
*/
|
|
2980
|
-
var _action$
|
|
2981
|
-
targets = _action$
|
|
2982
|
-
source = _action$
|
|
3027
|
+
var _action$payload39 = action.payload,
|
|
3028
|
+
targets = _action$payload39.targets,
|
|
3029
|
+
source = _action$payload39.source;
|
|
2983
3030
|
return targets.reduce(function (prevState, target) {
|
|
2984
3031
|
var actionType = (source === null || source === void 0 ? void 0 : source.type) || 'GENERIC_SYNC_SETLAYERACTIONS';
|
|
2985
3032
|
var action = {
|
|
@@ -3001,9 +3048,9 @@ var slice$5 = createSlice({
|
|
|
3001
3048
|
});
|
|
3002
3049
|
return draft;
|
|
3003
3050
|
}).addCase(mapChangeDimension, function (draft, action) {
|
|
3004
|
-
var _action$
|
|
3005
|
-
mapId = _action$
|
|
3006
|
-
dimensionFromAction = _action$
|
|
3051
|
+
var _action$payload40 = action.payload,
|
|
3052
|
+
mapId = _action$payload40.mapId,
|
|
3053
|
+
dimensionFromAction = _action$payload40.dimension;
|
|
3007
3054
|
produceDraftStateSetWebMapDimension(draft, mapId, dimensionFromAction, true);
|
|
3008
3055
|
}).addCase(setMapPreset, function (draft, action) {
|
|
3009
3056
|
var mapId = action.payload.mapId;
|
|
@@ -3023,9 +3070,9 @@ var slice$5 = createSlice({
|
|
|
3023
3070
|
draft.byId[mapId].animationDelay = defaultAnimationDelayAtStart;
|
|
3024
3071
|
draft.byId[mapId].dockedLayerManagerSize = '';
|
|
3025
3072
|
}).addCase(uiActions.registerDialog, function (draft, action) {
|
|
3026
|
-
var _action$
|
|
3027
|
-
mapId = _action$
|
|
3028
|
-
type = _action$
|
|
3073
|
+
var _action$payload41 = action.payload,
|
|
3074
|
+
mapId = _action$payload41.mapId,
|
|
3075
|
+
type = _action$payload41.type;
|
|
3029
3076
|
if (!draft.byId[mapId]) {
|
|
3030
3077
|
return;
|
|
3031
3078
|
}
|
|
@@ -3276,14 +3323,31 @@ var slice$4 = createSlice({
|
|
|
3276
3323
|
if (synchronizationGroup.targets.allIds.includes(targetId)) {
|
|
3277
3324
|
return;
|
|
3278
3325
|
}
|
|
3279
|
-
var isSourceLinked = (_synchronizationGroup = synchronizationGroup.targets.byId[targetId]) === null || _synchronizationGroup === void 0 ? void 0 : _synchronizationGroup.linked;
|
|
3280
3326
|
synchronizationGroup.targets.allIds.push(targetId);
|
|
3281
3327
|
synchronizationGroup.targets.byId[targetId] = {
|
|
3282
3328
|
linked: linked !== false
|
|
3283
3329
|
};
|
|
3330
|
+
var isSourceLinked = (_synchronizationGroup = synchronizationGroup.targets.byId[targetId]) === null || _synchronizationGroup === void 0 ? void 0 : _synchronizationGroup.linked;
|
|
3284
3331
|
if (isSourceLinked) {
|
|
3285
|
-
|
|
3286
|
-
|
|
3332
|
+
// In order to make syncgroup work correctly we need to have defaults
|
|
3333
|
+
var defaultS = {
|
|
3334
|
+
payloadByType: {
|
|
3335
|
+
SYNCGROUPS_TYPE_SETTIME: {
|
|
3336
|
+
value: {
|
|
3337
|
+
timeSliderSpan: defaultTimeSpan,
|
|
3338
|
+
timeSliderStep: defaultTimeStep
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
};
|
|
3343
|
+
if (draft.sources.byId[targetId]) {
|
|
3344
|
+
// Assign object based on 1: defaults, 2: The values in the group, 3: the values of the source.
|
|
3345
|
+
mergeWith(draft.sources.byId[targetId], defaultS, synchronizationGroup, draft.sources.byId[targetId],
|
|
3346
|
+
// eslint-disable-next-line id-length, @typescript-eslint/no-unsafe-return
|
|
3347
|
+
function (a, b) {
|
|
3348
|
+
return b === null ? a : undefined;
|
|
3349
|
+
});
|
|
3350
|
+
}
|
|
3287
3351
|
}
|
|
3288
3352
|
},
|
|
3289
3353
|
syncGroupRemoveTarget: function syncGroupRemoveTarget(draft, action) {
|
|
@@ -3408,13 +3472,13 @@ var setBboxOrTimeSync = function setBboxOrTimeSync(draft, action) {
|
|
|
3408
3472
|
}
|
|
3409
3473
|
};
|
|
3410
3474
|
var _slice$actions = slice$4.actions,
|
|
3411
|
-
syncGroupAddGroup = _slice$actions.syncGroupAddGroup
|
|
3412
|
-
_slice$actions.syncGroupAddSource
|
|
3413
|
-
|
|
3475
|
+
syncGroupAddGroup = _slice$actions.syncGroupAddGroup,
|
|
3476
|
+
syncGroupAddSource = _slice$actions.syncGroupAddSource,
|
|
3477
|
+
syncGroupAddTarget = _slice$actions.syncGroupAddTarget;
|
|
3414
3478
|
_slice$actions.syncGroupClear;
|
|
3415
3479
|
_slice$actions.syncGroupLinkTarget;
|
|
3416
3480
|
_slice$actions.syncGroupRemoveGroup;
|
|
3417
|
-
_slice$actions.syncGroupRemoveSource;
|
|
3481
|
+
var syncGroupRemoveSource = _slice$actions.syncGroupRemoveSource;
|
|
3418
3482
|
_slice$actions.syncGroupRemoveTarget;
|
|
3419
3483
|
_slice$actions.syncGroupSetViewState;
|
|
3420
3484
|
var syncGroupsReducer = slice$4.reducer,
|
|
@@ -3918,7 +3982,7 @@ function (state, mapId) {
|
|
|
3918
3982
|
var selectedFeature = (_features$ = features[0]) === null || _features$ === void 0 ? void 0 : _features$.geoJSON.features.find(function (feature) {
|
|
3919
3983
|
return feature.id === selectedFeatureId;
|
|
3920
3984
|
});
|
|
3921
|
-
if (selectedFeature
|
|
3985
|
+
if ((selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.geometry.type) === 'Point') {
|
|
3922
3986
|
var _selectedFeature$prop, _selectedFeature$prop2, _selectedFeature$prop3;
|
|
3923
3987
|
var coordinates = selectedFeature.geometry.coordinates;
|
|
3924
3988
|
return {
|
|
@@ -3961,12 +4025,26 @@ var getSelectedFeatureAsGeoJSON = createSelector([function (state, mapId) {
|
|
|
3961
4025
|
});
|
|
3962
4026
|
return selectedFeature;
|
|
3963
4027
|
});
|
|
4028
|
+
var getSyncedStartCenterEndStepCurrentTime = createSelector(function (coreAppStore, sourceId) {
|
|
4029
|
+
return getTime(getSynchronizationGroupStore(coreAppStore), sourceId);
|
|
4030
|
+
}, function (store) {
|
|
4031
|
+
if (!(store !== null && store !== void 0 && store.timeSliderCenterTime) || !(store !== null && store !== void 0 && store.timeSliderSpan)) {
|
|
4032
|
+
return undefined;
|
|
4033
|
+
}
|
|
4034
|
+
return {
|
|
4035
|
+
start: Math.round(store.timeSliderCenterTime - store.timeSliderSpan / 2),
|
|
4036
|
+
end: Math.round(store.timeSliderCenterTime + store.timeSliderSpan / 2),
|
|
4037
|
+
step: (store === null || store === void 0 ? void 0 : store.timeSliderStep) || 60,
|
|
4038
|
+
current: dateUtils.unixFromISOString(store === null || store === void 0 ? void 0 : store.currentTime)
|
|
4039
|
+
};
|
|
4040
|
+
}, selectorMemoizationOptions);
|
|
3964
4041
|
|
|
3965
4042
|
var selectors$5 = /*#__PURE__*/Object.freeze({
|
|
3966
4043
|
__proto__: null,
|
|
3967
4044
|
getLinkedMaps: getLinkedMaps,
|
|
3968
4045
|
getSelectedFeature: getSelectedFeature,
|
|
3969
4046
|
getSelectedFeatureAsGeoJSON: getSelectedFeatureAsGeoJSON,
|
|
4047
|
+
getSyncedStartCenterEndStepCurrentTime: getSyncedStartCenterEndStepCurrentTime,
|
|
3970
4048
|
getSynchronizationGroupStore: getSynchronizationGroupStore,
|
|
3971
4049
|
getTime: getTime,
|
|
3972
4050
|
selectLinkedFeatures: selectLinkedFeatures,
|
|
@@ -3976,6 +4054,60 @@ var selectors$5 = /*#__PURE__*/Object.freeze({
|
|
|
3976
4054
|
selectSharedData: selectSharedData
|
|
3977
4055
|
});
|
|
3978
4056
|
|
|
4057
|
+
/* *
|
|
4058
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4059
|
+
* you may not use this file except in compliance with the License.
|
|
4060
|
+
* You may obtain a copy of the License at
|
|
4061
|
+
*
|
|
4062
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4063
|
+
*
|
|
4064
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4065
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4066
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4067
|
+
* See the License for the specific language governing permissions and
|
|
4068
|
+
* limitations under the License.
|
|
4069
|
+
*
|
|
4070
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4071
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
4072
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
4073
|
+
* */
|
|
4074
|
+
/**
|
|
4075
|
+
* This registers a new syncgroup souce for given panel id. The source is not synced to any group by default.
|
|
4076
|
+
* When the user links the source with a group, this hook returns an object with the timeslider state: start, end, step and current time.
|
|
4077
|
+
* @param panelId panelId to register
|
|
4078
|
+
* @returns the timeslider state
|
|
4079
|
+
*/
|
|
4080
|
+
var useSyncgroupTimeState = function useSyncgroupTimeState(panelId) {
|
|
4081
|
+
var debounceMs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
4082
|
+
var dispatch = useDispatch();
|
|
4083
|
+
var syncGroupsAddSourceCallBack = React.useCallback(function (payload) {
|
|
4084
|
+
dispatch(syncGroupAddSource(payload));
|
|
4085
|
+
}, [dispatch]);
|
|
4086
|
+
var syncGroupRemoveSourceCallback = React.useCallback(function (payload) {
|
|
4087
|
+
dispatch(syncGroupRemoveSource(payload));
|
|
4088
|
+
}, [dispatch]);
|
|
4089
|
+
// Register
|
|
4090
|
+
useEffect(function () {
|
|
4091
|
+
syncGroupsAddSourceCallBack({
|
|
4092
|
+
id: panelId,
|
|
4093
|
+
type: [SYNCGROUPS_TYPE_SETTIME]
|
|
4094
|
+
});
|
|
4095
|
+
return function () {
|
|
4096
|
+
syncGroupRemoveSourceCallback({
|
|
4097
|
+
id: panelId
|
|
4098
|
+
});
|
|
4099
|
+
};
|
|
4100
|
+
}, [panelId, syncGroupsAddSourceCallBack, syncGroupRemoveSourceCallback]);
|
|
4101
|
+
var syncGroupTimeSliderCenterStartEndStep = useSelector(function (store) {
|
|
4102
|
+
return getSyncedStartCenterEndStepCurrentTime(store, panelId);
|
|
4103
|
+
});
|
|
4104
|
+
var syncTargets = useSelector(function (store) {
|
|
4105
|
+
return getAllTargetGroupsForSource(store, panelId);
|
|
4106
|
+
});
|
|
4107
|
+
var isSyncgroupLinked = syncTargets.length > 0;
|
|
4108
|
+
return useDebounce(isSyncgroupLinked ? syncGroupTimeSliderCenterStartEndStep : undefined, debounceMs);
|
|
4109
|
+
};
|
|
4110
|
+
|
|
3979
4111
|
var useUpdateSharedData = function useUpdateSharedData(data, panelId) {
|
|
3980
4112
|
var sharedData = useSelector(function (state) {
|
|
3981
4113
|
return selectSharedData(state, panelId);
|
|
@@ -4743,6 +4875,20 @@ var getLayerService = createSelector(getLayerById, function (layer) {
|
|
|
4743
4875
|
var _layer$service;
|
|
4744
4876
|
return (_layer$service = layer === null || layer === void 0 ? void 0 : layer.service) !== null && _layer$service !== void 0 ? _layer$service : '';
|
|
4745
4877
|
}, selectorMemoizationOptions);
|
|
4878
|
+
/**
|
|
4879
|
+
* Gets layer service name
|
|
4880
|
+
*
|
|
4881
|
+
* Example: layerService = getLayerServiceName(store, 'layerId_1')
|
|
4882
|
+
* @param {object} store store: object - object from which the layers state will be extracted
|
|
4883
|
+
* @param {string} layerId layerId: string - Id of the layer
|
|
4884
|
+
* @returns {string} returnType: string - layer service name
|
|
4885
|
+
*/
|
|
4886
|
+
var getLayerServiceName = createSelector(function (store) {
|
|
4887
|
+
return store;
|
|
4888
|
+
}, getLayerById, getLayerService, function (store, layer, service) {
|
|
4889
|
+
var layerService = getServiceByUrl(store, service);
|
|
4890
|
+
return layerService !== null && layerService !== void 0 && layerService.name ? layerService === null || layerService === void 0 ? void 0 : layerService.name : '';
|
|
4891
|
+
}, selectorMemoizationOptions);
|
|
4746
4892
|
/**
|
|
4747
4893
|
* Gets selected style of the passed layer
|
|
4748
4894
|
*
|
|
@@ -5018,6 +5164,7 @@ var selectors$2 = /*#__PURE__*/Object.freeze({
|
|
|
5018
5164
|
getLayerOpacity: getLayerOpacity,
|
|
5019
5165
|
getLayerOptions: getLayerOptions,
|
|
5020
5166
|
getLayerService: getLayerService,
|
|
5167
|
+
getLayerServiceName: getLayerServiceName,
|
|
5021
5168
|
getLayerStatus: getLayerStatus,
|
|
5022
5169
|
getLayerStyle: getLayerStyle,
|
|
5023
5170
|
getLayerTimeDimension: getLayerTimeDimension,
|
|
@@ -5491,7 +5638,6 @@ var getMapTimeSliderStartCenterEndAndStep = createSelector(getMapById, function
|
|
|
5491
5638
|
var step = (_store$timeStep2 = store === null || store === void 0 ? void 0 : store.timeStep) !== null && _store$timeStep2 !== void 0 ? _store$timeStep2 : defaultTimeStep;
|
|
5492
5639
|
return {
|
|
5493
5640
|
start: start,
|
|
5494
|
-
center: center,
|
|
5495
5641
|
end: end,
|
|
5496
5642
|
step: step
|
|
5497
5643
|
};
|
|
@@ -5725,6 +5871,24 @@ var getLegendId = createSelector(getMapById, function (store) {
|
|
|
5725
5871
|
var getIsClockVisible = createSelector(getMapById, function (store) {
|
|
5726
5872
|
return store === null || store === void 0 ? void 0 : store.isClockVisible;
|
|
5727
5873
|
}, selectorMemoizationOptions);
|
|
5874
|
+
/**
|
|
5875
|
+
* Returns if clock position from webmap state
|
|
5876
|
+
*
|
|
5877
|
+
* @param {CoreAppStore} store - The Redux store from which the map state will be extracted.
|
|
5878
|
+
* @returns {ClockPosition | undefined} returnType: boolean
|
|
5879
|
+
*/
|
|
5880
|
+
var getClockPosition = createSelector(getMapById, function (store) {
|
|
5881
|
+
return store === null || store === void 0 ? void 0 : store.clockPosition;
|
|
5882
|
+
}, selectorMemoizationOptions);
|
|
5883
|
+
/**
|
|
5884
|
+
* Returns if clock size from webmap state
|
|
5885
|
+
*
|
|
5886
|
+
* @param {CoreAppStore} store - The Redux store from which the map state will be extracted.
|
|
5887
|
+
* @returns {ClockSize | undefined} returnType: boolean
|
|
5888
|
+
*/
|
|
5889
|
+
var getClockSize = createSelector(getMapById, function (store) {
|
|
5890
|
+
return store === null || store === void 0 ? void 0 : store.clockSize;
|
|
5891
|
+
}, selectorMemoizationOptions);
|
|
5728
5892
|
/**
|
|
5729
5893
|
* Creates a MapPreset from mapId
|
|
5730
5894
|
*
|
|
@@ -5734,14 +5898,26 @@ var getIsClockVisible = createSelector(getMapById, function (store) {
|
|
|
5734
5898
|
* @param {boolean} keepAllDims? keepAllDims: boolean - default false: whether or not to leave the time and reference_time dimentions
|
|
5735
5899
|
* @returns {MapPreset} returnType: MapPreset
|
|
5736
5900
|
*/
|
|
5737
|
-
var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, getMapDimensions, isTimestepAuto, isTimeSpanAuto, getLegendId,
|
|
5901
|
+
var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, getMapDimensions, isTimestepAuto, isTimeSpanAuto, getLegendId, function (store, mapId) {
|
|
5902
|
+
var _getMapById$dockedLay, _getMapById;
|
|
5903
|
+
return (_getMapById$dockedLay = (_getMapById = getMapById(store, mapId)) === null || _getMapById === void 0 ? void 0 : _getMapById.dockedLayerManagerSize) !== null && _getMapById$dockedLay !== void 0 ? _getMapById$dockedLay : 'sizeSmall';
|
|
5904
|
+
}, function (store, mapId) {
|
|
5905
|
+
var _getMapById$dockedLay2, _getMapById2;
|
|
5906
|
+
return (_getMapById$dockedLay2 = (_getMapById2 = getMapById(store, mapId)) === null || _getMapById2 === void 0 ? void 0 : _getMapById2.dockedLayerManagerPosition) !== null && _getMapById$dockedLay2 !== void 0 ? _getMapById$dockedLay2 : {
|
|
5907
|
+
x: 0,
|
|
5908
|
+
y: 0
|
|
5909
|
+
};
|
|
5910
|
+
}, function (store, mapId) {
|
|
5911
|
+
var _getMapById3;
|
|
5912
|
+
return (_getMapById3 = getMapById(store, mapId)) === null || _getMapById3 === void 0 ? void 0 : _getMapById3.dockedLayerManagerDimensions;
|
|
5913
|
+
}, getIsClockVisible, getClockPosition, getClockSize, getUiStore, function (_store, mapId) {
|
|
5738
5914
|
return mapId;
|
|
5739
5915
|
}, function (_store, _mapId) {
|
|
5740
5916
|
var keepAllDims = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
5741
5917
|
return keepAllDims;
|
|
5742
|
-
}, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, legendId, isClockVisible, uiStore, mapId, keepAllDims) {
|
|
5918
|
+
}, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, legendId, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, isClockVisible, clockPosition, clockSize, uiStore, mapId, keepAllDims) {
|
|
5743
5919
|
var _overLayers$, _uiStore$dialogs$lege;
|
|
5744
|
-
var defaultOverlayer = arguments.length >
|
|
5920
|
+
var defaultOverlayer = arguments.length > 31 && arguments[31] !== undefined ? arguments[31] : ((_overLayers$ = overLayers[0]) === null || _overLayers$ === void 0 ? void 0 : _overLayers$.name) || 'none';
|
|
5745
5921
|
var allLayers = [].concat(_toConsumableArray(baseLayers), _toConsumableArray(overLayers), _toConsumableArray(mapLayers)).map(function (_ref3) {
|
|
5746
5922
|
_ref3.mapId;
|
|
5747
5923
|
var layer = _objectWithoutProperties(_ref3, _excluded$2);
|
|
@@ -5769,7 +5945,19 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
5769
5945
|
var shouldShowLegend = legendId ? uiStore === null || uiStore === void 0 || (_uiStore$dialogs$lege = uiStore.dialogs[legendId]) === null || _uiStore$dialogs$lege === void 0 ? void 0 : _uiStore$dialogs$lege.isOpen : false;
|
|
5770
5946
|
var dataExplorerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs[DialogTypes.DataExplorer];
|
|
5771
5947
|
var shouldShowDataExplorer = (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.isOpen) && (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.activeMapId) === mapId || false;
|
|
5772
|
-
|
|
5948
|
+
var dockedLayerManagerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs["".concat(DialogTypes.DockedLayerManager, "-").concat(mapId)];
|
|
5949
|
+
var floatingLayerManagerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs[DialogTypes.LayerManager];
|
|
5950
|
+
var floatingLayerManagerMultimapDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs["".concat(DialogTypes.LayerManager, "-").concat(mapId)];
|
|
5951
|
+
var isFloatingLayerManagerOpenForMap = (floatingLayerManagerDialog === null || floatingLayerManagerDialog === void 0 ? void 0 : floatingLayerManagerDialog.isOpen) && (floatingLayerManagerDialog === null || floatingLayerManagerDialog === void 0 ? void 0 : floatingLayerManagerDialog.activeMapId) === mapId || (floatingLayerManagerMultimapDialog === null || floatingLayerManagerMultimapDialog === void 0 ? void 0 : floatingLayerManagerMultimapDialog.isOpen) || false;
|
|
5952
|
+
var shouldShowDockedLayerManager = ((dockedLayerManagerDialog === null || dockedLayerManagerDialog === void 0 ? void 0 : dockedLayerManagerDialog.isOpen) || false) && !isFloatingLayerManagerOpenForMap;
|
|
5953
|
+
var dockedLayerManagerPreset = shouldShowDockedLayerManager ? _objectSpread2({
|
|
5954
|
+
shouldShowDockedLayerManager: shouldShowDockedLayerManager,
|
|
5955
|
+
dockedLayerManagerSize: dockedLayerManagerSize,
|
|
5956
|
+
dockedLayerManagerPosition: dockedLayerManagerPosition
|
|
5957
|
+
}, dockedLayerManagerDimensions && {
|
|
5958
|
+
dockedLayerManagerDimensions: dockedLayerManagerDimensions
|
|
5959
|
+
}) : {};
|
|
5960
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
5773
5961
|
layers: allLayers
|
|
5774
5962
|
}, activeLayerId && {
|
|
5775
5963
|
activeLayerId: activeLayerId
|
|
@@ -5794,8 +5982,12 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
5794
5982
|
timeSliderSpan: timeSliderSpan,
|
|
5795
5983
|
shouldShowDataExplorer: shouldShowDataExplorer,
|
|
5796
5984
|
defaultOverlayer: defaultOverlayer
|
|
5797
|
-
}, isClockVisible !== undefined && {
|
|
5985
|
+
}, dockedLayerManagerPreset), isClockVisible !== undefined && {
|
|
5798
5986
|
isClockVisible: isClockVisible
|
|
5987
|
+
}), clockPosition !== undefined && {
|
|
5988
|
+
clockPosition: clockPosition
|
|
5989
|
+
}), clockSize !== undefined && {
|
|
5990
|
+
clockSize: clockSize
|
|
5799
5991
|
}), keepAllDims && {
|
|
5800
5992
|
dimensions: mapDimensions
|
|
5801
5993
|
});
|
|
@@ -5910,6 +6102,24 @@ var getIsEnabledLayersForMapDimension = createSelector(getMapLayerIdsEnabled, fu
|
|
|
5910
6102
|
var getDockedLayerManagerSize = createSelector(getMapById, function (store) {
|
|
5911
6103
|
return store ? store.dockedLayerManagerSize : 'sizeSmall';
|
|
5912
6104
|
}, selectorMemoizationOptions);
|
|
6105
|
+
/**
|
|
6106
|
+
* Returns the dockedLayerManagerPosition originally set in mapPresets
|
|
6107
|
+
*
|
|
6108
|
+
* Example getDockedLayerManagerPosition(store);
|
|
6109
|
+
* @param {object} store store: object - store object
|
|
6110
|
+
* @param {string} mapId mapId: string - Id of the map
|
|
6111
|
+
* @returns {DockedLayerManagerPosition} returnType: object
|
|
6112
|
+
*/
|
|
6113
|
+
var getDockedLayerManagerPosition = createSelector(getMapById, function (store) {
|
|
6114
|
+
var _store$dockedLayerMan;
|
|
6115
|
+
return (_store$dockedLayerMan = store === null || store === void 0 ? void 0 : store.dockedLayerManagerPosition) !== null && _store$dockedLayerMan !== void 0 ? _store$dockedLayerMan : {
|
|
6116
|
+
x: 0,
|
|
6117
|
+
y: 0
|
|
6118
|
+
};
|
|
6119
|
+
}, selectorMemoizationOptions);
|
|
6120
|
+
var getDockedLayerManagerDimensions = createSelector(getMapById, function (store) {
|
|
6121
|
+
return store === null || store === void 0 ? void 0 : store.dockedLayerManagerDimensions;
|
|
6122
|
+
}, selectorMemoizationOptions);
|
|
5913
6123
|
/**
|
|
5914
6124
|
* Returns the animation list for given map id
|
|
5915
6125
|
* @param {object} store store: object - store object
|
|
@@ -6025,9 +6235,13 @@ var selectors$1 = /*#__PURE__*/Object.freeze({
|
|
|
6025
6235
|
getAutoTimeStepLayerId: getAutoTimeStepLayerId,
|
|
6026
6236
|
getAutoUpdateLayerId: getAutoUpdateLayerId,
|
|
6027
6237
|
getBbox: getBbox,
|
|
6238
|
+
getClockPosition: getClockPosition,
|
|
6239
|
+
getClockSize: getClockSize,
|
|
6028
6240
|
getDataLimitsFromLayers: getDataLimitsFromLayers,
|
|
6029
6241
|
getDisableMapPin: getDisableMapPin,
|
|
6030
6242
|
getDisplayMapPin: getDisplayMapPin,
|
|
6243
|
+
getDockedLayerManagerDimensions: getDockedLayerManagerDimensions,
|
|
6244
|
+
getDockedLayerManagerPosition: getDockedLayerManagerPosition,
|
|
6031
6245
|
getDockedLayerManagerSize: getDockedLayerManagerSize,
|
|
6032
6246
|
getFirstMap: getFirstMap,
|
|
6033
6247
|
getFirstMapId: getFirstMapId,
|
|
@@ -6551,18 +6765,25 @@ genericListener.startListening({
|
|
|
6551
6765
|
payload = _ref.payload;
|
|
6552
6766
|
listenerApi.cancelActiveListeners();
|
|
6553
6767
|
value = payload.value, origin = payload.origin;
|
|
6554
|
-
if (value !== null && value !== void 0 && value.currentTime) {
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
if (!setTimeValidatorRexexp.test(currentTime)) {
|
|
6558
|
-
console.error("setTime value ".concat(currentTime, " does not conform to format [YYYY-MM-DDThh:mm:ssZ]. It was triggered by ").concat(origin));
|
|
6559
|
-
} else {
|
|
6560
|
-
targets = getTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETTIME);
|
|
6561
|
-
groups = getTargetGroups(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETTIME);
|
|
6562
|
-
listenerApi.dispatch(setTimeSync(payload, targets, groups));
|
|
6563
|
-
}
|
|
6768
|
+
if (!(value !== null && value !== void 0 && value.currentTime)) {
|
|
6769
|
+
_context.next = 8;
|
|
6770
|
+
break;
|
|
6564
6771
|
}
|
|
6565
|
-
|
|
6772
|
+
currentTime = value.currentTime;
|
|
6773
|
+
/* Test if the current is according to the expected time format */
|
|
6774
|
+
if (setTimeValidatorRexexp.test(currentTime)) {
|
|
6775
|
+
_context.next = 8;
|
|
6776
|
+
break;
|
|
6777
|
+
}
|
|
6778
|
+
console.error("setTime value ".concat(currentTime, " does not conform to format [YYYY-MM-DDThh:mm:ssZ]. It was triggered by ").concat(origin));
|
|
6779
|
+
// Do not do anything
|
|
6780
|
+
return _context.abrupt("return");
|
|
6781
|
+
case 8:
|
|
6782
|
+
// SetTimeSyncProps contains besides currenttime many other props. Set these.
|
|
6783
|
+
targets = getTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETTIME);
|
|
6784
|
+
groups = getTargetGroups(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETTIME);
|
|
6785
|
+
listenerApi.dispatch(setTimeSync(payload, targets, groups));
|
|
6786
|
+
case 11:
|
|
6566
6787
|
case "end":
|
|
6567
6788
|
return _context.stop();
|
|
6568
6789
|
}
|
|
@@ -6658,7 +6879,7 @@ genericListener.startListening({
|
|
|
6658
6879
|
payload = _ref4.payload, type = _ref4.type;
|
|
6659
6880
|
listenerApi.cancelActiveListeners();
|
|
6660
6881
|
/* Should not listen to actions from itself */
|
|
6661
|
-
if (!(payload
|
|
6882
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6662
6883
|
_context4.next = 4;
|
|
6663
6884
|
break;
|
|
6664
6885
|
}
|
|
@@ -6691,7 +6912,7 @@ genericListener.startListening({
|
|
|
6691
6912
|
payload = _ref5.payload, type = _ref5.type;
|
|
6692
6913
|
listenerApi.cancelActiveListeners();
|
|
6693
6914
|
/* Should not listen to actions from itself */
|
|
6694
|
-
if (!(payload
|
|
6915
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6695
6916
|
_context5.next = 4;
|
|
6696
6917
|
break;
|
|
6697
6918
|
}
|
|
@@ -6756,7 +6977,7 @@ genericListener.startListening({
|
|
|
6756
6977
|
payload = _ref7.payload, type = _ref7.type;
|
|
6757
6978
|
listenerApi.cancelActiveListeners();
|
|
6758
6979
|
/* Should not listen to actions from itself */
|
|
6759
|
-
if (!(payload
|
|
6980
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6760
6981
|
_context7.next = 4;
|
|
6761
6982
|
break;
|
|
6762
6983
|
}
|
|
@@ -6815,7 +7036,7 @@ genericListener.startListening({
|
|
|
6815
7036
|
payload = _ref9.payload, type = _ref9.type;
|
|
6816
7037
|
listenerApi.cancelActiveListeners();
|
|
6817
7038
|
/* Should not listen to actions from itself */
|
|
6818
|
-
if (!(payload
|
|
7039
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6819
7040
|
_context9.next = 4;
|
|
6820
7041
|
break;
|
|
6821
7042
|
}
|
|
@@ -6848,7 +7069,7 @@ genericListener.startListening({
|
|
|
6848
7069
|
payload = _ref0.payload, type = _ref0.type;
|
|
6849
7070
|
listenerApi.cancelActiveListeners();
|
|
6850
7071
|
/* Should not listen to actions from itself */
|
|
6851
|
-
if (!(payload
|
|
7072
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6852
7073
|
_context0.next = 4;
|
|
6853
7074
|
break;
|
|
6854
7075
|
}
|
|
@@ -7327,7 +7548,7 @@ mapListener.startListening({
|
|
|
7327
7548
|
actionCreator: mapActions.setMapPreset,
|
|
7328
7549
|
effect: function () {
|
|
7329
7550
|
var _effect2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref6, listenerApi) {
|
|
7330
|
-
var payload, mapId, initialProps, mapPreset, _mapPreset$dimensions, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, shouldShowDataExplorer, dockedLayerManagerSize, timeSliderSpan, toggleTimeSpanAuto, defaultOverlayer, isClockVisible, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$f2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoTimeStepLayerId, newAutoUpdateLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, _overlayersFromStore$, overlayersFromStore, foundOverlayerId, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, timeAlreadySet, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, legendId, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
|
|
7551
|
+
var payload, mapId, initialProps, mapPreset, _mapPreset$dimensions, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, shouldShowDockedLayerManager, shouldShowDataExplorer, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, timeSliderSpan, toggleTimeSpanAuto, defaultOverlayer, isClockVisible, clockPosition, clockSize, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$f2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoTimeStepLayerId, newAutoUpdateLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, _overlayersFromStore$, overlayersFromStore, foundOverlayerId, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, timeAlreadySet, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, legendId, dockedLayerManagerType, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
|
|
7331
7552
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7332
7553
|
while (1) switch (_context2.prev = _context2.next) {
|
|
7333
7554
|
case 0:
|
|
@@ -7336,10 +7557,10 @@ mapListener.startListening({
|
|
|
7336
7557
|
mapId = payload.mapId, initialProps = payload.initialProps;
|
|
7337
7558
|
mapPreset = initialProps.mapPreset;
|
|
7338
7559
|
if (!mapPreset) {
|
|
7339
|
-
_context2.next =
|
|
7560
|
+
_context2.next = 61;
|
|
7340
7561
|
break;
|
|
7341
7562
|
}
|
|
7342
|
-
layers = mapPreset.layers, activeLayerId = mapPreset.activeLayerId, autoTimeStepLayerId = mapPreset.autoTimeStepLayerId, autoUpdateLayerId = mapPreset.autoUpdateLayerId, proj = mapPreset.proj, shouldAutoUpdate = mapPreset.shouldAutoUpdate, shouldAnimate = mapPreset.shouldAnimate, animationPayload = mapPreset.animationPayload, toggleTimestepAuto = mapPreset.toggleTimestepAuto, showTimeSlider = mapPreset.showTimeSlider, displayMapPin = mapPreset.displayMapPin, shouldShowZoomControls = mapPreset.shouldShowZoomControls, shouldShowLegend = mapPreset.shouldShowLegend, shouldShowDataExplorer = mapPreset.shouldShowDataExplorer, dockedLayerManagerSize = mapPreset.dockedLayerManagerSize, timeSliderSpan = mapPreset.timeSliderSpan, toggleTimeSpanAuto = mapPreset.toggleTimeSpanAuto, defaultOverlayer = mapPreset.defaultOverlayer, isClockVisible = mapPreset.isClockVisible;
|
|
7563
|
+
layers = mapPreset.layers, activeLayerId = mapPreset.activeLayerId, autoTimeStepLayerId = mapPreset.autoTimeStepLayerId, autoUpdateLayerId = mapPreset.autoUpdateLayerId, proj = mapPreset.proj, shouldAutoUpdate = mapPreset.shouldAutoUpdate, shouldAnimate = mapPreset.shouldAnimate, animationPayload = mapPreset.animationPayload, toggleTimestepAuto = mapPreset.toggleTimestepAuto, showTimeSlider = mapPreset.showTimeSlider, displayMapPin = mapPreset.displayMapPin, shouldShowZoomControls = mapPreset.shouldShowZoomControls, shouldShowLegend = mapPreset.shouldShowLegend, shouldShowDockedLayerManager = mapPreset.shouldShowDockedLayerManager, shouldShowDataExplorer = mapPreset.shouldShowDataExplorer, dockedLayerManagerSize = mapPreset.dockedLayerManagerSize, dockedLayerManagerPosition = mapPreset.dockedLayerManagerPosition, dockedLayerManagerDimensions = mapPreset.dockedLayerManagerDimensions, timeSliderSpan = mapPreset.timeSliderSpan, toggleTimeSpanAuto = mapPreset.toggleTimeSpanAuto, defaultOverlayer = mapPreset.defaultOverlayer, isClockVisible = mapPreset.isClockVisible, clockPosition = mapPreset.clockPosition, clockSize = mapPreset.clockSize;
|
|
7343
7564
|
_filterLayers = filterLayers(layers), mapLayers = _filterLayers.mapLayers, baseLayers = _filterLayers.baseLayers, overLayers = _filterLayers.overLayers;
|
|
7344
7565
|
if (layers) {
|
|
7345
7566
|
// make sure all layers have a unique id before going forward
|
|
@@ -7472,6 +7693,20 @@ mapListener.startListening({
|
|
|
7472
7693
|
isClockVisible: isClockVisible
|
|
7473
7694
|
}));
|
|
7474
7695
|
}
|
|
7696
|
+
if (clockPosition !== undefined) {
|
|
7697
|
+
// set clock position
|
|
7698
|
+
listenerApi.dispatch(mapActions.setClockPositionSize({
|
|
7699
|
+
mapId: mapId,
|
|
7700
|
+
position: clockPosition
|
|
7701
|
+
}));
|
|
7702
|
+
}
|
|
7703
|
+
if (clockSize !== undefined) {
|
|
7704
|
+
// set clock size
|
|
7705
|
+
listenerApi.dispatch(mapActions.setClockPositionSize({
|
|
7706
|
+
mapId: mapId,
|
|
7707
|
+
size: clockSize
|
|
7708
|
+
}));
|
|
7709
|
+
}
|
|
7475
7710
|
// sets timestep by interval of animationPayload
|
|
7476
7711
|
interval = animationPayload === null || animationPayload === void 0 ? void 0 : animationPayload.interval;
|
|
7477
7712
|
if (interval) {
|
|
@@ -7591,15 +7826,40 @@ mapListener.startListening({
|
|
|
7591
7826
|
dockedLayerManagerSize: dockedLayerManagerSize
|
|
7592
7827
|
}));
|
|
7593
7828
|
}
|
|
7594
|
-
|
|
7829
|
+
dockedLayerManagerType = "".concat(DialogTypes.DockedLayerManager, "-").concat(mapId);
|
|
7830
|
+
if (shouldShowDockedLayerManager !== undefined) {
|
|
7831
|
+
listenerApi.dispatch(uiActions.setToggleOpenDialog({
|
|
7832
|
+
type: dockedLayerManagerType,
|
|
7833
|
+
setOpen: shouldShowDockedLayerManager
|
|
7834
|
+
}));
|
|
7835
|
+
}
|
|
7836
|
+
if (shouldShowDockedLayerManager) {
|
|
7837
|
+
listenerApi.dispatch(uiActions.setToggleOpenDialog({
|
|
7838
|
+
type: DialogTypes.LayerManager,
|
|
7839
|
+
setOpen: false
|
|
7840
|
+
}));
|
|
7841
|
+
}
|
|
7842
|
+
if (dockedLayerManagerPosition) {
|
|
7843
|
+
listenerApi.dispatch(mapActions.setDockedLayerManagerPosition({
|
|
7844
|
+
mapId: mapId,
|
|
7845
|
+
dockedLayerManagerPosition: dockedLayerManagerPosition
|
|
7846
|
+
}));
|
|
7847
|
+
}
|
|
7848
|
+
if (dockedLayerManagerDimensions) {
|
|
7849
|
+
listenerApi.dispatch(mapActions.setDockedLayerManagerDimensions({
|
|
7850
|
+
mapId: mapId,
|
|
7851
|
+
dockedLayerManagerDimensions: dockedLayerManagerDimensions
|
|
7852
|
+
}));
|
|
7853
|
+
}
|
|
7854
|
+
case 51:
|
|
7595
7855
|
if (!(animationEndTime && (shouldEndtimeOverride || !(shouldAutoUpdate || shouldAnimate)))) {
|
|
7596
|
-
_context2.next =
|
|
7856
|
+
_context2.next = 61;
|
|
7597
7857
|
break;
|
|
7598
7858
|
}
|
|
7599
7859
|
fiveMinuteDelayForAnimation = 1000 * 60 * 5; // eslint-disable-next-line no-await-in-loop
|
|
7600
|
-
_context2.next =
|
|
7860
|
+
_context2.next = 55;
|
|
7601
7861
|
return listenerApi.delay(fiveMinuteDelayForAnimation);
|
|
7602
|
-
case
|
|
7862
|
+
case 55:
|
|
7603
7863
|
_animationEnd2 = getAnimationEndTime(listenerApi.getState(), mapId);
|
|
7604
7864
|
listenerApi.dispatch(mapActions.setAnimationEndTime({
|
|
7605
7865
|
mapId: mapId,
|
|
@@ -7614,13 +7874,13 @@ mapListener.startListening({
|
|
|
7614
7874
|
minutes: 5
|
|
7615
7875
|
}).toISOString()
|
|
7616
7876
|
}));
|
|
7617
|
-
_context2.next =
|
|
7877
|
+
_context2.next = 51;
|
|
7618
7878
|
break;
|
|
7619
|
-
case
|
|
7620
|
-
_context2.next =
|
|
7879
|
+
case 61:
|
|
7880
|
+
_context2.next = 66;
|
|
7621
7881
|
break;
|
|
7622
|
-
case
|
|
7623
|
-
_context2.prev =
|
|
7882
|
+
case 63:
|
|
7883
|
+
_context2.prev = 63;
|
|
7624
7884
|
_context2.t0 = _context2["catch"](1);
|
|
7625
7885
|
if (_context2.t0 instanceof Error) {
|
|
7626
7886
|
listenerApi.dispatch(mapActions.setMapPresetError({
|
|
@@ -7628,11 +7888,11 @@ mapListener.startListening({
|
|
|
7628
7888
|
error: _context2.t0.message
|
|
7629
7889
|
}));
|
|
7630
7890
|
}
|
|
7631
|
-
case
|
|
7891
|
+
case 66:
|
|
7632
7892
|
case "end":
|
|
7633
7893
|
return _context2.stop();
|
|
7634
7894
|
}
|
|
7635
|
-
}, _callee2, null, [[1,
|
|
7895
|
+
}, _callee2, null, [[1, 63]]);
|
|
7636
7896
|
}));
|
|
7637
7897
|
function effect(_x3, _x4) {
|
|
7638
7898
|
return _effect2.apply(this, arguments);
|
|
@@ -7665,6 +7925,7 @@ mapListener.startListening({
|
|
|
7665
7925
|
var payload = _ref8.payload;
|
|
7666
7926
|
var mapId = payload.mapId,
|
|
7667
7927
|
isForwardStep = payload.isForwardStep;
|
|
7928
|
+
// timeStep is stored in minutes
|
|
7668
7929
|
var timeStep = getMapTimeStep(listenerApi.getState(), mapId);
|
|
7669
7930
|
var currentTime = getSelectedTime(listenerApi.getState(), mapId);
|
|
7670
7931
|
var _mapSelectors$getData = getDataLimitsFromLayers(listenerApi.getState(), mapId),
|
|
@@ -7673,14 +7934,23 @@ mapListener.startListening({
|
|
|
7673
7934
|
dataEndTime = _mapSelectors$getData2[1];
|
|
7674
7935
|
if (dateUtils.isValid(currentTime)) {
|
|
7675
7936
|
var makeForwardStep = function makeForwardStep() {
|
|
7676
|
-
|
|
7677
|
-
var
|
|
7937
|
+
// timeStep is in minutes, convert to seconds
|
|
7938
|
+
var timeStepInSeconds = timeStep * 60;
|
|
7939
|
+
var nextTime = currentTime + timeStepInSeconds;
|
|
7940
|
+
// For large timesteps (>12h), round to nearest hour instead of timestep
|
|
7941
|
+
// This ensures 12:07 with 24h step goes to 12:00 next day, not 00:00
|
|
7942
|
+
var roundingStep = timeStep > 12 * 60 ? 60 : timeStep; // Use 1 hour for large steps
|
|
7943
|
+
var roundedTime = roundWithTimeStep(nextTime, roundingStep, 'round');
|
|
7678
7944
|
var newTime = Math.min(roundedTime, dataEndTime || roundedTime);
|
|
7679
7945
|
return dateUtils.fromUnix(newTime).toISOString();
|
|
7680
7946
|
};
|
|
7681
7947
|
var makeBackwardStep = function makeBackwardStep() {
|
|
7682
|
-
|
|
7683
|
-
var
|
|
7948
|
+
// timeStep is in minutes, convert to seconds
|
|
7949
|
+
var timeStepInSeconds = timeStep * 60;
|
|
7950
|
+
var nextTime = currentTime - timeStepInSeconds;
|
|
7951
|
+
// For large timesteps (>12h), round to nearest hour instead of timestep
|
|
7952
|
+
var roundingStep = timeStep > 12 * 60 ? 60 : timeStep; // Use 1 hour for large steps
|
|
7953
|
+
var roundedTime = roundWithTimeStep(nextTime, roundingStep, 'round');
|
|
7684
7954
|
var newTime = Math.max(roundedTime, dataStartTime || roundedTime);
|
|
7685
7955
|
return dateUtils.fromUnix(newTime).toISOString();
|
|
7686
7956
|
};
|
|
@@ -7876,7 +8146,7 @@ openlayersListener.startListening({
|
|
|
7876
8146
|
effect: function effect(_ref4, listenerApi) {
|
|
7877
8147
|
var payload = _ref4.payload;
|
|
7878
8148
|
var group = getSynchronizationGroup(listenerApi.getState(), payload.groupId);
|
|
7879
|
-
if (!group || group.type !== SYNCGROUPS_TYPE_SETBBOX) {
|
|
8149
|
+
if (!group || (group === null || group === void 0 ? void 0 : group.type) !== SYNCGROUPS_TYPE_SETBBOX) {
|
|
7880
8150
|
return;
|
|
7881
8151
|
}
|
|
7882
8152
|
var groupView = getViewObjectForSyncGroup(payload.groupId);
|
|
@@ -8466,8 +8736,9 @@ drawingToolListener.startListening({
|
|
|
8466
8736
|
_ref3 = currentGeoJSONLayer || {}, currentGeoJSON = _ref3.geojson, _ref3$selectedFeature = _ref3.selectedFeatureIndex, selectedFeatureIndex = _ref3$selectedFeature === void 0 ? 0 : _ref3$selectedFeature;
|
|
8467
8737
|
currentSelectionType = currentGeoJSON === null || currentGeoJSON === void 0 || (_currentGeoJSON$featu = currentGeoJSON.features[selectedFeatureIndex]) === null || _currentGeoJSON$featu === void 0 || (_currentGeoJSON$featu = _currentGeoJSON$featu.properties) === null || _currentGeoJSON$featu === void 0 ? void 0 : _currentGeoJSON$featu.selectionType;
|
|
8468
8738
|
newSelectionType = newDrawMode.selectionType;
|
|
8469
|
-
isNewToolSelected = currentSelectionType !== newSelectionType;
|
|
8470
|
-
|
|
8739
|
+
isNewToolSelected = currentSelectionType !== newSelectionType; // don't change anything if same tool is selected again
|
|
8740
|
+
// but for shouldAllowMultipleShapes same tool will also be a new drawing
|
|
8741
|
+
shouldUpdateNewShape = !(currentGeoJSON !== null && currentGeoJSON !== void 0 && (_currentGeoJSON$featu2 = currentGeoJSON.features) !== null && _currentGeoJSON$featu2 !== void 0 && _currentGeoJSON$featu2.length) || isNewToolSelected || shouldAllowMultipleShapes;
|
|
8471
8742
|
if (shouldUpdateNewShape && shouldUpdateShape) {
|
|
8472
8743
|
shapeWithSelectionType = addSelectionTypeToGeoJSON(newDrawMode.shape, newDrawMode.selectionType);
|
|
8473
8744
|
geoJSONFeatureCollection = getFeatureCollection(shapeWithSelectionType, shouldAllowMultipleShapes, currentGeoJSON);
|
|
@@ -9297,4 +9568,4 @@ var configureOpenGeoWebStore = function configureOpenGeoWebStore() {
|
|
|
9297
9568
|
});
|
|
9298
9569
|
};
|
|
9299
9570
|
|
|
9300
|
-
export { IS_LEGEND_OPEN_BY_DEFAULT, SECONDS_IN_DAY, SECONDS_IN_HOUR, commonActions, commonListener, commonReducers, commonSelectors, configureOpenGeoWebStore, createMockStore, createViewObjectForNewMap, drawingToolActions, drawingToolListener, drawingToolReducer, selectors as drawingToolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$5 as genericSelectors, getSingularDrawtoolDrawLayerId, getUserAddedServices, getViewObjectForMapId, getViewObjectForSyncGroup, initialState$3 as initialState, layerActions, layerReducer, selectors$2 as layerSelectors, types$2 as layerTypes, utils$1 as layerUtils, layersListener, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$4 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, mapReducer, selectors$1 as mapSelectors, types$3 as mapTypes, mapUtils, metronomeListener, openlayersListener, routerActions, routerListener, routerReducer, utils as routerUtils, selectorMemoizationOptions, serviceActions, serviceListener, serviceReducer, selectors$7 as serviceSelectors, setUserAddedServices, storeMiddlewares, storeReducerMap, storeTestSettings, storeTestUtils, utils$3 as storeUtils, constants$2 as syncConstants, syncGroupsActions, syncGroupsListener, syncGroupsReducer, selector as syncGroupsSelector, selectors$6 as syncGroupsSelectors, types$1 as syncGroupsTypes, types$1 as types, uiActions, uiReducer, selectors$3 as uiSelectors, types as uiTypes, unifyReducerMaps, useSetupDialog, useUpdateSharedData };
|
|
9571
|
+
export { IS_LEGEND_OPEN_BY_DEFAULT, SECONDS_IN_DAY, SECONDS_IN_HOUR, commonActions, commonListener, commonReducers, commonSelectors, configureOpenGeoWebStore, createMockStore, createViewObjectForNewMap, drawingToolActions, drawingToolListener, drawingToolReducer, selectors as drawingToolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$5 as genericSelectors, getSingularDrawtoolDrawLayerId, getUserAddedServices, getViewObjectForMapId, getViewObjectForSyncGroup, initialState$3 as initialState, layerActions, layerReducer, selectors$2 as layerSelectors, types$2 as layerTypes, utils$1 as layerUtils, layersListener, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$4 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, mapReducer, selectors$1 as mapSelectors, types$3 as mapTypes, mapUtils, metronomeListener, openlayersListener, routerActions, routerListener, routerReducer, utils as routerUtils, selectorMemoizationOptions, serviceActions, serviceListener, serviceReducer, selectors$7 as serviceSelectors, setUserAddedServices, storeMiddlewares, storeReducerMap, storeTestSettings, storeTestUtils, utils$3 as storeUtils, constants$2 as syncConstants, syncGroupsActions, syncGroupsListener, syncGroupsReducer, selector as syncGroupsSelector, selectors$6 as syncGroupsSelectors, types$1 as syncGroupsTypes, types$1 as types, uiActions, uiReducer, selectors$3 as uiSelectors, types as uiTypes, unifyReducerMaps, useSetupDialog, useSyncgroupTimeState, useUpdateSharedData };
|