@opengeoweb/shared 4.19.1 → 4.21.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 +204 -129
- package/index.umd.js +233 -140
- package/lib/components/CustomIconButton/CustomIconButton.d.ts +4 -1
- package/lib/components/SearchHighlight/SearchHighlight.d.ts +7 -0
- package/lib/components/{ToolButton/ToolButton.stories.d.ts → SearchHighlight/SearchHighlight.stories.d.ts} +2 -2
- package/lib/components/SearchHighlight/index.d.ts +1 -0
- package/lib/components/ToggleMenu/ToggleMenu.d.ts +2 -2
- package/lib/components/ToolContainer/ToolContainerDraggable.d.ts +2 -0
- package/lib/components/ToolContainer/types.d.ts +2 -0
- package/lib/components/index.d.ts +1 -1
- package/package.json +4 -3
- package/lib/components/ToolButton/ToolButton.d.ts +0 -12
- package/lib/components/ToolButton/index.d.ts +0 -1
- /package/lib/components/{ToolButton/ToolButton.spec.d.ts → SearchHighlight/SearchHighlight.spec.d.ts} +0 -0
package/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useRef } from 'react';
|
|
3
|
-
import { Box, Typography, Tooltip, IconButton, Dialog, DialogTitle, DialogContent, DialogActions, Button, CircularProgress, Alert, AlertTitle, useTheme, Link, Avatar as Avatar$1, Paper, ClickAwayListener, MenuList, MenuItem, Grid, RadioGroup, FormControlLabel, Radio, List, ListItem, Tabs, Tab, Backdrop, Slider, ToggleButton, Menu, ListSubheader, ListItemIcon, Select, Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
|
|
4
|
-
import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, Resize, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, ChevronDown } from '@opengeoweb/theme';
|
|
5
|
-
import { throttle } from 'lodash';
|
|
3
|
+
import { Box, Typography, Tooltip, IconButton, Dialog, DialogTitle, DialogContent, DialogActions, Button, CircularProgress, Alert, AlertTitle, useTheme, Drawer, Link, Avatar as Avatar$1, Paper, ClickAwayListener, MenuList, MenuItem, Grid, RadioGroup, FormControlLabel, Radio, List, ListItem, Tabs, Tab, Backdrop, Slider, ToggleButton, Menu, ListSubheader, ListItemIcon, Select, Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
|
|
4
|
+
import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Resize, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, ChevronDown } from '@opengeoweb/theme';
|
|
5
|
+
import { throttle, escapeRegExp } from 'lodash';
|
|
6
6
|
import Draggable from 'react-draggable';
|
|
7
7
|
import { Resizable } from 're-resizable';
|
|
8
8
|
import { useStore } from 'react-redux';
|
|
@@ -54,8 +54,8 @@ var borderColors = {
|
|
|
54
54
|
|
|
55
55
|
var tagStyle = function tagStyle(color) {
|
|
56
56
|
// Set color to grey for summary
|
|
57
|
-
var backgroundColor = bgColors[color];
|
|
58
|
-
var borderColor = borderColors[color];
|
|
57
|
+
var backgroundColor = Object.assign({}, bgColors)[color];
|
|
58
|
+
var borderColor = Object.assign({}, borderColors)[color];
|
|
59
59
|
return {
|
|
60
60
|
backgroundColor: backgroundColor,
|
|
61
61
|
m: 0,
|
|
@@ -316,7 +316,7 @@ var CustomTooltip = function CustomTooltip(props) {
|
|
|
316
316
|
|
|
317
317
|
var CustomIconButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
318
318
|
var _a$tooltipTitle = _a.tooltipTitle,
|
|
319
|
-
|
|
319
|
+
defaultTooltipTitle = _a$tooltipTitle === void 0 ? '' : _a$tooltipTitle,
|
|
320
320
|
_a$variant = _a.variant,
|
|
321
321
|
variant = _a$variant === void 0 ? 'flat' : _a$variant,
|
|
322
322
|
_a$isSelected = _a.isSelected,
|
|
@@ -327,9 +327,18 @@ var CustomIconButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
327
327
|
size = _a$size === void 0 ? 'small' : _a$size,
|
|
328
328
|
children = _a.children,
|
|
329
329
|
className = _a.className,
|
|
330
|
-
|
|
330
|
+
defaultTooltipProps = _a.tooltipProps,
|
|
331
|
+
props = __rest(_a, ["tooltipTitle", "variant", "isSelected", "shouldShowAsDisabled", "size", "children", "className", "tooltipProps"]);
|
|
331
332
|
|
|
332
333
|
var classNames = [].concat(_toConsumableArray(className ? [className] : []), _toConsumableArray(isSelected ? ['Mui-selected'] : []), [variant]).join(' ');
|
|
334
|
+
var tooltipTitle = (defaultTooltipProps === null || defaultTooltipProps === void 0 ? void 0 : defaultTooltipProps.title) || defaultTooltipTitle;
|
|
335
|
+
var tooltipProps = Object.assign(Object.assign({}, defaultTooltipProps), {
|
|
336
|
+
title: tooltipTitle,
|
|
337
|
+
placement: (defaultTooltipProps === null || defaultTooltipProps === void 0 ? void 0 : defaultTooltipProps.placement) || 'top',
|
|
338
|
+
sx: {
|
|
339
|
+
pointerEvents: 'none'
|
|
340
|
+
}
|
|
341
|
+
});
|
|
333
342
|
|
|
334
343
|
var renderIconButton = function renderIconButton() {
|
|
335
344
|
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
@@ -349,13 +358,7 @@ var CustomIconButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
349
358
|
}), children);
|
|
350
359
|
};
|
|
351
360
|
|
|
352
|
-
return tooltipTitle ? /*#__PURE__*/React.createElement(CustomTooltip, {
|
|
353
|
-
title: tooltipTitle,
|
|
354
|
-
placement: "top",
|
|
355
|
-
sx: {
|
|
356
|
-
pointerEvents: 'none'
|
|
357
|
-
}
|
|
358
|
-
}, renderIconButton()) : renderIconButton();
|
|
361
|
+
return tooltipTitle && !props.disabled ? /*#__PURE__*/React.createElement(CustomTooltip, Object.assign({}, tooltipProps), renderIconButton()) : renderIconButton();
|
|
359
362
|
});
|
|
360
363
|
|
|
361
364
|
var CustomDialog = function CustomDialog(_a) {
|
|
@@ -798,7 +801,14 @@ var useDialogActions = function useDialogActions(awaitingPromiseRef) {
|
|
|
798
801
|
};
|
|
799
802
|
var ConfirmationServiceProvider = function ConfirmationServiceProvider(_ref) {
|
|
800
803
|
var children = _ref.children;
|
|
801
|
-
var awaitingPromiseRef = React.useRef(
|
|
804
|
+
var awaitingPromiseRef = React.useRef({
|
|
805
|
+
resolve: function resolve() {
|
|
806
|
+
return Promise.resolve();
|
|
807
|
+
},
|
|
808
|
+
reject: function reject() {
|
|
809
|
+
return Promise.reject();
|
|
810
|
+
}
|
|
811
|
+
});
|
|
802
812
|
|
|
803
813
|
var _useDialogActions = useDialogActions(awaitingPromiseRef),
|
|
804
814
|
openConfirmation = _useDialogActions.openConfirmation,
|
|
@@ -1006,9 +1016,38 @@ var AppLayout = function AppLayout(_ref) {
|
|
|
1006
1016
|
}, children));
|
|
1007
1017
|
};
|
|
1008
1018
|
|
|
1009
|
-
var
|
|
1010
|
-
|
|
1011
|
-
|
|
1019
|
+
var AppHeader = function AppHeader(_ref) {
|
|
1020
|
+
var _sx;
|
|
1021
|
+
|
|
1022
|
+
var menu = _ref.menu,
|
|
1023
|
+
userMenu = _ref.userMenu,
|
|
1024
|
+
workspaceTopBar = _ref.workspaceTopBar,
|
|
1025
|
+
_ref$title = _ref.title,
|
|
1026
|
+
title = _ref$title === void 0 ? 'GeoWeb' : _ref$title,
|
|
1027
|
+
onClick = _ref.onClick;
|
|
1028
|
+
var theme = useTheme();
|
|
1029
|
+
|
|
1030
|
+
var _React$useState = React__default.useState(false),
|
|
1031
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1032
|
+
isDrawerOpen = _React$useState2[0],
|
|
1033
|
+
toggleDrawer = _React$useState2[1];
|
|
1034
|
+
|
|
1035
|
+
var onToggleDrawer = function onToggleDrawer(isOpen) {
|
|
1036
|
+
return toggleDrawer(isOpen);
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
var onKeyDown = function onKeyDown(event) {
|
|
1040
|
+
if (event.key === 'Tab' || event.key === 'Shift') {
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
toggleDrawer(false);
|
|
1045
|
+
};
|
|
1046
|
+
|
|
1047
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1048
|
+
component: "header",
|
|
1049
|
+
role: "heading",
|
|
1050
|
+
sx: (_sx = {
|
|
1012
1051
|
height: 40,
|
|
1013
1052
|
backgroundColor: theme.palette.geowebColors.brand.brand,
|
|
1014
1053
|
color: theme.palette.common.white,
|
|
@@ -1016,38 +1055,21 @@ var styles$5 = {
|
|
|
1016
1055
|
zIndex: 1000,
|
|
1017
1056
|
display: 'flex',
|
|
1018
1057
|
padding: '0 16px'
|
|
1019
|
-
}, theme.breakpoints.up('md'), {
|
|
1058
|
+
}, _defineProperty(_sx, theme.breakpoints.up('md'), {
|
|
1020
1059
|
padding: '0 24px'
|
|
1021
|
-
})
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
marginLeft: 1
|
|
1035
|
-
},
|
|
1036
|
-
container: {
|
|
1037
|
-
height: '100%'
|
|
1038
|
-
}
|
|
1039
|
-
};
|
|
1040
|
-
|
|
1041
|
-
var AppHeader = function AppHeader(_ref2) {
|
|
1042
|
-
var menu = _ref2.menu,
|
|
1043
|
-
userMenu = _ref2.userMenu,
|
|
1044
|
-
workspaceTopBar = _ref2.workspaceTopBar,
|
|
1045
|
-
_ref2$title = _ref2.title,
|
|
1046
|
-
title = _ref2$title === void 0 ? 'GeoWeb' : _ref2$title,
|
|
1047
|
-
onClick = _ref2.onClick;
|
|
1048
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1049
|
-
component: "header",
|
|
1050
|
-
sx: styles$5.header
|
|
1060
|
+
}), _defineProperty(_sx, theme.breakpoints.up('sm'), {
|
|
1061
|
+
'.workspace-topbar': {
|
|
1062
|
+
marginLeft: 3,
|
|
1063
|
+
maxWidth: 260
|
|
1064
|
+
},
|
|
1065
|
+
'.hamburger-btn': {
|
|
1066
|
+
marginLeft: 4
|
|
1067
|
+
},
|
|
1068
|
+
h1: {
|
|
1069
|
+
maxWidth: 'initial',
|
|
1070
|
+
display: 'block'
|
|
1071
|
+
}
|
|
1072
|
+
}), _sx)
|
|
1051
1073
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
1052
1074
|
onClick: onClick,
|
|
1053
1075
|
sx: {
|
|
@@ -1063,24 +1085,71 @@ var AppHeader = function AppHeader(_ref2) {
|
|
|
1063
1085
|
}
|
|
1064
1086
|
}), /*#__PURE__*/React__default.createElement(Typography, {
|
|
1065
1087
|
variant: "h1",
|
|
1066
|
-
sx: styles$5.title
|
|
1067
|
-
}, title)), /*#__PURE__*/React__default.createElement(Box, {
|
|
1068
1088
|
sx: {
|
|
1069
|
-
|
|
1089
|
+
display: 'none',
|
|
1090
|
+
fontSize: '20px',
|
|
1091
|
+
fontWeight: 500,
|
|
1092
|
+
fontStretch: 'normal',
|
|
1093
|
+
fontStyle: 'normal',
|
|
1094
|
+
lineHeight: 'normal',
|
|
1095
|
+
letterSpacing: '0.15px',
|
|
1096
|
+
overflow: 'hidden',
|
|
1097
|
+
whiteSpace: 'nowrap',
|
|
1098
|
+
textOverflow: 'ellipsis',
|
|
1099
|
+
color: 'geowebColors.typographyAndIcons.text',
|
|
1100
|
+
marginLeft: 1,
|
|
1101
|
+
maxWidth: 130
|
|
1102
|
+
}
|
|
1103
|
+
}, title)), menu && /*#__PURE__*/React__default.createElement(Box, {
|
|
1104
|
+
className: "hamburger-btn",
|
|
1105
|
+
sx: {
|
|
1070
1106
|
display: 'flex',
|
|
1071
|
-
|
|
1072
|
-
|
|
1107
|
+
alignItems: 'center',
|
|
1108
|
+
marginLeft: 1
|
|
1073
1109
|
}
|
|
1074
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1110
|
+
}, /*#__PURE__*/React__default.createElement(CustomIconButton, {
|
|
1111
|
+
"data-testid": "menuButton",
|
|
1112
|
+
onClick: function onClick() {
|
|
1113
|
+
return onToggleDrawer(true);
|
|
1114
|
+
},
|
|
1115
|
+
isSelected: isDrawerOpen
|
|
1116
|
+
}, /*#__PURE__*/React__default.createElement(HamburgerMenu, null)), /*#__PURE__*/React__default.createElement(Drawer, {
|
|
1117
|
+
"data-testid": "app-drawer",
|
|
1118
|
+
anchor: "left",
|
|
1119
|
+
open: isDrawerOpen,
|
|
1120
|
+
onClose: function onClose() {
|
|
1121
|
+
return onToggleDrawer(false);
|
|
1122
|
+
},
|
|
1123
|
+
onClick: function onClick() {
|
|
1124
|
+
return onToggleDrawer(false);
|
|
1125
|
+
},
|
|
1126
|
+
onKeyDown: onKeyDown,
|
|
1075
1127
|
sx: {
|
|
1076
|
-
|
|
1077
|
-
|
|
1128
|
+
'& .MuiDrawer-paper': {
|
|
1129
|
+
top: '40px'
|
|
1078
1130
|
}
|
|
1079
1131
|
}
|
|
1080
|
-
},
|
|
1132
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
1133
|
+
role: "presentation",
|
|
1134
|
+
sx: {
|
|
1135
|
+
width: '250px',
|
|
1136
|
+
overflowY: 'auto'
|
|
1137
|
+
}
|
|
1138
|
+
}, menu))), /*#__PURE__*/React__default.createElement(Box, {
|
|
1139
|
+
className: "workspace-topbar",
|
|
1081
1140
|
sx: {
|
|
1141
|
+
flexGrow: 1,
|
|
1082
1142
|
display: 'flex',
|
|
1083
|
-
|
|
1143
|
+
marginLeft: 1,
|
|
1144
|
+
alignItems: 'center',
|
|
1145
|
+
maxWidth: 168
|
|
1146
|
+
}
|
|
1147
|
+
}, workspaceTopBar), /*#__PURE__*/React__default.createElement(Box, {
|
|
1148
|
+
sx: {
|
|
1149
|
+
display: 'flex',
|
|
1150
|
+
alignItems: 'center',
|
|
1151
|
+
flexGrow: 1,
|
|
1152
|
+
justifyContent: 'flex-end'
|
|
1084
1153
|
}
|
|
1085
1154
|
}, userMenu));
|
|
1086
1155
|
};
|
|
@@ -1564,7 +1633,13 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
1564
1633
|
_ref$leftHeaderCompon = _ref.leftHeaderComponent,
|
|
1565
1634
|
leftHeaderComponent = _ref$leftHeaderCompon === void 0 ? null : _ref$leftHeaderCompon,
|
|
1566
1635
|
_ref$rightHeaderCompo = _ref.rightHeaderComponent,
|
|
1567
|
-
rightHeaderComponent = _ref$rightHeaderCompo === void 0 ? null : _ref$rightHeaderCompo
|
|
1636
|
+
rightHeaderComponent = _ref$rightHeaderCompo === void 0 ? null : _ref$rightHeaderCompo,
|
|
1637
|
+
_ref$dragHandleIcon = _ref.dragHandleIcon,
|
|
1638
|
+
dragHandleIcon = _ref$dragHandleIcon === void 0 ? /*#__PURE__*/React__default.createElement(DragHandle, null) : _ref$dragHandleIcon,
|
|
1639
|
+
_ref$closeIcon = _ref.closeIcon,
|
|
1640
|
+
closeIcon = _ref$closeIcon === void 0 ? /*#__PURE__*/React__default.createElement(Close, {
|
|
1641
|
+
"data-testid": "CloseIcon"
|
|
1642
|
+
}) : _ref$closeIcon;
|
|
1568
1643
|
var styles = getStyle(size);
|
|
1569
1644
|
var columnSizeIcon = leftHeaderComponent || rightHeaderComponent ? 4 : 1;
|
|
1570
1645
|
var columnSizeTitle = leftHeaderComponent || rightHeaderComponent ? 4 : 10;
|
|
@@ -1601,7 +1676,7 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
1601
1676
|
pointerEvents: 'none',
|
|
1602
1677
|
'&.MuiIconButton-root': iconStyle
|
|
1603
1678
|
}
|
|
1604
|
-
},
|
|
1679
|
+
}, dragHandleIcon)), leftHeaderComponent && leftHeaderComponent), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1605
1680
|
className: "header-title",
|
|
1606
1681
|
item: true,
|
|
1607
1682
|
xs: columnSizeTitle
|
|
@@ -1626,7 +1701,7 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
1626
1701
|
height: 12
|
|
1627
1702
|
})
|
|
1628
1703
|
}
|
|
1629
|
-
},
|
|
1704
|
+
}, dragHandleIcon))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1630
1705
|
className: "header-right",
|
|
1631
1706
|
item: true,
|
|
1632
1707
|
xs: columnSizeIcon,
|
|
@@ -1645,9 +1720,7 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
1645
1720
|
sx: {
|
|
1646
1721
|
'&.MuiButtonBase-root.MuiIconButton-root': iconStyle
|
|
1647
1722
|
}
|
|
1648
|
-
},
|
|
1649
|
-
"data-testid": "CloseIcon"
|
|
1650
|
-
}))))));
|
|
1723
|
+
}, closeIcon)))));
|
|
1651
1724
|
};
|
|
1652
1725
|
|
|
1653
1726
|
/* *
|
|
@@ -1703,7 +1776,9 @@ var ToolContainer = function ToolContainer(_a) {
|
|
|
1703
1776
|
leftHeaderComponent = _a$leftHeaderComponen === void 0 ? null : _a$leftHeaderComponen,
|
|
1704
1777
|
_a$rightHeaderCompone = _a.rightHeaderComponent,
|
|
1705
1778
|
rightHeaderComponent = _a$rightHeaderCompone === void 0 ? null : _a$rightHeaderCompone,
|
|
1706
|
-
|
|
1779
|
+
dragHandleIcon = _a.dragHandleIcon,
|
|
1780
|
+
closeIcon = _a.closeIcon,
|
|
1781
|
+
props = __rest(_a, ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon"]);
|
|
1707
1782
|
|
|
1708
1783
|
return /*#__PURE__*/React__default.createElement(Paper, Object.assign({
|
|
1709
1784
|
elevation: elevation,
|
|
@@ -1715,7 +1790,9 @@ var ToolContainer = function ToolContainer(_a) {
|
|
|
1715
1790
|
onClose: onClose,
|
|
1716
1791
|
className: headerClassName,
|
|
1717
1792
|
leftHeaderComponent: leftHeaderComponent,
|
|
1718
|
-
rightHeaderComponent: rightHeaderComponent
|
|
1793
|
+
rightHeaderComponent: rightHeaderComponent,
|
|
1794
|
+
dragHandleIcon: dragHandleIcon,
|
|
1795
|
+
closeIcon: closeIcon
|
|
1719
1796
|
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
1720
1797
|
sx: styles$2.content,
|
|
1721
1798
|
style: {
|
|
@@ -1954,10 +2031,12 @@ var DraggableComponent = function DraggableComponent(_a) {
|
|
|
1954
2031
|
leftHeaderComponent = _a$leftHeaderComponen === void 0 ? null : _a$leftHeaderComponen,
|
|
1955
2032
|
_a$rightHeaderCompone = _a.rightHeaderComponent,
|
|
1956
2033
|
rightHeaderComponent = _a$rightHeaderCompone === void 0 ? null : _a$rightHeaderCompone,
|
|
2034
|
+
dragHandleIcon = _a.dragHandleIcon,
|
|
2035
|
+
closeIcon = _a.closeIcon,
|
|
1957
2036
|
className = _a.className,
|
|
1958
2037
|
_a$sx = _a.sx,
|
|
1959
2038
|
sx = _a$sx === void 0 ? {} : _a$sx,
|
|
1960
|
-
props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "onFocus", "onBlur", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
|
|
2039
|
+
props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "onFocus", "onBlur", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon", "className", "sx"]);
|
|
1961
2040
|
|
|
1962
2041
|
var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
|
|
1963
2042
|
var elevation = BASE_ELEVATION + order;
|
|
@@ -2002,7 +2081,8 @@ var DraggableComponent = function DraggableComponent(_a) {
|
|
|
2002
2081
|
});
|
|
2003
2082
|
var newPos = calculateNewPosition(position, isRightAligned, handle, delta); // eslint-disable-next-line no-param-reassign
|
|
2004
2083
|
|
|
2005
|
-
|
|
2084
|
+
var parent = node.parentNode;
|
|
2085
|
+
parent.style.transform = "translate(".concat(newPos.x, "px, ").concat(newPos.y, "px)");
|
|
2006
2086
|
}, [onChangeSize, position, isRightAligned]);
|
|
2007
2087
|
|
|
2008
2088
|
var onStopResize = function onStopResize(_event, direction, node, delta) {
|
|
@@ -2063,6 +2143,8 @@ var DraggableComponent = function DraggableComponent(_a) {
|
|
|
2063
2143
|
headerClassName: headerClassName,
|
|
2064
2144
|
leftHeaderComponent: leftHeaderComponent,
|
|
2065
2145
|
rightHeaderComponent: rightHeaderComponent,
|
|
2146
|
+
dragHandleIcon: dragHandleIcon,
|
|
2147
|
+
closeIcon: closeIcon,
|
|
2066
2148
|
className: className
|
|
2067
2149
|
}, children)))) : null;
|
|
2068
2150
|
};
|
|
@@ -2661,55 +2743,6 @@ var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
2661
2743
|
}, props));
|
|
2662
2744
|
});
|
|
2663
2745
|
|
|
2664
|
-
/* *
|
|
2665
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2666
|
-
* you may not use this file except in compliance with the License.
|
|
2667
|
-
* You may obtain a copy of the License at
|
|
2668
|
-
*
|
|
2669
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2670
|
-
*
|
|
2671
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2672
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2673
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2674
|
-
* See the License for the specific language governing permissions and
|
|
2675
|
-
* limitations under the License.
|
|
2676
|
-
*
|
|
2677
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2678
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2679
|
-
* */
|
|
2680
|
-
var ToolButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
2681
|
-
var active = _a.active,
|
|
2682
|
-
_a$width = _a.width,
|
|
2683
|
-
width = _a$width === void 0 ? '24px' : _a$width,
|
|
2684
|
-
_a$height = _a.height,
|
|
2685
|
-
height = _a$height === void 0 ? '24px' : _a$height,
|
|
2686
|
-
children = _a.children,
|
|
2687
|
-
_a$value = _a.value,
|
|
2688
|
-
value = _a$value === void 0 ? 0 : _a$value,
|
|
2689
|
-
_a$sx = _a.sx,
|
|
2690
|
-
sx = _a$sx === void 0 ? {} : _a$sx,
|
|
2691
|
-
_a$variant = _a.variant,
|
|
2692
|
-
variant = _a$variant === void 0 ? 'tool' : _a$variant,
|
|
2693
|
-
props = __rest(_a, ["active", "width", "height", "children", "value", "sx", "variant"]);
|
|
2694
|
-
|
|
2695
|
-
return /*#__PURE__*/React.createElement(CustomToggleButton, Object.assign({
|
|
2696
|
-
ref: ref,
|
|
2697
|
-
variant: variant,
|
|
2698
|
-
disableRipple: true,
|
|
2699
|
-
selected: active,
|
|
2700
|
-
value: value,
|
|
2701
|
-
sx: Object.assign({
|
|
2702
|
-
width: "".concat(width, "!important"),
|
|
2703
|
-
height: "".concat(height, "!important"),
|
|
2704
|
-
textTransform: 'none!important',
|
|
2705
|
-
padding: '11px!important',
|
|
2706
|
-
'& .MuiSvgIcon-root': {
|
|
2707
|
-
marginRight: '0px!important'
|
|
2708
|
-
}
|
|
2709
|
-
}, sx)
|
|
2710
|
-
}, props), children);
|
|
2711
|
-
});
|
|
2712
|
-
|
|
2713
2746
|
var getPosition = function getPosition(menuPosition) {
|
|
2714
2747
|
switch (menuPosition) {
|
|
2715
2748
|
case 'bottom':
|
|
@@ -2762,7 +2795,8 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
2762
2795
|
tooltipTitle = _ref$tooltipTitle === void 0 ? '' : _ref$tooltipTitle,
|
|
2763
2796
|
_ref$menuTitle = _ref.menuTitle,
|
|
2764
2797
|
menuTitle = _ref$menuTitle === void 0 ? '' : _ref$menuTitle,
|
|
2765
|
-
variant = _ref.variant,
|
|
2798
|
+
_ref$variant = _ref.variant,
|
|
2799
|
+
variant = _ref$variant === void 0 ? 'tool' : _ref$variant,
|
|
2766
2800
|
_ref$isDefaultOpen = _ref.isDefaultOpen,
|
|
2767
2801
|
isDefaultOpen = _ref$isDefaultOpen === void 0 ? false : _ref$isDefaultOpen,
|
|
2768
2802
|
_ref$buttonIcon = _ref.buttonIcon,
|
|
@@ -2794,17 +2828,18 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
2794
2828
|
setAnchorEl(document.getElementById(buttonTestId));
|
|
2795
2829
|
}
|
|
2796
2830
|
}, [isDefaultOpen, buttonTestId]);
|
|
2797
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2831
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CustomIconButton, {
|
|
2832
|
+
tooltipProps: {
|
|
2833
|
+
placement: 'top',
|
|
2834
|
+
title: tooltipTitle
|
|
2835
|
+
},
|
|
2836
|
+
isSelected: isOpen,
|
|
2802
2837
|
sx: buttonSx,
|
|
2803
2838
|
onClick: handleClick,
|
|
2804
2839
|
"data-testid": buttonTestId,
|
|
2805
2840
|
variant: variant,
|
|
2806
2841
|
id: buttonTestId
|
|
2807
|
-
}, buttonIcon)
|
|
2842
|
+
}, buttonIcon), /*#__PURE__*/React.createElement(Menu, {
|
|
2808
2843
|
anchorEl: anchorEl,
|
|
2809
2844
|
open: isOpen,
|
|
2810
2845
|
onClose: function onClose(event, reason) {
|
|
@@ -2950,6 +2985,7 @@ var TooltipSelect = function TooltipSelect(_a) {
|
|
|
2950
2985
|
tooltipOpen = _useControlledTooltip2[0],
|
|
2951
2986
|
setTooltipOpen = _useControlledTooltip2[1];
|
|
2952
2987
|
|
|
2988
|
+
var theme = useTheme();
|
|
2953
2989
|
var onWheel = React.useCallback(function (event) {
|
|
2954
2990
|
if (requiresCtrlToChange && (event.ctrlKey || event.metaKey) || !requiresCtrlToChange) {
|
|
2955
2991
|
if (selectOpen) {
|
|
@@ -2987,6 +3023,7 @@ var TooltipSelect = function TooltipSelect(_a) {
|
|
|
2987
3023
|
var onBlur = React.useCallback(function () {
|
|
2988
3024
|
setTooltipOpen(false);
|
|
2989
3025
|
}, [setTooltipOpen]);
|
|
3026
|
+
var selectStyles = noStyling ? {} : tooltipContainerStyles(!!isEnabled, hasBackgroundColor);
|
|
2990
3027
|
return /*#__PURE__*/React.createElement(CustomTooltip, {
|
|
2991
3028
|
title: tooltip,
|
|
2992
3029
|
placement: "top",
|
|
@@ -3009,7 +3046,7 @@ var TooltipSelect = function TooltipSelect(_a) {
|
|
|
3009
3046
|
}
|
|
3010
3047
|
}
|
|
3011
3048
|
},
|
|
3012
|
-
sx: {
|
|
3049
|
+
sx: Object.assign({
|
|
3013
3050
|
'& ul': {
|
|
3014
3051
|
backgroundColor: 'geowebColors.background.surface'
|
|
3015
3052
|
},
|
|
@@ -3045,9 +3082,9 @@ var TooltipSelect = function TooltipSelect(_a) {
|
|
|
3045
3082
|
}
|
|
3046
3083
|
}
|
|
3047
3084
|
}
|
|
3048
|
-
}
|
|
3085
|
+
}, theme.palette.geowebColors.tooltips.tooltipSelect.menu)
|
|
3049
3086
|
},
|
|
3050
|
-
sx:
|
|
3087
|
+
sx: Object.assign(Object.assign({}, selectStyles), theme.palette.geowebColors.tooltips.tooltipSelect.select)
|
|
3051
3088
|
}, props)));
|
|
3052
3089
|
};
|
|
3053
3090
|
|
|
@@ -3111,6 +3148,44 @@ var CustomAccordion = function CustomAccordion(_a) {
|
|
|
3111
3148
|
}, children));
|
|
3112
3149
|
};
|
|
3113
3150
|
|
|
3151
|
+
var highlightStyle = {
|
|
3152
|
+
background: '#ffeecc'
|
|
3153
|
+
};
|
|
3154
|
+
|
|
3155
|
+
var SearchHighlight = function SearchHighlight(_ref) {
|
|
3156
|
+
var _ref$text = _ref.text,
|
|
3157
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
3158
|
+
search = _ref.search;
|
|
3159
|
+
|
|
3160
|
+
if (search === '') {
|
|
3161
|
+
return /*#__PURE__*/React__default.createElement("span", null, text);
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
var searchWords = search.split(' ').reduce(function (words, word) {
|
|
3165
|
+
return word ? [].concat(_toConsumableArray(words), [word.toLocaleLowerCase()]) : words;
|
|
3166
|
+
}, []);
|
|
3167
|
+
var searchRegex = searchWords.map(function (word) {
|
|
3168
|
+
return escapeRegExp(word);
|
|
3169
|
+
}).join('|');
|
|
3170
|
+
var textParts = text.split(new RegExp("(".concat(searchRegex, ")"), 'gi'));
|
|
3171
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, textParts.map(function (part, index) {
|
|
3172
|
+
var key = "".concat(part, "-").concat(index);
|
|
3173
|
+
|
|
3174
|
+
if (searchWords.some(function (search) {
|
|
3175
|
+
return part.toLocaleLowerCase().includes(search);
|
|
3176
|
+
})) {
|
|
3177
|
+
return /*#__PURE__*/React__default.createElement("mark", {
|
|
3178
|
+
key: key,
|
|
3179
|
+
style: highlightStyle
|
|
3180
|
+
}, part);
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3183
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
3184
|
+
key: key
|
|
3185
|
+
}, part);
|
|
3186
|
+
}));
|
|
3187
|
+
};
|
|
3188
|
+
|
|
3114
3189
|
/* *
|
|
3115
3190
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3116
3191
|
* you may not use this file except in compliance with the License.
|
|
@@ -3460,4 +3535,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
3460
3535
|
differenceInHours: differenceInHours
|
|
3461
3536
|
});
|
|
3462
3537
|
|
|
3463
|
-
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, ErrorBoundary, ResizeComponent as Resizable, StatusTag, ToggleMenu,
|
|
3538
|
+
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, ErrorBoundary, ResizeComponent as Resizable, SearchHighlight, StatusTag, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getPosition, getWarningMessage, isAxiosError, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
|
package/index.umd.js
CHANGED
|
@@ -128,8 +128,10 @@
|
|
|
128
128
|
|
|
129
129
|
var tagStyle = function tagStyle(color) {
|
|
130
130
|
// Set color to grey for summary
|
|
131
|
-
var backgroundColor = bgColors[color];
|
|
132
|
-
|
|
131
|
+
var backgroundColor = __assign({}, bgColors)[color];
|
|
132
|
+
|
|
133
|
+
var borderColor = __assign({}, borderColors)[color];
|
|
134
|
+
|
|
133
135
|
return {
|
|
134
136
|
backgroundColor: backgroundColor,
|
|
135
137
|
m: 0,
|
|
@@ -228,7 +230,7 @@
|
|
|
228
230
|
* */
|
|
229
231
|
var CustomIconButton = /*#__PURE__*/React__namespace.forwardRef(function (_a, ref) {
|
|
230
232
|
var _b = _a.tooltipTitle,
|
|
231
|
-
|
|
233
|
+
defaultTooltipTitle = _b === void 0 ? '' : _b,
|
|
232
234
|
_c = _a.variant,
|
|
233
235
|
variant = _c === void 0 ? 'flat' : _c,
|
|
234
236
|
_d = _a.isSelected,
|
|
@@ -239,10 +241,21 @@
|
|
|
239
241
|
size = _f === void 0 ? 'small' : _f,
|
|
240
242
|
children = _a.children,
|
|
241
243
|
className = _a.className,
|
|
242
|
-
|
|
244
|
+
defaultTooltipProps = _a.tooltipProps,
|
|
245
|
+
props = __rest(_a, ["tooltipTitle", "variant", "isSelected", "shouldShowAsDisabled", "size", "children", "className", "tooltipProps"]);
|
|
243
246
|
|
|
244
247
|
var classNames = __spreadArray(__spreadArray(__spreadArray([], __read(className ? [className] : [])), __read(isSelected ? ['Mui-selected'] : [])), [variant]).join(' ');
|
|
245
248
|
|
|
249
|
+
var tooltipTitle = (defaultTooltipProps === null || defaultTooltipProps === void 0 ? void 0 : defaultTooltipProps.title) || defaultTooltipTitle;
|
|
250
|
+
|
|
251
|
+
var tooltipProps = __assign(__assign({}, defaultTooltipProps), {
|
|
252
|
+
title: tooltipTitle,
|
|
253
|
+
placement: (defaultTooltipProps === null || defaultTooltipProps === void 0 ? void 0 : defaultTooltipProps.placement) || 'top',
|
|
254
|
+
sx: {
|
|
255
|
+
pointerEvents: 'none'
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
246
259
|
var renderIconButton = function renderIconButton() {
|
|
247
260
|
return /*#__PURE__*/React__namespace.createElement(material.IconButton, __assign({
|
|
248
261
|
"aria-label": tooltipTitle
|
|
@@ -261,13 +274,7 @@
|
|
|
261
274
|
}), children);
|
|
262
275
|
};
|
|
263
276
|
|
|
264
|
-
return tooltipTitle ? /*#__PURE__*/React__namespace.createElement(CustomTooltip, {
|
|
265
|
-
title: tooltipTitle,
|
|
266
|
-
placement: "top",
|
|
267
|
-
sx: {
|
|
268
|
-
pointerEvents: 'none'
|
|
269
|
-
}
|
|
270
|
-
}, renderIconButton()) : renderIconButton();
|
|
277
|
+
return tooltipTitle && !props.disabled ? /*#__PURE__*/React__namespace.createElement(CustomTooltip, __assign({}, tooltipProps), renderIconButton()) : renderIconButton();
|
|
271
278
|
});
|
|
272
279
|
|
|
273
280
|
var CustomDialog = function CustomDialog(_a) {
|
|
@@ -691,7 +698,14 @@
|
|
|
691
698
|
};
|
|
692
699
|
var ConfirmationServiceProvider = function ConfirmationServiceProvider(_a) {
|
|
693
700
|
var children = _a.children;
|
|
694
|
-
var awaitingPromiseRef = React__namespace.useRef(
|
|
701
|
+
var awaitingPromiseRef = React__namespace.useRef({
|
|
702
|
+
resolve: function resolve() {
|
|
703
|
+
return Promise.resolve();
|
|
704
|
+
},
|
|
705
|
+
reject: function reject() {
|
|
706
|
+
return Promise.reject();
|
|
707
|
+
}
|
|
708
|
+
});
|
|
695
709
|
|
|
696
710
|
var _b = useDialogActions(awaitingPromiseRef),
|
|
697
711
|
openConfirmation = _b.openConfirmation,
|
|
@@ -911,53 +925,63 @@
|
|
|
911
925
|
* See the License for the specific language governing permissions and
|
|
912
926
|
* limitations under the License.
|
|
913
927
|
*
|
|
914
|
-
* Copyright
|
|
915
|
-
* Copyright
|
|
928
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
929
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
916
930
|
* */
|
|
917
|
-
var styles$5 = {
|
|
918
|
-
header: function header(theme) {
|
|
919
|
-
var _a;
|
|
920
|
-
|
|
921
|
-
return _a = {
|
|
922
|
-
height: 40,
|
|
923
|
-
backgroundColor: theme.palette.geowebColors.brand.brand,
|
|
924
|
-
color: theme.palette.common.white,
|
|
925
|
-
boxShadow: theme.shadows[1],
|
|
926
|
-
zIndex: 1000,
|
|
927
|
-
display: 'flex',
|
|
928
|
-
padding: '0 16px'
|
|
929
|
-
}, _a[theme.breakpoints.up('md')] = {
|
|
930
|
-
padding: '0 24px'
|
|
931
|
-
}, _a;
|
|
932
|
-
},
|
|
933
|
-
title: {
|
|
934
|
-
fontSize: '20px',
|
|
935
|
-
fontWeight: 500,
|
|
936
|
-
fontStretch: 'normal',
|
|
937
|
-
fontStyle: 'normal',
|
|
938
|
-
lineHeight: 'normal',
|
|
939
|
-
letterSpacing: '0.15px',
|
|
940
|
-
overflow: 'hidden',
|
|
941
|
-
whiteSpace: 'nowrap',
|
|
942
|
-
textOverflow: 'ellipsis',
|
|
943
|
-
color: 'geowebColors.typographyAndIcons.text',
|
|
944
|
-
marginLeft: 1
|
|
945
|
-
},
|
|
946
|
-
container: {
|
|
947
|
-
height: '100%'
|
|
948
|
-
}
|
|
949
|
-
};
|
|
950
931
|
|
|
951
932
|
var AppHeader = function AppHeader(_a) {
|
|
933
|
+
var _b;
|
|
934
|
+
|
|
952
935
|
var menu = _a.menu,
|
|
953
936
|
userMenu = _a.userMenu,
|
|
954
937
|
workspaceTopBar = _a.workspaceTopBar,
|
|
955
|
-
|
|
956
|
-
title =
|
|
938
|
+
_c = _a.title,
|
|
939
|
+
title = _c === void 0 ? 'GeoWeb' : _c,
|
|
957
940
|
onClick = _a.onClick;
|
|
941
|
+
var theme$1 = material.useTheme();
|
|
942
|
+
|
|
943
|
+
var _d = __read(React__default["default"].useState(false), 2),
|
|
944
|
+
isDrawerOpen = _d[0],
|
|
945
|
+
toggleDrawer = _d[1];
|
|
946
|
+
|
|
947
|
+
var onToggleDrawer = function onToggleDrawer(isOpen) {
|
|
948
|
+
return toggleDrawer(isOpen);
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
var onKeyDown = function onKeyDown(event) {
|
|
952
|
+
if (event.key === 'Tab' || event.key === 'Shift') {
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
toggleDrawer(false);
|
|
957
|
+
};
|
|
958
|
+
|
|
958
959
|
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
959
960
|
component: "header",
|
|
960
|
-
|
|
961
|
+
role: "heading",
|
|
962
|
+
sx: (_b = {
|
|
963
|
+
height: 40,
|
|
964
|
+
backgroundColor: theme$1.palette.geowebColors.brand.brand,
|
|
965
|
+
color: theme$1.palette.common.white,
|
|
966
|
+
boxShadow: theme$1.shadows[1],
|
|
967
|
+
zIndex: 1000,
|
|
968
|
+
display: 'flex',
|
|
969
|
+
padding: '0 16px'
|
|
970
|
+
}, _b[theme$1.breakpoints.up('md')] = {
|
|
971
|
+
padding: '0 24px'
|
|
972
|
+
}, _b[theme$1.breakpoints.up('sm')] = {
|
|
973
|
+
'.workspace-topbar': {
|
|
974
|
+
marginLeft: 3,
|
|
975
|
+
maxWidth: 260
|
|
976
|
+
},
|
|
977
|
+
'.hamburger-btn': {
|
|
978
|
+
marginLeft: 4
|
|
979
|
+
},
|
|
980
|
+
h1: {
|
|
981
|
+
maxWidth: 'initial',
|
|
982
|
+
display: 'block'
|
|
983
|
+
}
|
|
984
|
+
}, _b)
|
|
961
985
|
}, /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
962
986
|
onClick: onClick,
|
|
963
987
|
sx: {
|
|
@@ -973,24 +997,71 @@
|
|
|
973
997
|
}
|
|
974
998
|
}), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
975
999
|
variant: "h1",
|
|
976
|
-
sx: styles$5.title
|
|
977
|
-
}, title)), /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
978
1000
|
sx: {
|
|
979
|
-
|
|
1001
|
+
display: 'none',
|
|
1002
|
+
fontSize: '20px',
|
|
1003
|
+
fontWeight: 500,
|
|
1004
|
+
fontStretch: 'normal',
|
|
1005
|
+
fontStyle: 'normal',
|
|
1006
|
+
lineHeight: 'normal',
|
|
1007
|
+
letterSpacing: '0.15px',
|
|
1008
|
+
overflow: 'hidden',
|
|
1009
|
+
whiteSpace: 'nowrap',
|
|
1010
|
+
textOverflow: 'ellipsis',
|
|
1011
|
+
color: 'geowebColors.typographyAndIcons.text',
|
|
1012
|
+
marginLeft: 1,
|
|
1013
|
+
maxWidth: 130
|
|
1014
|
+
}
|
|
1015
|
+
}, title)), menu && /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
1016
|
+
className: "hamburger-btn",
|
|
1017
|
+
sx: {
|
|
980
1018
|
display: 'flex',
|
|
981
|
-
|
|
982
|
-
|
|
1019
|
+
alignItems: 'center',
|
|
1020
|
+
marginLeft: 1
|
|
983
1021
|
}
|
|
984
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1022
|
+
}, /*#__PURE__*/React__default["default"].createElement(CustomIconButton, {
|
|
1023
|
+
"data-testid": "menuButton",
|
|
1024
|
+
onClick: function onClick() {
|
|
1025
|
+
return onToggleDrawer(true);
|
|
1026
|
+
},
|
|
1027
|
+
isSelected: isDrawerOpen
|
|
1028
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.HamburgerMenu, null)), /*#__PURE__*/React__default["default"].createElement(material.Drawer, {
|
|
1029
|
+
"data-testid": "app-drawer",
|
|
1030
|
+
anchor: "left",
|
|
1031
|
+
open: isDrawerOpen,
|
|
1032
|
+
onClose: function onClose() {
|
|
1033
|
+
return onToggleDrawer(false);
|
|
1034
|
+
},
|
|
1035
|
+
onClick: function onClick() {
|
|
1036
|
+
return onToggleDrawer(false);
|
|
1037
|
+
},
|
|
1038
|
+
onKeyDown: onKeyDown,
|
|
985
1039
|
sx: {
|
|
986
|
-
|
|
987
|
-
|
|
1040
|
+
'& .MuiDrawer-paper': {
|
|
1041
|
+
top: '40px'
|
|
988
1042
|
}
|
|
989
1043
|
}
|
|
990
|
-
},
|
|
1044
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
1045
|
+
role: "presentation",
|
|
991
1046
|
sx: {
|
|
1047
|
+
width: '250px',
|
|
1048
|
+
overflowY: 'auto'
|
|
1049
|
+
}
|
|
1050
|
+
}, menu))), /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
1051
|
+
className: "workspace-topbar",
|
|
1052
|
+
sx: {
|
|
1053
|
+
flexGrow: 1,
|
|
992
1054
|
display: 'flex',
|
|
993
|
-
|
|
1055
|
+
marginLeft: 1,
|
|
1056
|
+
alignItems: 'center',
|
|
1057
|
+
maxWidth: 168
|
|
1058
|
+
}
|
|
1059
|
+
}, workspaceTopBar), /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
1060
|
+
sx: {
|
|
1061
|
+
display: 'flex',
|
|
1062
|
+
alignItems: 'center',
|
|
1063
|
+
flexGrow: 1,
|
|
1064
|
+
justifyContent: 'flex-end'
|
|
994
1065
|
}
|
|
995
1066
|
}, userMenu));
|
|
996
1067
|
};
|
|
@@ -1450,7 +1521,13 @@
|
|
|
1450
1521
|
_e = _a.leftHeaderComponent,
|
|
1451
1522
|
leftHeaderComponent = _e === void 0 ? null : _e,
|
|
1452
1523
|
_f = _a.rightHeaderComponent,
|
|
1453
|
-
rightHeaderComponent = _f === void 0 ? null : _f
|
|
1524
|
+
rightHeaderComponent = _f === void 0 ? null : _f,
|
|
1525
|
+
_g = _a.dragHandleIcon,
|
|
1526
|
+
dragHandleIcon = _g === void 0 ? /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, null) : _g,
|
|
1527
|
+
_h = _a.closeIcon,
|
|
1528
|
+
closeIcon = _h === void 0 ? /*#__PURE__*/React__default["default"].createElement(theme.Close, {
|
|
1529
|
+
"data-testid": "CloseIcon"
|
|
1530
|
+
}) : _h;
|
|
1454
1531
|
var styles = getStyle(size);
|
|
1455
1532
|
var columnSizeIcon = leftHeaderComponent || rightHeaderComponent ? 4 : 1;
|
|
1456
1533
|
var columnSizeTitle = leftHeaderComponent || rightHeaderComponent ? 4 : 10;
|
|
@@ -1487,7 +1564,7 @@
|
|
|
1487
1564
|
pointerEvents: 'none',
|
|
1488
1565
|
'&.MuiIconButton-root': iconStyle
|
|
1489
1566
|
}
|
|
1490
|
-
},
|
|
1567
|
+
}, dragHandleIcon)), leftHeaderComponent && leftHeaderComponent), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1491
1568
|
className: "header-title",
|
|
1492
1569
|
item: true,
|
|
1493
1570
|
xs: columnSizeTitle
|
|
@@ -1512,7 +1589,7 @@
|
|
|
1512
1589
|
height: 12
|
|
1513
1590
|
})
|
|
1514
1591
|
}
|
|
1515
|
-
},
|
|
1592
|
+
}, dragHandleIcon))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1516
1593
|
className: "header-right",
|
|
1517
1594
|
item: true,
|
|
1518
1595
|
xs: columnSizeIcon,
|
|
@@ -1531,9 +1608,7 @@
|
|
|
1531
1608
|
sx: {
|
|
1532
1609
|
'&.MuiButtonBase-root.MuiIconButton-root': iconStyle
|
|
1533
1610
|
}
|
|
1534
|
-
},
|
|
1535
|
-
"data-testid": "CloseIcon"
|
|
1536
|
-
}))))));
|
|
1611
|
+
}, closeIcon)))));
|
|
1537
1612
|
};
|
|
1538
1613
|
|
|
1539
1614
|
/* *
|
|
@@ -1591,7 +1666,9 @@
|
|
|
1591
1666
|
leftHeaderComponent = _j === void 0 ? null : _j,
|
|
1592
1667
|
_k = _a.rightHeaderComponent,
|
|
1593
1668
|
rightHeaderComponent = _k === void 0 ? null : _k,
|
|
1594
|
-
|
|
1669
|
+
dragHandleIcon = _a.dragHandleIcon,
|
|
1670
|
+
closeIcon = _a.closeIcon,
|
|
1671
|
+
props = __rest(_a, ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon"]);
|
|
1595
1672
|
|
|
1596
1673
|
return /*#__PURE__*/React__default["default"].createElement(material.Paper, __assign({
|
|
1597
1674
|
elevation: elevation,
|
|
@@ -1603,7 +1680,9 @@
|
|
|
1603
1680
|
onClose: onClose,
|
|
1604
1681
|
className: headerClassName,
|
|
1605
1682
|
leftHeaderComponent: leftHeaderComponent,
|
|
1606
|
-
rightHeaderComponent: rightHeaderComponent
|
|
1683
|
+
rightHeaderComponent: rightHeaderComponent,
|
|
1684
|
+
dragHandleIcon: dragHandleIcon,
|
|
1685
|
+
closeIcon: closeIcon
|
|
1607
1686
|
})), /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
1608
1687
|
sx: styles$2.content,
|
|
1609
1688
|
style: {
|
|
@@ -1844,10 +1923,12 @@
|
|
|
1844
1923
|
leftHeaderComponent = _t === void 0 ? null : _t,
|
|
1845
1924
|
_u = _a.rightHeaderComponent,
|
|
1846
1925
|
rightHeaderComponent = _u === void 0 ? null : _u,
|
|
1926
|
+
dragHandleIcon = _a.dragHandleIcon,
|
|
1927
|
+
closeIcon = _a.closeIcon,
|
|
1847
1928
|
className = _a.className,
|
|
1848
1929
|
_v = _a.sx,
|
|
1849
1930
|
sx = _v === void 0 ? {} : _v,
|
|
1850
|
-
props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "onFocus", "onBlur", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "className", "sx"]);
|
|
1931
|
+
props = __rest(_a, ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "children", "isOpen", "onClose", "initialMaxHeight", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "onFocus", "onBlur", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon", "className", "sx"]);
|
|
1851
1932
|
|
|
1852
1933
|
var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
|
|
1853
1934
|
var elevation = BASE_ELEVATION + order;
|
|
@@ -1889,7 +1970,8 @@
|
|
|
1889
1970
|
});
|
|
1890
1971
|
var newPos = calculateNewPosition(position, isRightAligned, handle, delta); // eslint-disable-next-line no-param-reassign
|
|
1891
1972
|
|
|
1892
|
-
|
|
1973
|
+
var parent = node.parentNode;
|
|
1974
|
+
parent.style.transform = "translate(" + newPos.x + "px, " + newPos.y + "px)";
|
|
1893
1975
|
}, [onChangeSize, position, isRightAligned]);
|
|
1894
1976
|
|
|
1895
1977
|
var onStopResize = function onStopResize(_event, direction, node, delta) {
|
|
@@ -1950,6 +2032,8 @@
|
|
|
1950
2032
|
headerClassName: headerClassName,
|
|
1951
2033
|
leftHeaderComponent: leftHeaderComponent,
|
|
1952
2034
|
rightHeaderComponent: rightHeaderComponent,
|
|
2035
|
+
dragHandleIcon: dragHandleIcon,
|
|
2036
|
+
closeIcon: closeIcon,
|
|
1953
2037
|
className: className
|
|
1954
2038
|
}, children)))) : null;
|
|
1955
2039
|
};
|
|
@@ -2549,55 +2633,6 @@
|
|
|
2549
2633
|
}, props));
|
|
2550
2634
|
});
|
|
2551
2635
|
|
|
2552
|
-
/* *
|
|
2553
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2554
|
-
* you may not use this file except in compliance with the License.
|
|
2555
|
-
* You may obtain a copy of the License at
|
|
2556
|
-
*
|
|
2557
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2558
|
-
*
|
|
2559
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2560
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2561
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2562
|
-
* See the License for the specific language governing permissions and
|
|
2563
|
-
* limitations under the License.
|
|
2564
|
-
*
|
|
2565
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2566
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2567
|
-
* */
|
|
2568
|
-
var ToolButton = /*#__PURE__*/React__namespace.forwardRef(function (_a, ref) {
|
|
2569
|
-
var active = _a.active,
|
|
2570
|
-
_b = _a.width,
|
|
2571
|
-
width = _b === void 0 ? '24px' : _b,
|
|
2572
|
-
_c = _a.height,
|
|
2573
|
-
height = _c === void 0 ? '24px' : _c,
|
|
2574
|
-
children = _a.children,
|
|
2575
|
-
_d = _a.value,
|
|
2576
|
-
value = _d === void 0 ? 0 : _d,
|
|
2577
|
-
_e = _a.sx,
|
|
2578
|
-
sx = _e === void 0 ? {} : _e,
|
|
2579
|
-
_f = _a.variant,
|
|
2580
|
-
variant = _f === void 0 ? 'tool' : _f,
|
|
2581
|
-
props = __rest(_a, ["active", "width", "height", "children", "value", "sx", "variant"]);
|
|
2582
|
-
|
|
2583
|
-
return /*#__PURE__*/React__namespace.createElement(CustomToggleButton, __assign({
|
|
2584
|
-
ref: ref,
|
|
2585
|
-
variant: variant,
|
|
2586
|
-
disableRipple: true,
|
|
2587
|
-
selected: active,
|
|
2588
|
-
value: value,
|
|
2589
|
-
sx: __assign({
|
|
2590
|
-
width: width + "!important",
|
|
2591
|
-
height: height + "!important",
|
|
2592
|
-
textTransform: 'none!important',
|
|
2593
|
-
padding: '11px!important',
|
|
2594
|
-
'& .MuiSvgIcon-root': {
|
|
2595
|
-
marginRight: '0px!important'
|
|
2596
|
-
}
|
|
2597
|
-
}, sx)
|
|
2598
|
-
}, props), children);
|
|
2599
|
-
});
|
|
2600
|
-
|
|
2601
2636
|
var getPosition = function getPosition(menuPosition) {
|
|
2602
2637
|
switch (menuPosition) {
|
|
2603
2638
|
case 'bottom':
|
|
@@ -2650,21 +2685,22 @@
|
|
|
2650
2685
|
tooltipTitle = _d === void 0 ? '' : _d,
|
|
2651
2686
|
_e = _a.menuTitle,
|
|
2652
2687
|
menuTitle = _e === void 0 ? '' : _e,
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2688
|
+
_f = _a.variant,
|
|
2689
|
+
variant = _f === void 0 ? 'tool' : _f,
|
|
2690
|
+
_g = _a.isDefaultOpen,
|
|
2691
|
+
isDefaultOpen = _g === void 0 ? false : _g,
|
|
2692
|
+
_h = _a.buttonIcon,
|
|
2693
|
+
buttonIcon = _h === void 0 ? /*#__PURE__*/React__namespace.createElement(theme.Options, null) : _h;
|
|
2658
2694
|
|
|
2659
|
-
var
|
|
2660
|
-
anchorEl =
|
|
2661
|
-
setAnchorEl =
|
|
2695
|
+
var _j = __read(React__namespace.useState(null), 2),
|
|
2696
|
+
anchorEl = _j[0],
|
|
2697
|
+
setAnchorEl = _j[1];
|
|
2662
2698
|
|
|
2663
2699
|
var isOpen = Boolean(anchorEl);
|
|
2664
2700
|
|
|
2665
|
-
var
|
|
2666
|
-
anchorOrigin =
|
|
2667
|
-
transformOrigin =
|
|
2701
|
+
var _k = getPosition(menuPosition),
|
|
2702
|
+
anchorOrigin = _k.anchorOrigin,
|
|
2703
|
+
transformOrigin = _k.transformOrigin;
|
|
2668
2704
|
|
|
2669
2705
|
var handleClick = function handleClick(event) {
|
|
2670
2706
|
event.stopPropagation();
|
|
@@ -2681,17 +2717,18 @@
|
|
|
2681
2717
|
setAnchorEl(document.getElementById(buttonTestId));
|
|
2682
2718
|
}
|
|
2683
2719
|
}, [isDefaultOpen, buttonTestId]);
|
|
2684
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2720
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(CustomIconButton, {
|
|
2721
|
+
tooltipProps: {
|
|
2722
|
+
placement: 'top',
|
|
2723
|
+
title: tooltipTitle
|
|
2724
|
+
},
|
|
2725
|
+
isSelected: isOpen,
|
|
2689
2726
|
sx: buttonSx,
|
|
2690
2727
|
onClick: handleClick,
|
|
2691
2728
|
"data-testid": buttonTestId,
|
|
2692
2729
|
variant: variant,
|
|
2693
2730
|
id: buttonTestId
|
|
2694
|
-
}, buttonIcon)
|
|
2731
|
+
}, buttonIcon), /*#__PURE__*/React__namespace.createElement(material.Menu, {
|
|
2695
2732
|
anchorEl: anchorEl,
|
|
2696
2733
|
open: isOpen,
|
|
2697
2734
|
onClose: function onClose(event, reason) {
|
|
@@ -2854,6 +2891,7 @@
|
|
|
2854
2891
|
tooltipOpen = _g[0],
|
|
2855
2892
|
setTooltipOpen = _g[1];
|
|
2856
2893
|
|
|
2894
|
+
var theme = material.useTheme();
|
|
2857
2895
|
var onWheel = React__namespace.useCallback(function (event) {
|
|
2858
2896
|
if (requiresCtrlToChange && (event.ctrlKey || event.metaKey) || !requiresCtrlToChange) {
|
|
2859
2897
|
if (selectOpen) {
|
|
@@ -2891,6 +2929,7 @@
|
|
|
2891
2929
|
var onBlur = React__namespace.useCallback(function () {
|
|
2892
2930
|
setTooltipOpen(false);
|
|
2893
2931
|
}, [setTooltipOpen]);
|
|
2932
|
+
var selectStyles = noStyling ? {} : tooltipContainerStyles(!!isEnabled, hasBackgroundColor);
|
|
2894
2933
|
return /*#__PURE__*/React__namespace.createElement(CustomTooltip, {
|
|
2895
2934
|
title: tooltip,
|
|
2896
2935
|
placement: "top",
|
|
@@ -2913,7 +2952,7 @@
|
|
|
2913
2952
|
}
|
|
2914
2953
|
}
|
|
2915
2954
|
},
|
|
2916
|
-
sx: {
|
|
2955
|
+
sx: __assign({
|
|
2917
2956
|
'& ul': {
|
|
2918
2957
|
backgroundColor: 'geowebColors.background.surface'
|
|
2919
2958
|
},
|
|
@@ -2949,9 +2988,9 @@
|
|
|
2949
2988
|
}
|
|
2950
2989
|
}
|
|
2951
2990
|
}
|
|
2952
|
-
}
|
|
2991
|
+
}, theme.palette.geowebColors.tooltips.tooltipSelect.menu)
|
|
2953
2992
|
},
|
|
2954
|
-
sx:
|
|
2993
|
+
sx: __assign(__assign({}, selectStyles), theme.palette.geowebColors.tooltips.tooltipSelect.select)
|
|
2955
2994
|
}, props)));
|
|
2956
2995
|
};
|
|
2957
2996
|
|
|
@@ -3013,6 +3052,60 @@
|
|
|
3013
3052
|
}, children));
|
|
3014
3053
|
};
|
|
3015
3054
|
|
|
3055
|
+
/* *
|
|
3056
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3057
|
+
* you may not use this file except in compliance with the License.
|
|
3058
|
+
* You may obtain a copy of the License at
|
|
3059
|
+
*
|
|
3060
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3061
|
+
*
|
|
3062
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3063
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3064
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3065
|
+
* See the License for the specific language governing permissions and
|
|
3066
|
+
* limitations under the License.
|
|
3067
|
+
*
|
|
3068
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3069
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
3070
|
+
* */
|
|
3071
|
+
var highlightStyle = {
|
|
3072
|
+
background: '#ffeecc'
|
|
3073
|
+
};
|
|
3074
|
+
|
|
3075
|
+
var SearchHighlight = function SearchHighlight(_a) {
|
|
3076
|
+
var _b = _a.text,
|
|
3077
|
+
text = _b === void 0 ? '' : _b,
|
|
3078
|
+
search = _a.search;
|
|
3079
|
+
|
|
3080
|
+
if (search === '') {
|
|
3081
|
+
return /*#__PURE__*/React__default["default"].createElement("span", null, text);
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
var searchWords = search.split(' ').reduce(function (words, word) {
|
|
3085
|
+
return word ? __spreadArray(__spreadArray([], __read(words)), [word.toLocaleLowerCase()]) : words;
|
|
3086
|
+
}, []);
|
|
3087
|
+
var searchRegex = searchWords.map(function (word) {
|
|
3088
|
+
return lodash.escapeRegExp(word);
|
|
3089
|
+
}).join('|');
|
|
3090
|
+
var textParts = text.split(new RegExp("(" + searchRegex + ")", 'gi'));
|
|
3091
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, textParts.map(function (part, index) {
|
|
3092
|
+
var key = part + "-" + index;
|
|
3093
|
+
|
|
3094
|
+
if (searchWords.some(function (search) {
|
|
3095
|
+
return part.toLocaleLowerCase().includes(search);
|
|
3096
|
+
})) {
|
|
3097
|
+
return /*#__PURE__*/React__default["default"].createElement("mark", {
|
|
3098
|
+
key: key,
|
|
3099
|
+
style: highlightStyle
|
|
3100
|
+
}, part);
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3104
|
+
key: key
|
|
3105
|
+
}, part);
|
|
3106
|
+
}));
|
|
3107
|
+
};
|
|
3108
|
+
|
|
3016
3109
|
/* *
|
|
3017
3110
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3018
3111
|
* you may not use this file except in compliance with the License.
|
|
@@ -3403,9 +3496,9 @@
|
|
|
3403
3496
|
exports.Draggable = DraggableComponent$1;
|
|
3404
3497
|
exports.ErrorBoundary = ErrorBoundary;
|
|
3405
3498
|
exports.Resizable = ResizeComponent;
|
|
3499
|
+
exports.SearchHighlight = SearchHighlight;
|
|
3406
3500
|
exports.StatusTag = StatusTag;
|
|
3407
3501
|
exports.ToggleMenu = ToggleMenu;
|
|
3408
|
-
exports.ToolButton = ToolButton;
|
|
3409
3502
|
exports.ToolContainer = ToolContainer;
|
|
3410
3503
|
exports.ToolContainerDraggable = DraggableComponent;
|
|
3411
3504
|
exports.ToolFooter = ToolFooter;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IconButtonProps } from '@mui/material';
|
|
2
|
+
import { IconButtonProps, TooltipProps as MuiTooltipProps } from '@mui/material';
|
|
3
3
|
export declare type Variant = 'flat' | 'tool' | 'boxed';
|
|
4
|
+
declare type TooltipProps = Omit<MuiTooltipProps, 'children'>;
|
|
4
5
|
export interface CustomIconProps extends IconButtonProps {
|
|
5
6
|
tooltipTitle?: string;
|
|
6
7
|
variant?: Variant;
|
|
7
8
|
isSelected?: boolean;
|
|
8
9
|
shouldShowAsDisabled?: boolean;
|
|
10
|
+
tooltipProps?: TooltipProps;
|
|
9
11
|
}
|
|
10
12
|
export declare const CustomIconButton: React.FC<CustomIconProps>;
|
|
13
|
+
export {};
|
|
@@ -3,11 +3,11 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const SearchHighlightLightTheme: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
storyName: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const SearchHighlightDarkTheme: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
12
|
storyName: string;
|
|
13
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SearchHighlight } from './SearchHighlight';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PopoverOrigin, SxProps, Theme } from '@mui/material';
|
|
3
|
-
import {
|
|
3
|
+
import { Variant } from '../CustomIconButton';
|
|
4
4
|
declare type MenuPosition = 'left' | 'right' | 'bottom';
|
|
5
5
|
export declare const getPosition: (menuPosition: MenuPosition) => {
|
|
6
6
|
anchorOrigin: PopoverOrigin;
|
|
@@ -19,7 +19,7 @@ interface ToggleMenuProps {
|
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
buttonSx?: SxProps<Theme>;
|
|
21
21
|
tooltipTitle?: string;
|
|
22
|
-
variant?:
|
|
22
|
+
variant?: Variant;
|
|
23
23
|
isDefaultOpen?: boolean;
|
|
24
24
|
buttonIcon?: React.ReactNode;
|
|
25
25
|
}
|
|
@@ -28,6 +28,8 @@ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'
|
|
|
28
28
|
source?: 'app' | 'module';
|
|
29
29
|
leftHeaderComponent?: React.ReactNode;
|
|
30
30
|
rightHeaderComponent?: React.ReactNode;
|
|
31
|
+
dragHandleIcon?: React.ReactNode;
|
|
32
|
+
closeIcon?: React.ReactNode;
|
|
31
33
|
sx?: SxProps;
|
|
32
34
|
}
|
|
33
35
|
export declare const calculateNewPosition: (position: DraggablePosition, isRightAligned: boolean, handle: string, delta: NumberSize) => DraggablePosition;
|
|
@@ -9,6 +9,8 @@ export interface ToolHeaderProps {
|
|
|
9
9
|
isDraggable?: boolean;
|
|
10
10
|
leftHeaderComponent?: React.ReactNode;
|
|
11
11
|
rightHeaderComponent?: React.ReactNode;
|
|
12
|
+
dragHandleIcon?: React.ReactNode;
|
|
13
|
+
closeIcon?: React.ReactNode;
|
|
12
14
|
}
|
|
13
15
|
export interface ToolContainerProps extends PaperProps, ToolHeaderProps {
|
|
14
16
|
isResizable?: boolean;
|
|
@@ -9,7 +9,6 @@ export * from './UserMenu';
|
|
|
9
9
|
export * from './ToolContainer';
|
|
10
10
|
export * from './CustomSlider';
|
|
11
11
|
export * from './CustomToggleButton';
|
|
12
|
-
export * from './ToolButton';
|
|
13
12
|
export * from './ToggleMenu';
|
|
14
13
|
export * from './AlertIcon';
|
|
15
14
|
export * from './TooltipSelect';
|
|
@@ -19,3 +18,4 @@ export * from './CustomTooltip';
|
|
|
19
18
|
export * from './CustomAccordion';
|
|
20
19
|
export * from './CustomDialog';
|
|
21
20
|
export * from './CustomIconButton';
|
|
21
|
+
export * from './SearchHighlight';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.21.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,13 +14,14 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^18.2.0",
|
|
16
16
|
"@mui/material": "^5.12.0",
|
|
17
|
-
"@opengeoweb/theme": "4.
|
|
17
|
+
"@opengeoweb/theme": "4.21.0",
|
|
18
|
+
"@mui/system": "^5.12.0",
|
|
18
19
|
"@mui/x-date-pickers": "^6.2.1",
|
|
19
20
|
"react-draggable": "^4.4.5",
|
|
20
21
|
"re-resizable": "^6.9.0",
|
|
22
|
+
"lodash": "^4.17.20",
|
|
21
23
|
"@redux-eggs/core": "^2.2.0",
|
|
22
24
|
"react-redux": "^8.0.4",
|
|
23
|
-
"lodash": "^4.17.20",
|
|
24
25
|
"axios": "^0.25.0",
|
|
25
26
|
"date-fns": "^2.29.3"
|
|
26
27
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Theme, SxProps } from '@mui/material';
|
|
3
|
-
import { CustomToggleButtonProps } from '../CustomToggleButton';
|
|
4
|
-
export interface ToolButtonProps extends CustomToggleButtonProps {
|
|
5
|
-
active?: boolean;
|
|
6
|
-
width?: string;
|
|
7
|
-
height?: string;
|
|
8
|
-
value?: unknown;
|
|
9
|
-
sx?: SxProps<Theme>;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const ToolButton: React.FC<ToolButtonProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ToolButton';
|
|
File without changes
|