@opengeoweb/core 2.4.0 → 2.6.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 (41) hide show
  1. package/index.esm.js +815 -663
  2. package/index.umd.js +828 -675
  3. package/lib/components/LayerManager/LayerManager.d.ts +2 -1
  4. package/lib/components/LayerManager/LayerManagerConnect.d.ts +1 -0
  5. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListRow.d.ts +18 -0
  6. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListUtils.d.ts +2 -1
  7. package/lib/components/LayerManager/LayerSelect/LayerSelectUtils.d.ts +4 -0
  8. package/lib/components/{TimeSlider/TimeSliderButtons/LoopButton/LoopButton.spec.d.ts → LayerManager/LayerSelect/LayerSelectUtils.spec.d.ts} +0 -0
  9. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChip.d.ts +2 -2
  10. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.d.ts +2 -2
  11. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.d.ts +2 -2
  12. package/lib/components/MapView/MapViewLayer.d.ts +3 -0
  13. package/lib/components/MapWarning/MapWarningProperties.d.ts +6 -0
  14. package/lib/components/{TimeSlider/TimeSliderButtons/LoopButton/LoopButtonConnect.spec.d.ts → MapWarning/MapWarningProperties.spec.d.ts} +0 -0
  15. package/lib/components/ReactMapView/AdagucMapDraw.d.ts +12 -7
  16. package/lib/components/ReactMapView/AdagucMapDraw.stories.d.ts +4 -0
  17. package/lib/components/ReactMapView/AdagucMapDrawContainer.d.ts +2 -1
  18. package/lib/components/ReactMapView/AdagucMapDrawTools.d.ts +9 -0
  19. package/lib/components/{TooltipSelect/TooltipSelect.spec.d.ts → ReactMapView/AdagucMapDrawTools.spec.d.ts} +0 -0
  20. package/lib/components/TimeSlider/TimeSliderButtons/OptionsMenuButton/OptionsMenuButton.d.ts +0 -1
  21. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtons.d.ts +0 -1
  22. package/lib/index.d.ts +2 -2
  23. package/lib/store/layerSelect/sagas.d.ts +3 -1
  24. package/lib/store/mapStore/map/actions.d.ts +1 -8
  25. package/lib/store/mapStore/map/selectors.d.ts +0 -21
  26. package/lib/store/mapStore/service/reducer.d.ts +2 -8
  27. package/lib/store/mapStore/service/selectors.d.ts +6 -8
  28. package/lib/store/mapStore/service/types.d.ts +7 -9
  29. package/lib/store/mapStore/utils/helpers.d.ts +2 -0
  30. package/lib/store/ui/types.d.ts +1 -1
  31. package/lib/utils/defaultConfigurations.d.ts +2 -2
  32. package/lib/utils/defaultTestSettings.d.ts +10 -199
  33. package/lib/utils/jsonPresetFilter.d.ts +2 -1
  34. package/lib/utils/localStorage.d.ts +3 -0
  35. package/lib/utils/localStorage.spec.d.ts +1 -0
  36. package/lib/utils/types.d.ts +4 -5
  37. package/package.json +10 -9
  38. package/lib/components/LayerManager/tooltipContainerStyles.d.ts +0 -2
  39. package/lib/components/TimeSlider/TimeSliderButtons/LoopButton/LoopButton.d.ts +0 -8
  40. package/lib/components/TimeSlider/TimeSliderButtons/LoopButton/LoopButtonConnect.d.ts +0 -10
  41. package/lib/components/TooltipSelect/TooltipSelect.d.ts +0 -14
