@opengeoweb/sigmet-airmet 9.21.0 → 9.23.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 CHANGED
@@ -15,6 +15,8 @@ import { mapSelectors, syncGroupsActions, mapStoreActions, defaultLayers, syncCo
15
15
  import { LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, TimeSliderConnect, LegendConnect, LayerManagerConnect } from '@opengeoweb/core';
16
16
  import { useAuthenticationContext } from '@opengeoweb/authentication';
17
17
  import { Box as Box$1 } from '@mui/system';
18
+ import 'i18next';
19
+ import 'react-i18next';
18
20
 
19
21
  var en = {
20
22
  "sigmet-airmet": "sigmet"
@@ -28,7 +30,7 @@ var no = {
28
30
  var nl = {
29
31
  "sigmet-airmet": "sigmet"
30
32
  };
31
- var sigmetAirmet = {
33
+ var sigmetAirmetTranslations = {
32
34
  en: en,
33
35
  fi: fi,
34
36
  no: no,
@@ -3711,21 +3713,25 @@ const StartGeometry = ({
3711
3713
  isShortTest
3712
3714
  } = useShortTestHelpers();
3713
3715
  const getFIRValue = () => getValues('locationIndicatorATSR');
3716
+ // Max points the FIR allows for a polygon
3714
3717
  const maxPoints = getMaxPolygonPoints(getFIRValue(), productConfig);
3718
+ // Intersections with FIR
3715
3719
  const intersectionPointCount = countIntersectionPoints(geoJSON, geoJSONIntersection);
3716
3720
  const drawnGeometry = (_a = geoJSON === null || geoJSON === void 0 ? void 0 : geoJSON.features[0]) === null || _a === void 0 ? void 0 : _a.geometry;
3717
3721
  const interceptionGeometry = (_b = geoJSONIntersection === null || geoJSONIntersection === void 0 ? void 0 : geoJSONIntersection.features[0]) === null || _b === void 0 ? void 0 : _b.geometry;
3722
+ // Total points in the user drawn polygon
3718
3723
  const totalDrawnPoints = drawnGeometry && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
3719
- const totalInterceptionPolygonPoints = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
3724
+ // Total points in the intersection polygon
3725
+ const intersectingPolygonPointsTotal = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
3720
3726
  const maximumPointsMessage = `The start position drawing allows a maximum of ${maxPoints - 1} individual points`;
3721
3727
  const moreThan6PointsMessage = `The start/end position drawing has exceeded 6 individual points. The TAC has a total of ${totalDrawnPoints} points. If possible, reduce the number of points.`;
3722
3728
  const intersectionAbove6PointsMessage = `The start/end position of the intersected polygon has
3723
- ${totalInterceptionPolygonPoints} points,
3724
- and the intersection of the drawn polygon with the FIR-boundary has exceeded ${intersectionPointCount} individual points.
3729
+ ${intersectingPolygonPointsTotal} points,
3730
+ and the intersection of the drawn polygon with the FIR-boundary has exceeded 6 individual points.
3725
3731
  Check if the TAC in the preview corresponds to the intended area.`;
3726
3732
  const showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3727
3733
  const showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3728
- const showIntersectionAbove6PointsWarning = totalInterceptionPolygonPoints > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3734
+ const showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 6 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3729
3735
  return !_isReadOnly ? jsxs(ProductFormFieldLayout, Object.assign({
3730
3736
  title: "Start position",
3731
3737
  sx: styles$2.drawSection,
@@ -3857,21 +3863,25 @@ const Progress = ({
3857
3863
  const isVolcanicCloud = watch('phenomenon') === 'VA_CLD';
3858
3864
  const isShortTestOrRdoact = isShortTest() || isRadioactiveCloud;
3859
3865
  const fieldsDisabled = _isDisabled || isShortTestOrRdoact;
3866
+ // Max points the FIR allows for a polygon
3860
3867
  const maxPoints = getMaxPolygonPoints(getFIRValue(), productConfig);
3868
+ // Intersections with FIR
3861
3869
  const intersectionPointCount = countIntersectionPoints(geoJSON, geoJSONIntersection);
3862
3870
  const drawnGeometry = (_a = geoJSON === null || geoJSON === void 0 ? void 0 : geoJSON.features[0]) === null || _a === void 0 ? void 0 : _a.geometry;
3863
3871
  const interceptionGeometry = (_b = geoJSONIntersection === null || geoJSONIntersection === void 0 ? void 0 : geoJSONIntersection.features[0]) === null || _b === void 0 ? void 0 : _b.geometry;
3872
+ // Total points in the user drawn polygon
3864
3873
  const totalDrawnPoints = drawnGeometry && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
3865
- const totalInterceptionPolygonPoints = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
3874
+ // Total points in the intersection polygon
3875
+ const intersectingPolygonPointsTotal = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
3866
3876
  const maximumPointsMessage = `The end position drawing allows a maximum of ${maxPoints - 1} individual points`;
3867
3877
  const moreThan6PointsMessage = `The start/end position drawing has exceeded 6 individual points. The TAC has a total of ${totalDrawnPoints} points. If possible, reduce the number of points.`;
3868
3878
  const intersectionAbove6PointsMessage = `The start/end position of the intersected polygon has
3869
- ${totalInterceptionPolygonPoints} points,
3870
- and the intersection of the drawn polygon with the FIR-boundary has exceeded ${intersectionPointCount} individual points.
3879
+ ${intersectingPolygonPointsTotal} points,
3880
+ and the intersection of the drawn polygon with the FIR-boundary has exceeded 6 individual points.
3871
3881
  Check if the TAC in the preview corresponds to the intended area.`;
3872
3882
  const showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3873
3883
  const showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3874
- const showIntersectionAbove6PointsWarning = totalInterceptionPolygonPoints > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3884
+ const showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 6 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
3875
3885
  return jsx(ProductFormFieldLayout, Object.assign({
3876
3886
  title: "Progress",
3877
3887
  sx: styles$2.containerItem
@@ -14586,4 +14596,6 @@ ConnectedModuleWrapper = null) => {
14586
14596
  }
14587
14597
  };
14588
14598
 
14589
- export { AirmetComponentsLookUp, AirmetForm, AirmetPhenomena, AirmetType, CloudLevelUnits, ContentDialog, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductList, ProductListRow, ProductStatusDescription, SigmetComponentsLookUp, SigmetForm, SigmetPhenomena, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createApi$1 as createApi, createApi as createFakeApi, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, sigmetAirmet as saTranslations, sigmetConfig };
14599
+ const SA_NAMESPACE = 'sigmetairmet';
14600
+
14601
+ export { AirmetComponentsLookUp, AirmetForm, AirmetPhenomena, AirmetType, CloudLevelUnits, ContentDialog, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetPhenomena, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createApi$1 as createApi, createApi as createFakeApi, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, sigmetAirmetTranslations as saTranslations, sigmetConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "9.21.0",
3
+ "version": "9.23.1",
4
4
  "description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "@opengeoweb/api": "*",
12
12
  "@opengeoweb/shared": "*",
13
- "@mui/material": "~5.15.11",
13
+ "@mui/material": "^5.16.0",
14
14
  "@opengeoweb/theme": "*",
15
15
  "@opengeoweb/store": "*",
16
16
  "@opengeoweb/webmap": "*",
package/src/index.d.ts CHANGED
@@ -9,4 +9,5 @@ export { createApi as createFakeApi } from './lib/utils/fakeApi';
9
9
  export { sigmetConfig, airmetConfig } from './lib/utils/config';
10
10
  export * from './lib/types';
11
11
  export * from './lib/components/ComponentsLookUp';
12
+ export { SA_NAMESPACE } from './lib/utils/i18n';
12
13
  export { saTranslations };
@@ -1,2 +1,3 @@
1
1
  export declare const SA_NAMESPACE = "sigmetairmet";
2
2
  export declare const initSigmetAirmetI18n: () => void;
3
+ export declare const translateKeyOutsideComponents: (key: string, params?: Record<string, string | number> | undefined) => string;