@opengeoweb/warnings 9.0.0 → 9.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 +864 -374
- package/package.json +1 -1
- package/src/index.d.ts +1 -1
- package/src/lib/components/ObjectManager/ObjectManager.stories.d.ts +4 -0
- package/src/lib/components/PublicWarningsForm/AreaField.d.ts +1 -4
- package/src/lib/components/PublicWarningsForm/LevelField.d.ts +9 -0
- package/src/lib/components/PublicWarningsForm/Phenomenon.d.ts +8 -0
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +9 -13
- package/src/lib/components/{PublicWarnings/PublicWarnings.d.ts → PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts} +1 -1
- package/src/lib/components/{PublicWarnings/PublicWarnings.stories.d.ts → PublicWarningsFormDialog/PublicWarningsFormDialog.stories.d.ts} +3 -3
- package/src/lib/components/{PublicWarnings/PublicWarningsConnect.d.ts → PublicWarningsFormDialog/PublicWarningsFormDialogConnect.d.ts} +1 -1
- package/src/lib/components/PublicWarningsFormDialog/index.d.ts +2 -0
- package/src/lib/store/drawings/types.d.ts +0 -11
- package/src/lib/store/publicWarningForm/reducer.d.ts +5 -3
- package/src/lib/store/publicWarningForm/selectors.d.ts +1 -1
- package/src/lib/store/publicWarningForm/types.d.ts +15 -0
- package/src/lib/components/PublicWarnings/index.d.ts +0 -2
- /package/src/lib/components/{PublicWarnings/PublicWarnings.spec.d.ts → PublicWarningsFormDialog/PublicWarningsFormDialog.spec.d.ts} +0 -0
- /package/src/lib/components/{PublicWarnings/PublicWarningsConnect.spec.d.ts → PublicWarningsFormDialog/PublicWarningsFormDialogConnect.spec.d.ts} +0 -0
- /package/src/lib/components/{PublicWarnings/PublicWarningsConnect.stories.d.ts → PublicWarningsFormDialog/PublicWarningsFormDialogConnect.stories.d.ts} +0 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export * from './lib/components/ObjectManager';
|
|
|
2
2
|
export * from './lib/components/WarningsModuleProvider';
|
|
3
3
|
export * from './lib/components/DrawingTool';
|
|
4
4
|
export * from './lib/components/DrawingToolForm';
|
|
5
|
-
export * from './lib/components/
|
|
5
|
+
export * from './lib/components/PublicWarningsFormDialog';
|
|
6
6
|
export * from './lib/store/config';
|
|
@@ -5,7 +5,7 @@ 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 = "
|
|
8
|
+
export declare const NO_OBJECT = "(no object selected)";
|
|
9
9
|
export declare const formatDate: (lastUpdatedTime: string) => string;
|
|
10
10
|
export declare const AreaField: React.FC<{
|
|
11
11
|
onEditObject: () => void;
|
|
@@ -13,7 +13,4 @@ export declare const AreaField: React.FC<{
|
|
|
13
13
|
onDeleteObject: () => void;
|
|
14
14
|
onAddObject: () => void;
|
|
15
15
|
isDisabled?: boolean;
|
|
16
|
-
id?: string;
|
|
17
|
-
lastUpdatedTime?: string;
|
|
18
|
-
objectName?: string;
|
|
19
16
|
}>;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
2
|
+
import { PublicWarningDetail } from '../../store/publicWarningForm/types';
|
|
3
|
+
import { DrawingListItem } from '../../store/drawings/types';
|
|
4
|
+
export declare const getEmptyPublicWarning: () => PublicWarningDetail;
|
|
5
|
+
export declare const getFormData: (publicWarningsDetails: PublicWarningDetail | undefined, object?: DrawingListItem) => PublicWarningDetail;
|
|
5
6
|
export declare const LABEL_VALID_FROM = "Valid from";
|
|
6
7
|
export declare const LABEL_VALID_UNTIL = "Valid until";
|
|
7
|
-
export declare const LABEL_CURRENT = "Current";
|
|
8
|
-
export declare const LABEL_EARLY = "Early";
|
|
9
|
-
export declare const LABEL_LEVEL = "Level";
|
|
10
8
|
export declare const LABEL_PROBABILITY = "Probability";
|
|
11
9
|
export declare const BUTTON_CLEAR = "Clear";
|
|
12
10
|
export declare const BUTTON_SAVE = "Save";
|
|
13
11
|
export declare const BUTTON_PUBLISH = "Publish";
|
|
14
|
-
export declare const
|
|
15
|
-
title: string;
|
|
16
|
-
key: string;
|
|
17
|
-
icon: React.JSX.Element;
|
|
18
|
-
}[];
|
|
12
|
+
export declare const dateFormat = "DD/MM/YYYY HH:mm";
|
|
19
13
|
interface FormProps {
|
|
20
14
|
isDisabled?: boolean;
|
|
21
|
-
|
|
15
|
+
onSaveForm?: (formValues: PublicWarningDetail) => void;
|
|
16
|
+
onPublishForm?: (formValues: PublicWarningDetail) => void;
|
|
22
17
|
}
|
|
23
18
|
interface PublicWarningsFormProps extends FormProps {
|
|
24
|
-
publicWarningDetails?:
|
|
19
|
+
publicWarningDetails?: PublicWarningDetail;
|
|
20
|
+
object?: DrawingListItem;
|
|
25
21
|
}
|
|
26
22
|
export declare const PublicWarningsForm: React.FC<PublicWarningsFormProps>;
|
|
27
23
|
export {};
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Position, DraggableSize, HeaderSize } from '@opengeoweb/shared';
|
|
3
3
|
import { uiTypes } from '@opengeoweb/store';
|
|
4
4
|
export declare const DIALOG_TITLE = "Public Warning";
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const PublicWarningsFormDialog: React.FC<{
|
|
6
6
|
bounds?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
onClose: () => void;
|
|
@@ -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 PublicWarningsFormDialogLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
parameters: {
|
|
9
9
|
zeplinLink: {
|
|
@@ -13,7 +13,7 @@ export declare const PublicWarningsLight: {
|
|
|
13
13
|
};
|
|
14
14
|
storyName: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const PublicWarningsFormDialogDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
18
|
parameters: {
|
|
19
19
|
zeplinLink: {
|
|
@@ -23,7 +23,7 @@ export declare const PublicWarningsDark: {
|
|
|
23
23
|
};
|
|
24
24
|
storyName: string;
|
|
25
25
|
};
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const PublicWarningsFormDialogLightBig: {
|
|
27
27
|
(): React.ReactElement;
|
|
28
28
|
storyName: string;
|
|
29
29
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { uiTypes } from '@opengeoweb/store';
|
|
3
3
|
import { Position } from '@opengeoweb/shared';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const PublicWarningsFormDialogConnect: React.FC<{
|
|
5
5
|
bounds?: string;
|
|
6
6
|
source?: uiTypes.Source;
|
|
7
7
|
startPosition?: Position;
|
|
@@ -30,14 +30,3 @@ export type SubmitDrawValuesPayload = {
|
|
|
30
30
|
lastUpdatedTime?: string;
|
|
31
31
|
scope: DrawingScope;
|
|
32
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
|
-
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { DrawingListItem } from '../drawings/types';
|
|
3
|
+
import { PublicWarning } from './types';
|
|
3
4
|
export interface PublicWarningFormState {
|
|
4
|
-
object?:
|
|
5
|
+
object?: DrawingListItem;
|
|
6
|
+
publicWarning?: PublicWarning;
|
|
5
7
|
}
|
|
6
8
|
export declare const initialState: PublicWarningFormState;
|
|
7
9
|
export declare const reducer: import("redux").Reducer<PublicWarningFormState, import("redux").AnyAction>;
|
|
8
10
|
export declare const publicWarningActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
9
11
|
setFormValues: (draft: Draft<PublicWarningFormState>, action: PayloadAction<{
|
|
10
|
-
object:
|
|
12
|
+
object: DrawingListItem;
|
|
11
13
|
}>) => void;
|
|
12
14
|
}, "publicWarningForm">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WarningModuleStore } from '../config';
|
|
2
2
|
import { PublicWarningFormState } from './reducer';
|
|
3
3
|
export declare const getPublicWarningStore: (store: WarningModuleStore) => PublicWarningFormState;
|
|
4
|
-
export declare const getPublicWarningObject: ((state: WarningModuleStore) => import("../drawings/types").
|
|
4
|
+
export declare const getPublicWarningObject: ((state: WarningModuleStore) => import("../drawings/types").DrawingListItem | undefined) & import("reselect").OutputSelectorFields<(args_0: PublicWarningFormState) => import("../drawings/types").DrawingListItem | undefined, {
|
|
5
5
|
clearCache: () => void;
|
|
6
6
|
}> & {
|
|
7
7
|
clearCache: () => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PublicWarningDetail = {
|
|
2
|
+
id: string;
|
|
3
|
+
phenomenon: string;
|
|
4
|
+
geoJSON?: GeoJSON.FeatureCollection;
|
|
5
|
+
validFrom: string;
|
|
6
|
+
validUntil: string;
|
|
7
|
+
level: string;
|
|
8
|
+
probability: number;
|
|
9
|
+
descriptionOriginal: string;
|
|
10
|
+
descriptionTranslation: string;
|
|
11
|
+
};
|
|
12
|
+
export type PublicWarning = {
|
|
13
|
+
status: 'DRAFT' | 'PUBLISH';
|
|
14
|
+
warningDetail: PublicWarningDetail;
|
|
15
|
+
};
|
|
File without changes
|
|
File without changes
|