@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.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@mui/material'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@mui/styles/makeStyles'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('@mui/styles/createStyles'), require('react-window'), require('@mui/styles/withStyles'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@mui/material', '@opengeoweb/shared', '@opengeoweb/theme', '@mui/styles/makeStyles', '@opengeoweb/webmap', 'react-sortablejs', '@mui/styles/createStyles', 'react-window', '@mui/styles/withStyles', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'redux-dynamic-modules', 'redux-dynamic-modules-saga'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.material, global.shared, global.theme, global.makeStyles, global.webmap, global.reactSortablejs, global.createStyles, global.reactWindow, global.withStyles, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.reduxDynamicModules, global.reduxDynamicModulesSaga));
5
- })(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme, makeStyles, webmap, reactSortablejs, createStyles, reactWindow, withStyles, throttleDebounce, cloneDeep, proj4, turf, reduxDynamicModules, reduxDynamicModulesSaga) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@mui/material'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('react-window'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@mui/material', '@opengeoweb/shared', '@opengeoweb/theme', '@opengeoweb/webmap', 'react-sortablejs', 'react-window', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'redux-dynamic-modules', 'redux-dynamic-modules-saga'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.material, global.shared, global.theme, global.webmap, global.reactSortablejs, global.reactWindow, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.reduxDynamicModules, global.reduxDynamicModulesSaga));
5
+ })(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme, webmap, reactSortablejs, reactWindow, throttleDebounce, cloneDeep, proj4, turf, reduxDynamicModules, reduxDynamicModulesSaga) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -29,9 +29,6 @@
29
29
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
30
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
31
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
32
- var makeStyles__default = /*#__PURE__*/_interopDefaultLegacy(makeStyles);
33
- var createStyles__default = /*#__PURE__*/_interopDefaultLegacy(createStyles);
34
- var withStyles__default = /*#__PURE__*/_interopDefaultLegacy(withStyles);
35
32
  var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
36
33
  var proj4__default = /*#__PURE__*/_interopDefaultLegacy(proj4);
37
34
  var turf__namespace = /*#__PURE__*/_interopNamespace(turf);
@@ -4693,7 +4690,7 @@
4693
4690
  ids: []
4694
4691
  };
4695
4692
  }).selectAll;
