@opengeoweb/core 4.0.0 → 4.1.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 (24) hide show
  1. package/index.esm.js +930 -990
  2. package/index.umd.js +953 -994
  3. package/lib/components/LayerManager/LayerManager.stories.d.ts +12 -0
  4. package/lib/components/LayerManager/LayerManagerConnect.stories.d.ts +18 -2
  5. package/lib/components/LayerManager/LayerManagerUtils.d.ts +49 -2
  6. package/lib/components/LayerManager/LayerSelect/LayerSelect.stories.d.ts +12 -0
  7. package/lib/components/MapView/useKeyboardZoomAndPan.d.ts +1 -0
  8. package/lib/components/MapView/useKeyboardZoomAndPan.spec.d.ts +1 -0
  9. package/lib/components/MapView/useTouchZoomPan.d.ts +1 -0
  10. package/lib/components/MapView/useTouchZoomPan.spec.d.ts +1 -0
  11. package/lib/components/MapWarning/MapWarningProperties.d.ts +1 -0
  12. package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +0 -1
  13. package/lib/components/ReactMapView/AdagucMapDraw.d.ts +12 -0
  14. package/lib/components/Snackbar/index.d.ts +1 -0
  15. package/lib/components/TimeSlider/TimeSliderButtons/TimeSliderButtons.d.ts +0 -3
  16. package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.d.ts +4 -3
  17. package/lib/components/TimeSlider/TimeSliderButtons/TimeStepButton/TimeStepButton.stories.d.ts +9 -0
  18. package/lib/components/TimeSlider/TimeSliderConnect.stories.d.ts +6 -0
  19. package/lib/index.d.ts +4 -3
  20. package/lib/store/snackbar/types.d.ts +2 -4
  21. package/lib/storybookUtils/HelperComponents.d.ts +0 -1
  22. package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +34 -7
  23. package/package.json +5 -6
  24. package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +0 -4
package/index.esm.js CHANGED
@@ -6,15 +6,12 @@ import React__default, { Component, useRef, useState, useEffect } from 'react';
6
6
  import _, { isEqual, debounce, throttle, range } from 'lodash';
7
7
  import { takeLatest, put, select, call, all, takeEvery, delay } from 'redux-saga/effects';
8
8
  import { connect, useDispatch, useSelector, Provider } from 'react-redux';
9
- import { Tooltip, Paper, Typography, Grid, InputLabel, IconButton, Box, CircularProgress, List, ListSubheader, ListItem, ListItemText, Dialog, DialogTitle, DialogContent, DialogContentText, TextField, DialogActions, Button, MenuItem, FormControl, LinearProgress, InputAdornment, ListItemSecondaryAction, ListItemIcon, Checkbox, Switch, Slider, FormControlLabel, Popover, useMediaQuery, useTheme, SliderThumb } from '@mui/material';
9
+ import { Tooltip, Paper, Box, Typography, Grid, InputLabel, IconButton, CircularProgress, List, ListSubheader, ListItem, ListItemText, Dialog, DialogTitle, DialogContent, DialogContentText, TextField, DialogActions, Button, MenuItem, FormControl, LinearProgress, InputAdornment, ListItemSecondaryAction, ListItemIcon, Checkbox, Switch, styled, Slider, Menu, Popover, useTheme, SliderThumb, Snackbar } from '@mui/material';
10
10
  import { ToolButton, ToolContainerDraggable, TooltipSelect, AlertIcon, tooltipContainerStyles, sliderHeaderStyle, CustomSlider, ToggleMenu, ManagerButton, EnableButton, AlertBanner, ManagerDeleteButton, CustomToggleButton, useIsMounted } from '@opengeoweb/shared';
11
11
  import { Pause, Play, Cached, Add, Copy, Flag, DragHandle as DragHandle$1, Filter, Close, Search, Clear, ChevronLeft, ChevronRight, Edit, Delete, Home, Minus, Layers, Equalizer, Sort, Link, LinkOff, AutoUpdateActive, AutoUpdateInActive, TextIcon, FastForward, Options, SliderThumb as SliderThumb$1, List as List$1, ThemeWrapper, lightTheme } from '@opengeoweb/theme';
12
- import makeStyles from '@mui/styles/makeStyles';
13
12
  import { legendImageStore, WMImageEventType, getLegendGraphicURLForLayer, WMGetServiceFromStore, LayerType as LayerType$1, getMapImageStore, WMBBOX, debug, DebugType, WMJSMap, WMLayer } from '@opengeoweb/webmap';
14
13
  import { Sortable, ReactSortable } from 'react-sortablejs';
15
- import createStyles from '@mui/styles/createStyles';
16
14
  import { FixedSizeList } from 'react-window';
17
- import withStyles from '@mui/styles/withStyles';
18
15
  import { debounce as debounce$1 } from 'throttle-debounce';
19
16
  import cloneDeep from 'lodash.clonedeep';
20
17
  import proj4 from 'proj4';
@@ -4735,7 +4732,7 @@ var _snackbarAdapter$getS = snackbarAdapter.getSelectors(function (state) {
4735
4732
  };
4736
4733
  }),
4737
4734
  getCurrentSnackbarMessages = _snackbarAdapter$getS.selectAll;
