@opengeoweb/store 19.5.1 → 19.6.1
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/dist/index.esm.js
CHANGED
|
@@ -1620,18 +1620,25 @@ var slice$7 = createSlice({
|
|
|
1620
1620
|
}
|
|
1621
1621
|
},
|
|
1622
1622
|
duplicateMapLayer: function duplicateMapLayer(draft, action) {
|
|
1623
|
+
var _oldLayer$dimensions;
|
|
1623
1624
|
var _action$payload2 = action.payload,
|
|
1624
1625
|
oldLayerId = _action$payload2.oldLayerId,
|
|
1625
1626
|
newLayerId = _action$payload2.newLayerId,
|
|
1626
1627
|
mapId = _action$payload2.mapId;
|
|
1627
1628
|
var oldLayer = draft.byId[oldLayerId];
|
|
1628
|
-
if (oldLayer
|
|
1629
|
-
|
|
1630
|
-
id: newLayerId,
|
|
1631
|
-
mapId: mapId
|
|
1632
|
-
}));
|
|
1633
|
-
draft.allIds.push(newLayerId);
|
|
1629
|
+
if (!oldLayer || draft.byId[newLayerId]) {
|
|
1630
|
+
return;
|
|
1634
1631
|
}
|
|
1632
|
+
// Clone dimensions from the Immer draft to avoid sharing references with the original layer.
|
|
1633
|
+
var dimensions = (_oldLayer$dimensions = oldLayer.dimensions) === null || _oldLayer$dimensions === void 0 ? void 0 : _oldLayer$dimensions.map(function (dimension) {
|
|
1634
|
+
return _objectSpread2({}, dimension);
|
|
1635
|
+
});
|
|
1636
|
+
draft.byId[newLayerId] = createLayer(_objectSpread2(_objectSpread2({}, oldLayer), {}, {
|
|
1637
|
+
dimensions: dimensions,
|
|
1638
|
+
id: newLayerId,
|
|
1639
|
+
mapId: mapId
|
|
1640
|
+
}));
|
|
1641
|
+
draft.allIds.push(newLayerId);
|
|
1635
1642
|
},
|
|
1636
1643
|
layerChangeDimension: function layerChangeDimension(draft, action) {
|
|
1637
1644
|
var _action$payload3 = action.payload,
|
|
@@ -1987,8 +1994,12 @@ var slice$7 = createSlice({
|
|
|
1987
1994
|
existingDimension.currentValue = newLayerDimension.currentValue;
|
|
1988
1995
|
}
|
|
1989
1996
|
} else if (layerId === layerDimensions.layerId) {
|
|
1997
|
+
var _newLayerDimension$va2, _newLayerDimension$va3;
|
|
1990
1998
|
/* Otherwise add a new one, but only for this layer. */
|
|
1991
|
-
|
|
1999
|
+
var currentValue = newLayerDimension.name === 'reference_time' && reduxLayer.useLatestReferenceTime ? (_newLayerDimension$va2 = (_newLayerDimension$va3 = newLayerDimension.values) === null || _newLayerDimension$va3 === void 0 ? void 0 : _newLayerDimension$va3.split(',').at(-1)) !== null && _newLayerDimension$va2 !== void 0 ? _newLayerDimension$va2 : newLayerDimension.currentValue : newLayerDimension.currentValue;
|
|
2000
|
+
reduxDimensions.push(_objectSpread2(_objectSpread2({}, newLayerDimension), {}, {
|
|
2001
|
+
currentValue: currentValue
|
|
2002
|
+
}));
|
|
1992
2003
|
}
|
|
1993
2004
|
});
|
|
1994
2005
|
// Ensure that the time range is correctly set based on the current reference time value
|
|
@@ -2728,14 +2739,29 @@ var slice$6 = createSlice({
|
|
|
2728
2739
|
if (size) {
|
|
2729
2740
|
draft.byId[mapId].clockSize = size;
|
|
2730
2741
|
}
|
|
2742
|
+
},
|
|
2743
|
+
setLegendPositionSize: function setLegendPositionSize(draft, action) {
|
|
2744
|
+
var _action$payload31 = action.payload,
|
|
2745
|
+
mapId = _action$payload31.mapId,
|
|
2746
|
+
position = _action$payload31.position,
|
|
2747
|
+
size = _action$payload31.size;
|
|
2748
|
+
if (!draft.byId[mapId]) {
|
|
2749
|
+
return;
|
|
2750
|
+
}
|
|
2751
|
+
if (position) {
|
|
2752
|
+
draft.byId[mapId].legendPosition = position;
|
|
2753
|
+
}
|
|
2754
|
+
if (size) {
|
|
2755
|
+
draft.byId[mapId].legendSize = size;
|
|
2756
|
+
}
|
|
2731
2757
|
}
|
|
2732
2758
|
},
|
|
2733
2759
|
extraReducers: function extraReducers(builder) {
|
|
2734
2760
|
builder.addCase(layerActions.addLayer, function (draft, action) {
|
|
2735
|
-
var _action$
|
|
2736
|
-
layerId = _action$
|
|
2737
|
-
mapId = _action$
|
|
2738
|
-
layer = _action$
|
|
2761
|
+
var _action$payload32 = action.payload,
|
|
2762
|
+
layerId = _action$payload32.layerId,
|
|
2763
|
+
mapId = _action$payload32.mapId,
|
|
2764
|
+
layer = _action$payload32.layer;
|
|
2739
2765
|
if (!draft.byId[mapId]) {
|
|
2740
2766
|
return;
|
|
2741
2767
|
}
|
|
@@ -2754,10 +2780,10 @@ var slice$6 = createSlice({
|
|
|
2754
2780
|
draft.byId[mapId].mapLayers.unshift(layerId);
|
|
2755
2781
|
}
|
|
2756
2782
|
}).addCase(layerActions.duplicateMapLayer, function (draft, action) {
|
|
2757
|
-
var _action$
|
|
2758
|
-
newLayerId = _action$
|
|
2759
|
-
oldLayerId = _action$
|
|
2760
|
-
mapId = _action$
|
|
2783
|
+
var _action$payload33 = action.payload,
|
|
2784
|
+
newLayerId = _action$payload33.newLayerId,
|
|
2785
|
+
oldLayerId = _action$payload33.oldLayerId,
|
|
2786
|
+
mapId = _action$payload33.mapId;
|
|
2761
2787
|
if (!draft.byId[mapId]) {
|
|
2762
2788
|
return;
|
|
2763
2789
|
}
|
|
@@ -2774,10 +2800,10 @@ var slice$6 = createSlice({
|
|
|
2774
2800
|
draft.byId[mapId].featureLayers.unshift(newLayerId);
|
|
2775
2801
|
}
|
|
2776
2802
|
}).addCase(layerActions.addBaseLayer, function (draft, action) {
|
|
2777
|
-
var _action$
|
|
2778
|
-
layer = _action$
|
|
2779
|
-
layerId = _action$
|
|
2780
|
-
mapId = _action$
|
|
2803
|
+
var _action$payload34 = action.payload,
|
|
2804
|
+
layer = _action$payload34.layer,
|
|
2805
|
+
layerId = _action$payload34.layerId,
|
|
2806
|
+
mapId = _action$payload34.mapId;
|
|
2781
2807
|
if (!draft.byId[mapId]) {
|
|
2782
2808
|
return;
|
|
2783
2809
|
}
|
|
@@ -2807,9 +2833,9 @@ var slice$6 = createSlice({
|
|
|
2807
2833
|
draft.byId[mapId].autoTimeStepLayerId = activeLayerId;
|
|
2808
2834
|
}
|
|
2809
2835
|
}).addCase(layerActions.setBaseLayers, function (draft, action) {
|
|
2810
|
-
var _action$
|
|
2811
|
-
layers = _action$
|
|
2812
|
-
mapId = _action$
|
|
2836
|
+
var _action$payload35 = action.payload,
|
|
2837
|
+
layers = _action$payload35.layers,
|
|
2838
|
+
mapId = _action$payload35.mapId;
|
|
2813
2839
|
// Split into base and overlayers
|
|
2814
2840
|
var baseLayers = [];
|
|
2815
2841
|
var overLayers = [];
|
|
@@ -2839,9 +2865,9 @@ var slice$6 = createSlice({
|
|
|
2839
2865
|
}
|
|
2840
2866
|
}
|
|
2841
2867
|
}).addCase(layerActions.layerDelete, function (draft, action) {
|
|
2842
|
-
var _action$
|
|
2843
|
-
mapId = _action$
|
|
2844
|
-
layerId = _action$
|
|
2868
|
+
var _action$payload36 = action.payload,
|
|
2869
|
+
mapId = _action$payload36.mapId,
|
|
2870
|
+
layerId = _action$payload36.layerId;
|
|
2845
2871
|
var map = draft.byId[mapId];
|
|
2846
2872
|
if (!map) {
|
|
2847
2873
|
return;
|
|
@@ -2849,6 +2875,9 @@ var slice$6 = createSlice({
|
|
|
2849
2875
|
map.mapLayers = map.mapLayers.filter(function (id) {
|
|
2850
2876
|
return id !== layerId;
|
|
2851
2877
|
});
|
|
2878
|
+
map.featureLayers = map.featureLayers.filter(function (id) {
|
|
2879
|
+
return id !== layerId;
|
|
2880
|
+
});
|
|
2852
2881
|
// if auto layer is deleted, change auto layer ids
|
|
2853
2882
|
if (!map.mapLayers.length) {
|
|
2854
2883
|
map.autoUpdateLayerId = undefined;
|
|
@@ -2863,13 +2892,10 @@ var slice$6 = createSlice({
|
|
|
2863
2892
|
if (map.autoTimeStepLayerId === layerId) {
|
|
2864
2893
|
map.autoTimeStepLayerId = activeLayerId;
|
|
2865
2894
|
}
|
|
2866
|
-
map.featureLayers = map.featureLayers.filter(function (id) {
|
|
2867
|
-
return id !== layerId;
|
|
2868
|
-
});
|
|
2869
2895
|
}).addCase(layerActions.baseLayerDelete, function (draft, action) {
|
|
2870
|
-
var _action$
|
|
2871
|
-
mapId = _action$
|
|
2872
|
-
layerId = _action$
|
|
2896
|
+
var _action$payload37 = action.payload,
|
|
2897
|
+
mapId = _action$payload37.mapId,
|
|
2898
|
+
layerId = _action$payload37.layerId;
|
|
2873
2899
|
if (!draft.byId[mapId]) {
|
|
2874
2900
|
return;
|
|
2875
2901
|
}
|
|
@@ -2880,14 +2906,14 @@ var slice$6 = createSlice({
|
|
|
2880
2906
|
return id !== layerId;
|
|
2881
2907
|
});
|
|
2882
2908
|
}).addCase(layerActions.layerChangeDimension, function (draft, action) {
|
|
2883
|
-
var _action$
|
|
2884
|
-
layerId = _action$
|
|
2885
|
-
dimension = _action$
|
|
2909
|
+
var _action$payload38 = action.payload,
|
|
2910
|
+
layerId = _action$payload38.layerId,
|
|
2911
|
+
dimension = _action$payload38.dimension;
|
|
2886
2912
|
produceDraftStateSetMapDimensionFromLayerChangeDimension(draft, layerId, dimension);
|
|
2887
2913
|
}).addCase(setTimeSync, function (draft, action) {
|
|
2888
|
-
var _action$
|
|
2889
|
-
targetsFromAction = _action$
|
|
2890
|
-
source = _action$
|
|
2914
|
+
var _action$payload39 = action.payload,
|
|
2915
|
+
targetsFromAction = _action$payload39.targets,
|
|
2916
|
+
source = _action$payload39.source;
|
|
2891
2917
|
var sourceMapId = source === null || source === void 0 ? void 0 : source.payload.sourceId;
|
|
2892
2918
|
/* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
|
|
2893
2919
|
var targets = [];
|
|
@@ -2945,9 +2971,9 @@ var slice$6 = createSlice({
|
|
|
2945
2971
|
}
|
|
2946
2972
|
});
|
|
2947
2973
|
}).addCase(setBboxSync, function (draft, action) {
|
|
2948
|
-
var _action$
|
|
2949
|
-
targetsFromAction = _action$
|
|
2950
|
-
source = _action$
|
|
2974
|
+
var _action$payload40 = action.payload,
|
|
2975
|
+
targetsFromAction = _action$payload40.targets,
|
|
2976
|
+
source = _action$payload40.source;
|
|
2951
2977
|
/* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
|
|
2952
2978
|
var targets = [];
|
|
2953
2979
|
if (source) {
|
|
@@ -2979,9 +3005,9 @@ var slice$6 = createSlice({
|
|
|
2979
3005
|
* These targets can be used as payloads in new Layer actions.
|
|
2980
3006
|
* These actions are here handled via the layer reducer, as it is the same logic
|
|
2981
3007
|
*/
|
|
2982
|
-
var _action$
|
|
2983
|
-
targets = _action$
|
|
2984
|
-
source = _action$
|
|
3008
|
+
var _action$payload41 = action.payload,
|
|
3009
|
+
targets = _action$payload41.targets,
|
|
3010
|
+
source = _action$payload41.source;
|
|
2985
3011
|
return targets.reduce(function (prevState, target) {
|
|
2986
3012
|
var actionType = (source === null || source === void 0 ? void 0 : source.type) || 'GENERIC_SYNC_SETLAYERACTIONS';
|
|
2987
3013
|
var action = {
|
|
@@ -3003,9 +3029,9 @@ var slice$6 = createSlice({
|
|
|
3003
3029
|
});
|
|
3004
3030
|
return draft;
|
|
3005
3031
|
}).addCase(mapChangeDimension, function (draft, action) {
|
|
3006
|
-
var _action$
|
|
3007
|
-
mapId = _action$
|
|
3008
|
-
dimensionFromAction = _action$
|
|
3032
|
+
var _action$payload42 = action.payload,
|
|
3033
|
+
mapId = _action$payload42.mapId,
|
|
3034
|
+
dimensionFromAction = _action$payload42.dimension;
|
|
3009
3035
|
produceDraftStateSetWebMapDimension(draft, mapId, dimensionFromAction, true);
|
|
3010
3036
|
}).addCase(setMapPreset, function (draft, action) {
|
|
3011
3037
|
var mapId = action.payload.mapId;
|
|
@@ -3024,6 +3050,8 @@ var slice$6 = createSlice({
|
|
|
3024
3050
|
draft.byId[mapId].timeStep = undefined;
|
|
3025
3051
|
draft.byId[mapId].animationDelay = defaultAnimationDelayAtStart;
|
|
3026
3052
|
draft.byId[mapId].dockedLayerManagerSize = '';
|
|
3053
|
+
draft.byId[mapId].legendPosition = undefined;
|
|
3054
|
+
draft.byId[mapId].legendSize = undefined;
|
|
3027
3055
|
});
|
|
3028
3056
|
}
|
|
3029
3057
|
});
|
|
@@ -5367,6 +5395,17 @@ var getIsLayerInEditMode = createSelector(getLayerById, function (layer) {
|
|
|
5367
5395
|
var getFeatureLayerGeoJSON = createSelector(getLayerById, function (layer) {
|
|
5368
5396
|
return (layer === null || layer === void 0 ? void 0 : layer.geojson) || undefined;
|
|
5369
5397
|
}, selectorMemoizationOptions);
|
|
5398
|
+
/**
|
|
5399
|
+
* Returns the ids of the selected features of a feature layer
|
|
5400
|
+
*
|
|
5401
|
+
* Example const selectedFeatureIds = getSelectedFeatureIds(store, 'layerId1')
|
|
5402
|
+
* @param {object} store store: object - store object
|
|
5403
|
+
* @param {string} layerId layerId: string - Id of the layer
|
|
5404
|
+
* @returns {string[]} selectedFeatureIds: string[] - ids of the selected features
|
|
5405
|
+
*/
|
|
5406
|
+
var getSelectedFeatureIds$1 = createSelector(getLayerById, function (layer) {
|
|
5407
|
+
return (layer === null || layer === void 0 ? void 0 : layer.selectedFeatureIds) || [];
|
|
5408
|
+
}, selectorMemoizationOptions);
|
|
5370
5409
|
var getHasFeatureLayerGeoJSON = createSelector(getFeatureLayerGeoJSON, function (geojson) {
|
|
5371
5410
|
return !!geojson;
|
|
5372
5411
|
}, selectorMemoizationOptions);
|
|
@@ -5594,6 +5633,7 @@ var selectors$4 = /*#__PURE__*/Object.freeze({
|
|
|
5594
5633
|
getLayersIds: getLayersIds,
|
|
5595
5634
|
getOverLayers: getOverLayers,
|
|
5596
5635
|
getOverlayersForMapId: getOverlayersForMapId,
|
|
5636
|
+
getSelectedFeatureIds: getSelectedFeatureIds$1,
|
|
5597
5637
|
getTimeStepForLayerId: getTimeStepForLayerId,
|
|
5598
5638
|
getUseLatestReferenceTime: getUseLatestReferenceTime
|
|
5599
5639
|
});
|
|
@@ -6978,6 +7018,12 @@ var getClockPosition = createSelector(getMapById, function (store) {
|
|
|
6978
7018
|
var getClockSize = createSelector(getMapById, function (store) {
|
|
6979
7019
|
return store === null || store === void 0 ? void 0 : store.clockSize;
|
|
6980
7020
|
}, selectorMemoizationOptions);
|
|
7021
|
+
var getLegendPosition = createSelector(getMapById, function (store) {
|
|
7022
|
+
return store === null || store === void 0 ? void 0 : store.legendPosition;
|
|
7023
|
+
}, selectorMemoizationOptions);
|
|
7024
|
+
var getLegendSize = createSelector(getMapById, function (store) {
|
|
7025
|
+
return store === null || store === void 0 ? void 0 : store.legendSize;
|
|
7026
|
+
}, selectorMemoizationOptions);
|
|
6981
7027
|
/**
|
|
6982
7028
|
* Creates a MapPreset from mapId
|
|
6983
7029
|
*
|
|
@@ -6999,14 +7045,14 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
6999
7045
|
}, function (store, mapId) {
|
|
7000
7046
|
var _getMapById3;
|
|
7001
7047
|
return (_getMapById3 = getMapById(store, mapId)) === null || _getMapById3 === void 0 ? void 0 : _getMapById3.dockedLayerManagerDimensions;
|
|
7002
|
-
}, getIsClockVisible, getIsClockOptionsMenuVisible, getClockPosition, getClockSize, getUiStore, function (_store, mapId) {
|
|
7048
|
+
}, getIsClockVisible, getIsClockOptionsMenuVisible, getClockPosition, getClockSize, getLegendPosition, getLegendSize, getUiStore, function (_store, mapId) {
|
|
7003
7049
|
return mapId;
|
|
7004
7050
|
}, function (_store, _mapId) {
|
|
7005
7051
|
var keepAllDims = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7006
7052
|
return keepAllDims;
|
|
7007
|
-
}, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, isClockVisible, isClockOptionsMenuVisible, clockPosition, clockSize, uiStore, mapId, keepAllDims) {
|
|
7053
|
+
}, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, isClockVisible, isClockOptionsMenuVisible, clockPosition, clockSize, legendPosition, legendSize, uiStore, mapId, keepAllDims) {
|
|
7008
7054
|
var _overLayers$, _uiStore$dialogs$isOp, _uiStore$dialogs;
|
|
7009
|
-
var defaultOverlayer = arguments.length >
|
|
7055
|
+
var defaultOverlayer = arguments.length > 33 && arguments[33] !== undefined ? arguments[33] : ((_overLayers$ = overLayers[0]) === null || _overLayers$ === void 0 ? void 0 : _overLayers$.name) || 'none';
|
|
7010
7056
|
var allLayers = [].concat(_toConsumableArray(baseLayers), _toConsumableArray(overLayers), _toConsumableArray(mapLayers)).map(function (_ref3) {
|
|
7011
7057
|
_ref3.mapId;
|
|
7012
7058
|
var layer = _objectWithoutProperties(_ref3, _excluded$2);
|
|
@@ -7032,6 +7078,11 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
7032
7078
|
duration: getAnimationDuration(animationEndTime, animationStartTime)
|
|
7033
7079
|
};
|
|
7034
7080
|
var shouldShowLegend = (_uiStore$dialogs$isOp = uiStore === null || uiStore === void 0 || (_uiStore$dialogs = uiStore.dialogs["".concat(DialogTypes.Legend, "-").concat(mapId)]) === null || _uiStore$dialogs === void 0 ? void 0 : _uiStore$dialogs.isOpen) !== null && _uiStore$dialogs$isOp !== void 0 ? _uiStore$dialogs$isOp : false;
|
|
7081
|
+
var legendPreset = shouldShowLegend ? _objectSpread2(_objectSpread2({}, legendPosition !== undefined && {
|
|
7082
|
+
legendPosition: legendPosition
|
|
7083
|
+
}), legendSize !== undefined && {
|
|
7084
|
+
legendSize: legendSize
|
|
7085
|
+
}) : {};
|
|
7035
7086
|
var dataExplorerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs[DialogTypes.DataExplorer];
|
|
7036
7087
|
var shouldShowDataExplorer = (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.isOpen) && (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.activeMapId) === mapId || false;
|
|
7037
7088
|
var dockedLayerManagerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs["".concat(DialogTypes.DockedLayerManager, "-").concat(mapId)];
|
|
@@ -7046,7 +7097,7 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
7046
7097
|
}, dockedLayerManagerDimensions && {
|
|
7047
7098
|
dockedLayerManagerDimensions: dockedLayerManagerDimensions
|
|
7048
7099
|
}) : {};
|
|
7049
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
7100
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
7050
7101
|
layers: allLayers
|
|
7051
7102
|
}, activeLayerId && {
|
|
7052
7103
|
activeLayerId: activeLayerId
|
|
@@ -7067,7 +7118,8 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
7067
7118
|
animationPayload: animationPayload,
|
|
7068
7119
|
toggleTimestepAuto: isTimestepAuto,
|
|
7069
7120
|
toggleTimeSpanAuto: isTimeSpanAuto,
|
|
7070
|
-
shouldShowLegend: shouldShowLegend
|
|
7121
|
+
shouldShowLegend: shouldShowLegend
|
|
7122
|
+
}, legendPreset), {}, {
|
|
7071
7123
|
timeSliderSpan: timeSliderSpan,
|
|
7072
7124
|
shouldShowDataExplorer: shouldShowDataExplorer,
|
|
7073
7125
|
defaultOverlayer: defaultOverlayer
|
|
@@ -7346,6 +7398,8 @@ var selectors$1 = /*#__PURE__*/Object.freeze({
|
|
|
7346
7398
|
getLayerIdByLayerName: getLayerIdByLayerName,
|
|
7347
7399
|
getLayerIds: getLayerIds,
|
|
7348
7400
|
getLayerIndexByLayerId: getLayerIndexByLayerId,
|
|
7401
|
+
getLegendPosition: getLegendPosition,
|
|
7402
|
+
getLegendSize: getLegendSize,
|
|
7349
7403
|
getMapAnimationDelay: getMapAnimationDelay,
|
|
7350
7404
|
getMapBaseLayers: getMapBaseLayers,
|
|
7351
7405
|
getMapBaseLayersIds: getMapBaseLayersIds,
|
|
@@ -8688,7 +8742,7 @@ mapListener.startListening({
|
|
|
8688
8742
|
actionCreator: mapActions.setMapPreset,
|
|
8689
8743
|
effect: function () {
|
|
8690
8744
|
var _effect2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref6, listenerApi) {
|
|
8691
|
-
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, isClockOptionsMenuVisible, 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, dockedLayerManagerType, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart, _t;
|
|
8745
|
+
var payload, mapId, initialProps, mapPreset, _mapPreset$dimensions, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, legendPosition, legendSize, shouldShowDockedLayerManager, shouldShowDataExplorer, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, timeSliderSpan, toggleTimeSpanAuto, defaultOverlayer, isClockVisible, isClockOptionsMenuVisible, 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, dockedLayerManagerType, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart, _t;
|
|
8692
8746
|
return _regenerator().w(function (_context2) {
|
|
8693
8747
|
while (1) switch (_context2.p = _context2.n) {
|
|
8694
8748
|
case 0:
|
|
@@ -8700,7 +8754,7 @@ mapListener.startListening({
|
|
|
8700
8754
|
_context2.n = 6;
|
|
8701
8755
|
break;
|
|
8702
8756
|
}
|
|
8703
|
-
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, isClockOptionsMenuVisible = mapPreset.isClockOptionsMenuVisible, clockPosition = mapPreset.clockPosition, clockSize = mapPreset.clockSize;
|
|
8757
|
+
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, legendPosition = mapPreset.legendPosition, legendSize = mapPreset.legendSize, 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, isClockOptionsMenuVisible = mapPreset.isClockOptionsMenuVisible, clockPosition = mapPreset.clockPosition, clockSize = mapPreset.clockSize;
|
|
8704
8758
|
_filterLayers = filterLayers(layers), mapLayers = _filterLayers.mapLayers, baseLayers = _filterLayers.baseLayers, overLayers = _filterLayers.overLayers;
|
|
8705
8759
|
if (layers) {
|
|
8706
8760
|
// make sure all layers have a unique id before going forward
|
|
@@ -8854,6 +8908,18 @@ mapListener.startListening({
|
|
|
8854
8908
|
size: clockSize
|
|
8855
8909
|
}));
|
|
8856
8910
|
}
|
|
8911
|
+
if (legendPosition !== undefined) {
|
|
8912
|
+
listenerApi.dispatch(mapActions.setLegendPositionSize({
|
|
8913
|
+
mapId: mapId,
|
|
8914
|
+
position: legendPosition
|
|
8915
|
+
}));
|
|
8916
|
+
}
|
|
8917
|
+
if (legendSize !== undefined) {
|
|
8918
|
+
listenerApi.dispatch(mapActions.setLegendPositionSize({
|
|
8919
|
+
mapId: mapId,
|
|
8920
|
+
size: legendSize
|
|
8921
|
+
}));
|
|
8922
|
+
}
|
|
8857
8923
|
// sets timestep by interval of animationPayload
|
|
8858
8924
|
interval = animationPayload === null || animationPayload === void 0 ? void 0 : animationPayload.interval;
|
|
8859
8925
|
if (interval) {
|
|
@@ -9666,7 +9732,13 @@ var slice$1 = createSlice({
|
|
|
9666
9732
|
}).addCase(layerActions.updateFeatureProperties, function (draft, action) {
|
|
9667
9733
|
var _action$payload6 = action.payload,
|
|
9668
9734
|
properties = _action$payload6.properties,
|
|
9669
|
-
layerId = _action$payload6.layerId
|
|
9735
|
+
layerId = _action$payload6.layerId,
|
|
9736
|
+
targetFeatureIndex = _action$payload6.targetFeatureIndex;
|
|
9737
|
+
// Set style props for drawMode templates
|
|
9738
|
+
// Must skip single feature specific settings
|
|
9739
|
+
if (targetFeatureIndex !== undefined) {
|
|
9740
|
+
return;
|
|
9741
|
+
}
|
|
9670
9742
|
var drawToolId = getDrawToolByLayerId(draft, layerId);
|
|
9671
9743
|
var entity = draft.entities[drawToolId];
|
|
9672
9744
|
if (drawToolId && entity !== undefined) {
|
|
@@ -1694,6 +1694,55 @@ export declare const getFeatureLayerGeoJSON: ((state: any, layerId: any) => impo
|
|
|
1694
1694
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
1695
1695
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
1696
1696
|
};
|
|
1697
|
+
/**
|
|
1698
|
+
* Returns the ids of the selected features of a feature layer
|
|
1699
|
+
*
|
|
1700
|
+
* Example const selectedFeatureIds = getSelectedFeatureIds(store, 'layerId1')
|
|
1701
|
+
* @param {object} store store: object - store object
|
|
1702
|
+
* @param {string} layerId layerId: string - Id of the layer
|
|
1703
|
+
* @returns {string[]} selectedFeatureIds: string[] - ids of the selected features
|
|
1704
|
+
*/
|
|
1705
|
+
export declare const getSelectedFeatureIds: ((state: any, layerId: any) => string[]) & {
|
|
1706
|
+
clearCache: () => void;
|
|
1707
|
+
resultsCount: () => number;
|
|
1708
|
+
resetResultsCount: () => void;
|
|
1709
|
+
} & {
|
|
1710
|
+
resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => string[];
|
|
1711
|
+
memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => string[]) & {
|
|
1712
|
+
clearCache: () => void;
|
|
1713
|
+
resultsCount: () => number;
|
|
1714
|
+
resetResultsCount: () => void;
|
|
1715
|
+
};
|
|
1716
|
+
lastResult: () => string[];
|
|
1717
|
+
dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
|
|
1718
|
+
clearCache: () => void;
|
|
1719
|
+
resultsCount: () => number;
|
|
1720
|
+
resetResultsCount: () => void;
|
|
1721
|
+
} & {
|
|
1722
|
+
resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
|
|
1723
|
+
memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
|
|
1724
|
+
clearCache: () => void;
|
|
1725
|
+
resultsCount: () => number;
|
|
1726
|
+
resetResultsCount: () => void;
|
|
1727
|
+
};
|
|
1728
|
+
lastResult: () => ReduxLayer | undefined;
|
|
1729
|
+
dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
|
|
1730
|
+
recomputations: () => number;
|
|
1731
|
+
resetRecomputations: () => void;
|
|
1732
|
+
dependencyRecomputations: () => number;
|
|
1733
|
+
resetDependencyRecomputations: () => void;
|
|
1734
|
+
} & {
|
|
1735
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
1736
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
1737
|
+
}];
|
|
1738
|
+
recomputations: () => number;
|
|
1739
|
+
resetRecomputations: () => void;
|
|
1740
|
+
dependencyRecomputations: () => number;
|
|
1741
|
+
resetDependencyRecomputations: () => void;
|
|
1742
|
+
} & {
|
|
1743
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
1744
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
1745
|
+
};
|
|
1697
1746
|
export declare const getHasFeatureLayerGeoJSON: ((state: any, layerId: any) => boolean) & {
|
|
1698
1747
|
clearCache: () => void;
|
|
1699
1748
|
resultsCount: () => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
2
|
import type { MapPinLocationPayload, SetBboxPayload, SetStepBackWardOrForward, UpdateAllMapDimensionsPayload } from '@opengeoweb/webmap-react';
|
|
3
|
-
import type { WebMapState, SetAutoLayerIdPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetTimeSliderSpanPayload, SetTimeStepPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, SetAnimationDelayPayload, MoveLayerPayload, SetTimeSliderWidthPayload, SetTimeSliderCenterTimePayload, SetEndTimeOverriding, ToggleAutoUpdatePayload, ToggleTimestepAutoPayload, ToggleTimeSpanAutoPayload, ToggleTimeSliderHoverPayload, DisableMapPinPayload, ToggleTimeSliderIsVisiblePayload, SetDockedLayerManagerSize, SetDockedLayerManagerPosition, SetDockedLayerManagerDimensions, ToggleAnimationLengthAutoPayload, SetDefaultMapSettingsPayload, ToggleClockPayload, SetClockPositionSizePayload } from './types';
|
|
3
|
+
import type { WebMapState, SetAutoLayerIdPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetTimeSliderSpanPayload, SetTimeStepPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, SetAnimationDelayPayload, MoveLayerPayload, SetTimeSliderWidthPayload, SetTimeSliderCenterTimePayload, SetEndTimeOverriding, ToggleAutoUpdatePayload, ToggleTimestepAutoPayload, ToggleTimeSpanAutoPayload, ToggleTimeSliderHoverPayload, DisableMapPinPayload, ToggleTimeSliderIsVisiblePayload, SetDockedLayerManagerSize, SetDockedLayerManagerPosition, SetDockedLayerManagerDimensions, ToggleAnimationLengthAutoPayload, SetDefaultMapSettingsPayload, ToggleClockPayload, SetClockPositionSizePayload, SetLegendPositionSizePayload } from './types';
|
|
4
4
|
import type { ToggleMapPinIsVisiblePayload, ToggleZoomControlsPayload } from '../types';
|
|
5
5
|
import type { MapActionOrigin } from './enums';
|
|
6
6
|
/**
|
|
@@ -73,6 +73,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<WebMapState, {
|
|
|
73
73
|
origin?: string;
|
|
74
74
|
}>) => void;
|
|
75
75
|
setClockPositionSize: (draft: Draft<WebMapState>, action: PayloadAction<SetClockPositionSizePayload>) => void;
|
|
76
|
+
setLegendPositionSize: (draft: Draft<WebMapState>, action: PayloadAction<SetLegendPositionSizePayload>) => void;
|
|
76
77
|
}, "mapReducer", "mapReducer", import("@reduxjs/toolkit").SliceSelectors<WebMapState>>;
|
|
77
78
|
export declare const mapActions: {
|
|
78
79
|
setMapPreset: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetMapPresetPayload, string>;
|
|
@@ -138,5 +139,6 @@ export declare const mapActions: {
|
|
|
138
139
|
origin?: string;
|
|
139
140
|
}, "mapReducer/toggleClockOptions">;
|
|
140
141
|
setClockPositionSize: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetClockPositionSizePayload, "mapReducer/setClockPositionSize">;
|
|
142
|
+
setLegendPositionSize: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetLegendPositionSizePayload, "mapReducer/setLegendPositionSize">;
|
|
141
143
|
};
|
|
142
144
|
export declare const mapReducer: import("redux").Reducer<WebMapState>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Bbox, ClockPosition, ClockSize, MapPreset, WebMap, WebMapState } from './types';
|
|
1
|
+
import type { Bbox, ClockPosition, ClockSize, LegendPosition, LegendSize, MapPreset, WebMap, WebMapState } from './types';
|
|
2
2
|
import type { CoreAppStore } from '../../types';
|
|
3
3
|
import { uiTypes } from '../../ui';
|
|
4
4
|
import type { Dimension, DockedLayerManagerPosition, DockedLayerManagerSize, DockedLayerManagerDimensions, HarmonieInitialPropsResult, InitialTimeSliderProps, Layer, MultiMapInitialProps, ReduxLayer, TimeSliderStartEndStep, WebMapAnimationList } from '../types';
|
|
@@ -2146,6 +2146,48 @@ export declare const getClockSize: ((state: CoreAppStore, mapId: string) => Cloc
|
|
|
2146
2146
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2147
2147
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
2148
2148
|
};
|
|
2149
|
+
export declare const getLegendPosition: ((state: CoreAppStore, mapId: string) => LegendPosition | undefined) & {
|
|
2150
|
+
clearCache: () => void;
|
|
2151
|
+
resultsCount: () => number;
|
|
2152
|
+
resetResultsCount: () => void;
|
|
2153
|
+
} & {
|
|
2154
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => LegendPosition | undefined;
|
|
2155
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => LegendPosition | undefined) & {
|
|
2156
|
+
clearCache: () => void;
|
|
2157
|
+
resultsCount: () => number;
|
|
2158
|
+
resetResultsCount: () => void;
|
|
2159
|
+
};
|
|
2160
|
+
lastResult: () => LegendPosition | undefined;
|
|
2161
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2162
|
+
recomputations: () => number;
|
|
2163
|
+
resetRecomputations: () => void;
|
|
2164
|
+
dependencyRecomputations: () => number;
|
|
2165
|
+
resetDependencyRecomputations: () => void;
|
|
2166
|
+
} & {
|
|
2167
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2168
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2169
|
+
};
|
|
2170
|
+
export declare const getLegendSize: ((state: CoreAppStore, mapId: string) => LegendSize | undefined) & {
|
|
2171
|
+
clearCache: () => void;
|
|
2172
|
+
resultsCount: () => number;
|
|
2173
|
+
resetResultsCount: () => void;
|
|
2174
|
+
} & {
|
|
2175
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => LegendSize | undefined;
|
|
2176
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => LegendSize | undefined) & {
|
|
2177
|
+
clearCache: () => void;
|
|
2178
|
+
resultsCount: () => number;
|
|
2179
|
+
resetResultsCount: () => void;
|
|
2180
|
+
};
|
|
2181
|
+
lastResult: () => LegendSize | undefined;
|
|
2182
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2183
|
+
recomputations: () => number;
|
|
2184
|
+
resetRecomputations: () => void;
|
|
2185
|
+
dependencyRecomputations: () => number;
|
|
2186
|
+
resetDependencyRecomputations: () => void;
|
|
2187
|
+
} & {
|
|
2188
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2189
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2190
|
+
};
|
|
2149
2191
|
/**
|
|
2150
2192
|
* Creates a MapPreset from mapId
|
|
2151
2193
|
*
|
|
@@ -2160,8 +2202,8 @@ export declare const getMapPreset: ((state: CoreAppStore & uiTypes.UIModuleState
|
|
|
2160
2202
|
resultsCount: () => number;
|
|
2161
2203
|
resetResultsCount: () => void;
|
|
2162
2204
|
} & {
|
|
2163
|
-
resultFunc: (resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: DockedLayerManagerSize, resultFuncArgs_22: DockedLayerManagerPosition, resultFuncArgs_23: DockedLayerManagerDimensions | undefined, resultFuncArgs_24: boolean | undefined, resultFuncArgs_25: boolean | undefined, resultFuncArgs_26: ClockPosition | undefined, resultFuncArgs_27: ClockSize | undefined, resultFuncArgs_28: uiTypes.UIStoreType,
|
|
2164
|
-
memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: DockedLayerManagerSize, resultFuncArgs_22: DockedLayerManagerPosition, resultFuncArgs_23: DockedLayerManagerDimensions | undefined, resultFuncArgs_24: boolean | undefined, resultFuncArgs_25: boolean | undefined, resultFuncArgs_26: ClockPosition | undefined, resultFuncArgs_27: ClockSize | undefined, resultFuncArgs_28: uiTypes.UIStoreType,
|
|
2205
|
+
resultFunc: (resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: DockedLayerManagerSize, resultFuncArgs_22: DockedLayerManagerPosition, resultFuncArgs_23: DockedLayerManagerDimensions | undefined, resultFuncArgs_24: boolean | undefined, resultFuncArgs_25: boolean | undefined, resultFuncArgs_26: ClockPosition | undefined, resultFuncArgs_27: ClockSize | undefined, resultFuncArgs_28: LegendPosition | undefined, resultFuncArgs_29: LegendSize | undefined, resultFuncArgs_30: uiTypes.UIStoreType, resultFuncArgs_31: string, resultFuncArgs_32: string) => MapPreset;
|
|
2206
|
+
memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: DockedLayerManagerSize, resultFuncArgs_22: DockedLayerManagerPosition, resultFuncArgs_23: DockedLayerManagerDimensions | undefined, resultFuncArgs_24: boolean | undefined, resultFuncArgs_25: boolean | undefined, resultFuncArgs_26: ClockPosition | undefined, resultFuncArgs_27: ClockSize | undefined, resultFuncArgs_28: LegendPosition | undefined, resultFuncArgs_29: LegendSize | undefined, resultFuncArgs_30: uiTypes.UIStoreType, resultFuncArgs_31: string, resultFuncArgs_32: string) => MapPreset) & {
|
|
2165
2207
|
clearCache: () => void;
|
|
2166
2208
|
resultsCount: () => number;
|
|
2167
2209
|
resetResultsCount: () => void;
|
|
@@ -2767,6 +2809,46 @@ export declare const getMapPreset: ((state: CoreAppStore & uiTypes.UIModuleState
|
|
|
2767
2809
|
} & {
|
|
2768
2810
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2769
2811
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
2812
|
+
}, ((state: CoreAppStore, mapId: string) => LegendPosition | undefined) & {
|
|
2813
|
+
clearCache: () => void;
|
|
2814
|
+
resultsCount: () => number;
|
|
2815
|
+
resetResultsCount: () => void;
|
|
2816
|
+
} & {
|
|
2817
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => LegendPosition | undefined;
|
|
2818
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => LegendPosition | undefined) & {
|
|
2819
|
+
clearCache: () => void;
|
|
2820
|
+
resultsCount: () => number;
|
|
2821
|
+
resetResultsCount: () => void;
|
|
2822
|
+
};
|
|
2823
|
+
lastResult: () => LegendPosition | undefined;
|
|
2824
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2825
|
+
recomputations: () => number;
|
|
2826
|
+
resetRecomputations: () => void;
|
|
2827
|
+
dependencyRecomputations: () => number;
|
|
2828
|
+
resetDependencyRecomputations: () => void;
|
|
2829
|
+
} & {
|
|
2830
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2831
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2832
|
+
}, ((state: CoreAppStore, mapId: string) => LegendSize | undefined) & {
|
|
2833
|
+
clearCache: () => void;
|
|
2834
|
+
resultsCount: () => number;
|
|
2835
|
+
resetResultsCount: () => void;
|
|
2836
|
+
} & {
|
|
2837
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => LegendSize | undefined;
|
|
2838
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => LegendSize | undefined) & {
|
|
2839
|
+
clearCache: () => void;
|
|
2840
|
+
resultsCount: () => number;
|
|
2841
|
+
resetResultsCount: () => void;
|
|
2842
|
+
};
|
|
2843
|
+
lastResult: () => LegendSize | undefined;
|
|
2844
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2845
|
+
recomputations: () => number;
|
|
2846
|
+
resetRecomputations: () => void;
|
|
2847
|
+
dependencyRecomputations: () => number;
|
|
2848
|
+
resetDependencyRecomputations: () => void;
|
|
2849
|
+
} & {
|
|
2850
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2851
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2770
2852
|
}, (store: uiTypes.UIModuleState) => uiTypes.UIStoreType, (_store: CoreAppStore, mapId: string) => string, (_store: CoreAppStore, _mapId: string, keepAllDims?: any) => string];
|
|
2771
2853
|
recomputations: () => number;
|
|
2772
2854
|
resetRecomputations: () => void;
|
|
@@ -59,6 +59,8 @@ export interface WebMap {
|
|
|
59
59
|
isClockOptionsMenuVisible?: boolean;
|
|
60
60
|
clockPosition?: ClockPosition;
|
|
61
61
|
clockSize?: ClockSize;
|
|
62
|
+
legendPosition?: LegendPosition;
|
|
63
|
+
legendSize?: LegendSize;
|
|
62
64
|
}
|
|
63
65
|
export type DockedLayerManagerSize = 'sizeSmall' | 'sizeMedium' | 'sizeLarge' | '';
|
|
64
66
|
export interface DockedLayerManagerPosition {
|
|
@@ -115,6 +117,8 @@ export interface MapPreset {
|
|
|
115
117
|
toggleTimestepAuto?: boolean;
|
|
116
118
|
animationPayload?: AnimationPayloadType;
|
|
117
119
|
shouldShowLegend?: boolean;
|
|
120
|
+
legendPosition?: LegendPosition;
|
|
121
|
+
legendSize?: LegendSize;
|
|
118
122
|
shouldShowLayerManager?: boolean;
|
|
119
123
|
shouldShowDockedLayerManager?: boolean;
|
|
120
124
|
dockedLayerManagerSize?: DockedLayerManagerSize;
|
|
@@ -320,9 +324,23 @@ export interface ClockSize {
|
|
|
320
324
|
width: number;
|
|
321
325
|
height: number;
|
|
322
326
|
}
|
|
327
|
+
export interface LegendPosition {
|
|
328
|
+
x: number;
|
|
329
|
+
y: number;
|
|
330
|
+
}
|
|
331
|
+
export interface LegendSize {
|
|
332
|
+
width: number;
|
|
333
|
+
height: number;
|
|
334
|
+
}
|
|
323
335
|
export interface SetClockPositionSizePayload {
|
|
324
336
|
mapId: string;
|
|
325
337
|
position?: ClockPosition;
|
|
326
338
|
size?: ClockSize;
|
|
327
339
|
origin?: MapActionOrigin;
|
|
328
340
|
}
|
|
341
|
+
export interface SetLegendPositionSizePayload {
|
|
342
|
+
mapId: string;
|
|
343
|
+
position?: LegendPosition;
|
|
344
|
+
size?: LegendSize;
|
|
345
|
+
origin?: MapActionOrigin;
|
|
346
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/store",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.6.1",
|
|
4
4
|
"description": "GeoWeb Store library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"ol": "^10.4.0",
|
|
33
33
|
"@turf/turf": "^7.2.0",
|
|
34
34
|
"@types/geojson": "^7946.0.14",
|
|
35
|
-
"react-router": "^7.
|
|
35
|
+
"react-router": "^7.18.2",
|
|
36
36
|
"uuid": "^11.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|