@opengeoweb/warnings 9.34.0 → 9.35.1-spike-oltanstack.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 +617 -233
- package/package.json +1 -1
- package/src/lib/aviation-api/hooks.d.ts +13 -3
- package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +4 -1
- package/src/lib/components/FilterList/filter-hooks.d.ts +3 -2
- package/src/lib/components/PublicWarningList/NewWarningButton/NewWarningButton.d.ts +4 -1
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +5 -1
- 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/PublicWarningListConnect.d.ts +4 -1
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +3 -3
- 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 +1 -0
- package/src/lib/storybookUtils/SimpleLinkMenu.d.ts +6 -0
- package/src/lib/utils/fakeApi/index.d.ts +3 -1
- package/src/lib/utils/sig-airmet-util.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { AirmetConfig, AirmetFromBackend, SigmetConfig, SigmetFromBackend } from '@opengeoweb/api';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const
|
|
3
|
+
import { AviationProduct } from '@opengeoweb/sigmet-airmet';
|
|
4
|
+
import { WarningType } from '../store/publicWarningForm/types';
|
|
5
|
+
export declare const useAirmetList: (disabled?: boolean) => UseQueryResult<AirmetFromBackend[]>;
|
|
6
|
+
export declare const useSigmetList: (disabled?: boolean) => UseQueryResult<SigmetFromBackend[]>;
|
|
7
|
+
export declare const useProductConfig: (warningType?: WarningType, disabled?: boolean) => UseQueryResult<SigmetConfig | AirmetConfig>;
|
|
8
|
+
type FetchTACData = Promise<{
|
|
9
|
+
data: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const useTACApi: () => {
|
|
12
|
+
fetchSigmetTAC: (product: AviationProduct) => FetchTACData;
|
|
13
|
+
fetchAirmetTAC: (product: AviationProduct) => FetchTACData;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -10,6 +10,9 @@ export interface ComponentsLookUpPayload {
|
|
|
10
10
|
export interface ApiModuleProps extends ApiModule {
|
|
11
11
|
config: ApiUrls;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
interface Props extends ApiModuleProps {
|
|
14
|
+
panelId: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const PublicWarningApiWrapper: React.FC<Props>;
|
|
14
17
|
export declare const componentsLookUp: (payload: ComponentsLookUpPayload, apiProps?: ApiModuleProps) => React.ReactElement;
|
|
15
18
|
export {};
|
|
@@ -13,10 +13,11 @@ interface FilterState extends PickedFilterState {
|
|
|
13
13
|
export type FilterKeyType = keyof FilterState;
|
|
14
14
|
export type OptionKey<T extends FilterKeyType> = keyof FilterState[T];
|
|
15
15
|
export type UpdateFilter = <T extends FilterKeyType>(filterKey: T | 'ALL', optionKey: OptionKey<T> | 'ALL', value: boolean, only?: boolean) => void;
|
|
16
|
-
export
|
|
16
|
+
export interface FilterHookState {
|
|
17
17
|
filterState: PickedFilterState;
|
|
18
18
|
allSelected: boolean;
|
|
19
19
|
updateFilter: UpdateFilter;
|
|
20
20
|
byFilterState: (warning: PublicWarning) => boolean;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
|
+
export declare const useWarningFilters: (warnings: PublicWarning[]) => FilterHookState;
|
|
22
23
|
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,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PublicWarning } from '../../store/publicWarningForm/types';
|
|
3
3
|
import { WarningListFilter } from '../../store/publicWarnings/types';
|
|
4
|
+
import { FilterHookState } from '../FilterList/filter-hooks';
|
|
4
5
|
import { WarningListItemActions } from './WarningListItemMenu';
|
|
5
|
-
interface PublicWarningListProps extends WarningListItemActions {
|
|
6
|
+
export interface PublicWarningListProps extends WarningListItemActions {
|
|
6
7
|
warnings: PublicWarning[];
|
|
7
8
|
onSelectWarning?: (warning: PublicWarning) => void;
|
|
8
9
|
isLoading?: boolean;
|
|
@@ -12,8 +13,11 @@ interface PublicWarningListProps extends WarningListItemActions {
|
|
|
12
13
|
onCreateWarning?: () => void;
|
|
13
14
|
onRefetchWarnings?: () => void;
|
|
14
15
|
filters?: WarningListFilter[];
|
|
16
|
+
filterHookState: FilterHookState;
|
|
15
17
|
onClickAllChip?: (isChecked: boolean) => void;
|
|
16
18
|
isAllChipSelected?: boolean;
|
|
19
|
+
expandedSections: Record<string, boolean>;
|
|
20
|
+
setExpandedSections: (expandedSections: Record<string, boolean>) => void;
|
|
17
21
|
}
|
|
18
22
|
export declare const PublicWarningList: React.FC<PublicWarningListProps>;
|
|
19
23
|
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 {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AviationProduct, FormMode } from '@opengeoweb/sigmet-airmet';
|
|
3
3
|
import { MapPreset } from '@opengeoweb/store';
|
|
4
|
-
import { PublicWarningDetail } from '../../store/publicWarningForm/types';
|
|
4
|
+
import { PublicWarningDetail, WarningType } from '../../store/publicWarningForm/types';
|
|
5
5
|
import { BaseDrawingListItem, DrawingListItem } from '../../store/drawings/types';
|
|
6
6
|
import { FormAction, FormError } from '../../store/publicWarningForm/reducer';
|
|
7
7
|
export declare const useScrollTopOnError: (error: FormError) => React.RefObject<HTMLDivElement>;
|
|
@@ -13,7 +13,7 @@ interface FormData extends PublicWarningDetail {
|
|
|
13
13
|
'translation-select'?: string;
|
|
14
14
|
}
|
|
15
15
|
export declare const prepareFormValues: (data: FormData) => PublicWarningDetail;
|
|
16
|
-
interface FormProps {
|
|
16
|
+
export interface FormProps {
|
|
17
17
|
formAction?: FormAction;
|
|
18
18
|
defaultMapPreset?: MapPreset;
|
|
19
19
|
onSaveForm?: (formValues: PublicWarningDetail) => void;
|
|
@@ -26,7 +26,7 @@ interface FormProps {
|
|
|
26
26
|
isSnapshot?: boolean;
|
|
27
27
|
onAddObject?: () => void;
|
|
28
28
|
selectedAviationProduct?: AviationProduct;
|
|
29
|
-
|
|
29
|
+
warningType?: WarningType;
|
|
30
30
|
mode?: FormMode;
|
|
31
31
|
}
|
|
32
32
|
export declare const PublicWarningsForm: React.FC<FormProps>;
|
|
@@ -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
|
+
};
|
|
@@ -3,5 +3,7 @@ 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 sigmetList: PublicWarning[];
|
|
7
|
+
declare const airmetList: PublicWarning[];
|
|
6
8
|
declare const areaKeywordList: string[];
|
|
7
|
-
export { drawingList, drawingsListFullContent, warningList, areaKeywordList };
|
|
9
|
+
export { drawingList, drawingsListFullContent, warningList, 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;
|