@opengeoweb/shared 12.2.0 → 12.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +117 -58
- package/package.json +3 -4
- package/src/lib/utils/index.d.ts +2 -1
- package/src/lib/utils/sessionStorage.d.ts +28 -0
- package/src/lib/utils/sessionStorage.spec.d.ts +1 -0
- package/src/lib/utils/reduxTestUtils/createMockStore.d.ts +0 -2
- package/src/lib/utils/reduxTestUtils/index.d.ts +0 -1
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { Box, Typography, useTheme, Tooltip, IconButton, Menu, ListSubheader, MenuItem,
|
|
2
|
+
import { Box, Typography, useTheme, Tooltip, IconButton, Menu, ListSubheader, MenuItem, Grid, ListItemText, ListItemIcon, DialogTitle, Button, Dialog, DialogContent, DialogActions, Paper, CircularProgress, Alert, AlertTitle, Drawer, Link, Avatar as Avatar$1, ClickAwayListener, MenuList, RadioGroup, FormControlLabel, Radio, List, ListItem, Tabs, Tab, Backdrop, Switch, Slider, ToggleButton, styled, Select, Accordion, AccordionSummary, AccordionDetails, FormLabel, TextField, InputAdornment, Chip, Stack, debounce as debounce$1, ListItemButton, Checkbox } from '@mui/material';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, Component, useState } from 'react';
|
|
5
5
|
import Draggable from 'react-draggable';
|
|
@@ -10,7 +10,6 @@ import { initReactI18next, useTranslation } from 'react-i18next';
|
|
|
10
10
|
import { throttle, escapeRegExp, debounce } from 'lodash';
|
|
11
11
|
import * as Sentry from '@sentry/react';
|
|
12
12
|
import { parseISO, parse, format, isEqual, add as add$1, sub as sub$1, differenceInYears as differenceInYears$1, differenceInMonths as differenceInMonths$1, differenceInDays as differenceInDays$1, differenceInMinutes as differenceInMinutes$1, differenceInHours as differenceInHours$1, differenceInSeconds as differenceInSeconds$1, roundToNearestMinutes as roundToNearestMinutes$1, isBefore as isBefore$1, isAfter as isAfter$1, isValid as isValid$1, getUnixTime, fromUnixTime, set as set$1, getHours as getHours$1, startOfDay, addMinutes, addHours, setSeconds as setSeconds$1, getDay, getDayOfYear, getMonth, getWeek, getYear, isWithinInterval } from 'date-fns';
|
|
13
|
-
import { configureStore } from '@reduxjs/toolkit';
|
|
14
13
|
|
|
15
14
|
var en = {
|
|
16
15
|
"shared-choose-app-mode": "Choose your default app mode",
|
|
@@ -1032,16 +1031,16 @@ var ToggleMenu = function ToggleMenu(_ref) {
|
|
|
1032
1031
|
},
|
|
1033
1032
|
disabled: isDisabled,
|
|
1034
1033
|
selected: menuItem.isSelected,
|
|
1035
|
-
children: jsxs(
|
|
1034
|
+
children: jsxs(Grid, {
|
|
1036
1035
|
container: true,
|
|
1037
1036
|
spacing: 2,
|
|
1038
1037
|
justifyContent: "space-between",
|
|
1039
1038
|
size: "grow",
|
|
1040
|
-
children: [jsx(
|
|
1039
|
+
children: [jsx(Grid, {
|
|
1041
1040
|
children: jsx(ListItemText, {
|
|
1042
1041
|
children: text
|
|
1043
1042
|
})
|
|
1044
|
-
}), icon && jsx(
|
|
1043
|
+
}), icon && jsx(Grid, {
|
|
1045
1044
|
alignItems: "flex-end",
|
|
1046
1045
|
children: jsx(ListItemIcon, {
|
|
1047
1046
|
sx: {
|
|
@@ -1157,7 +1156,7 @@ var CustomDialogHeader = function CustomDialogHeader(_ref2) {
|
|
|
1157
1156
|
"data-testid": "CloseIcon"
|
|
1158
1157
|
})
|
|
1159
1158
|
})]
|
|
1160
|
-
}) : jsxs(
|
|
1159
|
+
}) : jsxs(Grid, {
|
|
1161
1160
|
container: true,
|
|
1162
1161
|
"data-testid": "dialog-action-header",
|
|
1163
1162
|
alignItems: "center",
|
|
@@ -1168,7 +1167,7 @@ var CustomDialogHeader = function CustomDialogHeader(_ref2) {
|
|
|
1168
1167
|
zIndex: 1
|
|
1169
1168
|
},
|
|
1170
1169
|
"aria-label": "Dialog options header",
|
|
1171
|
-
children: [jsx(
|
|
1170
|
+
children: [jsx(Grid, {
|
|
1172
1171
|
size: 4,
|
|
1173
1172
|
children: jsx(Button, {
|
|
1174
1173
|
onClick: function onClick() {
|
|
@@ -1183,7 +1182,7 @@ var CustomDialogHeader = function CustomDialogHeader(_ref2) {
|
|
|
1183
1182
|
},
|
|
1184
1183
|
children: t('shared-customdialog-back')
|
|
1185
1184
|
})
|
|
1186
|
-
}), jsx(
|
|
1185
|
+
}), jsx(Grid, {
|
|
1187
1186
|
sx: {
|
|
1188
1187
|
display: 'flex',
|
|
1189
1188
|
justifyContent: 'center',
|
|
@@ -1193,7 +1192,7 @@ var CustomDialogHeader = function CustomDialogHeader(_ref2) {
|
|
|
1193
1192
|
children: title && jsx(Title, {
|
|
1194
1193
|
title: title
|
|
1195
1194
|
})
|
|
1196
|
-
}), jsx(
|
|
1195
|
+
}), jsx(Grid, {
|
|
1197
1196
|
size: 4,
|
|
1198
1197
|
children: jsx(Box, {
|
|
1199
1198
|
sx: {
|
|
@@ -2336,6 +2335,8 @@ var styles$4 = {
|
|
|
2336
2335
|
backgroundColor: 'geowebColors.background.surface'
|
|
2337
2336
|
},
|
|
2338
2337
|
userMenu: {
|
|
2338
|
+
maxHeight: 'calc(100vh - 40px)',
|
|
2339
|
+
overflowY: 'auto',
|
|
2339
2340
|
padding: 0,
|
|
2340
2341
|
'& > li': {
|
|
2341
2342
|
paddingTop: 3,
|
|
@@ -2356,8 +2357,10 @@ var UserMenu = function UserMenu(_ref) {
|
|
|
2356
2357
|
initials = _ref.initials,
|
|
2357
2358
|
_ref$isAdmin = _ref.isAdmin,
|
|
2358
2359
|
isAdmin = _ref$isAdmin === void 0 ? false : _ref$isAdmin;
|
|
2360
|
+
var toggleRef = useRef(null);
|
|
2359
2361
|
return jsxs(Fragment, {
|
|
2360
2362
|
children: [jsx(CustomIconButton, {
|
|
2363
|
+
ref: toggleRef,
|
|
2361
2364
|
"data-testid": "userButton",
|
|
2362
2365
|
onClick: onToggle,
|
|
2363
2366
|
sx: {
|
|
@@ -2393,7 +2396,13 @@ var UserMenu = function UserMenu(_ref) {
|
|
|
2393
2396
|
sx: styles$4.container,
|
|
2394
2397
|
"data-testid": "userMenu",
|
|
2395
2398
|
children: jsx(ClickAwayListener, {
|
|
2396
|
-
onClickAway:
|
|
2399
|
+
onClickAway: function onClickAway(event) {
|
|
2400
|
+
var _toggleRef$current;
|
|
2401
|
+
if ((_toggleRef$current = toggleRef.current) != null && _toggleRef$current.contains(event.target)) {
|
|
2402
|
+
return; // don't close here if clicking the toggle
|
|
2403
|
+
}
|
|
2404
|
+
onClose();
|
|
2405
|
+
},
|
|
2397
2406
|
mouseEvent: "onMouseDown",
|
|
2398
2407
|
children: jsx(MenuList, {
|
|
2399
2408
|
sx: styles$4.userMenu,
|
|
@@ -2414,11 +2423,11 @@ var MenuItemTheme = function MenuItemTheme(_ref) {
|
|
|
2414
2423
|
t = _useTranslation.t;
|
|
2415
2424
|
return jsx(MenuItem, {
|
|
2416
2425
|
divider: true,
|
|
2417
|
-
children: jsxs(
|
|
2426
|
+
children: jsxs(Grid, {
|
|
2418
2427
|
container: true,
|
|
2419
|
-
children: [jsx(
|
|
2428
|
+
children: [jsx(Grid, {
|
|
2420
2429
|
children: t('shared-choose-app-mode')
|
|
2421
|
-
}), jsx(
|
|
2430
|
+
}), jsx(Grid, {
|
|
2422
2431
|
children: jsxs(RadioGroup, {
|
|
2423
2432
|
onChange: function onChange(event, value) {
|
|
2424
2433
|
if (value && setThemeName) {
|
|
@@ -2569,7 +2578,7 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
2569
2578
|
}),
|
|
2570
2579
|
role: "heading",
|
|
2571
2580
|
"aria-label": "toolheader",
|
|
2572
|
-
children: jsxs(
|
|
2581
|
+
children: jsxs(Grid, {
|
|
2573
2582
|
container: true,
|
|
2574
2583
|
alignItems: "center",
|
|
2575
2584
|
sx: {
|
|
@@ -2577,14 +2586,14 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
2577
2586
|
height: styles.height
|
|
2578
2587
|
},
|
|
2579
2588
|
justifyContent: "space-between",
|
|
2580
|
-
children: [jsx(
|
|
2589
|
+
children: [jsx(Grid, {
|
|
2581
2590
|
className: "header-left",
|
|
2582
2591
|
sx: {
|
|
2583
2592
|
paddingRight: 1
|
|
2584
2593
|
},
|
|
2585
2594
|
size: columnSizeLeft,
|
|
2586
2595
|
children: leftHeaderComponent && leftHeaderComponent
|
|
2587
|
-
}), jsx(
|
|
2596
|
+
}), jsx(Grid, {
|
|
2588
2597
|
className: "header-title",
|
|
2589
2598
|
size: title ? columnSizeTitle : 0,
|
|
2590
2599
|
container: true,
|
|
@@ -2606,7 +2615,7 @@ var ToolHeader = function ToolHeader(_ref) {
|
|
|
2606
2615
|
role: "heading",
|
|
2607
2616
|
children: title
|
|
2608
2617
|
})
|
|
2609
|
-
}), jsxs(
|
|
2618
|
+
}), jsxs(Grid, {
|
|
2610
2619
|
className: "header-right",
|
|
2611
2620
|
container: true,
|
|
2612
2621
|
justifyContent: "flex-end",
|
|
@@ -3446,13 +3455,13 @@ var ShortcutList = function ShortcutList(_ref) {
|
|
|
3446
3455
|
minHeight: 56
|
|
3447
3456
|
},
|
|
3448
3457
|
divider: index !== shortcuts.length - 1,
|
|
3449
|
-
children: jsxs(
|
|
3458
|
+
children: jsxs(Grid, {
|
|
3450
3459
|
container: true,
|
|
3451
3460
|
direction: "row",
|
|
3452
3461
|
justifyContent: "space-between",
|
|
3453
3462
|
alignItems: "center",
|
|
3454
3463
|
size: "grow",
|
|
3455
|
-
children: [jsx(
|
|
3464
|
+
children: [jsx(Grid, {
|
|
3456
3465
|
sx: {
|
|
3457
3466
|
fontSize: 12,
|
|
3458
3467
|
fontWeight: 300,
|
|
@@ -3460,7 +3469,7 @@ var ShortcutList = function ShortcutList(_ref) {
|
|
|
3460
3469
|
opacity: 0.67
|
|
3461
3470
|
},
|
|
3462
3471
|
children: t(shortcut.titleKey)
|
|
3463
|
-
}), jsx(
|
|
3472
|
+
}), jsx(Grid, {
|
|
3464
3473
|
children: jsx(Box, {
|
|
3465
3474
|
sx: {
|
|
3466
3475
|
alignItems: 'center'
|
|
@@ -3546,9 +3555,9 @@ var UserMenuItemCheatSheet = function UserMenuItemCheatSheet() {
|
|
|
3546
3555
|
"data-testid": "cheatsheet-btn",
|
|
3547
3556
|
onClick: onOpen,
|
|
3548
3557
|
divider: true,
|
|
3549
|
-
children: jsx(
|
|
3558
|
+
children: jsx(Grid, {
|
|
3550
3559
|
container: true,
|
|
3551
|
-
children: jsx(
|
|
3560
|
+
children: jsx(Grid, {
|
|
3552
3561
|
children: t('shared-cheat-sheet')
|
|
3553
3562
|
})
|
|
3554
3563
|
})
|
|
@@ -3689,9 +3698,9 @@ var UserMenuItemSentryRecording = function UserMenuItemSentryRecording(_ref) {
|
|
|
3689
3698
|
"data-testid": "sentryRecording-btn",
|
|
3690
3699
|
onClick: onOpen,
|
|
3691
3700
|
divider: true,
|
|
3692
|
-
children: jsx(
|
|
3701
|
+
children: jsx(Grid, {
|
|
3693
3702
|
container: true,
|
|
3694
|
-
children: jsx(
|
|
3703
|
+
children: jsx(Grid, {
|
|
3695
3704
|
children: t('shared-sentry-recording')
|
|
3696
3705
|
})
|
|
3697
3706
|
})
|
|
@@ -3711,14 +3720,14 @@ var UserMenuItemSentryRecording = function UserMenuItemSentryRecording(_ref) {
|
|
|
3711
3720
|
isOpen: true,
|
|
3712
3721
|
onClose: onClose,
|
|
3713
3722
|
bounds: "parent",
|
|
3714
|
-
children: jsxs(
|
|
3723
|
+
children: jsxs(Grid, {
|
|
3715
3724
|
container: true,
|
|
3716
3725
|
spacing: 4,
|
|
3717
3726
|
sx: {
|
|
3718
3727
|
paddingLeft: '70px',
|
|
3719
3728
|
paddingRight: '70px'
|
|
3720
3729
|
},
|
|
3721
|
-
children: [jsx(
|
|
3730
|
+
children: [jsx(Grid, {
|
|
3722
3731
|
container: true,
|
|
3723
3732
|
justifyContent: "center",
|
|
3724
3733
|
sx: {
|
|
@@ -3727,7 +3736,7 @@ var UserMenuItemSentryRecording = function UserMenuItemSentryRecording(_ref) {
|
|
|
3727
3736
|
children: jsx(Typography, {
|
|
3728
3737
|
children: t('shared-sentry-information')
|
|
3729
3738
|
})
|
|
3730
|
-
}), jsx(
|
|
3739
|
+
}), jsx(Grid, {
|
|
3731
3740
|
container: true,
|
|
3732
3741
|
justifyContent: "center",
|
|
3733
3742
|
sx: {
|
|
@@ -3736,7 +3745,7 @@ var UserMenuItemSentryRecording = function UserMenuItemSentryRecording(_ref) {
|
|
|
3736
3745
|
children: jsx(Typography, {
|
|
3737
3746
|
children: t('shared-sentry-enable-message')
|
|
3738
3747
|
})
|
|
3739
|
-
}), jsxs(
|
|
3748
|
+
}), jsxs(Grid, {
|
|
3740
3749
|
container: true,
|
|
3741
3750
|
alignItems: "center",
|
|
3742
3751
|
direction: "column",
|
|
@@ -3749,7 +3758,7 @@ var UserMenuItemSentryRecording = function UserMenuItemSentryRecording(_ref) {
|
|
|
3749
3758
|
}) : jsxs(Typography, {
|
|
3750
3759
|
children: [" ", t('shared-sentry-enable')]
|
|
3751
3760
|
})]
|
|
3752
|
-
}), jsxs(
|
|
3761
|
+
}), jsxs(Grid, {
|
|
3753
3762
|
container: true,
|
|
3754
3763
|
alignItems: "center",
|
|
3755
3764
|
direction: "column",
|
|
@@ -3773,7 +3782,7 @@ var UserMenuItemSentryRecording = function UserMenuItemSentryRecording(_ref) {
|
|
|
3773
3782
|
children: ["(", t('shared-sentry-cors-wait'), ")"]
|
|
3774
3783
|
})]
|
|
3775
3784
|
})]
|
|
3776
|
-
}), jsx(
|
|
3785
|
+
}), jsx(Grid, {
|
|
3777
3786
|
container: true,
|
|
3778
3787
|
justifyContent: "center",
|
|
3779
3788
|
children: jsx(Typography, {
|
|
@@ -5985,33 +5994,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
5985
5994
|
utc: utc
|
|
5986
5995
|
});
|
|
5987
5996
|
|
|
5988
|
-
/* *
|
|
5989
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5990
|
-
* you may not use this file except in compliance with the License.
|
|
5991
|
-
* You may obtain a copy of the License at
|
|
5992
|
-
*
|
|
5993
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5994
|
-
*
|
|
5995
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5996
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5997
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5998
|
-
* See the License for the specific language governing permissions and
|
|
5999
|
-
* limitations under the License.
|
|
6000
|
-
*
|
|
6001
|
-
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6002
|
-
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
6003
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6004
|
-
* */
|
|
6005
|
-
var createToolkitMockStore = function createToolkitMockStore(storeConfig) {
|
|
6006
|
-
var reducer = storeConfig.reducer,
|
|
6007
|
-
preloadedState = storeConfig.preloadedState;
|
|
6008
|
-
var store = configureStore(Object.assign({}, storeConfig, {
|
|
6009
|
-
reducer: reducer,
|
|
6010
|
-
preloadedState: preloadedState
|
|
6011
|
-
}));
|
|
6012
|
-
return store;
|
|
6013
|
-
};
|
|
6014
|
-
|
|
6015
5997
|
/* *
|
|
6016
5998
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6017
5999
|
* you may not use this file except in compliance with the License.
|
|
@@ -6156,6 +6138,83 @@ var RenderCounter = /*#__PURE__*/function () {
|
|
|
6156
6138
|
}();
|
|
6157
6139
|
var renderCounter = new RenderCounter();
|
|
6158
6140
|
|
|
6141
|
+
/* *
|
|
6142
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6143
|
+
* you may not use this file except in compliance with the License.
|
|
6144
|
+
* You may obtain a copy of the License at
|
|
6145
|
+
*
|
|
6146
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6147
|
+
*
|
|
6148
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6149
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6150
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6151
|
+
* See the License for the specific language governing permissions and
|
|
6152
|
+
* limitations under the License.
|
|
6153
|
+
*
|
|
6154
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6155
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
6156
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6157
|
+
* */
|
|
6158
|
+
var SessionStorageKey;
|
|
6159
|
+
(function (SessionStorageKey) {
|
|
6160
|
+
SessionStorageKey["CONFIG"] = "config";
|
|
6161
|
+
SessionStorageKey["OAUTH_STATE"] = "oauth_state";
|
|
6162
|
+
SessionStorageKey["OAUTH_CODE_VERIFIER"] = "code_verifier";
|
|
6163
|
+
SessionStorageKey["OAUTH_CODE_CHALLENGE"] = "code_challenge";
|
|
6164
|
+
SessionStorageKey["HAS_AUTHENTICATED"] = "has_authenticated";
|
|
6165
|
+
SessionStorageKey["CALLBACK_URL"] = "callback_url";
|
|
6166
|
+
})(SessionStorageKey || (SessionStorageKey = {}));
|
|
6167
|
+
var sessionStorageProvider = {
|
|
6168
|
+
setConfig: function setConfig(value) {
|
|
6169
|
+
return sessionStorage.setItem(SessionStorageKey.CONFIG, JSON.stringify(value));
|
|
6170
|
+
},
|
|
6171
|
+
getConfig: function getConfig() {
|
|
6172
|
+
return JSON.parse(sessionStorage.getItem(SessionStorageKey.CONFIG) || '{}');
|
|
6173
|
+
},
|
|
6174
|
+
setOauthState: function setOauthState(value) {
|
|
6175
|
+
return sessionStorage.setItem(SessionStorageKey.OAUTH_STATE, value);
|
|
6176
|
+
},
|
|
6177
|
+
getOauthState: function getOauthState() {
|
|
6178
|
+
return sessionStorage.getItem(SessionStorageKey.OAUTH_STATE);
|
|
6179
|
+
},
|
|
6180
|
+
removeOauthState: function removeOauthState() {
|
|
6181
|
+
return sessionStorage.removeItem(SessionStorageKey.OAUTH_STATE);
|
|
6182
|
+
},
|
|
6183
|
+
setOauthCodeVerifier: function setOauthCodeVerifier(value) {
|
|
6184
|
+
return sessionStorage.setItem(SessionStorageKey.OAUTH_CODE_VERIFIER, value);
|
|
6185
|
+
},
|
|
6186
|
+
getOauthCodeVerifier: function getOauthCodeVerifier() {
|
|
6187
|
+
return sessionStorage.getItem(SessionStorageKey.OAUTH_CODE_VERIFIER);
|
|
6188
|
+
},
|
|
6189
|
+
removeOauthCodeVerifier: function removeOauthCodeVerifier() {
|
|
6190
|
+
return sessionStorage.removeItem(SessionStorageKey.OAUTH_CODE_VERIFIER);
|
|
6191
|
+
},
|
|
6192
|
+
setOauthCodeChallenge: function setOauthCodeChallenge(value) {
|
|
6193
|
+
return sessionStorage.setItem(SessionStorageKey.OAUTH_CODE_CHALLENGE, value);
|
|
6194
|
+
},
|
|
6195
|
+
getOauthCodeChallenge: function getOauthCodeChallenge() {
|
|
6196
|
+
return sessionStorage.getItem(SessionStorageKey.OAUTH_CODE_CHALLENGE);
|
|
6197
|
+
},
|
|
6198
|
+
removeOauthCodeChallenge: function removeOauthCodeChallenge() {
|
|
6199
|
+
return sessionStorage.removeItem(SessionStorageKey.OAUTH_CODE_CHALLENGE);
|
|
6200
|
+
},
|
|
6201
|
+
setHasAuthenticated: function setHasAuthenticated(value) {
|
|
6202
|
+
return sessionStorage.setItem(SessionStorageKey.HAS_AUTHENTICATED, value);
|
|
6203
|
+
},
|
|
6204
|
+
getHasAuthenticated: function getHasAuthenticated() {
|
|
6205
|
+
return sessionStorage.getItem(SessionStorageKey.HAS_AUTHENTICATED);
|
|
6206
|
+
},
|
|
6207
|
+
removeHasAuthenticated: function removeHasAuthenticated() {
|
|
6208
|
+
return sessionStorage.removeItem(SessionStorageKey.HAS_AUTHENTICATED);
|
|
6209
|
+
},
|
|
6210
|
+
getCallbackUrl: function getCallbackUrl() {
|
|
6211
|
+
return sessionStorage.getItem(SessionStorageKey.CALLBACK_URL);
|
|
6212
|
+
},
|
|
6213
|
+
setCallbackUrl: function setCallbackUrl(value) {
|
|
6214
|
+
return sessionStorage.setItem(SessionStorageKey.CALLBACK_URL, value);
|
|
6215
|
+
}
|
|
6216
|
+
};
|
|
6217
|
+
|
|
6159
6218
|
/* *
|
|
6160
6219
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6161
6220
|
* you may not use this file except in compliance with the License.
|
|
@@ -6179,4 +6238,4 @@ var SystemScope = {
|
|
|
6179
6238
|
system: 'system'
|
|
6180
6239
|
};
|
|
6181
6240
|
|
|
6182
|
-
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, PROJECTION, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, StatusTag, StorybookDocsWrapper, StyledSelect, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize,
|
|
6241
|
+
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, 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, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAxiosAuthError, isAxiosError, loadAllTranslations, pollingIntervalTimeout, renderCounter, safelyInitI18nForTestsAndStories, sessionStorageProvider, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, useWheelStopPropagation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,17 +8,16 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/theme": "12.
|
|
11
|
+
"@opengeoweb/theme": "12.3.0",
|
|
12
12
|
"react-draggable": "^4.4.6",
|
|
13
13
|
"re-resizable": "^6.9.11",
|
|
14
14
|
"lodash": "^4.17.21",
|
|
15
15
|
"axios": "^1.7.7",
|
|
16
16
|
"date-fns": "^4.1.0",
|
|
17
|
-
"@reduxjs/toolkit": "^1.9.7",
|
|
18
17
|
"react-i18next": "^15.1.1",
|
|
19
18
|
"i18next": "^23.11.5",
|
|
20
19
|
"@sentry/react": "^8.34.0",
|
|
21
|
-
"@mui/material": "^
|
|
20
|
+
"@mui/material": "^7.0.1"
|
|
22
21
|
},
|
|
23
22
|
"peerDependencies": {
|
|
24
23
|
"react": "18",
|
package/src/lib/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './axiosErrorUtils';
|
|
2
2
|
export * as dateUtils from './dateUtils';
|
|
3
|
-
export * from './reduxTestUtils';
|
|
4
3
|
export * from './mapProjections';
|
|
5
4
|
export { renderCounter } from './renderCounter';
|
|
5
|
+
export { sessionStorageProvider, SessionStorageKey } from './sessionStorage';
|
|
6
|
+
export type { SessionStorageProvider } from './sessionStorage';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ConfigType } from '../types';
|
|
2
|
+
export interface SessionStorageProvider {
|
|
3
|
+
setConfig: (value: ConfigType) => void;
|
|
4
|
+
getConfig: () => ConfigType;
|
|
5
|
+
setOauthState: (value: string) => void;
|
|
6
|
+
getOauthState: () => string;
|
|
7
|
+
removeOauthState: () => void;
|
|
8
|
+
setOauthCodeVerifier: (value: string) => void;
|
|
9
|
+
getOauthCodeVerifier: () => string;
|
|
10
|
+
removeOauthCodeVerifier: () => void;
|
|
11
|
+
setOauthCodeChallenge: (value: string) => void;
|
|
12
|
+
getOauthCodeChallenge: () => string;
|
|
13
|
+
removeOauthCodeChallenge: () => void;
|
|
14
|
+
setHasAuthenticated: (value: string) => void;
|
|
15
|
+
getHasAuthenticated: () => string;
|
|
16
|
+
removeHasAuthenticated: () => void;
|
|
17
|
+
getCallbackUrl: () => string;
|
|
18
|
+
setCallbackUrl: (value: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare enum SessionStorageKey {
|
|
21
|
+
CONFIG = "config",
|
|
22
|
+
OAUTH_STATE = "oauth_state",
|
|
23
|
+
OAUTH_CODE_VERIFIER = "code_verifier",
|
|
24
|
+
OAUTH_CODE_CHALLENGE = "code_challenge",
|
|
25
|
+
HAS_AUTHENTICATED = "has_authenticated",
|
|
26
|
+
CALLBACK_URL = "callback_url"
|
|
27
|
+
}
|
|
28
|
+
export declare const sessionStorageProvider: SessionStorageProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './createMockStore';
|