@opengeoweb/warnings 9.11.0 → 9.13.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 +4496 -3101
- package/package.json +1 -1
- package/src/lib/components/DrawingToolForm/DrawingToolForm.d.ts +2 -12
- package/src/lib/components/DrawingToolForm/DrawingToolFormContents.d.ts +34 -0
- package/src/lib/components/PublicWarningList/ConfirmWarningDialog.d.ts +13 -0
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +9 -5
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.d.ts +7 -0
- package/src/lib/store/publicWarningForm/types.d.ts +1 -1
- package/src/lib/components/PublicWarningList/ConfirmDeleteWarningDialog.d.ts +0 -11
- /package/src/lib/components/PublicWarningList/{ConfirmDeleteWarningDialog.spec.d.ts → ConfirmWarningDialog.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
3
|
import { FeatureCollection, GeoJsonProperties, Geometry } from 'geojson';
|
|
4
|
+
import { DrawingToolFormValues } from './DrawingToolFormContents';
|
|
4
5
|
export declare const opacityOptions: number[];
|
|
5
6
|
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
7
|
export interface DrawingToolFormComponentProps {
|
|
18
8
|
onSubmitForm: (formValues: DrawingToolFormValues) => void;
|
|
19
9
|
objectName?: string;
|
|
20
10
|
isLoading?: boolean;
|
|
21
|
-
|
|
11
|
+
dialogError?: string;
|
|
22
12
|
id?: string;
|
|
23
13
|
drawModes: DrawMode[];
|
|
24
14
|
onChangeDrawMode: (newMode: DrawMode) => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectChangeEvent } from '@mui/material';
|
|
3
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
4
|
+
import { FieldErrors, FieldValues } from 'react-hook-form';
|
|
5
|
+
export declare const opacityOptions: number[];
|
|
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 DrawingToolFormContentsProps {
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
dialogError?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
drawModes: DrawMode[];
|
|
22
|
+
activeDrawModeId: string;
|
|
23
|
+
opacity: number;
|
|
24
|
+
isInEditMode: boolean;
|
|
25
|
+
isDirty: boolean;
|
|
26
|
+
errors: FieldErrors<FieldValues>;
|
|
27
|
+
onChangeDrawMode: (newMode: DrawMode) => void;
|
|
28
|
+
onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
29
|
+
onChangeOpacity: (event: SelectChangeEvent) => void;
|
|
30
|
+
onBlurName: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
31
|
+
onSubmit: () => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const DrawingToolFormContentsNoMemo: React.FC<DrawingToolFormContentsProps>;
|
|
34
|
+
export declare const DrawingToolFormContents: React.NamedExoticComponent<DrawingToolFormContentsProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ConfirmDialogProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
request: () => Promise<void>;
|
|
6
|
+
confirmLabel: string;
|
|
7
|
+
callback: (data?: unknown) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const CANCEL = "Go back";
|
|
10
|
+
export declare const ConfirmDeleteWarningDialog: React.FC<{
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
} & ConfirmDialogProps>;
|
|
13
|
+
export default ConfirmDeleteWarningDialog;
|
|
@@ -5,6 +5,7 @@ export declare const CREATE_WARNING = "Create a warning";
|
|
|
5
5
|
export declare const BUTTON_EDIT = "Edit";
|
|
6
6
|
export declare const BUTTON_DELETE = "Delete";
|
|
7
7
|
export declare const BUTTON_USE = "Use";
|
|
8
|
+
export declare const BUTTON_IGNORE = "Ignore";
|
|
8
9
|
export declare const BUTTON_OPTIONS = "Options";
|
|
9
10
|
export declare const getWarningWithoutId: (warning: PublicWarning) => PublicWarning;
|
|
10
11
|
export declare const WarningListColumnContent: React.FC<GridProps & {
|
|
@@ -13,16 +14,19 @@ export declare const WarningListColumnContent: React.FC<GridProps & {
|
|
|
13
14
|
children?: React.ReactNode;
|
|
14
15
|
width?: number;
|
|
15
16
|
}>;
|
|
16
|
-
|
|
17
|
+
interface WarningStatusProps {
|
|
17
18
|
warnings: PublicWarning[];
|
|
19
|
+
onSelectWarning?: (warning: PublicWarning) => void;
|
|
20
|
+
onEditWarning?: (warning: PublicWarning) => void;
|
|
21
|
+
onDeleteWarning?: (warningId: string) => void;
|
|
22
|
+
onIgnoreWarning?: (warning: PublicWarning) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const PublicWarningList: React.FC<{
|
|
18
25
|
isLoading?: boolean;
|
|
19
26
|
error?: Error;
|
|
20
27
|
selectedPublicWarningId?: string;
|
|
21
28
|
lastUpdatedTime?: string;
|
|
22
|
-
onSelectWarning?: (warning: PublicWarning) => void;
|
|
23
|
-
onEditWarning?: (warning: PublicWarning) => void;
|
|
24
29
|
onCreateWarning?: () => void;
|
|
25
|
-
onDeleteWarning?: (warningId: string) => void;
|
|
26
30
|
onRefetchWarnings?: () => void;
|
|
27
|
-
}>;
|
|
31
|
+
} & WarningStatusProps>;
|
|
28
32
|
export default PublicWarningList;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const DELETE_WARNING_SUCCESS_MESSAGE = "Warning has been deleted";
|
|
3
|
+
export declare const DELETE_TITLE = "Delete warning";
|
|
4
|
+
export declare const DELETE_CONFIRM = "Delete";
|
|
5
|
+
export declare const DELETE_DESCRIPTION = "Are you sure you want to delete this warning?";
|
|
6
|
+
export declare const IGNORE_WARNING_SUCCESS_MESSAGE = "Warning has been ignored";
|
|
7
|
+
export declare const IGNORE_TITLE = "Ignore warning";
|
|
8
|
+
export declare const IGNORE_CONFIRM = "Ignore";
|
|
9
|
+
export declare const IGNORE_DESCRIPTION = "Are you sure you want to ignore this warning?";
|
|
3
10
|
export declare const PublicWarningListConnect: React.FC;
|
|
4
11
|
export default PublicWarningListConnect;
|
|
@@ -13,7 +13,7 @@ export interface PublicWarningDetail {
|
|
|
13
13
|
authority?: string;
|
|
14
14
|
type?: number;
|
|
15
15
|
}
|
|
16
|
-
export type PublicWarningStatus = 'DRAFT' | 'PUBLISHED' | 'TODO' | 'EXPIRED';
|
|
16
|
+
export type PublicWarningStatus = 'DRAFT' | 'PUBLISHED' | 'TODO' | 'EXPIRED' | 'IGNORED';
|
|
17
17
|
export interface PublicWarning {
|
|
18
18
|
status?: PublicWarningStatus;
|
|
19
19
|
editor?: string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const DELETE_TITLE = "Delete warning";
|
|
3
|
-
export declare const DELETE_CONFIRM = "Delete";
|
|
4
|
-
export declare const CANCEL = "Go back";
|
|
5
|
-
export declare const getDeleteDescription: () => string;
|
|
6
|
-
export declare const ConfirmDeleteWarningDialog: React.FC<{
|
|
7
|
-
warningId: string;
|
|
8
|
-
onDeleteSucces: (warningId: string) => void;
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
}>;
|
|
11
|
-
export default ConfirmDeleteWarningDialog;
|