@opengeoweb/shared 9.18.0 → 9.19.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
|
@@ -533,10 +533,10 @@ var SHARED = '__core-js_shared__';
|
|
|
533
533
|
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
534
534
|
|
|
535
535
|
(store$3.versions || (store$3.versions = [])).push({
|
|
536
|
-
version: '3.
|
|
536
|
+
version: '3.37.1',
|
|
537
537
|
mode: 'global',
|
|
538
538
|
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
539
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
539
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
|
|
540
540
|
source: 'https://github.com/zloirock/core-js'
|
|
541
541
|
});
|
|
542
542
|
|
|
@@ -1370,17 +1370,27 @@ const tagStyle = color => {
|
|
|
1370
1370
|
const StatusTag = _a => {
|
|
1371
1371
|
var {
|
|
1372
1372
|
content,
|
|
1373
|
-
color
|
|
1373
|
+
color,
|
|
1374
|
+
icon
|
|
1374
1375
|
} = _a,
|
|
1375
|
-
props = __rest(_a, ["content", "color"]);
|
|
1376
|
+
props = __rest(_a, ["content", "color", "icon"]);
|
|
1376
1377
|
return /*#__PURE__*/React.createElement(Box, {
|
|
1377
1378
|
display: "flex",
|
|
1378
1379
|
alignItems: "center",
|
|
1379
|
-
|
|
1380
|
+
textAlign: "center",
|
|
1380
1381
|
"data-testid": "statusTag",
|
|
1381
1382
|
className: "statusTag",
|
|
1383
|
+
position: "relative",
|
|
1382
1384
|
sx: Object.assign(Object.assign({}, tagStyle(color)), props.sx)
|
|
1383
|
-
}, /*#__PURE__*/React.createElement(
|
|
1385
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
1386
|
+
sx: {
|
|
1387
|
+
position: 'absolute',
|
|
1388
|
+
color: 'geowebColors.iconButtons.flat.default.color'
|
|
1389
|
+
}
|
|
1390
|
+
}, icon), /*#__PURE__*/React.createElement(Typography, {
|
|
1391
|
+
sx: {
|
|
1392
|
+
width: '100%'
|
|
1393
|
+
},
|
|
1384
1394
|
variant: "caption"
|
|
1385
1395
|
}, content));
|
|
1386
1396
|
};
|
|
@@ -7839,6 +7849,13 @@ const DEFAULT_ERROR_MESSAGE = 'An error has occurred';
|
|
|
7839
7849
|
const isAxiosError = error => {
|
|
7840
7850
|
return error.isAxiosError !== undefined;
|
|
7841
7851
|
};
|
|
7852
|
+
const isAxiosAuthError = error => {
|
|
7853
|
+
var _a, _b;
|
|
7854
|
+
if (isAxiosError(error)) {
|
|
7855
|
+
return ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403;
|
|
7856
|
+
}
|
|
7857
|
+
return false;
|
|
7858
|
+
};
|
|
7842
7859
|
const getAxiosErrorMessage = error => {
|
|
7843
7860
|
const data = error.response && error.response.data;
|
|
7844
7861
|
if (data && typeof data === 'string') {
|
|
@@ -8670,4 +8687,4 @@ class RenderCounter {
|
|
|
8670
8687
|
}
|
|
8671
8688
|
const renderCounter = new RenderCounter();
|
|
8672
8689
|
|
|
8673
|
-
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, ErrorBoundary, LastUpdateTime, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField, SearchFieldButton, SearchHighlight, StatusTag, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createMockStoreWithEggs, createMockStoreWithEggsAndMiddleware, createToolkitMockStoreWithEggs, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, initSharedI18n, isAxiosError, pollingIntervalTimeout, renderCounter, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, translateKeyOutsideComponents, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
|
|
8690
|
+
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEFAULT_ERROR_MESSAGE, DraggableComponent$1 as Draggable, ErrorBoundary, LastUpdateTime, ResizeComponent as Resizable, SHARED_NAMESPACE, SearchField, SearchFieldButton, SearchHighlight, StatusTag, SwitchButton, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, UserMenuItemSentryRecording, MenuItemTheme as UserMenuItemTheme, adjustPosition, calculateDialogSizeAndPosition, calculateStartSize, createMockStoreWithEggs, createMockStoreWithEggsAndMiddleware, createToolkitMockStoreWithEggs, index as dateUtils, defaultDelay, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, initSharedI18n, isAxiosAuthError, isAxiosError, pollingIntervalTimeout, renderCounter, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, translateKeyOutsideComponents, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useUserMenu, withEggs };
|
package/package.json
CHANGED
package/src/lib/types/types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface ConfigType {
|
|
|
12
12
|
GW_CAP_CONFIGURATION_FILENAME?: string;
|
|
13
13
|
GW_TIMESERIES_CONFIGURATION_FILENAME?: string;
|
|
14
14
|
GW_DEFAULT_THEME?: ThemeTypes;
|
|
15
|
+
GW_INITIAL_WORKSPACE_PRESET?: string;
|
|
15
16
|
GW_SW_BASE_URL?: string;
|
|
16
17
|
GW_SIGMET_BASE_URL?: string;
|
|
17
18
|
GW_AIRMET_BASE_URL?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosError } from 'axios';
|
|
2
2
|
export declare const DEFAULT_ERROR_MESSAGE = "An error has occurred";
|
|
3
3
|
export declare const isAxiosError: (error: AxiosError | Error) => error is AxiosError<unknown, any>;
|
|
4
|
+
export declare const isAxiosAuthError: (error: AxiosError | Error) => boolean;
|
|
4
5
|
export declare const getAxiosErrorMessage: (error: AxiosError) => string;
|
|
5
6
|
export declare const getErrorMessage: (error: Error | AxiosError) => string;
|
|
6
7
|
export declare const getAxiosWarningMessage: (error: AxiosError) => string;
|