@opengeoweb/shared 2.1.4 → 2.3.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.
package/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
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';
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, ToggleButton, Tooltip, Menu, ListItemIcon } from '@mui/material';
4
4
  import makeStyles from '@mui/styles/makeStyles';
5
5
  import { Close, DragIndicator } from '@mui/icons-material';
6
6
  import { useFormContext } from 'react-hook-form';
@@ -11,6 +11,7 @@ import { useThemeContext } from '@opengeoweb/theme';
11
11
  import { throttle } from 'lodash';
12
12
  import withStyles from '@mui/styles/withStyles';
13
13
  import createStyles from '@mui/styles/createStyles';
14
+ import MoreVertIcon from '@mui/icons-material/MoreVert';
14
15
 
15
16
  /* *
16
17
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -102,7 +103,7 @@ function __rest(s, e) {
102
103
  return t;
103
104
  }
104
105
 
105
- var useStyles$e = makeStyles(function () {
106
+ var useStyles$b = makeStyles(function () {
106
107
  return {
107
108
  dialogHeader: {
108
109
  zIndex: 1,
@@ -131,7 +132,7 @@ var ConfirmationDialog = function ConfirmationDialog(_a) {
131
132
  content = _a$content === void 0 ? null : _a$content,
132
133
  other = __rest(_a, ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content"]);
133
134
 
134
- var classes = useStyles$e();
135
+ var classes = useStyles$b();
135
136
 
136
137
  other.catchOnCancel;
137
138
  var rest = __rest(other, ["catchOnCancel"]); // remove unwanted props
@@ -650,7 +651,7 @@ var ConfirmationServiceProvider = function ConfirmationServiceProvider(_ref) {
650
651
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
651
652
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
652
653
  * */
