@opengeoweb/sigmet-airmet 12.12.0 → 12.13.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
@@ -4795,17 +4795,6 @@ var hasMaxFeaturePoints = function hasMaxFeaturePoints(geojson, maxPoints) {
4795
4795
  }
4796
4796
  return false;
4797
4797
  };
4798
- // Uses same logic as the backend
4799
- // 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
4800
- function getTacGeometry(_ref) {
4801
- var startGeometry = _ref.startGeometry,
4802
- startGeometryIntersect = _ref.startGeometryIntersect,
4803
- maxPoints = _ref.maxPoints;
4804
- if (startGeometryIntersect && startGeometryIntersect.features.length > 0 && !hasMaxFeaturePoints(startGeometryIntersect, maxPoints)) {
4805
- return startGeometryIntersect;
4806
- }
4807
- return startGeometry;
4808
- }
4809
4798
  var DEFAULT_MINIMUM_SURFACE_LEVEL = 0;
4810
4799
  var getMinCloudLevelValue = function getMinCloudLevelValue(unit, selectedFIR, productConfig) {
4811
4800
  // Use first FIR in list if no FIR selected
@@ -4953,13 +4942,13 @@ var getProductFormMode = function getProductFormMode(canBeOptions, productListIt
4953
4942
  }
4954
4943
  return canBeOptions.includes('PUBLISHED') ? 'edit' : 'view';
4955
4944
  };
4956
- var getLifecycleActions = function getLifecycleActions(_ref2) {
4957
- var canBe = _ref2.canBe,
4958
- onButtonPress = _ref2.onButtonPress,
4959
- productType = _ref2.productType,
4960
- _ref2$areActionsDisab = _ref2.areActionsDisabled,
4961
- areActionsDisabled = _ref2$areActionsDisab === void 0 ? false : _ref2$areActionsDisab,
4962
- t = _ref2.t;
4945
+ var getLifecycleActions = function getLifecycleActions(_ref) {
4946
+ var canBe = _ref.canBe,
4947
+ onButtonPress = _ref.onButtonPress,
4948
+ productType = _ref.productType,
4949
+ _ref$areActionsDisabl = _ref.areActionsDisabled,
4950
+ areActionsDisabled = _ref$areActionsDisabl === void 0 ? false : _ref$areActionsDisabl,
4951
+ t = _ref.t;
4963
4952
  var hasDiscardButton = canBe.includes('DISCARDED');
4964
4953
  var onDiscard = function onDiscard() {
4965
4954
  return onButtonPress(ProductAction.DISCARD);
@@ -5011,7 +5000,7 @@ var hasValue = function hasValue(value) {
5011
5000
  };
5012
5001
  var prepareFormValues = function prepareFormValues(product) {
5013
5002
  return Object.keys(product).reduce(function (list, key) {
5014
- var _ref4;
5003
+ var _ref3;
5015
5004
  var value = product[key];
5016
5005
  // remove hidden form values
5017
5006
  if (key === 'IS_DRAFT') {
@@ -5031,14 +5020,14 @@ var prepareFormValues = function prepareFormValues(product) {
5031
5020
  }
5032
5021
  // check if nested object has value
5033
5022
  if (typeof value === 'object' && value !== null && value !== undefined) {
5034
- var _ref3;
5023
+ var _ref2;
5035
5024
  var hasNaNValue = Object.keys(value).reduce(function (total, valKey) {
5036
5025
  var keyValue = value[valKey];
5037
5026
  return !hasValue(String(keyValue)) || total;
5038
5027
  }, false);
5039
- return Object.assign({}, list, !hasNaNValue && (_ref3 = {}, _ref3[key] = value, _ref3));
5028
+ return Object.assign({}, list, !hasNaNValue && (_ref2 = {}, _ref2[key] = value, _ref2));
5040
5029
  }
5041
- return Object.assign({}, list, hasValue(value) && (_ref4 = {}, _ref4[key] = value, _ref4));
5030
+ return Object.assign({}, list, hasValue(value) && (_ref3 = {}, _ref3[key] = value, _ref3));
5042
5031
  }, {});
5043
5032
  };
5044
5033
  var createSigmetPostParameter = function createSigmetPostParameter(sigmetToPost, newStatus, previousUuid) {
@@ -11912,4 +11901,4 @@ var createApi = function createApi() {
11912
11901
  return getApiRoutes(createFakeApiInstance());
11913
11902
  };
11914
11903
 
11915
- 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 };
11904
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "12.12.0",
3
+ "version": "12.13.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.0",
12
- "@opengeoweb/shared": "12.12.0",
13
- "@opengeoweb/theme": "12.12.0",
14
- "@opengeoweb/store": "12.12.0",
15
- "@opengeoweb/webmap": "12.12.0",
16
- "@opengeoweb/webmap-react": "12.12.0",
11
+ "@opengeoweb/api": "12.13.0",
12
+ "@opengeoweb/shared": "12.13.0",
13
+ "@opengeoweb/theme": "12.13.0",
14
+ "@opengeoweb/store": "12.13.0",
15
+ "@opengeoweb/webmap": "12.13.0",
16
+ "@opengeoweb/webmap-react": "12.13.0",
17
17
  "react-redux": "^9.2.0",
18
- "@opengeoweb/core": "12.12.0",
19
- "@opengeoweb/authentication": "12.12.0",
20
- "@mui/system": "^7.0.1",
21
- "@opengeoweb/form-fields": "12.12.0",
18
+ "@opengeoweb/core": "12.13.0",
19
+ "@opengeoweb/authentication": "12.13.0",
20
+ "@mui/system": "^7.3.1",
21
+ "@opengeoweb/form-fields": "12.13.0",
22
22
  "react-hook-form": "^7.50.1",
23
23
  "axios": "^1.7.7",
24
24
  "lodash": "^4.17.21",
@@ -17,11 +17,6 @@ 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;
25
20
  export declare const DEFAULT_MINIMUM_SURFACE_LEVEL = 0;
26
21
  export declare const getMinCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
27
22
  export declare const getMinCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;