@opengeoweb/shared 19.6.1 → 20.0.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/dist/index.esm.js +385 -142
- package/dist/src/lib/components/DateTimePicker/DateTimePicker.d.ts +8 -0
- package/dist/src/lib/components/DateTimePicker/index.d.ts +1 -0
- package/dist/src/lib/components/NumberWithUnitField/NumberWithUnitField.d.ts +24 -0
- package/dist/src/lib/components/NumberWithUnitField/index.d.ts +1 -0
- package/dist/src/lib/components/ToggleMenu/ToggleMenu.d.ts +0 -1
- package/dist/src/lib/components/index.d.ts +2 -0
- package/dist/src/lib/types/types.d.ts +1 -0
- package/dist/src/lib/utils/dateUtils/dateUtils.d.ts +0 -6
- package/dist/src/lib/utils/index.d.ts +1 -0
- package/dist/src/lib/utils/numberInputUtils.d.ts +3 -0
- package/package.json +47 -46
package/dist/index.esm.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { Box, Typography, useTheme, Tooltip, IconButton, Menu, ListSubheader, MenuItem, Grid,
|
|
2
|
+
import { Box, Typography, useTheme, Tooltip, IconButton, Menu, ListSubheader, MenuItem, Grid, FormControlLabel, Radio, ListItemText, ListItemIcon, DialogTitle, Button, Dialog, DialogContent, DialogActions, Paper, CircularProgress, Alert, AlertTitle, Drawer, Link, Avatar as Avatar$1, ClickAwayListener, MenuList, RadioGroup, Portal, List, ListItem, Tabs, Tab, Backdrop, Slider, ToggleButton, styled, Select, Accordion, AccordionSummary, AccordionDetails, FormLabel, Switch, TextField, InputAdornment, Chip, Stack, debounce as debounce$1, ListItemButton, Checkbox, FormControl, InputLabel, FilledInput } from '@mui/material';
|
|
3
3
|
import 'i18next';
|
|
4
4
|
import { initReactI18next, useTranslation } from 'react-i18next';
|
|
5
5
|
import React, { useRef, useEffect, useState, Component } from 'react';
|
|
6
6
|
import Draggable from 'react-draggable';
|
|
7
7
|
import { Resizable } from 're-resizable';
|
|
8
|
-
import { Resize, BORDER_RADIUS, Options,
|
|
8
|
+
import { Resize, BORDER_RADIUS, Options, Close, ChevronLeft, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Admin, useThemeContext, ThemeTypes, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, ChevronDown, Search, Clear, Cached, Filter as Filter$1, Menu as Menu$1, CalendarToday } from '@opengeoweb/theme';
|
|
9
9
|
import { throttle, isEqual, merge, escapeRegExp, debounce } from 'lodash';
|
|
10
|
-
import { add as add$1,
|
|
10
|
+
import { add as add$1, addMinutes, addHours, format, differenceInDays as differenceInDays$1, differenceInHours as differenceInHours$1, differenceInMinutes as differenceInMinutes$1, differenceInMonths as differenceInMonths$1, differenceInSeconds as differenceInSeconds$1, differenceInYears as differenceInYears$1, fromUnixTime, getHours as getHours$1, isAfter as isAfter$1, isBefore as isBefore$1, isEqual as isEqual$1, isValid as isValid$1, parseISO, roundToNearestMinutes as roundToNearestMinutes$1, set as set$1, setSeconds as setSeconds$1, parse, sub as sub$1, getUnixTime, getDay, getDayOfYear, getMonth, getWeek, getYear, isWithinInterval, startOfDay } from 'date-fns';
|
|
11
11
|
import { fi as fi$1, nl as nl$1, nb, enGB } from 'date-fns/locale';
|
|
12
|
+
import { DateTimePicker as DateTimePicker$1 } from '@mui/x-date-pickers';
|
|
13
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
14
|
+
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
12
15
|
|
|
13
16
|
var en = {
|
|
14
17
|
"shared-choose-app-mode": "Choose your default app mode",
|
|
@@ -462,7 +465,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
462
465
|
}
|
|
463
466
|
}
|
|
464
467
|
|
|
465
|
-
var _excluded$
|
|
468
|
+
var _excluded$f = ["content", "color", "icon", "sx"];
|
|
466
469
|
var bgColors = {
|
|
467
470
|
green: 'geowebColors.functional.successOutline.fill',
|
|
468
471
|
grey: 'geowebColors.functional.disabledOutline.fill',
|
|
@@ -503,7 +506,7 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
503
506
|
color = _ref.color,
|
|
504
507
|
icon = _ref.icon,
|
|
505
508
|
sx = _ref.sx;
|
|
506
|
-
_objectWithoutPropertiesLoose(_ref, _excluded$
|
|
509
|
+
_objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
507
510
|
return jsxs(Box, {
|
|
508
511
|
className: "statusTag",
|
|
509
512
|
"data-testid": "statusTag",
|
|
@@ -577,14 +580,14 @@ var useSharedTranslation = function useSharedTranslation() {
|
|
|
577
580
|
return useTranslation([SHARED_NAMESPACE]);
|
|
578
581
|
};
|
|
579
582
|
|
|
580
|
-
var _excluded$
|
|
583
|
+
var _excluded$e = ["bounds", "setIsDragging", "children", "onStop"];
|
|
581
584
|
var DraggableComponent$1 = function DraggableComponent(_ref) {
|
|
582
585
|
var _ref$bounds = _ref.bounds,
|
|
583
586
|
bounds = _ref$bounds === void 0 ? 'body' : _ref$bounds,
|
|
584
587
|
setIsDragging = _ref.setIsDragging,
|
|
585
588
|
children = _ref.children,
|
|
586
589
|
onStop = _ref.onStop,
|
|
587
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
590
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
588
591
|
var onDragStart = function onDragStart(e) {
|
|
589
592
|
// This makes sure that nothing is selected during drag
|
|
590
593
|
setIsDragging == null || setIsDragging(true);
|
|
@@ -609,7 +612,7 @@ var DraggableComponent$1 = function DraggableComponent(_ref) {
|
|
|
609
612
|
}));
|
|
610
613
|
};
|
|
611
614
|
|
|
612
|
-
var _excluded$
|
|
615
|
+
var _excluded$d = ["children", "onResizeStart", "onResizeStop", "size", "setSize", "minHeight", "minWidth", "enable", "nodeRef"];
|
|
613
616
|
var isDraggingClassName = 'is-dragging';
|
|
614
617
|
var useBoundsProps = function useBoundsProps(nodeRef) {
|
|
615
618
|
var _React$useState = React.useState({}),
|
|
@@ -652,7 +655,7 @@ var ResizeComponent = function ResizeComponent(_ref) {
|
|
|
652
655
|
topLeft: true
|
|
653
656
|
} : _ref$enable,
|
|
654
657
|
nodeRef = _ref.nodeRef,
|
|
655
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
658
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
656
659
|
var theme = useTheme();
|
|
657
660
|
var onStartResize = React.useCallback(function (event, _direction, node) {
|
|
658
661
|
event.stopPropagation();
|
|
@@ -747,7 +750,7 @@ var CustomTooltip = function CustomTooltip(props) {
|
|
|
747
750
|
}));
|
|
748
751
|
};
|
|
749
752
|
|
|
750
|
-
var _excluded$
|
|
753
|
+
var _excluded$c = ["tooltipTitle", "variant", "isSelected", "shouldShowAsDisabled", "size", "children", "className", "tooltipProps", "shouldShowExtraOptionsIndicator", "optionsActive"];
|
|
751
754
|
var CustomIconButtonNoMemo = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
752
755
|
var _defaultTooltipProps$;
|
|
753
756
|
var _ref$tooltipTitle = _ref.tooltipTitle,
|
|
@@ -767,7 +770,7 @@ var CustomIconButtonNoMemo = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
|
767
770
|
shouldShowExtraOptionsIndicator = _ref$shouldShowExtraO === void 0 ? false : _ref$shouldShowExtraO,
|
|
768
771
|
_ref$optionsActive = _ref.optionsActive,
|
|
769
772
|
optionsActive = _ref$optionsActive === void 0 ? false : _ref$optionsActive,
|
|
770
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
773
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
771
774
|
var classNames = [].concat(className ? [className] : [], isSelected ? ['Mui-selected'] : [], [variant]).join(' ');
|
|
772
775
|
var tooltipTitle = (_defaultTooltipProps$ = defaultTooltipProps == null ? void 0 : defaultTooltipProps.title) != null ? _defaultTooltipProps$ : defaultTooltipTitle;
|
|
773
776
|
var tooltipProps = React.useMemo(function () {
|
|
@@ -882,9 +885,6 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
882
885
|
var _React$useState = React.useState(null),
|
|
883
886
|
anchorEl = _React$useState[0],
|
|
884
887
|
setAnchorEl = _React$useState[1];
|
|
885
|
-
var _React$useState2 = React.useState({}),
|
|
886
|
-
expandedSubMenus = _React$useState2[0],
|
|
887
|
-
setExpandedSubMenus = _React$useState2[1];
|
|
888
888
|
var isOpen = Boolean(anchorEl);
|
|
889
889
|
var _getPosition = getPosition(menuPosition),
|
|
890
890
|
anchorOrigin = _getPosition.anchorOrigin,
|
|
@@ -896,71 +896,16 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
896
896
|
var handleClose = function handleClose(event) {
|
|
897
897
|
event.stopPropagation();
|
|
898
898
|
setAnchorEl(null);
|
|
899
|
-
setExpandedSubMenus({});
|
|
900
899
|
};
|
|
901
|
-
var
|
|
902
|
-
setExpandedSubMenus(function (currentExpandedSubMenus) {
|
|
903
|
-
var _Object$assign;
|
|
904
|
-
return Object.assign({}, currentExpandedSubMenus, (_Object$assign = {}, _Object$assign[menuText] = !currentExpandedSubMenus[menuText], _Object$assign));
|
|
905
|
-
});
|
|
906
|
-
};
|
|
907
|
-
var _renderMenuItems = function renderMenuItems(items, nestingLevel) {
|
|
908
|
-
if (nestingLevel === void 0) {
|
|
909
|
-
nestingLevel = 0;
|
|
910
|
-
}
|
|
900
|
+
var renderMenuItems = function renderMenuItems(items) {
|
|
911
901
|
return items.map(function (menuItem) {
|
|
912
902
|
var text = menuItem.text,
|
|
913
903
|
icon = menuItem.icon,
|
|
914
904
|
action = menuItem.action,
|
|
915
905
|
isDisabled = menuItem.isDisabled,
|
|
916
906
|
isSelected = menuItem.isSelected,
|
|
917
|
-
controlType = menuItem.controlType
|
|
918
|
-
subMenuItems = menuItem.subMenuItems;
|
|
919
|
-
var hasSubMenuItems = Boolean(subMenuItems == null ? void 0 : subMenuItems.length);
|
|
907
|
+
controlType = menuItem.controlType;
|
|
920
908
|
var isRadioControl = controlType === 'radio';
|
|
921
|
-
if (hasSubMenuItems) {
|
|
922
|
-
var isExpanded = Boolean(expandedSubMenus[text]);
|
|
923
|
-
return jsxs(React.Fragment, {
|
|
924
|
-
children: [jsx(MenuItem, {
|
|
925
|
-
"aria-expanded": isExpanded,
|
|
926
|
-
disabled: isDisabled,
|
|
927
|
-
onClick: function onClick(event) {
|
|
928
|
-
event.stopPropagation();
|
|
929
|
-
toggleSubMenu(text);
|
|
930
|
-
},
|
|
931
|
-
sx: nestingLevel > 0 ? {
|
|
932
|
-
pl: 2 + nestingLevel * 2
|
|
933
|
-
} : undefined,
|
|
934
|
-
children: jsxs(Grid, {
|
|
935
|
-
container: true,
|
|
936
|
-
size: "grow",
|
|
937
|
-
spacing: 2,
|
|
938
|
-
sx: {
|
|
939
|
-
justifyContent: 'space-between'
|
|
940
|
-
},
|
|
941
|
-
children: [jsx(Grid, {
|
|
942
|
-
children: jsx(ListItemText, {
|
|
943
|
-
children: text
|
|
944
|
-
})
|
|
945
|
-
}), jsx(Grid, {
|
|
946
|
-
sx: {
|
|
947
|
-
alignItems: 'flex-end'
|
|
948
|
-
},
|
|
949
|
-
children: jsx(ListItemIcon, {
|
|
950
|
-
sx: {
|
|
951
|
-
'&.MuiListItemIcon-root': {
|
|
952
|
-
minWidth: '24px'
|
|
953
|
-
}
|
|
954
|
-
},
|
|
955
|
-
children: isExpanded ? jsx(ChevronUp, {}) : jsx(ChevronDown, {})
|
|
956
|
-
})
|
|
957
|
-
})]
|
|
958
|
-
})
|
|
959
|
-
}), isExpanded ? jsx(Box, {
|
|
960
|
-
children: _renderMenuItems(subMenuItems, nestingLevel + 1)
|
|
961
|
-
}) : null]
|
|
962
|
-
}, text);
|
|
963
|
-
}
|
|
964
909
|
return jsx(MenuItem, {
|
|
965
910
|
disabled: isDisabled,
|
|
966
911
|
onClick: function onClick(event) {
|
|
@@ -968,13 +913,10 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
968
913
|
handleClose(event);
|
|
969
914
|
},
|
|
970
915
|
selected: !isRadioControl && isSelected,
|
|
971
|
-
sx: nestingLevel > 0 ? {
|
|
972
|
-
pl: 2 + nestingLevel * 2
|
|
973
|
-
} : undefined,
|
|
974
916
|
children: jsxs(Grid, {
|
|
975
917
|
container: true,
|
|
976
918
|
size: "grow",
|
|
977
|
-
spacing: 2,
|
|
919
|
+
spacing: isRadioControl ? 0 : 2,
|
|
978
920
|
sx: {
|
|
979
921
|
justifyContent: 'space-between'
|
|
980
922
|
},
|
|
@@ -1067,7 +1009,7 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
1067
1009
|
},
|
|
1068
1010
|
children: menuTitle
|
|
1069
1011
|
})
|
|
1070
|
-
}) : null, menuItems != null && menuItems.length ?
|
|
1012
|
+
}) : null, menuItems != null && menuItems.length ? renderMenuItems(menuItems) : jsx("div", {}) // Needed to make the menu work without any menuItems
|
|
1071
1013
|
, secondaryMenuTitle ? jsx(ListSubheader, {
|
|
1072
1014
|
"data-testid": "toggleMenuSecondaryTitle",
|
|
1073
1015
|
children: jsx(Typography, {
|
|
@@ -1076,7 +1018,7 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
1076
1018
|
},
|
|
1077
1019
|
children: secondaryMenuTitle
|
|
1078
1020
|
})
|
|
1079
|
-
}) : null, secondaryMenuItems != null && secondaryMenuItems.length ?
|
|
1021
|
+
}) : null, secondaryMenuItems != null && secondaryMenuItems.length ? renderMenuItems(secondaryMenuItems) : jsx("div", {}) // Needed to make the menu work without any menuItems
|
|
1080
1022
|
, children]
|
|
1081
1023
|
})]
|
|
1082
1024
|
});
|
|
@@ -1229,7 +1171,7 @@ var CustomDialogHeader = function CustomDialogHeader(_ref2) {
|
|
|
1229
1171
|
});
|
|
1230
1172
|
};
|
|
1231
1173
|
|
|
1232
|
-
var _excluded$
|
|
1174
|
+
var _excluded$b = ["defaultSize", "onResizeStop", "hasLayout", "minWidth"],
|
|
1233
1175
|
_excluded2$2 = ["title", "onClose", "description", "actions", "children", "sx", "resizableDefaultSize", "isResizable", "hasLayout", "shouldRenderInline", "slotProps", "disableRestoreFocus", "headerActions", "minWidth"];
|
|
1234
1176
|
var PaperComponent = function PaperComponent(_ref) {
|
|
1235
1177
|
var _ref$defaultSize = _ref.defaultSize,
|
|
@@ -1242,7 +1184,7 @@ var PaperComponent = function PaperComponent(_ref) {
|
|
|
1242
1184
|
hasLayout = _ref$hasLayout === void 0 ? true : _ref$hasLayout,
|
|
1243
1185
|
_ref$minWidth = _ref.minWidth,
|
|
1244
1186
|
minWidth = _ref$minWidth === void 0 ? 280 : _ref$minWidth,
|
|
1245
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1187
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
1246
1188
|
var maxWidth = '98%';
|
|
1247
1189
|
var maxHeight = '98%';
|
|
1248
1190
|
return jsx(ResizeComponent, Object.assign({
|
|
@@ -1467,7 +1409,7 @@ var ConfirmationButtons = function ConfirmationButtons(_ref) {
|
|
|
1467
1409
|
});
|
|
1468
1410
|
};
|
|
1469
1411
|
|
|
1470
|
-
var _excluded$
|
|
1412
|
+
var _excluded$a = ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content", "disableAutoFocus", "isLoading"],
|
|
1471
1413
|
_excluded2$1 = ["catchOnCancel"];
|
|
1472
1414
|
var ConfirmationDialog = function ConfirmationDialog(_ref) {
|
|
1473
1415
|
var open = _ref.open,
|
|
@@ -1483,7 +1425,7 @@ var ConfirmationDialog = function ConfirmationDialog(_ref) {
|
|
|
1483
1425
|
disableAutoFocus = _ref$disableAutoFocus === void 0 ? false : _ref$disableAutoFocus,
|
|
1484
1426
|
_ref$isLoading = _ref.isLoading,
|
|
1485
1427
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
1486
|
-
other = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1428
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
1487
1429
|
other.catchOnCancel;
|
|
1488
1430
|
var rest = _objectWithoutPropertiesLoose(other, _excluded2$1); // remove unwanted props
|
|
1489
1431
|
var _useSharedTranslation = useSharedTranslation(),
|
|
@@ -2407,7 +2349,7 @@ ErrorBoundary.defaultProps = {
|
|
|
2407
2349
|
onError: function onError() {}
|
|
2408
2350
|
};
|
|
2409
2351
|
|
|
2410
|
-
var styles$
|
|
2352
|
+
var styles$6 = {
|
|
2411
2353
|
small: {
|
|
2412
2354
|
height: 16,
|
|
2413
2355
|
width: 16,
|
|
@@ -2424,14 +2366,14 @@ var Avatar = function Avatar(_ref) {
|
|
|
2424
2366
|
var theme = useTheme();
|
|
2425
2367
|
return jsx(Avatar$1, {
|
|
2426
2368
|
"data-testid": "avatar",
|
|
2427
|
-
sx: Object.assign({}, styles$
|
|
2369
|
+
sx: Object.assign({}, styles$6[size], {
|
|
2428
2370
|
bgcolor: author ? theme.palette.geowebColors.buttons.icon.disabled.color : undefined
|
|
2429
2371
|
}),
|
|
2430
2372
|
children: children
|
|
2431
2373
|
});
|
|
2432
2374
|
};
|
|
2433
2375
|
|
|
2434
|
-
var styles$
|
|
2376
|
+
var styles$5 = {
|
|
2435
2377
|
container: {
|
|
2436
2378
|
position: 'absolute',
|
|
2437
2379
|
top: 38,
|
|
@@ -2501,7 +2443,7 @@ var UserMenu = function UserMenu(_ref) {
|
|
|
2501
2443
|
})
|
|
2502
2444
|
}), isOpen ? jsx(Paper, {
|
|
2503
2445
|
"data-testid": "userMenu",
|
|
2504
|
-
sx: styles$
|
|
2446
|
+
sx: styles$5.container,
|
|
2505
2447
|
children: jsx(ClickAwayListener, {
|
|
2506
2448
|
mouseEvent: "onMouseDown",
|
|
2507
2449
|
onClickAway: function onClickAway(event) {
|
|
@@ -2512,7 +2454,7 @@ var UserMenu = function UserMenu(_ref) {
|
|
|
2512
2454
|
onClose();
|
|
2513
2455
|
},
|
|
2514
2456
|
children: jsx(MenuList, {
|
|
2515
|
-
sx: styles$
|
|
2457
|
+
sx: styles$5.userMenu,
|
|
2516
2458
|
variant: "menu",
|
|
2517
2459
|
children: children
|
|
2518
2460
|
})
|
|
@@ -2756,8 +2698,8 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
2756
2698
|
});
|
|
2757
2699
|
};
|
|
2758
2700
|
|
|
2759
|
-
var _excluded$
|
|
2760
|
-
var styles$
|
|
2701
|
+
var _excluded$9 = ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon"];
|
|
2702
|
+
var styles$4 = {
|
|
2761
2703
|
container: {
|
|
2762
2704
|
overflow: 'hidden',
|
|
2763
2705
|
borderRadius: 0,
|
|
@@ -2795,10 +2737,10 @@ var ToolContainer = function ToolContainer(_ref) {
|
|
|
2795
2737
|
rightHeaderComponent = _ref$rightHeaderCompo === void 0 ? null : _ref$rightHeaderCompo,
|
|
2796
2738
|
dragHandleIcon = _ref.dragHandleIcon,
|
|
2797
2739
|
closeIcon = _ref.closeIcon,
|
|
2798
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2740
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
2799
2741
|
return jsxs(Paper, Object.assign({
|
|
2800
2742
|
elevation: elevation,
|
|
2801
|
-
sx: styles$
|
|
2743
|
+
sx: styles$4.container
|
|
2802
2744
|
}, props, {
|
|
2803
2745
|
children: [jsx(ErrorBoundary, {
|
|
2804
2746
|
children: jsx(ToolHeader, {
|
|
@@ -2816,7 +2758,7 @@ var ToolContainer = function ToolContainer(_ref) {
|
|
|
2816
2758
|
style: {
|
|
2817
2759
|
maxHeight: maxHeight
|
|
2818
2760
|
},
|
|
2819
|
-
sx: styles$
|
|
2761
|
+
sx: styles$4.content,
|
|
2820
2762
|
children: children
|
|
2821
2763
|
}), isResizable ? jsx(ToolFooter, {}) : null]
|
|
2822
2764
|
}));
|
|
@@ -2968,7 +2910,7 @@ var useHandleSizeFromOutsideComponent = function useHandleSizeFromOutsideCompone
|
|
|
2968
2910
|
}, [isOpen, getBoundsNode]);
|
|
2969
2911
|
};
|
|
2970
2912
|
|
|
2971
|
-
var _excluded$
|
|
2913
|
+
var _excluded$8 = ["title", "bounds", "cancel", "headerSize", "startSize", "startPosition", "startDraggablePosition", "children", "isOpen", "onClose", "initialMaxHeight", "fixTopPosition", "onChangeSize", "onMouseDown", "onResizeStop", "onDragEnd", "order", "source", "leftHeaderComponent", "rightHeaderComponent", "dragHandleIcon", "closeIcon", "className", "sx", "resetPositionOnOpen"];
|
|
2972
2914
|
// calculate dialog size and position to 85% of screensize
|
|
2973
2915
|
var calculateDialogSizeAndPosition = function calculateDialogSizeAndPosition() {
|
|
2974
2916
|
var width = window.innerWidth * 0.85;
|
|
@@ -3072,7 +3014,7 @@ var DraggableComponent = function DraggableComponent(_ref) {
|
|
|
3072
3014
|
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
3073
3015
|
_ref$resetPositionOnO = _ref.resetPositionOnOpen,
|
|
3074
3016
|
resetPositionOnOpen = _ref$resetPositionOnO === void 0 ? false : _ref$resetPositionOnO,
|
|
3075
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3017
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
3076
3018
|
var zIndex = (source === 'app' ? BASE_Z_INDEX : 1000) + order;
|
|
3077
3019
|
var elevation = BASE_ELEVATION + order;
|
|
3078
3020
|
var nodeRef = React.useRef(null);
|
|
@@ -3229,7 +3171,7 @@ var segmentStyle = {
|
|
|
3229
3171
|
letterSpacing: 0.25,
|
|
3230
3172
|
justifyContent: 'center'
|
|
3231
3173
|
};
|
|
3232
|
-
var styles$
|
|
3174
|
+
var styles$3 = {
|
|
3233
3175
|
icon: Object.assign({}, segmentStyle, {
|
|
3234
3176
|
backgroundColor: 'geowebColors.textInputField.default.rgba',
|
|
3235
3177
|
width: 40,
|
|
@@ -3254,7 +3196,7 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
|
|
|
3254
3196
|
return jsx(Typography, {
|
|
3255
3197
|
component: "span",
|
|
3256
3198
|
"data-testid": "segment-divider",
|
|
3257
|
-
sx: styles$
|
|
3199
|
+
sx: styles$3.divider,
|
|
3258
3200
|
children: children
|
|
3259
3201
|
});
|
|
3260
3202
|
}
|
|
@@ -3262,7 +3204,7 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
|
|
|
3262
3204
|
return jsx(Typography, {
|
|
3263
3205
|
component: "span",
|
|
3264
3206
|
"data-testid": "segment-icon",
|
|
3265
|
-
sx: styles$
|
|
3207
|
+
sx: styles$3.icon,
|
|
3266
3208
|
children: children
|
|
3267
3209
|
});
|
|
3268
3210
|
}
|
|
@@ -3270,7 +3212,7 @@ var ShortCutSegment = function ShortCutSegment(_ref) {
|
|
|
3270
3212
|
return jsx(Typography, {
|
|
3271
3213
|
component: "span",
|
|
3272
3214
|
"data-testid": "segment-connect",
|
|
3273
|
-
sx: styles$
|
|
3215
|
+
sx: styles$3.connect,
|
|
3274
3216
|
children: children
|
|
3275
3217
|
});
|
|
3276
3218
|
}
|
|
@@ -3724,7 +3666,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
3724
3666
|
children: value === index && children
|
|
3725
3667
|
});
|
|
3726
3668
|
};
|
|
3727
|
-
var styles$
|
|
3669
|
+
var styles$2 = {
|
|
3728
3670
|
container: {
|
|
3729
3671
|
margin: '0px 20px',
|
|
3730
3672
|
maxHeight: '90vh'
|
|
@@ -3741,17 +3683,17 @@ var CheatSheet = function CheatSheet() {
|
|
|
3741
3683
|
setActiveTab(newValue);
|
|
3742
3684
|
};
|
|
3743
3685
|
return jsxs(Box, {
|
|
3744
|
-
sx: styles$
|
|
3686
|
+
sx: styles$2.container,
|
|
3745
3687
|
children: [jsxs(Tabs, {
|
|
3746
3688
|
"aria-label": "platform",
|
|
3747
3689
|
onChange: onChangeTab,
|
|
3748
3690
|
value: activeTab,
|
|
3749
3691
|
children: [jsx(Tab, {
|
|
3750
3692
|
label: "Windows",
|
|
3751
|
-
sx: styles$
|
|
3693
|
+
sx: styles$2.tab
|
|
3752
3694
|
}), jsx(Tab, {
|
|
3753
3695
|
label: "Mac",
|
|
3754
|
-
sx: styles$
|
|
3696
|
+
sx: styles$2.tab
|
|
3755
3697
|
})]
|
|
3756
3698
|
}), jsx(TabPanel, {
|
|
3757
3699
|
index: 0,
|
|
@@ -3880,7 +3822,7 @@ var getInitials = function getInitials(name) {
|
|
|
3880
3822
|
}
|
|
3881
3823
|
};
|
|
3882
3824
|
|
|
3883
|
-
var _excluded$
|
|
3825
|
+
var _excluded$7 = ["value", "orientation", "shouldAutoFocus", "extraStyles"];
|
|
3884
3826
|
var sliderHeaderStyle = {
|
|
3885
3827
|
fontFamily: 'Roboto-Black, Roboto',
|
|
3886
3828
|
fontSize: 12,
|
|
@@ -3939,7 +3881,7 @@ var CustomSlider = function CustomSlider(_ref) {
|
|
|
3939
3881
|
shouldAutoFocus = _ref$shouldAutoFocus === void 0 ? false : _ref$shouldAutoFocus,
|
|
3940
3882
|
_ref$extraStyles = _ref.extraStyles,
|
|
3941
3883
|
extraStyles = _ref$extraStyles === void 0 ? {} : _ref$extraStyles,
|
|
3942
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3884
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
3943
3885
|
// Add custom class (for bold text) to label adjacent to thumb component.
|
|
3944
3886
|
// Material UI doesn't support highlighing only adjacent label
|
|
3945
3887
|
// when track is highlighted everywhere below selected value.
|
|
@@ -3986,7 +3928,7 @@ var CustomSlider = function CustomSlider(_ref) {
|
|
|
3986
3928
|
}, props));
|
|
3987
3929
|
};
|
|
3988
3930
|
|
|
3989
|
-
var _excluded$
|
|
3931
|
+
var _excluded$6 = ["variant", "className", "value"];
|
|
3990
3932
|
// This button is same as MUI ToggleButton but adds the variant prop
|
|
3991
3933
|
var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3992
3934
|
var _ref$variant = _ref.variant,
|
|
@@ -3994,7 +3936,7 @@ var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3994
3936
|
className = _ref.className,
|
|
3995
3937
|
_ref$value = _ref.value,
|
|
3996
3938
|
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
3997
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3939
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3998
3940
|
return jsx(ToggleButton, Object.assign({
|
|
3999
3941
|
className: variant + " " + className,
|
|
4000
3942
|
ref: ref,
|
|
@@ -4002,7 +3944,7 @@ var CustomToggleButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4002
3944
|
}, props));
|
|
4003
3945
|
});
|
|
4004
3946
|
|
|
4005
|
-
var _excluded$
|
|
3947
|
+
var _excluded$5 = ["tooltip", "list", "currentIndex", "onChangeMouseWheel", "isEnabled", "hasBackgroundColor", "variant", "additionalStyling", "skipLocalStyling"],
|
|
4006
3948
|
_excluded2 = ["className", "additionalStyling", "MenuProps"];
|
|
4007
3949
|
var TooltipSelect = function TooltipSelect(_ref) {
|
|
4008
3950
|
var _ref$tooltip = _ref.tooltip,
|
|
@@ -4021,7 +3963,7 @@ var TooltipSelect = function TooltipSelect(_ref) {
|
|
|
4021
3963
|
additionalStyling = _ref$additionalStylin === void 0 ? {} : _ref$additionalStylin,
|
|
4022
3964
|
_ref$skipLocalStyling = _ref.skipLocalStyling,
|
|
4023
3965
|
skipLocalStyling = _ref$skipLocalStyling === void 0 ? false : _ref$skipLocalStyling,
|
|
4024
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3966
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
4025
3967
|
var _React$useState = React.useState(false),
|
|
4026
3968
|
selectOpen = _React$useState[0],
|
|
4027
3969
|
setSelectOpen = _React$useState[1];
|
|
@@ -4228,7 +4170,7 @@ var tooltipContainerStyles = function tooltipContainerStyles(theme, isEnabled, h
|
|
|
4228
4170
|
});
|
|
4229
4171
|
};
|
|
4230
4172
|
|
|
4231
|
-
var _excluded$
|
|
4173
|
+
var _excluded$4 = ["title", "title2", "defaultExpanded", "disableGutters", "expandedElevation", "collapsedElevation", "transitionDuration", "detailsSx", "CustomExpandIcon", "children", "amountOfItems"];
|
|
4232
4174
|
var CustomAccordion = function CustomAccordion(_ref) {
|
|
4233
4175
|
var title = _ref.title,
|
|
4234
4176
|
title2 = _ref.title2,
|
|
@@ -4246,7 +4188,7 @@ var CustomAccordion = function CustomAccordion(_ref) {
|
|
|
4246
4188
|
CustomExpandIcon = _ref.CustomExpandIcon,
|
|
4247
4189
|
children = _ref.children,
|
|
4248
4190
|
amountOfItems = _ref.amountOfItems,
|
|
4249
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4191
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
4250
4192
|
var _React$useState = React.useState(defaultExpanded),
|
|
4251
4193
|
expanded = _React$useState[0],
|
|
4252
4194
|
setExpanded = _React$useState[1];
|
|
@@ -4357,8 +4299,8 @@ var SearchHighlight = function SearchHighlight(_ref) {
|
|
|
4357
4299
|
});
|
|
4358
4300
|
};
|
|
4359
4301
|
|
|
4360
|
-
var _excluded$
|
|
4361
|
-
var styles = {
|
|
4302
|
+
var _excluded$3 = ["activeLabel", "inActiveLabel", "tooltip"];
|
|
4303
|
+
var styles$1 = {
|
|
4362
4304
|
label: {
|
|
4363
4305
|
color: 'geowebColors.buttons.tertiary.default.color',
|
|
4364
4306
|
opacity: 1,
|
|
@@ -4373,19 +4315,19 @@ var SwitchButton = function SwitchButton(_ref) {
|
|
|
4373
4315
|
inActiveLabel = _ref$inActiveLabel === void 0 ? 'Viewer' : _ref$inActiveLabel,
|
|
4374
4316
|
_ref$tooltip = _ref.tooltip,
|
|
4375
4317
|
tooltip = _ref$tooltip === void 0 ? 'Switch mode' : _ref$tooltip,
|
|
4376
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4318
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
4377
4319
|
return jsx(CustomTooltip, {
|
|
4378
4320
|
className: "switch-button",
|
|
4379
4321
|
title: tooltip,
|
|
4380
4322
|
children: jsxs("span", {
|
|
4381
4323
|
role: "button",
|
|
4382
4324
|
children: [jsx(FormLabel, {
|
|
4383
|
-
sx: styles.label,
|
|
4325
|
+
sx: styles$1.label,
|
|
4384
4326
|
children: inActiveLabel
|
|
4385
4327
|
}), jsx(Switch, Object.assign({
|
|
4386
4328
|
"data-testid": "switchMode"
|
|
4387
4329
|
}, props)), jsx(FormLabel, {
|
|
4388
|
-
sx: styles.label,
|
|
4330
|
+
sx: styles$1.label,
|
|
4389
4331
|
children: activeLabel
|
|
4390
4332
|
})]
|
|
4391
4333
|
})
|
|
@@ -5143,7 +5085,7 @@ var SearchField = function SearchField(_ref3) {
|
|
|
5143
5085
|
});
|
|
5144
5086
|
};
|
|
5145
5087
|
|
|
5146
|
-
var _excluded$
|
|
5088
|
+
var _excluded$2 = ["activeLabelFilterCount", "filters", "onClickFilterChip", "onSearch", "isAllSelected", "searchQuery", "showLabelFilterToggle", "isLabelFilterOpen", "onToggleLabelFilter", "showSearchField"];
|
|
5147
5089
|
var DEFAULT_FILTER_HEIGHT = 85;
|
|
5148
5090
|
var Filter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
5149
5091
|
var _ref$activeLabelFilte = _ref.activeLabelFilterCount,
|
|
@@ -5161,7 +5103,7 @@ var Filter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
5161
5103
|
onToggleLabelFilter = _ref.onToggleLabelFilter,
|
|
5162
5104
|
_ref$showSearchField = _ref.showSearchField,
|
|
5163
5105
|
showSearchField = _ref$showSearchField === void 0 ? true : _ref$showSearchField,
|
|
5164
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5106
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
5165
5107
|
return jsx(Box, {
|
|
5166
5108
|
ref: ref,
|
|
5167
5109
|
sx: Object.assign({
|
|
@@ -5310,14 +5252,14 @@ var LegendToggleButton = function LegendToggleButton(_ref) {
|
|
|
5310
5252
|
});
|
|
5311
5253
|
};
|
|
5312
5254
|
|
|
5313
|
-
var _excluded = ["isDark", "children", "sx"];
|
|
5255
|
+
var _excluded$1 = ["isDark", "children", "sx"];
|
|
5314
5256
|
var StorybookDocsWrapper = function StorybookDocsWrapper(_ref) {
|
|
5315
5257
|
var _ref$isDark = _ref.isDark,
|
|
5316
5258
|
isDark = _ref$isDark === void 0 ? false : _ref$isDark,
|
|
5317
5259
|
children = _ref.children,
|
|
5318
5260
|
_ref$sx = _ref.sx,
|
|
5319
5261
|
sx = _ref$sx === void 0 ? [] : _ref$sx,
|
|
5320
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
5262
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
5321
5263
|
return jsx(Box, Object.assign({
|
|
5322
5264
|
sx: [].concat(isDark ? [{
|
|
5323
5265
|
backgroundColor: 'geowebColors.background.surfaceBrowser'
|
|
@@ -6064,27 +6006,6 @@ var startOfYearUTC = function startOfYearUTC(date) {
|
|
|
6064
6006
|
milliseconds: 0
|
|
6065
6007
|
});
|
|
6066
6008
|
};
|
|
6067
|
-
// TODO - IF TODAY time is going to be used, we need to edit this to handle the time.
|
|
6068
|
-
// - now.getTimezoneOffset(); by subtracting the timezone offset, this can be used to convert the time to similar to UTC, because startOfDay retuns values in local time with offset
|
|
6069
|
-
/**
|
|
6070
|
-
* Parse custom time format of NOW+current time | current date in UTC. The result will be in UTC.
|
|
6071
|
-
* @param timeValue - string value
|
|
6072
|
-
* @returns Time in UTC format
|
|
6073
|
-
*/
|
|
6074
|
-
var convertNOWFormatToUTC = function convertNOWFormatToUTC(timeValue) {
|
|
6075
|
-
var now = new Date();
|
|
6076
|
-
var today = startOfDay(now);
|
|
6077
|
-
var regex = /(NOW|TODAY)([+-])PT(\d+)H(\d+)M/;
|
|
6078
|
-
var matches = regex.exec(timeValue);
|
|
6079
|
-
if (matches) {
|
|
6080
|
-
var base = matches[1] === 'NOW' ? now : today;
|
|
6081
|
-
var sign = matches[2] === '+' ? 1 : -1;
|
|
6082
|
-
var hours = parseInt(matches[3], 10);
|
|
6083
|
-
var minutes = parseInt(matches[4], 10);
|
|
6084
|
-
return addMinutes(addHours(base, sign * hours), sign * minutes).toISOString();
|
|
6085
|
-
}
|
|
6086
|
-
throw new Error('Invalid endTime format');
|
|
6087
|
-
};
|
|
6088
6009
|
/**
|
|
6089
6010
|
* Parse custom time format of NOW+-hours and minutes || TODAY+-hours and minutes into UTC. The result will be in UTC.
|
|
6090
6011
|
* @param timeValue - string value
|
|
@@ -6157,7 +6078,6 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
6157
6078
|
DATE_FORMAT_UTC: DATE_FORMAT_UTC,
|
|
6158
6079
|
DATE_FORMAT_YEAR: DATE_FORMAT_YEAR,
|
|
6159
6080
|
add: add,
|
|
6160
|
-
convertNOWFormatToUTC: convertNOWFormatToUTC,
|
|
6161
6081
|
convertNOWandTODAYFormatsToUTC: convertNOWandTODAYFormatsToUTC,
|
|
6162
6082
|
createDate: createDate,
|
|
6163
6083
|
dateToIsoString: dateToIsoString,
|
|
@@ -6253,7 +6173,7 @@ var formatRelativeReferenceTimeLabel = function formatRelativeReferenceTimeLabel
|
|
|
6253
6173
|
var getValidInstancesNewestFirst = function getValidInstancesNewestFirst(instances) {
|
|
6254
6174
|
return instances.filter(function (instance) {
|
|
6255
6175
|
return isValid(parseCustomDateString(instance.id));
|
|
6256
|
-
}).
|
|
6176
|
+
}).sort(function (firstInstance, secondInstance) {
|
|
6257
6177
|
return parseCustomDateString(secondInstance.id).getTime() - parseCustomDateString(firstInstance.id).getTime();
|
|
6258
6178
|
});
|
|
6259
6179
|
};
|
|
@@ -6611,6 +6531,329 @@ var isDialogFocused = function isDialogFocused() {
|
|
|
6611
6531
|
return Boolean((_document$activeEleme = document.activeElement) == null ? void 0 : _document$activeEleme.closest('[role="dialog"]'));
|
|
6612
6532
|
};
|
|
6613
6533
|
|
|
6534
|
+
/* *
|
|
6535
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6536
|
+
* you may not use this file except in compliance with the License.
|
|
6537
|
+
* You may obtain a copy of the License at
|
|
6538
|
+
*
|
|
6539
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6540
|
+
*
|
|
6541
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6542
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6543
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6544
|
+
* See the License for the specific language governing permissions and
|
|
6545
|
+
* limitations under the License.
|
|
6546
|
+
*
|
|
6547
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6548
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
6549
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
6550
|
+
* */
|
|
6551
|
+
var convertNumericInputValue = function convertNumericInputValue(value, inputMode) {
|
|
6552
|
+
if (value !== '' && !isNaN(parseFloat(value))) {
|
|
6553
|
+
return inputMode === 'numeric' ? parseInt(value, 10) : parseFloat(value);
|
|
6554
|
+
}
|
|
6555
|
+
return null;
|
|
6556
|
+
};
|
|
6557
|
+
var getAllowedKeys = function getAllowedKeys(inputMode) {
|
|
6558
|
+
if (inputMode === void 0) {
|
|
6559
|
+
inputMode = 'numeric';
|
|
6560
|
+
}
|
|
6561
|
+
var allowedKeys = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', 'Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Home', 'End', 'PageDown', 'PageUp', 'Delete'].concat(inputMode === 'decimal' ? ['.'] : []);
|
|
6562
|
+
return allowedKeys;
|
|
6563
|
+
};
|
|
6564
|
+
|
|
6565
|
+
var arrowKeySteps = {
|
|
6566
|
+
ArrowUp: 1,
|
|
6567
|
+
ArrowDown: -1
|
|
6568
|
+
};
|
|
6569
|
+
var integerKeys = getAllowedKeys('numeric');
|
|
6570
|
+
var CARET_WIDTH = '24px';
|
|
6571
|
+
var SIGN_WIDTH = '1ch';
|
|
6572
|
+
var transparentBackdrop = {
|
|
6573
|
+
slotProps: {
|
|
6574
|
+
backdrop: {
|
|
6575
|
+
sx: {
|
|
6576
|
+
backgroundColor: 'transparent'
|
|
6577
|
+
}
|
|
6578
|
+
}
|
|
6579
|
+
}
|
|
6580
|
+
};
|
|
6581
|
+
var countDigits = function countDigits(text) {
|
|
6582
|
+
return text.replace(/[^0-9]/g, '').length;
|
|
6583
|
+
};
|
|
6584
|
+
var styles = {
|
|
6585
|
+
field: {
|
|
6586
|
+
flexShrink: 0
|
|
6587
|
+
},
|
|
6588
|
+
/* Filled inputs only offset start adornments for the label, so match that offset here. */
|
|
6589
|
+
unit: {
|
|
6590
|
+
flexShrink: 0,
|
|
6591
|
+
marginTop: '16px'
|
|
6592
|
+
}
|
|
6593
|
+
};
|
|
6594
|
+
var isClipboardShortcut = function isClipboardShortcut(event) {
|
|
6595
|
+
var isMac = window.navigator.userAgent.includes(' Mac ');
|
|
6596
|
+
var hasModifier = isMac ? event.metaKey : event.ctrlKey;
|
|
6597
|
+
return hasModifier && ['c', 'v', 'x'].includes(event.key.toLowerCase());
|
|
6598
|
+
};
|
|
6599
|
+
var NumberWithUnitField = function NumberWithUnitField(_ref) {
|
|
6600
|
+
var label = _ref.label,
|
|
6601
|
+
value = _ref.value,
|
|
6602
|
+
unit = _ref.unit,
|
|
6603
|
+
unitOptions = _ref.unitOptions,
|
|
6604
|
+
_onChange = _ref.onChange,
|
|
6605
|
+
onInputChange = _ref.onInputChange,
|
|
6606
|
+
unitAriaLabel = _ref.unitAriaLabel,
|
|
6607
|
+
minValue = _ref.minValue,
|
|
6608
|
+
_ref$maxDigits = _ref.maxDigits,
|
|
6609
|
+
maxDigits = _ref$maxDigits === void 0 ? 5 : _ref$maxDigits,
|
|
6610
|
+
maxMagnitude = _ref.maxMagnitude,
|
|
6611
|
+
_ref$error = _ref.error,
|
|
6612
|
+
error = _ref$error === void 0 ? false : _ref$error,
|
|
6613
|
+
_ref$disabled = _ref.disabled,
|
|
6614
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
6615
|
+
var inputId = React.useId();
|
|
6616
|
+
var _React$useState = React.useState(String(value)),
|
|
6617
|
+
typedValue = _React$useState[0],
|
|
6618
|
+
setTypedValue = _React$useState[1];
|
|
6619
|
+
React.useEffect(function () {
|
|
6620
|
+
setTypedValue(String(value));
|
|
6621
|
+
}, [value]);
|
|
6622
|
+
var clampValue = function clampValue(newValue) {
|
|
6623
|
+
if (!Number.isFinite(newValue)) {
|
|
6624
|
+
return minValue != null ? minValue : 0;
|
|
6625
|
+
}
|
|
6626
|
+
var truncated = Math.trunc(newValue);
|
|
6627
|
+
return minValue === undefined ? truncated : Math.max(minValue, truncated);
|
|
6628
|
+
};
|
|
6629
|
+
var commitTypedValue = function commitTypedValue(newValue, isStep) {
|
|
6630
|
+
if (isStep === void 0) {
|
|
6631
|
+
isStep = false;
|
|
6632
|
+
}
|
|
6633
|
+
var allowedDigits = maxMagnitude === undefined ? maxDigits : Math.min(maxDigits, String(maxMagnitude).length);
|
|
6634
|
+
var parsed = convertNumericInputValue(newValue, 'numeric');
|
|
6635
|
+
if (countDigits(newValue) > allowedDigits || parsed !== null && maxMagnitude !== undefined && Math.abs(parsed) > maxMagnitude) {
|
|
6636
|
+
return;
|
|
6637
|
+
}
|
|
6638
|
+
setTypedValue(newValue);
|
|
6639
|
+
onInputChange == null || onInputChange();
|
|
6640
|
+
if (parsed === null) {
|
|
6641
|
+
return;
|
|
6642
|
+
}
|
|
6643
|
+
if (isStep) {
|
|
6644
|
+
_onChange({
|
|
6645
|
+
value: clampValue(parsed),
|
|
6646
|
+
unit: unit
|
|
6647
|
+
}, true);
|
|
6648
|
+
return;
|
|
6649
|
+
}
|
|
6650
|
+
_onChange({
|
|
6651
|
+
value: clampValue(parsed),
|
|
6652
|
+
unit: unit
|
|
6653
|
+
});
|
|
6654
|
+
};
|
|
6655
|
+
/* Typed text can clamp onto the value already stored, which leaves no prop change to resync from. */
|
|
6656
|
+
var showStoredValue = function showStoredValue() {
|
|
6657
|
+
setTypedValue(String(value));
|
|
6658
|
+
};
|
|
6659
|
+
var stepValue = function stepValue(step) {
|
|
6660
|
+
var parsed = convertNumericInputValue(typedValue, 'numeric');
|
|
6661
|
+
commitTypedValue(String(clampValue((parsed != null ? parsed : value) + step)), true);
|
|
6662
|
+
};
|
|
6663
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
6664
|
+
var step = arrowKeySteps[event.key];
|
|
6665
|
+
if (step !== undefined) {
|
|
6666
|
+
event.preventDefault();
|
|
6667
|
+
event.stopPropagation();
|
|
6668
|
+
stepValue(step);
|
|
6669
|
+
return;
|
|
6670
|
+
}
|
|
6671
|
+
if (isClipboardShortcut(event)) {
|
|
6672
|
+
return;
|
|
6673
|
+
}
|
|
6674
|
+
var isRepeatedMinus = event.key === '-' && event.target.value.includes('-');
|
|
6675
|
+
if (!integerKeys.includes(event.key) || isRepeatedMinus) {
|
|
6676
|
+
event.preventDefault();
|
|
6677
|
+
}
|
|
6678
|
+
};
|
|
6679
|
+
var handlePaste = function handlePaste(event) {
|
|
6680
|
+
var input = event.target;
|
|
6681
|
+
var pasted = event.clipboardData.getData('text/plain');
|
|
6682
|
+
var before = input.value.slice(0, input.selectionStart);
|
|
6683
|
+
var after = input.value.slice(input.selectionEnd);
|
|
6684
|
+
if (!/^-?[0-9]+$/.exec(before + pasted + after)) {
|
|
6685
|
+
event.preventDefault();
|
|
6686
|
+
}
|
|
6687
|
+
};
|
|
6688
|
+
var longestUnitLabel = unitOptions.reduce(function (longest, option) {
|
|
6689
|
+
return Math.max(longest, option.label.length);
|
|
6690
|
+
}, 0);
|
|
6691
|
+
var inputWidth = "calc(" + maxDigits + "ch + " + SIGN_WIDTH + ")";
|
|
6692
|
+
/* Fixed so a longer unit grows the value box leftwards instead of widening the field. */
|
|
6693
|
+
var unitWidth = "calc(" + longestUnitLabel + "ch + " + CARET_WIDTH + ")";
|
|
6694
|
+
return jsxs(FormControl, {
|
|
6695
|
+
disabled: disabled,
|
|
6696
|
+
error: error,
|
|
6697
|
+
sx: styles.field,
|
|
6698
|
+
variant: "filled",
|
|
6699
|
+
children: [jsx(InputLabel, {
|
|
6700
|
+
htmlFor: inputId,
|
|
6701
|
+
shrink: true,
|
|
6702
|
+
variant: "filled",
|
|
6703
|
+
children: label
|
|
6704
|
+
}), jsx(FilledInput, {
|
|
6705
|
+
endAdornment: jsx(FormControl, {
|
|
6706
|
+
sx: styles.unit,
|
|
6707
|
+
variant: "standard",
|
|
6708
|
+
children: jsx(Select, {
|
|
6709
|
+
MenuProps: transparentBackdrop,
|
|
6710
|
+
disableUnderline: true,
|
|
6711
|
+
disabled: disabled,
|
|
6712
|
+
inputProps: {
|
|
6713
|
+
'aria-label': unitAriaLabel != null ? unitAriaLabel : label
|
|
6714
|
+
},
|
|
6715
|
+
onChange: function onChange(event) {
|
|
6716
|
+
return _onChange({
|
|
6717
|
+
value: value,
|
|
6718
|
+
unit: event.target.value
|
|
6719
|
+
});
|
|
6720
|
+
},
|
|
6721
|
+
/* Select escalates its own min-width rule by repeating its class, so only an inline style wins. */
|
|
6722
|
+
SelectDisplayProps: {
|
|
6723
|
+
style: {
|
|
6724
|
+
textAlign: 'right',
|
|
6725
|
+
width: unitWidth
|
|
6726
|
+
}
|
|
6727
|
+
},
|
|
6728
|
+
value: unit,
|
|
6729
|
+
variant: "standard",
|
|
6730
|
+
children: unitOptions.map(function (option) {
|
|
6731
|
+
return jsx(MenuItem, {
|
|
6732
|
+
value: option.value,
|
|
6733
|
+
children: option.label
|
|
6734
|
+
}, option.value);
|
|
6735
|
+
})
|
|
6736
|
+
})
|
|
6737
|
+
}),
|
|
6738
|
+
id: inputId,
|
|
6739
|
+
inputProps: {
|
|
6740
|
+
inputMode: 'numeric',
|
|
6741
|
+
style: {
|
|
6742
|
+
width: inputWidth
|
|
6743
|
+
}
|
|
6744
|
+
},
|
|
6745
|
+
onBlur: showStoredValue,
|
|
6746
|
+
onChange: function onChange(event) {
|
|
6747
|
+
return commitTypedValue(event.target.value);
|
|
6748
|
+
},
|
|
6749
|
+
onKeyDown: handleKeyDown,
|
|
6750
|
+
onPaste: handlePaste,
|
|
6751
|
+
value: typedValue
|
|
6752
|
+
})]
|
|
6753
|
+
});
|
|
6754
|
+
};
|
|
6755
|
+
|
|
6756
|
+
var _excluded = ["value", "defaultValue", "minDateTime", "maxDateTime", "onAccept", "onChange", "showUTCAdornment", "slots", "slotProps"];
|
|
6757
|
+
var utcToPickerDate = function utcToPickerDate(value) {
|
|
6758
|
+
return new Date(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate(), value.getUTCHours(), value.getUTCMinutes(), 0,
|
|
6759
|
+
// seconds to zero
|
|
6760
|
+
0);
|
|
6761
|
+
};
|
|
6762
|
+
var pickerDateToUTC = function pickerDateToUTC(value) {
|
|
6763
|
+
return new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate(), value.getHours(), value.getMinutes(), 0,
|
|
6764
|
+
// seconds to zero
|
|
6765
|
+
0));
|
|
6766
|
+
};
|
|
6767
|
+
var OpenPickerIcon = function OpenPickerIcon() {
|
|
6768
|
+
return jsx(CalendarToday, {});
|
|
6769
|
+
};
|
|
6770
|
+
var mergeFieldSlotProps = function mergeFieldSlotProps(slotProps) {
|
|
6771
|
+
return Object.assign({
|
|
6772
|
+
openPickerButtonPosition: 'start'
|
|
6773
|
+
}, slotProps);
|
|
6774
|
+
};
|
|
6775
|
+
var mergeOpenPickerButtonSlotProps = function mergeOpenPickerButtonSlotProps(slotProps) {
|
|
6776
|
+
return Object.assign({
|
|
6777
|
+
size: 'small',
|
|
6778
|
+
sx: {
|
|
6779
|
+
padding: 0
|
|
6780
|
+
}
|
|
6781
|
+
}, slotProps);
|
|
6782
|
+
};
|
|
6783
|
+
var mergeTextFieldSlotProps = function mergeTextFieldSlotProps(slotProps, showUTCAdornment) {
|
|
6784
|
+
var _slotProps$slotProps;
|
|
6785
|
+
return Object.assign({
|
|
6786
|
+
variant: 'filled'
|
|
6787
|
+
}, showUTCAdornment && {
|
|
6788
|
+
endAdornment: jsx(InputAdornment, {
|
|
6789
|
+
position: "end",
|
|
6790
|
+
sx: {
|
|
6791
|
+
paddingTop: '16px'
|
|
6792
|
+
},
|
|
6793
|
+
children: "UTC"
|
|
6794
|
+
})
|
|
6795
|
+
}, slotProps, {
|
|
6796
|
+
slotProps: Object.assign({}, slotProps == null ? void 0 : slotProps.slotProps, {
|
|
6797
|
+
input: Object.assign({}, slotProps == null || (_slotProps$slotProps = slotProps.slotProps) == null ? void 0 : _slotProps$slotProps.input)
|
|
6798
|
+
})
|
|
6799
|
+
});
|
|
6800
|
+
};
|
|
6801
|
+
var DateTimePicker = function DateTimePicker(_ref) {
|
|
6802
|
+
var value = _ref.value,
|
|
6803
|
+
defaultValue = _ref.defaultValue,
|
|
6804
|
+
minDateTime = _ref.minDateTime,
|
|
6805
|
+
maxDateTime = _ref.maxDateTime,
|
|
6806
|
+
onAccept = _ref.onAccept,
|
|
6807
|
+
onChange = _ref.onChange,
|
|
6808
|
+
_ref$showUTCAdornment = _ref.showUTCAdornment,
|
|
6809
|
+
showUTCAdornment = _ref$showUTCAdornment === void 0 ? true : _ref$showUTCAdornment,
|
|
6810
|
+
slots = _ref.slots,
|
|
6811
|
+
slotProps = _ref.slotProps,
|
|
6812
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
6813
|
+
var callerFieldSlotProps = slotProps == null ? void 0 : slotProps.field;
|
|
6814
|
+
var callerOpenPickerButtonSlotProps = slotProps == null ? void 0 : slotProps.openPickerButton;
|
|
6815
|
+
var callerTextFieldSlotProps = slotProps == null ? void 0 : slotProps.textField;
|
|
6816
|
+
var fieldSlotProps = typeof callerFieldSlotProps === 'function' ? function (ownerState) {
|
|
6817
|
+
return mergeFieldSlotProps(callerFieldSlotProps(ownerState));
|
|
6818
|
+
} : mergeFieldSlotProps(callerFieldSlotProps);
|
|
6819
|
+
var openPickerButtonSlotProps = typeof callerOpenPickerButtonSlotProps === 'function' ? function (ownerState) {
|
|
6820
|
+
return mergeOpenPickerButtonSlotProps(callerOpenPickerButtonSlotProps(ownerState));
|
|
6821
|
+
} : mergeOpenPickerButtonSlotProps(callerOpenPickerButtonSlotProps);
|
|
6822
|
+
var textFieldSlotProps = typeof callerTextFieldSlotProps === 'function' ? function (ownerState) {
|
|
6823
|
+
return mergeTextFieldSlotProps(callerTextFieldSlotProps(ownerState), showUTCAdornment);
|
|
6824
|
+
} : mergeTextFieldSlotProps(callerTextFieldSlotProps, showUTCAdornment);
|
|
6825
|
+
return jsx(LocalizationProvider, {
|
|
6826
|
+
dateAdapter: AdapterDateFns,
|
|
6827
|
+
children: jsx(DateTimePicker$1, Object.assign({
|
|
6828
|
+
ampm: false,
|
|
6829
|
+
desktopModeMediaQuery: "@media (min-width: 720px)",
|
|
6830
|
+
format: DATE_FORMAT_DATEPICKER,
|
|
6831
|
+
timeSteps: {
|
|
6832
|
+
minutes: 1
|
|
6833
|
+
}
|
|
6834
|
+
}, props, {
|
|
6835
|
+
defaultValue: defaultValue ? utcToPickerDate(defaultValue) : undefined,
|
|
6836
|
+
maxDateTime: maxDateTime ? utcToPickerDate(maxDateTime) : undefined,
|
|
6837
|
+
minDateTime: minDateTime ? utcToPickerDate(minDateTime) : undefined,
|
|
6838
|
+
onAccept: onAccept ? function (acceptedValue, context) {
|
|
6839
|
+
return onAccept(acceptedValue ? pickerDateToUTC(acceptedValue) : null, context);
|
|
6840
|
+
} : undefined,
|
|
6841
|
+
onChange: onChange ? function (changedValue, context) {
|
|
6842
|
+
return onChange(changedValue ? pickerDateToUTC(changedValue) : null, context);
|
|
6843
|
+
} : undefined,
|
|
6844
|
+
slotProps: Object.assign({}, slotProps, {
|
|
6845
|
+
field: fieldSlotProps,
|
|
6846
|
+
openPickerButton: openPickerButtonSlotProps,
|
|
6847
|
+
textField: textFieldSlotProps
|
|
6848
|
+
}),
|
|
6849
|
+
slots: Object.assign({
|
|
6850
|
+
openPickerIcon: OpenPickerIcon
|
|
6851
|
+
}, slots),
|
|
6852
|
+
value: value ? utcToPickerDate(value) : value
|
|
6853
|
+
}))
|
|
6854
|
+
});
|
|
6855
|
+
};
|
|
6856
|
+
|
|
6614
6857
|
/* *
|
|
6615
6858
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6616
6859
|
* you may not use this file except in compliance with the License.
|
|
@@ -6635,4 +6878,4 @@ var SystemScope = {
|
|
|
6635
6878
|
plugin: 'plugin'
|
|
6636
6879
|
};
|
|
6637
6880
|
|
|
6638
|
-
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationButtons, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomDialogHeader, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterOption, LastUpdateTime, LegendToggleButton, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, SessionStorageKey, StatusTag, StorybookDocsWrapper, StyledSelect, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, index$1 as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAuthError, isAxiosAuthError, isAxiosError, isDialogFocused, isTargetInteractiveInput, linkifyText, loadAllTranslations, pollingIntervalTimeout, index as referenceTimeUtils, renderCounter, safelyInitI18nForTestsAndStories, sessionStorageProvider, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useResizeObserver, useScrollingInIsolation, useUserMenu, useWheelStopPropagation };
|
|
6881
|
+
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationButtons, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomDialogHeader, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DateTimePicker, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterOption, LastUpdateTime, LegendToggleButton, NumberWithUnitField, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, SessionStorageKey, StatusTag, StorybookDocsWrapper, StyledSelect, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, convertNumericInputValue, index$1 as dateUtils, defaultDelay, getAllowedKeys, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAuthError, isAxiosAuthError, isAxiosError, isDialogFocused, isTargetInteractiveInput, linkifyText, loadAllTranslations, pickerDateToUTC, pollingIntervalTimeout, index as referenceTimeUtils, renderCounter, safelyInitI18nForTestsAndStories, sessionStorageProvider, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useResizeObserver, useScrollingInIsolation, useUserMenu, useWheelStopPropagation, utcToPickerDate };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DateTimePickerProps as MuiDateTimePickerProps } from '@mui/x-date-pickers';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const utcToPickerDate: (value: Date) => Date;
|
|
4
|
+
export declare const pickerDateToUTC: (value: Date) => Date;
|
|
5
|
+
export interface DateTimePickerProps extends MuiDateTimePickerProps {
|
|
6
|
+
showUTCAdornment?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const DateTimePicker: React.FC<DateTimePickerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DateTimePicker';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface NumberWithUnitOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface NumberWithUnitValue {
|
|
7
|
+
value: number;
|
|
8
|
+
unit: string;
|
|
9
|
+
}
|
|
10
|
+
export interface NumberWithUnitFieldProps {
|
|
11
|
+
label: string;
|
|
12
|
+
value: number;
|
|
13
|
+
unit: string;
|
|
14
|
+
unitOptions: NumberWithUnitOption[];
|
|
15
|
+
onChange: (value: NumberWithUnitValue, isStep?: boolean) => void;
|
|
16
|
+
onInputChange?: () => void;
|
|
17
|
+
unitAriaLabel?: string;
|
|
18
|
+
minValue?: number;
|
|
19
|
+
maxDigits?: number;
|
|
20
|
+
maxMagnitude?: number;
|
|
21
|
+
error?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const NumberWithUnitField: React.FC<NumberWithUnitFieldProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberWithUnitField';
|
|
@@ -6,6 +6,7 @@ export interface ConfigType {
|
|
|
6
6
|
GW_AUTH_CLIENT_ID?: string;
|
|
7
7
|
GW_AUTH_ROLE_CLAIM_NAME?: string;
|
|
8
8
|
GW_AUTH_ROLE_CLAIM_VALUE_PRESETS_ADMIN?: string;
|
|
9
|
+
GW_AUTH_TRUSTED_HOSTS?: string;
|
|
9
10
|
GW_BE_VERSION_BASE_URL?: string;
|
|
10
11
|
GW_APP_URL?: string;
|
|
11
12
|
GW_INITIAL_PRESETS_FILENAME?: string;
|
|
@@ -330,12 +330,6 @@ export declare const startOfMonthUTC: (date: Date) => Date;
|
|
|
330
330
|
* @returns the new date
|
|
331
331
|
*/
|
|
332
332
|
export declare const startOfYearUTC: (date: Date) => Date;
|
|
333
|
-
/**
|
|
334
|
-
* Parse custom time format of NOW+current time | current date in UTC. The result will be in UTC.
|
|
335
|
-
* @param timeValue - string value
|
|
336
|
-
* @returns Time in UTC format
|
|
337
|
-
*/
|
|
338
|
-
export declare const convertNOWFormatToUTC: (timeValue: string) => string;
|
|
339
333
|
/**
|
|
340
334
|
* Parse custom time format of NOW+-hours and minutes || TODAY+-hours and minutes into UTC. The result will be in UTC.
|
|
341
335
|
* @param timeValue - string value
|
|
@@ -7,3 +7,4 @@ export { renderCounter } from './renderCounter';
|
|
|
7
7
|
export { SessionStorageKey, sessionStorageProvider } from './sessionStorage';
|
|
8
8
|
export type { SessionStorageProvider } from './sessionStorage';
|
|
9
9
|
export { isTargetInteractiveInput, isDialogFocused } from './keyboardUtils';
|
|
10
|
+
export * from './numberInputUtils';
|
package/package.json
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
2
|
+
"name": "@opengeoweb/shared",
|
|
3
|
+
"version": "20.0.0",
|
|
4
|
+
"description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.esm.js",
|
|
11
|
+
"module": "./dist/index.esm.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
".": {
|
|
16
|
+
"@opengeoweb/source": "./src/index.ts",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.esm.js",
|
|
19
|
+
"default": "./dist/index.esm.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@opengeoweb/theme": "20.0.0",
|
|
24
|
+
"react-draggable": "^4.4.6",
|
|
25
|
+
"re-resizable": "^6.9.11",
|
|
26
|
+
"lodash": "^4.18.1",
|
|
27
|
+
"axios": "^1.18.0",
|
|
28
|
+
"date-fns": "^4.1.0",
|
|
29
|
+
"react-i18next": "^15.1.1",
|
|
30
|
+
"i18next": "^25.0.1",
|
|
31
|
+
"@mui/material": "^9.0.1",
|
|
32
|
+
"@mui/x-date-pickers": "^9.3.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "19",
|
|
36
|
+
"@emotion/react": "*",
|
|
37
|
+
"@emotion/styled": "*"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"eslint-plugin-storybook": "10.3.3"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"!dist/package.json",
|
|
45
|
+
"README.md",
|
|
46
|
+
"package.json"
|
|
47
|
+
]
|
|
48
|
+
}
|