@opengeoweb/warnings 15.1.0 → 15.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/index.esm.js +594 -582
- package/package.json +13 -14
- package/src/index.d.ts +1 -1
- package/src/lib/api/api-utils.d.ts +1 -1
- package/src/lib/api/aviation-api/hooks.d.ts +1 -1
- package/src/lib/api/warning-api/api.d.ts +1 -1
- package/src/lib/api/warning-api/hooks.d.ts +1 -1
- 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 +1 -1
- package/src/lib/components/FilterList/filter-utils.d.ts +1 -1
- package/src/lib/components/MaritimeWarningsForm/utils.d.ts +1 -1
- package/src/lib/components/PublicWarningList/NewWarningButton/NewWarningButton.d.ts +1 -1
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +1 -1
- package/src/lib/components/PublicWarningList/WarningListColumnContent.d.ts +1 -1
- package/src/lib/components/PublicWarningList/WarningListItem.d.ts +1 -1
- package/src/lib/components/PublicWarningList/WarningListItemMenu.d.ts +2 -2
- package/src/lib/components/PublicWarningList/WarningListItemSeperator.d.ts +1 -1
- package/src/lib/components/PublicWarningsForm/LevelField/LevelField.d.ts +1 -1
- package/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +1 -1
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +2 -2
- package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.d.ts +1 -1
- package/src/lib/components/PublicWarningsFormDialog/AviationWarningCancelDialogContent.d.ts +1 -1
- package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts +1 -1
- package/src/lib/store/index.d.ts +2 -2
- package/src/lib/store/store.d.ts +2 -2
- package/src/lib/store/types.d.ts +4 -4
- package/src/lib/store/warningsFilters/index.d.ts +1 -0
- package/src/lib/store/warningsFilters/reducer.d.ts +11 -0
- package/src/lib/store/warningsFilters/selectors.d.ts +62 -0
- package/src/lib/store/warningsFilters/types.d.ts +7 -0
- package/src/lib/store/warningsForm/index.d.ts +2 -0
- package/src/lib/store/warningsForm/listener.d.ts +2 -0
- package/src/lib/store/{publicWarningForm → warningsForm}/reducer.d.ts +2 -2
- package/src/lib/store/{publicWarningForm → warningsForm}/selectors.d.ts +1 -43
- package/src/lib/storybookUtils/testUtils.d.ts +1 -1
- package/src/lib/utils/fakeApi/index.d.ts +1 -1
- package/src/lib/utils/sig-airmet-util.d.ts +2 -2
- package/src/lib/utils/warningUtils.d.ts +2 -2
- package/src/lib/store/publicWarningForm/index.d.ts +0 -2
- package/src/lib/store/publicWarningForm/listener.d.ts +0 -2
- package/src/lib/store/publicWarnings/index.d.ts +0 -2
- package/src/lib/store/publicWarnings/listener.d.ts +0 -3
- package/src/lib/store/publicWarnings/reducer.d.ts +0 -13
- package/src/lib/store/publicWarnings/selectors.d.ts +0 -166
- package/src/lib/store/publicWarnings/types.d.ts +0 -19
- /package/src/lib/{store/publicWarningForm/reducer.spec.d.ts → api/api-utils.spec.d.ts} +0 -0
- /package/src/lib/store/{publicWarningForm → warningsFilters}/selectors.spec.d.ts +0 -0
- /package/src/lib/store/{publicWarnings/listener.spec.d.ts → warningsForm/reducer.spec.d.ts} +0 -0
- /package/src/lib/store/{publicWarnings → warningsForm}/selectors.spec.d.ts +0 -0
- /package/src/lib/store/{publicWarningForm → warningsForm}/types.d.ts +0 -0
- /package/src/lib/store/{publicWarningForm → warningsForm}/utils.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.2.0",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,25 +8,24 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/api": "15.
|
|
12
|
-
"@opengeoweb/shared": "15.
|
|
13
|
-
"@opengeoweb/store": "15.
|
|
14
|
-
"@opengeoweb/webmap-react": "15.
|
|
11
|
+
"@opengeoweb/api": "15.2.0",
|
|
12
|
+
"@opengeoweb/shared": "15.2.0",
|
|
13
|
+
"@opengeoweb/store": "15.2.0",
|
|
14
|
+
"@opengeoweb/webmap-react": "15.2.0",
|
|
15
15
|
"@tanstack/react-query": "^5.85.5",
|
|
16
16
|
"react-redux": "^9.2.0",
|
|
17
|
-
"@opengeoweb/theme": "15.
|
|
18
|
-
"@opengeoweb/form-fields": "15.
|
|
17
|
+
"@opengeoweb/theme": "15.2.0",
|
|
18
|
+
"@opengeoweb/form-fields": "15.2.0",
|
|
19
19
|
"react-hook-form": "^7.50.1",
|
|
20
20
|
"lodash": "^4.17.21",
|
|
21
21
|
"@reduxjs/toolkit": "^2.6.1",
|
|
22
|
-
"@opengeoweb/snackbar": "15.
|
|
23
|
-
"react-window": "^
|
|
24
|
-
"react-virtualized-auto-sizer": "^1.0.20",
|
|
22
|
+
"@opengeoweb/snackbar": "15.2.0",
|
|
23
|
+
"react-window": "^2.2.6",
|
|
25
24
|
"axios": "^1.7.7",
|
|
26
|
-
"@opengeoweb/core": "15.
|
|
27
|
-
"@opengeoweb/webmap": "15.
|
|
28
|
-
"@opengeoweb/authentication": "15.
|
|
29
|
-
"@opengeoweb/sigmet-airmet": "15.
|
|
25
|
+
"@opengeoweb/core": "15.2.0",
|
|
26
|
+
"@opengeoweb/webmap": "15.2.0",
|
|
27
|
+
"@opengeoweb/authentication": "15.2.0",
|
|
28
|
+
"@opengeoweb/sigmet-airmet": "15.2.0",
|
|
30
29
|
"react-i18next": "^15.1.1",
|
|
31
30
|
"i18next": "^25.0.1",
|
|
32
31
|
"@mui/material": "^7.0.1",
|
package/src/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export * from './lib/components/ComponentsLookUp';
|
|
|
7
7
|
export * from './lib/store';
|
|
8
8
|
export { WARN_NAMESPACE } from './lib/utils/i18n';
|
|
9
9
|
export { warningsTranslations };
|
|
10
|
-
export * as publicWarningsSelectors from './lib/store/
|
|
10
|
+
export * as publicWarningsSelectors from './lib/store/warningsFilters/selectors';
|
|
11
11
|
export type * from './lib/store/types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TimeFilter } from '../components/FilterList/filter-utils';
|
|
2
|
-
import type { Warning } from '../store/
|
|
2
|
+
import type { Warning } from '../store/warningsForm/types';
|
|
3
3
|
interface WarningsResponse {
|
|
4
4
|
combinedWarnings: Warning[];
|
|
5
5
|
refetchWarnings: () => void;
|
|
@@ -2,7 +2,7 @@ import type { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
|
2
2
|
import type { AirmetConfig, AirmetFromBackend, SigmetConfig, SigmetFromBackend } from '@opengeoweb/api';
|
|
3
3
|
import type { AirmetFromFrontend, AviationProduct, SigmetFromFrontend } from '@opengeoweb/sigmet-airmet';
|
|
4
4
|
import type { TimeFilter } from '../../components/FilterList/filter-utils';
|
|
5
|
-
import type { WarningType } from '../../store/
|
|
5
|
+
import type { WarningType } from '../../store/warningsForm/types';
|
|
6
6
|
interface TACData {
|
|
7
7
|
data: string;
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Credentials } from '@opengeoweb/authentication';
|
|
2
2
|
import type { MaritimeWarningsConfig } from '../../components/MaritimeWarningsForm/types';
|
|
3
|
-
import type { MaritimeWarning, MaritimeWarningsType, PublicWarning } from '../../store/publicWarningForm/types';
|
|
4
3
|
import type { DrawingFromBE, DrawingFromFE, DrawingListItem, FetchDrawingParams } from '../../store/warningsDrawings/types';
|
|
4
|
+
import type { MaritimeWarning, MaritimeWarningsType, PublicWarning } from '../../store/warningsForm/types';
|
|
5
5
|
export declare const getPublicWarningList: (auth: Credentials, apiParams?: Record<string, string>) => Promise<PublicWarning[]>;
|
|
6
6
|
export declare const updatePublicWarningEditor: (warningId: string, isEditor: boolean, auth: Credentials, force?: boolean) => Promise<Headers | null>;
|
|
7
7
|
export declare const updatePublicWarning: (warningId: string, auth: Credentials, data: PublicWarning) => Promise<Headers | null>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import type { TimeFilter } from '../../components/FilterList/filter-utils';
|
|
3
3
|
import type { MaritimeWarningsConfig } from '../../components/MaritimeWarningsForm/types';
|
|
4
|
-
import type { MaritimeWarning, MaritimeWarningsType, PublicWarning } from '../../store/publicWarningForm/types';
|
|
5
4
|
import type { DrawingFromBE, DrawingFromFE, DrawingListItem, FetchDrawingParams } from '../../store/warningsDrawings/types';
|
|
5
|
+
import type { MaritimeWarning, MaritimeWarningsType, PublicWarning } from '../../store/warningsForm/types';
|
|
6
6
|
/**
|
|
7
7
|
* @param disabled - Disables fetching, but still returns cached values.
|
|
8
8
|
* https://tanstack.com/query/v4/docs/framework/react/guides/disabling-queries
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
|
|
3
3
|
import type { uiTypes } from '@opengeoweb/store';
|
|
4
4
|
import type { AreaObjectFilterProps } from './AreaObjectFilter';
|
|
5
|
-
import type { Area } from '../../store/publicWarningForm/types';
|
|
6
5
|
import type { DrawingListItem } from '../../store/warningsDrawings/types';
|
|
6
|
+
import type { Area } from '../../store/warningsForm/types';
|
|
7
7
|
export declare const areaErrorType = "area";
|
|
8
8
|
export declare const AreaObjectLoader: React.FC<{
|
|
9
9
|
bounds?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import type { FC } from 'react';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import type { Area } from '../../store/publicWarningForm/types';
|
|
5
4
|
import type { DrawingListItem } from '../../store/warningsDrawings/types';
|
|
5
|
+
import type { Area } from '../../store/warningsForm/types';
|
|
6
6
|
interface ObjectAreaList {
|
|
7
7
|
title: string;
|
|
8
8
|
items: DrawingListItem[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { defaultDomainFilter, defaultPhenomenonFilter, TimeFilter } from './filter-utils';
|
|
2
2
|
import { AllPhenomenaKeys, defaultEmptyFilter, defaultLevelFilter, Domain } from './filter-utils';
|
|
3
|
-
import type { Warning } from '../../store/
|
|
3
|
+
import type { Warning } from '../../store/warningsForm/types';
|
|
4
4
|
export interface PickedFilterState {
|
|
5
5
|
source: Partial<typeof defaultEmptyFilter>;
|
|
6
6
|
domain: Partial<typeof defaultDomainFilter>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AirmetPhenomena, SigmetPhenomena } from '@opengeoweb/api';
|
|
2
|
-
import type { Warning } from '../../store/
|
|
2
|
+
import type { Warning } from '../../store/warningsForm/types';
|
|
3
3
|
export declare enum Domain {
|
|
4
4
|
aviation = "aviation",
|
|
5
5
|
maritime = "maritime",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MaritimeWarningItem, MaritimeWarningsConfig, MaritimeWarningsDomain } from './types';
|
|
2
|
-
import type { MaritimeWarning, MaritimeWarningsType } from '../../store/
|
|
2
|
+
import type { MaritimeWarning, MaritimeWarningsType } from '../../store/warningsForm/types';
|
|
3
3
|
export declare const isWarningsValid: (warnings: MaritimeWarningItem[], config: MaritimeWarningsConfig, allowEmpty?: boolean) => boolean;
|
|
4
4
|
export declare const getType: (domain: MaritimeWarningsDomain) => MaritimeWarningsType;
|
|
5
5
|
export declare const mapItemsToMaritimeWarnings: (warnings: MaritimeWarningItem[], domain: MaritimeWarningsDomain, maritimeConfig: MaritimeWarningsConfig, editor?: string, shouldExtend?: boolean) => MaritimeWarning[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WarningType } from '../../../store/
|
|
2
|
+
import type { WarningType } from '../../../store/warningsForm/types';
|
|
3
3
|
export declare const BUTTON_AIRMET = "AIRMET";
|
|
4
4
|
export declare const BUTTON_SIGMET = "SIGMET";
|
|
5
5
|
export interface NewWarningButtonProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WarningListItemActions } from './WarningListItemMenu';
|
|
3
|
-
import type { Warning } from '../../store/
|
|
3
|
+
import type { Warning } from '../../store/warningsForm/types';
|
|
4
4
|
import type { FilterHookState } from '../FilterList/filter-hooks';
|
|
5
5
|
export interface PublicWarningListProps extends WarningListItemActions {
|
|
6
6
|
warnings: Warning[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GridProps } from '@mui/material';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { PublicWarningStatus } from '../../store/
|
|
3
|
+
import { PublicWarningStatus } from '../../store/warningsForm/types';
|
|
4
4
|
export declare const WarningListColumnContent: React.FC<GridProps & {
|
|
5
5
|
title?: string;
|
|
6
6
|
status: PublicWarningStatus;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ListItemProps } from '@mui/material';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { WarningListItemActions } from './WarningListItemMenu';
|
|
4
|
-
import type { Warning } from '../../store/
|
|
4
|
+
import type { Warning } from '../../store/warningsForm/types';
|
|
5
5
|
export interface WarningListItemProps extends ListItemProps, WarningListItemActions {
|
|
6
6
|
warning: Warning;
|
|
7
7
|
highlightedItem?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import type { MenuItemType } from '@opengeoweb/shared';
|
|
3
3
|
import { ProductAction } from '@opengeoweb/sigmet-airmet';
|
|
4
|
-
import type { MaritimeWarning, Warning } from '../../store/
|
|
5
|
-
import { MaritimeWarningAction } from '../../store/
|
|
4
|
+
import type { MaritimeWarning, Warning } from '../../store/warningsForm/types';
|
|
5
|
+
import { MaritimeWarningAction } from '../../store/warningsForm/types';
|
|
6
6
|
export interface WarningListItemActions {
|
|
7
7
|
onEditWarning?: (warning: Warning) => void;
|
|
8
8
|
onDeleteWarning?: (warningId: string, warningEditor?: string) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ListItemProps } from '@mui/material';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { PublicWarningStatus } from '../../store/
|
|
3
|
+
import type { PublicWarningStatus } from '../../store/warningsForm/types';
|
|
4
4
|
import type { TimeFilter } from '../FilterList/filter-utils';
|
|
5
5
|
declare const WarningListItemSeperator: React.FC<{
|
|
6
6
|
totalWarnings: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FilterTranslation } from '../../../store/
|
|
2
|
+
import type { FilterTranslation } from '../../../store/warningsFilters/types';
|
|
3
3
|
export declare const getWarningPhenomenaIcon: (key: string) => React.ReactElement | undefined;
|
|
4
4
|
export declare const getAviationPhenomenaIcon: (key: string) => React.ReactElement | undefined;
|
|
5
5
|
export declare const warningPhenomena: FilterTranslation[];
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import type { AirmetFromBackend, SigmetFromBackend } from '@opengeoweb/api';
|
|
4
4
|
import type { AviationProduct, FormMode, ProductStatus } from '@opengeoweb/sigmet-airmet';
|
|
5
5
|
import type { MapPreset } from '@opengeoweb/store';
|
|
6
|
-
import type { FormError } from '../../store/publicWarningForm/reducer';
|
|
7
|
-
import type { Area, PublicWarningDetail, WarningType } from '../../store/publicWarningForm/types';
|
|
8
6
|
import type { BaseDrawingListItem, DrawingListItem } from '../../store/warningsDrawings/types';
|
|
9
7
|
import type { WarningLevel } from './LevelField';
|
|
8
|
+
import type { FormError } from '../../store/warningsForm/reducer';
|
|
9
|
+
import type { Area, PublicWarningDetail, WarningType } from '../../store/warningsForm/types';
|
|
10
10
|
export declare const useScrollTopOnError: (error: FormError) => React.RefObject<HTMLDivElement>;
|
|
11
11
|
export declare const getEmptyPublicWarning: () => PublicWarningDetail;
|
|
12
12
|
export declare const getFormData: (publicWarningsDetails: PublicWarningDetail | undefined, object?: DrawingListItem) => FormData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AviationProduct, FormMode } from '@opengeoweb/sigmet-airmet';
|
|
3
3
|
import type { MapPreset } from '@opengeoweb/store';
|
|
4
|
-
import type { WarningType } from '../../store/
|
|
4
|
+
import type { WarningType } from '../../store/warningsForm/types';
|
|
5
5
|
export interface PublicWarningsFormConnectProps {
|
|
6
6
|
editor?: string;
|
|
7
7
|
selectedAviationProduct?: AviationProduct & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AviationProduct } from '@opengeoweb/sigmet-airmet';
|
|
3
|
-
import type { WarningType } from '../../store/
|
|
3
|
+
import type { WarningType } from '../../store/warningsForm/types';
|
|
4
4
|
export declare const CancelAviationDialogContent: ({ product, warningType, errorMessage, }: {
|
|
5
5
|
product: AviationProduct;
|
|
6
6
|
warningType: WarningType;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { Position, DraggableSize, HeaderSize } from '@opengeoweb/shared';
|
|
3
3
|
import type { AviationProduct } from '@opengeoweb/sigmet-airmet';
|
|
4
4
|
import type { uiTypes } from '@opengeoweb/store';
|
|
5
|
-
import type { WarningType } from '../../store/
|
|
5
|
+
import type { WarningType } from '../../store/warningsForm/types';
|
|
6
6
|
export interface PublicWarningsFormDialogProps {
|
|
7
7
|
bounds?: string;
|
|
8
8
|
onClose: () => void;
|
package/src/lib/store/index.d.ts
CHANGED
package/src/lib/store/store.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare const warningsReducersMap: {
|
|
|
8
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
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
|
-
|
|
12
|
-
|
|
11
|
+
warningsForm: import("redux").Reducer<import("./warningsForm/reducer").WarningFormState>;
|
|
12
|
+
warningsFilters: import("redux").Reducer<import("./warningsFilters/types").WarningsFiltersState>;
|
|
13
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
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
|
};
|
package/src/lib/store/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CoreAppStore } from '@opengeoweb/store';
|
|
2
|
-
import type { WarningFormState } from './publicWarningForm/reducer';
|
|
3
|
-
import type { PublicWarningsState } from './publicWarnings/types';
|
|
4
2
|
import type { DrawState } from './warningsDrawings/types';
|
|
3
|
+
import type { WarningsFiltersState } from './warningsFilters/types';
|
|
4
|
+
import type { WarningFormState } from './warningsForm/reducer';
|
|
5
5
|
export interface WarningModuleStore extends CoreAppStore {
|
|
6
6
|
drawings?: DrawState;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
warningsForm?: WarningFormState;
|
|
8
|
+
warningsFilters?: WarningsFiltersState;
|
|
9
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { warningsFiltersReducer, warningsFiltersActions } from './reducer';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { WarningsFiltersState } from './types';
|
|
3
|
+
import type { FilterState } from '../../components/FilterList/filter-hooks';
|
|
4
|
+
export declare const initialState: WarningsFiltersState;
|
|
5
|
+
export declare const warningsFiltersReducer: import("redux").Reducer<WarningsFiltersState>, warningsFiltersActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
6
|
+
setWarningFilters: (draft: Draft<WarningsFiltersState>, action: PayloadAction<{
|
|
7
|
+
filterState: Partial<FilterState>;
|
|
8
|
+
panelId?: string;
|
|
9
|
+
systemUpdate: boolean;
|
|
10
|
+
}>) => void;
|
|
11
|
+
}, "warningsFilters">;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { WarningsFiltersState } from './types';
|
|
2
|
+
import type { FilterState } from '../../components/FilterList/filter-hooks';
|
|
3
|
+
import type { WarningModuleStore } 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: WarningsFiltersState, resultFuncArgs_1: string | undefined) => FilterState;
|
|
11
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => FilterState) & {
|
|
12
|
+
clearCache: () => void;
|
|
13
|
+
resultsCount: () => number;
|
|
14
|
+
resetResultsCount: () => void;
|
|
15
|
+
};
|
|
16
|
+
lastResult: () => FilterState;
|
|
17
|
+
dependencies: [(store: WarningModuleStore) => WarningsFiltersState, (_store: WarningModuleStore, panelId?: string) => string | undefined];
|
|
18
|
+
recomputations: () => number;
|
|
19
|
+
resetRecomputations: () => void;
|
|
20
|
+
dependencyRecomputations: () => number;
|
|
21
|
+
resetDependencyRecomputations: () => void;
|
|
22
|
+
} & {
|
|
23
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
24
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
25
|
+
};
|
|
26
|
+
export declare const getWarningsPresetById: ((state: WarningModuleStore, panelId?: string | undefined) => {
|
|
27
|
+
filterState: null;
|
|
28
|
+
} | {
|
|
29
|
+
filterState: FilterState;
|
|
30
|
+
}) & {
|
|
31
|
+
clearCache: () => void;
|
|
32
|
+
resultsCount: () => number;
|
|
33
|
+
resetResultsCount: () => void;
|
|
34
|
+
} & {
|
|
35
|
+
resultFunc: (resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => {
|
|
36
|
+
filterState: null;
|
|
37
|
+
} | {
|
|
38
|
+
filterState: FilterState;
|
|
39
|
+
};
|
|
40
|
+
memoizedResultFunc: ((resultFuncArgs_0: WarningsFiltersState, resultFuncArgs_1: string | undefined) => {
|
|
41
|
+
filterState: null;
|
|
42
|
+
} | {
|
|
43
|
+
filterState: FilterState;
|
|
44
|
+
}) & {
|
|
45
|
+
clearCache: () => void;
|
|
46
|
+
resultsCount: () => number;
|
|
47
|
+
resetResultsCount: () => void;
|
|
48
|
+
};
|
|
49
|
+
lastResult: () => {
|
|
50
|
+
filterState: null;
|
|
51
|
+
} | {
|
|
52
|
+
filterState: FilterState;
|
|
53
|
+
};
|
|
54
|
+
dependencies: [(store: WarningModuleStore) => WarningsFiltersState, (_store: WarningModuleStore, panelId?: string) => string | undefined];
|
|
55
|
+
recomputations: () => number;
|
|
56
|
+
resetRecomputations: () => void;
|
|
57
|
+
dependencyRecomputations: () => number;
|
|
58
|
+
resetDependencyRecomputations: () => void;
|
|
59
|
+
} & {
|
|
60
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
61
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
62
|
+
};
|
|
@@ -20,7 +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
|
|
23
|
+
export declare const warningsFormReducer: import("redux").Reducer<WarningFormState>, warningsFormActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
24
24
|
setFormValues: (draft: Draft<WarningFormState>, action: PayloadAction<{
|
|
25
25
|
object?: DrawingListItem;
|
|
26
26
|
warning?: Warning;
|
|
@@ -50,4 +50,4 @@ export declare const publicWarningFormReducer: import("redux").Reducer<WarningFo
|
|
|
50
50
|
}>) => void;
|
|
51
51
|
setSelectedWarningId: (draft: Draft<WarningFormState>, action: PayloadAction<string>) => void;
|
|
52
52
|
setWarningLevel: (draft: Draft<WarningFormState>, action: PayloadAction<WarningLevel | "">) => void;
|
|
53
|
-
}, "
|
|
53
|
+
}, "warningsForm">;
|
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
import type { WarningModuleStore } from '../types';
|
|
2
2
|
import type { WarningFormState } from './reducer';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const getPublicWarningObject: ((state: WarningModuleStore) => import("../warningsDrawings/types").DrawingListItem | undefined) & {
|
|
5
|
-
clearCache: () => void;
|
|
6
|
-
resultsCount: () => number;
|
|
7
|
-
resetResultsCount: () => void;
|
|
8
|
-
} & {
|
|
9
|
-
resultFunc: (resultFuncArgs_0: WarningFormState) => import("../warningsDrawings/types").DrawingListItem | undefined;
|
|
10
|
-
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => import("../warningsDrawings/types").DrawingListItem | undefined) & {
|
|
11
|
-
clearCache: () => void;
|
|
12
|
-
resultsCount: () => number;
|
|
13
|
-
resetResultsCount: () => void;
|
|
14
|
-
};
|
|
15
|
-
lastResult: () => import("../warningsDrawings/types").DrawingListItem | 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
|
-
};
|
|
3
|
+
export declare const selectWarningsFormState: (store: WarningModuleStore) => WarningFormState;
|
|
25
4
|
export declare const getPublicWarning: ((state: WarningModuleStore) => import("./types").Warning | undefined) & {
|
|
26
5
|
clearCache: () => void;
|
|
27
6
|
resultsCount: () => number;
|
|
@@ -127,27 +106,6 @@ export declare const getPublicWarningFormState: ((state: WarningModuleStore) =>
|
|
|
127
106
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
128
107
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
129
108
|
};
|
|
130
|
-
export declare const getPublicWarningFormError: ((state: WarningModuleStore) => import("./reducer").FormError | undefined) & {
|
|
131
|
-
clearCache: () => void;
|
|
132
|
-
resultsCount: () => number;
|
|
133
|
-
resetResultsCount: () => void;
|
|
134
|
-
} & {
|
|
135
|
-
resultFunc: (resultFuncArgs_0: WarningFormState) => import("./reducer").FormError | undefined;
|
|
136
|
-
memoizedResultFunc: ((resultFuncArgs_0: WarningFormState) => import("./reducer").FormError | undefined) & {
|
|
137
|
-
clearCache: () => void;
|
|
138
|
-
resultsCount: () => number;
|
|
139
|
-
resetResultsCount: () => void;
|
|
140
|
-
};
|
|
141
|
-
lastResult: () => import("./reducer").FormError | undefined;
|
|
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
109
|
export declare const getSelectedWarningId: ((state: WarningModuleStore) => string) & {
|
|
152
110
|
clearCache: () => void;
|
|
153
111
|
resultsCount: () => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Airmet, CancelAirmet, CancelSigmet, Sigmet } from '@opengeoweb/sigmet-airmet';
|
|
2
|
-
import type { PublicWarning } from '../store/
|
|
2
|
+
import type { PublicWarning } from '../store/warningsForm/types';
|
|
3
3
|
export declare const testGeoJSON: GeoJSON.FeatureCollection;
|
|
4
4
|
export declare function fakeErrorRequest<ReturnType>(error: string): Promise<ReturnType>;
|
|
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'>])";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RequestHandler } from 'msw';
|
|
2
2
|
import type { SigmetFromBackend } from '@opengeoweb/api';
|
|
3
|
-
import type { AirmetWarning, MaritimeWarning, PublicWarning, SigmetWarning, Warning } from '../../store/publicWarningForm/types';
|
|
4
3
|
import type { DrawingFromBE, DrawingListItem } from '../../store/warningsDrawings/types';
|
|
4
|
+
import type { AirmetWarning, MaritimeWarning, PublicWarning, SigmetWarning, Warning } from '../../store/warningsForm/types';
|
|
5
5
|
export declare const newSigmet: SigmetFromBackend;
|
|
6
6
|
declare const drawingList: DrawingListItem[];
|
|
7
7
|
declare const drawingsListFullContent: DrawingFromBE[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AirmetFromBackend, CancelAirmet, CancelSigmet, SigmetFromBackend } from '@opengeoweb/api';
|
|
2
2
|
import { ProductStatus } from '@opengeoweb/api';
|
|
3
3
|
import type { AviationProduct, ProductConfig } from '@opengeoweb/sigmet-airmet';
|
|
4
|
-
import type { Warning, AviationWarningDetails, AirmetWarning, SigmetWarning } from '../store/
|
|
5
|
-
import { PublicWarningStatus } from '../store/
|
|
4
|
+
import type { Warning, AviationWarningDetails, AirmetWarning, SigmetWarning } from '../store/warningsForm/types';
|
|
5
|
+
import { PublicWarningStatus } from '../store/warningsForm/types';
|
|
6
6
|
export declare function isCancelAirmet(warningDetail: AviationWarningDetails): warningDetail is CancelAirmet;
|
|
7
7
|
export declare function isCancelSigmet(warningDetail: AviationWarningDetails): warningDetail is CancelSigmet;
|
|
8
8
|
export declare const flattenPublicWarning: (publicWarning: Warning) => Partial<AviationWarningDetails>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
import type { PickedFilterState, OptionKey } from '../components/FilterList/filter-hooks';
|
|
3
|
-
import { PublicWarningStatus } from '../store/
|
|
4
|
-
import type { Warning } from '../store/
|
|
3
|
+
import { PublicWarningStatus } from '../store/warningsForm/types';
|
|
4
|
+
import type { Warning } from '../store/warningsForm/types';
|
|
5
5
|
export declare const ERROR_NOT_FOUND = "Request failed with status code 400";
|
|
6
6
|
export declare const MOCK_USERNAME = "user.name";
|
|
7
7
|
interface OverflowCheckResult {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { WarningModuleStore } from '../types';
|
|
2
|
-
export declare const publicWarningFormListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WarningModuleStore, import("redux-thunk").ThunkDispatch<WarningModuleStore, unknown, import("redux").UnknownAction>, unknown>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { WarningModuleStore } from '../types';
|
|
2
|
-
export declare const getLastUpdatedTimeFormatted: () => string;
|
|
3
|
-
export declare const publicWarningsListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WarningModuleStore, import("redux-thunk").ThunkDispatch<WarningModuleStore, unknown, import("redux").UnknownAction>, unknown>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import type { PublicWarningsState } from './types';
|
|
3
|
-
import type { FilterState } from '../../components/FilterList/filter-hooks';
|
|
4
|
-
import type { Warning } from '../publicWarningForm/types';
|
|
5
|
-
export declare const publicWarningsAdapter: import("@reduxjs/toolkit").EntityAdapter<Warning, string>;
|
|
6
|
-
export declare const initialState: PublicWarningsState;
|
|
7
|
-
export declare const publicWarningsReducer: import("redux").Reducer<PublicWarningsState>, publicWarningActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
8
|
-
setWarningFilters: (draft: Draft<PublicWarningsState>, action: PayloadAction<{
|
|
9
|
-
filterState: Partial<FilterState>;
|
|
10
|
-
panelId?: string;
|
|
11
|
-
systemUpdate: boolean;
|
|
12
|
-
}>) => void;
|
|
13
|
-
}, "publicWarnings">;
|