@opengeoweb/core 4.19.0 → 4.20.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 (59) hide show
  1. package/index.esm.js +1984 -964
  2. package/index.umd.js +2092 -1047
  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/LayerContainerRow.d.ts +2 -0
  6. package/lib/components/LayerManager/LayerContainerRow/LayerRow/DeleteLayer/DeleteLayerConnect.d.ts +2 -0
  7. package/lib/components/LayerManager/LayerContainerRow/LayerRow/DragHandle/DragHandle.d.ts +3 -1
  8. package/lib/components/LayerManager/LayerContainerRow/LayerRow/EnableLayer/EnableLayerConnect.d.ts +2 -0
  9. package/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRow.d.ts +1 -0
  10. package/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRowConnect.d.ts +2 -0
  11. package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuButton.d.ts +2 -0
  12. package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuButtonConnect.d.ts +2 -0
  13. package/lib/components/LayerManager/LayerContainerRow/LayerRow/OpacitySelect/OpacitySelect.d.ts +1 -0
  14. package/lib/components/LayerManager/LayerContainerRow/LayerRow/OpacitySelect/OpacitySelectConnect.d.ts +1 -0
  15. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderLayers/RenderLayers.d.ts +1 -0
  16. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderLayers/RenderLayersConnect.d.ts +1 -0
  17. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStyles.d.ts +2 -0
  18. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStylesConnect.d.ts +2 -0
  19. package/lib/components/LayerManager/LayerManager.d.ts +1 -1
  20. package/lib/components/LayerManager/LayerManagerConnect.d.ts +2 -1
  21. package/lib/components/LayerManager/LayerManagerHeaderOptions.d.ts +21 -0
  22. package/lib/components/LayerManager/LayerManagerHeaderOptionsConnect.d.ts +2 -1
  23. package/lib/components/LayerManager/LayerManagerUtils.d.ts +50 -1
  24. package/lib/components/LayerManager/index.d.ts +1 -0
  25. package/lib/components/MapControls/MapControlButton.d.ts +2 -3
  26. package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +1 -2
  27. package/lib/components/TimeSliderLite/TimeSliderLite.d.ts +35 -0
  28. package/lib/components/TimeSliderLite/TimeSliderLite.spec.d.ts +1 -0
  29. package/lib/components/TimeSliderLite/TimeSliderLite.stories.d.ts +9 -0
  30. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderDraggableNeedle.d.ts +20 -0
  31. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderDraggableNeedle.spec.d.ts +1 -0
  32. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderLiteBackground.d.ts +17 -0
  33. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderLiteBackgroundSvg.d.ts +12 -0
  34. package/lib/components/TimeSliderLite/TimeSliderLiteBackground/TimeSliderLiteBackgroundSvg.spec.d.ts +1 -0
  35. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/ControlButtonGroup/ControlButtonGroup.d.ts +8 -0
  36. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/HideButton/HideButton.d.ts +9 -0
  37. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/MenuButton/MenuButton.d.ts +9 -0
  38. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/PlayButton/PlayButton.d.ts +10 -0
  39. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/StepButton/StepButton.d.ts +10 -0
  40. package/lib/components/TimeSliderLite/TimeSliderLiteButtons/TimeSliderLiteButtonUtils.d.ts +3 -0
  41. package/lib/components/TimeSliderLite/TimeSliderLiteConnect.d.ts +12 -0
  42. package/lib/components/TimeSliderLite/TimeSliderLiteConnect.spec.d.ts +1 -0
  43. package/lib/components/TimeSliderLite/TimeSliderLiteConnect.stories.d.ts +9 -0
  44. package/lib/components/TimeSliderLite/index.d.ts +3 -0
  45. package/lib/components/TimeSliderLite/timeSliderLiteUtils.d.ts +47 -0
  46. package/lib/components/TimeSliderLite/timeSliderLiteUtils.spec.d.ts +1 -0
  47. package/lib/index.d.ts +5 -4
  48. package/lib/store/generic/index.d.ts +2 -0
  49. package/lib/store/generic/synchronizationGroups/index.d.ts +1 -0
  50. package/lib/store/generic/synchronizationGroups/selectors.d.ts +3 -1
  51. package/lib/store/generic/synchronizationGroups/types.d.ts +9 -5
  52. package/lib/store/mapStore/layers/reducer.d.ts +2 -2
  53. package/lib/store/mapStore/layers/types.d.ts +0 -2
  54. package/lib/store/mapStore/map/index.d.ts +1 -1
  55. package/lib/store/mapStore/utils/helpers.d.ts +1 -0
  56. package/lib/store/ui/index.d.ts +1 -1
  57. package/lib/utils/sanitizeHTML.d.ts +3 -0
  58. package/lib/utils/sanitizeHTML.spec.d.ts +1 -0
  59. package/package.json +10 -9
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,
@@ -3344,7 +3412,7 @@
3344
3412
  }, []);
3345
3413
  }, selectorMemoizationOptions);
3346
3414
 
3347
- var selectors$3 = /*#__PURE__*/Object.freeze({
3415
+ var selectors$4 = /*#__PURE__*/Object.freeze({
3348
3416
  __proto__: null,
3349
3417
  getLayerById: getLayerById,
3350
3418
  getLayersById: getLayersById,
@@ -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)) {
@@ -3512,7 +3582,7 @@
3512
3582
  return details && details.focused || false;
3513
3583
  });
3514
3584
 
3515
- var selectors$2 = /*#__PURE__*/Object.freeze({
3585
+ var selectors$3 = /*#__PURE__*/Object.freeze({
3516
3586
  __proto__: null,
3517
3587
  getUiStore: getUiStore,
3518
3588
  getDialogDetailsByType: getDialogDetailsByType,
@@ -3922,18 +3992,188 @@
3922
3992
  * See the License for the specific language governing permissions and
3923
3993
  * limitations under the License.
3924
3994
  *
3925
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3926
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
3995
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3996
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
3927
3997
  * */
3998
+ var syncGroupStore = function syncGroupStore(store) {
3999
+ return store.syncronizationGroupStore || null;
4000
+ };
4001
+ /**
4002
+ * Gets synchronization group state
4003
+ *
4004
+ * Example: synchronizationGroupState = getSynchronizationGroupState(store)
4005
+ * @param {object} store store: object - Store object
4006
+ * @returns {object} returnType: SynchronizationGroupState
4007
+ */
3928
4008
 
3929
- var index = /*#__PURE__*/Object.freeze({
3930
- __proto__: null,
3931
- actions: actions,
3932
- constants: constants,
3933
- types: types$1,
3934
- initialState: initialState$4
4009
+ var getSynchronizationGroupState = toolkit.createSelector(syncGroupStore, function (store) {
4010
+ return store || null;
3935
4011
  });
3936
-
4012
+ var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
4013
+ return syncGroupStore(state).groups.byId[id];
4014
+ };
4015
+ var getSynchronizationGroupSource = function getSynchronizationGroupSource(state, id) {
4016
+ return syncGroupStore(state).sources.byId[id];
4017
+ };
4018
+ var getTargets = function getTargets(state, payload, actionType) {
4019
+ var actionPayloads = [];
4020
+ var targetsInActionPayload = {};
4021
+ var syncronizationGroupStore = syncGroupStore(state);
4022
+ /* All the groups the source is member of */
4023
+
4024
+ if (syncronizationGroupStore && payload) {
4025
+ /* Backwards compatibility, if there are no groups, connect everything */
4026
+ if (syncronizationGroupStore.groups.allIds.length === 0) {
4027
+ syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
4028
+ // Only add if should react to this action
4029
+ if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
4030
+ /* Remember that we have already added this target in the action payloads, prevents adding it twice */
4031
+ targetsInActionPayload[targetId] = true;
4032
+ /* Compose the payload */
4033
+
4034
+ var newPayload = __assign({
4035
+ targetId: targetId
4036
+ }, payload);
4037
+
4038
+ actionPayloads.push(newPayload);
4039
+ }
4040
+ });
4041
+ }
4042
+
4043
+ syncronizationGroupStore.groups.allIds.forEach(function (id) {
4044
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
4045
+
4046
+ if (actionType === syncronizationGroup.type) {
4047
+ /* Check if the source is in the target list of the synchonizationGroup */
4048
+ var source = syncronizationGroup.targets.byId[payload.sourceId];
4049
+ /* If the source is part of the target list, and is linked, continue syncing the other targets */
4050
+
4051
+ if (source && source.linked) {
4052
+ syncronizationGroup.targets.allIds.forEach(function (targetId) {
4053
+ var target = syncronizationGroup.targets.byId[targetId];
4054
+
4055
+ if (target.linked && !targetsInActionPayload[targetId]) {
4056
+ /* Remember that we have already added this target in the action payloads, prevents adding it twice */
4057
+ targetsInActionPayload[targetId] = true;
4058
+ /* Compose the payload */
4059
+
4060
+ var newPayload = __assign({
4061
+ targetId: targetId
4062
+ }, payload);
4063
+
4064
+ actionPayloads.push(newPayload);
4065
+ }
4066
+ });
4067
+ }
4068
+ }
4069
+ });
4070
+ }
4071
+
4072
+ return actionPayloads;
4073
+ };
4074
+ var getTargetGroups = function getTargetGroups(state, payload, actionType) {
4075
+ var syncronizationGroupStore = syncGroupStore(state);
4076
+ var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
4077
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
4078
+
4079
+ if (actionType === syncronizationGroup.type) {
4080
+ /* Check if the source is in the target list of the synchronizationGroup */
4081
+ var source = syncronizationGroup.targets.byId[payload.sourceId];
4082
+ /* If the source is part of the target list, and is linked, continue syncin the other targets */
4083
+
4084
+ if (source && source.linked) {
4085
+ return list.concat(groupId);
4086
+ }
4087
+ }
4088
+
4089
+ return list;
4090
+ }, []);
4091
+ return groups;
4092
+ };
4093
+ var getAllTargetGroupsForSource = function getAllTargetGroupsForSource(state, sourceId) {
4094
+ var syncronizationGroupStore = syncGroupStore(state);
4095
+
4096
+ if (syncronizationGroupStore === null || syncronizationGroupStore === void 0 ? void 0 : syncronizationGroupStore.groups) {
4097
+ return syncronizationGroupStore.groups.allIds.reduce(function (linkedSyncGroupIds, groupId) {
4098
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
4099
+ var source = syncronizationGroup.targets.byId[sourceId];
4100
+ /* If the source is part of the target list, and is linked, continue syncin the other targets */
4101
+
4102
+ if (source && source.linked) {
4103
+ return linkedSyncGroupIds.concat(groupId);
4104
+ }
4105
+
4106
+ return linkedSyncGroupIds;
4107
+ }, []);
4108
+ }
4109
+
4110
+ return [];
4111
+ };
4112
+ var syncGroupGetViewState = toolkit.createSelector(syncGroupStore, function (store) {
4113
+ return store.viewState;
4114
+ });
4115
+ var getSyncedMapIdsForTimeslider = toolkit.createSelector(syncGroupStore, function (store) {
4116
+ return store.viewState.timeslider.groups[0].selected;
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
+ };
4136
+
4137
+ var selectors$2 = /*#__PURE__*/Object.freeze({
4138
+ __proto__: null,
4139
+ syncGroupStore: syncGroupStore,
4140
+ getSynchronizationGroupState: getSynchronizationGroupState,
4141
+ getSynchronizationGroup: getSynchronizationGroup,
4142
+ getSynchronizationGroupSource: getSynchronizationGroupSource,
4143
+ getTargets: getTargets,
4144
+ getTargetGroups: getTargetGroups,
4145
+ getAllTargetGroupsForSource: getAllTargetGroupsForSource,
4146
+ syncGroupGetViewState: syncGroupGetViewState,
4147
+ getSyncedMapIdsForTimeslider: getSyncedMapIdsForTimeslider,
4148
+ getSyncGroupTargets: getSyncGroupTargets
4149
+ });
4150
+
4151
+ /* *
4152
+ * Licensed under the Apache License, Version 2.0 (the "License");
4153
+ * you may not use this file except in compliance with the License.
4154
+ * You may obtain a copy of the License at
4155
+ *
4156
+ * http://www.apache.org/licenses/LICENSE-2.0
4157
+ *
4158
+ * Unless required by applicable law or agreed to in writing, software
4159
+ * distributed under the License is distributed on an "AS IS" BASIS,
4160
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4161
+ * See the License for the specific language governing permissions and
4162
+ * limitations under the License.
4163
+ *
4164
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4165
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
4166
+ * */
4167
+
4168
+ var index = /*#__PURE__*/Object.freeze({
4169
+ __proto__: null,
4170
+ actions: actions,
4171
+ constants: constants,
4172
+ types: types$1,
4173
+ initialState: initialState$4,
4174
+ syncGroupsSelectors: selectors$2
4175
+ });
4176
+
3937
4177
  /* *
3938
4178
  * Licensed under the Apache License, Version 2.0 (the "License");
3939
4179
  * you may not use this file except in compliance with the License.
@@ -5551,121 +5791,6 @@
5551
5791
  var reducer = slice.reducer;
5552
5792
  var appActions = slice.actions;
5553
5793
 
5554
- /* *
5555
- * Licensed under the Apache License, Version 2.0 (the "License");
5556
- * you may not use this file except in compliance with the License.
5557
- * You may obtain a copy of the License at
5558
- *
5559
- * http://www.apache.org/licenses/LICENSE-2.0
5560
- *
5561
- * Unless required by applicable law or agreed to in writing, software
5562
- * distributed under the License is distributed on an "AS IS" BASIS,
5563
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5564
- * See the License for the specific language governing permissions and
5565
- * limitations under the License.
5566
- *
5567
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5568
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
5569
- * */
5570
- var syncGroupStore = function syncGroupStore(store) {
5571
- return store.syncronizationGroupStore || null;
5572
- };
5573
- /**
5574
- * Gets synchronization group state
5575
- *
5576
- * Example: synchronizationGroupState = getSynchronizationGroupState(store)
5577
- * @param {object} store store: object - Store object
5578
- * @returns {object} returnType: SynchronizationGroupState
5579
- */
5580
-
5581
- var getSynchronizationGroupState = toolkit.createSelector(syncGroupStore, function (store) {
5582
- return store || null;
5583
- });
5584
- var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
5585
- return syncGroupStore(state).groups.byId[id];
5586
- };
5587
- var getTargets = function getTargets(state, payload, actionType) {
5588
- var actionPayloads = [];
5589
- var targetsInActionPayload = {};
5590
- var syncronizationGroupStore = syncGroupStore(state);
5591
- /* All the groups the source is member of */
5592
-
5593
- if (syncronizationGroupStore && payload) {
5594
- /* Backwards compatibility, if there are no groups, connect everything */
5595
- if (syncronizationGroupStore.groups.allIds.length === 0) {
5596
- syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
5597
- // Only add if should react to this action
5598
- if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
5599
- /* Remember that we have already added this target in the action payloads, prevents adding it twice */
5600
- targetsInActionPayload[targetId] = true;
5601
- /* Compose the payload */
5602
-
5603
- var newPayload = __assign({
5604
- targetId: targetId
5605
- }, payload);
5606
-
5607
- actionPayloads.push(newPayload);
5608
- }
5609
- });
5610
- }
5611
-
5612
- syncronizationGroupStore.groups.allIds.forEach(function (id) {
5613
- var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
5614
-
5615
- if (actionType === syncronizationGroup.type) {
5616
- /* Check if the source is in the target list of the synchonizationGroup */
5617
- var source = syncronizationGroup.targets.byId[payload.sourceId];
5618
- /* If the source is part of the target list, and is linked, continue syncing the other targets */
5619
-
5620
- if (source && source.linked) {
5621
- syncronizationGroup.targets.allIds.forEach(function (targetId) {
5622
- var target = syncronizationGroup.targets.byId[targetId];
5623
-
5624
- if (target.linked && !targetsInActionPayload[targetId]) {
5625
- /* Remember that we have already added this target in the action payloads, prevents adding it twice */
5626
- targetsInActionPayload[targetId] = true;
5627
- /* Compose the payload */
5628
-
5629
- var newPayload = __assign({
5630
- targetId: targetId
5631
- }, payload);
5632
-
5633
- actionPayloads.push(newPayload);
5634
- }
5635
- });
5636
- }
5637
- }
5638
- });
5639
- }
5640
-
5641
- return actionPayloads;
5642
- };
5643
- var getTargetGroups = function getTargetGroups(state, payload, actionType) {
5644
- var syncronizationGroupStore = syncGroupStore(state);
5645
- var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
5646
- var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
5647
-
5648
- if (actionType === syncronizationGroup.type) {
5649
- /* Check if the source is in the target list of the synchronizationGroup */
5650
- var source = syncronizationGroup.targets.byId[payload.sourceId];
5651
- /* If the source is part of the target list, and it linked, continue syncin the other targets */
5652
-
5653
- if (source && source.linked) {
5654
- return list.concat(groupId);
5655
- }
5656
- }
5657
-
5658
- return list;
5659
- }, []);
5660
- return groups;
5661
- };
5662
- var syncGroupGetViewState = toolkit.createSelector(syncGroupStore, function (store) {
5663
- return store.viewState;
5664
- });
5665
- var getSyncedMapIdsForTimeslider = toolkit.createSelector(syncGroupStore, function (store) {
5666
- return store.viewState.timeslider.groups[0].selected;
5667
- }, selectorMemoizationOptions);
5668
-
5669
5794
  /* *
5670
5795
  * Licensed under the Apache License, Version 2.0 (the "License");
5671
5796
  * you may not use this file except in compliance with the License.
@@ -6958,11 +7083,11 @@
6958
7083
  * See the License for the specific language governing permissions and
6959
7084
  * limitations under the License.
6960
7085
  *
6961
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6962
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
7086
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7087
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6963
7088
  * */
6964
7089
 
