@opengeoweb/shared 9.16.0 → 9.17.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/README.md +0 -15
- package/index.esm.js +1105 -596
- package/package.json +4 -2
- package/src/index.d.ts +3 -0
- package/src/lib/components/AlertBanner/AlertBanner.stories.d.ts +2 -2
- package/src/lib/components/AppHeader/AppHeader.stories.d.ts +2 -2
- package/src/lib/components/Avatar/Avatar.stories.d.ts +2 -2
- package/src/lib/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +2 -2
- package/src/lib/components/CustomAccordion/CustomAccordion.stories.d.ts +2 -2
- package/src/lib/components/CustomDialog/CustomDialog.stories.d.ts +2 -2
- package/src/lib/components/CustomIconButton/CustomIconButton.stories.d.ts +2 -2
- package/src/lib/components/CustomSlider/CustomSlider.stories.d.ts +2 -2
- package/src/lib/components/CustomToggleButton/CustomToggleButton.stories.d.ts +2 -2
- package/src/lib/components/ErrorBoundary/ErrorBoundary.d.ts +5 -0
- package/src/lib/components/LastUpdateTime/LastUpdateTime.d.ts +2 -2
- package/src/lib/components/LastUpdateTime/LastUpdateTime.stories.d.ts +2 -2
- package/src/lib/components/LastUpdateTime/index.d.ts +1 -1
- package/src/lib/components/Providers/Providers.d.ts +6 -0
- package/src/lib/components/SearchHighlight/SearchHighlight.stories.d.ts +2 -2
- package/src/lib/components/StatusTag/StatusTag.stories.d.ts +2 -2
- package/src/lib/components/ToggleMenu/ToggleMenu.stories.d.ts +2 -2
- package/src/lib/components/ToolContainer/ToolContainerSnapShots.stories.d.ts +4 -4
- package/src/lib/components/TooltipSelect/TooltipSelect.stories.d.ts +2 -2
- package/src/lib/components/UserMenu/CheatSheet/CheatSheet.stories.d.ts +4 -4
- package/src/lib/components/UserMenu/CheatSheet/ShortcutList.d.ts +2 -10
- package/src/lib/components/UserMenu/UserMenu.d.ts +1 -0
- package/src/lib/components/UserMenu/UserMenu.stories.d.ts +4 -4
- package/src/lib/components/UserMenu/UserMenuSentryRecording.d.ts +7 -0
- package/src/lib/components/UserMenu/index.d.ts +1 -0
- package/src/lib/utils/dateUtils/dateFormats.d.ts +6 -0
- package/src/lib/utils/dateUtils/dateUtils.d.ts +13 -0
- package/src/lib/utils/dateUtils/index.d.ts +1 -0
- package/src/lib/utils/i18n.d.ts +3 -0
- package/src/lib/storyshots/Storyshots.spec.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.17.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": {
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"date-fns": "^3.3.0",
|
|
20
20
|
"redux-mock-store": "^1.5.4",
|
|
21
21
|
"@reduxjs/toolkit": "^1.9.7",
|
|
22
|
-
"i18next": "^
|
|
22
|
+
"react-i18next": "^13.5.0",
|
|
23
|
+
"i18next": "^23.7.19",
|
|
24
|
+
"@sentry/react": "^7.109.0"
|
|
23
25
|
},
|
|
24
26
|
"peerDependencies": {
|
|
25
27
|
"react": "18"
|
package/src/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const AlertBannersLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const AlertBannersDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -5,7 +5,7 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const AppHeaderDark: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
parameters: {
|
|
10
10
|
zeplinLink: {
|
|
11
11
|
name: string;
|
|
@@ -15,7 +15,7 @@ export declare const AppHeaderDark: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const AppHeaderLight: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
|
-
|
|
18
|
+
tags: string[];
|
|
19
19
|
parameters: {
|
|
20
20
|
zeplinLink: {
|
|
21
21
|
name: string;
|
|
@@ -5,7 +5,7 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const AvatarLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
parameters: {
|
|
10
10
|
zeplinLink: {
|
|
11
11
|
name: string;
|
|
@@ -15,7 +15,7 @@ export declare const AvatarLight: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const AvatarDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
|
-
|
|
18
|
+
tags: string[];
|
|
19
19
|
parameters: {
|
|
20
20
|
zeplinLink: {
|
|
21
21
|
name: string;
|
|
@@ -7,9 +7,9 @@ export declare const ConfirmationDialogCustom: () => React.ReactElement;
|
|
|
7
7
|
export declare const ConfirmationDialogLoading: () => React.ReactElement;
|
|
8
8
|
export declare const ConfirmationDialogLight: {
|
|
9
9
|
(): React.ReactElement;
|
|
10
|
-
|
|
10
|
+
tags: string[];
|
|
11
11
|
};
|
|
12
12
|
export declare const ConfirmationDialogDark: {
|
|
13
13
|
(): React.ReactElement;
|
|
14
|
-
|
|
14
|
+
tags: string[];
|
|
15
15
|
};
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const CustomAccordionLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const CustomAccordionDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const CustomDialogLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const CustomDialogDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -5,7 +5,7 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const CustomIconButtonLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
parameters: {
|
|
10
10
|
zeplinLink: {
|
|
11
11
|
name: string;
|
|
@@ -15,7 +15,7 @@ export declare const CustomIconButtonLight: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const CustomIconButtonDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
|
-
|
|
18
|
+
tags: string[];
|
|
19
19
|
parameters: {
|
|
20
20
|
zeplinLink: {
|
|
21
21
|
name: string;
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const CustomSliderLightTheme: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const CustomSliderDarkTheme: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const CustomToggleButtonLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const CustomToggleButtonDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
interface ErrorBoundaryProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
5
|
+
handlePromiseRejections?: boolean;
|
|
6
|
+
displayOnTop?: boolean;
|
|
5
7
|
}
|
|
6
8
|
interface ErrorBoundaryState {
|
|
7
9
|
error?: Error;
|
|
@@ -19,8 +21,11 @@ export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, E
|
|
|
19
21
|
onError: () => void;
|
|
20
22
|
};
|
|
21
23
|
constructor(props: ErrorBoundaryProps);
|
|
24
|
+
componentDidMount(): void;
|
|
22
25
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
23
26
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
handlePromiseRejection: (event: PromiseRejectionEvent) => void;
|
|
24
29
|
render(): React.ReactNode;
|
|
25
30
|
}
|
|
26
31
|
export default ErrorBoundary;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const getLastUpdateTitle: (time: string) => string;
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
3
|
+
export declare const getLastUpdateTitle: (time: string, t: TFunction) => string;
|
|
4
4
|
interface LastUpdateTimeProps {
|
|
5
5
|
onPressRefresh: () => void;
|
|
6
6
|
lastUpdateTime?: string;
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const LastUpdateTimeLightTheme: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const LastUpdateTimeDarkTheme: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as LastUpdateTime, getLastUpdateTitle,
|
|
1
|
+
export { default as LastUpdateTime, getLastUpdateTitle, } from './LastUpdateTime';
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ThemeProviderProps } from '@opengeoweb/theme';
|
|
3
|
+
interface SharedStoryWrapperProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
theme?: 'light' | 'dark';
|
|
6
|
+
}
|
|
3
7
|
/**
|
|
4
8
|
* A Provider component which provides the GeoWeb theme
|
|
5
9
|
* @param children
|
|
6
10
|
* @returns
|
|
7
11
|
*/
|
|
8
12
|
export declare const SharedThemeProvider: React.FC<ThemeProviderProps>;
|
|
13
|
+
export declare const SharedStoryWrapper: React.FC<SharedStoryWrapperProps>;
|
|
14
|
+
export {};
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const SearchHighlightLightTheme: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const SearchHighlightDarkTheme: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -5,7 +5,7 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const StatusTagsLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
parameters: {
|
|
10
10
|
zeplinLink: {
|
|
11
11
|
name: string;
|
|
@@ -15,7 +15,7 @@ export declare const StatusTagsLight: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const StatusTagsDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
|
-
|
|
18
|
+
tags: string[];
|
|
19
19
|
parameters: {
|
|
20
20
|
zeplinLink: {
|
|
21
21
|
name: string;
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const ToggleMenuLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const ToggleMenuDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -3,11 +3,11 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const ToolContainerLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const ToolContainerDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -5,9 +5,9 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const TooltipSelectLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const TooltipSelectDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -21,11 +21,11 @@ export declare const ThemeDark: {
|
|
|
21
21
|
}[];
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export declare const
|
|
24
|
+
export declare const CheatSheetLight: {
|
|
25
25
|
(): React.ReactElement;
|
|
26
|
-
|
|
26
|
+
tags: string[];
|
|
27
27
|
};
|
|
28
|
-
export declare const
|
|
28
|
+
export declare const CheatSheetDark: {
|
|
29
29
|
(): React.ReactElement;
|
|
30
|
-
|
|
30
|
+
tags: string[];
|
|
31
31
|
};
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface ShortCut {
|
|
3
|
-
title: string;
|
|
4
|
-
description: React.ReactNode;
|
|
5
|
-
descriptionMac?: React.ReactNode;
|
|
6
|
-
}
|
|
7
2
|
type Platform = 'windows' | 'mac';
|
|
8
|
-
|
|
9
|
-
export declare const getShortcutList: (shortcutList: ShortCut[], platform?: Platform) => ShortCut[];
|
|
10
|
-
interface ShortcutListProps {
|
|
3
|
+
declare const ShortcutList: React.FC<{
|
|
11
4
|
platform?: Platform;
|
|
12
|
-
}
|
|
13
|
-
declare const ShortcutList: React.FC<ShortcutListProps>;
|
|
5
|
+
}>;
|
|
14
6
|
export default ShortcutList;
|
|
@@ -5,11 +5,11 @@ declare const _default: {
|
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const ThemeLight: () => React.ReactElement;
|
|
7
7
|
export declare const ThemeDark: () => React.ReactElement;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const UserMenuLight: {
|
|
9
9
|
(): React.ReactElement;
|
|
10
|
-
|
|
10
|
+
tags: string[];
|
|
11
11
|
};
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const UserMenuDark: {
|
|
13
13
|
(): React.ReactElement;
|
|
14
|
-
|
|
14
|
+
tags: string[];
|
|
15
15
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface UserMenuSentryRecordingProps {
|
|
3
|
+
recordButtonEnabled?: boolean;
|
|
4
|
+
setRecordButtonEnabled?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
+
}
|
|
6
|
+
declare const UserMenuItemSentryRecording: React.FC<UserMenuSentryRecordingProps>;
|
|
7
|
+
export default UserMenuItemSentryRecording;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as UserMenu } from './UserMenu';
|
|
2
2
|
export { default as UserMenuItemTheme } from './UserMenuItemTheme';
|
|
3
3
|
export { default as UserMenuItemCheatSheet } from './UserMenuItemCheatSheet';
|
|
4
|
+
export { default as UserMenuItemSentryRecording } from './UserMenuSentryRecording';
|
|
4
5
|
export { useUserMenu } from './useUserMenu';
|
|
5
6
|
export { getInitials } from './utils';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DATE_FORMAT_DATEPICKER = "dd/MM/yyyy HH:mm";
|
|
2
|
+
export declare const DATE_FORMAT_UTC = "yyyy-MM-dd'T'HH:mm:ss'Z'";
|
|
3
|
+
export declare const DATE_FORMAT_YEAR = "yyyy-MM-dd";
|
|
4
|
+
export declare const DATE_FORMAT_HOURS = "HH:mm";
|
|
5
|
+
export declare const DATE_FORMAT_NAME_OF_DAY_MONTH = "eee dd MMM HH:mm";
|
|
6
|
+
export declare const DATE_FORMAT_NAME_OF_MONTH = "dd MMM yyyy, HH:mm";
|
|
@@ -62,6 +62,7 @@ export interface DateValues {
|
|
|
62
62
|
* ``` isoStringToDate("2022-5-10T20:32:00:00Z", false) ```
|
|
63
63
|
*/
|
|
64
64
|
export declare const isoStringToDate: (input: string, utc?: boolean) => Date | undefined;
|
|
65
|
+
export declare const isValidIsoDateString: (input: string) => boolean;
|
|
65
66
|
/**
|
|
66
67
|
* Parse a string to a date
|
|
67
68
|
*
|
|
@@ -312,6 +313,18 @@ export declare const startOfMonthUTC: (date: Date) => Date;
|
|
|
312
313
|
* @returns the new date
|
|
313
314
|
*/
|
|
314
315
|
export declare const startOfYearUTC: (date: Date) => Date;
|
|
316
|
+
/**
|
|
317
|
+
* Parse custom time format of NOW+current time | current date in UTC. The result will be in UTC.
|
|
318
|
+
* @param timeValue - string value
|
|
319
|
+
* @returns Time in UTC format
|
|
320
|
+
*/
|
|
321
|
+
export declare const convertNOWFormatToUTC: (timeValue: string) => string;
|
|
322
|
+
/**
|
|
323
|
+
* Parse custom time format of NOW+-hours and minutes || TODAY+-hours and minutes into UTC. The result will be in UTC.
|
|
324
|
+
* @param timeValue - string value
|
|
325
|
+
* @returns Time in UTC format
|
|
326
|
+
*/
|
|
327
|
+
export declare const convertNOWandTODAYFormatsToUTC: (timeValue: string) => string;
|
|
315
328
|
/**
|
|
316
329
|
* Compares two dates if values are the same
|
|
317
330
|
* @param {Date} date - first date
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|