@opengeoweb/warnings 5.2.0 → 6.0.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.js +1 -34890
- package/package.json +7 -6
- package/src/index.d.ts +0 -3
- package/src/lib/Providers/Providers.d.ts +1 -4
- package/src/lib/{DrawingTool/DrawingTool.d.ts → components/AreaManager/AreaManager.d.ts} +4 -9
- package/src/lib/{DrawingTool/DrawingTool.stories.d.ts → components/AreaManager/AreaManager.stories.d.ts} +2 -2
- package/src/lib/components/AreaManager/AreaManagerConnect.d.ts +6 -0
- package/src/lib/{DrawingTool/DrawingToolConnect.stories.d.ts → components/AreaManager/AreaManagerConnect.stories.d.ts} +2 -2
- package/src/lib/components/AreaManager/AreaManagerMapButtonConnect.d.ts +6 -0
- package/src/lib/store/drawings/types.d.ts +15 -0
- package/src/lib/store/utils/api.d.ts +13 -0
- package/src/lib/store/utils/fakeApi.d.ts +5 -0
- package/src/lib/storybookUtils/defaultStorySettings.d.ts +2 -2
- package/src/lib/DrawingTool/DrawingToolConnect.d.ts +0 -14
- package/src/lib/DrawingTool/DrawingToolMapButtonConnect.d.ts +0 -8
- package/src/lib/DrawingToolForm/DrawingToolForm.d.ts +0 -13
- package/src/lib/DrawingToolForm/DrawingToolForm.spec.d.ts +0 -1
- package/src/lib/DrawingToolForm/DrawingToolFormConnect.d.ts +0 -2
- package/src/lib/DrawingToolForm/DrawingToolFormConnect.spec.d.ts +0 -1
- /package/src/lib/{DrawingTool/DrawingTool.spec.d.ts → Providers/Providers.spec.d.ts} +0 -0
- /package/src/lib/{DrawingTool/DrawingToolConnect.spec.d.ts → components/AreaManager/AreaManagerMapButtonConnect.spec.d.ts} +0 -0
- /package/src/lib/{DrawingTool/DrawingToolMapButtonConnect.spec.d.ts → store/utils/fakeApi.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@mui/material": "5.12.0",
|
|
12
|
-
"@opengeoweb/
|
|
13
|
-
"@opengeoweb/
|
|
14
|
-
"@opengeoweb/shared": "
|
|
15
|
-
"@opengeoweb/
|
|
12
|
+
"@opengeoweb/api": "6.0.0",
|
|
13
|
+
"@opengeoweb/core": "6.0.0",
|
|
14
|
+
"@opengeoweb/shared": "6.0.0",
|
|
15
|
+
"@opengeoweb/store": "6.0.0",
|
|
16
|
+
"@opengeoweb/theme": "6.0.0",
|
|
16
17
|
"@reduxjs/toolkit": "1.9.5",
|
|
18
|
+
"axios": "1.4.0",
|
|
17
19
|
"react": "18.2.0",
|
|
18
|
-
"react-hook-form": "7.45.2",
|
|
19
20
|
"react-redux": "8.1.1"
|
|
20
21
|
},
|
|
21
22
|
"module": "./index.js",
|
package/src/index.d.ts
CHANGED
|
@@ -6,10 +6,7 @@ export interface WarningsThemeProviderProps {
|
|
|
6
6
|
theme?: Theme;
|
|
7
7
|
}
|
|
8
8
|
export declare const WarningsThemeProvider: React.FC<WarningsThemeProviderProps>;
|
|
9
|
-
export
|
|
10
|
-
export interface WarningsThemeStoreProviderProps {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
theme?: Theme;
|
|
9
|
+
export interface WarningsThemeStoreProviderProps extends WarningsThemeProviderProps {
|
|
13
10
|
store?: Store;
|
|
14
11
|
}
|
|
15
12
|
export declare const WarningsThemeStoreProvider: React.FC<WarningsThemeStoreProviderProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HeaderSize } from '@opengeoweb/shared';
|
|
3
|
-
import { uiTypes } from '@opengeoweb/
|
|
3
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
4
4
|
export declare type Size = {
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
@@ -10,7 +10,8 @@ export declare type Position = {
|
|
|
10
10
|
left?: number;
|
|
11
11
|
right?: number;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
export declare const calculateStartSize: (minSize: Size, prefSize: Size, startPosition: Position) => Size;
|
|
14
|
+
export declare const AreaManager: React.FC<{
|
|
14
15
|
bounds?: string;
|
|
15
16
|
title?: string;
|
|
16
17
|
onClose: () => void;
|
|
@@ -18,14 +19,8 @@ interface DrawingToolProps {
|
|
|
18
19
|
isOpen: boolean;
|
|
19
20
|
order?: number;
|
|
20
21
|
source?: uiTypes.Source;
|
|
21
|
-
isLoading?: boolean;
|
|
22
|
-
error?: string;
|
|
23
|
-
isDocked?: boolean;
|
|
24
22
|
size?: Size;
|
|
25
23
|
startPosition?: Position;
|
|
26
24
|
setFocused?: (focused: boolean) => void;
|
|
27
25
|
headerSize?: HeaderSize;
|
|
28
|
-
}
|
|
29
|
-
export declare const calculateStartSize: (minSize: Size, prefSize: Size, startPosition: Position) => Size;
|
|
30
|
-
declare const DrawingTool: React.FC<DrawingToolProps>;
|
|
31
|
-
export default DrawingTool;
|
|
26
|
+
}>;
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const AreaManagerLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
parameters: {
|
|
9
9
|
zeplinLink: {
|
|
@@ -13,7 +13,7 @@ export declare const DrawingToolDockedLight: {
|
|
|
13
13
|
};
|
|
14
14
|
storyName: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const AreaManagerDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
18
|
parameters: {
|
|
19
19
|
zeplinLink: {
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const AreaManagerConnectLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
parameters: {
|
|
9
9
|
zeplinLink: {
|
|
@@ -13,7 +13,7 @@ export declare const DrawingToolConnectLight: {
|
|
|
13
13
|
};
|
|
14
14
|
storyName: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const AreaManagerConnectDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
18
|
parameters: {
|
|
19
19
|
zeplinLink: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare type DrawingScope = 'user';
|
|
2
|
+
export interface DrawingListItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
lastUpdatedTime: string;
|
|
6
|
+
scope: DrawingScope;
|
|
7
|
+
}
|
|
8
|
+
export interface DrawingFromBE extends DrawingListItem {
|
|
9
|
+
username: string;
|
|
10
|
+
area: GeoJSON.FeatureCollection;
|
|
11
|
+
}
|
|
12
|
+
export interface DrawingDetails extends Omit<DrawingFromBE, 'id' | 'lastUpdatedTime'> {
|
|
13
|
+
id?: string;
|
|
14
|
+
lastUpdatedTime?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DrawingDetails, DrawingFromBE, DrawingListItem } from '../drawings/types';
|
|
2
|
+
export declare const API_NAME = "warnings";
|
|
3
|
+
export declare type WarningsApi = {
|
|
4
|
+
getDrawings: () => Promise<{
|
|
5
|
+
data: DrawingListItem[];
|
|
6
|
+
}>;
|
|
7
|
+
getDrawingDetails: (drawingId: string) => Promise<{
|
|
8
|
+
data: DrawingFromBE;
|
|
9
|
+
}>;
|
|
10
|
+
updateDrawing: (drawingId: string, data: DrawingFromBE) => Promise<void>;
|
|
11
|
+
saveDrawingAs: (data: DrawingDetails) => Promise<string>;
|
|
12
|
+
deleteDrawing: (drawingId: string) => Promise<void>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { WarningsApi } from './api';
|
|
2
|
+
import { DrawingFromBE } from '../drawings/types';
|
|
3
|
+
export declare const ERROR_NOT_FOUND = "Request failed with status code 400";
|
|
4
|
+
export declare const extractDrawingDetailsFromJSON: (drawingId: string) => DrawingFromBE;
|
|
5
|
+
export declare const createApi: () => WarningsApi;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mapTypes } from '@opengeoweb/
|
|
1
|
+
import { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
2
2
|
export declare const initialBbox: {
|
|
3
3
|
srs: string;
|
|
4
4
|
bbox: {
|
|
@@ -10,7 +10,7 @@ export declare const initialBbox: {
|
|
|
10
10
|
};
|
|
11
11
|
interface UseDefaultMapSettingsProps {
|
|
12
12
|
mapId?: string;
|
|
13
|
-
baseLayers?:
|
|
13
|
+
baseLayers?: layerTypes.Layer[];
|
|
14
14
|
bbox?: mapTypes.Bbox;
|
|
15
15
|
srs?: string;
|
|
16
16
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { uiTypes } from '@opengeoweb/core';
|
|
3
|
-
export declare const getDialogType: (mapId: any, isMultiMap: boolean, isDocked: boolean) => string;
|
|
4
|
-
interface DrawingToolConnectProps {
|
|
5
|
-
mapId?: string;
|
|
6
|
-
bounds?: string;
|
|
7
|
-
title?: string;
|
|
8
|
-
showMapIdInTitle?: boolean;
|
|
9
|
-
isMultiMap?: boolean;
|
|
10
|
-
isDocked?: boolean;
|
|
11
|
-
source?: uiTypes.Source;
|
|
12
|
-
}
|
|
13
|
-
declare const DrawingToolConnect: React.FC<DrawingToolConnectProps>;
|
|
14
|
-
export default DrawingToolConnect;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { uiTypes } from '@opengeoweb/core';
|
|
3
|
-
interface DrawingToolMapButtonConnectProps {
|
|
4
|
-
mapId: string;
|
|
5
|
-
source?: uiTypes.Source;
|
|
6
|
-
}
|
|
7
|
-
declare const DrawingToolMapButtonConnect: React.FC<DrawingToolMapButtonConnectProps>;
|
|
8
|
-
export default DrawingToolMapButtonConnect;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const opacityOptions: number[];
|
|
3
|
-
export declare const SAVE_AREA_BUTTON = "Save area";
|
|
4
|
-
export interface DrawingToolFormProps {
|
|
5
|
-
opacity: number;
|
|
6
|
-
areaName: string;
|
|
7
|
-
}
|
|
8
|
-
export interface DrawingToolFormComponentProps {
|
|
9
|
-
onSubmitForm: (formValues: DrawingToolFormProps) => void;
|
|
10
|
-
}
|
|
11
|
-
declare const Wrapper: React.FC<DrawingToolFormComponentProps>;
|
|
12
|
-
export { Wrapper as DrawingToolForm };
|
|
13
|
-
export default Wrapper;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
File without changes
|
/package/src/lib/{DrawingTool/DrawingToolMapButtonConnect.spec.d.ts → store/utils/fakeApi.spec.d.ts}
RENAMED
|
File without changes
|