6965
- var PlayButton = function PlayButton(_a) {
7090
+ var PlayButton$1 = function PlayButton(_a) {
6966
7091
  var isAnimating = _a.isAnimating,
6967
7092
  isDisabled = _a.isDisabled,
6968
7093
  _b = _a.onTogglePlayButton,
@@ -6972,18 +7097,18 @@
6972
7097
  onTogglePlayButton();
6973
7098
  };
6974
7099
 
6975
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
6976
- title: isAnimating ? 'Pause' : 'Play'
6977
- }, /*#__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',
6978
7103
  onClick: onTogglePlay,
6979
7104
  disabled: isDisabled,
6980
7105
  "data-testid": "playButton",
6981
- active: isAnimating
7106
+ isSelected: isAnimating
6982
7107
  }, isAnimating ? /*#__PURE__*/React__namespace.createElement(theme.Pause, {
6983
7108
  "data-testid": "pause-svg-path"
6984
7109
  }) : /*#__PURE__*/React__namespace.createElement(theme.Play, {
6985
7110
  "data-testid": "play-svg-path"
6986
- }))));
7111
+ }));
6987
7112
  };
6988
7113
 
6989
7114
  /* *
@@ -7042,7 +7167,7 @@
7042
7167
  }
7043
7168
  };
7044
7169
 
7045
- return /*#__PURE__*/React__default["default"].createElement(PlayButton, {
7170
+ return /*#__PURE__*/React__default["default"].createElement(PlayButton$1, {
7046
7171
  isAnimating: linkedMapAnimationInfo.isAnimating,
7047
7172
  isDisabled: isDisabled,
7048
7173
  onTogglePlayButton: function onTogglePlayButton() {
@@ -9860,8 +9985,8 @@
9860
9985
  id: 'webmap-module',
9861
9986
  reducersMap: {
9862
9987
  webmap: reducer$5,
9863
- services: reducer$7,
9864
- layers: reducer$8
9988
+ services: reducer$8,
9989
+ layers: reducer$7
9865
9990
  },
9866
9991
  sagas: [rootSaga$4, rootSaga$3]
9867
9992
  };
@@ -10375,10 +10500,13 @@
10375
10500
  };
10376
10501
 
10377
10502
  var HeaderOptions = function HeaderOptions(_a) {
10503
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
10504
+
10378
10505
  var isDockedLayerManager = _a.isDockedLayerManager,
10379
10506
  shortcutsEnabled = _a.shortcutsEnabled,
10380
10507
  onClickDockButton = _a.onClickDockButton,
10381
- onChangeSize = _a.onChangeSize;
10508
+ onChangeSize = _a.onChangeSize,
10509
+ buttonSettings = _a.buttonSettings;
10382
10510
  React__namespace.useEffect(function () {
10383
10511
  var handleKeyDown = function handleKeyDown(event) {
10384
10512
  if (shortcutsEnabled) {
@@ -10397,28 +10525,28 @@
10397
10525
  document.removeEventListener('keydown', handleKeyDown);
10398
10526
  };
10399
10527
  }, [onChangeSize, shortcutsEnabled]);
10400
- 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, {
10401
10529
  tooltipTitle: "small",
10402
10530
  "data-testid": "collapseSmall-btn",
10403
10531
  onClick: function onClick() {
10404
10532
  return onChangeSize(sizeSmall);
10405
10533
  },
10406
10534
  className: "collapseSmall-btn"
10407
- }, /*#__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, {
10408
10536
  tooltipTitle: "medium",
10409
10537
  "data-testid": "collapseMedium-btn",
10410
10538
  onClick: function onClick() {
10411
10539
  return onChangeSize(sizeMedium);
10412
10540
  },
10413
10541
  className: "collapseMedium-btn"
10414
- }, /*#__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, {
10415
10543
  tooltipTitle: "large",
10416
10544
  "data-testid": "collapseLarge-btn",
10417
10545
  onClick: function onClick() {
10418
10546
  return onChangeSize(sizeLarge);
10419
10547
  },
10420
10548
  className: "collapseLarge-btn"
10421
- }, /*#__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, {
10422
10550
  tooltipTitle: isDockedLayerManager ? 'Undock' : 'Dock',
10423
10551
  "data-testid": "dockedBtn",
10424
10552
  disableRipple: true,
@@ -10429,7 +10557,7 @@
10429
10557
  "data-testid": "dockedLayerManager-collapse"
10430
10558
  }) : /*#__PURE__*/React__namespace.createElement(theme.ExpandWindow, {
10431
10559
  "data-testid": "dockedLayerManager-uncollapse"
10432
- })));
10560
+ })), (_m = buttonSettings === null || buttonSettings === void 0 ? void 0 : buttonSettings.divider) === null || _m === void 0 ? void 0 : _m.element);
10433
10561
  };
10434
10562
 
10435
10563
  /* *
@@ -10694,12 +10822,14 @@
10694
10822
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10695
10823
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
10696
10824
  * */
10697
- var styles$4 = {
10698
- text: {
10699
- paddingLeft: '10px',
10700
- fontSize: '12px',
10701
- fontFamily: 'Roboto',
10702
- opacity: 0.67
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);
10703
10833
  }
10704
10834
  };
10705
10835
 
@@ -10741,7 +10871,7 @@
10741
10871
  className: columnClasses.column2
10742
10872
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10743
10873
  className: "header-layer " + (hasMapPresetsModule ? 'mappresetsModule-enabled' : ''),
10744
- sx: styles$4.text
10874
+ sx: styles$5.text
10745
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, {
10746
10876
  className: "header-mapPresets",
10747
10877
  sx: {
@@ -10750,15 +10880,15 @@
10750
10880
  }, mapPresetsModuleInline)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
10751
10881
  className: columnClasses.column3
10752
10882
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10753
- sx: styles$4.text
10883
+ sx: styles$5.text
10754
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, {
10755
10885
  className: columnClasses.column4
10756
10886
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10757
- sx: styles$4.text
10887
+ sx: styles$5.text
10758
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, {
10759
10889
  className: columnClasses.column5
10760
10890
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10761
- sx: styles$4.text
10891
+ sx: styles$5.text
10762
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, {
10763
10893
  className: columnClasses.column6
10764
10894
  }));
@@ -10998,7 +11128,9 @@
10998
11128
  _c = _a.layers,
10999
11129
  layers = _c === void 0 ? [] : _c,
11000
11130
  _d = _a.isEnabled,
11001
- isEnabled = _d === void 0 ? true : _d;
11131
+ isEnabled = _d === void 0 ? true : _d,
11132
+ _e = _a.tooltipPrefix,
11133
+ tooltipPrefix = _e === void 0 ? 'Layer: ' : _e;
11002
11134
 
11003
11135
  if (!layers || !layers.length) {
11004
11136
  return /*#__PURE__*/React__namespace.createElement(material.Box, {
@@ -11025,10 +11157,10 @@
11025
11157
  onChangeLayerName(event.target.value);
11026
11158
  };
11027
11159
 
11028
- var _e = getRenderLayersValues(layerName, layers),
11029
- currentIndex = _e.currentIndex,
11030
- currentValue = _e.currentValue,
11031
- extendedLayers = _e.extendedLayers;
11160
+ var _f = getRenderLayersValues(layerName, layers),
11161
+ currentIndex = _f.currentIndex,
11162
+ currentValue = _f.currentValue,
11163
+ extendedLayers = _f.extendedLayers;
11032
11164
 
11033
11165
  var list = extendedLayers.map(function (layer) {
11034
11166
  return {
@@ -11037,7 +11169,7 @@
11037
11169
  });
11038
11170
  return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
11039
11171
  disableUnderline: true,
11040
- tooltip: "Layer: " + ((_b = extendedLayers[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11172
+ tooltip: "" + tooltipPrefix + ((_b = extendedLayers[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11041
11173
  inputProps: {
11042
11174
  SelectDisplayProps: {
11043
11175
  'data-testid': 'selectLayer'
@@ -11119,20 +11251,25 @@
11119
11251
  }];
11120
11252
 
11121
11253
  var OpacitySelect = function OpacitySelect(_a) {
11254
+ var _b;
11255
+
11122
11256
  var currentOpacity = _a.currentOpacity,
11123
11257
  onLayerChangeOpacity = _a.onLayerChangeOpacity,
11124
- _b = _a.isEnabled,
11125
- isEnabled = _b === void 0 ? true : _b;
11258
+ _c = _a.isEnabled,
11259
+ isEnabled = _c === void 0 ? true : _c,
11260
+ _d = _a.tooltipPrefix,
11261
+ tooltipPrefix = _d === void 0 ? 'Opacity: ' : _d;
11126
11262
 
11127
- var _c = __read(shared.useControlledTooltip(), 2),
11128
- tooltipOpen = _c[0],
11129
- setTooltipOpen = _c[1];
11263
+ var _e = __read(shared.useControlledTooltip(), 2),
11264
+ tooltipOpen = _e[0],
11265
+ setTooltipOpen = _e[1];
11130
11266
 
11131
- var _d = __read(React__namespace.useState(null), 2),
11132
- anchorEl = _d[0],
11133
- setAnchorEl = _d[1];
11267
+ var _f = __read(React__namespace.useState(null), 2),
11268
+ anchorEl = _f[0],
11269
+ setAnchorEl = _f[1];
11134
11270
 
11135
11271
  var isOpen = Boolean(anchorEl);
11272
+ var theme = material.useTheme();
11136
11273
 
11137
11274
  var handleClick = function handleClick(event) {
11138
11275
  setAnchorEl(anchorEl ? null : event.currentTarget);
@@ -11180,12 +11317,12 @@
11180
11317
  onWheel: onWheel,
11181
11318
  className: "opacity-select",
11182
11319
  "data-testid": "scrollOpacity",
11183
- sx: {
11320
+ sx: __assign({
11184
11321
  width: '100%',
11185
11322
  height: 32
11186
- }
11323
+ }, (_b = theme.palette.geowebColors.layerManager.opacitySelect) === null || _b === void 0 ? void 0 : _b.root)
11187
11324
  }, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
11188
- title: "Opacity: " + currentOpacityText,
11325
+ title: "" + tooltipPrefix + currentOpacityText,
11189
11326
  sx: shared.tooltipContainerStyles(isEnabled),
11190
11327
  placement: "top",
11191
11328
  open: tooltipOpen
@@ -11198,12 +11335,17 @@
11198
11335
  onMouseLeave: onMouseLeave,
11199
11336
  onFocus: onFocus,
11200
11337
  onBlur: onBlur,
11201
- style: {
11338
+ sx: __assign({
11202
11339
  height: '100%',
11203
11340
  width: '100%',
11204
11341
  borderRadius: '0',
11205
- minWidth: '49px'
11206
- },
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' : '',
11207
11349
  // Safari-based browsers handle focus differently with buttons
11208
11350
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
11209
11351
  // Use div instead to fix onBlur hander's event.relatedTarget below
@@ -11216,14 +11358,14 @@
11216
11358
  },
11217
11359
  placement: "right"
11218
11360
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
11219
- sx: {
11361
+ sx: __assign({
11220
11362
  padding: '0 0 60px 0',
11221
11363
  backgroundColor: 'geowebColors.background.surface',
11222
11364
  width: '82px',
11223
11365
  height: '248px',
11224
11366
  boxSizing: 'initial',
11225
11367
  boxShadow: 8
11226
- }
11368
+ }, theme.palette.geowebColors.layerManager.opacitySelect.popper)
11227
11369
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
11228
11370
  sx: shared.sliderHeaderStyle
11229
11371
  }, "Opacity"), /*#__PURE__*/React__namespace.createElement(shared.CustomSlider, {
@@ -11268,7 +11410,10 @@
11268
11410
  var LayerManagerMenuButton = function LayerManagerMenuButton(_a) {
11269
11411
  var mapId = _a.mapId,
11270
11412
  layerId = _a.layerId,
11271
- onLayerDuplicate = _a.onLayerDuplicate;
11413
+ onLayerDuplicate = _a.onLayerDuplicate,
11414
+ _b = _a.tooltipTitle,
11415
+ tooltipTitle = _b === void 0 ? 'Options' : _b,
11416
+ icon = _a.icon;
11272
11417
 
11273
11418
  var onClickDuplicate = function onClickDuplicate() {
11274
11419
  onLayerDuplicate({
@@ -11292,7 +11437,8 @@
11292
11437
  action: onClickDuplicate,
11293
11438
  icon: /*#__PURE__*/React__namespace.createElement(theme.Copy, null)
11294
11439
  }],
11295
- tooltipTitle: "Options"
11440
+ tooltipTitle: tooltipTitle,
11441
+ buttonIcon: icon
11296
11442
  });
11297
11443
  };
11298
11444
 
@@ -11303,7 +11449,10 @@
11303
11449
  currentLayerStyle = _a.currentLayerStyle,
11304
11450
  onChangeLayerStyle = _a.onChangeLayerStyle,
11305
11451
  _c = _a.isEnabled,
11306
- isEnabled = _c === void 0 ? true : _c;
11452
+ isEnabled = _c === void 0 ? true : _c,
11453
+ icon = _a.icon,
11454
+ _d = _a.tooltipPrefix,
11455
+ tooltipPrefix = _d === void 0 ? 'Style: ' : _d;
11307
11456
  var styles = [{
11308
11457
  title: 'default',
11309
11458
  name: 'default',
@@ -11331,7 +11480,7 @@
11331
11480
  return currentStyle === style.name;
11332
11481
  });
11333
11482
  return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
11334
- tooltip: "Style: " + ((_b = styles[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11483
+ tooltip: "" + tooltipPrefix + ((_b = styles[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11335
11484
  inputProps: {
11336
11485
  SelectDisplayProps: {
11337
11486
  'data-testid': 'selectStyle'
@@ -11345,7 +11494,8 @@
11345
11494
  onChangeMouseWheel: function onChangeMouseWheel(e) {
11346
11495
  return onChangeLayerStyle(e.value);
11347
11496
  },
11348
- requiresCtrlToChange: true
11497
+ requiresCtrlToChange: true,
11498
+ IconComponent: icon
11349
11499
  }, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
11350
11500
  disabled: true
11351
11501
  }, "Style"), styles.map(function (styleFromlayer) {
@@ -11369,8 +11519,8 @@
11369
11519
  * See the License for the specific language governing permissions and
11370
11520
  * limitations under the License.
11371
11521
  *
11372
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11373
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
11522
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11523
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11374
11524
  * */
11375
11525
 
11376
11526
  var getIconColor = function getIconColor(isActive, isEnabled) {
@@ -11460,7 +11610,8 @@
11460
11610
  isEnabled = _a.isEnabled;
11461
11611
  var isActive = current !== AutoOptions.NONE;
11462
11612
  var Icon = getIcon(isActive, isEnabled, current);
11463
- return /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
11613
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11614
+ variant: "tool",
11464
11615
  "aria-label": current,
11465
11616
  "data-testid": "activateLayer-btn",
11466
11617
  sx: {
@@ -11468,7 +11619,7 @@
11468
11619
  backgroundColor: 'inherit'
11469
11620
  }
11470
11621
  },
11471
- active: isActive
11622
+ isSelected: isActive
11472
11623
  }, Icon);
11473
11624
  };
11474
11625
 
@@ -11560,6 +11711,7 @@
11560
11711
  layerDeleteLayout = _a.layerDeleteLayout,
11561
11712
  layerMenuLayout = _a.layerMenuLayout,
11562
11713
  layerActiveLayout = _a.layerActiveLayout,
11714
+ disableActivateLayer = _a.disableActivateLayer,
11563
11715
  dragHandle = _a.dragHandle;
11564
11716
 
11565
11717
  var onClickRow = function onClickRow() {
@@ -11611,11 +11763,11 @@
11611
11763
  });
11612
11764
  },
11613
11765
  "data-testid": "enableButton-medium"
11614
- }, 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, {
11615
11767
  current: AutoOptions.BOTH,
11616
11768
  onChange: onClickRow,
11617
11769
  isEnabled: true
11618
- }), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
11770
+ })), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
11619
11771
  sx: {
11620
11772
  fontWeight: '500',
11621
11773
  fontSize: '12px',
@@ -11696,11 +11848,11 @@
11696
11848
  });
11697
11849
  },
11698
11850
  "data-testid": "enableButton"
11699
- }, 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, {
11700
11852
  onChange: onClickRow,
11701
11853
  current: AutoOptions.BOTH,
11702
11854
  isEnabled: true
11703
- })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11855
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11704
11856
  item: true,
11705
11857
  className: columnClasses.column2
11706
11858
  }, layerServicesLayout || /*#__PURE__*/React__default["default"].createElement(RenderLayers, {
@@ -11799,7 +11951,11 @@
11799
11951
  var DeleteLayerConnect = function DeleteLayerConnect(_a) {
11800
11952
  var layerId = _a.layerId,
11801
11953
  mapId = _a.mapId,
11802
- layerIndex = _a.layerIndex;
11954
+ layerIndex = _a.layerIndex,
11955
+ _b = _a.tooltipTitle,
11956
+ tooltipTitle = _b === void 0 ? 'Delete' : _b,
11957
+ _c = _a.icon,
11958
+ icon = _c === void 0 ? /*#__PURE__*/React__namespace.createElement(theme.Delete, null) : _c;
11803
11959
  var dispatch = reactRedux.useDispatch();
11804
11960
  var layerDelete = React__namespace.useCallback(function (_a) {
11805
11961
  var mapId = _a.mapId,
@@ -11816,7 +11972,7 @@
11816
11972
  return getLayerEnabled(store, layerId);
11817
11973
  });
11818
11974
  return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11819
- tooltipTitle: "Delete",
11975
+ tooltipTitle: tooltipTitle,
11820
11976
  onClick: function onClick() {
11821
11977
  layerDelete({
11822
11978
  mapId: mapId,
@@ -11826,7 +11982,7 @@
11826
11982
  },
11827
11983
  shouldShowAsDisabled: !isLayerEnabled,
11828
11984
  "data-testid": "deleteButton"
11829
- }, /*#__PURE__*/React__namespace.createElement(theme.Delete, null));
11985
+ }, icon);
11830
11986
  };
11831
11987
 
11832
11988
  /* *
@@ -11852,7 +12008,10 @@
11852
12008
  _b = _a.isEnabled,
11853
12009
  isEnabled = _b === void 0 ? false : _b,
11854
12010
  _c = _a.layerName,
11855
- layerName = _c === void 0 ? '' : _c;
12011
+ layerName = _c === void 0 ? '' : _c,
12012
+ _d = _a.icon,
12013
+ icon = _d === void 0 ? isEnabled ? /*#__PURE__*/React__namespace.createElement(theme.Visibility, null) : /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null) : _d,
12014
+ tooltipTitle = _a.tooltipTitle;
11856
12015
  var dispatch = reactRedux.useDispatch();
11857
12016
  var layerChangeEnabled = React__namespace.useCallback(function (_a) {
11858
12017
  var layerId = _a.layerId,
@@ -11864,9 +12023,11 @@
11864
12023
  origin: LayerActionOrigin.layerManager
11865
12024
  }));
