@opengeoweb/shared 2.2.0 → 2.4.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 (37) hide show
  1. package/index.esm.js +474 -172
  2. package/index.umd.js +498 -176
  3. package/lib/components/AlertBanner/AlertBanner.d.ts +1 -0
  4. package/lib/components/AlertBanner/AlertBanner.stories.d.ts +9 -1
  5. package/lib/components/CustomToggleButton/CustomToggleButton.d.ts +8 -0
  6. package/lib/components/{DraggableDialog/DraggableDialog.spec.d.ts → CustomToggleButton/CustomToggleButton.spec.d.ts} +0 -0
  7. package/lib/components/CustomToggleButton/CustomToggleButton.stories.d.ts +13 -0
  8. package/lib/components/CustomToggleButton/index.d.ts +1 -0
  9. package/lib/components/Manager/EnableButton/EnableButton.d.ts +8 -0
  10. package/lib/components/Manager/EnableButton/EnableButton.spec.d.ts +1 -0
  11. package/lib/components/Manager/EnableButton/EnableButton.stories.d.ts +13 -0
  12. package/lib/components/Manager/EnableButton/index.d.ts +1 -0
  13. package/lib/components/Manager/ManagerButton/ManagerButton.d.ts +13 -0
  14. package/lib/components/Manager/ManagerButton/ManagerButton.spec.d.ts +1 -0
  15. package/lib/components/Manager/ManagerButton/ManagerButton.stories.d.ts +13 -0
  16. package/lib/components/Manager/ManagerButton/index.d.ts +1 -0
  17. package/lib/components/Manager/ManagerDeleteButton/ManagerDeleteButton.d.ts +8 -0
  18. package/lib/components/Manager/ManagerDeleteButton/ManagerDeleteButton.spec.d.ts +1 -0
  19. package/lib/components/Manager/ManagerDeleteButton/ManagerDeleteButton.stories.d.ts +13 -0
  20. package/lib/components/Manager/ManagerDeleteButton/index.d.ts +1 -0
  21. package/lib/components/Manager/index.d.ts +4 -0
  22. package/lib/components/Manager/styles.d.ts +5 -0
  23. package/lib/components/ToggleMenu/ToggleMenu.d.ts +17 -0
  24. package/lib/components/ToggleMenu/ToggleMenu.spec.d.ts +1 -0
  25. package/lib/components/ToggleMenu/ToggleMenu.stories.d.ts +7 -0
  26. package/lib/components/ToggleMenu/index.d.ts +1 -0
  27. package/lib/components/ToolButton/ToolButton.d.ts +11 -0
  28. package/lib/components/ToolButton/ToolButton.spec.d.ts +1 -0
  29. package/lib/components/ToolButton/ToolButton.stories.d.ts +13 -0
  30. package/lib/components/ToolButton/index.d.ts +1 -0
  31. package/lib/components/ToolContainer/ToolContainerDraggable.d.ts +6 -0
  32. package/lib/components/ToolContainer/index.d.ts +1 -0
  33. package/lib/components/index.d.ts +4 -1
  34. package/package.json +3 -3
  35. package/lib/components/DraggableDialog/DraggableDialog.d.ts +0 -16
  36. package/lib/components/DraggableDialog/DraggableDialog.stories.d.ts +0 -6
  37. package/lib/components/DraggableDialog/index.d.ts +0 -1
