@opengeoweb/warnings 6.0.0 → 6.0.2
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.d.ts +1 -0
- package/package.json +10 -10
- package/src/lib/Warnings.stories.d.ts +7 -0
- package/src/lib/components/AreaManager/AreaManager.d.ts +7 -2
- package/src/lib/components/AreaManager/AreaManagerConnect.d.ts +1 -1
- package/src/lib/components/AreaManager/Drawings.d.ts +7 -0
- package/src/lib/components/AreaManager/index.d.ts +2 -0
- package/src/lib/{Providers → components/Providers}/Providers.d.ts +2 -0
- package/src/lib/components/Providers/Providers.spec.d.ts +1 -0
- package/src/lib/store/config.d.ts +7 -0
- package/src/lib/store/drawings/sagas.d.ts +11 -0
- package/src/lib/store/drawings/sagas.spec.d.ts +1 -0
- package/src/lib/store/drawings/types.d.ts +2 -2
- package/src/lib/{store/utils → utils}/api.d.ts +3 -2
- package/src/lib/{store/utils → utils}/fakeApi.d.ts +1 -1
- package/src/lib/utils/fakeApi.spec.d.ts +1 -0
- /package/{index.js → index.esm.js} +0 -0
- /package/src/lib/{Providers/Providers.spec.d.ts → components/AreaManager/AreaManager.spec.d.ts} +0 -0
- /package/src/lib/{store/utils/fakeApi.spec.d.ts → components/AreaManager/AreaManagerConnect.spec.d.ts} +0 -0
package/index.esm.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@mui/material": "5.12.0",
|
|
12
|
-
"@opengeoweb/api": "6.0.
|
|
13
|
-
"@opengeoweb/core": "6.0.
|
|
14
|
-
"@opengeoweb/shared": "6.0.
|
|
15
|
-
"@opengeoweb/store": "6.0.
|
|
16
|
-
"@opengeoweb/theme": "6.0.
|
|
12
|
+
"@opengeoweb/api": "6.0.2",
|
|
13
|
+
"@opengeoweb/core": "6.0.2",
|
|
14
|
+
"@opengeoweb/shared": "6.0.2",
|
|
15
|
+
"@opengeoweb/store": "6.0.2",
|
|
16
|
+
"@opengeoweb/theme": "6.0.2",
|
|
17
17
|
"@reduxjs/toolkit": "1.9.5",
|
|
18
18
|
"axios": "1.4.0",
|
|
19
19
|
"react": "18.2.0",
|
|
20
|
-
"react-redux": "8.1.
|
|
20
|
+
"react-redux": "8.1.2",
|
|
21
|
+
"redux-saga": "1.2.3"
|
|
21
22
|
},
|
|
22
|
-
"module": "./index.js",
|
|
23
|
-
"main": "./index.js",
|
|
23
|
+
"module": "./index.esm.js",
|
|
24
24
|
"type": "module",
|
|
25
|
-
"
|
|
25
|
+
"main": "./index.esm.js",
|
|
26
26
|
"peerDependencies": {}
|
|
27
27
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HeaderSize } from '@opengeoweb/shared';
|
|
3
3
|
import { uiTypes } from '@opengeoweb/store';
|
|
4
|
-
|
|
4
|
+
import { DrawingListItem } from '../../store/drawings/types';
|
|
5
|
+
export type Size = {
|
|
5
6
|
width: number;
|
|
6
7
|
height: number;
|
|
7
8
|
};
|
|
8
|
-
export
|
|
9
|
+
export type Position = {
|
|
9
10
|
top: number;
|
|
10
11
|
left?: number;
|
|
11
12
|
right?: number;
|
|
@@ -23,4 +24,8 @@ export declare const AreaManager: React.FC<{
|
|
|
23
24
|
startPosition?: Position;
|
|
24
25
|
setFocused?: (focused: boolean) => void;
|
|
25
26
|
headerSize?: HeaderSize;
|
|
27
|
+
drawingListItems: DrawingListItem[];
|
|
28
|
+
onClickDrawing?: (drawing: DrawingListItem, isActive: boolean) => void;
|
|
29
|
+
onUnMount?: () => void;
|
|
30
|
+
onEditDrawing?: (drawingId: string) => void;
|
|
26
31
|
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DrawingListItem } from '../../store/drawings/types';
|
|
3
|
+
export declare const Drawings: FC<{
|
|
4
|
+
drawings: DrawingListItem[];
|
|
5
|
+
onClickDrawing: (drawing: DrawingListItem, isActive: boolean) => void;
|
|
6
|
+
onClickEdit: (drawingId: string) => void;
|
|
7
|
+
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Theme } from '@mui/material';
|
|
3
3
|
import { Store } from '@reduxjs/toolkit';
|
|
4
|
+
import { WarningsApi } from '../../utils/api';
|
|
4
5
|
export interface WarningsThemeProviderProps {
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
theme?: Theme;
|
|
@@ -8,5 +9,6 @@ export interface WarningsThemeProviderProps {
|
|
|
8
9
|
export declare const WarningsThemeProvider: React.FC<WarningsThemeProviderProps>;
|
|
9
10
|
export interface WarningsThemeStoreProviderProps extends WarningsThemeProviderProps {
|
|
10
11
|
store?: Store;
|
|
12
|
+
createApi?: () => WarningsApi;
|
|
11
13
|
}
|
|
12
14
|
export declare const WarningsThemeStoreProvider: React.FC<WarningsThemeStoreProviderProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SagaIterator } from 'redux-saga';
|
|
2
|
+
export declare const SUBMIT_ERROR = "Something went wrong saving a drawing";
|
|
3
|
+
export declare const getSnackbarMessage: (areaName: string, id: string) => string;
|
|
4
|
+
export declare function onOpenUiDialogSaga({ payload }: {
|
|
5
|
+
payload: any;
|
|
6
|
+
}): SagaIterator;
|
|
7
|
+
export declare function submitDrawValuesSaga({ payload }: {
|
|
8
|
+
payload: any;
|
|
9
|
+
}): SagaIterator;
|
|
10
|
+
declare function drawingSaga(): SagaIterator;
|
|
11
|
+
export default drawingSaga;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type DrawingScope = 'user';
|
|
2
2
|
export interface DrawingListItem {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
lastUpdatedTime: string;
|
|
6
6
|
scope: DrawingScope;
|
|
7
|
+
area: GeoJSON.FeatureCollection;
|
|
7
8
|
}
|
|
8
9
|
export interface DrawingFromBE extends DrawingListItem {
|
|
9
10
|
username: string;
|
|
10
|
-
area: GeoJSON.FeatureCollection;
|
|
11
11
|
}
|
|
12
12
|
export interface DrawingDetails extends Omit<DrawingFromBE, 'id' | 'lastUpdatedTime'> {
|
|
13
13
|
id?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DrawingDetails, DrawingFromBE, DrawingListItem } from '../drawings/types';
|
|
1
|
+
import { DrawingDetails, DrawingFromBE, DrawingListItem } from '../store/drawings/types';
|
|
2
2
|
export declare const API_NAME = "warnings";
|
|
3
|
-
export
|
|
3
|
+
export type WarningsApi = {
|
|
4
4
|
getDrawings: () => Promise<{
|
|
5
5
|
data: DrawingListItem[];
|
|
6
6
|
}>;
|
|
@@ -11,3 +11,4 @@ export declare type WarningsApi = {
|
|
|
11
11
|
saveDrawingAs: (data: DrawingDetails) => Promise<string>;
|
|
12
12
|
deleteDrawing: (drawingId: string) => Promise<void>;
|
|
13
13
|
};
|
|
14
|
+
export declare const getWarningsApi: () => WarningsApi;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarningsApi } from './api';
|
|
2
|
-
import { DrawingFromBE } from '../drawings/types';
|
|
2
|
+
import { DrawingFromBE } from '../store/drawings/types';
|
|
3
3
|
export declare const ERROR_NOT_FOUND = "Request failed with status code 400";
|
|
4
4
|
export declare const extractDrawingDetailsFromJSON: (drawingId: string) => DrawingFromBE;
|
|
5
5
|
export declare const createApi: () => WarningsApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
/package/src/lib/{Providers/Providers.spec.d.ts → components/AreaManager/AreaManager.spec.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|