@opengeoweb/core 4.19.1 → 4.21.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.
Files changed (52) hide show
  1. package/index.esm.js +1884 -847
  2. package/index.umd.js +1992 -930
  3. package/lib/components/ComponentsLookUp/componentsLookUp.d.ts +1 -1
  4. package/lib/components/LayerManager/DockedLayerManagerConnect.d.ts +2 -1
  5. package/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRow.d.ts +1 -0
  6. package/lib/components/LayerManager/LayerManager.d.ts +1 -1
  7. package/lib/components/LayerManager/LayerManagerConnect.d.ts +2 -1
  8. package/lib/components/LayerManager/LayerManagerHeaderOptions.d.ts +21 -0
  9. package/lib/components/LayerManager/LayerManagerHeaderOptionsConnect.d.ts +2 -1
  10. package/lib/components/LayerManager/LayerManagerUtils.d.ts +20 -1
  11. package/lib/components/LayerManager/index.d.ts +1 -0
  12. package/lib/components/MapControls/MapControlButton.d.ts +2 -3
  13. package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +1 -2
  14. package/lib/components/TimeSliderLite/TimeSliderLite.d.ts +36 -0
  15. package/lib/components/TimeSliderLite/TimeSliderLite.stories.d.ts +9 -0
  16. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderDraggableNeedle.d.ts +20 -0
  17. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderDraggableNeedle.spec.d.ts +1 -0
  18. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderLiteBackground.d.ts +17 -0
  19. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderLiteBackgroundSvg.d.ts +13 -0
  20. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderLiteBackgroundSvg.spec.d.ts +1 -0
  21. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/ControlButtonGroup/ControlButtonGroup.d.ts +8 -0
  22. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/HideButton/HideButton.d.ts +9 -0
  23. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/MenuButton/MenuButton.d.ts +9 -0
  24. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/PlayButton/PlayButton.d.ts +11 -0
  25. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/StepButton/StepButton.d.ts +11 -0
  26. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/TimeSliderLiteButtonUtils.d.ts +3 -0
  27. package/lib/components/TimeSliderLite/TimeSliderLiteConnect.d.ts +20 -0
  28. package/lib/components/TimeSliderLite/TimeSliderLiteConnect.spec.d.ts +1 -0
  29. package/lib/components/TimeSliderLite/TimeSliderLiteConnect.stories.d.ts +9 -0
  30. package/lib/components/TimeSliderLite/TimeSliderLiteOptionsMenu/SubmenuWrapper.d.ts +8 -0
  31. package/lib/components/TimeSliderLite/TimeSliderLiteOptionsMenu/SubmenuWrapper.spec.d.ts +1 -0
  32. package/lib/components/TimeSliderLite/TimeSliderLiteOptionsMenu/TimeRangeOptions/DayHourSelector.d.ts +21 -0
  33. package/lib/components/TimeSliderLite/TimeSliderLiteOptionsMenu/TimeRangeOptions/DayHourSelector.spec.d.ts +1 -0
  34. package/lib/components/TimeSliderLite/TimeSliderLiteOptionsMenu/TimeRangeOptions/TimeRangeOptions.d.ts +15 -0
  35. package/lib/components/TimeSliderLite/TimeSliderLiteOptionsMenu/TimeSliderLiteOptionsMenu.d.ts +27 -0
  36. package/lib/components/TimeSliderLite/TimeSliderLiteOptionsMenu/TimeSliderLiteOptionsMenu.spec.d.ts +1 -0
  37. package/lib/components/TimeSliderLite/index.d.ts +4 -0
  38. package/lib/components/TimeSliderLite/timeSliderLiteUtils.d.ts +83 -0
  39. package/lib/components/TimeSliderLite/timeSliderLiteUtils.spec.d.ts +1 -0
  40. package/lib/index.d.ts +5 -4
  41. package/lib/store/generic/synchronizationGroups/selectors.d.ts +2 -1
  42. package/lib/store/generic/synchronizationGroups/types.d.ts +4 -4
  43. package/lib/store/mapStore/layers/reducer.d.ts +2 -2
  44. package/lib/store/mapStore/layers/types.d.ts +0 -2
  45. package/lib/store/mapStore/map/index.d.ts +1 -1
  46. package/lib/store/mapStore/utils/helpers.d.ts +1 -0
  47. package/lib/store/ui/index.d.ts +1 -1
  48. package/lib/utils/sanitizeHTML.d.ts +3 -0
  49. package/lib/utils/sanitizeHTML.spec.d.ts +1 -0
  50. package/package.json +11 -10
  51. package/lib/components/LayerManager/LayerSelect/LayerList/SearchHighlight.d.ts +0 -7
  52. /package/lib/components/{LayerManager/LayerSelect/LayerList/SearchHighlight.spec.d.ts → TimeSliderLite/TimeSliderLite.spec.d.ts} +0 -0
package/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@mui/material'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('sortablejs'), require('react-window'), require('@mui/material/Box'), require('@mui/material/Typography'), require('@mui/material/Grid'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('@mui/system'), require('react-resize-detector'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('react-draggable'), require('re-resizable'), require('axios'), require('@opengeoweb/api'), require('@redux-eggs/redux-toolkit'), require('@redux-eggs/saga-extension'), require('react-router-dom')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@opengeoweb/shared', '@opengeoweb/theme', '@mui/material', '@opengeoweb/webmap', 'react-sortablejs', 'sortablejs', 'react-window', '@mui/material/Box', '@mui/material/Typography', '@mui/material/Grid', '@opengeoweb/form-fields', 'react-hook-form', '@mui/system', 'react-resize-detector', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'react-draggable', 're-resizable', 'axios', '@opengeoweb/api', '@redux-eggs/redux-toolkit', '@redux-eggs/saga-extension', 'react-router-dom'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.shared, global.theme, global.material, global.webmap, global.reactSortablejs, global.Sortable, global.reactWindow, global.Box, global.Typography, global.Grid, global.formFields, global.reactHookForm, global.system, global.reactResizeDetector, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.Draggable, global.reResizable, global.axios, global.api, global.reduxToolkit, global.sagaExtension, global.reactRouterDom));
5
- })(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, shared, theme, material, webmap, reactSortablejs, Sortable, reactWindow, Box, Typography, Grid, formFields, reactHookForm, system, reactResizeDetector, throttleDebounce, cloneDeep, proj4, turf, Draggable, reResizable, axios, api, reduxToolkit, sagaExtension, reactRouterDom) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('lodash'), require('immer'), require('moment'), require('react'), require('redux-saga/effects'), require('react-redux'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@mui/material'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('sortablejs'), require('react-window'), require('@mui/material/Box'), require('@mui/material/Typography'), require('@mui/material/Grid'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('@mui/system'), require('react-resize-detector'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('react-draggable'), require('re-resizable'), require('axios'), require('@opengeoweb/api'), require('dompurify'), require('@redux-eggs/redux-toolkit'), require('@redux-eggs/saga-extension'), require('react-router-dom')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'lodash', 'immer', 'moment', 'react', 'redux-saga/effects', 'react-redux', '@opengeoweb/shared', '@opengeoweb/theme', '@mui/material', '@opengeoweb/webmap', 'react-sortablejs', 'sortablejs', 'react-window', '@mui/material/Box', '@mui/material/Typography', '@mui/material/Grid', '@opengeoweb/form-fields', 'react-hook-form', '@mui/system', 'react-resize-detector', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'react-draggable', 're-resizable', 'axios', '@opengeoweb/api', 'dompurify', '@redux-eggs/redux-toolkit', '@redux-eggs/saga-extension', 'react-router-dom'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global._, global.produce, global.moment, global.React, global.effects, global.reactRedux, global.shared, global.theme, global.material, global.webmap, global.reactSortablejs, global.Sortable, global.reactWindow, global.Box, global.Typography, global.Grid, global.formFields, global.reactHookForm, global.system, global.reactResizeDetector, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.Draggable, global.reResizable, global.axios, global.api, global.DOMPurify, global.reduxToolkit, global.sagaExtension, global.reactRouterDom));
5
+ })(this, (function (exports, toolkit, _, produce, moment, React, effects, reactRedux, shared, theme, material, webmap, reactSortablejs, Sortable, reactWindow, Box, Typography, Grid, formFields, reactHookForm, system, reactResizeDetector, throttleDebounce, cloneDeep, proj4, turf, Draggable, reResizable, axios, api, DOMPurify, reduxToolkit, sagaExtension, reactRouterDom) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -24,11 +24,11 @@
24
24
  return Object.freeze(n);
25
25
  }
26
26
 
27
+ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
27
28
  var produce__default = /*#__PURE__*/_interopDefaultLegacy(produce);
28
29
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
29
30
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
31
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
- var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
32
32
  var Sortable__default = /*#__PURE__*/_interopDefaultLegacy(Sortable);
33
33
  var Box__default = /*#__PURE__*/_interopDefaultLegacy(Box);
34
34
  var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
@@ -38,6 +38,7 @@
38
38
  var turf__namespace = /*#__PURE__*/_interopNamespace(turf);
39
39
  var Draggable__default = /*#__PURE__*/_interopDefaultLegacy(Draggable);
40
40
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
41
+ var DOMPurify__namespace = /*#__PURE__*/_interopNamespace(DOMPurify);
41
42
 
42
43
  /*! *****************************************************************************
43
44
  Copyright (c) Microsoft Corporation.
@@ -186,38 +187,68 @@
186
187
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
187
188
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
188
189
  * */
189
- var LayerType;
190
-
191
- (function (LayerType) {
192
- LayerType["mapLayer"] = "mapLayer";
193
- LayerType["baseLayer"] = "baseLayer";
194
- LayerType["overLayer"] = "overLayer";
195
- })(LayerType || (LayerType = {}));
196
-
197
- var LayerStatus;
198
-
199
- (function (LayerStatus) {
200
- LayerStatus["default"] = "default";
201
- LayerStatus["error"] = "error";
202
- })(LayerStatus || (LayerStatus = {}));
203
-
204
- var LayerActionOrigin;
190
+ var initialState$8 = {
191
+ byId: {},
192
+ allIds: []
193
+ };
194
+ var slice$8 = toolkit.createSlice({
195
+ initialState: initialState$8,
196
+ name: 'serviceReducer',
197
+ reducers: {
198
+ serviceSetLayers: function serviceSetLayers(draft, action) {
199
+ var id = action.payload.id;
200
+ draft.byId[id] = __assign({}, action.payload);
205
201
 
206
- (function (LayerActionOrigin) {
207
- LayerActionOrigin["layerManager"] = "layerManager";
208
- LayerActionOrigin["wmsLoader"] = "WMSLayerTreeConnect";
209
- LayerActionOrigin["ReactMapViewParseLayer"] = "ReactMapViewParseLayer";
210
- LayerActionOrigin["setLayerDimensionSaga"] = "setLayerDimensionSaga";
211
- LayerActionOrigin["toggleAutoUpdateSaga"] = "toggleAutoUpdateSaga";
212
- LayerActionOrigin["unregisterMapSaga"] = "unregisterMapSaga";
213
- })(LayerActionOrigin || (LayerActionOrigin = {}));
202
+ if (!draft.allIds.includes(id)) {
203
+ draft.allIds.push(id);
204
+ }
205
+ },
206
+ mapStoreRemoveService: function mapStoreRemoveService(draft, action) {
207
+ var foundServiceIndex = draft.allIds.findIndex(function (id) {
208
+ return draft.byId[id].serviceUrl === action.payload.serviceUrl;
209
+ });
214
210
 
215
- var types$3 = /*#__PURE__*/Object.freeze({
216
- __proto__: null,
217
- get LayerType () { return LayerType; },
218
- get LayerStatus () { return LayerStatus; },
219
- get LayerActionOrigin () { return LayerActionOrigin; }
211
+ if (foundServiceIndex !== -1) {
212
+ var serviceId_1 = draft.allIds[foundServiceIndex];
213
+ draft.allIds = draft.allIds.filter(function (id) {
214
+ return id !== serviceId_1;
215
+ });
216
+ delete draft.byId[serviceId_1];
217
+ }
218
+ },
219
+ fetchInitialServices: function fetchInitialServices( // eslint-disable-next-line no-unused-vars
220
+ draft, // eslint-disable-next-line no-unused-vars
221
+ action) {}
222
+ }
220
223
  });
224
+ var reducer$8 = slice$8.reducer;
225
+ var serviceActions = slice$8.actions;
226
+
227
+ /* *
228
+ * Licensed under the Apache License, Version 2.0 (the "License");
229
+ * you may not use this file except in compliance with the License.
230
+ * You may obtain a copy of the License at
231
+ *
232
+ * http://www.apache.org/licenses/LICENSE-2.0
233
+ *
234
+ * Unless required by applicable law or agreed to in writing, software
235
+ * distributed under the License is distributed on an "AS IS" BASIS,
236
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237
+ * See the License for the specific language governing permissions and
238
+ * limitations under the License.
239
+ *
240
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
241
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
242
+ * */
243
+ var selectorMemoizationOptions = {
244
+ memoizeOptions: {
245
+ maxSize: 1000,
246
+ resultEqualityCheck: _.isEqual
247
+ }
248
+ };
249
+ var isUserAddedService = function isUserAddedService(scope) {
250
+ return scope === 'user';
251
+ };
221
252
 
222
253
  /* *
223
254
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -235,38 +266,123 @@
235
266
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
236
267
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
237
268
  * */
238
- var Scale;
239
269
 
240
- (function (Scale) {
241
- Scale[Scale["Minutes5"] = 0] = "Minutes5";
242
- Scale[Scale["Hour"] = 1] = "Hour";
243
- Scale[Scale["Hours3"] = 2] = "Hours3";
244
- Scale[Scale["Hours6"] = 3] = "Hours6";
245
- Scale[Scale["Day"] = 4] = "Day";
246
- Scale[Scale["Week"] = 5] = "Week";
247
- Scale[Scale["Month"] = 6] = "Month";
248
- Scale[Scale["Year"] = 7] = "Year";
249
- Scale[Scale["DataScale"] = 8] = "DataScale";
250
- })(Scale || (Scale = {}));
270
+ var servicesStore = function servicesStore(store) {
271
+ return store && store.services ? store.services : null;
272
+ };
273
+ /**
274
+ * Retrieves all serviceIds
275
+ *
276
+ * Example: serviceIds = getServiceIds(store)
277
+ * @param {object} store store: object - object from which the service state will be extracted
278
+ * @returns {array} returnType: array - an array of all serviceIds
279
+ */
251
280
 
252
- var AnimationLength;
253
281
 
254
- (function (AnimationLength) {
255
- AnimationLength[AnimationLength["Minutes15"] = 15] = "Minutes15";
256
- AnimationLength[AnimationLength["Minutes30"] = 30] = "Minutes30";
257
- AnimationLength[AnimationLength["Hours1"] = 60] = "Hours1";
258
- AnimationLength[AnimationLength["Hours2"] = 120] = "Hours2";
259
- AnimationLength[AnimationLength["Hours3"] = 180] = "Hours3";
260
- AnimationLength[AnimationLength["Hours6"] = 360] = "Hours6";
261
- AnimationLength[AnimationLength["Hours12"] = 720] = "Hours12";
262
- AnimationLength[AnimationLength["Hours24"] = 1440] = "Hours24";
263
- })(AnimationLength || (AnimationLength = {}));
282
+ var getServiceIds = toolkit.createSelector(servicesStore, function (serviceState) {
283
+ return serviceState ? serviceState.allIds : [];
284
+ }, selectorMemoizationOptions);
285
+ /**
286
+ * Gets map services
287
+ *
288
+ * Example: services = getServices(store)
289
+ * @param {object} store store: object - Store object
290
+ * @returns {object} returnType: ServiceState
291
+ */
264
292
 
265
- var MapActionOrigin;
293
+ var getServices = toolkit.createSelector(servicesStore, function (store) {
294
+ return store ? store.byId : {};
295
+ }, selectorMemoizationOptions);
296
+ /**
297
+ * Gets the service object by its url
298
+ *
299
+ * Example: service = getServiceByName(store, 'serviceName')
300
+ * @param {object} store store: object - Store object
301
+ * @returns {ReduxService} returnType: Service
302
+ */
266
303
 
267
- (function (MapActionOrigin) {
268
- MapActionOrigin["map"] = "map";
269
- })(MapActionOrigin || (MapActionOrigin = {}));
304
+ var getServiceByName = toolkit.createSelector([servicesStore, function (state, serviceUrl) {
305
+ return serviceUrl;
306
+ }], function (serviceState, serviceUrl) {
307
+ var foundServiceIndex = serviceState.allIds.findIndex(function (id) {
308
+ return serviceState.byId[id].serviceUrl === serviceUrl;
309
+ });
310
+ /* Add the service based on a url */
311
+
312
+ var id = foundServiceIndex !== -1 ? serviceState.allIds[foundServiceIndex] : null;
313
+
314
+ if (serviceState && serviceState.byId && serviceState.byId[id]) {
315
+ return serviceState.byId[id];
316
+ }
317
+
318
+ return null;
319
+ }, selectorMemoizationOptions);
320
+ /**
321
+ * Gets the layer from the store using the serviceUrl and layerName
322
+ *
323
+ * Example: layers = getLayersFromService(store, 'https://geoservices.knmi.nl/...')
324
+ * @param {object} store store: object - object from which the layers state will be extracted
325
+ * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
326
+ * @returns {array} returnType: ServiceLayer[] - All layers within the service object.
327
+ */
328
+
329
+ var getLayersFromService$1 = toolkit.createSelector(getServiceByName, function (service) {
330
+ return service && service.layers || null;
331
+ }, selectorMemoizationOptions);
332
+ /**
333
+ * Gets the layer from the store using the serviceUrl and layerName
334
+ *
335
+ * Example: layer = getLayerFromService(store, 'https://geoservices.knmi.nl/...', 'radar')
336
+ * @param {object} store store: object - The application store
337
+ * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
338
+ * @param {string} layerName layerName: string - Name of the layer in the service
339
+ * @returns {ServiceLayer} returnType: ServiceLayer - The layer from the service object.
340
+ */
341
+
342
+ var getLayerFromService = toolkit.createSelector(function (store, serviceUrl) {
343
+ return getLayersFromService$1(store, serviceUrl);
344
+ }, function (store, serviceUrl) {
345
+ return serviceUrl;
346
+ }, function (store, serviceUrl, layerName) {
347
+ return layerName;
348
+ }, function (layers, serviceUrl, layerName) {
349
+ if (!layers) {
350
+ return null;
351
+ }
352
+
353
+ var index = layers.findIndex(function (serviceLayer) {
354
+ return serviceLayer.name === layerName;
355
+ });
356
+
357
+ if (index === -1) {
358
+ return null;
359
+ }
360
+
361
+ return layers[index];
362
+ }, selectorMemoizationOptions);
363
+ /**
364
+ * Gets the layers stylelist from the servicestore using the serviceUrl and layerName
365
+ *
366
+ * Example: layerStyles = getLayerStyles(store, layerService, layerName);
367
+ * @param {object} store store: object - store from which the layers state will be extracted
368
+ * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
369
+ * @param {string} layerName layerName: string - Name of the layer in the service
370
+ * @returns {array} returnType: Style[] - array containing layer styles
371
+ */
372
+
373
+ var getLayerStyles$1 = toolkit.createSelector(getLayerFromService, function (layer) {
374
+ return layer && layer.styles ? layer.styles : [];
375
+ }, selectorMemoizationOptions);
376
+
377
+ var selectors$5 = /*#__PURE__*/Object.freeze({
378
+ __proto__: null,
379
+ getServiceIds: getServiceIds,
380
+ getServices: getServices,
381
+ getServiceByName: getServiceByName,
382
+ getLayersFromService: getLayersFromService$1,
383
+ getLayerFromService: getLayerFromService,
384
+ getLayerStyles: getLayerStyles$1
385
+ });
270
386
 
271
387
  /* *
272
388
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -329,6 +445,16 @@
329
445
  delete registeredWMLayersForReactLayerId[layerId];
330
446
  }
331
447
  };
448
+ var unRegisterAllWMJSLayersAndMaps = function unRegisterAllWMJSLayersAndMaps() {
449
+ var allLayerIds = Object.values(registeredWMLayersForReactLayerId);
450
+ allLayerIds.forEach(function (layerId) {
451
+ unRegisterWMJSLayer(layerId);
452
+ });
453
+ var allMapIds = Object.values(registeredWMMapForReactMapId);
454
+ allMapIds.forEach(function (mapId) {
455
+ unRegisterWMJSMap(mapId);
456
+ });
457
+ };
332
458
  /**
333
459
  * Map for registering wmlayers with their id's
334
460
  */
@@ -509,27 +635,125 @@
509
635
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
510
636
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
511
637
  * */
638
+ var Scale;
512
639
 
513
- var types$2 = /*#__PURE__*/Object.freeze({
514
- __proto__: null,
515
- get Scale () { return Scale; },
516
- get AnimationLength () { return AnimationLength; },
517
- get MapActionOrigin () { return MapActionOrigin; },
518
- get LayerType () { return LayerType; },
519
- get LayerStatus () { return LayerStatus; },
520
- get LayerActionOrigin () { return LayerActionOrigin; }
521
- });
522
-
523
- var millisecondsInSecond = 1000;
524
- var defaultAnimationDelayAtStart = 250;
525
- var defaultDelay = 1000; // [ms]
526
-
527
- var defaultTimeStep = 5;
528
- var speedFactors = [0.1, 0.2, 0.5, 1, 2, 4, 8, 16]; // Declares available animation speed multipliers for default delay
640
+ (function (Scale) {
641
+ Scale[Scale["Minutes5"] = 0] = "Minutes5";
642
+ Scale[Scale["Hour"] = 1] = "Hour";
643
+ Scale[Scale["Hours3"] = 2] = "Hours3";
644
+ Scale[Scale["Hours6"] = 3] = "Hours6";
645
+ Scale[Scale["Day"] = 4] = "Day";
646
+ Scale[Scale["Week"] = 5] = "Week";
647
+ Scale[Scale["Month"] = 6] = "Month";
648
+ Scale[Scale["Year"] = 7] = "Year";
649
+ Scale[Scale["DataScale"] = 8] = "DataScale";
650
+ })(Scale || (Scale = {}));
529
651
 
530
- /**
531
- * Returns speed delay for given speedFactor. For options, see defined above in "speedFactors"
532
- */
652
+ var AnimationLength;
653
+
654
+ (function (AnimationLength) {
655
+ AnimationLength[AnimationLength["Minutes15"] = 15] = "Minutes15";
656
+ AnimationLength[AnimationLength["Minutes30"] = 30] = "Minutes30";
657
+ AnimationLength[AnimationLength["Hours1"] = 60] = "Hours1";
658
+ AnimationLength[AnimationLength["Hours2"] = 120] = "Hours2";
659
+ AnimationLength[AnimationLength["Hours3"] = 180] = "Hours3";
660
+ AnimationLength[AnimationLength["Hours6"] = 360] = "Hours6";
661
+ AnimationLength[AnimationLength["Hours12"] = 720] = "Hours12";
662
+ AnimationLength[AnimationLength["Hours24"] = 1440] = "Hours24";
663
+ })(AnimationLength || (AnimationLength = {}));
664
+
665
+ var MapActionOrigin;
666
+
667
+ (function (MapActionOrigin) {
668
+ MapActionOrigin["map"] = "map";
669
+ })(MapActionOrigin || (MapActionOrigin = {}));
670
+
671
+ /* *
672
+ * Licensed under the Apache License, Version 2.0 (the "License");
673
+ * you may not use this file except in compliance with the License.
674
+ * You may obtain a copy of the License at
675
+ *
676
+ * http://www.apache.org/licenses/LICENSE-2.0
677
+ *
678
+ * Unless required by applicable law or agreed to in writing, software
679
+ * distributed under the License is distributed on an "AS IS" BASIS,
680
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
681
+ * See the License for the specific language governing permissions and
682
+ * limitations under the License.
683
+ *
684
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
685
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
686
+ * */
687
+ var LayerType;
688
+
689
+ (function (LayerType) {
690
+ LayerType["mapLayer"] = "mapLayer";
691
+ LayerType["baseLayer"] = "baseLayer";
692
+ LayerType["overLayer"] = "overLayer";
693
+ })(LayerType || (LayerType = {}));
694
+
695
+ var LayerStatus;
696
+
697
+ (function (LayerStatus) {
698
+ LayerStatus["default"] = "default";
699
+ LayerStatus["error"] = "error";
700
+ })(LayerStatus || (LayerStatus = {}));
701
+
702
+ var LayerActionOrigin;
703
+
704
+ (function (LayerActionOrigin) {
705
+ LayerActionOrigin["layerManager"] = "layerManager";
706
+ LayerActionOrigin["wmsLoader"] = "WMSLayerTreeConnect";
707
+ LayerActionOrigin["ReactMapViewParseLayer"] = "ReactMapViewParseLayer";
708
+ LayerActionOrigin["setLayerDimensionSaga"] = "setLayerDimensionSaga";
709
+ LayerActionOrigin["toggleAutoUpdateSaga"] = "toggleAutoUpdateSaga";
710
+ LayerActionOrigin["unregisterMapSaga"] = "unregisterMapSaga";
711
+ })(LayerActionOrigin || (LayerActionOrigin = {}));
712
+
713
+ var types$3 = /*#__PURE__*/Object.freeze({
714
+ __proto__: null,
715
+ get LayerType () { return LayerType; },
716
+ get LayerStatus () { return LayerStatus; },
717
+ get LayerActionOrigin () { return LayerActionOrigin; }
718
+ });
719
+
720
+ /* *
721
+ * Licensed under the Apache License, Version 2.0 (the "License");
722
+ * you may not use this file except in compliance with the License.
723
+ * You may obtain a copy of the License at
724
+ *
725
+ * http://www.apache.org/licenses/LICENSE-2.0
726
+ *
727
+ * Unless required by applicable law or agreed to in writing, software
728
+ * distributed under the License is distributed on an "AS IS" BASIS,
729
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
730
+ * See the License for the specific language governing permissions and
731
+ * limitations under the License.
732
+ *
733
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
734
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
735
+ * */
736
+
737
+ var types$2 = /*#__PURE__*/Object.freeze({
738
+ __proto__: null,
739
+ get Scale () { return Scale; },
740
+ get AnimationLength () { return AnimationLength; },
741
+ get MapActionOrigin () { return MapActionOrigin; },
742
+ get LayerType () { return LayerType; },
743
+ get LayerStatus () { return LayerStatus; },
744
+ get LayerActionOrigin () { return LayerActionOrigin; }
745
+ });
746
+
747
+ var millisecondsInSecond = 1000;
748
+ var defaultAnimationDelayAtStart = 250;
749
+ var defaultDelay = 1000; // [ms]
750
+
751
+ var defaultTimeStep = 5;
752
+ var speedFactors = [0.1, 0.2, 0.5, 1, 2, 4, 8, 16]; // Declares available animation speed multipliers for default delay
753
+
754
+ /**
755
+ * Returns speed delay for given speedFactor. For options, see defined above in "speedFactors"
756
+ */
533
757
 
534
758
  var getSpeedDelay = function getSpeedDelay(speedFactor) {
535
759
  return defaultDelay / speedFactor;
@@ -1248,6 +1472,129 @@
1248
1472
  getActiveLayerTimeStep: getActiveLayerTimeStep
1249
1473
  });
1250
1474
 
1475
+ /* *
1476
+ * Licensed under the Apache License, Version 2.0 (the "License");
1477
+ * you may not use this file except in compliance with the License.
1478
+ * You may obtain a copy of the License at
1479
+ *
1480
+ * http://www.apache.org/licenses/LICENSE-2.0
1481
+ *
1482
+ * Unless required by applicable law or agreed to in writing, software
1483
+ * distributed under the License is distributed on an "AS IS" BASIS,
1484
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1485
+ * See the License for the specific language governing permissions and
1486
+ * limitations under the License.
1487
+ *
1488
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1489
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
1490
+ * */
1491
+ /**
1492
+ * Generic action to set the time.
1493
+ *
1494
+ * @param payload: SetTimePayload;
1495
+ * {
1496
+ * sourceId: string; // Source where the new time value originates from
1497
+ * value: string; // ISO 8601 string time value like "2010-10-01T00:00:00Z"
1498
+ * }
1499
+ */
1500
+
1501
+ var setTime = toolkit.createAction('GENERIC_SETTIME');
1502
+ /**
1503
+ * Generic action to set the bounding box.
1504
+ *
1505
+ * @param payload: SetBboxPayload;
1506
+ *
1507
+ * {
1508
+ * sourceId: string; // Source where the new time value originates from
1509
+ * bbox: { // Bbbox object
1510
+ * left: number;
1511
+ * bottom: number;
1512
+ * right: number;
1513
+ * top: number;
1514
+ * };
1515
+ * srs: string; // Projection string according to EPSG, e.g. (EPSG:3857 == Mercator)
1516
+ * }
1517
+ */
1518
+
1519
+ var setBbox = toolkit.createAction('GENERIC_SETBBOX');
1520
+
1521
+ /* *
1522
+ * Licensed under the Apache License, Version 2.0 (the "License");
1523
+ * you may not use this file except in compliance with the License.
1524
+ * You may obtain a copy of the License at
1525
+ *
1526
+ * http://www.apache.org/licenses/LICENSE-2.0
1527
+ *
1528
+ * Unless required by applicable law or agreed to in writing, software
1529
+ * distributed under the License is distributed on an "AS IS" BASIS,
1530
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1531
+ * See the License for the specific language governing permissions and
1532
+ * limitations under the License.
1533
+ *
1534
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1535
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
1536
+ * */
1537
+ /**
1538
+ * These actions are fired by the generic/saga.ts, based on generic actions and the synchronizationGroup state.
1539
+ *
1540
+ * These actions should not be used by components directly. Components should only use the generic actions.
1541
+ */
1542
+
1543
+ var setTimeSync = toolkit.createAction('GENERIC_SYNC_SETTIME', function (payload, targets, groups) {
1544
+ return {
1545
+ payload: {
1546
+ source: setTime(payload),
1547
+ groups: groups,
1548
+ targets: targets
1549
+ }
1550
+ };
1551
+ });
1552
+ var setBboxSync = toolkit.createAction('GENERIC_SYNC_SETBBOX', function (payload, targets, groups) {
1553
+ return {
1554
+ payload: {
1555
+ source: setBbox(payload),
1556
+ groups: groups,
1557
+ targets: targets
1558
+ }
1559
+ };
1560
+ });
1561
+ var setLayerActionSync = toolkit.createAction('GENERIC_SYNC_SETLAYERACTIONS', function (payload, targets, type) {
1562
+ return {
1563
+ payload: {
1564
+ source: {
1565
+ type: type,
1566
+ payload: payload
1567
+ },
1568
+ targets: targets
1569
+ }
1570
+ };
1571
+ });
1572
+
1573
+ /* *
1574
+ * Licensed under the Apache License, Version 2.0 (the "License");
1575
+ * you may not use this file except in compliance with the License.
1576
+ * You may obtain a copy of the License at
1577
+ *
1578
+ * http://www.apache.org/licenses/LICENSE-2.0
1579
+ *
1580
+ * Unless required by applicable law or agreed to in writing, software
1581
+ * distributed under the License is distributed on an "AS IS" BASIS,
1582
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1583
+ * See the License for the specific language governing permissions and
1584
+ * limitations under the License.
1585
+ *
1586
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1587
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
1588
+ * */
1589
+ /**
1590
+ * These actions causes circular dependency if they are defined in the reducer.ts file.
1591
+ * Therefor they are instead added to this file
1592
+ * https://redux-toolkit.js.org/usage/usage-guide#exporting-and-using-slices
1593
+ */
1594
+
1595
+ var mapChangeDimension = toolkit.createAction('MAP_CHANGE_DIMENSION');
1596
+ var setMapPreset = toolkit.createAction('SET_MAP_PRESET');
1597
+
1251
1598
  /* *
1252
1599
  * Licensed under the Apache License, Version 2.0 (the "License");
1253
1600
  * you may not use this file except in compliance with the License.
@@ -1399,129 +1746,6 @@
1399
1746
  }
1400
1747
  };
1401
1748
 
1402
- /* *
1403
- * Licensed under the Apache License, Version 2.0 (the "License");
1404
- * you may not use this file except in compliance with the License.
1405
- * You may obtain a copy of the License at
1406
- *
1407
- * http://www.apache.org/licenses/LICENSE-2.0
1408
- *
1409
- * Unless required by applicable law or agreed to in writing, software
1410
- * distributed under the License is distributed on an "AS IS" BASIS,
1411
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1412
- * See the License for the specific language governing permissions and
1413
- * limitations under the License.
1414
- *
1415
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1416
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
1417
- * */
1418
- /**
1419
- * These actions causes circular dependency if they are defined in the reducer.ts file.
1420
- * Therefor they are instead added to this file
1421
- * https://redux-toolkit.js.org/usage/usage-guide#exporting-and-using-slices
1422
- */
1423
-
1424
- var mapChangeDimension = toolkit.createAction('MAP_CHANGE_DIMENSION');
1425
- var setMapPreset = toolkit.createAction('SET_MAP_PRESET');
1426
-
1427
- /* *
1428
- * Licensed under the Apache License, Version 2.0 (the "License");
1429
- * you may not use this file except in compliance with the License.
1430
- * You may obtain a copy of the License at
1431
- *
1432
- * http://www.apache.org/licenses/LICENSE-2.0
1433
- *
1434
- * Unless required by applicable law or agreed to in writing, software
1435
- * distributed under the License is distributed on an "AS IS" BASIS,
1436
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1437
- * See the License for the specific language governing permissions and
1438
- * limitations under the License.
1439
- *
1440
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1441
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
1442
- * */
1443
- /**
1444
- * Generic action to set the time.
1445
- *
1446
- * @param payload: SetTimePayload;
1447
- * {
1448
- * sourceId: string; // Source where the new time value originates from
1449
- * value: string; // ISO 8601 string time value like "2010-10-01T00:00:00Z"
1450
- * }
1451
- */
1452
-
1453
- var setTime = toolkit.createAction('GENERIC_SETTIME');
1454
- /**
1455
- * Generic action to set the bounding box.
1456
- *
1457
- * @param payload: SetBboxPayload;
1458
- *
1459
- * {
1460
- * sourceId: string; // Source where the new time value originates from
1461
- * bbox: { // Bbbox object
1462
- * left: number;
1463
- * bottom: number;
1464
- * right: number;
1465
- * top: number;
1466
- * };
1467
- * srs: string; // Projection string according to EPSG, e.g. (EPSG:3857 == Mercator)
1468
- * }
1469
- */
1470
-
1471
- var setBbox = toolkit.createAction('GENERIC_SETBBOX');
1472
-
1473
- /* *
1474
- * Licensed under the Apache License, Version 2.0 (the "License");
1475
- * you may not use this file except in compliance with the License.
1476
- * You may obtain a copy of the License at
1477
- *
1478
- * http://www.apache.org/licenses/LICENSE-2.0
1479
- *
1480
- * Unless required by applicable law or agreed to in writing, software
1481
- * distributed under the License is distributed on an "AS IS" BASIS,
1482
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1483
- * See the License for the specific language governing permissions and
1484
- * limitations under the License.
1485
- *
1486
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1487
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
1488
- * */
1489
- /**
1490
- * These actions are fired by the generic/saga.ts, based on generic actions and the synchronizationGroup state.
1491
- *
1492
- * These actions should not be used by components directly. Components should only use the generic actions.
1493
- */
1494
-
1495
- var setTimeSync = toolkit.createAction('GENERIC_SYNC_SETTIME', function (payload, targets, groups) {
1496
- return {
1497
- payload: {
1498
- source: setTime(payload),
1499
- groups: groups,
1500
- targets: targets
1501
- }
1502
- };
1503
- });
1504
- var setBboxSync = toolkit.createAction('GENERIC_SYNC_SETBBOX', function (payload, targets, groups) {
1505
- return {
1506
- payload: {
1507
- source: setBbox(payload),
1508
- groups: groups,
1509
- targets: targets
1510
- }
1511
- };
1512
- });
1513
- var setLayerActionSync = toolkit.createAction('GENERIC_SYNC_SETLAYERACTIONS', function (payload, targets, type) {
1514
- return {
1515
- payload: {
1516
- source: {
1517
- type: type,
1518
- payload: payload
1519
- },
1520
- targets: targets
1521
- }
1522
- };
1523
- });
1524
-
1525
1749
  /* *
1526
1750
  * Licensed under the Apache License, Version 2.0 (the "License");
1527
1751
  * you may not use this file except in compliance with the License.
@@ -1567,7 +1791,7 @@
1567
1791
  status: status
1568
1792
  });
1569
1793
  };
1570
- var initialState$8 = {
1794
+ var initialState$7 = {
1571
1795
  byId: {},
1572
1796
  allIds: [],
1573
1797
  availableBaseLayers: {
@@ -1575,8 +1799,8 @@
1575
1799
  allIds: []
1576
1800
  }
1577
1801
  };
1578
- var slice$8 = toolkit.createSlice({
1579
- initialState: initialState$8,
1802
+ var slice$7 = toolkit.createSlice({
1803
+ initialState: initialState$7,
1580
1804
  name: 'layerReducer',
1581
1805
  reducers: {
1582
1806
  addLayer: function addLayer(draft, action) {
@@ -1842,12 +2066,68 @@
1842
2066
  var _a = action.payload,
1843
2067
  layerStyle = _a.layerStyle,
1844
2068
  layerDimensions = _a.layerDimensions;
1845
- var layerStyleAction = layerActions.layerChangeStyle(layerStyle);
1846
- var state = produce.current(draft);
1847
- var intermediateState = layerStyle === null ? state : reducer$8(state, layerStyleAction);
1848
- var dimensionsAction = layerActions.layerSetDimensions(layerDimensions);
1849
- var newState = layerDimensions === null ? intermediateState : reducer$8(intermediateState, dimensionsAction);
1850
- return newState;
2069
+ /* Set style */
2070
+
2071
+ if (layerStyle && draft.byId[layerStyle.layerId]) {
2072
+ draft.byId[layerStyle.layerId].style = layerStyle === null || layerStyle === void 0 ? void 0 : layerStyle.style;
2073
+ }
2074
+ /* Set layer dimensions */
2075
+
2076
+
2077
+ if (layerDimensions) {
2078
+ /* Find the corresponding layer we want to update */
2079
+ var currentLayer_1 = draft.byId[layerDimensions.layerId];
2080
+ /* Find all other layers with the same name and service, and update these at once (atomic update) */
2081
+
2082
+ Object.values(draft.byId).filter(function (draftLayer) {
2083
+ return draftLayer.name === currentLayer_1.name && draftLayer.service === currentLayer_1.service;
2084
+ }).forEach(function (draftLayer) {
2085
+ var layerId = draftLayer.id;
2086
+
2087
+ if (layerId && draft.byId[layerId]) {
2088
+ if (!draft.byId[layerId].dimensions) {
2089
+ draft.byId[layerId].dimensions = [];
2090
+ }
2091
+
2092
+ var draftLayerDimensions_1 = draft.byId[layerId].dimensions;
2093
+ /* Now update the dimension for each layer */
2094
+
2095
+ layerDimensions.dimensions.forEach(function (newLayerDimension) {
2096
+ /* Find the wmLayer */
2097
+ var wmLayer = getWMLayerById(layerId);
2098
+ /* Find the wmDimension */
2099
+
2100
+ var wmDimension = wmLayer && wmLayer.getDimension(newLayerDimension.name);
2101
+ /* This will set the new range of start/stop values for this dimension, making getClosestValue work properly */
2102
+
2103
+ wmDimension && wmDimension.reInitializeValues(newLayerDimension.values);
2104
+ /* Find corresponding draftLayerDimensions */
2105
+
2106
+ var draftLayerDimension = draftLayerDimensions_1 === null || draftLayerDimensions_1 === void 0 ? void 0 : draftLayerDimensions_1.find(function (d) {
2107
+ return d.name === newLayerDimension.name && d.units === newLayerDimension.units;
2108
+ });
2109
+
2110
+ if (draftLayerDimension) {
2111
+ /* If found update only minValue, maxValue and values */
2112
+ draftLayerDimension.maxValue = newLayerDimension.maxValue;
2113
+ draftLayerDimension.minValue = newLayerDimension.minValue;
2114
+ draftLayerDimension.values = newLayerDimension.values;
2115
+ } else if (layerId === layerDimensions.layerId) {
2116
+ /* Otherwise add a new one, but only for this layer. */
2117
+ draftLayerDimensions_1.push({
2118
+ name: newLayerDimension.name,
2119
+ units: newLayerDimension.units,
2120
+ currentValue: newLayerDimension.currentValue,
2121
+ minValue: newLayerDimension.minValue,
2122
+ maxValue: newLayerDimension.maxValue,
2123
+ validSyncSelection: newLayerDimension.validSyncSelection,
2124
+ values: newLayerDimension.values
2125
+ });
2126
+ }
2127
+ });
2128
+ }
2129
+ });
2130
+ }
1851
2131
  },
1852
2132
  setSelectedFeature: function setSelectedFeature(draft, action) {
1853
2133
  var _a = action.payload,
@@ -1902,7 +2182,7 @@
1902
2182
  };
1903
2183
  /* Handle the Layer action with the same logic, using the same reducer */
1904
2184
 
1905
- return reducer$8(prevState, action);
2185
+ return reducer$7(prevState, action);
1906
2186
  }, state);
