@opengeoweb/store 13.0.0 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +39 -25
- package/package.json +6 -6
- package/src/store/map/map/constants.d.ts +2 -0
package/index.esm.js
CHANGED
|
@@ -1978,9 +1978,21 @@ var slice$6 = createSlice({
|
|
|
1978
1978
|
return dim.name === newLayerDimension.name;
|
|
1979
1979
|
});
|
|
1980
1980
|
if (existingDimension) {
|
|
1981
|
-
var _newLayerDimension$
|
|
1982
|
-
if (existingDimension.name === 'reference_time' && reduxLayer.useLatestReferenceTime
|
|
1983
|
-
|
|
1981
|
+
var _newLayerDimension$va2;
|
|
1982
|
+
if (existingDimension.name === 'reference_time' && reduxLayer.useLatestReferenceTime) {
|
|
1983
|
+
var _existingDimension$va, _newLayerDimension$va;
|
|
1984
|
+
// update currentvalue to corresponding LATEST value
|
|
1985
|
+
// LATEST, LATEST-1, LATEST-2, LATEST-3
|
|
1986
|
+
var existingValues = (_existingDimension$va = existingDimension.values) === null || _existingDimension$va === void 0 ? void 0 : _existingDimension$va.split(',');
|
|
1987
|
+
var newValues = (_newLayerDimension$va = newLayerDimension.values) === null || _newLayerDimension$va === void 0 ? void 0 : _newLayerDimension$va.split(',');
|
|
1988
|
+
if (existingValues && newValues) {
|
|
1989
|
+
var match = [1, 2, 3, 4].find(function (offset) {
|
|
1990
|
+
return existingDimension.currentValue === existingValues.at(-offset) && newValues.at(-offset) !== undefined;
|
|
1991
|
+
});
|
|
1992
|
+
if (match) {
|
|
1993
|
+
existingDimension.currentValue = newValues.at(-match);
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1984
1996
|
}
|
|
1985
1997
|
/* If found update only minValue, maxValue and values */
|
|
1986
1998
|
existingDimension.maxValue = newLayerDimension.maxValue;
|
|
@@ -1990,7 +2002,7 @@ var slice$6 = createSlice({
|
|
|
1990
2002
|
existingDimension.units = newLayerDimension.units;
|
|
1991
2003
|
}
|
|
1992
2004
|
/* For non time dimensions also update the current value, but only if the currentValue does not exist in the new dimension values */
|
|
1993
|
-
var listOfValues = (_newLayerDimension$
|
|
2005
|
+
var listOfValues = (_newLayerDimension$va2 = newLayerDimension.values) === null || _newLayerDimension$va2 === void 0 ? void 0 : _newLayerDimension$va2.split(',');
|
|
1994
2006
|
if (existingDimension.name !== 'time' && existingDimension.name !== 'reference_time' && !(listOfValues !== null && listOfValues !== void 0 && listOfValues.includes(existingDimension.currentValue))) {
|
|
1995
2007
|
existingDimension.currentValue = newLayerDimension.currentValue;
|
|
1996
2008
|
}
|
|
@@ -4975,6 +4987,27 @@ var genericActions = _objectSpread2(_objectSpread2({}, syncGroupsActions), {}, {
|
|
|
4975
4987
|
setBbox: setBbox
|
|
4976
4988
|
});
|
|
4977
4989
|
|
|
4990
|
+
/* *
|
|
4991
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4992
|
+
* you may not use this file except in compliance with the License.
|
|
4993
|
+
* You may obtain a copy of the License at
|
|
4994
|
+
*
|
|
4995
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4996
|
+
*
|
|
4997
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4998
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4999
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5000
|
+
* See the License for the specific language governing permissions and
|
|
5001
|
+
* limitations under the License.
|
|
5002
|
+
*
|
|
5003
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5004
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
5005
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
5006
|
+
* */
|
|
5007
|
+
var IS_LEGEND_OPEN_BY_DEFAULT = false;
|
|
5008
|
+
var SECONDS_IN_DAY = 86400;
|
|
5009
|
+
var SECONDS_IN_HOUR = 3600;
|
|
5010
|
+
|
|
4978
5011
|
var _excluded$2 = ["mapId"];
|
|
4979
5012
|
var getMapStore = function getMapStore(store) {
|
|
4980
5013
|
return store && store.webmap;
|
|
@@ -5419,7 +5452,7 @@ var getMapTimeSliderCenterTime = function getMapTimeSliderCenterTime(store, mapI
|
|
|
5419
5452
|
};
|
|
5420
5453
|
var getMapTimeSliderStartCenterEndAndStep = createSelector(getMapById, function (store) {
|
|
5421
5454
|
var _store$timeStep2;
|
|
5422
|
-
var timeSliderWidth = (
|
|
5455
|
+
var timeSliderWidth = (store === null || store === void 0 ? void 0 : store.timeSliderSpan) || SECONDS_IN_DAY;
|
|
5423
5456
|
var center = store ? store.timeSliderCenterTime : dateUtils.unix(dateUtils.utc());
|
|
5424
5457
|
var start = center ? center - timeSliderWidth / 2 : undefined;
|
|
5425
5458
|
var end = center ? center + timeSliderWidth / 2 : undefined;
|
|
@@ -5942,25 +5975,6 @@ var enums = /*#__PURE__*/Object.freeze({
|
|
|
5942
5975
|
get MapActionOrigin () { return MapActionOrigin; }
|
|
5943
5976
|
});
|
|
5944
5977
|
|
|
5945
|
-
/* *
|
|
5946
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5947
|
-
* you may not use this file except in compliance with the License.
|
|
5948
|
-
* You may obtain a copy of the License at
|
|
5949
|
-
*
|
|
5950
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5951
|
-
*
|
|
5952
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5953
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5954
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5955
|
-
* See the License for the specific language governing permissions and
|
|
5956
|
-
* limitations under the License.
|
|
5957
|
-
*
|
|
5958
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5959
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5960
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5961
|
-
* */
|
|
5962
|
-
var IS_LEGEND_OPEN_BY_DEFAULT = false;
|
|
5963
|
-
|
|
5964
5978
|
var filterLayers = function filterLayers() {
|
|
5965
5979
|
var layers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
5966
5980
|
var layerParser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (layer) {
|
|
@@ -8987,4 +9001,4 @@ var configureOpenGeoWebStore = function configureOpenGeoWebStore() {
|
|
|
8987
9001
|
});
|
|
8988
9002
|
};
|
|
8989
9003
|
|
|
8990
|
-
export { IS_LEGEND_OPEN_BY_DEFAULT, configureOpenGeoWebStore, createMockStore, createViewObjectForNewMap, drawingToolActions, drawingToolListener, drawingToolReducer, selectors as drawingToolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$3 as genericSelectors, types as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, getViewObjectForMapId, getViewObjectForSyncGroup, initialState$2 as initialState, layerActions, layerReducer, selectors$6 as layerSelectors, types$3 as layerTypes, utils$1 as layerUtils, layersListener, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$2 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, mapReducer, selectors$1 as mapSelectors, types$4 as mapTypes, mapUtils, metronomeListener, openlayersListener, routerActions, routerListener, routerReducer, utils as routerUtils, selectorMemoizationOptions, serviceActions, serviceListener, serviceReducer, selectors$7 as serviceSelectors, types$5 as serviceTypes, setUserAddedServices, storeMiddlewares, storeReducerMap, storeTestSettings, storeTestUtils, utils$3 as storeUtils, constants$2 as syncConstants, syncGroupsActions, syncGroupsListener, syncGroupsReducer, selector as syncGroupsSelector, selectors$4 as syncGroupsSelectors, types$1 as syncGroupsTypes, types$1 as types, uiActions, uiReducer, selectors$5 as uiSelectors, types$2 as uiTypes, unifyReducerMaps, useSetupDialog, useUpdateSharedData };
|
|
9004
|
+
export { IS_LEGEND_OPEN_BY_DEFAULT, SECONDS_IN_DAY, SECONDS_IN_HOUR, configureOpenGeoWebStore, createMockStore, createViewObjectForNewMap, drawingToolActions, drawingToolListener, drawingToolReducer, selectors as drawingToolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$3 as genericSelectors, types as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, getViewObjectForMapId, getViewObjectForSyncGroup, initialState$2 as initialState, layerActions, layerReducer, selectors$6 as layerSelectors, types$3 as layerTypes, utils$1 as layerUtils, layersListener, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$2 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, mapReducer, selectors$1 as mapSelectors, types$4 as mapTypes, mapUtils, metronomeListener, openlayersListener, routerActions, routerListener, routerReducer, utils as routerUtils, selectorMemoizationOptions, serviceActions, serviceListener, serviceReducer, selectors$7 as serviceSelectors, types$5 as serviceTypes, setUserAddedServices, storeMiddlewares, storeReducerMap, storeTestSettings, storeTestUtils, utils$3 as storeUtils, constants$2 as syncConstants, syncGroupsActions, syncGroupsListener, syncGroupsReducer, selector as syncGroupsSelector, selectors$4 as syncGroupsSelectors, types$1 as syncGroupsTypes, types$1 as types, uiActions, uiReducer, selectors$5 as uiSelectors, types$2 as uiTypes, unifyReducerMaps, useSetupDialog, useUpdateSharedData };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/store",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "GeoWeb Store library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/shared": "13.
|
|
11
|
+
"@opengeoweb/shared": "13.1.0",
|
|
12
12
|
"react-redux": "^9.2.0",
|
|
13
13
|
"@reduxjs/toolkit": "^2.6.1",
|
|
14
|
-
"@opengeoweb/webmap-react": "13.
|
|
15
|
-
"@opengeoweb/webmap": "13.
|
|
14
|
+
"@opengeoweb/webmap-react": "13.1.0",
|
|
15
|
+
"@opengeoweb/webmap": "13.1.0",
|
|
16
16
|
"immer": "^10.0.3",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
|
-
"@opengeoweb/metronome": "13.
|
|
19
|
-
"@opengeoweb/time-slider": "13.
|
|
18
|
+
"@opengeoweb/metronome": "13.1.0",
|
|
19
|
+
"@opengeoweb/time-slider": "13.1.0",
|
|
20
20
|
"react-router-dom": "^6.23.1",
|
|
21
21
|
"ol": "^10.4.0",
|
|
22
22
|
"@turf/turf": "^7.2.0",
|