@opengeoweb/sigmet-airmet 14.4.0 → 14.5.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.
Files changed (55) hide show
  1. package/index.esm.js +1389 -1129
  2. package/package.json +10 -10
  3. package/src/lib/api/api.d.ts +2 -2
  4. package/src/lib/api/hooks.d.ts +2 -2
  5. package/src/lib/api/testApi.d.ts +1 -1
  6. package/src/lib/components/ComponentsLookUp/AirmetComponentsLookUp.d.ts +2 -2
  7. package/src/lib/components/ComponentsLookUp/AviationProductApiWrapper.d.ts +3 -3
  8. package/src/lib/components/ComponentsLookUp/SigmetComponentsLookUp.d.ts +2 -2
  9. package/src/lib/components/ConfigurationDemo/ConfigrationDemo.stories.d.ts +1 -1
  10. package/src/lib/components/ConfigurationDemo/configurations.d.ts +1 -1
  11. package/src/lib/components/MapViewGeoJson/MapViewGeoJson.d.ts +3 -3
  12. package/src/lib/components/MapViewGeoJson/MapViewGeoJson.stories.d.ts +4 -4
  13. package/src/lib/components/MetInfoWrapper/DownloadSigmetAirmetConfigWrapper.d.ts +1 -1
  14. package/src/lib/components/MetInfoWrapper/MetInfoWrapper.d.ts +1 -1
  15. package/src/lib/components/MetInfoWrapper/MetInfoWrapper.stories.d.ts +1 -1
  16. package/src/lib/components/MetInfoWrapper/utils.d.ts +1 -1
  17. package/src/lib/components/ProductForms/AirmetForm/AirmetForm.stories.d.ts +1 -1
  18. package/src/lib/components/ProductForms/ProductFormDialog.Draw.stories.d.ts +1 -1
  19. package/src/lib/components/ProductForms/ProductFormDialog.Sigmet.stories.d.ts +1 -1
  20. package/src/lib/components/ProductForms/ProductFormDialog.d.ts +2 -2
  21. package/src/lib/components/ProductForms/ProductFormDialogContent.d.ts +3 -2
  22. package/src/lib/components/ProductForms/ProductFormFields/Change.d.ts +1 -1
  23. package/src/lib/components/ProductForms/ProductFormFields/CloudLevels.d.ts +1 -1
  24. package/src/lib/components/ProductForms/ProductFormFields/DrawTools.d.ts +1 -1
  25. package/src/lib/components/ProductForms/ProductFormFields/Levels.d.ts +2 -2
  26. package/src/lib/components/ProductForms/ProductFormFields/ObservationForecast.d.ts +1 -1
  27. package/src/lib/components/ProductForms/ProductFormFields/ObservationForecastTime.d.ts +1 -1
  28. package/src/lib/components/ProductForms/ProductFormFields/Phenomenon.d.ts +1 -1
  29. package/src/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.d.ts +1 -1
  30. package/src/lib/components/ProductForms/ProductFormFields/Progress.d.ts +3 -3
  31. package/src/lib/components/ProductForms/ProductFormFields/SelectFIR.d.ts +1 -1
  32. package/src/lib/components/ProductForms/ProductFormFields/StartGeometry.d.ts +2 -2
  33. package/src/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.d.ts +2 -2
  34. package/src/lib/components/ProductForms/ProductFormFields/SurfaceWind.d.ts +2 -2
  35. package/src/lib/components/ProductForms/ProductFormFields/Tac.d.ts +1 -1
  36. package/src/lib/components/ProductForms/ProductFormFields/Type.d.ts +1 -1
  37. package/src/lib/components/ProductForms/ProductFormFields/ValidFrom.d.ts +2 -2
  38. package/src/lib/components/ProductForms/ProductFormFields/ValidUntil.d.ts +1 -1
  39. package/src/lib/components/ProductForms/ProductFormFields/VolcanicFields.d.ts +1 -1
  40. package/src/lib/components/ProductForms/ProductFormLayout.d.ts +2 -2
  41. package/src/lib/components/ProductForms/ProductFormTac.d.ts +2 -2
  42. package/src/lib/components/ProductForms/SigmetForm/SigmetCancelVolcanicMovements.d.ts +1 -1
  43. package/src/lib/components/ProductForms/SigmetForm/SigmetForm.stories.d.ts +1 -1
  44. package/src/lib/components/ProductForms/useStoredGeoJSONHandling.d.ts +2 -2
  45. package/src/lib/components/ProductForms/utils.d.ts +9 -8
  46. package/src/lib/components/ProductList/ProductList.d.ts +1 -1
  47. package/src/lib/components/ProductList/ProductList.stories.d.ts +2 -2
  48. package/src/lib/components/ProductList/ProductListRow.d.ts +3 -2
  49. package/src/lib/components/Providers/Providers.d.ts +3 -3
  50. package/src/lib/types.d.ts +1 -1
  51. package/src/lib/utils/config/index.d.ts +1 -1
  52. package/src/lib/utils/i18n.d.ts +1 -1
  53. package/src/lib/utils/mockdata/fakeAirmetList.d.ts +1 -1
  54. package/src/lib/utils/mockdata/fakeSigmetList.d.ts +1 -1
  55. package/src/lib/utils/testUtils.d.ts +3 -3
package/index.esm.js CHANGED
@@ -1,16 +1,15 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { sessionStorageProvider, PROJECTION, useIsMounted, dateUtils, usePreventBrowserClose, CustomTooltip, usePrevious, ConfirmationServiceProvider, useConfirmationDialog, CustomDialog, AlertBanner, StatusTag, usePoller, ErrorBoundary } from '@opengeoweb/shared';
3
3
  import { Box as Box$1 } from '@mui/system';
4
- import * as React from 'react';
5
- import React__default, { useRef, useEffect, useCallback } from 'react';
6
- import { FormControlLabel, Radio, Grid, Typography, Box, Checkbox, MenuItem, FormHelperText, useTheme, Backdrop, CircularProgress, Card, Button, LinearProgress, List, ListItemButton } from '@mui/material';
4
+ import React, { useRef, useEffect, useCallback } from 'react';
5
+ import { Grid, Typography, FormControlLabel, Radio, Box, Checkbox, MenuItem, FormHelperText, useTheme, Backdrop, CircularProgress, Card, Button, LinearProgress, List, ListItemButton } from '@mui/material';
7
6
  import { useFormContext } from 'react-hook-form';
8
7
  import { FORM_FIELDS_NAMESPACE, useDraftFormHelpers, ReactHookFormRadioGroup, hasValidGeometry, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMin, isValidMax, isEmpty, ReactHookFormDateTime, countIntersectionPoints, hasMulitpleIntersections, ReactHookFormHiddenInput, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isMaximumOneDrawing, isXHoursBefore, isXHoursAfter, ReactHookFormTextField, DegreesMinutesField, isLatitude, isNonOrBothCoordinates, isLongitude, ReactHookFormFormControl, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
9
8
  import { useSelector, useDispatch, shallowEqual } from 'react-redux';
10
9
  import { uiSelectors, useUpdateSharedData, mapSelectors, syncGroupsActions, layerActions, mapActions, defaultLayers, syncConstants, uiActions, uiTypes, genericSelectors, drawingToolActions } from '@opengeoweb/store';
11
10
  import { FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_SECONDARY_STROKE_COLOR, defaultIntersectionStyleProperties, defaultGeoJSONStyleProperties, addSelectionTypeToGeoJSON, DRAWMODE, defaultLocation, addGeoJSONProperties, defaultBox, defaultPolygon, defaultDelete, getIcon, addFeatureProperties, OpenLayersFeatureLayer, genericOpenLayersFeatureStyle, OpenLayersMapDraw, useMapDrawTool, rewindGeometry } from '@opengeoweb/webmap-react';
12
- import { getHeaders, handleResponse, useAuthQuery, useAuthenticationContext } from '@opengeoweb/api';
13
11
  import { useQueryClient, useMutation } from '@tanstack/react-query';
12
+ import { getHeaders, handleResponse, useAuthQuery, useAuthenticationContext } from '@opengeoweb/api';
14
13
  import i18n from 'i18next';
15
14
  import { useTranslation } from 'react-i18next';
16
15
  import { LegendConnect, OlMapViewConnect, TimeSliderConnect } from '@opengeoweb/core';
@@ -534,133 +533,6 @@ var sigmetAirmetTranslations = {
534
533
  nl: nl
535
534
  };
536
535
 
537
- /**
538
- * The possible type for the airmet
539
- */
540
- var AirmetType;
541
- (function (AirmetType) {
542
- AirmetType["NORMAL"] = "Normal";
543
- AirmetType["TEST"] = "Test";
544
- AirmetType["EXERCISE"] = "Exercise";
545
- })(AirmetType || (AirmetType = {}));
546
- /**
547
- * The possible type for the sigmet
548
- */
549
- var SigmetType;
550
- (function (SigmetType) {
551
- SigmetType["NORMAL"] = "Normal";
552
- SigmetType["TEST"] = "Test";
553
- SigmetType["EXERCISE"] = "Exercise";
554
- SigmetType["SHORT_TEST"] = "Short test";
555
- SigmetType["SHORT_VA_TEST"] = "Short VA test";
556
- })(SigmetType || (SigmetType = {}));
557
- var VisibilityCause;
558
- (function (VisibilityCause) {
559
- VisibilityCause["DZ"] = "Drizzle";
560
- VisibilityCause["DU"] = "Dust";
561
- VisibilityCause["PO"] = "Dust or sand devil";
562
- VisibilityCause["DS"] = "Dust storm";
563
- VisibilityCause["FG"] = "Fog";
564
- VisibilityCause["FC"] = "Funnel clouds";
565
- VisibilityCause["GR"] = "Hail";
566
- VisibilityCause["HZ"] = "Haze";
567
- VisibilityCause["PL"] = "Ice pellets";
568
- VisibilityCause["BR"] = "Mist";
569
- VisibilityCause["RA"] = "Rain";
570
- VisibilityCause["SA"] = "Sand";
571
- VisibilityCause["SS"] = "Sand storm";
572
- VisibilityCause["FU"] = "Smoke";
573
- VisibilityCause["SN"] = "Snow";
574
- VisibilityCause["SG"] = "Snow grains";
575
- VisibilityCause["GS"] = "Soft hail";
576
- VisibilityCause["SQ"] = "Squalls";
577
- VisibilityCause["VA"] = "Volcanic Ash";
578
- })(VisibilityCause || (VisibilityCause = {}));
579
- /* Speed unit, e.g. 'KT', 'KMH' */
580
- var MovementUnit;
581
- (function (MovementUnit) {
582
- MovementUnit["KT"] = "kt";
583
- MovementUnit["KMH"] = "kmh";
584
- })(MovementUnit || (MovementUnit = {}));
585
- var WindUnit;
586
- (function (WindUnit) {
587
- WindUnit["KT"] = "kt";
588
- WindUnit["MPS"] = "mps";
589
- })(WindUnit || (WindUnit = {}));
590
- var ProductAction;
591
- (function (ProductAction) {
592
- ProductAction["PUBLISH"] = "PUBLISH";
593
- ProductAction["CANCEL"] = "CANCEL";
594
- ProductAction["RENEW"] = "RENEW";
595
- ProductAction["AMEND"] = "AMEND";
596
- ProductAction["SAVE"] = "SAVE";
597
- ProductAction["DISCARD"] = "DISCARD";
598
- ProductAction["DUPLICATE"] = "DUPLICATE";
599
- ProductAction["CLOSE"] = "CLOSE";
600
- })(ProductAction || (ProductAction = {}));
601
- var ProductStatusDescription;
602
- (function (ProductStatusDescription) {
603
- ProductStatusDescription["DRAFT"] = "Draft";
604
- ProductStatusDescription["PUBLISHED"] = "Published";
605
- ProductStatusDescription["CANCELLED"] = "Cancelled";
606
- ProductStatusDescription["EXPIRED"] = "Expired";
607
- ProductStatusDescription["RENEWED"] = "Renewed";
608
- ProductStatusDescription["DISCARDED"] = "Discarded";
609
- })(ProductStatusDescription || (ProductStatusDescription = {}));
610
- var CloudLevelUnits;
611
- (function (CloudLevelUnits) {
612
- CloudLevelUnits["FT"] = "ft";
613
- CloudLevelUnits["M"] = "m";
614
- })(CloudLevelUnits || (CloudLevelUnits = {}));
615
- var LevelUnits;
616
- (function (LevelUnits) {
617
- LevelUnits["FT"] = "ft";
618
- LevelUnits["M"] = "m";
619
- LevelUnits["FL"] = "FL";
620
- })(LevelUnits || (LevelUnits = {}));
621
- var Direction;
622
- (function (Direction) {
623
- Direction["N"] = "N";
624
- Direction["NNE"] = "NNE";
625
- Direction["NE"] = "NE";
626
- Direction["ENE"] = "ENE";
627
- Direction["E"] = "E";
628
- Direction["ESE"] = "ESE";
629
- Direction["SE"] = "SE";
630
- Direction["SSE"] = "SSE";
631
- Direction["S"] = "S";
632
- Direction["SSW"] = "SSW";
633
- Direction["SW"] = "SW";
634
- Direction["WSW"] = "WSW";
635
- Direction["W"] = "W";
636
- Direction["WNW"] = "WNW";
637
- Direction["NW"] = "NW";
638
- Direction["NNW"] = "NNW";
639
- })(Direction || (Direction = {}));
640
- var isInstanceOfSigmet = function isInstanceOfSigmet(obj) {
641
- return 'phenomenon' in obj;
642
- };
643
- var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
644
- return 'cancelsSigmetSequenceId' in obj;
645
- };
646
- var isInstanceOfAirmet = function isInstanceOfAirmet(obj) {
647
- return 'phenomenon' in obj;
648
- };
649
- var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
650
- return 'cancelsAirmetSequenceId' in obj;
651
- };
652
- var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
653
- return 'phenomenon' in obj;
654
- };
655
- var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
656
- return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
657
- };
658
- var StartOrEndDrawing;
659
- (function (StartOrEndDrawing) {
660
- StartOrEndDrawing["start"] = "start";
661
- StartOrEndDrawing["end"] = "end";
662
- })(StartOrEndDrawing || (StartOrEndDrawing = {}));
663
-
664
536
  function _OverloadYield(e, d) {
665
537
  this.v = e, this.k = d;
666
538
  }
@@ -1017,87 +889,217 @@ var safeFetch = /*#__PURE__*/function () {
1017
889
  };
1018
890
  }();
1019
891
  // API
1020
- var getAirmetList = function getAirmetList(auth) {
1021
- return safeFetch(airmetBaseUrl + "/airmetlist", {
1022
- headers: getHeaders(auth)
1023
- });
1024
- };
1025
- var getSigmetList = function getSigmetList(auth) {
1026
- return safeFetch(sigmetBaseUrl + "/sigmetlist", {
1027
- headers: getHeaders(auth)
1028
- });
1029
- };
1030
- var getAirmetConfig = function getAirmetConfig(auth) {
1031
- return fetch(airmetBaseUrl + "/airmet-config", {
1032
- headers: getHeaders(auth)
1033
- }).then(function (result) {
1034
- return result.json();
1035
- });
1036
- };
1037
- var getSigmetConfig = function getSigmetConfig(auth) {
1038
- return fetch(sigmetBaseUrl + "/sigmet-config", {
1039
- headers: getHeaders(auth)
1040
- }).then(function (result) {
1041
- return result.json();
1042
- });
1043
- };
1044
- var postTAC = /*#__PURE__*/function () {
1045
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(url, auth, product) {
1046
- var result, textData;
892
+ var getAirmetList = /*#__PURE__*/function () {
893
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(auth) {
1047
894
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1048
895
  while (1) switch (_context2.prev = _context2.next) {
1049
896
  case 0:
1050
- _context2.next = 2;
897
+ return _context2.abrupt("return", safeFetch(airmetBaseUrl + "/airmetlist", {
898
+ headers: getHeaders(auth)
899
+ }));
900
+ case 1:
901
+ case "end":
902
+ return _context2.stop();
903
+ }
904
+ }, _callee2);
905
+ }));
906
+ return function getAirmetList(_x4) {
907
+ return _ref2.apply(this, arguments);
908
+ };
909
+ }();
910
+ var getSigmetList = /*#__PURE__*/function () {
911
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(auth) {
912
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
913
+ while (1) switch (_context3.prev = _context3.next) {
914
+ case 0:
915
+ return _context3.abrupt("return", safeFetch(sigmetBaseUrl + "/sigmetlist", {
916
+ headers: getHeaders(auth)
917
+ }));
918
+ case 1:
919
+ case "end":
920
+ return _context3.stop();
921
+ }
922
+ }, _callee3);
923
+ }));
924
+ return function getSigmetList(_x5) {
925
+ return _ref3.apply(this, arguments);
926
+ };
927
+ }();
928
+ var getAirmetConfig = /*#__PURE__*/function () {
929
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(auth) {
930
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
931
+ while (1) switch (_context5.prev = _context5.next) {
932
+ case 0:
933
+ return _context5.abrupt("return", fetch(airmetBaseUrl + "/airmet-config", {
934
+ headers: getHeaders(auth)
935
+ }).then(/*#__PURE__*/function () {
936
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(result) {
937
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
938
+ while (1) switch (_context4.prev = _context4.next) {
939
+ case 0:
940
+ return _context4.abrupt("return", result.json());
941
+ case 1:
942
+ case "end":
943
+ return _context4.stop();
944
+ }
945
+ }, _callee4);
946
+ }));
947
+ return function (_x7) {
948
+ return _ref5.apply(this, arguments);
949
+ };
950
+ }()));
951
+ case 1:
952
+ case "end":
953
+ return _context5.stop();
954
+ }
955
+ }, _callee5);
956
+ }));
957
+ return function getAirmetConfig(_x6) {
958
+ return _ref4.apply(this, arguments);
959
+ };
960
+ }();
961
+ var getSigmetConfig = /*#__PURE__*/function () {
962
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(auth) {
963
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
964
+ while (1) switch (_context7.prev = _context7.next) {
965
+ case 0:
966
+ return _context7.abrupt("return", fetch(sigmetBaseUrl + "/sigmet-config", {
967
+ headers: getHeaders(auth)
968
+ }).then(/*#__PURE__*/function () {
969
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(result) {
970
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
971
+ while (1) switch (_context6.prev = _context6.next) {
972
+ case 0:
973
+ return _context6.abrupt("return", result.json());
974
+ case 1:
975
+ case "end":
976
+ return _context6.stop();
977
+ }
978
+ }, _callee6);
979
+ }));
980
+ return function (_x9) {
981
+ return _ref7.apply(this, arguments);
982
+ };
983
+ }()));
984
+ case 1:
985
+ case "end":
986
+ return _context7.stop();
987
+ }
988
+ }, _callee7);
989
+ }));
990
+ return function getSigmetConfig(_x8) {
991
+ return _ref6.apply(this, arguments);
992
+ };
993
+ }();
994
+ var postTAC = /*#__PURE__*/function () {
995
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(url, auth, product) {
996
+ var result, textData;
997
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
998
+ while (1) switch (_context8.prev = _context8.next) {
999
+ case 0:
1000
+ _context8.next = 2;
1051
1001
  return fetch(url, {
1052
1002
  method: 'POST',
1053
1003
  body: JSON.stringify(product),
1054
1004
  headers: getHeaders(auth)
1055
1005
  });
1056
1006
  case 2:
1057
- result = _context2.sent;
1007
+ result = _context8.sent;
1058
1008
  if (result.ok) {
1059
- _context2.next = 5;
1009
+ _context8.next = 5;
1060
1010
  break;
1061
1011
  }
1062
1012
  throw new Error("Failed to fetch TAC data: " + result.statusText);
1063
1013
  case 5:
1064
- _context2.next = 7;
1014
+ _context8.next = 7;
1065
1015
  return result.text();
1066
1016
  case 7:
1067
- textData = _context2.sent;
1068
- return _context2.abrupt("return", {
1017
+ textData = _context8.sent;
1018
+ return _context8.abrupt("return", {
1069
1019
  data: textData
1070
1020
  });
1071
1021
  case 9:
1072
1022
  case "end":
1073
- return _context2.stop();
1023
+ return _context8.stop();
1074
1024
  }
1075
- }, _callee2);
1025
+ }, _callee8);
1076
1026
  }));
1077
- return function postTAC(_x4, _x5, _x6) {
1078
- return _ref2.apply(this, arguments);
1027
+ return function postTAC(_x0, _x1, _x10) {
1028
+ return _ref8.apply(this, arguments);
1029
+ };
1030
+ }();
1031
+ var getSigmetTAC = /*#__PURE__*/function () {
1032
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(auth, product) {
1033
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1034
+ while (1) switch (_context9.prev = _context9.next) {
1035
+ case 0:
1036
+ return _context9.abrupt("return", postTAC(sigmetBaseUrl + "/sigmet2tac", auth, product));
1037
+ case 1:
1038
+ case "end":
1039
+ return _context9.stop();
1040
+ }
1041
+ }, _callee9);
1042
+ }));
1043
+ return function getSigmetTAC(_x11, _x12) {
1044
+ return _ref9.apply(this, arguments);
1045
+ };
1046
+ }();
1047
+ var getAirmetTAC = /*#__PURE__*/function () {
1048
+ var _ref0 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0(auth, product) {
1049
+ return _regeneratorRuntime().wrap(function _callee0$(_context0) {
1050
+ while (1) switch (_context0.prev = _context0.next) {
1051
+ case 0:
1052
+ return _context0.abrupt("return", postTAC(airmetBaseUrl + "/airmet2tac", auth, product));
1053
+ case 1:
1054
+ case "end":
1055
+ return _context0.stop();
1056
+ }
1057
+ }, _callee0);
1058
+ }));
1059
+ return function getAirmetTAC(_x13, _x14) {
1060
+ return _ref0.apply(this, arguments);
1061
+ };
1062
+ }();
1063
+ var postSigmet = /*#__PURE__*/function () {
1064
+ var _ref1 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(auth, data) {
1065
+ return _regeneratorRuntime().wrap(function _callee1$(_context1) {
1066
+ while (1) switch (_context1.prev = _context1.next) {
1067
+ case 0:
1068
+ return _context1.abrupt("return", fetch(sigmetBaseUrl + "/sigmet", {
1069
+ headers: getHeaders(auth),
1070
+ method: 'POST',
1071
+ body: JSON.stringify(data)
1072
+ }).then(handleResponse));
1073
+ case 1:
1074
+ case "end":
1075
+ return _context1.stop();
1076
+ }
1077
+ }, _callee1);
1078
+ }));
1079
+ return function postSigmet(_x15, _x16) {
1080
+ return _ref1.apply(this, arguments);
1081
+ };
1082
+ }();
1083
+ var postAirmet = /*#__PURE__*/function () {
1084
+ var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(auth, data) {
1085
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1086
+ while (1) switch (_context10.prev = _context10.next) {
1087
+ case 0:
1088
+ return _context10.abrupt("return", fetch(airmetBaseUrl + "/airmet", {
1089
+ headers: getHeaders(auth),
1090
+ method: 'POST',
1091
+ body: JSON.stringify(data)
1092
+ }).then(handleResponse));
1093
+ case 1:
1094
+ case "end":
1095
+ return _context10.stop();
1096
+ }
1097
+ }, _callee10);
1098
+ }));
1099
+ return function postAirmet(_x17, _x18) {
1100
+ return _ref10.apply(this, arguments);
1079
1101
  };
1080
1102
  }();
1081
- var getSigmetTAC = function getSigmetTAC(auth, product) {
1082
- return postTAC(sigmetBaseUrl + "/sigmet2tac", auth, product);
1083
- };
1084
- var getAirmetTAC = function getAirmetTAC(auth, product) {
1085
- return postTAC(airmetBaseUrl + "/airmet2tac", auth, product);
1086
- };
1087
- var postSigmet = function postSigmet(auth, data) {
1088
- return fetch(sigmetBaseUrl + "/sigmet", {
1089
- headers: getHeaders(auth),
1090
- method: 'POST',
1091
- body: JSON.stringify(data)
1092
- }).then(handleResponse);
1093
- };
1094
- var postAirmet = function postAirmet(auth, data) {
1095
- return fetch(airmetBaseUrl + "/airmet", {
1096
- headers: getHeaders(auth),
1097
- method: 'POST',
1098
- body: JSON.stringify(data)
1099
- }).then(handleResponse);
1100
- };
1101
1103
 
