@opengeoweb/warnings 9.26.0 → 9.27.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 +1008 -389
- package/package.json +5 -2
- package/src/lib/components/AreaObjectLoader/AreasObjects.d.ts +1 -0
- package/src/lib/components/FilterList/FilterList.d.ts +4 -0
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +5 -11
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.published.integration.spec.d.ts +1 -0
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.stories.d.ts +0 -1
- package/src/lib/components/PublicWarningList/WarningListItem.d.ts +25 -0
- package/src/lib/components/PublicWarningList/WarningListItemSeperator.d.ts +8 -0
- package/src/lib/components/PublicWarningsForm/LevelField/LevelField.d.ts +3 -3
- package/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +5 -5
- package/src/lib/store/publicWarningForm/types.d.ts +11 -1
- package/src/lib/store/publicWarnings/types.d.ts +5 -0
- package/src/lib/utils/sig-airmet-util.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.27.0",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"@opengeoweb/shared": "*",
|
|
13
13
|
"@opengeoweb/store": "*",
|
|
14
14
|
"@opengeoweb/webmap-react": "*",
|
|
15
|
+
"@tanstack/react-query": "^5.52.1",
|
|
15
16
|
"react-redux": "^8.1.3",
|
|
16
17
|
"@opengeoweb/theme": "*",
|
|
17
18
|
"@opengeoweb/form-fields": "*",
|
|
@@ -31,7 +32,9 @@
|
|
|
31
32
|
"immer": "^10.0.3"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
|
-
"react": "18"
|
|
35
|
+
"react": "18",
|
|
36
|
+
"@emotion/react": "*",
|
|
37
|
+
"@emotion/styled": "*"
|
|
35
38
|
},
|
|
36
39
|
"module": "./index.esm.js",
|
|
37
40
|
"type": "module",
|
|
@@ -6,6 +6,7 @@ interface ObjectAreaList {
|
|
|
6
6
|
title: string;
|
|
7
7
|
items: DrawingListItem[];
|
|
8
8
|
}
|
|
9
|
+
export declare const useGetFilterHeight: (filterRef?: React.MutableRefObject<HTMLElement>) => number;
|
|
9
10
|
export declare const getListInclHeaders: (items: DrawingListItem[], translateFn: TFunction) => {
|
|
10
11
|
objects: ObjectAreaList;
|
|
11
12
|
areas: ObjectAreaList;
|
|
@@ -4,6 +4,10 @@ interface FilterListProps {
|
|
|
4
4
|
filters?: WarningListFilter[];
|
|
5
5
|
onClickAll?: (isChecked: boolean) => void;
|
|
6
6
|
isAllSelected?: boolean;
|
|
7
|
+
showSigmet?: boolean;
|
|
8
|
+
showAirmet?: boolean;
|
|
9
|
+
setShowSigmet?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
|
+
setShowAirmet?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
7
11
|
}
|
|
8
12
|
declare const FilterList: FC<FilterListProps>;
|
|
9
13
|
export default FilterList;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { GridProps } from '@mui/material';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { PublicWarning
|
|
2
|
+
import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
4
3
|
import { WarningListFilter } from '../../store/publicWarnings/types';
|
|
5
|
-
export declare const getWarningWithLinkedToId: (warning: PublicWarning) => PublicWarning;
|
|
6
|
-
export declare const getWarningWithProposalId: (warning: PublicWarning) => PublicWarning;
|
|
7
|
-
export declare const getWarningWithoutIdStatusEditor: (warning: PublicWarning) => PublicWarning;
|
|
8
|
-
export declare const WarningListColumnContent: React.FC<GridProps & {
|
|
9
|
-
title?: string;
|
|
10
|
-
status: PublicWarningStatus;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
width?: number;
|
|
13
|
-
}>;
|
|
14
4
|
interface WarningStatusProps {
|
|
15
5
|
warnings: PublicWarning[];
|
|
16
6
|
onSelectWarning?: (warning: PublicWarning) => void;
|
|
@@ -28,5 +18,9 @@ export declare const PublicWarningList: React.FC<{
|
|
|
28
18
|
filters?: WarningListFilter[];
|
|
29
19
|
onClickAllChip?: (isChecked: boolean) => void;
|
|
30
20
|
isAllChipSelected?: boolean;
|
|
21
|
+
showSigmet?: boolean;
|
|
22
|
+
showAirmet?: boolean;
|
|
23
|
+
setShowSigmet?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
24
|
+
setShowAirmet?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
31
25
|
} & WarningStatusProps>;
|
|
32
26
|
export default PublicWarningList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,7 +4,6 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const PublicWarningListLight: () => React.ReactElement;
|
|
7
|
-
export declare const PublicWarningListDark: () => React.ReactElement;
|
|
8
7
|
export declare const PublicWarningListError: () => React.ReactElement;
|
|
9
8
|
export declare const PublicWarningListErrorDeleteWarning: () => React.ReactElement;
|
|
10
9
|
export declare const PublicWarningListDifferentEditors: () => React.ReactElement;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { GridProps, ListItemProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PublicWarning, PublicWarningStatus } from '../../store/publicWarningForm/types';
|
|
4
|
+
export interface WarningStatusProps extends ListItemProps {
|
|
5
|
+
warning: PublicWarning;
|
|
6
|
+
onSelectWarning?: (warning: PublicWarning) => void;
|
|
7
|
+
onEditWarning?: (warning: PublicWarning) => void;
|
|
8
|
+
onDeleteWarning?: (warningId: string, warningEditor?: string) => void;
|
|
9
|
+
onDeleteReviewWarning?: (warning: PublicWarning) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const getWarningWithoutIdStatusEditor: (warning: PublicWarning) => PublicWarning;
|
|
12
|
+
export declare const getWarningWithLinkedToId: (warning: PublicWarning) => PublicWarning;
|
|
13
|
+
export declare const getWarningWithProposalId: (warning: PublicWarning) => PublicWarning;
|
|
14
|
+
export declare const WarningListColumnContent: React.FC<GridProps & {
|
|
15
|
+
title?: string;
|
|
16
|
+
status: PublicWarningStatus;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
width?: number;
|
|
19
|
+
}>;
|
|
20
|
+
declare const WarningListItem: React.FC<{
|
|
21
|
+
warning: PublicWarning;
|
|
22
|
+
status: PublicWarningStatus;
|
|
23
|
+
activeWarningId: string;
|
|
24
|
+
} & WarningStatusProps>;
|
|
25
|
+
export default WarningListItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ListItemProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PublicWarningStatus } from '../../store/publicWarningForm/types';
|
|
4
|
+
declare const WarningListItemSeperator: React.FC<{
|
|
5
|
+
totalWarnings: number;
|
|
6
|
+
status: PublicWarningStatus;
|
|
7
|
+
} & ListItemProps>;
|
|
8
|
+
export default WarningListItemSeperator;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { FilterTranslation } from '../../../store/publicWarnings/types';
|
|
2
3
|
export interface LevelColor {
|
|
3
4
|
color: string;
|
|
4
5
|
textColor: string;
|
|
5
6
|
}
|
|
6
|
-
export interface LevelDetails extends LevelColor {
|
|
7
|
-
translationKey: string;
|
|
8
|
-
key: string;
|
|
7
|
+
export interface LevelDetails extends FilterTranslation, LevelColor {
|
|
9
8
|
}
|
|
10
9
|
export declare enum WarningLevel {
|
|
11
10
|
moderate = "moderate",
|
|
@@ -15,6 +14,7 @@ export declare enum WarningLevel {
|
|
|
15
14
|
export declare const LevelColors: Record<WarningLevel, LevelColor>;
|
|
16
15
|
export declare const getLevelStyle: (levelColor?: LevelColor) => React.CSSProperties;
|
|
17
16
|
export declare const levelOptions: LevelDetails[];
|
|
17
|
+
export declare const levelOptionsDict: Record<string, LevelDetails>;
|
|
18
18
|
export declare const LevelField: React.FC<{
|
|
19
19
|
isDisabled?: boolean;
|
|
20
20
|
isReadOnly?: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { FilterTranslation } from '../../../store/publicWarnings/types';
|
|
2
3
|
export declare const getWarningPhenomenaIcon: (key: string) => JSX.Element | undefined;
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const warningPhenomena: PhenomenonDetails[];
|
|
4
|
+
export declare const getAviationPhenomenaIcon: (key: string) => JSX.Element | undefined;
|
|
5
|
+
export declare const warningPhenomena: FilterTranslation[];
|
|
6
|
+
export declare const allPhenomenaDict: Record<string, FilterTranslation>;
|
|
7
|
+
export declare const getPhenomenaIcon: (key: string) => JSX.Element | undefined;
|
|
8
8
|
export declare const Phenomenon: React.FC<{
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
isReadOnly?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProductStatus } from '@opengeoweb/api';
|
|
1
2
|
export interface Area {
|
|
2
3
|
objectName: string;
|
|
3
4
|
geoJSON: GeoJSON.FeatureCollection;
|
|
@@ -19,10 +20,19 @@ export interface PublicWarningDetail {
|
|
|
19
20
|
warning_handle_uuid?: string;
|
|
20
21
|
proposal_id?: string;
|
|
21
22
|
linked_to_id?: string;
|
|
23
|
+
incident?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare enum PublicWarningStatus {
|
|
26
|
+
DRAFT = "DRAFT",
|
|
27
|
+
DRAFT_PUBLISHED = "DRAFT_PUBLISHED",
|
|
28
|
+
PUBLISHED = "PUBLISHED",
|
|
29
|
+
TODO = "TODO",
|
|
30
|
+
EXPIRED = "EXPIRED",
|
|
31
|
+
IGNORED = "IGNORED"
|
|
22
32
|
}
|
|
23
|
-
export type PublicWarningStatus = 'DRAFT' | 'DRAFT_PUBLISHED' | 'PUBLISHED' | 'TODO' | 'EXPIRED' | 'IGNORED';
|
|
24
33
|
export interface PublicWarning {
|
|
25
34
|
status?: PublicWarningStatus;
|
|
35
|
+
productStatus?: ProductStatus;
|
|
26
36
|
editor?: string;
|
|
27
37
|
warningDetail: PublicWarningDetail;
|
|
28
38
|
id?: string;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { EntityState } from '@reduxjs/toolkit';
|
|
2
2
|
import { FilterListItemProps } from '@opengeoweb/shared';
|
|
3
3
|
import { PublicWarning } from '../publicWarningForm/types';
|
|
4
|
+
export interface FilterTranslation {
|
|
5
|
+
translationKey: string;
|
|
6
|
+
key: string;
|
|
7
|
+
isAviation?: boolean;
|
|
8
|
+
}
|
|
4
9
|
export interface WarningListFilter {
|
|
5
10
|
translationKey: string;
|
|
6
11
|
id: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AirmetFromBackend, ProductStatus, SigmetFromBackend } from '@opengeoweb/api';
|
|
2
|
+
import { PublicWarning, PublicWarningStatus } from '../store/publicWarningForm/types';
|
|
3
|
+
export declare const transformAirmetToWarningFormat: (apiAirmet: AirmetFromBackend) => PublicWarning;
|
|
4
|
+
export declare const transformSigmetToWarningFormat: (apiSigmet: SigmetFromBackend) => PublicWarning;
|
|
5
|
+
export declare const mapProductStatusToWarningStatus: (productStatus?: ProductStatus) => PublicWarningStatus;
|