1907
2187
  }).addCase(setMapPreset, function (draft, action) {
1908
2188
  var mapId = action.payload.mapId;
@@ -1922,8 +2202,8 @@
1922
2202
  });
1923
2203
  }
1924
2204
  });
1925
- var reducer$8 = slice$8.reducer;
1926
- var layerActions = slice$8.actions;
2205
+ var reducer$7 = slice$7.reducer;
2206
+ var layerActions = slice$7.actions;
1927
2207
 
1928
2208
  /* *
1929
2209
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1938,312 +2218,96 @@
1938
2218
  * See the License for the specific language governing permissions and
1939
2219
  * limitations under the License.
1940
2220
  *
1941
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1942
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
2221
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2222
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
1943
2223
  * */
1944
- var initialState$7 = {
1945
- byId: {},
1946
- allIds: []
2224
+ var moveToTop = function moveToTop(list, element) {
2225
+ var filteredList = list.filter(function (item) {
2226
+ return item !== element;
2227
+ });
2228
+
2229
+ var newOrder = __spreadArray([element], __read(filteredList));
2230
+
2231
+ return newOrder;
1947
2232
  };
1948
- var slice$7 = toolkit.createSlice({
1949
- initialState: initialState$7,
1950
- name: 'serviceReducer',
2233
+ var createUIDialogElement = function createUIDialogElement(_a) {
2234
+ var activeMapId = _a.activeMapId,
2235
+ type = _a.type,
2236
+ setOpen = _a.setOpen,
2237
+ _b = _a.source,
2238
+ source = _b === void 0 ? 'app' : _b;
2239
+ return {
2240
+ activeMapId: activeMapId,
2241
+ isOpen: setOpen,
2242
+ type: type,
2243
+ source: source,
2244
+ isLoading: false,
2245
+ error: undefined,
2246
+ focused: false
2247
+ };
2248
+ };
2249
+ var initialState$6 = {
2250
+ order: [],
2251
+ dialogs: {},
2252
+ activeWindowId: undefined
2253
+ };
2254
+ var slice$6 = toolkit.createSlice({
2255
+ initialState: initialState$6,
2256
+ name: 'uiReducer',
1951
2257
  reducers: {
1952
- serviceSetLayers: function serviceSetLayers(draft, action) {
1953
- var id = action.payload.id;
1954
- draft.byId[id] = __assign({}, action.payload);
2258
+ registerDialog: function registerDialog(draft, action) {
2259
+ var type = action.payload.type;
2260
+ var activeMapId = action.payload.mapId ? action.payload.mapId : '';
2261
+ var setOpen = action.payload.setOpen ? action.payload.setOpen : false;
2262
+ var source = action.payload.source ? action.payload.source : 'app';
1955
2263
 
1956
- if (!draft.allIds.includes(id)) {
1957
- draft.allIds.push(id);
2264
+ if (!Object.keys(draft.dialogs).includes(type)) {
2265
+ draft.dialogs[type] = createUIDialogElement({
2266
+ activeMapId: activeMapId,
2267
+ type: type,
2268
+ setOpen: setOpen,
2269
+ source: source
2270
+ });
2271
+ } // register dialog to order
2272
+
2273
+
2274
+ if (!draft.order.includes(type)) {
2275
+ draft.order.push(type);
1958
2276
  }
1959
2277
  },
1960
- mapStoreRemoveService: function mapStoreRemoveService(draft, action) {
1961
- var foundServiceIndex = draft.allIds.findIndex(function (id) {
1962
- return draft.byId[id].serviceUrl === action.payload.serviceUrl;
1963
- });
2278
+ unregisterDialog: function unregisterDialog(draft, action) {
2279
+ var type = action.payload.type;
1964
2280
 
1965
- if (foundServiceIndex !== -1) {
1966
- var serviceId_1 = draft.allIds[foundServiceIndex];
1967
- draft.allIds = draft.allIds.filter(function (id) {
1968
- return id !== serviceId_1;
2281
+ if (draft.dialogs[type]) {
2282
+ delete draft.dialogs[type];
2283
+ draft.order = draft.order.filter(function (item) {
2284
+ return item !== type;
1969
2285
  });
1970
- delete draft.byId[serviceId_1];
1971
2286
  }
1972
2287
  },
1973
- fetchInitialServices: function fetchInitialServices( // eslint-disable-next-line no-unused-vars
1974
- draft, // eslint-disable-next-line no-unused-vars
1975
- action) {}
1976
- },
1977
- extraReducers: function extraReducers(builder) {
1978
- return builder.addCase(layerActions.onUpdateLayerInformation, function (draft, action) {
1979
- var serviceLayers = action.payload.serviceLayers;
2288
+ setActiveMapIdForDialog: function setActiveMapIdForDialog(draft, action) {
2289
+ var _a = action.payload,
2290
+ type = _a.type,
2291
+ mapId = _a.mapId,
2292
+ source = _a.source;
1980
2293
 
1981
- if (serviceLayers === null) {
1982
- return draft;
2294
+ if (!draft.dialogs[type]) {
2295
+ return;
1983
2296
  }
1984
2297
 
1985
- var mapAction = serviceActions.serviceSetLayers(serviceLayers);
1986
- var newState = reducer$7(draft, mapAction);
1987
- return newState;
1988
- });
1989
- }
1990
- });
1991
- var reducer$7 = slice$7.reducer;
1992
- var serviceActions = slice$7.actions;
2298
+ var isOpen = action.payload.setOpen !== undefined ? action.payload.setOpen : draft.dialogs[type].isOpen;
2299
+ draft.dialogs[type].activeMapId = mapId;
2300
+ draft.dialogs[type].isOpen = isOpen;
2301
+ draft.dialogs[type].source = source;
1993
2302
 
1994
- /* *
1995
- * Licensed under the Apache License, Version 2.0 (the "License");
1996
- * you may not use this file except in compliance with the License.
1997
- * You may obtain a copy of the License at
1998
- *
1999
- * http://www.apache.org/licenses/LICENSE-2.0
2000
- *
2001
- * Unless required by applicable law or agreed to in writing, software
2002
- * distributed under the License is distributed on an "AS IS" BASIS,
2003
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2004
- * See the License for the specific language governing permissions and
2005
- * limitations under the License.
2006
- *
2007
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2008
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
2009
- * */
2010
- var selectorMemoizationOptions = {
2011
- memoizeOptions: {
2012
- maxSize: 1000,
2013
- resultEqualityCheck: _.isEqual
2014
- }
2015
- };
2016
- var isUserAddedService = function isUserAddedService(scope) {
2017
- return scope === 'user';
2018
- };
2019
-
2020
- /* *
2021
- * Licensed under the Apache License, Version 2.0 (the "License");
2022
- * you may not use this file except in compliance with the License.
2023
- * You may obtain a copy of the License at
2024
- *
2025
- * http://www.apache.org/licenses/LICENSE-2.0
2026
- *
2027
- * Unless required by applicable law or agreed to in writing, software
2028
- * distributed under the License is distributed on an "AS IS" BASIS,
2029
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2030
- * See the License for the specific language governing permissions and
2031
- * limitations under the License.
2032
- *
2033
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2034
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
2035
- * */
2036
-
2037
- var servicesStore = function servicesStore(store) {
2038
- return store && store.services ? store.services : null;
2039
- };
2040
- /**
2041
- * Retrieves all serviceIds
2042
- *
2043
- * Example: serviceIds = getServiceIds(store)
2044
- * @param {object} store store: object - object from which the service state will be extracted
2045
- * @returns {array} returnType: array - an array of all serviceIds
2046
- */
2047
-
2048
-
2049
- toolkit.createSelector(servicesStore, function (serviceState) {
2050
- return serviceState ? serviceState.allIds : [];
2051
- }, selectorMemoizationOptions);
2052
- /**
2053
- * Gets map services
2054
- *
2055
- * Example: services = getServices(store)
2056
- * @param {object} store store: object - Store object
2057
- * @returns {object} returnType: ServiceState
2058
- */
2059
-
2060
- var getServices = toolkit.createSelector(servicesStore, function (store) {
2061
- return store ? store.byId : {};
2062
- }, selectorMemoizationOptions);
2063
- /**
2064
- * Gets the service object by its url
2065
- *
2066
- * Example: service = getServiceByName(store, 'serviceName')
2067
- * @param {object} store store: object - Store object
2068
- * @returns {ReduxService} returnType: Service
2069
- */
2070
-
2071
- var getServiceByName = toolkit.createSelector([servicesStore, function (state, serviceUrl) {
2072
- return serviceUrl;
2073
- }], function (serviceState, serviceUrl) {
2074
- var foundServiceIndex = serviceState.allIds.findIndex(function (id) {
2075
- return serviceState.byId[id].serviceUrl === serviceUrl;
2076
- });
2077
- /* Add the service based on a url */
2078
-
2079
- var id = foundServiceIndex !== -1 ? serviceState.allIds[foundServiceIndex] : null;
2080
-
2081
- if (serviceState && serviceState.byId && serviceState.byId[id]) {
2082
- return serviceState.byId[id];
2083
- }
2084
-
2085
- return null;
2086
- }, selectorMemoizationOptions);
2087
- /**
2088
- * Gets the layer from the store using the serviceUrl and layerName
2089
- *
2090
- * Example: layers = getLayersFromService(store, 'https://geoservices.knmi.nl/...')
2091
- * @param {object} store store: object - object from which the layers state will be extracted
2092
- * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
2093
- * @returns {array} returnType: ServiceLayer[] - All layers within the service object.
2094
- */
2095
-
2096
- var getLayersFromService$1 = toolkit.createSelector(getServiceByName, function (service) {
2097
- return service && service.layers || null;
2098
- }, selectorMemoizationOptions);
2099
- /**
2100
- * Gets the layer from the store using the serviceUrl and layerName
2101
- *
2102
- * Example: layer = getLayerFromService(store, 'https://geoservices.knmi.nl/...', 'radar')
2103
- * @param {object} store store: object - The application store
2104
- * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
2105
- * @param {string} layerName layerName: string - Name of the layer in the service
2106
- * @returns {ServiceLayer} returnType: ServiceLayer - The layer from the service object.
2107
- */
2108
-
2109
- var getLayerFromService = toolkit.createSelector(function (store, serviceUrl) {
2110
- return getLayersFromService$1(store, serviceUrl);
2111
- }, function (store, serviceUrl) {
2112
- return serviceUrl;
2113
- }, function (store, serviceUrl, layerName) {
2114
- return layerName;
2115
- }, function (layers, serviceUrl, layerName) {
2116
- if (!layers) {
2117
- return null;
2118
- }
2119
-
2120
- var index = layers.findIndex(function (serviceLayer) {
2121
- return serviceLayer.name === layerName;
2122
- });
2123
-
2124
- if (index === -1) {
2125
- return null;
2126
- }
2127
-
2128
- return layers[index];
2129
- }, selectorMemoizationOptions);
2130
- /**
2131
- * Gets the layers stylelist from the servicestore using the serviceUrl and layerName
2132
- *
2133
- * Example: layerStyles = getLayerStyles(store, layerService, layerName);
2134
- * @param {object} store store: object - store from which the layers state will be extracted
2135
- * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
2136
- * @param {string} layerName layerName: string - Name of the layer in the service
2137
- * @returns {array} returnType: Style[] - array containing layer styles
2138
- */
2139
-
2140
- var getLayerStyles$1 = toolkit.createSelector(getLayerFromService, function (layer) {
2141
- return layer && layer.styles ? layer.styles : [];
2142
- }, selectorMemoizationOptions);
2143
-
2144
- /* *
2145
- * Licensed under the Apache License, Version 2.0 (the "License");
2146
- * you may not use this file except in compliance with the License.
2147
- * You may obtain a copy of the License at
2148
- *
2149
- * http://www.apache.org/licenses/LICENSE-2.0
2150
- *
2151
- * Unless required by applicable law or agreed to in writing, software
2152
- * distributed under the License is distributed on an "AS IS" BASIS,
2153
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2154
- * See the License for the specific language governing permissions and
2155
- * limitations under the License.
2156
- *
2157
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2158
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
2159
- * */
2160
- var moveToTop = function moveToTop(list, element) {
2161
- var filteredList = list.filter(function (item) {
2162
- return item !== element;
2163
- });
2164
-
2165
- var newOrder = __spreadArray([element], __read(filteredList));
2166
-
2167
- return newOrder;
2168
- };
2169
- var createUIDialogElement = function createUIDialogElement(_a) {
2170
- var activeMapId = _a.activeMapId,
2171
- type = _a.type,
2172
- setOpen = _a.setOpen,
2173
- _b = _a.source,
2174
- source = _b === void 0 ? 'app' : _b;
2175
- return {
2176
- activeMapId: activeMapId,
2177
- isOpen: setOpen,
2178
- type: type,
2179
- source: source,
2180
- isLoading: false,
2181
- error: undefined,
2182
- focused: false
2183
- };
2184
- };
2185
- var initialState$6 = {
2186
- order: [],
2187
- dialogs: {},
2188
- activeWindowId: undefined
2189
- };
2190
- var slice$6 = toolkit.createSlice({
2191
- initialState: initialState$6,
2192
- name: 'uiReducer',
2193
- reducers: {
2194
- registerDialog: function registerDialog(draft, action) {
2195
- var type = action.payload.type;
2196
- var activeMapId = action.payload.mapId ? action.payload.mapId : '';
2197
- var setOpen = action.payload.setOpen ? action.payload.setOpen : false;
2198
- var source = action.payload.source ? action.payload.source : 'app';
2199
-
2200
- if (!Object.keys(draft.dialogs).includes(type)) {
2201
- draft.dialogs[type] = createUIDialogElement({
2202
- activeMapId: activeMapId,
2203
- type: type,
2204
- setOpen: setOpen,
2205
- source: source
2206
- });
2207
- } // register dialog to order
2208
-
2209
-
2210
- if (!draft.order.includes(type)) {
2211
- draft.order.push(type);
2212
- }
2213
- },
2214
- unregisterDialog: function unregisterDialog(draft, action) {
2215
- var type = action.payload.type;
2216
-
2217
- if (draft.dialogs[type]) {
2218
- delete draft.dialogs[type];
2219
- draft.order = draft.order.filter(function (item) {
2220
- return item !== type;
2221
- });
2222
- }
2223
- },
2224
- setActiveMapIdForDialog: function setActiveMapIdForDialog(draft, action) {
2225
- var _a = action.payload,
2226
- type = _a.type,
2227
- mapId = _a.mapId,
2228
- source = _a.source;
2229
-
2230
- if (!draft.dialogs[type]) {
2231
- return;
2232
- }
2233
-
2234
- var isOpen = action.payload.setOpen !== undefined ? action.payload.setOpen : draft.dialogs[type].isOpen;
2235
- draft.dialogs[type].activeMapId = mapId;
2236
- draft.dialogs[type].isOpen = isOpen;
2237
- draft.dialogs[type].source = source;
2238
-
2239
- if (isOpen) {
2240
- draft.order = moveToTop(draft.order, type);
2241
- }
2242
- },
2243
- setToggleOpenDialog: function setToggleOpenDialog(draft, action) {
2244
- var _a = action.payload,
2245
- type = _a.type,
2246
- setOpen = _a.setOpen;
2303
+ if (isOpen) {
2304
+ draft.order = moveToTop(draft.order, type);
2305
+ }
2306
+ },
2307
+ setToggleOpenDialog: function setToggleOpenDialog(draft, action) {
2308
+ var _a = action.payload,
2309
+ type = _a.type,
2310
+ setOpen = _a.setOpen;
2247
2311
 
2248
2312
  if (!draft.dialogs[type]) {
2249
2313
  return;
@@ -2316,9 +2380,9 @@
2316
2380
  baseLayerDelete = layerActions.baseLayerDelete,
2317
2381
  layerChangeDimension$1 = layerActions.layerChangeDimension,
2318
2382
  layerDelete$1 = layerActions.layerDelete,
2319
- onUpdateLayerInformation = layerActions.onUpdateLayerInformation,
2320
2383
  setBaseLayers$1 = layerActions.setBaseLayers,
2321
- setLayers = layerActions.setLayers;
2384
+ setLayers = layerActions.setLayers,
2385
+ onUpdateLayerInformation = layerActions.onUpdateLayerInformation;
2322
2386
  /**
2323
2387
  * Checks if the layer id is already taken in one of the maps.
2324
2388
  * @param state The WebMapState
@@ -2976,12 +3040,16 @@
2976
3040
  }).addCase(onUpdateLayerInformation, function (draft, action) {
2977
3041
  var mapDimensions = action.payload.mapDimensions;
2978
3042
 
2979
- if (mapDimensions === null) {
3043
+ if (!mapDimensions) {
2980
3044
  return draft;
2981
3045
  }
2982
3046
 
2983
- var mapAction = mapActions$1.mapUpdateAllMapDimensions(mapDimensions);
2984
- return reducer$5(draft, mapAction);
3047
+ var dimensions = mapDimensions.dimensions,
3048
+ mapId = mapDimensions.mapId;
3049
+ dimensions.forEach(function (dimension) {
3050
+ return produceDraftStateSetWebMapDimension(draft, mapId, dimension, false);
3051
+ });
3052
+ return draft;
2985
3053
  }).addCase(mapChangeDimension, function (draft, action) {
2986
3054
  var _a = action.payload,
2987
3055
  mapId = _a.mapId,
@@ -3450,7 +3518,9 @@
3450
3518
  if (store && store.ui && store.ui.order) {
3451
3519
  var order = store.ui.order;
3452
3520
  var visibleOrder = order.filter(function (orderedDialogType) {
3453
- return store.ui.dialogs[orderedDialogType].isOpen;
3521
+ var _a;
3522
+
3523
+ return (_a = store.ui.dialogs[orderedDialogType]) === null || _a === void 0 ? void 0 : _a.isOpen;
3454
3524
  });
3455
3525
 
3456
3526
  if (!visibleOrder.includes(dialogType)) {
@@ -4045,6 +4115,24 @@
4045
4115
  var getSyncedMapIdsForTimeslider = toolkit.createSelector(syncGroupStore, function (store) {
4046
4116
  return store.viewState.timeslider.groups[0].selected;
4047
4117
  }, selectorMemoizationOptions);
4118
+ var getSyncGroupTargets = function getSyncGroupTargets(state) {
4119
+ var syncStore = syncGroupStore(state);
4120
+
4121
+ if (!syncStore || !syncStore.groups) {
4122
+ return [];
4123
+ }
4124
+
4125
+ return syncStore.groups.allIds.reduce(function (targets, groupId) {
4126
+ var group = syncStore.groups.byId[groupId];
4127
+ return targets.concat(group.targets.allIds.map(function (targetId) {
4128
+ return {
4129
+ groupId: groupId,
4130
+ targetId: targetId,
4131
+ linked: group.targets.byId[targetId].linked
4132
+ };
4133
+ }));
4134
+ }, []);
4135
+ };
4048
4136
 
4049
4137
  var selectors$2 = /*#__PURE__*/Object.freeze({
4050
4138
  __proto__: null,
@@ -4056,7 +4144,8 @@
4056
4144
  getTargetGroups: getTargetGroups,
4057
4145
  getAllTargetGroupsForSource: getAllTargetGroupsForSource,
4058
4146
  syncGroupGetViewState: syncGroupGetViewState,
4059
- getSyncedMapIdsForTimeslider: getSyncedMapIdsForTimeslider
4147
+ getSyncedMapIdsForTimeslider: getSyncedMapIdsForTimeslider,
4148
+ getSyncGroupTargets: getSyncGroupTargets
4060
4149
  });
4061
4150
 
4062
4151
  /* *
@@ -6994,11 +7083,11 @@
6994
7083
  * See the License for the specific language governing permissions and
6995
7084
  * limitations under the License.
6996
7085
  *
6997
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6998
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
7086
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7087
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6999
7088
  * */
7000
7089
 
7001
- var PlayButton = function PlayButton(_a) {
7090
+ var PlayButton$1 = function PlayButton(_a) {
7002
7091
  var isAnimating = _a.isAnimating,
7003
7092
  isDisabled = _a.isDisabled,
7004
7093
  _b = _a.onTogglePlayButton,
@@ -7008,18 +7097,18 @@
7008
7097
  onTogglePlayButton();
7009
7098
  };
7010
7099
 
7011
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
7012
- title: isAnimating ? 'Pause' : 'Play'
7013
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
7100
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
7101
+ variant: "tool",
7102
+ tooltipTitle: isAnimating ? 'Pause' : 'Play',
7014
7103
  onClick: onTogglePlay,
7015
7104
  disabled: isDisabled,
7016
7105
  "data-testid": "playButton",
7017
- active: isAnimating
7106
+ isSelected: isAnimating
7018
7107
  }, isAnimating ? /*#__PURE__*/React__namespace.createElement(theme.Pause, {
7019
7108
  "data-testid": "pause-svg-path"
7020
7109
  }) : /*#__PURE__*/React__namespace.createElement(theme.Play, {
7021
7110
  "data-testid": "play-svg-path"
7022
- }))));
7111
+ }));
7023
7112
  };
7024
7113
 
7025
7114
  /* *
@@ -7078,7 +7167,7 @@
7078
7167
  }
7079
7168
  };
7080
7169
 
7081
- return /*#__PURE__*/React__default["default"].createElement(PlayButton, {
7170
+ return /*#__PURE__*/React__default["default"].createElement(PlayButton$1, {
7082
7171
  isAnimating: linkedMapAnimationInfo.isAnimating,
7083
7172
  isDisabled: isDisabled,
7084
7173
  onTogglePlayButton: function onTogglePlayButton() {
@@ -9896,8 +9985,8 @@
9896
9985
  id: 'webmap-module',
9897
9986
  reducersMap: {
9898
9987
  webmap: reducer$5,
9899
- services: reducer$7,
9900
- layers: reducer$8
9988
+ services: reducer$8,
9989
+ layers: reducer$7
9901
9990
  },
9902
9991
  sagas: [rootSaga$4, rootSaga$3]
9903
9992
  };
@@ -10411,10 +10500,13 @@
10411
10500
  };
10412
10501
 
10413
10502
  var HeaderOptions = function HeaderOptions(_a) {
10503
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
10504
+
10414
10505
  var isDockedLayerManager = _a.isDockedLayerManager,
10415
10506
  shortcutsEnabled = _a.shortcutsEnabled,
10416
10507
  onClickDockButton = _a.onClickDockButton,
10417
- onChangeSize = _a.onChangeSize;
10508
+ onChangeSize = _a.onChangeSize,
10509
+ buttonSettings = _a.buttonSettings;
10418
10510
  React__namespace.useEffect(function () {
10419
10511
  var handleKeyDown = function handleKeyDown(event) {
10420
10512
  if (shortcutsEnabled) {
@@ -10433,28 +10525,28 @@
10433
10525
  document.removeEventListener('keydown', handleKeyDown);
10434
10526
  };
10435
10527
  }, [onChangeSize, shortcutsEnabled]);
10436
- return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10528
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, !((_b = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.small) === null || _b === void 0 ? void 0 : _b.isDisabled) && /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10437
10529
  tooltipTitle: "small",
10438
10530
  "data-testid": "collapseSmall-btn",
10439
10531
  onClick: function onClick() {
10440
10532
  return onChangeSize(sizeSmall);
10441
10533
  },
10442
10534
  className: "collapseSmall-btn"
10443
- }, /*#__PURE__*/React__namespace.createElement(theme.CollapseSmall, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10535
+ }, (_d = (_c = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.small) === null || _c === void 0 ? void 0 : _c.icon) !== null && _d !== void 0 ? _d : /*#__PURE__*/React__namespace.createElement(theme.CollapseSmall, null)), !((_e = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.medium) === null || _e === void 0 ? void 0 : _e.isDisabled) && /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10444
10536
  tooltipTitle: "medium",
10445
10537
  "data-testid": "collapseMedium-btn",
10446
10538
  onClick: function onClick() {
10447
10539
  return onChangeSize(sizeMedium);
10448
10540
  },
10449
10541
  className: "collapseMedium-btn"
10450
- }, /*#__PURE__*/React__namespace.createElement(theme.CollapseMedium, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10542
+ }, (_g = (_f = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.medium) === null || _f === void 0 ? void 0 : _f.icon) !== null && _g !== void 0 ? _g : /*#__PURE__*/React__namespace.createElement(theme.CollapseMedium, null)), !((_h = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.large) === null || _h === void 0 ? void 0 : _h.isDisabled) && /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10451
10543
  tooltipTitle: "large",
10452
10544
  "data-testid": "collapseLarge-btn",
10453
10545
  onClick: function onClick() {
10454
10546
  return onChangeSize(sizeLarge);
10455
10547
  },
10456
10548
  className: "collapseLarge-btn"
10457
- }, /*#__PURE__*/React__namespace.createElement(theme.CollapseLarge, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10549
+ }, (_k = (_j = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.large) === null || _j === void 0 ? void 0 : _j.icon) !== null && _k !== void 0 ? _k : /*#__PURE__*/React__namespace.createElement(theme.CollapseLarge, null)), !((_l = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.dock) === null || _l === void 0 ? void 0 : _l.isDisabled) && /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
10458
10550
  tooltipTitle: isDockedLayerManager ? 'Undock' : 'Dock',
10459
10551
  "data-testid": "dockedBtn",
10460
10552
  disableRipple: true,
@@ -10465,7 +10557,7 @@
10465
10557
  "data-testid": "dockedLayerManager-collapse"
10466
10558
  }) : /*#__PURE__*/React__namespace.createElement(theme.ExpandWindow, {
10467
10559
  "data-testid": "dockedLayerManager-uncollapse"
10468
- })));
10560
+ })), (_m = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.divider) === null || _m === void 0 ? void 0 : _m.element);
10469
10561
  };
