@opengeoweb/warnings 6.0.1 → 6.0.3
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/index.esm.js +3551 -0
- package/package.json +10 -11
- package/src/index.d.ts +3 -1
- package/src/lib/Warnings.stories.d.ts +1 -0
- package/src/lib/components/AreaManager/AreaManager.d.ts +5 -3
- package/src/lib/components/AreaManager/Drawings.d.ts +3 -1
- package/src/lib/components/AreaManager/Drawings.spec.d.ts +1 -0
- package/src/lib/components/Providers/Providers.d.ts +2 -0
- package/src/lib/components/WarningsModuleProvider/WarningsModuleProvider.d.ts +7 -0
- package/src/lib/components/WarningsModuleProvider/index.d.ts +1 -0
- package/src/lib/store/config.d.ts +1 -1
- package/src/lib/store/drawings/sagas.d.ts +5 -0
- package/src/lib/store/drawings/types.d.ts +1 -1
- package/src/lib/utils/api.d.ts +5 -1
- package/src/lib/utils/api.spec.d.ts +1 -0
- package/index.js +0 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,20 +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.3",
|
|
13
|
+
"@opengeoweb/core": "6.0.3",
|
|
14
|
+
"@opengeoweb/shared": "6.0.3",
|
|
15
|
+
"@opengeoweb/store": "6.0.3",
|
|
16
|
+
"@opengeoweb/theme": "6.0.3",
|
|
17
17
|
"@reduxjs/toolkit": "1.9.5",
|
|
18
|
-
"axios": "1.
|
|
18
|
+
"axios": "1.4.0",
|
|
19
19
|
"react": "18.2.0",
|
|
20
|
-
"react-redux": "8.1.
|
|
20
|
+
"react-redux": "8.1.2",
|
|
21
21
|
"redux-saga": "1.2.3"
|
|
22
22
|
},
|
|
23
|
-
"module": "./index.js",
|
|
24
|
-
"main": "./index.js",
|
|
23
|
+
"module": "./index.esm.js",
|
|
25
24
|
"type": "module",
|
|
26
|
-
"
|
|
25
|
+
"main": "./index.esm.js",
|
|
27
26
|
"peerDependencies": {}
|
|
28
27
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ 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
|
|
5
|
+
export type Size = {
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type Position = {
|
|
10
10
|
top: number;
|
|
11
11
|
left?: number;
|
|
12
12
|
right?: number;
|
|
@@ -25,6 +25,8 @@ export declare const AreaManager: React.FC<{
|
|
|
25
25
|
setFocused?: (focused: boolean) => void;
|
|
26
26
|
headerSize?: HeaderSize;
|
|
27
27
|
drawingListItems: DrawingListItem[];
|
|
28
|
-
onClickDrawing?: (drawing: DrawingListItem
|
|
28
|
+
onClickDrawing?: (drawing: DrawingListItem) => void;
|
|
29
29
|
onUnMount?: () => void;
|
|
30
|
+
onEditDrawing?: (drawingId: string) => void;
|
|
31
|
+
activeDrawingId?: string;
|
|
30
32
|
}>;
|
|
@@ -2,5 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { DrawingListItem } from '../../store/drawings/types';
|
|
3
3
|
export declare const Drawings: FC<{
|
|
4
4
|
drawings: DrawingListItem[];
|
|
5
|
-
onClickDrawing: (drawing: DrawingListItem
|
|
5
|
+
onClickDrawing: (drawing: DrawingListItem) => void;
|
|
6
|
+
onClickEdit: (drawingId: string) => void;
|
|
7
|
+
activeDrawing: string;
|
|
6
8
|
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ApiModule } from '@opengeoweb/api';
|
|
3
|
+
interface WarningsModuleProviderProps extends ApiModule {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const WarningsModuleProvider: React.FC<WarningsModuleProviderProps>;
|
|
7
|
+
export default WarningsModuleProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WarningsModuleProvider } from './WarningsModuleProvider';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
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;
|
|
2
4
|
export declare function onOpenUiDialogSaga({ payload }: {
|
|
3
5
|
payload: any;
|
|
4
6
|
}): SagaIterator;
|
|
7
|
+
export declare function submitDrawValuesSaga({ payload }: {
|
|
8
|
+
payload: any;
|
|
9
|
+
}): SagaIterator;
|
|
5
10
|
declare function drawingSaga(): SagaIterator;
|
|
6
11
|
export default drawingSaga;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
|
+
import { AxiosInstance } from 'axios';
|
|
1
3
|
import { DrawingDetails, DrawingFromBE, DrawingListItem } from '../store/drawings/types';
|
|
2
4
|
export declare const API_NAME = "warnings";
|
|
3
|
-
export
|
|
5
|
+
export type WarningsApi = {
|
|
4
6
|
getDrawings: () => Promise<{
|
|
5
7
|
data: DrawingListItem[];
|
|
6
8
|
}>;
|
|
@@ -11,4 +13,6 @@ export declare type WarningsApi = {
|
|
|
11
13
|
saveDrawingAs: (data: DrawingDetails) => Promise<string>;
|
|
12
14
|
deleteDrawing: (drawingId: string) => Promise<void>;
|
|
13
15
|
};
|
|
16
|
+
export declare const getApiRoutes: (axiosInstance: AxiosInstance) => WarningsApi;
|
|
14
17
|
export declare const getWarningsApi: () => WarningsApi;
|
|
18
|
+
export declare const createApi: (props: CreateApiProps) => WarningsApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* *
|
|
2
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
* you may not use this file except in compliance with the License.
|
|
4
|
-
* You may obtain a copy of the License at
|
|
5
|
-
*
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
*
|
|
8
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
* See the License for the specific language governing permissions and
|
|
12
|
-
* limitations under the License.
|
|
13
|
-
*
|
|
14
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
16
|
-
* */
|
|
17
|
-
var TODO_DELETE_THIS_LATER = 'TODO_DELETE_THIS_LATER';
|
|
18
|
-
|
|
19
|
-
export { TODO_DELETE_THIS_LATER };
|