@opengeoweb/store 9.26.0 → 9.27.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/index.esm.js CHANGED
@@ -1,18 +1,16 @@
1
- import { webmapUtils, LayerType, getWMJSMapById, WMLayer, webmapTestSettings, handleDateUtilsISOString, getCapabilities, getWMSRequests, isProjectionSupported } from '@opengeoweb/webmap';
1
+ import { webmapUtils, parseISO8601IntervalToDateInterval, LayerType, getWMJSMapById, WMLayer, webmapTestSettings, getWMSRequests, handleDateUtilsISOString, isProjectionSupported, getCapabilities } from '@opengeoweb/webmap';
2
2
  import { createAction, createSlice, createSelector, createEntityAdapter, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
3
3
  import { getGeoJson, moveFeature, createInterSections, getLastEmptyFeatureIndex, defaultLayers, emptyGeoJSON, addSelectionTypeToGeoJSON, getFeatureCollection, defaultIntersectionStyleProperties } from '@opengeoweb/webmap-react';
4
4
  export { defaultLayers } from '@opengeoweb/webmap-react';
5
5
  import { dateUtils, PROJECTION, defaultDelay, withEggs } from '@opengeoweb/shared';
6
6
  import { defaultTimeSpan, defaultTimeStep, defaultAnimationDelayAtStart, defaultSecondsPerPx, roundWithTimeStep, getSpeedDelay } from '@opengeoweb/timeslider';
7
7
  import { produce } from 'immer';
8
- import { isEqual, compact } from 'lodash';
8
+ import { isEqual, isEmpty, compact } from 'lodash';
9
9
  import { useSelector, useDispatch, Provider } from 'react-redux';
10
10
  import { useCallback, useEffect } from 'react';
11
- import { createStore } from '@redux-eggs/redux-toolkit';
12
- import { getSagaExtension } from '@redux-eggs/saga-extension';
13
- import { takeEvery, select, put, all, call as call$e, takeLatest } from 'redux-saga/effects';
14
11
  import { metronome } from '@opengeoweb/metronome';
15
12
  import { jsx } from 'react/jsx-runtime';
13
+ import { createStore } from '@redux-eggs/redux-toolkit';
16
14
 
17
15
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
18
16
 
@@ -34,7 +32,7 @@ var global$g =
34
32
 
35
33
  var objectGetOwnPropertyDescriptor = {};
36
34
 
37
- var fails$m = function (exec) {
35
+ var fails$n = function (exec) {
38
36
  try {
39
37
  return !!exec();
40
38
  } catch (error) {
@@ -42,17 +40,17 @@ var fails$m = function (exec) {
42
40
  }
43
41
  };
44
42
 
45
- var fails$l = fails$m;
43
+ var fails$m = fails$n;
46
44
 
47
45
  // Detect IE8's incomplete defineProperty implementation
48
- var descriptors = !fails$l(function () {
46
+ var descriptors = !fails$m(function () {
49
47
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
50
48
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
51
49
  });
52
50
 
53
- var fails$k = fails$m;
51
+ var fails$l = fails$n;
54
52
 
55
- var functionBindNative = !fails$k(function () {
53
+ var functionBindNative = !fails$l(function () {
56
54
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
57
55
  var test = (function () { /* empty */ }).bind();
58
56
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -104,24 +102,24 @@ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
104
102
  };
105
103
  };
106
104
 
107
- var uncurryThis$j = functionUncurryThis;
105
+ var uncurryThis$k = functionUncurryThis;
108
106
 
109
- var toString$9 = uncurryThis$j({}.toString);
110
- var stringSlice$4 = uncurryThis$j(''.slice);
107
+ var toString$a = uncurryThis$k({}.toString);
108
+ var stringSlice$4 = uncurryThis$k(''.slice);
111
109
 
112
110
  var classofRaw$1 = function (it) {
113
- return stringSlice$4(toString$9(it), 8, -1);
111
+ return stringSlice$4(toString$a(it), 8, -1);
114
112
  };
115
113
 
116
- var uncurryThis$i = functionUncurryThis;
117
- var fails$j = fails$m;
114
+ var uncurryThis$j = functionUncurryThis;
115
+ var fails$k = fails$n;
118
116
  var classof$8 = classofRaw$1;
119
117
 
120
118
  var $Object$4 = Object;
121
- var split = uncurryThis$i(''.split);
119
+ var split = uncurryThis$j(''.split);
122
120
 
123
121
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
124
- var indexedObject = fails$j(function () {
122
+ var indexedObject = fails$k(function () {
125
123
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
126
124
  // eslint-disable-next-line no-prototype-builtins -- safe
127
125
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -141,17 +139,17 @@ var $TypeError$d = TypeError;
141
139
 
142
140
  // `RequireObjectCoercible` abstract operation
143
141
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
144
- var requireObjectCoercible$6 = function (it) {
142
+ var requireObjectCoercible$7 = function (it) {
145
143
  if (isNullOrUndefined$3(it)) throw new $TypeError$d("Can't call method on " + it);
146
144
  return it;
147
145
  };
148
146
 
149
147
  // toObject with fallback for non-array-like ES3 strings
150
148
  var IndexedObject$2 = indexedObject;
151
- var requireObjectCoercible$5 = requireObjectCoercible$6;
149
+ var requireObjectCoercible$6 = requireObjectCoercible$7;
152
150
 
153
151
  var toIndexedObject$5 = function (it) {
154
- return IndexedObject$2(requireObjectCoercible$5(it));
152
+ return IndexedObject$2(requireObjectCoercible$6(it));
155
153
  };
156
154
 
157
155
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
@@ -183,9 +181,9 @@ var getBuiltIn$6 = function (namespace, method) {
183
181
  return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method];
184
182
  };
185
183
 
186
- var uncurryThis$h = functionUncurryThis;
184
+ var uncurryThis$i = functionUncurryThis;
187
185
 
188
- var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
186
+ var objectIsPrototypeOf = uncurryThis$i({}.isPrototypeOf);
189
187
 
190
188
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
191
189
 
@@ -219,13 +217,13 @@ var engineV8Version = version;
219
217
 
220
218
  /* eslint-disable es/no-symbol -- required for testing */
221
219
  var V8_VERSION = engineV8Version;
222
- var fails$i = fails$m;
220
+ var fails$j = fails$n;
223
221
  var global$d = global$g;
224
222
 
225
223
  var $String$6 = global$d.String;
226
224
 
227
225
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
228
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$i(function () {
226
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$j(function () {
229
227
  var symbol = Symbol('symbol detection');
230
228
  // Chrome 38 Symbol has incorrect toString conversion
231
229
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -341,20 +339,20 @@ var shared$4 = function (key, value) {
341
339
  return store$2[key] || (store$2[key] = value || {});
342
340
  };
343
341
 
344
- var requireObjectCoercible$4 = requireObjectCoercible$6;
342
+ var requireObjectCoercible$5 = requireObjectCoercible$7;
345
343
 
346
344
  var $Object$2 = Object;
347
345
 
348
346
  // `ToObject` abstract operation
349
347
  // https://tc39.es/ecma262/#sec-toobject
350
348
  var toObject$6 = function (argument) {
351
- return $Object$2(requireObjectCoercible$4(argument));
349
+ return $Object$2(requireObjectCoercible$5(argument));
352
350
  };
353
351
 
354
- var uncurryThis$g = functionUncurryThis;
352
+ var uncurryThis$h = functionUncurryThis;
355
353
  var toObject$5 = toObject$6;
356
354
 
357
- var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
355
+ var hasOwnProperty = uncurryThis$h({}.hasOwnProperty);
358
356
 
359
357
  // `HasOwnProperty` abstract operation
360
358
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -363,14 +361,14 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
363
361
  return hasOwnProperty(toObject$5(it), key);
364
362
  };
365
363
 
366
- var uncurryThis$f = functionUncurryThis;
364
+ var uncurryThis$g = functionUncurryThis;
367
365
 
368
366
  var id = 0;
369
367
  var postfix = Math.random();
370
- var toString$8 = uncurryThis$f(1.0.toString);
368
+ var toString$9 = uncurryThis$g(1.0.toString);
371
369
 
372
370
  var uid$2 = function (key) {
373
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
371
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$9(++id + postfix, 36);
374
372
  };
375
373
 
376
374
  var global$b = global$g;
@@ -440,11 +438,11 @@ var documentCreateElement$2 = function (it) {
440
438
  };
441
439
 
442
440
  var DESCRIPTORS$b = descriptors;
443
- var fails$h = fails$m;
441
+ var fails$i = fails$n;
444
442
  var createElement = documentCreateElement$2;
445
443
 
446
444
  // Thanks to IE8 for its funny defineProperty
447
- var ie8DomDefine = !DESCRIPTORS$b && !fails$h(function () {
445
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$i(function () {
448
446
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
449
447
  return Object.defineProperty(createElement('div'), 'a', {
450
448
  get: function () { return 7; }
@@ -477,11 +475,11 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$a ? $getOwnPropertyDescriptor$1 :
477
475
  var objectDefineProperty = {};
478
476
 
479
477
  var DESCRIPTORS$9 = descriptors;
480
- var fails$g = fails$m;
478
+ var fails$h = fails$n;
481
479
 
482
480
  // V8 ~ Chrome 36-
483
481
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
484
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$g(function () {
482
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$h(function () {
485
483
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
486
484
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
487
485
  value: 42,
@@ -575,11 +573,11 @@ var functionName = {
575
573
  CONFIGURABLE: CONFIGURABLE
576
574
  };
577
575
 
578
- var uncurryThis$e = functionUncurryThis;
576
+ var uncurryThis$f = functionUncurryThis;
579
577
  var isCallable$e = isCallable$k;
580
578
  var store$1 = sharedStoreExports;
581
579
 
582
- var functionToString = uncurryThis$e(Function.toString);
580
+ var functionToString = uncurryThis$f(Function.toString);
583
581
 
584
582
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
585
583
  if (!isCallable$e(store$1.inspectSource)) {
@@ -679,8 +677,8 @@ var internalState = {
679
677
  getterFor: getterFor
680
678
  };
681
679
 
682
- var uncurryThis$d = functionUncurryThis;
683
- var fails$f = fails$m;
680
+ var uncurryThis$e = functionUncurryThis;
681
+ var fails$g = fails$n;
684
682
  var isCallable$c = isCallable$k;
685
683
  var hasOwn$5 = hasOwnProperty_1;
686
684
  var DESCRIPTORS$5 = descriptors;
@@ -693,11 +691,11 @@ var getInternalState$2 = InternalStateModule$1.get;
693
691
  var $String$3 = String;
694
692
  // eslint-disable-next-line es/no-object-defineproperty -- safe
695
693
  var defineProperty$5 = Object.defineProperty;
696
- var stringSlice$3 = uncurryThis$d(''.slice);
697
- var replace$3 = uncurryThis$d(''.replace);
698
- var join = uncurryThis$d([].join);
694
+ var stringSlice$3 = uncurryThis$e(''.slice);
695
+ var replace$4 = uncurryThis$e(''.replace);
696
+ var join = uncurryThis$e([].join);
699
697
 
700
- var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$f(function () {
698
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$g(function () {
701
699
  return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
702
700
  });
703
701
 
@@ -705,7 +703,7 @@ var TEMPLATE = String(String).split('String');
705
703
 
706
704
  var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
707
705
  if (stringSlice$3($String$3(name), 0, 7) === 'Symbol(') {
708
- name = '[' + replace$3($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
706
+ name = '[' + replace$4($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
709
707
  }
710
708
  if (options && options.getter) name = 'get ' + name;
711
709
  if (options && options.setter) name = 'set ' + name;
@@ -824,7 +822,7 @@ var toAbsoluteIndex = toAbsoluteIndex$1;
824
822
  var lengthOfArrayLike$3 = lengthOfArrayLike$4;
825
823
 
826
824
  // `Array.prototype.{ indexOf, includes }` methods implementation
827
- var createMethod$2 = function (IS_INCLUDES) {
825
+ var createMethod$3 = function (IS_INCLUDES) {
828
826
  return function ($this, el, fromIndex) {
829
827
  var O = toIndexedObject$3($this);
830
828
  var length = lengthOfArrayLike$3(O);
@@ -847,19 +845,19 @@ var createMethod$2 = function (IS_INCLUDES) {
847
845
  var arrayIncludes = {
848
846
  // `Array.prototype.includes` method
849
847
  // https://tc39.es/ecma262/#sec-array.prototype.includes
850
- includes: createMethod$2(true),
848
+ includes: createMethod$3(true),
851
849
  // `Array.prototype.indexOf` method
852
850
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
853
- indexOf: createMethod$2(false)
851
+ indexOf: createMethod$3(false)
854
852
  };
855
853
 
856
- var uncurryThis$c = functionUncurryThis;
854
+ var uncurryThis$d = functionUncurryThis;
857
855
  var hasOwn$4 = hasOwnProperty_1;
858
856
  var toIndexedObject$2 = toIndexedObject$5;
859
857
  var indexOf$1 = arrayIncludes.indexOf;
860
858
  var hiddenKeys$2 = hiddenKeys$4;
861
859
 
862
- var push$2 = uncurryThis$c([].push);
860
+ var push$2 = uncurryThis$d([].push);
863
861
 
864
862
  var objectKeysInternal = function (object, names) {
865
863
  var O = toIndexedObject$2(object);
@@ -903,12 +901,12 @@ var objectGetOwnPropertySymbols = {};
903
901
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
904
902
 
905
903
  var getBuiltIn$4 = getBuiltIn$6;
906
- var uncurryThis$b = functionUncurryThis;
904
+ var uncurryThis$c = functionUncurryThis;
907
905
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
908
906
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
909
907
  var anObject$7 = anObject$9;
910
908
 
911
- var concat$1 = uncurryThis$b([].concat);
909
+ var concat$1 = uncurryThis$c([].concat);
912
910
 
913
911
  // all object keys, includes non-enumerable and symbols
914
912
  var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
@@ -934,7 +932,7 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
934
932
  }
935
933
  };
936
934
 
937
- var fails$e = fails$m;
935
+ var fails$f = fails$n;
938
936
  var isCallable$a = isCallable$k;
939
937
 
940
938
  var replacement = /#|\.prototype\./;
@@ -943,7 +941,7 @@ var isForced$1 = function (feature, detection) {
943
941
  var value = data[normalize(feature)];
944
942
  return value === POLYFILL ? true
945
943
  : value === NATIVE ? false
946
- : isCallable$a(detection) ? fails$e(detection)
944
+ : isCallable$a(detection) ? fails$f(detection)
947
945
  : !!detection;
948
946
  };
949
947
 
@@ -1023,9 +1021,9 @@ var objectKeys$2 = Object.keys || function keys(O) {
1023
1021
  };
1024
1022
 
1025
1023
  var DESCRIPTORS$4 = descriptors;
1026
- var uncurryThis$a = functionUncurryThis;
1024
+ var uncurryThis$b = functionUncurryThis;
1027
1025
  var call$8 = functionCall;
1028
- var fails$d = fails$m;
1026
+ var fails$e = fails$n;
1029
1027
  var objectKeys$1 = objectKeys$2;
1030
1028
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1031
1029
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1036,11 +1034,11 @@ var IndexedObject$1 = indexedObject;
1036
1034
  var $assign = Object.assign;
1037
1035
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1038
1036
  var defineProperty$4 = Object.defineProperty;
1039
- var concat = uncurryThis$a([].concat);
1037
+ var concat = uncurryThis$b([].concat);
1040
1038
 
1041
1039
  // `Object.assign` method
1042
1040
  // https://tc39.es/ecma262/#sec-object.assign
1043
- var objectAssign = !$assign || fails$d(function () {
1041
+ var objectAssign = !$assign || fails$e(function () {
1044
1042
  // should have correct order of operations (Edge bug)
1045
1043
  if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', {
1046
1044
  enumerable: true,
@@ -1079,13 +1077,13 @@ var objectAssign = !$assign || fails$d(function () {
1079
1077
  } return T;
1080
1078
  } : $assign;
1081
1079
 
1082
- var $$a = _export;
1080
+ var $$b = _export;
1083
1081
  var assign = objectAssign;
1084
1082
 
1085
1083
  // `Object.assign` method
1086
1084
  // https://tc39.es/ecma262/#sec-object.assign
1087
1085
  // eslint-disable-next-line es/no-object-assign -- required for testing
1088
- $$a({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1086
+ $$b({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1089
1087
  assign: assign
1090
1088
  });
1091
1089
 
@@ -1221,20 +1219,20 @@ var addToUnscopables$2 = function (key) {
1221
1219
  ArrayPrototype[UNSCOPABLES][key] = true;
1222
1220
  };
1223
1221
 
1224
- var $$9 = _export;
1222
+ var $$a = _export;
1225
1223
  var $includes = arrayIncludes.includes;
1226
- var fails$c = fails$m;
1224
+ var fails$d = fails$n;
1227
1225
  var addToUnscopables$1 = addToUnscopables$2;
1228
1226
 
1229
1227
  // FF99+ bug
1230
- var BROKEN_ON_SPARSE = fails$c(function () {
1228
+ var BROKEN_ON_SPARSE = fails$d(function () {
1231
1229
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
1232
1230
  return !Array(1).includes();
1233
1231
  });
1234
1232
 
1235
1233
  // `Array.prototype.includes` method
1236
1234
  // https://tc39.es/ecma262/#sec-array.prototype.includes
1237
- $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1235
+ $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1238
1236
  includes: function includes(el /* , fromIndex = 0 */) {
1239
1237
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1240
1238
  }
@@ -1245,9 +1243,9 @@ addToUnscopables$1('includes');
1245
1243
 
1246
1244
  var iterators = {};
1247
1245
 
1248
- var fails$b = fails$m;
1246
+ var fails$c = fails$n;
1249
1247
 
1250
- var correctPrototypeGetter = !fails$b(function () {
1248
+ var correctPrototypeGetter = !fails$c(function () {
1251
1249
  function F() { /* empty */ }
1252
1250
  F.prototype.constructor = null;
1253
1251
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1276,7 +1274,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1276
1274
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1277
1275
  };
1278
1276
 
1279
- var fails$a = fails$m;
1277
+ var fails$b = fails$n;
1280
1278
  var isCallable$8 = isCallable$k;
1281
1279
  var isObject$5 = isObject$b;
1282
1280
  var getPrototypeOf$1 = objectGetPrototypeOf;
@@ -1301,7 +1299,7 @@ if ([].keys) {
1301
1299
  }
1302
1300
  }
1303
1301
 
1304
- var NEW_ITERATOR_PROTOTYPE = !isObject$5(IteratorPrototype$2) || fails$a(function () {
1302
+ var NEW_ITERATOR_PROTOTYPE = !isObject$5(IteratorPrototype$2) || fails$b(function () {
1305
1303
  var test = {};
1306
1304
  // FF44- legacy iterators case
1307
1305
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1351,13 +1349,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1351
1349
  return IteratorConstructor;
1352
1350
  };
1353
1351
 
1354
- var uncurryThis$9 = functionUncurryThis;
1352
+ var uncurryThis$a = functionUncurryThis;
1355
1353
  var aCallable$1 = aCallable$3;
1356
1354
 
1357
1355
  var functionUncurryThisAccessor = function (object, key, method) {
1358
1356
  try {
1359
1357
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1360
- return uncurryThis$9(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1358
+ return uncurryThis$a(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1361
1359
  } catch (error) { /* empty */ }
1362
1360
  };
1363
1361
 
@@ -1380,7 +1378,7 @@ var aPossiblePrototype$1 = function (argument) {
1380
1378
  /* eslint-disable no-proto -- safe */
1381
1379
  var uncurryThisAccessor = functionUncurryThisAccessor;
1382
1380
  var isObject$3 = isObject$b;
1383
- var requireObjectCoercible$3 = requireObjectCoercible$6;
1381
+ var requireObjectCoercible$4 = requireObjectCoercible$7;
1384
1382
  var aPossiblePrototype = aPossiblePrototype$1;
1385
1383
 
1386
1384
  // `Object.setPrototypeOf` method
@@ -1397,7 +1395,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1397
1395
  CORRECT_SETTER = test instanceof Array;
1398
1396
  } catch (error) { /* empty */ }
1399
1397
  return function setPrototypeOf(O, proto) {
1400
- requireObjectCoercible$3(O);
1398
+ requireObjectCoercible$4(O);
1401
1399
  aPossiblePrototype(proto);
1402
1400
  if (!isObject$3(O)) return O;
1403
1401
  if (CORRECT_SETTER) setter(O, proto);
@@ -1406,7 +1404,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1406
1404
  };
1407
1405
  }() : undefined);
1408
1406
 
1409
- var $$8 = _export;
1407
+ var $$9 = _export;
1410
1408
  var call$7 = functionCall;
1411
1409
  var FunctionName = functionName;
1412
1410
  var isCallable$7 = isCallable$k;
@@ -1420,7 +1418,7 @@ var wellKnownSymbol$7 = wellKnownSymbol$c;
1420
1418
  var Iterators$1 = iterators;
1421
1419
  var IteratorsCore = iteratorsCore;
1422
1420
 
1423
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1421
+ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1424
1422
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1425
1423
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1426
1424
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
@@ -1474,7 +1472,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1474
1472
  }
1475
1473
 
1476
1474
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1477
- if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1475
+ if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1478
1476
  if (CONFIGURABLE_FUNCTION_NAME) {
1479
1477
  createNonEnumerableProperty$5(IterablePrototype, 'name', VALUES);
1480
1478
  } else {
@@ -1494,7 +1492,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1494
1492
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1495
1493
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1496
1494
  }
1497
- } else $$8({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1495
+ } else $$9({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1498
1496
  }
1499
1497
 
1500
1498
  // define iterator
@@ -1617,14 +1615,14 @@ var doesNotExceedSafeInteger$2 = function (it) {
1617
1615
  return it;
1618
1616
  };
1619
1617
 
1620
- var $$7 = _export;
1618
+ var $$8 = _export;
1621
1619
  var toObject$2 = toObject$6;
1622
1620
  var lengthOfArrayLike$2 = lengthOfArrayLike$4;
1623
1621
  var setArrayLength$1 = arraySetLength;
1624
1622
  var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
1625
- var fails$9 = fails$m;
1623
+ var fails$a = fails$n;
1626
1624
 
1627
- var INCORRECT_TO_LENGTH = fails$9(function () {
1625
+ var INCORRECT_TO_LENGTH = fails$a(function () {
1628
1626
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
1629
1627
  });
1630
1628
 
@@ -1643,7 +1641,7 @@ var FORCED$3 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength$1();
1643
1641
 
1644
1642
  // `Array.prototype.push` method
1645
1643
  // https://tc39.es/ecma262/#sec-array.prototype.push
1646
- $$7({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
1644
+ $$8({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
1647
1645
  // eslint-disable-next-line no-unused-vars -- required for `.length`
1648
1646
  push: function push(item) {
1649
1647
  var O = toObject$2(this);
@@ -1669,7 +1667,7 @@ var $TypeError$4 = TypeError;
1669
1667
  var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
1670
1668
 
1671
1669
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
1672
- var createMethod$1 = function (IS_RIGHT) {
1670
+ var createMethod$2 = function (IS_RIGHT) {
1673
1671
  return function (that, callbackfn, argumentsLength, memo) {
1674
1672
  var O = toObject$1(that);
1675
1673
  var self = IndexedObject(O);
@@ -1699,17 +1697,17 @@ var createMethod$1 = function (IS_RIGHT) {
1699
1697
  var arrayReduce = {
1700
1698
  // `Array.prototype.reduce` method
1701
1699
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
1702
- left: createMethod$1(false),
1700
+ left: createMethod$2(false),
1703
1701
  // `Array.prototype.reduceRight` method
1704
1702
  // https://tc39.es/ecma262/#sec-array.prototype.reduceright
1705
- right: createMethod$1(true)
1703
+ right: createMethod$2(true)
1706
1704
  };
1707
1705
 
1708
- var fails$8 = fails$m;
1706
+ var fails$9 = fails$n;
1709
1707
 
1710
1708
  var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1711
1709
  var method = [][METHOD_NAME];
1712
- return !!method && fails$8(function () {
1710
+ return !!method && fails$9(function () {
1713
1711
  // eslint-disable-next-line no-useless-call -- required for testing
1714
1712
  method.call(null, argument || function () { return 1; }, 1);
1715
1713
  });
@@ -1720,7 +1718,7 @@ var classof$6 = classofRaw$1;
1720
1718
 
1721
1719
  var engineIsNode = classof$6(global$6.process) === 'process';
1722
1720
 
1723
- var $$6 = _export;
1721
+ var $$7 = _export;
1724
1722
  var $reduce = arrayReduce.left;
1725
1723
  var arrayMethodIsStrict = arrayMethodIsStrict$1;
1726
1724
  var CHROME_VERSION = engineV8Version;
@@ -1733,7 +1731,7 @@ var FORCED$2 = CHROME_BUG || !arrayMethodIsStrict('reduce');
1733
1731
 
1734
1732
  // `Array.prototype.reduce` method
1735
1733
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
1736
- $$6({ target: 'Array', proto: true, forced: FORCED$2 }, {
1734
+ $$7({ target: 'Array', proto: true, forced: FORCED$2 }, {
1737
1735
  reduce: function reduce(callbackfn /* , initialValue */) {
1738
1736
  var length = arguments.length;
1739
1737
  return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
@@ -1806,7 +1804,7 @@ var classof$3 = classof$4;
1806
1804
 
1807
1805
  var $String$1 = String;
1808
1806
 
1809
- var toString$7 = function (argument) {
1807
+ var toString$8 = function (argument) {
1810
1808
  if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1811
1809
  return $String$1(argument);
1812
1810
  };
@@ -1827,22 +1825,22 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
1827
1825
  } return false;
1828
1826
  };
1829
1827
 
1830
- var $$5 = _export;
1831
- var uncurryThis$8 = functionUncurryThis;
1828
+ var $$6 = _export;
1829
+ var uncurryThis$9 = functionUncurryThis;
1832
1830
  var notARegExp = notARegexp;
1833
- var requireObjectCoercible$2 = requireObjectCoercible$6;
1834
- var toString$6 = toString$7;
1831
+ var requireObjectCoercible$3 = requireObjectCoercible$7;
1832
+ var toString$7 = toString$8;
1835
1833
  var correctIsRegExpLogic = correctIsRegexpLogic;
1836
1834
 
1837
- var stringIndexOf = uncurryThis$8(''.indexOf);
1835
+ var stringIndexOf = uncurryThis$9(''.indexOf);
1838
1836
 
1839
1837
  // `String.prototype.includes` method
1840
1838
  // https://tc39.es/ecma262/#sec-string.prototype.includes
1841
- $$5({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1839
+ $$6({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1842
1840
  includes: function includes(searchString /* , position = 0 */) {
1843
1841
  return !!~stringIndexOf(
1844
- toString$6(requireObjectCoercible$2(this)),
1845
- toString$6(notARegExp(searchString)),
1842
+ toString$7(requireObjectCoercible$3(this)),
1843
+ toString$7(notARegExp(searchString)),
1846
1844
  arguments.length > 1 ? arguments[1] : undefined
1847
1845
  );
1848
1846
  }
@@ -2011,6 +2009,69 @@ var types$5 = /*#__PURE__*/Object.freeze({
2011
2009
  get LayerStatus () { return LayerStatus; }
2012
2010
  });
2013
2011
 
2012
+ // a string of all valid unicode whitespaces
2013
+ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
2014
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
2015
+
2016
+ var uncurryThis$8 = functionUncurryThis;
2017
+ var requireObjectCoercible$2 = requireObjectCoercible$7;
2018
+ var toString$6 = toString$8;
2019
+ var whitespaces$1 = whitespaces$2;
2020
+
2021
+ var replace$3 = uncurryThis$8(''.replace);
2022
+ var ltrim = RegExp('^[' + whitespaces$1 + ']+');
2023
+ var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
2024
+
2025
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
2026
+ var createMethod$1 = function (TYPE) {
2027
+ return function ($this) {
2028
+ var string = toString$6(requireObjectCoercible$2($this));
2029
+ if (TYPE & 1) string = replace$3(string, ltrim, '');
2030
+ if (TYPE & 2) string = replace$3(string, rtrim, '$1');
2031
+ return string;
2032
+ };
2033
+ };
2034
+
2035
+ var stringTrim = {
2036
+ // `String.prototype.{ trimLeft, trimStart }` methods
2037
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
2038
+ start: createMethod$1(1),
2039
+ // `String.prototype.{ trimRight, trimEnd }` methods
2040
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
2041
+ end: createMethod$1(2),
2042
+ // `String.prototype.trim` method
2043
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
2044
+ trim: createMethod$1(3)
2045
+ };
2046
+
2047
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
2048
+ var fails$8 = fails$n;
2049
+ var whitespaces = whitespaces$2;
2050
+
2051
+ var non = '\u200B\u0085\u180E';
2052
+
2053
+ // check that a method works with the correct list
2054
+ // of whitespaces and has a correct name
2055
+ var stringTrimForced = function (METHOD_NAME) {
2056
+ return fails$8(function () {
2057
+ return !!whitespaces[METHOD_NAME]()
2058
+ || non[METHOD_NAME]() !== non
2059
+ || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
2060
+ });
2061
+ };
2062
+
2063
+ var $$5 = _export;
2064
+ var $trim = stringTrim.trim;
2065
+ var forcedStringTrimMethod = stringTrimForced;
2066
+
2067
+ // `String.prototype.trim` method
2068
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
2069
+ $$5({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2070
+ trim: function trim() {
2071
+ return $trim(this);
2072
+ }
2073
+ });
2074
+
2014
2075
  const dateFormat = dateUtils.DATE_FORMAT_UTC;
2015
2076
  const createMap = ({
2016
2077
  id,
@@ -2205,16 +2266,16 @@ const getTimeStepFromDataInterval = timeInterval => {
2205
2266
  return timeInterval.year * 365 * 24 * 60;
2206
2267
  }
2207
2268
  case true:
2208
- if (timeInterval.day !== 0) {
2269
+ if (timeInterval.day !== 0 && !isNaN(timeInterval.day)) {
2209
2270
  return timeInterval.day * 24 * 60;
2210
2271
  }
2211
- if (timeInterval.hour !== 0) {
2272
+ if (timeInterval.hour !== 0 && !isNaN(timeInterval.hour)) {
2212
2273
  return timeInterval.hour * 60;
2213
2274
  }
2214
- if (timeInterval.minute !== 0) {
2275
+ if (timeInterval.minute !== 0 && !isNaN(timeInterval.minute)) {
2215
2276
  return timeInterval.minute;
2216
2277
  }
2217
- if (timeInterval.second !== 0) {
2278
+ if (timeInterval.second !== 0 && !isNaN(timeInterval.second)) {
2218
2279
  return timeInterval.second / 60.0;
2219
2280
  }
2220
2281
  return defaultTimeStep;
@@ -2226,6 +2287,81 @@ const getSpeedFactor = speedDelay => {
2226
2287
  return defaultDelay / speedDelay;
2227
2288
  };
2228
2289
  const getAnimationDuration = (animationEndTime, animationStartTime) => animationEndTime && animationStartTime ? dateUtils.differenceInMinutes(new Date(animationEndTime), new Date(animationStartTime)) : 0;
2290
+ /**
2291
+ * @param animationStart
2292
+ * @param animationEnd
2293
+ * @param iso8601Intervals
2294
+ * @returns WebMapAnimationList with time points
2295
+ */
2296
+ const generateAnimationList = (unixAnimationStart, unixAnimationEnd, timeValues) => {
2297
+ if (!unixAnimationStart || !unixAnimationEnd || !timeValues) {
2298
+ return [];
2299
+ }
2300
+ const iso8601Intervals = parseTimeDimToISO8601Interval(timeValues);
2301
+ const animationList = [];
2302
+ // If there are no ISO8601 intervals in the time dimension we treat it as a list of time values
2303
+ if (!iso8601Intervals.length) {
2304
+ timeValues.split(',').forEach(timeValue => {
2305
+ if (unixAnimationStart <= dateUtils.unix(dateUtils.utc(timeValue)) && dateUtils.unix(dateUtils.utc(timeValue)) <= unixAnimationEnd) {
2306
+ animationList.push({
2307
+ name: 'time',
2308
+ value: timeValue
2309
+ });
2310
+ }
2311
+ });
2312
+ return animationList;
2313
+ }
2314
+ // Initialize aggregate start time for animation points in case of multiple intervals
2315
+ let currentAnimationTime = unixAnimationStart;
2316
+ // Iterate over each iso8601 interval and generate animation points
2317
+ iso8601Intervals.forEach(timeInterval => {
2318
+ if (!timeInterval.duration) {
2319
+ return;
2320
+ }
2321
+ // Convert interval start and end times to Unix time
2322
+ const unixIntervalStart = dateUtils.unix(dateUtils.utc(timeInterval.startTime));
2323
+ const unixIntervalEnd = dateUtils.unix(dateUtils.utc(timeInterval.endTime));
2324
+ // Parse the duration and calculate interval step in seconds
2325
+ const interval = parseISO8601IntervalToDateInterval(timeInterval.duration);
2326
+ const intervalSeconds = getTimeStepFromDataInterval(interval) * 60;
2327
+ // Generate animation points for the current interval
2328
+ for (let i = currentAnimationTime; i <= unixAnimationEnd; i += intervalSeconds) {
2329
+ if (i >= unixIntervalStart && i <= unixIntervalEnd) {
2330
+ animationList.push({
2331
+ name: 'time',
2332
+ value: dateUtils.fromUnix(i).toISOString()
2333
+ });
2334
+ }
2335
+ // If the next step exceeds the current interval, break to switch to next interval
2336
+ if (i + intervalSeconds > unixIntervalEnd) {
2337
+ break;
2338
+ }
2339
+ }
2340
+ // Update the start time for the next interval
2341
+ currentAnimationTime = unixIntervalStart + intervalSeconds;
2342
+ });
2343
+ return animationList;
2344
+ };
2345
+ /**
2346
+ * Parses the time dimension values string to an array of ISO8601 intervals
2347
+ * @param timeInterval
2348
+ * @returns An array of ISO8601 intervals
2349
+ */
2350
+ const parseTimeDimToISO8601Interval = timeInterval => {
2351
+ if (!timeInterval || !timeInterval.includes('/')) {
2352
+ return [];
2353
+ }
2354
+ const intervalList = timeInterval.split(',').map(interval => {
2355
+ const [startTime, endTime, duration] = interval.split('/');
2356
+ return {
2357
+ startTime: startTime === null || startTime === void 0 ? void 0 : startTime.trim(),
2358
+ endTime: endTime === null || endTime === void 0 ? void 0 : endTime.trim(),
2359
+ duration: duration === null || duration === void 0 ? void 0 : duration.trim()
2360
+ };
2361
+ });
2362
+ // Filter out intervals with missing start, end or duration
2363
+ return intervalList.filter(interval => interval.startTime && interval.endTime && interval.duration);
2364
+ };
2229
2365
 
2230
2366
  var utils$3 = /*#__PURE__*/Object.freeze({
2231
2367
  __proto__: null,
@@ -2233,11 +2369,13 @@ var utils$3 = /*#__PURE__*/Object.freeze({
2233
2369
  createMap: createMap,
2234
2370
  dateFormat: dateFormat,
2235
2371
  findMapIdFromLayerId: findMapIdFromLayerId,
2372
+ generateAnimationList: generateAnimationList,
2236
2373
  getAnimationDuration: getAnimationDuration,
2237
2374
  getDraftMapById: getDraftMapById,
2238
2375
  getSpeedFactor: getSpeedFactor,
2239
2376
  getTimeStepFromDataInterval: getTimeStepFromDataInterval,
2240
2377
  moveArrayElements: moveArrayElements,
2378
+ parseTimeDimToISO8601Interval: parseTimeDimToISO8601Interval,
2241
2379
  produceDraftStateSetMapDimensionFromLayerChangeDimension: produceDraftStateSetMapDimensionFromLayerChangeDimension,
2242
2380
  produceDraftStateSetWebMapDimension: produceDraftStateSetWebMapDimension
2243
2381
  });
@@ -2468,7 +2606,7 @@ const setBbox = createAction('GENERIC_SETBBOX');
2468
2606
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2469
2607
  * */
2470
2608
  /**
2471
- * These actions are fired by the generic/saga.ts, based on generic actions and the synchronizationGroup state.
2609
+ * These actions are fired by the generic/listener.ts, based on generic actions and the synchronizationGroup state.
2472
2610
  *
2473
2611
  * These actions should not be used by components directly. Components should only use the generic actions.
2474
2612
  */
@@ -3055,7 +3193,7 @@ const slice$7 = createSlice({
3055
3193
  });
3056
3194
  }).addCase(setLayerActionSync, (draft, action) => {
3057
3195
  /*
3058
- * This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup saga.
3196
+ * This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup listener.
3059
3197
  * It has multiple targets (Layers) in its payload.
3060
3198
  * These targets can be used as payloads in new Layer actions.
3061
3199
  * These actions are here handled via the layer reducer, as it is the same logic
@@ -3424,7 +3562,32 @@ const getUseLatestReferenceTime = createSelector(getLayerById, layer => Boolean(
3424
3562
  * Returns the timestep for this layerId in seconds, or undefined if it has no time dimension or timeinterval.
3425
3563
  */
3426
3564
  const getTimeStepForLayerId = createSelector(getLayerTimeDimension, timeDimension => {
3427
- return timeDimension && timeDimension.timeInterval ? getTimeStepFromDataInterval(timeDimension.timeInterval) : undefined;
3565
+ if (!timeDimension) {
3566
+ return undefined;
3567
+ }
3568
+ const {
3569
+ values,
3570
+ currentValue,
3571
+ timeInterval = {}
3572
+ } = timeDimension;
3573
+ if (!values || !currentValue) {
3574
+ return isEmpty(timeInterval) ? undefined : getTimeStepFromDataInterval(timeInterval);
3575
+ }
3576
+ const iso8601Intervals = parseTimeDimToISO8601Interval(values);
3577
+ for (const {
3578
+ startTime,
3579
+ endTime,
3580
+ duration
3581
+ } of iso8601Intervals) {
3582
+ if (dateUtils.isWithinInterval(currentValue, {
3583
+ start: startTime,
3584
+ end: endTime
3585
+ })) {
3586
+ const parsedInterval = parseISO8601IntervalToDateInterval(duration);
3587
+ return getTimeStepFromDataInterval(parsedInterval);
3588
+ }
3589
+ }
3590
+ return getTimeStepFromDataInterval(timeInterval);
3428
3591
  }, selectorMemoizationOptions);
3429
3592
  const getActiveLayerInfo = createSelector(layerStore, store => store === null || store === void 0 ? void 0 : store.activeLayerInfo);
3430
3593
 
@@ -4379,7 +4542,7 @@ const slice$5 = createSlice({
4379
4542
  });
4380
4543
  }).addCase(setLayerActionSync, (draft, action) => {
4381
4544
  /*
4382
- * This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup saga.
4545
+ * This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup listener.
4383
4546
  * It has multiple targets (Layers) in its payload.
4384
4547
  * These targets can be used as payloads in new Layer actions.
4385
4548
  * These actions are here handled via the layer reducer, as it is the same logic
@@ -4422,7 +4585,7 @@ const slice$5 = createSlice({
4422
4585
  if (!draft.byId[mapId]) {
4423
4586
  return;
4424
4587
  }
4425
- // reset preset state (currently setMapPreset saga is firing actions and these are setting values)
4588
+ // reset preset state (currently setMapPreset listener is firing actions and these are setting values)
4426
4589
  draft.byId[mapId].baseLayers = [];
4427
4590
  draft.byId[mapId].mapLayers = [];
4428
4591
  draft.byId[mapId].overLayers = [];
@@ -5040,7 +5203,7 @@ var SyncGroupActionOrigin;
5040
5203
  SyncGroupActionOrigin["layerActions"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_LAYERACTIONS";
5041
5204
  SyncGroupActionOrigin["move"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_MOVEACTION";
5042
5205
  SyncGroupActionOrigin["add"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_ADDACTION";
5043
- SyncGroupActionOrigin["activateLayerId"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_ACTIVELAYERIDACTION";
5206
+ SyncGroupActionOrigin["autoLayerId"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_AUTOLAYERIDACTION";
5044
5207
  })(SyncGroupActionOrigin || (SyncGroupActionOrigin = {}));
5045
5208
 
5046
5209
  var types$2 = /*#__PURE__*/Object.freeze({
@@ -6092,28 +6255,36 @@ const getDockedLayerManagerSize = createSelector(getMapById, store => store ? st
6092
6255
  * @param {string} mapId mapId: string - Id of the map
6093
6256
  * @returns {animationList} returnType: WebMapAnimationList, list of timesteps to animate for this map.
6094
6257
  */
6095
- const getAnimationList = createSelector(getMapById, getAnimationStartTime, getAnimationEndTime, getMapTimeStep, (mapStore, animationStart, animationEnd, animationInterval) => {
6258
+ const getAnimationList = createSelector(getLayersById, getMapById, getAnimationStartTime, getAnimationEndTime, getMapTimeStep, (layers, mapStore, animationStart, animationEnd, animationInterval) => {
6096
6259
  // Animation is defined by one of the following:
6097
- // - start, end and interval for a continuous animation loop with constant interval
6260
+ // - start, end and interval for a continuous animation loop
6098
6261
  // - timeList, for a custom timeList
6262
+ var _a, _b, _c;
6099
6263
  // Here the animation is defined by a timeList
6100
- if (mapStore && (mapStore === null || mapStore === void 0 ? void 0 : mapStore.timeList) && mapStore.timeList.length > 0) {
6264
+ if ((_a = mapStore === null || mapStore === void 0 ? void 0 : mapStore.timeList) === null || _a === void 0 ? void 0 : _a.length) {
6101
6265
  return mapStore.timeList;
6102
6266
  }
6103
- // Here the animation is defined by a start/stop/interval
6104
- const roundedStart = roundWithTimeStep(Number(animationStart && dateUtils.unix(dateUtils.utc(animationStart))), animationInterval, 'ceil');
6105
- const roundedEnd = roundWithTimeStep(Number(animationEnd && dateUtils.unix(dateUtils.utc(animationEnd))), animationInterval, 'floor');
6106
- const timeList = [];
6107
- const unixStart = dateUtils.unix(dateUtils.fromUnix(roundedStart));
6108
- const unixEnd = dateUtils.unix(dateUtils.fromUnix(roundedEnd));
6109
- const intervalSeconds = animationInterval * 60;
6110
- for (let j = unixStart; j <= unixEnd; j += intervalSeconds) {
6111
- timeList.push({
6112
- name: 'time',
6113
- value: dateUtils.fromUnix(j).toISOString()
6114
- });
6267
+ const autoTimeStepLayerId = mapStore === null || mapStore === void 0 ? void 0 : mapStore.autoTimeStepLayerId;
6268
+ const timeDimension = autoTimeStepLayerId && ((_c = (_b = layers === null || layers === void 0 ? void 0 : layers[autoTimeStepLayerId]) === null || _b === void 0 ? void 0 : _b.dimensions) === null || _c === void 0 ? void 0 : _c.find(dimension => dimension.name === 'time'));
6269
+ const {
6270
+ values
6271
+ } = timeDimension || {};
6272
+ const unixAnimationStart = roundWithTimeStep(Number(animationStart && dateUtils.unix(dateUtils.utc(animationStart))), animationInterval, 'ceil');
6273
+ const unixAnimationEnd = roundWithTimeStep(Number(animationEnd && dateUtils.unix(dateUtils.utc(animationEnd))), animationInterval, 'floor');
6274
+ const animationList = generateAnimationList(unixAnimationStart, unixAnimationEnd, values);
6275
+ // If no animationList is generated, generate a default list using the interval from map
6276
+ if (!animationList.length) {
6277
+ const timeList = [];
6278
+ const intervalSeconds = animationInterval * 60;
6279
+ for (let j = unixAnimationStart; j <= unixAnimationEnd; j += intervalSeconds) {
6280
+ timeList.push({
6281
+ name: 'time',
6282
+ value: dateUtils.fromUnix(j).toISOString()
6283
+ });
6284
+ }
6285
+ return timeList;
6115
6286
  }
6116
- return timeList;
6287
+ return animationList;
6117
6288
  }, selectorMemoizationOptions);
6118
6289
  /**
6119
6290
  * @param {object} store store: object - store object
@@ -6329,7 +6500,9 @@ const slice$2 = createSlice({
6329
6500
  // eslint-disable-next-line no-unused-vars
6330
6501
  draft,
6331
6502
  // eslint-disable-next-line no-unused-vars
6332
- action) => {}
6503
+ action) => {
6504
+ // This block is intentionally left empty so no code should be put in here
6505
+ }
6333
6506
  }
6334
6507
  });
6335
6508
  const {
@@ -6483,7 +6656,7 @@ var uncurryThis$6 = functionUncurryThis;
6483
6656
  var isArray = isArray$2;
6484
6657
  var isCallable$5 = isCallable$k;
6485
6658
  var classof$2 = classofRaw$1;
6486
- var toString$5 = toString$7;
6659
+ var toString$5 = toString$8;
6487
6660
 
6488
6661
  var push$1 = uncurryThis$6([].push);
6489
6662
 
@@ -6514,7 +6687,7 @@ var getBuiltIn$2 = getBuiltIn$6;
6514
6687
  var apply$1 = functionApply;
6515
6688
  var call$5 = functionCall;
6516
6689
  var uncurryThis$5 = functionUncurryThis;
6517
- var fails$7 = fails$m;
6690
+ var fails$7 = fails$n;
6518
6691
  var isCallable$4 = isCallable$k;
6519
6692
  var isSymbol = isSymbol$3;
6520
6693
  var arraySlice = arraySlice$1;
@@ -6804,86 +6977,6 @@ var storeTestSettings = /*#__PURE__*/Object.freeze({
6804
6977
  styleListForRADNLOPERR25PCPRRL3KNMILayer: styleListForRADNLOPERR25PCPRRL3KNMILayer
6805
6978
  });
6806
6979
 
6807
- function* setStepBackwardOrForwardSaga({
6808
- payload
6809
- }) {
6810
- const {
6811
- mapId,
6812
- isForwardStep
6813
- } = payload;
6814
- const timeStep = yield select(getMapTimeStep, mapId);
6815
- const currentTime = yield select(getSelectedTime, mapId);
6816
- const [dataStartTime, dataEndTime] = yield select(getDataLimitsFromLayers, mapId);
6817
- if (dateUtils.isValid(currentTime)) {
6818
- const makeForwardStep = () => {
6819
- const nextTime = currentTime + timeStep;
6820
- const roundedTime = roundWithTimeStep(nextTime, timeStep, 'ceil');
6821
- const newTime = Math.min(roundedTime, dataEndTime || roundedTime);
6822
- return dateUtils.fromUnix(newTime).toISOString();
6823
- };
6824
- const makeBackwardStep = () => {
6825
- const nextTime = currentTime - timeStep;
6826
- const roundedTime = roundWithTimeStep(nextTime, timeStep, 'floor');
6827
- const newTime = Math.max(roundedTime, dataStartTime || roundedTime);
6828
- return dateUtils.fromUnix(newTime).toISOString();
6829
- };
6830
- const selectedTimeString = isForwardStep ? makeForwardStep() : makeBackwardStep();
6831
- const isMapAnimating = yield select(isAnimating, mapId);
6832
- if (isMapAnimating) {
6833
- yield put(mapActions.mapStopAnimation({
6834
- mapId,
6835
- origin: MapActionOrigin.map
6836
- }));
6837
- }
6838
- const isAutoUpdateOn = yield select(isAutoUpdating, mapId);
6839
- if (isAutoUpdateOn) {
6840
- yield put(mapActions.toggleAutoUpdate({
6841
- mapId,
6842
- shouldAutoUpdate: false
6843
- }));
6844
- }
6845
- yield put(genericActions.setTime({
6846
- origin: '',
6847
- sourceId: mapId,
6848
- value: handleDateUtilsISOString(selectedTimeString)
6849
- }));
6850
- }
6851
- }
6852
- function* rootSaga$2() {
6853
- // resets IWMJSMap state
6854
- yield takeEvery(mapActions.setStepBackwardOrForward.type, setStepBackwardOrForwardSaga);
6855
- }
6856
-
6857
- function* fetchServiceSaga(service) {
6858
- try {
6859
- const layers = yield call$e(getCapabilities.getLayersFlattenedFromService, service.serviceUrl);
6860
- yield put(serviceActions.serviceSetLayers(Object.assign(Object.assign({}, service), {
6861
- layers
6862
- })));
6863
- } catch (error) {
6864
- // not implemented yet
6865
- }
6866
- }
6867
- function* fetchInitialServicesSaga({
6868
- payload
6869
- }) {
6870
- const {
6871
- services
6872
- } = payload;
6873
- yield all(services.map(_a => {
6874
- var {
6875
- url
6876
- } = _a,
6877
- service = __rest(_a, ["url"]);
6878
- return call$e(fetchServiceSaga, Object.assign(Object.assign({}, service), {
6879
- serviceUrl: url
6880
- }));
6881
- }));
6882
- }
6883
- function* rootSaga$1() {
6884
- yield takeEvery(serviceActions.fetchInitialServices, fetchInitialServicesSaga);
6885
- }
6886
-
6887
6980
  /* A map with all the timerIds and their current step */
6888
6981
  const stepMap = new Map();
6889
6982
  /* A map with a list of timers and their dwell */
@@ -7032,7 +7125,7 @@ const metronomeHandler = (timerIds, listenerApi) => {
7032
7125
  }
7033
7126
  // Update all targets of all sync groups in one action.
7034
7127
  if (targetsWithUpdateValue.length > 0) {
7035
- listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomesaga']));
7128
+ listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomelistener']));
7036
7129
  }
7037
7130
  };
7038
7131
  const metronomeListener = createListenerMiddleware();
@@ -7184,7 +7277,7 @@ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
7184
7277
  return $this;
7185
7278
  };
7186
7279
 
7187
- var toString$4 = toString$7;
7280
+ var toString$4 = toString$8;
7188
7281
 
7189
7282
  var normalizeStringArgument$1 = function (argument, $default) {
7190
7283
  return argument === undefined ? arguments.length < 2 ? '' : $default : toString$4(argument);
@@ -7217,7 +7310,7 @@ var errorStackClear = function (stack, dropEntries) {
7217
7310
  } return stack;
7218
7311
  };
7219
7312
 
7220
- var fails$6 = fails$m;
7313
+ var fails$6 = fails$n;
7221
7314
  var createPropertyDescriptor = createPropertyDescriptor$4;
7222
7315
 
7223
7316
  var errorStackInstallable = !fails$6(function () {
@@ -7382,7 +7475,7 @@ var regexpFlags$1 = function () {
7382
7475
  return result;
7383
7476
  };
7384
7477
 
7385
- var fails$5 = fails$m;
7478
+ var fails$5 = fails$n;
7386
7479
  var global$3 = global$g;
7387
7480
 
7388
7481
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
@@ -7413,7 +7506,7 @@ var regexpStickyHelpers = {
7413
7506
  UNSUPPORTED_Y: UNSUPPORTED_Y$2
7414
7507
  };
7415
7508
 
7416
- var fails$4 = fails$m;
7509
+ var fails$4 = fails$n;
7417
7510
  var global$2 = global$g;
7418
7511
 
7419
7512
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
@@ -7424,7 +7517,7 @@ var regexpUnsupportedDotAll = fails$4(function () {
7424
7517
  return !(re.dotAll && re.test('\n') && re.flags === 's');
7425
7518
  });
7426
7519
 
7427
- var fails$3 = fails$m;
7520
+ var fails$3 = fails$n;
7428
7521
  var global$1 = global$g;
7429
7522
 
7430
7523
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
@@ -7440,7 +7533,7 @@ var regexpUnsupportedNcg = fails$3(function () {
7440
7533
  /* eslint-disable regexp/no-useless-quantifier -- testing */
7441
7534
  var call$4 = functionCall;
7442
7535
  var uncurryThis$3 = functionUncurryThis;
7443
- var toString$3 = toString$7;
7536
+ var toString$3 = toString$8;
7444
7537
  var regexpFlags = regexpFlags$1;
7445
7538
  var stickyHelpers$1 = regexpStickyHelpers;
7446
7539
  var shared = shared$4;
@@ -7568,7 +7661,7 @@ var $ = _export;
7568
7661
  var call$3 = functionCall;
7569
7662
  var isCallable$2 = isCallable$k;
7570
7663
  var anObject$3 = anObject$9;
7571
- var toString$2 = toString$7;
7664
+ var toString$2 = toString$8;
7572
7665
 
7573
7666
  var DELEGATES_TO_EXEC = function () {
7574
7667
  var execCalled = false;
@@ -7602,7 +7695,7 @@ $({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
7602
7695
  var call$2 = functionCall;
7603
7696
  var defineBuiltIn = defineBuiltIn$4;
7604
7697
  var regexpExec$1 = regexpExec$2;
7605
- var fails$2 = fails$m;
7698
+ var fails$2 = fails$n;
7606
7699
  var wellKnownSymbol$1 = wellKnownSymbol$c;
7607
7700
  var createNonEnumerableProperty = createNonEnumerableProperty$8;
7608
7701
 
@@ -7674,7 +7767,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
7674
7767
  };
7675
7768
 
7676
7769
  var uncurryThis$2 = functionUncurryThis;
7677
- var fails$1 = fails$m;
7770
+ var fails$1 = fails$n;
7678
7771
  var isCallable$1 = isCallable$k;
7679
7772
  var classof$1 = classof$4;
7680
7773
  var getBuiltIn = getBuiltIn$6;
@@ -7753,8 +7846,8 @@ var speciesConstructor$1 = function (O, defaultConstructor) {
7753
7846
 
7754
7847
  var uncurryThis$1 = functionUncurryThis;
7755
7848
  var toIntegerOrInfinity = toIntegerOrInfinity$3;
7756
- var toString$1 = toString$7;
7757
- var requireObjectCoercible$1 = requireObjectCoercible$6;
7849
+ var toString$1 = toString$8;
7850
+ var requireObjectCoercible$1 = requireObjectCoercible$7;
7758
7851
 
7759
7852
  var charAt$1 = uncurryThis$1(''.charAt);
7760
7853
  var charCodeAt = uncurryThis$1(''.charCodeAt);
@@ -7822,15 +7915,15 @@ var uncurryThis = functionUncurryThis;
7822
7915
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
7823
7916
  var anObject = anObject$9;
7824
7917
  var isNullOrUndefined = isNullOrUndefined$4;
7825
- var requireObjectCoercible = requireObjectCoercible$6;
7918
+ var requireObjectCoercible = requireObjectCoercible$7;
7826
7919
  var speciesConstructor = speciesConstructor$1;
7827
7920
  var advanceStringIndex = advanceStringIndex$1;
7828
7921
  var toLength = toLength$2;
7829
- var toString = toString$7;
7922
+ var toString = toString$8;
7830
7923
  var getMethod = getMethod$2;
7831
7924
  var regExpExec = regexpExecAbstract;
7832
7925
  var stickyHelpers = regexpStickyHelpers;
7833
- var fails = fails$m;
7926
+ var fails = fails$n;
7834
7927
 
7835
7928
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
7836
7929
  var MAX_UINT32 = 0xFFFFFFFF;
@@ -8424,11 +8517,95 @@ mapListener.startListening({
8424
8517
  })));
8425
8518
  }
8426
8519
  });
8520
+ mapListener.startListening({
8521
+ actionCreator: mapActions.setStepBackwardOrForward,
8522
+ effect: ({
8523
+ payload
8524
+ }, listenerApi) => {
8525
+ const {
8526
+ mapId,
8527
+ isForwardStep
8528
+ } = payload;
8529
+ const timeStep = getMapTimeStep(listenerApi.getState(), mapId);
8530
+ const currentTime = getSelectedTime(listenerApi.getState(), mapId);
8531
+ const [dataStartTime, dataEndTime] = getDataLimitsFromLayers(listenerApi.getState(), mapId);
8532
+ if (dateUtils.isValid(currentTime)) {
8533
+ const makeForwardStep = () => {
8534
+ const nextTime = currentTime + timeStep;
8535
+ const roundedTime = roundWithTimeStep(nextTime, timeStep, 'ceil');
8536
+ const newTime = Math.min(roundedTime, dataEndTime || roundedTime);
8537
+ return dateUtils.fromUnix(newTime).toISOString();
8538
+ };
8539
+ const makeBackwardStep = () => {
8540
+ const nextTime = currentTime - timeStep;
8541
+ const roundedTime = roundWithTimeStep(nextTime, timeStep, 'floor');
8542
+ const newTime = Math.max(roundedTime, dataStartTime || roundedTime);
8543
+ return dateUtils.fromUnix(newTime).toISOString();
8544
+ };
8545
+ const selectedTimeString = isForwardStep ? makeForwardStep() : makeBackwardStep();
8546
+ const isMapAnimating = isAnimating(listenerApi.getState(), mapId);
8547
+ if (isMapAnimating) {
8548
+ listenerApi.dispatch(mapActions.mapStopAnimation({
8549
+ mapId,
8550
+ origin: MapActionOrigin.map
8551
+ }));
8552
+ }
8553
+ const isAutoUpdateOn = isAutoUpdating(listenerApi.getState(), mapId);
8554
+ if (isAutoUpdateOn) {
8555
+ listenerApi.dispatch(mapActions.toggleAutoUpdate({
8556
+ mapId,
8557
+ shouldAutoUpdate: false
8558
+ }));
8559
+ }
8560
+ listenerApi.dispatch(genericActions.setTime({
8561
+ origin: '',
8562
+ sourceId: mapId,
8563
+ value: handleDateUtilsISOString(selectedTimeString)
8564
+ }));
8565
+ }
8566
+ }
8567
+ });
8427
8568
 
8428
- // TODO: This fixes typecheck errors but maybe there is a better way to do that
8429
- createStore({
8430
- extensions: [getSagaExtension()]
8569
+ const serviceListener = createListenerMiddleware();
8570
+ const fetchService = (service, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8571
+ try {
8572
+ const layers = yield getCapabilities.getLayersFlattenedFromService(service.serviceUrl);
8573
+ listenerApi.dispatch(serviceActions.serviceSetLayers(Object.assign(Object.assign({}, service), {
8574
+ layers
8575
+ })));
8576
+ } catch (error) {
8577
+ console.warn(error.message);
8578
+ }
8579
+ });
8580
+ const fetchInitialServices = (payload, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8581
+ if (!payload || !payload.services) {
8582
+ return;
8583
+ }
8584
+ try {
8585
+ payload.services.map(_a => {
8586
+ var {
8587
+ url
8588
+ } = _a,
8589
+ service = __rest(_a, ["url"]);
8590
+ return fetchService(Object.assign(Object.assign({}, service), {
8591
+ serviceUrl: url
8592
+ }), listenerApi);
8593
+ });
8594
+ } catch (error) {
8595
+ // eslint-disable-next-line no-console
8596
+ console.warn(error);
8597
+ }
8431
8598
  });
8599
+ serviceListener.startListening({
8600
+ actionCreator: serviceActions.fetchInitialServices,
8601
+ effect: ({
8602
+ payload
8603
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8604
+ listenerApi.cancelActiveListeners();
8605
+ fetchInitialServices(payload, listenerApi);
8606
+ })
8607
+ });
8608
+
8432
8609
  const mapStoreReducers = {
8433
8610
  webmap: reducer$4,
8434
8611
  services: reducer$2,
@@ -8437,8 +8614,7 @@ const mapStoreReducers = {
8437
8614
  const mapStoreModuleConfig = {
8438
8615
  id: 'webmap-module',
8439
8616
  reducersMap: mapStoreReducers,
8440
- sagas: [rootSaga$2, rootSaga$1],
8441
- middlewares: [metronomeListener.middleware, layersListener.middleware, mapUiListener.middleware, mapListener.middleware]
8617
+ middlewares: [metronomeListener.middleware, layersListener.middleware, mapUiListener.middleware, mapListener.middleware, serviceListener.middleware]
8442
8618
  };
8443
8619
 
8444
8620
  const mapStoreActions = Object.assign(Object.assign(Object.assign({}, layerActions), mapActions), serviceActions);
@@ -8594,23 +8770,22 @@ const getLayerMoveActionsTargets = (state, payload, actionType) => {
8594
8770
  });
8595
8771
  };
8596
8772
  /**
8597
- * These targets are found for the layer/map action SetActiveLayerId. It needs both a target mapId and layerId
8773
+ * These targets are found for the map action SetAutoLayerId. It needs both a target mapId and layerId
8598
8774
  * @param state
8599
8775
  * @param payload
8600
8776
  * @param actionType
8601
8777
  * @returns
8602
8778
  */
8603
- const getSetActiveLayerIdActionsTargets = (state, payload, actionType) => {
8604
- const sourceMapId = getMapIdFromLayerId(state, payload.layerId);
8605
- if (!sourceMapId) {
8606
- return [];
8607
- }
8608
- const foundTargets = findTargets(state, payload, actionType, sourceMapId);
8779
+ const getSetAutoLayerIdActionsTargets = (state, payload, actionType) => {
8780
+ const payloadWithLayerId = Object.assign(Object.assign({}, payload), {
8781
+ layerId: payload.autoUpdateLayerId || payload.autoTimeStepLayerId || payload.layerId
8782
+ });
8783
+ const foundTargets = findTargets(state, payloadWithLayerId, actionType, payload.mapId);
8609
8784
  return foundTargets.map(target => {
8610
8785
  return {
8611
8786
  mapId: target.targetId,
8612
8787
  layerId: target.layerId,
8613
- origin: SyncGroupActionOrigin.activateLayerId
8788
+ origin: SyncGroupActionOrigin.autoLayerId
8614
8789
  };
8615
8790
  });
8616
8791
  };
@@ -8686,6 +8861,105 @@ genericListener.startListening({
8686
8861
  }
8687
8862
  })
8688
8863
  });
8864
+ genericListener.startListening({
8865
+ actionCreator: layerActions.addLayer,
8866
+ effect: ({
8867
+ payload,
8868
+ type
8869
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8870
+ listenerApi.cancelActiveListeners();
8871
+ /* Should not listen to actions from itself */
8872
+ if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
8873
+ return;
8874
+ }
8875
+ const targets = getAddLayerActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
8876
+ if (targets && targets.length > 0) {
8877
+ listenerApi.dispatch(setLayerActionSync(payload, targets, type));
8878
+ }
8879
+ })
8880
+ });
8881
+ genericListener.startListening({
8882
+ actionCreator: layerActions.duplicateMapLayer,
8883
+ effect: ({
8884
+ payload
8885
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8886
+ listenerApi.cancelActiveListeners();
8887
+ const sourceLayer = getLayerById(listenerApi.getState(), payload.oldLayerId);
8888
+ const newPayload = {
8889
+ mapId: payload.mapId,
8890
+ layer: sourceLayer,
8891
+ origin: payload.origin
8892
+ };
8893
+ const targets = getAddLayerActionsTargets(listenerApi.getState(), newPayload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
8894
+ if (targets && targets.length > 0) {
8895
+ listenerApi.dispatch(setLayerActionSync(newPayload, targets, layerActions.addLayer.type));
8896
+ }
8897
+ })
8898
+ });
8899
+ genericListener.startListening({
8900
+ actionCreator: mapActions.layerMoveLayer,
8901
+ effect: ({
8902
+ payload,
8903
+ type
8904
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8905
+ listenerApi.cancelActiveListeners();
8906
+ /* Should not listen to actions from itself */
8907
+ if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
8908
+ return;
8909
+ }
8910
+ const targets = getLayerMoveActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
8911
+ if (targets && targets.length > 0) {
8912
+ listenerApi.dispatch(setLayerActionSync(payload, targets, type));
8913
+ }
8914
+ })
8915
+ });
8916
+ genericListener.startListening({
8917
+ matcher: isAnyOf(mapActions.setAutoLayerId, mapActions.setAutoUpdateLayerId, mapActions.setAutoTimestepLayerId),
8918
+ effect: ({
8919
+ payload,
8920
+ type
8921
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8922
+ listenerApi.cancelActiveListeners();
8923
+ const targets = getSetAutoLayerIdActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
8924
+ if (targets && targets.length > 0) {
8925
+ listenerApi.dispatch(setLayerActionSync(payload, targets, type));
8926
+ }
8927
+ })
8928
+ });
8929
+ genericListener.startListening({
8930
+ actionCreator: layerActions.setBaseLayers,
8931
+ effect: ({
8932
+ payload,
8933
+ type
8934
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8935
+ listenerApi.cancelActiveListeners();
8936
+ /* Should not listen to actions from itself */
8937
+ if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
8938
+ return;
8939
+ }
8940
+ const targets = getMapBaseLayerActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
8941
+ if (targets && targets.length > 0) {
8942
+ listenerApi.dispatch(setLayerActionSync(payload, targets, type));
8943
+ }
8944
+ })
8945
+ });
8946
+ genericListener.startListening({
8947
+ actionCreator: layerActions.layerDelete,
8948
+ effect: ({
8949
+ payload,
8950
+ type
8951
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8952
+ listenerApi.cancelActiveListeners();
8953
+ /* Should not listen to actions from itself */
8954
+ if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
8955
+ return;
8956
+ }
8957
+ const targets = getLayerDeleteActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
8958
+ if (targets && targets.length > 0) {
8959
+ listenerApi.dispatch(setLayerActionSync(payload, targets, type));
8960
+ }
8961
+ })
8962
+ });
8689
8963
 
8690
8964
  /* *
8691
8965
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -8903,7 +9177,7 @@ const slice = createSlice({
8903
9177
  draft,
8904
9178
  // eslint-disable-next-line no-unused-vars
8905
9179
  action) => {
8906
- // action caught in drawingTool/sagas
9180
+ // action caught in drawingTool/listener
8907
9181
  }
8908
9182
  },
8909
9183
  extraReducers: builder => {
@@ -9027,7 +9301,7 @@ var selectors = /*#__PURE__*/Object.freeze({
9027
9301
  });
9028
9302
 
9029
9303
  const drawingToolListener = createListenerMiddleware();
9030
- const registerOrigin = 'drawings saga:registerDrawToolSaga';
9304
+ const registerOrigin = 'drawings listener:registerDrawToolListener';
9031
9305
  // register draw tool
9032
9306
  drawingToolListener.startListening({
9033
9307
  actionCreator: drawtoolActions.registerDrawTool,
@@ -9199,7 +9473,7 @@ drawingToolListener.startListening({
9199
9473
  }));
9200
9474
  } catch (error) {
9201
9475
  // eslint-disable-next-line no-console
9202
- console.log('error changeDrawToolSaga', error);
9476
+ console.log('error changeDrawToolListener', error);
9203
9477
  }
9204
9478
  })
9205
9479
  });
@@ -9544,107 +9818,6 @@ var storeTestUtils = /*#__PURE__*/Object.freeze({
9544
9818
  webmapStateWithAddedLayer: webmapStateWithAddedLayer
9545
9819
  });
9546
9820
 
9547
- /* *
9548
- * Licensed under the Apache License, Version 2.0 (the "License");
9549
- * you may not use this file except in compliance with the License.
9550
- * You may obtain a copy of the License at
9551
- *
9552
- * http://www.apache.org/licenses/LICENSE-2.0
9553
- *
9554
- * Unless required by applicable law or agreed to in writing, software
9555
- * distributed under the License is distributed on an "AS IS" BASIS,
9556
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9557
- * See the License for the specific language governing permissions and
9558
- * limitations under the License.
9559
- *
9560
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9561
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
9562
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9563
- * */
9564
- function* addLayerActionsSaga({
9565
- payload,
9566
- type
9567
- }) {
9568
- /* Should not listen to actions from itself */
9569
- if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
9570
- return;
9571
- }
9572
- const targets = yield select(getAddLayerActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
9573
- if (targets && targets.length > 0) {
9574
- yield put(setLayerActionSync(payload, targets, type));
9575
- }
9576
- }
9577
- function* duplicateMapLayerActionsSaga({
9578
- payload
9579
- }) {
9580
- const sourceLayer = yield select(getLayerById, payload.oldLayerId);
9581
- const newPayload = {
9582
- mapId: payload.mapId,
9583
- layer: sourceLayer,
9584
- origin: payload.origin
9585
- };
9586
- const targets = yield select(getAddLayerActionsTargets, newPayload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
9587
- if (targets && targets.length > 0) {
9588
- yield put(setLayerActionSync(newPayload, targets, layerActions.addLayer.type));
9589
- }
9590
- }
9591
- function* deleteLayerActionsSaga({
9592
- payload,
9593
- type
9594
- }) {
9595
- /* Should not listen to actions from itself */
9596
- if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
9597
- return;
9598
- }
9599
- const targets = yield select(getLayerDeleteActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
9600
- if (targets && targets.length > 0) {
9601
- yield put(setLayerActionSync(payload, targets, type));
9602
- }
9603
- }
9604
- function* moveLayerActionsSaga({
9605
- payload,
9606
- type
9607
- }) {
9608
- /* Should not listen to actions from itself */
9609
- if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
9610
- return;
9611
- }
9612
- const targets = yield select(getLayerMoveActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
9613
- if (targets && targets.length > 0) {
9614
- yield put(setLayerActionSync(payload, targets, type));
9615
- }
9616
- }
9617
- function* setAutoLayerIdActionsSaga({
9618
- payload,
9619
- type
9620
- }) {
9621
- const targets = yield select(getSetActiveLayerIdActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
9622
- if (targets && targets.length > 0) {
9623
- yield put(setLayerActionSync(payload, targets, type));
9624
- }
9625
- }
9626
- function* mapBaseLayerActionsSaga({
9627
- payload,
9628
- type
9629
- }) {
9630
- /* Should not listen to actions from itself */
9631
- if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
9632
- return;
9633
- }
9634
- const targets = yield select(getMapBaseLayerActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
9635
- if (targets && targets.length > 0) {
9636
- yield put(setLayerActionSync(payload, targets, type));
9637
- }
9638
- }
9639
- function* rootSaga() {
9640
- yield takeLatest(layerActions.layerDelete.type, deleteLayerActionsSaga);
9641
- yield takeLatest(layerActions.addLayer.type, addLayerActionsSaga);
9642
- yield takeLatest(layerActions.duplicateMapLayer.type, duplicateMapLayerActionsSaga);
9643
- yield takeLatest(mapActions.layerMoveLayer.type, moveLayerActionsSaga);
9644
- yield takeLatest(mapActions.setAutoLayerId.type, setAutoLayerIdActionsSaga);
9645
- yield takeLatest(layerActions.setBaseLayers.type, mapBaseLayerActionsSaga);
9646
- }
9647
-
9648
9821
  /* *
9649
9822
  * Licensed under the Apache License, Version 2.0 (the "License");
9650
9823
  * you may not use this file except in compliance with the License.
@@ -9717,7 +9890,6 @@ const synchronizationGroupConfig = {
9717
9890
  syncronizationGroupStore: reducer$3,
9718
9891
  loadingIndicatorStore: loadingIndicatorReducer
9719
9892
  },
9720
- sagas: [rootSaga],
9721
9893
  middlewares: [genericListener.middleware, syncGroupsListener.middleware]
9722
9894
  };
9723
9895
 
@@ -9764,9 +9936,7 @@ const uiModuleConfig = {
9764
9936
  * */
9765
9937
  const coreModuleConfig = [mapStoreModuleConfig, synchronizationGroupConfig, uiModuleConfig, drawtoolModuleConfig];
9766
9938
 
9767
- const createCustomStore = () => createStore({
9768
- extensions: [getSagaExtension({})]
9769
- });
9939
+ const createCustomStore = () => createStore();
9770
9940
  const WrapperWithModules = withEggs(coreModuleConfig)(({
9771
9941
  children
9772
9942
  }) => children);
@@ -9787,4 +9957,4 @@ const StoreProvider = ({
9787
9957
  })
9788
9958
  }));
9789
9959
 
9790
- export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createCustomStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$4 as genericSelectors, types$1 as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, initialState$3 as initialState, layerActions, reducer$6 as layerReducer, selectors$7 as layerSelectors, types$5 as layerTypes, utils$2 as layerUtils, loadingIndicatorActions, constants as loadingIndicatorConstants, loadingIndicatorReducer, selectors$3 as loadingIndicatorSelectors, mapActions, enums as mapEnums, rootSaga$2 as mapSaga, selectors$2 as mapSelectors, mapStoreActions, mapStoreModuleConfig, mapStoreReducers, types$4 as mapTypes, mapUtils, routerActions, routerModuleConfig, utils as routerUtils, selectorMemoizationOptions, serviceActions, selectors$1 as serviceSelectors, types as serviceTypes, setUserAddedServices, storeTestSettings, storeTestUtils, utils$1 as storeUtils, constants$1 as syncConstants, actions as syncGroupsActions, reducer$3 as syncGroupsReducer, selector as syncGroupsSelector, selectors$5 as syncGroupsSelectors, types$2 as syncGroupsTypes, types$2 as types, uiActions, uiModuleConfig, reducer$5 as uiReducer, selectors$6 as uiSelectors, types$3 as uiTypes, useSetupDialog, reducer$4 as webmapReducer };
9960
+ export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createCustomStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$4 as genericSelectors, types$1 as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, initialState$3 as initialState, layerActions, reducer$6 as layerReducer, selectors$7 as layerSelectors, types$5 as layerTypes, utils$2 as layerUtils, loadingIndicatorActions, constants as loadingIndicatorConstants, loadingIndicatorReducer, selectors$3 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, selectors$2 as mapSelectors, mapStoreActions, mapStoreModuleConfig, mapStoreReducers, types$4 as mapTypes, mapUtils, routerActions, routerModuleConfig, utils as routerUtils, selectorMemoizationOptions, serviceActions, selectors$1 as serviceSelectors, types as serviceTypes, setUserAddedServices, storeTestSettings, storeTestUtils, utils$1 as storeUtils, constants$1 as syncConstants, actions as syncGroupsActions, reducer$3 as syncGroupsReducer, selector as syncGroupsSelector, selectors$5 as syncGroupsSelectors, types$2 as syncGroupsTypes, types$2 as types, uiActions, uiModuleConfig, reducer$5 as uiReducer, selectors$6 as uiSelectors, types$3 as uiTypes, useSetupDialog, reducer$4 as webmapReducer };