@opengeoweb/shared 19.1.0 → 19.2.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/README.md +27 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +6490 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/lib/components/AlertBanner/AlertBanner.d.ts +16 -0
- package/dist/src/lib/components/AlertBanner/index.d.ts +1 -0
- package/dist/src/lib/components/AlertIcon/AlertIcon.d.ts +8 -0
- package/dist/src/lib/components/AlertIcon/index.d.ts +1 -0
- package/dist/src/lib/components/AppHeader/AppHeader.d.ts +10 -0
- package/dist/src/lib/components/AppHeader/index.d.ts +1 -0
- package/dist/src/lib/components/AppLayout/AppLayout.d.ts +7 -0
- package/dist/src/lib/components/AppLayout/index.d.ts +1 -0
- package/dist/src/lib/components/Avatar/Avatar.d.ts +8 -0
- package/dist/src/lib/components/Avatar/index.d.ts +1 -0
- package/dist/src/lib/components/CanvasComponent/CanvasComponent.d.ts +71 -0
- package/dist/src/lib/components/CanvasComponent/index.d.ts +1 -0
- package/dist/src/lib/components/ConfirmationDialog/ConfirmationButtons.d.ts +12 -0
- package/dist/src/lib/components/ConfirmationDialog/ConfirmationDialog.d.ts +22 -0
- package/dist/src/lib/components/ConfirmationDialog/ConfirmationService.d.ts +18 -0
- package/dist/src/lib/components/ConfirmationDialog/index.d.ts +3 -0
- package/dist/src/lib/components/CustomAccordion/CustomAccordion.d.ts +13 -0
- package/dist/src/lib/components/CustomAccordion/index.d.ts +1 -0
- package/dist/src/lib/components/CustomDialog/CustomDialog.d.ts +18 -0
- package/dist/src/lib/components/CustomDialog/CustomDialogHeader.d.ts +13 -0
- package/dist/src/lib/components/CustomDialog/index.d.ts +2 -0
- package/dist/src/lib/components/CustomDialog/types.d.ts +1 -0
- package/dist/src/lib/components/CustomIconButton/CustomIconButton.d.ts +15 -0
- package/dist/src/lib/components/CustomIconButton/index.d.ts +1 -0
- package/dist/src/lib/components/CustomSlider/CustomSlider.d.ts +14 -0
- package/dist/src/lib/components/CustomSlider/index.d.ts +1 -0
- package/dist/src/lib/components/CustomToggleButton/CustomToggleButton.d.ts +8 -0
- package/dist/src/lib/components/CustomToggleButton/index.d.ts +1 -0
- package/dist/src/lib/components/CustomTooltip/CustomTooltip.d.ts +5 -0
- package/dist/src/lib/components/CustomTooltip/index.d.ts +1 -0
- package/dist/src/lib/components/DraggableResizable/Draggable.d.ts +16 -0
- package/dist/src/lib/components/DraggableResizable/Resizable.d.ts +10 -0
- package/dist/src/lib/components/DraggableResizable/index.d.ts +3 -0
- package/dist/src/lib/components/DraggableResizable/types.d.ts +27 -0
- package/dist/src/lib/components/ErrorBoundary/ErrorBoundary.d.ts +31 -0
- package/dist/src/lib/components/ErrorBoundary/index.d.ts +1 -0
- package/dist/src/lib/components/Filter/Filter.d.ts +18 -0
- package/dist/src/lib/components/Filter/FilterChip.d.ts +14 -0
- package/dist/src/lib/components/Filter/FilterList.d.ts +19 -0
- package/dist/src/lib/components/Filter/FilterOption.d.ts +12 -0
- package/dist/src/lib/components/Filter/FilterToggleButton.d.ts +6 -0
- package/dist/src/lib/components/Filter/SearchField.d.ts +8 -0
- package/dist/src/lib/components/Filter/index.d.ts +7 -0
- package/dist/src/lib/components/LastUpdateTime/LastUpdateTime.d.ts +14 -0
- package/dist/src/lib/components/LastUpdateTime/index.d.ts +1 -0
- package/dist/src/lib/components/Providers/Providers.d.ts +18 -0
- package/dist/src/lib/components/Providers/index.d.ts +1 -0
- package/dist/src/lib/components/SearchField/SearchField.d.ts +10 -0
- package/dist/src/lib/components/SearchField/SearchFieldButtonContainer.d.ts +9 -0
- package/dist/src/lib/components/SearchField/index.d.ts +2 -0
- package/dist/src/lib/components/SearchHighlight/SearchHighlight.d.ts +7 -0
- package/dist/src/lib/components/SearchHighlight/index.d.ts +1 -0
- package/dist/src/lib/components/StatusTag/StatusTag.d.ts +17 -0
- package/dist/src/lib/components/StatusTag/index.d.ts +1 -0
- package/dist/src/lib/components/Storybook/StorybookDocsWrapper.d.ts +6 -0
- package/dist/src/lib/components/Storybook/index.d.ts +1 -0
- package/dist/src/lib/components/SwitchButton/SwitchButton.d.ts +8 -0
- package/dist/src/lib/components/SwitchButton/index.d.ts +1 -0
- package/dist/src/lib/components/ToggleMenu/ToggleMenu.d.ts +32 -0
- package/dist/src/lib/components/ToggleMenu/index.d.ts +1 -0
- package/dist/src/lib/components/ToolContainer/ToolContainer.d.ts +5 -0
- package/dist/src/lib/components/ToolContainer/ToolContainerDraggable.d.ts +40 -0
- package/dist/src/lib/components/ToolContainer/ToolFooter.d.ts +3 -0
- package/dist/src/lib/components/ToolContainer/ToolHeader.d.ts +4 -0
- package/dist/src/lib/components/ToolContainer/index.d.ts +7 -0
- package/dist/src/lib/components/ToolContainer/types.d.ts +19 -0
- package/dist/src/lib/components/ToolContainer/useHandleSizeFromOutsideComponent.d.ts +16 -0
- package/dist/src/lib/components/TooltipSelect/TooltipSelect.d.ts +23 -0
- package/dist/src/lib/components/TooltipSelect/index.d.ts +1 -0
- package/dist/src/lib/components/UserMenu/CheatSheet/CheatSheet.d.ts +3 -0
- package/dist/src/lib/components/UserMenu/CheatSheet/ShortcutList.d.ts +6 -0
- package/dist/src/lib/components/UserMenu/CheatSheet/ShortcutSegment.d.ts +7 -0
- package/dist/src/lib/components/UserMenu/UserMenu.d.ts +11 -0
- package/dist/src/lib/components/UserMenu/UserMenuItemCheatSheet.d.ts +3 -0
- package/dist/src/lib/components/UserMenu/UserMenuItemTheme.d.ts +6 -0
- package/dist/src/lib/components/UserMenu/index.d.ts +5 -0
- package/dist/src/lib/components/UserMenu/useUserMenu.d.ts +7 -0
- package/dist/src/lib/components/UserMenu/utils.d.ts +1 -0
- package/dist/src/lib/components/index.d.ts +26 -0
- package/dist/src/lib/hooks/index.d.ts +9 -0
- package/dist/src/lib/hooks/useDebounce/useDebounce.d.ts +1 -0
- package/dist/src/lib/hooks/useIsMounted/useIsMounted.d.ts +4 -0
- package/dist/src/lib/hooks/useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow.d.ts +4 -0
- package/dist/src/lib/hooks/usePoller/usePoller.d.ts +3 -0
- package/dist/src/lib/hooks/usePreventBrowserClose/usePreventBrowserClose.d.ts +2 -0
- package/dist/src/lib/hooks/usePrevious/usePrevious.d.ts +1 -0
- package/dist/src/lib/hooks/useResizeObserver/useResizeObserver.d.ts +2 -0
- package/dist/src/lib/hooks/useScrollingInIsolation/useScrollingInIsolation.d.ts +11 -0
- package/dist/src/lib/hooks/useWheelStopPropagation/useWheelStopPropagation.d.ts +2 -0
- package/dist/src/lib/types/crss-types.d.ts +26 -0
- package/dist/src/lib/types/edr-coverage-types.d.ts +98 -0
- package/dist/src/lib/types/index.d.ts +2 -0
- package/dist/src/lib/types/types.d.ts +204 -0
- package/dist/src/lib/utils/axiosErrorUtils/axiosErrorUtils.d.ts +9 -0
- package/dist/src/lib/utils/axiosErrorUtils/index.d.ts +1 -0
- package/dist/src/lib/utils/dateUtils/dateFormats.d.ts +8 -0
- package/dist/src/lib/utils/dateUtils/dateUtils.d.ts +372 -0
- package/dist/src/lib/utils/dateUtils/index.d.ts +2 -0
- package/dist/src/lib/utils/i18n.d.ts +14 -0
- package/dist/src/lib/utils/index.d.ts +7 -0
- package/dist/src/lib/utils/mapProjections.d.ts +71 -0
- package/dist/src/lib/utils/referenceTimeUtils/index.d.ts +1 -0
- package/dist/src/lib/utils/referenceTimeUtils/referenceTimeUtils.d.ts +20 -0
- package/dist/src/lib/utils/renderCounter.d.ts +21 -0
- package/dist/src/lib/utils/sessionStorage.d.ts +28 -0
- package/package.json +2 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import sharedTranslations from '../locales/shared.json';
|
|
2
|
+
export * from './lib/components';
|
|
3
|
+
export * from './lib/hooks';
|
|
4
|
+
export * from './lib/utils';
|
|
5
|
+
export * from './lib/types';
|
|
6
|
+
export { loadAllTranslations, safelyInitI18nForTestsAndStories, SHARED_NAMESPACE, } from './lib/utils/i18n';
|
|
7
|
+
export { sharedTranslations };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AlertColor } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface AlertBannerProps {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
severity?: AlertColor;
|
|
6
|
+
info?: string | React.ReactElement;
|
|
7
|
+
dataTestId?: string;
|
|
8
|
+
isCompact?: boolean;
|
|
9
|
+
shouldClose?: boolean;
|
|
10
|
+
actionButtonProps?: {
|
|
11
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const AlertBanner: React.FC<AlertBannerProps>;
|
|
16
|
+
export default AlertBanner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AlertBanner } from './AlertBanner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AlertIcon } from './AlertIcon';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface AppHeaderProps {
|
|
3
|
+
menu?: React.ReactNode;
|
|
4
|
+
userMenu?: React.ReactNode;
|
|
5
|
+
workspaceTopBar?: React.ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const AppHeader: React.FC<AppHeaderProps>;
|
|
10
|
+
export default AppHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AppHeader } from './AppHeader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AppLayout } from './AppLayout';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Avatar } from './Avatar';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
interface CanvasComponentProps {
|
|
3
|
+
onRenderCanvas: (ctx: CanvasRenderingContext2D, width: number, height: number, canvas: HTMLCanvasElement) => void;
|
|
4
|
+
onCanvasClick?: (x: number, y: number, width: number, height: number) => void;
|
|
5
|
+
onMouseMove?: (x: number, y: number, event: MouseEvent, width: number) => void;
|
|
6
|
+
onMouseUp?: (x: number) => void;
|
|
7
|
+
onMouseDown?: (x: number, y: number, width: number) => void;
|
|
8
|
+
onTouchStart?: (event: TouchEvent, width: number) => void;
|
|
9
|
+
onTouchEnd?: () => void;
|
|
10
|
+
onTouchMove?: (event: TouchEvent, width: number) => void;
|
|
11
|
+
onKeyUp?: (event: KeyboardEvent) => void;
|
|
12
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
13
|
+
isFocussed?: (isFocussed: boolean) => void;
|
|
14
|
+
onWheel?: ({ event, deltaY, deltaX, canvasWidth, mouseX, }: {
|
|
15
|
+
event: WheelEvent;
|
|
16
|
+
deltaY: number;
|
|
17
|
+
deltaX: number;
|
|
18
|
+
canvasWidth: number;
|
|
19
|
+
mouseX: number;
|
|
20
|
+
}) => void;
|
|
21
|
+
loop?: boolean;
|
|
22
|
+
redrawInterval?: number;
|
|
23
|
+
resizeCallback?: (newWidth: number) => void;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare class CanvasComponent extends Component<CanvasComponentProps> {
|
|
27
|
+
canvas: HTMLCanvasElement | null;
|
|
28
|
+
ctx: CanvasRenderingContext2D | null;
|
|
29
|
+
currentWidth: number;
|
|
30
|
+
currentHeight: number;
|
|
31
|
+
canvascontaineroutside: React.RefObject<HTMLDivElement> | null;
|
|
32
|
+
canvascontainer: React.RefObject<HTMLDivElement> | null;
|
|
33
|
+
timer: ReturnType<typeof setTimeout> | null;
|
|
34
|
+
redrawTimer: ReturnType<typeof setTimeout> | null;
|
|
35
|
+
loopHasStarted: boolean;
|
|
36
|
+
mounted: boolean;
|
|
37
|
+
static defaultProps: {
|
|
38
|
+
onRenderCanvas: () => void;
|
|
39
|
+
onCanvasClick: () => void;
|
|
40
|
+
onMouseMove: () => void;
|
|
41
|
+
onMouseUp: () => void;
|
|
42
|
+
onMouseDown: () => void;
|
|
43
|
+
onTouchStart: () => void;
|
|
44
|
+
onTouchEnd: () => void;
|
|
45
|
+
onTouchMove: () => void;
|
|
46
|
+
onWheel: () => void;
|
|
47
|
+
};
|
|
48
|
+
private _isFocussed;
|
|
49
|
+
constructor(props: CanvasComponentProps);
|
|
50
|
+
componentDidMount(): void;
|
|
51
|
+
shouldComponentUpdate(): boolean;
|
|
52
|
+
componentWillUnmount(): void;
|
|
53
|
+
handleMouseMoveEvent(event: MouseEvent): void;
|
|
54
|
+
handleMouseUpEvent(event: MouseEvent): void;
|
|
55
|
+
handleMouseDownEvent(event: MouseEvent): void;
|
|
56
|
+
handleTouchStartEvent(event: TouchEvent): void;
|
|
57
|
+
handleTouchEndEvent(): void;
|
|
58
|
+
handleTouchMoveEvent(event: TouchEvent): void;
|
|
59
|
+
handleClickEvent(event: MouseEvent): void;
|
|
60
|
+
handleWheelEvent(event: WheelEvent): void;
|
|
61
|
+
onFocus(): void;
|
|
62
|
+
onBlur(): void;
|
|
63
|
+
onKeyUp(event: KeyboardEvent): void;
|
|
64
|
+
_documentKeyDown(event: KeyboardEvent): void;
|
|
65
|
+
_handleWindowResize(): void;
|
|
66
|
+
startLoop(): void;
|
|
67
|
+
updateCanvas(): void;
|
|
68
|
+
resize(): void;
|
|
69
|
+
render(): React.ReactElement;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CanvasComponent';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DialogAction } from '../CustomDialog/types';
|
|
3
|
+
export type ConfirmationAction = 'CANCELLED' | DialogAction;
|
|
4
|
+
export interface ConfirmationButtonsProps {
|
|
5
|
+
confirmLabel?: string;
|
|
6
|
+
cancelLabel?: string;
|
|
7
|
+
disableAutoFocus?: boolean;
|
|
8
|
+
onSubmit: () => void;
|
|
9
|
+
onClose: (reason: ConfirmationAction) => void;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const ConfirmationButtons: React.FC<ConfirmationButtonsProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ModalProps, SxProps, Theme } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { DialogAction } from '../CustomDialog/types';
|
|
4
|
+
export interface ConfirmationOptions {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
catchOnCancel?: boolean;
|
|
8
|
+
confirmLabel?: string;
|
|
9
|
+
cancelLabel?: string;
|
|
10
|
+
content?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export type ConfirmationAction = 'CANCELLED' | DialogAction;
|
|
13
|
+
export interface ConfirmationDialogProps extends ConfirmationOptions {
|
|
14
|
+
disableAutoFocus?: boolean;
|
|
15
|
+
onSubmit: () => void;
|
|
16
|
+
onClose: (reason: ConfirmationAction) => void;
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
open: ModalProps['open'];
|
|
19
|
+
sx?: SxProps<Theme>;
|
|
20
|
+
}
|
|
21
|
+
export declare const ConfirmationDialog: React.FC<ConfirmationDialogProps>;
|
|
22
|
+
export default ConfirmationDialog;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConfirmationAction, ConfirmationOptions } from './ConfirmationDialog';
|
|
3
|
+
type ConfirmationContext = (options: ConfirmationOptions) => Promise<void>;
|
|
4
|
+
export declare const useConfirmationDialog: () => ConfirmationContext;
|
|
5
|
+
export declare const useDialogActions: (awaitingPromiseRef: React.RefObject<{
|
|
6
|
+
resolve: () => void;
|
|
7
|
+
reject: (reason: ConfirmationAction) => void;
|
|
8
|
+
}>, defaultOptions?: ConfirmationOptions) => {
|
|
9
|
+
openConfirmation: (options: ConfirmationOptions) => Promise<void>;
|
|
10
|
+
confirmationState: ConfirmationOptions;
|
|
11
|
+
handleSubmit: () => void;
|
|
12
|
+
handleClose: (reason: ConfirmationAction) => void;
|
|
13
|
+
};
|
|
14
|
+
interface ConfirmationServiceProviderProps {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const ConfirmationServiceProvider: React.FC<ConfirmationServiceProviderProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AccordionProps, SxProps, Theme } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface CustomAccordionProps extends Omit<AccordionProps, 'title'> {
|
|
4
|
+
title?: string | React.ReactNode;
|
|
5
|
+
title2?: string;
|
|
6
|
+
expandedElevation?: number;
|
|
7
|
+
collapsedElevation?: number;
|
|
8
|
+
transitionDuration?: number;
|
|
9
|
+
detailsSx?: SxProps<Theme>;
|
|
10
|
+
CustomExpandIcon?: React.ElementType;
|
|
11
|
+
amountOfItems?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const CustomAccordion: React.FC<CustomAccordionProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomAccordion';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DialogProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Size } from '../DraggableResizable';
|
|
4
|
+
import type { HeaderAction } from './CustomDialogHeader';
|
|
5
|
+
import type { DialogAction } from './types';
|
|
6
|
+
export interface CustomDialogProps extends DialogProps {
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
|
+
onClose: (reason: DialogAction, muiReason?: string) => void;
|
|
10
|
+
isResizable?: boolean;
|
|
11
|
+
resizableDefaultSize?: Size;
|
|
12
|
+
hasLayout?: boolean;
|
|
13
|
+
shouldRenderInline?: boolean;
|
|
14
|
+
headerActions?: HeaderAction[];
|
|
15
|
+
minWidth?: number | string;
|
|
16
|
+
}
|
|
17
|
+
export declare const CustomDialog: React.FC<CustomDialogProps>;
|
|
18
|
+
export default CustomDialog;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonVariant } from '@opengeoweb/theme';
|
|
3
|
+
import type { DialogAction } from './types';
|
|
4
|
+
import type { MenuItemType } from '../ToggleMenu';
|
|
5
|
+
export type HeaderAction = MenuItemType & {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
};
|
|
8
|
+
export declare const CustomDialogHeader: React.FC<{
|
|
9
|
+
headerActions?: HeaderAction[];
|
|
10
|
+
title?: string;
|
|
11
|
+
onClose: (reason: DialogAction) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export default CustomDialogHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DialogAction = 'CLOSED';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IconButtonProps, TooltipProps as MuiTooltipProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type Variant = 'flat' | 'tool' | 'boxed';
|
|
4
|
+
type TooltipProps = Omit<MuiTooltipProps, 'children'>;
|
|
5
|
+
export interface CustomIconProps extends IconButtonProps {
|
|
6
|
+
tooltipTitle?: string;
|
|
7
|
+
variant?: Variant;
|
|
8
|
+
isSelected?: boolean;
|
|
9
|
+
shouldShowAsDisabled?: boolean;
|
|
10
|
+
tooltipProps?: TooltipProps;
|
|
11
|
+
shouldShowExtraOptionsIndicator?: boolean;
|
|
12
|
+
optionsActive?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const CustomIconButton: React.NamedExoticComponent<Omit<CustomIconProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomIconButton';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SliderProps, SxProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const sliderHeaderStyle: {
|
|
4
|
+
fontFamily: string;
|
|
5
|
+
fontSize: number;
|
|
6
|
+
color: string;
|
|
7
|
+
padding: string;
|
|
8
|
+
};
|
|
9
|
+
interface CustomSliderProps extends SliderProps {
|
|
10
|
+
shouldAutoFocus?: boolean;
|
|
11
|
+
extraStyles?: SxProps;
|
|
12
|
+
}
|
|
13
|
+
export declare const CustomSlider: React.FC<CustomSliderProps>;
|
|
14
|
+
export default CustomSlider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CustomSlider, sliderHeaderStyle } from './CustomSlider';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ToggleButtonProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ButtonVariant } from '@opengeoweb/theme';
|
|
4
|
+
export interface CustomToggleButtonProps extends Omit<ToggleButtonProps, 'value'> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
value?: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const CustomToggleButton: React.ForwardRefExoticComponent<Omit<CustomToggleButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomToggleButton';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TooltipProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const defaultDelay = 1000;
|
|
4
|
+
export declare const useControlledTooltip: () => [boolean, React.Dispatch<React.SetStateAction<boolean>>];
|
|
5
|
+
export declare const CustomTooltip: React.FC<TooltipProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomTooltip';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DraggableEvent } from 'react-draggable';
|
|
3
|
+
import type { DraggablePosition } from './types';
|
|
4
|
+
export interface DraggableComponentProps {
|
|
5
|
+
nodeRef?: React.RefObject<HTMLElement | null>;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
bounds?: 'parent' | string;
|
|
8
|
+
cancel?: string;
|
|
9
|
+
position?: DraggablePosition;
|
|
10
|
+
onStop?: (event: DraggableEvent, pos: DraggablePosition) => void;
|
|
11
|
+
onMouseDown?: (event: MouseEvent) => void;
|
|
12
|
+
handle?: string;
|
|
13
|
+
setIsDragging?: (isDragging: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const DraggableComponent: React.FC<DraggableComponentProps>;
|
|
16
|
+
export default DraggableComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ResizableComponentProps } from './types';
|
|
3
|
+
export declare const isDraggingClassName = "is-dragging";
|
|
4
|
+
export interface BoundsProps {
|
|
5
|
+
bounds: HTMLElement;
|
|
6
|
+
boundsByDirection: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const useBoundsProps: (nodeRef?: React.RefObject<HTMLElement | null>) => BoundsProps | object;
|
|
9
|
+
declare const ResizeComponent: React.FC<ResizableComponentProps>;
|
|
10
|
+
export default ResizeComponent;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ResizableProps } from 're-resizable';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export interface DraggablePosition {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
export interface Position {
|
|
8
|
+
top: number;
|
|
9
|
+
left?: number;
|
|
10
|
+
right?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DraggableSize {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
export interface Size {
|
|
17
|
+
width?: number | string;
|
|
18
|
+
height?: number | string;
|
|
19
|
+
}
|
|
20
|
+
export interface ResizableComponentProps extends Omit<ResizableProps, 'size'> {
|
|
21
|
+
startSize?: Size;
|
|
22
|
+
setSize?: (size: Size) => void;
|
|
23
|
+
size?: Size;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
onResizeStart?: () => void;
|
|
26
|
+
nodeRef?: React.RefObject<HTMLElement | null>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ErrorBoundaryProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
5
|
+
handlePromiseRejections?: boolean;
|
|
6
|
+
displayOnTop?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ErrorBoundaryState {
|
|
9
|
+
error?: Error;
|
|
10
|
+
errorInfo?: React.ErrorInfo;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* ErrorBoundary
|
|
14
|
+
* Wrap this component around parts of your application. It will catch any uncaught errors and display an alert, and allows you to continue using the rest of your application.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ``` <ErrorBoundary><ExampleComponent /></ErrorBoundary> ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
20
|
+
static defaultProps: {
|
|
21
|
+
onError: () => void;
|
|
22
|
+
};
|
|
23
|
+
constructor(props: ErrorBoundaryProps);
|
|
24
|
+
componentDidMount(): void;
|
|
25
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
26
|
+
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
handlePromiseRejection: (event: PromiseRejectionEvent) => void;
|
|
29
|
+
render(): React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ErrorBoundary } from './ErrorBoundary';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BoxProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ListFilter } from './FilterList';
|
|
4
|
+
export declare const DEFAULT_FILTER_HEIGHT = 85;
|
|
5
|
+
interface FilterProps extends BoxProps {
|
|
6
|
+
activeLabelFilterCount?: number;
|
|
7
|
+
filters: ListFilter[];
|
|
8
|
+
onClickFilterChip?: (id: string, selected: boolean) => void;
|
|
9
|
+
onSearch?: (value: string) => void;
|
|
10
|
+
isAllSelected?: boolean;
|
|
11
|
+
searchQuery?: string;
|
|
12
|
+
showLabelFilterToggle?: boolean;
|
|
13
|
+
isLabelFilterOpen?: boolean;
|
|
14
|
+
onToggleLabelFilter?: () => void;
|
|
15
|
+
showSearchField?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const Filter: React.ForwardRefExoticComponent<Omit<FilterProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
18
|
+
export default Filter;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FilterChipProps {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
handleClick?: (label: string, isSelected?: boolean) => void;
|
|
8
|
+
actionIcon?: React.ReactElement;
|
|
9
|
+
onClick?: (ref: HTMLElement | null, event: React.MouseEvent) => void;
|
|
10
|
+
onClickIcon?: (ref: HTMLElement | null, event: React.MouseEvent) => void;
|
|
11
|
+
size?: 'small' | 'medium';
|
|
12
|
+
}
|
|
13
|
+
declare const FilterChip: React.FC<FilterChipProps>;
|
|
14
|
+
export default FilterChip;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ListFilter {
|
|
3
|
+
label: string;
|
|
4
|
+
id: string;
|
|
5
|
+
type?: 'scope' | 'keyword';
|
|
6
|
+
isSelected?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface FilterListProps {
|
|
10
|
+
filters?: ListFilter[];
|
|
11
|
+
onChipClick?: (id: string, selected: boolean) => void;
|
|
12
|
+
isAllSelected?: boolean;
|
|
13
|
+
showLabelFilterToggle?: boolean;
|
|
14
|
+
isLabelFilterOpen?: boolean;
|
|
15
|
+
onToggleLabelFilter?: () => void;
|
|
16
|
+
activeLabelFilterCount?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const FilterList: React.FC<FilterListProps>;
|
|
19
|
+
export default FilterList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
interface Props {
|
|
5
|
+
optionId: string;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
onClick: (checked: boolean, only?: boolean) => void;
|
|
8
|
+
labelStyle?: SxProps<Theme>;
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const FilterOption: React.FC<Props>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Filter } from './Filter';
|
|
2
|
+
export { DEFAULT_FILTER_HEIGHT } from './Filter';
|
|
3
|
+
export type { ListFilter } from './FilterList';
|
|
4
|
+
export { FilterOption } from './FilterOption';
|
|
5
|
+
export { default as FilterChip } from './FilterChip';
|
|
6
|
+
export type { FilterChipProps } from './FilterChip';
|
|
7
|
+
export { DEBOUNCE_TIMEOUT } from './SearchField';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const getLastUpdateTitle: (time: string, t: TFunction) => string;
|
|
5
|
+
interface LastUpdateTimeProps {
|
|
6
|
+
onPressRefresh?: () => void;
|
|
7
|
+
lastUpdateTime?: string;
|
|
8
|
+
dataTestId?: string;
|
|
9
|
+
hideLabel?: boolean;
|
|
10
|
+
showRefreshButton?: boolean;
|
|
11
|
+
iconButtonSx?: SxProps<Theme>;
|
|
12
|
+
}
|
|
13
|
+
declare const LastUpdateTime: React.FC<LastUpdateTimeProps>;
|
|
14
|
+
export default LastUpdateTime;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LastUpdateTime, getLastUpdateTitle, } from './LastUpdateTime';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ThemeProviderProps } from '@opengeoweb/theme';
|
|
3
|
+
interface SharedTranslationWrapperProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface SharedStoryWrapperProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
theme?: 'light' | 'dark';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A Provider component which provides the GeoWeb theme
|
|
12
|
+
* @param children
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const SharedThemeProvider: React.FC<ThemeProviderProps>;
|
|
16
|
+
export declare const SharedStoryWrapper: React.FC<SharedStoryWrapperProps>;
|
|
17
|
+
export declare const SharedI18nProvider: React.FC<SharedTranslationWrapperProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Providers';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SearchFieldProps {
|
|
3
|
+
searchFilter: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
setSearchFilter: (filterText: string) => void;
|
|
6
|
+
onOpenServicePopup?: (url: string) => void;
|
|
7
|
+
small?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const SearchField: React.FC<SearchFieldProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const isURL: (string: string) => boolean;
|
|
3
|
+
interface FieldButtonProps {
|
|
4
|
+
localSearchString: string;
|
|
5
|
+
onClickClear: () => void;
|
|
6
|
+
setPopupIsOpen?: (value: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SearchFieldButton: React.FC<FieldButtonProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SearchHighlight } from './SearchHighlight';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BoxProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const bgColors: {
|
|
4
|
+
green: string;
|
|
5
|
+
grey: string;
|
|
6
|
+
purple: string;
|
|
7
|
+
red: string;
|
|
8
|
+
yellow: string;
|
|
9
|
+
blue: string;
|
|
10
|
+
};
|
|
11
|
+
interface StatusTagProps extends BoxProps {
|
|
12
|
+
content: string;
|
|
13
|
+
color: string;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const StatusTag: React.FC<StatusTagProps>;
|
|
17
|
+
export default StatusTag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StatusTag } from './StatusTag';
|