4696
- toolkit.createSelector(getCurrentSnackbarMessages, function (currentMessages) {
4693
+ var getFirstSnackbarMessage = toolkit.createSelector(getCurrentSnackbarMessages, function (currentMessages) {
4697
4694
  return currentMessages.length > 0 ? currentMessages[0] : undefined;
4698
4695
  });
4699
4696
 
@@ -7172,47 +7169,11 @@
7172
7169
  * See the License for the specific language governing permissions and
7173
7170
  * limitations under the License.
7174
7171
  *
7175
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7176
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
7172
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7173
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7177
7174
  * */
7178
7175
  var defaultCanvasWidth = 150;
7179
- var defaultCanvasHeight = 30; // TODO: remove fontFamily styles after theming is fully implemented
7180
-
7181
- var useStyles$r = makeStyles__default["default"](function (theme) {
7182
- return {
7183
- legendCanvas: {
7184
- margin: '10px 0px 10px 0px'
7185
- },
7186
- noLegendTitle: {
7187
- fontSize: '12px',
7188
- fontFamily: 'Roboto, Helvetica, Arial',
7189
- color: 'red'
7190
- },
7191
- legendComponent: {
7192
- padding: 10,
7193
- border: '1px solid grey',
7194
- display: 'inline-block',
7195
- backgroundColor: '#FFF',
7196
- overflow: 'hidden',
7197
- marginBottom: 4
7198
- },
7199
- legendTitle: {
7200
- fontFamily: 'Roboto, Helvetica, Arial',
7201
- fontSize: '10px',
7202
- minWidth: defaultCanvasWidth,
7203
- wordWrap: 'break-word',
7204
- color: theme.palette.common.black
7205
- },
7206
- legendInfo: {
7207
- fontFamily: 'Roboto, Helvetica, Arial',
7208
- fontSize: 10,
7209
- color: theme.palette.common.black,
7210
- overflowX: 'hidden',
7211
- minWidth: defaultCanvasWidth,
7212
- wordWrap: 'break-word'
7213
- }
7214
- };
7215
- });
7176
+ var defaultCanvasHeight = 30;
7216
7177
  /**
7217
7178
  * Renders a legendgraphic image based on a WMImage.
7218
7179
  *
@@ -7246,7 +7207,6 @@
7246
7207
 
7247
7208
  var Legend = function Legend(_a) {
7248
7209
  var layer = _a.layer;
7249
- var classes = useStyles$r();
7250
7210
  /* Variable to remember the previous image */
7251
7211
 
7252
7212
  var previousLegendImage = React.useRef(null);
@@ -7292,23 +7252,36 @@
7292
7252
  var wmLayer = getWMLayerById(layer.id);
7293
7253
  return /*#__PURE__*/React__default["default"].createElement(material.Paper, {
7294
7254
  "data-testid": "legend",
7295
- className: classes.legendComponent
7296
- }, /*#__PURE__*/React__default["default"].createElement("div", {
7255
+ sx: {
7256
+ padding: '10px',
7257
+ border: '1px solid grey',
7258
+ display: 'inline-block',
7259
+ backgroundColor: '#FFF',
7260
+ overflow: 'hidden',
7261
+ marginBottom: 0.5
7262
+ }
7263
+ }, /*#__PURE__*/React__default["default"].createElement(material.Box, {
7297
7264
  "data-testid": "legend-title",
7298
7265
  style: {
7299
7266
  maxWidth: canvasContainerWidth
7300
7267
  }
7301
7268
  }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
7302
- className: classes.legendTitle,
7269
+ sx: {
7270
+ fontFamily: 'Roboto, Helvetica, Arial',
7271
+ fontSize: '10px',
7272
+ minWidth: defaultCanvasWidth + "px",
7273
+ wordWrap: 'break-word',
7274
+ color: 'common.black'
7275
+ },
7303
7276
  variant: "h3"
7304
7277
  }, wmLayer && wmLayer.title)), /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
7305
7278
  title: wmLayer && wmLayer.title || 'loading',
7306
7279
  placement: "top"
7307
- }, /*#__PURE__*/React__default["default"].createElement("div", {
7308
- className: classes.legendCanvas,
7309
- style: {
7310
- height: canvasContainerHeight,
7311
- width: canvasContainerWidth
7280
+ }, /*#__PURE__*/React__default["default"].createElement(material.Box, {
7281
+ sx: {
7282
+ margin: '10px 0px 10px 0px',
7283
+ height: canvasContainerHeight + "px",
7284
+ width: canvasContainerWidth + "px"
7312
7285
  }
7313
7286
  }, /*#__PURE__*/React__default["default"].createElement(CanvasComponent, {
7314
7287
  redrawInterval: 500,
@@ -7365,16 +7338,21 @@
7365
7338
  renderLegendGraphic(previousLegendImage.current, ctx, imageWidth, imageHeight);
7366
7339
  }
7367
7340
  }
7368
- }))), /*#__PURE__*/React__default["default"].createElement("div", {
7341
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Box, {
7369
7342
  "data-testid": "legend-info",
7370
- className: classes.legendInfo,
7371
- style: {
7372
- maxWidth: canvasContainerWidth
7343
+ sx: {
7344
+ fontFamily: 'Roboto, Helvetica, Arial',
7345
+ fontSize: 10,
7346
+ color: 'common.black',
7347
+ overflowX: 'hidden',
7348
+ minWidth: defaultCanvasWidth + "px",
7349
+ wordWrap: 'break-word',
7350
+ maxWidth: canvasContainerWidth + "px"
7373
7351
  }
7374
7352
  }, layer.dimensions && layer.dimensions.map(function (dim) {
7375
- return /*#__PURE__*/React__default["default"].createElement("div", {
7353
+ return /*#__PURE__*/React__default["default"].createElement(material.Box, {
7376
7354
  key: layer.name + dim.name
7377
- }, dim.name === 'time' ? "" + dim.currentValue : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
7355
+ }, dim.name === 'time' ? "" + dim.currentValue : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Box, {
7378
7356
  style: {
7379
7357
  fontWeight: 500
7380
7358
  }
@@ -7395,23 +7373,9 @@
7395
7373
  * See the License for the specific language governing permissions and
7396
7374
  * limitations under the License.
7397
7375
  *
7398
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7399
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
7376
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7377
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7400
7378
  * */
7401
- var useStyles$q = makeStyles__default["default"](function () {
7402
- return {
7403
- legendList: {
7404
- display: 'flex',
7405
- flexDirection: 'column',
7406
- '&>div:last-child': {
7407
- marginBottom: 0
7408
- }
7409
- },
7410
- legendContainer: {
7411
- padding: 4
7412
- }
7413
- };
7414
- });
7415
7379
 
7416
7380
  var LegendDialog = function LegendDialog(_a) {
7417
7381
  var layers = _a.layers,
@@ -7426,7 +7390,6 @@
7426
7390
  order = _d === void 0 ? 0 : _d,
7427
7391
  _e = _a.source,
7428
7392
  source = _e === void 0 ? 'app' : _e;
7429
- var classes = useStyles$q();
7430
7393
  return /*#__PURE__*/React__namespace.createElement(shared.ToolContainerDraggable, {
7431
7394
  startPosition: {
7432
7395
  right: 20,
@@ -7443,11 +7406,19 @@
7443
7406
  onMouseDown: onMouseDown,
7444
7407
  order: order,
7445
7408
  source: source
7446
- }, /*#__PURE__*/React__namespace.createElement("div", {
7447
- className: classes.legendContainer
7448
- }, layers && layers.length > 0 ? /*#__PURE__*/React__namespace.createElement("div", {
7409
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
7410
+ sx: {
7411
+ padding: 0.5
7412
+ }
7413
+ }, layers && layers.length > 0 ? /*#__PURE__*/React__namespace.createElement(material.Box, {
7449
7414
  "data-testid": "LegendList",
7450
- className: classes.legendList
7415
+ sx: {
7416
+ display: 'flex',
7417
+ flexDirection: 'column',
7418
+ '&>div:last-child': {
7419
+ marginBottom: 0
7420
+ }
7421
+ }
7451
7422
  }, layers.map(function (layer) {
7452
7423
  return /*#__PURE__*/React__namespace.createElement(Legend, {
7453
7424
  key: layer.id,
@@ -8714,7 +8685,7 @@
8714
8685
  return __generator(this, function (_a) {
8715
8686
  switch (_a.label) {
8716
8687
  case 0:
8717
- snackbarMessage = capturedAction.payload.snackbarContent.message;
8688
+ snackbarMessage = capturedAction.payload.message;
8718
8689
  return [4
8719
8690
  /*yield*/
8720
8691
  , effects.select(getCurrentSnackbarMessages)];
@@ -9416,25 +9387,9 @@
9416
9387
  * See the License for the specific language governing permissions and
9417
9388
  * limitations under the License.
9418
9389
  *
9419
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9420
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
9390
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9391
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9421
9392
  * */
9422
- var useStyles$p = makeStyles__default["default"]({
9423
- buttonDiv: {
9424
- position: 'relative'
9425
- },
9426
- loadingButton: {
9427
- position: 'absolute',
9428
- top: 7,
9429
- left: 7,
9430
- zIndex: 1
9431
- },
9432
- button: {
9433
- width: '24px',
9434
- height: '24px',
9435
- margin: '6px 0px 0px 10px'
9436
- }
9437
- });
9438
9393
 
9439
9394
  var validateServiceUrl = function validateServiceUrl(url) {
9440
9395
  if (url === '' || url === null || typeof url === 'undefined') return false;
@@ -9452,7 +9407,6 @@
9452
9407
  handleClose = _a.handleClose,
9453
9408
  _d = _a.layerType,
9454
9409
  layerType = _d === void 0 ? LayerType.mapLayer : _d;
9455
- var classes = useStyles$p();
9456
9410
 
9457
9411
  var _e = __read(React__namespace.useState(''), 2),
9458
9412
  serviceURL = _e[0],
@@ -9569,7 +9523,9 @@
9569
9523
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
9570
9524
  item: true,
9571
9525
  xs: 2,
9572
- className: classes.buttonDiv
9526
+ sx: {
9527
+ position: 'relative'
9528
+ }
9573
9529
  }, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
9574
9530
  "data-testid": "add-service",
9575
9531
  onClick: handleAddServiceURL,
@@ -9577,7 +9533,12 @@
9577
9533
  size: "large"
9578
9534
  }, /*#__PURE__*/React__namespace.createElement(theme.Add, null)), loading && /*#__PURE__*/React__namespace.createElement(material.CircularProgress, {
9579
9535
  size: 35,
9580
- className: classes.loadingButton
9536
+ sx: {
9537
+ position: 'absolute',
9538
+ top: '7px',
9539
+ left: '7px',
9540
+ zIndex: 1
9541
+ }
9581
9542
  })))), /*#__PURE__*/React__namespace.createElement(material.Box, {
9582
9543
  m: 2
9583
9544
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
@@ -9621,7 +9582,7 @@
9621
9582
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9622
9583
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
9623
9584
  * */
9624
- var styles$2 = {
9585
+ var styles$4 = {
9625
9586
  buttonDiv: {
9626
9587
  position: 'relative'
9627
9588
  },
@@ -9682,7 +9643,7 @@
9682
9643
  onBlur: onBlurTooltip
9683
9644
  }, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
9684
9645
  onClick: handleClose,
9685
- sx: styles$2.button,
9646
+ sx: styles$4.button,
9686
9647
  disableRipple: true,
9687
9648
  "data-testid": "addLayersButton",
9688
9649
  ref: ref,
@@ -9709,12 +9670,12 @@
9709
9670
  * See the License for the specific language governing permissions and
9710
9671
  * limitations under the License.
9711
9672
  *
9712
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9713
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
9673
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9674
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9714
9675
  * */
9715
9676
  var iconButtonSize = 30;
9716
9677
  var totalButtons = 5;
9717
- var LayerManagerColumnsLarge = makeStyles__default["default"]({
9678
+ var LayerManagerColumnsLarge = {
9718
9679
  column1: {
9719
9680
  width: iconButtonSize * 3,
9720
9681
  display: 'flex'
@@ -9738,8 +9699,8 @@
9738
9699
  columns35: {
9739
9700
  width: "calc((100% - " + iconButtonSize * totalButtons + "px) * 0.75)"
9740
9701
  }
9741
- });
9742
- var LayerManagerColumnsSmall = makeStyles__default["default"]({
9702
+ };
9703
+ var LayerManagerColumnsSmall = {
9743
9704
  column1: {
9744
9705
  width: iconButtonSize * 3
9745
9706
  },
@@ -9762,7 +9723,7 @@
9762
9723
  columns35: {
9763
9724
  display: 'none'
9764
9725
  }
9765
- });
9726
+ };
9766
9727
  var LayerManagerWidth;
9767
9728
 
9768
9729
  (function (LayerManagerWidth) {
@@ -9842,10 +9803,10 @@
9842
9803
  * See the License for the specific language governing permissions and
9843
9804
  * limitations under the License.
9844
9805
  *
9845
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9846
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
9806
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9807
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9847
9808
  * */
9848
- var useStyles$o = makeStyles__default["default"]({
9809
+ var styles$3 = {
9849
9810
  row: {
9850
9811
  height: '32px'
9851
9812
  },
@@ -9856,7 +9817,7 @@
9856
9817
  fontFamily: 'Roboto',
9857
9818
  opacity: 0.67
9858
9819
  }
9859
- });
9820
+ };
9860
9821
 
9861
9822
  var DescriptionRow = function DescriptionRow(_a) {
9862
9823
  var mapId = _a.mapId,
@@ -9869,16 +9830,15 @@
9869
9830
  layerManagerWidth = _a.layerManagerWidth,
9870
9831
  _e = _a.layerSelect,
9871
9832
  layerSelect = _e === void 0 ? false : _e;
9872
- var classes = useStyles$o();
9873
- var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
9833
+ var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
9874
9834
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
9875
9835
  container: true,
9876
9836
  item: true,
9877
9837
  "data-testid": "descriptionRow",
9878
- className: classes.row
9838
+ sx: styles$3.row
9879
9839
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
9880
9840
  item: true,
9881
- className: columnSizes.column1
9841
+ sx: columnSizes.column1
9882
9842
  }, /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
9883
9843
  preloadedServices: preloadedServices,
9884
9844
  tooltip: tooltip,
@@ -9893,23 +9853,23 @@
9893
9853
  }), layerSelect && /*#__PURE__*/React__namespace.createElement(LayerSelectButtonConnect, {
9894
9854
  mapId: mapId
9895
9855
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
9896
- className: columnSizes.column2
9897
- }, /*#__PURE__*/React__namespace.createElement("div", {
9898
- className: classes.text
9856
+ sx: columnSizes.column2
9857
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
9858
+ sx: styles$3.text
9899
9859
  }, "Layer")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
9900
- className: columnSizes.column3
9901
- }, /*#__PURE__*/React__namespace.createElement("div", {
9902
- className: classes.text
9860
+ sx: columnSizes.column3
9861
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
9862
+ sx: styles$3.text
9903
9863
  }, "Style")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
9904
- className: columnSizes.column4
9905
- }, /*#__PURE__*/React__namespace.createElement("div", {
9906
- className: classes.text
9864
+ sx: columnSizes.column4
9865
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
9866
+ sx: styles$3.text
9907
9867
  }, "Opacity")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
9908
- className: columnSizes.column5
9909
- }, /*#__PURE__*/React__namespace.createElement("div", {
9910
- className: classes.text
9868
+ sx: columnSizes.column5
9869
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
9870
+ sx: styles$3.text
9911
9871
  }, "Dimensions")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
9912
- className: columnSizes.column6
9872
+ sx: columnSizes.column6
9913
9873
  }));
9914
9874
  };
9915
9875
 
@@ -10090,24 +10050,9 @@
10090
10050
  * See the License for the specific language governing permissions and
10091
10051
  * limitations under the License.
10092
10052
  *
10093
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10094
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
10053
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10054
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
10095
10055
  * */
10096
- var useStyles$n = makeStyles__default["default"](function (theme) {
10097
- return createStyles__default["default"]({
10098
- dropdownEmpty: {
10099
- paddingLeft: 8,
10100
- height: 32,
10101
- display: 'inline-flex',
10102
- alignItems: 'center'
10103
- },
10104
- emptyText: {
10105
- fontSize: theme.palette.geowebColors.layerManager.tableRowDefaultText.fontSize,
10106
- color: theme.palette.geowebColors.layerManager.tableRowDefaultText.rgba,
10107
- fontWeight: 500
10108
- }
10109
- });
10110
- });
10111
10056
 
10112
10057
  var getRenderLayersValues = function getRenderLayersValues(layerName, layers) {
10113
10058
  var serviceLayer = layers.find(function (l) {
@@ -10145,14 +10090,22 @@
10145
10090
  layers = _c === void 0 ? [] : _c,
10146
10091
  _d = _a.isEnabled,
10147
10092
  isEnabled = _d === void 0 ? true : _d;
10148
- var classes = useStyles$n();
10149
10093
 
10150
10094
  if (!layers || !layers.length) {
10151
- return /*#__PURE__*/React__namespace.createElement("div", {
10152
- className: classes.dropdownEmpty
10095
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
10096
+ sx: {
10097
+ paddingLeft: 1,
10098
+ height: '32px',
10099
+ display: 'inline-flex',
10100
+ alignItems: 'center'
10101
+ }
10153
10102
  }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
10154
10103
  variant: "body1",
10155
- className: classes.emptyText
10104
+ sx: {
10105
+ fontSize: 'geowebColors.layerManager.tableRowDefaultText.fontSize',
10106
+ color: 'geowebColors.layerManager.tableRowDefaultText.rgba',
10107
+ fontWeight: 500
10108
+ }
10156
10109
  }, "No service available"));
10157
10110
  }
10158
10111
 
@@ -10224,37 +10177,9 @@
10224
10177
  * See the License for the specific language governing permissions and
10225
10178
  * limitations under the License.
10226
10179
  *
10227
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10228
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
10180
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10181
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
10229
10182
  * */
10230
- var useStyles$m = makeStyles__default["default"](function (theme) {
10231
- return {
10232
- opacityDiv: {
10233
- height: 'calc(100% - 5px)',
10234
- width: '100%',
10235
- position: 'relative',
10236
- top: '2px'
10237
- },
10238
- opacityButton: {
10239
- height: '100%',
10240
- width: '100%',
10241
- borderRadius: '0',
10242
- minWidth: '49px'
10243
- },
10244
- sliderBackground: {
10245
- padding: '0 0 60px 0',
10246
- marginLeft: '60px',
10247
- backgroundColor: theme.palette.geowebColors.background.surface,
10248
- width: '82px',
10249
- height: '248px',
10250
- position: 'fixed',
10251
- top: '-5px',
10252
- boxSizing: 'initial',
10253
- zIndex: 2,
10254
- boxShadow: theme.shadows[8]
10255
- }
10256
- };
10257
- });
10258
10183
  var marks$1 = [{
10259
10184
  value: 0,
10260
10185
  label: '0 %'
@@ -10287,7 +10212,6 @@
10287
10212
  onLayerChangeOpacity = _a.onLayerChangeOpacity,
10288
10213
  _b = _a.isEnabled,
10289
10214
  isEnabled = _b === void 0 ? true : _b;
10290
- var classes = useStyles$m();
10291
10215
 
10292
10216
  var _c = __read(React__namespace.useState(false), 2),
10293
10217
  open = _c[0],
@@ -10330,10 +10254,15 @@
10330
10254
  setTooltipOpen(false);
10331
10255
  }, []);
10332
10256
  var currentOpacityText = Math.round(currentOpacity * 100) + " %";
10333
- return /*#__PURE__*/React__namespace.createElement("div", {
10334
- className: classes.opacityDiv,
10257
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
10335
10258
  onWheel: onWheel,
10336
- "data-testid": "scrollOpacity"
10259
+ "data-testid": "scrollOpacity",
10260
+ sx: {
10261
+ height: 'calc(100% - 5px)',
10262
+ width: '100%',
10263
+ position: 'relative',
10264
+ top: '2px'
10265
+ }
10337
10266
  }, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
10338
10267
  title: "Opacity: " + currentOpacityText,
10339
10268
  sx: shared.tooltipContainerStyles(isEnabled),
@@ -10341,16 +10270,32 @@
10341
10270
  open: tooltipOpen
10342
10271
  }, /*#__PURE__*/React__namespace.createElement(material.Button, {
10343
10272
  tabIndex: 0,
10344
- className: classes.opacityButton,
10345
10273
  onClick: onClickButton,
10346
10274
  "data-testid": "selectOpacity",
10347
10275
  disableRipple: true,
10348
10276
  onMouseEnter: onMouseEnter,
10349
10277
  onMouseLeave: onMouseLeave,
10350
10278
  onFocus: onFocus,
10351
- onBlur: onBlur
10352
- }, currentOpacityText)), open ? /*#__PURE__*/React__namespace.createElement("div", {
10353
- className: classes.sliderBackground
10279
+ onBlur: onBlur,
10280
+ style: {
10281
+ height: '100%',
10282
+ width: '100%',
10283
+ borderRadius: '0',
10284
+ minWidth: '49px'
10285
+ }
10286
+ }, currentOpacityText)), open ? /*#__PURE__*/React__namespace.createElement(material.Box, {
10287
+ sx: {
10288
+ padding: '0 0 60px 0',
10289
+ marginLeft: '60px',
10290
+ backgroundColor: 'geowebColors.background.surface',
10291
+ width: '82px',
10292
+ height: '248px',
10293
+ position: 'fixed',
10294
+ top: '-5px',
10295
+ boxSizing: 'initial',
10296
+ zIndex: 2,
10297
+ boxShadow: 8
10298
+ }
10354
10299
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
10355
10300
  sx: shared.sliderHeaderStyle
10356
10301
  }, "Opacity"), /*#__PURE__*/React__namespace.createElement(shared.CustomSlider, {
@@ -10550,31 +10495,9 @@
10550
10495
  * See the License for the specific language governing permissions and
10551
10496
  * limitations under the License.
10552
10497
  *
10553
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10554
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
10498
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10499
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
10555
10500
  * */
10556
- var useStyles$l = makeStyles__default["default"](function (theme) {
10557
- return createStyles__default["default"]({
10558
- row: {
10559
- background: function background(isEnabled) {
10560
- return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.fill : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.fill;
10561
- },
10562
- border: function border(isEnabled) {
10563
- return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.border : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.border;
10564
- },
10565
- borderRadius: theme.shape.borderRadius,
10566
- marginBottom: 4,
10567
- height: 34,
10568
- '&.sortable-drag': {
10569
- boxShadow: theme.shadows[4] // elevation_06
10570
-
10571
- },
10572
- '&.sortable-ghost': {
10573
- opacity: 0.5
10574
- }
10575
- }
10576
- });
10577
- });
10578
10501
 
10579
10502
  var LayerRow = function LayerRow(_a) {
10580
10503
  var layerId = _a.layerId,
@@ -10607,21 +10530,33 @@
10607
10530
  layerActiveLayout = _a.layerActiveLayout,
10608
10531
  layerManagerWidth = _a.layerManagerWidth,
10609
10532
  dragHandle = _a.dragHandle;
10610
- var classes = useStyles$l(isEnabled);
10611
- var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
10533
+ var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
10612
10534
 
10613
10535
  var onClickRow = function onClickRow() {
10614
10536
  return onLayerRowClick(layerId);
10615
10537
  };
10616
10538
 
10617
10539
  return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10618
- className: classes.row,
10619
10540
  item: true,
10620
10541
  container: true,
10621
- "data-testid": "layerRow-" + layerId
10542
+ "data-testid": "layerRow-" + layerId,
10543
+ sx: {
10544
+ backgroundColor: isEnabled ? 'geowebColors.layerManager.tableRowDefaultCardContainer.fill' : 'geowebColors.layerManager.tableRowDisabledCardContainer.fill',
10545
+ border: 1,
10546
+ borderColor: isEnabled ? 'geowebColors.layerManager.tableRowDefaultCardContainer.borderColor' : 'geowebColors.layerManager.tableRowDisabledCardContainer.borderColor',
10547
+ borderRadius: 1,
10548
+ marginBottom: 0.5,
10549
+ height: '34px',
10550
+ '&.sortable-drag': {
10551
+ boxShadow: 4
10552
+ },
10553
+ '&.sortable-ghost': {
10554
+ opacity: 0.5
10555
+ }
10556
+ }
10622
10557
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10623
10558
  item: true,
10624
- className: columnSizes.column1
10559
+ sx: columnSizes.column1
10625
10560
  }, dragHandle, layerEnableLayout || /*#__PURE__*/React__default["default"].createElement(shared.EnableButton, {
10626
10561
  isEnabled: layer.enabled,
10627
10562
  title: layer.name,
@@ -10635,7 +10570,7 @@
10635
10570
  onClickActivate: onClickRow
10636
10571
  })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10637
10572
  item: true,
10638
- className: "" + columnSizes.column2
10573
+ sx: columnSizes.column2
10639
10574
  }, layerServicesLayout || /*#__PURE__*/React__default["default"].createElement(RenderLayers, {
10640
10575
  layerName: layer.name,
10641
10576
  layers: services && layer.service && services[layer.service] && services[layer.service].layers || [],
@@ -10647,13 +10582,13 @@
10647
10582
  }
10648
10583
  })), isLayerMissing ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10649
10584
  item: true,
10650
- className: "" + columnSizes.columns35
10585
+ sx: columnSizes.columns35
10651
10586
  }, /*#__PURE__*/React__default["default"].createElement(shared.AlertBanner, {
10652
10587
  title: "This layer could not be loaded: does not exist on the server.",
10653
10588
  isCompact: true
10654
10589
  })) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10655
10590
  item: true,
10656
- className: "" + columnSizes.column3
10591
+ sx: columnSizes.column3
10657
10592
  }, layerStylesLayout || /*#__PURE__*/React__default["default"].createElement(RenderStyles, {
10658
10593
  layerStyles: layer.styles,
10659
10594
  currentLayerStyle: layer.style,
@@ -10665,7 +10600,7 @@
10665
10600
  }
10666
10601
  })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10667
10602
  item: true,
10668
- className: "" + columnSizes.column4
10603
+ sx: columnSizes.column4
10669
10604
  }, layerOpacityLayout || /*#__PURE__*/React__default["default"].createElement(OpacitySelect, {
10670
10605
  currentOpacity: layer.opacity,
10671
10606
  onLayerChangeOpacity: function onLayerChangeOpacity(_opacity) {
@@ -10676,7 +10611,7 @@
10676
10611
  }
10677
10612
  })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10678
10613
  item: true,
10679
- className: "" + columnSizes.column5
10614
+ sx: columnSizes.column5
10680
10615
  }, layerDimensionLayout || /*#__PURE__*/React__default["default"].createElement(DimensionSelect, {
10681
10616
  layerId: layerId,
10682
10617
  layerDimensions: filterNonTimeDimensions(layer.dimensions),
@@ -10694,7 +10629,7 @@
10694
10629
  }
10695
10630
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
10696
10631
  item: true,
10697
- className: columnSizes.column6
10632
+ sx: columnSizes.column6
10698
10633
  }, layerDeleteLayout || /*#__PURE__*/React__default["default"].createElement(shared.ManagerDeleteButton, {
10699
10634
  tooltipTitle: "Delete",
10700
10635
  onClickDelete: function onClickDelete() {
@@ -11262,24 +11197,9 @@
11262
11197
  * See the License for the specific language governing permissions and
11263
11198
  * limitations under the License.
11264
11199
  *
11265
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11266
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
11200
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11201
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
11267
11202
  * */
11268
- var useStyles$k = makeStyles__default["default"](function () {
11269
- return {
11270
- layerRows: {
11271
- width: '100%',
11272
- maxHeight: 'calc(100% - 10px)',
11273
- overflow: 'auto'
11274
- },
11275
- sortableRow: {
11276
- width: '100%',
11277
- cursor: function cursor(isSorting) {
11278
- return isSorting ? 'grabbing' : 'inherit';
11279
- }
11280
- }
11281
- };
11282
- });
11283
11203
 
11284
11204
  var LayerContainerRow = function LayerContainerRow(_a) {
11285
11205
  var mapId = _a.mapId,
@@ -11336,7 +11256,6 @@
11336
11256
 
11337
11257
  var isSorting = activeDragIndex !== null;
11338
11258
  var isDragDisabled = layerIds.length === 1;
11339
- var classes = useStyles$k(isSorting);
11340
11259
 
11341
11260
  var keyPressedTrue = function keyPressedTrue(event) {
11342
11261
  if (event.ctrlKey || event.metaKey) {
@@ -11376,8 +11295,12 @@
11376
11295
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
11377
11296
  container: true,
11378
11297
  item: true,
11379
- className: classes.layerRows,
11380
- "data-testid": "layerContainerRow"
11298
+ "data-testid": "layerContainerRow",
11299
+ sx: {
11300
+ width: '100%',
11301
+ maxHeight: 'calc(100% - 10px)',
11302
+ overflow: 'auto'
11303
+ }
11381
11304
  }, /*#__PURE__*/React__namespace.createElement(reactSortablejs.ReactSortable, {
11382
11305
  tag: "div",
11383
11306
  list: layerIds.map(function (layerId) {
@@ -11392,9 +11315,12 @@
11392
11315
  direction: "vertical",
11393
11316
  // hover props
11394
11317
  forceFallback: true,
11395
- className: classes.sortableRow,
11396
11318
  onStart: onStart,
11397
- onEnd: onEnd
11319
+ onEnd: onEnd,
11320
+ style: {
11321
+ width: '100%',
11322
+ cursor: isSorting ? 'grabbing' : 'inherit'
11323
+ }
11398
11324
  }, layerIds.map(function (layerId, index) {
11399
11325
  return /*#__PURE__*/React__namespace.createElement(LayerRowConnect, {
11400
11326
  mapId: mapId,
@@ -11596,22 +11522,9 @@
11596
11522
  * See the License for the specific language governing permissions and
11597
11523
  * limitations under the License.
11598
11524
  *
11599
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11600
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
11525
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11526
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
11601
11527
  * */
11602
- var useStyles$j = makeStyles__default["default"]({
11603
- layerRow: {
11604
- width: '100%',
11605
- height: '36px'
11606
- },
11607
- icon: {
11608
- width: '24px',
11609
- height: '24px'
11610
- },
11611
- addBaseLayers: {
11612
- marginTop: '-2px'
11613
- }
11614
- });
11615
11528
 
11616
11529
  var BaseLayerRow = function BaseLayerRow(_a) {
11617
11530
  var mapId = _a.mapId,
@@ -11622,16 +11535,20 @@
11622
11535
  layerManagerWidth = _a.layerManagerWidth,
11623
11536
  _d = _a.tooltip,
11624
11537
  tooltip = _d === void 0 ? '' : _d;
11625
- var classes = useStyles$j();
11626
- var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
11538
+ var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall : LayerManagerColumnsLarge;
11627
11539
  return /*#__PURE__*/React__namespace.createElement(material.Grid, {
11628
11540
  container: true,
11629
11541
  item: true,
11630
- className: classes.layerRow,
11631
- "data-testid": "baseLayerRow"
11542
+ "data-testid": "baseLayerRow",
11543
+ sx: {
11544
+ width: '100%',
11545
+ height: '36px'
11546
+ }
11632
11547
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
11633
11548
  item: true,
11634
- className: columnSizes.column1 + " " + classes.addBaseLayers
11549
+ sx: __assign(__assign({}, columnSizes.column1), {
11550
+ marginTop: '-2px'
11551
+ })
11635
11552
  }, /*#__PURE__*/React__namespace.createElement(AddLayersButton, {
11636
11553
  preloadedServices: preloadedServices,
11637
11554
  tooltip: tooltip,
@@ -11644,7 +11561,7 @@
11644
11561
  }
11645
11562
  })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
11646
11563
  item: true,
11647
- className: "" + columnSizes.column2
11564
+ sx: columnSizes.column2
11648
11565
  }, /*#__PURE__*/React__namespace.createElement(BaseLayersConnect, {
11649
11566
  mapId: mapId,
11650
11567
  preloadedAvailableBaseLayers: preloadedAvailableBaseLayers
@@ -11667,7 +11584,7 @@
11667
11584
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11668
11585
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
11669
11586
  * */
11670
- var styles$1 = {
11587
+ var styles$2 = {
11671
11588
  layerRowContainer: {
11672
11589
  position: 'relative',
11673
11590
  width: '100%',
@@ -11739,7 +11656,7 @@
11739
11656
  source: source,
11740
11657
  leftComponent: leftComponent
11741
11658
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
11742
- sx: styles$1.layerManagerContainer
11659
+ sx: styles$2.layerManagerContainer
11743
11660
  }, isLoading && /*#__PURE__*/React__namespace.createElement(material.LinearProgress, {
11744
11661
  "data-testid": "loading-bar",
11745
11662
  color: "secondary",
@@ -11757,7 +11674,7 @@
11757
11674
  }), /*#__PURE__*/React__namespace.createElement(material.Grid, {
11758
11675
  container: true,
11759
11676
  "data-testid": "layerManagerRowContainer",
11760
- sx: styles$1.layerRowContainer
11677
+ sx: styles$2.layerRowContainer
11761
11678
  }, /*#__PURE__*/React__namespace.createElement(DescriptionRow, {
11762
11679
  mapId: mapId,
11763
11680
  tooltip: showAddLayersTooltip ? 'Add layers' : '',
@@ -12953,72 +12870,9 @@
12953
12870
  * See the License for the specific language governing permissions and
12954
12871
  * limitations under the License.
12955
12872
  *
12956
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
12957
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
12873
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
12874
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
12958
12875
  * */
12959
- var useStyles$i = makeStyles__default["default"](function (theme) {
12960
- return createStyles__default["default"]({
12961
- serviceChips: {
12962
- width: '100%',
12963
- display: 'inline-flex',
12964
- alignItems: 'center',
12965
- overflowX: 'visible',
12966
- "float": 'left',
12967
- paddingLeft: '40px',
12968
- marginRight: function marginRight(_a) {
12969
- var margin = _a.margin;
12970
- return margin;
12971
- },
12972
- marginLeft: function marginLeft(_a) {
12973
- var margin = _a.margin;
12974
- return -margin;
12975
- },
12976
- maxWidth: function maxWidth(_a) {
12977
- var maxWidthValue = _a.maxWidthValue;
12978
- return maxWidthValue;
12979
- },
12980
- fontSize: '0.875rem'
12981
- },
12982
- scrollArrowLeft: {
12983
- width: '100px',
12984
- marginBottom: '-12px',
12985
- height: '34px',
12986
- backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
12987
- cursor: 'pointer',
12988
- marginRight: '-120px',
12989
- paddingTop: '6px',
12990
- paddingBottom: '6px',
12991
- "float": 'left',
12992
- zIndex: 1,
12993
- position: 'relative',
12994
- color: theme.palette.geowebColors.buttons.tertiary["default"].color,
12995
- '&:hover': {
12996
- color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
12997
- }
12998
- },
12999
- serviceList: {
13000
- height: '32px',
13001
- marginTop: '8px',
13002
- width: '100%',
13003
- overflow: 'hidden'
13004
- },
13005
- scrollArrowRight: {
13006
- width: '100px',
13007
- marginBottom: '-12px',
13008
- height: '34px',
13009
- paddingTop: '6px',
13010
- paddingBottom: '6px',
13011
- backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
13012
- right: '0px',
13013
- position: 'fixed',
13014
- cursor: 'pointer',
13015
- color: theme.palette.geowebColors.buttons.tertiary["default"].color,
13016
- '&:hover': {
13017
- color: theme.palette.geowebColors.buttons.tertiary.activeMouseOver.color
13018
- }
13019
- }
13020
- });
13021
- });
13022
12876
 
13023
12877
  var ServiceList = function ServiceList(_a) {
13024
12878
  var layerSelectWidth = _a.layerSelectWidth,
@@ -13039,10 +12893,6 @@
13039
12893
  var ref = React__namespace.useRef(null);
13040
12894
  var scrollSpeed = 5;
13041
12895
  var maxWidthValue = ref && ref.current && ref.current.scrollWidth && ref.current.scrollWidth >= layerSelectWidth - margin && ref.current.scrollWidth || layerSelectWidth - 50;
13042
- var classes = useStyles$i({
13043
- margin: margin,
13044
- maxWidthValue: maxWidthValue
13045
- });
13046
12896
 
13047
12897
  var onMouseWheelScroll = function onMouseWheelScroll(e) {
13048
12898
  var delta = e.deltaY;
@@ -13089,17 +12939,52 @@
13089
12939
  var isAllSelected = Object.values(activeServices).every(function (activeService) {
13090
12940
  return activeService.enabled;
13091
12941
  });
13092
- return /*#__PURE__*/React__namespace.createElement("div", {
13093
- className: classes.serviceList,
12942
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
12943
+ sx: {
12944
+ height: '32px',
12945
+ marginTop: '8px',
12946
+ width: '100%',
12947
+ overflow: 'hidden'
12948
+ },
13094
12949
  "data-testid": "serviceList",
13095
12950
  onWheel: onMouseWheelScroll
13096
12951
  }, margin !== 0 && /*#__PURE__*/React__namespace.createElement(theme.ChevronLeft, {
13097
- className: classes.scrollArrowLeft,
13098
12952
  onMouseDown: onLeftChevronPressed,
13099
12953
  onMouseUp: onChevronMouseUp,
13100
- "data-testid": "leftScrollArrow"
13101
- }), /*#__PURE__*/React__namespace.createElement("div", {
13102
- className: classes.serviceChips,
12954
+ "data-testid": "leftScrollArrow",
12955
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12956
+ sx: function sx(theme) {
12957
+ return {
12958
+ width: '100px',
12959
+ marginBottom: '-12px',
12960
+ height: '34px',
12961
+ backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
12962
+ cursor: 'pointer',
12963
+ marginRight: '-120px',
12964
+ paddingTop: '6px',
12965
+ paddingBottom: '6px',
12966
+ "float": 'left',
12967
+ zIndex: 1,
12968
+ position: 'relative',
12969
+ color: 'geowebColors.buttons.tertiary.default.color',
12970
+ '&:hover': {
12971
+ color: 'geowebColors.buttons.tertiary.activeMouseOver.color'
12972
+ }
12973
+ };
12974
+ }
12975
+ }), /*#__PURE__*/React__namespace.createElement(material.Box, {
12976
+ sx: {
12977
+ width: '100%',
12978
+ display: 'inline-flex',
12979
+ alignItems: 'center',
12980
+ overflowX: 'visible',
12981
+ "float": 'left',
12982
+ paddingLeft: '40px',
12983
+ marginRight: margin + "px",
12984
+ marginLeft: -margin + "px",
12985
+ maxWidth: maxWidthValue,
12986
+ fontSize: '0.875rem'
12987
+ },
13103
12988
  ref: ref
13104
12989
  }, activeServices && Object.keys(activeServices) && Object.keys(activeServices).length > 0 && /*#__PURE__*/React__namespace.createElement(ServiceChipConnect, {
13105
12990
  key: "All",
@@ -13116,8 +13001,26 @@
13116
13001
  isSelected: (_a = activeServices[serviceId]) === null || _a === void 0 ? void 0 : _a.enabled,
13117
13002
  isDisabled: activeServices[serviceId] === undefined
13118
13003
  });
13119
- })), layerSelectWidth + margin < width && /*#__PURE__*/React__namespace.createElement(theme.ChevronRight, {
13120
- className: classes.scrollArrowRight,
13004
+ })), layerSelectWidth + margin < width && /*#__PURE__*/React__namespace.createElement(theme.ChevronRight // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
13005
+ , {
13006
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
13007
+ sx: function sx(theme) {
13008
+ return {
13009
+ width: '100px',
13010
+ marginBottom: '-12px',
13011
+ height: '34px',
13012
+ paddingTop: '6px',
13013
+ paddingBottom: '6px',
13014
+ backgroundImage: "linear-gradient(to right, rgba(0, 0, 0, 0), " + theme.palette.geowebColors.background.surfaceApp + " 51%)",
13015
+ right: '0px',
13016
+ position: 'fixed',
13017
+ cursor: 'pointer',
13018
+ color: 'geowebColors.buttons.tertiary.default.color',
13019
+ '&:hover': {
13020
+ color: 'geowebColors.buttons.tertiary.activeMouseOver.color'
13021
+ }
13022
+ };
13023
+ },
13121
13024
  onMouseDown: onRightChevronPressed,
13122
13025
  onMouseUp: onChevronMouseUp,
13123
13026
  "data-testid": "rightScrollArrow"
@@ -13168,7 +13071,7 @@
13168
13071
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13169
13072
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
13170
13073
  * */
13171
- var styles = {
13074
+ var styles$1 = {
13172
13075
  servicesContainer: {
13173
13076
  width: '300px',
13174
13077
  maxHeight: '380px',
@@ -13232,10 +13135,10 @@
13232
13135
  };
13233
13136
 
13234
13137
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Box, {
13235
- sx: styles.servicesContainer,
13138
+ sx: styles$1.servicesContainer,
13236
13139
  "data-testid": "ServiceDialog"
13237
13140
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
13238
- sx: styles.header
13141
+ sx: styles$1.header
13239
13142
  }, "Services"), /*#__PURE__*/React__namespace.createElement(material.List, {
13240
13143
  disablePadding: true
13241
13144
  }, Object.keys(services).map(function (serviceId) {
@@ -13281,11 +13184,11 @@
13281
13184
  "data-testid": "removeServiceButton"
13282
13185
  }, /*#__PURE__*/React__namespace.createElement(theme.Delete, null))))));
13283
13186
  })), /*#__PURE__*/React__namespace.createElement(material.Box, {
13284
- sx: styles.footer
13187
+ sx: styles$1.footer
13285
13188
  }, /*#__PURE__*/React__namespace.createElement(material.Button, {
13286
13189
  onClick: openAddService,
13287
13190
  "data-testid": "openAddServiceButton",
13288
- sx: styles.button,
13191
+ sx: styles$1.button,
13289
13192
  variant: "tertiary",
13290
13193
  startIcon: /*#__PURE__*/React__namespace.createElement(theme.Add, null)
13291
13194
  }, "Add a new service"))), addServiceIsOpen && /*#__PURE__*/React__namespace.createElement(ServicePopupConnect, {
@@ -13372,28 +13275,9 @@
13372
13275
  * See the License for the specific language governing permissions and
13373
13276
  * limitations under the License.
13374
13277
  *
13375
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13376
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
13278
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13279
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
13377
13280
  * */
13378
- var useStyles$h = makeStyles__default["default"]({
13379
- serviceList: {
13380
- height: '48px'
13381
- },
13382
- keywordFilterButton: {
13383
- "float": 'left',
13384
- position: 'absolute',
13385
- margin: '12px 0 0 8px',
13386
- zIndex: 2
13387
- },
13388
- serviceOptionsButton: {
13389
- position: 'absolute',
13390
- margin: '12px 0 0 calc(100% - 36px)',
13391
- zIndex: 2
13392
- },
13393
- layerSelectContainer: {
13394
- padding: '0 8px'
13395
- }
13396
- });
13397
13281
 
13398
13282
  var LayerSelect = function LayerSelect(_a) {
13399
13283
  var mapId = _a.mapId,
@@ -13408,7 +13292,6 @@
13408
13292
  order = _d === void 0 ? 0 : _d,
13409
13293
  _e = _a.source,
13410
13294
  source = _e === void 0 ? 'module' : _e;
13411
- var classes = useStyles$h();
13412
13295
 
13413
13296
  var _f = __read(React__namespace.useState(500), 2),
13414
13297
  height = _f[0],
@@ -13446,22 +13329,35 @@
13446
13329
  onMouseDown: onMouseDown,
13447
13330
  order: order,
13448
13331
  source: source
13449
- }, /*#__PURE__*/React__namespace.createElement("div", {
13450
- style: {
13332
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
13333
+ sx: {
13451
13334
  padding: '6px'
13452
13335
  }
13453
- }, /*#__PURE__*/React__namespace.createElement(SearchFieldConnect, null)), /*#__PURE__*/React__namespace.createElement("div", {
13454
- className: classes.keywordFilterButton
13336
+ }, /*#__PURE__*/React__namespace.createElement(SearchFieldConnect, null)), /*#__PURE__*/React__namespace.createElement(material.Box, {
13337
+ sx: {
13338
+ "float": 'left',
13339
+ position: 'absolute',
13340
+ margin: '12px 0 0 8px',
13341
+ zIndex: 2
13342
+ }
13455
13343
  }, /*#__PURE__*/React__namespace.createElement(KeywordFilterButtonConnect, {
13456
13344
  mapId: mapId
13457
- })), /*#__PURE__*/React__namespace.createElement("div", {
13458
- className: classes.serviceOptionsButton
13459
- }, /*#__PURE__*/React__namespace.createElement(ServiceOptionsButton, null)), /*#__PURE__*/React__namespace.createElement("div", {
13460
- className: classes.serviceList
13345
+ })), /*#__PURE__*/React__namespace.createElement(material.Box, {
13346
+ sx: {
13347
+ position: 'absolute',
13348
+ margin: '12px 0 0 calc(100% - 36px)',
13349
+ zIndex: 2
13350
+ }
13351
+ }, /*#__PURE__*/React__namespace.createElement(ServiceOptionsButton, null)), /*#__PURE__*/React__namespace.createElement(material.Box, {
13352
+ sx: {
13353
+ height: '48px'
13354
+ }
13461
13355
  }, /*#__PURE__*/React__namespace.createElement(ServiceListConnect, {
13462
13356
  layerSelectWidth: width
13463
- })), /*#__PURE__*/React__namespace.createElement("div", {
13464
- className: classes.layerSelectContainer
13357
+ })), /*#__PURE__*/React__namespace.createElement(material.Box, {
13358
+ sx: {
13359
+ padding: '0 8px'
13360
+ }
13465
13361
  }, /*#__PURE__*/React__namespace.createElement(LayerListConnect, {
13466
13362
  mapId: mapId,
13467
13363
  layerSelectHeight: height
@@ -13481,47 +13377,14 @@
13481
13377
  * See the License for the specific language governing permissions and
13482
13378
  * limitations under the License.
13483
13379
  *
13484
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13485
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
13380
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13381
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
13486
13382
  * */
13487
- var useStyles$g = makeStyles__default["default"](function (theme) {
13488
- return createStyles__default["default"]({
13489
- listItem: {
13490
- width: '100%',
13491
- minWidth: '300px',
13492
- padding: '0px',
13493
- paddingLeft: '10px',
13494
- paddingRight: '50px',
13495
- fontSize: '12px'
13496
- },
13497
- onlyByttonText: {
13498
- color: theme.palette.geowebColors.buttons.primary["default"].fill,
13499
- fontSize: '14px',
13500
- fontWeight: 500
13501
- },
13502
- checkbox: {
13503
- paddingTop: '6px',
13504
- paddingBottom: '7px',
13505
- '&&:hover': {
13506
- backgroundColor: 'transparent'
13507
- }
13508
- },
13509
- listItemIcon: {
13510
- minWidth: '42px'
13511
- },
13512
- listItemText: {
13513
- textOverflow: 'ellipsis',
13514
- whiteSpace: 'nowrap',
13515
- overflow: 'hidden'
13516
- }
13517
- });
13518
- });
13519
13383
 
13520
13384
  var FilterListItem = function FilterListItem(_a) {
13521
13385
  var keyword = _a.keyword,
13522
13386
  toggleKeywords = _a.toggleKeywords,
13523
13387
  enableOnlyOneKeyword = _a.enableOnlyOneKeyword;
13524
- var classes = useStyles$g();
13525
13388
 
13526
13389
  var _b = __read(React__namespace.useState(false), 2),
13527
13390
  hovering = _b[0],
@@ -13550,19 +13413,38 @@
13550
13413
  onBlur: handleMouseLeave,
13551
13414
  "data-testid": "filterResultListItem"
13552
13415
  }, /*#__PURE__*/React__namespace.createElement(material.ListItem, {
13553
- className: classes.listItem
13416
+ sx: {
13417
+ width: '100%',
13418
+ minWidth: '300px',
13419
+ padding: '0px',
13420
+ paddingLeft: '10px',
13421
+ paddingRight: '50px',
13422
+ fontSize: '12px'
13423
+ }
13554
13424
  }, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, {
13555
- className: classes.listItemIcon
13425
+ sx: {
13426
+ minWidth: '42px'
13427
+ }
13556
13428
  }, /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
13557
13429
  color: "secondary",
13558
13430
  checked: keyword.checked,
13559
13431
  onChange: function onChange() {
13560
13432
  return toggleCheckbox(keyword.id);
13561
13433
  },
13562
- className: classes.checkbox
13434
+ sx: {
13435
+ paddingTop: '6px',
13436
+ paddingBottom: '7px',
13437
+ '&&:hover': {
13438
+ backgroundColor: 'transparent'
13439
+ }
13440
+ }
13563
13441
  })), /*#__PURE__*/React__namespace.createElement(material.Typography, {
13564
13442
  variant: "body2",
13565
- className: classes.listItemText
13443
+ sx: {
13444
+ textOverflow: 'ellipsis',
13445
+ whiteSpace: 'nowrap',
13446
+ overflow: 'hidden'
13447
+ }
13566
13448
  }, keyword.id), hovering ? /*#__PURE__*/React__namespace.createElement(material.ListItemSecondaryAction, null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
13567
13449
  style: {
13568
13450
  backgroundColor: 'transparent'
@@ -13574,7 +13456,11 @@
13574
13456
  },
13575
13457
  "data-testid": "onlyButton"
13576
13458
  }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
13577
- className: classes.onlyByttonText
13459
+ sx: {
13460
+ color: 'geowebColors.buttons.primary.default.fill',
13461
+ fontSize: '14px',
13462
+ fontWeight: 500
13463
+ }
13578
13464
  }, "ONLY"))) : null));
13579
13465
  }
13580
13466
 
@@ -13677,26 +13563,9 @@
13677
13563
  * See the License for the specific language governing permissions and
13678
13564
  * limitations under the License.
13679
13565
  *
13680
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13681
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
13566
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
13567
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
13682
13568
  * */
13683
- var useStyles$f = makeStyles__default["default"](function (theme) {
13684
- return createStyles__default["default"]({
13685
- selectAll: {
13686
- padding: '15px',
13687
- paddingLeft: '20px'
13688
- },
13689
- "switch": {
13690
- padding: '15px'
13691
- },
13692
- selectAllContainer: {
13693
- backgroundColor: theme.palette.background.paper,
13694
- position: 'sticky',
13695
- top: 0,
13696
- zIndex: 100
13697
- }
13698
- });
13699
- });
13700
13569
 
13701
13570
  var KeywordFilterResults = function KeywordFilterResults(_a) {
13702
13571
  var allKeywordIds = _a.allKeywordIds,
@@ -13712,7 +13581,6 @@
13712
13581
  order = _d === void 0 ? 0 : _d,
13713
13582
  _e = _a.source,
13714
13583
  source = _e === void 0 ? 'module' : _e;
13715
- var classes = useStyles$f();
13716
13584
  return /*#__PURE__*/React__namespace.createElement(shared.ToolContainerDraggable, {
13717
13585
  title: showTitle ? "Filter Results " + mapId : 'Filter Results',
13718
13586
  "data-testid": "keywordFilterResults",
@@ -13735,21 +13603,31 @@
13735
13603
  xs: 12,
13736
13604
  justifyContent: "space-between",
13737
13605
  alignItems: "center",
13738
- className: classes.selectAllContainer
13606
+ sx: {
13607
+ backgroundColor: 'background.paper',
13608
+ position: 'sticky',
13609
+ top: 0,
13610
+ zIndex: 100
13611
+ }
13739
13612
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
13740
13613
  container: true,
13741
13614
  item: true,
13742
13615
  xs: 6,
13743
13616
  justifyContent: "flex-start",
13744
13617
  alignItems: "center",
13745
- className: classes.selectAll
13618
+ sx: {
13619
+ padding: '15px',
13620
+ paddingLeft: '20px'
13621
+ }
13746
13622
  }, "Select all"), /*#__PURE__*/React__namespace.createElement(material.Grid, {
13747
13623
  container: true,
13748
13624
  item: true,
13749
13625
  xs: 6,
13750
13626
  justifyContent: "flex-end",
13751
13627
  alignContent: "center",
13752
- className: classes["switch"]
13628
+ sx: {
13629
+ padding: '15px'
13630
+ }
13753
13631
  }, /*#__PURE__*/React__namespace.createElement(KeywordFilterSelectAllSwitchConnect, null))), /*#__PURE__*/React__namespace.createElement(material.List, {
13754
13632
  dense: true,
13755
13633
  style: {
@@ -14241,37 +14119,30 @@
14241
14119
  * See the License for the specific language governing permissions and
14242
14120
  * limitations under the License.
14243
14121
  *
14244
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14245
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
14122
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14123
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
14246
14124
  * */
14247
- var useStyles$e = makeStyles__default["default"](function () {
14248
- return {
14249
- container: {
14250
- '& > button': {
14251
- marginBottom: 8
14252
- }
14253
- },
14254
- wrapper: {
14125
+
14126
+ var MapControls = function MapControls(_a) {
14127
+ var children = _a.children,
14128
+ props = __rest(_a, ["children"]);
14129
+
14130
+ return /*#__PURE__*/React__namespace.createElement(material.Box, __assign({
14131
+ sx: {
14255
14132
  position: 'absolute',
14256
14133
  overflow: 'visible',
14257
14134
  display: 'block',
14258
14135
  left: 0,
14259
- margin: 8,
14136
+ margin: 1,
14260
14137
  zIndex: 50,
14261
- top: 96
14138
+ top: '96px'
14262
14139
  }
14263
- };
14264
- });
14265
-
14266
- var MapControls = function MapControls(_a) {
14267
- var children = _a.children,
14268
- props = __rest(_a, ["children"]);
14269
-
14270
- var classes = useStyles$e();
14271
- return /*#__PURE__*/React__namespace.createElement("div", __assign({
14272
- className: classes.wrapper
14273
14140
  }, props), /*#__PURE__*/React__namespace.createElement(material.Grid, {
14274
- className: classes.container,
14141
+ sx: {
14142
+ '& > button': {
14143
+ marginBottom: 1
14144
+ }
14145
+ },
14275
14146
  container: true,
14276
14147
  direction: "column"
14277
14148
  }, children));
@@ -14403,31 +14274,16 @@
14403
14274
  * See the License for the specific language governing permissions and
14404
14275
  * limitations under the License.
14405
14276
  *
14406
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14407
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
14277
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14278
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
14408
14279
  * */
14409
- var useStyles$d = makeStyles__default["default"](function () {
14280
+ var SmallFontSlider = material.styled(material.Slider)(function () {
14410
14281
  return {
14411
- verticalLevelDimensionSelectContainer: {
14412
- height: '320px',
14413
- margin: '10px',
14414
- marginLeft: '-5px',
14415
- minWidth: 120,
14416
- fontSize: '90%'
14417
- },
14418
- layerName: {
14419
- paddingLeft: '10px',
14420
- maxWidth: 130,
14421
- overflow: 'hidden',
14422
- textOverflow: 'ellipsis'
14282
+ '& .MuiSlider-markLabel': {
14283
+ fontSize: '80%'
14423
14284
  }
14424
14285
  };
14425
14286
  });
14426
- var SmallFontSlider = withStyles__default["default"]({
14427
- markLabel: {
14428
- fontSize: '80%'
14429
- }
14430
- })(material.Slider);
14431
14287
 
14432
14288
  var DimensionSelectSlider = function DimensionSelectSlider(_a) {
14433
14289
  var marks = _a.marks,
@@ -14443,7 +14299,6 @@
14443
14299
  _f = _a.alertColor,
14444
14300
  alertColor = _f === void 0 ? 'red' : _f,
14445
14301
  onChangeDimensionValue = _a.onChangeDimensionValue;
14446
- var classes = useStyles$d();
14447
14302
 
14448
14303
  var _g = __read(React.useState(0), 2),
14449
14304
  currentIndex = _g[0],
@@ -14471,9 +14326,15 @@
14471
14326
  var sliderValue = managedValue !== null ? values.findIndex(function (v) {
14472
14327
  return v === managedValue;
14473
14328
  }) : currentIndex;
14474
- return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", {
14475
- className: classes.verticalLevelDimensionSelectContainer,
14476
- "data-testid": "slider-dimensionSelect"
14329
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Box, {
14330
+ "data-testid": "slider-dimensionSelect",
14331
+ sx: {
14332
+ height: '320px',
14333
+ margin: '10px',
14334
+ marginLeft: '-5px',
14335
+ minWidth: 120,
14336
+ fontSize: '90%'
14337
+ }
14477
14338
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
14478
14339
  component: "span",
14479
14340
  m: 1
@@ -14498,7 +14359,12 @@
14498
14359
  title: layerName
14499
14360
  }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
14500
14361
  variant: "body2",
14501
- className: classes.layerName
14362
+ sx: {
14363
+ paddingLeft: '10px',
14364
+ maxWidth: 130,
14365
+ overflow: 'hidden',
14366
+ textOverflow: 'ellipsis'
14367
+ }
14502
14368
  }, layerName)));
14503
14369
  };
14504
14370
 
@@ -15014,33 +14880,14 @@
15014
14880
  * See the License for the specific language governing permissions and
15015
14881
  * limitations under the License.
15016
14882
  *
15017
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15018
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
14883
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
14884
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
15019
14885
  * */
15020
- var useStyles$c = makeStyles__default["default"](function (theme) {
15021
- return {
15022
- speedButtonDiv: {
15023
- height: '24px',
15024
- width: '24px',
15025
- position: 'relative'
15026
- },
15027
- sliderBackground: {
15028
- padding: '0 0 60px 0',
15029
- backgroundColor: theme.palette.geowebColors.background.surface,
15030
- width: '95px',
15031
- height: '150px',
15032
- position: 'absolute',
15033
- bottom: '34px',
15034
- left: '-18px'
15035
- }
15036
- };
15037
- });
15038
14886
  var speedTooltipTitle = 'Speed';
15039
14887
 
15040
14888
  var SpeedButton = function SpeedButton(_a) {
15041
14889
  var animationDelay = _a.animationDelay,
15042
14890
  setMapAnimationDelay = _a.setMapAnimationDelay;
15043
- var classes = useStyles$c();
15044
14891
 
15045
14892
  var _b = __read(React__namespace.useState(false), 2),
15046
14893
  open = _b[0],
@@ -15092,8 +14939,12 @@
15092
14939
  };
15093
14940
 
15094
14941
  var text = marks[currentValue].text;
15095
- return /*#__PURE__*/React__namespace.createElement("div", {
15096
- className: classes.speedButtonDiv
14942
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
14943
+ sx: {
14944
+ height: '24px',
14945
+ width: '24px',
14946
+ position: 'relative'
14947
+ }
15097
14948
  }, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
15098
14949
  title: speedTooltipTitle
15099
14950
  }, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
@@ -15102,8 +14953,15 @@
15102
14953
  "data-testid": "speedButton"
15103
14954
  }, /*#__PURE__*/React__namespace.createElement(theme.TextIcon, {
15104
14955
  text: text
15105
- }))), open ? /*#__PURE__*/React__namespace.createElement("div", {
15106
- className: classes.sliderBackground
14956
+ }))), open ? /*#__PURE__*/React__namespace.createElement(material.Box, {
14957
+ sx: {
14958
+ padding: '0 0 60px 0',
14959
+ backgroundColor: 'geowebColors.background.surface',
14960
+ width: '95px',
14961
+ height: '150px',
14962
+ position: 'absolute',
14963
+ bottom: '35px'
14964
+ }
15107
14965
  }, /*#__PURE__*/React__namespace.createElement(material.Box, {
15108
14966
  sx: shared.sliderHeaderStyle
15109
14967
  }, "Speed"), /*#__PURE__*/React__namespace.createElement(shared.CustomSlider, {
@@ -15142,12 +15000,6 @@
15142
15000
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15143
15001
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
15144
15002
  * */
15145
- var timestepAutoSwitchActive = {
15146
- title: 'Timestep Auto on'
15147
- };
15148
- var timestepAutoSwitchInactive = {
15149
- title: 'Timestep Auto off'
15150
- };
15151
15003
  var timeStepMarks = [{
15152
15004
  value: 1,
15153
15005
  label: '1 min',
@@ -15254,34 +15106,6 @@
15254
15106
  timeStepValue: 5256000,
15255
15107
  text: '10y'
15256
15108
  }];
15257
- var useStyles$b = makeStyles__default["default"](function (theme) {
15258
- return {
15259
- timeStepDiv: {
15260
- width: '58px',
15261
- height: '24px',
15262
- position: 'relative'
15263
- },
15264
- sliderBackground: {
15265
- backgroundColor: theme.palette.geowebColors.background.surface,
15266
- width: '110px',
15267
- height: '350px',
15268
- padding: '0 0 83px 0',
15269
- position: 'absolute',
15270
- bottom: '34px'
15271
- },
15272
- timestepAutoText: {
15273
- fontFamily: 'Roboto-Black, Roboto',
15274
- fontSize: 12,
15275
- color: theme.palette.geowebColors.typographyAndIcons.text
15276
- },
15277
- timestepAutoTextOff: {
15278
- fontFamily: 'Roboto-Black, Roboto',
15279
- fontSize: 12,
15280
- color: theme.palette.geowebColors.typographyAndIcons.text
15281
- },
15282
- disabled: {}
15283
- };
15284
- });
15285
15109
  var timeStepTitle = 'Time step';
15286
15110
 
15287
15111
  var TimeStepButton = function TimeStepButton(_a) {
@@ -15295,112 +15119,90 @@
15295
15119
  _d = _a.onToggleTimestepAuto,
15296
15120
  onToggleTimestepAuto = _d === void 0 ? function () {
15297
15121
  return null;
15298
- } : _d;
15299
- var classes = useStyles$b();
15300
-
15301
- var _e = __read(React__namespace.useState(false), 2),
15302
- open = _e[0],
15303
- setOpen = _e[1];
15304
-
15305
- var onClickButton = function onClickButton() {
15306
- setOpen(!open);
15307
- };
15308
-
15309
- var timestepAutoSwitch = !isTimestepAuto ? timestepAutoSwitchInactive : timestepAutoSwitchActive;
15310
- var timestepAutoTextStyle = !isTimestepAuto ? classes.timestepAutoText : classes.timestepAutoTextOff;
15311
- var disabledSlider = disabled || isTimestepAuto;
15122
+ } : _d,
15123
+ _e = _a.isOpenByDefault,
15124
+ isOpenByDefault = _e === void 0 ? false : _e;
15312
15125
  var timeStepFromLayer = getActiveLayerTimeStep(timeDimension) || timeStep;
15313
15126
  var currentMark = timeStepMarks.find(function (mark) {
15314
15127
  return mark.timeStepValue === timeStep;
15315
15128
  });
15316
- var value = currentMark && currentMark.value ? currentMark.value : 0;
15317
- var min = timeStepMarks[0].value;
15318
- var max = timeStepMarks[timeStepMarks.length - 1].value;
15129
+ React__default["default"].useEffect(function () {
15130
+ if (isTimestepAuto) {
15131
+ onChangeTimeStep(timeStepFromLayer);
15132
+ }
15133
+ }, [timeStepFromLayer, isTimestepAuto, onChangeTimeStep]);
15319
15134
 
15320
- var getTimeStepValue = function getTimeStepValue(value) {
15321
- return timeStepMarks[Math.round(value - 1)].timeStepValue;
15322
- };
15323
-
15324
- var onChangeSlider = function onChangeSlider(event, value) {
15325
- var newValue = getTimeStepValue(value);
15326
-
15327
- if (event.type !== 'keydown') {
15328
- onChangeTimeStep(newValue, MapActionOrigin.map);
15329
- }
15330
- };
15331
-
15332
- var onKeyDown = function onKeyDown(event) {
15333
- // disable default Slider behavior
15334
- event.stopPropagation();
15335
- event.preventDefault(); // custom logic
15336
-
15337
- if (event.key === 'Tab') {
15338
- setOpen(!open);
15339
- }
15135
+ var _f = __read(React__default["default"].useState(null), 2),
15136
+ anchorRef = _f[0],
15137
+ setAnchorRef = _f[1];
15340
15138
 
15341
- var newValue = getValueFromKeyboardEvent(event, value, min, max);
15139
+ var _g = __read(React__default["default"].useState(false), 2),
15140
+ open = _g[0],
15141
+ setOpen = _g[1];
15342
15142
 
15343
- if (newValue !== null) {
15344
- onChangeTimeStep(getTimeStepValue(newValue), MapActionOrigin.map);
15143
+ React__default["default"].useEffect(function () {
15144
+ if (anchorRef && isOpenByDefault) {
15145
+ setOpen(true);
15345
15146
  }
15346
- };
15347
-
15348
- React__namespace.useEffect(function () {
15349
- if (isTimestepAuto) {
15350
- onChangeTimeStep(timeStepFromLayer);
15147
+ }, [anchorRef, isOpenByDefault]);
15148
+ return /*#__PURE__*/React__default["default"].createElement(material.Box, {
15149
+ onKeyDown: function onKeyDown(event) {
15150
+ event.stopPropagation();
15351
15151
  }
15352
- }, [timeStepFromLayer, isTimestepAuto, onChangeTimeStep]);
15353
- return /*#__PURE__*/React__namespace.createElement("div", {
15354
- className: classes.timeStepDiv
15355
- }, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
15152
+ }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
15356
15153
  title: timeStepTitle
15357
- }, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
15154
+ }, /*#__PURE__*/React__default["default"].createElement(shared.ToolButton, {
15155
+ onClick: function onClick() {
15156
+ setOpen(true);
15157
+ },
15158
+ ref: setAnchorRef,
15358
15159
  active: true,
15359
- onClick: onClickButton,
15360
- "data-testid": "timeStepButton",
15361
15160
  width: "58px"
15362
- }, /*#__PURE__*/React__namespace.createElement(theme.FastForward, null), /*#__PURE__*/React__namespace.createElement(theme.TextIcon, {
15363
- text: currentMark && currentMark.text || '',
15364
- "data-testid": "timeStepButtonText"
15365
- }))), open ? /*#__PURE__*/React__namespace.createElement("div", {
15366
- className: classes.sliderBackground
15367
- }, /*#__PURE__*/React__namespace.createElement(material.Box, {
15368
- sx: shared.sliderHeaderStyle
15369
- }, "Time step"), /*#__PURE__*/React__namespace.createElement(shared.CustomSlider, {
15370
- "data-testid": "timeStepButtonSlider",
15371
- orientation: "vertical",
15372
- value: value,
15373
- step: null,
15374
- min: min,
15375
- max: max,
15376
- marks: timeStepMarks,
15377
- disabled: disabledSlider,
15378
- onChange: onChangeSlider,
15379
- onKeyDown: onKeyDown,
15380
- shouldAutoFocus: true
15381
- }), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
15382
- title: timestepAutoSwitch.title
15383
- }, /*#__PURE__*/React__namespace.createElement("span", {
15384
- "data-testid": "timestepAutoSwitchTooltip"
15385
- }, /*#__PURE__*/React__namespace.createElement(material.FormControlLabel, {
15386
- control: /*#__PURE__*/React__namespace.createElement(material.Switch, {
15387
- checked: isTimestepAuto,
15388
- onChange: function onChange() {
15389
- return onToggleTimestepAuto();
15390
- },
15391
- disabled: disabled,
15392
- id: "timestepAutoSwitch",
15393
- disableRipple: true,
15161
+ }, /*#__PURE__*/React__default["default"].createElement(theme.FastForward, null), /*#__PURE__*/React__default["default"].createElement(theme.TextIcon, {
15162
+ text: currentMark === null || currentMark === void 0 ? void 0 : currentMark.text
15163
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Menu, {
15164
+ anchorEl: anchorRef,
15165
+ open: open,
15166
+ onClose: function onClose() {
15167
+ return setOpen(false);
15168
+ },
15169
+ BackdropProps: {
15394
15170
  sx: {
15395
- marginLeft: '18px'
15171
+ backgroundColor: 'transparent'
15396
15172
  }
15397
- }),
15398
- label: "Auto",
15399
- labelPlacement: "end",
15400
- classes: {
15401
- label: timestepAutoTextStyle
15173
+ },
15174
+ anchorOrigin: {
15175
+ vertical: 'top',
15176
+ horizontal: 'center'
15177
+ },
15178
+ transformOrigin: {
15179
+ vertical: 'bottom',
15180
+ horizontal: 'center'
15402
15181
  }
15403
- })))) : null);
15182
+ }, timeStepMarks.sort(function (a, b) {
15183
+ return b.timeStepValue - a.timeStepValue;
15184
+ }).map(function (time) {
15185
+ return /*#__PURE__*/React__default["default"].createElement(material.MenuItem, {
15186
+ onClick: function onClick() {
15187
+ if (isTimestepAuto) {
15188
+ onToggleTimestepAuto();
15189
+ }
15190
+
15191
+ onChangeTimeStep(time.timeStepValue, MapActionOrigin.map);
15192
+ setOpen(false);
15193
+ },
15194
+ key: time.timeStepValue,
15195
+ selected: (currentMark === null || currentMark === void 0 ? void 0 : currentMark.timeStepValue) === time.timeStepValue,
15196
+ disabled: disabled
15197
+ }, time.label);
15198
+ }), /*#__PURE__*/React__default["default"].createElement(material.MenuItem, {
15199
+ onClick: function onClick() {
15200
+ onToggleTimestepAuto();
15201
+ setOpen(false);
15202
+ },
15203
+ selected: isTimestepAuto,
15204
+ disabled: disabled
15205
+ }, "Auto")));
15404
15206
  };
15405
15207
 
15406
15208
  /* *
@@ -15416,20 +15218,19 @@
15416
15218
  * See the License for the specific language governing permissions and
15417
15219
  * limitations under the License.
15418
15220
  *
15419
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15420
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
15221
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15222
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
15421
15223
  * */
15422
- var OptionsPopOver = withStyles__default["default"](function (theme) {
15224
+ var OptionsPopOver = material.styled(material.Popover)(function (_a) {
15225
+ var theme = _a.theme;
15423
15226
  return {
15424
- paper: {
15425
- height: '24px',
15426
- padding: '8px',
15427
- borderRadius: '0',
15227
+ '& .MuiPaper-root': {
15228
+ padding: '5px',
15428
15229
  overflow: 'visible',
15429
15230
  backgroundColor: theme.palette.geowebColors.background.surface
15430
15231
  }
15431
15232
  };
15432
- })(material.Popover);
15233
+ });
15433
15234
 
15434
15235
  var OptionsMenuButton = function OptionsMenuButton(_a) {
15435
15236
  var autoUpdateBtn = _a.autoUpdateBtn,
@@ -15451,21 +15252,22 @@
15451
15252
  var open = Boolean(anchorEl);
15452
15253
  var id = open ? 'simple-popover' : undefined;
15453
15254
  return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
15454
- title: "Options"
15455
- }, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
15255
+ title: "Animation options",
15256
+ placement: "bottom"
15257
+ }, /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement(shared.ToolButton, {
15456
15258
  onClick: onClickButton,
15457
15259
  "data-testid": "optionsMenuButton",
15458
15260
  active: open
15459
15261
  }, /*#__PURE__*/React__namespace.createElement(theme.Options, {
15460
15262
  "data-testid": "optionsIcon"
15461
- }))), /*#__PURE__*/React__namespace.createElement(OptionsPopOver, {
15263
+ })))), /*#__PURE__*/React__namespace.createElement(OptionsPopOver, {
15462
15264
  id: id,
15463
15265
  open: open,
15464
15266
  "data-testid": "optionsMenuPopOver",
15465
15267
  anchorEl: anchorEl,
15466
15268
  onClose: handleClose,
15467
15269
  anchorOrigin: {
15468
- vertical: 'top',
15270
+ vertical: -5,
15469
15271
  horizontal: 'left'
15470
15272
  },
15471
15273
  transformOrigin: {
@@ -15513,53 +15315,18 @@
15513
15315
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
15514
15316
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
15515
15317
  * */
15516
- var useStyles$a = makeStyles__default["default"]({
15517
- buttonContainerBig: {
15518
- padding: '20px 0px 0px 12px',
15519
- width: '210px'
15520
- },
15521
- buttonContainerSmall: {
15522
- padding: '20px 0px 0px 12px',
15523
- width: '80px'
15524
- }
15525
- });
15526
15318
 
15527
15319
  var TimeSliderButtons = function TimeSliderButtons(_a) {
15528
- var autoUpdateBtn = _a.autoUpdateBtn,
15529
- optionsMenuBtn = _a.optionsMenuBtn,
15530
- playBtn = _a.playBtn,
15531
- speedBtn = _a.speedBtn,
15532
- timeStepBtn = _a.timeStepBtn;
15533
- var classes = useStyles$a();
15534
- var matches = material.useMediaQuery('(min-width:600px)');
15320
+ var optionsMenuBtn = _a.optionsMenuBtn,
15321
+ playBtn = _a.playBtn;
15535
15322
  return /*#__PURE__*/React__namespace.createElement("div", {
15536
15323
  "data-testid": "timeSliderButtons"
15537
- }, matches ? /*#__PURE__*/React__namespace.createElement(material.Grid, {
15324
+ }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
15538
15325
  container: true,
15539
15326
  spacing: 2,
15540
- className: classes.buttonContainerBig
15541
- }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
15542
- item: true
15543
- }, timeStepBtn || /*#__PURE__*/React__namespace.createElement(TimeStepButton, {
15544
- timeStep: 5,
15545
- onChangeTimeStep: function onChangeTimeStep() {
15546
- return null;
15547
- }
15548
- })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
15549
- item: true
15550
- }, speedBtn || /*#__PURE__*/React__namespace.createElement(SpeedButton, {
15551
- animationDelay: defaultAnimationDelayAtStart,
15552
- setMapAnimationDelay: function setMapAnimationDelay() {
15553
- return null;
15327
+ sx: {
15328
+ padding: '20px 0px 0px 16px'
15554
15329
  }
15555
- })), /*#__PURE__*/React__namespace.createElement(material.Grid, {
15556
- item: true
15557
- }, autoUpdateBtn || /*#__PURE__*/React__namespace.createElement(AutoUpdateButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
15558
- item: true
15559
- }, playBtn || /*#__PURE__*/React__namespace.createElement(PlayButton, null))) : /*#__PURE__*/React__namespace.createElement(material.Grid, {
15560
- container: true,
15561
- spacing: 1,
15562
- className: classes.buttonContainerSmall
15563
15330
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
15564
15331
  item: true
15565
15332
  }, optionsMenuBtn || /*#__PURE__*/React__namespace.createElement(OptionsMenuButton, null)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
@@ -16270,14 +16037,9 @@
16270
16037
  * See the License for the specific language governing permissions and
16271
16038
  * limitations under the License.
16272
16039
  *
16273
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16274
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
16040
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16041
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
16275
16042
  * */
16276
- var useStyles$9 = makeStyles__default["default"]({
16277
- timeSliderLegend: {
16278
- height: '50px'
16279
- }
16280
- });
16281
16043
 
16282
16044
  var getNextSecondsPerPxValue = function getNextSecondsPerPxValue(direction, oldSecondsPerPx, dataScaleToSecondsPerPx) {
16283
16045
  var fullSecondsPerPxValues = secondsPerPxValues(dataScaleToSecondsPerPx);
@@ -16316,7 +16078,6 @@
16316
16078
  onSetNewDate = _a.onSetNewDate,
16317
16079
  onSetCenterTime = _a.onSetCenterTime,
16318
16080
  onZoom = _a.onZoom;
16319
- var classes = useStyles$9();
16320
16081
 
16321
16082
  var _e = __read(useCanvasTarget('mousedown'), 2),
16322
16083
  isAllowedCanvasNodePointed = _e[0],
@@ -16390,9 +16151,11 @@
16390
16151
  throttledZoom(newSecondsPerPx, newCenterTime);
16391
16152
  };
16392
16153
 
16393
- return /*#__PURE__*/React__namespace.createElement("div", {
16394
- className: classes.timeSliderLegend,
16395
- "data-testid": "timeSliderLegend"
16154
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
16155
+ "data-testid": "timeSliderLegend",
16156
+ sx: {
16157
+ height: '50px'
16158
+ }
16396
16159
  }, /*#__PURE__*/React__namespace.createElement(CanvasComponent, {
16397
16160
  ref: node,
16398
16161
  onMouseMove: function onMouseMove(x, y, event, width) {
@@ -16461,31 +16224,12 @@
16461
16224
  * See the License for the specific language governing permissions and
16462
16225
  * limitations under the License.
16463
16226
  *
16464
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16465
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
16227
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16228
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
16466
16229
  * */
16467
16230
  var scaleSliderOtherSettings = {
16468
16231
  LEFT_PADDING: '10%'
16469
16232
  };
16470
- var useStyles$8 = makeStyles__default["default"](function (theme) {
16471
- return {
16472
- Background: {
16473
- backgroundColor: theme.palette.geowebColors.background.surface,
16474
- width: '229px',
16475
- height: '40px',
16476
- paddingTop: '4px',
16477
- paddingBottom: '7px',
16478
- boxSizing: 'content-box'
16479
- },
16480
- ScaleText: {
16481
- width: '67px',
16482
- height: '15px',
16483
- padding: '0px 10px 0 8px',
16484
- color: theme.palette.geowebColors.typographyAndIcons.text,
16485
- font: theme.palette.geowebColors.timeSlider.timeScaleText.fontSize + "px Roboto"
16486
- }
16487
- };
16488
- });
16489
16233
 
16490
16234
  var thumbComponent = function thumbComponent(props) {
16491
16235
  var children = props.children,
@@ -16540,14 +16284,15 @@
16540
16284
  return valueNew;
16541
16285
  };
16542
16286
 
16543
- var GeoWebScaleSlider = withStyles__default["default"](function (theme) {
16287
+ var GeoWebScaleSlider = material.styled(material.Slider)(function (_a) {
16288
+ var theme = _a.theme;
16544
16289
  return {
16545
- root: {
16290
+ '&.MuiSlider-root': {
16546
16291
  height: 4,
16547
16292
  width: 167,
16548
16293
  margin: "0 0 18px " + scaleSliderOtherSettings.LEFT_PADDING
16549
16294
  },
16550
- thumb: {
16295
+ '& .MuiSlider-thumb': {
16551
16296
  backgroundColor: 'rgba(0,0,0,0)',
16552
16297
  marginTop: 0,
16553
16298
  width: 12,
@@ -16560,46 +16305,46 @@
16560
16305
  display: 'none'
16561
16306
  }
16562
16307
  },
16563
- valueLabel: {
16308
+ '& .MuiSlider-valueLabel': {
16564
16309
  left: '20px'
16565
16310
  },
16566
- rail: {
16311
+ '& .MuiSlider-rail': {
16567
16312
  color: theme.palette.geowebColors.timeSlider.timeScaleHorizontalScale.fill,
16568
16313
  height: 4,
16569
16314
  width: 170,
16570
16315
  borderRadius: 4.5,
16571
16316
  opacity: theme.palette.geowebColors.timeSlider.timeScaleHorizontalScale.opacity
16572
16317
  },
16573
- mark: {
16318
+ '& .MuiSlider-mark': {
16574
16319
  backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicators.fill,
16575
16320
  height: 6,
16576
16321
  width: 2,
16577
- marginTop: -9
16578
- },
16579
- markActive: {
16580
- backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicatorsActive.fill,
16581
- height: 6,
16582
- width: 2,
16583
- marginTop: -9
16322
+ marginTop: -9,
16323
+ '&.MuiSlider-markActive': {
16324
+ backgroundColor: theme.palette.geowebColors.timeSlider.timeScaleTimeIndicatorsActive.fill,
16325
+ height: 6,
16326
+ width: 2,
16327
+ marginTop: -9
16328
+ }
16584
16329
  },
16585
16330
  '@media (max-width: 585px)': {
16586
- root: {
16331
+ '&.MuiSlider-root': {
16587
16332
  width: 110
16588
16333
  },
16589
- rail: {
16334
+ '& .MuiSlider-rail': {
16590
16335
  width: 110
16591
16336
  }
16592
16337
  },
16593
16338
  '@media (max-width: 395px)': {
16594
- root: {
16339
+ '&.MuiSlider-root': {
16595
16340
  width: 60
16596
16341
  },
16597
- rail: {
16342
+ '& .MuiSlider-rail': {
16598
16343
  width: 60
16599
16344
  }
16600
16345
  }
16601
16346
  };
16602
- })(material.Slider);
16347
+ });
16603
16348
  var RAIL_GUTTER_OFFSET = 0.4;
16604
16349
 
16605
16350
  var TimeSliderScaleSlider = function TimeSliderScaleSlider(_a) {
@@ -16610,7 +16355,6 @@
16610
16355
  secondsPerPx = _a.secondsPerPx,
16611
16356
  selectedTime = _a.selectedTime,
16612
16357
  onChangeTimeSliderScale = _a.onChangeTimeSliderScale;
16613
- var classes = useStyles$8();
16614
16358
  var min = 0;
16615
16359
  var max = marks.length - 1;
16616
16360
  var value = marks.findIndex(function (mark) {
@@ -16654,12 +16398,25 @@
16654
16398
  var scaleTextPadding = {
16655
16399
  paddingLeft: paddingLeft
16656
16400
  };
16657
- return /*#__PURE__*/React__namespace.createElement("div", {
16658
- className: classes.Background,
16659
- "data-testid": "scaleSlider"
16660
- }, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", {
16401
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
16402
+ "data-testid": "scaleSlider",
16403
+ sx: {
16404
+ backgroundColor: 'geowebColors.background.surface',
16405
+ width: '229px',
16406
+ height: '40px',
16407
+ paddingTop: '4px',
16408
+ paddingBottom: '7px',
16409
+ boxSizing: 'content-box'
16410
+ }
16411
+ }, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(material.Box, {
16661
16412
  "data-testid": "scaleSliderText",
16662
- className: classes.ScaleText,
16413
+ sx: {
16414
+ width: '67px',
16415
+ height: '15px',
16416
+ padding: '0px 10px 0 8px',
16417
+ color: 'geowebColors.typographyAndIcons.text',
16418
+ font: '12px Roboto'
16419
+ },
16663
16420
  style: scaleTextPadding
16664
16421
  }, text)), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(GeoWebScaleSlider, {
16665
16422
  "data-testid": "scaleSliderSlider",
@@ -16882,20 +16639,9 @@
16882
16639
  * See the License for the specific language governing permissions and
16883
16640
  * limitations under the License.
16884
16641
  *
16885
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16886
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
16642
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16643
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
16887
16644
  * */
16888
- var useStyles$7 = makeStyles__default["default"]({
16889
- timeSliderRail: {
16890
- '& div': {
16891
- outline: 'none'
16892
- },
16893
- height: '45px',
16894
- '& canvas': {
16895
- display: 'block'
16896
- }
16897
- }
16898
- });
16899
16645
 
16900
16646
  var setPreviousTimeStep = function setPreviousTimeStep(timeStep, curTime, dataStartTime, onSetNewDate) {
16901
16647
  var prevTimeStep = moment__default["default"].utc(curTime).subtract(timeStep, 'm').toISOString();
@@ -16934,7 +16680,6 @@
16934
16680
  onSetAnimationEndTime = _a.onSetAnimationEndTime,
16935
16681
  onSetNewDate = _a.onSetNewDate,
16936
16682
  onSetCenterTime = _a.onSetCenterTime;
16937
- var classes = useStyles$7();
16938
16683
  var ZOOM_RATIO = 1.1;
16939
16684
 
16940
16685
  var zoomOut = function zoomOut(relativeX) {
@@ -17142,12 +16887,20 @@
17142
16887
 
17143
16888
  }, [selectedTimeUnix]);
17144
16889
  var theme = material.useTheme();
17145
- return /*#__PURE__*/React__namespace.createElement("div", {
17146
- className: classes.timeSliderRail,
16890
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
17147
16891
  style: {
17148
16892
  cursor: cursorStyle
17149
16893
  },
17150
- "data-testid": "timeSliderRail"
16894
+ "data-testid": "timeSliderRail",
16895
+ sx: {
16896
+ '& div': {
16897
+ outline: 'none'
16898
+ },
16899
+ height: '45px',
16900
+ '& canvas': {
16901
+ display: 'block'
16902
+ }
16903
+ }
17151
16904
  }, /*#__PURE__*/React__namespace.createElement(CanvasComponent, {
17152
16905
  ref: node,
17153
16906
  onMouseDown: onMouseDown,
@@ -17204,19 +16957,9 @@
17204
16957
  * See the License for the specific language governing permissions and
17205
16958
  * limitations under the License.
17206
16959
  *
17207
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17208
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
16960
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
16961
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
17209
16962
  * */
17210
- var useStyles$6 = makeStyles__default["default"]({
17211
- container: {
17212
- display: 'grid',
17213
- gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
17214
- gridTemplateRows: '50px'
17215
- },
17216
- scaleSlider: {
17217
- height: '50px'
17218
- }
17219
- });
17220
16963
 
17221
16964
  var useTimeSliderKeyBoardControl = function useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider) {
17222
16965
  React__namespace.useEffect(function () {
@@ -17253,12 +16996,15 @@
17253
16996
  isVisible = _c === void 0 ? true : _c,
17254
16997
  _d = _a.onToggleTimeSlider,
17255
16998
  onToggleTimeSlider = _d === void 0 ? function () {} : _d;
17256
- var styles = useStyles$6();
17257
16999
  useTimeSliderKeyBoardControl(mapIsActive, isVisible, onToggleTimeSlider);
17258
17000
  return isVisible ? /*#__PURE__*/React__namespace.createElement(material.Grid, {
17259
17001
  container: true,
17260
- className: styles.container,
17261
- "data-testid": "timeSlider"
17002
+ "data-testid": "timeSlider",
17003
+ sx: {
17004
+ display: 'grid',
17005
+ gridTemplateColumns: 'minmax(100px, 210px) minmax(66%, 1fr)',
17006
+ gridTemplateRows: '50px'
17007
+ }
17262
17008
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
17263
17009
  item: true
17264
17010
  }, " ", buttons || /*#__PURE__*/React__namespace.createElement(TimeSliderButtons, null), " "), /*#__PURE__*/React__namespace.createElement(material.Grid, {
@@ -17268,7 +17014,9 @@
17268
17014
  mapIsActive: mapIsActive
17269
17015
  })), ' '), /*#__PURE__*/React__namespace.createElement(material.Grid, {
17270
17016
  item: true,
17271
- className: styles.scaleSlider
17017
+ sx: {
17018
+ height: '50px'
17019
+ }
17272
17020
  }, scaleSlider || /*#__PURE__*/React__namespace.createElement(TimeSliderScaleSlider, __assign({}, defaultProps, {
17273
17021
  selectedTime: defaultProps.selectedTime.unix(),
17274
17022
  timeSliderScale: Scale.Hour,
@@ -17497,20 +17245,11 @@
17497
17245
  var TimeSliderButtonsConnect = function TimeSliderButtonsConnect(_a) {
17498
17246
  var mapId = _a.mapId;
17499
17247
  return /*#__PURE__*/React__namespace.createElement(TimeSliderButtons, {
17500
- autoUpdateBtn: /*#__PURE__*/React__namespace.createElement(AutoUpdateButtonConnect, {
17501
- mapId: mapId
17502
- }),
17503
17248
  optionsMenuBtn: /*#__PURE__*/React__namespace.createElement(OptionsMenuButtonConnect, {
17504
17249
  mapId: mapId
17505
17250
  }),
17506
17251
  playBtn: /*#__PURE__*/React__namespace.createElement(PlayButtonConnect, {
17507
17252
  mapId: mapId
17508
- }),
17509
- speedBtn: /*#__PURE__*/React__namespace.createElement(SpeedButtonConnect, {
17510
- mapId: mapId
17511
- }),
17512
- timeStepBtn: /*#__PURE__*/React__namespace.createElement(TimeStepButtonComponent, {
17513
- mapId: mapId
17514
17253
  })
17515
17254
  });
17516
17255
  };
@@ -17975,29 +17714,25 @@
17975
17714
  * See the License for the specific language governing permissions and
17976
17715
  * limitations under the License.
17977
17716
  *
17978
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17979
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
17717
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
17718
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
17980
17719
  * */
17981
- var useStyles$5 = makeStyles__default["default"]({
17982
- MapViewLayer: {
17983
- width: '100%',
17984
- padding: '2px',
17985
- margin: 0,
17986
- wordWrap: 'break-word',
17987
- border: '1px solid rgba(0, 0, 0, 0.5)',
17988
- lineHeight: '14px',
17989
- fontSize: '10px',
17990
- background: 'rgba(255, 255, 255, 0.5)',
17991
- display: 'none'
17992
- }
17993
- });
17994
17720
 
17995
17721
  var MapViewLayer = function MapViewLayer(props) {
17996
17722
  var id = props.id;
17997
- var classes = useStyles$5();
17998
- return /*#__PURE__*/React__namespace.createElement("div", {
17723
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
17999
17724
  "data-testid": "mapViewLayer",
18000
- className: classes.MapViewLayer
17725
+ sx: {
17726
+ width: '100%',
17727
+ padding: '2px',
17728
+ margin: 0,
17729
+ wordWrap: 'break-word',
17730
+ border: '1px solid rgba(0, 0, 0, 0.5)',
17731
+ lineHeight: '14px',
17732
+ fontSize: '10px',
17733
+ background: 'rgba(255, 255, 255, 0.5)',
17734
+ display: 'none'
17735
+ }
18001
17736
  }, /*#__PURE__*/React__namespace.createElement("div", null, id), /*#__PURE__*/React__namespace.createElement("div", {
18002
17737
  // eslint-disable-next-line react/no-danger
18003
17738
  dangerouslySetInnerHTML: {
@@ -19295,12 +19030,12 @@
19295
19030
 
19296
19031
  if (onHoverFeature) {
19297
19032
  var handleMouseStoppedTimer = function handleMouseStoppedTimer() {
19298
- var result = checkHoverFeatures(_this.geojson, mouseX, mouseY, function (coordinates) {
19033
+ var result = checkHoverFeatures(_this.geojson, _this.mouseX, _this.mouseY, function (coordinates) {
19299
19034
  return _this.convertGeoCoordsToScreenCoords(coordinates);
19300
19035
  });
19301
19036
 
19302
19037
  if (result) {
19303
- var featureEvent = {
19038
+ _this.featureEvent = {
19304
19039
  coordinateIndexInFeature: result.coordinateIndexInFeature,
19305
19040
  featureIndex: result.featureIndex,
19306
19041
  mouseX: mouseX,
@@ -19308,8 +19043,13 @@
19308
19043
  isInEditMode: isInEditMode,
19309
19044
  feature: result.feature
19310
19045
  };
19311
- onHoverFeature(featureEvent);
19046
+ onHoverFeature(_this.featureEvent);
19047
+ } else {
19048
+ _this.featureEvent = undefined;
19312
19049
  }
19050
+
19051
+ var webmapjs = _this.props.webmapjs;
19052
+ webmapjs && webmapjs.draw('AdagucMapDraw::onHoverFeature');
19313
19053
  };
19314
19054
 
19315
19055
  window.clearTimeout(this.mouseStoppedTimer);
@@ -20422,6 +20162,7 @@
20422
20162
  var drawMarkerByDefault = !featureProperties || !featureProperties.imageURL || !featureProperties.drawFunction;
20423
20163
 
20424
20164
  if (featureProperties.drawFunction) {
20165
+ var isHovered = this.featureEvent && this.featureEvent.feature === feature;
20425
20166
  featureProperties.drawFunction({
20426
20167
  context: ctx,
20427
20168
  featureIndex: featureIndex,
@@ -20431,7 +20172,8 @@
20431
20172
  isInEditMode: isInEditMode,
20432
20173
  feature: feature,
20433
20174
  mouseX: this.mouseX,
20434
- mouseY: this.mouseY
20175
+ mouseY: this.mouseY,
20176
+ isHovered: isHovered
20435
20177
  });
20436
20178
  } else if (drawStyledMarker || drawMarkerByDefault) {
20437
20179
  this.drawMarker(ctx, _coord, selected, middle, isInEditMode, featureProperties);
@@ -21695,22 +21437,9 @@
21695
21437
  * See the License for the specific language governing permissions and
21696
21438
  * limitations under the License.
21697
21439
  *
21698
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21699
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
21440
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21441
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21700
21442
  * */
21701
- var useStyles$4 = makeStyles__default["default"](function () {
21702
- return {
21703
- mapTimeContainer: {
21704
- zIndex: 10,
21705
- justifySelf: 'center',
21706
- bottom: 12,
21707
- position: 'absolute'
21708
- },
21709
- mapTimeText: {
21710
- fontWeight: 500
21711
- }
21712
- };
21713
- });
21714
21443
  var getTimeDimension = function getTimeDimension(dimensions) {
21715
21444
  return dimensions.find(function (dimension) {
21716
21445
  return dimension.name === 'time' && dimension.currentValue !== undefined;
@@ -21725,7 +21454,6 @@
21725
21454
  var dimensions = _a.dimensions,
21726
21455
  _b = _a.timeFormat,
21727
21456
  timeFormat = _b === void 0 ? defaultTimeFormat : _b;
21728
- var classes = useStyles$4();
21729
21457
  var timeDimension = getTimeDimension(dimensions);
21730
21458
 
21731
21459
  if (!timeDimension) {
@@ -21733,12 +21461,19 @@
21733
21461
  }
21734
21462
 
21735
21463
  var mapTime = formatTime(timeDimension.currentValue, timeFormat);
21736
- return /*#__PURE__*/React__namespace.createElement("div", {
21464
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
21737
21465
  "data-testid": "map-time",
21738
- className: classes.mapTimeContainer
21466
+ sx: {
21467
+ zIndex: 10,
21468
+ justifySelf: 'center',
21469
+ bottom: '12px',
21470
+ position: 'absolute'
21471
+ }
21739
21472
  }, /*#__PURE__*/React__namespace.createElement(material.Box, null, /*#__PURE__*/React__namespace.createElement(material.Typography, {
21740
21473
  variant: "caption",
21741
- className: classes.mapTimeText
21474
+ sx: {
21475
+ fontWeight: 500
21476
+ }
21742
21477
  }, mapTime)));
21743
21478
  };
21744
21479
 
@@ -21755,24 +21490,9 @@
21755
21490
  * See the License for the specific language governing permissions and
21756
21491
  * limitations under the License.
21757
21492
  *
21758
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21759
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
21493
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21494
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21760
21495
  * */
21761
- var useStyles$3 = makeStyles__default["default"](function () {
21762
- return {
21763
- mapViewContainer: {
21764
- display: 'grid',
21765
- width: '100%',
21766
- height: '100%',
21767
- position: 'relative',
21768
- overflow: 'hidden'
21769
- },
21770
- mapView: {
21771
- gridColumnStart: 1,
21772
- gridRowStart: 1
21773
- }
21774
- };
21775
- });
21776
21496
 
21777
21497
  var MapView = function MapView(_a) {
21778
21498
  var children = _a.children,
@@ -21785,11 +21505,16 @@
21785
21505
  // rest props
21786
21506
  props = __rest(_a, ["children", "controls", "displayTimeInMap"]);
21787
21507
 
21788
- var classes = useStyles$3();
21789
21508
  var dimensions = props.dimensions;
21790
21509
  var adagucRef = React__namespace.useRef(null);
21791
- return /*#__PURE__*/React__namespace.createElement("div", {
21792
- className: classes.mapViewContainer
21510
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
21511
+ sx: {
21512
+ display: 'grid',
21513
+ width: '100%',
21514
+ height: '100%',
21515
+ position: 'relative',
21516
+ overflow: 'hidden'
21517
+ }
21793
21518
  }, controls && controls.zoomControls && /*#__PURE__*/React__namespace.createElement(MapControls, {
21794
21519
  style: {
21795
21520
  top: 0,
@@ -21805,8 +21530,11 @@
21805
21530
  onZoomReset: function onZoomReset() {
21806
21531
  return adagucRef.current.zoomToLayer(adagucRef.current.getActiveLayer());
21807
21532
  }
21808
- })), /*#__PURE__*/React__namespace.createElement("div", {
21809
- className: classes.mapView
21533
+ })), /*#__PURE__*/React__namespace.createElement(material.Box, {
21534
+ sx: {
21535
+ gridColumnStart: 1,
21536
+ gridRowStart: 1
21537
+ }
21810
21538
  }, /*#__PURE__*/React__namespace.createElement(ReactMapView, __assign({}, props, {
21811
21539
  onRegisterAdaguc: function onRegisterAdaguc(adaguc) {
21812
21540
  adagucRef.current = adaguc;
@@ -21818,6 +21546,217 @@
21818
21546
  }));
21819
21547
  };
21820
21548
 
21549
+ /* *
21550
+ * Licensed under the Apache License, Version 2.0 (the "License");
21551
+ * you may not use this file except in compliance with the License.
21552
+ * You may obtain a copy of the License at
21553
+ *
21554
+ * http://www.apache.org/licenses/LICENSE-2.0
21555
+ *
21556
+ * Unless required by applicable law or agreed to in writing, software
21557
+ * distributed under the License is distributed on an "AS IS" BASIS,
21558
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21559
+ * See the License for the specific language governing permissions and
21560
+ * limitations under the License.
21561
+ *
21562
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21563
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21564
+ * */
21565
+ var useTouchZoomPan = function useTouchZoomPan(mapIsActive, mapId) {
21566
+ var _a = __read(React__namespace.useState(0), 2),
21567
+ firstTouchX = _a[0],
21568
+ setFirstTouchX = _a[1];
21569
+
21570
+ var _b = __read(React__namespace.useState(0), 2),
21571
+ firstTouchY = _b[0],
21572
+ setFirstTouchY = _b[1];
21573
+
21574
+ var _c = __read(React__namespace.useState(0), 2),
21575
+ secondTouchX = _c[0],
21576
+ setSecondTouchX = _c[1];
21577
+
21578
+ var _d = __read(React__namespace.useState(0), 2),
21579
+ secondTouchY = _d[0],
21580
+ setSecondTouchY = _d[1];
21581
+
21582
+ var _e = __read(React__namespace.useState(0), 2),
21583
+ prevDist = _e[0],
21584
+ setPrevDist = _e[1];
21585
+
21586
+ var isPanning = function isPanning(touches) {
21587
+ return (touches === null || touches === void 0 ? void 0 : touches.length) === 1;
21588
+ };
21589
+
21590
+ var isZooming = function isZooming(touches) {
21591
+ return (touches === null || touches === void 0 ? void 0 : touches.length) === 2;
21592
+ };
21593
+
21594
+ var isValidMap = React__namespace.useCallback(function (map, event) {
21595
+ var target = event.target;
21596
+ return map && target.tagName !== 'INPUT' && mapIsActive;
21597
+ }, [mapIsActive]);
21598
+
21599
+ var distance = function distance(x1, y1, x2, y2) {
21600
+ var dx = x1 - x2;
21601
+ var dy = y1 - y2;
21602
+ return Math.sqrt(dx * dx + dy * dy);
21603
+ };
21604
+
21605
+ var handleStart = React__namespace.useCallback(function (event) {
21606
+ var map = getWMJSMapById(mapId);
21607
+ if (!isValidMap(map, event)) return;
21608
+ var targetTouches = event.targetTouches;
21609
+ var firstTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(0);
21610
+ setFirstTouchX(firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientX);
21611
+ setFirstTouchY(firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientY);
21612
+
21613
+ if (isZooming(targetTouches)) {
21614
+ var secondTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(1);
21615
+ setSecondTouchX(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientX);
21616
+ setSecondTouchY(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientY);
21617
+ }
21618
+ }, [isValidMap, mapId]);
21619
+ var handleMove = React__namespace.useCallback(function (event) {
21620
+ var map = getWMJSMapById(mapId);
21621
+ if (!isValidMap(map, event)) return;
21622
+ event.preventDefault();
21623
+ var targetTouches = event.targetTouches;
21624
+ var firstTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(0);
21625
+ var firstX = firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientX;
21626
+ var firstY = firstTouch === null || firstTouch === void 0 ? void 0 : firstTouch.clientY;
21627
+ var elemWidth = firstTouch.target.clientWidth;
21628
+ var elemHeight = firstTouch.target.clientHeight;
21629
+ var distanceEps = TOUCH_PAN_STEP_PERCENTAGE * Math.min(elemWidth, elemHeight);
21630
+
21631
+ if (isPanning(targetTouches)) {
21632
+ // Pan with a one-point touch
21633
+ var dist = distance(firstTouchX, firstTouchY, firstX, firstY);
21634
+
21635
+ if (dist > distanceEps) {
21636
+ var distX = firstX - firstTouchX;
21637
+ var distY = firstY - firstTouchY;
21638
+ var unitDirX = distX / dist;
21639
+ var unitDirY = -distY / dist;
21640
+ setFirstTouchX(firstX);
21641
+ setFirstTouchY(firstY);
21642
+ map.mapPanPercentage(unitDirX * TOUCH_PAN_STEP_PERCENTAGE, unitDirY * TOUCH_PAN_STEP_PERCENTAGE);
21643
+ }
21644
+ } else if (isZooming(targetTouches)) {
21645
+ // Zoom with a two-point "pinch" touch
21646
+ setFirstTouchX(firstX);
21647
+ setFirstTouchY(firstY);
21648
+ var secondTouch = targetTouches === null || targetTouches === void 0 ? void 0 : targetTouches.item(1);
21649
+ setSecondTouchX(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientX);
21650
+ setSecondTouchY(secondTouch === null || secondTouch === void 0 ? void 0 : secondTouch.clientY);
21651
+ var dist = distance(firstTouchX, firstTouchY, secondTouchX, secondTouchY);
21652
+
21653
+ if (Math.abs(dist - prevDist) > distanceEps) {
21654
+ if (dist < prevDist) {
21655
+ map.zoomOut();
21656
+ } else if (dist > prevDist) {
21657
+ map.zoomIn(1);
21658
+ }
21659
+
21660
+ setPrevDist(dist);
21661
+ }
21662
+ }
21663
+ }, [firstTouchX, firstTouchY, isValidMap, mapId, prevDist, secondTouchX, secondTouchY]);
21664
+ var handleEnd = React__namespace.useCallback(function () {}, []);
21665
+ React__namespace.useEffect(function () {
21666
+ document.addEventListener('touchstart', handleStart, {
21667
+ passive: false
21668
+ });
21669
+ document.addEventListener('touchmove', handleMove, {
21670
+ passive: false
21671
+ });
21672
+ document.addEventListener('touchend', handleEnd, {
21673
+ passive: false
21674
+ });
21675
+ return function () {
21676
+ document.removeEventListener('touchstart', handleStart);
21677
+ document.removeEventListener('touchmove', handleMove);
21678
+ document.removeEventListener('touchend', handleEnd);
21679
+ };
21680
+ }, [firstTouchX, firstTouchY, secondTouchX, secondTouchY, mapId, mapIsActive, prevDist, handleStart, handleMove, handleEnd]);
21681
+ };
21682
+ var TOUCH_PAN_STEP_PERCENTAGE = 0.02;
21683
+
21684
+ /* *
21685
+ * Licensed under the Apache License, Version 2.0 (the "License");
21686
+ * you may not use this file except in compliance with the License.
21687
+ * You may obtain a copy of the License at
21688
+ *
21689
+ * http://www.apache.org/licenses/LICENSE-2.0
21690
+ *
21691
+ * Unless required by applicable law or agreed to in writing, software
21692
+ * distributed under the License is distributed on an "AS IS" BASIS,
21693
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21694
+ * See the License for the specific language governing permissions and
21695
+ * limitations under the License.
21696
+ *
21697
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
21698
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
21699
+ * */
21700
+ var useKeyboardZoomAndPan = function useKeyboardZoomAndPan(mapIsActive, mapId) {
21701
+ React__namespace.useEffect(function () {
21702
+ var keysPressedDown = {};
21703
+
21704
+ var handleKeyPress = function handleKeyPress(event) {
21705
+ var target = event.target;
21706
+ var map = getWMJSMapById(mapId);
21707
+
21708
+ if (map && target.tagName !== 'INPUT' && mapIsActive) {
21709
+ var key = event.key,
21710
+ type = event.type;
21711
+ keysPressedDown[key] = type === 'keydown';
21712
+
21713
+ if (keysPressedDown['+']) {
21714
+ map.zoomIn(1);
21715
+ } else if (keysPressedDown['-']) {
21716
+ map.zoomOut();
21717
+ }
21718
+
21719
+ var arrowRight = keysPressedDown['ArrowRight'];
21720
+ var arrowLeft = keysPressedDown['ArrowLeft'];
21721
+ var arrowUp = keysPressedDown['ArrowUp'];
21722
+ var arrowDown = keysPressedDown['ArrowDown'];
21723
+ var control = keysPressedDown['Control'];
21724
+
21725
+ if (!control && (arrowRight || arrowLeft || arrowUp || arrowDown)) {
21726
+ var x = 0;
21727
+ var y = 0;
21728
+
21729
+ if (arrowRight) {
21730
+ x -= PAN_STEP_PERCENTAGE;
21731
+ }
21732
+
21733
+ if (arrowLeft) {
21734
+ x += PAN_STEP_PERCENTAGE;
21735
+ }
21736
+
21737
+ if (arrowUp) {
21738
+ y -= PAN_STEP_PERCENTAGE;
21739
+ }
21740
+
21741
+ if (arrowDown) {
21742
+ y += PAN_STEP_PERCENTAGE;
21743
+ }
21744
+
21745
+ map.mapPanPercentage(x, y);
21746
+ }
21747
+ }
21748
+ };
21749
+
21750
+ document.addEventListener('keydown', handleKeyPress);
21751
+ document.addEventListener('keyup', handleKeyPress);
21752
+ return function () {
21753
+ document.removeEventListener('keydown', handleKeyPress);
21754
+ document.removeEventListener('keyup', handleKeyPress);
21755
+ };
21756
+ }, [mapIsActive, mapId]);
21757
+ };
21758
+ var PAN_STEP_PERCENTAGE = 0.02;
21759
+
21821
21760
  /* *
21822
21761
  * Licensed under the Apache License, Version 2.0 (the "License");
21823
21762
  * you may not use this file except in compliance with the License.
@@ -21934,7 +21873,14 @@
21934
21873
  var setSelectedFeature = React__namespace.useCallback(function (payload) {
21935
21874
  dispatch(mapActions$1.setSelectedFeature(payload));
21936
21875
  }, [dispatch]);
21937
- useKeyboardZoomAndPan(mapId);
21876
+ var activeWindowId = reactRedux.useSelector(getActiveWindowId);
21877
+
21878
+ var isActiveWindowId = function isActiveWindowId() {
21879
+ return activeWindowId === mapId;
21880
+ };
21881
+
21882
+ useKeyboardZoomAndPan(isActiveWindowId(), mapId);
21883
+ useTouchZoomPan(isActiveWindowId(), mapId);
21938
21884
  return /*#__PURE__*/React__namespace.createElement("div", {
21939
21885
  style: {
21940
21886
  height: '100%'
@@ -22030,69 +21976,6 @@
22030
21976
  }), children));
22031
21977
  };
22032
21978
 
22033
- var useKeyboardZoomAndPan = function useKeyboardZoomAndPan(mapId) {
22034
- var activeWindowId = reactRedux.useSelector(getActiveWindowId);
22035
- var mapIsActive = activeWindowId === mapId;
22036
- React__namespace.useEffect(function () {
22037
- var keysPressedDown = {};
22038
-
22039
- var handleKeyPress = function handleKeyPress(event) {
22040
- var target = event.target;
22041
- var map = getWMJSMapById(mapId);
22042
-
22043
- if (map && target.tagName !== 'INPUT' && mapIsActive) {
22044
- var key = event.key,
22045
- type = event.type;
22046
- keysPressedDown[key] = type === 'keydown';
22047
-
22048
- if (keysPressedDown['+']) {
22049
- map.zoomIn(1);
22050
- } else if (keysPressedDown['-']) {
22051
- map.zoomOut();
22052
- }
22053
-
22054
- var arrowRight = keysPressedDown['ArrowRight'];
22055
- var arrowLeft = keysPressedDown['ArrowLeft'];
22056
- var arrowUp = keysPressedDown['ArrowUp'];
22057
- var arrowDown = keysPressedDown['ArrowDown'];
22058
- var control = keysPressedDown['Control'];
22059
-
22060
- if (!control && (arrowRight || arrowLeft || arrowUp || arrowDown)) {
22061
- var x = 0;
22062
- var y = 0;
22063
-
22064
- if (arrowRight) {
22065
- x -= PAN_STEP_PERCENTAGE;
22066
- }
22067
-
22068
- if (arrowLeft) {
22069
- x += PAN_STEP_PERCENTAGE;
22070
- }
22071
-
22072
- if (arrowUp) {
22073
- y -= PAN_STEP_PERCENTAGE;
22074
- }
22075
-
22076
- if (arrowDown) {
22077
- y += PAN_STEP_PERCENTAGE;
22078
- }
22079
-
22080
- map.mapPanPercentage(x, y);
22081
- }
22082
- }
22083
- };
22084
-
22085
- document.addEventListener('keydown', handleKeyPress);
22086
- document.addEventListener('keyup', handleKeyPress);
22087
- return function () {
22088
- document.removeEventListener('keydown', handleKeyPress);
22089
- document.removeEventListener('keyup', handleKeyPress);
22090
- };
22091
- }, [mapIsActive, mapId]);
22092
- };
22093
-
22094
- var PAN_STEP_PERCENTAGE = 0.02;
22095
-
22096
21979
  /* *
22097
21980
  * Licensed under the Apache License, Version 2.0 (the "License");
22098
21981
  * you may not use this file except in compliance with the License.
@@ -22312,20 +22195,20 @@
22312
22195
  * See the License for the specific language governing permissions and
22313
22196
  * limitations under the License.
22314
22197
  *
22315
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22316
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
22198
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22199
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
22317
22200
  * */
22318
- var useStyles$2 = makeStyles__default["default"](function (theme) {
22201
+
22202
+ var mapBoxStyle = function mapBoxStyle(theme) {
22319
22203
  return {
22320
- box: {
22321
- boxSizing: 'border-box',
22322
- "float": 'left',
22323
- '& .MapViewComponent': {
22324
- border: "1px solid " + theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
22325
- }
22204
+ boxSizing: 'border-box',
22205
+ "float": 'left',
22206
+ '& .MapViewComponent': {
22207
+ border: "1px solid " + theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
22326
22208
  }
22327
22209
  };
22328
- });
22210
+ };
22211
+
22329
22212
  var MultiMapViewConnect = function MultiMapViewConnect(_a) {
22330
22213
  var maps = _a.maps,
22331
22214
  rows = _a.rows,
@@ -22336,7 +22219,6 @@
22336
22219
  showZoomControls = _c === void 0 ? true : _c,
22337
22220
  _d = _a.multiLegend,
22338
22221
  multiLegend = _d === void 0 ? false : _d;
22339
- var classes = useStyles$2();
22340
22222
  var dispatch = reactRedux.useDispatch();
22341
22223
  var syncGroupAddTarget = React__default["default"].useCallback(function (payload) {
22342
22224
  dispatch(genericActions.syncGroupAddTarget(payload));
@@ -22381,10 +22263,10 @@
22381
22263
  multiLegend: multiLegend
22382
22264
  }), maps.map(function (map, mapIndex) {
22383
22265
  var mapId = map.id;
22384
- return /*#__PURE__*/React__default["default"].createElement("div", {
22385
- className: classes.box,
22266
+ return /*#__PURE__*/React__default["default"].createElement(material.Box, {
22386
22267
  key: mapId,
22387
- style: mapStyle
22268
+ style: mapStyle,
22269
+ sx: mapBoxStyle
22388
22270
  }, /*#__PURE__*/React__default["default"].createElement(ConfigurableMapConnect, {
22389
22271
  title: map.title,
22390
22272
  id: mapId,
@@ -22706,18 +22588,32 @@
22706
22588
  * See the License for the specific language governing permissions and
22707
22589
  * limitations under the License.
22708
22590
  *
22709
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22710
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
22591
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22592
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
22711
22593
  * */
22594
+ var styles = {
22595
+ listItem: {
22596
+ width: '80%',
22597
+ borderRadius: '5px'
22598
+ },
22599
+ isActive: {
22600
+ color: 'geowebColors.typographyAndIcons.icon'
22601
+ },
22602
+ checkboxIsActive: {
22603
+ color: 'geowebColors.typographyAndIcons.iconLinkActive'
22604
+ },
22605
+ isDisabled: {
22606
+ color: 'geowebColors.typographyAndIcons.iconLinkDisabled'
22607
+ }
22608
+ };
22712
22609
  var SyncGroupListItem = function SyncGroupListItem(_a) {
22713
22610
  var viewStateData = _a.viewStateData,
22714
22611
  groupId = _a.groupId,
22715
22612
  selected = _a.selected,
22716
22613
  sourcesById = _a.sourcesById,
22717
22614
  handleToggle = _a.handleToggle;
22718
- var classes = useStyles$1();
22719
- return /*#__PURE__*/React__namespace.createElement("div", {
22720
- className: classes.listItem
22615
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
22616
+ sx: styles.listItem
22721
22617
  }, sourcesById.map(function (source) {
22722
22618
  var isChecked = selected.includes(source.id); // Check if checkbox is checked in another group
22723
22619
 
@@ -22731,7 +22627,7 @@
22731
22627
  onClick: function onClick() {
22732
22628
  return handleToggle(source.id);
22733
22629
  },
22734
- className: classes.listItem
22630
+ sx: styles.listItem
22735
22631
  }, /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, null, /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
22736
22632
  edge: "start",
22737
22633
  checked: isChecked,
@@ -22740,30 +22636,13 @@
22740
22636
  inputProps: {
22741
22637
  'aria-labelledby': source.name
22742
22638
  },
22743
- className: isNotCheckedElseWhere ? classes.checkboxIsActive : classes.isDisabled,
22639
+ sx: isNotCheckedElseWhere ? styles.checkboxIsActive : styles.isDisabled,
22744
22640
  color: "default"
22745
22641
  })), /*#__PURE__*/React__namespace.createElement(material.Typography, {
22746
- className: isNotCheckedElseWhere ? classes.isActive : classes.isDisabled
22642
+ sx: isNotCheckedElseWhere ? styles.isActive : styles.isDisabled
22747
22643
  }, source.name));
22748
22644
  }));
22749
22645
  };
22750
- var useStyles$1 = makeStyles__default["default"](function (theme) {
22751
- return createStyles__default["default"]({
22752
- listItem: {
22753
- width: '80%',
22754
- borderRadius: '5px'
22755
- },
22756
- isActive: {
22757
- color: theme.palette.geowebColors.typographyAndIcons.icon
22758
- },
22759
- checkboxIsActive: {
22760
- color: theme.palette.geowebColors.typographyAndIcons.iconLinkActive
22761
- },
22762
- isDisabled: {
22763
- color: theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
22764
- }
22765
- });
22766
- });
22767
22646
 
22768
22647
  /* *
22769
22648
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -22778,8 +22657,8 @@
22778
22657
  * See the License for the specific language governing permissions and
22779
22658
  * limitations under the License.
22780
22659
  *
22781
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22782
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
22660
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
22661
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
22783
22662
  * */
22784
22663
  var SyncGroupList = function SyncGroupList(_a) {
22785
22664
  var viewStateData = _a.viewStateData,
@@ -22787,15 +22666,26 @@
22787
22666
  _handleToggle = _a.handleToggle,
22788
22667
  addNewGroup = _a.addNewGroup,
22789
22668
  removeGroup = _a.removeGroup;
22790
- var classes = useStyles();
22791
22669
  return /*#__PURE__*/React__namespace.createElement(material.List, {
22792
22670
  disablePadding: true
22793
22671
  }, viewStateData.groups.map(function (groupObject, index) {
22794
22672
  return /*#__PURE__*/React__namespace.createElement(material.Box, {
22795
22673
  key: groupObject.id,
22796
- className: index === 0 ? null : classes.childListItem
22797
- }, /*#__PURE__*/React__namespace.createElement("div", {
22798
- className: classes.syncGroupHeader
22674
+ sx: __assign({}, index !== 0 && {
22675
+ backgroundColor: 'geowebColors.syncGroups.drawerOpen.fill',
22676
+ boxShadow: 'inset 0px 7px 7px -7px, inset 0px -7px 7px -7px',
22677
+ color: '#000000'
22678
+ })
22679
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
22680
+ sx: {
22681
+ display: 'flex',
22682
+ flexDirection: 'row',
22683
+ justifyContent: 'space-between',
22684
+ alignItems: 'center',
22685
+ color: 'geowebColors.typographyAndIcons.text',
22686
+ paddingLeft: '15px',
22687
+ paddingTop: '10px'
22688
+ }
22799
22689
  }, /*#__PURE__*/React__namespace.createElement(material.Typography, null, title), /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
22800
22690
  title: index === 0 ? 'Add new group to list' : 'Remove group from list'
22801
22691
  }, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
@@ -22820,24 +22710,6 @@
22820
22710
  }));
22821
22711
  }));
22822
22712
  };
22823
- var useStyles = makeStyles__default["default"](function (theme) {
22824
- return createStyles__default["default"]({
22825
- syncGroupHeader: {
22826
- display: 'flex',
22827
- flexDirection: 'row',
22828
- justifyContent: 'space-between',
22829
- alignItems: 'center',
22830
- color: theme.palette.geowebColors.typographyAndIcons.text,
22831
- paddingLeft: '15px',
22832
- paddingTop: '10px'
22833
- },
22834
- childListItem: {
22835
- backgroundColor: theme.palette.geowebColors.syncGroups.drawerOpen.fill,
22836
- boxShadow: 'inset 0px 7px 7px -7px, inset 0px -7px 7px -7px',
22837
- color: '#000000'
22838
- }
22839
- });
22840
- });
22841
22713
 
22842
22714
  /* *
22843
22715
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -23286,6 +23158,90 @@
23286
23158
  }, children)));
23287
23159
  };
23288
23160
 
23161
+ /* *
23162
+ * Licensed under the Apache License, Version 2.0 (the "License");
23163
+ * you may not use this file except in compliance with the License.
23164
+ * You may obtain a copy of the License at
23165
+ *
23166
+ * http://www.apache.org/licenses/LICENSE-2.0
23167
+ *
23168
+ * Unless required by applicable law or agreed to in writing, software
23169
+ * distributed under the License is distributed on an "AS IS" BASIS,
23170
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23171
+ * See the License for the specific language governing permissions and
23172
+ * limitations under the License.
23173
+ *
23174
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
23175
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
23176
+ * */
23177
+ var SnackbarWrapper = function SnackbarWrapper(_a) {
23178
+ var children = _a.children,
23179
+ isOpen = _a.isOpen,
23180
+ onCloseSnackbar = _a.onCloseSnackbar,
23181
+ id = _a.id,
23182
+ props = __rest(_a, ["children", "isOpen", "onCloseSnackbar", "id"]);
23183
+
23184
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, children, /*#__PURE__*/React__namespace.createElement(material.Snackbar, __assign({
23185
+ "data-testid": "snackbarComponent",
23186
+ open: isOpen,
23187
+ onClose: onCloseSnackbar,
23188
+ autoHideDuration: null,
23189
+ key: id,
23190
+ ClickAwayListenerProps: {
23191
+ mouseEvent: false
23192
+ },
23193
+ action: /*#__PURE__*/React__namespace.createElement(material.IconButton, {
23194
+ "aria-label": "close",
23195
+ "data-testid": "snackbarCloseButton",
23196
+ onClick: onCloseSnackbar,
23197
+ sx: {
23198
+ color: 'geowebColors.snackbar.action',
23199
+ '&:hover': {
23200
+ backgroundColor: 'geowebColors.snackbar.actionHover.rgba'
23201
+ }
23202
+ }
23203
+ }, /*#__PURE__*/React__namespace.createElement(theme.Close, null))
23204
+ }, props)));
23205
+ };
23206
+
23207
+ /* *
23208
+ * Licensed under the Apache License, Version 2.0 (the "License");
23209
+ * you may not use this file except in compliance with the License.
23210
+ * You may obtain a copy of the License at
23211
+ *
23212
+ * http://www.apache.org/licenses/LICENSE-2.0
23213
+ *
23214
+ * Unless required by applicable law or agreed to in writing, software
23215
+ * distributed under the License is distributed on an "AS IS" BASIS,
23216
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23217
+ * See the License for the specific language governing permissions and
23218
+ * limitations under the License.
23219
+ *
23220
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
23221
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
23222
+ * */
23223
+ var SnackbarWrapperConnect = function SnackbarWrapperConnect(_a) {
23224
+ var props = __rest(_a, []);
23225
+
23226
+ var dispatch = reactRedux.useDispatch();
23227
+
23228
+ var onCloseSnackbar = function onCloseSnackbar() {
23229
+ dispatch(snackbarActions.closeSnackbar());
23230
+ };
23231
+
23232
+ var currentSnackbarMessage = reactRedux.useSelector(function (store) {
23233
+ return getFirstSnackbarMessage(store);
23234
+ });
23235
+ return /*#__PURE__*/React__namespace.createElement(reduxDynamicModules.DynamicModuleLoader, {
23236
+ modules: [snackbarModuleConfig]
23237
+ }, /*#__PURE__*/React__namespace.createElement(SnackbarWrapper, __assign({
23238
+ isOpen: !!currentSnackbarMessage,
23239
+ onCloseSnackbar: onCloseSnackbar,
23240
+ message: currentSnackbarMessage ? currentSnackbarMessage.message : '',
23241
+ id: currentSnackbarMessage ? currentSnackbarMessage.id : ''
23242
+ }, props)));
23243
+ };
23244
+
23289
23245
  /* *
23290
23246
  * Licensed under the Apache License, Version 2.0 (the "License");
23291
23247
  * you may not use this file except in compliance with the License.
@@ -23303,7 +23259,9 @@
23303
23259
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
23304
23260
  * */
23305
23261
  var MapWarningProperties = function MapWarningProperties(_a) {
23306
- var selectedFeatureProperties = _a.selectedFeatureProperties;
23262
+ var selectedFeatureProperties = _a.selectedFeatureProperties,
23263
+ languageIndex = _a.languageIndex;
23264
+ var language = languageIndex || 0;
23307
23265
  return /*#__PURE__*/React__default["default"].createElement("div", {
23308
23266
  "data-testid": "map-warning-properties",
23309
23267
  style: {
@@ -23322,13 +23280,13 @@
23322
23280
  "data-testid": "map-warning-properties-title"
23323
23281
  }, selectedFeatureProperties.areaDesc), selectedFeatureProperties.areaDesc && /*#__PURE__*/React__default["default"].createElement("pre", {
23324
23282
  "data-testid": "map-warning-properties-row"
23325
- }, "event: ", selectedFeatureProperties.languages[2].event), selectedFeatureProperties.onset && /*#__PURE__*/React__default["default"].createElement("pre", {
23283
+ }, "event: ", selectedFeatureProperties.languages[language].event), selectedFeatureProperties.onset && /*#__PURE__*/React__default["default"].createElement("pre", {
23326
23284
  "data-testid": "map-warning-properties-row"
23327
23285
  }, "Sent:", ' ', moment__default["default"].utc(selectedFeatureProperties.onset).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.expires && /*#__PURE__*/React__default["default"].createElement("pre", {
23328
23286
  "data-testid": "map-warning-properties-row"
23329
- }, "Expires:", ' ', moment__default["default"].utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[2].senderName && /*#__PURE__*/React__default["default"].createElement("pre", {
23287
+ }, "Expires:", ' ', moment__default["default"].utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[language].senderName && /*#__PURE__*/React__default["default"].createElement("pre", {
23330
23288
  "data-testid": "map-warning-properties-row"
23331
- }, "Sender: ", selectedFeatureProperties.languages[2].senderName), selectedFeatureProperties.identifier && /*#__PURE__*/React__default["default"].createElement("pre", {
23289
+ }, "Sender: ", selectedFeatureProperties.languages[language].senderName), selectedFeatureProperties.identifier && /*#__PURE__*/React__default["default"].createElement("pre", {
23332
23290
  "data-testid": "map-warning-properties-row"
23333
23291
  }, "Identifier: ", selectedFeatureProperties.identifier));
23334
23292
  };
@@ -23370,6 +23328,7 @@
23370
23328
  exports.MultiMapViewConnect = MultiMapViewConnect;
23371
23329
  exports.ReactMapView = ReactMapView;
23372
23330
  exports.ReactMapViewLayer = ReactMapViewLayer;
23331
+ exports.SnackbarWrapperConnect = SnackbarWrapperConnect;
23373
23332
  exports.SyncGroupViewerConnect = SyncGroupViewerConnect;
23374
23333
  exports.SyncGroups = index;
23375
23334
  exports.TimeSliderConnect = TimeSliderConnect;
@@ -23409,6 +23368,7 @@
23409
23368
  exports.publicServices = publicServices;
23410
23369
  exports.registerWMJSMap = registerWMJSMap;
23411
23370
  exports.registerWMLayer = registerWMLayer;
23371
+ exports.snackbarActions = snackbarActions;
23412
23372
  exports.store = store;
23413
23373
  exports.syncGroupActions = genericActions;
23414
23374
  exports.synchronizationGroupModuleConfig = synchronizationGroupConfig;
@@ -23418,7 +23378,6 @@
23418
23378
  exports.uiModuleConfig = uiModuleConfig;
23419
23379
  exports.uiSelectors = selectors$1;
23420
23380
  exports.uiTypes = types;
23421
- exports.useStyles = useStyles$2;
23422
23381
 
23423
23382
  Object.defineProperty(exports, '__esModule', { value: true });
23424
23383