@opengeoweb/store 12.5.0 → 12.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
@@ -1,10 +1,10 @@
1
1
  import { createSlice, createSelector, createAction, createListenerMiddleware, isAnyOf, createEntityAdapter, combineReducers, configureStore } from '@reduxjs/toolkit';
2
2
  import { isEqual, isEmpty, compact } from 'lodash';
3
3
  import { dateUtils, PROJECTION, defaultDelay } from '@opengeoweb/shared';
4
- import { webmapUtils, parseISO8601IntervalToDateInterval, LayerType, getWMJSMapById, webmapTestSettings, WMLayer, getWMSRequests, handleDateUtilsISOString, isProjectionSupported, queryWMSLayers, getWMLayerById, WMInvalidDateValues } from '@opengeoweb/webmap';
4
+ import { webmapUtils, parseISO8601IntervalToDateInterval, LayerType, webmapTestSettings, WMLayer, getWMLayerById, WMInvalidDateValues, handleDateUtilsISOString, isProjectionSupported, queryWMSLayers } from '@opengeoweb/webmap';
5
5
  import { defaultSecondsPerPx, defaultAnimationDelayAtStart, defaultTimeStep, defaultTimeSpan, roundWithTimeStep, getSpeedDelay } from '@opengeoweb/timeslider';
6
6
  import { produce } from 'immer';
7
- import { getLastEmptyFeatureIndex, getGeoJson, moveFeature, createInterSections, defaultLayers, emptyGeoJSON, defaultIntersectionStyleProperties, addSelectionTypeToGeoJSON, getFeatureCollection, isOpenLayersEnabled } from '@opengeoweb/webmap-react';
7
+ import { getLastEmptyFeatureIndex, getGeoJson, moveFeature, createInterSections, defaultLayers, emptyGeoJSON, defaultIntersectionStyleProperties, addSelectionTypeToGeoJSON, getFeatureCollection } from '@opengeoweb/webmap-react';
8
8
  export { defaultLayers } from '@opengeoweb/webmap-react';
9
9
  import { useSelector, useDispatch } from 'react-redux';
10
10
  import { useCallback, useEffect } from 'react';