1102
1104
  var useAirmetList = function useAirmetList(disabled) {
1103
1105
  if (disabled === void 0) {
@@ -1120,24 +1122,78 @@ var useTACApi = function useTACApi() {
1120
1122
  var _useAuthenticationCon = useAuthenticationContext(),
1121
1123
  auth = _useAuthenticationCon.auth;
1122
1124
  var queryClient = useQueryClient();
1123
- var fetchSigmetTAC = function fetchSigmetTAC(product) {
1124
- return queryClient.fetchQuery({
1125
- queryKey: ['sigmet-tac', product],
1126
- queryFn: function queryFn() {
1127
- return getSigmetTAC(auth, product);
1128
- },
1129
- staleTime: 1000 * 15
1130
- });
1131
- };
1132
- var fetchAirmetTAC = function fetchAirmetTAC(product) {
1133
- return queryClient.fetchQuery({
1134
- queryKey: ['airmet-tac', product],
1135
- queryFn: function queryFn() {
1136
- return getAirmetTAC(auth, product);
1137
- },
1138
- staleTime: 1000 * 15
1139
- });
1140
- };
1125
+ var fetchSigmetTAC = /*#__PURE__*/function () {
1126
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(product) {
1127
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1128
+ while (1) switch (_context2.prev = _context2.next) {
1129
+ case 0:
1130
+ return _context2.abrupt("return", queryClient.fetchQuery({
1131
+ queryKey: ['sigmet-tac', product],
1132
+ queryFn: function () {
1133
+ var _queryFn = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1134
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1135
+ while (1) switch (_context.prev = _context.next) {
1136
+ case 0:
1137
+ return _context.abrupt("return", getSigmetTAC(auth, product));
1138
+ case 1:
1139
+ case "end":
1140
+ return _context.stop();
1141
+ }
1142
+ }, _callee);
1143
+ }));
1144
+ function queryFn() {
1145
+ return _queryFn.apply(this, arguments);
1146
+ }
1147
+ return queryFn;
1148
+ }(),
1149
+ staleTime: 1000 * 15
1150
+ }));
1151
+ case 1:
1152
+ case "end":
1153
+ return _context2.stop();
1154
+ }
1155
+ }, _callee2);
1156
+ }));
1157
+ return function fetchSigmetTAC(_x) {
1158
+ return _ref.apply(this, arguments);
1159
+ };
1160
+ }();
1161
+ var fetchAirmetTAC = /*#__PURE__*/function () {
1162
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(product) {
1163
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1164
+ while (1) switch (_context4.prev = _context4.next) {
1165
+ case 0:
1166
+ return _context4.abrupt("return", queryClient.fetchQuery({
1167
+ queryKey: ['airmet-tac', product],
1168
+ queryFn: function () {
1169
+ var _queryFn2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1170
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1171
+ while (1) switch (_context3.prev = _context3.next) {
1172
+ case 0:
1173
+ return _context3.abrupt("return", getAirmetTAC(auth, product));
1174
+ case 1:
1175
+ case "end":
1176
+ return _context3.stop();
1177
+ }
1178
+ }, _callee3);
1179
+ }));
1180
+ function queryFn() {
1181
+ return _queryFn2.apply(this, arguments);
1182
+ }
1183
+ return queryFn;
1184
+ }(),
1185
+ staleTime: 1000 * 15
1186
+ }));
1187
+ case 1:
1188
+ case "end":
1189
+ return _context4.stop();
1190
+ }
1191
+ }, _callee4);
1192
+ }));
1193
+ return function fetchAirmetTAC(_x2) {
1194
+ return _ref2.apply(this, arguments);
1195
+ };
1196
+ }();
1141
1197
  return {
1142
1198
  fetchSigmetTAC: fetchSigmetTAC,
1143
1199
  fetchAirmetTAC: fetchAirmetTAC
@@ -1148,31 +1204,48 @@ var usePostSigmet = function usePostSigmet() {
1148
1204
  auth = _useAuthenticationCon2.auth;
1149
1205
  var queryClient = useQueryClient();
1150
1206
  return useMutation({
1151
- mutationFn: function mutationFn(formData) {
1152
- if (!auth) {
1153
- throw new Error('Authentication context not found');
1207
+ mutationFn: function () {
1208
+ var _mutationFn = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(formData) {
1209
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1210
+ while (1) switch (_context5.prev = _context5.next) {
1211
+ case 0:
1212
+ if (auth) {
1213
+ _context5.next = 2;
1214
+ break;
1215
+ }
1216
+ throw new Error('Authentication context not found');
1217
+ case 2:
1218
+ return _context5.abrupt("return", postSigmet(auth, formData));
1219
+ case 3:
1220
+ case "end":
1221
+ return _context5.stop();
1222
+ }
1223
+ }, _callee5);
1224
+ }));
1225
+ function mutationFn(_x3) {
1226
+ return _mutationFn.apply(this, arguments);
1154
1227
  }
1155
- return postSigmet(auth, formData);
1156
- },
1228
+ return mutationFn;
1229
+ }(),
1157
1230
  onError: function onError() {
1158
1231
  void queryClient.invalidateQueries({
1159
1232
  queryKey: ['sigmet']
1160
1233
  });
1161
1234
  },
1162
1235
  onSuccess: function () {
1163
- var _onSuccess = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1164
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1165
- while (1) switch (_context.prev = _context.next) {
1236
+ var _onSuccess = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
1237
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1238
+ while (1) switch (_context6.prev = _context6.next) {
1166
1239
  case 0:
1167
- _context.next = 2;
1240
+ _context6.next = 2;
1168
1241
  return queryClient.invalidateQueries({
1169
1242
  queryKey: ['sigmet-list']
1170
1243
  });
1171
1244
  case 2:
1172
1245
  case "end":
1173
- return _context.stop();
1246
+ return _context6.stop();
1174
1247
  }
1175
- }, _callee);
1248
+ }, _callee6);
1176
1249
  }));
1177
1250
  function onSuccess() {
1178
1251
  return _onSuccess.apply(this, arguments);
@@ -1186,31 +1259,48 @@ var usePostAirmet = function usePostAirmet() {
1186
1259
  auth = _useAuthenticationCon3.auth;
1187
1260
  var queryClient = useQueryClient();
1188
1261
  return useMutation({
1189
- mutationFn: function mutationFn(formData) {
1190
- if (!auth) {
1191
- throw new Error('Authentication context not found');
1262
+ mutationFn: function () {
1263
+ var _mutationFn2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(formData) {
1264
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
1265
+ while (1) switch (_context7.prev = _context7.next) {
1266
+ case 0:
1267
+ if (auth) {
1268
+ _context7.next = 2;
1269
+ break;
1270
+ }
1271
+ throw new Error('Authentication context not found');
1272
+ case 2:
1273
+ return _context7.abrupt("return", postAirmet(auth, formData));
1274
+ case 3:
1275
+ case "end":
1276
+ return _context7.stop();
1277
+ }
1278
+ }, _callee7);
1279
+ }));
1280
+ function mutationFn(_x4) {
1281
+ return _mutationFn2.apply(this, arguments);
1192
1282
  }
1193
- return postAirmet(auth, formData);
1194
- },
1283
+ return mutationFn;
1284
+ }(),
1195
1285
  onError: function onError() {
1196
1286
  void queryClient.invalidateQueries({
1197
1287
  queryKey: ['airmet']
1198
1288
  });
1199
1289
  },
1200
1290
  onSuccess: function () {
1201
- var _onSuccess2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1202
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1203
- while (1) switch (_context2.prev = _context2.next) {
1291
+ var _onSuccess2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1292
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1293
+ while (1) switch (_context8.prev = _context8.next) {
1204
1294
  case 0:
1205
- _context2.next = 2;
1295
+ _context8.next = 2;
1206
1296
  return queryClient.invalidateQueries({
1207
1297
  queryKey: ['airmet-list']
1208
1298
  });
1209
1299
  case 2:
1210
1300
  case "end":
1211
- return _context2.stop();
1301
+ return _context8.stop();
1212
1302
  }
1213
- }, _callee2);
1303
+ }, _callee8);
1214
1304
  }));
1215
1305
  function onSuccess() {
1216
1306
  return _onSuccess2.apply(this, arguments);
@@ -1266,7 +1356,134 @@ var useShortTestHelpers = function useShortTestHelpers() {
1266
1356
  };
1267
1357
  };
1268
1358
 
1269
- var location_indicator_mwo$1 = "EHDB";
1359
+ /**
1360
+ * The possible type for the airmet
1361
+ */
1362
+ var AirmetType;
1363
+ (function (AirmetType) {
1364
+ AirmetType["NORMAL"] = "Normal";
1365
+ AirmetType["TEST"] = "Test";
1366
+ AirmetType["EXERCISE"] = "Exercise";
1367
+ })(AirmetType || (AirmetType = {}));
1368
+ /**
1369
+ * The possible type for the sigmet
1370
+ */
1371
+ var SigmetType;
1372
+ (function (SigmetType) {
1373
+ SigmetType["NORMAL"] = "Normal";
1374
+ SigmetType["TEST"] = "Test";
1375
+ SigmetType["EXERCISE"] = "Exercise";
1376
+ SigmetType["SHORT_TEST"] = "Short test";
1377
+ SigmetType["SHORT_VA_TEST"] = "Short VA test";
1378
+ })(SigmetType || (SigmetType = {}));
1379
+ var VisibilityCause;
1380
+ (function (VisibilityCause) {
1381
+ VisibilityCause["DZ"] = "Drizzle";
1382
+ VisibilityCause["DU"] = "Dust";
1383
+ VisibilityCause["PO"] = "Dust or sand devil";
1384
+ VisibilityCause["DS"] = "Dust storm";
1385
+ VisibilityCause["FG"] = "Fog";
1386
+ VisibilityCause["FC"] = "Funnel clouds";
1387
+ VisibilityCause["GR"] = "Hail";
1388
+ VisibilityCause["HZ"] = "Haze";
1389
+ VisibilityCause["PL"] = "Ice pellets";
1390
+ VisibilityCause["BR"] = "Mist";
1391
+ VisibilityCause["RA"] = "Rain";
1392
+ VisibilityCause["SA"] = "Sand";
1393
+ VisibilityCause["SS"] = "Sand storm";
1394
+ VisibilityCause["FU"] = "Smoke";
1395
+ VisibilityCause["SN"] = "Snow";
1396
+ VisibilityCause["SG"] = "Snow grains";
1397
+ VisibilityCause["GS"] = "Soft hail";
1398
+ VisibilityCause["SQ"] = "Squalls";
1399
+ VisibilityCause["VA"] = "Volcanic Ash";
1400
+ })(VisibilityCause || (VisibilityCause = {}));
1401
+ /* Speed unit, e.g. 'KT', 'KMH' */
1402
+ var MovementUnit;
1403
+ (function (MovementUnit) {
1404
+ MovementUnit["KT"] = "kt";
1405
+ MovementUnit["KMH"] = "kmh";
1406
+ })(MovementUnit || (MovementUnit = {}));
1407
+ var WindUnit;
1408
+ (function (WindUnit) {
1409
+ WindUnit["KT"] = "kt";
1410
+ WindUnit["MPS"] = "mps";
1411
+ })(WindUnit || (WindUnit = {}));
1412
+ var ProductAction;
1413
+ (function (ProductAction) {
1414
+ ProductAction["PUBLISH"] = "PUBLISH";
1415
+ ProductAction["CANCEL"] = "CANCEL";
1416
+ ProductAction["RENEW"] = "RENEW";
1417
+ ProductAction["AMEND"] = "AMEND";
1418
+ ProductAction["SAVE"] = "SAVE";
1419
+ ProductAction["DISCARD"] = "DISCARD";
1420
+ ProductAction["DUPLICATE"] = "DUPLICATE";
1421
+ ProductAction["CLOSE"] = "CLOSE";
1422
+ })(ProductAction || (ProductAction = {}));
1423
+ var ProductStatusDescription;
1424
+ (function (ProductStatusDescription) {
1425
+ ProductStatusDescription["DRAFT"] = "Draft";
1426
+ ProductStatusDescription["PUBLISHED"] = "Published";
1427
+ ProductStatusDescription["CANCELLED"] = "Cancelled";
1428
+ ProductStatusDescription["EXPIRED"] = "Expired";
1429
+ ProductStatusDescription["RENEWED"] = "Renewed";
1430
+ ProductStatusDescription["DISCARDED"] = "Discarded";
1431
+ })(ProductStatusDescription || (ProductStatusDescription = {}));
1432
+ var CloudLevelUnits;
1433
+ (function (CloudLevelUnits) {
1434
+ CloudLevelUnits["FT"] = "ft";
1435
+ CloudLevelUnits["M"] = "m";
1436
+ })(CloudLevelUnits || (CloudLevelUnits = {}));
1437
+ var LevelUnits;
1438
+ (function (LevelUnits) {
1439
+ LevelUnits["FT"] = "ft";
1440
+ LevelUnits["M"] = "m";
1441
+ LevelUnits["FL"] = "FL";
1442
+ })(LevelUnits || (LevelUnits = {}));
1443
+ var Direction;
1444
+ (function (Direction) {
1445
+ Direction["N"] = "N";
1446
+ Direction["NNE"] = "NNE";
1447
+ Direction["NE"] = "NE";
1448
+ Direction["ENE"] = "ENE";
1449
+ Direction["E"] = "E";
1450
+ Direction["ESE"] = "ESE";
1451
+ Direction["SE"] = "SE";
1452
+ Direction["SSE"] = "SSE";
1453
+ Direction["S"] = "S";
1454
+ Direction["SSW"] = "SSW";
1455
+ Direction["SW"] = "SW";
1456
+ Direction["WSW"] = "WSW";
1457
+ Direction["W"] = "W";
1458
+ Direction["WNW"] = "WNW";
1459
+ Direction["NW"] = "NW";
1460
+ Direction["NNW"] = "NNW";
1461
+ })(Direction || (Direction = {}));
1462
+ var isInstanceOfSigmet = function isInstanceOfSigmet(obj) {
1463
+ return 'phenomenon' in obj;
1464
+ };
1465
+ var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
1466
+ return 'cancelsSigmetSequenceId' in obj;
1467
+ };
1468
+ var isInstanceOfAirmet = function isInstanceOfAirmet(obj) {
1469
+ return 'phenomenon' in obj;
1470
+ };
1471
+ var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
1472
+ return 'cancelsAirmetSequenceId' in obj;
1473
+ };
1474
+ var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
1475
+ return 'phenomenon' in obj;
1476
+ };
1477
+ var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
1478
+ return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
1479
+ };
1480
+ var StartOrEndDrawing;
1481
+ (function (StartOrEndDrawing) {
1482
+ StartOrEndDrawing["start"] = "start";
1483
+ StartOrEndDrawing["end"] = "end";
1484
+ })(StartOrEndDrawing || (StartOrEndDrawing = {}));
1485
+
1486
+ var location_indicator_mwo$1 = "EHDB";
1270
1487
  var fir_areas$1 = {
1271
1488
  EHAA: {
1272
1489
  fir_name: "AMSTERDAM FIR",
@@ -1413,28 +1630,43 @@ var fir_areas$1 = {
1413
1630
  },
1414
1631
  location_indicator_atsr: "EHAA",
1415
1632
  location_indicator_atsu: "EHAA",
1416
- area_preset: "NL_FIR",
1417
1633
  max_hours_of_validity: 4,
1418
1634
  hours_before_validity: 4,
1419
- tc_max_hours_of_validity: 6,
1420
- tc_hours_before_validity: 12,
1421
- va_max_hours_of_validity: 6,
1422
- va_hours_before_validity: 12,
1423
- adjacent_firs: [
1424
- "EKDK",
1425
- "EDWW",
1426
- "EDGG",
1427
- "EBBU",
1428
- "EGTT",
1429
- "EGPX"
1430
- ],
1635
+ cloud_lower_level_min: {
1636
+ FT: 100
1637
+ },
1638
+ cloud_lower_level_max: {
1639
+ FT: 900
1640
+ },
1641
+ cloud_level_min: {
1642
+ FT: 100
1643
+ },
1644
+ cloud_level_max: {
1645
+ FT: 9900
1646
+ },
1647
+ cloud_level_rounding_ft: 100,
1648
+ cloud_level_rounding_m_below: 30,
1649
+ cloud_level_rounding_m_above: 300,
1650
+ wind_direction_rounding: 10,
1651
+ wind_speed_min: {
1652
+ KT: 31,
1653
+ MPS: 0
1654
+ },
1655
+ wind_speed_max: {
1656
+ KT: 199,
1657
+ MPS: 99
1658
+ },
1659
+ visibility_max: 4900,
1660
+ visibility_min: 0,
1661
+ visibility_rounding_below: 50,
1662
+ visibility_rounding_above: 100,
1431
1663
  level_min: {
1432
1664
  FT: 500,
1433
1665
  FL: 50
1434
1666
  },
1435
1667
  level_max: {
1436
1668
  FT: 4500,
1437
- FL: 650
1669
+ FL: 100
1438
1670
  },
1439
1671
  level_rounding_FL: 5,
1440
1672
  level_rounding_FT: 500,
@@ -1452,68 +1684,76 @@ var fir_areas$1 = {
1452
1684
  max_polygon_points: 7,
1453
1685
  phenomenon: [
1454
1686
  {
1455
- code: "EMBD_TS",
1456
- description: "Embedded thunderstorm(s)"
1687
+ code: "SFC_VIS",
1688
+ description: "Surface visibility"
1457
1689
  },
1458
1690
  {
1459
- code: "EMBD_TSGR",
1460
- description: "Embedded thunderstorm(s) with hail"
1691
+ code: "SFC_WIND",
1692
+ description: "Surface wind"
1461
1693
  },
1462
1694
  {
1463
- code: "FRQ_TS",
1464
- description: "Frequent thunderstorm(s)"
1695
+ code: "OVC_CLD",
1696
+ description: "Overcast cloud"
1465
1697
  },
1466
1698
  {
1467
- code: "FRQ_TSGR",
1468
- description: "Frequent thunderstorm(s) with hail"
1699
+ code: "BKN_CLD",
1700
+ description: "Broken cloud"
1469
1701
  },
1470
1702
  {
1471
- code: "HVY_DS",
1472
- description: "Heavy duststorm"
1703
+ code: "ISOL_CB",
1704
+ description: "Isolated cumulonimbus cloud"
1473
1705
  },
1474
1706
  {
1475
- code: "HVY_SS",
1476
- description: "Heavy sandstorm"
1707
+ code: "OCNL_CB",
1708
+ description: "Occasional cumulonimbus cloud"
1477
1709
  },
1478
1710
  {
1479
- code: "OBSC_TS",
1480
- description: "Obscured thunderstorm(s)"
1711
+ code: "FRQ_CB",
1712
+ description: "Frequent cumulonimbus cloud"
1481
1713
  },
1482
1714
  {
1483
- code: "OBSC_TSGR",
1484
- description: "Obscured thunderstorm(s) with hail"
1715
+ code: "ISOL_TS",
1716
+ description: "Isolated thunderstorm(s)"
1485
1717
  },
1486
1718
  {
1487
- code: "RDOACT_CLD",
1488
- description: "Radioactive cloud"
1719
+ code: "OCNL_TS",
1720
+ description: "Occasional thunderstorm(s)"
1489
1721
  },
1490
1722
  {
1491
- code: "SEV_ICE",
1492
- description: "Severe icing"
1723
+ code: "ISOL_TSGR",
1724
+ description: "Isolated thunderstorm(s) with hail"
1493
1725
  },
1494
1726
  {
1495
- code: "SEV_ICE_FRZ_RN",
1496
- description: "Severe icing due to freezing rain"
1727
+ code: "OCNL_TSGR",
1728
+ description: "Occasional thunderstorm(s) with hail"
1497
1729
  },
1498
1730
  {
1499
- code: "SEV_MTW",
1500
- description: "Severe mountain wave"
1731
+ code: "ISOL_TCU",
1732
+ description: "Isolated towering cumulus cloud"
1501
1733
  },
1502
1734
  {
1503
- code: "SEV_TURB",
1504
- description: "Severe turbulence"
1735
+ code: "OCNL_TCU",
1736
+ description: "Occasional towering cumulus cloud"
1505
1737
  },
1506
1738
  {
1507
- code: "SQL_TS",
1508
- description: "Squall line thunderstorm(s)"
1739
+ code: "FRQ_TCU",
1740
+ description: "Frequent towering cumulus cloud"
1509
1741
  },
1510
1742
  {
1511
- code: "SQL_TSGR",
1512
- description: "Squall line thunderstorm(s) with hail"
1743
+ code: "MOD_ICE",
1744
+ description: "Moderate icing"
1513
1745
  },
1514
1746
  {
1515
- code: "VA_CLD",
1516
- description: "Volcanic ash cloud"
1747
+ code: "MOD_MTW",
1748
+ description: "Moderate mountain wave"
1749
+ },
1750
+ {
1751
+ code: "MOD_TURB",
1752
+ description: "Moderate turbulence"
1753
+ },
1754
+ {
1755
+ code: "MT_OBSC",
1756
+ description: "Mountains obscured"
1517
1757
  }
1518
1758
  ],
1519
1759
  units: [
@@ -1529,6 +1769,18 @@ var fir_areas$1 = {
1529
1769
  allowed_units: [
1530
1770
  "KT"
1531
1771
  ]
1772
+ },
1773
+ {
1774
+ unit_type: "surfacewind_unit",
1775
+ allowed_units: [
1776
+ "KT"
1777
+ ]
1778
+ },
1779
+ {
1780
+ unit_type: "cloud_level_unit",
1781
+ allowed_units: [
1782
+ "FT"
1783
+ ]
1532
1784
  }
1533
1785
  ]
1534
1786
  },
@@ -2753,88 +3005,83 @@ var fir_areas$1 = {
2753
3005
  },
2754
3006
  location_indicator_atsr: "EZZZ",
2755
3007
  location_indicator_atsu: "EZZZ",
2756
- area_preset: "NL_FIR",
2757
3008
  max_hours_of_validity: 4,
2758
3009
  hours_before_validity: 4,
2759
- tc_max_hours_of_validity: 6,
2760
- tc_hours_before_validity: 12,
2761
- va_max_hours_of_validity: 6,
2762
- va_hours_before_validity: 12,
2763
- movement_rounding_kt: 20,
2764
- movement_rounding_kmh: 30,
3010
+ movement_rounding_kt: 5,
3011
+ movement_rounding_kmh: 10,
2765
3012
  max_polygon_points: 20,
2766
- adjacent_firs: [
2767
- "EKDK",
2768
- "EDWW",
2769
- "EDGG",
2770
- "EBBU",
2771
- "EGTT",
2772
- "EGPX"
2773
- ],
2774
3013
  phenomenon: [
2775
3014
  {
2776
- code: "EMBD_TS",
2777
- description: "Embedded thunderstorm(s)"
3015
+ code: "SFC_VIS",
3016
+ description: "Surface visibility"
2778
3017
  },
2779
3018
  {
2780
- code: "EMBD_TSGR",
2781
- description: "Embedded thunderstorm(s) with hail"
3019
+ code: "SFC_WIND",
3020
+ description: "Surface wind"
2782
3021
  },
2783
3022
  {
2784
- code: "FRQ_TS",
2785
- description: "Frequent thunderstorm(s)"
3023
+ code: "OVC_CLD",
3024
+ description: "Overcast cloud"
2786
3025
  },
2787
3026
  {
2788
- code: "FRQ_TSGR",
2789
- description: "Frequent thunderstorm(s) with hail"
3027
+ code: "BKN_CLD",
3028
+ description: "Broken cloud"
2790
3029
  },
2791
3030
  {
2792
- code: "HVY_DS",
2793
- description: "Heavy duststorm"
3031
+ code: "ISOL_CB",
3032
+ description: "Isolated cumulonimbus cloud"
2794
3033
  },
2795
3034
  {
2796
- code: "HVY_SS",
2797
- description: "Heavy sandstorm"
3035
+ code: "OCNL_CB",
3036
+ description: "Occasional cumulonimbus cloud"
2798
3037
  },
2799
3038
  {
2800
- code: "OBSC_TS",
2801
- description: "Obscured thunderstorm(s)"
3039
+ code: "FRQ_CB",
3040
+ description: "Frequent cumulonimbus cloud"
2802
3041
  },
2803
3042
  {
2804
- code: "OBSC_TSGR",
2805
- description: "Obscured thunderstorm(s) with hail"
3043
+ code: "ISOL_TS",
3044
+ description: "Isolated thunderstorm(s)"
2806
3045
  },
2807
3046
  {
2808
- code: "RDOACT_CLD",
2809
- description: "Radioactive cloud"
3047
+ code: "OCNL_TS",
3048
+ description: "Occasional thunderstorm(s)"
2810
3049
  },
2811
3050
  {
2812
- code: "SEV_ICE",
2813
- description: "Severe icing"
3051
+ code: "ISOL_TSGR",
3052
+ description: "Isolated thunderstorm(s) with hail"
2814
3053
  },
2815
3054
  {
2816
- code: "SEV_ICE_FRZ_RN",
2817
- description: "Severe icing due to freezing rain"
3055
+ code: "OCNL_TSGR",
3056
+ description: "Occasional thunderstorm(s) with hail"
2818
3057
  },
2819
3058
  {
2820
- code: "SEV_MTW",
2821
- description: "Severe mountain wave"
3059
+ code: "ISOL_TCU",
3060
+ description: "Isolated towering cumulus cloud"
2822
3061
  },
2823
3062
  {
2824
- code: "SEV_TURB",
2825
- description: "Severe turbulence"
3063
+ code: "OCNL_TCU",
3064
+ description: "Occasional towering cumulus cloud"
2826
3065
  },
2827
3066
  {
2828
- code: "SQL_TS",
2829
- description: "Squall line thunderstorm(s)"
3067
+ code: "FRQ_TCU",
3068
+ description: "Frequent towering cumulus cloud"
2830
3069
  },
2831
3070
  {
2832
- code: "SQL_TSGR",
2833
- description: "Squall line thunderstorm(s) with hail"
3071
+ code: "MOD_ICE",
3072
+ description: "Moderate icing"
2834
3073
  },
2835
3074
  {
2836
- code: "VA_CLD",
2837
- description: "Volcanic ash cloud"
3075
+ code: "MOD_MTW",
3076
+ description: "Moderate mountain wave"
3077
+ },
3078
+ {
3079
+ code: "MOD_TURB",
3080
+ description: "Moderate turbulence"
3081
+ },
3082
+ {
3083
+ code: "MT_OBSC",
3084
+ description: "Mountains obscured"
2838
3085
  }
2839
3086
  ],
2840
3087
  units: [
@@ -2851,12 +3098,24 @@ var fir_areas$1 = {
2851
3098
  "KT",
2852
3099
  "KMH"
2853
3100
  ]
3101
+ },
3102
+ {
3103
+ unit_type: "surfacewind_unit",
3104
+ allowed_units: [
3105
+ "KT"
3106
+ ]
3107
+ },
3108
+ {
3109
+ unit_type: "cloud_level_unit",
3110
+ allowed_units: [
3111
+ "FT"
3112
+ ]
2854
3113
  }
2855
3114
  ]
2856
3115
  }
2857
3116
  };
2858
3117
  var valid_from_delay_minutes$1 = 30;
