@opengeoweb/warnings 9.4.1 → 9.5.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
|
@@ -4,7 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
|
4
4
|
import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, FunnelCloud, TemperatureLow, CoastalEvent, breakpoints, Options } from '@opengeoweb/theme';
|
|
5
5
|
import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, drawtoolActions, mapStoreActions, layerActions, useSetupDialog } from '@opengeoweb/store';
|
|
6
6
|
import { emptyGeoJSON, MapControlButton, getGeoJSONPropertyValue, getIcon, rewindGeometry, currentlySupportedDrawModes } from '@opengeoweb/webmap-react';
|
|
7
|
-
import { useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, SwitchButton, StatusTag, ErrorBoundary, isAxiosError } from '@opengeoweb/shared';
|
|
7
|
+
import { useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, StatusTag, ErrorBoundary, isAxiosError } from '@opengeoweb/shared';
|
|
8
8
|
import { createEntityAdapter, createSlice, createSelector } from '@reduxjs/toolkit';
|
|
9
9
|
import { snackbarActions } from '@opengeoweb/snackbar';
|
|
10
10
|
import { styled, Box, Typography, ListItem, Grid, Paper, ListItemButton, Stack, LinearProgress, Button, FormHelperText, MenuItem, Tabs, Tab, FormControl, Card, CardContent, ListItemIcon, CircularProgress, List } from '@mui/material';
|
|
@@ -1639,7 +1639,7 @@ var ObjectManagerConnect = function ObjectManagerConnect(_ref) {
|
|
|
1639
1639
|
openDrawDialog = _useObjectDrawDialogA.openDrawDialog;
|
|
1640
1640
|
var geoJSONLayerId = getSingularDrawtoolDrawLayerId(mapId);
|
|
1641
1641
|
var currentLayer = useSelector(function (store) {
|
|
1642
|
-
return layerSelectors.
|
|
1642
|
+
return layerSelectors.getLayerByIdWithoutTimeDimension(store, geoJSONLayerId);
|
|
1643
1643
|
});
|
|
1644
1644
|
var currrentDrawing = useSelector(function (store) {
|
|
1645
1645
|
return selectDrawByInstanceId(store, drawingDialogType);
|
|
@@ -4538,6 +4538,18 @@ var DrawingToolConnect = function DrawingToolConnect(_ref) {
|
|
|
4538
4538
|
}, /*#__PURE__*/React.createElement(DrawingToolFormConnect, null));
|
|
4539
4539
|
};
|
|
4540
4540
|
|
|
4541
|
+
var WarningAvatar = function WarningAvatar(_ref) {
|
|
4542
|
+
var editor = _ref.editor,
|
|
4543
|
+
_ref$tooltipPlacement = _ref.tooltipPlacement,
|
|
4544
|
+
tooltipPlacement = _ref$tooltipPlacement === void 0 ? 'bottom' : _ref$tooltipPlacement;
|
|
4545
|
+
return /*#__PURE__*/React.createElement(CustomTooltip, {
|
|
4546
|
+
title: "Editor: ".concat(editor),
|
|
4547
|
+
placement: tooltipPlacement
|
|
4548
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Avatar, {
|
|
4549
|
+
size: "small"
|
|
4550
|
+
}, getInitials(editor))));
|
|
4551
|
+
};
|
|
4552
|
+
|
|
4541
4553
|
var DEFAULT_WARNING_DIALOG_SIZE = {
|
|
4542
4554
|
width: 320,
|
|
4543
4555
|
height: 800
|
|
@@ -4579,7 +4591,8 @@ var PublicWarningsFormDialog = function PublicWarningsFormDialog(_ref) {
|
|
|
4579
4591
|
_ref$onChangeFormMode = _ref.onChangeFormMode,
|
|
4580
4592
|
onChangeFormMode = _ref$onChangeFormMode === void 0 ? function () {} : _ref$onChangeFormMode,
|
|
4581
4593
|
_ref$shouldHideFormMo = _ref.shouldHideFormMode,
|
|
4582
|
-
shouldHideFormMode = _ref$shouldHideFormMo === void 0 ? false : _ref$shouldHideFormMo
|
|
4594
|
+
shouldHideFormMode = _ref$shouldHideFormMo === void 0 ? false : _ref$shouldHideFormMo,
|
|
4595
|
+
publicWarningEditor = _ref.publicWarningEditor;
|
|
4583
4596
|
var minSize = DEFAULT_WARNING_DIALOG_MIN_SIZE;
|
|
4584
4597
|
var startSizeCalc = calculateStartSize(minSize, size, startPosition);
|
|
4585
4598
|
var _React$useState = React.useState(startSizeCalc),
|
|
@@ -4633,7 +4646,8 @@ var PublicWarningsFormDialog = function PublicWarningsFormDialog(_ref) {
|
|
|
4633
4646
|
right: 32,
|
|
4634
4647
|
backgroundColor: 'geowebColors.background.surface',
|
|
4635
4648
|
height: 24,
|
|
4636
|
-
paddingLeft: 1
|
|
4649
|
+
paddingLeft: 1,
|
|
4650
|
+
paddingRight: 0.5
|
|
4637
4651
|
}
|
|
4638
4652
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
4639
4653
|
sx: {
|
|
@@ -4643,7 +4657,15 @@ var PublicWarningsFormDialog = function PublicWarningsFormDialog(_ref) {
|
|
|
4643
4657
|
}, /*#__PURE__*/React.createElement(SwitchButton, {
|
|
4644
4658
|
checked: !isReadOnly,
|
|
4645
4659
|
onChange: onChangeMode
|
|
4646
|
-
}))
|
|
4660
|
+
})), publicWarningEditor && ( /*#__PURE__*/React.createElement(Box, {
|
|
4661
|
+
sx: {
|
|
4662
|
+
position: 'relative',
|
|
4663
|
+
top: 3,
|
|
4664
|
+
right: '-2px'
|
|
4665
|
+
}
|
|
4666
|
+
}, /*#__PURE__*/React.createElement(WarningAvatar, {
|
|
4667
|
+
editor: publicWarningEditor
|
|
4668
|
+
})))))
|
|
4647
4669
|
}, {
|
|
4648
4670
|
sx: {
|
|
4649
4671
|
footer: {
|
|
@@ -6011,9 +6033,22 @@ var WarningsOnStatus = function WarningsOnStatus(_ref) {
|
|
|
6011
6033
|
}
|
|
6012
6034
|
}, ((_a = warning.warningDetail) === null || _a === void 0 ? void 0 : _a.level) && (levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.title) || '-')), /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
|
|
6013
6035
|
status: status
|
|
6014
|
-
}, status === 'DRAFT' ? ( /*#__PURE__*/React__default.createElement(
|
|
6036
|
+
}, status === 'DRAFT' ? ( /*#__PURE__*/React__default.createElement(Box, {
|
|
6037
|
+
sx: {
|
|
6038
|
+
position: 'relative'
|
|
6039
|
+
}
|
|
6040
|
+
}, warning.editor && ( /*#__PURE__*/React__default.createElement(Box, {
|
|
6041
|
+
sx: {
|
|
6042
|
+
width: '16px',
|
|
6043
|
+
position: 'absolute',
|
|
6044
|
+
top: '1px',
|
|
6045
|
+
right: '-25px'
|
|
6046
|
+
}
|
|
6047
|
+
}, /*#__PURE__*/React__default.createElement(WarningAvatar, {
|
|
6048
|
+
editor: warning.editor
|
|
6049
|
+
}))), /*#__PURE__*/React__default.createElement(Button, {
|
|
6015
6050
|
sx: {
|
|
6016
|
-
height: '
|
|
6051
|
+
height: '20px',
|
|
6017
6052
|
padding: '0px',
|
|
6018
6053
|
'& .MuiSvgIcon-root': {
|
|
6019
6054
|
marginRight: '-2px'
|
|
@@ -6021,7 +6056,7 @@ var WarningsOnStatus = function WarningsOnStatus(_ref) {
|
|
|
6021
6056
|
},
|
|
6022
6057
|
variant: "flat",
|
|
6023
6058
|
startIcon: /*#__PURE__*/React__default.createElement(Edit, null)
|
|
6024
|
-
}, "DRAFT")) : ( /*#__PURE__*/React__default.createElement(StatusTag, {
|
|
6059
|
+
}, "DRAFT"))) : ( /*#__PURE__*/React__default.createElement(StatusTag, {
|
|
6025
6060
|
content: status.toLowerCase(),
|
|
6026
6061
|
color: status === 'EXPIRED' ? 'grey' : 'green',
|
|
6027
6062
|
sx: {
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TooltipProps } from '@mui/material';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface WarningAvatarProps {
|
|
4
|
+
editor: string;
|
|
5
|
+
tooltipPlacement?: TooltipProps['placement'];
|
|
6
|
+
}
|
|
7
|
+
declare const WarningAvatar: React.FC<WarningAvatarProps>;
|
|
8
|
+
export default WarningAvatar;
|