@opengeoweb/warnings 7.0.0 → 8.1.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 +20664 -1068
- package/package.json +12 -7
- package/src/index.d.ts +3 -1
- package/src/lib/Warnings.stories.d.ts +1 -1
- package/src/lib/WarningsErrors.stories.d.ts +7 -0
- package/src/lib/components/DrawingTool/DrawingTool.stories.d.ts +34 -0
- package/src/lib/components/DrawingTool/DrawingToolConnect.d.ts +14 -0
- package/src/lib/components/{AreaManager/AreaManagerConnect.stories.d.ts → DrawingTool/DrawingToolConnect.stories.d.ts} +2 -2
- package/src/lib/components/DrawingTool/DrawingToolDialog.d.ts +21 -0
- package/src/lib/components/DrawingTool/DrawingToolMapButtonConnect.d.ts +8 -0
- package/src/lib/components/DrawingTool/index.d.ts +3 -0
- package/src/lib/components/DrawingTool/useObjectDrawDialogAction.d.ts +24 -0
- package/src/lib/components/DrawingToolForm/DrawingToolForm.d.ts +35 -0
- package/src/lib/components/DrawingToolForm/DrawingToolForm.spec.d.ts +1 -0
- package/src/lib/components/DrawingToolForm/DrawingToolFormConnect.d.ts +2 -0
- package/src/lib/components/DrawingToolForm/DrawingToolFormConnect.spec.d.ts +1 -0
- package/src/lib/components/DrawingToolForm/index.d.ts +2 -0
- package/src/lib/components/ObjectManager/ConfirmDeleteDialog.d.ts +13 -0
- package/src/lib/components/ObjectManager/ConfirmDeleteDialog.spec.d.ts +1 -0
- package/src/lib/components/{AreaManager → ObjectManager}/Drawings.d.ts +3 -1
- package/src/lib/components/ObjectManager/Drawings.spec.d.ts +1 -0
- package/src/lib/components/{AreaManager/AreaManager.d.ts → ObjectManager/ObjectManager.d.ts} +6 -14
- package/src/lib/components/ObjectManager/ObjectManager.spec.d.ts +1 -0
- package/src/lib/components/{AreaManager/AreaManager.stories.d.ts → ObjectManager/ObjectManager.stories.d.ts} +4 -4
- package/src/lib/components/ObjectManager/ObjectManagerConnect.d.ts +10 -0
- package/src/lib/components/ObjectManager/ObjectManagerConnect.spec.d.ts +1 -0
- package/src/lib/components/ObjectManager/ObjectManagerConnect.stories.d.ts +25 -0
- package/src/lib/components/{AreaManager/AreaManagerMapButtonConnect.d.ts → ObjectManager/ObjectManagerMapButtonConnect.d.ts} +1 -1
- package/src/lib/components/ObjectManager/ObjectManagerMapButtonConnect.spec.d.ts +1 -0
- package/src/lib/components/ObjectManager/index.d.ts +2 -0
- package/src/lib/components/PublicWarnings/PublicWarnings.d.ts +17 -0
- package/src/lib/components/PublicWarnings/PublicWarnings.spec.d.ts +1 -0
- package/src/lib/components/PublicWarnings/PublicWarnings.stories.d.ts +13 -0
- package/src/lib/components/PublicWarnings/PublicWarningsConnect.d.ts +7 -0
- package/src/lib/components/PublicWarnings/PublicWarningsConnect.spec.d.ts +1 -0
- package/src/lib/components/PublicWarnings/PublicWarningsConnect.stories.d.ts +6 -0
- package/src/lib/components/PublicWarnings/index.d.ts +2 -0
- package/src/lib/store/config.d.ts +8 -1
- package/src/lib/store/drawings/reducer.d.ts +9 -0
- package/src/lib/store/drawings/reducer.spec.d.ts +1 -0
- package/src/lib/store/drawings/sagas.d.ts +7 -4
- package/src/lib/store/drawings/selectors.d.ts +4 -0
- package/src/lib/store/drawings/selectors.spec.d.ts +1 -0
- package/src/lib/store/drawings/types.d.ts +19 -4
- package/src/lib/storybookUtils/storyComponents.d.ts +4 -0
- package/src/lib/storybookUtils/testUtils.d.ts +1 -0
- package/src/lib/components/AreaManager/AreaManagerConnect.d.ts +0 -6
- package/src/lib/components/AreaManager/index.d.ts +0 -2
- /package/src/lib/components/{AreaManager/AreaManager.spec.d.ts → DrawingTool/DrawingToolConnect.spec.d.ts} +0 -0
- /package/src/lib/components/{AreaManager/AreaManagerConnect.spec.d.ts → DrawingTool/DrawingToolDialog.spec.d.ts} +0 -0
- /package/src/lib/components/{AreaManager/AreaManagerMapButtonConnect.spec.d.ts → DrawingTool/DrawingToolMapButtonConnect.spec.d.ts} +0 -0
- /package/src/lib/components/{AreaManager/Drawings.spec.d.ts → DrawingTool/useObjectDrawDialogAction.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,15 +9,20 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@mui/material": "5.12.0",
|
|
12
|
-
"@opengeoweb/api": "
|
|
13
|
-
"@opengeoweb/core": "
|
|
14
|
-
"@opengeoweb/
|
|
15
|
-
"@opengeoweb/
|
|
16
|
-
"@opengeoweb/
|
|
17
|
-
"@opengeoweb/
|
|
12
|
+
"@opengeoweb/api": "8.1.0",
|
|
13
|
+
"@opengeoweb/core": "8.1.0",
|
|
14
|
+
"@opengeoweb/form-fields": "8.1.0",
|
|
15
|
+
"@opengeoweb/shared": "8.1.0",
|
|
16
|
+
"@opengeoweb/store": "8.1.0",
|
|
17
|
+
"@opengeoweb/theme": "8.1.0",
|
|
18
|
+
"@opengeoweb/webmap": "8.1.0",
|
|
19
|
+
"@opengeoweb/webmap-react": "8.1.0",
|
|
18
20
|
"@reduxjs/toolkit": "1.9.5",
|
|
19
21
|
"axios": "1.5.0",
|
|
22
|
+
"immer": "9.0.21",
|
|
23
|
+
"lodash": "4.17.21",
|
|
20
24
|
"react": "18.2.0",
|
|
25
|
+
"react-hook-form": "7.46.2",
|
|
21
26
|
"react-redux": "8.1.2",
|
|
22
27
|
"redux-saga": "1.2.3"
|
|
23
28
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export * from './lib/components/
|
|
1
|
+
export * from './lib/components/ObjectManager';
|
|
2
2
|
export * from './lib/components/WarningsModuleProvider';
|
|
3
|
+
export * from './lib/components/DrawingTool';
|
|
4
|
+
export * from './lib/components/DrawingToolForm';
|
|
3
5
|
export * from './lib/store/config';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const DrawingToolDockedLight: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
parameters: {
|
|
9
|
+
zeplinLink: {
|
|
10
|
+
name: string;
|
|
11
|
+
link: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
storyName: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const DrawingToolDockedDark: {
|
|
17
|
+
(): React.ReactElement;
|
|
18
|
+
parameters: {
|
|
19
|
+
zeplinLink: {
|
|
20
|
+
name: string;
|
|
21
|
+
link: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
storyName: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const DrawingToolErrorLight: {
|
|
27
|
+
(): React.ReactElement;
|
|
28
|
+
parameters: {
|
|
29
|
+
zeplinLink: {
|
|
30
|
+
name: string;
|
|
31
|
+
link: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
3
|
+
export declare const getDialogType: (mapId: string, 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;
|
|
@@ -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 DrawingToolConnectLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
parameters: {
|
|
9
9
|
zeplinLink: {
|
|
@@ -13,7 +13,7 @@ export declare const AreaManagerConnectLight: {
|
|
|
13
13
|
};
|
|
14
14
|
storyName: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const DrawingToolConnectDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
18
|
parameters: {
|
|
19
19
|
zeplinLink: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HeaderSize, DialogPosition, DialogSize } from '@opengeoweb/shared';
|
|
3
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
4
|
+
interface DrawingToolDialogProps {
|
|
5
|
+
bounds?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onMouseDown?: () => void;
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
order?: number;
|
|
11
|
+
source?: uiTypes.Source;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
isDocked?: boolean;
|
|
14
|
+
size?: DialogSize;
|
|
15
|
+
startPosition?: DialogPosition;
|
|
16
|
+
setFocused?: (focused: boolean) => void;
|
|
17
|
+
headerSize?: HeaderSize;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const DrawingTool: React.FC<DrawingToolDialogProps>;
|
|
21
|
+
export default DrawingTool;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
3
|
+
interface DrawingToolMapButtonConnectProps {
|
|
4
|
+
mapId: string;
|
|
5
|
+
source?: uiTypes.Source;
|
|
6
|
+
}
|
|
7
|
+
declare const DrawingToolMapButtonConnect: React.FC<DrawingToolMapButtonConnectProps>;
|
|
8
|
+
export default DrawingToolMapButtonConnect;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
2
|
+
export declare const objectDialogType = uiTypes.DialogTypes.ObjectManager;
|
|
3
|
+
export declare const drawingDialogType = uiTypes.DialogTypes.DrawingTool;
|
|
4
|
+
export declare const useCloseDrawDialog: ({ mapId, source, }: {
|
|
5
|
+
mapId: string;
|
|
6
|
+
source?: uiTypes.Source | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
closeDrawDialog: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const useCloseObjectDialog: ({ mapId, source, }: {
|
|
11
|
+
mapId: string;
|
|
12
|
+
source?: uiTypes.Source | undefined;
|
|
13
|
+
}) => {
|
|
14
|
+
closeObjectDialog: (shouldReset?: boolean) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const useObjectDrawDialogAction: ({ mapId, source, }: {
|
|
17
|
+
mapId: string;
|
|
18
|
+
source?: uiTypes.Source | undefined;
|
|
19
|
+
}) => {
|
|
20
|
+
openDrawDialog: (geoJSON?: GeoJSON.FeatureCollection) => void;
|
|
21
|
+
closeDrawDialog: () => void;
|
|
22
|
+
openObjectDialog: () => void;
|
|
23
|
+
closeObjectDialog: (shouldReset?: boolean) => void;
|
|
24
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
|
+
import { FeatureCollection, GeoJsonProperties, Geometry } from 'geojson';
|
|
4
|
+
export declare const opacityOptions: number[];
|
|
5
|
+
export declare const getObjectName: (objectName: string) => string;
|
|
6
|
+
export declare const SAVE_OBJECT_BUTTON = "Save new object";
|
|
7
|
+
export declare const UPDATE_OBJECT_BUTTON = "Update object";
|
|
8
|
+
export declare const INPUT_OBJECT = "Object name";
|
|
9
|
+
export declare const INPUT_OPACITY = "Opacity";
|
|
10
|
+
export declare const DRAW_EXIT_MODE_MESSAGE = "press ESC to exit draw mode";
|
|
11
|
+
export declare const coordinatesEmptyMessage = "An object drawing is required";
|
|
12
|
+
export interface DrawingToolFormValues {
|
|
13
|
+
objectName: string;
|
|
14
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DrawingToolFormComponentProps {
|
|
18
|
+
onSubmitForm: (formValues: DrawingToolFormValues) => void;
|
|
19
|
+
objectName?: string;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
error?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
drawModes: DrawMode[];
|
|
24
|
+
onChangeDrawMode: (newMode: DrawMode) => void;
|
|
25
|
+
activeDrawModeId: string;
|
|
26
|
+
onDeactivateTool: () => void;
|
|
27
|
+
isInEditMode: boolean;
|
|
28
|
+
geoJSONProperties: GeoJSON.GeoJsonProperties;
|
|
29
|
+
onChangeProperties: (properties: GeoJSON.GeoJsonProperties) => void;
|
|
30
|
+
onChangeName: (name: string) => void;
|
|
31
|
+
geoJSON: FeatureCollection<Geometry, GeoJsonProperties> | undefined;
|
|
32
|
+
}
|
|
33
|
+
declare const Wrapper: React.FC<DrawingToolFormComponentProps>;
|
|
34
|
+
export { Wrapper as DrawingToolForm };
|
|
35
|
+
export default Wrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const DELETE_TITLE = "Delete object";
|
|
3
|
+
export declare const DELETE_CONFIRM = "Delete";
|
|
4
|
+
export declare const CANCEL = "Cancel";
|
|
5
|
+
export declare const getDeleteDescription: (objectName: string) => string;
|
|
6
|
+
export declare const getDeleteSucces: (objectName: string) => string;
|
|
7
|
+
export declare const ConfirmDeleteDialog: React.FC<{
|
|
8
|
+
objectId: string;
|
|
9
|
+
objectName: string;
|
|
10
|
+
onDeleteSucces: (objectId: string, objectName: string) => void;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
export default ConfirmDeleteDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { DrawingListItem } from '../../store/drawings/types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const NO_OBJECTS_FOUND = "No objects found";
|
|
4
4
|
export declare const Drawings: FC<{
|
|
5
5
|
drawings: DrawingListItem[];
|
|
6
6
|
onClickDrawing: (drawing: DrawingListItem) => void;
|
|
7
|
+
onClickEdit: (drawingId: string) => void;
|
|
8
|
+
onClickDelete: (drawingId: string) => void;
|
|
7
9
|
activeDrawing: string;
|
|
8
10
|
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/lib/components/{AreaManager/AreaManager.d.ts → ObjectManager/ObjectManager.d.ts}
RENAMED
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { HeaderSize } from '@opengeoweb/shared';
|
|
2
|
+
import { HeaderSize, DialogPosition, DialogSize } from '@opengeoweb/shared';
|
|
3
3
|
import { uiTypes } from '@opengeoweb/store';
|
|
4
4
|
import { DrawingListItem } from '../../store/drawings/types';
|
|
5
|
-
export
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
};
|
|
9
|
-
export type Position = {
|
|
10
|
-
top: number;
|
|
11
|
-
left?: number;
|
|
12
|
-
right?: number;
|
|
13
|
-
};
|
|
14
|
-
export declare const calculateStartSize: (minSize: Size, prefSize: Size, startPosition: Position) => Size;
|
|
15
|
-
export declare const AreaManager: React.FC<{
|
|
5
|
+
export declare const ObjectManager: React.FC<{
|
|
16
6
|
bounds?: string;
|
|
17
7
|
title?: string;
|
|
18
8
|
onClose: () => void;
|
|
@@ -20,12 +10,14 @@ export declare const AreaManager: React.FC<{
|
|
|
20
10
|
isOpen: boolean;
|
|
21
11
|
order?: number;
|
|
22
12
|
source?: uiTypes.Source;
|
|
23
|
-
size?:
|
|
24
|
-
startPosition?:
|
|
13
|
+
size?: DialogSize;
|
|
14
|
+
startPosition?: DialogPosition;
|
|
25
15
|
setFocused?: (focused: boolean) => void;
|
|
26
16
|
headerSize?: HeaderSize;
|
|
27
17
|
drawingListItems: DrawingListItem[];
|
|
28
18
|
onClickDrawing?: (drawing: DrawingListItem) => void;
|
|
19
|
+
onEditDrawing?: (drawingId: string) => void;
|
|
20
|
+
onDeleteDrawing?: (drawingId: string) => void;
|
|
29
21
|
activeDrawingId?: string;
|
|
30
22
|
error?: string;
|
|
31
23
|
isLoading?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 ObjectManagerLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
parameters: {
|
|
9
9
|
zeplinLink: {
|
|
@@ -13,7 +13,7 @@ export declare const AreaManagerLight: {
|
|
|
13
13
|
};
|
|
14
14
|
storyName: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const ObjectManagerDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
18
|
parameters: {
|
|
19
19
|
zeplinLink: {
|
|
@@ -23,11 +23,11 @@ export declare const AreaManagerDark: {
|
|
|
23
23
|
};
|
|
24
24
|
storyName: string;
|
|
25
25
|
};
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const ObjectManagerLightNoResults: {
|
|
27
27
|
(): React.ReactElement;
|
|
28
28
|
storyName: string;
|
|
29
29
|
};
|
|
30
|
-
export declare const
|
|
30
|
+
export declare const ObjectManagerDarkNoResults: {
|
|
31
31
|
(): React.ReactElement;
|
|
32
32
|
storyName: string;
|
|
33
33
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const DELETE_TITLE = "Delete object";
|
|
4
|
+
export declare const DELETE_CONFIRM = "Delete";
|
|
5
|
+
export declare const getDeleteDescription: (objectName: string) => string;
|
|
6
|
+
export declare const getDeleteSucces: (objectName: string) => string;
|
|
7
|
+
export declare const ObjectManagerConnect: React.FC<{
|
|
8
|
+
bounds?: string;
|
|
9
|
+
source?: uiTypes.Source;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const ObjectManagerConnectLight: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
parameters: {
|
|
9
|
+
zeplinLink: {
|
|
10
|
+
name: string;
|
|
11
|
+
link: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
storyName: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const ObjectManagerConnectDark: {
|
|
17
|
+
(): React.ReactElement;
|
|
18
|
+
parameters: {
|
|
19
|
+
zeplinLink: {
|
|
20
|
+
name: string;
|
|
21
|
+
link: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
storyName: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DialogPosition, DialogSize, HeaderSize } from '@opengeoweb/shared';
|
|
3
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
4
|
+
export declare const DIALOG_TITLE = "Public warnings";
|
|
5
|
+
export declare const PublicWarnings: React.FC<{
|
|
6
|
+
bounds?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onMouseDown?: () => void;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
order?: number;
|
|
12
|
+
source?: uiTypes.Source;
|
|
13
|
+
size?: DialogSize;
|
|
14
|
+
startPosition?: DialogPosition;
|
|
15
|
+
setFocused?: (focused: boolean) => void;
|
|
16
|
+
headerSize?: HeaderSize;
|
|
17
|
+
}>;
|
|
@@ -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 PublicWarningsLight: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
storyName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const PublicWarningsDark: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
storyName: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { CoreAppStore } from '@opengeoweb/store';
|
|
1
2
|
import drawingSagas from './drawings/sagas';
|
|
3
|
+
import { DrawState } from './drawings/types';
|
|
4
|
+
export interface WarningModuleStore extends CoreAppStore {
|
|
5
|
+
drawings?: DrawState;
|
|
6
|
+
}
|
|
2
7
|
export declare const drawingModuleConfig: {
|
|
3
8
|
id: string;
|
|
4
|
-
reducersMap: {
|
|
9
|
+
reducersMap: {
|
|
10
|
+
drawings: import("redux").Reducer<DrawState, import("redux").AnyAction>;
|
|
11
|
+
};
|
|
5
12
|
sagas: (typeof drawingSagas)[];
|
|
6
13
|
};
|
|
7
14
|
export default drawingModuleConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
|
+
import { DrawItem, DrawState, SetDrawValuesPayload, SubmitDrawValuesPayload } from './types';
|
|
3
|
+
export declare const drawAdapter: import("@reduxjs/toolkit").EntityAdapter<DrawItem>;
|
|
4
|
+
export declare const initialState: DrawState;
|
|
5
|
+
export declare const reducer: import("redux").Reducer<DrawState, import("redux").AnyAction>;
|
|
6
|
+
export declare const drawActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
7
|
+
setDrawValues: (draft: Draft<DrawState>, action: PayloadAction<SetDrawValuesPayload>) => void;
|
|
8
|
+
submitDrawValues: (draft: Draft<DrawState>, action: PayloadAction<SubmitDrawValuesPayload>) => void;
|
|
9
|
+
}, "draw">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
1
2
|
import { SagaIterator } from 'redux-saga';
|
|
2
|
-
|
|
3
|
-
export declare const getSnackbarMessage: (
|
|
4
|
-
export declare
|
|
5
|
-
|
|
3
|
+
import { SubmitDrawValuesPayload } from './types';
|
|
4
|
+
export declare const getSnackbarMessage: (objectName: string, id: string) => string;
|
|
5
|
+
export declare const drawDialogType = uiTypes.DialogTypes.DrawingTool;
|
|
6
|
+
export declare const objectDialogType = uiTypes.DialogTypes.ObjectManager;
|
|
7
|
+
export declare function submitDrawValuesSaga({ payload, }: {
|
|
8
|
+
payload: SubmitDrawValuesPayload;
|
|
6
9
|
}): SagaIterator;
|
|
7
10
|
declare function drawingSaga(): SagaIterator;
|
|
8
11
|
export default drawingSaga;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DrawState } from './types';
|
|
2
|
+
import { WarningModuleStore } from '../config';
|
|
3
|
+
export declare const getDrawStore: (store: WarningModuleStore) => DrawState;
|
|
4
|
+
export declare const selectDrawByInstanceId: (state: WarningModuleStore, id: import("@reduxjs/toolkit").EntityId) => import("./types").DrawItem | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityState } from '@reduxjs/toolkit';
|
|
2
|
+
export interface DrawItem {
|
|
3
|
+
id: string;
|
|
4
|
+
objectName: string;
|
|
5
|
+
drawingInstanceId: string;
|
|
6
|
+
}
|
|
7
|
+
export type DrawState = EntityState<DrawItem>;
|
|
8
|
+
export type DrawingScope = 'user' | 'global';
|
|
2
9
|
export interface DrawingListItem {
|
|
3
10
|
id: string;
|
|
4
|
-
|
|
11
|
+
objectName: string;
|
|
5
12
|
lastUpdatedTime: string;
|
|
6
|
-
scope:
|
|
7
|
-
|
|
13
|
+
scope: DrawingScope;
|
|
14
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
8
15
|
}
|
|
9
16
|
export interface DrawingFromBE extends DrawingListItem {
|
|
10
17
|
username: string;
|
|
@@ -13,3 +20,11 @@ export interface DrawingDetails extends Omit<DrawingFromBE, 'id' | 'lastUpdatedT
|
|
|
13
20
|
id?: string;
|
|
14
21
|
lastUpdatedTime?: string;
|
|
15
22
|
}
|
|
23
|
+
export type SetDrawValuesPayload = DrawItem;
|
|
24
|
+
export type SubmitDrawValuesPayload = {
|
|
25
|
+
id?: string;
|
|
26
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
27
|
+
objectName: string;
|
|
28
|
+
lastUpdatedTime?: string;
|
|
29
|
+
scope: DrawingScope;
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const testGeoJSON: GeoJSON.FeatureCollection;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|