11866
12025
  }, [dispatch, mapId]);
12026
+ var normalTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : 'Toggle visibility';
12027
+ var miniTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : layerName;
11867
12028
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11868
12029
  shouldShowAsDisabled: !isEnabled,
11869
- tooltipTitle: "Toggle visibility",
12030
+ tooltipTitle: normalTooltip,
11870
12031
  onClick: function onClick(event) {
11871
12032
  event.stopPropagation();
11872
12033
  layerChangeEnabled({
@@ -11879,9 +12040,9 @@
11879
12040
  sx: {
11880
12041
  margin: 'auto 0px'
11881
12042
  }
11882
- }, isEnabled ? /*#__PURE__*/React__namespace.createElement(theme.Visibility, null) : /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
12043
+ }, icon), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11883
12044
  shouldShowAsDisabled: !isEnabled,
11884
- tooltipTitle: layerName,
12045
+ tooltipTitle: miniTooltip,
11885
12046
  onClick: function onClick(event) {
11886
12047
  event.stopPropagation();
11887
12048
  layerChangeEnabled({
@@ -11894,7 +12055,7 @@
11894
12055
  sx: {
11895
12056
  margin: 'auto 0px'
11896
12057
  }
11897
- }, isEnabled ? /*#__PURE__*/React__namespace.createElement(theme.Visibility, null) : /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null)));
12058
+ }, icon));
11898
12059
  };
11899
12060
 
11900
12061
  /* *
@@ -11916,7 +12077,8 @@
11916
12077
 
11917
12078
  var OpacitySelectConnect = function OpacitySelectConnect(_a) {
11918
12079
  var layerId = _a.layerId,
11919
- mapId = _a.mapId;
12080
+ mapId = _a.mapId,
12081
+ tooltipPrefix = _a.tooltipPrefix;
11920
12082
  var dispatch = reactRedux.useDispatch();
11921
12083
  var opacity = reactRedux.useSelector(function (store) {
11922
12084
  return getLayerOpacity(store, layerId);
@@ -11934,7 +12096,8 @@
11934
12096
  origin: LayerActionOrigin.layerManager
11935
12097
  }));
11936
12098
  },
11937
- isEnabled: isLayerEnabled
12099
+ isEnabled: isLayerEnabled,
12100
+ tooltipPrefix: tooltipPrefix
11938
12101
  });
11939
12102
  };
11940
12103
 
@@ -12011,7 +12174,9 @@
12011
12174
 
12012
12175
  var RenderStylesConnect = function RenderStylesConnect(_a) {
12013
12176
  var layerId = _a.layerId,
12014
- mapId = _a.mapId;
12177
+ mapId = _a.mapId,
12178
+ icon = _a.icon,
12179
+ tooltipPrefix = _a.tooltipPrefix;
12015
12180
  var dispatch = reactRedux.useDispatch();
12016
12181
  var layerService = reactRedux.useSelector(function (store) {
12017
12182
  return getLayerService(store, layerId);
@@ -12040,7 +12205,9 @@
12040
12205
  layerStyles: layerStyles,
12041
12206
  currentLayerStyle: currentLayerStyle,
12042
12207
  onChangeLayerStyle: layerChangeStyle,
12043
- isEnabled: isLayerEnabled
12208
+ isEnabled: isLayerEnabled,
12209
+ icon: icon,
12210
+ tooltipPrefix: tooltipPrefix
12044
12211
  });
12045
12212
  };
12046
12213
 
@@ -12063,7 +12230,8 @@
12063
12230
 
12064
12231
  var RenderLayersConnect = function RenderLayersConnect(_a) {
12065
12232
  var layerId = _a.layerId,
12066
- mapId = _a.mapId;
12233
+ mapId = _a.mapId,
12234
+ tooltipPrefix = _a.tooltipPrefix;
12067
12235
  var dispatch = reactRedux.useDispatch();
12068
12236
  var layerName = reactRedux.useSelector(function (store) {
12069
12237
  return getLayerName(store, layerId);
@@ -12150,7 +12318,8 @@
12150
12318
  name: name
12151
12319
  });
12152
12320
  },
12153
- isEnabled: isLayerEnabled
12321
+ isEnabled: isLayerEnabled,
12322
+ tooltipPrefix: tooltipPrefix
12154
12323
  });
12155
12324
  };
12156
12325
 
@@ -12173,7 +12342,9 @@
12173
12342
 
12174
12343
  var LayerManagerMenuButtonConnect = function LayerManagerMenuButtonConnect(_a) {
12175
12344
  var layerId = _a.layerId,
12176
- mapId = _a.mapId;
12345
+ mapId = _a.mapId,
12346
+ tooltipTitle = _a.tooltipTitle,
12347
+ icon = _a.icon;
12177
12348
  var dispatch = reactRedux.useDispatch();
12178
12349
  var layer = reactRedux.useSelector(function (store) {
12179
12350
  return getLayerById(store, layerId);
@@ -12198,7 +12369,9 @@
12198
12369
  mapId: mapId,
12199
12370
  layer: layer
12200
12371
  });
12201
- }
12372
+ },
12373
+ tooltipTitle: tooltipTitle,
12374
+ icon: icon
12202
12375
  });
12203
12376
  };
12204
12377
 
@@ -12362,12 +12535,13 @@
12362
12535
  * */
12363
12536
 
12364
12537
  var LayerRowConnect = function LayerRowConnect(_a) {
12365
- var _b;
12538
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
12366
12539
 
12367
12540
  var layerId = _a.layerId,
12368
12541
  mapId = _a.mapId,
12369
12542
  dragHandle = _a.dragHandle,
12370
- layerIndex = _a.layerIndex;
12543
+ layerIndex = _a.layerIndex,
12544
+ settings = _a.settings;
12371
12545
  var isEnabled = reactRedux.useSelector(function (store) {
12372
12546
  return getLayerEnabled(store, layerId);
12373
12547
  });
@@ -12396,15 +12570,22 @@
12396
12570
  layerId: layerId,
12397
12571
  mapId: mapId,
12398
12572
  isEnabled: isEnabled,
12399
- layerName: fullLayerName || layerName
12573
+ layerName: fullLayerName || layerName,
12574
+ icon: isEnabled ? (_c = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _c === void 0 ? void 0 : _c.enabledIcon : (_d = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _d === void 0 ? void 0 : _d.disabledIcon,
12575
+ tooltipTitle: isEnabled ? (_e = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _e === void 0 ? void 0 : _e.enabledTooltipTitle : (_f = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _f === void 0 ? void 0 : _f.disabledTooltipTitle
12400
12576
  }),
12401
12577
  layerOpacityLayout: /*#__PURE__*/React__namespace.createElement(OpacitySelectConnect, {
12402
12578
  layerId: layerId,
12403
- mapId: mapId
12579
+ mapId: mapId,
12580
+ tooltipPrefix: (_g = settings === null || settings === void 0 ? void 0 : settings.opacity) === null || _g === void 0 ? void 0 : _g.tooltipPrefix
12404
12581
  }),
12405
- 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, {
12406
12583
  layerId: layerId,
12407
12584
  mapId: mapId
12585
+ }) : /*#__PURE__*/React__namespace.createElement(RenderLayersConnect, {
12586
+ layerId: layerId,
12587
+ mapId: mapId,
12588
+ tooltipPrefix: (_j = settings === null || settings === void 0 ? void 0 : settings.renderLayer) === null || _j === void 0 ? void 0 : _j.tooltipPrefix
12408
12589
  }),
12409
12590
  layerDimensionLayout: /*#__PURE__*/React__namespace.createElement(DimensionSelectConnect, {
12410
12591
  layerId: layerId,
@@ -12412,21 +12593,28 @@
12412
12593
  }),
12413
12594
  layerStylesLayout: /*#__PURE__*/React__namespace.createElement(RenderStylesConnect, {
12414
12595
  layerId: layerId,
12415
- mapId: mapId
12596
+ mapId: mapId,
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
12416
12599
  }),
12417
12600
  layerDeleteLayout: /*#__PURE__*/React__namespace.createElement(DeleteLayerConnect, {
12418
12601
  mapId: mapId,
12419
12602
  layerId: layerId,
12420
- layerIndex: layerIndex
12603
+ layerIndex: layerIndex,
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
12421
12606
  }),
12422
12607
  layerMenuLayout: /*#__PURE__*/React__namespace.createElement(LayerManagerMenuButtonConnect, {
12423
12608
  mapId: mapId,
12424
- layerId: layerId
12609
+ layerId: layerId,
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
12425
12612
  }),
12426
- 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, {
12427
12614
  mapId: mapId,
12428
12615
  layerId: layerId
12429
12616
  }),
12617
+ disableActivateLayer: (_s = settings === null || settings === void 0 ? void 0 : settings.activateLayer) === null || _s === void 0 ? void 0 : _s.isDisabled,
12430
12618
  dragHandle: dragHandle
12431
12619
  });
12432
12620
  };
@@ -12457,10 +12645,16 @@
12457
12645
  _d = _a.hideTooltip,
12458
12646
  hideTooltip = _d === void 0 ? true : _d,
12459
12647
  _e = _a.isSorting,
12460
- isSorting = _e === void 0 ? false : _e;
12461
- var tooltipTitle = hideTooltip ? '' : TOOLTIP_TITLE;
12648
+ isSorting = _e === void 0 ? false : _e,
12649
+ _f = _a.icon,
12650
+ icon = _f === void 0 ? /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, {
12651
+ "data-testid": "dragHandleIcon"
12652
+ }) : _f,
12653
+ _g = _a.tooltipTitle,
12654
+ tooltipTitle = _g === void 0 ? TOOLTIP_TITLE : _g;
12655
+ var usedTooltipTitle = hideTooltip ? '' : tooltipTitle;
12462
12656
  return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
12463
- tooltipTitle: tooltipTitle,
12657
+ tooltipTitle: usedTooltipTitle,
12464
12658
  "data-testid": "dragHandle" + (index !== undefined ? "-" + index : ''),
12465
12659
  className: "handle",
12466
12660
  tabIndex: -1,
@@ -12468,8 +12662,8 @@
12468
12662
  disabled: isDisabled,
12469
12663
  sx: {
12470
12664
  cursor: isSorting ? 'grabbing' : 'grab',
12471
- '&:hover': {
12472
- backgroundColor: 'inherit!important'
12665
+ '&.handle:hover': function handleHover(theme) {
12666
+ return __assign({}, theme.palette.geowebColors.layerManager.dragHandleHover);
12473
12667
  },
12474
12668
  marginLeft: '3px',
12475
12669
  marginRight: '3px',
@@ -12479,7 +12673,7 @@
12479
12673
  color: 'geowebColors.greys.accessible'
12480
12674
  }
12481
12675
  }
12482
- }, /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, null));
12676
+ }, icon);
12483
12677
  };
12484
12678
 
12485
12679
  /* *
@@ -12500,7 +12694,8 @@
12500
12694
  * */
12501
12695
 
12502
12696
  var LayerContainerRow = function LayerContainerRow(_a) {
12503
- var mapId = _a.mapId;
12697
+ var mapId = _a.mapId,
12698
+ settings = _a.settings;
12504
12699
  var dispatch = reactRedux.useDispatch();
12505
12700
 
12506
12701
  var _b = __read(React__namespace.useState(false), 2),
@@ -12622,6 +12817,8 @@
12622
12817
  width: '100%'
12623
12818
  }
12624
12819
  }, layerIds.map(function (layerId, index) {
12820
+ var _a, _b;
12821
+
12625
12822
  return /*#__PURE__*/React__namespace.createElement(LayerRowConnect, {
12626
12823
  mapId: mapId,
12627
12824
  layerId: layerId,
@@ -12631,8 +12828,11 @@
12631
12828
  isDisabled: isDragDisabled,
12632
12829
  index: index,
12633
12830
  hideTooltip: isSorting || isDragDisabled,
12634
- isSorting: isSorting
12635
- })
12831
+ isSorting: isSorting,
12832
+ icon: (_a = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _a === void 0 ? void 0 : _a.icon,
12833
+ tooltipTitle: (_b = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _b === void 0 ? void 0 : _b.tooltipTitle
12834
+ }),
12835
+ settings: settings
12636
12836
  });
12637
12837
  })));
12638
12838
  };
@@ -13500,7 +13700,7 @@
13500
13700
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13501
13701
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
13502
13702
  * */
13503
- var styles$3 = {
13703
+ var styles$4 = {
13504
13704
  buttonDiv: {
13505
13705
  position: 'relative'
13506
13706
  },
@@ -13543,7 +13743,7 @@
13543
13743
  }, []);
13544
13744
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
13545
13745
  onClick: handleClose,
13546
- sx: styles$3.button,
13746
+ sx: styles$4.button,
13547
13747
  disableRipple: true,
13548
13748
  "data-testid": "addLayersButton",
13549
13749
  ref: ref,
@@ -13575,32 +13775,33 @@
13575
13775
  * */
13576
13776
 
13577
13777
  var BaseLayerRow = function BaseLayerRow(_a) {
13578
- var _b, _c, _d;
13778
+ var _b, _c, _d, _e, _f;
13579
13779
 
13580
13780
  var mapId = _a.mapId,
13581
- _e = _a.preloadedAvailableBaseLayers,
13582
- preloadedAvailableBaseLayers = _e === void 0 ? availableDefaultBaseLayers : _e,
13583
- _f = _a.preloadedServices,
13584
- preloadedServices = _f === void 0 ? preloadedDefaultBaseServices : _f,
13585
- _g = _a.tooltip,
13586
- 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,
13587
13787
  settings = _a.settings;
13788
+ var theme = material.useTheme();
13588
13789
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
13589
13790
  container: true,
13590
13791
  item: true,
13591
13792
  "data-testid": "baseLayerRow",
13592
13793
  className: "addLayer-column",
13593
- sx: {
13794
+ sx: __assign({
13594
13795
  width: '100%',
13595
13796
  height: '36px'
13596
- }
13797
+ }, theme.palette.geowebColors.layerManager.baseLayerRow.root)
13597
13798
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
13598
13799
  item: true,
13599
13800
  className: columnClasses.column1,
13600
13801
  sx: {
13601
13802
  marginTop: '-2px'
13602
13803
  }
13603
- }, /*#__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, {
13604
13805
  preloadedServices: preloadedServices,
13605
13806
  tooltip: tooltip,
13606
13807
  onRenderTree: function onRenderTree(service) {
@@ -13610,14 +13811,14 @@
13610
13811
  layerType: LayerType.baseLayer
13611
13812
  });
13612
13813
  }
13613
- })), (_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, {
13614
13815
  item: true,
13615
13816
  className: columnClasses.column2
13616
13817
  }, /*#__PURE__*/React__namespace.createElement(BaseLayersConnect, {
13617
13818
  mapId: mapId,
13618
13819
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
13619
- tooltipPrefix: (_c = settings === null || settings === void 0 ? void 0 : settings.baseLayerDropdown) === null || _c === void 0 ? void 0 : _c.tooltipPrefix,
13620
- 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
13621
13822
  })));
13622
13823
  };
13623
13824
 
@@ -13653,7 +13854,8 @@
13653
13854
  var isDockedLayerManager = _a.isDockedLayerManager,
13654
13855
  mapId = _a.mapId,
13655
13856
  onClickDockButton = _a.onClickDockButton,
13656
- onChangeSize = _a.onChangeSize;
13857
+ onChangeSize = _a.onChangeSize,
13858
+ buttonSettings = _a.buttonSettings;
13657
13859
  var activeMapId = reactRedux.useSelector(function (store) {
13658
13860
  return getActiveWindowId(store);
13659
13861
  });
@@ -13665,7 +13867,8 @@
13665
13867
  isDockedLayerManager: isDockedLayerManager,
13666
13868
  shortcutsEnabled: shortcutsEnabled,
13667
13869
  onClickDockButton: onClickDockButton,
13668
- onChangeSize: onChangeSize
13870
+ onChangeSize: onChangeSize,
13871
+ buttonSettings: buttonSettings
13669
13872
  });
13670
13873
  };
13671
13874
 
@@ -13685,7 +13888,7 @@
13685
13888
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13686
13889
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
13687
13890
  * */