package/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reselect'), require('moment'), require('lodash'), require('react'), require('immer'), require('redux-saga/effects'), require('@opengeoweb/webmap'), require('@mui/material'), require('react-redux'), require('@mui/styles/makeStyles'), require('@opengeoweb/shared'), require('@mui/icons-material'), require('react-sortablejs'), require('@mui/styles/createStyles'), require('@mui/styles/withStyles'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga'), require('@opengeoweb/theme')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'reselect', 'moment', 'lodash', 'react', 'immer', 'redux-saga/effects', '@opengeoweb/webmap', '@mui/material', 'react-redux', '@mui/styles/makeStyles', '@opengeoweb/shared', '@mui/icons-material', 'react-sortablejs', '@mui/styles/createStyles', '@mui/styles/withStyles', 'throttle-debounce', 'lodash.clonedeep', 'proj4', 'redux-dynamic-modules', 'redux-dynamic-modules-saga', '@opengeoweb/theme'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.reselect, global.moment, global._, global.React, global.produce, global.effects, global.webmap, global.material, global.reactRedux, global.makeStyles, global.shared, global.iconsMaterial, global.reactSortablejs, global.createStyles, global.withStyles, global.throttleDebounce, global.cloneDeep, global.proj4, global.reduxDynamicModules, global.reduxDynamicModulesSaga, global.theme));
5
- })(this, (function (exports, reselect, moment, _, React, produce, effects, webmap, material, reactRedux, makeStyles, shared, iconsMaterial, reactSortablejs, createStyles, withStyles, throttleDebounce, cloneDeep, proj4, reduxDynamicModules, reduxDynamicModulesSaga, theme) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reselect'), require('moment'), require('lodash'), require('react'), require('immer'), require('redux-saga/effects'), require('@opengeoweb/webmap'), require('react-redux'), require('@mui/material'), require('@opengeoweb/shared'), require('@mui/styles/makeStyles'), require('@mui/icons-material'), require('react-sortablejs'), require('@mui/styles/createStyles'), require('@mui/styles/withStyles'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga'), require('@opengeoweb/theme')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'reselect', 'moment', 'lodash', 'react', 'immer', 'redux-saga/effects', '@opengeoweb/webmap', 'react-redux', '@mui/material', '@opengeoweb/shared', '@mui/styles/makeStyles', '@mui/icons-material', 'react-sortablejs', '@mui/styles/createStyles', '@mui/styles/withStyles', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'redux-dynamic-modules', 'redux-dynamic-modules-saga', '@opengeoweb/theme'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.reselect, global.moment, global._, global.React, global.produce, global.effects, global.webmap, global.reactRedux, global.material, global.shared, global.makeStyles, global.iconsMaterial, global.reactSortablejs, global.createStyles, global.withStyles, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.reduxDynamicModules, global.reduxDynamicModulesSaga, global.theme));
5
+ })(this, (function (exports, reselect, moment, _, React, produce, effects, webmap, reactRedux, material, shared, makeStyles, iconsMaterial, reactSortablejs, createStyles, withStyles, throttleDebounce, cloneDeep, proj4, turf, reduxDynamicModules, reduxDynamicModulesSaga, theme) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -34,6 +34,7 @@
34
34
  var withStyles__default = /*#__PURE__*/_interopDefaultLegacy(withStyles);
35
35
  var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
36
36
  var proj4__default = /*#__PURE__*/_interopDefaultLegacy(proj4);
37
+ var turf__namespace = /*#__PURE__*/_interopNamespace(turf);
37
38
 
38
39
  /* *
39
40
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -226,19 +227,6 @@
226
227
  payload: payload
227
228
  };
228
229
  };
229
- /**
230
- * Toggles loop state for map
231
- *
232
- * Example: toggleLoop({ mapId: 'mapId1', shouldLoop: true })
233
- * @param {object} payload object with mapId: string, shouldLoop: boolean
234
- */
235
-
236
- var toggleLoop = function toggleLoop(payload) {
237
- return {
238
- type: WEBMAP_TOGGLE_LOOP,
239
- payload: payload
240
- };
241
- };
242
230
  /**
243
231
  *Sets the scale of a time slider with id for a map
244
232
  *
@@ -759,7 +747,6 @@
759
747
  layerMoveLayer: layerMoveLayer,
760
748
  setActiveLayerId: setActiveLayerId,
761
749
  toggleAutoUpdate: toggleAutoUpdate,
762
- toggleLoop: toggleLoop,
763
750
  setTimeSliderScale: setTimeSliderScale,
764
751
  setTimeStep: setTimeStep,
765
752
  setAnimationDelay: setAnimationDelay,
@@ -877,6 +864,16 @@
877
864
  generatedTimesliderIds += 1;
878
865
  return "timesliderid_" + generatedTimesliderIds;
879
866
  };
867
+ var generatedServiceIds = 0;
868
+ var generateServiceId = function generateServiceId() {
869
+ generatedServiceIds += 1;
870
+ return "serviceid_" + generatedServiceIds;
871
+ };
872
+ var generatedTimeseriesIds = 0;
873
+ var generateTimeSeriesId = function generateTimeSeriesId() {
874
+ generatedTimeseriesIds += 1;
875
+ return "timeseriesid_" + generatedTimeseriesIds;
876
+ };
880
877
  /**
881
878
  * Map for registering wmlayers with their id's
882
879
  */
@@ -2409,18 +2406,6 @@
2409
2406
  var isAutoUpdating = reselect.createSelector(getMapById, function (store) {
2410
2407
  return store ? store.isAutoUpdating : false;
2411
2408
  });
2412
- /**
2413
- * Tells whether the "loop" behavior of animation is on/off
2414
- *
2415
- * Example: isLooping = isLooping(store, 'mapid_1')
2416
- * @param {object} store store: object - store object
2417
- * @param {string} mapId mapId: string - Id of the map
2418
- * @returns {boolean} returnType: boolean
2419
- */
2420
-
2421
- var isLooping = reselect.createSelector(getMapById, function (store) {
2422
- return store ? store.isLooping : false;
2423
- });
2424
2409
  /**
2425
2410
  * Gets activeLayerId for map
2426
2411
  *
@@ -2712,14 +2697,21 @@
2712
2697
  *
2713
2698
  * Example: service = getServiceByName(store, 'serviceName')
2714
2699
  * @param {object} store store: object - Store object
2715
- * @returns {Service} returnType: Service
2700
+ * @returns {ReduxService} returnType: Service
2716
2701
  */
2717
2702
 
2718
- var getServiceByName = reselect.createSelector([servicesStore, function (state, serviceName) {
2719
- return serviceName;
2720
- }], function (serviceState, serviceName) {
2721
- if (serviceState && serviceState.byId && serviceState.byId[serviceName]) {
2722
- return serviceState.byId[serviceName];
2703
+ var getServiceByName = reselect.createSelector([servicesStore, function (state, serviceUrl) {
2704
+ return serviceUrl;
2705
+ }], function (serviceState, serviceUrl) {
2706
+ var foundServiceIndex = serviceState.allIds.findIndex(function (id) {
2707
+ return serviceState.byId[id].serviceUrl === serviceUrl;
2708
+ });
2709
+ /* Add the service based on a url */
2710
+
2711
+ var id = foundServiceIndex !== -1 ? serviceState.allIds[foundServiceIndex] : null;
2712
+
2713
+ if (serviceState && serviceState.byId && serviceState.byId[id]) {
2714
+ return serviceState.byId[id];
2723
2715
  }
2724
2716
 
2725
2717
  return null;
@@ -2789,9 +2781,8 @@
2789
2781
  var services = store ? store.byId : {};
2790
2782
  var arrayOfServiceObjects = Object.keys(services).map(function (key) {
2791
2783
  return {
2792
- id: services[key].id,
2793
2784
  name: services[key].name,
2794
- service: services[key].service
2785
+ serviceUrl: services[key].serviceUrl
2795
2786
  };
2796
2787
  });
2797
2788
  return arrayOfServiceObjects;
@@ -2836,7 +2827,6 @@
2836
2827
  getAnimationStartTime: getAnimationStartTime,
2837
2828
  getAnimationEndTime: getAnimationEndTime,
2838
2829
  isAutoUpdating: isAutoUpdating,
2839
- isLooping: isLooping,
2840
2830
  getActiveLayerId: getActiveLayerId,
2841
2831
  getMapTimeSliderScale: getMapTimeSliderScale,
2842
2832
  getMapTimeStep: getMapTimeStep,
@@ -4730,10 +4720,10 @@
4730
4720
  var updateObject = {
4731
4721
  origin: ORIGIN_REACTMAPVIEWPARSELAYER,
4732
4722
  serviceLayers: {
4733
- id: wmLayer.service,
4734
4723
  name: wmLayer.title,
4735
- service: wmLayer.service,
4736
- layers: layers
4724
+ serviceUrl: wmLayer.service,
4725
+ layers: layers,
4726
+ isUserAddedService: false
4737
4727
  },
4738
4728
  layerStyle: {
4739
4729
  origin: origin,
@@ -5562,155 +5552,6 @@
5562
5552
  sagas: [rootSaga$4, rootSaga$3]
5563
5553
  };
5564
5554
 
5565
- /* *
5566
- * Licensed under the Apache License, Version 2.0 (the "License");
5567
- * you may not use this file except in compliance with the License.
5568
- * You may obtain a copy of the License at
5569
- *
5570
- * http://www.apache.org/licenses/LICENSE-2.0
5571
- *
5572
- * Unless required by applicable law or agreed to in writing, software
5573
- * distributed under the License is distributed on an "AS IS" BASIS,
5574
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5575
- * See the License for the specific language governing permissions and
5576
- * limitations under the License.
5577
- *
5578
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5579
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
5580
- * */
5581
-
5582
- var TooltipSelect = function TooltipSelect(_a) {
5583
- var tooltip = _a.tooltip,
5584
- _b = _a.list,
5585
- list = _b === void 0 ? [] : _b,
5586
- _c = _a.currentIndex,
5587
- currentIndex = _c === void 0 ? -1 : _c,
5588
- _d = _a.onChangeMouseWheel,
5589
- onChangeMouseWheel = _d === void 0 ? function () {} : _d,
5590
- _e = _a.requiresCtrlToChange,
5591
- requiresCtrlToChange = _e === void 0 ? false : _e,
5592
- props = __rest(_a, ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "requiresCtrlToChange"]);
5593
-
5594
- props.disableUnderline;
5595
- var otherProps = __rest(props, ["disableUnderline"]);
5596
-
5597
- var _f = __read(React__namespace.useState(false), 2),
5598
- selectOpen = _f[0],
5599
- setSelectOpen = _f[1];
5600
-
5601
- var _g = __read(React__namespace.useState(false), 2),
5602
- tooltipOpen = _g[0],
5603
- setTooltipOpen = _g[1];
5604
-
5605
- var preventDefault = function preventDefault(event) {
5606
- event.preventDefault();
5607
- event.stopPropagation();
5608
- };
5609
-
5610
- var enableScroll = React__namespace.useCallback(function () {
5611
- document.removeEventListener('wheel', preventDefault, false);
5612
- }, []);
5613
- var disableScroll = React__namespace.useCallback(function () {
5614
- document.addEventListener('wheel', preventDefault, {
5615
- passive: false
5616
- });
5617
- }, []);
5618
- var onWheel = React__namespace.useCallback(function (event) {
5619
- if (requiresCtrlToChange && (event.ctrlKey || event.metaKey) || !requiresCtrlToChange) {
5620
- disableScroll();
5621
- if (selectOpen) return;
5622
- var direction = event.deltaY < 0 ? 1 : -1;
5623
- var newValue = list[Math.min(Math.max(currentIndex - direction, 0), list.length - 1)];
5624
- onChangeMouseWheel(newValue);
5625
- } else enableScroll();
5626
- }, [selectOpen, currentIndex, list, onChangeMouseWheel, enableScroll, disableScroll, requiresCtrlToChange]);
5627
- var onOpen = React__namespace.useCallback(function () {
5628
- setSelectOpen(true);
5629
- setTooltipOpen(false);
5630
- }, []);
5631
- var onClose = React__namespace.useCallback(function () {
5632
- setSelectOpen(false);
5633
- }, []);
5634
- var onMouseEnter = React__namespace.useCallback(function () {
5635
- if (!requiresCtrlToChange) {
5636
- disableScroll();
5637
- }
5638
-
5639
- if (!selectOpen) setTooltipOpen(true);
5640
- }, [selectOpen, disableScroll, requiresCtrlToChange]);
5641
- var onMouseLeave = React__namespace.useCallback(function () {
5642
- enableScroll();
5643
- setTooltipOpen(false);
5644
- }, [enableScroll]);
5645
- var onFocus = React__namespace.useCallback(function () {
5646
- if (!requiresCtrlToChange) {
5647
- disableScroll();
5648
- }
5649
-
5650
- setTooltipOpen(true);
5651
- }, [disableScroll, requiresCtrlToChange]);
5652
- var onBlur = React__namespace.useCallback(function () {
5653
- enableScroll();
5654
- setTooltipOpen(false);
5655
- }, [enableScroll]);
5656
- return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
5657
- title: tooltip,
5658
- placement: "top",
5659
- open: tooltipOpen
5660
- }, /*#__PURE__*/React__namespace.createElement(material.Select, __assign({
5661
- onOpen: onOpen,
5662
- onClose: onClose,
5663
- onMouseEnter: onMouseEnter,
5664
- onMouseLeave: onMouseLeave,
5665
- onFocus: onFocus,
5666
- onBlur: onBlur,
5667
- onWheel: onWheel,
5668
- MenuProps: {
5669
- BackdropProps: {
5670
- sx: {
5671
- '&.MuiBackdrop-root': {
5672
- backgroundColor: 'transparent'
5673
- }
5674
- }
5675
- },
5676
- sx: {
5677
- '& ul': {
5678
- backgroundColor: 'geowebColors.background.surface'
5679
- },
5680
- '& li': {
5681
- fontSize: '16px',
5682
- padding: '12px',
5683
- '&:hover': {
5684
- backgroundColor: 'geowebColors.buttons.tool.mouseOver.fill'
5685
- },
5686
- '&.Mui-selected': {
5687
- color: 'geowebColors.buttons.tool.active.color',
5688
- backgroundColor: 'geowebColors.buttons.tool.active.fill',
5689
- boxShadow: "none",
5690
- '&:hover': {
5691
- backgroundColor: 'geowebColors.buttons.tool.activeMouseOver.fill'
5692
- },
5693
- '&:focus': {
5694
- backgroundColor: 'geowebColors.buttons.tool.activeMouseOver.fill'
5695
- }
5696
- },
5697
- '&:after': {
5698
- background: 'none!important'
5699
- },
5700
- '&.Mui-disabled': {
5701
- fontSize: '12px',
5702
- opacity: 0.67,
5703
- padding: '0px 12px',
5704
- '&.MuiMenuItem-root': {
5705
- minHeight: '30px!important'
5706
- }
5707
- }
5708
- }
5709
- }
5710
- }
5711
- }, otherProps)));
5712
- };
5713
-
5714
5555
  /* *
5715
5556
  * Licensed under the Apache License, Version 2.0 (the "License");
5716
5557
  * you may not use this file except in compliance with the License.
@@ -6616,7 +6457,20 @@
6616
6457
  case GENERIC_SYNC_SETBBOX:
6617
6458
  {
6618
6459
  return produce.produce(state, function (draft) {
6619
- action.payload.targets.forEach(function (payload) {
6460
+ var _a = action.payload,
6461
+ targetsFromAction = _a.targets,
6462
+ source = _a.source;
6463
+ /* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
6464
+
6465
+ var targets = [{
6466
+ targetId: source.payload.sourceId,
6467
+ bbox: source.payload.bbox,
6468
+ srs: source.payload.srs
6469
+ }];
6470
+ /* And then append the targets form the action */
6471
+
6472
+ targets.push.apply(targets, __spreadArray([], __read(targetsFromAction)));
6473
+ targets.forEach(function (payload) {
6620
6474
  var targetId = payload.targetId,
6621
6475
  bbox = payload.bbox,
6622
6476
  srs = payload.srs;
@@ -6788,12 +6642,14 @@
6788
6642
  switch (action.type) {
6789
6643
  case MAP_SERVICES_SET_LAYERS:
6790
6644
  return produce__default["default"](state, function (draft) {
6791
- if (!draft.byId[action.payload.service]) draft.byId[action.payload.service] = {};
6792
- draft.byId[action.payload.service].id = action.payload.id;
6793
- draft.byId[action.payload.service].name = action.payload.name;
6794
- draft.byId[action.payload.service].service = action.payload.service;
6795
- draft.byId[action.payload.service].layers = action.payload.layers;
6796
- if (!draft.allIds.includes(action.payload.service)) draft.allIds.push(action.payload.service);
6645
+ var foundServiceIndex = draft.allIds.findIndex(function (id) {
6646
+ return draft.byId[id].serviceUrl === action.payload.serviceUrl;
6647
+ });
6648
+ /* Add the service based on a url */
6649
+
6650
+ var id = foundServiceIndex !== -1 ? draft.allIds[foundServiceIndex] : generateServiceId();
6651
+ draft.byId[id] = __assign({}, action.payload);
6652
+ if (!draft.allIds.includes(id)) draft.allIds.push(id);
6797
6653
  });
6798
6654
 
6799
6655
  case WEBMAP_UPDATE_LAYER_INFO:
@@ -6809,11 +6665,16 @@
6809
6665
 
6810
6666
  case MAP_SERVICES_REMOVE_SERVICE:
6811
6667
  return produce__default["default"](state, function (draft) {
6812
- if (draft.byId[action.payload.serviceUrl]) {
6668
+ var foundServiceIndex = draft.allIds.findIndex(function (id) {
6669
+ return draft.byId[id].serviceUrl === action.payload.serviceUrl;
6670
+ });
6671
+
6672
+ if (foundServiceIndex !== -1) {
6673
+ var serviceId_1 = draft.allIds[foundServiceIndex];
6813
6674
  draft.allIds = draft.allIds.filter(function (id) {
6814
- return id !== action.payload.serviceUrl;
6675
+ return id !== serviceId_1;
6815
6676
  });
6816
- delete draft.byId[action.payload.serviceUrl];
6677
+ delete draft.byId[serviceId_1];
6817
6678
  }
6818
6679
  });
6819
6680
 
@@ -7661,6 +7522,80 @@
7661
7522
  };
7662
7523
  };
7663
7524
 
7525
+ function _typeof(obj) {
7526
+ "@babel/helpers - typeof";
7527
+
7528
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
7529
+ _typeof = function (obj) {
7530
+ return typeof obj;
7531
+ };
7532
+ } else {
7533
+ _typeof = function (obj) {
7534
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
7535
+ };
7536
+ }
7537
+
7538
+ return _typeof(obj);
7539
+ }
7540
+
7541
+ /* *
7542
+ * Licensed under the Apache License, Version 2.0 (the "License");
7543
+ * you may not use this file except in compliance with the License.
7544
+ * You may obtain a copy of the License at
7545
+ *
7546
+ * http://www.apache.org/licenses/LICENSE-2.0
7547
+ *
7548
+ * Unless required by applicable law or agreed to in writing, software
7549
+ * distributed under the License is distributed on an "AS IS" BASIS,
7550
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7551
+ * See the License for the specific language governing permissions and
7552
+ * limitations under the License.
7553
+ *
7554
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7555
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7556
+ * */
7557
+ var mergePresetsAndUserAddedServices = function mergePresetsAndUserAddedServices(presets, userAddedServices) {
7558
+ return Object.values(__assign(__assign({}, presets.reduce(function (byId, preset) {
7559
+ var _a;
7560
+
7561
+ return __assign(__assign({}, byId), (_a = {}, _a[preset.id] = preset, _a));
7562
+ }, {})), userAddedServices));
7563
+ };
7564
+ var isService = function isService(param) {
7565
+ var serviceParam = param;
7566
+ return !!((serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.id) && (serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.name) && (serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.url));
7567
+ };
7568
+
7569
+ var getUserAddedServices = function getUserAddedServices() {
7570
+ try {
7571
+ var storedString = window.localStorage.getItem('userAddedServices');
7572
+ var parsedData = JSON.parse(storedString);
7573
+
7574
+ if (parsedData && _typeof(parsedData) === 'object') {
7575
+ return Object.entries(parsedData).reduce(function (userServices, _a) {
7576
+ var _b;
7577
+
7578
+ var _c = __read(_a, 2),
7579
+ serviceUrl = _c[0],
7580
+ service = _c[1];
7581
+
7582
+ return __assign(__assign({}, userServices), isService(service) ? (_b = {}, _b[serviceUrl] = service, _b) : {});
7583
+ }, {});
7584
+ }
7585
+ } catch (e) {
7586
+ console.error('Unable to read services from localStorage: ', e);
7587
+ }
7588
+
7589
+ return {};
7590
+ };
7591
+ var setUserAddedServices = function setUserAddedServices(services) {
7592
+ try {
7593
+ window.localStorage.setItem('userAddedServices', JSON.stringify(services));
7594
+ } catch (e) {
7595
+ console.error('Unable to write services to localStorage: ', e);
7596
+ }
7597
+ };
7598
+
7664
7599
  /* *
7665
7600
  * Licensed under the Apache License, Version 2.0 (the "License");
7666
7601
  * you may not use this file except in compliance with the License.
@@ -7678,19 +7613,19 @@
7678
7613
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
7679
7614
  * */
7680
7615
  function newServiceAddedSaga(capturedAction) {
7681
- var addedService, service, keywords;
7616
+ var addedService, serviceUrl, keywords;
7682
7617
  return __generator(this, function (_a) {
7683
7618
  switch (_a.label) {
7684
7619
  case 0:
7685
7620
  addedService = capturedAction.payload;
7686
- service = addedService.service;
7621
+ serviceUrl = addedService.serviceUrl;
7687
7622
  keywords = addedService.layers.reduce(function (keywordAccumulator, layer) {
7688
7623
  return keywordAccumulator.concat(layer.path, layer.keywords);
7689
7624
  }, []);
7690
7625
  return [4
7691
7626
  /*yield*/
7692
7627
  , effects.put(addKeywordsAndActiveServices({
7693
- serviceUrl: service,
7628
+ serviceUrl: serviceUrl,
7694
7629
  keywords: keywords
7695
7630
  }))];
7696
7631
 
@@ -7725,6 +7660,32 @@
7725
7660
  }
7726
7661
  });
7727
7662
  }
7663
+ function addServiceToLocalStorageSaga(_a) {
7664
+ var _b;
7665
+
7666
+ var payload = _a.payload;
7667
+ var isUserAddedService = payload.isUserAddedService,
7668
+ name = payload.name,
7669
+ serviceUrl = payload.serviceUrl;
7670
+ if (!isUserAddedService) return;
7671
+ var localStorageServices = getUserAddedServices();
7672
+ setUserAddedServices(__assign(__assign({}, localStorageServices), (_b = {}, _b[serviceUrl] = {
7673
+ id: serviceUrl,
7674
+ name: name,
7675
+ url: serviceUrl
7676
+ }, _b)));
7677
+ }
7678
+ function removeServiceFromLocalStorageSaga(_a) {
7679
+ var payload = _a.payload;
7680
+ var serviceUrl = payload.serviceUrl;
7681
+ var localStorageServices = getUserAddedServices();
7682
+ if (!localStorageServices[serviceUrl]) return;
7683
+
7684
+ var updatedServices = __assign({}, localStorageServices);
7685
+
7686
+ delete updatedServices[serviceUrl];
7687
+ setUserAddedServices(updatedServices);
7688
+ }
7728
7689
  function rootSaga() {
7729
7690
  return __generator(this, function (_a) {
7730
7691
  switch (_a.label) {
@@ -7743,6 +7704,20 @@
7743
7704
  case 2:
7744
7705
  _a.sent();
7745
7706
 
7707
+ return [4
7708
+ /*yield*/
7709
+ , effects.takeEvery(MAP_SERVICES_SET_LAYERS, addServiceToLocalStorageSaga)];
7710
+
7711
+ case 3:
7712
+ _a.sent();
7713
+
7714
+ return [4
7715
+ /*yield*/
7716
+ , effects.takeEvery(MAP_SERVICES_REMOVE_SERVICE, removeServiceFromLocalStorageSaga)];
7717
+
7718
+ case 4:
7719
+ _a.sent();
7720
+
7746
7721
  return [2
7747
7722
  /*return*/
7748
7723
  ];
@@ -8101,7 +8076,7 @@
8101
8076
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8102
8077
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
8103
8078
  * */
8104
- var connectRedux$7 = reactRedux.connect(function (store, props) {
8079
+ var connectRedux$6 = reactRedux.connect(function (store, props) {
8105
8080
  return {
8106
8081
  loadedLayers: getMapLayers(store, props.mapId)
8107
8082
  };
@@ -8164,7 +8139,7 @@
8164
8139
  });
8165
8140
  };
8166
8141
 
8167
- var WMSLayerTreeConnect = connectRedux$7(ConnectedTree);
8142
+ var WMSLayerTreeConnect = connectRedux$6(ConnectedTree);
8168
8143
 
8169
8144
  /* *
8170
8145
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -8539,7 +8514,7 @@
8539
8514
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8540
8515
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
8541
8516
  * */
8542
- var useStyles$x = makeStyles__default["default"]({
8517
+ var useStyles$u = makeStyles__default["default"]({
8543
8518
  buttonDiv: {
8544
8519
  position: 'relative'
8545
8520
  },
@@ -8575,7 +8550,7 @@
8575
8550
  handleClose = _a.handleClose,
8576
8551
  _e = _a.layerType,
8577
8552
  layerType = _e === void 0 ? LayerType.mapLayer : _e;
8578
- var classes = useStyles$x();
8553
+ var classes = useStyles$u();
8579
8554
 
8580
8555
  var _f = __read(React__namespace.useState(''), 2),
8581
8556
  serviceURL = _f[0],
@@ -8739,7 +8714,7 @@
8739
8714
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8740
8715
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
8741
8716
  * */
8742
- var styles = {
8717
+ var styles$2 = {
8743
8718
  buttonDiv: {
8744
8719
  position: 'relative'
8745
8720
  },
@@ -8790,7 +8765,7 @@
8790
8765
  title: tooltip
8791
8766
  }, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
8792
8767
  onClick: handleClose,
8793
- sx: styles.button,
8768
+ sx: styles$2.button,
8794
8769
  disableRipple: true,
8795
8770
  "data-testid": "addLayersButton",
8796
8771
  ref: ref,
@@ -8955,7 +8930,7 @@
8955
8930
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8956
8931
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
8957
8932
  * */
8958
- var useStyles$w = makeStyles__default["default"]({
8933
+ var useStyles$t = makeStyles__default["default"]({
8959
8934
  row: {
8960
8935
  height: '32px'
8961
8936
  },
@@ -8979,7 +8954,7 @@
8979
8954
  layerManagerWidth = _a.layerManagerWidth,
8980
8955
  _e = _a.layerSelect,
8981
8956
  layerSelect = _e === void 0 ? false : _e;
8982
- var classes = useStyles$w();
8957
+ var classes = useStyles$t();
8983
8958
  var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
8984
8959
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
8985
8960
  container: true,
@@ -9023,65 +8998,6 @@
9023
8998
  }));
9024
8999
  };
9025
9000
 
9026
- /* *
9027
- * Licensed under the Apache License, Version 2.0 (the "License");
9028
- * you may not use this file except in compliance with the License.
9029
- * You may obtain a copy of the License at
9030
- *
9031
- * http://www.apache.org/licenses/LICENSE-2.0
9032
- *
9033
- * Unless required by applicable law or agreed to in writing, software
9034
- * distributed under the License is distributed on an "AS IS" BASIS,
9035
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9036
- * See the License for the specific language governing permissions and
9037
- * limitations under the License.
9038
- *
9039
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9040
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
9041
- * */
9042
- var useTooltipContainerStyles = makeStyles__default["default"](function (theme) {
9043
- return createStyles__default["default"]({
9044
- textContainer: {
9045
- width: '100%',
9046
- height: 32,
9047
- fontWeight: 500,
9048
- fontSize: theme.palette.geowebColors.layerManager.tableRowDefaultText.fontSize,
9049
- color: function color(isEnabled) {
9050
- return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultText.rgba : theme.palette.geowebColors.layerManager.tableRowDisabledText.rgba;
9051
- },
9052
- '& .MuiOutlinedInput-input': {
9053
- padding: '6px 24px 6px 8px'
9054
- },
9055
- '& .MuiOutlinedInput-notchedOutline': {
9056
- borderColor: 'transparent!important'
9057
- },
9058
- '&:hover .MuiSelect-select': {
9059
- backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
9060
- },
9061
- '&.Mui-focused .MuiSelect-select': {
9062
- outline: theme.palette.geowebColors.buttons.focusDefault.outline,
9063
- backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
9064
- },
9065
- '&:hover&.MuiButton-root': {
9066
- backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
9067
- },
9068
- '&:focus&.MuiButton-root': {
9069
- outline: theme.palette.geowebColors.buttons.focusDefault.outline,
9070
- backgroundColor: theme.palette.geowebColors.buttons.tool.mouseOver.fill
9071
- },
9072
- '& .MuiSvgIcon-root': {
9073
- transition: 'none',
9074
- fill: function fill(isEnabled) {
9075
- return isEnabled ? theme.palette.geowebColors.buttons.flat["default"].color : theme.palette.geowebColors.buttons.flat.disabled.color;
9076
- }
9077
- },
9078
- '&>div': {
9079
- paddingLeft: 8
9080
- }
9081
- }
9082
- });
9083
- });
9084
-
9085
9001
  /* *
9086
9002
  * Licensed under the Apache License, Version 2.0 (the "License");
9087
9003
  * you may not use this file except in compliance with the License.
@@ -9105,7 +9021,6 @@
9105
9021
  _b = _a.layerDimensions,
9106
9022
  layerDimensions = _b === void 0 ? [] : _b,
9107
9023
  isEnabled = _a.isEnabled;
9108
- var classes = useTooltipContainerStyles(isEnabled);
9109
9024
 
9110
9025
  var _c = __read(React__namespace.useState(layerDimensions.length ? layerDimensions[0].name : ''), 2),
9111
9026
  activeDimName = _c[0],
@@ -9182,7 +9097,7 @@
9182
9097
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
9183
9098
  item: true,
9184
9099
  xs: 12
9185
- }, /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
9100
+ }, /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
9186
9101
  disableUnderline: true,
9187
9102
  tooltip: "Select the dimension to adjust, currently it is set to " + activeDimName + " with value " + activeDim.currentValue,
9188
9103
  inputProps: {
@@ -9190,7 +9105,7 @@
9190
9105
  'data-testid': 'selectDimension'
9191
9106
  }
9192
9107
  },
9193
- className: classes.textContainer,
9108
+ isEnabled: isEnabled,
9194
9109
  value: activeDimName,
9195
9110
  list: dimNameList,
9196
9111
  currentIndex: dimNameCurrentIndex,
@@ -9208,7 +9123,7 @@
9208
9123
  key: dimension.name,
9209
9124
  value: dimension.name
9210
9125
  }, dimension.name);
9211
- })), /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
9126
+ })), /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
9212
9127
  disableUnderline: true,
9213
9128
  tooltip: "Dimension " + activeDimName + " is set to " + activeDim.currentValue + " with units " + activeDim.units,
9214
9129
  inputProps: {
@@ -9216,7 +9131,7 @@
9216
9131
  'data-testid': 'selectDimensionValue'
9217
9132
  }
9218
9133
  },
9219
- className: classes.textContainer,
9134
+ isEnabled: isEnabled,
9220
9135
  value: activeDim && activeDim.currentValue,
9221
9136
  list: dimValueList,
9222
9137
  currentIndex: dimValueCurrentIndex,
@@ -9253,7 +9168,7 @@
9253
9168
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9254
9169
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
9255
9170
  * */
9256
- var useStyles$v = makeStyles__default["default"](function (theme) {
9171
+ var useStyles$s = makeStyles__default["default"](function (theme) {
9257
9172
  return createStyles__default["default"]({
9258
9173
  dropdownEmpty: {
9259
9174
  paddingLeft: 8,
@@ -9303,8 +9218,7 @@
9303
9218
  layers = _b === void 0 ? [] : _b,
9304
9219
  _c = _a.isEnabled,
9305
9220
  isEnabled = _c === void 0 ? true : _c;
9306
- var classes = useStyles$v();
9307
- var containerClass = useTooltipContainerStyles(isEnabled);
9221
+ var classes = useStyles$s();
9308
9222
 
9309
9223
  if (!layers || !layers.length) {
9310
9224
  return /*#__PURE__*/React__namespace.createElement("div", {
@@ -9330,7 +9244,7 @@
9330
9244
  value: layer.name
9331
9245
  };
9332
9246
  });
9333
- return /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
9247
+ return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
9334
9248
  disableUnderline: true,
9335
9249
  tooltip: "Select a layer",
9336
9250
  inputProps: {
@@ -9338,7 +9252,7 @@
9338
9252
  'data-testid': 'selectLayer'
9339
9253
  }
9340
9254
  },
9341
- className: containerClass.textContainer,
9255
+ isEnabled: isEnabled,
9342
9256
  value: currentValue,
9343
9257
  list: list,
9344
9258
  currentIndex: currentIndex,
@@ -9346,15 +9260,27 @@
9346
9260
  onChangeMouseWheel: function onChangeMouseWheel(e) {
9347
9261
  return onChangeLayerName(e.value);
9348
9262
  },
9349
- requiresCtrlToChange: true
9263
+ requiresCtrlToChange: true,
9264
+ renderValue: function renderValue(value) {
9265
+ return extendedLayers.find(function (layer) {
9266
+ return layer.name === value;
9267
+ }).text;
9268
+ }
9350
9269
  }, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
9351
9270
  disabled: true
9352
- }, "Layer"), extendedLayers.map(function (layerFromServiceLayers) {
9271
+ }, "Layer"), extendedLayers.map(function (layerFromServiceLayers, currentIndex) {
9353
9272
  return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
9354
9273
  key: layerFromServiceLayers.name,
9355
9274
  value: layerFromServiceLayers.name,
9356
- disabled: !layerFromServiceLayers.leaf
9357
- }, layerFromServiceLayers.text);
9275
+ disabled: !layerFromServiceLayers.leaf,
9276
+ sx: {
9277
+ '& .MuiSvgIcon-root': {
9278
+ marginLeft: '28px'
9279
+ }
9280
+ }
9281
+ }, layerFromServiceLayers.text, currentIndex === layers.length && /*#__PURE__*/React__namespace.createElement(shared.AlertIcon, {
9282
+ severity: "error"
9283
+ }));
9358
9284
  }));
9359
9285
  };
9360
9286
 
@@ -9374,7 +9300,7 @@
9374
9300
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9375
9301
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
9376
9302
  * */
9377
- var useStyles$u = makeStyles__default["default"](function (theme) {
9303
+ var useStyles$r = makeStyles__default["default"](function (theme) {
9378
9304
  return {
9379
9305
  opacityDiv: {
9380
9306
  height: 'calc(100% - 5px)',
@@ -9397,7 +9323,7 @@
9397
9323
  position: 'fixed',
9398
9324
  top: '-5px',
9399
9325
  boxSizing: 'initial',
9400
- zIndex: 1,
9326
+ zIndex: 2,
9401
9327
  boxShadow: theme.shadows[8]
9402
9328
  }
9403
9329
  };
@@ -9435,9 +9361,8 @@
9435
9361
  onLayerChangeOpacity = _a.onLayerChangeOpacity,
9436
9362
  _b = _a.isEnabled,
9437
9363
  isEnabled = _b === void 0 ? true : _b;
9438
- var classes = useStyles$u();
9364
+ var classes = useStyles$r();
9439
9365
  var sliderClasses = shared.sliderStyles();
9440
- var containerClass = useTooltipContainerStyles(isEnabled);
9441
9366
 
9442
9367
  var _c = __read(React__namespace.useState(false), 2),
9443
9368
  open = _c[0],
@@ -9447,22 +9372,8 @@
9447
9372
  tooltipOpen = _d[0],
9448
9373
  setTooltipOpen = _d[1];
9449
9374
 
9450
- var preventDefault = function preventDefault(event) {
9451
- event.preventDefault();
9452
- event.stopPropagation();
9453
- };
9454
-
9455
- var enableScroll = React__namespace.useCallback(function () {
9456
- document.removeEventListener('wheel', preventDefault, false);
9457
- }, []);
9458
- var disableScroll = React__namespace.useCallback(function () {
9459
- document.addEventListener('wheel', preventDefault, {
9460
- passive: false
9461
- });
9462
- }, []);
9463
9375
  var onWheel = React__namespace.useCallback(function (event) {
9464
9376
  if (event.ctrlKey || event.metaKey) {
9465
- disableScroll();
9466
9377
  var multiplier = event.altKey ? 10 : 1;
9467
9378
  var direction = event.deltaY > 0 ? 0.01 * multiplier : -0.01 * multiplier;
9468
9379
  var newValue_1 = Math.min(Math.max(currentOpacity - direction, 0), 1); // Kind of "one frame debouncer", meant to dampen too fast slider movement
@@ -9470,8 +9381,8 @@
9470
9381
  window.requestAnimationFrame(function () {
9471
9382
  onLayerChangeOpacity(newValue_1);
9472
9383
  });
9473
- } else enableScroll();
9474
- }, [currentOpacity, onLayerChangeOpacity, disableScroll, enableScroll]);
9384
+ }
9385
+ }, [currentOpacity, onLayerChangeOpacity]);
9475
9386
  var onClickButton = React__namespace.useCallback(function () {
9476
9387
  setOpen(!open);
9477
9388
  }, [open]);
@@ -9484,23 +9395,21 @@
9484
9395
  if (!open) setTooltipOpen(true);
9485
9396
  }, [open]);
9486
9397
  var onMouseLeave = React__namespace.useCallback(function () {
9487
- enableScroll();
9488
9398
  setTooltipOpen(false);
9489
- }, [enableScroll]);
9399
+ }, []);
9490
9400
  var onFocus = React__namespace.useCallback(function () {
9491
9401
  setTooltipOpen(true);
9492
9402
  }, []);
9493
9403
  var onBlur = React__namespace.useCallback(function () {
9494
- enableScroll();
9495
9404
  setTooltipOpen(false);
9496
- }, [enableScroll]);
9405
+ }, []);
9497
9406
  return /*#__PURE__*/React__namespace.createElement("div", {
9498
9407
  className: classes.opacityDiv,
9499
9408
  onWheel: onWheel,
9500
9409
  "data-testid": "scrollOpacity"
9501
9410
  }, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
9502
9411
  title: tooltipTitle,
9503
- className: containerClass.textContainer,
9412
+ sx: shared.tooltipContainerStyles(isEnabled),
9504
9413
  placement: "top",
9505
9414
  open: tooltipOpen
9506
9415
  }, /*#__PURE__*/React__namespace.createElement(material.Button, {
@@ -9591,7 +9500,6 @@
9591
9500
  onChangeLayerStyle = _a.onChangeLayerStyle,
9592
9501
  _b = _a.isEnabled,
9593
9502
  isEnabled = _b === void 0 ? true : _b;
9594
- var classes = useTooltipContainerStyles(isEnabled);
9595
9503
  var styles = [{
9596
9504
  title: 'default',
9597
9505
  name: 'default',
@@ -9618,7 +9526,7 @@
9618
9526
  var currentIndex = styles.findIndex(function (style) {
9619
9527
  return currentStyle === style.name;
9620
9528
  });
9621
- return /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
9529
+ return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
9622
9530
  disableUnderline: true,
9623
9531
  tooltip: "Select a style for layer " + layerName,
9624
9532
  inputProps: {
@@ -9626,7 +9534,7 @@
9626
9534
  'data-testid': 'selectStyle'
9627
9535
  }
9628
9536
  },
9629
- className: classes.textContainer,
9537
+ isEnabled: isEnabled,
9630
9538
  value: currentStyle,
9631
9539
  list: list,
9632
9540
  currentIndex: currentIndex,
@@ -9661,7 +9569,7 @@
9661
9569
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9662
9570
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
9663
9571
  * */
9664
- var useStyles$t = makeStyles__default["default"](function (theme) {
9572
+ var useStyles$q = makeStyles__default["default"](function (theme) {
9665
9573
  return createStyles__default["default"]({
9666
9574
  svgIcon: {
9667
9575
  fill: function fill(_a) {
@@ -9690,7 +9598,7 @@
9690
9598
  isActive = _c === void 0 ? false : _c,
9691
9599
  _d = _a.isEnabled,
9692
9600
  isEnabled = _d === void 0 ? true : _d;
9693
- var classes = useStyles$t({
9601
+ var classes = useStyles$q({
9694
9602
  isActive: isActive,
9695
9603
  isEnabled: isEnabled
9696
9604
  });
@@ -9743,7 +9651,7 @@
9743
9651
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9744
9652
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
9745
9653
  * */
9746
- var useStyles$s = makeStyles__default["default"](function (theme) {
9654
+ var useStyles$p = makeStyles__default["default"](function (theme) {
9747
9655
  return createStyles__default["default"]({
9748
9656
  row: {
9749
9657
  background: function background(isEnabled) {
@@ -9797,7 +9705,7 @@
9797
9705
  layerActiveLayout = _a.layerActiveLayout,
9798
9706
  layerManagerWidth = _a.layerManagerWidth,
9799
9707
  dragHandle = _a.dragHandle;
9800
- var classes = useStyles$s(isEnabled);
9708
+ var classes = useStyles$p(isEnabled);
9801
9709
  var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
9802
9710
 
9803
9711
  var onClickRow = function onClickRow() {
@@ -10439,7 +10347,7 @@
10439
10347
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10440
10348
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
10441
10349
  * */
10442
- var useStyles$r = makeStyles__default["default"](function () {
10350
+ var useStyles$o = makeStyles__default["default"](function () {
10443
10351
  return {
10444
10352
  layerRows: {
10445
10353
  width: '100%',
@@ -10459,6 +10367,11 @@
10459
10367
  var mapId = _a.mapId,
10460
10368
  layerManagerWidth = _a.layerManagerWidth;
10461
10369
  var dispatch = reactRedux.useDispatch();
10370
+
10371
+ var _b = __read(React__namespace.useState(false), 2),
10372
+ keyPressed = _b[0],
10373
+ setKeyPressed = _b[1];
10374
+
10462
10375
  var layerIds = reactRedux.useSelector(function (store) {
10463
10376
  return getLayerIds(store, mapId);
10464
10377
  });
@@ -10474,9 +10387,9 @@
10474
10387
  }));
10475
10388
  }, [dispatch]);
10476
10389
 
10477
- var _b = __read(React__namespace.useState(null), 2),
10478
- activeDragIndex = _b[0],
10479
- setActiveDragIndex = _b[1];
10390
+ var _c = __read(React__namespace.useState(null), 2),
10391
+ activeDragIndex = _c[0],
10392
+ setActiveDragIndex = _c[1];
10480
10393
 
10481
10394
  var onSetList = function onSetList() {}; // since we use activeDragIndex, we don't need inner state handling of ReactSortable
10482
10395
 
@@ -10505,7 +10418,43 @@
10505
10418
 
10506
10419
  var isSorting = activeDragIndex !== null;
10507
10420
  var isDragDisabled = layerIds.length === 1;
10508
- var classes = useStyles$r(isSorting);
10421
+ var classes = useStyles$o(isSorting);
10422
+
10423
+ var keyPressedTrue = function keyPressedTrue(event) {
10424
+ if (event.ctrlKey || event.metaKey) {
10425
+ setKeyPressed(true);
10426
+ }
10427
+ };
10428
+
10429
+ var keyPressedFalse = function keyPressedFalse() {
10430
+ setKeyPressed(false);
10431
+ };
10432
+
10433
+ React__namespace.useEffect(function () {
10434
+ window.addEventListener('keydown', keyPressedTrue);
10435
+ window.addEventListener('keyup', keyPressedFalse);
10436
+ return function () {
10437
+ window.removeEventListener('keydown', keyPressedTrue);
10438
+ window.removeEventListener('keyup', keyPressedFalse);
10439
+ };
10440
+ }, []);
10441
+ var preventDefault = React__namespace.useCallback(function (event) {
10442
+ event.preventDefault();
10443
+ event.stopPropagation();
10444
+ }, []);
10445
+ React__namespace.useEffect(function () {
10446
+ if (keyPressed === true) {
10447
+ window.addEventListener('wheel', preventDefault, {
10448
+ passive: false
10449
+ });
10450
+ } else {
10451
+ window.removeEventListener('wheel', preventDefault);
10452
+ }
10453
+
10454
+ return function () {
10455
+ return window.removeEventListener('wheel', preventDefault);
10456
+ };
10457
+ }, [keyPressed, preventDefault]);
10509
10458
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
10510
10459
  container: true,
10511
10460
  item: true,
@@ -10561,7 +10510,6 @@
10561
10510
  var selectedBaseLayers = _a.selectedBaseLayers,
10562
10511
  availableBaseLayers = _a.availableBaseLayers,
10563
10512
  onChangeBaseLayers = _a.onChangeBaseLayers;
10564
- var classes = useTooltipContainerStyles();
10565
10513
 
10566
10514
  if (!availableBaseLayers || !availableBaseLayers.length) {
10567
10515
  return /*#__PURE__*/React__namespace.createElement("div", null, "No service available");
@@ -10580,7 +10528,7 @@
10580
10528
  style: {
10581
10529
  width: '100%'
10582
10530
  }
10583
- }, /*#__PURE__*/React__namespace.createElement(TooltipSelect, {
10531
+ }, /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
10584
10532
  disableUnderline: true,
10585
10533
  tooltip: "Select base layer",
10586
10534
  inputProps: {
@@ -10591,7 +10539,7 @@
10591
10539
  style: {
10592
10540
  maxWidth: '100%'
10593
10541
  },
10594
- className: classes.textContainer,
10542
+ isEnabled: true,
10595
10543
  value: selectedBaseLayerId,
10596
10544
  list: list,
10597
10545
  currentIndex: currentIndex,
@@ -10715,7 +10663,7 @@
10715
10663
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10716
10664
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
10717
10665
  * */
10718
- var useStyles$q = makeStyles__default["default"]({
10666
+ var useStyles$n = makeStyles__default["default"]({
10719
10667
  layerRow: {
10720
10668
  width: '100%',
10721
10669
  height: '36px'
@@ -10738,7 +10686,7 @@
10738
10686
  layerManagerWidth = _a.layerManagerWidth,
10739
10687
  _d = _a.tooltip,
10740
10688
  tooltip = _d === void 0 ? '' : _d;
10741
- var classes = useStyles$q();
10689
+ var classes = useStyles$n();
10742
10690
  var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
10743
10691
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
10744
10692
  container: true,
@@ -10783,7 +10731,7 @@
10783
10731
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10784
10732
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
10785
10733
  * */
10786
- var useStyles$p = makeStyles__default["default"]({
10734
+ var styles$1 = {
10787
10735
  layerRowContainer: {
10788
10736
  position: 'relative',
10789
10737
  width: '100%',
@@ -10797,7 +10745,7 @@
10797
10745
  width: '100%',
10798
10746
  boxSizing: 'border-box'
10799
10747
  }
10800
- });
10748
+ };
10801
10749
 
10802
10750
  var LayerManager = function LayerManager(_a) {
10803
10751
  var mapId = _a.mapId,
@@ -10817,12 +10765,13 @@
10817
10765
  _e = _a.layerSelect,
10818
10766
  layerSelect = _e === void 0 ? false : _e,
10819
10767
  _f = _a.showAddLayersTooltip,
10820
- showAddLayersTooltip = _f === void 0 ? true : _f;
10821
- var classes = useStyles$p();
10768
+ showAddLayersTooltip = _f === void 0 ? true : _f,
10769
+ _g = _a.leftComponent,
10770
+ leftComponent = _g === void 0 ? null : _g;
10822
10771
 
10823
- var _g = __read(React__namespace.useState(LayerManagerWidth.lg), 2),
10824
- layerManagerWidth = _g[0],
10825
- setLayerManagerWidth = _g[1];
10772
+ var _h = __read(React__namespace.useState(LayerManagerWidth.lg), 2),
10773
+ layerManagerWidth = _h[0],
10774
+ setLayerManagerWidth = _h[1];
10826
10775
 
10827
10776
  var onChangeSize = function onChangeSize(_a) {
10828
10777
  var width = _a.width;
@@ -10849,13 +10798,14 @@
10849
10798
  "data-testid": "layerManagerWindow",
10850
10799
  onMouseDown: onMouseDown,
10851
10800
  order: order,
10852
- source: source
10853
- }, /*#__PURE__*/React__namespace.createElement("div", {
10854
- className: classes.layerManagerContainer
10801
+ source: source,
10802
+ leftComponent: leftComponent
10803
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10804
+ sx: styles$1.layerManagerContainer
10855
10805
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
10856
10806
  container: true,
10857
10807
  "data-testid": "layerManagerRowContainer",
10858
- className: classes.layerRowContainer
10808
+ sx: styles$1.layerRowContainer
10859
10809
  }, /*#__PURE__*/React__namespace.createElement(DescriptionRow, {
10860
10810
  mapId: mapId,
10861
10811
  tooltip: showAddLayersTooltip ? 'Add Layers' : '',
@@ -11236,10 +11186,10 @@
11236
11186
  }
11237
11187
 
11238
11188
  serviceSetLayers({
11239
- id: serviceUrl,
11240
11189
  name: serviceName,
11241
- service: serviceUrl,
11242
- layers: serviceLayers
11190
+ serviceUrl: serviceUrl,
11191
+ layers: serviceLayers,
11192
+ isUserAddedService: true
11243
11193
  });
11244
11194
  setIsLoading(false);
11245
11195
  closePopupAndResetState();
@@ -11656,6 +11606,65 @@
11656
11606
  });
11657
11607
  };
11658
11608
 
11609
+ /* *
11610
+ * Licensed under the Apache License, Version 2.0 (the "License");
11611
+ * you may not use this file except in compliance with the License.
11612
+ * You may obtain a copy of the License at
11613
+ *
11614
+ * http://www.apache.org/licenses/LICENSE-2.0
11615
+ *
11616
+ * Unless required by applicable law or agreed to in writing, software
11617
+ * distributed under the License is distributed on an "AS IS" BASIS,
11618
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11619
+ * See the License for the specific language governing permissions and
11620
+ * limitations under the License.
11621
+ *
11622
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11623
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
11624
+ * */
11625
+ var getMapStoreServiceFromLayerSelectServiceId = function getMapStoreServiceFromLayerSelectServiceId(services, serviceId) {
11626
+ /*
11627
+ Because the mapStore services redux store is refactored,
11628
+ the id's do not match anymore with the layerSelect services redux store.
11629
+ The following code ensures that the right mapStore service is found based on the id in the layerSelect store.
11630
+ TODO: https://gitlab.com/opengeoweb/opengeoweb/-/issues/1883
11631
+ */
11632
+ var mapStoreServiceIndex = Object.keys(services).findIndex(function (serviceKey) {
11633
+ return services[serviceKey].serviceUrl === serviceId;
11634
+ });
11635
+
11636
+ if (mapStoreServiceIndex === -1) {
11637
+ console.warn("serviceId " + serviceId + " not found");
11638
+ return null;
11639
+ }
11640
+
11641
+ return services[Object.keys(services)[mapStoreServiceIndex]];
11642
+ };
11643
+ var filterLayersFromService = function filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString) {
11644
+ var mapStoreService = getMapStoreServiceFromLayerSelectServiceId(services, serviceId);
11645
+ if (!mapStoreService) return [];
11646
+
11647
+ if (searchString === '' && allKeywordsActive) {
11648
+ return mapStoreService.layers.filter(function (layer) {
11649
+ return layer.leaf;
11650
+ });
11651
+ }
11652
+
11653
+ var searchStringArray = searchString.split(' ');
11654
+ return mapStoreService.layers.filter(function (layer) {
11655
+ return searchStringArray.every(function (search) {
11656
+ var layerPathAndKeywords = layer.path.concat(layer.keywords);
11657
+ return (!!layerPathAndKeywords && !layerPathAndKeywords.every(function (keyword) {
11658
+ return !keywordIds.includes(keyword);
11659
+ }) || allKeywordsActive) && (!!layer.name && layer.name.toLowerCase().includes(search.toLowerCase()) || !!layer.text && layer.text.toLowerCase().includes(search.toLowerCase()) || !!layer["abstract"] && layer["abstract"].toLowerCase().includes(search.toLowerCase()) || !!layerPathAndKeywords && !layerPathAndKeywords.every(function (keyword) {
11660
+ return !keyword.toLowerCase().includes(search.toLowerCase());
11661
+ }) || mapStoreService.name.toLowerCase().includes(search.toLowerCase()));
11662
+ });
11663
+ }).filter(function (layer) {
11664
+ return layer.leaf;
11665
+ });
11666
+ };
11667
+
11659
11668
  /* *
11660
11669
  * Licensed under the Apache License, Version 2.0 (the "License");
11661
11670
  * you may not use this file except in compliance with the License.
@@ -11713,29 +11722,103 @@
11713
11722
  * See the License for the specific language governing permissions and
11714
11723
  * limitations under the License.
11715
11724
  *
11716
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11717
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
11725
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11726
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
11718
11727
  * */
11719
- var filterLayersFromService = function filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString) {
11720
- if (searchString === '' && allKeywordsActive) {
11721
- return services[serviceId].layers.filter(function (layer) {
11722
- return layer.leaf;
11723
- });
11724
- }
11725
11728
 
11726
- var searchStringArray = searchString.split(' ');
11727
- return services[serviceId].layers.filter(function (layer) {
11728
- return searchStringArray.every(function (search) {
11729
- var layerPathAndKeywords = layer.path.concat(layer.keywords);
11730
- return (!!layerPathAndKeywords && !layerPathAndKeywords.every(function (keyword) {
11731
- return !keywordIds.includes(keyword);
11732
- }) || allKeywordsActive) && (!!layer.name && layer.name.toLowerCase().includes(search.toLowerCase()) || !!layer.text && layer.text.toLowerCase().includes(search.toLowerCase()) || !!layer["abstract"] && layer["abstract"].toLowerCase().includes(search.toLowerCase()) || !!layerPathAndKeywords && !layerPathAndKeywords.every(function (keyword) {
11733
- return !keyword.toLowerCase().includes(search.toLowerCase());
11734
- }) || services[serviceId].name.toLowerCase().includes(search.toLowerCase()));
11735
- });
11736
- }).filter(function (layer) {
11737
- return layer.leaf;
11738
- });
11729
+ var LayerListRow = function LayerListRow(_a) {
11730
+ var layer = _a.layer,
11731
+ layerIndex = _a.layerIndex,
11732
+ serviceId = _a.serviceId,
11733
+ addLayer = _a.addLayer,
11734
+ deleteLayer = _a.deleteLayer,
11735
+ mapLayers = _a.mapLayers;
11736
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11737
+ "data-testid": "layerListLayerRow",
11738
+ container: true,
11739
+ item: true,
11740
+ xs: 12,
11741
+ justifyContent: "center",
11742
+ alignItems: "center",
11743
+ sx: {
11744
+ backgroundColor: 'geowebColors.cards.cardContainer',
11745
+ paddingLeft: '12px',
11746
+ marginBottom: '4px',
11747
+ height: '64px',
11748
+ border: 'solid 1px',
11749
+ borderColor: 'geowebColors.cards.cardContainerBorder'
11750
+ }
11751
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11752
+ container: true,
11753
+ item: true,
11754
+ xs: 10
11755
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11756
+ container: true,
11757
+ item: true,
11758
+ xs: 12
11759
+ }, /*#__PURE__*/React__default["default"].createElement(material.Box, {
11760
+ sx: {
11761
+ fontSize: '12px',
11762
+ height: '24px',
11763
+ lineHeight: '24px',
11764
+ fontWeight: 500,
11765
+ WebkitLineClamp: 1,
11766
+ display: '-webkit-box',
11767
+ WebkitBoxOrient: 'vertical',
11768
+ textOverflow: 'ellipsis',
11769
+ overflow: 'hidden'
11770
+ }
11771
+ }, layer.text)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11772
+ container: true,
11773
+ item: true,
11774
+ xs: 4
11775
+ }, /*#__PURE__*/React__default["default"].createElement(material.Box, {
11776
+ sx: {
11777
+ fontSize: '12px',
11778
+ height: '24px',
11779
+ lineHeight: '24px',
11780
+ WebkitLineClamp: 1,
11781
+ display: '-webkit-box',
11782
+ WebkitBoxOrient: 'vertical',
11783
+ textOverflow: 'ellipsis',
11784
+ overflow: 'hidden'
11785
+ }
11786
+ }, layer.name)), layer["abstract"] ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11787
+ "data-testid": "layerAbstract",
11788
+ container: true,
11789
+ item: true,
11790
+ xs: 8,
11791
+ sx: {
11792
+ fontSize: '10px',
11793
+ height: '30px',
11794
+ paddingLeft: '20px',
11795
+ WebkitLineClamp: 2,
11796
+ display: '-webkit-box',
11797
+ WebkitBoxOrient: 'vertical',
11798
+ textOverflow: 'ellipsis',
11799
+ overflow: 'hidden'
11800
+ }
11801
+ }, layer["abstract"]) : null), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
11802
+ container: true,
11803
+ item: true,
11804
+ xs: 2,
11805
+ justifyContent: "flex-end",
11806
+ alignItems: "center"
11807
+ }, /*#__PURE__*/React__default["default"].createElement(material.Box, {
11808
+ sx: {
11809
+ width: '80px',
11810
+ height: '48px',
11811
+ marginRight: '8px',
11812
+ paddingTop: '4px'
11813
+ }
11814
+ }, /*#__PURE__*/React__default["default"].createElement(LayerAddRemoveButton, {
11815
+ layer: layer,
11816
+ layerIndex: layerIndex,
11817
+ serviceId: serviceId,
11818
+ addLayer: addLayer,
11819
+ deleteLayer: deleteLayer,
11820
+ mapLayers: mapLayers
11821
+ }))));
11739
11822
  };
11740
11823
 
11741
11824
  /* *
@@ -11751,56 +11834,9 @@
11751
11834
  * See the License for the specific language governing permissions and
11752
11835
  * limitations under the License.
11753
11836
  *
11754
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11755
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
11837
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11838
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
11756
11839
  * */
11757
- var useStyles$o = makeStyles__default["default"](function (theme) {
11758
- return {
11759
- layerRow: {
11760
- background: theme.palette.geowebColors.cards.cardContainer,
11761
- padding: '8px 0px 8px 12px',
11762
- marginBottom: '4px',
11763
- height: '64px',
11764
- border: "solid 1px " + theme.palette.geowebColors.cards.cardContainerBorder,
11765
- display: 'grid',
11766
- gridTemplateColumns: '1fr 0.1fr',
11767
- gridGap: '20px'
11768
- },
11769
- layerText: {
11770
- fontSize: '12px',
11771
- fontWeight: 500,
11772
- overflow: 'clip',
11773
- height: '20px',
11774
- textOverflow: 'ellipsis'
11775
- },
11776
- layerName: {
11777
- fontSize: '12px',
11778
- height: '24px',
11779
- overflow: 'clip',
11780
- "float": 'left',
11781
- paddingTop: '6px',
11782
- whiteSpace: 'nowrap'
11783
- },
11784
- layerNameMaxWidth: {
11785
- maxWidth: '270px'
11786
- },
11787
- layerAbstract: {
11788
- fontSize: '10px',
11789
- paddingLeft: '200px',
11790
- overflow: 'clip',
11791
- height: '30px'
11792
- },
11793
- resultCount: {
11794
- marginBottom: '4px',
11795
- fontSize: '12px'
11796
- },
11797
- layerButton: {
11798
- marginRight: '8px',
11799
- marginTop: '4px',
11800
- width: '80px'
11801
- }
11802
- };
11803
- });
11804
11840
 
11805
11841
  var LayerList = function LayerList(_a) {
11806
11842
  var services = _a.services,
@@ -11812,7 +11848,6 @@
11812
11848
  mapLayers = _a.mapLayers,
11813
11849
  keywordIds = _a.keywordIds,
11814
11850
  allKeywordsActive = _a.allKeywordsActive;
11815
- var classes = useStyles$o();
11816
11851
 
11817
11852
  var _b = __read(React__namespace.useState(0), 2),
11818
11853
  numberOfLayers = _b[0],
@@ -11823,42 +11858,29 @@
11823
11858
  return totalNumberOfLayers + filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).length;
11824
11859
  }, 0));
11825
11860
  }, [serviceIds, keywordIds, services, searchString, allKeywordsActive]);
11826
- return /*#__PURE__*/React__namespace.createElement("div", {
11861
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
11827
11862
  "data-testid": "layerList"
11828
- }, /*#__PURE__*/React__namespace.createElement("div", {
11829
- className: classes.resultCount
11830
- }, numberOfLayers, " results"), /*#__PURE__*/React__namespace.createElement("div", {
11831
- style: {
11863
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
11864
+ sx: {
11865
+ marginBottom: '4px',
11866
+ fontSize: '12px'
11867
+ }
11868
+ }, numberOfLayers, " results"), /*#__PURE__*/React__namespace.createElement(material.Box, {
11869
+ sx: {
11832
11870
  height: layerSelectHeight - 199,
11833
11871
  overflow: 'auto'
11834
11872
  }
11835
11873
  }, serviceIds.map(function (serviceId) {
11836
11874
  return filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).map(function (layer, layerIndex) {
11837
- return /*#__PURE__*/React__namespace.createElement("div", {
11838
- key: serviceId + "-" + layer.name + "-" + layer.text
11839
- }, /*#__PURE__*/React__namespace.createElement("div", {
11840
- key: serviceId + "-" + layer.name,
11841
- className: classes.layerRow,
11842
- "data-testid": "layerListLayerRow"
11843
- }, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", {
11844
- className: classes.layerText
11845
- }, layer.text), /*#__PURE__*/React__namespace.createElement("div", null, layer["abstract"] ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", {
11846
- className: classes.layerName + " " + classes.layerNameMaxWidth
11847
- }, layer.name), /*#__PURE__*/React__namespace.createElement("div", {
11848
- className: classes.layerAbstract,
11849
- "data-testid": "layerAbstract"
11850
- }, layer["abstract"])) : /*#__PURE__*/React__namespace.createElement("div", {
11851
- className: classes.layerName
11852
- }, layer.name))), /*#__PURE__*/React__namespace.createElement("div", {
11853
- className: classes.layerButton
11854
- }, /*#__PURE__*/React__namespace.createElement(LayerAddRemoveButton, {
11875
+ return /*#__PURE__*/React__namespace.createElement(LayerListRow, {
11876
+ key: layer.name,
11855
11877
  layer: layer,
11856
11878
  layerIndex: layerIndex,
11857
11879
  serviceId: serviceId,
11858
11880
  addLayer: addLayer,
11859
11881
  deleteLayer: deleteLayer,
11860
11882
  mapLayers: mapLayers
11861
- }))));
11883
+ });
11862
11884
  });
11863
11885
  })));
11864
11886
  };
@@ -11992,10 +12014,10 @@
11992
12014
  tabIndex: 0,
11993
12015
  "data-testid": all ? 'serviceChipAll' : 'serviceChip',
11994
12016
  onClick: function onClick() {
11995
- return toggleChip(all ? 'all' : service && service.service);
12017
+ return toggleChip(all ? 'all' : service && service.serviceUrl);
11996
12018
  },
11997
12019
  onKeyPress: function onKeyPress() {
11998
- return toggleChip(all ? 'all' : service && service.service);
12020
+ return toggleChip(all ? 'all' : service && service.serviceUrl);
11999
12021
  },
12000
12022
  sx: style
12001
12023
  }, service ? service.name : 'All');
@@ -12082,7 +12104,7 @@
12082
12104
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
12083
12105
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
12084
12106
  * */
12085
- var useStyles$n = makeStyles__default["default"](function (theme) {
12107
+ var useStyles$m = makeStyles__default["default"](function (theme) {
12086
12108
  return createStyles__default["default"]({
12087
12109
  serviceChips: {
12088
12110
  width: '100%',
@@ -12106,7 +12128,7 @@
12106
12128
  fontSize: '0.875rem'
12107
12129
  },
12108
12130
  scrollArrowLeft: {
12109
- width: '120px',
12131
+ width: '100px',
12110
12132
  marginBottom: '-12px',
12111
12133
  height: '34px',
12112
12134
  backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
@@ -12114,7 +12136,10 @@
12114
12136
  marginRight: '-120px',
12115
12137
  "float": 'left',
12116
12138
  zIndex: 1,
12117
- position: 'relative'
12139
+ position: 'relative',
12140
+ '&:hover': {
12141
+ color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
12142
+ }
12118
12143
  },
12119
12144
  serviceList: {
12120
12145
  height: '32px',
@@ -12123,13 +12148,16 @@
12123
12148
  overflow: 'hidden'
12124
12149
  },
12125
12150
  scrollArrowRight: {
12126
- width: '120px',
12151
+ width: '100px',
12127
12152
  marginBottom: '-12px',
12128
12153
  height: '34px',
12129
12154
  backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
12130
12155
  right: '0px',
12131
12156
  position: 'fixed',
12132
- cursor: 'pointer'
12157
+ cursor: 'pointer',
12158
+ '&:hover': {
12159
+ color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
12160
+ }
12133
12161
  }
12134
12162
  });
12135
12163
  });
@@ -12154,7 +12182,7 @@
12154
12182
  var ref = React__namespace.useRef(null);
12155
12183
  var scrollSpeed = 5;
12156
12184
  var maxWidthValue = ref && ref.current && ref.current.scrollWidth && ref.current.scrollWidth >= layerSelectWidth - margin && ref.current.scrollWidth || layerSelectWidth - 50;
12157
- var classes = useStyles$n({
12185
+ var classes = useStyles$m({
12158
12186
  margin: margin,
12159
12187
  maxWidthValue: maxWidthValue
12160
12188
  });
@@ -12220,13 +12248,14 @@
12220
12248
  key: "All",
12221
12249
  all: true,
12222
12250
  isEnabled: isAllEnabled
12223
- }), Object.keys(services).map(function (service) {
12251
+ }), Object.keys(services).map(function (serviceId) {
12224
12252
  var _a;
12225
12253
 
12254
+ var service = services[serviceId];
12226
12255
  return /*#__PURE__*/React__namespace.createElement(ServiceChipConnect, {
12227
- key: services[service].id,
12228
- service: services[service],
12229
- isEnabled: (_a = activeServices[service]) === null || _a === void 0 ? void 0 : _a.enabled
12256
+ key: serviceId,
12257
+ service: service,
12258
+ isEnabled: (_a = activeServices[service.serviceUrl]) === null || _a === void 0 ? void 0 : _a.enabled
12230
12259
  });
12231
12260
  })), layerSelectWidth + margin < width && /*#__PURE__*/React__namespace.createElement(iconsMaterial.ChevronRight, {
12232
12261
  className: classes.scrollArrowRight,
@@ -12284,63 +12313,49 @@
12284
12313
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
12285
12314
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
12286
12315
  * */
12287
- var useStyles$m = makeStyles__default["default"](function (theme) {
12288
- return createStyles__default["default"]({
12289
- servicesContainer: {
12290
- width: '300px',
12291
- maxHeight: '380px',
12292
- top: '140px',
12293
- backgroundColor: theme.palette.geowebColors.background.surface,
12294
- boxShadow: theme.shadows[6],
12295
- overflow: 'auto'
12296
- },
12297
- header: {
12298
- position: 'sticky',
12299
- top: 0,
12300
- fontSize: theme.typography.fontSize,
12301
- padding: '12px',
12302
- backgroundColor: theme.palette.geowebColors.background.surface,
12303
- zIndex: 100
12304
- },
12305
- footer: {
12306
- display: 'flex',
12307
- justifyContent: 'center',
12308
- alignItems: 'center',
12309
- position: 'sticky',
12310
- bottom: 0,
12311
- backgroundColor: theme.palette.geowebColors.background.surface,
12312
- zIndex: 100
12313
- },
12314
- iconFill: {
12315
- color: theme.palette.geowebColors.typographyAndIcons.icon
12316
- },
12317
- button: {
12318
- margin: '16px',
12319
- width: '80%',
12320
- fontSize: '12px',
12321
- textTransform: 'none'
12322
- },
12323
- text: {
12324
- paddingTop: '3px',
12325
- fontSize: '12px',
12326
- fontFamily: theme.typography.fontFamily,
12327
- fontWeight: theme.typography.fontWeightRegular,
12328
- textTransform: 'none',
12329
- color: '#575f7a'
12330
- },
12331
- icon: {
12332
- width: '24px',
12333
- height: '24px'
12334
- }
12335
- });
12336
- });
12316
+ var styles = {
12317
+ servicesContainer: {
12318
+ width: '300px',
12319
+ maxHeight: '380px',
12320
+ top: '140px',
12321
+ backgroundColor: 'geowebColors.background.surface',
12322
+ boxShadow: 6,
12323
+ overflow: 'auto'
12324
+ },
12325
+ header: {
12326
+ position: 'sticky',
12327
+ top: 0,
12328
+ fontSize: 'default',
12329
+ padding: '12px',
12330
+ backgroundColor: 'geowebColors.background.surface',
12331
+ zIndex: 100
12332
+ },
12333
+ footer: {
12334
+ display: 'flex',
12335
+ justifyContent: 'center',
12336
+ alignItems: 'center',
12337
+ position: 'sticky',
12338
+ bottom: 0,
12339
+ backgroundColor: 'geowebColors.background.surface',
12340
+ zIndex: 100
12341
+ },
12342
+ button: {
12343
+ margin: '16px',
12344
+ width: '80%',
12345
+ fontSize: '12px',
12346
+ textTransform: 'none'
12347
+ },
12348
+ icon: {
12349
+ width: '24px',
12350
+ height: '24px'
12351
+ }
12352
+ };
12337
12353
 
12338
12354
  var ServiceOptionsDialog = function ServiceOptionsDialog(_a) {
12339
12355
  var services = _a.services,
12340
12356
  mapStoreRemoveService = _a.mapStoreRemoveService,
12341
12357
  _b = _a.layers,
12342
12358
  layers = _b === void 0 ? [] : _b;
12343
- var classes = useStyles$m();
12344
12359
 
12345
12360
  var _c = __read(React__namespace.useState(false), 2),
12346
12361
  addServiceisOpen = _c[0],
@@ -12363,11 +12378,11 @@
12363
12378
  };
12364
12379
 
12365
12380
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Box, {
12366
- className: classes.servicesContainer,
12381
+ sx: styles.servicesContainer,
12367
12382
  "data-testid": "ServiceDialog"
12368
- }, /*#__PURE__*/React__namespace.createElement("div", {
12369
- className: classes.header
12370
- }, " Services"), /*#__PURE__*/React__namespace.createElement(material.List, {
12383
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
12384
+ sx: styles.header
12385
+ }, "Services"), /*#__PURE__*/React__namespace.createElement(material.List, {
12371
12386
  disablePadding: true
12372
12387
  }, services.map(function (service) {
12373
12388
  return /*#__PURE__*/React__namespace.createElement(material.ListItem, {
@@ -12389,36 +12404,34 @@
12389
12404
  }, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
12390
12405
  title: "Edit Service"
12391
12406
  }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
12392
- disabled: isDisabled(service.service),
12407
+ disabled: isDisabled(service.serviceUrl),
12393
12408
  "data-testid": "openEditServiceButton",
12394
12409
  size: "large"
12395
12410
  }, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
12396
12411
  d: "m8.332 17.09-.005.001-2.652.604.956-2.542.001-.001.001-.001.857-.744 1.69 1.945-.848.738zm.71.815L20.932 7.577 17.823 4 5.933 14.329l-.01.008.005.005L4.173 19l4.857-1.09-.004-.02.019.02-.002-.005z",
12397
- fill: classes.iconFill,
12398
12412
  fillRule: "evenodd"
12399
12413
  })))))), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
12400
12414
  title: "Delete Service"
12401
12415
  }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
12402
12416
  size: "large",
12403
- disabled: isDisabled(service.service),
12417
+ disabled: isDisabled(service.serviceUrl),
12404
12418
  onClick: function onClick() {
12405
- return mapStoreRemoveService(service.service);
12419
+ return mapStoreRemoveService(service.serviceUrl);
12406
12420
  },
12407
12421
  "data-testid": "removeServiceButton"
12408
12422
  }, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
12409
12423
  d: "M17.504 8.228c.588 0 1.027.48.973 1.066l-.876 9.64A1.197 1.197 0 0 1 16.434 20H8.41c-.59 0-1.115-.48-1.167-1.066l-.877-9.64a.962.962 0 0 1 .973-1.066zm-2.115 1.228a.82.82 0 0 0-.819.82v7.674a.818.818 0 0 0 1.638 0v-7.675a.819.819 0 0 0-.819-.819zm-2.968 0a.819.819 0 0 0-.819.82v7.674a.818.818 0 1 0 1.638 0v-7.675a.82.82 0 0 0-.82-.819zm-2.968 0a.819.819 0 0 0-.818.82v7.674a.818.818 0 1 0 1.637 0v-7.675a.82.82 0 0 0-.82-.819zM13.432 4c.21 0 .404.168.436.376l.107.758 3.256-.01a1.606 1.606 0 0 1 1.61 1.6l.001.535-12.841.038L6 6.76a1.605 1.605 0 0 1 1.6-1.61l3.262-.008.103-.758a.454.454 0 0 1 .434-.38z",
12410
- fill: classes.iconFill,
12411
12424
  fillRule: "evenodd"
12412
12425
  }))))))));
12413
- })), /*#__PURE__*/React__namespace.createElement("div", {
12414
- className: classes.footer
12426
+ })), /*#__PURE__*/React__namespace.createElement(material.Box, {
12427
+ sx: styles.footer
12415
12428
  }, /*#__PURE__*/React__namespace.createElement(material.Button, {
12416
12429
  onClick: openAddService,
12417
12430
  "data-testid": "openAddServiceButton",
12418
- className: classes.button,
12431
+ sx: styles.button,
12419
12432
  variant: "tertiary",
12420
12433
  startIcon: /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
12421
- className: classes.icon
12434
+ sx: styles.icon
12422
12435
  }, /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("path", {
12423
12436
  d: "M13.647 13.647h6.82a1.276 1.276 0 1 0 0-2.552h-6.82v-6.82a1.276 1.276 0 1 0-2.552 0v6.82h-6.82a1.276 1.276 0 1 0 0 2.552h6.82v6.82a1.274 1.274 0 0 0 1.276 1.275c.705 0 1.276-.571 1.276-1.276v-6.82z",
12424
12437
  fillRule: "evenodd"
@@ -13114,14 +13127,14 @@
13114
13127
  }, [dispatch]);
13115
13128
  React__namespace.useEffect(function () {
13116
13129
  if (isOpenInStore && preloadedServices && preloadedServices.length > 0) {
13117
- preloadedServices.forEach(function (service) {
13130
+ mergePresetsAndUserAddedServices(preloadedServices, getUserAddedServices()).forEach(function (service) {
13118
13131
  getLayersFlattenedFromService(service.url).then(function (layers) {
13119
13132
  if (isMounted.current) {
13120
13133
  serviceSetLayers$1({
13121
- id: service.id,
13122
13134
  name: service.name,
13123
- service: service.url,
13124
- layers: layers
13135
+ serviceUrl: service.url,
13136
+ layers: layers,
13137
+ isUserAddedService: false
13125
13138
  });
13126
13139
  }
13127
13140
  })["catch"](function () {
@@ -13179,7 +13192,9 @@
13179
13192
  _b = _a.showTitle,
13180
13193
  showTitle = _b === void 0 ? false : _b,
13181
13194
  _c = _a.layerSelect,
13182
- layerSelect = _c === void 0 ? false : _c;
13195
+ layerSelect = _c === void 0 ? false : _c,
13196
+ _d = _a.leftComponent,
13197
+ leftComponent = _d === void 0 ? null : _d;
13183
13198
  var dispatch = reactRedux.useDispatch();
13184
13199
  var isOpenInStore = reactRedux.useSelector(function (store) {
13185
13200
  return getisDialogOpen(store, 'layerManager');
@@ -13248,8 +13263,11 @@
13248
13263
  onMouseDown: onOrderDialog,
13249
13264
  order: uiOrder,
13250
13265
  source: uiSource,
13251
- layerSelect: layerSelect
13252
- }), layerSelect && /*#__PURE__*/React__namespace.createElement(LayerSelectConnect, null));
13266
+ layerSelect: layerSelect,
13267
+ leftComponent: leftComponent
13268
+ }), layerSelect && /*#__PURE__*/React__namespace.createElement(LayerSelectConnect, {
13269
+ preloadedServices: preloadedMapServices
13270
+ }));
13253
13271
  };
13254
13272
 
13255
13273
  /* *
@@ -14217,60 +14235,6 @@
14217
14235
  }, "AUTO")))))));
14218
14236
  };
14219
14237
 
14220
- /* *
14221
- * Licensed under the Apache License, Version 2.0 (the "License");
14222
- * you may not use this file except in compliance with the License.
14223
- * You may obtain a copy of the License at
14224
- *
14225
- * http://www.apache.org/licenses/LICENSE-2.0
14226
- *
14227
- * Unless required by applicable law or agreed to in writing, software
14228
- * distributed under the License is distributed on an "AS IS" BASIS,
14229
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14230
- * See the License for the specific language governing permissions and
14231
- * limitations under the License.
14232
- *
14233
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14234
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
14235
- * */
14236
- var svgLoopPath = {
14237
- title: 'Loop',
14238
- src: 'M20.029 10.371c.24-.013.487.078.67.246.176.162.278.38.288.615.001 0 .22 1.941-1.458 3.79-1.124 1.224-2.718 1.844-4.74 1.844H6.96v1.288c0 .43-.284.654-.564.654-.14 0-.277-.05-.41-.148l-2.671-1.948c-.2-.147-.314-.36-.314-.587 0-.229.114-.443.315-.588l2.67-1.95c.134-.096.272-.145.41-.145.28 0 .563.224.563.653v1.116h7.832c1.417 0 2.59-.465 3.393-1.342 1.025-1.13 1.011-2.28.998-2.5-.023-.508.355-.954.842-.998zM17.605 5c.14 0 .277.05.41.148l2.671 1.947c.2.147.314.36.314.587 0 .23-.114.444-.315.589l-2.67 1.949c-.134.096-.272.146-.41.146-.28 0-.563-.224-.563-.654V8.597H9.21c-1.416 0-2.59.465-3.393 1.342-1.025 1.13-1.011 2.329-.999 2.558.024.508-.354.954-.841.998l-.05.002c-.228 0-.454-.09-.626-.248-.176-.163-.278-.38-.288-.614-.002 0-.227-1.993 1.458-3.849 1.124-1.224 2.718-1.845 4.74-1.845h7.83V5.654c0-.429.284-.654.564-.654z'
14239
- };
14240
- var svgLoopOffPath = {
14241
- title: 'Loop off',
14242
- src: 'M15.154 3.26l1.827.814-1.278 2.867h1.339V5.654c0-.429.283-.654.563-.654.14 0 .277.05.41.148l2.671 1.947c.2.147.314.36.314.587 0 .23-.114.444-.315.589l-2.67 1.949c-.134.096-.272.146-.41.146-.28 0-.563-.224-.563-.654V8.597h-2.076l-2.944 6.613h2.768c1.328 0 2.442-.408 3.238-1.182l.155-.16c1.025-1.129 1.011-2.279.998-2.499-.023-.508.355-.954.842-.998.247-.013.493.078.676.246.176.162.278.38.288.615.001 0 .22 1.941-1.458 3.79-1.124 1.224-2.718 1.844-4.74 1.844h-3.504l-2.439 5.478-1.827-.813 2.077-4.666H6.958v1.29c0 .429-.283.653-.563.653-.14 0-.277-.05-.41-.148l-2.671-1.948c-.2-.147-.314-.36-.314-.587 0-.229.114-.443.315-.588l2.67-1.95c.134-.096.272-.145.41-.145.28 0 .563.224.563.653v1.116h2.875l2.944-6.614H9.21c-1.322 0-2.432.405-3.228 1.172l-.165.17c-1.025 1.13-1.011 2.329-.999 2.558.024.508-.354.954-.841.998l-.05.002c-.228 0-.454-.09-.626-.248-.176-.163-.278-.38-.288-.614-.002 0-.227-1.993 1.458-3.849 1.124-1.224 2.718-1.845 4.74-1.845h4.303l1.64-3.68z'
14243
- };
14244
-
14245
- var LoopButton = function LoopButton(_a) {
14246
- var _b = _a.isLooping,
14247
- isLooping = _b === void 0 ? true : _b,
14248
- _c = _a.isDisabled,
14249
- isDisabled = _c === void 0 ? false : _c,
14250
- _d = _a.onToggleLoop,
14251
- onToggleLoop = _d === void 0 ? function () {
14252
- return null;
14253
- } : _d;
14254
- var loopButtonPath = isLooping ? svgLoopOffPath : svgLoopPath;
14255
- return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
14256
- title: loopButtonPath.title
14257
- }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
14258
- onClick: function onClick() {
14259
- return onToggleLoop();
14260
- },
14261
- active: isLooping,
14262
- disabled: isDisabled,
14263
- "data-testid": "loopButton"
14264
- }, /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("rect", {
14265
- width: 24,
14266
- height: 24,
14267
- fill: "transparent"
14268
- }), /*#__PURE__*/React__namespace.createElement("path", {
14269
- "data-testid": isLooping ? 'loop-off-svg-path' : 'loop-svg-path',
14270
- d: loopButtonPath.src
14271
- })))));
14272
- };
14273
-
14274
14238
  /* *
14275
14239
  * Licensed under the Apache License, Version 2.0 (the "License");
14276
14240
  * you may not use this file except in compliance with the License.
@@ -14744,7 +14708,6 @@
14744
14708
 
14745
14709
  var OptionsMenuButton = function OptionsMenuButton(_a) {
14746
14710
  var autoUpdateBtn = _a.autoUpdateBtn,
14747
- loopBtn = _a.loopBtn,
14748
14711
  speedBtn = _a.speedBtn,
14749
14712
  timeStepBtn = _a.timeStepBtn;
14750
14713
 
@@ -14807,9 +14770,6 @@
14807
14770
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
14808
14771
  item: true,
14809
14772
  xs: "auto"
14810
- }, loopBtn || /*#__PURE__*/React__namespace.createElement(LoopButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
14811
- item: true,
14812
- xs: "auto"
14813
14773
  }, autoUpdateBtn || /*#__PURE__*/React__namespace.createElement(AutoUpdateButton, null)))));
