@opengeoweb/warnings 12.10.0 → 12.11.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 +651 -468
- package/package.json +15 -12
- package/src/lib/components/AreaObjectLoader/AreaObjectLoader.stories.d.ts +1 -1
- package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +1 -1
- package/src/lib/components/DrawingTool/DrawingTool.stories.d.ts +1 -1
- package/src/lib/components/FilterList/ExpandableFilterChip.d.ts +0 -1
- package/src/lib/components/FilterList/filter-utils.d.ts +49 -4
- package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsForm.stories.d.ts +1 -1
- package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsFormConnect.d.ts +2 -0
- package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsFormConnect.stories.d.ts +1 -1
- package/src/lib/components/MaritimeWarningsForm/useConfirmRetractDialog.d.ts +11 -0
- package/src/lib/components/MaritimeWarningsForm/useMaritimeWarningsFormState.d.ts +1 -0
- package/src/lib/components/MaritimeWarningsForm/utils.d.ts +2 -0
- package/src/lib/components/MaritimeWarningsForm/utils.spec.d.ts +1 -0
- package/src/lib/components/ObjectManager/ObjectManager.stories.d.ts +17 -18
- package/src/lib/components/ObjectManager/ObjectManagerConnect.stories.d.ts +1 -1
- package/src/lib/components/PublicWarningList/NewWarningButton/NewWarningButton.stories.d.ts +1 -1
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.stories.d.ts +2 -2
- package/src/lib/components/PublicWarningsForm/AreaField/AreaField.stories.d.ts +2 -3
- package/src/lib/components/PublicWarningsForm/DescriptionField/DescriptionField.stories.d.ts +1 -1
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.stories.d.ts +1 -1
- package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts +3 -3
- package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.stories.d.ts +1 -1
- package/src/lib/utils/sig-airmet-util.d.ts +3 -3
- /package/src/lib/components/MaritimeWarningsForm/{MartitimeWarningsForm.spec.d.ts → MaritimeWarningsForm.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.11.0",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,25 +8,25 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/api": "12.
|
|
12
|
-
"@opengeoweb/shared": "12.
|
|
13
|
-
"@opengeoweb/store": "12.
|
|
14
|
-
"@opengeoweb/webmap-react": "12.
|
|
11
|
+
"@opengeoweb/api": "12.11.0",
|
|
12
|
+
"@opengeoweb/shared": "12.11.0",
|
|
13
|
+
"@opengeoweb/store": "12.11.0",
|
|
14
|
+
"@opengeoweb/webmap-react": "12.11.0",
|
|
15
15
|
"@tanstack/react-query": "^5.69.2",
|
|
16
16
|
"react-redux": "^9.2.0",
|
|
17
|
-
"@opengeoweb/theme": "12.
|
|
18
|
-
"@opengeoweb/form-fields": "12.
|
|
17
|
+
"@opengeoweb/theme": "12.11.0",
|
|
18
|
+
"@opengeoweb/form-fields": "12.11.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": "12.
|
|
22
|
+
"@opengeoweb/snackbar": "12.11.0",
|
|
23
23
|
"react-window": "^1.8.10",
|
|
24
24
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
25
25
|
"axios": "^1.7.7",
|
|
26
|
-
"@opengeoweb/core": "12.
|
|
27
|
-
"@opengeoweb/webmap": "12.
|
|
28
|
-
"@opengeoweb/authentication": "12.
|
|
29
|
-
"@opengeoweb/sigmet-airmet": "12.
|
|
26
|
+
"@opengeoweb/core": "12.11.0",
|
|
27
|
+
"@opengeoweb/webmap": "12.11.0",
|
|
28
|
+
"@opengeoweb/authentication": "12.11.0",
|
|
29
|
+
"@opengeoweb/sigmet-airmet": "12.11.0",
|
|
30
30
|
"react-i18next": "^15.1.1",
|
|
31
31
|
"i18next": "^25.0.1",
|
|
32
32
|
"@mui/material": "^7.0.1",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"@emotion/react": "*",
|
|
41
41
|
"@emotion/styled": "*"
|
|
42
42
|
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"eslint-plugin-storybook": "9.0.17"
|
|
45
|
+
},
|
|
43
46
|
"module": "./index.esm.js",
|
|
44
47
|
"type": "module",
|
|
45
48
|
"main": "./index.esm.js",
|
|
@@ -16,5 +16,5 @@ export interface ComponentsLookUpPayload {
|
|
|
16
16
|
export interface ApiModuleProps extends ApiModule {
|
|
17
17
|
config: ApiUrls;
|
|
18
18
|
}
|
|
19
|
-
export declare const componentsLookUp: (payload: ComponentsLookUpPayload) => React.ReactElement;
|
|
19
|
+
export declare const componentsLookUp: (payload: ComponentsLookUpPayload, ComponentsLookUpWrapper?: any) => React.ReactElement;
|
|
20
20
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AirmetPhenomena, SigmetPhenomena } from '@opengeoweb/api';
|
|
1
2
|
import { Warning } from '../../store/publicWarningForm/types';
|
|
2
3
|
export declare enum Domain {
|
|
3
4
|
aviation = "aviation",
|
|
@@ -26,8 +27,52 @@ export declare const defaultDomainFilter: Record<Domain, boolean>;
|
|
|
26
27
|
export declare const domainLevels: Record<Domain, Level[]>;
|
|
27
28
|
export declare const defaultLevelFilter: Record<Level | 'unspecified', boolean>;
|
|
28
29
|
export declare const defaultEmptyFilter: Record<string, boolean>;
|
|
29
|
-
export declare const makeFilterFromList: <T extends string>(options: T[], value?: boolean) => Record<T |
|
|
30
|
-
|
|
30
|
+
export declare const makeFilterFromList: <T extends string>(options: T[], value?: boolean) => Record<T | "unspecified", boolean>;
|
|
31
|
+
declare const AllPhenomena: {
|
|
32
|
+
readonly wind: Phenomenon.wind;
|
|
33
|
+
readonly fog: Phenomenon.fog;
|
|
34
|
+
readonly thunderstorm: Phenomenon.thunderstorm;
|
|
35
|
+
readonly snowIce: Phenomenon.snowIce;
|
|
36
|
+
readonly rain: Phenomenon.rain;
|
|
37
|
+
readonly highTemp: Phenomenon.highTemp;
|
|
38
|
+
readonly lowTemp: Phenomenon.lowTemp;
|
|
39
|
+
readonly coastalEvent: Phenomenon.coastalEvent;
|
|
40
|
+
readonly EMBD_TS: SigmetPhenomena.EMBD_TS;
|
|
41
|
+
readonly EMBD_TSGR: SigmetPhenomena.EMBD_TSGR;
|
|
42
|
+
readonly FRQ_TS: SigmetPhenomena.FRQ_TS;
|
|
43
|
+
readonly FRQ_TSGR: SigmetPhenomena.FRQ_TSGR;
|
|
44
|
+
readonly HVY_DS: SigmetPhenomena.HVY_DS;
|
|
45
|
+
readonly HVY_SS: SigmetPhenomena.HVY_SS;
|
|
46
|
+
readonly OBSC_TS: SigmetPhenomena.OBSC_TS;
|
|
47
|
+
readonly OBSC_TSGR: SigmetPhenomena.OBSC_TSGR;
|
|
48
|
+
readonly RDOACT_CLD: SigmetPhenomena.RDOACT_CLD;
|
|
49
|
+
readonly SEV_ICE: SigmetPhenomena.SEV_ICE;
|
|
50
|
+
readonly SEV_ICE_FRZ_RN: SigmetPhenomena.SEV_ICE_FRZ_RN;
|
|
51
|
+
readonly SEV_MTW: SigmetPhenomena.SEV_MTW;
|
|
52
|
+
readonly SEV_TURB: SigmetPhenomena.SEV_TURB;
|
|
53
|
+
readonly SQL_TS: SigmetPhenomena.SQL_TS;
|
|
54
|
+
readonly SQL_TSGR: SigmetPhenomena.SQL_TSGR;
|
|
55
|
+
readonly VA_CLD: SigmetPhenomena.VA_CLD;
|
|
56
|
+
readonly SFC_VIS: AirmetPhenomena.SFC_VIS;
|
|
57
|
+
readonly SFC_WIND: AirmetPhenomena.SFC_WIND;
|
|
58
|
+
readonly OVC_CLD: AirmetPhenomena.OVC_CLD;
|
|
59
|
+
readonly BKN_CLD: AirmetPhenomena.BKN_CLD;
|
|
60
|
+
readonly ISOL_CB: AirmetPhenomena.ISOL_CB;
|
|
61
|
+
readonly OCNL_CB: AirmetPhenomena.OCNL_CB;
|
|
62
|
+
readonly FRQ_CB: AirmetPhenomena.FRQ_CB;
|
|
63
|
+
readonly ISOL_TS: AirmetPhenomena.ISOL_TS;
|
|
64
|
+
readonly OCNL_TS: AirmetPhenomena.OCNL_TS;
|
|
65
|
+
readonly ISOL_TSGR: AirmetPhenomena.ISOL_TSGR;
|
|
66
|
+
readonly OCNL_TSGR: AirmetPhenomena.OCNL_TSGR;
|
|
67
|
+
readonly ISOL_TCU: AirmetPhenomena.ISOL_TCU;
|
|
68
|
+
readonly OCNL_TCU: AirmetPhenomena.OCNL_TCU;
|
|
69
|
+
readonly FRQ_TCU: AirmetPhenomena.FRQ_TCU;
|
|
70
|
+
readonly MOD_ICE: AirmetPhenomena.MOD_ICE;
|
|
71
|
+
readonly MOD_MTW: AirmetPhenomena.MOD_MTW;
|
|
72
|
+
readonly MOD_TURB: AirmetPhenomena.MOD_TURB;
|
|
73
|
+
readonly MT_OBSC: AirmetPhenomena.MT_OBSC;
|
|
74
|
+
};
|
|
75
|
+
export declare const AllPhenomenaKeys: Record<keyof typeof AllPhenomena, keyof typeof AllPhenomena>;
|
|
31
76
|
export declare const domainPhenomena: Record<Domain, Partial<keyof typeof AllPhenomenaKeys>[]>;
|
|
32
77
|
export declare const defaultPhenomenonFilter: Record<string, boolean>;
|
|
33
78
|
export declare const initialFilters: {
|
|
@@ -45,8 +90,8 @@ interface OptionsMetadata {
|
|
|
45
90
|
allSelected: boolean;
|
|
46
91
|
}
|
|
47
92
|
export declare const getSelectedOptions: (options?: OptionsType) => OptionsMetadata;
|
|
48
|
-
export declare const updateState: <T extends string>(state: Record<T, boolean>, optionKey: T |
|
|
93
|
+
export declare const updateState: <T extends string>(state: Record<T, boolean>, optionKey: T | "ALL", value: boolean, only?: boolean) => Record<T, boolean>;
|
|
49
94
|
/** Make sure our value is in the filter */
|
|
50
|
-
export declare const getValue: <T>(values: Record<string, T>, value: string) => T |
|
|
95
|
+
export declare const getValue: <T>(values: Record<string, T>, value: string) => T | "unspecified";
|
|
51
96
|
export declare const getFiltersFromWarnings: (warnings: Warning[], filterKey: string) => string[];
|
|
52
97
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj, Meta } from '@storybook/react';
|
|
1
|
+
import { StoryObj, Meta } from '@storybook/react-webpack5';
|
|
2
2
|
import { MaritimeWarningsForm } from './MaritimeWarningsForm';
|
|
3
3
|
type Story = StoryObj<typeof MaritimeWarningsForm>;
|
|
4
4
|
declare const meta: Meta<typeof MaritimeWarningsForm>;
|
|
@@ -2,5 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { MaritimeWarningsDomain } from './types';
|
|
3
3
|
export interface MaritimeWarningsFormConnectProps {
|
|
4
4
|
domain: MaritimeWarningsDomain;
|
|
5
|
+
onPreventCloseView?: (on: boolean) => void;
|
|
6
|
+
onModifyForm?: (isFormDirty: boolean) => void;
|
|
5
7
|
}
|
|
6
8
|
export declare const MaritimeWarningsFormConnect: React.FC<MaritimeWarningsFormConnectProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj, Meta } from '@storybook/react';
|
|
1
|
+
import { StoryObj, Meta } from '@storybook/react-webpack5';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { MaritimeWarningsFormConnectProps } from './MaritimeWarningsFormConnect';
|
|
4
4
|
declare const MaritimeWarningsFormConnectDemo: React.FC<MaritimeWarningsFormConnectProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Area, MaritimeWarningItem } from './types';
|
|
2
|
+
interface UseConfirmRetractDialogProps {
|
|
3
|
+
areas: Area[];
|
|
4
|
+
warnings: MaritimeWarningItem[];
|
|
5
|
+
onRemoveWarning: (id: string) => void;
|
|
6
|
+
}
|
|
7
|
+
interface UseConfirmRetractDialog {
|
|
8
|
+
onRemoveWarningWithConfirmation(id: string): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useConfirmRetractDialog({ areas, warnings, onRemoveWarning, }: UseConfirmRetractDialogProps): UseConfirmRetractDialog;
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MaritimeWarningItem, MaritimeWarningItemAttributes } from './types';
|
|
3
3
|
export declare function createWarning(): MaritimeWarningItem;
|
|
4
|
+
export declare function isPublishedWarning(warning: MaritimeWarningItem): boolean;
|
|
4
5
|
interface State {
|
|
5
6
|
selectedAreaIds: string[];
|
|
6
7
|
warnings: MaritimeWarningItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
import type { StoryObj } from '@storybook/react';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
3
2
|
import { ObjectManager } from './ObjectManager';
|
|
4
3
|
import { DrawingListItem } from '../../store/warningsDrawings/types';
|
|
5
4
|
declare const _default: {
|
|
6
5
|
title: string;
|
|
7
6
|
component: import("react").FC<{
|
|
8
|
-
bounds?: string
|
|
9
|
-
title?: string
|
|
7
|
+
bounds?: string;
|
|
8
|
+
title?: string;
|
|
10
9
|
onClose: () => void;
|
|
11
|
-
onMouseDown?: (
|
|
10
|
+
onMouseDown?: () => void;
|
|
12
11
|
isOpen: boolean;
|
|
13
|
-
order?: number
|
|
14
|
-
source?: import("@opengeoweb/shared").Source
|
|
15
|
-
size?: import("@opengeoweb/shared").DraggableSize
|
|
16
|
-
startPosition?: import("@opengeoweb/shared").Position
|
|
17
|
-
headerSize?: import("@opengeoweb/shared").HeaderSize
|
|
12
|
+
order?: number;
|
|
13
|
+
source?: import("@opengeoweb/shared").Source;
|
|
14
|
+
size?: import("@opengeoweb/shared").DraggableSize;
|
|
15
|
+
startPosition?: import("@opengeoweb/shared").Position;
|
|
16
|
+
headerSize?: import("@opengeoweb/shared").HeaderSize;
|
|
18
17
|
drawingListItems: DrawingListItem[];
|
|
19
|
-
onClickDrawing?: (
|
|
20
|
-
onEditDrawing?: (
|
|
21
|
-
onDeleteDrawing?: (
|
|
22
|
-
onShareObject?: (
|
|
23
|
-
onCreateNewObject?: (
|
|
24
|
-
activeDrawingId?: string
|
|
25
|
-
error?: string
|
|
26
|
-
isLoading?: boolean
|
|
18
|
+
onClickDrawing?: (drawing: DrawingListItem) => void;
|
|
19
|
+
onEditDrawing?: (drawingId: string) => void;
|
|
20
|
+
onDeleteDrawing?: (drawingId: string) => void;
|
|
21
|
+
onShareObject?: (object: DrawingListItem) => void;
|
|
22
|
+
onCreateNewObject?: () => void;
|
|
23
|
+
activeDrawingId?: string;
|
|
24
|
+
error?: string;
|
|
25
|
+
isLoading?: boolean;
|
|
27
26
|
}>;
|
|
28
27
|
tags: string[];
|
|
29
28
|
};
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ description, }: {
|
|
5
|
-
description?: string
|
|
6
|
-
}) => React.ReactElement
|
|
5
|
+
description?: string;
|
|
6
|
+
}) => React.ReactElement;
|
|
7
7
|
tags: string[];
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { StoryObj } from '@storybook/react';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
3
2
|
import { AreaField } from './AreaField';
|
|
4
3
|
declare const _default: {
|
|
5
4
|
title: string;
|
|
@@ -8,7 +7,7 @@ declare const _default: {
|
|
|
8
7
|
onViewObject: () => void;
|
|
9
8
|
onDeleteObject: () => void;
|
|
10
9
|
onAddObject: () => void;
|
|
11
|
-
isDisabled?: boolean
|
|
10
|
+
isDisabled?: boolean;
|
|
12
11
|
}>;
|
|
13
12
|
parameters: {
|
|
14
13
|
docs: {
|
|
@@ -3,9 +3,8 @@ import { Position, DraggableSize, HeaderSize } from '@opengeoweb/shared';
|
|
|
3
3
|
import { AviationProduct } from '@opengeoweb/sigmet-airmet';
|
|
4
4
|
import { uiTypes } from '@opengeoweb/store';
|
|
5
5
|
import { WarningType } from '../../store/publicWarningForm/types';
|
|
6
|
-
export
|
|
6
|
+
export interface PublicWarningsFormDialogProps {
|
|
7
7
|
bounds?: string;
|
|
8
|
-
title?: string;
|
|
9
8
|
onClose: () => void;
|
|
10
9
|
onMouseDown?: () => void;
|
|
11
10
|
isOpen: boolean;
|
|
@@ -22,4 +21,5 @@ export declare const PublicWarningsFormDialog: React.FC<{
|
|
|
22
21
|
publicWarningEditor?: string;
|
|
23
22
|
selectedAviationProduct?: AviationProduct;
|
|
24
23
|
warningType?: WarningType;
|
|
25
|
-
}
|
|
24
|
+
}
|
|
25
|
+
export declare const PublicWarningsFormDialog: React.FC<PublicWarningsFormDialogProps>;
|
|
@@ -13,6 +13,6 @@ export declare const transformSigmetFromBackendToProductFormat: (warning: Sigmet
|
|
|
13
13
|
export declare const transformAirmetFromBackendToProductFormat: (warning: AirmetFromBackend) => AviationProduct;
|
|
14
14
|
export declare const getEmptySigmetWarning: (productConfig: ProductConfig) => AviationProduct;
|
|
15
15
|
export declare const getEmptyAirmetWarning: (productConfig: ProductConfig) => AviationProduct;
|
|
16
|
-
export declare const renewAviationProduct: <T extends
|
|
17
|
-
export declare const amendAviationProduct: <T extends
|
|
18
|
-
export declare const duplicateAviationProduct: <T extends
|
|
16
|
+
export declare const renewAviationProduct: <T extends SigmetWarning | AirmetWarning>(aviationWarning: T, productConfig: ProductConfig) => T;
|
|
17
|
+
export declare const amendAviationProduct: <T extends SigmetWarning | AirmetWarning>(aviationWarning: T, productConfig: ProductConfig) => T;
|
|
18
|
+
export declare const duplicateAviationProduct: <T extends SigmetWarning | AirmetWarning>(aviationWarning: T) => T;
|
|
File without changes
|