13688
- var styles$2 = {
13891
+ var styles$3 = {
13689
13892
  layerRowContainer: {
13690
13893
  position: 'relative',
13691
13894
  width: '100%',
@@ -13712,37 +13915,40 @@
13712
13915
  };
13713
13916
 
13714
13917
  var LayerManager = function LayerManager(_a) {
13918
+ var _b, _c, _d, _e, _f;
13919
+
13715
13920
  var mapId = _a.mapId,
13716
13921
  preloadedAvailableBaseLayers = _a.preloadedAvailableBaseLayers,
13717
13922
  preloadedBaseServices = _a.preloadedBaseServices,
13718
13923
  bounds = _a.bounds,
13719
13924
  onClose = _a.onClose,
13720
- showTitle = _a.showTitle,
13925
+ _g = _a.title,
13926
+ title = _g === void 0 ? 'Layer Manager' : _g,
13721
13927
  isOpen = _a.isOpen,
13722
- _b = _a.onMouseDown,
13723
- onMouseDown = _b === void 0 ? function () {} : _b,
13724
- _c = _a.order,
13725
- order = _c === void 0 ? 0 : _c,
13726
- _d = _a.source,
13727
- source = _d === void 0 ? 'app' : _d,
13728
- _e = _a.leftHeaderComponent,
13729
- leftHeaderComponent = _e === void 0 ? undefined : _e,
13730
- _f = _a.isLoading,
13731
- 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,
13732
13938
  error = _a.error,
13733
- _g = _a.isDockedLayerManager,
13734
- isDockedLayerManager = _g === void 0 ? false : _g,
13735
- _h = _a.onToggleDock,
13736
- onToggleDock = _h === void 0 ? function () {} : _h,
13737
- _j = _a.size,
13738
- size = _j === void 0 ? sizeLarge : _j,
13739
- _k = _a.startPosition,
13740
- 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 ? {
13741
13947
  top: 85,
13742
13948
  left: 50
13743
- } : _k,
13744
- _l = _a.setFocused,
13745
- setFocused = _l === void 0 ? function () {} : _l,
13949
+ } : _r,
13950
+ _s = _a.setFocused,
13951
+ setFocused = _s === void 0 ? function () {} : _s,
13746
13952
  settings = _a.settings;
13747
13953
  var minSize = {
13748
13954
  width: 100,
@@ -13750,10 +13956,11 @@
13750
13956
  };
13751
13957
  var startSizeCalc = calculateStartSize(minSize, size, startPosition);
13752
13958
 
13753
- var _m = __read(React__namespace.useState(startSizeCalc), 2),
13754
- sizeInState = _m[0],
13755
- setSizeInState = _m[1];
13959
+ var _t = __read(React__namespace.useState(startSizeCalc), 2),
13960
+ sizeInState = _t[0],
13961
+ setSizeInState = _t[1];
13756
13962
 
13963
+ var theme = material.useTheme();
13757
13964
  React__namespace.useEffect(function () {
13758
13965
  if (size !== sizeInState && isDockedLayerManager && isOpen) {
13759
13966
  setSizeInState(size);
@@ -13761,7 +13968,7 @@
13761
13968
 
13762
13969
  }, [size, isOpen]);
13763
13970
  return /*#__PURE__*/React__namespace.createElement(shared.ToolContainerDraggable, {
13764
- title: showTitle ? "Layer Manager " + mapId : 'Layer Manager',
13971
+ title: title,
13765
13972
  startSize: sizeInState,
13766
13973
  minWidth: minSize.width,
13767
13974
  minHeight: minSize.height,
@@ -13790,10 +13997,13 @@
13790
13997
  setSizeInState(__assign(__assign({}, sizeInState), {
13791
13998
  width: width
13792
13999
  }));
13793
- }
14000
+ },
14001
+ buttonSettings: (_b = settings === null || settings === void 0 ? void 0 : settings.toolbar) === null || _b === void 0 ? void 0 : _b.controlButtonSettings
13794
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,
13795
14005
  className: "layermanager",
13796
- sx: layerManagerStyle,
14006
+ sx: __assign(__assign({}, layerManagerStyle), theme.palette.geowebColors.layerManager.root),
13797
14007
  onResizeStop: function onResizeStop(_event, _direction, node) {
13798
14008
  var width = node.offsetWidth,
13799
14009
  height = node.offsetHeight;
@@ -13830,14 +14040,15 @@
13830
14040
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
13831
14041
  container: true,
13832
14042
  "data-testid": "layerManagerRowContainer",
13833
- sx: styles$2.layerRowContainer
14043
+ sx: styles$3.layerRowContainer
13834
14044
  }, /*#__PURE__*/React__namespace.createElement(DescriptionRow, {
13835
14045
  mapPresetsModule: leftHeaderComponent,
13836
14046
  mapId: mapId,
13837
14047
  source: source,
13838
14048
  settings: settings === null || settings === void 0 ? void 0 : settings.header
13839
14049
  }), /*#__PURE__*/React__namespace.createElement(LayerContainerRow, {
13840
- mapId: mapId
14050
+ mapId: mapId,
14051
+ settings: settings === null || settings === void 0 ? void 0 : settings.content
13841
14052
  }), /*#__PURE__*/React__namespace.createElement(BaseLayerRow, {
13842
14053
  mapId: mapId,
13843
14054
  tooltip: "Add base layers",
@@ -14043,24 +14254,26 @@
14043
14254
  preloadedMapServices = _a.preloadedMapServices,
14044
14255
  preloadedBaseServices = _a.preloadedBaseServices,
14045
14256
  bounds = _a.bounds,
14046
- _b = _a.showTitle,
14047
- showTitle = _b === void 0 ? false : _b,
14048
- _c = _a.leftHeaderComponent,
14049
- 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;
14050
14263
  var dispatch = reactRedux.useDispatch();
14051
14264
  var mapId = reactRedux.useSelector(function (store) {
14052
14265
  return getDialogMapId(store, dialogType);
14053
14266
  });
14054
14267
 
14055
- var _d = useSetupDialog(dialogType),
14056
- dialogOrder = _d.dialogOrder,
14057
- setDialogOrder = _d.setDialogOrder,
14058
- onCloseDialog = _d.onCloseDialog,
14059
- isDialogOpen = _d.isDialogOpen,
14060
- uiSource = _d.uiSource,
14061
- uiIsLoading = _d.uiIsLoading,
14062
- uiError = _d.uiError,
14063
- 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;
14064
14277
 
14065
14278
  useFetchServices(dialogType, preloadedMapServices);
14066
14279
 
@@ -14073,6 +14286,7 @@
14073
14286
  }));
14074
14287
  };
14075
14288
 
14289
+ var shownTitle = showMapIdInTitle ? title + " " + mapId : title;
14076
14290
  return /*#__PURE__*/React__namespace.createElement(LayerManager, {
14077
14291
  mapId: mapId,
14078
14292
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
@@ -14080,7 +14294,7 @@
14080
14294
  bounds: bounds,
14081
14295
  isOpen: isDialogOpen,
14082
14296
  onClose: onCloseDialog,
14083
- showTitle: showTitle,
14297
+ title: shownTitle,
14084
14298
  onMouseDown: setDialogOrder,
14085
14299
  order: dialogOrder,
14086
14300
  source: uiSource,
@@ -14122,12 +14336,14 @@
14122
14336
  preloadedAvailableBaseLayers = _a.preloadedAvailableBaseLayers,
14123
14337
  preloadedBaseServices = _a.preloadedBaseServices,
14124
14338
  bounds = _a.bounds,
14125
- _b = _a.showTitle,
14126
- showTitle = _b === void 0 ? false : _b,
14127
- _c = _a.leftHeaderComponent,
14128
- leftHeaderComponent = _c === void 0 ? undefined : _c,
14129
- _d = _a.source,
14130
- 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;
14131
14347
  var dispatch = reactRedux.useDispatch();
14132
14348
  var dockedLayerManagerSize = reactRedux.useSelector(function (store) {
14133
14349
  return getDockedLayerManagerSize(store, mapId);
@@ -14141,11 +14357,11 @@
14141
14357
 
14142
14358
  var dialogType = DialogTypes.DockedLayerManager + "-" + mapId;
14143
14359
 
14144
- var _e = useSetupDialog(dialogType, source),
14145
- dialogOrder = _e.dialogOrder,
14146
- isDialogOpen = _e.isDialogOpen,
14147
- setDialogOrder = _e.setDialogOrder,
14148
- 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;
14149
14365
 
14150
14366
  var onToggleDock = function onToggleDock() {
14151
14367
  // Close docked layer manager and open the floating layer manager
@@ -14158,6 +14374,7 @@
14158
14374
  }));
14159
14375
  };
14160
14376
 
14377
+ var shownTitle = showMapIdInTitle ? title + " " + mapId : title;
14161
14378
  return /*#__PURE__*/React__namespace.createElement(LayerManager, {
14162
14379
  mapId: mapId,
14163
14380
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
@@ -14165,7 +14382,7 @@
14165
14382
  bounds: bounds,
14166
14383
  isOpen: isDialogOpen,
14167
14384
  onClose: onCloseDialog,
14168
- showTitle: showTitle,
14385
+ title: shownTitle,
14169
14386
  leftHeaderComponent: leftHeaderComponent,
14170
14387
  // isLoading={isMapPresetLoading}
14171
14388
  // error={mapPresetError}
@@ -14195,8 +14412,8 @@
14195
14412
  * See the License for the specific language governing permissions and
14196
14413
  * limitations under the License.
14197
14414
  *
14198
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14199
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
14415
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14416
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
14200
14417
  * */
14201
14418
 
14202
14419
  var KeywordFilterButtonConnect = function KeywordFilterButtonConnect(_a) {
@@ -14218,13 +14435,12 @@
14218
14435
  source: source
14219
14436
  }));
14220
14437
  }, [currentActiveMapId, dispatch, isOpenInStore, mapId, source]);
14221
- return /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
14438
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
14439
+ variant: "tool",
14222
14440
  onClick: openFilterResultsDialog,
14223
- active: isOpenInStore,
14441
+ isSelected: isOpenInStore,
14224
14442
  id: "keywordFilterButton",
14225
- "data-testid": "keywordFilterButton",
14226
- disableRipple: true,
14227
- variant: "tool"
14443
+ "data-testid": "keywordFilterButton"
14228
14444
  }, /*#__PURE__*/React__namespace.createElement(theme.Filter, null));
14229
14445
  };
14230
14446
 
@@ -14499,8 +14715,8 @@
14499
14715
  * See the License for the specific language governing permissions and
14500
14716
  * limitations under the License.
14501
14717
  *
14502
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14503
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
14718
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14719
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
14504
14720
  * */
14505
14721
 
14506
14722
  var LayerInfoButtonConnect = function LayerInfoButtonConnect(_a) {
@@ -14554,9 +14770,9 @@
14554
14770
  }
14555
14771
  };
14556
14772
 
14557
- return /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
14558
- variant: "icon",
14559
- active: isActive && isOpenInStore,
14773
+ return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
14774
+ variant: "flat",
14775
+ isSelected: isActive && isOpenInStore,
14560
14776
  onClick: onClick,
14561
14777
  id: "layerInfoButton",
14562
14778
  "aria-label": "layer info",
@@ -15694,7 +15910,7 @@
15694
15910
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15695
15911
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
15696
15912
  * */
15697
- var styles$1 = {
15913
+ var styles$2 = {
15698
15914
  servicesContainer: {
15699
15915
  width: '360px',
15700
15916
  maxHeight: '412px',
@@ -15761,7 +15977,7 @@
15761
15977
  (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.focus();
15762
15978
  }, []);
15763
15979
  return /*#__PURE__*/React__namespace.createElement(material.Box, {
15764
- sx: styles$1.servicesContainer,
15980
+ sx: styles$2.servicesContainer,
15765
15981
  "data-testid": "ServiceDialog",
15766
15982
  onKeyDown: function onKeyDown(event) {
15767
15983
  if (event.key !== 'Escape') {
@@ -15771,9 +15987,9 @@
15771
15987
  tabIndex: -1,
15772
15988
  ref: dialogRef
15773
15989
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
15774
- sx: styles$1.header
15990
+ sx: styles$2.header
15775
15991
  }, "Services"), /*#__PURE__*/React__namespace.createElement(material.Backdrop, {
15776
- sx: styles$1.loading,
15992
+ sx: styles$2.loading,
15777
15993
  open: isLoading
15778
15994
  }, /*#__PURE__*/React__namespace.createElement(material.CircularProgress, null)), /*#__PURE__*/React__namespace.createElement(Rows, {
15779
15995
  services: services,
@@ -15782,12 +15998,12 @@
15782
15998
  setServicePopupInfo: setServicePopupInfo,
15783
15999
  selectedLayers: selectedLayers
15784
16000
  }), /*#__PURE__*/React__namespace.createElement(material.Box, {
15785
- sx: styles$1.footer
16001
+ sx: styles$2.footer
15786
16002
  }, /*#__PURE__*/React__namespace.createElement(material.Button, {
15787
16003
  onClick: openAddService,
15788
16004
  onKeyDown: stopTabPropagation,
15789
16005
  "data-testid": "openAddServiceButton",
15790
- sx: styles$1.button,
16006
+ sx: styles$2.button,
15791
16007
  variant: "tertiary",
15792
16008
  startIcon: /*#__PURE__*/React__namespace.createElement(theme.Add, null)
15793
16009
  }, "Add a new service")));
@@ -17344,8 +17560,8 @@
17344
17560
  * See the License for the specific language governing permissions and
17345
17561
  * limitations under the License.
17346
17562
  *
17347
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17348
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
17563
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17564
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
17349
17565
  * */
17350
17566
 
17351
17567
  var MapControlButton = function MapControlButton(_a) {
@@ -17358,13 +17574,15 @@
17358
17574
  isActive = _c === void 0 ? false : _c,
17359
17575
  props = __rest(_a, ["onClick", "children", "title", "placement", "isActive"]);
17360
17576
 
17361
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
17362
- placement: placement,
17363
- title: title
17364
- }, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, __assign({
17577
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, __assign({
17578
+ variant: "tool",
17579
+ tooltipProps: {
17580
+ placement: placement,
17581
+ title: title
17582
+ },
17365
17583
  onClick: onClick,
17366
- active: isActive
17367
- }, props), children));
17584
+ isSelected: isActive
17585
+ }, props), children);
17368
17586
  };
17369
17587
 
17370
17588
  /* *
@@ -18161,8 +18379,8 @@
18161
18379
  * See the License for the specific language governing permissions and
18162
18380
  * limitations under the License.
18163
18381
  *
18164
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18165
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
18382
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18383
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18166
18384
  * */
18167
18385
  var titleOn = 'Auto update on';
18168
18386
  var titleOff = 'Auto update off';
@@ -18174,21 +18392,20 @@
18174
18392
  isAutoUpdating = _c === void 0 ? false : _c,
18175
18393
  _d = _a.disabled,
18176
18394
  disabled = _d === void 0 ? false : _d;
18177
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18178
- title: isAutoUpdating ? titleOn : titleOff,
18179
- "data-testid": "autoUpdateButtonTooltip"
18180
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18181
- active: isAutoUpdating,
18395
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18396
+ variant: "tool",
18397
+ isSelected: isAutoUpdating,
18182
18398
  disabled: disabled,
18183
18399
  onClick: function onClick() {
18184
18400
  return toggleAutoUpdate();
18185
18401
  },
18186
- "data-testid": "autoUpdateButton"
18402
+ "data-testid": "autoUpdateButton",
18403
+ tooltipTitle: isAutoUpdating ? titleOn : titleOff
18187
18404
  }, isAutoUpdating ? /*#__PURE__*/React__namespace.createElement(theme.AutoUpdateActive, {
18188
18405
  "data-testid": "auto-update-svg-on"
18189
18406
  }) : /*#__PURE__*/React__namespace.createElement(theme.AutoUpdateInActive, {
18190
18407
  "data-testid": "auto-update-svg-off"
18191
- }))));
18408
+ }));
18192
18409
  };
18193
18410
 
18194
18411
  /* *
@@ -18204,8 +18421,8 @@
18204
18421
  * See the License for the specific language governing permissions and
18205
18422
  * limitations under the License.
18206
18423
  *
18207
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18208
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
18424
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18425
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18209
18426
  * */
18210
18427
  var THROTTLE_WAIT_TIME = 300; // [ms]
18211
18428
 
@@ -18258,20 +18475,24 @@
18258
18475
  onKeyDown: function onKeyDown(event) {
18259
18476
  event.stopPropagation();
18260
18477
  }
18261
- }, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18262
- title: title
18263
- }, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18478
+ }, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18479
+ variant: "tool",
18480
+ tooltipTitle: title,
18264
18481
  onClick: function onClick() {
18265
18482
  setOpen(true);
18266
18483
  },
18267
18484
  ref: setAnchorRef,
18268
- active: true,
18269
- width: "100%",
18270
- onWheel: onWheel
18485
+ isSelected: true,
18486
+ onWheel: onWheel,
18487
+ sx: {
18488
+ padding: '11px!important',
18489
+ width: '100%!important'
18490
+ }
18271
18491
  }, icon, /*#__PURE__*/React__namespace.createElement(material.Typography, {
18272
18492
  fontSize: 12,
18273
- fontWeight: 400
18274
- }, displayVariableDuration ? minutesToDescribedDuration(value) : currentMark === null || currentMark === void 0 ? void 0 : currentMark.text))), /*#__PURE__*/React__namespace.createElement(material.Menu, {
18493
+ fontWeight: 400,
18494
+ textTransform: "none"
18495
+ }, displayVariableDuration ? minutesToDescribedDuration(value) : currentMark === null || currentMark === void 0 ? void 0 : currentMark.text)), /*#__PURE__*/React__namespace.createElement(material.Menu, {
18275
18496
  anchorEl: anchorRef,
18276
18497
  open: open,
18277
18498
  onClose: function onClose() {
@@ -18327,12 +18548,19 @@
18327
18548
  minHeight: '30px!important'
18328
18549
  }
18329
18550
  }
18330
- }, "length"), displayVariableDuration && /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18551
+ }, "length"), displayVariableDuration && /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18552
+ variant: "tool",
18331
18553
  "data-testid": "menu-animation-length-button",
18332
- active: false,
18333
- disableRipple: true,
18334
- width: "100%"
18335
- }, minutesToDescribedDuration(value))));
18554
+ sx: {
18555
+ padding: '11px!important',
18556
+ width: '100%!important'
18557
+ }
18558
+ }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
18559
+ fontSize: 14,
18560
+ fontWeight: 500,
18561
+ textTransform: "none",
18562
+ lineHeight: 2
18563
+ }, minutesToDescribedDuration(value)))));
18336
18564
  };
18337
18565
 
18338
18566
  /* *
@@ -18631,8 +18859,8 @@
18631
18859
  * See the License for the specific language governing permissions and
18632
18860
  * limitations under the License.
18633
18861
  *
18634
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18635
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
18862
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18863
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18636
18864
  * */
18637
18865
  var title$1 = 'Now';
18638
18866
 
@@ -18641,18 +18869,18 @@
18641
18869
  onSetNow = _b === void 0 ? function () {} : _b,
18642
18870
  _c = _a.disabled,
18643
18871
  disabled = _c === void 0 ? false : _c;
18644
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18645
- title: title$1,
18646
- "data-testid": "nowButtonTooltip"
18647
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
18872
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
18873
+ variant: "tool",
18874
+ "aria-label": "now",
18875
+ tooltipTitle: title$1,
18876
+ "data-testid": "nowButtonTooltip",
18648
18877
  disabled: disabled,
18649
18878
  onClick: function onClick() {
18650
18879
  return onSetNow();
18651
- },
18652
- "aria-label": "now"
18880
+ }
18653
18881
  }, /*#__PURE__*/React__namespace.createElement(theme.Now, {
18654
18882
  "data-testid": "now-svg"
18655
- }))));
18883
+ }));
18656
18884
  };
