@opengeoweb/sigmet-airmet 7.0.0 → 8.1.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 +123 -84
- package/package.json +12 -12
- package/src/lib/components/ProductForms/ProductFormFields/DrawTools.d.ts +3 -3
- package/src/lib/components/ProductForms/ProductFormFields/Progress.d.ts +3 -3
- package/src/lib/components/ProductForms/ProductFormFields/StartGeometry.d.ts +3 -3
- package/src/lib/components/ProductForms/ProductFormTac.d.ts +4 -2
- package/src/lib/components/ProductForms/utils.d.ts +9 -7
- package/src/lib/types.d.ts +5 -3
- package/src/lib/utils/api.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"main": "./index.esm.js",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@mui/material": "5.12.0",
|
|
15
|
-
"@mui/system": "5.14.
|
|
16
|
-
"@opengeoweb/api": "
|
|
17
|
-
"@opengeoweb/authentication": "
|
|
18
|
-
"@opengeoweb/core": "
|
|
19
|
-
"@opengeoweb/form-fields": "
|
|
20
|
-
"@opengeoweb/shared": "
|
|
21
|
-
"@opengeoweb/store": "
|
|
22
|
-
"@opengeoweb/theme": "
|
|
23
|
-
"@opengeoweb/webmap": "
|
|
24
|
-
"@opengeoweb/webmap-react": "
|
|
15
|
+
"@mui/system": "5.14.10",
|
|
16
|
+
"@opengeoweb/api": "8.1.0",
|
|
17
|
+
"@opengeoweb/authentication": "8.1.0",
|
|
18
|
+
"@opengeoweb/core": "8.1.0",
|
|
19
|
+
"@opengeoweb/form-fields": "8.1.0",
|
|
20
|
+
"@opengeoweb/shared": "8.1.0",
|
|
21
|
+
"@opengeoweb/store": "8.1.0",
|
|
22
|
+
"@opengeoweb/theme": "8.1.0",
|
|
23
|
+
"@opengeoweb/webmap": "8.1.0",
|
|
24
|
+
"@opengeoweb/webmap-react": "8.1.0",
|
|
25
25
|
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
26
26
|
"@redux-eggs/saga-extension": "2.2.0",
|
|
27
27
|
"@reduxjs/toolkit": "1.9.5",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"lodash": "4.17.21",
|
|
32
32
|
"moment": "2.29.4",
|
|
33
33
|
"react": "18.2.0",
|
|
34
|
-
"react-hook-form": "7.46.
|
|
34
|
+
"react-hook-form": "7.46.2",
|
|
35
35
|
"react-redux": "8.1.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
3
|
interface DrawToolsProps {
|
|
4
4
|
activeTool: string;
|
|
5
|
-
tools:
|
|
6
|
-
onChangeTool: (newToolMode:
|
|
5
|
+
tools: DrawMode[];
|
|
6
|
+
onChangeTool: (newToolMode: DrawMode) => void;
|
|
7
7
|
}
|
|
8
8
|
declare const DrawTools: React.FC<DrawToolsProps>;
|
|
9
9
|
export default DrawTools;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
3
|
import { ConfigurableFormFieldProps, ProductConfig } from '../../../types';
|
|
4
4
|
export declare const DEFAULT_ROUNDING_MOVEMENT_KT = 5;
|
|
5
5
|
export declare const DEFAULT_ROUNDING_MOVEMENT_KMH = 10;
|
|
@@ -13,8 +13,8 @@ interface ProgressProps extends ConfigurableFormFieldProps {
|
|
|
13
13
|
geoJSON?: GeoJSON.FeatureCollection;
|
|
14
14
|
geoJSONIntersection?: GeoJSON.FeatureCollection;
|
|
15
15
|
activeTool?: string;
|
|
16
|
-
tools?:
|
|
17
|
-
onChangeTool?: (newToolMode:
|
|
16
|
+
tools?: DrawMode[];
|
|
17
|
+
onChangeTool?: (newToolMode: DrawMode) => void;
|
|
18
18
|
}
|
|
19
19
|
declare const Progress: React.FC<ProgressProps>;
|
|
20
20
|
export default Progress;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
3
|
export declare const coordinatesEmptyMessage = "A start position drawing is required";
|
|
4
4
|
export declare const noIntersectionMessage = "The start position needs to be (partly) inside the FIR";
|
|
5
5
|
export declare const maximum6PointsMessage = "The start position drawing allows a maximum of 6 individual points";
|
|
@@ -11,8 +11,8 @@ interface StartGeometryProps {
|
|
|
11
11
|
geoJSON: GeoJSON.FeatureCollection;
|
|
12
12
|
geoJSONIntersection: GeoJSON.FeatureCollection | undefined;
|
|
13
13
|
activeTool: string;
|
|
14
|
-
tools:
|
|
15
|
-
onChangeTool: (newToolMode:
|
|
14
|
+
tools: DrawMode[];
|
|
15
|
+
onChangeTool: (newToolMode: DrawMode) => void;
|
|
16
16
|
}
|
|
17
17
|
declare const StartGeometry: React.FC<StartGeometryProps>;
|
|
18
18
|
export default StartGeometry;
|
|
@@ -3,10 +3,12 @@ import { CancelSigmet, Sigmet, Airmet, CancelAirmet } from '../../types';
|
|
|
3
3
|
type AviationProduct = Sigmet | CancelSigmet | Airmet | CancelAirmet;
|
|
4
4
|
export declare const noTAC = "Missing data: no TAC can be generated";
|
|
5
5
|
export declare const isLevelFieldsComplete: (product: Sigmet | Airmet) => boolean;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const isChangeComplete: (product: Sigmet | Airmet, omitChange?: boolean) => boolean;
|
|
7
|
+
export declare const isSurfaceVisComplete: (product: Sigmet | Airmet) => boolean;
|
|
8
|
+
export declare const shouldRetrieveTAC: (product: AviationProduct, omitChange?: boolean) => boolean;
|
|
7
9
|
export declare const useTAC: (initialProduct: AviationProduct, getTAC: (product: AviationProduct) => Promise<{
|
|
8
10
|
data: string;
|
|
9
|
-
}>, hasErrors?: () => boolean) => [string, any];
|
|
11
|
+
}>, hasErrors?: () => boolean, omitChange?: boolean) => [string, any];
|
|
10
12
|
interface ProductFormTACProps {
|
|
11
13
|
tac: string;
|
|
12
14
|
}
|
|
@@ -3,22 +3,23 @@ import { Feature } from '@turf/turf';
|
|
|
3
3
|
import { FeatureCollection } from 'geojson';
|
|
4
4
|
import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
|
|
5
5
|
import { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
6
|
-
import {
|
|
6
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
7
7
|
import { LevelUnits, ATSRLocation, ICAOLocation, ProductStatus, CancelSigmet, Sigmet, ProductCanbe, SigmetFromBackend, SigmetFromFrontend, ProductActions, Airmet, CancelAirmet, ProductConfig, Firareas, FIRConfigSigmet, AirmetFromBackend, AirmetFromFrontend, ProductType, AviationProduct, FIRLocationGeoJson, AirmetConfig, FIRConfigAirmet, StartOrEndDrawing } from '../../types';
|
|
8
8
|
export declare const getHoursBeforeValidity: (phenomenon: string, fir: string, config: ProductConfig) => number;
|
|
9
9
|
export declare const getMaxHoursOfValidity: (phenomenon: string, fir: string, config: ProductConfig) => number;
|
|
10
10
|
export declare const getValidFromDelayTimeMinutesFromConfig: (config: ProductConfig) => number;
|
|
11
11
|
export declare const getDefaultValidityMinutesFromConfig: (config: ProductConfig) => number;
|
|
12
|
+
export declare const getOmitChangeFromConfig: (config: ProductConfig) => boolean;
|
|
12
13
|
export declare const getFirArea: (selectedFIR: string, productConfig: ProductConfig) => string;
|
|
13
14
|
export declare const getActiveFIRArea: (selectedFIR: string, productConfig: ProductConfig) => FIRConfigSigmet | FIRConfigAirmet;
|
|
14
15
|
export declare const DEFAULT_MINIMUM_SURFACE_LEVEL = 0;
|
|
15
16
|
export declare const getMinCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
16
17
|
export declare const getMinCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
17
|
-
export declare const getMaxCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
18
|
-
export declare const getMaxCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
18
|
+
export declare const getMaxCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
19
|
+
export declare const getMaxCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
19
20
|
export declare const getMaxLevelValue: (unit: string, selectedFIR: string, productConfig: ProductConfig) => number | null;
|
|
20
21
|
export declare const getMinLevelValue: (unit: string, selectedFIR: string, productConfig: ProductConfig) => number;
|
|
21
|
-
export declare const getMaxWindSpeedValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
22
|
+
export declare const getMaxWindSpeedValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
22
23
|
export declare const DEFAULT_MIN_WIND_SPEED = 0;
|
|
23
24
|
export declare const getMinWindSpeedValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
24
25
|
export declare const getMaxVisibilityValue: (selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
@@ -33,7 +34,7 @@ export declare const getLevelInFeet: (level: number, unit: string) => number;
|
|
|
33
34
|
export declare const isLevelLower: (ownValue: number | string, ownUnit: LevelUnits, otherValue: number, otherUnit: LevelUnits) => boolean;
|
|
34
35
|
export declare const getDialogtitle: (product: AviationProduct, productType: ProductType) => string;
|
|
35
36
|
export declare const getProductFormMode: (canBeOptions: ProductCanbe[], productListItem: SigmetFromBackend | AirmetFromBackend) => string;
|
|
36
|
-
export declare const getProductFormLifecycleButtons:
|
|
37
|
+
export declare const getProductFormLifecycleButtons: React.FC;
|
|
37
38
|
export declare const hasValue: (value: number | string) => boolean;
|
|
38
39
|
export declare const prepareFormValues: <T extends AviationProduct>(product: T) => T;
|
|
39
40
|
export declare const createSigmetPostParameter: (sigmetToPost: Sigmet | CancelSigmet, newStatus: ProductStatus, previousUuid: string) => SigmetFromFrontend;
|
|
@@ -65,5 +66,6 @@ export declare const triggerValidations: (fieldNames: string[], getValues: UseFo
|
|
|
65
66
|
export declare const getProjection: (productConfig: ProductConfig) => mapTypes.MapPreset['proj'];
|
|
66
67
|
export declare const getShapeWithProperties: (shape: GeoJSON.Feature, properties: GeoJSON.GeoJsonProperties) => GeoJSON.Feature;
|
|
67
68
|
export declare const firID = "drawtools-fir";
|
|
68
|
-
export declare const getDrawTools: (type: StartOrEndDrawing, firShape: GeoJSON.FeatureCollection) =>
|
|
69
|
-
export declare const updateDrawToolsWithFir: (drawTools:
|
|
69
|
+
export declare const getDrawTools: (type: StartOrEndDrawing, firShape: GeoJSON.FeatureCollection) => DrawMode[];
|
|
70
|
+
export declare const updateDrawToolsWithFir: (drawTools: DrawMode[], newFirShape: GeoJSON.FeatureCollection) => DrawMode[];
|
|
71
|
+
export declare const getToolIcon: (id: string) => React.ReactElement;
|
package/src/lib/types.d.ts
CHANGED
|
@@ -92,13 +92,14 @@ export type DateType = string;
|
|
|
92
92
|
*
|
|
93
93
|
* Note: ProductStatus from the backend should be refreshed regularly to display status updates.
|
|
94
94
|
*/
|
|
95
|
-
export type ProductStatus = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED';
|
|
95
|
+
export type ProductStatus = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED' | 'DISCARDED';
|
|
96
96
|
export type ProductActions = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED' | 'DISCARDED' | 'CLOSED';
|
|
97
97
|
export declare enum ProductStatusDescription {
|
|
98
98
|
'DRAFT' = "Draft",
|
|
99
99
|
'PUBLISHED' = "Published",
|
|
100
100
|
'CANCELLED' = "Cancelled",
|
|
101
|
-
'EXPIRED' = "Expired"
|
|
101
|
+
'EXPIRED' = "Expired",
|
|
102
|
+
'DISCARDED' = "Discarded"
|
|
102
103
|
}
|
|
103
104
|
/**
|
|
104
105
|
* A Cancel Sigmet/Airmet (a sigmet/airmet which cancels another sigmet/airmet) can only have the status 'PUBLISHED',
|
|
@@ -213,7 +214,7 @@ export interface Sigmet extends BaseProduct {
|
|
|
213
214
|
* WKN: Weakening
|
|
214
215
|
* NC: No change
|
|
215
216
|
*/
|
|
216
|
-
change
|
|
217
|
+
change?: Change;
|
|
217
218
|
levelInfoMode: LevelInfoMode;
|
|
218
219
|
level: LevelType;
|
|
219
220
|
lowerLevel?: LevelType;
|
|
@@ -390,6 +391,7 @@ export type ProductConfig = {
|
|
|
390
391
|
default_validity_minutes: number;
|
|
391
392
|
fir_areas: Firareas;
|
|
392
393
|
mapPreset?: mapTypes.MapPreset;
|
|
394
|
+
omit_change_va_and_rdoact_cloud?: boolean;
|
|
393
395
|
};
|
|
394
396
|
export interface SigmetConfig extends ProductConfig {
|
|
395
397
|
fir_areas: SigmetFIRArea;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
2
|
import { Airmet, AirmetFromBackend, AirmetFromFrontend, ProductConfig, Sigmet, SigmetFromBackend, SigmetFromFrontend } from '../types';
|
|
3
3
|
export type SigmetAirmetApi = {
|
|
4
|
-
getSigmetConfiguration: (productConfigKey:
|
|
4
|
+
getSigmetConfiguration: (productConfigKey: string) => Promise<{
|
|
5
5
|
data: ProductConfig;
|
|
6
6
|
}>;
|
|
7
7
|
getSigmetList: () => Promise<{
|
|
@@ -11,7 +11,7 @@ export type SigmetAirmetApi = {
|
|
|
11
11
|
getSigmetTAC: (sigmetData: Sigmet) => Promise<{
|
|
12
12
|
data: string;
|
|
13
13
|
}>;
|
|
14
|
-
getAirmetConfiguration: (
|
|
14
|
+
getAirmetConfiguration: (productConfigKey: string) => Promise<{
|
|
15
15
|
data: ProductConfig;
|
|
16
16
|
}>;
|
|
17
17
|
getAirmetList: () => Promise<{
|