@opengeoweb/warnings 9.10.2 → 9.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/warnings",
3
- "version": "9.10.2",
3
+ "version": "9.12.0",
4
4
  "description": "GeoWeb warinings library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -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;
@@ -4,23 +4,29 @@ import { PublicWarning, PublicWarningStatus } from '../../store/publicWarningFor
4
4
  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
+ export declare const BUTTON_USE = "Use";
8
+ export declare const BUTTON_IGNORE = "Ignore";
7
9
  export declare const BUTTON_OPTIONS = "Options";
10
+ export declare const getWarningWithoutId: (warning: PublicWarning) => PublicWarning;
8
11
  export declare const WarningListColumnContent: React.FC<GridProps & {
9
12
  title?: string;
10
13
  status: PublicWarningStatus;
11
14
  children?: React.ReactNode;
12
15
  width?: number;
13
16
  }>;
14
- export declare const PublicWarningList: React.FC<{
17
+ interface WarningStatusProps {
15
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<{
16
25
  isLoading?: boolean;
17
26
  error?: Error;
18
27
  selectedPublicWarningId?: string;
19
28
  lastUpdatedTime?: string;
20
- onSelectWarning?: (warning: PublicWarning) => void;
21
- onEditWarning?: (warning: PublicWarning) => void;
22
29
  onCreateWarning?: () => void;
23
- onDeleteWarning?: (warningId: string) => void;
24
30
  onRefetchWarnings?: () => void;
25
- }>;
31
+ } & WarningStatusProps>;
26
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;
@@ -1,5 +1,5 @@
1
1
  export interface PublicWarningDetail {
2
- id: string;
2
+ id?: string;
3
3
  phenomenon: string;
4
4
  geoJSON: GeoJSON.FeatureCollection;
5
5
  validFrom: string;
@@ -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,5 +1,2 @@
1
- export declare const DATE_FORMAT = "dd/MM/yyyy HH:mm";
2
- export declare const DATE_FORMAT_UTC = "yyyy-MM-dd'T'HH:mm:ss'Z'";
3
1
  export declare const DATE_FORMAT_HEADER = "EEEE, MMMM dd";
4
- export declare const DATE_FORMAT_DATE_FIELDS = "DD/MM/YYYY HH:mm";
5
2
  export declare const DATE_FORMAT_LASTUPDATEDTIME = "HH:mm";
@@ -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;