@opengeoweb/sigmet-airmet 12.2.0 → 12.3.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
@@ -4,17 +4,17 @@ import { PROJECTION, useIsMounted, dateUtils, CustomTooltip, ConfirmationService
4
4
  import { Box as Box$1 } from '@mui/system';
5
5
  import * as React from 'react';
6
6
  import React__default, { useRef, useEffect, useCallback } from 'react';
7
- import { FormControlLabel, Radio, Grid2, Typography, Box, Checkbox, MenuItem, FormHelperText, useTheme, Backdrop, CircularProgress, Card, Button, LinearProgress, List, ListItemButton } from '@mui/material';
7
+ import { FormControlLabel, Radio, Grid, Typography, Box, Checkbox, MenuItem, FormHelperText, useTheme, Backdrop, CircularProgress, Card, Button, LinearProgress, List, ListItemButton } from '@mui/material';
8
8
  import { useFormContext } from 'react-hook-form';
9
9
  import { FORM_FIELDS_NAMESPACE, useDraftFormHelpers, ReactHookFormRadioGroup, hasValidGeometry, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMin, isValidMax, isEmpty, ReactHookFormDateTime, countIntersectionPoints, hasMulitpleIntersections, ReactHookFormHiddenInput, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isMaximumOneDrawing, isXHoursBefore, isXHoursAfter, ReactHookFormTextField, isLatitude, isNonOrBothCoordinates, isLongitude, ReactHookFormFormControl, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
10
10
  import { defaultIntersectionStyleProperties, defaultGeoJSONStyleProperties, addSelectionTypeToGeoJSON, DRAWMODE, defaultPoint, addGeoJSONProperties, defaultBox, defaultPolygon, defaultDelete, getIcon, OpenLayersFeatureLayer, genericOpenLayersFeatureStyle, OpenLayersMapDraw, useMapDrawTool, addFeatureProperties, rewindGeometry } from '@opengeoweb/webmap-react';
11
11
  import i18n from 'i18next';
12
12
  import { useTranslation } from 'react-i18next';
13
13
  import { LegendConnect, OlMapViewConnect, TimeSliderConnect } from '@opengeoweb/core';
14
- import { useSelector, useDispatch, shallowEqual } from 'react-redux';
15
- import { uiSelectors, useUpdateSharedData, mapSelectors, syncGroupsActions, layerActions, mapActions, defaultLayers, syncConstants, genericSelectors, drawingToolActions } from '@opengeoweb/store';
14
+ import { uiSelectors, useUpdateSharedData, mapSelectors, syncGroupsActions, layerActions, mapActions, defaultLayers, syncConstants, uiActions, uiTypes, genericSelectors, drawingToolActions } from '@opengeoweb/store';
16
15
  import { DrawFIRLand, Edit, Success, Clock } from '@opengeoweb/theme';
17
16
  import { LayerType, webmapUtils } from '@opengeoweb/webmap';
17
+ import { useSelector, useDispatch, shallowEqual } from 'react-redux';
18
18
  import { debounce } from 'lodash';
19
19
  import { useAuthenticationContext } from '@opengeoweb/authentication';
20
20
 
@@ -4677,11 +4677,11 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4677
4677
  var title = _ref.title,
4678
4678
  children = _ref.children,
4679
4679
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
4680
- return jsxs(Grid2, Object.assign({
4680
+ return jsxs(Grid, Object.assign({
4681
4681
  container: true,
4682
4682
  spacing: 3
4683
4683
  }, props, {
4684
- children: [jsx(Grid2, {
4684
+ children: [jsx(Grid, {
4685
4685
  container: true,
4686
4686
  justifyContent: "flex-end",
4687
4687
  size: 4,
@@ -4690,7 +4690,7 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4690
4690
  sx: styles$2.label,
4691
4691
  children: title
4692
4692
  })
4693
- }), jsx(Grid2, {
4693
+ }), jsx(Grid, {
4694
4694
  container: true,
4695
4695
  justifyContent: "flex-start",
4696
4696
  size: 8,
@@ -5518,12 +5518,12 @@ var Levels = function Levels(_ref) {
5518
5518
  checked: levelInfoMode === 'AT' || levelInfoMode === 'TOPS',
5519
5519
  "data-testid": "levels-AT",
5520
5520
  disabled: fieldsDisabled
5521
- }), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? jsxs(Grid2, {
5521
+ }), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? jsxs(Grid, {
5522
5522
  container: true,
5523
5523
  spacing: 2,
5524
5524
  justifyItems: "flex-end",
5525
5525
  alignItems: "flex-start",
5526
- children: [jsx(Grid2, {
5526
+ children: [jsx(Grid, {
5527
5527
  size: {
5528
5528
  xs: 12,
5529
5529
  md: 3
@@ -5542,7 +5542,7 @@ var Levels = function Levels(_ref) {
5542
5542
  "data-testid": "levels-TOPS",
5543
5543
  label: t('levels-tops-label')
5544
5544
  })
5545
- }), jsx(Grid2, {
5545
+ }), jsx(Grid, {
5546
5546
  size: {
5547
5547
  xs: 4,
5548
5548
  md: 3
@@ -5571,7 +5571,7 @@ var Levels = function Levels(_ref) {
5571
5571
  }, key);
5572
5572
  })
5573
5573
  })
5574
- }), jsx(Grid2, {
5574
+ }), jsx(Grid, {
5575
5575
  size: {
5576
5576
  xs: 8,
5577
5577
  md: 6
@@ -5623,15 +5623,15 @@ var Levels = function Levels(_ref) {
5623
5623
  "data-testid": "levels-BETW",
5624
5624
  disabled: fieldsDisabled
5625
5625
  }), levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC' ? jsxs(Fragment, {
5626
- children: [jsxs(Grid2, {
5626
+ children: [jsxs(Grid, {
5627
5627
  container: true,
5628
5628
  spacing: 2,
5629
- children: [jsx(Grid2, {
5629
+ children: [jsx(Grid, {
5630
5630
  size: {
5631
5631
  xs: 12,
5632
5632
  md: 3
5633
5633
  }
5634
- }), jsx(Grid2, {
5634
+ }), jsx(Grid, {
5635
5635
  size: {
5636
5636
  xs: 4,
5637
5637
  md: 3
@@ -5666,7 +5666,7 @@ var Levels = function Levels(_ref) {
5666
5666
  }, key);
5667
5667
  })
5668
5668
  })
5669
- }), jsx(Grid2, {
5669
+ }), jsx(Grid, {
5670
5670
  size: {
5671
5671
  xs: 8,
5672
5672
  md: 6
@@ -5715,12 +5715,12 @@ var Levels = function Levels(_ref) {
5715
5715
  autoFocus: true
5716
5716
  })
5717
5717
  })]
5718
- }), jsxs(Grid2, {
5718
+ }), jsxs(Grid, {
5719
5719
  container: true,
5720
5720
  spacing: 2,
5721
5721
  justifyItems: "flex-end",
5722
5722
  alignItems: "flex-start",
5723
- children: [jsx(Grid2, {
5723
+ children: [jsx(Grid, {
5724
5724
  size: {
5725
5725
  xs: 12,
5726
5726
  md: 3
@@ -5742,7 +5742,7 @@ var Levels = function Levels(_ref) {
5742
5742
  label: "SFC"
5743
5743
  })
5744
5744
  }), levelInfoMode !== 'BETW_SFC' && jsxs(Fragment, {
5745
- children: [jsx(Grid2, {
5745
+ children: [jsx(Grid, {
5746
5746
  size: {
5747
5747
  xs: 4,
5748
5748
  md: 3
@@ -5777,7 +5777,7 @@ var Levels = function Levels(_ref) {
5777
5777
  }, key);
5778
5778
  })
5779
5779
  })
5780
- }), jsx(Grid2, {
5780
+ }), jsx(Grid, {
5781
5781
  size: {
5782
5782
  xs: 8,
5783
5783
  md: 6
@@ -5834,12 +5834,12 @@ var Levels = function Levels(_ref) {
5834
5834
  disabled: fieldsDisabled,
5835
5835
  checked: levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV',
5836
5836
  "data-testid": "levels-ABV"
5837
- }), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? jsxs(Grid2, {
5837
+ }), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? jsxs(Grid, {
5838
5838
  container: true,
5839
5839
  spacing: 2,
5840
5840
  justifyItems: "flex-end",
5841
5841
  alignItems: "flex-start",
5842
- children: [jsx(Grid2, {
5842
+ children: [jsx(Grid, {
5843
5843
  size: {
5844
5844
  xs: 12,
5845
5845
  md: 3
@@ -5857,7 +5857,7 @@ var Levels = function Levels(_ref) {
5857
5857
  label: t('levels-tops-label'),
5858
5858
  "data-testid": "levels-TOPS_ABV"
5859
5859
  })
5860
- }), jsx(Grid2, {
5860
+ }), jsx(Grid, {
5861
5861
  size: {
5862
5862
  xs: 4,
5863
5863
  md: 3
@@ -5886,7 +5886,7 @@ var Levels = function Levels(_ref) {
5886
5886
  }, key);
5887
5887
  })
5888
5888
  })
5889
- }), jsx(Grid2, {
5889
+ }), jsx(Grid, {
5890
5890
  size: {
5891
5891
  xs: 8,
5892
5892
  md: 6
@@ -6261,7 +6261,7 @@ var Progress = function Progress(_ref) {
6261
6261
  "data-testid": "movementType-FORECAST_POSITION"
6262
6262
  })]
6263
6263
  }), movementType === 'MOVEMENT' && !isShortTestOrRdoact && jsxs(Fragment, {
6264
- children: [jsx(Grid2, {
6264
+ children: [jsx(Grid, {
6265
6265
  children: jsx(ReactHookFormSelect, {
6266
6266
  name: "movementDirection",
6267
6267
  label: t('progress-movement-direction-label'),
@@ -6287,9 +6287,9 @@ var Progress = function Progress(_ref) {
6287
6287
  }, key);
6288
6288
  })
6289
6289
  })
6290
- }), jsxs(Grid2, {
6290
+ }), jsxs(Grid, {
6291
6291
  container: true,
6292
- children: [jsx(Grid2, {
6292
+ children: [jsx(Grid, {
6293
6293
  size: 5,
6294
6294
  children: jsx(ReactHookFormSelect, {
6295
6295
  name: "movementUnit",
@@ -6317,7 +6317,7 @@ var Progress = function Progress(_ref) {
6317
6317
  }, key);
6318
6318
  })
6319
6319
  })
6320
- }), jsx(Grid2, {
6320
+ }), jsx(Grid, {
6321
6321
  size: 7,
6322
6322
  children: jsx(ReactHookFormNumberField, {
6323
6323
  name: "movementSpeed",
@@ -6368,7 +6368,7 @@ var Progress = function Progress(_ref) {
6368
6368
  disabled: isDisabled,
6369
6369
  "data-testid": "movementType-FORECAST_POSITION"
6370
6370
  })]
6371
- }), isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid2, {
6371
+ }), isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid, {
6372
6372
  "data-testid": "endGeometry",
6373
6373
  sx: styles$2.drawSectionProgress,
6374
6374
  size: 12,
@@ -6842,10 +6842,10 @@ var VolcanicFields = function VolcanicFields(_ref) {
6842
6842
  watch = _useFormContext.watch,
6843
6843
  trigger = _useFormContext.trigger,
6844
6844
  getValues = _useFormContext.getValues;
6845
- return jsx(Grid2, {
6845
+ return jsx(Grid, {
6846
6846
  container: true,
6847
6847
  spacing: 2,
6848
- children: jsxs(Grid2, {
6848
+ children: jsxs(Grid, {
6849
6849
  container: true,
6850
6850
  justifyContent: "flex-start",
6851
6851
  offset: 4,
@@ -6856,7 +6856,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
6856
6856
  marginTop: '2px'
6857
6857
  }
6858
6858
  },
6859
- children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && jsx(Grid2, {
6859
+ children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && jsx(Grid, {
6860
6860
  sx: styles$2.volcanicField,
6861
6861
  size: 12,
6862
6862
  children: jsx(ReactHookFormTextField, {
@@ -6871,7 +6871,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
6871
6871
  isReadOnly: isReadOnly,
6872
6872
  size: "small"
6873
6873
  })
6874
- }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && jsx(Grid2, {
6874
+ }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && jsx(Grid, {
6875
6875
  size: 6,
6876
6876
  children: jsx(ReactHookFormNumberField, {
6877
6877
  name: "vaSigmetVolcanoCoordinates.latitude",
@@ -6895,7 +6895,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
6895
6895
  },
6896
6896
  isReadOnly: isReadOnly
6897
6897
  })
6898
- }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && jsx(Grid2, {
6898
+ }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && jsx(Grid, {
6899
6899
  size: 6,
6900
6900
  children: jsx(ReactHookFormNumberField, {
6901
6901
  name: "vaSigmetVolcanoCoordinates.longitude",
@@ -6975,18 +6975,18 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
6975
6975
  };
6976
6976
  var visibilityLabel = getFieldLabel(t, t('surface-visibility'), isReadOnly);
6977
6977
  var visibilityCauseLabel = getFieldLabel(t, t('surface-visibility-cause'), isReadOnly);
6978
- return jsxs(Grid2, {
6978
+ return jsxs(Grid, {
6979
6979
  container: true,
6980
6980
  spacing: 2,
6981
- children: [jsx(Grid2, {
6981
+ children: [jsx(Grid, {
6982
6982
  container: true,
6983
6983
  justifyContent: "flex-end",
6984
6984
  size: 4
6985
- }), jsxs(Grid2, {
6985
+ }), jsxs(Grid, {
6986
6986
  container: true,
6987
6987
  justifyContent: "flex-start",
6988
6988
  size: 8,
6989
- children: [jsx(Grid2, {
6989
+ children: [jsx(Grid, {
6990
6990
  sx: styles$2.surfaceVisibility,
6991
6991
  size: 12,
6992
6992
  children: jsx(ReactHookFormNumberField, {
@@ -7027,7 +7027,7 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7027
7027
  }
7028
7028
  }
7029
7029
  })
7030
- }), jsx(Grid2, {
7030
+ }), jsx(Grid, {
7031
7031
  size: 12,
7032
7032
  sx: {
7033
7033
  marginTop: -2
@@ -7102,18 +7102,18 @@ var SurfaceWind = function SurfaceWind(_ref) {
7102
7102
  var allowedWindUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'surfacewind_unit', WindUnit);
7103
7103
  var windLabel = getFieldLabel(t, t('surface-wind-label'), isReadOnly, t('set'));
7104
7104
  var speedLabel = getFieldLabel(t, t('surface-wind-speed-label'), isReadOnly, t('set'));
7105
- return jsxs(Grid2, {
7105
+ return jsxs(Grid, {
7106
7106
  container: true,
7107
7107
  spacing: 2,
7108
- children: [jsx(Grid2, {
7108
+ children: [jsx(Grid, {
7109
7109
  container: true,
7110
7110
  justifyContent: "flex-end",
7111
7111
  size: 4
7112
- }), jsxs(Grid2, {
7112
+ }), jsxs(Grid, {
7113
7113
  container: true,
7114
7114
  justifyContent: "flex-start",
7115
7115
  size: 8,
7116
- children: [jsx(Grid2, {
7116
+ children: [jsx(Grid, {
7117
7117
  sx: styles$2.surfaceWind,
7118
7118
  size: 12,
7119
7119
  children: jsx(ReactHookFormNumberField, {
@@ -7141,14 +7141,14 @@ var SurfaceWind = function SurfaceWind(_ref) {
7141
7141
  isReadOnly: isReadOnly,
7142
7142
  "data-testid": "surfaceWind-windDirection"
7143
7143
  })
7144
- }), jsxs(Grid2, {
7144
+ }), jsxs(Grid, {
7145
7145
  container: true,
7146
7146
  size: 12,
7147
7147
  sx: {
7148
7148
  marginTop: -2
7149
7149
  },
7150
7150
  spacing: 0,
7151
- children: [jsx(Grid2, {
7151
+ children: [jsx(Grid, {
7152
7152
  size: 5,
7153
7153
  children: jsx(ReactHookFormSelect, {
7154
7154
  name: "windUnit",
@@ -7175,7 +7175,7 @@ var SurfaceWind = function SurfaceWind(_ref) {
7175
7175
  }, key);
7176
7176
  })
7177
7177
  })
7178
- }), jsx(Grid2, {
7178
+ }), jsx(Grid, {
7179
7179
  size: 7,
7180
7180
  children: jsx(ReactHookFormNumberField, {
7181
7181
  name: "windSpeed",
@@ -7286,11 +7286,11 @@ var CloudLevels = function CloudLevels(_ref) {
7286
7286
  unregister('cloudLowerLevel');
7287
7287
  }
7288
7288
  }, [cloudLevelInfoMode, unregister]);
7289
- return jsxs(Grid2, {
7289
+ return jsxs(Grid, {
7290
7290
  container: true,
7291
7291
  spacing: 2,
7292
7292
  sx: styles$2.containerItem,
7293
- children: [jsx(Grid2, {
7293
+ children: [jsx(Grid, {
7294
7294
  container: true,
7295
7295
  justifyContent: "flex-end",
7296
7296
  size: 4,
@@ -7299,19 +7299,19 @@ var CloudLevels = function CloudLevels(_ref) {
7299
7299
  sx: styles$2.label,
7300
7300
  children: t('levels')
7301
7301
  })
7302
- }), jsx(Grid2, {
7302
+ }), jsx(Grid, {
7303
7303
  container: true,
7304
7304
  justifyContent: "flex-start",
7305
7305
  size: 8,
7306
- children: jsxs(Grid2, {
7306
+ children: jsxs(Grid, {
7307
7307
  size: 12,
7308
7308
  children: [jsx(ReactHookFormHiddenInput, {
7309
7309
  name: "cloudLevelInfoMode",
7310
7310
  defaultValue: "BETW"
7311
- }), jsxs(Grid2, {
7311
+ }), jsxs(Grid, {
7312
7312
  container: true,
7313
7313
  size: 12,
7314
- children: [jsx(Grid2, {
7314
+ children: [jsx(Grid, {
7315
7315
  size: 4,
7316
7316
  children: (!isReadOnly || cloudLevelInfoMode === 'BETW_ABV' || cloudLevelInfoMode === 'BETW_SFC_ABV') && jsx(ReactHookFormFormControl, {
7317
7317
  disabled: isDisabled,
@@ -7351,7 +7351,7 @@ var CloudLevels = function CloudLevels(_ref) {
7351
7351
  label: "Above"
7352
7352
  })
7353
7353
  })
7354
- }), jsx(Grid2, {
7354
+ }), jsx(Grid, {
7355
7355
  size: 3,
7356
7356
  children: jsx(ReactHookFormSelect, {
7357
7357
  name: "cloudLevel.unit",
@@ -7380,7 +7380,7 @@ var CloudLevels = function CloudLevels(_ref) {
7380
7380
  }, key);
7381
7381
  })
7382
7382
  })
7383
- }), jsx(Grid2, {
7383
+ }), jsx(Grid, {
7384
7384
  size: 5,
7385
7385
  children: jsx(ReactHookFormNumberField, {
7386
7386
  name: "cloudLevel.value",
@@ -7416,10 +7416,10 @@ var CloudLevels = function CloudLevels(_ref) {
7416
7416
  }
7417
7417
  })
7418
7418
  })]
7419
- }), jsxs(Grid2, {
7419
+ }), jsxs(Grid, {
7420
7420
  container: true,
7421
7421
  size: 12,
7422
- children: [jsx(Grid2, {
7422
+ children: [jsx(Grid, {
7423
7423
  size: 4,
7424
7424
  children: (!isReadOnly || cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV') && jsx(ReactHookFormFormControl, {
7425
7425
  disabled: isDisabled,
@@ -7460,7 +7460,7 @@ var CloudLevels = function CloudLevels(_ref) {
7460
7460
  })
7461
7461
  })
7462
7462
  }), cloudLevelInfoMode !== 'BETW_SFC' && cloudLevelInfoMode !== 'BETW_SFC_ABV' && jsxs(Fragment, {
7463
- children: [jsx(Grid2, {
7463
+ children: [jsx(Grid, {
7464
7464
  size: 3,
7465
7465
  children: jsx(ReactHookFormSelect, {
7466
7466
  name: "cloudLowerLevel.unit",
@@ -7489,7 +7489,7 @@ var CloudLevels = function CloudLevels(_ref) {
7489
7489
  }, key);
7490
7490
  })
7491
7491
  })
7492
- }), jsx(Grid2, {
7492
+ }), jsx(Grid, {
7493
7493
  size: 5,
7494
7494
  children: jsx(ReactHookFormNumberField, {
7495
7495
  name: "cloudLowerLevel.value",
@@ -7787,7 +7787,8 @@ var Tac = function Tac(_ref) {
7787
7787
 
7788
7788
  var MapViewGeoJson = function MapViewGeoJson(_ref) {
7789
7789
  var initialBaseLayers = _ref.baseLayers,
7790
- initialProjection = _ref.projection,
7790
+ _ref$projection = _ref.projection,
7791
+ initialProjection = _ref$projection === void 0 ? srsAndBboxDefault : _ref$projection,
7791
7792
  _ref$geoJSONLayers = _ref.geoJSONLayers,
7792
7793
  geoJSONLayers = _ref$geoJSONLayers === void 0 ? [] : _ref$geoJSONLayers,
7793
7794
  children = _ref.children;
@@ -7839,11 +7840,10 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
7839
7840
  mapId: mapId,
7840
7841
  layers: baseLayers
7841
7842
  }));
7842
- var projection = initialProjection || srsAndBboxDefault;
7843
7843
  dispatch(mapActions.setBbox({
7844
7844
  mapId: mapId,
7845
- bbox: projection.bbox,
7846
- srs: projection.srs
7845
+ bbox: initialProjection.bbox,
7846
+ srs: initialProjection.srs
7847
7847
  }));
7848
7848
  syncGroupAddGroup({
7849
7849
  groupId: 'Time_SigmetAirmet',
@@ -7858,6 +7858,18 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
7858
7858
  groupId: 'Time_SigmetAirmet',
7859
7859
  targetId: timesliderId
7860
7860
  });
7861
+ dispatch(uiActions.setActiveMapIdForDialog({
7862
+ type: uiTypes.DialogTypes.LayerManager,
7863
+ mapId: mapId,
7864
+ source: 'module'
7865
+ }));
7866
+ return function () {
7867
+ dispatch(uiActions.setActiveMapIdForDialog({
7868
+ type: uiTypes.DialogTypes.LayerManager,
7869
+ mapId: mapId,
7870
+ source: 'app'
7871
+ }));
7872
+ };
7861
7873
  // eslint-disable-next-line react-hooks/exhaustive-deps
7862
7874
  }, []);
7863
7875
  return jsxs("div", {
@@ -7878,13 +7890,14 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
7878
7890
  zoomControls: true,
7879
7891
  dimensionSelect: true
7880
7892
  },
7893
+ source: "module",
7881
7894
  children: [children, geoJSONLayers.map(function (layer) {
7882
7895
  return jsxs("div", {
7883
7896
  "data-testid": "" + layer.id,
7884
7897
  children: [jsx(OpenLayersFeatureLayer, {
7885
7898
  featureCollection: !layer.isInEditMode ? layer.geojson : undefined,
7886
7899
  style: genericOpenLayersFeatureStyle,
7887
- zIndex: 1000
7900
+ zIndex: 2000
7888
7901
  }), jsx(OpenLayersMapDraw, {
7889
7902
  viewOnlyStyle: genericOpenLayersFeatureStyle,
7890
7903
  selectedFeatureIndex: layer.selectedFeatureIndex || 0,
@@ -7929,7 +7942,7 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
7929
7942
  var theme = useTheme();
7930
7943
  var baseLayers = getBaseLayers(productConfig);
7931
7944
  var projection = getProjection(productConfig);
7932
- return jsxs(Grid2, {
7945
+ return jsxs(Grid, {
7933
7946
  container: true,
7934
7947
  sx: (_sx = {
7935
7948
  height: '100%',
@@ -7937,7 +7950,7 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
7937
7950
  }, _sx[theme.breakpoints.up('sm')] = {
7938
7951
  overflowY: 'hidden'
7939
7952
  }, _sx),
7940
- children: [jsx(Grid2, {
7953
+ children: [jsx(Grid, {
7941
7954
  sx: (_sx2 = {
7942
7955
  height: 400,
7943
7956
  padding: 2
@@ -7956,7 +7969,7 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
7956
7969
  geoJSONLayers: geoJSONLayers,
7957
7970
  children: mapChildren
7958
7971
  })
7959
- }), jsx(Grid2, {
7972
+ }), jsx(Grid, {
7960
7973
  sx: (_sx3 = {
7961
7974
  paddingTop: 5,
7962
7975
  paddingBottom: 5,
@@ -8328,7 +8341,7 @@ var SigmetForm = function SigmetForm(_ref) {
8328
8341
  setPhenomenaList(newPhenomenaList);
8329
8342
  };
8330
8343
  var renderForm = function renderForm() {
8331
- return jsxs(Grid2, {
8344
+ return jsxs(Grid, {
8332
8345
  container: true,
8333
8346
  direction: "column",
8334
8347
  spacing: 2,
@@ -8622,7 +8635,7 @@ var AirmetForm = function AirmetForm(_ref) {
8622
8635
  triggerValidations(fieldnames, getValues, trigger);
8623
8636
  };
8624
8637
  var renderForm = function renderForm() {
8625
- return jsxs(Grid2, {
8638
+ return jsxs(Grid, {
8626
8639
  container: true,
8627
8640
  direction: "column",
8628
8641
  spacing: 2,
@@ -8951,6 +8964,9 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
8951
8964
  padding: 0
8952
8965
  }
8953
8966
  },
8967
+ style: {
8968
+ zIndex: 1000
8969
+ },
8954
8970
  children: [errorStoreMessage ? jsx(AlertBanner, {
8955
8971
  severity: "error",
8956
8972
  title: "An error has occurred while saving, please try again",
@@ -9258,12 +9274,12 @@ var ProductListRow = function ProductListRow(_ref2) {
9258
9274
  sx: listRowStyles,
9259
9275
  children: jsx(Box, {
9260
9276
  className: "productListContainer",
9261
- children: jsxs(Grid2, {
9277
+ children: jsxs(Grid, {
9262
9278
  container: true,
9263
9279
  alignItems: "center",
9264
9280
  spacing: 0,
9265
9281
  className: "rowContainer",
9266
- children: [jsxs(Grid2, {
9282
+ children: [jsxs(Grid, {
9267
9283
  className: "col-1",
9268
9284
  children: [phenomenon !== null && jsx(ProductListRowHeader, {
9269
9285
  title: productType.toUpperCase()
@@ -9277,7 +9293,7 @@ var ProductListRow = function ProductListRow(_ref2) {
9277
9293
  children: phenomenon !== null ? getLabel(product) : 'Cancel'
9278
9294
  })
9279
9295
  })]
9280
- }), jsxs(Grid2, {
9296
+ }), jsxs(Grid, {
9281
9297
  className: "col-2",
9282
9298
  children: [jsx(ProductListRowHeader, {
9283
9299
  title: t('issue-time')
@@ -9321,7 +9337,7 @@ var ProductListRow = function ProductListRow(_ref2) {
9321
9337
  children: product.issueDate ? dateUtils.dateToString(dateUtils.utc(product.issueDate), dateUtils.DATE_FORMAT_NAME_OF_MONTH) + " UTC" : t('not-published')
9322
9338
  })
9323
9339
  })]
9324
- }), jsxs(Grid2, {
9340
+ }), jsxs(Grid, {
9325
9341
  className: "col-3",
9326
9342
  children: [jsx(ProductListRowHeader, {
9327
9343
  title: t('valid-time')
@@ -9331,7 +9347,7 @@ var ProductListRow = function ProductListRow(_ref2) {
9331
9347
  "data-testid": "validTime",
9332
9348
  children: validTime
9333
9349
  })]
9334
- }), jsxs(Grid2, {
9350
+ }), jsxs(Grid, {
9335
9351
  className: "col-4",
9336
9352
  container: true,
9337
9353
  children: [product.status === 'DRAFT' ? jsx(Button, {
@@ -9382,11 +9398,11 @@ var ProductList = function ProductList(_ref) {
9382
9398
  info: error.message ? error.message : '',
9383
9399
  dataTestId: "productList-alert"
9384
9400
  })
9385
- }), jsxs(Grid2, {
9401
+ }), jsxs(Grid, {
9386
9402
  container: true,
9387
9403
  direction: "column",
9388
9404
  alignItems: "stretch",
9389
- children: [jsx(Grid2, {
9405
+ children: [jsx(Grid, {
9390
9406
  container: true,
9391
9407
  justifyContent: "flex-end",
9392
9408
  children: jsx(Button, {
@@ -9400,7 +9416,7 @@ var ProductList = function ProductList(_ref) {
9400
9416
  product: productType.toUpperCase()
9401
9417
  })
9402
9418
  })
9403
- }), jsx(Grid2, {
9419
+ }), jsx(Grid, {
9404
9420
  sx: {
9405
9421
  width: '100%',
9406
9422
  minHeight: '600px'
@@ -11733,4 +11749,4 @@ var createApi = function createApi() {
11733
11749
  return getApiRoutes(createFakeApiInstance());
11734
11750
  };
11735
11751
 
11736
- 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, 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, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, isVAPhenomenon, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers, useShortTestHelpers };
11752
+ 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, 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, 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.2.0",
3
+ "version": "12.3.0",
4
4
  "description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,23 +8,23 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/api": "12.2.0",
12
- "@opengeoweb/shared": "12.2.0",
13
- "@opengeoweb/theme": "12.2.0",
14
- "@opengeoweb/store": "12.2.0",
15
- "@opengeoweb/webmap": "12.2.0",
16
- "@opengeoweb/webmap-react": "12.2.0",
17
- "react-redux": "^8.1.3",
18
- "@opengeoweb/core": "12.2.0",
19
- "@opengeoweb/authentication": "12.2.0",
20
- "@mui/system": "^6.1.1",
21
- "@opengeoweb/form-fields": "12.2.0",
11
+ "@opengeoweb/api": "12.3.0",
12
+ "@opengeoweb/shared": "12.3.0",
13
+ "@opengeoweb/theme": "12.3.0",
14
+ "@opengeoweb/store": "12.3.0",
15
+ "@opengeoweb/webmap": "12.3.0",
16
+ "@opengeoweb/webmap-react": "12.3.0",
17
+ "react-redux": "^9.2.0",
18
+ "@opengeoweb/core": "12.3.0",
19
+ "@opengeoweb/authentication": "12.3.0",
20
+ "@mui/system": "^7.0.1",
21
+ "@opengeoweb/form-fields": "12.3.0",
22
22
  "react-hook-form": "^7.50.1",
23
23
  "axios": "^1.7.7",
24
24
  "lodash": "^4.17.21",
25
- "@reduxjs/toolkit": "^1.9.7",
25
+ "@reduxjs/toolkit": "^2.6.1",
26
26
  "i18next": "^23.11.5",
27
- "@mui/material": "^6.1.1",
27
+ "@mui/material": "^7.0.1",
28
28
  "react-i18next": "^15.1.1",
29
29
  "@tanstack/react-query": "^5.69.2"
30
30
  },
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import { AviationProduct, FormMode, ProductAction, ProductConfig, ProductType } from '../../types';
2
+ import { AviationProduct, FormMode, ProductAction, ProductConfig, ProductType, Sigmet } from '../../types';
3
3
  export declare const isVAPhenomenon: (product: AviationProduct, action: ProductAction) => boolean;
4
+ export declare const prepareCancelSigmet: (sigmet: Sigmet, movement: string) => Sigmet;
4
5
  export interface ProductFormDialogContentProps {
5
6
  isOpen: boolean;
6
7
  toggleDialogStatus: (shouldRefreshList?: boolean) => void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { Grid2Props } from '@mui/material';
3
- interface ProductFormFieldLayoutProps extends Grid2Props {
2
+ import { GridProps } from '@mui/material';
3
+ interface ProductFormFieldLayoutProps extends GridProps {
4
4
  title?: string;
5
5
  children: React.ReactNode;
6
6
  }
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- import { TFunction } from 'i18next';
3
- import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
4
1
  import { HeaderAction } from '@opengeoweb/shared';
5
2
  import { layerTypes, mapTypes } from '@opengeoweb/store';
6
3
  import { DrawMode, OpenLayersLayerProps } from '@opengeoweb/webmap-react';
7
- import { LevelUnits, ATSRLocation, ICAOLocation, ProductStatus, CancelSigmet, Sigmet, ProductCanbe, SigmetFromBackend, SigmetFromFrontend, ProductAction, Airmet, CancelAirmet, ProductConfig, Firareas, FIRConfigSigmet, AirmetFromBackend, AirmetFromFrontend, ProductType, AviationProduct, FIRLocationGeoJson, AirmetConfig, FIRConfigAirmet, StartOrEndDrawing, AviationPhenomenon } from '../../types';
4
+ import { TFunction } from 'i18next';
5
+ import * as React from 'react';
6
+ import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
7
+ import { ATSRLocation, Airmet, AirmetConfig, AirmetFromBackend, AirmetFromFrontend, AviationPhenomenon, AviationProduct, CancelAirmet, CancelSigmet, FIRConfigAirmet, FIRConfigSigmet, FIRLocationGeoJson, Firareas, ICAOLocation, LevelUnits, ProductAction, ProductCanbe, ProductConfig, ProductStatus, ProductType, Sigmet, SigmetFromBackend, SigmetFromFrontend, StartOrEndDrawing } from '../../types';
8
8
  export declare const getDefaultPhenomena: (productConfig: ProductConfig, currentFir?: string) => {
9
9
  phenomena: AviationPhenomenon[];
10
10
  };
@@ -3,7 +3,6 @@ import { ThemeProviderProps } from '@opengeoweb/theme';
3
3
  import { CreateApiFn } from '@opengeoweb/api';
4
4
  import { Store } from '@reduxjs/toolkit';
5
5
  import { AxiosError } from 'axios';
6
- import { uiTypes, WebMapStateModuleState } from '@opengeoweb/store';
7
6
  import { AviationPhenomenon } from '../types';
8
7
  export declare const ThemeWrapperWithModules: React.FC<ThemeProviderProps>;
9
8
  interface StoryWrapperProps {
@@ -31,5 +30,4 @@ export declare const testFir: GeoJSON.FeatureCollection;
31
30
  export declare const createFakeApiWithErrors: () => any;
32
31
  export declare const fakeAirmetPhenomenaList: AviationPhenomenon[];
33
32
  export declare const fakeSigmetPhenomenaList: AviationPhenomenon[];
34
- export declare const createMockStore: (mockState: uiTypes.UIModuleState & WebMapStateModuleState) => Store;
35
33
  export {};