@opengeoweb/shared 2.1.2 → 2.2.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.
@@ -1,14 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
- import { Box, Typography, makeStyles, Dialog, DialogTitle, IconButton, DialogContent, DialogActions, Button, SvgIcon, Grid, useTheme, Link, Avatar, Paper, ClickAwayListener, MenuList, MenuItem, RadioGroup, FormControlLabel, Radio, List, ListItem, Tabs, Tab, Backdrop, withStyles, Slider, createStyles } from '@material-ui/core';
4
- import { Close, DragIndicator } from '@material-ui/icons';
3
+ import { Box, Typography, Dialog, DialogTitle, IconButton, DialogContent, DialogActions, Button, Alert, AlertTitle, SvgIcon, Grid, useTheme, Link, Avatar, Paper, ClickAwayListener, MenuList, MenuItem, RadioGroup, FormControlLabel, Radio, List, ListItem, Tabs, Tab, Backdrop, Slider } from '@mui/material';
4
+ import makeStyles from '@mui/styles/makeStyles';
5
+ import { Close, DragIndicator } from '@mui/icons-material';
5
6
  import { useFormContext } from 'react-hook-form';
6
7
  import { isEmpty, errorMessages } from '@opengeoweb/form-fields';
7
- import { Alert, AlertTitle } from '@material-ui/lab';
8
8
  import Draggable from 'react-draggable';
9
9
  import { Resizable } from 're-resizable';
10
10
  import { useThemeContext } from '@opengeoweb/theme';
11
11
  import { throttle } from 'lodash';
12
+ import withStyles from '@mui/styles/withStyles';
13
+ import createStyles from '@mui/styles/createStyles';
12
14
 