10470
10562
 
10471
10563
  /* *
@@ -10730,13 +10822,15 @@
10730
10822
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10731
10823
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
10732
10824
  * */
10733
- var styles$4 = {
10734
- text: {
10735
- paddingLeft: '10px',
10736
- fontSize: '12px',
10737
- fontFamily: 'Roboto',
10738
- opacity: 0.67
10739
- }
10825
+ var styles$5 = {
10826
+ text: function text(theme) {
10827
+ return __assign({
10828
+ paddingLeft: '10px',
10829
+ fontSize: '12px',
10830
+ fontFamily: 'Roboto',
10831
+ opacity: 0.67
10832
+ }, theme.palette.geowebColors.layerManager.headerRowText);
10833
+ }
10740
10834
  };
10741
10835
 
10742
10836
  var DescriptionRow = function DescriptionRow(_a) {
@@ -10777,7 +10871,7 @@
10777
10871
  className: columnClasses.column2
10778
10872
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10779
10873
  className: "header-layer " + (hasMapPresetsModule ? 'mappresetsModule-enabled' : ''),
10780
- sx: styles$4.text
10874
+ sx: styles$5.text
10781
10875
  }, (_e = (_d = settings === null || settings === void 0 ? void 0 : settings.layerName) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : 'Layer'), /*#__PURE__*/React__namespace.createElement(material.Box, {
10782
10876
  className: "header-mapPresets",
10783
10877
  sx: {
@@ -10786,15 +10880,15 @@
10786
10880
  }, mapPresetsModuleInline)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
10787
10881
  className: columnClasses.column3
10788
10882
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10789
- sx: styles$4.text
10883
+ sx: styles$5.text
10790
10884
  }, (_g = (_f = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _f === void 0 ? void 0 : _f.title) !== null && _g !== void 0 ? _g : 'Style')), /*#__PURE__*/React__namespace.createElement(material.Grid, {
10791
10885
  className: columnClasses.column4
10792
10886
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10793
- sx: styles$4.text
10887
+ sx: styles$5.text
10794
10888
  }, (_j = (_h = settings === null || settings === void 0 ? void 0 : settings.opacity) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : 'Opacity')), /*#__PURE__*/React__namespace.createElement(material.Grid, {
10795
10889
  className: columnClasses.column5
10796
10890
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10797
- sx: styles$4.text
10891
+ sx: styles$5.text
10798
10892
  }, (_l = (_k = settings === null || settings === void 0 ? void 0 : settings.dimensions) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : 'Dimensions')), /*#__PURE__*/React__namespace.createElement(material.Grid, {
10799
10893
  className: columnClasses.column6
10800
10894
  }));
@@ -11157,22 +11251,25 @@
11157
11251
  }];
11158
11252
 
11159
11253
  var OpacitySelect = function OpacitySelect(_a) {
11254
+ var _b;
11255
+
11160
11256
  var currentOpacity = _a.currentOpacity,
11161
11257
  onLayerChangeOpacity = _a.onLayerChangeOpacity,
11162
- _b = _a.isEnabled,
11163
- isEnabled = _b === void 0 ? true : _b,
11164
- _c = _a.tooltipPrefix,
11165
- tooltipPrefix = _c === void 0 ? 'Opacity: ' : _c;
11258
+ _c = _a.isEnabled,
11259
+ isEnabled = _c === void 0 ? true : _c,
11260
+ _d = _a.tooltipPrefix,
11261
+ tooltipPrefix = _d === void 0 ? 'Opacity: ' : _d;
11166
11262
 
11167
- var _d = __read(shared.useControlledTooltip(), 2),
11168
- tooltipOpen = _d[0],
11169
- setTooltipOpen = _d[1];
11263
+ var _e = __read(shared.useControlledTooltip(), 2),
11264
+ tooltipOpen = _e[0],
11265
+ setTooltipOpen = _e[1];
11170
11266
 
11171
- var _e = __read(React__namespace.useState(null), 2),
11172
- anchorEl = _e[0],
11173
- setAnchorEl = _e[1];
11267
+ var _f = __read(React__namespace.useState(null), 2),
11268
+ anchorEl = _f[0],
11269
+ setAnchorEl = _f[1];
11174
11270
 
11175
11271
  var isOpen = Boolean(anchorEl);
11272
+ var theme = material.useTheme();
11176
11273
 
11177
11274
  var handleClick = function handleClick(event) {
11178
11275
  setAnchorEl(anchorEl ? null : event.currentTarget);
@@ -11220,10 +11317,10 @@
11220
11317
  onWheel: onWheel,
11221
11318
  className: "opacity-select",
11222
11319
  "data-testid": "scrollOpacity",
11223
- sx: {
11320
+ sx: __assign({
11224
11321
  width: '100%',
11225
11322
  height: 32
11226
- }
11323
+ }, (_b = theme.palette.geowebColors.layerManager.opacitySelect) === null || _b === void 0 ? void 0 : _b.root)
11227
11324
  }, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
11228
11325
  title: "" + tooltipPrefix + currentOpacityText,
11229
11326
  sx: shared.tooltipContainerStyles(isEnabled),
@@ -11238,12 +11335,17 @@
11238
11335
  onMouseLeave: onMouseLeave,
11239
11336
  onFocus: onFocus,
11240
11337
  onBlur: onBlur,
11241
- style: {
11338
+ sx: __assign({
11242
11339
  height: '100%',
11243
11340
  width: '100%',
11244
11341
  borderRadius: '0',
11245
- minWidth: '49px'
11246
- },
11342
+ minWidth: '49px',
11343
+ fontSize: function fontSize(theme) {
11344
+ return theme.palette.geowebColors.layerManager.tableRowDefaultText.fontSize;
11345
+ },
11346
+ color: isEnabled ? 'geowebColors.layerManager.tableRowDefaultText.rgba' : 'geowebColors.layerManager.tableRowDisabledText.rgba'
11347
+ }, theme.palette.geowebColors.layerManager.opacitySelect.button),
11348
+ className: isOpen ? 'open' : '',
11247
11349
  // Safari-based browsers handle focus differently with buttons
11248
11350
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
11249
11351
  // Use div instead to fix onBlur hander's event.relatedTarget below
@@ -11256,14 +11358,14 @@
11256
11358
  },
11257
11359
  placement: "right"