14814
14774
  };
14815
14775
 
@@ -14898,7 +14858,6 @@
14898
14858
 
14899
14859
  var TimeSliderButtons = function TimeSliderButtons(_a) {
14900
14860
  var autoUpdateBtn = _a.autoUpdateBtn,
14901
- loopBtn = _a.loopBtn,
14902
14861
  optionsMenuBtn = _a.optionsMenuBtn,
14903
14862
  playBtn = _a.playBtn,
14904
14863
  speedBtn = _a.speedBtn,
@@ -14909,7 +14868,7 @@
14909
14868
  "data-testid": "timeSliderButtons"
14910
14869
  }, matches ? /*#__PURE__*/React__namespace.createElement(material.Grid, {
14911
14870
  container: true,
14912
- spacing: 1,
14871
+ spacing: 2,
14913
14872
  className: classes.buttonContainerBig
14914
14873
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
14915
14874
  item: true
@@ -14927,8 +14886,6 @@
14927
14886
  }
14928
14887
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
14929
14888
  item: true
14930
- }, loopBtn || /*#__PURE__*/React__namespace.createElement(LoopButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
14931
- item: true
14932
14889
  }, autoUpdateBtn || /*#__PURE__*/React__namespace.createElement(AutoUpdateButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
14933
14890
  item: true
14934
14891
  }, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null))) : /*#__PURE__*/React__namespace.createElement(material.Grid, {
@@ -17046,14 +17003,14 @@
17046
17003
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17047
17004
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
17048
17005
  * */
17049
- var connectRedux$6 = reactRedux.connect(function (store, props) {
17006
+ var connectRedux$5 = reactRedux.connect(function (store, props) {
17050
17007
  return {
17051
17008
  isAutoUpdating: isAutoUpdating(store, props.mapId)
17052
17009
  };
17053
17010
  }, {
17054
17011
  toggleAutoUpdate: toggleAutoUpdate
17055
17012
  });
17056
- var AutoUpdateButtonConnectComponent = connectRedux$6(function (_a) {
17013
+ var AutoUpdateButtonConnectComponent = connectRedux$5(function (_a) {
17057
17014
  var mapId = _a.mapId,
17058
17015
  isAutoUpdating = _a.isAutoUpdating,
17059
17016
  toggleAutoUpdate = _a.toggleAutoUpdate;
@@ -17071,54 +17028,7 @@
17071
17028
  disabled: false
17072
17029
  });
17073
17030
  });
17074
- var AutoUpdateButtonConnect = connectRedux$6(AutoUpdateButtonConnectComponent);
17075
-
17076
- /* *
17077
- * Licensed under the Apache License, Version 2.0 (the "License");
17078
- * you may not use this file except in compliance with the License.
17079
- * You may obtain a copy of the License at
17080
- *
17081
- * http://www.apache.org/licenses/LICENSE-2.0
17082
- *
17083
- * Unless required by applicable law or agreed to in writing, software
17084
- * distributed under the License is distributed on an "AS IS" BASIS,
17085
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17086
- * See the License for the specific language governing permissions and
17087
- * limitations under the License.
17088
- *
17089
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17090
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
17091
- * */
17092
- var connectRedux$5 = reactRedux.connect(function (store, props) {
17093
- return {
17094
- isLooping: isLooping(store, props.mapId)
17095
- };
17096
- }, {
17097
- mapToggleLoop: toggleLoop
17098
- });
17099
- var LoopButtonConnect = connectRedux$5(function (_a) {
17100
- var mapId = _a.mapId,
17101
- _b = _a.isLooping,
17102
- isLooping = _b === void 0 ? true : _b,
17103
- _c = _a.isDisabled,
17104
- isDisabled = _c === void 0 ? false : _c,
17105
- mapToggleLoop = _a.mapToggleLoop;
17106
-
17107
- var onMapToggleLoop = function onMapToggleLoop() {
17108
- mapToggleLoop({
17109
- mapId: mapId,
17110
- shouldLoop: !isLooping
17111
- });
17112
- };
17113
-
17114
- return /*#__PURE__*/React__default["default"].createElement(LoopButton, {
17115
- isLooping: isLooping,
17116
- isDisabled: isDisabled,
17117
- onToggleLoop: function onToggleLoop() {
17118
- onMapToggleLoop();
17119
- }
17120
- });
17121
- });
17031
+ var AutoUpdateButtonConnect = connectRedux$5(AutoUpdateButtonConnectComponent);
17122
17032
 
17123
17033
  /* *
17124
17034
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -17249,9 +17159,6 @@
17249
17159
  autoUpdateBtn: /*#__PURE__*/React__namespace.createElement(AutoUpdateButtonConnect, {
17250
17160
  mapId: mapId
17251
17161
  }),
17252
- loopBtn: /*#__PURE__*/React__namespace.createElement(LoopButtonConnect, {
17253
- mapId: mapId
17254
- }),
17255
17162
  speedBtn: /*#__PURE__*/React__namespace.createElement(SpeedButtonConnect, {
17256
17163
  mapId: mapId
17257
17164
  }),
@@ -17355,9 +17262,6 @@
17355
17262
  autoUpdateBtn: /*#__PURE__*/React__namespace.createElement(AutoUpdateButtonConnect, {
17356
17263
  mapId: mapId
17357
17264
  }),
17358
- loopBtn: /*#__PURE__*/React__namespace.createElement(LoopButtonConnect, {
17359
- mapId: mapId
17360
- }),
17361
17265
  optionsMenuBtn: /*#__PURE__*/React__namespace.createElement(OptionsMenuButtonConnect, {
17362
17266
  mapId: mapId
17363
17267
  }),
@@ -18409,22 +18313,6 @@
18409
18313
  }));
18410
18314
  };