18657
18885
 
18658
18886
  /* *
@@ -18807,8 +19035,8 @@
18807
19035
  * See the License for the specific language governing permissions and
18808
19036
  * limitations under the License.
18809
19037
  *
18810
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18811
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
19038
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
19039
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18812
19040
  * */
18813
19041
 
18814
19042
  var OptionsMenuButton = function OptionsMenuButton(_a) {
@@ -18834,21 +19062,22 @@
18834
19062
  setOpen(true);
18835
19063
  }
18836
19064
  }, [anchorEl, isOpenByDefault]);
18837
- return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
18838
- title: "Animation options",
18839
- placement: "bottom"
18840
- }, /*#__PURE__*/React__default["default"].createElement("span", {
18841
- ref: function ref(_ref) {
18842
- setAnchorEl(_ref);
18843
- }
18844
- }, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
19065
+ return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
19066
+ variant: "tool",
18845
19067
  onClick: function onClick() {
18846
19068
  setOpen(!open);
18847
19069
  },
18848
19070
  "data-testid": "optionsMenuButton",
18849
- active: open,
18850
- "aria-label": "animation options"
18851
- }, /*#__PURE__*/React__default["default"].createElement(theme.Options, null)))), /*#__PURE__*/React__default["default"].createElement(material.Popper, {
19071
+ isSelected: open,
19072
+ "aria-label": "animation options",
19073
+ tooltipProps: {
19074
+ title: 'Animation options',
19075
+ placement: 'bottom'
19076
+ },
19077
+ ref: function ref(_ref) {
19078
+ setAnchorEl(_ref);
19079
+ }
19080
+ }, /*#__PURE__*/React__default["default"].createElement(theme.Options, null)), /*#__PURE__*/React__default["default"].createElement(material.Popper, {
18852
19081
  sx: {
18853
19082
  zIndex: 3
18854
19083
  },
@@ -18857,7 +19086,11 @@
18857
19086
  "data-testid": "optionsMenuPopOver",
18858
19087
  anchorEl: anchorEl
18859
19088
  }, /*#__PURE__*/React__default["default"].createElement(material.Paper, {
18860
- elevation: 3
19089
+ elevation: 3,
19090
+ sx: {
19091
+ position: 'relative',
19092
+ top: 1
19093
+ }
18861
19094
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
18862
19095
  sx: {
18863
19096
  padding: '0px 10px 10px'
@@ -18887,8 +19120,8 @@
18887
19120
  * See the License for the specific language governing permissions and
18888
19121
  * limitations under the License.
18889
19122
  *
18890
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18891
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
19123
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
19124
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
18892
19125
  * */
18893
19126
  var forwardTooltipTitle = 'Forward';
18894
19127
  var backwardTooltipTitle = 'Backward';
@@ -18898,17 +19131,17 @@
18898
19131
  isDisabled = _a.isDisabled,
18899
19132
  _b = _a.onClickBFButton,
18900
19133
  onClickBFButton = _b === void 0 ? function () {} : _b;
18901
- return /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
18902
- title: isForwardStep ? forwardTooltipTitle : backwardTooltipTitle
18903
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
19134
+ return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
19135
+ variant: "tool",
18904
19136
  disabled: isDisabled,
18905
19137
  "aria-label": isForwardStep ? 'forward' : 'backward',
18906
- onClick: onClickBFButton
19138
+ onClick: onClickBFButton,
19139
+ tooltipTitle: isForwardStep ? forwardTooltipTitle : backwardTooltipTitle
18907
19140
  }, isForwardStep ? /*#__PURE__*/React__namespace.createElement(theme.StepForward, {
18908
19141
  "data-testid": "step-forward-svg-path"
18909
19142
  }) : /*#__PURE__*/React__namespace.createElement(theme.StepBackward, {
18910
19143
  "data-testid": "step-backward-svg-path"
18911
- }))));
19144
+ }));
18912
19145
  };
18913
19146
 
18914
19147
  /* *
@@ -18941,7 +19174,7 @@
18941
19174
  isForwardStep: true
18942
19175
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
18943
19176
  item: true
18944
- }, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null)));
19177
+ }, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton$1, null)));
18945
19178
  };
18946
19179
 
18947
19180
  /* *
@@ -19980,7 +20213,7 @@
19980
20213
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
19981
20214
  * */
19982
20215
  var TIME_SLIDER_LEGEND_HEIGHT = 24;
19983
- var DRAG_AREA_WIDTH = 24;
20216
+ var DRAG_AREA_WIDTH$1 = 24;
19984
20217
 
19985
20218
  function useAnimationTime(animationStartTime, animationEndTime, onSetAnimationStartTime, onSetAnimationEndTime, leftMarkerDragging, rightMarkerDragging, animationAreaDragging, centerTime, canvasWidth, secondsPerPx, dragTooltipPosition, pixelsToLeft, setTooltipTime, startDraggingPosition) {
19986
20219
  var _a = __read(React__namespace.useState(convertStringTimeToUnix(animationStartTime)), 2),
@@ -20035,7 +20268,7 @@
20035
20268
 
20036
20269
  if (leftMarkerDragging) {
20037
20270
  var mousePosition = leftMarkerPx + x;
20038
- var rightAnimationPosition = rightMarkerPx - DRAG_AREA_WIDTH * 2;
20271
+ var rightAnimationPosition = rightMarkerPx - DRAG_AREA_WIDTH$1 * 2;
20039
20272
 
20040
20273
  if (mousePosition >= rightAnimationPosition || mousePosition <= 0) {
20041
20274
  return;
@@ -20051,7 +20284,7 @@
20051
20284
 
20052
20285
  if (rightMarkerDragging) {
20053
20286
  var mousePosition = rightMarkerPx + x;
20054
- var leftAnimationPosition = leftMarkerPx + DRAG_AREA_WIDTH * 2;
20287
+ var leftAnimationPosition = leftMarkerPx + DRAG_AREA_WIDTH$1 * 2;
20055
20288
 
20056
20289
  if (leftAnimationPosition >= mousePosition || mousePosition >= canvasWidth) {
20057
20290
  return;
@@ -20240,7 +20473,7 @@
20240
20473
  selectedTimePx = _a[2]; // start dragging selected time.
20241
20474
 
20242
20475
 
20243
- if (isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH)) {
20476
+ if (isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH$1)) {
20244
20477
  setCursorStyle('grabbing');
20245
20478
  setSelectedTimeDragging(true);
20246
20479
  return;
@@ -20249,7 +20482,7 @@
20249
20482
  if (animationStartTime && animationEndTime) {
20250
20483
  dragTooltipPosition.current = pixelsToLeft ? x + pixelsToLeft : x; // start dragging either marker
20251
20484
 
20252
- if (isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH) && !rightMarkerDragging) {
20485
+ if (isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH$1) && !rightMarkerDragging) {
20253
20486
  setCursorStyle('grabbing');
20254
20487
  setLeftMarkerDragging(true);
20255
20488
  setTooltipTime(moment__default["default"].utc(animationStartTime));
@@ -20257,7 +20490,7 @@
20257
20490
  return;
20258
20491
  }
20259
20492
 
20260
- if (isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH) && !leftMarkerDragging) {
20493
+ if (isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH$1) && !leftMarkerDragging) {
20261
20494
  setCursorStyle('grabbing');
20262
20495
  setRightMarkerDragging(true);
20263
20496
  setTooltipTime(moment__default["default"].utc(animationEndTime));
@@ -20303,9 +20536,9 @@
20303
20536
  selectedTimePx = _a[2]; // Adjust mouse cursor while hovering draggable areas
20304
20537
 
20305
20538
 
20306
- var leftAnimationIconArea = isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH);
20307
- var rightAnimationIconArea = isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH);
20308
- var selectedTimeArea = isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH);
20539
+ var leftAnimationIconArea = isLeftAnimationIconArea(x, leftMarkerPx, DRAG_AREA_WIDTH$1);
20540
+ var rightAnimationIconArea = isRightAnimationIconArea(x, rightMarkerPx, DRAG_AREA_WIDTH$1);
20541
+ var selectedTimeArea = isSelectedTimeIconArea(x, selectedTimePx, DRAG_AREA_WIDTH$1);
20309
20542
  var insideAnimationArea = isInsideAnimationArea(x, leftMarkerPx, rightMarkerPx);
20310
20543
  var hoveringLegendHandles = leftAnimationIconArea || rightAnimationIconArea || selectedTimeArea || mouseDownInLegend;
20311
20544
 
@@ -20378,22 +20611,21 @@
20378
20611
  * See the License for the specific language governing permissions and
20379
20612
  * limitations under the License.
20380
20613
  *
20381
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
20382
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
20614
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
20615
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
20383
20616
  * */
20384
20617
 
20385
20618
  var HideSliderButton = function HideSliderButton(_a) {
20386
20619
  var isVisible = _a.isVisible,
20387
20620
  toggleTimeSliderIsVisible = _a.toggleTimeSliderIsVisible;
20388
- return /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
20389
- title: isVisible ? 'Hide timeslider' : 'Show timeslider',
20390
- "data-testid": "autoUpdateButtonTooltip"
20391
- }, /*#__PURE__*/React__default["default"].createElement("span", null, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
20621
+ return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
20622
+ variant: "tool",
20392
20623
  onClick: function onClick() {
20393
20624
  toggleTimeSliderIsVisible(!isVisible);
20394
20625
  },
20395
- "data-testid": "hideTimeSliderButton"
20396
- }, isVisible ? /*#__PURE__*/React__default["default"].createElement(theme.ChevronDown, null) : /*#__PURE__*/React__default["default"].createElement(theme.ChevronUp, null))));
20626
+ "data-testid": "hideTimeSliderButton",
20627
+ tooltipTitle: isVisible ? 'Hide timeslider' : 'Show timeslider'
20628
+ }, isVisible ? /*#__PURE__*/React__default["default"].createElement(theme.ChevronDown, null) : /*#__PURE__*/React__default["default"].createElement(theme.ChevronUp, null));
20397
20629
  };
20398
20630
 
20399
20631
  /* *
@@ -21763,7 +21995,7 @@
21763
21995
  var tileRenderSettings = {
21764
21996
  WorldMap_Light_Grey_Canvas: {
21765
21997
  'EPSG:3857': {
21766
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap_Light_Grey_Canvas/EPSG3857/',
21998
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap_Light_Grey_Canvas/EPSG3857/',
21767
21999
  minLevel: 0,
21768
22000
  maxLevel: 9,
21769
22001
  tileServerType: 'osm',
@@ -21772,7 +22004,7 @@
21772
22004
  },
21773
22005
  OpenStreetMap_NL: {
21774
22006
  'EPSG:3857': {
21775
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OpenStreetMap_NL/EPSG3857/',
22007
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreetMap_NL/EPSG3857/',
21776
22008
  minLevel: 0,
21777
22009
  maxLevel: 16,
21778
22010
  tileServerType: 'osm',
@@ -21781,14 +22013,14 @@
21781
22013
  },
21782
22014
  OpenStreets_NL: {
21783
22015
  'EPSG:3857': {
21784
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OpenStreets_NL/EPSG3857/',
22016
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG3857/',
21785
22017
  minLevel: 0,
21786
22018
  maxLevel: 16,
21787
22019
  tileServerType: 'osm',
21788
22020
  copyRight: 'OpenStreetMap - contributors | Ingmapping'
21789
22021
  },
21790
22022
  'EPSG:28992': {
21791
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OpenStreets_NL/EPSG28992/',
22023
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OpenStreets_NL/EPSG28992/',
21792
22024
  minLevel: 0,
21793
22025
  maxLevel: 16,
21794
22026
  tileServerType: 'osm',
@@ -21797,7 +22029,7 @@
21797
22029
  },
21798
22030
  Positron_NL: {
21799
22031
  'EPSG:3857': {
21800
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Positron_NL/EPSG3857/',
22032
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL/EPSG3857/',
21801
22033
  minLevel: 0,
21802
22034
  maxLevel: 16,
21803
22035
  tileServerType: 'osm',
@@ -21806,7 +22038,7 @@
21806
22038
  },
21807
22039
  Positron_NL_NoLabels: {
21808
22040
  'EPSG:3857': {
21809
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Positron_NL_NoLabels/EPSG3857/',
22041
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Positron_NL_NoLabels/EPSG3857/',
21810
22042
  minLevel: 0,
21811
22043
  maxLevel: 16,
21812
22044
  tileServerType: 'osm',
@@ -21815,7 +22047,7 @@
21815
22047
  },
21816
22048
  Klokantech_Basic_NL: {
21817
22049
  'EPSG:3857': {
21818
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Klokantech_Basic_NL/EPSG3857/',
22050
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL/EPSG3857/',
21819
22051
  minLevel: 0,
21820
22052
  maxLevel: 16,
21821
22053
  tileServerType: 'osm',
@@ -21824,7 +22056,7 @@
21824
22056
  },
21825
22057
  Klokantech_Basic_NL_NoLabels: {
21826
22058
  'EPSG:3857': {
21827
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/Klokantech_Basic_NL_NoLabels/EPSG3857/',
22059
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/Klokantech_Basic_NL_NoLabels/EPSG3857/',
21828
22060
  minLevel: 0,
21829
22061
  maxLevel: 16,
21830
22062
  tileServerType: 'osm',
@@ -21833,7 +22065,7 @@
21833
22065
  },
21834
22066
  OSM_Blossom_NL: {
21835
22067
  'EPSG:3857': {
21836
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OSM_Blossom_NL/EPSG3857/',
22068
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Blossom_NL/EPSG3857/',
21837
22069
  minLevel: 0,
21838
22070
  maxLevel: 16,
21839
22071
  tileServerType: 'osm',
@@ -21842,14 +22074,14 @@
21842
22074
  },
21843
22075
  WorldMap: {
21844
22076
  'EPSG:3857': {
21845
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3857/',
22077
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3857/',
21846
22078
  minLevel: 0,
21847
22079
  maxLevel: 9,
21848
22080
  tileServerType: 'osm',
21849
22081
  copyRight: 'Natural Earth II | Ingmapping'
21850
22082
  },
21851
22083
  'TODO__EPSG:4326': {
21852
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG4326/',
22084
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG4326/',
21853
22085
  minLevel: 0,
21854
22086
  maxLevel: 9,
21855
22087
  origX: -180,
@@ -21859,42 +22091,42 @@
21859
22091
  copyRight: 'Natural Earth II | Ingmapping'
21860
22092
  },
21861
22093
  'EPSG:3411': {
21862
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3411/',
22094
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3411/',
21863
22095
  minLevel: 3,
21864
22096
  maxLevel: 9,
21865
22097
  tileServerType: 'osm',
21866
22098
  copyRight: 'Natural Earth II | Ingmapping'
21867
22099
  },
21868
22100
  'EPSG:28992': {
21869
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG28992/',
22101
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG28992/',
21870
22102
  minLevel: 5,
21871
22103
  maxLevel: 9,
21872
22104
  tileServerType: 'osm',
21873
22105
  copyRight: 'Natural Earth II | Ingmapping'
21874
22106
  },
21875
22107
  'EPSG:3412': {
21876
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3412/',
22108
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3412/',
21877
22109
  minLevel: 3,
21878
22110
  maxLevel: 9,
21879
22111
  tileServerType: 'osm',
21880
22112
  copyRight: 'Natural Earth II | Ingmapping'
21881
22113
  },
21882
22114
  'EPSG:32661': {
21883
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG32661/',
22115
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG32661/',
21884
22116
  minLevel: 4,
21885
22117
  maxLevel: 9,
21886
22118
  tileServerType: 'osm',
21887
22119
  copyRight: 'Natural Earth II | Ingmapping'
21888
22120
  },
21889
22121
  'EPSG:54030': {
21890
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG54030/',
22122
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG54030/',
21891
22123
  minLevel: 3,
21892
22124
  maxLevel: 9,
21893
22125
  tileServerType: 'osm',
21894
22126
  copyRight: 'Natural Earth II | Ingmapping'
21895
22127
  },
21896
22128
  'EPSG:3575': {
21897
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/WorldMap/EPSG3575/',
22129
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/WorldMap/EPSG3575/',
21898
22130
  minLevel: 5,
21899
22131
  maxLevel: 9,
21900
22132
  tileServerType: 'osm',
@@ -21903,7 +22135,7 @@
21903
22135
  },
21904
22136
  OSM_Antarctica: {
21905
22137
  'EPSG:3412': {
21906
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/OSM_Antarctica/EPSG3412/',
22138
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/OSM_Antarctica/EPSG3412/',
21907
22139
  minLevel: 1,
21908
22140
  maxLevel: 7,
21909
22141
  origX: -3000000,
@@ -22006,7 +22238,7 @@
22006
22238
  },
22007
22239
  NaturalEarth2: {
22008
22240
  'EPSG:3411': {
22009
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3411/',
22241
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3411/',
22010
22242
  minLevel: 1,
22011
22243
  maxLevel: 6,
22012
22244
  origX: -12400000,
@@ -22016,7 +22248,7 @@
22016
22248
  copyRight: 'NPS - Natural Earth II'
22017
22249
  },
22018
22250
  'EPSG:3412': {
22019
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3412/',
22251
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3412/',
22020
22252
  minLevel: 1,
22021
22253
  maxLevel: 6,
22022
22254
  origX: -12400000,
@@ -22026,7 +22258,7 @@
22026
22258
  copyRight: 'NPS - Natural Earth II'
22027
22259
  },
22028
22260
  'EPSG:3575': {
22029
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3575/',
22261
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3575/',
22030
22262
  minLevel: 1,
22031
22263
  maxLevel: 6,
22032
22264
  origX: -13000000,
@@ -22036,14 +22268,14 @@
22036
22268
  copyRight: 'NPS - Natural Earth II'
22037
22269
  },
22038
22270
  'EPSG:3857': {
22039
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG3857/',
22271
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG3857/',
22040
22272
  minLevel: 1,
22041
22273
  maxLevel: 7,
22042
22274
  tileServerType: 'wmst',
22043
22275
  copyRight: 'NPS - Natural Earth II'
22044
22276
  },
22045
22277
  'EPSG:4258': {
22046
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG4326/',
22278
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
22047
22279
  minLevel: 1,
22048
22280
  maxLevel: 6,
22049
22281
  origX: -180,
@@ -22053,7 +22285,7 @@
22053
22285
  copyRight: 'NPS - Natural Earth II'
22054
22286
  },
22055
22287
  'EPSG:4326': {
22056
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG4326/',
22288
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG4326/',
22057
22289
  minLevel: 1,
22058
22290
  maxLevel: 6,
22059
22291
  origX: -180,
@@ -22063,7 +22295,7 @@
22063
22295
  copyRight: 'NPS - Natural Earth II'
22064
22296
  },
22065
22297
  'EPSG:28992': {
22066
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG28992/',
22298
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG28992/',
22067
22299
  minLevel: 1,
22068
22300
  maxLevel: 5,
22069
22301
  origX: -2999000,
@@ -22073,7 +22305,7 @@
22073
22305
  copyRight: 'NPS - Natural Earth II'
22074
22306
  },
22075
22307
  'EPSG:32661': {
22076
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG32661/',
22308
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG32661/',
22077
22309
  minLevel: 1,
22078
22310
  maxLevel: 7,
22079
22311
  origX: -5000000,
@@ -22083,7 +22315,7 @@
22083
22315
  copyRight: 'NPS - Natural Earth II'
22084
22316
  },
22085
22317
  'EPSG:54030': {
22086
- home: 'https://knmi-geoweb-assets.s3-eu-west-1.amazonaws.com/NaturalEarth2/EPSG54030/',
22318
+ home: 'https://geoweb-maps-assets.pmc.knmi.cloud/NaturalEarth2/EPSG54030/',
22087
22319
  minLevel: 1,
22088
22320
  maxLevel: 7,
22089
22321
  origX: -17000000,
@@ -22111,88 +22343,50 @@
22111
22343
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22112
22344
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
22113
22345
  * */