11258
11360
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
11259
- sx: {
11361
+ sx: __assign({
11260
11362
  padding: '0 0 60px 0',
11261
11363
  backgroundColor: 'geowebColors.background.surface',
11262
11364
  width: '82px',
11263
11365
  height: '248px',
11264
11366
  boxSizing: 'initial',
11265
11367
  boxShadow: 8
11266
- }
11368
+ }, theme.palette.geowebColors.layerManager.opacitySelect.popper)
11267
11369
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
11268
11370
  sx: shared.sliderHeaderStyle
11269
11371
  }, "Opacity"), /*#__PURE__*/React__namespace.createElement(shared.CustomSlider, {
@@ -11417,8 +11519,8 @@
11417
11519
  * See the License for the specific language governing permissions and
11418
11520
  * limitations under the License.
11419
11521
  *
11420
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11421
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
11522
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11523
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11422
11524
  * */
11423
11525
 
11424
11526
  var getIconColor = function getIconColor(isActive, isEnabled) {
@@ -11508,7 +11610,8 @@
11508
11610
  isEnabled = _a.isEnabled;
11509
11611
  var isActive = current !== AutoOptions.NONE;
11510
11612
  var Icon = getIcon(isActive, isEnabled, current);
11511
- return /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
11613
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11614
+ variant: "tool",
11512
11615
  "aria-label": current,
11513
11616
  "data-testid": "activateLayer-btn",
11514
11617
  sx: {
@@ -11516,7 +11619,7 @@
11516
11619
  backgroundColor: 'inherit'
11517
11620
  }
11518
11621
  },
11519
- active: isActive
11622
+ isSelected: isActive
11520
11623
  }, Icon);
11521
11624
  };
11522
11625
 
@@ -11608,6 +11711,7 @@
11608
11711
  layerDeleteLayout = _a.layerDeleteLayout,
11609
11712
  layerMenuLayout = _a.layerMenuLayout,
11610
11713
  layerActiveLayout = _a.layerActiveLayout,
11714
+ disableActivateLayer = _a.disableActivateLayer,
11611
11715
  dragHandle = _a.dragHandle;
11612
11716
 
11613
11717
  var onClickRow = function onClickRow() {
@@ -11659,11 +11763,11 @@
11659
11763
  });
11660
11764
  },
11661
11765
  "data-testid": "enableButton-medium"
11662
- }, isEnabled ? /*#__PURE__*/React__default["default"].createElement(theme.Visibility, null) : /*#__PURE__*/React__default["default"].createElement(theme.VisibilityOff, null)), layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
11766
+ }, isEnabled ? /*#__PURE__*/React__default["default"].createElement(theme.Visibility, null) : /*#__PURE__*/React__default["default"].createElement(theme.VisibilityOff, null)), !disableActivateLayer && (layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
11663
11767
  current: AutoOptions.BOTH,
11664
11768
  onChange: onClickRow,
11665
11769
  isEnabled: true
11666
- }), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
11770
+ })), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
11667
11771
  sx: {
11668
11772
  fontWeight: '500',
11669
11773
  fontSize: '12px',
@@ -11744,11 +11848,11 @@
11744
11848
  });
11745
11849
  },
11746
11850
  "data-testid": "enableButton"
11747
- }, layer.enabled ? /*#__PURE__*/React__default["default"].createElement(theme.Visibility, null) : /*#__PURE__*/React__default["default"].createElement(theme.VisibilityOff, null)), layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
11851
+ }, layer.enabled ? /*#__PURE__*/React__default["default"].createElement(theme.Visibility, null) : /*#__PURE__*/React__default["default"].createElement(theme.VisibilityOff, null)), !disableActivateLayer && (layerActiveLayout || /*#__PURE__*/React__default["default"].createElement(ActivateLayer, {
11748
11852
  onChange: onClickRow,
11749
11853
  current: AutoOptions.BOTH,
11750
11854
  isEnabled: true
11751
- })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11855
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11752
11856
  item: true,
11753
11857
  className: columnClasses.column2
11754
11858
  }, layerServicesLayout || /*#__PURE__*/React__default["default"].createElement(RenderLayers, {
@@ -12431,7 +12535,7 @@
12431
12535
  * */
12432
12536
 
12433
12537
  var LayerRowConnect = function LayerRowConnect(_a) {
12434
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
12538
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
12435
12539
 
12436
12540
  var layerId = _a.layerId,
12437
12541
  mapId = _a.mapId,
@@ -12475,10 +12579,13 @@
12475
12579
  mapId: mapId,
12476
12580
  tooltipPrefix: (_g = settings === null || settings === void 0 ? void 0 : settings.opacity) === null || _g === void 0 ? void 0 : _g.tooltipPrefix
12477
12581
  }),
12478
- layerServicesLayout: /*#__PURE__*/React__namespace.createElement(RenderLayersConnect, {
12582
+ layerServicesLayout: ((_h = settings === null || settings === void 0 ? void 0 : settings.renderLayer) === null || _h === void 0 ? void 0 : _h.Element) ? /*#__PURE__*/React__namespace.createElement(settings.renderLayer.Element, {
12583
+ layerId: layerId,
12584
+ mapId: mapId
12585
+ }) : /*#__PURE__*/React__namespace.createElement(RenderLayersConnect, {
12479
12586
  layerId: layerId,
12480
12587
  mapId: mapId,
12481
- tooltipPrefix: (_h = settings === null || settings === void 0 ? void 0 : settings.renderLayer) === null || _h === void 0 ? void 0 : _h.tooltipPrefix
12588
+ tooltipPrefix: (_j = settings === null || settings === void 0 ? void 0 : settings.renderLayer) === null || _j === void 0 ? void 0 : _j.tooltipPrefix
12482
12589
  }),
12483
12590
  layerDimensionLayout: /*#__PURE__*/React__namespace.createElement(DimensionSelectConnect, {
12484
12591
  layerId: layerId,
@@ -12487,26 +12594,27 @@
12487
12594
  layerStylesLayout: /*#__PURE__*/React__namespace.createElement(RenderStylesConnect, {
12488
12595
  layerId: layerId,
12489
12596
  mapId: mapId,
12490
- tooltipPrefix: (_j = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _j === void 0 ? void 0 : _j.tooltipPrefix,
12491
- icon: (_k = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _k === void 0 ? void 0 : _k.icon
12597
+ tooltipPrefix: (_k = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _k === void 0 ? void 0 : _k.tooltipPrefix,
12598
+ icon: (_l = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _l === void 0 ? void 0 : _l.icon
12492
12599
  }),
12493
12600
  layerDeleteLayout: /*#__PURE__*/React__namespace.createElement(DeleteLayerConnect, {
12494
12601
  mapId: mapId,
12495
12602
  layerId: layerId,
12496
12603
  layerIndex: layerIndex,
12497
- tooltipTitle: (_l = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _l === void 0 ? void 0 : _l.tooltipTitle,
12498
- icon: (_m = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _m === void 0 ? void 0 : _m.icon
12604
+ tooltipTitle: (_m = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _m === void 0 ? void 0 : _m.tooltipTitle,
12605
+ icon: (_o = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _o === void 0 ? void 0 : _o.icon
12499
12606
  }),
12500
12607
  layerMenuLayout: /*#__PURE__*/React__namespace.createElement(LayerManagerMenuButtonConnect, {
12501
12608
  mapId: mapId,
12502
12609
  layerId: layerId,
12503
- tooltipTitle: (_o = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _o === void 0 ? void 0 : _o.tooltipTitle,
12504
- icon: (_p = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _p === void 0 ? void 0 : _p.icon
12610
+ tooltipTitle: (_p = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _p === void 0 ? void 0 : _p.tooltipTitle,
12611
+ icon: (_q = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _q === void 0 ? void 0 : _q.icon
12505
12612
  }),
12506
- layerActiveLayout: /*#__PURE__*/React__namespace.createElement(ActivateLayerConnect, {
12613
+ layerActiveLayout: ((_r = settings === null || settings === void 0 ? void 0 : settings.activateLayer) === null || _r === void 0 ? void 0 : _r.isDisabled) ? undefined : /*#__PURE__*/React__namespace.createElement(ActivateLayerConnect, {
12507
12614
  mapId: mapId,
12508
12615
  layerId: layerId
12509
12616
  }),
12617
+ disableActivateLayer: (_s = settings === null || settings === void 0 ? void 0 : settings.activateLayer) === null || _s === void 0 ? void 0 : _s.isDisabled,
12510
12618
  dragHandle: dragHandle
12511
12619
  });
12512
12620
  };
@@ -12554,8 +12662,8 @@
12554
12662
  disabled: isDisabled,
12555
12663
  sx: {
12556
12664
  cursor: isSorting ? 'grabbing' : 'grab',
12557
- '&:hover': {
12558
- backgroundColor: 'inherit!important'
12665
+ '&.handle:hover': function handleHover(theme) {
12666
+ return __assign({}, theme.palette.geowebColors.layerManager.dragHandleHover);
12559
12667
  },
12560
12668
  marginLeft: '3px',
12561
12669
  marginRight: '3px',
@@ -13592,7 +13700,7 @@
13592
13700
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13593
13701
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
13594
13702
  * */
13595
- var styles$3 = {
13703
+ var styles$4 = {
13596
13704
  buttonDiv: {
13597
13705
  position: 'relative'
13598
13706
  },
@@ -13635,7 +13743,7 @@
13635
13743
  }, []);
13636
13744
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
13637
13745
  onClick: handleClose,
13638
- sx: styles$3.button,
13746
+ sx: styles$4.button,
13639
13747
  disableRipple: true,
13640
13748
  "data-testid": "addLayersButton",
13641
13749
  ref: ref,
@@ -13667,32 +13775,33 @@
13667
13775
  * */
13668
13776
 
13669
13777
  var BaseLayerRow = function BaseLayerRow(_a) {
13670
- var _b, _c, _d;
13778
+ var _b, _c, _d, _e, _f;
13671
13779
 
13672
13780
  var mapId = _a.mapId,
13673
- _e = _a.preloadedAvailableBaseLayers,
13674
- preloadedAvailableBaseLayers = _e === void 0 ? availableDefaultBaseLayers : _e,
13675
- _f = _a.preloadedServices,
13676
- preloadedServices = _f === void 0 ? preloadedDefaultBaseServices : _f,
13677
- _g = _a.tooltip,
13678
- tooltip = _g === void 0 ? '' : _g,
13781
+ _g = _a.preloadedAvailableBaseLayers,
13782
+ preloadedAvailableBaseLayers = _g === void 0 ? availableDefaultBaseLayers : _g,
13783
+ _h = _a.preloadedServices,
13784
+ preloadedServices = _h === void 0 ? preloadedDefaultBaseServices : _h,
13785
+ _j = _a.tooltip,
13786
+ tooltip = _j === void 0 ? '' : _j,
13679
13787
  settings = _a.settings;
13788
+ var theme = material.useTheme();
13680
13789
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
13681
13790
  container: true,
13682
13791
  item: true,
13683
13792
  "data-testid": "baseLayerRow",
13684
13793
  className: "addLayer-column",
13685
- sx: {
13794
+ sx: __assign({
13686
13795
  width: '100%',
13687
13796
  height: '36px'
13688
- }
13797
+ }, theme.palette.geowebColors.layerManager.baseLayerRow.root)
13689
13798
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
13690
13799
  item: true,
13691
13800
  className: columnClasses.column1,
13692
13801
  sx: {
13693
13802
  marginTop: '-2px'
13694
13803
  }
13695
- }, /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
13804
+ }, !((_c = (_b = settings === null || settings === void 0 ? void 0 : settings.baseLayerRow) === null || _b === void 0 ? void 0 : _b.addLayersButton) === null || _c === void 0 ? void 0 : _c.isDisabled) && /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
13696
13805
  preloadedServices: preloadedServices,
13697
13806
  tooltip: tooltip,
13698
13807
  onRenderTree: function onRenderTree(service) {
@@ -13702,14 +13811,14 @@
13702
13811
  layerType: LayerType.baseLayer
13703
13812
  });
13704
13813
  }
13705
- })), (_b = settings === null || settings === void 0 ? void 0 : settings.baseLayerRow) === null || _b === void 0 ? void 0 : _b.title, /*#__PURE__*/React__namespace.createElement(material.Grid, {
13814
+ }), (_d = settings === null || settings === void 0 ? void 0 : settings.baseLayerRow) === null || _d === void 0 ? void 0 : _d.title), /*#__PURE__*/React__namespace.createElement(material.Grid, {
13706
13815
  item: true,
13707
13816
  className: columnClasses.column2
13708
13817
  }, /*#__PURE__*/React__namespace.createElement(BaseLayersConnect, {
13709
13818
  mapId: mapId,
13710
13819
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
13711
- tooltipPrefix: (_c = settings === null || settings === void 0 ? void 0 : settings.baseLayerDropdown) === null || _c === void 0 ? void 0 : _c.tooltipPrefix,
13712
- icon: (_d = settings === null || settings === void 0 ? void 0 : settings.baseLayerDropdown) === null || _d === void 0 ? void 0 : _d.icon
13820
+ tooltipPrefix: (_e = settings === null || settings === void 0 ? void 0 : settings.baseLayerDropdown) === null || _e === void 0 ? void 0 : _e.tooltipPrefix,
13821
+ icon: (_f = settings === null || settings === void 0 ? void 0 : settings.baseLayerDropdown) === null || _f === void 0 ? void 0 : _f.icon
13713
13822
  })));
13714
13823
  };
13715
13824
 
@@ -13745,7 +13854,8 @@
13745
13854
  var isDockedLayerManager = _a.isDockedLayerManager,
13746
13855
  mapId = _a.mapId,
13747
13856
  onClickDockButton = _a.onClickDockButton,
13748
- onChangeSize = _a.onChangeSize;
13857
+ onChangeSize = _a.onChangeSize,
13858
+ buttonSettings = _a.buttonSettings;
13749
13859
  var activeMapId = reactRedux.useSelector(function (store) {
13750
13860
  return getActiveWindowId(store);
13751
13861
  });
@@ -13757,7 +13867,8 @@
13757
13867
  isDockedLayerManager: isDockedLayerManager,
13758
13868
  shortcutsEnabled: shortcutsEnabled,
13759
13869
  onClickDockButton: onClickDockButton,
13760
- onChangeSize: onChangeSize
13870
+ onChangeSize: onChangeSize,
13871
+ buttonSettings: buttonSettings
13761
13872
  });
13762
13873
  };
13763
13874
 
@@ -13777,7 +13888,7 @@
13777
13888
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13778
13889
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
13779
13890
  * */
13780
- var styles$2 = {
13891
+ var styles$3 = {
13781
13892
  layerRowContainer: {
13782
13893
  position: 'relative',
13783
13894
  width: '100%',
@@ -13804,37 +13915,40 @@
13804
13915
  };
13805
13916
 
13806
13917
  var LayerManager = function LayerManager(_a) {
13918
+ var _b, _c, _d, _e, _f;
13919
+
13807
13920
  var mapId = _a.mapId,
13808
13921
  preloadedAvailableBaseLayers = _a.preloadedAvailableBaseLayers,
13809
13922
  preloadedBaseServices = _a.preloadedBaseServices,
13810
13923
  bounds = _a.bounds,
13811
13924
  onClose = _a.onClose,
13812
- showTitle = _a.showTitle,
13925
+ _g = _a.title,
13926
+ title = _g === void 0 ? 'Layer Manager' : _g,
13813
13927
  isOpen = _a.isOpen,
13814
- _b = _a.onMouseDown,
13815
- onMouseDown = _b === void 0 ? function () {} : _b,
13816
- _c = _a.order,
13817
- order = _c === void 0 ? 0 : _c,
13818
- _d = _a.source,
13819
- source = _d === void 0 ? 'app' : _d,
13820
- _e = _a.leftHeaderComponent,
13821
- leftHeaderComponent = _e === void 0 ? undefined : _e,
13822
- _f = _a.isLoading,
13823
- isLoading = _f === void 0 ? false : _f,
13928
+ _h = _a.onMouseDown,
13929
+ onMouseDown = _h === void 0 ? function () {} : _h,
13930
+ _j = _a.order,
13931
+ order = _j === void 0 ? 0 : _j,
13932
+ _k = _a.source,
13933
+ source = _k === void 0 ? 'app' : _k,
13934
+ _l = _a.leftHeaderComponent,
13935
+ leftHeaderComponent = _l === void 0 ? undefined : _l,
13936
+ _m = _a.isLoading,
13937
+ isLoading = _m === void 0 ? false : _m,
13824
13938
  error = _a.error,
13825
- _g = _a.isDockedLayerManager,
13826
- isDockedLayerManager = _g === void 0 ? false : _g,
13827
- _h = _a.onToggleDock,
13828
- onToggleDock = _h === void 0 ? function () {} : _h,
13829
- _j = _a.size,
13830
- size = _j === void 0 ? sizeLarge : _j,
13831
- _k = _a.startPosition,
13832
- startPosition = _k === void 0 ? {
13939
+ _o = _a.isDockedLayerManager,
13940
+ isDockedLayerManager = _o === void 0 ? false : _o,
13941
+ _p = _a.onToggleDock,
13942
+ onToggleDock = _p === void 0 ? function () {} : _p,
13943
+ _q = _a.size,
13944
+ size = _q === void 0 ? sizeLarge : _q,
13945
+ _r = _a.startPosition,
13946
+ startPosition = _r === void 0 ? {
13833
13947
  top: 85,
13834
13948
  left: 50
13835
- } : _k,
13836
- _l = _a.setFocused,
13837
- setFocused = _l === void 0 ? function () {} : _l,
13949
+ } : _r,
13950
+ _s = _a.setFocused,
13951
+ setFocused = _s === void 0 ? function () {} : _s,
13838
13952
  settings = _a.settings;
13839
13953
  var minSize = {
13840
13954
  width: 100,
@@ -13842,10 +13956,11 @@
13842
13956
  };
13843
13957
  var startSizeCalc = calculateStartSize(minSize, size, startPosition);
13844
13958
 
13845
- var _m = __read(React__namespace.useState(startSizeCalc), 2),
13846
- sizeInState = _m[0],
13847
- setSizeInState = _m[1];
13959
+ var _t = __read(React__namespace.useState(startSizeCalc), 2),
13960
+ sizeInState = _t[0],
13961
+ setSizeInState = _t[1];
13848
13962
 
13963
+ var theme = material.useTheme();
13849
13964
  React__namespace.useEffect(function () {
13850
13965
  if (size !== sizeInState && isDockedLayerManager && isOpen) {
13851
13966
  setSizeInState(size);
@@ -13853,7 +13968,7 @@
13853
13968
 
13854
13969
  }, [size, isOpen]);
13855
13970
  return /*#__PURE__*/React__namespace.createElement(shared.ToolContainerDraggable, {
13856
- title: showTitle ? "Layer Manager " + mapId : 'Layer Manager',
13971
+ title: title,
13857
13972
  startSize: sizeInState,
13858
13973
  minWidth: minSize.width,
13859
13974
  minHeight: minSize.height,
@@ -13882,10 +13997,13 @@
13882
13997
  setSizeInState(__assign(__assign({}, sizeInState), {
13883
13998
  width: width
13884
13999
  }));
13885
- }
14000
+ },
14001
+ buttonSettings: (_b = settings === null || settings === void 0 ? void 0 : settings.toolbar) === null || _b === void 0 ? void 0 : _b.controlButtonSettings
13886
14002
  }),
14003
+ dragHandleIcon: (_d = (_c = settings === null || settings === void 0 ? void 0 : settings.toolbar) === null || _c === void 0 ? void 0 : _c.dragHandle) === null || _d === void 0 ? void 0 : _d.icon,
14004
+ closeIcon: (_f = (_e = settings === null || settings === void 0 ? void 0 : settings.toolbar) === null || _e === void 0 ? void 0 : _e.closeButton) === null || _f === void 0 ? void 0 : _f.icon,
13887
14005
  className: "layermanager",
13888
- sx: layerManagerStyle,
14006
+ sx: __assign(__assign({}, layerManagerStyle), theme.palette.geowebColors.layerManager.root),
13889
14007
  onResizeStop: function onResizeStop(_event, _direction, node) {
13890
14008
  var width = node.offsetWidth,
13891
14009
  height = node.offsetHeight;
@@ -13922,7 +14040,7 @@
13922
14040
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
13923
14041
  container: true,
13924
14042
  "data-testid": "layerManagerRowContainer",
13925
- sx: styles$2.layerRowContainer
14043
+ sx: styles$3.layerRowContainer
13926
14044
  }, /*#__PURE__*/React__namespace.createElement(DescriptionRow, {
13927
14045
  mapPresetsModule: leftHeaderComponent,
13928
14046
  mapId: mapId,
@@ -14136,24 +14254,26 @@
14136
14254
  preloadedMapServices = _a.preloadedMapServices,
14137
14255
  preloadedBaseServices = _a.preloadedBaseServices,
14138
14256
  bounds = _a.bounds,
14139
- _b = _a.showTitle,
14140
- showTitle = _b === void 0 ? false : _b,
14141
- _c = _a.leftHeaderComponent,
14142
- leftHeaderComponent = _c === void 0 ? undefined : _c;
14257
+ _b = _a.title,
14258
+ title = _b === void 0 ? 'Layer Manager' : _b,
14259
+ _c = _a.showMapIdInTitle,
14260
+ showMapIdInTitle = _c === void 0 ? false : _c,
14261
+ _d = _a.leftHeaderComponent,
14262
+ leftHeaderComponent = _d === void 0 ? undefined : _d;
14143
14263
  var dispatch = reactRedux.useDispatch();
14144
14264
  var mapId = reactRedux.useSelector(function (store) {
14145
14265
  return getDialogMapId(store, dialogType);
14146
14266
  });
14147
14267
 
14148
- var _d = useSetupDialog(dialogType),
14149
- dialogOrder = _d.dialogOrder,
14150
- setDialogOrder = _d.setDialogOrder,
14151
- onCloseDialog = _d.onCloseDialog,
14152
- isDialogOpen = _d.isDialogOpen,
14153
- uiSource = _d.uiSource,
14154
- uiIsLoading = _d.uiIsLoading,
14155
- uiError = _d.uiError,
14156
- setFocused = _d.setFocused;
14268
+ var _e = useSetupDialog(dialogType),
14269
+ dialogOrder = _e.dialogOrder,
14270
+ setDialogOrder = _e.setDialogOrder,
14271
+ onCloseDialog = _e.onCloseDialog,
14272
+ isDialogOpen = _e.isDialogOpen,
14273
+ uiSource = _e.uiSource,
14274
+ uiIsLoading = _e.uiIsLoading,
14275
+ uiError = _e.uiError,
14276
+ setFocused = _e.setFocused;
14157
14277
 
14158
14278
  useFetchServices(dialogType, preloadedMapServices);
14159
14279
 
@@ -14166,6 +14286,7 @@
14166
14286
  }));
14167
14287
  };
14168
14288
 
14289
+ var shownTitle = showMapIdInTitle ? title + " " + mapId : title;
14169
14290
  return /*#__PURE__*/React__namespace.createElement(LayerManager, {
14170
14291
  mapId: mapId,
14171
14292
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
@@ -14173,7 +14294,7 @@
14173
14294
  bounds: bounds,
14174
14295
  isOpen: isDialogOpen,
14175
14296
  onClose: onCloseDialog,
14176
- showTitle: showTitle,
14297
+ title: shownTitle,
14177
14298
  onMouseDown: setDialogOrder,
14178
14299
  order: dialogOrder,
14179
14300
  source: uiSource,
@@ -14215,12 +14336,14 @@
14215
14336
  preloadedAvailableBaseLayers = _a.preloadedAvailableBaseLayers,
14216
14337
  preloadedBaseServices = _a.preloadedBaseServices,
14217
14338
  bounds = _a.bounds,
14218
- _b = _a.showTitle,
14219
- showTitle = _b === void 0 ? false : _b,
14220
- _c = _a.leftHeaderComponent,
14221
- leftHeaderComponent = _c === void 0 ? undefined : _c,
14222
- _d = _a.source,
14223
- source = _d === void 0 ? 'app' : _d;
14339
+ _b = _a.title,
14340
+ title = _b === void 0 ? 'Layer Manager' : _b,
14341
+ _c = _a.showMapIdInTitle,
14342
+ showMapIdInTitle = _c === void 0 ? false : _c,
14343
+ _d = _a.leftHeaderComponent,
14344
+ leftHeaderComponent = _d === void 0 ? undefined : _d,
14345
+ _e = _a.source,
14346
+ source = _e === void 0 ? 'app' : _e;
14224
14347
  var dispatch = reactRedux.useDispatch();
14225
14348
  var dockedLayerManagerSize = reactRedux.useSelector(function (store) {
14226
14349
  return getDockedLayerManagerSize(store, mapId);
@@ -14234,11 +14357,11 @@
14234
14357
 
14235
14358
  var dialogType = DialogTypes.DockedLayerManager + "-" + mapId;
14236
14359
 
14237
- var _e = useSetupDialog(dialogType, source),
14238
- dialogOrder = _e.dialogOrder,
14239
- isDialogOpen = _e.isDialogOpen,
14240
- setDialogOrder = _e.setDialogOrder,
14241
- onCloseDialog = _e.onCloseDialog;
14360
+ var _f = useSetupDialog(dialogType, source),
14361
+ dialogOrder = _f.dialogOrder,
14362
+ isDialogOpen = _f.isDialogOpen,
14363
+ setDialogOrder = _f.setDialogOrder,
14364
+ onCloseDialog = _f.onCloseDialog;
14242
14365
 
14243
14366
  var onToggleDock = function onToggleDock() {
14244
14367
  // Close docked layer manager and open the floating layer manager
@@ -14251,6 +14374,7 @@
14251
14374
  }));
14252
14375
  };
14253
14376
 
14377
+ var shownTitle = showMapIdInTitle ? title + " " + mapId : title;
14254
14378
  return /*#__PURE__*/React__namespace.createElement(LayerManager, {
14255
14379
  mapId: mapId,
14256
14380
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
@@ -14258,7 +14382,7 @@
14258
14382
  bounds: bounds,
14259
14383
  isOpen: isDialogOpen,
14260
14384
  onClose: onCloseDialog,
14261
- showTitle: showTitle,
14385
+ title: shownTitle,
14262
14386
  leftHeaderComponent: leftHeaderComponent,
14263
14387
  // isLoading={isMapPresetLoading}
14264
14388
  // error={mapPresetError}
@@ -14288,8 +14412,8 @@
14288
14412
  * See the License for the specific language governing permissions and
14289
14413
  * limitations under the License.
14290
14414
  *
14291
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14292
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
14415
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14416
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
14293
14417
  * */
14294
14418
 
14295
14419
  var KeywordFilterButtonConnect = function KeywordFilterButtonConnect(_a) {
@@ -14311,13 +14435,12 @@
14311
14435
  source: source
14312
14436
  }));
14313
14437
  }, [currentActiveMapId, dispatch, isOpenInStore, mapId, source]);
14314
- return /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
14438
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
14439
+ variant: "tool",
14315
14440
  onClick: openFilterResultsDialog,
14316
- active: isOpenInStore,
14441
+ isSelected: isOpenInStore,
14317
14442
  id: "keywordFilterButton",
14318
- "data-testid": "keywordFilterButton",
14319
- disableRipple: true,
14320
- variant: "tool"
14443
+ "data-testid": "keywordFilterButton"
14321
14444
  }, /*#__PURE__*/React__namespace.createElement(theme.Filter, null));
14322
14445
  };
14323
14446
 
@@ -14592,8 +14715,8 @@
14592
14715
  * See the License for the specific language governing permissions and
14593
14716
  * limitations under the License.
14594
14717
  *
14595
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14596
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
14718
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14719
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
14597
14720
  * */
14598
14721
 
14599
14722
  var LayerInfoButtonConnect = function LayerInfoButtonConnect(_a) {
@@ -14647,9 +14770,9 @@
14647
14770
  }
14648
14771
  };
14649
14772
 
14650
- return /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
14651
- variant: "icon",
14652
- active: isActive && isOpenInStore,
14773
+ return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
14774
+ variant: "flat",
14775
+ isSelected: isActive && isOpenInStore,
14653
14776
  onClick: onClick,
14654
14777
  id: "layerInfoButton",
14655
14778
  "aria-label": "layer info",
@@ -15155,59 +15278,6 @@
15155
15278
  }, {});
