@opengeoweb/warnings 8.2.0 → 8.3.1
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 +688 -354
- package/package.json +14 -13
- package/src/lib/components/DrawingTool/DrawingTool.stories.d.ts +2 -2
- package/src/lib/components/DrawingTool/DrawingToolConnect.d.ts +1 -2
- package/src/lib/components/DrawingTool/DrawingToolDialog.d.ts +0 -1
- package/src/lib/components/ObjectManager/ObjectManager.d.ts +3 -0
- package/src/lib/components/ObjectManager/Objects.d.ts +8 -0
- package/src/lib/components/PublicWarnings/PublicWarnings.d.ts +1 -0
- package/src/lib/components/PublicWarnings/PublicWarningsConnect.d.ts +0 -1
- package/src/lib/components/PublicWarningsForm/AreaField.d.ts +5 -0
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +13 -2
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.stories.d.ts +8 -0
- package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.d.ts +2 -0
- package/src/lib/components/PublicWarningsForm/index.d.ts +1 -0
- package/src/lib/store/config.d.ts +3 -0
- package/src/lib/store/drawings/types.d.ts +14 -1
- package/src/lib/store/publicWarningForm/reducer.d.ts +12 -0
- package/src/lib/store/publicWarningForm/reducer.spec.d.ts +1 -0
- package/src/lib/store/publicWarningForm/selectors.d.ts +8 -0
- package/src/lib/store/publicWarningForm/selectors.spec.d.ts +1 -0
- package/src/lib/store/publicWarningForm/utils.d.ts +2 -0
- package/src/lib/utils/constants.d.ts +2 -0
- /package/src/lib/components/{DrawingToolForm/DrawingToolFormConnect.spec.d.ts → PublicWarningsForm/PublicWarningsFormConnect.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.1",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,21 +9,22 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@mui/material": "5.12.0",
|
|
12
|
-
"@opengeoweb/api": "8.
|
|
13
|
-
"@opengeoweb/core": "8.
|
|
14
|
-
"@opengeoweb/form-fields": "8.
|
|
15
|
-
"@opengeoweb/shared": "8.
|
|
16
|
-
"@opengeoweb/store": "8.
|
|
17
|
-
"@opengeoweb/theme": "8.
|
|
18
|
-
"@opengeoweb/webmap": "8.
|
|
19
|
-
"@opengeoweb/webmap-react": "8.
|
|
20
|
-
"@
|
|
12
|
+
"@opengeoweb/api": "8.3.1",
|
|
13
|
+
"@opengeoweb/core": "8.3.1",
|
|
14
|
+
"@opengeoweb/form-fields": "8.3.1",
|
|
15
|
+
"@opengeoweb/shared": "8.3.1",
|
|
16
|
+
"@opengeoweb/store": "8.3.1",
|
|
17
|
+
"@opengeoweb/theme": "8.3.1",
|
|
18
|
+
"@opengeoweb/webmap": "8.3.1",
|
|
19
|
+
"@opengeoweb/webmap-react": "8.3.1",
|
|
20
|
+
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
21
|
+
"@redux-eggs/saga-extension": "2.2.0",
|
|
22
|
+
"@reduxjs/toolkit": "1.9.7",
|
|
21
23
|
"axios": "1.5.0",
|
|
22
|
-
"immer": "9.0.21",
|
|
23
24
|
"lodash": "4.17.21",
|
|
24
25
|
"react": "18.2.0",
|
|
25
|
-
"react-hook-form": "7.
|
|
26
|
-
"react-redux": "8.1.
|
|
26
|
+
"react-hook-form": "7.47.0",
|
|
27
|
+
"react-redux": "8.1.3",
|
|
27
28
|
"redux-saga": "1.2.3"
|
|
28
29
|
},
|
|
29
30
|
"module": "./index.esm.js",
|
|
@@ -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 DrawingToolLight: {
|
|
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 DrawingToolDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
18
|
parameters: {
|
|
19
19
|
zeplinLink: {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { uiTypes } from '@opengeoweb/store';
|
|
3
|
-
export declare const getDialogType: (mapId: string, isMultiMap: boolean
|
|
3
|
+
export declare const getDialogType: (mapId: string, isMultiMap: boolean) => string;
|
|
4
4
|
interface DrawingToolConnectProps {
|
|
5
5
|
mapId?: string;
|
|
6
6
|
bounds?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
showMapIdInTitle?: boolean;
|
|
9
9
|
isMultiMap?: boolean;
|
|
10
|
-
isDocked?: boolean;
|
|
11
10
|
source?: uiTypes.Source;
|
|
12
11
|
}
|
|
13
12
|
declare const DrawingToolConnect: React.FC<DrawingToolConnectProps>;
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
|
|
3
3
|
import { uiTypes } from '@opengeoweb/store';
|
|
4
4
|
import { DrawingListItem } from '../../store/drawings/types';
|
|
5
|
+
export declare const BUTTON_ADD_OBJECT = "Add a new object";
|
|
5
6
|
export declare const ObjectManager: React.FC<{
|
|
6
7
|
bounds?: string;
|
|
7
8
|
title?: string;
|
|
@@ -18,6 +19,8 @@ export declare const ObjectManager: React.FC<{
|
|
|
18
19
|
onClickDrawing?: (drawing: DrawingListItem) => void;
|
|
19
20
|
onEditDrawing?: (drawingId: string) => void;
|
|
20
21
|
onDeleteDrawing?: (drawingId: string) => void;
|
|
22
|
+
onShareObject?: (object: DrawingListItem) => void;
|
|
23
|
+
onCreateNewObject?: () => void;
|
|
21
24
|
activeDrawingId?: string;
|
|
22
25
|
error?: string;
|
|
23
26
|
isLoading?: boolean;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { DrawingListItem } from '../../store/drawings/types';
|
|
3
3
|
export declare const NO_OBJECTS_FOUND = "No objects found";
|
|
4
|
+
export declare const BUTTON_EDIT = "Edit";
|
|
5
|
+
export declare const BUTTON_DELETE = "Delete";
|
|
6
|
+
export declare const BUTTON_SHARE = "Share";
|
|
7
|
+
export declare const BUTTON_AIRMET = "AIRMET";
|
|
8
|
+
export declare const BUTTON_SIGMET = "SIGMET";
|
|
9
|
+
export declare const BUTTON_PUBLIC_WARNING = "PUBLIC WARNING";
|
|
10
|
+
export declare const MENU_SHARE = "Share object to";
|
|
4
11
|
export declare const Objects: FC<{
|
|
5
12
|
objects: DrawingListItem[];
|
|
6
13
|
onClickObject: (object: DrawingListItem) => void;
|
|
7
14
|
onClickEdit: (objectId: string) => void;
|
|
8
15
|
onClickDelete: (drawingId: string) => void;
|
|
16
|
+
onClickShare: (object: DrawingListItem) => void;
|
|
9
17
|
activeObject: string;
|
|
10
18
|
isLoading?: boolean;
|
|
11
19
|
}>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { uiTypes } from '@opengeoweb/store';
|
|
3
3
|
import { Position } from '@opengeoweb/shared';
|
|
4
|
-
export declare const publicWarningDialogType = uiTypes.DialogTypes.PublicWarnings;
|
|
5
4
|
export declare const PublicWarningsConnect: React.FC<{
|
|
6
5
|
bounds?: string;
|
|
7
6
|
source?: uiTypes.Source;
|
|
@@ -5,10 +5,15 @@ export declare const BUTTON_DELETE = "Delete";
|
|
|
5
5
|
export declare const BUTTON_VIEW = "View";
|
|
6
6
|
export declare const BUTTON_EDIT = "Edit";
|
|
7
7
|
export declare const OBJECTS_MENU = "Object options";
|
|
8
|
+
export declare const NO_OBJECT = "No object selected";
|
|
9
|
+
export declare const formatDate: (lastUpdatedTime: string) => string;
|
|
8
10
|
export declare const AreaField: React.FC<{
|
|
9
11
|
onEditObject: () => void;
|
|
10
12
|
onViewObject: () => void;
|
|
11
13
|
onDeleteObject: () => void;
|
|
12
14
|
onAddObject: () => void;
|
|
13
15
|
isDisabled?: boolean;
|
|
16
|
+
id?: string;
|
|
17
|
+
lastUpdatedTime?: string;
|
|
18
|
+
objectName?: string;
|
|
14
19
|
}>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { BaseDrawingListItem, PublicWarningsFormDataType } from '../../store/drawings/types';
|
|
3
|
+
export declare const getEmptyPublicWarning: (object?: BaseDrawingListItem) => PublicWarningsFormDataType;
|
|
2
4
|
export declare const LABEL_PHENOMENON = "Phenomenon";
|
|
3
5
|
export declare const LABEL_VALID_FROM = "Valid from";
|
|
4
6
|
export declare const LABEL_VALID_UNTIL = "Valid until";
|
|
@@ -6,11 +8,20 @@ export declare const LABEL_CURRENT = "Current";
|
|
|
6
8
|
export declare const LABEL_EARLY = "Early";
|
|
7
9
|
export declare const LABEL_LEVEL = "Level";
|
|
8
10
|
export declare const LABEL_PROBABILITY = "Probability";
|
|
9
|
-
export declare const
|
|
11
|
+
export declare const BUTTON_CLEAR = "Clear";
|
|
10
12
|
export declare const BUTTON_SAVE = "Save";
|
|
11
13
|
export declare const BUTTON_PUBLISH = "Publish";
|
|
14
|
+
export declare const warningPhenomena: {
|
|
15
|
+
title: string;
|
|
16
|
+
key: string;
|
|
17
|
+
icon: React.JSX.Element;
|
|
18
|
+
}[];
|
|
12
19
|
interface FormProps {
|
|
13
20
|
isDisabled?: boolean;
|
|
21
|
+
object?: BaseDrawingListItem;
|
|
14
22
|
}
|
|
15
|
-
|
|
23
|
+
interface PublicWarningsFormProps extends FormProps {
|
|
24
|
+
publicWarningDetails?: PublicWarningsFormDataType;
|
|
25
|
+
}
|
|
26
|
+
export declare const PublicWarningsForm: React.FC<PublicWarningsFormProps>;
|
|
16
27
|
export {};
|
|
@@ -11,3 +11,11 @@ export declare const PublicWarningsFormDemoDark: {
|
|
|
11
11
|
(): React.ReactElement;
|
|
12
12
|
storyName: string;
|
|
13
13
|
};
|
|
14
|
+
export declare const PublicWarningsEmptyFormDemo: {
|
|
15
|
+
(): React.ReactElement;
|
|
16
|
+
storyName: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const PublicWarningsEmptyFormDemoDark: {
|
|
19
|
+
(): React.ReactElement;
|
|
20
|
+
storyName: string;
|
|
21
|
+
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { CoreAppStore } from '@opengeoweb/store';
|
|
2
2
|
import drawingSagas from './drawings/sagas';
|
|
3
3
|
import { DrawState } from './drawings/types';
|
|
4
|
+
import { PublicWarningFormState } from './publicWarningForm/reducer';
|
|
4
5
|
export interface WarningModuleStore extends CoreAppStore {
|
|
5
6
|
drawings?: DrawState;
|
|
7
|
+
publicWarningForm?: PublicWarningFormState;
|
|
6
8
|
}
|
|
7
9
|
export declare const drawingModuleConfig: {
|
|
8
10
|
id: string;
|
|
9
11
|
reducersMap: {
|
|
10
12
|
drawings: import("redux").Reducer<DrawState, import("redux").AnyAction>;
|
|
13
|
+
publicWarningForm: import("redux").Reducer<PublicWarningFormState, import("redux").AnyAction>;
|
|
11
14
|
};
|
|
12
15
|
sagas: (typeof drawingSagas)[];
|
|
13
16
|
};
|
|
@@ -6,10 +6,12 @@ export interface DrawItem {
|
|
|
6
6
|
}
|
|
7
7
|
export type DrawState = EntityState<DrawItem>;
|
|
8
8
|
export type DrawingScope = 'user' | 'global';
|
|
9
|
-
export interface
|
|
9
|
+
export interface BaseDrawingListItem {
|
|
10
10
|
id: string;
|
|
11
11
|
objectName: string;
|
|
12
12
|
lastUpdatedTime: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DrawingListItem extends BaseDrawingListItem {
|
|
13
15
|
scope: DrawingScope;
|
|
14
16
|
geoJSON: GeoJSON.FeatureCollection;
|
|
15
17
|
}
|
|
@@ -28,3 +30,14 @@ export type SubmitDrawValuesPayload = {
|
|
|
28
30
|
lastUpdatedTime?: string;
|
|
29
31
|
scope: DrawingScope;
|
|
30
32
|
};
|
|
33
|
+
export type PublicWarningsFormDataType = {
|
|
34
|
+
phenomenon: string;
|
|
35
|
+
validFrom: string;
|
|
36
|
+
validUntil: string;
|
|
37
|
+
leadtime: string;
|
|
38
|
+
level: string;
|
|
39
|
+
probability: number;
|
|
40
|
+
descriptionOriginal: string;
|
|
41
|
+
descriptionTranslation: string;
|
|
42
|
+
objectId: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
|
+
import { BaseDrawingListItem } from '../drawings/types';
|
|
3
|
+
export interface PublicWarningFormState {
|
|
4
|
+
object?: BaseDrawingListItem;
|
|
5
|
+
}
|
|
6
|
+
export declare const initialState: PublicWarningFormState;
|
|
7
|
+
export declare const reducer: import("redux").Reducer<PublicWarningFormState, import("redux").AnyAction>;
|
|
8
|
+
export declare const publicWarningActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
9
|
+
setFormValues: (draft: Draft<PublicWarningFormState>, action: PayloadAction<{
|
|
10
|
+
object: BaseDrawingListItem;
|
|
11
|
+
}>) => void;
|
|
12
|
+
}, "publicWarningForm">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WarningModuleStore } from '../config';
|
|
2
|
+
import { PublicWarningFormState } from './reducer';
|
|
3
|
+
export declare const getPublicWarningStore: (store: WarningModuleStore) => PublicWarningFormState;
|
|
4
|
+
export declare const getPublicWarningObject: ((state: WarningModuleStore) => import("../drawings/types").BaseDrawingListItem | undefined) & import("reselect").OutputSelectorFields<(args_0: PublicWarningFormState) => import("../drawings/types").BaseDrawingListItem | undefined, {
|
|
5
|
+
clearCache: () => void;
|
|
6
|
+
}> & {
|
|
7
|
+
clearCache: () => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|