@opengeoweb/warnings 12.2.0 → 12.3.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 +215 -99
- package/package.json +15 -15
- package/src/lib/api/warning-api/api.d.ts +1 -0
- package/src/lib/api/warning-api/hooks.d.ts +3 -0
- package/src/lib/components/PublicWarningList/ConfirmWarningDialog.d.ts +2 -2
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.stories.d.ts +9 -1
- package/src/lib/components/PublicWarningList/WarningListColumnContent.d.ts +2 -2
- package/src/lib/components/PublicWarningList/WarningListHeaderContent.d.ts +2 -2
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +1 -0
- package/src/lib/store/publicWarningForm/listener.d.ts +1 -1
- package/src/lib/store/publicWarningForm/reducer.d.ts +2 -2
- package/src/lib/store/publicWarningForm/selectors.d.ts +220 -44
- package/src/lib/store/publicWarnings/listener.d.ts +1 -1
- package/src/lib/store/publicWarnings/reducer.d.ts +1 -1
- package/src/lib/store/publicWarnings/selectors.d.ts +147 -19
- package/src/lib/store/publicWarnings/types.d.ts +1 -1
- package/src/lib/store/store.d.ts +9 -9
- package/src/lib/store/warningsDrawings/listener.d.ts +1 -1
- package/src/lib/store/warningsDrawings/reducer.d.ts +1 -1
- package/src/lib/store/warningsDrawings/selectors.d.ts +40 -4
- package/src/lib/store/warningsDrawings/types.d.ts +1 -1
- package/src/lib/storybookUtils/testUtils.d.ts +2 -0
- package/src/lib/utils/api.d.ts +0 -1
package/src/lib/store/store.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { SnackbarModuleStore } from '@opengeoweb/snackbar';
|
|
2
2
|
import { DrawtoolModuleStore, UIModuleState, WebMapStateModuleState } from '@opengeoweb/store';
|
|
3
|
-
import {
|
|
3
|
+
import { Store } from '@reduxjs/toolkit';
|
|
4
4
|
import { WarningModuleStore } from './types';
|
|
5
5
|
export declare const warningsReducersMap: {
|
|
6
|
-
webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").
|
|
7
|
-
layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").
|
|
8
|
-
ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").
|
|
9
|
-
drawingtools: import("redux").Reducer<import("dist/libs/store/src/store/drawingTool/reducer").DrawingToolState, import("redux").
|
|
6
|
+
webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").WebMapState>;
|
|
7
|
+
layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").UnknownAction, import("dist/libs/store/src/store/map/types").LayerState>;
|
|
8
|
+
ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").UnknownAction, import("dist/libs/store/src/store/ui/types").UIStoreType>;
|
|
9
|
+
drawingtools: import("redux").Reducer<import("dist/libs/store/src/store/drawingTool/reducer").DrawingToolState, import("redux").UnknownAction, import("dist/libs/store/src/store/drawingTool/reducer").DrawingToolState>;
|
|
10
10
|
drawings: import("redux").Reducer<import("./warningsDrawings/types").DrawState>;
|
|
11
11
|
publicWarningForm: import("redux").Reducer<import("./publicWarningForm/reducer").WarningFormState>;
|
|
12
12
|
publicWarnings: import("redux").Reducer<import("./publicWarnings/types").PublicWarningsState>;
|
|
13
|
-
snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").
|
|
14
|
-
syncGroups: import("redux").Reducer<import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState, import("redux").
|
|
13
|
+
snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").UnknownAction, import("dist/libs/snackbar/src/lib/store/types").SnackbarState>;
|
|
14
|
+
syncGroups: import("redux").Reducer<import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState, import("redux").UnknownAction, import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState>;
|
|
15
15
|
};
|
|
16
|
-
export declare const warningsMiddlewares: (import("@reduxjs/toolkit").ListenerMiddleware<WarningModuleStore, import("
|
|
17
|
-
export declare const createMockStore: (mockState?: WebMapStateModuleState | DrawtoolModuleStore | UIModuleState | WarningModuleStore | SnackbarModuleStore) =>
|
|
16
|
+
export declare const warningsMiddlewares: (import("@reduxjs/toolkit").ListenerMiddleware<WarningModuleStore, import("redux-thunk").ThunkDispatch<WarningModuleStore, unknown, import("redux").UnknownAction>, unknown> | import("@reduxjs/toolkit").ListenerMiddleware<SnackbarModuleStore, import("redux-thunk").ThunkDispatch<SnackbarModuleStore, unknown, import("redux").UnknownAction>, unknown>)[];
|
|
17
|
+
export declare const createMockStore: (mockState?: WebMapStateModuleState | DrawtoolModuleStore | UIModuleState | WarningModuleStore | SnackbarModuleStore) => Store;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WarningModuleStore } from '../types';
|
|
2
|
-
export declare const warningsDrawingsListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WarningModuleStore, import("
|
|
2
|
+
export declare const warningsDrawingsListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WarningModuleStore, import("redux-thunk").ThunkDispatch<WarningModuleStore, unknown, import("redux").UnknownAction>, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
2
|
import { DrawItem, DrawState, SetDrawValuesPayload, SubmitDrawValuesPayload } from './types';
|
|
3
|
-
export declare const drawAdapter: import("@reduxjs/toolkit").EntityAdapter<DrawItem>;
|
|
3
|
+
export declare const drawAdapter: import("@reduxjs/toolkit").EntityAdapter<DrawItem, string>;
|
|
4
4
|
export declare const initialState: DrawState;
|
|
5
5
|
export declare const warningsDrawingsReducer: import("redux").Reducer<DrawState>, warningsDrawingsActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
6
6
|
setDrawValues: (draft: Draft<DrawState>, action: PayloadAction<SetDrawValuesPayload>) => void;
|
|
@@ -1,9 +1,45 @@
|
|
|
1
1
|
import { DrawState } from './types';
|
|
2
2
|
import { WarningModuleStore } from '../types';
|
|
3
3
|
export declare const getDrawStore: (store: WarningModuleStore) => DrawState;
|
|
4
|
-
export declare const selectDrawByInstanceId: (state: WarningModuleStore, id:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export declare const selectDrawByInstanceId: (state: WarningModuleStore, id: string) => {
|
|
5
|
+
id: string;
|
|
6
|
+
objectName: string;
|
|
7
|
+
drawingInstanceId: string;
|
|
8
|
+
isFormDirty?: boolean | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const getWarningFormDirty: ((state: WarningModuleStore, id: string) => boolean) & {
|
|
8
11
|
clearCache: () => void;
|
|
12
|
+
resultsCount: () => number;
|
|
13
|
+
resetResultsCount: () => void;
|
|
14
|
+
} & {
|
|
15
|
+
resultFunc: (resultFuncArgs_0: {
|
|
16
|
+
id: string;
|
|
17
|
+
objectName: string;
|
|
18
|
+
drawingInstanceId: string;
|
|
19
|
+
isFormDirty?: boolean | undefined;
|
|
20
|
+
}) => boolean;
|
|
21
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
22
|
+
id: string;
|
|
23
|
+
objectName: string;
|
|
24
|
+
drawingInstanceId: string;
|
|
25
|
+
isFormDirty?: boolean | undefined;
|
|
26
|
+
}) => boolean) & {
|
|
27
|
+
clearCache: () => void;
|
|
28
|
+
resultsCount: () => number;
|
|
29
|
+
resetResultsCount: () => void;
|
|
30
|
+
};
|
|
31
|
+
lastResult: () => boolean;
|
|
32
|
+
dependencies: [(state: WarningModuleStore, id: string) => {
|
|
33
|
+
id: string;
|
|
34
|
+
objectName: string;
|
|
35
|
+
drawingInstanceId: string;
|
|
36
|
+
isFormDirty?: boolean | undefined;
|
|
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;
|
|
9
45
|
};
|
|
@@ -5,7 +5,7 @@ export interface DrawItem {
|
|
|
5
5
|
drawingInstanceId: string;
|
|
6
6
|
isFormDirty?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export type DrawState = EntityState<DrawItem>;
|
|
8
|
+
export type DrawState = EntityState<DrawItem, string>;
|
|
9
9
|
export type DrawingScope = 'user' | 'global';
|
|
10
10
|
export interface BaseDrawingListItem {
|
|
11
11
|
id: string;
|
|
@@ -5,5 +5,7 @@ export declare function fakeErrorRequest<ReturnType>(error: string): Promise<Ret
|
|
|
5
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
6
|
export declare const testPublicWarning: PublicWarning;
|
|
7
7
|
export declare const testDraftAirmet: Airmet | CancelAirmet;
|
|
8
|
+
export declare const testPublishedAirmet: Airmet | CancelAirmet;
|
|
8
9
|
export declare const testDraftAirmet2: Sigmet | CancelSigmet;
|
|
9
10
|
export declare const testDraftSigmet: Sigmet | CancelSigmet;
|
|
11
|
+
export declare const testPublishedSigmet: Sigmet | CancelSigmet;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ export interface WarningsApi {
|
|
|
19
19
|
}>;
|
|
20
20
|
saveWarningAs: (data: Warning) => Promise<string>;
|
|
21
21
|
updateWarning: (warningId: string, data: Warning) => Promise<void>;
|
|
22
|
-
deleteWarning: (warningId: string) => Promise<void>;
|
|
23
22
|
}
|
|
24
23
|
export declare const getApiRoutes: (axiosInstance: AxiosInstance) => WarningsApi;
|
|
25
24
|
export declare const getWarningsApi: () => WarningsApi;
|