22114
- var getCurrentDimensionValue = function getCurrentDimensionValue(dimensions, name) {
22115
- if (dimensions === void 0) {
22116
- dimensions = [];
22117
- }
22118
-
22119
- var currentDimension = dimensions.find(function (dim) {
22120
- return dim.name === name;
22121
- });
22122
- return currentDimension === null || currentDimension === void 0 ? void 0 : currentDimension.currentValue;
22123
- };
22124
- var setServiceMetadata = function setServiceMetadata(wmLayer, mapId, mapProperties, onUpdateLayerInformation) {
22346
+ var setLayerInfo = function setLayerInfo(wmLayer, mapId, onUpdateLayerInformation) {
22125
22347
  var origin = LayerActionOrigin.ReactMapViewParseLayer;
22126
- var service = webmap.WMGetServiceFromStore(wmLayer.service);
22127
- var serviceName = mapProperties.services && mapProperties.services[service.id] && mapProperties.services[service.id].name || service.id;
22128
- var webMapJSInstance = getWMJSMapById(mapId);
22348
+ var map = getWMJSMapById(mapId);
22129
22349
  /* Update list of layers for service */
22130
22350
 
22131
- var done = function done(layers) {
22132
- var updateObject = {
22351
+ var updateObject = {
22352
+ origin: origin,
22353
+ layerStyle: {
22133
22354
  origin: origin,
22134
- serviceLayers: {
22135
- name: serviceName,
22136
- id: service.id,
22137
- serviceUrl: wmLayer.service,
22138
- layers: layers,
22139
- scope: 'system'
22140
- },
22141
- layerStyle: {
22142
- origin: origin,
22143
- layerId: wmLayer.ReactWMJSLayerId,
22144
- style: wmLayer.currentStyle
22145
- },
22146
- mapDimensions: {
22147
- origin: origin,
22148
- mapId: mapId,
22149
- dimensions: webMapJSInstance.mapdimensions.map(function (_a) {
22150
- var name = _a.name,
22151
- units = _a.units,
22152
- currentValue = _a.currentValue,
22153
- synced = _a.synced;
22154
- var reactDim = mapProperties.dimensions && mapProperties.dimensions.find(function (dim) {
22155
- return dim.name === name;
22156
- });
22157
- var newDimValue = reactDim && reactDim.currentValue || currentValue;
22158
- var newDimSynced = reactDim && reactDim.synced || synced;
22159
- return {
22160
- name: name,
22161
- units: units,
22162
- currentValue: newDimValue,
22163
- synced: newDimSynced
22164
- };
22165
- })
22166
- },
22167
- layerDimensions: {
22168
- origin: origin,
22169
- layerId: wmLayer.id,
22170
- dimensions: wmLayer.dimensions.map(function (dim) {
22171
- var name = dim.name,
22172
- units = dim.units,
22173
- synced = dim.synced;
22174
- var currentDimensionValue = getCurrentDimensionValue(wmLayer.dimensions, name);
22175
- var newDimensionValue = currentDimensionValue || dim.getValue();
22176
- return {
22177
- name: name,
22178
- units: units,
22179
- currentValue: newDimensionValue,
22180
- minValue: dim.getFirstValue(),
22181
- maxValue: dim.getLastValue(),
22182
- timeInterval: dim.getDimInterval(),
22183
- values: dim.getValues(),
22184
- synced: synced
22185
- };
22186
- })
22187
- }
22188
- };
22189
- onUpdateLayerInformation && onUpdateLayerInformation(updateObject);
22355
+ layerId: wmLayer.ReactWMJSLayerId,
22356
+ style: wmLayer.currentStyle
22357
+ },
22358
+ mapDimensions: {
22359
+ mapId: mapId,
22360
+ origin: origin,
22361
+ dimensions: map && map.mapdimensions.map(function (mapdim) {
22362
+ return {
22363
+ units: mapdim.units,
22364
+ currentValue: mapdim.currentValue,
22365
+ name: mapdim.name
22366
+ };
22367
+ }) || []
22368
+ },
22369
+ layerDimensions: {
22370
+ origin: origin,
22371
+ layerId: wmLayer.id,
22372
+ dimensions: wmLayer.dimensions.map(function (dim) {
22373
+ var name = dim.name,
22374
+ units = dim.units,
22375
+ synced = dim.synced;
22376
+ return {
22377
+ name: name,
22378
+ units: units,
22379
+ currentValue: dim.getValue(),
22380
+ minValue: dim.getFirstValue(),
22381
+ maxValue: dim.getLastValue(),
22382
+ timeInterval: dim.getDimInterval(),
22383
+ values: dim.getValues(),
22384
+ synced: synced
22385
+ };
22386
+ })
22387
+ }
22190
22388
  };
22191
-
22192
- service.getLayerObjectsFlat(done, function () {// do nothing
22193
- }, false, {
22194
- headers: wmLayer.headers
22195
- });
22389
+ onUpdateLayerInformation && onUpdateLayerInformation(updateObject);
22196
22390
  };
22197
22391
 
22198
22392
  /* *
@@ -22291,8 +22485,7 @@
22291
22485
  coordinateIndexInFeature: polygonIndex
22292
22486
  };
22293
22487
  }
22294
- } catch (e) {
22295
- console.warn(e);
22488
+ } catch (e) {// console.warn(e);
22296
22489
  }
22297
22490
  }
22298
22491
  }
@@ -24900,7 +25093,7 @@
24900
25093
  mapId = _a.mapId;
24901
25094
 
24902
25095
  try {
24903
- setServiceMetadata(wmLayer, mapId, _this.props, onUpdateLayerInformation);
25096
+ setLayerInfo(wmLayer, mapId, onUpdateLayerInformation);
24904
25097
  } catch (e) {
24905
25098
  /* Provide a hint on what is going wrong */
24906
25099
  console.error(e);
@@ -25192,7 +25385,6 @@
25192
25385
  mapId_1 = props.mapId;
25193
25386
  onUpdateLayerInformation && onUpdateLayerInformation({
25194
25387
  origin: ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO,
25195
- serviceLayers: null,
25196
25388
  layerStyle: null,
25197
25389
  layerDimensions: null,
25198
25390
  mapDimensions: {
@@ -26370,8 +26562,8 @@
26370
26562
  * See the License for the specific language governing permissions and
26371
26563
  * limitations under the License.
26372
26564
  *
26373
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
26374
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
26565
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
26566
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
26375
26567
  * */
26376
26568
  var ClockContainer = function ClockContainer(_a) {
26377
26569
  var fontSize = _a.fontSize,
@@ -26404,13 +26596,14 @@
26404
26596
  item: true,
26405
26597
  zIndex: 2,
26406
26598
  ref: setButtonElement
26407
- }, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
26599
+ }, /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
26600
+ variant: "tool",
26408
26601
  onClick: onButtonClick,
26409
26602
  sx: {
26410
26603
  color: '#fff!important'
26411
26604
  },
26412
26605
  "aria-label": "Animation options",
26413
- active: isPopperOpen
26606
+ isSelected: isPopperOpen
26414
26607
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
26415
26608
  isPopperOpen: isPopperOpen,
26416
26609
  popperPlacement: popperPlacement
@@ -26865,20 +27058,45 @@
26865
27058
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
26866
27059
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
26867
27060
  * */
27061
+ var sanitizeHTML = function sanitizeHTML(htmlToBeSanitezed) {
27062
+ return {
27063
+ __html: DOMPurify__namespace.sanitize(htmlToBeSanitezed, {
27064
+ ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'a', 'table', 'td', 'tr', 'br', 'hr', 'th'],
27065
+ ALLOWED_ATTR: ['href']
27066
+ })
27067
+ };
27068
+ };
26868
27069
 
26869
- var GetFeatureInfoDialog = function GetFeatureInfoDialog(_a) {
26870
- var layers = _a.layers,
26871
- isOpen = _a.isOpen,
26872
- onClose = _a.onClose,
26873
- _b = _a.onMouseDown,
26874
- onMouseDown = _b === void 0 ? function () {} : _b,
26875
- mapId = _a.mapId,
26876
- _c = _a.showMapId,
26877
- showMapId = _c === void 0 ? false : _c,
26878
- _d = _a.order,
26879
- order = _d === void 0 ? 0 : _d,
26880
- _e = _a.source,
26881
- source = _e === void 0 ? 'app' : _e,
27070
+ /* *
27071
+ * Licensed under the Apache License, Version 2.0 (the "License");
27072
+ * you may not use this file except in compliance with the License.
27073
+ * You may obtain a copy of the License at
27074
+ *
27075
+ * http://www.apache.org/licenses/LICENSE-2.0
27076
+ *
27077
+ * Unless required by applicable law or agreed to in writing, software
27078
+ * distributed under the License is distributed on an "AS IS" BASIS,
27079
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27080
+ * See the License for the specific language governing permissions and
27081
+ * limitations under the License.
27082
+ *
27083
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
27084
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
27085
+ * */
27086
+
27087
+ var GetFeatureInfoDialog = function GetFeatureInfoDialog(_a) {
27088
+ var layers = _a.layers,
27089
+ isOpen = _a.isOpen,
27090
+ onClose = _a.onClose,
27091
+ _b = _a.onMouseDown,
27092
+ onMouseDown = _b === void 0 ? function () {} : _b,
27093
+ mapId = _a.mapId,
27094
+ _c = _a.showMapId,
27095
+ showMapId = _c === void 0 ? false : _c,
27096
+ _d = _a.order,
27097
+ order = _d === void 0 ? 0 : _d,
27098
+ _e = _a.source,
27099
+ source = _e === void 0 ? 'app' : _e,
26882
27100
  mapPinLocation = _a.mapPinLocation;
26883
27101
  /* Ref and state for maplocation */
26884
27102
 
@@ -27053,9 +27271,7 @@
27053
27271
  },
27054
27272
  "data-testid": "layer-result-ready-" + layerId,
27055
27273
  // eslint-disable-next-line react/no-danger
27056
- dangerouslySetInnerHTML: {
27057
- __html: result.data.replace(/<hr\/>/g, '')
27058
- }
27274
+ dangerouslySetInnerHTML: sanitizeHTML(result.data)
27059
27275
  }) : /*#__PURE__*/React__default["default"].createElement("div", {
27060
27276
  "data-testid": "layer-result-loading-" + layerId
27061
27277
  }, /*#__PURE__*/React__default["default"].createElement(material.CircularProgress, {
@@ -27430,17 +27646,27 @@
27430
27646
  var syncGroupAddTarget = React__default["default"].useCallback(function (payload) {
27431
27647
  dispatch(genericActions.syncGroupAddTarget(payload));
27432
27648
  }, [dispatch]);
27649
+ var syncTargets = reactRedux.useSelector(function (store) {
27650
+ return getSyncGroupTargets(store);
27651
+ });
27433
27652
  React__default["default"].useEffect(function () {
27434
27653
  maps.forEach(function (map) {
27435
27654
  map.syncGroupsIds && map.syncGroupsIds.forEach(function (syncGroupsId) {
27436
- syncGroupAddTarget({
27437
- groupId: syncGroupsId,
27438
- targetId: map.id,
27439
- linked: true
27440
- });
27655
+ var alreadySyncedTargetIndex = syncTargets.findIndex(function (target) {
27656
+ return target.targetId === map.id && target.groupId === syncGroupsId && target.linked === true;
27657
+ }); // Only trigger an action if the target was not yet added to the group or was not linked.
27658
+
27659
+ if (alreadySyncedTargetIndex === -1) {
27660
+ syncGroupAddTarget({
27661
+ groupId: syncGroupsId,
27662
+ targetId: map.id,
27663
+ linked: true,
27664
+ origin: 'system'
27665
+ });
27666
+ }
27441
27667
  });
27442
27668
  });
27443
- }, [maps, syncGroupAddTarget]);
27669
+ }, [maps, syncGroupAddTarget, syncTargets]);
27444
27670
  var mapStyle = {
27445
27671
  width: Math.round(100 / cols) + "%",
27446
27672
  height: Math.round(100 / rows) + "%"
@@ -27737,6 +27963,815 @@
27737
27963
  });
27738
27964
  };
27739
27965
 
27966
+ /* *
27967
+ * Licensed under the Apache License, Version 2.0 (the "License");
27968
+ * you may not use this file except in compliance with the License.
27969
+ * You may obtain a copy of the License at
27970
+ *
27971
+ * http://www.apache.org/licenses/LICENSE-2.0
27972
+ *
27973
+ * Unless required by applicable law or agreed to in writing, software
27974
+ * distributed under the License is distributed on an "AS IS" BASIS,
27975
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27976
+ * See the License for the specific language governing permissions and
27977
+ * limitations under the License.
27978
+ *
27979
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
27980
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
27981
+ * */
27982
+ var timeSliderLiteButtonDefaultProps = {
27983
+ sx: {
27984
+ width: '36px',
27985
+ height: '36px'
27986
+ }
27987
+ };
27988
+ var timeSliderLiteTooltipDefaultProps = {
27989
+ placement: 'top'
27990
+ };
27991
+
27992
+ /* *
27993
+ * Licensed under the Apache License, Version 2.0 (the "License");
27994
+ * you may not use this file except in compliance with the License.
27995
+ * You may obtain a copy of the License at
27996
+ *
27997
+ * http://www.apache.org/licenses/LICENSE-2.0
27998
+ *
27999
+ * Unless required by applicable law or agreed to in writing, software
28000
+ * distributed under the License is distributed on an "AS IS" BASIS,
28001
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28002
+ * See the License for the specific language governing permissions and
28003
+ * limitations under the License.
28004
+ *
28005
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28006
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28007
+ * */
28008
+
28009
+ var HideButton = function HideButton(_a) {
28010
+ var _b, _c, _d, _e, _f, _g, _h, _j;
28011
+
28012
+ var isVisible = _a.isVisible,
28013
+ settings = _a.settings,
28014
+ onClick = _a.onClick;
28015
+ 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';
28016
+ 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';
28017
+ 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);
28018
+ 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);
28019
+ return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28020
+ title: isVisible ? hideTitle : showTitle
28021
+ }), /*#__PURE__*/React__default["default"].createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28022
+ "aria-selected": !isVisible,
28023
+ onClick: onClick,
28024
+ "data-testid": "TimeSliderLite-HideButton"
28025
+ }), isVisible ? hideIcon : showIcon));
28026
+ };
28027
+
28028
+ /* *
28029
+ * Licensed under the Apache License, Version 2.0 (the "License");
28030
+ * you may not use this file except in compliance with the License.
28031
+ * You may obtain a copy of the License at
28032
+ *
28033
+ * http://www.apache.org/licenses/LICENSE-2.0
28034
+ *
28035
+ * Unless required by applicable law or agreed to in writing, software
28036
+ * distributed under the License is distributed on an "AS IS" BASIS,
28037
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28038
+ * See the License for the specific language governing permissions and
28039
+ * limitations under the License.
28040
+ *
28041
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28042
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28043
+ * */
28044
+
28045
+ var ControlButtonGroup = function ControlButtonGroup(_a) {
28046
+ var children = _a.children,
28047
+ right = _a.right,
28048
+ left = _a.left;
28049
+ return /*#__PURE__*/React__default["default"].createElement(material.ButtonGroup, {
28050
+ orientation: "horizontal",
28051
+ fullWidth: true,
28052
+ sx: __assign(__assign(__assign({}, right && {
28053
+ borderTopLeftRadius: 0,
28054
+ borderBottomLeftRadius: 0
28055
+ }), left && {
28056
+ borderTopRightRadius: 0,
28057
+ borderBottomRightRadius: 0
28058
+ }), {
28059
+ backgroundColor: 'geowebColors.background.surface',
28060
+ height: '100%',
28061
+ alignItems: 'center',
28062
+ justifyContent: 'center',
28063
+ padding: '4px',
28064
+ gap: '2px'
28065
+ })
28066
+ }, children);
28067
+ };
28068
+
28069
+ /* *
28070
+ * Licensed under the Apache License, Version 2.0 (the "License");
28071
+ * you may not use this file except in compliance with the License.
28072
+ * You may obtain a copy of the License at
28073
+ *
28074
+ * http://www.apache.org/licenses/LICENSE-2.0
28075
+ *
28076
+ * Unless required by applicable law or agreed to in writing, software
28077
+ * distributed under the License is distributed on an "AS IS" BASIS,
28078
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28079
+ * See the License for the specific language governing permissions and
28080
+ * limitations under the License.
28081
+ *
28082
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28083
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28084
+ * */
28085
+ var TICK_HEIGHT = 8;
28086
+ var TIME_SLIDER_LITE_PADDING_RIGHT = 1;
28087
+
28088
+ var TimeSliderLiteBackgroundSvg = function TimeSliderLiteBackgroundSvg(_a) {
28089
+ var width = _a.width,
28090
+ height = _a.height,
28091
+ startTime = _a.startTime,
28092
+ endTime = _a.endTime,
28093
+ style = _a.style,
28094
+ locale = _a.locale;
28095
+ var timeSliderLite = material.useTheme().palette.geowebColors.timeSliderLite;
28096
+
28097
+ if (!width) {
28098
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
28099
+ style: style,
28100
+ height: height
28101
+ });
28102
+ } // Convert start and end time from Unix timestamp to JavaScript Date object
28103
+
28104
+
28105
+ var startDate = new Date(startTime * 1000);
28106
+ var endDate = new Date(endTime * 1000);
28107
+ var totalDays = (endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24);
28108
+ var tickSpacing = width / totalDays;
28109
+ var tickOffset = (startDate.getHours() + startDate.getMinutes() / 60) / 24 * tickSpacing; // Set up variables for date labels and background colors
28110
+
28111
+ var dayLabels = [];
28112
+ var currentDate = startDate;
28113
+ var lastDayLabelDate = new Date(endDate.getTime() + 2 * 24 * 60 * 60 * 1000); // Append two more days
28114
+
28115
+ while (currentDate < lastDayLabelDate) {
28116
+ var dateString = currentDate.toLocaleDateString(locale, {
28117
+ weekday: 'short',
28118
+ month: 'numeric',
28119
+ day: 'numeric'
28120
+ });
28121
+ var label = dateString.charAt(0).toUpperCase() + dateString.slice(1);
28122
+ dayLabels.push(label);
28123
+ currentDate.setDate(currentDate.getDate() + 1);
28124
+ }
28125
+
28126
+ var backgroundRectangles = dayLabels.map(function (label, index) {
28127
+ return /*#__PURE__*/React__default["default"].createElement("rect", {
28128
+ x: index * tickSpacing - tickOffset,
28129
+ y: 0,
28130
+ width: tickSpacing,
28131
+ height: height,
28132
+ fill: index % 2 === 0 ? timeSliderLite.timelineBackground.fill : timeSliderLite.timelineBackgroundAlternative.fill,
28133
+ key: label + "-color"
28134
+ });
28135
+ });
28136
+ var labels = dayLabels.map(function (label, index) {
28137
+ return /*#__PURE__*/React__default["default"].createElement("text", {
28138
+ x: index * tickSpacing + 8 - tickOffset,
28139
+ y: 14,
28140
+ fill: timeSliderLite.timeline.fill,
28141
+ textAnchor: "left",
28142
+ fontSize: "12px",
28143
+ key: label + "-text",
28144
+ style: {
28145
+ userSelect: 'none'
28146
+ }
28147
+ }, dayLabels[index]);
28148
+ });
28149
+ var ticksPerDay = 4;
28150
+ var tickMarks = dayLabels.map(function (label, index) {
28151
+ return Array.from({
28152
+ length: ticksPerDay + 1
28153
+ }, function (_, value) {
28154
+ return /*#__PURE__*/React__default["default"].createElement("line", {
28155
+ x1: index * tickSpacing + value * (tickSpacing / ticksPerDay) - tickOffset,
28156
+ y1: height,
28157
+ x2: index * tickSpacing + value * (tickSpacing / ticksPerDay) - tickOffset,
28158
+ y2: Math.floor(height - TICK_HEIGHT),
28159
+ stroke: timeSliderLite.timeline.stroke,
28160
+ key: label + "-" + value
28161
+ });
28162
+ });
28163
+ }).flat();
28164
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
28165
+ style: style,
28166
+ width: width + TIME_SLIDER_LITE_PADDING_RIGHT,
28167
+ height: height
28168
+ }, backgroundRectangles, tickMarks, labels);
28169
+ };
28170
+
28171
+ /* *
28172
+ * Licensed under the Apache License, Version 2.0 (the "License");
28173
+ * you may not use this file except in compliance with the License.
28174
+ * You may obtain a copy of the License at
28175
+ *
28176
+ * http://www.apache.org/licenses/LICENSE-2.0
28177
+ *
28178
+ * Unless required by applicable law or agreed to in writing, software
28179
+ * distributed under the License is distributed on an "AS IS" BASIS,
28180
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28181
+ * See the License for the specific language governing permissions and
28182
+ * limitations under the License.
28183
+ *
28184
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28185
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28186
+ * */
28187
+ var MILLISECOND_TO_SECOND = 1 / 1000;
28188
+ /**
28189
+ * Reformats a date that has capitalized first letter and colon separator for time
28190
+ * @param dateString Date string from Date.toLocaleDateString
28191
+ * @returns Reformatted date string
28192
+ */
28193
+
28194
+ var reformatFinnishDateString = function reformatFinnishDateString(dateString) {
28195
+ var charPositionOfTimestamp = -4;
28196
+ return dateString.charAt(0).toUpperCase() + dateString.slice(1, charPositionOfTimestamp) + dateString.slice(charPositionOfTimestamp).replace('.', ':');
28197
+ };
28198
+ var getSelectedTimePx = function getSelectedTimePx(startTime, endTime, selectedTime, width) {
28199
+ var startDate = new Date(startTime * 1000);
28200
+ var startDateX = startDate.getTime() * MILLISECOND_TO_SECOND;
28201
+ var selectedTimeX = selectedTime - startDateX;
28202
+ var needleX = Math.floor(selectedTimeX / (endTime - startTime) * width);
28203
+ return needleX;
28204
+ };
28205
+ var boundedValue = function boundedValue(value, bounds) {
28206
+ var _a = __read(bounds, 2),
28207
+ min = _a[0],
28208
+ max = _a[1];
28209
+
28210
+ return Math.max(min, Math.min(max, value));
28211
+ };
28212
+ var getSelectedTimeFromPx = function getSelectedTimeFromPx(startTime, endTime, selectedTimePx, width) {
28213
+ var startDate = new Date(startTime * 1000);
28214
+ var startDateX = startDate.getTime() * MILLISECOND_TO_SECOND;
28215
+ var selectedTimeX = Math.floor(selectedTimePx / width * (endTime - startTime));
28216
+ var selectedTime = selectedTimeX + startDateX;
28217
+ return selectedTime;
28218
+ };
28219
+
28220
+ /* *
28221
+ * Licensed under the Apache License, Version 2.0 (the "License");
28222
+ * you may not use this file except in compliance with the License.
28223
+ * You may obtain a copy of the License at
28224
+ *
28225
+ * http://www.apache.org/licenses/LICENSE-2.0
28226
+ *
28227
+ * Unless required by applicable law or agreed to in writing, software
28228
+ * distributed under the License is distributed on an "AS IS" BASIS,
28229
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28230
+ * See the License for the specific language governing permissions and
28231
+ * limitations under the License.
28232
+ *
28233
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28234
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28235
+ * */
28236
+ var DRAG_AREA_WIDTH = 10;
28237
+ var NEEDLE_WIDTH = 5;
28238
+ var SHADOW_SPREAD = 2;
28239
+
28240
+ var NeedleShadow = function NeedleShadow(_a) {
28241
+ var x = _a.x,
28242
+ stroke = _a.stroke,
28243
+ height = _a.height,
28244
+ width = _a.width;
28245
+ return /*#__PURE__*/React__default["default"].createElement("line", {
28246
+ x1: x,
28247
+ y1: height - (height - SHADOW_SPREAD / 2),
28248
+ x2: x,
28249
+ y2: height - SHADOW_SPREAD / 2,
28250
+ strokeWidth: width + SHADOW_SPREAD,
28251
+ stroke: stroke,
28252
+ strokeLinecap: "round",
28253
+ filter: "blur(0.5px)",
28254
+ "data-testid": "TimeSliderLite-NeedleShadow"
28255
+ });
28256
+ };
28257
+
28258
+ var NeedleLine = function NeedleLine(_a) {
28259
+ var x = _a.x,
28260
+ stroke = _a.stroke,
28261
+ height = _a.height,
28262
+ width = _a.width;
28263
+ return /*#__PURE__*/React__default["default"].createElement("line", {
28264
+ x1: x,
28265
+ y1: width / 2,
28266
+ x2: x,
28267
+ y2: height - width / 2,
28268
+ strokeWidth: width,
28269
+ strokeLinecap: "round",
28270
+ stroke: stroke,
28271
+ "data-testid": "TimeSliderLite-NeedleLine"
28272
+ });
28273
+ };
28274
+
28275
+ var TimeSliderDraggableNeedle = function TimeSliderDraggableNeedle(_a) {
28276
+ var draggableLabel = _a.draggableLabel,
28277
+ width = _a.width,
28278
+ height = _a.height,
28279
+ locale = _a.locale,
28280
+ startTime = _a.startTime,
28281
+ endTime = _a.endTime,
28282
+ _b = _a.needleDragAreaWidth,
28283
+ needleDragAreaWidth = _b === void 0 ? DRAG_AREA_WIDTH : _b,
28284
+ needleLabelZIndex = _a.needleLabelZIndex,
28285
+ needleLabelOffset = _a.needleLabelOffset,
28286
+ _c = _a.needleWidth,
28287
+ needleWidth = _c === void 0 ? NEEDLE_WIDTH : _c,
28288
+ timeStep = _a.timeStep,
28289
+ selectedTime = _a.selectedTime,
28290
+ setSelectedTime = _a.setSelectedTime,
28291
+ style = _a.style;
28292
+ var draggableRef = React.useRef(null);
28293
+ var timeSliderLite = material.useTheme().palette.geowebColors.timeSliderLite;
28294
+ var x = getSelectedTimePx(startTime, endTime, selectedTime, width) - needleDragAreaWidth / 2;
28295
+ var roundedSelectedTime = Math.floor(selectedTime / timeStep) * timeStep;
28296
+ var dateString = new Date(roundedSelectedTime * 1000).toLocaleDateString(locale, {
28297
+ weekday: 'short',
28298
+ month: 'numeric',
28299
+ day: 'numeric',
28300
+ hour: 'numeric',
28301
+ minute: 'numeric'
28302
+ });
28303
+ var label = locale === 'fi' || locale === 'sv-FI' ? reformatFinnishDateString(dateString) : dateString;
28304
+ return /*#__PURE__*/React__default["default"].createElement(Draggable__default["default"], {
28305
+ handle: ".TimeSliderLite-DraggableNeedle",
28306
+ axis: "x",
28307
+ nodeRef: draggableRef,
28308
+ bounds: {
28309
+ left: -needleDragAreaWidth / 2,
28310
+ right: width - needleDragAreaWidth / 2
28311
+ },
28312
+ position: {
28313
+ x: x,
28314
+ y: 0
28315
+ },
28316
+ onDrag: function onDrag(_, position) {
28317
+ var positionOffsetToCompensateFlooring = 0.5;
28318
+ var newSelectedTime = getSelectedTimeFromPx(startTime, endTime, position.x + needleDragAreaWidth / 2 + positionOffsetToCompensateFlooring, width);
28319
+ setSelectedTime(newSelectedTime);
28320
+ },
28321
+ onStop: function onStop(_, position) {
28322
+ var positionOffsetToCompensateFlooring = 0.5;
28323
+ var newSelectedTime = getSelectedTimeFromPx(startTime, endTime, position.x + needleDragAreaWidth / 2 + positionOffsetToCompensateFlooring, width);
28324
+ var roundedSelectedTime = Math.floor(newSelectedTime / timeStep) * timeStep;
28325
+ setSelectedTime(roundedSelectedTime);
28326
+ }
28327
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
28328
+ className: "TimeSliderLite-DraggableNeedle",
28329
+ ref: draggableRef,
28330
+ "data-testid": "TimeSliderLite-DraggableNeedle"
28331
+ }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
28332
+ title: label,
28333
+ arrow: true,
28334
+ placement: "top",
28335
+ open: true,
28336
+ componentsProps: {
28337
+ tooltip: {
28338
+ sx: {
28339
+ padding: '0 3px 0 3px',
28340
+ fontSize: '12px',
28341
+ backgroundColor: timeSliderLite.needleLabel.backgroundColor,
28342
+ border: "1px solid " + timeSliderLite.needleLabel.borderColor
28343
+ }
28344
+ },
28345
+ arrow: {
28346
+ sx: {
28347
+ color: timeSliderLite.needleLabel.backgroundColor
28348
+ }
28349
+ },
28350
+ popper: {
28351
+ className: draggableLabel ? 'TimeSliderLite-DraggableNeedle' : '',
28352
+ sx: {
28353
+ pointerEvents: draggableLabel ? null : 'none',
28354
+ zIndex: needleLabelZIndex !== null && needleLabelZIndex !== void 0 ? needleLabelZIndex : null,
28355
+ cursor: draggableLabel ? 'ew-resize' : 'default'
28356
+ },
28357
+ modifiers: [{
28358
+ name: 'offset',
28359
+ options: {
28360
+ offset: needleLabelOffset !== null && needleLabelOffset !== void 0 ? needleLabelOffset : [0, 30 - height]
28361
+ }
28362
+ }]
28363
+ }
28364
+ }
28365
+ }, /*#__PURE__*/React__default["default"].createElement("svg", {
28366
+ style: style,
28367
+ cursor: "ew-resize",
28368
+ width: needleDragAreaWidth,
28369
+ height: height,
28370
+ "data-testid": "TimeSliderLite-NeedleSvg"
28371
+ }, /*#__PURE__*/React__default["default"].createElement(NeedleShadow, {
28372
+ x: needleDragAreaWidth / 2,
28373
+ stroke: timeSliderLite.needleShadow.stroke,
28374
+ height: height,
28375
+ width: needleWidth
28376
+ }), /*#__PURE__*/React__default["default"].createElement(NeedleLine, {
28377
+ x: needleDragAreaWidth / 2,
28378
+ stroke: timeSliderLite.needle.stroke,
28379
+ height: height,
28380
+ width: needleWidth
28381
+ })))));
28382
+ };
28383
+
28384
+ /* *
28385
+ * Licensed under the Apache License, Version 2.0 (the "License");
28386
+ * you may not use this file except in compliance with the License.
28387
+ * You may obtain a copy of the License at
28388
+ *
28389
+ * http://www.apache.org/licenses/LICENSE-2.0
28390
+ *
28391
+ * Unless required by applicable law or agreed to in writing, software
28392
+ * distributed under the License is distributed on an "AS IS" BASIS,
28393
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28394
+ * See the License for the specific language governing permissions and
28395
+ * limitations under the License.
28396
+ *
28397
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28398
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28399
+ * */
28400
+
28401
+ var TimeSliderLiteBackground = function TimeSliderLiteBackground(_a) {
28402
+ var height = _a.height,
28403
+ draggableTimeStamp = _a.draggableTimeStamp,
28404
+ locale = _a.locale,
28405
+ startTime = _a.startTime,
28406
+ endTime = _a.endTime,
28407
+ needleWidth = _a.needleWidth,
28408
+ needleDragAreaWidth = _a.needleDragAreaWidth,
28409
+ needleLabelZIndex = _a.needleLabelZIndex,
28410
+ needleLabelOffset = _a.needleLabelOffset,
28411
+ timeStep = _a.timeStep,
28412
+ selectedTime = _a.selectedTime,
28413
+ setSelectedTime = _a.setSelectedTime;
28414
+ var sliderAreaRef = React.useRef(null);
28415
+
28416
+ var _b = __read(React__default["default"].useState(0), 2),
28417
+ areaWidth = _b[0],
28418
+ setAreaWidth = _b[1];
28419
+
28420
+ var drawNeedle = selectedTime && areaWidth;
28421
+ React.useLayoutEffect(function () {
28422
+ var sliderArea = sliderAreaRef.current;
28423
+ setAreaWidth(sliderArea.clientWidth - TIME_SLIDER_LITE_PADDING_RIGHT);
28424
+ var observer = new ResizeObserver(function () {
28425
+ setAreaWidth(sliderArea.clientWidth - TIME_SLIDER_LITE_PADDING_RIGHT);
28426
+ });
28427
+ observer.observe(sliderArea);
28428
+ return function () {
28429
+ observer.disconnect();
28430
+ };
28431
+ }, [sliderAreaRef]);
28432
+ return /*#__PURE__*/React__default["default"].createElement(material.Box, {
28433
+ ref: sliderAreaRef,
28434
+ sx: {
28435
+ position: 'relative',
28436
+ height: height + "px",
28437
+ overflow: 'hidden',
28438
+ width: '100%'
28439
+ },
28440
+ "data-testid": "TimeSliderLite-Background"
28441
+ }, /*#__PURE__*/React__default["default"].createElement(TimeSliderLiteBackgroundSvg, {
28442
+ style: {
28443
+ position: 'absolute',
28444
+ top: 0
28445
+ },
28446
+ width: areaWidth,
28447
+ height: height,
28448
+ startTime: startTime,
28449
+ endTime: endTime,
28450
+ locale: locale
28451
+ }), drawNeedle && /*#__PURE__*/React__default["default"].createElement(TimeSliderDraggableNeedle, {
28452
+ needleWidth: needleWidth,
28453
+ draggableLabel: draggableTimeStamp,
28454
+ style: {
28455
+ position: 'absolute',
28456
+ top: 0
28457
+ },
28458
+ locale: locale,
28459
+ width: areaWidth,
28460
+ needleDragAreaWidth: needleDragAreaWidth,
28461
+ needleLabelZIndex: needleLabelZIndex,
28462
+ needleLabelOffset: needleLabelOffset,
28463
+ height: height,
28464
+ startTime: startTime,
28465
+ endTime: endTime,
28466
+ timeStep: timeStep,
28467
+ selectedTime: selectedTime,
28468
+ setSelectedTime: setSelectedTime
28469
+ }));
28470
+ };
28471
+
28472
+ /* *
28473
+ * Licensed under the Apache License, Version 2.0 (the "License");
28474
+ * you may not use this file except in compliance with the License.
28475
+ * You may obtain a copy of the License at
28476
+ *
28477
+ * http://www.apache.org/licenses/LICENSE-2.0
28478
+ *
28479
+ * Unless required by applicable law or agreed to in writing, software
28480
+ * distributed under the License is distributed on an "AS IS" BASIS,
28481
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28482
+ * See the License for the specific language governing permissions and
28483
+ * limitations under the License.
28484
+ *
28485
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28486
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28487
+ * */
28488
+
28489
+ var StepButton = function StepButton(_a) {
28490
+ var _b, _c, _d, _e, _f, _g, _h, _j;
28491
+
28492
+ var forward = _a.forward,
28493
+ isDisabled = _a.isDisabled,
28494
+ _k = _a.onClick,
28495
+ onClick = _k === void 0 ? function () {} : _k,
28496
+ settings = _a.settings;
28497
+ 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';
28498
+ 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';
28499
+ 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, {
28500
+ "data-testid": "step-forward-svg-path"
28501
+ });
28502
+ 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, {
28503
+ "data-testid": "step-backward-svg-path"
28504
+ });
28505
+ return /*#__PURE__*/React__namespace.createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28506
+ title: forward ? forwardTitle : backwardTitle
28507
+ }), /*#__PURE__*/React__namespace.createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28508
+ disabled: isDisabled,
28509
+ "aria-label": forward ? forwardTitle : backwardTitle,
28510
+ onClick: onClick,
28511
+ "data-testid": "TimeSliderLite-StepButton" + (forward ? 'Forward' : 'Backward')
28512
+ }), forward ? forwardIcon : backwardIcon));
28513
+ };
28514
+
28515
+ /* *
28516
+ * Licensed under the Apache License, Version 2.0 (the "License");
28517
+ * you may not use this file except in compliance with the License.
28518
+ * You may obtain a copy of the License at
28519
+ *
28520
+ * http://www.apache.org/licenses/LICENSE-2.0
28521
+ *
28522
+ * Unless required by applicable law or agreed to in writing, software
28523
+ * distributed under the License is distributed on an "AS IS" BASIS,
28524
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28525
+ * See the License for the specific language governing permissions and
28526
+ * limitations under the License.
28527
+ *
28528
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28529
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28530
+ * */
28531
+
28532
+ var PlayButton = function PlayButton(_a) {
28533
+ var _b, _c, _d, _e, _f, _g, _h, _j;
28534
+
28535
+ var isAnimating = _a.isAnimating,
28536
+ isDisabled = _a.isDisabled,
28537
+ onTogglePlayButton = _a.onTogglePlayButton,
28538
+ settings = _a.settings;
28539
+ 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';
28540
+ 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';
28541
+ 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);
28542
+ 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);
28543
+ return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28544
+ title: isAnimating ? pauseTitle : playTitle
28545
+ }), /*#__PURE__*/React__default["default"].createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28546
+ sx: __assign(__assign({}, isAnimating && {
28547
+ backgroundColor: 'geowebColors.timeSliderLite.selected.backgroundColor'
28548
+ }), timeSliderLiteButtonDefaultProps.sx),
28549
+ onClick: function onClick() {
28550
+ onTogglePlayButton();
28551
+ },
28552
+ disabled: isDisabled,
28553
+ "data-testid": "TimeSliderLite-PlayButton"
28554
+ }), isAnimating ? pauseIcon : playIcon));
28555
+ };
28556
+
28557
+ /* *
28558
+ * Licensed under the Apache License, Version 2.0 (the "License");
28559
+ * you may not use this file except in compliance with the License.
28560
+ * You may obtain a copy of the License at
28561
+ *
28562
+ * http://www.apache.org/licenses/LICENSE-2.0
28563
+ *
28564
+ * Unless required by applicable law or agreed to in writing, software
28565
+ * distributed under the License is distributed on an "AS IS" BASIS,
28566
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28567
+ * See the License for the specific language governing permissions and
28568
+ * limitations under the License.
28569
+ *
28570
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28571
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28572
+ * */
28573
+
28574
+ var MenuButton = function MenuButton(_a) {
28575
+ var _b, _c;
28576
+
28577
+ var menuOpen = _a.menuOpen,
28578
+ onClick = _a.onClick,
28579
+ settings = _a.settings;
28580
+ var title = (_b = settings === null || settings === void 0 ? void 0 : settings.label) !== null && _b !== void 0 ? _b : 'Animation options';
28581
+ 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);
28582
+ return /*#__PURE__*/React__default["default"].createElement(material.Tooltip, __assign({}, timeSliderLiteTooltipDefaultProps, {
28583
+ title: title
28584
+ }), /*#__PURE__*/React__default["default"].createElement(material.IconButton, __assign({}, timeSliderLiteButtonDefaultProps, {
28585
+ sx: __assign(__assign({}, menuOpen && {
28586
+ backgroundColor: 'geowebColors.timeSliderLite.selected.backgroundColor'
28587
+ }), timeSliderLiteButtonDefaultProps.sx),
28588
+ "aria-selected": menuOpen,
28589
+ onClick: onClick,
28590
+ "data-testid": "TimeSliderLite-MenuButton"
28591
+ }), icon));
28592
+ };
28593
+
28594
+ /* *
28595
+ * Licensed under the Apache License, Version 2.0 (the "License");
28596
+ * you may not use this file except in compliance with the License.
28597
+ * You may obtain a copy of the License at
28598
+ *
28599
+ * http://www.apache.org/licenses/LICENSE-2.0
28600
+ *
28601
+ * Unless required by applicable law or agreed to in writing, software
28602
+ * distributed under the License is distributed on an "AS IS" BASIS,
28603
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28604
+ * See the License for the specific language governing permissions and
28605
+ * limitations under the License.
28606
+ *
28607
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
28608
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
28609
+ * */
28610
+ var TIME_SLIDER_LITE_DEFAULT_HEIGHT = 40;
28611
+ var TIME_SLIDER_LITE_DEFAULT_LOCALE = 'en';
28612
+ var TIME_SLIDER_LITE_DEFAULT_TIME_STEP = 5;
28613
+ var styles$1 = {
28614
+ container: {
28615
+ display: 'grid',
28616
+ alignItems: 'center',
28617
+ justifyContent: 'center',
28618
+ borderRadius: '4px'
28619
+ }
28620
+ };
28621
+
28622
+ var TimeSliderLite = function TimeSliderLite(_a) {
28623
+ var controlButtons = _a.controlButtons,
28624
+ endTime = _a.endTime,
28625
+ _b = _a.height,
28626
+ height = _b === void 0 ? TIME_SLIDER_LITE_DEFAULT_HEIGHT : _b,
28627
+ hideButton = _a.hideButton,
28628
+ isAnimating = _a.isAnimating,
28629
+ isVisible = _a.isVisible,
28630
+ _c = _a.locale,
28631
+ locale = _c === void 0 ? TIME_SLIDER_LITE_DEFAULT_LOCALE : _c,
28632
+ mapId = _a.mapId,
28633
+ menuOpen = _a.menuOpen,
28634
+ overrideAnimation = _a.overrideAnimation,
28635
+ onToggleAnimation = _a.onToggleAnimation,
28636
+ onToggleMenu = _a.onToggleMenu,
28637
+ needleWidth = _a.needleWidth,
28638
+ needleDragAreaWidth = _a.needleDragAreaWidth,
28639
+ needleLabelZIndex = _a.needleLabelZIndex,
28640
+ needleLabelOffset = _a.needleLabelOffset,
28641
+ draggableTimeStamp = _a.draggableTimeStamp,
28642
+ onToggleTimeSlider = _a.onToggleTimeSlider,
28643
+ selectedTime = _a.selectedTime,
28644
+ setSelectedTime = _a.setSelectedTime,
28645
+ settings = _a.settings,
28646
+ startTime = _a.startTime,
28647
+ sx = _a.sx,
28648
+ _d = _a.timeStep,
28649
+ timeStep = _d === void 0 ? TIME_SLIDER_LITE_DEFAULT_TIME_STEP : _d;
28650
+
28651
+ var _e = __read(React.useState(selectedTime), 2),
28652
+ rawSelectedTime = _e[0],
28653
+ setRawSelectedTime = _e[1];
28654
+
28655
+ var timeStepSeconds = timeStep * 60;
28656
+ var roundedStartTime = Math.floor(startTime / timeStepSeconds) * timeStepSeconds;
28657
+ var roundedEndTime = Math.floor(endTime / timeStepSeconds) * timeStepSeconds;
28658
+ var runningExternalAnimation = overrideAnimation && isAnimating;
28659
+ var runningInternalAnimation = !overrideAnimation && isAnimating;
28660
+ React.useEffect(function () {
28661
+ if (!runningExternalAnimation) {
28662
+ var roundedSelectedTime = Math.floor(rawSelectedTime / timeStepSeconds) * timeStepSeconds;
28663
+ setSelectedTime(roundedSelectedTime);
28664
+ }
28665
+ }, [setSelectedTime, rawSelectedTime, timeStepSeconds, runningExternalAnimation]);
28666
+ React.useEffect(function () {
28667
+ if (runningInternalAnimation) {
28668
+ var interval_1 = setInterval(function () {
28669
+ setRawSelectedTime(function (prevTime) {
28670
+ if (prevTime + timeStepSeconds > roundedEndTime) {
28671
+ return roundedStartTime;
28672
+ }
28673
+
28674
+ return prevTime + timeStepSeconds;
28675
+ });
28676
+ }, 200);
28677
+ return function () {
28678
+ return clearInterval(interval_1);
28679
+ };
28680
+ }
28681
+
28682
+ if (runningExternalAnimation) {
28683
+ setRawSelectedTime(selectedTime);
28684
+ }
28685
+
28686
+ return function () {};
28687
+ }, [roundedEndTime, isAnimating, roundedStartTime, timeStepSeconds, runningInternalAnimation, runningExternalAnimation, selectedTime]);
28688
+
28689
+ var handleTimeStep = function handleTimeStep(stepSeconds) {
28690
+ var newSteppedTime = Math.floor(rawSelectedTime / timeStepSeconds) * timeStepSeconds + stepSeconds;
28691
+ setRawSelectedTime(boundedValue(newSteppedTime, [roundedStartTime, roundedEndTime]));
28692
+
28693
+ if (isAnimating && onToggleAnimation) {
28694
+ onToggleAnimation();
28695
+ }
28696
+ };
28697
+
28698
+ var handleTimeSelect = function handleTimeSelect(value) {
28699
+ setRawSelectedTime(boundedValue(value, [roundedStartTime, roundedEndTime]));
28700
+
28701
+ if (isAnimating && onToggleAnimation) {
28702
+ onToggleAnimation();
28703
+ }
28704
+ };
28705
+
28706
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28707
+ container: true,
28708
+ sx: __assign(__assign(__assign({}, styles$1.container), sx), {
28709
+ gridTemplateColumns: isVisible ? 'auto 1fr auto' : "1fr auto"
28710
+ }),
28711
+ "data-testid": "timeSliderLite-" + mapId
28712
+ }, isVisible ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28713
+ item: true,
28714
+ sx: {
28715
+ height: height + "px"
28716
+ }
28717
+ }, controlButtons || /*#__PURE__*/React__default["default"].createElement(ControlButtonGroup, {
28718
+ left: true
28719
+ }, /*#__PURE__*/React__default["default"].createElement(MenuButton, {
28720
+ settings: settings === null || settings === void 0 ? void 0 : settings.menuButton,
28721
+ menuOpen: menuOpen,
28722
+ onClick: onToggleMenu
28723
+ }), /*#__PURE__*/React__default["default"].createElement(material.Divider, {
28724
+ orientation: "vertical",
28725
+ sx: {
28726
+ height: height + "px",
28727
+ margin: '2px'
28728
+ }
28729
+ }), /*#__PURE__*/React__default["default"].createElement(PlayButton, {
28730
+ settings: settings === null || settings === void 0 ? void 0 : settings.playButton,
28731
+ isAnimating: isAnimating,
28732
+ onTogglePlayButton: onToggleAnimation
28733
+ }), /*#__PURE__*/React__default["default"].createElement(StepButton, {
28734
+ settings: settings === null || settings === void 0 ? void 0 : settings.stepButton,
28735
+ onClick: function onClick() {
28736
+ return handleTimeStep(-timeStepSeconds);
28737
+ }
28738
+ }), /*#__PURE__*/React__default["default"].createElement(StepButton, {
28739
+ forward: true,
28740
+ settings: settings === null || settings === void 0 ? void 0 : settings.stepButton,
28741
+ onClick: function onClick() {
28742
+ return handleTimeStep(timeStepSeconds);
28743
+ }
28744
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28745
+ item: true
28746
+ }, /*#__PURE__*/React__default["default"].createElement(TimeSliderLiteBackground, {
28747
+ draggableTimeStamp: draggableTimeStamp,
28748
+ startTime: roundedStartTime,
28749
+ locale: locale,
28750
+ endTime: roundedEndTime,
28751
+ needleWidth: needleWidth,
28752
+ needleDragAreaWidth: needleDragAreaWidth,
28753
+ needleLabelZIndex: needleLabelZIndex,
28754
+ needleLabelOffset: needleLabelOffset,
28755
+ timeStep: timeStepSeconds,
28756
+ selectedTime: runningExternalAnimation ? selectedTime : rawSelectedTime,
28757
+ setSelectedTime: handleTimeSelect,
28758
+ height: height
28759
+ }))) : /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28760
+ item: true
28761
+ }), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
28762
+ item: true,
28763
+ sx: {
28764
+ height: height + "px"
28765
+ }
28766
+ }, hideButton || /*#__PURE__*/React__default["default"].createElement(ControlButtonGroup, {
28767
+ right: isVisible
28768
+ }, /*#__PURE__*/React__default["default"].createElement(HideButton, {
28769
+ settings: settings === null || settings === void 0 ? void 0 : settings.hideButton,
28770
+ onClick: onToggleTimeSlider,
28771
+ isVisible: isVisible
28772
+ }))));
28773
+ };
28774
+
27740
28775
  /* *
27741
28776
  * Licensed under the Apache License, Version 2.0 (the "License");
27742
28777
  * you may not use this file except in compliance with the License.
@@ -28012,7 +29047,8 @@
28012
29047
  if (isChecked) {
28013
29048
  syncGroupRemoveTarget({
28014
29049
  groupId: String(groupId),
28015
- targetId: String(sourceId)
29050
+ targetId: String(sourceId),
29051
+ origin: 'user'
28016
29052
  });
28017
29053
  } else {
28018
29054
  var groups = syncGroupViewState[groupCategory].groups;
@@ -28025,7 +29061,8 @@
28025
29061
  if (group.id !== groupId && group.selected.includes(sourceId)) {
28026
29062
  syncGroupRemoveTarget({
28027
29063
  groupId: String(group.id),
28028
- targetId: String(sourceId)
29064
+ targetId: String(sourceId),
29065
+ origin: 'user'
28029
29066
  });
28030
29067
  }
28031
29068
  }
@@ -28044,7 +29081,8 @@
28044
29081
 
28045
29082
  syncGroupAddTarget({
28046
29083
  groupId: String(groupId),
28047
- targetId: String(sourceId)
29084
+ targetId: String(sourceId),
29085
+ origin: 'user'
28048
29086
  });
28049
29087
  }
28050
29088
  };
@@ -28775,6 +29813,7 @@
28775
29813
  exports.TimeSliderBackwardForwardStepButtonConnect = BackwardForwardStepButtonConnect;
28776
29814
  exports.TimeSliderButtonsConnect = TimeSliderButtonsConnect;
28777
29815
  exports.TimeSliderConnect = TimeSliderConnect;
29816
+ exports.TimeSliderLite = TimeSliderLite;
28778
29817
  exports.TimeSliderOptionsMenuButtonConnect = OptionsMenuButtonConnect;
28779
29818
  exports.TimeSliderPlayButtonConnect = PlayButtonConnect;
28780
29819
  exports.ZoomControlConnect = ZoomControlConnect;
@@ -28804,8 +29843,8 @@
28804
29843
  exports.getWMJSTimeDimensionForLayerId = getWMJSTimeDimensionForLayerId;
28805
29844
  exports.getWMLayerById = getWMLayerById;
28806
29845
  exports.layerActions = layerActions;
28807
- exports.layerReducer = reducer$8;
28808
- exports.layerSelectors = selectors$3;
29846
+ exports.layerReducer = reducer$7;
29847
+ exports.layerSelectors = selectors$4;
28809
29848
  exports.layerTypes = types$3;
28810
29849
  exports.mapActions = mapActions;
28811
29850
  exports.mapModuleConfig = moduleConfig;
@@ -28820,20 +29859,26 @@
28820
29859
  exports.registerWMJSMap = registerWMJSMap;
28821
29860
  exports.registerWMLayer = registerWMLayer;
28822
29861
  exports.routerActions = routerActions;
29862
+ exports.serviceSelectors = selectors$5;
28823
29863
  exports.snackbarActions = snackbarActions;
28824
29864
  exports.store = store;
28825
29865
  exports.syncGroupActions = genericActions;
29866
+ exports.syncGroupsSelectors = selectors$2;
28826
29867
  exports.synchronizationGroupModuleConfig = synchronizationGroupConfig;
28827
29868
  exports.synchronizationGroupsConfig = synchronizationGroupConfig;
28828
29869
  exports.testLayers = testLayers;
28829
29870
  exports.timeSliderUtils = timeSliderUtils;
28830
29871
  exports.uiActions = uiActions;
28831
29872
  exports.uiModuleConfig = uiModuleConfig;
28832
- exports.uiSelectors = selectors$2;
29873
+ exports.uiReducer = reducer$6;
29874
+ exports.uiSelectors = selectors$3;
28833
29875
  exports.uiTypes = types;
29876
+ exports.unRegisterAllWMJSLayersAndMaps = unRegisterAllWMJSLayersAndMaps;
28834
29877
  exports.unRegisterWMJSLayer = unRegisterWMJSLayer;
28835
29878
  exports.unRegisterWMJSMap = unRegisterWMJSMap;
29879
+ exports.useFetchServices = useFetchServices;
28836
29880
  exports.useSetupDialog = useSetupDialog;
29881
+ exports.webmapReducer = reducer$5;
28837
29882
 
28838
29883
  Object.defineProperty(exports, '__esModule', { value: true });
28839
29884