@opengeoweb/shared 4.17.0 → 4.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 +364 -443
- package/index.umd.js +260 -325
- package/lib/components/CustomIconButton/CustomIconButton.d.ts +10 -0
- package/lib/components/CustomIconButton/CustomIconButton.stories.d.ts +25 -0
- package/lib/components/CustomIconButton/index.d.ts +1 -0
- package/lib/components/ToolContainer/ToolContainerDraggable.d.ts +2 -0
- package/lib/components/index.d.ts +1 -3
- package/lib/utils/dateUtils/dateUtils.d.ts +30 -0
- package/package.json +4 -3
- package/lib/components/EnableButton/EnableButton.d.ts +0 -10
- package/lib/components/EnableButton/EnableButton.stories.d.ts +0 -13
- package/lib/components/EnableButton/index.d.ts +0 -1
- package/lib/components/ManagerButton/ManagerButton.d.ts +0 -13
- package/lib/components/ManagerButton/ManagerButton.spec.d.ts +0 -1
- package/lib/components/ManagerButton/ManagerButton.stories.d.ts +0 -13
- package/lib/components/ManagerButton/index.d.ts +0 -1
- package/lib/components/ManagerDeleteButton/ManagerDeleteButton.d.ts +0 -9
- package/lib/components/ManagerDeleteButton/ManagerDeleteButton.spec.d.ts +0 -1
- package/lib/components/ManagerDeleteButton/ManagerDeleteButton.stories.d.ts +0 -13
- package/lib/components/ManagerDeleteButton/index.d.ts +0 -1
- /package/lib/components/{EnableButton/EnableButton.spec.d.ts → CustomIconButton/CustomIconButton.spec.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconButtonProps } from '@mui/material';
|
|
3
|
+
export declare type Variant = 'flat' | 'tool' | 'boxed';
|
|
4
|
+
export interface CustomIconProps extends IconButtonProps {
|
|
5
|
+
tooltipTitle?: string;
|
|
6
|
+
variant?: Variant;
|
|
7
|
+
isSelected?: boolean;
|
|
8
|
+
shouldShowAsDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const CustomIconButton: React.FC<CustomIconProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const CustomIconButtonLight: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
storyName: string;
|
|
9
|
+
parameters: {
|
|
10
|
+
zeplinLink: {
|
|
11
|
+
name: string;
|
|
12
|
+
link: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const CustomIconButtonDark: {
|
|
17
|
+
(): React.ReactElement;
|
|
18
|
+
storyName: string;
|
|
19
|
+
parameters: {
|
|
20
|
+
zeplinLink: {
|
|
21
|
+
name: string;
|
|
22
|
+
link: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CustomIconButton';
|
|
@@ -20,6 +20,8 @@ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'
|
|
|
20
20
|
onChangeSize?: (size: Size) => void;
|
|
21
21
|
onDragEnd?: (position: DraggablePosition, size: Size) => void;
|
|
22
22
|
onMouseDown?: (event: MouseEvent) => void;
|
|
23
|
+
onFocus?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
24
|
+
onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
23
25
|
bounds?: 'parent' | string;
|
|
24
26
|
cancel?: string;
|
|
25
27
|
order?: number;
|
|
@@ -11,9 +11,6 @@ export * from './CustomSlider';
|
|
|
11
11
|
export * from './CustomToggleButton';
|
|
12
12
|
export * from './ToolButton';
|
|
13
13
|
export * from './ToggleMenu';
|
|
14
|
-
export * from './ManagerButton';
|
|
15
|
-
export * from './ManagerDeleteButton';
|
|
16
|
-
export * from './EnableButton';
|
|
17
14
|
export * from './AlertIcon';
|
|
18
15
|
export * from './TooltipSelect';
|
|
19
16
|
export * from './Avatar';
|
|
@@ -21,3 +18,4 @@ export * from './WithEggs';
|
|
|
21
18
|
export * from './CustomTooltip';
|
|
22
19
|
export * from './CustomAccordion';
|
|
23
20
|
export * from './CustomDialog';
|
|
21
|
+
export * from './CustomIconButton';
|
|
@@ -131,3 +131,33 @@ export declare const isBetween: (date: Date, from: Date, to: Date, inclusivity?:
|
|
|
131
131
|
* // => 2022-12-13T00:00:00.000Z
|
|
132
132
|
*/
|
|
133
133
|
export declare const createDate: (yearOrIsoString?: string | number | undefined, month?: number | undefined, day?: number | undefined, hours?: number, minutes?: number, seconds?: number, milliseconds?: number) => Date;
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @param date
|
|
137
|
+
* @param duration
|
|
138
|
+
* @returns {Date} the new Date
|
|
139
|
+
*/
|
|
140
|
+
export declare const add: (date: Date | number, duration: Duration) => Date;
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @param date
|
|
144
|
+
* @param duration
|
|
145
|
+
* @returns {Date} the new Date
|
|
146
|
+
*/
|
|
147
|
+
export declare const sub: (date: Date | number, duration: Duration) => Date;
|
|
148
|
+
/**
|
|
149
|
+
* Finds the number of minuts between to dates
|
|
150
|
+
*
|
|
151
|
+
* @param dateLeft - the later date
|
|
152
|
+
* @param dateRight - the earlier date
|
|
153
|
+
* @returns {number} the number of minutes
|
|
154
|
+
*/
|
|
155
|
+
export declare const differenceInMinutes: (dateLeft: Date | number, dateRight: Date | number) => number;
|
|
156
|
+
/**
|
|
157
|
+
* Finds the number of hours between to dates
|
|
158
|
+
*
|
|
159
|
+
* @param dateLeft - the later date
|
|
160
|
+
* @param dateRight - the earlier date
|
|
161
|
+
* @returns {number} the number of hours
|
|
162
|
+
*/
|
|
163
|
+
export declare const differenceInHours: (dateLeft: Date | number, dateRight: Date | number) => number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.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": {
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
"dependencies": {},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^18.2.0",
|
|
16
|
-
"@mui/material": "^5.
|
|
17
|
-
"@opengeoweb/theme": "4.
|
|
16
|
+
"@mui/material": "^5.12.0",
|
|
17
|
+
"@opengeoweb/theme": "4.19.0",
|
|
18
|
+
"@mui/x-date-pickers": "^6.2.1",
|
|
18
19
|
"react-draggable": "^4.4.5",
|
|
19
20
|
"re-resizable": "^6.9.0",
|
|
20
21
|
"@redux-eggs/core": "^2.2.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface EnableLayerProps {
|
|
3
|
-
isEnabled?: boolean;
|
|
4
|
-
title: string;
|
|
5
|
-
onChangeEnableLayer: (enable: boolean) => void;
|
|
6
|
-
className?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const EnableButton: React.FC<EnableLayerProps>;
|
|
10
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
};
|
|
5
|
-
export default _default;
|
|
6
|
-
export declare const EnableButtonLight: {
|
|
7
|
-
(): React.ReactElement;
|
|
8
|
-
storyName: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const EnableButtonDark: {
|
|
11
|
-
(): React.ReactElement;
|
|
12
|
-
storyName: string;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './EnableButton';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IconButtonProps } from '@mui/material';
|
|
3
|
-
export interface ManagerButtonProps extends IconButtonProps {
|
|
4
|
-
tooltipTitle: string;
|
|
5
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
6
|
-
isActive?: boolean;
|
|
7
|
-
isEnabled?: boolean;
|
|
8
|
-
icon: React.ReactNode;
|
|
9
|
-
testId: string;
|
|
10
|
-
isAccessible?: boolean;
|
|
11
|
-
children?: React.ReactElement;
|
|
12
|
-
}
|
|
13
|
-
export declare const ManagerButton: React.FC<ManagerButtonProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
};
|
|
5
|
-
export default _default;
|
|
6
|
-
export declare const ManagerButtonLight: {
|
|
7
|
-
(): React.ReactElement;
|
|
8
|
-
storyName: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const ManagerButtonDark: {
|
|
11
|
-
(): React.ReactElement;
|
|
12
|
-
storyName: string;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ManagerButton';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IconButtonProps } from '@mui/material';
|
|
3
|
-
interface DeleteButtonProps extends IconButtonProps {
|
|
4
|
-
tooltipTitle: string;
|
|
5
|
-
onClickDelete: (event: React.MouseEvent) => void;
|
|
6
|
-
isEnabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const ManagerDeleteButton: React.FC<DeleteButtonProps>;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
};
|
|
5
|
-
export default _default;
|
|
6
|
-
export declare const ManagerDeleteButtonLight: {
|
|
7
|
-
(): React.ReactElement;
|
|
8
|
-
storyName: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const ManagerDeleteButtonDark: {
|
|
11
|
-
(): React.ReactElement;
|
|
12
|
-
storyName: string;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ManagerDeleteButton';
|
|
File without changes
|