@opengeoweb/sigmet-airmet 4.14.1 → 4.15.1
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 +151 -48
- package/index.umd.js +186 -48
- package/lib/components/ProductForms/ProductFormFields/Levels.d.ts +9 -4
- package/lib/components/ProductForms/ProductFormFields/Progress.d.ts +6 -4
- package/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.d.ts +6 -4
- package/lib/components/ProductForms/ProductFormFields/SurfaceWind.d.ts +4 -3
- package/lib/types.d.ts +8 -0
- package/package.json +7 -7
package/index.esm.js
CHANGED
|
@@ -1467,27 +1467,52 @@ var DrawTools = function DrawTools(_ref) {
|
|
|
1467
1467
|
}))));
|
|
1468
1468
|
};
|
|
1469
1469
|
|
|
1470
|
-
var
|
|
1471
|
-
var
|
|
1470
|
+
var DEFAULT_ROUNDING_LEVELS_FL = 100;
|
|
1471
|
+
var DEFAULT_ROUNDING_LEVELS_FT = 5;
|
|
1472
|
+
var DEFAULT_ROUNDING_LEVELS_M = 1;
|
|
1473
|
+
var getLevelInvalidStepsForFLUnitMessage = function getLevelInvalidStepsForFLUnitMessage() {
|
|
1474
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_LEVELS_FL;
|
|
1475
|
+
return "Levels must be rounded to the nearest ".concat(value);
|
|
1476
|
+
};
|
|
1477
|
+
var getLevelInvalidStepsForFTUnitMessage = function getLevelInvalidStepsForFTUnitMessage() {
|
|
1478
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_LEVELS_FT;
|
|
1479
|
+
return "Levels must be rounded to the nearest ".concat(value, "ft");
|
|
1480
|
+
};
|
|
1481
|
+
var getLevelInvalidStepsForMUnitMessage = function getLevelInvalidStepsForMUnitMessage() {
|
|
1482
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_LEVELS_M;
|
|
1483
|
+
return "Levels must be rounded to the nearest ".concat(value, "m");
|
|
1484
|
+
};
|
|
1485
|
+
var invalidUnitMessage$1 = 'Level unit not defined';
|
|
1472
1486
|
|
|
1473
|
-
var _validateLevels = function validateLevels(value, unit) {
|
|
1487
|
+
var _validateLevels = function validateLevels(value, unit, productConfig, selectedFIR) {
|
|
1474
1488
|
if (isEmpty(value)) {
|
|
1475
1489
|
return true;
|
|
1476
|
-
}
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
|
|
1493
|
+
_getActiveFIRArea$lev = _getActiveFIRArea.level_rounding_FL,
|
|
1494
|
+
level_rounding_FL = _getActiveFIRArea$lev === void 0 ? DEFAULT_ROUNDING_LEVELS_FL : _getActiveFIRArea$lev,
|
|
1495
|
+
_getActiveFIRArea$lev2 = _getActiveFIRArea.level_rounding_FT,
|
|
1496
|
+
level_rounding_FT = _getActiveFIRArea$lev2 === void 0 ? DEFAULT_ROUNDING_LEVELS_FT : _getActiveFIRArea$lev2,
|
|
1497
|
+
_getActiveFIRArea$lev3 = _getActiveFIRArea.level_rounding_M,
|
|
1498
|
+
level_rounding_M = _getActiveFIRArea$lev3 === void 0 ? DEFAULT_ROUNDING_LEVELS_M : _getActiveFIRArea$lev3; // Parse to integer to check for steps
|
|
1477
1499
|
|
|
1478
1500
|
|
|
1479
1501
|
var intLevel = parseInt(value, 10);
|
|
1480
1502
|
|
|
1481
1503
|
if (LevelUnits[unit] === LevelUnits.FT) {
|
|
1482
|
-
return intLevel %
|
|
1504
|
+
return intLevel % level_rounding_FT === 0 || getLevelInvalidStepsForFTUnitMessage(level_rounding_FT);
|
|
1483
1505
|
}
|
|
1484
1506
|
|
|
1485
1507
|
if (LevelUnits[unit] === LevelUnits.FL) {
|
|
1486
|
-
return intLevel %
|
|
1487
|
-
}
|
|
1508
|
+
return intLevel % level_rounding_FL === 0 || getLevelInvalidStepsForFLUnitMessage(level_rounding_FL);
|
|
1509
|
+
}
|
|
1488
1510
|
|
|
1511
|
+
if (LevelUnits[unit] === LevelUnits.M) {
|
|
1512
|
+
return intLevel % level_rounding_M === 0 || getLevelInvalidStepsForMUnitMessage(level_rounding_M);
|
|
1513
|
+
}
|
|
1489
1514
|
|
|
1490
|
-
return
|
|
1515
|
+
return invalidUnitMessage$1;
|
|
1491
1516
|
};
|
|
1492
1517
|
var invalidLevelUnitCombinationMessage = 'Invalid unit combination';
|
|
1493
1518
|
|
|
@@ -1631,7 +1656,7 @@ var Levels = function Levels(_ref) {
|
|
|
1631
1656
|
},
|
|
1632
1657
|
validateLevels: function validateLevels(value) {
|
|
1633
1658
|
return (// level step depends on the unit
|
|
1634
|
-
_validateLevels(value, getValues('level.unit'))
|
|
1659
|
+
_validateLevels(value, getValues('level.unit'), productConfig, selectedFIR)
|
|
1635
1660
|
);
|
|
1636
1661
|
}
|
|
1637
1662
|
}
|
|
@@ -1709,7 +1734,7 @@ var Levels = function Levels(_ref) {
|
|
|
1709
1734
|
},
|
|
1710
1735
|
validateLevels: function validateLevels(value) {
|
|
1711
1736
|
return (// level step depends on the unit
|
|
1712
|
-
_validateLevels(value, getValues('level.unit'))
|
|
1737
|
+
_validateLevels(value, getValues('level.unit'), productConfig, selectedFIR)
|
|
1713
1738
|
);
|
|
1714
1739
|
}
|
|
1715
1740
|
}
|
|
@@ -1809,7 +1834,7 @@ var Levels = function Levels(_ref) {
|
|
|
1809
1834
|
},
|
|
1810
1835
|
validateLevels: function validateLevels(value) {
|
|
1811
1836
|
return (// level step depends on the unit
|
|
1812
|
-
_validateLevels(value, getValues('lowerLevel.unit'))
|
|
1837
|
+
_validateLevels(value, getValues('lowerLevel.unit'), productConfig, selectedFIR)
|
|
1813
1838
|
);
|
|
1814
1839
|
}
|
|
1815
1840
|
}
|
|
@@ -1896,7 +1921,7 @@ var Levels = function Levels(_ref) {
|
|
|
1896
1921
|
},
|
|
1897
1922
|
validateLevels: function validateLevels(value) {
|
|
1898
1923
|
return (// level step depends on the unit
|
|
1899
|
-
_validateLevels(value, getValues('level.unit'))
|
|
1924
|
+
_validateLevels(value, getValues('level.unit'), productConfig, selectedFIR)
|
|
1900
1925
|
);
|
|
1901
1926
|
}
|
|
1902
1927
|
}
|
|
@@ -2169,23 +2194,38 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2169
2194
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2170
2195
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2171
2196
|
* */
|
|
2197
|
+
var DEFAULT_ROUNDING_MOVEMENT_KT = 5;
|
|
2198
|
+
var DEFAULT_ROUNDING_MOVEMENT_KMH = 10;
|
|
2199
|
+
var getMovementStepValKTMessage = function getMovementStepValKTMessage() {
|
|
2200
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_MOVEMENT_KT;
|
|
2201
|
+
return "Speed should be rounded to the nearest ".concat(value, "kt");
|
|
2202
|
+
};
|
|
2203
|
+
var getMovementStepValKMHMessage = function getMovementStepValKMHMessage() {
|
|
2204
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_MOVEMENT_KMH;
|
|
2205
|
+
return "Speed should be rounded to the nearest ".concat(value, "kmh");
|
|
2206
|
+
};
|
|
2172
2207
|
var coordinatesEmptyMessage = 'An end position drawing is required when selecting End position';
|
|
2173
|
-
var movementStepValMessageKT = 'Speed should be rounded to the nearest 5kt';
|
|
2174
|
-
var movementStepValMessageKMH = 'Speed should be rounded to the nearest 10kmh';
|
|
2175
2208
|
var noIntersectionMessage = 'The end position needs to be (partly) inside the FIR';
|
|
2176
2209
|
var maximum6PointsMessage = 'The end position drawing allows a maximum of 6 individual points';
|
|
2177
2210
|
|
|
2178
|
-
var _validateMovementSteps = function validateMovementSteps(value, unit) {
|
|
2179
|
-
if (isEmpty(value)) return true;
|
|
2211
|
+
var _validateMovementSteps = function validateMovementSteps(value, unit, productConfig, selectedFIR) {
|
|
2212
|
+
if (isEmpty(value)) return true;
|
|
2213
|
+
|
|
2214
|
+
var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
|
|
2215
|
+
_getActiveFIRArea$mov = _getActiveFIRArea.movement_rounding_kt,
|
|
2216
|
+
movement_rounding_kt = _getActiveFIRArea$mov === void 0 ? DEFAULT_ROUNDING_MOVEMENT_KT : _getActiveFIRArea$mov,
|
|
2217
|
+
_getActiveFIRArea$mov2 = _getActiveFIRArea.movement_rounding_kmh,
|
|
2218
|
+
movement_rounding_kmh = _getActiveFIRArea$mov2 === void 0 ? DEFAULT_ROUNDING_MOVEMENT_KMH : _getActiveFIRArea$mov2; // Parse to integer to check for steps
|
|
2219
|
+
|
|
2180
2220
|
|
|
2181
2221
|
var intLevel = parseInt(value, 10);
|
|
2182
2222
|
|
|
2183
2223
|
if (MovementUnit[unit] === MovementUnit.KT) {
|
|
2184
|
-
return intLevel %
|
|
2224
|
+
return intLevel % movement_rounding_kt === 0 || getMovementStepValKTMessage(movement_rounding_kt);
|
|
2185
2225
|
}
|
|
2186
2226
|
|
|
2187
2227
|
if (MovementUnit[unit] === MovementUnit.KMH) {
|
|
2188
|
-
return intLevel %
|
|
2228
|
+
return intLevel % movement_rounding_kmh === 0 || getMovementStepValKMHMessage(movement_rounding_kmh);
|
|
2189
2229
|
}
|
|
2190
2230
|
|
|
2191
2231
|
return 'Invalid unit';
|
|
@@ -2342,7 +2382,7 @@ var Progress = function Progress(_ref) {
|
|
|
2342
2382
|
},
|
|
2343
2383
|
validateMovementSteps: function validateMovementSteps(value) {
|
|
2344
2384
|
return (// movement step depends on the unit
|
|
2345
|
-
_validateMovementSteps(value, getValues('movementUnit'))
|
|
2385
|
+
_validateMovementSteps(value, getValues('movementUnit'), productConfig, selectedFIR)
|
|
2346
2386
|
);
|
|
2347
2387
|
}
|
|
2348
2388
|
}
|
|
@@ -2839,18 +2879,34 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
2839
2879
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2840
2880
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2841
2881
|
* */
|
|
2842
|
-
var
|
|
2843
|
-
var
|
|
2844
|
-
var
|
|
2845
|
-
|
|
2882
|
+
var DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW = 50;
|
|
2883
|
+
var DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE = 100;
|
|
2884
|
+
var getInvalidSurfaceVisibilityTill750StepsMessage = function getInvalidSurfaceVisibilityTill750StepsMessage() {
|
|
2885
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW;
|
|
2886
|
+
return "A visibility below 750m must be rounded to the nearest ".concat(value, "m");
|
|
2887
|
+
};
|
|
2888
|
+
var getInvalidSurfaceVisibilityFrom750StepsMessage = function getInvalidSurfaceVisibilityFrom750StepsMessage() {
|
|
2889
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE;
|
|
2890
|
+
return "A visibility above 750m must be rounded to the nearest ".concat(value, "m");
|
|
2891
|
+
};
|
|
2892
|
+
|
|
2893
|
+
var _validateSurfaceVisibility = function validateSurfaceVisibility(value, productConfig, selectedFIR) {
|
|
2894
|
+
if (isEmpty(value)) return true;
|
|
2895
|
+
|
|
2896
|
+
var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
|
|
2897
|
+
_getActiveFIRArea$vis = _getActiveFIRArea.visibility_rounding_below,
|
|
2898
|
+
visibility_rounding_below = _getActiveFIRArea$vis === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW : _getActiveFIRArea$vis,
|
|
2899
|
+
_getActiveFIRArea$vis2 = _getActiveFIRArea.visibility_rounding_above,
|
|
2900
|
+
visibility_rounding_above = _getActiveFIRArea$vis2 === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE : _getActiveFIRArea$vis2; // Parse to integer to check for steps
|
|
2901
|
+
|
|
2846
2902
|
|
|
2847
2903
|
var intVisibility = parseInt(value, 10);
|
|
2848
2904
|
|
|
2849
2905
|
if (intVisibility > 750) {
|
|
2850
|
-
return intVisibility %
|
|
2906
|
+
return intVisibility % visibility_rounding_above === 0 || getInvalidSurfaceVisibilityFrom750StepsMessage(visibility_rounding_above);
|
|
2851
2907
|
}
|
|
2852
2908
|
|
|
2853
|
-
return intVisibility %
|
|
2909
|
+
return intVisibility % visibility_rounding_below === 0 || getInvalidSurfaceVisibilityTill750StepsMessage(visibility_rounding_below);
|
|
2854
2910
|
};
|
|
2855
2911
|
|
|
2856
2912
|
var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
@@ -2905,7 +2961,9 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
|
2905
2961
|
isValidMax(value, getMaxVisibilityValue(selectedFIR, productConfig)) || "The maximum visibility in meters is ".concat(getMaxVisibilityValue(selectedFIR, productConfig))
|
|
2906
2962
|
);
|
|
2907
2963
|
},
|
|
2908
|
-
validateSurfaceVisibility: validateSurfaceVisibility
|
|
2964
|
+
validateSurfaceVisibility: function validateSurfaceVisibility(value) {
|
|
2965
|
+
return _validateSurfaceVisibility(value, productConfig, selectedFIR);
|
|
2966
|
+
}
|
|
2909
2967
|
}
|
|
2910
2968
|
},
|
|
2911
2969
|
disabled: isDisabled,
|
|
@@ -2953,12 +3011,22 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
|
2953
3011
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2954
3012
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2955
3013
|
* */
|
|
2956
|
-
var
|
|
2957
|
-
var
|
|
2958
|
-
|
|
3014
|
+
var DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION = 10;
|
|
3015
|
+
var invalidSurfaceWindDirectionStepsMessage = function invalidSurfaceWindDirectionStepsMessage() {
|
|
3016
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION;
|
|
3017
|
+
return "Direction must be rounded to the nearest ".concat(value, " deg.");
|
|
3018
|
+
};
|
|
3019
|
+
|
|
3020
|
+
var _validateSurfaceWindDirection = function validateSurfaceWindDirection(value, productConfig, selectedFIR) {
|
|
3021
|
+
if (isEmpty(value)) return true;
|
|
3022
|
+
|
|
3023
|
+
var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
|
|
3024
|
+
_getActiveFIRArea$win = _getActiveFIRArea.wind_direction_rounding,
|
|
3025
|
+
wind_direction_rounding = _getActiveFIRArea$win === void 0 ? DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION : _getActiveFIRArea$win; // Parse to integer to check for steps
|
|
3026
|
+
|
|
2959
3027
|
|
|
2960
3028
|
var intVisibility = parseInt(value, 10);
|
|
2961
|
-
return intVisibility %
|
|
3029
|
+
return intVisibility % wind_direction_rounding === 0 || invalidSurfaceWindDirectionStepsMessage(wind_direction_rounding);
|
|
2962
3030
|
};
|
|
2963
3031
|
|
|
2964
3032
|
var SurfaceWind = function SurfaceWind(_ref) {
|
|
@@ -3016,7 +3084,9 @@ var SurfaceWind = function SurfaceWind(_ref) {
|
|
|
3016
3084
|
},
|
|
3017
3085
|
validate: {
|
|
3018
3086
|
isRequired: isRequired,
|
|
3019
|
-
validateSurfaceWindDirection: validateSurfaceWindDirection
|
|
3087
|
+
validateSurfaceWindDirection: function validateSurfaceWindDirection(value) {
|
|
3088
|
+
return _validateSurfaceWindDirection(value, productConfig, selectedFIR);
|
|
3089
|
+
}
|
|
3020
3090
|
}
|
|
3021
3091
|
},
|
|
3022
3092
|
disabled: isDisabled,
|
|
@@ -4026,6 +4096,9 @@ var fir_areas$1 = {
|
|
|
4026
4096
|
FT: 4900,
|
|
4027
4097
|
FL: 650
|
|
4028
4098
|
},
|
|
4099
|
+
level_rounding_FL: 100,
|
|
4100
|
+
level_rounding_FT: 5,
|
|
4101
|
+
level_rounding_M: 1,
|
|
4029
4102
|
movement_min: {
|
|
4030
4103
|
KT: 5,
|
|
4031
4104
|
KMH: 10
|
|
@@ -4034,6 +4107,8 @@ var fir_areas$1 = {
|
|
|
4034
4107
|
KT: 150,
|
|
4035
4108
|
KMH: 99
|
|
4036
4109
|
},
|
|
4110
|
+
movement_rounding_kt: 5,
|
|
4111
|
+
movement_rounding_kmh: 10,
|
|
4037
4112
|
units: [
|
|
4038
4113
|
{
|
|
4039
4114
|
unit_type: "level_unit",
|
|
@@ -5279,6 +5354,8 @@ var fir_areas$1 = {
|
|
|
5279
5354
|
tc_hours_before_validity: 12,
|
|
5280
5355
|
va_max_hours_of_validity: 6,
|
|
5281
5356
|
va_hours_before_validity: 12,
|
|
5357
|
+
movement_rounding_kt: 20,
|
|
5358
|
+
movement_rounding_kmh: 30,
|
|
5282
5359
|
adjacent_firs: [
|
|
5283
5360
|
"EKDK",
|
|
5284
5361
|
"EDWW",
|
|
@@ -5298,7 +5375,8 @@ var fir_areas$1 = {
|
|
|
5298
5375
|
{
|
|
5299
5376
|
unit_type: "movement_unit",
|
|
5300
5377
|
allowed_units: [
|
|
5301
|
-
"KT"
|
|
5378
|
+
"KT",
|
|
5379
|
+
"KMH"
|
|
5302
5380
|
]
|
|
5303
5381
|
}
|
|
5304
5382
|
]
|
|
@@ -5518,6 +5596,7 @@ var fir_areas = {
|
|
|
5518
5596
|
cloud_level_rounding_ft: 100,
|
|
5519
5597
|
cloud_level_rounding_m_below: 30,
|
|
5520
5598
|
cloud_level_rounding_m_above: 300,
|
|
5599
|
+
wind_direction_rounding: 10,
|
|
5521
5600
|
wind_speed_min: {
|
|
5522
5601
|
KT: 31,
|
|
5523
5602
|
MPS: 0
|
|
@@ -5528,6 +5607,8 @@ var fir_areas = {
|
|
|
5528
5607
|
},
|
|
5529
5608
|
visibility_max: 4900,
|
|
5530
5609
|
visibility_min: 0,
|
|
5610
|
+
visibility_rounding_below: 50,
|
|
5611
|
+
visibility_rounding_above: 100,
|
|
5531
5612
|
level_min: {
|
|
5532
5613
|
FT: 100,
|
|
5533
5614
|
FL: 50
|
|
@@ -5536,6 +5617,9 @@ var fir_areas = {
|
|
|
5536
5617
|
FT: 4900,
|
|
5537
5618
|
FL: 100
|
|
5538
5619
|
},
|
|
5620
|
+
level_rounding_FL: 100,
|
|
5621
|
+
level_rounding_FT: 5,
|
|
5622
|
+
level_rounding_M: 1,
|
|
5539
5623
|
movement_min: {
|
|
5540
5624
|
KT: 5,
|
|
5541
5625
|
KMH: 10
|
|
@@ -5544,6 +5628,8 @@ var fir_areas = {
|
|
|
5544
5628
|
KT: 150,
|
|
5545
5629
|
KMH: 99
|
|
5546
5630
|
},
|
|
5631
|
+
movement_rounding_kt: 5,
|
|
5632
|
+
movement_rounding_kmh: 10,
|
|
5547
5633
|
units: [
|
|
5548
5634
|
{
|
|
5549
5635
|
unit_type: "level_unit",
|
|
@@ -6796,6 +6882,8 @@ var fir_areas = {
|
|
|
6796
6882
|
location_indicator_atsu: "EZZZ",
|
|
6797
6883
|
max_hours_of_validity: 4,
|
|
6798
6884
|
hours_before_validity: 4,
|
|
6885
|
+
movement_rounding_kt: 5,
|
|
6886
|
+
movement_rounding_kmh: 10,
|
|
6799
6887
|
units: [
|
|
6800
6888
|
{
|
|
6801
6889
|
unit_type: "level_unit",
|
|
@@ -6807,7 +6895,8 @@ var fir_areas = {
|
|
|
6807
6895
|
{
|
|
6808
6896
|
unit_type: "movement_unit",
|
|
6809
6897
|
allowed_units: [
|
|
6810
|
-
"KT"
|
|
6898
|
+
"KT",
|
|
6899
|
+
"KMH"
|
|
6811
6900
|
]
|
|
6812
6901
|
},
|
|
6813
6902
|
{
|
|
@@ -6897,6 +6986,12 @@ var properties$3 = {
|
|
|
6897
6986
|
hours_before_validity: {
|
|
6898
6987
|
type: "number"
|
|
6899
6988
|
},
|
|
6989
|
+
movement_rounding_kt: {
|
|
6990
|
+
type: "number"
|
|
6991
|
+
},
|
|
6992
|
+
movement_rounding_kmh: {
|
|
6993
|
+
type: "number"
|
|
6994
|
+
},
|
|
6900
6995
|
level_min: {
|
|
6901
6996
|
type: "object",
|
|
6902
6997
|
additionalProperties: {
|
|
@@ -6909,6 +7004,15 @@ var properties$3 = {
|
|
|
6909
7004
|
type: "number"
|
|
6910
7005
|
}
|
|
6911
7006
|
},
|
|
7007
|
+
level_rounding_FL: {
|
|
7008
|
+
type: "number"
|
|
7009
|
+
},
|
|
7010
|
+
level_rounding_FT: {
|
|
7011
|
+
type: "number"
|
|
7012
|
+
},
|
|
7013
|
+
level_rounding_M: {
|
|
7014
|
+
type: "number"
|
|
7015
|
+
},
|
|
6912
7016
|
movement_min: {
|
|
6913
7017
|
type: "object",
|
|
6914
7018
|
additionalProperties: {
|
|
@@ -7009,22 +7113,12 @@ var properties$2 = {
|
|
|
7009
7113
|
]
|
|
7010
7114
|
},
|
|
7011
7115
|
properties: {
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
{
|
|
7017
|
-
type: "object",
|
|
7018
|
-
properties: {
|
|
7019
|
-
selectionType: {
|
|
7020
|
-
type: "string"
|
|
7021
|
-
}
|
|
7022
|
-
},
|
|
7023
|
-
required: [
|
|
7024
|
-
"selectionType"
|
|
7025
|
-
]
|
|
7116
|
+
type: "object",
|
|
7117
|
+
properties: {
|
|
7118
|
+
selectionType: {
|
|
7119
|
+
type: "string"
|
|
7026
7120
|
}
|
|
7027
|
-
|
|
7121
|
+
}
|
|
7028
7122
|
},
|
|
7029
7123
|
geometry: {
|
|
7030
7124
|
oneOf: [
|
|
@@ -7700,6 +7794,9 @@ var properties = {
|
|
|
7700
7794
|
cloud_level_rounding_m_above: {
|
|
7701
7795
|
type: "number"
|
|
7702
7796
|
},
|
|
7797
|
+
wind_direction_rounding: {
|
|
7798
|
+
type: "number"
|
|
7799
|
+
},
|
|
7703
7800
|
wind_speed_max: {
|
|
7704
7801
|
type: "object",
|
|
7705
7802
|
additionalProperties: {
|
|
@@ -7717,6 +7814,12 @@ var properties = {
|
|
|
7717
7814
|
},
|
|
7718
7815
|
visibility_min: {
|
|
7719
7816
|
type: "number"
|
|
7817
|
+
},
|
|
7818
|
+
visibility_rounding_below: {
|
|
7819
|
+
type: "number"
|
|
7820
|
+
},
|
|
7821
|
+
visibility_rounding_above: {
|
|
7822
|
+
type: "number"
|
|
7720
7823
|
}
|
|
7721
7824
|
},
|
|
7722
7825
|
required: [
|
package/index.umd.js
CHANGED
|
@@ -1440,27 +1440,65 @@
|
|
|
1440
1440
|
}))));
|
|
1441
1441
|
};
|
|
1442
1442
|
|
|
1443
|
-
var
|
|
1444
|
-
var
|
|
1443
|
+
var DEFAULT_ROUNDING_LEVELS_FL = 100;
|
|
1444
|
+
var DEFAULT_ROUNDING_LEVELS_FT = 5;
|
|
1445
|
+
var DEFAULT_ROUNDING_LEVELS_M = 1;
|
|
1446
|
+
var getLevelInvalidStepsForFLUnitMessage = function getLevelInvalidStepsForFLUnitMessage(value) {
|
|
1447
|
+
if (value === void 0) {
|
|
1448
|
+
value = DEFAULT_ROUNDING_LEVELS_FL;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
return "Levels must be rounded to the nearest " + value;
|
|
1452
|
+
};
|
|
1453
|
+
var getLevelInvalidStepsForFTUnitMessage = function getLevelInvalidStepsForFTUnitMessage(value) {
|
|
1454
|
+
if (value === void 0) {
|
|
1455
|
+
value = DEFAULT_ROUNDING_LEVELS_FT;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
return "Levels must be rounded to the nearest " + value + "ft";
|
|
1459
|
+
};
|
|
1460
|
+
var getLevelInvalidStepsForMUnitMessage = function getLevelInvalidStepsForMUnitMessage(value) {
|
|
1461
|
+
if (value === void 0) {
|
|
1462
|
+
value = DEFAULT_ROUNDING_LEVELS_M;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
return "Levels must be rounded to the nearest " + value + "m";
|
|
1466
|
+
};
|
|
1467
|
+
var invalidUnitMessage$1 = 'Level unit not defined';
|
|
1445
1468
|
|
|
1446
|
-
var _validateLevels = function validateLevels(value, unit) {
|
|
1469
|
+
var _validateLevels = function validateLevels(value, unit, productConfig, selectedFIR) {
|
|
1447
1470
|
if (formFields.isEmpty(value)) {
|
|
1448
1471
|
return true;
|
|
1449
|
-
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
var _a = getActiveFIRArea(selectedFIR, productConfig),
|
|
1475
|
+
|
|
1476
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
1477
|
+
_b = _a.level_rounding_FL,
|
|
1478
|
+
|
|
1479
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
1480
|
+
level_rounding_FL = _b === void 0 ? DEFAULT_ROUNDING_LEVELS_FL : _b,
|
|
1481
|
+
_c = _a.level_rounding_FT,
|
|
1482
|
+
level_rounding_FT = _c === void 0 ? DEFAULT_ROUNDING_LEVELS_FT : _c,
|
|
1483
|
+
_d = _a.level_rounding_M,
|
|
1484
|
+
level_rounding_M = _d === void 0 ? DEFAULT_ROUNDING_LEVELS_M : _d; // Parse to integer to check for steps
|
|
1450
1485
|
|
|
1451
1486
|
|
|
1452
1487
|
var intLevel = parseInt(value, 10);
|
|
1453
1488
|
|
|
1454
1489
|
if (exports.LevelUnits[unit] === exports.LevelUnits.FT) {
|
|
1455
|
-
return intLevel %
|
|
1490
|
+
return intLevel % level_rounding_FT === 0 || getLevelInvalidStepsForFTUnitMessage(level_rounding_FT);
|
|
1456
1491
|
}
|
|
1457
1492
|
|
|
1458
1493
|
if (exports.LevelUnits[unit] === exports.LevelUnits.FL) {
|
|
1459
|
-
return intLevel %
|
|
1460
|
-
}
|
|
1494
|
+
return intLevel % level_rounding_FL === 0 || getLevelInvalidStepsForFLUnitMessage(level_rounding_FL);
|
|
1495
|
+
}
|
|
1461
1496
|
|
|
1497
|
+
if (exports.LevelUnits[unit] === exports.LevelUnits.M) {
|
|
1498
|
+
return intLevel % level_rounding_M === 0 || getLevelInvalidStepsForMUnitMessage(level_rounding_M);
|
|
1499
|
+
}
|
|
1462
1500
|
|
|
1463
|
-
return
|
|
1501
|
+
return invalidUnitMessage$1;
|
|
1464
1502
|
};
|
|
1465
1503
|
var invalidLevelUnitCombinationMessage = 'Invalid unit combination';
|
|
1466
1504
|
|
|
@@ -1600,7 +1638,7 @@
|
|
|
1600
1638
|
},
|
|
1601
1639
|
validateLevels: function validateLevels(value) {
|
|
1602
1640
|
// level step depends on the unit
|
|
1603
|
-
return _validateLevels(value, getValues('level.unit'));
|
|
1641
|
+
return _validateLevels(value, getValues('level.unit'), productConfig, selectedFIR);
|
|
1604
1642
|
}
|
|
1605
1643
|
}
|
|
1606
1644
|
},
|
|
@@ -1674,7 +1712,7 @@
|
|
|
1674
1712
|
},
|
|
1675
1713
|
validateLevels: function validateLevels(value) {
|
|
1676
1714
|
// level step depends on the unit
|
|
1677
|
-
return _validateLevels(value, getValues('level.unit'));
|
|
1715
|
+
return _validateLevels(value, getValues('level.unit'), productConfig, selectedFIR);
|
|
1678
1716
|
}
|
|
1679
1717
|
}
|
|
1680
1718
|
},
|
|
@@ -1769,7 +1807,7 @@
|
|
|
1769
1807
|
},
|
|
1770
1808
|
validateLevels: function validateLevels(value) {
|
|
1771
1809
|
// level step depends on the unit
|
|
1772
|
-
return _validateLevels(value, getValues('lowerLevel.unit'));
|
|
1810
|
+
return _validateLevels(value, getValues('lowerLevel.unit'), productConfig, selectedFIR);
|
|
1773
1811
|
}
|
|
1774
1812
|
}
|
|
1775
1813
|
},
|
|
@@ -1853,7 +1891,7 @@
|
|
|
1853
1891
|
},
|
|
1854
1892
|
validateLevels: function validateLevels(value) {
|
|
1855
1893
|
// level step depends on the unit
|
|
1856
|
-
return _validateLevels(value, getValues('level.unit'));
|
|
1894
|
+
return _validateLevels(value, getValues('level.unit'), productConfig, selectedFIR);
|
|
1857
1895
|
}
|
|
1858
1896
|
}
|
|
1859
1897
|
},
|
|
@@ -2119,23 +2157,48 @@
|
|
|
2119
2157
|
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2120
2158
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2121
2159
|
* */
|
|
2160
|
+
var DEFAULT_ROUNDING_MOVEMENT_KT = 5;
|
|
2161
|
+
var DEFAULT_ROUNDING_MOVEMENT_KMH = 10;
|
|
2162
|
+
var getMovementStepValKTMessage = function getMovementStepValKTMessage(value) {
|
|
2163
|
+
if (value === void 0) {
|
|
2164
|
+
value = DEFAULT_ROUNDING_MOVEMENT_KT;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
return "Speed should be rounded to the nearest " + value + "kt";
|
|
2168
|
+
};
|
|
2169
|
+
var getMovementStepValKMHMessage = function getMovementStepValKMHMessage(value) {
|
|
2170
|
+
if (value === void 0) {
|
|
2171
|
+
value = DEFAULT_ROUNDING_MOVEMENT_KMH;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
return "Speed should be rounded to the nearest " + value + "kmh";
|
|
2175
|
+
};
|
|
2122
2176
|
var coordinatesEmptyMessage = 'An end position drawing is required when selecting End position';
|
|
2123
|
-
var movementStepValMessageKT = 'Speed should be rounded to the nearest 5kt';
|
|
2124
|
-
var movementStepValMessageKMH = 'Speed should be rounded to the nearest 10kmh';
|
|
2125
2177
|
var noIntersectionMessage = 'The end position needs to be (partly) inside the FIR';
|
|
2126
2178
|
var maximum6PointsMessage = 'The end position drawing allows a maximum of 6 individual points';
|
|
2127
2179
|
|
|
2128
|
-
var _validateMovementSteps = function validateMovementSteps(value, unit) {
|
|
2129
|
-
if (formFields.isEmpty(value)) return true;
|
|
2180
|
+
var _validateMovementSteps = function validateMovementSteps(value, unit, productConfig, selectedFIR) {
|
|
2181
|
+
if (formFields.isEmpty(value)) return true;
|
|
2182
|
+
|
|
2183
|
+
var _a = getActiveFIRArea(selectedFIR, productConfig),
|
|
2184
|
+
|
|
2185
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2186
|
+
_b = _a.movement_rounding_kt,
|
|
2187
|
+
|
|
2188
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2189
|
+
movement_rounding_kt = _b === void 0 ? DEFAULT_ROUNDING_MOVEMENT_KT : _b,
|
|
2190
|
+
_c = _a.movement_rounding_kmh,
|
|
2191
|
+
movement_rounding_kmh = _c === void 0 ? DEFAULT_ROUNDING_MOVEMENT_KMH : _c; // Parse to integer to check for steps
|
|
2192
|
+
|
|
2130
2193
|
|
|
2131
2194
|
var intLevel = parseInt(value, 10);
|
|
2132
2195
|
|
|
2133
2196
|
if (exports.MovementUnit[unit] === exports.MovementUnit.KT) {
|
|
2134
|
-
return intLevel %
|
|
2197
|
+
return intLevel % movement_rounding_kt === 0 || getMovementStepValKTMessage(movement_rounding_kt);
|
|
2135
2198
|
}
|
|
2136
2199
|
|
|
2137
2200
|
if (exports.MovementUnit[unit] === exports.MovementUnit.KMH) {
|
|
2138
|
-
return intLevel %
|
|
2201
|
+
return intLevel % movement_rounding_kmh === 0 || getMovementStepValKMHMessage(movement_rounding_kmh);
|
|
2139
2202
|
}
|
|
2140
2203
|
|
|
2141
2204
|
return 'Invalid unit';
|
|
@@ -2290,7 +2353,7 @@
|
|
|
2290
2353
|
},
|
|
2291
2354
|
validateMovementSteps: function validateMovementSteps(value) {
|
|
2292
2355
|
// movement step depends on the unit
|
|
2293
|
-
return _validateMovementSteps(value, getValues('movementUnit'));
|
|
2356
|
+
return _validateMovementSteps(value, getValues('movementUnit'), productConfig, selectedFIR);
|
|
2294
2357
|
}
|
|
2295
2358
|
}
|
|
2296
2359
|
},
|
|
@@ -2757,18 +2820,44 @@
|
|
|
2757
2820
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2758
2821
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2759
2822
|
* */
|
|
2760
|
-
var
|
|
2761
|
-
var
|
|
2762
|
-
var
|
|
2763
|
-
if (
|
|
2823
|
+
var DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW = 50;
|
|
2824
|
+
var DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE = 100;
|
|
2825
|
+
var getInvalidSurfaceVisibilityTill750StepsMessage = function getInvalidSurfaceVisibilityTill750StepsMessage(value) {
|
|
2826
|
+
if (value === void 0) {
|
|
2827
|
+
value = DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW;
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
return "A visibility below 750m must be rounded to the nearest " + value + "m";
|
|
2831
|
+
};
|
|
2832
|
+
var getInvalidSurfaceVisibilityFrom750StepsMessage = function getInvalidSurfaceVisibilityFrom750StepsMessage(value) {
|
|
2833
|
+
if (value === void 0) {
|
|
2834
|
+
value = DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE;
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
return "A visibility above 750m must be rounded to the nearest " + value + "m";
|
|
2838
|
+
};
|
|
2839
|
+
|
|
2840
|
+
var _validateSurfaceVisibility = function validateSurfaceVisibility(value, productConfig, selectedFIR) {
|
|
2841
|
+
if (formFields.isEmpty(value)) return true;
|
|
2842
|
+
|
|
2843
|
+
var _a = getActiveFIRArea(selectedFIR, productConfig),
|
|
2844
|
+
|
|
2845
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2846
|
+
_b = _a.visibility_rounding_below,
|
|
2847
|
+
|
|
2848
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2849
|
+
visibility_rounding_below = _b === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW : _b,
|
|
2850
|
+
_c = _a.visibility_rounding_above,
|
|
2851
|
+
visibility_rounding_above = _c === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE : _c; // Parse to integer to check for steps
|
|
2852
|
+
|
|
2764
2853
|
|
|
2765
2854
|
var intVisibility = parseInt(value, 10);
|
|
2766
2855
|
|
|
2767
2856
|
if (intVisibility > 750) {
|
|
2768
|
-
return intVisibility %
|
|
2857
|
+
return intVisibility % visibility_rounding_above === 0 || getInvalidSurfaceVisibilityFrom750StepsMessage(visibility_rounding_above);
|
|
2769
2858
|
}
|
|
2770
2859
|
|
|
2771
|
-
return intVisibility %
|
|
2860
|
+
return intVisibility % visibility_rounding_below === 0 || getInvalidSurfaceVisibilityTill750StepsMessage(visibility_rounding_below);
|
|
2772
2861
|
};
|
|
2773
2862
|
|
|
2774
2863
|
var SurfaceVisibility = function SurfaceVisibility(_a) {
|
|
@@ -2817,7 +2906,9 @@
|
|
|
2817
2906
|
// The max level depends on the unit
|
|
2818
2907
|
return formFields.isValidMax(value, getMaxVisibilityValue(selectedFIR, productConfig)) || "The maximum visibility in meters is " + getMaxVisibilityValue(selectedFIR, productConfig);
|
|
2819
2908
|
},
|
|
2820
|
-
validateSurfaceVisibility: validateSurfaceVisibility
|
|
2909
|
+
validateSurfaceVisibility: function validateSurfaceVisibility(value) {
|
|
2910
|
+
return _validateSurfaceVisibility(value, productConfig, selectedFIR);
|
|
2911
|
+
}
|
|
2821
2912
|
}
|
|
2822
2913
|
},
|
|
2823
2914
|
disabled: isDisabled,
|
|
@@ -2865,12 +2956,24 @@
|
|
|
2865
2956
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2866
2957
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2867
2958
|
* */
|
|
2868
|
-
var
|
|
2869
|
-
var
|
|
2870
|
-
if (
|
|
2959
|
+
var DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION = 10;
|
|
2960
|
+
var invalidSurfaceWindDirectionStepsMessage = function invalidSurfaceWindDirectionStepsMessage(value) {
|
|
2961
|
+
if (value === void 0) {
|
|
2962
|
+
value = DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
return "Direction must be rounded to the nearest " + value + " deg.";
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2968
|
+
var _validateSurfaceWindDirection = function validateSurfaceWindDirection(value, productConfig, selectedFIR) {
|
|
2969
|
+
if (formFields.isEmpty(value)) return true;
|
|
2970
|
+
var // eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2971
|
+
_a = getActiveFIRArea(selectedFIR, productConfig).wind_direction_rounding,
|
|
2972
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2973
|
+
wind_direction_rounding = _a === void 0 ? DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION : _a; // Parse to integer to check for steps
|
|
2871
2974
|
|
|
2872
2975
|
var intVisibility = parseInt(value, 10);
|
|
2873
|
-
return intVisibility %
|
|
2976
|
+
return intVisibility % wind_direction_rounding === 0 || invalidSurfaceWindDirectionStepsMessage(wind_direction_rounding);
|
|
2874
2977
|
};
|
|
2875
2978
|
|
|
2876
2979
|
var SurfaceWind = function SurfaceWind(_a) {
|
|
@@ -2926,7 +3029,9 @@
|
|
|
2926
3029
|
},
|
|
2927
3030
|
validate: {
|
|
2928
3031
|
isRequired: isRequired,
|
|
2929
|
-
validateSurfaceWindDirection: validateSurfaceWindDirection
|
|
3032
|
+
validateSurfaceWindDirection: function validateSurfaceWindDirection(value) {
|
|
3033
|
+
return _validateSurfaceWindDirection(value, productConfig, selectedFIR);
|
|
3034
|
+
}
|
|
2930
3035
|
}
|
|
2931
3036
|
},
|
|
2932
3037
|
disabled: isDisabled,
|
|
@@ -3912,6 +4017,9 @@
|
|
|
3912
4017
|
FT: 4900,
|
|
3913
4018
|
FL: 650
|
|
3914
4019
|
},
|
|
4020
|
+
level_rounding_FL: 100,
|
|
4021
|
+
level_rounding_FT: 5,
|
|
4022
|
+
level_rounding_M: 1,
|
|
3915
4023
|
movement_min: {
|
|
3916
4024
|
KT: 5,
|
|
3917
4025
|
KMH: 10
|
|
@@ -3920,6 +4028,8 @@
|
|
|
3920
4028
|
KT: 150,
|
|
3921
4029
|
KMH: 99
|
|
3922
4030
|
},
|
|
4031
|
+
movement_rounding_kt: 5,
|
|
4032
|
+
movement_rounding_kmh: 10,
|
|
3923
4033
|
units: [
|
|
3924
4034
|
{
|
|
3925
4035
|
unit_type: "level_unit",
|
|
@@ -5165,6 +5275,8 @@
|
|
|
5165
5275
|
tc_hours_before_validity: 12,
|
|
5166
5276
|
va_max_hours_of_validity: 6,
|
|
5167
5277
|
va_hours_before_validity: 12,
|
|
5278
|
+
movement_rounding_kt: 20,
|
|
5279
|
+
movement_rounding_kmh: 30,
|
|
5168
5280
|
adjacent_firs: [
|
|
5169
5281
|
"EKDK",
|
|
5170
5282
|
"EDWW",
|
|
@@ -5184,7 +5296,8 @@
|
|
|
5184
5296
|
{
|
|
5185
5297
|
unit_type: "movement_unit",
|
|
5186
5298
|
allowed_units: [
|
|
5187
|
-
"KT"
|
|
5299
|
+
"KT",
|
|
5300
|
+
"KMH"
|
|
5188
5301
|
]
|
|
5189
5302
|
}
|
|
5190
5303
|
]
|
|
@@ -5404,6 +5517,7 @@
|
|
|
5404
5517
|
cloud_level_rounding_ft: 100,
|
|
5405
5518
|
cloud_level_rounding_m_below: 30,
|
|
5406
5519
|
cloud_level_rounding_m_above: 300,
|
|
5520
|
+
wind_direction_rounding: 10,
|
|
5407
5521
|
wind_speed_min: {
|
|
5408
5522
|
KT: 31,
|
|
5409
5523
|
MPS: 0
|
|
@@ -5414,6 +5528,8 @@
|
|
|
5414
5528
|
},
|
|
5415
5529
|
visibility_max: 4900,
|
|
5416
5530
|
visibility_min: 0,
|
|
5531
|
+
visibility_rounding_below: 50,
|
|
5532
|
+
visibility_rounding_above: 100,
|
|
5417
5533
|
level_min: {
|
|
5418
5534
|
FT: 100,
|
|
5419
5535
|
FL: 50
|
|
@@ -5422,6 +5538,9 @@
|
|
|
5422
5538
|
FT: 4900,
|
|
5423
5539
|
FL: 100
|
|
5424
5540
|
},
|
|
5541
|
+
level_rounding_FL: 100,
|
|
5542
|
+
level_rounding_FT: 5,
|
|
5543
|
+
level_rounding_M: 1,
|
|
5425
5544
|
movement_min: {
|
|
5426
5545
|
KT: 5,
|
|
5427
5546
|
KMH: 10
|
|
@@ -5430,6 +5549,8 @@
|
|
|
5430
5549
|
KT: 150,
|
|
5431
5550
|
KMH: 99
|
|
5432
5551
|
},
|
|
5552
|
+
movement_rounding_kt: 5,
|
|
5553
|
+
movement_rounding_kmh: 10,
|
|
5433
5554
|
units: [
|
|
5434
5555
|
{
|
|
5435
5556
|
unit_type: "level_unit",
|
|
@@ -6682,6 +6803,8 @@
|
|
|
6682
6803
|
location_indicator_atsu: "EZZZ",
|
|
6683
6804
|
max_hours_of_validity: 4,
|
|
6684
6805
|
hours_before_validity: 4,
|
|
6806
|
+
movement_rounding_kt: 5,
|
|
6807
|
+
movement_rounding_kmh: 10,
|
|
6685
6808
|
units: [
|
|
6686
6809
|
{
|
|
6687
6810
|
unit_type: "level_unit",
|
|
@@ -6693,7 +6816,8 @@
|
|
|
6693
6816
|
{
|
|
6694
6817
|
unit_type: "movement_unit",
|
|
6695
6818
|
allowed_units: [
|
|
6696
|
-
"KT"
|
|
6819
|
+
"KT",
|
|
6820
|
+
"KMH"
|
|
6697
6821
|
]
|
|
6698
6822
|
},
|
|
6699
6823
|
{
|
|
@@ -6783,6 +6907,12 @@
|
|
|
6783
6907
|
hours_before_validity: {
|
|
6784
6908
|
type: "number"
|
|
6785
6909
|
},
|
|
6910
|
+
movement_rounding_kt: {
|
|
6911
|
+
type: "number"
|
|
6912
|
+
},
|
|
6913
|
+
movement_rounding_kmh: {
|
|
6914
|
+
type: "number"
|
|
6915
|
+
},
|
|
6786
6916
|
level_min: {
|
|
6787
6917
|
type: "object",
|
|
6788
6918
|
additionalProperties: {
|
|
@@ -6795,6 +6925,15 @@
|
|
|
6795
6925
|
type: "number"
|
|
6796
6926
|
}
|
|
6797
6927
|
},
|
|
6928
|
+
level_rounding_FL: {
|
|
6929
|
+
type: "number"
|
|
6930
|
+
},
|
|
6931
|
+
level_rounding_FT: {
|
|
6932
|
+
type: "number"
|
|
6933
|
+
},
|
|
6934
|
+
level_rounding_M: {
|
|
6935
|
+
type: "number"
|
|
6936
|
+
},
|
|
6798
6937
|
movement_min: {
|
|
6799
6938
|
type: "object",
|
|
6800
6939
|
additionalProperties: {
|
|
@@ -6895,22 +7034,12 @@
|
|
|
6895
7034
|
]
|
|
6896
7035
|
},
|
|
6897
7036
|
properties: {
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
{
|
|
6903
|
-
type: "object",
|
|
6904
|
-
properties: {
|
|
6905
|
-
selectionType: {
|
|
6906
|
-
type: "string"
|
|
6907
|
-
}
|
|
6908
|
-
},
|
|
6909
|
-
required: [
|
|
6910
|
-
"selectionType"
|
|
6911
|
-
]
|
|
7037
|
+
type: "object",
|
|
7038
|
+
properties: {
|
|
7039
|
+
selectionType: {
|
|
7040
|
+
type: "string"
|
|
6912
7041
|
}
|
|
6913
|
-
|
|
7042
|
+
}
|
|
6914
7043
|
},
|
|
6915
7044
|
geometry: {
|
|
6916
7045
|
oneOf: [
|
|
@@ -7586,6 +7715,9 @@
|
|
|
7586
7715
|
cloud_level_rounding_m_above: {
|
|
7587
7716
|
type: "number"
|
|
7588
7717
|
},
|
|
7718
|
+
wind_direction_rounding: {
|
|
7719
|
+
type: "number"
|
|
7720
|
+
},
|
|
7589
7721
|
wind_speed_max: {
|
|
7590
7722
|
type: "object",
|
|
7591
7723
|
additionalProperties: {
|
|
@@ -7603,6 +7735,12 @@
|
|
|
7603
7735
|
},
|
|
7604
7736
|
visibility_min: {
|
|
7605
7737
|
type: "number"
|
|
7738
|
+
},
|
|
7739
|
+
visibility_rounding_below: {
|
|
7740
|
+
type: "number"
|
|
7741
|
+
},
|
|
7742
|
+
visibility_rounding_above: {
|
|
7743
|
+
type: "number"
|
|
7606
7744
|
}
|
|
7607
7745
|
},
|
|
7608
7746
|
required: [
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ConfigurableFormFieldProps } from '../../../types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
2
|
+
import { ConfigurableFormFieldProps, ProductConfig } from '../../../types';
|
|
3
|
+
export declare const DEFAULT_ROUNDING_LEVELS_FL = 100;
|
|
4
|
+
export declare const DEFAULT_ROUNDING_LEVELS_FT = 5;
|
|
5
|
+
export declare const DEFAULT_ROUNDING_LEVELS_M = 1;
|
|
6
|
+
export declare const getLevelInvalidStepsForFLUnitMessage: (value?: number) => string;
|
|
7
|
+
export declare const getLevelInvalidStepsForFTUnitMessage: (value?: number) => string;
|
|
8
|
+
export declare const getLevelInvalidStepsForMUnitMessage: (value?: number) => string;
|
|
9
|
+
export declare const invalidUnitMessage = "Level unit not defined";
|
|
10
|
+
export declare const validateLevels: (value: string, unit: string, productConfig: ProductConfig, selectedFIR: string) => boolean | string;
|
|
6
11
|
export declare const invalidLevelUnitCombinationMessage = "Invalid unit combination";
|
|
7
12
|
export declare const validateLevelUnitCombinations: (levelUnit: string, lowerLevelUnit: string) => boolean | string;
|
|
8
13
|
declare const Levels: React.FC<ConfigurableFormFieldProps>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MapDrawMode, StartOrEndDrawing, SetMapDrawModes, MapGeoJSONS, ConfigurableFormFieldProps } from '../../../types';
|
|
2
|
+
import { MapDrawMode, StartOrEndDrawing, SetMapDrawModes, MapGeoJSONS, ConfigurableFormFieldProps, ProductConfig } from '../../../types';
|
|
3
|
+
export declare const DEFAULT_ROUNDING_MOVEMENT_KT = 5;
|
|
4
|
+
export declare const DEFAULT_ROUNDING_MOVEMENT_KMH = 10;
|
|
5
|
+
export declare const getMovementStepValKTMessage: (value?: number) => string;
|
|
6
|
+
export declare const getMovementStepValKMHMessage: (value?: number) => string;
|
|
3
7
|
export declare const coordinatesEmptyMessage = "An end position drawing is required when selecting End position";
|
|
4
|
-
export declare const movementStepValMessageKT = "Speed should be rounded to the nearest 5kt";
|
|
5
|
-
export declare const movementStepValMessageKMH = "Speed should be rounded to the nearest 10kmh";
|
|
6
8
|
export declare const noIntersectionMessage = "The end position needs to be (partly) inside the FIR";
|
|
7
9
|
export declare const maximum6PointsMessage = "The end position drawing allows a maximum of 6 individual points";
|
|
8
|
-
export declare const validateMovementSteps: (value: string, unit: string) => boolean | string;
|
|
10
|
+
export declare const validateMovementSteps: (value: string, unit: string, productConfig: ProductConfig, selectedFIR: string) => boolean | string;
|
|
9
11
|
interface ProgressProps extends ConfigurableFormFieldProps {
|
|
10
12
|
drawMode?: SetMapDrawModes;
|
|
11
13
|
geoJSONs?: MapGeoJSONS;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ConfigurableFormFieldProps } from '../../../types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
2
|
+
import { ConfigurableFormFieldProps, ProductConfig } from '../../../types';
|
|
3
|
+
export declare const DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW = 50;
|
|
4
|
+
export declare const DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE = 100;
|
|
5
|
+
export declare const getInvalidSurfaceVisibilityTill750StepsMessage: (value?: number) => string;
|
|
6
|
+
export declare const getInvalidSurfaceVisibilityFrom750StepsMessage: (value?: number) => string;
|
|
7
|
+
export declare const validateSurfaceVisibility: (value: string, productConfig: ProductConfig, selectedFIR: string) => boolean | string;
|
|
6
8
|
declare const SurfaceVisibility: React.FC<ConfigurableFormFieldProps>;
|
|
7
9
|
export default SurfaceVisibility;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ConfigurableFormFieldProps } from '../../../types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
import { ConfigurableFormFieldProps, ProductConfig } from '../../../types';
|
|
3
|
+
export declare const DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION = 10;
|
|
4
|
+
export declare const invalidSurfaceWindDirectionStepsMessage: (value?: number) => string;
|
|
5
|
+
export declare const validateSurfaceWindDirection: (value: string, productConfig: ProductConfig, selectedFIR: string) => boolean | string;
|
|
5
6
|
declare const SurfaceWind: React.FC<ConfigurableFormFieldProps>;
|
|
6
7
|
export default SurfaceWind;
|
package/lib/types.d.ts
CHANGED
|
@@ -371,8 +371,13 @@ export declare type FIRArea = {
|
|
|
371
371
|
hours_before_validity: number;
|
|
372
372
|
level_min?: LevelMinMaxType;
|
|
373
373
|
level_max?: LevelMinMaxType;
|
|
374
|
+
level_rounding_FL?: number;
|
|
375
|
+
level_rounding_FT?: number;
|
|
376
|
+
level_rounding_M?: number;
|
|
374
377
|
movement_min?: MovementMinMaxType;
|
|
375
378
|
movement_max?: MovementMinMaxType;
|
|
379
|
+
movement_rounding_kt?: number;
|
|
380
|
+
movement_rounding_kmh?: number;
|
|
376
381
|
units: AllowedUnits[];
|
|
377
382
|
};
|
|
378
383
|
export interface FIRConfigSigmet extends FIRArea {
|
|
@@ -391,10 +396,13 @@ export interface FIRConfigAirmet extends FIRArea {
|
|
|
391
396
|
cloud_level_rounding_ft?: number;
|
|
392
397
|
cloud_level_rounding_m_below?: number;
|
|
393
398
|
cloud_level_rounding_m_above?: number;
|
|
399
|
+
wind_direction_rounding?: number;
|
|
394
400
|
wind_speed_max?: SurfaceWindMinMaxType;
|
|
395
401
|
wind_speed_min?: SurfaceWindMinMaxType;
|
|
396
402
|
visibility_max?: number;
|
|
397
403
|
visibility_min?: number;
|
|
404
|
+
visibility_rounding_below?: number;
|
|
405
|
+
visibility_rounding_above?: number;
|
|
398
406
|
}
|
|
399
407
|
declare type SigmetFIRArea = Record<string, FIRConfigSigmet>;
|
|
400
408
|
declare type AirmetFIRArea = Record<string, FIRConfigAirmet>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.1",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,26 +14,26 @@
|
|
|
14
14
|
"react": "^18.2.0",
|
|
15
15
|
"react-redux": "^8.0.4",
|
|
16
16
|
"@mui/material": "^5.10.8",
|
|
17
|
-
"@opengeoweb/shared": "4.
|
|
18
|
-
"@opengeoweb/theme": "4.
|
|
17
|
+
"@opengeoweb/shared": "4.15.1",
|
|
18
|
+
"@opengeoweb/theme": "4.15.1",
|
|
19
19
|
"react-draggable": "^4.4.5",
|
|
20
20
|
"re-resizable": "^6.9.0",
|
|
21
21
|
"@redux-eggs/core": "^2.2.0",
|
|
22
22
|
"lodash": "^4.17.20",
|
|
23
23
|
"axios": "^0.25.0",
|
|
24
24
|
"date-fns": "^2.29.3",
|
|
25
|
-
"@opengeoweb/core": "4.
|
|
25
|
+
"@opengeoweb/core": "4.15.1",
|
|
26
26
|
"moment": "^2.29.0",
|
|
27
|
-
"@opengeoweb/webmap": "4.
|
|
27
|
+
"@opengeoweb/webmap": "4.15.1",
|
|
28
28
|
"throttle-debounce": "^3.0.1",
|
|
29
29
|
"proj4": "^2.6.2",
|
|
30
|
-
"@opengeoweb/api": "4.
|
|
30
|
+
"@opengeoweb/api": "4.15.1",
|
|
31
31
|
"react-intl": "^5.17.5",
|
|
32
32
|
"react-sortablejs": "^6.1.4",
|
|
33
33
|
"sortablejs": "^1.15.0",
|
|
34
34
|
"immer": "^9.0.15",
|
|
35
35
|
"react-window": "^1.8.7",
|
|
36
|
-
"@opengeoweb/form-fields": "4.
|
|
36
|
+
"@opengeoweb/form-fields": "4.15.1",
|
|
37
37
|
"react-hook-form": "^7.41.5",
|
|
38
38
|
"moment-timezone": "^0.5.31",
|
|
39
39
|
"@mui/x-date-pickers": "^5.0.4",
|