2859
- var default_validity_minutes$1 = 180;
3118
+ var default_validity_minutes$1 = 60;
2860
3119
  var active_firs$1 = [
2861
3120
  "EHAA",
2862
3121
  "EZZZ"
@@ -2864,13 +3123,13 @@ var active_firs$1 = [
2864
3123
  var mapPreset$1 = {
2865
3124
  layers: [
2866
3125
  {
2867
- id: "baseLayer-sigmet",
3126
+ id: "baseLayer-airmet",
2868
3127
  name: "WorldMap_Light_Grey_Canvas",
2869
3128
  type: "twms",
2870
3129
  layerType: "baseLayer"
2871
3130
  },
2872
3131
  {
2873
- id: "countryborder-sigmet",
3132
+ id: "countryborder-airmet",
2874
3133
  name: "countryborders",
2875
3134
  layerType: "overLayer",
2876
3135
  format: "image/png",
@@ -2878,7 +3137,7 @@ var mapPreset$1 = {
2878
3137
  service: "https://geoservices.knmi.nl/wms?DATASET=baselayers&"
2879
3138
  },
2880
3139
  {
2881
- id: "northseastations-sigmet",
3140
+ id: "northseastations-airmet",
2882
3141
  name: "northseastations",
2883
3142
  layerType: "overLayer",
2884
3143
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -2886,7 +3145,7 @@ var mapPreset$1 = {
2886
3145
  enabled: true
2887
3146
  },
2888
3147
  {
2889
- id: "airports-sigmet",
3148
+ id: "airports-airmet",
2890
3149
  name: "airports",
2891
3150
  layerType: "overLayer",
2892
3151
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -2904,7 +3163,7 @@ var mapPreset$1 = {
2904
3163
  srs: "EPSG:3857"
2905
3164
  }
2906
3165
  };
2907
- var sigmetDefaultConfig = {
3166
+ var airmetDefaultConfig = {
2908
3167
  location_indicator_mwo: location_indicator_mwo$1,
2909
3168
  fir_areas: fir_areas$1,
2910
3169
  valid_from_delay_minutes: valid_from_delay_minutes$1,
@@ -3060,43 +3319,28 @@ var fir_areas = {
3060
3319
  },
3061
3320
  location_indicator_atsr: "EHAA",
3062
3321
  location_indicator_atsu: "EHAA",
3322
+ area_preset: "NL_FIR",
3063
3323
  max_hours_of_validity: 4,
3064
3324
  hours_before_validity: 4,
3065
- cloud_lower_level_min: {
3066
- FT: 100
3067
- },
3068
- cloud_lower_level_max: {
3069
- FT: 900
3070
- },
3071
- cloud_level_min: {
3072
- FT: 100
3073
- },
3074
- cloud_level_max: {
3075
- FT: 9900
3076
- },
3077
- cloud_level_rounding_ft: 100,
3078
- cloud_level_rounding_m_below: 30,
3079
- cloud_level_rounding_m_above: 300,
3080
- wind_direction_rounding: 10,
3081
- wind_speed_min: {
3082
- KT: 31,
3083
- MPS: 0
3084
- },
3085
- wind_speed_max: {
3086
- KT: 199,
3087
- MPS: 99
3088
- },
3089
- visibility_max: 4900,
3090
- visibility_min: 0,
3091
- visibility_rounding_below: 50,
3092
- visibility_rounding_above: 100,
3325
+ tc_max_hours_of_validity: 6,
3326
+ tc_hours_before_validity: 12,
3327
+ va_max_hours_of_validity: 6,
3328
+ va_hours_before_validity: 12,
3329
+ adjacent_firs: [
3330
+ "EKDK",
3331
+ "EDWW",
3332
+ "EDGG",
3333
+ "EBBU",
3334
+ "EGTT",
3335
+ "EGPX"
3336
+ ],
3093
3337
  level_min: {
3094
3338
  FT: 500,
3095
3339
  FL: 50
3096
3340
  },
3097
3341
  level_max: {
3098
3342
  FT: 4500,
3099
- FL: 100
3343
+ FL: 650
3100
3344
  },
3101
3345
  level_rounding_FL: 5,
3102
3346
  level_rounding_FT: 500,
@@ -3114,76 +3358,68 @@ var fir_areas = {
3114
3358
  max_polygon_points: 7,
3115
3359
  phenomenon: [
3116
3360
  {
3117
- code: "SFC_VIS",
3118
- description: "Surface visibility"
3119
- },
3120
- {
3121
- code: "SFC_WIND",
3122
- description: "Surface wind"
3123
- },
3124
- {
3125
- code: "OVC_CLD",
3126
- description: "Overcast cloud"
3361
+ code: "EMBD_TS",
3362
+ description: "Embedded thunderstorm(s)"
3127
3363
  },
3128
3364
  {
3129
- code: "BKN_CLD",
3130
- description: "Broken cloud"
3365
+ code: "EMBD_TSGR",
3366
+ description: "Embedded thunderstorm(s) with hail"
3131
3367
  },
3132
3368
  {
3133
- code: "ISOL_CB",
3134
- description: "Isolated cumulonimbus cloud"
3369
+ code: "FRQ_TS",
3370
+ description: "Frequent thunderstorm(s)"
3135
3371
  },
3136
3372
  {
3137
- code: "OCNL_CB",
3138
- description: "Occasional cumulonimbus cloud"
3373
+ code: "FRQ_TSGR",
3374
+ description: "Frequent thunderstorm(s) with hail"
3139
3375
  },
3140
3376
  {
3141
- code: "FRQ_CB",
3142
- description: "Frequent cumulonimbus cloud"
3377
+ code: "HVY_DS",
3378
+ description: "Heavy duststorm"
3143
3379
  },
3144
3380
  {
3145
- code: "ISOL_TS",
3146
- description: "Isolated thunderstorm(s)"
3381
+ code: "HVY_SS",
3382
+ description: "Heavy sandstorm"
3147
3383
  },
3148
3384
  {
3149
- code: "OCNL_TS",
3150
- description: "Occasional thunderstorm(s)"
3385
+ code: "OBSC_TS",
3386
+ description: "Obscured thunderstorm(s)"
3151
3387
  },
3152
3388
  {
3153
- code: "ISOL_TSGR",
3154
- description: "Isolated thunderstorm(s) with hail"
3389
+ code: "OBSC_TSGR",
3390
+ description: "Obscured thunderstorm(s) with hail"
3155
3391
  },
3156
3392
  {
3157
- code: "OCNL_TSGR",
3158
- description: "Occasional thunderstorm(s) with hail"
3393
+ code: "RDOACT_CLD",
3394
+ description: "Radioactive cloud"
3159
3395
  },
3160
3396
  {
3161
- code: "ISOL_TCU",
3162
- description: "Isolated towering cumulus cloud"
3397
+ code: "SEV_ICE",
3398
+ description: "Severe icing"
3163
3399
  },
3164
3400
  {
3165
- code: "OCNL_TCU",
3166
- description: "Occasional towering cumulus cloud"
3401
+ code: "SEV_ICE_FRZ_RN",
3402
+ description: "Severe icing due to freezing rain"
3167
3403
  },
3168
3404
  {
3169
- code: "FRQ_TCU",
3170
- description: "Frequent towering cumulus cloud"
3405
+ code: "SEV_MTW",
3406
+ description: "Severe mountain wave"
3171
3407
  },
3172
3408
  {
3173
- code: "MOD_ICE",
3174
- description: "Moderate icing"
3409
+ code: "SEV_TURB",
3410
+ description: "Severe turbulence"
3175
3411
  },
3176
3412
  {
3177
- code: "MOD_MTW",
3178
- description: "Moderate mountain wave"
3413
+ code: "SQL_TS",
3414
+ description: "Squall line thunderstorm(s)"
3179
3415
  },
3180
3416
  {
3181
- code: "MOD_TURB",
3182
- description: "Moderate turbulence"
3417
+ code: "SQL_TSGR",
3418
+ description: "Squall line thunderstorm(s) with hail"
3183
3419
  },
3184
3420
  {
3185
- code: "MT_OBSC",
3186
- description: "Mountains obscured"
3421
+ code: "VA_CLD",
3422
+ description: "Volcanic ash cloud"
3187
3423
  }
3188
3424
  ],
3189
3425
  units: [
@@ -3199,18 +3435,6 @@ var fir_areas = {
3199
3435
  allowed_units: [
3200
3436
  "KT"
3201
3437
  ]
3202
- },
3203
- {
3204
- unit_type: "surfacewind_unit",
3205
- allowed_units: [
3206
- "KT"
3207
- ]
3208
- },
3209
- {
3210
- unit_type: "cloud_level_unit",
3211
- allowed_units: [
3212
- "FT"
3213
- ]
3214
3438
  }
3215
3439
  ]
3216
3440
  },
@@ -4435,83 +4659,88 @@ var fir_areas = {
4435
4659
  },
4436
4660
  location_indicator_atsr: "EZZZ",
4437
4661
  location_indicator_atsu: "EZZZ",
4662
+ area_preset: "NL_FIR",
4438
4663
  max_hours_of_validity: 4,
4439
4664
  hours_before_validity: 4,
4440
- movement_rounding_kt: 5,
4441
- movement_rounding_kmh: 10,
4665
+ tc_max_hours_of_validity: 6,
4666
+ tc_hours_before_validity: 12,
4667
+ va_max_hours_of_validity: 6,
4668
+ va_hours_before_validity: 12,
4669
+ movement_rounding_kt: 20,
4670
+ movement_rounding_kmh: 30,
4442
4671
  max_polygon_points: 20,
4672
+ adjacent_firs: [
4673
+ "EKDK",
4674
+ "EDWW",
4675
+ "EDGG",
4676
+ "EBBU",
4677
+ "EGTT",
4678
+ "EGPX"
4679
+ ],
4443
4680
  phenomenon: [
4444
4681
  {
4445
- code: "SFC_VIS",
4446
- description: "Surface visibility"
4447
- },
4448
- {
4449
- code: "SFC_WIND",
4450
- description: "Surface wind"
4451
- },
4452
- {
4453
- code: "OVC_CLD",
4454
- description: "Overcast cloud"
4682
+ code: "EMBD_TS",
4683
+ description: "Embedded thunderstorm(s)"
4455
4684
  },
4456
4685
  {
4457
- code: "BKN_CLD",
4458
- description: "Broken cloud"
4686
+ code: "EMBD_TSGR",
4687
+ description: "Embedded thunderstorm(s) with hail"
4459
4688
  },
4460
4689
  {
4461
- code: "ISOL_CB",
4462
- description: "Isolated cumulonimbus cloud"
4690
+ code: "FRQ_TS",
4691
+ description: "Frequent thunderstorm(s)"
4463
4692
  },
4464
4693
  {
4465
- code: "OCNL_CB",
4466
- description: "Occasional cumulonimbus cloud"
4694
+ code: "FRQ_TSGR",
4695
+ description: "Frequent thunderstorm(s) with hail"
4467
4696
  },
4468
4697
  {
4469
- code: "FRQ_CB",
4470
- description: "Frequent cumulonimbus cloud"
4698
+ code: "HVY_DS",
4699
+ description: "Heavy duststorm"
4471
4700
  },
4472
4701
  {
4473
- code: "ISOL_TS",
4474
- description: "Isolated thunderstorm(s)"
4702
+ code: "HVY_SS",
4703
+ description: "Heavy sandstorm"
4475
4704
  },
4476
4705
  {
4477
- code: "OCNL_TS",
4478
- description: "Occasional thunderstorm(s)"
4706
+ code: "OBSC_TS",
4707
+ description: "Obscured thunderstorm(s)"
4479
4708
  },
4480
4709
  {
4481
- code: "ISOL_TSGR",
4482
- description: "Isolated thunderstorm(s) with hail"
4710
+ code: "OBSC_TSGR",
4711
+ description: "Obscured thunderstorm(s) with hail"
4483
4712
  },
4484
4713
  {
4485
- code: "OCNL_TSGR",
4486
- description: "Occasional thunderstorm(s) with hail"
4714
+ code: "RDOACT_CLD",
4715
+ description: "Radioactive cloud"
4487
4716
  },
4488
4717
  {
4489
- code: "ISOL_TCU",
4490
- description: "Isolated towering cumulus cloud"
4718
+ code: "SEV_ICE",
4719
+ description: "Severe icing"
4491
4720
  },
4492
4721
  {
4493
- code: "OCNL_TCU",
4494
- description: "Occasional towering cumulus cloud"
4722
+ code: "SEV_ICE_FRZ_RN",
4723
+ description: "Severe icing due to freezing rain"
4495
4724
  },
4496
4725
  {
4497
- code: "FRQ_TCU",
4498
- description: "Frequent towering cumulus cloud"
4726
+ code: "SEV_MTW",
4727
+ description: "Severe mountain wave"
4499
4728
  },
4500
4729
  {
4501
- code: "MOD_ICE",
4502
- description: "Moderate icing"
4730
+ code: "SEV_TURB",
4731
+ description: "Severe turbulence"
4503
4732
  },
4504
4733
  {
4505
- code: "MOD_MTW",
4506
- description: "Moderate mountain wave"
4734
+ code: "SQL_TS",
4735
+ description: "Squall line thunderstorm(s)"
4507
4736
  },
4508
4737
  {
4509
- code: "MOD_TURB",
4510
- description: "Moderate turbulence"
4738
+ code: "SQL_TSGR",
4739
+ description: "Squall line thunderstorm(s) with hail"
4511
4740
  },
4512
4741
  {
4513
- code: "MT_OBSC",
4514
- description: "Mountains obscured"
4742
+ code: "VA_CLD",
4743
+ description: "Volcanic ash cloud"
4515
4744
  }
4516
4745
  ],
4517
4746
  units: [
@@ -4528,24 +4757,12 @@ var fir_areas = {
4528
4757
  "KT",
4529
4758
  "KMH"
4530
4759
  ]
4531
- },
4532
- {
4533
- unit_type: "surfacewind_unit",
4534
- allowed_units: [
4535
- "KT"
4536
- ]
4537
- },
4538
- {
4539
- unit_type: "cloud_level_unit",
4540
- allowed_units: [
4541
- "FT"
4542
- ]
4543
4760
  }
4544
4761
  ]
4545
4762
  }
4546
4763
  };
4547
4764
  var valid_from_delay_minutes = 30;
4548
- var default_validity_minutes = 60;
4765
+ var default_validity_minutes = 180;
4549
4766
  var active_firs = [
4550
4767
  "EHAA",
4551
4768
  "EZZZ"
@@ -4553,13 +4770,13 @@ var active_firs = [
4553
4770
  var mapPreset = {
4554
4771
  layers: [
4555
4772
  {
4556
- id: "baseLayer-airmet",
4773
+ id: "baseLayer-sigmet",
4557
4774
  name: "WorldMap_Light_Grey_Canvas",
4558
4775
  type: "twms",
4559
4776
  layerType: "baseLayer"
4560
4777
  },
4561
4778
  {
4562
- id: "countryborder-airmet",
4779
+ id: "countryborder-sigmet",
4563
4780
  name: "countryborders",
4564
4781
  layerType: "overLayer",
4565
4782
  format: "image/png",
@@ -4567,7 +4784,7 @@ var mapPreset = {
4567
4784
  service: "https://geoservices.knmi.nl/wms?DATASET=baselayers&"
4568
4785
  },
4569
4786
  {
4570
- id: "northseastations-airmet",
4787
+ id: "northseastations-sigmet",
4571
4788
  name: "northseastations",
4572
4789
  layerType: "overLayer",
4573
4790
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -4575,7 +4792,7 @@ var mapPreset = {
4575
4792
  enabled: true
4576
4793
  },
4577
4794
  {
4578
- id: "airports-airmet",
4795
+ id: "airports-sigmet",
4579
4796
  name: "airports",
4580
4797
  layerType: "overLayer",
4581
4798
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -4593,7 +4810,7 @@ var mapPreset = {
4593
4810
  srs: "EPSG:3857"
4594
4811
  }
4595
4812
  };
4596
- var airmetDefaultConfig = {
4813
+ var sigmetDefaultConfig = {
4597
4814
  location_indicator_mwo: location_indicator_mwo,
4598
4815
  fir_areas: fir_areas,
4599
4816
  valid_from_delay_minutes: valid_from_delay_minutes,
@@ -4811,34 +5028,11 @@ var styles$2 = {
4811
5028
  }
4812
5029
  };
4813
5030
 
4814
- var _excluded$1 = ["value", "label", "disabled"];
4815
- // A version of a radio button with label where the label and surrounding white space is not clickable
4816
- var RadioButtonAndLabel = function RadioButtonAndLabel(props) {
4817
- var value = props.value,
4818
- label = props.label,
4819
- _props$disabled = props.disabled,
4820
- disabled = _props$disabled === void 0 ? true : _props$disabled,
4821
- restProps = _objectWithoutPropertiesLoose(props, _excluded$1);
4822
- return jsx(FormControlLabel, Object.assign({
4823
- style: {
4824
- pointerEvents: 'none'
4825
- },
4826
- value: value,
4827
- control: jsx(Radio, {
4828
- style: {
4829
- pointerEvents: 'auto'
4830
- }
4831
- }),
4832
- label: label,
4833
- disabled: disabled
4834
- }, restProps));
4835
- };
4836
-
4837
- var _excluded = ["title", "children"];
5031
+ var _excluded$1 = ["title", "children"];
4838
5032
  var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4839
5033
  var title = _ref.title,
4840
5034
  children = _ref.children,
4841
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
5035
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
4842
5036
  return jsxs(Grid, Object.assign({
4843
5037
  container: true,
4844
5038
  spacing: 3
@@ -4847,9 +5041,9 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4847
5041
  container: true,
4848
5042
  justifyContent: "flex-end",
4849
5043
  size: 4,
4850
- children: title && jsx(Typography, {
4851
- variant: "subtitle1",
5044
+ children: !!title && jsx(Typography, {
4852
5045
  sx: styles$2.label,
5046
+ variant: "subtitle1",
4853
5047
  children: title
4854
5048
  })
4855
5049
  }), jsx(Grid, {
@@ -4861,6 +5055,29 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4861
5055
  }));
4862
5056
  };
4863
5057
 
5058
+ var _excluded = ["value", "label", "disabled"];
5059
+ // A version of a radio button with label where the label and surrounding white space is not clickable
5060
+ var RadioButtonAndLabel = function RadioButtonAndLabel(props) {
5061
+ var value = props.value,
5062
+ label = props.label,
5063
+ _props$disabled = props.disabled,
5064
+ disabled = _props$disabled === void 0 ? true : _props$disabled,
5065
+ restProps = _objectWithoutPropertiesLoose(props, _excluded);
5066
+ return jsx(FormControlLabel, Object.assign({
5067
+ control: jsx(Radio, {
5068
+ style: {
5069
+ pointerEvents: 'auto'
5070
+ }
5071
+ }),
5072
+ disabled: disabled,
5073
+ label: label,
5074
+ style: {
5075
+ pointerEvents: 'none'
5076
+ },
5077
+ value: value
5078
+ }, restProps));
5079
+ };
5080
+
4864
5081
  var Change = function Change(_ref) {
4865
5082
  var isDisabled = _ref.isDisabled,
4866
5083
  isReadOnly = _ref.isReadOnly;
@@ -4875,7 +5092,6 @@ var Change = function Change(_ref) {
4875
5092
  };
4876
5093
  var fieldsDisabled = isDisabled || isShortTest();
4877
5094
  return jsx(ProductFormFieldLayout, {
4878
- title: t('change'),
4879
5095
  sx: {
4880
5096
  '.MuiButtonBase-root.MuiRadio-root': {
4881
5097
  padding: '6px',
@@ -4886,30 +5102,31 @@ var Change = function Change(_ref) {
4886
5102
  },
4887
5103
  marginTop: -1
4888
5104
  },
5105
+ title: t('change'),
4889
5106
  children: jsxs(ReactHookFormRadioGroup, {
5107
+ disabled: fieldsDisabled,
5108
+ isReadOnly: isReadOnly,
4890
5109
  name: "change",
4891
5110
  rules: {
4892
5111
  validate: {
4893
5112
  isRequired: isRequired
4894
5113
  }
4895
5114
  },
4896
- disabled: fieldsDisabled,
4897
- isReadOnly: isReadOnly,
4898
5115
  children: [jsx(RadioButtonAndLabel, {
4899
- value: "WKN",
4900
- label: t('weakening'),
5116
+ "data-testid": "change-WKN",
4901
5117
  disabled: fieldsDisabled,
4902
- "data-testid": "change-WKN"
5118
+ label: t('weakening'),
5119
+ value: "WKN"
4903
5120
  }), jsx(RadioButtonAndLabel, {
4904
- value: "NC",
4905
- label: t('no-change'),
5121
+ "data-testid": "change-NC",
4906
5122
  disabled: fieldsDisabled,
4907
- "data-testid": "change-NC"
5123
+ label: t('no-change'),
5124
+ value: "NC"
4908
5125
  }), jsx(RadioButtonAndLabel, {
4909
- value: "INTSF",
4910
- label: t('intensifying'),
5126
+ "data-testid": "change-INTSF",
4911
5127
  disabled: fieldsDisabled,
4912
- "data-testid": "change-INTSF"
5128
+ label: t('intensifying'),
5129
+ value: "INTSF"
4913
5130
  })]
4914
5131
  })
4915
5132
  });
@@ -5005,28 +5222,28 @@ var getMinCloudLevelValue = function getMinCloudLevelValue(unit, selectedFIR, pr
5005
5222
  var _getActiveFIRArea2 = getActiveFIRArea(selectedFIR, productConfig),
5006
5223
  cloud_level_min = _getActiveFIRArea2.cloud_level_min;
5007
5224
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5008
- return cloud_level_min !== undefined && cloud_level_min[unit] ? cloud_level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5225
+ return cloud_level_min != null && cloud_level_min[unit] ? cloud_level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5009
5226
  };
5010
5227
  var getMinCloudLowerLevelValue = function getMinCloudLowerLevelValue(unit, selectedFIR, productConfig) {
5011
5228
  // Use first FIR in list if no FIR selected
5012
5229
  var _getActiveFIRArea3 = getActiveFIRArea(selectedFIR, productConfig),
5013
5230
  cloud_lower_level_min = _getActiveFIRArea3.cloud_lower_level_min;
5014
5231
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5015
- return cloud_lower_level_min !== undefined && cloud_lower_level_min[unit] ? cloud_lower_level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5232
+ return cloud_lower_level_min != null && cloud_lower_level_min[unit] ? cloud_lower_level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5016
5233
  };
5017
5234
  var getMaxCloudLevelValue = function getMaxCloudLevelValue(unit, selectedFIR, productConfig) {
5018
5235
  // Use first FIR in list if no FIR selected
5019
5236
  var _getActiveFIRArea4 = getActiveFIRArea(selectedFIR, productConfig),
5020
5237
  cloud_level_max = _getActiveFIRArea4.cloud_level_max;
5021
5238
  // Return max value for selected unit - if not present in list, return null
5022
- return cloud_level_max !== undefined && cloud_level_max[unit] ? cloud_level_max[unit] : null;
5239
+ return cloud_level_max != null && cloud_level_max[unit] ? cloud_level_max[unit] : null;
5023
5240
  };
5024
5241
  var getMaxCloudLowerLevelValue = function getMaxCloudLowerLevelValue(unit, selectedFIR, productConfig) {
5025
5242
  // Use first FIR in list if no FIR selected
5026
5243
  var _getActiveFIRArea5 = getActiveFIRArea(selectedFIR, productConfig),
5027
5244
  cloud_lower_level_max = _getActiveFIRArea5.cloud_lower_level_max;
5028
5245
  // Return max value for selected unit - if not present in list, return null
5029
- return cloud_lower_level_max !== undefined && cloud_lower_level_max[unit] ? cloud_lower_level_max[unit] : null;
5246
+ return cloud_lower_level_max != null && cloud_lower_level_max[unit] ? cloud_lower_level_max[unit] : null;
5030
5247
  };
5031
5248
  // Retrieve max value from config - if not set, there is no max value for this unit so we return null
5032
5249
  var getMaxLevelValue = function getMaxLevelValue(unit, selectedFIR, productConfig) {
@@ -5034,7 +5251,7 @@ var getMaxLevelValue = function getMaxLevelValue(unit, selectedFIR, productConfi
5034
5251
  var _getActiveFIRArea6 = getActiveFIRArea(selectedFIR, productConfig),
5035
5252
  level_max = _getActiveFIRArea6.level_max;
5036
5253
  // Return max value for selected unit - if not present in list, return null
5037
- return level_max !== undefined && level_max[unit] ? level_max[unit] : null;
5254
+ return level_max != null && level_max[unit] ? level_max[unit] : null;
5038
5255
  };
5039
5256
  // Retrieve min value from config - if not set, return zero
5040
5257
  var getMinLevelValue = function getMinLevelValue(unit, selectedFIR, productConfig) {
@@ -5042,14 +5259,14 @@ var getMinLevelValue = function getMinLevelValue(unit, selectedFIR, productConfi
5042
5259
  var _getActiveFIRArea7 = getActiveFIRArea(selectedFIR, productConfig),
5043
5260
  level_min = _getActiveFIRArea7.level_min;
5044
5261
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5045
- return level_min !== undefined && level_min[unit] ? level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5262
+ return level_min != null && level_min[unit] ? level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5046
5263
  };
5047
5264
  var getMaxWindSpeedValue = function getMaxWindSpeedValue(unit, selectedFIR, productConfig) {
5048
5265
  // Use first FIR in list if no FIR selected
5049
5266
  var _getActiveFIRArea8 = getActiveFIRArea(selectedFIR, productConfig),
5050
5267
  wind_speed_max = _getActiveFIRArea8.wind_speed_max;
5051
5268
  // Return min value for selected unit - if not present in list, return null
5052
- return wind_speed_max !== undefined && wind_speed_max[unit] ? wind_speed_max[unit] : null;
5269
+ return wind_speed_max != null && wind_speed_max[unit] ? wind_speed_max[unit] : null;
5053
5270
  };
5054
5271
  var DEFAULT_MIN_WIND_SPEED = 0;
5055
5272
  var getMinWindSpeedValue = function getMinWindSpeedValue(unit, selectedFIR, productConfig) {
@@ -5057,7 +5274,7 @@ var getMinWindSpeedValue = function getMinWindSpeedValue(unit, selectedFIR, prod
5057
5274
  var _getActiveFIRArea9 = getActiveFIRArea(selectedFIR, productConfig),
5058
5275
  wind_speed_min = _getActiveFIRArea9.wind_speed_min;
5059
5276
  // Return min value for selected unit - if not present in list, return 0 as we have negative wind speed
5060
- return wind_speed_min !== undefined && wind_speed_min[unit] ? wind_speed_min[unit] : DEFAULT_MIN_WIND_SPEED;
5277
+ return wind_speed_min != null && wind_speed_min[unit] ? wind_speed_min[unit] : DEFAULT_MIN_WIND_SPEED;
5061
5278
  };
5062
5279
  var getMaxVisibilityValue = function getMaxVisibilityValue(selectedFIR, productConfig) {
5063
5280
  // Use first FIR in list if no FIR selected
@@ -5355,7 +5572,7 @@ var getProductIssueDate = function getProductIssueDate(t, initialProduct, initia
5355
5572
  if (initialProduct !== null && (initialProduct.status === 'PUBLISHED' || initialProduct.status === 'EXPIRED') && initialProduct.issueDate) {
5356
5573
  return dateUtils.dateToString(dateUtils.utc(initialProduct.issueDate), dateUtils.DATE_FORMAT_DATEPICKER) + " UTC";
5357
5574
  }
5358
- if (initialCancelProduct !== null && initialCancelProduct.issueDate) {
5575
+ if (initialCancelProduct != null && initialCancelProduct.issueDate) {
5359
5576
  return dateUtils.dateToString(dateUtils.utc(initialCancelProduct.issueDate), dateUtils.DATE_FORMAT_DATEPICKER) + " UTC";
5360
5577
  }
5361
5578
  return t('not-published');
@@ -5399,11 +5616,11 @@ var getFir = function getFir(productConfig, firName) {
5399
5616
  */
5400
5617
  var isFir = function isFir(geojson) {
5401
5618
  var _geojson$features$;
5402
- if (!geojson || !geojson.features || geojson.features.length === 0) {
5619
+ if (!(geojson != null && geojson.features) || geojson.features.length === 0) {
5403
5620
  return false;
5404
5621
  }
5405
5622
  var selectionType = (_geojson$features$ = geojson.features[0]) == null || (_geojson$features$ = _geojson$features$.properties) == null ? void 0 : _geojson$features$['selectionType'];
5406
- return geojson && geojson.features && geojson.features.length > 0 && selectionType === firSelectionType;
5623
+ return (geojson == null ? void 0 : geojson.features) && geojson.features.length > 0 && selectionType === firSelectionType;
5407
5624
  };
5408
5625
  var getFieldLabel = function getFieldLabel(t, title, isDisabled, action) {
5409
5626
  if (action === void 0) {
@@ -5421,14 +5638,14 @@ var getMaxMovementSpeedValue = function getMaxMovementSpeedValue(unit, selectedF
5421
5638
  var _getActiveFIRArea10 = getActiveFIRArea(selectedFIR, productConfig),
5422
5639
  movement_max = _getActiveFIRArea10.movement_max;
5423
5640
  // Return max value for selected unit - if not present in list, return null
5424
- return movement_max !== undefined && movement_max[unit] ? movement_max[unit] : null;
5641
+ return movement_max != null && movement_max[unit] ? movement_max[unit] : null;
5425
5642
  };
5426
5643
  var DEFAULT_MIN_MOVEMENT_SPEED = 0;
5427
5644
  var getMinMovementSpeedValue = function getMinMovementSpeedValue(unit, selectedFIR, productConfig) {
5428
5645
  var _getActiveFIRArea11 = getActiveFIRArea(selectedFIR, productConfig),
5429
5646
  movement_min = _getActiveFIRArea11.movement_min;
5430
5647
  // Return min value for selected unit - if not present in list, return DEFAULT_MIN_MOVEMENT_SPEED (zero, no negative speeds)
5431
- return movement_min !== undefined && movement_min[unit] ? movement_min[unit] : DEFAULT_MIN_MOVEMENT_SPEED;
5648
+ return movement_min != null && movement_min[unit] ? movement_min[unit] : DEFAULT_MIN_MOVEMENT_SPEED;
5432
5649
  };
5433
5650
  /** Trigger form validations for given list of field names if field has a value */
5434
5651
  var triggerValidations = function triggerValidations(fieldNames, getValues, trigger) {
@@ -5511,7 +5728,7 @@ var useFormLayers = function useFormLayers(layers) {
5511
5728
  geoJSON: layer.geojson
5512
5729
  };
5513
5730
  }).filter(function (layer) {
5514
- return layer.geoJSON !== undefined;
5731
+ return layer.geoJSON !== undefined && layer.geoJSON !== null;
5515
5732
  });
5516
5733
  var sourcePanelId = useSelector(function (store) {
5517
5734
  return uiSelectors.getSourcePanelId(store, 'publicWarnings');
@@ -5571,16 +5788,16 @@ var DrawTools = function DrawTools(_ref) {
5571
5788
  },
5572
5789
  children: tools.map(function (tool) {
5573
5790
  var radio = jsx(Radio, {
5574
- icon: getToolIcon(tool.selectionType),
5575
- value: true,
5576
- checkedIcon: getToolIcon(tool.selectionType),
5577
5791
  checked: activeTool === tool.drawModeId,
5792
+ checkedIcon: getToolIcon(tool.selectionType),
5793
+ "data-testid": tool.drawModeId,
5578
5794
  disabled: isDisabled,
5795
+ icon: getToolIcon(tool.selectionType),
5579
5796
  onChange: function onChange() {
5580
5797
  onChangeTool(tool);
5581
5798
  },
5582
- "data-testid": tool.drawModeId,
5583
- sx: styles$1.radioInput
5799
+ sx: styles$1.radioInput,
5800
+ value: true
5584
5801
  });
5585
5802
  var title = isDisabled && disabledTooltip ? disabledTooltip : tool.title;
5586
5803
  return jsx(CustomTooltip, {
@@ -5689,7 +5906,7 @@ var Levels = function Levels(_ref) {
5689
5906
  var isTS = isTSPhenomenon(phenomenon);
5690
5907
  var isSigmetTS = productType === 'sigmet' && isTS;
5691
5908
  var prevPhenomenon = usePrevious(phenomenon);
5692
- React__default.useEffect(function () {
5909
+ React.useEffect(function () {
5693
5910
  if (productType !== 'sigmet') {
5694
5911
  return;
5695
5912
  }
@@ -5722,7 +5939,7 @@ var Levels = function Levels(_ref) {
5722
5939
  // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
5723
5940
  var allowedLevelUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'level_unit', LevelUnits);
5724
5941
  var radioactiveCloudLevel = getMaxLevelValue(LevelUnits.FL, getFIRValue(), productConfig);
5725
- React__default.useEffect(function () {
5942
+ React.useEffect(function () {
5726
5943
  if (levelInfoMode !== 'BETW') {
5727
5944
  unregister('lowerLevel');
5728
5945
  }
@@ -5733,21 +5950,16 @@ var Levels = function Levels(_ref) {
5733
5950
  }
5734
5951
  }, [getValues, isRadioactiveCloud, levelInfoMode, radioactiveCloudLevel, setValue, trigger, unregister]);
5735
5952
  return jsx(ProductFormFieldLayout, {
5736
- title: t('levels'),
5737
5953
  sx: Object.assign({}, styles$2.containerItem, {
5738
5954
  '.MuiFormHelperText-root.Mui-error': {
5739
5955
  marginBottom: '-16px'
5740
5956
  }
5741
5957
  }),
5958
+ title: t('levels'),
5742
5959
  children: jsxs(ReactHookFormRadioGroup, {
5743
- name: "levelInfoMode",
5744
- rules: {
5745
- validate: {
5746
- isRequired: isRequired
5747
- }
5748
- },
5749
5960
  disabled: fieldsDisabled,
5750
5961
  isReadOnly: isReadOnly,
5962
+ name: "levelInfoMode",
5751
5963
  onChange: function onChange() {
5752
5964
  // Reset default value for the level value to '' so when it rerenders it uses this empty default value
5753
5965
  setValue('level.unit', 'FL');
@@ -5755,17 +5967,22 @@ var Levels = function Levels(_ref) {
5755
5967
  // Clear out errors for the levels
5756
5968
  clearErrors(['level', 'lowerLevel']);
5757
5969
  },
5970
+ rules: {
5971
+ validate: {
5972
+ isRequired: isRequired
5973
+ }
5974
+ },
5758
5975
  children: [jsx(RadioButtonAndLabel, {
5759
- value: "AT",
5760
- label: t('at'),
5761
5976
  checked: levelInfoMode === 'AT' || levelInfoMode === 'TOPS',
5762
5977
  "data-testid": "levels-AT",
5763
- disabled: fieldsDisabled
5978
+ disabled: fieldsDisabled,
5979
+ label: t('at'),
5980
+ value: "AT"
5764
5981
  }), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? jsxs(Grid, {
5982
+ alignItems: "flex-start",
5765
5983
  container: true,
5766
- spacing: 2,
5767
5984
  justifyItems: "flex-end",
5768
- alignItems: "flex-start",
5985
+ spacing: 2,
5769
5986
  children: [jsx(Grid, {
5770
5987
  size: {
5771
5988
  xs: 12,
@@ -5774,6 +5991,8 @@ var Levels = function Levels(_ref) {
5774
5991
  children: jsx(FormControlLabel, {
5775
5992
  control: jsx(Checkbox, {
5776
5993
  checked: levelInfoMode === 'TOPS',
5994
+ color: "secondary",
5995
+ disabled: isDisabled || isSigmetTS,
5777
5996
  onChange: function onChange() {
5778
5997
  if (isSigmetTS) {
5779
5998
  return;
@@ -5781,9 +6000,7 @@ var Levels = function Levels(_ref) {
5781
6000
  setValue('levelInfoMode', levelInfoMode === 'AT' ? 'TOPS' : 'AT', {
5782
6001
  shouldDirty: true
5783
6002
  });
5784
- },
5785
- color: "secondary",
5786
- disabled: isDisabled || isSigmetTS
6003
+ }
5787
6004
  }),
5788
6005
  "data-testid": "levels-TOPS",
5789
6006
  label: t('levels-tops-label')
@@ -5794,22 +6011,22 @@ var Levels = function Levels(_ref) {
5794
6011
  md: 3
5795
6012
  },
5796
6013
  children: jsx(ReactHookFormSelect, {
5797
- name: "level.unit",
6014
+ defaultValue: 'FL',
6015
+ disabled: isDisabled,
6016
+ isReadOnly: isReadOnly,
5798
6017
  label: t('unit-label'),
6018
+ name: "level.unit",
6019
+ onChange: function onChange() {
6020
+ triggerValidations(['level.value'], getValues, trigger);
6021
+ _onChange();
6022
+ },
5799
6023
  rules: {
5800
6024
  validate: {
5801
6025
  isRequired: isRequired
5802
6026
  }
5803
6027
  },
5804
- sx: styles$2.unit,
5805
6028
  size: "small",
5806
- disabled: isDisabled,
5807
- isReadOnly: isReadOnly,
5808
- defaultValue: 'FL',
5809
- onChange: function onChange() {
5810
- triggerValidations(['level.value'], getValues, trigger);
5811
- _onChange();
5812
- },
6029
+ sx: styles$2.unit,
5813
6030
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
5814
6031
  return jsx(MenuItem, {
5815
6032
  value: key,
@@ -5823,9 +6040,12 @@ var Levels = function Levels(_ref) {
5823
6040
  md: 6
5824
6041
  },
5825
6042
  children: jsx(ReactHookFormNumberField, {
5826
- name: "level.value",
6043
+ autoFocus: true,
5827
6044
  "data-testid": "level.value",
6045
+ disabled: isDisabled,
6046
+ isReadOnly: isReadOnly,
5828
6047
  label: t('level'),
6048
+ name: "level.value",
5829
6049
  rules: {
5830
6050
  validate: {
5831
6051
  isRequired: isRequired,
@@ -5856,18 +6076,15 @@ var Levels = function Levels(_ref) {
5856
6076
  }
5857
6077
  }
5858
6078
  },
5859
- size: "small",
5860
- disabled: isDisabled,
5861
- isReadOnly: isReadOnly,
5862
- autoFocus: true
6079
+ size: "small"
5863
6080
  })
5864
6081
  })]
5865
6082
  }) : null, jsx(RadioButtonAndLabel, {
5866
- value: "BETW",
5867
- label: t('between'),
5868
6083
  checked: levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC',
5869
6084
  "data-testid": "levels-BETW",
5870
- disabled: fieldsDisabled
6085
+ disabled: fieldsDisabled,
6086
+ label: t('between'),
6087
+ value: "BETW"
5871
6088
  }), levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC' ? jsxs(Fragment, {
5872
6089
  children: [jsxs(Grid, {
5873
6090
  container: true,
@@ -5883,8 +6100,15 @@ var Levels = function Levels(_ref) {
5883
6100
  md: 3
5884
6101
  },
5885
6102
  children: jsx(ReactHookFormSelect, {
5886
- name: "level.unit",
6103
+ defaultValue: 'FL',
6104
+ disabled: fieldsDisabled,
6105
+ isReadOnly: isReadOnly,
5887
6106
  label: t('unit-label'),
6107
+ name: "level.unit",
6108
+ onChange: function onChange() {
6109
+ triggerValidations(['level.value', 'lowerLevel.value', 'lowerLevel.unit'], getValues, trigger);
6110
+ _onChange();
6111
+ },
5888
6112
  rules: {
5889
6113
  validate: {
5890
6114
  isRequired: isRequired,
@@ -5898,13 +6122,6 @@ var Levels = function Levels(_ref) {
5898
6122
  },
5899
6123
  size: "small",
5900
6124
  sx: styles$2.unit,
5901
- disabled: fieldsDisabled,
5902
- isReadOnly: isReadOnly,
5903
- defaultValue: 'FL',
5904
- onChange: function onChange() {
5905
- triggerValidations(['level.value', 'lowerLevel.value', 'lowerLevel.unit'], getValues, trigger);
5906
- _onChange();
5907
- },
5908
6125
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
5909
6126
  return jsx(MenuItem, {
5910
6127
  value: key,
@@ -5918,11 +6135,14 @@ var Levels = function Levels(_ref) {
5918
6135
  md: 6
5919
6136
  },
5920
6137
  children: jsx(ReactHookFormNumberField, {
5921
- value: level || '',
5922
- name: "level.value",
6138
+ autoFocus: true,
6139
+ disabled: fieldsDisabled,
6140
+ isReadOnly: isReadOnly,
5923
6141
  label: t('levels-upper-level-label'),
5924
- sx: styles$2.levelField,
5925
- size: "small",
6142
+ name: "level.value",
6143
+ onChange: function onChange() {
6144
+ triggerValidations(['lowerLevel.value'], getValues, trigger);
6145
+ },
5926
6146
  rules: {
5927
6147
  validate: {
5928
6148
  isRequired: isRequired,
@@ -5953,19 +6173,16 @@ var Levels = function Levels(_ref) {
5953
6173
  }
5954
6174
  }
5955
6175
  },
5956
- disabled: fieldsDisabled,
5957
- isReadOnly: isReadOnly,
5958
- onChange: function onChange() {
5959
- triggerValidations(['lowerLevel.value'], getValues, trigger);
5960
- },
5961
- autoFocus: true
6176
+ size: "small",
6177
+ sx: styles$2.levelField,
6178
+ value: level || ''
5962
6179
  })
5963
6180
  })]
5964
6181
  }), jsxs(Grid, {
6182
+ alignItems: "flex-start",
5965
6183
  container: true,
5966
- spacing: 2,
5967
6184
  justifyItems: "flex-end",
5968
- alignItems: "flex-start",
6185
+ spacing: 2,
5969
6186
  children: [jsx(Grid, {
5970
6187
  size: {
5971
6188
  xs: 12,
@@ -5974,15 +6191,15 @@ var Levels = function Levels(_ref) {
5974
6191
  children: jsx(FormControlLabel, {
5975
6192
  control: jsx(Checkbox, {
5976
6193
  checked: levelInfoMode === 'BETW_SFC',
6194
+ color: "secondary",
6195
+ disabled: fieldsDisabled,
6196
+ name: "checkedF",
5977
6197
  onChange: function onChange() {
5978
6198
  getValues('level.unit') && trigger('level.unit');
5979
6199
  setValue('levelInfoMode', getValues('levelInfoMode') === 'BETW' ? 'BETW_SFC' : 'BETW', {
5980
6200
  shouldDirty: true
5981
6201
  });
5982
- },
5983
- name: "checkedF",
5984
- color: "secondary",
5985
- disabled: fieldsDisabled
6202
+ }
5986
6203
  }),
5987
6204
  "data-testid": "levels-SFC",
5988
6205
  label: "SFC"
@@ -5994,8 +6211,15 @@ var Levels = function Levels(_ref) {
5994
6211
  md: 3
5995
6212
  },
5996
6213
  children: jsx(ReactHookFormSelect, {
5997
- name: "lowerLevel.unit",
6214
+ defaultValue: getValues('level.unit') || 'FL',
6215
+ disabled: isDisabled,
6216
+ isReadOnly: isReadOnly,
5998
6217
  label: t('unit-label'),
6218
+ name: "lowerLevel.unit",
6219
+ onChange: function onChange() {
6220
+ triggerValidations(['lowerLevel.value', 'level.unit'], getValues, trigger);
6221
+ _onChange();
6222
+ },
5999
6223
  rules: {
6000
6224
  validate: {
6001
6225
  isRequired: isRequired,
@@ -6009,13 +6233,6 @@ var Levels = function Levels(_ref) {
6009
6233
  },
6010
6234
  size: "small",
6011
6235
  sx: styles$2.unit,
6012
- disabled: isDisabled,
6013
- isReadOnly: isReadOnly,
6014
- defaultValue: getValues('level.unit') || 'FL',
6015
- onChange: function onChange() {
6016
- triggerValidations(['lowerLevel.value', 'level.unit'], getValues, trigger);
6017
- _onChange();
6018
- },
6019
6236
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6020
6237
  return jsx(MenuItem, {
6021
6238
  value: key,
@@ -6029,8 +6246,10 @@ var Levels = function Levels(_ref) {
6029
6246
  md: 6
6030
6247
  },
6031
6248
  children: jsx(ReactHookFormNumberField, {
6032
- name: "lowerLevel.value",
6249
+ disabled: isDisabled,
6250
+ isReadOnly: isReadOnly,
6033
6251
  label: t('levels-lower-level-label'),
6252
+ name: "lowerLevel.value",
6034
6253
  rules: {
6035
6254
  validate: {
6036
6255
  isRequired: isRequired,
@@ -6067,24 +6286,22 @@ var Levels = function Levels(_ref) {
6067
6286
  }
6068
6287
  }
6069
6288
  },
6070
- size: "small",
6071
- disabled: isDisabled,
6072
- isReadOnly: isReadOnly
6289
+ size: "small"
6073
6290
  })
6074
6291
  })]
6075
6292
  })]
6076
6293
  })]
6077
6294
  }) : null, jsx(RadioButtonAndLabel, {
6078
- value: "ABV",
6079
- label: t('above'),
6080
- disabled: fieldsDisabled,
6081
6295
  checked: levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV',
6082
- "data-testid": "levels-ABV"
6296
+ "data-testid": "levels-ABV",
6297
+ disabled: fieldsDisabled,
6298
+ label: t('above'),
6299
+ value: "ABV"
6083
6300
  }), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? jsxs(Grid, {
6301
+ alignItems: "flex-start",
6084
6302
  container: true,
6085
- spacing: 2,
6086
6303
  justifyItems: "flex-end",
6087
- alignItems: "flex-start",
6304
+ spacing: 2,
6088
6305
  children: [jsx(Grid, {
6089
6306
  size: {
6090
6307
  xs: 12,
@@ -6093,6 +6310,7 @@ var Levels = function Levels(_ref) {
6093
6310
  children: jsx(FormControlLabel, {
6094
6311
  control: jsx(Checkbox, {
6095
6312
  checked: levelInfoMode === 'TOPS_ABV',
6313
+ disabled: isDisabled || isSigmetTS,
6096
6314
  onChange: function onChange() {
6097
6315
  if (isSigmetTS) {
6098
6316
  return;
@@ -6100,11 +6318,10 @@ var Levels = function Levels(_ref) {
6100
6318
  setValue('levelInfoMode', levelInfoMode === 'ABV' ? 'TOPS_ABV' : 'ABV', {
6101
6319
  shouldDirty: true
6102
6320
  });
6103
- },
6104
- disabled: isDisabled || isSigmetTS
6321
+ }
6105
6322
  }),
6106
- label: t('levels-tops-label'),
6107
- "data-testid": "levels-TOPS_ABV"
6323
+ "data-testid": "levels-TOPS_ABV",
6324
+ label: t('levels-tops-label')
6108
6325
  })
6109
6326
  }), jsx(Grid, {
6110
6327
  size: {
@@ -6112,8 +6329,15 @@ var Levels = function Levels(_ref) {
6112
6329
  md: 3
6113
6330
  },
6114
6331
  children: jsx(ReactHookFormSelect, {
6115
- name: "level.unit",
6332
+ defaultValue: 'FL',
6333
+ disabled: isDisabled,
6334
+ isReadOnly: isReadOnly,
6116
6335
  label: t('unit-label'),
6336
+ name: "level.unit",
6337
+ onChange: function onChange() {
6338
+ triggerValidations(['level.value'], getValues, trigger);
6339
+ _onChange();
6340
+ },
6117
6341
  rules: {
6118
6342
  validate: {
6119
6343
  isRequired: isRequired
@@ -6121,13 +6345,6 @@ var Levels = function Levels(_ref) {
6121
6345
  },
6122
6346
  size: "small",
6123
6347
  sx: styles$2.unit,
6124
- disabled: isDisabled,
6125
- isReadOnly: isReadOnly,
6126
- defaultValue: 'FL',
6127
- onChange: function onChange() {
6128
- triggerValidations(['level.value'], getValues, trigger);
6129
- _onChange();
6130
- },
6131
6348
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6132
6349
  return jsx(MenuItem, {
6133
6350
  value: key,
@@ -6141,8 +6358,11 @@ var Levels = function Levels(_ref) {
6141
6358
  md: 6
6142
6359
  },
6143
6360
  children: jsx(ReactHookFormNumberField, {
6144
- name: "level.value",
6361
+ autoFocus: true,
6362
+ disabled: isDisabled,
6363
+ isReadOnly: isReadOnly,
6145
6364
  label: t('level'),
6365
+ name: "level.value",
6146
6366
  rules: {
6147
6367
  validate: {
6148
6368
  isRequired: isRequired,
@@ -6173,10 +6393,7 @@ var Levels = function Levels(_ref) {
6173
6393
  }
6174
6394
  }
6175
6395
  },
6176
- size: "small",
6177
- disabled: isDisabled,
6178
- isReadOnly: isReadOnly,
6179
- autoFocus: true
6396
+ size: "small"
6180
6397
  })
6181
6398
  })]
6182
6399
  }) : null]
@@ -6214,27 +6431,27 @@ var ObservationForecast = function ObservationForecast(_ref) {
6214
6431
  }
6215
6432
  },
6216
6433
  children: jsxs(ReactHookFormRadioGroup, {
6217
- name: "isObservationOrForecast",
6218
6434
  disabled: fieldsDisabled,
6435
+ isReadOnly: isReadOnly,
6436
+ name: "isObservationOrForecast",
6437
+ onChange: function onChange() {
6438
+ triggerValidations(['observationOrForecastTime'], getValues, trigger);
6439
+ },
6219
6440
  rules: {
6220
6441
  validate: {
6221
6442
  isRequired: isRequired
6222
6443
  }
6223
6444
  },
6224
- onChange: function onChange() {
6225
- triggerValidations(['observationOrForecastTime'], getValues, trigger);
6226
- },
6227
- isReadOnly: isReadOnly,
6228
6445
  children: [(!isReadOnly || watch('isObservationOrForecast') === 'OBS') && jsx(RadioButtonAndLabel, {
6229
- value: "OBS",
6230
- label: t('observation-label'),
6446
+ "data-testid": "isObservationOrForecast-OBS",
6231
6447
  disabled: fieldsDisabled,
6232
- "data-testid": "isObservationOrForecast-OBS"
6448
+ label: t('observation-label'),
6449
+ value: "OBS"
6233
6450
  }), (!isReadOnly || watch('isObservationOrForecast') === 'FCST') && jsx(RadioButtonAndLabel, {
6234
- value: "FCST",
6235
- label: t('forecast-label'),
6451
+ "data-testid": "isObservationOrForecast-FCST",
6236
6452
  disabled: fieldsDisabled,
6237
- "data-testid": "isObservationOrForecast-FCST"
6453
+ label: t('forecast-label'),
6454
+ value: "FCST"
6238
6455
  })]
6239
6456
  })
6240
6457
  });
@@ -6264,10 +6481,17 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
6264
6481
  return !isReadOnly || watch('observationOrForecastTime') !== null ? jsx(ProductFormFieldLayout, {
6265
6482
  title: t('at'),
6266
6483
  children: jsx(ReactHookFormDateTime, {
6267
- disablePast: watch('isObservationOrForecast') === 'FCST',
6484
+ "data-testid": "obs-fcst-time",
6268
6485
  disableFuture: watch('isObservationOrForecast') === 'OBS',
6269
- name: "observationOrForecastTime",
6486
+ disablePast: watch('isObservationOrForecast') === 'FCST',
6487
+ disabled: fieldsDisabled,
6488
+ helperText: helperText,
6489
+ isReadOnly: isReadOnly,
6270
6490
  label: label,
6491
+ name: "observationOrForecastTime",
6492
+ onChange: function onChange() {
6493
+ return _onChange();
6494
+ },
6271
6495
  rules: {
6272
6496
  validate: {
6273
6497
  isValidDate: dateUtils.isValidIsoDateString,
@@ -6279,14 +6503,7 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
6279
6503
  }
6280
6504
  }
6281
6505
  },
6282
- disabled: fieldsDisabled,
6283
- isReadOnly: isReadOnly,
6284
- helperText: helperText,
6285
- onChange: function onChange() {
6286
- return _onChange();
6287
- },
6288
- sx: styles$2.helperText,
6289
- "data-testid": "obs-fcst-time"
6506
+ sx: styles$2.helperText
6290
6507
  })
6291
6508
  }) : null;
6292
6509
  };
@@ -6322,23 +6539,19 @@ var Phenomenon = function Phenomenon(_ref) {
6322
6539
  handleSinglePhenomenaSelection();
6323
6540
  }
6324
6541
  return jsx(ProductFormFieldLayout, {
6325
- title: t('phenomenon-title'),
6326
6542
  sx: {
6327
6543
  '.MuiFormHelperText-root.Mui-error': {
6328
6544
  marginBottom: '-22px',
6329
6545
  marginTop: '2px'
6330
6546
  }
6331
6547
  },
6548
+ title: t('phenomenon-title'),
6332
6549
  children: jsx(ReactHookFormSelect, {
6333
- name: "phenomenon",
6334
- label: label,
6335
- rules: {
6336
- required: true
6337
- },
6550
+ "data-testid": "phenomenon",
6338
6551
  disabled: fieldsDisabled,
6339
6552
  isReadOnly: isReadOnly,
6340
- size: "small",
6341
- "data-testid": "phenomenon",
6553
+ label: label,
6554
+ name: "phenomenon",
6342
6555
  onChange: function onChange() {
6343
6556
  if (getValues('movementType') === 'NO_VA_EXP') {
6344
6557
  setValue('movementType', null);
@@ -6352,6 +6565,10 @@ var Phenomenon = function Phenomenon(_ref) {
6352
6565
  triggerValidations(['validDateStart', 'validDateEnd'], getValues, trigger);
6353
6566
  _onChange();
6354
6567
  },
6568
+ rules: {
6569
+ required: true
6570
+ },
6571
+ size: "small",
6355
6572
  children: phenomenaList.map(function (phenomenon) {
6356
6573
  return jsx(MenuItem, {
6357
6574
  value: phenomenon.code,
@@ -6443,7 +6660,7 @@ var Progress = function Progress(_ref) {
6443
6660
  };
6444
6661
  // Get allowed movement units based on selected FIR - if no FIR selected, allow all units
6445
6662
  var allowedMovementUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'movement_unit', MovementUnit);
6446
- React__default.useEffect(function () {
6663
+ React.useEffect(function () {
6447
6664
  if (movementType !== 'MOVEMENT') {
6448
6665
  unregister('movementDirection');
6449
6666
  unregister('movementSpeed');
@@ -6466,24 +6683,19 @@ var Progress = function Progress(_ref) {
6466
6683
  var drawnGeometry = geoJSON == null || (_geoJSON$features$ = geoJSON.features[0]) == null ? void 0 : _geoJSON$features$.geometry;
6467
6684
  var interceptionGeometry = geoJSONIntersection == null || (_geoJSONIntersection$ = geoJSONIntersection.features[0]) == null ? void 0 : _geoJSONIntersection$.geometry;
6468
6685
  // Total points in the user drawn polygon
6469
- var totalDrawnPoints = drawnGeometry && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
6686
+ var totalDrawnPoints = drawnGeometry != null && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
6470
6687
  // Total points in the intersection polygon
6471
- var intersectingPolygonPointsTotal = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
6688
+ var intersectingPolygonPointsTotal = interceptionGeometry != null && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
6472
6689
  var showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6473
6690
  var showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6474
6691
  var showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6475
6692
  return jsxs(ProductFormFieldLayout, {
6476
- title: t('progress'),
6477
6693
  sx: styles$2.containerItem,
6694
+ title: t('progress'),
6478
6695
  children: [jsxs(ReactHookFormRadioGroup, {
6479
- name: "movementType",
6480
6696
  "data-testid": "movementType-group",
6481
- rules: {
6482
- validate: {
6483
- isRequired: isRequired
6484
- }
6485
- },
6486
6697
  isReadOnly: isReadOnly,
6698
+ name: "movementType",
6487
6699
  onChange: function onChange() {
6488
6700
  var deleteTool = tools == null ? void 0 : tools.find(function (tool) {
6489
6701
  return tool.value === 'DELETE';
@@ -6492,33 +6704,46 @@ var Progress = function Progress(_ref) {
6492
6704
  onChangeTool(deleteTool);
6493
6705
  }
6494
6706
  },
6495
- children: [isVolcanicCloud && jsx(RadioButtonAndLabel, {
6496
- value: "NO_VA_EXP",
6497
- label: t('progress-radio-button-label-no-va-exp'),
6707
+ rules: {
6708
+ validate: {
6709
+ isRequired: isRequired
6710
+ }
6711
+ },
6712
+ children: [!!isVolcanicCloud && jsx(RadioButtonAndLabel, {
6713
+ "data-testid": "movementType-NO_VA_EXP",
6498
6714
  disabled: fieldsDisabled,
6499
- "data-testid": "movementType-NO_VA_EXP"
6715
+ label: t('progress-radio-button-label-no-va-exp'),
6716
+ value: "NO_VA_EXP"
6500
6717
  }), jsxs(Fragment, {
6501
6718
  children: [jsx(RadioButtonAndLabel, {
6502
- value: "STATIONARY",
6503
- label: t('progress-radio-button-label-stationary'),
6719
+ "data-testid": "movementType-STATIONARY",
6504
6720
  disabled: fieldsDisabled,
6505
- "data-testid": "movementType-STATIONARY"
6721
+ label: t('progress-radio-button-label-stationary'),
6722
+ value: "STATIONARY"
6506
6723
  }), jsx(RadioButtonAndLabel, {
6507
- value: "MOVEMENT",
6724
+ "data-testid": "movementType-MOVEMENT",
6725
+ disabled: fieldsDisabled,
6508
6726
  label: t('progress-radio-button-label-movement'),
6727
+ value: "MOVEMENT"
6728
+ }), !!isSigmet && !!isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6729
+ "data-testid": "movementType-FORECAST_POSITION",
6509
6730
  disabled: fieldsDisabled,
6510
- "data-testid": "movementType-MOVEMENT"
6511
- }), isSigmet && isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6512
- value: "FORECAST_POSITION",
6513
6731
  label: t('progress-radio-button-label-end-potision'),
6514
- disabled: fieldsDisabled,
6515
- "data-testid": "movementType-FORECAST_POSITION"
6732
+ value: "FORECAST_POSITION"
6516
6733
  })]
6517
6734
  }), movementType === 'MOVEMENT' && !isShortTestOrRdoact && jsxs(Fragment, {
6518
6735
  children: [jsx(Grid, {
6519
6736
  children: jsx(ReactHookFormSelect, {
6520
- name: "movementDirection",
6737
+ autoFocus: true,
6738
+ "data-testid": "movement-movementDirection",
6739
+ disabled: isDisabled,
6740
+ isReadOnly: isReadOnly,
6521
6741
  label: t('progress-movement-direction-label'),
6742
+ name: "movementDirection",
6743
+ onChange: function onChange(event) {
6744
+ event.stopPropagation();
6745
+ _onChange();
6746
+ },
6522
6747
  rules: {
6523
6748
  validate: {
6524
6749
  isRequired: isRequired
@@ -6526,14 +6751,6 @@ var Progress = function Progress(_ref) {
6526
6751
  },
6527
6752
  size: "small",
6528
6753
  sx: styles$2.movement,
6529
- disabled: isDisabled,
6530
- isReadOnly: isReadOnly,
6531
- "data-testid": "movement-movementDirection",
6532
- onChange: function onChange(event) {
6533
- event.stopPropagation();
6534
- _onChange();
6535
- },
6536
- autoFocus: true,
6537
6754
  children: Object.keys(Direction).map(function (key) {
6538
6755
  return jsx(MenuItem, {
6539
6756
  value: key,
@@ -6546,8 +6763,17 @@ var Progress = function Progress(_ref) {
6546
6763
  children: [jsx(Grid, {
6547
6764
  size: 5,
6548
6765
  children: jsx(ReactHookFormSelect, {
6549
- name: "movementUnit",
6766
+ "data-testid": "movement-movementUnit",
6767
+ defaultValue: 'KT',
6768
+ disabled: isDisabled,
6769
+ isReadOnly: isReadOnly,
6550
6770
  label: t('progress-movement-unit-label'),
6771
+ name: "movementUnit",
6772
+ onChange: function onChange(event) {
6773
+ event.stopPropagation();
6774
+ triggerValidations(['movementSpeed'], getValues, trigger);
6775
+ _onChange();
6776
+ },
6551
6777
  rules: {
6552
6778
  validate: {
6553
6779
  isRequired: isRequired
@@ -6555,15 +6781,6 @@ var Progress = function Progress(_ref) {
6555
6781
  },
6556
6782
  size: "small",
6557
6783
  sx: styles$2.unit,
6558
- disabled: isDisabled,
6559
- isReadOnly: isReadOnly,
6560
- defaultValue: 'KT',
6561
- "data-testid": "movement-movementUnit",
6562
- onChange: function onChange(event) {
6563
- event.stopPropagation();
6564
- triggerValidations(['movementSpeed'], getValues, trigger);
6565
- _onChange();
6566
- },
6567
6784
  children: Object.keys(allowedMovementUnitsForFir).map(function (key) {
6568
6785
  return jsx(MenuItem, {
6569
6786
  value: key,
@@ -6574,8 +6791,14 @@ var Progress = function Progress(_ref) {
6574
6791
  }), jsx(Grid, {
6575
6792
  size: 7,
6576
6793
  children: jsx(ReactHookFormNumberField, {
6577
- name: "movementSpeed",
6794
+ "data-testid": "movement-movementSpeed",
6795
+ disabled: isDisabled,
6796
+ isReadOnly: isReadOnly,
6578
6797
  label: t('progress-movement-speed-label'),
6798
+ name: "movementSpeed",
6799
+ onChange: function onChange(event) {
6800
+ return event == null ? void 0 : event.stopPropagation();
6801
+ },
6579
6802
  rules: {
6580
6803
  validate: {
6581
6804
  isRequired: isRequired,
@@ -6606,54 +6829,48 @@ var Progress = function Progress(_ref) {
6606
6829
  }
6607
6830
  }
6608
6831
  },
6609
- size: "small",
6610
- disabled: isDisabled,
6611
- isReadOnly: isReadOnly,
6612
- "data-testid": "movement-movementSpeed",
6613
- onChange: function onChange(event) {
6614
- return event && event.stopPropagation();
6615
- }
6832
+ size: "small"
6616
6833
  })
6617
6834
  })]
6618
6835
  })]
6619
- }), isSigmet && !isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6620
- value: "FORECAST_POSITION",
6621
- label: t('progress-radio-button-label-end-potision'),
6836
+ }), !!isSigmet && !isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6837
+ "data-testid": "movementType-FORECAST_POSITION",
6622
6838
  disabled: isDisabled,
6623
- "data-testid": "movementType-FORECAST_POSITION"
6839
+ label: t('progress-radio-button-label-end-potision'),
6840
+ value: "FORECAST_POSITION"
6624
6841
  })]
6625
- }), isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid, {
6842
+ }), !!isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid, {
6626
6843
  "data-testid": "endGeometry",
6627
- sx: styles$2.drawSectionProgress,
6628
6844
  size: 12,
6845
+ sx: styles$2.drawSectionProgress,
6629
6846
  children: [!isReadOnly && jsxs(Fragment, {
6630
6847
  children: [jsx(DrawTools, {
6631
- "data-testid": "endGeometry-drawTools",
6632
- tools: tools,
6633
6848
  activeTool: activeTool,
6634
- onChangeTool: onChangeTool,
6849
+ "data-testid": "endGeometry-drawTools",
6850
+ disabledTooltip: disabledTooltip,
6635
6851
  isDisabled: combinedDisabled,
6636
- disabledTooltip: disabledTooltip
6637
- }), activeTool && jsx(FormHelperText, {
6638
- variant: "filled",
6852
+ onChangeTool: onChangeTool,
6853
+ tools: tools
6854
+ }), !!activeTool && jsx(FormHelperText, {
6639
6855
  sx: styles$2.quitDrawModeMessage,
6856
+ variant: "filled",
6640
6857
  children: t('geometry-exit-draw-mode-message')
6641
6858
  }), !!errors.endGeometry && jsx(FormHelperText, {
6642
6859
  error: true,
6643
6860
  variant: "filled",
6644
6861
  children: errors.endGeometry.message
6645
6862
  }), /* non-blocking warnings */
6646
- showMaxFeaturePointsWarning && jsx(FormHelperText, {
6863
+ !!showMaxFeaturePointsWarning && jsx(FormHelperText, {
6647
6864
  variant: "filled",
6648
6865
  children: t('geometry-max-feature-points-message')
6649
6866
  }), /* non-blocking warnings */
6650
- showMoreThan6PointsWarning && jsx(FormHelperText, {
6867
+ !!showMoreThan6PointsWarning && jsx(FormHelperText, {
6651
6868
  variant: "filled",
6652
6869
  children: t('progress-more-than-6-points-message', {
6653
6870
  totalDrawnPoints: totalDrawnPoints
6654
6871
  })
6655
6872
  }), /* non-blocking warnings */
6656
- showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
6873
+ !!showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
6657
6874
  variant: "filled",
6658
6875
  children: t('progress-intersection-above-6-points-message', {
6659
6876
  intersectingPolygonPointsTotal: intersectingPolygonPointsTotal
@@ -6756,17 +6973,17 @@ var SelectFIR = function SelectFIR(_ref) {
6756
6973
  return jsxs(ProductFormFieldLayout, {
6757
6974
  title: t('select-fir-title'),
6758
6975
  children: [jsx(ReactHookFormSelect, {
6759
- name: "locationIndicatorATSR",
6976
+ defaultValue: locationIndicatorATSR,
6977
+ disabled: isDisabled,
6978
+ isReadOnly: isReadOnly,
6760
6979
  label: isReadOnly ? 'FIR' : t('select-fir-label'),
6980
+ name: "locationIndicatorATSR",
6981
+ onChange: onChangeLocationATSR,
6761
6982
  rules: {
6762
6983
  validate: {
6763
6984
  isRequired: isRequired
6764
6985
  }
6765
6986
  },
6766
- disabled: isDisabled,
6767
- isReadOnly: isReadOnly,
6768
- defaultValue: locationIndicatorATSR,
6769
- onChange: onChangeLocationATSR,
6770
6987
  size: "small",
6771
6988
  children: optionsFIR.map(function (fir) {
6772
6989
  return jsx(MenuItem, {
@@ -6775,21 +6992,21 @@ var SelectFIR = function SelectFIR(_ref) {
6775
6992
  }, fir.ATSR + "-" + fir.FIR);
6776
6993
  })
6777
6994
  }), jsx(ReactHookFormHiddenInput, {
6778
- name: "locationIndicatorATSU",
6995
+ "data-testid": "locationIndicatorATSU",
6779
6996
  defaultValue: locationIndicatorATSU,
6780
- "data-testid": "locationIndicatorATSU"
6997
+ name: "locationIndicatorATSU"
6781
6998
  }), jsx(ReactHookFormHiddenInput, {
6782
- name: "locationIndicatorMWO",
6999
+ "data-testid": "locationIndicatorMWO",
6783
7000
  defaultValue: locationIndicatorMWO,
6784
- "data-testid": "locationIndicatorMWO"
7001
+ name: "locationIndicatorMWO"
6785
7002
  }), jsx(ReactHookFormHiddenInput, {
6786
- name: "firName",
7003
+ "data-testid": "firName",
6787
7004
  defaultValue: firName,
6788
- "data-testid": "firName"
7005
+ name: "firName"
6789
7006
  }), jsx(ReactHookFormHiddenInput, {
6790
- name: "firGeometry",
7007
+ "data-testid": "firGeometry",
6791
7008
  defaultValue: firGeometry,
6792
- "data-testid": "firGeometry"
7009
+ name: "firGeometry"
6793
7010
  })]
6794
7011
  });
6795
7012
  };
@@ -6829,42 +7046,42 @@ var StartGeometry = function StartGeometry(_ref) {
6829
7046
  var drawnGeometry = geoJSON == null || (_geoJSON$features$ = geoJSON.features[0]) == null ? void 0 : _geoJSON$features$.geometry;
6830
7047
  var interceptionGeometry = geoJSONIntersection == null || (_geoJSONIntersection$ = geoJSONIntersection.features[0]) == null ? void 0 : _geoJSONIntersection$.geometry;
6831
7048
  // Total points in the user drawn polygon
6832
- var totalDrawnPoints = drawnGeometry && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
7049
+ var totalDrawnPoints = drawnGeometry != null && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
6833
7050
  // Total points in the intersection polygon
6834
- var intersectingPolygonPointsTotal = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
7051
+ var intersectingPolygonPointsTotal = interceptionGeometry != null && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
6835
7052
  var showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6836
7053
  var showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6837
7054
  var showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6838
7055
  return !isReadOnly ? jsxs(ProductFormFieldLayout, {
6839
- title: t('start-position'),
6840
- sx: styles$2.drawSection,
6841
7056
  "data-testid": "startGeometry",
7057
+ sx: styles$2.drawSection,
7058
+ title: t('start-position'),
6842
7059
  children: [jsx(DrawTools, {
6843
7060
  activeTool: activeTool,
6844
- tools: tools,
6845
- onChangeTool: onChangeTool,
7061
+ disabledTooltip: disabledTooltip,
6846
7062
  isDisabled: combinedDisabled,
6847
- disabledTooltip: disabledTooltip
6848
- }), activeTool && jsx(FormHelperText, {
6849
- variant: "filled",
7063
+ onChangeTool: onChangeTool,
7064
+ tools: tools
7065
+ }), !!activeTool && jsx(FormHelperText, {
6850
7066
  sx: styles$2.quitDrawModeMessage,
7067
+ variant: "filled",
6851
7068
  children: t('geometry-exit-draw-mode-message')
6852
7069
  }), !!errors.startGeometry && jsx(FormHelperText, {
6853
7070
  error: true,
6854
7071
  variant: "filled",
6855
7072
  children: errors.startGeometry.message
6856
7073
  }), /* non-blocking warnings */
6857
- showMaxFeaturePointsWarning && jsx(FormHelperText, {
7074
+ !!showMaxFeaturePointsWarning && jsx(FormHelperText, {
6858
7075
  variant: "filled",
6859
7076
  children: t('geometry-max-feature-points-message')
6860
7077
  }), /* non-blocking warnings */
6861
- showMoreThan6PointsWarning && jsx(FormHelperText, {
7078
+ !!showMoreThan6PointsWarning && jsx(FormHelperText, {
6862
7079
  variant: "filled",
6863
7080
  children: t('geometry-more-than-6-points-message', {
6864
7081
  totalDrawnPoints: totalDrawnPoints
6865
7082
  })
6866
7083
  }), /* non-blocking warnings */
6867
- showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
7084
+ !!showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
6868
7085
  variant: "filled",
6869
7086
  children: t('geometry-intersection-above-6-points-message', {
6870
7087
  intersectingPolygonPointsTotal: intersectingPolygonPointsTotal
@@ -6915,19 +7132,19 @@ var Type = function Type(_ref) {
6915
7132
  return jsx(ProductFormFieldLayout, {
6916
7133
  title: t('type-title'),
6917
7134
  children: jsx(ReactHookFormSelect, {
6918
- name: "type",
6919
- label: label,
6920
- disabled: isDisabled,
6921
- isReadOnly: isReadOnly,
6922
- size: "small",
7135
+ autoFocus: true,
6923
7136
  "data-testid": "type",
6924
7137
  defaultValue: "NORMAL",
7138
+ disabled: isDisabled,
7139
+ isReadOnly: isReadOnly,
7140
+ label: label,
7141
+ name: "type",
6925
7142
  onChange: function onChange() {
6926
7143
  onTypeChange();
6927
7144
  triggerValidations(['validDateStart', 'validDateEnd'], getValues, trigger);
6928
7145
  _onChange();
6929
7146
  },
6930
- autoFocus: true,
7147
+ size: "small",
6931
7148
  children: Object.keys(messageType).map(function (key) {
6932
7149
  return jsx(MenuItem, {
6933
7150
  value: key,
@@ -6976,7 +7193,7 @@ var ValidFrom = function ValidFrom(_ref) {
6976
7193
  isRequired = _useDraftFormHelpers.isRequired;
6977
7194
  var label = getFieldLabel(t, t('date-and-time'), isReadOnly);
6978
7195
  // Only auto-sync to now when amending an already-active SIGMET
6979
- React__default.useEffect(function () {
7196
+ React.useEffect(function () {
6980
7197
  if (!lockBecauseActive) {
6981
7198
  return;
6982
7199
  }
@@ -7017,19 +7234,19 @@ var ValidFrom = function ValidFrom(_ref) {
7017
7234
  return jsx(ProductFormFieldLayout, {
7018
7235
  title: t('valid-from'),
7019
7236
  children: jsx(ReactHookFormDateTime, {
7237
+ "data-testid": "valid-from",
7238
+ defaultNullValue: getDefaultValidFromValue(productConfig),
7020
7239
  disablePast: true,
7021
- name: "validDateStart",
7240
+ disabled: isDisabled || lockBecauseActive,
7241
+ isReadOnly: isReadOnly,
7022
7242
  label: label,
7023
- defaultNullValue: getDefaultValidFromValue(productConfig),
7024
- rules: rules,
7243
+ name: "validDateStart",
7025
7244
  onChange: function onChange() {
7026
7245
  onUserChange == null || onUserChange();
7027
7246
  triggerValidations(['validDateEnd', 'observationOrForecastTime'], getValues, trigger);
7028
7247
  _onChange();
7029
7248
  },
7030
- disabled: isDisabled || lockBecauseActive,
7031
- isReadOnly: isReadOnly,
7032
- "data-testid": "valid-from",
7249
+ rules: rules,
7033
7250
  sx: Object.assign({}, styles$2.helperText, {
7034
7251
  '.MuiFormHelperText-root.Mui-error': {
7035
7252
  marginBottom: '-16px'
@@ -7070,13 +7287,13 @@ var ValidUntil = function ValidUntil(_ref) {
7070
7287
  isRequired = _useDraftFormHelpers.isRequired;
7071
7288
  var dateAndTime = t('date-and-time');
7072
7289
  var label = getFieldLabel(t, dateAndTime, isReadOnly);
7073
- var _React$useState = React__default.useState(getDefaultValidUntilValue(productConfig, getValues('phenomenon'), getValues('locationIndicatorATSR'), getValues('validDateStart'))),
7290
+ var _React$useState = React.useState(getDefaultValidUntilValue(productConfig, getValues('phenomenon'), getValues('locationIndicatorATSR'), getValues('validDateStart'))),
7074
7291
  defaultValidUntilValue = _React$useState[0],
7075
7292
  setDefaultValidUntilValue = _React$useState[1];
7076
7293
  var phenomenon = watch('phenomenon');
7077
7294
  var locationIndicatorATSR = watch('locationIndicatorATSR');
7078
7295
  var validFrom = watch('validDateStart');
7079
- React__default.useEffect(function () {
7296
+ React.useEffect(function () {
7080
7297
  if (hasUserChangedTime) {
7081
7298
  return;
7082
7299
  }
@@ -7092,10 +7309,18 @@ var ValidUntil = function ValidUntil(_ref) {
7092
7309
  return jsx(ProductFormFieldLayout, {
7093
7310
  title: t('valid-until'),
7094
7311
  children: jsx(ReactHookFormDateTime, {
7312
+ "data-testid": "valid-until",
7313
+ defaultNullValue: defaultValidUntilValue,
7095
7314
  disablePast: true,
7096
- name: "validDateEnd",
7315
+ disabled: isDisabled,
7316
+ isReadOnly: isReadOnly,
7097
7317
  label: label,
7098
- defaultNullValue: defaultValidUntilValue,
7318
+ name: "validDateEnd",
7319
+ onChange: function onChange() {
7320
+ onUserChange == null || onUserChange(); // Track manual change
7321
+ triggerValidations(['validDateStart', 'observationOrForecastTime'], getValues, trigger);
7322
+ _onChange();
7323
+ },
7099
7324
  rules: {
7100
7325
  validate: {
7101
7326
  isRequired: isRequired,
@@ -7110,14 +7335,6 @@ var ValidUntil = function ValidUntil(_ref) {
7110
7335
  }
7111
7336
  }
7112
7337
  },
7113
- disabled: isDisabled,
7114
- isReadOnly: isReadOnly,
7115
- onChange: function onChange() {
7116
- onUserChange == null || onUserChange(); // Track manual change
7117
- triggerValidations(['validDateStart', 'observationOrForecastTime'], getValues, trigger);
7118
- _onChange();
7119
- },
7120
- "data-testid": "valid-until",
7121
7338
  sx: Object.assign({}, styles$2.helperText, {
7122
7339
  '.MuiFormHelperText-root.Mui-error': {
7123
7340
  marginBottom: '-16px'
@@ -7153,39 +7370,51 @@ var VolcanicFields = function VolcanicFields(_ref) {
7153
7370
  }
7154
7371
  },
7155
7372
  children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && jsx(Grid, {
7156
- sx: styles$2.volcanicField,
7157
7373
  size: 12,
7374
+ sx: styles$2.volcanicField,
7158
7375
  children: jsx(ReactHookFormTextField, {
7159
- name: "vaSigmetVolcanoName",
7160
- label: t('volcano-name'),
7161
- rules: {
7162
- required: false
7163
- },
7164
7376
  disabled: isDisabled,
7165
7377
  helperText: helperText,
7166
- upperCase: true,
7167
7378
  isReadOnly: isReadOnly,
7168
- size: "small"
7379
+ label: t('volcano-name'),
7380
+ name: "vaSigmetVolcanoName",
7381
+ rules: {
7382
+ required: false
7383
+ },
7384
+ size: "small",
7385
+ upperCase: true
7169
7386
  })
7170
7387
  }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && jsx(Grid, {
7171
7388
  size: 6,
7172
7389
  children: degreesAndMinutes ? jsx(DegreesMinutesField, {
7173
- name: "vaSigmetVolcanoCoordinates.latitude",
7174
- label: t('latitude-degrees-and-minutes'),
7175
7390
  disabled: isDisabled,
7176
7391
  isReadOnly: isReadOnly,
7392
+ label: t('latitude-degrees-and-minutes'),
7393
+ name: "vaSigmetVolcanoCoordinates.latitude",
7177
7394
  t: t
7178
7395
  }) : jsx(ReactHookFormNumberField, {
7179
- name: "vaSigmetVolcanoCoordinates.latitude",
7180
- label: t('latitude'),
7181
- inputMode: "decimal",
7182
- size: "small",
7183
- sx: styles$2.latitude,
7184
7396
  disabled: isDisabled,
7397
+ inputMode: "decimal",
7185
7398
  isReadOnly: isReadOnly,
7186
- onChange: function onChange() {
7187
- return trigger('vaSigmetVolcanoCoordinates.longitude');
7188
- },
7399
+ label: t('latitude'),
7400
+ name: "vaSigmetVolcanoCoordinates.latitude",
7401
+ onChange: function () {
7402
+ var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7403
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
7404
+ while (1) switch (_context.prev = _context.next) {
7405
+ case 0:
7406
+ return _context.abrupt("return", trigger('vaSigmetVolcanoCoordinates.longitude'));
7407
+ case 1:
7408
+ case "end":
7409
+ return _context.stop();
7410
+ }
7411
+ }, _callee);
7412
+ }));
7413
+ function onChange() {
7414
+ return _onChange.apply(this, arguments);
7415
+ }
7416
+ return onChange;
7417
+ }(),
7189
7418
  rules: {
7190
7419
  required: true,
7191
7420
  validate: {
@@ -7194,28 +7423,42 @@ var VolcanicFields = function VolcanicFields(_ref) {
7194
7423
  return isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.longitude'));
7195
7424
  }
7196
7425
  }
7197
- }
7426
+ },
7427
+ size: "small",
7428
+ sx: styles$2.latitude
7198
7429
  })
7199
7430
  }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && jsx(Grid, {
7200
7431
  size: 6,
7201
7432
  children: degreesAndMinutes ? jsx(DegreesMinutesField, {
7202
- name: "vaSigmetVolcanoCoordinates.longitude",
7203
- label: t('longitude-degrees-and-minutes'),
7204
7433
  disabled: isDisabled,
7205
- isReadOnly: isReadOnly,
7206
7434
  isLongitude: true,
7435
+ isReadOnly: isReadOnly,
7436
+ label: t('longitude-degrees-and-minutes'),
7437
+ name: "vaSigmetVolcanoCoordinates.longitude",
7207
7438
  t: t
7208
7439
  }) : jsx(ReactHookFormNumberField, {
7209
- name: "vaSigmetVolcanoCoordinates.longitude",
7210
- label: t('longitude'),
7211
- inputMode: "decimal",
7212
- size: "small",
7213
- sx: styles$2.latitude,
7214
7440
  disabled: isDisabled,
7441
+ inputMode: "decimal",
7215
7442
  isReadOnly: isReadOnly,
7216
- onChange: function onChange() {
7217
- return trigger('vaSigmetVolcanoCoordinates.latitude');
7218
- },
7443
+ label: t('longitude'),
7444
+ name: "vaSigmetVolcanoCoordinates.longitude",
7445
+ onChange: function () {
7446
+ var _onChange2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
7447
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7448
+ while (1) switch (_context2.prev = _context2.next) {
7449
+ case 0:
7450
+ return _context2.abrupt("return", trigger('vaSigmetVolcanoCoordinates.latitude'));
7451
+ case 1:
7452
+ case "end":
7453
+ return _context2.stop();
7454
+ }
7455
+ }, _callee2);
7456
+ }));
7457
+ function onChange() {
7458
+ return _onChange2.apply(this, arguments);
7459
+ }
7460
+ return onChange;
7461
+ }(),
7219
7462
  rules: {
7220
7463
  required: true,
7221
7464
  validate: {
@@ -7224,7 +7467,9 @@ var VolcanicFields = function VolcanicFields(_ref) {
7224
7467
  return isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.latitude'));
7225
7468
  }
7226
7469
  }
7227
- }
7470
+ },
7471
+ size: "small",
7472
+ sx: styles$2.latitude
7228
7473
  })
7229
7474
  })]
7230
7475
  })
@@ -7294,13 +7539,15 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7294
7539
  justifyContent: "flex-start",
7295
7540
  size: 8,
7296
7541
  children: [jsx(Grid, {
7297
- sx: styles$2.surfaceVisibility,
7298
7542
  size: 12,
7543
+ sx: styles$2.surfaceVisibility,
7299
7544
  children: jsx(ReactHookFormNumberField, {
7300
- name: "visibilityValue",
7301
7545
  "data-testid": "surfaceVisibility-visibilityValue",
7302
- label: visibilityLabel,
7546
+ disabled: isDisabled,
7303
7547
  helperText: t('surface-visibility-helper-text'),
7548
+ isReadOnly: isReadOnly,
7549
+ label: visibilityLabel,
7550
+ name: "visibilityValue",
7304
7551
  rules: {
7305
7552
  validate: {
7306
7553
  isRequired: isRequired,
@@ -7326,8 +7573,6 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7326
7573
  }
7327
7574
  },
7328
7575
  size: "small",
7329
- disabled: isDisabled,
7330
- isReadOnly: isReadOnly,
7331
7576
  sx: {
7332
7577
  ' .MuiFormHelperText-root': {
7333
7578
  lineHeight: '1.33em'
@@ -7340,20 +7585,20 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7340
7585
  marginTop: -2
7341
7586
  },
7342
7587
  children: jsx(ReactHookFormSelect, {
7343
- name: "visibilityCause",
7344
- label: visibilityCauseLabel,
7345
- rules: {
7346
- validate: {
7347
- isRequired: isRequired
7348
- }
7349
- },
7588
+ "data-testid": "surfaceVisibility-visibilityCause",
7350
7589
  disabled: isDisabled,
7351
7590
  isReadOnly: isReadOnly,
7352
- "data-testid": "surfaceVisibility-visibilityCause",
7591
+ label: visibilityCauseLabel,
7592
+ name: "visibilityCause",
7353
7593
  onChange: function onChange(event) {
7354
7594
  event.stopPropagation();
7355
7595
  _onChange();
7356
7596
  },
7597
+ rules: {
7598
+ validate: {
7599
+ isRequired: isRequired
7600
+ }
7601
+ },
7357
7602
  size: "small",
7358
7603
  children: Object.keys(VisibilityCause).map(function (key) {
7359
7604
  return jsx(MenuItem, {
@@ -7421,12 +7666,15 @@ var SurfaceWind = function SurfaceWind(_ref) {
7421
7666
  justifyContent: "flex-start",
7422
7667
  size: 8,
7423
7668
  children: [jsx(Grid, {
7424
- sx: styles$2.surfaceWind,
7425
7669
  size: 12,
7670
+ sx: styles$2.surfaceWind,
7426
7671
  children: jsx(ReactHookFormNumberField, {
7427
- name: "windDirection",
7428
- label: windLabel,
7672
+ "data-testid": "surfaceWind-windDirection",
7673
+ disabled: isDisabled,
7429
7674
  helperText: t('surface-wind-helper-text'),
7675
+ isReadOnly: isReadOnly,
7676
+ label: windLabel,
7677
+ name: "windDirection",
7430
7678
  rules: {
7431
7679
  min: {
7432
7680
  value: 10,
@@ -7443,23 +7691,28 @@ var SurfaceWind = function SurfaceWind(_ref) {
7443
7691
  }
7444
7692
  }
7445
7693
  },
7446
- size: "small",
7447
- disabled: isDisabled,
7448
- isReadOnly: isReadOnly,
7449
- "data-testid": "surfaceWind-windDirection"
7694
+ size: "small"
7450
7695
  })
7451
7696
  }), jsxs(Grid, {
7452
7697
  container: true,
7453
7698
  size: 12,
7699
+ spacing: 0,
7454
7700
  sx: {
7455
7701
  marginTop: -2
7456
7702
  },
7457
- spacing: 0,
7458
7703
  children: [jsx(Grid, {
7459
7704
  size: 5,
7460
7705
  children: jsx(ReactHookFormSelect, {
7461
- name: "windUnit",
7706
+ "data-testid": "surfaceWind-windUnit",
7707
+ defaultValue: 'KT',
7708
+ disabled: isDisabled,
7709
+ isReadOnly: isReadOnly,
7462
7710
  label: t('unit-label'),
7711
+ name: "windUnit",
7712
+ onChange: function onChange() {
7713
+ triggerValidations(['windSpeed'], getValues, trigger);
7714
+ _onChange();
7715
+ },
7463
7716
  rules: {
7464
7717
  validate: {
7465
7718
  isRequired: isRequired
@@ -7467,14 +7720,6 @@ var SurfaceWind = function SurfaceWind(_ref) {
7467
7720
  },
7468
7721
  size: "small",
7469
7722
  sx: styles$2.unit,
7470
- disabled: isDisabled,
7471
- isReadOnly: isReadOnly,
7472
- defaultValue: 'KT',
7473
- "data-testid": "surfaceWind-windUnit",
7474
- onChange: function onChange() {
7475
- triggerValidations(['windSpeed'], getValues, trigger);
7476
- _onChange();
7477
- },
7478
7723
  children: Object.keys(allowedWindUnitsForFir).map(function (key) {
7479
7724
  return jsx(MenuItem, {
7480
7725
  value: key,
@@ -7485,8 +7730,11 @@ var SurfaceWind = function SurfaceWind(_ref) {
7485
7730
  }), jsx(Grid, {
7486
7731
  size: 7,
7487
7732
  children: jsx(ReactHookFormNumberField, {
7488
- name: "windSpeed",
7733
+ "data-testid": "surfaceWind-windSpeed",
7734
+ disabled: isDisabled,
7735
+ isReadOnly: isReadOnly,
7489
7736
  label: speedLabel,
7737
+ name: "windSpeed",
7490
7738
  rules: {
7491
7739
  validate: {
7492
7740
  isRequired: isRequired,
@@ -7511,10 +7759,7 @@ var SurfaceWind = function SurfaceWind(_ref) {
7511
7759
  }
7512
7760
  }
7513
7761
  },
7514
- size: "small",
7515
- disabled: isDisabled,
7516
- isReadOnly: isReadOnly,
7517
- "data-testid": "surfaceWind-windSpeed"
7762
+ size: "small"
7518
7763
  })
7519
7764
  })]
7520
7765
  })]
@@ -7588,7 +7833,7 @@ var CloudLevels = function CloudLevels(_ref) {
7588
7833
  var cloudLevelInfoMode = watch('cloudLevelInfoMode');
7589
7834
  // Get allowed cloud level units based on selected FIR - if no FIR selected, allow all default units
7590
7835
  var allowedCloudLevelUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'cloud_level_unit', CloudLevelUnits);
7591
- React__default.useEffect(function () {
7836
+ React.useEffect(function () {
7592
7837
  if (cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV') {
7593
7838
  unregister('cloudLowerLevel');
7594
7839
  }
@@ -7602,8 +7847,8 @@ var CloudLevels = function CloudLevels(_ref) {
7602
7847
  justifyContent: "flex-end",
7603
7848
  size: 4,
7604
7849
  children: jsx(Typography, {
7605
- variant: "subtitle1",
7606
7850
  sx: styles$2.label,
7851
+ variant: "subtitle1",
7607
7852
  children: t('levels')
7608
7853
  })
7609
7854
  }), jsx(Grid, {
@@ -7613,8 +7858,8 @@ var CloudLevels = function CloudLevels(_ref) {
7613
7858
  children: jsxs(Grid, {
7614
7859
  size: 12,
7615
7860
  children: [jsx(ReactHookFormHiddenInput, {
7616
- name: "cloudLevelInfoMode",
7617
- defaultValue: "BETW"
7861
+ defaultValue: "BETW",
7862
+ name: "cloudLevelInfoMode"
7618
7863
  }), jsxs(Grid, {
7619
7864
  container: true,
7620
7865
  size: 12,
@@ -7626,6 +7871,9 @@ var CloudLevels = function CloudLevels(_ref) {
7626
7871
  children: jsx(FormControlLabel, {
7627
7872
  control: jsx(Checkbox, {
7628
7873
  checked: cloudLevelInfoMode === 'BETW_ABV' || cloudLevelInfoMode === 'BETW_SFC_ABV',
7874
+ color: "secondary",
7875
+ disabled: isDisabled,
7876
+ name: "checkedAbove",
7629
7877
  onChange: function onChange() {
7630
7878
  switch (getValues('cloudLevelInfoMode')) {
7631
7879
  case 'BETW':
@@ -7649,10 +7897,7 @@ var CloudLevels = function CloudLevels(_ref) {
7649
7897
  });
7650
7898
  break;
7651
7899
  }
7652
- },
7653
- name: "checkedAbove",
7654
- color: "secondary",
7655
- disabled: isDisabled
7900
+ }
7656
7901
  }),
7657
7902
  "data-testid": "cloudLevels-Above",
7658
7903
  label: "Above"
@@ -7661,25 +7906,25 @@ var CloudLevels = function CloudLevels(_ref) {
7661
7906
  }), jsx(Grid, {
7662
7907
  size: 3,
7663
7908
  children: jsx(ReactHookFormSelect, {
7664
- name: "cloudLevel.unit",
7665
- label: "Unit",
7666
7909
  "data-testid": "cloudLevel-unit",
7667
- rules: {
7668
- validate: {
7669
- isRequired: isRequired
7670
- }
7671
- },
7672
- size: "small",
7673
- sx: styles$2.unit,
7910
+ defaultValue: 'FT',
7674
7911
  disabled: isDisabled,
7675
7912
  isReadOnly: isReadOnly,
7676
- defaultValue: 'FT',
7913
+ label: "Unit",
7914
+ name: "cloudLevel.unit",
7677
7915
  onChange: function onChange() {
7678
7916
  // Unit change is reflected in the Lower Cloud Level
7679
7917
  setValue('cloudLowerLevel.unit', getValues('cloudLevel.unit'));
7680
7918
  triggerValidations(['cloudLevel.value', 'cloudLowerLevel.value'], getValues, trigger);
7681
7919
  _onChange();
7682
7920
  },
7921
+ rules: {
7922
+ validate: {
7923
+ isRequired: isRequired
7924
+ }
7925
+ },
7926
+ size: "small",
7927
+ sx: styles$2.unit,
7683
7928
  children: Object.keys(allowedCloudLevelUnitsForFir).map(function (key) {
7684
7929
  return jsx(MenuItem, {
7685
7930
  value: key,
@@ -7690,11 +7935,14 @@ var CloudLevels = function CloudLevels(_ref) {
7690
7935
  }), jsx(Grid, {
7691
7936
  size: 5,
7692
7937
  children: jsx(ReactHookFormNumberField, {
7693
- name: "cloudLevel.value",
7694
- label: "Upper level",
7695
7938
  "data-testid": "cloudLevel-value",
7696
- size: "small",
7697
- sx: styles$2.levelField,
7939
+ disabled: isDisabled,
7940
+ isReadOnly: isReadOnly,
7941
+ label: "Upper level",
7942
+ name: "cloudLevel.value",
7943
+ onChange: function onChange() {
7944
+ triggerValidations(['cloudLowerLevel.value'], getValues, trigger);
7945
+ },
7698
7946
  rules: {
7699
7947
  validate: {
7700
7948
  isRequired: isRequired,
@@ -7716,11 +7964,8 @@ var CloudLevels = function CloudLevels(_ref) {
7716
7964
  }
7717
7965
  }
7718
7966
  },
7719
- disabled: isDisabled,
7720
- isReadOnly: isReadOnly,
7721
- onChange: function onChange() {
7722
- triggerValidations(['cloudLowerLevel.value'], getValues, trigger);
7723
- }
7967
+ size: "small",
7968
+ sx: styles$2.levelField
7724
7969
  })
7725
7970
  })]
7726
7971
  }), jsxs(Grid, {
@@ -7734,6 +7979,9 @@ var CloudLevels = function CloudLevels(_ref) {
7734
7979
  children: jsx(FormControlLabel, {
7735
7980
  control: jsx(Checkbox, {
7736
7981
  checked: cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV',
7982
+ color: "secondary",
7983
+ disabled: isDisabled,
7984
+ name: "checkedSFC",
7737
7985
  onChange: function onChange() {
7738
7986
  switch (getValues('cloudLevelInfoMode')) {
7739
7987
  case 'BETW':
@@ -7757,10 +8005,7 @@ var CloudLevels = function CloudLevels(_ref) {
7757
8005
  });
7758
8006
  break;
7759
8007
  }
7760
- },
7761
- name: "checkedSFC",
7762
- color: "secondary",
7763
- disabled: isDisabled
8008
+ }
7764
8009
  }),
7765
8010
  "data-testid": "cloudLevels-SFC",
7766
8011
  label: "SFC"
@@ -7770,25 +8015,25 @@ var CloudLevels = function CloudLevels(_ref) {
7770
8015
  children: [jsx(Grid, {
7771
8016
  size: 3,
7772
8017
  children: jsx(ReactHookFormSelect, {
7773
- name: "cloudLowerLevel.unit",
7774
- label: "Unit",
7775
8018
  "data-testid": "cloudLowerLevel-unit",
7776
- rules: {
7777
- validate: {
7778
- isRequired: isRequired
7779
- }
7780
- },
7781
- size: "small",
7782
- sx: styles$2.unit,
8019
+ defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
7783
8020
  disabled: isDisabled,
7784
8021
  isReadOnly: isReadOnly,
7785
- defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
8022
+ label: "Unit",
8023
+ name: "cloudLowerLevel.unit",
7786
8024
  onChange: function onChange() {
7787
8025
  // Unit change is reflected in the Upper Cloud Level
7788
8026
  setValue('cloudLevel.unit', getValues('cloudLowerLevel.unit'));
7789
8027
  triggerValidations(['cloudLowerLevel.value', 'cloudLevel.value'], getValues, trigger);
7790
8028
  _onChange();
7791
8029
  },
8030
+ rules: {
8031
+ validate: {
8032
+ isRequired: isRequired
8033
+ }
8034
+ },
8035
+ size: "small",
8036
+ sx: styles$2.unit,
7792
8037
  children: Object.keys(allowedCloudLevelUnitsForFir).map(function (key) {
7793
8038
  return jsx(MenuItem, {
7794
8039
  value: key,
@@ -7799,9 +8044,11 @@ var CloudLevels = function CloudLevels(_ref) {
7799
8044
  }), jsx(Grid, {
7800
8045
  size: 5,
7801
8046
  children: jsx(ReactHookFormNumberField, {
7802
- name: "cloudLowerLevel.value",
7803
- label: "Lower level",
7804
8047
  "data-testid": "cloudLowerLevel-value",
8048
+ disabled: isDisabled,
8049
+ isReadOnly: isReadOnly,
8050
+ label: "Lower level",
8051
+ name: "cloudLowerLevel.value",
7805
8052
  rules: {
7806
8053
  validate: {
7807
8054
  isRequired: isRequired,
@@ -7829,9 +8076,7 @@ var CloudLevels = function CloudLevels(_ref) {
7829
8076
  }
7830
8077
  }
7831
8078
  },
7832
- size: "small",
7833
- disabled: isDisabled,
7834
- isReadOnly: isReadOnly
8079
+ size: "small"
7835
8080
  })
7836
8081
  })]
7837
8082
  })]
@@ -7847,16 +8092,16 @@ var IssuedAt = function IssuedAt(_ref) {
7847
8092
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
7848
8093
  t = _useSigmetAirmetTrans.t;
7849
8094
  return jsx(ProductFormFieldLayout, {
7850
- title: t('issued-at'),
7851
8095
  sx: {
7852
8096
  marginTop: -2
7853
8097
  },
8098
+ title: t('issued-at'),
7854
8099
  children: jsx(Typography, {
7855
- variant: "body2",
7856
8100
  sx: Object.assign({}, styles$2.body, {
7857
8101
  fontSize: '1rem',
7858
8102
  color: isReadOnly ? 'geowebColors.typographyAndIcons.text' : 'geowebColors.buttons.primary.disabled.color'
7859
8103
  }),
8104
+ variant: "body2",
7860
8105
  children: date
7861
8106
  })
7862
8107
  });
@@ -7950,7 +8195,8 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
7950
8195
  return false;
7951
8196
  };
7952
8197
  }
7953
- var _React$useState = React__default.useState(noTAC(t)),
8198
+ // eslint-disable-next-line react/hook-use-state
8199
+ var _React$useState = React.useState(noTAC(t)),
7954
8200
  TAC = _React$useState[0],
7955
8201
  setTAC = _React$useState[1];
7956
8202
  var _useIsMounted = useIsMounted(),
@@ -7987,7 +8233,7 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
7987
8233
  return _ref.apply(this, arguments);
7988
8234
  };
7989
8235
  }();
7990
- React__default.useEffect(function () {
8236
+ React.useEffect(function () {
7991
8237
  if (shouldRetrieveTAC(initialProduct, omitChange) && !hasErrors()) {
7992
8238
  void retrieveTAC(initialProduct);
7993
8239
  }
@@ -8000,7 +8246,7 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
8000
8246
  setTAC(noTAC(t));
8001
8247
  }
8002
8248
  };
8003
- var debouncedSearch = React__default.useRef(debounce(/*#__PURE__*/function () {
8249
+ var debouncedSearch = React.useRef(debounce(/*#__PURE__*/function () {
8004
8250
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(formFn, hasFormErrors) {
8005
8251
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
8006
8252
  while (1) switch (_context2.prev = _context2.next) {
@@ -8031,14 +8277,15 @@ var ProductFormTAC = function ProductFormTAC(_ref3) {
8031
8277
  var sequenceNumberInTac = findSequenceNumber(tac, noTAC(t));
8032
8278
  var sequenceStyle = getSequenceStyling(product, hasTac);
8033
8279
  return jsx(Typography, {
8034
- variant: "body2",
8035
8280
  component: "div",
8281
+ "data-testid": "productform-tac-message",
8036
8282
  sx: {
8037
8283
  whiteSpace: 'break-spaces'
8038
8284
  },
8039
- "data-testid": "productform-tac-message",
8285
+ variant: "body2",
8040
8286
  children: jsx(Box, {
8041
8287
  component: "p",
8288
+ "data-testid": "productform-tac-message-line",
8042
8289
  sx: {
8043
8290
  margin: 0,
8044
8291
  fontSize: '1.125rem',
@@ -8047,7 +8294,6 @@ var ProductFormTAC = function ProductFormTAC(_ref3) {
8047
8294
  letterSpacing: '0.5px',
8048
8295
  marginTop: '2px'
8049
8296
  },
8050
- "data-testid": "productform-tac-message-line",
8051
8297
  children: tac.split(' ').map(function (word, index) {
8052
8298
  return jsx(Box, {
8053
8299
  component: "span",
@@ -8064,16 +8310,16 @@ var Tac = function Tac(_ref) {
8064
8310
  children = _ref.children,
8065
8311
  product = _ref.product;
8066
8312
  return jsxs(ProductFormFieldLayout, {
8067
- title: "TAC",
8068
8313
  sx: {
8069
8314
  marginTop: -3,
8070
8315
  '.MuiTypography-root.MuiTypography-subtitle1': {
8071
8316
  marginTop: '2px'
8072
8317
  }
8073
8318
  },
8319
+ title: "TAC",
8074
8320
  children: [jsx(ProductFormTAC, {
8075
- tac: tac,
8076
- product: product
8321
+ product: product,
8322
+ tac: tac
8077
8323
  }), children]
8078
8324
  });
8079
8325
  };
@@ -8090,7 +8336,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8090
8336
  var firstMap = useSelector(function (store) {
8091
8337
  return mapSelectors.getFirstMap(store);
8092
8338
  }, shallowEqual);
8093
- var firstMapId = firstMap && firstMap.id ? firstMap.id : '';
8339
+ var firstMapId = firstMap != null && firstMap.id ? firstMap.id : '';
8094
8340
  var mapLayers = useSelector(function (store) {
8095
8341
  return mapSelectors.getMapLayers(store, firstMapId);
8096
8342
  }, shallowEqual);
@@ -8106,7 +8352,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8106
8352
  dispatch(syncGroupsActions.syncGroupAddTarget(payload));
8107
8353
  }, [dispatch]);
8108
8354
  React.useEffect(function () {
8109
- if (mapLayers && mapLayers.length) {
8355
+ if (mapLayers != null && mapLayers.length) {
8110
8356
  // use maplayers, but change layerId and current mapId
8111
8357
  var layers = mapLayers.map(function (layer) {
8112
8358
  return Object.assign({}, layer, {
@@ -8119,7 +8365,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8119
8365
  layers: layers
8120
8366
  }));
8121
8367
  }
8122
- if (mapDimensions && mapDimensions.length) {
8368
+ if (mapDimensions != null && mapDimensions.length) {
8123
8369
  dispatch(mapActions.mapChangeDimension({
8124
8370
  mapId: mapId,
8125
8371
  dimension: mapDimensions[0],
@@ -8166,23 +8412,23 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8166
8412
  // eslint-disable-next-line react-hooks/exhaustive-deps
8167
8413
  }, []);
8168
8414
  return jsxs("div", {
8415
+ "data-testid": "MapView",
8416
+ ref: mapWindowRef,
8169
8417
  style: {
8170
8418
  position: 'relative',
8171
8419
  height: '100%'
8172
8420
  },
8173
- "data-testid": "MapView",
8174
- ref: mapWindowRef,
8175
8421
  children: [jsx(LegendConnect, {
8176
- showMapId: true,
8177
- mapId: mapId
8178
- }), jsxs(OlMapViewConnect, {
8179
8422
  mapId: mapId,
8423
+ showMapId: true
8424
+ }), jsxs(OlMapViewConnect, {
8180
8425
  controls: {
8181
8426
  mapControlsPositionTop: 0,
8182
8427
  layerManagerAndLegend: true,
8183
8428
  zoomControls: true,
8184
8429
  dimensionSelect: true
8185
8430
  },
8431
+ mapId: mapId,
8186
8432
  source: "module",
8187
8433
  children: [children, geoJSONLayers.map(function (layer) {
8188
8434
  return jsxs("div", {
@@ -8192,19 +8438,19 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8192
8438
  style: genericOpenLayersFeatureStyle,
8193
8439
  zIndex: 2000
8194
8440
  }), jsx(OpenLayersMapDraw, {
8195
- viewOnlyStyle: genericOpenLayersFeatureStyle,
8196
- selectedFeatureIndex: layer.selectedFeatureIndex || 0,
8197
- geojson: layer.geojson,
8198
8441
  drawMode: layer.drawMode,
8199
- isInEditMode: layer.isInEditMode || false,
8200
- updateGeojson: layer.updateGeojson,
8201
8442
  exitDrawModeCallback: function exitDrawModeCallback(reason) {
8202
8443
  try {
8203
- (layer == null ? void 0 : layer.exitDrawModeCallback) && (layer == null ? void 0 : layer.exitDrawModeCallback(reason));
8444
+ layer == null || layer.exitDrawModeCallback == null || layer.exitDrawModeCallback(reason);
8204
8445
  } catch (e) {
8205
8446
  window.console.trace(e);
8206
8447
  }
8207
- }
8448
+ },
8449
+ geojson: layer.geojson,
8450
+ isInEditMode: layer.isInEditMode || false,
8451
+ selectedFeatureIndex: layer.selectedFeatureIndex || 0,
8452
+ updateGeojson: layer.updateGeojson,
8453
+ viewOnlyStyle: genericOpenLayersFeatureStyle
8208
8454
  })]
8209
8455
  }, layer.id);
8210
8456
  })]
@@ -8217,9 +8463,9 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8217
8463
  width: '100%'
8218
8464
  },
8219
8465
  children: jsx(TimeSliderConnect, {
8220
- sourceId: timesliderId,
8221
8466
  mapId: mapId,
8222
- mapWindowRef: mapWindowRef
8467
+ mapWindowRef: mapWindowRef,
8468
+ sourceId: timesliderId
8223
8469
  })
8224
8470
  })]
8225
8471
  });
@@ -8244,6 +8490,11 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8244
8490
  overflowY: 'hidden'
8245
8491
  }, _sx),
8246
8492
  children: [jsx(Grid, {
8493
+ size: {
8494
+ xs: 12,
8495
+ sm: 6,
8496
+ lg: 8
8497
+ },
8247
8498
  sx: (_sx2 = {
8248
8499
  height: 400,
8249
8500
  padding: 2
@@ -8251,18 +8502,18 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8251
8502
  height: '100%',
8252
8503
  padding: 0
8253
8504
  }, _sx2),
8254
- size: {
8255
- xs: 12,
8256
- sm: 6,
8257
- lg: 8
8258
- },
8259
8505
  children: jsx(MapViewGeoJson, {
8260
8506
  baseLayers: baseLayers,
8261
- projection: projection,
8262
8507
  geoJSONLayers: geoJSONLayers,
8508
+ projection: projection,
8263
8509
  children: mapChildren
8264
8510
  })
8265
8511
  }), jsx(Grid, {
8512
+ size: {
8513
+ xs: 12,
8514
+ sm: 6,
8515
+ lg: 4
8516
+ },
8266
8517
  sx: (_sx3 = {
8267
8518
  paddingTop: 5,
8268
8519
  paddingBottom: 5,
@@ -8271,11 +8522,6 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8271
8522
  overflowY: 'auto',
8272
8523
  height: '100%'
8273
8524
  }, _sx3),
8274
- size: {
8275
- xs: 12,
8276
- sm: 6,
8277
- lg: 4
8278
- },
8279
8525
  children: children
8280
8526
  })]
8281
8527
  });
@@ -8448,7 +8694,7 @@ var useConditionalFields$1 = function useConditionalFields(productConfig) {
8448
8694
  var hasRadioactiveCloud = watch('phenomenon') === 'RDOACT_CLD';
8449
8695
  var changeFromConfig = getOmitChangeFromConfig(productConfig);
8450
8696
  var omitChange = changeFromConfig && (hasVolcanicAshes || hasRadioactiveCloud);
8451
- React__default.useEffect(function () {
8697
+ React.useEffect(function () {
8452
8698
  if (!hasVolcanicAshes) {
8453
8699
  unregister(['vaSigmetVolcanoName', 'vaSigmetVolcanoCoordinates.latitude', 'vaSigmetVolcanoCoordinates.longitude']);
8454
8700
  }
@@ -8489,11 +8735,11 @@ var SigmetForm = function SigmetForm(_ref) {
8489
8735
  handleSubmit = _useFormContext2.handleSubmit,
8490
8736
  trigger = _useFormContext2.trigger,
8491
8737
  errors = _useFormContext2.formState.errors;
8492
- var _React$useState = React__default.useState(false),
8738
+ var _React$useState = React.useState(false),
8493
8739
  hasUserChangedTime = _React$useState[0],
8494
8740
  setHasUserChangedTime = _React$useState[1];
8495
8741
  var firBorderAtStart = initialSigmet ? initialSigmet.locationIndicatorATSR : productConfig.active_firs[0];
8496
- var _React$useState2 = React__default.useState(getDefaultPhenomena(productConfig).phenomena),
8742
+ var _React$useState2 = React.useState(getDefaultPhenomena(productConfig).phenomena),
8497
8743
  phenomenaList = _React$useState2[0],
8498
8744
  setPhenomenaList = _React$useState2[1];
8499
8745
  var sourcePanelId = useSelector(function (store) {
@@ -8574,7 +8820,7 @@ var SigmetForm = function SigmetForm(_ref) {
8574
8820
  var _useTAC = useTAC(t, initialSigmet != null ? initialSigmet : initialCancelSigmet, getTAC != null ? getTAC : fetchSigmetTAC, getHasFormErrors, getOmitChangeFromConfig(productConfig)),
8575
8821
  tac = _useTAC[0],
8576
8822
  updateTac = _useTAC[1];
8577
- React__default.useEffect(function () {
8823
+ React.useEffect(function () {
8578
8824
  updateTac(watch);
8579
8825
  }, [initialSigmet, updateTac, watch]);
8580
8826
  var onChangeForm = useCallback(function () {
@@ -8648,12 +8894,12 @@ var SigmetForm = function SigmetForm(_ref) {
8648
8894
  updateGeojson: updateStartGeoJson
8649
8895
  }), getEndLayer('geoJSONIntersection', 'geojsonlayer-intersection-end'), getStartLayer('geoJSONIntersection', 'geojsonlayer-intersection-start')];
8650
8896
  useFormLayers(layers);
8651
- var _React$useState3 = React__default.useState(mode === 'view'),
8897
+ var _React$useState3 = React.useState(mode === 'view'),
8652
8898
  isDisabled = _React$useState3[0],
8653
8899
  setIsDisabled = _React$useState3[1];
8654
8900
  var isReadOnly = mode === 'view';
8655
8901
  var helperText = isReadOnly ? '' : 'Optional';
8656
- React__default.useEffect(function () {
8902
+ React.useEffect(function () {
8657
8903
  var isInDrawMode = activeStartTool !== '' || activeEndTool !== '';
8658
8904
  setDialogActionsDisabled == null || setDialogActionsDisabled(isInDrawMode);
8659
8905
  if (mode === 'view') {
@@ -8698,92 +8944,92 @@ var SigmetForm = function SigmetForm(_ref) {
8698
8944
  spacing: 2,
8699
8945
  sx: formStyles,
8700
8946
  children: [jsx(Type, {
8701
- productType: "sigmet",
8702
8947
  isDisabled: isDisabled,
8703
8948
  isReadOnly: isReadOnly,
8704
- onChange: onChangeForm
8949
+ onChange: onChangeForm,
8950
+ productType: "sigmet"
8705
8951
  }), !isCancelSigmet && jsx(Phenomenon, {
8706
- productType: "sigmet",
8707
- productConfig: productConfig,
8708
- phenomenaList: phenomenaList,
8709
8952
  isDisabled: isDisabled,
8710
8953
  isReadOnly: isReadOnly,
8711
- onChange: onChangeForm
8954
+ onChange: onChangeForm,
8955
+ phenomenaList: phenomenaList,
8956
+ productConfig: productConfig,
8957
+ productType: "sigmet"
8712
8958
  }), !isCancelSigmet && jsx(ObservationForecast, {
8713
8959
  isDisabled: isDisabled,
8714
8960
  isReadOnly: isReadOnly
8715
8961
  }), !isCancelSigmet && jsx(ObservationForecastTime, {
8716
- isDisabled: isDisabled,
8717
- isReadOnly: isReadOnly,
8718
8962
  helperText: helperText,
8719
- onChange: onChangeForm
8720
- }), !isCancelSigmet && hasVolcanicAshes && !isShortTest() ? jsx(VolcanicFields, {
8721
8963
  isDisabled: isDisabled,
8722
8964
  isReadOnly: isReadOnly,
8965
+ onChange: onChangeForm
8966
+ }), !isCancelSigmet && hasVolcanicAshes && !isShortTest() ? jsx(VolcanicFields, {
8967
+ degreesAndMinutes: degreesAndMinutes,
8723
8968
  helperText: helperText,
8724
- degreesAndMinutes: degreesAndMinutes
8969
+ isDisabled: isDisabled,
8970
+ isReadOnly: isReadOnly
8725
8971
  }) : null, jsx(ValidFrom, {
8726
- productConfig: productConfig,
8727
8972
  isDisabled: isDisabled,
8728
8973
  isReadOnly: isReadOnly,
8974
+ lockBecauseActive: lockValidFrom,
8729
8975
  onChange: onChangeForm,
8730
8976
  onUserChange: function onUserChange() {
8731
8977
  return setHasUserChangedTime(true);
8732
8978
  },
8733
- lockBecauseActive: lockValidFrom
8979
+ productConfig: productConfig
8734
8980
  }), jsx(ValidUntil, {
8735
- productConfig: productConfig,
8981
+ hasUserChangedTime: hasUserChangedTime,
8736
8982
  isDisabled: isDisabled,
8737
8983
  isReadOnly: isReadOnly,
8738
8984
  onChange: onChangeForm,
8739
- hasUserChangedTime: hasUserChangedTime,
8740
8985
  onUserChange: function onUserChange() {
8741
8986
  return setHasUserChangedTime(true);
8742
- }
8987
+ },
8988
+ productConfig: productConfig
8743
8989
  }), jsx(SelectFIR, {
8744
- productConfig: productConfig,
8745
8990
  isDisabled: isDisabled,
8746
8991
  isReadOnly: isReadOnly,
8747
8992
  onChange: function onChange(event, newPhenomenaList) {
8748
8993
  onChangeFir(newPhenomenaList != null ? newPhenomenaList : [], event);
8749
- }
8994
+ },
8995
+ productConfig: productConfig
8750
8996
  }), jsx(StartGeometry, {
8751
- isReadOnly: isReadOnly,
8997
+ activeTool: activeStartTool,
8752
8998
  geoJSON: startGeoJSON,
8753
8999
  geoJSONIntersection: startGeoJSONIntersection,
8754
- tools: startEditModes,
9000
+ isDisabled: drawToolsDisabled,
9001
+ isReadOnly: isReadOnly,
8755
9002
  onChangeTool: onChangeStartTool,
8756
- activeTool: activeStartTool,
8757
9003
  productConfig: productConfig,
8758
- isDisabled: drawToolsDisabled
9004
+ tools: startEditModes
8759
9005
  }), !isCancelSigmet && jsx(Levels, {
8760
9006
  isDisabled: isDisabled,
8761
9007
  isReadOnly: isReadOnly,
8762
9008
  onChange: onChangeForm,
8763
- productType: "sigmet",
8764
- productConfig: productConfig
8765
- }), !isCancelSigmet && jsx(Progress, {
8766
- productType: "sigmet",
8767
9009
  productConfig: productConfig,
9010
+ productType: "sigmet"
9011
+ }), !isCancelSigmet && jsx(Progress, {
9012
+ activeTool: activeEndTool,
9013
+ drawToolsDisabled: drawToolsDisabled,
9014
+ geoJSON: endGeoJSON,
9015
+ geoJSONIntersection: endGeoJSONIntersection,
8768
9016
  isDisabled: isDisabled,
8769
9017
  isReadOnly: isReadOnly,
8770
9018
  onChange: onChangeForm,
8771
- geoJSON: endGeoJSON,
8772
- geoJSONIntersection: endGeoJSONIntersection,
8773
- tools: endEditModes,
8774
9019
  onChangeTool: onChangeEndTool,
8775
- activeTool: activeEndTool,
8776
- drawToolsDisabled: drawToolsDisabled
9020
+ productConfig: productConfig,
9021
+ productType: "sigmet",
9022
+ tools: endEditModes
8777
9023
  }), !isCancelSigmet && !omitChange && jsx(Change, {
8778
9024
  isDisabled: isDisabled,
8779
9025
  isReadOnly: isReadOnly
8780
9026
  }), isCancelSigmet && watch('vaSigmetMoveToFIR') ? jsx(ProductFormFieldLayout, {
8781
9027
  children: jsxs(Typography, {
8782
- variant: "body2",
9028
+ "data-testid": "vaSigmetMoveToFIR",
8783
9029
  sx: Object.assign({}, styles$2.body, {
8784
9030
  marginBottom: '-4px'
8785
9031
  }),
8786
- "data-testid": "vaSigmetMoveToFIR",
9032
+ variant: "body2",
8787
9033
  children: [t('vulcanic-cloud-moving-text'), ":", ' ', jsxs("b", {
8788
9034
  children: [" ", watch('vaSigmetMoveToFIR')]
8789
9035
  })]
@@ -8792,11 +9038,11 @@ var SigmetForm = function SigmetForm(_ref) {
8792
9038
  date: getProductIssueDate(t, initialSigmet, initialCancelSigmet),
8793
9039
  isReadOnly: isReadOnly
8794
9040
  }), jsxs(Tac, {
8795
- tac: tac,
8796
9041
  product: product,
9042
+ tac: tac,
8797
9043
  children: [jsx(ReactHookFormHiddenInput, {
8798
- name: "sequence",
8799
- defaultValue: "-1"
9044
+ defaultValue: "-1",
9045
+ name: "sequence"
8800
9046
  }), /* Add hidden fields for TAC generation in case of cancel sigmet */
8801
9047
  isCancelSigmet ? jsxs(Fragment, {
8802
9048
  children: [jsx(ReactHookFormHiddenInput, {
@@ -8822,8 +9068,8 @@ var SigmetForm = function SigmetForm(_ref) {
8822
9068
  width: '100%'
8823
9069
  },
8824
9070
  children: jsx(ProductFormLayout, {
8825
- productConfig: productConfig,
8826
9071
  geoJSONLayers: layers,
9072
+ productConfig: productConfig,
8827
9073
  children: renderForm()
8828
9074
  })
8829
9075
  });
@@ -8836,28 +9082,28 @@ var useConditionalFields = function useConditionalFields() {
8836
9082
  // phenomenon: SFC_VIS
8837
9083
  var phenomenon = watch('phenomenon');
8838
9084
  var hasSurfaceVisiblity = phenomenon === 'SFC_VIS';
8839
- React__default.useEffect(function () {
9085
+ React.useEffect(function () {
8840
9086
  if (!hasSurfaceVisiblity) {
8841
9087
  unregister(['visibilityValue', 'visibilityCause']);
8842
9088
  }
8843
9089
  }, [hasSurfaceVisiblity, unregister]);
8844
9090
  // phenomenon: SFC_WIND
8845
9091
  var hasSurfaceWind = watch('phenomenon') === 'SFC_WIND';
8846
- React__default.useEffect(function () {
9092
+ React.useEffect(function () {
8847
9093
  if (!hasSurfaceWind) {
8848
9094
  unregister(['windDirection', 'windUnit', 'windSpeed']);
8849
9095
  }
8850
9096
  }, [hasSurfaceWind, unregister]);
8851
9097
  // phenomenon: SFC_WIND, SFC_VIS, BKN_CLD, OVC_CLD
8852
9098
  var hasLevels = phenomenon !== 'SFC_WIND' && phenomenon !== 'SFC_VIS' && phenomenon !== 'BKN_CLD' && phenomenon !== 'OVC_CLD';
8853
- React__default.useEffect(function () {
9099
+ React.useEffect(function () {
8854
9100
  if (!hasLevels) {
8855
9101
  unregister(['levelInfoMode', 'level', 'lowerLevel']);
8856
9102
  }
8857
9103
  }, [hasLevels, unregister]);
8858
9104
  // phenomenon: BKN_CLD
8859
9105
  var hasCloudLevels = phenomenon === 'BKN_CLD' || phenomenon === 'OVC_CLD';
8860
- React__default.useEffect(function () {
9106
+ React.useEffect(function () {
8861
9107
  if (!hasCloudLevels) {
8862
9108
  unregister(['cloudLevelInfoMode', 'cloudLevel', 'cloudLowerLevel']);
8863
9109
  }
@@ -8892,10 +9138,10 @@ var AirmetForm = function AirmetForm(_ref) {
8892
9138
  getValues = _useFormContext2.getValues,
8893
9139
  trigger = _useFormContext2.trigger,
8894
9140
  errors = _useFormContext2.formState.errors;
8895
- var _React$useState = React__default.useState(getDefaultPhenomena(productConfig).phenomena),
9141
+ var _React$useState = React.useState(getDefaultPhenomena(productConfig).phenomena),
8896
9142
  phenomenaList = _React$useState[0],
8897
9143
  setPhenomenaList = _React$useState[1];
8898
- var _React$useState2 = React__default.useState(false),
9144
+ var _React$useState2 = React.useState(false),
8899
9145
  hasUserChangedTime = _React$useState2[0],
8900
9146
  setHasUserChangedTime = _React$useState2[1];
8901
9147
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
@@ -8951,7 +9197,7 @@ var AirmetForm = function AirmetForm(_ref) {
8951
9197
  var _useTAC = useTAC(t, initialAirmet != null ? initialAirmet : initialCancelAirmet, getTAC != null ? getTAC : fetchAirmetTAC, getHasFormErrors),
8952
9198
  tac = _useTAC[0],
8953
9199
  updateTac = _useTAC[1];
8954
- React__default.useEffect(function () {
9200
+ React.useEffect(function () {
8955
9201
  updateTac(watch);
8956
9202
  }, [initialAirmet, updateTac, watch]);
8957
9203
  var onChangeForm = useCallback(function () {
@@ -8995,12 +9241,12 @@ var AirmetForm = function AirmetForm(_ref) {
8995
9241
  updateGeojson: updateStartGeoJson
8996
9242
  }), getStartLayer('geoJSONIntersection', 'geojsonlayer-intersection-start')];
8997
9243
  useFormLayers(layers);
8998
- var _React$useState3 = React__default.useState(mode === 'view'),
9244
+ var _React$useState3 = React.useState(mode === 'view'),
8999
9245
  isDisabled = _React$useState3[0],
9000
9246
  setIsDisabled = _React$useState3[1];
9001
9247
  var isReadOnly = mode === 'view';
9002
9248
  var helperText = isReadOnly ? '' : 'Optional';
9003
- React__default.useEffect(function () {
9249
+ React.useEffect(function () {
9004
9250
  var isInDrawMode = activeStartTool !== '';
9005
9251
  if (mode === 'view') {
9006
9252
  setIsDisabled(true);
@@ -9037,98 +9283,98 @@ var AirmetForm = function AirmetForm(_ref) {
9037
9283
  spacing: 2,
9038
9284
  sx: formStyles,
9039
9285
  children: [jsx(Type, {
9040
- productType: "airmet",
9041
9286
  isDisabled: isDisabled,
9042
9287
  isReadOnly: isReadOnly,
9043
- onChange: onChangeForm
9288
+ onChange: onChangeForm,
9289
+ productType: "airmet"
9044
9290
  }), !isCancelAirmet && jsx(Phenomenon, {
9045
- productType: "airmet",
9046
- productConfig: productConfig,
9047
- phenomenaList: phenomenaList,
9048
9291
  isDisabled: isDisabled,
9049
9292
  isReadOnly: isReadOnly,
9050
- onChange: onChangeForm
9293
+ onChange: onChangeForm,
9294
+ phenomenaList: phenomenaList,
9295
+ productConfig: productConfig,
9296
+ productType: "airmet"
9051
9297
  }), !isCancelAirmet && hasSurfaceVisiblity ? jsx(SurfaceVisibility, {
9052
- isReadOnly: isReadOnly,
9053
9298
  isDisabled: isDisabled,
9299
+ isReadOnly: isReadOnly,
9054
9300
  onChange: onChangeForm,
9055
9301
  productConfig: productConfig
9056
9302
  }) : null, !isCancelAirmet && hasSurfaceWind ? jsx(SurfaceWind, {
9057
- isReadOnly: isReadOnly,
9058
9303
  isDisabled: isDisabled,
9304
+ isReadOnly: isReadOnly,
9059
9305
  onChange: onChangeForm,
9060
9306
  productConfig: productConfig
9061
9307
  }) : null, !isCancelAirmet && jsx(ObservationForecast, {
9062
9308
  isDisabled: isDisabled,
9063
9309
  isReadOnly: isReadOnly
9064
9310
  }), !isCancelAirmet && jsx(ObservationForecastTime, {
9311
+ helperText: helperText,
9065
9312
  isDisabled: isDisabled,
9066
9313
  isReadOnly: isReadOnly,
9067
- helperText: helperText,
9068
9314
  onChange: onChangeForm
9069
9315
  }), jsx(ValidFrom, {
9070
- productConfig: productConfig,
9071
9316
  isDisabled: isDisabled,
9072
9317
  isReadOnly: isReadOnly,
9318
+ lockBecauseActive: lockValidFrom,
9073
9319
  onChange: onChangeForm,
9074
9320
  onUserChange: function onUserChange() {
9075
9321
  return setHasUserChangedTime(true);
9076
9322
  },
9077
- lockBecauseActive: lockValidFrom
9323
+ productConfig: productConfig
9078
9324
  }), jsx(ValidUntil, {
9079
- productConfig: productConfig,
9325
+ hasUserChangedTime: hasUserChangedTime,
9080
9326
  isDisabled: isDisabled,
9081
9327
  isReadOnly: isReadOnly,
9082
9328
  onChange: onChangeForm,
9083
- hasUserChangedTime: hasUserChangedTime,
9084
9329
  onUserChange: function onUserChange() {
9085
9330
  return setHasUserChangedTime(true);
9086
- }
9331
+ },
9332
+ productConfig: productConfig
9087
9333
  }), jsx(SelectFIR, {
9088
- isReadOnly: isReadOnly,
9089
9334
  isDisabled: isDisabled,
9090
- productConfig: productConfig,
9335
+ isReadOnly: isReadOnly,
9091
9336
  onChange: function onChange(event, newPhenomenaList) {
9092
9337
  onChangeFir(newPhenomenaList != null ? newPhenomenaList : [], event);
9093
- }
9338
+ },
9339
+ productConfig: productConfig
9094
9340
  }), jsx(StartGeometry, {
9095
- isReadOnly: isReadOnly,
9341
+ activeTool: activeStartTool,
9096
9342
  geoJSON: startGeoJSON,
9097
9343
  geoJSONIntersection: startGeoJSONIntersection,
9098
- tools: startEditModes,
9344
+ isDisabled: drawToolsDisabled,
9345
+ isReadOnly: isReadOnly,
9099
9346
  onChangeTool: onChangeStartTool,
9100
- activeTool: activeStartTool,
9101
9347
  productConfig: productConfig,
9102
- isDisabled: drawToolsDisabled
9348
+ tools: startEditModes
9103
9349
  }), !isCancelAirmet && hasLevels ? jsx(Levels, {
9104
9350
  isDisabled: isDisabled,
9105
9351
  isReadOnly: isReadOnly,
9106
9352
  onChange: onChangeForm,
9107
- productType: "airmet",
9108
- productConfig: productConfig
9353
+ productConfig: productConfig,
9354
+ productType: "airmet"
9109
9355
  }) : null, !isCancelAirmet && hasCloudLevels ? jsx(CloudLevels, {
9110
9356
  isDisabled: isDisabled,
9111
9357
  isReadOnly: isReadOnly,
9112
9358
  onChange: onChangeForm,
9113
9359
  productConfig: productConfig
9114
9360
  }) : null, !isCancelAirmet && jsx(Progress, {
9115
- productType: "airmet",
9116
9361
  isDisabled: isDisabled,
9117
9362
  isReadOnly: isReadOnly,
9118
9363
  onChange: onChangeForm,
9119
- productConfig: productConfig
9364
+ productConfig: productConfig,
9365
+ productType: "airmet"
9120
9366
  }), !isCancelAirmet && jsx(Change, {
9121
9367
  isDisabled: isDisabled,
9122
9368
  isReadOnly: isReadOnly
9123
9369
  }), jsx(IssuedAt, {
9124
- isReadOnly: isReadOnly,
9125
- date: getProductIssueDate(t, initialAirmet, initialCancelAirmet)
9370
+ date: getProductIssueDate(t, initialAirmet, initialCancelAirmet),
9371
+ isReadOnly: isReadOnly
9126
9372
  }), jsxs(Tac, {
9127
- tac: tac,
9128
9373
  product: product,
9374
+ tac: tac,
9129
9375
  children: [jsx(ReactHookFormHiddenInput, {
9130
- name: "sequence",
9131
- defaultValue: "-1"
9376
+ defaultValue: "-1",
9377
+ name: "sequence"
9132
9378
  }), /* Add hidden fields for TAC generation in case of cancel airmet */
9133
9379
  isCancelAirmet ? jsxs(Fragment, {
9134
9380
  children: [jsx(ReactHookFormHiddenInput, {
@@ -9154,8 +9400,8 @@ var AirmetForm = function AirmetForm(_ref) {
9154
9400
  width: '100%'
9155
9401
  },
9156
9402
  children: jsx(ProductFormLayout, {
9157
- productConfig: productConfig,
9158
9403
  geoJSONLayers: layers,
9404
+ productConfig: productConfig,
9159
9405
  children: renderForm()
9160
9406
  })
9161
9407
  });
@@ -9174,24 +9420,24 @@ var CancelSigmetVolcanicMovements = function CancelSigmetVolcanicMovements(_ref)
9174
9420
  variant: "body1",
9175
9421
  children: [t('vulcanic-ash-description'), ":"]
9176
9422
  }), jsxs(ReactHookFormRadioGroup, {
9423
+ defaultValue: t('unknown').toUpperCase(),
9177
9424
  name: "vaSigmetMoveToFIR",
9425
+ row: true,
9178
9426
  rules: {
9179
9427
  validate: {
9180
9428
  isRequired: isRequired
9181
9429
  }
9182
9430
  },
9183
- row: true,
9184
- defaultValue: t('unknown').toUpperCase(),
9185
9431
  children: [allFIRS[sigmet.locationIndicatorATSR].adjacent_firs.map(function (adjacentFIR) {
9186
9432
  return jsx(FormControlLabel, {
9187
- value: adjacentFIR,
9188
9433
  control: jsx(Radio, {}),
9189
- label: adjacentFIR
9434
+ label: adjacentFIR,
9435
+ value: adjacentFIR
9190
9436
  }, adjacentFIR);
9191
9437
  }), jsx(FormControlLabel, {
9192
- value: "UNKNOWN",
9193
9438
  control: jsx(Radio, {}),
9194
- label: t('vulcanic-VA-SIGMET-text')
9439
+ label: t('vulcanic-VA-SIGMET-text'),
9440
+ value: "UNKNOWN"
9195
9441
  }, "UNKNOWN")]
9196
9442
  })]
9197
9443
  });
@@ -9249,7 +9495,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9249
9495
  dialogActionsDisabled = _React$useState3[0],
9250
9496
  setDialogActionsDisabled = _React$useState3[1];
9251
9497
  var postProduct = function postProduct(productToPost, newStatus) {
9252
- var uuid = product !== null && product.uuid ? product.uuid : null;
9498
+ var uuid = product != null && product.uuid ? product.uuid : null;
9253
9499
  var postProductParam = productType === 'sigmet' ? createSigmetPostParameter(productToPost, newStatus, uuid) : createAirmetPostParameter(productToPost, newStatus, uuid);
9254
9500
  apiCall(postProductParam).then(function () {
9255
9501
  onToggleDialog();
@@ -9264,27 +9510,40 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9264
9510
  }
9265
9511
  toggleDialogStatus(shouldRefreshList);
9266
9512
  };
9267
- var showConfirmDialog = function showConfirmDialog(action) {
9268
- return confirmationDialog({
9269
- title: getConfirmationDialogTitle(t, action, productType),
9270
- description: getConfirmationDialogContent(t, action, productType),
9271
- confirmLabel: getConfirmationDialogButtonLabel(t, action, productType),
9272
- cancelLabel: getConfirmationDialogCancelLabel(t, action),
9273
- catchOnCancel: action === ProductAction.CLOSE,
9274
- content: isVAPhenomenon(product, action) && !isShortTest() ? jsx(CancelSigmetVolcanicMovements, {
9275
- sigmet: product,
9276
- productConfig: productConfig
9277
- }) : null
9278
- });
9279
- };
9280
- var onProductButtonPress = /*#__PURE__*/function () {
9513
+ var showConfirmDialog = /*#__PURE__*/function () {
9281
9514
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(action) {
9282
- var isDraft, formValues;
9283
9515
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9284
9516
  while (1) switch (_context.prev = _context.next) {
9285
9517
  case 0:
9286
- _context.t0 = action;
9287
- _context.next = _context.t0 === ProductAction.CLOSE ? 3 : _context.t0 === ProductAction.CANCEL ? 5 : _context.t0 === ProductAction.DISCARD ? 7 : _context.t0 === ProductAction.RENEW ? 9 : 11;
9518
+ return _context.abrupt("return", confirmationDialog({
9519
+ title: getConfirmationDialogTitle(t, action, productType),
9520
+ description: getConfirmationDialogContent(t, action, productType),
9521
+ confirmLabel: getConfirmationDialogButtonLabel(t, action, productType),
9522
+ cancelLabel: getConfirmationDialogCancelLabel(t, action),
9523
+ catchOnCancel: action === ProductAction.CLOSE,
9524
+ content: isVAPhenomenon(product, action) && !isShortTest() ? jsx(CancelSigmetVolcanicMovements, {
9525
+ productConfig: productConfig,
9526
+ sigmet: product
9527
+ }) : null
9528
+ }));
9529
+ case 1:
9530
+ case "end":
9531
+ return _context.stop();
9532
+ }
9533
+ }, _callee);
9534
+ }));
9535
+ return function showConfirmDialog(_x) {
9536
+ return _ref2.apply(this, arguments);
9537
+ };
9538
+ }();
9539
+ var onProductButtonPress = /*#__PURE__*/function () {
9540
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(action) {
9541
+ var isDraft, formValues;
9542
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9543
+ while (1) switch (_context2.prev = _context2.next) {
9544
+ case 0:
9545
+ _context2.t0 = action;
9546
+ _context2.next = _context2.t0 === ProductAction.CLOSE ? 3 : _context2.t0 === ProductAction.CANCEL ? 5 : _context2.t0 === ProductAction.DISCARD ? 7 : _context2.t0 === ProductAction.RENEW ? 9 : 11;
9288
9547
  break;
9289
9548
  case 3:
9290
9549
  if (mode === 'view' || !isDirty) {
@@ -9302,7 +9561,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9302
9561
  }
9303
9562
  });
9304
9563
  }
9305
- return _context.abrupt("break", 22);
9564
+ return _context2.abrupt("break", 22);
9306
9565
  case 5:
9307
9566
  void showConfirmDialog(action).then(function () {
9308
9567
  // if volcanic sigmet - add to which FIR it's moving
@@ -9312,7 +9571,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9312
9571
  postProduct(product, 'CANCELLED');
9313
9572
  }
9314
9573
  });
9315
- return _context.abrupt("break", 22);
9574
+ return _context2.abrupt("break", 22);
9316
9575
  case 7:
9317
9576
  void showConfirmDialog(action).then(function () {
9318
9577
  // If we're discarding a new SIGMET/AIRMET - just close the dialog
@@ -9323,23 +9582,23 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9323
9582
  postProduct(product, 'DISCARDED');
9324
9583
  }
9325
9584
  });
9326
- return _context.abrupt("break", 22);
9585
+ return _context2.abrupt("break", 22);
9327
9586
  case 9:
9328
9587
  onRenewClick();
9329
- return _context.abrupt("break", 22);
9588
+ return _context2.abrupt("break", 22);
9330
9589
  case 11:
9331
9590
  isDraft = action === ProductAction.SAVE;
9332
9591
  toggleIsDraft(isDraft);
9333
9592
  if (!isDraft) {
9334
- _context.next = 20;
9593
+ _context2.next = 20;
9335
9594
  break;
9336
9595
  }
9337
- _context.next = 16;
9596
+ _context2.next = 16;
9338
9597
  return trigger();
9339
9598
  case 16:
9340
9599
  formValues = getValues(); // Save draft without blocking on validation
9341
9600
  postProduct(formValues, 'DRAFT');
9342
- _context.next = 21;
9601
+ _context2.next = 21;
9343
9602
  break;
9344
9603
  case 20:
9345
9604
  // Validate and submit normally (will block if invalid)
@@ -9349,29 +9608,23 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9349
9608
  });
9350
9609
  })();
9351
9610
  case 21:
9352
- return _context.abrupt("break", 22);
9611
+ return _context2.abrupt("break", 22);
9353
9612
  case 22:
9354
9613
  case "end":
9355
- return _context.stop();
9614
+ return _context2.stop();
9356
9615
  }
9357
- }, _callee);
9616
+ }, _callee2);
9358
9617
  }));
9359
- return function onProductButtonPress(_x) {
9360
- return _ref2.apply(this, arguments);
9618
+ return function onProductButtonPress(_x2) {
9619
+ return _ref3.apply(this, arguments);
9361
9620
  };
9362
9621
  }();
9363
9622
  var title = getDialogtitle(t, product, productType, productConfig);
9364
9623
  return jsxs(CustomDialog, {
9365
- open: isOpen,
9366
9624
  "data-testid": "productform-dialog",
9367
- title: title,
9368
- fullWidth: true,
9369
- maxWidth: "xl",
9370
9625
  disableEnforceFocus: true,
9371
9626
  disableEscapeKeyDown: true,
9372
- onClose: function onClose() {
9373
- void onProductButtonPress(ProductAction.CLOSE);
9374
- },
9627
+ fullWidth: true,
9375
9628
  headerActions: getLifecycleActions({
9376
9629
  canBe: productCanBe,
9377
9630
  onButtonPress: onProductButtonPress,
@@ -9379,19 +9632,25 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9379
9632
  areActionsDisabled: dialogActionsDisabled,
9380
9633
  t: t
9381
9634
  }),
9635
+ maxWidth: "xl",
9636
+ onClose: function onClose() {
9637
+ void onProductButtonPress(ProductAction.CLOSE);
9638
+ },
9639
+ open: isOpen,
9640
+ style: {
9641
+ zIndex: 1000
9642
+ },
9382
9643
  sx: {
9383
9644
  height: '100%',
9384
9645
  '.MuiDialogContent-root': {
9385
9646
  padding: 0
9386
9647
  }
9387
9648
  },
9388
- style: {
9389
- zIndex: 1000
9390
- },
9649
+ title: title,
9391
9650
  children: [errorStoreMessage ? jsx(AlertBanner, {
9651
+ info: errorStoreMessageText,
9392
9652
  severity: "error",
9393
- title: "An error has occurred while saving, please try again",
9394
- info: errorStoreMessageText
9653
+ title: "An error has occurred while saving, please try again"
9395
9654
  }) : null, jsx(Box, {
9396
9655
  sx: {
9397
9656
  display: 'flex',
@@ -9399,20 +9658,20 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9399
9658
  height: '100%'
9400
9659
  },
9401
9660
  children: productType === 'sigmet' ? jsx(SigmetForm, {
9402
- mode: mode,
9403
- isCancelSigmet: product !== null && isInstanceOfCancelSigmet(product),
9404
- initialSigmet: product !== null && !isInstanceOfCancelSigmet(product) ? product : null,
9405
9661
  initialCancelSigmet: product !== null && isInstanceOfCancelSigmet(product) ? product : null,
9662
+ initialSigmet: product !== null && !isInstanceOfCancelSigmet(product) ? product : null,
9663
+ isCancelSigmet: product !== null && isInstanceOfCancelSigmet(product),
9664
+ mode: mode,
9665
+ product: product,
9406
9666
  productConfig: productConfig,
9407
- setDialogActionsDisabled: setDialogActionsDisabled,
9408
- product: product
9667
+ setDialogActionsDisabled: setDialogActionsDisabled
9409
9668
  }) : jsx(AirmetForm, {
9410
- mode: mode,
9411
- isCancelAirmet: product !== null && isInstanceOfCancelAirmet(product),
9412
9669
  initialAirmet: product !== null && !isInstanceOfCancelAirmet(product) ? product : null,
9413
9670
  initialCancelAirmet: product !== null && isInstanceOfCancelAirmet(product) ? product : null,
9414
- productConfig: productConfig,
9415
- product: product
9671
+ isCancelAirmet: product !== null && isInstanceOfCancelAirmet(product),
9672
+ mode: mode,
9673
+ product: product,
9674
+ productConfig: productConfig
9416
9675
  })
9417
9676
  }), jsx(DraftFieldHelper, {}), jsx(Backdrop, {
9418
9677
  "data-testid": "loader",
@@ -9427,8 +9686,8 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9427
9686
  })]
9428
9687
  });
9429
9688
  };
9430
- var Wrapper = function Wrapper(_ref3) {
9431
- var props = Object.assign({}, (_objectDestructuringEmpty(_ref3), _ref3));
9689
+ var Wrapper = function Wrapper(_ref4) {
9690
+ var props = Object.assign({}, (_objectDestructuringEmpty(_ref4), _ref4));
9432
9691
  return jsx(ReactHookFormProvider, {
9433
9692
  options: Object.assign({}, defaultFormOptions, {
9434
9693
  defaultValues: props.product,
@@ -9468,15 +9727,15 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
9468
9727
  var product = productListItem !== null ? prepareProductValues(productType === 'sigmet' ? productListItem[productType] : productListItem[productType], productType, productConfig) : null;
9469
9728
  return jsx(Wrapper, {
9470
9729
  isOpen: isOpen,
9471
- toggleDialogStatus: toggleDialogStatus,
9730
+ mode: mode,
9472
9731
  onRenewClick: function onRenewClick() {
9473
9732
  return handleRenewProductClick(productListItem);
9474
9733
  },
9475
- mode: mode,
9476
- productCanBe: productCanBe,
9477
9734
  product: product,
9735
+ productCanBe: productCanBe,
9736
+ productConfig: productConfig,
9478
9737
  productType: productType,
9479
- productConfig: productConfig
9738
+ toggleDialogStatus: toggleDialogStatus
9480
9739
  });
9481
9740
  };
9482
9741
 
@@ -9506,8 +9765,8 @@ var getActiveStatus = function getActiveStatus(product) {
9506
9765
  var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9507
9766
  if (cancelsSeqId !== null) {
9508
9767
  return jsx(StatusTag, {
9509
- content: "cancels " + cancelsSeqId,
9510
9768
  color: "red",
9769
+ content: "cancels " + cancelsSeqId,
9511
9770
  sx: {
9512
9771
  width: '80px'
9513
9772
  }
@@ -9515,8 +9774,8 @@ var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9515
9774
  }
9516
9775
  if (product.status === 'CANCELLED') {
9517
9776
  return jsx(StatusTag, {
9518
- content: "cancelled " + product.sequence,
9519
9777
  color: "red",
9778
+ content: "cancelled " + product.sequence,
9520
9779
  sx: {
9521
9780
  width: '80px'
9522
9781
  }
@@ -9524,16 +9783,16 @@ var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9524
9783
  }
9525
9784
  if (dateUtils.utc(product.validDateEnd) < dateUtils.utc()) {
9526
9785
  return jsx(StatusTag, {
9527
- content: "expired",
9528
9786
  color: "grey",
9787
+ content: "expired",
9529
9788
  sx: {
9530
9789
  width: '80px'
9531
9790
  }
9532
9791
  });
9533
9792
  }
9534
9793
  return jsx(StatusTag, {
9535
- content: product.status.toLowerCase(),
9536
9794
  color: product.status === 'PUBLISHED' ? 'green' : 'grey',
9795
+ content: product.status.toLowerCase(),
9537
9796
  sx: {
9538
9797
  marginRight: '0!important',
9539
9798
  width: '80px'
@@ -9639,14 +9898,15 @@ var ProductListRow = function ProductListRow(_ref2) {
9639
9898
  t = _useSigmetAirmetTrans.t;
9640
9899
  var _useIsMounted = useIsMounted(),
9641
9900
  isMounted = _useIsMounted.isMounted;
9642
- var _React$useState = React__default.useState(''),
9901
+ // eslint-disable-next-line react/hook-use-state
9902
+ var _React$useState = React.useState(''),
9643
9903
  TAC = _React$useState[0],
9644
9904
  setTAC = _React$useState[1];
9645
9905
  var _useTACApi = useTACApi(),
9646
9906
  fetchSigmetTAC = _useTACApi.fetchSigmetTAC,
9647
9907
  fetchAirmetTAC = _useTACApi.fetchAirmetTAC;
9648
9908
  var apiCall = productType === 'sigmet' ? fetchSigmetTAC : fetchAirmetTAC;
9649
- React__default.useEffect(function () {
9909
+ React.useEffect(function () {
9650
9910
  var retrieveTAC = /*#__PURE__*/function () {
9651
9911
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(productToPost) {
9652
9912
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -9705,26 +9965,26 @@ var ProductListRow = function ProductListRow(_ref2) {
9705
9965
  };
9706
9966
  return jsx(Card, {
9707
9967
  elevation: 0,
9708
- variant: "outlined",
9709
9968
  sx: listRowStyles,
9969
+ variant: "outlined",
9710
9970
  children: jsx(Box, {
9711
9971
  className: "productListContainer",
9712
9972
  children: jsxs(Grid, {
9713
- container: true,
9714
9973
  alignItems: "center",
9715
- spacing: 0,
9716
9974
  className: "rowContainer",
9975
+ container: true,
9976
+ spacing: 0,
9717
9977
  children: [jsxs(Grid, {
9718
9978
  className: "col-1",
9719
9979
  children: [phenomenon !== null && jsx(ProductListRowHeader, {
9720
9980
  title: productType.toUpperCase()
9721
9981
  }), jsx(CustomTooltip, {
9722
- title: phenomenon !== null ? String(getPhenomenon(fir, phenomenon, productConfig)) : '',
9723
9982
  placement: "bottom-start",
9983
+ title: phenomenon !== null ? String(getPhenomenon(fir, phenomenon, productConfig)) : '',
9724
9984
  children: jsx(Typography, {
9725
- variant: "subtitle2",
9726
9985
  noWrap: true,
9727
9986
  sx: styles.font,
9987
+ variant: "subtitle2",
9728
9988
  children: phenomenon !== null ? getLabel(product) : 'Cancel'
9729
9989
  })
9730
9990
  })]
@@ -9733,6 +9993,19 @@ var ProductListRow = function ProductListRow(_ref2) {
9733
9993
  children: [jsx(ProductListRowHeader, {
9734
9994
  title: t('issue-time')
9735
9995
  }), jsx(CustomTooltip, {
9996
+ placement: "bottom-start",
9997
+ slotProps: {
9998
+ tooltip: {
9999
+ sx: {
10000
+ bgcolor: 'geowebColors.background.surface',
10001
+ boxShadow: 8,
10002
+ '& .MuiTooltip-arrow': {
10003
+ color: 'common.black'
10004
+ },
10005
+ maxWidth: 472
10006
+ }
10007
+ }
10008
+ },
9736
10009
  title: jsxs(Fragment, {
9737
10010
  children: [jsx(ProductListRowHeader, {
9738
10011
  title: "TAC"
@@ -9740,7 +10013,6 @@ var ProductListRow = function ProductListRow(_ref2) {
9740
10013
  style: {
9741
10014
  whiteSpace: 'pre-line'
9742
10015
  },
9743
- variant: "subtitle2",
9744
10016
  sx: Object.assign({}, styles.font, {
9745
10017
  color: 'geowebColors.typographyAndIcons.text',
9746
10018
  fontSize: '1.125rem',
@@ -9749,26 +10021,14 @@ var ProductListRow = function ProductListRow(_ref2) {
9749
10021
  lineHeight: '28px',
9750
10022
  letterSpacing: '0.5px'
9751
10023
  }),
10024
+ variant: "subtitle2",
9752
10025
  children: TAC
9753
10026
  })]
9754
10027
  }),
9755
- placement: "bottom-start",
9756
- slotProps: {
9757
- tooltip: {
9758
- sx: {
9759
- bgcolor: 'geowebColors.background.surface',
9760
- boxShadow: 8,
9761
- '& .MuiTooltip-arrow': {
9762
- color: 'common.black'
9763
- },
9764
- maxWidth: 472
9765
- }
9766
- }
9767
- },
9768
10028
  children: jsx(Typography, {
9769
- variant: "subtitle2",
9770
- sx: styles.font,
9771
10029
  "data-testid": "issueTime",
10030
+ sx: styles.font,
10031
+ variant: "subtitle2",
9772
10032
  children: product.issueDate ? dateUtils.dateToString(dateUtils.utc(product.issueDate), dateUtils.DATE_FORMAT_NAME_OF_MONTH) + " UTC" : t('not-published')
9773
10033
  })
9774
10034
  })]
@@ -9777,20 +10037,20 @@ var ProductListRow = function ProductListRow(_ref2) {
9777
10037
  children: [jsx(ProductListRowHeader, {
9778
10038
  title: t('valid-time')
9779
10039
  }), jsx(Typography, {
9780
- variant: "subtitle2",
9781
- sx: styles.font,
9782
10040
  "data-testid": "validTime",
10041
+ sx: styles.font,
10042
+ variant: "subtitle2",
9783
10043
  children: validTime
9784
10044
  })]
9785
10045
  }), jsxs(Grid, {
9786
10046
  className: "col-4",
9787
10047
  container: true,
9788
10048
  children: [product.status === 'DRAFT' ? jsx(Button, {
10049
+ startIcon: jsx(Edit, {}),
9789
10050
  sx: {
9790
10051
  marginTop: '6px'
9791
10052
  },
9792
10053
  variant: "flat",
9793
- startIcon: jsx(Edit, {}),
9794
10054
  children: t('draft')
9795
10055
  }) : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product)]
9796
10056
  })]
@@ -9810,9 +10070,9 @@ var ProductList = function ProductList(_ref) {
9810
10070
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
9811
10071
  t = _useSigmetAirmetTrans.t;
9812
10072
  return jsxs(Fragment, {
9813
- children: [isLoading && jsx(LinearProgress, {
9814
- "data-testid": "productlist-loadingbar",
10073
+ children: [!!isLoading && jsx(LinearProgress, {
9815
10074
  color: "secondary",
10075
+ "data-testid": "productlist-loadingbar",
9816
10076
  sx: {
9817
10077
  position: 'absolute',
9818
10078
  width: '100%',
@@ -9820,7 +10080,7 @@ var ProductList = function ProductList(_ref) {
9820
10080
  left: 0,
9821
10081
  top: 0
9822
10082
  }
9823
- }), error && jsx(Box, {
10083
+ }), !!error && jsx(Box, {
9824
10084
  sx: {
9825
10085
  marginBottom: 2,
9826
10086
  ' .MuiAlert-message': {
@@ -9828,25 +10088,25 @@ var ProductList = function ProductList(_ref) {
9828
10088
  }
9829
10089
  },
9830
10090
  children: jsx(AlertBanner, {
9831
- severity: "error",
9832
- title: error.name,
10091
+ dataTestId: "productList-alert",
9833
10092
  info: error.message ? error.message : '',
9834
- dataTestId: "productList-alert"
10093
+ severity: "error",
10094
+ title: error.name
9835
10095
  })
9836
10096
  }), jsxs(Grid, {
10097
+ alignItems: "stretch",
9837
10098
  container: true,
9838
10099
  direction: "column",
9839
- alignItems: "stretch",
9840
10100
  children: [jsx(Grid, {
9841
10101
  container: true,
9842
10102
  justifyContent: "flex-end",
9843
10103
  children: jsx(Button, {
9844
- variant: "primary",
9845
10104
  "data-testid": "productListCreateButton",
9846
10105
  onClick: onClickNewProduct,
9847
10106
  sx: {
9848
10107
  textTransform: 'initial'
9849
10108
  },
10109
+ variant: "primary",
9850
10110
  children: t('create-new-product', {
9851
10111
  product: productType.toUpperCase()
9852
10112
  })
@@ -9856,7 +10116,7 @@ var ProductList = function ProductList(_ref) {
9856
10116
  width: '100%',
9857
10117
  minHeight: '600px'
9858
10118
  },
9859
- children: productList && jsx(List, {
10119
+ children: !!productList && jsx(List, {
9860
10120
  sx: {
9861
10121
  paddingTop: 4,
9862
10122
  containerType: 'inline-size'
@@ -9873,8 +10133,8 @@ var ProductList = function ProductList(_ref) {
9873
10133
  },
9874
10134
  children: jsx(ProductListRow, {
9875
10135
  product: product,
9876
- productType: productType,
9877
- productConfig: productConfig
10136
+ productConfig: productConfig,
10137
+ productType: productType
9878
10138
  })
9879
10139
  }, product.uuid);
9880
10140
  })
@@ -9957,14 +10217,14 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
9957
10217
  errorList = _useProductApi.error,
9958
10218
  productList = _useProductApi.result,
9959
10219
  fetchNewProductList = _useProductApi.fetchNewData;
9960
- var _React$useState = React__default.useState(false),
10220
+ var _React$useState = React.useState(false),
9961
10221
  isFormDialogOpen = _React$useState[0],
9962
10222
  setIsFormDialogOpen = _React$useState[1];
9963
- var _React$useState2 = React__default.useState(),
10223
+ var _React$useState2 = React.useState(),
9964
10224
  selectedProduct = _React$useState2[0],
9965
10225
  setSelectedProduct = _React$useState2[1];
9966
10226
  usePoller([productList, errorList], fetchNewProductList, 60000);
9967
- React__default.useEffect(function () {
10227
+ React.useEffect(function () {
9968
10228
  if (selectedProduct && !isFormDialogOpen) {
9969
10229
  toggleDialogOpen();
9970
10230
  }
@@ -9975,7 +10235,7 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
9975
10235
  shouldRefreshList = true;
9976
10236
  }
9977
10237
  // Refresh list on closing dialog
9978
- if (isFormDialogOpen === true && shouldRefreshList) {
10238
+ if (isFormDialogOpen && shouldRefreshList) {
9979
10239
  void fetchNewProductList();
9980
10240
  }
9981
10241
  setIsFormDialogOpen(!isFormDialogOpen);
@@ -10007,20 +10267,20 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
10007
10267
  },
10008
10268
  children: [jsx(ProductList, {
10009
10269
  "data-testid": "sigmetAirmetList",
10010
- productList: productList,
10011
- productType: productType,
10012
- productConfig: productConfig,
10013
- isLoading: isLoadingList,
10014
10270
  error: errorList,
10271
+ isLoading: isLoadingList,
10272
+ onClickNewProduct: handleNewProductClick,
10015
10273
  onClickProductRow: handleProductRowClick,
10016
- onClickNewProduct: handleNewProductClick
10017
- }), jsx(ProductFormDialog, {
10018
- productType: productType,
10019
10274
  productConfig: productConfig,
10020
- isOpen: isFormDialogOpen,
10021
- toggleDialogStatus: toggleDialogOpen,
10275
+ productList: productList,
10276
+ productType: productType
10277
+ }), jsx(ProductFormDialog, {
10022
10278
  handleRenewProductClick: handleRenewProductClick,
10023
- productListItem: selectedProduct
10279
+ isOpen: isFormDialogOpen,
10280
+ productConfig: productConfig,
10281
+ productListItem: selectedProduct,
10282
+ productType: productType,
10283
+ toggleDialogStatus: toggleDialogOpen
10024
10284
  })]
10025
10285
  });
10026
10286
  };
@@ -10042,19 +10302,19 @@ var DownloadSigmetAirmetConfigWrapper = function DownloadSigmetAirmetConfigWrapp
10042
10302
  }
10043
10303
  if (error) {
10044
10304
  return jsx(AlertBanner, {
10045
- title: t('error-title'),
10046
- info: !isLoggedIn ? t('error-auth-login') : error.message
10305
+ info: !isLoggedIn ? t('error-auth-login') : error.message,
10306
+ title: t('error-title')
10047
10307
  });
10048
10308
  }
10049
10309
  if (!productConfig) {
10050
10310
  return jsx(AlertBanner, {
10051
- title: t('error-title'),
10052
- info: t('error-no-config-found')
10311
+ info: t('error-no-config-found'),
10312
+ title: t('error-title')
10053
10313
  });
10054
10314
  }
10055
10315
  return jsx(MetInfoWrapper, {
10056
- productType: productType,
10057
- productConfig: productConfig
10316
+ productConfig: productConfig,
10317
+ productType: productType
10058
10318
  });
10059
10319
  };
10060
10320
 
@@ -10082,17 +10342,17 @@ ConnectedModuleWrapper) {
10082
10342
  case 'SigmetModule':
10083
10343
  if (ConnectedModuleWrapper) {
10084
10344
  return jsx(ConnectedModuleWrapper, {
10345
+ auth: auth,
10085
10346
  component: AviationProductApiWrapper,
10086
- payload: payload,
10087
10347
  config: config,
10088
- auth: auth,
10089
10348
  onSetAuth: onSetAuth,
10349
+ payload: payload,
10090
10350
  productType: "sigmet"
10091
10351
  });
10092
10352
  }
10093
10353
  return jsx(AviationProductApiWrapper, {
10094
- config: config,
10095
10354
  auth: auth,
10355
+ config: config,
10096
10356
  onSetAuth: onSetAuth,
10097
10357
  productType: "sigmet"
10098
10358
  });
@@ -10115,17 +10375,17 @@ ConnectedModuleWrapper) {
10115
10375
  case 'AirmetModule':
10116
10376
  if (ConnectedModuleWrapper) {
10117
10377
  return jsx(ConnectedModuleWrapper, {
10378
+ auth: auth,
10118
10379
  component: AviationProductApiWrapper,
10119
- payload: payload,
10120
10380
  config: config,
10121
- auth: auth,
10122
10381
  onSetAuth: onSetAuth,
10382
+ payload: payload,
10123
10383
  productType: "airmet"
10124
10384
  });
10125
10385
  }
10126
10386
  return jsx(AviationProductApiWrapper, {
10127
- config: config,
10128
10387
  auth: auth,
10388
+ config: config,
10129
10389
  onSetAuth: onSetAuth,
10130
10390
  productType: "airmet"
10131
10391
  });