@opengeoweb/sigmet-airmet 12.6.0 → 12.7.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
CHANGED
|
@@ -4850,6 +4850,17 @@ var hasMaxFeaturePoints = function hasMaxFeaturePoints(geojson, maxPoints) {
|
|
|
4850
4850
|
}
|
|
4851
4851
|
return false;
|
|
4852
4852
|
};
|
|
4853
|
+
// Uses same logic as the backend
|
|
4854
|
+
// https://gitlab.com/opengeoweb/avi-msgconverter/geoweb-knmi-avi-messageservices/-/blob/master/src/main/java/nl/knmi/geoweb/backend/product/sigmetairmet/SigmetAirmetUtils.java?ref_type=heads#L440
|
|
4855
|
+
function getTacGeometry(_ref) {
|
|
4856
|
+
var startGeometry = _ref.startGeometry,
|
|
4857
|
+
startGeometryIntersect = _ref.startGeometryIntersect,
|
|
4858
|
+
maxPoints = _ref.maxPoints;
|
|
4859
|
+
if (startGeometryIntersect && startGeometryIntersect.features.length > 0 && !hasMaxFeaturePoints(startGeometryIntersect, maxPoints)) {
|
|
4860
|
+
return startGeometryIntersect;
|
|
4861
|
+
}
|
|
4862
|
+
return startGeometry;
|
|
4863
|
+
}
|
|
4853
4864
|
var DEFAULT_MINIMUM_SURFACE_LEVEL = 0;
|
|
4854
4865
|
var getMinCloudLevelValue = function getMinCloudLevelValue(unit, selectedFIR, productConfig) {
|
|
4855
4866
|
// Use first FIR in list if no FIR selected
|
|
@@ -4997,13 +5008,13 @@ var getProductFormMode = function getProductFormMode(canBeOptions, productListIt
|
|
|
4997
5008
|
}
|
|
4998
5009
|
return canBeOptions.includes('PUBLISHED') ? 'edit' : 'view';
|
|
4999
5010
|
};
|
|
5000
|
-
var getLifecycleActions = function getLifecycleActions(
|
|
5001
|
-
var canBe =
|
|
5002
|
-
onButtonPress =
|
|
5003
|
-
productType =
|
|
5004
|
-
|
|
5005
|
-
areActionsDisabled =
|
|
5006
|
-
t =
|
|
5011
|
+
var getLifecycleActions = function getLifecycleActions(_ref2) {
|
|
5012
|
+
var canBe = _ref2.canBe,
|
|
5013
|
+
onButtonPress = _ref2.onButtonPress,
|
|
5014
|
+
productType = _ref2.productType,
|
|
5015
|
+
_ref2$areActionsDisab = _ref2.areActionsDisabled,
|
|
5016
|
+
areActionsDisabled = _ref2$areActionsDisab === void 0 ? false : _ref2$areActionsDisab,
|
|
5017
|
+
t = _ref2.t;
|
|
5007
5018
|
var hasDiscardButton = canBe.includes('DISCARDED');
|
|
5008
5019
|
var onDiscard = function onDiscard() {
|
|
5009
5020
|
return onButtonPress(ProductAction.DISCARD);
|
|
@@ -5055,7 +5066,7 @@ var hasValue = function hasValue(value) {
|
|
|
5055
5066
|
};
|
|
5056
5067
|
var prepareFormValues = function prepareFormValues(product) {
|
|
5057
5068
|
return Object.keys(product).reduce(function (list, key) {
|
|
5058
|
-
var
|
|
5069
|
+
var _ref4;
|
|
5059
5070
|
var value = product[key];
|
|
5060
5071
|
// remove hidden form values
|
|
5061
5072
|
if (key === 'IS_DRAFT') {
|
|
@@ -5075,14 +5086,14 @@ var prepareFormValues = function prepareFormValues(product) {
|
|
|
5075
5086
|
}
|
|
5076
5087
|
// check if nested object has value
|
|
5077
5088
|
if (typeof value === 'object' && value !== null && value !== undefined) {
|
|
5078
|
-
var
|
|
5089
|
+
var _ref3;
|
|
5079
5090
|
var hasNaNValue = Object.keys(value).reduce(function (total, valKey) {
|
|
5080
5091
|
var keyValue = value[valKey];
|
|
5081
5092
|
return !hasValue(String(keyValue)) || total;
|
|
5082
5093
|
}, false);
|
|
5083
|
-
return Object.assign({}, list, !hasNaNValue && (
|
|
5094
|
+
return Object.assign({}, list, !hasNaNValue && (_ref3 = {}, _ref3[key] = value, _ref3));
|
|
5084
5095
|
}
|
|
5085
|
-
return Object.assign({}, list, hasValue(value) && (
|
|
5096
|
+
return Object.assign({}, list, hasValue(value) && (_ref4 = {}, _ref4[key] = value, _ref4));
|
|
5086
5097
|
}, {});
|
|
5087
5098
|
};
|
|
5088
5099
|
var createSigmetPostParameter = function createSigmetPostParameter(sigmetToPost, newStatus, previousUuid) {
|
|
@@ -11339,6 +11350,74 @@ var fakeSigmetList = [{
|
|
|
11339
11350
|
}]
|
|
11340
11351
|
}
|
|
11341
11352
|
}
|
|
11353
|
+
}, {
|
|
11354
|
+
creationDate: dateUtils.getCurrentTimeAsString(),
|
|
11355
|
+
canbe: ['CANCELLED'],
|
|
11356
|
+
sigmet: {
|
|
11357
|
+
uuid: '41d4dd4f-82bb-4944-a8f5-f8623329123dc',
|
|
11358
|
+
phenomenon: 'EMBD_TS',
|
|
11359
|
+
sequence: '10',
|
|
11360
|
+
issueDate: '2020-09-17T12:00:00Z',
|
|
11361
|
+
validDateStart: dateUtils.dateToString(dateUtils.add(dateUtils.utc(), {
|
|
11362
|
+
hours: 1
|
|
11363
|
+
})),
|
|
11364
|
+
validDateEnd: dateUtils.dateToString(dateUtils.add(dateUtils.utc(), {
|
|
11365
|
+
hours: 2
|
|
11366
|
+
})),
|
|
11367
|
+
firName: 'AMSTERDAM FIR',
|
|
11368
|
+
locationIndicatorATSU: 'EHAA',
|
|
11369
|
+
locationIndicatorATSR: 'EHAA',
|
|
11370
|
+
locationIndicatorMWO: 'EHDB',
|
|
11371
|
+
isObservationOrForecast: 'OBS',
|
|
11372
|
+
observationOrForecastTime: dateUtils.dateToString(dateUtils.add(dateUtils.utc(), {
|
|
11373
|
+
hours: 1
|
|
11374
|
+
})),
|
|
11375
|
+
movementType: 'STATIONARY',
|
|
11376
|
+
change: 'WKN',
|
|
11377
|
+
type: 'NORMAL',
|
|
11378
|
+
status: 'PUBLISHED',
|
|
11379
|
+
levelInfoMode: 'BETW',
|
|
11380
|
+
vaSigmetVolcanoName: 'EYJAFJALLAJOKULL',
|
|
11381
|
+
vaSigmetVolcanoCoordinates: {
|
|
11382
|
+
latitude: 63.62,
|
|
11383
|
+
longitude: -19.61
|
|
11384
|
+
},
|
|
11385
|
+
level: {
|
|
11386
|
+
value: 2000,
|
|
11387
|
+
unit: 'FT'
|
|
11388
|
+
},
|
|
11389
|
+
lowerLevel: {
|
|
11390
|
+
value: 1000,
|
|
11391
|
+
unit: 'FT'
|
|
11392
|
+
},
|
|
11393
|
+
firGeometry: getFir(sigmetConfig),
|
|
11394
|
+
startGeometry: {
|
|
11395
|
+
type: 'FeatureCollection',
|
|
11396
|
+
features: [{
|
|
11397
|
+
type: 'Feature',
|
|
11398
|
+
properties: {
|
|
11399
|
+
selectionType: 'poly'
|
|
11400
|
+
},
|
|
11401
|
+
geometry: {
|
|
11402
|
+
type: 'Polygon',
|
|
11403
|
+
coordinates: [[[4.799062887514267, 54.04327723979929], [6.006227982070749, 53.64012115183787], [4.6168492883359304, 53.32840097044425], [4.799062887514267, 54.04327723979929]]]
|
|
11404
|
+
}
|
|
11405
|
+
}]
|
|
11406
|
+
},
|
|
11407
|
+
startGeometryIntersect: {
|
|
11408
|
+
type: 'FeatureCollection',
|
|
11409
|
+
features: [{
|
|
11410
|
+
type: 'Feature',
|
|
11411
|
+
properties: {
|
|
11412
|
+
selectionType: 'poly'
|
|
11413
|
+
},
|
|
11414
|
+
geometry: {
|
|
11415
|
+
type: 'Polygon',
|
|
11416
|
+
coordinates: [[[4.799062887514267, 54.04327723979929], [5.006227982070749, 54.03012115183787], [6.006227982070749, 53.64012115183787], [4.6168492883359304, 53.32840097044425], [4.799062887514267, 54.04327723979929]]]
|
|
11417
|
+
}
|
|
11418
|
+
}]
|
|
11419
|
+
}
|
|
11420
|
+
}
|
|
11342
11421
|
}];
|
|
11343
11422
|
({
|
|
11344
11423
|
sigmet: {
|
|
@@ -11879,4 +11958,4 @@ var createApi = function createApi() {
|
|
|
11879
11958
|
return getApiRoutes(createFakeApiInstance());
|
|
11880
11959
|
};
|
|
11881
11960
|
|
|
11882
|
-
export { AirmetComponentsLookUp, AirmetForm, AirmetType, CancelSigmetVolcanicMovements, CloudLevelUnits, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, Wrapper as ProductFormDialogContent, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, fakeAirmetList, fakeSigmetList, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidFromValue, getDefaultValidUntilValue, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getLifecycleActions, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormMode, getProductIssueDate, getProjection, getToolIcon, getValidFromDelayTimeMinutesFromConfig, getValidFromXHoursBeforeMessage, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, isVAPhenomenon, prepareCancelSigmet, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers, useShortTestHelpers };
|
|
11961
|
+
export { AirmetComponentsLookUp, AirmetForm, AirmetType, CancelSigmetVolcanicMovements, CloudLevelUnits, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, Wrapper as ProductFormDialogContent, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, fakeAirmetList, fakeSigmetList, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidFromValue, getDefaultValidUntilValue, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getLifecycleActions, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormMode, getProductIssueDate, getProjection, getTacGeometry, getToolIcon, getValidFromDelayTimeMinutesFromConfig, getValidFromXHoursBeforeMessage, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, isVAPhenomenon, prepareCancelSigmet, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers, useShortTestHelpers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.7.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.7.0",
|
|
12
|
+
"@opengeoweb/shared": "12.7.0",
|
|
13
|
+
"@opengeoweb/theme": "12.7.0",
|
|
14
|
+
"@opengeoweb/store": "12.7.0",
|
|
15
|
+
"@opengeoweb/webmap": "12.7.0",
|
|
16
|
+
"@opengeoweb/webmap-react": "12.7.0",
|
|
17
17
|
"react-redux": "^9.2.0",
|
|
18
|
-
"@opengeoweb/core": "12.
|
|
19
|
-
"@opengeoweb/authentication": "12.
|
|
18
|
+
"@opengeoweb/core": "12.7.0",
|
|
19
|
+
"@opengeoweb/authentication": "12.7.0",
|
|
20
20
|
"@mui/system": "^7.0.1",
|
|
21
|
-
"@opengeoweb/form-fields": "12.
|
|
21
|
+
"@opengeoweb/form-fields": "12.7.0",
|
|
22
22
|
"react-hook-form": "^7.50.1",
|
|
23
23
|
"axios": "^1.7.7",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
@@ -17,6 +17,11 @@ export declare const getFirArea: (selectedFIR: string, productConfig: ProductCon
|
|
|
17
17
|
export declare const getActiveFIRArea: (selectedFIR: string, productConfig: ProductConfig) => FIRConfigSigmet | FIRConfigAirmet;
|
|
18
18
|
export declare const getMaxPolygonPoints: (selectedFIR: string, productConfig: ProductConfig) => number;
|
|
19
19
|
export declare const hasMaxFeaturePoints: (geojson: GeoJSON.FeatureCollection, maxPoints: number) => boolean;
|
|
20
|
+
export declare function getTacGeometry({ startGeometry, startGeometryIntersect, maxPoints, }: {
|
|
21
|
+
startGeometry: GeoJSON.FeatureCollection;
|
|
22
|
+
startGeometryIntersect?: GeoJSON.FeatureCollection;
|
|
23
|
+
maxPoints: number;
|
|
24
|
+
}): GeoJSON.FeatureCollection;
|
|
20
25
|
export declare const DEFAULT_MINIMUM_SURFACE_LEVEL = 0;
|
|
21
26
|
export declare const getMinCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
22
27
|
export declare const getMinCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { mapTypes, layerTypes } from '@opengeoweb/store';
|
|
3
|
-
import { MapViewLayerProps } from '@opengeoweb/webmap-react';
|
|
4
|
-
export interface OrgMapViewGeoJsonProps {
|
|
5
|
-
baseLayers?: layerTypes.Layer[];
|
|
6
|
-
projection?: mapTypes.MapPreset['proj'];
|
|
7
|
-
geoJSONLayers: MapViewLayerProps[];
|
|
8
|
-
}
|
|
9
|
-
declare const OrgMapViewGeoJson: React.FC<OrgMapViewGeoJsonProps>;
|
|
10
|
-
export default OrgMapViewGeoJson;
|