18411
18315
 
18412
- function _typeof(obj) {
18413
- "@babel/helpers - typeof";
18414
-
18415
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
18416
- _typeof = function (obj) {
18417
- return typeof obj;
18418
- };
18419
- } else {
18420
- _typeof = function (obj) {
18421
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
18422
- };
18423
- }
18424
-
18425
- return _typeof(obj);
18426
- }
18427
-
18428
18316
  /* *
18429
18317
  * Licensed under the Apache License, Version 2.0 (the "License");
18430
18318
  * you may not use this file except in compliance with the License.
@@ -18776,6 +18664,171 @@
18776
18664
  }
18777
18665
  };
18778
18666
 
18667
+ /* *
18668
+ * Licensed under the Apache License, Version 2.0 (the "License");
18669
+ * you may not use this file except in compliance with the License.
18670
+ * You may obtain a copy of the License at
18671
+ *
18672
+ * http://www.apache.org/licenses/LICENSE-2.0
18673
+ *
18674
+ * Unless required by applicable law or agreed to in writing, software
18675
+ * distributed under the License is distributed on an "AS IS" BASIS,
18676
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18677
+ * See the License for the specific language governing permissions and
18678
+ * limitations under the License.
18679
+ *
18680
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
18681
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
18682
+ * */
18683
+ /* Function which calculates the distance between two points */
18684
+ // eslint-disable-next-line class-methods-use-this
18685
+
18686
+ var distance = function distance(a, b) {
18687
+ return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
18688
+ };
18689
+
18690
+ var checkHoverVertice = function checkHoverVertice(feature, mouseX, mouseY, convertGeoCoordsToScreenCoords) {
18691
+ var maxDistance = 20;
18692
+
18693
+ if (feature.geometry.type === 'Point') {
18694
+ var featureCoords = feature.geometry.coordinates;
18695
+ /* Get all vertexes */
18696
+
18697
+ var XYCoords = convertGeoCoordsToScreenCoords([featureCoords]);
18698
+
18699
+ if (XYCoords.length > 0 && distance(XYCoords[0], {
18700
+ x: mouseX,
18701
+ y: mouseY
18702
+ }) < maxDistance) {
18703
+ return {
18704
+ coordinateIndexInFeature: 0
18705
+ };
18706
+ }
18707
+ }
18708
+
18709
+ if (feature.geometry.type === 'MultiPoint') {
18710
+ for (var polygonIndex = feature.geometry.coordinates.length - 1; polygonIndex >= 0; polygonIndex -= 1) {
18711
+ var featureCoords = feature.geometry.coordinates[polygonIndex];
18712
+
18713
+ if (featureCoords === undefined) {
18714
+ // eslint-disable-next-line no-continue
18715
+ continue;
18716
+ }
18717
+ /* Get all vertexes */
18718
+
18719
+
18720
+ var XYCoords = convertGeoCoordsToScreenCoords([featureCoords]);
18721
+
18722
+ if (XYCoords.length > 0 && distance(XYCoords[0], {
18723
+ x: mouseX,
18724
+ y: mouseY
18725
+ }) < maxDistance) {
18726
+ return {
18727
+ coordinateIndexInFeature: polygonIndex
18728
+ };
18729
+ }
18730
+ }
18731
+ }
18732
+
18733
+ if (feature.geometry.type === 'Polygon') {
18734
+ var point = [mouseX, mouseY];
18735
+
18736
+ for (var polygonIndex = feature.geometry.coordinates.length - 1; polygonIndex >= 0; polygonIndex -= 1) {
18737
+ var featureCoords = feature.geometry.coordinates[polygonIndex];
18738
+
18739
+ if (featureCoords === undefined) {
18740
+ // eslint-disable-next-line no-continue
18741
+ continue;
18742
+ }
18743
+ /* Get all vertexes */
18744
+
18745
+
18746
+ var poly = [convertGeoCoordsToScreenCoords(featureCoords).map(function (coord) {
18747
+ return [coord.x, coord.y];
18748
+ })];
18749
+
18750
+ try {
18751
+ var isPointInPoly = turf__namespace.booleanPointInPolygon(turf__namespace.point(point), turf__namespace.polygon(poly));
18752
+
18753
+ if (isPointInPoly) {
18754
+ return {
18755
+ coordinateIndexInFeature: polygonIndex
18756
+ };
18757
+ } // eslint-disable-next-line no-empty
18758
+
18759
+ } catch (e) {}
18760
+ }
18761
+ }
18762
+
18763
+ if (feature.geometry.type === 'MultiPolygon') {
18764
+ var point = [mouseX, mouseY];
18765
+
18766
+ for (var polygonIndex = feature.geometry.coordinates.length - 1; polygonIndex >= 0; polygonIndex -= 1) {
18767
+ var featureCoords = feature.geometry.coordinates[polygonIndex][0];
18768
+
18769
+ if (featureCoords === undefined) {
18770
+ // eslint-disable-next-line no-continue
18771
+ continue;
18772
+ }
18773
+
18774
+ var poly = [convertGeoCoordsToScreenCoords(featureCoords).map(function (coord) {
18775
+ return [coord.x, coord.y];
18776
+ })];
18777
+
18778
+ try {
18779
+ var isPointInPoly = turf__namespace.booleanPointInPolygon(turf__namespace.point(point), turf__namespace.polygon(poly));
18780
+
18781
+ if (isPointInPoly) {
18782
+ return {
18783
+ coordinateIndexInFeature: polygonIndex
18784
+ };
18785
+ } // eslint-disable-next-line no-empty
18786
+
18787
+ } catch (e) {}
18788
+ }
18789
+ }
18790
+
18791
+ if (feature.geometry.type === 'LineString') {
18792
+ var featureCoords = feature.geometry.coordinates;
18793
+ /* Get all vertexes */
18794
+
18795
+ var XYCoords = convertGeoCoordsToScreenCoords(featureCoords);
18796
+ /* Snap to the vertex closer than specified pixels */
18797
+
18798
+ for (var j = 0; j < XYCoords.length; j += 1) {
18799
+ var coord = XYCoords[j];
18800
+
18801
+ if (distance(coord, {
18802
+ x: mouseX,
18803
+ y: mouseY
18804
+ }) < maxDistance) {
18805
+ return {
18806
+ coordinateIndexInFeature: j
18807
+ };
18808
+ }
18809
+ }
18810
+ }
18811
+
18812
+ return null;
18813
+ };
18814
+
18815
+ var checkHoverFeatures = function checkHoverFeatures(geojson, mouseX, mouseY, convertGeoCoordsToScreenCoords) {
18816
+ for (var j = 0; j < geojson.features.length; j += 1) {
18817
+ var feature = geojson.features[j];
18818
+ var hoverResult = checkHoverVertice(feature, mouseX, mouseY, convertGeoCoordsToScreenCoords);
18819
+
18820
+ if (hoverResult != null) {
18821
+ return {
18822
+ coordinateIndexInFeature: hoverResult.coordinateIndexInFeature,
18823
+ featureIndex: j,
18824
+ feature: feature
18825
+ };
18826
+ }
18827
+ }
18828
+
18829
+ return null;
18830
+ };
18831
+
18779
18832
  /* *
18780
18833
  * Licensed under the Apache License, Version 2.0 (the "License");
18781
18834
  * you may not use this file except in compliance with the License.
@@ -19386,9 +19439,12 @@
19386
19439
  };
19387
19440
 
19388
19441
  AdagucMapDraw.prototype.adagucMouseMove = function (event) {
19442
+ var _this = this;
19443
+
19389
19444
  var _a = this.props,
19390
19445
  isInEditMode = _a.isInEditMode,
19391
- featureNrToEdit = _a.featureNrToEdit;
19446
+ featureNrToEdit = _a.featureNrToEdit,
19447
+ onHoverFeature = _a.onHoverFeature;
19392
19448
  if (event && event.rightButton === true) return;
19393
19449
  /* adagucMouseMove is an event callback function which is triggered when the mouse moves over the map
19394
19450
  This event is only triggered if the map is in hover state.
@@ -19401,6 +19457,29 @@
19401
19457
  this.mouseX = mouseX;
19402
19458
  this.mouseY = mouseY;
19403
19459
 
19460
+ if (onHoverFeature) {
19461
+ var handleMouseStoppedTimer = function handleMouseStoppedTimer() {
19462
+ var result = checkHoverFeatures(_this.geojson, mouseX, mouseY, function (coordinates) {
19463
+ return _this.convertGeoCoordsToScreenCoords(coordinates);
19464
+ });
19465
+
19466
+ if (result) {
19467
+ var featureEvent = {
19468
+ coordinateIndexInFeature: result.coordinateIndexInFeature,
19469
+ featureIndex: result.featureIndex,
19470
+ mouseX: mouseX,
19471
+ mouseY: mouseY,
19472
+ isInEditMode: isInEditMode,
19473
+ feature: result.feature
19474
+ };
19475
+ onHoverFeature(featureEvent);
19476
+ }
19477
+ };
19478
+
19479
+ window.clearTimeout(this.mouseStoppedTimer);
19480
+ this.mouseStoppedTimer = window.setTimeout(handleMouseStoppedTimer, 20);
19481
+ }
19482
+
19404
19483
  if (isInEditMode === false) {
19405
19484
  return;
19406
19485
  }
@@ -19901,9 +19980,35 @@
19901
19980
  };
19902
19981
 
19903
19982
  AdagucMapDraw.prototype.adagucMouseUp = function (event) {
19904
- var isInEditMode = this.props.isInEditMode;
19983
+ var _this = this;
19984
+
19985
+ var _a = this.props,
19986
+ isInEditMode = _a.isInEditMode,
19987
+ onClickFeature = _a.onClickFeature;
19905
19988
  if (event && event.rightButton === true) return;
19906
19989
 
19990
+ if (onClickFeature) {
19991
+ var mouseX = event.mouseX,
19992
+ mouseY = event.mouseY;
19993
+ var result = checkHoverFeatures(this.geojson, mouseX, mouseY, function (coordinates) {
19994
+ return _this.convertGeoCoordsToScreenCoords(coordinates);
19995
+ });
19996
+
19997
+ if (result) {
19998
+ var featureEvent = {
19999
+ coordinateIndexInFeature: result.coordinateIndexInFeature,
20000
+ featureIndex: result.featureIndex,
20001
+ mouseX: mouseX,
20002
+ mouseY: mouseY,
20003
+ isInEditMode: isInEditMode,
20004
+ feature: result.feature
20005
+ };
20006
+ onClickFeature(featureEvent);
20007
+ } else {
20008
+ onClickFeature(null);
20009
+ }
20010
+ }
20011
+
19907
20012
  if (isInEditMode === false) {
19908
20013
  return;
19909
20014
  }
@@ -20109,12 +20214,12 @@
20109
20214
  */