package/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('@mui/styles/makeStyles'), require('@mui/icons-material'), require('react-hook-form'), require('@opengeoweb/form-fields'), require('react-draggable'), require('re-resizable'), require('@opengeoweb/theme'), require('lodash'), require('@mui/styles/withStyles'), require('@mui/styles/createStyles')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', '@mui/styles/makeStyles', '@mui/icons-material', 'react-hook-form', '@opengeoweb/form-fields', 'react-draggable', 're-resizable', '@opengeoweb/theme', 'lodash', '@mui/styles/withStyles', '@mui/styles/createStyles'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Shared = {}, global.React, global.material, global.makeStyles, global.iconsMaterial, global.reactHookForm, global.formFields, global.Draggable, global.reResizable, global.theme, global.lodash, global.withStyles, global.createStyles));
5
- })(this, (function (exports, React, material, makeStyles, iconsMaterial, reactHookForm, formFields, Draggable, reResizable, theme, lodash, withStyles, createStyles) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('@mui/styles/makeStyles'), require('@mui/icons-material'), require('react-hook-form'), require('@opengeoweb/form-fields'), require('react-draggable'), require('re-resizable'), require('@opengeoweb/theme'), require('lodash'), require('@mui/styles/withStyles'), require('@mui/icons-material/MoreVert'), require('@mui/styles/createStyles')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', '@mui/styles/makeStyles', '@mui/icons-material', 'react-hook-form', '@opengeoweb/form-fields', 'react-draggable', 're-resizable', '@opengeoweb/theme', 'lodash', '@mui/styles/withStyles', '@mui/icons-material/MoreVert', '@mui/styles/createStyles'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Shared = {}, global.React, global.material, global.makeStyles, global.iconsMaterial, global.reactHookForm, global.formFields, global.Draggable, global.reResizable, global.theme, global.lodash, global.withStyles, global.MoreVertIcon, global.createStyles));
5
+ })(this, (function (exports, React, material, makeStyles, iconsMaterial, reactHookForm, formFields, Draggable, reResizable, theme, lodash, withStyles, MoreVertIcon, createStyles) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -29,6 +29,7 @@
29
29
  var makeStyles__default = /*#__PURE__*/_interopDefaultLegacy(makeStyles);
30
30
  var Draggable__default = /*#__PURE__*/_interopDefaultLegacy(Draggable);
31
31
  var withStyles__default = /*#__PURE__*/_interopDefaultLegacy(withStyles);
32
+ var MoreVertIcon__default = /*#__PURE__*/_interopDefaultLegacy(MoreVertIcon);
32
33
  var createStyles__default = /*#__PURE__*/_interopDefaultLegacy(createStyles);
33
34
 
34
35
  /*! *****************************************************************************
@@ -159,7 +160,7 @@
159
160
  }, content));
160
161
  };
161
162
 
162
- var useStyles$d = makeStyles__default["default"](function () {
163
+ var useStyles$b = makeStyles__default["default"](function () {
163
164
  return {
164
165
  dialogHeader: {
165
166
  zIndex: 1,
@@ -188,7 +189,7 @@
188
189
  content = _e === void 0 ? null : _e,
189
190
  other = __rest(_a, ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content"]);
190
191
 
191
- var classes = useStyles$d();
192
+ var classes = useStyles$b();
192
193
 
193
194
  other.catchOnCancel;
194
195
  var rest = __rest(other, ["catchOnCancel"]); // remove unwanted props
@@ -501,12 +502,13 @@
501
502
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
502
503
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
503
504
  * */
504
- var useStyles$c = makeStyles__default["default"](function () {
505
+ var useStyles$a = makeStyles__default["default"](function () {
505
506
  return {
506
507
  title: {
507
508
  fontSize: '14px',
508
509
  fontWeight: 'normal',
509
- marginTop: '0px!important'
510
+ marginTop: '0px!important',
511
+ paddingTop: '0px!important'
510
512
  },
511
513
  info: {
512
514
  fontSize: '16px'
@@ -523,8 +525,7 @@
523
525
  fill: "transparent"
524
526
  }), /*#__PURE__*/React__namespace.createElement("path", {
525
527
  d: "M12 4c4.418 0 8 3.581 8 8 0 4.418-3.582 8-8 8s-8-3.582-8-8c0-4.419 3.582-8 8-8zm1.052 6H10v1.613h.949v3.774H10V17h4v-1.613h-.948V10zM11.99 6c-.837 0-1.491.654-1.491 1.49 0 .837.654 1.51 1.49 1.51.837 0 1.51-.673 1.51-1.51 0-.836-.673-1.49-1.51-1.49z",
526
- transform: "translate(-946.000000, -368.000000) translate(930.000000, 356.000000) translate(16.000000, 12.000000)",
527
- fill: "#0062E6"
528
+ transform: "translate(-946.000000, -368.000000) translate(930.000000, 356.000000) translate(16.000000, 12.000000)"
528
529
  }));
529
530
 
530
531
  case 'success':
@@ -534,8 +535,7 @@
534
535
  fill: "transparent"
535
536
  }), /*#__PURE__*/React__namespace.createElement("path", {
536
537
  d: "M16.51 10.034l-5.633 5.633-3.387-3.386c-.369-.37-.369-.973 0-1.343.36-.357.983-.357 1.342 0l2.045 2.046 4.292-4.291c.357-.357.983-.359 1.342 0 .368.369.368.97 0 1.341M12 4C7.582 4 4 7.582 4 12s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8",
537
- transform: "translate(-96.000000, -368.000000) translate(80.000000, 356.000000) translate(16.000000, 12.000000)",
538
- fill: "#72BB23"
538
+ transform: "translate(-96.000000, -368.000000) translate(80.000000, 356.000000) translate(16.000000, 12.000000)"
539
539
  }));
540
540
 
541
541
  case 'warning':
@@ -545,8 +545,7 @@
545
545
  fill: "transparent"
546
546
  }), /*#__PURE__*/React__namespace.createElement("path", {
547
547
  d: "M12.862 16.72c-.22.226-.507.339-.86.339-.364 0-.662-.113-.894-.34-.232-.226-.347-.52-.347-.885 0-.32.118-.59.356-.81.236-.22.531-.331.884-.331.332 0 .613.11.845.33.232.222.347.491.347.811 0 .365-.11.66-.33.886zm.216-9.805l-.134 6.669H11.06l-.15-6.67h2.169zM12 4.5c-4.141 0-7.5 3.359-7.5 7.501s3.359 7.5 7.5 7.5c4.142 0 7.5-3.358 7.5-7.5C19.5 7.86 16.142 4.5 12 4.5z",
548
- transform: "translate(-521.000000, -368.000000) translate(505.000000, 356.000000) translate(16.000000, 12.000000)",
549
- fill: "#FFA800"
548
+ transform: "translate(-521.000000, -368.000000) translate(505.000000, 356.000000) translate(16.000000, 12.000000)"
550
549
  }));
551
550
 
552
551
  case 'error':
@@ -557,8 +556,7 @@
557
556
  fill: "transparent"
558
557
  }), /*#__PURE__*/React__namespace.createElement("path", {
559
558
  d: "M12.862 16.72c-.22.226-.507.339-.86.339-.364 0-.662-.113-.894-.34-.232-.226-.347-.52-.347-.885 0-.32.118-.59.356-.81.236-.22.531-.331.884-.331.332 0 .613.11.845.33.232.222.347.491.347.811 0 .365-.11.66-.33.886zm.216-9.805l-.134 6.669H11.06l-.15-6.67h2.169zM12 4.5c-4.141 0-7.5 3.359-7.5 7.501s3.359 7.5 7.5 7.5c4.142 0 7.5-3.358 7.5-7.5C19.5 7.86 16.142 4.5 12 4.5z",
560
- transform: "translate(-1371.000000, -368.000000) translate(1355.000000, 356.000000) translate(16.000000, 12.000000)",
561
- fill: "#C00000"
559
+ transform: "translate(-1371.000000, -368.000000) translate(1355.000000, 356.000000) translate(16.000000, 12.000000)"
562
560
  }));
563
561
  }
564
562
  };
@@ -570,12 +568,31 @@
570
568
  _c = _a.info,
571
569
  info = _c === void 0 ? '' : _c,
572
570
  _d = _a.dataTestId,
