@opengeoweb/sigmet-airmet 6.0.0 → 6.0.2
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.d.ts +1 -0
- package/{index.js → index.esm.js} +155 -149
- package/package.json +14 -14
- package/src/lib/components/ComponentsLookUp/AirmetComponentsLookUp.d.ts +1 -1
- package/src/lib/components/ComponentsLookUp/SigmetComponentsLookUp.d.ts +1 -1
- package/src/lib/components/MetInfoWrapper/utils.d.ts +1 -1
- package/src/lib/components/ProductForms/AirmetForm/AirmetForm.stories.d.ts +5 -0
- package/src/lib/components/ProductForms/ProductFormFields/SelectFIR.d.ts +1 -1
- package/src/lib/components/ProductForms/ProductFormTac.d.ts +1 -1
- package/src/lib/components/ProductForms/utils.d.ts +1 -1
- package/src/lib/types.d.ts +28 -28
- package/src/lib/utils/api.d.ts +1 -1
- package/src/lib/utils/config/config.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
|
-
"module": "./index.js",
|
|
11
|
-
"main": "./index.js",
|
|
10
|
+
"module": "./index.esm.js",
|
|
12
11
|
"type": "module",
|
|
13
|
-
"
|
|
12
|
+
"main": "./index.esm.js",
|
|
14
13
|
"dependencies": {
|
|
15
14
|
"@mui/material": "5.12.0",
|
|
16
|
-
"@mui/system": "5.
|
|
17
|
-
"@opengeoweb/api": "6.0.
|
|
18
|
-
"@opengeoweb/authentication": "6.0.
|
|
19
|
-
"@opengeoweb/core": "6.0.
|
|
20
|
-
"@opengeoweb/form-fields": "6.0.
|
|
21
|
-
"@opengeoweb/shared": "6.0.
|
|
22
|
-
"@opengeoweb/store": "6.0.
|
|
23
|
-
"@opengeoweb/theme": "6.0.
|
|
15
|
+
"@mui/system": "5.14.5",
|
|
16
|
+
"@opengeoweb/api": "6.0.2",
|
|
17
|
+
"@opengeoweb/authentication": "6.0.2",
|
|
18
|
+
"@opengeoweb/core": "6.0.2",
|
|
19
|
+
"@opengeoweb/form-fields": "6.0.2",
|
|
20
|
+
"@opengeoweb/shared": "6.0.2",
|
|
21
|
+
"@opengeoweb/store": "6.0.2",
|
|
22
|
+
"@opengeoweb/theme": "6.0.2",
|
|
23
|
+
"@opengeoweb/webmap": "6.0.2",
|
|
24
24
|
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
25
25
|
"@redux-eggs/saga-extension": "2.2.0",
|
|
26
26
|
"@reduxjs/toolkit": "1.9.5",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"lodash": "4.17.21",
|
|
31
31
|
"moment": "2.29.4",
|
|
32
32
|
"react": "18.2.0",
|
|
33
|
-
"react-hook-form": "7.45.
|
|
34
|
-
"react-redux": "8.1.
|
|
33
|
+
"react-hook-form": "7.45.4",
|
|
34
|
+
"react-redux": "8.1.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {}
|
|
37
37
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ApiModuleProps } from './AviationProductApiWrapper';
|
|
3
|
-
|
|
3
|
+
type AirmetComponentType = 'AirmetModule';
|
|
4
4
|
export interface AirmetComponentsLookUpPayload {
|
|
5
5
|
componentType: AirmetComponentType;
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ApiModuleProps } from './AviationProductApiWrapper';
|
|
3
|
-
|
|
3
|
+
type SigmetComponentType = 'SigmetModule';
|
|
4
4
|
export interface SigmetComponentsLookUpPayload {
|
|
5
5
|
componentType: SigmetComponentType;
|
|
6
6
|
id: string;
|
|
@@ -2,7 +2,7 @@ import { AirmetFromBackend, ProductConfig, ProductType, SigmetFromBackend } from
|
|
|
2
2
|
export declare const ERROR_CONFIG = "An error has occurred while loading the config";
|
|
3
3
|
export declare const ERROR_BACKEND = "An error has occurred while retrieving the list, please try again";
|
|
4
4
|
export declare const validateConfig: (productType: ProductType, productConfig: ProductConfig) => true | Error;
|
|
5
|
-
|
|
5
|
+
type State = {
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
error: Error;
|
|
8
8
|
result: SigmetFromBackend[] | AirmetFromBackend[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ConfigurableFormFieldProps, ProductConfig } from '../../../types';
|
|
3
|
-
export declare const getFirLocationDefaultValues: (productConfig: ProductConfig, currentFir?: string
|
|
3
|
+
export declare const getFirLocationDefaultValues: (productConfig: ProductConfig, currentFir?: string) => {
|
|
4
4
|
locationIndicatorATSR: string;
|
|
5
5
|
locationIndicatorATSU: string;
|
|
6
6
|
locationIndicatorMWO: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
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 shouldRetrieveTAC: (product: AviationProduct) => boolean;
|
|
6
6
|
export declare const useTAC: (initialProduct: AviationProduct, getTAC: (product: AviationProduct) => Promise<{
|
|
@@ -49,7 +49,7 @@ export declare const getAllowedUnits: (selectedFIR: string, productConfig: Produ
|
|
|
49
49
|
/**
|
|
50
50
|
* Function to translate the geojson data to a GeoJSON.FeatureCollection
|
|
51
51
|
*/
|
|
52
|
-
export declare const getFir: (productConfig: ProductConfig, firName?: string
|
|
52
|
+
export declare const getFir: (productConfig: ProductConfig, firName?: string) => FIRLocationGeoJson;
|
|
53
53
|
/**
|
|
54
54
|
* Function to check if the given geojson object has 'fir' selectionType property
|
|
55
55
|
*/
|
package/src/lib/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { mapTypes } from '@opengeoweb/store';
|
|
3
|
-
export
|
|
3
|
+
export type ProductType = 'sigmet' | 'airmet';
|
|
4
4
|
/**
|
|
5
5
|
* The possible phenomena for the sigmet
|
|
6
6
|
*/
|
|
@@ -66,11 +66,11 @@ export declare enum VisibilityCause {
|
|
|
66
66
|
'SQ' = "Squalls",
|
|
67
67
|
'VA' = "Volcanic Ash"
|
|
68
68
|
}
|
|
69
|
-
export
|
|
70
|
-
export
|
|
71
|
-
export
|
|
72
|
-
export
|
|
73
|
-
export
|
|
69
|
+
export type ICAOLocation = string;
|
|
70
|
+
export type MWOLocation = string;
|
|
71
|
+
export type ATSULocation = string;
|
|
72
|
+
export type ATSRLocation = string;
|
|
73
|
+
export type FIR = Record<ICAOLocation, string>;
|
|
74
74
|
export declare enum MovementUnit {
|
|
75
75
|
'KT' = "kt",
|
|
76
76
|
'KMH' = "kmh"
|
|
@@ -79,12 +79,12 @@ export declare enum WindUnit {
|
|
|
79
79
|
'KT' = "kt",
|
|
80
80
|
'MPS' = "mps"
|
|
81
81
|
}
|
|
82
|
-
export
|
|
82
|
+
export type VisibilityUnit = 'm';
|
|
83
83
|
export interface Coordinate {
|
|
84
84
|
latitude: number;
|
|
85
85
|
longitude: number;
|
|
86
86
|
}
|
|
87
|
-
export
|
|
87
|
+
export type DateType = string;
|
|
88
88
|
/**
|
|
89
89
|
* ProductStatus is returned by the backend. The backend fills in this property.
|
|
90
90
|
* For the backend, it should only need to store 'DRAFT' | 'PUBLISHED' | 'CANCELLED' in its DB.
|
|
@@ -92,8 +92,8 @@ export declare type DateType = string;
|
|
|
92
92
|
*
|
|
93
93
|
* Note: ProductStatus from the backend should be refreshed regularly to display status updates.
|
|
94
94
|
*/
|
|
95
|
-
export
|
|
96
|
-
export
|
|
95
|
+
export type ProductStatus = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED';
|
|
96
|
+
export type ProductActions = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED' | 'DISCARDED' | 'CLOSED';
|
|
97
97
|
export declare enum ProductStatusDescription {
|
|
98
98
|
'DRAFT' = "Draft",
|
|
99
99
|
'PUBLISHED' = "Published",
|
|
@@ -104,7 +104,7 @@ export declare enum ProductStatusDescription {
|
|
|
104
104
|
* A Cancel Sigmet/Airmet (a sigmet/airmet which cancels another sigmet/airmet) can only have the status 'PUBLISHED',
|
|
105
105
|
* e.g. cannot be edited, cancelled or stored as draft.
|
|
106
106
|
*/
|
|
107
|
-
export
|
|
107
|
+
export type CancelProductStatus = 'PUBLISHED';
|
|
108
108
|
/**
|
|
109
109
|
* ProductCanbe lifecycle is determined by the backend. E.g. the backend fills in these properties.
|
|
110
110
|
*
|
|
@@ -113,13 +113,13 @@ export declare type CancelProductStatus = 'PUBLISHED';
|
|
|
113
113
|
* 'PUBLISHED': product can be PUBLISHED
|
|
114
114
|
* 'CANCELLED': product can be CANCELLED
|
|
115
115
|
*/
|
|
116
|
-
export
|
|
116
|
+
export type ProductCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED';
|
|
117
117
|
/**
|
|
118
118
|
* ProductSequence is a sequence label with a counter of the SIGMETs/AIRMETs issued on a day (starting at with 1 01:00),
|
|
119
119
|
* max 3 characters long; first character should be a capital letter,
|
|
120
120
|
* others are numbers: A01-A99, 01-99 or 1-99
|
|
121
121
|
*/
|
|
122
|
-
export
|
|
122
|
+
export type ProductSequenceId = string;
|
|
123
123
|
/**
|
|
124
124
|
* This is the base sigmet/airmet structure, used for both the Sigmet, Airmet and CancelSigmet, CancelAirmet
|
|
125
125
|
*/
|
|
@@ -193,12 +193,12 @@ export declare enum Direction {
|
|
|
193
193
|
'NW' = "NW",
|
|
194
194
|
'NNW' = "NNW"
|
|
195
195
|
}
|
|
196
|
-
export
|
|
197
|
-
export
|
|
198
|
-
export
|
|
199
|
-
export
|
|
200
|
-
export
|
|
201
|
-
export
|
|
196
|
+
export type ObservationOrForcast = 'OBS' | 'FCST';
|
|
197
|
+
export type Change = 'INTSF' | 'WKN' | 'NC';
|
|
198
|
+
export type LevelInfoMode = 'AT' | 'BETW' | 'BETW_SFC' | 'TOPS' | 'TOPS_ABV' | 'TOPS_BLW' | 'ABV';
|
|
199
|
+
export type CloudLevelInfoMode = 'BETW' | 'BETW_SFC' | 'BETW_SFC_ABV' | 'BETW_ABV';
|
|
200
|
+
export type SigmetMovementType = 'STATIONARY' | 'MOVEMENT' | 'FORECAST_POSITION' | 'NO_VA_EXP';
|
|
201
|
+
export type AirmetMovementType = 'STATIONARY' | 'MOVEMENT';
|
|
202
202
|
/**
|
|
203
203
|
* To store all the other sigmet information
|
|
204
204
|
*/
|
|
@@ -292,7 +292,7 @@ export interface AirmetFromBackend {
|
|
|
292
292
|
creationDate: DateType;
|
|
293
293
|
canbe: ProductCanbe[];
|
|
294
294
|
}
|
|
295
|
-
export
|
|
295
|
+
export type AviationProduct = Sigmet | CancelSigmet | Airmet | CancelAirmet;
|
|
296
296
|
export declare const isInstanceOfSigmet: (obj: Sigmet | CancelSigmet) => obj is Sigmet;
|
|
297
297
|
export declare const isInstanceOfCancelSigmet: (obj: AviationProduct) => obj is CancelSigmet;
|
|
298
298
|
export declare const isInstanceOfAirmet: (obj: Airmet | CancelAirmet) => obj is Airmet;
|
|
@@ -303,7 +303,7 @@ export declare enum StartOrEndDrawing {
|
|
|
303
303
|
'start' = "start",
|
|
304
304
|
'end' = "end"
|
|
305
305
|
}
|
|
306
|
-
export
|
|
306
|
+
export type FormMode = 'new' | 'edit' | 'view';
|
|
307
307
|
export interface FormFieldProps {
|
|
308
308
|
productType?: ProductType;
|
|
309
309
|
onChange?: (event?: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -317,7 +317,7 @@ export interface AllowedUnits {
|
|
|
317
317
|
unit_type: string;
|
|
318
318
|
allowed_units: string[];
|
|
319
319
|
}
|
|
320
|
-
export
|
|
320
|
+
export type FirAllowedUnits = Record<string, AllowedUnits[]>;
|
|
321
321
|
export interface CloudLevelMinMaxType {
|
|
322
322
|
FT?: number;
|
|
323
323
|
M?: number;
|
|
@@ -335,10 +335,10 @@ export interface MovementMinMaxType {
|
|
|
335
335
|
KT?: number;
|
|
336
336
|
KMH?: number;
|
|
337
337
|
}
|
|
338
|
-
export
|
|
338
|
+
export type FIRLocationGeoJson = GeoJSON.FeatureCollection<GeoJSON.Geometry, {
|
|
339
339
|
selectionType: string;
|
|
340
340
|
}>;
|
|
341
|
-
export
|
|
341
|
+
export type FIRArea = {
|
|
342
342
|
fir_name: string;
|
|
343
343
|
fir_location: FIRLocationGeoJson;
|
|
344
344
|
location_indicator_atsr: string;
|
|
@@ -380,10 +380,10 @@ export interface FIRConfigAirmet extends FIRArea {
|
|
|
380
380
|
visibility_rounding_below?: number;
|
|
381
381
|
visibility_rounding_above?: number;
|
|
382
382
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
export
|
|
386
|
-
export
|
|
383
|
+
type SigmetFIRArea = Record<string, FIRConfigSigmet>;
|
|
384
|
+
type AirmetFIRArea = Record<string, FIRConfigAirmet>;
|
|
385
|
+
export type Firareas = SigmetFIRArea | AirmetFIRArea;
|
|
386
|
+
export type ProductConfig = {
|
|
387
387
|
location_indicator_mwo: string;
|
|
388
388
|
active_firs: string[];
|
|
389
389
|
valid_from_delay_minutes: number;
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
2
|
import { Airmet, AirmetFromBackend, AirmetFromFrontend, ProductConfig, Sigmet, SigmetFromBackend, SigmetFromFrontend } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type SigmetAirmetApi = {
|
|
4
4
|
getSigmetConfiguration: (productConfigKey: any) => Promise<{
|
|
5
5
|
data: ProductConfig;
|
|
6
6
|
}>;
|
|
@@ -9,7 +9,7 @@ interface ErrorObject<Keyword extends string = string, Params = Record<string, u
|
|
|
9
9
|
schema?: Schema;
|
|
10
10
|
data?: unknown;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type AJVErrorObject = ErrorObject<string, Record<string, unknown>, unknown>;
|
|
13
13
|
export declare const parseErrors: (errors: AJVErrorObject[]) => AJVErrorObject[];
|
|
14
14
|
export declare const createReadableErrorMessage: (errors: AJVErrorObject[]) => string;
|
|
15
15
|
export declare const validateSigmet: (sigmetConfig: SigmetConfig) => boolean | AJVErrorObject[];
|