20110
20215
  var _a = this.props,
20111
20216
  featureNrToEdit = _a.featureNrToEdit,
20112
- isInEditMode = _a.isInEditMode,
20113
- hoverFeatureCallback = _a.hoverFeatureCallback;
20217
+ isInEditMode = _a.isInEditMode;
20114
20218
  if (!this.geojson || !this.geojson.features || !this.geojson.features.length) return;
20115
20219
  this.textPositions = [];
20116
20220
  this.mouseOverPolygonCoordinates = [];
20117
20221
  this.mouseOverPolygonFeatureIndex = -1;
20222
+ this.mouseOverPolygonIndex = -1;
20118
20223
  /* Current selected feature from GeoJSON */
20119
20224
 
20120
20225
  for (var featureIndex = 0; featureIndex < this.geojson.features.length; featureIndex += 1) {
@@ -20301,19 +20406,6 @@
20301
20406
  ctx.globalAlpha = 1;
20302
20407
  ctx.stroke();
20303
20408
  }
20304
- } // if (isInEditMode === true &&
20305
- // this.mouseOverPolygonFeatureIndex === this.props.featureNrToEdit &&
20306
-
20307
-
20308
- if (hoverFeatureCallback) {
20309
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
20310
- // @ts-ignore
20311
- hoverFeatureCallback({
20312
- polygonIndex: this.mouseOverPolygonFeatureIndex,
20313
- featureIndex: this.mouseOverPolygonFeatureIndex,
20314
- mouseX: this.mouseX,
20315
- mouseY: this.mouseY
20316
- });
20317
20409
  }