15156
15279
  };
15157
15280
 
15158
- /* *
15159
- * Licensed under the Apache License, Version 2.0 (the "License");
15160
- * you may not use this file except in compliance with the License.
15161
- * You may obtain a copy of the License at
15162
- *
15163
- * http://www.apache.org/licenses/LICENSE-2.0
15164
- *
15165
- * Unless required by applicable law or agreed to in writing, software
15166
- * distributed under the License is distributed on an "AS IS" BASIS,
15167
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15168
- * See the License for the specific language governing permissions and
15169
- * limitations under the License.
15170
- *
15171
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15172
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
15173
- * */
15174
- var highlightStyle = {
15175
- background: '#ffeecc'
15176
- };
15177
-
15178
- var SearchHighlight = function SearchHighlight(_a) {
15179
- var text = _a.text,
15180
- search = _a.search;
15181
-
15182
- if (search === '') {
15183
- return /*#__PURE__*/React__default["default"].createElement("span", null, text);
15184
- }
15185
-
15186
- var searchWords = search.split(' ').reduce(function (words, word) {
15187
- return word ? __spreadArray(__spreadArray([], __read(words)), [word.toLocaleLowerCase()]) : words;
15188
- }, []);
15189
- var searchRegex = searchWords.map(function (word) {
15190
- return _.escapeRegExp(word);
15191
- }).join('|');
15192
- var textParts = text.split(new RegExp("(" + searchRegex + ")", 'gi'));
15193
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, textParts.map(function (part, index) {
15194
- var key = part + "-" + index;
15195
-
15196
- if (searchWords.some(function (search) {
15197
- return part.toLocaleLowerCase().includes(search);
15198
- })) {
15199
- return /*#__PURE__*/React__default["default"].createElement("mark", {
15200
- key: key,
15201
- style: highlightStyle
15202
- }, part);
15203
- }
15204
-
15205
- return /*#__PURE__*/React__default["default"].createElement("span", {
15206
- key: key
15207
- }, part);
15208
- }));
15209
- };
15210
-
15211
15281
  /* *
15212
15282
  * Licensed under the Apache License, Version 2.0 (the "License");
15213
15283
  * you may not use this file except in compliance with the License.
@@ -15276,7 +15346,7 @@
15276
15346
  textOverflow: 'ellipsis',
15277
15347
  overflow: 'hidden'
15278
15348
  }
15279
- }, /*#__PURE__*/React__default["default"].createElement(SearchHighlight, {
15349
+ }, /*#__PURE__*/React__default["default"].createElement(shared.SearchHighlight, {
15280
15350
  text: layer.title,
15281
15351
  search: searchFilter
15282
15352
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
@@ -15292,7 +15362,7 @@
15292
15362
  textOverflow: 'ellipsis',
15293
15363
  overflow: 'hidden'
15294
15364
  }
15295
- }, /*#__PURE__*/React__default["default"].createElement(SearchHighlight, {
15365
+ }, /*#__PURE__*/React__default["default"].createElement(shared.SearchHighlight, {
15296
15366
  text: service.name,
15297
15367
  search: searchFilter
15298
15368
  })), /*#__PURE__*/React__default["default"].createElement(LayerInfoButtonConnect, {
@@ -15308,7 +15378,7 @@
15308
15378
  }, layer["abstract"] && /*#__PURE__*/React__default["default"].createElement(material.Typography, {
15309
15379
  "data-testid": "layerAbstract",
15310
15380
  sx: layerInfoStyle
15311
- }, /*#__PURE__*/React__default["default"].createElement(SearchHighlight, {
15381
+ }, /*#__PURE__*/React__default["default"].createElement(shared.SearchHighlight, {
15312
15382
  text: layer["abstract"],
15313
15383
  search: searchFilter
15314
15384
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
@@ -15325,12 +15395,12 @@
15325
15395
  sx: columns.column6
15326
15396
  }, layer.path.length > 0 && /*#__PURE__*/React__default["default"].createElement(material.Typography, {
15327
15397
  sx: layerInfoStyle
15328
- }, "Groups:", ' ', /*#__PURE__*/React__default["default"].createElement(SearchHighlight, {
15398
+ }, "Groups:", ' ', /*#__PURE__*/React__default["default"].createElement(shared.SearchHighlight, {
15329
15399
  text: layer.path.join(' / '),
15330
15400
  search: searchFilter
15331
15401
  })), ((_b = layer.keywords) === null || _b === void 0 ? void 0 : _b.length) > 0 && /*#__PURE__*/React__default["default"].createElement(material.Typography, {
15332
15402
  sx: layerInfoStyle
15333
- }, "Keywords:", ' ', /*#__PURE__*/React__default["default"].createElement(SearchHighlight, {
15403
+ }, "Keywords:", ' ', /*#__PURE__*/React__default["default"].createElement(shared.SearchHighlight, {
15334
15404
  text: layer.keywords.slice().sort(function (a, b) {
15335
15405
  return a.localeCompare(b);
15336
15406
  }).join(', '),
@@ -15787,7 +15857,7 @@
15787
15857
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15788
15858
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
15789
15859
  * */
15790
- var styles$1 = {
15860
+ var styles$2 = {
15791
15861
  servicesContainer: {
15792
15862
  width: '360px',
15793
15863
  maxHeight: '412px',
@@ -15854,7 +15924,7 @@
15854
15924
  (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.focus();
15855
15925
  }, []);
15856
15926
  return /*#__PURE__*/React__namespace.createElement(material.Box, {
15857
- sx: styles$1.servicesContainer,
15927
+ sx: styles$2.servicesContainer,
15858
15928
  "data-testid": "ServiceDialog",
15859
15929
  onKeyDown: function onKeyDown(event) {
15860
15930
  if (event.key !== 'Escape') {
@@ -15864,9 +15934,9 @@
15864
15934
  tabIndex: -1,
15865
15935
  ref: dialogRef
15866
15936
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
15867
- sx: styles$1.header
15937
+ sx: styles$2.header
15868
15938
  }, "Services"), /*#__PURE__*/React__namespace.createElement(material.Backdrop, {
15869
- sx: styles$1.loading,
15939
+ sx: styles$2.loading,
15870
15940
  open: isLoading
15871
15941
  }, /*#__PURE__*/React__namespace.createElement(material.CircularProgress, null)), /*#__PURE__*/React__namespace.createElement(Rows, {
15872
15942
  services: services,
@@ -15875,12 +15945,12 @@
15875
15945
  setServicePopupInfo: setServicePopupInfo,
15876
15946
  selectedLayers: selectedLayers
15877
15947
  }), /*#__PURE__*/React__namespace.createElement(material.Box, {
15878
- sx: styles$1.footer
15948
+ sx: styles$2.footer
15879
15949
  }, /*#__PURE__*/React__namespace.createElement(material.Button, {
15880
15950
  onClick: openAddService,
15881
15951
  onKeyDown: stopTabPropagation,
15882
15952
  "data-testid": "openAddServiceButton",
15883
- sx: styles$1.button,
15953
+ sx: styles$2.button,
15884
15954
  variant: "tertiary",
15885
15955
  startIcon: /*#__PURE__*/React__namespace.createElement(theme.Add, null)
15886
15956
  }, "Add a new service")));
@@ -17437,8 +17507,8 @@
17437
17507
  * See the License for the specific language governing permissions and
17438
17508
  * limitations under the License.
17439
17509
  *
17440
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17441
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
17510
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17511
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
17442
17512
  * */
17443
17513
 
17444
17514
  var MapControlButton = function MapControlButton(_a) {
@@ -17451,13 +17521,15 @@
17451
17521
  isActive = _c === void 0 ? false : _c,
17452
17522
  props = __rest(_a, ["onClick", "children", "title", "placement", "isActive"]);
17453
17523
 
17454
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
17455
- placement: placement,
17456
- title: title
17457
- }, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, __assign({
17524
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, __assign({
17525
+ variant: "tool",
17526
+ tooltipProps: {
17527
+ placement: placement,
17528
+ title: title
17529
+ },
17458
17530
  onClick: onClick,
17459
- active: isActive
17460
- }, props), children));
17531
+ isSelected: isActive
17532
+ }, props), children);
17461
17533
  };
17462
17534
 
17463
17535
  /* *
@@ -18254,8 +18326,8 @@
18254
18326
  * See the License for the specific language governing permissions and
18255
18327
  * limitations under the License.
18256
18328
  *
18257
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18258
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
18329
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18330
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18259
18331
  * */
18260
18332
  var titleOn = 'Auto update on';
18261
18333
  var titleOff = 'Auto update off';
@@ -18267,21 +18339,20 @@
18267
18339
  isAutoUpdating = _c === void 0 ? false : _c,
18268
18340
  _d = _a.disabled,
18269
18341
  disabled = _d === void 0 ? false : _d;
18270
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18271
- title: isAutoUpdating ? titleOn : titleOff,
18272
- "data-testid": "autoUpdateButtonTooltip"
18273
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18274
- active: isAutoUpdating,
18342
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18343
+ variant: "tool",
18344
+ isSelected: isAutoUpdating,
18275
18345
  disabled: disabled,
18276
18346
  onClick: function onClick() {
18277
18347
  return toggleAutoUpdate();
18278
18348
  },
18279
- "data-testid": "autoUpdateButton"
18349
+ "data-testid": "autoUpdateButton",
18350
+ tooltipTitle: isAutoUpdating ? titleOn : titleOff
18280
18351
  }, isAutoUpdating ? /*#__PURE__*/React__namespace.createElement(theme.AutoUpdateActive, {
18281
18352
  "data-testid": "auto-update-svg-on"
18282
18353
  }) : /*#__PURE__*/React__namespace.createElement(theme.AutoUpdateInActive, {
18283
18354
  "data-testid": "auto-update-svg-off"
18284
- }))));
18355
+ }));
18285
18356
  };
18286
18357
 
18287
18358
  /* *
@@ -18297,8 +18368,8 @@
18297
18368
  * See the License for the specific language governing permissions and
18298
18369
  * limitations under the License.
18299
18370
  *
18300
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18301
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
18371
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18372
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18302
18373
  * */
18303
18374
  var THROTTLE_WAIT_TIME = 300; // [ms]
18304
18375
 
@@ -18351,20 +18422,24 @@
18351
18422
  onKeyDown: function onKeyDown(event) {
18352
18423
  event.stopPropagation();
18353
18424
  }
18354
- }, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18355
- title: title
18356
- }, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18425
+ }, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18426
+ variant: "tool",
18427
+ tooltipTitle: title,
18357
18428
  onClick: function onClick() {
18358
18429
  setOpen(true);
18359
18430
  },
18360
18431
  ref: setAnchorRef,
18361
- active: true,
18362
- width: "100%",
18363
- onWheel: onWheel
18432
+ isSelected: true,
18433
+ onWheel: onWheel,
18434
+ sx: {
18435
+ padding: '11px!important',
18436
+ width: '100%!important'
18437
+ }
18364
18438
  }, icon, /*#__PURE__*/React__namespace.createElement(material.Typography, {
18365
18439
  fontSize: 12,
18366
- fontWeight: 400
18367
- }, displayVariableDuration ? minutesToDescribedDuration(value) : currentMark === null || currentMark === void 0 ? void 0 : currentMark.text))), /*#__PURE__*/React__namespace.createElement(material.Menu, {
18440
+ fontWeight: 400,
18441
+ textTransform: "none"
18442
+ }, displayVariableDuration ? minutesToDescribedDuration(value) : currentMark === null || currentMark === void 0 ? void 0 : currentMark.text)), /*#__PURE__*/React__namespace.createElement(material.Menu, {
18368
18443
  anchorEl: anchorRef,
18369
18444
  open: open,
18370
18445
  onClose: function onClose() {
@@ -18420,12 +18495,19 @@
18420
18495
  minHeight: '30px!important'
18421
18496
  }
18422
18497
  }
18423
- }, "length"), displayVariableDuration && /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18498
+ }, "length"), displayVariableDuration && /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18499
+ variant: "tool",
18424
18500
  "data-testid": "menu-animation-length-button",
18425
- active: false,
18426
- disableRipple: true,
18427
- width: "100%"
18428
- }, minutesToDescribedDuration(value))));
18501
+ sx: {
18502
+ padding: '11px!important',
18503
+ width: '100%!important'
18504
+ }
18505
+ }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
18506
+ fontSize: 14,
18507
+ fontWeight: 500,
18508
+ textTransform: "none",
18509
+ lineHeight: 2
18510
+ }, minutesToDescribedDuration(value)))));
18429
18511
  };
18430
18512
 
18431
18513
  /* *
@@ -18724,8 +18806,8 @@
18724
18806
  * See the License for the specific language governing permissions and
18725
18807
  * limitations under the License.
18726
18808
  *
18727
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18728
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
18809
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18810
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18729
18811
  * */
18730
18812
  var title$1 = 'Now';
18731
18813
 
@@ -18734,18 +18816,18 @@
18734
18816
  onSetNow = _b === void 0 ? function () {} : _b,
18735
18817
  _c = _a.disabled,
18736
18818
  disabled = _c === void 0 ? false : _c;
18737
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18738
- title: title$1,
18739
- "data-testid": "nowButtonTooltip"
18740
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18819
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18820
+ variant: "tool",
18821
+ "aria-label": "now",
18822
+ tooltipTitle: title$1,
18823
+ "data-testid": "nowButtonTooltip",
18741
18824
  disabled: disabled,
18742
18825
  onClick: function onClick() {
18743
18826
  return onSetNow();
18744
- },
18745
- "aria-label": "now"
18827
+ }
18746
18828
  }, /*#__PURE__*/React__namespace.createElement(theme.Now, {
18747
18829
  "data-testid": "now-svg"
18748
- }))));
18830
+ }));
18749
18831
  };
18750
18832
 
18751
18833
  /* *
@@ -18900,8 +18982,8 @@
18900
18982
  * See the License for the specific language governing permissions and
18901
18983
  * limitations under the License.
18902
18984
  *
18903
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18904
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
18985
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18986
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18905
18987
  * */
18906
18988
 
18907
18989
  var OptionsMenuButton = function OptionsMenuButton(_a) {
@@ -18927,21 +19009,22 @@
18927
19009
  setOpen(true);
18928
19010
  }
18929
19011
  }, [anchorEl, isOpenByDefault]);
18930
- return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
18931
- title: "Animation options",
18932
- placement: "bottom"
18933
- }, /*#__PURE__*/React__default["default"].createElement("span", {
18934
- ref: function ref(_ref) {
18935
- setAnchorEl(_ref);
18936
- }
18937
- }, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
19012
+ return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
19013
+ variant: "tool",
18938
19014
  onClick: function onClick() {
18939
19015
  setOpen(!open);
18940
19016
  },
18941
19017
  "data-testid": "optionsMenuButton",
18942
- active: open,
18943
- "aria-label": "animation options"
18944
- }, /*#__PURE__*/React__default["default"].createElement(theme.Options, null)))), /*#__PURE__*/React__default["default"].createElement(material.Popper, {
19018
+ isSelected: open,
19019
+ "aria-label": "animation options",
19020
+ tooltipProps: {
19021
+ title: 'Animation options',
19022
+ placement: 'bottom'
19023
+ },
19024
+ ref: function ref(_ref) {
19025
+ setAnchorEl(_ref);
19026
+ }
19027
+ }, /*#__PURE__*/React__default["default"].createElement(theme.Options, null)), /*#__PURE__*/React__default["default"].createElement(material.Popper, {
18945
19028
  sx: {
18946
19029
  zIndex: 3
18947
19030
  },
@@ -18950,7 +19033,11 @@
18950
19033
  "data-testid": "optionsMenuPopOver",
18951
19034
  anchorEl: anchorEl
18952
19035
  }, /*#__PURE__*/React__default["default"].createElement(material.Paper, {
18953
- elevation: 3
19036
+ elevation: 3,
19037
+ sx: {
19038
+ position: 'relative',
19039
+ top: 1
19040
+ }
18954
19041
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
18955
19042
  sx: {
18956
19043
  padding: '0px 10px 10px'
@@ -18980,8 +19067,8 @@
18980
19067
  * See the License for the specific language governing permissions and
18981
19068
  * limitations under the License.
18982
19069
  *
18983
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18984
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
19070
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
19071
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18985
19072
  * */
18986
19073
  var forwardTooltipTitle = 'Forward';
18987
19074
  var backwardTooltipTitle = 'Backward';
@@ -18991,17 +19078,17 @@
18991
19078
  isDisabled = _a.isDisabled,
18992
19079
  _b = _a.onClickBFButton,
18993
19080
  onClickBFButton = _b === void 0 ? function () {} : _b;
18994
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18995
- title: isForwardStep ? forwardTooltipTitle : backwardTooltipTitle
18996
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
19081
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
19082
+ variant: "tool",
18997
19083
  disabled: isDisabled,
18998
19084
  "aria-label": isForwardStep ? 'forward' : 'backward',
18999
- onClick: onClickBFButton
19085
+ onClick: onClickBFButton,
19086
+ tooltipTitle: isForwardStep ? forwardTooltipTitle : backwardTooltipTitle
19000
19087
  }, isForwardStep ? /*#__PURE__*/React__namespace.createElement(theme.StepForward, {
19001
19088
  "data-testid": "step-forward-svg-path"
19002
19089
  }) : /*#__PURE__*/React__namespace.createElement(theme.StepBackward, {
19003
19090
  "data-testid": "step-backward-svg-path"
19004
- }))));
19091
+ }));
19005
19092
  };
19006
19093
 
19007
19094
  /* *
@@ -19034,7 +19121,7 @@
19034
19121
  isForwardStep: true
19035
19122
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
19036
19123
  item: true
19037
- }, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null)));
19124
+ }, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton$1, null)));
19038
19125
  };
19039
19126
 
19040
19127
  /* *
@@ -20073,7 +20160,7 @@
20073
20160
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
20074
20161
  * */
20075
20162
  var TIME_SLIDER_LEGEND_HEIGHT = 24;
20076
- var DRAG_AREA_WIDTH = 24;
20163
+ var DRAG_AREA_WIDTH$1 = 24;
20077
20164
 
20078
20165
  function useAnimationTime(animationStartTime, animationEndTime, onSetAnimationStartTime, onSetAnimationEndTime, leftMarkerDragging, rightMarkerDragging, animationAreaDragging, centerTime, canvasWidth, secondsPerPx, dragTooltipPosition, pixelsToLeft, setTooltipTime, startDraggingPosition) {
20079
20166
  var _a = __read(React__namespace.useState(convertStringTimeToUnix(animationStartTime)), 2),
@@ -20128,7 +20215,7 @@
20128
20215
 
20129
20216
  if (leftMarkerDragging) {
20130
20217
  var mousePosition = leftMarkerPx + x;
20131
- var rightAnimationPosition = rightMarkerPx - DRAG_AREA_WIDTH * 2;
20218
+ var rightAnimationPosition = rightMarkerPx - DRAG_AREA_WIDTH$1 * 2;
20132
20219
 
20133
20220
  if (mousePosition >= rightAnimationPosition || mousePosition <= 0) {
20134
20221
  return;
@@ -20144,7 +20231,7 @@
20144
20231
 
20145
20232
  if (rightMarkerDragging) {
20146
20233
  var mousePosition = rightMarkerPx + x;
20147
- var leftAnimationPosition = leftMarkerPx + DRAG_AREA_WIDTH * 2;
20234
+ var leftAnimationPosition = leftMarkerPx + DRAG_AREA_WIDTH$1 * 2;
20148
20235
 
20149
20236
  if (leftAnimationPosition >= mousePosition || mousePosition >= canvasWidth) {
20150
20237
  return;
@@ -20333,7 +20420,7 @@
20333
20420
  selectedTimePx = _a[2]; // start dragging selected time.
20334
20421
 
20335
20422
 
20336
- if (isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH)) {
20423
+ if (isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH$1)) {
20337
20424
  setCursorStyle('grabbing');
20338
20425
  setSelectedTimeDragging(true);
20339
20426
  return;
@@ -20342,7 +20429,7 @@
20342
20429
  if (animationStartTime && animationEndTime) {
20343
20430
  dragTooltipPosition.current = pixelsToLeft ? x + pixelsToLeft : x; // start dragging either marker
20344
20431
 
20345
- if (isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH) && !rightMarkerDragging) {
20432
+ if (isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH$1) && !rightMarkerDragging) {
20346
20433
  setCursorStyle('grabbing');
20347
20434
  setLeftMarkerDragging(true);
20348
20435
  setTooltipTime(moment__default["default"].utc(animationStartTime));
@@ -20350,7 +20437,7 @@
20350
20437
  return;
20351
20438
  }
20352
20439
 
20353
- if (isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH) && !leftMarkerDragging) {
20440
+ if (isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH$1) && !leftMarkerDragging) {
20354
20441
  setCursorStyle('grabbing');
20355
20442
  setRightMarkerDragging(true);
20356
20443
  setTooltipTime(moment__default["default"].utc(animationEndTime));
@@ -20396,9 +20483,9 @@
20396
20483
  selectedTimePx = _a[2]; // Adjust mouse cursor while hovering draggable areas
20397
20484
 
20398
20485
 
20399
- var leftAnimationIconArea = isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH);
20400
- var rightAnimationIconArea = isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH);
20401
- var selectedTimeArea = isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH);
20486
+ var leftAnimationIconArea = isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH$1);
20487
+ var rightAnimationIconArea = isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH$1);
20488
+ var selectedTimeArea = isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH$1);
20402
20489
  var insideAnimationArea = isInsideAnimationArea(x, leftMarkerPx, rightMarkerPx);