573
- dataTestId = _d === void 0 ? 'alert-banner' : _d;
574
- var classes = useStyles$c();
571
+ dataTestId = _d === void 0 ? 'alert-banner' : _d,
572
+ _e = _a.isCompact,
573
+ isCompact = _e === void 0 ? false : _e;
574
+ var classes = useStyles$a();
575
575
  return /*#__PURE__*/React__namespace.createElement(material.Alert, {
576
576
  "data-testid": dataTestId,
577
577
  severity: severity,
578
- icon: getIcon(severity)
578
+ icon: getIcon(severity),
579
+ sx: isCompact ? {
580
+ height: '32px',
581
+ boxSizing: 'border-box',
582
+ '& .MuiAlert-message': {
583
+ padding: '0px',
584
+ whiteSpace: 'nowrap',
585
+ overflow: 'hidden',
586
+ textOverflow: 'ellipsis',
587
+ '& .MuiTypography-root': {
588
+ display: 'inline'
589
+ }
590
+ },
591
+ '& .MuiAlert-icon': {
592
+ margin: '-3px 10px 0px 0px',
593
+ padding: '0px'
594
+ }
595
+ } : {}
579
596
  }, /*#__PURE__*/React__namespace.createElement(material.AlertTitle, {
580
597
  className: classes.title
581
598
  }, title), info && /*#__PURE__*/React__namespace.createElement("div", {
@@ -599,7 +616,7 @@
599
616
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
600
617
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
601
618
  * */
602
- var useStyles$b = makeStyles__default["default"](function () {
619
+ var useStyles$9 = makeStyles__default["default"](function () {
603
620
  return {
604
621
  wrapper: {
605
622
  height: '100vh',
@@ -616,7 +633,7 @@
616
633
  var AppLayout = function AppLayout(_a) {
617
634
  var header = _a.header,
618
635
  children = _a.children;
619
- var classes = useStyles$b();
636
+ var classes = useStyles$9();
620
637
  return /*#__PURE__*/React__default["default"].createElement("div", {
621
638
  className: classes.wrapper
622
639
  }, header, /*#__PURE__*/React__default["default"].createElement("main", {
@@ -642,7 +659,7 @@
642
659
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
643
660
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
644
661
  * */
645
- var useStyles$a = makeStyles__default["default"](function (theme) {
662
+ var useStyles$8 = makeStyles__default["default"](function (theme) {
646
663
  var _a;
647
664
 
648
665
  return {
@@ -679,7 +696,7 @@
679
696
  userMenu = _a.userMenu,
680
697
  _b = _a.title,
681
698
  title = _b === void 0 ? 'GeoWeb' : _b;
682
- var classes = useStyles$a();
699
+ var classes = useStyles$8();
683
700
  return /*#__PURE__*/React__default["default"].createElement("header", {
684
701
  className: classes.header
685
702
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
@@ -763,38 +780,29 @@
763
780
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
764
781
  * */
765
782
 
766
- var useStyles$9 = function useStyles(isRightAligned) {
767
- return makeStyles__default["default"](function () {
768
- return {
769
- icon: __assign(__assign({
770
- width: 20,
771
- height: 20,
772
- top: -10,
773
- position: 'relative'
774
- }, isRightAligned ? {
775
- left: -10
776
- } : {
777
- left: 10,
778
- transform: 'rotate(90deg)'
779
- }), {
780
- zIndex: 1
781
- })
782
- };
783
- });
784
- };
785
-
786
783
  var ResizeHandle = function ResizeHandle(_a) {
787
784
  var isRightAligned = _a.isRightAligned;
788
785
  var theme = material.useTheme();
789
- var styles = useStyles$9(isRightAligned)();
790
786
  return /*#__PURE__*/React__default["default"].createElement(material.SvgIcon, {
791
- className: styles.icon,
787
+ sx: __assign(__assign({
788
+ width: 20,
789
+ height: 20,
790
+ top: -10,
791
+ position: 'relative'
792
+ }, isRightAligned ? {
793
+ left: -10
794
+ } : {
795
+ left: 10,
796
+ transform: 'rotate(90deg)'
797
+ }), {
798
+ zIndex: 1
799
+ }),
792
800
  "data-testid": "resizeHandle"
793
801
  }, /*#__PURE__*/React__default["default"].createElement("rect", {
794
802
  fill: "#ffffff"
795
803
  }), /*#__PURE__*/React__default["default"].createElement("path", {
796
804
  d: "M19.687 18.037v1h-6v-1h6zm3.5-3.5v1h-13v-1h13z",
797
- fill: "" + theme.palette.geowebColors.greys.accessible,
805
+ fill: "" + theme.palette.geowebColors.buttons.flat["default"].color,
798
806
  transform: "rotate(-45 16.687 16.787)"
799
807
  }));
800
808
  };
@@ -962,7 +970,7 @@
962
970
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
963
971
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
964
972
  * */
965
- var useStyles$8 = makeStyles__default["default"](function (theme) {
973
+ var useStyles$7 = makeStyles__default["default"](function (theme) {
966
974
  return {
967
975
  container: {
968
976
  position: 'absolute',
@@ -1010,7 +1018,7 @@
1010
1018
  } : _d,
1011
1019
  children = _a.children,
1012
1020
  initials = _a.initials;
1013
- var classes = useStyles$8();
1021
+ var classes = useStyles$7();
1014
1022
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
1015
1023
  "data-testid": "userButton",
1016
1024
  onClick: onToggle,
@@ -1052,7 +1060,9 @@
1052
1060
  isDark = _a.isDark,
1053
1061
  toggleTheme = _a.toggleTheme;
1054
1062
 
1055
- return /*#__PURE__*/React__default["default"].createElement(material.MenuItem, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1063
+ return /*#__PURE__*/React__default["default"].createElement(material.MenuItem, {
1064
+ divider: true
1065
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1056
1066
  container: true
1057
1067
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1058
1068
  item: true
@@ -1091,7 +1101,7 @@
1091
1101
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1092
1102
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1093
1103
  * */
1094
- var useStyles$7 = makeStyles__default["default"](function (theme) {
1104
+ var useStyles$6 = makeStyles__default["default"](function (theme) {
1095
1105
  return {
1096
1106
  footer: {
1097
1107
  boxShadow: theme.shadows[1],
@@ -1104,7 +1114,7 @@
1104
1114
  }); // drag handles will be handled by DraggableResizable/Resizable
1105
1115
 
1106
1116
  var ToolFooter = function ToolFooter() {
1107
- var classes = useStyles$7();
1117
+ var classes = useStyles$6();
1108
1118
  return /*#__PURE__*/React__default["default"].createElement("footer", {
1109
1119
  className: classes.footer
1110
1120
  });
@@ -1142,7 +1152,7 @@
1142
1152
  return {
1143
1153
  fontSize: 16,
1144
1154
  fontWeight: 500,
1145
- padding: 4
1155
+ padding: '4px'
1146
1156
  };
1147
1157
  }
1148
1158
 
@@ -1151,7 +1161,7 @@
1151
1161
  return {
1152
1162
  fontSize: 20,
1153
1163
  fontWeight: 400,
1154
- padding: 8
1164
+ padding: '8px'
1155
1165
  };
1156
1166
  }
1157
1167
 
@@ -1160,7 +1170,7 @@
1160
1170
  return {
1161
1171
  fontSize: 16,
1162
1172
  fontWeight: 500,
1163
- padding: 12
1173
+ padding: '12px'
1164
1174
  };
1165
1175
  }
1166
1176
 
@@ -1171,45 +1181,13 @@
1171
1181
  }
1172
1182
  };
1173
1183
 
1174
- var useStyles$6 = makeStyles__default["default"](function (theme) {
1175
- return {
1176
- header: {
1177
- boxShadow: theme.shadows[1],
1178
- background: theme.palette.geowebColors.background.surface,
1179
- padding: function padding(props) {
1180
- return props.styles.padding;
1181
- },
1182
- zIndex: 1,
1183
- cursor: function cursor(props) {
1184
- return props.isDraggable ? 'move' : null;
1185
- }
1186
- },
1187
- title: {
1188
- fontSize: function fontSize(props) {
1189
- return props.styles.fontSize;
1190
- },
1191
- fontWeight: function fontWeight(props) {
1192
- return props.styles.fontWeight;
1193
- }
1194
- },
1195
- iconClose: {
1196
- color: theme.palette.geowebColors.greys.accessible,
1197
- padding: 0
1198
- },
1199
- iconDrag: {
1200
- color: theme.palette.geowebColors.greys.accessible,
1201
- padding: 0,
1202
- pointerEvents: 'none'
1203
- },
1204
- iconDragHorizontal: {
1205
- color: theme.palette.geowebColors.greys.accessible,
1206
- padding: 0,
1207
- pointerEvents: 'none',
1208
- transform: 'rotate(90deg)',
1209
- height: 12
1210
- }
1211
- };
1212
- });
1184
+ var iconStyle = {
1185
+ color: 'geowebColors.greys.accessible',
1186
+ padding: 0,
1187
+ '&:hover': {
1188
+ background: 'action.hover'
1189
+ }
1190
+ };
1213
1191
 
1214
1192
  var ToolHeader = function ToolHeader(_a) {
1215
1193
  var size = _a.size,
@@ -1221,17 +1199,21 @@
1221
1199
  _d = _a.className,
1222
1200
  className = _d === void 0 ? '' : _d;
1223
1201
  var styles = getStyle(size);
1224
- var classes = useStyles$6({
1225
- styles: styles,
1226
- isDraggable: isDraggable
1227
- });
1228
1202
 
1229
1203
  var onClickClose = function onClickClose() {
1230
1204
  return onClose();
1231
1205
  };
1232
1206
 
1233
- return /*#__PURE__*/React__default["default"].createElement("header", {
1234
- className: classes.header + " " + className
1207
+ return /*#__PURE__*/React__default["default"].createElement(material.Box, {
1208
+ component: "header",
1209
+ className: className,
1210
+ sx: {
1211
+ boxShadow: 1,
1212
+ backgroundColor: 'geowebColors.background.surface',
1213
+ padding: styles.padding,
1214
+ zIndex: 2,
1215
+ cursor: isDraggable ? 'move' : null
1216
+ }
1235
1217
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1236
1218
  container: true,
1237
1219
  alignItems: "center"
@@ -1243,9 +1225,11 @@
1243
1225
  justifyContent: "flex-start"
1244
1226
  }, isDraggable && size !== 'xxs' && /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
1245
1227
  "data-testid": "dragBtn",
1246
- className: classes.iconDrag,
1247
1228
  disableRipple: true,
1248
- size: "large"
1229
+ size: "large",
1230
+ sx: __assign(__assign({}, iconStyle), {
1231
+ pointerEvents: 'none'
1232
+ })
1249
1233
  }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.DragIndicator, null)))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1250
1234
  item: true,
1251
1235
  xs: 10
@@ -1255,12 +1239,19 @@
1255
1239
  alignItems: "center"
1256
1240
  }, title && /*#__PURE__*/React__default["default"].createElement(material.Typography, {
1257
1241
  variant: "h2",
1258
- className: classes.title
1242
+ sx: {
1243
+ fontSize: styles.fontSize,
1244
+ fontWeight: styles.fontWeight
1245
+ }
1259
1246
  }, title), size === 'xxs' && /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
1260
1247
  "data-testid": "dragBtn-xxs",
1261
- className: classes.iconDragHorizontal,
1262
1248
  disableRipple: true,
1263
- size: "small"
1249
+ size: "small",
1250
+ sx: __assign(__assign({}, iconStyle), {
1251
+ pointerEvents: 'none',
1252
+ transform: 'rotate(90deg)',
1253
+ height: 12
1254
+ })
1264
1255
  }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.DragIndicator, null)))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1265
1256
  item: true,
1266
1257
  xs: 1,
@@ -1268,9 +1259,9 @@
1268
1259
  justifyContent: "flex-end"
1269
1260
  }, onClose && /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
1270
1261
  "data-testid": "closeBtn",
1271
- className: classes.iconClose,
1272
1262
  onClick: onClickClose,
1273
- size: "large"
1263
+ size: "large",
1264
+ sx: iconStyle
1274
1265
  }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.Close, null)))));
1275
1266
  };
1276
1267
 
@@ -1302,7 +1293,6 @@
1302
1293
  content: {
1303
1294
  flex: 1,
1304
1295
  overflowY: 'auto',
1305
- zIndex: 2,
1306
1296
  position: 'relative'
1307
1297
  }
1308
1298
  };
@@ -1364,6 +1354,19 @@
1364
1354
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1365
1355
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1366
1356
  * */
1357
+
1358
+ var calculateDialogSizeAndPosition = function calculateDialogSizeAndPosition() {
1359
+ var width = window.innerWidth * 0.85;
1360
+ var height = window.innerHeight * 0.85;
1361
+ var top = window.innerHeight * 0.15 / 2;
1362
+ var left = window.innerWidth * 0.15 / 2;
1363
+ return {
1364
+ width: width,
1365
+ height: height,
1366
+ top: top,
1367
+ left: left
1368
+ };
1369
+ };
1367
1370
  var BASE_Z_INDEX = 100;
1368
1371
 
1369
1372
  var DraggableComponent = function DraggableComponent(_a) {
@@ -1495,6 +1498,7 @@
1495
1498
  }, /*#__PURE__*/React__default["default"].createElement("div", {
1496
1499
  style: __assign({
1497
1500
  position: 'absolute',
1501
+ pointerEvents: 'all',
1498
1502
  zIndex: zIndex
1499
1503
  }, startPosition),
1500
1504
  ref: nodeRef
@@ -1881,6 +1885,14 @@
1881
1885
  }, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
1882
1886
  type: "icon"
1883
1887
  }, /*#__PURE__*/React__default["default"].createElement(ArrowLeftIcon, null)))
1888
+ }, {
1889
+ title: 'Change layer manager values by scrolling',
1890
+ description: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
1891
+ type: "icon"
1892
+ }, "Ctrl"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, null, " + Mouse scroll")),
1893
+ descriptionMac: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
1894
+ type: "icon"
1895
+ }, /*#__PURE__*/React__default["default"].createElement(CommandIcon, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, null, " + Mouse scroll"))
1884
1896
  }];
1885
1897
  var getShortcutList = function getShortcutList(shortcutList, platform) {
1886
1898
  if (platform === void 0) {
@@ -2024,7 +2036,8 @@
2024
2036
 
2025
2037
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.MenuItem, {
2026
2038
  "data-testid": "cheatsheet-btn",
2027
- onClick: onOpen
2039
+ onClick: onOpen,
2040
+ divider: true
2028
2041
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2029
2042
  container: true
2030
2043
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
@@ -2232,83 +2245,388 @@
2232
2245
  }, props));
2233
2246
  };
2234
2247
 
2235
- var Z_INDEX_TOP = 600;
2236
- var Z_INDEX_BOTTOM = 550;
2237
- var useStyles = makeStyles__default["default"](function (theme) {
2238
- return createStyles__default["default"]({
2239
- draggableDialog: function draggableDialog(props) {
2248
+ /* *
2249
+ * Licensed under the Apache License, Version 2.0 (the "License");
2250
+ * you may not use this file except in compliance with the License.
2251
+ * You may obtain a copy of the License at
2252
+ *
2253
+ * http://www.apache.org/licenses/LICENSE-2.0
2254
+ *
2255
+ * Unless required by applicable law or agreed to in writing, software
2256
+ * distributed under the License is distributed on an "AS IS" BASIS,
2257
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2258
+ * See the License for the specific language governing permissions and
2259
+ * limitations under the License.
2260
+ *
2261
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2262
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
2263
+ * */
2264
+
2265
+ var CustomToggleButton = function CustomToggleButton(_a) {
2266
+ var _b = _a.variant,
2267
+ variant = _b === void 0 ? 'primary' : _b,
2268
+ _c = _a.value,
2269
+ value = _c === void 0 ? 0 : _c,
2270
+ props = __rest(_a, ["variant", "value"]);
2271
+
2272
+ return /*#__PURE__*/React__namespace.createElement(material.ToggleButton, __assign({
2273
+ className: variant,
2274
+ value: value
2275
+ }, props));
2276
+ };
2277
+
2278
+ /* *
2279
+ * Licensed under the Apache License, Version 2.0 (the "License");
2280
+ * you may not use this file except in compliance with the License.
2281
+ * You may obtain a copy of the License at
2282
+ *
2283
+ * http://www.apache.org/licenses/LICENSE-2.0
2284
+ *
2285
+ * Unless required by applicable law or agreed to in writing, software
2286
+ * distributed under the License is distributed on an "AS IS" BASIS,
2287
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2288
+ * See the License for the specific language governing permissions and
2289
+ * limitations under the License.
2290
+ *
2291
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2292
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
2293
+ * */
2294
+ var ToolButton = function ToolButton(_a) {
2295
+ var active = _a.active,
2296
+ _b = _a.width,
2297
+ width = _b === void 0 ? '24px' : _b,
2298
+ _c = _a.height,
2299
+ height = _c === void 0 ? '24px' : _c,
2300
+ children = _a.children,
2301
+ _d = _a.value,
2302
+ value = _d === void 0 ? 0 : _d,
2303
+ _e = _a.sx,
2304
+ sx = _e === void 0 ? {} : _e,
2305
+ props = __rest(_a, ["active", "width", "height", "children", "value", "sx"]);
2306
+
2307
+ return /*#__PURE__*/React__namespace.createElement(CustomToggleButton, __assign({
2308
+ variant: "tool",
2309
+ disableRipple: true,
2310
+ selected: active,
2311
+ value: value,
2312
+ sx: __assign({
2313
+ width: width + "!important",
2314
+ height: height + "!important",
2315
+ textTransform: 'none!important',
2316
+ padding: '11px!important'
2317
+ }, sx)
2318
+ }, props), children);
2319
+ };
2320
+
2321
+ var getPosition = function getPosition(menuPosition) {
2322
+ switch (menuPosition) {
2323
+ case 'bottom':
2240
2324
  return {
2241
- width: props.dialogWidth ? props.dialogWidth : '90%',
2242
- position: 'absolute',
2243
- top: props.dialogTop ? props.dialogTop : '2%',
2244
- left: '5%',
2245
- maxWidth: '90%',
2246
- maxHeight: props.dialogMaxHeight ? props.dialogMaxHeight : '95%',
2247
- display: 'flex',
2248
- flexDirection: 'column',
2249
- overflow: 'hidden',
2250
- zIndex: props.zIndex
2325
+ anchorOrigin: {
2326
+ vertical: 'bottom',
2327
+ horizontal: 'center'
2328
+ },
2329
+ transformOrigin: {
2330
+ vertical: 'top',
2331
+ horizontal: 'center'
2332
+ }
2251
2333
  };
2252
- },
2253
- dialogContent: {
2254
- marginTop: '40px',
2255
- overflowY: 'scroll'
2256
- },
2257
- dialogHeader: function dialogHeader(props) {
2334
+
2335
+ default:
2336
+ case 'left':
2258
2337
  return {
2259
- position: 'absolute',
2260
- display: 'flex',
2261
- justifyContent: 'space-between',
2262
- alignItems: 'center',
2263
- 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)',
2264
- width: '100%',
2265
- backgroundColor: '#ffffff',
2266
- zIndex: props.zIndex + 10
2338
+ anchorOrigin: {
2339
+ vertical: 'center',
2340
+ horizontal: 'left'
2341
+ },
2342
+ transformOrigin: {
2343
+ vertical: 'center',
2344
+ horizontal: 'right'
2345
+ }
2267
2346
  };
2347
+ }
2348
+ };
2349
+
2350
+ var ToggleMenu = function ToggleMenu(_a) {
2351
+ var _b = _a.buttonTestId,
2352
+ buttonTestId = _b === void 0 ? 'toggleMenuButton' : _b,
2353
+ _c = _a.menuPosition,
2354
+ menuPosition = _c === void 0 ? 'left' : _c,
2355
+ menuItems = _a.menuItems,
2356
+ children = _a.children,
2357
+ buttonSx = _a.buttonSx,
2358
+ _d = _a.tooltipTitle,
2359
+ tooltipTitle = _d === void 0 ? '' : _d;
2360
+
2361
+ var _e = __read(React__namespace.useState(null), 2),
2362
+ anchorEl = _e[0],
2363
+ setAnchorEl = _e[1];
2364
+
2365
+ var isOpen = Boolean(anchorEl);
2366
+
2367
+ var _f = getPosition(menuPosition),
2368
+ anchorOrigin = _f.anchorOrigin,
2369
+ transformOrigin = _f.transformOrigin;
2370
+
2371
+ var handleClick = function handleClick(event) {
2372
+ setAnchorEl(event.currentTarget);
2373
+ };
2374
+
2375
+ var handleClose = function handleClose() {
2376
+ setAnchorEl(null);
2377
+ };
2378
+
2379
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(ToolButton, {
2380
+ active: isOpen,
2381
+ sx: buttonSx,
2382
+ onClick: handleClick,
2383
+ "data-testid": buttonTestId
2384
+ }, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
2385
+ placement: "top",
2386
+ title: tooltipTitle
2387
+ }, /*#__PURE__*/React__namespace.createElement(MoreVertIcon__default["default"], null))), /*#__PURE__*/React__namespace.createElement(material.Menu, {
2388
+ anchorEl: anchorEl,
2389
+ open: isOpen,
2390
+ onClose: handleClose,
2391
+ anchorOrigin: anchorOrigin,
2392
+ transformOrigin: transformOrigin,
2393
+ BackdropProps: {
2394
+ style: {
2395
+ opacity: 0,
2396
+ transition: 'none'
2397
+ }
2268
2398
  },
2269
- iconClose: {
2270
- padding: theme.spacing(1)
2399
+ MenuListProps: children && {
2400
+ style: {
2401
+ padding: '0px'
2402
+ }
2403
+ }
2404
+ }, menuItems && menuItems.map(function (menuItem) {
2405
+ var text = menuItem.text,
2406
+ icon = menuItem.icon,
2407
+ action = menuItem.action;
2408
+ return /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
2409
+ key: text,
2410
+ onClick: function onClick() {
2411
+ action();
2412
+ handleClose();
2413
+ }
2414
+ }, icon && /*#__PURE__*/React__namespace.createElement(material.ListItemIcon, null, icon), /*#__PURE__*/React__namespace.createElement(material.Typography, null, text));
2415
+ }), children));
2416
+ };
2417
+
2418
+ /* *
2419
+ * Licensed under the Apache License, Version 2.0 (the "License");
2420
+ * you may not use this file except in compliance with the License.
2421
+ * You may obtain a copy of the License at
2422
+ *
2423
+ * http://www.apache.org/licenses/LICENSE-2.0
2424
+ *
2425
+ * Unless required by applicable law or agreed to in writing, software
2426
+ * distributed under the License is distributed on an "AS IS" BASIS,
2427
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2428
+ * See the License for the specific language governing permissions and
2429
+ * limitations under the License.
2430
+ *
2431
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2432
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2433
+ * */
2434
+ var useStyles = makeStyles__default["default"](function (theme) {
2435
+ return createStyles__default["default"]({
2436
+ button: {
2437
+ height: 28,
2438
+ width: 28,
2439
+ borderRadius: 5,
2440
+ marginTop: 2,
2441
+ color: function color(_a) {
2442
+ var isActive = _a.isActive,
2443
+ isAccessible = _a.isAccessible,
2444
+ isEnabled = _a.isEnabled;
2445
+
2446
+ if (!isEnabled) {
2447
+ return theme.palette.geowebColors.buttons.flat.disabled.color;
2448
+ }
2449
+
2450
+ if (isAccessible) {
2451
+ return theme.palette.geowebColors.greys.accessible;
2452
+ }
2453
+
2454
+ if (isActive) {
2455
+ return theme.palette.common.white;
2456
+ }
2457
+
2458
+ return theme.palette.geowebColors.buttons.flat["default"].color;
2459
+ },
2460
+ backgroundColor: function backgroundColor(_a) {
2461
+ var isActive = _a.isActive;
2462
+ return isActive ? theme.palette.geowebColors.buttons.primary.active.fill : 'inherit';
2463
+ },
2464
+ '&:focus': {
2465
+ backgroundColor: function backgroundColor(_a) {
2466
+ var isActive = _a.isActive;
2467
+ return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.buttons.flat.mouseOver.fill;
2468
+ },
2469
+ outline: theme.palette.geowebColors.buttons.focusDefault.outline,
2470
+ borderRadius: 0
2471
+ },
2472
+ '&:hover': {
2473
+ backgroundColor: function backgroundColor(_a) {
2474
+ var isActive = _a.isActive;
2475
+ return isActive ? theme.palette.geowebColors.buttons.primary.mouseOver.fill : theme.palette.geowebColors.buttons.flat.mouseOver.fill;
2476
+ }
2477
+ }
2271
2478
  },
2272
- iconDrag: {
2273
- padding: theme.spacing(1)
2479
+ popper: {
2480
+ pointerEvents: 'none'
2274
2481
  }
2275
2482
  });
2276
2483
  });
2484
+ var ManagerButton = function ManagerButton(_a) {
2485
+ var _b = _a.tooltipTitle,
2486
+ tooltipTitle = _b === void 0 ? '' : _b,
2487
+ _c = _a.onClick,
2488
+ onClick = _c === void 0 ? function () {} : _c,
2489
+ _d = _a.isActive,
2490
+ isActive = _d === void 0 ? false : _d,
2491
+ _e = _a.isEnabled,
2492
+ isEnabled = _e === void 0 ? true : _e,
2493
+ icon = _a.icon,
2494
+ testId = _a.testId,
2495
+ _f = _a.isAccessible,
2496
+ isAccessible = _f === void 0 ? false : _f,
2497
+ className = _a.className,
2498
+ props = __rest(_a, ["tooltipTitle", "onClick", "isActive", "isEnabled", "icon", "testId", "isAccessible", "className"]);
2499
+
2500
+ var classes = useStyles({
2501
+ isActive: isActive,
2502
+ isEnabled: isEnabled,
2503
+ isAccessible: isAccessible
2504
+ });
2505
+
2506
+ var handleClick = function handleClick(event) {
2507
+ onClick(event);
2508
+ };
2509
+
2510
+ return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
2511
+ title: tooltipTitle,
2512
+ placement: "top",
2513
+ classes: {
2514
+ popper: classes.popper
2515
+ }
2516
+ }, /*#__PURE__*/React__namespace.createElement(material.IconButton, __assign({
2517
+ size: "small",
2518
+ onClick: handleClick,
2519
+ "data-testid": testId,
2520
+ className: classes.button + " " + className,
2521
+ disableFocusRipple: true
2522
+ }, props), icon));
2523
+ };
2277
2524
 
2278
- var DraggableDialog = function DraggableDialog(_a) {
2279
- var handleClose = _a.handleClose,
2525
+ /* *
2526
+ * Licensed under the Apache License, Version 2.0 (the "License");
2527
+ * you may not use this file except in compliance with the License.
2528
+ * You may obtain a copy of the License at
2529
+ *
2530
+ * http://www.apache.org/licenses/LICENSE-2.0
2531
+ *
2532
+ * Unless required by applicable law or agreed to in writing, software
2533
+ * distributed under the License is distributed on an "AS IS" BASIS,
2534
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2535
+ * See the License for the specific language governing permissions and
2536
+ * limitations under the License.
2537
+ *
2538
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2539
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
2540
+ * */
2541
+ var ManagerDeleteButton = function ManagerDeleteButton(_a) {
2542
+ var tooltipTitle = _a.tooltipTitle,
2543
+ onClickDelete = _a.onClickDelete,
2544
+ _b = _a.isEnabled,
2545
+ isEnabled = _b === void 0 ? true : _b;
2546
+ return /*#__PURE__*/React__namespace.createElement(ManagerButton, {
2547
+ tooltipTitle: tooltipTitle,
2548
+ onClick: onClickDelete,
2549
+ icon: /*#__PURE__*/React__namespace.createElement(iconsMaterial.Delete, {
2550
+ sx: {
2551
+ width: 20,
2552
+ height: 20
2553
+ }
2554
+ }),
2555
+ testId: "deleteButton",
2556
+ isEnabled: isEnabled
2557
+ });
2558
+ };
2559
+
2560
+ /* *
2561
+ * Licensed under the Apache License, Version 2.0 (the "License");
2562
+ * you may not use this file except in compliance with the License.
2563
+ * You may obtain a copy of the License at
2564
+ *
2565
+ * http://www.apache.org/licenses/LICENSE-2.0
2566
+ *
2567
+ * Unless required by applicable law or agreed to in writing, software
2568
+ * distributed under the License is distributed on an "AS IS" BASIS,
2569
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2570
+ * See the License for the specific language governing permissions and
2571
+ * limitations under the License.
2572
+ *
2573
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2574
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
2575
+ * */
2576
+ var EnableButton = function EnableButton(_a) {
2577
+ var isEnabled = _a.isEnabled,
2280
2578
  title = _a.title,
2281
- children = _a.children,
2282
- _b = _a.dialogStyling,
2283
- dialogStyling = _b === void 0 ? {} : _b,
2284
- _c = _a.zIndex,
2285
- zIndex = _c === void 0 ? Z_INDEX_TOP : _c;
2286
- var classes = useStyles(__assign(__assign({}, dialogStyling), {
2287
- zIndex: zIndex
2579
+ onChangeEnableLayer = _a.onChangeEnableLayer;
2580
+
2581
+ var onClick = function onClick() {
2582
+ onChangeEnableLayer(!isEnabled);
2583
+ };
2584
+
2585
+ var visibilityIcon = /*#__PURE__*/React__namespace.createElement(material.SvgIcon, null, /*#__PURE__*/React__namespace.createElement("rect", {
2586
+ width: 24,
2587
+ height: 24,
2588
+ fill: "transparent"
2589
+ }), /*#__PURE__*/React__namespace.createElement("path", {
2590
+ d: "M14.4980749,15.8618431 C15.8661433,15.0851043 16.779689,13.6936347 16.779689,12.1014551 C16.779689,10.5092755 15.8661433,9.11870594 14.4980749,8.34106705 C17.6257313,9.18620931 19.3529176,11.4300215 19.8092405,12.1014551 C19.3529176,12.7719886 17.6266313,15.0167008 14.4980749,15.8618431 L14.4980749,15.8618431 Z M4.18985949,12.1014551 C4.64618231,11.4300215 6.37336867,9.18710936 9.49922496,8.3419671 C8.13295665,9.11870594 7.21851093,10.5101755 7.21851093,12.1014551 C7.21851093,13.6936347 8.13295665,15.0842042 9.49922496,15.8618431 C6.37336867,15.0167008 4.64618231,12.7728886 4.18985949,12.1014551 L4.18985949,12.1014551 Z M11.99955,13.8583429 C10.9950998,13.8583429 10.180559,13.0717036 10.180559,12.1014551 C10.180559,11.1312066 10.9950998,10.3445672 11.99955,10.3445672 C13.0031002,10.3445672 13.8176409,11.1312066 13.8176409,12.1014551 C13.8176409,13.0717036 13.0031002,13.8583429 11.99955,13.8583429 L11.99955,13.8583429 Z M20.7983899,11.7666383 C20.6813841,11.5713286 17.8696435,7 11.99955,7 C6.12945647,7 3.31681584,11.5713286 3.19980999,11.7666383 L3,12.1014551 L3.19980999,12.4362718 C3.31681584,12.6306815 6.12945647,17.2020101 11.99955,17.2020101 C17.8696435,17.2020101 20.6813841,12.6306815 20.7983899,12.4362718 L21,12.1014551 L20.7983899,11.7666383 Z"
2288
2591
  }));
2289
- return /*#__PURE__*/React__namespace.createElement(Draggable__default["default"], {
2290
- handle: "strong",
2291
- bounds: "body"
2292
- }, /*#__PURE__*/React__namespace.createElement(material.Paper, {
2293
- "data-testid": title,
2294
- className: classes.draggableDialog,
2295
- elevation: 24
2296
- }, /*#__PURE__*/React__namespace.createElement("div", {
2297
- className: classes.dialogHeader
2298
- }, /*#__PURE__*/React__namespace.createElement("strong", null, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
2299
- "data-testid": "dragDialog",
2300
- size: "small",
2301
- className: classes.iconDrag
2302
- }, /*#__PURE__*/React__namespace.createElement(iconsMaterial.DragIndicator, null))), /*#__PURE__*/React__namespace.createElement(material.Typography, {
2303
- variant: "subtitle1"
2304
- }, title), /*#__PURE__*/React__namespace.createElement(material.IconButton, {
2305
- "data-testid": "closeDialog",
2306
- size: "small",
2307
- onClick: handleClose,
2308
- className: classes.iconClose
2309
- }, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Close, null))), /*#__PURE__*/React__namespace.createElement("div", {
2310
- className: classes.dialogContent
2311
- }, children)));
2592
+ var visibilityOffIcon = /*#__PURE__*/React__namespace.createElement(material.SvgIcon, {
2593
+ style: {
2594
+ marginTop: 2
2595
+ }
2596
+ }, /*#__PURE__*/React__namespace.createElement("rect", {
2597
+ width: 24,
2598
+ height: 24,
2599
+ fill: "transparent"
2600
+ }), /*#__PURE__*/React__namespace.createElement("path", {
2601
+ d: "M12 15.309c-.755 0-1.45-.088-2.092-.236l.798-.797c.41.124.844.192 1.294.192 2.453 0 4.442-1.988 4.442-4.44 0-.495-.085-.907-.234-1.255l.03-.03c1.72.906 2.781 2.167 3.218 2.766-.724.992-3.151 3.8-7.456 3.8zm-7.456-3.8c.442-.607 1.522-1.89 3.276-2.796-.166.36-.261.79-.261 1.315 0 1.228.499 2.34 1.305 3.144l-1.102 1.104c-1.72-.906-2.78-2.169-3.218-2.767zm5.646-3.524c.818 0 1.482.665 1.482 1.483 0 .818-.664 1.481-1.482 1.481s-1.482-.663-1.482-1.481c0-.818.664-1.483 1.482-1.483zm10.608 3.19c-.073-.125-1.245-2.026-3.603-3.388l2.009-2.01c.406-.406.406-1.065 0-1.473-.407-.405-1.066-.405-1.473 0l-2.58 2.582c-.93-.295-1.98-.478-3.151-.478-5.87 0-8.681 4.57-8.798 4.766L3 11.51l.202.335c.073.124 1.244 2.025 3.603 3.387l-2.009 2.01c-.406.406-.406 1.065 0 1.472.204.203.47.305.737.305.266 0 .532-.102.736-.305l2.58-2.58c.93.293 1.98.476 3.151.476 5.87 0 8.681-4.57 8.798-4.765l.202-.335-.202-.335z"
2602
+ }));
2603
+ return /*#__PURE__*/React__namespace.createElement(ManagerButton, {
2604
+ tooltipTitle: title,
2605
+ onClick: onClick,
2606
+ icon: /*#__PURE__*/React__namespace.createElement(material.Checkbox, {
2607
+ sx: {
2608
+ color: 'inherit',
2609
+ padding: 0.5,
2610
+ borderRadius: 1.25,
2611
+ '&.Mui-focusVisible': {
2612
+ backgroundColor: 'geowebColors.buttons.tool.mouseOver.fill'
2613
+ },
2614
+ '&:hover': {
2615
+ backgroundColor: 'transparent!important'
2616
+ },
2617
+ '&.Mui-checked': {
2618
+ color: 'inherit'
2619
+ }
2620
+ },
2621
+ icon: visibilityOffIcon,
2622
+ checkedIcon: visibilityIcon,
2623
+ checked: isEnabled,
2624
+ disableFocusRipple: true,
2625
+ tabIndex: -1
2626
+ }),
2627
+ testId: "enableLayer",
2628
+ isEnabled: isEnabled
2629
+ });
2312
2630
  };
2313
2631
 
2314
2632
  /* *
@@ -2351,12 +2669,17 @@
2351
2669
  exports.ConfirmationDialog = ConfirmationDialog;
2352
2670
  exports.ConfirmationServiceProvider = ConfirmationServiceProvider;
2353
2671
  exports.CustomSlider = CustomSlider;
2672
+ exports.CustomToggleButton = CustomToggleButton;
2354
2673
  exports.Draggable = DraggableComponent$1;
2355
- exports.DraggableDialog = DraggableDialog;
2674
+ exports.EnableButton = EnableButton;
2356
2675
  exports.ErrorBoundary = ErrorBoundary;
2357
2676
  exports.HIDDEN_INPUT_HELPER_IS_DRAFT = HIDDEN_INPUT_HELPER_IS_DRAFT;
2677
+ exports.ManagerButton = ManagerButton;
2678
+ exports.ManagerDeleteButton = ManagerDeleteButton;
2358
2679
  exports.Resizable = ResizeComponent;
2359
2680
  exports.StatusTag = StatusTag;
2681
+ exports.ToggleMenu = ToggleMenu;
2682
+ exports.ToolButton = ToolButton;
2360
2683
  exports.ToolContainer = ToolContainer;
2361
2684
  exports.ToolContainerDraggable = DraggableComponent;
2362
2685
  exports.ToolFooter = ToolFooter;
@@ -2364,8 +2687,7 @@
2364
2687
  exports.UserMenu = UserMenu;
2365
2688
  exports.UserMenuItemCheatSheet = UserMenuItemCheatSheet;
2366
2689
  exports.UserMenuItemTheme = MenuItemTheme;
2367
- exports.Z_INDEX_BOTTOM = Z_INDEX_BOTTOM;
2368
- exports.Z_INDEX_TOP = Z_INDEX_TOP;
2690
+ exports.calculateDialogSizeAndPosition = calculateDialogSizeAndPosition;
2369
2691
  exports.getAxiosErrorMessage = getAxiosErrorMessage;
2370
2692
  exports.getInitials = getInitials;
2371
2693
  exports.isAxiosError = isAxiosError;