@opengeoweb/shared 8.1.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +101 -30
- package/package.json +2 -2
- package/src/lib/components/AlertBanner/AlertBanner.stories.d.ts +0 -4
- package/src/lib/components/DraggableResizable/types.d.ts +4 -0
- package/src/lib/components/StatusTag/StatusTag.stories.d.ts +0 -4
- package/src/lib/components/SwitchButton/SwitchButton.d.ts +4 -0
- package/src/lib/components/SwitchButton/SwitchButton.spec.d.ts +1 -0
- package/src/lib/components/SwitchButton/index.d.ts +1 -0
- package/src/lib/components/ToggleMenu/ToggleMenu.d.ts +2 -0
- package/src/lib/components/ToolContainer/ToolContainerDraggable.d.ts +3 -3
- package/src/lib/components/ToolContainer/types.d.ts +0 -9
- package/src/lib/components/index.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { useRef, useContext } from 'react';
|
|
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';
|
|
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, ListItemText, ListItemIcon, Select, Accordion, AccordionSummary, AccordionDetails, FormLabel, Switch } from '@mui/material';
|
|
4
4
|
import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Resize, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, ChevronDown } from '@opengeoweb/theme';
|
|
5
5
|
import require$$2, { flushSync } from 'react-dom';
|
|
6
6
|
import { parseISO, parse, format, isEqual, add as add$1, sub as sub$1, differenceInMinutes as differenceInMinutes$1, differenceInHours as differenceInHours$1, isBefore as isBefore$1, isAfter as isAfter$1, isValid as isValid$1, getUnixTime, set as set$1 } from 'date-fns';
|
|
@@ -21272,7 +21272,7 @@ var edgeBase = {
|
|
|
21272
21272
|
height: '20px',
|
|
21273
21273
|
position: 'absolute',
|
|
21274
21274
|
};
|
|
21275
|
-
var styles$
|
|
21275
|
+
var styles$6 = {
|
|
21276
21276
|
top: __assign$1(__assign$1({}, rowSizeBase), { top: '-5px' }),
|
|
21277
21277
|
right: __assign$1(__assign$1({}, colSizeBase), { left: undefined, right: '-5px' }),
|
|
21278
21278
|
bottom: __assign$1(__assign$1({}, rowSizeBase), { top: undefined, bottom: '-5px' }),
|
|
@@ -21295,7 +21295,7 @@ var Resizer = /** @class */ (function (_super) {
|
|
|
21295
21295
|
return _this;
|
|
21296
21296
|
}
|
|
21297
21297
|
Resizer.prototype.render = function () {
|
|
21298
|
-
return (React$1.createElement("div", { className: this.props.className || '', style: __assign$1(__assign$1({ position: 'absolute', userSelect: 'none' }, styles$
|
|
21298
|
+
return (React$1.createElement("div", { className: this.props.className || '', style: __assign$1(__assign$1({ position: 'absolute', userSelect: 'none' }, styles$6[this.props.direction]), (this.props.replaceStyles || {})), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children));
|
|
21299
21299
|
};
|
|
21300
21300
|
return Resizer;
|
|
21301
21301
|
}(React$1.PureComponent));
|
|
@@ -22244,7 +22244,7 @@ ErrorBoundary.defaultProps = {
|
|
|
22244
22244
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
22245
22245
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
22246
22246
|
* */
|
|
22247
|
-
var styles$
|
|
22247
|
+
var styles$5 = {
|
|
22248
22248
|
small: {
|
|
22249
22249
|
height: 16,
|
|
22250
22250
|
width: 16,
|
|
@@ -22258,7 +22258,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
22258
22258
|
size = _ref$size === void 0 ? 'large' : _ref$size;
|
|
22259
22259
|
return /*#__PURE__*/React$1.createElement(Avatar$1, {
|
|
22260
22260
|
"data-testid": "avatar",
|
|
22261
|
-
sx: Object.assign({}, styles$
|
|
22261
|
+
sx: Object.assign({}, styles$5[size])
|
|
22262
22262
|
}, children);
|
|
22263
22263
|
};
|
|
22264
22264
|
|
|
@@ -22278,7 +22278,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
22278
22278
|
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
22279
22279
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
22280
22280
|
* */
|
|
22281
|
-
var styles$
|
|
22281
|
+
var styles$4 = {
|
|
22282
22282
|
container: {
|
|
22283
22283
|
position: 'absolute',
|
|
22284
22284
|
top: 38,
|
|
@@ -22321,13 +22321,13 @@ var UserMenu = function UserMenu(_ref) {
|
|
|
22321
22321
|
},
|
|
22322
22322
|
size: "medium"
|
|
22323
22323
|
}, /*#__PURE__*/React__default.createElement(Avatar, null, initials)), isOpen && /*#__PURE__*/React__default.createElement(Paper, {
|
|
22324
|
-
sx: styles$
|
|
22324
|
+
sx: styles$4.container,
|
|
22325
22325
|
"data-testid": "userMenu"
|
|
22326
22326
|
}, /*#__PURE__*/React__default.createElement(ClickAwayListener, {
|
|
22327
22327
|
onClickAway: onClose,
|
|
22328
22328
|
mouseEvent: "onMouseDown"
|
|
22329
22329
|
}, /*#__PURE__*/React__default.createElement(MenuList, {
|
|
22330
|
-
sx: styles$
|
|
22330
|
+
sx: styles$4.userMenu,
|
|
22331
22331
|
variant: "menu"
|
|
22332
22332
|
}, children))));
|
|
22333
22333
|
};
|
|
@@ -22403,7 +22403,8 @@ var ToolFooter = function ToolFooter() {
|
|
|
22403
22403
|
textAlign: 'right',
|
|
22404
22404
|
height: 18,
|
|
22405
22405
|
zIndex: 1
|
|
22406
|
-
}
|
|
22406
|
+
},
|
|
22407
|
+
role: "contentinfo"
|
|
22407
22408
|
});
|
|
22408
22409
|
};
|
|
22409
22410
|
|
|
@@ -22500,7 +22501,9 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
22500
22501
|
backgroundColor: 'geowebColors.background.surface',
|
|
22501
22502
|
zIndex: 2,
|
|
22502
22503
|
cursor: isDraggable ? 'move' : null
|
|
22503
|
-
}
|
|
22504
|
+
},
|
|
22505
|
+
role: "heading",
|
|
22506
|
+
"aria-label": "toolheader"
|
|
22504
22507
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
22505
22508
|
container: true,
|
|
22506
22509
|
alignItems: "center",
|
|
@@ -22539,7 +22542,8 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
22539
22542
|
sx: {
|
|
22540
22543
|
fontSize: styles.fontSize,
|
|
22541
22544
|
fontWeight: styles.fontWeight
|
|
22542
|
-
}
|
|
22545
|
+
},
|
|
22546
|
+
role: "heading"
|
|
22543
22547
|
}, title), size === 'xxs' && /*#__PURE__*/React__default.createElement(CustomIconButton, {
|
|
22544
22548
|
"data-testid": "dragBtn-xxs",
|
|
22545
22549
|
disableRipple: true,
|
|
@@ -22588,7 +22592,7 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
22588
22592
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
22589
22593
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
22590
22594
|
* */
|
|
22591
|
-
var styles$
|
|
22595
|
+
var styles$3 = {
|
|
22592
22596
|
container: {
|
|
22593
22597
|
overflow: 'hidden',
|
|
22594
22598
|
borderRadius: 0,
|
|
@@ -22629,7 +22633,7 @@ var ToolContainer = function ToolContainer(_a) {
|
|
|
22629
22633
|
props = __rest(_a, ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon"]);
|
|
22630
22634
|
return /*#__PURE__*/React__default.createElement(Paper, Object.assign({
|
|
22631
22635
|
elevation: elevation,
|
|
22632
|
-
sx: styles$
|
|
22636
|
+
sx: styles$3.container
|
|
22633
22637
|
}, props), /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ToolHeader, {
|
|
22634
22638
|
title: title,
|
|
22635
22639
|
size: size,
|
|
@@ -22641,7 +22645,7 @@ var ToolContainer = function ToolContainer(_a) {
|
|
|
22641
22645
|
dragHandleIcon: dragHandleIcon,
|
|
22642
22646
|
closeIcon: closeIcon
|
|
22643
22647
|
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
22644
|
-
sx: styles$
|
|
22648
|
+
sx: styles$3.content,
|
|
22645
22649
|
style: {
|
|
22646
22650
|
maxHeight: maxHeight
|
|
22647
22651
|
}
|
|
@@ -22958,7 +22962,8 @@ var DraggableComponent = function DraggableComponent(_a) {
|
|
|
22958
22962
|
}
|
|
22959
22963
|
}),
|
|
22960
22964
|
ref: nodeRef,
|
|
22961
|
-
className: "toolContainerDraggable"
|
|
22965
|
+
className: "toolContainerDraggable",
|
|
22966
|
+
role: "dialog"
|
|
22962
22967
|
}, /*#__PURE__*/React__default.createElement(ResizeComponent, Object.assign({}, props, {
|
|
22963
22968
|
size: size,
|
|
22964
22969
|
setSize: setSize,
|
|
@@ -23006,7 +23011,7 @@ var segmentStyle = {
|
|
|
23006
23011
|
letterSpacing: 0.25,
|
|
23007
23012
|
justifyContent: 'center'
|
|
23008
23013
|
};
|
|
23009
|
-
var styles$
|
|
23014
|
+
var styles$2 = {
|
|
23010
23015
|
icon: Object.assign(Object.assign({}, segmentStyle), {
|
|
23011
23016
|
backgroundColor: 'geowebColors.textInputField.default.rgba',
|
|
23012
23017
|
width: 40,
|
|
@@ -23029,21 +23034,21 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
|
|
|
23029
23034
|
children = _ref.children;
|
|
23030
23035
|
if (type === 'divider') {
|
|
23031
23036
|
return /*#__PURE__*/React__default.createElement(Typography, {
|
|
23032
|
-
sx: styles$
|
|
23037
|
+
sx: styles$2.divider,
|
|
23033
23038
|
"data-testid": "segment-divider",
|
|
23034
23039
|
component: "span"
|
|
23035
23040
|
}, children);
|
|
23036
23041
|
}
|
|
23037
23042
|
if (type === 'icon') {
|
|
23038
23043
|
return /*#__PURE__*/React__default.createElement(Typography, {
|
|
23039
|
-
sx: styles$
|
|
23044
|
+
sx: styles$2.icon,
|
|
23040
23045
|
"data-testid": "segment-icon",
|
|
23041
23046
|
component: "span"
|
|
23042
23047
|
}, children);
|
|
23043
23048
|
}
|
|
23044
23049
|
if (type === 'connect') {
|
|
23045
23050
|
return /*#__PURE__*/React__default.createElement(Typography, {
|
|
23046
|
-
sx: styles$
|
|
23051
|
+
sx: styles$2.connect,
|
|
23047
23052
|
"data-testid": "segment-connect",
|
|
23048
23053
|
component: "span"
|
|
23049
23054
|
}, children);
|
|
@@ -23300,7 +23305,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
23300
23305
|
"aria-labelledby": "tab-".concat(index)
|
|
23301
23306
|
}, value === index && children);
|
|
23302
23307
|
};
|
|
23303
|
-
var styles = {
|
|
23308
|
+
var styles$1 = {
|
|
23304
23309
|
container: {
|
|
23305
23310
|
margin: '0px 20px',
|
|
23306
23311
|
maxHeight: '90vh'
|
|
@@ -23318,16 +23323,16 @@ var CheatSheet = function CheatSheet() {
|
|
|
23318
23323
|
onChangeActiveTab(newValue);
|
|
23319
23324
|
};
|
|
23320
23325
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
23321
|
-
sx: styles.container
|
|
23326
|
+
sx: styles$1.container
|
|
23322
23327
|
}, /*#__PURE__*/React__default.createElement(Tabs, {
|
|
23323
23328
|
value: activeTab,
|
|
23324
23329
|
onChange: onChangeTab,
|
|
23325
23330
|
"aria-label": "platform"
|
|
23326
23331
|
}, /*#__PURE__*/React__default.createElement(Tab, {
|
|
23327
|
-
sx: styles.tab,
|
|
23332
|
+
sx: styles$1.tab,
|
|
23328
23333
|
label: "Windows"
|
|
23329
23334
|
}), /*#__PURE__*/React__default.createElement(Tab, {
|
|
23330
|
-
sx: styles.tab,
|
|
23335
|
+
sx: styles$1.tab,
|
|
23331
23336
|
label: "Mac"
|
|
23332
23337
|
})), /*#__PURE__*/React__default.createElement(TabPanel, {
|
|
23333
23338
|
value: activeTab,
|
|
@@ -23517,7 +23522,16 @@ var CustomSlider = function CustomSlider(_a) {
|
|
|
23517
23522
|
sx: sliderStyle,
|
|
23518
23523
|
ref: element,
|
|
23519
23524
|
value: value,
|
|
23520
|
-
orientation: orientation
|
|
23525
|
+
orientation: orientation,
|
|
23526
|
+
role: "slider",
|
|
23527
|
+
slotProps: {
|
|
23528
|
+
thumb: {
|
|
23529
|
+
role: 'button'
|
|
23530
|
+
},
|
|
23531
|
+
mark: {
|
|
23532
|
+
role: 'listitem'
|
|
23533
|
+
}
|
|
23534
|
+
}
|
|
23521
23535
|
}, props));
|
|
23522
23536
|
};
|
|
23523
23537
|
|
|
@@ -23608,7 +23622,9 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
23608
23622
|
_ref$isDefaultOpen = _ref.isDefaultOpen,
|
|
23609
23623
|
isDefaultOpen = _ref$isDefaultOpen === void 0 ? false : _ref$isDefaultOpen,
|
|
23610
23624
|
_ref$buttonIcon = _ref.buttonIcon,
|
|
23611
|
-
buttonIcon = _ref$buttonIcon === void 0 ? /*#__PURE__*/React$1.createElement(Options, null) : _ref$buttonIcon
|
|
23625
|
+
buttonIcon = _ref$buttonIcon === void 0 ? /*#__PURE__*/React$1.createElement(Options, null) : _ref$buttonIcon,
|
|
23626
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
23627
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
|
|
23612
23628
|
var _React$useState = React$1.useState(null),
|
|
23613
23629
|
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
23614
23630
|
anchorEl = _React$useState2[0],
|
|
@@ -23640,7 +23656,8 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
23640
23656
|
onClick: handleClick,
|
|
23641
23657
|
"data-testid": buttonTestId,
|
|
23642
23658
|
variant: variant,
|
|
23643
|
-
id: buttonTestId
|
|
23659
|
+
id: buttonTestId,
|
|
23660
|
+
disabled: isDisabled
|
|
23644
23661
|
}, buttonIcon), /*#__PURE__*/React$1.createElement(Menu, {
|
|
23645
23662
|
anchorEl: anchorEl,
|
|
23646
23663
|
open: isOpen,
|
|
@@ -23672,14 +23689,31 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
23672
23689
|
}, menuTitle)), menuItems && menuItems.length ? menuItems.map(function (menuItem) {
|
|
23673
23690
|
var text = menuItem.text,
|
|
23674
23691
|
icon = menuItem.icon,
|
|
23675
|
-
action = menuItem.action
|
|
23692
|
+
action = menuItem.action,
|
|
23693
|
+
isDisabled = menuItem.isDisabled;
|
|
23676
23694
|
return /*#__PURE__*/React$1.createElement(MenuItem, {
|
|
23677
23695
|
key: text,
|
|
23678
23696
|
onClick: function onClick(event) {
|
|
23679
23697
|
action(event);
|
|
23680
23698
|
handleClose(event);
|
|
23699
|
+
},
|
|
23700
|
+
disabled: isDisabled
|
|
23701
|
+
}, /*#__PURE__*/React$1.createElement(Grid, {
|
|
23702
|
+
container: true,
|
|
23703
|
+
spacing: 2,
|
|
23704
|
+
justifyContent: "space-between"
|
|
23705
|
+
}, /*#__PURE__*/React$1.createElement(Grid, {
|
|
23706
|
+
item: true
|
|
23707
|
+
}, /*#__PURE__*/React$1.createElement(ListItemText, null, text)), icon && /*#__PURE__*/React$1.createElement(Grid, {
|
|
23708
|
+
item: true,
|
|
23709
|
+
alignItems: "flex-end"
|
|
23710
|
+
}, /*#__PURE__*/React$1.createElement(ListItemIcon, {
|
|
23711
|
+
sx: {
|
|
23712
|
+
'&.MuiListItemIcon-root': {
|
|
23713
|
+
minWidth: '24px'
|
|
23714
|
+
}
|
|
23681
23715
|
}
|
|
23682
|
-
}, icon
|
|
23716
|
+
}, icon))));
|
|
23683
23717
|
}) : /*#__PURE__*/React$1.createElement("div", null) // Needed to make the menu work without any menuItems
|
|
23684
23718
|
, children));
|
|
23685
23719
|
};
|
|
@@ -24970,7 +25004,8 @@ var SearchHighlight = function SearchHighlight(_ref) {
|
|
|
24970
25004
|
})) {
|
|
24971
25005
|
return /*#__PURE__*/React__default.createElement("mark", {
|
|
24972
25006
|
key: key,
|
|
24973
|
-
style: highlightStyle
|
|
25007
|
+
style: highlightStyle,
|
|
25008
|
+
"data-testid": "mark"
|
|
24974
25009
|
}, part);
|
|
24975
25010
|
}
|
|
24976
25011
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -24979,6 +25014,42 @@ var SearchHighlight = function SearchHighlight(_ref) {
|
|
|
24979
25014
|
}));
|
|
24980
25015
|
};
|
|
24981
25016
|
|
|
25017
|
+
/* *
|
|
25018
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25019
|
+
* you may not use this file except in compliance with the License.
|
|
25020
|
+
* You may obtain a copy of the License at
|
|
25021
|
+
*
|
|
25022
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25023
|
+
*
|
|
25024
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
25025
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25026
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
25027
|
+
* See the License for the specific language governing permissions and
|
|
25028
|
+
* limitations under the License.
|
|
25029
|
+
*
|
|
25030
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
25031
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
25032
|
+
* */
|
|
25033
|
+
var styles = {
|
|
25034
|
+
label: {
|
|
25035
|
+
color: 'geowebColors.buttons.tertiary.default.color',
|
|
25036
|
+
opacity: 1,
|
|
25037
|
+
fontSize: '12px',
|
|
25038
|
+
fontWeight: 500
|
|
25039
|
+
}
|
|
25040
|
+
};
|
|
25041
|
+
var SwitchButton = function SwitchButton(props) {
|
|
25042
|
+
return /*#__PURE__*/React$1.createElement(CustomTooltip, {
|
|
25043
|
+
title: "Switch mode"
|
|
25044
|
+
}, /*#__PURE__*/React$1.createElement("span", null, /*#__PURE__*/React$1.createElement(FormLabel, {
|
|
25045
|
+
sx: styles.label
|
|
25046
|
+
}, "Viewer"), /*#__PURE__*/React$1.createElement(Switch, Object.assign({
|
|
25047
|
+
"data-testid": "switchMode"
|
|
25048
|
+
}, props)), /*#__PURE__*/React$1.createElement(FormLabel, {
|
|
25049
|
+
sx: styles.label
|
|
25050
|
+
}, "Editor")));
|
|
25051
|
+
};
|
|
25052
|
+
|
|
24982
25053
|
/* *
|
|
24983
25054
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
24984
25055
|
* you may not use this file except in compliance with the License.
|
|
@@ -27232,4 +27303,4 @@ var createToolkitMockStoreWithEggs = function createToolkitMockStoreWithEggs(sto
|
|
|
27232
27303
|
return store;
|
|
27233
27304
|
};
|
|
27234
27305
|
|
|
27235
|
-
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, calculateStartSize, createMockStoreWithEggs, createMockStoreWithEggsAndMiddleware, createToolkitMockStoreWithEggs, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getPosition, getWarningMessage, isAxiosError, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
|
|
27306
|
+
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, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createMockStoreWithEggs, createMockStoreWithEggsAndMiddleware, createToolkitMockStoreWithEggs, 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.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": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"@mui/material": "5.12.0",
|
|
16
|
-
"@opengeoweb/theme": "8.
|
|
16
|
+
"@opengeoweb/theme": "8.3.0",
|
|
17
17
|
"@redux-eggs/core": "2.2.0",
|
|
18
18
|
"@reduxjs/toolkit": "1.9.5",
|
|
19
19
|
"axios": "1.5.0",
|
|
@@ -3,10 +3,6 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const AlertBannersGWTheme: {
|
|
7
|
-
(): React.ReactElement;
|
|
8
|
-
storyName: string;
|
|
9
|
-
};
|
|
10
6
|
export declare const AlertBannersLight: {
|
|
11
7
|
(): React.ReactElement;
|
|
12
8
|
storyName: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SwitchButton } from './SwitchButton';
|
|
@@ -10,6 +10,7 @@ type MenuItemType = {
|
|
|
10
10
|
text: string;
|
|
11
11
|
action: (event: React.MouseEvent) => void;
|
|
12
12
|
icon?: React.ReactNode;
|
|
13
|
+
isDisabled?: boolean;
|
|
13
14
|
};
|
|
14
15
|
interface ToggleMenuProps {
|
|
15
16
|
buttonTestId?: string;
|
|
@@ -22,6 +23,7 @@ interface ToggleMenuProps {
|
|
|
22
23
|
variant?: Variant;
|
|
23
24
|
isDefaultOpen?: boolean;
|
|
24
25
|
buttonIcon?: React.ReactNode;
|
|
26
|
+
isDisabled?: boolean;
|
|
25
27
|
}
|
|
26
28
|
export declare const ToggleMenu: React.FC<ToggleMenuProps>;
|
|
27
29
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/material';
|
|
3
3
|
import { NumberSize } from 're-resizable';
|
|
4
|
-
import { DraggablePosition, Position, ResizableComponentProps, Size } from '../DraggableResizable/types';
|
|
5
|
-
import {
|
|
4
|
+
import { DraggableSize, DraggablePosition, Position, ResizableComponentProps, Size } from '../DraggableResizable/types';
|
|
5
|
+
import { HeaderSize } from './types';
|
|
6
6
|
export declare const calculateDialogSizeAndPosition: () => {
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
top: number;
|
|
10
10
|
left: number;
|
|
11
11
|
};
|
|
12
|
-
export declare const calculateStartSize: (minSize:
|
|
12
|
+
export declare const calculateStartSize: (minSize: DraggableSize, prefSize: DraggableSize, startPosition: Position) => DraggableSize;
|
|
13
13
|
interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'> {
|
|
14
14
|
startPosition?: Position;
|
|
15
15
|
onStartResize?: () => void;
|
|
@@ -18,12 +18,3 @@ export interface ToolContainerProps extends PaperProps, ToolHeaderProps {
|
|
|
18
18
|
maxHeight?: string | number;
|
|
19
19
|
headerClassName?: string;
|
|
20
20
|
}
|
|
21
|
-
export type DialogSize = {
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
};
|
|
25
|
-
export type DialogPosition = {
|
|
26
|
-
top: number;
|
|
27
|
-
left?: number;
|
|
28
|
-
right?: number;
|
|
29
|
-
};
|