20403
20490
  var hoveringLegendHandles = leftAnimationIconArea || rightAnimationIconArea || selectedTimeArea || mouseDownInLegend;
20404
20491
 
@@ -20471,22 +20558,21 @@
20471
20558
  * See the License for the specific language governing permissions and
20472
20559
  * limitations under the License.
20473
20560
  *
20474
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
20475
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
20561
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
20562
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
20476
20563
  * */
20477
20564
 
20478
20565
  var HideSliderButton = function HideSliderButton(_a) {
20479
20566
  var isVisible = _a.isVisible,
20480
20567
  toggleTimeSliderIsVisible = _a.toggleTimeSliderIsVisible;
20481
- return /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
20482
- title: isVisible ? 'Hide timeslider' : 'Show timeslider',
20483
- "data-testid": "autoUpdateButtonTooltip"
20484
- }, /*#__PURE__*/React__default["default"].createElement("span", null, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
20568
+ return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
20569
+ variant: "tool",
20485
20570
  onClick: function onClick() {
20486
20571
  toggleTimeSliderIsVisible(!isVisible);
20487
20572
  },
20488
- "data-testid": "hideTimeSliderButton"
20489
- }, isVisible ? /*#__PURE__*/React__default["default"].createElement(theme.ChevronDown, null) : /*#__PURE__*/React__default["default"].createElement(theme.ChevronUp, null))));
20573
+ "data-testid": "hideTimeSliderButton",
20574
+ tooltipTitle: isVisible ? 'Hide timeslider' : 'Show timeslider'
20575
+ }, isVisible ? /*#__PURE__*/React__default["default"].createElement(theme.ChevronDown, null) : /*#__PURE__*/React__default["default"].createElement(theme.ChevronUp, null));
20490
20576
  };
20491
20577
 
20492
20578
  /* *
@@ -21856,7 +21942,7 @@
21856
21942
  var tileRenderSettings = {
21857
21943
  WorldMap_Light_Grey_Canvas: {
21858
21944
  'EPSG:3857': {
21859
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap_Light_Grey_Canvas/EPSG3857/',
21945
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap_Light_Grey_Canvas/EPSG3857/',
21860
21946
  minLevel: 0,
21861
21947
  maxLevel: 9,
21862
21948
  tileServerType: 'osm',
@@ -21865,7 +21951,7 @@
21865
21951
  },
21866
21952
  OpenStreetMap_NL: {
21867
21953
  'EPSG:3857': {
21868
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OpenStreetMap_NL/EPSG3857/',
21954
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreetMap_NL/EPSG3857/',
21869
21955
  minLevel: 0,
21870
21956
  maxLevel: 16,
21871
21957
  tileServerType: 'osm',
@@ -21874,14 +21960,14 @@
21874
21960
  },
21875
21961
  OpenStreets_NL: {
21876
21962
  'EPSG:3857': {
21877
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OpenStreets_NL/EPSG3857/',
21963
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG3857/',
21878
21964
  minLevel: 0,
21879
21965
  maxLevel: 16,
21880
21966
  tileServerType: 'osm',
21881
21967
  copyRight: 'OpenStreetMap - contributors | Ingmapping'
21882
21968
  },
21883
21969
  'EPSG:28992': {
21884
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OpenStreets_NL/EPSG28992/',
21970
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG28992/',
21885
21971
  minLevel: 0,
21886
21972
  maxLevel: 16,
21887
21973
  tileServerType: 'osm',
@@ -21890,7 +21976,7 @@
21890
21976
  },
21891
21977
  Positron_NL: {
21892
21978
  'EPSG:3857': {
21893
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Positron_NL/EPSG3857/',
21979
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL/EPSG3857/',
21894
21980
  minLevel: 0,
21895
21981
  maxLevel: 16,
21896
21982
  tileServerType: 'osm',
@@ -21899,7 +21985,7 @@
21899
21985
  },
21900
21986
  Positron_NL_NoLabels: {
21901
21987
  'EPSG:3857': {
21902
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Positron_NL_NoLabels/EPSG3857/',
21988
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL_NoLabels/EPSG3857/',
21903
21989
  minLevel: 0,
21904
21990
  maxLevel: 16,
21905
21991
  tileServerType: 'osm',
@@ -21908,7 +21994,7 @@
21908
21994
  },
21909
21995
  Klokantech_Basic_NL: {
21910
21996
  'EPSG:3857': {
21911
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Klokantech_Basic_NL/EPSG3857/',
21997
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL/EPSG3857/',
21912
21998
  minLevel: 0,
21913
21999
  maxLevel: 16,
21914
22000
  tileServerType: 'osm',
@@ -21917,7 +22003,7 @@
21917
22003
  },
21918
22004
  Klokantech_Basic_NL_NoLabels: {
21919
22005
  'EPSG:3857': {
21920
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Klokantech_Basic_NL_NoLabels/EPSG3857/',
22006
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL_NoLabels/EPSG3857/',
21921
22007
  minLevel: 0,
21922
22008
  maxLevel: 16,
21923
22009
  tileServerType: 'osm',
@@ -21926,7 +22012,7 @@
21926
22012
  },
21927
22013
  OSM_Blossom_NL: {
21928
22014
  'EPSG:3857': {
21929
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OSM_Blossom_NL/EPSG3857/',
22015
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Blossom_NL/EPSG3857/',
21930
22016
  minLevel: 0,
21931
22017
  maxLevel: 16,
21932
22018
  tileServerType: 'osm',
@@ -21935,14 +22021,14 @@
21935
22021
  },
21936
22022
  WorldMap: {
21937
22023
  'EPSG:3857': {
21938
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3857/',
22024
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3857/',
21939
22025
  minLevel: 0,
21940
22026
  maxLevel: 9,
21941
22027
  tileServerType: 'osm',
21942
22028
  copyRight: 'Natural Earth II | Ingmapping'
21943
22029
  },
21944
22030
  'TODO__EPSG:4326': {
21945
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG4326/',
22031
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG4326/',
21946
22032
  minLevel: 0,
21947
22033
  maxLevel: 9,
21948
22034
  origX: -180,
@@ -21952,42 +22038,42 @@
21952
22038
  copyRight: 'Natural Earth II | Ingmapping'
21953
22039
  },
21954
22040
  'EPSG:3411': {
21955
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3411/',
22041
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3411/',
21956
22042
  minLevel: 3,
21957
22043
  maxLevel: 9,
21958
22044
  tileServerType: 'osm',
21959
22045
  copyRight: 'Natural Earth II | Ingmapping'
21960
22046
  },
21961
22047
  'EPSG:28992': {
21962
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG28992/',
22048
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG28992/',
21963
22049
  minLevel: 5,
21964
22050
  maxLevel: 9,
21965
22051
  tileServerType: 'osm',
21966
22052
  copyRight: 'Natural Earth II | Ingmapping'
21967
22053
  },
21968
22054
  'EPSG:3412': {
21969
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3412/',
22055
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3412/',
21970
22056
  minLevel: 3,
21971
22057
  maxLevel: 9,
21972
22058
  tileServerType: 'osm',
21973
22059
  copyRight: 'Natural Earth II | Ingmapping'
21974
22060
  },
21975
22061
  'EPSG:32661': {
21976
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG32661/',
22062
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG32661/',
21977
22063
  minLevel: 4,
21978
22064
  maxLevel: 9,
21979
22065
  tileServerType: 'osm',
21980
22066
  copyRight: 'Natural Earth II | Ingmapping'
21981
22067
  },
21982
22068
  'EPSG:54030': {
21983
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG54030/',
22069
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG54030/',
21984
22070
  minLevel: 3,
21985
22071
  maxLevel: 9,
21986
22072
  tileServerType: 'osm',
21987
22073
  copyRight: 'Natural Earth II | Ingmapping'
21988
22074
  },
21989
22075
  'EPSG:3575': {
21990
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3575/',
22076
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3575/',
21991
22077
  minLevel: 5,
21992
22078
  maxLevel: 9,
21993
22079
  tileServerType: 'osm',
@@ -21996,7 +22082,7 @@
21996
22082
  },
21997
22083
  OSM_Antarctica: {
21998
22084
  'EPSG:3412': {
21999
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OSM_Antarctica/EPSG3412/',
22085
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Antarctica/EPSG3412/',
22000
22086
  minLevel: 1,
22001
22087
  maxLevel: 7,
22002
22088
  origX: -3000000,
@@ -22099,7 +22185,7 @@
22099
22185
  },
22100
22186
  NaturalEarth2: {
22101
22187
  'EPSG:3411': {
22102
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3411/',
22188
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3411/',
22103
22189
  minLevel: 1,
22104
22190
  maxLevel: 6,
22105
22191
  origX: -12400000,
@@ -22109,7 +22195,7 @@
22109
22195
  copyRight: 'NPS - Natural Earth II'
22110
22196
  },
22111
22197
  'EPSG:3412': {
22112
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3412/',
22198
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3412/',
22113
22199
  minLevel: 1,
22114
22200
  maxLevel: 6,
22115
22201
  origX: -12400000,
@@ -22119,7 +22205,7 @@
22119
22205
  copyRight: 'NPS - Natural Earth II'
22120
22206
  },
22121
22207
  'EPSG:3575': {
22122
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3575/',
22208
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3575/',
22123
22209
  minLevel: 1,
22124
22210
  maxLevel: 6,
22125
22211
  origX: -13000000,
@@ -22129,14 +22215,14 @@
22129
22215
  copyRight: 'NPS - Natural Earth II'
22130
22216
  },
22131
22217
  'EPSG:3857': {
22132
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3857/',
22218
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3857/',
22133
22219
  minLevel: 1,
22134
22220
  maxLevel: 7,
22135
22221
  tileServerType: 'wmst',
22136
22222
  copyRight: 'NPS - Natural Earth II'
22137
22223
  },
22138
22224
  'EPSG:4258': {
22139
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG4326/',
22225
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
22140
22226
  minLevel: 1,
22141
22227
  maxLevel: 6,
22142
22228
  origX: -180,
@@ -22146,7 +22232,7 @@
22146
22232
  copyRight: 'NPS - Natural Earth II'
22147
22233
  },
22148
22234
  'EPSG:4326': {
22149
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG4326/',
22235
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
22150
22236
  minLevel: 1,
22151
22237
  maxLevel: 6,
22152
22238
  origX: -180,
@@ -22156,7 +22242,7 @@
22156
22242
  copyRight: 'NPS - Natural Earth II'
22157
22243
  },
22158
22244
  'EPSG:28992': {
22159
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG28992/',
22245
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG28992/',
22160
22246
  minLevel: 1,
22161
22247
  maxLevel: 5,
22162
22248
  origX: -2999000,
@@ -22166,7 +22252,7 @@
22166
22252
  copyRight: 'NPS - Natural Earth II'
22167
22253
  },
22168
22254
  'EPSG:32661': {
22169
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG32661/',
22255
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG32661/',
22170
22256
  minLevel: 1,
22171
22257
  maxLevel: 7,
22172
22258
  origX: -5000000,
@@ -22176,7 +22262,7 @@
22176
22262
  copyRight: 'NPS - Natural Earth II'
22177
22263
  },
22178
22264
  'EPSG:54030': {
22179
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG54030/',
22265
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG54030/',
22180
22266
  minLevel: 1,
22181
22267
  maxLevel: 7,
22182
22268
  origX: -17000000,
@@ -22204,88 +22290,50 @@
22204
22290
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22205
22291
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
22206
22292
  * */
22207
- var getCurrentDimensionValue = function getCurrentDimensionValue(dimensions, name) {
22208
- if (dimensions === void 0) {
22209
- dimensions = [];
22210
- }
22211
-
22212
- var currentDimension = dimensions.find(function (dim) {
22213
- return dim.name === name;
22214
- });
22215
- return currentDimension === null || currentDimension === void 0 ? void 0 : currentDimension.currentValue;
22216
- };
22217
- var setServiceMetadata = function setServiceMetadata(wmLayer, mapId, mapProperties, onUpdateLayerInformation) {
22293
+ var setLayerInfo = function setLayerInfo(wmLayer, mapId, onUpdateLayerInformation) {
22218
22294
  var origin = LayerActionOrigin.ReactMapViewParseLayer;
22219
- var service = webmap.WMGetServiceFromStore(wmLayer.service);
22220
- var serviceName = mapProperties.services && mapProperties.services[service.id] && mapProperties.services[service.id].name || service.id;
22221
- var webMapJSInstance = getWMJSMapById(mapId);
22295
+ var map = getWMJSMapById(mapId);
22222
22296
  /* Update list of layers for service */
22223
22297
 
22224
- var done = function done(layers) {
22225
- var updateObject = {
22298
+ var updateObject = {
22299
+ origin: origin,
22300
+ layerStyle: {
22226
22301
  origin: origin,
22227
- serviceLayers: {
22228
- name: serviceName,
22229
- id: service.id,
22230
- serviceUrl: wmLayer.service,
22231
- layers: layers,
22232
- scope: 'system'
22233
- },
22234
- layerStyle: {
22235
- origin: origin,
22236
- layerId: wmLayer.ReactWMJSLayerId,
22237
- style: wmLayer.currentStyle
22238
- },
22239
- mapDimensions: {
22240
- origin: origin,
22241
- mapId: mapId,
22242
- dimensions: webMapJSInstance.mapdimensions.map(function (_a) {
22243
- var name = _a.name,
22244
- units = _a.units,
22245
- currentValue = _a.currentValue,
22246
- synced = _a.synced;
22247
- var reactDim = mapProperties.dimensions && mapProperties.dimensions.find(function (dim) {
22248
- return dim.name === name;
22249
- });
22250
- var newDimValue = reactDim && reactDim.currentValue || currentValue;
22251
- var newDimSynced = reactDim && reactDim.synced || synced;
22252
- return {
22253
- name: name,
22254
- units: units,
22255
- currentValue: newDimValue,
22256
- synced: newDimSynced
22257
- };
22258
- })
22259
- },
22260
- layerDimensions: {
22261
- origin: origin,
22262
- layerId: wmLayer.id,
22263
- dimensions: wmLayer.dimensions.map(function (dim) {
22264
- var name = dim.name,
22265
- units = dim.units,
22266
- synced = dim.synced;
22267
- var currentDimensionValue = getCurrentDimensionValue(wmLayer.dimensions, name);
22268
- var newDimensionValue = currentDimensionValue || dim.getValue();
22269
- return {
22270
- name: name,
22271
- units: units,
22272
- currentValue: newDimensionValue,
22273
- minValue: dim.getFirstValue(),
22274
- maxValue: dim.getLastValue(),
22275
- timeInterval: dim.getDimInterval(),
22276
- values: dim.getValues(),
22277
- synced: synced
22278
- };
22279
- })
22280
- }
22281
- };
22282
- onUpdateLayerInformation && onUpdateLayerInformation(updateObject);
22302
+ layerId: wmLayer.ReactWMJSLayerId,
22303
+ style: wmLayer.currentStyle
22304
+ },
22305
+ mapDimensions: {
22306
+ mapId: mapId,
22307
+ origin: origin,
22308
+ dimensions: map && map.mapdimensions.map(function (mapdim) {
22309
+ return {
22310
+ units: mapdim.units,
22311
+ currentValue: mapdim.currentValue,
22312
+ name: mapdim.name
22313
+ };
22314
+ }) || []
22315
+ },
22316
+ layerDimensions: {
22317
+ origin: origin,
22318
+ layerId: wmLayer.id,
22319
+ dimensions: wmLayer.dimensions.map(function (dim) {
22320
+ var name = dim.name,
22321
+ units = dim.units,
22322
+ synced = dim.synced;
22323
+ return {
22324
+ name: name,
22325
+ units: units,
22326
+ currentValue: dim.getValue(),
22327
+ minValue: dim.getFirstValue(),
22328
+ maxValue: dim.getLastValue(),
22329
+ timeInterval: dim.getDimInterval(),
22330
+ values: dim.getValues(),
22331
+ synced: synced
22332
+ };
22333
+ })
22334
+ }
22283
22335
  };
22284
-
22285
- service.getLayerObjectsFlat(done, function () {// do nothing
22286
- }, false, {
22287
- headers: wmLayer.headers
22288
- });
22336
+ onUpdateLayerInformation && onUpdateLayerInformation(updateObject);
22289
22337
  };
22290
22338
 
22291
22339
  /* *
@@ -22384,8 +22432,7 @@
22384
22432
  coordinateIndexInFeature: polygonIndex
22385
22433
  };
22386
22434
  }
22387
- } catch (e) {
22388
- console.warn(e);
22435
+ } catch (e) {// console.warn(e);
22389
22436
  }
22390
22437
  }
22391
22438
  }
@@ -24993,7 +25040,7 @@
24993
25040
  mapId = _a.mapId;
24994
25041
 
24995
25042
  try {
24996
- setServiceMetadata(wmLayer, mapId, _this.props, onUpdateLayerInformation);
25043
+ setLayerInfo(wmLayer, mapId, onUpdateLayerInformation);
24997
25044
  } catch (e) {
24998
25045
  /* Provide a hint on what is going wrong */
24999
25046
  console.error(e);
@@ -25285,7 +25332,6 @@
25285
25332
  mapId_1 = props.mapId;
25286
25333
  onUpdateLayerInformation && onUpdateLayerInformation({
25287
25334
  origin: ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO,
25288
- serviceLayers: null,
25289
25335
  layerStyle: null,
25290
25336
  layerDimensions: null,
25291
25337
  mapDimensions: {
@@ -26463,8 +26509,8 @@
26463
26509
  * See the License for the specific language governing permissions and
26464
26510
  * limitations under the License.
26465
26511
  *
26466
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
26467
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
26512
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
26513
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
26468
26514
  * */
26469
26515
  var ClockContainer = function ClockContainer(_a) {
26470
26516
  var fontSize = _a.fontSize,
@@ -26497,13 +26543,14 @@
26497
26543
  item: true,
26498
26544
  zIndex: 2,
26499
26545
  ref: setButtonElement
26500
- }, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
26546
+ }, /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
26547
+ variant: "tool",
26501
26548
  onClick: onButtonClick,
26502
26549
  sx: {
26503
26550
  color: '#fff!important'
26504
26551
  },
26505
26552
  "aria-label": "Animation options",
26506
- active: isPopperOpen
26553
+ isSelected: isPopperOpen
26507
26554
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
26508
26555
  isPopperOpen: isPopperOpen,
26509
26556
  popperPlacement: popperPlacement
@@ -26942,6 +26989,31 @@
26942
26989
  });
26943
26990
  };
26944
26991
 
26992
+ /* *
26993
+ * Licensed under the Apache License, Version 2.0 (the "License");
26994
+ * you may not use this file except in compliance with the License.
26995
+ * You may obtain a copy of the License at
26996
+ *
26997
+ * http://www.apache.org/licenses/LICENSE-2.0
26998
+ *
26999
+ * Unless required by applicable law or agreed to in writing, software
27000
+ * distributed under the License is distributed on an "AS IS" BASIS,
27001
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27002
+ * See the License for the specific language governing permissions and
27003
+ * limitations under the License.
27004
+ *
27005
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
27006
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
27007
+ * */
27008
+ var sanitizeHTML = function sanitizeHTML(htmlToBeSanitezed) {
27009
+ return {
27010
+ __html: DOMPurify__namespace.sanitize(htmlToBeSanitezed, {
27011
+ ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'a', 'table', 'td', 'tr', 'br', 'hr', 'th'],
27012
+ ALLOWED_ATTR: ['href']
27013
+ })
27014
+ };
27015
+ };
27016
+
26945
27017
  /* *
26946
27018
  * Licensed under the Apache License, Version 2.0 (the "License");
26947
27019
  * you may not use this file except in compliance with the License.
@@ -27146,9 +27218,7 @@
27146
27218
  },
27147
27219
  "data-testid": "layer-result-ready-" + layerId,
27148
27220
  // eslint-disable-next-line react/no-danger
27149
- dangerouslySetInnerHTML: {
27150
- __html: result.data.replace(/<hr\/>/g, '')
27151
- }
27221
+ dangerouslySetInnerHTML: sanitizeHTML(result.data)
27152
27222
  }) : /*#__PURE__*/React__default["default"].createElement("div", {
27153
27223
  "data-testid": "layer-result-loading-" + layerId
27154
27224
  }, /*#__PURE__*/React__default["default"].createElement(material.CircularProgress, {
@@ -27523,17 +27593,27 @@
27523
27593
  var syncGroupAddTarget = React__default["default"].useCallback(function (payload) {
27524
27594
  dispatch(genericActions.syncGroupAddTarget(payload));
27525
27595
  }, [dispatch]);
27596
+ var syncTargets = reactRedux.useSelector(function (store) {
27597
+ return getSyncGroupTargets(store);
27598
+ });
27526
27599
  React__default["default"].useEffect(function () {
27527
27600
  maps.forEach(function (map) {
27528
27601
  map.syncGroupsIds && map.syncGroupsIds.forEach(function (syncGroupsId) {
27529
- syncGroupAddTarget({
27530
- groupId: syncGroupsId,
27531
- targetId: map.id,
27532
- linked: true
27533
- });
27602
+ var alreadySyncedTargetIndex = syncTargets.findIndex(function (target) {
27603
+ return target.targetId === map.id && target.groupId === syncGroupsId && target.linked === true;
27604
+ }); // Only trigger an action if the target was not yet added to the group or was not linked.
27605
+
27606
+ if (alreadySyncedTargetIndex === -1) {
27607
+ syncGroupAddTarget({
27608
+ groupId: syncGroupsId,
27609
+ targetId: map.id,
27610
+ linked: true,
27611
+ origin: 'system'
27612
+ });
27613
+ }
27534
27614
  });
27535
27615
  });
27536
- }, [maps, syncGroupAddTarget]);
27616
+ }, [maps, syncGroupAddTarget, syncTargets]);
27537
27617
  var mapStyle = {
27538
27618
  width: Math.round(100 / cols) + "%",
27539
27619
  height: Math.round(100 / rows) + "%"
@@ -27830,6 +27910,982 @@
27830
27910
  });
27831
27911
  };
27832
27912
 