@@ -2461,10 +2461,6 @@ var slice$4 = createSlice({
2461
2461
  return;
2462
2462
  }
2463
2463
  draft.byId[mapId].isAnimating = true;
2464
- var wmMap = getWMJSMapById(mapId);
2465
- if (wmMap) {
2466
- wmMap.shouldPrefetch = false;
2467
- }
2468
2464
  // Animation is defined by one of the following:
2469
2465
  // - start, end and interval for a continuous animation loop with constant interval
2470
2466
  // - timeList, for a custom timeList
@@ -2489,10 +2485,6 @@ var slice$4 = createSlice({
2489
2485
  return;
2490
2486
  }
2491
2487
  draft.byId[mapId].isAnimating = false;
2492
- var wmMap = getWMJSMapById(mapId);
2493
- if (wmMap) {
2494
- wmMap.shouldPrefetch = true;
2495
- }
2496
2488
  },
2497
2489
  setTimeSliderSpan: function setTimeSliderSpan(draft, action) {
2498
2490
  var _action$payload4 = action.payload,
@@ -2561,12 +2553,12 @@ var slice$4 = createSlice({
2561
2553
  if (!map) {
2562
2554
  return;
2563
2555
  }
2564
- if (autoUpdateLayerId || autoTimeStepLayerId) {
2565
- map.autoUpdateLayerId = autoUpdateLayerId;
2556
+ if (autoTimeStepLayerId || autoUpdateLayerId) {
2566
2557
  map.autoTimeStepLayerId = autoTimeStepLayerId;
2558
+ map.autoUpdateLayerId = autoUpdateLayerId;
2567
2559
  } else if (layerId) {
2568
- map.autoUpdateLayerId = layerId;
2569
2560
  map.autoTimeStepLayerId = layerId;
2561
+ map.autoUpdateLayerId = layerId;
2570
2562
  } else {
2571
2563
  map.autoTimeStepLayerId = undefined;
2572
2564
  map.autoUpdateLayerId = undefined;
@@ -2803,32 +2795,6 @@ var slice$4 = createSlice({
2803
2795
  draft.byId[mapId].mapLayers = layerIds;
2804
2796
  draft.byId[mapId].autoUpdateLayerId = activeLayerId;
2805
2797
  draft.byId[mapId].autoTimeStepLayerId = activeLayerId;
2806
- var webmapInstance = webmapUtils.getWMJSMapById(mapId);
2807
- if (webmapInstance) {
2808
- var mapDims = webmapInstance.getDimensionList();
2809
- if (!draft.byId[mapId].dimensions) {
2810
- draft.byId[mapId].dimensions = [];
2811
- }
2812
- var draftDims = draft.byId[mapId].dimensions;
2813
- if (mapDims && draftDims) {
2814
- mapDims.forEach(function (dim) {
2815
- var draftMapDimIndex = draftDims.findIndex(function (draftDim) {
2816
- return draftDim.name === dim.name;
2817
- });
2818
- if (draftMapDimIndex !== -1) {
2819
- draftDims[draftMapDimIndex].name = dim.name;
2820
- draftDims[draftMapDimIndex].units = dim.units;
2821
- draftDims[draftMapDimIndex].currentValue = dim.currentValue;
2822
- } else {
2823
- draftDims.push({
2824
- name: dim.name,
2825
- units: dim.units,
2826
- currentValue: dim.currentValue
2827
- });
2828
- }
2829
- });
2830
- }
2831
- }
2832
2798
  }
2833
2799
  }).addCase(layerActions.setBaseLayers, function (draft, action) {
2834
2800
  var _action$payload31 = action.payload,
@@ -3714,6 +3680,8 @@ var DialogTypes;
3714
3680
  DialogTypes["PublicWarnings"] = "publicWarnings";
3715
3681
  DialogTypes["Search"] = "search";
3716
3682
  DialogTypes["AreaObjectLoader"] = "areaObjectLoader";
3683
+ DialogTypes["DataExplorer"] = "dataExplorer";
3684
+ DialogTypes["DataExplorerInfo"] = "dataExplorerInfo";
3717
3685
  DialogTypes["SoundingsSources"] = "soundingsSources";
3718
3686
  DialogTypes["SoundingsLocations"] = "soundingsLocations";
3719
3687
  })(DialogTypes || (DialogTypes = {}));
@@ -3930,6 +3898,31 @@ var slice$3 = createSlice({
3930
3898
  mapIds = _action$payload.mapIds;
3931
3899
  draft.linkedState.links[panelId] = mapIds;
3932
3900
  },
3901
+ removeLinkedMap: function removeLinkedMap(draft, action) {
3902
+ var panelId = action.payload;
3903
+ // Remove panelId from sources
3904
+ delete draft.sources.byId[panelId];
3905
+ removeInPlace(draft.sources.allIds, function (_id) {
3906
+ return _id === panelId;
3907
+ });
3908
+ // Remove panelId from any arrays in linkedState
3909
+ delete draft.linkedState.links[panelId];
3910
+ delete draft.linkedState.sharedData[panelId];
3911
+ Object.keys(draft.linkedState.links).forEach(function (key) {
3912
+ var arr = draft.linkedState.links[key];
3913
+ removeInPlace(arr, function (_id) {
3914
+ return _id === panelId;
3915
+ });
3916
+ });
3917
+ // Remove panelId from groups
3918
+ Object.keys(draft.groups.byId).forEach(function (groupId) {
3919
+ var group = draft.groups.byId[groupId];
3920
+ delete group.targets.byId[panelId];
3921
+ removeInPlace(group.targets.allIds, function (_id) {
3922
+ return _id === panelId;
3923
+ });
3924
+ });
3925
+ },
3933
3926
  addSharedData: function addSharedData(draft, action) {
3934
3927
  var _action$payload2 = action.payload,
3935
3928
  panelId = _action$payload2.panelId,
@@ -4558,10 +4551,9 @@ var getLinkedMaps = createSelector([selectLinkedState, function (store, panelId)
4558
4551
  return panelId && linkedState.links[panelId] || [];
4559
4552
  }, selectorMemoizationOptions);
4560
4553
  var getLinkedFeatureProviders = function getLinkedFeatureProviders(linkedState, mapId) {
4561
- return linkedState ? Object.keys(linkedState.links).filter(function (panelId) {
4562
- return linkedState.links[panelId].find(function (id) {
4563
- return id === mapId;
4564
- });
4554
+ return linkedState !== null && linkedState !== void 0 && linkedState.links ? Object.keys(linkedState.links).filter(function (panelId) {
4555
+ var _linkedState$links;
4556
+ return (_linkedState$links = linkedState.links) === null || _linkedState$links === void 0 || (_linkedState$links = _linkedState$links[panelId]) === null || _linkedState$links === void 0 ? void 0 : _linkedState$links.includes(mapId);
4565
4557
  }) : [];
4566
4558
  };
4567
4559
  var selectSharedData = createSelector([selectLinkedState, function (store, panelId) {
@@ -4595,23 +4587,23 @@ var selectLinkedFeatures = createSelector([function (linkedState) {
4595
4587
  return linkedState;
4596
4588
  }, getLinkedFeatureProviders], function (linkedState, featureProviders) {
4597
4589
  var features = featureProviders.flatMap(function (providerId) {
4598
- var _linkedState$sharedDa;
4599
- return ((_linkedState$sharedDa = linkedState.sharedData[providerId]) === null || _linkedState$sharedDa === void 0 ? void 0 : _linkedState$sharedDa.features) || [];
4600
- }).filter(function (f) {
4601
- return f !== undefined;
4590
+ var _linkedState$sharedDa, _linkedState$sharedDa2;
4591
+ return (_linkedState$sharedDa = linkedState === null || linkedState === void 0 || (_linkedState$sharedDa2 = linkedState.sharedData) === null || _linkedState$sharedDa2 === void 0 || (_linkedState$sharedDa2 = _linkedState$sharedDa2[providerId]) === null || _linkedState$sharedDa2 === void 0 ? void 0 : _linkedState$sharedDa2.features) !== null && _linkedState$sharedDa !== void 0 ? _linkedState$sharedDa : [];
4592
+ });
4593
+ return features.filter(function (feature) {
4594
+ return feature !== undefined;
4602
4595
  });
4603
- return features;
4604
4596
  });
4605
4597
  var selectLinkedFormFeatures = createSelector([function (linkedState) {
4606
4598
  return linkedState;
4607
4599
  }, getLinkedFeatureProviders], function (linkedState, featureProviders) {
4608
4600
  var features = featureProviders.flatMap(function (providerId) {
4609
- var _linkedState$sharedDa2;
4610
- return ((_linkedState$sharedDa2 = linkedState.sharedData[providerId]) === null || _linkedState$sharedDa2 === void 0 ? void 0 : _linkedState$sharedDa2.formFeatures) || [];
4611
- }).filter(function (f) {
4612
- return f !== undefined;
4601
+ var _linkedState$sharedDa3, _linkedState$sharedDa4;
4602
+ return (_linkedState$sharedDa3 = linkedState === null || linkedState === void 0 || (_linkedState$sharedDa4 = linkedState.sharedData) === null || _linkedState$sharedDa4 === void 0 || (_linkedState$sharedDa4 = _linkedState$sharedDa4[providerId]) === null || _linkedState$sharedDa4 === void 0 ? void 0 : _linkedState$sharedDa4.formFeatures) !== null && _linkedState$sharedDa3 !== void 0 ? _linkedState$sharedDa3 : [];
4603
+ });
4604
+ return features.filter(function (feature) {
4605
+ return feature !== undefined;
4613
4606
  });
4614
- return features;
4615
4607
  });
4616
4608
  var getSelectedFeature = createSelector([
4617
4609
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
@@ -5579,7 +5571,7 @@ var getLegendId = createSelector(getMapById, function (store) {
5579
5571
  * @param {string} mapId mapId: string - Id of the map
5580
5572
  * @returns {MapPreset} returnType: MapPreset
5581
5573
  */
5582
- var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, isTimestepAuto, isTimeSpanAuto, getLegendId, getUiStore, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoUpdateLayerId, autoTimeStepLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, isTimestepAuto, isTimeSpanAuto, legendId, uiStore) {
5574
+ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, isTimestepAuto, isTimeSpanAuto, getLegendId, getUiStore, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, isTimestepAuto, isTimeSpanAuto, legendId, uiStore) {
5583
5575
  var _uiStore$dialogs$lege;
5584
5576
  var allLayers = [].concat(_toConsumableArray(baseLayers), _toConsumableArray(overLayers), _toConsumableArray(mapLayers)).map(function (_ref3) {
5585
5577
  _ref3.mapId;
@@ -6569,9 +6561,9 @@ genericListener.startListening({
6569
6561
  });
6570
6562
 
6571
6563
  /* A map with all the timerIds and their current step */
6572
- var stepMap$1 = new Map();
6564
+ var stepMap = new Map();
6573
6565
  /* A map with a list of timers and their dwell */
6574
- var timerDwellMap$1 = new Map();
6566
+ var timerDwellMap = new Map();
6575
6567
  /**
6576
6568
  * Returns the next step for given timerId.
6577
6569
  * @param timerId The timer id
@@ -6579,9 +6571,9 @@ var timerDwellMap$1 = new Map();
6579
6571
  * @param numStepsToGoForward Amount of steps to go forwards, defaults to 1. Can be positive and negative
6580
6572
  * @returns
6581
6573
  */
6582
- var getNextStep$1 = function getNextStep(timerId, numberOfStepsInAnimation) {
6574
+ var getNextStep = function getNextStep(timerId, numberOfStepsInAnimation) {
6583
6575
  var numStepsToGoForward = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
6584
- var currentStep = getCurrentStep$1(timerId);
6576
+ var currentStep = getCurrentStep(timerId);
6585
6577
  var nextStep = currentStep + numStepsToGoForward;
6586
6578
  var nextStepClipped = (nextStep % numberOfStepsInAnimation + numberOfStepsInAnimation) % numberOfStepsInAnimation;
6587
6579
  return nextStepClipped;
@@ -6593,19 +6585,19 @@ var getNextStep$1 = function getNextStep(timerId, numberOfStepsInAnimation) {
6593
6585
  * @param dwell The number of steps to wait at the end of the animation sequence before to continue
6594
6586
  * @returns
6595
6587
  */
6596
- var handleTimerDwell$1 = function handleTimerDwell(timerId, numberOfStepsInAnimation) {
6588
+ var handleTimerDwell = function handleTimerDwell(timerId, numberOfStepsInAnimation) {
6597
6589
  var dwell = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 8;
6598
6590
  if (dwell > 0) {
6599
- var currentStep = getCurrentStep$1(timerId);
6591
+ var currentStep = getCurrentStep(timerId);
6600
6592
  // Reset the dwell if we are not at the last animation step
6601
6593
  if (currentStep < numberOfStepsInAnimation - 1) {
6602
- timerDwellMap$1.set(timerId, dwell);
6594
+ timerDwellMap.set(timerId, dwell);
6603
6595
  return false;
6604
6596
  }
6605
6597
  // We are at the last animation step, check the dwell
6606
- var timerDwell = timerDwellMap$1.has(timerId) && timerDwellMap$1.get(timerId) || 0;
6598
+ var timerDwell = timerDwellMap.has(timerId) && timerDwellMap.get(timerId) || 0;
6607
6599
  if (currentStep === numberOfStepsInAnimation - 1 && timerDwell > 0) {
6608
- timerDwellMap$1.set(timerId, timerDwell - 1);
6600
+ timerDwellMap.set(timerId, timerDwell - 1);
6609
6601
  return true;
6610
6602
  }
6611
6603
  }
@@ -6616,84 +6608,129 @@ var handleTimerDwell$1 = function handleTimerDwell(timerId, numberOfStepsInAnima
6616
6608
  * @param timerId
6617
6609
  * @param timerStep
6618
6610
  */
6619
- var setStep$1 = function setStep(timerId, timerStep) {
6620
- stepMap$1.set(timerId, timerStep);
6611
+ var setStep = function setStep(timerId, timerStep) {
6612
+ stepMap.set(timerId, timerStep);
6621
6613
  };
6622
6614
  /**
6623
6615
  * Gets the current step for the timer
6624
6616
  * @param timerId
6625
6617
  * @returns
6626
6618
  */
6627
- var getCurrentStep$1 = function getCurrentStep(timerId) {
6628
- return stepMap$1.get(timerId) || 0;
6619
+ var getCurrentStep = function getCurrentStep(timerId) {
6620
+ return stepMap.get(timerId) || 0;
6629
6621
  };
6630
- var MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH = 2;
6631
- var MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES = 8;
6632
- /**
6633
- * This prefetches all images connected to the same sync group as provided timerId
6634
- * @param timerId The timerId
6635
- * @param animationListValues List of animation steps in isostring to animate
6636
- * @param targets List of targets to check
6637
- * @returns True if all maps are ready to go forward, false if the map has no data to display yet.
6638
- */
6639
- var prefetchAnimationTargetsForMetronome = function prefetchAnimationTargetsForMetronome(timerId, animationListValues, targets) {
6640
- var timerShouldStepForward = true;
6641
- // The following code prefetches/buffers for all maps in the group
6642
- for (var numPrefetch = 0; numPrefetch < MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH; numPrefetch += 1) {
6643
- var nextStep = getNextStep$1(timerId, animationListValues.length, numPrefetch + 1);
6644
- var nextTimeValueStepToCheck = animationListValues[nextStep];
6645
- var _iterator = _createForOfIteratorHelper(targets),
6646
- _step;
6647
- try {
6648
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
6649
- var target = _step.value;
6650
- var targetMapId = target.targetId;
6651
- var wmMap = getWMJSMapById(targetMapId);
6652
- if (!wmMap) {
6653
- return true; // Map was not registered so there is nothing to prefetch, do not block going forward
6654
- }
6655
- var layersImageUrls = getWMSRequests(wmMap, [{
6656
- name: 'time',
6657
- currentValue: nextTimeValueStepToCheck
6658
- }]);
6659
- var _iterator2 = _createForOfIteratorHelper(layersImageUrls),
6660
- _step2;
6661
- try {
6662
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
6663
- var layersImageUrl = _step2.value;
6664
- var image = wmMap.getMapImageStore.getImage(layersImageUrl.url);
6665
- if (!image.isLoaded()) {
6666
- if (wmMap.getMapImageStore.getNumImagesLoading() < MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES) {
6667
- image.load();
6668
- }
6669
- if (numPrefetch === 0) {
6670
- var altImage = wmMap.getAlternativeImage(layersImageUrl.url, wmMap.getBBOX(), true);
6671
- // No alternative image available yet, so skipping animation.
6672
- if (altImage.length === 0) {
6673
- // This is useful to indicate that the map is loading and has nothing yet to display.
6674
- // console.warn('No data available: Not stepping forward');
6675
- timerShouldStepForward = false;
6676
- }
6677
- }
6678
- } else if (image.isStale()) {
6679
- if (wmMap.getMapImageStore.getNumImagesLoading() < MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES) {
6680
- image.forceReload(true);
6681
- }
6682
- }
6683
- }
6684
- } catch (err) {
6685
- _iterator2.e(err);
6686
- } finally {
6687
- _iterator2.f();
6688
- }
6622
+ /**
6623
+ * Checks if the next step is available for all provided layers
6624
+ * @param reduxLayers
6625
+ * @param nextTimeString
6626
+ * @returns
6627
+ */
6628
+ var isNextStepAvailable = function isNextStepAvailable(reduxLayers, nextTimeString) {
6629
+ // Get all wmLayers for the found id's
6630
+ var wmLayers = reduxLayers.map(function (reduxLayer) {
6631
+ return reduxLayer.id && getWMLayerById(reduxLayer.id);
6632
+ }).filter(function (l) {
6633
+ return !!l;
6634
+ });
6635
+ // Returns a layer which could have an image for the requested time, but which isn't loaded yet.
6636
+ var isThereSomethingNotAvailable = wmLayers.map(function (l) {
6637
+ var _l$getDimension;
6638
+ if (!l || !l.olSource) {
6639
+ // No OpenLayers source, do nothing, so do not flag that something is not available
6640
+ return {
6641
+ status: true
6642
+ };
6643
+ }
6644
+ // Check if there is a timevalue available
6645
+ var closestValue = (_l$getDimension = l.getDimension('time')) === null || _l$getDimension === void 0 ? void 0 : _l$getDimension.getClosestValue(nextTimeString);
6646
+ if (!closestValue || WMInvalidDateValues.has(closestValue)) {
6647
+ // No value available, so do not flag that something is not available
6648
+ return {
6649
+ status: true
6650
+ };
6651
+ }
6652
+ var olSource = l.olSource;
6653
+ var hasImageAvailableForRequestedTimeStep = olSource.hasImageForTimeValue(closestValue);
6654
+ // If there is no image available for requested timestep, return true and flag that this thing is not ready yet.
6655
+ if (hasImageAvailableForRequestedTimeStep) {
6656
+ return {
6657
+ status: true
6658
+ };
6659
+ }
6660
+ olSource.loadImageForTimeValue(closestValue);
6661
+ return {
6662
+ status: false
6663
+ };
6664
+ });
6665
+ var nextStepIsAvailable = isThereSomethingNotAvailable.filter(function (d) {
6666
+ return d.status === true;
6667
+ }).length === wmLayers.length;
6668
+ return nextStepIsAvailable;
6669
+ };
6670
+ /**
6671
+ * This handler is triggered by the metronome. An array of timerIds is given as argument.
6672
+ * It will update the animation loop of multiple maps and sliders
6673
+ * It will prefetch images for maps
6674
+ * @param timerIds string[] array of timerIds
6675
+ * @param listenerApi ListenerEffectAPI<CoreAppStore, Dispatch, unknown> listenerApi as received from listener
6676
+ */
6677
+ var olMetronomeHandler = function olMetronomeHandler(timerIds, listenerApi) {
6678
+ var targetsWithUpdateValue = [];
6679
+ var _iterator = _createForOfIteratorHelper(timerIds),
6680
+ _step;
6681
+ try {
6682
+ var _loop = function _loop() {
6683
+ var timerId = _step.value;
6684
+ var animationListValuesNameAndValue = getAnimationList(listenerApi.getState(), timerId);
6685
+ var animationListValues = animationListValuesNameAndValue.map(function (nameAndValue) {
6686
+ return nameAndValue.value;
6687
+ });
6688
+ var targets = getTargets(listenerApi.getState(), {
6689
+ sourceId: timerId,
6690
+ origin: timerId
6691
+ }, SYNCGROUPS_TYPE_SETTIME);
6692
+ if (targets.length === 0) {
6693
+ // When there are no targets, default to one
6694
+ targets.push({
6695
+ targetId: timerId,
6696
+ value: ''
6697
+ });
6689
6698
  }
6690
- } catch (err) {
6691
- _iterator.e(err);
6692
- } finally {
6693
- _iterator.f();
6699
+ var timerIsInDwell = handleTimerDwell(timerId, animationListValues.length);
6700
+ // Collect all layers for this syncgroups target
6701
+ var reduxLayers = [];
6702
+ targets.forEach(function (target) {
6703
+ reduxLayers.push.apply(reduxLayers, _toConsumableArray(getLayersByMapId(listenerApi.getState(), target.targetId).filter(function (l) {
6704
+ return l.layerType === LayerType.mapLayer;
6705
+ })));
6706
+ });
6707
+ var nextStep = getNextStep(timerId, animationListValues.length, 1);
6708
+ var timerShouldStepForward = isNextStepAvailable(reduxLayers, animationListValues[nextStep]) && !timerIsInDwell;
6709
+ // Determine the next step
6710
+ var timerStep = timerShouldStepForward ? getNextStep(timerId, animationListValues.length) : getCurrentStep(timerId);
6711
+ setStep(timerId, timerStep);
6712
+ var updatedValue = animationListValues[timerStep];
6713
+ targetsWithUpdateValue.push.apply(targetsWithUpdateValue, _toConsumableArray(targets.map(function (target) {
6714
+ return _objectSpread2(_objectSpread2({}, target), {}, {
6715
+ value: updatedValue
6716
+ });
6717
+ })));
6718
+ var speedDelay = getMapAnimationDelay(listenerApi.getState(), timerId);
6719
+ var speed = 1000 / (speedDelay || 1);
6720
+ metronome.setSpeed(timerId, speed);
6721
+ };
6722
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
6723
+ _loop();
6694
6724
  }
6725
+ // Update all targets of all sync groups in one action.
6726
+ } catch (err) {
6727
+ _iterator.e(err);
6728
+ } finally {
6729
+ _iterator.f();
6730
+ }
6731
+ if (targetsWithUpdateValue.length > 0) {
6732
+ listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomelistener']));
6695
6733
  }
6696
- return timerShouldStepForward;
6697
6734
  };
6698
6735
 
6699
6736
  var isAnimationEndTimeValid = function isAnimationEndTimeValid(animationEndTime) {
@@ -6914,7 +6951,7 @@ mapListener.startListening({
6914
6951
  return timeNameValue.value === initialTime;
6915
6952
  });
6916
6953
  if (initalTimerStep !== -1) {
6917
- setStep$1(useMapId, initalTimerStep);
6954
+ setStep(useMapId, initalTimerStep);
6918
6955
  }
6919
6956
  }
6920
6957
  }
@@ -6966,7 +7003,7 @@ mapListener.startListening({
6966
7003
  actionCreator: mapActions.setMapPreset,
6967
7004
  effect: function () {
6968
7005
  var _effect2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref6, listenerApi) {
6969
- var payload, mapId, initialProps, mapPreset, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, dockedLayerManagerSize, timeSliderSpan, toggleTimeSpanAuto, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$, _newLayerIds$layers$f2, _newLayerIds$layers$2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoUpdateLayerId, newAutoTimeStepLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, legendId, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
7006
+ var payload, mapId, initialProps, mapPreset, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, dockedLayerManagerSize, timeSliderSpan, toggleTimeSpanAuto, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$f2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoTimeStepLayerId, newAutoUpdateLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, legendId, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
6970
7007
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6971
7008
  while (1) switch (_context2.prev = _context2.next) {
6972
7009
  case 0:
@@ -6993,22 +7030,21 @@ mapListener.startListening({
6993
7030
  layers: mapLayers,
6994
7031
  autoTimeStepLayerId: autoTimeStepLayerIdNew,
6995
7032
  autoUpdateLayerId: autoUpdateLayerIdNew
6996
- }); // set layers
7033
+ });
6997
7034
  listenerApi.dispatch(layerActions.setLayers({
6998
7035
  mapId: mapId,
6999
7036
  layers: newLayerIds.layers
7000
7037
  }));
7001
- // make sure layer with new id exist and if not, default to first layer
7002
- newAutoUpdateLayerId = ((_newLayerIds$layers$f = newLayerIds.layers.find(function (layer) {
7003
- return layer.id === newLayerIds.autoUpdateLayerId;
7004
- })) === null || _newLayerIds$layers$f === void 0 ? void 0 : _newLayerIds$layers$f.id) || ((_newLayerIds$layers$ = newLayerIds.layers[0]) === null || _newLayerIds$layers$ === void 0 ? void 0 : _newLayerIds$layers$.id);
7005
- newAutoTimeStepLayerId = ((_newLayerIds$layers$f2 = newLayerIds.layers.find(function (layer) {
7038
+ newAutoTimeStepLayerId = ((_newLayerIds$layers$f = newLayerIds.layers.find(function (layer) {
7006
7039
  return layer.id === newLayerIds.autoTimeStepLayerId;
7007
- })) === null || _newLayerIds$layers$f2 === void 0 ? void 0 : _newLayerIds$layers$f2.id) || ((_newLayerIds$layers$2 = newLayerIds.layers[0]) === null || _newLayerIds$layers$2 === void 0 ? void 0 : _newLayerIds$layers$2.id);
7040
+ })) === null || _newLayerIds$layers$f === void 0 ? void 0 : _newLayerIds$layers$f.id) || undefined;
7041
+ newAutoUpdateLayerId = ((_newLayerIds$layers$f2 = newLayerIds.layers.find(function (layer) {
7042
+ return layer.id === newLayerIds.autoUpdateLayerId;
7043
+ })) === null || _newLayerIds$layers$f2 === void 0 ? void 0 : _newLayerIds$layers$f2.id) || undefined;
7008
7044
  listenerApi.dispatch(mapActions.setAutoLayerId({
7009
7045
  mapId: mapId,
7010
- autoUpdateLayerId: newAutoUpdateLayerId,
7011
- autoTimeStepLayerId: newAutoTimeStepLayerId
7046
+ autoTimeStepLayerId: newAutoTimeStepLayerId,
7047
+ autoUpdateLayerId: newAutoUpdateLayerId
7012
7048
  }));
7013
7049
  }
7014
7050
  customLayers = getdefaultMapSettingsLayers(listenerApi.getState());
@@ -8211,240 +8247,6 @@ layersListener.startListening({
8211
8247
  }()
8212
8248
  });
8213
8249
 
8214
- /* A map with all the timerIds and their current step */
8215
- var stepMap = new Map();
8216
- /* A map with a list of timers and their dwell */
8217
- var timerDwellMap = new Map();
8218
- /**
8219
- * Returns the next step for given timerId.
8220
- * @param timerId The timer id
8221
- * @param numberOfStepsInAnimation Animation length in steps
8222
- * @param numStepsToGoForward Amount of steps to go forwards, defaults to 1. Can be positive and negative
8223
- * @returns
8224
- */
8225
- var getNextStep = function getNextStep(timerId, numberOfStepsInAnimation) {
8226
- var numStepsToGoForward = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
8227
- var currentStep = getCurrentStep(timerId);
8228
- var nextStep = currentStep + numStepsToGoForward;
8229
- var nextStepClipped = (nextStep % numberOfStepsInAnimation + numberOfStepsInAnimation) % numberOfStepsInAnimation;
8230
- return nextStepClipped;
8231
- };
8232
- /**
8233
- * Handles dwell at the end of the animation loop sequence. The number of steps to wait till proceed can be set by the dwell parameter.
8234
- * @param timerId The timer id
8235
- * @param numberOfStepsInAnimation Number of steps in the animation
8236
- * @param dwell The number of steps to wait at the end of the animation sequence before to continue
8237
- * @returns
8238
- */
8239
- var handleTimerDwell = function handleTimerDwell(timerId, numberOfStepsInAnimation) {
8240
- var dwell = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 8;
8241
- if (dwell > 0) {
8242
- var currentStep = getCurrentStep(timerId);
8243
- // Reset the dwell if we are not at the last animation step
8244
- if (currentStep < numberOfStepsInAnimation - 1) {
8245
- timerDwellMap.set(timerId, dwell);
8246
- return false;
8247
- }
8248
- // We are at the last animation step, check the dwell
8249
- var timerDwell = timerDwellMap.has(timerId) && timerDwellMap.get(timerId) || 0;
8250
- if (currentStep === numberOfStepsInAnimation - 1 && timerDwell > 0) {
8251
- timerDwellMap.set(timerId, timerDwell - 1);
8252
- return true;
8253
- }
8254
- }
8255
- return false;
8256
- };
8257
- /**
8258
- * Set step for the timerId
8259
- * @param timerId
8260
- * @param timerStep
8261
- */
8262
- var setStep = function setStep(timerId, timerStep) {
8263
- stepMap.set(timerId, timerStep);
8264
- };
8265
- /**
8266
- * Gets the current step for the timer
8267
- * @param timerId
8268
- * @returns
8269
- */
8270
- var getCurrentStep = function getCurrentStep(timerId) {
8271
- return stepMap.get(timerId) || 0;
8272
- };
8273
- /**
8274
- * Checks if the next step is available for all provided layers
8275
- * @param reduxLayers
8276
- * @param nextTimeString
8277
- * @returns
8278
- */
8279
- var isNextStepAvailable = function isNextStepAvailable(reduxLayers, nextTimeString) {
8280
- // Get all wmLayers for the found id's
8281
- var wmLayers = reduxLayers.map(function (reduxLayer) {
8282
- return reduxLayer.id && getWMLayerById(reduxLayer.id);
8283
- }).filter(function (l) {
8284
- return !!l;
8285
- });
8286
- // Returns a layer which could have an image for the requested time, but which isn't loaded yet.
8287
- var isThereSomethingNotAvailable = wmLayers.map(function (l) {
8288
- var _l$getDimension;
8289
- if (!l || !l.olSource) {
8290
- // No OpenLayers source, do nothing, so do not flag that something is not available
8291
- return {
8292
- status: true
8293
- };
8294
- }
8295
- // Check if there is a timevalue available
8296
- var closestValue = (_l$getDimension = l.getDimension('time')) === null || _l$getDimension === void 0 ? void 0 : _l$getDimension.getClosestValue(nextTimeString);
8297
- if (!closestValue || WMInvalidDateValues.has(closestValue)) {
8298
- // No value available, so do not flag that something is not available
8299
- return {
8300
- status: true
8301
- };
8302
- }
8303
- var olSource = l.olSource;
8304
- var hasImageAvailableForRequestedTimeStep = olSource.hasImageForTimeValue(closestValue);
8305
- // If there is no image available for requested timestep, return true and flag that this thing is not ready yet.
8306
- if (hasImageAvailableForRequestedTimeStep) {
8307
- return {
8308
- status: true
8309
- };
8310
- }
8311
- olSource.loadImageForTimeValue(closestValue);
8312
- return {
8313
- status: false
8314
- };
8315
- });
8316
- var nextStepIsAvailable = isThereSomethingNotAvailable.filter(function (d) {
8317
- return d.status === true;
8318
- }).length === wmLayers.length;
8319
- return nextStepIsAvailable;
8320
- };
8321
- /**
8322
- * This handler is triggered by the metronome. An array of timerIds is given as argument.
8323
- * It will update the animation loop of multiple maps and sliders
8324
- * It will prefetch images for maps
8325
- * @param timerIds string[] array of timerIds
8326
- * @param listenerApi ListenerEffectAPI<CoreAppStore, Dispatch, unknown> listenerApi as received from listener
8327
- */
8328
- var olMetronomeHandler = function olMetronomeHandler(timerIds, listenerApi) {
8329
- var targetsWithUpdateValue = [];
8330
- var _iterator = _createForOfIteratorHelper(timerIds),
8331
- _step;
8332
- try {
8333
- var _loop = function _loop() {
8334
- var timerId = _step.value;
8335
- var animationListValuesNameAndValue = getAnimationList(listenerApi.getState(), timerId);
8336
- var animationListValues = animationListValuesNameAndValue.map(function (nameAndValue) {
8337
- return nameAndValue.value;
8338
- });
8339
- var targets = getTargets(listenerApi.getState(), {
8340
- sourceId: timerId,
8341
- origin: timerId
8342
- }, SYNCGROUPS_TYPE_SETTIME);
8343
- if (targets.length === 0) {
8344
- // When there are no targets, default to one
8345
- targets.push({
8346
- targetId: timerId,
8347
- value: ''
8348
- });
8349
- }
8350
- var timerIsInDwell = handleTimerDwell(timerId, animationListValues.length);
8351
- // Collect all layers for this syncgroups target
8352
- var reduxLayers = [];
8353
- targets.forEach(function (target) {
8354
- reduxLayers.push.apply(reduxLayers, _toConsumableArray(getLayersByMapId(listenerApi.getState(), target.targetId).filter(function (l) {
8355
- return l.layerType === LayerType.mapLayer;
8356
- })));
8357
- });
8358
- var nextStep = getNextStep(timerId, animationListValues.length, 1);
8359
- var timerShouldStepForward = isNextStepAvailable(reduxLayers, animationListValues[nextStep]) && !timerIsInDwell;
8360
- // Determine the next step
8361
- var timerStep = timerShouldStepForward ? getNextStep(timerId, animationListValues.length) : getCurrentStep(timerId);
8362
- setStep(timerId, timerStep);
8363
- var updatedValue = animationListValues[timerStep];
8364
- targetsWithUpdateValue.push.apply(targetsWithUpdateValue, _toConsumableArray(targets.map(function (target) {
8365
- return _objectSpread2(_objectSpread2({}, target), {}, {
8366
- value: updatedValue
8367
- });
8368
- })));
8369
- var speedDelay = getMapAnimationDelay(listenerApi.getState(), timerId);
8370
- var speed = 1000 / (speedDelay || 1);
8371
- metronome.setSpeed(timerId, speed);
8372
- };
8373
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
8374
- _loop();
8375
- }
8376
- // Update all targets of all sync groups in one action.
8377
- } catch (err) {
8378
- _iterator.e(err);
8379
- } finally {
8380
- _iterator.f();
8381
- }
8382
- if (targetsWithUpdateValue.length > 0) {
8383
- listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomelistener']));
8384
- }
8385
- };
8386
-
8387
- /**
8388
- * This handler is triggered by the metronome. An array of timerIds is given as argument.
8389
- * It will update the animation loop of multiple maps and sliders
8390
- * It will prefetch images for maps
8391
- * @param timerIds string[] array of timerIds
8392
- * @param listenerApi ListenerEffectAPI<CoreAppStore, Dispatch, unknown> listenerApi as received from listener
8393
- */
8394
- var metronomeHandler = function metronomeHandler(timerIds, listenerApi) {
8395
- if (isOpenLayersEnabled()) {
8396
- olMetronomeHandler(timerIds, listenerApi);
8397
- return;
8398
- }
8399
- var targetsWithUpdateValue = [];
8400
- var _iterator = _createForOfIteratorHelper(timerIds),
8401
- _step;
8402
- try {
8403
- var _loop = function _loop() {
8404
- var timerId = _step.value;
8405
- var animationListValuesNameAndValue = getAnimationList(listenerApi.getState(), timerId);
8406
- var animationListValues = animationListValuesNameAndValue.map(function (nameAndValue) {
8407
- return nameAndValue.value;
8408
- });
8409
- var targets = getTargets(listenerApi.getState(), {
8410
- sourceId: timerId,
8411
- origin: timerId
8412
- }, SYNCGROUPS_TYPE_SETTIME);
8413
- if (targets.length === 0) {
8414
- // When there are no targets, default to one
8415
- targets.push({
8416
- targetId: timerId,
8417
- value: ''
8418
- });
8419
- }
8420
- var timerIsInDwell = handleTimerDwell$1(timerId, animationListValues.length);
8421
- var timerShouldStepForward = prefetchAnimationTargetsForMetronome(timerId, animationListValues, targets) && !timerIsInDwell;
8422
- // Determine the next step
8423
- var timerStep = timerShouldStepForward ? getNextStep$1(timerId, animationListValues.length) : getCurrentStep$1(timerId);
8424
- setStep$1(timerId, timerStep);
8425
- var updatedValue = animationListValues[timerStep];
8426
- targetsWithUpdateValue.push.apply(targetsWithUpdateValue, _toConsumableArray(targets.map(function (target) {
8427
- return _objectSpread2(_objectSpread2({}, target), {}, {
8428
- value: updatedValue
8429
- });
8430
- })));
8431
- var speedDelay = getMapAnimationDelay(listenerApi.getState(), timerId);
8432
- var speed = 1000 / (speedDelay || 1);
8433
- metronome.setSpeed(timerId, speed);
8434
- };
8435
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
8436
- _loop();
8437
- }
8438
- // Update all targets of all sync groups in one action.
8439
- } catch (err) {
8440
- _iterator.e(err);
8441
- } finally {
8442
- _iterator.f();
8443
- }
8444
- if (targetsWithUpdateValue.length > 0) {
8445
- listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomelistener']));
8446
- }
8447
- };
8448
8250
  var metronomeListener = createListenerMiddleware();
8449
8251
  metronomeListener.startListening({
8450
8252
  actionCreator: mapActions.mapStartAnimation,
@@ -8455,7 +8257,7 @@ metronomeListener.startListening({
8455
8257
  case 0:
8456
8258
  // register handler with access to listenerApi
8457
8259
  metronome.handleTimerTicks = function (timerIds) {
8458
- metronomeHandler(timerIds, listenerApi);
8260
+ olMetronomeHandler(timerIds, listenerApi);
8459
8261
  };
8460
8262
  case 1:
8461
8263
  case "end":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/store",
3
- "version": "12.5.0",
3
+ "version": "12.7.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": "12.5.0",
11
+ "@opengeoweb/shared": "12.7.0",
12
12
  "react-redux": "^9.2.0",
13
13
  "@reduxjs/toolkit": "^2.6.1",
14
- "@opengeoweb/webmap-react": "12.5.0",
15
- "@opengeoweb/webmap": "12.5.0",
14
+ "@opengeoweb/webmap-react": "12.7.0",
15
+ "@opengeoweb/webmap": "12.7.0",
16
16
  "immer": "^10.0.3",
17
17
  "lodash": "^4.17.21",
18
- "@opengeoweb/metronome": "12.5.0",
19
- "@opengeoweb/timeslider": "12.5.0",
18
+ "@opengeoweb/metronome": "12.7.0",
19
+ "@opengeoweb/timeslider": "12.7.0",
20
20
  "react-router-dom": "^6.23.1",
21
21
  "ol": "^10.4.0",
22
22
  "@turf/turf": "^7.2.0"
@@ -4,6 +4,7 @@ export declare const genericActions: {
4
4
  setBbox: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetBboxPayload, string>;
5
5
  setLinkedMap: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./syncGroups/types").SetLinkedMap, "synchronizationGroupsReducer/setLinkedMap">;
6
6
  updateLinkedMap: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./syncGroups/types").UpdateLinkedMap, "synchronizationGroupsReducer/updateLinkedMap">;
7
+ removeLinkedMap: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "synchronizationGroupsReducer/removeLinkedMap">;
7
8
  addSharedData: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./syncGroups/types").AddSharedData, "synchronizationGroupsReducer/addSharedData">;
8
9
  deleteSharedData: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./syncGroups/types").DeleteSharedData, "synchronizationGroupsReducer/deleteSharedData">;
9
10
  syncGroupAddSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./syncGroups/types").SyncGroupsAddSourcePayload, "synchronizationGroupsReducer/syncGroupAddSource">;
@@ -83,7 +83,7 @@ export declare const getLinkedMaps: ((state: any, panelId?: string | undefined)
83
83
  memoize: typeof import("reselect").weakMapMemoize;
84
84
  argsMemoize: typeof import("reselect").weakMapMemoize;
85
85
  };
86
- export declare const getLinkedFeatureProviders: (linkedState: LinkedState, mapId: string) => string[];
86
+ export declare const getLinkedFeatureProviders: (linkedState: LinkedState | undefined, mapId: string) => string[];
87
87
  export declare const selectSharedData: ((state: any, panelId: string) => PotentialData) & {
88
88
  clearCache: () => void;
89
89
  resultsCount: () => number;
@@ -196,12 +196,12 @@ export declare const selectLinkedFeatures: ((state: any, mapId: string) => {
196
196
  resultsCount: () => number;
197
197
  resetResultsCount: () => void;
198
198
  } & {
199
- resultFunc: (resultFuncArgs_0: LinkedState, resultFuncArgs_1: string[]) => {
199
+ resultFunc: (resultFuncArgs_0: LinkedState | undefined, resultFuncArgs_1: string[]) => {
200
200
  id: string;
201
201
  originalId?: string | undefined;
202
202
  geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
203
203
  }[];
204
- memoizedResultFunc: ((resultFuncArgs_0: LinkedState, resultFuncArgs_1: string[]) => {
204
+ memoizedResultFunc: ((resultFuncArgs_0: LinkedState | undefined, resultFuncArgs_1: string[]) => {
205
205
  id: string;
206
206
  originalId?: string | undefined;
207
207
  geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
@@ -215,7 +215,7 @@ export declare const selectLinkedFeatures: ((state: any, mapId: string) => {
215
215
  originalId?: string | undefined;
216
216
  geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
217
217
  }[];
218
- dependencies: [(linkedState: any) => LinkedState, (linkedState: LinkedState, mapId: string) => string[]];
218
+ dependencies: [(linkedState: any) => LinkedState | undefined, (linkedState: LinkedState | undefined, mapId: string) => string[]];
219
219
  recomputations: () => number;
220
220
  resetRecomputations: () => void;
221
221
  dependencyRecomputations: () => number;
@@ -232,11 +232,11 @@ export declare const selectLinkedFormFeatures: ((state: any, mapId: string) => {
232
232
  resultsCount: () => number;
233
233
  resetResultsCount: () => void;
234
234
  } & {
235
- resultFunc: (resultFuncArgs_0: LinkedState, resultFuncArgs_1: string[]) => {
235
+ resultFunc: (resultFuncArgs_0: LinkedState | undefined, resultFuncArgs_1: string[]) => {
236
236
  id: string;
237
237
  geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
238
238
  }[];
239
- memoizedResultFunc: ((resultFuncArgs_0: LinkedState, resultFuncArgs_1: string[]) => {
239
+ memoizedResultFunc: ((resultFuncArgs_0: LinkedState | undefined, resultFuncArgs_1: string[]) => {
240
240
  id: string;
241
241
  geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
242
242
  }[]) & {
@@ -248,7 +248,7 @@ export declare const selectLinkedFormFeatures: ((state: any, mapId: string) => {
248
248
  id: string;
249
249
  geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
250
250
  }[];
251
- dependencies: [(linkedState: any) => LinkedState, (linkedState: LinkedState, mapId: string) => string[]];
251
+ dependencies: [(linkedState: any) => LinkedState | undefined, (linkedState: LinkedState | undefined, mapId: string) => string[]];
252
252
  recomputations: () => number;
253
253
  resetRecomputations: () => void;
254
254
  dependencyRecomputations: () => number;
@@ -15,6 +15,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<SynchronizationGrou
15
15
  * @param {string[]} action.mapIds the new linked maps
16
16
  */
17
17
  updateLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<UpdateLinkedMap>) => void;
18
+ removeLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<string>) => void;
18
19
  addSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<AddSharedData>) => void;
19
20
  deleteSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<DeleteSharedData>) => void;
20
21
  syncGroupAddSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupsAddSourcePayload>) => void;
@@ -43,6 +44,7 @@ export declare const syncGroupsReducer: import("redux").Reducer<SynchronizationG
43
44
  * @param {string[]} action.mapIds the new linked maps
44
45
  */
45
46
  updateLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<UpdateLinkedMap>) => void;
47
+ removeLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<string>) => void;
46
48
  addSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<AddSharedData>) => void;
47
49
  deleteSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<DeleteSharedData>) => void;
48
50
  syncGroupAddSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupsAddSourcePayload>) => void;
@@ -1,4 +1,3 @@
1
- import { SetTimeSyncPayload } from '../../generic/synchronizationActions/types';
2
1
  /**
3
2
  * Returns the next step for given timerId.
4
3
  * @param timerId The timer id
@@ -27,12 +26,3 @@ export declare const setStep: (timerId: string, timerStep: number) => void;
27
26
  * @returns
28
27
  */
29
28
  export declare const getCurrentStep: (timerId: string) => number;
30
- export declare const MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH = 2;
31
- /**
32
- * This prefetches all images connected to the same sync group as provided timerId
33
- * @param timerId The timerId
34
- * @param animationListValues List of animation steps in isostring to animate
35
- * @param targets List of targets to check
36
- * @returns True if all maps are ready to go forward, false if the map has no data to display yet.
37
- */
38
- export declare const prefetchAnimationTargetsForMetronome: (timerId: string, animationListValues: string[], targets: SetTimeSyncPayload[]) => boolean;
@@ -139,8 +139,8 @@ export interface SetMapAnimationStopPayload {
139
139
  export interface SetAutoLayerIdPayload {
140
140
  mapId: string;
141
141
  layerId?: string;
142
- autoUpdateLayerId?: string;
143
142
  autoTimeStepLayerId?: string;
143
+ autoUpdateLayerId?: string;
144
144
  origin?: LayerActionOrigin | string;
145
145
  }
146
146
  export interface ToggleAutoUpdatePayload {
@@ -19,6 +19,8 @@ export declare enum DialogTypes {
19
19
  PublicWarnings = "publicWarnings",
20
20
  Search = "search",
21
21
  AreaObjectLoader = "areaObjectLoader",
22
+ DataExplorer = "dataExplorer",
23
+ DataExplorerInfo = "dataExplorerInfo",
22
24
  SoundingsSources = "soundingsSources",
23
25
  SoundingsLocations = "soundingsLocations"
24
26
  }