@opengeoweb/warnings 9.35.0 → 9.36.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 +793 -772
- package/package.json +2 -3
- package/src/lib/aviation-api/hooks.d.ts +2 -1
- package/src/lib/components/FilterList/ExpandableFilterChip.d.ts +2 -2
- package/src/lib/components/FilterList/{FilterChipWithOptions.stories.d.ts → ExpandableFilterChip.stories.d.ts} +2 -2
- package/src/lib/components/FilterList/FilterList.d.ts +0 -2
- package/src/lib/components/FilterList/filter-hooks.d.ts +5 -1
- package/src/lib/components/FilterList/filter-utils.d.ts +4 -0
- package/src/lib/components/PublicWarningList/NewWarningButton/NewWarningButton.d.ts +4 -1
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +3 -4
- package/src/lib/components/PublicWarningList/PublicWarningList.stories.d.ts +20 -0
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.aviation.integration.spec.d.ts +1 -0
- package/src/lib/components/PublicWarningList/WarningListItem.d.ts +1 -0
- package/src/lib/components/PublicWarningList/WarningListItem.spec.d.ts +1 -0
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +7 -3
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.stories.d.ts +6 -8
- package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.d.ts +3 -3
- package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts +2 -1
- package/src/lib/store/publicWarningForm/reducer.d.ts +3 -1
- package/src/lib/store/publicWarningForm/selectors.d.ts +5 -0
- package/src/lib/store/publicWarningForm/types.d.ts +2 -0
- package/src/lib/store/publicWarnings/reducer.d.ts +1 -9
- package/src/lib/store/publicWarnings/selectors.d.ts +2 -19
- package/src/lib/store/publicWarnings/types.d.ts +0 -22
- package/src/lib/storybookUtils/SimpleLinkMenu.d.ts +6 -0
- package/src/lib/utils/fakeApi/index.d.ts +4 -1
- package/src/lib/utils/sig-airmet-util.d.ts +2 -2
- package/src/lib/components/FilterList/FilterChipWithOptions.d.ts +0 -7
- package/src/lib/components/FilterList/FilterChipWithOptionsConnect.d.ts +0 -7
- package/src/lib/store/publicWarnings/utils.d.ts +0 -24
- /package/src/lib/components/FilterList/{FilterChipWithOptions.spec.d.ts → ExpandableFilterChip.spec.d.ts} +0 -0
- /package/src/lib/{store/publicWarnings/utils.spec.d.ts → components/FilterList/filter-utils.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.36.0",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"@opengeoweb/sigmet-airmet": "*",
|
|
30
30
|
"react-i18next": "^15.1.1",
|
|
31
31
|
"i18next": "^23.11.5",
|
|
32
|
-
"@mui/material": "^6.1.1"
|
|
33
|
-
"immer": "^10.0.3"
|
|
32
|
+
"@mui/material": "^6.1.1"
|
|
34
33
|
},
|
|
35
34
|
"peerDependencies": {
|
|
36
35
|
"react": "18",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { AirmetConfig, AirmetFromBackend, SigmetConfig, SigmetFromBackend } from '@opengeoweb/api';
|
|
3
3
|
import { AviationProduct } from '@opengeoweb/sigmet-airmet';
|
|
4
|
+
import { WarningType } from '../store/publicWarningForm/types';
|
|
4
5
|
export declare const useAirmetList: (disabled?: boolean) => UseQueryResult<AirmetFromBackend[]>;
|
|
5
6
|
export declare const useSigmetList: (disabled?: boolean) => UseQueryResult<SigmetFromBackend[]>;
|
|
6
|
-
export declare const useProductConfig: (warningType
|
|
7
|
+
export declare const useProductConfig: (warningType?: WarningType, disabled?: boolean) => UseQueryResult<SigmetConfig | AirmetConfig>;
|
|
7
8
|
type FetchTACData = Promise<{
|
|
8
9
|
data: string;
|
|
9
10
|
}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PickedFilterState, UpdateFilter } from './filter-hooks';
|
|
3
3
|
type IdType = keyof PickedFilterState;
|
|
4
|
-
interface
|
|
4
|
+
export interface ExpandableFilterChipProps {
|
|
5
5
|
id: IdType;
|
|
6
6
|
options: PickedFilterState[IdType];
|
|
7
7
|
updateFilter: UpdateFilter;
|
|
8
8
|
}
|
|
9
|
-
declare const ExpandableFilterChip: React.FC<
|
|
9
|
+
declare const ExpandableFilterChip: React.FC<ExpandableFilterChipProps>;
|
|
10
10
|
export default ExpandableFilterChip;
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const ExpandableFilterChipLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
parameters: {
|
|
9
9
|
zeplinLink: {
|
|
@@ -13,7 +13,7 @@ export declare const FilterChipWithOptionsLight: {
|
|
|
13
13
|
};
|
|
14
14
|
tags: string[];
|
|
15
15
|
};
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const ExpandableFilterChipDark: {
|
|
17
17
|
(): React.ReactElement;
|
|
18
18
|
tags: string[];
|
|
19
19
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { WarningListFilter } from '../../store/publicWarnings/types';
|
|
3
2
|
import { PickedFilterState, UpdateFilter } from './filter-hooks';
|
|
4
3
|
interface FilterListProps {
|
|
5
|
-
filters?: WarningListFilter[];
|
|
6
4
|
onClickAll?: (isChecked: boolean) => void;
|
|
7
5
|
isAllSelected?: boolean;
|
|
8
6
|
filterState: PickedFilterState;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
2
|
-
import { defaultDomainFilter, defaultLevelFilter, defaultPhenomenonFilter } from './filter-utils';
|
|
2
|
+
import { defaultDomainFilter, defaultEmptyFilter, defaultLevelFilter, defaultPhenomenonFilter } from './filter-utils';
|
|
3
3
|
export interface PickedFilterState {
|
|
4
|
+
incident: Partial<typeof defaultEmptyFilter>;
|
|
5
|
+
source: Partial<typeof defaultEmptyFilter>;
|
|
4
6
|
domain: Partial<typeof defaultDomainFilter>;
|
|
5
7
|
phenomenon: Partial<typeof defaultPhenomenonFilter>;
|
|
6
8
|
level: Partial<typeof defaultLevelFilter>;
|
|
7
9
|
}
|
|
8
10
|
interface FilterState extends PickedFilterState {
|
|
11
|
+
incident: typeof defaultEmptyFilter;
|
|
12
|
+
source: typeof defaultEmptyFilter;
|
|
9
13
|
domain: typeof defaultDomainFilter;
|
|
10
14
|
phenomenon: typeof defaultPhenomenonFilter;
|
|
11
15
|
level: typeof defaultLevelFilter;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
1
2
|
export declare enum Domain {
|
|
2
3
|
aviation = "aviation",
|
|
3
4
|
maritime = "maritime",
|
|
@@ -20,9 +21,11 @@ export declare enum Phenomenon {
|
|
|
20
21
|
lowTemp = "lowTemp",
|
|
21
22
|
coastalEvent = "coastalEvent"
|
|
22
23
|
}
|
|
24
|
+
export declare const emptyFilterId = "unspecified";
|
|
23
25
|
export declare const defaultDomainFilter: Record<Domain, boolean>;
|
|
24
26
|
export declare const domainLevels: Record<Domain, Level[]>;
|
|
25
27
|
export declare const defaultLevelFilter: Record<Level | 'unspecified', boolean>;
|
|
28
|
+
export declare const defaultEmptyFilter: Record<string, boolean>;
|
|
26
29
|
export declare const defaultPhenomenonFilter: Record<Phenomenon | 'unspecified', boolean>;
|
|
27
30
|
type OptionsType = Partial<Record<Domain | Level | Phenomenon, boolean>>;
|
|
28
31
|
interface OptionsMetadata {
|
|
@@ -35,4 +38,5 @@ export declare const useSelectedOptions: (options: OptionsType) => OptionsMetada
|
|
|
35
38
|
export declare const updateState: <T extends string>(state: Record<T, boolean>, optionKey: T | 'ALL', value: boolean, only?: boolean) => Record<T, boolean>;
|
|
36
39
|
/** Make sure our value is in the filter */
|
|
37
40
|
export declare const getValue: <T>(values: Record<string, T>, value: string) => T | 'unspecified';
|
|
41
|
+
export declare const getFiltersFromWarnings: (warnings: PublicWarning[], filterKey: string) => string[];
|
|
38
42
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { WarningType } from '../../../store/publicWarningForm/types';
|
|
3
|
+
export declare const BUTTON_AIRMET = "AIRMET";
|
|
4
|
+
export declare const BUTTON_SIGMET = "SIGMET";
|
|
2
5
|
interface NewWarningButtonProps {
|
|
3
|
-
onCreateWarning: () => void;
|
|
6
|
+
onCreateWarning: (warningType?: WarningType) => void;
|
|
4
7
|
isDefaultOpen?: boolean;
|
|
5
8
|
}
|
|
6
9
|
export declare const NewWarningButton: React.FC<NewWarningButtonProps>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
3
|
-
import { WarningListFilter } from '../../store/publicWarnings/types';
|
|
4
3
|
import { FilterHookState } from '../FilterList/filter-hooks';
|
|
5
4
|
import { WarningListItemActions } from './WarningListItemMenu';
|
|
6
5
|
export interface PublicWarningListProps extends WarningListItemActions {
|
|
@@ -12,10 +11,10 @@ export interface PublicWarningListProps extends WarningListItemActions {
|
|
|
12
11
|
lastUpdatedTime?: string;
|
|
13
12
|
onCreateWarning?: () => void;
|
|
14
13
|
onRefetchWarnings?: () => void;
|
|
15
|
-
filters?: WarningListFilter[];
|
|
16
14
|
filterHookState: FilterHookState;
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
hoveredFeatureId?: string;
|
|
16
|
+
expandedSections: Record<string, boolean>;
|
|
17
|
+
setExpandedSections: (expandedSections: Record<string, boolean>) => void;
|
|
19
18
|
}
|
|
20
19
|
export declare const PublicWarningList: React.FC<PublicWarningListProps>;
|
|
21
20
|
export default PublicWarningList;
|
|
@@ -23,6 +23,26 @@ export declare const PublicWarningListDark: {
|
|
|
23
23
|
}[];
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
+
export declare const PublicWarningListAviation: {
|
|
27
|
+
(): React.ReactElement;
|
|
28
|
+
tags: string[];
|
|
29
|
+
parameters: {
|
|
30
|
+
zeplinLink: {
|
|
31
|
+
name: string;
|
|
32
|
+
link: string;
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export declare const PublicWarningListPublicAndAviation: {
|
|
37
|
+
(): React.ReactElement;
|
|
38
|
+
tags: string[];
|
|
39
|
+
parameters: {
|
|
40
|
+
zeplinLink: {
|
|
41
|
+
name: string;
|
|
42
|
+
link: string;
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
26
46
|
export declare const PublicWarningListError: () => React.ReactElement;
|
|
27
47
|
export declare const PublicWarningListLoading: () => React.ReactElement;
|
|
28
48
|
export declare const PublicWarningListSmallLight: {
|
package/src/lib/components/PublicWarningList/PublicWarningListConnect.aviation.integration.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
|
4
4
|
import { WarningListItemActions } from './WarningListItemMenu';
|
|
5
5
|
export interface WarningListItemProps extends ListItemProps, WarningListItemActions {
|
|
6
6
|
warning: PublicWarning;
|
|
7
|
+
highlightedItem?: boolean;
|
|
7
8
|
activeWarningId: string;
|
|
8
9
|
onSelectWarning?: (warning: PublicWarning) => void;
|
|
9
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AviationProduct, FormMode } from '@opengeoweb/sigmet-airmet';
|
|
3
|
+
import { FeatureCollection, GeoJsonProperties, Geometry } from 'geojson';
|
|
3
4
|
import { MapPreset } from '@opengeoweb/store';
|
|
4
|
-
import { PublicWarningDetail } from '../../store/publicWarningForm/types';
|
|
5
|
+
import { PublicWarningDetail, WarningType } from '../../store/publicWarningForm/types';
|
|
5
6
|
import { BaseDrawingListItem, DrawingListItem } from '../../store/drawings/types';
|
|
7
|
+
import { WarningLevel } from './LevelField';
|
|
6
8
|
import { FormAction, FormError } from '../../store/publicWarningForm/reducer';
|
|
7
9
|
export declare const useScrollTopOnError: (error: FormError) => React.RefObject<HTMLDivElement>;
|
|
8
10
|
export declare const getEmptyPublicWarning: () => PublicWarningDetail;
|
|
@@ -13,7 +15,7 @@ interface FormData extends PublicWarningDetail {
|
|
|
13
15
|
'translation-select'?: string;
|
|
14
16
|
}
|
|
15
17
|
export declare const prepareFormValues: (data: FormData) => PublicWarningDetail;
|
|
16
|
-
interface FormProps {
|
|
18
|
+
export interface FormProps {
|
|
17
19
|
formAction?: FormAction;
|
|
18
20
|
defaultMapPreset?: MapPreset;
|
|
19
21
|
onSaveForm?: (formValues: PublicWarningDetail) => void;
|
|
@@ -26,8 +28,10 @@ interface FormProps {
|
|
|
26
28
|
isSnapshot?: boolean;
|
|
27
29
|
onAddObject?: () => void;
|
|
28
30
|
selectedAviationProduct?: AviationProduct;
|
|
29
|
-
|
|
31
|
+
warningType?: WarningType;
|
|
30
32
|
mode?: FormMode;
|
|
31
33
|
}
|
|
34
|
+
export declare function warningLevelFeatureColors(level: WarningLevel | undefined, geoJSON: FeatureCollection<Geometry, GeoJsonProperties> | undefined, // Allow undefined
|
|
35
|
+
isAviationWarning?: boolean): FeatureCollection<Geometry, GeoJsonProperties>;
|
|
32
36
|
export declare const PublicWarningsForm: React.FC<FormProps>;
|
|
33
37
|
export {};
|
|
@@ -27,11 +27,9 @@ export declare const PublicWarningsReadOnlyFormDemo: () => React.ReactElement;
|
|
|
27
27
|
export declare const PublicWarningsReadOnlyFormDemoDark: () => React.ReactElement;
|
|
28
28
|
export declare const PublicWarningsDisabledFormDemo: () => React.ReactElement;
|
|
29
29
|
export declare const PublicWarningsDisabledFormDemoDark: () => React.ReactElement;
|
|
30
|
-
export declare const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export declare const
|
|
35
|
-
|
|
36
|
-
storyName: string;
|
|
37
|
-
};
|
|
30
|
+
export declare const PublicWarningsFormAirmetDraftLight: () => React.ReactElement;
|
|
31
|
+
export declare const PublicWarningsFormAirmetDraftDark: () => React.ReactElement;
|
|
32
|
+
export declare const PublicWarningsFormAirmetCancels: () => React.ReactElement;
|
|
33
|
+
export declare const PublicWarningsFormAirmetCancelled: () => React.ReactElement;
|
|
34
|
+
export declare const PublicWarningsFormSigmetCancels: () => React.ReactElement;
|
|
35
|
+
export declare const PublicWarningsFormSigmetCancelled: () => React.ReactElement;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AviationProduct, FormMode } from '@opengeoweb/sigmet-airmet';
|
|
3
3
|
import { MapPreset } from '@opengeoweb/store';
|
|
4
|
-
|
|
4
|
+
import { WarningType } from '../../store/publicWarningForm/types';
|
|
5
|
+
export interface PublicWarningsFormConnectProps {
|
|
5
6
|
selectedAviationProduct?: AviationProduct;
|
|
6
|
-
|
|
7
|
+
warningType?: WarningType;
|
|
7
8
|
mode?: FormMode;
|
|
8
9
|
defaultMapPreset?: MapPreset;
|
|
9
10
|
}
|
|
10
11
|
export declare const PublicWarningsFormConnect: React.FC<PublicWarningsFormConnectProps>;
|
|
11
|
-
export {};
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Position, DraggableSize, HeaderSize } from '@opengeoweb/shared';
|
|
3
3
|
import { AviationProduct } from '@opengeoweb/sigmet-airmet';
|
|
4
4
|
import { uiTypes } from '@opengeoweb/store';
|
|
5
|
+
import { WarningType } from '../../store/publicWarningForm/types';
|
|
5
6
|
export declare const PublicWarningsFormDialog: React.FC<{
|
|
6
7
|
bounds?: string;
|
|
7
8
|
title?: string;
|
|
@@ -20,5 +21,5 @@ export declare const PublicWarningsFormDialog: React.FC<{
|
|
|
20
21
|
shouldHideFormMode?: boolean;
|
|
21
22
|
publicWarningEditor?: string;
|
|
22
23
|
selectedAviationProduct?: AviationProduct;
|
|
23
|
-
warningType?:
|
|
24
|
+
warningType?: WarningType;
|
|
24
25
|
}>;
|
|
@@ -2,7 +2,7 @@ import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
|
2
2
|
import { AlertColor } from '@mui/material';
|
|
3
3
|
import { snackbarTypes } from '@opengeoweb/snackbar';
|
|
4
4
|
import { DrawingListItem } from '../drawings/types';
|
|
5
|
-
import { Area, PublicWarning } from './types';
|
|
5
|
+
import { Area, PublicWarning, WarningType } from './types';
|
|
6
6
|
export type FormAction = '' | 'saving' | 'publishing' | 'readonly';
|
|
7
7
|
export interface FormError {
|
|
8
8
|
severity?: AlertColor;
|
|
@@ -15,6 +15,7 @@ export interface PublicWarningFormState {
|
|
|
15
15
|
error?: FormError;
|
|
16
16
|
selectedPublicWarningId?: string;
|
|
17
17
|
isFormDirty?: boolean;
|
|
18
|
+
warningType?: WarningType;
|
|
18
19
|
}
|
|
19
20
|
export declare const TAKEOVER_MESSAGE = "You are no longer the editor of this warning";
|
|
20
21
|
export declare const initialState: PublicWarningFormState;
|
|
@@ -35,6 +36,7 @@ export declare const publicWarningFormActions: import("@reduxjs/toolkit").CaseRe
|
|
|
35
36
|
object?: DrawingListItem;
|
|
36
37
|
formState?: FormAction;
|
|
37
38
|
publicWarning?: PublicWarning;
|
|
39
|
+
warningType?: WarningType;
|
|
38
40
|
}>) => void;
|
|
39
41
|
toggleEditorWarning: (draft: Draft<PublicWarningFormState>, action: PayloadAction<{
|
|
40
42
|
warningId: string;
|
|
@@ -51,3 +51,8 @@ export declare const getSelectedPublicIsFormDirty: ((state: WarningModuleStore)
|
|
|
51
51
|
}> & {
|
|
52
52
|
clearCache: () => void;
|
|
53
53
|
};
|
|
54
|
+
export declare const getWarningType: ((state: WarningModuleStore) => import("./types").WarningType | undefined) & import("reselect").OutputSelectorFields<(args_0: PublicWarningFormState) => import("./types").WarningType | undefined, {
|
|
55
|
+
clearCache: () => void;
|
|
56
|
+
}> & {
|
|
57
|
+
clearCache: () => void;
|
|
58
|
+
};
|
|
@@ -2,6 +2,7 @@ import { ProductStatus } from '@opengeoweb/api';
|
|
|
2
2
|
export interface Area {
|
|
3
3
|
objectName: string;
|
|
4
4
|
geoJSON: GeoJSON.FeatureCollection;
|
|
5
|
+
areaId?: string;
|
|
5
6
|
}
|
|
6
7
|
export interface PublicWarningDetail {
|
|
7
8
|
id?: string;
|
|
@@ -40,3 +41,4 @@ export interface PublicWarning {
|
|
|
40
41
|
id?: string;
|
|
41
42
|
lastUpdatedTime?: string;
|
|
42
43
|
}
|
|
44
|
+
export type WarningType = 'public' | 'airmet' | 'sigmet';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { PublicWarningsState } from './types';
|
|
3
3
|
import { PublicWarning } from '../publicWarningForm/types';
|
|
4
4
|
export declare const publicWarningsAdapter: import("@reduxjs/toolkit").EntityAdapter<PublicWarning>;
|
|
5
|
-
export declare const warningListFilterAdapter: import("@reduxjs/toolkit").EntityAdapter<WarningListFilter>;
|
|
6
5
|
export declare const initialState: PublicWarningsState;
|
|
7
6
|
export declare const reducer: import("redux").Reducer<PublicWarningsState>;
|
|
8
7
|
export declare const publicWarningActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
@@ -17,11 +16,4 @@ export declare const publicWarningActions: import("@reduxjs/toolkit").CaseReduce
|
|
|
17
16
|
message: string;
|
|
18
17
|
};
|
|
19
18
|
}>) => void;
|
|
20
|
-
setWarningListFilters: (draft: Draft<PublicWarningsState>, action: PayloadAction<{
|
|
21
|
-
newFilters: WarningListFilter[];
|
|
22
|
-
}>) => void;
|
|
23
|
-
toggleFilter: (draft: Draft<PublicWarningsState>, action: PayloadAction<ToggleFilterPayload>) => void;
|
|
24
|
-
toggleOption: (draft: Draft<PublicWarningsState>, action: PayloadAction<ToggleFilterOptionPayload>) => void;
|
|
25
|
-
enableOnlyOneFilterOption: (draft: Draft<PublicWarningsState>, action: PayloadAction<ToggleFilterOptionPayload>) => void;
|
|
26
|
-
toggleAllFilters: (draft: Draft<PublicWarningsState>, action: PayloadAction<ToggleAllFiltersPayload>) => void;
|
|
27
19
|
}, "publicWarnings">;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PublicWarningsState } from './types';
|
|
2
2
|
import { WarningModuleStore } from '../types';
|
|
3
|
-
import { PublicWarning } from '../publicWarningForm/types';
|
|
4
3
|
export declare const getPublicWarningsStore: (store: WarningModuleStore) => PublicWarningsState;
|
|
5
|
-
export declare const selectAllPublicWarnings: (state: WarningModuleStore) => PublicWarning[];
|
|
4
|
+
export declare const selectAllPublicWarnings: (state: WarningModuleStore) => import("../publicWarningForm/types").PublicWarning[];
|
|
6
5
|
export declare const isPublicWarningsLoading: ((state: WarningModuleStore) => boolean) & import("reselect").OutputSelectorFields<(args_0: PublicWarningsState) => boolean, {
|
|
7
6
|
clearCache: () => void;
|
|
8
7
|
}> & {
|
|
@@ -18,19 +17,3 @@ export declare const getPublicWarningsLastUpdatedTime: ((state: WarningModuleSto
|
|
|
18
17
|
}> & {
|
|
19
18
|
clearCache: () => void;
|
|
20
19
|
};
|
|
21
|
-
export declare const selectAllFilters: (state: WarningModuleStore) => WarningListFilter[], selectAllFilterIds: (state: WarningModuleStore) => import("@reduxjs/toolkit").EntityId[];
|
|
22
|
-
export declare const getIsAllSelected: ((state: WarningModuleStore) => boolean) & import("reselect").OutputSelectorFields<(args_0: WarningListFilter[]) => boolean, {
|
|
23
|
-
clearCache: () => void;
|
|
24
|
-
}> & {
|
|
25
|
-
clearCache: () => void;
|
|
26
|
-
};
|
|
27
|
-
export declare const getSelectedFilterOptions: ((state: WarningModuleStore) => OptionListItem[]) & import("reselect").OutputSelectorFields<(args_0: WarningListFilter[]) => OptionListItem[], {
|
|
28
|
-
clearCache: () => void;
|
|
29
|
-
}> & {
|
|
30
|
-
clearCache: () => void;
|
|
31
|
-
};
|
|
32
|
-
export declare const getFilteredWarnings: ((state: WarningModuleStore) => PublicWarning[]) & import("reselect").OutputSelectorFields<(args_0: PublicWarning[], args_1: boolean, args_2: OptionListItem[], args_3: import("@reduxjs/toolkit").EntityId[]) => PublicWarning[], {
|
|
33
|
-
clearCache: () => void;
|
|
34
|
-
}> & {
|
|
35
|
-
clearCache: () => void;
|
|
36
|
-
};
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { EntityState } from '@reduxjs/toolkit';
|
|
2
|
-
import { FilterListItemProps } from '@opengeoweb/shared';
|
|
3
2
|
import { PublicWarning } from '../publicWarningForm/types';
|
|
4
3
|
export interface FilterTranslation {
|
|
5
4
|
translationKey: string;
|
|
6
5
|
key: string;
|
|
7
6
|
isAviation?: boolean;
|
|
8
7
|
}
|
|
9
|
-
export interface WarningListFilter {
|
|
10
|
-
translationKey: string;
|
|
11
|
-
id: string;
|
|
12
|
-
filterList: FilterListItemProps[];
|
|
13
|
-
}
|
|
14
8
|
export interface PublicWarningError {
|
|
15
9
|
name: string;
|
|
16
10
|
message: string;
|
|
@@ -20,20 +14,4 @@ export interface PublicWarningsState {
|
|
|
20
14
|
isLoading: boolean;
|
|
21
15
|
lastUpdatedTime: string;
|
|
22
16
|
error?: PublicWarningError;
|
|
23
|
-
filters: EntityState<WarningListFilter>;
|
|
24
|
-
}
|
|
25
|
-
export interface ToggleFilterPayload {
|
|
26
|
-
filterId: string;
|
|
27
|
-
isChecked: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface ToggleFilterOptionPayload {
|
|
30
|
-
filterId: string;
|
|
31
|
-
optionId: string;
|
|
32
|
-
}
|
|
33
|
-
export interface ToggleAllFiltersPayload {
|
|
34
|
-
isChecked: boolean;
|
|
35
|
-
}
|
|
36
|
-
export interface OptionListItem {
|
|
37
|
-
filterId: string;
|
|
38
|
-
optionId: string;
|
|
39
17
|
}
|
|
@@ -3,5 +3,8 @@ import type { PublicWarning } from '../../store/publicWarningForm/types';
|
|
|
3
3
|
declare const drawingList: DrawingListItem[];
|
|
4
4
|
declare const drawingsListFullContent: DrawingFromBE[];
|
|
5
5
|
declare const warningList: PublicWarning[];
|
|
6
|
+
declare const lengthWarningListWithoutExpiredWithdrawn: number;
|
|
7
|
+
declare const sigmetList: PublicWarning[];
|
|
8
|
+
declare const airmetList: PublicWarning[];
|
|
6
9
|
declare const areaKeywordList: string[];
|
|
7
|
-
export { drawingList, drawingsListFullContent, warningList, areaKeywordList };
|
|
10
|
+
export { drawingList, drawingsListFullContent, warningList, lengthWarningListWithoutExpiredWithdrawn, sigmetList, airmetList, areaKeywordList, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AirmetConfig, AirmetFromBackend, ProductStatus, SigmetConfig, SigmetFromBackend } from '@opengeoweb/api';
|
|
2
2
|
import { AviationProduct } from '@opengeoweb/sigmet-airmet';
|
|
3
3
|
import { PublicWarning, PublicWarningStatus } from '../store/publicWarningForm/types';
|
|
4
4
|
export declare const transformAirmetToWarningFormat: (apiAirmet: AirmetFromBackend) => PublicWarning;
|
|
@@ -7,4 +7,4 @@ export declare const mapProductStatusToWarningStatus: (productStatus?: ProductSt
|
|
|
7
7
|
export declare const transformSigmetToProductFormat: (warning: SigmetFromBackend | undefined, config: SigmetConfig) => AviationProduct;
|
|
8
8
|
export declare const transformAirmetToProductFormat: (warning: AirmetFromBackend | undefined, config: AirmetConfig) => AviationProduct;
|
|
9
9
|
export declare const getEmptySigmetWarning: () => AviationProduct;
|
|
10
|
-
export declare const getEmptyAirmetWarning: () =>
|
|
10
|
+
export declare const getEmptyAirmetWarning: () => AviationProduct;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FilterListItemProps, FilterChipProps } from '@opengeoweb/shared';
|
|
3
|
-
export interface FilterChipWithOptionsProps extends Omit<FilterChipProps, 'isSelected' | 'isDisabled' | 'size' | ' onAction' | 'actionIcon' | 'label'> {
|
|
4
|
-
translationKey: string;
|
|
5
|
-
filterList?: FilterListItemProps[];
|
|
6
|
-
}
|
|
7
|
-
export declare const FilterChipWithOptions: React.FC<FilterChipWithOptionsProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { WarningListFilter } from '../../store/publicWarnings/types';
|
|
3
|
-
interface FilterChipWithOptionsConnectProps {
|
|
4
|
-
filter: WarningListFilter;
|
|
5
|
-
}
|
|
6
|
-
export declare const FilterChipWithOptionsConnect: React.FC<FilterChipWithOptionsConnectProps>;
|
|
7
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FilterListItemProps } from '@opengeoweb/shared';
|
|
2
|
-
import { EntityId, EntityState } from '@reduxjs/toolkit';
|
|
3
|
-
import { TFunction } from 'i18next';
|
|
4
|
-
import { PublicWarning } from '../publicWarningForm/types';
|
|
5
|
-
import { OptionListItem, WarningListFilter } from './types';
|
|
6
|
-
export declare const emptyFilter: {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
checked: boolean;
|
|
10
|
-
};
|
|
11
|
-
type TranslateListDict = Record<string, string>;
|
|
12
|
-
export declare const defaultFilters: {
|
|
13
|
-
key: string;
|
|
14
|
-
translationKey: string;
|
|
15
|
-
translations?: TranslateListDict;
|
|
16
|
-
}[];
|
|
17
|
-
export declare const getFiltersFromWarnings: (t: TFunction, warnings: PublicWarning[]) => WarningListFilter[];
|
|
18
|
-
export declare const isWarningMatchingFilter: (filters: OptionListItem[], filterId: EntityId, warningDetailValue: string) => boolean;
|
|
19
|
-
export declare const getUpdatedFilters: (filters: EntityState<WarningListFilter>, newFilters: WarningListFilter[]) => {
|
|
20
|
-
id: EntityId;
|
|
21
|
-
changes: WarningListFilter;
|
|
22
|
-
}[];
|
|
23
|
-
export declare const getUpdatedFilterList: (oldList: FilterListItemProps[], newList: FilterListItemProps[]) => FilterListItemProps[];
|
|
24
|
-
export {};
|
|
File without changes
|
|
File without changes
|