@opengeoweb/shared 2.10.0 → 2.14.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,13 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { Box, Typography, Dialog, DialogTitle, IconButton, DialogContent, DialogActions, Button, Alert, AlertTitle, Grid, useTheme, Link, Avatar, Paper, ClickAwayListener, MenuList, MenuItem, RadioGroup, FormControlLabel, Radio, List, ListItem, Tabs, Tab, Backdrop, Slider, ToggleButton,
|
|
4
|
-
import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, Resize, DragHandle, ArrowLeft, ArrowRight,
|
|
3
|
+
import { Box, Typography, Dialog, DialogTitle, IconButton, DialogContent, DialogActions, Button, CircularProgress, Alert, AlertTitle, Grid, useTheme, Link, Avatar, Paper, ClickAwayListener, MenuList, MenuItem, RadioGroup, FormControlLabel, Radio, Tooltip, List, ListItem, Tabs, Tab, Backdrop, Slider, ToggleButton, Menu, ListItemIcon, Checkbox, Select } from '@mui/material';
|
|
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';
|
|
6
6
|
import { isEmpty, errorMessages } from '@opengeoweb/form-fields';
|
|
7
7
|
import makeStyles from '@mui/styles/makeStyles';
|
|
8
8
|
import Draggable from 'react-draggable';
|
|
9
9
|
import { Resizable } from 're-resizable';
|
|
10
|
-
import { useThemeContext } from '@opengeoweb/theme';
|
|
11
10
|
import { throttle } from 'lodash';
|
|
12
11
|
import withStyles from '@mui/styles/withStyles';
|
|
13
12
|
import createStyles from '@mui/styles/createStyles';
|
|
@@ -102,6 +101,20 @@ function __rest(s, e) {
|
|
|
102
101
|
return t;
|
|
103
102
|
}
|
|
104
103
|
|
|
104
|
+
var confirmStyle = {
|
|
105
|
+
width: {
|
|
106
|
+
xs: '100%',
|
|
107
|
+
sm: '150px'
|
|
108
|
+
},
|
|
109
|
+
marginLeft: {
|
|
110
|
+
xs: '0px!important',
|
|
111
|
+
sm: '8px!important'
|
|
112
|
+
},
|
|
113
|
+
marginTop: {
|
|
114
|
+
xs: 2,
|
|
115
|
+
sm: 0
|
|
116
|
+
}
|
|
117
|
+
};
|
|
105
118
|
var ConfirmationDialog = function ConfirmationDialog(_a) {
|
|
106
119
|
var open = _a.open,
|
|
107
120
|
title = _a.title,
|
|
@@ -117,7 +130,9 @@ var ConfirmationDialog = function ConfirmationDialog(_a) {
|
|
|
117
130
|
content = _a$content === void 0 ? null : _a$content,
|
|
118
131
|
_a$disableAutoFocus = _a.disableAutoFocus,
|
|
119
132
|
disableAutoFocus = _a$disableAutoFocus === void 0 ? false : _a$disableAutoFocus,
|
|
120
|
-
|
|
133
|
+
_a$isLoading = _a.isLoading,
|
|
134
|
+
isLoading = _a$isLoading === void 0 ? false : _a$isLoading,
|
|
135
|
+
other = __rest(_a, ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content", "disableAutoFocus", "isLoading"]);
|
|
121
136
|
|
|
122
137
|
other.catchOnCancel;
|
|
123
138
|
var rest = __rest(other, ["catchOnCancel"]); // remove unwanted props
|
|
@@ -201,29 +216,28 @@ var ConfirmationDialog = function ConfirmationDialog(_a) {
|
|
|
201
216
|
return _onClose('CANCELLED');
|
|
202
217
|
},
|
|
203
218
|
disableFocusRipple: true
|
|
204
|
-
}, cancelLabel), /*#__PURE__*/React.createElement(
|
|
219
|
+
}, cancelLabel), isLoading ? /*#__PURE__*/React.createElement(Box, {
|
|
220
|
+
"data-testid": "confirm-dialog-spinner",
|
|
221
|
+
sx: Object.assign(Object.assign({}, confirmStyle), {
|
|
222
|
+
height: '40px',
|
|
223
|
+
display: 'flex',
|
|
224
|
+
justifyContent: 'center',
|
|
225
|
+
alignItems: 'center'
|
|
226
|
+
})
|
|
227
|
+
}, /*#__PURE__*/React.createElement(CircularProgress, {
|
|
228
|
+
size: 40,
|
|
229
|
+
color: "secondary"
|
|
230
|
+
})) : /*#__PURE__*/React.createElement(Button, {
|
|
205
231
|
"data-testid": "confirmationDialog-confirm",
|
|
206
232
|
variant: "primary",
|
|
207
233
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
208
234
|
sx: function sx(theme) {
|
|
209
|
-
return {
|
|
210
|
-
width: {
|
|
211
|
-
xs: '100%',
|
|
212
|
-
sm: '150px'
|
|
213
|
-
},
|
|
214
|
-
marginLeft: {
|
|
215
|
-
xs: '0px!important',
|
|
216
|
-
sm: '8px!important'
|
|
217
|
-
},
|
|
218
|
-
marginTop: {
|
|
219
|
-
xs: 2,
|
|
220
|
-
sm: 0
|
|
221
|
-
},
|
|
235
|
+
return Object.assign(Object.assign({}, confirmStyle), {
|
|
222
236
|
'&:focus': {
|
|
223
237
|
outline: theme.palette.geowebColors.buttons.focusDefault.outline,
|
|
224
238
|
borderColor: 'transparent'
|
|
225
239
|
}
|
|
226
|
-
};
|
|
240
|
+
});
|
|
227
241
|
},
|
|
228
242
|
onClick: onSubmit,
|
|
229
243
|
autoFocus: !disableAutoFocus,
|
|
@@ -1050,12 +1064,12 @@ var ResizeComponent = function ResizeComponent(_a) {
|
|
|
1050
1064
|
onResizeStop: onResizeStop,
|
|
1051
1065
|
handleComponent: {
|
|
1052
1066
|
bottomRight: /*#__PURE__*/React__default.createElement(Resize, {
|
|
1053
|
-
isRightAligned: true,
|
|
1054
1067
|
style: {
|
|
1055
1068
|
fill: "".concat(theme.palette.geowebColors.buttons.flat["default"].color)
|
|
1056
1069
|
}
|
|
1057
1070
|
}),
|
|
1058
1071
|
bottomLeft: /*#__PURE__*/React__default.createElement(Resize, {
|
|
1072
|
+
isRightAligned: true,
|
|
1059
1073
|
style: {
|
|
1060
1074
|
fill: "".concat(theme.palette.geowebColors.buttons.flat["default"].color)
|
|
1061
1075
|
}
|
|
@@ -1408,11 +1422,6 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
1408
1422
|
_ref$leftComponent = _ref.leftComponent,
|
|
1409
1423
|
leftComponent = _ref$leftComponent === void 0 ? null : _ref$leftComponent;
|
|
1410
1424
|
var styles = getStyle(size);
|
|
1411
|
-
|
|
1412
|
-
var onClickClose = function onClickClose() {
|
|
1413
|
-
return onClose();
|
|
1414
|
-
};
|
|
1415
|
-
|
|
1416
1425
|
var columnSizeIcon = leftComponent ? 3 : 1;
|
|
1417
1426
|
var columnSizeTitle = leftComponent ? 6 : 10;
|
|
1418
1427
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -1472,14 +1481,21 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
1472
1481
|
xs: columnSizeIcon,
|
|
1473
1482
|
container: true,
|
|
1474
1483
|
justifyContent: "flex-end"
|
|
1475
|
-
}, onClose && /*#__PURE__*/React__default.createElement(
|
|
1484
|
+
}, onClose && /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
1485
|
+
title: "Close",
|
|
1486
|
+
placement: "bottom",
|
|
1487
|
+
sx: {
|
|
1488
|
+
pointerEvents: 'none'
|
|
1489
|
+
}
|
|
1490
|
+
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
1476
1491
|
"data-testid": "closeBtn",
|
|
1477
|
-
onClick:
|
|
1492
|
+
onClick: onClose,
|
|
1493
|
+
onTouchEnd: onClose,
|
|
1478
1494
|
size: "large",
|
|
1479
1495
|
sx: iconStyle
|
|
1480
1496
|
}, /*#__PURE__*/React__default.createElement(Close, {
|
|
1481
1497
|
"data-testid": "CloseIcon"
|
|
1482
|
-
})))));
|
|
1498
|
+
}))))));
|
|
1483
1499
|
};
|
|
1484
1500
|
|
|
1485
1501
|
/* *
|
|
@@ -1855,7 +1871,7 @@ var shortcuts = [{
|
|
|
1855
1871
|
type: "connect"
|
|
1856
1872
|
}, "+"), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1857
1873
|
type: "icon"
|
|
1858
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1874
|
+
}, /*#__PURE__*/React__default.createElement(KeyOption, null)), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1859
1875
|
type: "connect"
|
|
1860
1876
|
}, "+"), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1861
1877
|
type: "icon"
|
|
@@ -1899,7 +1915,7 @@ var shortcuts = [{
|
|
|
1899
1915
|
type: "connect"
|
|
1900
1916
|
}, "+"), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1901
1917
|
type: "icon"
|
|
1902
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1918
|
+
}, /*#__PURE__*/React__default.createElement(KeyOption, null)), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1903
1919
|
type: "connect"
|
|
1904
1920
|
}, "+"), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1905
1921
|
type: "icon"
|
|
@@ -1919,7 +1935,7 @@ var shortcuts = [{
|
|
|
1919
1935
|
}, /*#__PURE__*/React__default.createElement(ArrowDown, null)), /*#__PURE__*/React__default.createElement(ShortCutSegment, null, "(when slider active)")),
|
|
1920
1936
|
descriptionMac: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1921
1937
|
type: "icon"
|
|
1922
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1938
|
+
}, /*#__PURE__*/React__default.createElement(KeyCommand, null)), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1923
1939
|
type: "connect"
|
|
1924
1940
|
}, "+"), /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1925
1941
|
type: "icon"
|
|
@@ -1947,7 +1963,7 @@ var shortcuts = [{
|
|
|
1947
1963
|
}, "Ctrl"), /*#__PURE__*/React__default.createElement(ShortCutSegment, null, " + Mouse scroll")),
|
|
1948
1964
|
descriptionMac: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ShortCutSegment, {
|
|
1949
1965
|
type: "icon"
|
|
1950
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1966
|
+
}, /*#__PURE__*/React__default.createElement(KeyCommand, null)), /*#__PURE__*/React__default.createElement(ShortCutSegment, null, " + Mouse scroll"))
|
|
1951
1967
|
}];
|
|
1952
1968
|
var getShortcutList = function getShortcutList(shortcutList) {
|
|
1953
1969
|
var platform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'windows';
|
|
@@ -2337,7 +2353,10 @@ var ToolButton = function ToolButton(_a) {
|
|
|
2337
2353
|
width: "".concat(width, "!important"),
|
|
2338
2354
|
height: "".concat(height, "!important"),
|
|
2339
2355
|
textTransform: 'none!important',
|
|
2340
|
-
padding: '11px!important'
|
|
2356
|
+
padding: '11px!important',
|
|
2357
|
+
'& .MuiSvgIcon-root': {
|
|
2358
|
+
marginRight: '0px!important'
|
|
2359
|
+
}
|
|
2341
2360
|
}, sx)
|
|
2342
2361
|
}, props), children);
|
|
2343
2362
|
};
|
|
@@ -2482,10 +2501,10 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
2482
2501
|
var useStyles = makeStyles(function (theme) {
|
|
2483
2502
|
return createStyles({
|
|
2484
2503
|
button: {
|
|
2485
|
-
height:
|
|
2486
|
-
width:
|
|
2504
|
+
height: 24,
|
|
2505
|
+
width: 24,
|
|
2487
2506
|
borderRadius: 5,
|
|
2488
|
-
marginTop:
|
|
2507
|
+
marginTop: 4,
|
|
2489
2508
|
color: function color(_ref) {
|
|
2490
2509
|
var isActive = _ref.isActive,
|
|
2491
2510
|
isAccessible = _ref.isAccessible,
|
|
@@ -2594,12 +2613,7 @@ var ManagerDeleteButton = function ManagerDeleteButton(_ref) {
|
|
|
2594
2613
|
return /*#__PURE__*/React.createElement(ManagerButton, {
|
|
2595
2614
|
tooltipTitle: tooltipTitle,
|
|
2596
2615
|
onClick: onClickDelete,
|
|
2597
|
-
icon: /*#__PURE__*/React.createElement(Delete,
|
|
2598
|
-
sx: {
|
|
2599
|
-
width: 20,
|
|
2600
|
-
height: 20
|
|
2601
|
-
}
|
|
2602
|
-
}),
|
|
2616
|
+
icon: /*#__PURE__*/React.createElement(Delete, null),
|
|
2603
2617
|
testId: "deleteButton",
|
|
2604
2618
|
isEnabled: isEnabled
|
|
2605
2619
|
});
|
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('@opengeoweb/
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', '@opengeoweb/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Shared = {}, global.React, global.material, global.
|
|
5
|
-
})(this, (function (exports, React, material,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('@opengeoweb/theme'), require('react-hook-form'), require('@opengeoweb/form-fields'), require('@mui/styles/makeStyles'), require('react-draggable'), require('re-resizable'), require('lodash'), require('@mui/styles/withStyles'), require('@mui/styles/createStyles')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', '@opengeoweb/theme', 'react-hook-form', '@opengeoweb/form-fields', '@mui/styles/makeStyles', 'react-draggable', 're-resizable', 'lodash', '@mui/styles/withStyles', '@mui/styles/createStyles'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Shared = {}, global.React, global.material, global.theme, global.reactHookForm, global.formFields, global.makeStyles, global.Draggable, global.reResizable, global.lodash, global.withStyles, global.createStyles));
|
|
5
|
+
})(this, (function (exports, React, material, theme, reactHookForm, formFields, makeStyles, Draggable, reResizable, lodash, withStyles, createStyles) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -159,6 +159,20 @@
|
|
|
159
159
|
}, content));
|
|
160
160
|
};
|
|
161
161
|
|
|
162
|
+
var confirmStyle = {
|
|
163
|
+
width: {
|
|
164
|
+
xs: '100%',
|
|
165
|
+
sm: '150px'
|
|
166
|
+
},
|
|
167
|
+
marginLeft: {
|
|
168
|
+
xs: '0px!important',
|
|
169
|
+
sm: '8px!important'
|
|
170
|
+
},
|
|
171
|
+
marginTop: {
|
|
172
|
+
xs: 2,
|
|
173
|
+
sm: 0
|
|
174
|
+
}
|
|
175
|
+
};
|
|
162
176
|
var ConfirmationDialog = function ConfirmationDialog(_a) {
|
|
163
177
|
var open = _a.open,
|
|
164
178
|
title = _a.title,
|
|
@@ -174,7 +188,9 @@
|
|
|
174
188
|
content = _e === void 0 ? null : _e,
|
|
175
189
|
_f = _a.disableAutoFocus,
|
|
176
190
|
disableAutoFocus = _f === void 0 ? false : _f,
|
|
177
|
-
|
|
191
|
+
_g = _a.isLoading,
|
|
192
|
+
isLoading = _g === void 0 ? false : _g,
|
|
193
|
+
other = __rest(_a, ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content", "disableAutoFocus", "isLoading"]);
|
|
178
194
|
|
|
179
195
|
other.catchOnCancel;
|
|
180
196
|
var rest = __rest(other, ["catchOnCancel"]); // remove unwanted props
|
|
@@ -222,7 +238,7 @@
|
|
|
222
238
|
return _onClose('CLOSED');
|
|
223
239
|
},
|
|
224
240
|
size: "small"
|
|
225
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
241
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Close, {
|
|
226
242
|
"data-testid": "CloseIcon"
|
|
227
243
|
}))), /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
|
|
228
244
|
sx: {
|
|
@@ -258,29 +274,28 @@
|
|
|
258
274
|
return _onClose('CANCELLED');
|
|
259
275
|
},
|
|
260
276
|
disableFocusRipple: true
|
|
261
|
-
}, cancelLabel), /*#__PURE__*/React__namespace.createElement(material.
|
|
277
|
+
}, cancelLabel), isLoading ? /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
278
|
+
"data-testid": "confirm-dialog-spinner",
|
|
279
|
+
sx: __assign(__assign({}, confirmStyle), {
|
|
280
|
+
height: '40px',
|
|
281
|
+
display: 'flex',
|
|
282
|
+
justifyContent: 'center',
|
|
283
|
+
alignItems: 'center'
|
|
284
|
+
})
|
|
285
|
+
}, /*#__PURE__*/React__namespace.createElement(material.CircularProgress, {
|
|
286
|
+
size: 40,
|
|
287
|
+
color: "secondary"
|
|
288
|
+
})) : /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
262
289
|
"data-testid": "confirmationDialog-confirm",
|
|
263
290
|
variant: "primary",
|
|
264
291
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
265
292
|
sx: function sx(theme) {
|
|
266
|
-
return {
|
|
267
|
-
width: {
|
|
268
|
-
xs: '100%',
|
|
269
|
-
sm: '150px'
|
|
270
|
-
},
|
|
271
|
-
marginLeft: {
|
|
272
|
-
xs: '0px!important',
|
|
273
|
-
sm: '8px!important'
|
|
274
|
-
},
|
|
275
|
-
marginTop: {
|
|
276
|
-
xs: 2,
|
|
277
|
-
sm: 0
|
|
278
|
-
},
|
|
293
|
+
return __assign(__assign({}, confirmStyle), {
|
|
279
294
|
'&:focus': {
|
|
280
295
|
outline: theme.palette.geowebColors.buttons.focusDefault.outline,
|
|
281
296
|
borderColor: 'transparent'
|
|
282
297
|
}
|
|
283
|
-
};
|
|
298
|
+
});
|
|
284
299
|
},
|
|
285
300
|
onClick: onSubmit,
|
|
286
301
|
autoFocus: !disableAutoFocus,
|
|
@@ -569,7 +584,7 @@
|
|
|
569
584
|
|
|
570
585
|
switch (severity) {
|
|
571
586
|
case 'info':
|
|
572
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
587
|
+
return /*#__PURE__*/React__namespace.createElement(theme.Info, {
|
|
573
588
|
sx: {
|
|
574
589
|
color: 'geowebColors.functional.notification'
|
|
575
590
|
},
|
|
@@ -577,7 +592,7 @@
|
|
|
577
592
|
});
|
|
578
593
|
|
|
579
594
|
case 'success':
|
|
580
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
595
|
+
return /*#__PURE__*/React__namespace.createElement(theme.Success, {
|
|
581
596
|
sx: {
|
|
582
597
|
color: 'geowebColors.functional.success'
|
|
583
598
|
},
|
|
@@ -585,7 +600,7 @@
|
|
|
585
600
|
});
|
|
586
601
|
|
|
587
602
|
case 'warning':
|
|
588
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
603
|
+
return /*#__PURE__*/React__namespace.createElement(theme.Exclamation, {
|
|
589
604
|
sx: {
|
|
590
605
|
color: 'geowebColors.functional.warning'
|
|
591
606
|
},
|
|
@@ -594,7 +609,7 @@
|
|
|
594
609
|
|
|
595
610
|
case 'error':
|
|
596
611
|
default:
|
|
597
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
612
|
+
return /*#__PURE__*/React__namespace.createElement(theme.Exclamation, {
|
|
598
613
|
sx: {
|
|
599
614
|
color: 'geowebColors.functional.error'
|
|
600
615
|
},
|
|
@@ -688,7 +703,7 @@
|
|
|
688
703
|
sx: {
|
|
689
704
|
backgroundColor: 'transparent!important'
|
|
690
705
|
},
|
|
691
|
-
startIcon: /*#__PURE__*/React__namespace.createElement(
|
|
706
|
+
startIcon: /*#__PURE__*/React__namespace.createElement(theme.ChevronRight, null)
|
|
692
707
|
}, actionButtonProps.title.toUpperCase()));
|
|
693
708
|
};
|
|
694
709
|
|
|
@@ -806,7 +821,7 @@
|
|
|
806
821
|
justifyContent: "center",
|
|
807
822
|
alignItems: "center",
|
|
808
823
|
wrap: "nowrap"
|
|
809
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
824
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.GeoWebLogo, null), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
810
825
|
variant: "h1",
|
|
811
826
|
className: classes.title
|
|
812
827
|
}, title))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
@@ -883,7 +898,7 @@
|
|
|
883
898
|
minWidth = _e === void 0 ? 50 : _e,
|
|
884
899
|
props = __rest(_a, ["startPosition", "children", "onResizeStart", "size", "setSize", "minHeight", "minWidth"]);
|
|
885
900
|
|
|
886
|
-
var theme = material.useTheme();
|
|
901
|
+
var theme$1 = material.useTheme();
|
|
887
902
|
var isRightAligned = startPosition && startPosition.right !== null && startPosition.right !== undefined;
|
|
888
903
|
var onStartResize = React__default["default"].useCallback(function (event, _direction, node) {
|
|
889
904
|
event.stopPropagation();
|
|
@@ -917,15 +932,15 @@
|
|
|
917
932
|
size: size,
|
|
918
933
|
onResizeStop: onResizeStop,
|
|
919
934
|
handleComponent: {
|
|
920
|
-
bottomRight: /*#__PURE__*/React__default["default"].createElement(
|
|
921
|
-
isRightAligned: true,
|
|
935
|
+
bottomRight: /*#__PURE__*/React__default["default"].createElement(theme.Resize, {
|
|
922
936
|
style: {
|
|
923
|
-
fill: "" + theme.palette.geowebColors.buttons.flat["default"].color
|
|
937
|
+
fill: "" + theme$1.palette.geowebColors.buttons.flat["default"].color
|
|
924
938
|
}
|
|
925
939
|
}),
|
|
926
|
-
bottomLeft: /*#__PURE__*/React__default["default"].createElement(
|
|
940
|
+
bottomLeft: /*#__PURE__*/React__default["default"].createElement(theme.Resize, {
|
|
941
|
+
isRightAligned: true,
|
|
927
942
|
style: {
|
|
928
|
-
fill: "" + theme.palette.geowebColors.buttons.flat["default"].color
|
|
943
|
+
fill: "" + theme$1.palette.geowebColors.buttons.flat["default"].color
|
|
929
944
|
}
|
|
930
945
|
})
|
|
931
946
|
},
|
|
@@ -1268,11 +1283,6 @@
|
|
|
1268
1283
|
_e = _a.leftComponent,
|
|
1269
1284
|
leftComponent = _e === void 0 ? null : _e;
|
|
1270
1285
|
var styles = getStyle(size);
|
|
1271
|
-
|
|
1272
|
-
var onClickClose = function onClickClose() {
|
|
1273
|
-
return onClose();
|
|
1274
|
-
};
|
|
1275
|
-
|
|
1276
1286
|
var columnSizeIcon = leftComponent ? 3 : 1;
|
|
1277
1287
|
var columnSizeTitle = leftComponent ? 6 : 10;
|
|
1278
1288
|
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
@@ -1304,7 +1314,7 @@
|
|
|
1304
1314
|
sx: __assign(__assign({}, iconStyle), {
|
|
1305
1315
|
pointerEvents: 'none'
|
|
1306
1316
|
})
|
|
1307
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1317
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, null))), leftComponent && leftComponent), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1308
1318
|
item: true,
|
|
1309
1319
|
xs: columnSizeTitle
|
|
1310
1320
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
@@ -1327,19 +1337,26 @@
|
|
|
1327
1337
|
transform: 'rotate(90deg)',
|
|
1328
1338
|
height: 12
|
|
1329
1339
|
})
|
|
1330
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1340
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, null)))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1331
1341
|
item: true,
|
|
1332
1342
|
xs: columnSizeIcon,
|
|
1333
1343
|
container: true,
|
|
1334
1344
|
justifyContent: "flex-end"
|
|
1335
|
-
}, onClose && /*#__PURE__*/React__default["default"].createElement(material.
|
|
1345
|
+
}, onClose && /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
1346
|
+
title: "Close",
|
|
1347
|
+
placement: "bottom",
|
|
1348
|
+
sx: {
|
|
1349
|
+
pointerEvents: 'none'
|
|
1350
|
+
}
|
|
1351
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
|
|
1336
1352
|
"data-testid": "closeBtn",
|
|
1337
|
-
onClick:
|
|
1353
|
+
onClick: onClose,
|
|
1354
|
+
onTouchEnd: onClose,
|
|
1338
1355
|
size: "large",
|
|
1339
1356
|
sx: iconStyle
|
|
1340
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1357
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.Close, {
|
|
1341
1358
|
"data-testid": "CloseIcon"
|
|
1342
|
-
})))));
|
|
1359
|
+
}))))));
|
|
1343
1360
|
};
|
|
1344
1361
|
|
|
1345
1362
|
/* *
|
|
@@ -1704,26 +1721,26 @@
|
|
|
1704
1721
|
type: "connect"
|
|
1705
1722
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1706
1723
|
type: "icon"
|
|
1707
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1724
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowLeft, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1708
1725
|
type: "divider"
|
|
1709
1726
|
}, "or"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1710
1727
|
type: "icon"
|
|
1711
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1728
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowRight, null))),
|
|
1712
1729
|
descriptionMac: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1713
1730
|
type: "icon"
|
|
1714
1731
|
}, "Ctrl"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1715
1732
|
type: "connect"
|
|
1716
1733
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1717
1734
|
type: "icon"
|
|
1718
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1735
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.KeyOption, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1719
1736
|
type: "connect"
|
|
1720
1737
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1721
1738
|
type: "icon"
|
|
1722
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1739
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowLeft, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1723
1740
|
type: "divider"
|
|
1724
1741
|
}, "or"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1725
1742
|
type: "icon"
|
|
1726
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1743
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowRight, null)))
|
|
1727
1744
|
}, {
|
|
1728
1745
|
title: 'Toggle hide/show time slider',
|
|
1729
1746
|
description: /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
@@ -1759,7 +1776,7 @@
|
|
|
1759
1776
|
type: "connect"
|
|
1760
1777
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1761
1778
|
type: "icon"
|
|
1762
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1779
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.KeyOption, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1763
1780
|
type: "connect"
|
|
1764
1781
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1765
1782
|
type: "icon"
|
|
@@ -1772,22 +1789,22 @@
|
|
|
1772
1789
|
type: "connect"
|
|
1773
1790
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1774
1791
|
type: "icon"
|
|
1775
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1792
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowUp, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1776
1793
|
type: "divider"
|
|
1777
1794
|
}, "or"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1778
1795
|
type: "icon"
|
|
1779
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1796
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowDown, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, null, "(when slider active)")),
|
|
1780
1797
|
descriptionMac: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1781
1798
|
type: "icon"
|
|
1782
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1799
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.KeyCommand, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1783
1800
|
type: "connect"
|
|
1784
1801
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1785
1802
|
type: "icon"
|
|
1786
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1803
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowUp, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1787
1804
|
type: "divider"
|
|
1788
1805
|
}, "or"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1789
1806
|
type: "icon"
|
|
1790
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1807
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowDown, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, null, "(when slider active)"))
|
|
1791
1808
|
}, {
|
|
1792
1809
|
title: 'Return to current time',
|
|
1793
1810
|
description: /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
@@ -1799,7 +1816,7 @@
|
|
|
1799
1816
|
type: "connect"
|
|
1800
1817
|
}, "+"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1801
1818
|
type: "icon"
|
|
1802
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1819
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.ArrowLeft, null)))
|
|
1803
1820
|
}, {
|
|
1804
1821
|
title: 'Change layer manager values by scrolling',
|
|
1805
1822
|
description: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
@@ -1807,7 +1824,7 @@
|
|
|
1807
1824
|
}, "Ctrl"), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, null, " + Mouse scroll")),
|
|
1808
1825
|
descriptionMac: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, {
|
|
1809
1826
|
type: "icon"
|
|
1810
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1827
|
+
}, /*#__PURE__*/React__default["default"].createElement(theme.KeyCommand, null)), /*#__PURE__*/React__default["default"].createElement(ShortCutSegment, null, " + Mouse scroll"))
|
|
1811
1828
|
}];
|
|
1812
1829
|
var getShortcutList = function getShortcutList(shortcutList, platform) {
|
|
1813
1830
|
if (platform === void 0) {
|
|
@@ -2230,7 +2247,10 @@
|
|
|
2230
2247
|
width: width + "!important",
|
|
2231
2248
|
height: height + "!important",
|
|
2232
2249
|
textTransform: 'none!important',
|
|
2233
|
-
padding: '11px!important'
|
|
2250
|
+
padding: '11px!important',
|
|
2251
|
+
'& .MuiSvgIcon-root': {
|
|
2252
|
+
marginRight: '0px!important'
|
|
2253
|
+
}
|
|
2234
2254
|
}, sx)
|
|
2235
2255
|
}, props), children);
|
|
2236
2256
|
};
|
|
@@ -2324,7 +2344,7 @@
|
|
|
2324
2344
|
"data-testid": buttonTestId,
|
|
2325
2345
|
variant: variant,
|
|
2326
2346
|
id: buttonTestId
|
|
2327
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
2347
|
+
}, /*#__PURE__*/React__namespace.createElement(theme.Options, null)))), /*#__PURE__*/React__namespace.createElement(material.Menu, {
|
|
2328
2348
|
anchorEl: anchorEl,
|
|
2329
2349
|
open: isOpen,
|
|
2330
2350
|
onClose: handleClose,
|
|
@@ -2374,10 +2394,10 @@
|
|
|
2374
2394
|
var useStyles = makeStyles__default["default"](function (theme) {
|
|
2375
2395
|
return createStyles__default["default"]({
|
|
2376
2396
|
button: {
|
|
2377
|
-
height:
|
|
2378
|
-
width:
|
|
2397
|
+
height: 24,
|
|
2398
|
+
width: 24,
|
|
2379
2399
|
borderRadius: 5,
|
|
2380
|
-
marginTop:
|
|
2400
|
+
marginTop: 4,
|
|
2381
2401
|
color: function color(_a) {
|
|
2382
2402
|
var isActive = _a.isActive,
|
|
2383
2403
|
isAccessible = _a.isAccessible,
|
|
@@ -2486,12 +2506,7 @@
|
|
|
2486
2506
|
return /*#__PURE__*/React__namespace.createElement(ManagerButton, {
|
|
2487
2507
|
tooltipTitle: tooltipTitle,
|
|
2488
2508
|
onClick: onClickDelete,
|
|
2489
|
-
icon: /*#__PURE__*/React__namespace.createElement(
|
|
2490
|
-
sx: {
|
|
2491
|
-
width: 20,
|
|
2492
|
-
height: 20
|
|
2493
|
-
}
|
|
2494
|
-
}),
|
|
2509
|
+
icon: /*#__PURE__*/React__namespace.createElement(theme.Delete, null),
|
|
2495
2510
|
testId: "deleteButton",
|
|
2496
2511
|
isEnabled: isEnabled
|
|
2497
2512
|
});
|
|
@@ -2540,8 +2555,8 @@
|
|
|
2540
2555
|
color: 'inherit'
|
|
2541
2556
|
}
|
|
2542
2557
|
},
|
|
2543
|
-
icon: /*#__PURE__*/React__namespace.createElement(
|
|
2544
|
-
checkedIcon: /*#__PURE__*/React__namespace.createElement(
|
|
2558
|
+
icon: /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null),
|
|
2559
|
+
checkedIcon: /*#__PURE__*/React__namespace.createElement(theme.Visibility, null),
|
|
2545
2560
|
checked: isEnabled,
|
|
2546
2561
|
disableFocusRipple: true,
|
|
2547
2562
|
tabIndex: -1
|
|
@@ -13,6 +13,7 @@ interface ConfirmationDialogProps extends ConfirmationOptions {
|
|
|
13
13
|
open: boolean;
|
|
14
14
|
onSubmit: () => void;
|
|
15
15
|
onClose: (reason: ConfirmationAction) => void;
|
|
16
|
+
isLoading?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const ConfirmationDialog: React.FC<ConfirmationDialogProps>;
|
|
18
19
|
export default ConfirmationDialog;
|
|
@@ -4,6 +4,7 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const ConfirmationDialogCustom: () => React.ReactElement;
|
|
7
|
+
export declare const ConfirmationDialogLoading: () => React.ReactElement;
|
|
7
8
|
export declare const ConfirmationDialogLight: {
|
|
8
9
|
(): React.ReactElement;
|
|
9
10
|
storyName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.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,14 +14,12 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^17.0.2",
|
|
16
16
|
"@mui/material": "^5.2.8",
|
|
17
|
-
"@opengeoweb/theme": "2.
|
|
17
|
+
"@opengeoweb/theme": "2.14.0",
|
|
18
18
|
"@mui/styles": "^5.2.3",
|
|
19
|
-
"@mui/icons-material": "^5.2.5",
|
|
20
|
-
"@opengeoweb/icons": "2.10.0",
|
|
21
19
|
"react-draggable": "^4.4.3",
|
|
22
20
|
"re-resizable": "^6.9.0",
|
|
23
21
|
"lodash": "^4.17.20",
|
|
24
|
-
"@opengeoweb/form-fields": "2.
|
|
22
|
+
"@opengeoweb/form-fields": "2.14.0",
|
|
25
23
|
"react-hook-form": "^6.12.1",
|
|
26
24
|
"moment": "^2.29.0",
|
|
27
25
|
"moment-timezone": "^0.5.31",
|