@opengeoweb/warnings 19.1.0 → 19.2.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/dist/README.md +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +16737 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/lib/api/api-utils.d.ts +12 -0
- package/dist/src/lib/api/aviation-api/api.d.ts +23 -0
- package/dist/src/lib/api/aviation-api/errorHandling.d.ts +1 -0
- package/dist/src/lib/api/aviation-api/fakeApi.d.ts +8 -0
- package/dist/src/lib/api/aviation-api/hooks.d.ts +43 -0
- package/dist/src/lib/api/aviation-api/queryOptions.d.ts +68 -0
- package/dist/src/lib/api/warning-api/api.d.ts +19 -0
- package/dist/src/lib/api/warning-api/hooks.d.ts +58 -0
- package/dist/src/lib/components/AreaObjectLoader/AreaObjectFilter.d.ts +9 -0
- package/dist/src/lib/components/AreaObjectLoader/AreaObjectLoader.d.ts +28 -0
- package/dist/src/lib/components/AreaObjectLoader/AreaObjectLoaderConnect.d.ts +6 -0
- package/dist/src/lib/components/AreaObjectLoader/AreasObjects.d.ts +28 -0
- package/dist/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +22 -0
- package/dist/src/lib/components/ComponentsLookUp/index.d.ts +1 -0
- package/dist/src/lib/components/DrawingTool/DrawingToolConnect.d.ts +16 -0
- package/dist/src/lib/components/DrawingTool/DrawingToolDialog.d.ts +19 -0
- package/dist/src/lib/components/DrawingTool/DrawingToolMapButtonConnect.d.ts +8 -0
- package/dist/src/lib/components/DrawingTool/index.d.ts +3 -0
- package/dist/src/lib/components/DrawingTool/useObjectDrawDialogAction.d.ts +25 -0
- package/dist/src/lib/components/DrawingToolForm/DrawingToolForm.d.ts +26 -0
- package/dist/src/lib/components/DrawingToolForm/DrawingToolFormConnect.d.ts +2 -0
- package/dist/src/lib/components/DrawingToolForm/DrawingToolFormContents.d.ts +28 -0
- package/dist/src/lib/components/DrawingToolForm/index.d.ts +2 -0
- package/dist/src/lib/components/FilterList/ExpandableFilterChip.d.ts +9 -0
- package/dist/src/lib/components/FilterList/FilterList.d.ts +13 -0
- package/dist/src/lib/components/FilterList/TimeFilterChip.d.ts +7 -0
- package/dist/src/lib/components/FilterList/filter-hooks.d.ts +31 -0
- package/dist/src/lib/components/FilterList/filter-styles.d.ts +2 -0
- package/dist/src/lib/components/FilterList/filter-utils.d.ts +111 -0
- package/dist/src/lib/components/MaritimeWarningsForm/AreaList/AreaList.d.ts +11 -0
- package/dist/src/lib/components/MaritimeWarningsForm/AreaList/index.d.ts +1 -0
- package/dist/src/lib/components/MaritimeWarningsForm/AssignedAreas/AssignedAreas.d.ts +13 -0
- package/dist/src/lib/components/MaritimeWarningsForm/MaritimeWarningsAvatar.d.ts +8 -0
- package/dist/src/lib/components/MaritimeWarningsForm/MaritimeWarningsForm.d.ts +34 -0
- package/dist/src/lib/components/MaritimeWarningsForm/MaritimeWarningsFormConnect.d.ts +8 -0
- package/dist/src/lib/components/MaritimeWarningsForm/WarningList/WarningList.d.ts +19 -0
- package/dist/src/lib/components/MaritimeWarningsForm/WarningList/WarningListDragHandle.d.ts +2 -0
- package/dist/src/lib/components/MaritimeWarningsForm/WarningList/WarningListItem.d.ts +18 -0
- package/dist/src/lib/components/MaritimeWarningsForm/WarningList/WarningListSelect.d.ts +21 -0
- package/dist/src/lib/components/MaritimeWarningsForm/WarningList/WindForceSelect.d.ts +24 -0
- package/dist/src/lib/components/MaritimeWarningsForm/index.d.ts +1 -0
- package/dist/src/lib/components/MaritimeWarningsForm/testUtils.d.ts +3 -0
- package/dist/src/lib/components/MaritimeWarningsForm/types.d.ts +51 -0
- package/dist/src/lib/components/MaritimeWarningsForm/useConfirmDeleteDialog.d.ts +12 -0
- package/dist/src/lib/components/MaritimeWarningsForm/useFilterChipSelect.d.ts +12 -0
- package/dist/src/lib/components/MaritimeWarningsForm/useMaritimeWarningsFormState.d.ts +63 -0
- package/dist/src/lib/components/MaritimeWarningsForm/utils.d.ts +7 -0
- package/dist/src/lib/components/ObjectManager/Areas.d.ts +13 -0
- package/dist/src/lib/components/ObjectManager/ConfirmDeleteDialog.d.ts +10 -0
- package/dist/src/lib/components/ObjectManager/ObjectManager.d.ts +33 -0
- package/dist/src/lib/components/ObjectManager/ObjectManagerConnect.d.ts +6 -0
- package/dist/src/lib/components/ObjectManager/ObjectManagerMapButtonConnect.d.ts +6 -0
- package/dist/src/lib/components/ObjectManager/Objects.d.ts +29 -0
- package/dist/src/lib/components/ObjectManager/index.d.ts +2 -0
- package/dist/src/lib/components/Providers/Providers.d.ts +29 -0
- package/dist/src/lib/components/PublicWarningList/ConfirmWarningDialog.d.ts +14 -0
- package/dist/src/lib/components/PublicWarningList/NewWarningButton/NewWarningButton.d.ts +9 -0
- package/dist/src/lib/components/PublicWarningList/PublicWarningList.d.ts +32 -0
- package/dist/src/lib/components/PublicWarningList/PublicWarningListConnect.d.ts +10 -0
- package/dist/src/lib/components/PublicWarningList/SelectAllButton/SelectAllButton.d.ts +9 -0
- package/dist/src/lib/components/PublicWarningList/SelectAllButton/index.d.ts +2 -0
- package/dist/src/lib/components/PublicWarningList/SelectAllButton/selectAllButtonUtils.d.ts +7 -0
- package/dist/src/lib/components/PublicWarningList/WarningListColumnContent.d.ts +10 -0
- package/dist/src/lib/components/PublicWarningList/WarningListHeaderContent.d.ts +11 -0
- package/dist/src/lib/components/PublicWarningList/WarningListItem.d.ts +18 -0
- package/dist/src/lib/components/PublicWarningList/WarningListItemMenu.d.ts +21 -0
- package/dist/src/lib/components/PublicWarningList/WarningListItemSeperator.d.ts +11 -0
- package/dist/src/lib/components/PublicWarningList/index.d.ts +2 -0
- package/dist/src/lib/components/PublicWarningsForm/AreaField/AreaField.d.ts +10 -0
- package/dist/src/lib/components/PublicWarningsForm/AreaField/index.d.ts +1 -0
- package/dist/src/lib/components/PublicWarningsForm/DescriptionField/DescriptionField.d.ts +5 -0
- package/dist/src/lib/components/PublicWarningsForm/DescriptionField/index.d.ts +1 -0
- package/dist/src/lib/components/PublicWarningsForm/LevelField/LevelField.d.ts +22 -0
- package/dist/src/lib/components/PublicWarningsForm/LevelField/index.d.ts +1 -0
- package/dist/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +11 -0
- package/dist/src/lib/components/PublicWarningsForm/PhenomenonField/index.d.ts +1 -0
- package/dist/src/lib/components/PublicWarningsForm/ProbabilityField/ProbabilityField.d.ts +7 -0
- package/dist/src/lib/components/PublicWarningsForm/ProbabilityField/index.d.ts +1 -0
- package/dist/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +52 -0
- package/dist/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.d.ts +14 -0
- package/dist/src/lib/components/PublicWarningsForm/ValidFromField/ValidFromField.d.ts +19 -0
- package/dist/src/lib/components/PublicWarningsForm/ValidFromField/index.d.ts +1 -0
- package/dist/src/lib/components/PublicWarningsForm/ValidUntilField/ValidUntilField.d.ts +11 -0
- package/dist/src/lib/components/PublicWarningsForm/ValidUntilField/index.d.ts +1 -0
- package/dist/src/lib/components/PublicWarningsForm/index.d.ts +2 -0
- package/dist/src/lib/components/PublicWarningsForm/usePublicWarningMapDraw.d.ts +16 -0
- package/dist/src/lib/components/PublicWarningsFormDialog/AviationWarningCancelDialogContent.d.ts +9 -0
- package/dist/src/lib/components/PublicWarningsFormDialog/CancelAviationConfirmDialog.d.ts +21 -0
- package/dist/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts +25 -0
- package/dist/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialogConnect.d.ts +13 -0
- package/dist/src/lib/components/PublicWarningsFormDialog/WarningsAvatar.d.ts +9 -0
- package/dist/src/lib/components/PublicWarningsFormDialog/index.d.ts +2 -0
- package/dist/src/lib/components/WarningsMapView/WarningsMapView.d.ts +11 -0
- package/dist/src/lib/components/WarningsTimeline/WarningBlock.d.ts +12 -0
- package/dist/src/lib/components/WarningsTimeline/WarningsTimeline.d.ts +8 -0
- package/dist/src/lib/components/WarningsTimeline/WarningsTimelineConnect.d.ts +5 -0
- package/dist/src/lib/components/WarningsTimeline/WarningsTimelineLayers.d.ts +33 -0
- package/dist/src/lib/components/WarningsTimeline/index.d.ts +4 -0
- package/dist/src/lib/components/WarningsTimeline/warningBlockColors.d.ts +16 -0
- package/dist/src/lib/components/WarningsTimeline/warningsTimelineUtils.d.ts +19 -0
- package/dist/src/lib/store/index.d.ts +4 -0
- package/dist/src/lib/store/store.d.ts +7 -0
- package/dist/src/lib/store/types.d.ts +9 -0
- package/dist/src/lib/store/warningsDrawings/index.d.ts +1 -0
- package/dist/src/lib/store/warningsDrawings/reducer.d.ts +12 -0
- package/dist/src/lib/store/warningsDrawings/selectors.d.ts +45 -0
- package/dist/src/lib/store/warningsDrawings/types.d.ts +39 -0
- package/dist/src/lib/store/warningsDrawings/utils.d.ts +4 -0
- package/dist/src/lib/store/warningsFilters/index.d.ts +1 -0
- package/dist/src/lib/store/warningsFilters/reducer.d.ts +30 -0
- package/dist/src/lib/store/warningsFilters/selectors.d.ts +192 -0
- package/dist/src/lib/store/warningsFilters/types.d.ts +17 -0
- package/dist/src/lib/store/warningsForm/index.d.ts +2 -0
- package/dist/src/lib/store/warningsForm/listener.d.ts +2 -0
- package/dist/src/lib/store/warningsForm/reducer.d.ts +53 -0
- package/dist/src/lib/store/warningsForm/selectors.d.ts +192 -0
- package/dist/src/lib/store/warningsForm/types.d.ts +73 -0
- package/dist/src/lib/store/warningsForm/utils.d.ts +2 -0
- package/dist/src/lib/storybookUtils/SimpleLinkMenu.d.ts +6 -0
- package/dist/src/lib/storybookUtils/defaultStorySettings.d.ts +18 -0
- package/dist/src/lib/storybookUtils/storyComponents.d.ts +5 -0
- package/dist/src/lib/storybookUtils/testUtils.d.ts +11 -0
- package/dist/src/lib/utils/constants.d.ts +2 -0
- package/dist/src/lib/utils/fakeApi/index.d.ts +21 -0
- package/dist/src/lib/utils/fakeSigmetAirmet.d.ts +3 -0
- package/dist/src/lib/utils/i18n.d.ts +7 -0
- package/dist/src/lib/utils/sig-airmet-util.d.ts +20 -0
- package/dist/src/lib/utils/useFormDirty.d.ts +7 -0
- package/dist/src/lib/utils/warningUtils.d.ts +18 -0
- package/package.json +2 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { EntityState } from '@reduxjs/toolkit';
|
|
2
|
+
export interface DrawItem {
|
|
3
|
+
id: string;
|
|
4
|
+
objectName: string;
|
|
5
|
+
drawingInstanceId: string;
|
|
6
|
+
isFormDirty?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type DrawState = EntityState<DrawItem, string>;
|
|
9
|
+
export type DrawingScope = 'user' | 'global';
|
|
10
|
+
export interface BaseDrawingListItem {
|
|
11
|
+
id: string;
|
|
12
|
+
objectName: string;
|
|
13
|
+
lastUpdatedTime: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DrawingListItem extends BaseDrawingListItem {
|
|
16
|
+
scope: DrawingScope;
|
|
17
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
18
|
+
keywords?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AreaListItem extends BaseDrawingListItem {
|
|
21
|
+
scope: DrawingScope;
|
|
22
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
23
|
+
keywords?: string;
|
|
24
|
+
aggregationId?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DrawingFromBE extends DrawingListItem {
|
|
27
|
+
username: string;
|
|
28
|
+
}
|
|
29
|
+
export interface DrawingDetails extends Omit<DrawingFromBE, 'id' | 'lastUpdatedTime'> {
|
|
30
|
+
id?: string;
|
|
31
|
+
lastUpdatedTime?: string;
|
|
32
|
+
}
|
|
33
|
+
export type DrawingFromFE = Omit<DrawingDetails, 'username'>;
|
|
34
|
+
export interface FetchDrawingParams {
|
|
35
|
+
keywords?: string;
|
|
36
|
+
search?: string;
|
|
37
|
+
}
|
|
38
|
+
export type SetDrawValuesPayload = DrawItem;
|
|
39
|
+
export type SubmitDrawValuesPayload = DrawingFromFE;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
2
|
+
export declare const objectDialogType = uiTypes.DialogTypes.ObjectManager;
|
|
3
|
+
export declare const drawingDialogType = uiTypes.DialogTypes.DrawingTool;
|
|
4
|
+
export declare const areaObjectLoaderType = uiTypes.DialogTypes.AreaObjectLoader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { warningsFiltersReducer, warningsFiltersActions } from './reducer';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { ExpandedWarningSections, WarningsFiltersState } from './types';
|
|
3
|
+
import type { FilterState } from '../../components/FilterList/filter-hooks';
|
|
4
|
+
export declare const defaultExpandedWarningSections: ExpandedWarningSections;
|
|
5
|
+
export declare const initialWarningFilterPanelState: {
|
|
6
|
+
expandedSections: ExpandedWarningSections;
|
|
7
|
+
hoveredWarningIds: never[];
|
|
8
|
+
source: Record<string, boolean>;
|
|
9
|
+
domain: Record<import("../../components/FilterList/filter-utils").Domain, boolean>;
|
|
10
|
+
phenomenon: Record<string, boolean>;
|
|
11
|
+
level: Record<"unspecified" | import("../../components/FilterList/filter-utils").Level, boolean>;
|
|
12
|
+
time: import("../../components/FilterList/filter-utils").TimeFilter;
|
|
13
|
+
};
|
|
14
|
+
export declare const initialState: WarningsFiltersState;
|
|
15
|
+
export declare const warningsFiltersReducer: import("redux").Reducer<WarningsFiltersState>, warningsFiltersActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
16
|
+
setWarningFilters: (draft: Draft<WarningsFiltersState>, action: PayloadAction<{
|
|
17
|
+
filterState: Partial<FilterState>;
|
|
18
|
+
panelId?: string;
|
|
19
|
+
systemUpdate: boolean;
|
|
20
|
+
}>) => void;
|
|
21
|
+
setExpandedSectionsForPanel: (draft: Draft<WarningsFiltersState>, action: PayloadAction<{
|
|
22
|
+
panelId: string;
|
|
23
|
+
expandedSections: ExpandedWarningSections;
|
|
24
|
+
systemUpdate?: boolean;
|
|
25
|
+
}>) => void;
|
|
26
|
+
setHoveredWarningIdsForPanel: (draft: Draft<WarningsFiltersState>, action: PayloadAction<{
|
|
27
|
+
panelId: string;
|
|
28
|
+
warningIds?: string[];
|
|
29
|
+
}>) => void;
|
|
30
|
+
}, "warningsFilters">;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { FilterState } from '../../components/FilterList/filter-hooks';
|
|
2
|
+
import type { WarningModuleStore } from '../types';
|
|
3
|
+
import type { ExpandedWarningSections, WarningsFilterPanelState, WarningsFiltersState } from './types';
|
|
4
|
+
export declare const getWarningsFilters: (store: WarningModuleStore) => WarningsFiltersState;
|
|
5
|
+
export declare const getWarningsFilterById: ((state: WarningModuleStore, panelId?: string | undefined) => FilterState) & {
|
|
6
|
+
clearCache: () => void;
|
|
7
|
+
resultsCount: () => number;
|
|
8
|
+
resetResultsCount: () => void;
|
|
9
|
+
} & {
|
|
10
|
+
resultFunc: (resultFuncArgs_0: WarningsFilterPanelState | undefined) => FilterState;
|
|
11
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFilterPanelState | undefined) => FilterState) & {
|
|
12
|
+
clearCache: () => void;
|
|
13
|
+
resultsCount: () => number;
|
|
14
|
+
resetResultsCount: () => void;
|
|
15
|
+
};
|
|
16
|
+
lastResult: () => FilterState;
|
|
17
|
+
dependencies: [((state: WarningModuleStore, panelId?: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
18
|
+
clearCache: () => void;
|
|
19
|
+
resultsCount: () => number;
|
|
20
|
+
resetResultsCount: () => void;
|
|
21
|
+
} & {
|
|
22
|
+
resultFunc: (resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined;
|
|
23
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
24
|
+
clearCache: () => void;
|
|
25
|
+
resultsCount: () => number;
|
|
26
|
+
resetResultsCount: () => void;
|
|
27
|
+
};
|
|
28
|
+
lastResult: () => WarningsFilterPanelState | undefined;
|
|
29
|
+
dependencies: [(store: WarningModuleStore) => WarningsFiltersState, (_store: WarningModuleStore, panelId?: string) => string | undefined];
|
|
30
|
+
recomputations: () => number;
|
|
31
|
+
resetRecomputations: () => void;
|
|
32
|
+
dependencyRecomputations: () => number;
|
|
33
|
+
resetDependencyRecomputations: () => void;
|
|
34
|
+
} & {
|
|
35
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
36
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
37
|
+
}];
|
|
38
|
+
recomputations: () => number;
|
|
39
|
+
resetRecomputations: () => void;
|
|
40
|
+
dependencyRecomputations: () => number;
|
|
41
|
+
resetDependencyRecomputations: () => void;
|
|
42
|
+
} & {
|
|
43
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
44
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
45
|
+
};
|
|
46
|
+
export declare const getExpandedSectionsByPanelId: ((state: WarningModuleStore, panelId?: string | undefined) => ExpandedWarningSections) & {
|
|
47
|
+
clearCache: () => void;
|
|
48
|
+
resultsCount: () => number;
|
|
49
|
+
resetResultsCount: () => void;
|
|
50
|
+
} & {
|
|
51
|
+
resultFunc: (resultFuncArgs_0: WarningsFilterPanelState | undefined) => ExpandedWarningSections;
|
|
52
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFilterPanelState | undefined) => ExpandedWarningSections) & {
|
|
53
|
+
clearCache: () => void;
|
|
54
|
+
resultsCount: () => number;
|
|
55
|
+
resetResultsCount: () => void;
|
|
56
|
+
};
|
|
57
|
+
lastResult: () => ExpandedWarningSections;
|
|
58
|
+
dependencies: [((state: WarningModuleStore, panelId?: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
59
|
+
clearCache: () => void;
|
|
60
|
+
resultsCount: () => number;
|
|
61
|
+
resetResultsCount: () => void;
|
|
62
|
+
} & {
|
|
63
|
+
resultFunc: (resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined;
|
|
64
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
65
|
+
clearCache: () => void;
|
|
66
|
+
resultsCount: () => number;
|
|
67
|
+
resetResultsCount: () => void;
|
|
68
|
+
};
|
|
69
|
+
lastResult: () => WarningsFilterPanelState | undefined;
|
|
70
|
+
dependencies: [(store: WarningModuleStore) => WarningsFiltersState, (_store: WarningModuleStore, panelId?: string) => string | undefined];
|
|
71
|
+
recomputations: () => number;
|
|
72
|
+
resetRecomputations: () => void;
|
|
73
|
+
dependencyRecomputations: () => number;
|
|
74
|
+
resetDependencyRecomputations: () => void;
|
|
75
|
+
} & {
|
|
76
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
77
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
78
|
+
}];
|
|
79
|
+
recomputations: () => number;
|
|
80
|
+
resetRecomputations: () => void;
|
|
81
|
+
dependencyRecomputations: () => number;
|
|
82
|
+
resetDependencyRecomputations: () => void;
|
|
83
|
+
} & {
|
|
84
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
85
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
86
|
+
};
|
|
87
|
+
export declare const getHoveredWarningIdsByPanelId: ((state: WarningModuleStore, panelId?: string | undefined) => string[]) & {
|
|
88
|
+
clearCache: () => void;
|
|
89
|
+
resultsCount: () => number;
|
|
90
|
+
resetResultsCount: () => void;
|
|
91
|
+
} & {
|
|
92
|
+
resultFunc: (resultFuncArgs_0: WarningsFilterPanelState | undefined) => string[];
|
|
93
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFilterPanelState | undefined) => string[]) & {
|
|
94
|
+
clearCache: () => void;
|
|
95
|
+
resultsCount: () => number;
|
|
96
|
+
resetResultsCount: () => void;
|
|
97
|
+
};
|
|
98
|
+
lastResult: () => string[];
|
|
99
|
+
dependencies: [((state: WarningModuleStore, panelId?: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
100
|
+
clearCache: () => void;
|
|
101
|
+
resultsCount: () => number;
|
|
102
|
+
resetResultsCount: () => void;
|
|
103
|
+
} & {
|
|
104
|
+
resultFunc: (resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined;
|
|
105
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
106
|
+
clearCache: () => void;
|
|
107
|
+
resultsCount: () => number;
|
|
108
|
+
resetResultsCount: () => void;
|
|
109
|
+
};
|
|
110
|
+
lastResult: () => WarningsFilterPanelState | undefined;
|
|
111
|
+
dependencies: [(store: WarningModuleStore) => WarningsFiltersState, (_store: WarningModuleStore, panelId?: string) => string | undefined];
|
|
112
|
+
recomputations: () => number;
|
|
113
|
+
resetRecomputations: () => void;
|
|
114
|
+
dependencyRecomputations: () => number;
|
|
115
|
+
resetDependencyRecomputations: () => void;
|
|
116
|
+
} & {
|
|
117
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
118
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
119
|
+
}];
|
|
120
|
+
recomputations: () => number;
|
|
121
|
+
resetRecomputations: () => void;
|
|
122
|
+
dependencyRecomputations: () => number;
|
|
123
|
+
resetDependencyRecomputations: () => void;
|
|
124
|
+
} & {
|
|
125
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
126
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
127
|
+
};
|
|
128
|
+
export declare const getWarningsPresetById: ((state: WarningModuleStore, panelId?: string | undefined) => {
|
|
129
|
+
filterState: null;
|
|
130
|
+
expandedSections: null;
|
|
131
|
+
} | {
|
|
132
|
+
filterState: FilterState;
|
|
133
|
+
expandedSections: ExpandedWarningSections;
|
|
134
|
+
}) & {
|
|
135
|
+
clearCache: () => void;
|
|
136
|
+
resultsCount: () => number;
|
|
137
|
+
resetResultsCount: () => void;
|
|
138
|
+
} & {
|
|
139
|
+
resultFunc: (resultFuncArgs_0: WarningsFilterPanelState | undefined) => {
|
|
140
|
+
filterState: null;
|
|
141
|
+
expandedSections: null;
|
|
142
|
+
} | {
|
|
143
|
+
filterState: FilterState;
|
|
144
|
+
expandedSections: ExpandedWarningSections;
|
|
145
|
+
};
|
|
146
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFilterPanelState | undefined) => {
|
|
147
|
+
filterState: null;
|
|
148
|
+
expandedSections: null;
|
|
149
|
+
} | {
|
|
150
|
+
filterState: FilterState;
|
|
151
|
+
expandedSections: ExpandedWarningSections;
|
|
152
|
+
}) & {
|
|
153
|
+
clearCache: () => void;
|
|
154
|
+
resultsCount: () => number;
|
|
155
|
+
resetResultsCount: () => void;
|
|
156
|
+
};
|
|
157
|
+
lastResult: () => {
|
|
158
|
+
filterState: null;
|
|
159
|
+
expandedSections: null;
|
|
160
|
+
} | {
|
|
161
|
+
filterState: FilterState;
|
|
162
|
+
expandedSections: ExpandedWarningSections;
|
|
163
|
+
};
|
|
164
|
+
dependencies: [((state: WarningModuleStore, panelId?: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
165
|
+
clearCache: () => void;
|
|
166
|
+
resultsCount: () => number;
|
|
167
|
+
resetResultsCount: () => void;
|
|
168
|
+
} & {
|
|
169
|
+
resultFunc: (resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined;
|
|
170
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => WarningsFilterPanelState | undefined) & {
|
|
171
|
+
clearCache: () => void;
|
|
172
|
+
resultsCount: () => number;
|
|
173
|
+
resetResultsCount: () => void;
|
|
174
|
+
};
|
|
175
|
+
lastResult: () => WarningsFilterPanelState | undefined;
|
|
176
|
+
dependencies: [(store: WarningModuleStore) => WarningsFiltersState, (_store: WarningModuleStore, panelId?: string) => string | undefined];
|
|
177
|
+
recomputations: () => number;
|
|
178
|
+
resetRecomputations: () => void;
|
|
179
|
+
dependencyRecomputations: () => number;
|
|
180
|
+
resetDependencyRecomputations: () => void;
|
|
181
|
+
} & {
|
|
182
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
183
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
184
|
+
}];
|
|
185
|
+
recomputations: () => number;
|
|
186
|
+
resetRecomputations: () => void;
|
|
187
|
+
dependencyRecomputations: () => number;
|
|
188
|
+
resetDependencyRecomputations: () => void;
|
|
189
|
+
} & {
|
|
190
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
191
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
192
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FilterState } from '../../components/FilterList/filter-hooks';
|
|
2
|
+
export interface FilterTranslation {
|
|
3
|
+
translationKey: string;
|
|
4
|
+
key: string;
|
|
5
|
+
isAviation?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ExpandedWarningSections extends Record<string, boolean> {
|
|
8
|
+
TODO: boolean;
|
|
9
|
+
DRAFT: boolean;
|
|
10
|
+
PUBLISHED: boolean;
|
|
11
|
+
EXPIRED: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface WarningsFilterPanelState extends FilterState {
|
|
14
|
+
expandedSections: ExpandedWarningSections;
|
|
15
|
+
hoveredWarningIds: string[];
|
|
16
|
+
}
|
|
17
|
+
export type WarningsFiltersState = Record<string, WarningsFilterPanelState>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AlertColor } from '@mui/material';
|
|
2
|
+
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
3
|
+
import type { Area, Warning, WarningType } from './types';
|
|
4
|
+
import type { WarningLevel } from '../../components/PublicWarningsForm/LevelField';
|
|
5
|
+
import type { DrawingListItem } from '../warningsDrawings/types';
|
|
6
|
+
export type FormAction = '' | 'saving' | 'publishing' | 'readonly' | 'edit' | 'amending' | 'cancel';
|
|
7
|
+
export interface FormError {
|
|
8
|
+
severity?: AlertColor;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface WarningFormState {
|
|
12
|
+
object?: DrawingListItem;
|
|
13
|
+
warning?: Warning;
|
|
14
|
+
formState?: FormAction;
|
|
15
|
+
error?: FormError;
|
|
16
|
+
selectedWarningId?: string;
|
|
17
|
+
isFormDirty?: boolean;
|
|
18
|
+
warningType?: WarningType;
|
|
19
|
+
panelId?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const TAKEOVER_MESSAGE = "You are no longer the editor of this warning";
|
|
22
|
+
export declare const initialState: WarningFormState;
|
|
23
|
+
export declare const warningsFormReducer: import("redux").Reducer<WarningFormState>, warningsFormActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
24
|
+
setFormValues: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
25
|
+
object?: DrawingListItem;
|
|
26
|
+
warning?: Warning;
|
|
27
|
+
formState?: FormAction;
|
|
28
|
+
}>) => void;
|
|
29
|
+
addArea: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
30
|
+
area: Area;
|
|
31
|
+
}>) => void;
|
|
32
|
+
removeArea: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
33
|
+
area: Area;
|
|
34
|
+
}>) => void;
|
|
35
|
+
removeAllAreas: (draft: Draft<WarningFormState>) => void;
|
|
36
|
+
openPublicWarningFormDialog: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
37
|
+
object?: DrawingListItem;
|
|
38
|
+
formState?: FormAction;
|
|
39
|
+
warning?: Warning;
|
|
40
|
+
warningType?: WarningType;
|
|
41
|
+
panelId?: string;
|
|
42
|
+
}>) => void;
|
|
43
|
+
setFormError: (draft: Draft<WarningFormState>, action: PayloadAction<FormError>) => void;
|
|
44
|
+
removeFormError: (draft: Draft<WarningFormState>) => void;
|
|
45
|
+
setFormDirty: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
46
|
+
isFormDirty: boolean;
|
|
47
|
+
}>) => void;
|
|
48
|
+
setEditMode: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
49
|
+
warningId: string;
|
|
50
|
+
}>) => void;
|
|
51
|
+
setSelectedWarningId: (draft: Draft<WarningFormState>, action: PayloadAction<string>) => void;
|
|
52
|
+
setWarningLevel: (draft: Draft<WarningFormState>, action: PayloadAction<WarningLevel | "">) => void;
|
|
53
|
+
}, "warningsForm">;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { WarningModuleStore } from '../types';
|
|
2
|
+
import type { WarningFormState } from './reducer';
|
|
3
|
+
export declare const selectWarningsFormState: (store: WarningModuleStore) => WarningFormState;
|
|
4
|
+
export declare const getPublicWarning: ((state: WarningModuleStore) => import("./types").Warning | undefined) & {
|
|
5
|
+
clearCache: () => void;
|
|
6
|
+
resultsCount: () => number;
|
|
7
|
+
resetResultsCount: () => void;
|
|
8
|
+
} & {
|
|
9
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => import("./types").Warning | undefined;
|
|
10
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => import("./types").Warning | undefined) & {
|
|
11
|
+
clearCache: () => void;
|
|
12
|
+
resultsCount: () => number;
|
|
13
|
+
resetResultsCount: () => void;
|
|
14
|
+
};
|
|
15
|
+
lastResult: () => import("./types").Warning | undefined;
|
|
16
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
17
|
+
recomputations: () => number;
|
|
18
|
+
resetRecomputations: () => void;
|
|
19
|
+
dependencyRecomputations: () => number;
|
|
20
|
+
resetDependencyRecomputations: () => void;
|
|
21
|
+
} & {
|
|
22
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
23
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
24
|
+
};
|
|
25
|
+
export declare const getPublicWarningStatus: ((state: WarningModuleStore) => import("./types").PublicWarningStatus | undefined) & {
|
|
26
|
+
clearCache: () => void;
|
|
27
|
+
resultsCount: () => number;
|
|
28
|
+
resetResultsCount: () => void;
|
|
29
|
+
} & {
|
|
30
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => import("./types").PublicWarningStatus | undefined;
|
|
31
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => import("./types").PublicWarningStatus | undefined) & {
|
|
32
|
+
clearCache: () => void;
|
|
33
|
+
resultsCount: () => number;
|
|
34
|
+
resetResultsCount: () => void;
|
|
35
|
+
};
|
|
36
|
+
lastResult: () => import("./types").PublicWarningStatus | undefined;
|
|
37
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
38
|
+
recomputations: () => number;
|
|
39
|
+
resetRecomputations: () => void;
|
|
40
|
+
dependencyRecomputations: () => number;
|
|
41
|
+
resetDependencyRecomputations: () => void;
|
|
42
|
+
} & {
|
|
43
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
44
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
45
|
+
};
|
|
46
|
+
export declare const getPublicWarningId: ((state: WarningModuleStore) => string | undefined) & {
|
|
47
|
+
clearCache: () => void;
|
|
48
|
+
resultsCount: () => number;
|
|
49
|
+
resetResultsCount: () => void;
|
|
50
|
+
} & {
|
|
51
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => string | undefined;
|
|
52
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => string | undefined) & {
|
|
53
|
+
clearCache: () => void;
|
|
54
|
+
resultsCount: () => number;
|
|
55
|
+
resetResultsCount: () => void;
|
|
56
|
+
};
|
|
57
|
+
lastResult: () => string | undefined;
|
|
58
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
59
|
+
recomputations: () => number;
|
|
60
|
+
resetRecomputations: () => void;
|
|
61
|
+
dependencyRecomputations: () => number;
|
|
62
|
+
resetDependencyRecomputations: () => void;
|
|
63
|
+
} & {
|
|
64
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
65
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
66
|
+
};
|
|
67
|
+
export declare const getPublicWarningAreas: ((state: WarningModuleStore) => import("./types").Area[]) & {
|
|
68
|
+
clearCache: () => void;
|
|
69
|
+
resultsCount: () => number;
|
|
70
|
+
resetResultsCount: () => void;
|
|
71
|
+
} & {
|
|
72
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => import("./types").Area[];
|
|
73
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => import("./types").Area[]) & {
|
|
74
|
+
clearCache: () => void;
|
|
75
|
+
resultsCount: () => number;
|
|
76
|
+
resetResultsCount: () => void;
|
|
77
|
+
};
|
|
78
|
+
lastResult: () => import("./types").Area[];
|
|
79
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
80
|
+
recomputations: () => number;
|
|
81
|
+
resetRecomputations: () => void;
|
|
82
|
+
dependencyRecomputations: () => number;
|
|
83
|
+
resetDependencyRecomputations: () => void;
|
|
84
|
+
} & {
|
|
85
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
86
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
87
|
+
};
|
|
88
|
+
export declare const getPublicWarningFormState: ((state: WarningModuleStore) => "" | "cancel" | "saving" | "publishing" | "readonly" | "edit" | "amending") & {
|
|
89
|
+
clearCache: () => void;
|
|
90
|
+
resultsCount: () => number;
|
|
91
|
+
resetResultsCount: () => void;
|
|
92
|
+
} & {
|
|
93
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => "" | "cancel" | "saving" | "publishing" | "readonly" | "edit" | "amending";
|
|
94
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => "" | "cancel" | "saving" | "publishing" | "readonly" | "edit" | "amending") & {
|
|
95
|
+
clearCache: () => void;
|
|
96
|
+
resultsCount: () => number;
|
|
97
|
+
resetResultsCount: () => void;
|
|
98
|
+
};
|
|
99
|
+
lastResult: () => "" | "cancel" | "saving" | "publishing" | "readonly" | "edit" | "amending";
|
|
100
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
101
|
+
recomputations: () => number;
|
|
102
|
+
resetRecomputations: () => void;
|
|
103
|
+
dependencyRecomputations: () => number;
|
|
104
|
+
resetDependencyRecomputations: () => void;
|
|
105
|
+
} & {
|
|
106
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
107
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
108
|
+
};
|
|
109
|
+
export declare const getSelectedWarningId: ((state: WarningModuleStore) => string) & {
|
|
110
|
+
clearCache: () => void;
|
|
111
|
+
resultsCount: () => number;
|
|
112
|
+
resetResultsCount: () => void;
|
|
113
|
+
} & {
|
|
114
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => string;
|
|
115
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => string) & {
|
|
116
|
+
clearCache: () => void;
|
|
117
|
+
resultsCount: () => number;
|
|
118
|
+
resetResultsCount: () => void;
|
|
119
|
+
};
|
|
120
|
+
lastResult: () => string;
|
|
121
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
122
|
+
recomputations: () => number;
|
|
123
|
+
resetRecomputations: () => void;
|
|
124
|
+
dependencyRecomputations: () => number;
|
|
125
|
+
resetDependencyRecomputations: () => void;
|
|
126
|
+
} & {
|
|
127
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
128
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
129
|
+
};
|
|
130
|
+
export declare const getSelectedPublicIsFormDirty: ((state: WarningModuleStore) => boolean) & {
|
|
131
|
+
clearCache: () => void;
|
|
132
|
+
resultsCount: () => number;
|
|
133
|
+
resetResultsCount: () => void;
|
|
134
|
+
} & {
|
|
135
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => boolean;
|
|
136
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => boolean) & {
|
|
137
|
+
clearCache: () => void;
|
|
138
|
+
resultsCount: () => number;
|
|
139
|
+
resetResultsCount: () => void;
|
|
140
|
+
};
|
|
141
|
+
lastResult: () => boolean;
|
|
142
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
143
|
+
recomputations: () => number;
|
|
144
|
+
resetRecomputations: () => void;
|
|
145
|
+
dependencyRecomputations: () => number;
|
|
146
|
+
resetDependencyRecomputations: () => void;
|
|
147
|
+
} & {
|
|
148
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
149
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
150
|
+
};
|
|
151
|
+
export declare const getWarningType: ((state: WarningModuleStore) => import("./types").WarningType | undefined) & {
|
|
152
|
+
clearCache: () => void;
|
|
153
|
+
resultsCount: () => number;
|
|
154
|
+
resetResultsCount: () => void;
|
|
155
|
+
} & {
|
|
156
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => import("./types").WarningType | undefined;
|
|
157
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => import("./types").WarningType | undefined) & {
|
|
158
|
+
clearCache: () => void;
|
|
159
|
+
resultsCount: () => number;
|
|
160
|
+
resetResultsCount: () => void;
|
|
161
|
+
};
|
|
162
|
+
lastResult: () => import("./types").WarningType | undefined;
|
|
163
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
164
|
+
recomputations: () => number;
|
|
165
|
+
resetRecomputations: () => void;
|
|
166
|
+
dependencyRecomputations: () => number;
|
|
167
|
+
resetDependencyRecomputations: () => void;
|
|
168
|
+
} & {
|
|
169
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
170
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
171
|
+
};
|
|
172
|
+
export declare const getPublicWarningPanelId: ((state: WarningModuleStore) => string) & {
|
|
173
|
+
clearCache: () => void;
|
|
174
|
+
resultsCount: () => number;
|
|
175
|
+
resetResultsCount: () => void;
|
|
176
|
+
} & {
|
|
177
|
+
resultFunc: (resultFuncArgs_0: WarningFormState) => string;
|
|
178
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => string) & {
|
|
179
|
+
clearCache: () => void;
|
|
180
|
+
resultsCount: () => number;
|
|
181
|
+
resetResultsCount: () => void;
|
|
182
|
+
};
|
|
183
|
+
lastResult: () => string;
|
|
184
|
+
dependencies: [(store: WarningModuleStore) => WarningFormState];
|
|
185
|
+
recomputations: () => number;
|
|
186
|
+
resetRecomputations: () => void;
|
|
187
|
+
dependencyRecomputations: () => number;
|
|
188
|
+
resetDependencyRecomputations: () => void;
|
|
189
|
+
} & {
|
|
190
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
191
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
192
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Airmet, CancelAirmet, CancelSigmet, ProductStatus, Sigmet } from '@opengeoweb/api';
|
|
2
|
+
export interface Area {
|
|
3
|
+
objectName: string;
|
|
4
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
5
|
+
areaId?: string;
|
|
6
|
+
published_warning_uuid?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PublicWarningDetail {
|
|
9
|
+
id?: string;
|
|
10
|
+
phenomenon: string;
|
|
11
|
+
areas?: Area[];
|
|
12
|
+
validFrom: string;
|
|
13
|
+
validUntil: string;
|
|
14
|
+
level: string;
|
|
15
|
+
probability: number;
|
|
16
|
+
descriptionOriginal: string;
|
|
17
|
+
descriptionTranslation: string;
|
|
18
|
+
domain?: string;
|
|
19
|
+
warningProposalSource?: string;
|
|
20
|
+
authority?: string;
|
|
21
|
+
type?: number;
|
|
22
|
+
warning_handle_uuid?: string;
|
|
23
|
+
proposal_id?: string;
|
|
24
|
+
linked_to_id?: string;
|
|
25
|
+
incident?: string;
|
|
26
|
+
}
|
|
27
|
+
export type AviationWarningDetails = Airmet | CancelAirmet | Sigmet | CancelSigmet;
|
|
28
|
+
export declare enum PublicWarningStatus {
|
|
29
|
+
DRAFT = "DRAFT",
|
|
30
|
+
DRAFT_PUBLISHED = "DRAFT_PUBLISHED",
|
|
31
|
+
PUBLISHED = "PUBLISHED",
|
|
32
|
+
TODO = "TODO",
|
|
33
|
+
EXPIRED = "EXPIRED",
|
|
34
|
+
IGNORED = "IGNORED",
|
|
35
|
+
WITHDRAWN = "WITHDRAWN"
|
|
36
|
+
}
|
|
37
|
+
export declare enum MaritimeWarningAction {
|
|
38
|
+
SELECT = "SELECT",
|
|
39
|
+
UPDATE = "UPDATE",
|
|
40
|
+
EXTEND = "EXTEND"
|
|
41
|
+
}
|
|
42
|
+
export type MaritimeWarningsType = 'maritimeWarningCoastal' | 'maritimeWarningNorthSea';
|
|
43
|
+
export type WarningType = 'public' | 'airmet' | 'sigmet' | MaritimeWarningsType;
|
|
44
|
+
interface BaseWarning {
|
|
45
|
+
status?: PublicWarningStatus;
|
|
46
|
+
productStatus?: ProductStatus;
|
|
47
|
+
editor?: string;
|
|
48
|
+
warningDetail: PublicWarningDetail;
|
|
49
|
+
id?: string;
|
|
50
|
+
lastUpdatedTime?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface PublicWarning extends BaseWarning {
|
|
53
|
+
type: 'public';
|
|
54
|
+
}
|
|
55
|
+
export interface AirmetWarning extends BaseWarning {
|
|
56
|
+
type: 'airmet';
|
|
57
|
+
sigmetAirmetDetails: Airmet | CancelAirmet;
|
|
58
|
+
}
|
|
59
|
+
export interface SigmetWarning extends BaseWarning {
|
|
60
|
+
type: 'sigmet';
|
|
61
|
+
sigmetAirmetDetails: Sigmet | CancelSigmet;
|
|
62
|
+
}
|
|
63
|
+
export interface MaritimeWarning extends BaseWarning {
|
|
64
|
+
type: MaritimeWarningsType;
|
|
65
|
+
warningDetail: PublicWarningDetail & {
|
|
66
|
+
windDirectionFrom?: string;
|
|
67
|
+
windForce?: string;
|
|
68
|
+
changeType?: string;
|
|
69
|
+
windDirectionTo?: string;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export type Warning = PublicWarning | AirmetWarning | SigmetWarning | MaritimeWarning;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
2
|
+
export declare const initialBbox: {
|
|
3
|
+
srs: "EPSG:3857";
|
|
4
|
+
bbox: {
|
|
5
|
+
left: number;
|
|
6
|
+
bottom: number;
|
|
7
|
+
right: number;
|
|
8
|
+
top: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
interface UseDefaultMapSettingsProps {
|
|
12
|
+
mapId?: string;
|
|
13
|
+
baseLayers?: layerTypes.Layer[];
|
|
14
|
+
bbox?: mapTypes.Bbox;
|
|
15
|
+
srs?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const useDefaultMapSettings: (props?: UseDefaultMapSettingsProps) => void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Airmet, CancelAirmet, CancelSigmet, Sigmet } from '@opengeoweb/sigmet-airmet';
|
|
2
|
+
import type { PublicWarning } from '../store/warningsForm/types';
|
|
3
|
+
export declare const testGeoJSON: GeoJSON.FeatureCollection;
|
|
4
|
+
export declare function fakeErrorRequest<ReturnType>(error: string): Promise<ReturnType>;
|
|
5
|
+
export declare const fakePostError = "2 validation errors for Request\nbody -> warningDetail -> phenomenon\n value is not a valid enumeration member; permitted: 'wind', 'fog', 'thunderstorm', 'snowIce', 'rain', 'highTemp', 'funnelCloud', 'lowTemp', 'coastalEvent' (type=type_error.enum; enum_values=[<PhenomenonEnum.WIND: 'wind'>, <PhenomenonEnum.FOG: 'fog'>, <PhenomenonEnum.THUNDERSTORM: 'thunderstorm'>, <PhenomenonEnum.SNOW_ICE: 'snowIce'>, <PhenomenonEnum.RAIN: 'rain'>, <PhenomenonEnum.HIGH_TEMP: 'highTemp'>, <PhenomenonEnum.FUNNEL_CLD: 'funnelCloud'>, <PhenomenonEnum.LOW_TEMP: 'lowTemp'>, <PhenomenonEnum.COASTAL_EVENT: 'coastalEvent'>])\nbody -> warningDetail -> level\n value is not a valid enumeration member; permitted: 'moderate', 'severe', 'extreme' (type=type_error.enum; enum_values=[<LevelEnum.MODERATE: 'moderate'>, <LevelEnum.SEVERE: 'severe'>, <LevelEnum.EXTREME: 'extreme'>])";
|
|
6
|
+
export declare const testPublicWarning: PublicWarning;
|
|
7
|
+
export declare const testDraftAirmet: Airmet | CancelAirmet;
|
|
8
|
+
export declare const testPublishedAirmet: Airmet | CancelAirmet;
|
|
9
|
+
export declare const testDraftAirmet2: Sigmet | CancelSigmet;
|
|
10
|
+
export declare const testDraftSigmet: Sigmet | CancelSigmet;
|
|
11
|
+
export declare const testPublishedSigmet: Sigmet | CancelSigmet;
|