@opengeoweb/store 9.5.0 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js
CHANGED
|
@@ -3,8 +3,8 @@ import { webmapUtils, LayerType, webmapTestSettings, WMLayer, handleMomentISOStr
|
|
|
3
3
|
import { createAction, createSlice, createSelector, createEntityAdapter, current as current$1 } from '@reduxjs/toolkit';
|
|
4
4
|
import { getGeoJson, moveFeature, createInterSections, defaultLayers, getFeatureCollection, emptyGeoJSON, defaultIntersectionStyleProperties } from '@opengeoweb/webmap-react';
|
|
5
5
|
export { defaultLayers } from '@opengeoweb/webmap-react';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import { differenceInMinutes, isValid, fromUnixTime } from 'date-fns';
|
|
7
|
+
import { dateUtils, withEggs } from '@opengeoweb/shared';
|
|
8
8
|
import { isEqual, compact } from 'lodash';
|
|
9
9
|
import { createStore as createStore$1 } from '@redux-eggs/redux-toolkit';
|
|
10
10
|
import { getSagaExtension } from '@redux-eggs/saga-extension';
|
|
@@ -12,7 +12,6 @@ import { takeEvery, takeLatest, put, select, call, all, delay } from 'redux-saga
|
|
|
12
12
|
import React, { useCallback, useEffect } from 'react';
|
|
13
13
|
import { Provider, useDispatch, useSelector } from 'react-redux';
|
|
14
14
|
import { ThemeWrapper, lightTheme } from '@opengeoweb/theme';
|
|
15
|
-
import { withEggs } from '@opengeoweb/shared';
|
|
16
15
|
|
|
17
16
|
function _iterableToArrayLimit(r, l) {
|
|
18
17
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -557,15 +556,19 @@ var constants$1 = /*#__PURE__*/Object.freeze({
|
|
|
557
556
|
IS_LEGEND_OPEN_BY_DEFAULT: IS_LEGEND_OPEN_BY_DEFAULT
|
|
558
557
|
});
|
|
559
558
|
|
|
560
|
-
var dateFormat =
|
|
559
|
+
var dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z";
|
|
561
560
|
var createMap = function createMap(_ref) {
|
|
562
561
|
var id = _ref.id,
|
|
563
562
|
_ref$isAnimating = _ref.isAnimating,
|
|
564
563
|
isAnimating = _ref$isAnimating === void 0 ? false : _ref$isAnimating,
|
|
565
564
|
_ref$animationStartTi = _ref.animationStartTime,
|
|
566
|
-
animationStartTime = _ref$animationStartTi === void 0 ?
|
|
565
|
+
animationStartTime = _ref$animationStartTi === void 0 ? dateUtils.dateToString(dateUtils.sub(dateUtils.fromUnix(dateUtils.unix(dateUtils.utc())), {
|
|
566
|
+
hours: 5
|
|
567
|
+
}), dateFormat) : _ref$animationStartTi,
|
|
567
568
|
_ref$animationEndTime = _ref.animationEndTime,
|
|
568
|
-
animationEndTime = _ref$animationEndTime === void 0 ?
|
|
569
|
+
animationEndTime = _ref$animationEndTime === void 0 ? dateUtils.dateToString(dateUtils.sub(dateUtils.fromUnix(dateUtils.unix(dateUtils.utc())), {
|
|
570
|
+
minutes: 10
|
|
571
|
+
}), dateFormat) : _ref$animationEndTime,
|
|
569
572
|
_ref$isAutoUpdating = _ref.isAutoUpdating,
|
|
570
573
|
isAutoUpdating = _ref$isAutoUpdating === void 0 ? false : _ref$isAutoUpdating,
|
|
571
574
|
_ref$isEndTimeOverrid = _ref.isEndTimeOverriding,
|
|
@@ -600,7 +603,7 @@ var createMap = function createMap(_ref) {
|
|
|
600
603
|
_ref$timeSliderWidth = _ref.timeSliderWidth,
|
|
601
604
|
timeSliderWidth = _ref$timeSliderWidth === void 0 ? 440 : _ref$timeSliderWidth,
|
|
602
605
|
_ref$timeSliderCenter = _ref.timeSliderCenterTime,
|
|
603
|
-
timeSliderCenterTime = _ref$timeSliderCenter === void 0 ?
|
|
606
|
+
timeSliderCenterTime = _ref$timeSliderCenter === void 0 ? dateUtils.unix(dateUtils.utc()) : _ref$timeSliderCenter,
|
|
604
607
|
_ref$timeSliderSecond = _ref.timeSliderSecondsPerPx,
|
|
605
608
|
timeSliderSecondsPerPx = _ref$timeSliderSecond === void 0 ? defaultSecondsPerPx : _ref$timeSliderSecond,
|
|
606
609
|
_ref$isTimestepAuto = _ref.isTimestepAuto,
|
|
@@ -792,9 +795,6 @@ var getTimeStepFromDataInterval = function getTimeStepFromDataInterval(timeInter
|
|
|
792
795
|
return defaultTimeStep;
|
|
793
796
|
}
|
|
794
797
|
};
|
|
795
|
-
var getActiveLayerTimeStep = function getActiveLayerTimeStep(timeDimension) {
|
|
796
|
-
return (timeDimension === null || timeDimension === void 0 ? void 0 : timeDimension.timeInterval) ? getTimeStepFromDataInterval(timeDimension.timeInterval) : undefined;
|
|
797
|
-
};
|
|
798
798
|
var getSpeedFactor = function getSpeedFactor(speedDelay) {
|
|
799
799
|
return defaultDelay / speedDelay;
|
|
800
800
|
};
|
|
@@ -852,7 +852,6 @@ var utils$3 = /*#__PURE__*/Object.freeze({
|
|
|
852
852
|
produceDraftStateSetMapDimensionFromLayerChangeDimension: produceDraftStateSetMapDimensionFromLayerChangeDimension,
|
|
853
853
|
moveArrayElements: moveArrayElements,
|
|
854
854
|
getTimeStepFromDataInterval: getTimeStepFromDataInterval,
|
|
855
|
-
getActiveLayerTimeStep: getActiveLayerTimeStep,
|
|
856
855
|
getSpeedFactor: getSpeedFactor,
|
|
857
856
|
getAnimationDuration: getAnimationDuration,
|
|
858
857
|
getSpeedDelay: getSpeedDelay,
|
|
@@ -2077,6 +2076,12 @@ var getLayerIsInsideAcceptanceTime = createSelector(getAcceptanceTimeInMinutes,
|
|
|
2077
2076
|
var getUseLatestReferenceTime = createSelector(getLayerById, function (layer) {
|
|
2078
2077
|
return Boolean(layer === null || layer === void 0 ? void 0 : layer.useLatestReferenceTime);
|
|
2079
2078
|
}, selectorMemoizationOptions);
|
|
2079
|
+
/**
|
|
2080
|
+
* Returns the timestep for this layerId in seconds, or undefined if it has no time dimension or timeinterval.
|
|
2081
|
+
*/
|
|
2082
|
+
var getTimeStepForLayerId = createSelector(getLayerTimeDimension, function (timeDimension) {
|
|
2083
|
+
return timeDimension && timeDimension.timeInterval ? getTimeStepFromDataInterval(timeDimension.timeInterval) : undefined;
|
|
2084
|
+
}, selectorMemoizationOptions);
|
|
2080
2085
|
|
|
2081
2086
|
var selectors$6 = /*#__PURE__*/Object.freeze({
|
|
2082
2087
|
__proto__: null,
|
|
@@ -2110,7 +2115,8 @@ var selectors$6 = /*#__PURE__*/Object.freeze({
|
|
|
2110
2115
|
getDimensionLayerIds: getDimensionLayerIds,
|
|
2111
2116
|
getAcceptanceTimeInMinutes: getAcceptanceTimeInMinutes,
|
|
2112
2117
|
getLayerIsInsideAcceptanceTime: getLayerIsInsideAcceptanceTime,
|
|
2113
|
-
getUseLatestReferenceTime: getUseLatestReferenceTime
|
|
2118
|
+
getUseLatestReferenceTime: getUseLatestReferenceTime,
|
|
2119
|
+
getTimeStepForLayerId: getTimeStepForLayerId
|
|
2114
2120
|
});
|
|
2115
2121
|
|
|
2116
2122
|
/* *
|
|
@@ -4058,13 +4064,13 @@ var getMapDimension = createSelector([getMapById, function (_store, mapId) {
|
|
|
4058
4064
|
var getSelectedTime = createSelector(function (store, mapId) {
|
|
4059
4065
|
return getMapDimension(store, mapId, 'time');
|
|
4060
4066
|
}, function (timeDimension) {
|
|
4061
|
-
var now =
|
|
4067
|
+
var now = dateUtils.unix(new Date());
|
|
4062
4068
|
if (!timeDimension) {
|
|
4063
4069
|
return now;
|
|
4064
4070
|
}
|
|
4065
|
-
var timeSliderTime = parseISO(timeDimension.currentValue);
|
|
4066
|
-
if (isValid(timeSliderTime)) {
|
|
4067
|
-
return
|
|
4071
|
+
var timeSliderTime = dateUtils.parseISO(timeDimension.currentValue);
|
|
4072
|
+
if (dateUtils.isValid(timeSliderTime)) {
|
|
4073
|
+
return dateUtils.unix(timeSliderTime);
|
|
4068
4074
|
}
|
|
4069
4075
|
return now;
|
|
4070
4076
|
}, selectorMemoizationOptions);
|
|
@@ -4078,8 +4084,8 @@ var getDataLimitsFromLayers = createSelector(getMapLayers, function (layers) {
|
|
|
4078
4084
|
return dimension.name === 'time';
|
|
4079
4085
|
});
|
|
4080
4086
|
if ((dimension === null || dimension === void 0 ? void 0 : dimension.minValue) && dimension.maxValue) {
|
|
4081
|
-
var lastValue =
|
|
4082
|
-
var firstValue =
|
|
4087
|
+
var lastValue = dateUtils.unix(new Date(dimension.maxValue));
|
|
4088
|
+
var firstValue = dateUtils.unix(new Date(dimension.minValue));
|
|
4083
4089
|
var newLast = Math.max(lastValue, end);
|
|
4084
4090
|
var newFirst = Math.min(firstValue, start);
|
|
4085
4091
|
return [newFirst, newLast];
|
|
@@ -4161,7 +4167,9 @@ var linkedMapAnimationInfo = createSelector(function (store, mapId) {
|
|
|
4161
4167
|
* @returns {string} returnType: string
|
|
4162
4168
|
*/
|
|
4163
4169
|
var getAnimationStartTime = createSelector(getMapById, function (store) {
|
|
4164
|
-
return (store === null || store === void 0 ? void 0 : store.animationStartTime) ? store.animationStartTime :
|
|
4170
|
+
return (store === null || store === void 0 ? void 0 : store.animationStartTime) ? store.animationStartTime : dateUtils.dateToString(dateUtils.sub(dateUtils.utc(), {
|
|
4171
|
+
hours: 6
|
|
4172
|
+
}), dateFormat);
|
|
4165
4173
|
}, selectorMemoizationOptions);
|
|
4166
4174
|
/**
|
|
4167
4175
|
* Gets end time of animation
|
|
@@ -4172,7 +4180,9 @@ var getAnimationStartTime = createSelector(getMapById, function (store) {
|
|
|
4172
4180
|
* @returns {string} returnType: string
|
|
4173
4181
|
*/
|
|
4174
4182
|
var getAnimationEndTime$1 = createSelector(getMapById, function (store) {
|
|
4175
|
-
return (store === null || store === void 0 ? void 0 : store.animationEndTime) ? store.animationEndTime :
|
|
4183
|
+
return (store === null || store === void 0 ? void 0 : store.animationEndTime) ? store.animationEndTime : dateUtils.dateToString(dateUtils.sub(dateUtils.utc(), {
|
|
4184
|
+
minutes: 10
|
|
4185
|
+
}), dateFormat);
|
|
4176
4186
|
}, selectorMemoizationOptions);
|
|
4177
4187
|
/**
|
|
4178
4188
|
* Returns map is auto updating
|
|
@@ -4286,7 +4296,7 @@ var getMapTimeSliderWidth = createSelector(getMapById, function (store) {
|
|
|
4286
4296
|
* @returns {number} returnType: number - center time as a unix timestamp
|
|
4287
4297
|
*/
|
|
4288
4298
|
var getMapTimeSliderCenterTime = createSelector(getMapById, function (store) {
|
|
4289
|
-
return store ? store.timeSliderCenterTime :
|
|
4299
|
+
return store ? store.timeSliderCenterTime : dateUtils.unix(dateUtils.utc());
|
|
4290
4300
|
}, selectorMemoizationOptions);
|
|
4291
4301
|
/**
|
|
4292
4302
|
* Returns the unfiltered selected time of time slider
|
|
@@ -5125,16 +5135,16 @@ var storeTestSettings = /*#__PURE__*/Object.freeze({
|
|
|
5125
5135
|
var _marked$6 = /*#__PURE__*/_regeneratorRuntime().mark(updateAnimation),
|
|
5126
5136
|
_marked2$4 = /*#__PURE__*/_regeneratorRuntime().mark(handleBaseLayersSaga),
|
|
5127
5137
|
_marked3$2 = /*#__PURE__*/_regeneratorRuntime().mark(rootSaga$5);
|
|
5128
|
-
// Expects start, end time as
|
|
5138
|
+
// Expects start, end time as Date object and interval in minutes
|
|
5129
5139
|
var generateTimeList = function generateTimeList(start, end, interval) {
|
|
5130
5140
|
var timeList = [];
|
|
5131
|
-
var unixStart =
|
|
5132
|
-
var unixEnd =
|
|
5141
|
+
var unixStart = dateUtils.unix(start);
|
|
5142
|
+
var unixEnd = dateUtils.unix(end);
|
|
5133
5143
|
var intervalSeconds = interval * 60;
|
|
5134
5144
|
for (var j = unixStart; j <= unixEnd; j += intervalSeconds) {
|
|
5135
5145
|
timeList.push({
|
|
5136
5146
|
name: 'time',
|
|
5137
|
-
value:
|
|
5147
|
+
value: dateUtils.fromUnix(j).toISOString()
|
|
5138
5148
|
});
|
|
5139
5149
|
}
|
|
5140
5150
|
return timeList;
|
|
@@ -5142,14 +5152,24 @@ var generateTimeList = function generateTimeList(start, end, interval) {
|
|
|
5142
5152
|
var getAnimationEndTime = function getAnimationEndTime(animationEndTime) {
|
|
5143
5153
|
var calculateFromNow = animationEndTime.split(/[-+]/)[0] === 'NOW';
|
|
5144
5154
|
var isAddingTime = animationEndTime.indexOf('+') !== -1;
|
|
5145
|
-
var
|
|
5146
|
-
var
|
|
5147
|
-
|
|
5155
|
+
var duration = animationEndTime.substring(animationEndTime.indexOf('PT') + 2);
|
|
5156
|
+
var _duration$split = duration.split('H'),
|
|
5157
|
+
_duration$split2 = _slicedToArray(_duration$split, 2),
|
|
5158
|
+
hours = _duration$split2[0],
|
|
5159
|
+
minutes = _duration$split2[1];
|
|
5160
|
+
var timeInMinutes = parseInt(hours, 10) * 60 + parseInt(minutes, 10);
|
|
5161
|
+
var startingTime = calculateFromNow ? dateUtils.utc() : dateUtils.startOfDay(dateUtils.utc());
|
|
5162
|
+
var newAnimationEndTime = isAddingTime ? dateUtils.add(startingTime, {
|
|
5163
|
+
minutes: timeInMinutes
|
|
5164
|
+
}).toISOString() : dateUtils.sub(startingTime, {
|
|
5165
|
+
minutes: timeInMinutes
|
|
5166
|
+
}).toISOString();
|
|
5148
5167
|
return newAnimationEndTime;
|
|
5149
5168
|
};
|
|
5150
5169
|
var isAnimationEndTimeValid = function isAnimationEndTimeValid(animationEndTime) {
|
|
5151
5170
|
var hasValidPrefix = animationEndTime.split(/[-+]/)[0] === 'NOW' || animationEndTime.split(/[-+]/)[0] === 'TODAY';
|
|
5152
|
-
var
|
|
5171
|
+
var durationString = animationEndTime.substring(animationEndTime.indexOf('PT') + 2);
|
|
5172
|
+
var hasValidDate = /^(\d+H)?(\d+M)?$/.test(durationString);
|
|
5153
5173
|
return hasValidPrefix && hasValidDate;
|
|
5154
5174
|
};
|
|
5155
5175
|
var validInitialAnimationStep = function validInitialAnimationStep(initialAnimationStep, draw) {
|
|
@@ -5177,9 +5197,9 @@ function startAnimationSaga(_ref) {
|
|
|
5177
5197
|
while (1) switch (_context.prev = _context.next) {
|
|
5178
5198
|
case 0:
|
|
5179
5199
|
mapId = payload.mapId, start = payload.start, initialTime = payload.initialTime, end = payload.end, interval = payload.interval, timeList = payload.timeList;
|
|
5180
|
-
roundedStart = roundWithTimeStep(Number(start &&
|
|
5181
|
-
roundedEnd = roundWithTimeStep(Number(end &&
|
|
5182
|
-
animationList = timeList || generateTimeList(
|
|
5200
|
+
roundedStart = roundWithTimeStep(Number(start && dateUtils.unix(dateUtils.utc(start))), interval, 'ceil');
|
|
5201
|
+
roundedEnd = roundWithTimeStep(Number(end && dateUtils.unix(dateUtils.utc(end))), interval, 'floor');
|
|
5202
|
+
animationList = timeList || generateTimeList(dateUtils.fromUnix(roundedStart), dateUtils.fromUnix(roundedEnd), interval);
|
|
5183
5203
|
_context.next = 6;
|
|
5184
5204
|
return animationList;
|
|
5185
5205
|
case 6:
|
|
@@ -5248,16 +5268,16 @@ function updateAnimation(mapId, maxValue) {
|
|
|
5248
5268
|
return select(getAnimationStartTime, mapId);
|
|
5249
5269
|
case 2:
|
|
5250
5270
|
animationStart = _context4.sent;
|
|
5251
|
-
animationStartUnix =
|
|
5271
|
+
animationStartUnix = dateUtils.unix(dateUtils.utc(animationStart));
|
|
5252
5272
|
_context4.next = 6;
|
|
5253
5273
|
return select(getAnimationEndTime$1, mapId);
|
|
5254
5274
|
case 6:
|
|
5255
5275
|
animationEnd = _context4.sent;
|
|
5256
|
-
animationEndUnix =
|
|
5257
|
-
t =
|
|
5276
|
+
animationEndUnix = dateUtils.unix(dateUtils.utc(animationEnd));
|
|
5277
|
+
t = dateUtils.unix(dateUtils.utc(maxValue));
|
|
5258
5278
|
deltaT = t - animationEndUnix;
|
|
5259
|
-
start =
|
|
5260
|
-
end =
|
|
5279
|
+
start = dateUtils.dateToString(dateUtils.fromUnix(animationStartUnix + deltaT), dateFormat);
|
|
5280
|
+
end = dateUtils.dateToString(dateUtils.fromUnix(animationEndUnix + deltaT), dateFormat);
|
|
5261
5281
|
_context4.next = 14;
|
|
5262
5282
|
return put(mapActions.setAnimationEndTime({
|
|
5263
5283
|
mapId: mapId,
|
|
@@ -5705,8 +5725,9 @@ function setMapPresetSaga(_ref6) {
|
|
|
5705
5725
|
_context8.next = 58;
|
|
5706
5726
|
return put(mapActions.setAnimationStartTime({
|
|
5707
5727
|
mapId: mapId,
|
|
5708
|
-
animationStartTime:
|
|
5709
|
-
|
|
5728
|
+
animationStartTime: dateUtils.sub(dateUtils.utc(animationEnd), {
|
|
5729
|
+
minutes: 5 * 60 // set to default of 5 hours
|
|
5730
|
+
}).toISOString()
|
|
5710
5731
|
}));
|
|
5711
5732
|
case 58:
|
|
5712
5733
|
if (!animationLength) {
|
|
@@ -5720,7 +5741,9 @@ function setMapPresetSaga(_ref6) {
|
|
|
5720
5741
|
_context8.next = 64;
|
|
5721
5742
|
return put(mapActions.setAnimationStartTime({
|
|
5722
5743
|
mapId: mapId,
|
|
5723
|
-
animationStartTime:
|
|
5744
|
+
animationStartTime: dateUtils.sub(dateUtils.utc(_animationEnd), {
|
|
5745
|
+
minutes: animationLength
|
|
5746
|
+
}).toISOString()
|
|
5724
5747
|
}));
|
|
5725
5748
|
case 64:
|
|
5726
5749
|
if (!(animationPayload && animationPayload.speed)) {
|
|
@@ -5749,7 +5772,7 @@ function setMapPresetSaga(_ref6) {
|
|
|
5749
5772
|
_context8.next = 76;
|
|
5750
5773
|
break;
|
|
5751
5774
|
case 75:
|
|
5752
|
-
_context8.t0 =
|
|
5775
|
+
_context8.t0 = dateUtils.dateToString(dateUtils.utc(), dateFormat);
|
|
5753
5776
|
case 76:
|
|
5754
5777
|
_animationEnd2 = _context8.t0;
|
|
5755
5778
|
if (!(shouldEndtimeOverride && animationLength)) {
|
|
@@ -5763,7 +5786,9 @@ function setMapPresetSaga(_ref6) {
|
|
|
5763
5786
|
_context8.next = 84;
|
|
5764
5787
|
break;
|
|
5765
5788
|
case 83:
|
|
5766
|
-
_context8.t1 =
|
|
5789
|
+
_context8.t1 = dateUtils.dateToString(dateUtils.sub(dateUtils.utc(_animationEnd2), {
|
|
5790
|
+
minutes: duration
|
|
5791
|
+
}), dateFormat);
|
|
5767
5792
|
case 84:
|
|
5768
5793
|
animationStart = _context8.t1;
|
|
5769
5794
|
_context8.next = 87;
|
|
@@ -5838,7 +5863,9 @@ function setMapPresetSaga(_ref6) {
|
|
|
5838
5863
|
_context8.next = 114;
|
|
5839
5864
|
return put(mapActions.setAnimationEndTime({
|
|
5840
5865
|
mapId: mapId,
|
|
5841
|
-
animationEndTime:
|
|
5866
|
+
animationEndTime: dateUtils.add(dateUtils.utc(_animationEnd3), {
|
|
5867
|
+
minutes: 5
|
|
5868
|
+
}).toISOString()
|
|
5842
5869
|
}));
|
|
5843
5870
|
case 114:
|
|
5844
5871
|
_context8.next = 116;
|
|
@@ -5848,7 +5875,9 @@ function setMapPresetSaga(_ref6) {
|
|
|
5848
5875
|
_context8.next = 119;
|
|
5849
5876
|
return put(mapActions.setAnimationStartTime({
|
|
5850
5877
|
mapId: mapId,
|
|
5851
|
-
animationStartTime:
|
|
5878
|
+
animationStartTime: dateUtils.add(dateUtils.utc(_animationStart), {
|
|
5879
|
+
minutes: 5
|
|
5880
|
+
}).toISOString()
|
|
5852
5881
|
}));
|
|
5853
5882
|
case 119:
|
|
5854
5883
|
_context8.next = 105;
|
package/package.json
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/store",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0",
|
|
4
4
|
"description": "GeoWeb Store library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@opengeoweb/shared": "*",
|
|
12
|
+
"react-redux": "^8.1.3",
|
|
13
|
+
"@reduxjs/toolkit": "^1.9.7",
|
|
14
|
+
"@redux-eggs/core": "^2.2.0",
|
|
15
|
+
"@opengeoweb/webmap-react": "*",
|
|
16
|
+
"redux-saga": "^1.2.3",
|
|
17
|
+
"@opengeoweb/webmap": "*",
|
|
18
|
+
"immer": "^9.0.21",
|
|
19
|
+
"@redux-eggs/redux-toolkit": "^2.2.0",
|
|
20
|
+
"@redux-eggs/saga-extension": "^2.2.0",
|
|
21
|
+
"date-fns": "^3.3.0",
|
|
22
|
+
"lodash": "^4.17.21",
|
|
23
|
+
"@opengeoweb/theme": "*"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "18"
|
|
27
|
+
},
|
|
10
28
|
"module": "./index.esm.js",
|
|
11
29
|
"type": "module",
|
|
12
30
|
"main": "./index.esm.js"
|
|
@@ -354,3 +354,11 @@ export declare const getUseLatestReferenceTime: ((state: any, layerId: any) => b
|
|
|
354
354
|
}> & {
|
|
355
355
|
clearCache: () => void;
|
|
356
356
|
};
|
|
357
|
+
/**
|
|
358
|
+
* Returns the timestep for this layerId in seconds, or undefined if it has no time dimension or timeinterval.
|
|
359
|
+
*/
|
|
360
|
+
export declare const getTimeStepForLayerId: ((state: any, layerId: any) => number | undefined) & import("reselect").OutputSelectorFields<(args_0: Dimension | undefined) => number | undefined, {
|
|
361
|
+
clearCache: () => void;
|
|
362
|
+
}> & {
|
|
363
|
+
clearCache: () => void;
|
|
364
|
+
};
|
|
@@ -3,7 +3,7 @@ import * as utils from './utils';
|
|
|
3
3
|
export declare const mapUtils: {
|
|
4
4
|
replaceLayerIdsToEnsureUniqueLayerIdsInStore: (layerIds: import("./replaceLayerIdsToEnsureUniqueLayerIdsInStore").LayersAndAutoLayerIds) => import("./replaceLayerIdsToEnsureUniqueLayerIdsInStore").LayersAndAutoLayerIds;
|
|
5
5
|
moveArrayElements<T>(array: T[], oldIndex: number, newIndex: number): T[];
|
|
6
|
-
dateFormat: "
|
|
6
|
+
dateFormat: "yyyy-MM-dd'T'HH:mm:ss'Z";
|
|
7
7
|
createMap: ({ id, isAnimating, animationStartTime, animationEndTime, isAutoUpdating, isEndTimeOverriding, bbox, srs, baseLayers, overLayers, mapLayers, featureLayers, dimensions, autoUpdateLayerId, autoTimeStepLayerId, timeSliderSpan, timeStep, animationDelay, timeSliderWidth, timeSliderCenterTime, timeSliderSecondsPerPx, isTimestepAuto, isTimeSpanAuto, isTimeSliderHoverOn, isTimeSliderVisible, displayMapPin, disableMapPin, shouldShowZoomControls, }: utils.CreateMapProps) => mapTypes.WebMap;
|
|
8
8
|
checkValidLayersPayload: (layers: import("../types").Layer[], mapId: string) => boolean;
|
|
9
9
|
getDraftMapById: (mapId: string, draft: mapTypes.WebMapState) => mapTypes.WebMap;
|
|
@@ -11,7 +11,6 @@ export declare const mapUtils: {
|
|
|
11
11
|
findMapIdFromLayerId: (mapState?: mapTypes.WebMapState | undefined, layerId?: string | undefined) => string | null;
|
|
12
12
|
produceDraftStateSetMapDimensionFromLayerChangeDimension: (draft: mapTypes.WebMapState, layerId: string, dimension: mapTypes.Dimension) => void;
|
|
13
13
|
getTimeStepFromDataInterval: (timeInterval: import("dist/libs/webmap/src").TimeInterval) => number;
|
|
14
|
-
getActiveLayerTimeStep: (timeDimension: mapTypes.Dimension | undefined) => number | undefined;
|
|
15
14
|
getSpeedFactor: (speedDelay: number) => mapTypes.SpeedFactorType;
|
|
16
15
|
getAnimationDuration: (animationEndTime: string | undefined, animationStartTime: string | undefined) => number;
|
|
17
16
|
getSpeedDelay: (speedFactor: mapTypes.SpeedFactorType) => number;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { SagaIterator } from 'redux-saga';
|
|
2
|
-
import { Moment } from 'moment';
|
|
3
2
|
import { AnimationStep } from '@opengeoweb/webmap';
|
|
4
3
|
import { mapActions } from '.';
|
|
5
4
|
import { layerActions } from '../layers';
|
|
6
5
|
import { Layer } from '../layers/types';
|
|
7
|
-
export declare const generateTimeList: (start:
|
|
6
|
+
export declare const generateTimeList: (start: Date, end: Date, interval: number) => {
|
|
8
7
|
name: string;
|
|
9
8
|
value: string;
|
|
10
9
|
}[];
|
|
@@ -3,7 +3,7 @@ import { Bbox, Dimension } from './types';
|
|
|
3
3
|
import { Scale } from './enums';
|
|
4
4
|
import type { WebMapState, WebMap, SpeedFactorType } from '../types';
|
|
5
5
|
import type { Layer } from '../layers/types';
|
|
6
|
-
export declare const dateFormat = "
|
|
6
|
+
export declare const dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z";
|
|
7
7
|
export interface CreateMapProps {
|
|
8
8
|
id: string;
|
|
9
9
|
isAnimating?: boolean;
|
|
@@ -68,7 +68,6 @@ export declare const produceDraftStateSetMapDimensionFromLayerChangeDimension: (
|
|
|
68
68
|
*/
|
|
69
69
|
export declare function moveArrayElements<T>(array: T[], oldIndex: number, newIndex: number): T[];
|
|
70
70
|
export declare const getTimeStepFromDataInterval: (timeInterval: TimeInterval) => number;
|
|
71
|
-
export declare const getActiveLayerTimeStep: (timeDimension: Dimension | undefined) => number | undefined;
|
|
72
71
|
export declare const getSpeedFactor: (speedDelay: number) => SpeedFactorType;
|
|
73
72
|
export declare const getAnimationDuration: (animationEndTime: string | undefined, animationStartTime: string | undefined) => number;
|
|
74
73
|
/**
|