20318
20410
  /* Draw labels */
20319
20411
 
@@ -20628,7 +20720,8 @@
20628
20720
  // if (test) {
20629
20721
 
20630
20722
  this.mouseOverPolygonCoordinates = 0;
20631
- this.mouseOverPolygonFeatureIndex = 0; // }
20723
+ this.mouseOverPolygonFeatureIndex = 0;
20724
+ this.mouseOverPolygonIndex = 0; // }
20632
20725
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
20633
20726
  // @ts-ignore
20634
20727
 
@@ -20705,6 +20798,7 @@
20705
20798
  if (test) {
20706
20799
  this.mouseOverPolygonCoordinates = XYCoords;
20707
20800
  this.mouseOverPolygonFeatureIndex = featureIndex;
20801
+ this.mouseOverPolygonIndex = polygonIndex;
20708
20802
  } // eslint-disable-next-line @typescript-eslint/ban-ts-comment
20709
20803
  // @ts-ignore
20710
20804
 
@@ -20920,9 +21014,14 @@
20920
21014
  isInDeleteMode: layer.isInDeleteMode,
20921
21015
  drawMode: layer.drawMode,
20922
21016
  webmapjs: webMapJS,
20923
- hoverFeatureCallback: function hoverFeatureCallback(hoverInfo) {
20924
- if (layer.hoverFeatureCallback) {
20925
- layer.hoverFeatureCallback(hoverInfo);
21017
+ onHoverFeature: function onHoverFeature(hoverInfo) {
21018
+ if (layer.onHoverFeature) {
21019
+ layer.onHoverFeature(hoverInfo);
21020
+ }
21021
+ },
21022
+ onClickFeature: function onClickFeature(hoverInfo) {
21023
+ if (layer.onClickFeature) {
21024
+ layer.onClickFeature(hoverInfo);
20926
21025
  }
20927
21026
  },
20928
21027
  updateGeojson: function updateGeojson(geojson) {
@@ -23843,6 +23942,57 @@
23843
23942
  }, children)));
