@opengeoweb/sigmet-airmet 12.1.2 → 12.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 +4149 -4678
- package/package.json +11 -11
- package/src/index.d.ts +9 -7
- package/src/lib/components/ProductForms/AirmetForm/AirmetForm.d.ts +2 -1
- package/src/lib/components/ProductForms/ProductFormDialogContent.d.ts +2 -1
- package/src/lib/components/ProductForms/SigmetForm/SigmetForm.d.ts +3 -1
- package/src/lib/components/ProductForms/useStoredGeoJSONHandling.d.ts +25 -0
- package/src/lib/components/ProductForms/utils.d.ts +4 -1
- package/src/lib/components/ContentDialog/ContentDialog.d.ts +0 -13
- package/src/lib/components/ContentDialog/ContentDialog.stories.d.ts +0 -95
- package/src/lib/components/ContentDialog/index.d.ts +0 -1
- /package/src/lib/components/{ContentDialog/ContentDialog.spec.d.ts → ProductForms/useStoredGeoJSONHandling.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/api": "12.
|
|
12
|
-
"@opengeoweb/shared": "12.
|
|
13
|
-
"@opengeoweb/theme": "12.
|
|
14
|
-
"@opengeoweb/store": "12.
|
|
15
|
-
"@opengeoweb/webmap": "12.
|
|
16
|
-
"@opengeoweb/webmap-react": "12.
|
|
11
|
+
"@opengeoweb/api": "12.2.0",
|
|
12
|
+
"@opengeoweb/shared": "12.2.0",
|
|
13
|
+
"@opengeoweb/theme": "12.2.0",
|
|
14
|
+
"@opengeoweb/store": "12.2.0",
|
|
15
|
+
"@opengeoweb/webmap": "12.2.0",
|
|
16
|
+
"@opengeoweb/webmap-react": "12.2.0",
|
|
17
17
|
"react-redux": "^8.1.3",
|
|
18
|
-
"@opengeoweb/core": "12.
|
|
19
|
-
"@opengeoweb/authentication": "12.
|
|
18
|
+
"@opengeoweb/core": "12.2.0",
|
|
19
|
+
"@opengeoweb/authentication": "12.2.0",
|
|
20
20
|
"@mui/system": "^6.1.1",
|
|
21
|
-
"@opengeoweb/form-fields": "12.
|
|
21
|
+
"@opengeoweb/form-fields": "12.2.0",
|
|
22
22
|
"react-hook-form": "^7.50.1",
|
|
23
23
|
"axios": "^1.7.7",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"i18next": "^23.11.5",
|
|
27
27
|
"@mui/material": "^6.1.1",
|
|
28
28
|
"react-i18next": "^15.1.1",
|
|
29
|
-
"@tanstack/react-query": "^5.
|
|
29
|
+
"@tanstack/react-query": "^5.69.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "18",
|
package/src/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import saTranslations from '../locales/sigmet-airmet.json';
|
|
2
|
+
export * from './lib/components/ComponentsLookUp';
|
|
3
|
+
export * from './lib/components/MapViewGeoJson';
|
|
4
|
+
export * from './lib/components/MetInfoWrapper';
|
|
2
5
|
export * from './lib/components/ProductForms';
|
|
3
6
|
export * from './lib/components/ProductForms/ProductFormDialog';
|
|
7
|
+
export * from './lib/components/ProductForms/ProductFormDialogContent';
|
|
4
8
|
export * from './lib/components/ProductForms/ProductFormFields/ValidUntil';
|
|
9
|
+
export * from './lib/components/ProductForms/SigmetForm/SigmetCancelVolcanicMovements';
|
|
5
10
|
export * from './lib/components/ProductForms/utils';
|
|
6
|
-
export * from './lib/components/ContentDialog';
|
|
7
|
-
export * from './lib/components/MapViewGeoJson';
|
|
8
11
|
export * from './lib/components/ProductList';
|
|
9
|
-
export * from './lib/
|
|
10
|
-
export { createApi } from './lib/utils/api';
|
|
11
|
-
export { createApi as createFakeApi, fakeSigmetList, fakeAirmetList, } from './lib/utils/fakeApi';
|
|
12
|
-
export { sigmetConfig, airmetConfig } from './lib/utils/config';
|
|
12
|
+
export * from './lib/hooks/useShortTestHelpers';
|
|
13
13
|
export * from './lib/types';
|
|
14
|
-
export
|
|
14
|
+
export { createApi } from './lib/utils/api';
|
|
15
|
+
export { airmetConfig, sigmetConfig } from './lib/utils/config';
|
|
16
|
+
export { createApi as createFakeApi, fakeAirmetList, fakeSigmetList, } from './lib/utils/fakeApi';
|
|
15
17
|
export { SA_NAMESPACE } from './lib/utils/i18n';
|
|
16
18
|
export { saTranslations };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Airmet, AviationProduct, CancelAirmet, FormMode, ProductConfig } from '../../../types';
|
|
3
3
|
export interface AirmetFormProps {
|
|
4
4
|
mode: FormMode;
|
|
5
5
|
isCancelAirmet?: boolean;
|
|
@@ -11,6 +11,7 @@ export interface AirmetFormProps {
|
|
|
11
11
|
getTAC?: (product: AviationProduct) => Promise<{
|
|
12
12
|
data: string;
|
|
13
13
|
}>;
|
|
14
|
+
storedGeoJSON?: GeoJSON.FeatureCollection;
|
|
14
15
|
}
|
|
15
16
|
declare const AirmetForm: React.FC<AirmetFormProps>;
|
|
16
17
|
export default AirmetForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AviationProduct, FormMode,
|
|
2
|
+
import { AviationProduct, FormMode, ProductAction, ProductConfig, ProductType } from '../../types';
|
|
3
|
+
export declare const isVAPhenomenon: (product: AviationProduct, action: ProductAction) => boolean;
|
|
3
4
|
export interface ProductFormDialogContentProps {
|
|
4
5
|
isOpen: boolean;
|
|
5
6
|
toggleDialogStatus: (shouldRefreshList?: boolean) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AviationProduct, CancelSigmet, FormMode, ProductConfig, Sigmet } from '../../../types';
|
|
3
3
|
export interface SigmetFormProps {
|
|
4
4
|
mode: FormMode;
|
|
5
5
|
isCancelSigmet?: boolean;
|
|
@@ -12,6 +12,8 @@ export interface SigmetFormProps {
|
|
|
12
12
|
getTAC?: (product: AviationProduct) => Promise<{
|
|
13
13
|
data: string;
|
|
14
14
|
}>;
|
|
15
|
+
storedGeoJSON?: GeoJSON.FeatureCollection;
|
|
16
|
+
storedEndGeoJSON?: GeoJSON.FeatureCollection;
|
|
15
17
|
}
|
|
16
18
|
declare const SigmetForm: React.FC<SigmetFormProps>;
|
|
17
19
|
export default SigmetForm;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
2
|
+
import { FeatureCollection, Geometry } from 'geojson';
|
|
3
|
+
interface UseGeoJSONHandlingProps {
|
|
4
|
+
storedGeoJSON: FeatureCollection<Geometry> | undefined;
|
|
5
|
+
storedEndGeoJSON?: FeatureCollection<Geometry> | undefined;
|
|
6
|
+
startGeoJSON: FeatureCollection<Geometry>;
|
|
7
|
+
endGeoJSON?: FeatureCollection<Geometry>;
|
|
8
|
+
setGeoJSON: (geoJSON: FeatureCollection<Geometry>) => void;
|
|
9
|
+
setEndGeoJSON?: (geoJSON: FeatureCollection<Geometry>) => void;
|
|
10
|
+
updateStartGeoJson: (geoJSON: FeatureCollection<Geometry>) => void;
|
|
11
|
+
updateEndGeoJson?: (geoJSON: FeatureCollection<Geometry>) => void;
|
|
12
|
+
deactivateStartTool: () => void;
|
|
13
|
+
deactivateEndTool?: () => void;
|
|
14
|
+
changeActiveStartTool: (newTool: DrawMode) => void;
|
|
15
|
+
changeActiveEndTool?: (newTool: DrawMode) => void;
|
|
16
|
+
startEditModes: DrawMode[];
|
|
17
|
+
endEditModes?: DrawMode[];
|
|
18
|
+
currentStartDrawTool?: string;
|
|
19
|
+
currentEndDrawTool?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const useGeoJSONHandling: ({ storedGeoJSON, storedEndGeoJSON, startGeoJSON, endGeoJSON, updateStartGeoJson, updateEndGeoJson, deactivateStartTool, deactivateEndTool, changeActiveStartTool, changeActiveEndTool, startEditModes, endEditModes, currentStartDrawTool, currentEndDrawTool, }: UseGeoJSONHandlingProps) => {
|
|
22
|
+
onChangeStartTool: (newTool: DrawMode) => void;
|
|
23
|
+
onChangeEndTool: (newTool: DrawMode) => void;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TFunction } from 'i18next';
|
|
3
3
|
import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
|
|
4
|
+
import { HeaderAction } from '@opengeoweb/shared';
|
|
4
5
|
import { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
5
6
|
import { DrawMode, OpenLayersLayerProps } from '@opengeoweb/webmap-react';
|
|
6
7
|
import { LevelUnits, ATSRLocation, ICAOLocation, ProductStatus, CancelSigmet, Sigmet, ProductCanbe, SigmetFromBackend, SigmetFromFrontend, ProductAction, Airmet, CancelAirmet, ProductConfig, Firareas, FIRConfigSigmet, AirmetFromBackend, AirmetFromFrontend, ProductType, AviationProduct, FIRLocationGeoJson, AirmetConfig, FIRConfigAirmet, StartOrEndDrawing, AviationPhenomenon } from '../../types';
|
|
@@ -39,13 +40,15 @@ export declare const isLevelLower: (ownValue: number | string, ownUnit: LevelUni
|
|
|
39
40
|
export declare const getPhenomenon: (selectedFIR: string, phenomenon: string, productConfig: ProductConfig) => string | undefined;
|
|
40
41
|
export declare const getDialogtitle: (t: TFunction, product: AviationProduct, productType: ProductType, productConfig: ProductConfig) => string;
|
|
41
42
|
export declare const getProductFormMode: (canBeOptions: ProductCanbe[] | undefined, productListItem: SigmetFromBackend | AirmetFromBackend | null) => string;
|
|
43
|
+
export declare const getLifecycleActions: ({ canBe, onButtonPress, productType, areActionsDisabled, t, }: ProductFormLifecycleButtonsProps & {
|
|
44
|
+
t: TFunction;
|
|
45
|
+
}) => HeaderAction[];
|
|
42
46
|
interface ProductFormLifecycleButtonsProps {
|
|
43
47
|
canBe: string[];
|
|
44
48
|
productType: ProductType;
|
|
45
49
|
onButtonPress: (newStatus: ProductAction) => void;
|
|
46
50
|
areActionsDisabled?: boolean;
|
|
47
51
|
}
|
|
48
|
-
export declare const ProductFormLifecycleButtons: React.FC<ProductFormLifecycleButtonsProps>;
|
|
49
52
|
export declare const hasValue: (value: number | string) => boolean;
|
|
50
53
|
export declare const prepareFormValues: <T extends AviationProduct>(product: T) => T;
|
|
51
54
|
export declare const createSigmetPostParameter: (sigmetToPost: Sigmet | CancelSigmet, newStatus: ProductStatus, previousUuid: string) => SigmetFromFrontend;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DialogProps } from '@mui/material';
|
|
3
|
-
interface ContentDialogProps extends DialogProps {
|
|
4
|
-
open: boolean;
|
|
5
|
-
toggleDialogStatus: () => void;
|
|
6
|
-
title: string;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
options?: React.ReactNode;
|
|
9
|
-
alertBanner?: React.ReactNode;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare const ContentDialog: React.FC<ContentDialogProps>;
|
|
13
|
-
export default ContentDialog;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
tags: string[];
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
|
-
export declare const ContentDialogDemo: () => React.ReactElement;
|
|
8
|
-
export declare const NewDialogDemoLight: {
|
|
9
|
-
(): React.ReactElement;
|
|
10
|
-
storyName: string;
|
|
11
|
-
tags: string[];
|
|
12
|
-
parameters: {
|
|
13
|
-
zeplinLink: {
|
|
14
|
-
name: string;
|
|
15
|
-
link: string;
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare const NewDialogDemoDark: {
|
|
20
|
-
(): React.ReactElement;
|
|
21
|
-
storyName: string;
|
|
22
|
-
tags: string[];
|
|
23
|
-
parameters: {
|
|
24
|
-
zeplinLink: {
|
|
25
|
-
name: string;
|
|
26
|
-
link: string;
|
|
27
|
-
}[];
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export declare const ViewDialogDemoLight: {
|
|
31
|
-
(): React.ReactElement;
|
|
32
|
-
storyName: string;
|
|
33
|
-
tags: string[];
|
|
34
|
-
parameters: {
|
|
35
|
-
zeplinLink: {
|
|
36
|
-
name: string;
|
|
37
|
-
link: string;
|
|
38
|
-
}[];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export declare const ViewDialogDemoDark: {
|
|
42
|
-
(): React.ReactElement;
|
|
43
|
-
storyName: string;
|
|
44
|
-
tags: string[];
|
|
45
|
-
parameters: {
|
|
46
|
-
zeplinLink: {
|
|
47
|
-
name: string;
|
|
48
|
-
link: string;
|
|
49
|
-
}[];
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export declare const ExpiredDialogDemoLight: {
|
|
53
|
-
(): React.ReactElement;
|
|
54
|
-
storyName: string;
|
|
55
|
-
tags: string[];
|
|
56
|
-
parameters: {
|
|
57
|
-
zeplinLink: {
|
|
58
|
-
name: string;
|
|
59
|
-
link: string;
|
|
60
|
-
}[];
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
export declare const ExpiredDialogDemoDark: {
|
|
64
|
-
(): React.ReactElement;
|
|
65
|
-
storyName: string;
|
|
66
|
-
tags: string[];
|
|
67
|
-
parameters: {
|
|
68
|
-
zeplinLink: {
|
|
69
|
-
name: string;
|
|
70
|
-
link: string;
|
|
71
|
-
}[];
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
export declare const EditDialogDemoLight: {
|
|
75
|
-
(): React.ReactElement;
|
|
76
|
-
storyName: string;
|
|
77
|
-
tags: string[];
|
|
78
|
-
parameters: {
|
|
79
|
-
zeplinLink: {
|
|
80
|
-
name: string;
|
|
81
|
-
link: string;
|
|
82
|
-
}[];
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
export declare const EditDialogDemoDark: {
|
|
86
|
-
(): React.ReactElement;
|
|
87
|
-
storyName: string;
|
|
88
|
-
tags: string[];
|
|
89
|
-
parameters: {
|
|
90
|
-
zeplinLink: {
|
|
91
|
-
name: string;
|
|
92
|
-
link: string;
|
|
93
|
-
}[];
|
|
94
|
-
};
|
|
95
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ContentDialog } from './ContentDialog';
|