13
15
  /* *
14
16
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -46,16 +48,13 @@ var tagStyle = function tagStyle(color) {
46
48
  var bgcolor = bgColors[color];
47
49
  var borderColor = borderColors[color];
48
50
  return {
49
- bgcolor: bgcolor,
50
- borderColor: borderColor,
51
+ backgroundColor: bgcolor,
51
52
  m: 0,
52
53
  p: 0.5,
53
- border: 2,
54
- borderRadius: 4,
55
- style: {
56
- width: '85px',
57
- height: '20px'
58
- },
54
+ border: "2px solid ".concat(borderColor),
55
+ borderRadius: '4px',
56
+ width: '85px',
57
+ height: '20px',
59
58
  color: '#051039',
60
59
  maxHeight: '1em',
61
60
  boxSizing: 'content-box'
@@ -65,13 +64,13 @@ var tagStyle = function tagStyle(color) {
65
64
  var StatusTag = function StatusTag(_ref) {
66
65
  var content = _ref.content,
67
66
  color = _ref.color;
68
- return /*#__PURE__*/React.createElement(Box, Object.assign({
67
+ return /*#__PURE__*/React.createElement(Box, {
69
68
  display: "flex",
70
69
  alignItems: "center",
71
- justifyContent: "center"
72
- }, tagStyle(color), {
70
+ justifyContent: "center",
71
+ sx: Object.assign({}, tagStyle(color)),
73
72
  "data-testid": "statusTag"
74
- }), /*#__PURE__*/React.createElement(Typography, {
73
+ }, /*#__PURE__*/React.createElement(Typography, {
75
74
  variant: "caption"
76
75
  }, content));
77
76
  };
@@ -103,7 +102,7 @@ function __rest(s, e) {
103
102
  return t;
104
103
  }
105
104
 
106
- var useStyles$e = makeStyles(function () {
105
+ var useStyles$d = makeStyles(function () {
107
106
  return {
108
107
  dialogHeader: {
109
108
  zIndex: 1,
@@ -113,10 +112,7 @@ var useStyles$e = makeStyles(function () {
113
112
  alignItems: 'center'
114
113
  },
115
114
  dialogContent: {
116
- padding: '40px 20px 0px 20px'
117
- },
118
- dialogOptions: {
119
- padding: '4px 20px 16px 20px'
115
+ padding: '40px 20px 0px 20px !important'
120
116
  }
121
117
  };
122
118
  });
@@ -135,7 +131,7 @@ var ConfirmationDialog = function ConfirmationDialog(_a) {
135
131
  content = _a$content === void 0 ? null : _a$content,
136
132
  other = __rest(_a, ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content"]);
137
133
 
138
- var classes = useStyles$e();
134
+ var classes = useStyles$d();
139
135
 
140
136
  other.catchOnCancel;
141
137
  var rest = __rest(other, ["catchOnCancel"]); // remove unwanted props
@@ -146,14 +142,14 @@ var ConfirmationDialog = function ConfirmationDialog(_a) {
146
142
  open: open,
147
143
  maxWidth: "sm",
148
144
  fullWidth: true,
149
- disableBackdropClick: true,
145
+ // fix for briefly showing default options when closing dialog
150
146
  transitionDuration: 0
151
147
  }, rest), /*#__PURE__*/React.createElement(DialogTitle, {
152
- disableTypography: true,
153
148
  className: classes.dialogHeader
154
149
  }, /*#__PURE__*/React.createElement(Typography, {
155
150
  variant: "h5",
156
- "data-testid": "confirmationDialog-title"
151
+ "data-testid": "confirmationDialog-title",
152
+ component: "span"
157
153
  }, title), /*#__PURE__*/React.createElement(IconButton, {
158
154
  "data-testid": "confirmationDialog-close",
159
155
  "aria-label": "close",
@@ -654,7 +650,7 @@ var ConfirmationServiceProvider = function ConfirmationServiceProvider(_ref) {
654
650
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
655
651
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
656
652
  * */
657
- var useStyles$d = makeStyles(function () {
653
+ var useStyles$c = makeStyles(function () {
658
654
  return {
659
655
  title: {
660
656
  fontSize: '14px',
@@ -724,7 +720,7 @@ var AlertBanner = function AlertBanner(_ref) {
724
720
  info = _ref$info === void 0 ? '' : _ref$info,
725
721
  _ref$dataTestId = _ref.dataTestId,
726
722
  dataTestId = _ref$dataTestId === void 0 ? 'alert-banner' : _ref$dataTestId;
727
- var classes = useStyles$d();
723
+ var classes = useStyles$c();
728
724
  return /*#__PURE__*/React.createElement(Alert, {
729
725
  "data-testid": dataTestId,
730
726
  severity: severity,
@@ -752,7 +748,7 @@ var AlertBanner = function AlertBanner(_ref) {
752
748
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
753
749
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
754
750
  * */
755
- var useStyles$c = makeStyles(function () {
751
+ var useStyles$b = makeStyles(function () {
756
752
  return {
757
753
  wrapper: {
758
754
  height: '100vh',
@@ -769,7 +765,7 @@ var useStyles$c = makeStyles(function () {
769
765
  var AppLayout = function AppLayout(_ref) {
770
766
  var header = _ref.header,
771
767
  children = _ref.children;
772
- var classes = useStyles$c();
768
+ var classes = useStyles$b();
773
769
  return /*#__PURE__*/React__default.createElement("div", {
774
770
  className: classes.wrapper
775
771
  }, header, /*#__PURE__*/React__default.createElement("main", {
@@ -779,7 +775,7 @@ var AppLayout = function AppLayout(_ref) {
779
775
 
780
776
  var img = "data:image/svg+xml,%3c!--Licensed under the Apache License%2c Version 2.0 (the 'License')%3byou may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing%2c softwaredistributed under the License is distributed on an 'AS IS' BASIS%2cWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND%2c either express or implied.See the License for the specific language governing permissions andlimitations under the License.Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)Copyright 2021 - Finnish Meteorological Institute (FMI)--%3e%3csvg id='svg4550' xmlnsRdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23' xmlns='http://www.w3.org/2000/svg' height='55.156mm' viewBox='0 0 289.84072 195.43326' width='81.799mm' version='1.1' xmlnsCc='http://creativecommons.org/ns%23' xmlnsXlink='http://www.w3.org/1999/xlink' xmlnsDc='http://purl.org/dc/elements/1.1/'%3e %3cdefs id='defs14'%3e %3clinearGradient id='linearGradient4263' y2='113.1' gradientUnits='userSpaceOnUse' y1='76.066' gradientTransform='translate(0 -.0012816)' x2='199.26' x1='160.9'%3e %3cstop id='stop4259' stop-color='white' stop-opacity='.33333' offset='0'/%3e %3cstop id='stop4261' stop-color='white' stop-opacity='0' offset='1'/%3e %3c/linearGradient%3e %3clinearGradient id='linearGradient4240' y2='79.833' gradientUnits='userSpaceOnUse' x2='120.82' y1='120.77' x1='128.56'%3e %3cstop id='stop4236' stop-color='white' stop-opacity='0' offset='0'/%3e %3cstop id='stop4238' stop-color='white' stop-opacity='.33333' offset='1'/%3e %3c/linearGradient%3e %3c/defs%3e %3cg id='layer1' transform='translate(353.49 -626.07)'%3e %3cg id='g4'%3e %3cpath id='path4220' d='m-207 679.86c-7.6546-3.9726-16.149-6.0541-24.773-6.0703-24.585 0.0315-46.045 16.665-52.207 40.465-2.23-0.35755-4.4838-0.54689-6.7422-0.56642-24.881-0.00043-45.051 20.17-45.051 45.051-0.00043 24.881 20.17 45.051 45.051 45.051 36.152-0.20272 72.845-0.0898 109.18-0.0898 8.9834 0 22.962 0.009 36.879 0.0165 9.7409 0.38215 35.645-0.43398 53.537-23.548 17.892-23.115 7.1203-72.79-0.31513-94.017s-30.566-42.361-53.247-42.361c-26.664 0-50.367 14.562-62.311 36.07z' style='color-rendering:auto%3bcolor:black%3bisolation:auto%3bmix-blend-mode:normal%3bshape-rendering:auto%3bsolid-color:black%3bimage-rendering:auto' fill='%230b9ee5'/%3e %3cpath id='path4220-7' opacity='.98' d='m-335.78 758.74c-0.00043 24.881 20.17 45.051 45.051 45.051 36.152-0.20272 72.845-0.0898 109.18-0.0898 10.101 0 27.126 0.009 42.523 0.0156 11.975-0.4199 32.775-4.017 47.893-23.547 4.439-5.7347 7.1108-13.107 8.5098-21.271-35.448-0.0105-239.67-0.15823-253.16-0.15823z' fill='%2360bce9'/%3e %3c/g%3e %3cpath id='path4220-2' d='m-144.69 643.79c-19.529 0-37.464 7.8167-50.359 20.447-4.6476 4.6419-8.6513 9.9041-11.953 15.623 0 40.944 0.0195 77.914 0.0195 123.83 8.4824 0.007 16.983 0.0137 25.438 0.0137 10.101 0 27.126 0.009 42.523 0.0156 11.975-0.4199 32.775-4.017 47.893-23.547 17.892-23.115 7.1209-72.791-0.31446-94.018s-30.565-42.361-53.246-42.361z' style='color-rendering:auto%3bcolor:black%3bisolation:auto%3bmix-blend-mode:normal%3bshape-rendering:auto%3bsolid-color:black%3bimage-rendering:auto' fill='white' fill-opacity='.31373'/%3e %3c/g%3e %3cg id='g4244' transform='translate(2.926 -1.3827)'%3e %3cpath id='path4329' style='color-rendering:auto%3bcolor:black%3bisolation:auto%3bmix-blend-mode:normal%3bshape-rendering:auto%3bsolid-color:black%3bimage-rendering:auto' fill='%23003232' d='m211.54 98.88c11.484 8.7901 14.857 8.43 22.486 19.238 3.6519 5.1733 5.5602 11.69 5.5645 18.164-0.00018 17.949-14.551 32.499-32.5 32.498-17.948-0.00018-32.498-14.55-32.498-32.498 0.006-0.50098 0.0236-1.0018 0.0527-1.502-3.4629-1.1175-6.9173-1.9297-9.6543-1.9297-2.7565 0-6.2409 0.82134-9.7285 1.9512 0.036 0.49286 0.0607 0.98649 0.0742 1.4805-0.00018 17.948-14.55 32.498-32.498 32.498-17.948-0.00019-32.498-14.55-32.498-32.498 0.006-3.5239 0.71774-6.9687 1.8781-10.26 5.474-20.521 8.7944-44.229 27.665-46.855 8.2552-1.1488 15.952 8.848 25.107 8.848 9.1558-0.00028 9.318-14.58 23.088-14.836 16.828-0.3123 31.185 16.304 43.462 25.701zm-4.7539 13.92c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-84.125 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z'/%3e %3cpath id='path4329-2' style='color-rendering:auto%3bcolor:black%3bisolation:auto%3bmix-blend-mode:normal%3bshape-rendering:auto%3bsolid-color:black%3bimage-rendering:auto' fill='url(%23linearGradient4263)' d='m157.24 77.869c-2.1199 2.1753-3.6401 4.4832-5.4018 6.5241-0.53185 0.61614-1.2448 1.3191-1.8477 1.7949-1.2058 0.9517-2.5477 1.6107-4.168 1.7793-0.27005 0.0281-0.54787 0.04296-0.83398 0.04297 5.0928 13.298 11.821 26.014 20 44.834 2.737 0 6.1914 0.8122 9.6543 1.9297-0.0291 0.5002-0.0467 1.001-0.0527 1.502 0 8.4131 3.196 16.08 8.4414 21.852 0.34969 0.38474 0.70861 0.75939 1.0762 1.127 5.881 5.8809 14.007 9.5194 22.98 9.5195 0.5609 0.00004 1.118-0.0149 1.6719-0.043 3.3236-0.16829 6.5154-0.83435 9.502-1.9277 0.99554-0.36446 1.9688-0.77802 2.916-1.2344 1.4208-0.68453 2.7833-1.4677 4.0801-2.3438 8.645-5.84 14.33-15.731 14.33-26.949-0.004-6.474-2.0849-12.873-5.5645-18.164-7.0668-10.745-14.684-12.763-22.486-19.238-11.815-9.8048-26.968-25.716-42.627-25.716-6.2104 0-9.3385 2.3185-11.67 4.7112zm49.543 34.924c4.9706 0 9.5876 1.5119 13.418 4.0996 0.6384 0.43129 1.255 0.89176 1.8476 1.3809 0.59266 0.4891 1.1622 1.0059 1.7051 1.5488 4.3431 4.3431 7.0293 10.343 7.0293 16.971 0 12.841-10.085 23.326-22.766 23.969-0.40906 0.0207-0.82015 0.0312-1.2344 0.0312-4.97 0-9.5878-1.5105-13.418-4.0976-0.00044-0.0003-0.002 0.00029-0.002 0-6.384-4.3129-10.58-11.618-10.58-19.902 0-6.6275 2.6862-12.628 7.0293-16.971 0.54288-0.54289 1.1124-1.0597 1.7051-1.5488 0.59266-0.4891 1.2073-0.94957 1.8457-1.3809 3.8304-2.5878 8.4493-4.0996 13.42-4.0996z'/%3e %3cpath id='path4329-7' style='color-rendering:auto%3bcolor:black%3bisolation:auto%3bmix-blend-mode:normal%3bshape-rendering:auto%3bsolid-color:black%3bimage-rendering:auto' d='m121.43 79.077c-0.51208-0.01011-1.027 0.01805-1.543 0.08985-18.871 2.626-22.19 26.335-27.664 46.856-1.1604 3.2913-1.8729 6.7359-1.8789 10.26 0 17.948 14.55 32.498 32.498 32.498s32.498-14.55 32.498-32.498c-0.0135-0.49402-0.0382-0.98762-0.0742-1.4805 3.5012-1.0071 5.7853-1.8693 9.6893-1.9248-4.8944-11.377-14.29-31.914-19.961-44.863-8.5828 0.000001-15.883-8.7859-23.565-8.9376zm1.2344 33.723c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z' fill='url(%23linearGradient4240)'/%3e %3c/g%3e%3c/svg%3e";
781
777
 
782
- var useStyles$b = makeStyles(function (theme) {
778
+ var useStyles$a = makeStyles(function (theme) {
783
779
  var _header;
784
780
 
785
781
  return {
@@ -816,7 +812,7 @@ var AppHeader = function AppHeader(_ref) {
816
812
  userMenu = _ref.userMenu,
817
813
  _ref$title = _ref.title,
818
814
  title = _ref$title === void 0 ? 'GeoWeb' : _ref$title;
819
- var classes = useStyles$b();
815
+ var classes = useStyles$a();
820
816
  return /*#__PURE__*/React__default.createElement("header", {
821
817
  className: classes.header
822
818
  }, /*#__PURE__*/React__default.createElement(Grid, {
@@ -829,14 +825,14 @@ var AppHeader = function AppHeader(_ref) {
829
825
  sm: 3
830
826
  }, /*#__PURE__*/React__default.createElement(Grid, {
831
827
  container: true,
832
- justify: "flex-start"
828
+ justifyContent: "flex-start"
833
829
  }, menu)), /*#__PURE__*/React__default.createElement(Grid, {
834
830
  item: true,
835
831
  xs: 10,
836
832
  sm: 6
837
833
  }, /*#__PURE__*/React__default.createElement(Grid, {
838
834
  container: true,
839
- justify: "center",
835
+ justifyContent: "center",
840
836
  alignItems: "center",
841
837
  wrap: "nowrap"
842
838
  }, /*#__PURE__*/React__default.createElement("img", {
@@ -851,7 +847,7 @@ var AppHeader = function AppHeader(_ref) {
851
847
  xs: 1,
852
848
  sm: 3,
853
849
  container: true,
854
- justify: "flex-end"
850
+ justifyContent: "flex-end"
855
851
  }, userMenu)));
856
852
  };
857
853
 
@@ -900,7 +896,7 @@ var DraggableComponent$1 = function DraggableComponent(_a) {
900
896
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
901
897
  * */
902
898
 
903
- var useStyles$a = function useStyles(isRightAligned) {
899
+ var useStyles$9 = function useStyles(isRightAligned) {
904
900
  return makeStyles(function () {
905
901
  return {
906
902
  icon: Object.assign(Object.assign({
@@ -914,7 +910,7 @@ var useStyles$a = function useStyles(isRightAligned) {
914
910
  left: 10,
915
911
  transform: 'rotate(90deg)'
916
912
  }), {
917
- zIndex: 100
913
+ zIndex: 1
918
914
  })
919
915
  };
920
916
  });
@@ -923,7 +919,7 @@ var useStyles$a = function useStyles(isRightAligned) {
923
919
  var ResizeHandle = function ResizeHandle(_ref2) {
924
920
  var isRightAligned = _ref2.isRightAligned;
925
921
  var theme = useTheme();
926
- var styles = useStyles$a(isRightAligned)();
922
+ var styles = useStyles$9(isRightAligned)();
927
923
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
928
924
  className: styles.icon,
929
925
  "data-testid": "resizeHandle"
@@ -1107,7 +1103,7 @@ ErrorBoundary.defaultProps = {
1107
1103
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1108
1104
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1109
1105
  * */
1110
- var useStyles$9 = makeStyles(function (theme) {
1106
+ var useStyles$8 = makeStyles(function (theme) {
1111
1107
  return {
1112
1108
  container: {
1113
1109
  position: 'absolute',
@@ -1155,11 +1151,12 @@ var UserMenu = function UserMenu(_ref) {
1155
1151
  } : _ref$onClose,
1156
1152
  children = _ref.children,
1157
1153
  initials = _ref.initials;
1158
- var classes = useStyles$9();
1154
+ var classes = useStyles$8();
1159
1155
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
1160
1156
  "data-testid": "userButton",
1161
1157
  onClick: onToggle,
1162
- className: classes.button
1158
+ className: classes.button,
1159
+ size: "large"
1163
1160
  }, /*#__PURE__*/React__default.createElement(Avatar, {
1164
1161
  className: classes.avatar
1165
1162
  }, initials)), isOpen && /*#__PURE__*/React__default.createElement(Paper, {
@@ -1235,7 +1232,7 @@ var MenuItemTheme = function MenuItemTheme() {
1235
1232
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1236
1233
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1237
1234
  * */
1238
- var useStyles$8 = makeStyles(function (theme) {
1235
+ var useStyles$7 = makeStyles(function (theme) {
1239
1236
  return {
1240
1237
  footer: {
1241
1238
  boxShadow: theme.shadows[1],
@@ -1248,7 +1245,7 @@ var useStyles$8 = makeStyles(function (theme) {
1248
1245
  }); // drag handles will be handled by DraggableResizable/Resizable
1249
1246
 
1250
1247
  var ToolFooter = function ToolFooter() {
1251
- var classes = useStyles$8();
1248
+ var classes = useStyles$7();
1252
1249
  return /*#__PURE__*/React__default.createElement("footer", {
1253
1250
  className: classes.footer
1254
1251
  });
@@ -1315,7 +1312,7 @@ var getStyle = function getStyle(size) {
1315
1312
  }
1316
1313
  };
1317
1314
 
1318
- var useStyles$7 = makeStyles(function (theme) {
1315
+ var useStyles$6 = makeStyles(function (theme) {
1319
1316
  return {
1320
1317
  header: {
1321
1318
  boxShadow: theme.shadows[1],
@@ -1365,7 +1362,7 @@ var ToolHeader = function ToolHeader(_ref) {
1365
1362
  _ref$className = _ref.className,
1366
1363
  className = _ref$className === void 0 ? '' : _ref$className;
1367
1364
  var styles = getStyle(size);
1368
- var classes = useStyles$7({
1365
+ var classes = useStyles$6({
1369
1366
  styles: styles,
1370
1367
  isDraggable: isDraggable
1371
1368
  });
@@ -1384,23 +1381,24 @@ var ToolHeader = function ToolHeader(_ref) {
1384
1381
  xs: 1
1385
1382
  }, /*#__PURE__*/React__default.createElement(Grid, {
1386
1383
  container: true,
1387
- justify: "flex-start"
1384
+ justifyContent: "flex-start"
1388
1385
  }, isDraggable && size !== 'xxs' && /*#__PURE__*/React__default.createElement(IconButton, {
1389
1386
  "data-testid": "dragBtn",
1390
1387
  className: classes.iconDrag,
1391
- disableRipple: true
1388
+ disableRipple: true,
1389
+ size: "large"
1392
1390
  }, /*#__PURE__*/React__default.createElement(DragIndicator, null)))), /*#__PURE__*/React__default.createElement(Grid, {
1393
1391
  item: true,
1394
1392
  xs: 10
1395
1393
  }, /*#__PURE__*/React__default.createElement(Grid, {
1396
1394
  container: true,
1397
- justify: "center",
1395
+ justifyContent: "center",
1398
1396
  alignItems: "center"
1399
1397
  }, title && /*#__PURE__*/React__default.createElement(Typography, {
1400
1398
  variant: "h2",
1401
1399
  className: classes.title
1402
1400
  }, title), size === 'xxs' && /*#__PURE__*/React__default.createElement(IconButton, {
1403
- "data-testid": "dragBtn",
1401
+ "data-testid": "dragBtn-xxs",
1404
1402
  className: classes.iconDragHorizontal,
1405
1403
  disableRipple: true,
1406
1404
  size: "small"
@@ -1408,11 +1406,12 @@ var ToolHeader = function ToolHeader(_ref) {
1408
1406
  item: true,
1409
1407
  xs: 1,
1410
1408
  container: true,
1411
- justify: "flex-end"
1409
+ justifyContent: "flex-end"
1412
1410
  }, onClose && /*#__PURE__*/React__default.createElement(IconButton, {
1413
1411
  "data-testid": "closeBtn",
1414
1412
  className: classes.iconClose,
1415
- onClick: onClickClose
1413
+ onClick: onClickClose,
1414
+ size: "large"
1416
1415
  }, /*#__PURE__*/React__default.createElement(Close, null)))));
1417
1416
  };
1418
1417
 
@@ -1432,7 +1431,7 @@ var ToolHeader = function ToolHeader(_ref) {
1432
1431
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1433
1432
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1434
1433
  * */
1435
- var useStyles$6 = makeStyles(function () {
1434
+ var useStyles$5 = makeStyles(function () {
1436
1435
  return {
1437
1436
  container: {
1438
1437
  overflow: 'hidden',
@@ -1470,7 +1469,7 @@ var ToolContainer = function ToolContainer(_a) {
1470
1469
  headerClassName = _a$headerClassName === void 0 ? '' : _a$headerClassName,
1471
1470
  props = __rest(_a, ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName"]);
1472
1471
 
1473
- var classes = useStyles$6();
1472
+ var classes = useStyles$5();
1474
1473
  return /*#__PURE__*/React__default.createElement(Paper, Object.assign({
1475
1474
  elevation: elevation,
1476
1475
  className: classes.container
@@ -1659,7 +1658,7 @@ var DraggableComponent = function DraggableComponent(_a) {
1659
1658
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1660
1659
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1661
1660
  * */
1662
- var useStyles$5 = makeStyles(function (theme) {
1661
+ var useStyles$4 = makeStyles(function (theme) {
1663
1662
  return {
1664
1663
  icon: {
1665
1664
  backgroundColor: theme.palette.geowebColors.textInputField["default"].rgba,
@@ -1699,7 +1698,7 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
1699
1698
  var _ref$type = _ref.type,
1700
1699
  type = _ref$type === void 0 ? 'text' : _ref$type,
1701
1700
  children = _ref.children;
1702
- var classes = useStyles$5();
1701
+ var classes = useStyles$4();
1703
1702
 
1704
1703
  if (type === 'divider') {
1705
1704
  return /*#__PURE__*/React__default.createElement(Typography, {
@@ -1749,7 +1748,7 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
1749
1748
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1750
1749
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1751
1750
  * */
1752
- var useStyles$4 = makeStyles(function (theme) {
1751
+ var useStyles$3 = makeStyles(function (theme) {
1753
1752
  return {
1754
1753
  icon: {
1755
1754
  fill: theme.palette.geowebColors.typographyAndIcons.text
@@ -1757,7 +1756,7 @@ var useStyles$4 = makeStyles(function (theme) {
1757
1756
  };
1758
1757
  });
1759
1758
  var OptionIcon = function OptionIcon() {
1760
- var classes = useStyles$4();
1759
+ var classes = useStyles$3();
1761
1760
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1762
1761
  viewBox: "0 0 12 11",
1763
1762
  style: {
@@ -1780,7 +1779,7 @@ var OptionIcon = function OptionIcon() {
1780
1779
  }))));
1781
1780
  };
1782
1781
  var CommandIcon = function CommandIcon() {
1783
- var classes = useStyles$4();
1782
+ var classes = useStyles$3();
1784
1783
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1785
1784
  viewBox: "0 0 12 12",
1786
1785
  style: {
@@ -1803,7 +1802,7 @@ var CommandIcon = function CommandIcon() {
1803
1802
  }))));
1804
1803
  };
1805
1804
  var ArrowLeftIcon = function ArrowLeftIcon() {
1806
- var classes = useStyles$4();
1805
+ var classes = useStyles$3();
1807
1806
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1808
1807
  viewBox: "0 0 12 6",
1809
1808
  style: {
@@ -1827,7 +1826,7 @@ var ArrowLeftIcon = function ArrowLeftIcon() {
1827
1826
  }))));
1828
1827
  };
1829
1828
  var ArrowRightIcon = function ArrowRightIcon() {
1830
- var classes = useStyles$4();
1829
+ var classes = useStyles$3();
1831
1830
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1832
1831
  viewBox: "0 0 12 6",
1833
1832
  style: {
@@ -1851,7 +1850,7 @@ var ArrowRightIcon = function ArrowRightIcon() {
1851
1850
  }))));
1852
1851
  };
1853
1852
  var ArrowDownIcon = function ArrowDownIcon() {
1854
- var classes = useStyles$4();
1853
+ var classes = useStyles$3();
1855
1854
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1856
1855
  viewBox: "0 0 6 12",
1857
1856
  style: {
@@ -1874,7 +1873,7 @@ var ArrowDownIcon = function ArrowDownIcon() {
1874
1873
  }))));
1875
1874
  };
1876
1875
  var ArrowUpIcon = function ArrowUpIcon() {
1877
- var classes = useStyles$4();
1876
+ var classes = useStyles$3();
1878
1877
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1879
1878
  viewBox: "0 0 6 11",
1880
1879
  style: {
@@ -2041,7 +2040,7 @@ var getShortcutList = function getShortcutList(shortcutList) {
2041
2040
  });
2042
2041
  });
2043
2042
  };
2044
- var useStyles$3 = makeStyles(function () {
2043
+ var useStyles$2 = makeStyles(function () {
2045
2044
  return {
2046
2045
  row: {
2047
2046
  minHeight: 56
@@ -2061,7 +2060,7 @@ var useStyles$3 = makeStyles(function () {
2061
2060
  var ShortcutList = function ShortcutList(_ref2) {
2062
2061
  var _ref2$platform = _ref2.platform,
2063
2062
  platform = _ref2$platform === void 0 ? 'windows' : _ref2$platform;
2064
- var classes = useStyles$3();
2063
+ var classes = useStyles$2();
2065
2064
  var rows = getShortcutList(shortcuts, platform);
2066
2065
  return /*#__PURE__*/React__default.createElement(List, {
2067
2066
  "data-testid": "list-".concat(platform)
@@ -2073,7 +2072,7 @@ var ShortcutList = function ShortcutList(_ref2) {
2073
2072
  }, /*#__PURE__*/React__default.createElement(Grid, {
2074
2073
  container: true,
2075
2074
  direction: "row",
2076
- justify: "space-between",
2075
+ justifyContent: "space-between",
2077
2076
  alignItems: "center"
2078
2077
  }, /*#__PURE__*/React__default.createElement(Grid, {
2079
2078
  item: true,
@@ -2098,20 +2097,16 @@ var TabPanel = function TabPanel(_ref) {
2098
2097
  }, value === index && children);
2099
2098
  };
2100
2099
 
2101
- var useStyles$2 = makeStyles(function () {
2102
- return {
2103
- container: {
2104
- margin: '0px 20px'
2105
- },
2106
- tab: {
2107
- fontSize: 12
2108
- }
2109
- };
2110
- });
2100
+ var styles = {
2101
+ container: {
2102
+ margin: '0px 20px'
2103
+ },
2104
+ tab: {
2105
+ fontSize: 12
2106
+ }
2107
+ };
2111
2108
 
2112
2109
  var CheatSheet = function CheatSheet() {
2113
- var classes = useStyles$2();
2114
-
2115
2110
  var _React$useState = React__default.useState(0),
2116
2111
  _React$useState2 = _slicedToArray(_React$useState, 2),
2117
2112
  activeTab = _React$useState2[0],
@@ -2121,17 +2116,17 @@ var CheatSheet = function CheatSheet() {
2121
2116
  onChangeActiveTab(newValue);
2122
2117
  };
2123
2118
 
2124
- return /*#__PURE__*/React__default.createElement("div", {
2125
- className: classes.container
2119
+ return /*#__PURE__*/React__default.createElement(Box, {
2120
+ sx: styles.container
2126
2121
  }, /*#__PURE__*/React__default.createElement(Tabs, {
2127
2122
  value: activeTab,
2128
2123
  onChange: onChangeTab,
2129
2124
  "aria-label": "platform"
2130
2125
  }, /*#__PURE__*/React__default.createElement(Tab, {
2131
- className: classes.tab,
2126
+ sx: styles.tab,
2132
2127
  label: "Windows"
2133
2128
  }), /*#__PURE__*/React__default.createElement(Tab, {
2134
- className: classes.tab,
2129
+ sx: styles.tab,
2135
2130
  label: "Mac"
2136
2131
  })), /*#__PURE__*/React__default.createElement(TabPanel, {
2137
2132
  value: activeTab,
@@ -2259,32 +2254,22 @@ var sliderStyles = makeStyles(function (theme) {
2259
2254
  var CustomSliderComponent = withStyles(function (theme) {
2260
2255
  return {
2261
2256
  root: {
2262
- marginLeft: '16px',
2263
2257
  // highlight selected label
2264
2258
  '& span.selectedLabel': {
2265
2259
  fontWeight: 'bold'
2266
2260
  }
2267
2261
  },
2268
2262
  thumb: {
2269
- width: 20,
2270
- height: 20,
2271
- marginLeft: '-7px !important',
2272
- marginBottom: '-10px !important',
2273
2263
  backgroundColor: theme.palette.geowebColors.customSlider.thumb,
2274
2264
  '$disabled &': {
2275
- width: 20,
2276
- height: 20,
2277
2265
  backgroundColor: theme.palette.geowebColors.customSlider.thumbDisabled
2278
2266
  },
2279
2267
  boxShadow: '0px 3px 5px 1px rgba(0,0,0,0.3)',
2280
- '&:focus, &:hover, &:active': {
2268
+ '&.Mui-focusVisible, &:hover, &:active': {
2281
2269
  boxShadow: '0px 3px 5px 2px rgba(0,0,0,0.4)'
2282
2270
  }
2283
2271
  },
2284
2272
  mark: {
2285
- height: '2px',
2286
- width: '2px',
2287
- marginLeft: '2px',
2288
2273
  backgroundColor: theme.palette.geowebColors.customSlider.mark,
2289
2274
  '$disabled &': {
2290
2275
  backgroundColor: theme.palette.geowebColors.customSlider.markDisabled
@@ -2296,18 +2281,15 @@ var CustomSliderComponent = withStyles(function (theme) {
2296
2281
  color: theme.palette.geowebColors.typographyAndIcons.text
2297
2282
  },
2298
2283
  track: {
2299
- borderRadius: '0 0 4.5px 4.5px',
2300
- width: '6px !important',
2284
+ color: theme.palette.geowebColors.customSlider.track,
2301
2285
  backgroundColor: theme.palette.geowebColors.customSlider.track,
2302
2286
  '$disabled &': {
2303
- backgroundColor: theme.palette.geowebColors.customSlider.trackDisabled
2287
+ backgroundColor: theme.palette.geowebColors.customSlider.trackDisabled,
2288
+ color: theme.palette.geowebColors.customSlider.trackDisabled
2304
2289
  }
2305
2290
  },
2306
2291
  rail: {
2307
- width: '4px !important',
2308
- borderRadius: 4.5,
2309
2292
  backgroundColor: theme.palette.geowebColors.customSlider.rail,
2310
- marginLeft: '1px',
2311
2293
  opacity: 1,
2312
2294
  '$disabled &': {
2313
2295
  backgroundColor: theme.palette.geowebColors.customSlider.railDisabled,
@@ -2347,7 +2329,7 @@ var CustomSlider = function CustomSlider(_a) {
2347
2329
 
2348
2330
  React.useEffect(function () {
2349
2331
  if (shouldAutoFocus && element.current) {
2350
- var thumb = element.current.querySelector('.MuiSlider-thumb');
2332
+ var thumb = element.current.querySelector('.MuiSlider-thumb input');
2351
2333
  thumb.focus();
2352
2334
  } // eslint-disable-next-line react-hooks/exhaustive-deps
2353
2335