@opengeoweb/warnings 10.2.0 → 11.0.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 +540 -253
- package/package.json +1 -1
- package/src/index.d.ts +0 -2
- package/src/lib/api/warning-api/api.d.ts +2 -2
- package/src/lib/api/warning-api/hooks.d.ts +3 -3
- package/src/lib/components/AreaObjectLoader/AreaObjectLoader.d.ts +1 -1
- package/src/lib/components/AreaObjectLoader/AreasObjects.d.ts +1 -1
- package/src/lib/components/FilterList/filter-hooks.d.ts +2 -2
- package/src/lib/components/ObjectManager/ObjectManager.d.ts +1 -1
- package/src/lib/components/ObjectManager/Objects.d.ts +1 -1
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +1 -1
- package/src/lib/components/PublicWarningList/WarningListItemMenu.d.ts +4 -3
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +1 -1
- package/src/lib/components/WarningsModuleProvider/WarningsModuleProvider.spec.d.ts +1 -0
- package/src/lib/store/index.d.ts +2 -1
- package/src/lib/store/publicWarningForm/index.d.ts +1 -1
- package/src/lib/store/publicWarningForm/reducer.d.ts +6 -7
- package/src/lib/store/publicWarningForm/selectors.d.ts +1 -1
- package/src/lib/store/publicWarningForm/types.d.ts +16 -4
- package/src/lib/store/publicWarnings/index.d.ts +1 -1
- package/src/lib/store/publicWarnings/reducer.d.ts +5 -5
- package/src/lib/store/store.d.ts +15 -0
- package/src/lib/store/types.d.ts +1 -1
- package/src/lib/store/warningsDrawings/index.d.ts +2 -0
- package/src/lib/store/warningsDrawings/listener.d.ts +2 -0
- package/src/lib/store/{drawings → warningsDrawings}/reducer.d.ts +1 -2
- package/src/lib/store/warningsDrawings/reducer.spec.d.ts +1 -0
- package/src/lib/store/warningsDrawings/selectors.spec.d.ts +1 -0
- package/src/lib/storybookUtils/testUtils.d.ts +2 -0
- package/src/lib/utils/api.d.ts +1 -1
- package/src/lib/utils/fakeApi/index.d.ts +11 -9
- package/src/lib/utils/fakeApi.d.ts +1 -1
- package/src/lib/utils/sig-airmet-util.d.ts +7 -4
- package/src/lib/store/config.d.ts +0 -9
- package/src/lib/store/drawings/index.d.ts +0 -2
- package/src/lib/store/drawings/listener.d.ts +0 -2
- package/src/lib/utils/testUtils.d.ts +0 -4
- /package/src/lib/{store/drawings/reducer.spec.d.ts → components/PublicWarningList/PublicWarningListConnect.confirmation.integration.spec.d.ts} +0 -0
- /package/src/lib/{store/drawings/selectors.spec.d.ts → components/PublicWarningList/PublicWarningListConnect.draft.integration.spec.d.ts} +0 -0
- /package/src/lib/store/{drawings → warningsDrawings}/selectors.d.ts +0 -0
- /package/src/lib/store/{drawings → warningsDrawings}/types.d.ts +0 -0
- /package/src/lib/store/{drawings → warningsDrawings}/utils.d.ts +0 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -5,10 +5,8 @@ export * from './lib/components/DrawingTool';
|
|
|
5
5
|
export * from './lib/components/DrawingToolForm';
|
|
6
6
|
export * from './lib/components/PublicWarningsFormDialog';
|
|
7
7
|
export * from './lib/components/ComponentsLookUp';
|
|
8
|
-
export * from './lib/store/config';
|
|
9
8
|
export * from './lib/store';
|
|
10
9
|
export { WARN_NAMESPACE } from './lib/utils/i18n';
|
|
11
10
|
export { warningsTranslations };
|
|
12
11
|
export * as publicWarningsSelectors from './lib/store/publicWarnings/selectors';
|
|
13
12
|
export * from './lib/store/types';
|
|
14
|
-
export * from './lib/store/publicWarnings/reducer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Credentials } from '@opengeoweb/authentication';
|
|
2
|
-
import {
|
|
3
|
-
export declare const getPublicWarningList: (auth: Credentials) => Promise<
|
|
2
|
+
import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
3
|
+
export declare const getPublicWarningList: (auth: Credentials) => Promise<PublicWarning[]>;
|
|
4
4
|
export declare const updatePublicWarningEditor: (warningId: string, isEditor: boolean, auth: Credentials) => Promise<object>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
3
3
|
/**
|
|
4
4
|
* @param disabled - Disables fetching, but still returns cached values.
|
|
5
5
|
* https://tanstack.com/query/v4/docs/framework/react/guides/disabling-queries
|
|
6
6
|
*/
|
|
7
|
-
export declare const usePublicWarnings: (disabled?: boolean) => UseQueryResult<
|
|
7
|
+
export declare const usePublicWarnings: (disabled?: boolean) => UseQueryResult<PublicWarning[]>;
|
|
8
8
|
interface MutateProps {
|
|
9
9
|
id: string;
|
|
10
10
|
isEditor: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare const useMutatePublicWarningEditor: () => UseMutationResult<object, Error, MutateProps, {
|
|
13
|
-
oldData:
|
|
13
|
+
oldData: PublicWarning[] | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
|
|
3
3
|
import { uiTypes } from '@opengeoweb/store';
|
|
4
|
-
import { DrawingListItem } from '../../store/
|
|
4
|
+
import { DrawingListItem } from '../../store/warningsDrawings/types';
|
|
5
5
|
import { AreaObjectFilterProps } from './AreaObjectFilter';
|
|
6
6
|
import { Area } from '../../store/publicWarningForm/types';
|
|
7
7
|
export declare const areaErrorType = "area";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { TFunction } from 'i18next';
|
|
3
|
-
import { DrawingListItem } from '../../store/
|
|
3
|
+
import { DrawingListItem } from '../../store/warningsDrawings/types';
|
|
4
4
|
import { Area } from '../../store/publicWarningForm/types';
|
|
5
5
|
interface ObjectAreaList {
|
|
6
6
|
title: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
1
2
|
import { Warning } from '../../store/publicWarningForm/types';
|
|
2
3
|
import { defaultDomainFilter, defaultEmptyFilter, defaultLevelFilter, defaultPhenomenonFilter } from './filter-utils';
|
|
3
|
-
export type UpdateFiltersOrigin = 'user' | 'system';
|
|
4
4
|
export interface PickedFilterState {
|
|
5
5
|
incident: Partial<typeof defaultEmptyFilter>;
|
|
6
6
|
source: Partial<typeof defaultEmptyFilter>;
|
|
@@ -24,5 +24,5 @@ export interface FilterHookState {
|
|
|
24
24
|
byFilterState: (warning: Warning) => boolean;
|
|
25
25
|
filterState: PickedFilterState;
|
|
26
26
|
}
|
|
27
|
-
export declare const useWarningFilters: (warnings: Warning[], onUpdateFilters: (filterState: PickedFilterState, origin:
|
|
27
|
+
export declare const useWarningFilters: (warnings: Warning[], onUpdateFilters: (filterState: PickedFilterState, origin: SystemScope) => void, savedFilterState: PickedFilterState, presetFilterState?: PickedFilterState) => FilterHookState;
|
|
28
28
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
|
|
3
3
|
import { uiTypes } from '@opengeoweb/store';
|
|
4
|
-
import { DrawingListItem } from '../../store/
|
|
4
|
+
import { DrawingListItem } from '../../store/warningsDrawings/types';
|
|
5
5
|
export declare const ObjectManager: React.FC<{
|
|
6
6
|
bounds?: string;
|
|
7
7
|
title?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { DrawingListItem } from '../../store/
|
|
2
|
+
import { DrawingListItem } from '../../store/warningsDrawings/types';
|
|
3
3
|
export declare const BUTTON_AIRMET = "AIRMET";
|
|
4
4
|
export declare const BUTTON_SIGMET = "SIGMET";
|
|
5
5
|
type ListInclHeadersType = {
|
|
@@ -15,7 +15,7 @@ export interface PublicWarningListProps extends WarningListItemActions {
|
|
|
15
15
|
hoveredFeatureId?: string;
|
|
16
16
|
expandedSections: Record<string, boolean>;
|
|
17
17
|
setExpandedSections: (expandedSections: Record<string, boolean>) => void;
|
|
18
|
-
|
|
18
|
+
onActionAviationWarning?: () => void;
|
|
19
19
|
}
|
|
20
20
|
export declare const PublicWarningList: React.FC<PublicWarningListProps>;
|
|
21
21
|
export default PublicWarningList;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { MenuItemType } from '@opengeoweb/shared';
|
|
2
|
+
import { ProductAction } from '@opengeoweb/sigmet-airmet';
|
|
2
3
|
import { TFunction } from 'i18next';
|
|
3
|
-
import { Warning
|
|
4
|
+
import { Warning } from '../../store/publicWarningForm/types';
|
|
4
5
|
export interface WarningListItemActions {
|
|
5
6
|
onEditWarning?: (warning: Warning) => void;
|
|
6
7
|
onDeleteWarning?: (warningId: string, warningEditor?: string) => void;
|
|
7
8
|
onDeleteReviewWarning?: (warning: Warning) => void;
|
|
8
9
|
onExpireWarning?: (warning: Warning) => void;
|
|
9
10
|
onWithdrawWarning?: (warning: Warning) => void;
|
|
10
|
-
|
|
11
|
+
onActionAviationWarning?: (warning: Warning, actionType?: ProductAction) => void;
|
|
11
12
|
}
|
|
12
13
|
interface WarningListItemMenuProps extends WarningListItemActions {
|
|
13
14
|
warning: Warning;
|
|
14
15
|
t: TFunction;
|
|
15
16
|
}
|
|
16
|
-
declare const WarningListItemMenu: ({ warning, onEditWarning, onDeleteWarning, onDeleteReviewWarning, onExpireWarning, onWithdrawWarning,
|
|
17
|
+
declare const WarningListItemMenu: ({ warning, onEditWarning, onDeleteWarning, onDeleteReviewWarning, onExpireWarning, onWithdrawWarning, onActionAviationWarning, t, }: WarningListItemMenuProps) => MenuItemType[];
|
|
17
18
|
export default WarningListItemMenu;
|
|
@@ -3,7 +3,7 @@ import { AviationProduct, FormMode } from '@opengeoweb/sigmet-airmet';
|
|
|
3
3
|
import { FeatureCollection, GeoJsonProperties, Geometry } from 'geojson';
|
|
4
4
|
import { MapPreset } from '@opengeoweb/store';
|
|
5
5
|
import { PublicWarningDetail, WarningType } from '../../store/publicWarningForm/types';
|
|
6
|
-
import { BaseDrawingListItem, DrawingListItem } from '../../store/
|
|
6
|
+
import { BaseDrawingListItem, DrawingListItem } from '../../store/warningsDrawings/types';
|
|
7
7
|
import { WarningLevel } from './LevelField';
|
|
8
8
|
import { FormAction, FormError } from '../../store/publicWarningForm/reducer';
|
|
9
9
|
export declare const useScrollTopOnError: (error: FormError) => React.RefObject<HTMLDivElement>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/lib/store/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { publicWarningFormReducer, publicWarningFormActions } from './reducer';
|
|
2
2
|
export { publicWarningFormListener } from './listener';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
2
|
import { AlertColor } from '@mui/material';
|
|
3
3
|
import { snackbarTypes } from '@opengeoweb/snackbar';
|
|
4
|
-
import { DrawingListItem } from '../
|
|
5
|
-
import { Area, Warning, WarningType } from './types';
|
|
4
|
+
import { DrawingListItem } from '../warningsDrawings/types';
|
|
5
|
+
import { Area, PublicWarning, Warning, WarningType } from './types';
|
|
6
6
|
export type FormAction = '' | 'saving' | 'publishing' | 'readonly' | 'edit';
|
|
7
7
|
export interface FormError {
|
|
8
8
|
severity?: AlertColor;
|
|
@@ -20,8 +20,7 @@ export interface WarningFormState {
|
|
|
20
20
|
}
|
|
21
21
|
export declare const TAKEOVER_MESSAGE = "You are no longer the editor of this warning";
|
|
22
22
|
export declare const initialState: WarningFormState;
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const publicWarningFormActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
23
|
+
export declare const publicWarningFormReducer: import("redux").Reducer<WarningFormState>, publicWarningFormActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
25
24
|
setFormValues: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
26
25
|
object?: DrawingListItem;
|
|
27
26
|
warning?: Warning;
|
|
@@ -42,15 +41,15 @@ export declare const publicWarningFormActions: import("@reduxjs/toolkit").CaseRe
|
|
|
42
41
|
panelId?: string;
|
|
43
42
|
}>) => void;
|
|
44
43
|
publishWarning: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
45
|
-
publicWarning:
|
|
44
|
+
publicWarning: PublicWarning;
|
|
46
45
|
refetchWarnings?: () => void;
|
|
47
46
|
}>) => void;
|
|
48
47
|
publishWarningSuccess: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
49
|
-
publicWarning:
|
|
48
|
+
publicWarning: PublicWarning;
|
|
50
49
|
message: snackbarTypes.SnackbarMessage;
|
|
51
50
|
}>) => void;
|
|
52
51
|
saveWarning: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
53
|
-
publicWarning:
|
|
52
|
+
publicWarning: PublicWarning;
|
|
54
53
|
refetchWarnings?: () => void;
|
|
55
54
|
}>) => void;
|
|
56
55
|
saveWarningSuccess: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WarningModuleStore } from '../types';
|
|
2
2
|
import { WarningFormState } from './reducer';
|
|
3
3
|
export declare const getPublicWarningStore: (store: WarningModuleStore) => WarningFormState;
|
|
4
|
-
export declare const getPublicWarningObject: ((state: WarningModuleStore) => import("../
|
|
4
|
+
export declare const getPublicWarningObject: ((state: WarningModuleStore) => import("../warningsDrawings/types").DrawingListItem | undefined) & import("reselect").OutputSelectorFields<(args_0: WarningFormState) => import("../warningsDrawings/types").DrawingListItem | undefined, {
|
|
5
5
|
clearCache: () => void;
|
|
6
6
|
}> & {
|
|
7
7
|
clearCache: () => void;
|
|
@@ -8,7 +8,7 @@ export interface Area {
|
|
|
8
8
|
export interface PublicWarningDetail {
|
|
9
9
|
id?: string;
|
|
10
10
|
phenomenon: string;
|
|
11
|
-
areas
|
|
11
|
+
areas?: Area[];
|
|
12
12
|
validFrom: string;
|
|
13
13
|
validUntil: string;
|
|
14
14
|
level: string;
|
|
@@ -34,13 +34,25 @@ export declare enum PublicWarningStatus {
|
|
|
34
34
|
IGNORED = "IGNORED",
|
|
35
35
|
WITHDRAWN = "WITHDRAWN"
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type WarningType = 'public' | 'airmet' | 'sigmet';
|
|
38
|
+
interface BaseWarning {
|
|
38
39
|
status?: PublicWarningStatus;
|
|
39
40
|
productStatus?: ProductStatus;
|
|
40
41
|
editor?: string;
|
|
41
42
|
warningDetail: PublicWarningDetail;
|
|
42
|
-
sigmetAirmetDetail?: AviationWarningDetails;
|
|
43
43
|
id?: string;
|
|
44
44
|
lastUpdatedTime?: string;
|
|
45
45
|
}
|
|
46
|
-
export
|
|
46
|
+
export interface PublicWarning extends BaseWarning {
|
|
47
|
+
type: 'public';
|
|
48
|
+
}
|
|
49
|
+
export interface AirmetWarning extends BaseWarning {
|
|
50
|
+
type: 'airmet';
|
|
51
|
+
sigmetAirmetDetails: Airmet | CancelAirmet;
|
|
52
|
+
}
|
|
53
|
+
export interface SigmetWarning extends BaseWarning {
|
|
54
|
+
type: 'sigmet';
|
|
55
|
+
sigmetAirmetDetails: Sigmet | CancelSigmet;
|
|
56
|
+
}
|
|
57
|
+
export type Warning = PublicWarning | AirmetWarning | SigmetWarning;
|
|
58
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { publicWarningsReducer, publicWarningActions } from './reducer';
|
|
2
2
|
export { publicWarningsListener } from './listener';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { SystemScope } from '@opengeoweb/shared';
|
|
1
2
|
import { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
3
|
+
import { PickedFilterState } from '../../components/FilterList/filter-hooks';
|
|
3
4
|
import { Warning } from '../publicWarningForm/types';
|
|
4
|
-
import {
|
|
5
|
+
import { PublicWarningsState } from './types';
|
|
5
6
|
export declare const publicWarningsAdapter: import("@reduxjs/toolkit").EntityAdapter<Warning>;
|
|
6
7
|
export declare const initialState: PublicWarningsState;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const publicWarningActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
8
|
+
export declare const publicWarningsReducer: import("redux").Reducer<PublicWarningsState>, publicWarningActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
9
9
|
setWarningFilters: (draft: Draft<PublicWarningsState>, action: PayloadAction<{
|
|
10
10
|
filterState: PickedFilterState;
|
|
11
11
|
panelId?: string;
|
|
12
|
-
origin:
|
|
12
|
+
origin: SystemScope;
|
|
13
13
|
}>) => void;
|
|
14
14
|
}, "publicWarnings">;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SnackbarModuleStore } from '@opengeoweb/snackbar';
|
|
2
|
+
import { WebMapStateModuleState, UIModuleState, DrawtoolModuleStore } from '@opengeoweb/store';
|
|
3
|
+
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
4
|
+
import { WarningModuleStore } from './types';
|
|
5
|
+
export declare const warningsReducersMap: {
|
|
6
|
+
layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").AnyAction>;
|
|
7
|
+
ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").AnyAction>;
|
|
8
|
+
drawingtools: import("redux").Reducer<import("dist/libs/store/src/store/drawingTool/reducer").DrawingToolState, import("redux").AnyAction>;
|
|
9
|
+
drawings: import("redux").Reducer<import("./warningsDrawings/types").DrawState>;
|
|
10
|
+
publicWarningForm: import("redux").Reducer<import("./publicWarningForm/reducer").WarningFormState>;
|
|
11
|
+
publicWarnings: import("redux").Reducer<import("./publicWarnings/types").PublicWarningsState>;
|
|
12
|
+
snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").AnyAction>;
|
|
13
|
+
};
|
|
14
|
+
export declare const warningsMiddlewares: (import("@reduxjs/toolkit").ListenerMiddleware<WarningModuleStore, import("@reduxjs/toolkit").ThunkDispatch<WarningModuleStore, unknown, import("redux").AnyAction>, unknown> | import("@reduxjs/toolkit").ListenerMiddleware<SnackbarModuleStore, import("@reduxjs/toolkit").ThunkDispatch<SnackbarModuleStore, unknown, import("redux").AnyAction>, unknown>)[];
|
|
15
|
+
export declare const createMockStore: (mockState?: WebMapStateModuleState | DrawtoolModuleStore | UIModuleState | WarningModuleStore | SnackbarModuleStore) => ToolkitStore;
|
package/src/lib/store/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoreAppStore } from '@opengeoweb/store';
|
|
2
|
-
import { DrawState } from './
|
|
2
|
+
import { DrawState } from './warningsDrawings/types';
|
|
3
3
|
import { WarningFormState } from './publicWarningForm/reducer';
|
|
4
4
|
import { PublicWarningsState } from './publicWarnings/types';
|
|
5
5
|
export interface WarningModuleStore extends CoreAppStore {
|
|
@@ -2,8 +2,7 @@ import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
|
2
2
|
import { DrawItem, DrawState, SetDrawValuesPayload, SubmitDrawValuesPayload } from './types';
|
|
3
3
|
export declare const drawAdapter: import("@reduxjs/toolkit").EntityAdapter<DrawItem>;
|
|
4
4
|
export declare const initialState: DrawState;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const drawActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
5
|
+
export declare const warningsDrawingsReducer: import("redux").Reducer<DrawState>, warningsDrawingsActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
7
6
|
setDrawValues: (draft: Draft<DrawState>, action: PayloadAction<SetDrawValuesPayload>) => void;
|
|
8
7
|
submitDrawValues: (draft: Draft<DrawState>, action: PayloadAction<SubmitDrawValuesPayload>) => void;
|
|
9
8
|
setFormDirty: (draft: Draft<DrawState>, action: PayloadAction<{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Warning } from '../store/publicWarningForm/types';
|
|
1
2
|
export declare const testGeoJSON: GeoJSON.FeatureCollection;
|
|
2
3
|
export declare function fakeErrorRequest<ReturnType>(error: string): Promise<ReturnType>;
|
|
3
4
|
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'>])";
|
|
5
|
+
export declare const testPublicWarning: Warning;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
2
|
import { AxiosInstance } from 'axios';
|
|
3
|
-
import { DrawingFromBE, DrawingFromFE, DrawingListItem, FetchDrawingParams } from '../store/
|
|
3
|
+
import { DrawingFromBE, DrawingFromFE, DrawingListItem, FetchDrawingParams } from '../store/warningsDrawings/types';
|
|
4
4
|
import { Warning } from '../store/publicWarningForm/types';
|
|
5
5
|
export declare const API_NAME = "warnings";
|
|
6
6
|
export declare const getIdFromUrl: (url: string) => string;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { RestHandler } from 'msw';
|
|
2
|
+
import type { DrawingFromBE, DrawingListItem } from '../../store/warningsDrawings/types';
|
|
3
|
+
import type { AirmetWarning, PublicWarning, SigmetWarning, Warning } from '../../store/publicWarningForm/types';
|
|
3
4
|
declare const drawingList: DrawingListItem[];
|
|
4
5
|
declare const drawingsListFullContent: DrawingFromBE[];
|
|
5
|
-
declare const warningList:
|
|
6
|
+
declare const warningList: PublicWarning[];
|
|
6
7
|
declare const lengthWarningListWithoutExpiredWithdrawn: number;
|
|
7
|
-
declare const sigmetList:
|
|
8
|
-
declare const airmetList:
|
|
8
|
+
declare const sigmetList: SigmetWarning[];
|
|
9
|
+
declare const airmetList: AirmetWarning[];
|
|
10
|
+
declare const combinedWarnings: Warning[];
|
|
9
11
|
declare const areaKeywordList: string[];
|
|
10
|
-
export declare const publicWarningEndpoints:
|
|
11
|
-
export declare const makeWarningsHandler: (result: Warning[]) =>
|
|
12
|
-
declare const requestHandlers:
|
|
13
|
-
export { drawingList, drawingsListFullContent, warningList, lengthWarningListWithoutExpiredWithdrawn, sigmetList, airmetList, areaKeywordList, requestHandlers, };
|
|
12
|
+
export declare const publicWarningEndpoints: RestHandler<import("msw").MockedRequest<import("msw").DefaultBodyType>>[];
|
|
13
|
+
export declare const makeWarningsHandler: (result: Warning[]) => RestHandler;
|
|
14
|
+
declare const requestHandlers: RestHandler<import("msw").MockedRequest<import("msw").DefaultBodyType>>[];
|
|
15
|
+
export { drawingList, drawingsListFullContent, warningList, lengthWarningListWithoutExpiredWithdrawn, sigmetList, airmetList, combinedWarnings, areaKeywordList, requestHandlers, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarningsApi } from './api';
|
|
2
|
-
import { DrawingFromBE } from '../store/
|
|
2
|
+
import { DrawingFromBE } from '../store/warningsDrawings/types';
|
|
3
3
|
export declare const ERROR_NOT_FOUND = "Request failed with status code 400";
|
|
4
4
|
export declare const MOCK_USERNAME = "user.name";
|
|
5
5
|
export declare const extractDrawingDetailsFromJSON: (drawingId: string) => DrawingFromBE;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { AirmetFromBackend, CancelAirmet, CancelSigmet, ProductStatus, SigmetFromBackend } from '@opengeoweb/api';
|
|
2
2
|
import { AviationProduct, ProductConfig } from '@opengeoweb/sigmet-airmet';
|
|
3
|
-
import { Warning, PublicWarningStatus, AviationWarningDetails } from '../store/publicWarningForm/types';
|
|
3
|
+
import { Warning, PublicWarningStatus, AviationWarningDetails, AirmetWarning, SigmetWarning } from '../store/publicWarningForm/types';
|
|
4
4
|
export declare function isCancelAirmet(warningDetail: AviationWarningDetails): warningDetail is CancelAirmet;
|
|
5
5
|
export declare function isCancelSigmet(warningDetail: AviationWarningDetails): warningDetail is CancelSigmet;
|
|
6
6
|
export declare const flattenPublicWarning: (publicWarning: Warning) => Partial<AviationWarningDetails>;
|
|
7
|
-
export declare const transformAirmetToWarningFormat: (apiAirmet: AirmetFromBackend) =>
|
|
8
|
-
export declare const transformSigmetToWarningFormat: (apiSigmet: SigmetFromBackend) =>
|
|
7
|
+
export declare const transformAirmetToWarningFormat: (apiAirmet: AirmetFromBackend) => AirmetWarning;
|
|
8
|
+
export declare const transformSigmetToWarningFormat: (apiSigmet: SigmetFromBackend) => SigmetWarning;
|
|
9
9
|
export declare const mapProductStatusToWarningStatus: (productStatus?: ProductStatus) => PublicWarningStatus;
|
|
10
10
|
export declare const transformSigmetToProductFormat: (warning: SigmetFromBackend | undefined) => AviationProduct;
|
|
11
11
|
export declare const transformAirmetToProductFormat: (warning: AirmetFromBackend | undefined) => AviationProduct;
|
|
12
|
+
export declare const transformSigmetFromBackendToProductFormat: (warning: SigmetFromBackend) => AviationProduct;
|
|
13
|
+
export declare const transformAirmetFromBackendToProductFormat: (warning: AirmetFromBackend) => AviationProduct;
|
|
12
14
|
export declare const getEmptySigmetWarning: () => AviationProduct;
|
|
13
15
|
export declare const getEmptyAirmetWarning: () => AviationProduct;
|
|
14
|
-
export declare const
|
|
16
|
+
export declare const renewAviationProduct: <T extends AirmetWarning | SigmetWarning>(aviationWarning: T, productConfig: ProductConfig) => T;
|
|
17
|
+
export declare const duplicateAviationProduct: <T extends AirmetWarning | SigmetWarning>(aviationWarning: T) => T;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const drawingModuleConfig: {
|
|
2
|
-
reducersMap: {
|
|
3
|
-
drawings: import("redux").Reducer<import("./drawings/types").DrawState>;
|
|
4
|
-
publicWarningForm: import("redux").Reducer<import("./publicWarningForm/reducer").WarningFormState>;
|
|
5
|
-
publicWarnings: import("redux").Reducer<import("./publicWarnings/types").PublicWarningsState>;
|
|
6
|
-
};
|
|
7
|
-
middlewares: import("@reduxjs/toolkit").ListenerMiddleware<import("./types").WarningModuleStore, import("redux-thunk").ThunkDispatch<import("./types").WarningModuleStore, unknown, import("redux").AnyAction>, unknown>[];
|
|
8
|
-
};
|
|
9
|
-
export default drawingModuleConfig;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Store } from '@reduxjs/toolkit';
|
|
2
|
-
import { uiTypes, WebMapStateModuleState } from '@opengeoweb/store';
|
|
3
|
-
import { WarningModuleStore } from '../store/types';
|
|
4
|
-
export declare const createMockStore: (mockState: WarningModuleStore & uiTypes.UIModuleState & WebMapStateModuleState) => Store;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|