23844
23943
  };
23845
23944
 
23945
+ /* *
23946
+ * Licensed under the Apache License, Version 2.0 (the "License");
23947
+ * you may not use this file except in compliance with the License.
23948
+ * You may obtain a copy of the License at
23949
+ *
23950
+ * http://www.apache.org/licenses/LICENSE-2.0
23951
+ *
23952
+ * Unless required by applicable law or agreed to in writing, software
23953
+ * distributed under the License is distributed on an "AS IS" BASIS,
23954
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23955
+ * See the License for the specific language governing permissions and
23956
+ * limitations under the License.
23957
+ *
23958
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
23959
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
23960
+ * */
23961
+ var MapWarningProperties = function MapWarningProperties(_a) {
23962
+ var selectedFeatureProperties = _a.selectedFeatureProperties;
23963
+ return /*#__PURE__*/React__default["default"].createElement("div", {
23964
+ "data-testid": "map-warning-properties",
23965
+ style: {
23966
+ width: '100%',
23967
+ height: '15%',
23968
+ marginTop: '30px',
23969
+ marginLeft: '100px',
23970
+ position: 'relative',
23971
+ zIndex: 10000,
23972
+ backgroundColor: '#CCCCCCC0',
23973
+ padding: '0px 20px 20px',
23974
+ overflow: 'auto',
23975
+ fontSize: '11px'
23976
+ }
23977
+ }, /*#__PURE__*/React__default["default"].createElement("h1", {
23978
+ "data-testid": "map-warning-properties-title"
23979
+ }, selectedFeatureProperties.country), selectedFeatureProperties.details[0].event && /*#__PURE__*/React__default["default"].createElement("pre", {
23980
+ "data-testid": "map-warning-properties-row"
23981
+ }, "Event: ", selectedFeatureProperties.details[0].event), selectedFeatureProperties.details[0].sent && /*#__PURE__*/React__default["default"].createElement("pre", {
23982
+ "data-testid": "map-warning-properties-row"
23983
+ }, "Sent:", ' ', moment__default["default"].utc(selectedFeatureProperties.details[0].sent).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.details[0].expires && /*#__PURE__*/React__default["default"].createElement("pre", {
23984
+ "data-testid": "map-warning-properties-row"
23985
+ }, "Expires:", ' ', moment__default["default"].utc(selectedFeatureProperties.details[0].expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.details[0].web && /*#__PURE__*/React__default["default"].createElement("pre", {
23986
+ "data-testid": "map-warning-properties-row"
23987
+ }, "Web: ", selectedFeatureProperties.details[0].web), selectedFeatureProperties.details[0].sender && /*#__PURE__*/React__default["default"].createElement("pre", {
23988
+ "data-testid": "map-warning-properties-row"
23989
+ }, "Sender: ", selectedFeatureProperties.details[0].sender), selectedFeatureProperties.details[0].identifier && /*#__PURE__*/React__default["default"].createElement("pre", {
23990
+ "data-testid": "map-warning-properties-row"
23991
+ }, "Identifier: ", selectedFeatureProperties.details[0].identifier), selectedFeatureProperties.details[0].area && /*#__PURE__*/React__default["default"].createElement("pre", {
23992
+ "data-testid": "map-warning-properties-row"
23993
+ }, "area: ", selectedFeatureProperties.details[0].area));
23994
+ };
23995
+
23846
23996
  exports.ConfigurableConnectedMap = ConfigurableConnectedMap;
23847
23997
  exports.ConfigurableMapWithSliderConnect = ConfigurableMapWithSliderConnect;
23848
23998
  exports.CoreThemeProvider = CoreThemeProvider;
@@ -23858,6 +24008,7 @@
23858
24008
  exports.MapView = MapView;
23859
24009
  exports.MapViewConnect = MapViewConnect;
23860
24010
  exports.MapViewLayer = MapViewLayer;
24011
+ exports.MapWarningProperties = MapWarningProperties;
23861
24012
  exports.MultiDimensionSelectMapButtonsConnect = MultiDimensionSelectMapButtonsConnect;
23862
24013
  exports.MultiMapDimensionSelectConnect = MultiMapMultiDimensionSelectConnect;
23863
24014
  exports.MultiMapViewConnect = MultiMapViewConnect;
@@ -23866,7 +24017,6 @@
23866
24017
  exports.SyncGroupViewerConnect = SyncGroupViewerConnect;
23867
24018
  exports.SyncGroups = index;
23868
24019
  exports.TimeSliderConnect = TimeSliderConnect;
23869
- exports.TooltipSelect = TooltipSelect;
23870
24020
  exports.ZoomControlConnect = ZoomControlConnect;
23871
24021
  exports.ZoomControls = ZoomControls;
23872
24022
  exports.componentsLookUp = componentsLookUp;
@@ -23883,6 +24033,8 @@
23883
24033
  exports.filterSrs = filterSrs;
23884
24034
  exports.generateLayerId = generateLayerId;
23885
24035
  exports.generateMapId = generateMapId;
24036
+ exports.generateServiceId = generateServiceId;
24037
+ exports.generateTimeSeriesId = generateTimeSeriesId;
23886
24038
  exports.generateTimesliderId = generateTimesliderId;
23887
24039
  exports.getFirstTimeStepForLayerId = getFirstTimeStepForLayerId;
23888
24040
  exports.getInitialPresets = getInitialPresets;
@@ -23908,6 +24060,7 @@
23908
24060
  exports.store = store;
23909
24061
  exports.syncGroupActions = actions;
23910
24062
  exports.synchronizationGroupModuleConfig = synchronizationGroupConfig;
24063
+ exports.synchronizationGroupsConfig = synchronizationGroupConfig;
23911
24064
  exports.testLayers = testLayers;
23912
24065
  exports.uiActions = actions$2;
23913
24066
  exports.uiModuleConfig = uiModuleConfig;