27913
+ /* *
27914
+ * Licensed under the Apache License, Version 2.0 (the "License");
27915
+ * you may not use this file except in compliance with the License.
27916
+ * You may obtain a copy of the License at
27917
+ *
27918
+ * http://www.apache.org/licenses/LICENSE-2.0
27919
+ *
27920
+ * Unless required by applicable law or agreed to in writing, software
27921
+ * distributed under the License is distributed on an "AS IS" BASIS,
27922
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27923
+ * See the License for the specific language governing permissions and
27924
+ * limitations under the License.
27925
+ *
27926
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
27927
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
27928
+ * */
27929
+ var DAY_TO_MILLISECOND = 24 * 60 * 60 * 1000;
27930
+ var DAY_TO_SECOND = 86400;
27931
+ var MILLISECOND_TO_DAY = 1 / 86400000;
27932
+ var MILLISECOND_TO_SECOND = 1 / 1000;
27933
+ var MINUTE_TO_SECOND = 60;
27934
+ var SECOND_TO_MILLISECOND = 1000;
27935
+ var ONE_DAY_IN_SECONDS = DAY_TO_SECOND;
27936
+ /**
27937
+ * Reformats a date that has capitalized first letter and colon separator for time
27938
+ * @param dateString Date string from Date.toLocaleDateString
27939
+ * @returns Reformatted date string
27940
+ */
27941
+
27942
+ var reformatFinnishDateString = function reformatFinnishDateString(dateString) {
27943
+ var charPositionOfTimestamp = -4;
27944
+ return dateString.charAt(0).toUpperCase() + dateString.slice(1, charPositionOfTimestamp) + dateString.slice(charPositionOfTimestamp).replace('.', ':');
27945
+ };
27946
+ var getMonthChanges = function getMonthChanges(startDate, endDate) {
27947
+ var result = [];
27948
+ var currentDate = new Date(startDate.getTime());
27949
+ var lastDate = new Date(endDate.getTime());
27950
+ currentDate.setDate(1);
27951
+ currentDate.setHours(0, 0, 0, 0);
27952
+
27953
+ while (currentDate <= lastDate) {
27954
+ result.push(currentDate.getTime() * MILLISECOND_TO_SECOND);
27955
+ currentDate.setMonth(currentDate.getMonth() + 1);
27956
+ }
27957
+
27958
+ return result;
27959
+ };
27960
+ var getSelectedTimePx = function getSelectedTimePx(startTime, endTime, selectedTime, width) {
27961
+ var startDate = new Date(startTime * SECOND_TO_MILLISECOND);
27962
+ var startDateX = startDate.getTime() * MILLISECOND_TO_SECOND;
27963
+ var selectedTimeX = selectedTime - startDateX;
27964
+ var needleX = Math.floor(selectedTimeX / (endTime - startTime) * width);
27965
+ return needleX;
27966
+ };
27967
+ var boundedValue = function boundedValue(value, bounds) {
27968
+ var _a = __read(bounds, 2),
27969
+ min = _a[0],
27970
+ max = _a[1];
27971
+
27972
+ return Math.max(min, Math.min(max, value));
27973
+ };
27974
+ var getSelectedTimeFromPx = function getSelectedTimeFromPx(startTime, endTime, selectedTimePx, width) {
27975
+ var startDate = new Date(startTime * SECOND_TO_MILLISECOND);
27976
+ var startDateX = startDate.getTime() * MILLISECOND_TO_SECOND;
27977
+ var selectedTimeX = Math.floor(selectedTimePx / width * (endTime - startTime));
27978
+ var selectedTime = selectedTimeX + startDateX;
27979
+ return selectedTime;
27980
+ };
27981
+ var TickMode;
27982
+
27983
+ (function (TickMode) {
27984
+ TickMode[TickMode["DAY"] = 1] = "DAY";
27985
+ TickMode[TickMode["HALF_A_DAY"] = 2] = "HALF_A_DAY";
27986
+ TickMode[TickMode["SIX_HOURS"] = 4] = "SIX_HOURS";
27987
+ TickMode[TickMode["THREE_HOURS"] = 8] = "THREE_HOURS";
27988
+ TickMode[TickMode["ONE_HOUR"] = 24] = "ONE_HOUR";
27989
+ TickMode[TickMode["HALF_AN_HOUR"] = 48] = "HALF_AN_HOUR";
27990
+ TickMode[TickMode["FIFTEEN_MINUTES"] = 96] = "FIFTEEN_MINUTES";
27991
+ })(TickMode || (TickMode = {}));
27992
+
27993
+ var subTicksPerDay = function subTicksPerDay(dayWidthInPixels) {
27994
+ if (dayWidthInPixels < 40) {
27995
+ return TickMode.DAY;
27996
+ }
27997
+
27998
+ if (dayWidthInPixels < 75) {
27999
+ return TickMode.HALF_A_DAY;
28000
+ }
28001
+
28002
+ if (dayWidthInPixels < 400) {
28003
+ return TickMode.SIX_HOURS;
28004
+ }
28005
+
28006
+ if (dayWidthInPixels < 800) {
28007
+ return TickMode.THREE_HOURS;
28008
+ }
28009
+
28010
+ if (dayWidthInPixels < 1600) {
28011
+ return TickMode.ONE_HOUR;
28012
+ }
28013
+
28014
+ if (dayWidthInPixels < 3200) {
28015
+ return TickMode.HALF_AN_HOUR;
28016
+ }
28017
+
28018
+ return TickMode.FIFTEEN_MINUTES;
28019
+ };
28020
+ var maxSubTicksPerDay = function maxSubTicksPerDay(dayWidthInPixels, timeStep) {
28021
+ return Math.min(subTicksPerDay(dayWidthInPixels), Math.floor(ONE_DAY_IN_SECONDS / timeStep));
28022
+ };
28023
+
28024
+ /* *
28025
+ * Licensed under the Apache License, Version 2.0 (the "License");
28026
+ * you may not use this file except in compliance with the License.
28027
+ * You may obtain a copy of the License at
28028
+ *
28029
+ * http://www.apache.org/licenses/LICENSE-2.0
28030
+ *
28031
+ * Unless required by applicable law or agreed to in writing, software
28032
+ * distributed under the License is distributed on an "AS IS" BASIS,
28033
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28034
+ * See the License for the specific language governing permissions and
28035
+ * limitations under the License.
28036
+ *
28037
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28038
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28039
+ * */
28040
+
28041
+ var Submenu;
28042
+
28043
+ (function (Submenu) {
28044
+ Submenu["TIME_RANGE"] = "Time range";
28045
+ Submenu["TIME_STEP"] = "Time step";
28046
+ Submenu["SPEED"] = "Speed";
28047
+ Submenu["UPDATE_INTERVAL"] = "Update interval";
28048
+ })(Submenu || (Submenu = {}));
28049
+
28050
+ /* *
28051
+ * Licensed under the Apache License, Version 2.0 (the "License");
28052
+ * you may not use this file except in compliance with the License.
28053
+ * You may obtain a copy of the License at
28054
+ *
28055
+ * http://www.apache.org/licenses/LICENSE-2.0
28056
+ *
28057
+ * Unless required by applicable law or agreed to in writing, software
28058
+ * distributed under the License is distributed on an "AS IS" BASIS,
28059
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28060
+ * See the License for the specific language governing permissions and
28061
+ * limitations under the License.
28062
+ *
28063
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28064
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28065
+ * */
28066
+ var timeSliderLiteButtonDefaultProps = {
28067
+ sx: {
28068
+ width: '36px',
28069
+ height: '36px'
28070
+ }
28071
+ };
28072
+ var timeSliderLiteTooltipDefaultProps = {
28073
+ placement: 'top'
28074
+ };
28075
+
28076
+ /* *
28077
+ * Licensed under the Apache License, Version 2.0 (the "License");
28078
+ * you may not use this file except in compliance with the License.
28079
+ * You may obtain a copy of the License at
28080
+ *
28081
+ * http://www.apache.org/licenses/LICENSE-2.0
28082
+ *
28083
+ * Unless required by applicable law or agreed to in writing, software
28084
+ * distributed under the License is distributed on an "AS IS" BASIS,
28085
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28086
+ * See the License for the specific language governing permissions and
28087
+ * limitations under the License.
28088
+ *
28089
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28090
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28091
+ * */
28092
+
28093
+ var HideButton = function HideButton(_a) {
28094
+ var _b, _c, _d, _e, _f, _g, _h, _j;
28095
+
28096
+ var isVisible = _a.isVisible,
28097
+ settings = _a.settings,
28098
+ onClick = _a.onClick;
28099
+ var hideTitle = (_c = (_b = settings === null || settings === void 0 ? void 0 : settings.label) === null || _b === void 0 ? void 0 : _b.hide) !== null && _c !== void 0 ? _c : 'Hide timeslider';
28100
+ var showTitle = (_e = (_d = settings === null || settings === void 0 ? void 0 : settings.label) === null || _d === void 0 ? void 0 : _d.show) !== null && _e !== void 0 ? _e : 'Show timeslider';
28101
+ var hideIcon = (_g = (_f = settings === null || settings === void 0 ? void 0 : settings.icon) === null || _f === void 0 ? void 0 : _f.hide) !== null && _g !== void 0 ? _g : /*#__PURE__*/React__default["default"].createElement(theme.ChevronDown, null);
28102
+ var showIcon = (_j = (_h = settings === null || settings === void 0 ? void 0 : settings.icon) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : /*#__PURE__*/React__default["default"].createElement(theme.ChevronUp, null);
28103
+ return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28104
+ title: isVisible ? hideTitle : showTitle
28105
+ }), /*#__PURE__*/React__default["default"].createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28106
+ "aria-selected": !isVisible,
28107
+ onClick: onClick,
28108
+ "data-testid": "TimeSliderLite-HideButton"
28109
+ }), isVisible ? hideIcon : showIcon));
28110
+ };
28111
+
28112
+ /* *
28113
+ * Licensed under the Apache License, Version 2.0 (the "License");
28114
+ * you may not use this file except in compliance with the License.
28115
+ * You may obtain a copy of the License at
28116
+ *
28117
+ * http://www.apache.org/licenses/LICENSE-2.0
28118
+ *
28119
+ * Unless required by applicable law or agreed to in writing, software
28120
+ * distributed under the License is distributed on an "AS IS" BASIS,
28121
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28122
+ * See the License for the specific language governing permissions and
28123
+ * limitations under the License.
28124
+ *
28125
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28126
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28127
+ * */
28128
+
28129
+ var ControlButtonGroup = function ControlButtonGroup(_a) {
28130
+ var children = _a.children,
28131
+ right = _a.right,
28132
+ left = _a.left,
28133
+ props = __rest(_a, ["children", "right", "left"]);
28134
+
28135
+ return /*#__PURE__*/React__default["default"].createElement(material.ButtonGroup, __assign({
28136
+ orientation: "horizontal",
28137
+ fullWidth: true
28138
+ }, props, {
28139
+ sx: __assign(__assign(__assign(__assign({}, right && {
28140
+ borderTopLeftRadius: 0,
28141
+ borderBottomLeftRadius: 0
28142
+ }), left && {
28143
+ borderTopRightRadius: 0,
28144
+ borderBottomRightRadius: 0
28145
+ }), {
28146
+ backgroundColor: 'geowebColors.background.surface',
28147
+ height: '100%',
28148
+ alignItems: 'center',
28149
+ justifyContent: 'center',
28150
+ padding: '4px',
28151
+ gap: '2px'
28152
+ }), props.sx)
28153
+ }), children);
28154
+ };
28155
+
28156
+ var TICK_HEIGHT = 6;
28157
+ var HOUR_LABEL_OFFSET = 1.5;
28158
+ var MONTH_LABEL_BREAKPOINT = 65;
28159
+ var HOUR_LABEL_BREAKPOINT = 800;
28160
+ var HOUR_LABEL_EVERY_THIRD_HOUR_BREAKPOINT = 1600;
28161
+ var TIME_SLIDER_LITE_PADDING_RIGHT = 1;
28162
+
28163
+ var TimeSliderLiteBackgroundSvg = function TimeSliderLiteBackgroundSvg(_a) {
28164
+ var width = _a.width,
28165
+ height = _a.height,
28166
+ startTime = _a.startTime,
28167
+ endTime = _a.endTime,
28168
+ timeStep = _a.timeStep,
28169
+ style = _a.style,
28170
+ locale = _a.locale;
28171
+ var timeSliderLite = material.useTheme().palette.geowebColors.timeSliderLite;
28172
+
28173
+ if (!width) {
28174
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
28175
+ style: style,
28176
+ height: height
28177
+ });
28178
+ } // Convert start and end time from Unix timestamp to JavaScript Date object
28179
+
28180
+
28181
+ var startDate = new Date(startTime * SECOND_TO_MILLISECOND);
28182
+ var endDate = new Date(endTime * SECOND_TO_MILLISECOND);
28183
+ var totalDays = (endDate.getTime() - startDate.getTime()) * MILLISECOND_TO_DAY;
28184
+ var tickSpacing = width / totalDays;
28185
+
28186
+ if (tickSpacing === Infinity || tickSpacing === -Infinity || isNaN(tickSpacing)) {
28187
+ return null;
28188
+ }
28189
+
28190
+ var tickOffset = (startDate.getHours() + startDate.getMinutes() / 60) / 24 * tickSpacing;
28191
+ var showMonthLabel = tickSpacing < MONTH_LABEL_BREAKPOINT;
28192
+ var showHourLabel = tickSpacing > HOUR_LABEL_BREAKPOINT;
28193
+ var showHourLabelEveryThirdHour = tickSpacing < HOUR_LABEL_EVERY_THIRD_HOUR_BREAKPOINT; // Set up variables for date labels and background colors
28194
+
28195
+ var dayLabels = [];
28196
+ var currentDate = startDate;
28197
+ var lastDayLabelDate = new Date(endDate.getTime() + 2 * DAY_TO_MILLISECOND); // Append two more days
28198
+
28199
+ while (currentDate < lastDayLabelDate) {
28200
+ var dateString = currentDate.toLocaleDateString(locale, {
28201
+ weekday: 'short',
28202
+ month: 'numeric',
28203
+ day: 'numeric'
28204
+ });
28205
+ var label = dateString.charAt(0).toUpperCase() + dateString.slice(1);
28206
+ dayLabels.push(label);
28207
+ currentDate.setDate(currentDate.getDate() + 1);
28208
+ }
28209
+
28210
+ var monthChanges = getMonthChanges(startDate, endDate);
28211
+ var monthLabels = showMonthLabel ? monthChanges.map(function (monthChange) {
28212
+ var x = getSelectedTimePx(startTime, endTime, monthChange, width) + 4;
28213
+ var dateString = new Date(monthChange * 1000).toLocaleDateString(locale, {
28214
+ weekday: 'short',
28215
+ month: 'numeric',
28216
+ day: 'numeric'
28217
+ });
28218
+ var label = dateString.charAt(0).toUpperCase() + dateString.slice(1);
28219
+ return /*#__PURE__*/React__default["default"].createElement("text", {
28220
+ x: x,
28221
+ y: 14,
28222
+ fill: timeSliderLite.timeline.fill,
28223
+ textAnchor: "left",
28224
+ fontSize: "12px",
28225
+ key: monthChange + "-month-change-text",
28226
+ style: {
28227
+ userSelect: 'none'
28228
+ }
28229
+ }, label);
28230
+ }) : null;
28231
+ var backgroundRectangles = dayLabels.map(function (label, index) {
28232
+ return /*#__PURE__*/React__default["default"].createElement("rect", {
28233
+ x: Math.floor(index * tickSpacing - tickOffset),
28234
+ y: 0,
28235
+ width: Math.ceil(tickSpacing),
28236
+ height: height,
28237
+ fill: index % 2 === 0 ? timeSliderLite.timelineBackground.fill : timeSliderLite.timelineBackgroundAlternative.fill,
28238
+ key: label + "-color"
28239
+ });
28240
+ });
28241
+ var dailyLabels = !showMonthLabel ? dayLabels.map(function (label, index) {
28242
+ return /*#__PURE__*/React__default["default"].createElement("text", {
28243
+ x: index * tickSpacing + 8 - tickOffset,
28244
+ y: 14,
28245
+ fill: timeSliderLite.timeline.fill,
28246
+ textAnchor: "left",
28247
+ fontSize: "12px",
28248
+ key: label + "-text",
28249
+ style: {
28250
+ userSelect: 'none'
28251
+ }
28252
+ }, dayLabels[index]);
28253
+ }) : null;
28254
+ var hourLabelsPerDay = 24;
28255
+ var hourLabels = showHourLabel ? dayLabels.map(function (label, index) {
28256
+ return Array.from({
28257
+ length: hourLabelsPerDay
28258
+ }, function (_, value) {
28259
+ var defaultProps = {
28260
+ x: index * tickSpacing + value * (tickSpacing / hourLabelsPerDay) - tickOffset - HOUR_LABEL_OFFSET,
28261
+ y: height - 10,
28262
+ visibility: showHourLabelEveryThirdHour && value % 3 !== 0 ? 'hidden' : 'visible',
28263
+ fill: timeSliderLite.timeline.fill,
28264
+ fontSize: '12px'
28265
+ };
28266
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("text", __assign({}, defaultProps, {
28267
+ textAnchor: "end",
28268
+ key: label + "-" + value + "-hour-label",
28269
+ style: {
28270
+ userSelect: 'none'
28271
+ }
28272
+ }), value), /*#__PURE__*/React__default["default"].createElement("text", __assign({}, defaultProps, {
28273
+ textAnchor: "start",
28274
+ key: label + "-" + value + "-00-label",
28275
+ style: {
28276
+ userSelect: 'none'
28277
+ }
28278
+ }), ":00"));
28279
+ });
28280
+ }).flat() : null;
28281
+ var ticksPerDay = timeStep ? maxSubTicksPerDay(tickSpacing, timeStep) : subTicksPerDay(tickSpacing);
28282
+ var tickMarks = dayLabels.map(function (label, index) {
28283
+ return Array.from({
28284
+ length: ticksPerDay + 1
28285
+ }, function (_, value) {
28286
+ return /*#__PURE__*/React__default["default"].createElement("line", {
28287
+ x1: index * tickSpacing + value * (tickSpacing / ticksPerDay) - tickOffset,
28288
+ y1: height,
28289
+ x2: index * tickSpacing + value * (tickSpacing / ticksPerDay) - tickOffset,
28290
+ y2: Math.floor(height - TICK_HEIGHT),
28291
+ stroke: timeSliderLite.timeline.stroke,
28292
+ key: label + "-" + value
28293
+ });
28294
+ });
28295
+ }).flat();
28296
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
28297
+ style: style,
28298
+ width: width + TIME_SLIDER_LITE_PADDING_RIGHT,
28299
+ height: height
28300
+ }, backgroundRectangles, tickMarks, monthLabels, dailyLabels, hourLabels);
28301
+ };
28302
+
28303
+ /* *
28304
+ * Licensed under the Apache License, Version 2.0 (the "License");
28305
+ * you may not use this file except in compliance with the License.
28306
+ * You may obtain a copy of the License at
28307
+ *
28308
+ * http://www.apache.org/licenses/LICENSE-2.0
28309
+ *
28310
+ * Unless required by applicable law or agreed to in writing, software
28311
+ * distributed under the License is distributed on an "AS IS" BASIS,
28312
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28313
+ * See the License for the specific language governing permissions and
28314
+ * limitations under the License.
28315
+ *
28316
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28317
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28318
+ * */
28319
+ var DRAG_AREA_WIDTH = 10;
28320
+ var NEEDLE_WIDTH = 5;
28321
+ var SHADOW_SPREAD = 2;
28322
+
28323
+ var NeedleShadow = function NeedleShadow(_a) {
28324
+ var x = _a.x,
28325
+ stroke = _a.stroke,
28326
+ height = _a.height,
28327
+ width = _a.width;
28328
+ return /*#__PURE__*/React__default["default"].createElement("line", {
28329
+ x1: x,
28330
+ y1: height - (height - SHADOW_SPREAD / 2),
28331
+ x2: x,
28332
+ y2: height - SHADOW_SPREAD / 2,
28333
+ strokeWidth: width + SHADOW_SPREAD,
28334
+ stroke: stroke,
28335
+ strokeLinecap: "round",
28336
+ filter: "blur(0.5px)",
28337
+ "data-testid": "TimeSliderLite-NeedleShadow"
28338
+ });
28339
+ };
28340
+
28341
+ var NeedleLine = function NeedleLine(_a) {
28342
+ var x = _a.x,
28343
+ stroke = _a.stroke,
28344
+ height = _a.height,
28345
+ width = _a.width;
28346
+ return /*#__PURE__*/React__default["default"].createElement("line", {
28347
+ x1: x,
28348
+ y1: width / 2,
28349
+ x2: x,
28350
+ y2: height - width / 2,
28351
+ strokeWidth: width,
28352
+ strokeLinecap: "round",
28353
+ stroke: stroke,
28354
+ "data-testid": "TimeSliderLite-NeedleLine"
28355
+ });
28356
+ };
28357
+
28358
+ var TimeSliderDraggableNeedle = function TimeSliderDraggableNeedle(_a) {
28359
+ var draggableLabel = _a.draggableLabel,
28360
+ width = _a.width,
28361
+ height = _a.height,
28362
+ locale = _a.locale,
28363
+ startTime = _a.startTime,
28364
+ endTime = _a.endTime,
28365
+ _b = _a.needleDragAreaWidth,
28366
+ needleDragAreaWidth = _b === void 0 ? DRAG_AREA_WIDTH : _b,
28367
+ needleLabelZIndex = _a.needleLabelZIndex,
28368
+ needleLabelOffset = _a.needleLabelOffset,
28369
+ _c = _a.needleWidth,
28370
+ needleWidth = _c === void 0 ? NEEDLE_WIDTH : _c,
28371
+ timeStep = _a.timeStep,
28372
+ selectedTime = _a.selectedTime,
28373
+ setSelectedTime = _a.setSelectedTime,
28374
+ style = _a.style;
28375
+ var draggableRef = React.useRef(null);
28376
+ var timeSliderLite = material.useTheme().palette.geowebColors.timeSliderLite;
28377
+ var x = getSelectedTimePx(startTime, endTime, selectedTime, width) - needleDragAreaWidth / 2;
28378
+ var roundedSelectedTime = Math.floor(selectedTime / timeStep) * timeStep;
28379
+ var dateString = new Date(roundedSelectedTime * 1000).toLocaleDateString(locale, {
28380
+ weekday: 'short',
28381
+ month: 'numeric',
28382
+ day: 'numeric',
28383
+ hour: 'numeric',
28384
+ minute: 'numeric'
28385
+ });
28386
+ var label = locale === 'fi' || locale === 'sv-FI' ? reformatFinnishDateString(dateString) : dateString;
28387
+ return /*#__PURE__*/React__default["default"].createElement(Draggable__default["default"], {
28388
+ handle: ".TimeSliderLite-DraggableNeedle",
28389
+ axis: "x",
28390
+ nodeRef: draggableRef,
28391
+ bounds: {
28392
+ left: -needleDragAreaWidth / 2,
28393
+ right: width - needleDragAreaWidth / 2
28394
+ },
28395
+ position: {
28396
+ x: x,
28397
+ y: 0
28398
+ },
28399
+ onDrag: function onDrag(_, position) {
28400
+ var positionOffsetToCompensateFlooring = 0.5;
28401
+ var newSelectedTime = getSelectedTimeFromPx(startTime, endTime, position.x + needleDragAreaWidth / 2 + positionOffsetToCompensateFlooring, width);
28402
+ setSelectedTime(newSelectedTime);
28403
+ },
28404
+ onStop: function onStop(_, position) {
28405
+ var positionOffsetToCompensateFlooring = 0.5;
28406
+ var newSelectedTime = getSelectedTimeFromPx(startTime, endTime, position.x + needleDragAreaWidth / 2 + positionOffsetToCompensateFlooring, width);
28407
+ var roundedSelectedTime = Math.floor(newSelectedTime / timeStep) * timeStep;
28408
+ setSelectedTime(roundedSelectedTime);
28409
+ }
28410
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
28411
+ className: "TimeSliderLite-DraggableNeedle",
28412
+ ref: draggableRef,
28413
+ "data-testid": "TimeSliderLite-DraggableNeedle"
28414
+ }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
28415
+ title: label,
28416
+ arrow: true,
28417
+ placement: "top",
28418
+ open: true,
28419
+ componentsProps: {
28420
+ tooltip: {
28421
+ sx: {
28422
+ padding: '0 3px 0 3px',
28423
+ fontSize: '12px',
28424
+ backgroundColor: timeSliderLite.needleLabel.backgroundColor,
28425
+ border: "1px solid " + timeSliderLite.needleLabel.borderColor
28426
+ }
28427
+ },
28428
+ arrow: {
28429
+ sx: {
28430
+ color: timeSliderLite.needleLabel.backgroundColor
28431
+ }
28432
+ },
28433
+ popper: {
28434
+ className: draggableLabel ? 'TimeSliderLite-DraggableNeedle' : '',
28435
+ sx: {
28436
+ pointerEvents: draggableLabel ? null : 'none',
28437
+ zIndex: needleLabelZIndex !== null && needleLabelZIndex !== void 0 ? needleLabelZIndex : null,
28438
+ cursor: draggableLabel ? 'ew-resize' : 'default'
28439
+ },
28440
+ modifiers: [{
28441
+ name: 'offset',
28442
+ options: {
28443
+ offset: needleLabelOffset !== null && needleLabelOffset !== void 0 ? needleLabelOffset : [0, 30 - height]
28444
+ }
28445
+ }]
28446
+ }
28447
+ }
28448
+ }, /*#__PURE__*/React__default["default"].createElement("svg", {
28449
+ style: style,
28450
+ cursor: "ew-resize",
28451
+ width: needleDragAreaWidth,
28452
+ height: height,
28453
+ "data-testid": "TimeSliderLite-NeedleSvg"
28454
+ }, /*#__PURE__*/React__default["default"].createElement(NeedleShadow, {
28455
+ x: needleDragAreaWidth / 2,
28456
+ stroke: timeSliderLite.needleShadow.stroke,
28457
+ height: height,
28458
+ width: needleWidth
28459
+ }), /*#__PURE__*/React__default["default"].createElement(NeedleLine, {
28460
+ x: needleDragAreaWidth / 2,
28461
+ stroke: timeSliderLite.needle.stroke,
28462
+ height: height,
28463
+ width: needleWidth
28464
+ })))));
28465
+ };
28466
+
28467
+ /* *
28468
+ * Licensed under the Apache License, Version 2.0 (the "License");
28469
+ * you may not use this file except in compliance with the License.
28470
+ * You may obtain a copy of the License at
28471
+ *
28472
+ * http://www.apache.org/licenses/LICENSE-2.0
28473
+ *
28474
+ * Unless required by applicable law or agreed to in writing, software
28475
+ * distributed under the License is distributed on an "AS IS" BASIS,
28476
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28477
+ * See the License for the specific language governing permissions and
28478
+ * limitations under the License.
28479
+ *
28480
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28481
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28482
+ * */
28483
+
28484
+ var TimeSliderLiteBackground = function TimeSliderLiteBackground(_a) {
28485
+ var height = _a.height,
28486
+ draggableTimeStamp = _a.draggableTimeStamp,
28487
+ locale = _a.locale,
28488
+ startTime = _a.startTime,
28489
+ endTime = _a.endTime,
28490
+ needleWidth = _a.needleWidth,
28491
+ needleDragAreaWidth = _a.needleDragAreaWidth,
28492
+ needleLabelZIndex = _a.needleLabelZIndex,
28493
+ needleLabelOffset = _a.needleLabelOffset,
28494
+ timeStep = _a.timeStep,
28495
+ selectedTime = _a.selectedTime,
28496
+ setSelectedTime = _a.setSelectedTime;
28497
+ var sliderAreaRef = React.useRef(null);
28498
+
28499
+ var _b = __read(React__default["default"].useState(0), 2),
28500
+ areaWidth = _b[0],
28501
+ setAreaWidth = _b[1];
28502
+
28503
+ var drawNeedle = selectedTime && areaWidth && startTime < endTime;
28504
+ React.useLayoutEffect(function () {
28505
+ var sliderArea = sliderAreaRef.current;
28506
+ setAreaWidth(sliderArea.clientWidth - TIME_SLIDER_LITE_PADDING_RIGHT);
28507
+ var observer = new ResizeObserver(function () {
28508
+ setAreaWidth(sliderArea.clientWidth - TIME_SLIDER_LITE_PADDING_RIGHT);
28509
+ });
28510
+ observer.observe(sliderArea);
28511
+ return function () {
28512
+ observer.disconnect();
28513
+ };
28514
+ }, [sliderAreaRef]);
28515
+ return /*#__PURE__*/React__default["default"].createElement(material.Box, {
28516
+ ref: sliderAreaRef,
28517
+ sx: {
28518
+ position: 'relative',
28519
+ height: height + "px",
28520
+ overflow: 'hidden',
28521
+ width: '100%'
28522
+ },
28523
+ "data-testid": "TimeSliderLite-Background"
28524
+ }, /*#__PURE__*/React__default["default"].createElement(TimeSliderLiteBackgroundSvg, {
28525
+ style: {
28526
+ position: 'absolute',
28527
+ top: 0
28528
+ },
28529
+ timeStep: timeStep,
28530
+ width: areaWidth,
28531
+ height: height,
28532
+ startTime: startTime,
28533
+ endTime: endTime,
28534
+ locale: locale
28535
+ }), drawNeedle && /*#__PURE__*/React__default["default"].createElement(TimeSliderDraggableNeedle, {
28536
+ needleWidth: needleWidth,
28537
+ draggableLabel: draggableTimeStamp,
28538
+ style: {
28539
+ position: 'absolute',
28540
+ top: 0
28541
+ },
28542
+ locale: locale,
28543
+ width: areaWidth,
28544
+ needleDragAreaWidth: needleDragAreaWidth,
28545
+ needleLabelZIndex: needleLabelZIndex,
28546
+ needleLabelOffset: needleLabelOffset,
28547
+ height: height,
28548
+ startTime: startTime,
28549
+ endTime: endTime,
28550
+ timeStep: timeStep,
28551
+ selectedTime: selectedTime,
28552
+ setSelectedTime: setSelectedTime
28553
+ }));
28554
+ };
28555
+
28556
+ /* *
28557
+ * Licensed under the Apache License, Version 2.0 (the "License");
28558
+ * you may not use this file except in compliance with the License.
28559
+ * You may obtain a copy of the License at
28560
+ *
28561
+ * http://www.apache.org/licenses/LICENSE-2.0
28562
+ *
28563
+ * Unless required by applicable law or agreed to in writing, software
28564
+ * distributed under the License is distributed on an "AS IS" BASIS,
28565
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28566
+ * See the License for the specific language governing permissions and
28567
+ * limitations under the License.
28568
+ *
28569
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28570
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28571
+ * */
28572
+
28573
+ var StepButton = function StepButton(_a) {
28574
+ var _b, _c, _d, _e, _f, _g, _h, _j;
28575
+
28576
+ var forward = _a.forward,
28577
+ isDisabled = _a.isDisabled,
28578
+ _k = _a.onClick,
28579
+ onClick = _k === void 0 ? function () {} : _k,
28580
+ settings = _a.settings,
28581
+ tooltipDelay = _a.tooltipDelay;
28582
+ var forwardTitle = (_c = (_b = settings === null || settings === void 0 ? void 0 : settings.label) === null || _b === void 0 ? void 0 : _b.forward) !== null && _c !== void 0 ? _c : 'Forward';
28583
+ var backwardTitle = (_e = (_d = settings === null || settings === void 0 ? void 0 : settings.label) === null || _d === void 0 ? void 0 : _d.backward) !== null && _e !== void 0 ? _e : 'Backward';
28584
+ var forwardIcon = (_g = (_f = settings === null || settings === void 0 ? void 0 : settings.icon) === null || _f === void 0 ? void 0 : _f.forward) !== null && _g !== void 0 ? _g : /*#__PURE__*/React__namespace.createElement(theme.StepForward, {
28585
+ "data-testid": "step-forward-svg-path"
28586
+ });
28587
+ var backwardIcon = (_j = (_h = settings === null || settings === void 0 ? void 0 : settings.icon) === null || _h === void 0 ? void 0 : _h.backward) !== null && _j !== void 0 ? _j : /*#__PURE__*/React__namespace.createElement(theme.StepBackward, {
28588
+ "data-testid": "step-backward-svg-path"
28589
+ });
28590
+ return /*#__PURE__*/React__namespace.createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28591
+ title: forward ? forwardTitle : backwardTitle,
28592
+ enterDelay: tooltipDelay,
28593
+ enterNextDelay: tooltipDelay
28594
+ }), /*#__PURE__*/React__namespace.createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28595
+ disabled: isDisabled,
28596
+ "aria-label": forward ? forwardTitle : backwardTitle,
28597
+ onClick: onClick,
28598
+ "data-testid": "TimeSliderLite-StepButton" + (forward ? 'Forward' : 'Backward')
28599
+ }), forward ? forwardIcon : backwardIcon));
28600
+ };
28601
+
28602
+ /* *
28603
+ * Licensed under the Apache License, Version 2.0 (the "License");
28604
+ * you may not use this file except in compliance with the License.
28605
+ * You may obtain a copy of the License at
28606
+ *
28607
+ * http://www.apache.org/licenses/LICENSE-2.0
28608
+ *
28609
+ * Unless required by applicable law or agreed to in writing, software
28610
+ * distributed under the License is distributed on an "AS IS" BASIS,
28611
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28612
+ * See the License for the specific language governing permissions and
28613
+ * limitations under the License.
28614
+ *
28615
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28616
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28617
+ * */
28618
+
28619
+ var PlayButton = function PlayButton(_a) {
28620
+ var _b, _c, _d, _e, _f, _g, _h, _j;
28621
+
28622
+ var isAnimating = _a.isAnimating,
28623
+ isDisabled = _a.isDisabled,
28624
+ onTogglePlayButton = _a.onTogglePlayButton,
28625
+ settings = _a.settings,
28626
+ tooltipDelay = _a.tooltipDelay;
28627
+ var pauseTitle = (_c = (_b = settings === null || settings === void 0 ? void 0 : settings.label) === null || _b === void 0 ? void 0 : _b.pause) !== null && _c !== void 0 ? _c : 'Pause';
28628
+ var playTitle = (_e = (_d = settings === null || settings === void 0 ? void 0 : settings.label) === null || _d === void 0 ? void 0 : _d.play) !== null && _e !== void 0 ? _e : 'Play';
28629
+ var pauseIcon = (_g = (_f = settings === null || settings === void 0 ? void 0 : settings.icon) === null || _f === void 0 ? void 0 : _f.pause) !== null && _g !== void 0 ? _g : /*#__PURE__*/React__default["default"].createElement(theme.Pause, null);
28630
+ var playIcon = (_j = (_h = settings === null || settings === void 0 ? void 0 : settings.icon) === null || _h === void 0 ? void 0 : _h.play) !== null && _j !== void 0 ? _j : /*#__PURE__*/React__default["default"].createElement(theme.Play, null);
28631
+ return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28632
+ title: isAnimating ? pauseTitle : playTitle,
28633
+ placement: "top",
28634
+ enterDelay: tooltipDelay,
28635
+ enterNextDelay: tooltipDelay
28636
+ }), /*#__PURE__*/React__default["default"].createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28637
+ sx: __assign(__assign({}, isAnimating && {
28638
+ backgroundColor: 'geowebColors.timeSliderLite.selected.backgroundColor'
28639
+ }), timeSliderLiteButtonDefaultProps.sx),
28640
+ onClick: function onClick() {
28641
+ onTogglePlayButton();
28642
+ },
28643
+ disabled: isDisabled,
28644
+ "data-testid": "TimeSliderLite-PlayButton"
28645
+ }), isAnimating ? pauseIcon : playIcon));
28646
+ };
28647
+
28648
+ /* *
28649
+ * Licensed under the Apache License, Version 2.0 (the "License");
28650
+ * you may not use this file except in compliance with the License.
28651
+ * You may obtain a copy of the License at
28652
+ *
28653
+ * http://www.apache.org/licenses/LICENSE-2.0
28654
+ *
28655
+ * Unless required by applicable law or agreed to in writing, software
28656
+ * distributed under the License is distributed on an "AS IS" BASIS,
28657
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28658
+ * See the License for the specific language governing permissions and
28659
+ * limitations under the License.
28660
+ *
28661
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28662
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28663
+ * */
28664
+
28665
+ var MenuButton = function MenuButton(_a) {
28666
+ var _b, _c;
28667
+
28668
+ var menuOpen = _a.menuOpen,
28669
+ onClick = _a.onClick,
28670
+ settings = _a.settings;
28671
+ var title = (_b = settings === null || settings === void 0 ? void 0 : settings.label) !== null && _b !== void 0 ? _b : 'Animation options';
28672
+ var icon = (_c = settings === null || settings === void 0 ? void 0 : settings.icon) !== null && _c !== void 0 ? _c : /*#__PURE__*/React__default["default"].createElement(theme.Options, null);
28673
+ var Button = /*#__PURE__*/React__default["default"].createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28674
+ sx: __assign(__assign({}, menuOpen && {
28675
+ backgroundColor: 'geowebColors.timeSliderLite.selected.backgroundColor'
28676
+ }), timeSliderLiteButtonDefaultProps.sx),
28677
+ "aria-selected": menuOpen,
28678
+ onClick: onClick,
28679
+ "data-testid": "TimeSliderLite-MenuButton"
28680
+ }), icon);
28681
+
28682
+ if (menuOpen) {
28683
+ return Button;
28684
+ }
28685
+
28686
+ return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28687
+ title: title
28688
+ }), Button);
28689
+ };
28690
+
28691
+ /* *
28692
+ * Licensed under the Apache License, Version 2.0 (the "License");
28693
+ * you may not use this file except in compliance with the License.
28694
+ * You may obtain a copy of the License at
28695
+ *
28696
+ * http://www.apache.org/licenses/LICENSE-2.0
28697
+ *
28698
+ * Unless required by applicable law or agreed to in writing, software
28699
+ * distributed under the License is distributed on an "AS IS" BASIS,
28700
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28701
+ * See the License for the specific language governing permissions and
28702
+ * limitations under the License.
28703
+ *
28704
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28705
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28706
+ * */
28707
+ var TIME_SLIDER_LITE_DEFAULT_HEIGHT = 40;
28708
+ var TIME_SLIDER_LITE_DEFAULT_LOCALE = 'en';
28709
+ var TIME_SLIDER_LITE_DEFAULT_TIME_STEP = 5;
28710
+ var TIME_SLIDER_LITE_TOOLTIP_DELAY = 3000;
28711
+ var styles$1 = {
28712
+ container: {
28713
+ display: 'grid',
28714
+ alignItems: 'center',
28715
+ justifyContent: 'center',
28716
+ borderRadius: '4px'
28717
+ }
28718
+ };
28719
+
28720
+ var TimeSliderLite = function TimeSliderLite(_a) {
28721
+ var _b, _c;
28722
+
28723
+ var controlButtons = _a.controlButtons,
28724
+ endTime = _a.endTime,
28725
+ _d = _a.height,
28726
+ height = _d === void 0 ? TIME_SLIDER_LITE_DEFAULT_HEIGHT : _d,
28727
+ hideButton = _a.hideButton,
28728
+ isAnimating = _a.isAnimating,
28729
+ isVisible = _a.isVisible,
28730
+ _e = _a.locale,
28731
+ locale = _e === void 0 ? TIME_SLIDER_LITE_DEFAULT_LOCALE : _e,
28732
+ mapId = _a.mapId,
28733
+ menuOpen = _a.menuOpen,
28734
+ overrideAnimation = _a.overrideAnimation,
28735
+ onToggleAnimation = _a.onToggleAnimation,
28736
+ onToggleMenu = _a.onToggleMenu,
28737
+ needleWidth = _a.needleWidth,
28738
+ needleDragAreaWidth = _a.needleDragAreaWidth,
28739
+ needleLabelZIndex = _a.needleLabelZIndex,
28740
+ needleLabelOffset = _a.needleLabelOffset,
28741
+ draggableTimeStamp = _a.draggableTimeStamp,
28742
+ onToggleTimeSlider = _a.onToggleTimeSlider,
28743
+ selectedTime = _a.selectedTime,
28744
+ setSelectedTime = _a.setSelectedTime,
28745
+ settings = _a.settings,
28746
+ startTime = _a.startTime,
28747
+ sx = _a.sx,
28748
+ _f = _a.timeStep,
28749
+ timeStep = _f === void 0 ? TIME_SLIDER_LITE_DEFAULT_TIME_STEP : _f;
28750
+
28751
+ var _g = __read(React.useState(selectedTime), 2),
28752
+ rawSelectedTime = _g[0],
28753
+ setRawSelectedTime = _g[1];
28754
+
28755
+ var timeStepSeconds = timeStep * MINUTE_TO_SECOND;
28756
+ var roundedStartTime = Math.floor(startTime / timeStepSeconds) * timeStepSeconds;
28757
+ var roundedEndTime = Math.floor(endTime / timeStepSeconds) * timeStepSeconds;
28758
+ var runningExternalAnimation = overrideAnimation && isAnimating;
28759
+ var runningInternalAnimation = !overrideAnimation && isAnimating;
28760
+ React.useEffect(function () {
28761
+ if (!runningExternalAnimation) {
28762
+ var roundedSelectedTime = Math.floor(rawSelectedTime / timeStepSeconds) * timeStepSeconds;
28763
+ setSelectedTime(roundedSelectedTime);
28764
+ }
28765
+ }, [setSelectedTime, rawSelectedTime, timeStepSeconds, runningExternalAnimation]);
28766
+ React.useEffect(function () {
28767
+ if (runningInternalAnimation) {
28768
+ var interval_1 = setInterval(function () {
28769
+ setRawSelectedTime(function (prevTime) {
28770
+ if (prevTime + timeStepSeconds > roundedEndTime) {
28771
+ return roundedStartTime;
28772
+ }
28773
+
28774
+ return prevTime + timeStepSeconds;
28775
+ });
28776
+ }, 200);
28777
+ return function () {
28778
+ return clearInterval(interval_1);
28779
+ };
28780
+ }
28781
+
28782
+ if (runningExternalAnimation) {
28783
+ setRawSelectedTime(selectedTime);
28784
+ }
28785
+
28786
+ return function () {};
28787
+ }, [roundedEndTime, isAnimating, roundedStartTime, timeStepSeconds, runningInternalAnimation, runningExternalAnimation, selectedTime]);
28788
+
28789
+ var handleTimeStep = function handleTimeStep(stepSeconds) {
28790
+ var newSteppedTime = Math.floor(rawSelectedTime / timeStepSeconds) * timeStepSeconds + stepSeconds;
28791
+ setRawSelectedTime(boundedValue(newSteppedTime, [roundedStartTime, roundedEndTime]));
28792
+
28793
+ if (isAnimating && onToggleAnimation) {
28794
+ onToggleAnimation();
28795
+ }
28796
+ };
28797
+
28798
+ var handleTimeSelect = function handleTimeSelect(value) {
28799
+ setRawSelectedTime(boundedValue(value, [roundedStartTime, roundedEndTime]));
28800
+
28801
+ if (isAnimating && onToggleAnimation) {
28802
+ onToggleAnimation();
28803
+ }
28804
+ }; // Handle time range selection
28805
+
28806
+
28807
+ React.useEffect(function () {
28808
+ setRawSelectedTime(boundedValue(selectedTime, [roundedStartTime, roundedEndTime])); // eslint-disable-next-line react-hooks/exhaustive-deps
28809
+ }, [startTime, endTime]);
28810
+ var tooltipDelay = menuOpen ? TIME_SLIDER_LITE_TOOLTIP_DELAY : undefined;
28811
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28812
+ container: true,
28813
+ sx: __assign(__assign(__assign({}, styles$1.container), sx), {
28814
+ gridTemplateColumns: isVisible ? 'auto 1fr auto' : "1fr auto",
28815
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28816
+ boxShadow: isVisible ? (_b = sx) === null || _b === void 0 ? void 0 : _b.boxShadow : undefined
28817
+ }),
28818
+ "data-testid": "timeSliderLite-" + mapId
28819
+ }, isVisible ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28820
+ item: true,
28821
+ sx: {
28822
+ height: height + "px"
28823
+ }
28824
+ }, controlButtons || /*#__PURE__*/React__default["default"].createElement(ControlButtonGroup, {
28825
+ left: true
28826
+ }, /*#__PURE__*/React__default["default"].createElement(MenuButton, {
28827
+ settings: settings === null || settings === void 0 ? void 0 : settings.menuButton,
28828
+ menuOpen: menuOpen,
28829
+ onClick: onToggleMenu
28830
+ }), /*#__PURE__*/React__default["default"].createElement(material.Divider, {
28831
+ orientation: "vertical",
28832
+ sx: {
28833
+ height: height + "px",
28834
+ margin: '2px'
28835
+ }
28836
+ }), /*#__PURE__*/React__default["default"].createElement(PlayButton, {
28837
+ settings: settings === null || settings === void 0 ? void 0 : settings.playButton,
28838
+ isAnimating: isAnimating,
28839
+ onTogglePlayButton: onToggleAnimation,
28840
+ tooltipDelay: tooltipDelay
28841
+ }), /*#__PURE__*/React__default["default"].createElement(StepButton, {
28842
+ settings: settings === null || settings === void 0 ? void 0 : settings.stepButton,
28843
+ onClick: function onClick() {
28844
+ return handleTimeStep(-timeStepSeconds);
28845
+ },
28846
+ tooltipDelay: tooltipDelay
28847
+ }), /*#__PURE__*/React__default["default"].createElement(StepButton, {
28848
+ forward: true,
28849
+ settings: settings === null || settings === void 0 ? void 0 : settings.stepButton,
28850
+ onClick: function onClick() {
28851
+ return handleTimeStep(timeStepSeconds);
28852
+ },
28853
+ tooltipDelay: tooltipDelay
28854
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28855
+ item: true
28856
+ }, /*#__PURE__*/React__default["default"].createElement(TimeSliderLiteBackground, {
28857
+ draggableTimeStamp: draggableTimeStamp,
28858
+ startTime: roundedStartTime,
28859
+ locale: locale,
28860
+ endTime: roundedEndTime,
28861
+ needleWidth: needleWidth,
28862
+ needleDragAreaWidth: needleDragAreaWidth,
28863
+ needleLabelZIndex: needleLabelZIndex,
28864
+ needleLabelOffset: needleLabelOffset,
28865
+ timeStep: timeStepSeconds,
28866
+ selectedTime: runningExternalAnimation ? selectedTime : rawSelectedTime,
28867
+ setSelectedTime: handleTimeSelect,
28868
+ height: height
28869
+ }))) : /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28870
+ item: true
28871
+ }), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28872
+ item: true,
28873
+ sx: {
28874
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28875
+ boxShadow: isVisible ? 'none' : (_c = sx) === null || _c === void 0 ? void 0 : _c.boxShadow,
28876
+ borderRadius: isVisible ? 'none' : '4px',
28877
+ height: height + "px"
28878
+ }
28879
+ }, hideButton || /*#__PURE__*/React__default["default"].createElement(ControlButtonGroup, {
28880
+ className: "timeSliderLite-hideButtonGroup-" + (isVisible ? 'hide' : 'show'),
28881
+ right: isVisible
28882
+ }, /*#__PURE__*/React__default["default"].createElement(HideButton, {
28883
+ settings: settings === null || settings === void 0 ? void 0 : settings.hideButton,
28884
+ onClick: onToggleTimeSlider,
28885
+ isVisible: isVisible
28886
+ }))));
28887
+ };
28888
+
27833
28889
  /* *
27834
28890
  * Licensed under the Apache License, Version 2.0 (the "License");
27835
28891
  * you may not use this file except in compliance with the License.
@@ -28871,6 +29927,7 @@
28871
29927
  exports.TimeSliderBackwardForwardStepButtonConnect = BackwardForwardStepButtonConnect;
28872
29928
  exports.TimeSliderButtonsConnect = TimeSliderButtonsConnect;
28873
29929
  exports.TimeSliderConnect = TimeSliderConnect;
29930
+ exports.TimeSliderLite = TimeSliderLite;
28874
29931
  exports.TimeSliderOptionsMenuButtonConnect = OptionsMenuButtonConnect;
28875
29932
  exports.TimeSliderPlayButtonConnect = PlayButtonConnect;
28876
29933
  exports.ZoomControlConnect = ZoomControlConnect;
@@ -28900,7 +29957,7 @@
28900
29957
  exports.getWMJSTimeDimensionForLayerId = getWMJSTimeDimensionForLayerId;
28901
29958
  exports.getWMLayerById = getWMLayerById;
28902
29959
  exports.layerActions = layerActions;
28903
- exports.layerReducer = reducer$8;
29960
+ exports.layerReducer = reducer$7;
28904
29961
  exports.layerSelectors = selectors$4;
28905
29962
  exports.layerTypes = types$3;
28906
29963
  exports.mapActions = mapActions;
@@ -28916,6 +29973,7 @@
28916
29973
  exports.registerWMJSMap = registerWMJSMap;
28917
29974
  exports.registerWMLayer = registerWMLayer;
28918
29975
  exports.routerActions = routerActions;
29976
+ exports.serviceSelectors = selectors$5;
28919
29977
  exports.snackbarActions = snackbarActions;
28920
29978
  exports.store = store;
28921
29979
  exports.syncGroupActions = genericActions;
@@ -28926,11 +29984,15 @@
28926
29984
  exports.timeSliderUtils = timeSliderUtils;
28927
29985
  exports.uiActions = uiActions;
28928
29986
  exports.uiModuleConfig = uiModuleConfig;
29987
+ exports.uiReducer = reducer$6;
28929
29988
  exports.uiSelectors = selectors$3;
28930
29989
  exports.uiTypes = types;
29990
+ exports.unRegisterAllWMJSLayersAndMaps = unRegisterAllWMJSLayersAndMaps;
28931
29991
  exports.unRegisterWMJSLayer = unRegisterWMJSLayer;
28932
29992
  exports.unRegisterWMJSMap = unRegisterWMJSMap;
29993
+ exports.useFetchServices = useFetchServices;
28933
29994
  exports.useSetupDialog = useSetupDialog;
29995
+ exports.webmapReducer = reducer$5;
28934
29996
 
28935
29997
  Object.defineProperty(exports, '__esModule', { value: true });
28936
29998