653
- var useStyles$d = makeStyles(function () {
654
+ var useStyles$a = makeStyles(function () {
654
655
  return {
655
656
  title: {
656
657
  fontSize: '14px',
@@ -720,7 +721,7 @@ var AlertBanner = function AlertBanner(_ref) {
720
721
  info = _ref$info === void 0 ? '' : _ref$info,
721
722
  _ref$dataTestId = _ref.dataTestId,
722
723
  dataTestId = _ref$dataTestId === void 0 ? 'alert-banner' : _ref$dataTestId;
723
- var classes = useStyles$d();
724
+ var classes = useStyles$a();
724
725
  return /*#__PURE__*/React.createElement(Alert, {
725
726
  "data-testid": dataTestId,
726
727
  severity: severity,
@@ -748,7 +749,7 @@ var AlertBanner = function AlertBanner(_ref) {
748
749
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
749
750
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
750
751
  * */
751
- var useStyles$c = makeStyles(function () {
752
+ var useStyles$9 = makeStyles(function () {
752
753
  return {
753
754
  wrapper: {
754
755
  height: '100vh',
@@ -765,7 +766,7 @@ var useStyles$c = makeStyles(function () {
765
766
  var AppLayout = function AppLayout(_ref) {
766
767
  var header = _ref.header,
767
768
  children = _ref.children;
768
- var classes = useStyles$c();
769
+ var classes = useStyles$9();
769
770
  return /*#__PURE__*/React__default.createElement("div", {
770
771
  className: classes.wrapper
771
772
  }, header, /*#__PURE__*/React__default.createElement("main", {
@@ -775,7 +776,7 @@ var AppLayout = function AppLayout(_ref) {
775
776
 
776
777
  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";
777
778
 
778
- var useStyles$b = makeStyles(function (theme) {
779
+ var useStyles$8 = makeStyles(function (theme) {
779
780
  var _header;
780
781
 
781
782
  return {
@@ -812,7 +813,7 @@ var AppHeader = function AppHeader(_ref) {
812
813
  userMenu = _ref.userMenu,
813
814
  _ref$title = _ref.title,
814
815
  title = _ref$title === void 0 ? 'GeoWeb' : _ref$title;
815
- var classes = useStyles$b();
816
+ var classes = useStyles$8();
816
817
  return /*#__PURE__*/React__default.createElement("header", {
817
818
  className: classes.header
818
819
  }, /*#__PURE__*/React__default.createElement(Grid, {
@@ -896,38 +897,29 @@ var DraggableComponent$1 = function DraggableComponent(_a) {
896
897
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
897
898
  * */
898
899
 
899
- var useStyles$a = function useStyles(isRightAligned) {
900
- return makeStyles(function () {
901
- return {
902
- icon: Object.assign(Object.assign({
903
- width: 20,
904
- height: 20,
905
- top: -10,
906
- position: 'relative'
907
- }, isRightAligned ? {
908
- left: -10
909
- } : {
910
- left: 10,
911
- transform: 'rotate(90deg)'
912
- }), {
913
- zIndex: 1
914
- })
915
- };
916
- });
917
- };
918
-
919
900
  var ResizeHandle = function ResizeHandle(_ref2) {
920
901
  var isRightAligned = _ref2.isRightAligned;
921
902
  var theme = useTheme();
922
- var styles = useStyles$a(isRightAligned)();
923
903
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
924
- className: styles.icon,
904
+ sx: Object.assign(Object.assign({
905
+ width: 20,
906
+ height: 20,
907
+ top: -10,
908
+ position: 'relative'
909
+ }, isRightAligned ? {
910
+ left: -10
911
+ } : {
912
+ left: 10,
913
+ transform: 'rotate(90deg)'
914
+ }), {
915
+ zIndex: 1
916
+ }),
925
917
  "data-testid": "resizeHandle"
926
918
  }, /*#__PURE__*/React__default.createElement("rect", {
927
919
  fill: "#ffffff"
928
920
  }), /*#__PURE__*/React__default.createElement("path", {
929
921
  d: "M19.687 18.037v1h-6v-1h6zm3.5-3.5v1h-13v-1h13z",
930
- fill: "".concat(theme.palette.geowebColors.greys.accessible),
922
+ fill: "".concat(theme.palette.geowebColors.buttons.flat["default"].color),
931
923
  transform: "rotate(-45 16.687 16.787)"
932
924
  }));
933
925
  };
@@ -1103,7 +1095,7 @@ ErrorBoundary.defaultProps = {
1103
1095
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1104
1096
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1105
1097
  * */
1106
- var useStyles$9 = makeStyles(function (theme) {
1098
+ var useStyles$7 = makeStyles(function (theme) {
1107
1099
  return {
1108
1100
  container: {
1109
1101
  position: 'absolute',
@@ -1151,7 +1143,7 @@ var UserMenu = function UserMenu(_ref) {
1151
1143
  } : _ref$onClose,
1152
1144
  children = _ref.children,
1153
1145
  initials = _ref.initials;
1154
- var classes = useStyles$9();
1146
+ var classes = useStyles$7();
1155
1147
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
1156
1148
  "data-testid": "userButton",
1157
1149
  onClick: onToggle,
@@ -1193,7 +1185,9 @@ var MenuItemTheme = function MenuItemTheme() {
1193
1185
  isDark = _useThemeContext.isDark,
1194
1186
  toggleTheme = _useThemeContext.toggleTheme;
1195
1187
 
1196
- return /*#__PURE__*/React__default.createElement(MenuItem, null, /*#__PURE__*/React__default.createElement(Grid, {
1188
+ return /*#__PURE__*/React__default.createElement(MenuItem, {
1189
+ divider: true
1190
+ }, /*#__PURE__*/React__default.createElement(Grid, {
1197
1191
  container: true
1198
1192
  }, /*#__PURE__*/React__default.createElement(Grid, {
1199
1193
  item: true
@@ -1232,7 +1226,7 @@ var MenuItemTheme = function MenuItemTheme() {
1232
1226
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1233
1227
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1234
1228
  * */
1235
- var useStyles$8 = makeStyles(function (theme) {
1229
+ var useStyles$6 = makeStyles(function (theme) {
1236
1230
  return {
1237
1231
  footer: {
1238
1232
  boxShadow: theme.shadows[1],
@@ -1245,7 +1239,7 @@ var useStyles$8 = makeStyles(function (theme) {
1245
1239
  }); // drag handles will be handled by DraggableResizable/Resizable
1246
1240
 
1247
1241
  var ToolFooter = function ToolFooter() {
1248
- var classes = useStyles$8();
1242
+ var classes = useStyles$6();
1249
1243
  return /*#__PURE__*/React__default.createElement("footer", {
1250
1244
  className: classes.footer
1251
1245
  });
@@ -1283,7 +1277,7 @@ var getStyle = function getStyle(size) {
1283
1277
  return {
1284
1278
  fontSize: 16,
1285
1279
  fontWeight: 500,
1286
- padding: 4
1280
+ padding: '4px'
1287
1281
  };
1288
1282
  }
1289
1283
 
@@ -1292,7 +1286,7 @@ var getStyle = function getStyle(size) {
1292
1286
  return {
1293
1287
  fontSize: 20,
1294
1288
  fontWeight: 400,
1295
- padding: 8
1289
+ padding: '8px'
1296
1290
  };
1297
1291
  }
1298
1292
 
@@ -1301,7 +1295,7 @@ var getStyle = function getStyle(size) {
1301
1295
  return {
1302
1296
  fontSize: 16,
1303
1297
  fontWeight: 500,
1304
- padding: 12
1298
+ padding: '12px'
1305
1299
  };
1306
1300
  }
1307
1301
 
@@ -1312,45 +1306,13 @@ var getStyle = function getStyle(size) {
1312
1306
  }
1313
1307
  };
1314
1308
 
1315
- var useStyles$7 = makeStyles(function (theme) {
1316
- return {
1317
- header: {
1318
- boxShadow: theme.shadows[1],
1319
- background: theme.palette.geowebColors.background.surface,
1320
- padding: function padding(props) {
1321
- return props.styles.padding;
1322
- },
1323
- zIndex: 1,
1324
- cursor: function cursor(props) {
1325
- return props.isDraggable ? 'move' : null;
1326
- }
1327
- },
1328
- title: {
1329
- fontSize: function fontSize(props) {
1330
- return props.styles.fontSize;
1331
- },
1332
- fontWeight: function fontWeight(props) {
1333
- return props.styles.fontWeight;
1334
- }
1335
- },
1336
- iconClose: {
1337
- color: theme.palette.geowebColors.greys.accessible,
1338
- padding: 0
1339
- },
1340
- iconDrag: {
1341
- color: theme.palette.geowebColors.greys.accessible,
1342
- padding: 0,
1343
- pointerEvents: 'none'
1344
- },
1345
- iconDragHorizontal: {
1346
- color: theme.palette.geowebColors.greys.accessible,
1347
- padding: 0,
1348
- pointerEvents: 'none',
1349
- transform: 'rotate(90deg)',
1350
- height: 12
1351
- }
1352
- };
1353
- });
1309
+ var iconStyle = {
1310
+ color: 'geowebColors.greys.accessible',
1311
+ padding: 0,
1312
+ '&:hover': {
1313
+ background: 'action.hover'
1314
+ }
1315
+ };
1354
1316
 
1355
1317
  var ToolHeader = function ToolHeader(_ref) {
1356
1318
  var size = _ref.size,
@@ -1362,17 +1324,21 @@ var ToolHeader = function ToolHeader(_ref) {
1362
1324
  _ref$className = _ref.className,
1363
1325
  className = _ref$className === void 0 ? '' : _ref$className;
1364
1326
  var styles = getStyle(size);
1365
- var classes = useStyles$7({
1366
- styles: styles,
1367
- isDraggable: isDraggable
1368
- });
1369
1327
 
1370
1328
  var onClickClose = function onClickClose() {
1371
1329
  return onClose();
1372
1330
  };
1373
1331
 
1374
- return /*#__PURE__*/React__default.createElement("header", {
1375
- className: "".concat(classes.header, " ").concat(className)
1332
+ return /*#__PURE__*/React__default.createElement(Box, {
1333
+ component: "header",
1334
+ className: className,
1335
+ sx: {
1336
+ boxShadow: 1,
1337
+ backgroundColor: 'geowebColors.background.surface',
1338
+ padding: styles.padding,
1339
+ zIndex: 1,
1340
+ cursor: isDraggable ? 'move' : null
1341
+ }
1376
1342
  }, /*#__PURE__*/React__default.createElement(Grid, {
1377
1343
  container: true,
1378
1344
  alignItems: "center"
@@ -1384,9 +1350,11 @@ var ToolHeader = function ToolHeader(_ref) {
1384
1350
  justifyContent: "flex-start"
1385
1351
  }, isDraggable && size !== 'xxs' && /*#__PURE__*/React__default.createElement(IconButton, {
1386
1352
  "data-testid": "dragBtn",
1387
- className: classes.iconDrag,
1388
1353
  disableRipple: true,
1389
- size: "large"
1354
+ size: "large",
1355
+ sx: Object.assign(Object.assign({}, iconStyle), {
1356
+ pointerEvents: 'none'
1357
+ })
1390
1358
  }, /*#__PURE__*/React__default.createElement(DragIndicator, null)))), /*#__PURE__*/React__default.createElement(Grid, {
1391
1359
  item: true,
1392
1360
  xs: 10
@@ -1396,12 +1364,19 @@ var ToolHeader = function ToolHeader(_ref) {
1396
1364
  alignItems: "center"
1397
1365
  }, title && /*#__PURE__*/React__default.createElement(Typography, {
1398
1366
  variant: "h2",
1399
- className: classes.title
1367
+ sx: {
1368
+ fontSize: styles.fontSize,
1369
+ fontWeight: styles.fontWeight
1370
+ }
1400
1371
  }, title), size === 'xxs' && /*#__PURE__*/React__default.createElement(IconButton, {
1401
1372
  "data-testid": "dragBtn-xxs",
1402
- className: classes.iconDragHorizontal,
1403
1373
  disableRipple: true,
1404
- size: "small"
1374
+ size: "small",
1375
+ sx: Object.assign(Object.assign({}, iconStyle), {
1376
+ pointerEvents: 'none',
1377
+ transform: 'rotate(90deg)',
1378
+ height: 12
1379
+ })
1405
1380
  }, /*#__PURE__*/React__default.createElement(DragIndicator, null)))), /*#__PURE__*/React__default.createElement(Grid, {
1406
1381
  item: true,
1407
1382
  xs: 1,
@@ -1409,9 +1384,9 @@ var ToolHeader = function ToolHeader(_ref) {
1409
1384
  justifyContent: "flex-end"
1410
1385
  }, onClose && /*#__PURE__*/React__default.createElement(IconButton, {
1411
1386
  "data-testid": "closeBtn",
1412
- className: classes.iconClose,
1413
1387
  onClick: onClickClose,
1414
- size: "large"
1388
+ size: "large",
1389
+ sx: iconStyle
1415
1390
  }, /*#__PURE__*/React__default.createElement(Close, null)))));
1416
1391
  };
1417
1392
 
@@ -1431,7 +1406,7 @@ var ToolHeader = function ToolHeader(_ref) {
1431
1406
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1432
1407
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1433
1408
  * */
1434
- var useStyles$6 = makeStyles(function () {
1409
+ var useStyles$5 = makeStyles(function () {
1435
1410
  return {
1436
1411
  container: {
1437
1412
  overflow: 'hidden',
@@ -1469,7 +1444,7 @@ var ToolContainer = function ToolContainer(_a) {
1469
1444
  headerClassName = _a$headerClassName === void 0 ? '' : _a$headerClassName,
1470
1445
  props = __rest(_a, ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName"]);
1471
1446
 
1472
- var classes = useStyles$6();
1447
+ var classes = useStyles$5();
1473
1448
  return /*#__PURE__*/React__default.createElement(Paper, Object.assign({
1474
1449
  elevation: elevation,
1475
1450
  className: classes.container
@@ -1658,7 +1633,7 @@ var DraggableComponent = function DraggableComponent(_a) {
1658
1633
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1659
1634
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1660
1635
  * */
1661
- var useStyles$5 = makeStyles(function (theme) {
1636
+ var useStyles$4 = makeStyles(function (theme) {
1662
1637
  return {
1663
1638
  icon: {
1664
1639
  backgroundColor: theme.palette.geowebColors.textInputField["default"].rgba,
@@ -1698,7 +1673,7 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
1698
1673
  var _ref$type = _ref.type,
1699
1674
  type = _ref$type === void 0 ? 'text' : _ref$type,
1700
1675
  children = _ref.children;
1701
- var classes = useStyles$5();
1676
+ var classes = useStyles$4();
1702
1677
 
1703
1678
  if (type === 'divider') {
1704
1679
  return /*#__PURE__*/React__default.createElement(Typography, {
@@ -1748,7 +1723,7 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
1748
1723
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1749
1724
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1750
1725
  * */
1751
- var useStyles$4 = makeStyles(function (theme) {
1726
+ var useStyles$3 = makeStyles(function (theme) {
1752
1727
  return {
1753
1728
  icon: {
1754
1729
  fill: theme.palette.geowebColors.typographyAndIcons.text
@@ -1756,7 +1731,7 @@ var useStyles$4 = makeStyles(function (theme) {
1756
1731
  };
1757
1732
  });
1758
1733
  var OptionIcon = function OptionIcon() {
1759
- var classes = useStyles$4();
1734
+ var classes = useStyles$3();
1760
1735
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1761
1736
  viewBox: "0 0 12 11",
1762
1737
  style: {
@@ -1779,7 +1754,7 @@ var OptionIcon = function OptionIcon() {
1779
1754
  }))));
1780
1755
  };
1781
1756
  var CommandIcon = function CommandIcon() {
1782
- var classes = useStyles$4();
1757
+ var classes = useStyles$3();
1783
1758
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1784
1759
  viewBox: "0 0 12 12",
1785
1760
  style: {
@@ -1802,7 +1777,7 @@ var CommandIcon = function CommandIcon() {
1802
1777
  }))));
1803
1778
  };
1804
1779
  var ArrowLeftIcon = function ArrowLeftIcon() {
1805
- var classes = useStyles$4();
1780
+ var classes = useStyles$3();
1806
1781
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1807
1782
  viewBox: "0 0 12 6",
1808
1783
  style: {
@@ -1826,7 +1801,7 @@ var ArrowLeftIcon = function ArrowLeftIcon() {
1826
1801
  }))));
1827
1802
  };
1828
1803
  var ArrowRightIcon = function ArrowRightIcon() {
1829
- var classes = useStyles$4();
1804
+ var classes = useStyles$3();
1830
1805
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1831
1806
  viewBox: "0 0 12 6",
1832
1807
  style: {
@@ -1850,7 +1825,7 @@ var ArrowRightIcon = function ArrowRightIcon() {
1850
1825
  }))));
1851
1826
  };
1852
1827
  var ArrowDownIcon = function ArrowDownIcon() {
1853
- var classes = useStyles$4();
1828
+ var classes = useStyles$3();
1854
1829
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1855
1830
  viewBox: "0 0 6 12",
1856
1831
  style: {
@@ -1873,7 +1848,7 @@ var ArrowDownIcon = function ArrowDownIcon() {
1873
1848
  }))));
1874
1849
  };
1875
1850
  var ArrowUpIcon = function ArrowUpIcon() {
1876
- var classes = useStyles$4();
1851
+ var classes = useStyles$3();
1877
1852
  return /*#__PURE__*/React__default.createElement(SvgIcon, {
1878
1853
  viewBox: "0 0 6 11",
1879
1854
  style: {
@@ -2023,6 +1998,14 @@ var shortcuts = [{
2023
1998
  }, "+"), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
2024
1999
  type: "icon"
2025
2000
  }, /*#__PURE__*/React__default.createElement(ArrowLeftIcon, null)))
2001
+ }, {
2002
+ title: 'Change layer manager values by scrolling',
2003
+ description: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ShortCutSegment, {
2004
+ type: "icon"
2005
+ }, "Ctrl"), /*#__PURE__*/React__default.createElement(ShortCutSegment, null, " + Mouse scroll")),
2006
+ descriptionMac: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ShortCutSegment, {
2007
+ type: "icon"
2008
+ }, /*#__PURE__*/React__default.createElement(CommandIcon, null)), /*#__PURE__*/React__default.createElement(ShortCutSegment, null, " + Mouse scroll"))
2026
2009
  }];
2027
2010
  var getShortcutList = function getShortcutList(shortcutList) {
2028
2011
  var platform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'windows';
@@ -2040,7 +2023,7 @@ var getShortcutList = function getShortcutList(shortcutList) {
2040
2023
  });
2041
2024
  });
2042
2025
  };
2043
- var useStyles$3 = makeStyles(function () {
2026
+ var useStyles$2 = makeStyles(function () {
2044
2027
  return {
2045
2028
  row: {
2046
2029
  minHeight: 56
@@ -2060,7 +2043,7 @@ var useStyles$3 = makeStyles(function () {
2060
2043
  var ShortcutList = function ShortcutList(_ref2) {
2061
2044
  var _ref2$platform = _ref2.platform,
2062
2045
  platform = _ref2$platform === void 0 ? 'windows' : _ref2$platform;
2063
- var classes = useStyles$3();
2046
+ var classes = useStyles$2();
2064
2047
  var rows = getShortcutList(shortcuts, platform);
2065
2048
  return /*#__PURE__*/React__default.createElement(List, {
2066
2049
  "data-testid": "list-".concat(platform)
@@ -2097,20 +2080,16 @@ var TabPanel = function TabPanel(_ref) {
2097
2080
  }, value === index && children);
2098
2081
  };
2099
2082
 
2100
- var useStyles$2 = makeStyles(function () {
2101
- return {
2102
- container: {
2103
- margin: '0px 20px'
2104
- },
2105
- tab: {
2106
- fontSize: 12
2107
- }
2108
- };
2109
- });
2083
+ var styles = {
2084
+ container: {
2085
+ margin: '0px 20px'
2086
+ },
2087
+ tab: {
2088
+ fontSize: 12
2089
+ }
2090
+ };
2110
2091
 
2111
2092
  var CheatSheet = function CheatSheet() {
2112
- var classes = useStyles$2();
2113
-
2114
2093
  var _React$useState = React__default.useState(0),
2115
2094
  _React$useState2 = _slicedToArray(_React$useState, 2),
2116
2095
  activeTab = _React$useState2[0],
@@ -2120,17 +2099,17 @@ var CheatSheet = function CheatSheet() {
2120
2099
  onChangeActiveTab(newValue);
2121
2100
  };
2122
2101
 
2123
- return /*#__PURE__*/React__default.createElement("div", {
2124
- className: classes.container
2102
+ return /*#__PURE__*/React__default.createElement(Box, {
2103
+ sx: styles.container
2125
2104
  }, /*#__PURE__*/React__default.createElement(Tabs, {
2126
2105
  value: activeTab,
2127
2106
  onChange: onChangeTab,
2128
2107
  "aria-label": "platform"
2129
2108
  }, /*#__PURE__*/React__default.createElement(Tab, {
2130
- className: classes.tab,
2109
+ sx: styles.tab,
2131
2110
  label: "Windows"
2132
2111
  }), /*#__PURE__*/React__default.createElement(Tab, {
2133
- className: classes.tab,
2112
+ sx: styles.tab,
2134
2113
  label: "Mac"
2135
2114
  })), /*#__PURE__*/React__default.createElement(TabPanel, {
2136
2115
  value: activeTab,
@@ -2169,7 +2148,8 @@ var UserMenuItemCheatSheet = function UserMenuItemCheatSheet() {
2169
2148
 
2170
2149
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MenuItem, {
2171
2150
  "data-testid": "cheatsheet-btn",
2172
- onClick: onOpen
2151
+ onClick: onOpen,
2152
+ divider: true
2173
2153
  }, /*#__PURE__*/React__default.createElement(Grid, {
2174
2154
  container: true
2175
2155
  }, /*#__PURE__*/React__default.createElement(Grid, {
@@ -2391,7 +2371,7 @@ var useStyles = makeStyles(function (theme) {
2391
2371
  alignItems: 'center',
2392
2372
  boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
2393
2373
  width: '100%',
2394
- backgroundColor: '#ffffff',
2374
+ backgroundColor: theme.palette.geowebColors.background.surface,
2395
2375
  zIndex: props.zIndex + 10
2396
2376
  };
2397
2377
  },
@@ -2440,6 +2420,177 @@ var DraggableDialog = function DraggableDialog(_ref) {
2440
2420
  }, children)));
2441
2421
  };
2442
2422
 
2423
+ /* *
2424
+ * Licensed under the Apache License, Version 2.0 (the "License");
2425
+ * you may not use this file except in compliance with the License.
2426
+ * You may obtain a copy of the License at
2427
+ *
2428
+ * http://www.apache.org/licenses/LICENSE-2.0
2429
+ *
2430
+ * Unless required by applicable law or agreed to in writing, software
2431
+ * distributed under the License is distributed on an "AS IS" BASIS,
2432
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2433
+ * See the License for the specific language governing permissions and
2434
+ * limitations under the License.
2435
+ *
2436
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2437
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
2438
+ * */
2439
+
2440
+ var CustomToggleButton = function CustomToggleButton(_a) {
2441
+ var _a$variant = _a.variant,
2442
+ variant = _a$variant === void 0 ? 'primary' : _a$variant,
2443
+ _a$value = _a.value,
2444
+ value = _a$value === void 0 ? 0 : _a$value,
2445
+ props = __rest(_a, ["variant", "value"]);
2446
+
2447
+ return /*#__PURE__*/React.createElement(ToggleButton, Object.assign({
2448
+ className: variant,
2449
+ value: value
2450
+ }, props));
2451
+ };
2452
+
2453
+ /* *
2454
+ * Licensed under the Apache License, Version 2.0 (the "License");
2455
+ * you may not use this file except in compliance with the License.
2456
+ * You may obtain a copy of the License at
2457
+ *
2458
+ * http://www.apache.org/licenses/LICENSE-2.0
2459
+ *
2460
+ * Unless required by applicable law or agreed to in writing, software
2461
+ * distributed under the License is distributed on an "AS IS" BASIS,
2462
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2463
+ * See the License for the specific language governing permissions and
2464
+ * limitations under the License.
2465
+ *
2466
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2467
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
2468
+ * */
2469
+ var ToolButton = function ToolButton(_a) {
2470
+ var active = _a.active,
2471
+ _a$width = _a.width,
2472
+ width = _a$width === void 0 ? '24px' : _a$width,
2473
+ _a$height = _a.height,
2474
+ height = _a$height === void 0 ? '24px' : _a$height,
2475
+ children = _a.children,
2476
+ _a$value = _a.value,
2477
+ value = _a$value === void 0 ? 0 : _a$value,
2478
+ _a$sx = _a.sx,
2479
+ sx = _a$sx === void 0 ? {} : _a$sx,
2480
+ props = __rest(_a, ["active", "width", "height", "children", "value", "sx"]);
2481
+
2482
+ return /*#__PURE__*/React.createElement(CustomToggleButton, Object.assign({
2483
+ variant: "tool",
2484
+ disableRipple: true,
2485
+ selected: active,
2486
+ value: value,
2487
+ sx: Object.assign({
2488
+ width: "".concat(width, "!important"),
2489
+ height: "".concat(height, "!important"),
2490
+ textTransform: 'none!important',
2491
+ padding: '11px!important'
2492
+ }, sx)
2493
+ }, props), children);
2494
+ };
2495
+
2496
+ var getPosition = function getPosition(menuPosition) {
2497
+ switch (menuPosition) {
2498
+ case 'bottom':
2499
+ return {
2500
+ anchorOrigin: {
2501
+ vertical: 'bottom',
2502
+ horizontal: 'center'
2503
+ },
2504
+ transformOrigin: {
2505
+ vertical: 'top',
2506
+ horizontal: 'center'
2507
+ }
2508
+ };
2509
+
2510
+ default:
2511
+ case 'left':
2512
+ return {
2513
+ anchorOrigin: {
2514
+ vertical: 'center',
2515
+ horizontal: 'left'
2516
+ },
2517
+ transformOrigin: {
2518
+ vertical: 'center',
2519
+ horizontal: 'right'
2520
+ }
2521
+ };
2522
+ }
2523
+ };
2524
+
2525
+ var ToggleMenu = function ToggleMenu(_ref) {
2526
+ var _ref$buttonTestId = _ref.buttonTestId,
2527
+ buttonTestId = _ref$buttonTestId === void 0 ? 'toggleMenuButton' : _ref$buttonTestId,
2528
+ _ref$menuPosition = _ref.menuPosition,
2529
+ menuPosition = _ref$menuPosition === void 0 ? 'left' : _ref$menuPosition,
2530
+ menuItems = _ref.menuItems,
2531
+ children = _ref.children,
2532
+ buttonSx = _ref.buttonSx,
2533
+ _ref$tooltipTitle = _ref.tooltipTitle,
2534
+ tooltipTitle = _ref$tooltipTitle === void 0 ? '' : _ref$tooltipTitle;
2535
+
2536
+ var _React$useState = React.useState(null),
2537
+ _React$useState2 = _slicedToArray(_React$useState, 2),
2538
+ anchorEl = _React$useState2[0],
2539
+ setAnchorEl = _React$useState2[1];
2540
+
2541
+ var isOpen = Boolean(anchorEl);
2542
+
2543
+ var _getPosition = getPosition(menuPosition),
2544
+ anchorOrigin = _getPosition.anchorOrigin,
2545
+ transformOrigin = _getPosition.transformOrigin;
2546
+
2547
+ var handleClick = function handleClick(event) {
2548
+ setAnchorEl(event.currentTarget);
2549
+ };
2550
+
2551
+ var handleClose = function handleClose() {
2552
+ setAnchorEl(null);
2553
+ };
2554
+
2555
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ToolButton, {
2556
+ active: isOpen,
2557
+ sx: buttonSx,
2558
+ onClick: handleClick,
2559
+ "data-testid": buttonTestId
2560
+ }, /*#__PURE__*/React.createElement(Tooltip, {
2561
+ placement: "top",
2562
+ title: tooltipTitle
2563
+ }, /*#__PURE__*/React.createElement(MoreVertIcon, null))), /*#__PURE__*/React.createElement(Menu, {
2564
+ anchorEl: anchorEl,
2565
+ open: isOpen,
2566
+ onClose: handleClose,
2567
+ anchorOrigin: anchorOrigin,
2568
+ transformOrigin: transformOrigin,
2569
+ BackdropProps: {
2570
+ style: {
2571
+ opacity: 0,
2572
+ transition: 'none'
2573
+ }
2574
+ },
2575
+ MenuListProps: children && {
2576
+ style: {
2577
+ padding: '0px'
2578
+ }
2579
+ }
2580
+ }, menuItems && menuItems.map(function (menuItem) {
2581
+ var text = menuItem.text,
2582
+ icon = menuItem.icon,
2583
+ action = menuItem.action;
2584
+ return /*#__PURE__*/React.createElement(MenuItem, {
2585
+ key: text,
2586
+ onClick: function onClick() {
2587
+ action();
2588
+ handleClose();
2589
+ }
2590
+ }, icon && /*#__PURE__*/React.createElement(ListItemIcon, null, icon), /*#__PURE__*/React.createElement(Typography, null, text));
2591
+ }), children));
2592
+ };
2593
+
2443
2594
  /* *
2444
2595
  * Licensed under the Apache License, Version 2.0 (the "License");
2445
2596
  * you may not use this file except in compliance with the License.
@@ -2474,4 +2625,4 @@ var getAxiosErrorMessage = function getAxiosErrorMessage(error) {
2474
2625
  return 'An error has occurred';
2475
2626
  };
2476
2627
 
2477
- export { AlertBanner, AppHeader, AppLayout, ConfirmationDialog, ConfirmationServiceProvider, CustomSlider, DraggableComponent$1 as Draggable, DraggableDialog, ErrorBoundary, HIDDEN_INPUT_HELPER_IS_DRAFT, ResizeComponent as Resizable, StatusTag, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, Z_INDEX_BOTTOM, Z_INDEX_TOP, getAxiosErrorMessage, getInitials, isAxiosError, showPrompt, sliderStyles, useConfirmationDialog, useDialogActions, useDraftFormHelpers, useIsMounted, usePoller, usePreventBrowserClose, usePrevious, useUserMenu };
2628
+ export { AlertBanner, AppHeader, AppLayout, ConfirmationDialog, ConfirmationServiceProvider, CustomSlider, CustomToggleButton, DraggableComponent$1 as Draggable, DraggableDialog, ErrorBoundary, HIDDEN_INPUT_HELPER_IS_DRAFT, ResizeComponent as Resizable, StatusTag, ToggleMenu, ToolButton, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, Z_INDEX_BOTTOM, Z_INDEX_TOP, getAxiosErrorMessage, getInitials, isAxiosError, showPrompt, sliderStyles, useConfirmationDialog, useDialogActions, useDraftFormHelpers, useIsMounted, usePoller, usePreventBrowserClose, usePrevious, useUserMenu };