@opengeoweb/shared 4.0.0 → 4.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.
package/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default from 'react';
2
+ import React__default, { useRef } from 'react';
3
3
  import { Box, Typography, Dialog, DialogTitle, IconButton, DialogContent, DialogActions, Button, CircularProgress, Alert, AlertTitle, Grid, useTheme, Link, Avatar as Avatar$1, Paper, ClickAwayListener, MenuList, MenuItem, RadioGroup, FormControlLabel, Radio, Tooltip, List, ListItem, Tabs, Tab, Backdrop, Slider, ToggleButton, Menu, ListItemIcon, Checkbox, Select } from '@mui/material';
4
4
  import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, Resize, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, Delete, VisibilityOff, Visibility } from '@opengeoweb/theme';
5
5
  import { useFormContext } from 'react-hook-form';
@@ -488,7 +488,7 @@ function usePreventBrowserClose(shouldPreventClose) {
488
488
  * */
489
489
  var usePoller = function usePoller(deps, callback) {
490
490
  var pollingInterval = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300000;
491
- var interval = React.useRef(null);
491
+ var interval = useRef(null);
492
492
  React.useEffect(function () {
493
493
  if (deps.filter(function (dep) {
494
494
  return dep !== null;
@@ -781,7 +781,11 @@ var AlertBanner = function AlertBanner(_ref) {
781
781
  isOpen = _React$useState2[0],
782
782
  setIsOpen = _React$useState2[1];
783
783
 
784
- return isOpen && /*#__PURE__*/React.createElement(Alert, {
784
+ if (!isOpen) {
785
+ return null;
786
+ }
787
+
788
+ return /*#__PURE__*/React.createElement(Alert, {
785
789
  "data-testid": dataTestId,
786
790
  severity: severity,
787
791
  icon: /*#__PURE__*/React.createElement(AlertIcon, {
@@ -891,28 +895,29 @@ var AppLayout = function AppLayout(_ref) {
891
895
 
892
896
  var styles$5 = {
893
897
  header: function header(theme) {
894
- var _ref;
895
-
896
- return _ref = {
898
+ return _defineProperty({
897
899
  height: 40,
898
900
  backgroundColor: theme.palette.geowebColors.brand.brand,
899
901
  color: theme.palette.common.white,
900
902
  boxShadow: theme.shadows[1],
901
- zIndex: 1000
902
- }, _defineProperty(_ref, theme.breakpoints.down('sm'), {
903
- padding: '0 8px'
904
- }), _defineProperty(_ref, theme.breakpoints.up('sm'), {
903
+ zIndex: 1000,
904
+ padding: '0 16px'
905
+ }, theme.breakpoints.up('md'), {
905
906
  padding: '0 24px'
906
- }), _ref;
907
+ });
907
908
  },
908
909
  title: {
909
- marginLeft: 1,
910
- fontSize: '1.25rem',
911
- fontWeight: 400,
910
+ fontSize: '20px',
911
+ fontWeight: 500,
912
+ fontStretch: 'normal',
913
+ fontStyle: 'normal',
914
+ lineHeight: 'normal',
915
+ letterSpacing: '0.15px',
912
916
  overflow: 'hidden',
913
917
  whiteSpace: 'nowrap',
914
918
  textOverflow: 'ellipsis',
915
- letterSpacing: '0.15px'
919
+ color: 'geowebColors.typographyAndIcons.text',
920
+ marginLeft: 1
916
921
  },
917
922
  container: {
918
923
  height: '100%'
@@ -933,27 +938,35 @@ var AppHeader = function AppHeader(_ref2) {
933
938
  alignItems: "center"
934
939
  }, /*#__PURE__*/React__default.createElement(Grid, {
935
940
  item: true,
936
- xs: 1,
937
- sm: 3
938
- }, /*#__PURE__*/React__default.createElement(Grid, {
939
- container: true,
940
- justifyContent: "flex-start"
941
- }, menu)), /*#__PURE__*/React__default.createElement(Grid, {
942
- item: true,
943
- xs: 10,
941
+ xs: 6,
944
942
  sm: 6
945
943
  }, /*#__PURE__*/React__default.createElement(Grid, {
946
944
  container: true,
947
- justifyContent: "center",
948
945
  alignItems: "center",
949
- wrap: "nowrap"
950
- }, /*#__PURE__*/React__default.createElement(GeoWebLogo, null), /*#__PURE__*/React__default.createElement(Typography, {
946
+ wrap: "nowrap",
947
+ sx: {
948
+ button: {
949
+ marginLeft: 4,
950
+ color: 'geowebColors.typographyAndIcons.text'
951
+ }
952
+ }
953
+ }, /*#__PURE__*/React__default.createElement(Box, {
954
+ sx: {
955
+ display: 'flex'
956
+ }
957
+ }, /*#__PURE__*/React__default.createElement(GeoWebLogo, {
958
+ style: {
959
+ position: 'relative',
960
+ top: '-1px',
961
+ right: '-1px'
962
+ }
963
+ })), /*#__PURE__*/React__default.createElement(Typography, {
951
964
  variant: "h1",
952
965
  sx: styles$5.title
953
- }, title))), /*#__PURE__*/React__default.createElement(Grid, {
966
+ }, title), menu)), /*#__PURE__*/React__default.createElement(Grid, {
954
967
  item: true,
955
- xs: 1,
956
- sm: 3,
968
+ xs: 6,
969
+ sm: 6,
957
970
  container: true,
958
971
  justifyContent: "flex-end"
959
972
  }, userMenu)));
@@ -1007,15 +1020,13 @@ var DraggableComponent$1 = function DraggableComponent(_a) {
1007
1020
  var ResizeComponent = function ResizeComponent(_a) {
1008
1021
  var _a$startPosition = _a.startPosition,
1009
1022
  startPosition = _a$startPosition === void 0 ? {
1010
- left: null,
1011
- right: null,
1012
- top: null
1023
+ left: undefined,
1024
+ right: undefined,
1025
+ top: undefined
1013
1026
  } : _a$startPosition,
1014
1027
  children = _a.children,
1015
1028
  _a$onResizeStart = _a.onResizeStart,
1016
- onResizeStart = _a$onResizeStart === void 0 ? function () {
1017
- return null;
1018
- } : _a$onResizeStart,
1029
+ onResizeStart = _a$onResizeStart === void 0 ? function () {} : _a$onResizeStart,
1019
1030
  size = _a.size,
1020
1031
  setSize = _a.setSize,
1021
1032
  _a$minHeight = _a.minHeight,
@@ -1104,8 +1115,8 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
1104
1115
 
1105
1116
  _this = _super.call(this, props);
1106
1117
  _this.state = {
1107
- error: null,
1108
- errorInfo: null
1118
+ error: undefined,
1119
+ errorInfo: undefined
1109
1120
  };
1110
1121
  return _this;
1111
1122
  }
@@ -1165,9 +1176,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
1165
1176
  return ErrorBoundary;
1166
1177
  }(React.Component);
1167
1178
  ErrorBoundary.defaultProps = {
1168
- onError: function onError() {
1169
- return null;
1170
- }
1179
+ onError: function onError() {}
1171
1180
  };
1172
1181
 
1173
1182
  /* *
@@ -1192,11 +1201,7 @@ var styles$4 = {
1192
1201
  width: 16,
1193
1202
  fontSize: '0.5rem'
1194
1203
  },
1195
- large: {
1196
- height: 32,
1197
- width: 32,
1198
- fontSize: '0.938rem'
1199
- }
1204
+ large: {}
1200
1205
  };
1201
1206
 
1202
1207
  var Avatar = function Avatar(_ref) {
@@ -1205,13 +1210,7 @@ var Avatar = function Avatar(_ref) {
1205
1210
  size = _ref$size === void 0 ? 'large' : _ref$size;
1206
1211
  return /*#__PURE__*/React.createElement(Avatar$1, {
1207
1212
  "data-testid": "avatar",
1208
- sx: Object.assign(Object.assign({}, styles$4[size]), {
1209
- fontWeight: 500,
1210
- color: 'geowebColors.brand.brand',
1211
- backgroundColor: 'common.white',
1212
- border: '0.1px solid',
1213
- borderColor: 'geowebColors.brand.brand'
1214
- })
1213
+ sx: Object.assign({}, styles$4[size])
1215
1214
  }, children);
1216
1215
  };
1217
1216
 
@@ -1251,8 +1250,13 @@ var styles$3 = {
1251
1250
  }
1252
1251
  },
1253
1252
  button: {
1254
- color: 'common.white',
1255
- padding: 0
1253
+ padding: 0,
1254
+ border: 'none',
1255
+ background: 'transparent',
1256
+ '&:hover': {
1257
+ border: 'none',
1258
+ background: 'transparent'
1259
+ }
1256
1260
  }
1257
1261
  };
1258
1262
 
@@ -1260,13 +1264,9 @@ var UserMenu = function UserMenu(_ref) {
1260
1264
  var _ref$isOpen = _ref.isOpen,
1261
1265
  isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
1262
1266
  _ref$onToggle = _ref.onToggle,
1263
- onToggle = _ref$onToggle === void 0 ? function () {
1264
- return null;
1265
- } : _ref$onToggle,
1267
+ onToggle = _ref$onToggle === void 0 ? function () {} : _ref$onToggle,
1266
1268
  _ref$onClose = _ref.onClose,
1267
- onClose = _ref$onClose === void 0 ? function () {
1268
- return null;
1269
- } : _ref$onClose,
1269
+ onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
1270
1270
  children = _ref.children,
1271
1271
  initials = _ref.initials;
1272
1272
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
@@ -1376,8 +1376,8 @@ var ToolFooter = function ToolFooter() {
1376
1376
  * See the License for the specific language governing permissions and
1377
1377
  * limitations under the License.
1378
1378
  *
1379
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1380
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
1379
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1380
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
1381
1381
  * */
1382
1382
 
1383
1383
  var getStyle = function getStyle(size) {
@@ -1618,27 +1618,21 @@ var DraggableComponent = function DraggableComponent(_a) {
1618
1618
  } : _a$startSize,
1619
1619
  _a$startPosition = _a.startPosition,
1620
1620
  startPosition = _a$startPosition === void 0 ? {
1621
- left: null,
1622
- right: null,
1623
- top: null
1621
+ left: undefined,
1622
+ right: undefined,
1623
+ top: undefined
1624
1624
  } : _a$startPosition,
1625
1625
  children = _a.children,
1626
1626
  _a$isOpen = _a.isOpen,
1627
1627
  isOpen = _a$isOpen === void 0 ? true : _a$isOpen,
1628
1628
  _a$onClose = _a.onClose,
1629
- onClose = _a$onClose === void 0 ? function () {
1630
- return null;
1631
- } : _a$onClose,
1629
+ onClose = _a$onClose === void 0 ? function () {} : _a$onClose,
1632
1630
  _a$initialMaxHeight = _a.initialMaxHeight,
1633
1631
  defaultInitialMaxHeight = _a$initialMaxHeight === void 0 ? 'initial' : _a$initialMaxHeight,
1634
1632
  _a$onChangeSize = _a.onChangeSize,
1635
- onChangeSize = _a$onChangeSize === void 0 ? function () {
1636
- return null;
1637
- } : _a$onChangeSize,
1633
+ onChangeSize = _a$onChangeSize === void 0 ? function () {} : _a$onChangeSize,
1638
1634
  _a$onMouseDown = _a.onMouseDown,
1639
- onMouseDown = _a$onMouseDown === void 0 ? function () {
1640
- return null;
1641
- } : _a$onMouseDown,
1635
+ onMouseDown = _a$onMouseDown === void 0 ? function () {} : _a$onMouseDown,
1642
1636
  _a$order = _a.order,
1643
1637
  order = _a$order === void 0 ? 1 : _a$order,
1644
1638
  _a$source = _a.source,
@@ -2452,11 +2446,11 @@ var ToggleMenu = function ToggleMenu(_ref) {
2452
2446
  transition: 'none'
2453
2447
  }
2454
2448
  },
2455
- MenuListProps: children && {
2449
+ MenuListProps: Object.assign({}, children && {
2456
2450
  style: {
2457
2451
  padding: '0px'
2458
2452
  }
2459
- }
2453
+ })
2460
2454
  }, menuItems && menuItems.map(function (menuItem) {
2461
2455
  var text = menuItem.text,
2462
2456
  icon = menuItem.icon,
@@ -2786,7 +2780,7 @@ var TooltipSelect = function TooltipSelect(_a) {
2786
2780
  title: tooltip,
2787
2781
  placement: "top",
2788
2782
  open: tooltipOpen,
2789
- sx: noStyling ? undefined : tooltipContainerStyles(isEnabled, hasBackgroundColor)
2783
+ sx: noStyling ? undefined : tooltipContainerStyles(!!isEnabled, hasBackgroundColor)
2790
2784
  }, /*#__PURE__*/React.createElement(Select, Object.assign({
2791
2785
  onOpen: onOpen,
2792
2786
  onClose: onClose,
package/index.umd.js CHANGED
@@ -357,7 +357,7 @@
357
357
  pollingInterval = 300000;
358
358
  }
359
359
 
360
- var interval = React__namespace.useRef(null);
360
+ var interval = React.useRef(null);
361
361
  React__namespace.useEffect(function () {
362
362
  if (deps.filter(function (dep) {
363
363
  return dep !== null;
@@ -634,7 +634,11 @@
634
634
  isOpen = _h[0],
635
635
  setIsOpen = _h[1];
636
636
 
637
- return isOpen && /*#__PURE__*/React__namespace.createElement(material.Alert, {
637
+ if (!isOpen) {
638
+ return null;
639
+ }
640
+
641
+ return /*#__PURE__*/React__namespace.createElement(material.Alert, {
638
642
  "data-testid": dataTestId,
639
643
  severity: severity,
640
644
  icon: /*#__PURE__*/React__namespace.createElement(AlertIcon, {
@@ -755,8 +759,8 @@
755
759
  * See the License for the specific language governing permissions and
756
760
  * limitations under the License.
757
761
  *
758
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
759
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
762
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
763
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
760
764
  * */
761
765
  var styles$5 = {
762
766
  header: function header(theme) {
@@ -767,21 +771,24 @@
767
771
  backgroundColor: theme.palette.geowebColors.brand.brand,
768
772
  color: theme.palette.common.white,
769
773
  boxShadow: theme.shadows[1],
770
- zIndex: 1000
771
- }, _a[theme.breakpoints.down('sm')] = {
772
- padding: '0 8px'
773
- }, _a[theme.breakpoints.up('sm')] = {
774
+ zIndex: 1000,
775
+ padding: '0 16px'
776
+ }, _a[theme.breakpoints.up('md')] = {
774
777
  padding: '0 24px'
775
778
  }, _a;
776
779
  },
777
780
  title: {
778
- marginLeft: 1,
779
- fontSize: '1.25rem',
780
- fontWeight: 400,
781
+ fontSize: '20px',
782
+ fontWeight: 500,
783
+ fontStretch: 'normal',
784
+ fontStyle: 'normal',
785
+ lineHeight: 'normal',
786
+ letterSpacing: '0.15px',
781
787
  overflow: 'hidden',
782
788
  whiteSpace: 'nowrap',
783
789
  textOverflow: 'ellipsis',
784
- letterSpacing: '0.15px'
790
+ color: 'geowebColors.typographyAndIcons.text',
791
+ marginLeft: 1
785
792
  },
786
793
  container: {
787
794
  height: '100%'
@@ -802,27 +809,35 @@
802
809
  alignItems: "center"
803
810
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
804
811
  item: true,
805
- xs: 1,
806
- sm: 3
807
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
808
- container: true,
809
- justifyContent: "flex-start"
810
- }, menu)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
811
- item: true,
812
- xs: 10,
812
+ xs: 6,
813
813
  sm: 6
814
814
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
815
815
  container: true,
816
- justifyContent: "center",
817
816
  alignItems: "center",
818
- wrap: "nowrap"
819
- }, /*#__PURE__*/React__default["default"].createElement(theme.GeoWebLogo, null), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
817
+ wrap: "nowrap",
818
+ sx: {
819
+ button: {
820
+ marginLeft: 4,
821
+ color: 'geowebColors.typographyAndIcons.text'
822
+ }
823
+ }
824
+ }, /*#__PURE__*/React__default["default"].createElement(material.Box, {
825
+ sx: {
826
+ display: 'flex'
827
+ }
828
+ }, /*#__PURE__*/React__default["default"].createElement(theme.GeoWebLogo, {
829
+ style: {
830
+ position: 'relative',
831
+ top: '-1px',
832
+ right: '-1px'
833
+ }
834
+ })), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
820
835
  variant: "h1",
821
836
  sx: styles$5.title
822
- }, title))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
837
+ }, title), menu)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
823
838
  item: true,
824
- xs: 1,
825
- sm: 3,
839
+ xs: 6,
840
+ sm: 6,
826
841
  container: true,
827
842
  justifyContent: "flex-end"
828
843
  }, userMenu)));
@@ -876,15 +891,13 @@
876
891
  var ResizeComponent = function ResizeComponent(_a) {
877
892
  var _b = _a.startPosition,
878
893
  startPosition = _b === void 0 ? {
879
- left: null,
880
- right: null,
881
- top: null
894
+ left: undefined,
895
+ right: undefined,
896
+ top: undefined
882
897
  } : _b,
883
898
  children = _a.children,
884
899
  _c = _a.onResizeStart,
885
- onResizeStart = _c === void 0 ? function () {
886
- return null;
887
- } : _c,
900
+ onResizeStart = _c === void 0 ? function () {} : _c,
888
901
  size = _a.size,
889
902
  setSize = _a.setSize,
890
903
  _d = _a.minHeight,
@@ -970,8 +983,8 @@
970
983
  var _this = _super.call(this, props) || this;
971
984
 
972
985
  _this.state = {
973
- error: null,
974
- errorInfo: null
986
+ error: undefined,
987
+ errorInfo: undefined
975
988
  };
976
989
  return _this;
977
990
  }
@@ -1024,9 +1037,7 @@
1024
1037
  };
1025
1038
 
1026
1039
  ErrorBoundary.defaultProps = {
1027
- onError: function onError() {
1028
- return null;
1029
- }
1040
+ onError: function onError() {}
1030
1041
  };
1031
1042
  return ErrorBoundary;
1032
1043
  }(React__namespace.Component);
@@ -1037,11 +1048,7 @@
1037
1048
  width: 16,
1038
1049
  fontSize: '0.5rem'
1039
1050
  },
1040
- large: {
1041
- height: 32,
1042
- width: 32,
1043
- fontSize: '0.938rem'
1044
- }
1051
+ large: {}
1045
1052
  };
1046
1053
 
1047
1054
  var Avatar = function Avatar(_a) {
@@ -1050,13 +1057,7 @@
1050
1057
  size = _b === void 0 ? 'large' : _b;
1051
1058
  return /*#__PURE__*/React__namespace.createElement(material.Avatar, {
1052
1059
  "data-testid": "avatar",
1053
- sx: __assign(__assign({}, styles$4[size]), {
1054
- fontWeight: 500,
1055
- color: 'geowebColors.brand.brand',
1056
- backgroundColor: 'common.white',
1057
- border: '0.1px solid',
1058
- borderColor: 'geowebColors.brand.brand'
1059
- })
1060
+ sx: __assign({}, styles$4[size])
1060
1061
  }, children);
1061
1062
  };
1062
1063
 
@@ -1096,8 +1097,13 @@
1096
1097
  }
1097
1098
  },
1098
1099
  button: {
1099
- color: 'common.white',
1100
- padding: 0
1100
+ padding: 0,
1101
+ border: 'none',
1102
+ background: 'transparent',
1103
+ '&:hover': {
1104
+ border: 'none',
1105
+ background: 'transparent'
1106
+ }
1101
1107
  }
1102
1108
  };
1103
1109
 
@@ -1105,13 +1111,9 @@
1105
1111
  var _b = _a.isOpen,
1106
1112
  isOpen = _b === void 0 ? false : _b,
1107
1113
  _c = _a.onToggle,
1108
- onToggle = _c === void 0 ? function () {
1109
- return null;
1110
- } : _c,
1114
+ onToggle = _c === void 0 ? function () {} : _c,
1111
1115
  _d = _a.onClose,
1112
- onClose = _d === void 0 ? function () {
1113
- return null;
1114
- } : _d,
1116
+ onClose = _d === void 0 ? function () {} : _d,
1115
1117
  children = _a.children,
1116
1118
  initials = _a.initials;
1117
1119
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
@@ -1221,8 +1223,8 @@
1221
1223
  * See the License for the specific language governing permissions and
1222
1224
  * limitations under the License.
1223
1225
  *
1224
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1225
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
1226
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1227
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
1226
1228
  * */
1227
1229
 
1228
1230
  var getStyle = function getStyle(size) {
@@ -1482,27 +1484,21 @@
1482
1484
  } : _d,
1483
1485
  _e = _a.startPosition,
1484
1486
  startPosition = _e === void 0 ? {
1485
- left: null,
1486
- right: null,
1487
- top: null
1487
+ left: undefined,
1488
+ right: undefined,
1489
+ top: undefined
1488
1490
  } : _e,
1489
1491
  children = _a.children,
1490
1492
  _f = _a.isOpen,
1491
1493
  isOpen = _f === void 0 ? true : _f,
1492
1494
  _g = _a.onClose,
1493
- onClose = _g === void 0 ? function () {
1494
- return null;
1495
- } : _g,
1495
+ onClose = _g === void 0 ? function () {} : _g,
1496
1496
  _h = _a.initialMaxHeight,
1497
1497
  defaultInitialMaxHeight = _h === void 0 ? 'initial' : _h,
1498
1498
  _j = _a.onChangeSize,
1499
- onChangeSize = _j === void 0 ? function () {
1500
- return null;
1501
- } : _j,
1499
+ onChangeSize = _j === void 0 ? function () {} : _j,
1502
1500
  _k = _a.onMouseDown,
1503
- onMouseDown = _k === void 0 ? function () {
1504
- return null;
1505
- } : _k,
1501
+ onMouseDown = _k === void 0 ? function () {} : _k,
1506
1502
  _l = _a.order,
1507
1503
  order = _l === void 0 ? 1 : _l,
1508
1504
  _m = _a.source,
@@ -2313,11 +2309,11 @@
2313
2309
  transition: 'none'
2314
2310
  }
2315
2311
  },
2316
- MenuListProps: children && {
2312
+ MenuListProps: __assign({}, children && {
2317
2313
  style: {
2318
2314
  padding: '0px'
2319
2315
  }
2320
- }
2316
+ })
2321
2317
  }, menuItems && menuItems.map(function (menuItem) {
2322
2318
  var text = menuItem.text,
2323
2319
  icon = menuItem.icon,
@@ -2664,7 +2660,7 @@
2664
2660
  title: tooltip,
2665
2661
  placement: "top",
2666
2662
  open: tooltipOpen,
2667
- sx: noStyling ? undefined : tooltipContainerStyles(isEnabled, hasBackgroundColor)
2663
+ sx: noStyling ? undefined : tooltipContainerStyles(!!isEnabled, hasBackgroundColor)
2668
2664
  }, /*#__PURE__*/React__namespace.createElement(material.Select, __assign({
2669
2665
  onOpen: onOpen,
2670
2666
  onClose: onClose,
@@ -6,8 +6,20 @@ export default _default;
6
6
  export declare const AppHeaderDark: {
7
7
  (): React.ReactElement;
8
8
  storyName: string;
9
+ parameters: {
10
+ zeplinLink: {
11
+ name: string;
12
+ link: string;
13
+ }[];
14
+ };
9
15
  };
10
16
  export declare const AppHeaderLight: {
11
17
  (): React.ReactElement;
12
18
  storyName: string;
19
+ parameters: {
20
+ zeplinLink: {
21
+ name: string;
22
+ link: string;
23
+ }[];
24
+ };
13
25
  };
@@ -5,9 +5,25 @@ declare const _default: {
5
5
  export default _default;
6
6
  export declare const AvatarLight: {
7
7
  (): React.ReactElement;
8
- storyName: string;
8
+ story: {
9
+ name: string;
10
+ parameters: {
11
+ zeplinLink: {
12
+ name: string;
13
+ link: string;
14
+ }[];
15
+ };
16
+ };
9
17
  };
10
18
  export declare const AvatarDark: {
11
19
  (): React.ReactElement;
12
- storyName: string;
20
+ story: {
21
+ name: string;
22
+ parameters: {
23
+ zeplinLink: {
24
+ name: string;
25
+ link: string;
26
+ }[];
27
+ };
28
+ };
13
29
  };
@@ -8,5 +8,21 @@ interface ToolContainerDemoProps {
8
8
  isSnapShot?: boolean;
9
9
  }
10
10
  export declare const ToolContainerDemo: React.FC<ToolContainerDemoProps>;
11
- export declare const ThemeLight: () => React.ReactElement;
12
- export declare const ThemeDark: () => React.ReactElement;
11
+ export declare const ThemeLight: {
12
+ (): React.ReactElement;
13
+ parameters: {
14
+ zeplinLink: {
15
+ name: string;
16
+ link: string;
17
+ }[];
18
+ };
19
+ };
20
+ export declare const ThemeDark: {
21
+ (): React.ReactElement;
22
+ parameters: {
23
+ zeplinLink: {
24
+ name: string;
25
+ link: string;
26
+ }[];
27
+ };
28
+ };
@@ -3,8 +3,21 @@ declare const _default: {
3
3
  title: string;
4
4
  };
5
5
  export default _default;
6
- interface DemoStoryProps {
7
- linkToZeplinDesign?: string;
8
- }
9
- export declare const ThemeLight: React.FC<DemoStoryProps>;
10
- export declare const ThemeDark: React.FC<DemoStoryProps>;
6
+ export declare const ThemeLight: {
7
+ (): React.ReactElement;
8
+ parameters: {
9
+ zeplinLink: {
10
+ name: string;
11
+ link: string;
12
+ }[];
13
+ };
14
+ };
15
+ export declare const ThemeDark: {
16
+ (): React.ReactElement;
17
+ parameters: {
18
+ zeplinLink: {
19
+ name: string;
20
+ link: string;
21
+ }[];
22
+ };
23
+ };
@@ -3,8 +3,24 @@ declare const _default: {
3
3
  title: string;
4
4
  };
5
5
  export default _default;
6
- export declare const ThemeLight: () => React.ReactElement;
7
- export declare const ThemeDark: () => React.ReactElement;
6
+ export declare const ThemeLight: {
7
+ (): React.ReactElement;
8
+ parameters: {
9
+ zeplinLink: {
10
+ name: string;
11
+ link: string;
12
+ }[];
13
+ };
14
+ };
15
+ export declare const ThemeDark: {
16
+ (): React.ReactElement;
17
+ parameters: {
18
+ zeplinLink: {
19
+ name: string;
20
+ link: string;
21
+ }[];
22
+ };
23
+ };
8
24
  export declare const ThemeLightSnapShot: {
9
25
  (): React.ReactElement;
10
26
  storyName: string;
@@ -1,2 +1,2 @@
1
1
  import * as React from 'react';
2
- export declare const usePoller: (deps: unknown[], callback: () => void, pollingInterval?: number) => React.MutableRefObject<number>;
2
+ export declare const usePoller: (deps: unknown[], callback: () => void, pollingInterval?: number) => React.RefObject<ReturnType<typeof setTimeout>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -14,11 +14,11 @@
14
14
  "peerDependencies": {
15
15
  "react": "^17.0.2",
16
16
  "@mui/material": "^5.2.8",
17
- "@opengeoweb/theme": "4.0.0",
17
+ "@opengeoweb/theme": "4.2.0",
18
18
  "react-draggable": "^4.4.3",
19
19
  "re-resizable": "^6.9.0",
20
20
  "lodash": "^4.17.20",
21
- "@opengeoweb/form-fields": "4.0.0",
21
+ "@opengeoweb/form-fields": "4.2.0",
22
22
  "react-hook-form": "^6.12.1",
23
23
  "moment": "^2.29.0",
24
24
  "moment-timezone": "^0.5.31",