@opengeoweb/shared 4.3.0 → 4.5.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 +403 -136
- package/index.umd.js +414 -148
- package/lib/components/CustomAccordion/CustomAccordion.d.ts +10 -0
- package/lib/components/CustomAccordion/CustomAccordion.spec.d.ts +1 -0
- package/lib/components/CustomAccordion/CustomAccordion.stories.d.ts +13 -0
- package/lib/components/CustomAccordion/index.d.ts +1 -0
- package/lib/components/CustomTooltip/CustomTooltip.d.ts +8 -0
- package/lib/components/CustomTooltip/CustomTooltip.spec.d.ts +1 -0
- package/lib/components/CustomTooltip/index.d.ts +1 -0
- package/lib/components/DraggableResizable/Draggable.d.ts +3 -3
- package/lib/components/DraggableResizable/Resizable.d.ts +1 -0
- package/lib/components/DraggableResizable/types.d.ts +1 -3
- package/lib/components/EnableButton/EnableButton.d.ts +2 -0
- package/lib/components/ManagerButton/ManagerButton.d.ts +1 -0
- package/lib/components/StatusTag/StatusTag.stories.d.ts +21 -1
- package/lib/components/ToolContainer/ToolContainerDraggable.d.ts +9 -2
- package/lib/components/ToolContainer/types.d.ts +2 -1
- package/lib/components/WithEggs/WithEggs.d.ts +3 -0
- package/lib/components/WithEggs/WithEggs.spec.d.ts +1 -0
- package/lib/components/WithEggs/index.d.ts +1 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow.d.ts +4 -0
- package/lib/hooks/useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow.spec.d.ts +1 -0
- package/lib/utils/containerQueryHelper.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AccordionProps, SxProps, Theme } from '@mui/material';
|
|
3
|
+
export interface CustomAccordionProps extends Omit<AccordionProps, 'title'> {
|
|
4
|
+
title?: string | React.ReactNode;
|
|
5
|
+
expandedElevation?: number;
|
|
6
|
+
collapsedElevation?: number;
|
|
7
|
+
transitionDuration?: number;
|
|
8
|
+
detailsSx?: SxProps<Theme>;
|
|
9
|
+
}
|
|
10
|
+
export declare const CustomAccordion: React.FC<CustomAccordionProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const CustomAccordionLight: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
storyName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const CustomAccordionDark: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
storyName: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomAccordion';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TooltipProps } from '@mui/material';
|
|
3
|
+
export declare const defaultDelay = 1000;
|
|
4
|
+
export declare const useControlledTooltip: () => [
|
|
5
|
+
boolean,
|
|
6
|
+
React.Dispatch<React.SetStateAction<boolean>>
|
|
7
|
+
];
|
|
8
|
+
export declare const CustomTooltip: React.FC<TooltipProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomTooltip';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type
|
|
2
|
+
export declare type DraggablePosition = {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
5
5
|
};
|
|
@@ -7,8 +7,8 @@ interface DraggableComponentProps {
|
|
|
7
7
|
nodeRef?: React.RefObject<HTMLElement>;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
bounds?: 'parent' | string;
|
|
10
|
-
position?:
|
|
11
|
-
onStop?: (event: React.MouseEvent<HTMLElement>, pos:
|
|
10
|
+
position?: DraggablePosition;
|
|
11
|
+
onStop?: (event: React.MouseEvent<HTMLElement>, pos: DraggablePosition) => void;
|
|
12
12
|
onMouseDown?: (event: MouseEvent) => void;
|
|
13
13
|
handle?: string;
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ResizableProps } from 're-resizable';
|
|
3
|
-
declare type Position = {
|
|
3
|
+
export declare type Position = {
|
|
4
4
|
top: number;
|
|
5
5
|
left?: number;
|
|
6
6
|
right?: number;
|
|
@@ -10,11 +10,9 @@ export declare type Size = {
|
|
|
10
10
|
height?: number | string;
|
|
11
11
|
};
|
|
12
12
|
export interface ResizableComponentProps extends Omit<ResizableProps, 'size'> {
|
|
13
|
-
startPosition?: Position;
|
|
14
13
|
startSize?: Size;
|
|
15
14
|
setSize?: (size: Size) => void;
|
|
16
15
|
size?: Size;
|
|
17
16
|
children: React.ReactNode;
|
|
18
17
|
onResizeStart?: () => void;
|
|
19
18
|
}
|
|
20
|
-
export {};
|
|
@@ -3,7 +3,27 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const StatusTagsGWTheme: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
storyName: string;
|
|
9
9
|
};
|
|
10
|
+
export declare const StatusTagsLight: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
storyName: string;
|
|
13
|
+
parameters: {
|
|
14
|
+
zeplinLink: {
|
|
15
|
+
name: string;
|
|
16
|
+
link: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const StatusTagsDark: {
|
|
21
|
+
(): React.ReactElement;
|
|
22
|
+
storyName: string;
|
|
23
|
+
parameters: {
|
|
24
|
+
zeplinLink: {
|
|
25
|
+
name: string;
|
|
26
|
+
link: string;
|
|
27
|
+
}[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SxProps } from '@mui/material';
|
|
3
|
+
import { DraggablePosition } from '../DraggableResizable/Draggable';
|
|
4
|
+
import { Position, ResizableComponentProps, Size } from '../DraggableResizable/types';
|
|
3
5
|
import { HeaderSize } from './types';
|
|
4
6
|
export declare const calculateDialogSizeAndPosition: () => {
|
|
5
7
|
width: number;
|
|
@@ -8,6 +10,7 @@ export declare const calculateDialogSizeAndPosition: () => {
|
|
|
8
10
|
left: number;
|
|
9
11
|
};
|
|
10
12
|
interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'> {
|
|
13
|
+
startPosition?: Position;
|
|
11
14
|
onStartResize?: () => void;
|
|
12
15
|
isOpen?: boolean;
|
|
13
16
|
onClose?: () => void;
|
|
@@ -15,11 +18,15 @@ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'
|
|
|
15
18
|
headerSize?: HeaderSize;
|
|
16
19
|
initialMaxHeight?: string | number;
|
|
17
20
|
onChangeSize?: (size: Size) => void;
|
|
21
|
+
onDragEnd?: (position: DraggablePosition, size: Size) => void;
|
|
18
22
|
onMouseDown?: () => void;
|
|
19
23
|
bounds?: 'parent' | string;
|
|
20
24
|
order?: number;
|
|
21
25
|
source?: 'app' | 'module';
|
|
22
|
-
|
|
26
|
+
leftHeaderComponent?: React.ReactNode;
|
|
27
|
+
rightHeaderComponent?: React.ReactNode;
|
|
28
|
+
hasElevation?: boolean;
|
|
29
|
+
sx?: SxProps;
|
|
23
30
|
}
|
|
24
31
|
declare const DraggableComponent: React.FC<DraggableComponentProps>;
|
|
25
32
|
export default DraggableComponent;
|
|
@@ -7,7 +7,8 @@ export interface ToolHeaderProps {
|
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
className?: string;
|
|
9
9
|
isDraggable?: boolean;
|
|
10
|
-
|
|
10
|
+
leftHeaderComponent?: React.ReactNode;
|
|
11
|
+
rightHeaderComponent?: React.ReactNode;
|
|
11
12
|
}
|
|
12
13
|
export interface ToolContainerProps extends PaperProps, ToolHeaderProps {
|
|
13
14
|
isResizable?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { withEggs } from './WithEggs';
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export * from './usePoller/usePoller';
|
|
|
3
3
|
export * from './usePrevious/usePrevious';
|
|
4
4
|
export * from './useIsMounted/useIsMounted';
|
|
5
5
|
export * from './useDraftFormHelpers/useDraftFormHelpers';
|
|
6
|
+
export * from './useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow';
|
package/lib/hooks/useMakeSureContainerStaysInsideWindow/useMakeSureContainerStaysInsideWindow.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DraggablePosition } from '../../components/DraggableResizable/Draggable';
|
|
3
|
+
export declare const adjustPosition: (bbox: DOMRect, containingView: DOMRect, position: DraggablePosition, setPosition: (position: DraggablePosition) => void) => void;
|
|
4
|
+
export declare const useMakeSureContainerStaysInsideWindow: (nodeRef: React.RefObject<HTMLDivElement>, position: DraggablePosition, setPosition: (position: DraggablePosition) => void) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IS_JEST: boolean;
|
package/lib/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.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": {
|
|
@@ -14,15 +14,17 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^17.0.2",
|
|
16
16
|
"@mui/material": "^5.10.8",
|
|
17
|
-
"@opengeoweb/theme": "4.
|
|
17
|
+
"@opengeoweb/theme": "4.5.0",
|
|
18
18
|
"react-draggable": "^4.4.5",
|
|
19
19
|
"re-resizable": "^6.9.0",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"@redux-eggs/core": "^2.2.0",
|
|
21
|
+
"react-redux": "^8.0.4",
|
|
22
|
+
"@opengeoweb/form-fields": "4.5.0",
|
|
22
23
|
"react-hook-form": "^6.12.1",
|
|
23
24
|
"moment": "^2.29.0",
|
|
24
25
|
"moment-timezone": "^0.5.31",
|
|
25
26
|
"@mui/x-date-pickers": "^5.0.4",
|
|
27
|
+
"lodash": "^4.17.20",
|
|
26
28
|
"axios": "^0.25.0"
|
|
27
29
|
}
|
|
28
30
|
}
|