4738
- createSelector(getCurrentSnackbarMessages, function (currentMessages) {
4735
+ var getFirstSnackbarMessage = createSelector(getCurrentSnackbarMessages, function (currentMessages) {
4739
4736
  return currentMessages.length > 0 ? currentMessages[0] : undefined;
4740
4737
  });
4741
4738
 
@@ -7063,43 +7060,7 @@ CanvasComponent.defaultProps = {
7063
7060
  };
7064
7061
 
7065
7062
  var defaultCanvasWidth = 150;
7066
- var defaultCanvasHeight = 30; // TODO: remove fontFamily styles after theming is fully implemented
7067
-
7068
- var useStyles$r = makeStyles(function (theme) {
7069
- return {
7070
- legendCanvas: {
7071
- margin: '10px 0px 10px 0px'
7072
- },
7073
- noLegendTitle: {
7074
- fontSize: '12px',
7075
- fontFamily: 'Roboto, Helvetica, Arial',
7076
- color: 'red'
7077
- },
7078
- legendComponent: {
7079
- padding: 10,
7080
- border: '1px solid grey',
7081
- display: 'inline-block',
7082
- backgroundColor: '#FFF',
7083
- overflow: 'hidden',
7084
- marginBottom: 4
7085
- },
7086
- legendTitle: {
7087
- fontFamily: 'Roboto, Helvetica, Arial',
7088
- fontSize: '10px',
7089
- minWidth: defaultCanvasWidth,
7090
- wordWrap: 'break-word',
7091
- color: theme.palette.common.black
7092
- },
7093
- legendInfo: {
7094
- fontFamily: 'Roboto, Helvetica, Arial',
7095
- fontSize: 10,
7096
- color: theme.palette.common.black,
7097
- overflowX: 'hidden',
7098
- minWidth: defaultCanvasWidth,
7099
- wordWrap: 'break-word'
7100
- }
7101
- };
7102
- });
7063
+ var defaultCanvasHeight = 30;
7103
7064
  /**
7104
7065
  * Renders a legendgraphic image based on a WMImage.
7105
7066
  *
@@ -7133,9 +7094,8 @@ var renderLegendGraphic = function renderLegendGraphic(wmImage, ctx, width, heig
7133
7094
 
7134
7095
  var Legend = function Legend(_ref) {
7135
7096
  var layer = _ref.layer;
7136
- var classes = useStyles$r();
7137
- /* Variable to remember the previous image */
7138
7097
 
7098
+ /* Variable to remember the previous image */
7139
7099
  var previousLegendImage = useRef(null);
7140
7100
  /* Function to force rerender of this component when legend image loads */
7141
7101
 
@@ -7182,23 +7142,36 @@ var Legend = function Legend(_ref) {
7182
7142
  var wmLayer = getWMLayerById(layer.id);
7183
7143
  return /*#__PURE__*/React__default.createElement(Paper, {
7184
7144
  "data-testid": "legend",
7185
- className: classes.legendComponent
7186
- }, /*#__PURE__*/React__default.createElement("div", {
7145
+ sx: {
7146
+ padding: '10px',
7147
+ border: '1px solid grey',
7148
+ display: 'inline-block',
7149
+ backgroundColor: '#FFF',
7150
+ overflow: 'hidden',
7151
+ marginBottom: 0.5
7152
+ }
7153
+ }, /*#__PURE__*/React__default.createElement(Box, {
7187
7154
  "data-testid": "legend-title",
7188
7155
  style: {
7189
7156
  maxWidth: canvasContainerWidth
7190
7157
  }
7191
7158
  }, /*#__PURE__*/React__default.createElement(Typography, {
7192
- className: classes.legendTitle,
7159
+ sx: {
7160
+ fontFamily: 'Roboto, Helvetica, Arial',
7161
+ fontSize: '10px',
7162
+ minWidth: "".concat(defaultCanvasWidth, "px"),
7163
+ wordWrap: 'break-word',
7164
+ color: 'common.black'
7165
+ },
7193
7166
  variant: "h3"
7194
7167
  }, wmLayer && wmLayer.title)), /*#__PURE__*/React__default.createElement(Tooltip, {
7195
7168
  title: wmLayer && wmLayer.title || 'loading',
7196
7169
  placement: "top"
7197
- }, /*#__PURE__*/React__default.createElement("div", {
7198
- className: classes.legendCanvas,
7199
- style: {
7200
- height: canvasContainerHeight,
7201
- width: canvasContainerWidth
7170
+ }, /*#__PURE__*/React__default.createElement(Box, {
7171
+ sx: {
7172
+ margin: '10px 0px 10px 0px',
7173
+ height: "".concat(canvasContainerHeight, "px"),
7174
+ width: "".concat(canvasContainerWidth, "px")
7202
7175
  }
7203
7176
  }, /*#__PURE__*/React__default.createElement(CanvasComponent, {
7204
7177
  redrawInterval: 500,
@@ -7255,16 +7228,21 @@ var Legend = function Legend(_ref) {
7255
7228
  renderLegendGraphic(previousLegendImage.current, ctx, imageWidth, imageHeight);
7256
7229
  }
7257
7230
  }
7258
- }))), /*#__PURE__*/React__default.createElement("div", {
7231
+ }))), /*#__PURE__*/React__default.createElement(Box, {
7259
7232
  "data-testid": "legend-info",
7260
- className: classes.legendInfo,
7261
- style: {
7262
- maxWidth: canvasContainerWidth
7233
+ sx: {
7234
+ fontFamily: 'Roboto, Helvetica, Arial',
7235
+ fontSize: 10,
7236
+ color: 'common.black',
7237
+ overflowX: 'hidden',
7238
+ minWidth: "".concat(defaultCanvasWidth, "px"),
7239
+ wordWrap: 'break-word',
7240
+ maxWidth: "".concat(canvasContainerWidth, "px")
7263
7241
  }
7264
7242
  }, layer.dimensions && layer.dimensions.map(function (dim) {
7265
- return /*#__PURE__*/React__default.createElement("div", {
7243
+ return /*#__PURE__*/React__default.createElement(Box, {
7266
7244
  key: layer.name + dim.name
7267
- }, dim.name === 'time' ? "".concat(dim.currentValue) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7245
+ }, dim.name === 'time' ? "".concat(dim.currentValue) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
7268
7246
  style: {
7269
7247
  fontWeight: 500
7270
7248
  }
@@ -7285,23 +7263,9 @@ var Legend = function Legend(_ref) {
7285
7263
  * See the License for the specific language governing permissions and
7286
7264
  * limitations under the License.
7287
7265
  *
7288
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7289
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
7266
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7267
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7290
7268
  * */
7291
- var useStyles$q = makeStyles(function () {
7292
- return {
7293
- legendList: {
7294
- display: 'flex',
7295
- flexDirection: 'column',
7296
- '&>div:last-child': {
7297
- marginBottom: 0
7298
- }
7299
- },
7300
- legendContainer: {
7301
- padding: 4
7302
- }
7303
- };
7304
- });
7305
7269
 
7306
7270
  var LegendDialog = function LegendDialog(_ref) {
7307
7271
  var layers = _ref.layers,
@@ -7316,7 +7280,6 @@ var LegendDialog = function LegendDialog(_ref) {
7316
7280
  order = _ref$order === void 0 ? 0 : _ref$order,
7317
7281
  _ref$source = _ref.source,
7318
7282
  source = _ref$source === void 0 ? 'app' : _ref$source;
7319
- var classes = useStyles$q();
7320
7283
  return /*#__PURE__*/React.createElement(ToolContainerDraggable, {
7321
7284
  startPosition: {
7322
7285
  right: 20,
@@ -7333,11 +7296,19 @@ var LegendDialog = function LegendDialog(_ref) {
7333
7296
  onMouseDown: onMouseDown,
7334
7297
  order: order,
7335
7298
  source: source
7336
- }, /*#__PURE__*/React.createElement("div", {
7337
- className: classes.legendContainer
7338
- }, layers && layers.length > 0 ? /*#__PURE__*/React.createElement("div", {
7299
+ }, /*#__PURE__*/React.createElement(Box, {
7300
+ sx: {
7301
+ padding: 0.5
7302
+ }
7303
+ }, layers && layers.length > 0 ? /*#__PURE__*/React.createElement(Box, {
7339
7304
  "data-testid": "LegendList",
7340
- className: classes.legendList
7305
+ sx: {
7306
+ display: 'flex',
7307
+ flexDirection: 'column',
7308
+ '&>div:last-child': {
7309
+ marginBottom: 0
7310
+ }
7311
+ }
7341
7312
  }, layers.map(function (layer) {
7342
7313
  return /*#__PURE__*/React.createElement(Legend, {
7343
7314
  key: layer.id,
@@ -8405,7 +8376,7 @@ function openSnackbarSaga(capturedAction) {
8405
8376
  while (1) {
8406
8377
  switch (_context.prev = _context.next) {
8407
8378
  case 0:
8408
- snackbarMessage = capturedAction.payload.snackbarContent.message;
8379
+ snackbarMessage = capturedAction.payload.message;
8409
8380
  _context.next = 3;
8410
8381
  return select(getCurrentSnackbarMessages);
8411
8382
 
@@ -9041,23 +9012,6 @@ var defaultConfigurations = /*#__PURE__*/Object.freeze({
9041
9012
  preloadedDefaultMapServices: preloadedDefaultMapServices
9042
9013
  });
9043
9014
 
9044
- var useStyles$p = makeStyles({
9045
- buttonDiv: {
9046
- position: 'relative'
9047
- },
9048
- loadingButton: {
9049
- position: 'absolute',
9050
- top: 7,
9051
- left: 7,
9052
- zIndex: 1
9053
- },
9054
- button: {
9055
- width: '24px',
9056
- height: '24px',
9057
- margin: '6px 0px 0px 10px'
9058
- }
9059
- });
9060
-
9061
9015
  var validateServiceUrl = function validateServiceUrl(url) {
9062
9016
  if (url === '' || url === null || typeof url === 'undefined') return false;
9063
9017
  var matcher = /^(?:\w+:)?\/\/([^\s.]+\.\S{2}|[0-9a-zA-Z]+[:?\d]*)\S*$/;
@@ -9074,7 +9028,6 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
9074
9028
  handleClose = _ref.handleClose,
9075
9029
  _ref$layerType = _ref.layerType,
9076
9030
  layerType = _ref$layerType === void 0 ? LayerType.mapLayer : _ref$layerType;
9077
- var classes = useStyles$p();
9078
9031
 
9079
9032
  var _React$useState = React.useState(''),
9080
9033
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -9196,7 +9149,9 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
9196
9149
  })), /*#__PURE__*/React.createElement(Grid, {
9197
9150
  item: true,
9198
9151
  xs: 2,
9199
- className: classes.buttonDiv
9152
+ sx: {
9153
+ position: 'relative'
9154
+ }
9200
9155
  }, /*#__PURE__*/React.createElement(IconButton, {
9201
9156
  "data-testid": "add-service",
9202
9157
  onClick: handleAddServiceURL,
@@ -9204,7 +9159,12 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
9204
9159
  size: "large"
9205
9160
  }, /*#__PURE__*/React.createElement(Add, null)), loading && /*#__PURE__*/React.createElement(CircularProgress, {
9206
9161
  size: 35,
9207
- className: classes.loadingButton
9162
+ sx: {
9163
+ position: 'absolute',
9164
+ top: '7px',
9165
+ left: '7px',
9166
+ zIndex: 1
9167
+ }
9208
9168
  })))), /*#__PURE__*/React.createElement(Box, {
9209
9169
  m: 2
9210
9170
  }, /*#__PURE__*/React.createElement(Grid, {
@@ -9232,7 +9192,7 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
9232
9192
  }, "Close")));
9233
9193
  };
9234
9194
 
9235
- var styles$2 = {
9195
+ var styles$4 = {
9236
9196
  buttonDiv: {
9237
9197
  position: 'relative'
9238
9198
  },
@@ -9295,7 +9255,7 @@ var AddLayersButton = function AddLayersButton(_ref) {
9295
9255
  onBlur: onBlurTooltip
9296
9256
  }, /*#__PURE__*/React.createElement(IconButton, {
9297
9257
  onClick: handleClose,
9298
- sx: styles$2.button,
9258
+ sx: styles$4.button,
9299
9259
  disableRipple: true,
9300
9260
  "data-testid": "addLayersButton",
9301
9261
  ref: ref,
@@ -9322,12 +9282,12 @@ var AddLayersButton = function AddLayersButton(_ref) {
9322
9282
  * See the License for the specific language governing permissions and
9323
9283
  * limitations under the License.
9324
9284
  *
9325
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9326
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
9285
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9286
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9327
9287
  * */
9328
9288
  var iconButtonSize = 30;
9329
9289
  var totalButtons = 5;
9330
- var LayerManagerColumnsLarge = makeStyles({
9290
+ var LayerManagerColumnsLarge = {
9331
9291
  column1: {
9332
9292
  width: iconButtonSize * 3,
9333
9293
  display: 'flex'
@@ -9351,8 +9311,8 @@ var LayerManagerColumnsLarge = makeStyles({
9351
9311
  columns35: {
9352
9312
  width: "calc((100% - ".concat(iconButtonSize * totalButtons, "px) * 0.75)")
9353
9313
  }
9354
- });
9355
- var LayerManagerColumnsSmall = makeStyles({
9314
+ };
9315
+ var LayerManagerColumnsSmall = {
9356
9316
  column1: {
9357
9317
  width: iconButtonSize * 3
9358
9318
  },
@@ -9375,7 +9335,7 @@ var LayerManagerColumnsSmall = makeStyles({
9375
9335
  columns35: {
9376
9336
  display: 'none'
9377
9337
  }
9378
- });
9338
+ };
9379
9339
  var LayerManagerWidth;
9380
9340
 
9381
9341
  (function (LayerManagerWidth) {
@@ -9455,10 +9415,10 @@ var LayerSelectButtonConnect = function LayerSelectButtonConnect(_ref) {
9455
9415
  * See the License for the specific language governing permissions and
9456
9416
  * limitations under the License.
9457
9417
  *
9458
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9459
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
9418
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9419
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9460
9420
  * */
9461
- var useStyles$o = makeStyles({
9421
+ var styles$3 = {
9462
9422
  row: {
9463
9423
  height: '32px'
9464
9424
  },
@@ -9469,7 +9429,7 @@ var useStyles$o = makeStyles({
9469
9429
  fontFamily: 'Roboto',
9470
9430
  opacity: 0.67
9471
9431
  }
9472
- });
9432
+ };
9473
9433
 
9474
9434
  var DescriptionRow = function DescriptionRow(_ref) {
9475
9435
  var mapId = _ref.mapId,
@@ -9482,16 +9442,15 @@ var DescriptionRow = function DescriptionRow(_ref) {
9482
9442
  layerManagerWidth = _ref.layerManagerWidth,
9483
9443
  _ref$layerSelect = _ref.layerSelect,
9484
9444
  layerSelect = _ref$layerSelect === void 0 ? false : _ref$layerSelect;
9485
- var classes = useStyles$o();
9486
- var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
9445
+ var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
9487
9446
  return /*#__PURE__*/React.createElement(Grid, {
9488
9447
  container: true,
9489
9448
  item: true,
9490
9449
  "data-testid": "descriptionRow",
9491
- className: classes.row
9450
+ sx: styles$3.row
9492
9451
  }, /*#__PURE__*/React.createElement(Grid, {
9493
9452
  item: true,
9494
- className: columnSizes.column1
9453
+ sx: columnSizes.column1
9495
9454
  }, /*#__PURE__*/React.createElement(AddLayersButton, {
9496
9455
  preloadedServices: preloadedServices,
9497
9456
  tooltip: tooltip,
@@ -9506,23 +9465,23 @@ var DescriptionRow = function DescriptionRow(_ref) {
9506
9465
  }), layerSelect && /*#__PURE__*/React.createElement(LayerSelectButtonConnect, {
9507
9466
  mapId: mapId
9508
9467
  })), /*#__PURE__*/React.createElement(Grid, {
9509
- className: columnSizes.column2
9510
- }, /*#__PURE__*/React.createElement("div", {
9511
- className: classes.text
9468
+ sx: columnSizes.column2
9469
+ }, /*#__PURE__*/React.createElement(Box, {
9470
+ sx: styles$3.text
9512
9471
  }, "Layer")), /*#__PURE__*/React.createElement(Grid, {
9513
- className: columnSizes.column3
9514
- }, /*#__PURE__*/React.createElement("div", {
9515
- className: classes.text
9472
+ sx: columnSizes.column3
9473
+ }, /*#__PURE__*/React.createElement(Box, {
9474
+ sx: styles$3.text
9516
9475
  }, "Style")), /*#__PURE__*/React.createElement(Grid, {
9517
- className: columnSizes.column4
9518
- }, /*#__PURE__*/React.createElement("div", {
9519
- className: classes.text
9476
+ sx: columnSizes.column4
9477
+ }, /*#__PURE__*/React.createElement(Box, {
9478
+ sx: styles$3.text
9520
9479
  }, "Opacity")), /*#__PURE__*/React.createElement(Grid, {
9521
- className: columnSizes.column5
9522
- }, /*#__PURE__*/React.createElement("div", {
9523
- className: classes.text
9480
+ sx: columnSizes.column5
9481
+ }, /*#__PURE__*/React.createElement(Box, {
9482
+ sx: styles$3.text
9524
9483
  }, "Dimensions")), /*#__PURE__*/React.createElement(Grid, {
9525
- className: columnSizes.column6
9484
+ sx: columnSizes.column6
9526
9485
  }));
9527
9486
  };
9528
9487
 
@@ -9674,22 +9633,6 @@ var DimensionSelect = function DimensionSelect(_ref) {
9674
9633
  }))));
9675
9634
  };
9676
9635
 
9677
- var useStyles$n = makeStyles(function (theme) {
9678
- return createStyles({
9679
- dropdownEmpty: {
9680
- paddingLeft: 8,
9681
- height: 32,
9682
- display: 'inline-flex',
9683
- alignItems: 'center'
9684
- },
9685
- emptyText: {
9686
- fontSize: theme.palette.geowebColors.layerManager.tableRowDefaultText.fontSize,
9687
- color: theme.palette.geowebColors.layerManager.tableRowDefaultText.rgba,
9688
- fontWeight: 500
9689
- }
9690
- });
9691
- });
9692
-
9693
9636
  var getRenderLayersValues = function getRenderLayersValues(layerName, layers) {
9694
9637
  var serviceLayer = layers.find(function (l) {
9695
9638
  return l.name === layerName;
@@ -9727,14 +9670,21 @@ var RenderLayers = function RenderLayers(_ref) {
9727
9670
 
9728
9671
  var _a;
9729
9672
 
9730
- var classes = useStyles$n();
9731
-
9732
9673
  if (!layers || !layers.length) {
9733
- return /*#__PURE__*/React.createElement("div", {
9734
- className: classes.dropdownEmpty
9674
+ return /*#__PURE__*/React.createElement(Box, {
9675
+ sx: {
9676
+ paddingLeft: 1,
9677
+ height: '32px',
9678
+ display: 'inline-flex',
9679
+ alignItems: 'center'
9680
+ }
9735
9681
  }, /*#__PURE__*/React.createElement(Typography, {
9736
9682
  variant: "body1",
9737
- className: classes.emptyText
9683
+ sx: {
9684
+ fontSize: 'geowebColors.layerManager.tableRowDefaultText.fontSize',
9685
+ color: 'geowebColors.layerManager.tableRowDefaultText.rgba',
9686
+ fontWeight: 500
9687
+ }
9738
9688
  }, "No service available"));
9739
9689
  }
9740
9690
 
@@ -9793,34 +9743,6 @@ var RenderLayers = function RenderLayers(_ref) {
9793
9743
  }));
9794
9744
  };
9795
9745
 
9796
- var useStyles$m = makeStyles(function (theme) {
9797
- return {
9798
- opacityDiv: {
9799
- height: 'calc(100% - 5px)',
9800
- width: '100%',
9801
- position: 'relative',
9802
- top: '2px'
9803
- },
9804
- opacityButton: {
9805
- height: '100%',
9806
- width: '100%',
9807
- borderRadius: '0',
9808
- minWidth: '49px'
9809
- },
9810
- sliderBackground: {
9811
- padding: '0 0 60px 0',
9812
- marginLeft: '60px',
9813
- backgroundColor: theme.palette.geowebColors.background.surface,
9814
- width: '82px',
9815
- height: '248px',
9816
- position: 'fixed',
9817
- top: '-5px',
9818
- boxSizing: 'initial',
9819
- zIndex: 2,
9820
- boxShadow: theme.shadows[8]
9821
- }
9822
- };
9823
- });
9824
9746
  var marks$1 = [{
9825
9747
  value: 0,
9826
9748
  label: '0 %'
@@ -9853,7 +9775,6 @@ var OpacitySelect = function OpacitySelect(_ref) {
9853
9775
  onLayerChangeOpacity = _ref.onLayerChangeOpacity,
9854
9776
  _ref$isEnabled = _ref.isEnabled,
9855
9777
  isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
9856
- var classes = useStyles$m();
9857
9778
 
9858
9779
  var _React$useState = React.useState(false),
9859
9780
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -9898,10 +9819,15 @@ var OpacitySelect = function OpacitySelect(_ref) {
9898
9819
  setTooltipOpen(false);
9899
9820
  }, []);
9900
9821
  var currentOpacityText = "".concat(Math.round(currentOpacity * 100), " %");
9901
- return /*#__PURE__*/React.createElement("div", {
9902
- className: classes.opacityDiv,
9822
+ return /*#__PURE__*/React.createElement(Box, {
9903
9823
  onWheel: onWheel,
9904
- "data-testid": "scrollOpacity"
9824
+ "data-testid": "scrollOpacity",
9825
+ sx: {
9826
+ height: 'calc(100% - 5px)',
9827
+ width: '100%',
9828
+ position: 'relative',
9829
+ top: '2px'
9830
+ }
9905
9831
  }, /*#__PURE__*/React.createElement(Tooltip, {
9906
9832
  title: "Opacity: ".concat(currentOpacityText),
9907
9833
  sx: tooltipContainerStyles(isEnabled),
@@ -9909,16 +9835,32 @@ var OpacitySelect = function OpacitySelect(_ref) {
9909
9835
  open: tooltipOpen
9910
9836
  }, /*#__PURE__*/React.createElement(Button, {
9911
9837
  tabIndex: 0,
9912
- className: classes.opacityButton,
9913
9838
  onClick: onClickButton,
9914
9839
  "data-testid": "selectOpacity",
9915
9840
  disableRipple: true,
9916
9841
  onMouseEnter: onMouseEnter,
9917
9842
  onMouseLeave: onMouseLeave,
9918
9843
  onFocus: onFocus,
9919
- onBlur: onBlur
9920
- }, currentOpacityText)), open ? /*#__PURE__*/React.createElement("div", {
9921
- className: classes.sliderBackground
9844
+ onBlur: onBlur,
9845
+ style: {
9846
+ height: '100%',
9847
+ width: '100%',
9848
+ borderRadius: '0',
9849
+ minWidth: '49px'
9850
+ }
9851
+ }, currentOpacityText)), open ? /*#__PURE__*/React.createElement(Box, {
9852
+ sx: {
9853
+ padding: '0 0 60px 0',
9854
+ marginLeft: '60px',
9855
+ backgroundColor: 'geowebColors.background.surface',
9856
+ width: '82px',
9857
+ height: '248px',
9858
+ position: 'fixed',
9859
+ top: '-5px',
9860
+ boxSizing: 'initial',
9861
+ zIndex: 2,
9862
+ boxShadow: 8
9863
+ }
9922
9864
  }, /*#__PURE__*/React.createElement(Box, {
9923
9865
  sx: sliderHeaderStyle
9924
9866
  }, "Opacity"), /*#__PURE__*/React.createElement(CustomSlider, {
@@ -10119,31 +10061,9 @@ var ActivateLayer = function ActivateLayer(_ref) {
10119
10061
  * See the License for the specific language governing permissions and
10120
10062
  * limitations under the License.
10121
10063
  *
10122
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10123
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
10064
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10065
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
10124
10066
  * */
10125
- var useStyles$l = makeStyles(function (theme) {
10126
- return createStyles({
10127
- row: {
10128
- background: function background(isEnabled) {
10129
- return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.fill : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.fill;
10130
- },
10131
- border: function border(isEnabled) {
10132
- return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.border : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.border;
10133
- },
10134
- borderRadius: theme.shape.borderRadius,
10135
- marginBottom: 4,
10136
- height: 34,
10137
- '&.sortable-drag': {
10138
- boxShadow: theme.shadows[4] // elevation_06
10139
-
10140
- },
10141
- '&.sortable-ghost': {
10142
- opacity: 0.5
10143
- }
10144
- }
10145
- });
10146
- });
10147
10067
 
10148
10068
  var LayerRow = function LayerRow(_ref) {
10149
10069
  var layerId = _ref.layerId,
@@ -10175,21 +10095,33 @@ var LayerRow = function LayerRow(_ref) {
10175
10095
  layerActiveLayout = _ref.layerActiveLayout,
10176
10096
  layerManagerWidth = _ref.layerManagerWidth,
10177
10097
  dragHandle = _ref.dragHandle;
10178
- var classes = useStyles$l(isEnabled);
10179
- var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
10098
+ var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
10180
10099
 
10181
10100
  var onClickRow = function onClickRow() {
10182
10101
  return onLayerRowClick(layerId);
10183
10102
  };
10184
10103
 
10185
10104
  return /*#__PURE__*/React__default.createElement(Grid, {
10186
- className: classes.row,
10187
10105
  item: true,
10188
10106
  container: true,
10189
- "data-testid": "layerRow-".concat(layerId)
10107
+ "data-testid": "layerRow-".concat(layerId),
10108
+ sx: {
10109
+ backgroundColor: isEnabled ? 'geowebColors.layerManager.tableRowDefaultCardContainer.fill' : 'geowebColors.layerManager.tableRowDisabledCardContainer.fill',
10110
+ border: 1,
10111
+ borderColor: isEnabled ? 'geowebColors.layerManager.tableRowDefaultCardContainer.borderColor' : 'geowebColors.layerManager.tableRowDisabledCardContainer.borderColor',
10112
+ borderRadius: 1,
10113
+ marginBottom: 0.5,
10114
+ height: '34px',
10115
+ '&.sortable-drag': {
10116
+ boxShadow: 4
10117
+ },
10118
+ '&.sortable-ghost': {
10119
+ opacity: 0.5
10120
+ }
10121
+ }
10190
10122
  }, /*#__PURE__*/React__default.createElement(Grid, {
10191
10123
  item: true,
10192
- className: columnSizes.column1
10124
+ sx: columnSizes.column1
10193
10125
  }, dragHandle, layerEnableLayout || /*#__PURE__*/React__default.createElement(EnableButton, {
10194
10126
  isEnabled: layer.enabled,
10195
10127
  title: layer.name,
@@ -10203,7 +10135,7 @@ var LayerRow = function LayerRow(_ref) {
10203
10135
  onClickActivate: onClickRow
10204
10136
  })), /*#__PURE__*/React__default.createElement(Grid, {
10205
10137
  item: true,
10206
- className: "".concat(columnSizes.column2)
10138
+ sx: columnSizes.column2
10207
10139
  }, layerServicesLayout || /*#__PURE__*/React__default.createElement(RenderLayers, {
10208
10140
  layerName: layer.name,
10209
10141
  layers: services && layer.service && services[layer.service] && services[layer.service].layers || [],
@@ -10215,13 +10147,13 @@ var LayerRow = function LayerRow(_ref) {
10215
10147
  }
10216
10148
  })), isLayerMissing ? /*#__PURE__*/React__default.createElement(Grid, {
10217
10149
  item: true,
10218
- className: "".concat(columnSizes.columns35)
10150
+ sx: columnSizes.columns35
10219
10151
  }, /*#__PURE__*/React__default.createElement(AlertBanner, {
10220
10152
  title: "This layer could not be loaded: does not exist on the server.",
10221
10153
  isCompact: true
10222
10154
  })) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Grid, {
10223
10155
  item: true,
10224
- className: "".concat(columnSizes.column3)
10156
+ sx: columnSizes.column3
10225
10157
  }, layerStylesLayout || /*#__PURE__*/React__default.createElement(RenderStyles, {
10226
10158
  layerStyles: layer.styles,
10227
10159
  currentLayerStyle: layer.style,
@@ -10233,7 +10165,7 @@ var LayerRow = function LayerRow(_ref) {
10233
10165
  }
10234
10166
  })), /*#__PURE__*/React__default.createElement(Grid, {
10235
10167
  item: true,
10236
- className: "".concat(columnSizes.column4)
10168
+ sx: columnSizes.column4
10237
10169
  }, layerOpacityLayout || /*#__PURE__*/React__default.createElement(OpacitySelect, {
10238
10170
  currentOpacity: layer.opacity,
10239
10171
  onLayerChangeOpacity: function onLayerChangeOpacity(_opacity) {
@@ -10244,7 +10176,7 @@ var LayerRow = function LayerRow(_ref) {
10244
10176
  }
10245
10177
  })), /*#__PURE__*/React__default.createElement(Grid, {
10246
10178
  item: true,
10247
- className: "".concat(columnSizes.column5)
10179
+ sx: columnSizes.column5
10248
10180
  }, layerDimensionLayout || /*#__PURE__*/React__default.createElement(DimensionSelect, {
10249
10181
  layerId: layerId,
10250
10182
  layerDimensions: filterNonTimeDimensions(layer.dimensions),
@@ -10262,7 +10194,7 @@ var LayerRow = function LayerRow(_ref) {
10262
10194
  }
10263
10195
  }))), /*#__PURE__*/React__default.createElement(Grid, {
10264
10196
  item: true,
10265
- className: columnSizes.column6
10197
+ sx: columnSizes.column6
10266
10198
  }, layerDeleteLayout || /*#__PURE__*/React__default.createElement(ManagerDeleteButton, {
10267
10199
  tooltipTitle: "Delete",
10268
10200
  onClickDelete: function onClickDelete() {
@@ -10817,22 +10749,6 @@ var DragHandle = function DragHandle(_ref) {
10817
10749
  });
10818
10750
  };
10819
10751
 
10820
- var useStyles$k = makeStyles(function () {
10821
- return {
10822
- layerRows: {
10823
- width: '100%',
10824
- maxHeight: 'calc(100% - 10px)',
10825
- overflow: 'auto'
10826
- },
10827
- sortableRow: {
10828
- width: '100%',
10829
- cursor: function cursor(isSorting) {
10830
- return isSorting ? 'grabbing' : 'inherit';
10831
- }
10832
- }
10833
- };
10834
- });
10835
-
10836
10752
  var LayerContainerRow = function LayerContainerRow(_ref) {
10837
10753
  var mapId = _ref.mapId,
10838
10754
  layerManagerWidth = _ref.layerManagerWidth;
@@ -10890,7 +10806,6 @@ var LayerContainerRow = function LayerContainerRow(_ref) {
10890
10806
 
10891
10807
  var isSorting = activeDragIndex !== null;
10892
10808
  var isDragDisabled = layerIds.length === 1;
10893
- var classes = useStyles$k(isSorting);
10894
10809
 
10895
10810
  var keyPressedTrue = function keyPressedTrue(event) {
10896
10811
  if (event.ctrlKey || event.metaKey) {
@@ -10930,8 +10845,12 @@ var LayerContainerRow = function LayerContainerRow(_ref) {
10930
10845
  return /*#__PURE__*/React.createElement(Grid, {
10931
10846
  container: true,
10932
10847
  item: true,
10933
- className: classes.layerRows,
10934
- "data-testid": "layerContainerRow"
10848
+ "data-testid": "layerContainerRow",
10849
+ sx: {
10850
+ width: '100%',
10851
+ maxHeight: 'calc(100% - 10px)',
10852
+ overflow: 'auto'
10853
+ }
10935
10854
  }, /*#__PURE__*/React.createElement(ReactSortable, {
10936
10855
  tag: "div",
10937
10856
  list: layerIds.map(function (layerId) {
@@ -10946,9 +10865,12 @@ var LayerContainerRow = function LayerContainerRow(_ref) {
10946
10865
  direction: "vertical",
10947
10866
  // hover props
10948
10867
  forceFallback: true,
10949
- className: classes.sortableRow,
10950
10868
  onStart: onStart,
10951
- onEnd: onEnd
10869
+ onEnd: onEnd,
10870
+ style: {
10871
+ width: '100%',
10872
+ cursor: isSorting ? 'grabbing' : 'inherit'
10873
+ }
10952
10874
  }, layerIds.map(function (layerId, index) {
10953
10875
  return /*#__PURE__*/React.createElement(LayerRowConnect, {
10954
10876
  mapId: mapId,
@@ -11150,22 +11072,9 @@ var BaseLayersConnect = function BaseLayersConnect(_ref) {
11150
11072
  * See the License for the specific language governing permissions and
11151
11073
  * limitations under the License.
11152
11074
  *
11153
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11154
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
11075
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11076
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
11155
11077
  * */
11156
- var useStyles$j = makeStyles({
11157
- layerRow: {
11158
- width: '100%',
11159
- height: '36px'
11160
- },
11161
- icon: {
11162
- width: '24px',
11163
- height: '24px'
11164
- },
11165
- addBaseLayers: {
11166
- marginTop: '-2px'
11167
- }
11168
- });
11169
11078
 
11170
11079
  var BaseLayerRow = function BaseLayerRow(_ref) {
11171
11080
  var mapId = _ref.mapId,
@@ -11176,16 +11085,20 @@ var BaseLayerRow = function BaseLayerRow(_ref) {
11176
11085
  layerManagerWidth = _ref.layerManagerWidth,
11177
11086
  _ref$tooltip = _ref.tooltip,
11178
11087
  tooltip = _ref$tooltip === void 0 ? '' : _ref$tooltip;
11179
- var classes = useStyles$j();
11180
- var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
11088
+ var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
11181
11089
  return /*#__PURE__*/React.createElement(Grid, {
11182
11090
  container: true,
11183
11091
  item: true,
11184
- className: classes.layerRow,
11185
- "data-testid": "baseLayerRow"
11092
+ "data-testid": "baseLayerRow",
11093
+ sx: {
11094
+ width: '100%',
11095
+ height: '36px'
11096
+ }
11186
11097
  }, /*#__PURE__*/React.createElement(Grid, {
11187
11098
  item: true,
11188
- className: "".concat(columnSizes.column1, " ").concat(classes.addBaseLayers)
11099
+ sx: Object.assign(Object.assign({}, columnSizes.column1), {
11100
+ marginTop: '-2px'
11101
+ })
11189
11102
  }, /*#__PURE__*/React.createElement(AddLayersButton, {
11190
11103
  preloadedServices: preloadedServices,
11191
11104
  tooltip: tooltip,
@@ -11198,14 +11111,14 @@ var BaseLayerRow = function BaseLayerRow(_ref) {
11198
11111
  }
11199
11112
  })), /*#__PURE__*/React.createElement(Grid, {
11200
11113
  item: true,
11201
- className: "".concat(columnSizes.column2)
11114
+ sx: columnSizes.column2
11202
11115
  }, /*#__PURE__*/React.createElement(BaseLayersConnect, {
11203
11116
  mapId: mapId,
11204
11117
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers
11205
11118
  })));
11206
11119
  };
11207
11120
 
11208
- var styles$1 = {
11121
+ var styles$2 = {
11209
11122
  layerRowContainer: {
11210
11123
  position: 'relative',
11211
11124
  width: '100%',
@@ -11278,7 +11191,7 @@ var LayerManager = function LayerManager(_ref) {
11278
11191
  source: source,
11279
11192
  leftComponent: leftComponent
11280
11193
  }, /*#__PURE__*/React.createElement(Box, {
11281
- sx: styles$1.layerManagerContainer
11194
+ sx: styles$2.layerManagerContainer
11282
11195
  }, isLoading && /*#__PURE__*/React.createElement(LinearProgress, {
11283
11196
  "data-testid": "loading-bar",
11284
11197
  color: "secondary",
@@ -11296,7 +11209,7 @@ var LayerManager = function LayerManager(_ref) {
11296
11209
  }), /*#__PURE__*/React.createElement(Grid, {
11297
11210
  container: true,
11298
11211
  "data-testid": "layerManagerRowContainer",
11299
- sx: styles$1.layerRowContainer
11212
+ sx: styles$2.layerRowContainer
11300
11213
  }, /*#__PURE__*/React.createElement(DescriptionRow, {
11301
11214
  mapId: mapId,
11302
11215
  tooltip: showAddLayersTooltip ? 'Add layers' : '',
@@ -12372,73 +12285,9 @@ var ServiceChipConnect = function ServiceChipConnect(_ref) {
12372
12285
  });
12373
12286
  };
12374
12287
 
12375
- var useStyles$i = makeStyles(function (theme) {
12376
- return createStyles({
12377
- serviceChips: {
12378
- width: '100%',
12379
- display: 'inline-flex',
12380
- alignItems: 'center',
12381
- overflowX: 'visible',
12382
- "float": 'left',
12383
- paddingLeft: '40px',
12384
- marginRight: function marginRight(_ref) {
12385
- var margin = _ref.margin;
12386
- return margin;
12387
- },
12388
- marginLeft: function marginLeft(_ref2) {
12389
- var margin = _ref2.margin;
12390
- return -margin;
12391
- },
12392
- maxWidth: function maxWidth(_ref3) {
12393
- var maxWidthValue = _ref3.maxWidthValue;
12394
- return maxWidthValue;
12395
- },
12396
- fontSize: '0.875rem'
12397
- },
12398
- scrollArrowLeft: {
12399
- width: '100px',
12400
- marginBottom: '-12px',
12401
- height: '34px',
12402
- backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), ".concat(theme.palette.geowebColors.background.surfaceApp, " 51%)"),
12403
- cursor: 'pointer',
12404
- marginRight: '-120px',
12405
- paddingTop: '6px',
12406
- paddingBottom: '6px',
12407
- "float": 'left',
12408
- zIndex: 1,
12409
- position: 'relative',
12410
- color: theme.palette.geowebColors.buttons.tertiary["default"].color,
12411
- '&:hover': {
12412
- color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
12413
- }
12414
- },
12415
- serviceList: {
12416
- height: '32px',
12417
- marginTop: '8px',
12418
- width: '100%',
12419
- overflow: 'hidden'
12420
- },
12421
- scrollArrowRight: {
12422
- width: '100px',
12423
- marginBottom: '-12px',
12424
- height: '34px',
12425
- paddingTop: '6px',
12426
- paddingBottom: '6px',
12427
- backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), ".concat(theme.palette.geowebColors.background.surfaceApp, " 51%)"),
12428
- right: '0px',
12429
- position: 'fixed',
12430
- cursor: 'pointer',
12431
- color: theme.palette.geowebColors.buttons.tertiary["default"].color,
12432
- '&:hover': {
12433
- color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
12434
- }
12435
- }
12436
- });
12437
- });
12438
-
12439
- var ServiceList = function ServiceList(_ref4) {
12440
- var layerSelectWidth = _ref4.layerSelectWidth,
12441
- activeServices = _ref4.activeServices;
12288
+ var ServiceList = function ServiceList(_ref) {
12289
+ var layerSelectWidth = _ref.layerSelectWidth,
12290
+ activeServices = _ref.activeServices;
12442
12291
 
12443
12292
  var _React$useState = React.useState(0),
12444
12293
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -12458,10 +12307,6 @@ var ServiceList = function ServiceList(_ref4) {
12458
12307
  var ref = React.useRef(null);
12459
12308
  var scrollSpeed = 5;
12460
12309
  var maxWidthValue = ref && ref.current && ref.current.scrollWidth && ref.current.scrollWidth >= layerSelectWidth - margin && ref.current.scrollWidth || layerSelectWidth - 50;
12461
- var classes = useStyles$i({
12462
- margin: margin,
12463
- maxWidthValue: maxWidthValue
12464
- });
12465
12310
 
12466
12311
  var onMouseWheelScroll = function onMouseWheelScroll(e) {
12467
12312
  var delta = e.deltaY;
@@ -12508,17 +12353,52 @@ var ServiceList = function ServiceList(_ref4) {
12508
12353
  var isAllSelected = Object.values(activeServices).every(function (activeService) {
12509
12354
  return activeService.enabled;
12510
12355
  });
12511
- return /*#__PURE__*/React.createElement("div", {
12512
- className: classes.serviceList,
12356
+ return /*#__PURE__*/React.createElement(Box, {
12357
+ sx: {
12358
+ height: '32px',
12359
+ marginTop: '8px',
12360
+ width: '100%',
12361
+ overflow: 'hidden'
12362
+ },
12513
12363
  "data-testid": "serviceList",
12514
12364
  onWheel: onMouseWheelScroll
12515
12365
  }, margin !== 0 && /*#__PURE__*/React.createElement(ChevronLeft, {
12516
- className: classes.scrollArrowLeft,
12517
12366
  onMouseDown: onLeftChevronPressed,
12518
12367
  onMouseUp: onChevronMouseUp,
12519
- "data-testid": "leftScrollArrow"
12520
- }), /*#__PURE__*/React.createElement("div", {
12521
- className: classes.serviceChips,
12368
+ "data-testid": "leftScrollArrow",
12369
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12370
+ sx: function sx(theme) {
12371
+ return {
12372
+ width: '100px',
12373
+ marginBottom: '-12px',
12374
+ height: '34px',
12375
+ backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), ".concat(theme.palette.geowebColors.background.surfaceApp, " 51%)"),
12376
+ cursor: 'pointer',
12377
+ marginRight: '-120px',
12378
+ paddingTop: '6px',
12379
+ paddingBottom: '6px',
12380
+ "float": 'left',
12381
+ zIndex: 1,
12382
+ position: 'relative',
12383
+ color: 'geowebColors.buttons.tertiary.default.color',
12384
+ '&:hover': {
12385
+ color: 'geowebColors.buttons.tertiary.activeMouseOver.color'
12386
+ }
12387
+ };
12388
+ }
12389
+ }), /*#__PURE__*/React.createElement(Box, {
12390
+ sx: {
12391
+ width: '100%',
12392
+ display: 'inline-flex',
12393
+ alignItems: 'center',
12394
+ overflowX: 'visible',
12395
+ "float": 'left',
12396
+ paddingLeft: '40px',
12397
+ marginRight: "".concat(margin, "px"),
12398
+ marginLeft: "".concat(-margin, "px"),
12399
+ maxWidth: maxWidthValue,
12400
+ fontSize: '0.875rem'
12401
+ },
12522
12402
  ref: ref
12523
12403
  }, activeServices && Object.keys(activeServices) && Object.keys(activeServices).length > 0 && /*#__PURE__*/React.createElement(ServiceChipConnect, {
12524
12404
  key: "All",
@@ -12535,8 +12415,26 @@ var ServiceList = function ServiceList(_ref4) {
12535
12415
  isSelected: (_a = activeServices[serviceId]) === null || _a === void 0 ? void 0 : _a.enabled,
12536
12416
  isDisabled: activeServices[serviceId] === undefined
12537
12417
  });
12538
- })), layerSelectWidth + margin < width && /*#__PURE__*/React.createElement(ChevronRight, {
12539
- className: classes.scrollArrowRight,
12418
+ })), layerSelectWidth + margin < width && /*#__PURE__*/React.createElement(ChevronRight // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12419
+ , {
12420
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12421
+ sx: function sx(theme) {
12422
+ return {
12423
+ width: '100px',
12424
+ marginBottom: '-12px',
12425
+ height: '34px',
12426
+ paddingTop: '6px',
12427
+ paddingBottom: '6px',
12428
+ backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), ".concat(theme.palette.geowebColors.background.surfaceApp, " 51%)"),
12429
+ right: '0px',
12430
+ position: 'fixed',
12431
+ cursor: 'pointer',
12432
+ color: 'geowebColors.buttons.tertiary.default.color',
12433
+ '&:hover': {
12434
+ color: 'geowebColors.buttons.tertiary.activeMouseOver.color'
12435
+ }
12436
+ };
12437
+ },
12540
12438
  onMouseDown: onRightChevronPressed,
12541
12439
  onMouseUp: onChevronMouseUp,
12542
12440
  "data-testid": "rightScrollArrow"
@@ -12571,7 +12469,7 @@ var ServiceListConnect = function ServiceListConnect(_ref) {
12571
12469
  });
12572
12470
  };
12573
12471
 
12574
- var styles = {
12472
+ var styles$1 = {
12575
12473
  servicesContainer: {
12576
12474
  width: '300px',
12577
12475
  maxHeight: '380px',
@@ -12637,10 +12535,10 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
12637
12535
  };
12638
12536
 
12639
12537
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
12640
- sx: styles.servicesContainer,
12538
+ sx: styles$1.servicesContainer,
12641
12539
  "data-testid": "ServiceDialog"
12642
12540
  }, /*#__PURE__*/React.createElement(Box, {
12643
- sx: styles.header
12541
+ sx: styles$1.header
12644
12542
  }, "Services"), /*#__PURE__*/React.createElement(List, {
12645
12543
  disablePadding: true
12646
12544
  }, Object.keys(services).map(function (serviceId) {
@@ -12686,11 +12584,11 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
12686
12584
  "data-testid": "removeServiceButton"
12687
12585
  }, /*#__PURE__*/React.createElement(Delete, null))))));
12688
12586
  })), /*#__PURE__*/React.createElement(Box, {
12689
- sx: styles.footer
12587
+ sx: styles$1.footer
12690
12588
  }, /*#__PURE__*/React.createElement(Button, {
12691
12589
  onClick: openAddService,
12692
12590
  "data-testid": "openAddServiceButton",
12693
- sx: styles.button,
12591
+ sx: styles$1.button,
12694
12592
  variant: "tertiary",
12695
12593
  startIcon: /*#__PURE__*/React.createElement(Add, null)
12696
12594
  }, "Add a new service"))), addServiceIsOpen && /*#__PURE__*/React.createElement(ServicePopupConnect, {
@@ -12764,26 +12662,6 @@ var ServiceOptionsButton = function ServiceOptionsButton() {
12764
12662
  }, /*#__PURE__*/React.createElement(ServiceOptionsDialogConnect, null));
12765
12663
  };
12766
12664
 
12767
- var useStyles$h = makeStyles({
12768
- serviceList: {
12769
- height: '48px'
12770
- },
12771
- keywordFilterButton: {
12772
- "float": 'left',
12773
- position: 'absolute',
12774
- margin: '12px 0 0 8px',
12775
- zIndex: 2
12776
- },
12777
- serviceOptionsButton: {
12778
- position: 'absolute',
12779
- margin: '12px 0 0 calc(100% - 36px)',
12780
- zIndex: 2
12781
- },
12782
- layerSelectContainer: {
12783
- padding: '0 8px'
12784
- }
12785
- });
12786
-
12787
12665
  var LayerSelect = function LayerSelect(_ref) {
12788
12666
  var mapId = _ref.mapId,
12789
12667
  bounds = _ref.bounds,
@@ -12797,7 +12675,6 @@ var LayerSelect = function LayerSelect(_ref) {
12797
12675
  order = _ref$order === void 0 ? 0 : _ref$order,
12798
12676
  _ref$source = _ref.source,
12799
12677
  source = _ref$source === void 0 ? 'module' : _ref$source;
12800
- var classes = useStyles$h();
12801
12678
 
12802
12679
  var _React$useState = React.useState(500),
12803
12680
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -12837,66 +12714,45 @@ var LayerSelect = function LayerSelect(_ref) {
12837
12714
  onMouseDown: onMouseDown,
12838
12715
  order: order,
12839
12716
  source: source
12840
- }, /*#__PURE__*/React.createElement("div", {
12841
- style: {
12717
+ }, /*#__PURE__*/React.createElement(Box, {
12718
+ sx: {
12842
12719
  padding: '6px'
12843
12720
  }
12844
- }, /*#__PURE__*/React.createElement(SearchFieldConnect, null)), /*#__PURE__*/React.createElement("div", {
12845
- className: classes.keywordFilterButton
12721
+ }, /*#__PURE__*/React.createElement(SearchFieldConnect, null)), /*#__PURE__*/React.createElement(Box, {
12722
+ sx: {
12723
+ "float": 'left',
12724
+ position: 'absolute',
12725
+ margin: '12px 0 0 8px',
12726
+ zIndex: 2
12727
+ }
12846
12728
  }, /*#__PURE__*/React.createElement(KeywordFilterButtonConnect, {
12847
12729
  mapId: mapId
12848
- })), /*#__PURE__*/React.createElement("div", {
12849
- className: classes.serviceOptionsButton
12850
- }, /*#__PURE__*/React.createElement(ServiceOptionsButton, null)), /*#__PURE__*/React.createElement("div", {
12851
- className: classes.serviceList
12730
+ })), /*#__PURE__*/React.createElement(Box, {
12731
+ sx: {
12732
+ position: 'absolute',
12733
+ margin: '12px 0 0 calc(100% - 36px)',
12734
+ zIndex: 2
12735
+ }
12736
+ }, /*#__PURE__*/React.createElement(ServiceOptionsButton, null)), /*#__PURE__*/React.createElement(Box, {
12737
+ sx: {
12738
+ height: '48px'
12739
+ }
12852
12740
  }, /*#__PURE__*/React.createElement(ServiceListConnect, {
12853
12741
  layerSelectWidth: width
12854
- })), /*#__PURE__*/React.createElement("div", {
12855
- className: classes.layerSelectContainer
12742
+ })), /*#__PURE__*/React.createElement(Box, {
12743
+ sx: {
12744
+ padding: '0 8px'
12745
+ }
12856
12746
  }, /*#__PURE__*/React.createElement(LayerListConnect, {
12857
12747
  mapId: mapId,
12858
12748
  layerSelectHeight: height
12859
12749
  })));
12860
12750
  };
12861
12751
 
12862
- var useStyles$g = makeStyles(function (theme) {
12863
- return createStyles({
12864
- listItem: {
12865
- width: '100%',
12866
- minWidth: '300px',
12867
- padding: '0px',
12868
- paddingLeft: '10px',
12869
- paddingRight: '50px',
12870
- fontSize: '12px'
12871
- },
12872
- onlyByttonText: {
12873
- color: theme.palette.geowebColors.buttons.primary["default"].fill,
12874
- fontSize: '14px',
12875
- fontWeight: 500
12876
- },
12877
- checkbox: {
12878
- paddingTop: '6px',
12879
- paddingBottom: '7px',
12880
- '&&:hover': {
12881
- backgroundColor: 'transparent'
12882
- }
12883
- },
12884
- listItemIcon: {
12885
- minWidth: '42px'
12886
- },
12887
- listItemText: {
12888
- textOverflow: 'ellipsis',
12889
- whiteSpace: 'nowrap',
12890
- overflow: 'hidden'
12891
- }
12892
- });
12893
- });
12894
-
12895
12752
  var FilterListItem = function FilterListItem(_ref) {
12896
12753
  var keyword = _ref.keyword,
12897
12754
  toggleKeywords = _ref.toggleKeywords,
12898
12755
  enableOnlyOneKeyword = _ref.enableOnlyOneKeyword;
12899
- var classes = useStyles$g();
12900
12756
 
12901
12757
  var _React$useState = React.useState(false),
12902
12758
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -12926,19 +12782,38 @@ var FilterListItem = function FilterListItem(_ref) {
12926
12782
  onBlur: handleMouseLeave,
12927
12783
  "data-testid": "filterResultListItem"
12928
12784
  }, /*#__PURE__*/React.createElement(ListItem, {
12929
- className: classes.listItem
12785
+ sx: {
12786
+ width: '100%',
12787
+ minWidth: '300px',
12788
+ padding: '0px',
12789
+ paddingLeft: '10px',
12790
+ paddingRight: '50px',
12791
+ fontSize: '12px'
12792
+ }
12930
12793
  }, /*#__PURE__*/React.createElement(ListItemIcon, {
12931
- className: classes.listItemIcon
12794
+ sx: {
12795
+ minWidth: '42px'
12796
+ }
12932
12797
  }, /*#__PURE__*/React.createElement(Checkbox, {
12933
12798
  color: "secondary",
12934
12799
  checked: keyword.checked,
12935
12800
  onChange: function onChange() {
12936
12801
  return toggleCheckbox(keyword.id);
12937
12802
  },
12938
- className: classes.checkbox
12803
+ sx: {
12804
+ paddingTop: '6px',
12805
+ paddingBottom: '7px',
12806
+ '&&:hover': {
12807
+ backgroundColor: 'transparent'
12808
+ }
12809
+ }
12939
12810
  })), /*#__PURE__*/React.createElement(Typography, {
12940
12811
  variant: "body2",
12941
- className: classes.listItemText
12812
+ sx: {
12813
+ textOverflow: 'ellipsis',
12814
+ whiteSpace: 'nowrap',
12815
+ overflow: 'hidden'
12816
+ }
12942
12817
  }, keyword.id), hovering ? /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(IconButton, {
12943
12818
  style: {
12944
12819
  backgroundColor: 'transparent'
@@ -12950,7 +12825,11 @@ var FilterListItem = function FilterListItem(_ref) {
12950
12825
  },
12951
12826
  "data-testid": "onlyButton"
12952
12827
  }, /*#__PURE__*/React.createElement(Typography, {
12953
- className: classes.onlyByttonText
12828
+ sx: {
12829
+ color: 'geowebColors.buttons.primary.default.fill',
12830
+ fontSize: '14px',
12831
+ fontWeight: 500
12832
+ }
12954
12833
  }, "ONLY"))) : null));
12955
12834
  }
12956
12835
 
@@ -13053,26 +12932,9 @@ var KeywordFilterSelectAllSwitchConnect = function KeywordFilterSelectAllSwitchC
13053
12932
  * See the License for the specific language governing permissions and
13054
12933
  * limitations under the License.
13055
12934
  *
13056
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13057
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
12935
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
12936
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
13058
12937
  * */
13059
- var useStyles$f = makeStyles(function (theme) {
13060
- return createStyles({
13061
- selectAll: {
13062
- padding: '15px',
13063
- paddingLeft: '20px'
13064
- },
13065
- "switch": {
13066
- padding: '15px'
13067
- },
13068
- selectAllContainer: {
13069
- backgroundColor: theme.palette.background.paper,
13070
- position: 'sticky',
13071
- top: 0,
13072
- zIndex: 100
13073
- }
13074
- });
13075
- });
13076
12938
 
13077
12939
  var KeywordFilterResults = function KeywordFilterResults(_ref) {
13078
12940
  var allKeywordIds = _ref.allKeywordIds,
@@ -13088,7 +12950,6 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
13088
12950
  order = _ref$order === void 0 ? 0 : _ref$order,
13089
12951
  _ref$source = _ref.source,
13090
12952
  source = _ref$source === void 0 ? 'module' : _ref$source;
13091
- var classes = useStyles$f();
13092
12953
  return /*#__PURE__*/React.createElement(ToolContainerDraggable, {
13093
12954
  title: showTitle ? "Filter Results ".concat(mapId) : 'Filter Results',
13094
12955
  "data-testid": "keywordFilterResults",
@@ -13111,21 +12972,31 @@ var KeywordFilterResults = function KeywordFilterResults(_ref) {
13111
12972
  xs: 12,
13112
12973
  justifyContent: "space-between",
13113
12974
  alignItems: "center",
13114
- className: classes.selectAllContainer
12975
+ sx: {
12976
+ backgroundColor: 'background.paper',
12977
+ position: 'sticky',
12978
+ top: 0,
12979
+ zIndex: 100
12980
+ }
13115
12981
  }, /*#__PURE__*/React.createElement(Grid, {
13116
12982
  container: true,
13117
12983
  item: true,
13118
12984
  xs: 6,
13119
12985
  justifyContent: "flex-start",
13120
12986
  alignItems: "center",
13121
- className: classes.selectAll
12987
+ sx: {
12988
+ padding: '15px',
12989
+ paddingLeft: '20px'
12990
+ }
13122
12991
  }, "Select all"), /*#__PURE__*/React.createElement(Grid, {
13123
12992
  container: true,
13124
12993
  item: true,
13125
12994
  xs: 6,
13126
12995
  justifyContent: "flex-end",
13127
12996
  alignContent: "center",
13128
- className: classes["switch"]
12997
+ sx: {
12998
+ padding: '15px'
12999
+ }
13129
13000
  }, /*#__PURE__*/React.createElement(KeywordFilterSelectAllSwitchConnect, null))), /*#__PURE__*/React.createElement(List, {
13130
13001
  dense: true,
13131
13002
  style: {
@@ -13620,37 +13491,30 @@ var ZoomControlConnect = function ZoomControlConnect(_ref) {
13620
13491
  * See the License for the specific language governing permissions and
13621
13492
  * limitations under the License.
13622
13493
  *
13623
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13624
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
13494
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13495
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
13625
13496
  * */
13626
- var useStyles$e = makeStyles(function () {
13627
- return {
13628
- container: {
13629
- '& > button': {
13630
- marginBottom: 8
13631
- }
13632
- },
13633
- wrapper: {
13497
+
13498
+ var MapControls = function MapControls(_a) {
13499
+ var children = _a.children,
13500
+ props = __rest(_a, ["children"]);
13501
+
13502
+ return /*#__PURE__*/React.createElement(Box, Object.assign({
13503
+ sx: {
13634
13504
  position: 'absolute',
13635
13505
  overflow: 'visible',
13636
13506
  display: 'block',
13637
13507
  left: 0,
13638
- margin: 8,
13508
+ margin: 1,
13639
13509
  zIndex: 50,
13640
- top: 96
13510
+ top: '96px'
13641
13511
  }
13642
- };
13643
- });
13644
-
13645
- var MapControls = function MapControls(_a) {
13646
- var children = _a.children,
13647
- props = __rest(_a, ["children"]);
13648
-
13649
- var classes = useStyles$e();
13650
- return /*#__PURE__*/React.createElement("div", Object.assign({
13651
- className: classes.wrapper
13652
13512
  }, props), /*#__PURE__*/React.createElement(Grid, {
13653
- className: classes.container,
13513
+ sx: {
13514
+ '& > button': {
13515
+ marginBottom: 1
13516
+ }
13517
+ },
13654
13518
  container: true,
13655
13519
  direction: "column"
13656
13520
  }, children));
@@ -13769,28 +13633,13 @@ var DimensionSelectButton = function DimensionSelectButton(_ref) {
13769
13633
  }, /*#__PURE__*/React.createElement(Icon, null));
13770
13634
  };
13771
13635
 
13772
- var useStyles$d = makeStyles(function () {
13636
+ var SmallFontSlider = styled(Slider)(function () {
13773
13637
  return {
13774
- verticalLevelDimensionSelectContainer: {
13775
- height: '320px',
13776
- margin: '10px',
13777
- marginLeft: '-5px',
13778
- minWidth: 120,
13779
- fontSize: '90%'
13780
- },
13781
- layerName: {
13782
- paddingLeft: '10px',
13783
- maxWidth: 130,
13784
- overflow: 'hidden',
13785
- textOverflow: 'ellipsis'
13638
+ '& .MuiSlider-markLabel': {
13639
+ fontSize: '80%'
13786
13640
  }
13787
13641
  };
13788
13642
  });
13789
- var SmallFontSlider = withStyles({
13790
- markLabel: {
13791
- fontSize: '80%'
13792
- }
13793
- })(Slider);
13794
13643
 
13795
13644
  var DimensionSelectSlider = function DimensionSelectSlider(_ref) {
13796
13645
  var marks = _ref.marks,
@@ -13806,7 +13655,6 @@ var DimensionSelectSlider = function DimensionSelectSlider(_ref) {
13806
13655
  _ref$alertColor = _ref.alertColor,
13807
13656
  alertColor = _ref$alertColor === void 0 ? 'red' : _ref$alertColor,
13808
13657
  onChangeDimensionValue = _ref.onChangeDimensionValue;
13809
- var classes = useStyles$d();
13810
13658
 
13811
13659
  var _useState = useState(0),
13812
13660
  _useState2 = _slicedToArray(_useState, 2),
@@ -13835,9 +13683,15 @@ var DimensionSelectSlider = function DimensionSelectSlider(_ref) {
13835
13683
  var sliderValue = managedValue !== null ? values.findIndex(function (v) {
13836
13684
  return v === managedValue;
13837
13685
  }) : currentIndex;
13838
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
13839
- className: classes.verticalLevelDimensionSelectContainer,
13840
- "data-testid": "slider-dimensionSelect"
13686
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
13687
+ "data-testid": "slider-dimensionSelect",
13688
+ sx: {
13689
+ height: '320px',
13690
+ margin: '10px',
13691
+ marginLeft: '-5px',
13692
+ minWidth: 120,
13693
+ fontSize: '90%'
13694
+ }
13841
13695
  }, /*#__PURE__*/React.createElement(Box, {
13842
13696
  component: "span",
13843
13697
  m: 1
@@ -13862,7 +13716,12 @@ var DimensionSelectSlider = function DimensionSelectSlider(_ref) {
13862
13716
  title: layerName
13863
13717
  }, /*#__PURE__*/React.createElement(Typography, {
13864
13718
  variant: "body2",
13865
- className: classes.layerName
13719
+ sx: {
13720
+ paddingLeft: '10px',
13721
+ maxWidth: 130,
13722
+ overflow: 'hidden',
13723
+ textOverflow: 'ellipsis'
13724
+ }
13866
13725
  }, layerName)));
13867
13726
  };
13868
13727
 
@@ -14366,30 +14225,11 @@ var AutoUpdateButton = function AutoUpdateButton(_ref) {
14366
14225
  }))));
14367
14226
  };
14368
14227
 
14369
- var useStyles$c = makeStyles(function (theme) {
14370
- return {
14371
- speedButtonDiv: {
14372
- height: '24px',
14373
- width: '24px',
14374
- position: 'relative'
14375
- },
14376
- sliderBackground: {
14377
- padding: '0 0 60px 0',
14378
- backgroundColor: theme.palette.geowebColors.background.surface,
14379
- width: '95px',
14380
- height: '150px',
14381
- position: 'absolute',
14382
- bottom: '34px',
14383
- left: '-18px'
14384
- }
14385
- };
14386
- });
14387
14228
  var speedTooltipTitle = 'Speed';
14388
14229
 
14389
14230
  var SpeedButton = function SpeedButton(_ref) {
14390
14231
  var animationDelay = _ref.animationDelay,
14391
14232
  setMapAnimationDelay = _ref.setMapAnimationDelay;
14392
- var classes = useStyles$c();
14393
14233
 
14394
14234
  var _React$useState = React.useState(false),
14395
14235
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -14442,8 +14282,12 @@ var SpeedButton = function SpeedButton(_ref) {
14442
14282
  };
14443
14283
 
14444
14284
  var text = marks[currentValue].text;
14445
- return /*#__PURE__*/React.createElement("div", {
14446
- className: classes.speedButtonDiv
14285
+ return /*#__PURE__*/React.createElement(Box, {
14286
+ sx: {
14287
+ height: '24px',
14288
+ width: '24px',
14289
+ position: 'relative'
14290
+ }
14447
14291
  }, /*#__PURE__*/React.createElement(Tooltip, {
14448
14292
  title: speedTooltipTitle
14449
14293
  }, /*#__PURE__*/React.createElement(ToolButton, {
@@ -14452,8 +14296,15 @@ var SpeedButton = function SpeedButton(_ref) {
14452
14296
  "data-testid": "speedButton"
14453
14297
  }, /*#__PURE__*/React.createElement(TextIcon, {
14454
14298
  text: text
14455
- }))), open ? /*#__PURE__*/React.createElement("div", {
14456
- className: classes.sliderBackground
14299
+ }))), open ? /*#__PURE__*/React.createElement(Box, {
14300
+ sx: {
14301
+ padding: '0 0 60px 0',
14302
+ backgroundColor: 'geowebColors.background.surface',
14303
+ width: '95px',
14304
+ height: '150px',
14305
+ position: 'absolute',
14306
+ bottom: '35px'
14307
+ }
14457
14308
  }, /*#__PURE__*/React.createElement(Box, {
14458
14309
  sx: sliderHeaderStyle
14459
14310
  }, "Speed"), /*#__PURE__*/React.createElement(CustomSlider, {
@@ -14476,12 +14327,6 @@ var SpeedButton = function SpeedButton(_ref) {
14476
14327
  })) : null);
14477
14328
  };
14478
14329
 
14479
- var timestepAutoSwitchActive = {
14480
- title: 'Timestep Auto on'
14481
- };
14482
- var timestepAutoSwitchInactive = {
14483
- title: 'Timestep Auto off'
14484
- };
14485
14330
  var timeStepMarks = [{
14486
14331
  value: 1,
14487
14332
  label: '1 min',
@@ -14588,34 +14433,6 @@ var timeStepMarks = [{
14588
14433
  timeStepValue: 5256000,
14589
14434
  text: '10y'
14590
14435
  }];
14591
- var useStyles$b = makeStyles(function (theme) {
14592
- return {
14593
- timeStepDiv: {
14594
- width: '58px',
14595
- height: '24px',
14596
- position: 'relative'
14597
- },
14598
- sliderBackground: {
14599
- backgroundColor: theme.palette.geowebColors.background.surface,
14600
- width: '110px',
14601
- height: '350px',
14602
- padding: '0 0 83px 0',
14603
- position: 'absolute',
14604
- bottom: '34px'
14605
- },
14606
- timestepAutoText: {
14607
- fontFamily: 'Roboto-Black, Roboto',
14608
- fontSize: 12,
14609
- color: theme.palette.geowebColors.typographyAndIcons.text
14610
- },
14611
- timestepAutoTextOff: {
14612
- fontFamily: 'Roboto-Black, Roboto',
14613
- fontSize: 12,
14614
- color: theme.palette.geowebColors.typographyAndIcons.text
14615
- },
14616
- disabled: {}
14617
- };
14618
- });
14619
14436
  var timeStepTitle = 'Time step';
14620
14437
 
14621
14438
  var TimeStepButton = function TimeStepButton(_ref) {
@@ -14629,131 +14446,109 @@ var TimeStepButton = function TimeStepButton(_ref) {
14629
14446
  _ref$onToggleTimestep = _ref.onToggleTimestepAuto,
14630
14447
  onToggleTimestepAuto = _ref$onToggleTimestep === void 0 ? function () {
14631
14448
  return null;
14632
- } : _ref$onToggleTimestep;
14633
- var classes = useStyles$b();
14634
-
14635
- var _React$useState = React.useState(false),
14636
- _React$useState2 = _slicedToArray(_React$useState, 2),
14637
- open = _React$useState2[0],
14638
- setOpen = _React$useState2[1];
14639
-
14640
- var onClickButton = function onClickButton() {
14641
- setOpen(!open);
14642
- };
14643
-
14644
- var timestepAutoSwitch = !isTimestepAuto ? timestepAutoSwitchInactive : timestepAutoSwitchActive;
14645
- var timestepAutoTextStyle = !isTimestepAuto ? classes.timestepAutoText : classes.timestepAutoTextOff;
14646
- var disabledSlider = disabled || isTimestepAuto;
14449
+ } : _ref$onToggleTimestep,
14450
+ _ref$isOpenByDefault = _ref.isOpenByDefault,
14451
+ isOpenByDefault = _ref$isOpenByDefault === void 0 ? false : _ref$isOpenByDefault;
14647
14452
  var timeStepFromLayer = getActiveLayerTimeStep(timeDimension) || timeStep;
14648
14453
  var currentMark = timeStepMarks.find(function (mark) {
14649
14454
  return mark.timeStepValue === timeStep;
14650
14455
  });
14651
- var value = currentMark && currentMark.value ? currentMark.value : 0;
14652
- var min = timeStepMarks[0].value;
14653
- var max = timeStepMarks[timeStepMarks.length - 1].value;
14654
-
14655
- var getTimeStepValue = function getTimeStepValue(value) {
14656
- return timeStepMarks[Math.round(value - 1)].timeStepValue;
14657
- };
14658
-
14659
- var onChangeSlider = function onChangeSlider(event, value) {
14660
- var newValue = getTimeStepValue(value);
14661
-
14662
- if (event.type !== 'keydown') {
14663
- onChangeTimeStep(newValue, MapActionOrigin.map);
14456
+ React__default.useEffect(function () {
14457
+ if (isTimestepAuto) {
14458
+ onChangeTimeStep(timeStepFromLayer);
14664
14459
  }
14665
- };
14666
-
14667
- var onKeyDown = function onKeyDown(event) {
14668
- // disable default Slider behavior
14669
- event.stopPropagation();
14670
- event.preventDefault(); // custom logic
14460
+ }, [timeStepFromLayer, isTimestepAuto, onChangeTimeStep]);
14671
14461
 
14672
- if (event.key === 'Tab') {
14673
- setOpen(!open);
14674
- }
14462
+ var _React$useState = React__default.useState(null),
14463
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14464
+ anchorRef = _React$useState2[0],
14465
+ setAnchorRef = _React$useState2[1];
14675
14466
 
14676
- var newValue = getValueFromKeyboardEvent(event, value, min, max);
14467
+ var _React$useState3 = React__default.useState(false),
14468
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
14469
+ open = _React$useState4[0],
14470
+ setOpen = _React$useState4[1];
14677
14471
 
14678
- if (newValue !== null) {
14679
- onChangeTimeStep(getTimeStepValue(newValue), MapActionOrigin.map);
14472
+ React__default.useEffect(function () {
14473
+ if (anchorRef && isOpenByDefault) {
14474
+ setOpen(true);
14680
14475
  }
14681
- };
14682
-
14683
- React.useEffect(function () {
14684
- if (isTimestepAuto) {
14685
- onChangeTimeStep(timeStepFromLayer);
14476
+ }, [anchorRef, isOpenByDefault]);
14477
+ return /*#__PURE__*/React__default.createElement(Box, {
14478
+ onKeyDown: function onKeyDown(event) {
14479
+ event.stopPropagation();
14686
14480
  }
14687
- }, [timeStepFromLayer, isTimestepAuto, onChangeTimeStep]);
14688
- return /*#__PURE__*/React.createElement("div", {
14689
- className: classes.timeStepDiv
14690
- }, /*#__PURE__*/React.createElement(Tooltip, {
14481
+ }, /*#__PURE__*/React__default.createElement(Tooltip, {
14691
14482
  title: timeStepTitle
14692
- }, /*#__PURE__*/React.createElement(ToolButton, {
14483
+ }, /*#__PURE__*/React__default.createElement(ToolButton, {
14484
+ onClick: function onClick() {
14485
+ setOpen(true);
14486
+ },
14487
+ ref: setAnchorRef,
14693
14488
  active: true,
14694
- onClick: onClickButton,
14695
- "data-testid": "timeStepButton",
14696
14489
  width: "58px"
14697
- }, /*#__PURE__*/React.createElement(FastForward, null), /*#__PURE__*/React.createElement(TextIcon, {
14698
- text: currentMark && currentMark.text || '',
14699
- "data-testid": "timeStepButtonText"
14700
- }))), open ? /*#__PURE__*/React.createElement("div", {
14701
- className: classes.sliderBackground
14702
- }, /*#__PURE__*/React.createElement(Box, {
14703
- sx: sliderHeaderStyle
14704
- }, "Time step"), /*#__PURE__*/React.createElement(CustomSlider, {
14705
- "data-testid": "timeStepButtonSlider",
14706
- orientation: "vertical",
14707
- value: value,
14708
- step: null,
14709
- min: min,
14710
- max: max,
14711
- marks: timeStepMarks,
14712
- disabled: disabledSlider,
14713
- onChange: onChangeSlider,
14714
- onKeyDown: onKeyDown,
14715
- shouldAutoFocus: true
14716
- }), /*#__PURE__*/React.createElement(Tooltip, {
14717
- title: timestepAutoSwitch.title
14718
- }, /*#__PURE__*/React.createElement("span", {
14719
- "data-testid": "timestepAutoSwitchTooltip"
14720
- }, /*#__PURE__*/React.createElement(FormControlLabel, {
14721
- control: /*#__PURE__*/React.createElement(Switch, {
14722
- checked: isTimestepAuto,
14723
- onChange: function onChange() {
14724
- return onToggleTimestepAuto();
14725
- },
14726
- disabled: disabled,
14727
- id: "timestepAutoSwitch",
14728
- disableRipple: true,
14490
+ }, /*#__PURE__*/React__default.createElement(FastForward, null), /*#__PURE__*/React__default.createElement(TextIcon, {
14491
+ text: currentMark === null || currentMark === void 0 ? void 0 : currentMark.text
14492
+ }))), /*#__PURE__*/React__default.createElement(Menu, {
14493
+ anchorEl: anchorRef,
14494
+ open: open,
14495
+ onClose: function onClose() {
14496
+ return setOpen(false);
14497
+ },
14498
+ BackdropProps: {
14729
14499
  sx: {
14730
- marginLeft: '18px'
14500
+ backgroundColor: 'transparent'
14731
14501
  }
14732
- }),
14733
- label: "Auto",
14734
- labelPlacement: "end",
14735
- classes: {
14736
- label: timestepAutoTextStyle
14502
+ },
14503
+ anchorOrigin: {
14504
+ vertical: 'top',
14505
+ horizontal: 'center'
14506
+ },
14507
+ transformOrigin: {
14508
+ vertical: 'bottom',
14509
+ horizontal: 'center'
14737
14510
  }
14738
- })))) : null);
14511
+ }, timeStepMarks.sort(function (a, b) {
14512
+ return b.timeStepValue - a.timeStepValue;
14513
+ }).map(function (time) {
14514
+ return /*#__PURE__*/React__default.createElement(MenuItem, {
14515
+ onClick: function onClick() {
14516
+ if (isTimestepAuto) {
14517
+ onToggleTimestepAuto();
14518
+ }
14519
+
14520
+ onChangeTimeStep(time.timeStepValue, MapActionOrigin.map);
14521
+ setOpen(false);
14522
+ },
14523
+ key: time.timeStepValue,
14524
+ selected: (currentMark === null || currentMark === void 0 ? void 0 : currentMark.timeStepValue) === time.timeStepValue,
14525
+ disabled: disabled
14526
+ }, time.label);
14527
+ }), /*#__PURE__*/React__default.createElement(MenuItem, {
14528
+ onClick: function onClick() {
14529
+ onToggleTimestepAuto();
14530
+ setOpen(false);
14531
+ },
14532
+ selected: isTimestepAuto,
14533
+ disabled: disabled
14534
+ }, "Auto")));
14739
14535
  };
14740
14536
 
14741
- var OptionsPopOver = withStyles(function (theme) {
14537
+ var OptionsPopOver = styled(Popover)(function (_ref) {
14538
+ var theme = _ref.theme;
14742
14539
  return {
14743
- paper: {
14744
- height: '24px',
14745
- padding: '8px',
14746
- borderRadius: '0',
14540
+ '& .MuiPaper-root': {
14541
+ padding: '5px',
14747
14542
  overflow: 'visible',
14748
14543
  backgroundColor: theme.palette.geowebColors.background.surface
14749
14544
  }
14750
14545
  };
14751
- })(Popover);
14546
+ });
14752
14547
 
14753
- var OptionsMenuButton = function OptionsMenuButton(_ref) {
14754
- var autoUpdateBtn = _ref.autoUpdateBtn,
14755
- speedBtn = _ref.speedBtn,
14756
- timeStepBtn = _ref.timeStepBtn;
14548
+ var OptionsMenuButton = function OptionsMenuButton(_ref2) {
14549
+ var autoUpdateBtn = _ref2.autoUpdateBtn,
14550
+ speedBtn = _ref2.speedBtn,
14551
+ timeStepBtn = _ref2.timeStepBtn;
14757
14552
 
14758
14553
  var _React$useState = React.useState(null),
14759
14554
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -14771,21 +14566,22 @@ var OptionsMenuButton = function OptionsMenuButton(_ref) {
14771
14566
  var open = Boolean(anchorEl);
14772
14567
  var id = open ? 'simple-popover' : undefined;
14773
14568
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
14774
- title: "Options"
14775
- }, /*#__PURE__*/React.createElement(ToolButton, {
14569
+ title: "Animation options",
14570
+ placement: "bottom"
14571
+ }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(ToolButton, {
14776
14572
  onClick: onClickButton,
14777
14573
  "data-testid": "optionsMenuButton",
14778
14574
  active: open
14779
14575
  }, /*#__PURE__*/React.createElement(Options, {
14780
14576
  "data-testid": "optionsIcon"
14781
- }))), /*#__PURE__*/React.createElement(OptionsPopOver, {
14577
+ })))), /*#__PURE__*/React.createElement(OptionsPopOver, {
14782
14578
  id: id,
14783
14579
  open: open,
14784
14580
  "data-testid": "optionsMenuPopOver",
14785
14581
  anchorEl: anchorEl,
14786
14582
  onClose: handleClose,
14787
14583
  anchorOrigin: {
14788
- vertical: 'top',
14584
+ vertical: -5,
14789
14585
  horizontal: 'left'
14790
14586
  },
14791
14587
  transformOrigin: {
@@ -14833,53 +14629,18 @@ var OptionsMenuButton = function OptionsMenuButton(_ref) {
14833
14629
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14834
14630
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
14835
14631
  * */
14836
- var useStyles$a = makeStyles({
14837
- buttonContainerBig: {
14838
- padding: '20px 0px 0px 12px',
14839
- width: '210px'
14840
- },
14841
- buttonContainerSmall: {
14842
- padding: '20px 0px 0px 12px',
14843
- width: '80px'
14844
- }
14845
- });
14846
14632
 
14847
14633
  var TimeSliderButtons = function TimeSliderButtons(_ref) {
14848
- var autoUpdateBtn = _ref.autoUpdateBtn,
14849
- optionsMenuBtn = _ref.optionsMenuBtn,
14850
- playBtn = _ref.playBtn,
14851
- speedBtn = _ref.speedBtn,
14852
- timeStepBtn = _ref.timeStepBtn;
14853
- var classes = useStyles$a();
14854
- var matches = useMediaQuery('(min-width:600px)');
14634
+ var optionsMenuBtn = _ref.optionsMenuBtn,
14635
+ playBtn = _ref.playBtn;
14855
14636
  return /*#__PURE__*/React.createElement("div", {
14856
14637
  "data-testid": "timeSliderButtons"
14857
- }, matches ? /*#__PURE__*/React.createElement(Grid, {
14638
+ }, /*#__PURE__*/React.createElement(Grid, {
14858
14639
  container: true,
14859
14640
  spacing: 2,
14860
- className: classes.buttonContainerBig
14861
- }, /*#__PURE__*/React.createElement(Grid, {
14862
- item: true
14863
- }, timeStepBtn || /*#__PURE__*/React.createElement(TimeStepButton, {
14864
- timeStep: 5,
14865
- onChangeTimeStep: function onChangeTimeStep() {
14866
- return null;
14867
- }
14868
- })), /*#__PURE__*/React.createElement(Grid, {
14869
- item: true
14870
- }, speedBtn || /*#__PURE__*/React.createElement(SpeedButton, {
14871
- animationDelay: defaultAnimationDelayAtStart,
14872
- setMapAnimationDelay: function setMapAnimationDelay() {
14873
- return null;
14641
+ sx: {
14642
+ padding: '20px 0px 0px 16px'
14874
14643
  }
14875
- })), /*#__PURE__*/React.createElement(Grid, {
14876
- item: true
14877
- }, autoUpdateBtn || /*#__PURE__*/React.createElement(AutoUpdateButton, null)), /*#__PURE__*/React.createElement(Grid, {
14878
- item: true
14879
- }, playBtn || /*#__PURE__*/React.createElement(PlayButton, null))) : /*#__PURE__*/React.createElement(Grid, {
14880
- container: true,
14881
- spacing: 1,
14882
- className: classes.buttonContainerSmall
14883
14644
  }, /*#__PURE__*/React.createElement(Grid, {
14884
14645
  item: true
14885
14646
  }, optionsMenuBtn || /*#__PURE__*/React.createElement(OptionsMenuButton, null)), /*#__PURE__*/React.createElement(Grid, {
@@ -15562,12 +15323,6 @@ var renderTimeSliderLegend = function renderTimeSliderLegend(context, theme, can
15562
15323
  drawCurrentTime(ctx, theme, canvasWidth, height, visibleTimeStart, visibleTimeEnd, currentTimeUnix);
15563
15324
  };
15564
15325
 
15565
- var useStyles$9 = makeStyles({
15566
- timeSliderLegend: {
15567
- height: '50px'
15568
- }
15569
- });
15570
-
15571
15326
  var getNextSecondsPerPxValue = function getNextSecondsPerPxValue(direction, oldSecondsPerPx, dataScaleToSecondsPerPx) {
15572
15327
  var fullSecondsPerPxValues = secondsPerPxValues(dataScaleToSecondsPerPx);
15573
15328
  var ind = fullSecondsPerPxValues.indexOf(oldSecondsPerPx);
@@ -15605,7 +15360,6 @@ var TimeSliderLegend = function TimeSliderLegend(_ref) {
15605
15360
  onSetNewDate = _ref.onSetNewDate,
15606
15361
  onSetCenterTime = _ref.onSetCenterTime,
15607
15362
  onZoom = _ref.onZoom;
15608
- var classes = useStyles$9();
15609
15363
 
15610
15364
  var _useCanvasTarget = useCanvasTarget('mousedown'),
15611
15365
  _useCanvasTarget2 = _slicedToArray(_useCanvasTarget, 2),
@@ -15685,9 +15439,11 @@ var TimeSliderLegend = function TimeSliderLegend(_ref) {
15685
15439
  throttledZoom(newSecondsPerPx, newCenterTime);
15686
15440
  };
15687
15441
 
15688
- return /*#__PURE__*/React.createElement("div", {
15689
- className: classes.timeSliderLegend,
15690
- "data-testid": "timeSliderLegend"
15442
+ return /*#__PURE__*/React.createElement(Box, {
15443
+ "data-testid": "timeSliderLegend",
15444
+ sx: {
15445
+ height: '50px'
15446
+ }
15691
15447
  }, /*#__PURE__*/React.createElement(CanvasComponent, {
15692
15448
  ref: node,
15693
15449
  onMouseMove: function onMouseMove(x, y, event, width) {
@@ -15756,31 +15512,12 @@ var TimeSliderLegend = function TimeSliderLegend(_ref) {
15756
15512
  * See the License for the specific language governing permissions and
15757
15513
  * limitations under the License.
15758
15514
  *
15759
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15760
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
15515
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15516
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
15761
15517
  * */
15762
15518
  var scaleSliderOtherSettings = {
15763
15519
  LEFT_PADDING: '10%'
15764
15520
  };
15765
- var useStyles$8 = makeStyles(function (theme) {
15766
- return {
15767
- Background: {
15768
- backgroundColor: theme.palette.geowebColors.background.surface,
15769
- width: '229px',
15770
- height: '40px',
15771
- paddingTop: '4px',
15772
- paddingBottom: '7px',
15773
- boxSizing: 'content-box'
15774
- },
15775
- ScaleText: {
15776
- width: '67px',
15777
- height: '15px',
15778
- padding: '0px 10px 0 8px',
15779
- color: theme.palette.geowebColors.typographyAndIcons.text,
15780
- font: "".concat(theme.palette.geowebColors.timeSlider.timeScaleText.fontSize, "px Roboto")
15781
- }
15782
- };
15783
- });
15784
15521
 
15785
15522
  var thumbComponent = function thumbComponent(props) {
15786
15523
  var children = props.children,
@@ -15835,14 +15572,15 @@ var valueLabelFormat = function valueLabelFormat(value) {
15835
15572
  return valueNew;
15836
15573
  };
15837
15574
 
15838
- var GeoWebScaleSlider = withStyles(function (theme) {
15575
+ var GeoWebScaleSlider = styled(Slider)(function (_ref) {
15576
+ var theme = _ref.theme;
15839
15577
  return {
15840
- root: {
15578
+ '&.MuiSlider-root': {
15841
15579
  height: 4,
15842
15580
  width: 167,
15843
15581
  margin: "0 0 18px ".concat(scaleSliderOtherSettings.LEFT_PADDING)
15844
15582
  },
15845
- thumb: {
15583
+ '& .MuiSlider-thumb': {
15846
15584
  backgroundColor: 'rgba(0,0,0,0)',
15847
15585
  marginTop: 0,
15848
15586
  width: 12,
@@ -15855,57 +15593,56 @@ var GeoWebScaleSlider = withStyles(function (theme) {
15855
15593
  display: 'none'
15856
15594
  }
15857
15595
  },
15858
- valueLabel: {
15596
+ '& .MuiSlider-valueLabel': {
15859
15597
  left: '20px'
15860
15598
  },
15861
- rail: {
15599
+ '& .MuiSlider-rail': {
15862
15600
  color: theme.palette.geowebColors.timeSlider.timeScaleHorizontalScale.fill,
15863
15601
  height: 4,
15864
15602
  width: 170,
15865
15603
  borderRadius: 4.5,
15866
15604
  opacity: theme.palette.geowebColors.timeSlider.timeScaleHorizontalScale.opacity
15867
15605
  },
15868
- mark: {
15606
+ '& .MuiSlider-mark': {
15869
15607
  backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicators.fill,
15870
15608
  height: 6,
15871
15609
  width: 2,
15872
- marginTop: -9
15873
- },
15874
- markActive: {
15875
- backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicatorsActive.fill,
15876
- height: 6,
15877
- width: 2,
15878
- marginTop: -9
15610
+ marginTop: -9,
15611
+ '&.MuiSlider-markActive': {
15612
+ backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicatorsActive.fill,
15613
+ height: 6,
15614
+ width: 2,
15615
+ marginTop: -9
15616
+ }
15879
15617
  },
15880
15618
  '@media (max-width: 585px)': {
15881
- root: {
15619
+ '&.MuiSlider-root': {
15882
15620
  width: 110
15883
15621
  },
15884
- rail: {
15622
+ '& .MuiSlider-rail': {
15885
15623
  width: 110
15886
15624
  }
15887
15625
  },
15888
15626
  '@media (max-width: 395px)': {
15889
- root: {
15627
+ '&.MuiSlider-root': {
15890
15628
  width: 60
15891
15629
  },
15892
- rail: {
15630
+ '& .MuiSlider-rail': {
15893
15631
  width: 60
15894
15632
  }
15895
15633
  }
15896
15634
  };
15897
- })(Slider);
15635
+ });
15898
15636
  var RAIL_GUTTER_OFFSET = 0.4;
15899
15637
 
15900
- var TimeSliderScaleSlider = function TimeSliderScaleSlider(_ref) {
15901
- var layers = _ref.layers,
15902
- _ref$timeSliderScale = _ref.timeSliderScale,
15903
- timeSliderScale = _ref$timeSliderScale === void 0 ? Scale.Hour : _ref$timeSliderScale,
15904
- centerTime = _ref.centerTime,
15905
- secondsPerPx = _ref.secondsPerPx,
15906
- selectedTime = _ref.selectedTime,
15907
- onChangeTimeSliderScale = _ref.onChangeTimeSliderScale;
15908
- var classes = useStyles$8();
15638
+ var TimeSliderScaleSlider = function TimeSliderScaleSlider(_ref2) {
15639
+ var layers = _ref2.layers,
15640
+ _ref2$timeSliderScale = _ref2.timeSliderScale,
15641
+ timeSliderScale = _ref2$timeSliderScale === void 0 ? Scale.Hour : _ref2$timeSliderScale,
15642
+ centerTime = _ref2.centerTime,
15643
+ secondsPerPx = _ref2.secondsPerPx,
15644
+ selectedTime = _ref2.selectedTime,
15645
+ onChangeTimeSliderScale = _ref2.onChangeTimeSliderScale;
15909
15646
  var min = 0;
15910
15647
  var max = marks.length - 1;
15911
15648
  var value = marks.findIndex(function (mark) {
@@ -15949,12 +15686,25 @@ var TimeSliderScaleSlider = function TimeSliderScaleSlider(_ref) {
15949
15686
  var scaleTextPadding = {
15950
15687
  paddingLeft: paddingLeft
15951
15688
  };
15952
- return /*#__PURE__*/React.createElement("div", {
15953
- className: classes.Background,
15954
- "data-testid": "scaleSlider"
15955
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
15689
+ return /*#__PURE__*/React.createElement(Box, {
15690
+ "data-testid": "scaleSlider",
15691
+ sx: {
15692
+ backgroundColor: 'geowebColors.background.surface',
15693
+ width: '229px',
15694
+ height: '40px',
15695
+ paddingTop: '4px',
15696
+ paddingBottom: '7px',
15697
+ boxSizing: 'content-box'
15698
+ }
15699
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Box, {
15956
15700
  "data-testid": "scaleSliderText",
15957
- className: classes.ScaleText,
15701
+ sx: {
15702
+ width: '67px',
15703
+ height: '15px',
15704
+ padding: '0px 10px 0 8px',
15705
+ color: 'geowebColors.typographyAndIcons.text',
15706
+ font: '12px Roboto'
15707
+ },
15958
15708
  style: scaleTextPadding
15959
15709
  }, text)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(GeoWebScaleSlider, {
15960
15710
  "data-testid": "scaleSliderSlider",
@@ -16165,18 +15915,6 @@ var renderTimeSliderRailWithNeedle = function renderTimeSliderRailWithNeedle(ctx
16165
15915
  drawNewNeedleLabel(ctx, selected, selectedPx, animationStartPx, animationEndPx, scale, theme);
16166
15916
  };
16167
15917
 
16168
- var useStyles$7 = makeStyles({
16169
- timeSliderRail: {
16170
- '& div': {
16171
- outline: 'none'
16172
- },
16173
- height: '45px',
16174
- '& canvas': {
16175
- display: 'block'
16176
- }
16177
- }
16178
- });
16179
-
16180
15918
  var setPreviousTimeStep = function setPreviousTimeStep(timeStep, curTime, dataStartTime, onSetNewDate) {
16181
15919
  var prevTimeStep = moment.utc(curTime).subtract(timeStep, 'm').toISOString();
16182
15920
  if (!prevTimeStep) return;
@@ -16214,7 +15952,6 @@ var TimeSliderRail = function TimeSliderRail(_ref) {
16214
15952
  onSetAnimationEndTime = _ref.onSetAnimationEndTime,
16215
15953
  onSetNewDate = _ref.onSetNewDate,
16216
15954
  onSetCenterTime = _ref.onSetCenterTime;
16217
- var classes = useStyles$7();
16218
15955
  var ZOOM_RATIO = 1.1;
16219
15956
 
16220
15957
  var zoomOut = function zoomOut(relativeX) {
@@ -16433,12 +16170,20 @@ var TimeSliderRail = function TimeSliderRail(_ref) {
16433
16170
 
16434
16171
  }, [selectedTimeUnix]);
16435
16172
  var theme = useTheme();
16436
- return /*#__PURE__*/React.createElement("div", {
16437
- className: classes.timeSliderRail,
16173
+ return /*#__PURE__*/React.createElement(Box, {
16438
16174
  style: {
16439
16175
  cursor: cursorStyle
16440
16176
  },
16441
- "data-testid": "timeSliderRail"
16177
+ "data-testid": "timeSliderRail",
16178
+ sx: {
16179
+ '& div': {
16180
+ outline: 'none'
16181
+ },
16182
+ height: '45px',
16183
+ '& canvas': {
16184
+ display: 'block'
16185
+ }
16186
+ }
16442
16187
  }, /*#__PURE__*/React.createElement(CanvasComponent, {
16443
16188
  ref: node,
16444
16189
  onMouseDown: onMouseDown,
@@ -16496,19 +16241,9 @@ var TimeSliderRail = function TimeSliderRail(_ref) {
16496
16241
  * See the License for the specific language governing permissions and
16497
16242
  * limitations under the License.
16498
16243
  *
16499
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16500
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
16244
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16245
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
16501
16246
  * */
16502
- var useStyles$6 = makeStyles({
16503
- container: {
16504
- display: 'grid',
16505
- gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
16506
- gridTemplateRows: '50px'
16507
- },
16508
- scaleSlider: {
16509
- height: '50px'
16510
- }
16511
- });
16512
16247
 
16513
16248
  var useTimeSliderKeyBoardControl = function useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider) {
16514
16249
  React.useEffect(function () {
@@ -16545,12 +16280,15 @@ var TimeSlider = function TimeSlider(_ref) {
16545
16280
  isVisible = _ref$isVisible === void 0 ? true : _ref$isVisible,
16546
16281
  _ref$onToggleTimeSlid = _ref.onToggleTimeSlider,
16547
16282
  onToggleTimeSlider = _ref$onToggleTimeSlid === void 0 ? function () {} : _ref$onToggleTimeSlid;
16548
- var styles = useStyles$6();
16549
16283
  useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider);
16550
16284
  return isVisible ? /*#__PURE__*/React.createElement(Grid, {
16551
16285
  container: true,
16552
- className: styles.container,
16553
- "data-testid": "timeSlider"
16286
+ "data-testid": "timeSlider",
16287
+ sx: {
16288
+ display: 'grid',
16289
+ gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
16290
+ gridTemplateRows: '50px'
16291
+ }
16554
16292
  }, /*#__PURE__*/React.createElement(Grid, {
16555
16293
  item: true
16556
16294
  }, " ", buttons || /*#__PURE__*/React.createElement(TimeSliderButtons, null), " "), /*#__PURE__*/React.createElement(Grid, {
@@ -16560,7 +16298,9 @@ var TimeSlider = function TimeSlider(_ref) {
16560
16298
  mapIsActive: mapIsActive
16561
16299
  })), ' '), /*#__PURE__*/React.createElement(Grid, {
16562
16300
  item: true,
16563
- className: styles.scaleSlider
16301
+ sx: {
16302
+ height: '50px'
16303
+ }
16564
16304
  }, scaleSlider || /*#__PURE__*/React.createElement(TimeSliderScaleSlider, Object.assign({}, defaultProps, {
16565
16305
  selectedTime: defaultProps.selectedTime.unix(),
16566
16306
  timeSliderScale: Scale.Hour,
@@ -16789,20 +16529,11 @@ var OptionsMenuButtonConnect = function OptionsMenuButtonConnect(_ref) {
16789
16529
  var TimeSliderButtonsConnect = function TimeSliderButtonsConnect(_ref) {
16790
16530
  var mapId = _ref.mapId;
16791
16531
  return /*#__PURE__*/React.createElement(TimeSliderButtons, {
16792
- autoUpdateBtn: /*#__PURE__*/React.createElement(AutoUpdateButtonConnect, {
16793
- mapId: mapId
16794
- }),
16795
16532
  optionsMenuBtn: /*#__PURE__*/React.createElement(OptionsMenuButtonConnect, {
16796
16533
  mapId: mapId
16797
16534
  }),
16798
16535
  playBtn: /*#__PURE__*/React.createElement(PlayButtonConnect, {
16799
16536
  mapId: mapId
16800
- }),
16801
- speedBtn: /*#__PURE__*/React.createElement(SpeedButtonConnect, {
16802
- mapId: mapId
16803
- }),
16804
- timeStepBtn: /*#__PURE__*/React.createElement(TimeStepButtonComponent, {
16805
- mapId: mapId
16806
16537
  })
16807
16538
  });
16808
16539
  };
@@ -17245,29 +16976,25 @@ var TimeSliderConnect = connectRedux(ConnectedTimeSlider);
17245
16976
  * See the License for the specific language governing permissions and
17246
16977
  * limitations under the License.
17247
16978
  *
17248
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17249
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
16979
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16980
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
17250
16981
  * */
17251
- var useStyles$5 = makeStyles({
17252
- MapViewLayer: {
17253
- width: '100%',
17254
- padding: '2px',
17255
- margin: 0,
17256
- wordWrap: 'break-word',
17257
- border: '1px solid rgba(0, 0, 0, 0.5)',
17258
- lineHeight: '14px',
17259
- fontSize: '10px',
17260
- background: 'rgba(255, 255, 255, 0.5)',
17261
- display: 'none'
17262
- }
17263
- });
17264
16982
 
17265
16983
  var MapViewLayer = function MapViewLayer(props) {
17266
16984
  var id = props.id;
17267
- var classes = useStyles$5();
17268
- return /*#__PURE__*/React.createElement("div", {
16985
+ return /*#__PURE__*/React.createElement(Box, {
17269
16986
  "data-testid": "mapViewLayer",
17270
- className: classes.MapViewLayer
16987
+ sx: {
16988
+ width: '100%',
16989
+ padding: '2px',
16990
+ margin: 0,
16991
+ wordWrap: 'break-word',
16992
+ border: '1px solid rgba(0, 0, 0, 0.5)',
16993
+ lineHeight: '14px',
16994
+ fontSize: '10px',
16995
+ background: 'rgba(255, 255, 255, 0.5)',
16996
+ display: 'none'
16997
+ }
17271
16998
  }, /*#__PURE__*/React.createElement("div", null, id), /*#__PURE__*/React.createElement("div", {
17272
16999
  // eslint-disable-next-line react/no-danger
17273
17000
  dangerouslySetInnerHTML: {
@@ -18565,12 +18292,12 @@ var AdagucMapDraw = /*#__PURE__*/function (_React$PureComponent) {
18565
18292
 
18566
18293
  if (onHoverFeature) {
18567
18294
  var handleMouseStoppedTimer = function handleMouseStoppedTimer() {
18568
- var result = checkHoverFeatures(_this2.geojson, mouseX, mouseY, function (coordinates) {
18295
+ var result = checkHoverFeatures(_this2.geojson, _this2.mouseX, _this2.mouseY, function (coordinates) {
18569
18296
  return _this2.convertGeoCoordsToScreenCoords(coordinates);
18570
18297
  });
18571
18298
 
18572
18299
  if (result) {
18573
- var featureEvent = {
18300
+ _this2.featureEvent = {
18574
18301
  coordinateIndexInFeature: result.coordinateIndexInFeature,
18575
18302
  featureIndex: result.featureIndex,
18576
18303
  mouseX: mouseX,
@@ -18578,8 +18305,13 @@ var AdagucMapDraw = /*#__PURE__*/function (_React$PureComponent) {
18578
18305
  isInEditMode: isInEditMode,
18579
18306
  feature: result.feature
18580
18307
  };
18581
- onHoverFeature(featureEvent);
18308
+ onHoverFeature(_this2.featureEvent);
18309
+ } else {
18310
+ _this2.featureEvent = undefined;
18582
18311
  }
18312
+
18313
+ var webmapjs = _this2.props.webmapjs;
18314
+ webmapjs && webmapjs.draw('AdagucMapDraw::onHoverFeature');
18583
18315
  };
18584
18316
 
18585
18317
  window.clearTimeout(this.mouseStoppedTimer);
@@ -19728,6 +19460,7 @@ var AdagucMapDraw = /*#__PURE__*/function (_React$PureComponent) {
19728
19460
  var drawMarkerByDefault = !featureProperties || !featureProperties.imageURL || !featureProperties.drawFunction;
19729
19461
 
19730
19462
  if (featureProperties.drawFunction) {
19463
+ var isHovered = this.featureEvent && this.featureEvent.feature === feature;
19731
19464
  featureProperties.drawFunction({
19732
19465
  context: ctx,
19733
19466
  featureIndex: featureIndex,
@@ -19737,7 +19470,8 @@ var AdagucMapDraw = /*#__PURE__*/function (_React$PureComponent) {
19737
19470
  isInEditMode: isInEditMode,
19738
19471
  feature: feature,
19739
19472
  mouseX: this.mouseX,
19740
- mouseY: this.mouseY
19473
+ mouseY: this.mouseY,
19474
+ isHovered: isHovered
19741
19475
  });
19742
19476
  } else if (drawStyledMarker || drawMarkerByDefault) {
19743
19477
  this.drawMarker(ctx, _coord, selected, middle, isInEditMode, featureProperties);
@@ -21048,22 +20782,9 @@ ReactMapView.defaultProps = {
21048
20782
  * See the License for the specific language governing permissions and
21049
20783
  * limitations under the License.
21050
20784
  *
21051
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21052
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
20785
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
20786
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21053
20787
  * */
21054
- var useStyles$4 = makeStyles(function () {
21055
- return {
21056
- mapTimeContainer: {
21057
- zIndex: 10,
21058
- justifySelf: 'center',
21059
- bottom: 12,
21060
- position: 'absolute'
21061
- },
21062
- mapTimeText: {
21063
- fontWeight: 500
21064
- }
21065
- };
21066
- });
21067
20788
  var getTimeDimension = function getTimeDimension(dimensions) {
21068
20789
  return dimensions.find(function (dimension) {
21069
20790
  return dimension.name === 'time' && dimension.currentValue !== undefined;
@@ -21078,7 +20799,6 @@ var MapTime = function MapTime(_ref) {
21078
20799
  var dimensions = _ref.dimensions,
21079
20800
  _ref$timeFormat = _ref.timeFormat,
21080
20801
  timeFormat = _ref$timeFormat === void 0 ? defaultTimeFormat : _ref$timeFormat;
21081
- var classes = useStyles$4();
21082
20802
  var timeDimension = getTimeDimension(dimensions);
21083
20803
 
21084
20804
  if (!timeDimension) {
@@ -21086,12 +20806,19 @@ var MapTime = function MapTime(_ref) {
21086
20806
  }
21087
20807
 
21088
20808
  var mapTime = formatTime(timeDimension.currentValue, timeFormat);
21089
- return /*#__PURE__*/React.createElement("div", {
20809
+ return /*#__PURE__*/React.createElement(Box, {
21090
20810
  "data-testid": "map-time",
21091
- className: classes.mapTimeContainer
20811
+ sx: {
20812
+ zIndex: 10,
20813
+ justifySelf: 'center',
20814
+ bottom: '12px',
20815
+ position: 'absolute'
20816
+ }
21092
20817
  }, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Typography, {
21093
20818
  variant: "caption",
21094
- className: classes.mapTimeText
20819
+ sx: {
20820
+ fontWeight: 500
20821
+ }
21095
20822
  }, mapTime)));
21096
20823
  };
21097
20824
 
@@ -21108,24 +20835,9 @@ var MapTime = function MapTime(_ref) {
21108
20835
  * See the License for the specific language governing permissions and
21109
20836
  * limitations under the License.
21110
20837
  *
21111
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21112
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
20838
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
20839
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21113
20840
  * */
21114
- var useStyles$3 = makeStyles(function () {
21115
- return {
21116
- mapViewContainer: {
21117
- display: 'grid',
21118
- width: '100%',
21119
- height: '100%',
21120
- position: 'relative',
21121
- overflow: 'hidden'
21122
- },
21123
- mapView: {
21124
- gridColumnStart: 1,
21125
- gridRowStart: 1
21126
- }
21127
- };
21128
- });
21129
20841
 
21130
20842
  var MapView = function MapView(_a) {
21131
20843
  var children = _a.children,
@@ -21137,11 +20849,16 @@ var MapView = function MapView(_a) {
21137
20849
  displayTimeInMap = _a$displayTimeInMap === void 0 ? true : _a$displayTimeInMap,
21138
20850
  props = __rest(_a, ["children", "controls", "displayTimeInMap"]);
21139
20851
 
21140
- var classes = useStyles$3();
21141
20852
  var dimensions = props.dimensions;
21142
20853
  var adagucRef = React.useRef(null);
21143
- return /*#__PURE__*/React.createElement("div", {
21144
- className: classes.mapViewContainer
20854
+ return /*#__PURE__*/React.createElement(Box, {
20855
+ sx: {
20856
+ display: 'grid',
20857
+ width: '100%',
20858
+ height: '100%',
20859
+ position: 'relative',
20860
+ overflow: 'hidden'
20861
+ }
21145
20862
  }, controls && controls.zoomControls && /*#__PURE__*/React.createElement(MapControls, {
21146
20863
  style: {
21147
20864
  top: 0,
@@ -21157,8 +20874,11 @@ var MapView = function MapView(_a) {
21157
20874
  onZoomReset: function onZoomReset() {
21158
20875
  return adagucRef.current.zoomToLayer(adagucRef.current.getActiveLayer());
21159
20876
  }
21160
- })), /*#__PURE__*/React.createElement("div", {
21161
- className: classes.mapView
20877
+ })), /*#__PURE__*/React.createElement(Box, {
20878
+ sx: {
20879
+ gridColumnStart: 1,
20880
+ gridRowStart: 1
20881
+ }
21162
20882
  }, /*#__PURE__*/React.createElement(ReactMapView, Object.assign({}, props, {
21163
20883
  onRegisterAdaguc: function onRegisterAdaguc(adaguc) {
21164
20884
  adagucRef.current = adaguc;
@@ -21170,6 +20890,207 @@ var MapView = function MapView(_a) {
21170
20890
  }));
21171
20891
  };
21172
20892
 
20893
+ var useTouchZoomPan = function useTouchZoomPan(mapIsActive, mapId) {
20894
+ var _React$useState = React.useState(0),
20895
+ _React$useState2 = _slicedToArray(_React$useState, 2),
20896
+ firstTouchX = _React$useState2[0],
20897
+ setFirstTouchX = _React$useState2[1];
20898
+
20899
+ var _React$useState3 = React.useState(0),
20900
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
20901
+ firstTouchY = _React$useState4[0],
20902
+ setFirstTouchY = _React$useState4[1];
20903
+
20904
+ var _React$useState5 = React.useState(0),
20905
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
20906
+ secondTouchX = _React$useState6[0],
20907
+ setSecondTouchX = _React$useState6[1];
20908
+
20909
+ var _React$useState7 = React.useState(0),
20910
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
20911
+ secondTouchY = _React$useState8[0],
20912
+ setSecondTouchY = _React$useState8[1];
20913
+
20914
+ var _React$useState9 = React.useState(0),
20915
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
20916
+ prevDist = _React$useState10[0],
20917
+ setPrevDist = _React$useState10[1];
20918
+
20919
+ var isPanning = function isPanning(touches) {
20920
+ return (touches === null || touches === void 0 ? void 0 : touches.length) === 1;
20921
+ };
20922
+
20923
+ var isZooming = function isZooming(touches) {
20924
+ return (touches === null || touches === void 0 ? void 0 : touches.length) === 2;
20925
+ };
20926
+
20927
+ var isValidMap = React.useCallback(function (map, event) {
20928
+ var target = event.target;
20929
+ return map && target.tagName !== 'INPUT' && mapIsActive;
20930
+ }, [mapIsActive]);
20931
+
20932
+ var distance = function distance(x1, y1, x2, y2) {
20933
+ var dx = x1 - x2;
20934
+ var dy = y1 - y2;
20935
+ return Math.sqrt(dx * dx + dy * dy);
20936
+ };
20937
+
20938
+ var handleStart = React.useCallback(function (event) {
20939
+ var map = getWMJSMapById(mapId);
20940
+ if (!isValidMap(map, event)) return;
20941
+ var targetTouches = event.targetTouches;
20942
+ var firstTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(0);
20943
+ setFirstTouchX(firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientX);
20944
+ setFirstTouchY(firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientY);
20945
+
20946
+ if (isZooming(targetTouches)) {
20947
+ var secondTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(1);
20948
+ setSecondTouchX(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientX);
20949
+ setSecondTouchY(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientY);
20950
+ }
20951
+ }, [isValidMap, mapId]);
20952
+ var handleMove = React.useCallback(function (event) {
20953
+ var map = getWMJSMapById(mapId);
20954
+ if (!isValidMap(map, event)) return;
20955
+ event.preventDefault();
20956
+ var targetTouches = event.targetTouches;
20957
+ var firstTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(0);
20958
+ var firstX = firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientX;
20959
+ var firstY = firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientY;
20960
+ var elemWidth = firstTouch.target.clientWidth;
20961
+ var elemHeight = firstTouch.target.clientHeight;
20962
+ var distanceEps = TOUCH_PAN_STEP_PERCENTAGE * Math.min(elemWidth, elemHeight);
20963
+
20964
+ if (isPanning(targetTouches)) {
20965
+ // Pan with a one-point touch
20966
+ var dist = distance(firstTouchX, firstTouchY, firstX, firstY);
20967
+
20968
+ if (dist > distanceEps) {
20969
+ var distX = firstX - firstTouchX;
20970
+ var distY = firstY - firstTouchY;
20971
+ var unitDirX = distX / dist;
20972
+ var unitDirY = -distY / dist;
20973
+ setFirstTouchX(firstX);
20974
+ setFirstTouchY(firstY);
20975
+ map.mapPanPercentage(unitDirX * TOUCH_PAN_STEP_PERCENTAGE, unitDirY * TOUCH_PAN_STEP_PERCENTAGE);
20976
+ }
20977
+ } else if (isZooming(targetTouches)) {
20978
+ // Zoom with a two-point "pinch" touch
20979
+ setFirstTouchX(firstX);
20980
+ setFirstTouchY(firstY);
20981
+ var secondTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(1);
20982
+ setSecondTouchX(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientX);
20983
+ setSecondTouchY(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientY);
20984
+
20985
+ var _dist = distance(firstTouchX, firstTouchY, secondTouchX, secondTouchY);
20986
+
20987
+ if (Math.abs(_dist - prevDist) > distanceEps) {
20988
+ if (_dist < prevDist) {
20989
+ map.zoomOut();
20990
+ } else if (_dist > prevDist) {
20991
+ map.zoomIn(1);
20992
+ }
20993
+
20994
+ setPrevDist(_dist);
20995
+ }
20996
+ }
20997
+ }, [firstTouchX, firstTouchY, isValidMap, mapId, prevDist, secondTouchX, secondTouchY]);
20998
+ var handleEnd = React.useCallback(function () {}, []);
20999
+ React.useEffect(function () {
21000
+ document.addEventListener('touchstart', handleStart, {
21001
+ passive: false
21002
+ });
21003
+ document.addEventListener('touchmove', handleMove, {
21004
+ passive: false
21005
+ });
21006
+ document.addEventListener('touchend', handleEnd, {
21007
+ passive: false
21008
+ });
21009
+ return function () {
21010
+ document.removeEventListener('touchstart', handleStart);
21011
+ document.removeEventListener('touchmove', handleMove);
21012
+ document.removeEventListener('touchend', handleEnd);
21013
+ };
21014
+ }, [firstTouchX, firstTouchY, secondTouchX, secondTouchY, mapId, mapIsActive, prevDist, handleStart, handleMove, handleEnd]);
21015
+ };
21016
+ var TOUCH_PAN_STEP_PERCENTAGE = 0.02;
21017
+
21018
+ /* *
21019
+ * Licensed under the Apache License, Version 2.0 (the "License");
21020
+ * you may not use this file except in compliance with the License.
21021
+ * You may obtain a copy of the License at
21022
+ *
21023
+ * http://www.apache.org/licenses/LICENSE-2.0
21024
+ *
21025
+ * Unless required by applicable law or agreed to in writing, software
21026
+ * distributed under the License is distributed on an "AS IS" BASIS,
21027
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21028
+ * See the License for the specific language governing permissions and
21029
+ * limitations under the License.
21030
+ *
21031
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21032
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21033
+ * */
21034
+ var useKeyboardZoomAndPan = function useKeyboardZoomAndPan(mapIsActive, mapId) {
21035
+ React.useEffect(function () {
21036
+ var keysPressedDown = {};
21037
+
21038
+ var handleKeyPress = function handleKeyPress(event) {
21039
+ var target = event.target;
21040
+ var map = getWMJSMapById(mapId);
21041
+
21042
+ if (map && target.tagName !== 'INPUT' && mapIsActive) {
21043
+ var key = event.key,
21044
+ type = event.type;
21045
+ keysPressedDown[key] = type === 'keydown';
21046
+
21047
+ if (keysPressedDown['+']) {
21048
+ map.zoomIn(1);
21049
+ } else if (keysPressedDown['-']) {
21050
+ map.zoomOut();
21051
+ }
21052
+
21053
+ var arrowRight = keysPressedDown['ArrowRight'];
21054
+ var arrowLeft = keysPressedDown['ArrowLeft'];
21055
+ var arrowUp = keysPressedDown['ArrowUp'];
21056
+ var arrowDown = keysPressedDown['ArrowDown'];
21057
+ var control = keysPressedDown['Control'];
21058
+
21059
+ if (!control && (arrowRight || arrowLeft || arrowUp || arrowDown)) {
21060
+ var x = 0;
21061
+ var y = 0;
21062
+
21063
+ if (arrowRight) {
21064
+ x -= PAN_STEP_PERCENTAGE;
21065
+ }
21066
+
21067
+ if (arrowLeft) {
21068
+ x += PAN_STEP_PERCENTAGE;
21069
+ }
21070
+
21071
+ if (arrowUp) {
21072
+ y -= PAN_STEP_PERCENTAGE;
21073
+ }
21074
+
21075
+ if (arrowDown) {
21076
+ y += PAN_STEP_PERCENTAGE;
21077
+ }
21078
+
21079
+ map.mapPanPercentage(x, y);
21080
+ }
21081
+ }
21082
+ };
21083
+
21084
+ document.addEventListener('keydown', handleKeyPress);
21085
+ document.addEventListener('keyup', handleKeyPress);
21086
+ return function () {
21087
+ document.removeEventListener('keydown', handleKeyPress);
21088
+ document.removeEventListener('keyup', handleKeyPress);
21089
+ };
21090
+ }, [mapIsActive, mapId]);
21091
+ };
21092
+ var PAN_STEP_PERCENTAGE = 0.02;
21093
+
21173
21094
  /* *
21174
21095
  * Licensed under the Apache License, Version 2.0 (the "License");
21175
21096
  * you may not use this file except in compliance with the License.
@@ -21286,7 +21207,14 @@ var MapViewConnect = function MapViewConnect(_a) {
21286
21207
  var setSelectedFeature = React.useCallback(function (payload) {
21287
21208
  dispatch(mapActions$1.setSelectedFeature(payload));
21288
21209
  }, [dispatch]);
21289
- useKeyboardZoomAndPan(mapId);
21210
+ var activeWindowId = useSelector(getActiveWindowId);
21211
+
21212
+ var isActiveWindowId = function isActiveWindowId() {
21213
+ return activeWindowId === mapId;
21214
+ };
21215
+
21216
+ useKeyboardZoomAndPan(isActiveWindowId(), mapId);
21217
+ useTouchZoomPan(isActiveWindowId(), mapId);
21290
21218
  return /*#__PURE__*/React.createElement("div", {
21291
21219
  style: {
21292
21220
  height: '100%'
@@ -21382,69 +21310,6 @@ var MapViewConnect = function MapViewConnect(_a) {
21382
21310
  }), children));
21383
21311
  };
21384
21312
 
21385
- var useKeyboardZoomAndPan = function useKeyboardZoomAndPan(mapId) {
21386
- var activeWindowId = useSelector(getActiveWindowId);
21387
- var mapIsActive = activeWindowId === mapId;
21388
- React.useEffect(function () {
21389
- var keysPressedDown = {};
21390
-
21391
- var handleKeyPress = function handleKeyPress(event) {
21392
- var target = event.target;
21393
- var map = getWMJSMapById(mapId);
21394
-
21395
- if (map && target.tagName !== 'INPUT' && mapIsActive) {
21396
- var key = event.key,
21397
- type = event.type;
21398
- keysPressedDown[key] = type === 'keydown';
21399
-
21400
- if (keysPressedDown['+']) {
21401
- map.zoomIn(1);
21402
- } else if (keysPressedDown['-']) {
21403
- map.zoomOut();
21404
- }
21405
-
21406
- var arrowRight = keysPressedDown['ArrowRight'];
21407
- var arrowLeft = keysPressedDown['ArrowLeft'];
21408
- var arrowUp = keysPressedDown['ArrowUp'];
21409
- var arrowDown = keysPressedDown['ArrowDown'];
21410
- var control = keysPressedDown['Control'];
21411
-
21412
- if (!control && (arrowRight || arrowLeft || arrowUp || arrowDown)) {
21413
- var x = 0;
21414
- var y = 0;
21415
-
21416
- if (arrowRight) {
21417
- x -= PAN_STEP_PERCENTAGE;
21418
- }
21419
-
21420
- if (arrowLeft) {
21421
- x += PAN_STEP_PERCENTAGE;
21422
- }
21423
-
21424
- if (arrowUp) {
21425
- y -= PAN_STEP_PERCENTAGE;
21426
- }
21427
-
21428
- if (arrowDown) {
21429
- y += PAN_STEP_PERCENTAGE;
21430
- }
21431
-
21432
- map.mapPanPercentage(x, y);
21433
- }
21434
- }
21435
- };
21436
-
21437
- document.addEventListener('keydown', handleKeyPress);
21438
- document.addEventListener('keyup', handleKeyPress);
21439
- return function () {
21440
- document.removeEventListener('keydown', handleKeyPress);
21441
- document.removeEventListener('keyup', handleKeyPress);
21442
- };
21443
- }, [mapIsActive, mapId]);
21444
- };
21445
-
21446
- var PAN_STEP_PERCENTAGE = 0.02;
21447
-
21448
21313
  /* *
21449
21314
  * Licensed under the Apache License, Version 2.0 (the "License");
21450
21315
  * you may not use this file except in compliance with the License.
@@ -21645,20 +21510,20 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_a) {
21645
21510
  * See the License for the specific language governing permissions and
21646
21511
  * limitations under the License.
21647
21512
  *
21648
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21649
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
21513
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21514
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21650
21515
  * */
21651
- var useStyles$2 = makeStyles(function (theme) {
21516
+
21517
+ var mapBoxStyle = function mapBoxStyle(theme) {
21652
21518
  return {
21653
- box: {
21654
- boxSizing: 'border-box',
21655
- "float": 'left',
21656
- '& .MapViewComponent': {
21657
- border: "1px solid ".concat(theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled)
21658
- }
21519
+ boxSizing: 'border-box',
21520
+ "float": 'left',
21521
+ '& .MapViewComponent': {
21522
+ border: "1px solid ".concat(theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled)
21659
21523
  }
21660
21524
  };
21661
- });
21525
+ };
21526
+
21662
21527
  var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
21663
21528
  var maps = _ref.maps,
21664
21529
  rows = _ref.rows,
@@ -21669,7 +21534,6 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
21669
21534
  showZoomControls = _ref$showZoomControls === void 0 ? true : _ref$showZoomControls,
21670
21535
  _ref$multiLegend = _ref.multiLegend,
21671
21536
  multiLegend = _ref$multiLegend === void 0 ? false : _ref$multiLegend;
21672
- var classes = useStyles$2();
21673
21537
  var dispatch = useDispatch();
21674
21538
  var syncGroupAddTarget = React__default.useCallback(function (payload) {
21675
21539
  dispatch(genericActions.syncGroupAddTarget(payload));
@@ -21714,10 +21578,10 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
21714
21578
  multiLegend: multiLegend
21715
21579
  }), maps.map(function (map, mapIndex) {
21716
21580
  var mapId = map.id;
21717
- return /*#__PURE__*/React__default.createElement("div", {
21718
- className: classes.box,
21581
+ return /*#__PURE__*/React__default.createElement(Box, {
21719
21582
  key: mapId,
21720
- style: mapStyle
21583
+ style: mapStyle,
21584
+ sx: mapBoxStyle
21721
21585
  }, /*#__PURE__*/React__default.createElement(ConfigurableMapConnect, {
21722
21586
  title: map.title,
21723
21587
  id: mapId,
@@ -22006,18 +21870,32 @@ var componentsLookUp = function componentsLookUp(_ref) {
22006
21870
  * See the License for the specific language governing permissions and
22007
21871
  * limitations under the License.
22008
21872
  *
22009
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22010
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
21873
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21874
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
22011
21875
  * */
21876
+ var styles = {
21877
+ listItem: {
21878
+ width: '80%',
21879
+ borderRadius: '5px'
21880
+ },
21881
+ isActive: {
21882
+ color: 'geowebColors.typographyAndIcons.icon'
21883
+ },
21884
+ checkboxIsActive: {
21885
+ color: 'geowebColors.typographyAndIcons.iconLinkActive'
21886
+ },
21887
+ isDisabled: {
21888
+ color: 'geowebColors.typographyAndIcons.iconLinkDisabled'
21889
+ }
21890
+ };
22012
21891
  var SyncGroupListItem = function SyncGroupListItem(_ref) {
22013
21892
  var viewStateData = _ref.viewStateData,
22014
21893
  groupId = _ref.groupId,
22015
21894
  selected = _ref.selected,
22016
21895
  sourcesById = _ref.sourcesById,
22017
21896
  handleToggle = _ref.handleToggle;
22018
- var classes = useStyles$1();
22019
- return /*#__PURE__*/React.createElement("div", {
22020
- className: classes.listItem
21897
+ return /*#__PURE__*/React.createElement(Box, {
21898
+ sx: styles.listItem
22021
21899
  }, sourcesById.map(function (source) {
22022
21900
  var isChecked = selected.includes(source.id); // Check if checkbox is checked in another group
22023
21901
 
@@ -22031,7 +21909,7 @@ var SyncGroupListItem = function SyncGroupListItem(_ref) {
22031
21909
  onClick: function onClick() {
22032
21910
  return handleToggle(source.id);
22033
21911
  },
22034
- className: classes.listItem
21912
+ sx: styles.listItem
22035
21913
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Checkbox, {
22036
21914
  edge: "start",
22037
21915
  checked: isChecked,
@@ -22040,30 +21918,13 @@ var SyncGroupListItem = function SyncGroupListItem(_ref) {
22040
21918
  inputProps: {
22041
21919
  'aria-labelledby': source.name
22042
21920
  },
22043
- className: isNotCheckedElseWhere ? classes.checkboxIsActive : classes.isDisabled,
21921
+ sx: isNotCheckedElseWhere ? styles.checkboxIsActive : styles.isDisabled,
22044
21922
  color: "default"
22045
21923
  })), /*#__PURE__*/React.createElement(Typography, {
22046
- className: isNotCheckedElseWhere ? classes.isActive : classes.isDisabled
21924
+ sx: isNotCheckedElseWhere ? styles.isActive : styles.isDisabled
22047
21925
  }, source.name));
22048
21926
  }));
22049
21927
  };
22050
- var useStyles$1 = makeStyles(function (theme) {
22051
- return createStyles({
22052
- listItem: {
22053
- width: '80%',
22054
- borderRadius: '5px'
22055
- },
22056
- isActive: {
22057
- color: theme.palette.geowebColors.typographyAndIcons.icon
22058
- },
22059
- checkboxIsActive: {
22060
- color: theme.palette.geowebColors.typographyAndIcons.iconLinkActive
22061
- },
22062
- isDisabled: {
22063
- color: theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
22064
- }
22065
- });
22066
- });
22067
21928
 
22068
21929
  /* *
22069
21930
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -22078,8 +21939,8 @@ var useStyles$1 = makeStyles(function (theme) {
22078
21939
  * See the License for the specific language governing permissions and
22079
21940
  * limitations under the License.
22080
21941
  *
22081
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22082
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
21942
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21943
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
22083
21944
  * */
22084
21945
  var SyncGroupList = function SyncGroupList(_ref) {
22085
21946
  var viewStateData = _ref.viewStateData,
@@ -22087,15 +21948,26 @@ var SyncGroupList = function SyncGroupList(_ref) {
22087
21948
  _handleToggle = _ref.handleToggle,
22088
21949
  addNewGroup = _ref.addNewGroup,
22089
21950
  removeGroup = _ref.removeGroup;
22090
- var classes = useStyles();
22091
21951
  return /*#__PURE__*/React.createElement(List, {
22092
21952
  disablePadding: true
22093
21953
  }, viewStateData.groups.map(function (groupObject, index) {
22094
21954
  return /*#__PURE__*/React.createElement(Box, {
22095
21955
  key: groupObject.id,
22096
- className: index === 0 ? null : classes.childListItem
22097
- }, /*#__PURE__*/React.createElement("div", {
22098
- className: classes.syncGroupHeader
21956
+ sx: Object.assign({}, index !== 0 && {
21957
+ backgroundColor: 'geowebColors.syncGroups.drawerOpen.fill',
21958
+ boxShadow: 'inset 0px 7px 7px -7px, inset 0px -7px 7px -7px',
21959
+ color: '#000000'
21960
+ })
21961
+ }, /*#__PURE__*/React.createElement(Box, {
21962
+ sx: {
21963
+ display: 'flex',
21964
+ flexDirection: 'row',
21965
+ justifyContent: 'space-between',
21966
+ alignItems: 'center',
21967
+ color: 'geowebColors.typographyAndIcons.text',
21968
+ paddingLeft: '15px',
21969
+ paddingTop: '10px'
21970
+ }
22099
21971
  }, /*#__PURE__*/React.createElement(Typography, null, title), /*#__PURE__*/React.createElement(Tooltip, {
22100
21972
  title: index === 0 ? 'Add new group to list' : 'Remove group from list'
22101
21973
  }, /*#__PURE__*/React.createElement(IconButton, {
@@ -22120,24 +21992,6 @@ var SyncGroupList = function SyncGroupList(_ref) {
22120
21992
  }));
22121
21993
  }));
22122
21994
  };
22123
- var useStyles = makeStyles(function (theme) {
22124
- return createStyles({
22125
- syncGroupHeader: {
22126
- display: 'flex',
22127
- flexDirection: 'row',
22128
- justifyContent: 'space-between',
22129
- alignItems: 'center',
22130
- color: theme.palette.geowebColors.typographyAndIcons.text,
22131
- paddingLeft: '15px',
22132
- paddingTop: '10px'
22133
- },
22134
- childListItem: {
22135
- backgroundColor: theme.palette.geowebColors.syncGroups.drawerOpen.fill,
22136
- boxShadow: 'inset 0px 7px 7px -7px, inset 0px -7px 7px -7px',
22137
- color: '#000000'
22138
- }
22139
- });
22140
- });
22141
21995
 
22142
21996
  var SyncGroupViewer = function SyncGroupViewer(_ref) {
22143
21997
  var onClose = _ref.onClose,
@@ -22566,6 +22420,90 @@ var CoreThemeStoreProvider = function CoreThemeStoreProvider(_ref2) {
22566
22420
  }, children)));
22567
22421
  };
22568
22422
 
22423
+ /* *
22424
+ * Licensed under the Apache License, Version 2.0 (the "License");
22425
+ * you may not use this file except in compliance with the License.
22426
+ * You may obtain a copy of the License at
22427
+ *
22428
+ * http://www.apache.org/licenses/LICENSE-2.0
22429
+ *
22430
+ * Unless required by applicable law or agreed to in writing, software
22431
+ * distributed under the License is distributed on an "AS IS" BASIS,
22432
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22433
+ * See the License for the specific language governing permissions and
22434
+ * limitations under the License.
22435
+ *
22436
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22437
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
22438
+ * */
22439
+ var SnackbarWrapper = function SnackbarWrapper(_a) {
22440
+ var children = _a.children,
22441
+ isOpen = _a.isOpen,
22442
+ onCloseSnackbar = _a.onCloseSnackbar,
22443
+ id = _a.id,
22444
+ props = __rest(_a, ["children", "isOpen", "onCloseSnackbar", "id"]);
22445
+
22446
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(Snackbar, Object.assign({
22447
+ "data-testid": "snackbarComponent",
22448
+ open: isOpen,
22449
+ onClose: onCloseSnackbar,
22450
+ autoHideDuration: null,
22451
+ key: id,
22452
+ ClickAwayListenerProps: {
22453
+ mouseEvent: false
22454
+ },
22455
+ action: /*#__PURE__*/React.createElement(IconButton, {
22456
+ "aria-label": "close",
22457
+ "data-testid": "snackbarCloseButton",
22458
+ onClick: onCloseSnackbar,
22459
+ sx: {
22460
+ color: 'geowebColors.snackbar.action',
22461
+ '&:hover': {
22462
+ backgroundColor: 'geowebColors.snackbar.actionHover.rgba'
22463
+ }
22464
+ }
22465
+ }, /*#__PURE__*/React.createElement(Close, null))
22466
+ }, props)));
22467
+ };
22468
+
22469
+ /* *
22470
+ * Licensed under the Apache License, Version 2.0 (the "License");
22471
+ * you may not use this file except in compliance with the License.
22472
+ * You may obtain a copy of the License at
22473
+ *
22474
+ * http://www.apache.org/licenses/LICENSE-2.0
22475
+ *
22476
+ * Unless required by applicable law or agreed to in writing, software
22477
+ * distributed under the License is distributed on an "AS IS" BASIS,
22478
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22479
+ * See the License for the specific language governing permissions and
22480
+ * limitations under the License.
22481
+ *
22482
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22483
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
22484
+ * */
22485
+ var SnackbarWrapperConnect = function SnackbarWrapperConnect(_a) {
22486
+ var props = __rest(_a, []);
22487
+
22488
+ var dispatch = useDispatch();
22489
+
22490
+ var onCloseSnackbar = function onCloseSnackbar() {
22491
+ dispatch(snackbarActions.closeSnackbar());
22492
+ };
22493
+
22494
+ var currentSnackbarMessage = useSelector(function (store) {
22495
+ return getFirstSnackbarMessage(store);
22496
+ });
22497
+ return /*#__PURE__*/React.createElement(DynamicModuleLoader, {
22498
+ modules: [snackbarModuleConfig]
22499
+ }, /*#__PURE__*/React.createElement(SnackbarWrapper, Object.assign({
22500
+ isOpen: !!currentSnackbarMessage,
22501
+ onCloseSnackbar: onCloseSnackbar,
22502
+ message: currentSnackbarMessage ? currentSnackbarMessage.message : '',
22503
+ id: currentSnackbarMessage ? currentSnackbarMessage.id : ''
22504
+ }, props)));
22505
+ };
22506
+
22569
22507
  /* *
22570
22508
  * Licensed under the Apache License, Version 2.0 (the "License");
22571
22509
  * you may not use this file except in compliance with the License.
@@ -22583,7 +22521,9 @@ var CoreThemeStoreProvider = function CoreThemeStoreProvider(_ref2) {
22583
22521
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
22584
22522
  * */
22585
22523
  var MapWarningProperties = function MapWarningProperties(_ref) {
22586
- var selectedFeatureProperties = _ref.selectedFeatureProperties;
22524
+ var selectedFeatureProperties = _ref.selectedFeatureProperties,
22525
+ languageIndex = _ref.languageIndex;
22526
+ var language = languageIndex || 0;
22587
22527
  return /*#__PURE__*/React__default.createElement("div", {
22588
22528
  "data-testid": "map-warning-properties",
22589
22529
  style: {
@@ -22602,13 +22542,13 @@ var MapWarningProperties = function MapWarningProperties(_ref) {
22602
22542
  "data-testid": "map-warning-properties-title"
22603
22543
  }, selectedFeatureProperties.areaDesc), selectedFeatureProperties.areaDesc && /*#__PURE__*/React__default.createElement("pre", {
22604
22544
  "data-testid": "map-warning-properties-row"
22605
- }, "event: ", selectedFeatureProperties.languages[2].event), selectedFeatureProperties.onset && /*#__PURE__*/React__default.createElement("pre", {
22545
+ }, "event: ", selectedFeatureProperties.languages[language].event), selectedFeatureProperties.onset && /*#__PURE__*/React__default.createElement("pre", {
22606
22546
  "data-testid": "map-warning-properties-row"
22607
22547
  }, "Sent:", ' ', moment.utc(selectedFeatureProperties.onset).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.expires && /*#__PURE__*/React__default.createElement("pre", {
22608
22548
  "data-testid": "map-warning-properties-row"
22609
- }, "Expires:", ' ', moment.utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[2].senderName && /*#__PURE__*/React__default.createElement("pre", {
22549
+ }, "Expires:", ' ', moment.utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[language].senderName && /*#__PURE__*/React__default.createElement("pre", {
22610
22550
  "data-testid": "map-warning-properties-row"
22611
- }, "Sender: ", selectedFeatureProperties.languages[2].senderName), selectedFeatureProperties.identifier && /*#__PURE__*/React__default.createElement("pre", {
22551
+ }, "Sender: ", selectedFeatureProperties.languages[language].senderName), selectedFeatureProperties.identifier && /*#__PURE__*/React__default.createElement("pre", {
22612
22552
  "data-testid": "map-warning-properties-row"
22613
22553
  }, "Identifier: ", selectedFeatureProperties.identifier));
22614
22554
  };
@@ -22631,4 +22571,4 @@ var MapWarningProperties = function MapWarningProperties(_ref) {
22631
22571
  * */
22632
22572
  var mapActions = Object.assign(Object.assign(Object.assign({}, layerActions), mapActions$1), serviceActions);
22633
22573
 
22634
- export { ConfigurableMapConnect, CoreThemeProvider, CoreThemeStoreProvider, HarmonieTempAndPrecipPreset, LayerManagerConnect, LayerManagerMapButtonConnect, Legend, LegendConnect, LegendMapButtonConnect, MapControls, MapView, MapViewConnect, MapViewLayer, MapWarningProperties, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, ReactMapView, ReactMapViewLayer, SyncGroupViewerConnect, index as SyncGroups, TimeSliderConnect, ZoomControlConnect, ZoomControls, componentsLookUp, coreModuleConfig, dateFormat, defaultBbox, defaultConfigurations, filterLayers, filterMapPresets, filterNonTimeDimensions, filterServices, generateLayerId, generateMapId, generateTimesliderId, getFirstTimeStepForLayerId, getInitialAppPresets, getLastTimeStepForLayerId, getNextTimeStepForLayerId, getPreviousTimeStepForLayerId, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSTimeDimensionForLayerId, getWMLayerById, layerActions, reducer$6 as layerReducer, mapActions, moduleConfig as mapModuleConfig, selectors as mapSelectors, types$2 as mapTypes, utils as mapUtils, parseBoolean, parseLayer, publicLayers, publicServices, registerWMJSMap, registerWMLayer, store, genericActions as syncGroupActions, synchronizationGroupConfig as synchronizationGroupModuleConfig, synchronizationGroupConfig as synchronizationGroupsConfig, testLayers, uiActions, uiModuleConfig, selectors$1 as uiSelectors, types as uiTypes, useStyles$2 as useStyles };
22574
+ export { ConfigurableMapConnect, CoreThemeProvider, CoreThemeStoreProvider, HarmonieTempAndPrecipPreset, LayerManagerConnect, LayerManagerMapButtonConnect, Legend, LegendConnect, LegendMapButtonConnect, MapControls, MapView, MapViewConnect, MapViewLayer, MapWarningProperties, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, ReactMapView, ReactMapViewLayer, SnackbarWrapperConnect, SyncGroupViewerConnect, index as SyncGroups, TimeSliderConnect, ZoomControlConnect, ZoomControls, componentsLookUp, coreModuleConfig, dateFormat, defaultBbox, defaultConfigurations, filterLayers, filterMapPresets, filterNonTimeDimensions, filterServices, generateLayerId, generateMapId, generateTimesliderId, getFirstTimeStepForLayerId, getInitialAppPresets, getLastTimeStepForLayerId, getNextTimeStepForLayerId, getPreviousTimeStepForLayerId, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSTimeDimensionForLayerId, getWMLayerById, layerActions, reducer$6 as layerReducer, mapActions, moduleConfig as mapModuleConfig, selectors as mapSelectors, types$2 as mapTypes, utils as mapUtils, parseBoolean, parseLayer, publicLayers, publicServices, registerWMJSMap, registerWMLayer, snackbarActions, store, genericActions as syncGroupActions, synchronizationGroupConfig as synchronizationGroupModuleConfig, synchronizationGroupConfig as synchronizationGroupsConfig, testLayers, uiActions, uiModuleConfig, selectors$1 as uiSelectors, types as uiTypes };