@opengeoweb/shared 9.25.0 → 9.25.3
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
|
@@ -3487,6 +3487,7 @@ $$a({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
|
3487
3487
|
*
|
|
3488
3488
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3489
3489
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3490
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3490
3491
|
* */
|
|
3491
3492
|
const showPrompt = event => {
|
|
3492
3493
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -3522,6 +3523,7 @@ function usePreventBrowserClose(shouldPreventClose) {
|
|
|
3522
3523
|
*
|
|
3523
3524
|
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3524
3525
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
3526
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3525
3527
|
* */
|
|
3526
3528
|
const pollingIntervalTimeout = 300000;
|
|
3527
3529
|
const usePoller = (deps, callback, pollingInterval = pollingIntervalTimeout) => {
|
|
@@ -3560,6 +3562,7 @@ const usePoller = (deps, callback, pollingInterval = pollingIntervalTimeout) =>
|
|
|
3560
3562
|
*
|
|
3561
3563
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3562
3564
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3565
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3563
3566
|
* */
|
|
3564
3567
|
function usePrevious(value) {
|
|
3565
3568
|
const ref = React.useRef();
|
|
@@ -3584,6 +3587,7 @@ function usePrevious(value) {
|
|
|
3584
3587
|
*
|
|
3585
3588
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3586
3589
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3590
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3587
3591
|
* */
|
|
3588
3592
|
const useIsMounted = () => {
|
|
3589
3593
|
const isMounted = React.useRef(false);
|
|
@@ -6261,6 +6265,7 @@ const useUserMenu = (open = false) => {
|
|
|
6261
6265
|
*
|
|
6262
6266
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6263
6267
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6268
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6264
6269
|
* */
|
|
6265
6270
|
const getInitials = name => {
|
|
6266
6271
|
if (!name) {
|
|
@@ -8326,12 +8331,12 @@ const FilterChip = ({
|
|
|
8326
8331
|
isDisabled: _isDisabled = false,
|
|
8327
8332
|
handleClick: _handleClick = () => {},
|
|
8328
8333
|
onAction,
|
|
8329
|
-
actionIcon
|
|
8334
|
+
actionIcon,
|
|
8335
|
+
size: _size = 'small'
|
|
8330
8336
|
}) => {
|
|
8331
8337
|
const theme = useTheme();
|
|
8332
|
-
const size = actionIcon && onAction ? 'medium' : 'small';
|
|
8333
8338
|
return jsx(Chip, {
|
|
8334
|
-
size:
|
|
8339
|
+
size: _size,
|
|
8335
8340
|
id: id,
|
|
8336
8341
|
label: label,
|
|
8337
8342
|
disabled: _isDisabled,
|
|
@@ -8342,8 +8347,7 @@ const FilterChip = ({
|
|
|
8342
8347
|
padding: '0px 4px',
|
|
8343
8348
|
'& .MuiSvgIcon-root, .MuiChip-deleteIcon': {
|
|
8344
8349
|
fill: _isSelected ? theme.palette.geowebColors.buttons.secondary.active.color : theme.palette.geowebColors.buttons.flat.default.color,
|
|
8345
|
-
color: _isSelected ? theme.palette.geowebColors.buttons.secondary.active.color : theme.palette.geowebColors.buttons.flat.default.color
|
|
8346
|
-
paddingLeft: _isSelected ? 0 : '2px'
|
|
8350
|
+
color: _isSelected ? theme.palette.geowebColors.buttons.secondary.active.color : theme.palette.geowebColors.buttons.flat.default.color
|
|
8347
8351
|
},
|
|
8348
8352
|
'& .MuiChip-filled': {
|
|
8349
8353
|
border: '1px solid transparent'
|
|
@@ -8352,7 +8356,7 @@ const FilterChip = ({
|
|
|
8352
8356
|
overflow: 'visible'
|
|
8353
8357
|
}
|
|
8354
8358
|
},
|
|
8355
|
-
onClick: () => _handleClick(id),
|
|
8359
|
+
onClick: () => _handleClick(id, _isSelected),
|
|
8356
8360
|
deleteIcon: actionIcon,
|
|
8357
8361
|
onDelete: onAction
|
|
8358
8362
|
});
|
|
@@ -8490,8 +8494,8 @@ const Filter = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
8490
8494
|
|
|
8491
8495
|
const FilterListItem = ({
|
|
8492
8496
|
filter,
|
|
8493
|
-
toggleFilter,
|
|
8494
|
-
enableOnlyOneFilter
|
|
8497
|
+
toggleFilter: _toggleFilter = () => {},
|
|
8498
|
+
enableOnlyOneFilter: _enableOnlyOneFilter = () => {}
|
|
8495
8499
|
}) => {
|
|
8496
8500
|
const {
|
|
8497
8501
|
t
|
|
@@ -8504,10 +8508,10 @@ const FilterListItem = ({
|
|
|
8504
8508
|
setIsHovering(false);
|
|
8505
8509
|
}, []);
|
|
8506
8510
|
const selectOnlyOne = filterId => {
|
|
8507
|
-
|
|
8511
|
+
_enableOnlyOneFilter(filterId);
|
|
8508
8512
|
};
|
|
8509
8513
|
const toggleCheckbox = filterId => {
|
|
8510
|
-
|
|
8514
|
+
_toggleFilter([filterId]);
|
|
8511
8515
|
};
|
|
8512
8516
|
const mouseMoveRef = React.useRef(null);
|
|
8513
8517
|
React.useEffect(() => {
|
|
@@ -8620,6 +8624,7 @@ const FilterListItem = ({
|
|
|
8620
8624
|
*
|
|
8621
8625
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8622
8626
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8627
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8623
8628
|
* */
|
|
8624
8629
|
const DEFAULT_ERROR_MESSAGE = 'An error has occurred';
|
|
8625
8630
|
// Guard function for detecting an AxiosError (typically the kind of error returned by the backend)
|
|
@@ -8729,6 +8734,7 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
|
|
|
8729
8734
|
*
|
|
8730
8735
|
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8731
8736
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
8737
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8732
8738
|
* */
|
|
8733
8739
|
const DATE_FORMAT_DATEPICKER = 'dd/MM/yyyy HH:mm';
|
|
8734
8740
|
const DATE_FORMAT_UTC = "yyyy-MM-dd'T'HH:mm:ss'Z'";
|
|
@@ -9318,6 +9324,7 @@ const convertNOWandTODAYFormatsToUTC = timeValue => {
|
|
|
9318
9324
|
*
|
|
9319
9325
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9320
9326
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
9327
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9321
9328
|
* */
|
|
9322
9329
|
|
|
9323
9330
|
var index = /*#__PURE__*/Object.freeze({
|
|
@@ -9390,6 +9397,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
9390
9397
|
*
|
|
9391
9398
|
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9392
9399
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
9400
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9393
9401
|
* */
|
|
9394
9402
|
const createMockStoreWithEggs = mockState => {
|
|
9395
9403
|
const mockStore = configureStore();
|
|
@@ -9433,6 +9441,7 @@ const createToolkitMockStoreWithEggs = storeConfig => {
|
|
|
9433
9441
|
*
|
|
9434
9442
|
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9435
9443
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
9444
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9436
9445
|
* */
|
|
9437
9446
|
/**
|
|
9438
9447
|
* Utility function to keep track of number of renders by a react component
|
package/package.json
CHANGED
|
@@ -4,9 +4,10 @@ export interface FilterChipProps {
|
|
|
4
4
|
label: string;
|
|
5
5
|
isSelected?: boolean;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
|
-
handleClick?: (label: string) => void;
|
|
7
|
+
handleClick?: (label: string, isSelected?: boolean) => void;
|
|
8
8
|
onAction?: React.MouseEventHandler;
|
|
9
9
|
actionIcon?: React.ReactElement;
|
|
10
|
+
size?: 'small' | 'medium';
|
|
10
11
|
}
|
|
11
12
|
declare const FilterChip: React.FC<FilterChipProps>;
|
|
12
13
|
export default FilterChip;
|
|
@@ -7,7 +7,7 @@ export interface Filter {
|
|
|
7
7
|
}
|
|
8
8
|
export interface FilterListItemProps {
|
|
9
9
|
filter: Filter;
|
|
10
|
-
toggleFilter
|
|
11
|
-
enableOnlyOneFilter
|
|
10
|
+
toggleFilter?: (filterIds: string[]) => void;
|
|
11
|
+
enableOnlyOneFilter?: (filterId: string) => void;
|
|
12
12
|
}
|
|
13
13
|
export declare const FilterListItem: React.FC<FilterListItemProps>;
|